@elastic/charts 65.0.0 → 65.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chart_types/metric/renderer/dom/text.js +1 -1
- package/dist/chart_types/metric/renderer/dom/text.js.map +1 -1
- package/dist/chart_types/partition_chart/layout/viewmodel/hierarchy_of_arrays.js +2 -1
- package/dist/chart_types/partition_chart/layout/viewmodel/hierarchy_of_arrays.js.map +1 -1
- package/dist/chart_types/partition_chart/state/selectors/compute_legend.js +4 -2
- package/dist/chart_types/partition_chart/state/selectors/compute_legend.js.map +1 -1
- package/dist/chart_types/xy_chart/legend/legend.js +6 -23
- package/dist/chart_types/xy_chart/legend/legend.js.map +1 -1
- package/dist/chart_types/xy_chart/state/utils/get_legend_values.d.ts +2 -0
- package/dist/chart_types/xy_chart/state/utils/get_legend_values.d.ts.map +1 -0
- package/dist/chart_types/xy_chart/state/utils/{get_last_value.js → get_legend_values.js} +13 -3
- package/dist/chart_types/xy_chart/state/utils/get_legend_values.js.map +1 -0
- package/dist/chart_types/xy_chart/tooltip/tooltip.js +2 -1
- package/dist/chart_types/xy_chart/tooltip/tooltip.js.map +1 -1
- package/dist/common/legend.d.ts +1 -1
- package/dist/common/legend.d.ts.map +1 -1
- package/dist/common/legend.js +24 -2
- package/dist/common/legend.js.map +1 -1
- package/dist/components/chart.d.ts +1 -1
- package/dist/components/legend/label.js +20 -11
- package/dist/components/legend/label.js.map +1 -1
- package/dist/components/legend/legend.js +52 -12
- package/dist/components/legend/legend.js.map +1 -1
- package/dist/components/legend/legend_color_picker.d.ts +2 -0
- package/dist/components/legend/legend_color_picker.d.ts.map +1 -0
- package/dist/components/legend/legend_color_picker.js +42 -0
- package/dist/components/legend/legend_color_picker.js.map +1 -0
- package/dist/components/legend/legend_item.js +48 -103
- package/dist/components/legend/legend_item.js.map +1 -1
- package/dist/components/legend/legend_table/index.d.ts +2 -0
- package/dist/components/legend/legend_table/index.d.ts.map +1 -0
- package/dist/components/legend/legend_table/index.js +6 -0
- package/dist/components/legend/legend_table/index.js.map +1 -0
- package/dist/components/legend/legend_table/legend_table.d.ts +2 -0
- package/dist/components/legend/legend_table/legend_table.d.ts.map +1 -0
- package/dist/components/legend/legend_table/legend_table.js +31 -0
- package/dist/components/legend/legend_table/legend_table.js.map +1 -0
- package/dist/components/legend/legend_table/legend_table_body.d.ts +2 -0
- package/dist/components/legend/legend_table/legend_table_body.d.ts.map +1 -0
- package/dist/components/legend/legend_table/legend_table_body.js +13 -0
- package/dist/components/legend/legend_table/legend_table_body.js.map +1 -0
- package/dist/components/legend/legend_table/legend_table_cell.d.ts +9 -0
- package/dist/components/legend/legend_table/legend_table_cell.d.ts.map +1 -0
- package/dist/components/legend/legend_table/legend_table_cell.js +16 -0
- package/dist/components/legend/legend_table/legend_table_cell.js.map +1 -0
- package/dist/components/legend/legend_table/legend_table_header.d.ts +2 -0
- package/dist/components/legend/legend_table/legend_table_header.d.ts.map +1 -0
- package/dist/components/legend/legend_table/legend_table_header.js +24 -0
- package/dist/components/legend/legend_table/legend_table_header.js.map +1 -0
- package/dist/components/legend/legend_table/legend_table_item.d.ts +2 -0
- package/dist/components/legend/legend_table/legend_table_item.d.ts.map +1 -0
- package/dist/components/legend/legend_table/legend_table_item.js +75 -0
- package/dist/components/legend/legend_table/legend_table_item.js.map +1 -0
- package/dist/components/legend/legend_table/legend_table_row.d.ts +7 -0
- package/dist/components/legend/legend_table/legend_table_row.d.ts.map +1 -0
- package/dist/components/legend/legend_table/legend_table_row.js +14 -0
- package/dist/components/legend/legend_table/legend_table_row.js.map +1 -0
- package/dist/components/legend/legend_table/legend_value.d.ts +2 -0
- package/dist/components/legend/legend_table/legend_value.d.ts.map +1 -0
- package/dist/components/legend/legend_table/legend_value.js +13 -0
- package/dist/components/legend/legend_table/legend_value.js.map +1 -0
- package/dist/components/legend/types.d.ts +2 -0
- package/dist/components/legend/types.d.ts.map +1 -0
- package/dist/components/legend/types.js +3 -0
- package/dist/components/legend/types.js.map +1 -0
- package/dist/components/legend/utils.js +4 -4
- package/dist/components/legend/utils.js.map +1 -1
- package/dist/components/tooltip/components/tooltip_container.d.ts +2 -2
- package/dist/components/tooltip/components/tooltip_container.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_divider.d.ts +2 -2
- package/dist/components/tooltip/components/tooltip_divider.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_footer.d.ts +2 -2
- package/dist/components/tooltip/components/tooltip_footer.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_header.d.ts +2 -2
- package/dist/components/tooltip/components/tooltip_header.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_metric_row.d.ts +1 -1
- package/dist/components/tooltip/components/tooltip_metric_row.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_table.d.ts +2 -2
- package/dist/components/tooltip/components/tooltip_table.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_table_body.d.ts +2 -2
- package/dist/components/tooltip/components/tooltip_table_body.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_table_cell.d.ts +2 -2
- package/dist/components/tooltip/components/tooltip_table_cell.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_table_footer.d.ts +2 -2
- package/dist/components/tooltip/components/tooltip_table_footer.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_table_header.d.ts +2 -2
- package/dist/components/tooltip/components/tooltip_table_header.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_table_row.d.ts +2 -2
- package/dist/components/tooltip/components/tooltip_table_row.d.ts.map +1 -1
- package/dist/specs/constants.d.ts +1 -1
- package/dist/specs/constants.d.ts.map +1 -1
- package/dist/specs/settings.d.ts +4 -0
- package/dist/specs/settings.d.ts.map +1 -1
- package/dist/specs/settings.js.map +1 -1
- package/dist/state/selectors/get_legend_config_selector.js +2 -1
- package/dist/state/selectors/get_legend_config_selector.js.map +1 -1
- package/dist/state/selectors/get_legend_size.js +14 -8
- package/dist/state/selectors/get_legend_size.js.map +1 -1
- package/dist/state/selectors/get_legend_table_size.d.ts +2 -0
- package/dist/state/selectors/get_legend_table_size.d.ts.map +1 -0
- package/dist/state/selectors/get_legend_table_size.js +79 -0
- package/dist/state/selectors/get_legend_table_size.js.map +1 -0
- package/dist/theme.scss +301 -10
- package/dist/theme_dark.css +1 -1
- package/dist/theme_dark.css.map +1 -1
- package/dist/theme_light.css +1 -1
- package/dist/theme_light.css.map +1 -1
- package/dist/theme_only_dark.css +1 -1
- package/dist/theme_only_dark.css.map +1 -1
- package/dist/theme_only_light.css +1 -1
- package/dist/theme_only_light.css.map +1 -1
- package/package.json +5 -1
- package/dist/chart_types/xy_chart/state/utils/get_last_value.d.ts +0 -2
- package/dist/chart_types/xy_chart/state/utils/get_last_value.d.ts.map +0 -1
- package/dist/chart_types/xy_chart/state/utils/get_last_value.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legend.js","sourceRoot":"","sources":["../../../src/components/legend/legend.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"legend.js","sourceRoot":"","sources":["../../../src/components/legend/legend.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,4DAAoC;AACpC,+CAA2C;AAC3C,6CAAsC;AACtC,iCAAqD;AAErD,mDAA+C;AAC/C,+CAAgE;AAChE,iDAA6C;AAC7C,qDAAgF;AAChF,+CAAmE;AACnE,gDAA4F;AAE5F,uCAAgE;AAChE,uDAAwG;AACxG,uDAKoC;AAEpC,2EAA8E;AAC9E,iGAAgH;AAChH,+GAAgH;AAChH,yHAA0H;AAC1H,iGAA2F;AAC3F,6EAAgF;AAChF,2FAA6F;AAC7F,2EAA8E;AAC9E,+EAAkF;AAClF,mEAAuE;AACvE,+CAAgH;AAEhH,gEAA6D;AAwB7D,SAAS,eAAe,CAAC,KAA6C;;IACpE,MAAM,EACJ,KAAK,EACL,IAAI,EACJ,KAAK,EACL,UAAU,EACV,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,6BAAqB;CAC9B,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,KAAuB,EAAoB,EAAE;IACpE,IAAI,IAAA,6DAAgC,EAAC,KAAK,CAAC,KAAK,uCAAU,CAAC,WAAW,EAAE,CAAC;QACvE,OAAO,mBAAmB,CAAC;IAC7B,CAAC;IACD,MAAM,MAAM,GAAG,IAAA,oDAAuB,EAAC,KAAK,CAAC,CAAC;IAC9C,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;QACvB,OAAO,mBAAmB,CAAC;IAC7B,CAAC;IACD,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,2CAAuB,EAAC,KAAK,CAAC,CAAC;IACjD,OAAO;QACL,KAAK;QACL,UAAU,EAAE,IAAA,gCAAkB,EAAC,KAAK,CAAC;QACrC,eAAe,EAAE,IAAA,yEAAqC,EAAC,KAAK,CAAC;QAC7D,mBAAmB,EAAE,IAAA,mFAA0C,EAAC,KAAK,CAAC;QACtE,UAAU,EAAE,IAAA,uCAAqB,EAAC,KAAK,CAAC;QACxC,IAAI,EAAE,IAAA,uCAAqB,EAAC,KAAK,CAAC;QAClC,KAAK,EAAE,IAAA,yCAAsB,EAAC,KAAK,CAAC;QACpC,WAAW,EAAE,IAAA,sDAA4B,EAAC,KAAK,CAAC;QAChD,MAAM;KACP,CAAC;AACJ,CAAC,CAAC;AAGW,QAAA,MAAM,GAAG,IAAA,qBAAO,EAAC,eAAe,EAAE,kBAAkB,CAAC,CAAC,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend_color_picker.d.ts","sourceRoot":"","sources":["../../../src/components/legend/legend_color_picker.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useLegendColorPicker = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const color_1 = require("./color");
|
|
9
|
+
const useLegendColorPicker = ({ item: { color, isSeriesHidden, label, pointStyle, seriesIdentifiers }, colorPicker: ColorPickerRenderer, clearTemporaryColorsAction, setTemporaryColorAction, setPersistedColorAction, }) => {
|
|
10
|
+
const [isOpen, setIsOpen] = react_1.default.useState(false);
|
|
11
|
+
const colorRef = react_1.default.useRef(null);
|
|
12
|
+
const shouldClearPersistedColor = react_1.default.useRef(false);
|
|
13
|
+
const toggleIsOpen = () => {
|
|
14
|
+
setIsOpen((prevIsOpen) => !prevIsOpen);
|
|
15
|
+
};
|
|
16
|
+
const handleColorClick = (changeable) => changeable
|
|
17
|
+
? (event) => {
|
|
18
|
+
event.stopPropagation();
|
|
19
|
+
toggleIsOpen();
|
|
20
|
+
}
|
|
21
|
+
: undefined;
|
|
22
|
+
const handleColorPickerClose = () => {
|
|
23
|
+
const seriesKeys = seriesIdentifiers.map(({ key }) => key);
|
|
24
|
+
setPersistedColorAction(seriesKeys, shouldClearPersistedColor.current ? null : color);
|
|
25
|
+
clearTemporaryColorsAction();
|
|
26
|
+
requestAnimationFrame(() => { var _a; return (_a = colorRef.current) === null || _a === void 0 ? void 0 : _a.focus(); });
|
|
27
|
+
toggleIsOpen();
|
|
28
|
+
};
|
|
29
|
+
const handleColorPickerChange = (c) => {
|
|
30
|
+
const seriesKeys = seriesIdentifiers.map(({ key }) => key);
|
|
31
|
+
shouldClearPersistedColor.current = c === null;
|
|
32
|
+
setTemporaryColorAction(seriesKeys, c);
|
|
33
|
+
};
|
|
34
|
+
const hasColorPicker = Boolean(ColorPickerRenderer);
|
|
35
|
+
const renderItemColor = () => (react_1.default.createElement(color_1.Color, { ref: colorRef, color: color, seriesName: label, isSeriesHidden: isSeriesHidden, hasColorPicker: hasColorPicker, onClick: handleColorClick(hasColorPicker), pointStyle: pointStyle }));
|
|
36
|
+
const renderColorPickerPopup = () => ColorPickerRenderer &&
|
|
37
|
+
isOpen &&
|
|
38
|
+
colorRef.current && (react_1.default.createElement(ColorPickerRenderer, { anchor: colorRef.current, color: color, onClose: handleColorPickerClose, onChange: handleColorPickerChange, seriesIdentifiers: seriesIdentifiers }));
|
|
39
|
+
return { renderItemColor, renderColorPickerPopup };
|
|
40
|
+
};
|
|
41
|
+
exports.useLegendColorPicker = useLegendColorPicker;
|
|
42
|
+
//# sourceMappingURL=legend_color_picker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend_color_picker.js","sourceRoot":"","sources":["../../../src/components/legend/legend_color_picker.tsx"],"names":[],"mappings":";;;;;;AAQA,kDAA0B;AAE1B,mCAA6C;AAKtC,MAAM,oBAAoB,GAAG,CAAC,EACnC,IAAI,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,EACrE,WAAW,EAAE,mBAAmB,EAChC,0BAA0B,EAC1B,uBAAuB,EACvB,uBAAuB,GACP,EAAE,EAAE;IACpB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,QAAQ,GAAG,eAAK,CAAC,MAAM,CAAoB,IAAI,CAAC,CAAC;IAEvD,MAAM,yBAAyB,GAAG,eAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACtD,MAAM,YAAY,GAAG,GAAG,EAAE;QACxB,SAAS,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC;IACzC,CAAC,CAAC;IACF,MAAM,gBAAgB,GAAG,CAAC,UAAmB,EAAE,EAAE,CAC/C,UAAU;QACR,CAAC,CAAC,CAAC,KAAuB,EAAE,EAAE;YAC1B,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,YAAY,EAAE,CAAC;QACjB,CAAC;QACH,CAAC,CAAC,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xB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,sBAAsB,EAC/B,QAAQ,EAAE,uBAAuB,EACjC,iBAAiB,EAAE,iBAAiB,GACpC,CACH,CAAC;IAEJ,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,CAAC;AACrD,CAAC,CAAC;AAhEW,QAAA,oBAAoB,wBAgE/B"}
|
|
@@ -26,117 +26,62 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.LegendListItem = exports.LEGEND_HIERARCHY_MARGIN = void 0;
|
|
29
|
+
exports.LegendListItem = exports.prepareLegendValues = exports.LEGEND_HIERARCHY_MARGIN = void 0;
|
|
30
30
|
const classnames_1 = __importDefault(require("classnames"));
|
|
31
31
|
const react_1 = __importStar(require("react"));
|
|
32
|
-
const color_1 = require("./color");
|
|
33
32
|
const label_1 = require("./label");
|
|
33
|
+
const legend_color_picker_1 = require("./legend_color_picker");
|
|
34
34
|
const utils_1 = require("./utils");
|
|
35
35
|
const legend_1 = require("../../common/legend");
|
|
36
36
|
const common_1 = require("../../utils/common");
|
|
37
|
-
const fast_deep_equal_1 = require("../../utils/fast_deep_equal");
|
|
38
37
|
exports.LEGEND_HIERARCHY_MARGIN = 10;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
onMouseOver(item.seriesIdentifiers);
|
|
61
|
-
}
|
|
62
|
-
mouseOverAction(item.path);
|
|
63
|
-
};
|
|
64
|
-
this.onLegendItemMouseOut = () => {
|
|
65
|
-
const { onMouseOut, mouseOutAction } = this.props;
|
|
66
|
-
if (onMouseOut) {
|
|
67
|
-
onMouseOut();
|
|
68
|
-
}
|
|
69
|
-
mouseOutAction();
|
|
70
|
-
};
|
|
71
|
-
this.onLabelToggle = (legendItemId) => {
|
|
72
|
-
const { item, onClick, toggleDeselectSeriesAction, totalItems } = this.props;
|
|
73
|
-
if (totalItems <= 1 || (!item.isToggleable && !onClick)) {
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
return (negate) => {
|
|
77
|
-
if (onClick) {
|
|
78
|
-
onClick(legendItemId);
|
|
79
|
-
}
|
|
80
|
-
if (item.isToggleable) {
|
|
81
|
-
toggleDeselectSeriesAction(legendItemId, negate);
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
shouldComponentUpdate(nextProps, nextState) {
|
|
87
|
-
return !(0, fast_deep_equal_1.deepEqual)(this.props, nextProps) || !(0, fast_deep_equal_1.deepEqual)(this.state, nextState);
|
|
88
|
-
}
|
|
89
|
-
renderColorPicker() {
|
|
90
|
-
const { colorPicker: ColorPicker, item, clearTemporaryColorsAction, setTemporaryColorAction, setPersistedColorAction, } = this.props;
|
|
91
|
-
const { seriesIdentifiers, color } = item;
|
|
92
|
-
const seriesKeys = seriesIdentifiers.map(({ key }) => key);
|
|
93
|
-
const handleClose = () => {
|
|
94
|
-
setPersistedColorAction(seriesKeys, this.shouldClearPersistedColor ? null : color);
|
|
95
|
-
clearTemporaryColorsAction();
|
|
96
|
-
requestAnimationFrame(() => { var _a, _b; return (_b = (_a = this.colorRef) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.focus(); });
|
|
97
|
-
this.toggleIsOpen();
|
|
98
|
-
};
|
|
99
|
-
const handleChange = (c) => {
|
|
100
|
-
this.shouldClearPersistedColor = c === null;
|
|
101
|
-
setTemporaryColorAction(seriesKeys, c);
|
|
38
|
+
const prepareLegendValues = (item, legendValues, totalItems, extraValues) => {
|
|
39
|
+
return legendValues.map((legendValue) => {
|
|
40
|
+
if (legendValue === legend_1.LegendValue.Value || legendValue === legend_1.LegendValue.CurrentAndLastValue) {
|
|
41
|
+
return (0, utils_1.getExtra)(extraValues, item, totalItems);
|
|
42
|
+
}
|
|
43
|
+
return item.values.find(({ type }) => type === legendValue);
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
exports.prepareLegendValues = prepareLegendValues;
|
|
47
|
+
const LegendListItem = (props) => {
|
|
48
|
+
const { extraValues, item, legendValues, totalItems, action: Action, positionConfig, labelOptions, isMostlyRTL, flatLegend, onClick, toggleDeselectSeriesAction, hiddenItems, onLegendItemMouseOver, onLegendItemMouseOut, } = props;
|
|
49
|
+
const { color, isSeriesHidden, isItemHidden, seriesIdentifiers, label, depth, path, isToggleable } = item;
|
|
50
|
+
const itemClassNames = (0, classnames_1.default)('echLegendItem', {
|
|
51
|
+
'echLegendItem--hidden': isSeriesHidden,
|
|
52
|
+
'echLegendItem--vertical': positionConfig.direction === common_1.LayoutDirection.Vertical,
|
|
53
|
+
});
|
|
54
|
+
const legendValueItems = (0, exports.prepareLegendValues)(item, legendValues, totalItems, extraValues).filter(common_1.isDefined);
|
|
55
|
+
const style = flatLegend
|
|
56
|
+
? {}
|
|
57
|
+
: {
|
|
58
|
+
[isMostlyRTL ? 'marginRight' : 'marginLeft']: exports.LEGEND_HIERARCHY_MARGIN * (depth !== null && depth !== void 0 ? depth : 0),
|
|
102
59
|
};
|
|
103
|
-
|
|
104
|
-
|
|
60
|
+
const onLabelToggle = (0, react_1.useCallback)((legendItemId) => (negate) => {
|
|
61
|
+
if (totalItems <= 1 || (!isToggleable && !onClick)) {
|
|
62
|
+
return;
|
|
105
63
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
:
|
|
121
|
-
|
|
122
|
-
:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
129
|
-
react_1.default.createElement("li", { className: itemClassNames, onMouseEnter: this.onLegendItemMouseOver, onMouseLeave: this.onLegendItemMouseOut, style: style, dir: isMostlyRTL ? 'rtl' : 'ltr', "data-ech-series-name": label },
|
|
130
|
-
react_1.default.createElement("div", { className: "background" }),
|
|
131
|
-
react_1.default.createElement("div", { className: "colorWrapper" },
|
|
132
|
-
react_1.default.createElement(color_1.Color, { ref: this.colorRef, color: color, seriesName: label, isSeriesHidden: isSeriesHidden, hasColorPicker: hasColorPicker, onClick: this.handleColorClick(hasColorPicker), pointStyle: pointStyle })),
|
|
133
|
-
react_1.default.createElement(label_1.Label, { label: label, options: labelOptions, isToggleable: totalItems > 1 && item.isToggleable, onToggle: this.onLabelToggle(seriesIdentifiers), isSeriesHidden: isSeriesHidden, totalSeriesCount: totalItems, hiddenSeriesCount: hiddenItems }),
|
|
134
|
-
legendValue && !isSeriesHidden && (react_1.default.createElement("div", { className: "echLegendItem__extra", title: `${legendValue.label}` }, legendValue.label)),
|
|
135
|
-
Action && (react_1.default.createElement("div", { className: "echLegendItem__action" },
|
|
136
|
-
react_1.default.createElement(Action, { series: seriesIdentifiers, color: color, label: label })))),
|
|
137
|
-
this.renderColorPicker()));
|
|
138
|
-
}
|
|
139
|
-
}
|
|
64
|
+
if (onClick) {
|
|
65
|
+
onClick(legendItemId);
|
|
66
|
+
}
|
|
67
|
+
if (isToggleable) {
|
|
68
|
+
toggleDeselectSeriesAction(legendItemId, negate);
|
|
69
|
+
}
|
|
70
|
+
}, [onClick, toggleDeselectSeriesAction, isToggleable, totalItems]);
|
|
71
|
+
const { renderItemColor, renderColorPickerPopup } = (0, legend_color_picker_1.useLegendColorPicker)(props);
|
|
72
|
+
if (isItemHidden)
|
|
73
|
+
return null;
|
|
74
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
75
|
+
react_1.default.createElement("li", { className: itemClassNames, onMouseEnter: () => onLegendItemMouseOver(seriesIdentifiers, path), onMouseLeave: onLegendItemMouseOut, style: style, dir: isMostlyRTL ? 'rtl' : 'ltr', "data-ech-series-name": label },
|
|
76
|
+
react_1.default.createElement("div", { className: "background" }),
|
|
77
|
+
react_1.default.createElement("div", { className: "echLegend__colorWrapper" }, renderItemColor()),
|
|
78
|
+
react_1.default.createElement(label_1.Label, { label: label, options: labelOptions, isToggleable: totalItems > 1 && item.isToggleable, onToggle: onLabelToggle(seriesIdentifiers), isSeriesHidden: isSeriesHidden, totalSeriesCount: totalItems, hiddenSeriesCount: hiddenItems }),
|
|
79
|
+
!isSeriesHidden
|
|
80
|
+
? legendValueItems.map((legendValueItem) => legendValueItem.label !== '' ? (react_1.default.createElement("div", { key: legendValueItem.label, className: "echLegendItem__legendValue" }, legendValueItem.label)) : null)
|
|
81
|
+
: null,
|
|
82
|
+
Action && (react_1.default.createElement("div", { className: "echLegendItem__action" },
|
|
83
|
+
react_1.default.createElement(Action, { series: seriesIdentifiers, color: color, label: label })))),
|
|
84
|
+
renderColorPickerPopup()));
|
|
85
|
+
};
|
|
140
86
|
exports.LegendListItem = LegendListItem;
|
|
141
|
-
LegendListItem.displayName = 'LegendItem';
|
|
142
87
|
//# sourceMappingURL=legend_item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legend_item.js","sourceRoot":"","sources":["../../../src/components/legend/legend_item.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,4DAAoC;AACpC,+
|
|
1
|
+
{"version":3,"file":"legend_item.js","sourceRoot":"","sources":["../../../src/components/legend/legend_item.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,4DAAoC;AACpC,+CAA0D;AAE1D,mCAA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K,SAAS,EAAC,yBAAyB,IAAE,eAAe,EAAE,CAAO;YAClE,8BAAC,aAAS,IACR,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,YAAY,EACrB,YAAY,EAAE,UAAU,GAAG,CAAC,IAAI,IAAI,CAAC,YAAY,EACjD,QAAQ,EAAE,aAAa,CAAC,iBAAiB,CAAC,EAC1C,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,UAAU,EAC5B,iBAAiB,EAAE,WAAW,GAC9B;YACD,CAAC,cAAc;gBACd,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,eAAe,EAAE,EAAE,CACvC,eAAe,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,CAC7B,uCAAK,GAAG,EAAE,eAAe,CAAC,KAAK,EAAE,SAAS,EAAC,4BAA4B,IACpE,eAAe,CAAC,KAAK,CAClB,CACP,CAAC,CAAC,CAAC,IAAI,CACT;gBACH,CAAC,CAAC,IAAI;YACP,MAAM,IAAI,CACT,uCAAK,SAAS,EAAC,uBAAuB;gBACpC,8BAAC,MAAM,IAAC,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,GAAI,CAC7D,CACP,CACE;QACJ,sBAAsB,EAAE,CACxB,CACJ,CAAC;AACJ,CAAC,CAAC;AA3FW,QAAA,cAAc,kBA2FzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/legend/legend_table/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LegendTable = void 0;
|
|
4
|
+
var legend_table_1 = require("./legend_table");
|
|
5
|
+
Object.defineProperty(exports, "LegendTable", { enumerable: true, get: function () { return legend_table_1.LegendTable; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/legend/legend_table/index.tsx"],"names":[],"mappings":";;;AAQA,+CAA6C;AAApC,2GAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend_table.d.ts","sourceRoot":"","sources":["../../../../src/components/legend/legend_table/legend_table.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LegendTable = exports.MIN_LABEL_WIDTH = exports.GRID_ACTION_WIDTH = exports.GRID_COLOR_WIDTH = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const legend_table_body_1 = require("./legend_table_body");
|
|
9
|
+
const legend_table_header_1 = require("./legend_table_header");
|
|
10
|
+
const common_1 = require("../../../utils/common");
|
|
11
|
+
exports.GRID_COLOR_WIDTH = 10;
|
|
12
|
+
exports.GRID_ACTION_WIDTH = 26;
|
|
13
|
+
exports.MIN_LABEL_WIDTH = 24;
|
|
14
|
+
function LegendTable({ items, seriesWidth = exports.MIN_LABEL_WIDTH, ...itemProps }) {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
const legendValuesLength = ((_a = items === null || items === void 0 ? void 0 : items[0]) === null || _a === void 0 ? void 0 : _a.values.length) ? `repeat(${(_b = items === null || items === void 0 ? void 0 : items[0]) === null || _b === void 0 ? void 0 : _b.values.length}, auto)` : '';
|
|
17
|
+
const actionComponentWidth = itemProps.action ? `${exports.GRID_ACTION_WIDTH}px` : '';
|
|
18
|
+
const gridTemplateColumns = {
|
|
19
|
+
vertical: `${exports.GRID_COLOR_WIDTH}px minmax(${seriesWidth}px, 1fr) ${legendValuesLength} ${actionComponentWidth}`,
|
|
20
|
+
horizontal: `${exports.GRID_COLOR_WIDTH}px minmax(50%, 1fr) ${legendValuesLength} ${actionComponentWidth}`,
|
|
21
|
+
};
|
|
22
|
+
return (react_1.default.createElement("div", { className: "echLegendTable", role: "table", style: {
|
|
23
|
+
gridTemplateColumns: itemProps.positionConfig.direction === common_1.LayoutDirection.Horizontal
|
|
24
|
+
? gridTemplateColumns.horizontal
|
|
25
|
+
: gridTemplateColumns.vertical,
|
|
26
|
+
} },
|
|
27
|
+
react_1.default.createElement(legend_table_header_1.LegendTableHeader, { isMostlyRTL: itemProps.isMostlyRTL, hasAction: !!itemProps.action, legendValues: itemProps.legendValues, legendTitle: itemProps.legendTitle, labelOptions: itemProps.labelOptions }),
|
|
28
|
+
react_1.default.createElement(legend_table_body_1.LegendTableBody, { items: items, ...itemProps })));
|
|
29
|
+
}
|
|
30
|
+
exports.LegendTable = LegendTable;
|
|
31
|
+
//# sourceMappingURL=legend_table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend_table.js","sourceRoot":"","sources":["../../../../src/components/legend/legend_table/legend_table.tsx"],"names":[],"mappings":";;;;;;AAQA,kDAA0B;AAE1B,2DAAsD;AACtD,+DAA0D;AAE1D,kDAAwD;AAU3C,QAAA,gBAAgB,GAAG,EAAE,CAAC;AAEtB,QAAA,iBAAiB,GAAG,EAAE,CAAC;AAEvB,QAAA,eAAe,GAAG,EAAE,CAAC;AAGlC,SAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,WAAW,GAAG,uBAAe,EAAE,GAAG,SAAS,EAAoB;;IAClG,MAAM,kBAAkB,GAAG,CAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAG,CAAC,CAAC,0CAAE,MAAM,CAAC,MAAM,EAAC,CAAC,CAAC,UAAU,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAG,CAAC,CAAC,0CAAE,MAAM,CAAC,MAAM,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACzG,MAAM,oBAAoB,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,yBAAiB,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9E,MAAM,mBAAmB,GAAG;QAC1B,QAAQ,EAAE,GAAG,wBAAgB,aAAa,WAAW,YAAY,kBAAkB,IAAI,oBAAoB,EAAE;QAC7G,UAAU,EAAE,GAAG,wBAAgB,uBAAuB,kBAAkB,IAAI,oBAAoB,EAAE;KACnG,CAAC;IACF,OAAO,CACL,uCACE,SAAS,EAAC,gBAAgB,EAC1B,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE;YACL,mBAAmB,EACjB,SAAS,CAAC,cAAc,CAAC,SAAS,KAAK,wBAAe,CAAC,UAAU;gBAC/D,CAAC,CAAC,mBAAmB,CAAC,UAAU;gBAChC,CAAC,CAAC,mBAAmB,CAAC,QAAQ;SACnC;QAED,8BAAC,uCAAiB,IAChB,WAAW,EAAE,SAAS,CAAC,WAAW,EAClC,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,EAC7B,YAAY,EAAE,SAAS,CAAC,YAAY,EACpC,WAAW,EAAE,SAAS,CAAC,WAAW,EAClC,YAAY,EAAE,SAAS,CAAC,YAAY,GACpC;QACF,8BAAC,mCAAe,IAAC,KAAK,EAAE,KAAK,KAAM,SAAS,GAAI,CAC5C,CACP,CAAC;AACJ,CAAC;AA5BD,kCA4BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend_table_body.d.ts","sourceRoot":"","sources":["../../../../src/components/legend/legend_table/legend_table_body.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LegendTableBody = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const legend_table_item_1 = require("./legend_table_item");
|
|
9
|
+
const LegendTableBody = ({ items, ...itemProps }) => {
|
|
10
|
+
return (react_1.default.createElement("div", { role: "rowgroup", className: "echLegendTable__rowgroup" }, items.map((item) => (react_1.default.createElement(legend_table_item_1.LegendListItem, { key: `${item.seriesIdentifiers[0].key}`, item: item, ...itemProps })))));
|
|
11
|
+
};
|
|
12
|
+
exports.LegendTableBody = LegendTableBody;
|
|
13
|
+
//# sourceMappingURL=legend_table_body.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend_table_body.js","sourceRoot":"","sources":["../../../../src/components/legend/legend_table/legend_table_body.tsx"],"names":[],"mappings":";;;;;;AAQA,kDAA0B;AAE1B,2DAAqD;AAK9C,MAAM,eAAe,GAA8D,CAAC,EAAE,KAAK,EAAE,GAAG,SAAS,EAAE,EAAE,EAAE;IACpH,OAAO,CACL,uCAAK,IAAI,EAAC,UAAU,EAAC,SAAS,EAAC,0BAA0B,IACtD,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,8BAAC,kCAAc,IAAC,GAAG,EAAE,GAAG,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAE,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,KAAM,SAAS,GAAI,CACxF,CAAC,CACE,CACP,CAAC;AACJ,CAAC,CAAC;AARW,QAAA,eAAe,mBAQ1B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
/** @public */
|
|
3
|
+
export type LegendTableCellProps = PropsWithChildren<{
|
|
4
|
+
truncate?: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
}>;
|
|
7
|
+
/** @public */
|
|
8
|
+
export declare const LegendTableCell: ({ truncate, className, children }: LegendTableCellProps) => React.JSX.Element;
|
|
9
|
+
//# sourceMappingURL=legend_table_cell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend_table_cell.d.ts","sourceRoot":"","sources":["../../../../src/components/legend/legend_table/legend_table_cell.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEjD,cAAc;AACd,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH,cAAc;AACd,eAAO,MAAM,eAAe,sCAA+C,oBAAoB,sBAU9F,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LegendTableCell = void 0;
|
|
7
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const LegendTableCell = ({ truncate = false, className, children }) => {
|
|
10
|
+
const classes = (0, classnames_1.default)('echLegendTable__cell', className, {
|
|
11
|
+
'echLegendTable__cell--truncate': truncate,
|
|
12
|
+
});
|
|
13
|
+
return (react_1.default.createElement("div", { role: "gridcell", className: classes }, children));
|
|
14
|
+
};
|
|
15
|
+
exports.LegendTableCell = LegendTableCell;
|
|
16
|
+
//# sourceMappingURL=legend_table_cell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend_table_cell.js","sourceRoot":"","sources":["../../../../src/components/legend/legend_table/legend_table_cell.tsx"],"names":[],"mappings":";;;;;;AAQA,4DAAoC;AACpC,kDAAiD;AAS1C,MAAM,eAAe,GAAG,CAAC,EAAE,QAAQ,GAAG,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAwB,EAAE,EAAE;IACjG,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,sBAAsB,EAAE,SAAS,EAAE;QAC5D,gCAAgC,EAAE,QAAQ;KAC3C,CAAC,CAAC;IAEH,OAAO,CACL,uCAAK,IAAI,EAAC,UAAU,EAAC,SAAS,EAAE,OAAO,IACpC,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,eAAe,mBAU1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend_table_header.d.ts","sourceRoot":"","sources":["../../../../src/components/legend/legend_table/legend_table_header.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LegendTableHeader = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const legend_table_cell_1 = require("./legend_table_cell");
|
|
9
|
+
const legend_table_row_1 = require("./legend_table_row");
|
|
10
|
+
const legend_value_1 = require("./legend_value");
|
|
11
|
+
const legend_1 = require("../../../common/legend");
|
|
12
|
+
const label_1 = require("../label");
|
|
13
|
+
const LegendTableHeader = ({ hasAction, legendValues, legendTitle = '', isMostlyRTL, labelOptions, }) => {
|
|
14
|
+
return (react_1.default.createElement("div", { role: "rowgroup", className: "echLegendTable__rowgroup echLegendTable__header" },
|
|
15
|
+
react_1.default.createElement(legend_table_row_1.LegendTableRow, { className: "echLegendTable__item echLegendTable__item--vertical", dir: isMostlyRTL ? 'rtl' : 'ltr' },
|
|
16
|
+
react_1.default.createElement(legend_table_cell_1.LegendTableCell, { className: "echLegend__colorWrapper echLegendTable__colorCell" }),
|
|
17
|
+
react_1.default.createElement(legend_table_cell_1.LegendTableCell, null,
|
|
18
|
+
react_1.default.createElement(label_1.NonInteractiveLabel, { label: legendTitle, options: labelOptions })),
|
|
19
|
+
legendValues.map((l) => (react_1.default.createElement(legend_table_cell_1.LegendTableCell, { key: l },
|
|
20
|
+
react_1.default.createElement(legend_value_1.LegendValueComponent, { label: legend_1.legendValueTitlesMap[l] })))),
|
|
21
|
+
hasAction && react_1.default.createElement(legend_table_cell_1.LegendTableCell, null))));
|
|
22
|
+
};
|
|
23
|
+
exports.LegendTableHeader = LegendTableHeader;
|
|
24
|
+
//# sourceMappingURL=legend_table_header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend_table_header.js","sourceRoot":"","sources":["../../../../src/components/legend/legend_table/legend_table_header.tsx"],"names":[],"mappings":";;;;;;AAQA,kDAA0B;AAE1B,2DAAsD;AACtD,yDAAoD;AACpD,iDAAsD;AACtD,mDAA2E;AAE3E,oCAA+C;AASxC,MAAM,iBAAiB,GAAG,CAAC,EAChC,SAAS,EACT,YAAY,EACZ,WAAW,GAAG,EAAE,EAChB,WAAW,EACX,YAAY,GAOb,EAAE,EAAE;IACH,OAAO,CACL,uCAAK,IAAI,EAAC,UAAU,EAAC,SAAS,EAAC,iDAAiD;QAC9E,8BAAC,iCAAc,IAAC,SAAS,EAAC,qDAAqD,EAAC,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK;YAC9G,8BAAC,mCAAe,IAAC,SAAS,EAAC,mDAAmD,GAAmB;YACjG,8BAAC,mCAAe;gBACd,8BAAC,2BAAmB,IAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,GAAI,CAClD;YACjB,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACvB,8BAAC,mCAAe,IAAC,GAAG,EAAE,CAAC;gBACrB,8BAAC,mCAAoB,IAAC,KAAK,EAAE,6BAAoB,CAAC,CAAC,CAAC,GAAI,CACxC,CACnB,CAAC;YACD,SAAS,IAAI,8BAAC,mCAAe,OAAG,CAClB,CACb,CACP,CAAC;AACJ,CAAC,CAAC;AA7BW,QAAA,iBAAiB,qBA6B5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend_table_item.d.ts","sourceRoot":"","sources":["../../../../src/components/legend/legend_table/legend_table_item.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.LegendListItem = void 0;
|
|
30
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
31
|
+
const react_1 = __importStar(require("react"));
|
|
32
|
+
const legend_table_cell_1 = require("./legend_table_cell");
|
|
33
|
+
const legend_table_row_1 = require("./legend_table_row");
|
|
34
|
+
const legend_value_1 = require("./legend_value");
|
|
35
|
+
const common_1 = require("../../../utils/common");
|
|
36
|
+
const label_1 = require("../label");
|
|
37
|
+
const legend_color_picker_1 = require("../legend_color_picker");
|
|
38
|
+
const legend_item_1 = require("../legend_item");
|
|
39
|
+
const LegendListItem = (props) => {
|
|
40
|
+
const { extraValues, item, legendValues, totalItems, action: Action, positionConfig, labelOptions, isMostlyRTL, onClick, toggleDeselectSeriesAction, onLegendItemMouseOver, onLegendItemMouseOut, hiddenItems, } = props;
|
|
41
|
+
const { color, isSeriesHidden, isItemHidden, seriesIdentifiers, label, path, isToggleable } = item;
|
|
42
|
+
const itemClassNames = (0, classnames_1.default)('echLegendTable__item', 'echLegendTable__item--highlightable', {
|
|
43
|
+
'echLegendTable__item--hidden': isSeriesHidden,
|
|
44
|
+
'echLegendTable__item--vertical': positionConfig.direction === common_1.LayoutDirection.Vertical,
|
|
45
|
+
});
|
|
46
|
+
const legendValueItems = (0, legend_item_1.prepareLegendValues)(item, legendValues, totalItems, extraValues);
|
|
47
|
+
const onLabelToggle = (0, react_1.useCallback)((legendItemId) => (negate) => {
|
|
48
|
+
if (totalItems <= 1 || (!isToggleable && !onClick)) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (onClick) {
|
|
52
|
+
onClick(legendItemId);
|
|
53
|
+
}
|
|
54
|
+
if (isToggleable) {
|
|
55
|
+
toggleDeselectSeriesAction(legendItemId, negate);
|
|
56
|
+
}
|
|
57
|
+
}, [onClick, toggleDeselectSeriesAction, isToggleable, totalItems]);
|
|
58
|
+
const { renderItemColor, renderColorPickerPopup } = (0, legend_color_picker_1.useLegendColorPicker)(props);
|
|
59
|
+
if (isItemHidden)
|
|
60
|
+
return null;
|
|
61
|
+
const ActionComponent = Action ? react_1.default.createElement(Action, { series: seriesIdentifiers, color: color, label: label }) : null;
|
|
62
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
63
|
+
react_1.default.createElement(legend_table_row_1.LegendTableRow, { className: itemClassNames, onMouseEnter: () => onLegendItemMouseOver(seriesIdentifiers, path), onMouseLeave: onLegendItemMouseOut, dir: isMostlyRTL ? 'rtl' : 'ltr', "data-ech-series-name": label },
|
|
64
|
+
react_1.default.createElement(legend_table_cell_1.LegendTableCell, { className: "echLegend__colorWrapper echLegendTable__colorCell" }, renderItemColor()),
|
|
65
|
+
react_1.default.createElement(legend_table_cell_1.LegendTableCell, null,
|
|
66
|
+
react_1.default.createElement(label_1.Label, { label: label, options: labelOptions, isToggleable: totalItems > 1 && item.isToggleable, onToggle: onLabelToggle(seriesIdentifiers), isSeriesHidden: isSeriesHidden, totalSeriesCount: totalItems, hiddenSeriesCount: hiddenItems })),
|
|
67
|
+
legendValueItems.map((l, i) => {
|
|
68
|
+
return react_1.default.createElement(legend_table_cell_1.LegendTableCell, { key: (l === null || l === void 0 ? void 0 : l.type) || i }, l && react_1.default.createElement(legend_value_1.LegendValueComponent, { ...l }));
|
|
69
|
+
}),
|
|
70
|
+
ActionComponent && (react_1.default.createElement(legend_table_cell_1.LegendTableCell, null,
|
|
71
|
+
react_1.default.createElement("div", { className: "echLegendItem__action" }, ActionComponent)))),
|
|
72
|
+
renderColorPickerPopup()));
|
|
73
|
+
};
|
|
74
|
+
exports.LegendListItem = LegendListItem;
|
|
75
|
+
//# sourceMappingURL=legend_table_item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend_table_item.js","sourceRoot":"","sources":["../../../../src/components/legend/legend_table/legend_table_item.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AC,mCAAe;gBACd,uCAAK,SAAS,EAAC,uBAAuB,IAAE,eAAe,CAAO,CAC9C,CACnB,CACc;QAChB,sBAAsB,EAAE,CACxB,CACJ,CAAC;AACJ,CAAC,CAAC;AApFW,QAAA,cAAc,kBAoFzB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface LegendTableRowProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
}
|
|
4
|
+
/** @public */
|
|
5
|
+
export declare const LegendTableRow: ({ id, children, className, ...rest }: LegendTableRowProps) => React.JSX.Element;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=legend_table_row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend_table_row.d.ts","sourceRoot":"","sources":["../../../../src/components/legend/legend_table/legend_table_row.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE7E,cAAc;AACd,eAAO,MAAM,cAAc,yCAA0C,mBAAmB,sBAQvF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LegendTableRow = void 0;
|
|
7
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const LegendTableRow = ({ id, children, className, ...rest }) => {
|
|
10
|
+
const classes = (0, classnames_1.default)('echLegendTable__row', className);
|
|
11
|
+
return (react_1.default.createElement("div", { role: "row", id: id, className: classes, ...rest }, children));
|
|
12
|
+
};
|
|
13
|
+
exports.LegendTableRow = LegendTableRow;
|
|
14
|
+
//# sourceMappingURL=legend_table_row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend_table_row.js","sourceRoot":"","sources":["../../../../src/components/legend/legend_table/legend_table_row.tsx"],"names":[],"mappings":";;;;;;AAQA,4DAAoC;AACpC,kDAA0B;AAKnB,MAAM,cAAc,GAAG,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAuB,EAAE,EAAE;IAC1F,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC;IAE7D,OAAO,CACL,uCAAK,IAAI,EAAC,KAAK,EAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,OAAO,KAAM,IAAI,IACjD,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CAAC;AARW,QAAA,cAAc,kBAQzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend_value.d.ts","sourceRoot":"","sources":["../../../../src/components/legend/legend_table/legend_value.tsx"],"names":[],"mappings":""}
|