@ironsource/shared-ui 2.1.11-rc.48 → 2.1.11-rc.49
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_277fde76_lang.css +1 -0
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_b883d1fa_lang.css +1 -0
- package/components/chart/Chart.vue.d.ts +5 -0
- package/components/chart/Chart.vue.js +3 -3
- package/components/chart/Chart.vue2.js +69 -66
- package/components/chart/index.d.ts +20 -1
- package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
- package/components/dropdown/v4/TreeDropdown.vue2.js +86 -86
- package/index.js +1 -1
- package/package.json +1 -1
- package/Chart.vue_vue_type_style_index_0_scoped_04b9d6b3_lang.css +0 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_bdfb0aef_lang.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-container[data-v-277fde76]{border:1px solid var(--common-divider);background:var(--background-paper);display:flex;height:388px;border-radius:0 0 6px 6px;width:100%}.header-wrapper[data-v-277fde76]{height:76px}.chart-content[data-v-277fde76]{width:100%}.chart-content.with-legend[data-v-277fde76]{width:calc(100% - 221px)}.chart-sidebar[data-v-277fde76]{border-left:1px solid var(--common-divider)}.chart[data-v-277fde76]{width:100%;height:312px;position:relative}.chart__canvas[data-v-277fde76]{width:100%;height:100%}.chart__tooltip[data-v-277fde76]{position:absolute;pointer-events:none;transition:all .1s ease;min-width:214px;max-width:270px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.child-options[data-v-b883d1fa]{padding-left:1rem}.tree-search[data-v-b883d1fa]{width:100%}
|
|
@@ -19,6 +19,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
19
19
|
noDataSubtitle?: string;
|
|
20
20
|
withSettingsHeader?: boolean;
|
|
21
21
|
maxLimitTooltipText?: string;
|
|
22
|
+
withAnimation?: boolean;
|
|
22
23
|
}>, {
|
|
23
24
|
chartType: ChartType;
|
|
24
25
|
dataSets: () => any[];
|
|
@@ -40,6 +41,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
40
41
|
withSettingsHeader: boolean;
|
|
41
42
|
withSubheaderTooltip: boolean;
|
|
42
43
|
maxLimitTooltipText: string;
|
|
44
|
+
withAnimation: boolean;
|
|
43
45
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
44
46
|
"update:chartType": (chartType: ChartType) => void;
|
|
45
47
|
"update:visibleIds": (visibleIds: unknown[]) => void;
|
|
@@ -63,6 +65,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
63
65
|
noDataSubtitle?: string;
|
|
64
66
|
withSettingsHeader?: boolean;
|
|
65
67
|
maxLimitTooltipText?: string;
|
|
68
|
+
withAnimation?: boolean;
|
|
66
69
|
}>, {
|
|
67
70
|
chartType: ChartType;
|
|
68
71
|
dataSets: () => any[];
|
|
@@ -84,6 +87,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
84
87
|
withSettingsHeader: boolean;
|
|
85
88
|
withSubheaderTooltip: boolean;
|
|
86
89
|
maxLimitTooltipText: string;
|
|
90
|
+
withAnimation: boolean;
|
|
87
91
|
}>>> & {
|
|
88
92
|
"onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
|
|
89
93
|
"onUpdate:chartType"?: (chartType: ChartType) => any;
|
|
@@ -107,6 +111,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
107
111
|
noDataIcon: string;
|
|
108
112
|
noDataTitle: string;
|
|
109
113
|
noDataSubtitle: string;
|
|
114
|
+
withAnimation: boolean;
|
|
110
115
|
}>, {
|
|
111
116
|
metric?(_: {}): any;
|
|
112
117
|
breakdowns?(_: {}): any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Chart.vue2.js";
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../Chart.
|
|
4
|
-
const p = /* @__PURE__ */
|
|
2
|
+
/* empty css */import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../Chart.vue_vue_type_style_index_0_scoped_277fde76_lang.css"; //*');
|
|
4
|
+
const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-277fde76"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import "../../Chart.
|
|
2
|
-
import { useVModel as
|
|
3
|
-
import { Chart as N, ArcElement as
|
|
4
|
-
import { HoverVerticalLine as
|
|
5
|
-
import { formatValue as H, calcStepSize as
|
|
6
|
-
import { DEFAULT_TICK_COUNT as fe, DEFAULT_MIN_VISIBLE as
|
|
1
|
+
import "../../Chart.vue_vue_type_style_index_0_scoped_277fde76_lang.css"; import { defineComponent as q, computed as l, ref as g, onMounted as J, watch as T, nextTick as Q, openBlock as d, createElementBlock as C, Fragment as O, createBlock as f, unref as u, isRef as D, withCtx as k, renderSlot as x, createCommentVNode as v, createElementVNode as p, normalizeClass as Y, createVNode as F, normalizeStyle as _ } from "vue";
|
|
2
|
+
import { useVModel as ee } from "@vueuse/core";
|
|
3
|
+
import { Chart as N, ArcElement as te, LineElement as ae, BarElement as oe, PointElement as ie, LineController as le, BarController as re, PieController as ne, ScatterController as se, CategoryScale as de, LinearScale as ue, Filler as ce, Tooltip as pe } from "chart.js";
|
|
4
|
+
import { HoverVerticalLine as me } from "./plugins/HoverVerticalLine.js";
|
|
5
|
+
import { formatValue as H, calcStepSize as he } from "./utils/utils.js";
|
|
6
|
+
import { DEFAULT_TICK_COUNT as fe, DEFAULT_MIN_VISIBLE as ve, DEFAULT_MAX_VISIBLE as ye, COLOR_PALETTE as be, POINT_BORDER_COLOR as ge, TICK_LABEL_COLOR as U, TICK_LABEL_FONT as P, GRID_LINE_COLOR as z } 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 Te } from "./composables/useTooltipPosition.js";
|
|
9
|
+
import Ce from "./ChartTooltip.vue.js";
|
|
10
|
+
import ke from "./ChartLegend.vue.js";
|
|
11
|
+
import xe from "./ChartHeader.vue.js";
|
|
12
|
+
import { hexColorToRgba as Le } from "../../utils/color.js";
|
|
13
|
+
import { useChartValues as Se } from "./composables/useChartValues.js";
|
|
14
|
+
import we from "./ChartLoader.vue.js";
|
|
15
|
+
import Be from "../emptyState/v4/EmptyStateV4.vue.js";
|
|
16
|
+
import Ie from "./SettingsHeader.vue.js";
|
|
17
|
+
const Ae = { class: "chart-container" }, Ee = { class: "header-wrapper" }, Ve = { class: "chart" }, Re = {
|
|
18
18
|
key: 0,
|
|
19
19
|
class: "chart-sidebar"
|
|
20
|
-
},
|
|
20
|
+
}, qe = /* @__PURE__ */ q({
|
|
21
21
|
__name: "Chart",
|
|
22
22
|
props: {
|
|
23
23
|
dataSets: { default: () => [] },
|
|
@@ -31,20 +31,20 @@ const Ie = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
|
|
|
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: ve },
|
|
35
|
+
maxVisible: { default: ye },
|
|
36
36
|
loading: { type: Boolean, default: !1 },
|
|
37
37
|
noDataIcon: { default: "file-x" },
|
|
38
38
|
noDataTitle: { default: "No data to display" },
|
|
39
39
|
noDataSubtitle: { default: "Search again with different filters" },
|
|
40
40
|
withSettingsHeader: { type: Boolean, default: !0 },
|
|
41
|
-
maxLimitTooltipText: { default: "" }
|
|
41
|
+
maxLimitTooltipText: { default: "" },
|
|
42
|
+
withAnimation: { type: Boolean, default: !0 }
|
|
42
43
|
},
|
|
43
44
|
emits: ["update:chartType", "update:visibleIds"],
|
|
44
45
|
setup(a, { emit: L }) {
|
|
45
46
|
const t = a;
|
|
46
47
|
N.register(
|
|
47
|
-
ee,
|
|
48
48
|
te,
|
|
49
49
|
ae,
|
|
50
50
|
oe,
|
|
@@ -56,30 +56,33 @@ const Ie = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
|
|
|
56
56
|
de,
|
|
57
57
|
ue,
|
|
58
58
|
ce,
|
|
59
|
-
pe
|
|
59
|
+
pe,
|
|
60
|
+
me
|
|
60
61
|
);
|
|
61
|
-
const c =
|
|
62
|
+
const c = ee(t, "chartType", L), M = l(
|
|
63
|
+
() => t.withAnimation ? "" : "none"
|
|
64
|
+
), m = g(null);
|
|
62
65
|
let s = null;
|
|
63
66
|
const S = l(() => t.dataSets.length === 0), w = l(() => !t.loading && !S.value), y = () => {
|
|
64
67
|
m.value && (s && s.destroy(), s = new N(m.value, I.value));
|
|
65
|
-
},
|
|
66
|
-
s && (s.data.datasets = b.value, s.options = I.value.options, s.update());
|
|
68
|
+
}, $ = () => {
|
|
69
|
+
s && (s.data.datasets = b.value, s.options = I.value.options, s.update(M.value));
|
|
67
70
|
};
|
|
68
|
-
|
|
69
|
-
e && (await
|
|
70
|
-
}), T([() => t.visibleIds, () => t.dataSets],
|
|
71
|
-
const
|
|
71
|
+
J(y), T(() => t.chartType, y), T(w, async (e) => {
|
|
72
|
+
e && (await Q(), y());
|
|
73
|
+
}), T([() => t.visibleIds, () => t.dataSets], $);
|
|
74
|
+
const h = l(
|
|
72
75
|
() => t.chartType === n.StackedLine || t.chartType === n.StackedBar
|
|
73
|
-
),
|
|
76
|
+
), K = l(
|
|
74
77
|
() => t.chartType === n.Line || t.chartType === n.StackedLine
|
|
75
78
|
), B = l(
|
|
76
79
|
() => t.dataSets.filter((e) => t.visibleIds.includes(e.id))
|
|
77
80
|
), b = l(() => B.value.map((e, o) => {
|
|
78
|
-
const i = e.color ||
|
|
81
|
+
const i = e.color || be[o] || "#000000";
|
|
79
82
|
return {
|
|
80
83
|
...e,
|
|
81
|
-
fill:
|
|
82
|
-
backgroundColor:
|
|
84
|
+
fill: h.value ? "start" : void 0,
|
|
85
|
+
backgroundColor: Le(
|
|
83
86
|
i,
|
|
84
87
|
t.chartType === n.StackedLine ? 10 : 70
|
|
85
88
|
),
|
|
@@ -111,7 +114,7 @@ const Ie = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
|
|
|
111
114
|
plugins: {
|
|
112
115
|
legend: { display: !1 },
|
|
113
116
|
title: { display: !1 },
|
|
114
|
-
hoverVerticalLine:
|
|
117
|
+
hoverVerticalLine: K.value,
|
|
115
118
|
// tooltip
|
|
116
119
|
tooltip: {
|
|
117
120
|
enabled: !1,
|
|
@@ -121,7 +124,7 @@ const Ie = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
|
|
|
121
124
|
},
|
|
122
125
|
callbacks: {
|
|
123
126
|
footer: (e) => {
|
|
124
|
-
const o = e.reduce((i,
|
|
127
|
+
const o = e.reduce((i, j) => i + (j.parsed.y || 0), 0);
|
|
125
128
|
return ["Total", String(o)];
|
|
126
129
|
}
|
|
127
130
|
}
|
|
@@ -149,7 +152,7 @@ const Ie = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
|
|
|
149
152
|
borderWidth: 0,
|
|
150
153
|
hoverRadius: 4,
|
|
151
154
|
hoverBorderWidth: 2,
|
|
152
|
-
pointHoverBackgroundColor:
|
|
155
|
+
pointHoverBackgroundColor: ge
|
|
153
156
|
},
|
|
154
157
|
bar: {
|
|
155
158
|
borderRadius: 4
|
|
@@ -160,12 +163,12 @@ const Ie = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
|
|
|
160
163
|
x: {
|
|
161
164
|
beginAtZero: !0,
|
|
162
165
|
border: { display: !1 },
|
|
163
|
-
stacked:
|
|
166
|
+
stacked: h.value,
|
|
164
167
|
// stack on top of each other
|
|
165
168
|
// ticks
|
|
166
169
|
ticks: {
|
|
167
|
-
color:
|
|
168
|
-
font:
|
|
170
|
+
color: U,
|
|
171
|
+
font: P,
|
|
169
172
|
padding: 4,
|
|
170
173
|
callback: function(e) {
|
|
171
174
|
return H(
|
|
@@ -188,16 +191,16 @@ const Ie = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
|
|
|
188
191
|
beginAtZero: !0,
|
|
189
192
|
border: { display: !1 },
|
|
190
193
|
// hide left borderline
|
|
191
|
-
stacked:
|
|
194
|
+
stacked: h.value,
|
|
192
195
|
// stack on top of each other
|
|
193
196
|
// ticks
|
|
194
197
|
ticks: {
|
|
195
|
-
color:
|
|
196
|
-
font:
|
|
198
|
+
color: U,
|
|
199
|
+
font: P,
|
|
197
200
|
padding: 8,
|
|
198
|
-
stepSize:
|
|
199
|
-
min:
|
|
200
|
-
max:
|
|
201
|
+
stepSize: R.value,
|
|
202
|
+
min: V.value,
|
|
203
|
+
max: R.value * t.tickCount,
|
|
201
204
|
callback: (e) => H(e, t.yAxisFormat)
|
|
202
205
|
},
|
|
203
206
|
// grid lines
|
|
@@ -210,32 +213,32 @@ const Ie = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
|
|
|
210
213
|
}
|
|
211
214
|
}
|
|
212
215
|
})
|
|
213
|
-
),
|
|
216
|
+
), W = l(
|
|
214
217
|
() => b.value.reduce((e, o) => (e[o.id] = o.borderColor, e), {})
|
|
215
|
-
),
|
|
218
|
+
), Z = l(() => t.dataSets.map((e) => ({
|
|
216
219
|
id: e.id,
|
|
217
220
|
label: e.label,
|
|
218
221
|
caption: e.caption || null,
|
|
219
|
-
color:
|
|
222
|
+
color: W.value[e.id] || null,
|
|
220
223
|
icon: e.icon || null,
|
|
221
224
|
iconType: e.iconType || "branded"
|
|
222
|
-
}))), A = g(null), r = g(null), { position: E } =
|
|
225
|
+
}))), A = g(null), r = g(null), { position: E } = Te(
|
|
223
226
|
m,
|
|
224
227
|
A,
|
|
225
228
|
r
|
|
226
|
-
),
|
|
229
|
+
), G = l(() => ({
|
|
227
230
|
left: `${E.value.left}px`,
|
|
228
231
|
top: `${E.value.top}px`,
|
|
229
232
|
opacity: r.value?.opacity || 0
|
|
230
|
-
})), { minValue:
|
|
233
|
+
})), { minValue: V, maxValue: X } = Se({
|
|
231
234
|
parsingConfig: t.parsing,
|
|
232
235
|
dataSets: B,
|
|
233
|
-
isStacked:
|
|
234
|
-
}),
|
|
235
|
-
() =>
|
|
236
|
+
isStacked: h
|
|
237
|
+
}), R = l(
|
|
238
|
+
() => he(V.value, X.value, t.tickCount)
|
|
236
239
|
);
|
|
237
240
|
return (e, o) => (d(), C(O, null, [
|
|
238
|
-
a.withSettingsHeader ? (d(),
|
|
241
|
+
a.withSettingsHeader ? (d(), f(Ie, {
|
|
239
242
|
key: 0,
|
|
240
243
|
"chart-type": u(c),
|
|
241
244
|
"onUpdate:chart-type": o[0] || (o[0] = (i) => D(c) ? c.value = i : null),
|
|
@@ -249,13 +252,13 @@ const Ie = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
|
|
|
249
252
|
]),
|
|
250
253
|
_: 3
|
|
251
254
|
}, 8, ["chart-type", "hide-legend"])) : v("", !0),
|
|
252
|
-
p("div",
|
|
255
|
+
p("div", Ae, [
|
|
253
256
|
u(w) ? (d(), C(O, { key: 0 }, [
|
|
254
257
|
p("section", {
|
|
255
|
-
class:
|
|
258
|
+
class: Y(["chart-content", [{ "with-legend": !a.hideLegend }]])
|
|
256
259
|
}, [
|
|
257
|
-
p("div",
|
|
258
|
-
F(
|
|
260
|
+
p("div", Ee, [
|
|
261
|
+
F(xe, {
|
|
259
262
|
"chart-type": u(c),
|
|
260
263
|
"onUpdate:chart-type": o[1] || (o[1] = (i) => D(c) ? c.value = i : null),
|
|
261
264
|
"with-settings-header": a.withSettingsHeader,
|
|
@@ -269,7 +272,7 @@ const Ie = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
|
|
|
269
272
|
_: 3
|
|
270
273
|
}, 8, ["chart-type", "with-settings-header", "header", "subheader", "with-subheader-tooltip"])
|
|
271
274
|
]),
|
|
272
|
-
p("div",
|
|
275
|
+
p("div", Ve, [
|
|
273
276
|
p("canvas", {
|
|
274
277
|
ref_key: "chartRef",
|
|
275
278
|
ref: m,
|
|
@@ -279,9 +282,9 @@ const Ie = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
|
|
|
279
282
|
ref_key: "tooltipRef",
|
|
280
283
|
ref: A,
|
|
281
284
|
class: "chart__tooltip",
|
|
282
|
-
style:
|
|
285
|
+
style: _(u(G))
|
|
283
286
|
}, [
|
|
284
|
-
r.value ? (d(),
|
|
287
|
+
r.value ? (d(), f(Ce, {
|
|
285
288
|
key: 0,
|
|
286
289
|
title: String(r.value.title),
|
|
287
290
|
"data-points": r.value.dataPoints,
|
|
@@ -294,14 +297,14 @@ const Ie = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
|
|
|
294
297
|
])
|
|
295
298
|
], 2),
|
|
296
299
|
a.hideLegend ? v("", !0) : (d(), C("section", Re, [
|
|
297
|
-
F(
|
|
298
|
-
items: u(
|
|
300
|
+
F(ke, {
|
|
301
|
+
items: u(Z),
|
|
299
302
|
"visible-ids": a.visibleIds,
|
|
300
303
|
"max-limit-tooltip-text": a.maxLimitTooltipText,
|
|
301
304
|
"onUpdate:visibleIds": o[2] || (o[2] = (i) => L("update:visibleIds", i))
|
|
302
305
|
}, null, 8, ["items", "visible-ids", "max-limit-tooltip-text"])
|
|
303
306
|
]))
|
|
304
|
-
], 64)) : a.loading ? (d(),
|
|
307
|
+
], 64)) : a.loading ? (d(), f(we, { key: 1 })) : u(S) ? (d(), f(u(Be), {
|
|
305
308
|
key: 2,
|
|
306
309
|
title: a.noDataTitle,
|
|
307
310
|
subtitle: a.noDataSubtitle,
|
|
@@ -312,5 +315,5 @@ const Ie = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
|
|
|
312
315
|
}
|
|
313
316
|
});
|
|
314
317
|
export {
|
|
315
|
-
|
|
318
|
+
qe as default
|
|
316
319
|
};
|
|
@@ -23,6 +23,7 @@ declare const ChartTypes: () => ({
|
|
|
23
23
|
noDataIcon: string;
|
|
24
24
|
noDataTitle: string;
|
|
25
25
|
noDataSubtitle: string;
|
|
26
|
+
withAnimation: boolean;
|
|
26
27
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
27
28
|
header: {
|
|
28
29
|
type: import("vue").PropType<string>;
|
|
@@ -102,10 +103,14 @@ declare const ChartTypes: () => ({
|
|
|
102
103
|
type: import("vue").PropType<string>;
|
|
103
104
|
default: string;
|
|
104
105
|
};
|
|
106
|
+
withAnimation: {
|
|
107
|
+
type: import("vue").PropType<boolean>;
|
|
108
|
+
default: boolean;
|
|
109
|
+
};
|
|
105
110
|
}>> & {
|
|
106
111
|
"onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
|
|
107
112
|
"onUpdate:chartType"?: (chartType: import("./types").ChartType) => any;
|
|
108
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "header" | "loading" | "xAxisFormat" | "yAxisFormat" | "parsing" | "visibleIds" | "minVisible" | "maxVisible" | "maxLimitTooltipText" | "chartType" | "withSettingsHeader" | "subheader" | "withSubheaderTooltip" | "dataSets" | "hideLegend" | "tickCount" | "noDataIcon" | "noDataTitle" | "noDataSubtitle">;
|
|
113
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "header" | "loading" | "xAxisFormat" | "yAxisFormat" | "parsing" | "visibleIds" | "minVisible" | "maxVisible" | "maxLimitTooltipText" | "chartType" | "withSettingsHeader" | "subheader" | "withSubheaderTooltip" | "dataSets" | "hideLegend" | "tickCount" | "noDataIcon" | "noDataTitle" | "noDataSubtitle" | "withAnimation">;
|
|
109
114
|
$attrs: {
|
|
110
115
|
[x: string]: unknown;
|
|
111
116
|
};
|
|
@@ -198,6 +203,10 @@ declare const ChartTypes: () => ({
|
|
|
198
203
|
type: import("vue").PropType<string>;
|
|
199
204
|
default: string;
|
|
200
205
|
};
|
|
206
|
+
withAnimation: {
|
|
207
|
+
type: import("vue").PropType<boolean>;
|
|
208
|
+
default: boolean;
|
|
209
|
+
};
|
|
201
210
|
}>> & {
|
|
202
211
|
"onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
|
|
203
212
|
"onUpdate:chartType"?: (chartType: import("./types").ChartType) => any;
|
|
@@ -224,6 +233,7 @@ declare const ChartTypes: () => ({
|
|
|
224
233
|
noDataIcon: string;
|
|
225
234
|
noDataTitle: string;
|
|
226
235
|
noDataSubtitle: string;
|
|
236
|
+
withAnimation: boolean;
|
|
227
237
|
}, {}, string> & {
|
|
228
238
|
beforeCreate?: (() => void) | (() => void)[];
|
|
229
239
|
created?: (() => void) | (() => void)[];
|
|
@@ -323,6 +333,10 @@ declare const ChartTypes: () => ({
|
|
|
323
333
|
type: import("vue").PropType<string>;
|
|
324
334
|
default: string;
|
|
325
335
|
};
|
|
336
|
+
withAnimation: {
|
|
337
|
+
type: import("vue").PropType<boolean>;
|
|
338
|
+
default: boolean;
|
|
339
|
+
};
|
|
326
340
|
}>> & {
|
|
327
341
|
"onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
|
|
328
342
|
"onUpdate:chartType"?: (chartType: import("./types").ChartType) => any;
|
|
@@ -409,6 +423,10 @@ declare const ChartTypes: () => ({
|
|
|
409
423
|
type: import("vue").PropType<string>;
|
|
410
424
|
default: string;
|
|
411
425
|
};
|
|
426
|
+
withAnimation: {
|
|
427
|
+
type: import("vue").PropType<boolean>;
|
|
428
|
+
default: boolean;
|
|
429
|
+
};
|
|
412
430
|
}>> & {
|
|
413
431
|
"onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
|
|
414
432
|
"onUpdate:chartType"?: (chartType: import("./types").ChartType) => any;
|
|
@@ -435,6 +453,7 @@ declare const ChartTypes: () => ({
|
|
|
435
453
|
noDataIcon: string;
|
|
436
454
|
noDataTitle: string;
|
|
437
455
|
noDataSubtitle: string;
|
|
456
|
+
withAnimation: boolean;
|
|
438
457
|
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
439
458
|
$slots: {
|
|
440
459
|
metric?(_: {}): any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TreeDropdown.vue2.js";
|
|
2
2
|
/* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../TreeDropdown.
|
|
4
|
-
const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-
|
|
3
|
+
// import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_b883d1fa_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-b883d1fa"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../TreeDropdown.
|
|
1
|
+
import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_b883d1fa_lang.css"; import { defineComponent as ee, provide as ne, ref as c, computed as K, onMounted as le, watch as g, openBlock as C, createBlock as D, unref as d, withCtx as f, createVNode as I, mergeProps as z, createSlots as te, renderSlot as oe, createElementVNode as M, withModifiers as S, createTextVNode as ie, createElementBlock as B, withDirectives as de, Fragment as ae, renderList as re, vShow as se, createCommentVNode as ce } from "vue";
|
|
2
2
|
import ue from "./DropdownV4.vue.js";
|
|
3
3
|
import pe from "./DefaultDropdownTrigger.vue.js";
|
|
4
4
|
import "./IconButtonDropdownTrigger.vue.js";
|
|
@@ -7,11 +7,11 @@ import "./AppDropdownTrigger.vue.js";
|
|
|
7
7
|
import "./ButtonDropdownTrigger.vue.js";
|
|
8
8
|
import "./ButtonFilterDropdownTrigger.vue.js";
|
|
9
9
|
import "./TreeDropdown.vue.js";
|
|
10
|
-
import
|
|
10
|
+
import w from "./OptionV4.vue.js";
|
|
11
11
|
import "./ConditionalDropdown.vue.js";
|
|
12
12
|
import { useChildOptions as ye } from "../composables/useChildOptions.js";
|
|
13
|
-
import
|
|
14
|
-
import { useTestIdAttrs as
|
|
13
|
+
import fe from "../../search/v4/SearchV4.vue.js";
|
|
14
|
+
import { useTestIdAttrs as he } from "../../../utils/testIds.js";
|
|
15
15
|
import { DropdownTestIdModifiers as $ } from "../../../testids/index.js";
|
|
16
16
|
const ve = {
|
|
17
17
|
key: 0,
|
|
@@ -43,18 +43,18 @@ const ve = {
|
|
|
43
43
|
},
|
|
44
44
|
emits: ["update:selected", "update:isOpen"],
|
|
45
45
|
setup(t, { emit: b }) {
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
const m = c([]), u = c([]), T = c({}),
|
|
46
|
+
const n = t;
|
|
47
|
+
ne("isTreeDropdown", !0);
|
|
48
|
+
const m = c([]), u = c([]), T = c({}), O = c(!1), i = c([...n.selected]), p = c(""), x = c(!0), N = K(() => u.value.reduce((e, o) => (o[n.optionChildrenKey] && o[n.optionChildrenKey].length && o[n.optionChildrenKey].forEach(() => {
|
|
49
49
|
e = e + 1;
|
|
50
|
-
}), o[
|
|
51
|
-
|
|
52
|
-
e[
|
|
53
|
-
...e[
|
|
50
|
+
}), o[n.optionChildrenKey] || (e = e + 1), e), 0)), U = () => {
|
|
51
|
+
n.options.forEach((e) => {
|
|
52
|
+
e[n.optionChildrenKey] && e[n.optionChildrenKey].length && (T.value[e[n.optionUniqueIdKey]] = [
|
|
53
|
+
...e[n.optionChildrenKey]
|
|
54
54
|
]);
|
|
55
|
-
}), m.value = [...
|
|
56
|
-
}, { hasChildren:
|
|
57
|
-
if (
|
|
55
|
+
}), m.value = [...n.options], u.value = [...n.options];
|
|
56
|
+
}, { hasChildren: h, getChildren: v, allChildrenSelected: k, someChildrenSelected: P } = ye(i, n.optionChildrenKey), q = (e) => {
|
|
57
|
+
if (h(e)) {
|
|
58
58
|
k(e) ? i.value = i.value.filter(
|
|
59
59
|
(o) => !v(e).includes(o)
|
|
60
60
|
) : i.value = [
|
|
@@ -66,72 +66,72 @@ const ve = {
|
|
|
66
66
|
i.value.includes(e) ? i.value = i.value.filter(
|
|
67
67
|
(o) => o !== e
|
|
68
68
|
) : i.value = [...i.value, e];
|
|
69
|
-
}, A = (e) => i.value.includes(e),
|
|
69
|
+
}, A = (e) => i.value.includes(e), J = (e) => 1 + (h(e) ? v(e).length : 0), j = () => {
|
|
70
70
|
b("update:selected", i.value), L.value = y.value;
|
|
71
|
-
},
|
|
71
|
+
}, F = () => {
|
|
72
72
|
i.value = [];
|
|
73
|
-
},
|
|
73
|
+
}, G = () => {
|
|
74
74
|
const e = /* @__PURE__ */ new Set([]);
|
|
75
|
-
u.value.forEach((
|
|
76
|
-
if (
|
|
77
|
-
e.add(
|
|
78
|
-
else if (n
|
|
79
|
-
for (const
|
|
80
|
-
if (
|
|
81
|
-
e.add(
|
|
75
|
+
u.value.forEach((l) => {
|
|
76
|
+
if (n.selected?.includes(l))
|
|
77
|
+
e.add(l);
|
|
78
|
+
else if (l[n.optionChildrenKey] && l[n.optionChildrenKey].length) {
|
|
79
|
+
for (const r of l[n.optionChildrenKey])
|
|
80
|
+
if (n.selected?.includes(r)) {
|
|
81
|
+
e.add(l);
|
|
82
82
|
break;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
86
|
const o = Array.from(e);
|
|
87
|
-
return u.value.forEach((
|
|
88
|
-
!
|
|
87
|
+
return u.value.forEach((l) => {
|
|
88
|
+
!n.selected.includes(l) && !e.has(l) && o.push(l);
|
|
89
89
|
}), o;
|
|
90
90
|
};
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
le(() => {
|
|
92
|
+
O.value || (U(), O.value = !0, n.preExpandedOptions && n.preExpandedOptions.forEach((e) => {
|
|
93
93
|
a.value[e] = 1;
|
|
94
94
|
}));
|
|
95
95
|
}), g(
|
|
96
|
-
() =>
|
|
96
|
+
() => n.options,
|
|
97
97
|
() => {
|
|
98
98
|
U();
|
|
99
99
|
}
|
|
100
100
|
), g(
|
|
101
|
-
() =>
|
|
102
|
-
() => {
|
|
103
|
-
i.value = [...
|
|
101
|
+
() => n.selected,
|
|
102
|
+
(e, o) => {
|
|
103
|
+
JSON.stringify(e) !== JSON.stringify(o) && (i.value = [...n.selected]);
|
|
104
104
|
}
|
|
105
105
|
);
|
|
106
|
-
const y = K(() => i.value.length < N.value ? !1 : i.value.length === N.value),
|
|
106
|
+
const y = K(() => i.value.length < N.value ? !1 : i.value.length === N.value), H = K(() => !y.value && i.value.length > 0), L = c(y.value);
|
|
107
107
|
g(
|
|
108
|
-
() =>
|
|
108
|
+
() => n.isOpen,
|
|
109
109
|
() => {
|
|
110
|
-
|
|
110
|
+
n.isOpen ? m.value = G() : (i.value = [...n.selected], p.value = "");
|
|
111
111
|
}
|
|
112
112
|
);
|
|
113
113
|
const a = c({}), Q = (e) => {
|
|
114
|
-
a.value[e[
|
|
114
|
+
a.value[e[n.optionUniqueIdKey]] ? delete a.value[e[n.optionUniqueIdKey]] : a.value[e[n.optionUniqueIdKey]] = 1;
|
|
115
115
|
};
|
|
116
116
|
function R(e, o) {
|
|
117
|
-
const
|
|
118
|
-
return o.value.forEach((
|
|
119
|
-
const E =
|
|
120
|
-
(_) => _[
|
|
117
|
+
const l = e.toLowerCase(), r = [];
|
|
118
|
+
return o.value.forEach((s) => {
|
|
119
|
+
const E = s[n.optionNameKey].toLowerCase().includes(l), V = T.value[s[n.optionUniqueIdKey]]?.filter(
|
|
120
|
+
(_) => _[n.optionNameKey].toLowerCase().includes(l)
|
|
121
121
|
) || [];
|
|
122
|
-
(E || V.length > 0) && (
|
|
123
|
-
}),
|
|
122
|
+
(E || V.length > 0) && (s[n.optionChildrenKey] = V, r.push(s));
|
|
123
|
+
}), r;
|
|
124
124
|
}
|
|
125
125
|
const W = (e) => {
|
|
126
126
|
const o = R(e, u);
|
|
127
|
-
e && (Object.keys(a.value).forEach((
|
|
128
|
-
delete a.value[
|
|
129
|
-
}), o.forEach((
|
|
130
|
-
Array.isArray(n
|
|
127
|
+
e && (Object.keys(a.value).forEach((l) => {
|
|
128
|
+
delete a.value[l];
|
|
129
|
+
}), o.forEach((l) => {
|
|
130
|
+
Array.isArray(l[n.optionChildrenKey]) && l[n.optionChildrenKey].length && (a.value[l[n.optionUniqueIdKey]] = 1);
|
|
131
131
|
})), m.value = o;
|
|
132
132
|
}, X = K(() => {
|
|
133
|
-
const e =
|
|
134
|
-
(
|
|
133
|
+
const e = n.options.length, o = n.options.reduce(
|
|
134
|
+
(l, r) => (a.value[r[n.optionUniqueIdKey]] && (l = l + r[n.optionChildrenKey].length), l),
|
|
135
135
|
0
|
|
136
136
|
);
|
|
137
137
|
return e + o;
|
|
@@ -139,22 +139,22 @@ const ve = {
|
|
|
139
139
|
g(
|
|
140
140
|
() => p.value,
|
|
141
141
|
() => {
|
|
142
|
-
W(p.value),
|
|
142
|
+
W(p.value), x.value = !p.value;
|
|
143
143
|
}
|
|
144
144
|
);
|
|
145
145
|
const Y = () => {
|
|
146
146
|
y.value ? i.value = [] : (i.value = [], u.value.forEach((e) => {
|
|
147
|
-
if (e[
|
|
148
|
-
for (const o of e[
|
|
147
|
+
if (e[n.optionChildrenKey] && e[n.optionChildrenKey].length)
|
|
148
|
+
for (const o of e[n.optionChildrenKey])
|
|
149
149
|
i.value = [o, ...i.value];
|
|
150
150
|
else
|
|
151
151
|
i.value = [e, ...i.value];
|
|
152
152
|
}));
|
|
153
|
-
}, Z =
|
|
153
|
+
}, Z = he(n.testId, $);
|
|
154
154
|
return (e, o) => (C(), D(d(ue), {
|
|
155
155
|
multi: "",
|
|
156
156
|
class: "tree-dropdown",
|
|
157
|
-
"show-select-all":
|
|
157
|
+
"show-select-all": x.value,
|
|
158
158
|
"is-open": t.isOpen,
|
|
159
159
|
options: m.value,
|
|
160
160
|
selected: t.selected,
|
|
@@ -167,32 +167,32 @@ const ve = {
|
|
|
167
167
|
"test-id": t.testId,
|
|
168
168
|
disabled: t.disabled,
|
|
169
169
|
"disable-virtual-scroll": "",
|
|
170
|
-
"override-option-count-calculation":
|
|
170
|
+
"override-option-count-calculation": J,
|
|
171
171
|
"trigger-show-all-selected-text": !1,
|
|
172
172
|
"predefined-trigger": "default",
|
|
173
173
|
"custom-number-of-displayed-options": d(X),
|
|
174
|
-
"onUpdate:isOpen": o[2] || (o[2] = (
|
|
175
|
-
onApply:
|
|
176
|
-
onClear:
|
|
174
|
+
"onUpdate:isOpen": o[2] || (o[2] = (l) => b("update:isOpen", l)),
|
|
175
|
+
onApply: j,
|
|
176
|
+
onClear: F
|
|
177
177
|
}, {
|
|
178
|
-
"dropdown-trigger":
|
|
179
|
-
I(d(pe), z(
|
|
178
|
+
"dropdown-trigger": f(({ defaultTriggerProps: l }) => [
|
|
179
|
+
I(d(pe), z(l, {
|
|
180
180
|
"all-selected": L.value,
|
|
181
181
|
"show-all-selected-text": ""
|
|
182
182
|
}), te({ _: 2 }, [
|
|
183
183
|
e.$slots["trigger-end-icon"] ? {
|
|
184
184
|
name: "end-icon",
|
|
185
|
-
fn:
|
|
185
|
+
fn: f(() => [
|
|
186
186
|
oe(e.$slots, "trigger-end-icon", {}, void 0, !0)
|
|
187
187
|
]),
|
|
188
188
|
key: "0"
|
|
189
189
|
} : void 0
|
|
190
190
|
]), 1040, ["all-selected"])
|
|
191
191
|
]),
|
|
192
|
-
"inline-search":
|
|
193
|
-
I(d(
|
|
192
|
+
"inline-search": f(() => [
|
|
193
|
+
I(d(fe), {
|
|
194
194
|
modelValue: p.value,
|
|
195
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
195
|
+
"onUpdate:modelValue": o[0] || (o[0] = (l) => p.value = l),
|
|
196
196
|
class: "tree-search",
|
|
197
197
|
placeholder: t.inlineSearchPlaceholder,
|
|
198
198
|
variant: "transparent",
|
|
@@ -201,31 +201,31 @@ const ve = {
|
|
|
201
201
|
"test-id": t.testId
|
|
202
202
|
}, null, 8, ["modelValue", "placeholder", "test-id"])
|
|
203
203
|
]),
|
|
204
|
-
"select-all":
|
|
204
|
+
"select-all": f(() => [
|
|
205
205
|
M("li", null, [
|
|
206
|
-
I(d(
|
|
206
|
+
I(d(w), z({
|
|
207
207
|
"aria-selected": d(y),
|
|
208
208
|
"aria-disabled": !!t.disabled,
|
|
209
209
|
"selected-prop": d(y),
|
|
210
|
-
"is-indeterminate": d(
|
|
210
|
+
"is-indeterminate": d(H),
|
|
211
211
|
"is-multi": "",
|
|
212
212
|
"select-all-option": ""
|
|
213
213
|
}, d(Z)[d($).SELECT_ALL], {
|
|
214
|
-
onClick: o[1] || (o[1] =
|
|
214
|
+
onClick: o[1] || (o[1] = S((l) => Y(), ["stop"]))
|
|
215
215
|
}), {
|
|
216
|
-
default:
|
|
216
|
+
default: f(() => [
|
|
217
217
|
ie(" Select all ")
|
|
218
218
|
]),
|
|
219
219
|
_: 1
|
|
220
220
|
}, 16, ["aria-selected", "aria-disabled", "selected-prop", "is-indeterminate"])
|
|
221
221
|
])
|
|
222
222
|
]),
|
|
223
|
-
default:
|
|
224
|
-
I(d(
|
|
225
|
-
option:
|
|
226
|
-
"selected-prop": d(
|
|
227
|
-
"is-indeterminate": !d(k)(
|
|
228
|
-
disabled:
|
|
223
|
+
default: f(({ option: l, index: r }) => [
|
|
224
|
+
I(d(w), {
|
|
225
|
+
option: l,
|
|
226
|
+
"selected-prop": d(h)(l) ? d(k)(l) : A(l),
|
|
227
|
+
"is-indeterminate": !d(k)(l) && d(P)(l),
|
|
228
|
+
disabled: l[t.disabledOptionKey],
|
|
229
229
|
"name-key": t.optionNameKey,
|
|
230
230
|
"image-key": t.optionImageKey,
|
|
231
231
|
"icon-key": t.optionIconKey,
|
|
@@ -233,20 +233,20 @@ const ve = {
|
|
|
233
233
|
"end-icon-key": t.optionEndIconKey,
|
|
234
234
|
"end-icon-type": t.optionEndIconType,
|
|
235
235
|
"end-text-icon-key": t.optionEndTextIconKey,
|
|
236
|
-
"tree-main-option": d(
|
|
237
|
-
"tree-main-option-expanded": a.value[
|
|
236
|
+
"tree-main-option": d(h)(l),
|
|
237
|
+
"tree-main-option-expanded": a.value[l[t.optionUniqueIdKey]],
|
|
238
238
|
"stop-option-click-event-propagation": "",
|
|
239
239
|
"is-multi": "",
|
|
240
|
-
onClick:
|
|
240
|
+
onClick: S(() => q(l), ["stop"]),
|
|
241
241
|
onToggleTreeCollapse: Q
|
|
242
242
|
}, null, 8, ["option", "selected-prop", "is-indeterminate", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type", "end-text-icon-key", "tree-main-option", "tree-main-option-expanded", "onClick"]),
|
|
243
|
-
d(
|
|
243
|
+
d(h)(l) ? (C(), B("div", ve, [
|
|
244
244
|
de(M("div", null, [
|
|
245
|
-
(C(!0), B(ae, null,
|
|
246
|
-
key: `${
|
|
247
|
-
option:
|
|
248
|
-
"selected-prop": A(
|
|
249
|
-
disabled:
|
|
245
|
+
(C(!0), B(ae, null, re(d(v)(l), (s, E) => (C(), D(d(w), {
|
|
246
|
+
key: `${r}-${E}`,
|
|
247
|
+
option: s,
|
|
248
|
+
"selected-prop": A(s),
|
|
249
|
+
disabled: s[t.disabledOptionKey],
|
|
250
250
|
"name-key": t.optionNameKey,
|
|
251
251
|
"image-key": t.optionImageKey,
|
|
252
252
|
"icon-key": t.optionIconKey,
|
|
@@ -254,13 +254,13 @@ const ve = {
|
|
|
254
254
|
"end-icon-key": t.optionEndIconKey,
|
|
255
255
|
"end-icon-type": t.optionEndIconType,
|
|
256
256
|
"end-text-icon-key": t.optionEndTextIconKey,
|
|
257
|
-
"tree-child-shown": a.value[
|
|
257
|
+
"tree-child-shown": a.value[l[t.optionUniqueIdKey]],
|
|
258
258
|
"stop-option-click-event-propagation": "",
|
|
259
259
|
"is-multi": "",
|
|
260
|
-
onClick:
|
|
260
|
+
onClick: S(() => q(s), ["stop"])
|
|
261
261
|
}, null, 8, ["option", "selected-prop", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type", "end-text-icon-key", "tree-child-shown", "onClick"]))), 128))
|
|
262
262
|
], 512), [
|
|
263
|
-
[
|
|
263
|
+
[se, a.value[l[t.optionUniqueIdKey]]]
|
|
264
264
|
])
|
|
265
265
|
])) : ce("", !0)
|
|
266
266
|
]),
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './AutocompleteDropdown.vue_vue_type_style_index_0_scoped_214ddaf4_lang.css';
|
|
2
2
|
import { AppTriggerTypes as ro } from "./components/appTrigger/index.js";
|
|
3
3
|
import { AutocompleteDropdownTypes as mo } from "./components/autocompleteDropdown/index.js";
|
|
4
4
|
import { MenuItemTypes as po } from "./components/menuItem/index.js";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.chart-container[data-v-04b9d6b3]{border:1px solid var(--common-divider);background:var(--background-paper);display:flex;height:388px;border-radius:0 0 6px 6px;width:100%}.header-wrapper[data-v-04b9d6b3]{height:76px}.chart-content[data-v-04b9d6b3]{width:100%}.chart-content.with-legend[data-v-04b9d6b3]{width:calc(100% - 221px)}.chart-sidebar[data-v-04b9d6b3]{border-left:1px solid var(--common-divider)}.chart[data-v-04b9d6b3]{width:100%;height:312px;position:relative}.chart__canvas[data-v-04b9d6b3]{width:100%;height:100%}.chart__tooltip[data-v-04b9d6b3]{position:absolute;pointer-events:none;transition:all .1s ease;min-width:214px;max-width:270px}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.child-options[data-v-bdfb0aef]{padding-left:1rem}.tree-search[data-v-bdfb0aef]{width:100%}
|