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