@ironsource/shared-ui 2.1.12 → 2.2.0-rc.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/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_3bc0f416_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_445ebb01_lang.css +1 -0
- package/components/dropdown/common/Dropdown.common.js +32 -32
- package/components/dropdown/v4/DefaultDropdownTrigger.vue.d.ts +15 -0
- package/components/dropdown/v4/DefaultDropdownTrigger.vue.js +3 -3
- package/components/dropdown/v4/DefaultDropdownTrigger.vue2.js +81 -60
- package/components/dropdown/v4/DropdownV4.vue.d.ts +23 -0
- package/components/dropdown/v4/DropdownV4.vue.js +2 -2
- package/components/dropdown/v4/DropdownV4.vue2.js +144 -134
- package/components/dropdown/v4/dropdownStoryArgs.d.ts +11 -0
- package/components/dropdown/v4/index.d.ts +138 -2
- package/index.d.ts +276 -4
- package/index.js +1 -1
- package/package.json +1 -1
- package/testids/index.d.ts +2 -1
- package/testids/index.js +5 -5
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_64ae80dd_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_a594c97e_lang.css +0 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import "../../../DropdownV4.
|
|
2
|
-
import
|
|
1
|
+
import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_445ebb01_lang.css"; import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css"; import { defineComponent as he, computed as L, watch as ke, toRaw as S, openBlock as a, createElementBlock as s, mergeProps as m, unref as t, renderSlot as u, createElementVNode as f, createVNode as d, withCtx as c, Transition as we, normalizeClass as B, normalizeStyle as be, createTextVNode as k, createCommentVNode as r, isRef as Ie, toDisplayString as q, withModifiers as j, Fragment as Se, renderList as ve, createSlots as Ce, createBlock as F, resolveDynamicComponent as Ke } from "vue";
|
|
2
|
+
import P from "../../button/v4/ButtonV4.vue.js";
|
|
3
3
|
import "../../button/v4/IconButtonV4.vue.js";
|
|
4
4
|
import "../../button/v4/ButtonGroup.vue.js";
|
|
5
5
|
import "../../button/v4/ToggleButtonGroupAB.vue.js";
|
|
6
6
|
import "./DropdownV4.vue.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
7
|
+
import Ee from "./DefaultDropdownTrigger.vue.js";
|
|
8
|
+
import Ae from "./IconButtonDropdownTrigger.vue.js";
|
|
9
|
+
import xe from "./ChipDropdownTrigger.vue.js";
|
|
10
|
+
import Oe from "./AppDropdownTrigger.vue.js";
|
|
11
11
|
import "./ButtonDropdownTrigger.vue.js";
|
|
12
12
|
import "./ButtonFilterDropdownTrigger.vue.js";
|
|
13
13
|
import "./TreeDropdown.vue.js";
|
|
14
14
|
import J from "./OptionV4.vue.js";
|
|
15
15
|
import "./ConditionalDropdown.vue.js";
|
|
16
|
-
import
|
|
16
|
+
import Le from "../../search/v4/SearchV4.vue.js";
|
|
17
17
|
import Q from "../../typography/v4/Typography.vue.js";
|
|
18
|
-
import { Dropdown as
|
|
18
|
+
import { Dropdown as Be } from "floating-vue";
|
|
19
19
|
import { DropdownTestIdModifiers as p } from "../../../testids/index.js";
|
|
20
20
|
import { dropdownCommon as Fe } from "../common/Dropdown.common.js";
|
|
21
21
|
import K from "../../skeleton/v4/SkeletonV4.vue.js";
|
|
22
|
-
import { useTestIdAttrs as
|
|
23
|
-
import { TRIGGERS as
|
|
24
|
-
import { useElementSize as
|
|
25
|
-
import
|
|
26
|
-
import
|
|
22
|
+
import { useTestIdAttrs as Pe } from "../../../utils/testIds.js";
|
|
23
|
+
import { TRIGGERS as w } from "./Dropdown.types.js";
|
|
24
|
+
import { useElementSize as Ne } from "@vueuse/core";
|
|
25
|
+
import Ve from "../../shared/FieldHelpText.vue.js";
|
|
26
|
+
import De from "./GroupOption.vue.js";
|
|
27
27
|
const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze = { key: 1 }, We = { key: 2 }, Ge = {
|
|
28
28
|
key: 0,
|
|
29
29
|
class: "inline-search-wrapper"
|
|
@@ -39,7 +39,7 @@ const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze
|
|
|
39
39
|
}, je = { class: "actions-clear-all" }, Je = { class: "actions-apply-cancel" }, Qe = {
|
|
40
40
|
key: 2,
|
|
41
41
|
class: "dropdown-footer"
|
|
42
|
-
}, Ct = /* @__PURE__ */
|
|
42
|
+
}, Ct = /* @__PURE__ */ he({
|
|
43
43
|
__name: "DropdownV4",
|
|
44
44
|
props: {
|
|
45
45
|
modelValue: { default: null },
|
|
@@ -64,6 +64,9 @@ const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze
|
|
|
64
64
|
minSelections: { default: 0 },
|
|
65
65
|
maxSelections: { default: null },
|
|
66
66
|
alwaysShowScroll: { type: Boolean, default: !0 },
|
|
67
|
+
inlineError: { type: Boolean, default: !1 },
|
|
68
|
+
inlineErrorText: { default: "" },
|
|
69
|
+
inlineErrorTextPlacement: { default: "top" },
|
|
67
70
|
isOnTop: { type: Boolean, default: !1 },
|
|
68
71
|
distance: { default: 0 },
|
|
69
72
|
container: { default: "body" },
|
|
@@ -79,7 +82,7 @@ const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze
|
|
|
79
82
|
triggerShownValuesCount: { default: 1 },
|
|
80
83
|
size: { default: "medium" },
|
|
81
84
|
mandatory: { type: Boolean, default: !1 },
|
|
82
|
-
predefinedTrigger: { default:
|
|
85
|
+
predefinedTrigger: { default: w.DEFAULT },
|
|
83
86
|
inlineSearch: { type: Boolean, default: !1 },
|
|
84
87
|
inlineSearchPlaceholder: { default: "Search" },
|
|
85
88
|
onSearch: { type: Function, default: null },
|
|
@@ -101,6 +104,7 @@ const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze
|
|
|
101
104
|
optionTwoLinesVariant: { default: void 0 },
|
|
102
105
|
optionTwoLinesKey: { default: void 0 },
|
|
103
106
|
groupedOptions: { type: Boolean, default: !1 },
|
|
107
|
+
resortGroupedOptions: { type: Boolean, default: !0 },
|
|
104
108
|
comparingKey: { default: null },
|
|
105
109
|
customNumberOfDisplayedOptions: { default: null },
|
|
106
110
|
optionTooltipPosition: { default: "right" },
|
|
@@ -113,8 +117,8 @@ const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze
|
|
|
113
117
|
withConditions: { type: Boolean, default: !1 }
|
|
114
118
|
},
|
|
115
119
|
emits: ["update:selected", "update:isOpen", "closed", "opened", "apply", "selectAll", "clear", "copyToClipboard", "onsearch", "loadMore", "allSelectedChanged", "unsavedSelectionUpdate"],
|
|
116
|
-
setup(e, { expose: Z, emit:
|
|
117
|
-
const o = e,
|
|
120
|
+
setup(e, { expose: Z, emit: N }) {
|
|
121
|
+
const o = e, V = {
|
|
118
122
|
MULTILINE_LIST_HEIGHT: 48,
|
|
119
123
|
LIST_HEIGHT: 32 + 4,
|
|
120
124
|
MAX_NUMBER_OF_OPTIONS: 7.5,
|
|
@@ -125,27 +129,27 @@ const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze
|
|
|
125
129
|
onKeydown: I,
|
|
126
130
|
open: y,
|
|
127
131
|
toggleMenu: v,
|
|
128
|
-
onButtonKeydown:
|
|
132
|
+
onButtonKeydown: D,
|
|
129
133
|
query: C,
|
|
130
134
|
containerProps: _,
|
|
131
135
|
calculateTableHeight: ee,
|
|
132
136
|
wrapperProps: te,
|
|
133
137
|
filteredOptions: oe,
|
|
134
138
|
allSelected: $,
|
|
135
|
-
allSelectedApplied:
|
|
136
|
-
isIndeterminate:
|
|
137
|
-
onSelectAll:
|
|
139
|
+
allSelectedApplied: E,
|
|
140
|
+
isIndeterminate: ne,
|
|
141
|
+
onSelectAll: le,
|
|
138
142
|
virtualOptions: M,
|
|
139
|
-
isSelected:
|
|
140
|
-
selectedOption:
|
|
141
|
-
selectedOptionPrevious:
|
|
143
|
+
isSelected: A,
|
|
144
|
+
selectedOption: T,
|
|
145
|
+
selectedOptionPrevious: x,
|
|
142
146
|
selectedValue: ie,
|
|
143
147
|
onSelect: R,
|
|
144
148
|
activeIndex: z,
|
|
145
149
|
onCancel: ae,
|
|
146
150
|
onApply: de,
|
|
147
|
-
scrollTo:
|
|
148
|
-
listRef:
|
|
151
|
+
scrollTo: re,
|
|
152
|
+
listRef: se,
|
|
149
153
|
buttonRef: W,
|
|
150
154
|
apply: ue,
|
|
151
155
|
cancel: ce,
|
|
@@ -154,8 +158,8 @@ const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze
|
|
|
154
158
|
clearAll: me,
|
|
155
159
|
isGroup: fe,
|
|
156
160
|
flattenAndMarkGroupOptions: pe
|
|
157
|
-
} = Fe(o,
|
|
158
|
-
|
|
161
|
+
} = Fe(o, N, V), g = Pe(o.testId, p), H = L(() => !o.predefinedTrigger || o.predefinedTrigger === w.DEFAULT ? Ee : o.predefinedTrigger === w.APP ? Oe : null), { width: U } = Ne(W), ge = L(() => o.optionsListWidth ? o.optionsListWidth : !o.predefinedTrigger || o.predefinedTrigger === w.DEFAULT || o.predefinedTrigger === w.APP ? U.value - 2 > 240 ? `${U.value - 2}px` : `${V.DROPLIST_MIN_WIDTH}px` : "auto");
|
|
162
|
+
ke(
|
|
159
163
|
() => o.optionsListWidth,
|
|
160
164
|
() => {
|
|
161
165
|
o.optionsListWidth && document.documentElement.style.setProperty(
|
|
@@ -166,51 +170,51 @@ const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze
|
|
|
166
170
|
);
|
|
167
171
|
const Y = () => {
|
|
168
172
|
v();
|
|
169
|
-
}, X =
|
|
170
|
-
const
|
|
173
|
+
}, X = L(() => {
|
|
174
|
+
const n = {
|
|
171
175
|
tooltipMessage: null,
|
|
172
176
|
selections: []
|
|
173
177
|
};
|
|
174
178
|
if (o.multi && o.comparingKey) {
|
|
175
|
-
const i = S(
|
|
179
|
+
const i = S(T.value);
|
|
176
180
|
if (o.minSelections || o.maxSelections) {
|
|
177
181
|
if (Array.isArray(i) && i.length <= o.minSelections)
|
|
178
|
-
return
|
|
179
|
-
(
|
|
180
|
-
),
|
|
182
|
+
return n.tooltipMessage = `You need to select at least ${o.minSelections} item${o.minSelections > 1 ? "s" : ""}`, n.selections = i.map(
|
|
183
|
+
(l) => l[o.comparingKey]
|
|
184
|
+
), n;
|
|
181
185
|
if (o.maxSelections && Array.isArray(i) && i.length >= o.maxSelections) {
|
|
182
|
-
const
|
|
186
|
+
const l = i.map(
|
|
183
187
|
(b) => b[o.comparingKey]
|
|
184
|
-
),
|
|
185
|
-
return
|
|
186
|
-
if (!
|
|
188
|
+
), h = o.groupedOptions ? pe(o.options) : o.options;
|
|
189
|
+
return n.tooltipMessage = `You can only select up to ${o.maxSelections} items`, n.selections = h.map((b) => {
|
|
190
|
+
if (!l.includes(b[o.comparingKey]))
|
|
187
191
|
return b[o.comparingKey];
|
|
188
|
-
}),
|
|
192
|
+
}), n;
|
|
189
193
|
}
|
|
190
194
|
}
|
|
191
195
|
}
|
|
192
|
-
return
|
|
193
|
-
}),
|
|
196
|
+
return n.tooltipMessage = null, n.selections = [], n;
|
|
197
|
+
}), Te = (n) => {
|
|
194
198
|
if ((o.minSelections || o.maxSelections) && o.comparingKey)
|
|
195
199
|
return X.value.selections.includes(
|
|
196
|
-
|
|
200
|
+
n[o.comparingKey]
|
|
197
201
|
);
|
|
198
|
-
},
|
|
202
|
+
}, O = (n) => n[o.disabledOptionKey] || Te(n);
|
|
199
203
|
return Z({
|
|
200
204
|
selectItem: R,
|
|
201
|
-
scrollTo:
|
|
202
|
-
}), (
|
|
205
|
+
scrollTo: re
|
|
206
|
+
}), (n, i) => (a(), s("div", m({
|
|
203
207
|
ref_key: "el",
|
|
204
208
|
ref: ye,
|
|
205
209
|
class: ["dropdown dropdown--main-wrapper", [{ "dropdown--disabled": e.disabled, "full-width": e.fullWidth }]],
|
|
206
210
|
tabindex: e.disabled ? -1 : 0
|
|
207
211
|
}, t(g)[t(p).WRAPPER], {
|
|
208
212
|
onKeydown: i[8] || (i[8] = //@ts-ignore
|
|
209
|
-
(...
|
|
213
|
+
(...l) => t(I) && t(I)(...l))
|
|
210
214
|
}), [
|
|
211
|
-
u(
|
|
215
|
+
u(n.$slots, "label", {}, void 0, !0),
|
|
212
216
|
f("div", Me, [
|
|
213
|
-
d(t(
|
|
217
|
+
d(t(Be), m({
|
|
214
218
|
theme: e.theme,
|
|
215
219
|
"popper-class": [
|
|
216
220
|
e.popperClass,
|
|
@@ -229,43 +233,43 @@ const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze
|
|
|
229
233
|
"auto-size": e.autoSize
|
|
230
234
|
}, t(g)[t(p).TRIGGER]), {
|
|
231
235
|
popper: c(() => [
|
|
232
|
-
d(
|
|
236
|
+
d(we, null, {
|
|
233
237
|
default: c(() => [
|
|
234
|
-
t(y) ? (a(),
|
|
238
|
+
t(y) ? (a(), s("div", {
|
|
235
239
|
key: 0,
|
|
236
240
|
ref_key: "listRef",
|
|
237
|
-
ref:
|
|
238
|
-
class:
|
|
241
|
+
ref: se,
|
|
242
|
+
class: B(["light-theme-v4", {
|
|
239
243
|
"dropdown--disabled": e.disabled,
|
|
240
244
|
"inline-search": e.inlineSearch
|
|
241
245
|
}]),
|
|
242
246
|
style: be({ width: t(ge) })
|
|
243
247
|
}, [
|
|
244
|
-
t(y) ? (a(),
|
|
248
|
+
t(y) ? (a(), s("div", {
|
|
245
249
|
key: 0,
|
|
246
|
-
class:
|
|
250
|
+
class: B(["dropdown-list-wrapper", {
|
|
247
251
|
"dropdown-list-wrapper--multi": e.multi,
|
|
248
252
|
"dropdown-list-wrapper-always-show-scroll": e.alwaysShowScroll
|
|
249
253
|
}]),
|
|
250
254
|
onKeydown: i[7] || (i[7] = //@ts-ignore
|
|
251
|
-
(...
|
|
255
|
+
(...l) => t(I) && t(I)(...l))
|
|
252
256
|
}, [
|
|
253
|
-
t(y) && e.inlineSearch ? (a(),
|
|
254
|
-
e.withConditions ? u(
|
|
257
|
+
t(y) && e.inlineSearch ? (a(), s("div", Ge, [
|
|
258
|
+
e.withConditions ? u(n.$slots, "dropdown-conditions", { key: 0 }, () => [
|
|
255
259
|
f("div", He, [
|
|
256
260
|
d(t(Q), { variant: "body2" }, {
|
|
257
261
|
default: c(() => [
|
|
258
|
-
|
|
262
|
+
k("Conditions")
|
|
259
263
|
]),
|
|
260
264
|
_: 1
|
|
261
265
|
})
|
|
262
266
|
])
|
|
263
|
-
], !0) :
|
|
264
|
-
u(
|
|
265
|
-
d(t(
|
|
267
|
+
], !0) : r("", !0),
|
|
268
|
+
u(n.$slots, "inline-search", {}, () => [
|
|
269
|
+
d(t(Le), {
|
|
266
270
|
modelValue: t(C),
|
|
267
271
|
"onUpdate:modelValue": [
|
|
268
|
-
i[4] || (i[4] = (
|
|
272
|
+
i[4] || (i[4] = (l) => Ie(C) ? C.value = l : null),
|
|
269
273
|
e.onClearSearch
|
|
270
274
|
],
|
|
271
275
|
placeholder: e.inlineSearchPlaceholder,
|
|
@@ -276,8 +280,8 @@ const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze
|
|
|
276
280
|
onKeydown: t(I)
|
|
277
281
|
}, null, 8, ["modelValue", "placeholder", "auto-focus", "test-id", "onUpdate:modelValue", "onKeydown"])
|
|
278
282
|
], !0)
|
|
279
|
-
])) :
|
|
280
|
-
u(
|
|
283
|
+
])) : r("", !0),
|
|
284
|
+
u(n.$slots, "input-list", { open: t(y) }, void 0, !0),
|
|
281
285
|
f("div", m({
|
|
282
286
|
class: ["list-container", { "list-container--multi": e.multi }],
|
|
283
287
|
style: { height: `${t(ee)}rem` }
|
|
@@ -285,7 +289,7 @@ const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze
|
|
|
285
289
|
...t(_),
|
|
286
290
|
...t(g)[t(p).LIST_CONTAINER]
|
|
287
291
|
}), [
|
|
288
|
-
u(
|
|
292
|
+
u(n.$slots, "custom-list-area", {}, void 0, !0),
|
|
289
293
|
f("ul", m(t(te), {
|
|
290
294
|
role: "listbox",
|
|
291
295
|
class: ["list", {
|
|
@@ -293,66 +297,66 @@ const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze
|
|
|
293
297
|
"list--with-conditions": e.withConditions
|
|
294
298
|
}]
|
|
295
299
|
}), [
|
|
296
|
-
!t(oe).length && !e.loading && !e.withConditions ? (a(),
|
|
300
|
+
!t(oe).length && !e.loading && !e.withConditions ? (a(), s("li", Ue, [
|
|
297
301
|
d(t(Q), m({ variant: "body2" }, t(g)[t(p).NO_RESULT]), {
|
|
298
302
|
default: c(() => [
|
|
299
|
-
|
|
303
|
+
k(q(e.noResultsText), 1)
|
|
300
304
|
]),
|
|
301
305
|
_: 1
|
|
302
306
|
}, 16)
|
|
303
|
-
])) :
|
|
304
|
-
e.showSelectAll !== !1 && e.multi && !t(C) && !e.loading && e.options.length && !(e.minSelections || e.maxSelections) ? u(
|
|
307
|
+
])) : r("", !0),
|
|
308
|
+
e.showSelectAll !== !1 && e.multi && !t(C) && !e.loading && e.options.length && !(e.minSelections || e.maxSelections) ? u(n.$slots, "select-all", { key: 1 }, () => [
|
|
305
309
|
f("li", null, [
|
|
306
310
|
d(t(J), m(
|
|
307
311
|
{
|
|
308
312
|
"aria-selected": t($),
|
|
309
313
|
"aria-disabled": !!e.disabled,
|
|
310
314
|
"selected-prop": t($),
|
|
311
|
-
"is-indeterminate": t(
|
|
315
|
+
"is-indeterminate": t(ne),
|
|
312
316
|
"is-multi": e.multi,
|
|
313
317
|
"select-all-option": ""
|
|
314
318
|
},
|
|
315
319
|
t(g)[t(p).SELECT_ALL],
|
|
316
320
|
{
|
|
317
|
-
onClick: i[5] || (i[5] = j((
|
|
321
|
+
onClick: i[5] || (i[5] = j((l) => t(le)(), ["stop"]))
|
|
318
322
|
}
|
|
319
323
|
), {
|
|
320
324
|
default: c(() => [
|
|
321
|
-
|
|
325
|
+
k(" Select all ")
|
|
322
326
|
]),
|
|
323
327
|
_: 1
|
|
324
328
|
}, 16, ["aria-selected", "aria-disabled", "selected-prop", "is-indeterminate", "is-multi"])
|
|
325
329
|
])
|
|
326
|
-
], !0) :
|
|
327
|
-
t(M).length && !e.loading ? (a(!0),
|
|
328
|
-
key:
|
|
329
|
-
"aria-selected": t(
|
|
330
|
+
], !0) : r("", !0),
|
|
331
|
+
t(M).length && !e.loading ? (a(!0), s(Se, { key: 2 }, ve(t(M), ({ data: l, index: h }) => (a(), s("li", {
|
|
332
|
+
key: h,
|
|
333
|
+
"aria-selected": t(A)(S(t(T)), l),
|
|
330
334
|
"aria-disabled": !!e.disabled,
|
|
331
335
|
onClick: j(
|
|
332
|
-
() => !
|
|
336
|
+
() => !O(l) && t(R)(l, h),
|
|
333
337
|
["stop"]
|
|
334
338
|
)
|
|
335
339
|
}, [
|
|
336
|
-
e.groupedOptions && t(fe)(
|
|
337
|
-
d(
|
|
340
|
+
e.groupedOptions && t(fe)(l) ? u(n.$slots, "group-option", { key: 0 }, () => [
|
|
341
|
+
d(De, null, {
|
|
338
342
|
default: c(() => [
|
|
339
|
-
|
|
343
|
+
k(q(e.displayValue(l) || l[e.optionNameKey]), 1)
|
|
340
344
|
]),
|
|
341
345
|
_: 2
|
|
342
346
|
}, 1024)
|
|
343
|
-
], !0) : u(
|
|
347
|
+
], !0) : u(n.$slots, "default", {
|
|
344
348
|
key: 1,
|
|
345
|
-
option:
|
|
346
|
-
index:
|
|
347
|
-
selected: t(
|
|
348
|
-
active: S(t(z)) ===
|
|
349
|
-
disabled:
|
|
349
|
+
option: l,
|
|
350
|
+
index: h,
|
|
351
|
+
selected: t(A)(S(t(T)), l),
|
|
352
|
+
active: S(t(z)) === h,
|
|
353
|
+
disabled: O(l)
|
|
350
354
|
}, () => [
|
|
351
355
|
d(t(J), {
|
|
352
|
-
option:
|
|
353
|
-
"selected-prop": t(
|
|
354
|
-
active: S(t(z)) ===
|
|
355
|
-
disabled:
|
|
356
|
+
option: l,
|
|
357
|
+
"selected-prop": t(A)(t(T), l),
|
|
358
|
+
active: S(t(z)) === h,
|
|
359
|
+
disabled: O(l),
|
|
356
360
|
"name-key": e.optionNameKey,
|
|
357
361
|
"image-key": e.optionImageKey,
|
|
358
362
|
"icon-key": e.optionIconKey,
|
|
@@ -368,27 +372,27 @@ const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze
|
|
|
368
372
|
"is-multi": e.multi,
|
|
369
373
|
"min-max-selection-tooltip-message": t(X)?.tooltipMessage
|
|
370
374
|
}, Ce({ _: 2 }, [
|
|
371
|
-
|
|
375
|
+
n.$slots["option-end"] ? {
|
|
372
376
|
name: "option-end",
|
|
373
377
|
fn: c(({ option: b }) => [
|
|
374
|
-
u(
|
|
378
|
+
u(n.$slots, "option-end", { option: b }, void 0, !0)
|
|
375
379
|
]),
|
|
376
380
|
key: "0"
|
|
377
381
|
} : void 0
|
|
378
382
|
]), 1032, ["option", "selected-prop", "active", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type", "end-text-icon-key", "option-flag-key", "warning-key", "option-two-lines-variant", "option-two-lines-key", "tooltip-placement", "is-multi", "min-max-selection-tooltip-message"])
|
|
379
383
|
], !0)
|
|
380
|
-
], 8, Ye))), 128)) :
|
|
381
|
-
e.loading || e.loadMoreLoading ? (a(),
|
|
384
|
+
], 8, Ye))), 128)) : r("", !0),
|
|
385
|
+
e.loading || e.loadMoreLoading ? (a(), s("li", Xe, [
|
|
382
386
|
d(t(K), { round: "" }),
|
|
383
387
|
d(t(K), { round: "" }),
|
|
384
388
|
d(t(K), { round: "" }),
|
|
385
389
|
d(t(K), { round: "" })
|
|
386
|
-
])) :
|
|
390
|
+
])) : r("", !0)
|
|
387
391
|
], 16)
|
|
388
392
|
], 16),
|
|
389
|
-
e.multi ? (a(),
|
|
393
|
+
e.multi ? (a(), s("div", qe, [
|
|
390
394
|
f("div", je, [
|
|
391
|
-
e.showClearAll ? (a(), F(t(
|
|
395
|
+
e.showClearAll ? (a(), F(t(P), m(
|
|
392
396
|
{
|
|
393
397
|
key: 0,
|
|
394
398
|
ref_key: "clearAll",
|
|
@@ -403,13 +407,13 @@ const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze
|
|
|
403
407
|
}
|
|
404
408
|
), {
|
|
405
409
|
default: c(() => [
|
|
406
|
-
|
|
410
|
+
k(" Clear all ")
|
|
407
411
|
]),
|
|
408
412
|
_: 1
|
|
409
|
-
}, 16)) :
|
|
413
|
+
}, 16)) : r("", !0)
|
|
410
414
|
]),
|
|
411
415
|
f("div", Je, [
|
|
412
|
-
d(t(
|
|
416
|
+
d(t(P), m(
|
|
413
417
|
{
|
|
414
418
|
ref_key: "cancel",
|
|
415
419
|
ref: ce,
|
|
@@ -421,11 +425,11 @@ const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze
|
|
|
421
425
|
{ onClick: t(ae) }
|
|
422
426
|
), {
|
|
423
427
|
default: c(() => [
|
|
424
|
-
|
|
428
|
+
k(" Cancel ")
|
|
425
429
|
]),
|
|
426
430
|
_: 1
|
|
427
431
|
}, 16, ["onClick"]),
|
|
428
|
-
d(t(
|
|
432
|
+
d(t(P), m({
|
|
429
433
|
ref_key: "apply",
|
|
430
434
|
ref: ue,
|
|
431
435
|
"data-testid": "mutli-apply",
|
|
@@ -433,24 +437,24 @@ const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze
|
|
|
433
437
|
class: "apply-button"
|
|
434
438
|
}, t(g)[t(p).ACTION_APPLY], { onClick: t(de) }), {
|
|
435
439
|
default: c(() => [
|
|
436
|
-
|
|
440
|
+
k(" Apply ")
|
|
437
441
|
]),
|
|
438
442
|
_: 1
|
|
439
443
|
}, 16, ["onClick"])
|
|
440
444
|
])
|
|
441
|
-
])) :
|
|
442
|
-
|
|
443
|
-
u(
|
|
444
|
-
])) :
|
|
445
|
-
], 34)) :
|
|
446
|
-
], 6)) :
|
|
445
|
+
])) : r("", !0),
|
|
446
|
+
n.$slots.footer ? (a(), s("div", Qe, [
|
|
447
|
+
u(n.$slots, "footer", {}, void 0, !0)
|
|
448
|
+
])) : r("", !0)
|
|
449
|
+
], 34)) : r("", !0)
|
|
450
|
+
], 6)) : r("", !0)
|
|
447
451
|
]),
|
|
448
452
|
_: 3
|
|
449
453
|
})
|
|
450
454
|
]),
|
|
451
455
|
default: c(() => [
|
|
452
456
|
f("div", {
|
|
453
|
-
class:
|
|
457
|
+
class: B(["button__container", {
|
|
454
458
|
"button__container--open": !!t(y),
|
|
455
459
|
[`button__container--${e.size}`]: !0,
|
|
456
460
|
"button__container--disabled": e.disabled
|
|
@@ -460,7 +464,7 @@ const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze
|
|
|
460
464
|
ref_key: "buttonRef",
|
|
461
465
|
ref: W
|
|
462
466
|
}, [
|
|
463
|
-
u(
|
|
467
|
+
u(n.$slots, "dropdown-trigger", {
|
|
464
468
|
buttonTriggerProps: {
|
|
465
469
|
open: t(y),
|
|
466
470
|
disabled: e.disabled,
|
|
@@ -477,7 +481,7 @@ const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze
|
|
|
477
481
|
testId: e.testId,
|
|
478
482
|
multi: e.multi,
|
|
479
483
|
disabled: e.disabled,
|
|
480
|
-
selectedOption: e.multi ? t(
|
|
484
|
+
selectedOption: e.multi ? t(x) : t(T),
|
|
481
485
|
displayValue: e.displayValue,
|
|
482
486
|
options: e.options,
|
|
483
487
|
optionNameKey: e.optionNameKey,
|
|
@@ -493,12 +497,15 @@ const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze
|
|
|
493
497
|
statusDotType: e.statusType,
|
|
494
498
|
size: e.size,
|
|
495
499
|
showAllSelectedText: e.triggerShowAllSelectedText,
|
|
496
|
-
allSelected: t(
|
|
497
|
-
|
|
500
|
+
allSelected: t(E),
|
|
501
|
+
inlineError: e.inlineError,
|
|
502
|
+
inlineErrorText: e.inlineErrorText,
|
|
503
|
+
inlineErrorTextPlacement: e.inlineErrorTextPlacement,
|
|
504
|
+
onKeydown: t(D),
|
|
498
505
|
onClick: Y
|
|
499
506
|
}
|
|
500
507
|
}, () => [
|
|
501
|
-
t(H) ? (a(),
|
|
508
|
+
t(H) ? (a(), s("div", Re, [
|
|
502
509
|
(a(), F(Ke(t(H)), {
|
|
503
510
|
placeholder: e.placeholder,
|
|
504
511
|
open: t(y),
|
|
@@ -508,7 +515,7 @@ const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze
|
|
|
508
515
|
"test-id": e.testId,
|
|
509
516
|
multi: e.multi,
|
|
510
517
|
disabled: e.disabled,
|
|
511
|
-
"selected-option": e.multi ? t(
|
|
518
|
+
"selected-option": e.multi ? t(x) : t(T),
|
|
512
519
|
"display-value": e.displayValue,
|
|
513
520
|
options: e.options,
|
|
514
521
|
"option-name-key": e.optionNameKey,
|
|
@@ -524,46 +531,49 @@ const $e = ["tabindex"], Me = { style: { width: "100%" } }, Re = { key: 0 }, ze
|
|
|
524
531
|
"status-dot-type": e.statusType,
|
|
525
532
|
size: e.size,
|
|
526
533
|
"show-all-selected-text": e.triggerShowAllSelectedText,
|
|
527
|
-
"all-selected": t(
|
|
528
|
-
|
|
534
|
+
"all-selected": t(E),
|
|
535
|
+
"inline-error": e.inlineError,
|
|
536
|
+
"inline-error-text": e.inlineErrorText,
|
|
537
|
+
"inline-error-text-placement": e.inlineErrorTextPlacement,
|
|
538
|
+
onKeydown: t(D),
|
|
529
539
|
onClick: Y,
|
|
530
|
-
onCopyToClipboard: i[0] || (i[0] = (
|
|
531
|
-
}, null, 40, ["placeholder", "open", "label", "show-feedback-icon", "mandatory", "test-id", "multi", "disabled", "selected-option", "display-value", "options", "option-name-key", "option-image-key", "option-icon-key", "option-icon-type", "option-end-icon-key", "option-end-icon-type", "options-end-text-icon-key", "option-flag-key", "feedback-variant", "value-to-copy", "status-dot-type", "size", "show-all-selected-text", "all-selected", "onKeydown"]))
|
|
532
|
-
])) :
|
|
533
|
-
e.predefinedTrigger === t(
|
|
534
|
-
d(t(
|
|
535
|
-
onClick: i[1] || (i[1] = (
|
|
540
|
+
onCopyToClipboard: i[0] || (i[0] = (l) => N("copyToClipboard"))
|
|
541
|
+
}, null, 40, ["placeholder", "open", "label", "show-feedback-icon", "mandatory", "test-id", "multi", "disabled", "selected-option", "display-value", "options", "option-name-key", "option-image-key", "option-icon-key", "option-icon-type", "option-end-icon-key", "option-end-icon-type", "options-end-text-icon-key", "option-flag-key", "feedback-variant", "value-to-copy", "status-dot-type", "size", "show-all-selected-text", "all-selected", "inline-error", "inline-error-text", "inline-error-text-placement", "onKeydown"]))
|
|
542
|
+
])) : r("", !0),
|
|
543
|
+
e.predefinedTrigger === t(w).ICON_BUTTON ? (a(), s("div", ze, [
|
|
544
|
+
d(t(Ae), {
|
|
545
|
+
onClick: i[1] || (i[1] = (l) => t(v)())
|
|
536
546
|
})
|
|
537
|
-
])) :
|
|
538
|
-
e.predefinedTrigger === t(
|
|
539
|
-
d(t(
|
|
547
|
+
])) : r("", !0),
|
|
548
|
+
e.predefinedTrigger === t(w).CHIP ? (a(), s("div", We, [
|
|
549
|
+
d(t(xe), {
|
|
540
550
|
open: t(y),
|
|
541
551
|
label: e.placeholder,
|
|
542
552
|
"test-id": e.testId,
|
|
543
553
|
options: e.options,
|
|
544
|
-
"selected-option": e.multi ? t(
|
|
554
|
+
"selected-option": e.multi ? t(x) : t(T),
|
|
545
555
|
"display-value": e.displayValue,
|
|
546
556
|
multi: e.multi,
|
|
547
|
-
"all-selected": t(
|
|
557
|
+
"all-selected": t(E),
|
|
548
558
|
"shown-values-count": e.triggerShownValuesCount,
|
|
549
|
-
onClick: i[2] || (i[2] = (
|
|
550
|
-
onClear: i[3] || (i[3] = (
|
|
559
|
+
onClick: i[2] || (i[2] = (l) => t(v)()),
|
|
560
|
+
onClear: i[3] || (i[3] = (l) => t(G)())
|
|
551
561
|
}, null, 8, ["open", "label", "test-id", "options", "selected-option", "display-value", "multi", "all-selected", "shown-values-count"])
|
|
552
|
-
])) :
|
|
562
|
+
])) : r("", !0)
|
|
553
563
|
], !0)
|
|
554
564
|
], 512)
|
|
555
565
|
], 2)
|
|
556
566
|
]),
|
|
557
567
|
_: 3
|
|
558
568
|
}, 16, ["theme", "popper-class", "placement", "skidding", "distance", "flip", "shown", "container", "auto-size"]),
|
|
559
|
-
e.triggerFeedbackText ? (a(), F(
|
|
569
|
+
e.triggerFeedbackText ? (a(), F(Ve, {
|
|
560
570
|
key: 0,
|
|
561
571
|
text: e.triggerFeedbackText,
|
|
562
572
|
variant: e.triggerFeedbackVariant,
|
|
563
573
|
"show-icon": e.triggerFeedbackShowIcon,
|
|
564
574
|
"test-id": e.testId,
|
|
565
575
|
class: "dropdown-field-help-text"
|
|
566
|
-
}, null, 8, ["text", "variant", "show-icon", "test-id"])) :
|
|
576
|
+
}, null, 8, ["text", "variant", "show-icon", "test-id"])) : r("", !0)
|
|
567
577
|
])
|
|
568
578
|
], 16, $e));
|
|
569
579
|
}
|
|
@@ -115,6 +115,17 @@ export declare const dropDownStoryArgs: {
|
|
|
115
115
|
};
|
|
116
116
|
description: string;
|
|
117
117
|
};
|
|
118
|
+
inlineError: {
|
|
119
|
+
control: {
|
|
120
|
+
type: string;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
inlineErrorText: {
|
|
124
|
+
type: string;
|
|
125
|
+
};
|
|
126
|
+
inlineErrorTextPlacement: {
|
|
127
|
+
options: readonly ["auto", "auto-start", "auto-end", "top", "top-start", "top-end", "right", "right-start", "right-end", "bottom", "bottom-start", "bottom-end", "left", "left-start", "left-end"];
|
|
128
|
+
};
|
|
118
129
|
isOnTop: {
|
|
119
130
|
control: {
|
|
120
131
|
type: string;
|