From 2f1fa770b6dc35d86ebcc30d02d6f056e7d19a62 Mon Sep 17 00:00:00 2001 From: Marco Vettorello Date: Mon, 9 Jul 2018 15:20:25 +0200 Subject: [PATCH 1/3] Linked the XYChart components to experimental directory --- .../components/guide_section/guide_section.js | 3 ++- src-docs/src/views/xy_chart/complex.js | 8 ++++--- src-docs/src/views/xy_chart/crosshair_sync.js | 3 ++- src-docs/src/views/xy_chart/empty.js | 2 +- src-docs/src/views/xy_chart/horizontal.js | 2 +- src-docs/src/views/xy_chart/multi_axis.js | 2 +- .../src/views/xy_chart/xy_chart_example.js | 3 ++- src-docs/src/views/xy_chart_area/area.js | 2 +- .../src/views/xy_chart_area/area_example.js | 3 ++- .../src/views/xy_chart_area/curved_area.js | 6 ++++- .../src/views/xy_chart_area/range_area.js | 2 +- .../src/views/xy_chart_area/stacked_area.js | 2 +- .../src/views/xy_chart_axis/annotations.js | 2 +- .../src/views/xy_chart_axis/simple_axis.js | 2 +- .../views/xy_chart_axis/xy_axis_example.js | 3 ++- .../src/views/xy_chart_bar/bar_example.js | 3 ++- .../xy_chart_bar/horizontal_bar_series.js | 2 +- .../stacked_horizontal_bar_series.js | 4 +++- .../stacked_vertical_bar_series.js | 5 ++++- .../src/views/xy_chart_bar/time_series.js | 4 +++- .../views/xy_chart_bar/vertical_bar_series.js | 2 +- .../xy_chart_histogram/histogram_example.js | 2 +- .../horizontal_rect_series.js | 2 +- .../stacked_horizontal_rect_series.js | 2 +- .../stacked_vertical_rect_series.js | 2 +- .../time_histogram_series.js | 5 ++++- .../vertical_rect_series.js | 2 +- .../src/views/xy_chart_line/curved_line.js | 4 +++- .../views/xy_chart_line/custom_domain_line.js | 2 +- .../views/xy_chart_line/custom_style_line.js | 6 +++-- src-docs/src/views/xy_chart_line/line.js | 2 +- .../src/views/xy_chart_line/line_example.js | 3 ++- .../src/views/xy_chart_line/multi_line.js | 2 +- src/components/index.js | 22 ------------------- src/experimental/index.js | 20 +++++++++++++++++ src/index.js | 1 + 36 files changed, 84 insertions(+), 58 deletions(-) create mode 100644 src/experimental/index.js diff --git a/src-docs/src/components/guide_section/guide_section.js b/src-docs/src/components/guide_section/guide_section.js index 2a7630133c0..19b4f88ae8b 100644 --- a/src-docs/src/components/guide_section/guide_section.js +++ b/src-docs/src/components/guide_section/guide_section.js @@ -313,7 +313,8 @@ export class GuideSection extends Component { const { code } = this.props.source.find(sourceObject => sourceObject.type === name); const npmImports = code .replace(/(from )'(..\/)+src\/components(\/?';)/, `from '@elastic/eui';`) - .replace(/(from )'(..\/)+src\/services(\/?';)/, `from '@elastic/eui/services';`); + .replace(/(from )'(..\/)+src\/services(\/?';)/, `from '@elastic/eui/services';`) + .replace(/(from )'(..\/)+src\/experimental(\/?';)/, `from '@elastic/eui/experimental';`); return (
diff --git a/src-docs/src/views/xy_chart/complex.js b/src-docs/src/views/xy_chart/complex.js index a85bafe87d2..712c65395b6 100644 --- a/src-docs/src/views/xy_chart/complex.js +++ b/src-docs/src/views/xy_chart/complex.js @@ -1,13 +1,15 @@ import React, { Fragment, Component } from 'react'; import { - EuiText, - EuiCodeBlock, - EuiSpacer, EuiXYChart, EuiBarSeries, EuiAreaSeries, EuiLineSeries, +} from '../../../../src/experimental'; +import { + EuiText, + EuiCodeBlock, + EuiSpacer, } from '../../../../src/components'; const barSeries = []; diff --git a/src-docs/src/views/xy_chart/crosshair_sync.js b/src-docs/src/views/xy_chart/crosshair_sync.js index 445b7bf7bf0..83c62f60fdc 100644 --- a/src-docs/src/views/xy_chart/crosshair_sync.js +++ b/src-docs/src/views/xy_chart/crosshair_sync.js @@ -1,6 +1,7 @@ import React from 'react'; -import { EuiSpacer, EuiXYChart, EuiBarSeries } from '../../../../src/components'; +import { EuiSpacer } from '../../../../src/components'; +import { EuiXYChart, EuiBarSeries } from '../../../../src/experimental'; // eslint-disable-next-line export class ExampleCrosshair extends React.Component { diff --git a/src-docs/src/views/xy_chart/empty.js b/src-docs/src/views/xy_chart/empty.js index e9bde5dc9f8..14ff2e1a03a 100644 --- a/src-docs/src/views/xy_chart/empty.js +++ b/src-docs/src/views/xy_chart/empty.js @@ -1,5 +1,5 @@ import React from 'react'; -import { EuiXYChart } from '../../../../src/components'; +import { EuiXYChart } from '../../../../src/experimental'; export default () => ; diff --git a/src-docs/src/views/xy_chart/horizontal.js b/src-docs/src/views/xy_chart/horizontal.js index baca430ac0b..3141c49ed91 100644 --- a/src-docs/src/views/xy_chart/horizontal.js +++ b/src-docs/src/views/xy_chart/horizontal.js @@ -5,7 +5,7 @@ import { EuiAreaSeries, EuiLineSeries, EuiXYChartUtils, -} from '../../../../src/components'; +} from '../../../../src/experimental'; const { ORIENTATION } = EuiXYChartUtils; const data = new Array(80).fill(0).map((d, i) => { diff --git a/src-docs/src/views/xy_chart/multi_axis.js b/src-docs/src/views/xy_chart/multi_axis.js index e8bdb688cd8..a6f21428409 100644 --- a/src-docs/src/views/xy_chart/multi_axis.js +++ b/src-docs/src/views/xy_chart/multi_axis.js @@ -6,7 +6,7 @@ import { EuiXAxis, EuiYAxis, EuiXYChartAxisUtils, -} from '../../../../src/components'; +} from '../../../../src/experimental'; import { VISUALIZATION_COLORS } from '../../../../src/services'; diff --git a/src-docs/src/views/xy_chart/xy_chart_example.js b/src-docs/src/views/xy_chart/xy_chart_example.js index f6805db4932..80cb27b0f0e 100644 --- a/src-docs/src/views/xy_chart/xy_chart_example.js +++ b/src-docs/src/views/xy_chart/xy_chart_example.js @@ -1,6 +1,7 @@ import React, { Fragment } from 'react'; import { GuideSectionTypes } from '../../components'; -import { EuiCode, EuiXYChart, EuiCallOut, EuiSpacer } from '../../../../src/components'; +import { EuiCode, EuiCallOut, EuiSpacer } from '../../../../src/components'; +import { EuiXYChart } from '../../../../src/experimental'; import ComplexChartExampleCode from './complex'; import EmptyExampleCode from './empty'; import MultiAxisChartExampleCode from './multi_axis'; diff --git a/src-docs/src/views/xy_chart_area/area.js b/src-docs/src/views/xy_chart_area/area.js index 2296360091d..acb5ef2a303 100644 --- a/src-docs/src/views/xy_chart_area/area.js +++ b/src-docs/src/views/xy_chart_area/area.js @@ -1,6 +1,6 @@ import React from 'react'; -import { EuiXYChart, EuiAreaSeries } from '../../../../src/components'; +import { EuiXYChart, EuiAreaSeries } from '../../../../src/experimental'; const DATA_A = [{ x: 0, y: 1 }, { x: 1, y: 1 }, { x: 2, y: 2 }, { x: 3, y: 1 }, { x: 5, y: 2 }]; diff --git a/src-docs/src/views/xy_chart_area/area_example.js b/src-docs/src/views/xy_chart_area/area_example.js index 707484a1687..ac270fb357a 100644 --- a/src-docs/src/views/xy_chart_area/area_example.js +++ b/src-docs/src/views/xy_chart_area/area_example.js @@ -4,7 +4,8 @@ import AreaSeriesExample from './area'; import StackedAreaSeriesExample from './stacked_area'; import CurvedAreaExample from './curved_area'; import RangeAreaExample from './range_area'; -import { EuiCode, EuiAreaSeries, EuiLink, EuiCallOut, EuiSpacer } from '../../../../src/components'; +import { EuiCode, EuiLink, EuiCallOut, EuiSpacer } from '../../../../src/components'; +import { EuiAreaSeries } from '../../../../src/experimental'; export const XYChartAreaExample = { title: 'Area chart', diff --git a/src-docs/src/views/xy_chart_area/curved_area.js b/src-docs/src/views/xy_chart_area/curved_area.js index dd6d439dd2d..49e369666ab 100644 --- a/src-docs/src/views/xy_chart_area/curved_area.js +++ b/src-docs/src/views/xy_chart_area/curved_area.js @@ -5,9 +5,13 @@ import { EuiFormRow, EuiSelect, EuiSpacer, +} from '../../../../src/components'; + +import { EuiXYChart, EuiAreaSeries, -} from '../../../../src/components'; +} from '../../../../src/experimental'; + const DATA_A = [{ x: 0, y: 1 }, { x: 1, y: 1 }, { x: 2, y: 2 }, { x: 3, y: -1 }, { x: 5, y: 2 }]; const DATA_B = [{ x: 0, y: 3 }, { x: 1, y: 2 }, { x: 2, y: 4 }, { x: 3, y: 1 }, { x: 5, y: 3 }]; diff --git a/src-docs/src/views/xy_chart_area/range_area.js b/src-docs/src/views/xy_chart_area/range_area.js index 04c01037014..48f9bdea442 100644 --- a/src-docs/src/views/xy_chart_area/range_area.js +++ b/src-docs/src/views/xy_chart_area/range_area.js @@ -1,6 +1,6 @@ import React from 'react'; -import { EuiXYChart, EuiAreaSeries, EuiLineSeries } from '../../../../src/components'; +import { EuiXYChart, EuiAreaSeries, EuiLineSeries } from '../../../../src/experimental'; const LINE_DATA = new Array(100).fill(0).map((d, i) => ({ x: i, y: Math.random() * 2 + 8 })); const AREA_DATA = LINE_DATA.map(({ x, y })=> ({ x, y0: y - Math.random() - 2, y: y + Math.random() + 2 })); diff --git a/src-docs/src/views/xy_chart_area/stacked_area.js b/src-docs/src/views/xy_chart_area/stacked_area.js index 51286d6ca67..6bfef81e4c7 100644 --- a/src-docs/src/views/xy_chart_area/stacked_area.js +++ b/src-docs/src/views/xy_chart_area/stacked_area.js @@ -1,6 +1,6 @@ import React from 'react'; -import { EuiXYChart, EuiAreaSeries } from '../../../../src/components'; +import { EuiXYChart, EuiAreaSeries } from '../../../../src/experimental'; const dataA = [{ x: 0, y: 3 }, { x: 1, y: 2 }, { x: 2, y: 1 }, { x: 3, y: 2 }, { x: 4, y: 3 }]; diff --git a/src-docs/src/views/xy_chart_axis/annotations.js b/src-docs/src/views/xy_chart_axis/annotations.js index 7dbb66ff211..0211b182e89 100644 --- a/src-docs/src/views/xy_chart_axis/annotations.js +++ b/src-docs/src/views/xy_chart_axis/annotations.js @@ -6,7 +6,7 @@ import { EuiLineAnnotation, EuiXYChartUtils, EuiXYChartAxisUtils, -} from '../../../../src/components'; +} from '../../../../src/experimental'; const DATA_A = [ { x: 0, y: 1 }, diff --git a/src-docs/src/views/xy_chart_axis/simple_axis.js b/src-docs/src/views/xy_chart_axis/simple_axis.js index f9e688f343b..58f07c824fe 100644 --- a/src-docs/src/views/xy_chart_axis/simple_axis.js +++ b/src-docs/src/views/xy_chart_axis/simple_axis.js @@ -7,7 +7,7 @@ import { EuiXYChart, EuiXYChartAxisUtils, EuiXYChartTextUtils, -} from '../../../../src/components'; +} from '../../../../src/experimental'; const DATA = [{ x: 0, y: 5 }, { x: 1, y: 3 }, { x: 2, y: 2 }, { x: 3, y: 3 }]; diff --git a/src-docs/src/views/xy_chart_axis/xy_axis_example.js b/src-docs/src/views/xy_chart_axis/xy_axis_example.js index f26a8e251fb..ddb83096a26 100644 --- a/src-docs/src/views/xy_chart_axis/xy_axis_example.js +++ b/src-docs/src/views/xy_chart_axis/xy_axis_example.js @@ -1,6 +1,7 @@ import React, { Fragment } from 'react'; import { GuideSectionTypes } from '../../components'; -import { EuiCode, EuiXAxis, EuiYAxis, EuiLineAnnotation, EuiCallOut, EuiSpacer } from '../../../../src/components'; +import { EuiCode, EuiCallOut, EuiSpacer } from '../../../../src/components'; +import { EuiXAxis, EuiYAxis, EuiLineAnnotation } from '../../../../src/experimental'; import SimpleAxisExampleCode from './simple_axis'; import AnnotationExampleCode from './annotations'; diff --git a/src-docs/src/views/xy_chart_bar/bar_example.js b/src-docs/src/views/xy_chart_bar/bar_example.js index 938f7ddd63e..7c3c02dc9fd 100644 --- a/src-docs/src/views/xy_chart_bar/bar_example.js +++ b/src-docs/src/views/xy_chart_bar/bar_example.js @@ -6,7 +6,8 @@ import StackedVerticalBarSeriesExample from './stacked_vertical_bar_series'; import StackedHorizontalBarSeriesExample from './stacked_horizontal_bar_series'; import TimeSeriesExample from './time_series'; -import { EuiBadge, EuiCallOut, EuiSpacer, EuiLink, EuiCode, EuiBarSeries } from '../../../../src/components'; +import { EuiBadge, EuiCallOut, EuiSpacer, EuiLink, EuiCode } from '../../../../src/components'; +import { EuiBarSeries } from '../../../../src/experimental'; export const XYChartBarExample = { title: 'Bar charts', diff --git a/src-docs/src/views/xy_chart_bar/horizontal_bar_series.js b/src-docs/src/views/xy_chart_bar/horizontal_bar_series.js index 990d5206278..33a6a82564c 100644 --- a/src-docs/src/views/xy_chart_bar/horizontal_bar_series.js +++ b/src-docs/src/views/xy_chart_bar/horizontal_bar_series.js @@ -1,6 +1,6 @@ import React from 'react'; -import { EuiXYChart, EuiBarSeries, EuiXYChartUtils } from '../../../../src/components'; +import { EuiXYChart, EuiBarSeries, EuiXYChartUtils } from '../../../../src/experimental'; const { SCALE, ORIENTATION } = EuiXYChartUtils; const data = [ diff --git a/src-docs/src/views/xy_chart_bar/stacked_horizontal_bar_series.js b/src-docs/src/views/xy_chart_bar/stacked_horizontal_bar_series.js index 1622eadf6e3..1d7bf39a77f 100644 --- a/src-docs/src/views/xy_chart_bar/stacked_horizontal_bar_series.js +++ b/src-docs/src/views/xy_chart_bar/stacked_horizontal_bar_series.js @@ -3,10 +3,12 @@ import React, { Component, Fragment } from 'react'; import { EuiSpacer, EuiButton, +} from '../../../../src/components'; +import { EuiXYChart, EuiBarSeries, EuiXYChartUtils, -} from '../../../../src/components'; +} from '../../../../src/experimental'; const { ORIENTATION, SCALE } = EuiXYChartUtils; diff --git a/src-docs/src/views/xy_chart_bar/stacked_vertical_bar_series.js b/src-docs/src/views/xy_chart_bar/stacked_vertical_bar_series.js index 03fdf021bf5..c0ed35c9fc7 100644 --- a/src-docs/src/views/xy_chart_bar/stacked_vertical_bar_series.js +++ b/src-docs/src/views/xy_chart_bar/stacked_vertical_bar_series.js @@ -3,10 +3,13 @@ import React, { Component, Fragment } from 'react'; import { EuiSpacer, EuiButton, +} from '../../../../src/components'; + +import { EuiXYChart, EuiBarSeries, EuiXYChartUtils, -} from '../../../../src/components'; +} from '../../../../src/experimental'; const { SCALE } = EuiXYChartUtils; diff --git a/src-docs/src/views/xy_chart_bar/time_series.js b/src-docs/src/views/xy_chart_bar/time_series.js index 2b13f1defdc..b18b541fbf2 100644 --- a/src-docs/src/views/xy_chart_bar/time_series.js +++ b/src-docs/src/views/xy_chart_bar/time_series.js @@ -3,11 +3,13 @@ import React, { Component, Fragment } from 'react'; import { EuiButton, EuiSpacer, +} from '../../../../src/components'; +import { EuiXYChart, EuiLineSeries, EuiBarSeries, EuiXYChartUtils, -} from '../../../../src/components'; +} from '../../../../src/experimental'; const { SCALE } = EuiXYChartUtils; const timestamp = Date.now(); diff --git a/src-docs/src/views/xy_chart_bar/vertical_bar_series.js b/src-docs/src/views/xy_chart_bar/vertical_bar_series.js index 818258b1b18..c3da39c22f0 100644 --- a/src-docs/src/views/xy_chart_bar/vertical_bar_series.js +++ b/src-docs/src/views/xy_chart_bar/vertical_bar_series.js @@ -1,6 +1,6 @@ import React from 'react'; -import { EuiXYChart, EuiBarSeries, EuiXYChartUtils } from '../../../../src/components'; +import { EuiXYChart, EuiBarSeries, EuiXYChartUtils } from '../../../../src/experimental'; const { SCALE } = EuiXYChartUtils; const data = [ { x: 'A', y: 3 }, diff --git a/src-docs/src/views/xy_chart_histogram/histogram_example.js b/src-docs/src/views/xy_chart_histogram/histogram_example.js index 950f9326ab5..520fc0f07fe 100644 --- a/src-docs/src/views/xy_chart_histogram/histogram_example.js +++ b/src-docs/src/views/xy_chart_histogram/histogram_example.js @@ -12,8 +12,8 @@ import { EuiCode, EuiCallOut, EuiLink, - EuiHistogramSeries, } from '../../../../src/components'; +import { EuiHistogramSeries } from '../../../../src/experimental'; export const XYChartHistogramExample = { title: 'Histograms', diff --git a/src-docs/src/views/xy_chart_histogram/horizontal_rect_series.js b/src-docs/src/views/xy_chart_histogram/horizontal_rect_series.js index e0d81ba0f06..870b47285ca 100644 --- a/src-docs/src/views/xy_chart_histogram/horizontal_rect_series.js +++ b/src-docs/src/views/xy_chart_histogram/horizontal_rect_series.js @@ -1,6 +1,6 @@ import React from 'react'; -import { EuiXYChart, EuiHistogramSeries, EuiXYChartUtils } from '../../../../src/components'; +import { EuiXYChart, EuiHistogramSeries, EuiXYChartUtils } from '../../../../src/experimental'; const data = [ { x: 3, y: 0, y0: 1 }, diff --git a/src-docs/src/views/xy_chart_histogram/stacked_horizontal_rect_series.js b/src-docs/src/views/xy_chart_histogram/stacked_horizontal_rect_series.js index 65b14e455a5..77d899a454b 100644 --- a/src-docs/src/views/xy_chart_histogram/stacked_horizontal_rect_series.js +++ b/src-docs/src/views/xy_chart_histogram/stacked_horizontal_rect_series.js @@ -1,6 +1,6 @@ import React from 'react'; -import { EuiXYChart, EuiHistogramSeries, EuiXYChartUtils } from '../../../../src/components'; +import { EuiXYChart, EuiHistogramSeries, EuiXYChartUtils } from '../../../../src/experimental'; const dataA = [ { y: 0, y0: 1, x: 1 }, diff --git a/src-docs/src/views/xy_chart_histogram/stacked_vertical_rect_series.js b/src-docs/src/views/xy_chart_histogram/stacked_vertical_rect_series.js index 4e1ea5e958f..df1edac613e 100644 --- a/src-docs/src/views/xy_chart_histogram/stacked_vertical_rect_series.js +++ b/src-docs/src/views/xy_chart_histogram/stacked_vertical_rect_series.js @@ -1,6 +1,6 @@ import React from 'react'; -import { EuiXYChart, EuiHistogramSeries } from '../../../../src/components'; +import { EuiXYChart, EuiHistogramSeries } from '../../../../src/experimental'; const dataA = [ { x0: 0, x: 1, y: 1 }, diff --git a/src-docs/src/views/xy_chart_histogram/time_histogram_series.js b/src-docs/src/views/xy_chart_histogram/time_histogram_series.js index ef678a344b3..83317b3288f 100644 --- a/src-docs/src/views/xy_chart_histogram/time_histogram_series.js +++ b/src-docs/src/views/xy_chart_histogram/time_histogram_series.js @@ -3,10 +3,13 @@ import React, { Component, Fragment } from 'react'; import { EuiButton, EuiSpacer, +} from '../../../../src/components'; +import { EuiXYChart, EuiHistogramSeries, EuiXYChartUtils, -} from '../../../../src/components'; +} from '../../../../src/experimental'; + const { SCALE } = EuiXYChartUtils; const timestamp = Date.now(); const ONE_HOUR = 3600000; diff --git a/src-docs/src/views/xy_chart_histogram/vertical_rect_series.js b/src-docs/src/views/xy_chart_histogram/vertical_rect_series.js index ab1ca994e4e..3e83d3ed256 100644 --- a/src-docs/src/views/xy_chart_histogram/vertical_rect_series.js +++ b/src-docs/src/views/xy_chart_histogram/vertical_rect_series.js @@ -1,6 +1,6 @@ import React from 'react'; -import { EuiXYChart, EuiHistogramSeries } from '../../../../src/components'; +import { EuiXYChart, EuiHistogramSeries } from '../../../../src/experimental'; const data = [ { x0: 0, x: 1, y: 1 }, diff --git a/src-docs/src/views/xy_chart_line/curved_line.js b/src-docs/src/views/xy_chart_line/curved_line.js index 22c64c12e31..525161bf28e 100644 --- a/src-docs/src/views/xy_chart_line/curved_line.js +++ b/src-docs/src/views/xy_chart_line/curved_line.js @@ -5,10 +5,12 @@ import { EuiFormRow, EuiSelect, EuiSpacer, +} from '../../../../src/components'; +import { EuiXYChart, EuiLineSeries, EuiXYChartUtils, -} from '../../../../src/components'; +} from '../../../../src/experimental'; const { LINEAR, diff --git a/src-docs/src/views/xy_chart_line/custom_domain_line.js b/src-docs/src/views/xy_chart_line/custom_domain_line.js index 157203bd138..90b2fb63619 100644 --- a/src-docs/src/views/xy_chart_line/custom_domain_line.js +++ b/src-docs/src/views/xy_chart_line/custom_domain_line.js @@ -1,6 +1,6 @@ import React from 'react'; -import { EuiXYChart, EuiLineSeries } from '../../../../src/components'; +import { EuiXYChart, EuiLineSeries } from '../../../../src/experimental'; const X_DOMAIN = [-1, 6]; const Y_DOMAIN = [0, 3]; diff --git a/src-docs/src/views/xy_chart_line/custom_style_line.js b/src-docs/src/views/xy_chart_line/custom_style_line.js index 4bf72ee4d3a..56a026731f1 100644 --- a/src-docs/src/views/xy_chart_line/custom_style_line.js +++ b/src-docs/src/views/xy_chart_line/custom_style_line.js @@ -5,10 +5,12 @@ import { EuiFormRow, EuiRange, EuiSpacer, - EuiXYChart, - EuiLineSeries, EuiCheckboxGroup, } from '../../../../src/components'; +import { + EuiXYChart, + EuiLineSeries, +} from '../../../../src/experimental'; import makeId from '../../../../src/components/form/form_row/make_id'; diff --git a/src-docs/src/views/xy_chart_line/line.js b/src-docs/src/views/xy_chart_line/line.js index 5b341a418a4..9f52bb150d6 100644 --- a/src-docs/src/views/xy_chart_line/line.js +++ b/src-docs/src/views/xy_chart_line/line.js @@ -3,7 +3,7 @@ import React from 'react'; import { EuiXYChart, EuiLineSeries, -} from '../../../../src/components'; +} from '../../../../src/experimental'; const DATA_A = [ { x: 0, y: 1 }, diff --git a/src-docs/src/views/xy_chart_line/line_example.js b/src-docs/src/views/xy_chart_line/line_example.js index c06772487a5..a3104023925 100644 --- a/src-docs/src/views/xy_chart_line/line_example.js +++ b/src-docs/src/views/xy_chart_line/line_example.js @@ -5,7 +5,8 @@ import CustomDomainLineChartExample from './custom_domain_line'; import MultiLineChartExample from './multi_line'; import CurvedLineChartExample from './curved_line'; import CustomStyleLineChartExample from './custom_style_line'; -import { EuiCode, EuiLineSeries, EuiLink, EuiCallOut, EuiSpacer } from '../../../../src/components'; +import { EuiCode, EuiLink, EuiCallOut, EuiSpacer } from '../../../../src/components'; +import { EuiLineSeries } from '../../../../src/experimental'; export const XYChartLineExample = { title: 'Line chart', diff --git a/src-docs/src/views/xy_chart_line/multi_line.js b/src-docs/src/views/xy_chart_line/multi_line.js index 4a2bed0e284..09fb77ed244 100644 --- a/src-docs/src/views/xy_chart_line/multi_line.js +++ b/src-docs/src/views/xy_chart_line/multi_line.js @@ -1,6 +1,6 @@ import React from 'react'; -import { EuiXYChart, EuiLineSeries } from '../../../../src/components'; +import { EuiXYChart, EuiLineSeries } from '../../../../src/experimental'; const DATA_A = [{ x: 0, y: 1 }, { x: 1.5, y: 1 }, { x: 2, y: 2 }, { x: 3, y: -1 }, { x: 5, y: 2 }]; const DATA_B = [{ x: 0, y: 3 }, { x: 1, y: 4 }, { x: 2, y: 1 }, { x: 3, y: 2 }, { x: 5, y: 5 }]; diff --git a/src/components/index.js b/src/components/index.js index 8a6e790e120..3f98e19e887 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -308,29 +308,7 @@ export { EuiToolTip, } from './tool_tip'; -export { - EuiXYChart, - EuiXYChartUtils, - EuiXYChartAxisUtils, - EuiXYChartTextUtils, - EuiLineSeries, - EuiAreaSeries, - EuiBarSeries, - EuiHistogramSeries, - EuiVerticalBarSeries, - EuiHorizontalBarSeries, - EuiVerticalRectSeries, - EuiHorizontalRectSeries, - EuiDefaultAxis, - EuiXAxis, - EuiYAxis, - EuiCrosshairX, - EuiCrosshairY, - EuiLineAnnotation, -} from './xy_chart'; - export { EuiHideFor, EuiShowFor, } from './responsive'; - diff --git a/src/experimental/index.js b/src/experimental/index.js new file mode 100644 index 00000000000..59ecdc101c2 --- /dev/null +++ b/src/experimental/index.js @@ -0,0 +1,20 @@ +export { + EuiXYChart, + EuiXYChartUtils, + EuiXYChartAxisUtils, + EuiXYChartTextUtils, + EuiLineSeries, + EuiAreaSeries, + EuiBarSeries, + EuiHistogramSeries, + EuiVerticalBarSeries, + EuiHorizontalBarSeries, + EuiVerticalRectSeries, + EuiHorizontalRectSeries, + EuiDefaultAxis, + EuiXAxis, + EuiYAxis, + EuiCrosshairX, + EuiCrosshairY, + EuiLineAnnotation, +} from '../components/xy_chart'; diff --git a/src/index.js b/src/index.js index bb4687878b9..58baf9cfdcf 100644 --- a/src/index.js +++ b/src/index.js @@ -1,3 +1,4 @@ export * from './components'; export * from './services'; export * from './utils'; +export * from './experimental'; From 53e957591b06ebed85e95086e322021304cd9632 Mon Sep 17 00:00:00 2001 From: Marco Vettorello Date: Mon, 9 Jul 2018 16:13:31 +0200 Subject: [PATCH 2/3] Fix export sorting and updated CHANGELOG --- CHANGELOG.md | 1 + src/index.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9849fbc73b7..01cdfb07e2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## [`master`](https://github.com/elastic/eui/tree/master) +- Changed `EuiXYChart` components exports to `/experimental` subfolder ([#975](https://github.com/elastic/eui/pull/975)) - Added beta version of `EuiXYChart` and associated components ([#309](https://github.com/elastic/eui/pull/309)) **Bug fixes** diff --git a/src/index.js b/src/index.js index 58baf9cfdcf..8a5d796ebb9 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,4 @@ export * from './components'; +export * from './experimental'; export * from './services'; export * from './utils'; -export * from './experimental'; From 7d31e89324a64a2404300706c989e94421c75646 Mon Sep 17 00:00:00 2001 From: Marco Vettorello Date: Mon, 9 Jul 2018 19:29:11 +0200 Subject: [PATCH 3/3] Fix rendered import code for experimental and services components --- src-docs/src/components/guide_section/guide_section.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src-docs/src/components/guide_section/guide_section.js b/src-docs/src/components/guide_section/guide_section.js index 19b4f88ae8b..7c6efd3464f 100644 --- a/src-docs/src/components/guide_section/guide_section.js +++ b/src-docs/src/components/guide_section/guide_section.js @@ -313,8 +313,8 @@ export class GuideSection extends Component { const { code } = this.props.source.find(sourceObject => sourceObject.type === name); const npmImports = code .replace(/(from )'(..\/)+src\/components(\/?';)/, `from '@elastic/eui';`) - .replace(/(from )'(..\/)+src\/services(\/?';)/, `from '@elastic/eui/services';`) - .replace(/(from )'(..\/)+src\/experimental(\/?';)/, `from '@elastic/eui/experimental';`); + .replace(/(from )'(..\/)+src\/services(\/?';)/, `from '@elastic/eui/lib/services';`) + .replace(/(from )'(..\/)+src\/experimental(\/?';)/, `from '@elastic/eui/lib/experimental';`); return (