mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 15:01:23 +08:00
Merge branch 'master' into dependencies.io-update-build-147.1.0
This commit is contained in:
commit
fc80ab5e40
@ -17,6 +17,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
settings: {
|
settings: {
|
||||||
'import/core-modules': ['enzyme'],
|
'import/core-modules': ['enzyme'],
|
||||||
|
'import/ignore': ['node_modules\\/(?!@storybook)'],
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
strict: [error, 'never'],
|
strict: [error, 'never'],
|
||||||
@ -60,6 +61,9 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
'import/prefer-default-export': ignore,
|
'import/prefer-default-export': ignore,
|
||||||
|
'import/default': error,
|
||||||
|
'import/named': error,
|
||||||
|
'import/namespace': error,
|
||||||
'react/jsx-wrap-multilines': ignore,
|
'react/jsx-wrap-multilines': ignore,
|
||||||
'react/jsx-indent': ignore,
|
'react/jsx-indent': ignore,
|
||||||
'react/jsx-indent-props': ignore,
|
'react/jsx-indent-props': ignore,
|
||||||
|
34
CHANGELOG.md
34
CHANGELOG.md
@ -1,3 +1,37 @@
|
|||||||
|
# 3.3.2
|
||||||
|
|
||||||
|
2017-December-28
|
||||||
|
|
||||||
|
#### Bug Fixes
|
||||||
|
|
||||||
|
- Use store revisions to ensure that stories re-render on HMR. [#2588](https://github.com/storybooks/storybook/pull/2588)
|
||||||
|
- Fix @storybook/client-logger import [#2576](https://github.com/storybooks/storybook/pull/2576)
|
||||||
|
- Fixed react peer dependency [#2584](https://github.com/storybooks/storybook/pull/2584)
|
||||||
|
|
||||||
|
#### Documentation
|
||||||
|
|
||||||
|
- Docs: fix logos display & add babelrc [#2585](https://github.com/storybooks/storybook/pull/2585)
|
||||||
|
- add guide for Angular [#2574](https://github.com/storybooks/storybook/pull/2574)
|
||||||
|
- Update custom webpack config docs [#2578](https://github.com/storybooks/storybook/pull/2578)
|
||||||
|
- Attempt to make propTablesExclude usage clearer [#2568](https://github.com/storybooks/storybook/pull/2568)
|
||||||
|
|
||||||
|
#### Maintenance
|
||||||
|
|
||||||
|
- Add chromatic visual tests [#2505](https://github.com/storybooks/storybook/pull/2505)
|
||||||
|
- Update snapshots to fix tests [#2579](https://github.com/storybooks/storybook/pull/2579)
|
||||||
|
|
||||||
|
#### Dependency Upgrades
|
||||||
|
|
||||||
|
- Upgraded `make-error` in `addons/actions` from "1.3.0" to "1.3.2" [#2586](https://github.com/storybooks/storybook/pull/2586)
|
||||||
|
- Upgraded `zone.js` in `app/angular` from "0.8.18" to "0.8.19" [#2586](https://github.com/storybooks/storybook/pull/2586)
|
||||||
|
- Upgraded `zone.js` in `examples/angular-cli` from "0.8.18" to "0.8.19" [#2586](https://github.com/storybooks/storybook/pull/2586)
|
||||||
|
- Upgraded `@angular/cli` in `examples/angular-cli` from "1.6.2" to "1.6.3" [#2586](https://github.com/storybooks/storybook/pull/2586)
|
||||||
|
- Upgraded `uglifyjs-webpack-plugin` in `app/react` from "1.1.4" to "1.1.5" [#2581](https://github.com/storybooks/storybook/pull/2581)
|
||||||
|
- Upgraded `uglifyjs-webpack-plugin` in `app/angular` from "1.1.4" to "1.1.5" [#2581](https://github.com/storybooks/storybook/pull/2581)
|
||||||
|
- Upgraded `uglifyjs-webpack-plugin` in `app/react-native` from "1.1.4" to "1.1.5" [#2581](https://github.com/storybooks/storybook/pull/2581)
|
||||||
|
- Upgraded `uglifyjs-webpack-plugin` in `app/vue` from "1.1.4" to "1.1.5" [#2581](https://github.com/storybooks/storybook/pull/2581)
|
||||||
|
- Upgraded `karma-coverage-istanbul-reporter` in `examples/angular-cli` from "1.3.1" to "1.3.3" [#2581](https://github.com/storybooks/storybook/pull/2581)
|
||||||
|
|
||||||
# 3.3.1
|
# 3.3.1
|
||||||
|
|
||||||
2017-December-26
|
2017-December-26
|
||||||
|
10
MIGRATION.md
10
MIGRATION.md
@ -34,16 +34,6 @@ In the case of Vue: `import { ... } from '@storybook/addon-knobs/vue';`
|
|||||||
|
|
||||||
In the case of Angular: `import { ... } from '@storybook/addon-knobs/angular';`
|
In the case of Angular: `import { ... } from '@storybook/addon-knobs/angular';`
|
||||||
|
|
||||||
### Storyshots Jest configuration
|
|
||||||
|
|
||||||
Storyshots users will need to add a line to their `jest.config.js`:
|
|
||||||
|
|
||||||
```js
|
|
||||||
transformIgnorePatterns: ['/node_modules/(?!lodash-es/.*)'],
|
|
||||||
```
|
|
||||||
|
|
||||||
We are working to resolve the issue that requires this: https://github.com/storybooks/storybook/issues/2570
|
|
||||||
|
|
||||||
## From version 3.1.x to 3.2.x
|
## From version 3.1.x to 3.2.x
|
||||||
|
|
||||||
**NOTE:** technically this is a breaking change, but only if you use TypeScript. Sorry people!
|
**NOTE:** technically this is a breaking change, but only if you use TypeScript. Sorry people!
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/addon-a11y",
|
"name": "@storybook/addon-a11y",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "a11y addon for storybook",
|
"description": "a11y addon for storybook",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"a11y",
|
"a11y",
|
||||||
@ -16,6 +16,7 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/storybooks/storybook.git"
|
"url": "git+https://github.com/storybooks/storybook.git"
|
||||||
@ -24,7 +25,7 @@
|
|||||||
"prepare": "node ../../scripts/prepare.js"
|
"prepare": "node ../../scripts/prepare.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@storybook/components": "^3.3.1",
|
"@storybook/components": "^3.3.2",
|
||||||
"axe-core": "^2.6.0",
|
"axe-core": "^2.6.0",
|
||||||
"prop-types": "^15.6.0"
|
"prop-types": "^15.6.0"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/addon-actions",
|
"name": "@storybook/addon-actions",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "Action Logger addon for storybook",
|
"description": "Action Logger addon for storybook",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"storybook"
|
"storybook"
|
||||||
@ -11,6 +11,7 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/storybooks/storybook.git"
|
"url": "https://github.com/storybooks/storybook.git"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/addon-backgrounds",
|
"name": "@storybook/addon-backgrounds",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "A storybook addon to show different backgrounds for your preview",
|
"description": "A storybook addon to show different backgrounds for your preview",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"addon",
|
"addon",
|
||||||
@ -15,6 +15,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "jbaxleyiii",
|
"author": "jbaxleyiii",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/storybooks/storybook.git"
|
"url": "https://github.com/storybooks/storybook.git"
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/addon-centered",
|
"name": "@storybook/addon-centered",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "Storybook decorator to center components",
|
"description": "Storybook decorator to center components",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "Muhammed Thanish <mnmtanish@gmail.com>",
|
"author": "Muhammed Thanish <mnmtanish@gmail.com>",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "node ../../scripts/prepare.js"
|
"prepare": "node ../../scripts/prepare.js"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/addon-events",
|
"name": "@storybook/addon-events",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "Add events to your Storybook stories.",
|
"description": "Add events to your Storybook stories.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"addon",
|
"addon",
|
||||||
@ -10,6 +10,7 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git@github.com:storybooks/storybook.git"
|
"url": "git@github.com:storybooks/storybook.git"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/addon-graphql",
|
"name": "@storybook/addon-graphql",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "Storybook addon to display the GraphiQL IDE",
|
"description": "Storybook addon to display the GraphiQL IDE",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"storybook"
|
"storybook"
|
||||||
@ -11,6 +11,7 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/storybooks/storybook.git"
|
"url": "https://github.com/storybooks/storybook.git"
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/addon-info",
|
"name": "@storybook/addon-info",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "A Storybook addon to show additional information for your stories.",
|
"description": "A Storybook addon to show additional information for your stories.",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/storybooks/storybook.git"
|
"url": "https://github.com/storybooks/storybook.git"
|
||||||
@ -14,8 +15,8 @@
|
|||||||
"storybook": "start-storybook -p 9010"
|
"storybook": "start-storybook -p 9010"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@storybook/client-logger": "^3.3.1",
|
"@storybook/client-logger": "^3.3.2",
|
||||||
"@storybook/components": "^3.3.1",
|
"@storybook/components": "^3.3.2",
|
||||||
"babel-runtime": "^6.26.0",
|
"babel-runtime": "^6.26.0",
|
||||||
"global": "^4.3.2",
|
"global": "^4.3.2",
|
||||||
"marksy": "^6.0.1",
|
"marksy": "^6.0.1",
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
export { H1, H2, H3, H4, H5, H6 } from './htags';
|
export { H1, H2, H3, H4, H5, H6 } from './htags';
|
||||||
export { Code, Pre } from './code';
|
export { Code, Pre } from './code';
|
||||||
export { P, Small, A, LI, UL } from './text';
|
export { P, A, LI, UL } from './text';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/addon-jest",
|
"name": "@storybook/addon-jest",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "React storybook addon that show component jest report",
|
"description": "React storybook addon that show component jest report",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"addon",
|
"addon",
|
||||||
@ -16,6 +16,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "Renaud Tertrais <renaud.tertrais@gmail.com> (https://github.com/renaudtertrais)",
|
"author": "Renaud Tertrais <renaud.tertrais@gmail.com> (https://github.com/renaudtertrais)",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/storybooks/storybook"
|
"url": "git+https://github.com/storybooks/storybook"
|
||||||
@ -24,7 +25,7 @@
|
|||||||
"prepare": "node ../../scripts/prepare.js"
|
"prepare": "node ../../scripts/prepare.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@storybook/components": "^3.3.1",
|
"@storybook/components": "^3.3.2",
|
||||||
"glamor": "^2.20.40",
|
"glamor": "^2.20.40",
|
||||||
"glamorous": "^4.11.2",
|
"glamorous": "^4.11.2",
|
||||||
"global": "^4.3.2",
|
"global": "^4.3.2",
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/addon-knobs",
|
"name": "@storybook/addon-knobs",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "Storybook Addon Prop Editor Component",
|
"description": "Storybook Addon Prop Editor Component",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/storybooks/storybook.git"
|
"url": "https://github.com/storybooks/storybook.git"
|
||||||
@ -18,7 +19,7 @@
|
|||||||
"deep-equal": "^1.0.1",
|
"deep-equal": "^1.0.1",
|
||||||
"global": "^4.3.2",
|
"global": "^4.3.2",
|
||||||
"insert-css": "^2.0.0",
|
"insert-css": "^2.0.0",
|
||||||
"lodash-es": "^4.17.4",
|
"lodash.debounce": "^4.0.8",
|
||||||
"moment": "^2.20.1",
|
"moment": "^2.20.1",
|
||||||
"prop-types": "^15.6.0",
|
"prop-types": "^15.6.0",
|
||||||
"react-color": "^2.11.4",
|
"react-color": "^2.11.4",
|
||||||
|
12
addons/knobs/src/angular/utils.js
vendored
12
addons/knobs/src/angular/utils.js
vendored
@ -1,5 +1,9 @@
|
|||||||
/* eslint-disable no-param-reassign */
|
/* eslint-disable no-param-reassign */
|
||||||
/* globals window */
|
/* globals window */
|
||||||
|
import { ɵReflectionCapabilities } from '@angular/core';
|
||||||
|
|
||||||
|
// eslint-disable-next-line new-cap
|
||||||
|
const reflectionCapabilities = new ɵReflectionCapabilities();
|
||||||
|
|
||||||
function getMeta(component, [name1, name2], defaultValue) {
|
function getMeta(component, [name1, name2], defaultValue) {
|
||||||
if (!name2) {
|
if (!name2) {
|
||||||
@ -27,5 +31,11 @@ export function getPropMetadata(component) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getParameters(component) {
|
export function getParameters(component) {
|
||||||
return getMeta(component, ['parameters'], []);
|
const params = reflectionCapabilities.parameters(component);
|
||||||
|
|
||||||
|
if (!params || !params[0]) {
|
||||||
|
return getMeta(component, ['parameters'], []);
|
||||||
|
}
|
||||||
|
|
||||||
|
return params;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import debounce from 'lodash-es/debounce';
|
import debounce from 'lodash.debounce';
|
||||||
|
|
||||||
import PropForm from './PropForm';
|
import PropForm from './PropForm';
|
||||||
import Types from './types';
|
import Types from './types';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/addon-links",
|
"name": "@storybook/addon-links",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "Story Links addon for storybook",
|
"description": "Story Links addon for storybook",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"storybook"
|
"storybook"
|
||||||
@ -11,6 +11,7 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/storybooks/storybook.git"
|
"url": "https://github.com/storybooks/storybook.git"
|
||||||
@ -21,7 +22,7 @@
|
|||||||
"storybook": "start-storybook -p 9001"
|
"storybook": "start-storybook -p 9001"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@storybook/components": "^3.3.1",
|
"@storybook/components": "^3.3.2",
|
||||||
"global": "^4.3.2",
|
"global": "^4.3.2",
|
||||||
"prop-types": "^15.5.10"
|
"prop-types": "^15.5.10"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/addon-notes",
|
"name": "@storybook/addon-notes",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "Write notes for your Storybook stories.",
|
"description": "Write notes for your Storybook stories.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"addon",
|
"addon",
|
||||||
@ -9,6 +9,7 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/storybooks/storybook.git"
|
"url": "https://github.com/storybooks/storybook.git"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/addon-options",
|
"name": "@storybook/addon-options",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "Options addon for storybook",
|
"description": "Options addon for storybook",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"storybook"
|
"storybook"
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/addon-storyshots",
|
"name": "@storybook/addon-storyshots",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "StoryShots is a Jest Snapshot Testing Addon for Storybook.",
|
"description": "StoryShots is a Jest Snapshot Testing Addon for Storybook.",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/storybooks/storybook.git"
|
"url": "https://github.com/storybooks/storybook.git"
|
||||||
@ -15,7 +16,7 @@
|
|||||||
"example": "jest storyshot.test"
|
"example": "jest storyshot.test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@storybook/channels": "^3.3.1",
|
"@storybook/channels": "^3.3.2",
|
||||||
"babel-runtime": "^6.26.0",
|
"babel-runtime": "^6.26.0",
|
||||||
"glob": "^7.1.2",
|
"glob": "^7.1.2",
|
||||||
"global": "^4.3.2",
|
"global": "^4.3.2",
|
||||||
@ -24,8 +25,8 @@
|
|||||||
"read-pkg-up": "^3.0.0"
|
"read-pkg-up": "^3.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@storybook/addons": "^3.3.1",
|
"@storybook/addons": "^3.3.2",
|
||||||
"@storybook/react": "^3.3.1",
|
"@storybook/react": "^3.3.2",
|
||||||
"babel-cli": "^6.26.0",
|
"babel-cli": "^6.26.0",
|
||||||
"babel-jest": "^20.0.3",
|
"babel-jest": "^20.0.3",
|
||||||
"babel-plugin-transform-runtime": "^6.23.0",
|
"babel-plugin-transform-runtime": "^6.23.0",
|
||||||
@ -39,7 +40,7 @@
|
|||||||
"react-dom": "^16.1.0"
|
"react-dom": "^16.1.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@storybook/addons": "^3.3.1",
|
"@storybook/addons": "^3.3.2",
|
||||||
"babel-core": "^6.26.0 | ^7.0.0-0",
|
"babel-core": "^6.26.0 | ^7.0.0-0",
|
||||||
"react": "*",
|
"react": "*",
|
||||||
"react-test-renderer": "*"
|
"react-test-renderer": "*"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/addon-viewport",
|
"name": "@storybook/addon-viewport",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "Storybook addon to change the viewport size to mobile",
|
"description": "Storybook addon to change the viewport size to mobile",
|
||||||
"main": "dist/index.js",
|
"main": "register.js",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"storybook"
|
"storybook"
|
||||||
],
|
],
|
||||||
@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@storybook/components": "^3.3.1",
|
"@storybook/components": "^3.3.2",
|
||||||
"global": "^4.3.2",
|
"global": "^4.3.2",
|
||||||
"prop-types": "^15.5.10"
|
"prop-types": "^15.5.10"
|
||||||
},
|
},
|
||||||
|
@ -1 +0,0 @@
|
|||||||
export { register } from './manager';
|
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/angular",
|
"name": "@storybook/angular",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "Storybook for Anglar: Develop Angular Components in isolation with Hot Reloading.",
|
"description": "Storybook for Anglar: Develop Angular Components in isolation with Hot Reloading.",
|
||||||
"homepage": "https://github.com/storybooks/storybook/tree/master/apps/angular",
|
"homepage": "https://github.com/storybooks/storybook/tree/master/apps/angular",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
@ -8,6 +8,7 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/client/index.js",
|
"main": "dist/client/index.js",
|
||||||
|
"jsnext:main": "src/client/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
"build-storybook": "./bin/build.js",
|
"build-storybook": "./bin/build.js",
|
||||||
"start-storybook": "./bin/index.js",
|
"start-storybook": "./bin/index.js",
|
||||||
@ -22,11 +23,11 @@
|
|||||||
"prepare": "node ../../scripts/prepare.js"
|
"prepare": "node ../../scripts/prepare.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@storybook/addon-actions": "^3.3.1",
|
"@storybook/addon-actions": "^3.3.2",
|
||||||
"@storybook/addon-links": "^3.3.1",
|
"@storybook/addon-links": "^3.3.2",
|
||||||
"@storybook/addons": "^3.3.1",
|
"@storybook/addons": "^3.3.2",
|
||||||
"@storybook/channel-postmessage": "^3.3.1",
|
"@storybook/channel-postmessage": "^3.3.2",
|
||||||
"@storybook/ui": "^3.3.1",
|
"@storybook/ui": "^3.3.2",
|
||||||
"airbnb-js-shims": "^1.1.1",
|
"airbnb-js-shims": "^1.1.1",
|
||||||
"angular2-template-loader": "^0.6.2",
|
"angular2-template-loader": "^0.6.2",
|
||||||
"autoprefixer": "^7.1.1",
|
"autoprefixer": "^7.1.1",
|
||||||
@ -54,7 +55,7 @@
|
|||||||
"json-loader": "^0.5.4",
|
"json-loader": "^0.5.4",
|
||||||
"json-stringify-safe": "^5.0.1",
|
"json-stringify-safe": "^5.0.1",
|
||||||
"json5": "^0.5.1",
|
"json5": "^0.5.1",
|
||||||
"lodash-es": "^4.17.4",
|
"lodash.pick": "^4.4.0",
|
||||||
"postcss-flexbugs-fixes": "^3.0.0",
|
"postcss-flexbugs-fixes": "^3.0.0",
|
||||||
"postcss-loader": "^2.0.5",
|
"postcss-loader": "^2.0.5",
|
||||||
"prop-types": "^15.5.10",
|
"prop-types": "^15.5.10",
|
||||||
@ -80,7 +81,6 @@
|
|||||||
"zone.js": "^0.8.19"
|
"zone.js": "^0.8.19"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/lodash-es": "^4.17.0",
|
|
||||||
"babel-cli": "^6.26.0",
|
"babel-cli": "^6.26.0",
|
||||||
"babel-plugin-transform-decorators": "^6.24.1",
|
"babel-plugin-transform-decorators": "^6.24.1",
|
||||||
"babel-plugin-transform-decorators-legacy": "^1.3.4",
|
"babel-plugin-transform-decorators-legacy": "^1.3.4",
|
||||||
|
@ -2,16 +2,7 @@
|
|||||||
// to provide @Inputs and subscribe to @Outputs, see
|
// to provide @Inputs and subscribe to @Outputs, see
|
||||||
// https://github.com/angular/angular/issues/15360
|
// https://github.com/angular/angular/issues/15360
|
||||||
// For the time being, the ViewContainerRef approach works pretty well.
|
// For the time being, the ViewContainerRef approach works pretty well.
|
||||||
|
import * as _ from 'lodash';
|
||||||
import has from 'lodash-es/has';
|
|
||||||
import get from 'lodash-es/get';
|
|
||||||
import set from 'lodash-es/set';
|
|
||||||
import isFunction from 'lodash-es/isFunction';
|
|
||||||
import isUndefined from 'lodash-es/isUndefined';
|
|
||||||
import isEmpty from 'lodash-es/isEmpty';
|
|
||||||
import forEach from 'lodash-es/forEach';
|
|
||||||
import invoke from 'lodash-es/invoke';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
Inject,
|
Inject,
|
||||||
@ -24,12 +15,9 @@ import {
|
|||||||
SimpleChanges,
|
SimpleChanges,
|
||||||
SimpleChange
|
SimpleChange
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
import { STORY } from '../app.token';
|
import { STORY } from '../app.token';
|
||||||
import { NgStory, ICollection } from '../types';
|
import { NgStory, ICollection } from '../types';
|
||||||
|
|
||||||
const _ = { has, get, set, isFunction, isUndefined, isEmpty , forEach, invoke };
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
template: '<ng-template #target></ng-template>'
|
template: '<ng-template #target></ng-template>'
|
||||||
@ -37,7 +25,6 @@ const _ = { has, get, set, isFunction, isUndefined, isEmpty , forEach, invoke };
|
|||||||
export class AppComponent implements AfterViewInit, OnDestroy {
|
export class AppComponent implements AfterViewInit, OnDestroy {
|
||||||
@ViewChild('target', { read: ViewContainerRef })
|
@ViewChild('target', { read: ViewContainerRef })
|
||||||
target: ViewContainerRef;
|
target: ViewContainerRef;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private cfr: ComponentFactoryResolver,
|
private cfr: ComponentFactoryResolver,
|
||||||
@Inject(STORY) private data: NgStory
|
@Inject(STORY) private data: NgStory
|
||||||
@ -103,7 +90,7 @@ export class AppComponent implements AfterViewInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (_.isFunction(props.ngModelChange)) {
|
if (_.isFunction(props.ngModelChange)) {
|
||||||
_.invoke(instance, 'registerOnChange', props.ngModelChange);
|
_.invoke(instance, 'registerOnChange', props.ngModelChange);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,8 +7,6 @@ import {
|
|||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import {FormsModule} from '@angular/forms'
|
import {FormsModule} from '@angular/forms'
|
||||||
|
|
||||||
import _debounce from 'lodash-es/debounce';
|
|
||||||
|
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { AppComponent } from './components/app.component';
|
import { AppComponent } from './components/app.component';
|
||||||
@ -33,7 +31,28 @@ interface IComponent extends Type<any> {
|
|||||||
propsMetadata: any[]
|
propsMetadata: any[]
|
||||||
}
|
}
|
||||||
|
|
||||||
const debounce = (func: IRenderStoryFn | IRenderErrorFn) => _debounce(func, 100);
|
// Taken from https://davidwalsh.name/javascript-debounce-function
|
||||||
|
// We don't want to pull underscore
|
||||||
|
const debounce = (func: IRenderStoryFn | IRenderErrorFn,
|
||||||
|
wait: number = 100,
|
||||||
|
immediate: boolean = false): () => void => {
|
||||||
|
let timeout: any;
|
||||||
|
return function () {
|
||||||
|
const context = this, args = arguments;
|
||||||
|
const later = function () {
|
||||||
|
timeout = null;
|
||||||
|
if (!immediate) {
|
||||||
|
func.apply(context, args);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const callNow = immediate && !timeout;
|
||||||
|
clearTimeout(timeout);
|
||||||
|
timeout = setTimeout(later, wait);
|
||||||
|
if (callNow) {
|
||||||
|
func.apply(context, args);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
const getComponentMetadata = (
|
const getComponentMetadata = (
|
||||||
{ component, props = {}, propsMeta = {}, moduleMetadata = {
|
{ component, props = {}, propsMeta = {}, moduleMetadata = {
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
import { ɵReflectionCapabilities } from '@angular/core';
|
||||||
|
|
||||||
|
const reflectionCapabilities = new ɵReflectionCapabilities();
|
||||||
|
|
||||||
function getMeta(component: any, [name1, name2]: any, defaultValue: any) {
|
function getMeta(component: any, [name1, name2]: any, defaultValue: any) {
|
||||||
if (!name2) {
|
if (!name2) {
|
||||||
name2 = name1;
|
name2 = name1;
|
||||||
@ -24,5 +28,11 @@ export function getPropMetadata(component: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getParameters(component: any) {
|
export function getParameters(component: any) {
|
||||||
return getMeta(component, ['parameters'], []);
|
const params = reflectionCapabilities.parameters(component);
|
||||||
|
|
||||||
|
if (!params || !params[0]) {
|
||||||
|
return getMeta(component, ['parameters'], []);
|
||||||
|
}
|
||||||
|
|
||||||
|
return params;
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/react-native",
|
"name": "@storybook/react-native",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "A better way to develop React Native Components for your app",
|
"description": "A better way to develop React Native Components for your app",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"react",
|
"react",
|
||||||
@ -13,6 +13,7 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
"storybook": "dist/bin/storybook.js"
|
"storybook": "dist/bin/storybook.js"
|
||||||
},
|
},
|
||||||
@ -24,11 +25,11 @@
|
|||||||
"prepare": "node ../../scripts/prepare.js"
|
"prepare": "node ../../scripts/prepare.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@storybook/addon-actions": "^3.3.1",
|
"@storybook/addon-actions": "^3.3.2",
|
||||||
"@storybook/addon-links": "^3.3.1",
|
"@storybook/addon-links": "^3.3.2",
|
||||||
"@storybook/addons": "^3.3.1",
|
"@storybook/addons": "^3.3.2",
|
||||||
"@storybook/channel-websocket": "^3.3.1",
|
"@storybook/channel-websocket": "^3.3.2",
|
||||||
"@storybook/ui": "^3.3.1",
|
"@storybook/ui": "^3.3.2",
|
||||||
"autoprefixer": "^7.2.3",
|
"autoprefixer": "^7.2.3",
|
||||||
"babel-loader": "^7.1.2",
|
"babel-loader": "^7.1.2",
|
||||||
"babel-plugin-syntax-async-functions": "^6.13.0",
|
"babel-plugin-syntax-async-functions": "^6.13.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/react",
|
"name": "@storybook/react",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
|
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
|
||||||
"homepage": "https://github.com/storybooks/storybook/tree/master/app/react",
|
"homepage": "https://github.com/storybooks/storybook/tree/master/app/react",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
@ -8,6 +8,7 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/client/index.js",
|
"main": "dist/client/index.js",
|
||||||
|
"jsnext:main": "src/client/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
"build-storybook": "./bin/build.js",
|
"build-storybook": "./bin/build.js",
|
||||||
"start-storybook": "./bin/index.js",
|
"start-storybook": "./bin/index.js",
|
||||||
@ -22,13 +23,13 @@
|
|||||||
"prepare": "node ../../scripts/prepare.js"
|
"prepare": "node ../../scripts/prepare.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@storybook/addon-actions": "^3.3.1",
|
"@storybook/addon-actions": "^3.3.2",
|
||||||
"@storybook/addon-links": "^3.3.1",
|
"@storybook/addon-links": "^3.3.2",
|
||||||
"@storybook/addons": "^3.3.1",
|
"@storybook/addons": "^3.3.2",
|
||||||
"@storybook/channel-postmessage": "^3.3.1",
|
"@storybook/channel-postmessage": "^3.3.2",
|
||||||
"@storybook/client-logger": "^3.3.1",
|
"@storybook/client-logger": "^3.3.2",
|
||||||
"@storybook/node-logger": "^3.3.1",
|
"@storybook/node-logger": "^3.3.2",
|
||||||
"@storybook/ui": "^3.3.1",
|
"@storybook/ui": "^3.3.2",
|
||||||
"airbnb-js-shims": "^1.4.0",
|
"airbnb-js-shims": "^1.4.0",
|
||||||
"autoprefixer": "^7.2.3",
|
"autoprefixer": "^7.2.3",
|
||||||
"babel-loader": "^7.1.2",
|
"babel-loader": "^7.1.2",
|
||||||
@ -60,7 +61,7 @@
|
|||||||
"json-loader": "^0.5.7",
|
"json-loader": "^0.5.7",
|
||||||
"json-stringify-safe": "^5.0.1",
|
"json-stringify-safe": "^5.0.1",
|
||||||
"json5": "^0.5.1",
|
"json5": "^0.5.1",
|
||||||
"lodash-es": "^4.17.4",
|
"lodash.flattendeep": "^4.4.0",
|
||||||
"markdown-loader": "^2.0.1",
|
"markdown-loader": "^2.0.1",
|
||||||
"npmlog": "^4.1.2",
|
"npmlog": "^4.1.2",
|
||||||
"postcss-flexbugs-fixes": "^3.2.0",
|
"postcss-flexbugs-fixes": "^3.2.0",
|
||||||
|
@ -41,6 +41,7 @@ export default class ClientApi {
|
|||||||
if (m && m.hot) {
|
if (m && m.hot) {
|
||||||
m.hot.dispose(() => {
|
m.hot.dispose(() => {
|
||||||
this._storyStore.removeStoryKind(kind);
|
this._storyStore.removeStoryKind(kind);
|
||||||
|
this._storyStore.incrementRevision();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import flattenDeep from 'lodash-es/flattenDeep';
|
import flattenDeep from 'lodash.flattendeep';
|
||||||
|
|
||||||
// return true if the element is renderable with react fiber
|
// return true if the element is renderable with react fiber
|
||||||
export const isValidFiberElement = element =>
|
export const isValidFiberElement = element =>
|
||||||
|
@ -13,6 +13,7 @@ const isBrowser = typeof window !== 'undefined';
|
|||||||
let rootEl = null;
|
let rootEl = null;
|
||||||
let previousKind = '';
|
let previousKind = '';
|
||||||
let previousStory = '';
|
let previousStory = '';
|
||||||
|
let previousRevision = -1;
|
||||||
|
|
||||||
if (isBrowser) {
|
if (isBrowser) {
|
||||||
rootEl = document.getElementById('root');
|
rootEl = document.getElementById('root');
|
||||||
@ -45,6 +46,7 @@ export function renderMain(data, storyStore) {
|
|||||||
const noPreview = <NoPreview />;
|
const noPreview = <NoPreview />;
|
||||||
const { selectedKind, selectedStory } = data;
|
const { selectedKind, selectedStory } = data;
|
||||||
|
|
||||||
|
const revision = storyStore.getRevision();
|
||||||
const story = storyStore.getStory(selectedKind, selectedStory);
|
const story = storyStore.getStory(selectedKind, selectedStory);
|
||||||
if (!story) {
|
if (!story) {
|
||||||
ReactDOM.render(noPreview, rootEl);
|
ReactDOM.render(noPreview, rootEl);
|
||||||
@ -55,7 +57,13 @@ export function renderMain(data, storyStore) {
|
|||||||
// renderMain() gets executed after each action. Actions will cause the whole
|
// renderMain() gets executed after each action. Actions will cause the whole
|
||||||
// story to re-render without this check.
|
// story to re-render without this check.
|
||||||
// https://github.com/storybooks/react-storybook/issues/116
|
// https://github.com/storybooks/react-storybook/issues/116
|
||||||
if (selectedKind === previousKind && previousStory === selectedStory) {
|
// However, we do want the story to re-render if the store itself has changed
|
||||||
|
// (which happens at the moment when HMR occurs)
|
||||||
|
if (
|
||||||
|
revision === previousRevision &&
|
||||||
|
selectedKind === previousKind &&
|
||||||
|
previousStory === selectedStory
|
||||||
|
) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,6 +71,7 @@ export function renderMain(data, storyStore) {
|
|||||||
// Otherwise, React may not recrease instances for every story run.
|
// Otherwise, React may not recrease instances for every story run.
|
||||||
// This could leads to issues like below:
|
// This could leads to issues like below:
|
||||||
// https://github.com/storybooks/react-storybook/issues/81
|
// https://github.com/storybooks/react-storybook/issues/81
|
||||||
|
previousRevision = revision;
|
||||||
previousKind = selectedKind;
|
previousKind = selectedKind;
|
||||||
previousStory = selectedStory;
|
previousStory = selectedStory;
|
||||||
ReactDOM.unmountComponentAtNode(rootEl);
|
ReactDOM.unmountComponentAtNode(rootEl);
|
||||||
|
@ -10,6 +10,18 @@ function getId() {
|
|||||||
export default class StoryStore {
|
export default class StoryStore {
|
||||||
constructor() {
|
constructor() {
|
||||||
this._data = {};
|
this._data = {};
|
||||||
|
// This number is incremented on every HMR.
|
||||||
|
// In theory it could also be incremented if stories were dynamically
|
||||||
|
// changed in the store
|
||||||
|
this._revision = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
getRevision() {
|
||||||
|
return this._revision;
|
||||||
|
}
|
||||||
|
|
||||||
|
incrementRevision() {
|
||||||
|
this._revision += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
addStory(kind, name, fn, fileName) {
|
addStory(kind, name, fn, fileName) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/vue",
|
"name": "@storybook/vue",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.",
|
"description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.",
|
||||||
"homepage": "https://github.com/storybooks/storybook/tree/master/apps/vue",
|
"homepage": "https://github.com/storybooks/storybook/tree/master/apps/vue",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
@ -8,6 +8,7 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/client/index.js",
|
"main": "dist/client/index.js",
|
||||||
|
"jsnext:main": "src/client/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
"build-storybook": "./bin/build.js",
|
"build-storybook": "./bin/build.js",
|
||||||
"start-storybook": "./bin/index.js",
|
"start-storybook": "./bin/index.js",
|
||||||
@ -22,11 +23,11 @@
|
|||||||
"prepare": "node ../../scripts/prepare.js"
|
"prepare": "node ../../scripts/prepare.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@storybook/addon-actions": "^3.3.1",
|
"@storybook/addon-actions": "^3.3.2",
|
||||||
"@storybook/addon-links": "^3.3.1",
|
"@storybook/addon-links": "^3.3.2",
|
||||||
"@storybook/addons": "^3.3.1",
|
"@storybook/addons": "^3.3.2",
|
||||||
"@storybook/channel-postmessage": "^3.3.1",
|
"@storybook/channel-postmessage": "^3.3.2",
|
||||||
"@storybook/ui": "^3.3.1",
|
"@storybook/ui": "^3.3.2",
|
||||||
"airbnb-js-shims": "^1.4.0",
|
"airbnb-js-shims": "^1.4.0",
|
||||||
"autoprefixer": "^7.2.3",
|
"autoprefixer": "^7.2.3",
|
||||||
"babel-loader": "^7.1.2",
|
"babel-loader": "^7.1.2",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { fail, danger } from 'danger';
|
import { fail, danger } from 'danger';
|
||||||
import { flatten, intersection, isEmpty, includes } from 'lodash-es';
|
import { flatten, intersection, isEmpty, includes } from 'lodash';
|
||||||
|
|
||||||
const pkg = require('./package.json'); // eslint-disable-line import/newline-after-import
|
const pkg = require('./package.json'); // eslint-disable-line import/newline-after-import
|
||||||
const prLogConfig = pkg['pr-log'];
|
const prLogConfig = pkg['pr-log'];
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// TODO reenable when @storybook/react with jsnext:main is published
|
||||||
|
// eslint-disable-next-line import/named
|
||||||
import { storiesOf } from '@storybook/react';
|
import { storiesOf } from '@storybook/react';
|
||||||
import implementations from './implementations';
|
import implementations from './implementations';
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "angular-cli",
|
"name": "angular-cli",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
@ -31,11 +31,11 @@
|
|||||||
"@angular/cli": "1.6.3",
|
"@angular/cli": "1.6.3",
|
||||||
"@angular/compiler-cli": "^5.0.0-beta.7",
|
"@angular/compiler-cli": "^5.0.0-beta.7",
|
||||||
"@angular/language-service": "^5.0.0-beta.7",
|
"@angular/language-service": "^5.0.0-beta.7",
|
||||||
"@storybook/addon-actions": "^3.3.1",
|
"@storybook/addon-actions": "^3.3.2",
|
||||||
"@storybook/addon-links": "^3.3.1",
|
"@storybook/addon-links": "^3.3.2",
|
||||||
"@storybook/addon-notes": "^3.3.1",
|
"@storybook/addon-notes": "^3.3.2",
|
||||||
"@storybook/addons": "^3.3.1",
|
"@storybook/addons": "^3.3.2",
|
||||||
"@storybook/angular": "^3.3.1",
|
"@storybook/angular": "^3.3.2",
|
||||||
"@types/jasmine": "~2.8.2",
|
"@types/jasmine": "~2.8.2",
|
||||||
"@types/node": "~6.0.60",
|
"@types/node": "~6.0.60",
|
||||||
"codelyzer": "^3.1.2",
|
"codelyzer": "^3.1.2",
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
<div>
|
||||||
|
<div>All dependencies are defined: {{isAllDeps()}}</div>
|
||||||
|
<div>Title: {{title}}</div>
|
||||||
|
<div>Injector: {{injector.constructor.toString()}}</div>
|
||||||
|
<div>ElementRef: {{elRefStr()}}</div>
|
||||||
|
<div>TestToken: {{testToken}}</div>
|
||||||
|
</div>
|
@ -0,0 +1,19 @@
|
|||||||
|
import { storiesOf } from '@storybook/angular';
|
||||||
|
import { withKnobs, text } from '@storybook/addon-knobs/angular';
|
||||||
|
import { DiComponent } from './di.component';
|
||||||
|
|
||||||
|
storiesOf('Component dependencies', module)
|
||||||
|
.add('inputs and inject dependencies', () => ({
|
||||||
|
component: DiComponent,
|
||||||
|
props: {
|
||||||
|
title: 'Component dependencies'
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
.addDecorator(withKnobs)
|
||||||
|
.add('inputs and inject dependencies with knobs', () => ({
|
||||||
|
component: DiComponent,
|
||||||
|
props: {
|
||||||
|
title: text('title', 'Component dependencies')
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
@ -0,0 +1,28 @@
|
|||||||
|
import { Component, Input, InjectionToken, Injector, ElementRef, Inject } from '@angular/core';
|
||||||
|
|
||||||
|
export const TEST_TOKEN = new InjectionToken<string>('test');
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'di-component',
|
||||||
|
templateUrl: './di.component.html',
|
||||||
|
providers: [
|
||||||
|
{ provide: TEST_TOKEN, useValue: 123}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class DiComponent {
|
||||||
|
@Input() title: string;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
protected injector: Injector,
|
||||||
|
protected elRef: ElementRef,
|
||||||
|
@Inject(TEST_TOKEN) protected testToken: number
|
||||||
|
) {}
|
||||||
|
|
||||||
|
isAllDeps(): boolean {
|
||||||
|
return Boolean(this.testToken && this.elRef && this.injector && this.title);
|
||||||
|
}
|
||||||
|
|
||||||
|
elRefStr(): string {
|
||||||
|
return JSON.stringify(this.elRef);
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cra-kitchen-sink",
|
"name": "cra-kitchen-sink",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "react-scripts build",
|
"build": "react-scripts build",
|
||||||
"build-storybook": "build-storybook -s public",
|
"build-storybook": "build-storybook -s public",
|
||||||
@ -19,23 +19,23 @@
|
|||||||
"react-dom": "^16.2.0"
|
"react-dom": "^16.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@storybook/addon-a11y": "^3.3.1",
|
"@storybook/addon-a11y": "^3.3.2",
|
||||||
"@storybook/addon-actions": "^3.3.1",
|
"@storybook/addon-actions": "^3.3.2",
|
||||||
"@storybook/addon-backgrounds": "^3.3.1",
|
"@storybook/addon-backgrounds": "^3.3.2",
|
||||||
"@storybook/addon-centered": "^3.3.1",
|
"@storybook/addon-centered": "^3.3.2",
|
||||||
"@storybook/addon-events": "^3.3.1",
|
"@storybook/addon-events": "^3.3.2",
|
||||||
"@storybook/addon-info": "^3.3.1",
|
"@storybook/addon-info": "^3.3.2",
|
||||||
"@storybook/addon-jest": "^3.3.1",
|
"@storybook/addon-jest": "^3.3.2",
|
||||||
"@storybook/addon-knobs": "^3.3.1",
|
"@storybook/addon-knobs": "^3.3.2",
|
||||||
"@storybook/addon-links": "^3.3.1",
|
"@storybook/addon-links": "^3.3.2",
|
||||||
"@storybook/addon-notes": "^3.3.1",
|
"@storybook/addon-notes": "^3.3.2",
|
||||||
"@storybook/addon-options": "^3.3.1",
|
"@storybook/addon-options": "^3.3.2",
|
||||||
"@storybook/addon-storyshots": "^3.3.1",
|
"@storybook/addon-storyshots": "^3.3.2",
|
||||||
"@storybook/addon-viewport": "^3.3.1",
|
"@storybook/addon-viewport": "^3.3.2",
|
||||||
"@storybook/addons": "^3.3.1",
|
"@storybook/addons": "^3.3.2",
|
||||||
"@storybook/client-logger": "^3.3.1",
|
"@storybook/client-logger": "^3.3.2",
|
||||||
"@storybook/components": "^3.3.1",
|
"@storybook/components": "^3.3.2",
|
||||||
"@storybook/react": "^3.3.1",
|
"@storybook/react": "^3.3.2",
|
||||||
"babel-jest": "^22.0.4",
|
"babel-jest": "^22.0.4",
|
||||||
"enzyme": "^3.2.0",
|
"enzyme": "^3.2.0",
|
||||||
"enzyme-adapter-react-16": "^1.1.0",
|
"enzyme-adapter-react-16": "^1.1.0",
|
||||||
|
@ -3,6 +3,7 @@ import React from 'react';
|
|||||||
import { storiesOf } from '@storybook/react';
|
import { storiesOf } from '@storybook/react';
|
||||||
import { setOptions } from '@storybook/addon-options';
|
import { setOptions } from '@storybook/addon-options';
|
||||||
import { action } from '@storybook/addon-actions';
|
import { action } from '@storybook/addon-actions';
|
||||||
|
// eslint-disable-next-line import/named
|
||||||
import { withNotes, WithNotes } from '@storybook/addon-notes';
|
import { withNotes, WithNotes } from '@storybook/addon-notes';
|
||||||
import centered from '@storybook/addon-centered';
|
import centered from '@storybook/addon-centered';
|
||||||
import { withInfo } from '@storybook/addon-info';
|
import { withInfo } from '@storybook/addon-info';
|
||||||
|
@ -1,29 +1,28 @@
|
|||||||
{
|
{
|
||||||
"name": "official-storybook",
|
"name": "official-storybook",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build-storybook": "build-storybook -c ./",
|
"build-storybook": "build-storybook -c ./",
|
||||||
"storybook": "start-storybook -p 9010 -c ./",
|
"storybook": "start-storybook -p 9010 -c ./",
|
||||||
"chromatic":
|
"chromatic": "chromatic test --storybook-addon --exit-zero-on-changes --app-code $CHROMATIC_APP_CODE"
|
||||||
"chromatic test --storybook-addon --exit-zero-on-changes --app-code $CHROMATIC_APP_CODE"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@storybook/addon-a11y": "^3.3.1",
|
"@storybook/addon-a11y": "^3.3.2",
|
||||||
"@storybook/addon-actions": "^3.3.1",
|
"@storybook/addon-actions": "^3.3.2",
|
||||||
"@storybook/addon-backgrounds": "^3.3.1",
|
"@storybook/addon-backgrounds": "^3.3.2",
|
||||||
"@storybook/addon-centered": "^3.3.1",
|
"@storybook/addon-centered": "^3.3.2",
|
||||||
"@storybook/addon-events": "^3.3.1",
|
"@storybook/addon-events": "^3.3.2",
|
||||||
"@storybook/addon-info": "^3.3.1",
|
"@storybook/addon-info": "^3.3.2",
|
||||||
"@storybook/addon-jest": "^3.3.1",
|
"@storybook/addon-jest": "^3.3.2",
|
||||||
"@storybook/addon-knobs": "^3.3.1",
|
"@storybook/addon-knobs": "^3.3.2",
|
||||||
"@storybook/addon-links": "^3.3.1",
|
"@storybook/addon-links": "^3.3.2",
|
||||||
"@storybook/addon-notes": "^3.3.1",
|
"@storybook/addon-notes": "^3.3.2",
|
||||||
"@storybook/addon-options": "^3.3.1",
|
"@storybook/addon-options": "^3.3.2",
|
||||||
"@storybook/addon-storyshots": "^3.3.1",
|
"@storybook/addon-storyshots": "^3.3.2",
|
||||||
"@storybook/addon-viewport": "^3.3.1",
|
"@storybook/addon-viewport": "^3.3.2",
|
||||||
"@storybook/addons": "^3.3.1",
|
"@storybook/addons": "^3.3.2",
|
||||||
"@storybook/components": "^3.3.1",
|
"@storybook/components": "^3.3.2",
|
||||||
"@storybook/react": "^3.3.1",
|
"@storybook/react": "^3.3.2",
|
||||||
"babel-jest": "^21.2.0",
|
"babel-jest": "^21.2.0",
|
||||||
"enzyme": "^3.2.0",
|
"enzyme": "^3.2.0",
|
||||||
"enzyme-adapter-react-16": "^1.1.0",
|
"enzyme-adapter-react-16": "^1.1.0",
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { storiesOf } from '@storybook/react';
|
import { storiesOf } from '@storybook/react';
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/named
|
||||||
import { withNotes, WithNotes } from '@storybook/addon-notes';
|
import { withNotes, WithNotes } from '@storybook/addon-notes';
|
||||||
import { action } from '@storybook/addon-actions';
|
import { action } from '@storybook/addon-actions';
|
||||||
import BaseButton from '../components/BaseButton';
|
import BaseButton from '../components/BaseButton';
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "vue-example",
|
"name": "vue-example",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@storybook/addon-actions": "^3.3.1",
|
"@storybook/addon-actions": "^3.3.2",
|
||||||
"@storybook/addon-centered": "^3.3.1",
|
"@storybook/addon-centered": "^3.3.2",
|
||||||
"@storybook/addon-knobs": "^3.3.1",
|
"@storybook/addon-knobs": "^3.3.2",
|
||||||
"@storybook/addon-links": "^3.3.1",
|
"@storybook/addon-links": "^3.3.2",
|
||||||
"@storybook/addon-notes": "^3.3.1",
|
"@storybook/addon-notes": "^3.3.2",
|
||||||
"@storybook/addon-viewport": "^3.3.1",
|
"@storybook/addon-viewport": "^3.3.2",
|
||||||
"@storybook/addons": "^3.3.1",
|
"@storybook/addons": "^3.3.2",
|
||||||
"@storybook/vue": "^3.3.1",
|
"@storybook/vue": "^3.3.2",
|
||||||
"babel-core": "^6.26.0",
|
"babel-core": "^6.26.0",
|
||||||
"babel-loader": "^7.1.2",
|
"babel-loader": "^7.1.2",
|
||||||
"babel-preset-env": "^1.6.0",
|
"babel-preset-env": "^1.6.0",
|
||||||
|
@ -14,7 +14,6 @@ module.exports = {
|
|||||||
'<rootDir>/examples/cra-kitchen-sink',
|
'<rootDir>/examples/cra-kitchen-sink',
|
||||||
'<rootDir>/examples/official-storybook',
|
'<rootDir>/examples/official-storybook',
|
||||||
],
|
],
|
||||||
transformIgnorePatterns: ['/node_modules/(?!lodash-es/.*)'],
|
|
||||||
testPathIgnorePatterns: ['/node_modules/', 'addon-jest.test.js', '/cli/test/'],
|
testPathIgnorePatterns: ['/node_modules/', 'addon-jest.test.js', '/cli/test/'],
|
||||||
collectCoverage: false,
|
collectCoverage: false,
|
||||||
collectCoverageFrom: [
|
collectCoverageFrom: [
|
||||||
|
@ -8,5 +8,5 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"concurrency": 1,
|
"concurrency": 1,
|
||||||
"version": "3.3.1"
|
"version": "3.3.2"
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/addons",
|
"name": "@storybook/addons",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "Storybook addons store",
|
"description": "Storybook addons store",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"storybook"
|
"storybook"
|
||||||
@ -11,6 +11,7 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/storybooks/storybook.git"
|
"url": "https://github.com/storybooks/storybook.git"
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/channel-postmessage",
|
"name": "@storybook/channel-postmessage",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "",
|
"description": "",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "node ../../scripts/prepare.js"
|
"prepare": "node ../../scripts/prepare.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@storybook/channels": "^3.3.1",
|
"@storybook/channels": "^3.3.2",
|
||||||
"global": "^4.3.2",
|
"global": "^4.3.2",
|
||||||
"json-stringify-safe": "^5.0.1"
|
"json-stringify-safe": "^5.0.1"
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/channel-websocket",
|
"name": "@storybook/channel-websocket",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "",
|
"description": "",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "node ../../scripts/prepare.js"
|
"prepare": "node ../../scripts/prepare.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@storybook/channels": "^3.3.1",
|
"@storybook/channels": "^3.3.2",
|
||||||
"global": "^4.3.2"
|
"global": "^4.3.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/channels",
|
"name": "@storybook/channels",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "",
|
"description": "",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "node ../../scripts/prepare.js"
|
"prepare": "node ../../scripts/prepare.js"
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/cli",
|
"name": "@storybook/cli",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "Storybook's CLI - easiest method of adding storybook to your projects",
|
"description": "Storybook's CLI - easiest method of adding storybook to your projects",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"cli",
|
"cli",
|
||||||
@ -25,7 +25,7 @@
|
|||||||
"test": "cd test && ./run_tests.sh"
|
"test": "cd test && ./run_tests.sh"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@storybook/codemod": "^3.3.1",
|
"@storybook/codemod": "^3.3.2",
|
||||||
"babel-plugin-transform-runtime": "^6.23.0",
|
"babel-plugin-transform-runtime": "^6.23.0",
|
||||||
"babel-preset-env": "^1.6.0",
|
"babel-preset-env": "^1.6.0",
|
||||||
"babel-register": "^6.26.0",
|
"babel-register": "^6.26.0",
|
||||||
@ -43,24 +43,24 @@
|
|||||||
"update-notifier": "^2.3.0"
|
"update-notifier": "^2.3.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@storybook/addon-actions": "^3.3.1",
|
"@storybook/addon-actions": "^3.3.2",
|
||||||
"@storybook/addon-centered": "^3.3.1",
|
"@storybook/addon-centered": "^3.3.2",
|
||||||
"@storybook/addon-graphql": "^3.3.1",
|
"@storybook/addon-graphql": "^3.3.2",
|
||||||
"@storybook/addon-info": "^3.3.1",
|
"@storybook/addon-info": "^3.3.2",
|
||||||
"@storybook/addon-knobs": "^3.3.1",
|
"@storybook/addon-knobs": "^3.3.2",
|
||||||
"@storybook/addon-links": "^3.3.1",
|
"@storybook/addon-links": "^3.3.2",
|
||||||
"@storybook/addon-notes": "^3.3.1",
|
"@storybook/addon-notes": "^3.3.2",
|
||||||
"@storybook/addon-options": "^3.3.1",
|
"@storybook/addon-options": "^3.3.2",
|
||||||
"@storybook/addon-storyshots": "^3.3.1",
|
"@storybook/addon-storyshots": "^3.3.2",
|
||||||
"@storybook/addons": "^3.3.1",
|
"@storybook/addons": "^3.3.2",
|
||||||
"@storybook/angular": "^3.3.1",
|
"@storybook/angular": "^3.3.2",
|
||||||
"@storybook/channel-postmessage": "^3.3.1",
|
"@storybook/channel-postmessage": "^3.3.2",
|
||||||
"@storybook/channel-websocket": "^3.3.1",
|
"@storybook/channel-websocket": "^3.3.2",
|
||||||
"@storybook/channels": "^3.3.1",
|
"@storybook/channels": "^3.3.2",
|
||||||
"@storybook/react": "^3.3.1",
|
"@storybook/react": "^3.3.2",
|
||||||
"@storybook/react-native": "^3.3.1",
|
"@storybook/react-native": "^3.3.2",
|
||||||
"@storybook/ui": "^3.3.1",
|
"@storybook/ui": "^3.3.2",
|
||||||
"@storybook/vue": "^3.3.1",
|
"@storybook/vue": "^3.3.2",
|
||||||
"check-node-version": "2.1.0",
|
"check-node-version": "2.1.0",
|
||||||
"npx": "9.7.1"
|
"npx": "9.7.1"
|
||||||
}
|
}
|
||||||
|
@ -44,10 +44,10 @@
|
|||||||
"ts-node": "1.2.1",
|
"ts-node": "1.2.1",
|
||||||
"tslint": "^4.3.0",
|
"tslint": "^4.3.0",
|
||||||
"typescript": "~2.4.0",
|
"typescript": "~2.4.0",
|
||||||
"@storybook/angular": "^3.3.1",
|
"@storybook/angular": "^3.3.2",
|
||||||
"@storybook/addon-notes": "^3.3.1",
|
"@storybook/addon-notes": "^3.3.2",
|
||||||
"@storybook/addon-actions": "^3.3.1",
|
"@storybook/addon-actions": "^3.3.2",
|
||||||
"@storybook/addon-links": "^3.3.1",
|
"@storybook/addon-links": "^3.3.2",
|
||||||
"@types/lodash-es": "^4.17.0"
|
"@types/lodash-es": "^4.17.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
"babel-preset-react": "^6.24.1",
|
"babel-preset-react": "^6.24.1",
|
||||||
"babel-preset-stage-1": "^6.24.1",
|
"babel-preset-stage-1": "^6.24.1",
|
||||||
"babel-root-slash-import": "^1.1.0",
|
"babel-root-slash-import": "^1.1.0",
|
||||||
"@storybook/react": "^3.3.1",
|
"@storybook/react": "^3.3.2",
|
||||||
"@storybook/addon-actions": "^3.3.1",
|
"@storybook/addon-actions": "^3.3.2",
|
||||||
"@storybook/addon-links": "^3.3.1"
|
"@storybook/addon-links": "^3.3.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
"rollup-plugin-commonjs": "^8.2.0",
|
"rollup-plugin-commonjs": "^8.2.0",
|
||||||
"rollup-plugin-node-resolve": "^3.0.0",
|
"rollup-plugin-node-resolve": "^3.0.0",
|
||||||
"rollup-plugin-replace": "^1.1.1",
|
"rollup-plugin-replace": "^1.1.1",
|
||||||
"@storybook/react": "^3.3.1",
|
"@storybook/react": "^3.3.2",
|
||||||
"@storybook/addon-actions": "^3.3.1",
|
"@storybook/addon-actions": "^3.3.2",
|
||||||
"@storybook/addon-links": "^3.3.1"
|
"@storybook/addon-links": "^3.3.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
"babel-preset-react-native": "3.0.1",
|
"babel-preset-react-native": "3.0.1",
|
||||||
"jest": "20.0.4",
|
"jest": "20.0.4",
|
||||||
"react-test-renderer": "16.0.0-alpha.12",
|
"react-test-renderer": "16.0.0-alpha.12",
|
||||||
"@storybook/react-native": "^3.3.1",
|
"@storybook/react-native": "^3.3.2",
|
||||||
"@storybook/addon-actions": "^3.3.1",
|
"@storybook/addon-actions": "^3.3.2",
|
||||||
"@storybook/addon-links": "^3.3.1",
|
"@storybook/addon-links": "^3.3.2",
|
||||||
"react-dom": "16.0.0-alpha.12",
|
"react-dom": "16.0.0-alpha.12",
|
||||||
"prop-types": "^15.6.0"
|
"prop-types": "^15.6.0"
|
||||||
},
|
},
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
"react-native-scripts": "1.3.1",
|
"react-native-scripts": "1.3.1",
|
||||||
"jest-expo": "~20.0.0",
|
"jest-expo": "~20.0.0",
|
||||||
"react-test-renderer": "16.0.0-alpha.12",
|
"react-test-renderer": "16.0.0-alpha.12",
|
||||||
"@storybook/react-native": "^3.3.1",
|
"@storybook/react-native": "^3.3.2",
|
||||||
"@storybook/addon-actions": "^3.3.1",
|
"@storybook/addon-actions": "^3.3.2",
|
||||||
"@storybook/addon-links": "^3.3.1",
|
"@storybook/addon-links": "^3.3.2",
|
||||||
"react-dom": "16.0.0-alpha.12",
|
"react-dom": "16.0.0-alpha.12",
|
||||||
"prop-types": "^15.6.0"
|
"prop-types": "^15.6.0"
|
||||||
},
|
},
|
||||||
|
@ -13,9 +13,9 @@
|
|||||||
"babel-preset-react": "^6.24.1",
|
"babel-preset-react": "^6.24.1",
|
||||||
"react": "^15.6.1",
|
"react": "^15.6.1",
|
||||||
"react-dom": "^15.6.1",
|
"react-dom": "^15.6.1",
|
||||||
"@storybook/react": "^3.3.1",
|
"@storybook/react": "^3.3.2",
|
||||||
"@storybook/addon-actions": "^3.3.1",
|
"@storybook/addon-actions": "^3.3.2",
|
||||||
"@storybook/addon-links": "^3.3.1"
|
"@storybook/addon-links": "^3.3.2"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": "*",
|
"react": "*",
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
"build-storybook": "build-storybook -s public"
|
"build-storybook": "build-storybook -s public"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@storybook/react": "^3.3.1",
|
"@storybook/react": "^3.3.2",
|
||||||
"@storybook/addon-actions": "^3.3.1",
|
"@storybook/addon-actions": "^3.3.2",
|
||||||
"@storybook/addon-links": "^3.3.1"
|
"@storybook/addon-links": "^3.3.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,9 +49,9 @@
|
|||||||
"webpack-dev-middleware": "^1.10.0",
|
"webpack-dev-middleware": "^1.10.0",
|
||||||
"webpack-hot-middleware": "^2.18.0",
|
"webpack-hot-middleware": "^2.18.0",
|
||||||
"webpack-merge": "^4.1.0",
|
"webpack-merge": "^4.1.0",
|
||||||
"@storybook/vue": "^3.3.1",
|
"@storybook/vue": "^3.3.2",
|
||||||
"@storybook/addon-actions": "^3.3.1",
|
"@storybook/addon-actions": "^3.3.2",
|
||||||
"@storybook/addon-links": "^3.3.1",
|
"@storybook/addon-links": "^3.3.2",
|
||||||
"babel-preset-vue": "^2.0.0"
|
"babel-preset-vue": "^2.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"react-scripts": "0.9.x"
|
"react-scripts": "0.9.x"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@storybook/react": "^3.3.1"
|
"@storybook/react": "^3.3.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"start": "react-scripts start",
|
||||||
|
@ -34,9 +34,9 @@
|
|||||||
"rollup-plugin-serve": "^0.4.0",
|
"rollup-plugin-serve": "^0.4.0",
|
||||||
"rollup-plugin-vue": "^2.4.0",
|
"rollup-plugin-vue": "^2.4.0",
|
||||||
"rollup-watch": "^4.0.0",
|
"rollup-watch": "^4.0.0",
|
||||||
"@storybook/vue": "^3.3.1",
|
"@storybook/vue": "^3.3.2",
|
||||||
"@storybook/addon-actions": "^3.3.1",
|
"@storybook/addon-actions": "^3.3.2",
|
||||||
"@storybook/addon-links": "^3.3.1",
|
"@storybook/addon-links": "^3.3.2",
|
||||||
"babel-preset-vue": "^2.0.0"
|
"babel-preset-vue": "^2.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
"babel-loader": "^7.1.2",
|
"babel-loader": "^7.1.2",
|
||||||
"babel-preset-react": "^6.24.1",
|
"babel-preset-react": "^6.24.1",
|
||||||
"webpack": "^3.5.5",
|
"webpack": "^3.5.5",
|
||||||
"@storybook/react": "^3.3.1",
|
"@storybook/react": "^3.3.2",
|
||||||
"@storybook/addon-actions": "^3.3.1",
|
"@storybook/addon-actions": "^3.3.2",
|
||||||
"@storybook/addon-links": "^3.3.1"
|
"@storybook/addon-links": "^3.3.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/client-logger",
|
"name": "@storybook/client-logger",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "",
|
"description": "",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "node ../../scripts/prepare.js"
|
"prepare": "node ../../scripts/prepare.js"
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/codemod",
|
"name": "@storybook/codemod",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "A collection of codemod scripts written with JSCodeshift",
|
"description": "A collection of codemod scripts written with JSCodeshift",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/storybooks/storybook.git"
|
"url": "https://github.com/storybooks/storybook.git"
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/components",
|
"name": "@storybook/components",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "Core Storybook Components",
|
"description": "Core Storybook Components",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/storybooks/storybook.git"
|
"url": "https://github.com/storybooks/storybook.git"
|
||||||
@ -23,8 +24,8 @@
|
|||||||
"react-dom": "*"
|
"react-dom": "*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@storybook/addon-actions": "^3.3.1",
|
"@storybook/addon-actions": "^3.3.2",
|
||||||
"@storybook/addon-knobs": "^3.3.1",
|
"@storybook/addon-knobs": "^3.3.2",
|
||||||
"@storybook/react": "^3.3.1"
|
"@storybook/react": "^3.3.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/node-logger",
|
"name": "@storybook/node-logger",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "",
|
"description": "",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "node ../../scripts/prepare.js"
|
"prepare": "node ../../scripts/prepare.js"
|
||||||
},
|
},
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "@storybook/ui",
|
"name": "@storybook/ui",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"description": "Core Storybook UI",
|
"description": "Core Storybook UI",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"jsnext:main": "src/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/storybooks/storybook.git"
|
"url": "https://github.com/storybooks/storybook.git"
|
||||||
@ -14,7 +15,7 @@
|
|||||||
"storybook": "start-storybook -p 9010"
|
"storybook": "start-storybook -p 9010"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@storybook/components": "^3.3.1",
|
"@storybook/components": "^3.3.2",
|
||||||
"@storybook/mantra-core": "^1.7.2",
|
"@storybook/mantra-core": "^1.7.2",
|
||||||
"@storybook/react-komposer": "^2.0.3",
|
"@storybook/react-komposer": "^2.0.3",
|
||||||
"babel-runtime": "^6.26.0",
|
"babel-runtime": "^6.26.0",
|
||||||
@ -24,7 +25,9 @@
|
|||||||
"global": "^4.3.2",
|
"global": "^4.3.2",
|
||||||
"json-stringify-safe": "^5.0.1",
|
"json-stringify-safe": "^5.0.1",
|
||||||
"keycode": "^2.1.9",
|
"keycode": "^2.1.9",
|
||||||
"lodash-es": "^4.17.4",
|
"lodash.debounce": "^4.0.8",
|
||||||
|
"lodash.pick": "^4.4.0",
|
||||||
|
"lodash.sortby": "^4.7.0",
|
||||||
"podda": "^1.2.2",
|
"podda": "^1.2.2",
|
||||||
"prop-types": "^15.6.0",
|
"prop-types": "^15.6.0",
|
||||||
"qs": "^6.5.1",
|
"qs": "^6.5.1",
|
||||||
@ -41,7 +44,7 @@
|
|||||||
"react-dom": "*"
|
"react-dom": "*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@storybook/addon-actions": "^3.3.1",
|
"@storybook/addon-actions": "^3.3.2",
|
||||||
"@storybook/react": "^3.3.1"
|
"@storybook/react": "^3.3.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import pick from 'lodash-es/pick';
|
import pick from 'lodash.pick';
|
||||||
|
|
||||||
export function jumpToStory(storyKinds, selectedKind, selectedStory, direction) {
|
export function jumpToStory(storyKinds, selectedKind, selectedStory, direction) {
|
||||||
const flatteredStories = [];
|
const flatteredStories = [];
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import pick from 'lodash-es/pick';
|
import pick from 'lodash.pick';
|
||||||
import { features } from '../../../libs/key_events';
|
import { features } from '../../../libs/key_events';
|
||||||
import apiActions from '../../api/actions';
|
import apiActions from '../../api/actions';
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import pick from 'lodash-es/pick';
|
import pick from 'lodash.pick';
|
||||||
import Header from './header';
|
import Header from './header';
|
||||||
import Stories from './stories_tree';
|
import Stories from './stories_tree';
|
||||||
import TextFilter from './text_filter';
|
import TextFilter from './text_filter';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import debounce from 'lodash-es/debounce';
|
import debounce from 'lodash.debounce';
|
||||||
import { baseFonts } from '@storybook/components';
|
import { baseFonts } from '@storybook/components';
|
||||||
|
|
||||||
const defaultTextValue = '';
|
const defaultTextValue = '';
|
||||||
|
@ -2,7 +2,7 @@ import { shallow, mount } from 'enzyme';
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import TextFilter from './text_filter';
|
import TextFilter from './text_filter';
|
||||||
|
|
||||||
jest.mock('lodash-es/debounce', () => jest.fn(fn => fn));
|
jest.mock('lodash.debounce', () => jest.fn(fn => fn));
|
||||||
|
|
||||||
describe('manager.ui.components.stories_panel.test_filter', () => {
|
describe('manager.ui.components.stories_panel.test_filter', () => {
|
||||||
describe('render', () => {
|
describe('render', () => {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import pick from 'lodash-es/pick';
|
import pick from 'lodash.pick';
|
||||||
import Layout from '../components/layout';
|
import Layout from '../components/layout';
|
||||||
import genPoddaLoader from '../libs/gen_podda_loader';
|
import genPoddaLoader from '../libs/gen_podda_loader';
|
||||||
import compose from '../../../compose';
|
import compose from '../../../compose';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Fuse from 'fuse.js';
|
import Fuse from 'fuse.js';
|
||||||
import sortBy from 'lodash-es/sortBy';
|
import sortBy from 'lodash.sortby';
|
||||||
|
|
||||||
const searchOptions = {
|
const searchOptions = {
|
||||||
shouldSort: false,
|
shouldSort: false,
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
"lint:js": "cross-env NODE_ENV=production eslint --cache --cache-location=.cache/eslint --ext .js,.jsx,.json",
|
"lint:js": "cross-env NODE_ENV=production eslint --cache --cache-location=.cache/eslint --ext .js,.jsx,.json",
|
||||||
"lint:md": "remark",
|
"lint:md": "remark",
|
||||||
"publish": "lerna publish",
|
"publish": "lerna publish",
|
||||||
|
"postpublish": "yarn test --cli --update",
|
||||||
"repo-dirty-check": "node ./scripts/repo-dirty-check",
|
"repo-dirty-check": "node ./scripts/repo-dirty-check",
|
||||||
"start": "npm --prefix examples/cra-kitchen-sink run storybook",
|
"start": "npm --prefix examples/cra-kitchen-sink run storybook",
|
||||||
"test": "node ./scripts/test.js",
|
"test": "node ./scripts/test.js",
|
||||||
@ -32,6 +33,7 @@
|
|||||||
"chromatic": "npm --prefix examples/official-storybook run chromatic"
|
"chromatic": "npm --prefix examples/official-storybook run chromatic"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/lodash": "^4.14.91",
|
||||||
"babel-cli": "^6.26.0",
|
"babel-cli": "^6.26.0",
|
||||||
"babel-core": "^6.26.0",
|
"babel-core": "^6.26.0",
|
||||||
"babel-eslint": "^8.1.2",
|
"babel-eslint": "^8.1.2",
|
||||||
@ -72,7 +74,7 @@
|
|||||||
"jest-jasmine2": "^22.0.4",
|
"jest-jasmine2": "^22.0.4",
|
||||||
"lerna": "^2.5.1",
|
"lerna": "^2.5.1",
|
||||||
"lint-staged": "^6.0.0",
|
"lint-staged": "^6.0.0",
|
||||||
"lodash-es": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
"nodemon": "^1.14.3",
|
"nodemon": "^1.14.3",
|
||||||
"npmlog": "^4.1.2",
|
"npmlog": "^4.1.2",
|
||||||
"prettier": "^1.9.2",
|
"prettier": "^1.9.2",
|
||||||
|
14
yarn.lock
14
yarn.lock
@ -287,13 +287,7 @@
|
|||||||
version "2.8.2"
|
version "2.8.2"
|
||||||
resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.8.2.tgz#6ae4d8740c0da5d5a627df725b4eed71b8e36668"
|
resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.8.2.tgz#6ae4d8740c0da5d5a627df725b4eed71b8e36668"
|
||||||
|
|
||||||
"@types/lodash-es@^4.17.0":
|
"@types/lodash@^4.14.91":
|
||||||
version "4.17.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/lodash-es/-/lodash-es-4.17.0.tgz#ed9044d62ee36a93e0650b112701986b1c74c766"
|
|
||||||
dependencies:
|
|
||||||
"@types/lodash" "*"
|
|
||||||
|
|
||||||
"@types/lodash@*":
|
|
||||||
version "4.14.91"
|
version "4.14.91"
|
||||||
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.91.tgz#794611b28056d16b5436059c6d800b39d573cd3a"
|
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.91.tgz#794611b28056d16b5436059c6d800b39d573cd3a"
|
||||||
|
|
||||||
@ -8438,7 +8432,7 @@ lockfile@~1.0.3:
|
|||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/lockfile/-/lockfile-1.0.3.tgz#2638fc39a0331e9cac1a04b71799931c9c50df79"
|
resolved "https://registry.yarnpkg.com/lockfile/-/lockfile-1.0.3.tgz#2638fc39a0331e9cac1a04b71799931c9c50df79"
|
||||||
|
|
||||||
lodash-es@^4.17.4, lodash-es@^4.2.1:
|
lodash-es@^4.2.1:
|
||||||
version "4.17.4"
|
version "4.17.4"
|
||||||
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.4.tgz#dcc1d7552e150a0640073ba9cb31d70f032950e7"
|
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.4.tgz#dcc1d7552e150a0640073ba9cb31d70f032950e7"
|
||||||
|
|
||||||
@ -8517,6 +8511,10 @@ lodash.cond@^4.3.0:
|
|||||||
version "4.5.2"
|
version "4.5.2"
|
||||||
resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5"
|
resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5"
|
||||||
|
|
||||||
|
lodash.debounce@^4.0.8:
|
||||||
|
version "4.0.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
|
||||||
|
|
||||||
lodash.defaults@^4.2.0:
|
lodash.defaults@^4.2.0:
|
||||||
version "4.2.0"
|
version "4.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c"
|
resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user