@ironsource/shared-ui 2.1.12-rc.8 → 2.1.12-test.57
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_fba2eaa4_lang.css +1 -0
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_4ba9e4bd_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/common/Dropdown.common.js +81 -74
- 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/TreeDropdown.vue.js +2 -2
- package/components/dropdown/v4/TreeDropdown.vue2.js +68 -73
- 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/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
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_b883d1fa_lang.css +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../../../TreeDropdown.
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_4ba9e4bd_lang.css"; import { defineComponent as ne, provide as le, ref as c, computed as K, onMounted as te, watch as E, openBlock as g, createBlock as D, unref as d, withCtx as h, createVNode as C, mergeProps as z, createSlots as oe, renderSlot as ie, createElementVNode as M, withModifiers as S, createTextVNode as de, createElementBlock as B, withDirectives as ae, Fragment as se, renderList as re, vShow as ce, createCommentVNode as ue } from "vue";
|
|
2
|
+
import pe from "./DropdownV4.vue.js";
|
|
3
|
+
import ye from "./DefaultDropdownTrigger.vue.js";
|
|
4
4
|
import "./IconButtonDropdownTrigger.vue.js";
|
|
5
5
|
import "./ChipDropdownTrigger.vue.js";
|
|
6
6
|
import "./AppDropdownTrigger.vue.js";
|
|
@@ -9,14 +9,14 @@ import "./ButtonFilterDropdownTrigger.vue.js";
|
|
|
9
9
|
import "./TreeDropdown.vue.js";
|
|
10
10
|
import w from "./OptionV4.vue.js";
|
|
11
11
|
import "./ConditionalDropdown.vue.js";
|
|
12
|
-
import { useChildOptions as
|
|
12
|
+
import { useChildOptions as he } from "../composables/useChildOptions.js";
|
|
13
13
|
import fe from "../../search/v4/SearchV4.vue.js";
|
|
14
|
-
import { useTestIdAttrs as
|
|
14
|
+
import { useTestIdAttrs as ve } from "../../../utils/testIds.js";
|
|
15
15
|
import { DropdownTestIdModifiers as $ } from "../../../testids/index.js";
|
|
16
|
-
const
|
|
16
|
+
const me = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "child-options"
|
|
19
|
-
},
|
|
19
|
+
}, Ae = /* @__PURE__ */ ne({
|
|
20
20
|
__name: "TreeDropdown",
|
|
21
21
|
props: {
|
|
22
22
|
options: null,
|
|
@@ -44,7 +44,7 @@ const ve = {
|
|
|
44
44
|
emits: ["update:selected", "update:isOpen"],
|
|
45
45
|
setup(t, { emit: b }) {
|
|
46
46
|
const n = t;
|
|
47
|
-
|
|
47
|
+
le("isTreeDropdown", !0);
|
|
48
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
50
|
}), o[n.optionChildrenKey] || (e = e + 1), e), 0)), U = () => {
|
|
@@ -53,9 +53,9 @@ const ve = {
|
|
|
53
53
|
...e[n.optionChildrenKey]
|
|
54
54
|
]);
|
|
55
55
|
}), m.value = [...n.options], u.value = [...n.options];
|
|
56
|
-
}, { hasChildren:
|
|
57
|
-
if (
|
|
58
|
-
|
|
56
|
+
}, { hasChildren: f, getChildren: v, allChildrenSelected: I, someChildrenSelected: P } = he(i, n.optionChildrenKey), q = (e) => {
|
|
57
|
+
if (f(e)) {
|
|
58
|
+
I(e) ? i.value = i.value.filter(
|
|
59
59
|
(o) => !v(e).includes(o)
|
|
60
60
|
) : i.value = [
|
|
61
61
|
...i.value.filter((o) => !v(e).includes(o)),
|
|
@@ -66,7 +66,7 @@ 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), J = (e) => 1 + (
|
|
69
|
+
}, A = (e) => i.value.includes(e), J = (e) => 1 + (f(e) ? v(e).length : 0), j = () => {
|
|
70
70
|
b("update:selected", i.value), L.value = y.value;
|
|
71
71
|
}, F = () => {
|
|
72
72
|
i.value = [];
|
|
@@ -76,8 +76,8 @@ const ve = {
|
|
|
76
76
|
if (n.selected?.includes(l))
|
|
77
77
|
e.add(l);
|
|
78
78
|
else if (l[n.optionChildrenKey] && l[n.optionChildrenKey].length) {
|
|
79
|
-
for (const
|
|
80
|
-
if (n.selected?.includes(
|
|
79
|
+
for (const s of l[n.optionChildrenKey])
|
|
80
|
+
if (n.selected?.includes(s)) {
|
|
81
81
|
e.add(l);
|
|
82
82
|
break;
|
|
83
83
|
}
|
|
@@ -88,61 +88,56 @@ const ve = {
|
|
|
88
88
|
!n.selected.includes(l) && !e.has(l) && o.push(l);
|
|
89
89
|
}), o;
|
|
90
90
|
};
|
|
91
|
-
|
|
91
|
+
te(() => {
|
|
92
92
|
O.value || (U(), O.value = !0, n.preExpandedOptions && n.preExpandedOptions.forEach((e) => {
|
|
93
93
|
a.value[e] = 1;
|
|
94
94
|
}));
|
|
95
|
-
}),
|
|
95
|
+
}), E(
|
|
96
96
|
() => n.options,
|
|
97
97
|
() => {
|
|
98
98
|
U();
|
|
99
99
|
}
|
|
100
|
-
),
|
|
100
|
+
), E(
|
|
101
101
|
() => n.selected,
|
|
102
102
|
(e, o) => {
|
|
103
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), H = K(() => !y.value && i.value.length > 0), L = c(y.value)
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
() => {
|
|
110
|
-
n.isOpen ? m.value = G() : (i.value = [...n.selected], p.value = "");
|
|
111
|
-
}
|
|
112
|
-
);
|
|
113
|
-
const a = c({}), Q = (e) => {
|
|
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), Q = (e) => {
|
|
107
|
+
b("update:isOpen", e), n.isOpen ? m.value = G() : (i.value = [...n.selected], p.value = "");
|
|
108
|
+
}, a = c({}), R = (e) => {
|
|
114
109
|
a.value[e[n.optionUniqueIdKey]] ? delete a.value[e[n.optionUniqueIdKey]] : a.value[e[n.optionUniqueIdKey]] = 1;
|
|
115
110
|
};
|
|
116
|
-
function
|
|
117
|
-
const l = e.toLowerCase(),
|
|
118
|
-
return o.value.forEach((
|
|
119
|
-
const
|
|
120
|
-
(
|
|
111
|
+
function W(e, o) {
|
|
112
|
+
const l = e.toLowerCase(), s = [];
|
|
113
|
+
return o.value.forEach((r) => {
|
|
114
|
+
const k = r[n.optionNameKey].toLowerCase().includes(l), V = T.value[r[n.optionUniqueIdKey]]?.filter(
|
|
115
|
+
(ee) => ee[n.optionNameKey].toLowerCase().includes(l)
|
|
121
116
|
) || [];
|
|
122
|
-
(
|
|
123
|
-
}),
|
|
117
|
+
(k || V.length > 0) && (r[n.optionChildrenKey] = V, s.push(r));
|
|
118
|
+
}), s;
|
|
124
119
|
}
|
|
125
|
-
const
|
|
126
|
-
const o =
|
|
120
|
+
const X = (e) => {
|
|
121
|
+
const o = W(e, u);
|
|
127
122
|
e && (Object.keys(a.value).forEach((l) => {
|
|
128
123
|
delete a.value[l];
|
|
129
124
|
}), o.forEach((l) => {
|
|
130
125
|
Array.isArray(l[n.optionChildrenKey]) && l[n.optionChildrenKey].length && (a.value[l[n.optionUniqueIdKey]] = 1);
|
|
131
126
|
})), m.value = o;
|
|
132
|
-
},
|
|
127
|
+
}, Y = K(() => {
|
|
133
128
|
const e = n.options.length, o = n.options.reduce(
|
|
134
|
-
(l,
|
|
129
|
+
(l, s) => (a.value[s[n.optionUniqueIdKey]] && (l = l + s[n.optionChildrenKey].length), l),
|
|
135
130
|
0
|
|
136
131
|
);
|
|
137
132
|
return e + o;
|
|
138
133
|
});
|
|
139
|
-
|
|
134
|
+
E(
|
|
140
135
|
() => p.value,
|
|
141
136
|
() => {
|
|
142
|
-
|
|
137
|
+
X(p.value), x.value = !p.value;
|
|
143
138
|
}
|
|
144
139
|
);
|
|
145
|
-
const
|
|
140
|
+
const Z = () => {
|
|
146
141
|
y.value ? i.value = [] : (i.value = [], u.value.forEach((e) => {
|
|
147
142
|
if (e[n.optionChildrenKey] && e[n.optionChildrenKey].length)
|
|
148
143
|
for (const o of e[n.optionChildrenKey])
|
|
@@ -150,8 +145,8 @@ const ve = {
|
|
|
150
145
|
else
|
|
151
146
|
i.value = [e, ...i.value];
|
|
152
147
|
}));
|
|
153
|
-
},
|
|
154
|
-
return (e, o) => (
|
|
148
|
+
}, _ = ve(n.testId, $);
|
|
149
|
+
return (e, o) => (g(), D(d(pe), {
|
|
155
150
|
multi: "",
|
|
156
151
|
class: "tree-dropdown",
|
|
157
152
|
"show-select-all": x.value,
|
|
@@ -170,27 +165,27 @@ const ve = {
|
|
|
170
165
|
"override-option-count-calculation": J,
|
|
171
166
|
"trigger-show-all-selected-text": !1,
|
|
172
167
|
"predefined-trigger": "default",
|
|
173
|
-
"custom-number-of-displayed-options": d(
|
|
174
|
-
"onUpdate:isOpen":
|
|
168
|
+
"custom-number-of-displayed-options": d(Y),
|
|
169
|
+
"onUpdate:isOpen": Q,
|
|
175
170
|
onApply: j,
|
|
176
171
|
onClear: F
|
|
177
172
|
}, {
|
|
178
|
-
"dropdown-trigger":
|
|
179
|
-
|
|
173
|
+
"dropdown-trigger": h(({ defaultTriggerProps: l }) => [
|
|
174
|
+
C(d(ye), z(l, {
|
|
180
175
|
"all-selected": L.value,
|
|
181
176
|
"show-all-selected-text": ""
|
|
182
|
-
}),
|
|
177
|
+
}), oe({ _: 2 }, [
|
|
183
178
|
e.$slots["trigger-end-icon"] ? {
|
|
184
179
|
name: "end-icon",
|
|
185
|
-
fn:
|
|
186
|
-
|
|
180
|
+
fn: h(() => [
|
|
181
|
+
ie(e.$slots, "trigger-end-icon", {}, void 0, !0)
|
|
187
182
|
]),
|
|
188
183
|
key: "0"
|
|
189
184
|
} : void 0
|
|
190
185
|
]), 1040, ["all-selected"])
|
|
191
186
|
]),
|
|
192
|
-
"inline-search":
|
|
193
|
-
|
|
187
|
+
"inline-search": h(() => [
|
|
188
|
+
C(d(fe), {
|
|
194
189
|
modelValue: p.value,
|
|
195
190
|
"onUpdate:modelValue": o[0] || (o[0] = (l) => p.value = l),
|
|
196
191
|
class: "tree-search",
|
|
@@ -201,30 +196,30 @@ const ve = {
|
|
|
201
196
|
"test-id": t.testId
|
|
202
197
|
}, null, 8, ["modelValue", "placeholder", "test-id"])
|
|
203
198
|
]),
|
|
204
|
-
"select-all":
|
|
199
|
+
"select-all": h(() => [
|
|
205
200
|
M("li", null, [
|
|
206
|
-
|
|
201
|
+
C(d(w), z({
|
|
207
202
|
"aria-selected": d(y),
|
|
208
203
|
"aria-disabled": !!t.disabled,
|
|
209
204
|
"selected-prop": d(y),
|
|
210
205
|
"is-indeterminate": d(H),
|
|
211
206
|
"is-multi": "",
|
|
212
207
|
"select-all-option": ""
|
|
213
|
-
}, d(
|
|
214
|
-
onClick: o[1] || (o[1] = S((l) =>
|
|
208
|
+
}, d(_)[d($).SELECT_ALL], {
|
|
209
|
+
onClick: o[1] || (o[1] = S((l) => Z(), ["stop"]))
|
|
215
210
|
}), {
|
|
216
|
-
default:
|
|
217
|
-
|
|
211
|
+
default: h(() => [
|
|
212
|
+
de(" Select all ")
|
|
218
213
|
]),
|
|
219
214
|
_: 1
|
|
220
215
|
}, 16, ["aria-selected", "aria-disabled", "selected-prop", "is-indeterminate"])
|
|
221
216
|
])
|
|
222
217
|
]),
|
|
223
|
-
default:
|
|
224
|
-
|
|
218
|
+
default: h(({ option: l, index: s }) => [
|
|
219
|
+
C(d(w), {
|
|
225
220
|
option: l,
|
|
226
|
-
"selected-prop": d(
|
|
227
|
-
"is-indeterminate": !d(
|
|
221
|
+
"selected-prop": d(f)(l) ? d(I)(l) : A(l),
|
|
222
|
+
"is-indeterminate": !d(I)(l) && d(P)(l),
|
|
228
223
|
disabled: l[t.disabledOptionKey],
|
|
229
224
|
"name-key": t.optionNameKey,
|
|
230
225
|
"image-key": t.optionImageKey,
|
|
@@ -233,20 +228,20 @@ const ve = {
|
|
|
233
228
|
"end-icon-key": t.optionEndIconKey,
|
|
234
229
|
"end-icon-type": t.optionEndIconType,
|
|
235
230
|
"end-text-icon-key": t.optionEndTextIconKey,
|
|
236
|
-
"tree-main-option": d(
|
|
231
|
+
"tree-main-option": d(f)(l),
|
|
237
232
|
"tree-main-option-expanded": a.value[l[t.optionUniqueIdKey]],
|
|
238
233
|
"stop-option-click-event-propagation": "",
|
|
239
234
|
"is-multi": "",
|
|
240
235
|
onClick: S(() => q(l), ["stop"]),
|
|
241
|
-
onToggleTreeCollapse:
|
|
236
|
+
onToggleTreeCollapse: R
|
|
242
237
|
}, 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(
|
|
244
|
-
|
|
245
|
-
(
|
|
246
|
-
key: `${
|
|
247
|
-
option:
|
|
248
|
-
"selected-prop": A(
|
|
249
|
-
disabled:
|
|
238
|
+
d(f)(l) ? (g(), B("div", me, [
|
|
239
|
+
ae(M("div", null, [
|
|
240
|
+
(g(!0), B(se, null, re(d(v)(l), (r, k) => (g(), D(d(w), {
|
|
241
|
+
key: `${s}-${k}`,
|
|
242
|
+
option: r,
|
|
243
|
+
"selected-prop": A(r),
|
|
244
|
+
disabled: r[t.disabledOptionKey],
|
|
250
245
|
"name-key": t.optionNameKey,
|
|
251
246
|
"image-key": t.optionImageKey,
|
|
252
247
|
"icon-key": t.optionIconKey,
|
|
@@ -257,17 +252,17 @@ const ve = {
|
|
|
257
252
|
"tree-child-shown": a.value[l[t.optionUniqueIdKey]],
|
|
258
253
|
"stop-option-click-event-propagation": "",
|
|
259
254
|
"is-multi": "",
|
|
260
|
-
onClick: S(() => q(
|
|
255
|
+
onClick: S(() => q(r), ["stop"])
|
|
261
256
|
}, 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
257
|
], 512), [
|
|
263
|
-
[
|
|
258
|
+
[ce, a.value[l[t.optionUniqueIdKey]]]
|
|
264
259
|
])
|
|
265
|
-
])) :
|
|
260
|
+
])) : ue("", !0)
|
|
266
261
|
]),
|
|
267
262
|
_: 3
|
|
268
263
|
}, 8, ["show-select-all", "is-open", "options", "selected", "display-value", "placeholder", "inline-search-placeholder", "option-name-key", "size", "test-id", "disabled", "custom-number-of-displayed-options"]));
|
|
269
264
|
}
|
|
270
265
|
});
|
|
271
266
|
export {
|
|
272
|
-
|
|
267
|
+
Ae as default
|
|
273
268
|
};
|
|
@@ -1576,13 +1576,31 @@ declare const DropdownTypes: () => (({
|
|
|
1576
1576
|
type: import("vue").PropType<string>;
|
|
1577
1577
|
default: string;
|
|
1578
1578
|
};
|
|
1579
|
+
iconName: {
|
|
1580
|
+
type: import("vue").PropType<string>;
|
|
1581
|
+
default: string;
|
|
1582
|
+
};
|
|
1583
|
+
iconType: {
|
|
1584
|
+
type: import("vue").PropType<"fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate">;
|
|
1585
|
+
default: string;
|
|
1586
|
+
};
|
|
1579
1587
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1580
1588
|
testId: {
|
|
1581
1589
|
type: import("vue").PropType<string>;
|
|
1582
1590
|
default: string;
|
|
1583
1591
|
};
|
|
1592
|
+
iconName: {
|
|
1593
|
+
type: import("vue").PropType<string>;
|
|
1594
|
+
default: string;
|
|
1595
|
+
};
|
|
1596
|
+
iconType: {
|
|
1597
|
+
type: import("vue").PropType<"fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate">;
|
|
1598
|
+
default: string;
|
|
1599
|
+
};
|
|
1584
1600
|
}>>, {
|
|
1585
1601
|
testId: string;
|
|
1602
|
+
iconName: string;
|
|
1603
|
+
iconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate";
|
|
1586
1604
|
}> | import("vue").DefineComponent<{
|
|
1587
1605
|
label: {
|
|
1588
1606
|
type: import("vue").PropType<string>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./DataGrid.vue2.js";
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../../DataGrid.
|
|
4
|
-
const s = /* @__PURE__ */
|
|
2
|
+
/* empty css */import a from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../../DataGrid.vue_vue_type_style_index_0_scoped_86ea5d2a_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ a(o, [["__scopeId", "data-v-86ea5d2a"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../DataGrid.
|
|
1
|
+
import "../../../DataGrid.vue_vue_type_style_index_0_scoped_86ea5d2a_lang.css"; import { defineComponent as ce, useCssVars as re, unref as t, useSlots as ue, computed as m, openBlock as i, createElementBlock as d, createElementVNode as u, normalizeStyle as T, normalizeClass as S, renderSlot as c, createVNode as h, withCtx as w, createTextVNode as E, toDisplayString as B, createCommentVNode as r, isRef as he, Fragment as p, renderList as I, mergeProps as M, createBlock as z } from "vue";
|
|
2
2
|
import A from "../../typography/v4/Typography.vue.js";
|
|
3
3
|
import ye from "../../skeleton/v4/SkeletonV4.vue.js";
|
|
4
4
|
import fe from "../../emptyState/v4/EmptyStateV4.vue.js";
|
|
@@ -64,10 +64,10 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
|
|
|
64
64
|
setup(s, { expose: k, emit: f }) {
|
|
65
65
|
const l = s;
|
|
66
66
|
re((a) => ({
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
"
|
|
67
|
+
"1d1d1477": s.zIndexBase,
|
|
68
|
+
"2f1951ab": t(_),
|
|
69
|
+
d450b438: t(N),
|
|
70
|
+
"43af326c": t(Z)
|
|
71
71
|
}));
|
|
72
72
|
const g = ue(), Y = (a) => l.rowCustomClassKey && l.rows[a] ? l.rows[a][l.rowCustomClassKey] : "", {
|
|
73
73
|
list: V,
|
|
@@ -90,26 +90,26 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
|
|
|
90
90
|
activeMenuRow: ee,
|
|
91
91
|
scrollTo: te
|
|
92
92
|
} = Se(l, f), K = m(() => !!g.footer), se = m(
|
|
93
|
-
() => l.title || g.title || j || g["table-header-actions"] || g["table-header-pre-search"]
|
|
93
|
+
() => l.title || g.title || j.value || g["table-header-actions"] || g["table-header-pre-search"]
|
|
94
94
|
), b = be(l, "search", f), ae = m(() => l.selection.length || 0), L = m(() => {
|
|
95
|
-
const a = l.rows.map((
|
|
96
|
-
return !!a.length && a.every((
|
|
97
|
-
}), C = (a) => l.selection.findIndex((
|
|
95
|
+
const a = l.rows.map((o, e) => l.getRowId(o, e));
|
|
96
|
+
return !!a.length && a.every((o) => C(o));
|
|
97
|
+
}), C = (a) => l.selection.findIndex((o) => l.selectedMatcher(a, o)) !== -1, le = (a) => {
|
|
98
98
|
C(a) ? (x(
|
|
99
99
|
l.selection.filter(
|
|
100
|
-
(
|
|
100
|
+
(o) => !l.selectedMatcher(a, o)
|
|
101
101
|
)
|
|
102
102
|
), f("selectRow", !1)) : (x([...l.selection, a]), f("selectRow", !0));
|
|
103
103
|
}, ie = () => {
|
|
104
104
|
if (L.value)
|
|
105
105
|
x([]), f("selectAll", !1);
|
|
106
106
|
else {
|
|
107
|
-
const a = l.rows.map((
|
|
107
|
+
const a = l.rows.map((o, e) => l.getRowId(o, e)).filter((o) => !C(o));
|
|
108
108
|
x([...l.selection, ...a]), f("selectAll", !0);
|
|
109
109
|
}
|
|
110
110
|
}, x = (a) => {
|
|
111
111
|
f("update:selection", a);
|
|
112
|
-
},
|
|
112
|
+
}, de = (a) => !l.isLoading && $.value === a, oe = m(
|
|
113
113
|
() => l.emptyStateVariant ?? (b.value ? "no-results" : "no-data")
|
|
114
114
|
), ne = m(
|
|
115
115
|
() => l.emptyStateSubtitle ? l.emptyStateSubtitle : b.value ? "Search again with different filters" : void 0
|
|
@@ -122,10 +122,10 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
|
|
|
122
122
|
}));
|
|
123
123
|
return k({
|
|
124
124
|
scrollTo: te
|
|
125
|
-
}), (a,
|
|
125
|
+
}), (a, o) => (i(), d("div", {
|
|
126
126
|
class: "table-container",
|
|
127
127
|
"data-testid": `${s.testId}-${t(y).CONTAINER}`,
|
|
128
|
-
onMouseleave:
|
|
128
|
+
onMouseleave: o[3] || (o[3] = (e) => $.value = null)
|
|
129
129
|
}, [
|
|
130
130
|
u("table", {
|
|
131
131
|
ref: t(Q).ref,
|
|
@@ -134,10 +134,10 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
|
|
|
134
134
|
hasFooter: t(K)
|
|
135
135
|
}),
|
|
136
136
|
"data-testid": `${s.testId}-${t(y).TABLE}`,
|
|
137
|
-
onScrollPassive:
|
|
137
|
+
onScrollPassive: o[2] || (o[2] = //@ts-ignore
|
|
138
138
|
(...e) => t(F) && t(F)(...e))
|
|
139
139
|
}, [
|
|
140
|
-
t(se) ? (i(),
|
|
140
|
+
t(se) ? (i(), d("div", {
|
|
141
141
|
key: 0,
|
|
142
142
|
class: S(["table-header", { isStickyHeader: s.isStickyHeader }]),
|
|
143
143
|
"data-testid": `${s.testId}-${t(y).HEADER}`
|
|
@@ -155,7 +155,7 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
|
|
|
155
155
|
})
|
|
156
156
|
])
|
|
157
157
|
], 8, Te),
|
|
158
|
-
t(g)["table-header-pre-search"] ? (i(),
|
|
158
|
+
t(g)["table-header-pre-search"] ? (i(), d("div", {
|
|
159
159
|
key: 0,
|
|
160
160
|
class: "table-header-pre-search-content",
|
|
161
161
|
"data-testid": `${s.testId}-${t(y).PRE_SEARCH_HEADER}`
|
|
@@ -170,16 +170,16 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
|
|
|
170
170
|
u("div", Be, [
|
|
171
171
|
h(t(ve), {
|
|
172
172
|
modelValue: t(b),
|
|
173
|
-
"onUpdate:modelValue":
|
|
173
|
+
"onUpdate:modelValue": o[0] || (o[0] = (e) => he(b) ? b.value = e : null),
|
|
174
174
|
placeholder: s.searchPlaceholder,
|
|
175
175
|
"auto-focus": s.searchAutoFocus,
|
|
176
176
|
"test-id": s.testId,
|
|
177
|
-
onOnClear:
|
|
177
|
+
onOnClear: o[1] || (o[1] = (e) => f("onClearSearch"))
|
|
178
178
|
}, null, 8, ["modelValue", "placeholder", "auto-focus", "test-id"])
|
|
179
179
|
])
|
|
180
180
|
]) : r("", !0)
|
|
181
181
|
], 8, Ee),
|
|
182
|
-
t(g)["table-header-actions"] ? (i(),
|
|
182
|
+
t(g)["table-header-actions"] ? (i(), d("div", {
|
|
183
183
|
key: 1,
|
|
184
184
|
class: "table-header-actions",
|
|
185
185
|
"data-testid": `${s.testId}-${t(y).ACTIONS}`
|
|
@@ -194,7 +194,7 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
|
|
|
194
194
|
class: "sections",
|
|
195
195
|
"data-testid": `${s.testId}-${t(y).SECTIONS}`
|
|
196
196
|
}, [
|
|
197
|
-
(i(!0),
|
|
197
|
+
(i(!0), d(p, null, I(s.sections, (e) => (i(), d("div", {
|
|
198
198
|
key: e.id,
|
|
199
199
|
class: S(["section-container", { sticky: e.isSticky }])
|
|
200
200
|
}, [
|
|
@@ -214,7 +214,7 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
|
|
|
214
214
|
], 2))), 128))
|
|
215
215
|
], 8, Ie),
|
|
216
216
|
u("tr", null, [
|
|
217
|
-
t(D) ? (i(),
|
|
217
|
+
t(D) ? (i(), d("th", M({
|
|
218
218
|
key: 0,
|
|
219
219
|
class: "checkbox-cell"
|
|
220
220
|
}, t(U)), [
|
|
@@ -227,8 +227,8 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
|
|
|
227
227
|
}, null, 8, ["disabled", "is-checked", "is-indeterminate"])
|
|
228
228
|
])
|
|
229
229
|
], 16)) : r("", !0),
|
|
230
|
-
t(R) ? (i(),
|
|
231
|
-
(i(!0),
|
|
230
|
+
t(R) ? (i(), d("th", Ae)) : r("", !0),
|
|
231
|
+
(i(!0), d(p, null, I(s.columns, (e) => (i(), d("th", {
|
|
232
232
|
key: e.id,
|
|
233
233
|
class: S({
|
|
234
234
|
sticky: e.isSticky,
|
|
@@ -264,12 +264,12 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
|
|
|
264
264
|
])
|
|
265
265
|
], 2),
|
|
266
266
|
u("tbody", null, [
|
|
267
|
-
t(V).length > 0 ? (i(),
|
|
267
|
+
t(V).length > 0 ? (i(), d("div", M({
|
|
268
268
|
key: 0,
|
|
269
269
|
class: "table-body-wrapper",
|
|
270
270
|
"data-testid": `${s.testId}-${t(y).BODY_WRAPPER}`
|
|
271
271
|
}, t(W)), [
|
|
272
|
-
(i(!0),
|
|
272
|
+
(i(!0), d(p, null, I(t(V), (e) => (i(), d("tr", {
|
|
273
273
|
key: s.getRowKey(e.data, e.index),
|
|
274
274
|
class: S(["table-row", {
|
|
275
275
|
loading: s.isLoading || s.isLoading && !e.data || t(O).includes(e.index),
|
|
@@ -281,7 +281,7 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
|
|
|
281
281
|
onMouseenter: (v) => $.value = e.index,
|
|
282
282
|
onClick: (v) => f("clickRow", e.index)
|
|
283
283
|
}, [
|
|
284
|
-
t(D) ? (i(),
|
|
284
|
+
t(D) ? (i(), d("td", M({
|
|
285
285
|
key: 0,
|
|
286
286
|
class: "checkbox-cell"
|
|
287
287
|
}, t(U)), [
|
|
@@ -290,13 +290,13 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
|
|
|
290
290
|
"onUpdate:isChecked": (v) => le(s.getRowId(e.data, e.index))
|
|
291
291
|
}, null, 8, ["is-checked", "onUpdate:isChecked"])
|
|
292
292
|
], 16)) : r("", !0),
|
|
293
|
-
t(R) ? (i(),
|
|
293
|
+
t(R) ? (i(), d("td", Ve, [
|
|
294
294
|
h(ge, {
|
|
295
295
|
expanded: t(P)(e.index),
|
|
296
296
|
onClick: (v) => t(J)(e.index, v)
|
|
297
297
|
}, null, 8, ["expanded", "onClick"])
|
|
298
298
|
])) : r("", !0),
|
|
299
|
-
(i(!0),
|
|
299
|
+
(i(!0), d(p, null, I(s.columns, (v, n) => (i(), d("td", {
|
|
300
300
|
key: n,
|
|
301
301
|
class: S({
|
|
302
302
|
sticky: s.columns[n].isSticky,
|
|
@@ -309,7 +309,7 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
|
|
|
309
309
|
s.columns[n].isSticky ? t(H)[s.columns[n].id] : null
|
|
310
310
|
)
|
|
311
311
|
}, [
|
|
312
|
-
!s.isLoading || s.isLoading && e.data[n] ? (i(),
|
|
312
|
+
!s.isLoading || s.isLoading && e.data[n] ? (i(), d("div", {
|
|
313
313
|
key: 0,
|
|
314
314
|
class: S(["table-cell", { last: n === e.data.length - 1 }])
|
|
315
315
|
}, [
|
|
@@ -331,26 +331,26 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
|
|
|
331
331
|
h(t(ye), { round: "" })
|
|
332
332
|
])
|
|
333
333
|
], 6))), 128)),
|
|
334
|
-
t(R) && t(P)(e.index) ? (i(),
|
|
334
|
+
t(R) && t(P)(e.index) ? (i(), d("div", Ne, [
|
|
335
335
|
c(a.$slots, "expanded", {
|
|
336
336
|
row: e,
|
|
337
337
|
gridColumnTemplate: t(N)
|
|
338
338
|
})
|
|
339
339
|
])) : r("", !0),
|
|
340
|
-
|
|
340
|
+
de(e.index) ? (i(), d("div", Fe, [
|
|
341
341
|
c(a.$slots, "floating-row", {
|
|
342
342
|
row: e,
|
|
343
343
|
rowIndex: e.index
|
|
344
344
|
})
|
|
345
345
|
])) : r("", !0)
|
|
346
346
|
], 42, Me))), 128))
|
|
347
|
-
], 16, Le)) : (i(),
|
|
347
|
+
], 16, Le)) : (i(), d("div", Oe, [
|
|
348
348
|
c(a.$slots, "empty-state", {}, () => [
|
|
349
349
|
h(t(fe), {
|
|
350
350
|
class: "empty-state",
|
|
351
351
|
title: s.emptyStateTitle,
|
|
352
352
|
subtitle: t(ne),
|
|
353
|
-
variant: t(
|
|
353
|
+
variant: t(oe),
|
|
354
354
|
"icon-name": "file-search",
|
|
355
355
|
"test-id": `${s.testId}-${t(y).EMPTY_STATE}`
|
|
356
356
|
}, null, 8, ["title", "subtitle", "variant", "test-id"])
|
|
@@ -358,7 +358,7 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
|
|
|
358
358
|
]))
|
|
359
359
|
])
|
|
360
360
|
], 46, Ce),
|
|
361
|
-
t(K) ? (i(),
|
|
361
|
+
t(K) ? (i(), d("div", De, [
|
|
362
362
|
c(a.$slots, "footer")
|
|
363
363
|
])) : r("", !0)
|
|
364
364
|
], 40, Re));
|
package/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ import * as tableV4 from '@/components/table/v4';
|
|
|
19
19
|
import * as tableCellsV3 from '@/components/table-cells/v3';
|
|
20
20
|
import * as snackbarV3 from '@/components/snackbar/v3';
|
|
21
21
|
declare const _default: {
|
|
22
|
-
nFormatter(num: number): string;
|
|
22
|
+
nFormatter(num: number, formatLowDigits?: boolean): string;
|
|
23
23
|
DEFAULT_FALLBACK: "N/A";
|
|
24
24
|
diffInPersentage: (valueA: string | number, valueB: string | number, fallback?: string) => string | number;
|
|
25
25
|
formatNumberWithCommas: (num: string | number, fallback?: string) => string;
|
|
@@ -18216,13 +18216,31 @@ declare const _default: {
|
|
|
18216
18216
|
type: import("vue").PropType<string>;
|
|
18217
18217
|
default: string;
|
|
18218
18218
|
};
|
|
18219
|
+
iconName: {
|
|
18220
|
+
type: import("vue").PropType<string>;
|
|
18221
|
+
default: string;
|
|
18222
|
+
};
|
|
18223
|
+
iconType: {
|
|
18224
|
+
type: import("vue").PropType<"fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate">;
|
|
18225
|
+
default: string;
|
|
18226
|
+
};
|
|
18219
18227
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18220
18228
|
testId: {
|
|
18221
18229
|
type: import("vue").PropType<string>;
|
|
18222
18230
|
default: string;
|
|
18223
18231
|
};
|
|
18232
|
+
iconName: {
|
|
18233
|
+
type: import("vue").PropType<string>;
|
|
18234
|
+
default: string;
|
|
18235
|
+
};
|
|
18236
|
+
iconType: {
|
|
18237
|
+
type: import("vue").PropType<"fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate">;
|
|
18238
|
+
default: string;
|
|
18239
|
+
};
|
|
18224
18240
|
}>>, {
|
|
18225
18241
|
testId: string;
|
|
18242
|
+
iconName: string;
|
|
18243
|
+
iconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate";
|
|
18226
18244
|
}>;
|
|
18227
18245
|
ChipDropdownTrigger: import("vue").DefineComponent<{
|
|
18228
18246
|
label: {
|
|
@@ -20767,13 +20785,31 @@ declare const _default: {
|
|
|
20767
20785
|
type: import("vue").PropType<string>;
|
|
20768
20786
|
default: string;
|
|
20769
20787
|
};
|
|
20788
|
+
iconName: {
|
|
20789
|
+
type: import("vue").PropType<string>;
|
|
20790
|
+
default: string;
|
|
20791
|
+
};
|
|
20792
|
+
iconType: {
|
|
20793
|
+
type: import("vue").PropType<"fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate">;
|
|
20794
|
+
default: string;
|
|
20795
|
+
};
|
|
20770
20796
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20771
20797
|
testId: {
|
|
20772
20798
|
type: import("vue").PropType<string>;
|
|
20773
20799
|
default: string;
|
|
20774
20800
|
};
|
|
20801
|
+
iconName: {
|
|
20802
|
+
type: import("vue").PropType<string>;
|
|
20803
|
+
default: string;
|
|
20804
|
+
};
|
|
20805
|
+
iconType: {
|
|
20806
|
+
type: import("vue").PropType<"fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate">;
|
|
20807
|
+
default: string;
|
|
20808
|
+
};
|
|
20775
20809
|
}>>, {
|
|
20776
20810
|
testId: string;
|
|
20811
|
+
iconName: string;
|
|
20812
|
+
iconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate";
|
|
20777
20813
|
}> | import("vue").DefineComponent<{
|
|
20778
20814
|
label: {
|
|
20779
20815
|
type: import("vue").PropType<string>;
|
package/package.json
CHANGED
package/utils/formatNumbers.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const DEFAULT_FALLBACK = "N/A";
|
|
2
|
-
export declare function nFormatter(num: number): string;
|
|
2
|
+
export declare function nFormatter(num: number, formatLowDigits?: boolean): string;
|
|
3
3
|
export declare const diffInPersentage: (valueA: number | string, valueB: number | string, fallback?: string | null) => string | number;
|
|
4
4
|
export declare const formatNumberWithCommas: (num: number | string, fallback?: string | null) => string;
|