diff --git a/package.json b/package.json index f94225019595..2d94b4c3cf11 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,8 @@ "react-datepicker": "v1.4.1", "react-input-autosize": "^2.2.1", "react-virtualized": "^9.18.5", + "react-vis": "^1.10.1", + "serve": "^6.3.1", "tabbable": "^1.1.0", "uuid": "^3.1.0" }, diff --git a/src-docs/src/routes.js b/src-docs/src/routes.js index 4e84f6e28203..ecccf2852680 100644 --- a/src-docs/src/routes.js +++ b/src-docs/src/routes.js @@ -72,9 +72,6 @@ import { CardExample } import { CallOutExample } from './views/call_out/call_out_example'; -import { ChartExample } - from './views/chart/chart_example'; - import { CodeEditorExample } from './views/code_editor/code_editor_example'; @@ -213,6 +210,24 @@ import { ToolTipExample } import { ToggleExample } from './views/toggle/toggle_example'; +import { XYChartExample } + from './views/xy_chart/xy_chart_example'; + +import { XYChartAxisExample } + from './views/xy_chart_axis/xy_axis_example'; + +import { XYChartBarExample } + from './views/xy_chart_bar/bar_example'; + +import { XYChartHistogramExample } + from './views/xy_chart_histogram/histogram_example'; + +import { XYChartAreaExample } + from './views/xy_chart_area/area_example'; + +import { XYChartLineExample } + from './views/xy_chart_line/line_example'; + import { Changelog } from './views/package/changelog'; @@ -315,7 +330,6 @@ const navigation = [{ BadgeExample, CallOutExample, CardExample, - ChartExample, CodeExample, DescriptionListExample, EmptyPromptExample, @@ -346,7 +360,7 @@ const navigation = [{ ].map(example => createExample(example)), }, { - name: 'XY Charts', + name: 'XY Charts (Beta)', items: [ XYChartExample, XYChartAxisExample, diff --git a/src-docs/src/views/xy_chart/complex.js b/src-docs/src/views/xy_chart/complex.js index 6bac4133a62d..a85bafe87d2a 100644 --- a/src-docs/src/views/xy_chart/complex.js +++ b/src-docs/src/views/xy_chart/complex.js @@ -41,7 +41,7 @@ export default class ComplexDemo extends Component { })); } render() { - const { eventName, json } = this.state + const { eventName, json } = this.state; return ( ); } -}; +} diff --git a/src-docs/src/views/xy_chart/horizontal.js b/src-docs/src/views/xy_chart/horizontal.js index 27e7dcdf87a3..baca430ac0bf 100644 --- a/src-docs/src/views/xy_chart/horizontal.js +++ b/src-docs/src/views/xy_chart/horizontal.js @@ -12,13 +12,13 @@ const data = new Array(80).fill(0).map((d, i) => { const data = { y: i, y0: i, - x: Number((Math.random() * 4 +4).toFixed(2)), + x: Number((Math.random() * 4 + 4).toFixed(2)), x0: 0, - } - return data + }; + return data; }); -export default function() { +export default function () { return ( ); -}; +} 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 850432ebba3e..d12fbb18cef7 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,6 @@ -import React from 'react'; +import React, { Fragment } from 'react'; import { GuideSectionTypes } from '../../components'; -import { EuiCode, EuiXYChart } from '../../../../src/components'; +import { EuiCode, EuiXYChart, EuiCallOut, EuiSpacer } from '../../../../src/components'; import ComplexChartExampleCode from './complex'; import EmptyExampleCode from './empty'; import MultiAxisChartExampleCode from './multi_axis'; @@ -8,6 +8,22 @@ import { ExampleCrosshair } from './crosshair_sync'; export const XYChartExample = { title: 'General', + intro: ( + + +

+ This component is still in Beta. We consider it to be reasonably stable, and welcome you to implament it, + but please be aware that breaking changes can come at any time with this component as such changes on beta + components does not necessitate a major version bump. +

+
+ + +
+ ), sections: [ { title: 'Complex example', 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 2d75bbd58e9f..be2627dd4654 100644 --- a/src-docs/src/views/xy_chart_area/area_example.js +++ b/src-docs/src/views/xy_chart_area/area_example.js @@ -1,14 +1,29 @@ -import React from 'react'; +import React, { Fragment } from 'react'; import { GuideSectionTypes } from '../../components'; import AreaSeriesExample from './area'; import StackedAreaSeriesExample from './stacked_area'; import CurvedAreaExample from './curved_area'; import RangeAreaExample from './range_area'; - -import { EuiCode, EuiAreaSeries, EuiLink } from '../../../../src/components'; +import { EuiCode, EuiAreaSeries, EuiLink, EuiCallOut, EuiSpacer } from '../../../../src/components'; export const XYChartAreaExample = { title: 'Area chart', + intro: ( + + +

+ This component is still in Beta. We consider it to be reasonably stable, and welcome you to implament it, + but please be aware that breaking changes can come at any time with this component as such changes on beta + components does not necessitate a major version bump. +

+
+ + +
+ ), sections: [ { title: 'Area Series', 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 8de9a4df2ed9..04c010370140 100644 --- a/src-docs/src/views/xy_chart_area/range_area.js +++ b/src-docs/src/views/xy_chart_area/range_area.js @@ -2,8 +2,8 @@ import React from 'react'; import { EuiXYChart, EuiAreaSeries, EuiLineSeries } from '../../../../src/components'; -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 })) +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 })); export default () => ( 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 04d24bb06154..14891ab60db4 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,11 +1,27 @@ -import React from 'react'; +import React, { Fragment } from 'react'; import { GuideSectionTypes } from '../../components'; -import { EuiCode, EuiXAxis, EuiYAxis, EuiLineAnnotation } from '../../../../src/components'; +import { EuiCode, EuiXAxis, EuiYAxis, EuiLineAnnotation, EuiCallOut, EuiSpacer } from '../../../../src/components'; import SimpleAxisExampleCode from './simple_axis'; import AnnotationExampleCode from './annotations'; export const XYChartAxisExample = { title: 'Axis', + intro: ( + + +

+ This component is still in Beta. We consider it to be reasonably stable, and welcome you to implament it, + but please be aware that breaking changes can come at any time with this component as such changes on beta + components does not necessitate a major version bump. +

+
+ + +
+ ), sections: [ { title: 'Complex Axis example', 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 0e37c929d60a..e0433167130a 100644 --- a/src-docs/src/views/xy_chart_bar/bar_example.js +++ b/src-docs/src/views/xy_chart_bar/bar_example.js @@ -12,6 +12,18 @@ export const XYChartBarExample = { title: 'Bar charts', intro: ( + +

+ This component is still in Beta. We consider it to be reasonably stable, and welcome you to implament it, + but please be aware that breaking changes can come at any time with this component as such changes on beta + components does not necessitate a major version bump. +

+
+ +

You can use EuiXYChart with EuiBarSeries to displaying bar charts. 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 f151e40d0921..c5cdd5c4c1e1 100644 --- a/src-docs/src/views/xy_chart_histogram/histogram_example.js +++ b/src-docs/src/views/xy_chart_histogram/histogram_example.js @@ -19,6 +19,18 @@ export const XYChartHistogramExample = { title: 'Histograms', intro: ( + +

+ This component is still in Beta. We consider it to be reasonably stable, and welcome you to implament it, + but please be aware that breaking changes can come at any time with this component as such changes on beta + components does not necessitate a major version bump. +

+ + +

You can use EuiXYChart with EuiHistogramSeries to displaying histogram charts. 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 2eb461624412..7544d650bc14 100644 --- a/src-docs/src/views/xy_chart_line/line_example.js +++ b/src-docs/src/views/xy_chart_line/line_example.js @@ -1,14 +1,30 @@ -import React from 'react'; +import React, { Fragment } from 'react'; import { GuideSectionTypes } from '../../components'; import LineChartExample from './line'; 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 } from '../../../../src/components'; +import { EuiCode, EuiLineSeries, EuiLink, EuiCallOut, EuiSpacer } from '../../../../src/components'; export const XYChartLineExample = { title: 'Line chart', + intro: ( + + +

+ This component is still in Beta. We consider it to be reasonably stable, and welcome you to implament it, + but please be aware that breaking changes can come at any time with this component as such changes on beta + components does not necessitate a major version bump. +

+ + + +
+ ), sections: [ { 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 ba918494afb5..4a2bed0e284a 100644 --- a/src-docs/src/views/xy_chart_line/multi_line.js +++ b/src-docs/src/views/xy_chart_line/multi_line.js @@ -2,7 +2,7 @@ import React from 'react'; import { EuiXYChart, EuiLineSeries } from '../../../../src/components'; -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_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 }]; export default () => ( diff --git a/src/components/index.js b/src/components/index.js index 08bcd251f436..8a6e790e1208 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -37,16 +37,8 @@ export { } from './call_out'; export { -<<<<<<< HEAD EuiCard, } from './card'; -======= - EuiChart, - EuiLine, - EuiArea, - EuiBar -} from './chart'; ->>>>>>> finish commit export { EuiCode, @@ -316,6 +308,27 @@ 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, diff --git a/src/components/index.scss b/src/components/index.scss index 430eed71e5aa..6338c413808b 100644 --- a/src/components/index.scss +++ b/src/components/index.scss @@ -11,7 +11,6 @@ @import 'breadcrumbs/index'; @import 'call_out/index'; @import 'card/index'; -@import 'chart/index'; @import 'code/index'; @import 'code_editor/index'; @import 'color_picker/index'; diff --git a/src/components/xy_chart/axis/default_axis.test.js b/src/components/xy_chart/axis/default_axis.test.js index 14e4b04e930f..3ecf82f1ff29 100644 --- a/src/components/xy_chart/axis/default_axis.test.js +++ b/src/components/xy_chart/axis/default_axis.test.js @@ -9,7 +9,7 @@ import { ORIENTATION } from '../utils/chart_utils'; describe('EuiDefaultAxis', () => { test('render default axis', () => { - const data = [ { x:0, y: 1 }, { x:1, y: 2 }]; + const data = [ { x: 0, y: 1 }, { x: 1, y: 2 }]; const component = mount( { expect(component.render()).toMatchSnapshot(); }); test('render rotated 90deg default axis', () => { - const data = [ { x:0, y: 1 }, { x:1, y: 2 }]; + const data = [ { x: 0, y: 1 }, { x: 1, y: 2 }]; const component = mount( { expect(component.find(EuiVerticalGrid)).toHaveLength(1); expect(component.find(EuiHorizontalGrid)).toHaveLength(0); expect(component.render()).toMatchSnapshot(); - }) + }); }); diff --git a/src/components/xy_chart/axis/horizontal_grid.js b/src/components/xy_chart/axis/horizontal_grid.js index 467ad65a290e..29b6856b157a 100644 --- a/src/components/xy_chart/axis/horizontal_grid.js +++ b/src/components/xy_chart/axis/horizontal_grid.js @@ -10,7 +10,7 @@ export class EuiHorizontalGrid extends PureComponent { - ) + ); } } diff --git a/src/components/xy_chart/axis/horizontal_grid.test.js b/src/components/xy_chart/axis/horizontal_grid.test.js index 8e85335355d4..a9b3f1eee630 100644 --- a/src/components/xy_chart/axis/horizontal_grid.test.js +++ b/src/components/xy_chart/axis/horizontal_grid.test.js @@ -8,7 +8,7 @@ import { requiredProps } from '../../../test/required_props'; describe('EuiHorizontalGrid', () => { test('render the horizontal grid', () => { - const data = [ { x:0, y: 1 }, { x:1, y: 2 }]; + const data = [ { x: 0, y: 1 }, { x: 1, y: 2 }]; const width = 600; const component = mount( { ); - const horizontalGridComponent = component.find(EuiHorizontalGrid) + const horizontalGridComponent = component.find(EuiHorizontalGrid); expect(horizontalGridComponent).toHaveLength(1); const firstLineProps = horizontalGridComponent.find('line').at(0).props(); expect(firstLineProps.y1).toEqual(firstLineProps.y2); diff --git a/src/components/xy_chart/axis/vertical_grid.js b/src/components/xy_chart/axis/vertical_grid.js index d4759ab1597e..657e519c9afd 100644 --- a/src/components/xy_chart/axis/vertical_grid.js +++ b/src/components/xy_chart/axis/vertical_grid.js @@ -10,7 +10,7 @@ export class EuiVerticalGrid extends PureComponent { - ) + ); } } diff --git a/src/components/xy_chart/axis/vertical_grid.test.js b/src/components/xy_chart/axis/vertical_grid.test.js index 7cad5fc76bc3..a4a21e18c03b 100644 --- a/src/components/xy_chart/axis/vertical_grid.test.js +++ b/src/components/xy_chart/axis/vertical_grid.test.js @@ -8,7 +8,7 @@ import { requiredProps } from '../../../test/required_props'; describe('EuiVerticalGrid', () => { test('render the vertical grid', () => { - const data = [ { x:0, y: 1 }, { x:1, y: 2 }]; + const data = [ { x: 0, y: 1 }, { x: 1, y: 2 }]; const height = 200; const component = mount( { ); - const verticalGridComponent = component.find(EuiVerticalGrid) + const verticalGridComponent = component.find(EuiVerticalGrid); expect(verticalGridComponent).toHaveLength(1); const firstLineProps = verticalGridComponent.find('line').at(0).props(); expect(firstLineProps.x1).toEqual(firstLineProps.x2); diff --git a/src/components/xy_chart/axis/x_axis.test.js b/src/components/xy_chart/axis/x_axis.test.js index 1e7e48677aa3..e46e74b9245b 100644 --- a/src/components/xy_chart/axis/x_axis.test.js +++ b/src/components/xy_chart/axis/x_axis.test.js @@ -8,7 +8,7 @@ import { requiredProps } from '../../../test/required_props'; describe('EuiXAxis', () => { test('render the x axis', () => { - const data = [ { x:0, y: 1 }, { x:1, y: 2 }]; + const data = [ { x: 0, y: 1 }, { x: 1, y: 2 }]; const height = 200; const component = mount( { test('render the y axis', () => { - const data = [ { x:0, y: 1 }, { x:1, y: 2 }]; + const data = [ { x: 0, y: 1 }, { x: 1, y: 2 }]; const height = 200; const component = mount( { @@ -59,7 +59,7 @@ export class EuiCrosshairX extends AbstractSeries { if (xType === SCALE.TIME || xType === SCALE.TIME_UTC) { return new Date(x).toISOString(); // TODO add a props for time formatting } else { - return x + return x; } } @@ -73,7 +73,7 @@ export class EuiCrosshairX extends AbstractSeries { return { title: 'X Value', value, - } + }; } } @@ -134,7 +134,7 @@ export class EuiCrosshairX extends AbstractSeries { minDistance = newDistance; value = item; } - globalMinDistance = Math.min(globalMinDistance, minDistance) + globalMinDistance = Math.min(globalMinDistance, minDistance); }); if (!value) { @@ -174,7 +174,7 @@ export class EuiCrosshairX extends AbstractSeries { } render() { - const { values } = this.state + const { values } = this.state; return ( - ) + ); } } @@ -201,5 +201,5 @@ EuiCrosshairX.propTypes = { * The ordered array of series names */ seriesNames: PropTypes.arrayOf(PropTypes.string).isRequired, -} +}; EuiCrosshairX.defaultProps = {}; diff --git a/src/components/xy_chart/crosshairs/crosshair_x.test.js b/src/components/xy_chart/crosshairs/crosshair_x.test.js index 6be14ccd6213..4a8246a039db 100644 --- a/src/components/xy_chart/crosshairs/crosshair_x.test.js +++ b/src/components/xy_chart/crosshairs/crosshair_x.test.js @@ -8,7 +8,7 @@ import { requiredProps } from '../../../test/required_props'; import { Crosshair } from 'react-vis'; describe('EuiCrosshairX', () => { test('render the X crosshair', () => { - const data = [ { x:0, y: 1.5 }, { x:1, y: 2 }]; + const data = [ { x: 0, y: 1.5 }, { x: 1, y: 2 }]; const component = mount( { component.find('rect').at(0).simulate('mousemove', { nativeEvent: { clientX: 50, clientY: 100 } }); expect(component.find(Crosshair).children()).toHaveLength(1); - const crosshair = component.find('.rv-crosshair') + const crosshair = component.find('.rv-crosshair'); expect(crosshair).toHaveLength(1); expect(crosshair.find('.rv-crosshair__inner__content .rv-crosshair__title__value').text()).toBe('0'); expect(crosshair.find('.rv-crosshair__inner__content .rv-crosshair__item__value').text()).toBe('1.5'); diff --git a/src/components/xy_chart/crosshairs/crosshair_y.js b/src/components/xy_chart/crosshairs/crosshair_y.js index ab7354d3686c..108cd3207515 100644 --- a/src/components/xy_chart/crosshairs/crosshair_y.js +++ b/src/components/xy_chart/crosshairs/crosshair_y.js @@ -169,13 +169,13 @@ export class CrosshairY extends PureComponent {
{children ? - children : -
-
- {this._renderCrosshairTitle()} - {this._renderCrosshairItems()} + children : +
+
+ {this._renderCrosshairTitle()} + {this._renderCrosshairItems()} +
-
}
@@ -234,28 +234,28 @@ export class EuiCrosshairY extends AbstractSeries { } this.setState({ values: [] - }) + }); } _formatYValue = (y) => { const { yType } = this.props; - if ( yType === SCALE.TIME || yType === SCALE.TIME_UTC) { + if (yType === SCALE.TIME || yType === SCALE.TIME_UTC) { return new Date(y).toISOString(); // TODO add a props for time formatting } else { - return y + return y; } } _titleFormat = (dataPoints = []) => { if (dataPoints.length > 0) { - const [ firstDataPoint ] = dataPoints - const { originalValues } = firstDataPoint + const [ firstDataPoint ] = dataPoints; + const { originalValues } = firstDataPoint; const value = (typeof originalValues.y0 === 'number') ? `${this._formatYValue(originalValues.y0)} to ${this._formatYValue(originalValues.y)}` : this._formatYValue(originalValues.y); return { title: 'Y Value', value, - } + }; } } @@ -315,7 +315,7 @@ export class EuiCrosshairY extends AbstractSeries { minDistance = newDistance; value = item; } - globalMinDistance = Math.min(globalMinDistance, minDistance) + globalMinDistance = Math.min(globalMinDistance, minDistance); }); if (!value) { @@ -355,7 +355,7 @@ export class EuiCrosshairY extends AbstractSeries { } render() { - const { values } = this.state + const { values } = this.state; return ( - ) + ); } } @@ -382,5 +382,5 @@ EuiCrosshairY.propTypes = { * The ordered array of series names */ seriesNames: PropTypes.arrayOf(PropTypes.string).isRequired, -} +}; EuiCrosshairY.defaultProps = {}; diff --git a/src/components/xy_chart/crosshairs/crosshair_y.test.js b/src/components/xy_chart/crosshairs/crosshair_y.test.js index 0b74298bdb33..6a580544dd20 100644 --- a/src/components/xy_chart/crosshairs/crosshair_y.test.js +++ b/src/components/xy_chart/crosshairs/crosshair_y.test.js @@ -9,7 +9,7 @@ import { requiredProps } from '../../../test/required_props'; describe('EuiCrosshairY', () => { test('render the Y crosshair', () => { - const data = [ { x:1.5, y: 0 }, { x:2, y: 1 }]; + const data = [ { x: 1.5, y: 0 }, { x: 2, y: 1 }]; const component = mount( { component.find('rect').at(0).simulate('mousemove', { nativeEvent: { clientX: 100, clientY: 0 } }); expect(component.find(CrosshairY).children()).toHaveLength(1); - const crosshair = component.find('.rv-crosshair') + const crosshair = component.find('.rv-crosshair'); expect(crosshair).toHaveLength(1); expect(crosshair.find('.rv-crosshair__inner__content .rv-crosshair__title__value').text()).toBe('1'); expect(crosshair.find('.rv-crosshair__inner__content .rv-crosshair__item__value').text()).toBe('2'); diff --git a/src/components/xy_chart/selection_brush.js b/src/components/xy_chart/selection_brush.js index 6b86fa7b353a..63c1f0d0b7c0 100644 --- a/src/components/xy_chart/selection_brush.js +++ b/src/components/xy_chart/selection_brush.js @@ -117,10 +117,10 @@ export class EuiSelectionBrush extends AbstractSeries { onBrushing(drawAndRectAreas); } } else { - this.setState(() => ({ - drawing: false, - ...DEFAULT_AREAS, - })); + this.setState(() => ({ + drawing: false, + ...DEFAULT_AREAS, + })); } } @@ -213,4 +213,4 @@ EuiSelectionBrush.defaultProps = { orientation: HORIZONTAL, color: 'black', opacity: 0.2, -} +}; diff --git a/src/components/xy_chart/selection_brush.test.js b/src/components/xy_chart/selection_brush.test.js index 786b7a515ac6..dd1bd5ce4b74 100644 --- a/src/components/xy_chart/selection_brush.test.js +++ b/src/components/xy_chart/selection_brush.test.js @@ -33,9 +33,15 @@ describe('EuiSelectionBrush', () => { let selectionBrush = component.find(EuiSelectionBrush); expect(selectionBrush.exists()).toBe(true); - component.find('svg').at(0).simulate('mousemove', { nativeEvent: { offsetX: DEFAULT_MARGINS.left + 50, offsetY: DEFAULT_MARGINS.top + 50 } }); - component.find('svg').at(0).simulate('mousedown', { nativeEvent: { offsetX: DEFAULT_MARGINS.left + 50, offsetY: DEFAULT_MARGINS.top + 50 } }); - component.find('svg').at(0).simulate('mousemove', { nativeEvent: { offsetX: DEFAULT_MARGINS.left + 100, offsetY: DEFAULT_MARGINS.top + 100 } }); + component.find('svg').at(0).simulate('mousemove', { + nativeEvent: { offsetX: DEFAULT_MARGINS.left + 50, offsetY: DEFAULT_MARGINS.top + 50 } + }); + component.find('svg').at(0).simulate('mousedown', { + nativeEvent: { offsetX: DEFAULT_MARGINS.left + 50, offsetY: DEFAULT_MARGINS.top + 50 } + }); + component.find('svg').at(0).simulate('mousemove', { + nativeEvent: { offsetX: DEFAULT_MARGINS.left + 100, offsetY: DEFAULT_MARGINS.top + 100 } + }); selectionBrush = component.find(EuiSelectionBrush); expect(selectionBrush).toMatchSnapshot(); @@ -68,9 +74,15 @@ describe('EuiSelectionBrush', () => { ); let selectionBrush = component.find(EuiSelectionBrush); expect(selectionBrush.exists()).toBe(true); - component.find('svg').at(0).simulate('mousemove', { nativeEvent: { offsetX: DEFAULT_MARGINS.left + 50, offsetY: DEFAULT_MARGINS.top +50 } }); - component.find('svg').at(0).simulate('mousedown', { nativeEvent: { offsetX: DEFAULT_MARGINS.left + 50, offsetY: DEFAULT_MARGINS.top +50 } }); - component.find('svg').at(0).simulate('mousemove', { nativeEvent: { offsetX: DEFAULT_MARGINS.left + 100, offsetY: DEFAULT_MARGINS.top +100 } }); + component.find('svg').at(0).simulate('mousemove', { + nativeEvent: { offsetX: DEFAULT_MARGINS.left + 50, offsetY: DEFAULT_MARGINS.top + 50 } + }); + component.find('svg').at(0).simulate('mousedown', { + nativeEvent: { offsetX: DEFAULT_MARGINS.left + 50, offsetY: DEFAULT_MARGINS.top + 50 } + }); + component.find('svg').at(0).simulate('mousemove', { + nativeEvent: { offsetX: DEFAULT_MARGINS.left + 100, offsetY: DEFAULT_MARGINS.top + 100 + } }); selectionBrush = component.find(EuiSelectionBrush); expect(selectionBrush).toMatchSnapshot(); @@ -78,7 +90,9 @@ describe('EuiSelectionBrush', () => { expect(selectionBrush.find('rect').at(0).props().y).toBe(50); expect(selectionBrush.find('rect').at(0).props().width).toBe(600 - DEFAULT_MARGINS.left - DEFAULT_MARGINS.right); expect(selectionBrush.find('rect').at(0).props().height).toBe(50); - component.find('svg').at(0).simulate('mouseup', { nativeEvent: { offsetX: DEFAULT_MARGINS.left + 100, offsetY: DEFAULT_MARGINS.top +100 } }); + component.find('svg').at(0).simulate('mouseup', { + nativeEvent: { offsetX: DEFAULT_MARGINS.left + 100, offsetY: DEFAULT_MARGINS.top + 100 } + }); selectionBrush = component.find(EuiSelectionBrush); expect(selectionBrush.find('rect').at(0).props().x).toBe(0); expect(selectionBrush.find('rect').at(0).props().y).toBe(0); @@ -102,9 +116,15 @@ describe('EuiSelectionBrush', () => { ); let selectionBrush = component.find(EuiSelectionBrush); expect(selectionBrush.exists()).toBe(true); - component.find('svg').at(0).simulate('mousemove', { nativeEvent: { offsetX: DEFAULT_MARGINS.left + 50, offsetY: DEFAULT_MARGINS.top + 50 } }); - component.find('svg').at(0).simulate('mousedown', { nativeEvent: { offsetX: DEFAULT_MARGINS.left + 50, offsetY: DEFAULT_MARGINS.top + 50 } }); - component.find('svg').at(0).simulate('mousemove', { nativeEvent: { offsetX: DEFAULT_MARGINS.left + 100, offsetY: DEFAULT_MARGINS.top + 100 } }); + component.find('svg').at(0).simulate('mousemove', { + nativeEvent: { offsetX: DEFAULT_MARGINS.left + 50, offsetY: DEFAULT_MARGINS.top + 50 } + }); + component.find('svg').at(0).simulate('mousedown', { + nativeEvent: { offsetX: DEFAULT_MARGINS.left + 50, offsetY: DEFAULT_MARGINS.top + 50 } + }); + component.find('svg').at(0).simulate('mousemove', { + nativeEvent: { offsetX: DEFAULT_MARGINS.left + 100, offsetY: DEFAULT_MARGINS.top + 100 } + }); selectionBrush = component.find(EuiSelectionBrush); expect(selectionBrush).toMatchSnapshot(); @@ -112,7 +132,9 @@ describe('EuiSelectionBrush', () => { expect(selectionBrush.find('rect').at(0).props().y).toBe(50); expect(selectionBrush.find('rect').at(0).props().width).toBe(50); expect(selectionBrush.find('rect').at(0).props().height).toBe(50); - component.find('svg').at(0).simulate('mouseup', { nativeEvent: { offsetX: DEFAULT_MARGINS.left + 100, offsetY: DEFAULT_MARGINS.top + 100 } }); + component.find('svg').at(0).simulate('mouseup', { + nativeEvent: { offsetX: DEFAULT_MARGINS.left + 100, offsetY: DEFAULT_MARGINS.top + 100 } + }); selectionBrush = component.find(EuiSelectionBrush); expect(selectionBrush.find('rect').at(0).props().x).toBe(0); expect(selectionBrush.find('rect').at(0).props().y).toBe(0); @@ -138,10 +160,18 @@ describe('EuiSelectionBrush', () => { ); let selectionBrush = component.find(EuiSelectionBrush); expect(selectionBrush.exists()).toBe(true); - component.find('svg').at(0).simulate('mousemove', { nativeEvent: { offsetX: DEFAULT_MARGINS.left + 50, offsetY: DEFAULT_MARGINS.top + 50 } }); - component.find('svg').at(0).simulate('mousedown', { nativeEvent: { offsetX: DEFAULT_MARGINS.left + 50, offsetY: DEFAULT_MARGINS.top + 50 } }); - component.find('svg').at(0).simulate('mousemove', { nativeEvent: { offsetX: DEFAULT_MARGINS.left + 100, offsetY: DEFAULT_MARGINS.top + 100 } }); - component.find('svg').at(0).simulate('mouseup', { nativeEvent: { offsetX: DEFAULT_MARGINS.left + 100, offsetY: DEFAULT_MARGINS.top + 100 } }); + component.find('svg').at(0).simulate('mousemove', { + nativeEvent: { offsetX: DEFAULT_MARGINS.left + 50, offsetY: DEFAULT_MARGINS.top + 50 } + }); + component.find('svg').at(0).simulate('mousedown', { + nativeEvent: { offsetX: DEFAULT_MARGINS.left + 50, offsetY: DEFAULT_MARGINS.top + 50 } + }); + component.find('svg').at(0).simulate('mousemove', { + nativeEvent: { offsetX: DEFAULT_MARGINS.left + 100, offsetY: DEFAULT_MARGINS.top + 100 } + }); + component.find('svg').at(0).simulate('mouseup', { + nativeEvent: { offsetX: DEFAULT_MARGINS.left + 100, offsetY: DEFAULT_MARGINS.top + 100 } + }); selectionBrush = component.find(EuiSelectionBrush); expect(onSelectionBrushEndMock.mock.calls.length).toBe(1); const expectedBrush = { @@ -158,7 +188,7 @@ describe('EuiSelectionBrush', () => { y1: 100, } }; - expect(onSelectionBrushEndMock.mock.calls[0][0]).toEqual(expectedBrush) + expect(onSelectionBrushEndMock.mock.calls[0][0]).toEqual(expectedBrush); }); test.skip(`get onSelectionBrushEnd call on ordinal x scale`, () => { const data = [{ x: 0, y: 2 }, { x: 1, y: 4 }]; @@ -200,6 +230,6 @@ describe('EuiSelectionBrush', () => { y1: 100, } }; - expect(onSelectionBrushEndMock.mock.calls[0][0]).toEqual(expectedBrush) + expect(onSelectionBrushEndMock.mock.calls[0][0]).toEqual(expectedBrush); }); }); diff --git a/src/components/xy_chart/series/area_series.test.js b/src/components/xy_chart/series/area_series.test.js index 98fe6d1b1480..4b63f09b5145 100644 --- a/src/components/xy_chart/series/area_series.test.js +++ b/src/components/xy_chart/series/area_series.test.js @@ -74,7 +74,7 @@ describe('EuiAreaSeries', () => { - ) + ); } const runtime = benchmarkFunction(renderChart); @@ -111,7 +111,7 @@ describe('EuiAreaSeries', () => { ))} - ) + ); } const runtime = benchmarkFunction(renderChart); diff --git a/src/components/xy_chart/series/bar_series.js b/src/components/xy_chart/series/bar_series.js index c33a5c24c2b1..e9bfa306dccb 100644 --- a/src/components/xy_chart/series/bar_series.js +++ b/src/components/xy_chart/series/bar_series.js @@ -11,10 +11,10 @@ export class EuiBarSeries extends AbstractSeries { isMouseOverValue: false, } static getParentConfig(attr, props) { - const { _orientation } = props; - return _orientation === ORIENTATION.HORIZONTAL - ? HorizontalBarSeries.getParentConfig(attr) - : VerticalBarSeries.getParentConfig(attr); + const { _orientation } = props; + return _orientation === ORIENTATION.HORIZONTAL + ? HorizontalBarSeries.getParentConfig(attr) + : VerticalBarSeries.getParentConfig(attr); } _onValueMouseOver = () => { this.setState(() => ({ isMouseOverValue: true })); diff --git a/src/components/xy_chart/series/histogram_series.js b/src/components/xy_chart/series/histogram_series.js index a39f594403c9..a18a1e4cc0a7 100644 --- a/src/components/xy_chart/series/histogram_series.js +++ b/src/components/xy_chart/series/histogram_series.js @@ -10,10 +10,10 @@ export class EuiHistogramSeries extends AbstractSeries { isMouseOverValue: false, } static getParentConfig(attr, props) { - const { _orientation } = props; - return _orientation === ORIENTATION.HORIZONTAL - ? HorizontalRectSeries.getParentConfig(attr) - : VerticalRectSeries.getParentConfig(attr); + const { _orientation } = props; + return _orientation === ORIENTATION.HORIZONTAL + ? HorizontalRectSeries.getParentConfig(attr) + : VerticalRectSeries.getParentConfig(attr); } _onValueMouseOver = () => { this.setState(() => ({ isMouseOverValue: true })); diff --git a/src/components/xy_chart/series/horizontal_bar_series.test.js b/src/components/xy_chart/series/horizontal_bar_series.test.js index c19b6e9e65c4..a4634ec71563 100644 --- a/src/components/xy_chart/series/horizontal_bar_series.test.js +++ b/src/components/xy_chart/series/horizontal_bar_series.test.js @@ -23,20 +23,20 @@ describe('EuiHorizontalBarSeries', () => { expect(component.find('.rv-xy-plot__series')).toHaveLength(1); - const rects = component.find('.rv-xy-plot__series--bar rect') + const rects = component.find('.rv-xy-plot__series--bar rect'); expect(rects).toHaveLength(2); - const firstRectProps = rects.at(0).props() - expect(firstRectProps.x).toBeDefined() - expect(firstRectProps.y).toBeDefined() - expect(firstRectProps.width).toBeDefined() - expect(firstRectProps.height).toBeDefined() + const firstRectProps = rects.at(0).props(); + expect(firstRectProps.x).toBeDefined(); + expect(firstRectProps.y).toBeDefined(); + expect(firstRectProps.width).toBeDefined(); + expect(firstRectProps.height).toBeDefined(); - const secondRectProps = rects.at(1).props() - expect(secondRectProps.x).toBeDefined() - expect(secondRectProps.y).toBeDefined() - expect(secondRectProps.width).toBeDefined() - expect(secondRectProps.height).toBeDefined() + const secondRectProps = rects.at(1).props(); + expect(secondRectProps.x).toBeDefined(); + expect(secondRectProps.y).toBeDefined(); + expect(secondRectProps.width).toBeDefined(); + expect(secondRectProps.height).toBeDefined(); expect(component.render()).toMatchSnapshot(); }); diff --git a/src/components/xy_chart/series/horizontal_rect_series.test.js b/src/components/xy_chart/series/horizontal_rect_series.test.js index 2e8389748d4b..fdc5df469f84 100644 --- a/src/components/xy_chart/series/horizontal_rect_series.test.js +++ b/src/components/xy_chart/series/horizontal_rect_series.test.js @@ -23,20 +23,20 @@ describe('EuiHorizontalRectSeries', () => { expect(component.find('.rv-xy-plot__series')).toHaveLength(1); - const rects = component.find('.rv-xy-plot__series--rect rect') + const rects = component.find('.rv-xy-plot__series--rect rect'); expect(rects).toHaveLength(2); - const firstRectProps = rects.at(0).props() - expect(firstRectProps.x).toBeDefined() - expect(firstRectProps.y).toBeDefined() - expect(firstRectProps.width).toBeDefined() - expect(firstRectProps.height).toBeDefined() + const firstRectProps = rects.at(0).props(); + expect(firstRectProps.x).toBeDefined(); + expect(firstRectProps.y).toBeDefined(); + expect(firstRectProps.width).toBeDefined(); + expect(firstRectProps.height).toBeDefined(); - const secondRectProps = rects.at(1).props() - expect(secondRectProps.x).toBeDefined() - expect(secondRectProps.y).toBeDefined() - expect(secondRectProps.width).toBeDefined() - expect(secondRectProps.height).toBeDefined() + const secondRectProps = rects.at(1).props(); + expect(secondRectProps.x).toBeDefined(); + expect(secondRectProps.y).toBeDefined(); + expect(secondRectProps.width).toBeDefined(); + expect(secondRectProps.height).toBeDefined(); expect(component.render()).toMatchSnapshot(); }); diff --git a/src/components/xy_chart/series/line_series.js b/src/components/xy_chart/series/line_series.js index fff016674beb..047cf185d6c8 100644 --- a/src/components/xy_chart/series/line_series.js +++ b/src/components/xy_chart/series/line_series.js @@ -62,7 +62,7 @@ export class EuiLineSeries extends AbstractSeries { /> )}
- ) + ); } } diff --git a/src/components/xy_chart/series/line_series.test.js b/src/components/xy_chart/series/line_series.test.js index 104725cf33d5..6fc92066b53d 100644 --- a/src/components/xy_chart/series/line_series.test.js +++ b/src/components/xy_chart/series/line_series.test.js @@ -95,7 +95,7 @@ describe('EuiLineSeries', () => { - ) + ); } const runtime = benchmarkFunction(renderChart); @@ -132,7 +132,7 @@ describe('EuiLineSeries', () => { ))} - ) + ); } const runtime = benchmarkFunction(renderChart); diff --git a/src/components/xy_chart/series/vertical_bar_series.js b/src/components/xy_chart/series/vertical_bar_series.js index 1bfefae7d773..eaaf1faab399 100644 --- a/src/components/xy_chart/series/vertical_bar_series.js +++ b/src/components/xy_chart/series/vertical_bar_series.js @@ -19,7 +19,7 @@ export class EuiVerticalBarSeries extends VerticalBarSeries { } render() { - const { isMouseOverValue } = this.state + const { isMouseOverValue } = this.state; const { name, data, color, onValueClick, ...rest } = this.props; const isHighDataVolume = data.length > 80 ? true : false; const classes = classNames( diff --git a/src/components/xy_chart/series/vertical_bar_series.test.js b/src/components/xy_chart/series/vertical_bar_series.test.js index 1d20aa954b55..534741454a9b 100644 --- a/src/components/xy_chart/series/vertical_bar_series.test.js +++ b/src/components/xy_chart/series/vertical_bar_series.test.js @@ -24,20 +24,20 @@ describe('EuiVerticalBarSeries', () => { expect(component.find('.rv-xy-plot__series')).toHaveLength(1); - const rects = component.find('.rv-xy-plot__series--bar rect') + const rects = component.find('.rv-xy-plot__series--bar rect'); expect(rects).toHaveLength(2); - const firstRectProps = rects.at(0).props() - expect(firstRectProps.x).toBeDefined() - expect(firstRectProps.y).toBeDefined() - expect(firstRectProps.width).toBeDefined() - expect(firstRectProps.height).toBeDefined() + const firstRectProps = rects.at(0).props(); + expect(firstRectProps.x).toBeDefined(); + expect(firstRectProps.y).toBeDefined(); + expect(firstRectProps.width).toBeDefined(); + expect(firstRectProps.height).toBeDefined(); - const secondRectProps = rects.at(1).props() - expect(secondRectProps.x).toBeDefined() - expect(secondRectProps.y).toBeDefined() - expect(secondRectProps.width).toBeDefined() - expect(secondRectProps.height).toBeDefined() + const secondRectProps = rects.at(1).props(); + expect(secondRectProps.x).toBeDefined(); + expect(secondRectProps.y).toBeDefined(); + expect(secondRectProps.width).toBeDefined(); + expect(secondRectProps.height).toBeDefined(); expect(component.render()).toMatchSnapshot(); }); @@ -123,7 +123,7 @@ describe('EuiVerticalBarSeries', () => { - ) + ); } const runtime = benchmarkFunction(renderChart); @@ -160,7 +160,7 @@ describe('EuiVerticalBarSeries', () => { ))} - ) + ); } const runtime = benchmarkFunction(renderChart); diff --git a/src/components/xy_chart/series/vertical_rect_series.test.js b/src/components/xy_chart/series/vertical_rect_series.test.js index 466043a1ca68..29e965dd6979 100644 --- a/src/components/xy_chart/series/vertical_rect_series.test.js +++ b/src/components/xy_chart/series/vertical_rect_series.test.js @@ -24,20 +24,20 @@ describe('EuiVerticalRectSeries', () => { expect(component.find('.rv-xy-plot__series')).toHaveLength(1); - const rects = component.find('.rv-xy-plot__series--rect rect') + const rects = component.find('.rv-xy-plot__series--rect rect'); expect(rects).toHaveLength(2); - const firstRectProps = rects.at(0).props() - expect(firstRectProps.x).toBeDefined() - expect(firstRectProps.y).toBeDefined() - expect(firstRectProps.width).toBeDefined() - expect(firstRectProps.height).toBeDefined() + const firstRectProps = rects.at(0).props(); + expect(firstRectProps.x).toBeDefined(); + expect(firstRectProps.y).toBeDefined(); + expect(firstRectProps.width).toBeDefined(); + expect(firstRectProps.height).toBeDefined(); - const secondRectProps = rects.at(1).props() - expect(secondRectProps.x).toBeDefined() - expect(secondRectProps.y).toBeDefined() - expect(secondRectProps.width).toBeDefined() - expect(secondRectProps.height).toBeDefined() + const secondRectProps = rects.at(1).props(); + expect(secondRectProps.x).toBeDefined(); + expect(secondRectProps.y).toBeDefined(); + expect(secondRectProps.width).toBeDefined(); + expect(secondRectProps.height).toBeDefined(); expect(component.render()).toMatchSnapshot(); }); @@ -127,7 +127,7 @@ describe('EuiVerticalRectSeries', () => { - ) + ); } const runtime = benchmarkFunction(renderChart); @@ -164,7 +164,7 @@ describe('EuiVerticalRectSeries', () => { ))} - ) + ); } const runtime = benchmarkFunction(renderChart); diff --git a/src/components/xy_chart/utils/chart_utils.js b/src/components/xy_chart/utils/chart_utils.js index 060ab5e10717..95669496496a 100644 --- a/src/components/xy_chart/utils/chart_utils.js +++ b/src/components/xy_chart/utils/chart_utils.js @@ -54,10 +54,10 @@ export const CURVE = { CURVE_STEP: 'curveStep', CURVE_STEP_AFTER: 'curveStepAfter', CURVE_STEP_BEFORE: 'curveStepBefore', -} +}; export const EuiXYChartUtils = { ORIENTATION, SCALE, CURVE, -} +}; diff --git a/src/components/xy_chart/utils/series_utils.js b/src/components/xy_chart/utils/series_utils.js index aacc1438bf8f..5e4d5b761e73 100644 --- a/src/components/xy_chart/utils/series_utils.js +++ b/src/components/xy_chart/utils/series_utils.js @@ -18,7 +18,7 @@ export function isSeriesChild(child) { */ export function getSeriesChildren(children) { return React.Children.toArray(children).filter(child => - child && isSeriesChild(child)); + child && isSeriesChild(child)); } export function rotateDataSeries(data) { @@ -28,6 +28,6 @@ export function rotateDataSeries(data) { y: d.x, x0: d.y0, y0: d.x0, - } - }) + }; + }); } diff --git a/src/components/xy_chart/utils/text_utils.js b/src/components/xy_chart/utils/text_utils.js index 5e10936206fb..bd2de7cbc089 100644 --- a/src/components/xy_chart/utils/text_utils.js +++ b/src/components/xy_chart/utils/text_utils.js @@ -26,7 +26,7 @@ function wordWrap(text, width = 75, cut = false) { if (!text) { return text; } - const regex = '.{1,' + width + '}(s|$)' + (cut ? '|.{' + width + '}|.+$' : '|S+?(s|$)'); + const regex = `.{1,${ width }}(s|$)${ cut ? `|.{${ width }}|.+$` : '|S+?(s|$)'}`; return text.match(RegExp(regex, 'g')); } export const EuiXYChartTextUtils = { diff --git a/src/components/xy_chart/utils/visualization_color_type.js b/src/components/xy_chart/utils/visualization_color_type.js index a93b62e19623..2ce053adc335 100644 --- a/src/components/xy_chart/utils/visualization_color_type.js +++ b/src/components/xy_chart/utils/visualization_color_type.js @@ -3,7 +3,7 @@ import { VISUALIZATION_COLORS } from '../../../services'; export function VisualizationColorType(props, propName) { const color = props[propName]; if (color === undefined) { - return + return; } // TODO upgrade this to check all possible color string formats // using libs like colorjs @@ -13,4 +13,4 @@ export function VisualizationColorType(props, propName) { if (!VISUALIZATION_COLORS.includes(color.toUpperCase())) { console.warn('Prefer safe EUI Visualization Colors.'); } -}; +} diff --git a/src/components/xy_chart/xy_chart.js b/src/components/xy_chart/xy_chart.js index a01288e400f4..76d39ccfe830 100644 --- a/src/components/xy_chart/xy_chart.js +++ b/src/components/xy_chart/xy_chart.js @@ -143,9 +143,9 @@ class XYChart extends PureComponent { .toArray(children) .filter(this._isAbstractSeries) .filter(child => { - return child.props.data && child.props.data.length > 0 + return child.props.data && child.props.data.length > 0; }) - .length === 0 + .length === 0; } /** @@ -154,14 +154,14 @@ class XYChart extends PureComponent { _isAbstractSeries(child) { const { prototype } = child.type; // Avoid applying chart props to non series children - return prototype instanceof AbstractSeries + return prototype instanceof AbstractSeries; } /** * Render children adding a valid EUI visualization color if the color prop is not specified. */ - _renderChildren (children) { + _renderChildren(children) { let colorIterator = 0; return React.Children.map(children, (child, i) => { @@ -184,8 +184,8 @@ class XYChart extends PureComponent { } _getSeriesNames = (children) => { return React.Children.toArray(children) - .filter(this._isAbstractSeries) - .map(({ props: { name } }) => (name)); + .filter(this._isAbstractSeries) + .map(({ props: { name } }) => (name)); } render() { @@ -224,7 +224,7 @@ class XYChart extends PureComponent { } /> - ) + ); } const Crosshair = orientation === HORIZONTAL ? EuiCrosshairY : EuiCrosshairX; diff --git a/src/components/xy_chart/xy_chart.test.js b/src/components/xy_chart/xy_chart.test.js index 0dee8a01626f..2dbbfba3d759 100644 --- a/src/components/xy_chart/xy_chart.test.js +++ b/src/components/xy_chart/xy_chart.test.js @@ -45,7 +45,7 @@ describe('EuiXYChart', () => { }); test('renders an empty chart', () => { - const EMPTY_CHART_MESSAGE = '~~Empty Chart~~' + const EMPTY_CHART_MESSAGE = '~~Empty Chart~~'; const component = mount( { }); test('renders right default colors', () => { - const data = [ { x:0, y: 1 }, { x:1, y: 2 }]; + const data = [ { x: 0, y: 1 }, { x: 1, y: 2 }]; const series = new Array(VISUALIZATION_COLORS.length * 2) .fill(0) .map((color, i) => { @@ -81,15 +81,15 @@ describe('EuiXYChart', () => { ); - expect(component.find(EuiLineSeries)).toHaveLength(VISUALIZATION_COLORS.length * 2) + expect(component.find(EuiLineSeries)).toHaveLength(VISUALIZATION_COLORS.length * 2); VISUALIZATION_COLORS.forEach((color, i) => { expect(component.find(EuiLineSeries).at(i).props().color).toBe(color); expect(component.find(EuiLineSeries).at(i + VISUALIZATION_COLORS.length).props().color).toBe(color); - }) + }); }); test('renders default colors together with existing series colors', () => { - const data = [ { x:0, y: 1 }, { x:1, y: 2 }]; + const data = [ { x: 0, y: 1 }, { x: 1, y: 2 }]; const AVAILABLE_COLORS = VISUALIZATION_COLORS.length; const series = new Array(AVAILABLE_COLORS * 2) .fill(0) @@ -109,8 +109,8 @@ describe('EuiXYChart', () => { } ); - const lineComponents = component.find(EuiLineSeries) - expect(lineComponents).toHaveLength(AVAILABLE_COLORS * 2 + 1) + const lineComponents = component.find(EuiLineSeries); + expect(lineComponents).toHaveLength(AVAILABLE_COLORS * 2 + 1); // check before expect(lineComponents.at(0).props().color).toBe(VISUALIZATION_COLORS[0]); // check if the inserted element maintain its own color @@ -121,8 +121,8 @@ describe('EuiXYChart', () => { }); test(`Check wrong EUI color warning`, () => { - const data = [ { x:0, y: 1 }, { x:1, y: 2 }]; - const original = console.warn + const data = [ { x: 0, y: 1 }, { x: 1, y: 2 }]; + const original = console.warn; const mock = jest.fn(); console.warn = mock; mount( diff --git a/yarn.lock b/yarn.lock index a071a18366fb..1f432462fdad 100644 --- a/yarn.lock +++ b/yarn.lock @@ -125,6 +125,10 @@ acorn@^5.0.0, acorn@^5.2.1, acorn@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.3.0.tgz#7446d39459c54fb49a80e6ee6478149b940ec822" +address@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/address/-/address-1.0.3.tgz#b5f50631f8d6cec8bd20c963963afb55e06cbce9" + adm-zip@0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.2.1.tgz#e801cedeb5bd9a4e98d699c5c0f4239e2731dcbf" @@ -265,6 +269,10 @@ aproba@^1.0.3: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" +arch@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/arch/-/arch-2.1.1.tgz#8f5c2731aa35a30929221bb0640eed65175ec84e" + archiver-utils@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-1.3.0.tgz#e50b4c09c70bf3d680e32ff1b7994e9f9d895174" @@ -296,12 +304,25 @@ are-we-there-yet@~1.1.2: delegates "^1.0.0" readable-stream "^2.0.6" +arg@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arg/-/arg-2.0.0.tgz#c06e7ff69ab05b3a4a03ebe0407fac4cba657545" + argparse@^1.0.7: version "1.0.9" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" dependencies: sprintf-js "~1.0.2" +args@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/args/-/args-4.0.0.tgz#5ca24cdba43d4b17111c56616f5f2e9d91933954" + dependencies: + camelcase "5.0.0" + chalk "2.3.2" + leven "2.1.0" + mri "1.1.0" + aria-query@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-0.7.0.tgz#4af10a1e61573ddea0cf3b99b51c52c05b424d24" @@ -1221,6 +1242,12 @@ base@^0.11.1: mixin-deep "^1.2.0" pascalcase "^0.1.1" +basic-auth@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-2.0.0.tgz#015db3f353e02e56377755f962742e8981e7bbba" + dependencies: + safe-buffer "5.1.1" + batch@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" @@ -1339,7 +1366,7 @@ boom@5.x.x: dependencies: hoek "4.x.x" -boxen@^1.2.1: +boxen@1.3.0, boxen@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" dependencies: @@ -1554,6 +1581,10 @@ camelcase-keys@^2.0.0: camelcase "^2.0.0" map-obj "^1.0.0" +camelcase@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.0.0.tgz#03295527d58bd3cd4aa75363f35b2e8d97be2f42" + camelcase@^1.0.2: version "1.2.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" @@ -1621,6 +1652,30 @@ chai@^4.1.2: pathval "^1.0.0" type-detect "^4.0.0" +chalk@2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.0.tgz#a060a297a6b57e15b61ca63ce84995daa0fe6e52" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@2.4.1, chalk@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" @@ -1639,14 +1694,6 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0: escape-string-regexp "^1.0.5" supports-color "^4.0.0" -chalk@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - chardet@^0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" @@ -1802,6 +1849,13 @@ cli-width@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" +clipboardy@1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/clipboardy/-/clipboardy-1.2.3.tgz#0526361bf78724c1f20be248d428e365433c07ef" + dependencies: + arch "^2.1.0" + execa "^0.8.0" + cliui@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" @@ -1984,6 +2038,12 @@ compressible@~2.0.11: dependencies: mime-db ">= 1.30.0 < 2" +compressible@~2.0.13: + version "2.0.14" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.14.tgz#326c5f507fbb055f54116782b969a81b67a29da7" + dependencies: + mime-db ">= 1.34.0 < 2" + compression@^1.5.2: version "1.7.1" resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.1.tgz#eff2603efc2e22cf86f35d2eb93589f9875373db" @@ -1996,6 +2056,18 @@ compression@^1.5.2: safe-buffer "5.1.1" vary "~1.1.2" +compression@^1.6.2: + version "1.7.2" + resolved "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz#aaffbcd6aaf854b44ebb280353d5ad1651f59a69" + dependencies: + accepts "~1.3.4" + bytes "3.0.0" + compressible "~2.0.13" + debug "2.6.9" + on-headers "~1.0.1" + safe-buffer "5.1.1" + vary "~1.1.2" + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -2069,7 +2141,7 @@ content-type-parser@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.2.tgz#caabe80623e63638b2502fd4c7f12ff4ce2352e7" -content-type@~1.0.4: +content-type@1.0.4, content-type@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" @@ -2367,6 +2439,88 @@ cycle@1.0.x: version "1.0.3" resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2" +d3-array@1, d3-array@^1.1.1, d3-array@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-1.2.1.tgz#d1ca33de2f6ac31efadb8e050a021d7e2396d5dc" + +d3-collection@1, d3-collection@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/d3-collection/-/d3-collection-1.0.4.tgz#342dfd12837c90974f33f1cc0a785aea570dcdc2" + +d3-color@1, d3-color@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-1.2.0.tgz#d1ea19db5859c86854586276ec892cf93148459a" + +d3-contour@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/d3-contour/-/d3-contour-1.3.0.tgz#cfb99098c48c46edd77e15ce123162f9e333e846" + dependencies: + d3-array "^1.1.1" + +d3-format@1, d3-format@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-1.3.0.tgz#a3ac44269a2011cdb87c7b5693040c18cddfff11" + +d3-geo@^1.6.4: + version "1.10.0" + resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-1.10.0.tgz#2972d18014f1e38fc1f8bb6d545377bdfb00c9ab" + dependencies: + d3-array "1" + +d3-hierarchy@^1.1.4: + version "1.1.6" + resolved "https://registry.yarnpkg.com/d3-hierarchy/-/d3-hierarchy-1.1.6.tgz#842c1372090f870b7ea013ebae5c0c8d9f56229c" + +d3-interpolate@1, d3-interpolate@^1.1.4: + version "1.2.0" + resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-1.2.0.tgz#40d81bd8e959ff021c5ea7545bc79b8d22331c41" + dependencies: + d3-color "1" + +d3-path@1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-1.0.5.tgz#241eb1849bd9e9e8021c0d0a799f8a0e8e441764" + +d3-sankey@^0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/d3-sankey/-/d3-sankey-0.7.1.tgz#d229832268fc69a7fec84803e96c2256a614c521" + dependencies: + d3-array "1" + d3-collection "1" + d3-shape "^1.2.0" + +d3-scale@^1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-1.0.7.tgz#fa90324b3ea8a776422bd0472afab0b252a0945d" + dependencies: + d3-array "^1.2.0" + d3-collection "1" + d3-color "1" + d3-format "1" + d3-interpolate "1" + d3-time "1" + d3-time-format "2" + +d3-shape@^1.1.0, d3-shape@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-1.2.0.tgz#45d01538f064bafd05ea3d6d2cb748fd8c41f777" + dependencies: + d3-path "1" + +d3-time-format@2: + version "2.1.1" + resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-2.1.1.tgz#85b7cdfbc9ffca187f14d3c456ffda268081bb31" + dependencies: + d3-time "1" + +d3-time@1: + version "1.0.8" + resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-1.0.8.tgz#dbd2d6007bf416fe67a76d17947b784bffea1e84" + +d3-voronoi@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/d3-voronoi/-/d3-voronoi-1.1.2.tgz#1687667e8f13a2d158c80c1480c5a29cb0d8973c" + d@1: version "1.0.0" resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" @@ -2377,7 +2531,7 @@ damerau-levenshtein@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.4.tgz#03191c432cb6eea168bb77f3a55ffdccb8978514" -dargs@^5.1.0: +dargs@5.1.0, dargs@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/dargs/-/dargs-5.1.0.tgz#ec7ea50c78564cd36c9d5ec18f66329fade27829" @@ -2395,7 +2549,7 @@ dateformat@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.2.tgz#9a4df4bff158ac2f34bc637abdb15471607e1659" -debug@2, debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9: +debug@2, debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: @@ -2515,7 +2669,7 @@ depd@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" -depd@~1.1.1: +depd@~1.1.1, depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" @@ -2556,6 +2710,13 @@ detect-node@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.3.tgz#a2033c09cc8e158d37748fbde7507832bd6ce127" +detect-port@1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.2.3.tgz#15bf49820d02deb84bfee0a74876b32d791bf610" + dependencies: + address "^1.0.1" + debug "^2.6.0" + diff@3.5.0, diff@^3.1.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" @@ -2757,7 +2918,7 @@ emojis-list@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" -encodeurl@~1.0.1: +encodeurl@~1.0.1, encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" @@ -2908,10 +3069,6 @@ es6-promise@^3.0.2: version "3.3.1" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" -es6-promise@^4.0.3: - version "4.2.4" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29" - es6-set@~0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" @@ -3260,6 +3417,18 @@ execa@^0.7.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +execa@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + execall@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/execall/-/execall-1.0.0.tgz#73d0904e395b3cab0658b08d09ec25307f29bb73" @@ -3523,6 +3692,10 @@ fileset@^2.0.2: glob "^7.0.3" minimatch "^3.0.3" +filesize@3.6.1: + version "3.6.1" + resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317" + fill-range@^2.1.0: version "2.2.3" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" @@ -3695,6 +3868,14 @@ from@~0: version "0.1.7" resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" +fs-extra@6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-6.0.1.tgz#8abc128f7946e310135ddc93b98bddb410e7a34b" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs-extra@^0.30.0: version "0.30.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" @@ -3705,14 +3886,6 @@ fs-extra@^0.30.0: path-is-absolute "^1.0.0" rimraf "^2.2.8" -fs-extra@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950" - dependencies: - graceful-fs "^4.1.2" - jsonfile "^2.1.0" - klaw "^1.0.0" - fs-extra@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" @@ -3945,7 +4118,7 @@ global-dirs@^0.1.0: dependencies: ini "^1.3.4" -global@~4.3.0: +global@^4.3.1, global@~4.3.0: version "4.3.2" resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" dependencies: @@ -4106,7 +4279,7 @@ handle-thing@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-1.2.5.tgz#fd7aad726bf1a5fd16dfc29b2f7a6601d27139c4" -handlebars@^4.0.3: +handlebars@4.0.11, handlebars@^4.0.3: version "4.0.11" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" dependencies: @@ -4236,13 +4409,6 @@ hash.js@^1.0.0, hash.js@^1.0.3: inherits "^2.0.3" minimalistic-assert "^1.0.0" -hasha@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/hasha/-/hasha-2.2.0.tgz#78d7cbfc1e6d66303fe79837365984517b2f6ee1" - dependencies: - is-stream "^1.0.1" - pinkie-promise "^2.0.0" - hawk@3.1.3, hawk@~3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" @@ -4290,6 +4456,10 @@ hoek@2.x.x: version "2.16.3" resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" +hoek@4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb" + hoek@4.x.x: version "4.2.0" resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.0.tgz#72d9d0754f7fe25ca2d01ad8f8f9a9449a89526d" @@ -4674,7 +4844,7 @@ ip-regex@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-1.0.3.tgz#dc589076f659f419c222039a33316f1c7387effd" -ip@^1.1.0, ip@^1.1.5: +ip@1.1.5, ip@^1.1.0, ip@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" @@ -4979,7 +5149,7 @@ is-scoped@^1.0.0: dependencies: scoped-regex "^1.0.0" -is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: +is-stream@1.1.0, is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -5675,7 +5845,7 @@ left-pad@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee" -leven@^2.1.0: +leven@2.1.0, leven@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" @@ -6087,6 +6257,22 @@ methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" +micro-compress@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/micro-compress/-/micro-compress-1.0.0.tgz#53f5a80b4ad0320ca165a559b6e3df145d4f704f" + dependencies: + compression "^1.6.2" + +micro@9.3.1: + version "9.3.1" + resolved "https://registry.yarnpkg.com/micro/-/micro-9.3.1.tgz#0c37eba0171554b1beccda5215ff8ea4e7aa59d6" + dependencies: + arg "2.0.0" + chalk "2.4.0" + content-type "1.0.4" + is-stream "1.1.0" + raw-body "2.3.2" + micromatch@^2.1.5, micromatch@^2.3.11: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" @@ -6134,10 +6320,24 @@ miller-rabin@^4.0.0: version "1.32.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.32.0.tgz#485b3848b01a3cda5f968b4882c0771e58e09414" +"mime-db@>= 1.34.0 < 2": + version "1.34.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.34.0.tgz#452d0ecff5c30346a6dc1e64b1eaee0d3719ff9a" + mime-db@~1.30.0: version "1.30.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" +mime-db@~1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" + +mime-types@2.1.18: + version "2.1.18" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" + dependencies: + mime-db "~1.33.0" + mime-types@^2.1.12, mime-types@~2.1.15, mime-types@~2.1.16, mime-types@~2.1.17, mime-types@~2.1.7: version "2.1.17" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a" @@ -6266,6 +6466,10 @@ moment@^2.20.1: version "2.20.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.20.1.tgz#d6eb1a46cbcc14a2b2f9434112c1ff8907f313fd" +mri@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.0.tgz#5c0a3f29c8ccffbbb1ec941dcec09d71fa32f36a" + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -6498,6 +6702,10 @@ node-status-codes@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/node-status-codes/-/node-status-codes-1.0.0.tgz#5ae5541d024645d32a58fcddc9ceecea7ae3ac2f" +node-version@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/node-version/-/node-version-1.1.3.tgz#1081c87cce6d2dbbd61d0e51e28c287782678496" + nodeclient-spectre@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/nodeclient-spectre/-/nodeclient-spectre-1.0.3.tgz#831ce6151cc897174843f9289db76002260aa1b3" @@ -6797,6 +7005,16 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" +openssl-self-signed-certificate@1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/openssl-self-signed-certificate/-/openssl-self-signed-certificate-1.1.6.tgz#9d3a4776b1a57e9847350392114ad2f915a83dd4" + +opn@5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/opn/-/opn-5.3.0.tgz#64871565c863875f052cfdf53d3e3cb5adb53b1c" + dependencies: + is-wsl "^1.1.0" + opn@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/opn/-/opn-4.0.2.tgz#7abc22e644dff63b0a96d5ab7f2790c0f01abc95" @@ -7096,7 +7314,7 @@ path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" -path-is-inside@^1.0.1, path-is-inside@^1.0.2: +path-is-inside@1.0.2, path-is-inside@^1.0.1, path-is-inside@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" @@ -7122,6 +7340,12 @@ path-to-regexp@^1.7.0: dependencies: isarray "0.0.1" +path-type@3.0.0, path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + dependencies: + pify "^3.0.0" + path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" @@ -7136,12 +7360,6 @@ path-type@^2.0.0: dependencies: pify "^2.0.0" -path-type@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - dependencies: - pify "^3.0.0" - pathval@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" @@ -7178,20 +7396,6 @@ performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" -phantomjs-prebuilt@^2.1.16: - version "2.1.16" - resolved "https://registry.yarnpkg.com/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.16.tgz#efd212a4a3966d3647684ea8ba788549be2aefef" - dependencies: - es6-promise "^4.0.3" - extract-zip "^1.6.5" - fs-extra "^1.0.0" - hasha "^2.2.0" - kew "^0.7.0" - progress "^1.1.8" - request "^2.81.0" - request-progress "^2.0.1" - which "^1.2.10" - pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -7657,10 +7861,6 @@ progress@2.0.0, progress@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" -progress@^1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" - promise@^7.1.1: version "7.3.1" resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" @@ -7797,7 +7997,7 @@ querystringify@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-1.0.0.tgz#6286242112c5b712fa654e526652bf6a13ff05cb" -raf@^3.4.0: +raf@^3.1.0, raf@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.0.tgz#a28876881b4bc2ca9117d4138163ddb80f781575" dependencies: @@ -7919,6 +8119,14 @@ react-input-autosize@^2.2.1: dependencies: prop-types "^15.5.8" +react-motion@^0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/react-motion/-/react-motion-0.5.2.tgz#0dd3a69e411316567927917c6626551ba0607316" + dependencies: + performance-now "^0.2.0" + prop-types "^15.5.8" + raf "^3.1.0" + react-onclickoutside@^6.7.1: version "6.7.1" resolved "https://registry.yarnpkg.com/react-onclickoutside/-/react-onclickoutside-6.7.1.tgz#6a5b5b8b4eae6b776259712c89c8a2b36b17be93" @@ -7984,6 +8192,28 @@ react-virtualized@^9.18.5: loose-envify "^1.3.0" prop-types "^15.6.0" +react-vis@^1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/react-vis/-/react-vis-1.10.1.tgz#e9b49474001186666b4094cfa8b0395f74b22df6" + dependencies: + d3-array "^1.2.0" + d3-collection "^1.0.3" + d3-color "^1.0.3" + d3-contour "^1.1.0" + d3-format "^1.2.0" + d3-geo "^1.6.4" + d3-hierarchy "^1.1.4" + d3-interpolate "^1.1.4" + d3-sankey "^0.7.1" + d3-scale "^1.0.5" + d3-shape "^1.1.0" + d3-voronoi "^1.1.2" + deep-equal "^1.0.1" + global "^4.3.1" + hoek "4.2.1" + prop-types "^15.5.8" + react-motion "^0.5.2" + react@^16.3.0: version "16.3.2" resolved "https://registry.yarnpkg.com/react/-/react-16.3.2.tgz#fdc8420398533a1e58872f59091b272ce2f91ea9" @@ -8237,6 +8467,13 @@ regexpu-core@^2.0.0: regjsgen "^0.2.0" regjsparser "^0.1.4" +registry-auth-token@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.2.tgz#851fd49038eecb586911115af845260eec983f20" + dependencies: + rc "^1.1.6" + safe-buffer "^5.0.1" + registry-auth-token@^3.0.1: version "3.3.1" resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.1.tgz#fb0d3289ee0d9ada2cbb52af5dfe66cb070d3006" @@ -8244,7 +8481,7 @@ registry-auth-token@^3.0.1: rc "^1.1.6" safe-buffer "^5.0.1" -registry-url@^3.0.3: +registry-url@3.1.0, registry-url@^3.0.3: version "3.1.0" resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942" dependencies: @@ -8300,12 +8537,6 @@ replace-ext@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" -request-progress@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-2.0.1.tgz#5d36bb57961c673aa5b788dbc8141fdf23b44e08" - dependencies: - throttleit "^1.0.0" - request-promise-core@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6" @@ -8774,6 +9005,24 @@ send@0.16.1: range-parser "~1.2.0" statuses "~1.3.1" +send@0.16.2: + version "0.16.2" + resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.6.2" + mime "1.4.1" + ms "2.0.0" + on-finished "~2.3.0" + range-parser "~1.2.0" + statuses "~1.4.0" + serializerr@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/serializerr/-/serializerr-1.0.3.tgz#12d4c5aa1c3ffb8f6d1dc5f395aa9455569c3f91" @@ -8801,6 +9050,33 @@ serve-static@1.13.1: parseurl "~1.3.2" send "0.16.1" +serve@^6.3.1: + version "6.5.8" + resolved "https://registry.yarnpkg.com/serve/-/serve-6.5.8.tgz#fd7ad6b9c10ba12084053030cc1a8b636c0a10a7" + dependencies: + args "4.0.0" + basic-auth "2.0.0" + bluebird "3.5.1" + boxen "1.3.0" + chalk "2.4.1" + clipboardy "1.2.3" + dargs "5.1.0" + detect-port "1.2.3" + filesize "3.6.1" + fs-extra "6.0.1" + handlebars "4.0.11" + ip "1.1.5" + micro "9.3.1" + micro-compress "1.0.0" + mime-types "2.1.18" + node-version "1.1.3" + openssl-self-signed-certificate "1.1.6" + opn "5.3.0" + path-is-inside "1.0.2" + path-type "3.0.0" + send "0.16.2" + update-check "1.5.1" + set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -9155,7 +9431,7 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" -"statuses@>= 1.3.1 < 2": +"statuses@>= 1.3.1 < 2", statuses@~1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" @@ -9500,10 +9776,6 @@ throat@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" -throttleit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" - through2@^2.0.0, through2@^2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" @@ -9792,6 +10064,13 @@ unzip-response@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" +update-check@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/update-check/-/update-check-1.5.1.tgz#24fc52266273cb8684d2f1bf9687c0e52dcf709f" + dependencies: + registry-auth-token "3.3.2" + registry-url "3.1.0" + update-notifier@^2.1.0: version "2.3.0" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.3.0.tgz#4e8827a6bb915140ab093559d7014e3ebb837451" @@ -10128,7 +10407,6 @@ wdio-visual-regression-service@silne30/wdio-visual-regression-service#Add_Filena lodash "^4.13.1" node-resemble-js "0.0.5" nodeclient-spectre "^1.0.3" - phantomjs-prebuilt "^2.1.16" platform "^1.3.1" wdio-screenshot "^0.6.0"