@ironsource/shared-ui 2.1.12-test.52 → 2.1.12-test.53
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/Chart.vue_vue_type_style_index_0_scoped_3da25a36_lang.css +1 -0
- package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_2f916aeb_lang.css +1 -0
- package/ChartPlane.vue_vue_type_style_index_0_scoped_dd60ff0e_lang.css +1 -0
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_3d0780bb_lang.css +1 -0
- package/ColumnPicker.vue_vue_type_style_index_0_scoped_ea8c7024_lang.css +1 -0
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_bdd6ee48_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_da7631e0_lang.css +1 -0
- package/DataGridHeader.vue_vue_type_style_index_0_scoped_840e700c_lang.css +1 -0
- package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_e38c881a_lang.css +1 -0
- package/DialogFooter.vue_vue_type_style_index_0_scoped_8b7f64fe_lang.css +1 -0
- package/DialogHeader.vue_vue_type_style_index_0_scoped_9a814ec3_lang.css +1 -0
- package/DialogV4.vue_vue_type_style_index_0_scoped_cc99f1e3_lang.css +1 -0
- package/Link.vue_vue_type_style_index_0_scoped_b10e2439_lang.css +1 -0
- package/MultipleDataGrid.vue_vue_type_style_index_0_scoped_3caa1d7b_lang.css +1 -0
- package/OptionChip.vue_vue_type_style_index_0_scoped_538e4a21_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_752a357d_lang.css +1 -0
- package/RadioButton.vue_vue_type_style_index_0_scoped_dac25b9f_lang.css +1 -0
- package/RemoveButton.vue_vue_type_style_index_0_scoped_ca7fc11d_lang.css +1 -0
- package/SortableItem.vue_vue_type_style_index_0_scoped_800cd503_lang.css +1 -0
- package/SortableItemLabel.vue_vue_type_style_index_0_scoped_a534c7af_lang.css +1 -0
- package/SortableList.vue_vue_type_style_index_0_scoped_84dc8525_lang.css +1 -0
- package/TextField.vue_vue_type_style_index_0_scoped_3b7a3661_lang.css +1 -0
- package/TooltipHeader.vue_vue_type_style_index_0_scoped_da3532aa_lang.css +1 -0
- package/TooltipV4.vue_vue_type_style_index_0_scoped_8a451e54_lang.css +1 -0
- package/TooltipV4.vue_vue_type_style_index_1_lang.css +1 -1
- package/components/chart/Chart.vue.d.ts +16 -1
- package/components/chart/Chart.vue.js +4 -4
- package/components/chart/Chart.vue2.js +38 -32
- package/components/chart/ChartHeaderTrend.vue.js +2 -2
- package/components/chart/ChartHeaderTrend.vue2.js +34 -33
- package/components/chart/ChartPlane.vue.d.ts +10 -0
- package/components/chart/ChartPlane.vue.js +4 -4
- package/components/chart/ChartPlane.vue2.js +158 -147
- package/components/chart/ChartStoryArgs.d.ts +17 -0
- package/components/chart/ChartTooltip.vue.js +2 -2
- package/components/chart/ChartTooltip.vue2.js +6 -6
- package/components/chart/TooltipHeader.vue.js +3 -3
- package/components/chart/TooltipHeader.vue2.js +25 -26
- package/components/chart/colorPalette.d.ts +2 -1
- package/components/chart/colorPalette.js +47 -33
- package/components/chart/composables/useColorsMap.d.ts +3 -1
- package/components/chart/composables/useColorsMap.js +32 -30
- package/components/chart/consts.d.ts +5 -1
- package/components/chart/consts.js +30 -26
- package/components/chart/index.d.ts +58 -1
- package/components/chart/mockData.d.ts +15 -0
- package/components/chart/types.d.ts +3 -1
- package/components/chart/types.js +5 -5
- package/components/chart/utils/utils.d.ts +1 -1
- package/components/chart/utils/utils.js +18 -13
- package/components/columnPicker/ColumnPicker.vue.d.ts +119 -0
- package/components/columnPicker/ColumnPicker.vue.js +7 -0
- package/components/columnPicker/ColumnPicker.vue2.js +322 -0
- package/components/columnPicker/OptionChip.vue.d.ts +53 -0
- package/components/columnPicker/OptionChip.vue.js +7 -0
- package/components/columnPicker/OptionChip.vue2.js +46 -0
- package/components/columnPicker/RemoveButton.vue.d.ts +38 -0
- package/components/columnPicker/RemoveButton.vue.js +7 -0
- package/components/columnPicker/RemoveButton.vue2.js +35 -0
- package/components/columnPicker/index.d.ts +388 -0
- package/components/columnPicker/index.js +6 -0
- package/components/columnPicker/mockData.d.ts +8 -0
- package/components/dialog/v3/Dialog.vue.d.ts +3 -3
- package/components/dialog/v3/index.d.ts +46 -46
- package/components/dialog/v4/DialogFooter.vue.d.ts +78 -0
- package/components/dialog/v4/DialogFooter.vue.js +7 -0
- package/components/dialog/v4/DialogFooter.vue2.js +60 -0
- package/components/dialog/v4/DialogHeader.vue.d.ts +60 -0
- package/components/dialog/v4/DialogHeader.vue.js +7 -0
- package/components/dialog/v4/DialogHeader.vue2.js +58 -0
- package/components/dialog/v4/DialogV4.vue.d.ts +9 -9
- package/components/dialog/v4/DialogV4.vue.js +3 -3
- package/components/dialog/v4/DialogV4.vue2.js +65 -107
- package/components/dialog/v4/index.d.ts +157 -157
- package/components/dropdown/v3/Dropdown.vue.d.ts +1 -1
- package/components/dropdown/v3/index.d.ts +20 -20
- package/components/dropdown/v4/ConditionalDropdown.vue.js +4 -4
- package/components/dropdown/v4/ConditionalDropdown.vue2.js +176 -171
- package/components/dropdown/v4/OptionV4.vue.d.ts +5 -0
- package/components/dropdown/v4/OptionV4.vue.js +3 -3
- package/components/dropdown/v4/OptionV4.vue2.js +83 -70
- package/components/dropdown/v4/index.d.ts +20 -1
- package/components/includeExclude/IncludeExcludeChipFilter.vue.d.ts +1 -1
- package/components/includeExclude/IncludeExcludeOption.vue.d.ts +1 -1
- package/components/includeExclude/IncludeExcludeOptionDraggable.vue.d.ts +1 -1
- package/components/includeExclude/index.d.ts +70 -70
- package/components/input/v4/TextField.vue.d.ts +12 -0
- package/components/input/v4/TextField.vue.js +3 -3
- package/components/input/v4/TextField.vue2.js +129 -105
- package/components/input/v4/index.d.ts +46 -2
- package/components/link/Link.vue.d.ts +20 -0
- package/components/link/Link.vue.js +2 -2
- package/components/link/Link.vue2.js +35 -21
- package/components/link/index.d.ts +77 -1
- package/components/radioButton/v3/RadioButton.vue.d.ts +5 -0
- package/components/radioButton/v3/RadioButton.vue.js +3 -3
- package/components/radioButton/v3/RadioButton.vue2.js +42 -39
- package/components/radioButton/v3/index.d.ts +20 -1
- package/components/sortableList/SortableItem.vue.d.ts +17 -2
- package/components/sortableList/SortableItem.vue.js +3 -3
- package/components/sortableList/SortableItem.vue2.js +86 -70
- package/components/sortableList/SortableItemLabel.vue.js +3 -3
- package/components/sortableList/SortableItemLabel.vue2.js +26 -23
- package/components/sortableList/SortableList.types.d.ts +1 -0
- package/components/sortableList/SortableList.vue.d.ts +10 -0
- package/components/sortableList/SortableList.vue.js +3 -3
- package/components/sortableList/SortableList.vue2.js +104 -96
- package/components/sortableList/composables/useHoverEffect.js +1 -1
- package/components/sortableList/index.d.ts +39 -1
- package/components/table/v4/DataGrid.vue.d.ts +4 -4
- package/components/table/v4/DataGrid.vue.js +3 -3
- package/components/table/v4/DataGrid.vue2.js +237 -245
- package/components/table/v4/DataGridHeader.vue.d.ts +85 -0
- package/components/table/v4/DataGridHeader.vue.js +7 -0
- package/components/table/v4/DataGridHeader.vue2.js +82 -0
- package/components/table/v4/DataGridRowsCounter.vue.js +3 -3
- package/components/table/v4/DataGridRowsCounter.vue2.js +12 -12
- package/components/table/v4/MultipleDataGrid.vue.d.ts +6 -5
- package/components/table/v4/MultipleDataGrid.vue.js +2 -2
- package/components/table/v4/MultipleDataGrid.vue2.js +91 -90
- package/components/table/v4/index.d.ts +552 -305
- package/components/table/v4/index.js +7 -4
- package/components/table/v4/storyUtils.d.ts +25 -0
- package/components/tooltip/v4/TooltipV4.vue.d.ts +5 -0
- package/components/tooltip/v4/TooltipV4.vue.js +2 -2
- package/components/tooltip/v4/TooltipV4.vue2.js +18 -17
- package/components/tooltip/v4/index.d.ts +20 -1
- package/index.d.ts +2153 -1419
- package/index.js +99 -95
- package/package.json +5 -1
- package/testids/index.d.ts +7 -1
- package/testids/index.js +26 -25
- package/utils/date.js +3 -3
- package/utils/formatNumbers.d.ts +1 -1
- package/utils/formatNumbers.js +38 -21
- package/Chart.vue_vue_type_style_index_0_scoped_e8f25a03_lang.css +0 -1
- package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_db8a902c_lang.css +0 -1
- package/ChartPlane.vue_vue_type_style_index_0_scoped_4f67d41d_lang.css +0 -1
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_3315b68f_lang.css +0 -1
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_f5204c04_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_8e8df067_lang.css +0 -1
- package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_ef699ec5_lang.css +0 -1
- package/DialogV4.vue_vue_type_style_index_0_scoped_eb226e31_lang.css +0 -1
- package/Link.vue_vue_type_style_index_0_scoped_ad98fe7b_lang.css +0 -1
- package/MultipleDataGrid.vue_vue_type_style_index_0_scoped_020a9896_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_0287cebf_lang.css +0 -1
- package/RadioButton.vue_vue_type_style_index_0_scoped_3c6b715c_lang.css +0 -1
- package/SortableItem.vue_vue_type_style_index_0_scoped_48542664_lang.css +0 -1
- package/SortableItemLabel.vue_vue_type_style_index_0_scoped_f2ced2f4_lang.css +0 -1
- package/SortableList.vue_vue_type_style_index_0_scoped_8f267f88_lang.css +0 -1
- package/TextField.vue_vue_type_style_index_0_scoped_fce3948c_lang.css +0 -1
- package/TooltipHeader.vue_vue_type_style_index_0_scoped_5160f12d_lang.css +0 -1
- package/TooltipV4.vue_vue_type_style_index_0_scoped_bcb40ed4_lang.css +0 -1
|
@@ -43,6 +43,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
43
43
|
colorsMap: Record<string, string>;
|
|
44
44
|
valueSuffix?: string;
|
|
45
45
|
valuePrefix?: string;
|
|
46
|
+
indicateIncompleteData?: boolean;
|
|
47
|
+
tooltipExcludeTotalItem?: boolean;
|
|
46
48
|
}>, {
|
|
47
49
|
chartType: ChartType;
|
|
48
50
|
dataSets: () => any[];
|
|
@@ -79,6 +81,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
79
81
|
colorsMap: () => {};
|
|
80
82
|
valueSuffix: string;
|
|
81
83
|
valuePrefix: string;
|
|
84
|
+
indicateIncompleteData: boolean;
|
|
85
|
+
tooltipExcludeTotalItem: boolean;
|
|
82
86
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
83
87
|
"update:chartType": (chartType: ChartType) => void;
|
|
84
88
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
@@ -124,6 +128,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
124
128
|
colorsMap: Record<string, string>;
|
|
125
129
|
valueSuffix?: string;
|
|
126
130
|
valuePrefix?: string;
|
|
131
|
+
indicateIncompleteData?: boolean;
|
|
132
|
+
tooltipExcludeTotalItem?: boolean;
|
|
127
133
|
}>, {
|
|
128
134
|
chartType: ChartType;
|
|
129
135
|
dataSets: () => any[];
|
|
@@ -160,6 +166,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
160
166
|
colorsMap: () => {};
|
|
161
167
|
valueSuffix: string;
|
|
162
168
|
valuePrefix: string;
|
|
169
|
+
indicateIncompleteData: boolean;
|
|
170
|
+
tooltipExcludeTotalItem: boolean;
|
|
163
171
|
}>>> & {
|
|
164
172
|
"onUpdate:chartType"?: (chartType: ChartType) => any;
|
|
165
173
|
}, {
|
|
@@ -198,6 +206,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
198
206
|
tooltipTotalCalcFn: (values: number[], totalType: TotalType) => number;
|
|
199
207
|
tooltipOrder: TooltipOrder;
|
|
200
208
|
colorsMap: Record<string, string>;
|
|
209
|
+
indicateIncompleteData: boolean;
|
|
210
|
+
tooltipExcludeTotalItem: boolean;
|
|
201
211
|
}>, {
|
|
202
212
|
"subheader-tooltip"?(_: {}): any;
|
|
203
213
|
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../ChartPlane.
|
|
4
|
-
const a = /* @__PURE__ */ e
|
|
1
|
+
import e from "./ChartPlane.vue2.js";
|
|
2
|
+
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../ChartPlane.vue_vue_type_style_index_0_scoped_dd60ff0e_lang.css"; //*');
|
|
4
|
+
const a = /* @__PURE__ */ o(e, [["__scopeId", "data-v-dd60ff0e"]]);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import "../../ChartPlane.
|
|
2
|
-
import { Chart as
|
|
3
|
-
import { HoverVerticalLine as
|
|
4
|
-
import { prepareTickLabel as
|
|
5
|
-
import { DEFAULT_TICK_COUNT as
|
|
6
|
-
import { ChartType as
|
|
7
|
-
import { useTooltipPosition as
|
|
8
|
-
import
|
|
1
|
+
import "../../ChartPlane.vue_vue_type_style_index_0_scoped_dd60ff0e_lang.css"; import { defineComponent as re, useCssVars as ie, unref as s, computed as i, ref as S, onMounted as ne, watch as T, nextTick as se, openBlock as p, createElementBlock as E, createVNode as de, isRef as ce, createSlots as ue, withCtx as fe, renderSlot as pe, createCommentVNode as L, createElementVNode as R, normalizeStyle as he, createBlock as D } from "vue";
|
|
2
|
+
import { Chart as V, ArcElement as me, LineElement as ve, BarElement as Te, PointElement as ye, LineController as Ce, BarController as ge, PieController as be, ScatterController as xe, CategoryScale as Ae, LinearScale as ke, Filler as Se, Tooltip as Ee } from "chart.js";
|
|
3
|
+
import { HoverVerticalLine as Le } from "./plugins/HoverVerticalLine.js";
|
|
4
|
+
import { prepareTickLabel as Re, formatValue as De } from "./utils/utils.js";
|
|
5
|
+
import { DEFAULT_TICK_COUNT as Be, TOTALS_HELPER_KEY as F, LINE_DASH_STYLE as Ie, BASE_COLOR_KEY as _, CHART_PADDING as Oe, POINT_BORDER_COLOR as Ne, TICK_LABEL_COLOR as M, TICK_LABEL_FONT as Y, TICKS_EXTRA_PADDING as Pe, GRID_LINE_COLOR as K, HEADER_HEIGHT as He, COMPACT_HEADER_HEIGHT as we, HOVER_AREA_TRANSPARENCY as Ve, HOVER_TRANSPARENCY as y, CHART_ITEM_TRANSPARENCY as Fe, INCOMPLETE_DATA_BAR_TRANSPARENCY as _e, STACKED_LINE_TRANSPARENCY as Me } from "./consts.js";
|
|
6
|
+
import { ChartType as d, DateInterval as Ye, TooltipOrder as U, TrendDirection as Ke } from "./types.js";
|
|
7
|
+
import { useTooltipPosition as Ue } from "./composables/useTooltipPosition.js";
|
|
8
|
+
import Ge from "./ChartTooltip.vue.js";
|
|
9
9
|
import { hexColorToRgba as h } from "../../utils/color.js";
|
|
10
|
-
import
|
|
11
|
-
import { useMemoize as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { DEFAULT_CHART_COLOR as
|
|
15
|
-
import { TotalType as
|
|
16
|
-
import { isNullOrUndefined as
|
|
17
|
-
import { storeOriginalDatasetColors as
|
|
18
|
-
const
|
|
10
|
+
import $e from "./ChartHeader.vue.js";
|
|
11
|
+
import { useMemoize as ze, useVModel as We } from "@vueuse/core";
|
|
12
|
+
import Ze from "../emptyState/v4/EmptyStateV4.vue.js";
|
|
13
|
+
import Xe from "./ChartLoader.vue.js";
|
|
14
|
+
import { DEFAULT_CHART_COLOR as je } from "./colorPalette.js";
|
|
15
|
+
import { TotalType as G, calculateTotal as qe } from "../../utils/totals.js";
|
|
16
|
+
import { isNullOrUndefined as Je } from "../../utils/utils.js";
|
|
17
|
+
import { storeOriginalDatasetColors as Qe, restoreOriginalDatasetColors as et } from "./utils/highlightUtils.js";
|
|
18
|
+
const tt = { class: "chart-plane-container" }, at = {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: "header-wrapper"
|
|
21
|
-
},
|
|
21
|
+
}, ot = {
|
|
22
22
|
key: 1,
|
|
23
23
|
class: "chart-plane"
|
|
24
|
-
},
|
|
24
|
+
}, lt = { class: "chart" }, xt = /* @__PURE__ */ re({
|
|
25
25
|
__name: "ChartPlane",
|
|
26
26
|
props: {
|
|
27
27
|
dataSets: { default: () => [] },
|
|
28
28
|
visibleIds: { default: () => [] },
|
|
29
29
|
highlightedId: { default: null },
|
|
30
|
-
chartType: { default:
|
|
30
|
+
chartType: { default: d.Line },
|
|
31
31
|
parsing: { default: void 0 },
|
|
32
32
|
xAxisFormat: { default: "string" },
|
|
33
33
|
yAxisFormat: { default: "number" },
|
|
34
|
-
xAxisDateInterval: { default:
|
|
35
|
-
tickCount: { default:
|
|
34
|
+
xAxisDateInterval: { default: Ye.DAILY },
|
|
35
|
+
tickCount: { default: Be },
|
|
36
36
|
truncateTickLabels: { type: Boolean, default: !1 },
|
|
37
37
|
header: { default: "" },
|
|
38
38
|
subheader: { default: "" },
|
|
@@ -49,85 +49,94 @@ const Ze = { class: "chart-plane-container" }, Xe = {
|
|
|
49
49
|
compactHeader: { type: Boolean, default: !1 },
|
|
50
50
|
noteText: { default: "" },
|
|
51
51
|
tooltipRespectsTopEdge: { type: Boolean, default: !0 },
|
|
52
|
-
tooltipTotalType: { default:
|
|
53
|
-
tooltipTotalCalcFn: { type: Function, default:
|
|
54
|
-
tooltipOrder: { default:
|
|
52
|
+
tooltipTotalType: { default: G.Total },
|
|
53
|
+
tooltipTotalCalcFn: { type: Function, default: qe },
|
|
54
|
+
tooltipOrder: { default: U.Legend },
|
|
55
55
|
trendValue: { default: null },
|
|
56
|
-
trendDirection: { default:
|
|
56
|
+
trendDirection: { default: Ke.UP },
|
|
57
57
|
trendTooltip: { default: null },
|
|
58
58
|
totalsChart: { type: Boolean, default: !1 },
|
|
59
59
|
colorsMap: { default: () => ({}) },
|
|
60
60
|
valueSuffix: { default: "" },
|
|
61
|
-
valuePrefix: { default: "" }
|
|
61
|
+
valuePrefix: { default: "" },
|
|
62
|
+
indicateIncompleteData: { type: Boolean, default: !1 },
|
|
63
|
+
tooltipExcludeTotalItem: { type: Boolean, default: !1 }
|
|
62
64
|
},
|
|
63
65
|
emits: ["update:chartType"],
|
|
64
|
-
setup(o, { emit:
|
|
66
|
+
setup(o, { emit: $ }) {
|
|
65
67
|
const e = o;
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
|
|
68
|
+
ie((t) => ({
|
|
69
|
+
"53e851a1": s(ae),
|
|
70
|
+
"45a8c08c": o.height
|
|
69
71
|
}));
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
fe,
|
|
73
|
-
pe,
|
|
74
|
-
he,
|
|
72
|
+
const z = ze(Re);
|
|
73
|
+
V.register(
|
|
75
74
|
me,
|
|
76
75
|
ve,
|
|
77
|
-
ye,
|
|
78
76
|
Te,
|
|
77
|
+
ye,
|
|
79
78
|
Ce,
|
|
80
|
-
be,
|
|
81
79
|
ge,
|
|
80
|
+
be,
|
|
82
81
|
xe,
|
|
82
|
+
Ae,
|
|
83
83
|
ke,
|
|
84
|
-
|
|
84
|
+
Se,
|
|
85
|
+
Ee,
|
|
86
|
+
Le
|
|
85
87
|
);
|
|
86
|
-
const
|
|
88
|
+
const C = We(e, "chartType", $), W = i(
|
|
87
89
|
() => e.withAnimation ? "" : "none"
|
|
88
|
-
),
|
|
90
|
+
), v = S(null);
|
|
89
91
|
let n = null;
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
},
|
|
93
|
-
n && (n.data.datasets =
|
|
92
|
+
const B = i(() => e.empty || e.dataSets.length === 0), u = i(() => !e.loading && !B.value), g = () => {
|
|
93
|
+
v.value && (n && n.destroy(), n = new V(v.value, N.value));
|
|
94
|
+
}, Z = () => {
|
|
95
|
+
n && (n.data.datasets = O.value, n.options = N.value.options, n.update(W.value));
|
|
94
96
|
};
|
|
95
|
-
|
|
96
|
-
t && (await
|
|
97
|
-
}),
|
|
97
|
+
ne(g), T(() => e.chartType, g), T(u, async (t) => {
|
|
98
|
+
t && (await se(), g());
|
|
99
|
+
}), T(
|
|
98
100
|
[
|
|
99
101
|
() => e.visibleIds,
|
|
100
102
|
() => e.dataSets,
|
|
101
103
|
() => e.valuePrefix,
|
|
102
104
|
() => e.valueSuffix
|
|
103
105
|
],
|
|
104
|
-
|
|
106
|
+
Z
|
|
105
107
|
);
|
|
106
|
-
const f =
|
|
107
|
-
() => e.chartType ===
|
|
108
|
-
),
|
|
109
|
-
() => e.chartType ===
|
|
110
|
-
),
|
|
108
|
+
const f = i(() => e.totalsChart), b = i(
|
|
109
|
+
() => e.chartType === d.StackedLine || e.chartType === d.StackedBar || f.value
|
|
110
|
+
), x = i(
|
|
111
|
+
() => e.chartType === d.Line || e.chartType === d.StackedLine
|
|
112
|
+
), X = i(() => f.value && !e.parsing.xAxisKey ? { ...e.parsing, xAxisKey: F } : e.parsing), j = i(() => f.value ? e.dataSets.map((t) => ({
|
|
111
113
|
...t,
|
|
112
|
-
data: t.data.map((
|
|
113
|
-
...
|
|
114
|
-
[
|
|
114
|
+
data: t.data.map((r) => ({
|
|
115
|
+
...r,
|
|
116
|
+
[F]: t.label
|
|
115
117
|
}))
|
|
116
|
-
})) : e.dataSets),
|
|
117
|
-
() =>
|
|
118
|
-
),
|
|
119
|
-
() =>
|
|
118
|
+
})) : e.dataSets), A = i(
|
|
119
|
+
() => j.value.filter((t) => e.visibleIds.includes(t.id))
|
|
120
|
+
), q = (t) => e.colorsMap[t] || je, I = i(
|
|
121
|
+
() => A.value.length && A.value.every(
|
|
120
122
|
(t) => t.data.length === 1
|
|
121
123
|
)
|
|
122
|
-
),
|
|
123
|
-
const a =
|
|
124
|
+
), J = (t) => (r) => {
|
|
125
|
+
const a = r.chart.data.labels.length - 1;
|
|
126
|
+
let l = Fe;
|
|
127
|
+
return e.chartType === d.Bar && e.indicateIncompleteData && r.index === a ? l = _e : e.chartType === d.StackedLine && (l = Me), h(t, l);
|
|
128
|
+
}, O = i(() => A.value.map((t, r) => {
|
|
129
|
+
const a = q(t.id), l = b.value ? r !== 0 ? "-1" : "start" : void 0, m = e.indicateIncompleteData ? {
|
|
130
|
+
borderDash: (w) => {
|
|
131
|
+
if (w.p1DataIndex === w.chart.data.labels.length - 1)
|
|
132
|
+
return Ie;
|
|
133
|
+
}
|
|
134
|
+
} : void 0, k = J(a);
|
|
124
135
|
return {
|
|
125
136
|
...t,
|
|
126
|
-
fill:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
e.chartType === u.StackedLine ? 10 : 70
|
|
130
|
-
),
|
|
137
|
+
fill: l,
|
|
138
|
+
segment: m,
|
|
139
|
+
backgroundColor: k,
|
|
131
140
|
borderColor: a,
|
|
132
141
|
pointBackgroundColor: a,
|
|
133
142
|
pointHoverBorderColor: a,
|
|
@@ -136,20 +145,22 @@ const Ze = { class: "chart-plane-container" }, Xe = {
|
|
|
136
145
|
// draw a bit outside the chart area
|
|
137
146
|
icon: t.icon || null,
|
|
138
147
|
iconType: t.iconType || "branded",
|
|
139
|
-
[
|
|
148
|
+
[_]: a
|
|
140
149
|
// store base color for later use
|
|
141
150
|
};
|
|
142
|
-
})),
|
|
143
|
-
() => e.tooltipTotalType ===
|
|
144
|
-
),
|
|
145
|
-
|
|
151
|
+
})), Q = i(
|
|
152
|
+
() => e.tooltipTotalType === G.Total ? "Total" : "Mean"
|
|
153
|
+
), ee = (t) => t.filter(
|
|
154
|
+
(r) => !r.dataset.isTotal
|
|
155
|
+
), N = i(() => ({
|
|
156
|
+
type: e.chartType == d.Bar || e.chartType === d.StackedBar ? "bar" : "line",
|
|
146
157
|
// Chart Data
|
|
147
158
|
data: {
|
|
148
|
-
datasets:
|
|
159
|
+
datasets: O.value
|
|
149
160
|
},
|
|
150
161
|
// Chart Options
|
|
151
162
|
options: {
|
|
152
|
-
parsing:
|
|
163
|
+
parsing: X.value,
|
|
153
164
|
interaction: {
|
|
154
165
|
intersect: !1,
|
|
155
166
|
mode: f.value ? "point" : "index",
|
|
@@ -159,27 +170,27 @@ const Ze = { class: "chart-plane-container" }, Xe = {
|
|
|
159
170
|
plugins: {
|
|
160
171
|
legend: { display: !1 },
|
|
161
172
|
title: { display: !1 },
|
|
162
|
-
hoverVerticalLine:
|
|
173
|
+
hoverVerticalLine: x.value,
|
|
163
174
|
// tooltip
|
|
164
175
|
tooltip: {
|
|
165
176
|
enabled: !1,
|
|
166
177
|
position: "average",
|
|
167
178
|
external: ({ tooltip: t }) => {
|
|
168
|
-
|
|
179
|
+
c.value = { ...t };
|
|
169
180
|
},
|
|
170
181
|
callbacks: {
|
|
171
182
|
footer: (t) => {
|
|
172
|
-
const
|
|
173
|
-
|
|
183
|
+
const a = (e.tooltipExcludeTotalItem && t.length > 1 ? ee(t) : t).map((m) => m.parsed.y || 0), l = e.tooltipTotalCalcFn(
|
|
184
|
+
a,
|
|
174
185
|
e.tooltipTotalType
|
|
175
186
|
);
|
|
176
|
-
return [
|
|
187
|
+
return [Q.value, String(l)];
|
|
177
188
|
}
|
|
178
189
|
},
|
|
179
|
-
itemSort: (t,
|
|
180
|
-
if (e.tooltipOrder ===
|
|
181
|
-
const a = t.parsed.y || 0,
|
|
182
|
-
return a ===
|
|
190
|
+
itemSort: (t, r) => {
|
|
191
|
+
if (e.tooltipOrder === U.YAxis) {
|
|
192
|
+
const a = t.parsed.y || 0, l = r.parsed.y || 0;
|
|
193
|
+
return a === l ? 0 : a > l ? -1 : 1;
|
|
183
194
|
}
|
|
184
195
|
return 0;
|
|
185
196
|
}
|
|
@@ -189,21 +200,21 @@ const Ze = { class: "chart-plane-container" }, Xe = {
|
|
|
189
200
|
responsive: !0,
|
|
190
201
|
maintainAspectRatio: !1,
|
|
191
202
|
layout: {
|
|
192
|
-
padding:
|
|
203
|
+
padding: Oe
|
|
193
204
|
},
|
|
194
205
|
// basic styles
|
|
195
206
|
elements: {
|
|
196
207
|
line: {
|
|
197
208
|
borderWidth: 2,
|
|
198
|
-
tension: 0
|
|
209
|
+
tension: 0
|
|
199
210
|
},
|
|
200
211
|
point: {
|
|
201
|
-
radius:
|
|
212
|
+
radius: I.value ? 3 : 1,
|
|
202
213
|
hitRadius: 8,
|
|
203
214
|
borderWidth: 0,
|
|
204
215
|
hoverRadius: 4,
|
|
205
216
|
hoverBorderWidth: 2,
|
|
206
|
-
pointHoverBackgroundColor:
|
|
217
|
+
pointHoverBackgroundColor: Ne
|
|
207
218
|
},
|
|
208
219
|
bar: {
|
|
209
220
|
borderRadius: 4
|
|
@@ -213,24 +224,24 @@ const Ze = { class: "chart-plane-container" }, Xe = {
|
|
|
213
224
|
// Horizontal Axis (X)
|
|
214
225
|
x: {
|
|
215
226
|
beginAtZero: !0,
|
|
216
|
-
offset: !
|
|
227
|
+
offset: !x.value || I.value,
|
|
217
228
|
border: { display: !1 },
|
|
218
229
|
stacked: b.value,
|
|
219
230
|
// stack on top of each other
|
|
220
231
|
// ticks
|
|
221
232
|
ticks: {
|
|
222
|
-
color:
|
|
223
|
-
font:
|
|
233
|
+
color: M,
|
|
234
|
+
font: Y,
|
|
224
235
|
padding: 4,
|
|
225
236
|
maxRotation: 0,
|
|
226
237
|
autoSkip: !e.truncateTickLabels,
|
|
227
238
|
autoSkipPadding: 8,
|
|
228
|
-
callback: function(t,
|
|
229
|
-
const
|
|
230
|
-
return
|
|
231
|
-
label:
|
|
239
|
+
callback: function(t, r, a) {
|
|
240
|
+
const l = this.getLabelForValue(t), m = x.value && !f.value ? a.length - 1 : a.length, k = this.chart.scales?.x?.width / m - Pe;
|
|
241
|
+
return z({
|
|
242
|
+
label: l,
|
|
232
243
|
format: e.xAxisFormat,
|
|
233
|
-
availableSpace:
|
|
244
|
+
availableSpace: k,
|
|
234
245
|
truncate: e.truncateTickLabels
|
|
235
246
|
});
|
|
236
247
|
}
|
|
@@ -253,12 +264,12 @@ const Ze = { class: "chart-plane-container" }, Xe = {
|
|
|
253
264
|
// stack on top of each other
|
|
254
265
|
// ticks
|
|
255
266
|
ticks: {
|
|
256
|
-
color:
|
|
257
|
-
font:
|
|
267
|
+
color: M,
|
|
268
|
+
font: Y,
|
|
258
269
|
count: e.tickCount + 1,
|
|
259
270
|
padding: 8,
|
|
260
271
|
min: 0,
|
|
261
|
-
callback: (t) => e.valuePrefix +
|
|
272
|
+
callback: (t) => e.valuePrefix + De(t, e.yAxisFormat) + e.valueSuffix
|
|
262
273
|
},
|
|
263
274
|
// grid lines
|
|
264
275
|
grid: {
|
|
@@ -269,102 +280,102 @@ const Ze = { class: "chart-plane-container" }, Xe = {
|
|
|
269
280
|
}
|
|
270
281
|
}
|
|
271
282
|
}
|
|
272
|
-
})),
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
283
|
+
})), P = S(null), c = S(null), { position: H } = Ue(
|
|
284
|
+
v,
|
|
285
|
+
P,
|
|
286
|
+
c,
|
|
276
287
|
e.tooltipRespectsTopEdge
|
|
277
|
-
),
|
|
288
|
+
), te = i(() => ({
|
|
278
289
|
left: `${H.value.left}px`,
|
|
279
290
|
top: `${H.value.top}px`,
|
|
280
|
-
opacity:
|
|
281
|
-
})),
|
|
282
|
-
() => (e.compactHeader ?
|
|
291
|
+
opacity: c.value?.opacity || 0
|
|
292
|
+
})), ae = i(
|
|
293
|
+
() => (e.compactHeader ? we : He) + "px"
|
|
283
294
|
);
|
|
284
|
-
|
|
295
|
+
T(
|
|
285
296
|
() => e.highlightedId,
|
|
286
297
|
(t) => {
|
|
287
|
-
n && (
|
|
298
|
+
n && (Je(t) ? le() : oe(t), n.update());
|
|
288
299
|
}
|
|
289
300
|
);
|
|
290
|
-
const
|
|
301
|
+
const oe = (t) => {
|
|
291
302
|
(n?.data.datasets || []).forEach((a) => {
|
|
292
|
-
|
|
293
|
-
const
|
|
294
|
-
a.id === t ? e.chartType ===
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
)) : (a.backgroundColor = h(
|
|
303
|
+
Qe(a);
|
|
304
|
+
const l = a[_];
|
|
305
|
+
a.id === t ? e.chartType === d.StackedLine && (a.backgroundColor = h(
|
|
306
|
+
l,
|
|
307
|
+
Ve
|
|
308
|
+
)) : (a.backgroundColor = h(l, y), a.borderColor = h(l, y), a.pointBackgroundColor = h(l, y), a.pointHoverBorderColor = h(l, y));
|
|
298
309
|
});
|
|
299
|
-
},
|
|
300
|
-
(n?.data.datasets || []).forEach(
|
|
310
|
+
}, le = () => {
|
|
311
|
+
(n?.data.datasets || []).forEach(et);
|
|
301
312
|
};
|
|
302
|
-
return (t,
|
|
303
|
-
s(
|
|
304
|
-
|
|
305
|
-
"chart-type": s(
|
|
306
|
-
"onUpdate:chart-type":
|
|
307
|
-
"type-switcher": s(
|
|
308
|
-
header: s(
|
|
313
|
+
return (t, r) => (p(), E("div", tt, [
|
|
314
|
+
s(u) || o.keepSubheaderVisible ? (p(), E("div", at, [
|
|
315
|
+
de($e, {
|
|
316
|
+
"chart-type": s(C),
|
|
317
|
+
"onUpdate:chart-type": r[0] || (r[0] = (a) => ce(C) ? C.value = a : null),
|
|
318
|
+
"type-switcher": s(u) ? o.typeSwitcher : !1,
|
|
319
|
+
header: s(u) ? o.header : null,
|
|
309
320
|
subheader: o.subheader,
|
|
310
321
|
"subheader-tooltip": o.subheaderTooltip,
|
|
311
322
|
"trend-tooltip": o.trendTooltip,
|
|
312
323
|
compact: o.compactHeader,
|
|
313
|
-
"trend-value": s(
|
|
324
|
+
"trend-value": s(u) ? o.trendValue : null,
|
|
314
325
|
"trend-direction": o.trendDirection,
|
|
315
326
|
"note-text": o.noteText
|
|
316
|
-
},
|
|
327
|
+
}, ue({ _: 2 }, [
|
|
317
328
|
t.$slots["subheader-tooltip"] ? {
|
|
318
329
|
name: "subheader-tooltip",
|
|
319
|
-
fn:
|
|
320
|
-
|
|
330
|
+
fn: fe(() => [
|
|
331
|
+
pe(t.$slots, "subheader-tooltip", {}, void 0, !0)
|
|
321
332
|
]),
|
|
322
333
|
key: "0"
|
|
323
334
|
} : void 0
|
|
324
335
|
]), 1032, ["chart-type", "type-switcher", "header", "subheader", "subheader-tooltip", "trend-tooltip", "compact", "trend-value", "trend-direction", "note-text"])
|
|
325
|
-
])) :
|
|
326
|
-
s(
|
|
327
|
-
|
|
328
|
-
|
|
336
|
+
])) : L("", !0),
|
|
337
|
+
s(u) ? (p(), E("section", ot, [
|
|
338
|
+
R("div", lt, [
|
|
339
|
+
R("canvas", {
|
|
329
340
|
ref_key: "chartRef",
|
|
330
|
-
ref:
|
|
341
|
+
ref: v,
|
|
331
342
|
class: "chart__canvas"
|
|
332
343
|
}, null, 512),
|
|
333
|
-
|
|
344
|
+
R("div", {
|
|
334
345
|
ref_key: "tooltipRef",
|
|
335
|
-
ref:
|
|
346
|
+
ref: P,
|
|
336
347
|
class: "chart__tooltip",
|
|
337
|
-
style:
|
|
348
|
+
style: he(s(te))
|
|
338
349
|
}, [
|
|
339
|
-
|
|
350
|
+
c.value ? (p(), D(Ge, {
|
|
340
351
|
key: 0,
|
|
341
352
|
"totals-chart": s(f),
|
|
342
|
-
title: String(
|
|
343
|
-
"data-points":
|
|
353
|
+
title: String(c.value.title),
|
|
354
|
+
"data-points": c.value.dataPoints,
|
|
344
355
|
"x-axis-format": o.xAxisFormat,
|
|
345
356
|
"y-axis-format": o.yAxisFormat,
|
|
346
357
|
"x-axis-date-interval": o.xAxisDateInterval,
|
|
347
|
-
"total-label":
|
|
348
|
-
"total-value": Number(
|
|
358
|
+
"total-label": c.value.footer?.[0],
|
|
359
|
+
"total-value": Number(c.value.footer?.[1]),
|
|
349
360
|
"value-suffix": o.valueSuffix,
|
|
350
361
|
"value-prefix": o.valuePrefix
|
|
351
|
-
}, null, 8, ["totals-chart", "title", "data-points", "x-axis-format", "y-axis-format", "x-axis-date-interval", "total-label", "total-value", "value-suffix", "value-prefix"])) :
|
|
362
|
+
}, null, 8, ["totals-chart", "title", "data-points", "x-axis-format", "y-axis-format", "x-axis-date-interval", "total-label", "total-value", "value-suffix", "value-prefix"])) : L("", !0)
|
|
352
363
|
], 4)
|
|
353
364
|
])
|
|
354
|
-
])) : o.loading ? (p(),
|
|
365
|
+
])) : o.loading ? (p(), D(Xe, {
|
|
355
366
|
key: 2,
|
|
356
367
|
class: "chart-loading"
|
|
357
|
-
})) : s(
|
|
368
|
+
})) : s(B) ? (p(), D(s(Ze), {
|
|
358
369
|
key: 3,
|
|
359
370
|
class: "chart-empty",
|
|
360
371
|
variant: null,
|
|
361
372
|
title: o.noDataTitle,
|
|
362
373
|
subtitle: o.noDataSubtitle,
|
|
363
374
|
"icon-name": o.noDataIcon
|
|
364
|
-
}, null, 8, ["title", "subtitle", "icon-name"])) :
|
|
375
|
+
}, null, 8, ["title", "subtitle", "icon-name"])) : L("", !0)
|
|
365
376
|
]));
|
|
366
377
|
}
|
|
367
378
|
});
|
|
368
379
|
export {
|
|
369
|
-
|
|
380
|
+
xt as default
|
|
370
381
|
};
|
|
@@ -176,4 +176,21 @@ export declare const chartStoryArgs: {
|
|
|
176
176
|
};
|
|
177
177
|
options: TooltipOrder[];
|
|
178
178
|
};
|
|
179
|
+
colorVariant: {
|
|
180
|
+
description: string;
|
|
181
|
+
control: string;
|
|
182
|
+
options: string[];
|
|
183
|
+
};
|
|
184
|
+
indicateIncompleteData: {
|
|
185
|
+
description: string;
|
|
186
|
+
control: {
|
|
187
|
+
type: string;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
tooltipExcludeTotalItem: {
|
|
191
|
+
description: string;
|
|
192
|
+
control: {
|
|
193
|
+
type: string;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
179
196
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ChartTooltip.vue2.js";
|
|
2
2
|
/* empty css */import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../ChartTooltip.
|
|
4
|
-
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
3
|
+
// import "../../ChartTooltip.vue_vue_type_style_index_0_scoped_3d0780bb_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3d0780bb"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../ChartTooltip.
|
|
1
|
+
import "../../ChartTooltip.vue_vue_type_style_index_0_scoped_3d0780bb_lang.css"; import { defineComponent as m, openBlock as a, createElementBlock as o, createBlock as f, createCommentVNode as r, Fragment as y, renderList as v, createElementVNode as c, normalizeStyle as h, unref as l, createVNode as i, withCtx as n, createTextVNode as u, toDisplayString as s } from "vue";
|
|
2
2
|
import d from "../typography/v4/Typography.vue.js";
|
|
3
3
|
import b from "../icon/v4/IconV4.vue.js";
|
|
4
4
|
import "../icon/v4/IconFlag.vue.js";
|
|
@@ -26,7 +26,7 @@ const C = { class: "chart-tooltip" }, g = {
|
|
|
26
26
|
},
|
|
27
27
|
setup(t) {
|
|
28
28
|
return (F, S) => (a(), o("div", C, [
|
|
29
|
-
t.title ? (a(),
|
|
29
|
+
t.title ? (a(), f(k, {
|
|
30
30
|
key: 0,
|
|
31
31
|
title: t.title,
|
|
32
32
|
"data-points": t.dataPoints,
|
|
@@ -39,20 +39,20 @@ const C = { class: "chart-tooltip" }, g = {
|
|
|
39
39
|
key: e.datasetIndex,
|
|
40
40
|
class: "list__item"
|
|
41
41
|
}, [
|
|
42
|
-
|
|
42
|
+
c("span", {
|
|
43
43
|
class: "color-box",
|
|
44
44
|
style: h({
|
|
45
45
|
backgroundColor: String(e.dataset.pointBackgroundColor)
|
|
46
46
|
})
|
|
47
47
|
}, null, 4),
|
|
48
|
-
e.dataset.icon ? (a(),
|
|
48
|
+
e.dataset.icon ? (a(), f(l(b), {
|
|
49
49
|
key: 0,
|
|
50
50
|
class: "platform-icon",
|
|
51
51
|
type: e.dataset.iconType,
|
|
52
52
|
name: e.dataset.icon,
|
|
53
53
|
size: "16px"
|
|
54
54
|
}, null, 8, ["type", "name"])) : r("", !0),
|
|
55
|
-
|
|
55
|
+
c("div", V, [
|
|
56
56
|
i(l(d), {
|
|
57
57
|
variant: "body2",
|
|
58
58
|
class: "flex-grow truncated-label",
|
|
@@ -66,7 +66,7 @@ const C = { class: "chart-tooltip" }, g = {
|
|
|
66
66
|
]),
|
|
67
67
|
i(l(d), { variant: "body2" }, {
|
|
68
68
|
default: n(() => [
|
|
69
|
-
u(s(t.valuePrefix + l(x)(e.parsed.y, t.yAxisFormat, !0) + t.valueSuffix), 1)
|
|
69
|
+
u(s(t.valuePrefix + l(x)(e.parsed.y, t.yAxisFormat, !0, !1) + t.valueSuffix), 1)
|
|
70
70
|
]),
|
|
71
71
|
_: 2
|
|
72
72
|
}, 1024)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TooltipHeader.vue2.js";
|
|
2
2
|
/* empty css */import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../TooltipHeader.
|
|
4
|
-
const
|
|
3
|
+
// import "../../TooltipHeader.vue_vue_type_style_index_0_scoped_da3532aa_lang.css"; //*');
|
|
4
|
+
const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-da3532aa"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|