@ironsource/shared-ui 2.1.11-test.45 → 2.1.11-test.47
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/TreeDropdown.vue_vue_type_style_index_0_scoped_46aae9ba_lang.css +1 -0
- package/components/dropdown/v4/TreeDropdown.vue.js +3 -3
- package/components/dropdown/v4/TreeDropdown.vue2.js +33 -33
- package/index.js +1 -1
- package/package.json +1 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_4cf7a93b_lang.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.child-options[data-v-46aae9ba]{padding-left:1rem}.tree-search[data-v-46aae9ba]{width:100%}
|
|
@@ -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
|
|
3
|
+
// import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_46aae9ba_lang.css"; //*');
|
|
4
|
+
const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-46aae9ba"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../TreeDropdown.
|
|
1
|
+
import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_46aae9ba_lang.css"; import { defineComponent as le, provide as ne, ref as c, computed as C, onMounted as te, watch as k, openBlock as m, createElementBlock as I, Fragment as z, createVNode as g, unref as d, withCtx as h, mergeProps as B, createSlots as oe, renderSlot as ie, createElementVNode as M, withModifiers as S, createTextVNode as de, withDirectives as ae, renderList as se, createBlock as re, vShow as ce, createCommentVNode as $, toDisplayString as ue } from "vue";
|
|
2
2
|
import pe from "./DropdownV4.vue.js";
|
|
3
3
|
import ye from "./DefaultDropdownTrigger.vue.js";
|
|
4
4
|
import "./IconButtonDropdownTrigger.vue.js";
|
|
@@ -9,8 +9,8 @@ import "./ButtonFilterDropdownTrigger.vue.js";
|
|
|
9
9
|
import "./TreeDropdown.vue.js";
|
|
10
10
|
import b from "./OptionV4.vue.js";
|
|
11
11
|
import "./ConditionalDropdown.vue.js";
|
|
12
|
-
import { useChildOptions as
|
|
13
|
-
import
|
|
12
|
+
import { useChildOptions as he } from "../composables/useChildOptions.js";
|
|
13
|
+
import fe from "../../search/v4/SearchV4.vue.js";
|
|
14
14
|
import { useTestIdAttrs as ve } from "../../../utils/testIds.js";
|
|
15
15
|
import { DropdownTestIdModifiers as P } from "../../../testids/index.js";
|
|
16
16
|
const me = {
|
|
@@ -57,9 +57,9 @@ const me = {
|
|
|
57
57
|
...e[l.optionChildrenKey]
|
|
58
58
|
]);
|
|
59
59
|
}), K.value = [...l.options], u.value = [...l.options];
|
|
60
|
-
}, { hasChildren:
|
|
61
|
-
if (
|
|
62
|
-
|
|
60
|
+
}, { hasChildren: f, getChildren: v, allChildrenSelected: E, someChildrenSelected: j } = he(i, l.optionChildrenKey), A = (e) => {
|
|
61
|
+
if (f(e)) {
|
|
62
|
+
E(e) ? i.value = i.value.filter(
|
|
63
63
|
(o) => !v(e).includes(o)
|
|
64
64
|
) : i.value = [
|
|
65
65
|
...i.value.filter((o) => !v(e).includes(o)),
|
|
@@ -70,11 +70,11 @@ const me = {
|
|
|
70
70
|
i.value.includes(e) ? i.value = i.value.filter(
|
|
71
71
|
(o) => o !== e
|
|
72
72
|
) : i.value = [...i.value, e];
|
|
73
|
-
}, D = (e) => i.value.includes(e),
|
|
73
|
+
}, D = (e) => i.value.includes(e), F = (e) => 1 + (f(e) ? v(e).length : 0), G = () => {
|
|
74
74
|
T("update:selected", i.value), L.value = y.value;
|
|
75
|
-
}, G = () => {
|
|
76
|
-
i.value = [];
|
|
77
75
|
}, H = () => {
|
|
76
|
+
i.value = [];
|
|
77
|
+
}, J = () => {
|
|
78
78
|
const e = /* @__PURE__ */ new Set([]);
|
|
79
79
|
u.value.forEach((n) => {
|
|
80
80
|
if (l.selected?.includes(n))
|
|
@@ -103,15 +103,15 @@ const me = {
|
|
|
103
103
|
}
|
|
104
104
|
), k(
|
|
105
105
|
() => l.selected,
|
|
106
|
-
(
|
|
107
|
-
|
|
106
|
+
() => {
|
|
107
|
+
console.log("isOpen", l.isOpen), !l.isOpen && (i.value = [...l.selected]);
|
|
108
108
|
}
|
|
109
109
|
);
|
|
110
110
|
const y = C(() => i.value.length < U.value ? !1 : i.value.length === U.value), Q = C(() => !y.value && i.value.length > 0), L = c(y.value);
|
|
111
111
|
k(
|
|
112
112
|
() => l.isOpen,
|
|
113
113
|
() => {
|
|
114
|
-
l.isOpen ? K.value =
|
|
114
|
+
l.isOpen ? K.value = J() : (i.value = [...l.selected], p.value = "");
|
|
115
115
|
}
|
|
116
116
|
);
|
|
117
117
|
const a = c({}), R = (e) => {
|
|
@@ -120,10 +120,10 @@ const me = {
|
|
|
120
120
|
function W(e, o) {
|
|
121
121
|
const n = e.toLowerCase(), s = [];
|
|
122
122
|
return o.value.forEach((r) => {
|
|
123
|
-
const
|
|
123
|
+
const w = r[l.optionNameKey].toLowerCase().includes(n), V = O.value[r[l.optionUniqueIdKey]]?.filter(
|
|
124
124
|
(ee) => ee[l.optionNameKey].toLowerCase().includes(n)
|
|
125
125
|
) || [];
|
|
126
|
-
(
|
|
126
|
+
(w || V.length > 0) && (r[l.optionChildrenKey] = V, s.push(r));
|
|
127
127
|
}), s;
|
|
128
128
|
}
|
|
129
129
|
const X = (e) => {
|
|
@@ -172,30 +172,30 @@ const me = {
|
|
|
172
172
|
"test-id": t.testId,
|
|
173
173
|
disabled: t.disabled,
|
|
174
174
|
"disable-virtual-scroll": "",
|
|
175
|
-
"override-option-count-calculation":
|
|
175
|
+
"override-option-count-calculation": F,
|
|
176
176
|
"trigger-show-all-selected-text": !1,
|
|
177
177
|
"predefined-trigger": "default",
|
|
178
178
|
"custom-number-of-displayed-options": d(Y),
|
|
179
179
|
"onUpdate:isOpen": o[2] || (o[2] = (n) => T("update:isOpen", n)),
|
|
180
|
-
onApply:
|
|
181
|
-
onClear:
|
|
180
|
+
onApply: G,
|
|
181
|
+
onClear: H
|
|
182
182
|
}, {
|
|
183
|
-
"dropdown-trigger":
|
|
183
|
+
"dropdown-trigger": h(({ defaultTriggerProps: n }) => [
|
|
184
184
|
g(d(ye), B(n, {
|
|
185
185
|
"all-selected": L.value,
|
|
186
186
|
"show-all-selected-text": ""
|
|
187
187
|
}), oe({ _: 2 }, [
|
|
188
188
|
e.$slots["trigger-end-icon"] ? {
|
|
189
189
|
name: "end-icon",
|
|
190
|
-
fn:
|
|
190
|
+
fn: h(() => [
|
|
191
191
|
ie(e.$slots, "trigger-end-icon", {}, void 0, !0)
|
|
192
192
|
]),
|
|
193
193
|
key: "0"
|
|
194
194
|
} : void 0
|
|
195
195
|
]), 1040, ["all-selected"])
|
|
196
196
|
]),
|
|
197
|
-
"inline-search":
|
|
198
|
-
g(d(
|
|
197
|
+
"inline-search": h(() => [
|
|
198
|
+
g(d(fe), {
|
|
199
199
|
modelValue: p.value,
|
|
200
200
|
"onUpdate:modelValue": o[0] || (o[0] = (n) => p.value = n),
|
|
201
201
|
class: "tree-search",
|
|
@@ -206,7 +206,7 @@ const me = {
|
|
|
206
206
|
"test-id": t.testId
|
|
207
207
|
}, null, 8, ["modelValue", "placeholder", "test-id"])
|
|
208
208
|
]),
|
|
209
|
-
"select-all":
|
|
209
|
+
"select-all": h(() => [
|
|
210
210
|
M("li", null, [
|
|
211
211
|
g(d(b), B({
|
|
212
212
|
"aria-selected": d(y),
|
|
@@ -216,20 +216,20 @@ const me = {
|
|
|
216
216
|
"is-multi": "",
|
|
217
217
|
"select-all-option": ""
|
|
218
218
|
}, d(_)[d(P).SELECT_ALL], {
|
|
219
|
-
onClick: o[1] || (o[1] =
|
|
219
|
+
onClick: o[1] || (o[1] = S((n) => Z(), ["stop"]))
|
|
220
220
|
}), {
|
|
221
|
-
default:
|
|
221
|
+
default: h(() => [
|
|
222
222
|
de(" Select all ")
|
|
223
223
|
]),
|
|
224
224
|
_: 1
|
|
225
225
|
}, 16, ["aria-selected", "aria-disabled", "selected-prop", "is-indeterminate"])
|
|
226
226
|
])
|
|
227
227
|
]),
|
|
228
|
-
default:
|
|
228
|
+
default: h(({ option: n, index: s }) => [
|
|
229
229
|
g(d(b), {
|
|
230
230
|
option: n,
|
|
231
|
-
"selected-prop": d(
|
|
232
|
-
"is-indeterminate": !d(
|
|
231
|
+
"selected-prop": d(f)(n) ? d(E)(n) : D(n),
|
|
232
|
+
"is-indeterminate": !d(E)(n) && d(j)(n),
|
|
233
233
|
disabled: n[t.disabledOptionKey],
|
|
234
234
|
"name-key": t.optionNameKey,
|
|
235
235
|
"image-key": t.optionImageKey,
|
|
@@ -238,17 +238,17 @@ const me = {
|
|
|
238
238
|
"end-icon-key": t.optionEndIconKey,
|
|
239
239
|
"end-icon-type": t.optionEndIconType,
|
|
240
240
|
"end-text-icon-key": t.optionEndTextIconKey,
|
|
241
|
-
"tree-main-option": d(
|
|
241
|
+
"tree-main-option": d(f)(n),
|
|
242
242
|
"tree-main-option-expanded": a.value[n[t.optionUniqueIdKey]],
|
|
243
243
|
"stop-option-click-event-propagation": "",
|
|
244
244
|
"is-multi": "",
|
|
245
|
-
onClick:
|
|
245
|
+
onClick: S(() => A(n), ["stop"]),
|
|
246
246
|
onToggleTreeCollapse: R
|
|
247
247
|
}, 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"]),
|
|
248
|
-
d(
|
|
248
|
+
d(f)(n) ? (m(), I("div", me, [
|
|
249
249
|
ae(M("div", null, [
|
|
250
|
-
(m(!0), I(z, null, se(d(v)(n), (r,
|
|
251
|
-
key: `${s}-${
|
|
250
|
+
(m(!0), I(z, null, se(d(v)(n), (r, w) => (m(), re(d(b), {
|
|
251
|
+
key: `${s}-${w}`,
|
|
252
252
|
option: r,
|
|
253
253
|
"selected-prop": D(r),
|
|
254
254
|
disabled: r[t.disabledOptionKey],
|
|
@@ -262,7 +262,7 @@ const me = {
|
|
|
262
262
|
"tree-child-shown": a.value[n[t.optionUniqueIdKey]],
|
|
263
263
|
"stop-option-click-event-propagation": "",
|
|
264
264
|
"is-multi": "",
|
|
265
|
-
onClick:
|
|
265
|
+
onClick: S(() => A(r), ["stop"])
|
|
266
266
|
}, 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))
|
|
267
267
|
], 512), [
|
|
268
268
|
[ce, a.value[n[t.optionUniqueIdKey]]]
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './FilterDropdown.vue_vue_type_style_index_0_scoped_b42d8b45_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
|
-
.child-options[data-v-4cf7a93b]{padding-left:1rem}.tree-search[data-v-4cf7a93b]{width:100%}
|