diff --git a/codemods/fix-import-paths.js b/codemods/fix-import-paths.js new file mode 100644 index 000000000..90835513c --- /dev/null +++ b/codemods/fix-import-paths.js @@ -0,0 +1,25 @@ +/* eslint-env node */ +const fs = require('fs'); + +module.exports = function transformer(file, api) { + const j = api.jscodeshift; + + return j(file.source) + .find(j.ImportDeclaration) + .forEach(p => { + const importPath = p.value.source.value; + if (isLocalImport(importPath)) { + p.value.source.value = `~/${importPath}`; + } + }) + .toSource(); +}; + +const PREFIX = './packages/react-vis/src/'; +function isLocalImport(importPath) { + const checks = [importPath, importPath + '/index.js', importPath + '.js'].map( + x => PREFIX + x + ); + + return checks.some(x => fs.existsSync(x)); +} diff --git a/codemods/fix-showcase-imports.js b/codemods/fix-showcase-imports.js new file mode 100644 index 000000000..70726eb7a --- /dev/null +++ b/codemods/fix-showcase-imports.js @@ -0,0 +1,30 @@ +/* eslint-env node,jscodeshift */ +// const j = require('jscodeshift'); + +module.exports = function transformer(file, api) { + const j = api.jscodeshift; + return j(file.source) + .find(j.ImportDeclaration) + .forEach(p => { + const importPath = p.value.source.value; + if (!importPath.startsWith('react-vis/')) { + return; + } + if (p.value.specifiers.length === 0) { + return; + } + + if ( + p.value.specifiers.length === 1 && + p.value.specifiers[0].type === 'ImportDefaultSpecifier' + ) { + j(p).replaceWith( + j.importDeclaration( + [j.importSpecifier(j.identifier(p.value.specifiers[0].local.name))], + j.literal('react-vis') + ) + ); + } + }) + .toSource(); +}; diff --git a/packages/react-vis/.babelrc.json b/packages/react-vis/.babelrc.json index 3a748dd53..2b41b61cd 100644 --- a/packages/react-vis/.babelrc.json +++ b/packages/react-vis/.babelrc.json @@ -1,7 +1,10 @@ { "plugins": [ ["module-resolver", { - "root": ["src"] + "root": ["."], + "alias": { + "^~/(.+)": "./src/\\1" + } }] ] } \ No newline at end of file diff --git a/packages/react-vis/jest.config.js b/packages/react-vis/jest.config.js index 1d5586ff3..58c019829 100644 --- a/packages/react-vis/jest.config.js +++ b/packages/react-vis/jest.config.js @@ -6,5 +6,9 @@ module.exports = { '^.+\\.js$': path.resolve(__dirname, './jestBabelTransform.js') }, setupFilesAfterEnv: ['./jest.setup.js'], + rootDir: '.', + moduleNameMapper: { + '^~/(.*)': '/src/$1' + }, snapshotSerializers: ['enzyme-to-json/serializer'] }; diff --git a/packages/react-vis/jsconfig.json b/packages/react-vis/jsconfig.json new file mode 100644 index 000000000..a19de9db6 --- /dev/null +++ b/packages/react-vis/jsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "~/*": ["src/*"] + } + } +} \ No newline at end of file diff --git a/packages/react-vis/package.json b/packages/react-vis/package.json index 8abe0a0a9..b611a5094 100644 --- a/packages/react-vis/package.json +++ b/packages/react-vis/package.json @@ -21,6 +21,7 @@ }, "scripts": { "docs": "./publish-docs.sh", + "lint": "eslint .", "clean": "rm -rf dist es bundle.* index.html && mkdir dist es", "start": "(cd showcase && command -v yarn >/dev/null && yarn && npm start || npm install && npm start)", "build:browser": "browserify src/index.js -t [ babelify --rootMode upward ] --standalone reactVis | uglifyjs > dist/dist.min.js", @@ -111,4 +112,4 @@ "node": "10.20.1", "yarn": "1.22.4" } -} +} \ No newline at end of file diff --git a/packages/react-vis/src/index.js b/packages/react-vis/src/index.js index 6a0b11d3e..4d624c808 100644 --- a/packages/react-vis/src/index.js +++ b/packages/react-vis/src/index.js @@ -18,59 +18,59 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -export AbstractSeries from 'plot/series/abstract-series'; -export ArcSeries from 'plot/series/arc-series'; -export AreaSeries from 'plot/series/area-series'; -export Borders from 'plot/borders'; -export ChartLabel from 'plot/chart-label'; -export CircularGridLines from 'plot/circular-grid-lines'; -export ContourSeries from 'plot/series/contour-series'; -export Crosshair from 'plot/crosshair'; -export CustomSVGSeries from 'plot/series/custom-svg-series'; -export DecorativeAxis from 'plot/axis/decorative-axis'; -export GradientDefs from 'plot/gradient-defs'; -export GridLines from 'plot/grid-lines'; -export HeatmapSeries from 'plot/series/heatmap-series'; -export HexbinSeries from 'plot/series/hexbin-series'; -export Highlight from 'plot/highlight'; -export Hint from 'plot/hint'; -export HorizontalBarSeries from 'plot/series/horizontal-bar-series'; -export HorizontalBarSeriesCanvas from 'plot/series/horizontal-bar-series-canvas'; -export HorizontalGridLines from 'plot/horizontal-grid-lines'; -export HorizontalRectSeries from 'plot/series/horizontal-rect-series'; -export HorizontalRectSeriesCanvas from 'plot/series/horizontal-rect-series-canvas'; -export LabelSeries from 'plot/series/label-series'; -export LineMarkSeries from 'plot/series/line-mark-series'; -export LineMarkSeriesCanvas from 'plot/series/line-mark-series-canvas'; -export LineSeries from 'plot/series/line-series'; -export LineSeriesCanvas from 'plot/series/line-series-canvas'; -export MarkSeries from 'plot/series/mark-series'; -export MarkSeriesCanvas from 'plot/series/mark-series-canvas'; -export PolygonSeries from 'plot/series/polygon-series'; -export VerticalBarSeries from 'plot/series/vertical-bar-series'; -export VerticalBarSeriesCanvas from 'plot/series/vertical-bar-series-canvas'; -export VerticalGridLines from 'plot/vertical-grid-lines'; -export VerticalRectSeries from 'plot/series/vertical-rect-series'; -export VerticalRectSeriesCanvas from 'plot/series/vertical-rect-series-canvas'; -export Voronoi from 'plot/voronoi'; -export RectSeries from 'plot/series/rect-series'; -export RectSeriesCanvas from 'plot/series/rect-series-canvas'; -export WhiskerSeries from 'plot/series/whisker-series'; -export XYPlot from 'plot/xy-plot'; -export XAxis from 'plot/axis/x-axis'; -export YAxis from 'plot/axis/y-axis'; +export AbstractSeries from '~/plot/series/abstract-series'; +export ArcSeries from '~/plot/series/arc-series'; +export AreaSeries from '~/plot/series/area-series'; +export Borders from '~/plot/borders'; +export ChartLabel from '~/plot/chart-label'; +export CircularGridLines from '~/plot/circular-grid-lines'; +export ContourSeries from '~/plot/series/contour-series'; +export Crosshair from '~/plot/crosshair'; +export CustomSVGSeries from '~/plot/series/custom-svg-series'; +export DecorativeAxis from '~/plot/axis/decorative-axis'; +export GradientDefs from '~/plot/gradient-defs'; +export GridLines from '~/plot/grid-lines'; +export HeatmapSeries from '~/plot/series/heatmap-series'; +export HexbinSeries from '~/plot/series/hexbin-series'; +export Highlight from '~/plot/highlight'; +export Hint from '~/plot/hint'; +export HorizontalBarSeries from '~/plot/series/horizontal-bar-series'; +export HorizontalBarSeriesCanvas from '~/plot/series/horizontal-bar-series-canvas'; +export HorizontalGridLines from '~/plot/horizontal-grid-lines'; +export HorizontalRectSeries from '~/plot/series/horizontal-rect-series'; +export HorizontalRectSeriesCanvas from '~/plot/series/horizontal-rect-series-canvas'; +export LabelSeries from '~/plot/series/label-series'; +export LineMarkSeries from '~/plot/series/line-mark-series'; +export LineMarkSeriesCanvas from '~/plot/series/line-mark-series-canvas'; +export LineSeries from '~/plot/series/line-series'; +export LineSeriesCanvas from '~/plot/series/line-series-canvas'; +export MarkSeries from '~/plot/series/mark-series'; +export MarkSeriesCanvas from '~/plot/series/mark-series-canvas'; +export PolygonSeries from '~/plot/series/polygon-series'; +export VerticalBarSeries from '~/plot/series/vertical-bar-series'; +export VerticalBarSeriesCanvas from '~/plot/series/vertical-bar-series-canvas'; +export VerticalGridLines from '~/plot/vertical-grid-lines'; +export VerticalRectSeries from '~/plot/series/vertical-rect-series'; +export VerticalRectSeriesCanvas from '~/plot/series/vertical-rect-series-canvas'; +export Voronoi from '~/plot/voronoi'; +export RectSeries from '~/plot/series/rect-series'; +export RectSeriesCanvas from '~/plot/series/rect-series-canvas'; +export WhiskerSeries from '~/plot/series/whisker-series'; +export XYPlot from '~/plot/xy-plot'; +export XAxis from '~/plot/axis/x-axis'; +export YAxis from '~/plot/axis/y-axis'; -export ContinuousColorLegend from 'legends/continuous-color-legend'; -export ContinuousSizeLegend from 'legends/continuous-size-legend'; -export DiscreteColorLegend from 'legends/discrete-color-legend'; -export SearchableDiscreteColorLegend from 'legends/searchable-discrete-color-legend'; +export ContinuousColorLegend from '~/legends/continuous-color-legend'; +export ContinuousSizeLegend from '~/legends/continuous-size-legend'; +export DiscreteColorLegend from '~/legends/discrete-color-legend'; +export SearchableDiscreteColorLegend from '~/legends/searchable-discrete-color-legend'; -export ParallelCoordinates from 'parallel-coordinates'; -export RadarChart from 'radar-chart'; -export RadialChart from 'radial-chart'; -export Sankey from 'sankey'; -export Sunburst from 'sunburst'; -export Treemap from 'treemap'; +export ParallelCoordinates from '~/parallel-coordinates'; +export RadarChart from '~/radar-chart'; +export RadialChart from '~/radial-chart'; +export Sankey from '~/sankey'; +export Sunburst from '~/sunburst'; +export Treemap from '~/treemap'; export ContentClipPath from './plot/content-clip-path'; @@ -83,5 +83,5 @@ export { FlexibleHeightXYPlot } from './make-vis-flexible'; -export AxisUtils from 'utils/axis-utils'; -export ScaleUtils from 'utils/scales-utils'; +export AxisUtils from '~/utils/axis-utils'; +export ScaleUtils from '~/utils/scales-utils'; diff --git a/packages/react-vis/src/legends/continuous-color-legend.js b/packages/react-vis/src/legends/continuous-color-legend.js index 2b5b2cdd2..9244e1225 100644 --- a/packages/react-vis/src/legends/continuous-color-legend.js +++ b/packages/react-vis/src/legends/continuous-color-legend.js @@ -22,8 +22,8 @@ import React from 'react'; import PropTypes from 'prop-types'; -import {CONTINUOUS_COLOR_RANGE} from 'theme'; -import {getCombinedClassName} from 'utils/styling-utils'; +import {CONTINUOUS_COLOR_RANGE} from '~/theme'; +import {getCombinedClassName} from '~/utils/styling-utils'; const propTypes = { className: PropTypes.string, diff --git a/packages/react-vis/src/legends/continuous-size-legend.js b/packages/react-vis/src/legends/continuous-size-legend.js index b63f6bdf4..128b8c312 100644 --- a/packages/react-vis/src/legends/continuous-size-legend.js +++ b/packages/react-vis/src/legends/continuous-size-legend.js @@ -21,7 +21,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import {getCombinedClassName} from 'utils/styling-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; const propTypes = { className: PropTypes.string, diff --git a/packages/react-vis/src/legends/discrete-color-legend.js b/packages/react-vis/src/legends/discrete-color-legend.js index 6fe6b354f..5d053fc2b 100644 --- a/packages/react-vis/src/legends/discrete-color-legend.js +++ b/packages/react-vis/src/legends/discrete-color-legend.js @@ -21,9 +21,9 @@ import React from 'react'; import PropTypes from 'prop-types'; -import DiscreteColorLegendItem from 'legends/discrete-color-legend-item'; -import {DISCRETE_COLOR_RANGE} from 'theme'; -import {getCombinedClassName} from 'utils/styling-utils'; +import DiscreteColorLegendItem from '~/legends/discrete-color-legend-item'; +import {DISCRETE_COLOR_RANGE} from '~/theme'; +import {getCombinedClassName} from '~/utils/styling-utils'; function DiscreteColorLegend({ className, diff --git a/packages/react-vis/src/legends/searchable-discrete-color-legend.js b/packages/react-vis/src/legends/searchable-discrete-color-legend.js index 4e2c305b0..434cd7dc2 100644 --- a/packages/react-vis/src/legends/searchable-discrete-color-legend.js +++ b/packages/react-vis/src/legends/searchable-discrete-color-legend.js @@ -21,8 +21,8 @@ import React from 'react'; import PropTypes from 'prop-types'; -import DiscreteColorLegend from 'legends/discrete-color-legend'; -import {getCombinedClassName} from 'utils/styling-utils'; +import DiscreteColorLegend from '~/legends/discrete-color-legend'; +import {getCombinedClassName} from '~/utils/styling-utils'; const propTypes = { ...DiscreteColorLegend.propTypes, diff --git a/packages/react-vis/src/make-vis-flexible.js b/packages/react-vis/src/make-vis-flexible.js index 9c875abe7..673ad9d40 100644 --- a/packages/react-vis/src/make-vis-flexible.js +++ b/packages/react-vis/src/make-vis-flexible.js @@ -21,8 +21,8 @@ import React from 'react'; import window from 'global/window'; -import XYPlot from 'plot/xy-plot'; -import {getDOMNode} from 'utils/react-utils'; +import XYPlot from '~/plot/xy-plot'; +import {getDOMNode} from '~/utils/react-utils'; const CONTAINER_REF = 'container'; diff --git a/packages/react-vis/src/parallel-coordinates/index.js b/packages/react-vis/src/parallel-coordinates/index.js index c8305bd95..1765cba08 100644 --- a/packages/react-vis/src/parallel-coordinates/index.js +++ b/packages/react-vis/src/parallel-coordinates/index.js @@ -23,21 +23,21 @@ import PropTypes from 'prop-types'; import {scaleLinear} from 'd3-scale'; import {format} from 'd3-format'; -import {AnimationPropType} from 'animation'; -import XYPlot from 'plot/xy-plot'; -import {DISCRETE_COLOR_RANGE} from 'theme'; +import {AnimationPropType} from '~/animation'; +import XYPlot from '~/plot/xy-plot'; +import {DISCRETE_COLOR_RANGE} from '~/theme'; import { MarginPropType, getInnerDimensions, DEFAULT_MARGINS -} from 'utils/chart-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; -import LineSeries from 'plot/series/line-series'; -import LineMarkSeries from 'plot/series/line-mark-series'; -import LabelSeries from 'plot/series/label-series'; -import DecorativeAxis from 'plot/axis/decorative-axis'; +} from '~/utils/chart-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; +import LineSeries from '~/plot/series/line-series'; +import LineMarkSeries from '~/plot/series/line-mark-series'; +import LabelSeries from '~/plot/series/label-series'; +import DecorativeAxis from '~/plot/axis/decorative-axis'; -import Highlight from 'plot/highlight'; +import Highlight from '~/plot/highlight'; const predefinedClassName = 'rv-parallel-coordinates-chart'; const DEFAULT_FORMAT = format('.2r'); diff --git a/packages/react-vis/src/plot/axis/axis-line.js b/packages/react-vis/src/plot/axis/axis-line.js index b851cd11c..602ca4001 100644 --- a/packages/react-vis/src/plot/axis/axis-line.js +++ b/packages/react-vis/src/plot/axis/axis-line.js @@ -22,7 +22,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import {ORIENTATION} from 'utils/axis-utils'; +import {ORIENTATION} from '~/utils/axis-utils'; const {LEFT, RIGHT, TOP, BOTTOM} = ORIENTATION; diff --git a/packages/react-vis/src/plot/axis/axis-ticks.js b/packages/react-vis/src/plot/axis/axis-ticks.js index cb7332afe..7b30ee258 100644 --- a/packages/react-vis/src/plot/axis/axis-ticks.js +++ b/packages/react-vis/src/plot/axis/axis-ticks.js @@ -22,8 +22,8 @@ import React from 'react'; import PropTypes from 'prop-types'; -import {ORIENTATION, getTickValues} from 'utils/axis-utils'; -import {getAttributeScale} from 'utils/scales-utils'; +import {ORIENTATION, getTickValues} from '~/utils/axis-utils'; +import {getAttributeScale} from '~/utils/scales-utils'; const {LEFT, RIGHT, TOP, BOTTOM} = ORIENTATION; diff --git a/packages/react-vis/src/plot/axis/axis-title.js b/packages/react-vis/src/plot/axis/axis-title.js index 9a44a7188..7a8d87976 100644 --- a/packages/react-vis/src/plot/axis/axis-title.js +++ b/packages/react-vis/src/plot/axis/axis-title.js @@ -22,7 +22,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import {ORIENTATION} from 'utils/axis-utils'; +import {ORIENTATION} from '~/utils/axis-utils'; // Assuming that 16px = 1em const ADJUSTMENT_FOR_TEXT_SIZE = 16; diff --git a/packages/react-vis/src/plot/axis/axis.js b/packages/react-vis/src/plot/axis/axis.js index f40d83ed4..9180d7bff 100644 --- a/packages/react-vis/src/plot/axis/axis.js +++ b/packages/react-vis/src/plot/axis/axis.js @@ -21,10 +21,10 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; -import Animation from 'animation'; -import {ORIENTATION, getTicksTotalFromSize} from 'utils/axis-utils'; -import {getAttributeScale} from 'utils/scales-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; +import Animation from '~/animation'; +import {ORIENTATION, getTicksTotalFromSize} from '~/utils/axis-utils'; +import {getAttributeScale} from '~/utils/scales-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; import AxisLine from './axis-line'; import AxisTicks from './axis-ticks'; diff --git a/packages/react-vis/src/plot/axis/decorative-axis-ticks.js b/packages/react-vis/src/plot/axis/decorative-axis-ticks.js index 2ce7842ec..589897774 100644 --- a/packages/react-vis/src/plot/axis/decorative-axis-ticks.js +++ b/packages/react-vis/src/plot/axis/decorative-axis-ticks.js @@ -19,7 +19,7 @@ // THE SOFTWARE. import React from 'react'; -import {generatePoints, getAxisAngle} from 'utils/axis-utils'; +import {generatePoints, getAxisAngle} from '~/utils/axis-utils'; /** * Generate the actual polygons to be plotted diff --git a/packages/react-vis/src/plot/axis/decorative-axis.js b/packages/react-vis/src/plot/axis/decorative-axis.js index b7cfd1fac..76eada72c 100644 --- a/packages/react-vis/src/plot/axis/decorative-axis.js +++ b/packages/react-vis/src/plot/axis/decorative-axis.js @@ -22,10 +22,10 @@ import React from 'react'; import {format} from 'd3-format'; import PropTypes from 'prop-types'; -import AbstractSeries from 'plot/series/abstract-series'; +import AbstractSeries from '~/plot/series/abstract-series'; import DecorativeAxisTicks from './decorative-axis-ticks'; -import Animation from 'animation'; -import {getCombinedClassName} from 'utils/styling-utils'; +import Animation from '~/animation'; +import {getCombinedClassName} from '~/utils/styling-utils'; const predefinedClassName = 'rv-xy-manipulable-axis rv-xy-plot__axis'; diff --git a/packages/react-vis/src/plot/axis/x-axis.js b/packages/react-vis/src/plot/axis/x-axis.js index 2d98ad2ff..b9e462944 100644 --- a/packages/react-vis/src/plot/axis/x-axis.js +++ b/packages/react-vis/src/plot/axis/x-axis.js @@ -22,7 +22,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import {ORIENTATION} from 'utils/axis-utils'; +import {ORIENTATION} from '~/utils/axis-utils'; import Axis from './axis'; diff --git a/packages/react-vis/src/plot/axis/y-axis.js b/packages/react-vis/src/plot/axis/y-axis.js index ee1df2f8d..d3ebdfe58 100644 --- a/packages/react-vis/src/plot/axis/y-axis.js +++ b/packages/react-vis/src/plot/axis/y-axis.js @@ -22,7 +22,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import {ORIENTATION} from 'utils/axis-utils'; +import {ORIENTATION} from '~/utils/axis-utils'; import Axis from './axis'; diff --git a/packages/react-vis/src/plot/borders.js b/packages/react-vis/src/plot/borders.js index 03bc6b883..7d9b5e5b7 100644 --- a/packages/react-vis/src/plot/borders.js +++ b/packages/react-vis/src/plot/borders.js @@ -20,7 +20,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import {getCombinedClassName} from 'utils/styling-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; const propTypes = { style: PropTypes.shape({ diff --git a/packages/react-vis/src/plot/chart-label.js b/packages/react-vis/src/plot/chart-label.js index 9aa3a89dd..5163bc129 100644 --- a/packages/react-vis/src/plot/chart-label.js +++ b/packages/react-vis/src/plot/chart-label.js @@ -21,7 +21,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import {getCombinedClassName} from 'utils/styling-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; class ChartLabel extends React.PureComponent { static get requiresSVG() { diff --git a/packages/react-vis/src/plot/circular-grid-lines.js b/packages/react-vis/src/plot/circular-grid-lines.js index f5d2330ad..8575db3e3 100644 --- a/packages/react-vis/src/plot/circular-grid-lines.js +++ b/packages/react-vis/src/plot/circular-grid-lines.js @@ -22,8 +22,8 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; -import {getAttributeScale} from 'utils/scales-utils'; -import Animation, {AnimationPropType} from 'animation'; +import {getAttributeScale} from '~/utils/scales-utils'; +import Animation, {AnimationPropType} from '~/animation'; import {getTicksTotalFromSize, getTickValues} from '../utils/axis-utils'; diff --git a/packages/react-vis/src/plot/crosshair.js b/packages/react-vis/src/plot/crosshair.js index 3e5941a86..6dcdc837c 100644 --- a/packages/react-vis/src/plot/crosshair.js +++ b/packages/react-vis/src/plot/crosshair.js @@ -21,9 +21,9 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; -import {transformValueToString} from 'utils/data-utils'; -import {getAttributeFunctor} from 'utils/scales-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; +import {transformValueToString} from '~/utils/data-utils'; +import {getAttributeFunctor} from '~/utils/scales-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; /** * Format title by detault. diff --git a/packages/react-vis/src/plot/gradient-defs.js b/packages/react-vis/src/plot/gradient-defs.js index bbea066ee..f441d3c2e 100644 --- a/packages/react-vis/src/plot/gradient-defs.js +++ b/packages/react-vis/src/plot/gradient-defs.js @@ -21,7 +21,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import {getCombinedClassName} from 'utils/styling-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; const predefinedClassName = 'rv-gradient-defs'; diff --git a/packages/react-vis/src/plot/grid-lines.js b/packages/react-vis/src/plot/grid-lines.js index 590ff65f6..f3a01cfc8 100644 --- a/packages/react-vis/src/plot/grid-lines.js +++ b/packages/react-vis/src/plot/grid-lines.js @@ -21,9 +21,9 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; -import {getAttributeScale} from 'utils/scales-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; -import Animation, {AnimationPropType} from 'animation'; +import {getAttributeScale} from '~/utils/scales-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; +import Animation, {AnimationPropType} from '~/animation'; import { getTicksTotalFromSize, diff --git a/packages/react-vis/src/plot/highlight.js b/packages/react-vis/src/plot/highlight.js index 05fdec519..ecd65752c 100644 --- a/packages/react-vis/src/plot/highlight.js +++ b/packages/react-vis/src/plot/highlight.js @@ -2,8 +2,8 @@ import React from 'react'; import PropTypes from 'prop-types'; import AbstractSeries from './series/abstract-series'; -import {getAttributeScale} from 'utils/scales-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; +import {getAttributeScale} from '~/utils/scales-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; function getLocs(evt) { const xLoc = evt.type === 'touchstart' ? evt.pageX : evt.offsetX; diff --git a/packages/react-vis/src/plot/hint.js b/packages/react-vis/src/plot/hint.js index 7486faf2c..e6b950037 100644 --- a/packages/react-vis/src/plot/hint.js +++ b/packages/react-vis/src/plot/hint.js @@ -21,9 +21,9 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; -import {transformValueToString} from 'utils/data-utils'; -import {getAttributeFunctor} from 'utils/scales-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; +import {transformValueToString} from '~/utils/data-utils'; +import {getAttributeFunctor} from '~/utils/scales-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; /* * Hint provides two options for placement of hint: diff --git a/packages/react-vis/src/plot/horizontal-grid-lines.js b/packages/react-vis/src/plot/horizontal-grid-lines.js index 42f06a511..838eca578 100644 --- a/packages/react-vis/src/plot/horizontal-grid-lines.js +++ b/packages/react-vis/src/plot/horizontal-grid-lines.js @@ -22,8 +22,8 @@ import React from 'react'; import PropTypes from 'prop-types'; -import {DIRECTION} from 'utils/axis-utils'; -import GridLines from 'plot/grid-lines'; +import {DIRECTION} from '~/utils/axis-utils'; +import GridLines from '~/plot/grid-lines'; const {HORIZONTAL} = DIRECTION; diff --git a/packages/react-vis/src/plot/series/abstract-series.js b/packages/react-vis/src/plot/series/abstract-series.js index 8eed72030..3b797a2c4 100644 --- a/packages/react-vis/src/plot/series/abstract-series.js +++ b/packages/react-vis/src/plot/series/abstract-series.js @@ -22,14 +22,14 @@ import PropTypes from 'prop-types'; import {voronoi} from 'd3-voronoi'; import {PureComponent} from 'react'; -import {AnimationPropType} from 'animation'; +import {AnimationPropType} from '~/animation'; import { getAttributeFunctor, getAttr0Functor, getAttributeValue, getScaleObjectFromProps, getScalePropTypesByAttribute -} from 'utils/scales-utils'; +} from '~/utils/scales-utils'; const propTypes = { ...getScalePropTypesByAttribute('x'), diff --git a/packages/react-vis/src/plot/series/arc-series.js b/packages/react-vis/src/plot/series/arc-series.js index 2b90c63ae..37a8b0533 100644 --- a/packages/react-vis/src/plot/series/arc-series.js +++ b/packages/react-vis/src/plot/series/arc-series.js @@ -20,10 +20,10 @@ import React from 'react'; import PropTypes from 'prop-types'; -import Animation from 'animation'; +import Animation from '~/animation'; import {arc as arcBuilder} from 'd3-shape'; -import {ANIMATED_SERIES_PROPS} from 'utils/series-utils'; +import {ANIMATED_SERIES_PROPS} from '~/utils/series-utils'; import AbstractSeries from './abstract-series'; import { getAttributeFunctor, @@ -31,8 +31,8 @@ import { extractScalePropsFromProps, getMissingScaleProps, getScalePropTypesByAttribute -} from 'utils/scales-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; +} from '~/utils/scales-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; const predefinedClassName = 'rv-xy-plot__series rv-xy-plot__series--arc'; const ATTRIBUTES = ['radius', 'angle']; diff --git a/packages/react-vis/src/plot/series/area-series.js b/packages/react-vis/src/plot/series/area-series.js index 5121f1300..0e8b3a822 100644 --- a/packages/react-vis/src/plot/series/area-series.js +++ b/packages/react-vis/src/plot/series/area-series.js @@ -22,11 +22,11 @@ import React from 'react'; import PropTypes from 'prop-types'; import * as d3Shape from 'd3-shape'; -import Animation from 'animation'; -import {DEFAULT_OPACITY} from 'theme'; -import {ANIMATED_SERIES_PROPS} from 'utils/series-utils'; -import {warning} from 'utils/react-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; +import Animation from '~/animation'; +import {DEFAULT_OPACITY} from '~/theme'; +import {ANIMATED_SERIES_PROPS} from '~/utils/series-utils'; +import {warning} from '~/utils/react-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; import AbstractSeries from './abstract-series'; diff --git a/packages/react-vis/src/plot/series/bar-series-canvas.js b/packages/react-vis/src/plot/series/bar-series-canvas.js index 5707ecf69..c606f5edf 100644 --- a/packages/react-vis/src/plot/series/bar-series-canvas.js +++ b/packages/react-vis/src/plot/series/bar-series-canvas.js @@ -20,13 +20,13 @@ import PropTypes from 'prop-types'; import {rgb} from 'd3-color'; -import {DEFAULT_OPACITY} from 'theme'; +import {DEFAULT_OPACITY} from '~/theme'; import { getAttributeFunctor, getScaleObjectFromProps, getAttr0Functor -} from 'utils/scales-utils'; -import {getStackParams} from 'utils/series-utils'; +} from '~/utils/scales-utils'; +import {getStackParams} from '~/utils/series-utils'; import AbstractSeries from './abstract-series'; function getScaleDistance(props, attr) { diff --git a/packages/react-vis/src/plot/series/bar-series.js b/packages/react-vis/src/plot/series/bar-series.js index 47698e7bb..bab7d629b 100644 --- a/packages/react-vis/src/plot/series/bar-series.js +++ b/packages/react-vis/src/plot/series/bar-series.js @@ -21,9 +21,9 @@ import React from 'react'; import PropTypes from 'prop-types'; -import Animation from 'animation'; -import {ANIMATED_SERIES_PROPS, getStackParams} from 'utils/series-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; +import Animation from '~/animation'; +import {ANIMATED_SERIES_PROPS, getStackParams} from '~/utils/series-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; import AbstractSeries from './abstract-series'; diff --git a/packages/react-vis/src/plot/series/canvas-wrapper.js b/packages/react-vis/src/plot/series/canvas-wrapper.js index 1be6dac03..f89248eaa 100644 --- a/packages/react-vis/src/plot/series/canvas-wrapper.js +++ b/packages/react-vis/src/plot/series/canvas-wrapper.js @@ -22,8 +22,8 @@ import React, {Component} from 'react'; import PropTypes from 'prop-types'; import {interpolate} from 'd3-interpolate'; -import {extractAnimatedPropValues} from 'animation'; -import {ANIMATED_SERIES_PROPS} from 'utils/series-utils'; +import {extractAnimatedPropValues} from '~/animation'; +import {ANIMATED_SERIES_PROPS} from '~/utils/series-utils'; const MAX_DRAWS = 30; diff --git a/packages/react-vis/src/plot/series/contour-series.js b/packages/react-vis/src/plot/series/contour-series.js index 0b59772f8..88fb60ba9 100644 --- a/packages/react-vis/src/plot/series/contour-series.js +++ b/packages/react-vis/src/plot/series/contour-series.js @@ -25,10 +25,10 @@ import {geoPath} from 'd3-geo'; import {scaleLinear} from 'd3-scale'; import AbstractSeries from './abstract-series'; -import Animation from 'animation'; -import {ANIMATED_SERIES_PROPS} from 'utils/series-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; -import {CONTINUOUS_COLOR_RANGE} from 'theme'; +import Animation from '~/animation'; +import {ANIMATED_SERIES_PROPS} from '~/utils/series-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; +import {CONTINUOUS_COLOR_RANGE} from '~/theme'; const predefinedClassName = 'rv-xy-plot__series rv-xy-plot__series--contour'; diff --git a/packages/react-vis/src/plot/series/custom-svg-series.js b/packages/react-vis/src/plot/series/custom-svg-series.js index 50d9086f1..4f7d6089d 100644 --- a/packages/react-vis/src/plot/series/custom-svg-series.js +++ b/packages/react-vis/src/plot/series/custom-svg-series.js @@ -22,9 +22,9 @@ import React from 'react'; import PropTypes from 'prop-types'; import AbstractSeries from './abstract-series'; -import Animation from 'animation'; -import {ANIMATED_SERIES_PROPS} from 'utils/series-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; +import Animation from '~/animation'; +import {ANIMATED_SERIES_PROPS} from '~/utils/series-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; const predefinedClassName = 'rv-xy-plot__series rv-xy-plot__series--custom-svg-wrapper'; diff --git a/packages/react-vis/src/plot/series/heatmap-series.js b/packages/react-vis/src/plot/series/heatmap-series.js index d8bf69ec9..1627e03e4 100644 --- a/packages/react-vis/src/plot/series/heatmap-series.js +++ b/packages/react-vis/src/plot/series/heatmap-series.js @@ -20,9 +20,9 @@ import React from 'react'; -import Animation from 'animation'; -import {ANIMATED_SERIES_PROPS} from 'utils/series-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; +import Animation from '~/animation'; +import {ANIMATED_SERIES_PROPS} from '~/utils/series-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; import AbstractSeries from './abstract-series'; diff --git a/packages/react-vis/src/plot/series/hexbin-series.js b/packages/react-vis/src/plot/series/hexbin-series.js index ccef089c3..f7291b005 100644 --- a/packages/react-vis/src/plot/series/hexbin-series.js +++ b/packages/react-vis/src/plot/series/hexbin-series.js @@ -20,13 +20,13 @@ import React from 'react'; import PropTypes from 'prop-types'; -import Animation from 'animation'; +import Animation from '~/animation'; import {hexbin} from 'd3-hexbin'; import {scaleLinear} from 'd3-scale'; -import {ANIMATED_SERIES_PROPS} from 'utils/series-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; -import {CONTINUOUS_COLOR_RANGE} from 'theme'; +import {ANIMATED_SERIES_PROPS} from '~/utils/series-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; +import {CONTINUOUS_COLOR_RANGE} from '~/theme'; import AbstractSeries from './abstract-series'; const predefinedClassName = 'rv-xy-plot__series rv-xy-plot__series--hexbin'; diff --git a/packages/react-vis/src/plot/series/label-series.js b/packages/react-vis/src/plot/series/label-series.js index 62ce051a0..21b9a69f9 100644 --- a/packages/react-vis/src/plot/series/label-series.js +++ b/packages/react-vis/src/plot/series/label-series.js @@ -22,9 +22,9 @@ import React from 'react'; import PropTypes from 'prop-types'; import AbstractSeries from './abstract-series'; -import Animation from 'animation'; -import {ANIMATED_SERIES_PROPS} from 'utils/series-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; +import Animation from '~/animation'; +import {ANIMATED_SERIES_PROPS} from '~/utils/series-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; const predefinedClassName = 'rv-xy-plot__series rv-xy-plot__series--label'; diff --git a/packages/react-vis/src/plot/series/line-series-canvas.js b/packages/react-vis/src/plot/series/line-series-canvas.js index 3f086acc8..588696014 100644 --- a/packages/react-vis/src/plot/series/line-series-canvas.js +++ b/packages/react-vis/src/plot/series/line-series-canvas.js @@ -22,8 +22,8 @@ import {rgb} from 'd3-color'; import * as d3Shape from 'd3-shape'; import React from 'react'; -import {DEFAULT_OPACITY} from 'theme'; -import {getAttributeFunctor, getAttributeValue} from 'utils/scales-utils'; +import {DEFAULT_OPACITY} from '~/theme'; +import {getAttributeFunctor, getAttributeValue} from '~/utils/scales-utils'; import AbstractSeries from './abstract-series'; class LineSeriesCanvas extends AbstractSeries { diff --git a/packages/react-vis/src/plot/series/line-series.js b/packages/react-vis/src/plot/series/line-series.js index 6fbae4027..d6dbfde1a 100644 --- a/packages/react-vis/src/plot/series/line-series.js +++ b/packages/react-vis/src/plot/series/line-series.js @@ -22,11 +22,11 @@ import React from 'react'; import PropTypes from 'prop-types'; import * as d3Shape from 'd3-shape'; -import Animation from 'animation'; -import {DEFAULT_OPACITY} from 'theme'; -import {ANIMATED_SERIES_PROPS} from 'utils/series-utils'; -import {warning} from 'utils/react-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; +import Animation from '~/animation'; +import {DEFAULT_OPACITY} from '~/theme'; +import {ANIMATED_SERIES_PROPS} from '~/utils/series-utils'; +import {warning} from '~/utils/react-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; import AbstractSeries from './abstract-series'; diff --git a/packages/react-vis/src/plot/series/mark-series-canvas.js b/packages/react-vis/src/plot/series/mark-series-canvas.js index c1ff25eb5..721cbb325 100644 --- a/packages/react-vis/src/plot/series/mark-series-canvas.js +++ b/packages/react-vis/src/plot/series/mark-series-canvas.js @@ -20,8 +20,8 @@ import {rgb} from 'd3-color'; -import {DEFAULT_SIZE, DEFAULT_OPACITY} from 'theme'; -import {getAttributeFunctor} from 'utils/scales-utils'; +import {DEFAULT_SIZE, DEFAULT_OPACITY} from '~/theme'; +import {getAttributeFunctor} from '~/utils/scales-utils'; import AbstractSeries from './abstract-series'; diff --git a/packages/react-vis/src/plot/series/mark-series.js b/packages/react-vis/src/plot/series/mark-series.js index 20a0f0b19..8af63ca69 100644 --- a/packages/react-vis/src/plot/series/mark-series.js +++ b/packages/react-vis/src/plot/series/mark-series.js @@ -21,11 +21,11 @@ import React from 'react'; import PropTypes from 'prop-types'; -import Animation from 'animation'; -import {ANIMATED_SERIES_PROPS} from 'utils/series-utils'; -import {warning} from 'utils/react-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; -import {DEFAULT_SIZE, DEFAULT_OPACITY} from 'theme'; +import Animation from '~/animation'; +import {ANIMATED_SERIES_PROPS} from '~/utils/series-utils'; +import {warning} from '~/utils/react-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; +import {DEFAULT_SIZE, DEFAULT_OPACITY} from '~/theme'; import AbstractSeries from './abstract-series'; diff --git a/packages/react-vis/src/plot/series/polygon-series.js b/packages/react-vis/src/plot/series/polygon-series.js index b07b3eba1..1cf50d63c 100644 --- a/packages/react-vis/src/plot/series/polygon-series.js +++ b/packages/react-vis/src/plot/series/polygon-series.js @@ -20,9 +20,9 @@ import React from 'react'; -import Animation from 'animation'; -import {ANIMATED_SERIES_PROPS} from 'utils/series-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; +import Animation from '~/animation'; +import {ANIMATED_SERIES_PROPS} from '~/utils/series-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; import AbstractSeries from './abstract-series'; diff --git a/packages/react-vis/src/plot/series/rect-series-canvas.js b/packages/react-vis/src/plot/series/rect-series-canvas.js index dc2708eaf..aa0f7e284 100644 --- a/packages/react-vis/src/plot/series/rect-series-canvas.js +++ b/packages/react-vis/src/plot/series/rect-series-canvas.js @@ -20,8 +20,8 @@ import PropTypes from 'prop-types'; import {rgb} from 'd3-color'; -import {DEFAULT_OPACITY} from 'theme'; -import {getAttributeFunctor, getAttr0Functor} from 'utils/scales-utils'; +import {DEFAULT_OPACITY} from '~/theme'; +import {getAttributeFunctor, getAttr0Functor} from '~/utils/scales-utils'; import AbstractSeries from './abstract-series'; class RectSeriesCanvas extends AbstractSeries { diff --git a/packages/react-vis/src/plot/series/rect-series.js b/packages/react-vis/src/plot/series/rect-series.js index 3a7015fe7..3a77e2214 100644 --- a/packages/react-vis/src/plot/series/rect-series.js +++ b/packages/react-vis/src/plot/series/rect-series.js @@ -21,9 +21,9 @@ import React from 'react'; import PropTypes from 'prop-types'; -import Animation from 'animation'; -import {ANIMATED_SERIES_PROPS} from 'utils/series-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; +import Animation from '~/animation'; +import {ANIMATED_SERIES_PROPS} from '~/utils/series-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; import AbstractSeries from './abstract-series'; diff --git a/packages/react-vis/src/plot/series/whisker-series.js b/packages/react-vis/src/plot/series/whisker-series.js index 348f163a6..3f4883806 100644 --- a/packages/react-vis/src/plot/series/whisker-series.js +++ b/packages/react-vis/src/plot/series/whisker-series.js @@ -21,10 +21,10 @@ import React from 'react'; import PropTypes from 'prop-types'; -import Animation from 'animation'; -import {ANIMATED_SERIES_PROPS} from 'utils/series-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; -import {DEFAULT_OPACITY} from 'theme'; +import Animation from '~/animation'; +import {ANIMATED_SERIES_PROPS} from '~/utils/series-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; +import {DEFAULT_OPACITY} from '~/theme'; import AbstractSeries from './abstract-series'; diff --git a/packages/react-vis/src/plot/vertical-grid-lines.js b/packages/react-vis/src/plot/vertical-grid-lines.js index 05677b4b3..f091f1aa2 100644 --- a/packages/react-vis/src/plot/vertical-grid-lines.js +++ b/packages/react-vis/src/plot/vertical-grid-lines.js @@ -22,8 +22,8 @@ import React from 'react'; import PropTypes from 'prop-types'; -import GridLines from 'plot/grid-lines'; -import {DIRECTION} from 'utils/axis-utils'; +import GridLines from '~/plot/grid-lines'; +import {DIRECTION} from '~/utils/axis-utils'; const {VERTICAL} = DIRECTION; diff --git a/packages/react-vis/src/plot/voronoi.js b/packages/react-vis/src/plot/voronoi.js index 6552cf780..3e1570e03 100644 --- a/packages/react-vis/src/plot/voronoi.js +++ b/packages/react-vis/src/plot/voronoi.js @@ -2,8 +2,8 @@ import React from 'react'; import PropTypes from 'prop-types'; import {voronoi} from 'd3-voronoi'; -import {getAttributeFunctor} from 'utils/scales-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; +import {getAttributeFunctor} from '~/utils/scales-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; const NOOP = f => f; diff --git a/packages/react-vis/src/plot/xy-plot.js b/packages/react-vis/src/plot/xy-plot.js index ccb503c5a..2ccca8785 100644 --- a/packages/react-vis/src/plot/xy-plot.js +++ b/packages/react-vis/src/plot/xy-plot.js @@ -22,31 +22,31 @@ import React from 'react'; import PropTypes from 'prop-types'; import equal from 'deep-equal'; -import {getCombinedClassName} from 'utils/styling-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; import { extractScalePropsFromProps, getMissingScaleProps, getOptionalScaleProps, getXYPlotValues -} from 'utils/scales-utils'; +} from '~/utils/scales-utils'; import { getStackedData, getSeriesChildren, getSeriesPropsFromChildren -} from 'utils/series-utils'; +} from '~/utils/series-utils'; import { getInnerDimensions, MarginPropType, DEFAULT_MARGINS -} from 'utils/chart-utils'; -import {AnimationPropType} from 'animation'; +} from '~/utils/chart-utils'; +import {AnimationPropType} from '~/animation'; import { CONTINUOUS_COLOR_RANGE, EXTENDED_DISCRETE_COLOR_RANGE, SIZE_RANGE, OPACITY_TYPE -} from 'theme'; +} from '~/theme'; import CanvasWrapper from './series/canvas-wrapper'; diff --git a/packages/react-vis/src/radar-chart/index.js b/packages/react-vis/src/radar-chart/index.js index 5a65546af..d9bb3da5e 100644 --- a/packages/react-vis/src/radar-chart/index.js +++ b/packages/react-vis/src/radar-chart/index.js @@ -23,15 +23,15 @@ import PropTypes from 'prop-types'; import {scaleLinear} from 'd3-scale'; import {format} from 'd3-format'; -import {AnimationPropType} from 'animation'; -import XYPlot from 'plot/xy-plot'; -import {DISCRETE_COLOR_RANGE} from 'theme'; -import {MarginPropType} from 'utils/chart-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; -import MarkSeries from 'plot/series/mark-series'; -import PolygonSeries from 'plot/series/polygon-series'; -import LabelSeries from 'plot/series/label-series'; -import DecorativeAxis from 'plot/axis/decorative-axis'; +import {AnimationPropType} from '~/animation'; +import XYPlot from '~/plot/xy-plot'; +import {DISCRETE_COLOR_RANGE} from '~/theme'; +import {MarginPropType} from '~/utils/chart-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; +import MarkSeries from '~/plot/series/mark-series'; +import PolygonSeries from '~/plot/series/polygon-series'; +import LabelSeries from '~/plot/series/label-series'; +import DecorativeAxis from '~/plot/axis/decorative-axis'; const predefinedClassName = 'rv-radar-chart'; const DEFAULT_FORMAT = format('.2r'); diff --git a/packages/react-vis/src/radial-chart/index.js b/packages/react-vis/src/radial-chart/index.js index c5e9fb051..c5517915a 100644 --- a/packages/react-vis/src/radial-chart/index.js +++ b/packages/react-vis/src/radial-chart/index.js @@ -22,14 +22,14 @@ import React from 'react'; import PropTypes from 'prop-types'; import {pie as pieBuilder} from 'd3-shape'; -import {AnimationPropType} from 'animation'; -import ArcSeries from 'plot/series/arc-series'; -import LabelSeries from 'plot/series/label-series'; -import XYPlot from 'plot/xy-plot'; -import {DISCRETE_COLOR_RANGE} from 'theme'; -import {MarginPropType, getRadialLayoutMargin} from 'utils/chart-utils'; -import {getRadialDomain} from 'utils/series-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; +import {AnimationPropType} from '~/animation'; +import ArcSeries from '~/plot/series/arc-series'; +import LabelSeries from '~/plot/series/label-series'; +import XYPlot from '~/plot/xy-plot'; +import {DISCRETE_COLOR_RANGE} from '~/theme'; +import {MarginPropType, getRadialLayoutMargin} from '~/utils/chart-utils'; +import {getRadialDomain} from '~/utils/series-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; const predefinedClassName = 'rv-radial-chart'; diff --git a/packages/react-vis/src/sankey/index.js b/packages/react-vis/src/sankey/index.js index 63469d392..fd39930a6 100644 --- a/packages/react-vis/src/sankey/index.js +++ b/packages/react-vis/src/sankey/index.js @@ -8,14 +8,14 @@ import { sankeyCenter, sankeyJustify } from 'd3-sankey'; -import XYPlot from 'plot/xy-plot'; +import XYPlot from '~/plot/xy-plot'; -import {MarginPropType, getInnerDimensions} from 'utils/chart-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; -import VerticalRectSeries from 'plot/series/vertical-rect-series'; -import LabelSeries from 'plot/series/label-series'; -import Voronoi from 'plot/voronoi'; -import {DISCRETE_COLOR_RANGE} from 'theme'; +import {MarginPropType, getInnerDimensions} from '~/utils/chart-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; +import VerticalRectSeries from '~/plot/series/vertical-rect-series'; +import LabelSeries from '~/plot/series/label-series'; +import Voronoi from '~/plot/voronoi'; +import {DISCRETE_COLOR_RANGE} from '~/theme'; import SankeyLink from './sankey-link'; const NOOP = f => f; diff --git a/packages/react-vis/src/sankey/sankey-link.js b/packages/react-vis/src/sankey/sankey-link.js index 619d22eba..44f6dbf18 100644 --- a/packages/react-vis/src/sankey/sankey-link.js +++ b/packages/react-vis/src/sankey/sankey-link.js @@ -19,9 +19,9 @@ // THE SOFTWARE. import React from 'react'; -import {DISCRETE_COLOR_RANGE} from 'theme'; -import Animation from 'animation'; -import {ANIMATED_SERIES_PROPS} from 'utils/series-utils'; +import {DISCRETE_COLOR_RANGE} from '~/theme'; +import Animation from '~/animation'; +import {ANIMATED_SERIES_PROPS} from '~/utils/series-utils'; const DEFAULT_LINK_COLOR = DISCRETE_COLOR_RANGE[1]; const DEFAULT_LINK_OPACITY = 0.7; diff --git a/packages/react-vis/src/sunburst/index.js b/packages/react-vis/src/sunburst/index.js index 359a628a6..00750c2f8 100644 --- a/packages/react-vis/src/sunburst/index.js +++ b/packages/react-vis/src/sunburst/index.js @@ -23,13 +23,13 @@ import PropTypes from 'prop-types'; import {hierarchy, partition} from 'd3-hierarchy'; import {scaleLinear, scaleSqrt} from 'd3-scale'; -import {AnimationPropType} from 'animation'; -import LabelSeries from 'plot/series/label-series'; -import ArcSeries from 'plot/series/arc-series'; -import XYPlot from 'plot/xy-plot'; -import {getRadialDomain} from 'utils/series-utils'; -import {getRadialLayoutMargin} from 'utils/chart-utils'; -import {getCombinedClassName} from 'utils/styling-utils'; +import {AnimationPropType} from '~/animation'; +import LabelSeries from '~/plot/series/label-series'; +import ArcSeries from '~/plot/series/arc-series'; +import XYPlot from '~/plot/xy-plot'; +import {getRadialDomain} from '~/utils/series-utils'; +import {getRadialLayoutMargin} from '~/utils/chart-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; const predefinedClassName = 'rv-sunburst'; diff --git a/packages/react-vis/src/treemap/index.js b/packages/react-vis/src/treemap/index.js index 2badb12d4..7f9905802 100644 --- a/packages/react-vis/src/treemap/index.js +++ b/packages/react-vis/src/treemap/index.js @@ -38,10 +38,10 @@ import { DEFAULT_COLOR, DEFAULT_OPACITY, OPACITY_TYPE -} from 'theme'; -import {AnimationPropType} from 'animation'; -import {getAttributeFunctor, getMissingScaleProps} from 'utils/scales-utils'; -import {MarginPropType, getInnerDimensions} from 'utils/chart-utils'; +} from '~/theme'; +import {AnimationPropType} from '~/animation'; +import {getAttributeFunctor, getMissingScaleProps} from '~/utils/scales-utils'; +import {MarginPropType, getInnerDimensions} from '~/utils/chart-utils'; import TreemapDOM from './treemap-dom'; import TreemapSVG from './treemap-svg'; diff --git a/packages/react-vis/src/treemap/treemap-dom.js b/packages/react-vis/src/treemap/treemap-dom.js index 6becf2922..90a39faab 100644 --- a/packages/react-vis/src/treemap/treemap-dom.js +++ b/packages/react-vis/src/treemap/treemap-dom.js @@ -20,7 +20,7 @@ import React from 'react'; import TreemapLeaf from './treemap-leaf'; -import {getCombinedClassName} from 'utils/styling-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; function TreemapDOM(props) { const { diff --git a/packages/react-vis/src/treemap/treemap-leaf.js b/packages/react-vis/src/treemap/treemap-leaf.js index 899f0c9d6..c21eeb91c 100644 --- a/packages/react-vis/src/treemap/treemap-leaf.js +++ b/packages/react-vis/src/treemap/treemap-leaf.js @@ -22,8 +22,8 @@ import React from 'react'; import PropTypes from 'prop-types'; -import Animation, {AnimationPropType} from 'animation'; -import {getFontColorFromBackground} from 'utils/scales-utils'; +import Animation, {AnimationPropType} from '~/animation'; +import {getFontColorFromBackground} from '~/utils/scales-utils'; const ANIMATED_PROPS = [ 'colorRange', diff --git a/packages/react-vis/src/treemap/treemap-svg.js b/packages/react-vis/src/treemap/treemap-svg.js index 9754bec56..f338b6bce 100644 --- a/packages/react-vis/src/treemap/treemap-svg.js +++ b/packages/react-vis/src/treemap/treemap-svg.js @@ -20,11 +20,11 @@ import React from 'react'; -import XYPlot from 'plot/xy-plot'; -import PolygonSeries from 'plot/series/polygon-series'; -import MarkSeries from 'plot/series/mark-series'; -import LabelSeries from 'plot/series/label-series'; -import {getCombinedClassName} from 'utils/styling-utils'; +import XYPlot from '~/plot/xy-plot'; +import PolygonSeries from '~/plot/series/polygon-series'; +import MarkSeries from '~/plot/series/mark-series'; +import LabelSeries from '~/plot/series/label-series'; +import {getCombinedClassName} from '~/utils/styling-utils'; const MARGIN_ADJUST = 1.2; diff --git a/packages/react-vis/src/utils/series-utils.js b/packages/react-vis/src/utils/series-utils.js index 0e0f687fc..492acea8f 100644 --- a/packages/react-vis/src/utils/series-utils.js +++ b/packages/react-vis/src/utils/series-utils.js @@ -20,8 +20,8 @@ import React from 'react'; -import AbstractSeries from 'plot/series/abstract-series'; -import {DISCRETE_COLOR_RANGE, DEFAULT_OPACITY} from 'theme'; +import AbstractSeries from '~/plot/series/abstract-series'; +import {DISCRETE_COLOR_RANGE, DEFAULT_OPACITY} from '~/theme'; /** * Check if the component is series or not. diff --git a/packages/react-vis/tests/components.js b/packages/react-vis/tests/components.js index 1c1207374..d11df1121 100644 --- a/packages/react-vis/tests/components.js +++ b/packages/react-vis/tests/components.js @@ -18,10 +18,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -import HorizontalGrid from 'plot/horizontal-grid-lines'; -import VerticalGrid from 'plot/vertical-grid-lines'; -import XAxisBottom from 'plot/axis/x-axis'; -import YAxisLeft from 'plot/axis/y-axis'; +import HorizontalGrid from '~/plot/horizontal-grid-lines'; +import VerticalGrid from '~/plot/vertical-grid-lines'; +import XAxisBottom from '~/plot/axis/x-axis'; +import YAxisLeft from '~/plot/axis/y-axis'; import {testRenderWithProps} from './test-utils'; diff --git a/packages/react-vis/tests/components/animation.test.js b/packages/react-vis/tests/components/animation.test.js index d5a82623c..c45e575dc 100644 --- a/packages/react-vis/tests/components/animation.test.js +++ b/packages/react-vis/tests/components/animation.test.js @@ -21,11 +21,11 @@ import React from 'react'; import {mount} from 'enzyme'; -import Animation from 'animation'; -import Axis from 'plot/axis/axis'; -import AxisTicks from 'plot/axis/axis-ticks'; -import VerticalBarSeries from 'plot/series/vertical-bar-series'; -import XYPlot from 'plot/xy-plot'; +import Animation from '~/animation'; +import Axis from '~/plot/axis/axis'; +import AxisTicks from '~/plot/axis/axis-ticks'; +import VerticalBarSeries from '~/plot/series/vertical-bar-series'; +import XYPlot from '~/plot/xy-plot'; describe('Animation', () => { test('interpolates xDomain when specified', () => { diff --git a/packages/react-vis/tests/components/arc-series.test.js b/packages/react-vis/tests/components/arc-series.test.js index 26cbc3c0b..663e1fcb7 100644 --- a/packages/react-vis/tests/components/arc-series.test.js +++ b/packages/react-vis/tests/components/arc-series.test.js @@ -1,6 +1,6 @@ import React from 'react'; import {mount} from 'enzyme'; -import ArcSeries from 'plot/series/arc-series'; +import ArcSeries from '~/plot/series/arc-series'; import {testRenderWithProps, GENERIC_XYPLOT_SERIES_PROPS} from '../test-utils'; import ArcSeriesExample from '../../../showcase/radial-chart/arc-series-example'; diff --git a/packages/react-vis/tests/components/area-series.test.js b/packages/react-vis/tests/components/area-series.test.js index 993d488e3..e202fff0f 100644 --- a/packages/react-vis/tests/components/area-series.test.js +++ b/packages/react-vis/tests/components/area-series.test.js @@ -1,8 +1,8 @@ import React from 'react'; import {mount} from 'enzyme'; -import XYPlot from 'plot/xy-plot'; -import AreaSeries from 'plot/series/area-series'; +import XYPlot from '~/plot/xy-plot'; +import AreaSeries from '~/plot/series/area-series'; import {testRenderWithProps, GENERIC_XYPLOT_SERIES_PROPS} from '../test-utils'; import AreaChartElevated from '../../../showcase/plot/area-chart-elevated'; import AreaChart from '../../../showcase/plot/area-chart'; diff --git a/packages/react-vis/tests/components/axis-title.test.js b/packages/react-vis/tests/components/axis-title.test.js index 6b83119ec..bbfe41736 100644 --- a/packages/react-vis/tests/components/axis-title.test.js +++ b/packages/react-vis/tests/components/axis-title.test.js @@ -1,7 +1,7 @@ import React from 'react'; import {mount} from 'enzyme'; -import AxisTitle from 'plot/axis/axis-title'; -import {ORIENTATION} from 'utils/axis-utils'; +import AxisTitle from '~/plot/axis/axis-title'; +import {ORIENTATION} from '~/utils/axis-utils'; const {LEFT, RIGHT, TOP, BOTTOM} = ORIENTATION; diff --git a/packages/react-vis/tests/components/bar-series.test.js b/packages/react-vis/tests/components/bar-series.test.js index 319a51ce8..d494959bf 100644 --- a/packages/react-vis/tests/components/bar-series.test.js +++ b/packages/react-vis/tests/components/bar-series.test.js @@ -1,8 +1,8 @@ import React from 'react'; import {mount} from 'enzyme'; -import XYPlot from 'plot/xy-plot'; -import HorizontalBarSeries from 'plot/series/horizontal-bar-series'; -import VerticalBarSeries from 'plot/series/vertical-bar-series'; +import XYPlot from '~/plot/xy-plot'; +import HorizontalBarSeries from '~/plot/series/horizontal-bar-series'; +import VerticalBarSeries from '~/plot/series/vertical-bar-series'; import {testRenderWithProps, GENERIC_XYPLOT_SERIES_PROPS} from '../test-utils'; import StackedHorizontalBarChart from '../../../showcase/plot/stacked-horizontal-bar-chart'; import StackedVerticalBarChart from '../../../showcase/plot/stacked-vertical-bar-chart'; diff --git a/packages/react-vis/tests/components/borders.test.js b/packages/react-vis/tests/components/borders.test.js index 5572886af..1513f97ad 100644 --- a/packages/react-vis/tests/components/borders.test.js +++ b/packages/react-vis/tests/components/borders.test.js @@ -1,6 +1,6 @@ import React from 'react'; import {mount} from 'enzyme'; -import Borders from 'plot/borders'; +import Borders from '~/plot/borders'; import {testRenderWithProps, GENERIC_XYPLOT_SERIES_PROPS} from '../test-utils'; import GradientExample from '../../../showcase/misc/gradient-example'; diff --git a/packages/react-vis/tests/components/canvas-component.test.js b/packages/react-vis/tests/components/canvas-component.test.js index 5e17a42fa..bc649de6e 100644 --- a/packages/react-vis/tests/components/canvas-component.test.js +++ b/packages/react-vis/tests/components/canvas-component.test.js @@ -1,9 +1,9 @@ -import HorizontalBarSeriesCanvas from 'plot/series/horizontal-bar-series-canvas'; -import VerticalBarSeriesCanvas from 'plot/series/vertical-bar-series-canvas'; -import HorizontalRectSeriesCanvas from 'plot/series/horizontal-rect-series-canvas'; -import VerticalRectSeriesCanvas from 'plot/series/vertical-rect-series-canvas'; -import RectSeriesCanvas from 'plot/series/rect-series-canvas'; -import BarSeriesCanvas from 'plot/series/bar-series-canvas'; +import HorizontalBarSeriesCanvas from '~/plot/series/horizontal-bar-series-canvas'; +import VerticalBarSeriesCanvas from '~/plot/series/vertical-bar-series-canvas'; +import HorizontalRectSeriesCanvas from '~/plot/series/horizontal-rect-series-canvas'; +import VerticalRectSeriesCanvas from '~/plot/series/vertical-rect-series-canvas'; +import RectSeriesCanvas from '~/plot/series/rect-series-canvas'; +import BarSeriesCanvas from '~/plot/series/bar-series-canvas'; import {testRenderWithProps, GENERIC_XYPLOT_SERIES_PROPS} from '../test-utils'; testRenderWithProps(HorizontalBarSeriesCanvas, GENERIC_XYPLOT_SERIES_PROPS); diff --git a/packages/react-vis/tests/components/circular-grid-lines.test.js b/packages/react-vis/tests/components/circular-grid-lines.test.js index 7af6c1af2..0dd2d85e6 100644 --- a/packages/react-vis/tests/components/circular-grid-lines.test.js +++ b/packages/react-vis/tests/components/circular-grid-lines.test.js @@ -1,6 +1,6 @@ import React from 'react'; import {mount} from 'enzyme'; -import CircularGridLines from 'plot/circular-grid-lines'; +import CircularGridLines from '~/plot/circular-grid-lines'; import {testRenderWithProps, GENERIC_XYPLOT_SERIES_PROPS} from '../test-utils'; import FauxRadialScatterplot from '../../../showcase/plot/faux-radial-scatterplot'; diff --git a/packages/react-vis/tests/components/contour-series.test.js b/packages/react-vis/tests/components/contour-series.test.js index 2b620b599..1937db4e6 100644 --- a/packages/react-vis/tests/components/contour-series.test.js +++ b/packages/react-vis/tests/components/contour-series.test.js @@ -1,6 +1,6 @@ import React from 'react'; import {mount} from 'enzyme'; -import ContourSeries from 'plot/series/contour-series'; +import ContourSeries from '~/plot/series/contour-series'; import {testRenderWithProps, GENERIC_XYPLOT_SERIES_PROPS} from '../test-utils'; import ContourSeriesExample from '../../../showcase/plot/contour-series-example'; diff --git a/packages/react-vis/tests/components/custom-svg-series.test.js b/packages/react-vis/tests/components/custom-svg-series.test.js index 92cb61edc..0a13a74fb 100644 --- a/packages/react-vis/tests/components/custom-svg-series.test.js +++ b/packages/react-vis/tests/components/custom-svg-series.test.js @@ -1,6 +1,6 @@ import React from 'react'; import {mount} from 'enzyme'; -import CustomSVGSeries from 'plot/series/custom-svg-series'; +import CustomSVGSeries from '~/plot/series/custom-svg-series'; import {testRenderWithProps, GENERIC_XYPLOT_SERIES_PROPS} from '../test-utils'; import CustomSVGExample from '../../../showcase/plot/custom-svg-example'; import CustomSVGAllTheMarks from '../../../showcase/plot/custom-svg-all-the-marks'; diff --git a/packages/react-vis/tests/components/decorative-axis.test.js b/packages/react-vis/tests/components/decorative-axis.test.js index 6ae3d2f89..f318fb190 100644 --- a/packages/react-vis/tests/components/decorative-axis.test.js +++ b/packages/react-vis/tests/components/decorative-axis.test.js @@ -1,6 +1,6 @@ import React from 'react'; import {mount} from 'enzyme'; -import DecorativeAxis from 'plot/axis/decorative-axis'; +import DecorativeAxis from '~/plot/axis/decorative-axis'; import {testRenderWithProps, GENERIC_XYPLOT_SERIES_PROPS} from '../test-utils'; import DecorativeAxisCrissCross from '../../../showcase/axes/decorative-axes-criss-cross'; import ParallelCoordinatesExample from '../../../showcase/axes/parallel-coordinates-example'; diff --git a/packages/react-vis/tests/components/gradient.test.js b/packages/react-vis/tests/components/gradient.test.js index ed31778ef..c2cdfc985 100644 --- a/packages/react-vis/tests/components/gradient.test.js +++ b/packages/react-vis/tests/components/gradient.test.js @@ -1,6 +1,6 @@ import React from 'react'; import {mount} from 'enzyme'; -import GradientDefs from 'plot/gradient-defs'; +import GradientDefs from '~/plot/gradient-defs'; import {testRenderWithProps, GENERIC_XYPLOT_SERIES_PROPS} from '../test-utils'; import TriangleExample from '../../../showcase/misc/triangle-example'; import GradientExample from '../../../showcase/misc/gradient-example'; diff --git a/packages/react-vis/tests/components/grid-lines.test.js b/packages/react-vis/tests/components/grid-lines.test.js index bd265c507..9d4fed224 100644 --- a/packages/react-vis/tests/components/grid-lines.test.js +++ b/packages/react-vis/tests/components/grid-lines.test.js @@ -1,9 +1,9 @@ import React from 'react'; import {shallow} from 'enzyme'; -import XYPlot from 'plot/xy-plot'; -import LineSeries from 'plot/series/line-series'; -import HorizontalGridLines from 'plot/horizontal-grid-lines'; -import VerticalGridLines from 'plot/vertical-grid-lines'; +import XYPlot from '~/plot/xy-plot'; +import LineSeries from '~/plot/series/line-series'; +import HorizontalGridLines from '~/plot/horizontal-grid-lines'; +import VerticalGridLines from '~/plot/vertical-grid-lines'; describe('GridLines', () => { test('HorizontalGridLines', () => { diff --git a/packages/react-vis/tests/components/heatmap.test.js b/packages/react-vis/tests/components/heatmap.test.js index 72109a0af..fc63326cf 100644 --- a/packages/react-vis/tests/components/heatmap.test.js +++ b/packages/react-vis/tests/components/heatmap.test.js @@ -1,7 +1,7 @@ import React from 'react'; import {mount} from 'enzyme'; -import XYPlot from 'plot/xy-plot'; -import HeatmapSeries from 'plot/series/heatmap-series'; +import XYPlot from '~/plot/xy-plot'; +import HeatmapSeries from '~/plot/series/heatmap-series'; import {testRenderWithProps, GENERIC_XYPLOT_SERIES_PROPS} from '../test-utils'; import HeatmapChart from '../../../showcase/plot/heatmap-chart'; import LabeledHeatmap from '../../../showcase/plot/labeled-heatmap'; diff --git a/packages/react-vis/tests/components/hexbin-series.test.js b/packages/react-vis/tests/components/hexbin-series.test.js index 61f855a01..ca375d88e 100644 --- a/packages/react-vis/tests/components/hexbin-series.test.js +++ b/packages/react-vis/tests/components/hexbin-series.test.js @@ -1,6 +1,6 @@ import React from 'react'; import {mount} from 'enzyme'; -import HexbinSeries from 'plot/series/hexbin-series'; +import HexbinSeries from '~/plot/series/hexbin-series'; import {testRenderWithProps, GENERIC_XYPLOT_SERIES_PROPS} from '../test-utils'; import HexHeatmap from '../../../showcase/plot/hex-heatmap'; import HexbinSizeExample from '../../../showcase/plot/hexbin-size-example'; diff --git a/packages/react-vis/tests/components/highlight.test.js b/packages/react-vis/tests/components/highlight.test.js index a9f589203..9e952b885 100644 --- a/packages/react-vis/tests/components/highlight.test.js +++ b/packages/react-vis/tests/components/highlight.test.js @@ -1,6 +1,6 @@ import React from 'react'; import {mount} from 'enzyme'; -import Highlight from 'plot/highlight'; +import Highlight from '~/plot/highlight'; import DragableExample from '../../../showcase/misc/dragable-chart-example'; import ZoomableChartExample from '../../../showcase/misc/zoomable-chart-example'; import SelectionPlotExample from '../../../showcase/misc/selection-plot-example'; diff --git a/packages/react-vis/tests/components/hints.test.js b/packages/react-vis/tests/components/hints.test.js index 395ab20ef..379f3a87d 100644 --- a/packages/react-vis/tests/components/hints.test.js +++ b/packages/react-vis/tests/components/hints.test.js @@ -1,6 +1,6 @@ import React from 'react'; import {shallow} from 'enzyme'; -import Hint from 'plot/hint'; +import Hint from '~/plot/hint'; describe('Hint', () => { test('Appends user-input class name to the class signatures list', () => { diff --git a/packages/react-vis/tests/components/label-series.test.js b/packages/react-vis/tests/components/label-series.test.js index 055190965..f78a585f7 100644 --- a/packages/react-vis/tests/components/label-series.test.js +++ b/packages/react-vis/tests/components/label-series.test.js @@ -1,6 +1,6 @@ import React from 'react'; import {mount} from 'enzyme'; -import LabelSeries from 'plot/series/label-series'; +import LabelSeries from '~/plot/series/label-series'; import {testRenderWithProps, GENERIC_XYPLOT_SERIES_PROPS} from '../test-utils'; import LabelSeriesExample from '../../../showcase/misc/label-series-example'; import LabeledStackedVerticalBarChart from '../../../showcase/plot/labeled-stacked-vertical-bar-chart'; diff --git a/packages/react-vis/tests/components/line-series-canvas.test.js b/packages/react-vis/tests/components/line-series-canvas.test.js index feef794e3..4b3b61ca0 100644 --- a/packages/react-vis/tests/components/line-series-canvas.test.js +++ b/packages/react-vis/tests/components/line-series-canvas.test.js @@ -1,7 +1,7 @@ import React from 'react'; import {mount} from 'enzyme'; -import XYPlot from 'plot/xy-plot'; -import LineSeriesCanvas from 'plot/series/line-series-canvas'; +import XYPlot from '~/plot/xy-plot'; +import LineSeriesCanvas from '~/plot/series/line-series-canvas'; describe('LineSeriesCanvas', () => { test('should be rendered', () => { diff --git a/packages/react-vis/tests/components/line-series.test.js b/packages/react-vis/tests/components/line-series.test.js index f4261dafe..26c465d25 100644 --- a/packages/react-vis/tests/components/line-series.test.js +++ b/packages/react-vis/tests/components/line-series.test.js @@ -1,7 +1,7 @@ import React from 'react'; import {mount} from 'enzyme'; -import XYPlot from 'plot/xy-plot'; -import LineSeries from 'plot/series/line-series'; +import XYPlot from '~/plot/xy-plot'; +import LineSeries from '~/plot/series/line-series'; import {testRenderWithProps, GENERIC_XYPLOT_SERIES_PROPS} from '../test-utils'; import LineChart from '../../../showcase/plot/line-chart'; import LineMarkSeries from '../../../showcase/plot/linemark-chart'; diff --git a/packages/react-vis/tests/components/make-vis-flexible.test.js b/packages/react-vis/tests/components/make-vis-flexible.test.js index 6e9a79f35..187296fa9 100644 --- a/packages/react-vis/tests/components/make-vis-flexible.test.js +++ b/packages/react-vis/tests/components/make-vis-flexible.test.js @@ -1,4 +1,4 @@ -import {makeWidthFlexible} from 'make-vis-flexible'; +import {makeWidthFlexible} from '~/make-vis-flexible'; describe('makeWidthFlexible', () => { test('displayName given', () => { diff --git a/packages/react-vis/tests/components/mark-series.test.js b/packages/react-vis/tests/components/mark-series.test.js index 60cd6e8aa..afcae585c 100644 --- a/packages/react-vis/tests/components/mark-series.test.js +++ b/packages/react-vis/tests/components/mark-series.test.js @@ -1,6 +1,6 @@ import React from 'react'; import {mount} from 'enzyme'; -import MarkSeries from 'plot/series/mark-series'; +import MarkSeries from '~/plot/series/mark-series'; import {testRenderWithProps, GENERIC_XYPLOT_SERIES_PROPS} from '../test-utils'; import Scatterplot from '../../../showcase/plot/scatterplot'; import DynamicCrosshairScatterplot from '../../../showcase/axes/dynamic-crosshair-scatterplot'; diff --git a/packages/react-vis/tests/components/parallel-coordinates.test.js b/packages/react-vis/tests/components/parallel-coordinates.test.js index 27b2e23e5..70a3f76ae 100644 --- a/packages/react-vis/tests/components/parallel-coordinates.test.js +++ b/packages/react-vis/tests/components/parallel-coordinates.test.js @@ -1,6 +1,6 @@ import React from 'react'; import {mount} from 'enzyme'; -import ParallelCoordinates from 'parallel-coordinates'; +import ParallelCoordinates from '~/parallel-coordinates'; import BasicParallelCoordinates from '../../../showcase/parallel-coordinates/basic-parallel-coordinates'; import AnimatedParallelCoordinates from '../../../showcase/parallel-coordinates/animated-parallel-coordinates'; import BrushedParallelCoordinates from '../../../showcase/parallel-coordinates/brushed-parallel-coordinates'; diff --git a/packages/react-vis/tests/components/polygon-series.test.js b/packages/react-vis/tests/components/polygon-series.test.js index c751b9352..7e7ac6ee6 100644 --- a/packages/react-vis/tests/components/polygon-series.test.js +++ b/packages/react-vis/tests/components/polygon-series.test.js @@ -1,6 +1,6 @@ import React from 'react'; import {mount} from 'enzyme'; -import PolygonSeries from 'plot/series/mark-series'; +import PolygonSeries from '~/plot/series/mark-series'; import {testRenderWithProps, GENERIC_XYPLOT_SERIES_PROPS} from '../test-utils'; import TriangleExample from '../../../showcase/misc/triangle-example'; diff --git a/packages/react-vis/tests/components/radar-chart.test.js b/packages/react-vis/tests/components/radar-chart.test.js index 63acb0fdc..d1a5ee0a7 100644 --- a/packages/react-vis/tests/components/radar-chart.test.js +++ b/packages/react-vis/tests/components/radar-chart.test.js @@ -1,6 +1,6 @@ import React from 'react'; import {mount} from 'enzyme'; -import RadialChart from 'radial-chart'; +import RadialChart from '~/radial-chart'; import BasicRadarChart from '../../../showcase/radar-chart/basic-radar-chart'; import AnimatedRadarChart from '../../../showcase/radar-chart/animated-radar-chart'; import FourQuadrantRadarChart from '../../../showcase/radar-chart/four-quadrant-radar-chart'; diff --git a/packages/react-vis/tests/components/radial.test.js b/packages/react-vis/tests/components/radial.test.js index a9caafc17..e6a66e4af 100644 --- a/packages/react-vis/tests/components/radial.test.js +++ b/packages/react-vis/tests/components/radial.test.js @@ -1,6 +1,6 @@ import React from 'react'; import {mount} from 'enzyme'; -import RadialChart from 'radial-chart'; +import RadialChart from '~/radial-chart'; import SimpleRadialChart from '../../../showcase/radial-chart/simple-radial-chart'; import DonutChart from '../../../showcase/radial-chart/donut-chart'; import CustomRadiusRadialChart from '../../../showcase/radial-chart/custom-radius-radial-chart'; diff --git a/packages/react-vis/tests/components/rect-series.test.js b/packages/react-vis/tests/components/rect-series.test.js index e105d9a1f..abdda7dc6 100644 --- a/packages/react-vis/tests/components/rect-series.test.js +++ b/packages/react-vis/tests/components/rect-series.test.js @@ -1,7 +1,7 @@ import React from 'react'; import {mount} from 'enzyme'; -import HorizontalRectSeries from 'plot/series/horizontal-bar-series'; -import VerticalRectSeries from 'plot/series/vertical-bar-series'; +import HorizontalRectSeries from '~/plot/series/horizontal-bar-series'; +import VerticalRectSeries from '~/plot/series/vertical-bar-series'; import {testRenderWithProps, GENERIC_XYPLOT_SERIES_PROPS} from '../test-utils'; import Histogram from '../../../showcase/plot/histogram'; import StackedHistogram from '../../../showcase/plot/stacked-histogram'; diff --git a/packages/react-vis/tests/components/sankey.test.js b/packages/react-vis/tests/components/sankey.test.js index a5ee1055f..b67917bd6 100644 --- a/packages/react-vis/tests/components/sankey.test.js +++ b/packages/react-vis/tests/components/sankey.test.js @@ -1,8 +1,8 @@ import React from 'react'; import {mount} from 'enzyme'; -import Sankey from 'sankey'; -import Hint from 'plot/hint'; +import Sankey from '~/sankey'; +import Hint from '~/plot/hint'; import BasicSankey from '../../../showcase/sankey/basic'; import VoronoiSankey from '../../../showcase/sankey/voronoi'; import EnergySankey from '../../../showcase/sankey/energy-sankey'; diff --git a/packages/react-vis/tests/components/sunburst.test.js b/packages/react-vis/tests/components/sunburst.test.js index 0f6b27470..8054107ee 100644 --- a/packages/react-vis/tests/components/sunburst.test.js +++ b/packages/react-vis/tests/components/sunburst.test.js @@ -1,6 +1,6 @@ import React from 'react'; import {mount} from 'enzyme'; -import Sunburst from 'sunburst'; +import Sunburst from '~/sunburst'; import BasicSunburst from '../../../showcase/sunbursts/basic-sunburst'; import SunburstWithTooltips from '../../../showcase/sunbursts/sunburst-with-tooltips'; import AnimatedSunburst from '../../../showcase/sunbursts/animated-sunburst'; diff --git a/packages/react-vis/tests/components/treemap.test.js b/packages/react-vis/tests/components/treemap.test.js index 71ef792bc..aa212010a 100644 --- a/packages/react-vis/tests/components/treemap.test.js +++ b/packages/react-vis/tests/components/treemap.test.js @@ -1,6 +1,6 @@ import React from 'react'; import {mount} from 'enzyme'; -import Treemap from 'treemap'; +import Treemap from '~/treemap'; import SimpleTreemap from '../../../showcase/treemap/simple-treemap'; import DynamicTreemap from '../../../showcase/treemap/dynamic-treemap'; diff --git a/packages/react-vis/tests/components/voronoi.test.js b/packages/react-vis/tests/components/voronoi.test.js index 801118ef3..12363448a 100644 --- a/packages/react-vis/tests/components/voronoi.test.js +++ b/packages/react-vis/tests/components/voronoi.test.js @@ -1,7 +1,7 @@ import React from 'react'; import {mount} from 'enzyme'; import Voronoi from '../../src/plot/voronoi.js'; -import XYPlot from 'plot/xy-plot'; +import XYPlot from '~/plot/xy-plot'; import VoronoiLineChart from '../../../showcase/misc/voronoi-line-chart'; diff --git a/packages/react-vis/tests/components/whisker-series.test.js b/packages/react-vis/tests/components/whisker-series.test.js index 0a15564b8..9d5d7a1af 100644 --- a/packages/react-vis/tests/components/whisker-series.test.js +++ b/packages/react-vis/tests/components/whisker-series.test.js @@ -1,6 +1,6 @@ import React from 'react'; import {mount} from 'enzyme'; -import WhiskerSeries from 'plot/series/whisker-series'; +import WhiskerSeries from '~/plot/series/whisker-series'; import {testRenderWithProps, GENERIC_XYPLOT_SERIES_PROPS} from '../test-utils'; import WhiskerChart from '../../../showcase/plot/whisker-chart'; diff --git a/packages/react-vis/tests/components/xy-plot.test.js b/packages/react-vis/tests/components/xy-plot.test.js index 5e6ee3c83..b3c7b27c0 100644 --- a/packages/react-vis/tests/components/xy-plot.test.js +++ b/packages/react-vis/tests/components/xy-plot.test.js @@ -21,13 +21,13 @@ import React from 'react'; import {mount, shallow} from 'enzyme'; -import AbstractSeries from 'plot/series/abstract-series'; -import VerticalBarSeries from 'plot/series/vertical-bar-series'; -import BarSeries from 'plot/series/bar-series'; -import LineSeries from 'plot/series/line-series'; -import XAxis from 'plot/axis/x-axis'; -import XYPlot from 'plot/xy-plot'; -import HorizontalGridLines from 'plot/horizontal-grid-lines'; +import AbstractSeries from '~/plot/series/abstract-series'; +import VerticalBarSeries from '~/plot/series/vertical-bar-series'; +import BarSeries from '~/plot/series/bar-series'; +import LineSeries from '~/plot/series/line-series'; +import XAxis from '~/plot/axis/x-axis'; +import XYPlot from '~/plot/xy-plot'; +import HorizontalGridLines from '~/plot/horizontal-grid-lines'; import MixedStackedChart from '../../../showcase/plot/mixed-stacked-chart'; import {FlexibleCharts} from '../../../showcase/flexible/flexible-examples'; diff --git a/packages/react-vis/tests/utils/axis-utils.test.js b/packages/react-vis/tests/utils/axis-utils.test.js index 5ec53d752..c7cb46650 100644 --- a/packages/react-vis/tests/utils/axis-utils.test.js +++ b/packages/react-vis/tests/utils/axis-utils.test.js @@ -27,7 +27,7 @@ import { getAxisAngle, generateFit, generatePoints -} from 'utils/axis-utils'; +} from '~/utils/axis-utils'; describe('axis-utils', () => { test('getTicksTotalFromSize', () => { diff --git a/packages/react-vis/tests/utils/chart-utils.test.js b/packages/react-vis/tests/utils/chart-utils.test.js index 9f74f6a56..2b4844ada 100644 --- a/packages/react-vis/tests/utils/chart-utils.test.js +++ b/packages/react-vis/tests/utils/chart-utils.test.js @@ -18,7 +18,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -import {getRadialLayoutMargin} from 'utils/chart-utils'; +import {getRadialLayoutMargin} from '~/utils/chart-utils'; describe('chart-utils', () => { test('getRadialLayoutMargin', () => { diff --git a/packages/react-vis/tests/utils/data-utils.test.js b/packages/react-vis/tests/utils/data-utils.test.js index 6e6747b28..f7268c9ea 100644 --- a/packages/react-vis/tests/utils/data-utils.test.js +++ b/packages/react-vis/tests/utils/data-utils.test.js @@ -22,7 +22,7 @@ import { getUniquePropertyValues, addValueToArray, transformValueToString -} from 'utils/data-utils'; +} from '~/utils/data-utils'; const arr = [{a: 1}, {b: 3, a: 2}, {a: 2}]; diff --git a/packages/react-vis/tests/utils/react-utils.test.js b/packages/react-vis/tests/utils/react-utils.test.js index 845cafb27..23b67911c 100644 --- a/packages/react-vis/tests/utils/react-utils.test.js +++ b/packages/react-vis/tests/utils/react-utils.test.js @@ -1,4 +1,4 @@ -import {isReactDOMSupported} from 'utils/react-utils'; +import {isReactDOMSupported} from '~/utils/react-utils'; describe('react-utils', () => { test('isReactDOMSupported', () => { diff --git a/packages/react-vis/tests/utils/scales-utils.test.js b/packages/react-vis/tests/utils/scales-utils.test.js index 670b02a50..2d0574253 100644 --- a/packages/react-vis/tests/utils/scales-utils.test.js +++ b/packages/react-vis/tests/utils/scales-utils.test.js @@ -35,7 +35,7 @@ import { extractScalePropsFromProps, getMissingScaleProps, literalScale -} from 'utils/scales-utils'; +} from '~/utils/scales-utils'; const isScaleConsistent = (scaleObject, attr) => { return ( diff --git a/packages/react-vis/tests/utils/series-utils.test.js b/packages/react-vis/tests/utils/series-utils.test.js index ede450c40..07fc732e7 100644 --- a/packages/react-vis/tests/utils/series-utils.test.js +++ b/packages/react-vis/tests/utils/series-utils.test.js @@ -26,12 +26,12 @@ import { getSeriesPropsFromChildren, getSeriesChildren, getStackedData -} from 'utils/series-utils'; -import LineSeries from 'plot/series/line-series'; -import XAxis from 'plot/axis/x-axis'; -import HorizontalBarSeries from 'plot/series/horizontal-rect-series'; -import VerticalBarSeries from 'plot/series/vertical-rect-series'; -import LabelSeries from 'plot/series/label-series'; +} from '~/utils/series-utils'; +import LineSeries from '~/plot/series/line-series'; +import XAxis from '~/plot/axis/x-axis'; +import HorizontalBarSeries from '~/plot/series/horizontal-rect-series'; +import VerticalBarSeries from '~/plot/series/vertical-rect-series'; +import LabelSeries from '~/plot/series/label-series'; describe('series-utils', () => { test('isSeriesChild', () => { diff --git a/packages/react-vis/tests/utils/styling-utils.test.js b/packages/react-vis/tests/utils/styling-utils.test.js index ee089de6e..8823e7c9e 100644 --- a/packages/react-vis/tests/utils/styling-utils.test.js +++ b/packages/react-vis/tests/utils/styling-utils.test.js @@ -18,7 +18,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -import {getCombinedClassName} from 'utils/styling-utils'; +import {getCombinedClassName} from '~/utils/styling-utils'; describe('styling-utils', () => { test('getCombinedClassName', () => { diff --git a/packages/showcase/.babelrc.json b/packages/showcase/.babelrc similarity index 100% rename from packages/showcase/.babelrc.json rename to packages/showcase/.babelrc diff --git a/packages/showcase/legends/continuous-color.js b/packages/showcase/legends/continuous-color.js index 4df1be8fd..5e93ae313 100644 --- a/packages/showcase/legends/continuous-color.js +++ b/packages/showcase/legends/continuous-color.js @@ -20,7 +20,7 @@ import React from 'react'; -import ContinuousColorLegend from 'react-vis/legends/continuous-color-legend'; +import {ContinuousColorLegend} from 'react-vis'; export default class Example extends React.Component { constructor(props) { diff --git a/packages/showcase/legends/continuous-size.js b/packages/showcase/legends/continuous-size.js index 286e462d4..9fc24053e 100644 --- a/packages/showcase/legends/continuous-size.js +++ b/packages/showcase/legends/continuous-size.js @@ -20,7 +20,7 @@ import React from 'react'; -import ContinuousSizeLegend from 'react-vis/legends/continuous-size-legend'; +import {ContinuousSizeLegend} from 'react-vis'; export default class Example extends React.Component { constructor(props) { diff --git a/packages/showcase/legends/horizontal-discrete-color.js b/packages/showcase/legends/horizontal-discrete-color.js index 0a484c8b1..ca9bbb7bc 100644 --- a/packages/showcase/legends/horizontal-discrete-color.js +++ b/packages/showcase/legends/horizontal-discrete-color.js @@ -20,8 +20,8 @@ import React from 'react'; -import DiscreteColorLegend from 'react-vis/legends/discrete-color-legend'; -import GradientDefs from 'react-vis/plot/gradient-defs'; +import {DiscreteColorLegend} from 'react-vis'; +import {GradientDefs} from 'react-vis'; const ITEMS = [ {title: 'Dashed', color: '#45aeb1', strokeStyle: 'dashed'}, diff --git a/packages/showcase/legends/horizontal-discrete-custom-palette.js b/packages/showcase/legends/horizontal-discrete-custom-palette.js index b6aca537c..7976abb1f 100644 --- a/packages/showcase/legends/horizontal-discrete-custom-palette.js +++ b/packages/showcase/legends/horizontal-discrete-custom-palette.js @@ -20,7 +20,7 @@ import React, {Component} from 'react'; -import DiscreteColorLegend from 'react-vis/legends/discrete-color-legend'; +import {DiscreteColorLegend} from 'react-vis'; const ITEMS = [ 'Options', diff --git a/packages/showcase/legends/searchable-discrete-color-hover.js b/packages/showcase/legends/searchable-discrete-color-hover.js index a84fb9afa..c59d6576a 100644 --- a/packages/showcase/legends/searchable-discrete-color-hover.js +++ b/packages/showcase/legends/searchable-discrete-color-hover.js @@ -20,7 +20,7 @@ import React, {Component} from 'react'; -import SearchableDiscreteColorLegend from 'react-vis/legends/searchable-discrete-color-legend'; +import {SearchableDiscreteColorLegend} from 'react-vis'; export default class SearchableDiscreteColorLegendHoverExample extends Component { constructor(props) { diff --git a/packages/showcase/legends/searchable-discrete-color.js b/packages/showcase/legends/searchable-discrete-color.js index b109c8523..fed98c92d 100644 --- a/packages/showcase/legends/searchable-discrete-color.js +++ b/packages/showcase/legends/searchable-discrete-color.js @@ -20,7 +20,7 @@ import React from 'react'; -import SearchableDiscreteColorLegend from 'react-vis/legends/searchable-discrete-color-legend'; +import {SearchableDiscreteColorLegend} from 'react-vis'; export default class Example extends React.Component { constructor(props) { diff --git a/packages/showcase/legends/vertical-discrete-color.js b/packages/showcase/legends/vertical-discrete-color.js index 9fae1896b..effdac3b7 100644 --- a/packages/showcase/legends/vertical-discrete-color.js +++ b/packages/showcase/legends/vertical-discrete-color.js @@ -20,7 +20,7 @@ import React from 'react'; -import DiscreteColorLegend from 'react-vis/legends/discrete-color-legend'; +import {DiscreteColorLegend} from 'react-vis'; const ITEMS = [ 'Options', diff --git a/packages/showcase/radar-chart/animated-radar-chart.js b/packages/showcase/radar-chart/animated-radar-chart.js index 9f410c821..50b755d22 100644 --- a/packages/showcase/radar-chart/animated-radar-chart.js +++ b/packages/showcase/radar-chart/animated-radar-chart.js @@ -21,8 +21,8 @@ import React, {Component} from 'react'; import ShowcaseButton from '../showcase-components/showcase-button'; -import RadarChart from 'react-vis/radar-chart'; -import CircularGridLines from 'react-vis/plot/circular-grid-lines'; +import {RadarChart} from 'react-vis'; +import {CircularGridLines} from 'react-vis'; const DATA = [ { diff --git a/packages/showcase/radar-chart/basic-radar-chart.js b/packages/showcase/radar-chart/basic-radar-chart.js index 77546d83a..f3eb3c0dc 100644 --- a/packages/showcase/radar-chart/basic-radar-chart.js +++ b/packages/showcase/radar-chart/basic-radar-chart.js @@ -21,7 +21,7 @@ import React from 'react'; import {format} from 'd3-format'; -import RadarChart from 'react-vis/radar-chart'; +import {RadarChart} from 'react-vis'; const DATA = [ { diff --git a/packages/showcase/radar-chart/four-quadrant-radar-chart.js b/packages/showcase/radar-chart/four-quadrant-radar-chart.js index 20b294707..7bd685a28 100644 --- a/packages/showcase/radar-chart/four-quadrant-radar-chart.js +++ b/packages/showcase/radar-chart/four-quadrant-radar-chart.js @@ -20,7 +20,7 @@ import React from 'react'; -import RadarChart from 'react-vis/radar-chart'; +import {RadarChart} from 'react-vis'; const RADAR_PROPS = { data: [ diff --git a/packages/showcase/radar-chart/radar-chart-series-tooltips.js b/packages/showcase/radar-chart/radar-chart-series-tooltips.js index e5a1479d1..e79f9ffa6 100644 --- a/packages/showcase/radar-chart/radar-chart-series-tooltips.js +++ b/packages/showcase/radar-chart/radar-chart-series-tooltips.js @@ -21,7 +21,7 @@ import React, {Component} from 'react'; import {format} from 'd3-format'; -import RadarChart from 'react-vis/radar-chart'; +import {RadarChart} from 'react-vis'; import {Hint} from 'react-vis'; const DATA = [ diff --git a/packages/showcase/radar-chart/radar-chart-with-tooltips.js b/packages/showcase/radar-chart/radar-chart-with-tooltips.js index b9de31d97..5f68b9c49 100644 --- a/packages/showcase/radar-chart/radar-chart-with-tooltips.js +++ b/packages/showcase/radar-chart/radar-chart-with-tooltips.js @@ -19,7 +19,7 @@ // THE SOFTWARE. import React, {Component} from 'react'; -import RadarChart from 'react-vis/radar-chart'; +import {RadarChart} from 'react-vis'; import {Hint} from 'react-vis'; // The first 6 data elements here are to simulate a 'spider' type of radar chart - diff --git a/packages/showcase/radial-chart/simple-radial-chart.js b/packages/showcase/radial-chart/simple-radial-chart.js index df2fcaf01..8294ea185 100644 --- a/packages/showcase/radial-chart/simple-radial-chart.js +++ b/packages/showcase/radial-chart/simple-radial-chart.js @@ -20,7 +20,7 @@ import React from 'react'; -import RadialChart from 'react-vis/radial-chart'; +import {RadialChart} from 'react-vis'; export default function SimpleRadialChart() { return ( diff --git a/packages/showcase/sankey/basic.js b/packages/showcase/sankey/basic.js index dff98727c..7168c07b5 100644 --- a/packages/showcase/sankey/basic.js +++ b/packages/showcase/sankey/basic.js @@ -1,6 +1,6 @@ import React from 'react'; -import Sankey from 'react-vis/sankey'; +import {Sankey} from 'react-vis'; const nodes = [{name: 'a', rotation: 0}, {name: 'b'}, {name: 'c'}]; const links = [ diff --git a/packages/showcase/sankey/energy-sankey.js b/packages/showcase/sankey/energy-sankey.js index 7b28bf8df..18d4b345d 100644 --- a/packages/showcase/sankey/energy-sankey.js +++ b/packages/showcase/sankey/energy-sankey.js @@ -1,6 +1,6 @@ import React from 'react'; -import Sankey from 'react-vis/sankey'; +import {Sankey} from 'react-vis'; import Energy from '../datasets/energy.json'; import ShowcaseButton from '../showcase-components/showcase-button'; diff --git a/packages/showcase/sankey/link-event.js b/packages/showcase/sankey/link-event.js index a536953e0..eb6199661 100644 --- a/packages/showcase/sankey/link-event.js +++ b/packages/showcase/sankey/link-event.js @@ -1,6 +1,6 @@ import React from 'react'; -import Sankey from 'react-vis/sankey'; +import {Sankey} from 'react-vis'; const BLURRED_LINK_OPACITY = 0.3; const FOCUSED_LINK_OPACITY = 0.6; diff --git a/packages/showcase/sankey/link-hint.js b/packages/showcase/sankey/link-hint.js index 5f15de371..0961f1dcc 100644 --- a/packages/showcase/sankey/link-hint.js +++ b/packages/showcase/sankey/link-hint.js @@ -1,7 +1,7 @@ import React from 'react'; -import Sankey from 'react-vis/sankey'; -import Hint from 'react-vis/plot/hint'; +import {Sankey} from 'react-vis'; +import {Hint} from 'react-vis'; const BLURRED_LINK_OPACITY = 0.3; const FOCUSED_LINK_OPACITY = 0.6; diff --git a/packages/showcase/sankey/voronoi.js b/packages/showcase/sankey/voronoi.js index 04b73e41b..e7c5f6181 100644 --- a/packages/showcase/sankey/voronoi.js +++ b/packages/showcase/sankey/voronoi.js @@ -1,6 +1,6 @@ import React from 'react'; -import Sankey from 'react-vis/sankey'; +import {Sankey} from 'react-vis'; const BLURRED_NODE_OPACITY = 0.8; const FOCUSED_NODE_OPACITY = 1; diff --git a/packages/showcase/sunbursts/basic-sunburst.js b/packages/showcase/sunbursts/basic-sunburst.js index 71a14c4b3..1e225c033 100644 --- a/packages/showcase/sunbursts/basic-sunburst.js +++ b/packages/showcase/sunbursts/basic-sunburst.js @@ -20,7 +20,7 @@ import React from 'react'; -import Sunburst from 'react-vis/sunburst'; +import {Sunburst} from 'react-vis'; import {EXTENDED_DISCRETE_COLOR_RANGE} from 'react-vis/theme'; import {LabelSeries} from 'react-vis'; diff --git a/packages/showcase/sunbursts/clock-example.js b/packages/showcase/sunbursts/clock-example.js index 41eb4cf1a..1505dd7e8 100644 --- a/packages/showcase/sunbursts/clock-example.js +++ b/packages/showcase/sunbursts/clock-example.js @@ -22,7 +22,7 @@ import React, {useState, useEffect} from 'react'; import {XYPlot, ArcSeries} from 'react-vis'; -import {EXTENDED_DISCRETE_COLOR_RANGE} from 'react-vis/theme'; +import {EXTENDED_DISCRETE_COLOR_RANGE} from 'react-vis/dist/theme'; const PI = Math.PI; diff --git a/packages/showcase/treemap/dynamic-treemap.js b/packages/showcase/treemap/dynamic-treemap.js index ff49c0dd2..a5035e7c4 100644 --- a/packages/showcase/treemap/dynamic-treemap.js +++ b/packages/showcase/treemap/dynamic-treemap.js @@ -20,7 +20,7 @@ import React from 'react'; -import Treemap from 'react-vis/treemap'; +import {Treemap} from 'react-vis'; import ShowcaseButton from '../showcase-components/showcase-button'; function _getRandomData(total) { diff --git a/packages/showcase/treemap/simple-treemap.js b/packages/showcase/treemap/simple-treemap.js index 794f055fb..f11ef0aaa 100644 --- a/packages/showcase/treemap/simple-treemap.js +++ b/packages/showcase/treemap/simple-treemap.js @@ -20,7 +20,7 @@ import React from 'react'; -import Treemap from 'react-vis/treemap'; +import {Treemap} from 'react-vis'; import D3FlareData from '../datasets/d3-flare-example.json'; import ShowcaseButton from '../showcase-components/showcase-button';