Skip to content

Commit 988352c

Browse files
authored
chore(deps): minor redux related package upgrades (#2607)
## Summary Minor updates to `redux` related packages, if possible to bring the versions in line with what is used in Kibana (elastic/kibana#175017). - Upgrades `@types/react-redux` from `7.1.1` to `7.1.20`. - Upgrades `react-redux` from `7.1.0` to `7.2.8`. - Upgrades `redux` from `4.0.4` to `4.2.1`. - Upgrades `reselect` from `4.0.0` to `4.1.8`.
1 parent f48f136 commit 988352c

File tree

19 files changed

+77
-95
lines changed

19 files changed

+77
-95
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
"@types/marked": "^2.0.1",
101101
"@types/moment-timezone": "^0.5.30",
102102
"@types/react-dom": "^16.9.8",
103-
"@types/react-redux": "^7.1.1",
103+
"@types/react-redux": "^7.1.20",
104104
"@types/seedrandom": "^2.4.28",
105105
"@types/url-parse": "^1.4.3",
106106
"@types/uuid": "^8.3.4",

packages/charts/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
"d3-shape": "^2.0.0",
4545
"prop-types": "^15.7.2",
4646
"re-reselect": "^3.4.0",
47-
"react-redux": "^7.1.0",
48-
"redux": "^4.0.4",
49-
"reselect": "^4.0.0",
47+
"react-redux": "^7.2.8",
48+
"redux": "^4.2.1",
49+
"reselect": "^4.1.8",
5050
"ts-debounce": "^4.0.0",
5151
"utility-types": "^3.10.0",
5252
"uuid": "^9",

packages/charts/src/chart_types/bullet_graph/chart_state.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,11 @@ import { getTooltipInfo } from './selectors/get_tooltip_info';
1616
import { isTooltipVisible } from './selectors/is_tooltip_visible';
1717
import { ChartType } from '../../chart_types';
1818
import { DEFAULT_CSS_CURSOR } from '../../common/constants';
19-
import { LegendItem } from '../../common/legend';
19+
import { EMPTY_LEGEND_LIST, EMPTY_LEGEND_ITEM_EXTRA_VALUES } from '../../common/legend';
2020
import { Tooltip } from '../../components/tooltip/tooltip';
2121
import { BackwardRef, GlobalChartState, InternalChartState } from '../../state/chart_state';
2222
import { InitStatus } from '../../state/selectors/get_internal_is_intialized';
23-
import { LegendItemLabel } from '../../state/selectors/get_legend_items_labels';
24-
25-
const EMPTY_MAP = new Map();
26-
const EMPTY_LEGEND_LIST: LegendItem[] = [];
27-
const EMPTY_LEGEND_ITEM_LIST: LegendItemLabel[] = [];
23+
import { EMPTY_LEGEND_ITEM_LIST } from '../../state/selectors/get_legend_items_labels';
2824

2925
/** @internal */
3026
export class BulletState implements InternalChartState {
@@ -43,7 +39,7 @@ export class BulletState implements InternalChartState {
4339
isChartEmpty = () => false;
4440
getLegendItems = () => EMPTY_LEGEND_LIST;
4541
getLegendItemsLabels = () => EMPTY_LEGEND_ITEM_LIST;
46-
getLegendExtraValues = () => EMPTY_MAP;
42+
getLegendExtraValues = () => EMPTY_LEGEND_ITEM_EXTRA_VALUES;
4743
getPointerCursor = () => DEFAULT_CSS_CURSOR;
4844
isTooltipVisible(globalState: GlobalChartState) {
4945
return isTooltipVisible(globalState);

packages/charts/src/chart_types/flame_chart/internal_chart_state.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
import { FlameWithTooltip } from './flame_chart';
1010
import { ChartType } from '..';
1111
import { DEFAULT_CSS_CURSOR } from '../../common/constants';
12-
import { LegendItemExtraValues } from '../../common/legend';
13-
import { SeriesKey } from '../../common/series_id';
12+
import { EMPTY_LEGEND_ITEM_EXTRA_VALUES, EMPTY_LEGEND_LIST } from '../../common/legend';
1413
import { InternalChartState } from '../../state/chart_state';
1514
import { InitStatus } from '../../state/selectors/get_internal_is_intialized';
15+
import { EMPTY_LEGEND_ITEM_LIST } from '../../state/selectors/get_legend_items_labels';
1616

1717
/** @internal */
1818
export class FlameState implements InternalChartState {
@@ -27,9 +27,9 @@ export class FlameState implements InternalChartState {
2727
isBrushing = () => false;
2828
isChartEmpty = () => false;
2929
canDisplayChartTitles = () => false;
30-
getLegendItemsLabels = () => [];
31-
getLegendItems = () => [];
32-
getLegendExtraValues = () => new Map<SeriesKey, LegendItemExtraValues>();
30+
getLegendItemsLabels = () => EMPTY_LEGEND_ITEM_LIST;
31+
getLegendItems = () => EMPTY_LEGEND_LIST;
32+
getLegendExtraValues = () => EMPTY_LEGEND_ITEM_EXTRA_VALUES;
3333
getPointerCursor = () => DEFAULT_CSS_CURSOR;
3434
getTooltipAnchor = () => ({ x: 0, y: 0, width: 0, height: 0 });
3535
isTooltipVisible = () => ({ visible: false, isExternal: false, displayOnly: false, isPinnable: false });

packages/charts/src/chart_types/goal_chart/state/chart_state.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,16 @@ import { createOnElementOverCaller } from './selectors/on_element_over_caller';
1717
import { getTooltipInfoSelector } from './selectors/tooltip';
1818
import { ChartType } from '../..';
1919
import { DEFAULT_CSS_CURSOR } from '../../../common/constants';
20-
import { LegendItem } from '../../../common/legend';
20+
import { EMPTY_LEGEND_LIST, EMPTY_LEGEND_ITEM_EXTRA_VALUES } from '../../../common/legend';
2121
import { Tooltip } from '../../../components/tooltip/tooltip';
2222
import { InternalChartState, GlobalChartState, BackwardRef, TooltipVisibility } from '../../../state/chart_state';
2323
import { getActivePointerPosition } from '../../../state/selectors/get_active_pointer_position';
2424
import { InitStatus } from '../../../state/selectors/get_internal_is_intialized';
25-
import { LegendItemLabel } from '../../../state/selectors/get_legend_items_labels';
25+
import { EMPTY_LEGEND_ITEM_LIST } from '../../../state/selectors/get_legend_items_labels';
2626
import { DebugState } from '../../../state/types';
2727
import { Dimensions } from '../../../utils/dimensions';
2828
import { Goal } from '../renderer/canvas/connected_component';
2929

30-
const EMPTY_MAP = new Map();
31-
const EMPTY_LEGEND_LIST: LegendItem[] = [];
32-
const EMPTY_LEGEND_ITEM_LIST: LegendItemLabel[] = [];
33-
3430
/** @internal */
3531
export class GoalState implements InternalChartState {
3632
chartType = ChartType.Goal;
@@ -72,7 +68,7 @@ export class GoalState implements InternalChartState {
7268
}
7369

7470
getLegendExtraValues() {
75-
return EMPTY_MAP;
71+
return EMPTY_LEGEND_ITEM_EXTRA_VALUES;
7672
}
7773

7874
chartRenderer(containerRef: BackwardRef, forwardStageRef: RefObject<HTMLCanvasElement>) {

packages/charts/src/chart_types/heatmap/state/chart_state.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import { createOnElementOverCaller } from './selectors/on_element_over_caller';
2626
import { createOnPointerUpdateCaller } from './selectors/on_pointer_update_caller';
2727
import { getTooltipInfoSelector } from './selectors/tooltip';
2828
import { ChartType } from '../..';
29+
import { EMPTY_LEGEND_ITEM_EXTRA_VALUES } from '../../../common/legend';
2930
import { SmallMultiplesSeriesDomains } from '../../../common/panel_utils';
3031
import { BrushTool } from '../../../components/brush/brush';
3132
import { Tooltip } from '../../../components/tooltip/tooltip';
@@ -38,8 +39,6 @@ import { Heatmap } from '../renderer/canvas/connected_component';
3839
import { CursorBand } from '../renderer/dom/cursor_band';
3940
import { HighlighterFromBrush } from '../renderer/dom/highlighter_brush';
4041

41-
const EMPTY_MAP = new Map();
42-
4342
/** @internal */
4443
export class HeatmapState implements InternalChartState {
4544
chartType = ChartType.Heatmap;
@@ -79,7 +78,7 @@ export class HeatmapState implements InternalChartState {
7978
}
8079

8180
getLegendExtraValues() {
82-
return EMPTY_MAP;
81+
return EMPTY_LEGEND_ITEM_EXTRA_VALUES;
8382
}
8483

8584
chartRenderer(containerRef: BackwardRef, forwardStageRef: RefObject<HTMLCanvasElement>) {

packages/charts/src/chart_types/heatmap/state/selectors/on_brush_end_caller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { DragCheckProps, hasDragged } from '../../../../utils/events';
2727
export function createOnBrushEndCaller(): (state: GlobalChartState) => void {
2828
let prevProps: DragCheckProps | null = null;
2929
let selector: OutputSelector<
30-
GlobalChartState,
30+
Array<(state: GlobalChartState) => GlobalChartState>,
3131
void,
3232
(res1: DragState | null, res3: SettingsSpec, res4: HeatmapBrushEvent | null) => void
3333
> | null = null;

packages/charts/src/chart_types/metric/state/chart_state.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,12 @@ import React from 'react';
1111
import { canDisplayChartTitles } from './selectors/can_display_chart_titles';
1212
import { ChartType } from '../..';
1313
import { DEFAULT_CSS_CURSOR } from '../../../common/constants';
14-
import { LegendItem } from '../../../common/legend';
14+
import { EMPTY_LEGEND_LIST, EMPTY_LEGEND_ITEM_EXTRA_VALUES } from '../../../common/legend';
1515
import { GlobalChartState, InternalChartState } from '../../../state/chart_state';
1616
import { InitStatus } from '../../../state/selectors/get_internal_is_intialized';
17-
import { LegendItemLabel } from '../../../state/selectors/get_legend_items_labels';
17+
import { EMPTY_LEGEND_ITEM_LIST } from '../../../state/selectors/get_legend_items_labels';
1818
import { Metric } from '../renderer/dom';
1919

20-
const EMPTY_MAP = new Map();
21-
const EMPTY_LEGEND_LIST: LegendItem[] = [];
22-
const EMPTY_LEGEND_ITEM_LIST: LegendItemLabel[] = [];
23-
2420
/** @internal */
2521
export class MetricState implements InternalChartState {
2622
chartType = ChartType.Metric;
@@ -32,7 +28,7 @@ export class MetricState implements InternalChartState {
3228
isChartEmpty = () => false;
3329
getLegendItems = () => EMPTY_LEGEND_LIST;
3430
getLegendItemsLabels = () => EMPTY_LEGEND_ITEM_LIST;
35-
getLegendExtraValues = () => EMPTY_MAP;
31+
getLegendExtraValues = () => EMPTY_LEGEND_ITEM_EXTRA_VALUES;
3632
getPointerCursor = () => DEFAULT_CSS_CURSOR;
3733
isTooltipVisible = () => ({
3834
visible: false,

packages/charts/src/chart_types/partition_chart/state/chart_state.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,14 @@ import { createOnElementOverCaller } from './selectors/on_element_over_caller';
2020
import { getPartitionSpec } from './selectors/partition_spec';
2121
import { getTooltipInfoSelector } from './selectors/tooltip';
2222
import { ChartType } from '../..';
23-
import { LegendItemExtraValues } from '../../../common/legend';
24-
import { SeriesKey } from '../../../common/series_id';
23+
import { EMPTY_LEGEND_ITEM_EXTRA_VALUES } from '../../../common/legend';
2524
import { BackwardRef, GlobalChartState, InternalChartState } from '../../../state/chart_state';
2625
import { getActivePointerPosition } from '../../../state/selectors/get_active_pointer_position';
2726
import { InitStatus } from '../../../state/selectors/get_internal_is_intialized';
2827
import { DebugState } from '../../../state/types';
2928
import { Dimensions } from '../../../utils/dimensions';
3029
import { render } from '../renderer/dom/layered_partition_chart';
3130

32-
const EMPTY_MAP = new Map<SeriesKey, LegendItemExtraValues>();
33-
3431
/** @internal */
3532
export class PartitionState implements InternalChartState {
3633
chartType = ChartType.Partition;
@@ -75,7 +72,7 @@ export class PartitionState implements InternalChartState {
7572
}
7673

7774
getLegendExtraValues() {
78-
return EMPTY_MAP;
75+
return EMPTY_LEGEND_ITEM_EXTRA_VALUES;
7976
}
8077

8178
chartRenderer(containerRef: BackwardRef, forwardStageRef: RefObject<HTMLCanvasElement>) {

packages/charts/src/chart_types/timeslip/internal_chart_state.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
import { TimeslipWithTooltip } from './timeslip_chart';
1010
import { ChartType } from '..';
1111
import { DEFAULT_CSS_CURSOR } from '../../common/constants';
12-
import { LegendItemExtraValues } from '../../common/legend';
13-
import { SeriesKey } from '../../common/series_id';
12+
import { EMPTY_LEGEND_ITEM_EXTRA_VALUES, EMPTY_LEGEND_LIST } from '../../common/legend';
1413
import { InternalChartState } from '../../state/chart_state';
1514
import { InitStatus } from '../../state/selectors/get_internal_is_intialized';
15+
import { EMPTY_LEGEND_ITEM_LIST } from '../../state/selectors/get_legend_items_labels';
1616

1717
/** @internal */
1818
export class TimeslipState implements InternalChartState {
@@ -26,9 +26,9 @@ export class TimeslipState implements InternalChartState {
2626
isBrushAvailable = () => false;
2727
isBrushing = () => false;
2828
isChartEmpty = () => false;
29-
getLegendItemsLabels = () => [];
30-
getLegendItems = () => [];
31-
getLegendExtraValues = () => new Map<SeriesKey, LegendItemExtraValues>();
29+
getLegendItemsLabels = () => EMPTY_LEGEND_ITEM_LIST;
30+
getLegendItems = () => EMPTY_LEGEND_LIST;
31+
getLegendExtraValues = () => EMPTY_LEGEND_ITEM_EXTRA_VALUES;
3232
getPointerCursor = () => DEFAULT_CSS_CURSOR;
3333
getTooltipAnchor = () => ({ x: 0, y: 0, width: 0, height: 0 });
3434
isTooltipVisible = () => ({

0 commit comments

Comments
 (0)