From d3abafdcaf612df8602c961e63e2c1d7a22fb94b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Benitte?= Date: Mon, 29 Jan 2018 11:41:04 +0900 Subject: [PATCH] fix(storybook): fix storybook packages import --- package.json | 1 + packages/nivo-bar/stories/bar.stories.js | 2 +- packages/nivo-chord/stories/chord.stories.js | 2 +- .../stories/bubble.stories.js | 2 +- .../nivo-heatmap/stories/heatmap.stories.js | 2 +- packages/nivo-line/stories/line.stories.js | 2 +- packages/nivo-pie/stories/pie.stories.js | 2 +- packages/nivo-radar/stories/radar.stories.js | 2 +- .../nivo-sankey/stories/sankey.stories.js | 2 +- .../stories/scatterplot.stories.js | 2 +- packages/nivo-stream/index.js | 2 +- .../nivo-stream/stories/stream.stories.js | 2 +- .../nivo-sunburst/stories/sunburst.stories.js | 2 +- yarn.lock | 32 +++++++++++++++++++ 14 files changed, 45 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 1c6671cca..83410523f 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "devDependencies": { "@ekino/config": "^0.3.0", "@nivo/babel-preset": "^0.32.0-9", + "@nivo/generators": "^0.33.0", "@storybook/addon-info": "^3.2.17", "@storybook/addon-knobs": "^3.2.17", "@storybook/react": "^3.2.17", diff --git a/packages/nivo-bar/stories/bar.stories.js b/packages/nivo-bar/stories/bar.stories.js index 37e081c2a..181d32b89 100644 --- a/packages/nivo-bar/stories/bar.stories.js +++ b/packages/nivo-bar/stories/bar.stories.js @@ -4,7 +4,7 @@ import { withInfo } from '@storybook/addon-info' import { generateCountriesData, sets } from '@nivo/generators' import range from 'lodash/range' import random from 'lodash/random' -import { Bar } from '../es' +import { Bar } from '../index' const keys = ['hot dogs', 'burgers', 'sandwich', 'kebab', 'fries', 'donut'] const commonProps = { diff --git a/packages/nivo-chord/stories/chord.stories.js b/packages/nivo-chord/stories/chord.stories.js index 326385c9f..fa84a0962 100644 --- a/packages/nivo-chord/stories/chord.stories.js +++ b/packages/nivo-chord/stories/chord.stories.js @@ -2,7 +2,7 @@ import React from 'react' import { storiesOf } from '@storybook/react' import { withInfo } from '@storybook/addon-info' import { generateChordData } from '@nivo/generators' -import { Chord } from '../es' +import { Chord } from '../index' const commonProperties = { width: 600, diff --git a/packages/nivo-circle-packing/stories/bubble.stories.js b/packages/nivo-circle-packing/stories/bubble.stories.js index 68da558d3..0ad6e724f 100644 --- a/packages/nivo-circle-packing/stories/bubble.stories.js +++ b/packages/nivo-circle-packing/stories/bubble.stories.js @@ -1,7 +1,7 @@ import React from 'react' import { storiesOf } from '@storybook/react' import { generateLibTree } from '@nivo/generators' -import { Bubble } from '../es' +import { Bubble } from '../index' const commonProperties = { width: 600, diff --git a/packages/nivo-heatmap/stories/heatmap.stories.js b/packages/nivo-heatmap/stories/heatmap.stories.js index 32cc91f72..fd032c6e2 100644 --- a/packages/nivo-heatmap/stories/heatmap.stories.js +++ b/packages/nivo-heatmap/stories/heatmap.stories.js @@ -1,7 +1,7 @@ import React from 'react' import { storiesOf } from '@storybook/react' import { generateCountriesData } from '@nivo/generators' -import { HeatMap } from '../es' +import { HeatMap } from '../index' const CustomCell = ({ value, diff --git a/packages/nivo-line/stories/line.stories.js b/packages/nivo-line/stories/line.stories.js index ac8ca672d..3ebb9668d 100644 --- a/packages/nivo-line/stories/line.stories.js +++ b/packages/nivo-line/stories/line.stories.js @@ -2,7 +2,7 @@ import React from 'react' import { storiesOf } from '@storybook/react' import { withKnobs, boolean, select } from '@storybook/addon-knobs' import { generateDrinkStats } from '@nivo/generators' -import { Line } from '../es' +import { Line } from '../index' const data = generateDrinkStats(18) const commonProperties = { diff --git a/packages/nivo-pie/stories/pie.stories.js b/packages/nivo-pie/stories/pie.stories.js index 798fa8214..0d8ba7585 100644 --- a/packages/nivo-pie/stories/pie.stories.js +++ b/packages/nivo-pie/stories/pie.stories.js @@ -2,7 +2,7 @@ import React from 'react' import { storiesOf } from '@storybook/react' import { withKnobs, select } from '@storybook/addon-knobs' import { generateProgrammingLanguageStats } from '@nivo/generators' -import { Pie } from '../es' +import { Pie } from '../index' const commonProperties = { width: 600, diff --git a/packages/nivo-radar/stories/radar.stories.js b/packages/nivo-radar/stories/radar.stories.js index 6f140f3a8..f1c706d39 100644 --- a/packages/nivo-radar/stories/radar.stories.js +++ b/packages/nivo-radar/stories/radar.stories.js @@ -2,7 +2,7 @@ import React from 'react' import { storiesOf } from '@storybook/react' import { withKnobs, select } from '@storybook/addon-knobs' import { generateWinesTastes } from '@nivo/generators' -import { Radar } from '../es' +import { Radar } from '../index' const commonProperties = { width: 600, diff --git a/packages/nivo-sankey/stories/sankey.stories.js b/packages/nivo-sankey/stories/sankey.stories.js index b2949934b..28acc1afb 100644 --- a/packages/nivo-sankey/stories/sankey.stories.js +++ b/packages/nivo-sankey/stories/sankey.stories.js @@ -1,7 +1,7 @@ import React from 'react' import { storiesOf } from '@storybook/react' import { generateSankeyData } from '@nivo/generators' -import { Sankey } from '../es' +import { Sankey } from '../index' const commonProperties = { width: 1100, diff --git a/packages/nivo-scatterplot/stories/scatterplot.stories.js b/packages/nivo-scatterplot/stories/scatterplot.stories.js index 8e21c789e..ebd710a35 100644 --- a/packages/nivo-scatterplot/stories/scatterplot.stories.js +++ b/packages/nivo-scatterplot/stories/scatterplot.stories.js @@ -1,7 +1,7 @@ import React from 'react' import { storiesOf } from '@storybook/react' import { withInfo } from '@storybook/addon-info' -import { ScatterPlot } from '../es' +import { ScatterPlot } from '../index' const sampleData = [ { diff --git a/packages/nivo-stream/index.js b/packages/nivo-stream/index.js index 2afb5b244..9bc7621d7 100644 --- a/packages/nivo-stream/index.js +++ b/packages/nivo-stream/index.js @@ -1 +1 @@ -module.exports = require('./cjs/nivo-scatterplot') +module.exports = require('./cjs/nivo-stream') diff --git a/packages/nivo-stream/stories/stream.stories.js b/packages/nivo-stream/stories/stream.stories.js index d98f055a0..8ceab844f 100644 --- a/packages/nivo-stream/stories/stream.stories.js +++ b/packages/nivo-stream/stories/stream.stories.js @@ -3,7 +3,7 @@ import { range, random } from 'lodash' import { storiesOf } from '@storybook/react' import { withKnobs, boolean, select } from '@storybook/addon-knobs' import { areaCurvePropKeys } from '@nivo/core' -import { Stream } from '../es' +import { Stream } from '../index' const keys = ['Raoul', 'Josiane', 'Marcel', 'René', 'Paul', 'Jacques'] diff --git a/packages/nivo-sunburst/stories/sunburst.stories.js b/packages/nivo-sunburst/stories/sunburst.stories.js index 943d57e18..d7e5e06fb 100644 --- a/packages/nivo-sunburst/stories/sunburst.stories.js +++ b/packages/nivo-sunburst/stories/sunburst.stories.js @@ -2,7 +2,7 @@ import React from 'react' import { storiesOf } from '@storybook/react' import { withKnobs, boolean, select } from '@storybook/addon-knobs' import { generateLibTree } from '@nivo/generators' -import { Sunburst } from '../es' +import { Sunburst } from '../index' const commonProperties = { width: 600, diff --git a/yarn.lock b/yarn.lock index f90ca6c40..03d79772c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -102,6 +102,16 @@ babel-plugin-transform-object-rest-spread "^6.26.0" babel-plugin-transform-react-jsx "^6.24.1" +"@nivo/generators@^0.33.0": + version "0.33.0" + resolved "https://registry.yarnpkg.com/@nivo/generators/-/generators-0.33.0.tgz#1e0c01fba6f637a839aa05cd364315bc3dbcc741" + dependencies: + d3-time "^1.0.7" + d3-time-format "^2.0.5" + lodash.random "^3.2.0" + lodash.range "^3.2.0" + lodash.shuffle "^4.2.0" + "@storybook/addon-actions@^3.2.17": version "3.2.17" resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-3.2.17.tgz#e85d38f743125157fdaf6669708e089bc2008e50" @@ -2617,6 +2627,16 @@ currently-unhandled@^0.4.1: dependencies: array-find-index "^1.0.1" +d3-time-format@^2.0.5: + version "2.1.1" + resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-2.1.1.tgz#85b7cdfbc9ffca187f14d3c456ffda268081bb31" + dependencies: + d3-time "1" + +d3-time@1, d3-time@^1.0.7: + version "1.0.8" + resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-1.0.8.tgz#dbd2d6007bf416fe67a76d17947b784bffea1e84" + d@1: version "1.0.0" resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" @@ -4990,6 +5010,18 @@ lodash.pick@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" +lodash.random@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash.random/-/lodash.random-3.2.0.tgz#96e24e763333199130d2c9e2fd57f91703cc262d" + +lodash.range@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash.range/-/lodash.range-3.2.0.tgz#f461e588f66683f7eadeade513e38a69a565a15d" + +lodash.shuffle@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.shuffle/-/lodash.shuffle-4.2.0.tgz#145b5053cf875f6f5c2a33f48b6e9948c6ec7b4b" + lodash.some@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d"