@ironsource/shared-ui 2.1.6-test.13 → 2.1.6-test.15
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/Alert.vue_vue_type_style_index_0_scoped_06e0871a_lang.css +1 -0
- package/AppDropdownTrigger.vue_vue_type_style_index_0_scoped_858cefbf_lang.css +1 -0
- package/ChipV4.vue_vue_type_style_index_0_scoped_12c0f396_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_057abdf5_lang.css +1 -0
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_f81413ec_lang.css +1 -0
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_0345d6b1_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_7af4f288_lang.css +1 -0
- package/FoldableSection.vue_vue_type_style_index_0_scoped_1a5f0e2e_lang.css +1 -0
- package/HelpIcon.vue_vue_type_style_index_0_scoped_06fce2e3_lang.css +1 -0
- package/IconV4.vue_vue_type_style_index_0_scoped_9d3c9cda_lang.css +1 -0
- package/InlineCopy.vue_vue_type_style_index_0_scoped_893a203c_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_9db0f796_lang.css +1 -0
- package/README.md +35 -0
- package/TextAreaV4.vue_vue_type_style_index_0_scoped_f3b2c01d_lang.css +1 -0
- package/ToggleV4.vue_vue_type_style_index_0_scoped_a4aa32fb_lang.css +1 -0
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_142eab98_lang.css +1 -0
- package/components/alert/Alert.vue.d.ts +28 -0
- package/components/alert/Alert.vue.js +4 -4
- package/components/alert/Alert.vue2.js +67 -46
- package/components/alert/index.d.ts +104 -2
- package/components/autocomplete/Autocomplete.vue.d.ts +1 -0
- package/components/autocomplete/Autocomplete.vue2.js +6 -5
- package/components/autocomplete/index.d.ts +1 -0
- package/components/button/v4/ButtonV4.vue.d.ts +7 -7
- package/components/button/v4/IconButtonV4.vue.d.ts +4 -4
- package/components/button/v4/index.d.ts +61 -61
- package/components/chip/v4/Chip.types.d.ts +6 -0
- package/components/chip/v4/ChipV4.vue.d.ts +28 -35
- package/components/chip/v4/ChipV4.vue.js +3 -3
- package/components/chip/v4/ChipV4.vue2.js +28 -59
- package/components/chip/v4/index.d.ts +45 -148
- package/components/datePicker/common/DatePicker.common.js +14 -14
- package/components/datePicker/v4/DatePickerV4.vue2.js +3 -2
- package/components/dateRange/v4/DateRangeV4.vue.js +3 -3
- package/components/dateRange/v4/DateRangeV4.vue2.js +4 -3
- package/components/dialog/v3/Dialog.vue.d.ts +1 -1
- package/components/dialog/v3/index.d.ts +20 -20
- package/components/dropdown/common/Dropdown.common.js +80 -75
- package/components/dropdown/common/Option.common.d.ts +1 -1
- package/components/dropdown/common/Option.common.js +9 -9
- package/components/dropdown/composables/useChildOptions.d.ts +7 -0
- package/components/dropdown/composables/useChildOptions.js +14 -0
- package/components/dropdown/v4/AppDropdownTrigger.vue.d.ts +14 -3
- package/components/dropdown/v4/AppDropdownTrigger.vue.js +3 -3
- package/components/dropdown/v4/AppDropdownTrigger.vue2.js +102 -61
- package/components/dropdown/v4/DefaultDropdownTrigger.vue.d.ts +8 -3
- package/components/dropdown/v4/DefaultDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/DefaultDropdownTrigger.vue2.js +22 -21
- package/components/dropdown/v4/DropdownV4.vue.d.ts +22 -6
- package/components/dropdown/v4/DropdownV4.vue.js +2 -2
- package/components/dropdown/v4/DropdownV4.vue2.js +81 -73
- package/components/dropdown/v4/OptionV4.vue.d.ts +6 -6
- package/components/dropdown/v4/OptionV4.vue.js +3 -3
- package/components/dropdown/v4/OptionV4.vue2.js +51 -45
- package/components/dropdown/v4/TreeDropdown.vue.d.ts +112 -0
- package/components/dropdown/v4/TreeDropdown.vue.js +7 -0
- package/components/dropdown/v4/TreeDropdown.vue2.js +122 -0
- package/components/dropdown/v4/dropdownStoryArgs.d.ts +1 -1
- package/components/dropdown/v4/index.d.ts +332 -49
- package/components/dropdown/v4/index.js +7 -4
- package/components/emptyState/v3/EmptyState.vue.d.ts +2 -2
- package/components/emptyState/v3/index.d.ts +47 -47
- package/components/emptyState/v4/EmptyStateV4.vue.d.ts +3 -3
- package/components/emptyState/v4/index.d.ts +7 -7
- package/components/icon/v4/Icon.types.d.ts +1 -1
- package/components/icon/v4/IconV4.vue.d.ts +16 -6
- package/components/icon/v4/IconV4.vue.js +4 -4
- package/components/icon/v4/IconV4.vue2.js +36 -33
- package/components/icon/v4/index.d.ts +53 -15
- package/components/inlineCopy/InlineCopy.vue.js +2 -2
- package/components/inlineCopy/InlineCopy.vue2.js +1 -1
- package/components/layout/FoldableSection.vue.js +5 -5
- package/components/layout/FoldableSection.vue2.js +1 -1
- package/components/multibar/MultiBarMenu.vue2.js +12 -11
- package/components/snackbar/v4/SnackbarV4.vue.d.ts +20 -20
- package/components/table/common/Table.common.d.ts +1 -0
- package/components/table/common/Table.common.js +65 -61
- package/components/table/v4/DataGrid.vue.d.ts +5 -1
- package/components/table/v4/DataGrid.vue.js +3 -3
- package/components/table/v4/DataGrid.vue2.js +166 -162
- package/components/table/v4/DataGridMenu.vue2.js +3 -2
- package/components/table/v4/HelpIcon.vue.js +5 -5
- package/components/table/v4/HelpIcon.vue2.js +5 -5
- package/components/table/v4/index.d.ts +16 -4
- package/components/textArea/v4/TextAreaV4.vue.js +3 -3
- package/components/textArea/v4/TextAreaV4.vue2.js +1 -1
- package/components/toggle/v4/ToggleV4.vue.d.ts +1 -1
- package/components/toggle/v4/ToggleV4.vue.js +3 -3
- package/components/toggle/v4/ToggleV4.vue2.js +12 -12
- package/components/toggle/v4/index.d.ts +20 -20
- package/composables/useFormValidation.js +19 -13
- package/design-foundation.stories/icons/iconsData.d.ts +5 -1
- package/index.d.ts +1091 -632
- package/mocks/apps.d.ts +1 -0
- package/mocks/options.d.ts +12 -0
- package/package.json +1 -1
- package/utils/text.d.ts +1 -0
- package/utils/text.js +9 -0
- package/Alert.vue_vue_type_style_index_0_scoped_d6680a72_lang.css +0 -1
- package/AppDropdownTrigger.vue_vue_type_style_index_0_scoped_39c47ad1_lang.css +0 -1
- package/ChipV4.vue_vue_type_style_index_0_scoped_78d7c9c0_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_6df3b70f_lang.css +0 -1
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_1cc45a5d_lang.css +0 -1
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_ad524750_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_0363db63_lang.css +0 -1
- package/FoldableSection.vue_vue_type_style_index_0_scoped_8d0fd203_lang.css +0 -1
- package/HelpIcon.vue_vue_type_style_index_0_scoped_7a611779_lang.css +0 -1
- package/IconV4.vue_vue_type_style_index_0_scoped_a78f8a3e_lang.css +0 -1
- package/InlineCopy.vue_vue_type_style_index_0_scoped_6a7b3795_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_e0c24b6a_lang.css +0 -1
- package/TextAreaV4.vue_vue_type_style_index_0_scoped_8199b662_lang.css +0 -1
- package/ToggleV4.vue_vue_type_style_index_0_scoped_ad231e8c_lang.css +0 -1
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { useToggle as
|
|
2
|
-
import { ref as n, computed as r, watch as
|
|
1
|
+
import { useToggle as we } from "../../../composables/useToggle.js";
|
|
2
|
+
import { ref as n, computed as r, watch as m, useSlots as Ie, toRaw as O, nextTick as C, provide as xe, onMounted as De } from "vue";
|
|
3
3
|
import { isObjectInArray as W } from "../../../utils/array.js";
|
|
4
|
-
import { objectsEqual as
|
|
5
|
-
import { useClamp as
|
|
6
|
-
import { Mode as
|
|
7
|
-
import { pxToRem as
|
|
8
|
-
import { useEditableContext as
|
|
9
|
-
const
|
|
10
|
-
const Z = (e, t) => l.multi ? W(e, t) :
|
|
11
|
-
let
|
|
4
|
+
import { objectsEqual as Ce } from "../../../utils/object.js";
|
|
5
|
+
import { useClamp as Ne, useVirtualList as Re, onClickOutside as Y } from "@vueuse/core";
|
|
6
|
+
import { Mode as P, Type as V, DropdownContext as Ee } from "./DropdownContext.js";
|
|
7
|
+
import { pxToRem as Me } from "../../../utils/style.js";
|
|
8
|
+
import { useEditableContext as Ve } from "../../table-cells/common/EditableContext.js";
|
|
9
|
+
const Ke = (l, A, b) => {
|
|
10
|
+
const Z = (e, t) => l.multi ? W(e, t) : O(e) === t;
|
|
11
|
+
let _;
|
|
12
12
|
((e) => {
|
|
13
13
|
e[e.None = 0] = "None", e[e.Next = 1] = "Next", e[e.Previous = -1] = "Previous", e[e.NextPage = 10] = "NextPage", e[e.PrevPage = -10] = "PrevPage";
|
|
14
|
-
})(
|
|
14
|
+
})(_ || (_ = {}));
|
|
15
15
|
const a = n(
|
|
16
16
|
l.selected
|
|
17
|
-
), N =
|
|
17
|
+
), N = Ve(), u = r({
|
|
18
18
|
get() {
|
|
19
19
|
return N?.value?.value ?? a.value;
|
|
20
20
|
},
|
|
21
21
|
set(e) {
|
|
22
|
-
N.onChange?.(e), N.onClose?.(),
|
|
22
|
+
N.onChange?.(e), N.onClose?.(), A("update:selected", e);
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
|
-
|
|
25
|
+
m(
|
|
26
26
|
() => l.selected,
|
|
27
27
|
() => {
|
|
28
28
|
a.value = l.selected, v.value = l.selected;
|
|
29
29
|
}
|
|
30
30
|
);
|
|
31
|
-
const
|
|
31
|
+
const F = Ie(), w = n(null), g = n(null), k = n(null), R = n(null), H = n(null), I = n(null), p = n(), B = n(null), L = n(null), U = n(null), ee = 8, le = r(() => I.value ? I.value.getBoundingClientRect().height + ee + l.distance : 0), c = n([]), x = n(-1), T = n(""), v = n(l.selected || []), q = () => I.value?.focus(), [d, te, ae] = we({
|
|
32
32
|
disabled: l.disabled,
|
|
33
33
|
initialValue: l.defaultOpen
|
|
34
34
|
});
|
|
35
|
-
|
|
35
|
+
m(
|
|
36
36
|
() => l.disabled,
|
|
37
37
|
(e) => {
|
|
38
38
|
e !== void 0 && ae(e);
|
|
@@ -45,9 +45,9 @@ const Ue = (l, O, b) => {
|
|
|
45
45
|
return l.isOpen;
|
|
46
46
|
},
|
|
47
47
|
set(e) {
|
|
48
|
-
|
|
48
|
+
A("update:isOpen", e);
|
|
49
49
|
}
|
|
50
|
-
}), ne = r(() => s.value.length - 1), o =
|
|
50
|
+
}), ne = r(() => s.value.length - 1), o = Ne(0, 0, ne), K = r(() => u.value ? l.displayValue(u.value) : ""), ie = (e) => {
|
|
51
51
|
if (!e.value.length && !l.multiOptionsPlaceholderPrefix && !l.multiOptionsPlaceholderSuffix)
|
|
52
52
|
return l.placeholder;
|
|
53
53
|
const t = !l.multiOptionsPlaceholderPrefix && !l.multiOptionsPlaceholderSuffix ? `${e.value.length} selected` : `${l.multiOptionsPlaceholderPrefix ?? ""}${e.value.length ?? "0"}${l.multiOptionsPlaceholderSuffix ?? ""}`;
|
|
@@ -61,55 +61,57 @@ const Ue = (l, O, b) => {
|
|
|
61
61
|
if (Array.isArray(a.value))
|
|
62
62
|
return a.value.length === s.value.length;
|
|
63
63
|
}), oe = r(() => !l.multi || !Array.isArray(a.value) ? !1 : a.value.length > 0 && a.value.length < s.value.length), E = (e) => {
|
|
64
|
-
|
|
64
|
+
T.value = e;
|
|
65
65
|
}, se = r(() => {
|
|
66
|
-
const e =
|
|
66
|
+
const e = O(v.value), t = {
|
|
67
67
|
selected: [],
|
|
68
68
|
notSelected: []
|
|
69
69
|
};
|
|
70
|
-
return
|
|
70
|
+
return O(l.options).forEach((y) => {
|
|
71
71
|
const f = e.includes(y) ? "selected" : "notSelected";
|
|
72
72
|
t[f].push(y);
|
|
73
73
|
}), [].concat(t.selected, t.notSelected);
|
|
74
74
|
}), s = r(() => {
|
|
75
75
|
const e = Array.isArray(v.value) && l.multi && b.VERSION === 4 ? se.value : l.options;
|
|
76
|
-
return l.onSearch ? e.filter((t) => l.onSearch(t,
|
|
77
|
-
}), ce = r(() => c.value[0]?.hasSubtitle), X = r(() => i.mode ===
|
|
76
|
+
return l.onSearch ? e.filter((t) => l.onSearch(t, T.value)) : e;
|
|
77
|
+
}), ce = r(() => c.value[0]?.hasSubtitle), X = r(() => i.mode === P.Multi), j = r(
|
|
78
78
|
() => ce.value ? b.MULTILINE_LIST_HEIGHT : b.LIST_HEIGHT
|
|
79
79
|
), {
|
|
80
80
|
list: z,
|
|
81
81
|
containerProps: J,
|
|
82
82
|
wrapperProps: ve,
|
|
83
|
-
scrollTo:
|
|
84
|
-
} =
|
|
83
|
+
scrollTo: D
|
|
84
|
+
} = Re(s, {
|
|
85
85
|
itemHeight: j.value,
|
|
86
|
-
overscan: 2
|
|
86
|
+
overscan: l.disableVirtualScroll ? 1 / 0 : 2
|
|
87
87
|
});
|
|
88
|
-
|
|
88
|
+
m(
|
|
89
89
|
() => l.isOpen,
|
|
90
90
|
(e) => {
|
|
91
91
|
G(e);
|
|
92
92
|
}
|
|
93
|
-
),
|
|
94
|
-
await
|
|
95
|
-
}),
|
|
93
|
+
), m([x], async () => {
|
|
94
|
+
await C();
|
|
95
|
+
}), m(
|
|
96
96
|
[d, o, x],
|
|
97
97
|
async ([e], [t]) => {
|
|
98
|
-
d.value && (await
|
|
99
|
-
l.multi && b.VERSION === 4 ||
|
|
98
|
+
d.value && (await C(), x.value !== -1 && e !== t && setTimeout(() => {
|
|
99
|
+
l.multi && b.VERSION === 4 || D(x.value);
|
|
100
100
|
}), o.value && setTimeout(() => {
|
|
101
|
-
|
|
101
|
+
D(o.value);
|
|
102
102
|
}));
|
|
103
103
|
}
|
|
104
|
-
)
|
|
104
|
+
), m(T, () => {
|
|
105
|
+
D(0);
|
|
106
|
+
});
|
|
105
107
|
const h = (e, t = !1) => {
|
|
106
|
-
l.disabled || (G(e),
|
|
107
|
-
d.value &&
|
|
108
|
+
l.disabled || (G(e), C(() => {
|
|
109
|
+
d.value && A("opened"), d.value || A("closed"), w.value && t && w.value.focus();
|
|
108
110
|
}));
|
|
109
111
|
};
|
|
110
|
-
|
|
112
|
+
m(d, (e) => {
|
|
111
113
|
if (e) {
|
|
112
|
-
X.value && Array.isArray(u.value) && (v.value =
|
|
114
|
+
X.value && Array.isArray(u.value) && (v.value = O(u.value).slice());
|
|
113
115
|
return;
|
|
114
116
|
}
|
|
115
117
|
q();
|
|
@@ -124,29 +126,29 @@ const Ue = (l, O, b) => {
|
|
|
124
126
|
a.value = [];
|
|
125
127
|
return;
|
|
126
128
|
}
|
|
127
|
-
a.value = s.value,
|
|
129
|
+
a.value = s.value, A("selectAll");
|
|
128
130
|
}
|
|
129
131
|
}, fe = () => {
|
|
130
132
|
de(), b.VERSION !== 4 && (u.value = a.value);
|
|
131
133
|
}, ge = (e = !0) => {
|
|
132
|
-
a.value = [], e && (u.value = [], v.value = [],
|
|
133
|
-
},
|
|
134
|
-
if (e =
|
|
134
|
+
a.value = [], e && (u.value = [], v.value = []), A("clear");
|
|
135
|
+
}, M = (e, t) => {
|
|
136
|
+
if (e = O(e), c.value[t]?.disabled)
|
|
135
137
|
return;
|
|
136
|
-
if (x.value = t, i.mode !==
|
|
138
|
+
if (x.value = t, i.mode !== P.Multi) {
|
|
137
139
|
l.keepOpen || h(!1), i.goToOption(
|
|
138
140
|
0
|
|
139
141
|
/* None */
|
|
140
|
-
), u.value = e, E(""), q(), i.type ===
|
|
142
|
+
), u.value = e, E(""), q(), i.type === V.Search && g.value && (g.value.value = l.displayValue(e));
|
|
141
143
|
return;
|
|
142
144
|
}
|
|
143
145
|
if (!Array.isArray(a.value))
|
|
144
146
|
return;
|
|
145
147
|
g.value?.focus();
|
|
146
|
-
const S =
|
|
148
|
+
const S = O(a.value);
|
|
147
149
|
if (W(S, e)) {
|
|
148
150
|
a.value = S.filter(
|
|
149
|
-
(f) => !
|
|
151
|
+
(f) => !Ce(f, e)
|
|
150
152
|
);
|
|
151
153
|
return;
|
|
152
154
|
} else {
|
|
@@ -159,11 +161,11 @@ const Ue = (l, O, b) => {
|
|
|
159
161
|
selectedOption: u,
|
|
160
162
|
labelRef: H,
|
|
161
163
|
activeOption: R,
|
|
162
|
-
listRef:
|
|
164
|
+
listRef: w,
|
|
163
165
|
clearable: l.clearable,
|
|
164
|
-
type:
|
|
165
|
-
mode: l.multi ?
|
|
166
|
-
query:
|
|
166
|
+
type: F.input ? V.Search : V.Dropdown,
|
|
167
|
+
mode: l.multi ? P.Multi : P.Single,
|
|
168
|
+
query: T,
|
|
167
169
|
selectedValue: K,
|
|
168
170
|
toggle: h,
|
|
169
171
|
disabled: l.disabled,
|
|
@@ -171,9 +173,9 @@ const Ue = (l, O, b) => {
|
|
|
171
173
|
mandatory: l.mandatory,
|
|
172
174
|
size: l.size,
|
|
173
175
|
placeholder: l.placeholder,
|
|
174
|
-
select:
|
|
176
|
+
select: M,
|
|
175
177
|
clearSelection: () => {
|
|
176
|
-
E(""), u.value = i.mode ===
|
|
178
|
+
E(""), u.value = i.mode === P.Single ? null : [], v.value = i.mode === P.Single ? null : [], g.value && (g.value.value = "");
|
|
177
179
|
},
|
|
178
180
|
search: E,
|
|
179
181
|
goToOption: async (e) => {
|
|
@@ -204,14 +206,14 @@ const Ue = (l, O, b) => {
|
|
|
204
206
|
c.value = c.value.filter((t) => t.id !== e);
|
|
205
207
|
}
|
|
206
208
|
};
|
|
207
|
-
|
|
208
|
-
|
|
209
|
+
xe(Ee, i), Y(
|
|
210
|
+
w,
|
|
209
211
|
() => {
|
|
210
212
|
d.value && Q();
|
|
211
213
|
},
|
|
212
214
|
{
|
|
213
215
|
ignore: [
|
|
214
|
-
|
|
216
|
+
I,
|
|
215
217
|
B,
|
|
216
218
|
L,
|
|
217
219
|
U,
|
|
@@ -223,15 +225,15 @@ const Ue = (l, O, b) => {
|
|
|
223
225
|
const ye = () => {
|
|
224
226
|
g.value && (g.value.value = i.query.value = "");
|
|
225
227
|
};
|
|
226
|
-
|
|
227
|
-
l.autoFocus && (await
|
|
228
|
-
|
|
228
|
+
De(async () => {
|
|
229
|
+
l.autoFocus && (await C(), setTimeout(() => {
|
|
230
|
+
k.value.focus();
|
|
229
231
|
})), i.goToOption(0);
|
|
230
232
|
});
|
|
231
233
|
const Se = () => {
|
|
232
|
-
u.value = a.value, Array.isArray(u.value) && (v.value =
|
|
234
|
+
u.value = a.value, Array.isArray(u.value) && (v.value = O(u.value).slice()), A("apply", u.value), h(!1), ye();
|
|
233
235
|
}, Q = () => {
|
|
234
|
-
X.value && Array.isArray(v.value) && (u.value =
|
|
236
|
+
X.value && Array.isArray(v.value) && (u.value = O(v.value).slice()), T.value = "", h(!1);
|
|
235
237
|
}, be = (e) => {
|
|
236
238
|
if (!l.disableKeyboardEvents)
|
|
237
239
|
switch (e.key) {
|
|
@@ -241,7 +243,7 @@ const Ue = (l, O, b) => {
|
|
|
241
243
|
case "ArrowDown":
|
|
242
244
|
h(!0), e.preventDefault();
|
|
243
245
|
}
|
|
244
|
-
},
|
|
246
|
+
}, Oe = (e) => {
|
|
245
247
|
if (!l.disableKeyboardEvents)
|
|
246
248
|
switch (e.key) {
|
|
247
249
|
case "ArrowUp": {
|
|
@@ -281,28 +283,31 @@ const Ue = (l, O, b) => {
|
|
|
281
283
|
h(!0);
|
|
282
284
|
return;
|
|
283
285
|
}
|
|
284
|
-
|
|
286
|
+
M(s.value[o.value], o.value), i.mode === P.Single && !l.keepOpen && h(!1), e.preventDefault();
|
|
285
287
|
break;
|
|
286
288
|
}
|
|
287
289
|
}
|
|
288
|
-
},
|
|
289
|
-
const e = z.value.
|
|
290
|
+
}, Ae = r(() => {
|
|
291
|
+
const e = z.value.reduce((me, Pe) => {
|
|
292
|
+
const Te = l.overrideOptionCountCalculation ? l.overrideOptionCountCalculation(Pe.data) : 1;
|
|
293
|
+
return me + Te;
|
|
294
|
+
}, 0), t = l.multi && l.showSelectAll ? 1 : 0, y = e > b.MAX_NUMBER_OF_OPTIONS, S = e + t;
|
|
290
295
|
let f = y ? b.MAX_NUMBER_OF_OPTIONS + 0.1 : S;
|
|
291
|
-
return l.noResultsText && f === 0 && (f = f + 1),
|
|
296
|
+
return l.noResultsText && f === 0 && (f = f + 1), Me(
|
|
292
297
|
f * j.value + b.PADDING_PX
|
|
293
298
|
);
|
|
294
299
|
});
|
|
295
300
|
return {
|
|
296
|
-
onKeydown:
|
|
301
|
+
onKeydown: Oe,
|
|
297
302
|
location: le,
|
|
298
303
|
open: d,
|
|
299
304
|
toggleMenu: h,
|
|
300
305
|
onButtonKeydown: be,
|
|
301
306
|
displayedValue: re,
|
|
302
307
|
labelRef: H,
|
|
303
|
-
query:
|
|
308
|
+
query: T,
|
|
304
309
|
containerProps: J,
|
|
305
|
-
calculateTableHeight:
|
|
310
|
+
calculateTableHeight: Ae,
|
|
306
311
|
wrapperProps: ve,
|
|
307
312
|
filteredOptions: s,
|
|
308
313
|
allSelected: $,
|
|
@@ -313,22 +318,22 @@ const Ue = (l, O, b) => {
|
|
|
313
318
|
selectedOption: u,
|
|
314
319
|
selectedOptionPrevious: v,
|
|
315
320
|
selectedValue: K,
|
|
316
|
-
onSelect:
|
|
321
|
+
onSelect: M,
|
|
317
322
|
activeIndex: o,
|
|
318
323
|
onCancel: Q,
|
|
319
324
|
onApply: Se,
|
|
320
|
-
scrollTo:
|
|
325
|
+
scrollTo: D,
|
|
321
326
|
onClickOutside: Y,
|
|
322
|
-
listRef:
|
|
323
|
-
buttonRef:
|
|
327
|
+
listRef: w,
|
|
328
|
+
buttonRef: I,
|
|
324
329
|
apply: B,
|
|
325
330
|
cancel: L,
|
|
326
|
-
el:
|
|
327
|
-
triggerRef:
|
|
331
|
+
el: k,
|
|
332
|
+
triggerRef: p,
|
|
328
333
|
clearAll: U,
|
|
329
334
|
onClearAllSelections: ge
|
|
330
335
|
};
|
|
331
336
|
};
|
|
332
337
|
export {
|
|
333
|
-
|
|
338
|
+
Ke as dropdownCommon
|
|
334
339
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { ref as s, onMounted as m, onUnmounted as v, computed as o, toRaw as i } from "vue";
|
|
2
2
|
import { useId as f } from "../../../composables/useId.js";
|
|
3
3
|
import { useDropdownContext as O, Mode as l } from "./DropdownContext.js";
|
|
4
|
-
const A = (
|
|
5
|
-
const
|
|
6
|
-
|
|
4
|
+
const A = (e) => {
|
|
5
|
+
const t = O("Option"), n = f().value, u = s(null), c = (a) => {
|
|
6
|
+
e.selectAllOption ? a.stopPropagation() : t.select(e.option);
|
|
7
7
|
};
|
|
8
|
-
m(() =>
|
|
9
|
-
|
|
8
|
+
m(() => t.registerOption(n, e.disabled, !!e.subtitle)), v(() => {
|
|
9
|
+
t.unRegisterOption(n);
|
|
10
10
|
});
|
|
11
|
-
const r = o(() =>
|
|
11
|
+
const r = o(() => t.mode === l.Multi), d = o(() => e.active !== null ? e.active : t.activeIndex.value !== null ? t.activeOption.value === e.option : !1);
|
|
12
12
|
return {
|
|
13
|
-
selected: o(() =>
|
|
13
|
+
selected: o(() => e.selectedProp !== null ? e.selectedProp : t.mode === l.Multi && Array.isArray(t.selectedOption.value) ? i(t.selectedOption.value.includes(e.option)) : i(t.selectedOption.value) === i(e.option)),
|
|
14
14
|
isMulti: r,
|
|
15
15
|
id: n,
|
|
16
16
|
onClick: c,
|
|
17
|
-
api:
|
|
17
|
+
api: t,
|
|
18
18
|
el: u,
|
|
19
|
-
active:
|
|
19
|
+
active: d
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
export {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
export declare const useChildOptions: (selection: Ref<unknown[]>, childrenKey: string) => {
|
|
3
|
+
hasChildren: (option: unknown) => boolean;
|
|
4
|
+
getChildren: (option: unknown) => unknown[];
|
|
5
|
+
someChildrenSelected: (option: any) => boolean;
|
|
6
|
+
allChildrenSelected: (option: unknown) => boolean;
|
|
7
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const c = (s, t) => {
|
|
2
|
+
const l = (e) => e && e[t] ? e[t] : [], r = (e) => l(e)?.length > 0;
|
|
3
|
+
return {
|
|
4
|
+
hasChildren: r,
|
|
5
|
+
getChildren: l,
|
|
6
|
+
someChildrenSelected: (e) => r(e) ? l(e).some((n) => s.value.includes(n)) : !1,
|
|
7
|
+
allChildrenSelected: (e) => r(e) ? l(e).every(
|
|
8
|
+
(n) => s.value.includes(n)
|
|
9
|
+
) : !1
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
c as useChildOptions
|
|
14
|
+
};
|
|
@@ -17,7 +17,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
17
17
|
optionNameKey?: string;
|
|
18
18
|
optionImageKey?: string;
|
|
19
19
|
optionIconKey?: string;
|
|
20
|
-
optionIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
|
|
20
|
+
optionIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
|
|
21
|
+
optionEndIconKey?: string;
|
|
22
|
+
optionEndIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
|
|
21
23
|
}>, {
|
|
22
24
|
placeholder: string;
|
|
23
25
|
selectedOption: any;
|
|
@@ -41,6 +43,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
41
43
|
optionImageKey: any;
|
|
42
44
|
optionIconKey: any;
|
|
43
45
|
optionIconType: any;
|
|
46
|
+
optionEndIconKey: any;
|
|
47
|
+
optionEndIconType: any;
|
|
44
48
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
45
49
|
click: () => void;
|
|
46
50
|
copyToClipboard: () => void;
|
|
@@ -63,7 +67,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
63
67
|
optionNameKey?: string;
|
|
64
68
|
optionImageKey?: string;
|
|
65
69
|
optionIconKey?: string;
|
|
66
|
-
optionIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
|
|
70
|
+
optionIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
|
|
71
|
+
optionEndIconKey?: string;
|
|
72
|
+
optionEndIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
|
|
67
73
|
}>, {
|
|
68
74
|
placeholder: string;
|
|
69
75
|
selectedOption: any;
|
|
@@ -87,6 +93,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
87
93
|
optionImageKey: any;
|
|
88
94
|
optionIconKey: any;
|
|
89
95
|
optionIconType: any;
|
|
96
|
+
optionEndIconKey: any;
|
|
97
|
+
optionEndIconType: any;
|
|
90
98
|
}>>> & {
|
|
91
99
|
onClick?: () => any;
|
|
92
100
|
onCopyToClipboard?: () => any;
|
|
@@ -105,13 +113,16 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
105
113
|
optionNameKey: string;
|
|
106
114
|
optionIconKey: string;
|
|
107
115
|
optionImageKey: string;
|
|
108
|
-
optionIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
|
|
116
|
+
optionIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
|
|
117
|
+
optionEndIconKey: string;
|
|
118
|
+
optionEndIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
|
|
109
119
|
valueToCopy: string;
|
|
110
120
|
selectedOption: any;
|
|
111
121
|
brandIconType: "android" | "ios";
|
|
112
122
|
}>, {
|
|
113
123
|
image?(_: {}): any;
|
|
114
124
|
"icon-start"?(_: {}): any;
|
|
125
|
+
"icon-end"?(_: {}): any;
|
|
115
126
|
}>;
|
|
116
127
|
export default _default;
|
|
117
128
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AppDropdownTrigger.vue2.js";
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../../AppDropdownTrigger.
|
|
4
|
-
const s = /* @__PURE__ */
|
|
2
|
+
/* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../../AppDropdownTrigger.vue_vue_type_style_index_0_scoped_858cefbf_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-858cefbf"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|