@ironsource/shared-ui 2.1.11-rc.37 → 2.1.11-rc.38
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.disabled-tooltip[data-v-a1c626cd],.disabled-tooltip[data-v-a1c626cd] .container{width:100%}.chart-legend[data-v-a1c626cd]{display:flex;flex-direction:column;width:220px;height:100%;padding:0 8px 8px}.search-box[data-v-a1c626cd]{padding:12px 0 4px}.legend[data-v-a1c626cd]{overflow-y:auto;color:var(--text-primary);height:100%;overflow-x:hidden}.legend__list[data-v-a1c626cd]{list-style:none;padding:0}.legend__list>li[data-v-a1c626cd]{display:flex;align-items:center;gap:8px;padding:6px 8px}.legend__list>li[data-v-a1c626cd]:hover{background-color:var(--action-hover, rgba(0, 0, 0, .05));border-radius:8px;cursor:pointer}.legend__list>li.disabled-item[data-v-a1c626cd]{cursor:not-allowed!important;opacity:.5;background:var(--background-paper)}.legend__list>li .item-wrapper[data-v-a1c626cd]{display:flex;align-items:center;gap:8px;width:100%}.legend__list>li .item-wrapper .legend-label[data-v-a1c626cd]{width:80%}.legend__list>li .item-wrapper .icon-color[data-v-a1c626cd]{color:var(--action-active)}.legend__list>li .item-wrapper .label-container[data-v-a1c626cd]{display:flex;flex-direction:column;width:100%}.legend__list>li .item-wrapper .label-container .legend-caption[data-v-a1c626cd]{color:var(--text-secondary, #646464)}
|
|
@@ -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_a1c626cd_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-a1c626cd"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|
|
@@ -1,89 +1,86 @@
|
|
|
1
|
-
import "../../ChartLegend.
|
|
1
|
+
import "../../ChartLegend.vue_vue_type_style_index_0_scoped_a1c626cd_lang.css"; import { defineComponent as M, ref as N, computed as p, openBlock as r, createElementBlock as u, createElementVNode as a, createVNode as n, unref as i, mergeProps as x, Fragment as S, renderList as P, normalizeClass as A, withCtx as m, withModifiers as F, createBlock as H, createCommentVNode as U, createTextVNode as h, toDisplayString as I } from "vue";
|
|
2
2
|
import { useVirtualList as z } from "@vueuse/core";
|
|
3
|
-
import
|
|
3
|
+
import _ from "../typography/v4/Typography.vue.js";
|
|
4
4
|
import R from "../checkbox/v4/CheckboxV4.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import { DEFAULT_MIN_VISIBLE as
|
|
7
|
-
import
|
|
5
|
+
import q from "../search/v4/SearchV4.vue.js";
|
|
6
|
+
import { DEFAULT_MIN_VISIBLE as G, DEFAULT_MAX_VISIBLE as X } from "./consts.js";
|
|
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 = ["onClick"], Q =
|
|
10
|
+
const J = { class: "chart-legend" }, K = { class: "search-box" }, O = ["onClick"], Q = { class: "label-container" }, ae = /* @__PURE__ */ M({
|
|
11
11
|
__name: "ChartLegend",
|
|
12
12
|
props: {
|
|
13
13
|
items: { default: () => [] },
|
|
14
14
|
visibleIds: { default: () => [] },
|
|
15
|
-
minVisible: { default:
|
|
16
|
-
maxVisible: { default:
|
|
15
|
+
minVisible: { default: G },
|
|
16
|
+
maxVisible: { default: X },
|
|
17
17
|
maxLimitTooltipText: { default: "" }
|
|
18
18
|
},
|
|
19
19
|
emits: ["update:visibleIds"],
|
|
20
|
-
setup(
|
|
21
|
-
const o =
|
|
22
|
-
const t =
|
|
20
|
+
setup(b, { emit: L }) {
|
|
21
|
+
const o = b, T = 32, d = N(""), g = p(() => {
|
|
22
|
+
const t = d.value.toLowerCase();
|
|
23
23
|
return o.items.filter(
|
|
24
24
|
(l) => l.label.toLowerCase().includes(t)
|
|
25
25
|
);
|
|
26
|
-
}), s = (t) => o.visibleIds.includes(t.id),
|
|
26
|
+
}), s = (t) => o.visibleIds.includes(t.id), f = p(
|
|
27
27
|
() => o.visibleIds.length >= o.maxVisible
|
|
28
|
-
),
|
|
28
|
+
), k = p(
|
|
29
29
|
() => o.visibleIds.length <= o.minVisible
|
|
30
|
-
),
|
|
31
|
-
|
|
30
|
+
), c = (t) => k.value && s(t) || f.value && !s(t), C = (t) => !o.maxLimitTooltipText || s(t) || !f.value, V = (t, l) => {
|
|
31
|
+
L(
|
|
32
32
|
"update:visibleIds",
|
|
33
33
|
t ? [...o.visibleIds, l.id] : o.visibleIds.filter((e) => e !== l.id)
|
|
34
34
|
);
|
|
35
|
-
}, { list:
|
|
36
|
-
itemHeight:
|
|
35
|
+
}, { list: y, containerProps: w, wrapperProps: E } = z(g, {
|
|
36
|
+
itemHeight: T,
|
|
37
37
|
overscan: 10
|
|
38
|
-
}),
|
|
39
|
-
|
|
38
|
+
}), B = (t) => {
|
|
39
|
+
c(t) || V(!s(t), t);
|
|
40
40
|
};
|
|
41
|
-
return (t, l) => (r(),
|
|
41
|
+
return (t, l) => (r(), u("div", J, [
|
|
42
42
|
a("div", K, [
|
|
43
|
-
n(i(
|
|
44
|
-
modelValue:
|
|
45
|
-
"onUpdate:modelValue": l[0] || (l[0] = (e) =>
|
|
43
|
+
n(i(q), {
|
|
44
|
+
modelValue: d.value,
|
|
45
|
+
"onUpdate:modelValue": l[0] || (l[0] = (e) => d.value = e)
|
|
46
46
|
}, null, 8, ["modelValue"])
|
|
47
47
|
]),
|
|
48
|
-
a("div",
|
|
49
|
-
a("ul",
|
|
50
|
-
(r(!0),
|
|
48
|
+
a("div", x({ class: "legend" }, i(w)), [
|
|
49
|
+
a("ul", x({ class: "legend__list" }, i(E)), [
|
|
50
|
+
(r(!0), u(S, null, P(i(y), ({ data: e, index: D }) => (r(), u("li", {
|
|
51
51
|
key: D,
|
|
52
|
-
class: A({ "disabled-item":
|
|
52
|
+
class: A({ "disabled-item": c(e) })
|
|
53
53
|
}, [
|
|
54
54
|
n(i(j), {
|
|
55
|
-
text:
|
|
56
|
-
disabled:
|
|
55
|
+
text: b.maxLimitTooltipText,
|
|
56
|
+
disabled: C(e),
|
|
57
57
|
class: "disabled-tooltip"
|
|
58
58
|
}, {
|
|
59
|
-
default:
|
|
59
|
+
default: m(() => [
|
|
60
60
|
a("div", {
|
|
61
61
|
class: "item-wrapper",
|
|
62
|
-
onClick: (
|
|
62
|
+
onClick: (v) => B(e)
|
|
63
63
|
}, [
|
|
64
64
|
n(i(R), {
|
|
65
65
|
color: e.color,
|
|
66
66
|
"is-checked": s(e),
|
|
67
|
-
disabled:
|
|
67
|
+
disabled: c(e),
|
|
68
68
|
onClick: l[1] || (l[1] = F(
|
|
69
|
-
(
|
|
70
|
-
|
|
69
|
+
(v) => {
|
|
70
|
+
v.stopPropagation();
|
|
71
71
|
},
|
|
72
72
|
["stop"]
|
|
73
73
|
))
|
|
74
74
|
}, null, 8, ["color", "is-checked", "disabled"]),
|
|
75
|
-
e.icon ? (r(), H(i(
|
|
75
|
+
e.icon ? (r(), H(i($), {
|
|
76
76
|
key: 0,
|
|
77
77
|
class: "icon-color",
|
|
78
78
|
type: e.iconType,
|
|
79
79
|
name: e.icon,
|
|
80
80
|
size: "16px"
|
|
81
81
|
}, null, 8, ["type", "name"])) : U("", !0),
|
|
82
|
-
a("div",
|
|
83
|
-
|
|
84
|
-
onClick: (p) => x(e)
|
|
85
|
-
}, [
|
|
86
|
-
n(i(L), {
|
|
82
|
+
a("div", Q, [
|
|
83
|
+
n(i(_), {
|
|
87
84
|
variant: "body2",
|
|
88
85
|
class: "legend-label",
|
|
89
86
|
"is-truncated": "",
|
|
@@ -91,12 +88,12 @@ const J = { class: "chart-legend" }, K = { class: "search-box" }, O = ["onClick"
|
|
|
91
88
|
"tooltip-text": e.label,
|
|
92
89
|
"tooltip-placement": "left"
|
|
93
90
|
}, {
|
|
94
|
-
default:
|
|
95
|
-
I(
|
|
91
|
+
default: m(() => [
|
|
92
|
+
h(I(e.label), 1)
|
|
96
93
|
]),
|
|
97
94
|
_: 2
|
|
98
95
|
}, 1032, ["tooltip-text"]),
|
|
99
|
-
n(i(
|
|
96
|
+
n(i(_), {
|
|
100
97
|
variant: "caption",
|
|
101
98
|
class: "legend-caption legend-label",
|
|
102
99
|
"is-truncated": "",
|
|
@@ -104,12 +101,12 @@ const J = { class: "chart-legend" }, K = { class: "search-box" }, O = ["onClick"
|
|
|
104
101
|
"tooltip-text": e.caption,
|
|
105
102
|
"tooltip-placement": "left"
|
|
106
103
|
}, {
|
|
107
|
-
default:
|
|
108
|
-
I(
|
|
104
|
+
default: m(() => [
|
|
105
|
+
h(I(e.caption), 1)
|
|
109
106
|
]),
|
|
110
107
|
_: 2
|
|
111
108
|
}, 1032, ["tooltip-text"])
|
|
112
|
-
]
|
|
109
|
+
])
|
|
113
110
|
], 8, O)
|
|
114
111
|
]),
|
|
115
112
|
_: 2
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.disabled-tooltip[data-v-3cd8616d],.disabled-tooltip[data-v-3cd8616d] .container{width:100%}.chart-legend[data-v-3cd8616d]{display:flex;flex-direction:column;width:220px;height:100%;padding:0 8px 8px}.search-box[data-v-3cd8616d]{padding:12px 0 4px}.legend[data-v-3cd8616d]{overflow-y:auto;color:var(--text-primary);height:100%;overflow-x:hidden}.legend__list[data-v-3cd8616d]{list-style:none;padding:0}.legend__list>li[data-v-3cd8616d]{display:flex;align-items:center;gap:8px;padding:6px 8px}.legend__list>li[data-v-3cd8616d]:hover{background-color:var(--action-hover, rgba(0, 0, 0, .05));border-radius:8px;cursor:pointer}.legend__list>li.disabled-item[data-v-3cd8616d]{cursor:not-allowed!important;opacity:.5;background:var(--background-paper)}.legend__list>li .item-wrapper[data-v-3cd8616d]{display:flex;align-items:center;gap:8px;width:100%}.legend__list>li .item-wrapper .legend-label[data-v-3cd8616d]{width:80%}.legend__list>li .item-wrapper .icon-color[data-v-3cd8616d]{color:var(--action-active)}.legend__list>li .item-wrapper .label-container[data-v-3cd8616d]{display:flex;flex-direction:column;width:100%}.legend__list>li .item-wrapper .label-container .legend-caption[data-v-3cd8616d]{color:var(--text-secondary, #646464)}
|