@ironsource/shared-ui 2.1.12-rc.13 → 2.1.12-rc.14
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/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/SettingsHeader.vue_vue_type_style_index_0_scoped_01f78cd7_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 +36 -0
- package/components/chart/Chart.vue.js +5 -5
- package/components/chart/Chart.vue2.js +89 -74
- package/components/chart/ChartHeader.vue.d.ts +24 -0
- package/components/chart/ChartHeader.vue.js +3 -3
- package/components/chart/ChartHeader.vue2.js +70 -50
- package/components/chart/ChartHeaderTrend.vue.d.ts +13 -0
- package/components/chart/ChartHeaderTrend.vue.js +2 -2
- package/components/chart/ChartHeaderTrend.vue2.js +80 -18
- package/components/chart/ChartPlane.vue.d.ts +35 -2
- package/components/chart/ChartPlane.vue.js +4 -4
- package/components/chart/ChartPlane.vue2.js +115 -103
- package/components/chart/SettingsHeader.vue.d.ts +1 -0
- package/components/chart/SettingsHeader.vue.js +3 -3
- package/components/chart/SettingsHeader.vue2.js +17 -16
- package/components/chart/index.d.ts +106 -1
- 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/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 +29 -26
- package/index.d.ts +35 -35
- package/index.js +1 -1
- package/package.json +1 -1
- package/utils/totals.d.ts +5 -0
- package/utils/totals.js +9 -0
- package/ButtonV4.vue_vue_type_style_index_0_scoped_bdfce3aa_lang.css +0 -1
- package/Chart.vue_vue_type_style_index_0_scoped_a0b89669_lang.css +0 -1
- package/ChartHeader.vue_vue_type_style_index_0_scoped_32001725_lang.css +0 -1
- package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_e4c673e7_lang.css +0 -1
- package/ChartPlane.vue_vue_type_style_index_0_scoped_0f3a67d5_lang.css +0 -1
- package/DialogV4.vue_vue_type_style_index_0_scoped_37da643b_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/SettingsHeader.vue_vue_type_style_index_0_scoped_0875167b_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,32 +1,94 @@
|
|
|
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 h = (e) => (g("data-v-21ce0774"), e = e(), y(), e), b = { class: "trend-tooltip" }, k = {
|
|
7
|
+
key: 2,
|
|
8
|
+
class: "separator"
|
|
9
|
+
}, _ = /* @__PURE__ */ h(() => /* @__PURE__ */ s("hr", null, null, -1)), I = /* @__PURE__ */ h(() => /* @__PURE__ */ s("hr", null, null, -1)), E = /* @__PURE__ */ f({
|
|
6
10
|
__name: "ChartHeaderTrend",
|
|
7
11
|
props: {
|
|
8
12
|
value: { default: null },
|
|
9
|
-
direction: { default: "up" }
|
|
13
|
+
direction: { default: "up" },
|
|
14
|
+
trendTooltip: { default: null }
|
|
10
15
|
},
|
|
11
16
|
setup(e) {
|
|
12
|
-
|
|
13
|
-
|
|
17
|
+
const c = e, m = T(
|
|
18
|
+
() => c.trendTooltip?.header || c.trendTooltip?.rangeCurrent || c.trendTooltip?.rangePrevious
|
|
19
|
+
);
|
|
20
|
+
return (N, P) => (r(), p("div", {
|
|
21
|
+
class: v(["chart-trend", [`chart-trend--${e.direction}`]])
|
|
14
22
|
}, [
|
|
15
|
-
t(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
l(t(x), {
|
|
24
|
+
disabled: !t(m)
|
|
25
|
+
}, {
|
|
26
|
+
tooltip: o(() => [
|
|
27
|
+
s("div", b, [
|
|
28
|
+
e.trendTooltip?.header ? (r(), u(t(n), {
|
|
29
|
+
key: 0,
|
|
30
|
+
class: "trend-tooltip__header",
|
|
31
|
+
variant: "subtitle2"
|
|
32
|
+
}, {
|
|
33
|
+
default: o(() => [
|
|
34
|
+
a(d(e.trendTooltip.header), 1)
|
|
35
|
+
]),
|
|
36
|
+
_: 1
|
|
37
|
+
})) : i("", !0),
|
|
38
|
+
e.trendTooltip?.rangeCurrent ? (r(), u(t(n), {
|
|
39
|
+
key: 1,
|
|
40
|
+
variant: "body2",
|
|
41
|
+
class: "trend-tooltip__text"
|
|
42
|
+
}, {
|
|
43
|
+
default: o(() => [
|
|
44
|
+
a(d(e.trendTooltip.rangeCurrent), 1)
|
|
45
|
+
]),
|
|
46
|
+
_: 1
|
|
47
|
+
})) : i("", !0),
|
|
48
|
+
e.trendTooltip?.rangeCurrent && e.trendTooltip?.rangePrevious ? (r(), p("div", k, [
|
|
49
|
+
_,
|
|
50
|
+
l(t(n), {
|
|
51
|
+
class: "separator__text",
|
|
52
|
+
variant: "caption"
|
|
53
|
+
}, {
|
|
54
|
+
default: o(() => [
|
|
55
|
+
a(" vs. ")
|
|
56
|
+
]),
|
|
57
|
+
_: 1
|
|
58
|
+
}),
|
|
59
|
+
I
|
|
60
|
+
])) : i("", !0),
|
|
61
|
+
e.trendTooltip?.rangePrevious ? (r(), u(t(n), {
|
|
62
|
+
key: 3,
|
|
63
|
+
variant: "body2",
|
|
64
|
+
class: "trend-tooltip__text"
|
|
65
|
+
}, {
|
|
66
|
+
default: o(() => [
|
|
67
|
+
a(d(e.trendTooltip.rangePrevious), 1)
|
|
68
|
+
]),
|
|
69
|
+
_: 1
|
|
70
|
+
})) : i("", !0)
|
|
71
|
+
])
|
|
72
|
+
]),
|
|
73
|
+
default: o(() => [
|
|
74
|
+
l(t(C), {
|
|
75
|
+
class: "trend-icon",
|
|
76
|
+
type: "bold",
|
|
77
|
+
name: `arrow-${e.direction}`,
|
|
78
|
+
size: "13px"
|
|
79
|
+
}, null, 8, ["name"]),
|
|
80
|
+
l(t(n), { variant: "chipLabel" }, {
|
|
81
|
+
default: o(() => [
|
|
82
|
+
a(d(e.value), 1)
|
|
83
|
+
]),
|
|
84
|
+
_: 1
|
|
85
|
+
})
|
|
24
86
|
]),
|
|
25
87
|
_: 1
|
|
26
|
-
})
|
|
88
|
+
}, 8, ["disabled"])
|
|
27
89
|
], 2));
|
|
28
90
|
}
|
|
29
91
|
});
|
|
30
92
|
export {
|
|
31
|
-
|
|
93
|
+
E as default
|
|
32
94
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChartDataSet, ChartParsingConfig, ChartType, ValueFormat } from './types';
|
|
2
|
+
import { TotalType } from '@/utils/totals';
|
|
2
3
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
4
|
dataSets: ChartDataSet[];
|
|
4
5
|
visibleIds: unknown[];
|
|
@@ -9,6 +10,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
9
10
|
tickCount?: number;
|
|
10
11
|
header?: string;
|
|
11
12
|
subheader?: string;
|
|
13
|
+
subheaderTooltip?: {
|
|
14
|
+
header?: string;
|
|
15
|
+
text?: string;
|
|
16
|
+
};
|
|
12
17
|
loading?: boolean;
|
|
13
18
|
noDataIcon?: string;
|
|
14
19
|
noDataTitle?: string;
|
|
@@ -18,8 +23,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
18
23
|
height?: string;
|
|
19
24
|
compactHeader?: boolean;
|
|
20
25
|
tooltipRespectsTopEdge?: boolean;
|
|
26
|
+
tooltipTotalType?: TotalType;
|
|
27
|
+
tooltipTotalCalcFn?: (values: number[], totalType: TotalType) => number;
|
|
21
28
|
trendValue?: string | number;
|
|
22
29
|
trendDirection?: "up" | "down";
|
|
30
|
+
trendTooltip?: {
|
|
31
|
+
header?: string;
|
|
32
|
+
rangeCurrent?: string;
|
|
33
|
+
rangePrevious?: string;
|
|
34
|
+
};
|
|
23
35
|
totalsChart?: boolean;
|
|
24
36
|
colorsMap: Record<string, string>;
|
|
25
37
|
}>, {
|
|
@@ -32,7 +44,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
32
44
|
tickCount: number;
|
|
33
45
|
header: string;
|
|
34
46
|
subheader: string;
|
|
35
|
-
subheaderTooltip:
|
|
47
|
+
subheaderTooltip: any;
|
|
36
48
|
loading: boolean;
|
|
37
49
|
noDataIcon: string;
|
|
38
50
|
noDataTitle: string;
|
|
@@ -42,8 +54,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
42
54
|
height: string;
|
|
43
55
|
compactHeader: boolean;
|
|
44
56
|
tooltipRespectsTopEdge: boolean;
|
|
57
|
+
tooltipTotalType: TotalType;
|
|
58
|
+
tooltipTotalCalcFn: (values: number[], totalType: TotalType) => number;
|
|
45
59
|
trendValue: any;
|
|
46
60
|
trendDirection: string;
|
|
61
|
+
trendTooltip: any;
|
|
47
62
|
totalsChart: boolean;
|
|
48
63
|
colorsMap: () => {};
|
|
49
64
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -58,6 +73,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
58
73
|
tickCount?: number;
|
|
59
74
|
header?: string;
|
|
60
75
|
subheader?: string;
|
|
76
|
+
subheaderTooltip?: {
|
|
77
|
+
header?: string;
|
|
78
|
+
text?: string;
|
|
79
|
+
};
|
|
61
80
|
loading?: boolean;
|
|
62
81
|
noDataIcon?: string;
|
|
63
82
|
noDataTitle?: string;
|
|
@@ -67,8 +86,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
67
86
|
height?: string;
|
|
68
87
|
compactHeader?: boolean;
|
|
69
88
|
tooltipRespectsTopEdge?: boolean;
|
|
89
|
+
tooltipTotalType?: TotalType;
|
|
90
|
+
tooltipTotalCalcFn?: (values: number[], totalType: TotalType) => number;
|
|
70
91
|
trendValue?: string | number;
|
|
71
92
|
trendDirection?: "up" | "down";
|
|
93
|
+
trendTooltip?: {
|
|
94
|
+
header?: string;
|
|
95
|
+
rangeCurrent?: string;
|
|
96
|
+
rangePrevious?: string;
|
|
97
|
+
};
|
|
72
98
|
totalsChart?: boolean;
|
|
73
99
|
colorsMap: Record<string, string>;
|
|
74
100
|
}>, {
|
|
@@ -81,7 +107,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
81
107
|
tickCount: number;
|
|
82
108
|
header: string;
|
|
83
109
|
subheader: string;
|
|
84
|
-
subheaderTooltip:
|
|
110
|
+
subheaderTooltip: any;
|
|
85
111
|
loading: boolean;
|
|
86
112
|
noDataIcon: string;
|
|
87
113
|
noDataTitle: string;
|
|
@@ -91,8 +117,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
91
117
|
height: string;
|
|
92
118
|
compactHeader: boolean;
|
|
93
119
|
tooltipRespectsTopEdge: boolean;
|
|
120
|
+
tooltipTotalType: TotalType;
|
|
121
|
+
tooltipTotalCalcFn: (values: number[], totalType: TotalType) => number;
|
|
94
122
|
trendValue: any;
|
|
95
123
|
trendDirection: string;
|
|
124
|
+
trendTooltip: any;
|
|
96
125
|
totalsChart: boolean;
|
|
97
126
|
colorsMap: () => {};
|
|
98
127
|
}>>> & {
|
|
@@ -107,8 +136,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
107
136
|
yAxisFormat: ValueFormat;
|
|
108
137
|
parsing: ChartParsingConfig;
|
|
109
138
|
dataSets: ChartDataSet[];
|
|
139
|
+
trendTooltip: any;
|
|
110
140
|
typeSwitcher: boolean;
|
|
111
141
|
subheader: string;
|
|
142
|
+
subheaderTooltip: any;
|
|
112
143
|
trendValue: string | number;
|
|
113
144
|
trendDirection: "up" | "down";
|
|
114
145
|
tickCount: number;
|
|
@@ -118,6 +149,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
118
149
|
withAnimation: boolean;
|
|
119
150
|
compactHeader: boolean;
|
|
120
151
|
tooltipRespectsTopEdge: boolean;
|
|
152
|
+
tooltipTotalType: TotalType;
|
|
153
|
+
tooltipTotalCalcFn: (values: number[], totalType: TotalType) => number;
|
|
121
154
|
totalsChart: boolean;
|
|
122
155
|
colorsMap: Record<string, string>;
|
|
123
156
|
}>, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../ChartPlane.
|
|
4
|
-
const s = /* @__PURE__ */ e
|
|
1
|
+
import e from "./ChartPlane.vue2.js";
|
|
2
|
+
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../ChartPlane.vue_vue_type_style_index_0_scoped_ae87f435_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-ae87f435"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import "../../ChartPlane.
|
|
2
|
-
import { Chart as O, ArcElement as
|
|
3
|
-
import { HoverVerticalLine as
|
|
4
|
-
import { formatValue 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
|
-
|
|
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 = {
|
|
17
18
|
key: 0,
|
|
18
19
|
class: "chart-plane"
|
|
19
|
-
},
|
|
20
|
+
}, It = { class: "header-wrapper" }, Pt = { class: "chart" }, te = /* @__PURE__ */ q({
|
|
20
21
|
__name: "ChartPlane",
|
|
21
22
|
props: {
|
|
22
23
|
dataSets: { default: () => [] },
|
|
@@ -25,9 +26,10 @@ const Ve = {
|
|
|
25
26
|
parsing: { default: void 0 },
|
|
26
27
|
xAxisFormat: { default: "string" },
|
|
27
28
|
yAxisFormat: { default: "number" },
|
|
28
|
-
tickCount: { default:
|
|
29
|
+
tickCount: { default: gt },
|
|
29
30
|
header: { default: "" },
|
|
30
31
|
subheader: { default: "" },
|
|
32
|
+
subheaderTooltip: { default: null },
|
|
31
33
|
loading: { type: Boolean, default: !1 },
|
|
32
34
|
noDataIcon: { default: "file-search" },
|
|
33
35
|
noDataTitle: { default: "No data to display" },
|
|
@@ -37,66 +39,69 @@ const Ve = {
|
|
|
37
39
|
height: { default: "100%" },
|
|
38
40
|
compactHeader: { type: Boolean, default: !1 },
|
|
39
41
|
tooltipRespectsTopEdge: { type: Boolean, default: !0 },
|
|
42
|
+
tooltipTotalType: { default: z.Total },
|
|
43
|
+
tooltipTotalCalcFn: { type: Function, default: Ot },
|
|
40
44
|
trendValue: { default: null },
|
|
41
45
|
trendDirection: { default: "up" },
|
|
46
|
+
trendTooltip: { default: null },
|
|
42
47
|
totalsChart: { type: Boolean, default: !1 },
|
|
43
48
|
colorsMap: { default: () => ({}) }
|
|
44
49
|
},
|
|
45
50
|
emits: ["update:chartType"],
|
|
46
|
-
setup(
|
|
47
|
-
const t =
|
|
48
|
-
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
+
setup(a, { emit: K }) {
|
|
52
|
+
const t = a;
|
|
53
|
+
J((e) => ({
|
|
54
|
+
"4640c185": c(j),
|
|
55
|
+
"07515470": a.height
|
|
51
56
|
})), O.register(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
|
65
70
|
);
|
|
66
|
-
const v =
|
|
71
|
+
const v = wt(t, "chartType", K), U = o(
|
|
67
72
|
() => t.withAnimation ? "" : "none"
|
|
68
|
-
), d =
|
|
73
|
+
), d = C(null);
|
|
69
74
|
let s = null;
|
|
70
|
-
const k =
|
|
75
|
+
const k = o(() => t.dataSets.length === 0), x = o(() => !t.loading && !k.value), y = () => {
|
|
71
76
|
d.value && (s && s.destroy(), s = new O(d.value, B.value));
|
|
72
|
-
},
|
|
73
|
-
s && (s.data.datasets = A.value, s.options = B.value.options, s.update(
|
|
77
|
+
}, $ = () => {
|
|
78
|
+
s && (s.data.datasets = A.value, s.options = B.value.options, s.update(U.value));
|
|
74
79
|
};
|
|
75
|
-
|
|
76
|
-
e && (await
|
|
77
|
-
}),
|
|
78
|
-
const u =
|
|
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(
|
|
79
84
|
() => t.chartType === n.StackedLine || t.chartType === n.StackedBar || u.value
|
|
80
|
-
), S =
|
|
85
|
+
), S = o(
|
|
81
86
|
() => t.chartType === n.Line || t.chartType === n.StackedLine
|
|
82
|
-
), L =
|
|
87
|
+
), L = o(() => u.value ? { ...t.parsing, xAxisKey: I } : t.parsing), G = o(() => u.value ? t.dataSets.map((e) => ({
|
|
83
88
|
...e,
|
|
84
|
-
data: e.data.map((
|
|
85
|
-
...
|
|
86
|
-
[
|
|
89
|
+
data: e.data.map((r) => ({
|
|
90
|
+
...r,
|
|
91
|
+
[I]: e.label
|
|
87
92
|
}))
|
|
88
|
-
})) : t.dataSets), f =
|
|
89
|
-
() =>
|
|
90
|
-
),
|
|
93
|
+
})) : t.dataSets), f = o(
|
|
94
|
+
() => G.value.filter((e) => t.visibleIds.includes(e.id))
|
|
95
|
+
), W = (e) => t.colorsMap[e] || Ht, E = o(
|
|
91
96
|
() => f.value.length && f.value.every(
|
|
92
97
|
(e) => e.data.length === 1
|
|
93
98
|
)
|
|
94
|
-
), A =
|
|
95
|
-
const i =
|
|
99
|
+
), A = o(() => f.value.map((e, r) => {
|
|
100
|
+
const i = W(e.id), T = p.value ? r !== 0 ? "-1" : "start" : void 0;
|
|
96
101
|
return {
|
|
97
102
|
...e,
|
|
98
|
-
fill:
|
|
99
|
-
backgroundColor:
|
|
103
|
+
fill: T,
|
|
104
|
+
backgroundColor: At(
|
|
100
105
|
i,
|
|
101
106
|
t.chartType === n.StackedLine ? 10 : 70
|
|
102
107
|
),
|
|
@@ -109,7 +114,9 @@ const Ve = {
|
|
|
109
114
|
icon: e.icon || null,
|
|
110
115
|
iconType: e.iconType || "branded"
|
|
111
116
|
};
|
|
112
|
-
})),
|
|
117
|
+
})), _ = o(
|
|
118
|
+
() => t.tooltipTotalType === z.Total ? "Total" : "Mean"
|
|
119
|
+
), B = o(
|
|
113
120
|
() => ({
|
|
114
121
|
type: t.chartType == n.Bar || t.chartType === n.StackedBar ? "bar" : "line",
|
|
115
122
|
// Chart Data
|
|
@@ -134,12 +141,15 @@ const Ve = {
|
|
|
134
141
|
enabled: !1,
|
|
135
142
|
position: "average",
|
|
136
143
|
external: ({ tooltip: e }) => {
|
|
137
|
-
|
|
144
|
+
l.value = { ...e };
|
|
138
145
|
},
|
|
139
146
|
callbacks: {
|
|
140
147
|
footer: (e) => {
|
|
141
|
-
const
|
|
142
|
-
|
|
148
|
+
const r = e.map((T) => T.parsed.y || 0), i = t.tooltipTotalCalcFn(
|
|
149
|
+
r,
|
|
150
|
+
t.tooltipTotalType
|
|
151
|
+
);
|
|
152
|
+
return [_.value, String(i)];
|
|
143
153
|
}
|
|
144
154
|
}
|
|
145
155
|
}
|
|
@@ -166,7 +176,7 @@ const Ve = {
|
|
|
166
176
|
borderWidth: 0,
|
|
167
177
|
hoverRadius: 4,
|
|
168
178
|
hoverBorderWidth: 2,
|
|
169
|
-
pointHoverBackgroundColor:
|
|
179
|
+
pointHoverBackgroundColor: kt
|
|
170
180
|
},
|
|
171
181
|
bar: {
|
|
172
182
|
borderRadius: 4
|
|
@@ -186,7 +196,7 @@ const Ve = {
|
|
|
186
196
|
font: N,
|
|
187
197
|
padding: 4,
|
|
188
198
|
callback: function(e) {
|
|
189
|
-
return
|
|
199
|
+
return F(
|
|
190
200
|
this.getLabelForValue(e),
|
|
191
201
|
t.xAxisFormat
|
|
192
202
|
);
|
|
@@ -194,7 +204,7 @@ const Ve = {
|
|
|
194
204
|
},
|
|
195
205
|
// grid lines
|
|
196
206
|
grid: {
|
|
197
|
-
color:
|
|
207
|
+
color: M,
|
|
198
208
|
drawOnChartArea: !1,
|
|
199
209
|
drawTicks: !0,
|
|
200
210
|
drawBorder: !1,
|
|
@@ -216,11 +226,11 @@ const Ve = {
|
|
|
216
226
|
stepSize: V.value,
|
|
217
227
|
min: D.value,
|
|
218
228
|
max: V.value * t.tickCount,
|
|
219
|
-
callback: (e) =>
|
|
229
|
+
callback: (e) => F(e, t.yAxisFormat)
|
|
220
230
|
},
|
|
221
231
|
// grid lines
|
|
222
232
|
grid: {
|
|
223
|
-
color:
|
|
233
|
+
color: M,
|
|
224
234
|
drawOnChartArea: !0,
|
|
225
235
|
drawTicks: !1
|
|
226
236
|
}
|
|
@@ -228,46 +238,48 @@ const Ve = {
|
|
|
228
238
|
}
|
|
229
239
|
}
|
|
230
240
|
})
|
|
231
|
-
), R =
|
|
241
|
+
), R = C(null), l = C(null), { position: w } = Lt(
|
|
232
242
|
d,
|
|
233
243
|
R,
|
|
234
|
-
|
|
244
|
+
l,
|
|
235
245
|
t.tooltipRespectsTopEdge
|
|
236
|
-
),
|
|
246
|
+
), Z = o(() => ({
|
|
237
247
|
left: `${w.value.left}px`,
|
|
238
248
|
top: `${w.value.top}px`,
|
|
239
|
-
opacity:
|
|
240
|
-
})), { minValue: D, maxValue:
|
|
249
|
+
opacity: l.value?.opacity || 0
|
|
250
|
+
})), { minValue: D, maxValue: Y } = Bt({
|
|
241
251
|
parsingConfig: L.value,
|
|
242
252
|
dataSets: f,
|
|
243
253
|
isStacked: p
|
|
244
|
-
}), V =
|
|
245
|
-
() =>
|
|
246
|
-
),
|
|
247
|
-
() => (t.compactHeader ?
|
|
254
|
+
}), V = o(
|
|
255
|
+
() => bt(D.value, Y.value, t.tickCount)
|
|
256
|
+
), j = o(
|
|
257
|
+
() => (t.compactHeader ? St : xt) + "px"
|
|
248
258
|
);
|
|
249
|
-
return (e,
|
|
250
|
-
m("div",
|
|
251
|
-
|
|
259
|
+
return (e, r) => c(x) ? (h(), tt("section", Ft, [
|
|
260
|
+
m("div", It, [
|
|
261
|
+
et(Rt, {
|
|
252
262
|
"chart-type": c(v),
|
|
253
|
-
"onUpdate:chart-type":
|
|
254
|
-
"type-switcher":
|
|
255
|
-
header:
|
|
256
|
-
subheader:
|
|
257
|
-
|
|
258
|
-
"trend-
|
|
259
|
-
|
|
260
|
-
|
|
263
|
+
"onUpdate:chart-type": r[0] || (r[0] = (i) => at(v) ? v.value = i : null),
|
|
264
|
+
"type-switcher": a.typeSwitcher,
|
|
265
|
+
header: a.header,
|
|
266
|
+
subheader: a.subheader,
|
|
267
|
+
"subheader-tooltip": a.subheaderTooltip,
|
|
268
|
+
"trend-tooltip": a.trendTooltip,
|
|
269
|
+
compact: a.compactHeader,
|
|
270
|
+
"trend-value": a.trendValue,
|
|
271
|
+
"trend-direction": a.trendDirection
|
|
272
|
+
}, ot({ _: 2 }, [
|
|
261
273
|
e.$slots["subheader-tooltip"] ? {
|
|
262
274
|
name: "subheader-tooltip",
|
|
263
|
-
fn:
|
|
264
|
-
|
|
275
|
+
fn: lt(() => [
|
|
276
|
+
rt(e.$slots, "subheader-tooltip", {}, void 0, !0)
|
|
265
277
|
]),
|
|
266
278
|
key: "0"
|
|
267
279
|
} : void 0
|
|
268
|
-
]), 1032, ["chart-type", "type-switcher", "header", "subheader", "compact", "trend-value", "trend-direction"])
|
|
280
|
+
]), 1032, ["chart-type", "type-switcher", "header", "subheader", "subheader-tooltip", "trend-tooltip", "compact", "trend-value", "trend-direction"])
|
|
269
281
|
]),
|
|
270
|
-
m("div",
|
|
282
|
+
m("div", Pt, [
|
|
271
283
|
m("canvas", {
|
|
272
284
|
ref_key: "chartRef",
|
|
273
285
|
ref: d,
|
|
@@ -277,31 +289,31 @@ const Ve = {
|
|
|
277
289
|
ref_key: "tooltipRef",
|
|
278
290
|
ref: R,
|
|
279
291
|
class: "chart__tooltip",
|
|
280
|
-
style:
|
|
292
|
+
style: it(c(Z))
|
|
281
293
|
}, [
|
|
282
|
-
|
|
294
|
+
l.value ? (h(), g(Et, {
|
|
283
295
|
key: 0,
|
|
284
|
-
title: String(
|
|
285
|
-
"data-points":
|
|
286
|
-
"x-axis-format":
|
|
287
|
-
"y-axis-format":
|
|
288
|
-
"total-label":
|
|
289
|
-
"total-value": Number(
|
|
296
|
+
title: String(l.value.title),
|
|
297
|
+
"data-points": l.value.dataPoints,
|
|
298
|
+
"x-axis-format": a.xAxisFormat,
|
|
299
|
+
"y-axis-format": a.yAxisFormat,
|
|
300
|
+
"total-label": l.value.footer[0],
|
|
301
|
+
"total-value": Number(l.value.footer[1])
|
|
290
302
|
}, null, 8, ["title", "data-points", "x-axis-format", "y-axis-format", "total-label", "total-value"])) : H("", !0)
|
|
291
303
|
], 4)
|
|
292
304
|
])
|
|
293
|
-
])) :
|
|
305
|
+
])) : a.loading ? (h(), g(Vt, {
|
|
294
306
|
key: 1,
|
|
295
307
|
class: "chart-loading"
|
|
296
|
-
})) : c(k) ? (h(),
|
|
308
|
+
})) : c(k) ? (h(), g(c(Dt), {
|
|
297
309
|
key: 2,
|
|
298
310
|
class: "chart-empty",
|
|
299
|
-
title:
|
|
300
|
-
subtitle:
|
|
301
|
-
"icon-name":
|
|
311
|
+
title: a.noDataTitle,
|
|
312
|
+
subtitle: a.noDataSubtitle,
|
|
313
|
+
"icon-name": a.noDataIcon
|
|
302
314
|
}, null, 8, ["title", "subtitle", "icon-name"])) : H("", !0);
|
|
303
315
|
}
|
|
304
316
|
});
|
|
305
317
|
export {
|
|
306
|
-
|
|
318
|
+
te as default
|
|
307
319
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./SettingsHeader.vue2.js";
|
|
2
2
|
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../SettingsHeader.
|
|
4
|
-
const
|
|
3
|
+
// import "../../SettingsHeader.vue_vue_type_style_index_0_scoped_01f78cd7_lang.css"; //*');
|
|
4
|
+
const c = /* @__PURE__ */ o(e, [["__scopeId", "data-v-01f78cd7"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|