diff --git a/CHANGELOG.md b/CHANGELOG.md index 37f8836fc6..da5d8aa650 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -844,7 +844,7 @@ Non-breaking changes: ### Bug Fixes -* align series names on splitted series configuration ([#421](https://github.com/elastic/elastic-charts/issues/421)) ([bbecbcc](https://github.com/elastic/elastic-charts/commit/bbecbcc)), closes [#420](https://github.com/elastic/elastic-charts/issues/420) +* align series names on split series configuration ([#421](https://github.com/elastic/elastic-charts/issues/421)) ([bbecbcc](https://github.com/elastic/elastic-charts/commit/bbecbcc)), closes [#420](https://github.com/elastic/elastic-charts/issues/420) ## [13.5.2](https://github.com/elastic/elastic-charts/compare/v13.5.1...v13.5.2) (2019-10-10) @@ -1167,7 +1167,7 @@ Non-breaking changes: ### Bug Fixes -* handle splitted series with group value to 0 ([#289](https://github.com/elastic/elastic-charts/issues/289)) ([0f2217e](https://github.com/elastic/elastic-charts/commit/0f2217e)), closes [#288](https://github.com/elastic/elastic-charts/issues/288) +* handle split series with group value to 0 ([#289](https://github.com/elastic/elastic-charts/issues/289)) ([0f2217e](https://github.com/elastic/elastic-charts/commit/0f2217e)), closes [#288](https://github.com/elastic/elastic-charts/issues/288) # [9.0.0](https://github.com/elastic/elastic-charts/compare/v8.1.8...v9.0.0) (2019-08-05) diff --git a/api/charts.api.md b/api/charts.api.md index 0128b08ef4..355e600caf 100644 --- a/api/charts.api.md +++ b/api/charts.api.md @@ -1979,7 +1979,7 @@ export type YDomainRange = YDomainBase & DomainRange; // src/chart_types/partition_chart/layout/types/config_types.ts:128:5 - (ae-forgotten-export) The symbol "TimeMs" needs to be exported by the entry point index.d.ts // src/chart_types/partition_chart/layout/types/config_types.ts:129:5 - (ae-forgotten-export) The symbol "AnimKeyframe" needs to be exported by the entry point index.d.ts // src/chart_types/partition_chart/specs/index.ts:48:13 - (ae-forgotten-export) The symbol "NodeColorAccessor" needs to be exported by the entry point index.d.ts -// src/commons/series_id.ts:40:3 - (ae-forgotten-export) The symbol "SeriesKey" needs to be exported by the entry point index.d.ts +// src/common/series_id.ts:40:3 - (ae-forgotten-export) The symbol "SeriesKey" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/docs/0-Intro/1-Overview.mdx b/docs/0-Intro/1-Overview.mdx index c0b1f9a7ea..b3349d9bc3 100644 --- a/docs/0-Intro/1-Overview.mdx +++ b/docs/0-Intro/1-Overview.mdx @@ -228,9 +228,9 @@ On the current `Visualize Editor`, you can stack or cluster in the following cas ### Multiple charts/Split charts/Small Multiples (phase 2) -Small multiples are created using the `` component, that takes multiple `` component with the usual element inside. `` can contain only `BarSeries` `AreaSeries` and `LineSeries` Axis and other configuration need to be configured outside the `SplittedSeries` element. +Small multiples are created using the `` component, that takes multiple `` component with the usual element inside. `` can contain only `BarSeries` `AreaSeries` and `LineSeries` Axis and other configuration need to be configured outside the `splitSeries` element. -In the case of small multiples, each `SplittedSeries` computes its own x and y domains. Then the x domains are merged and expanded. The same happens with the main Y domains; they are merged together. +In the case of small multiples, each `splitSeries` computes its own x and y domains. Then the x domains are merged and expanded. The same happens with the main Y domains; they are merged together. ### Color/Style overrides @@ -283,7 +283,7 @@ config: { } } ``` -`textInvertible` will have to be set to true for `textContrast` to be set as well. To see an example of where this applies, please see the Partitions Background story within Stylings. Charts are included below but are static. +`textInvertible` will have to be set to true for `textContrast` to be set as well. To see an example of where this applies, please see the Partitions Background story within Stylings. Charts are included below but are static. If you have `textInvertible` set to true, but do not have `textContrast` set to true, then the red slices, Europe, North America, and Asia, will have white text: @@ -351,10 +351,10 @@ If you have `textInvertible` set to true, but do not have `textContrast` set to }} /> - -Now if you set the `textContrast` to true as well, these slices also become black in text color: + +Now if you set the `textContrast` to true as well, these slices also become black in text color: @@ -420,4 +420,4 @@ Now if you set the `textContrast` to true as well, these slices also become blac backgroundColor: 'rgba(229,229,229,1)', }} /> - \ No newline at end of file + diff --git a/src/chart_types/goal_chart/layout/types/config_types.ts b/src/chart_types/goal_chart/layout/types/config_types.ts index 5de186a19f..0f49920ed7 100644 --- a/src/chart_types/goal_chart/layout/types/config_types.ts +++ b/src/chart_types/goal_chart/layout/types/config_types.ts @@ -17,7 +17,7 @@ * under the License. */ -import { Color } from '../../../../utils/commons'; +import { Color } from '../../../../utils/common'; import { Pixels, SizeRatio } from '../../../partition_chart/layout/types/geometry_types'; import { FontFamily } from '../../../partition_chart/layout/types/types'; diff --git a/src/chart_types/goal_chart/specs/index.ts b/src/chart_types/goal_chart/specs/index.ts index 5f455e5f02..2e1ec76449 100644 --- a/src/chart_types/goal_chart/specs/index.ts +++ b/src/chart_types/goal_chart/specs/index.ts @@ -23,7 +23,7 @@ import { ChartTypes } from '../..'; import { Spec } from '../../../specs'; import { SpecTypes } from '../../../specs/constants'; import { getConnect, specComponentFactory } from '../../../state/spec_factory'; -import { Color, RecursivePartial } from '../../../utils/commons'; +import { Color, RecursivePartial } from '../../../utils/common'; import { config } from '../layout/config/config'; import { Config } from '../layout/types/config_types'; import { defaultGoalSpec } from '../layout/types/viewmodel_types'; diff --git a/src/chart_types/goal_chart/state/chart_state.tsx b/src/chart_types/goal_chart/state/chart_state.tsx index d7769a53e9..f744c97c2e 100644 --- a/src/chart_types/goal_chart/state/chart_state.tsx +++ b/src/chart_types/goal_chart/state/chart_state.tsx @@ -20,7 +20,7 @@ import React, { RefObject } from 'react'; import { ChartTypes } from '../..'; -import { LegendItem } from '../../../commons/legend'; +import { LegendItem } from '../../../common/legend'; import { Tooltip } from '../../../components/tooltip'; import { InternalChartState, GlobalChartState, BackwardRef } from '../../../state/chart_state'; import { InitStatus } from '../../../state/selectors/get_internal_is_intialized'; diff --git a/src/chart_types/goal_chart/state/selectors/on_element_click_caller.ts b/src/chart_types/goal_chart/state/selectors/on_element_click_caller.ts index ec46fe8330..e919f044a3 100644 --- a/src/chart_types/goal_chart/state/selectors/on_element_click_caller.ts +++ b/src/chart_types/goal_chart/state/selectors/on_element_click_caller.ts @@ -21,7 +21,7 @@ import createCachedSelector from 're-reselect'; import { Selector } from 'reselect'; import { ChartTypes } from '../../..'; -import { SeriesIdentifier } from '../../../../commons/series_id'; +import { SeriesIdentifier } from '../../../../common/series_id'; import { SettingsSpec, LayerValue } from '../../../../specs'; import { GlobalChartState, PointerState } from '../../../../state/chart_state'; import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; diff --git a/src/chart_types/goal_chart/state/selectors/on_element_over_caller.ts b/src/chart_types/goal_chart/state/selectors/on_element_over_caller.ts index 51bcf7ce50..42a1b5a89e 100644 --- a/src/chart_types/goal_chart/state/selectors/on_element_over_caller.ts +++ b/src/chart_types/goal_chart/state/selectors/on_element_over_caller.ts @@ -21,7 +21,7 @@ import createCachedSelector from 're-reselect'; import { Selector } from 'react-redux'; import { ChartTypes } from '../../..'; -import { SeriesIdentifier } from '../../../../commons/series_id'; +import { SeriesIdentifier } from '../../../../common/series_id'; import { LayerValue } from '../../../../specs'; import { GlobalChartState } from '../../../../state/chart_state'; import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; diff --git a/src/chart_types/goal_chart/state/selectors/scenegraph.ts b/src/chart_types/goal_chart/state/selectors/scenegraph.ts index adc410c3b1..e4618a5384 100644 --- a/src/chart_types/goal_chart/state/selectors/scenegraph.ts +++ b/src/chart_types/goal_chart/state/selectors/scenegraph.ts @@ -17,7 +17,7 @@ * under the License. */ -import { mergePartial, RecursivePartial } from '../../../../utils/commons'; +import { mergePartial, RecursivePartial } from '../../../../utils/common'; import { Dimensions } from '../../../../utils/dimensions'; import { measureText } from '../../../partition_chart/layout/utils/measure'; import { config as defaultConfig } from '../../layout/config/config'; diff --git a/src/chart_types/heatmap/layout/types/config_types.ts b/src/chart_types/heatmap/layout/types/config_types.ts index 001f89dbf6..a5650ce493 100644 --- a/src/chart_types/heatmap/layout/types/config_types.ts +++ b/src/chart_types/heatmap/layout/types/config_types.ts @@ -17,7 +17,7 @@ * under the License. */ -import { Color } from '../../../../utils/commons'; +import { Color } from '../../../../utils/common'; import { Pixels, SizeRatio } from '../../../partition_chart/layout/types/geometry_types'; import { Font, FontFamily, TextAlign, TextBaseline } from '../../../partition_chart/layout/types/types'; import { Cell } from './viewmodel_types'; diff --git a/src/chart_types/heatmap/specs/heatmap.ts b/src/chart_types/heatmap/specs/heatmap.ts index 4d36343b40..b693c521e6 100644 --- a/src/chart_types/heatmap/specs/heatmap.ts +++ b/src/chart_types/heatmap/specs/heatmap.ts @@ -25,10 +25,10 @@ import { SeriesScales, Spec } from '../../../specs'; import { SpecTypes } from '../../../specs/constants'; import { getConnect, specComponentFactory } from '../../../state/spec_factory'; import { Accessor, AccessorFn } from '../../../utils/accessor'; -import { Color, Datum, RecursivePartial } from '../../../utils/commons'; +import { Color, Datum, RecursivePartial } from '../../../utils/common'; import { config } from '../layout/config/config'; import { Config } from '../layout/types/config_types'; -import { Predicate } from '../utils/commons'; +import { Predicate } from '../utils/common'; const defaultProps = { chartType: ChartTypes.Heatmap, diff --git a/src/chart_types/heatmap/state/selectors/compute_chart_dimensions.ts b/src/chart_types/heatmap/state/selectors/compute_chart_dimensions.ts index 0d96af5376..6e52d6a36b 100644 --- a/src/chart_types/heatmap/state/selectors/compute_chart_dimensions.ts +++ b/src/chart_types/heatmap/state/selectors/compute_chart_dimensions.ts @@ -23,7 +23,7 @@ import { GlobalChartState } from '../../../../state/chart_state'; import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; import { getLegendSizeSelector } from '../../../../state/selectors/get_legend_size'; import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs'; -import { Position } from '../../../../utils/commons'; +import { Position } from '../../../../utils/common'; import { Dimensions } from '../../../../utils/dimensions'; import { Box } from '../../../partition_chart/layout/types/types'; import { measureText } from '../../../partition_chart/layout/utils/measure'; diff --git a/src/chart_types/heatmap/state/selectors/compute_legend.ts b/src/chart_types/heatmap/state/selectors/compute_legend.ts index 7f0a2b3418..4e8629dadf 100644 --- a/src/chart_types/heatmap/state/selectors/compute_legend.ts +++ b/src/chart_types/heatmap/state/selectors/compute_legend.ts @@ -19,7 +19,7 @@ import createCachedSelector from 're-reselect'; -import { LegendItem } from '../../../../commons/legend'; +import { LegendItem } from '../../../../common/legend'; import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; import { getDeselectedSeriesSelector } from '../../../../state/selectors/get_deselected_data_series'; import { getColorScale } from './get_color_scale'; diff --git a/src/chart_types/heatmap/state/selectors/get_heatmap_config.ts b/src/chart_types/heatmap/state/selectors/get_heatmap_config.ts index 6990a7d9d0..706bac8cb7 100644 --- a/src/chart_types/heatmap/state/selectors/get_heatmap_config.ts +++ b/src/chart_types/heatmap/state/selectors/get_heatmap_config.ts @@ -19,7 +19,7 @@ import createCachedSelector from 're-reselect'; import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; -import { mergePartial } from '../../../../utils/commons'; +import { mergePartial } from '../../../../utils/common'; import { config as defaultConfig } from '../../layout/config/config'; import { Config } from '../../layout/types/config_types'; import { getHeatmapSpecSelector } from './get_heatmap_spec'; diff --git a/src/chart_types/heatmap/state/selectors/get_heatmap_table.ts b/src/chart_types/heatmap/state/selectors/get_heatmap_table.ts index d7939ab4a7..f19b7f2f09 100644 --- a/src/chart_types/heatmap/state/selectors/get_heatmap_table.ts +++ b/src/chart_types/heatmap/state/selectors/get_heatmap_table.ts @@ -23,7 +23,7 @@ import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs'; import { getAccessorValue } from '../../../../utils/accessor'; import { mergeXDomain } from '../../../xy_chart/domains/x_domain'; -import { getPredicateFn } from '../../utils/commons'; +import { getPredicateFn } from '../../utils/common'; import { HeatmapTable } from './compute_chart_dimensions'; import { getHeatmapSpecSelector } from './get_heatmap_spec'; diff --git a/src/chart_types/heatmap/state/selectors/on_element_click_caller.ts b/src/chart_types/heatmap/state/selectors/on_element_click_caller.ts index bf9810ddf2..040a1aafb4 100644 --- a/src/chart_types/heatmap/state/selectors/on_element_click_caller.ts +++ b/src/chart_types/heatmap/state/selectors/on_element_click_caller.ts @@ -21,7 +21,7 @@ import createCachedSelector from 're-reselect'; import { Selector } from 'reselect'; import { ChartTypes } from '../../..'; -import { SeriesIdentifier } from '../../../../commons/series_id'; +import { SeriesIdentifier } from '../../../../common/series_id'; import { SettingsSpec } from '../../../../specs'; import { GlobalChartState, PointerState } from '../../../../state/chart_state'; import { getLastClickSelector } from '../../../../state/selectors/get_last_click'; diff --git a/src/chart_types/heatmap/state/selectors/on_element_over_caller.ts b/src/chart_types/heatmap/state/selectors/on_element_over_caller.ts index cfa3f9fbe6..dc5f3e2b45 100644 --- a/src/chart_types/heatmap/state/selectors/on_element_over_caller.ts +++ b/src/chart_types/heatmap/state/selectors/on_element_over_caller.ts @@ -21,7 +21,7 @@ import createCachedSelector from 're-reselect'; import { Selector } from 'react-redux'; import { ChartTypes } from '../../..'; -import { SeriesIdentifier } from '../../../../commons/series_id'; +import { SeriesIdentifier } from '../../../../common/series_id'; import { GlobalChartState } from '../../../../state/chart_state'; import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs'; diff --git a/src/chart_types/heatmap/state/selectors/scenegraph.ts b/src/chart_types/heatmap/state/selectors/scenegraph.ts index 4f4feecc4b..3b623ce393 100644 --- a/src/chart_types/heatmap/state/selectors/scenegraph.ts +++ b/src/chart_types/heatmap/state/selectors/scenegraph.ts @@ -18,7 +18,7 @@ */ import { SettingsSpec } from '../../../../specs'; -import { RecursivePartial, mergePartial } from '../../../../utils/commons'; +import { RecursivePartial, mergePartial } from '../../../../utils/common'; import { Dimensions } from '../../../../utils/dimensions'; import { measureText } from '../../../partition_chart/layout/utils/measure'; import { config as defaultConfig } from '../../layout/config/config'; diff --git a/src/chart_types/heatmap/utils/commons.ts b/src/chart_types/heatmap/utils/common.ts similarity index 100% rename from src/chart_types/heatmap/utils/commons.ts rename to src/chart_types/heatmap/utils/common.ts diff --git a/src/chart_types/partition_chart/layout/types/config_types.ts b/src/chart_types/partition_chart/layout/types/config_types.ts index 8bcec0dabd..d04e53cbed 100644 --- a/src/chart_types/partition_chart/layout/types/config_types.ts +++ b/src/chart_types/partition_chart/layout/types/config_types.ts @@ -19,7 +19,7 @@ import { $Values as Values } from 'utility-types'; -import { Color, StrokeStyle, ValueFormatter } from '../../../../utils/commons'; +import { Color, StrokeStyle, ValueFormatter } from '../../../../utils/common'; import { PerSideDistance } from '../../../../utils/dimensions'; import { Distance, Pixels, Radian, Radius, Ratio, SizeRatio, TimeMs } from './geometry_types'; import { Font, FontFamily, PartialFont } from './types'; diff --git a/src/chart_types/partition_chart/layout/types/types.ts b/src/chart_types/partition_chart/layout/types/types.ts index 9e27b6ed72..647b4b18a9 100644 --- a/src/chart_types/partition_chart/layout/types/types.ts +++ b/src/chart_types/partition_chart/layout/types/types.ts @@ -17,7 +17,7 @@ * under the License. */ -import { Datum } from '../../../../utils/commons'; +import { Datum } from '../../../../utils/common'; import { ArrayEntry } from '../utils/group_by_rollup'; export const FONT_VARIANTS = Object.freeze(['normal', 'small-caps'] as const); diff --git a/src/chart_types/partition_chart/layout/types/viewmodel_types.ts b/src/chart_types/partition_chart/layout/types/viewmodel_types.ts index e8dd7628c4..9737a1cb5e 100644 --- a/src/chart_types/partition_chart/layout/types/viewmodel_types.ts +++ b/src/chart_types/partition_chart/layout/types/viewmodel_types.ts @@ -17,9 +17,9 @@ * under the License. */ -import { CategoryKey } from '../../../../commons/category'; +import { CategoryKey } from '../../../../common/category'; import { LegendPath } from '../../../../state/actions/legend'; -import { Color } from '../../../../utils/commons'; +import { Color } from '../../../../utils/common'; import { config, ValueGetterName } from '../config/config'; import { ArrayNode, HierarchyOfArrays } from '../utils/group_by_rollup'; import { VerticalAlignments } from '../viewmodel/constants'; diff --git a/src/chart_types/partition_chart/layout/utils/calcs.ts b/src/chart_types/partition_chart/layout/utils/calcs.ts index ba89369f45..09764c0033 100644 --- a/src/chart_types/partition_chart/layout/utils/calcs.ts +++ b/src/chart_types/partition_chart/layout/utils/calcs.ts @@ -19,7 +19,7 @@ import chroma from 'chroma-js'; -import { Color } from '../../../../utils/commons'; +import { Color } from '../../../../utils/common'; import { TextContrast } from '../types/config_types'; import { Ratio } from '../types/geometry_types'; import { RgbTuple, RGBATupleToString, stringToRGB } from './color_library_wrappers'; diff --git a/src/chart_types/partition_chart/layout/utils/color_library_wrappers.ts b/src/chart_types/partition_chart/layout/utils/color_library_wrappers.ts index 560b26425c..30ee0197fd 100644 --- a/src/chart_types/partition_chart/layout/utils/color_library_wrappers.ts +++ b/src/chart_types/partition_chart/layout/utils/color_library_wrappers.ts @@ -20,7 +20,7 @@ import chroma from 'chroma-js'; import { rgb as d3Rgb, RGBColor as D3RGBColor } from 'd3-color'; -import { Color } from '../../../../utils/commons'; +import { Color } from '../../../../utils/common'; type RGB = number; type A = number; diff --git a/src/chart_types/partition_chart/layout/utils/group_by_rollup.ts b/src/chart_types/partition_chart/layout/utils/group_by_rollup.ts index 05aae6c1ad..9f49e0d273 100644 --- a/src/chart_types/partition_chart/layout/utils/group_by_rollup.ts +++ b/src/chart_types/partition_chart/layout/utils/group_by_rollup.ts @@ -17,9 +17,9 @@ * under the License. */ -import { CategoryKey } from '../../../../commons/category'; +import { CategoryKey } from '../../../../common/category'; import { LegendPath } from '../../../../state/actions/legend'; -import { Datum } from '../../../../utils/commons'; +import { Datum } from '../../../../utils/common'; import { Relation } from '../types/types'; export const AGGREGATE_KEY = 'value'; diff --git a/src/chart_types/partition_chart/layout/viewmodel/fill_text_layout.ts b/src/chart_types/partition_chart/layout/viewmodel/fill_text_layout.ts index db5ec2c5f3..e38ec7a220 100644 --- a/src/chart_types/partition_chart/layout/viewmodel/fill_text_layout.ts +++ b/src/chart_types/partition_chart/layout/viewmodel/fill_text_layout.ts @@ -19,7 +19,7 @@ import chroma from 'chroma-js'; -import { ValueFormatter, Color } from '../../../../utils/commons'; +import { ValueFormatter, Color } from '../../../../utils/common'; import { Logger } from '../../../../utils/logger'; import { Layer } from '../../specs'; import { conjunctiveConstraint } from '../circline_geometry'; diff --git a/src/chart_types/partition_chart/layout/viewmodel/hierarchy_of_arrays.ts b/src/chart_types/partition_chart/layout/viewmodel/hierarchy_of_arrays.ts index 5514e931c0..867be4b5ec 100644 --- a/src/chart_types/partition_chart/layout/viewmodel/hierarchy_of_arrays.ts +++ b/src/chart_types/partition_chart/layout/viewmodel/hierarchy_of_arrays.ts @@ -18,7 +18,7 @@ */ import { IndexedAccessorFn } from '../../../../utils/accessor'; -import { ValueAccessor } from '../../../../utils/commons'; +import { ValueAccessor } from '../../../../utils/common'; import { Relation } from '../types/types'; import { HierarchyOfArrays, diff --git a/src/chart_types/partition_chart/layout/viewmodel/link_text_layout.ts b/src/chart_types/partition_chart/layout/viewmodel/link_text_layout.ts index f978e9bc90..7bdb18b754 100644 --- a/src/chart_types/partition_chart/layout/viewmodel/link_text_layout.ts +++ b/src/chart_types/partition_chart/layout/viewmodel/link_text_layout.ts @@ -17,7 +17,7 @@ * under the License. */ -import { ValueFormatter, Color } from '../../../../utils/commons'; +import { ValueFormatter, Color } from '../../../../utils/common'; import { Point } from '../../../../utils/point'; import { meanAngle } from '../geometry'; import { Config } from '../types/config_types'; diff --git a/src/chart_types/partition_chart/layout/viewmodel/viewmodel.ts b/src/chart_types/partition_chart/layout/viewmodel/viewmodel.ts index 714f67c804..e7dd225c2e 100644 --- a/src/chart_types/partition_chart/layout/viewmodel/viewmodel.ts +++ b/src/chart_types/partition_chart/layout/viewmodel/viewmodel.ts @@ -17,7 +17,7 @@ * under the License. */ -import { StrokeStyle, ValueFormatter, Color } from '../../../../utils/commons'; +import { StrokeStyle, ValueFormatter, Color } from '../../../../utils/common'; import { Layer } from '../../specs'; import { percentValueGetter } from '../config/config'; import { meanAngle } from '../geometry'; diff --git a/src/chart_types/partition_chart/renderer/canvas/canvas_renderers.ts b/src/chart_types/partition_chart/renderer/canvas/canvas_renderers.ts index 119f4a59b7..75dd74e31c 100644 --- a/src/chart_types/partition_chart/renderer/canvas/canvas_renderers.ts +++ b/src/chart_types/partition_chart/renderer/canvas/canvas_renderers.ts @@ -18,7 +18,7 @@ */ import { clearCanvas, renderLayers, withContext } from '../../../../renderers/canvas'; -import { Color } from '../../../../utils/commons'; +import { Color } from '../../../../utils/common'; import { Pixels } from '../../layout/types/geometry_types'; import { LinkLabelVM, diff --git a/src/chart_types/partition_chart/specs/index.ts b/src/chart_types/partition_chart/specs/index.ts index 381a1d14bd..bfb7bb039d 100644 --- a/src/chart_types/partition_chart/specs/index.ts +++ b/src/chart_types/partition_chart/specs/index.ts @@ -31,7 +31,7 @@ import { ShowAccessor, ValueAccessor, ValueFormatter, -} from '../../../utils/commons'; +} from '../../../utils/common'; import { config, percentFormatter } from '../layout/config/config'; import { Config, FillFontSizeRange, FillLabelConfig } from '../layout/types/config_types'; import { Pixels } from '../layout/types/geometry_types'; diff --git a/src/chart_types/partition_chart/state/selectors/compute_legend.ts b/src/chart_types/partition_chart/state/selectors/compute_legend.ts index b9a52322f4..15430684e0 100644 --- a/src/chart_types/partition_chart/state/selectors/compute_legend.ts +++ b/src/chart_types/partition_chart/state/selectors/compute_legend.ts @@ -19,11 +19,11 @@ import createCachedSelector from 're-reselect'; -import { CategoryKey } from '../../../../commons/category'; -import { LegendItem } from '../../../../commons/legend'; +import { CategoryKey } from '../../../../common/category'; +import { LegendItem } from '../../../../common/legend'; import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs'; -import { identity } from '../../../../utils/commons'; +import { identity } from '../../../../utils/common'; import { isHierarchicalLegend } from '../../../../utils/legend'; import { QuadViewModel } from '../../layout/types/viewmodel_types'; import { map } from '../iterables'; diff --git a/src/chart_types/partition_chart/state/selectors/on_element_click_caller.ts b/src/chart_types/partition_chart/state/selectors/on_element_click_caller.ts index 28c122e9c5..72c8765b46 100644 --- a/src/chart_types/partition_chart/state/selectors/on_element_click_caller.ts +++ b/src/chart_types/partition_chart/state/selectors/on_element_click_caller.ts @@ -21,7 +21,7 @@ import createCachedSelector from 're-reselect'; import { Selector } from 'reselect'; import { ChartTypes } from '../../..'; -import { SeriesIdentifier } from '../../../../commons/series_id'; +import { SeriesIdentifier } from '../../../../common/series_id'; import { SettingsSpec, LayerValue } from '../../../../specs'; import { GlobalChartState, PointerState } from '../../../../state/chart_state'; import { getLastClickSelector } from '../../../../state/selectors/get_last_click'; diff --git a/src/chart_types/partition_chart/state/selectors/on_element_over_caller.ts b/src/chart_types/partition_chart/state/selectors/on_element_over_caller.ts index 1454c47e8f..a9cf07c49f 100644 --- a/src/chart_types/partition_chart/state/selectors/on_element_over_caller.ts +++ b/src/chart_types/partition_chart/state/selectors/on_element_over_caller.ts @@ -21,7 +21,7 @@ import createCachedSelector from 're-reselect'; import { Selector } from 'react-redux'; import { ChartTypes } from '../../..'; -import { SeriesIdentifier } from '../../../../commons/series_id'; +import { SeriesIdentifier } from '../../../../common/series_id'; import { LayerValue } from '../../../../specs'; import { GlobalChartState } from '../../../../state/chart_state'; import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; diff --git a/src/chart_types/partition_chart/state/selectors/scenegraph.ts b/src/chart_types/partition_chart/state/selectors/scenegraph.ts index f0e7fcfdfb..e4679985ba 100644 --- a/src/chart_types/partition_chart/state/selectors/scenegraph.ts +++ b/src/chart_types/partition_chart/state/selectors/scenegraph.ts @@ -17,7 +17,7 @@ * under the License. */ -import { identity, mergePartial, RecursivePartial, Color } from '../../../../utils/commons'; +import { identity, mergePartial, RecursivePartial, Color } from '../../../../utils/common'; import { Dimensions } from '../../../../utils/dimensions'; import { config as defaultConfig, VALUE_GETTERS } from '../../layout/config/config'; import { Config } from '../../layout/types/config_types'; diff --git a/src/chart_types/xy_chart/annotations/line/dimensions.test.ts b/src/chart_types/xy_chart/annotations/line/dimensions.test.ts index 0a873331c4..1310bb3811 100644 --- a/src/chart_types/xy_chart/annotations/line/dimensions.test.ts +++ b/src/chart_types/xy_chart/annotations/line/dimensions.test.ts @@ -21,7 +21,7 @@ import { MockAnnotationLineProps } from '../../../../mocks/annotations/annotatio import { MockAnnotationSpec, MockGlobalSpec, MockSeriesSpec } from '../../../../mocks/specs'; import { MockStore } from '../../../../mocks/store'; import { ScaleType } from '../../../../scales/constants'; -import { Position } from '../../../../utils/commons'; +import { Position } from '../../../../utils/common'; import { AnnotationId } from '../../../../utils/ids'; import { DEFAULT_ANNOTATION_LINE_STYLE } from '../../../../utils/themes/theme'; import { computeAnnotationDimensionsSelector } from '../../state/selectors/compute_annotations'; diff --git a/src/chart_types/xy_chart/annotations/line/dimensions.ts b/src/chart_types/xy_chart/annotations/line/dimensions.ts index 3a17155010..6b0008abd0 100644 --- a/src/chart_types/xy_chart/annotations/line/dimensions.ts +++ b/src/chart_types/xy_chart/annotations/line/dimensions.ts @@ -20,7 +20,7 @@ import { Line } from '../../../../geoms/types'; import { Scale } from '../../../../scales'; import { isContinuousScale, isBandScale } from '../../../../scales/types'; -import { isNil, Position, Rotation } from '../../../../utils/commons'; +import { isNil, Position, Rotation } from '../../../../utils/common'; import { Dimensions, Size } from '../../../../utils/dimensions'; import { GroupId } from '../../../../utils/ids'; import { SmallMultipleScales } from '../../state/selectors/compute_small_multiple_scales'; diff --git a/src/chart_types/xy_chart/annotations/line/line.test.tsx b/src/chart_types/xy_chart/annotations/line/line.test.tsx index f06fa1e3ec..bec61bbd83 100644 --- a/src/chart_types/xy_chart/annotations/line/line.test.tsx +++ b/src/chart_types/xy_chart/annotations/line/line.test.tsx @@ -25,7 +25,7 @@ import { MockAnnotationSpec, MockGlobalSpec, MockSeriesSpec } from '../../../../ import { MockStore } from '../../../../mocks/store'; import { ScaleType } from '../../../../scales/constants'; import { GlobalChartState } from '../../../../state/chart_state'; -import { Position } from '../../../../utils/commons'; +import { Position } from '../../../../utils/common'; import { DEFAULT_ANNOTATION_LINE_STYLE } from '../../../../utils/themes/theme'; import { computeAnnotationDimensionsSelector } from '../../state/selectors/compute_annotations'; import { AnnotationDomainTypes } from '../../utils/specs'; diff --git a/src/chart_types/xy_chart/annotations/line/tooltip.test.ts b/src/chart_types/xy_chart/annotations/line/tooltip.test.ts index 6a959e510b..cc0d2c2200 100644 --- a/src/chart_types/xy_chart/annotations/line/tooltip.test.ts +++ b/src/chart_types/xy_chart/annotations/line/tooltip.test.ts @@ -22,7 +22,7 @@ import { ChartTypes } from '../../..'; import { MockAnnotationLineProps, MockAnnotationRectProps } from '../../../../mocks/annotations/annotations'; import { MockGlobalSpec } from '../../../../mocks/specs/specs'; import { SpecTypes } from '../../../../specs/constants'; -import { Position, Rotation } from '../../../../utils/commons'; +import { Position, Rotation } from '../../../../utils/common'; import { Dimensions } from '../../../../utils/dimensions'; import { AnnotationId } from '../../../../utils/ids'; import { Point } from '../../../../utils/point'; diff --git a/src/chart_types/xy_chart/annotations/rect/dimensions.ts b/src/chart_types/xy_chart/annotations/rect/dimensions.ts index 56668c932d..f5e83273d6 100644 --- a/src/chart_types/xy_chart/annotations/rect/dimensions.ts +++ b/src/chart_types/xy_chart/annotations/rect/dimensions.ts @@ -19,7 +19,7 @@ import { Scale, ScaleBand, ScaleContinuous } from '../../../../scales'; import { isBandScale, isContinuousScale } from '../../../../scales/types'; -import { isDefined } from '../../../../utils/commons'; +import { isDefined } from '../../../../utils/common'; import { GroupId } from '../../../../utils/ids'; import { Point } from '../../../../utils/point'; import { PrimitiveValue } from '../../../partition_chart/layout/utils/group_by_rollup'; diff --git a/src/chart_types/xy_chart/annotations/rect/tooltip.ts b/src/chart_types/xy_chart/annotations/rect/tooltip.ts index cb8d3defbe..d6fbdf55bd 100644 --- a/src/chart_types/xy_chart/annotations/rect/tooltip.ts +++ b/src/chart_types/xy_chart/annotations/rect/tooltip.ts @@ -18,7 +18,7 @@ */ import { Rect } from '../../../../geoms/types'; -import { Rotation } from '../../../../utils/commons'; +import { Rotation } from '../../../../utils/common'; import { Dimensions } from '../../../../utils/dimensions'; import { Point } from '../../../../utils/point'; import { isHorizontalRotation } from '../../state/utils/common'; diff --git a/src/chart_types/xy_chart/annotations/tooltip.ts b/src/chart_types/xy_chart/annotations/tooltip.ts index c5e9c32edb..7adeeac007 100644 --- a/src/chart_types/xy_chart/annotations/tooltip.ts +++ b/src/chart_types/xy_chart/annotations/tooltip.ts @@ -18,7 +18,7 @@ */ import { TooltipPortalSettings } from '../../../components/portal'; -import { Rotation } from '../../../utils/commons'; +import { Rotation } from '../../../utils/common'; import { Dimensions } from '../../../utils/dimensions'; import { AnnotationId } from '../../../utils/ids'; import { Point } from '../../../utils/point'; diff --git a/src/chart_types/xy_chart/annotations/types.ts b/src/chart_types/xy_chart/annotations/types.ts index af5467bca8..5cabdba4e6 100644 --- a/src/chart_types/xy_chart/annotations/types.ts +++ b/src/chart_types/xy_chart/annotations/types.ts @@ -20,7 +20,7 @@ import { ComponentType } from 'react'; import { TooltipPortalSettings } from '../../../components/portal'; -import { Position, Color } from '../../../utils/commons'; +import { Position, Color } from '../../../utils/common'; import { AnnotationType } from '../utils/specs'; import { AnnotationLineProps } from './line/types'; import { AnnotationRectProps } from './rect/types'; diff --git a/src/chart_types/xy_chart/annotations/utils.test.ts b/src/chart_types/xy_chart/annotations/utils.test.ts index 007292c29f..43ca9d6985 100644 --- a/src/chart_types/xy_chart/annotations/utils.test.ts +++ b/src/chart_types/xy_chart/annotations/utils.test.ts @@ -18,7 +18,7 @@ */ import { MockGlobalSpec } from '../../../mocks/specs'; -import { Position, Rotation } from '../../../utils/commons'; +import { Position, Rotation } from '../../../utils/common'; import { Dimensions } from '../../../utils/dimensions'; import { AnnotationDomainTypes } from '../utils/specs'; import { getAnnotationAxis, getTransformedCursor, invertTranformedCursor } from './utils'; diff --git a/src/chart_types/xy_chart/annotations/utils.ts b/src/chart_types/xy_chart/annotations/utils.ts index 26d0396aa9..09c2c0efa4 100644 --- a/src/chart_types/xy_chart/annotations/utils.ts +++ b/src/chart_types/xy_chart/annotations/utils.ts @@ -18,7 +18,7 @@ */ import { Scale } from '../../../scales'; -import { Rotation, Position } from '../../../utils/commons'; +import { Rotation, Position } from '../../../utils/common'; import { Dimensions } from '../../../utils/dimensions'; import { AnnotationId, GroupId } from '../../../utils/ids'; import { Point } from '../../../utils/point'; diff --git a/src/chart_types/xy_chart/axes/axes_sizes.ts b/src/chart_types/xy_chart/axes/axes_sizes.ts index 7953359a07..513b88430f 100644 --- a/src/chart_types/xy_chart/axes/axes_sizes.ts +++ b/src/chart_types/xy_chart/axes/axes_sizes.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { Position } from '../../../utils/commons'; +import { Position } from '../../../utils/common'; import { getSimplePadding } from '../../../utils/dimensions'; import { AxisId } from '../../../utils/ids'; import { AxisStyle, Theme } from '../../../utils/themes/theme'; diff --git a/src/chart_types/xy_chart/crosshair/crosshair_utils.ts b/src/chart_types/xy_chart/crosshair/crosshair_utils.ts index 0e4b27e32f..eb5f1fddac 100644 --- a/src/chart_types/xy_chart/crosshair/crosshair_utils.ts +++ b/src/chart_types/xy_chart/crosshair/crosshair_utils.ts @@ -21,7 +21,7 @@ import { TooltipAnchorPosition } from '../../../components/tooltip/types'; import { Line, Rect } from '../../../geoms/types'; import { Scale } from '../../../scales'; import { isContinuousScale } from '../../../scales/types'; -import { Rotation } from '../../../utils/commons'; +import { Rotation } from '../../../utils/common'; import { Dimensions } from '../../../utils/dimensions'; import { Point } from '../../../utils/point'; import { isHorizontalRotation, isVerticalRotation } from '../state/utils/common'; diff --git a/src/chart_types/xy_chart/domains/x_domain.ts b/src/chart_types/xy_chart/domains/x_domain.ts index 05667484f1..de97fedd5e 100644 --- a/src/chart_types/xy_chart/domains/x_domain.ts +++ b/src/chart_types/xy_chart/domains/x_domain.ts @@ -20,7 +20,7 @@ import { Optional } from 'utility-types'; import { ScaleType } from '../../../scales/constants'; -import { compareByValueAsc, identity } from '../../../utils/commons'; +import { compareByValueAsc, identity } from '../../../utils/common'; import { computeContinuousDataDomain, computeOrdinalDataDomain, Domain } from '../../../utils/domain'; import { Logger } from '../../../utils/logger'; import { isCompleteBound, isLowerBound, isUpperBound } from '../utils/axis_type_utils'; diff --git a/src/chart_types/xy_chart/domains/y_domain.test.ts b/src/chart_types/xy_chart/domains/y_domain.test.ts index 6d44134e64..97783b7bc3 100644 --- a/src/chart_types/xy_chart/domains/y_domain.test.ts +++ b/src/chart_types/xy_chart/domains/y_domain.test.ts @@ -22,7 +22,7 @@ import { MockSeriesSpec, MockGlobalSpec } from '../../../mocks/specs'; import { MockStore } from '../../../mocks/store'; import { ScaleType } from '../../../scales/constants'; import { SpecTypes } from '../../../specs/constants'; -import { Position } from '../../../utils/commons'; +import { Position } from '../../../utils/common'; import { BARCHART_1Y0G } from '../../../utils/data_samples/test_dataset'; import { Logger } from '../../../utils/logger'; import { computeSeriesDomainsSelector } from '../state/selectors/compute_series_domains'; @@ -250,9 +250,9 @@ describe('Y Domain', () => { yAccessors: ['y'], data: BARCHART_1Y0G, }; - const splittedSpecs = groupSeriesByYGroup([spec1, spec2]); - const groupKeys = [...splittedSpecs.keys()]; - const groupValues = [...splittedSpecs.values()]; + const splitSpecs = groupSeriesByYGroup([spec1, spec2]); + const groupKeys = [...splitSpecs.keys()]; + const groupValues = [...splitSpecs.values()]; expect(groupKeys).toEqual(['group1', 'group2']); expect(groupValues.length).toBe(2); expect(groupValues[0].nonStacked).toEqual([spec1]); @@ -287,9 +287,9 @@ describe('Y Domain', () => { stackAccessors: ['x'], data: BARCHART_1Y0G, }; - const splittedSpecs = groupSeriesByYGroup([spec1, spec2]); - const groupKeys = [...splittedSpecs.keys()]; - const groupValues = [...splittedSpecs.values()]; + const splitSpecs = groupSeriesByYGroup([spec1, spec2]); + const groupKeys = [...splitSpecs.keys()]; + const groupValues = [...splitSpecs.values()]; expect(groupKeys).toEqual(['group1', 'group2']); expect(groupValues.length).toBe(2); expect(groupValues[0].stacked).toEqual([spec1]); @@ -324,9 +324,9 @@ describe('Y Domain', () => { stackAccessors: ['x'], data: BARCHART_1Y0G, }; - const splittedSpecs = groupSeriesByYGroup([spec1, spec2]); - const groupKeys = [...splittedSpecs.keys()]; - const groupValues = [...splittedSpecs.values()]; + const splitSpecs = groupSeriesByYGroup([spec1, spec2]); + const groupKeys = [...splitSpecs.keys()]; + const groupValues = [...splitSpecs.values()]; expect(groupKeys).toEqual(['group']); expect(groupValues.length).toBe(1); expect(groupValues[0].stacked).toEqual([spec1, spec2]); @@ -372,9 +372,9 @@ describe('Y Domain', () => { stackAccessors: ['x'], data: BARCHART_1Y0G, }; - const splittedSpecs = groupSeriesByYGroup([spec1, spec2, spec3]); - const groupKeys = [...splittedSpecs.keys()]; - const groupValues = [...splittedSpecs.values()]; + const splitSpecs = groupSeriesByYGroup([spec1, spec2, spec3]); + const groupKeys = [...splitSpecs.keys()]; + const groupValues = [...splitSpecs.values()]; expect(groupKeys).toEqual(['group1', 'group2']); expect(groupValues.length).toBe(2); expect(groupValues[0].stacked).toEqual([spec1, spec2]); diff --git a/src/chart_types/xy_chart/domains/y_domain.ts b/src/chart_types/xy_chart/domains/y_domain.ts index 24126c2188..dffe567dde 100644 --- a/src/chart_types/xy_chart/domains/y_domain.ts +++ b/src/chart_types/xy_chart/domains/y_domain.ts @@ -19,7 +19,7 @@ import { ScaleContinuousType } from '../../../scales'; import { ScaleType } from '../../../scales/constants'; -import { identity } from '../../../utils/commons'; +import { identity } from '../../../utils/common'; import { computeContinuousDataDomain } from '../../../utils/domain'; import { GroupId } from '../../../utils/ids'; import { Logger } from '../../../utils/logger'; diff --git a/src/chart_types/xy_chart/legend/legend.test.ts b/src/chart_types/xy_chart/legend/legend.test.ts index d5a6b8e6af..32a0ab2349 100644 --- a/src/chart_types/xy_chart/legend/legend.test.ts +++ b/src/chart_types/xy_chart/legend/legend.test.ts @@ -18,10 +18,10 @@ */ import { ChartTypes } from '../..'; -import { LegendItem } from '../../../commons/legend'; +import { LegendItem } from '../../../common/legend'; import { ScaleType } from '../../../scales/constants'; import { SpecTypes } from '../../../specs/constants'; -import { Position, RecursivePartial } from '../../../utils/commons'; +import { Position, RecursivePartial } from '../../../utils/common'; import { AxisStyle } from '../../../utils/themes/theme'; import { SeriesCollectionValue, getSeriesName } from '../utils/series'; import { AxisSpec, BasicSeriesSpec, SeriesTypes } from '../utils/specs'; @@ -314,7 +314,7 @@ describe('Legends', () => { name = getSeriesName(seriesIdentifier1, true, false, spec2); expect(name).toBe('spec2'); }); - it('use the splitted value as name if has a single series and splitSeries is used', () => { + it('use the split value as name if has a single series and splitSeries is used', () => { const seriesIdentifier1 = { specId: '', yAccessor: 'y1', diff --git a/src/chart_types/xy_chart/legend/legend.ts b/src/chart_types/xy_chart/legend/legend.ts index dc53b53cc5..bc3a8a85bd 100644 --- a/src/chart_types/xy_chart/legend/legend.ts +++ b/src/chart_types/xy_chart/legend/legend.ts @@ -17,11 +17,11 @@ * under the License. */ -import { LegendItem } from '../../../commons/legend'; -import { SeriesKey, SeriesIdentifier } from '../../../commons/series_id'; +import { LegendItem } from '../../../common/legend'; +import { SeriesKey, SeriesIdentifier } from '../../../common/series_id'; import { ScaleType } from '../../../scales/constants'; import { TickFormatterOptions } from '../../../specs'; -import { Color } from '../../../utils/commons'; +import { Color } from '../../../utils/common'; import { BandedAccessorType } from '../../../utils/geometry'; import { getAxesSpecForSpecId, getSpecsById } from '../state/utils/spec'; import { LastValues } from '../state/utils/types'; diff --git a/src/chart_types/xy_chart/renderer/canvas/annotations/index.ts b/src/chart_types/xy_chart/renderer/canvas/annotations/index.ts index 8f8f27684f..e542e57606 100644 --- a/src/chart_types/xy_chart/renderer/canvas/annotations/index.ts +++ b/src/chart_types/xy_chart/renderer/canvas/annotations/index.ts @@ -17,7 +17,7 @@ * under the License. */ -import { Rotation } from '../../../../../utils/commons'; +import { Rotation } from '../../../../../utils/common'; import { Dimensions } from '../../../../../utils/dimensions'; import { AnnotationId } from '../../../../../utils/ids'; import { mergeWithDefaultAnnotationLine, mergeWithDefaultAnnotationRect } from '../../../../../utils/themes/theme'; diff --git a/src/chart_types/xy_chart/renderer/canvas/annotations/lines.ts b/src/chart_types/xy_chart/renderer/canvas/annotations/lines.ts index abefd0e690..ffbb274a82 100644 --- a/src/chart_types/xy_chart/renderer/canvas/annotations/lines.ts +++ b/src/chart_types/xy_chart/renderer/canvas/annotations/lines.ts @@ -18,7 +18,7 @@ */ import { Stroke } from '../../../../../geoms/types'; -import { Rotation } from '../../../../../utils/commons'; +import { Rotation } from '../../../../../utils/common'; import { Dimensions } from '../../../../../utils/dimensions'; import { LineAnnotationStyle } from '../../../../../utils/themes/theme'; import { stringToRGB } from '../../../../partition_chart/layout/utils/color_library_wrappers'; diff --git a/src/chart_types/xy_chart/renderer/canvas/annotations/rect.ts b/src/chart_types/xy_chart/renderer/canvas/annotations/rect.ts index 5c9704f8da..9b86ec5b9a 100644 --- a/src/chart_types/xy_chart/renderer/canvas/annotations/rect.ts +++ b/src/chart_types/xy_chart/renderer/canvas/annotations/rect.ts @@ -18,7 +18,7 @@ */ import { Fill, Stroke } from '../../../../../geoms/types'; -import { Rotation } from '../../../../../utils/commons'; +import { Rotation } from '../../../../../utils/common'; import { Dimensions } from '../../../../../utils/dimensions'; import { RectAnnotationStyle } from '../../../../../utils/themes/theme'; import { stringToRGB } from '../../../../partition_chart/layout/utils/color_library_wrappers'; diff --git a/src/chart_types/xy_chart/renderer/canvas/areas.ts b/src/chart_types/xy_chart/renderer/canvas/areas.ts index 3d472df934..e723e22ea1 100644 --- a/src/chart_types/xy_chart/renderer/canvas/areas.ts +++ b/src/chart_types/xy_chart/renderer/canvas/areas.ts @@ -17,10 +17,10 @@ * under the License. */ -import { LegendItem } from '../../../../commons/legend'; +import { LegendItem } from '../../../../common/legend'; import { Rect } from '../../../../geoms/types'; import { withContext } from '../../../../renderers/canvas'; -import { Rotation } from '../../../../utils/commons'; +import { Rotation } from '../../../../utils/common'; import { Dimensions } from '../../../../utils/dimensions'; import { AreaGeometry, PerPanel } from '../../../../utils/geometry'; import { SharedGeometryStateStyle } from '../../../../utils/themes/theme'; diff --git a/src/chart_types/xy_chart/renderer/canvas/axes/line.ts b/src/chart_types/xy_chart/renderer/canvas/axes/line.ts index a0d4109c2b..6429d879f1 100644 --- a/src/chart_types/xy_chart/renderer/canvas/axes/line.ts +++ b/src/chart_types/xy_chart/renderer/canvas/axes/line.ts @@ -18,7 +18,7 @@ */ import { AxisProps } from '.'; -import { Position } from '../../../../../utils/commons'; +import { Position } from '../../../../../utils/common'; import { isVerticalAxis } from '../../../utils/axis_type_utils'; /** @internal */ diff --git a/src/chart_types/xy_chart/renderer/canvas/axes/tick.ts b/src/chart_types/xy_chart/renderer/canvas/axes/tick.ts index e26832a53b..f1638d69f6 100644 --- a/src/chart_types/xy_chart/renderer/canvas/axes/tick.ts +++ b/src/chart_types/xy_chart/renderer/canvas/axes/tick.ts @@ -18,7 +18,7 @@ */ import { AxisProps } from '.'; -import { Position } from '../../../../../utils/commons'; +import { Position } from '../../../../../utils/common'; import { TickStyle } from '../../../../../utils/themes/theme'; import { stringToRGB } from '../../../../partition_chart/layout/utils/color_library_wrappers'; import { isVerticalAxis } from '../../../utils/axis_type_utils'; diff --git a/src/chart_types/xy_chart/renderer/canvas/axes/title.ts b/src/chart_types/xy_chart/renderer/canvas/axes/title.ts index c000b0df5c..85f36a353e 100644 --- a/src/chart_types/xy_chart/renderer/canvas/axes/title.ts +++ b/src/chart_types/xy_chart/renderer/canvas/axes/title.ts @@ -18,7 +18,7 @@ */ import { AxisProps } from '.'; -import { Position } from '../../../../../utils/commons'; +import { Position } from '../../../../../utils/common'; import { getSimplePadding } from '../../../../../utils/dimensions'; import { Font, FontStyle } from '../../../../partition_chart/layout/types/types'; import { isHorizontalAxis } from '../../../utils/axis_type_utils'; diff --git a/src/chart_types/xy_chart/renderer/canvas/bars.ts b/src/chart_types/xy_chart/renderer/canvas/bars.ts index 98128190ef..e1f4e114e1 100644 --- a/src/chart_types/xy_chart/renderer/canvas/bars.ts +++ b/src/chart_types/xy_chart/renderer/canvas/bars.ts @@ -17,10 +17,10 @@ * under the License. */ -import { LegendItem } from '../../../../commons/legend'; +import { LegendItem } from '../../../../common/legend'; import { Rect } from '../../../../geoms/types'; import { withContext } from '../../../../renderers/canvas'; -import { Rotation } from '../../../../utils/commons'; +import { Rotation } from '../../../../utils/common'; import { Dimensions } from '../../../../utils/dimensions'; import { BarGeometry, PerPanel } from '../../../../utils/geometry'; import { SharedGeometryStateStyle } from '../../../../utils/themes/theme'; diff --git a/src/chart_types/xy_chart/renderer/canvas/bubbles.ts b/src/chart_types/xy_chart/renderer/canvas/bubbles.ts index 6206903275..838a63bf92 100644 --- a/src/chart_types/xy_chart/renderer/canvas/bubbles.ts +++ b/src/chart_types/xy_chart/renderer/canvas/bubbles.ts @@ -17,11 +17,11 @@ * under the License. */ -import { LegendItem } from '../../../../commons/legend'; -import { SeriesKey } from '../../../../commons/series_id'; +import { LegendItem } from '../../../../common/legend'; +import { SeriesKey } from '../../../../common/series_id'; import { Rect } from '../../../../geoms/types'; import { withContext } from '../../../../renderers/canvas'; -import { Rotation } from '../../../../utils/commons'; +import { Rotation } from '../../../../utils/common'; import { Dimensions } from '../../../../utils/dimensions'; import { BubbleGeometry, PerPanel, PointGeometry } from '../../../../utils/geometry'; import { SharedGeometryStateStyle, GeometryStateStyle, PointStyle } from '../../../../utils/themes/theme'; diff --git a/src/chart_types/xy_chart/renderer/canvas/lines.ts b/src/chart_types/xy_chart/renderer/canvas/lines.ts index d00f9712f9..3c3a0f24d1 100644 --- a/src/chart_types/xy_chart/renderer/canvas/lines.ts +++ b/src/chart_types/xy_chart/renderer/canvas/lines.ts @@ -17,10 +17,10 @@ * under the License. */ -import { LegendItem } from '../../../../commons/legend'; +import { LegendItem } from '../../../../common/legend'; import { Rect } from '../../../../geoms/types'; import { withContext } from '../../../../renderers/canvas'; -import { Rotation } from '../../../../utils/commons'; +import { Rotation } from '../../../../utils/common'; import { Dimensions } from '../../../../utils/dimensions'; import { LineGeometry, PerPanel } from '../../../../utils/geometry'; import { SharedGeometryStateStyle } from '../../../../utils/themes/theme'; diff --git a/src/chart_types/xy_chart/renderer/canvas/points.ts b/src/chart_types/xy_chart/renderer/canvas/points.ts index 42a9817f2b..b15b36ea32 100644 --- a/src/chart_types/xy_chart/renderer/canvas/points.ts +++ b/src/chart_types/xy_chart/renderer/canvas/points.ts @@ -17,9 +17,9 @@ * under the License. */ -import { SeriesKey } from '../../../../commons/series_id'; +import { SeriesKey } from '../../../../common/series_id'; import { Circle, Stroke, Fill, Rect } from '../../../../geoms/types'; -import { Rotation } from '../../../../utils/commons'; +import { Rotation } from '../../../../utils/common'; import { Dimensions } from '../../../../utils/dimensions'; import { PointGeometry } from '../../../../utils/geometry'; import { PointStyle, GeometryStateStyle } from '../../../../utils/themes/theme'; diff --git a/src/chart_types/xy_chart/renderer/canvas/styles/area.test.ts b/src/chart_types/xy_chart/renderer/canvas/styles/area.test.ts index e08bdcddc2..4a979f912e 100644 --- a/src/chart_types/xy_chart/renderer/canvas/styles/area.test.ts +++ b/src/chart_types/xy_chart/renderer/canvas/styles/area.test.ts @@ -19,12 +19,12 @@ import { Fill } from '../../../../../geoms/types'; import { MockStyles } from '../../../../../mocks'; -import { getColorFromVariant } from '../../../../../utils/commons'; +import { getColorFromVariant } from '../../../../../utils/common'; import { stringToRGB } from '../../../../partition_chart/layout/utils/color_library_wrappers'; import { buildAreaStyles } from './area'; jest.mock('../../../../partition_chart/layout/utils/color_library_wrappers'); -jest.mock('../../../../../utils/commons'); +jest.mock('../../../../../utils/common'); const COLOR = 'aquamarine'; diff --git a/src/chart_types/xy_chart/renderer/canvas/styles/area.ts b/src/chart_types/xy_chart/renderer/canvas/styles/area.ts index efe4f802ce..ecaae2f985 100644 --- a/src/chart_types/xy_chart/renderer/canvas/styles/area.ts +++ b/src/chart_types/xy_chart/renderer/canvas/styles/area.ts @@ -18,7 +18,7 @@ */ import { Fill } from '../../../../../geoms/types'; -import { getColorFromVariant } from '../../../../../utils/commons'; +import { getColorFromVariant } from '../../../../../utils/common'; import { GeometryStateStyle, AreaStyle } from '../../../../../utils/themes/theme'; import { OpacityFn, stringToRGB } from '../../../../partition_chart/layout/utils/color_library_wrappers'; diff --git a/src/chart_types/xy_chart/renderer/canvas/styles/bar.test.ts b/src/chart_types/xy_chart/renderer/canvas/styles/bar.test.ts index 25f6ea07a8..db9866e6cf 100644 --- a/src/chart_types/xy_chart/renderer/canvas/styles/bar.test.ts +++ b/src/chart_types/xy_chart/renderer/canvas/styles/bar.test.ts @@ -19,12 +19,12 @@ import { Fill, Stroke } from '../../../../../geoms/types'; import { MockStyles } from '../../../../../mocks'; -import { getColorFromVariant } from '../../../../../utils/commons'; +import { getColorFromVariant } from '../../../../../utils/common'; import { stringToRGB } from '../../../../partition_chart/layout/utils/color_library_wrappers'; import { buildBarStyles } from './bar'; jest.mock('../../../../partition_chart/layout/utils/color_library_wrappers'); -jest.mock('../../../../../utils/commons'); +jest.mock('../../../../../utils/common'); const COLOR = 'aquamarine'; diff --git a/src/chart_types/xy_chart/renderer/canvas/styles/bar.ts b/src/chart_types/xy_chart/renderer/canvas/styles/bar.ts index 7705e73cc8..e030949ba8 100644 --- a/src/chart_types/xy_chart/renderer/canvas/styles/bar.ts +++ b/src/chart_types/xy_chart/renderer/canvas/styles/bar.ts @@ -18,7 +18,7 @@ */ import { Stroke, Fill } from '../../../../../geoms/types'; -import { getColorFromVariant } from '../../../../../utils/commons'; +import { getColorFromVariant } from '../../../../../utils/common'; import { GeometryStateStyle, RectStyle, RectBorderStyle } from '../../../../../utils/themes/theme'; import { stringToRGB, OpacityFn } from '../../../../partition_chart/layout/utils/color_library_wrappers'; diff --git a/src/chart_types/xy_chart/renderer/canvas/styles/line.test.ts b/src/chart_types/xy_chart/renderer/canvas/styles/line.test.ts index b3f855122d..d686590fde 100644 --- a/src/chart_types/xy_chart/renderer/canvas/styles/line.test.ts +++ b/src/chart_types/xy_chart/renderer/canvas/styles/line.test.ts @@ -19,12 +19,12 @@ import { Stroke } from '../../../../../geoms/types'; import { MockStyles } from '../../../../../mocks'; -import { getColorFromVariant } from '../../../../../utils/commons'; +import { getColorFromVariant } from '../../../../../utils/common'; import { stringToRGB } from '../../../../partition_chart/layout/utils/color_library_wrappers'; import { buildLineStyles } from './line'; jest.mock('../../../../partition_chart/layout/utils/color_library_wrappers'); -jest.mock('../../../../../utils/commons'); +jest.mock('../../../../../utils/common'); const COLOR = 'aquamarine'; diff --git a/src/chart_types/xy_chart/renderer/canvas/styles/line.ts b/src/chart_types/xy_chart/renderer/canvas/styles/line.ts index a9893b8582..179fb650b9 100644 --- a/src/chart_types/xy_chart/renderer/canvas/styles/line.ts +++ b/src/chart_types/xy_chart/renderer/canvas/styles/line.ts @@ -18,7 +18,7 @@ */ import { Stroke } from '../../../../../geoms/types'; -import { getColorFromVariant } from '../../../../../utils/commons'; +import { getColorFromVariant } from '../../../../../utils/common'; import { GeometryStateStyle, LineStyle } from '../../../../../utils/themes/theme'; import { stringToRGB, OpacityFn } from '../../../../partition_chart/layout/utils/color_library_wrappers'; diff --git a/src/chart_types/xy_chart/renderer/canvas/styles/point.test.ts b/src/chart_types/xy_chart/renderer/canvas/styles/point.test.ts index 45c66346d1..9eae9f818a 100644 --- a/src/chart_types/xy_chart/renderer/canvas/styles/point.test.ts +++ b/src/chart_types/xy_chart/renderer/canvas/styles/point.test.ts @@ -19,13 +19,13 @@ import { Fill, Stroke } from '../../../../../geoms/types'; import { MockStyles } from '../../../../../mocks'; -import { getColorFromVariant } from '../../../../../utils/commons'; +import { getColorFromVariant } from '../../../../../utils/common'; import { PointStyle } from '../../../../../utils/themes/theme'; import { stringToRGB } from '../../../../partition_chart/layout/utils/color_library_wrappers'; import { buildPointStyles } from './point'; jest.mock('../../../../partition_chart/layout/utils/color_library_wrappers'); -jest.mock('../../../../../utils/commons'); +jest.mock('../../../../../utils/common'); const COLOR = 'aquamarine'; diff --git a/src/chart_types/xy_chart/renderer/canvas/styles/point.ts b/src/chart_types/xy_chart/renderer/canvas/styles/point.ts index aadb96b5ce..6592c57bcc 100644 --- a/src/chart_types/xy_chart/renderer/canvas/styles/point.ts +++ b/src/chart_types/xy_chart/renderer/canvas/styles/point.ts @@ -18,7 +18,7 @@ */ import { Fill, Stroke } from '../../../../../geoms/types'; -import { mergePartial, getColorFromVariant } from '../../../../../utils/commons'; +import { mergePartial, getColorFromVariant } from '../../../../../utils/common'; import { PointStyle, GeometryStateStyle } from '../../../../../utils/themes/theme'; import { stringToRGB, OpacityFn } from '../../../../partition_chart/layout/utils/color_library_wrappers'; diff --git a/src/chart_types/xy_chart/renderer/canvas/utils/panel_transform.ts b/src/chart_types/xy_chart/renderer/canvas/utils/panel_transform.ts index 06182b0232..9b9fa7cc9a 100644 --- a/src/chart_types/xy_chart/renderer/canvas/utils/panel_transform.ts +++ b/src/chart_types/xy_chart/renderer/canvas/utils/panel_transform.ts @@ -18,7 +18,7 @@ */ import { Rect } from '../../../../../geoms/types'; import { withContext } from '../../../../../renderers/canvas'; -import { Rotation } from '../../../../../utils/commons'; +import { Rotation } from '../../../../../utils/common'; import { Dimensions } from '../../../../../utils/dimensions'; import { computeChartTransform } from '../../../state/utils/utils'; diff --git a/src/chart_types/xy_chart/renderer/canvas/values/bar.ts b/src/chart_types/xy_chart/renderer/canvas/values/bar.ts index cb41d9930b..1477229616 100644 --- a/src/chart_types/xy_chart/renderer/canvas/values/bar.ts +++ b/src/chart_types/xy_chart/renderer/canvas/values/bar.ts @@ -18,7 +18,7 @@ */ import { Rect } from '../../../../../geoms/types'; -import { Rotation, VerticalAlignment, HorizontalAlignment } from '../../../../../utils/commons'; +import { Rotation, VerticalAlignment, HorizontalAlignment } from '../../../../../utils/common'; import { Dimensions } from '../../../../../utils/dimensions'; import { BarGeometry } from '../../../../../utils/geometry'; import { Point } from '../../../../../utils/point'; diff --git a/src/chart_types/xy_chart/renderer/canvas/xy_chart.tsx b/src/chart_types/xy_chart/renderer/canvas/xy_chart.tsx index 1c2a3863db..ef4c80e18d 100644 --- a/src/chart_types/xy_chart/renderer/canvas/xy_chart.tsx +++ b/src/chart_types/xy_chart/renderer/canvas/xy_chart.tsx @@ -21,7 +21,7 @@ import React, { RefObject } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators, Dispatch } from 'redux'; -import { LegendItem } from '../../../../commons/legend'; +import { LegendItem } from '../../../../common/legend'; import { onChartRendered } from '../../../../state/actions/chart'; import { GlobalChartState } from '../../../../state/chart_state'; import { getChartContainerDimensionsSelector } from '../../../../state/selectors/get_chart_container_dimensions'; @@ -29,7 +29,7 @@ import { getChartRotationSelector } from '../../../../state/selectors/get_chart_ import { getChartThemeSelector } from '../../../../state/selectors/get_chart_theme'; import { getInternalIsInitializedSelector, InitStatus } from '../../../../state/selectors/get_internal_is_intialized'; import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs'; -import { Rotation } from '../../../../utils/commons'; +import { Rotation } from '../../../../utils/common'; import { Dimensions } from '../../../../utils/dimensions'; import { deepEqual } from '../../../../utils/fast_deep_equal'; import { AnnotationId, AxisId } from '../../../../utils/ids'; diff --git a/src/chart_types/xy_chart/renderer/dom/crosshair.tsx b/src/chart_types/xy_chart/renderer/dom/crosshair.tsx index a94ebbfabc..c3830d60a7 100644 --- a/src/chart_types/xy_chart/renderer/dom/crosshair.tsx +++ b/src/chart_types/xy_chart/renderer/dom/crosshair.tsx @@ -28,7 +28,7 @@ import { getChartRotationSelector } from '../../../../state/selectors/get_chart_ import { getChartThemeSelector } from '../../../../state/selectors/get_chart_theme'; import { getInternalIsInitializedSelector, InitStatus } from '../../../../state/selectors/get_internal_is_intialized'; import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs'; -import { Rotation } from '../../../../utils/commons'; +import { Rotation } from '../../../../utils/common'; import { LIGHT_THEME } from '../../../../utils/themes/light_theme'; import { Theme } from '../../../../utils/themes/theme'; import { getCursorBandPositionSelector } from '../../state/selectors/get_cursor_band'; diff --git a/src/chart_types/xy_chart/renderer/dom/highlighter.tsx b/src/chart_types/xy_chart/renderer/dom/highlighter.tsx index 86f17a58cf..c5eecb1e27 100644 --- a/src/chart_types/xy_chart/renderer/dom/highlighter.tsx +++ b/src/chart_types/xy_chart/renderer/dom/highlighter.tsx @@ -23,7 +23,7 @@ import { connect } from 'react-redux'; import { GlobalChartState } from '../../../../state/chart_state'; import { getChartRotationSelector } from '../../../../state/selectors/get_chart_rotation'; import { InitStatus, getInternalIsInitializedSelector } from '../../../../state/selectors/get_internal_is_intialized'; -import { Rotation } from '../../../../utils/commons'; +import { Rotation } from '../../../../utils/common'; import { Dimensions } from '../../../../utils/dimensions'; import { isPointGeometry, IndexedGeometry } from '../../../../utils/geometry'; import { DEFAULT_HIGHLIGHT_PADDING } from '../../rendering/constants'; diff --git a/src/chart_types/xy_chart/rendering/area.ts b/src/chart_types/xy_chart/rendering/area.ts index 301c4a7971..68e289a487 100644 --- a/src/chart_types/xy_chart/rendering/area.ts +++ b/src/chart_types/xy_chart/rendering/area.ts @@ -19,7 +19,7 @@ import { area } from 'd3-shape'; import { Scale } from '../../../scales'; -import { Color } from '../../../utils/commons'; +import { Color } from '../../../utils/common'; import { CurveType, getCurveFactory } from '../../../utils/curves'; import { Dimensions } from '../../../utils/dimensions'; import { AreaGeometry } from '../../../utils/geometry'; diff --git a/src/chart_types/xy_chart/rendering/bars.ts b/src/chart_types/xy_chart/rendering/bars.ts index 11d7101bd8..98e3fd4a81 100644 --- a/src/chart_types/xy_chart/rendering/bars.ts +++ b/src/chart_types/xy_chart/rendering/bars.ts @@ -19,7 +19,7 @@ import { Scale } from '../../../scales'; import { ScaleType } from '../../../scales/constants'; import { CanvasTextBBoxCalculator } from '../../../utils/bbox/canvas_text_bbox_calculator'; -import { Color, mergePartial } from '../../../utils/commons'; +import { Color, mergePartial } from '../../../utils/common'; import { Dimensions } from '../../../utils/dimensions'; import { BandedAccessorType, BarGeometry } from '../../../utils/geometry'; import { BarSeriesStyle, DisplayValueStyle } from '../../../utils/themes/theme'; diff --git a/src/chart_types/xy_chart/rendering/bubble.ts b/src/chart_types/xy_chart/rendering/bubble.ts index 5285990ce2..da3ad46b1d 100644 --- a/src/chart_types/xy_chart/rendering/bubble.ts +++ b/src/chart_types/xy_chart/rendering/bubble.ts @@ -17,7 +17,7 @@ * under the License. */ import { Scale } from '../../../scales'; -import { Color } from '../../../utils/commons'; +import { Color } from '../../../utils/common'; import { Dimensions } from '../../../utils/dimensions'; import { BubbleGeometry } from '../../../utils/geometry'; import { BubbleSeriesStyle } from '../../../utils/themes/theme'; diff --git a/src/chart_types/xy_chart/rendering/line.ts b/src/chart_types/xy_chart/rendering/line.ts index 6fffa2e52f..146b13c607 100644 --- a/src/chart_types/xy_chart/rendering/line.ts +++ b/src/chart_types/xy_chart/rendering/line.ts @@ -19,7 +19,7 @@ import { line } from 'd3-shape'; import { Scale } from '../../../scales'; -import { Color } from '../../../utils/commons'; +import { Color } from '../../../utils/common'; import { CurveType, getCurveFactory } from '../../../utils/curves'; import { Dimensions } from '../../../utils/dimensions'; import { LineGeometry } from '../../../utils/geometry'; diff --git a/src/chart_types/xy_chart/rendering/points.ts b/src/chart_types/xy_chart/rendering/points.ts index 4e5248eae3..f1a1fc647d 100644 --- a/src/chart_types/xy_chart/rendering/points.ts +++ b/src/chart_types/xy_chart/rendering/points.ts @@ -17,7 +17,7 @@ * under the License. */ import { Scale } from '../../../scales'; -import { Color, isNil } from '../../../utils/commons'; +import { Color, isNil } from '../../../utils/common'; import { Dimensions } from '../../../utils/dimensions'; import { BandedAccessorType, PointGeometry } from '../../../utils/geometry'; import { LineStyle, PointStyle } from '../../../utils/themes/theme'; diff --git a/src/chart_types/xy_chart/rendering/rendering.areas.test.ts b/src/chart_types/xy_chart/rendering/rendering.areas.test.ts index bbf1d261a5..9c7816fab3 100644 --- a/src/chart_types/xy_chart/rendering/rendering.areas.test.ts +++ b/src/chart_types/xy_chart/rendering/rendering.areas.test.ts @@ -778,7 +778,7 @@ describe('Rendering points - areas', () => { geometries = computeSeriesGeometriesSelector(store.getState()); }); - test('Can render a splitted area and line', () => { + test('Can render a split area and line', () => { const { areas } = geometries.geometries; const [{ value: firstArea }] = areas; diff --git a/src/chart_types/xy_chart/rendering/rendering.bars.test.ts b/src/chart_types/xy_chart/rendering/rendering.bars.test.ts index 5cccbccc8e..704ca2d980 100644 --- a/src/chart_types/xy_chart/rendering/rendering.bars.test.ts +++ b/src/chart_types/xy_chart/rendering/rendering.bars.test.ts @@ -22,7 +22,7 @@ import { MockSeriesIdentifier } from '../../../mocks/series/series_identifiers'; import { MockGlobalSpec, MockSeriesSpec } from '../../../mocks/specs'; import { MockStore } from '../../../mocks/store'; import { ScaleType } from '../../../scales/constants'; -import { identity } from '../../../utils/commons'; +import { identity } from '../../../utils/common'; import { computeSeriesGeometriesSelector } from '../state/selectors/compute_series_geometries'; const SPEC_ID = 'spec_1'; diff --git a/src/chart_types/xy_chart/rendering/rendering.bubble.test.ts b/src/chart_types/xy_chart/rendering/rendering.bubble.test.ts index 9e45c0b0ea..e39c53dbd4 100644 --- a/src/chart_types/xy_chart/rendering/rendering.bubble.test.ts +++ b/src/chart_types/xy_chart/rendering/rendering.bubble.test.ts @@ -22,7 +22,7 @@ import { MockSeriesIdentifier } from '../../../mocks/series/series_identifiers'; import { MockGlobalSpec, MockSeriesSpec } from '../../../mocks/specs'; import { MockStore } from '../../../mocks/store'; import { ScaleType } from '../../../scales/constants'; -import { Position } from '../../../utils/commons'; +import { Position } from '../../../utils/common'; import { computeSeriesGeometriesSelector } from '../state/selectors/compute_series_geometries'; const SPEC_ID = 'spec_1'; @@ -715,7 +715,7 @@ describe('Rendering points - bubble', () => { geometriesIndex, } = computeSeriesGeometriesSelector(store.getState()); - test('Can render a splitted bubble', () => { + test('Can render a split bubble', () => { const [{ value: renderedBubble }] = bubbles; expect(renderedBubble.points).toHaveLength(7); expect(renderedBubble.color).toBe('red'); diff --git a/src/chart_types/xy_chart/rendering/rendering.lines.test.ts b/src/chart_types/xy_chart/rendering/rendering.lines.test.ts index 58973be29b..73a4288d39 100644 --- a/src/chart_types/xy_chart/rendering/rendering.lines.test.ts +++ b/src/chart_types/xy_chart/rendering/rendering.lines.test.ts @@ -22,7 +22,7 @@ import { MockSeriesIdentifier } from '../../../mocks/series/series_identifiers'; import { MockGlobalSpec, MockSeriesSpec } from '../../../mocks/specs'; import { MockStore } from '../../../mocks/store'; import { ScaleType } from '../../../scales/constants'; -import { Position } from '../../../utils/commons'; +import { Position } from '../../../utils/common'; import { PointGeometry } from '../../../utils/geometry'; import { computeSeriesGeometriesSelector } from '../state/selectors/compute_series_geometries'; import { SeriesTypes } from '../utils/specs'; @@ -680,7 +680,7 @@ describe('Rendering points - line', () => { geometriesIndex, } = computeSeriesGeometriesSelector(store.getState()); - test('Can render a splitted line', () => { + test('Can render a split line', () => { const [{ value: renderedLine }] = lines; expect(renderedLine.line.split('M').length - 1).toBe(3); expect(renderedLine.color).toBe('red'); diff --git a/src/chart_types/xy_chart/rendering/rendering.test.ts b/src/chart_types/xy_chart/rendering/rendering.test.ts index b438225854..8f3ccba537 100644 --- a/src/chart_types/xy_chart/rendering/rendering.test.ts +++ b/src/chart_types/xy_chart/rendering/rendering.test.ts @@ -17,10 +17,10 @@ * under the License. */ -import { LegendItem } from '../../../commons/legend'; +import { LegendItem } from '../../../common/legend'; import { MockBarGeometry, MockDataSeries, MockPointGeometry } from '../../../mocks'; import { MockScale } from '../../../mocks/scale'; -import { mergePartial, RecursivePartial } from '../../../utils/commons'; +import { mergePartial, RecursivePartial } from '../../../utils/common'; import { BarSeriesStyle, SharedGeometryStateStyle, PointStyle } from '../../../utils/themes/theme'; import { DataSeriesDatum, XYChartSeriesIdentifier } from '../utils/series'; import { getBarStyleOverrides } from './bars'; diff --git a/src/chart_types/xy_chart/rendering/utils.ts b/src/chart_types/xy_chart/rendering/utils.ts index 146eb61293..7da29bfe24 100644 --- a/src/chart_types/xy_chart/rendering/utils.ts +++ b/src/chart_types/xy_chart/rendering/utils.ts @@ -17,13 +17,13 @@ * under the License. */ -import { LegendItem } from '../../../commons/legend'; +import { LegendItem } from '../../../common/legend'; import { Scale } from '../../../scales'; import { LOG_MIN_ABS_DOMAIN } from '../../../scales/constants'; import { getDomainPolarity } from '../../../scales/scale_continuous'; import { isLogarithmicScale } from '../../../scales/types'; import { MarkBuffer } from '../../../specs'; -import { getDistance } from '../../../utils/commons'; +import { getDistance } from '../../../utils/common'; import { BarGeometry, ClippedRanges, isPointGeometry, PointGeometry } from '../../../utils/geometry'; import { GeometryStateStyle, SharedGeometryStateStyle } from '../../../utils/themes/theme'; import { DataSeriesDatum, FilledValues, XYChartSeriesIdentifier } from '../utils/series'; diff --git a/src/chart_types/xy_chart/specs/axis.tsx b/src/chart_types/xy_chart/specs/axis.tsx index 5ab2716c8d..aa9e42eaf7 100644 --- a/src/chart_types/xy_chart/specs/axis.tsx +++ b/src/chart_types/xy_chart/specs/axis.tsx @@ -22,7 +22,7 @@ import React from 'react'; import { ChartTypes } from '../..'; import { SpecTypes } from '../../../specs/constants'; import { specComponentFactory, getConnect } from '../../../state/spec_factory'; -import { Position } from '../../../utils/commons'; +import { Position } from '../../../utils/common'; import { AxisSpec, DEFAULT_GLOBAL_ID } from '../utils/specs'; const defaultProps = { diff --git a/src/chart_types/xy_chart/state/chart_state.interactions.test.ts b/src/chart_types/xy_chart/state/chart_state.interactions.test.ts index 9208029d6c..e4752db481 100644 --- a/src/chart_types/xy_chart/state/chart_state.interactions.test.ts +++ b/src/chart_types/xy_chart/state/chart_state.interactions.test.ts @@ -31,7 +31,7 @@ import { onExternalPointerEvent } from '../../../state/actions/events'; import { onPointerMove, onMouseDown, onMouseUp } from '../../../state/actions/mouse'; import { GlobalChartState } from '../../../state/chart_state'; import { getSettingsSpecSelector } from '../../../state/selectors/get_settings_specs'; -import { Position, RecursivePartial } from '../../../utils/commons'; +import { Position, RecursivePartial } from '../../../utils/common'; import { AxisStyle } from '../../../utils/themes/theme'; import { BarSeriesSpec, BasicSeriesSpec, AxisSpec, SeriesTypes } from '../utils/specs'; import { computeSeriesGeometriesSelector } from './selectors/compute_series_geometries'; diff --git a/src/chart_types/xy_chart/state/chart_state.test.ts b/src/chart_types/xy_chart/state/chart_state.test.ts index 6b1ea18c42..c9455ec44f 100644 --- a/src/chart_types/xy_chart/state/chart_state.test.ts +++ b/src/chart_types/xy_chart/state/chart_state.test.ts @@ -18,13 +18,13 @@ */ import { ChartTypes } from '../..'; -import { LegendItem } from '../../../commons/legend'; +import { LegendItem } from '../../../common/legend'; import { MockBarGeometry } from '../../../mocks'; import { ScaleContinuous, ScaleBand } from '../../../scales'; import { ScaleType } from '../../../scales/constants'; import { SpecTypes, TooltipType } from '../../../specs/constants'; import { TooltipValue } from '../../../specs/settings'; -import { Position, RecursivePartial } from '../../../utils/commons'; +import { Position, RecursivePartial } from '../../../utils/common'; import { GeometryValue, BandedAccessorType } from '../../../utils/geometry'; import { AxisId } from '../../../utils/ids'; import { AxisStyle } from '../../../utils/themes/theme'; diff --git a/src/chart_types/xy_chart/state/chart_state.tsx b/src/chart_types/xy_chart/state/chart_state.tsx index e1773b8bb7..4b0ebecc69 100644 --- a/src/chart_types/xy_chart/state/chart_state.tsx +++ b/src/chart_types/xy_chart/state/chart_state.tsx @@ -20,14 +20,14 @@ import React, { RefObject } from 'react'; import { ChartTypes } from '../..'; -import { LegendItemExtraValues } from '../../../commons/legend'; -import { SeriesKey } from '../../../commons/series_id'; +import { LegendItemExtraValues } from '../../../common/legend'; +import { SeriesKey } from '../../../common/series_id'; import { BrushTool } from '../../../components/brush/brush'; import { Tooltip } from '../../../components/tooltip'; import { InternalChartState, GlobalChartState, BackwardRef } from '../../../state/chart_state'; import { getChartContainerDimensionsSelector } from '../../../state/selectors/get_chart_container_dimensions'; import { InitStatus } from '../../../state/selectors/get_internal_is_intialized'; -import { htmlIdGenerator } from '../../../utils/commons'; +import { htmlIdGenerator } from '../../../utils/common'; import { XYChart } from '../renderer/canvas/xy_chart'; import { Annotations } from '../renderer/dom/annotations'; import { Crosshair } from '../renderer/dom/crosshair'; diff --git a/src/chart_types/xy_chart/state/selectors/compute_chart_dimensions.ts b/src/chart_types/xy_chart/state/selectors/compute_chart_dimensions.ts index 5bd5da46fa..32217ad917 100644 --- a/src/chart_types/xy_chart/state/selectors/compute_chart_dimensions.ts +++ b/src/chart_types/xy_chart/state/selectors/compute_chart_dimensions.ts @@ -23,7 +23,7 @@ import { getChartContainerDimensionsSelector } from '../../../../state/selectors import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; import { getChartThemeSelector } from '../../../../state/selectors/get_chart_theme'; import { getLegendSizeSelector, LegendSizing } from '../../../../state/selectors/get_legend_size'; -import { Position } from '../../../../utils/commons'; +import { Position } from '../../../../utils/common'; import { computeChartDimensions, ChartDimensions } from '../../utils/dimensions'; import { computeAxisTicksDimensionsSelector } from './compute_axis_ticks_dimensions'; import { getAxesStylesSelector } from './get_axis_styles'; diff --git a/src/chart_types/xy_chart/state/selectors/compute_legend.ts b/src/chart_types/xy_chart/state/selectors/compute_legend.ts index e9781088ac..6f54849f07 100644 --- a/src/chart_types/xy_chart/state/selectors/compute_legend.ts +++ b/src/chart_types/xy_chart/state/selectors/compute_legend.ts @@ -19,7 +19,7 @@ import createCachedSelector from 're-reselect'; -import { LegendItem } from '../../../../commons/legend'; +import { LegendItem } from '../../../../common/legend'; import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; import { getChartThemeSelector } from '../../../../state/selectors/get_chart_theme'; import { getDeselectedSeriesSelector } from '../../../../state/selectors/get_deselected_data_series'; diff --git a/src/chart_types/xy_chart/state/selectors/get_annotation_tooltip_state.ts b/src/chart_types/xy_chart/state/selectors/get_annotation_tooltip_state.ts index 76c405ef6d..34bf05acaa 100644 --- a/src/chart_types/xy_chart/state/selectors/get_annotation_tooltip_state.ts +++ b/src/chart_types/xy_chart/state/selectors/get_annotation_tooltip_state.ts @@ -23,7 +23,7 @@ import { TooltipInfo } from '../../../../components/tooltip/types'; import { GlobalChartState } from '../../../../state/chart_state'; import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; import { getChartRotationSelector } from '../../../../state/selectors/get_chart_rotation'; -import { Rotation } from '../../../../utils/commons'; +import { Rotation } from '../../../../utils/common'; import { Dimensions } from '../../../../utils/dimensions'; import { AnnotationId } from '../../../../utils/ids'; import { Point } from '../../../../utils/point'; diff --git a/src/chart_types/xy_chart/state/selectors/get_axis_styles.ts b/src/chart_types/xy_chart/state/selectors/get_axis_styles.ts index 5f71e088b0..2209924fd0 100644 --- a/src/chart_types/xy_chart/state/selectors/get_axis_styles.ts +++ b/src/chart_types/xy_chart/state/selectors/get_axis_styles.ts @@ -21,7 +21,7 @@ import createCachedSelector from 're-reselect'; import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; import { getChartThemeSelector } from '../../../../state/selectors/get_chart_theme'; -import { mergePartial, RecursivePartial } from '../../../../utils/commons'; +import { mergePartial, RecursivePartial } from '../../../../utils/common'; import { AxisId } from '../../../../utils/ids'; import { AxisStyle } from '../../../../utils/themes/theme'; import { isVerticalAxis } from '../../utils/axis_type_utils'; diff --git a/src/chart_types/xy_chart/state/selectors/get_brush_area.ts b/src/chart_types/xy_chart/state/selectors/get_brush_area.ts index fddad85f27..ddde97975f 100644 --- a/src/chart_types/xy_chart/state/selectors/get_brush_area.ts +++ b/src/chart_types/xy_chart/state/selectors/get_brush_area.ts @@ -24,7 +24,7 @@ import { GlobalChartState } from '../../../../state/chart_state'; import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; import { getChartRotationSelector } from '../../../../state/selectors/get_chart_rotation'; import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs'; -import { Rotation } from '../../../../utils/commons'; +import { Rotation } from '../../../../utils/common'; import { Dimensions } from '../../../../utils/dimensions'; import { Point } from '../../../../utils/point'; import { isVerticalRotation } from '../utils/common'; diff --git a/src/chart_types/xy_chart/state/selectors/get_debug_state.ts b/src/chart_types/xy_chart/state/selectors/get_debug_state.ts index a1f07cd84e..14dfffc195 100644 --- a/src/chart_types/xy_chart/state/selectors/get_debug_state.ts +++ b/src/chart_types/xy_chart/state/selectors/get_debug_state.ts @@ -19,7 +19,7 @@ import createCachedSelector from 're-reselect'; -import { LegendItem } from '../../../../commons/legend'; +import { LegendItem } from '../../../../common/legend'; import { Line } from '../../../../geoms/types'; import { AxisSpec } from '../../../../specs'; import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; diff --git a/src/chart_types/xy_chart/state/selectors/get_geometries_index_keys.ts b/src/chart_types/xy_chart/state/selectors/get_geometries_index_keys.ts index d0f7196d7b..a8fa7e1814 100644 --- a/src/chart_types/xy_chart/state/selectors/get_geometries_index_keys.ts +++ b/src/chart_types/xy_chart/state/selectors/get_geometries_index_keys.ts @@ -20,7 +20,7 @@ import createCachedSelector from 're-reselect'; import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; -import { compareByValueAsc } from '../../../../utils/commons'; +import { compareByValueAsc } from '../../../../utils/common'; import { computeSeriesGeometriesSelector } from './compute_series_geometries'; /** @internal */ diff --git a/src/chart_types/xy_chart/state/selectors/get_highlighted_series.ts b/src/chart_types/xy_chart/state/selectors/get_highlighted_series.ts index 9e361baeb9..ab82a55d0d 100644 --- a/src/chart_types/xy_chart/state/selectors/get_highlighted_series.ts +++ b/src/chart_types/xy_chart/state/selectors/get_highlighted_series.ts @@ -19,7 +19,7 @@ import createCachedSelector from 're-reselect'; -import { LegendItem } from '../../../../commons/legend'; +import { LegendItem } from '../../../../common/legend'; import { GlobalChartState } from '../../../../state/chart_state'; import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; import { computeLegendSelector } from './compute_legend'; diff --git a/src/chart_types/xy_chart/state/selectors/get_highlighted_values.ts b/src/chart_types/xy_chart/state/selectors/get_highlighted_values.ts index dad488be56..921c18f4e3 100644 --- a/src/chart_types/xy_chart/state/selectors/get_highlighted_values.ts +++ b/src/chart_types/xy_chart/state/selectors/get_highlighted_values.ts @@ -19,8 +19,8 @@ import createCachedSelector from 're-reselect'; -import { LegendItemExtraValues } from '../../../../commons/legend'; -import { SeriesKey } from '../../../../commons/series_id'; +import { LegendItemExtraValues } from '../../../../common/legend'; +import { SeriesKey } from '../../../../common/series_id'; import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; import { getHighligthedValues } from '../../tooltip/tooltip'; import { getTooltipInfoSelector } from './get_tooltip_values_highlighted_geoms'; diff --git a/src/chart_types/xy_chart/state/selectors/get_series_color_map.ts b/src/chart_types/xy_chart/state/selectors/get_series_color_map.ts index 7e82133cfd..64e7c32ca1 100644 --- a/src/chart_types/xy_chart/state/selectors/get_series_color_map.ts +++ b/src/chart_types/xy_chart/state/selectors/get_series_color_map.ts @@ -19,11 +19,11 @@ import createCachedSelector from 're-reselect'; -import { SeriesKey } from '../../../../commons/series_id'; +import { SeriesKey } from '../../../../common/series_id'; import { GlobalChartState } from '../../../../state/chart_state'; import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; import { getChartThemeSelector } from '../../../../state/selectors/get_chart_theme'; -import { Color } from '../../../../utils/commons'; +import { Color } from '../../../../utils/common'; import { getSeriesColors } from '../../utils/series'; import { getCustomSeriesColors } from '../utils/utils'; import { computeSeriesDomainsSelector } from './compute_series_domains'; diff --git a/src/chart_types/xy_chart/state/selectors/get_tooltip_values_highlighted_geoms.ts b/src/chart_types/xy_chart/state/selectors/get_tooltip_values_highlighted_geoms.ts index a11c877874..4cd5f1fcb8 100644 --- a/src/chart_types/xy_chart/state/selectors/get_tooltip_values_highlighted_geoms.ts +++ b/src/chart_types/xy_chart/state/selectors/get_tooltip_values_highlighted_geoms.ts @@ -35,7 +35,7 @@ import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; import { getChartRotationSelector } from '../../../../state/selectors/get_chart_rotation'; import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs'; import { getTooltipHeaderFormatterSelector } from '../../../../state/selectors/get_tooltip_header_formatter'; -import { Rotation } from '../../../../utils/commons'; +import { Rotation } from '../../../../utils/common'; import { isValidPointerOverEvent } from '../../../../utils/events'; import { IndexedGeometry } from '../../../../utils/geometry'; import { Point } from '../../../../utils/point'; diff --git a/src/chart_types/xy_chart/state/selectors/merge_y_custom_domains.ts b/src/chart_types/xy_chart/state/selectors/merge_y_custom_domains.ts index b35b0643db..5acc516aa4 100644 --- a/src/chart_types/xy_chart/state/selectors/merge_y_custom_domains.ts +++ b/src/chart_types/xy_chart/state/selectors/merge_y_custom_domains.ts @@ -21,7 +21,7 @@ import createCachedSelector from 're-reselect'; import { getChartIdSelector } from '../../../../state/selectors/get_chart_id'; import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs'; -import { Rotation } from '../../../../utils/commons'; +import { Rotation } from '../../../../utils/common'; import { GroupId } from '../../../../utils/ids'; import { isCompleteBound, isLowerBound, isUpperBound, isBounded } from '../../utils/axis_type_utils'; import { isYDomain } from '../../utils/axis_utils'; diff --git a/src/chart_types/xy_chart/state/selectors/on_brush_end_caller.ts b/src/chart_types/xy_chart/state/selectors/on_brush_end_caller.ts index a63e55a0a5..89011c1bac 100644 --- a/src/chart_types/xy_chart/state/selectors/on_brush_end_caller.ts +++ b/src/chart_types/xy_chart/state/selectors/on_brush_end_caller.ts @@ -26,7 +26,7 @@ import { GroupBrushExtent, XYBrushArea } from '../../../../specs'; import { BrushAxis } from '../../../../specs/constants'; import { DragState, GlobalChartState } from '../../../../state/chart_state'; import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs'; -import { maxValueWithUpperLimit, minValueWithLowerLimit, Rotation } from '../../../../utils/commons'; +import { maxValueWithUpperLimit, minValueWithLowerLimit, Rotation } from '../../../../utils/common'; import { Dimensions } from '../../../../utils/dimensions'; import { hasDragged, DragCheckProps } from '../../../../utils/events'; import { GroupId } from '../../../../utils/ids'; diff --git a/src/chart_types/xy_chart/state/utils/common.test.ts b/src/chart_types/xy_chart/state/utils/common.test.ts index 07df2d44b1..9924025159 100644 --- a/src/chart_types/xy_chart/state/utils/common.test.ts +++ b/src/chart_types/xy_chart/state/utils/common.test.ts @@ -18,7 +18,7 @@ */ import { ChartTypes } from '../../..'; -import { LegendItem } from '../../../../commons/legend'; +import { LegendItem } from '../../../../common/legend'; import { ScaleType } from '../../../../scales/constants'; import { SpecTypes } from '../../../../specs'; import { BARCHART_1Y1G } from '../../../../utils/data_samples/test_dataset'; diff --git a/src/chart_types/xy_chart/state/utils/common.ts b/src/chart_types/xy_chart/state/utils/common.ts index 492982b43d..a5edb6299b 100644 --- a/src/chart_types/xy_chart/state/utils/common.ts +++ b/src/chart_types/xy_chart/state/utils/common.ts @@ -17,8 +17,8 @@ * under the License. */ -import { LegendItem } from '../../../../commons/legend'; -import { Rotation } from '../../../../utils/commons'; +import { LegendItem } from '../../../../common/legend'; +import { Rotation } from '../../../../utils/common'; import { BasicSeriesSpec, SeriesTypes } from '../../utils/specs'; import { GeometriesCounts } from './types'; diff --git a/src/chart_types/xy_chart/state/utils/types.ts b/src/chart_types/xy_chart/state/utils/types.ts index c524e0f4b9..2f2328cfcf 100644 --- a/src/chart_types/xy_chart/state/utils/types.ts +++ b/src/chart_types/xy_chart/state/utils/types.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { SeriesKey } from '../../../../commons/series_id'; +import { SeriesKey } from '../../../../common/series_id'; import { Scale } from '../../../../scales'; import { Domain } from '../../../../utils/domain'; import { diff --git a/src/chart_types/xy_chart/state/utils/utils.ts b/src/chart_types/xy_chart/state/utils/utils.ts index 3522087236..c5730cdfd7 100644 --- a/src/chart_types/xy_chart/state/utils/utils.ts +++ b/src/chart_types/xy_chart/state/utils/utils.ts @@ -17,11 +17,11 @@ * under the License. */ -import { SeriesKey, SeriesIdentifier } from '../../../../commons/series_id'; +import { SeriesKey, SeriesIdentifier } from '../../../../common/series_id'; import { Scale } from '../../../../scales'; import { GroupBySpec } from '../../../../specs'; import { OrderBy } from '../../../../specs/settings'; -import { mergePartial, Rotation, Color, isUniqueArray } from '../../../../utils/commons'; +import { mergePartial, Rotation, Color, isUniqueArray } from '../../../../utils/common'; import { CurveType } from '../../../../utils/curves'; import { Dimensions, Size } from '../../../../utils/dimensions'; import { Domain } from '../../../../utils/domain'; @@ -35,7 +35,7 @@ import { } from '../../../../utils/geometry'; import { GroupId, SpecId } from '../../../../utils/ids'; import { ColorConfig, Theme } from '../../../../utils/themes/theme'; -import { getPredicateFn, Predicate } from '../../../heatmap/utils/commons'; +import { getPredicateFn, Predicate } from '../../../heatmap/utils/common'; import { XDomain } from '../../domains/types'; import { mergeXDomain } from '../../domains/x_domain'; import { isStackedSpec, mergeYDomain } from '../../domains/y_domain'; diff --git a/src/chart_types/xy_chart/tooltip/tooltip.test.ts b/src/chart_types/xy_chart/tooltip/tooltip.test.ts index e1e2cb0722..159e647a91 100644 --- a/src/chart_types/xy_chart/tooltip/tooltip.test.ts +++ b/src/chart_types/xy_chart/tooltip/tooltip.test.ts @@ -22,7 +22,7 @@ import { MockBarGeometry } from '../../../mocks'; import { MockGlobalSpec, MockSeriesSpec } from '../../../mocks/specs'; import { ScaleType } from '../../../scales/constants'; import { SpecTypes } from '../../../specs/constants'; -import { Position, RecursivePartial } from '../../../utils/commons'; +import { Position, RecursivePartial } from '../../../utils/common'; import { BarGeometry } from '../../../utils/geometry'; import { AxisStyle } from '../../../utils/themes/theme'; import { AxisSpec, BarSeriesSpec, TickFormatter } from '../utils/specs'; diff --git a/src/chart_types/xy_chart/tooltip/tooltip.ts b/src/chart_types/xy_chart/tooltip/tooltip.ts index 3ec3df19f9..1364822c90 100644 --- a/src/chart_types/xy_chart/tooltip/tooltip.ts +++ b/src/chart_types/xy_chart/tooltip/tooltip.ts @@ -17,11 +17,11 @@ * under the License. */ -import { LegendItemExtraValues } from '../../../commons/legend'; -import { SeriesKey } from '../../../commons/series_id'; +import { LegendItemExtraValues } from '../../../common/legend'; +import { SeriesKey } from '../../../common/series_id'; import { TooltipValue } from '../../../specs'; import { getAccessorFormatLabel } from '../../../utils/accessor'; -import { isDefined } from '../../../utils/commons'; +import { isDefined } from '../../../utils/common'; import { IndexedGeometry, BandedAccessorType } from '../../../utils/geometry'; import { defaultTickFormatter } from '../utils/axis_utils'; import { getSeriesName } from '../utils/series'; diff --git a/src/chart_types/xy_chart/utils/axis_type_utils.test.ts b/src/chart_types/xy_chart/utils/axis_type_utils.test.ts index 0160cb4a2c..2dcc7543bb 100644 --- a/src/chart_types/xy_chart/utils/axis_type_utils.test.ts +++ b/src/chart_types/xy_chart/utils/axis_type_utils.test.ts @@ -17,7 +17,7 @@ * under the License. */ -import { Position } from '../../../utils/commons'; +import { Position } from '../../../utils/common'; import { isBounded, isVerticalAxis, isHorizontalAxis, isVerticalGrid, isHorizontalGrid } from './axis_type_utils'; describe('Axis type utils', () => { diff --git a/src/chart_types/xy_chart/utils/axis_type_utils.ts b/src/chart_types/xy_chart/utils/axis_type_utils.ts index 6bb3a90fbd..b762f2a1d7 100644 --- a/src/chart_types/xy_chart/utils/axis_type_utils.ts +++ b/src/chart_types/xy_chart/utils/axis_type_utils.ts @@ -17,7 +17,7 @@ * under the License. */ -import { Position } from '../../../utils/commons'; +import { Position } from '../../../utils/common'; import { CompleteBoundedDomain, LowerBoundedDomain, UpperBoundedDomain, DomainRange } from './specs'; export function isLowerBound(domain: Partial): domain is LowerBoundedDomain { diff --git a/src/chart_types/xy_chart/utils/axis_utils.test.ts b/src/chart_types/xy_chart/utils/axis_utils.test.ts index d9e1b4a6a1..589e5c2e17 100644 --- a/src/chart_types/xy_chart/utils/axis_utils.test.ts +++ b/src/chart_types/xy_chart/utils/axis_utils.test.ts @@ -28,7 +28,7 @@ import { ScaleType } from '../../../scales/constants'; import { SpecTypes } from '../../../specs/constants'; import { CanvasTextBBoxCalculator } from '../../../utils/bbox/canvas_text_bbox_calculator'; import { SvgTextBBoxCalculator } from '../../../utils/bbox/svg_text_bbox_calculator'; -import { Position, mergePartial } from '../../../utils/commons'; +import { Position, mergePartial } from '../../../utils/common'; import { niceTimeFormatter } from '../../../utils/data/formatters'; import { AxisId, GroupId } from '../../../utils/ids'; import { LIGHT_THEME } from '../../../utils/themes/light_theme'; diff --git a/src/chart_types/xy_chart/utils/axis_utils.ts b/src/chart_types/xy_chart/utils/axis_utils.ts index c3b1f1a732..f9fe956f1b 100644 --- a/src/chart_types/xy_chart/utils/axis_utils.ts +++ b/src/chart_types/xy_chart/utils/axis_utils.ts @@ -27,7 +27,7 @@ import { VerticalAlignment, HorizontalAlignment, getPercentageValue, -} from '../../../utils/commons'; +} from '../../../utils/common'; import { Dimensions, Margins, getSimplePadding, Size } from '../../../utils/dimensions'; import { AxisId } from '../../../utils/ids'; import { Logger } from '../../../utils/logger'; diff --git a/src/chart_types/xy_chart/utils/dimensions.test.ts b/src/chart_types/xy_chart/utils/dimensions.test.ts index 11c03c4bc0..5b7ad67be0 100644 --- a/src/chart_types/xy_chart/utils/dimensions.test.ts +++ b/src/chart_types/xy_chart/utils/dimensions.test.ts @@ -19,7 +19,7 @@ import { ChartTypes } from '../..'; import { SpecTypes } from '../../../specs/constants'; -import { Position } from '../../../utils/commons'; +import { Position } from '../../../utils/common'; import { Margins } from '../../../utils/dimensions'; import { AxisId } from '../../../utils/ids'; import { LIGHT_THEME } from '../../../utils/themes/light_theme'; diff --git a/src/chart_types/xy_chart/utils/grid_lines.ts b/src/chart_types/xy_chart/utils/grid_lines.ts index e057600207..716e732f5b 100644 --- a/src/chart_types/xy_chart/utils/grid_lines.ts +++ b/src/chart_types/xy_chart/utils/grid_lines.ts @@ -17,7 +17,7 @@ * under the License. */ import { Line, Stroke } from '../../../geoms/types'; -import { mergePartial, RecursivePartial } from '../../../utils/commons'; +import { mergePartial, RecursivePartial } from '../../../utils/common'; import { Size } from '../../../utils/dimensions'; import { AxisId } from '../../../utils/ids'; import { Point } from '../../../utils/point'; diff --git a/src/chart_types/xy_chart/utils/indexed_geometry_map.ts b/src/chart_types/xy_chart/utils/indexed_geometry_map.ts index a4562c7445..449092267f 100644 --- a/src/chart_types/xy_chart/utils/indexed_geometry_map.ts +++ b/src/chart_types/xy_chart/utils/indexed_geometry_map.ts @@ -19,7 +19,7 @@ import { $Values } from 'utility-types'; -import { isNil } from '../../../utils/commons'; +import { isNil } from '../../../utils/common'; import { Bounds } from '../../../utils/d3-delaunay'; import { IndexedGeometry, isPointGeometry } from '../../../utils/geometry'; import { Point } from '../../../utils/point'; diff --git a/src/chart_types/xy_chart/utils/indexed_geometry_spatial_map.ts b/src/chart_types/xy_chart/utils/indexed_geometry_spatial_map.ts index 44d5fcbad7..242cf44ad0 100644 --- a/src/chart_types/xy_chart/utils/indexed_geometry_spatial_map.ts +++ b/src/chart_types/xy_chart/utils/indexed_geometry_spatial_map.ts @@ -17,7 +17,7 @@ * under the License. */ -import { getDistance } from '../../../utils/commons'; +import { getDistance } from '../../../utils/common'; import { Delaunay, Bounds } from '../../../utils/d3-delaunay'; import { IndexedGeometry, PointGeometry } from '../../../utils/geometry'; import { Point } from '../../../utils/point'; diff --git a/src/chart_types/xy_chart/utils/interactions.ts b/src/chart_types/xy_chart/utils/interactions.ts index 6d6228d6fa..5c011e15c5 100644 --- a/src/chart_types/xy_chart/utils/interactions.ts +++ b/src/chart_types/xy_chart/utils/interactions.ts @@ -17,7 +17,7 @@ * under the License. */ -import { Rotation } from '../../../utils/commons'; +import { Rotation } from '../../../utils/common'; import { Size } from '../../../utils/dimensions'; import { BarGeometry, PointGeometry, IndexedGeometry, isPointGeometry, isBarGeometry } from '../../../utils/geometry'; diff --git a/src/chart_types/xy_chart/utils/series.test.ts b/src/chart_types/xy_chart/utils/series.test.ts index 2e6e12a2f5..eaab9cbd2e 100644 --- a/src/chart_types/xy_chart/utils/series.test.ts +++ b/src/chart_types/xy_chart/utils/series.test.ts @@ -28,7 +28,7 @@ import { SeededDataGenerator, getRandomNumberGenerator } from '../../../mocks/ut import { ScaleType } from '../../../scales/constants'; import { SpecTypes } from '../../../specs/constants'; import { AccessorFn } from '../../../utils/accessor'; -import { Position } from '../../../utils/commons'; +import { Position } from '../../../utils/common'; import * as TestDataset from '../../../utils/data_samples/test_dataset'; import { KIBANA_METRICS } from '../../../utils/data_samples/test_dataset_kibana'; import { ColorConfig } from '../../../utils/themes/theme'; diff --git a/src/chart_types/xy_chart/utils/series.ts b/src/chart_types/xy_chart/utils/series.ts index 1c25bae439..f903f38727 100644 --- a/src/chart_types/xy_chart/utils/series.ts +++ b/src/chart_types/xy_chart/utils/series.ts @@ -17,13 +17,13 @@ * under the License. */ -import { SeriesIdentifier, SeriesKey } from '../../../commons/series_id'; +import { SeriesIdentifier, SeriesKey } from '../../../common/series_id'; import { ScaleType } from '../../../scales/constants'; import { GroupBySpec, BinAgg, Direction, XScaleType } from '../../../specs'; import { OrderBy } from '../../../specs/settings'; import { ColorOverrides } from '../../../state/chart_state'; import { Accessor, AccessorFn, getAccessorValue } from '../../../utils/accessor'; -import { Datum, Color, isNil } from '../../../utils/commons'; +import { Datum, Color, isNil } from '../../../utils/common'; import { GroupId } from '../../../utils/ids'; import { Logger } from '../../../utils/logger'; import { ColorConfig } from '../../../utils/themes/theme'; diff --git a/src/chart_types/xy_chart/utils/specs.ts b/src/chart_types/xy_chart/utils/specs.ts index 1466c4438d..5b8f0580e3 100644 --- a/src/chart_types/xy_chart/utils/specs.ts +++ b/src/chart_types/xy_chart/utils/specs.ts @@ -26,7 +26,7 @@ import { ScaleType } from '../../../scales/constants'; import { Spec } from '../../../specs'; import { SpecTypes } from '../../../specs/constants'; import { Accessor, AccessorFormat, AccessorFn } from '../../../utils/accessor'; -import { RecursivePartial, Color, Position, Datum } from '../../../utils/commons'; +import { RecursivePartial, Color, Position, Datum } from '../../../utils/common'; import { CurveType } from '../../../utils/curves'; import { AxisId, GroupId } from '../../../utils/ids'; import { diff --git a/src/chart_types/xy_chart/utils/stacked_series_utils.ts b/src/chart_types/xy_chart/utils/stacked_series_utils.ts index 1838c42144..aa8ef7f974 100644 --- a/src/chart_types/xy_chart/utils/stacked_series_utils.ts +++ b/src/chart_types/xy_chart/utils/stacked_series_utils.ts @@ -27,7 +27,7 @@ import { SeriesPoint, } from 'd3-shape'; -import { SeriesKey } from '../../../commons/series_id'; +import { SeriesKey } from '../../../common/series_id'; import { ScaleType } from '../../../scales/constants'; import { DataSeries, DataSeriesDatum } from './series'; import { StackMode } from './specs'; diff --git a/src/commons/category.ts b/src/common/category.ts similarity index 100% rename from src/commons/category.ts rename to src/common/category.ts diff --git a/src/commons/legend.ts b/src/common/legend.ts similarity index 97% rename from src/commons/legend.ts rename to src/common/legend.ts index 225aa66c49..9c856408b7 100644 --- a/src/commons/legend.ts +++ b/src/common/legend.ts @@ -19,7 +19,7 @@ import { PrimitiveValue } from '../chart_types/partition_chart/layout/utils/group_by_rollup'; import { LegendPath } from '../state/actions/legend'; -import { Color } from '../utils/commons'; +import { Color } from '../utils/common'; import { CategoryKey, CategoryLabel } from './category'; import { SeriesIdentifier } from './series_id'; /** @internal */ diff --git a/src/commons/series_id.ts b/src/common/series_id.ts similarity index 100% rename from src/commons/series_id.ts rename to src/common/series_id.ts diff --git a/src/components/chart.tsx b/src/components/chart.tsx index 8b450afd9f..c44e8b04cc 100644 --- a/src/components/chart.tsx +++ b/src/components/chart.tsx @@ -32,7 +32,7 @@ import { chartStoreReducer, GlobalChartState } from '../state/chart_state'; import { getInternalIsInitializedSelector, InitStatus } from '../state/selectors/get_internal_is_intialized'; import { getSettingsSpecSelector } from '../state/selectors/get_settings_specs'; import { ChartSize, getChartSize } from '../utils/chart_size'; -import { Position } from '../utils/commons'; +import { Position } from '../utils/common'; import { ChartBackground } from './chart_background'; import { ChartContainer } from './chart_container'; import { ChartResizer } from './chart_resizer'; diff --git a/src/components/chart_resizer.tsx b/src/components/chart_resizer.tsx index a1e8e021d3..29bbe1abee 100644 --- a/src/components/chart_resizer.tsx +++ b/src/components/chart_resizer.tsx @@ -26,7 +26,7 @@ import { debounce } from 'ts-debounce'; import { updateParentDimensions } from '../state/actions/chart_settings'; import { GlobalChartState } from '../state/chart_state'; import { getSettingsSpecSelector } from '../state/selectors/get_settings_specs'; -import { isDefined } from '../utils/commons'; +import { isDefined } from '../utils/common'; import { Dimensions } from '../utils/dimensions'; interface ResizerStateProps { diff --git a/src/components/legend/legend.tsx b/src/components/legend/legend.tsx index a2be0d827b..080a110ee8 100644 --- a/src/components/legend/legend.tsx +++ b/src/components/legend/legend.tsx @@ -22,7 +22,7 @@ import React from 'react'; import { connect } from 'react-redux'; import { Dispatch, bindActionCreators } from 'redux'; -import { LegendItem, LegendItemExtraValues } from '../../commons/legend'; +import { LegendItem, LegendItemExtraValues } from '../../common/legend'; import { LegendItemListener, BasicListener, LegendColorPicker, LegendAction } from '../../specs'; import { clearTemporaryColors, setTemporaryColor, setPersistedColor } from '../../state/actions/colors'; import { @@ -38,7 +38,7 @@ import { getLegendExtraValuesSelector } from '../../state/selectors/get_legend_i import { getLegendSizeSelector } from '../../state/selectors/get_legend_size'; import { getSettingsSpecSelector } from '../../state/selectors/get_settings_specs'; import { BBox } from '../../utils/bbox/bbox_calculator'; -import { Position } from '../../utils/commons'; +import { Position } from '../../utils/common'; import { LIGHT_THEME } from '../../utils/themes/light_theme'; import { Theme } from '../../utils/themes/theme'; import { LegendItemProps, renderLegendItem } from './legend_item'; diff --git a/src/components/legend/legend_item.tsx b/src/components/legend/legend_item.tsx index 84031b48ce..e540669356 100644 --- a/src/components/legend/legend_item.tsx +++ b/src/components/legend/legend_item.tsx @@ -20,8 +20,8 @@ import classNames from 'classnames'; import React, { Component, createRef, MouseEventHandler } from 'react'; -import { LegendItem, LegendItemExtraValues } from '../../commons/legend'; -import { SeriesIdentifier } from '../../commons/series_id'; +import { LegendItem, LegendItemExtraValues } from '../../common/legend'; +import { SeriesIdentifier } from '../../common/series_id'; import { LegendItemListener, BasicListener, LegendColorPicker, LegendAction } from '../../specs/settings'; import { clearTemporaryColors as clearTemporaryColorsAction, @@ -33,7 +33,7 @@ import { onLegendItemOverAction, onToggleDeselectSeriesAction, } from '../../state/actions/legend'; -import { Position, Color } from '../../utils/commons'; +import { Position, Color } from '../../utils/common'; import { deepEqual } from '../../utils/fast_deep_equal'; import { Color as ItemColor } from './color'; import { renderExtra } from './extra'; diff --git a/src/components/legend/style_utils.ts b/src/components/legend/style_utils.ts index 0cfb90b8ac..9772bf4a7f 100644 --- a/src/components/legend/style_utils.ts +++ b/src/components/legend/style_utils.ts @@ -18,7 +18,7 @@ */ import { BBox } from '../../utils/bbox/bbox_calculator'; -import { Position } from '../../utils/commons'; +import { Position } from '../../utils/common'; import { Margins } from '../../utils/dimensions'; import { isHorizontalLegend } from '../../utils/legend'; import { LegendStyle as ThemeLegendStyle } from '../../utils/themes/theme'; diff --git a/src/components/legend/utils.ts b/src/components/legend/utils.ts index 3a6494cfe2..d903ba99a0 100644 --- a/src/components/legend/utils.ts +++ b/src/components/legend/utils.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { LegendItemExtraValues, LegendItem } from '../../commons/legend'; +import { LegendItemExtraValues, LegendItem } from '../../common/legend'; /** @internal */ export function getExtra(extraValues: Map, item: LegendItem, totalItems: number) { diff --git a/src/components/portal/tooltip_portal.tsx b/src/components/portal/tooltip_portal.tsx index 8d7dc7da07..390ab3f426 100644 --- a/src/components/portal/tooltip_portal.tsx +++ b/src/components/portal/tooltip_portal.tsx @@ -21,7 +21,7 @@ import { createPopper, Instance } from '@popperjs/core'; import { useRef, useEffect, useCallback, ReactNode, useMemo } from 'react'; import { createPortal } from 'react-dom'; -import { mergePartial, isDefined } from '../../utils/commons'; +import { mergePartial, isDefined } from '../../utils/common'; import { TooltipPortalSettings, PortalAnchorRef } from './types'; import { DEFAULT_POPPER_SETTINGS, getOrCreateNode, isHTMLElement } from './utils'; diff --git a/src/components/tooltip/tooltip.tsx b/src/components/tooltip/tooltip.tsx index 2ed2c3a0bb..4271b317ca 100644 --- a/src/components/tooltip/tooltip.tsx +++ b/src/components/tooltip/tooltip.tsx @@ -35,7 +35,7 @@ import { getInternalTooltipAnchorPositionSelector } from '../../state/selectors/ import { getInternalTooltipInfoSelector } from '../../state/selectors/get_internal_tooltip_info'; import { getSettingsSpecSelector } from '../../state/selectors/get_settings_specs'; import { getTooltipHeaderFormatterSelector } from '../../state/selectors/get_tooltip_header_formatter'; -import { Rotation, isDefined } from '../../utils/commons'; +import { Rotation, isDefined } from '../../utils/common'; import { TooltipPortal, TooltipPortalSettings, AnchorPosition, Placement } from '../portal'; import { getTooltipSettings } from './get_tooltip_settings'; import { TooltipInfo, TooltipAnchorPosition } from './types'; diff --git a/src/index.ts b/src/index.ts index b7fd07d9d6..7c7f2604c4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -30,8 +30,8 @@ export { DebugState } from './state/types'; export { CurveType } from './utils/curves'; export { SimplePadding } from './utils/dimensions'; export { timeFormatter, niceTimeFormatter, niceTimeFormatByDay } from './utils/data/formatters'; -export { Datum, Position, Rendering, Rotation, VerticalAlignment, HorizontalAlignment } from './utils/commons'; -export { SeriesIdentifier } from './commons/series_id'; +export { Datum, Position, Rendering, Rotation, VerticalAlignment, HorizontalAlignment } from './utils/common'; +export { SeriesIdentifier } from './common/series_id'; export { XYChartSeriesIdentifier, DataSeriesDatum, FilledValues } from './chart_types/xy_chart/utils/series'; export { AnnotationTooltipFormatter, CustomAnnotationTooltip } from './chart_types/xy_chart/annotations/types'; export { GeometryValue } from './utils/geometry'; @@ -59,10 +59,10 @@ export { ScaleType } from './scales/constants'; // theme export * from './utils/themes/theme'; -export * from './utils/themes/theme_commons'; +export * from './utils/themes/theme_common'; export { LIGHT_THEME } from './utils/themes/light_theme'; export { DARK_THEME } from './utils/themes/dark_theme'; // utilities -export { RecursivePartial } from './utils/commons'; +export { RecursivePartial } from './utils/common'; export { DataGenerator } from './utils/data_generators/data_generator'; diff --git a/src/mocks/annotations/annotations.ts b/src/mocks/annotations/annotations.ts index e0ae6596b9..b1786050fc 100644 --- a/src/mocks/annotations/annotations.ts +++ b/src/mocks/annotations/annotations.ts @@ -19,7 +19,7 @@ import { AnnotationLineProps } from '../../chart_types/xy_chart/annotations/line/types'; import { AnnotationRectProps } from '../../chart_types/xy_chart/annotations/rect/types'; -import { mergePartial, RecursivePartial } from '../../utils/commons'; +import { mergePartial, RecursivePartial } from '../../utils/common'; /** @internal */ export class MockAnnotationLineProps { diff --git a/src/mocks/geometries.ts b/src/mocks/geometries.ts index 47551aa032..6b1783c27d 100644 --- a/src/mocks/geometries.ts +++ b/src/mocks/geometries.ts @@ -19,7 +19,7 @@ import { omit } from 'lodash'; -import { mergePartial, RecursivePartial } from '../utils/commons'; +import { mergePartial, RecursivePartial } from '../utils/common'; import { AreaGeometry, PointGeometry, BarGeometry, LineGeometry, BubbleGeometry } from '../utils/geometry'; import { LIGHT_THEME } from '../utils/themes/light_theme'; import { MockSeriesIdentifier } from './series/series_identifiers'; diff --git a/src/mocks/scale/scale.ts b/src/mocks/scale/scale.ts index 7e2ffbac17..1955cdeed4 100644 --- a/src/mocks/scale/scale.ts +++ b/src/mocks/scale/scale.ts @@ -19,7 +19,7 @@ import { Scale } from '../../scales'; import { ScaleType } from '../../scales/constants'; -import { mergePartial } from '../../utils/commons'; +import { mergePartial } from '../../utils/common'; /** @internal */ export class MockScale { diff --git a/src/mocks/series/series.ts b/src/mocks/series/series.ts index 9173fcfb47..458df57584 100644 --- a/src/mocks/series/series.ts +++ b/src/mocks/series/series.ts @@ -27,7 +27,7 @@ import { FormattedDataSeries, } from '../../chart_types/xy_chart/utils/series'; import { DEFAULT_GLOBAL_ID, SeriesTypes } from '../../specs'; -import { mergePartial } from '../../utils/commons'; +import { mergePartial } from '../../utils/common'; import { MockSeriesSpec } from '../specs'; import { getRandomNumberGenerator } from '../utils'; import { fitFunctionData } from './data'; diff --git a/src/mocks/series/series_identifiers.ts b/src/mocks/series/series_identifiers.ts index a34ff94a9b..ae701fa759 100644 --- a/src/mocks/series/series_identifiers.ts +++ b/src/mocks/series/series_identifiers.ts @@ -23,7 +23,7 @@ import { XYChartSeriesIdentifier, } from '../../chart_types/xy_chart/utils/series'; import { BasicSeriesSpec } from '../../specs'; -import { mergePartial } from '../../utils/commons'; +import { mergePartial } from '../../utils/common'; type SeriesCollection = Map; diff --git a/src/mocks/specs/specs.ts b/src/mocks/specs/specs.ts index 2159aca0d3..fb116a90b1 100644 --- a/src/mocks/specs/specs.ts +++ b/src/mocks/specs/specs.ts @@ -42,7 +42,7 @@ import { } from '../../chart_types/xy_chart/utils/specs'; import { ScaleType } from '../../scales/constants'; import { SettingsSpec, SpecTypes, DEFAULT_SETTINGS_SPEC } from '../../specs'; -import { Datum, mergePartial, Position, RecursivePartial } from '../../utils/commons'; +import { Datum, mergePartial, Position, RecursivePartial } from '../../utils/common'; import { LIGHT_THEME } from '../../utils/themes/light_theme'; /** @internal */ diff --git a/src/mocks/theme.ts b/src/mocks/theme.ts index ea13596d47..401ce35282 100644 --- a/src/mocks/theme.ts +++ b/src/mocks/theme.ts @@ -17,7 +17,7 @@ * under the License. */ -import { RecursivePartial, mergePartial } from '../utils/commons'; +import { RecursivePartial, mergePartial } from '../utils/common'; import { GeometryStateStyle, RectBorderStyle, diff --git a/src/scales/scale_band.ts b/src/scales/scale_band.ts index 0235f4736f..9ae92280cd 100644 --- a/src/scales/scale_band.ts +++ b/src/scales/scale_band.ts @@ -21,7 +21,7 @@ import { scaleBand, scaleQuantize, ScaleQuantize, ScaleBand as D3ScaleBand } fro import { Scale, ScaleBandType } from '.'; import { PrimitiveValue } from '../chart_types/partition_chart/layout/utils/group_by_rollup'; -import { maxValueWithUpperLimit, stringifyNullsUndefined } from '../utils/commons'; +import { maxValueWithUpperLimit, stringifyNullsUndefined } from '../utils/common'; import { ScaleType } from './constants'; /** diff --git a/src/scales/scale_continuous.ts b/src/scales/scale_continuous.ts index 478740ea5b..e6aaf3b8af 100644 --- a/src/scales/scale_continuous.ts +++ b/src/scales/scale_continuous.ts @@ -31,7 +31,7 @@ import { import { ScaleContinuousType, Scale } from '.'; import { PrimitiveValue } from '../chart_types/partition_chart/layout/utils/group_by_rollup'; -import { maxValueWithUpperLimit, mergePartial } from '../utils/commons'; +import { maxValueWithUpperLimit, mergePartial } from '../utils/common'; import { getMomentWithTz } from '../utils/data/date_time'; import { LOG_MIN_ABS_DOMAIN, ScaleType } from './constants'; diff --git a/src/specs/constants.ts b/src/specs/constants.ts index 68362b4eec..60c26d945c 100644 --- a/src/specs/constants.ts +++ b/src/specs/constants.ts @@ -20,7 +20,7 @@ import { $Values } from 'utility-types'; import { ChartTypes } from '../chart_types'; -import { Position } from '../utils/commons'; +import { Position } from '../utils/common'; import { LIGHT_THEME } from '../utils/themes/light_theme'; import { SettingsSpec } from './settings'; diff --git a/src/specs/group_by.ts b/src/specs/group_by.ts index 579851882a..638af2c3ce 100644 --- a/src/specs/group_by.ts +++ b/src/specs/group_by.ts @@ -20,7 +20,7 @@ import React from 'react'; import { Spec } from '.'; import { ChartTypes } from '../chart_types'; -import { Predicate } from '../chart_types/heatmap/utils/commons'; +import { Predicate } from '../chart_types/heatmap/utils/common'; import { getConnect, specComponentFactory } from '../state/spec_factory'; import { SpecTypes } from './constants'; diff --git a/src/specs/settings.test.tsx b/src/specs/settings.test.tsx index d003a021d9..94965def33 100644 --- a/src/specs/settings.test.tsx +++ b/src/specs/settings.test.tsx @@ -25,7 +25,7 @@ import { createStore, Store } from 'redux'; import { chartStoreReducer, GlobalChartState } from '../state/chart_state'; import { getChartThemeSelector } from '../state/selectors/get_chart_theme'; import { getSettingsSpecSelector } from '../state/selectors/get_settings_specs'; -import { Position, Rendering, Rotation } from '../utils/commons'; +import { Position, Rendering, Rotation } from '../utils/common'; import { DARK_THEME } from '../utils/themes/dark_theme'; import { LIGHT_THEME } from '../utils/themes/light_theme'; import { PartialTheme } from '../utils/themes/theme'; diff --git a/src/specs/settings.tsx b/src/specs/settings.tsx index 3f20574f08..8480b111a7 100644 --- a/src/specs/settings.tsx +++ b/src/specs/settings.tsx @@ -25,13 +25,13 @@ import { PrimitiveValue } from '../chart_types/partition_chart/layout/utils/grou import { LegendStrategy } from '../chart_types/partition_chart/state/selectors/get_highlighted_shapes'; import { XYChartSeriesIdentifier } from '../chart_types/xy_chart/utils/series'; import { DomainRange } from '../chart_types/xy_chart/utils/specs'; -import { SeriesIdentifier } from '../commons/series_id'; +import { SeriesIdentifier } from '../common/series_id'; import { TooltipPortalSettings } from '../components'; import { CustomTooltip } from '../components/tooltip/types'; import { ScaleContinuousType, ScaleOrdinalType } from '../scales'; import { getConnect, specComponentFactory } from '../state/spec_factory'; import { Accessor } from '../utils/accessor'; -import { Color, Position, Rendering, Rotation } from '../utils/commons'; +import { Color, Position, Rendering, Rotation } from '../utils/common'; import { Domain } from '../utils/domain'; import { GeometryValue } from '../utils/geometry'; import { GroupId } from '../utils/ids'; diff --git a/src/state/actions/colors.ts b/src/state/actions/colors.ts index 4a60e7361a..7fbe6db3b2 100644 --- a/src/state/actions/colors.ts +++ b/src/state/actions/colors.ts @@ -17,8 +17,8 @@ * under the License. */ -import { SeriesKey } from '../../commons/series_id'; -import { Color } from '../../utils/commons'; +import { SeriesKey } from '../../common/series_id'; +import { Color } from '../../utils/common'; /** @internal */ export const CLEAR_TEMPORARY_COLORS = 'CLEAR_TEMPORARY_COLORS'; diff --git a/src/state/actions/legend.ts b/src/state/actions/legend.ts index 0c4a306264..3338314cdc 100644 --- a/src/state/actions/legend.ts +++ b/src/state/actions/legend.ts @@ -17,8 +17,8 @@ * under the License. */ -import { CategoryKey } from '../../commons/category'; -import { SeriesIdentifier } from '../../commons/series_id'; +import { CategoryKey } from '../../common/category'; +import { SeriesIdentifier } from '../../common/series_id'; /** @internal */ export const ON_LEGEND_ITEM_OVER = 'ON_LEGEND_ITEM_OVER'; diff --git a/src/state/chart_state.ts b/src/state/chart_state.ts index 1b72616fbb..76b70c4ead 100644 --- a/src/state/chart_state.ts +++ b/src/state/chart_state.ts @@ -25,11 +25,11 @@ import { HeatmapState } from '../chart_types/heatmap/state/chart_state'; import { PrimitiveValue } from '../chart_types/partition_chart/layout/utils/group_by_rollup'; import { PartitionState } from '../chart_types/partition_chart/state/chart_state'; import { XYAxisChartState } from '../chart_types/xy_chart/state/chart_state'; -import { LegendItem, LegendItemExtraValues } from '../commons/legend'; -import { SeriesKey, SeriesIdentifier } from '../commons/series_id'; +import { LegendItem, LegendItemExtraValues } from '../common/legend'; +import { SeriesKey, SeriesIdentifier } from '../common/series_id'; import { TooltipInfo, TooltipAnchorPosition } from '../components/tooltip/types'; import { Spec, PointerEvent, DEFAULT_SETTINGS_SPEC } from '../specs'; -import { Color } from '../utils/commons'; +import { Color } from '../utils/common'; import { Dimensions } from '../utils/dimensions'; import { Logger } from '../utils/logger'; import { Point } from '../utils/point'; diff --git a/src/state/reducers/interactions.ts b/src/state/reducers/interactions.ts index 0ff834997b..1c80924342 100644 --- a/src/state/reducers/interactions.ts +++ b/src/state/reducers/interactions.ts @@ -18,8 +18,8 @@ */ import { getSeriesIndex } from '../../chart_types/xy_chart/utils/series'; -import { LegendItem } from '../../commons/legend'; -import { SeriesIdentifier } from '../../commons/series_id'; +import { LegendItem } from '../../common/legend'; +import { SeriesIdentifier } from '../../common/series_id'; import { getDelta } from '../../utils/point'; import { ON_KEY_UP, KeyActions } from '../actions/key'; import { diff --git a/src/state/selectors/get_chart_rotation.ts b/src/state/selectors/get_chart_rotation.ts index ef2c2b2471..9867869ce1 100644 --- a/src/state/selectors/get_chart_rotation.ts +++ b/src/state/selectors/get_chart_rotation.ts @@ -19,7 +19,7 @@ import createCachedSelector from 're-reselect'; -import { Rotation } from '../../utils/commons'; +import { Rotation } from '../../utils/common'; import { getChartIdSelector } from './get_chart_id'; import { getSettingsSpecSelector } from './get_settings_specs'; diff --git a/src/state/selectors/get_legend_items.ts b/src/state/selectors/get_legend_items.ts index e0882f183c..c0b6452050 100644 --- a/src/state/selectors/get_legend_items.ts +++ b/src/state/selectors/get_legend_items.ts @@ -17,7 +17,7 @@ * under the License. */ -import { LegendItem } from '../../commons/legend'; +import { LegendItem } from '../../common/legend'; import { GlobalChartState } from '../chart_state'; const EMPTY_LEGEND_LIST: LegendItem[] = []; diff --git a/src/state/selectors/get_legend_items_values.ts b/src/state/selectors/get_legend_items_values.ts index af872ad54b..a486e93c7c 100644 --- a/src/state/selectors/get_legend_items_values.ts +++ b/src/state/selectors/get_legend_items_values.ts @@ -17,8 +17,8 @@ * under the License. */ -import { LegendItemExtraValues } from '../../commons/legend'; -import { SeriesKey } from '../../commons/series_id'; +import { LegendItemExtraValues } from '../../common/legend'; +import { SeriesKey } from '../../common/series_id'; import { GlobalChartState } from '../chart_state'; const EMPTY_ITEM_LIST = new Map(); diff --git a/src/state/selectors/get_legend_size.ts b/src/state/selectors/get_legend_size.ts index 8bd0791abb..cf6b6bf4e3 100644 --- a/src/state/selectors/get_legend_size.ts +++ b/src/state/selectors/get_legend_size.ts @@ -23,7 +23,7 @@ import { isVerticalAxis } from '../../chart_types/xy_chart/utils/axis_type_utils import { LEGEND_HIERARCHY_MARGIN } from '../../components/legend/legend_item'; import { BBox } from '../../utils/bbox/bbox_calculator'; import { CanvasTextBBoxCalculator } from '../../utils/bbox/canvas_text_bbox_calculator'; -import { Position, isDefined } from '../../utils/commons'; +import { Position, isDefined } from '../../utils/common'; import { GlobalChartState } from '../chart_state'; import { getChartIdSelector } from './get_chart_id'; import { getChartThemeSelector } from './get_chart_theme'; diff --git a/src/state/types.ts b/src/state/types.ts index 2ee5b5d6a9..43b0a5b430 100644 --- a/src/state/types.ts +++ b/src/state/types.ts @@ -17,7 +17,7 @@ * under the License. */ -import { Position } from '../utils/commons'; +import { Position } from '../utils/common'; import { GeometryValue } from '../utils/geometry'; export interface DebugStateAxis { diff --git a/src/utils/__mocks__/commons.ts b/src/utils/__mocks__/common.ts similarity index 96% rename from src/utils/__mocks__/commons.ts rename to src/utils/__mocks__/common.ts index 9f75847475..f350df8a8d 100644 --- a/src/utils/__mocks__/commons.ts +++ b/src/utils/__mocks__/common.ts @@ -17,7 +17,7 @@ * under the License. */ -const module = jest.requireActual('../commons.ts'); +const module = jest.requireActual('../common.ts'); export const { ColorVariant, Position } = module; diff --git a/src/utils/accessor.ts b/src/utils/accessor.ts index 600097dd7e..17193ca471 100644 --- a/src/utils/accessor.ts +++ b/src/utils/accessor.ts @@ -17,7 +17,7 @@ * under the License. */ -import { Datum } from './commons'; +import { Datum } from './common'; /** * Accessor function diff --git a/src/utils/commons.test.ts b/src/utils/common.test.ts similarity index 99% rename from src/utils/commons.test.ts rename to src/utils/common.test.ts index 837fd890b7..d64db6c190 100644 --- a/src/utils/commons.test.ts +++ b/src/utils/common.test.ts @@ -33,9 +33,9 @@ import { isUniqueArray, isDefined, isDefinedFrom, -} from './commons'; +} from './common'; -describe('commons utilities', () => { +describe('common utilities', () => { test('return value bounded above', () => { expect(maxValueWithUpperLimit(0, 0, 1)).toBe(0); expect(maxValueWithUpperLimit(1, 0, 1)).toBe(1); diff --git a/src/utils/commons.ts b/src/utils/common.ts similarity index 100% rename from src/utils/commons.ts rename to src/utils/common.ts diff --git a/src/utils/domain.ts b/src/utils/domain.ts index f3f21277fb..b67c388d71 100644 --- a/src/utils/domain.ts +++ b/src/utils/domain.ts @@ -21,7 +21,7 @@ import { extent } from 'd3-array'; import { YDomainRange } from '../specs'; import { AccessorFn } from './accessor'; -import { getPercentageValue } from './commons'; +import { getPercentageValue } from './common'; export type Domain = any[]; diff --git a/src/utils/geometry.ts b/src/utils/geometry.ts index 2adbbda570..a1a93dd68c 100644 --- a/src/utils/geometry.ts +++ b/src/utils/geometry.ts @@ -20,7 +20,7 @@ import { $Values } from 'utility-types'; import { XYChartSeriesIdentifier } from '../chart_types/xy_chart/utils/series'; -import { Color } from './commons'; +import { Color } from './common'; import { Dimensions } from './dimensions'; import { BarSeriesStyle, PointStyle, AreaStyle, LineStyle, ArcStyle } from './themes/theme'; diff --git a/src/utils/legend.ts b/src/utils/legend.ts index 14d9cc4776..c503e09d79 100644 --- a/src/utils/legend.ts +++ b/src/utils/legend.ts @@ -17,7 +17,7 @@ * under the License. */ -import { Position } from './commons'; +import { Position } from './common'; export const isHorizontalLegend = (legendPosition: Position) => legendPosition === Position.Bottom || legendPosition === Position.Top; diff --git a/src/utils/themes/dark_theme.ts b/src/utils/themes/dark_theme.ts index d432a15dad..17a8115162 100644 --- a/src/utils/themes/dark_theme.ts +++ b/src/utils/themes/dark_theme.ts @@ -24,7 +24,7 @@ import { DEFAULT_CHART_PADDING, DEFAULT_GEOMETRY_STYLES, DEFAULT_MISSING_COLOR, -} from './theme_commons'; +} from './theme_common'; export const DARK_THEME: Theme = { chartPaddings: DEFAULT_CHART_PADDING, diff --git a/src/utils/themes/light_theme.ts b/src/utils/themes/light_theme.ts index c4322da631..6a5fbc9abd 100644 --- a/src/utils/themes/light_theme.ts +++ b/src/utils/themes/light_theme.ts @@ -24,7 +24,7 @@ import { DEFAULT_CHART_PADDING, DEFAULT_GEOMETRY_STYLES, DEFAULT_MISSING_COLOR, -} from './theme_commons'; +} from './theme_common'; export const LIGHT_THEME: Theme = { chartPaddings: DEFAULT_CHART_PADDING, diff --git a/src/utils/themes/theme.ts b/src/utils/themes/theme.ts index b4a88f4eed..6c8266452d 100644 --- a/src/utils/themes/theme.ts +++ b/src/utils/themes/theme.ts @@ -17,14 +17,7 @@ * under the License. */ -import { - mergePartial, - RecursivePartial, - Color, - ColorVariant, - HorizontalAlignment, - VerticalAlignment, -} from '../commons'; +import { mergePartial, RecursivePartial, Color, ColorVariant, HorizontalAlignment, VerticalAlignment } from '../common'; import { Margins, SimplePadding } from '../dimensions'; import { LIGHT_THEME } from './light_theme'; diff --git a/src/utils/themes/theme_commons.ts b/src/utils/themes/theme_common.ts similarity index 100% rename from src/utils/themes/theme_commons.ts rename to src/utils/themes/theme_common.ts diff --git a/stories/annotations/lines/1_x_continuous.tsx b/stories/annotations/lines/1_x_continuous.tsx index 1d94826f6e..100dd2a4b7 100644 --- a/stories/annotations/lines/1_x_continuous.tsx +++ b/stories/annotations/lines/1_x_continuous.tsx @@ -31,7 +31,7 @@ import { Settings, } from '../../../src'; import { Icon } from '../../../src/components/icons/icon'; -import { Position } from '../../../src/utils/commons'; +import { Position } from '../../../src/utils/common'; import { getChartRotationKnob, arrayKnobs } from '../../utils/knobs'; function generateAnnotationData(values: any[]): LineAnnotationDatum[] { diff --git a/stories/annotations/lines/2_x_ordinal.tsx b/stories/annotations/lines/2_x_ordinal.tsx index 6df7c21a8d..54be5ddbc4 100644 --- a/stories/annotations/lines/2_x_ordinal.tsx +++ b/stories/annotations/lines/2_x_ordinal.tsx @@ -31,7 +31,7 @@ import { Settings, } from '../../../src'; import { Icon } from '../../../src/components/icons/icon'; -import { Position } from '../../../src/utils/commons'; +import { Position } from '../../../src/utils/common'; import { getChartRotationKnob, arrayKnobs } from '../../utils/knobs'; function generateAnnotationData(values: any[]): LineAnnotationDatum[] { diff --git a/stories/annotations/lines/3_x_time.tsx b/stories/annotations/lines/3_x_time.tsx index feec28b8db..b102f15fd2 100644 --- a/stories/annotations/lines/3_x_time.tsx +++ b/stories/annotations/lines/3_x_time.tsx @@ -32,7 +32,7 @@ import { timeFormatter, } from '../../../src'; import { Icon } from '../../../src/components/icons/icon'; -import { Position } from '../../../src/utils/commons'; +import { Position } from '../../../src/utils/common'; import { KIBANA_METRICS } from '../../../src/utils/data_samples/test_dataset_kibana'; import { getChartRotationKnob } from '../../utils/knobs'; diff --git a/stories/annotations/lines/4_y_domain.tsx b/stories/annotations/lines/4_y_domain.tsx index 2d05193c28..230342b1b1 100644 --- a/stories/annotations/lines/4_y_domain.tsx +++ b/stories/annotations/lines/4_y_domain.tsx @@ -31,7 +31,7 @@ import { Settings, } from '../../../src'; import { Icon } from '../../../src/components/icons/icon'; -import { Position } from '../../../src/utils/commons'; +import { Position } from '../../../src/utils/common'; import { getChartRotationKnob, arrayKnobs } from '../../utils/knobs'; function generateAnnotationData(values: any[]): LineAnnotationDatum[] { diff --git a/stories/annotations/lines/5_styling.tsx b/stories/annotations/lines/5_styling.tsx index 88a4c26cba..e0413ac507 100644 --- a/stories/annotations/lines/5_styling.tsx +++ b/stories/annotations/lines/5_styling.tsx @@ -32,7 +32,7 @@ import { LineAnnotationStyle, } from '../../../src'; import { Icon } from '../../../src/components/icons/icon'; -import { Position } from '../../../src/utils/commons'; +import { Position } from '../../../src/utils/common'; import { getChartRotationKnob } from '../../utils/knobs'; function generateAnnotationData(values: any[]): LineAnnotationDatum[] { diff --git a/stories/annotations/lines/6_test_single_bar_histogram.tsx b/stories/annotations/lines/6_test_single_bar_histogram.tsx index 2f3172ad75..491694dd34 100644 --- a/stories/annotations/lines/6_test_single_bar_histogram.tsx +++ b/stories/annotations/lines/6_test_single_bar_histogram.tsx @@ -21,7 +21,7 @@ import { boolean } from '@storybook/addon-knobs'; import React from 'react'; import { AnnotationDomainTypes, Axis, BarSeries, Chart, LineAnnotation, ScaleType, Settings } from '../../../src'; -import { Position } from '../../../src/utils/commons'; +import { Position } from '../../../src/utils/common'; import { getChartRotationKnob } from '../../utils/knobs'; export const Example = () => { diff --git a/stories/annotations/lines/7_tooltip_options.tsx b/stories/annotations/lines/7_tooltip_options.tsx index c45a240ec6..99da8e8877 100644 --- a/stories/annotations/lines/7_tooltip_options.tsx +++ b/stories/annotations/lines/7_tooltip_options.tsx @@ -33,7 +33,7 @@ import { } from '../../../src'; import { CustomAnnotationTooltip } from '../../../src/chart_types/xy_chart/annotations/types'; import { Icon } from '../../../src/components/icons/icon'; -import { Position } from '../../../src/utils/commons'; +import { Position } from '../../../src/utils/common'; import { arrayKnobs, getBoundaryKnob, diff --git a/stories/annotations/rects/1_linear_bar_chart.tsx b/stories/annotations/rects/1_linear_bar_chart.tsx index fee00824de..1838e97fe6 100644 --- a/stories/annotations/rects/1_linear_bar_chart.tsx +++ b/stories/annotations/rects/1_linear_bar_chart.tsx @@ -21,7 +21,7 @@ import { boolean, select } from '@storybook/addon-knobs'; import React from 'react'; import { Axis, BarSeries, Chart, RectAnnotation, ScaleType, Settings } from '../../../src'; -import { Position } from '../../../src/utils/commons'; +import { Position } from '../../../src/utils/common'; import { getChartRotationKnob } from '../../utils/knobs'; export const Example = () => { diff --git a/stories/annotations/rects/2_ordinal_bar_chart.tsx b/stories/annotations/rects/2_ordinal_bar_chart.tsx index a2329a6412..4497cb9466 100644 --- a/stories/annotations/rects/2_ordinal_bar_chart.tsx +++ b/stories/annotations/rects/2_ordinal_bar_chart.tsx @@ -21,7 +21,7 @@ import { boolean } from '@storybook/addon-knobs'; import React from 'react'; import { Axis, BarSeries, Chart, RectAnnotation, ScaleType, Settings } from '../../../src'; -import { Position } from '../../../src/utils/commons'; +import { Position } from '../../../src/utils/common'; import { getChartRotationKnob } from '../../utils/knobs'; export const Example = () => { diff --git a/stories/annotations/rects/3_linear_line_chart.tsx b/stories/annotations/rects/3_linear_line_chart.tsx index d5049c85d8..4e0ffdc41c 100644 --- a/stories/annotations/rects/3_linear_line_chart.tsx +++ b/stories/annotations/rects/3_linear_line_chart.tsx @@ -21,7 +21,7 @@ import { boolean, select } from '@storybook/addon-knobs'; import React from 'react'; import { Axis, Chart, LineSeries, RectAnnotation, ScaleType, Settings, RectAnnotationDatum } from '../../../src'; -import { Position } from '../../../src/utils/commons'; +import { Position } from '../../../src/utils/common'; import { BandedAccessorType } from '../../../src/utils/geometry'; import { getChartRotationKnob } from '../../utils/knobs'; diff --git a/stories/annotations/rects/4_styling.tsx b/stories/annotations/rects/4_styling.tsx index a30ac72b30..38422f689c 100644 --- a/stories/annotations/rects/4_styling.tsx +++ b/stories/annotations/rects/4_styling.tsx @@ -22,7 +22,7 @@ import React from 'react'; import { Axis, Chart, LineSeries, RectAnnotation, ScaleType, Settings } from '../../../src'; import { Icon } from '../../../src/components/icons/icon'; -import { Position } from '../../../src/utils/commons'; +import { Position } from '../../../src/utils/common'; import { getChartRotationKnob } from '../../utils/knobs'; export const Example = () => { diff --git a/stories/annotations/rects/5_tooltip_options.tsx b/stories/annotations/rects/5_tooltip_options.tsx index 517f40d33d..ccaf04ce12 100644 --- a/stories/annotations/rects/5_tooltip_options.tsx +++ b/stories/annotations/rects/5_tooltip_options.tsx @@ -22,7 +22,7 @@ import React from 'react'; import { AnnotationTooltipFormatter, Axis, BarSeries, Chart, ScaleType, RectAnnotation, Settings } from '../../../src'; import { CustomAnnotationTooltip } from '../../../src/chart_types/xy_chart/annotations/types'; -import { Position } from '../../../src/utils/commons'; +import { Position } from '../../../src/utils/common'; import { getBoundaryKnob, getChartRotationKnob, getFallbackPlacementsKnob, getPlacementKnob } from '../../utils/knobs'; export const Example = () => { diff --git a/stories/annotations/rects/6_zero_domain.tsx b/stories/annotations/rects/6_zero_domain.tsx index c382abf13c..ae9fc13562 100644 --- a/stories/annotations/rects/6_zero_domain.tsx +++ b/stories/annotations/rects/6_zero_domain.tsx @@ -20,7 +20,7 @@ import { boolean, number } from '@storybook/addon-knobs'; import React from 'react'; import { Axis, BarSeries, Chart, RectAnnotation, ScaleType, Settings } from '../../../src'; -import { Position } from '../../../src/utils/commons'; +import { Position } from '../../../src/utils/common'; const getKnobs = () => { const minY = number('min y', 0); diff --git a/stories/annotations/rects/7_with_group_id.tsx b/stories/annotations/rects/7_with_group_id.tsx index 640739e3c6..c9c30b731d 100644 --- a/stories/annotations/rects/7_with_group_id.tsx +++ b/stories/annotations/rects/7_with_group_id.tsx @@ -20,7 +20,7 @@ import { select, boolean, number } from '@storybook/addon-knobs'; import React from 'react'; import { Axis, BarSeries, Chart, RectAnnotation, ScaleType, Settings } from '../../../src'; -import { Position } from '../../../src/utils/commons'; +import { Position } from '../../../src/utils/common'; const getKnobs = () => { const enabled = boolean('enable annotation', true); diff --git a/stories/goal/10_band_in_band.tsx b/stories/goal/10_band_in_band.tsx index ed2ee054dd..a53e2b99bc 100644 --- a/stories/goal/10_band_in_band.tsx +++ b/stories/goal/10_band_in_band.tsx @@ -23,7 +23,7 @@ import { Chart, Goal } from '../../src'; import { config } from '../../src/chart_types/goal_chart/layout/config/config'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const subtype = GoalSubtype.Goal; diff --git a/stories/goal/11_gaps.tsx b/stories/goal/11_gaps.tsx index 353f0494cd..c480a882a5 100644 --- a/stories/goal/11_gaps.tsx +++ b/stories/goal/11_gaps.tsx @@ -23,7 +23,7 @@ import { Chart, Goal } from '../../src'; import { config } from '../../src/chart_types/goal_chart/layout/config/config'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const subtype = GoalSubtype.Goal; diff --git a/stories/goal/12_range.tsx b/stories/goal/12_range.tsx index 7059c6ca83..2d4dd5cd76 100644 --- a/stories/goal/12_range.tsx +++ b/stories/goal/12_range.tsx @@ -23,7 +23,7 @@ import { Chart, Goal } from '../../src'; import { config } from '../../src/chart_types/goal_chart/layout/config/config'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const subtype = GoalSubtype.Goal; diff --git a/stories/goal/13_confidence_level.tsx b/stories/goal/13_confidence_level.tsx index d694d39573..5276a81f38 100644 --- a/stories/goal/13_confidence_level.tsx +++ b/stories/goal/13_confidence_level.tsx @@ -23,7 +23,7 @@ import { Chart, Goal } from '../../src'; import { config } from '../../src/chart_types/goal_chart/layout/config/config'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const subtype = GoalSubtype.Goal; diff --git a/stories/goal/14_one_third.tsx b/stories/goal/14_one_third.tsx index c5ad7dec82..3e95b9ba60 100644 --- a/stories/goal/14_one_third.tsx +++ b/stories/goal/14_one_third.tsx @@ -22,7 +22,7 @@ import React from 'react'; import { Chart, Goal } from '../../src'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const subtype = GoalSubtype.Goal; diff --git a/stories/goal/15_half_circle.tsx b/stories/goal/15_half_circle.tsx index c6d1cbdd0d..35fb2f8332 100644 --- a/stories/goal/15_half_circle.tsx +++ b/stories/goal/15_half_circle.tsx @@ -22,7 +22,7 @@ import React from 'react'; import { Chart, Goal } from '../../src'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const subtype = GoalSubtype.Goal; diff --git a/stories/goal/16_two_thirds.tsx b/stories/goal/16_two_thirds.tsx index 30b7423cd2..9014280396 100644 --- a/stories/goal/16_two_thirds.tsx +++ b/stories/goal/16_two_thirds.tsx @@ -22,7 +22,7 @@ import React from 'react'; import { Chart, Goal } from '../../src'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const subtype = GoalSubtype.Goal; diff --git a/stories/goal/17_three_quarters.tsx b/stories/goal/17_three_quarters.tsx index b91c03e741..19ca49fcc3 100644 --- a/stories/goal/17_three_quarters.tsx +++ b/stories/goal/17_three_quarters.tsx @@ -22,7 +22,7 @@ import React from 'react'; import { Chart, Goal } from '../../src'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const subtype = GoalSubtype.Goal; diff --git a/stories/goal/17_total_circle.tsx b/stories/goal/17_total_circle.tsx index 59436bed8e..3ed899a608 100644 --- a/stories/goal/17_total_circle.tsx +++ b/stories/goal/17_total_circle.tsx @@ -22,7 +22,7 @@ import React from 'react'; import { Chart, Goal } from '../../src'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const subtype = GoalSubtype.Goal; diff --git a/stories/goal/17_very_small_gap.tsx b/stories/goal/17_very_small_gap.tsx index 8e782e44ed..39d8cd01df 100644 --- a/stories/goal/17_very_small_gap.tsx +++ b/stories/goal/17_very_small_gap.tsx @@ -22,7 +22,7 @@ import React from 'react'; import { Chart, Goal } from '../../src'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const subtype = GoalSubtype.Goal; diff --git a/stories/goal/18_side_gauge.tsx b/stories/goal/18_side_gauge.tsx index b3ee0272d8..713799659f 100644 --- a/stories/goal/18_side_gauge.tsx +++ b/stories/goal/18_side_gauge.tsx @@ -22,7 +22,7 @@ import React from 'react'; import { Chart, Goal } from '../../src'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const subtype = GoalSubtype.Goal; diff --git a/stories/goal/19_horizontal_negative.tsx b/stories/goal/19_horizontal_negative.tsx index a570f34ef1..2ae036143d 100644 --- a/stories/goal/19_horizontal_negative.tsx +++ b/stories/goal/19_horizontal_negative.tsx @@ -23,7 +23,7 @@ import { Chart, Goal } from '../../src'; import { config } from '../../src/chart_types/goal_chart/layout/config/config'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const q1 = 255 - 255 * 0.4; const q2 = 255 - 255 * 0.25; diff --git a/stories/goal/20_vertical_negative.tsx b/stories/goal/20_vertical_negative.tsx index d7e7cabb13..3038925f90 100644 --- a/stories/goal/20_vertical_negative.tsx +++ b/stories/goal/20_vertical_negative.tsx @@ -23,7 +23,7 @@ import { Chart, Goal } from '../../src'; import { config } from '../../src/chart_types/goal_chart/layout/config/config'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const q1 = 255 - 255 * 0.4; const q2 = 255 - 255 * 0.25; diff --git a/stories/goal/21_goal_negative.tsx b/stories/goal/21_goal_negative.tsx index 3dfd6d7cb7..97348a8366 100644 --- a/stories/goal/21_goal_negative.tsx +++ b/stories/goal/21_goal_negative.tsx @@ -23,7 +23,7 @@ import { Chart, Goal } from '../../src'; import { config } from '../../src/chart_types/goal_chart/layout/config/config'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const q1 = 255 - 255 * 0.4; const q2 = 255 - 255 * 0.25; diff --git a/stories/goal/22_horizontal_plusminus.tsx b/stories/goal/22_horizontal_plusminus.tsx index 214b0340d0..4d3bf82929 100644 --- a/stories/goal/22_horizontal_plusminus.tsx +++ b/stories/goal/22_horizontal_plusminus.tsx @@ -23,7 +23,7 @@ import { Chart, Goal } from '../../src'; import { config } from '../../src/chart_types/goal_chart/layout/config/config'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const q1 = 255 - 255 * 0.4; const q2 = 255 - 255 * 0.25; diff --git a/stories/goal/23_vertical_plusminus.tsx b/stories/goal/23_vertical_plusminus.tsx index 3c83096ce9..5cd1f0f5ec 100644 --- a/stories/goal/23_vertical_plusminus.tsx +++ b/stories/goal/23_vertical_plusminus.tsx @@ -23,7 +23,7 @@ import { Chart, Goal } from '../../src'; import { config } from '../../src/chart_types/goal_chart/layout/config/config'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const q1 = 255 - 255 * 0.4; const q2 = 255 - 255 * 0.25; diff --git a/stories/goal/24_goal_plusminus.tsx b/stories/goal/24_goal_plusminus.tsx index 7eedf077c1..ad2245110e 100644 --- a/stories/goal/24_goal_plusminus.tsx +++ b/stories/goal/24_goal_plusminus.tsx @@ -23,7 +23,7 @@ import { Chart, Goal } from '../../src'; import { config } from '../../src/chart_types/goal_chart/layout/config/config'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const q1 = 255 - 255 * 0.4; const q2 = 255 - 255 * 0.25; diff --git a/stories/goal/2_gauge_with_target.tsx b/stories/goal/2_gauge_with_target.tsx index 679f5106ce..891490ef5a 100644 --- a/stories/goal/2_gauge_with_target.tsx +++ b/stories/goal/2_gauge_with_target.tsx @@ -23,7 +23,7 @@ import React from 'react'; import { Chart, Goal } from '../../src'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const subtype = GoalSubtype.Goal; diff --git a/stories/goal/3_horizontal_bullet.tsx b/stories/goal/3_horizontal_bullet.tsx index e0f398c532..76df8a4c57 100644 --- a/stories/goal/3_horizontal_bullet.tsx +++ b/stories/goal/3_horizontal_bullet.tsx @@ -23,7 +23,7 @@ import { Chart, Goal } from '../../src'; import { config } from '../../src/chart_types/goal_chart/layout/config/config'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const q1 = 255 - 255 * 0.4; const q2 = 255 - 255 * 0.25; diff --git a/stories/goal/4_vertical_bullet.tsx b/stories/goal/4_vertical_bullet.tsx index f2238d00f3..3ccf150e70 100644 --- a/stories/goal/4_vertical_bullet.tsx +++ b/stories/goal/4_vertical_bullet.tsx @@ -23,7 +23,7 @@ import { Chart, Goal } from '../../src'; import { config } from '../../src/chart_types/goal_chart/layout/config/config'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const q1 = 255 - 255 * 0.4; const q2 = 255 - 255 * 0.25; diff --git a/stories/goal/5_minimal.tsx b/stories/goal/5_minimal.tsx index e721199cfd..e63f1061f6 100644 --- a/stories/goal/5_minimal.tsx +++ b/stories/goal/5_minimal.tsx @@ -23,7 +23,7 @@ import { Chart, Goal } from '../../src'; import { config } from '../../src/chart_types/goal_chart/layout/config/config'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const q1 = 255 - 255 * 0.4; const q2 = 255 - 255 * 0.25; diff --git a/stories/goal/6_minimal_horizontal.tsx b/stories/goal/6_minimal_horizontal.tsx index 6fe1e74238..706d2d940a 100644 --- a/stories/goal/6_minimal_horizontal.tsx +++ b/stories/goal/6_minimal_horizontal.tsx @@ -23,7 +23,7 @@ import { Chart, Goal } from '../../src'; import { config } from '../../src/chart_types/goal_chart/layout/config/config'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const q1 = 255 - 255 * 0.4; const q2 = 255 - 255 * 0.25; diff --git a/stories/goal/7_horizontal_bar.tsx b/stories/goal/7_horizontal_bar.tsx index d6ed6ee606..68781ecb25 100644 --- a/stories/goal/7_horizontal_bar.tsx +++ b/stories/goal/7_horizontal_bar.tsx @@ -23,7 +23,7 @@ import { Chart, Goal } from '../../src'; import { config } from '../../src/chart_types/goal_chart/layout/config/config'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const q1 = 255 - 255 * 0.4; const q2 = 255 - 255 * 0.25; diff --git a/stories/goal/8_irregular_ticks.tsx b/stories/goal/8_irregular_ticks.tsx index b295b45359..dce9be8758 100644 --- a/stories/goal/8_irregular_ticks.tsx +++ b/stories/goal/8_irregular_ticks.tsx @@ -23,7 +23,7 @@ import { Chart, Goal } from '../../src'; import { config } from '../../src/chart_types/goal_chart/layout/config/config'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const subtype = GoalSubtype.Goal; diff --git a/stories/goal/9_minimal_band.tsx b/stories/goal/9_minimal_band.tsx index 1f64f82686..5c8058b94a 100644 --- a/stories/goal/9_minimal_band.tsx +++ b/stories/goal/9_minimal_band.tsx @@ -23,7 +23,7 @@ import { Chart, Goal } from '../../src'; import { config } from '../../src/chart_types/goal_chart/layout/config/config'; import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/specs'; import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; const subtype = GoalSubtype.Goal; diff --git a/stories/interactions/17_png_export.tsx b/stories/interactions/17_png_export.tsx index 2ce7b17c92..ffc5cdd1da 100644 --- a/stories/interactions/17_png_export.tsx +++ b/stories/interactions/17_png_export.tsx @@ -37,7 +37,7 @@ import { BandFillColorAccessorInput } from '../../src/chart_types/goal_chart/spe import { GoalSubtype } from '../../src/chart_types/goal_chart/specs/constants'; import { config } from '../../src/chart_types/partition_chart/layout/config/config'; import { mocks } from '../../src/mocks/hierarchical'; -import { Color } from '../../src/utils/commons'; +import { Color } from '../../src/utils/common'; import { KIBANA_METRICS } from '../../src/utils/data_samples/test_dataset_kibana'; import { SB_KNOBS_PANEL } from '../utils/storybook'; import { productLookup, indexInterpolatedFillColor, interpolatorCET2s } from '../utils/utils'; diff --git a/stories/legend/9_color_picker.tsx b/stories/legend/9_color_picker.tsx index 0a89aee547..7c1ef11708 100644 --- a/stories/legend/9_color_picker.tsx +++ b/stories/legend/9_color_picker.tsx @@ -22,8 +22,8 @@ import { action } from '@storybook/addon-actions'; import React, { useState, useMemo } from 'react'; import { Axis, BarSeries, Chart, Position, ScaleType, Settings, LegendColorPicker } from '../../src'; -import { SeriesKey } from '../../src/commons/series_id'; -import { Color } from '../../src/utils/commons'; +import { SeriesKey } from '../../src/common/series_id'; +import { Color } from '../../src/utils/common'; import { BARCHART_1Y1G } from '../../src/utils/data_samples/test_dataset'; const onChangeAction = action('onChange'); diff --git a/stories/stylings/17_bar_series_color_variant.tsx b/stories/stylings/17_bar_series_color_variant.tsx index c1099b3303..0b21836c06 100644 --- a/stories/stylings/17_bar_series_color_variant.tsx +++ b/stories/stylings/17_bar_series_color_variant.tsx @@ -21,7 +21,7 @@ import { select, color } from '@storybook/addon-knobs'; import React from 'react'; import { Axis, BarSeries, Chart, Position, ScaleType, Settings, PartialTheme } from '../../src'; -import { ColorVariant } from '../../src/utils/commons'; +import { ColorVariant } from '../../src/utils/common'; import * as TestDatasets from '../../src/utils/data_samples/test_dataset'; import { SB_SOURCE_PANEL } from '../utils/storybook'; diff --git a/stories/stylings/18_line_series_color_variant.tsx b/stories/stylings/18_line_series_color_variant.tsx index 3a029d457f..cf068c2075 100644 --- a/stories/stylings/18_line_series_color_variant.tsx +++ b/stories/stylings/18_line_series_color_variant.tsx @@ -20,7 +20,7 @@ import React from 'react'; import { Axis, LineSeries, Chart, Position, ScaleType, Settings, PartialTheme } from '../../src'; -import { ColorVariant } from '../../src/utils/commons'; +import { ColorVariant } from '../../src/utils/common'; import * as TestDatasets from '../../src/utils/data_samples/test_dataset'; import { SB_SOURCE_PANEL } from '../utils/storybook'; diff --git a/stories/stylings/19_area_series_color_variant.tsx b/stories/stylings/19_area_series_color_variant.tsx index 26bd7b146f..065ad92e43 100644 --- a/stories/stylings/19_area_series_color_variant.tsx +++ b/stories/stylings/19_area_series_color_variant.tsx @@ -20,7 +20,7 @@ import React from 'react'; import { Axis, AreaSeries, Chart, Position, ScaleType, Settings, PartialTheme } from '../../src'; -import { ColorVariant } from '../../src/utils/commons'; +import { ColorVariant } from '../../src/utils/common'; import * as TestDatasets from '../../src/utils/data_samples/test_dataset'; import { SB_SOURCE_PANEL } from '../utils/storybook'; diff --git a/stories/utils/knobs.ts b/stories/utils/knobs.ts index 8146cf2dee..a9ff4ceb1b 100644 --- a/stories/utils/knobs.ts +++ b/stories/utils/knobs.ts @@ -22,7 +22,7 @@ import { select, array, number, optionsKnob } from '@storybook/addon-knobs'; import { Rotation, Position, Placement, TooltipProps } from '../../src'; import { TooltipType } from '../../src/specs/constants'; -import { VerticalAlignment, HorizontalAlignment } from '../../src/utils/commons'; +import { VerticalAlignment, HorizontalAlignment } from '../../src/utils/common'; export const getPositiveNumberKnob = (name: string, value: number, groupId?: string) => number(name, value, { min: 0 }, groupId); diff --git a/wiki/overview.md b/wiki/overview.md index d6f6dbbbe2..4bd9304a1d 100644 --- a/wiki/overview.md +++ b/wiki/overview.md @@ -205,9 +205,9 @@ On the current `Visualize Editor`, you can stack or cluster in the following cas ### Multiple charts/Split charts/Small Multiples (phase 2) -Small multiples are created using the `` component, that takes multiple `` component with the usual element inside. `` can contain only `BarSeries` `AreaSeries` and `LineSeries` Axis and other configuration need to be configured outside the `SplittedSeries` element. +Small multiples are created using the `` component, that takes multiple `` component with the usual element inside. `` can contain only `BarSeries` `AreaSeries` and `LineSeries` Axis and other configuration need to be configured outside the `splitSeries` element. -In the case of small multiples, each `SplittedSeries` computes its own x and y domains. Then the x domains are merged and expanded. The same happens with the main Y domains; they are merged together. +In the case of small multiples, each `splitSeries` computes its own x and y domains. Then the x domains are merged and expanded. The same happens with the main Y domains; they are merged together. ### Color/Style overrides