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