@ironsource/shared-ui 2.1.12-rc.12 → 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/ChartLegend.vue_vue_type_style_index_0_scoped_da487aba_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/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_99e51ecc_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 +55 -2
- package/components/chart/Chart.vue.js +5 -5
- package/components/chart/Chart.vue2.js +109 -82
- 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/ChartLegend.vue.d.ts +17 -0
- package/components/chart/ChartLegend.vue.js +3 -3
- package/components/chart/ChartLegend.vue2.js +78 -67
- package/components/chart/ChartPlane.vue.d.ts +42 -4
- package/components/chart/ChartPlane.vue.js +4 -4
- package/components/chart/ChartPlane.vue2.js +159 -146
- package/components/chart/LegendSorting.vue.d.ts +37 -0
- package/components/chart/LegendSorting.vue.js +45 -0
- package/components/chart/LegendSorting.vue2.js +4 -0
- 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/colorPalette.d.ts +4 -0
- package/components/chart/colorPalette.js +54 -0
- package/components/chart/composables/useColorsMap.d.ts +2 -2
- package/components/chart/composables/useColorsMap.js +41 -12
- package/components/chart/consts.d.ts +12 -1
- package/components/chart/consts.js +31 -26
- package/components/chart/index.d.ts +208 -40
- package/components/chart/mockData.d.ts +8 -14
- package/components/chart/types.d.ts +2 -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/dropdown/v4/IconButtonDropdownTrigger.vue.d.ts +11 -0
- package/components/dropdown/v4/IconButtonDropdownTrigger.vue.js +4 -4
- package/components/dropdown/v4/IconButtonDropdownTrigger.vue2.js +12 -10
- package/components/dropdown/v4/index.d.ts +18 -0
- 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 +71 -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_78d3f5a8_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/ChartLegend.vue_vue_type_style_index_0_scoped_532f23bc_lang.css +0 -1
- package/ChartPlane.vue_vue_type_style_index_0_scoped_4396faf6_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/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_59fb505a_lang.css +0 -1
- package/SettingsHeader.vue_vue_type_style_index_0_scoped_9b6cd9d9_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,33 +1,35 @@
|
|
|
1
|
-
import "../../ChartPlane.
|
|
2
|
-
import { Chart as
|
|
3
|
-
import { HoverVerticalLine as
|
|
4
|
-
import { formatValue as
|
|
5
|
-
import { DEFAULT_TICK_COUNT as
|
|
6
|
-
import { ChartType as
|
|
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 {
|
|
16
|
-
|
|
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
|
+
import { ChartType as n } from "./types.js";
|
|
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: () => [] },
|
|
23
24
|
visibleIds: { default: () => [] },
|
|
24
|
-
chartType: { default:
|
|
25
|
+
chartType: { default: n.Line },
|
|
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,108 +39,117 @@ const Ie = {
|
|
|
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" },
|
|
42
|
-
|
|
46
|
+
trendTooltip: { default: null },
|
|
47
|
+
totalsChart: { type: Boolean, default: !1 },
|
|
48
|
+
colorsMap: { default: () => ({}) }
|
|
43
49
|
},
|
|
44
50
|
emits: ["update:chartType"],
|
|
45
|
-
setup(
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
})),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
51
|
+
setup(a, { emit: K }) {
|
|
52
|
+
const t = a;
|
|
53
|
+
J((e) => ({
|
|
54
|
+
"4640c185": c(j),
|
|
55
|
+
"07515470": a.height
|
|
56
|
+
})), O.register(
|
|
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
|
|
64
70
|
);
|
|
65
|
-
const
|
|
66
|
-
() =>
|
|
67
|
-
),
|
|
68
|
-
let
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
},
|
|
72
|
-
|
|
71
|
+
const v = wt(t, "chartType", K), U = o(
|
|
72
|
+
() => t.withAnimation ? "" : "none"
|
|
73
|
+
), d = C(null);
|
|
74
|
+
let s = null;
|
|
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));
|
|
77
|
+
}, $ = () => {
|
|
78
|
+
s && (s.data.datasets = A.value, s.options = B.value.options, s.update(U.value));
|
|
73
79
|
};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}),
|
|
77
|
-
const
|
|
78
|
-
() =>
|
|
79
|
-
),
|
|
80
|
-
() =>
|
|
81
|
-
),
|
|
82
|
-
...
|
|
83
|
-
data:
|
|
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
|
|
85
|
+
), S = o(
|
|
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) => ({
|
|
84
90
|
...r,
|
|
85
|
-
[
|
|
91
|
+
[I]: e.label
|
|
86
92
|
}))
|
|
87
|
-
})) :
|
|
88
|
-
() =>
|
|
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(
|
|
96
|
+
() => f.value.length && f.value.every(
|
|
97
|
+
(e) => e.data.length === 1
|
|
98
|
+
)
|
|
99
|
+
), A = o(() => f.value.map((e, r) => {
|
|
100
|
+
const i = W(e.id), T = p.value ? r !== 0 ? "-1" : "start" : void 0;
|
|
91
101
|
return {
|
|
92
|
-
...
|
|
93
|
-
fill:
|
|
94
|
-
backgroundColor:
|
|
95
|
-
|
|
96
|
-
|
|
102
|
+
...e,
|
|
103
|
+
fill: T,
|
|
104
|
+
backgroundColor: At(
|
|
105
|
+
i,
|
|
106
|
+
t.chartType === n.StackedLine ? 10 : 70
|
|
97
107
|
),
|
|
98
|
-
borderColor:
|
|
99
|
-
pointBackgroundColor:
|
|
100
|
-
pointHoverBorderColor:
|
|
108
|
+
borderColor: i,
|
|
109
|
+
pointBackgroundColor: i,
|
|
110
|
+
pointHoverBorderColor: i,
|
|
101
111
|
maxBarThickness: 50,
|
|
102
112
|
clip: 5,
|
|
103
113
|
// draw a bit outside the chart area
|
|
104
|
-
icon:
|
|
105
|
-
iconType:
|
|
114
|
+
icon: e.icon || null,
|
|
115
|
+
iconType: e.iconType || "branded"
|
|
106
116
|
};
|
|
107
|
-
})),
|
|
108
|
-
() =>
|
|
109
|
-
|
|
110
|
-
)
|
|
111
|
-
), A = a(
|
|
117
|
+
})), _ = o(
|
|
118
|
+
() => t.tooltipTotalType === z.Total ? "Total" : "Mean"
|
|
119
|
+
), B = o(
|
|
112
120
|
() => ({
|
|
113
|
-
type:
|
|
121
|
+
type: t.chartType == n.Bar || t.chartType === n.StackedBar ? "bar" : "line",
|
|
114
122
|
// Chart Data
|
|
115
123
|
data: {
|
|
116
|
-
datasets:
|
|
124
|
+
datasets: A.value
|
|
117
125
|
},
|
|
118
126
|
// Chart Options
|
|
119
127
|
options: {
|
|
120
|
-
parsing:
|
|
128
|
+
parsing: L.value,
|
|
121
129
|
interaction: {
|
|
122
130
|
intersect: !1,
|
|
123
|
-
mode:
|
|
131
|
+
mode: u.value ? "point" : "index",
|
|
124
132
|
axis: "x"
|
|
125
133
|
},
|
|
126
134
|
// plugins
|
|
127
135
|
plugins: {
|
|
128
136
|
legend: { display: !1 },
|
|
129
137
|
title: { display: !1 },
|
|
130
|
-
hoverVerticalLine:
|
|
138
|
+
hoverVerticalLine: S.value,
|
|
131
139
|
// tooltip
|
|
132
140
|
tooltip: {
|
|
133
141
|
enabled: !1,
|
|
134
142
|
position: "average",
|
|
135
|
-
external: ({ tooltip:
|
|
136
|
-
l.value = { ...
|
|
143
|
+
external: ({ tooltip: e }) => {
|
|
144
|
+
l.value = { ...e };
|
|
137
145
|
},
|
|
138
146
|
callbacks: {
|
|
139
|
-
footer: (
|
|
140
|
-
const r =
|
|
141
|
-
|
|
147
|
+
footer: (e) => {
|
|
148
|
+
const r = e.map((T) => T.parsed.y || 0), i = t.tooltipTotalCalcFn(
|
|
149
|
+
r,
|
|
150
|
+
t.tooltipTotalType
|
|
151
|
+
);
|
|
152
|
+
return [_.value, String(i)];
|
|
142
153
|
}
|
|
143
154
|
}
|
|
144
155
|
}
|
|
@@ -160,12 +171,12 @@ const Ie = {
|
|
|
160
171
|
tension: 0.3
|
|
161
172
|
},
|
|
162
173
|
point: {
|
|
163
|
-
radius:
|
|
174
|
+
radius: E.value ? 3 : 1,
|
|
164
175
|
hitRadius: 8,
|
|
165
176
|
borderWidth: 0,
|
|
166
177
|
hoverRadius: 4,
|
|
167
178
|
hoverBorderWidth: 2,
|
|
168
|
-
pointHoverBackgroundColor:
|
|
179
|
+
pointHoverBackgroundColor: kt
|
|
169
180
|
},
|
|
170
181
|
bar: {
|
|
171
182
|
borderRadius: 4
|
|
@@ -175,19 +186,19 @@ const Ie = {
|
|
|
175
186
|
// Horizontal Axis (X)
|
|
176
187
|
x: {
|
|
177
188
|
beginAtZero: !0,
|
|
178
|
-
offset: !
|
|
189
|
+
offset: !S.value || E.value,
|
|
179
190
|
border: { display: !1 },
|
|
180
|
-
stacked:
|
|
191
|
+
stacked: p.value,
|
|
181
192
|
// stack on top of each other
|
|
182
193
|
// ticks
|
|
183
194
|
ticks: {
|
|
184
|
-
color:
|
|
195
|
+
color: P,
|
|
185
196
|
font: N,
|
|
186
197
|
padding: 4,
|
|
187
|
-
callback: function(
|
|
188
|
-
return
|
|
189
|
-
this.getLabelForValue(
|
|
190
|
-
|
|
198
|
+
callback: function(e) {
|
|
199
|
+
return F(
|
|
200
|
+
this.getLabelForValue(e),
|
|
201
|
+
t.xAxisFormat
|
|
191
202
|
);
|
|
192
203
|
}
|
|
193
204
|
},
|
|
@@ -205,17 +216,17 @@ const Ie = {
|
|
|
205
216
|
beginAtZero: !0,
|
|
206
217
|
border: { display: !1 },
|
|
207
218
|
// hide left borderline
|
|
208
|
-
stacked:
|
|
219
|
+
stacked: p.value,
|
|
209
220
|
// stack on top of each other
|
|
210
221
|
// ticks
|
|
211
222
|
ticks: {
|
|
212
|
-
color:
|
|
223
|
+
color: P,
|
|
213
224
|
font: N,
|
|
214
225
|
padding: 8,
|
|
215
|
-
stepSize:
|
|
216
|
-
min:
|
|
217
|
-
max:
|
|
218
|
-
callback: (
|
|
226
|
+
stepSize: V.value,
|
|
227
|
+
min: D.value,
|
|
228
|
+
max: V.value * t.tickCount,
|
|
229
|
+
callback: (e) => F(e, t.yAxisFormat)
|
|
219
230
|
},
|
|
220
231
|
// grid lines
|
|
221
232
|
grid: {
|
|
@@ -227,80 +238,82 @@ const Ie = {
|
|
|
227
238
|
}
|
|
228
239
|
}
|
|
229
240
|
})
|
|
230
|
-
), R = C(null), l = C(null), { position: w } =
|
|
231
|
-
|
|
241
|
+
), R = C(null), l = C(null), { position: w } = Lt(
|
|
242
|
+
d,
|
|
232
243
|
R,
|
|
233
244
|
l,
|
|
234
|
-
|
|
235
|
-
),
|
|
245
|
+
t.tooltipRespectsTopEdge
|
|
246
|
+
), Z = o(() => ({
|
|
236
247
|
left: `${w.value.left}px`,
|
|
237
248
|
top: `${w.value.top}px`,
|
|
238
249
|
opacity: l.value?.opacity || 0
|
|
239
|
-
})), { minValue:
|
|
240
|
-
parsingConfig:
|
|
241
|
-
dataSets:
|
|
242
|
-
isStacked:
|
|
243
|
-
}),
|
|
244
|
-
() =>
|
|
245
|
-
),
|
|
246
|
-
() => (
|
|
250
|
+
})), { minValue: D, maxValue: Y } = Bt({
|
|
251
|
+
parsingConfig: L.value,
|
|
252
|
+
dataSets: f,
|
|
253
|
+
isStacked: p
|
|
254
|
+
}), V = o(
|
|
255
|
+
() => bt(D.value, Y.value, t.tickCount)
|
|
256
|
+
), j = o(
|
|
257
|
+
() => (t.compactHeader ? St : xt) + "px"
|
|
247
258
|
);
|
|
248
|
-
return (
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
"chart-type":
|
|
252
|
-
"onUpdate:chart-type": r[0] || (r[0] = (
|
|
253
|
-
"type-switcher":
|
|
254
|
-
header:
|
|
255
|
-
subheader:
|
|
256
|
-
|
|
257
|
-
"trend-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
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),
|
|
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 }, [
|
|
273
|
+
e.$slots["subheader-tooltip"] ? {
|
|
261
274
|
name: "subheader-tooltip",
|
|
262
|
-
fn:
|
|
263
|
-
|
|
275
|
+
fn: lt(() => [
|
|
276
|
+
rt(e.$slots, "subheader-tooltip", {}, void 0, !0)
|
|
264
277
|
]),
|
|
265
278
|
key: "0"
|
|
266
279
|
} : void 0
|
|
267
|
-
]), 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"])
|
|
268
281
|
]),
|
|
269
|
-
|
|
270
|
-
|
|
282
|
+
m("div", Pt, [
|
|
283
|
+
m("canvas", {
|
|
271
284
|
ref_key: "chartRef",
|
|
272
|
-
ref:
|
|
285
|
+
ref: d,
|
|
273
286
|
class: "chart__canvas"
|
|
274
287
|
}, null, 512),
|
|
275
|
-
|
|
288
|
+
m("div", {
|
|
276
289
|
ref_key: "tooltipRef",
|
|
277
290
|
ref: R,
|
|
278
291
|
class: "chart__tooltip",
|
|
279
|
-
style:
|
|
292
|
+
style: it(c(Z))
|
|
280
293
|
}, [
|
|
281
|
-
l.value ? (
|
|
294
|
+
l.value ? (h(), g(Et, {
|
|
282
295
|
key: 0,
|
|
283
296
|
title: String(l.value.title),
|
|
284
297
|
"data-points": l.value.dataPoints,
|
|
285
|
-
"x-axis-format":
|
|
286
|
-
"y-axis-format":
|
|
298
|
+
"x-axis-format": a.xAxisFormat,
|
|
299
|
+
"y-axis-format": a.yAxisFormat,
|
|
287
300
|
"total-label": l.value.footer[0],
|
|
288
301
|
"total-value": Number(l.value.footer[1])
|
|
289
|
-
}, 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)
|
|
290
303
|
], 4)
|
|
291
304
|
])
|
|
292
|
-
])) :
|
|
305
|
+
])) : a.loading ? (h(), g(Vt, {
|
|
293
306
|
key: 1,
|
|
294
307
|
class: "chart-loading"
|
|
295
|
-
})) :
|
|
308
|
+
})) : c(k) ? (h(), g(c(Dt), {
|
|
296
309
|
key: 2,
|
|
297
310
|
class: "chart-empty",
|
|
298
|
-
title:
|
|
299
|
-
subtitle:
|
|
300
|
-
"icon-name":
|
|
301
|
-
}, null, 8, ["title", "subtitle", "icon-name"])) :
|
|
311
|
+
title: a.noDataTitle,
|
|
312
|
+
subtitle: a.noDataSubtitle,
|
|
313
|
+
"icon-name": a.noDataIcon
|
|
314
|
+
}, null, 8, ["title", "subtitle", "icon-name"])) : H("", !0);
|
|
302
315
|
}
|
|
303
316
|
});
|
|
304
317
|
export {
|
|
305
|
-
|
|
318
|
+
te as default
|
|
306
319
|
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
selected: unknown;
|
|
3
|
+
options: unknown[];
|
|
4
|
+
optionNameKey: string;
|
|
5
|
+
}>, {
|
|
6
|
+
options: () => any[];
|
|
7
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
"update:selected": (option: unknown) => void;
|
|
9
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
10
|
+
selected: unknown;
|
|
11
|
+
options: unknown[];
|
|
12
|
+
optionNameKey: string;
|
|
13
|
+
}>, {
|
|
14
|
+
options: () => any[];
|
|
15
|
+
}>>> & {
|
|
16
|
+
"onUpdate:selected"?: (option: unknown) => any;
|
|
17
|
+
}, {
|
|
18
|
+
options: unknown[];
|
|
19
|
+
}>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
22
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
23
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
24
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
25
|
+
} : {
|
|
26
|
+
type: import('vue').PropType<T[K]>;
|
|
27
|
+
required: true;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
type __VLS_WithDefaults<P, D> = {
|
|
31
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
32
|
+
default: D[K];
|
|
33
|
+
}> : P[K];
|
|
34
|
+
};
|
|
35
|
+
type __VLS_Prettify<T> = {
|
|
36
|
+
[K in keyof T]: T[K];
|
|
37
|
+
} & {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { defineComponent as l, openBlock as m, createElementBlock as s, createVNode as r, unref as n, isRef as d, withCtx as a, mergeProps as c } from "vue";
|
|
2
|
+
import u from "../dropdown/v4/DropdownV4.vue.js";
|
|
3
|
+
import "../dropdown/v4/DefaultDropdownTrigger.vue.js";
|
|
4
|
+
import f from "../dropdown/v4/IconButtonDropdownTrigger.vue.js";
|
|
5
|
+
import "../dropdown/v4/ChipDropdownTrigger.vue.js";
|
|
6
|
+
import "../dropdown/v4/AppDropdownTrigger.vue.js";
|
|
7
|
+
import "../dropdown/v4/ButtonDropdownTrigger.vue.js";
|
|
8
|
+
import "../dropdown/v4/ButtonFilterDropdownTrigger.vue.js";
|
|
9
|
+
import "../dropdown/v4/TreeDropdown.vue.js";
|
|
10
|
+
import "../dropdown/v4/OptionV4.vue.js";
|
|
11
|
+
import "../dropdown/v4/ConditionalDropdown.vue.js";
|
|
12
|
+
import { useVModel as g } from "@vueuse/core";
|
|
13
|
+
const y = { class: "legend-sorting" }, L = /* @__PURE__ */ l({
|
|
14
|
+
__name: "LegendSorting",
|
|
15
|
+
props: {
|
|
16
|
+
selected: null,
|
|
17
|
+
options: { default: () => [] },
|
|
18
|
+
optionNameKey: null
|
|
19
|
+
},
|
|
20
|
+
emits: ["update:selected"],
|
|
21
|
+
setup(o, { emit: p }) {
|
|
22
|
+
const t = g(o, "selected", p);
|
|
23
|
+
return (v, i) => (m(), s("div", y, [
|
|
24
|
+
r(n(u), {
|
|
25
|
+
selected: n(t),
|
|
26
|
+
"onUpdate:selected": i[0] || (i[0] = (e) => d(t) ? t.value = e : null),
|
|
27
|
+
"display-value": (e) => e[o.optionNameKey],
|
|
28
|
+
options: o.options,
|
|
29
|
+
"option-name-key": o.optionNameKey,
|
|
30
|
+
placement: "bottom-end"
|
|
31
|
+
}, {
|
|
32
|
+
"dropdown-trigger": a(({ buttonTriggerProps: e }) => [
|
|
33
|
+
r(n(f), c(e, {
|
|
34
|
+
"icon-name": "funnel-simple",
|
|
35
|
+
"icon-type": "regular"
|
|
36
|
+
}), null, 16)
|
|
37
|
+
]),
|
|
38
|
+
_: 1
|
|
39
|
+
}, 8, ["selected", "display-value", "options", "option-name-key"])
|
|
40
|
+
]));
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
export {
|
|
44
|
+
L as default
|
|
45
|
+
};
|
|
@@ -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
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../SettingsHeader.
|
|
2
|
-
import
|
|
1
|
+
import "../../SettingsHeader.vue_vue_type_style_index_0_scoped_01f78cd7_lang.css"; import { defineComponent as h, computed as g, openBlock as y, createElementBlock as f, createElementVNode as r, normalizeClass as l, renderSlot as i, createVNode as p, unref as t, isRef as v, withCtx as T, mergeProps as b } from "vue";
|
|
2
|
+
import w from "../dropdown/v4/DropdownV4.vue.js";
|
|
3
3
|
import "../dropdown/v4/DefaultDropdownTrigger.vue.js";
|
|
4
4
|
import "../dropdown/v4/IconButtonDropdownTrigger.vue.js";
|
|
5
5
|
import "../dropdown/v4/ChipDropdownTrigger.vue.js";
|
|
@@ -10,7 +10,7 @@ import "../dropdown/v4/TreeDropdown.vue.js";
|
|
|
10
10
|
import "../dropdown/v4/OptionV4.vue.js";
|
|
11
11
|
import "../dropdown/v4/ConditionalDropdown.vue.js";
|
|
12
12
|
import { DROPDOWN_TYPE_OPTIONS as c } from "./consts.js";
|
|
13
|
-
const
|
|
13
|
+
const B = { class: "settings-header-container" }, C = { class: "chart-type-selection" }, H = /* @__PURE__ */ h({
|
|
14
14
|
__name: "SettingsHeader",
|
|
15
15
|
props: {
|
|
16
16
|
chartType: null,
|
|
@@ -25,41 +25,42 @@ const _ = { class: "settings-header-container" }, B = { class: "chart-type-selec
|
|
|
25
25
|
set(e) {
|
|
26
26
|
m("update:chartType", e.id);
|
|
27
27
|
}
|
|
28
|
-
}),
|
|
29
|
-
return (e,
|
|
28
|
+
}), d = (e) => `Chart: ${e.name}`;
|
|
29
|
+
return (e, a) => (y(), f("div", B, [
|
|
30
30
|
r("div", {
|
|
31
|
-
class:
|
|
31
|
+
class: l(["settings", { "settings-spacer": !s.hideLegend }])
|
|
32
32
|
}, [
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
i(e.$slots, "before-chart-type", {}, void 0, !0),
|
|
34
|
+
r("div", C, [
|
|
35
|
+
p(t(w), {
|
|
35
36
|
selected: t(o),
|
|
36
|
-
"onUpdate:selected":
|
|
37
|
+
"onUpdate:selected": a[0] || (a[0] = (n) => v(o) ? o.value = n : null),
|
|
37
38
|
options: t(c),
|
|
38
39
|
"option-name-key": "name",
|
|
39
|
-
"display-value":
|
|
40
|
+
"display-value": d,
|
|
40
41
|
placeholder: "Select chart type",
|
|
41
42
|
size: "small"
|
|
42
43
|
}, {
|
|
43
44
|
"dropdown-trigger": T(({ buttonTriggerProps: n }) => [
|
|
44
|
-
|
|
45
|
-
label:
|
|
45
|
+
p(t(k), b(n, {
|
|
46
|
+
label: d(t(o))
|
|
46
47
|
}), null, 16, ["label"])
|
|
47
48
|
]),
|
|
48
49
|
_: 1
|
|
49
50
|
}, 8, ["selected", "options"])
|
|
50
51
|
]),
|
|
51
52
|
r("div", null, [
|
|
52
|
-
|
|
53
|
+
i(e.$slots, "metric", {}, void 0, !0)
|
|
53
54
|
])
|
|
54
55
|
], 2),
|
|
55
56
|
r("div", {
|
|
56
|
-
class:
|
|
57
|
+
class: l(["breakdowns", { "breakdowns-border": !s.hideLegend }])
|
|
57
58
|
}, [
|
|
58
|
-
|
|
59
|
+
i(e.$slots, "breakdowns", {}, void 0, !0)
|
|
59
60
|
], 2)
|
|
60
61
|
]));
|
|
61
62
|
}
|
|
62
63
|
});
|
|
63
64
|
export {
|
|
64
|
-
|
|
65
|
+
H as default
|
|
65
66
|
};
|