@ironsource/shared-ui 2.1.11-test.1 → 2.1.11-test.2
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_c361375a_lang.css +1 -0
- package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
- package/components/dropdown/v4/TreeDropdown.vue2.js +88 -88
- package/index.js +1 -1
- package/package.json +1 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_e944c610_lang.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.child-options[data-v-c361375a]{padding-left:1rem}
|
|
@@ -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_c361375a_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-c361375a"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../../TreeDropdown.
|
|
2
|
-
import
|
|
1
|
+
import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_c361375a_lang.css"; import { defineComponent as R, provide as G, ref as c, onMounted as H, watch as v, computed as J, openBlock as m, createElementBlock as I, Fragment as N, createVNode as g, unref as a, withCtx as K, normalizeProps as Q, guardReactiveProps as W, createSlots as X, renderSlot as Y, withModifiers as q, withDirectives as Z, createElementVNode as x, renderList as _, createBlock as ee, vShow as ne, createCommentVNode as oe, toDisplayString as le } from "vue";
|
|
2
|
+
import te from "./DropdownV4.vue.js";
|
|
3
3
|
import ie from "./DefaultDropdownTrigger.vue.js";
|
|
4
4
|
import "./IconButtonDropdownTrigger.vue.js";
|
|
5
5
|
import "./ChipDropdownTrigger.vue.js";
|
|
@@ -8,8 +8,8 @@ import "./ButtonDropdownTrigger.vue.js";
|
|
|
8
8
|
import "./ButtonFilterDropdownTrigger.vue.js";
|
|
9
9
|
import "./TreeDropdown.vue.js";
|
|
10
10
|
import z from "./OptionV4.vue.js";
|
|
11
|
-
import { useChildOptions as
|
|
12
|
-
import
|
|
11
|
+
import { useChildOptions as ae } from "../composables/useChildOptions.js";
|
|
12
|
+
import de from "../../search/v4/SearchV4.vue.js";
|
|
13
13
|
const se = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "child-options"
|
|
@@ -38,8 +38,8 @@ const se = {
|
|
|
38
38
|
preExpandedOptions: null
|
|
39
39
|
},
|
|
40
40
|
emits: ["update:selected", "update:isOpen"],
|
|
41
|
-
setup(
|
|
42
|
-
const o =
|
|
41
|
+
setup(l, { emit: O }) {
|
|
42
|
+
const o = l;
|
|
43
43
|
G("isTreeDropdown", !0);
|
|
44
44
|
const h = c([]), f = c([]), w = c({}), b = c(!1), i = c([...o.selected]), u = c(""), E = () => {
|
|
45
45
|
o.options.forEach((n) => {
|
|
@@ -47,18 +47,18 @@ const se = {
|
|
|
47
47
|
...n[o.optionChildrenKey]
|
|
48
48
|
]);
|
|
49
49
|
}), h.value = [...o.options], f.value = [...o.options];
|
|
50
|
-
}, { hasChildren: p, getChildren: y, allChildrenSelected: C, someChildrenSelected: D } =
|
|
50
|
+
}, { hasChildren: p, getChildren: y, allChildrenSelected: C, someChildrenSelected: D } = ae(i, o.optionChildrenKey), S = (n) => {
|
|
51
51
|
if (p(n)) {
|
|
52
52
|
C(n) ? i.value = i.value.filter(
|
|
53
|
-
(
|
|
53
|
+
(t) => !y(n).includes(t)
|
|
54
54
|
) : i.value = [
|
|
55
|
-
...i.value.filter((
|
|
55
|
+
...i.value.filter((t) => !y(n).includes(t)),
|
|
56
56
|
...y(n)
|
|
57
57
|
];
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
60
|
i.value.includes(n) ? i.value = i.value.filter(
|
|
61
|
-
(
|
|
61
|
+
(t) => t !== n
|
|
62
62
|
) : i.value = [...i.value, n];
|
|
63
63
|
}, T = (n) => i.value.includes(n), V = (n) => 1 + (p(n) ? y(n).length : 0), B = () => {
|
|
64
64
|
O("update:selected", i.value);
|
|
@@ -70,96 +70,96 @@ const se = {
|
|
|
70
70
|
if (o.selected?.includes(e))
|
|
71
71
|
n.add(e);
|
|
72
72
|
else if (e[o.optionChildrenKey] && e[o.optionChildrenKey].length) {
|
|
73
|
-
for (const
|
|
74
|
-
if (o.selected?.includes(
|
|
73
|
+
for (const r of e[o.optionChildrenKey])
|
|
74
|
+
if (o.selected?.includes(r)) {
|
|
75
75
|
n.add(e);
|
|
76
76
|
break;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
|
-
const
|
|
80
|
+
const t = Array.from(n);
|
|
81
81
|
return f.value.forEach((e) => {
|
|
82
|
-
!o.selected.includes(e) && !n.has(e) &&
|
|
83
|
-
}),
|
|
82
|
+
!o.selected.includes(e) && !n.has(e) && t.push(e);
|
|
83
|
+
}), t;
|
|
84
84
|
};
|
|
85
85
|
H(() => {
|
|
86
86
|
b.value || (E(), b.value = !0, o.preExpandedOptions && o.preExpandedOptions.forEach((n) => {
|
|
87
|
-
|
|
87
|
+
d.value[n] = 1;
|
|
88
88
|
}));
|
|
89
|
-
}),
|
|
89
|
+
}), v(
|
|
90
90
|
() => o.options,
|
|
91
91
|
() => {
|
|
92
92
|
E();
|
|
93
93
|
}
|
|
94
|
-
),
|
|
94
|
+
), v(
|
|
95
95
|
() => o.selected,
|
|
96
96
|
() => {
|
|
97
97
|
i.value = [...o.selected];
|
|
98
98
|
}
|
|
99
|
-
),
|
|
99
|
+
), v(
|
|
100
100
|
() => o.isOpen,
|
|
101
101
|
() => {
|
|
102
102
|
o.isOpen ? h.value = M() : (i.value = [...o.selected], u.value = "");
|
|
103
103
|
}
|
|
104
104
|
);
|
|
105
|
-
const
|
|
106
|
-
|
|
105
|
+
const d = c({}), P = (n) => {
|
|
106
|
+
console.log("toggleTreeCollapse", n), d.value[n[o.optionUniqueIdKey]] ? delete d.value[n[o.optionUniqueIdKey]] : d.value[n[o.optionUniqueIdKey]] = 1;
|
|
107
107
|
};
|
|
108
|
-
function
|
|
109
|
-
const e = n.toLowerCase(),
|
|
110
|
-
return
|
|
111
|
-
const k =
|
|
108
|
+
function $(n, t) {
|
|
109
|
+
const e = n.toLowerCase(), r = [];
|
|
110
|
+
return t.value.forEach((s) => {
|
|
111
|
+
const k = s[o.optionNameKey].toLowerCase().includes(e), U = w.value[s[o.optionUniqueIdKey]]?.filter(
|
|
112
112
|
(F) => F[o.optionNameKey].toLowerCase().includes(e)
|
|
113
113
|
) || [];
|
|
114
|
-
(k || U.length > 0) && (
|
|
115
|
-
}),
|
|
114
|
+
(k || U.length > 0) && (s[o.optionChildrenKey] = U, r.push(s));
|
|
115
|
+
}), r;
|
|
116
116
|
}
|
|
117
|
-
const
|
|
118
|
-
const
|
|
119
|
-
n && (Object.keys(
|
|
120
|
-
delete
|
|
121
|
-
}),
|
|
122
|
-
Array.isArray(e[o.optionChildrenKey]) && e[o.optionChildrenKey].length && (
|
|
123
|
-
})), h.value =
|
|
117
|
+
const A = (n) => {
|
|
118
|
+
const t = $(n, f);
|
|
119
|
+
n && (Object.keys(d.value).forEach((e) => {
|
|
120
|
+
delete d.value[e];
|
|
121
|
+
}), t.forEach((e) => {
|
|
122
|
+
Array.isArray(e[o.optionChildrenKey]) && e[o.optionChildrenKey].length && (d.value[e[o.optionUniqueIdKey]] = 1);
|
|
123
|
+
})), h.value = t;
|
|
124
124
|
}, j = J(() => {
|
|
125
|
-
const n = o.options.length,
|
|
126
|
-
(e,
|
|
125
|
+
const n = o.options.length, t = o.options.reduce(
|
|
126
|
+
(e, r) => (d.value[r[o.optionUniqueIdKey]] && (e = e + r[o.optionChildrenKey].length), e),
|
|
127
127
|
0
|
|
128
128
|
);
|
|
129
|
-
return n +
|
|
129
|
+
return n + t;
|
|
130
130
|
});
|
|
131
|
-
return
|
|
131
|
+
return v(
|
|
132
132
|
() => u.value,
|
|
133
133
|
() => {
|
|
134
|
-
|
|
134
|
+
A(u.value);
|
|
135
135
|
}
|
|
136
|
-
), (n,
|
|
137
|
-
g(
|
|
136
|
+
), (n, t) => (m(), I(N, null, [
|
|
137
|
+
g(a(te), {
|
|
138
138
|
multi: "",
|
|
139
139
|
class: "tree-dropdown",
|
|
140
140
|
"show-select-all": !1,
|
|
141
|
-
"is-open":
|
|
141
|
+
"is-open": l.isOpen,
|
|
142
142
|
options: h.value,
|
|
143
|
-
selected:
|
|
144
|
-
"display-value":
|
|
145
|
-
placeholder:
|
|
143
|
+
selected: l.selected,
|
|
144
|
+
"display-value": l.displayValue,
|
|
145
|
+
placeholder: l.placeholder,
|
|
146
146
|
"inline-search": "",
|
|
147
|
-
"inline-search-placeholder":
|
|
148
|
-
"option-name-key":
|
|
149
|
-
size:
|
|
150
|
-
"test-id":
|
|
151
|
-
disabled:
|
|
147
|
+
"inline-search-placeholder": l.inlineSearchPlaceholder,
|
|
148
|
+
"option-name-key": l.optionNameKey,
|
|
149
|
+
size: l.size,
|
|
150
|
+
"test-id": l.testId,
|
|
151
|
+
disabled: l.disabled,
|
|
152
152
|
"disable-virtual-scroll": "",
|
|
153
153
|
"override-option-count-calculation": V,
|
|
154
154
|
"trigger-show-all-selected-text": !1,
|
|
155
155
|
"predefined-trigger": "default",
|
|
156
|
-
"custom-number-of-displayed-options":
|
|
157
|
-
"onUpdate:isOpen":
|
|
156
|
+
"custom-number-of-displayed-options": a(j),
|
|
157
|
+
"onUpdate:isOpen": t[1] || (t[1] = (e) => O("update:isOpen", e)),
|
|
158
158
|
onApply: B,
|
|
159
159
|
onClear: L
|
|
160
160
|
}, {
|
|
161
161
|
"dropdown-trigger": K(({ defaultTriggerProps: e }) => [
|
|
162
|
-
g(
|
|
162
|
+
g(a(ie), Q(W(e)), X({ _: 2 }, [
|
|
163
163
|
n.$slots["trigger-end-icon"] ? {
|
|
164
164
|
name: "end-icon",
|
|
165
165
|
fn: K(() => [
|
|
@@ -170,59 +170,59 @@ const se = {
|
|
|
170
170
|
]), 1040)
|
|
171
171
|
]),
|
|
172
172
|
"inline-search": K(() => [
|
|
173
|
-
g(
|
|
173
|
+
g(a(de), {
|
|
174
174
|
modelValue: u.value,
|
|
175
|
-
"onUpdate:modelValue":
|
|
176
|
-
placeholder:
|
|
175
|
+
"onUpdate:modelValue": t[0] || (t[0] = (e) => u.value = e),
|
|
176
|
+
placeholder: l.inlineSearchPlaceholder,
|
|
177
177
|
variant: "transparent",
|
|
178
178
|
size: "md",
|
|
179
179
|
"auto-focus": "",
|
|
180
|
-
"test-id":
|
|
180
|
+
"test-id": l.testId
|
|
181
181
|
}, null, 8, ["modelValue", "placeholder", "test-id"])
|
|
182
182
|
]),
|
|
183
|
-
default: K(({ option: e, index:
|
|
184
|
-
g(
|
|
183
|
+
default: K(({ option: e, index: r }) => [
|
|
184
|
+
g(a(z), {
|
|
185
185
|
option: e,
|
|
186
|
-
"selected-prop":
|
|
187
|
-
"is-indeterminate": !
|
|
188
|
-
disabled: e[
|
|
189
|
-
"name-key":
|
|
190
|
-
"image-key":
|
|
191
|
-
"icon-key":
|
|
192
|
-
"icon-type":
|
|
193
|
-
"end-icon-key":
|
|
194
|
-
"end-icon-type":
|
|
195
|
-
"tree-main-option":
|
|
196
|
-
"tree-main-option-expanded":
|
|
186
|
+
"selected-prop": a(p)(e) ? a(C)(e) : T(e),
|
|
187
|
+
"is-indeterminate": !a(C)(e) && a(D)(e),
|
|
188
|
+
disabled: e[l.disabledOptionKey],
|
|
189
|
+
"name-key": l.optionNameKey,
|
|
190
|
+
"image-key": l.optionImageKey,
|
|
191
|
+
"icon-key": l.optionIconKey,
|
|
192
|
+
"icon-type": l.optionIconType,
|
|
193
|
+
"end-icon-key": l.optionEndIconKey,
|
|
194
|
+
"end-icon-type": l.optionEndIconType,
|
|
195
|
+
"tree-main-option": a(p)(e),
|
|
196
|
+
"tree-main-option-expanded": d.value[e[l.optionUniqueIdKey]],
|
|
197
197
|
"stop-option-click-event-propagation": "",
|
|
198
198
|
onClick: q(() => S(e), ["stop"]),
|
|
199
|
-
onToggleTreeCollapse: P
|
|
200
|
-
}, null, 8, ["option", "selected-prop", "is-indeterminate", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type", "tree-main-option", "tree-main-option-expanded", "onClick"]),
|
|
201
|
-
|
|
199
|
+
onToggleTreeCollapse: (s) => P(e)
|
|
200
|
+
}, null, 8, ["option", "selected-prop", "is-indeterminate", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type", "tree-main-option", "tree-main-option-expanded", "onClick", "onToggleTreeCollapse"]),
|
|
201
|
+
a(p)(e) ? (m(), I("div", se, [
|
|
202
202
|
Z(x("div", null, [
|
|
203
|
-
(
|
|
204
|
-
key: `${
|
|
205
|
-
option:
|
|
206
|
-
"selected-prop": T(
|
|
207
|
-
disabled:
|
|
208
|
-
"name-key":
|
|
209
|
-
"image-key":
|
|
210
|
-
"icon-key":
|
|
211
|
-
"icon-type":
|
|
212
|
-
"end-icon-key":
|
|
213
|
-
"end-icon-type":
|
|
214
|
-
"tree-child-shown":
|
|
203
|
+
(m(!0), I(N, null, _(a(y)(e), (s, k) => (m(), ee(a(z), {
|
|
204
|
+
key: `${r}-${k}`,
|
|
205
|
+
option: s,
|
|
206
|
+
"selected-prop": T(s),
|
|
207
|
+
disabled: s[l.disabledOptionKey],
|
|
208
|
+
"name-key": l.optionNameKey,
|
|
209
|
+
"image-key": l.optionImageKey,
|
|
210
|
+
"icon-key": l.optionIconKey,
|
|
211
|
+
"icon-type": l.optionIconType,
|
|
212
|
+
"end-icon-key": l.optionEndIconKey,
|
|
213
|
+
"end-icon-type": l.optionEndIconType,
|
|
214
|
+
"tree-child-shown": d.value[e[l.optionUniqueIdKey]],
|
|
215
215
|
"stop-option-click-event-propagation": "",
|
|
216
|
-
onClick: q(() => S(
|
|
216
|
+
onClick: q(() => S(s), ["stop"])
|
|
217
217
|
}, null, 8, ["option", "selected-prop", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type", "tree-child-shown", "onClick"]))), 128))
|
|
218
218
|
], 512), [
|
|
219
|
-
[ne,
|
|
219
|
+
[ne, d.value[e[l.optionUniqueIdKey]]]
|
|
220
220
|
])
|
|
221
221
|
])) : oe("", !0)
|
|
222
222
|
]),
|
|
223
223
|
_: 3
|
|
224
224
|
}, 8, ["is-open", "options", "selected", "display-value", "placeholder", "inline-search-placeholder", "option-name-key", "size", "test-id", "disabled", "custom-number-of-displayed-options"]),
|
|
225
|
-
x("pre", re,
|
|
225
|
+
x("pre", re, le(d.value), 1)
|
|
226
226
|
], 64));
|
|
227
227
|
}
|
|
228
228
|
});
|
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
|
-
.child-options[data-v-e944c610]{padding-left:1rem}
|