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