From ac50d48c0581423c32583f8d2fc63fecc99a5835 Mon Sep 17 00:00:00 2001 From: Stratoula Kalafateli Date: Wed, 1 Jul 2020 16:57:58 +0300 Subject: [PATCH] Upgrade lodash 4 vislib (#11) * replace lodash 3 with lodash 4 on vislib plugin * Further changes * further replacement of lodash3 to 4 * further work on upgrading to lodash 4 * final changes to update lodash --- .../public/components/options/metrics_axes/index.tsx | 2 +- .../public/components/options/metrics_axes/utils.ts | 4 ++-- .../public/fixtures/mock_data/filters/_columns.js | 2 +- .../public/fixtures/mock_data/filters/_rows.js | 2 +- .../public/fixtures/mock_data/filters/_series.js | 2 +- .../public/fixtures/mock_data/geohash/_columns.js | 2 +- .../public/fixtures/mock_data/geohash/_geo_json.js | 2 +- .../public/fixtures/mock_data/geohash/_rows.js | 2 +- .../public/fixtures/mock_data/histogram/_columns.js | 2 +- .../public/fixtures/mock_data/histogram/_rows.js | 2 +- .../public/fixtures/mock_data/histogram/_series.js | 2 +- .../public/fixtures/mock_data/histogram/_slices.js | 2 +- .../fixtures/mock_data/not_enough_data/_one_point.js | 2 +- .../public/fixtures/mock_data/range/_columns.js | 2 +- .../public/fixtures/mock_data/range/_rows.js | 2 +- .../public/fixtures/mock_data/range/_series.js | 2 +- .../fixtures/mock_data/significant_terms/_columns.js | 2 +- .../fixtures/mock_data/significant_terms/_rows.js | 2 +- .../fixtures/mock_data/significant_terms/_series.js | 2 +- .../public/fixtures/mock_data/terms/_columns.js | 2 +- .../public/fixtures/mock_data/terms/_rows.js | 2 +- .../public/fixtures/mock_data/terms/_series.js | 2 +- .../fixtures/mock_data/terms/_series_multiple.js | 2 +- .../public/vislib/components/labels/data_array.js | 2 +- .../public/vislib/components/labels/flatten_series.js | 4 ++-- .../public/vislib/components/labels/labels.js | 2 +- .../public/vislib/components/labels/labels.test.js | 6 +++--- .../public/vislib/components/labels/uniq_labels.js | 4 ++-- .../public/vislib/components/legend/legend.tsx | 4 ++-- .../public/vislib/components/legend/pie_utils.ts | 6 +++--- .../tooltip/_hierarchical_tooltip_formatter.js | 2 +- .../tooltip/_pointseries_tooltip_formatter.test.js | 2 +- .../vislib/components/tooltip/position_tooltip.js | 6 +++--- .../vislib/components/tooltip/position_tooltip.test.js | 2 +- .../public/vislib/components/tooltip/tooltip.js | 4 ++-- .../vislib/components/zero_injection/flatten_data.js | 6 +++--- .../vislib/components/zero_injection/ordered_x_keys.js | 2 +- .../vislib/components/zero_injection/uniq_keys.js | 2 +- .../components/zero_injection/zero_fill_data_array.js | 2 +- .../components/zero_injection/zero_injection.test.js | 2 +- .../helpers/hierarchical/build_hierarchical_data.ts | 2 +- .../public/vislib/helpers/point_series/_get_series.ts | 4 ++-- .../public/vislib/helpers/point_series/_init_x_axis.ts | 2 +- .../vislib/helpers/point_series/_init_y_axis.test.ts | 2 +- .../helpers/point_series/_ordered_date_axis.test.ts | 2 +- .../vislib/helpers/point_series/point_series.test.ts | 2 +- .../public/vislib/lib/_error_handler.js | 2 +- .../vis_type_vislib/public/vislib/lib/alerts.js | 2 +- .../vis_type_vislib/public/vislib/lib/axis/axis.js | 2 +- .../public/vislib/lib/axis/axis.test.js | 2 +- .../public/vislib/lib/axis/axis_config.js | 2 +- .../public/vislib/lib/axis/axis_scale.js | 2 +- .../public/vislib/lib/axis/axis_title.test.js | 2 +- .../public/vislib/lib/axis/x_axis.test.js | 2 +- .../public/vislib/lib/axis/y_axis.test.js | 2 +- .../vis_type_vislib/public/vislib/lib/chart_grid.js | 2 +- .../vis_type_vislib/public/vislib/lib/chart_title.js | 2 +- src/plugins/vis_type_vislib/public/vislib/lib/data.js | 10 +++++----- .../vis_type_vislib/public/vislib/lib/data.test.js | 2 +- .../vis_type_vislib/public/vislib/lib/dispatch.js | 4 ++-- .../vis_type_vislib/public/vislib/lib/handler.js | 2 +- .../vis_type_vislib/public/vislib/lib/layout/layout.js | 2 +- .../public/vislib/lib/layout/layout_types.test.js | 2 +- .../vislib/lib/layout/types/column_layout.test.js | 2 +- .../vis_type_vislib/public/vislib/lib/types/pie.js | 2 +- .../public/vislib/lib/types/point_series.js | 2 +- .../vis_type_vislib/public/vislib/lib/vis_config.js | 2 +- src/plugins/vis_type_vislib/public/vislib/vis.js | 2 +- .../public/vislib/visualizations/_chart.js | 2 +- .../public/vislib/visualizations/gauges/meter.js | 2 +- .../public/vislib/visualizations/pie_chart.js | 2 +- .../public/vislib/visualizations/point_series.js | 2 +- .../visualizations/point_series/_point_series.js | 2 +- .../vislib/visualizations/point_series/area_chart.js | 2 +- .../vislib/visualizations/point_series/column_chart.js | 2 +- .../visualizations/point_series/heatmap_chart.js | 2 +- .../vislib/visualizations/point_series/line_chart.js | 2 +- .../public/vislib/visualizations/vis_types.test.js | 2 +- 78 files changed, 97 insertions(+), 97 deletions(-) diff --git a/src/plugins/vis_type_vislib/public/components/options/metrics_axes/index.tsx b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/index.tsx index 411b93033a81b..d885f8fb0b12f 100644 --- a/src/plugins/vis_type_vislib/public/components/options/metrics_axes/index.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/index.tsx @@ -18,7 +18,7 @@ */ import React, { useState, useEffect, useCallback, useMemo } from 'react'; -import { cloneDeep, uniq, get } from 'lodash3'; +import { cloneDeep, uniq, get } from 'lodash'; import { EuiSpacer } from '@elastic/eui'; import { IAggConfig } from 'src/plugins/data/public'; diff --git a/src/plugins/vis_type_vislib/public/components/options/metrics_axes/utils.ts b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/utils.ts index 972d5f6fe2c65..708e8cf15f029 100644 --- a/src/plugins/vis_type_vislib/public/components/options/metrics_axes/utils.ts +++ b/src/plugins/vis_type_vislib/public/components/options/metrics_axes/utils.ts @@ -17,7 +17,7 @@ * under the License. */ -import { capitalize } from 'lodash3'; +import { upperFirst } from 'lodash'; import { BasicVislibParams, ValueAxis, SeriesParam } from '../../../types'; import { ChartModes, ChartTypes, InterpolationModes, Positions } from '../../../utils/collections'; @@ -67,7 +67,7 @@ const getUpdatedAxisName = ( axisPosition: ValueAxis['position'], valueAxes: BasicVislibParams['valueAxes'] ) => { - const axisName = capitalize(axisPosition) + AXIS_PREFIX; + const axisName = upperFirst(axisPosition) + AXIS_PREFIX; const nextAxisNameNumber = valueAxes.reduce(countNextAxisNumber(axisName, 'name'), 1); return `${axisName}${nextAxisNameNumber}`; diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/filters/_columns.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/filters/_columns.js index a07b2915f9abb..cc131a0a5bc12 100644 --- a/src/plugins/vis_type_vislib/public/fixtures/mock_data/filters/_columns.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/filters/_columns.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export default { columns: [ diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/filters/_rows.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/filters/_rows.js index 6dffcebd85ba2..04fd9f19d742a 100644 --- a/src/plugins/vis_type_vislib/public/fixtures/mock_data/filters/_rows.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/filters/_rows.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export default { rows: [ diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/filters/_series.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/filters/_series.js index 83d45d103a63c..e016011ae5392 100644 --- a/src/plugins/vis_type_vislib/public/fixtures/mock_data/filters/_series.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/filters/_series.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export default { label: '', diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/geohash/_columns.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/geohash/_columns.js index b428c50749b43..c1044160c0e7a 100644 --- a/src/plugins/vis_type_vislib/public/fixtures/mock_data/geohash/_columns.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/geohash/_columns.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export default { columns: [ diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/geohash/_geo_json.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/geohash/_geo_json.js index 5ec4b903e0bf5..a26dc9bd8b181 100644 --- a/src/plugins/vis_type_vislib/public/fixtures/mock_data/geohash/_geo_json.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/geohash/_geo_json.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export default { valueFormatter: _.identity, diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/geohash/_rows.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/geohash/_rows.js index 7320c0df00c90..ca4cb2a7feee1 100644 --- a/src/plugins/vis_type_vislib/public/fixtures/mock_data/geohash/_rows.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/geohash/_rows.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export default { rows: [ diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_columns.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_columns.js index 14c6d1bc9a464..7506784099d12 100644 --- a/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_columns.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_columns.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export default { columns: [ diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_rows.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_rows.js index 273a06764ae18..1482118587dc7 100644 --- a/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_rows.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_rows.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export default { rows: [ diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_series.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_series.js index 9b2318db2ddfa..c7f4b473ef7cb 100644 --- a/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_series.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_series.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export default { label: '', diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_slices.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_slices.js index 1614f950e6414..6993016f84d02 100644 --- a/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_slices.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/histogram/_slices.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export default { label: '', diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/not_enough_data/_one_point.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/not_enough_data/_one_point.js index d3c2a32c6fc09..c8aefa5a62ba5 100644 --- a/src/plugins/vis_type_vislib/public/fixtures/mock_data/not_enough_data/_one_point.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/not_enough_data/_one_point.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export default { label: '', diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/range/_columns.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/range/_columns.js index d35aae084dcac..2deddb513e610 100644 --- a/src/plugins/vis_type_vislib/public/fixtures/mock_data/range/_columns.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/range/_columns.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export default { columns: [ diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/range/_rows.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/range/_rows.js index eda74650facbe..fea0e822f19c8 100644 --- a/src/plugins/vis_type_vislib/public/fixtures/mock_data/range/_rows.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/range/_rows.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export default { rows: [ diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/range/_series.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/range/_series.js index 563c291b2f954..1a19c8c108323 100644 --- a/src/plugins/vis_type_vislib/public/fixtures/mock_data/range/_series.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/range/_series.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export default { label: '', diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/significant_terms/_columns.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/significant_terms/_columns.js index 4635b24e09cd2..37d4d90be6c83 100644 --- a/src/plugins/vis_type_vislib/public/fixtures/mock_data/significant_terms/_columns.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/significant_terms/_columns.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export default { columns: [ diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/significant_terms/_rows.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/significant_terms/_rows.js index 61368ca4edbab..63ef1df5d259e 100644 --- a/src/plugins/vis_type_vislib/public/fixtures/mock_data/significant_terms/_rows.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/significant_terms/_rows.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export default { rows: [ diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/significant_terms/_series.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/significant_terms/_series.js index a5b2082f78771..94caddafc3185 100644 --- a/src/plugins/vis_type_vislib/public/fixtures/mock_data/significant_terms/_series.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/significant_terms/_series.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export default { label: '', diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_columns.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_columns.js index eeb9127752359..a2720ee1321ba 100644 --- a/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_columns.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_columns.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export default { columns: [ diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_rows.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_rows.js index 9bc6b398bb0eb..501418d6f5bdf 100644 --- a/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_rows.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_rows.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export default { rows: [ diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_series.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_series.js index 871fbfd202694..21885f87e4912 100644 --- a/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_series.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_series.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export default { label: '', diff --git a/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_series_multiple.js b/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_series_multiple.js index 8c8dcca06a677..460ade3cd9308 100644 --- a/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_series_multiple.js +++ b/src/plugins/vis_type_vislib/public/fixtures/mock_data/terms/_series_multiple.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export default { xAxisOrderedValues: ['_all'], diff --git a/src/plugins/vis_type_vislib/public/vislib/components/labels/data_array.js b/src/plugins/vis_type_vislib/public/vislib/components/labels/data_array.js index 2ed9180476fe1..721391699e4f3 100644 --- a/src/plugins/vis_type_vislib/public/vislib/components/labels/data_array.js +++ b/src/plugins/vis_type_vislib/public/vislib/components/labels/data_array.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; import { flattenSeries } from './flatten_series'; /* diff --git a/src/plugins/vis_type_vislib/public/vislib/components/labels/flatten_series.js b/src/plugins/vis_type_vislib/public/vislib/components/labels/flatten_series.js index 877685af5d3b5..4d4660371eaa4 100644 --- a/src/plugins/vis_type_vislib/public/vislib/components/labels/flatten_series.js +++ b/src/plugins/vis_type_vislib/public/vislib/components/labels/flatten_series.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; /* * Accepts a Kibana data object with a rows or columns key @@ -30,5 +30,5 @@ export function flattenSeries(obj) { obj = obj.rows ? obj.rows : obj.columns; - return _.chain(obj).pluck('series').flattenDeep().value(); + return _.chain(obj).map('series').flattenDeep().value(); } diff --git a/src/plugins/vis_type_vislib/public/vislib/components/labels/labels.js b/src/plugins/vis_type_vislib/public/vislib/components/labels/labels.js index 494e59472064c..c3ed1bd0840c5 100644 --- a/src/plugins/vis_type_vislib/public/vislib/components/labels/labels.js +++ b/src/plugins/vis_type_vislib/public/vislib/components/labels/labels.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; import { dataArray as createArr } from './data_array'; import { uniqLabels as getArrOfUniqLabels } from './uniq_labels'; diff --git a/src/plugins/vis_type_vislib/public/vislib/components/labels/labels.test.js b/src/plugins/vis_type_vislib/public/vislib/components/labels/labels.test.js index 16b248de697e5..f04d9d17eeccb 100644 --- a/src/plugins/vis_type_vislib/public/vislib/components/labels/labels.test.js +++ b/src/plugins/vis_type_vislib/public/vislib/components/labels/labels.test.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; import { labels } from './labels'; import { dataArray } from './data_array'; @@ -166,9 +166,9 @@ describe('Vislib Labels Module Test Suite', function () { seriesArr = Array.isArray(seriesLabels); rowsArr = Array.isArray(rowsLabels); uniqSeriesLabels = _.chain(rowsData.rows) - .pluck('series') + .map('series') .flattenDeep() - .pluck('label') + .map('label') .uniq() .value(); }); diff --git a/src/plugins/vis_type_vislib/public/vislib/components/labels/uniq_labels.js b/src/plugins/vis_type_vislib/public/vislib/components/labels/uniq_labels.js index f1eb45c5fba53..cf98425c04ce7 100644 --- a/src/plugins/vis_type_vislib/public/vislib/components/labels/uniq_labels.js +++ b/src/plugins/vis_type_vislib/public/vislib/components/labels/uniq_labels.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; /* * Accepts an array of data objects and a formatter function. @@ -28,5 +28,5 @@ export function uniqLabels(arr) { throw new TypeError('UniqLabelUtil expects an array of objects'); } - return _(arr).pluck('label').unique().value(); + return _(arr).map('label').uniq().value(); } diff --git a/src/plugins/vis_type_vislib/public/vislib/components/legend/legend.tsx b/src/plugins/vis_type_vislib/public/vislib/components/legend/legend.tsx index f8abdd17409d4..f7e44ed278787 100644 --- a/src/plugins/vis_type_vislib/public/vislib/components/legend/legend.tsx +++ b/src/plugins/vis_type_vislib/public/vislib/components/legend/legend.tsx @@ -18,7 +18,7 @@ */ import React, { BaseSyntheticEvent, KeyboardEvent, PureComponent } from 'react'; import classNames from 'classnames'; -import { compact, uniq, map, every, isUndefined } from 'lodash3'; +import { compact, uniqBy, map, every, isUndefined } from 'lodash'; import { i18n } from '@kbn/i18n'; import { EuiPopoverProps, EuiIcon, keyCodes, htmlIdGenerator } from '@elastic/eui'; @@ -119,7 +119,7 @@ export class VisLegend extends PureComponent { getSeriesLabels = (data: any[]) => { const values = data.map((chart) => chart.series).reduce((a, b) => a.concat(b), []); - return compact(uniq(values, 'label')).map((label: any) => ({ + return compact(uniqBy(values, 'label')).map((label: any) => ({ ...label, values: [label.values[0].seriesRaw], })); diff --git a/src/plugins/vis_type_vislib/public/vislib/components/legend/pie_utils.ts b/src/plugins/vis_type_vislib/public/vislib/components/legend/pie_utils.ts index a5968913f7b77..da046af83a495 100644 --- a/src/plugins/vis_type_vislib/public/vislib/components/legend/pie_utils.ts +++ b/src/plugins/vis_type_vislib/public/vislib/components/legend/pie_utils.ts @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; /** * Returns an array of names ordered by appearance in the nested array @@ -39,7 +39,7 @@ export function getPieNames(data: any[]): string[] { }); }); - return _.uniq(names, 'label'); + return _.uniqBy(names, 'label'); } /** @@ -61,7 +61,7 @@ function getNames(data: any, columns: any): string[] { .sortBy(function (obj) { return obj.index; }) - .unique(function (d) { + .uniqBy(function (d) { return d.label; }) .value(); diff --git a/src/plugins/vis_type_vislib/public/vislib/components/tooltip/_hierarchical_tooltip_formatter.js b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/_hierarchical_tooltip_formatter.js index bf29491e840e5..d2cf81a1410c6 100644 --- a/src/plugins/vis_type_vislib/public/vislib/components/tooltip/_hierarchical_tooltip_formatter.js +++ b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/_hierarchical_tooltip_formatter.js @@ -18,7 +18,7 @@ */ import React from 'react'; -import _ from 'lodash3'; +import _ from 'lodash'; import numeral from '@elastic/numeral'; import { renderToStaticMarkup } from 'react-dom/server'; diff --git a/src/plugins/vis_type_vislib/public/vislib/components/tooltip/_pointseries_tooltip_formatter.test.js b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/_pointseries_tooltip_formatter.test.js index 7306bf66d09d6..c01e32abb8dcb 100644 --- a/src/plugins/vis_type_vislib/public/vislib/components/tooltip/_pointseries_tooltip_formatter.test.js +++ b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/_pointseries_tooltip_formatter.test.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; import $ from 'jquery'; import { pointSeriesTooltipFormatter } from './_pointseries_tooltip_formatter'; diff --git a/src/plugins/vis_type_vislib/public/vislib/components/tooltip/position_tooltip.js b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/position_tooltip.js index 7d35a4a0f008d..5324dc5318be5 100644 --- a/src/plugins/vis_type_vislib/public/vislib/components/tooltip/position_tooltip.js +++ b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/position_tooltip.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; import $ from 'jquery'; const OFFSET = 10; @@ -110,7 +110,7 @@ function getOverflow(size, pos, containers) { } function mergeOverflows(dest, src) { - _.merge(dest, src, function (a, b) { + _.mergeWith(dest, src, function (a, b) { if (a == null || b == null) return a || b; if (a < 0 && b < 0) return Math.min(a, b); return Math.max(a, b); @@ -131,7 +131,7 @@ function pickPlacement(prop, pos, overflow, prev, pref, fallback, placement) { const stash = '_' + prop; // list of directions in order of preference - const dirs = _.unique([prev[stash], pref, fallback].filter(Boolean)); + const dirs = _.uniq([prev[stash], pref, fallback].filter(Boolean)); let dir; let value; diff --git a/src/plugins/vis_type_vislib/public/vislib/components/tooltip/position_tooltip.test.js b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/position_tooltip.test.js index 443c687203204..85954aa9393e3 100644 --- a/src/plugins/vis_type_vislib/public/vislib/components/tooltip/position_tooltip.test.js +++ b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/position_tooltip.test.js @@ -18,7 +18,7 @@ */ import $ from 'jquery'; -import _ from 'lodash3'; +import _ from 'lodash'; import sinon from 'sinon'; import { positionTooltip } from './position_tooltip'; diff --git a/src/plugins/vis_type_vislib/public/vislib/components/tooltip/tooltip.js b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/tooltip.js index 9837915bd520e..bafc3199de896 100644 --- a/src/plugins/vis_type_vislib/public/vislib/components/tooltip/tooltip.js +++ b/src/plugins/vis_type_vislib/public/vislib/components/tooltip/tooltip.js @@ -18,7 +18,7 @@ */ import d3 from 'd3'; -import _ from 'lodash3'; +import _ from 'lodash'; import $ from 'jquery'; import { Binder } from '../../lib/binder'; @@ -218,7 +218,7 @@ Tooltip.prototype.render = function () { if (html) allContents.push({ id, html, order }); - const allHtml = _(allContents).sortBy('order').pluck('html').compact().join('\n'); + const allHtml = _(allContents).sortBy('order').map('html').compact().join('\n'); if (allHtml) { $tooltip.html(allHtml); diff --git a/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/flatten_data.js b/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/flatten_data.js index c205682d5a30a..8b7a44d95bb3b 100644 --- a/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/flatten_data.js +++ b/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/flatten_data.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; /* * Accepts a Kibana data object, flattens the data.series values array, @@ -35,9 +35,9 @@ export function flattenData(obj) { } return _(charts ? charts : [obj]) - .pluck('series') + .map('series') .flattenDeep() - .pluck('values') + .map('values') .flattenDeep() .filter(Boolean) .value(); diff --git a/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/ordered_x_keys.js b/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/ordered_x_keys.js index 23c2a24cef2c1..e9f75e64c1d3d 100644 --- a/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/ordered_x_keys.js +++ b/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/ordered_x_keys.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; import moment from 'moment'; import { getUniqKeys } from './uniq_keys'; diff --git a/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/uniq_keys.js b/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/uniq_keys.js index c8d2e1aa58918..8854fb13e4e90 100644 --- a/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/uniq_keys.js +++ b/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/uniq_keys.js @@ -17,7 +17,7 @@ * under the License. */ -import { isObject, isNumber } from 'lodash3'; +import { isObject, isNumber } from 'lodash'; import { flattenData } from './flatten_data'; /* diff --git a/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_fill_data_array.js b/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_fill_data_array.js index 7807e512978ee..90c8f6ca052fb 100644 --- a/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_fill_data_array.js +++ b/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_fill_data_array.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; /* * Accepts an array of zero-filled y value objects (arr1) diff --git a/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_injection.test.js b/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_injection.test.js index f3ac04cd589d9..23096b164b452 100644 --- a/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_injection.test.js +++ b/src/plugins/vis_type_vislib/public/vislib/components/zero_injection/zero_injection.test.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; import { injectZeros } from './inject_zeros'; import { orderXValues } from './ordered_x_keys'; import { getUniqKeys } from './uniq_keys'; diff --git a/src/plugins/vis_type_vislib/public/vislib/helpers/hierarchical/build_hierarchical_data.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/hierarchical/build_hierarchical_data.ts index bbd4b185b3744..3bc8fa0f035b6 100644 --- a/src/plugins/vis_type_vislib/public/vislib/helpers/hierarchical/build_hierarchical_data.ts +++ b/src/plugins/vis_type_vislib/public/vislib/helpers/hierarchical/build_hierarchical_data.ts @@ -17,7 +17,7 @@ * under the License. */ -import { toArray } from 'lodash3'; +import { toArray } from 'lodash'; import { SerializedFieldFormat } from '../../../../../expressions/common/types'; import { getFormatService } from '../../../services'; import { Table } from '../../types'; diff --git a/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_series.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_series.ts index d3ee0274c519a..8a1f80df9f4db 100644 --- a/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_series.ts +++ b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_get_series.ts @@ -17,7 +17,7 @@ * under the License. */ -import { partial } from 'lodash3'; +import { partial } from 'lodash'; import { getPoint } from './_get_point'; import { addToSiri, Serie } from './_add_to_siri'; import { Chart } from './point_series'; @@ -71,7 +71,7 @@ export function getSeries(table: Table, chart: Chart) { seriesLabel = prefix + seriesLabel; } - (point.seriesId as any) = seriesId; + (point.seriesId as string | number) = seriesId; addToSiri( seriesMap, point, diff --git a/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_x_axis.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_x_axis.ts index d58a3704ef7a2..32536960c59cd 100644 --- a/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_x_axis.ts +++ b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_x_axis.ts @@ -17,7 +17,7 @@ * under the License. */ -import { uniq } from 'lodash3'; +import { uniq } from 'lodash'; import moment from 'moment'; import { Chart } from './point_series'; import { Table } from '../../types'; diff --git a/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_y_axis.test.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_y_axis.test.ts index 371e2622c827b..fa22ae570f38d 100644 --- a/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_y_axis.test.ts +++ b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_init_y_axis.test.ts @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; import { initYAxis } from './_init_y_axis'; import { Chart } from './point_series'; diff --git a/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_ordered_date_axis.test.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_ordered_date_axis.test.ts index d70f0bac8191e..b2e4d6e4b40c9 100644 --- a/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_ordered_date_axis.test.ts +++ b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/_ordered_date_axis.test.ts @@ -18,7 +18,7 @@ */ import moment from 'moment'; -import _ from 'lodash3'; +import _ from 'lodash'; import { orderedDateAxis } from './_ordered_date_axis'; import { DateHistogramParams, OrderedChart } from './point_series'; diff --git a/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/point_series.test.ts b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/point_series.test.ts index 7f320fa86912b..2a5ab197c9ab7 100644 --- a/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/point_series.test.ts +++ b/src/plugins/vis_type_vislib/public/vislib/helpers/point_series/point_series.test.ts @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; import { buildPointSeriesData, Dimensions } from './point_series'; import { Table, Column } from '../../types'; import { setFormatService } from '../../../services'; diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/_error_handler.js b/src/plugins/vis_type_vislib/public/vislib/lib/_error_handler.js index f616c25aee4c3..1d1f912c64cba 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/_error_handler.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/_error_handler.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; import { ContainerTooSmall } from '../errors'; /** diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/alerts.js b/src/plugins/vis_type_vislib/public/vislib/lib/alerts.js index 1b14f3f17bc8c..b0d5e758c7d42 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/alerts.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/alerts.js @@ -18,7 +18,7 @@ */ import $ from 'jquery'; -import _ from 'lodash3'; +import _ from 'lodash'; /** * Adds alerts that float in front of a visualization diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis.js b/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis.js index 49342b0c6fd61..cbd42d281b286 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis.js @@ -18,7 +18,7 @@ */ import d3 from 'd3'; -import _ from 'lodash3'; +import _ from 'lodash'; import $ from 'jquery'; import { ErrorHandler } from '../_error_handler'; import { AxisTitle } from './axis_title'; diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis.test.js b/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis.test.js index 8cb00583c46d2..320d9b541de2a 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis.test.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis.test.js @@ -18,7 +18,7 @@ */ import d3 from 'd3'; -import _ from 'lodash3'; +import _ from 'lodash'; import $ from 'jquery'; import { Axis } from './axis'; diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_config.js b/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_config.js index 8bbb9438a0640..faf270877217b 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_config.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_config.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; import d3 from 'd3'; import { SCALE_MODES } from './scale_modes'; diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_scale.js b/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_scale.js index e7affb349bea0..a24ba908e177f 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_scale.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_scale.js @@ -18,7 +18,7 @@ */ import d3 from 'd3'; -import _ from 'lodash3'; +import _ from 'lodash'; import moment from 'moment'; import { InvalidLogScaleValues } from '../../errors'; diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_title.test.js b/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_title.test.js index 3106cc0e0e334..c43f66d0ac34d 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_title.test.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/axis/axis_title.test.js @@ -18,7 +18,7 @@ */ import d3 from 'd3'; -import _ from 'lodash3'; +import _ from 'lodash'; import $ from 'jquery'; import { AxisTitle } from './axis_title'; diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/axis/x_axis.test.js b/src/plugins/vis_type_vislib/public/vislib/lib/axis/x_axis.test.js index 032995a0323af..3127bcf17ed07 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/axis/x_axis.test.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/axis/x_axis.test.js @@ -18,7 +18,7 @@ */ import d3 from 'd3'; -import _ from 'lodash3'; +import _ from 'lodash'; import $ from 'jquery'; import { Axis } from './axis'; diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/axis/y_axis.test.js b/src/plugins/vis_type_vislib/public/vislib/lib/axis/y_axis.test.js index 94b6a1d5b5ffa..4d237669ff849 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/axis/y_axis.test.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/axis/y_axis.test.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; import d3 from 'd3'; import $ from 'jquery'; diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/chart_grid.js b/src/plugins/vis_type_vislib/public/vislib/lib/chart_grid.js index 7b9acecc7d390..aac019a98e790 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/chart_grid.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/chart_grid.js @@ -18,7 +18,7 @@ */ import d3 from 'd3'; -import _ from 'lodash3'; +import _ from 'lodash'; const defaults = { style: { diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/chart_title.js b/src/plugins/vis_type_vislib/public/vislib/lib/chart_title.js index f1aa4c46973da..a281cea38bada 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/chart_title.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/chart_title.js @@ -18,7 +18,7 @@ */ import d3 from 'd3'; -import _ from 'lodash3'; +import _ from 'lodash'; import { ErrorHandler } from './_error_handler'; import { Tooltip } from '../components/tooltip'; diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/data.js b/src/plugins/vis_type_vislib/public/vislib/lib/data.js index e735e22d3ff7c..3633063966e17 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/data.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/data.js @@ -18,7 +18,7 @@ */ import d3 from 'd3'; -import _ from 'lodash3'; +import _ from 'lodash'; import { injectZeros } from '../components/zero_injection/inject_zeros'; import { orderXValues } from '../components/zero_injection/ordered_x_keys'; @@ -248,7 +248,7 @@ export class Data { const visData = this.getVisData(); return _.reduce( - _.pluck(visData, 'geoJson.properties'), + _.map(visData, 'geoJson.properties'), function (minMax, props) { return { min: Math.min(props.min, minMax.min), @@ -312,7 +312,7 @@ export class Data { * @returns {Array} Value objects */ flatten() { - return _(this.chartData()).pluck('series').flattenDeep().pluck('values').flattenDeep().value(); + return _(this.chartData()).map('series').flattenDeep().map('values').flattenDeep().value(); } /** @@ -383,7 +383,7 @@ export class Data { .sortBy(function (obj) { return obj.index; }) - .unique(function (d) { + .uniqBy(function (d) { return d.label; }) .value(); @@ -452,7 +452,7 @@ export class Data { }); }); - return _.uniq(names, 'label'); + return _.uniqBy(names, 'label'); } /** diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/data.test.js b/src/plugins/vis_type_vislib/public/vislib/lib/data.test.js index a990f728805d9..82bb472f1696d 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/data.test.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/data.test.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; import { Data } from './data'; import { getMockUiState } from '../../fixtures/mocks'; diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/dispatch.js b/src/plugins/vis_type_vislib/public/vislib/lib/dispatch.js index 7f6609f942a9d..4c50472b9d11a 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/dispatch.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/dispatch.js @@ -18,7 +18,7 @@ */ import d3 from 'd3'; -import { get, pull, restParam, size, reduce } from 'lodash3'; +import { get, pull, rest, size, reduce } from 'lodash'; import $ from 'jquery'; import { DIMMING_OPACITY_SETTING } from '../../../common'; @@ -97,7 +97,7 @@ export class Dispatch { * @param {*} [arg...] - any number of arguments that will be applied to each handler * @return {Dispatch} - this, for chaining */ - emit = restParam(function (name, args) { + emit = rest(function (name, args) { if (!this._listeners[name]) { return this; } diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/handler.js b/src/plugins/vis_type_vislib/public/vislib/lib/handler.js index cf049fcb0c438..3c1aeaa0d1d0d 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/handler.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/handler.js @@ -18,7 +18,7 @@ */ import d3 from 'd3'; -import _ from 'lodash3'; +import _ from 'lodash'; import MarkdownIt from 'markdown-it'; import { NoResults } from '../errors'; diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/layout/layout.js b/src/plugins/vis_type_vislib/public/vislib/lib/layout/layout.js index 5a98f7b8fed7f..a5f4907f46273 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/layout/layout.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/layout/layout.js @@ -18,7 +18,7 @@ */ import d3 from 'd3'; -import _ from 'lodash3'; +import _ from 'lodash'; import $ from 'jquery'; import { layoutTypes } from './layout_types'; import { Axis } from '../axis'; diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/layout/layout_types.test.js b/src/plugins/vis_type_vislib/public/vislib/lib/layout/layout_types.test.js index 49eb0cac943ed..8b727ea3aa5fe 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/layout/layout_types.test.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/layout/layout_types.test.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; import { layoutTypes as layoutType } from './layout_types'; diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/layout/types/column_layout.test.js b/src/plugins/vis_type_vislib/public/vislib/lib/layout/types/column_layout.test.js index 3a5f0705516e3..f6ee5d13badf2 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/layout/types/column_layout.test.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/layout/types/column_layout.test.js @@ -18,7 +18,7 @@ */ import d3 from 'd3'; -import _ from 'lodash3'; +import _ from 'lodash'; import { layoutTypes } from '../layout_types'; diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/types/pie.js b/src/plugins/vis_type_vislib/public/vislib/lib/types/pie.js index c6f2f87676c5b..af500c7185a3a 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/types/pie.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/types/pie.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; export function vislibPieConfig(config) { if (!config.chart) { diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/types/point_series.js b/src/plugins/vis_type_vislib/public/vislib/lib/types/point_series.js index dcfb766821083..438c071d74532 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/types/point_series.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/types/point_series.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; import { i18n } from '@kbn/i18n'; function getSeriId(seri) { diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/vis_config.js b/src/plugins/vis_type_vislib/public/vislib/lib/vis_config.js index 248f68b78cac1..0354724703208 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/vis_config.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/vis_config.js @@ -20,7 +20,7 @@ /** * Provides vislib configuration, throws error if invalid property is accessed without providing defaults */ -import _ from 'lodash3'; +import _ from 'lodash'; import { vislibTypesConfig as visTypes } from './types'; import { Data } from './data'; diff --git a/src/plugins/vis_type_vislib/public/vislib/vis.js b/src/plugins/vis_type_vislib/public/vislib/vis.js index a701c6faa5240..f258cb55ba281 100644 --- a/src/plugins/vis_type_vislib/public/vislib/vis.js +++ b/src/plugins/vis_type_vislib/public/vislib/vis.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; import d3 from 'd3'; import { EventEmitter } from 'events'; diff --git a/src/plugins/vis_type_vislib/public/vislib/visualizations/_chart.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/_chart.js index bfa845e799655..5ed6d3eb79f4b 100644 --- a/src/plugins/vis_type_vislib/public/vislib/visualizations/_chart.js +++ b/src/plugins/vis_type_vislib/public/vislib/visualizations/_chart.js @@ -18,7 +18,7 @@ */ import d3 from 'd3'; -import _ from 'lodash3'; +import _ from 'lodash'; import { dataLabel } from '../lib/_data_label'; import { Dispatch } from '../lib/dispatch'; diff --git a/src/plugins/vis_type_vislib/public/vislib/visualizations/gauges/meter.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/gauges/meter.js index 0ad7bbce15304..a252002534775 100644 --- a/src/plugins/vis_type_vislib/public/vislib/visualizations/gauges/meter.js +++ b/src/plugins/vis_type_vislib/public/vislib/visualizations/gauges/meter.js @@ -18,7 +18,7 @@ */ import d3 from 'd3'; -import _ from 'lodash3'; +import _ from 'lodash'; import { getHeatmapColors } from '../../../../../charts/public'; diff --git a/src/plugins/vis_type_vislib/public/vislib/visualizations/pie_chart.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/pie_chart.js index aff44c9fdf2d3..938d3d0ec6d74 100644 --- a/src/plugins/vis_type_vislib/public/vislib/visualizations/pie_chart.js +++ b/src/plugins/vis_type_vislib/public/vislib/visualizations/pie_chart.js @@ -18,7 +18,7 @@ */ import d3 from 'd3'; -import _ from 'lodash3'; +import _ from 'lodash'; import $ from 'jquery'; import numeral from '@elastic/numeral'; import { PieContainsAllZeros, ContainerTooSmall } from '../errors'; diff --git a/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series.js index 4a52912bdf8a8..9a25d041f6567 100644 --- a/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series.js +++ b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series.js @@ -18,7 +18,7 @@ */ import d3 from 'd3'; -import _ from 'lodash3'; +import _ from 'lodash'; import $ from 'jquery'; import { Tooltip } from '../components/tooltip'; diff --git a/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/_point_series.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/_point_series.js index 482952c4d3b6c..1b084e4142445 100644 --- a/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/_point_series.js +++ b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/_point_series.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; import { euiPaletteColorBlind } from '@elastic/eui/lib/services'; const thresholdLineDefaults = { diff --git a/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/area_chart.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/area_chart.js index 90b1aef9627de..e3e2d31ecd4f4 100644 --- a/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/area_chart.js +++ b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/area_chart.js @@ -18,7 +18,7 @@ */ import d3 from 'd3'; -import _ from 'lodash3'; +import _ from 'lodash'; import $ from 'jquery'; import { PointSeries } from './_point_series'; diff --git a/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/column_chart.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/column_chart.js index 3ab838974121e..cc64e0d746fbf 100644 --- a/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/column_chart.js +++ b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/column_chart.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; import d3 from 'd3'; import { isColorDark } from '@elastic/eui/lib/services'; import { PointSeries } from './_point_series'; diff --git a/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/heatmap_chart.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/heatmap_chart.js index 385dfd3d6b9f5..4564721464767 100644 --- a/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/heatmap_chart.js +++ b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/heatmap_chart.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; import moment from 'moment'; import { isColorDark } from '@elastic/eui'; diff --git a/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/line_chart.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/line_chart.js index 0bb7d5241ce35..64fbae7d1ac8c 100644 --- a/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/line_chart.js +++ b/src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/line_chart.js @@ -18,7 +18,7 @@ */ import d3 from 'd3'; -import _ from 'lodash3'; +import _ from 'lodash'; import { PointSeries } from './_point_series'; const defaults = { diff --git a/src/plugins/vis_type_vislib/public/vislib/visualizations/vis_types.test.js b/src/plugins/vis_type_vislib/public/vislib/visualizations/vis_types.test.js index 165507e809967..a6f2404169f62 100644 --- a/src/plugins/vis_type_vislib/public/vislib/visualizations/vis_types.test.js +++ b/src/plugins/vis_type_vislib/public/vislib/visualizations/vis_types.test.js @@ -17,7 +17,7 @@ * under the License. */ -import _ from 'lodash3'; +import _ from 'lodash'; import { visTypes } from './vis_types';