@ironsource/shared-ui 2.1.12-rc.9 → 2.1.12-test.58
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/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_0123c361_lang.css +1 -0
- package/Chart.vue_vue_type_style_index_0_scoped_757e7752_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_92052479_lang.css +1 -0
- package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_d61ed404_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_bb382dc4_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_86ea5d2a_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/components/chart/Chart.vue.d.ts +56 -2
- package/components/chart/Chart.vue.js +4 -4
- package/components/chart/Chart.vue2.js +93 -60
- package/components/chart/ChartHeader.vue.d.ts +25 -0
- package/components/chart/ChartHeader.vue.js +2 -2
- package/components/chart/ChartHeader.vue2.js +75 -50
- package/components/chart/ChartHeaderTrend.vue.d.ts +15 -0
- package/components/chart/ChartHeaderTrend.vue.js +3 -3
- package/components/chart/ChartHeaderTrend.vue2.js +83 -19
- 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 +43 -4
- package/components/chart/ChartPlane.vue.js +3 -3
- package/components/chart/ChartPlane.vue2.js +137 -118
- 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 +237 -40
- package/components/chart/mockData.d.ts +8 -14
- package/components/chart/types.d.ts +2 -1
- package/components/dropdown/v4/ButtonDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/ButtonDropdownTrigger.vue2.js +1 -1
- 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/table/v4/DataGrid.vue.js +3 -3
- package/components/table/v4/DataGrid.vue2.js +35 -35
- package/index.d.ts +37 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/utils/formatNumbers.d.ts +1 -1
- package/utils/formatNumbers.js +14 -14
- package/utils/totals.d.ts +5 -0
- package/utils/totals.js +9 -0
- package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_604dfc6f_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/DataGrid.vue_vue_type_style_index_0_scoped_6b54ac22_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
|
@@ -1,53 +1,86 @@
|
|
|
1
|
-
import "../../ChartHeader.
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { ChartType as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
1
|
+
import "../../ChartHeader.vue_vue_type_style_index_0_scoped_92052479_lang.css"; import { defineComponent as S, useSlots as R, computed as m, openBlock as r, createElementBlock as w, normalizeClass as B, createElementVNode as i, createVNode as f, unref as t, withCtx as o, renderSlot as P, createBlock as d, createTextVNode as u, toDisplayString as c, createCommentVNode as n, normalizeProps as v, mergeProps as g, isRef as N } from "vue";
|
|
2
|
+
import s from "../typography/v4/Typography.vue.js";
|
|
3
|
+
import D from "../switch/v4/SwitchV4.vue.js";
|
|
4
|
+
import { ChartType as h } from "./types.js";
|
|
5
|
+
import L from "../tooltip/v4/TooltipV4.vue.js";
|
|
6
|
+
import V from "./ChartHeaderTrend.vue.js";
|
|
7
|
+
const z = { class: "header-texts" }, E = { class: "header-row" }, O = { class: "subheader-tooltip" }, U = { class: "header-row" }, I = /* @__PURE__ */ S({
|
|
8
8
|
__name: "ChartHeader",
|
|
9
9
|
props: {
|
|
10
|
-
chartType: { default:
|
|
10
|
+
chartType: { default: h.Line },
|
|
11
11
|
typeSwitcher: { type: Boolean, default: !0 },
|
|
12
12
|
header: { default: "" },
|
|
13
13
|
subheader: { default: "" },
|
|
14
|
+
subheaderTooltipHeader: { default: null },
|
|
15
|
+
subheaderTooltipText: { default: null },
|
|
16
|
+
trendTooltipHeader: { default: null },
|
|
17
|
+
trendTooltipRangeCurrent: { default: null },
|
|
18
|
+
trendTooltipRangePrevious: { default: null },
|
|
14
19
|
compact: { type: Boolean, default: !1 },
|
|
15
20
|
trendValue: { default: null },
|
|
16
21
|
trendDirection: { default: "up" }
|
|
17
22
|
},
|
|
18
23
|
emits: ["update:chartType"],
|
|
19
|
-
setup(e, { emit:
|
|
20
|
-
const
|
|
21
|
-
{ id:
|
|
22
|
-
{ id:
|
|
23
|
-
{ id:
|
|
24
|
-
],
|
|
24
|
+
setup(e, { emit: x }) {
|
|
25
|
+
const a = e, C = R(), T = [
|
|
26
|
+
{ id: h.Line, icon: "chart-line-up" },
|
|
27
|
+
{ id: h.Bar, icon: "chart-bar" },
|
|
28
|
+
{ id: h.StackedLine, icon: "chart-line" }
|
|
29
|
+
], p = m({
|
|
25
30
|
get() {
|
|
26
|
-
return
|
|
31
|
+
return T.find(({ id: l }) => l === a.chartType);
|
|
27
32
|
},
|
|
28
|
-
set(
|
|
29
|
-
|
|
33
|
+
set(l) {
|
|
34
|
+
x("update:chartType", l.id);
|
|
30
35
|
}
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
}), k = m(() => C["subheader-tooltip"] || a.subheaderTooltipText || a.subheaderTooltipHeader), b = m(() => ({
|
|
37
|
+
value: a.trendValue,
|
|
38
|
+
direction: a.trendDirection,
|
|
39
|
+
tooltipHeader: a.trendTooltipHeader,
|
|
40
|
+
tooltipRangeCurrent: a.trendTooltipRangeCurrent,
|
|
41
|
+
tooltipRangePrevious: a.trendTooltipRangePrevious
|
|
42
|
+
}));
|
|
43
|
+
return (l, y) => (r(), w("div", {
|
|
44
|
+
class: B(["chart-header", { "chart-header--compact": e.compact }])
|
|
34
45
|
}, [
|
|
35
|
-
i("div",
|
|
36
|
-
i("div",
|
|
37
|
-
|
|
46
|
+
i("div", z, [
|
|
47
|
+
i("div", E, [
|
|
48
|
+
f(t(L), {
|
|
38
49
|
placement: "right",
|
|
39
|
-
disabled: !t
|
|
50
|
+
disabled: !t(k)
|
|
40
51
|
}, {
|
|
41
|
-
tooltip:
|
|
42
|
-
|
|
52
|
+
tooltip: o(() => [
|
|
53
|
+
P(l.$slots, "subheader-tooltip", {}, () => [
|
|
54
|
+
i("div", O, [
|
|
55
|
+
e.subheaderTooltipHeader ? (r(), d(t(s), {
|
|
56
|
+
key: 0,
|
|
57
|
+
variant: "h5"
|
|
58
|
+
}, {
|
|
59
|
+
default: o(() => [
|
|
60
|
+
u(c(e.subheaderTooltipHeader), 1)
|
|
61
|
+
]),
|
|
62
|
+
_: 1
|
|
63
|
+
})) : n("", !0),
|
|
64
|
+
e.subheaderTooltipText ? (r(), d(t(s), {
|
|
65
|
+
key: 1,
|
|
66
|
+
variant: "body2",
|
|
67
|
+
class: "subheader-tooltip__text"
|
|
68
|
+
}, {
|
|
69
|
+
default: o(() => [
|
|
70
|
+
u(c(e.subheaderTooltipText), 1)
|
|
71
|
+
]),
|
|
72
|
+
_: 1
|
|
73
|
+
})) : n("", !0)
|
|
74
|
+
])
|
|
75
|
+
], !0)
|
|
43
76
|
]),
|
|
44
|
-
default:
|
|
45
|
-
|
|
77
|
+
default: o(() => [
|
|
78
|
+
f(t(s), {
|
|
46
79
|
class: "subheader",
|
|
47
80
|
variant: "h5"
|
|
48
81
|
}, {
|
|
49
|
-
default:
|
|
50
|
-
|
|
82
|
+
default: o(() => [
|
|
83
|
+
u(c(e.subheader + (e.compact ? ":" : "")), 1)
|
|
51
84
|
]),
|
|
52
85
|
_: 1
|
|
53
86
|
})
|
|
@@ -55,37 +88,29 @@ const D = { class: "header-texts" }, N = { class: "header-row" }, L = { class: "
|
|
|
55
88
|
_: 3
|
|
56
89
|
}, 8, ["disabled"])
|
|
57
90
|
]),
|
|
58
|
-
i("div",
|
|
59
|
-
|
|
91
|
+
i("div", U, [
|
|
92
|
+
f(t(s), {
|
|
60
93
|
class: "header-text",
|
|
61
94
|
variant: e.compact ? "h5" : "chart2"
|
|
62
95
|
}, {
|
|
63
|
-
default:
|
|
64
|
-
|
|
96
|
+
default: o(() => [
|
|
97
|
+
u(c(e.header), 1)
|
|
65
98
|
]),
|
|
66
99
|
_: 1
|
|
67
100
|
}, 8, ["variant"]),
|
|
68
|
-
!e.compact && e.trendValue !== null ? (r(),
|
|
69
|
-
key: 0,
|
|
70
|
-
value: e.trendValue,
|
|
71
|
-
direction: e.trendDirection
|
|
72
|
-
}, null, 8, ["value", "direction"])) : u("", !0)
|
|
101
|
+
!e.compact && e.trendValue !== null ? (r(), d(V, v(g({ key: 0 }, t(b))), null, 16)) : n("", !0)
|
|
73
102
|
]),
|
|
74
|
-
e.compact && e.trendValue !== null ? (r(),
|
|
75
|
-
key: 0,
|
|
76
|
-
value: e.trendValue,
|
|
77
|
-
direction: e.trendDirection
|
|
78
|
-
}, null, 8, ["value", "direction"])) : u("", !0)
|
|
103
|
+
e.compact && e.trendValue !== null ? (r(), d(V, v(g({ key: 0 }, t(b))), null, 16)) : n("", !0)
|
|
79
104
|
]),
|
|
80
|
-
e.typeSwitcher ? (r(),
|
|
105
|
+
e.typeSwitcher ? (r(), d(t(D), {
|
|
81
106
|
key: 0,
|
|
82
|
-
modelValue:
|
|
83
|
-
"onUpdate:modelValue":
|
|
84
|
-
options:
|
|
85
|
-
}, null, 8, ["modelValue"])) :
|
|
107
|
+
modelValue: t(p),
|
|
108
|
+
"onUpdate:modelValue": y[0] || (y[0] = (H) => N(p) ? p.value = H : null),
|
|
109
|
+
options: T
|
|
110
|
+
}, null, 8, ["modelValue"])) : n("", !0)
|
|
86
111
|
], 2));
|
|
87
112
|
}
|
|
88
113
|
});
|
|
89
114
|
export {
|
|
90
|
-
|
|
115
|
+
I as default
|
|
91
116
|
};
|
|
@@ -1,18 +1,33 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
2
|
value?: number | string;
|
|
3
3
|
direction?: 'up' | 'down';
|
|
4
|
+
tooltipHeader?: string;
|
|
5
|
+
tooltipRangeCurrent?: string;
|
|
6
|
+
tooltipRangePrevious?: string;
|
|
4
7
|
}>, {
|
|
5
8
|
value: any;
|
|
6
9
|
direction: string;
|
|
10
|
+
tooltipHeader: any;
|
|
11
|
+
tooltipRangeCurrent: any;
|
|
12
|
+
tooltipRangePrevious: any;
|
|
7
13
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
8
14
|
value?: number | string;
|
|
9
15
|
direction?: 'up' | 'down';
|
|
16
|
+
tooltipHeader?: string;
|
|
17
|
+
tooltipRangeCurrent?: string;
|
|
18
|
+
tooltipRangePrevious?: string;
|
|
10
19
|
}>, {
|
|
11
20
|
value: any;
|
|
12
21
|
direction: string;
|
|
22
|
+
tooltipHeader: any;
|
|
23
|
+
tooltipRangeCurrent: any;
|
|
24
|
+
tooltipRangePrevious: any;
|
|
13
25
|
}>>>, {
|
|
14
26
|
value: number | string;
|
|
15
27
|
direction: 'up' | 'down';
|
|
28
|
+
tooltipHeader: string;
|
|
29
|
+
tooltipRangeCurrent: string;
|
|
30
|
+
tooltipRangePrevious: string;
|
|
16
31
|
}>;
|
|
17
32
|
export default _default;
|
|
18
33
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./ChartHeaderTrend.vue2.js";
|
|
2
2
|
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../ChartHeaderTrend.
|
|
4
|
-
const
|
|
3
|
+
// import "../../ChartHeaderTrend.vue_vue_type_style_index_0_scoped_d61ed404_lang.css"; //*');
|
|
4
|
+
const t = /* @__PURE__ */ o(e, [["__scopeId", "data-v-d61ed404"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
t as default
|
|
7
7
|
};
|
|
@@ -1,32 +1,96 @@
|
|
|
1
|
-
import "../../ChartHeaderTrend.
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import "../../ChartHeaderTrend.vue_vue_type_style_index_0_scoped_d61ed404_lang.css"; import { defineComponent as h, computed as v, openBlock as a, createElementBlock as p, normalizeClass as g, createVNode as n, unref as e, withCtx as o, createElementVNode as s, createBlock as c, createTextVNode as l, toDisplayString as i, createCommentVNode as d, pushScopeId as y, popScopeId as C } from "vue";
|
|
2
|
+
import r from "../typography/v4/Typography.vue.js";
|
|
3
|
+
import R 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 m = (t) => (y("data-v-d61ed404"), t = t(), C(), t), b = { class: "trend-tooltip" }, k = {
|
|
7
|
+
key: 2,
|
|
8
|
+
class: "separator"
|
|
9
|
+
}, _ = /* @__PURE__ */ m(() => /* @__PURE__ */ s("hr", null, null, -1)), H = /* @__PURE__ */ m(() => /* @__PURE__ */ s("hr", null, null, -1)), B = /* @__PURE__ */ h({
|
|
6
10
|
__name: "ChartHeaderTrend",
|
|
7
11
|
props: {
|
|
8
12
|
value: { default: null },
|
|
9
|
-
direction: { default: "up" }
|
|
13
|
+
direction: { default: "up" },
|
|
14
|
+
tooltipHeader: { default: null },
|
|
15
|
+
tooltipRangeCurrent: { default: null },
|
|
16
|
+
tooltipRangePrevious: { default: null }
|
|
10
17
|
},
|
|
11
|
-
setup(
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
setup(t) {
|
|
19
|
+
const u = t, f = v(
|
|
20
|
+
() => u.tooltipHeader || u.tooltipRangeCurrent || u.tooltipRangePrevious
|
|
21
|
+
);
|
|
22
|
+
return (P, T) => (a(), p("div", {
|
|
23
|
+
class: g(["chart-trend", [`chart-trend--${t.direction}`]])
|
|
14
24
|
}, [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
n(e(x), {
|
|
26
|
+
disabled: !e(f)
|
|
27
|
+
}, {
|
|
28
|
+
tooltip: o(() => [
|
|
29
|
+
s("div", b, [
|
|
30
|
+
t.tooltipHeader ? (a(), c(e(r), {
|
|
31
|
+
key: 0,
|
|
32
|
+
class: "trend-tooltip__header",
|
|
33
|
+
variant: "subtitle2"
|
|
34
|
+
}, {
|
|
35
|
+
default: o(() => [
|
|
36
|
+
l(i(t.tooltipHeader), 1)
|
|
37
|
+
]),
|
|
38
|
+
_: 1
|
|
39
|
+
})) : d("", !0),
|
|
40
|
+
t.tooltipRangeCurrent ? (a(), c(e(r), {
|
|
41
|
+
key: 1,
|
|
42
|
+
variant: "body2",
|
|
43
|
+
class: "trend-tooltip__text"
|
|
44
|
+
}, {
|
|
45
|
+
default: o(() => [
|
|
46
|
+
l(i(t.tooltipRangeCurrent), 1)
|
|
47
|
+
]),
|
|
48
|
+
_: 1
|
|
49
|
+
})) : d("", !0),
|
|
50
|
+
t.tooltipRangeCurrent && t.tooltipRangePrevious ? (a(), p("div", k, [
|
|
51
|
+
_,
|
|
52
|
+
n(e(r), {
|
|
53
|
+
class: "separator__text",
|
|
54
|
+
variant: "caption"
|
|
55
|
+
}, {
|
|
56
|
+
default: o(() => [
|
|
57
|
+
l(" vs. ")
|
|
58
|
+
]),
|
|
59
|
+
_: 1
|
|
60
|
+
}),
|
|
61
|
+
H
|
|
62
|
+
])) : d("", !0),
|
|
63
|
+
t.tooltipRangePrevious ? (a(), c(e(r), {
|
|
64
|
+
key: 3,
|
|
65
|
+
variant: "body2",
|
|
66
|
+
class: "trend-tooltip__text"
|
|
67
|
+
}, {
|
|
68
|
+
default: o(() => [
|
|
69
|
+
l(i(t.tooltipRangePrevious), 1)
|
|
70
|
+
]),
|
|
71
|
+
_: 1
|
|
72
|
+
})) : d("", !0)
|
|
73
|
+
])
|
|
74
|
+
]),
|
|
75
|
+
default: o(() => [
|
|
76
|
+
n(e(R), {
|
|
77
|
+
class: "trend-icon",
|
|
78
|
+
type: "bold",
|
|
79
|
+
name: `arrow-${t.direction}`,
|
|
80
|
+
size: "13px"
|
|
81
|
+
}, null, 8, ["name"]),
|
|
82
|
+
n(e(r), { variant: "chipLabel" }, {
|
|
83
|
+
default: o(() => [
|
|
84
|
+
l(i(t.value), 1)
|
|
85
|
+
]),
|
|
86
|
+
_: 1
|
|
87
|
+
})
|
|
24
88
|
]),
|
|
25
89
|
_: 1
|
|
26
|
-
})
|
|
90
|
+
}, 8, ["disabled"])
|
|
27
91
|
], 2));
|
|
28
92
|
}
|
|
29
93
|
});
|
|
30
94
|
export {
|
|
31
|
-
|
|
95
|
+
B as default
|
|
32
96
|
};
|
|
@@ -5,34 +5,51 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
5
5
|
minVisible?: number;
|
|
6
6
|
maxVisible?: number;
|
|
7
7
|
maxLimitTooltipText?: string;
|
|
8
|
+
sortSelected?: unknown;
|
|
9
|
+
sortOptions?: unknown[];
|
|
10
|
+
sortOptionNameKey?: string;
|
|
8
11
|
}>, {
|
|
9
12
|
items: () => any[];
|
|
10
13
|
visibleIds: () => any[];
|
|
11
14
|
minVisible: number;
|
|
12
15
|
maxVisible: number;
|
|
13
16
|
maxLimitTooltipText: string;
|
|
17
|
+
sortSelected: any;
|
|
18
|
+
sortOptions: () => any[];
|
|
19
|
+
sortOptionNameKey: string;
|
|
14
20
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
21
|
"update:visibleIds": (visibleIds: unknown[]) => void;
|
|
22
|
+
"update:sortSelected": (sortOption: unknown) => void;
|
|
16
23
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
17
24
|
items: LegendItem[];
|
|
18
25
|
visibleIds: unknown[];
|
|
19
26
|
minVisible?: number;
|
|
20
27
|
maxVisible?: number;
|
|
21
28
|
maxLimitTooltipText?: string;
|
|
29
|
+
sortSelected?: unknown;
|
|
30
|
+
sortOptions?: unknown[];
|
|
31
|
+
sortOptionNameKey?: string;
|
|
22
32
|
}>, {
|
|
23
33
|
items: () => any[];
|
|
24
34
|
visibleIds: () => any[];
|
|
25
35
|
minVisible: number;
|
|
26
36
|
maxVisible: number;
|
|
27
37
|
maxLimitTooltipText: string;
|
|
38
|
+
sortSelected: any;
|
|
39
|
+
sortOptions: () => any[];
|
|
40
|
+
sortOptionNameKey: string;
|
|
28
41
|
}>>> & {
|
|
29
42
|
"onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
|
|
43
|
+
"onUpdate:sortSelected"?: (sortOption: unknown) => any;
|
|
30
44
|
}, {
|
|
31
45
|
items: LegendItem[];
|
|
32
46
|
visibleIds: unknown[];
|
|
33
47
|
minVisible: number;
|
|
34
48
|
maxVisible: number;
|
|
35
49
|
maxLimitTooltipText: string;
|
|
50
|
+
sortSelected: any;
|
|
51
|
+
sortOptions: unknown[];
|
|
52
|
+
sortOptionNameKey: string;
|
|
36
53
|
}>;
|
|
37
54
|
export default _default;
|
|
38
55
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -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
|
|
3
|
+
// import "../../ChartLegend.vue_vue_type_style_index_0_scoped_da487aba_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-da487aba"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
@@ -1,124 +1,135 @@
|
|
|
1
|
-
import "../../ChartLegend.
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import "../../ChartLegend.vue_vue_type_style_index_0_scoped_da487aba_lang.css"; import { defineComponent as O, ref as P, computed as b, openBlock as s, createElementBlock as p, createElementVNode as d, createVNode as c, unref as o, createBlock as v, isRef as U, createCommentVNode as h, mergeProps as T, withCtx as u, createTextVNode as x, Fragment as A, renderList as F, normalizeClass as H, withModifiers as R, toDisplayString as _ } from "vue";
|
|
2
|
+
import { useVModel as z, useVirtualList as K } from "@vueuse/core";
|
|
3
|
+
import k from "../typography/v4/Typography.vue.js";
|
|
4
|
+
import $ 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
|
-
import
|
|
7
|
+
import j from "../icon/v4/IconV4.vue.js";
|
|
8
8
|
import "../icon/v4/IconFlag.vue.js";
|
|
9
|
-
import
|
|
10
|
-
|
|
9
|
+
import J from "../tooltip/v4/TooltipV4.vue.js";
|
|
10
|
+
import Q from "./LegendSorting.vue.js";
|
|
11
|
+
const W = { class: "chart-legend" }, Y = { class: "search-box" }, Z = {
|
|
11
12
|
key: 0,
|
|
12
13
|
class: "empty-list"
|
|
13
|
-
},
|
|
14
|
+
}, ee = ["onClick"], te = { class: "label-container" }, ue = /* @__PURE__ */ O({
|
|
14
15
|
__name: "ChartLegend",
|
|
15
16
|
props: {
|
|
16
17
|
items: { default: () => [] },
|
|
17
18
|
visibleIds: { default: () => [] },
|
|
18
19
|
minVisible: { default: G },
|
|
19
20
|
maxVisible: { default: X },
|
|
20
|
-
maxLimitTooltipText: { default: "" }
|
|
21
|
+
maxLimitTooltipText: { default: "" },
|
|
22
|
+
sortSelected: { default: null },
|
|
23
|
+
sortOptions: { default: () => [] },
|
|
24
|
+
sortOptionNameKey: { default: "" }
|
|
21
25
|
},
|
|
22
|
-
emits: ["update:visibleIds"],
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
25
|
-
const t =
|
|
26
|
-
return
|
|
27
|
-
(
|
|
26
|
+
emits: ["update:visibleIds", "update:sortSelected"],
|
|
27
|
+
setup(a, { emit: y }) {
|
|
28
|
+
const i = a, V = 32, m = z(i, "sortSelected", y), f = P(""), C = b(() => {
|
|
29
|
+
const t = f.value.toLowerCase();
|
|
30
|
+
return i.items.filter(
|
|
31
|
+
(l) => l.label.toLowerCase().includes(t)
|
|
28
32
|
);
|
|
29
|
-
}),
|
|
30
|
-
() =>
|
|
31
|
-
),
|
|
32
|
-
() =>
|
|
33
|
-
),
|
|
34
|
-
|
|
33
|
+
}), n = (t) => i.visibleIds.includes(t.id), I = b(
|
|
34
|
+
() => i.visibleIds.length >= i.maxVisible
|
|
35
|
+
), w = b(
|
|
36
|
+
() => i.visibleIds.length <= i.minVisible
|
|
37
|
+
), r = (t) => w.value && n(t) || I.value && !n(t), S = (t) => !i.maxLimitTooltipText || n(t) || !I.value, E = (t, l) => {
|
|
38
|
+
y(
|
|
35
39
|
"update:visibleIds",
|
|
36
|
-
t ? [...
|
|
40
|
+
t ? [...i.visibleIds, l.id] : i.visibleIds.filter((e) => e !== l.id)
|
|
37
41
|
);
|
|
38
|
-
}, { list:
|
|
39
|
-
itemHeight:
|
|
42
|
+
}, { list: g, containerProps: N, wrapperProps: M } = K(C, {
|
|
43
|
+
itemHeight: V,
|
|
40
44
|
overscan: 10
|
|
41
|
-
}),
|
|
42
|
-
|
|
45
|
+
}), B = (t) => {
|
|
46
|
+
r(t) || E(!n(t), t);
|
|
43
47
|
};
|
|
44
|
-
return (t,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
modelValue:
|
|
48
|
-
"onUpdate:modelValue":
|
|
49
|
-
}, null, 8, ["modelValue"])
|
|
48
|
+
return (t, l) => (s(), p("div", W, [
|
|
49
|
+
d("div", Y, [
|
|
50
|
+
c(o(q), {
|
|
51
|
+
modelValue: f.value,
|
|
52
|
+
"onUpdate:modelValue": l[0] || (l[0] = (e) => f.value = e)
|
|
53
|
+
}, null, 8, ["modelValue"]),
|
|
54
|
+
a.sortOptions?.length > 0 ? (s(), v(Q, {
|
|
55
|
+
key: 0,
|
|
56
|
+
selected: o(m),
|
|
57
|
+
"onUpdate:selected": l[1] || (l[1] = (e) => U(m) ? m.value = e : null),
|
|
58
|
+
options: a.sortOptions,
|
|
59
|
+
"option-name-key": a.sortOptionNameKey
|
|
60
|
+
}, null, 8, ["selected", "options", "option-name-key"])) : h("", !0)
|
|
50
61
|
]),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
o(
|
|
54
|
-
|
|
55
|
-
default:
|
|
56
|
-
|
|
62
|
+
d("div", T({ class: "legend" }, o(N)), [
|
|
63
|
+
d("ul", T({ class: "legend__list" }, o(M)), [
|
|
64
|
+
o(g).length === 0 ? (s(), p("li", Z, [
|
|
65
|
+
c(o(k), { variant: "body2" }, {
|
|
66
|
+
default: u(() => [
|
|
67
|
+
x("No results")
|
|
57
68
|
]),
|
|
58
69
|
_: 1
|
|
59
70
|
})
|
|
60
|
-
])) : (s(!0),
|
|
61
|
-
key:
|
|
62
|
-
class: H({ "disabled-item":
|
|
71
|
+
])) : (s(!0), p(A, { key: 1 }, F(o(g), ({ data: e, index: D }) => (s(), p("li", {
|
|
72
|
+
key: D,
|
|
73
|
+
class: H({ "disabled-item": r(e) })
|
|
63
74
|
}, [
|
|
64
|
-
|
|
65
|
-
text:
|
|
66
|
-
disabled:
|
|
75
|
+
c(o(J), {
|
|
76
|
+
text: a.maxLimitTooltipText,
|
|
77
|
+
disabled: S(e),
|
|
67
78
|
class: "disabled-tooltip"
|
|
68
79
|
}, {
|
|
69
|
-
default:
|
|
70
|
-
|
|
80
|
+
default: u(() => [
|
|
81
|
+
d("div", {
|
|
71
82
|
class: "item-wrapper",
|
|
72
|
-
onClick: (
|
|
83
|
+
onClick: (L) => B(e)
|
|
73
84
|
}, [
|
|
74
|
-
|
|
85
|
+
c(o($), {
|
|
75
86
|
color: e.color,
|
|
76
|
-
"is-checked":
|
|
77
|
-
disabled:
|
|
78
|
-
onClick:
|
|
79
|
-
(
|
|
80
|
-
|
|
87
|
+
"is-checked": n(e),
|
|
88
|
+
disabled: r(e),
|
|
89
|
+
onClick: l[2] || (l[2] = R(
|
|
90
|
+
(L) => {
|
|
91
|
+
L.stopPropagation();
|
|
81
92
|
},
|
|
82
93
|
["stop"]
|
|
83
94
|
))
|
|
84
95
|
}, null, 8, ["color", "is-checked", "disabled"]),
|
|
85
|
-
e.icon ? (s(),
|
|
96
|
+
e.icon ? (s(), v(o(j), {
|
|
86
97
|
key: 0,
|
|
87
98
|
class: "icon-color",
|
|
88
99
|
type: e.iconType,
|
|
89
100
|
name: e.icon,
|
|
90
101
|
size: "16px"
|
|
91
|
-
}, null, 8, ["type", "name"])) :
|
|
92
|
-
|
|
93
|
-
|
|
102
|
+
}, null, 8, ["type", "name"])) : h("", !0),
|
|
103
|
+
d("div", te, [
|
|
104
|
+
c(o(k), {
|
|
94
105
|
variant: "body2",
|
|
95
106
|
class: "legend-label",
|
|
96
107
|
"is-truncated": "",
|
|
97
|
-
"with-tooltip": !
|
|
108
|
+
"with-tooltip": !r(e),
|
|
98
109
|
"tooltip-text": e.label,
|
|
99
110
|
"tooltip-placement": "left"
|
|
100
111
|
}, {
|
|
101
|
-
default:
|
|
102
|
-
|
|
112
|
+
default: u(() => [
|
|
113
|
+
x(_(e.label), 1)
|
|
103
114
|
]),
|
|
104
115
|
_: 2
|
|
105
116
|
}, 1032, ["with-tooltip", "tooltip-text"]),
|
|
106
|
-
e.caption ? (s(),
|
|
117
|
+
e.caption ? (s(), v(o(k), {
|
|
107
118
|
key: 0,
|
|
108
119
|
variant: "caption",
|
|
109
120
|
class: "legend-caption legend-label",
|
|
110
121
|
"is-truncated": "",
|
|
111
|
-
"with-tooltip": !
|
|
122
|
+
"with-tooltip": !r(e),
|
|
112
123
|
"tooltip-text": e.caption,
|
|
113
124
|
"tooltip-placement": "left"
|
|
114
125
|
}, {
|
|
115
|
-
default:
|
|
116
|
-
|
|
126
|
+
default: u(() => [
|
|
127
|
+
x(_(e.caption), 1)
|
|
117
128
|
]),
|
|
118
129
|
_: 2
|
|
119
|
-
}, 1032, ["with-tooltip", "tooltip-text"])) :
|
|
130
|
+
}, 1032, ["with-tooltip", "tooltip-text"])) : h("", !0)
|
|
120
131
|
])
|
|
121
|
-
], 8,
|
|
132
|
+
], 8, ee)
|
|
122
133
|
]),
|
|
123
134
|
_: 2
|
|
124
135
|
}, 1032, ["text", "disabled"])
|
|
@@ -129,5 +140,5 @@ const J = { class: "chart-legend" }, K = { class: "search-box" }, O = {
|
|
|
129
140
|
}
|
|
130
141
|
});
|
|
131
142
|
export {
|
|
132
|
-
|
|
143
|
+
ue as default
|
|
133
144
|
};
|