@ironsource/shared-ui 2.1.12-test.59 → 2.1.12-test.60
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/ButtonV4.vue_vue_type_style_index_0_scoped_d7948c77_lang.css +1 -0
- package/Chart.vue_vue_type_style_index_0_scoped_de950ffe_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_1ff0e54f_lang.css +1 -0
- package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_21ce0774_lang.css +1 -0
- package/ChartPlane.vue_vue_type_style_index_0_scoped_ae87f435_lang.css +1 -0
- package/DialogV4.vue_vue_type_style_index_0_scoped_eb226e31_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_08cb822e_lang.css +1 -0
- package/FieldLabel.vue_vue_type_style_index_0_scoped_921d4087_lang.css +1 -0
- package/FormRow.vue_vue_type_style_index_0_scoped_2d5a3057_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_9cdf3a94_lang.css +1 -0
- package/Tooltip.vue_vue_type_style_index_0_scoped_20630944_lang.css +1 -0
- package/TooltipV4.vue_vue_type_style_index_0_scoped_bcb40ed4_lang.css +1 -0
- package/components/appIcon/index.d.ts +3 -3
- package/components/banner/Banner.vue.d.ts +3 -3
- package/components/banner/index.d.ts +7 -7
- package/components/button/common/consts.d.ts +1 -0
- package/components/button/v3/Button.vue.d.ts +3 -3
- package/components/button/v3/ButtonBase.vue.d.ts +3 -3
- package/components/button/v3/IconButton.vue.d.ts +3 -3
- package/components/button/v3/index.d.ts +14 -14
- package/components/button/v4/ButtonV4.vue.d.ts +4 -3
- package/components/button/v4/ButtonV4.vue.js +3 -3
- package/components/button/v4/ButtonV4.vue2.js +1 -1
- package/components/chart/Chart.vue.d.ts +24 -25
- package/components/chart/Chart.vue.js +4 -4
- package/components/chart/Chart.vue2.js +82 -88
- package/components/chart/ChartHeader.vue.d.ts +24 -25
- package/components/chart/ChartHeader.vue.js +3 -3
- package/components/chart/ChartHeader.vue2.js +30 -35
- package/components/chart/ChartHeaderTrend.vue.d.ts +13 -15
- package/components/chart/ChartHeaderTrend.vue.js +3 -3
- package/components/chart/ChartHeaderTrend.vue2.js +32 -34
- package/components/chart/ChartPlane.vue.d.ts +24 -25
- package/components/chart/ChartPlane.vue.js +5 -5
- package/components/chart/ChartPlane.vue2.js +122 -128
- package/components/chart/index.d.ts +59 -88
- package/components/checkbox/v3/Checkbox.vue.d.ts +3 -3
- package/components/checkbox/v3/index.d.ts +7 -7
- package/components/dialog/v4/DialogV4.vue.d.ts +4 -3
- package/components/dialog/v4/DialogV4.vue.js +4 -4
- package/components/dialog/v4/DialogV4.vue2.js +1 -1
- package/components/dialog/v4/index.d.ts +7 -7
- package/components/dropdown/v4/DropdownV4.vue.d.ts +8 -0
- package/components/dropdown/v4/DropdownV4.vue.js +4 -4
- package/components/dropdown/v4/DropdownV4.vue2.js +105 -95
- package/components/dropdown/v4/OptionV4.vue.d.ts +8 -0
- package/components/dropdown/v4/OptionV4.vue.js +3 -3
- package/components/dropdown/v4/OptionV4.vue2.js +91 -69
- package/components/dropdown/v4/index.d.ts +46 -2
- package/components/forms/FormRow.vue.d.ts +9 -2
- package/components/forms/FormRow.vue.js +3 -3
- package/components/forms/FormRow.vue2.js +25 -14
- package/components/forms/index.d.ts +25 -5
- package/components/search/v3/index.d.ts +3 -3
- package/components/shared/FieldLabel.vue.d.ts +19 -7
- package/components/shared/FieldLabel.vue.js +3 -3
- package/components/shared/FieldLabel.vue2.js +50 -37
- package/components/tabs/v3/Tabs.vue.d.ts +3 -3
- package/components/tabs/v3/index.d.ts +7 -7
- package/components/tooltip/common/Tooltip.types.d.ts +1 -0
- package/components/tooltip/v3/Tooltip.vue.d.ts +4 -4
- package/components/tooltip/v3/Tooltip.vue.js +2 -2
- package/components/tooltip/v3/Tooltip.vue2.js +1 -1
- package/components/tooltip/v3/index.d.ts +7 -7
- package/components/tooltip/v4/TooltipV4.vue.d.ts +4 -4
- package/components/tooltip/v4/TooltipV4.vue.js +2 -2
- package/components/tooltip/v4/TooltipV4.vue2.js +1 -1
- package/components/tooltip/v4/index.d.ts +7 -7
- package/components/typography/Text.vue.d.ts +3 -3
- package/components/typography/index.d.ts +7 -7
- package/composables/useFormValidation.d.ts +1 -0
- package/composables/useFormValidation.js +32 -27
- package/index.d.ts +127 -39
- package/index.js +1 -1
- package/package.json +1 -1
- package/ButtonV4.vue_vue_type_style_index_0_scoped_bdfce3aa_lang.css +0 -1
- package/Chart.vue_vue_type_style_index_0_scoped_757e7752_lang.css +0 -1
- package/ChartHeader.vue_vue_type_style_index_0_scoped_92052479_lang.css +0 -1
- package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_d61ed404_lang.css +0 -1
- package/ChartPlane.vue_vue_type_style_index_0_scoped_bb382dc4_lang.css +0 -1
- package/DialogV4.vue_vue_type_style_index_0_scoped_37da643b_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_d154c5da_lang.css +0 -1
- package/FieldLabel.vue_vue_type_style_index_0_scoped_96ee1c98_lang.css +0 -1
- package/FormRow.vue_vue_type_style_index_0_scoped_fc3897fd_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_1e8837dc_lang.css +0 -1
- package/Tooltip.vue_vue_type_style_index_0_scoped_9020a179_lang.css +0 -1
- package/TooltipV4.vue_vue_type_style_index_0_scoped_66eab856_lang.css +0 -1
|
@@ -1,87 +1,85 @@
|
|
|
1
|
-
import "../../ChartHeaderTrend.
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import "../../ChartHeaderTrend.vue_vue_type_style_index_0_scoped_21ce0774_lang.css"; import { defineComponent as f, computed as T, openBlock as r, createElementBlock as p, normalizeClass as v, createVNode as l, unref as t, withCtx as o, createElementVNode as s, createBlock as u, createTextVNode as a, toDisplayString as d, createCommentVNode as i, pushScopeId as g, popScopeId as y } from "vue";
|
|
2
|
+
import n from "../typography/v4/Typography.vue.js";
|
|
3
|
+
import C from "../icon/v4/IconV4.vue.js";
|
|
4
4
|
import "../icon/v4/IconFlag.vue.js";
|
|
5
5
|
import x from "../tooltip/v4/TooltipV4.vue.js";
|
|
6
|
-
const
|
|
6
|
+
const h = (e) => (g("data-v-21ce0774"), e = e(), y(), e), b = { class: "trend-tooltip" }, k = {
|
|
7
7
|
key: 2,
|
|
8
8
|
class: "separator"
|
|
9
|
-
}, _ = /* @__PURE__ */
|
|
9
|
+
}, _ = /* @__PURE__ */ h(() => /* @__PURE__ */ s("hr", null, null, -1)), I = /* @__PURE__ */ h(() => /* @__PURE__ */ s("hr", null, null, -1)), E = /* @__PURE__ */ f({
|
|
10
10
|
__name: "ChartHeaderTrend",
|
|
11
11
|
props: {
|
|
12
12
|
value: { default: null },
|
|
13
13
|
direction: { default: "up" },
|
|
14
|
-
|
|
15
|
-
tooltipRangeCurrent: { default: null },
|
|
16
|
-
tooltipRangePrevious: { default: null }
|
|
14
|
+
trendTooltip: { default: null }
|
|
17
15
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
20
|
-
() =>
|
|
16
|
+
setup(e) {
|
|
17
|
+
const c = e, m = T(
|
|
18
|
+
() => c.trendTooltip?.header || c.trendTooltip?.rangeCurrent || c.trendTooltip?.rangePrevious
|
|
21
19
|
);
|
|
22
|
-
return (
|
|
23
|
-
class:
|
|
20
|
+
return (N, P) => (r(), p("div", {
|
|
21
|
+
class: v(["chart-trend", [`chart-trend--${e.direction}`]])
|
|
24
22
|
}, [
|
|
25
|
-
|
|
26
|
-
disabled: !
|
|
23
|
+
l(t(x), {
|
|
24
|
+
disabled: !t(m)
|
|
27
25
|
}, {
|
|
28
26
|
tooltip: o(() => [
|
|
29
27
|
s("div", b, [
|
|
30
|
-
|
|
28
|
+
e.trendTooltip?.header ? (r(), u(t(n), {
|
|
31
29
|
key: 0,
|
|
32
30
|
class: "trend-tooltip__header",
|
|
33
31
|
variant: "subtitle2"
|
|
34
32
|
}, {
|
|
35
33
|
default: o(() => [
|
|
36
|
-
|
|
34
|
+
a(d(e.trendTooltip.header), 1)
|
|
37
35
|
]),
|
|
38
36
|
_: 1
|
|
39
|
-
})) :
|
|
40
|
-
|
|
37
|
+
})) : i("", !0),
|
|
38
|
+
e.trendTooltip?.rangeCurrent ? (r(), u(t(n), {
|
|
41
39
|
key: 1,
|
|
42
40
|
variant: "body2",
|
|
43
41
|
class: "trend-tooltip__text"
|
|
44
42
|
}, {
|
|
45
43
|
default: o(() => [
|
|
46
|
-
|
|
44
|
+
a(d(e.trendTooltip.rangeCurrent), 1)
|
|
47
45
|
]),
|
|
48
46
|
_: 1
|
|
49
|
-
})) :
|
|
50
|
-
|
|
47
|
+
})) : i("", !0),
|
|
48
|
+
e.trendTooltip?.rangeCurrent && e.trendTooltip?.rangePrevious ? (r(), p("div", k, [
|
|
51
49
|
_,
|
|
52
|
-
|
|
50
|
+
l(t(n), {
|
|
53
51
|
class: "separator__text",
|
|
54
52
|
variant: "caption"
|
|
55
53
|
}, {
|
|
56
54
|
default: o(() => [
|
|
57
|
-
|
|
55
|
+
a(" vs. ")
|
|
58
56
|
]),
|
|
59
57
|
_: 1
|
|
60
58
|
}),
|
|
61
|
-
|
|
62
|
-
])) :
|
|
63
|
-
|
|
59
|
+
I
|
|
60
|
+
])) : i("", !0),
|
|
61
|
+
e.trendTooltip?.rangePrevious ? (r(), u(t(n), {
|
|
64
62
|
key: 3,
|
|
65
63
|
variant: "body2",
|
|
66
64
|
class: "trend-tooltip__text"
|
|
67
65
|
}, {
|
|
68
66
|
default: o(() => [
|
|
69
|
-
|
|
67
|
+
a(d(e.trendTooltip.rangePrevious), 1)
|
|
70
68
|
]),
|
|
71
69
|
_: 1
|
|
72
|
-
})) :
|
|
70
|
+
})) : i("", !0)
|
|
73
71
|
])
|
|
74
72
|
]),
|
|
75
73
|
default: o(() => [
|
|
76
|
-
|
|
74
|
+
l(t(C), {
|
|
77
75
|
class: "trend-icon",
|
|
78
76
|
type: "bold",
|
|
79
|
-
name: `arrow-${
|
|
77
|
+
name: `arrow-${e.direction}`,
|
|
80
78
|
size: "13px"
|
|
81
79
|
}, null, 8, ["name"]),
|
|
82
|
-
|
|
80
|
+
l(t(n), { variant: "chipLabel" }, {
|
|
83
81
|
default: o(() => [
|
|
84
|
-
|
|
82
|
+
a(d(e.value), 1)
|
|
85
83
|
]),
|
|
86
84
|
_: 1
|
|
87
85
|
})
|
|
@@ -92,5 +90,5 @@ const m = (t) => (y("data-v-d61ed404"), t = t(), C(), t), b = { class: "trend-to
|
|
|
92
90
|
}
|
|
93
91
|
});
|
|
94
92
|
export {
|
|
95
|
-
|
|
93
|
+
E as default
|
|
96
94
|
};
|
|
@@ -10,8 +10,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
10
10
|
tickCount?: number;
|
|
11
11
|
header?: string;
|
|
12
12
|
subheader?: string;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
subheaderTooltip?: {
|
|
14
|
+
header?: string;
|
|
15
|
+
text?: string;
|
|
16
|
+
};
|
|
15
17
|
loading?: boolean;
|
|
16
18
|
noDataIcon?: string;
|
|
17
19
|
noDataTitle?: string;
|
|
@@ -25,9 +27,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
25
27
|
tooltipTotalCalcFn?: (values: number[], totalType: TotalType) => number;
|
|
26
28
|
trendValue?: string | number;
|
|
27
29
|
trendDirection?: "up" | "down";
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
trendTooltip?: {
|
|
31
|
+
header?: string;
|
|
32
|
+
rangeCurrent?: string;
|
|
33
|
+
rangePrevious?: string;
|
|
34
|
+
};
|
|
31
35
|
totalsChart?: boolean;
|
|
32
36
|
colorsMap: Record<string, string>;
|
|
33
37
|
}>, {
|
|
@@ -40,8 +44,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
40
44
|
tickCount: number;
|
|
41
45
|
header: string;
|
|
42
46
|
subheader: string;
|
|
43
|
-
|
|
44
|
-
subheaderTooltipText: any;
|
|
47
|
+
subheaderTooltip: any;
|
|
45
48
|
loading: boolean;
|
|
46
49
|
noDataIcon: string;
|
|
47
50
|
noDataTitle: string;
|
|
@@ -55,9 +58,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
55
58
|
tooltipTotalCalcFn: (values: number[], totalType: TotalType) => number;
|
|
56
59
|
trendValue: any;
|
|
57
60
|
trendDirection: string;
|
|
58
|
-
|
|
59
|
-
trendTooltipRangeCurrent: any;
|
|
60
|
-
trendTooltipRangePrevious: any;
|
|
61
|
+
trendTooltip: any;
|
|
61
62
|
totalsChart: boolean;
|
|
62
63
|
colorsMap: () => {};
|
|
63
64
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -72,8 +73,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
72
73
|
tickCount?: number;
|
|
73
74
|
header?: string;
|
|
74
75
|
subheader?: string;
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
subheaderTooltip?: {
|
|
77
|
+
header?: string;
|
|
78
|
+
text?: string;
|
|
79
|
+
};
|
|
77
80
|
loading?: boolean;
|
|
78
81
|
noDataIcon?: string;
|
|
79
82
|
noDataTitle?: string;
|
|
@@ -87,9 +90,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
87
90
|
tooltipTotalCalcFn?: (values: number[], totalType: TotalType) => number;
|
|
88
91
|
trendValue?: string | number;
|
|
89
92
|
trendDirection?: "up" | "down";
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
+
trendTooltip?: {
|
|
94
|
+
header?: string;
|
|
95
|
+
rangeCurrent?: string;
|
|
96
|
+
rangePrevious?: string;
|
|
97
|
+
};
|
|
93
98
|
totalsChart?: boolean;
|
|
94
99
|
colorsMap: Record<string, string>;
|
|
95
100
|
}>, {
|
|
@@ -102,8 +107,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
102
107
|
tickCount: number;
|
|
103
108
|
header: string;
|
|
104
109
|
subheader: string;
|
|
105
|
-
|
|
106
|
-
subheaderTooltipText: any;
|
|
110
|
+
subheaderTooltip: any;
|
|
107
111
|
loading: boolean;
|
|
108
112
|
noDataIcon: string;
|
|
109
113
|
noDataTitle: string;
|
|
@@ -117,9 +121,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
117
121
|
tooltipTotalCalcFn: (values: number[], totalType: TotalType) => number;
|
|
118
122
|
trendValue: any;
|
|
119
123
|
trendDirection: string;
|
|
120
|
-
|
|
121
|
-
trendTooltipRangeCurrent: any;
|
|
122
|
-
trendTooltipRangePrevious: any;
|
|
124
|
+
trendTooltip: any;
|
|
123
125
|
totalsChart: boolean;
|
|
124
126
|
colorsMap: () => {};
|
|
125
127
|
}>>> & {
|
|
@@ -134,13 +136,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
134
136
|
yAxisFormat: ValueFormat;
|
|
135
137
|
parsing: ChartParsingConfig;
|
|
136
138
|
dataSets: ChartDataSet[];
|
|
139
|
+
trendTooltip: any;
|
|
137
140
|
typeSwitcher: boolean;
|
|
138
141
|
subheader: string;
|
|
139
|
-
|
|
140
|
-
subheaderTooltipText: string;
|
|
141
|
-
trendTooltipHeader: string;
|
|
142
|
-
trendTooltipRangeCurrent: string;
|
|
143
|
-
trendTooltipRangePrevious: string;
|
|
142
|
+
subheaderTooltip: any;
|
|
144
143
|
trendValue: string | number;
|
|
145
144
|
trendDirection: "up" | "down";
|
|
146
145
|
tickCount: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../ChartPlane.
|
|
4
|
-
const
|
|
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_ae87f435_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-ae87f435"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import "../../ChartPlane.
|
|
2
|
-
import { Chart as O, ArcElement as
|
|
3
|
-
import { HoverVerticalLine as
|
|
4
|
-
import { formatValue as F, calcStepSize as
|
|
5
|
-
import { DEFAULT_TICK_COUNT as
|
|
1
|
+
import "../../ChartPlane.vue_vue_type_style_index_0_scoped_ae87f435_lang.css"; import { defineComponent as q, useCssVars as J, unref as c, computed as o, ref as C, onMounted as Q, watch as b, nextTick as X, openBlock as h, createElementBlock as tt, createElementVNode as m, createVNode as et, isRef as at, createSlots as ot, withCtx as lt, renderSlot as rt, normalizeStyle as it, createBlock as g, createCommentVNode as H } from "vue";
|
|
2
|
+
import { Chart as O, ArcElement as nt, LineElement as st, BarElement as ct, PointElement as dt, LineController as ut, BarController as pt, PieController as ft, ScatterController as ht, CategoryScale as mt, LinearScale as vt, Filler as yt, Tooltip as Tt } from "chart.js";
|
|
3
|
+
import { HoverVerticalLine as Ct } from "./plugins/HoverVerticalLine.js";
|
|
4
|
+
import { formatValue as F, calcStepSize as bt } from "./utils/utils.js";
|
|
5
|
+
import { DEFAULT_TICK_COUNT as gt, TOTALS_HELPER_KEY as I, POINT_BORDER_COLOR as kt, TICK_LABEL_COLOR as P, TICK_LABEL_FONT as N, GRID_LINE_COLOR as M, HEADER_HEIGHT as xt, COMPACT_HEADER_HEIGHT as St } from "./consts.js";
|
|
6
6
|
import { ChartType as n } from "./types.js";
|
|
7
|
-
import { useTooltipPosition as
|
|
8
|
-
import
|
|
9
|
-
import { hexColorToRgba as
|
|
10
|
-
import { useChartValues as
|
|
11
|
-
import
|
|
12
|
-
import { useVModel as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { DEFAULT_CHART_COLOR as
|
|
16
|
-
import { TotalType as z, calculateTotal as
|
|
17
|
-
const
|
|
7
|
+
import { useTooltipPosition as Lt } from "./composables/useTooltipPosition.js";
|
|
8
|
+
import Et from "./ChartTooltip.vue.js";
|
|
9
|
+
import { hexColorToRgba as At } from "../../utils/color.js";
|
|
10
|
+
import { useChartValues as Bt } from "./composables/useChartValues.js";
|
|
11
|
+
import Rt from "./ChartHeader.vue.js";
|
|
12
|
+
import { useVModel as wt } from "@vueuse/core";
|
|
13
|
+
import Dt from "../emptyState/v4/EmptyStateV4.vue.js";
|
|
14
|
+
import Vt from "./ChartLoader.vue.js";
|
|
15
|
+
import { DEFAULT_CHART_COLOR as Ht } from "./colorPalette.js";
|
|
16
|
+
import { TotalType as z, calculateTotal as Ot } from "../../utils/totals.js";
|
|
17
|
+
const Ft = {
|
|
18
18
|
key: 0,
|
|
19
19
|
class: "chart-plane"
|
|
20
|
-
},
|
|
20
|
+
}, It = { class: "header-wrapper" }, Pt = { class: "chart" }, te = /* @__PURE__ */ q({
|
|
21
21
|
__name: "ChartPlane",
|
|
22
22
|
props: {
|
|
23
23
|
dataSets: { default: () => [] },
|
|
@@ -26,11 +26,10 @@ const Fe = {
|
|
|
26
26
|
parsing: { default: void 0 },
|
|
27
27
|
xAxisFormat: { default: "string" },
|
|
28
28
|
yAxisFormat: { default: "number" },
|
|
29
|
-
tickCount: { default:
|
|
29
|
+
tickCount: { default: gt },
|
|
30
30
|
header: { default: "" },
|
|
31
31
|
subheader: { default: "" },
|
|
32
|
-
|
|
33
|
-
subheaderTooltipText: { default: null },
|
|
32
|
+
subheaderTooltip: { default: null },
|
|
34
33
|
loading: { type: Boolean, default: !1 },
|
|
35
34
|
noDataIcon: { default: "file-search" },
|
|
36
35
|
noDataTitle: { default: "No data to display" },
|
|
@@ -41,72 +40,70 @@ const Fe = {
|
|
|
41
40
|
compactHeader: { type: Boolean, default: !1 },
|
|
42
41
|
tooltipRespectsTopEdge: { type: Boolean, default: !0 },
|
|
43
42
|
tooltipTotalType: { default: z.Total },
|
|
44
|
-
tooltipTotalCalcFn: { type: Function, default:
|
|
43
|
+
tooltipTotalCalcFn: { type: Function, default: Ot },
|
|
45
44
|
trendValue: { default: null },
|
|
46
45
|
trendDirection: { default: "up" },
|
|
47
|
-
|
|
48
|
-
trendTooltipRangeCurrent: { default: null },
|
|
49
|
-
trendTooltipRangePrevious: { default: null },
|
|
46
|
+
trendTooltip: { default: null },
|
|
50
47
|
totalsChart: { type: Boolean, default: !1 },
|
|
51
48
|
colorsMap: { default: () => ({}) }
|
|
52
49
|
},
|
|
53
50
|
emits: ["update:chartType"],
|
|
54
51
|
setup(a, { emit: K }) {
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
"
|
|
52
|
+
const t = a;
|
|
53
|
+
J((e) => ({
|
|
54
|
+
"4640c185": c(j),
|
|
55
|
+
"07515470": a.height
|
|
59
56
|
})), O.register(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
57
|
+
nt,
|
|
58
|
+
st,
|
|
59
|
+
ct,
|
|
60
|
+
dt,
|
|
61
|
+
ut,
|
|
62
|
+
pt,
|
|
63
|
+
ft,
|
|
64
|
+
ht,
|
|
65
|
+
mt,
|
|
66
|
+
vt,
|
|
67
|
+
yt,
|
|
68
|
+
Tt,
|
|
69
|
+
Ct
|
|
73
70
|
);
|
|
74
|
-
const v =
|
|
75
|
-
() =>
|
|
76
|
-
),
|
|
71
|
+
const v = wt(t, "chartType", K), U = o(
|
|
72
|
+
() => t.withAnimation ? "" : "none"
|
|
73
|
+
), d = C(null);
|
|
77
74
|
let s = null;
|
|
78
|
-
const
|
|
79
|
-
|
|
75
|
+
const k = o(() => t.dataSets.length === 0), x = o(() => !t.loading && !k.value), y = () => {
|
|
76
|
+
d.value && (s && s.destroy(), s = new O(d.value, B.value));
|
|
80
77
|
}, $ = () => {
|
|
81
|
-
s && (s.data.datasets =
|
|
78
|
+
s && (s.data.datasets = A.value, s.options = B.value.options, s.update(U.value));
|
|
82
79
|
};
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}),
|
|
86
|
-
const
|
|
87
|
-
() =>
|
|
80
|
+
Q(y), b(() => t.chartType, y), b(x, async (e) => {
|
|
81
|
+
e && (await X(), y());
|
|
82
|
+
}), b([() => t.visibleIds, () => t.dataSets], $);
|
|
83
|
+
const u = o(() => t.totalsChart), p = o(
|
|
84
|
+
() => t.chartType === n.StackedLine || t.chartType === n.StackedBar || u.value
|
|
88
85
|
), S = o(
|
|
89
|
-
() =>
|
|
90
|
-
), L = o(() =>
|
|
91
|
-
...
|
|
92
|
-
data:
|
|
86
|
+
() => t.chartType === n.Line || t.chartType === n.StackedLine
|
|
87
|
+
), L = o(() => u.value ? { ...t.parsing, xAxisKey: I } : t.parsing), G = o(() => u.value ? t.dataSets.map((e) => ({
|
|
88
|
+
...e,
|
|
89
|
+
data: e.data.map((r) => ({
|
|
93
90
|
...r,
|
|
94
|
-
[I]:
|
|
91
|
+
[I]: e.label
|
|
95
92
|
}))
|
|
96
|
-
})) :
|
|
97
|
-
() => G.value.filter((
|
|
98
|
-
), W = (
|
|
93
|
+
})) : t.dataSets), f = o(
|
|
94
|
+
() => G.value.filter((e) => t.visibleIds.includes(e.id))
|
|
95
|
+
), W = (e) => t.colorsMap[e] || Ht, E = o(
|
|
99
96
|
() => f.value.length && f.value.every(
|
|
100
|
-
(
|
|
97
|
+
(e) => e.data.length === 1
|
|
101
98
|
)
|
|
102
|
-
),
|
|
103
|
-
const i = W(
|
|
99
|
+
), A = o(() => f.value.map((e, r) => {
|
|
100
|
+
const i = W(e.id), T = p.value ? r !== 0 ? "-1" : "start" : void 0;
|
|
104
101
|
return {
|
|
105
|
-
...
|
|
106
|
-
fill:
|
|
107
|
-
backgroundColor:
|
|
102
|
+
...e,
|
|
103
|
+
fill: T,
|
|
104
|
+
backgroundColor: At(
|
|
108
105
|
i,
|
|
109
|
-
|
|
106
|
+
t.chartType === n.StackedLine ? 10 : 70
|
|
110
107
|
),
|
|
111
108
|
borderColor: i,
|
|
112
109
|
pointBackgroundColor: i,
|
|
@@ -114,24 +111,24 @@ const Fe = {
|
|
|
114
111
|
maxBarThickness: 50,
|
|
115
112
|
clip: 5,
|
|
116
113
|
// draw a bit outside the chart area
|
|
117
|
-
icon:
|
|
118
|
-
iconType:
|
|
114
|
+
icon: e.icon || null,
|
|
115
|
+
iconType: e.iconType || "branded"
|
|
119
116
|
};
|
|
120
|
-
})),
|
|
121
|
-
() =>
|
|
122
|
-
),
|
|
117
|
+
})), _ = o(
|
|
118
|
+
() => t.tooltipTotalType === z.Total ? "Total" : "Mean"
|
|
119
|
+
), B = o(
|
|
123
120
|
() => ({
|
|
124
|
-
type:
|
|
121
|
+
type: t.chartType == n.Bar || t.chartType === n.StackedBar ? "bar" : "line",
|
|
125
122
|
// Chart Data
|
|
126
123
|
data: {
|
|
127
|
-
datasets:
|
|
124
|
+
datasets: A.value
|
|
128
125
|
},
|
|
129
126
|
// Chart Options
|
|
130
127
|
options: {
|
|
131
128
|
parsing: L.value,
|
|
132
129
|
interaction: {
|
|
133
130
|
intersect: !1,
|
|
134
|
-
mode:
|
|
131
|
+
mode: u.value ? "point" : "index",
|
|
135
132
|
axis: "x"
|
|
136
133
|
},
|
|
137
134
|
// plugins
|
|
@@ -143,16 +140,16 @@ const Fe = {
|
|
|
143
140
|
tooltip: {
|
|
144
141
|
enabled: !1,
|
|
145
142
|
position: "average",
|
|
146
|
-
external: ({ tooltip:
|
|
147
|
-
l.value = { ...
|
|
143
|
+
external: ({ tooltip: e }) => {
|
|
144
|
+
l.value = { ...e };
|
|
148
145
|
},
|
|
149
146
|
callbacks: {
|
|
150
|
-
footer: (
|
|
151
|
-
const r =
|
|
147
|
+
footer: (e) => {
|
|
148
|
+
const r = e.map((T) => T.parsed.y || 0), i = t.tooltipTotalCalcFn(
|
|
152
149
|
r,
|
|
153
|
-
|
|
150
|
+
t.tooltipTotalType
|
|
154
151
|
);
|
|
155
|
-
return [
|
|
152
|
+
return [_.value, String(i)];
|
|
156
153
|
}
|
|
157
154
|
}
|
|
158
155
|
}
|
|
@@ -174,12 +171,12 @@ const Fe = {
|
|
|
174
171
|
tension: 0.3
|
|
175
172
|
},
|
|
176
173
|
point: {
|
|
177
|
-
radius:
|
|
174
|
+
radius: E.value ? 3 : 1,
|
|
178
175
|
hitRadius: 8,
|
|
179
176
|
borderWidth: 0,
|
|
180
177
|
hoverRadius: 4,
|
|
181
178
|
hoverBorderWidth: 2,
|
|
182
|
-
pointHoverBackgroundColor:
|
|
179
|
+
pointHoverBackgroundColor: kt
|
|
183
180
|
},
|
|
184
181
|
bar: {
|
|
185
182
|
borderRadius: 4
|
|
@@ -189,7 +186,7 @@ const Fe = {
|
|
|
189
186
|
// Horizontal Axis (X)
|
|
190
187
|
x: {
|
|
191
188
|
beginAtZero: !0,
|
|
192
|
-
offset: !S.value ||
|
|
189
|
+
offset: !S.value || E.value,
|
|
193
190
|
border: { display: !1 },
|
|
194
191
|
stacked: p.value,
|
|
195
192
|
// stack on top of each other
|
|
@@ -198,10 +195,10 @@ const Fe = {
|
|
|
198
195
|
color: P,
|
|
199
196
|
font: N,
|
|
200
197
|
padding: 4,
|
|
201
|
-
callback: function(
|
|
198
|
+
callback: function(e) {
|
|
202
199
|
return F(
|
|
203
|
-
this.getLabelForValue(
|
|
204
|
-
|
|
200
|
+
this.getLabelForValue(e),
|
|
201
|
+
t.xAxisFormat
|
|
205
202
|
);
|
|
206
203
|
}
|
|
207
204
|
},
|
|
@@ -226,10 +223,10 @@ const Fe = {
|
|
|
226
223
|
color: P,
|
|
227
224
|
font: N,
|
|
228
225
|
padding: 8,
|
|
229
|
-
stepSize:
|
|
230
|
-
min:
|
|
231
|
-
max:
|
|
232
|
-
callback: (
|
|
226
|
+
stepSize: V.value,
|
|
227
|
+
min: D.value,
|
|
228
|
+
max: V.value * t.tickCount,
|
|
229
|
+
callback: (e) => F(e, t.yAxisFormat)
|
|
233
230
|
},
|
|
234
231
|
// grid lines
|
|
235
232
|
grid: {
|
|
@@ -241,63 +238,60 @@ const Fe = {
|
|
|
241
238
|
}
|
|
242
239
|
}
|
|
243
240
|
})
|
|
244
|
-
),
|
|
245
|
-
|
|
246
|
-
|
|
241
|
+
), R = C(null), l = C(null), { position: w } = Lt(
|
|
242
|
+
d,
|
|
243
|
+
R,
|
|
247
244
|
l,
|
|
248
|
-
|
|
249
|
-
),
|
|
250
|
-
left: `${
|
|
251
|
-
top: `${
|
|
245
|
+
t.tooltipRespectsTopEdge
|
|
246
|
+
), Z = o(() => ({
|
|
247
|
+
left: `${w.value.left}px`,
|
|
248
|
+
top: `${w.value.top}px`,
|
|
252
249
|
opacity: l.value?.opacity || 0
|
|
253
|
-
})), { minValue:
|
|
250
|
+
})), { minValue: D, maxValue: Y } = Bt({
|
|
254
251
|
parsingConfig: L.value,
|
|
255
252
|
dataSets: f,
|
|
256
253
|
isStacked: p
|
|
257
|
-
}),
|
|
258
|
-
() =>
|
|
259
|
-
),
|
|
260
|
-
() => (
|
|
254
|
+
}), V = o(
|
|
255
|
+
() => bt(D.value, Y.value, t.tickCount)
|
|
256
|
+
), j = o(
|
|
257
|
+
() => (t.compactHeader ? St : xt) + "px"
|
|
261
258
|
);
|
|
262
|
-
return (
|
|
263
|
-
m("div",
|
|
264
|
-
|
|
265
|
-
"chart-type":
|
|
266
|
-
"onUpdate:chart-type": r[0] || (r[0] = (i) =>
|
|
259
|
+
return (e, r) => c(x) ? (h(), tt("section", Ft, [
|
|
260
|
+
m("div", It, [
|
|
261
|
+
et(Rt, {
|
|
262
|
+
"chart-type": c(v),
|
|
263
|
+
"onUpdate:chart-type": r[0] || (r[0] = (i) => at(v) ? v.value = i : null),
|
|
267
264
|
"type-switcher": a.typeSwitcher,
|
|
268
265
|
header: a.header,
|
|
269
266
|
subheader: a.subheader,
|
|
270
|
-
"subheader-tooltip
|
|
271
|
-
"
|
|
272
|
-
"trend-tooltip-header": a.trendTooltipHeader,
|
|
273
|
-
"trend-tooltip-range-current": a.trendTooltipRangeCurrent,
|
|
274
|
-
"trend-tooltip-range-previous": a.trendTooltipRangePrevious,
|
|
267
|
+
"subheader-tooltip": a.subheaderTooltip,
|
|
268
|
+
"trend-tooltip": a.trendTooltip,
|
|
275
269
|
compact: a.compactHeader,
|
|
276
270
|
"trend-value": a.trendValue,
|
|
277
271
|
"trend-direction": a.trendDirection
|
|
278
|
-
},
|
|
279
|
-
|
|
272
|
+
}, ot({ _: 2 }, [
|
|
273
|
+
e.$slots["subheader-tooltip"] ? {
|
|
280
274
|
name: "subheader-tooltip",
|
|
281
|
-
fn:
|
|
282
|
-
|
|
275
|
+
fn: lt(() => [
|
|
276
|
+
rt(e.$slots, "subheader-tooltip", {}, void 0, !0)
|
|
283
277
|
]),
|
|
284
278
|
key: "0"
|
|
285
279
|
} : void 0
|
|
286
|
-
]), 1032, ["chart-type", "type-switcher", "header", "subheader", "subheader-tooltip
|
|
280
|
+
]), 1032, ["chart-type", "type-switcher", "header", "subheader", "subheader-tooltip", "trend-tooltip", "compact", "trend-value", "trend-direction"])
|
|
287
281
|
]),
|
|
288
|
-
m("div",
|
|
282
|
+
m("div", Pt, [
|
|
289
283
|
m("canvas", {
|
|
290
284
|
ref_key: "chartRef",
|
|
291
|
-
ref:
|
|
285
|
+
ref: d,
|
|
292
286
|
class: "chart__canvas"
|
|
293
287
|
}, null, 512),
|
|
294
288
|
m("div", {
|
|
295
289
|
ref_key: "tooltipRef",
|
|
296
|
-
ref:
|
|
290
|
+
ref: R,
|
|
297
291
|
class: "chart__tooltip",
|
|
298
|
-
style:
|
|
292
|
+
style: it(c(Z))
|
|
299
293
|
}, [
|
|
300
|
-
l.value ? (h(),
|
|
294
|
+
l.value ? (h(), g(Et, {
|
|
301
295
|
key: 0,
|
|
302
296
|
title: String(l.value.title),
|
|
303
297
|
"data-points": l.value.dataPoints,
|
|
@@ -305,21 +299,21 @@ const Fe = {
|
|
|
305
299
|
"y-axis-format": a.yAxisFormat,
|
|
306
300
|
"total-label": l.value.footer[0],
|
|
307
301
|
"total-value": Number(l.value.footer[1])
|
|
308
|
-
}, null, 8, ["title", "data-points", "x-axis-format", "y-axis-format", "total-label", "total-value"])) :
|
|
302
|
+
}, null, 8, ["title", "data-points", "x-axis-format", "y-axis-format", "total-label", "total-value"])) : H("", !0)
|
|
309
303
|
], 4)
|
|
310
304
|
])
|
|
311
|
-
])) : a.loading ? (h(),
|
|
305
|
+
])) : a.loading ? (h(), g(Vt, {
|
|
312
306
|
key: 1,
|
|
313
307
|
class: "chart-loading"
|
|
314
|
-
})) :
|
|
308
|
+
})) : c(k) ? (h(), g(c(Dt), {
|
|
315
309
|
key: 2,
|
|
316
310
|
class: "chart-empty",
|
|
317
311
|
title: a.noDataTitle,
|
|
318
312
|
subtitle: a.noDataSubtitle,
|
|
319
313
|
"icon-name": a.noDataIcon
|
|
320
|
-
}, null, 8, ["title", "subtitle", "icon-name"])) :
|
|
314
|
+
}, null, 8, ["title", "subtitle", "icon-name"])) : H("", !0);
|
|
321
315
|
}
|
|
322
316
|
});
|
|
323
317
|
export {
|
|
324
|
-
|
|
318
|
+
te as default
|
|
325
319
|
};
|