@ironsource/shared-ui 2.1.11-test.52 → 2.1.11-test.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Chart.vue_vue_type_style_index_0_scoped_026d82c5_lang.css +1 -0
- package/ChartLegend.vue_vue_type_style_index_0_scoped_aa32a103_lang.css +1 -0
- package/ChartLoader.vue_vue_type_style_index_0_scoped_ffa4cc66_lang.css +1 -0
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_2a77c137_lang.css +1 -0
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_8a2714eb_lang.css +1 -0
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_73bf9b5b_lang.css +1 -0
- package/EditableV4.vue_vue_type_style_index_0_scoped_1bbe222a_lang.css +1 -0
- package/IconFlag.vue_vue_type_style_index_0_scoped_6526c390_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_5ff4b654_lang.css +1 -0
- package/SortableItem.vue_vue_type_style_index_0_scoped_48542664_lang.css +1 -0
- package/SortableList.vue_vue_type_style_index_0_scoped_8f267f88_lang.css +1 -0
- package/TextField.vue_vue_type_style_index_0_scoped_fce3948c_lang.css +1 -0
- package/TooltipV4.vue_vue_type_style_index_0_scoped_66eab856_lang.css +1 -0
- package/TooltipV4.vue_vue_type_style_index_1_lang.css +1 -1
- package/Typography.vue_vue_type_style_index_0_scoped_07b259bf_lang.css +1 -0
- package/components/button/v3/Button.vue.d.ts +6 -6
- package/components/button/v3/index.d.ts +14 -14
- package/components/chart/Chart.vue.d.ts +1 -1
- package/components/chart/Chart.vue.js +4 -4
- package/components/chart/Chart.vue2.js +110 -105
- package/components/chart/ChartLegend.vue.js +2 -2
- package/components/chart/ChartLegend.vue2.js +60 -50
- package/components/chart/ChartLoader.vue.js +5 -23
- package/components/chart/ChartLoader.vue2.js +15 -0
- package/components/chart/index.d.ts +20 -20
- package/components/chart/mockData.d.ts +8 -0
- package/components/dateRange/v4/DateRangeV4.vue.js +3 -3
- package/components/dateRange/v4/DateRangeV4.vue2.js +86 -81
- package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +26 -3
- package/components/dropdown/v4/ConditionalDropdown.vue.js +2 -2
- package/components/dropdown/v4/ConditionalDropdown.vue2.js +131 -109
- package/components/dropdown/v4/DefaultDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/DefaultDropdownTrigger.vue2.js +45 -46
- package/components/dropdown/v4/OptionV4.vue.js +2 -2
- package/components/dropdown/v4/OptionV4.vue2.js +97 -98
- package/components/dropdown/v4/index.d.ts +41 -3
- package/components/emptyState/v3/EmptyState.vue.d.ts +3 -3
- package/components/emptyState/v3/index.d.ts +7 -7
- package/components/icon/v4/IconFlag.vue.js +3 -3
- package/components/icon/v4/IconFlag.vue2.js +1 -1
- package/components/input/v4/TextField.vue.js +3 -3
- package/components/input/v4/TextField.vue2.js +184 -164
- package/components/sortableList/SortableItem.vue.d.ts +5 -0
- package/components/sortableList/SortableItem.vue.js +3 -3
- package/components/sortableList/SortableItem.vue2.js +76 -61
- package/components/sortableList/SortableList.vue.d.ts +16 -0
- package/components/sortableList/SortableList.vue.js +3 -3
- package/components/sortableList/SortableList.vue2.js +100 -87
- package/components/sortableList/index.d.ts +59 -1
- package/components/table/v4/DataGrid.vue.d.ts +2 -2
- package/components/table/v4/MultipleDataGrid.vue.d.ts +1 -1
- package/components/table/v4/index.d.ts +59 -59
- package/components/table-cells/common/Editable.common.js +8 -7
- package/components/table-cells/common/EditableContext.d.ts +1 -0
- package/components/table-cells/v4/EditableV4.vue.d.ts +5 -0
- package/components/table-cells/v4/EditableV4.vue.js +3 -3
- package/components/table-cells/v4/EditableV4.vue2.js +11 -10
- package/components/table-cells/v4/index.d.ts +20 -1
- package/components/tooltip/v4/TooltipV4.vue.js +3 -3
- package/components/tooltip/v4/TooltipV4.vue2.js +1 -1
- package/components/typography/v4/Typography.vue.js +3 -3
- package/components/typography/v4/Typography.vue2.js +1 -1
- package/composables/useFormValidation.d.ts +1 -1
- package/index.d.ts +358 -128
- package/index.js +1 -1
- package/package.json +239 -2
- package/testids/index.d.ts +1 -0
- package/testids/index.js +13 -13
- package/Chart.vue_vue_type_style_index_0_scoped_277fde76_lang.css +0 -1
- package/ChartLegend.vue_vue_type_style_index_0_scoped_a1c626cd_lang.css +0 -1
- package/ChartLoader.vue_vue_type_style_index_0_scoped_142c444a_lang.css +0 -1
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_8f96cf5a_lang.css +0 -1
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_309e5351_lang.css +0 -1
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_9fa84b26_lang.css +0 -1
- package/EditableV4.vue_vue_type_style_index_0_scoped_e0c047b4_lang.css +0 -1
- package/IconFlag.vue_vue_type_style_index_0_scoped_7b09cc85_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_2c2947b3_lang.css +0 -1
- package/SortableItem.vue_vue_type_style_index_0_scoped_7cb676f1_lang.css +0 -1
- package/SortableList.vue_vue_type_style_index_0_scoped_156c01ca_lang.css +0 -1
- package/TextField.vue_vue_type_style_index_0_scoped_2e327aa1_lang.css +0 -1
- package/TooltipV4.vue_vue_type_style_index_0_scoped_82b46d6d_lang.css +0 -1
- package/Typography.vue_vue_type_style_index_0_scoped_a14013a5_lang.css +0 -1
- package/consts/configs.js +0 -4
- package/tsconfig.json +0 -157
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import "../../Chart.
|
|
2
|
-
import { useVModel as
|
|
3
|
-
import { Chart as
|
|
1
|
+
import "../../Chart.vue_vue_type_style_index_0_scoped_026d82c5_lang.css"; import { defineComponent as J, computed as i, ref as T, onMounted as Q, watch as C, nextTick as Y, openBlock as d, createElementBlock as k, Fragment as F, createBlock as v, unref as u, isRef as N, withCtx as x, renderSlot as L, createCommentVNode as y, createElementVNode as p, normalizeClass as _, createVNode as H, normalizeStyle as ee } from "vue";
|
|
2
|
+
import { useVModel as te } from "@vueuse/core";
|
|
3
|
+
import { Chart as P, ArcElement as ae, LineElement as oe, BarElement as ie, PointElement as le, LineController as re, BarController as ne, PieController as se, ScatterController as de, CategoryScale as ue, LinearScale as ce, Filler as pe, Tooltip as he } from "chart.js";
|
|
4
4
|
import { HoverVerticalLine as me } from "./plugins/HoverVerticalLine.js";
|
|
5
|
-
import { formatValue as
|
|
6
|
-
import { DEFAULT_TICK_COUNT as
|
|
5
|
+
import { formatValue as U, calcStepSize as fe } from "./utils/utils.js";
|
|
6
|
+
import { DEFAULT_TICK_COUNT as ve, DEFAULT_MIN_VISIBLE as ye, DEFAULT_MAX_VISIBLE as be, COLOR_PALETTE as ge, POINT_BORDER_COLOR as Te, TICK_LABEL_COLOR as z, TICK_LABEL_FONT as M, GRID_LINE_COLOR as $ } from "./consts.js";
|
|
7
7
|
import { ChartType as n } from "./types.js";
|
|
8
|
-
import { useTooltipPosition as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { hexColorToRgba as
|
|
13
|
-
import { useChartValues as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
const
|
|
8
|
+
import { useTooltipPosition as Ce } from "./composables/useTooltipPosition.js";
|
|
9
|
+
import ke from "./ChartTooltip.vue.js";
|
|
10
|
+
import xe from "./ChartLegend.vue.js";
|
|
11
|
+
import Le from "./ChartHeader.vue.js";
|
|
12
|
+
import { hexColorToRgba as Se } from "../../utils/color.js";
|
|
13
|
+
import { useChartValues as we } from "./composables/useChartValues.js";
|
|
14
|
+
import Be from "./ChartLoader.vue.js";
|
|
15
|
+
import Ie from "../emptyState/v4/EmptyStateV4.vue.js";
|
|
16
|
+
import Ae from "./SettingsHeader.vue.js";
|
|
17
|
+
const Ee = { class: "chart-container" }, Ve = { class: "header-wrapper" }, Re = { class: "chart" }, De = {
|
|
18
18
|
key: 0,
|
|
19
19
|
class: "chart-sidebar"
|
|
20
|
-
},
|
|
20
|
+
}, Je = /* @__PURE__ */ J({
|
|
21
21
|
__name: "Chart",
|
|
22
22
|
props: {
|
|
23
23
|
dataSets: { default: () => [] },
|
|
@@ -26,13 +26,13 @@ const Ae = { class: "chart-container" }, Ee = { class: "header-wrapper" }, Ve =
|
|
|
26
26
|
parsing: { default: void 0 },
|
|
27
27
|
xAxisFormat: { default: "string" },
|
|
28
28
|
yAxisFormat: { default: "number" },
|
|
29
|
-
tickCount: { default:
|
|
29
|
+
tickCount: { default: ve },
|
|
30
30
|
header: { default: "" },
|
|
31
31
|
subheader: { default: "" },
|
|
32
32
|
withSubheaderTooltip: { type: Boolean, default: !1 },
|
|
33
33
|
hideLegend: { type: Boolean, default: !1 },
|
|
34
|
-
minVisible: { default:
|
|
35
|
-
maxVisible: { default:
|
|
34
|
+
minVisible: { default: ye },
|
|
35
|
+
maxVisible: { default: be },
|
|
36
36
|
loading: { type: Boolean, default: !1 },
|
|
37
37
|
noDataIcon: { default: "file-x" },
|
|
38
38
|
noDataTitle: { default: "No data to display" },
|
|
@@ -42,10 +42,9 @@ const Ae = { class: "chart-container" }, Ee = { class: "header-wrapper" }, Ve =
|
|
|
42
42
|
withAnimation: { type: Boolean, default: !0 }
|
|
43
43
|
},
|
|
44
44
|
emits: ["update:chartType", "update:visibleIds"],
|
|
45
|
-
setup(a, { emit:
|
|
45
|
+
setup(a, { emit: S }) {
|
|
46
46
|
const t = a;
|
|
47
|
-
|
|
48
|
-
te,
|
|
47
|
+
P.register(
|
|
49
48
|
ae,
|
|
50
49
|
oe,
|
|
51
50
|
ie,
|
|
@@ -57,50 +56,55 @@ const Ae = { class: "chart-container" }, Ee = { class: "header-wrapper" }, Ve =
|
|
|
57
56
|
ue,
|
|
58
57
|
ce,
|
|
59
58
|
pe,
|
|
59
|
+
he,
|
|
60
60
|
me
|
|
61
61
|
);
|
|
62
|
-
const c =
|
|
62
|
+
const c = te(t, "chartType", S), K = i(
|
|
63
63
|
() => t.withAnimation ? "" : "none"
|
|
64
|
-
),
|
|
64
|
+
), h = T(null);
|
|
65
65
|
let s = null;
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
s && (s.data.datasets =
|
|
66
|
+
const w = i(() => t.dataSets.length === 0), B = i(() => !t.loading && !w.value), b = () => {
|
|
67
|
+
h.value && (s && s.destroy(), s = new P(h.value, E.value));
|
|
68
|
+
}, W = () => {
|
|
69
|
+
s && (s.data.datasets = g.value, s.options = E.value.options, s.update(K.value));
|
|
70
70
|
};
|
|
71
|
-
|
|
72
|
-
e && (await
|
|
73
|
-
}),
|
|
74
|
-
const
|
|
71
|
+
Q(b), C(() => t.chartType, b), C(B, async (e) => {
|
|
72
|
+
e && (await Y(), b());
|
|
73
|
+
}), C([() => t.visibleIds, () => t.dataSets], W);
|
|
74
|
+
const m = i(
|
|
75
75
|
() => t.chartType === n.StackedLine || t.chartType === n.StackedBar
|
|
76
|
-
),
|
|
76
|
+
), I = i(
|
|
77
77
|
() => t.chartType === n.Line || t.chartType === n.StackedLine
|
|
78
|
-
),
|
|
78
|
+
), f = i(
|
|
79
79
|
() => t.dataSets.filter((e) => t.visibleIds.includes(e.id))
|
|
80
|
-
),
|
|
81
|
-
const
|
|
80
|
+
), g = i(() => f.value.map((e, o) => {
|
|
81
|
+
const l = e.color || ge[o] || "#000000";
|
|
82
82
|
return {
|
|
83
83
|
...e,
|
|
84
|
-
fill:
|
|
85
|
-
backgroundColor:
|
|
86
|
-
|
|
84
|
+
fill: m.value ? "start" : void 0,
|
|
85
|
+
backgroundColor: Se(
|
|
86
|
+
l,
|
|
87
87
|
t.chartType === n.StackedLine ? 10 : 70
|
|
88
88
|
),
|
|
89
|
-
borderColor:
|
|
90
|
-
pointBackgroundColor:
|
|
91
|
-
pointHoverBorderColor:
|
|
89
|
+
borderColor: l,
|
|
90
|
+
pointBackgroundColor: l,
|
|
91
|
+
pointHoverBorderColor: l,
|
|
92
92
|
maxBarThickness: 50,
|
|
93
93
|
clip: 5,
|
|
94
94
|
// draw a bit outside the chart area
|
|
95
95
|
icon: e.icon || null,
|
|
96
96
|
iconType: e.iconType || "branded"
|
|
97
97
|
};
|
|
98
|
-
})),
|
|
98
|
+
})), A = i(
|
|
99
|
+
() => f.value.length && f.value.every(
|
|
100
|
+
(e) => e.data.length === 1
|
|
101
|
+
)
|
|
102
|
+
), E = i(
|
|
99
103
|
() => ({
|
|
100
104
|
type: t.chartType == n.Bar || t.chartType === n.StackedBar ? "bar" : "line",
|
|
101
105
|
// Chart Data
|
|
102
106
|
data: {
|
|
103
|
-
datasets:
|
|
107
|
+
datasets: g.value
|
|
104
108
|
},
|
|
105
109
|
// Chart Options
|
|
106
110
|
options: {
|
|
@@ -114,7 +118,7 @@ const Ae = { class: "chart-container" }, Ee = { class: "header-wrapper" }, Ve =
|
|
|
114
118
|
plugins: {
|
|
115
119
|
legend: { display: !1 },
|
|
116
120
|
title: { display: !1 },
|
|
117
|
-
hoverVerticalLine:
|
|
121
|
+
hoverVerticalLine: I.value,
|
|
118
122
|
// tooltip
|
|
119
123
|
tooltip: {
|
|
120
124
|
enabled: !1,
|
|
@@ -124,7 +128,7 @@ const Ae = { class: "chart-container" }, Ee = { class: "header-wrapper" }, Ve =
|
|
|
124
128
|
},
|
|
125
129
|
callbacks: {
|
|
126
130
|
footer: (e) => {
|
|
127
|
-
const o = e.reduce((
|
|
131
|
+
const o = e.reduce((l, q) => l + (q.parsed.y || 0), 0);
|
|
128
132
|
return ["Total", String(o)];
|
|
129
133
|
}
|
|
130
134
|
}
|
|
@@ -147,12 +151,12 @@ const Ae = { class: "chart-container" }, Ee = { class: "header-wrapper" }, Ve =
|
|
|
147
151
|
tension: 0.3
|
|
148
152
|
},
|
|
149
153
|
point: {
|
|
150
|
-
radius: 1,
|
|
154
|
+
radius: A.value ? 3 : 1,
|
|
151
155
|
hitRadius: 8,
|
|
152
156
|
borderWidth: 0,
|
|
153
157
|
hoverRadius: 4,
|
|
154
158
|
hoverBorderWidth: 2,
|
|
155
|
-
pointHoverBackgroundColor:
|
|
159
|
+
pointHoverBackgroundColor: Te
|
|
156
160
|
},
|
|
157
161
|
bar: {
|
|
158
162
|
borderRadius: 4
|
|
@@ -162,16 +166,17 @@ const Ae = { class: "chart-container" }, Ee = { class: "header-wrapper" }, Ve =
|
|
|
162
166
|
// Horizontal Axis (X)
|
|
163
167
|
x: {
|
|
164
168
|
beginAtZero: !0,
|
|
169
|
+
offset: !I.value || A.value,
|
|
165
170
|
border: { display: !1 },
|
|
166
|
-
stacked:
|
|
171
|
+
stacked: m.value,
|
|
167
172
|
// stack on top of each other
|
|
168
173
|
// ticks
|
|
169
174
|
ticks: {
|
|
170
|
-
color:
|
|
171
|
-
font:
|
|
175
|
+
color: z,
|
|
176
|
+
font: M,
|
|
172
177
|
padding: 4,
|
|
173
178
|
callback: function(e) {
|
|
174
|
-
return
|
|
179
|
+
return U(
|
|
175
180
|
this.getLabelForValue(e),
|
|
176
181
|
t.xAxisFormat
|
|
177
182
|
);
|
|
@@ -179,7 +184,7 @@ const Ae = { class: "chart-container" }, Ee = { class: "header-wrapper" }, Ve =
|
|
|
179
184
|
},
|
|
180
185
|
// grid lines
|
|
181
186
|
grid: {
|
|
182
|
-
color:
|
|
187
|
+
color: $,
|
|
183
188
|
drawOnChartArea: !1,
|
|
184
189
|
drawTicks: !0,
|
|
185
190
|
drawBorder: !1,
|
|
@@ -191,21 +196,21 @@ const Ae = { class: "chart-container" }, Ee = { class: "header-wrapper" }, Ve =
|
|
|
191
196
|
beginAtZero: !0,
|
|
192
197
|
border: { display: !1 },
|
|
193
198
|
// hide left borderline
|
|
194
|
-
stacked:
|
|
199
|
+
stacked: m.value,
|
|
195
200
|
// stack on top of each other
|
|
196
201
|
// ticks
|
|
197
202
|
ticks: {
|
|
198
|
-
color:
|
|
199
|
-
font:
|
|
203
|
+
color: z,
|
|
204
|
+
font: M,
|
|
200
205
|
padding: 8,
|
|
201
|
-
stepSize:
|
|
202
|
-
min:
|
|
203
|
-
max:
|
|
204
|
-
callback: (e) =>
|
|
206
|
+
stepSize: O.value,
|
|
207
|
+
min: D.value,
|
|
208
|
+
max: O.value * t.tickCount,
|
|
209
|
+
callback: (e) => U(e, t.yAxisFormat)
|
|
205
210
|
},
|
|
206
211
|
// grid lines
|
|
207
212
|
grid: {
|
|
208
|
-
color:
|
|
213
|
+
color: $,
|
|
209
214
|
drawOnChartArea: !0,
|
|
210
215
|
drawTicks: !1
|
|
211
216
|
}
|
|
@@ -213,78 +218,78 @@ const Ae = { class: "chart-container" }, Ee = { class: "header-wrapper" }, Ve =
|
|
|
213
218
|
}
|
|
214
219
|
}
|
|
215
220
|
})
|
|
216
|
-
),
|
|
217
|
-
() =>
|
|
218
|
-
),
|
|
221
|
+
), Z = i(
|
|
222
|
+
() => g.value.reduce((e, o) => (e[o.id] = o.borderColor, e), {})
|
|
223
|
+
), G = i(() => t.dataSets.map((e) => ({
|
|
219
224
|
id: e.id,
|
|
220
225
|
label: e.label,
|
|
221
226
|
caption: e.caption || null,
|
|
222
|
-
color:
|
|
227
|
+
color: Z.value[e.id] || null,
|
|
223
228
|
icon: e.icon || null,
|
|
224
229
|
iconType: e.iconType || "branded"
|
|
225
|
-
}))),
|
|
226
|
-
|
|
227
|
-
|
|
230
|
+
}))), V = T(null), r = T(null), { position: R } = Ce(
|
|
231
|
+
h,
|
|
232
|
+
V,
|
|
228
233
|
r
|
|
229
|
-
),
|
|
230
|
-
left: `${
|
|
231
|
-
top: `${
|
|
234
|
+
), X = i(() => ({
|
|
235
|
+
left: `${R.value.left}px`,
|
|
236
|
+
top: `${R.value.top}px`,
|
|
232
237
|
opacity: r.value?.opacity || 0
|
|
233
|
-
})), { minValue:
|
|
238
|
+
})), { minValue: D, maxValue: j } = we({
|
|
234
239
|
parsingConfig: t.parsing,
|
|
235
|
-
dataSets:
|
|
236
|
-
isStacked:
|
|
237
|
-
}),
|
|
238
|
-
() =>
|
|
240
|
+
dataSets: f,
|
|
241
|
+
isStacked: m
|
|
242
|
+
}), O = i(
|
|
243
|
+
() => fe(D.value, j.value, t.tickCount)
|
|
239
244
|
);
|
|
240
|
-
return (e, o) => (d(),
|
|
241
|
-
a.withSettingsHeader ? (d(),
|
|
245
|
+
return (e, o) => (d(), k(F, null, [
|
|
246
|
+
a.withSettingsHeader ? (d(), v(Ae, {
|
|
242
247
|
key: 0,
|
|
243
248
|
"chart-type": u(c),
|
|
244
|
-
"onUpdate:chart-type": o[0] || (o[0] = (
|
|
249
|
+
"onUpdate:chart-type": o[0] || (o[0] = (l) => N(c) ? c.value = l : null),
|
|
245
250
|
"hide-legend": a.hideLegend
|
|
246
251
|
}, {
|
|
247
|
-
metric:
|
|
248
|
-
|
|
252
|
+
metric: x(() => [
|
|
253
|
+
L(e.$slots, "metric", {}, void 0, !0)
|
|
249
254
|
]),
|
|
250
|
-
breakdowns:
|
|
251
|
-
|
|
255
|
+
breakdowns: x(() => [
|
|
256
|
+
L(e.$slots, "breakdowns", {}, void 0, !0)
|
|
252
257
|
]),
|
|
253
258
|
_: 3
|
|
254
|
-
}, 8, ["chart-type", "hide-legend"])) :
|
|
255
|
-
p("div",
|
|
256
|
-
u(
|
|
259
|
+
}, 8, ["chart-type", "hide-legend"])) : y("", !0),
|
|
260
|
+
p("div", Ee, [
|
|
261
|
+
u(B) ? (d(), k(F, { key: 0 }, [
|
|
257
262
|
p("section", {
|
|
258
|
-
class:
|
|
263
|
+
class: _(["chart-content", [{ "with-legend": !a.hideLegend }]])
|
|
259
264
|
}, [
|
|
260
|
-
p("div",
|
|
261
|
-
|
|
265
|
+
p("div", Ve, [
|
|
266
|
+
H(Le, {
|
|
262
267
|
"chart-type": u(c),
|
|
263
|
-
"onUpdate:chart-type": o[1] || (o[1] = (
|
|
268
|
+
"onUpdate:chart-type": o[1] || (o[1] = (l) => N(c) ? c.value = l : null),
|
|
264
269
|
"with-settings-header": a.withSettingsHeader,
|
|
265
270
|
header: a.header,
|
|
266
271
|
subheader: a.subheader,
|
|
267
272
|
"with-subheader-tooltip": a.withSubheaderTooltip
|
|
268
273
|
}, {
|
|
269
|
-
"subheader-tooltip":
|
|
270
|
-
|
|
274
|
+
"subheader-tooltip": x(() => [
|
|
275
|
+
L(e.$slots, "subheader-tooltip", {}, void 0, !0)
|
|
271
276
|
]),
|
|
272
277
|
_: 3
|
|
273
278
|
}, 8, ["chart-type", "with-settings-header", "header", "subheader", "with-subheader-tooltip"])
|
|
274
279
|
]),
|
|
275
|
-
p("div",
|
|
280
|
+
p("div", Re, [
|
|
276
281
|
p("canvas", {
|
|
277
282
|
ref_key: "chartRef",
|
|
278
|
-
ref:
|
|
283
|
+
ref: h,
|
|
279
284
|
class: "chart__canvas"
|
|
280
285
|
}, null, 512),
|
|
281
286
|
p("div", {
|
|
282
287
|
ref_key: "tooltipRef",
|
|
283
|
-
ref:
|
|
288
|
+
ref: V,
|
|
284
289
|
class: "chart__tooltip",
|
|
285
|
-
style:
|
|
290
|
+
style: ee(u(X))
|
|
286
291
|
}, [
|
|
287
|
-
r.value ? (d(),
|
|
292
|
+
r.value ? (d(), v(ke, {
|
|
288
293
|
key: 0,
|
|
289
294
|
title: String(r.value.title),
|
|
290
295
|
"data-points": r.value.dataPoints,
|
|
@@ -292,28 +297,28 @@ const Ae = { class: "chart-container" }, Ee = { class: "header-wrapper" }, Ve =
|
|
|
292
297
|
"y-axis-format": a.yAxisFormat,
|
|
293
298
|
"total-label": r.value.footer[0],
|
|
294
299
|
"total-value": Number(r.value.footer[1])
|
|
295
|
-
}, null, 8, ["title", "data-points", "x-axis-format", "y-axis-format", "total-label", "total-value"])) :
|
|
300
|
+
}, null, 8, ["title", "data-points", "x-axis-format", "y-axis-format", "total-label", "total-value"])) : y("", !0)
|
|
296
301
|
], 4)
|
|
297
302
|
])
|
|
298
303
|
], 2),
|
|
299
|
-
a.hideLegend ?
|
|
300
|
-
|
|
301
|
-
items: u(
|
|
304
|
+
a.hideLegend ? y("", !0) : (d(), k("section", De, [
|
|
305
|
+
H(xe, {
|
|
306
|
+
items: u(G),
|
|
302
307
|
"visible-ids": a.visibleIds,
|
|
303
308
|
"max-limit-tooltip-text": a.maxLimitTooltipText,
|
|
304
|
-
"onUpdate:visibleIds": o[2] || (o[2] = (
|
|
309
|
+
"onUpdate:visibleIds": o[2] || (o[2] = (l) => S("update:visibleIds", l))
|
|
305
310
|
}, null, 8, ["items", "visible-ids", "max-limit-tooltip-text"])
|
|
306
311
|
]))
|
|
307
|
-
], 64)) : a.loading ? (d(),
|
|
312
|
+
], 64)) : a.loading ? (d(), v(Be, { key: 1 })) : u(w) ? (d(), v(u(Ie), {
|
|
308
313
|
key: 2,
|
|
309
314
|
title: a.noDataTitle,
|
|
310
315
|
subtitle: a.noDataSubtitle,
|
|
311
316
|
"icon-name": a.noDataIcon
|
|
312
|
-
}, null, 8, ["title", "subtitle", "icon-name"])) :
|
|
317
|
+
}, null, 8, ["title", "subtitle", "icon-name"])) : y("", !0)
|
|
313
318
|
])
|
|
314
319
|
], 64));
|
|
315
320
|
}
|
|
316
321
|
});
|
|
317
322
|
export {
|
|
318
|
-
|
|
323
|
+
Je as default
|
|
319
324
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./ChartLegend.vue2.js";
|
|
2
2
|
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../ChartLegend.
|
|
4
|
-
const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-
|
|
3
|
+
// import "../../ChartLegend.vue_vue_type_style_index_0_scoped_aa32a103_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-aa32a103"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import "../../ChartLegend.
|
|
1
|
+
import "../../ChartLegend.vue_vue_type_style_index_0_scoped_aa32a103_lang.css"; import { defineComponent as D, ref as M, computed as m, openBlock as n, createElementBlock as d, createElementVNode as r, createVNode as s, unref as o, mergeProps as I, withCtx as c, createTextVNode as b, Fragment as S, renderList as P, normalizeClass as A, withModifiers as F, createBlock as H, createCommentVNode as U, toDisplayString as L } from "vue";
|
|
2
2
|
import { useVirtualList as z } from "@vueuse/core";
|
|
3
|
-
import
|
|
3
|
+
import f from "../typography/v4/Typography.vue.js";
|
|
4
4
|
import R from "../checkbox/v4/CheckboxV4.vue.js";
|
|
5
5
|
import q from "../search/v4/SearchV4.vue.js";
|
|
6
6
|
import { DEFAULT_MIN_VISIBLE as G, DEFAULT_MAX_VISIBLE as X } from "./consts.js";
|
|
7
7
|
import $ from "../icon/v4/IconV4.vue.js";
|
|
8
8
|
import "../icon/v4/IconFlag.vue.js";
|
|
9
9
|
import j from "../tooltip/v4/TooltipV4.vue.js";
|
|
10
|
-
const J = { class: "chart-legend" }, K = { class: "search-box" }, O =
|
|
10
|
+
const J = { class: "chart-legend" }, K = { class: "search-box" }, O = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "empty-list"
|
|
13
|
+
}, Q = ["onClick"], W = { class: "label-container" }, ne = /* @__PURE__ */ D({
|
|
11
14
|
__name: "ChartLegend",
|
|
12
15
|
props: {
|
|
13
16
|
items: { default: () => [] },
|
|
@@ -17,70 +20,77 @@ const J = { class: "chart-legend" }, K = { class: "search-box" }, O = ["onClick"
|
|
|
17
20
|
maxLimitTooltipText: { default: "" }
|
|
18
21
|
},
|
|
19
22
|
emits: ["update:visibleIds"],
|
|
20
|
-
setup(
|
|
21
|
-
const
|
|
22
|
-
const t =
|
|
23
|
-
return
|
|
24
|
-
(
|
|
23
|
+
setup(v, { emit: g }) {
|
|
24
|
+
const l = v, k = 32, p = M(""), T = m(() => {
|
|
25
|
+
const t = p.value.toLowerCase();
|
|
26
|
+
return l.items.filter(
|
|
27
|
+
(i) => i.label.toLowerCase().includes(t)
|
|
25
28
|
);
|
|
26
|
-
}),
|
|
27
|
-
() =>
|
|
28
|
-
),
|
|
29
|
-
() =>
|
|
30
|
-
),
|
|
31
|
-
|
|
29
|
+
}), a = (t) => l.visibleIds.includes(t.id), h = m(
|
|
30
|
+
() => l.visibleIds.length >= l.maxVisible
|
|
31
|
+
), y = m(
|
|
32
|
+
() => l.visibleIds.length <= l.minVisible
|
|
33
|
+
), u = (t) => y.value && a(t) || h.value && !a(t), C = (t) => !l.maxLimitTooltipText || a(t) || !h.value, V = (t, i) => {
|
|
34
|
+
g(
|
|
32
35
|
"update:visibleIds",
|
|
33
|
-
t ? [...
|
|
36
|
+
t ? [...l.visibleIds, i.id] : l.visibleIds.filter((e) => e !== i.id)
|
|
34
37
|
);
|
|
35
|
-
}, { list:
|
|
36
|
-
itemHeight:
|
|
38
|
+
}, { list: x, containerProps: w, wrapperProps: E } = z(T, {
|
|
39
|
+
itemHeight: k,
|
|
37
40
|
overscan: 10
|
|
38
|
-
}),
|
|
39
|
-
|
|
41
|
+
}), N = (t) => {
|
|
42
|
+
u(t) || V(!a(t), t);
|
|
40
43
|
};
|
|
41
|
-
return (t,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
modelValue:
|
|
45
|
-
"onUpdate:modelValue":
|
|
44
|
+
return (t, i) => (n(), d("div", J, [
|
|
45
|
+
r("div", K, [
|
|
46
|
+
s(o(q), {
|
|
47
|
+
modelValue: p.value,
|
|
48
|
+
"onUpdate:modelValue": i[0] || (i[0] = (e) => p.value = e)
|
|
46
49
|
}, null, 8, ["modelValue"])
|
|
47
50
|
]),
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
(
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
r("div", I({ class: "legend" }, o(w)), [
|
|
52
|
+
r("ul", I({ class: "legend__list" }, o(E)), [
|
|
53
|
+
o(x).length === 0 ? (n(), d("li", O, [
|
|
54
|
+
s(o(f), { variant: "body2" }, {
|
|
55
|
+
default: c(() => [
|
|
56
|
+
b("No results")
|
|
57
|
+
]),
|
|
58
|
+
_: 1
|
|
59
|
+
})
|
|
60
|
+
])) : (n(!0), d(S, { key: 1 }, P(o(x), ({ data: e, index: B }) => (n(), d("li", {
|
|
61
|
+
key: B,
|
|
62
|
+
class: A({ "disabled-item": u(e) })
|
|
53
63
|
}, [
|
|
54
|
-
|
|
55
|
-
text:
|
|
64
|
+
s(o(j), {
|
|
65
|
+
text: v.maxLimitTooltipText,
|
|
56
66
|
disabled: C(e),
|
|
57
67
|
class: "disabled-tooltip"
|
|
58
68
|
}, {
|
|
59
|
-
default:
|
|
60
|
-
|
|
69
|
+
default: c(() => [
|
|
70
|
+
r("div", {
|
|
61
71
|
class: "item-wrapper",
|
|
62
|
-
onClick: (
|
|
72
|
+
onClick: (_) => N(e)
|
|
63
73
|
}, [
|
|
64
|
-
|
|
74
|
+
s(o(R), {
|
|
65
75
|
color: e.color,
|
|
66
|
-
"is-checked":
|
|
67
|
-
disabled:
|
|
68
|
-
onClick:
|
|
69
|
-
(
|
|
70
|
-
|
|
76
|
+
"is-checked": a(e),
|
|
77
|
+
disabled: u(e),
|
|
78
|
+
onClick: i[1] || (i[1] = F(
|
|
79
|
+
(_) => {
|
|
80
|
+
_.stopPropagation();
|
|
71
81
|
},
|
|
72
82
|
["stop"]
|
|
73
83
|
))
|
|
74
84
|
}, null, 8, ["color", "is-checked", "disabled"]),
|
|
75
|
-
e.icon ? (
|
|
85
|
+
e.icon ? (n(), H(o($), {
|
|
76
86
|
key: 0,
|
|
77
87
|
class: "icon-color",
|
|
78
88
|
type: e.iconType,
|
|
79
89
|
name: e.icon,
|
|
80
90
|
size: "16px"
|
|
81
91
|
}, null, 8, ["type", "name"])) : U("", !0),
|
|
82
|
-
|
|
83
|
-
|
|
92
|
+
r("div", W, [
|
|
93
|
+
s(o(f), {
|
|
84
94
|
variant: "body2",
|
|
85
95
|
class: "legend-label",
|
|
86
96
|
"is-truncated": "",
|
|
@@ -88,12 +98,12 @@ const J = { class: "chart-legend" }, K = { class: "search-box" }, O = ["onClick"
|
|
|
88
98
|
"tooltip-text": e.label,
|
|
89
99
|
"tooltip-placement": "left"
|
|
90
100
|
}, {
|
|
91
|
-
default:
|
|
92
|
-
|
|
101
|
+
default: c(() => [
|
|
102
|
+
b(L(e.label), 1)
|
|
93
103
|
]),
|
|
94
104
|
_: 2
|
|
95
105
|
}, 1032, ["tooltip-text"]),
|
|
96
|
-
|
|
106
|
+
s(o(f), {
|
|
97
107
|
variant: "caption",
|
|
98
108
|
class: "legend-caption legend-label",
|
|
99
109
|
"is-truncated": "",
|
|
@@ -101,13 +111,13 @@ const J = { class: "chart-legend" }, K = { class: "search-box" }, O = ["onClick"
|
|
|
101
111
|
"tooltip-text": e.caption,
|
|
102
112
|
"tooltip-placement": "left"
|
|
103
113
|
}, {
|
|
104
|
-
default:
|
|
105
|
-
|
|
114
|
+
default: c(() => [
|
|
115
|
+
b(L(e.caption), 1)
|
|
106
116
|
]),
|
|
107
117
|
_: 2
|
|
108
118
|
}, 1032, ["tooltip-text"])
|
|
109
119
|
])
|
|
110
|
-
], 8,
|
|
120
|
+
], 8, Q)
|
|
111
121
|
]),
|
|
112
122
|
_: 2
|
|
113
123
|
}, 1032, ["text", "disabled"])
|
|
@@ -118,5 +128,5 @@ const J = { class: "chart-legend" }, K = { class: "search-box" }, O = ["onClick"
|
|
|
118
128
|
}
|
|
119
129
|
});
|
|
120
130
|
export {
|
|
121
|
-
|
|
131
|
+
ne as default
|
|
122
132
|
};
|
|
@@ -1,25 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
/* empty css */import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
viewBox: "0 0 1072 275",
|
|
6
|
-
preserveAspectRatio: "none",
|
|
7
|
-
width: "100%",
|
|
8
|
-
height: "100%",
|
|
9
|
-
fill: "none"
|
|
10
|
-
}, [
|
|
11
|
-
/* @__PURE__ */ t("path", {
|
|
12
|
-
d: "M499.744 87.7024L499 87.4816C399.137 70.0475 293 138.418 218 173.72C120 219.848 87 235.892 0 275L1072 275C979 -57.3526 836.258 -31.5829 732 59.404C648.885 131.939 570.549 108.704 499.744 87.7024Z",
|
|
13
|
-
fill: "black",
|
|
14
|
-
"fill-opacity": "0.05"
|
|
15
|
-
})
|
|
16
|
-
], -1)), _ = [
|
|
17
|
-
p
|
|
18
|
-
];
|
|
19
|
-
function l(e, h) {
|
|
20
|
-
return o(), c("div", n, _);
|
|
21
|
-
}
|
|
22
|
-
const w = /* @__PURE__ */ a(d, [["render", l], ["__scopeId", "data-v-142c444a"]]);
|
|
1
|
+
import o from "./ChartLoader.vue2.js";
|
|
2
|
+
/* empty css */import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../ChartLoader.vue_vue_type_style_index_0_scoped_ffa4cc66_lang.css"; //*');
|
|
4
|
+
const c = /* @__PURE__ */ e(o, [["__scopeId", "data-v-ffa4cc66"]]);
|
|
23
5
|
export {
|
|
24
|
-
|
|
6
|
+
c as default
|
|
25
7
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "../../ChartLoader.vue_vue_type_style_index_0_scoped_ffa4cc66_lang.css"; import { defineComponent as e, openBlock as o, createElementBlock as r, createElementVNode as t, createVNode as a } from "vue";
|
|
2
|
+
import c from "../loader/v4/Loader.vue.js";
|
|
3
|
+
const n = { class: "chart-loader" }, s = { class: "chart-loader-wrapper" }, i = /* @__PURE__ */ e({
|
|
4
|
+
__name: "ChartLoader",
|
|
5
|
+
setup(d) {
|
|
6
|
+
return (_, p) => (o(), r("div", n, [
|
|
7
|
+
t("div", s, [
|
|
8
|
+
a(c)
|
|
9
|
+
])
|
|
10
|
+
]));
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
export {
|
|
14
|
+
i as default
|
|
15
|
+
};
|