@adyen/bento-vue2 1.98.0 → 1.99.0
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/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/navigation-menu-group.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/summary-grid.css +1 -1
- package/dist/chunks/{calendar.B0GnBaAW.js → calendar.CmhzIZZM.js} +2 -2
- package/dist/chunks/{calendar.B0GnBaAW.js.map → calendar.CmhzIZZM.js.map} +1 -1
- package/dist/chunks/{code-snippet.CpHbw0xj.js → code-snippet.DuJAubi9.js} +2 -2
- package/dist/chunks/{code-snippet.CpHbw0xj.js.map → code-snippet.DuJAubi9.js.map} +1 -1
- package/dist/chunks/{data-grid.BRziyZ43.js → data-grid.D_Xu49bl.js} +5 -5
- package/dist/chunks/{data-grid.BRziyZ43.js.map → data-grid.D_Xu49bl.js.map} +1 -1
- package/dist/chunks/{date-picker.CCJtLnE4.js → date-picker.bbVKo7JX.js} +5 -5
- package/dist/chunks/{date-picker.CCJtLnE4.js.map → date-picker.bbVKo7JX.js.map} +1 -1
- package/dist/chunks/{date-range-picker.B2u5vm8m.js → date-range-picker.AnFyWMCq.js} +6 -6
- package/dist/chunks/{date-range-picker.B2u5vm8m.js.map → date-range-picker.AnFyWMCq.js.map} +1 -1
- package/dist/chunks/date-time-picker.Bpxfkj71.js +195 -0
- package/dist/chunks/{date-time-picker.CP-IrUwY.js.map → date-time-picker.Bpxfkj71.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.LIt7SdwS.js → dropdown-tag.VcqAOFuG.js} +2 -2
- package/dist/chunks/{dropdown-tag.LIt7SdwS.js.map → dropdown-tag.VcqAOFuG.js.map} +1 -1
- package/dist/chunks/{dropdown.NTGSuWAw.js → dropdown.B21PZqp4.js} +548 -544
- package/dist/chunks/dropdown.B21PZqp4.js.map +1 -0
- package/dist/chunks/{filter-bar.CftgpM7Z.js → filter-bar.CY9xbtNy.js} +425 -418
- package/dist/chunks/filter-bar.CY9xbtNy.js.map +1 -0
- package/dist/chunks/{header-with-views.UmWf3dQd.js → header-with-views.BQEJxWz0.js} +3 -3
- package/dist/chunks/{header-with-views.UmWf3dQd.js.map → header-with-views.BQEJxWz0.js.map} +1 -1
- package/dist/chunks/{input-field-password.bhLfqs6p.js → input-field-password.WBxRJUhP.js} +2 -2
- package/dist/chunks/{input-field-password.bhLfqs6p.js.map → input-field-password.WBxRJUhP.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.cAROnxRW.js → input-field-phone-number.DR6dpYYz.js} +2 -2
- package/dist/chunks/{input-field-phone-number.cAROnxRW.js.map → input-field-phone-number.DR6dpYYz.js.map} +1 -1
- package/dist/chunks/{input-field.BgVjWpiF.js → input-field.y5qXcCAH.js} +2 -2
- package/dist/chunks/{input-field.BgVjWpiF.js.map → input-field.y5qXcCAH.js.map} +1 -1
- package/dist/chunks/{input-time.C5qQ6S8d.js → input-time.DrJ3n7Cc.js} +3 -3
- package/dist/chunks/{input-time.C5qQ6S8d.js.map → input-time.DrJ3n7Cc.js.map} +1 -1
- package/dist/chunks/{list-item.BxQkbnLZ.js → list-item.BO75rSht.js} +50 -23
- package/dist/chunks/{list-item.BxQkbnLZ.js.map → list-item.BO75rSht.js.map} +1 -1
- package/dist/chunks/{pagination.BzLKzijQ.js → pagination.CxW1zuWi.js} +2 -2
- package/dist/chunks/{pagination.BzLKzijQ.js.map → pagination.CxW1zuWi.js.map} +1 -1
- package/dist/chunks/{search-bar.Be3RlmLA.js → search-bar.nRiF5eNx.js} +3 -3
- package/dist/chunks/{search-bar.Be3RlmLA.js.map → search-bar.nRiF5eNx.js.map} +1 -1
- package/dist/chunks/{secondary-nav.Cy4ap53E.js → secondary-nav.BlI1PBNr.js} +2 -2
- package/dist/chunks/{secondary-nav.Cy4ap53E.js.map → secondary-nav.BlI1PBNr.js.map} +1 -1
- package/dist/chunks/{use-date-input-formatter.BMciZYTp.js → use-date-input-formatter.DhduXYC3.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.BMciZYTp.js.map → use-date-input-formatter.DhduXYC3.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/date-time-picker.js +1 -1
- package/dist/dropdown.js +2 -2
- package/dist/filter-bar.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/index.js +18 -18
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/input-time.js +1 -1
- package/dist/internal.js +2 -2
- package/dist/list.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/web-types.json +14 -1
- package/package.json +3 -2
- package/dist/chunks/date-time-picker.CP-IrUwY.js +0 -177
- package/dist/chunks/dropdown.NTGSuWAw.js.map +0 -1
- package/dist/chunks/filter-bar.CftgpM7Z.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { computed as n, ref as
|
|
1
|
+
import { computed as n, ref as I, onMounted as ut, onUnmounted as pt, watch as te, defineComponent as U, nextTick as j, toRef as W, useSlots as Oe, useAttrs as Ve, toRefs as Qe, inject as ze } from "vue";
|
|
2
2
|
import { B as ie, d as $e } from "./typography.C8lPlsbD.js";
|
|
3
3
|
import { g as ne } from "./generate-uid.NJ8tVoha.js";
|
|
4
|
-
import { u as
|
|
4
|
+
import { u as pe } from "./index.B6WW_F-J.js";
|
|
5
|
+
import { s as ue } from "./events.BQOQSSb7.js";
|
|
5
6
|
import { u as et } from "./use-has-slot.C9lQZ6nz.js";
|
|
6
7
|
import { C as ft } from "./cross-circle-fill.DTDtgLMf.js";
|
|
7
8
|
import { C as bt } from "./cross-circle-fill-small.DfxDedRr.js";
|
|
8
|
-
import { n as
|
|
9
|
-
import { s as ye } from "./events.BQOQSSb7.js";
|
|
9
|
+
import { n as K } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
10
10
|
import { C as tt } from "./chevron-down.eYtgv5ly.js";
|
|
11
11
|
import { C as lt } from "./chevron-up.d8cwIlA_.js";
|
|
12
12
|
/* empty css */
|
|
@@ -46,58 +46,58 @@ const at = (a, e, l, t) => {
|
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
48
|
function At(a, { disabled: e, itemHeight: l, overscan: t = 5, prefixHeight: s }) {
|
|
49
|
-
const o =
|
|
49
|
+
const o = I(null), i = I([]), r = I(0), v = I(0), u = I(0);
|
|
50
50
|
let c;
|
|
51
|
-
const
|
|
52
|
-
const b = typeof l == "number" ? a.value.length * l : a.value.reduce((T,
|
|
51
|
+
const _ = n(() => {
|
|
52
|
+
const b = typeof l == "number" ? a.value.length * l : a.value.reduce((T, L, w) => T + l(w), 0), O = typeof l == "number" ? r.value * l : a.value.slice(0, r.value).reduce((T, L, w) => T + l(w), 0);
|
|
53
53
|
return {
|
|
54
54
|
style: {
|
|
55
|
-
marginTop: `${
|
|
56
|
-
height: `${b -
|
|
55
|
+
marginTop: `${O}px`,
|
|
56
|
+
height: `${b - O}px`
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
|
-
}),
|
|
60
|
-
const b = (s == null ? void 0 : s.value) ?? 0,
|
|
59
|
+
}), f = () => {
|
|
60
|
+
const b = (s == null ? void 0 : s.value) ?? 0, O = Math.max(o.value.scrollTop - b, 0);
|
|
61
61
|
if (typeof l == "number")
|
|
62
|
-
return Math.floor(
|
|
63
|
-
let T = 0,
|
|
62
|
+
return Math.floor(O / l);
|
|
63
|
+
let T = 0, L = 0;
|
|
64
64
|
for (let w = 0; w < a.value.length; w += 1) {
|
|
65
65
|
const N = l(w);
|
|
66
|
-
if (T += N, T >=
|
|
67
|
-
|
|
66
|
+
if (T += N, T >= O) {
|
|
67
|
+
L = w;
|
|
68
68
|
break;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
return
|
|
72
|
-
},
|
|
73
|
-
if (
|
|
74
|
-
return Math.ceil(
|
|
71
|
+
return L;
|
|
72
|
+
}, p = () => {
|
|
73
|
+
if (u.value = o.value.clientHeight, typeof l == "number")
|
|
74
|
+
return Math.ceil(u.value / l);
|
|
75
75
|
const b = r.value ?? 0;
|
|
76
|
-
let
|
|
77
|
-
for (let
|
|
78
|
-
const w = l(
|
|
79
|
-
if (
|
|
76
|
+
let O = 0, T = 0;
|
|
77
|
+
for (let L = b; L < a.value.length; L += 1) {
|
|
78
|
+
const w = l(L);
|
|
79
|
+
if (O += w, T = L, O > u.value)
|
|
80
80
|
break;
|
|
81
81
|
}
|
|
82
82
|
return T - b;
|
|
83
|
-
},
|
|
83
|
+
}, S = () => {
|
|
84
84
|
if (o.value) {
|
|
85
|
-
const b =
|
|
86
|
-
r.value =
|
|
85
|
+
const b = p();
|
|
86
|
+
r.value = f(), v.value = Math.min(r.value + b + t, a.value.length), i.value = a.value.slice(r.value, v.value);
|
|
87
87
|
}
|
|
88
|
-
},
|
|
89
|
-
|
|
88
|
+
}, m = () => {
|
|
89
|
+
S();
|
|
90
90
|
};
|
|
91
|
-
e || (
|
|
92
|
-
o.value && (
|
|
93
|
-
|
|
94
|
-
}),
|
|
91
|
+
e || (ut(() => {
|
|
92
|
+
o.value && (u.value = o.value.clientHeight, c = ht(o.value, ({ clientHeight: b }) => {
|
|
93
|
+
u.value = b, S();
|
|
94
|
+
}), S());
|
|
95
95
|
}), pt(() => {
|
|
96
96
|
c == null || c.disconnect();
|
|
97
97
|
}), te(
|
|
98
98
|
() => a.value,
|
|
99
99
|
() => {
|
|
100
|
-
|
|
100
|
+
S();
|
|
101
101
|
}
|
|
102
102
|
));
|
|
103
103
|
const k = {
|
|
@@ -106,8 +106,8 @@ function At(a, { disabled: e, itemHeight: l, overscan: t = 5, prefixHeight: s })
|
|
|
106
106
|
}, B = (b) => {
|
|
107
107
|
if (!o.value)
|
|
108
108
|
return;
|
|
109
|
-
const
|
|
110
|
-
|
|
109
|
+
const O = typeof l == "number" ? b * l : a.value.slice(0, b).reduce((h, g, R) => h + l(R), 0), T = typeof l == "number" ? l : l(b), L = O + T, { scrollTop: w, clientHeight: N } = o.value, A = w + N;
|
|
110
|
+
L > A ? o.value.scrollTop = N > 0 ? L - N : O : O < w && (o.value.scrollTop = O), S();
|
|
111
111
|
};
|
|
112
112
|
return e ? {
|
|
113
113
|
containerRef: o,
|
|
@@ -119,18 +119,18 @@ function At(a, { disabled: e, itemHeight: l, overscan: t = 5, prefixHeight: s })
|
|
|
119
119
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
120
120
|
scrollToIndex: () => {
|
|
121
121
|
},
|
|
122
|
-
startIndex:
|
|
122
|
+
startIndex: I(0)
|
|
123
123
|
} : {
|
|
124
124
|
containerRef: o,
|
|
125
125
|
containerProps: k,
|
|
126
|
-
onScroll:
|
|
126
|
+
onScroll: m,
|
|
127
127
|
list: i,
|
|
128
|
-
wrapperProps:
|
|
128
|
+
wrapperProps: _,
|
|
129
129
|
scrollToIndex: B,
|
|
130
130
|
startIndex: r
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
|
-
var
|
|
133
|
+
var d = /* @__PURE__ */ ((a) => (a.SELECT = "select", a.SHOW_MORE = "show-more", a.ESCAPE = "escape-pressed", a.CLICK = "click", a.ENTER = "enter-pressed", a.SPACE = "space-pressed", a.TAB = "tab-pressed", a.CLOSE_DROPDOWN = "close-dropdown", a))(d || {}), oe = /* @__PURE__ */ ((a) => (a.AUTOMATIC = "automatic", a.BUTTON = "button", a.NONE = "none", a))(oe || {});
|
|
134
134
|
const Dt = U({
|
|
135
135
|
name: "bento-listbox-static-category",
|
|
136
136
|
components: {
|
|
@@ -149,7 +149,7 @@ const Dt = U({
|
|
|
149
149
|
var kt = function() {
|
|
150
150
|
var e = this, l = e._self._c;
|
|
151
151
|
return e._self._setupProxy, l("div", { staticClass: "b-listbox-single-select-category", attrs: { role: "group", "aria-label": e.categoryLabel } }, [l("bento-typography", { staticClass: "b-listbox-single-select-category__label-text", attrs: { variant: "caption", el: "span", "aria-hidden": "true" } }, [e._v(" " + e._s(e.categoryLabel) + " ")]), l("div", [e._t("default")], 2)], 1);
|
|
152
|
-
}, Bt = [], Rt = /* @__PURE__ */
|
|
152
|
+
}, Bt = [], Rt = /* @__PURE__ */ K(
|
|
153
153
|
Dt,
|
|
154
154
|
kt,
|
|
155
155
|
Bt,
|
|
@@ -169,7 +169,7 @@ const Mt = Rt.exports, Nt = U({
|
|
|
169
169
|
*/
|
|
170
170
|
selected: { type: Boolean, default: !1 }
|
|
171
171
|
},
|
|
172
|
-
emits: [
|
|
172
|
+
emits: [d.CLICK, d.ENTER, d.SPACE, d.TAB],
|
|
173
173
|
setup(a, { emit: e }) {
|
|
174
174
|
const l = n(() => ({
|
|
175
175
|
"b-listbox-option--disabled": a.disabled,
|
|
@@ -178,12 +178,12 @@ const Mt = Rt.exports, Nt = U({
|
|
|
178
178
|
return {
|
|
179
179
|
// Enums
|
|
180
180
|
BentoKeyboardNavigationKeyDownEvent: z,
|
|
181
|
-
BentoListboxEvent:
|
|
181
|
+
BentoListboxEvent: d,
|
|
182
182
|
// Values
|
|
183
183
|
conditionalClasses: l,
|
|
184
184
|
// Events
|
|
185
185
|
onClick: (o) => {
|
|
186
|
-
e(
|
|
186
|
+
e(d.CLICK, o);
|
|
187
187
|
},
|
|
188
188
|
onOptionSelected: (o, i) => {
|
|
189
189
|
e(o, i);
|
|
@@ -200,15 +200,15 @@ var $t = function() {
|
|
|
200
200
|
}, function(t) {
|
|
201
201
|
return !t.type.indexOf("key") && e._k(t.keyCode, "tab", 9, t.key, "Tab") ? null : e.onOptionSelected(e.BentoListboxEvent.TAB, t);
|
|
202
202
|
}] } }, "div", e.$attrs, !1), [e._t("default")], 2);
|
|
203
|
-
},
|
|
203
|
+
}, Pt = [], Ft = /* @__PURE__ */ K(
|
|
204
204
|
Nt,
|
|
205
205
|
$t,
|
|
206
|
-
|
|
206
|
+
Pt,
|
|
207
207
|
!1,
|
|
208
208
|
null,
|
|
209
209
|
"c345b6c0"
|
|
210
210
|
);
|
|
211
|
-
const Be =
|
|
211
|
+
const Be = Ft.exports;
|
|
212
212
|
let je = 0;
|
|
213
213
|
const Vt = {
|
|
214
214
|
beforeCreate() {
|
|
@@ -218,7 +218,7 @@ const Vt = {
|
|
|
218
218
|
var zt = function() {
|
|
219
219
|
var e = this, l = e._self._c;
|
|
220
220
|
return l("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? l("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), l("path", { attrs: { fill: "#001222", d: "M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z" } })]);
|
|
221
|
-
}, Ut = [], Gt = /* @__PURE__ */
|
|
221
|
+
}, Ut = [], Gt = /* @__PURE__ */ K(
|
|
222
222
|
Vt,
|
|
223
223
|
zt,
|
|
224
224
|
Ut,
|
|
@@ -251,7 +251,7 @@ const Kt = Gt.exports, qt = U({
|
|
|
251
251
|
*/
|
|
252
252
|
selected: { type: Boolean, default: !1 }
|
|
253
253
|
},
|
|
254
|
-
emits: [
|
|
254
|
+
emits: [d.ENTER, d.SELECT, d.SPACE, d.TAB],
|
|
255
255
|
setup(a, { emit: e }) {
|
|
256
256
|
const l = (i) => {
|
|
257
257
|
a.disabled || e(i, a.option);
|
|
@@ -262,7 +262,7 @@ const Kt = Gt.exports, qt = U({
|
|
|
262
262
|
ariaSelected: s,
|
|
263
263
|
tabIndex: o,
|
|
264
264
|
// Enums
|
|
265
|
-
BentoListboxEvent:
|
|
265
|
+
BentoListboxEvent: d,
|
|
266
266
|
// Events
|
|
267
267
|
onOptionSelected: l
|
|
268
268
|
};
|
|
@@ -281,7 +281,7 @@ var Yt = function() {
|
|
|
281
281
|
} } }, [e._t("default", function() {
|
|
282
282
|
return [l("span", { staticClass: "b-listbox-single-select-option__text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.option.label))]), e.option.description ? l("bento-typography", { staticClass: "b-listbox-single-select-option__description", attrs: { el: "span" } }, [e._v(" " + e._s(e.option.description) + " ")]) : e._e()], 1)];
|
|
283
283
|
}, null, e.option), l("span", { staticClass: "b-listbox-single-select-option__check-icon" }, [l("checkmark-icon", { directives: [{ name: "show", rawName: "v-show", value: e.selected, expression: "selected" }], attrs: { "svg-title": "selected" } })], 1)], 2);
|
|
284
|
-
}, Wt = [], jt = /* @__PURE__ */
|
|
284
|
+
}, Wt = [], jt = /* @__PURE__ */ K(
|
|
285
285
|
qt,
|
|
286
286
|
Yt,
|
|
287
287
|
Wt,
|
|
@@ -290,8 +290,8 @@ var Yt = function() {
|
|
|
290
290
|
"bb14d75a"
|
|
291
291
|
);
|
|
292
292
|
const Ht = jt.exports, st = ({ items: a, totalItemCount: e }, l) => {
|
|
293
|
-
const t = n(() => e != null && e.value ? e.value - 1 : a.value.length - 1), s =
|
|
294
|
-
switch (
|
|
293
|
+
const t = n(() => e != null && e.value ? e.value - 1 : a.value.length - 1), s = I(0), o = (p) => {
|
|
294
|
+
switch (p) {
|
|
295
295
|
case "increase":
|
|
296
296
|
s.value += 1;
|
|
297
297
|
break;
|
|
@@ -299,45 +299,45 @@ const Ht = jt.exports, st = ({ items: a, totalItemCount: e }, l) => {
|
|
|
299
299
|
s.value -= 1;
|
|
300
300
|
break;
|
|
301
301
|
}
|
|
302
|
-
}, i = ({ edgeCaseItem:
|
|
303
|
-
s.value !==
|
|
304
|
-
}, r = (
|
|
305
|
-
p
|
|
302
|
+
}, i = ({ edgeCaseItem: p }, S) => {
|
|
303
|
+
s.value !== p && (o(S), l(s.value));
|
|
304
|
+
}, r = (p) => {
|
|
305
|
+
f(p), i(
|
|
306
306
|
{
|
|
307
307
|
edgeCaseItem: t.value
|
|
308
308
|
},
|
|
309
309
|
"increase"
|
|
310
310
|
/* INCREASE */
|
|
311
311
|
);
|
|
312
|
-
}, v = (
|
|
313
|
-
p
|
|
312
|
+
}, v = (p) => {
|
|
313
|
+
f(p), i(
|
|
314
314
|
{
|
|
315
315
|
edgeCaseItem: 0
|
|
316
316
|
},
|
|
317
317
|
"decrease"
|
|
318
318
|
/* DECREASE */
|
|
319
319
|
);
|
|
320
|
-
},
|
|
321
|
-
s.value = 0, l(s.value);
|
|
322
|
-
}, c = () => {
|
|
323
|
-
s.value = t.value, l(s.value);
|
|
324
|
-
},
|
|
325
|
-
s.value =
|
|
326
|
-
},
|
|
327
|
-
var
|
|
328
|
-
(
|
|
320
|
+
}, u = (p) => {
|
|
321
|
+
f(p), s.value = 0, l(s.value);
|
|
322
|
+
}, c = (p) => {
|
|
323
|
+
f(p), s.value = t.value, l(s.value);
|
|
324
|
+
}, _ = (p) => {
|
|
325
|
+
s.value = p;
|
|
326
|
+
}, f = (p) => {
|
|
327
|
+
var S, m;
|
|
328
|
+
(S = p == null ? void 0 : p.detail) == null || S.preventDefault(), (m = p == null ? void 0 : p.detail) == null || m.stopPropagation();
|
|
329
329
|
};
|
|
330
330
|
return {
|
|
331
|
-
moveToFirstElement:
|
|
331
|
+
moveToFirstElement: u,
|
|
332
332
|
moveToLastElement: c,
|
|
333
333
|
moveToNextElement: r,
|
|
334
334
|
moveToPreviousElement: v,
|
|
335
|
-
setListboxFocusedIndex:
|
|
336
|
-
preventDefault:
|
|
335
|
+
setListboxFocusedIndex: _,
|
|
336
|
+
preventDefault: f,
|
|
337
337
|
focusedIndex: s
|
|
338
338
|
};
|
|
339
|
-
}, Ue = (a, e, l =
|
|
340
|
-
const s =
|
|
339
|
+
}, Ue = (a, e, l = I("option"), t = !0) => {
|
|
340
|
+
const s = I([]), o = async () => {
|
|
341
341
|
if (!a.value || a.value.nodeType === Node.COMMENT_NODE)
|
|
342
342
|
return;
|
|
343
343
|
const i = Array.from(a.value.querySelectorAll(`[role="${l.value}"]`));
|
|
@@ -346,7 +346,7 @@ const Ht = jt.exports, st = ({ items: a, totalItemCount: e }, l) => {
|
|
|
346
346
|
return te(
|
|
347
347
|
e,
|
|
348
348
|
() => {
|
|
349
|
-
|
|
349
|
+
j(() => {
|
|
350
350
|
o();
|
|
351
351
|
});
|
|
352
352
|
},
|
|
@@ -415,74 +415,74 @@ const Ht = jt.exports, st = ({ items: a, totalItemCount: e }, l) => {
|
|
|
415
415
|
*/
|
|
416
416
|
virtualScrollStartIndex: { type: Number, default: 0 }
|
|
417
417
|
},
|
|
418
|
-
emits: [
|
|
418
|
+
emits: [d.SELECT, d.ENTER, d.SPACE, d.TAB],
|
|
419
419
|
setup(a, { emit: e, expose: l, slots: t, attrs: s }) {
|
|
420
|
-
const o =
|
|
421
|
-
var
|
|
422
|
-
return !!((
|
|
420
|
+
const o = I(null), i = I([]), r = n(() => {
|
|
421
|
+
var h;
|
|
422
|
+
return !!((h = a.selectedValue) != null && h.length) && a.selectedValue.at(0);
|
|
423
423
|
}), v = n(
|
|
424
424
|
() => {
|
|
425
|
-
var
|
|
425
|
+
var h, g, R, G;
|
|
426
426
|
return {
|
|
427
|
-
"aria-label": (
|
|
428
|
-
"aria-busy": (
|
|
427
|
+
"aria-label": (h = s["aria-label"]) == null ? void 0 : h.toString(),
|
|
428
|
+
"aria-busy": (g = s["aria-busy"]) == null ? void 0 : g.toString(),
|
|
429
429
|
"aria-atomic": (R = s["aria-atomic"]) == null ? void 0 : R.toString(),
|
|
430
|
-
"aria-live": (
|
|
430
|
+
"aria-live": (G = s["aria-live"]) == null ? void 0 : G.toString()
|
|
431
431
|
};
|
|
432
432
|
}
|
|
433
|
-
),
|
|
434
|
-
e(
|
|
435
|
-
}, { visibleDomOptions:
|
|
433
|
+
), u = n(() => !!a.items.some(({ items: h }) => !!h)), c = (h) => (g) => {
|
|
434
|
+
e(h, [g]);
|
|
435
|
+
}, { visibleDomOptions: _, updateVisibleDomOptions: f } = Ue(
|
|
436
436
|
o,
|
|
437
|
-
|
|
438
|
-
|
|
437
|
+
W(a, "items"),
|
|
438
|
+
I("option"),
|
|
439
439
|
!1
|
|
440
|
-
),
|
|
441
|
-
if (!
|
|
440
|
+
), p = n(() => a.totalItemCount > 0), S = (h) => {
|
|
441
|
+
if (!p.value)
|
|
442
442
|
return;
|
|
443
|
-
const
|
|
444
|
-
if (
|
|
443
|
+
const g = h.target;
|
|
444
|
+
if (g === o.value || (g == null ? void 0 : g.getAttribute("role")) !== "option")
|
|
445
445
|
return;
|
|
446
|
-
const R =
|
|
446
|
+
const R = _.value.indexOf(g);
|
|
447
447
|
if (R !== -1) {
|
|
448
|
-
const
|
|
449
|
-
w(
|
|
448
|
+
const G = R + a.virtualScrollStartIndex;
|
|
449
|
+
w(G);
|
|
450
450
|
}
|
|
451
|
-
},
|
|
452
|
-
var
|
|
453
|
-
if (
|
|
454
|
-
a.scrollToIndex(
|
|
455
|
-
const
|
|
456
|
-
(
|
|
451
|
+
}, m = async (h) => {
|
|
452
|
+
var g, R;
|
|
453
|
+
if (p.value && a.scrollToIndex) {
|
|
454
|
+
a.scrollToIndex(h), await j(), await f();
|
|
455
|
+
const G = h - a.virtualScrollStartIndex;
|
|
456
|
+
(g = _.value[G]) == null || g.focus();
|
|
457
457
|
} else
|
|
458
|
-
(R =
|
|
459
|
-
}, k = async (
|
|
460
|
-
w(
|
|
461
|
-
}, B = async (
|
|
462
|
-
var
|
|
463
|
-
await
|
|
458
|
+
(R = _.value[h]) == null || R.focus();
|
|
459
|
+
}, k = async (h) => {
|
|
460
|
+
w(h), await m(h);
|
|
461
|
+
}, B = async (h) => {
|
|
462
|
+
var g, R;
|
|
463
|
+
await f(), p.value && a.scrollToIndex ? a.scrollToIndex(h) : (R = (g = _.value[h]) == null ? void 0 : g.scrollIntoView) == null || R.call(g, { block: "nearest" });
|
|
464
464
|
}, {
|
|
465
465
|
moveToNextElement: b,
|
|
466
|
-
moveToPreviousElement:
|
|
466
|
+
moveToPreviousElement: O,
|
|
467
467
|
moveToFirstElement: T,
|
|
468
|
-
moveToLastElement:
|
|
468
|
+
moveToLastElement: L,
|
|
469
469
|
setListboxFocusedIndex: w
|
|
470
470
|
} = st(
|
|
471
471
|
{
|
|
472
|
-
items:
|
|
473
|
-
totalItemCount:
|
|
472
|
+
items: _,
|
|
473
|
+
totalItemCount: W(a, "totalItemCount")
|
|
474
474
|
},
|
|
475
|
-
|
|
475
|
+
m
|
|
476
476
|
), N = {
|
|
477
|
-
[z.ARROW_UP]:
|
|
477
|
+
[z.ARROW_UP]: O,
|
|
478
478
|
[z.ARROW_DOWN]: b,
|
|
479
479
|
[z.HOME]: T,
|
|
480
|
-
[z.END]:
|
|
480
|
+
[z.END]: L
|
|
481
481
|
}, A = {
|
|
482
|
-
[
|
|
483
|
-
[
|
|
484
|
-
[
|
|
485
|
-
[
|
|
482
|
+
[d.SELECT]: c(d.SELECT),
|
|
483
|
+
[d.SPACE]: c(d.SPACE),
|
|
484
|
+
[d.TAB]: c(d.TAB),
|
|
485
|
+
[d.ENTER]: c(d.ENTER)
|
|
486
486
|
};
|
|
487
487
|
return l({
|
|
488
488
|
/**
|
|
@@ -507,7 +507,7 @@ const Ht = jt.exports, st = ({ items: a, totalItemCount: e }, l) => {
|
|
|
507
507
|
scrollToItem: B
|
|
508
508
|
}), {
|
|
509
509
|
// Enums
|
|
510
|
-
BentoListboxEvent:
|
|
510
|
+
BentoListboxEvent: d,
|
|
511
511
|
// Values
|
|
512
512
|
listboxRef: o,
|
|
513
513
|
listboxItemRef: i,
|
|
@@ -515,14 +515,14 @@ const Ht = jt.exports, st = ({ items: a, totalItemCount: e }, l) => {
|
|
|
515
515
|
slots: t,
|
|
516
516
|
ariaAttributes: v,
|
|
517
517
|
// Computed
|
|
518
|
-
hasCategories:
|
|
518
|
+
hasCategories: u,
|
|
519
519
|
// Methods
|
|
520
520
|
onOptionSelected: c,
|
|
521
521
|
// Keyboard navigation
|
|
522
522
|
listboxListeners: N,
|
|
523
523
|
listboxOptionListeners: A,
|
|
524
524
|
// Virtual scroll focus management
|
|
525
|
-
handleVirtualScrollingFocus:
|
|
525
|
+
handleVirtualScrollingFocus: S
|
|
526
526
|
};
|
|
527
527
|
}
|
|
528
528
|
});
|
|
@@ -547,7 +547,7 @@ var Xt = function() {
|
|
|
547
547
|
} };
|
|
548
548
|
})], null, !0) }, e.listboxOptionListeners));
|
|
549
549
|
})], 2);
|
|
550
|
-
}, Zt = [], Qt = /* @__PURE__ */
|
|
550
|
+
}, Zt = [], Qt = /* @__PURE__ */ K(
|
|
551
551
|
Jt,
|
|
552
552
|
Xt,
|
|
553
553
|
Zt,
|
|
@@ -565,7 +565,7 @@ const tl = {
|
|
|
565
565
|
var ll = function() {
|
|
566
566
|
var e = this, l = e._self._c;
|
|
567
567
|
return l("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? l("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), l("path", { attrs: { fill: "#001222", d: "M9.69043 5.75L4.62988 10.8105L1.56934 7.75L2.62988 6.68945L4.62988 8.68945L8.62988 4.68945L9.69043 5.75Z" } }), l("path", { attrs: { fill: "#001222", d: "M13.9307 5.75L8.87012 10.8105L7.80957 9.75L12.8701 4.68945L13.9307 5.75Z" } })]);
|
|
568
|
-
}, al = [], sl = /* @__PURE__ */
|
|
568
|
+
}, al = [], sl = /* @__PURE__ */ K(
|
|
569
569
|
tl,
|
|
570
570
|
ll,
|
|
571
571
|
al,
|
|
@@ -596,7 +596,7 @@ const ol = sl.exports, nl = {}, il = /* @__PURE__ */ U({
|
|
|
596
596
|
var rl = function() {
|
|
597
597
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
598
598
|
return l("div", { staticClass: "b-checkbox-input", class: t.conditionalClasses, attrs: { role: "presentation" } }, [e.indeterminate ? l(t.MinusSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true" } }) : e.allSelected ? l(t.DoubleCheckmarkSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true", "data-testid": "decorative-checkbox-double-checkmark-icon" } }) : e.checked ? l(t.CheckmarkSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true" } }) : e._e(), l("div", { staticClass: "b-checkbox-input__outline", class: t.outlineConditionalClasses })], 1);
|
|
599
|
-
}, cl = [],
|
|
599
|
+
}, cl = [], dl = /* @__PURE__ */ K(
|
|
600
600
|
il,
|
|
601
601
|
rl,
|
|
602
602
|
cl,
|
|
@@ -604,9 +604,9 @@ var rl = function() {
|
|
|
604
604
|
null,
|
|
605
605
|
"b87bbaf9"
|
|
606
606
|
);
|
|
607
|
-
const Ge =
|
|
608
|
-
var ot = /* @__PURE__ */ ((a) => (a.DISABLED = "disabled", a.STATIC_CATEGORY = "static-category", a))(ot || {}),
|
|
609
|
-
const
|
|
607
|
+
const Ge = dl.exports;
|
|
608
|
+
var ot = /* @__PURE__ */ ((a) => (a.DISABLED = "disabled", a.STATIC_CATEGORY = "static-category", a))(ot || {}), de = /* @__PURE__ */ ((a) => (a.SELECT_CATEGORY = "select-category", a.UNSELECT_CATEGORY = "unselect-category", a.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", a))(de || {});
|
|
609
|
+
const ul = {
|
|
610
610
|
"de-DE": {
|
|
611
611
|
categoryClosed: "{category} geschlossen",
|
|
612
612
|
categoryOpened: "{category} geöffnet"
|
|
@@ -648,7 +648,7 @@ const dl = {
|
|
|
648
648
|
categoryOpened: "{category} 已打开"
|
|
649
649
|
}
|
|
650
650
|
}, pl = U({
|
|
651
|
-
i18n: { messages:
|
|
651
|
+
i18n: { messages: ul },
|
|
652
652
|
name: "bento-listbox-multi-select-category",
|
|
653
653
|
components: {
|
|
654
654
|
BentoTypography: ie,
|
|
@@ -701,70 +701,70 @@ const dl = {
|
|
|
701
701
|
tabindex: { type: Number, default: -1 }
|
|
702
702
|
},
|
|
703
703
|
emits: [
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
704
|
+
de.SELECT_CATEGORY,
|
|
705
|
+
de.UNSELECT_CATEGORY,
|
|
706
|
+
de.TOGGLE_CATEGORY_VISIBILITY
|
|
707
707
|
],
|
|
708
708
|
setup(a, { emit: e }) {
|
|
709
|
-
const l =
|
|
709
|
+
const l = I(!1), { t } = pe(), s = ne("category-group"), o = ne("category-name"), i = (A) => a.isOptionDisabled ? a.isOptionDisabled(A) : !1, r = n(
|
|
710
710
|
() => a.category.items.every((A) => i(A))
|
|
711
|
-
), v =
|
|
711
|
+
), v = W(a, "staticCategories"), u = n(() => l.value || a.staticCategories), c = n(() => ({
|
|
712
712
|
[`b-listbox-multi-select-category--${ot.DISABLED}`]: r.value
|
|
713
|
-
})),
|
|
714
|
-
A.preventDefault(), l.value =
|
|
715
|
-
},
|
|
713
|
+
})), _ = (A, h) => {
|
|
714
|
+
A.preventDefault(), l.value = h !== void 0 ? h : !l.value, e(de.TOGGLE_CATEGORY_VISIBILITY, a.category.value);
|
|
715
|
+
}, f = (A) => {
|
|
716
716
|
var R;
|
|
717
|
-
const
|
|
718
|
-
return { isDisabled:
|
|
719
|
-
},
|
|
717
|
+
const h = i(A), g = ((R = a.selectedItemsList) == null ? void 0 : R.includes(A.value)) || !1;
|
|
718
|
+
return { isDisabled: h, isPreSelected: g };
|
|
719
|
+
}, p = n(
|
|
720
720
|
() => a.category.items.filter((A) => {
|
|
721
|
-
const { isDisabled:
|
|
722
|
-
return
|
|
721
|
+
const { isDisabled: h, isPreSelected: g } = f(A);
|
|
722
|
+
return h && g || !h;
|
|
723
723
|
})
|
|
724
|
-
),
|
|
724
|
+
), S = n(
|
|
725
725
|
() => {
|
|
726
726
|
var A;
|
|
727
|
-
return (A =
|
|
728
|
-
({ value:
|
|
729
|
-
var
|
|
730
|
-
return (
|
|
727
|
+
return (A = p.value) == null ? void 0 : A.filter(
|
|
728
|
+
({ value: h }) => {
|
|
729
|
+
var g;
|
|
730
|
+
return (g = a.selectedItemsList) == null ? void 0 : g.includes(h);
|
|
731
731
|
}
|
|
732
732
|
);
|
|
733
733
|
}
|
|
734
|
-
),
|
|
734
|
+
), m = n(() => {
|
|
735
735
|
const A = l.value ? "categoryOpened" : "categoryClosed";
|
|
736
736
|
return t(A, { category: a.category.label });
|
|
737
737
|
}), k = () => {
|
|
738
|
-
e(
|
|
738
|
+
e(de.SELECT_CATEGORY);
|
|
739
739
|
}, B = () => {
|
|
740
|
-
e(
|
|
741
|
-
}, { isAllSelected: b, isIndeterminate:
|
|
742
|
-
|
|
743
|
-
|
|
740
|
+
e(de.UNSELECT_CATEGORY);
|
|
741
|
+
}, { isAllSelected: b, isIndeterminate: O, toggleSelectAll: T } = at(
|
|
742
|
+
S,
|
|
743
|
+
p,
|
|
744
744
|
k,
|
|
745
745
|
B
|
|
746
|
-
),
|
|
746
|
+
), L = n(() => O.value ? "mixed" : `${b.value}`), w = I(b.value), N = () => {
|
|
747
747
|
w.value = !w.value, T(w.value);
|
|
748
748
|
};
|
|
749
749
|
return te(b, () => {
|
|
750
750
|
w.value = b.value;
|
|
751
751
|
}), {
|
|
752
752
|
// Values
|
|
753
|
-
chevronTitle:
|
|
753
|
+
chevronTitle: m,
|
|
754
754
|
conditionalClass: c,
|
|
755
755
|
hasAllPropsDisabled: r,
|
|
756
756
|
isOpen: l,
|
|
757
757
|
isAllSelected: b,
|
|
758
|
-
isIndeterminate:
|
|
758
|
+
isIndeterminate: O,
|
|
759
759
|
isStaticCategory: v,
|
|
760
760
|
categoryGroupId: s,
|
|
761
761
|
categoryNameId: o,
|
|
762
762
|
// Computed
|
|
763
|
-
showItemChildren:
|
|
764
|
-
ariaCheckedComputed:
|
|
763
|
+
showItemChildren: u,
|
|
764
|
+
ariaCheckedComputed: L,
|
|
765
765
|
// Methods
|
|
766
766
|
handleSelectAll: N,
|
|
767
|
-
toggleOpen:
|
|
767
|
+
toggleOpen: _,
|
|
768
768
|
toggleSelectAll: T
|
|
769
769
|
};
|
|
770
770
|
}
|
|
@@ -780,7 +780,7 @@ var fl = function() {
|
|
|
780
780
|
}] } }, [l("decorative-checkbox", { attrs: { indeterminate: e.isIndeterminate, disabled: e.hasAllPropsDisabled, checked: e.isAllSelected } }), l("span", { staticClass: "b-listbox-multi-select-category__label" }, [l("bento-typography", { staticClass: "b-listbox-multi-select-category__label-text", attrs: { id: e.categoryNameId, el: "span" } }, [e._v(" " + e._s(e.category.label) + " ")]), l("div", { staticClass: "b-listbox-multi-select-category__label-chevron", attrs: { "aria-hidden": "true", "data-testid": "toggle-listbox" }, on: { "!click": function(t) {
|
|
781
781
|
return t.stopPropagation(), e.toggleOpen.apply(null, arguments);
|
|
782
782
|
} } }, [e.isOpen ? l("chevron-up-icon", { attrs: { "svg-title": e.chevronTitle } }) : l("chevron-down-icon", { attrs: { "svg-title": e.chevronTitle } })], 1)], 1)], 1), l("div", { directives: [{ name: "show", rawName: "v-show", value: e.showItemChildren, expression: "showItemChildren" }], attrs: { id: e.categoryGroupId, role: "group", "aria-label": e.category.label } }, [e._t("default")], 2)], 1);
|
|
783
|
-
}, bl = [], vl = /* @__PURE__ */
|
|
783
|
+
}, bl = [], vl = /* @__PURE__ */ K(
|
|
784
784
|
pl,
|
|
785
785
|
fl,
|
|
786
786
|
bl,
|
|
@@ -872,17 +872,17 @@ const _l = U({
|
|
|
872
872
|
ee.TOGGLE_CATEGORY_VISIBILITY
|
|
873
873
|
],
|
|
874
874
|
setup(a, { emit: e }) {
|
|
875
|
-
const l = (
|
|
876
|
-
a.isOptionDisabled(
|
|
877
|
-
}, t = (
|
|
875
|
+
const l = (u) => {
|
|
876
|
+
a.isOptionDisabled(u) || e(ee.TOGGLE_CHECKBOX_SELECTION, u);
|
|
877
|
+
}, t = (u) => !!u.items, s = (u) => {
|
|
878
878
|
const c = a.isMultiLevel && a.searching;
|
|
879
|
-
return
|
|
880
|
-
}, o = (
|
|
881
|
-
if (t(
|
|
882
|
-
const c = o(
|
|
883
|
-
e(c,
|
|
879
|
+
return u.description && (!a.isMultiLevel || c);
|
|
880
|
+
}, o = (u) => u.items ? !!u.items.find((c) => a.selectedItemsList.includes(c.value)) : a.selectedItemsList.includes(u.value), i = (u) => {
|
|
881
|
+
if (t(u)) {
|
|
882
|
+
const c = o(u) ? ee.UNSELECT_CATEGORY : ee.SELECT_CATEGORY;
|
|
883
|
+
e(c, u);
|
|
884
884
|
} else
|
|
885
|
-
l(
|
|
885
|
+
l(u);
|
|
886
886
|
};
|
|
887
887
|
return {
|
|
888
888
|
// Values
|
|
@@ -895,9 +895,9 @@ const _l = U({
|
|
|
895
895
|
shouldShowDescription: s,
|
|
896
896
|
toggleCheckboxSelection: l,
|
|
897
897
|
toggleSearchOption: i,
|
|
898
|
-
computedTabindex: (
|
|
898
|
+
computedTabindex: (u) => a.itemsIndex[u] === a.focusedIndex ? 0 : -1,
|
|
899
899
|
// Enums
|
|
900
|
-
BentoListboxEvent:
|
|
900
|
+
BentoListboxEvent: d,
|
|
901
901
|
ListboxMultiSelectOptionsEvent: ee
|
|
902
902
|
};
|
|
903
903
|
}
|
|
@@ -929,7 +929,7 @@ var yl = function() {
|
|
|
929
929
|
return [l("span", { staticClass: "b-listbox-multi-select__option-text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(t.label))]), e.shouldShowDescription(t) ? l("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(t.description) + " ")]) : e._e()], 1)];
|
|
930
930
|
}, null, t)], 2)]], 2);
|
|
931
931
|
}), 0);
|
|
932
|
-
}, gl = [], hl = /* @__PURE__ */
|
|
932
|
+
}, gl = [], hl = /* @__PURE__ */ K(
|
|
933
933
|
_l,
|
|
934
934
|
yl,
|
|
935
935
|
gl,
|
|
@@ -1024,114 +1024,114 @@ const Sl = hl.exports, nt = (a) => {
|
|
|
1024
1024
|
},
|
|
1025
1025
|
emits: ["select"],
|
|
1026
1026
|
setup(a, { expose: e, emit: l }) {
|
|
1027
|
-
const t = a, { t: s, n: o } =
|
|
1027
|
+
const t = a, { t: s, n: o } = pe(), i = Oe(), r = Ve(), v = n(
|
|
1028
1028
|
() => {
|
|
1029
|
-
var
|
|
1029
|
+
var y, x, C, D;
|
|
1030
1030
|
return {
|
|
1031
|
-
"aria-label": (
|
|
1031
|
+
"aria-label": (y = r["aria-label"]) == null ? void 0 : y.toString(),
|
|
1032
1032
|
"aria-busy": (x = r["aria-busy"]) == null ? void 0 : x.toString(),
|
|
1033
1033
|
"aria-atomic": (C = r["aria-atomic"]) == null ? void 0 : C.toString(),
|
|
1034
1034
|
"aria-live": (D = r["aria-live"]) == null ? void 0 : D.toString(),
|
|
1035
1035
|
"aria-multiselectable": !0
|
|
1036
1036
|
};
|
|
1037
1037
|
}
|
|
1038
|
-
),
|
|
1038
|
+
), u = I(null), c = I(null), _ = I(null), f = I(null), p = n(() => t.selectedValues.map(({ value: y }) => y)), { isMultiLevelSelect: S, flattenedItemsList: m } = nt(W(t, "items")), k = n(() => S.value && !t.staticCategories), B = n(() => k.value ? "tree" : "listbox"), b = n(() => k.value ? "treeitem" : "option"), O = (y) => {
|
|
1039
1039
|
var D;
|
|
1040
|
-
const x = t.isOptionDisabled(
|
|
1040
|
+
const x = t.isOptionDisabled(y), C = ((D = p.value) == null ? void 0 : D.includes(y.value)) || !1;
|
|
1041
1041
|
return { isDisabled: x, isPreSelected: C };
|
|
1042
1042
|
}, T = n(() => {
|
|
1043
|
-
if (t.searching &&
|
|
1043
|
+
if (t.searching && S)
|
|
1044
1044
|
return t.items;
|
|
1045
|
-
const
|
|
1046
|
-
const { isDisabled: C, isPreSelected: D } =
|
|
1045
|
+
const y = m.value.filter((x) => {
|
|
1046
|
+
const { isDisabled: C, isPreSelected: D } = O(x);
|
|
1047
1047
|
return C && D || !C;
|
|
1048
1048
|
});
|
|
1049
1049
|
return t.selectedValues.forEach((x) => {
|
|
1050
|
-
|
|
1051
|
-
}),
|
|
1052
|
-
}),
|
|
1050
|
+
y.find((C) => C.value === x.value) || y.push(x);
|
|
1051
|
+
}), y;
|
|
1052
|
+
}), L = n(
|
|
1053
1053
|
() => {
|
|
1054
|
-
var
|
|
1055
|
-
return (
|
|
1054
|
+
var y;
|
|
1055
|
+
return (y = T.value) == null ? void 0 : y.filter((x) => {
|
|
1056
1056
|
var C;
|
|
1057
|
-
return x.items &&
|
|
1057
|
+
return x.items && S.value && t.searching ? x.items.filter(
|
|
1058
1058
|
(M) => (t.selectedValues ?? []).includes(M.value)
|
|
1059
|
-
).length === x.items.length : (C =
|
|
1059
|
+
).length === x.items.length : (C = p.value) == null ? void 0 : C.includes(x.value);
|
|
1060
1060
|
});
|
|
1061
1061
|
}
|
|
1062
|
-
), w = () =>
|
|
1062
|
+
), w = () => S.value && !t.searching ? m.value.length : t.items.length, N = n(() => {
|
|
1063
1063
|
var D;
|
|
1064
|
-
const
|
|
1065
|
-
return C === 0 ? s("selectAll", { total: o(
|
|
1066
|
-
}), A = (
|
|
1064
|
+
const y = T.value.length, x = w(), C = ((D = L.value) == null ? void 0 : D.length) || 0;
|
|
1065
|
+
return C === 0 ? s("selectAll", { total: o(y) }) : C === x ? s("allSelected", { total: o(x) }) : C <= x ? s("numberOfTotalSelected", { number: o(C), total: o(x) }) : s("numbersSelected", { number: o(C) });
|
|
1066
|
+
}), A = (y) => {
|
|
1067
1067
|
const x = (D) => {
|
|
1068
|
-
const { isDisabled: M, isPreSelected:
|
|
1069
|
-
return M &&
|
|
1070
|
-
}, C =
|
|
1068
|
+
const { isDisabled: M, isPreSelected: X } = O(D);
|
|
1069
|
+
return M && X || !M;
|
|
1070
|
+
}, C = y.filter(x).filter((D) => !p.value.includes(D.value));
|
|
1071
1071
|
l("select", [...t.selectedValues, ...C]);
|
|
1072
|
-
},
|
|
1072
|
+
}, h = (y) => {
|
|
1073
1073
|
const x = (M) => {
|
|
1074
|
-
const { isDisabled:
|
|
1075
|
-
return !(
|
|
1076
|
-
}, C =
|
|
1074
|
+
const { isDisabled: X, isPreSelected: P } = O(M);
|
|
1075
|
+
return !(X && P);
|
|
1076
|
+
}, C = y.filter(x).map(({ value: M }) => M), D = t.selectedValues.filter((M) => !(C != null && C.includes(M.value)));
|
|
1077
1077
|
l("select", D);
|
|
1078
|
-
},
|
|
1079
|
-
A(
|
|
1078
|
+
}, g = () => {
|
|
1079
|
+
A(m.value);
|
|
1080
1080
|
}, R = () => {
|
|
1081
|
-
|
|
1082
|
-
}, { isAllSelected:
|
|
1083
|
-
|
|
1081
|
+
h(m.value);
|
|
1082
|
+
}, { isAllSelected: G, isIndeterminate: E, toggleSelectAll: F } = at(
|
|
1083
|
+
L,
|
|
1084
1084
|
T,
|
|
1085
|
-
|
|
1085
|
+
g,
|
|
1086
1086
|
R
|
|
1087
|
-
), le = n(() =>
|
|
1088
|
-
|
|
1087
|
+
), le = n(() => E.value ? "mixed" : `${G.value}`), q = I(G.value), V = () => {
|
|
1088
|
+
q.value = !q.value, F(q.value);
|
|
1089
1089
|
};
|
|
1090
|
-
te(
|
|
1091
|
-
|
|
1090
|
+
te(G, () => {
|
|
1091
|
+
q.value = G.value;
|
|
1092
1092
|
});
|
|
1093
|
-
const ae = (
|
|
1094
|
-
A(
|
|
1095
|
-
},
|
|
1096
|
-
|
|
1097
|
-
}, he = (
|
|
1093
|
+
const ae = (y) => {
|
|
1094
|
+
A(y.items);
|
|
1095
|
+
}, fe = (y) => {
|
|
1096
|
+
h(y.items);
|
|
1097
|
+
}, he = (y, x) => {
|
|
1098
1098
|
let C = !1;
|
|
1099
1099
|
const D = t.selectedValues.filter(({ value: M }) => x.value === M ? (C = !0, !1) : !0);
|
|
1100
|
-
C || D.push(x), l(
|
|
1100
|
+
C || D.push(x), l(y, D);
|
|
1101
1101
|
}, Re = n(() => {
|
|
1102
|
-
if (!
|
|
1102
|
+
if (!S.value)
|
|
1103
1103
|
return t.selectedValues;
|
|
1104
|
-
const
|
|
1105
|
-
(
|
|
1106
|
-
), D = C.filter((
|
|
1107
|
-
C.forEach((
|
|
1104
|
+
const y = (P) => p.value.includes(P.value), x = (P) => !t.staticCategories && P.every((ce) => y(ce)), C = t.items.flatMap(
|
|
1105
|
+
(P) => P.items && !x(P.items) ? P.items : P
|
|
1106
|
+
), D = C.filter((P) => P.items ? !0 : y(P)), M = /* @__PURE__ */ new Set();
|
|
1107
|
+
C.forEach((P) => {
|
|
1108
1108
|
var ce;
|
|
1109
|
-
M.add(
|
|
1109
|
+
M.add(P.value), (ce = P.items) == null || ce.forEach(($) => M.add($.value));
|
|
1110
1110
|
});
|
|
1111
|
-
const
|
|
1112
|
-
return [...D, ...
|
|
1111
|
+
const X = t.selectedValues.filter((P) => !M.has(P.value));
|
|
1112
|
+
return [...D, ...X];
|
|
1113
1113
|
}), Me = n(() => {
|
|
1114
|
-
var C, D, M,
|
|
1115
|
-
const
|
|
1116
|
-
return
|
|
1117
|
-
}),
|
|
1118
|
-
|
|
1119
|
-
|
|
1114
|
+
var C, D, M, X;
|
|
1115
|
+
const y = ["automatic", "button"].includes(t.lazyLoadType), x = ((C = t.selectedValues) == null ? void 0 : C.length) > 0 && ((D = L.value) == null ? void 0 : D.length) !== ((M = m.value) == null ? void 0 : M.length);
|
|
1116
|
+
return y && t.hasMoreItems ? !!((X = t.selectedValues) != null && X.length) : x;
|
|
1117
|
+
}), be = n(() => ["automatic", "button"].includes(t.lazyLoadType) ? !t.hasMoreItems : !0), J = I([]), { visibleDomOptions: re, updateVisibleDomOptions: Se } = Ue(
|
|
1118
|
+
u,
|
|
1119
|
+
W(t, "items"),
|
|
1120
1120
|
b
|
|
1121
|
-
), Ee = (
|
|
1122
|
-
|
|
1121
|
+
), Ee = (y) => {
|
|
1122
|
+
J.value.includes(y) ? J.value = J.value.filter((x) => x !== y) : J.value.push(y), j(() => {
|
|
1123
1123
|
Se();
|
|
1124
1124
|
});
|
|
1125
|
-
}, Ie = (
|
|
1125
|
+
}, Ie = (y) => {
|
|
1126
1126
|
var x;
|
|
1127
|
-
(x = re.value[
|
|
1127
|
+
(x = re.value[y]) == null || x.focus();
|
|
1128
1128
|
}, {
|
|
1129
1129
|
moveToNextElement: Le,
|
|
1130
|
-
moveToPreviousElement:
|
|
1130
|
+
moveToPreviousElement: ve,
|
|
1131
1131
|
moveToFirstElement: xe,
|
|
1132
|
-
moveToLastElement:
|
|
1133
|
-
preventDefault:
|
|
1134
|
-
focusedIndex:
|
|
1132
|
+
moveToLastElement: me,
|
|
1133
|
+
preventDefault: _e,
|
|
1134
|
+
focusedIndex: ye,
|
|
1135
1135
|
setListboxFocusedIndex: Ce
|
|
1136
1136
|
} = st(
|
|
1137
1137
|
{
|
|
@@ -1139,10 +1139,10 @@ const Sl = hl.exports, nt = (a) => {
|
|
|
1139
1139
|
},
|
|
1140
1140
|
Ie
|
|
1141
1141
|
), Te = {
|
|
1142
|
-
[z.ARROW_UP]: (
|
|
1143
|
-
[z.ARROW_DOWN]: (
|
|
1142
|
+
[z.ARROW_UP]: (y) => ve(y),
|
|
1143
|
+
[z.ARROW_DOWN]: (y) => Le(y),
|
|
1144
1144
|
[z.HOME]: xe,
|
|
1145
|
-
[z.END]:
|
|
1145
|
+
[z.END]: me
|
|
1146
1146
|
};
|
|
1147
1147
|
e({
|
|
1148
1148
|
/**
|
|
@@ -1152,17 +1152,17 @@ const Sl = hl.exports, nt = (a) => {
|
|
|
1152
1152
|
setListboxFocusedIndex: Ce
|
|
1153
1153
|
});
|
|
1154
1154
|
const Ne = {
|
|
1155
|
-
[z.ARROW_UP]:
|
|
1156
|
-
[z.ARROW_DOWN]:
|
|
1155
|
+
[z.ARROW_UP]: _e,
|
|
1156
|
+
[z.ARROW_DOWN]: _e
|
|
1157
1157
|
}, we = n(() => {
|
|
1158
|
-
let
|
|
1158
|
+
let y = be.value ? 1 : 0;
|
|
1159
1159
|
const x = {};
|
|
1160
1160
|
return t.items.forEach((C) => {
|
|
1161
|
-
let D =
|
|
1162
|
-
C.items ? (t.staticCategories ? D = !0 : x[C.value] =
|
|
1161
|
+
let D = J.value.includes(C.value);
|
|
1162
|
+
C.items ? (t.staticCategories ? D = !0 : x[C.value] = y++, D && C.items.forEach((M) => x[M.value] = y++)) : x[C.value] = y++;
|
|
1163
1163
|
}), x;
|
|
1164
1164
|
});
|
|
1165
|
-
return { __sfc: !0, props: t, emit: l, t: s, n: o, slots: i, attrs: r, ariaAttributes: v, listboxRef:
|
|
1165
|
+
return { __sfc: !0, props: t, emit: l, t: s, n: o, slots: i, attrs: r, ariaAttributes: v, listboxRef: u, selectAllListboxItemsRef: c, selectedListboxItemsRef: _, listboxItemsRef: f, selectedItemsList: p, isMultiLevelSelect: S, flattenedItemsList: m, isTreePattern: k, computedRole: B, computedOptionRole: b, optionStates: O, enabledItems: T, visibleSelectedList: L, calculateTotalItems: w, selectAllCheckboxText: N, selectAll: A, unselectAll: h, selectAllItems: g, unselectAllItems: R, isAllSelected: G, isIndeterminate: E, toggleSelectAll: F, ariaCheckedComputed: le, isSelectAllOn: q, handleSelectAll: V, selectAllCategory: ae, unselectAllCategory: fe, toggleCheckboxSelection: he, selectedOptions: Re, showSelectedItems: Me, showSelectAllCheckbox: be, expandedCategories: J, visibleDomOptions: re, updateVisibleDomOptions: Se, toggleCategoryVisibility: Ee, focusItem: Ie, moveToNextElement: Le, moveToPreviousElement: ve, moveToFirstElement: xe, moveToLastElement: me, preventDefault: _e, focusedIndex: ye, setListboxFocusedIndex: Ce, listboxListeners: Te, chipsSectionListeners: Ne, computedItemsIndex: we, DecorativeCheckbox: Ge, BentoTypography: ie, BentoChip: Ct, BentoListboxOption: Be, ListboxMultiSelectOptions: Sl, vBentoKeyboardNavigationDirective: ke, BentoListboxEvent: d };
|
|
1166
1166
|
}
|
|
1167
1167
|
});
|
|
1168
1168
|
var El = function() {
|
|
@@ -1186,7 +1186,7 @@ var El = function() {
|
|
|
1186
1186
|
return [e._t(o, null, null, i)];
|
|
1187
1187
|
} };
|
|
1188
1188
|
})], null, !0) })], 1)]);
|
|
1189
|
-
}, Il = [], Ll = /* @__PURE__ */
|
|
1189
|
+
}, Il = [], Ll = /* @__PURE__ */ K(
|
|
1190
1190
|
Ol,
|
|
1191
1191
|
El,
|
|
1192
1192
|
Il,
|
|
@@ -1352,104 +1352,104 @@ const Je = Ll.exports, it = (a, e = 300) => {
|
|
|
1352
1352
|
}
|
|
1353
1353
|
},
|
|
1354
1354
|
emits: [
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1355
|
+
d.SELECT,
|
|
1356
|
+
d.SPACE,
|
|
1357
|
+
d.SHOW_MORE,
|
|
1358
|
+
d.ENTER,
|
|
1359
|
+
d.ESCAPE,
|
|
1360
|
+
d.TAB
|
|
1361
1361
|
],
|
|
1362
1362
|
setup(a, { emit: e, slots: l }) {
|
|
1363
|
-
const t =
|
|
1363
|
+
const t = I([]), s = W(a, "items"), { t: o } = pe(), i = n(() => a.lazyLoadType !== oe.AUTOMATIC), r = n(() => a.lazyLoadType === oe.AUTOMATIC), v = () => {
|
|
1364
1364
|
var V;
|
|
1365
1365
|
return typeof (a == null ? void 0 : a.virtualScroll) == "object" && ((V = a == null ? void 0 : a.virtualScroll) != null && V.itemHeight) ? a.virtualScroll.itemHeight : wl;
|
|
1366
|
-
},
|
|
1366
|
+
}, u = !(a != null && a.multiple) && (a == null ? void 0 : a.virtualScroll) !== !1 && (a == null ? void 0 : a.lazyLoadType) === "none", {
|
|
1367
1367
|
containerRef: c,
|
|
1368
|
-
containerProps:
|
|
1369
|
-
onScroll:
|
|
1370
|
-
list:
|
|
1371
|
-
wrapperProps:
|
|
1372
|
-
scrollToIndex:
|
|
1368
|
+
containerProps: _,
|
|
1369
|
+
onScroll: f,
|
|
1370
|
+
list: p,
|
|
1371
|
+
wrapperProps: S,
|
|
1372
|
+
scrollToIndex: m,
|
|
1373
1373
|
startIndex: k
|
|
1374
1374
|
} = At(s, {
|
|
1375
1375
|
itemHeight: v(),
|
|
1376
1376
|
// Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
|
|
1377
|
-
disabled: !
|
|
1378
|
-
}), B = n(() =>
|
|
1377
|
+
disabled: !u
|
|
1378
|
+
}), B = n(() => u ? s.value.length : 0), b = n(
|
|
1379
1379
|
() => a.componentLoading !== void 0 || i.value ? "true" : void 0
|
|
1380
|
-
),
|
|
1380
|
+
), O = n(
|
|
1381
1381
|
() => i.value && a.loading || a.componentLoading ? "true" : "false"
|
|
1382
1382
|
), T = n(
|
|
1383
1383
|
() => i.value || a.componentLoading !== void 0 ? "polite" : void 0
|
|
1384
|
-
),
|
|
1384
|
+
), L = n(
|
|
1385
1385
|
() => ({
|
|
1386
1386
|
"aria-label": a.ariaLabel,
|
|
1387
|
-
"aria-busy":
|
|
1387
|
+
"aria-busy": O.value,
|
|
1388
1388
|
"aria-atomic": b.value,
|
|
1389
1389
|
"aria-live": T.value
|
|
1390
1390
|
})
|
|
1391
1391
|
), w = n(
|
|
1392
1392
|
() => a.componentLoading ? {
|
|
1393
|
-
...
|
|
1393
|
+
...L.value,
|
|
1394
1394
|
role: "alert"
|
|
1395
1395
|
} : {}
|
|
1396
1396
|
), N = (V) => (ae) => {
|
|
1397
1397
|
e(V, ae);
|
|
1398
1398
|
}, A = () => {
|
|
1399
|
-
e(
|
|
1400
|
-
},
|
|
1399
|
+
e(d.SHOW_MORE);
|
|
1400
|
+
}, h = it(() => {
|
|
1401
1401
|
const V = c.value;
|
|
1402
1402
|
if (!V)
|
|
1403
1403
|
return;
|
|
1404
1404
|
const ae = Math.round(V.scrollTop) + V.clientHeight >= V.scrollHeight;
|
|
1405
1405
|
a.hasMoreItems && ae && !a.loading && A();
|
|
1406
|
-
}),
|
|
1407
|
-
r.value ?
|
|
1406
|
+
}), g = () => {
|
|
1407
|
+
r.value ? h() : f();
|
|
1408
1408
|
}, R = n(() => {
|
|
1409
1409
|
var V;
|
|
1410
1410
|
return ((V = a.items) == null ? void 0 : V.length) === 0;
|
|
1411
|
-
}),
|
|
1411
|
+
}), G = n(
|
|
1412
1412
|
() => a.lazyLoadType === oe.BUTTON && a.hasMoreItems
|
|
1413
|
-
),
|
|
1413
|
+
), E = n(
|
|
1414
1414
|
() => a.loading ? Ye.LOADING : Ye.START
|
|
1415
|
-
),
|
|
1415
|
+
), F = n(() => a.loading ? o("loading") : o("showMore")), le = n(() => ({
|
|
1416
1416
|
...a.emptyState,
|
|
1417
1417
|
variant: "condensed"
|
|
1418
|
-
})),
|
|
1419
|
-
[
|
|
1420
|
-
[
|
|
1421
|
-
[
|
|
1422
|
-
[
|
|
1418
|
+
})), q = {
|
|
1419
|
+
[d.SELECT]: N(d.SELECT),
|
|
1420
|
+
[d.SPACE]: N(d.SPACE),
|
|
1421
|
+
[d.TAB]: N(d.TAB),
|
|
1422
|
+
[d.ENTER]: N(d.ENTER)
|
|
1423
1423
|
};
|
|
1424
1424
|
return {
|
|
1425
1425
|
// Refs
|
|
1426
1426
|
listboxRef: c,
|
|
1427
1427
|
listboxItemRef: t,
|
|
1428
1428
|
// a11y
|
|
1429
|
-
ariaAttributes:
|
|
1429
|
+
ariaAttributes: L,
|
|
1430
1430
|
listboxContainerAttributes: w,
|
|
1431
1431
|
// Values
|
|
1432
|
-
containerProps:
|
|
1432
|
+
containerProps: _,
|
|
1433
1433
|
isSearchResultEmpty: R,
|
|
1434
1434
|
limitedEmptyStateProps: le,
|
|
1435
|
-
loadingButtonState:
|
|
1435
|
+
loadingButtonState: E,
|
|
1436
1436
|
slots: l,
|
|
1437
|
-
shouldDisplayShowMoreButton:
|
|
1438
|
-
showMoreButtonText:
|
|
1439
|
-
virtualisedItems:
|
|
1440
|
-
wrapperProps:
|
|
1437
|
+
shouldDisplayShowMoreButton: G,
|
|
1438
|
+
showMoreButtonText: F,
|
|
1439
|
+
virtualisedItems: p,
|
|
1440
|
+
wrapperProps: S,
|
|
1441
1441
|
// Virtual scroll
|
|
1442
1442
|
totalItemCount: B,
|
|
1443
|
-
scrollToIndex:
|
|
1443
|
+
scrollToIndex: m,
|
|
1444
1444
|
virtualScrollStartIndex: k,
|
|
1445
1445
|
// Enums
|
|
1446
1446
|
BentoKeyboardNavigationKeyDownEvent: z,
|
|
1447
|
-
BentoListboxEvent:
|
|
1447
|
+
BentoListboxEvent: d,
|
|
1448
1448
|
// Methods
|
|
1449
|
-
onListboxContainerScroll:
|
|
1449
|
+
onListboxContainerScroll: g,
|
|
1450
1450
|
onOptionSelected: N,
|
|
1451
1451
|
emitShowMore: A,
|
|
1452
|
-
listboxListeners:
|
|
1452
|
+
listboxListeners: q
|
|
1453
1453
|
};
|
|
1454
1454
|
}
|
|
1455
1455
|
});
|
|
@@ -1467,7 +1467,7 @@ var Dl = function() {
|
|
|
1467
1467
|
})], null, !0) }, "bento-listbox-single-select", e.ariaAttributes, !1), e.listboxListeners))], e.shouldDisplayShowMoreButton ? l("div", { staticClass: "b-listbox__lazy-load" }, [l("bento-loading-button", { attrs: { state: e.loadingButtonState, variant: "secondary" }, on: { "!click": function(s) {
|
|
1468
1468
|
return e.emitShowMore.apply(null, arguments);
|
|
1469
1469
|
} } }, [e._v(" " + e._s(e.showMoreButtonText) + " ")])], 1) : e.loading ? l("div", { staticClass: "b-listbox__lazy-load" }, [l("bento-loading-indicator")], 1) : e._e()]], 2)]);
|
|
1470
|
-
}, kl = [], Bl = /* @__PURE__ */
|
|
1470
|
+
}, kl = [], Bl = /* @__PURE__ */ K(
|
|
1471
1471
|
Al,
|
|
1472
1472
|
Dl,
|
|
1473
1473
|
kl,
|
|
@@ -1475,50 +1475,50 @@ var Dl = function() {
|
|
|
1475
1475
|
null,
|
|
1476
1476
|
"7819d7a2"
|
|
1477
1477
|
);
|
|
1478
|
-
const
|
|
1478
|
+
const Pe = Bl.exports, Fe = (a, e) => {
|
|
1479
1479
|
for (const l of a) {
|
|
1480
1480
|
if (l.value === e)
|
|
1481
1481
|
return l;
|
|
1482
1482
|
if (l.items) {
|
|
1483
|
-
const t =
|
|
1483
|
+
const t = Fe(l.items, e);
|
|
1484
1484
|
if (t)
|
|
1485
1485
|
return t;
|
|
1486
1486
|
}
|
|
1487
1487
|
}
|
|
1488
1488
|
return null;
|
|
1489
1489
|
}, Rl = (a) => typeof a == "object" && a !== null && "value" in a && "label" in a, Ml = (a, e, l, t) => {
|
|
1490
|
-
const s =
|
|
1491
|
-
l.value ? o.value = c.map(({ value:
|
|
1490
|
+
const s = I([]), o = I(), i = (c) => {
|
|
1491
|
+
l.value ? o.value = c.map(({ value: _ }) => _) : o.value = c.length > 0 ? c[0].value : null;
|
|
1492
1492
|
}, r = (c) => {
|
|
1493
|
-
l.value ? o.value = c.map(({ value:
|
|
1493
|
+
l.value ? o.value = c.map(({ value: _, label: f }) => ({ value: _, label: f })) : o.value = c.length > 0 ? { value: c[0].value, label: c[0].label } : null;
|
|
1494
1494
|
}, v = (c) => {
|
|
1495
1495
|
s.value = c, t != null && t.value ? r(c) : i(c);
|
|
1496
|
-
},
|
|
1496
|
+
}, u = () => {
|
|
1497
1497
|
s.value = [], o.value = null;
|
|
1498
1498
|
};
|
|
1499
1499
|
return te(
|
|
1500
1500
|
() => e.value,
|
|
1501
1501
|
() => {
|
|
1502
1502
|
if (!e.value && e.value !== 0) {
|
|
1503
|
-
|
|
1503
|
+
u();
|
|
1504
1504
|
return;
|
|
1505
1505
|
}
|
|
1506
|
-
const c = !Array.isArray(e.value),
|
|
1507
|
-
|
|
1508
|
-
const
|
|
1509
|
-
if (Rl(
|
|
1510
|
-
s.value.push(
|
|
1506
|
+
const c = !Array.isArray(e.value), _ = [...s.value];
|
|
1507
|
+
u();
|
|
1508
|
+
const f = (p) => {
|
|
1509
|
+
if (Rl(p))
|
|
1510
|
+
s.value.push(p);
|
|
1511
1511
|
else {
|
|
1512
|
-
let
|
|
1513
|
-
|
|
1512
|
+
let S = Fe(a.value, p);
|
|
1513
|
+
S || (S = Fe(_, p)), S || (S = { value: p, label: p.toString() }), s.value.push(S);
|
|
1514
1514
|
}
|
|
1515
1515
|
};
|
|
1516
1516
|
if (c) {
|
|
1517
|
-
const
|
|
1518
|
-
p
|
|
1517
|
+
const p = e.value;
|
|
1518
|
+
f(p), t != null && t.value ? r(s.value) : i(s.value);
|
|
1519
1519
|
return;
|
|
1520
1520
|
}
|
|
1521
|
-
e.value.forEach(
|
|
1521
|
+
e.value.forEach(f), t != null && t.value ? r(s.value) : i(s.value);
|
|
1522
1522
|
},
|
|
1523
1523
|
{ immediate: !0 }
|
|
1524
1524
|
), {
|
|
@@ -1526,7 +1526,7 @@ const Fe = Bl.exports, Pe = (a, e) => {
|
|
|
1526
1526
|
cachedSelectedListboxOptions: s,
|
|
1527
1527
|
cachedListboxSelectedValues: o,
|
|
1528
1528
|
// Methods
|
|
1529
|
-
resetCache:
|
|
1529
|
+
resetCache: u,
|
|
1530
1530
|
setCachedValues: v
|
|
1531
1531
|
};
|
|
1532
1532
|
};
|
|
@@ -1583,17 +1583,17 @@ const Nl = {
|
|
|
1583
1583
|
noOptionsMatchThisSearch: "没有符合此搜索条件的选项"
|
|
1584
1584
|
}
|
|
1585
1585
|
}, $l = (a, e, l, t) => {
|
|
1586
|
-
const s =
|
|
1586
|
+
const s = I(a.value), { t: o } = pe();
|
|
1587
1587
|
te(a, () => {
|
|
1588
1588
|
s.value = a.value;
|
|
1589
1589
|
});
|
|
1590
1590
|
const i = n(
|
|
1591
1591
|
() => JSON.stringify(s.value) === JSON.stringify(a.value)
|
|
1592
1592
|
), r = () => {
|
|
1593
|
-
t(
|
|
1593
|
+
t(d.SELECT, s.value), t(d.CLOSE_DROPDOWN);
|
|
1594
1594
|
}, v = () => {
|
|
1595
|
-
s.value = a.value, t(
|
|
1596
|
-
},
|
|
1595
|
+
s.value = a.value, t(d.CLOSE_DROPDOWN);
|
|
1596
|
+
}, u = () => {
|
|
1597
1597
|
l.value && e.value && (s.value = a.value);
|
|
1598
1598
|
}, c = n(() => [
|
|
1599
1599
|
{
|
|
@@ -1605,24 +1605,24 @@ const Nl = {
|
|
|
1605
1605
|
title: o("cancel"),
|
|
1606
1606
|
event: v
|
|
1607
1607
|
}
|
|
1608
|
-
]),
|
|
1609
|
-
s.value = b, e.value || t(
|
|
1610
|
-
}, p = (b) => {
|
|
1611
|
-
m(b), t(u.TAB);
|
|
1608
|
+
]), _ = (b) => {
|
|
1609
|
+
s.value = b, e.value || t(d.SELECT, b);
|
|
1612
1610
|
}, f = (b) => {
|
|
1613
|
-
|
|
1614
|
-
},
|
|
1615
|
-
|
|
1616
|
-
},
|
|
1617
|
-
|
|
1611
|
+
_(b), t(d.TAB);
|
|
1612
|
+
}, p = (b) => {
|
|
1613
|
+
_(b), t(d.ENTER);
|
|
1614
|
+
}, S = (b) => {
|
|
1615
|
+
_(b), t(d.SPACE);
|
|
1616
|
+
}, m = () => {
|
|
1617
|
+
v(), t(d.ESCAPE);
|
|
1618
1618
|
}, k = () => {
|
|
1619
|
-
t(
|
|
1619
|
+
t(d.SHOW_MORE);
|
|
1620
1620
|
}, B = {
|
|
1621
|
-
[
|
|
1622
|
-
[
|
|
1623
|
-
[
|
|
1624
|
-
[
|
|
1625
|
-
[
|
|
1621
|
+
[d.SELECT]: _,
|
|
1622
|
+
[d.SHOW_MORE]: k,
|
|
1623
|
+
[d.TAB]: f,
|
|
1624
|
+
[d.SPACE]: S,
|
|
1625
|
+
[d.ENTER]: p
|
|
1626
1626
|
};
|
|
1627
1627
|
return {
|
|
1628
1628
|
// Values
|
|
@@ -1630,14 +1630,14 @@ const Nl = {
|
|
|
1630
1630
|
internalSelectedValue: s,
|
|
1631
1631
|
// Methods
|
|
1632
1632
|
listeners: B,
|
|
1633
|
-
onEscapeKey:
|
|
1634
|
-
onOutsideDropdownClick:
|
|
1633
|
+
onEscapeKey: m,
|
|
1634
|
+
onOutsideDropdownClick: u
|
|
1635
1635
|
};
|
|
1636
|
-
},
|
|
1636
|
+
}, Pl = U({
|
|
1637
1637
|
i18n: { messages: Nl },
|
|
1638
1638
|
name: "bento-dropdown-options-container"
|
|
1639
|
-
}),
|
|
1640
|
-
...
|
|
1639
|
+
}), Fl = /* @__PURE__ */ U({
|
|
1640
|
+
...Pl,
|
|
1641
1641
|
props: {
|
|
1642
1642
|
/**
|
|
1643
1643
|
* Defines a string value that labels an interactive element.
|
|
@@ -1727,7 +1727,7 @@ const Nl = {
|
|
|
1727
1727
|
*
|
|
1728
1728
|
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
1729
1729
|
*/
|
|
1730
|
-
searching:
|
|
1730
|
+
searching: Pe.props.searching,
|
|
1731
1731
|
/**
|
|
1732
1732
|
* If enabled, dropdown will display non-selectable, static categories
|
|
1733
1733
|
*/
|
|
@@ -1748,20 +1748,20 @@ const Nl = {
|
|
|
1748
1748
|
},
|
|
1749
1749
|
emits: [],
|
|
1750
1750
|
setup(a, { expose: e, emit: l }) {
|
|
1751
|
-
const t = a, s = Oe(), { selectedValue: o, multiple: i } = Qe(t), r =
|
|
1751
|
+
const t = a, s = Oe(), { selectedValue: o, multiple: i } = Qe(t), r = I(null), { t: v } = pe(), u = n(() => t.open && !t.disabled), c = n(() => v("noOptionsMatchThisSearch")), _ = n(() => ({
|
|
1752
1752
|
"b-dropdown-options-container--single": !(t != null && t.multiple)
|
|
1753
|
-
})),
|
|
1753
|
+
})), f = n(() => ({
|
|
1754
1754
|
"b-dropdown-options-container__listbox--single": !(t != null && t.multiple)
|
|
1755
|
-
})), { actions:
|
|
1756
|
-
var
|
|
1755
|
+
})), { actions: p, internalSelectedValue: S, listeners: m, onEscapeKey: k, onOutsideDropdownClick: B } = $l(o, i, u, l), b = n(() => t != null && t.multiple ? Et : We), O = n(() => {
|
|
1756
|
+
var L;
|
|
1757
1757
|
const T = {
|
|
1758
|
-
"min-width": `${(
|
|
1758
|
+
"min-width": `${(L = t == null ? void 0 : t.targetElement) == null ? void 0 : L.clientWidth}px`,
|
|
1759
1759
|
"max-width": "min(500px, 95%)"
|
|
1760
1760
|
};
|
|
1761
1761
|
return t != null && t.multiple ? {
|
|
1762
1762
|
actionsLayout: "space-between",
|
|
1763
1763
|
ariaLabel: t.ariaLabel,
|
|
1764
|
-
actions:
|
|
1764
|
+
actions: p.value,
|
|
1765
1765
|
divider: !0,
|
|
1766
1766
|
fallbackPosition: ["top-start"],
|
|
1767
1767
|
id: ne(`dropdown-options-${t.id}`),
|
|
@@ -1777,7 +1777,7 @@ const Nl = {
|
|
|
1777
1777
|
offset: [0, 8],
|
|
1778
1778
|
position: "bottom-start",
|
|
1779
1779
|
style: {
|
|
1780
|
-
display:
|
|
1780
|
+
display: u.value ? "block" : "none",
|
|
1781
1781
|
...T
|
|
1782
1782
|
},
|
|
1783
1783
|
targetElement: t.targetElement
|
|
@@ -1785,28 +1785,30 @@ const Nl = {
|
|
|
1785
1785
|
});
|
|
1786
1786
|
return e({
|
|
1787
1787
|
onOutsideDropdownClick: B
|
|
1788
|
-
}), { __sfc: !0, slots: s, emit: l, props: t, selectedValue: o, multiple: i, dropdownOptionsListboxRef: r, t: v, isDropdownOpen:
|
|
1788
|
+
}), { __sfc: !0, slots: s, emit: l, props: t, selectedValue: o, multiple: i, dropdownOptionsListboxRef: r, t: v, isDropdownOpen: u, noResultsMessage: c, conditionalClasses: _, conditionalListboxClasses: f, actions: p, internalSelectedValue: S, listeners: m, onEscapeKey: k, onOutsideDropdownClick: B, popperContainerOrPopoverComponent: b, popperContainerOrPopoverProps: O, BentoListbox: Pe };
|
|
1789
1789
|
}
|
|
1790
1790
|
});
|
|
1791
1791
|
var Vl = function() {
|
|
1792
1792
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
1793
|
-
return t.isDropdownOpen ? l(t.popperContainerOrPopoverComponent, e._b({ tag: "component", staticClass: "b-dropdown-options-container", class: t.conditionalClasses }, "component", t.popperContainerOrPopoverProps, !1), [l("div", { on: { keydown: function(s) {
|
|
1793
|
+
return t.isDropdownOpen ? l(t.popperContainerOrPopoverComponent, e._b({ tag: "component", staticClass: "b-dropdown-options-container", class: t.conditionalClasses }, "component", t.popperContainerOrPopoverProps, !1), [l("div", { on: { keydown: [function(s) {
|
|
1794
|
+
s.stopPropagation();
|
|
1795
|
+
}, function(s) {
|
|
1794
1796
|
return !s.type.indexOf("key") && e._k(s.keyCode, "esc", 27, s.key, ["Esc", "Escape"]) ? null : t.onEscapeKey.apply(null, arguments);
|
|
1795
|
-
} } }, [l(t.BentoListbox, e._g({ ref: "dropdownOptionsListboxRef", staticClass: "b-dropdown-options-container__listbox", class: t.conditionalListboxClasses, attrs: { id: e.id, "aria-label": e.ariaLabel, "component-loading": e.componentLoading, "empty-state": e.emptyState, "is-option-disabled": e.isOptionDisabled, items: e.items, "selected-value": t.internalSelectedValue, multiple: t.multiple, "static-categories": e.staticCategories, "no-results-message": t.noResultsMessage, searching: e.searching, loading: e.loading, "lazy-load-type": e.lazyLoadType, "has-more-items": e.hasMoreItems, "virtual-scroll": e.virtualScroll }, scopedSlots: e._u([e._l(t.slots, function(s, o) {
|
|
1797
|
+
}] } }, [l(t.BentoListbox, e._g({ ref: "dropdownOptionsListboxRef", staticClass: "b-dropdown-options-container__listbox", class: t.conditionalListboxClasses, attrs: { id: e.id, "aria-label": e.ariaLabel, "component-loading": e.componentLoading, "empty-state": e.emptyState, "is-option-disabled": e.isOptionDisabled, items: e.items, "selected-value": t.internalSelectedValue, multiple: t.multiple, "static-categories": e.staticCategories, "no-results-message": t.noResultsMessage, searching: e.searching, loading: e.loading, "lazy-load-type": e.lazyLoadType, "has-more-items": e.hasMoreItems, "virtual-scroll": e.virtualScroll }, scopedSlots: e._u([e._l(t.slots, function(s, o) {
|
|
1796
1798
|
return { key: o, fn: function(i) {
|
|
1797
1799
|
return [e._t(o, null, null, i)];
|
|
1798
1800
|
} };
|
|
1799
1801
|
})], null, !0) }, t.listeners))], 1)]) : e._e();
|
|
1800
|
-
}, zl = [], Ul = /* @__PURE__ */
|
|
1801
|
-
|
|
1802
|
+
}, zl = [], Ul = /* @__PURE__ */ K(
|
|
1803
|
+
Fl,
|
|
1802
1804
|
Vl,
|
|
1803
1805
|
zl,
|
|
1804
1806
|
!1,
|
|
1805
1807
|
null,
|
|
1806
|
-
"
|
|
1808
|
+
"3cd9fa1d"
|
|
1807
1809
|
);
|
|
1808
1810
|
const Gl = Ul.exports;
|
|
1809
|
-
var
|
|
1811
|
+
var Q = /* @__PURE__ */ ((a) => (a.DISABLED = "disabled", a.READONLY = "readonly", a.HAS_ITEMS = "has-items", a.OPENED = "opened", a.ERROR = "error", a))(Q || {}), Y = /* @__PURE__ */ ((a) => (a.OPEN = "dropdown-base-open", a.KEYDOWN = "dropdown-base-keydown", a.CLOSE = "dropdown-base-close", a.INPUT = "dropdown-base-input", a.CLEAR = "dropdown-base-clear", a))(Y || {});
|
|
1810
1812
|
const Kl = /* @__PURE__ */ Symbol("dropdown small size injection key"), rt = /* @__PURE__ */ Symbol("dropdown underline style injection key"), ql = {
|
|
1811
1813
|
"de-DE": {
|
|
1812
1814
|
clearSearch: "Suche löschen"
|
|
@@ -1929,22 +1931,22 @@ const Kl = /* @__PURE__ */ Symbol("dropdown small size injection key"), rt = /*
|
|
|
1929
1931
|
},
|
|
1930
1932
|
emits: [],
|
|
1931
1933
|
setup(a, { expose: e, emit: l }) {
|
|
1932
|
-
const t = a, { t: s } =
|
|
1933
|
-
[`b-dropdown-base-textbox--${
|
|
1934
|
-
[`b-dropdown-base-textbox--${
|
|
1935
|
-
[`b-dropdown-base-textbox--${
|
|
1934
|
+
const t = a, { t: s } = pe(), o = Ve(), i = Oe(), r = et(i), v = I(null), u = ne("textbox"), c = ze(rt, !1), _ = n(() => ({
|
|
1935
|
+
[`b-dropdown-base-textbox--${Q.DISABLED}`]: t.disabled,
|
|
1936
|
+
[`b-dropdown-base-textbox--${Q.READONLY}`]: t.readonly,
|
|
1937
|
+
[`b-dropdown-base-textbox--${Q.HAS_ITEMS}`]: !!t.additionalItemsSelected,
|
|
1936
1938
|
"b-dropdown-base-textbox--underline": c
|
|
1937
|
-
})),
|
|
1939
|
+
})), f = n(
|
|
1938
1940
|
() => B.value && o["aria-required"] ? "true" : null
|
|
1939
|
-
),
|
|
1941
|
+
), p = n(() => ({
|
|
1940
1942
|
"b-dropdown-base-textbox__input--dynamic-filtering": t.dynamicFiltering
|
|
1941
|
-
})),
|
|
1943
|
+
})), S = n(() => t.dynamicFiltering && !!t.value && t.open), m = n(
|
|
1942
1944
|
() => {
|
|
1943
|
-
var
|
|
1945
|
+
var g;
|
|
1944
1946
|
return {
|
|
1945
1947
|
"aria-haspopup": "listbox",
|
|
1946
1948
|
"aria-controls": t.ariaControls,
|
|
1947
|
-
"aria-describedby": (
|
|
1949
|
+
"aria-describedby": (g = o["aria-describedby"]) == null ? void 0 : g.toString(),
|
|
1948
1950
|
"aria-expanded": t.ariaExpanded ? "true" : "false",
|
|
1949
1951
|
"aria-labelledby": t.ariaLabelledby,
|
|
1950
1952
|
"aria-label": t.ariaLabelledby ? null : t.ariaLabel,
|
|
@@ -1955,31 +1957,31 @@ const Kl = /* @__PURE__ */ Symbol("dropdown small size injection key"), rt = /*
|
|
|
1955
1957
|
}
|
|
1956
1958
|
), k = n(
|
|
1957
1959
|
() => t.multiple ? t.selectedValueItem : []
|
|
1958
|
-
), B = n(() => t.dynamicFiltering && (t.open || t.alwaysComboboxIsInput)), b = n(() => t.selectedValueItem && !t.multiple),
|
|
1960
|
+
), B = n(() => t.dynamicFiltering && (t.open || t.alwaysComboboxIsInput)), b = n(() => t.selectedValueItem && !t.multiple), O = n(
|
|
1959
1961
|
() => t.multiple && t.selectedValueItem && k.value.length > 0 && t.showSlotContentInMultiple
|
|
1960
1962
|
);
|
|
1961
1963
|
te(
|
|
1962
1964
|
() => B.value,
|
|
1963
1965
|
() => {
|
|
1964
|
-
B.value && !t.alwaysComboboxIsInput &&
|
|
1966
|
+
B.value && !t.alwaysComboboxIsInput && j(() => {
|
|
1965
1967
|
v.value.focus();
|
|
1966
1968
|
});
|
|
1967
1969
|
}
|
|
1968
1970
|
);
|
|
1969
1971
|
const T = async () => {
|
|
1970
|
-
!t.disabled && !t.readonly && (l(
|
|
1971
|
-
},
|
|
1972
|
-
t.open && (v.value.focus(), l(
|
|
1973
|
-
}, w = (
|
|
1974
|
-
l(
|
|
1975
|
-
}, A = (
|
|
1976
|
-
!t.readonly && !t.disabled ? l(
|
|
1977
|
-
},
|
|
1972
|
+
!t.disabled && !t.readonly && (l(Y.OPEN), await j(), v.value.focus());
|
|
1973
|
+
}, L = (g) => {
|
|
1974
|
+
t.open && (g && ue(g), v.value.focus(), l(Y.CLOSE));
|
|
1975
|
+
}, w = (g) => t.open && g.target.tagName === "INPUT" ? null : t.open ? L() : T(), N = () => {
|
|
1976
|
+
l(Y.CLEAR), l(Y.INPUT, ""), v.value.focus();
|
|
1977
|
+
}, A = (g) => {
|
|
1978
|
+
!t.readonly && !t.disabled ? l(Y.INPUT, g.target.value) : (g.preventDefault(), g.stopPropagation());
|
|
1979
|
+
}, h = () => {
|
|
1978
1980
|
v.value.focus();
|
|
1979
1981
|
};
|
|
1980
1982
|
return e({
|
|
1981
|
-
focus:
|
|
1982
|
-
}), { __sfc: !0, t: s, attrs: o, slots: i, hasSlot: r, props: t, emit: l, textbox: v, textboxId:
|
|
1983
|
+
focus: h
|
|
1984
|
+
}), { __sfc: !0, t: s, attrs: o, slots: i, hasSlot: r, props: t, emit: l, textbox: v, textboxId: u, isUnderlineStyle: c, conditionalClasses: _, showRequiredAttribute: f, comboboxConditionalClasses: p, isFiltering: S, ariaAttributes: m, selectedValueItems: k, shouldShowInput: B, shouldShowSingleSelectSlot: b, shouldShowMultipleSlot: O, onOpenDropdown: T, onCloseDropdown: L, onToggleDropdown: w, onClearSearch: N, onInputEvent: A, focus: h, BentoTypography: ie, DropdownBaseTextboxEvent: Y, CrossCircleFillIcon: ft, CrossCircleFillSmallIcon: bt, BentoDropdownSize: ge };
|
|
1983
1985
|
}
|
|
1984
1986
|
});
|
|
1985
1987
|
var jl = function() {
|
|
@@ -2003,13 +2005,13 @@ var jl = function() {
|
|
|
2003
2005
|
}, keyup: function(s) {
|
|
2004
2006
|
return !s.type.indexOf("key") && e._k(s.keyCode, "space", 32, s.key, [" ", "Spacebar"]) ? null : t.onClearSearch.apply(null, arguments);
|
|
2005
2007
|
} } }, [e.size === t.BentoDropdownSize.SMALL ? l(t.CrossCircleFillSmallIcon, { attrs: { "svg-title": t.t("clearSearch") } }) : l(t.CrossCircleFillIcon, { attrs: { "svg-title": t.t("clearSearch") } })], 1) : e._e()])], 1);
|
|
2006
|
-
}, Hl = [], Jl = /* @__PURE__ */
|
|
2008
|
+
}, Hl = [], Jl = /* @__PURE__ */ K(
|
|
2007
2009
|
Wl,
|
|
2008
2010
|
jl,
|
|
2009
2011
|
Hl,
|
|
2010
2012
|
!1,
|
|
2011
2013
|
null,
|
|
2012
|
-
"
|
|
2014
|
+
"20b3acdb"
|
|
2013
2015
|
);
|
|
2014
2016
|
const ct = Jl.exports, Xl = U({
|
|
2015
2017
|
name: "dropdown-default-textbox",
|
|
@@ -2103,34 +2105,34 @@ const ct = Jl.exports, Xl = U({
|
|
|
2103
2105
|
},
|
|
2104
2106
|
emits: ["clear", "close", "input", "keydown", "open"],
|
|
2105
2107
|
setup(a, { expose: e, emit: l }) {
|
|
2106
|
-
const t = a, s = Oe(), o =
|
|
2107
|
-
[`b-dropdown-default-textbox--${
|
|
2108
|
-
[`b-dropdown-default-textbox--${
|
|
2109
|
-
[`b-dropdown-default-textbox--${
|
|
2110
|
-
[`b-dropdown-default-textbox--${
|
|
2108
|
+
const t = a, s = Oe(), o = I(null), i = n(() => ({
|
|
2109
|
+
[`b-dropdown-default-textbox--${Q.ERROR}`]: !t.disabled && !t.readonly && t.isInvalid,
|
|
2110
|
+
[`b-dropdown-default-textbox--${Q.DISABLED}`]: t.disabled,
|
|
2111
|
+
[`b-dropdown-default-textbox--${Q.READONLY}`]: t.readonly,
|
|
2112
|
+
[`b-dropdown-default-textbox--${Q.OPENED}`]: t.open,
|
|
2111
2113
|
"b-dropdown-default-textbox--condensed": t.condensed
|
|
2112
|
-
})), r = n(() => t.open && !t.disabled && !t.readonly), v = (
|
|
2113
|
-
l("input",
|
|
2114
|
-
},
|
|
2115
|
-
l("keydown",
|
|
2116
|
-
}, c = (
|
|
2117
|
-
|
|
2118
|
-
},
|
|
2119
|
-
|
|
2120
|
-
},
|
|
2121
|
-
|
|
2122
|
-
},
|
|
2123
|
-
[
|
|
2124
|
-
[
|
|
2125
|
-
[
|
|
2126
|
-
[
|
|
2127
|
-
[
|
|
2128
|
-
},
|
|
2114
|
+
})), r = n(() => t.open && !t.disabled && !t.readonly), v = (m) => {
|
|
2115
|
+
l("input", m);
|
|
2116
|
+
}, u = (m) => {
|
|
2117
|
+
l("keydown", m);
|
|
2118
|
+
}, c = (m) => {
|
|
2119
|
+
ue(m), l("open");
|
|
2120
|
+
}, _ = (m) => {
|
|
2121
|
+
ue(m), l("close");
|
|
2122
|
+
}, f = (m) => {
|
|
2123
|
+
ue(m), l("clear");
|
|
2124
|
+
}, p = {
|
|
2125
|
+
[Y.INPUT]: v,
|
|
2126
|
+
[Y.OPEN]: c,
|
|
2127
|
+
[Y.CLOSE]: _,
|
|
2128
|
+
[Y.CLEAR]: f,
|
|
2129
|
+
[Y.KEYDOWN]: u
|
|
2130
|
+
}, S = () => {
|
|
2129
2131
|
o.value.focus();
|
|
2130
2132
|
};
|
|
2131
2133
|
return e({
|
|
2132
|
-
focus:
|
|
2133
|
-
}), { __sfc: !0, emit: l, slots: s, props: t, baseTextbox: o, conditionalClasses: i, isDropdownOpen: r, onInput: v, onKeyDown:
|
|
2134
|
+
focus: S
|
|
2135
|
+
}), { __sfc: !0, emit: l, slots: s, props: t, baseTextbox: o, conditionalClasses: i, isDropdownOpen: r, onInput: v, onKeyDown: u, openDropdown: c, closeDropdown: _, clearValue: f, listeners: p, focus: S, DropdownBaseTextbox: ct, ChevronDownIcon: tt, ChevronUpIcon: lt };
|
|
2134
2136
|
}
|
|
2135
2137
|
});
|
|
2136
2138
|
var Ql = function() {
|
|
@@ -2142,7 +2144,7 @@ var Ql = function() {
|
|
|
2142
2144
|
}), { key: "icon", fn: function() {
|
|
2143
2145
|
return [l("div", { staticClass: "b-dropdown-default-textbox__chevron" }, [l(t.ChevronUpIcon, { directives: [{ name: "show", rawName: "v-show", value: t.isDropdownOpen, expression: "isDropdownOpen" }], attrs: { "svg-title": "opened" } }), l(t.ChevronDownIcon, { directives: [{ name: "show", rawName: "v-show", value: !t.isDropdownOpen, expression: "!isDropdownOpen" }], attrs: { "svg-title": "closed" } })], 1)];
|
|
2144
2146
|
}, proxy: !0 }], null, !0) }, "dropdown-base-textbox", { ...e.$attrs, ...e.$props }, !1), t.listeners))], 1);
|
|
2145
|
-
}, ea = [], ta = /* @__PURE__ */
|
|
2147
|
+
}, ea = [], ta = /* @__PURE__ */ K(
|
|
2146
2148
|
Zl,
|
|
2147
2149
|
Ql,
|
|
2148
2150
|
ea,
|
|
@@ -2160,7 +2162,7 @@ const aa = {
|
|
|
2160
2162
|
var sa = function() {
|
|
2161
2163
|
var e = this, l = e._self._c;
|
|
2162
2164
|
return l("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? l("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), l("path", { attrs: { fill: "#001222", d: "M5.00011 5.43922L8.00011 8.43922L11.0001 5.43922L12.0608 6.49988L8.00011 10.5605L3.93945 6.49988L5.00011 5.43922Z" } })]);
|
|
2163
|
-
}, oa = [], na = /* @__PURE__ */
|
|
2165
|
+
}, oa = [], na = /* @__PURE__ */ K(
|
|
2164
2166
|
aa,
|
|
2165
2167
|
sa,
|
|
2166
2168
|
oa,
|
|
@@ -2178,15 +2180,15 @@ const ra = {
|
|
|
2178
2180
|
var ca = function() {
|
|
2179
2181
|
var e = this, l = e._self._c;
|
|
2180
2182
|
return l("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? l("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), l("path", { attrs: { fill: "#001222", d: "M10.9999 10.5608L7.9999 7.56077L4.9999 10.5608L3.93924 9.50011L7.9999 5.43945L12.0606 9.50011L10.9999 10.5608Z" } })]);
|
|
2181
|
-
},
|
|
2183
|
+
}, da = [], ua = /* @__PURE__ */ K(
|
|
2182
2184
|
ra,
|
|
2183
2185
|
ca,
|
|
2184
|
-
|
|
2186
|
+
da,
|
|
2185
2187
|
!1,
|
|
2186
2188
|
null,
|
|
2187
2189
|
null
|
|
2188
2190
|
);
|
|
2189
|
-
const pa =
|
|
2191
|
+
const pa = ua.exports, fa = U({
|
|
2190
2192
|
name: "dropdown-small-textbox",
|
|
2191
2193
|
inheritAttrs: !1
|
|
2192
2194
|
}), ba = /* @__PURE__ */ U({
|
|
@@ -2247,33 +2249,33 @@ const pa = da.exports, fa = U({
|
|
|
2247
2249
|
},
|
|
2248
2250
|
emits: ["clear", "close", "input", "keydown", "open"],
|
|
2249
2251
|
setup(a, { expose: e, emit: l }) {
|
|
2250
|
-
const t = a, s =
|
|
2251
|
-
[`b-dropdown-small-textbox--${
|
|
2252
|
-
[`b-dropdown-small-textbox--${
|
|
2253
|
-
[`b-dropdown-small-textbox--${
|
|
2252
|
+
const t = a, s = I(null), o = ze(rt, !1), i = n(() => ({
|
|
2253
|
+
[`b-dropdown-small-textbox--${Q.DISABLED}`]: t.disabled,
|
|
2254
|
+
[`b-dropdown-small-textbox--${Q.READONLY}`]: t.readonly,
|
|
2255
|
+
[`b-dropdown-small-textbox--${Q.OPENED}`]: t.open,
|
|
2254
2256
|
"b-dropdown-small-textbox--underline": o
|
|
2255
|
-
})), r = n(() => t.open && !t.disabled && !t.readonly), v = (
|
|
2256
|
-
l("input",
|
|
2257
|
-
},
|
|
2258
|
-
l("keydown",
|
|
2259
|
-
}, c = (
|
|
2260
|
-
|
|
2261
|
-
},
|
|
2262
|
-
|
|
2263
|
-
},
|
|
2264
|
-
|
|
2265
|
-
},
|
|
2266
|
-
[
|
|
2267
|
-
[
|
|
2268
|
-
[
|
|
2269
|
-
[
|
|
2270
|
-
[
|
|
2271
|
-
},
|
|
2257
|
+
})), r = n(() => t.open && !t.disabled && !t.readonly), v = (m) => {
|
|
2258
|
+
l("input", m);
|
|
2259
|
+
}, u = (m) => {
|
|
2260
|
+
l("keydown", m);
|
|
2261
|
+
}, c = (m) => {
|
|
2262
|
+
ue(m), l("open");
|
|
2263
|
+
}, _ = (m) => {
|
|
2264
|
+
ue(m), l("close");
|
|
2265
|
+
}, f = (m) => {
|
|
2266
|
+
ue(m), l("clear");
|
|
2267
|
+
}, p = {
|
|
2268
|
+
[Y.INPUT]: v,
|
|
2269
|
+
[Y.OPEN]: c,
|
|
2270
|
+
[Y.CLOSE]: _,
|
|
2271
|
+
[Y.CLEAR]: f,
|
|
2272
|
+
[Y.KEYDOWN]: u
|
|
2273
|
+
}, S = () => {
|
|
2272
2274
|
s.value.focus();
|
|
2273
2275
|
};
|
|
2274
2276
|
return e({
|
|
2275
|
-
focus:
|
|
2276
|
-
}), { __sfc: !0, emit: l, props: t, baseTextbox: s, isUnderlineStyle: o, conditionalClasses: i, isDropdownOpen: r, onInput: v, onKeyDown:
|
|
2277
|
+
focus: S
|
|
2278
|
+
}), { __sfc: !0, emit: l, props: t, baseTextbox: s, isUnderlineStyle: o, conditionalClasses: i, isDropdownOpen: r, onInput: v, onKeyDown: u, openDropdown: c, closeDropdown: _, clearValue: f, listeners: p, focus: S, BentoDropdownSize: ge, DropdownBaseTextbox: ct, ChevronDownSmallIcon: ia, ChevronUpSmallIcon: pa };
|
|
2277
2279
|
}
|
|
2278
2280
|
});
|
|
2279
2281
|
var va = function() {
|
|
@@ -2281,7 +2283,7 @@ var va = function() {
|
|
|
2281
2283
|
return l("div", { staticClass: "b-dropdown-small-textbox", class: t.conditionalClasses }, [l(t.DropdownBaseTextbox, e._g(e._b({ ref: "baseTextbox", staticClass: "b-dropdown-small-textbox__textbox", attrs: { size: t.BentoDropdownSize.SMALL }, scopedSlots: e._u([{ key: "icon", fn: function() {
|
|
2282
2284
|
return [l("div", { staticClass: "b-dropdown-small-textbox__chevron" }, [l(t.ChevronUpSmallIcon, { directives: [{ name: "show", rawName: "v-show", value: t.isDropdownOpen, expression: "isDropdownOpen" }], attrs: { "svg-title": "opened" } }), l(t.ChevronDownSmallIcon, { directives: [{ name: "show", rawName: "v-show", value: !t.isDropdownOpen, expression: "!isDropdownOpen" }], attrs: { "svg-title": "closed" } })], 1)];
|
|
2283
2285
|
}, proxy: !0 }]) }, "dropdown-base-textbox", { ...e.$attrs, ...e.$props }, !1), t.listeners))], 1);
|
|
2284
|
-
}, ma = [], _a = /* @__PURE__ */
|
|
2286
|
+
}, ma = [], _a = /* @__PURE__ */ K(
|
|
2285
2287
|
ba,
|
|
2286
2288
|
va,
|
|
2287
2289
|
ma,
|
|
@@ -2305,7 +2307,7 @@ const ya = _a.exports, ga = (a, e) => e.value.reduce((l, t) => {
|
|
|
2305
2307
|
})
|
|
2306
2308
|
);
|
|
2307
2309
|
return n(() => l.value.length ? s.value ? ga(l, a) : l.value.map(({ label: i, displayValue: r }) => r ?? i).join(", ") : e.value || null);
|
|
2308
|
-
},
|
|
2310
|
+
}, dt = (a) => {
|
|
2309
2311
|
var e;
|
|
2310
2312
|
(e = a.value.$children) == null || e[0].$refs.textbox.focus();
|
|
2311
2313
|
}, Sa = ({
|
|
@@ -2318,77 +2320,79 @@ const ya = _a.exports, ga = (a, e) => e.value.reduce((l, t) => {
|
|
|
2318
2320
|
isMultiple: i,
|
|
2319
2321
|
totalItemCount: r,
|
|
2320
2322
|
isVirtualScroll: v
|
|
2321
|
-
},
|
|
2322
|
-
const
|
|
2323
|
-
var
|
|
2324
|
-
s.value && await
|
|
2325
|
-
},
|
|
2326
|
-
var
|
|
2327
|
-
s.value && await
|
|
2328
|
-
const
|
|
2323
|
+
}, u, c, _) => {
|
|
2324
|
+
const f = async (E) => {
|
|
2325
|
+
var F;
|
|
2326
|
+
s.value && await j(), (F = o.value[E]) == null || F.focus();
|
|
2327
|
+
}, p = async (E) => {
|
|
2328
|
+
var le, q;
|
|
2329
|
+
s.value && await j();
|
|
2330
|
+
const F = (le = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : le.$el.querySelectorAll(
|
|
2329
2331
|
"button"
|
|
2330
2332
|
);
|
|
2331
|
-
|
|
2332
|
-
},
|
|
2333
|
-
var
|
|
2334
|
-
return (
|
|
2335
|
-
|
|
2333
|
+
F != null && F.length ? (q = F[E]) == null || q.focus() : f(E);
|
|
2334
|
+
}, S = (E) => {
|
|
2335
|
+
var F;
|
|
2336
|
+
return (F = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : F.setListboxFocusedIndex(
|
|
2337
|
+
E
|
|
2336
2338
|
);
|
|
2337
|
-
},
|
|
2338
|
-
var
|
|
2339
|
-
await ((
|
|
2340
|
-
}, k = (
|
|
2341
|
-
|
|
2342
|
-
v ?
|
|
2339
|
+
}, m = async (E) => {
|
|
2340
|
+
var F;
|
|
2341
|
+
await ((F = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : F.navigateToItem(E));
|
|
2342
|
+
}, k = (E) => {
|
|
2343
|
+
j(() => {
|
|
2344
|
+
v ? m(E) : (S(E), f(E));
|
|
2343
2345
|
});
|
|
2344
2346
|
}, B = () => {
|
|
2345
2347
|
t.value || c(), k(0);
|
|
2346
2348
|
}, b = () => {
|
|
2347
|
-
t.value || c(),
|
|
2349
|
+
t.value || c(), j(() => {
|
|
2348
2350
|
k(v ? r.value - 1 : o.value.length - 1);
|
|
2349
2351
|
});
|
|
2350
|
-
},
|
|
2351
|
-
|
|
2352
|
-
}, T = ({ detail:
|
|
2353
|
-
O
|
|
2354
|
-
},
|
|
2355
|
-
|
|
2356
|
-
}, w = () => {
|
|
2357
|
-
|
|
2358
|
-
}, N = ({ detail:
|
|
2359
|
-
O
|
|
2360
|
-
}, A = ({ detail:
|
|
2361
|
-
O
|
|
2362
|
-
},
|
|
2363
|
-
t.value &&
|
|
2364
|
-
},
|
|
2365
|
-
t.value && (
|
|
2352
|
+
}, O = (E) => {
|
|
2353
|
+
E.preventDefault(), E.stopPropagation();
|
|
2354
|
+
}, T = ({ detail: E }) => {
|
|
2355
|
+
O(E), B();
|
|
2356
|
+
}, L = ({ detail: E }) => {
|
|
2357
|
+
O(E), b();
|
|
2358
|
+
}, w = ({ detail: E }) => {
|
|
2359
|
+
O(E), B();
|
|
2360
|
+
}, N = ({ detail: E }) => {
|
|
2361
|
+
O(E), b();
|
|
2362
|
+
}, A = ({ detail: E }) => {
|
|
2363
|
+
O(E), u(), t.value && (i ? p(0) : k(l.value));
|
|
2364
|
+
}, h = ({ detail: E }) => {
|
|
2365
|
+
O(E), u(), t.value && (i ? p(0) : k(l.value));
|
|
2366
|
+
}, g = ({ detail: E }) => {
|
|
2367
|
+
E.stopPropagation(), t.value && _();
|
|
2368
|
+
}, R = ({ detail: E }) => {
|
|
2369
|
+
E.stopPropagation(), t.value && (_(), dt(a));
|
|
2366
2370
|
};
|
|
2367
2371
|
return n(() => ({
|
|
2368
|
-
[z.ARROW_DOWN]:
|
|
2369
|
-
[z.ARROW_UP]:
|
|
2370
|
-
[z.HOME]:
|
|
2371
|
-
[z.END]:
|
|
2372
|
-
...s.value ? {} : { [z.SPACE]:
|
|
2373
|
-
[z.ENTER]:
|
|
2372
|
+
[z.ARROW_DOWN]: T,
|
|
2373
|
+
[z.ARROW_UP]: L,
|
|
2374
|
+
[z.HOME]: w,
|
|
2375
|
+
[z.END]: N,
|
|
2376
|
+
...s.value ? {} : { [z.SPACE]: A },
|
|
2377
|
+
[z.ENTER]: h,
|
|
2374
2378
|
...s.value ? {} : { [z.TAB]: g },
|
|
2375
|
-
[z.ESCAPE]:
|
|
2379
|
+
[z.ESCAPE]: R
|
|
2376
2380
|
}));
|
|
2377
2381
|
}, xa = ({ inputContainerRef: a, isDropdownOpen: e }, l) => {
|
|
2378
2382
|
const t = () => {
|
|
2379
|
-
e.value && l(),
|
|
2380
|
-
|
|
2383
|
+
e.value && l(), j(() => {
|
|
2384
|
+
dt(a);
|
|
2381
2385
|
});
|
|
2382
2386
|
};
|
|
2383
2387
|
return {
|
|
2384
|
-
[
|
|
2385
|
-
[
|
|
2386
|
-
[
|
|
2387
|
-
[
|
|
2388
|
+
[d.ENTER]: t,
|
|
2389
|
+
[d.ESCAPE]: t,
|
|
2390
|
+
[d.TAB]: t,
|
|
2391
|
+
[d.SPACE]: t
|
|
2388
2392
|
};
|
|
2389
2393
|
};
|
|
2390
2394
|
function Ca(a, e, l, t, s) {
|
|
2391
|
-
const o =
|
|
2395
|
+
const o = I(a), i = I(e), r = (c, _ = []) => _.flatMap((f) => f.label.toLocaleLowerCase().includes(c) ? t != null && t.value && f.items ? [...r(c, f.items)] : [f, ...r(c, f.items)] : f.items ? [...r(c, f.items)] : []), v = l !== void 0 ? it(() => l(o.value), s ?? 300) : void 0;
|
|
2392
2396
|
return te(o, () => {
|
|
2393
2397
|
v !== void 0 && v();
|
|
2394
2398
|
}), n(() => {
|
|
@@ -2479,7 +2483,7 @@ const Oa = {
|
|
|
2479
2483
|
items: { default: () => [] },
|
|
2480
2484
|
loading: { type: Boolean, default: !1 },
|
|
2481
2485
|
componentLoading: { type: Boolean, default: !1 },
|
|
2482
|
-
lazyLoadType: { default:
|
|
2486
|
+
lazyLoadType: { default: Pe.props.lazyLoadType.default },
|
|
2483
2487
|
multiple: { type: Boolean, default: !1 },
|
|
2484
2488
|
search: { default: void 0 },
|
|
2485
2489
|
showSlotContentInMultiple: { type: Boolean, default: !1 },
|
|
@@ -2493,32 +2497,32 @@ const Oa = {
|
|
|
2493
2497
|
},
|
|
2494
2498
|
emits: ["input", "update:model-value", "show-more", "open"],
|
|
2495
2499
|
setup(a, { expose: e, emit: l }) {
|
|
2496
|
-
var
|
|
2497
|
-
const t = a, s = Ve(), o = Oe(), i = et(o), { t: r } =
|
|
2498
|
-
|
|
2500
|
+
var P, ce;
|
|
2501
|
+
const t = a, s = Ve(), o = Oe(), i = et(o), { t: r } = pe(), { emitValue: v } = mt(l), u = I(null), c = I(null), _ = I(null), f = I(!1), p = ne("bento-dropdown-options-container"), S = ne("dropdown-label"), m = ne("dropdown-description"), k = ne("dropdown-error"), { isReadOnly: B } = _t(W(t, "readonly")), b = n(() => t.modelValue ?? t.value), { cachedSelectedListboxOptions: O, cachedListboxSelectedValues: T, setCachedValues: L } = Ml(
|
|
2502
|
+
W(t, "items"),
|
|
2499
2503
|
b,
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
), w =
|
|
2504
|
+
W(t, "multiple"),
|
|
2505
|
+
W(t, "enableValueLabelPair")
|
|
2506
|
+
), w = I(s["aria-label"]), N = I(s["aria-describedby"]), { ariaLabel: A, label: h } = Qe(t), g = n(() => r("ariaLabelFallback")), R = vt({
|
|
2503
2507
|
// TODO: take ariaLabel ref away when aria-label prop is removed
|
|
2504
2508
|
ariaLabel: A.value || w,
|
|
2505
|
-
label:
|
|
2506
|
-
defaultFallback:
|
|
2507
|
-
}),
|
|
2509
|
+
label: h,
|
|
2510
|
+
defaultFallback: g
|
|
2511
|
+
}), G = t.size === ge.SMALL || ze(Kl, !1), E = n(() => G ? ge.SMALL : ge.DEFAULT), F = n(() => ({
|
|
2508
2512
|
"b-dropdown--condensed": t.condensed
|
|
2509
2513
|
})), le = n(() => ({
|
|
2510
2514
|
"b-dropdown__description--error": !!t.errorMessage
|
|
2511
|
-
})),
|
|
2512
|
-
|
|
2515
|
+
})), q = I(""), V = W(t, "items"), ae = W(t, "staticCategories"), fe = Ca(
|
|
2516
|
+
q,
|
|
2513
2517
|
V,
|
|
2514
|
-
(
|
|
2518
|
+
(P = t == null ? void 0 : t.search) == null ? void 0 : P.searchEvent,
|
|
2515
2519
|
ae,
|
|
2516
2520
|
(ce = t == null ? void 0 : t.search) == null ? void 0 : ce.debounceTime
|
|
2517
|
-
), he = n(() => t.dynamicFiltering && !!
|
|
2521
|
+
), he = n(() => t.dynamicFiltering && !!q.value), Re = ha({
|
|
2518
2522
|
items: V,
|
|
2519
|
-
placeholder:
|
|
2520
|
-
isMultiSelect:
|
|
2521
|
-
selectedValues:
|
|
2523
|
+
placeholder: W(t, "placeholder"),
|
|
2524
|
+
isMultiSelect: W(t, "multiple"),
|
|
2525
|
+
selectedValues: O
|
|
2522
2526
|
}), Me = n(() => {
|
|
2523
2527
|
if (t != null && t.multiple && Array.isArray(b.value))
|
|
2524
2528
|
return t.items.filter(
|
|
@@ -2526,85 +2530,85 @@ const Oa = {
|
|
|
2526
2530
|
);
|
|
2527
2531
|
if (!t.multiple && t.staticCategories) {
|
|
2528
2532
|
const $ = t.items.find(
|
|
2529
|
-
(
|
|
2533
|
+
(Z) => {
|
|
2530
2534
|
var se;
|
|
2531
|
-
return (se =
|
|
2535
|
+
return (se = Z.items) == null ? void 0 : se.some((Ae) => Ae.value === b.value);
|
|
2532
2536
|
}
|
|
2533
2537
|
);
|
|
2534
|
-
return ($ ? $.items.find((
|
|
2538
|
+
return ($ ? $.items.find((Z) => Z.value === b.value) : t.items.find(({ value: Z }) => Z === b.value)) ?? null;
|
|
2535
2539
|
}
|
|
2536
2540
|
return t.items.find(({ value: $ }) => $ === b.value);
|
|
2537
|
-
}),
|
|
2538
|
-
const
|
|
2541
|
+
}), be = n(() => {
|
|
2542
|
+
const H = (J.value ? re.value : fe.value).findIndex(({ value: Z }) => {
|
|
2539
2543
|
var se;
|
|
2540
|
-
return t.enableValueLabelPair ? ((se = b.value) == null ? void 0 : se.value) ===
|
|
2544
|
+
return t.enableValueLabelPair ? ((se = b.value) == null ? void 0 : se.value) === Z : b.value === Z;
|
|
2541
2545
|
});
|
|
2542
|
-
return
|
|
2543
|
-
}), { isMultiLevelSelect:
|
|
2546
|
+
return H > -1 ? H : 0;
|
|
2547
|
+
}), { isMultiLevelSelect: J, flattenedItemsList: re } = nt(V), Se = n(() => J.value && !t.staticCategories), Ee = n(() => Se.value ? "treeitem" : "option"), Ie = n(() => {
|
|
2544
2548
|
if (t.multiple) {
|
|
2545
|
-
const $ = Array.isArray(b.value) ? b.value.length : 0,
|
|
2546
|
-
return $ === 0 ? null : !t.hasMoreItems &&
|
|
2549
|
+
const $ = Array.isArray(b.value) ? b.value.length : 0, H = J.value ? re.value.length : V.value.length;
|
|
2550
|
+
return $ === 0 ? null : !t.hasMoreItems && H > 0 && H === $ ? r("all") : $;
|
|
2547
2551
|
}
|
|
2548
2552
|
return null;
|
|
2549
2553
|
}), Le = n(
|
|
2550
2554
|
() => [
|
|
2551
|
-
t.description ?
|
|
2555
|
+
t.description ? m : null,
|
|
2552
2556
|
N.value,
|
|
2553
2557
|
t.errorMessage ? k : null
|
|
2554
2558
|
].filter(Boolean).join(" ") || null
|
|
2555
|
-
),
|
|
2559
|
+
), ve = n(() => {
|
|
2556
2560
|
var $;
|
|
2557
|
-
return ($ =
|
|
2558
|
-
}), { visibleDomOptions: xe, updateVisibleDomOptions:
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
+
return ($ = _.value) == null ? void 0 : $.$el;
|
|
2562
|
+
}), { visibleDomOptions: xe, updateVisibleDomOptions: me } = Ue(
|
|
2563
|
+
ve,
|
|
2564
|
+
fe,
|
|
2561
2565
|
Ee
|
|
2562
|
-
),
|
|
2563
|
-
B.value || (
|
|
2564
|
-
|
|
2566
|
+
), _e = () => {
|
|
2567
|
+
B.value || (f.value = !0, j(() => {
|
|
2568
|
+
me();
|
|
2565
2569
|
}));
|
|
2566
|
-
},
|
|
2567
|
-
|
|
2570
|
+
}, ye = () => {
|
|
2571
|
+
f.value = !1;
|
|
2568
2572
|
}, Ce = () => {
|
|
2569
|
-
B.value || (
|
|
2570
|
-
|
|
2571
|
-
}), he.value && (
|
|
2573
|
+
B.value || (f.value = !f.value, j(() => {
|
|
2574
|
+
me();
|
|
2575
|
+
}), he.value && (q.value = ""));
|
|
2572
2576
|
}, Te = () => {
|
|
2573
|
-
he.value && (
|
|
2577
|
+
he.value && (q.value = ""), f.value && (f.value = !1, _.value.onOutsideDropdownClick());
|
|
2574
2578
|
}, Ne = n(() => [
|
|
2575
2579
|
Te,
|
|
2576
2580
|
{
|
|
2577
|
-
ignore: [
|
|
2581
|
+
ignore: [ve]
|
|
2578
2582
|
}
|
|
2579
2583
|
]), we = async ($) => {
|
|
2580
|
-
t.multiple || (
|
|
2581
|
-
},
|
|
2582
|
-
l(
|
|
2584
|
+
t.multiple || (q.value = "", f.value = !1), L($), v(T.value), t.multiple || (await j(), M());
|
|
2585
|
+
}, y = () => {
|
|
2586
|
+
l(d.SHOW_MORE);
|
|
2583
2587
|
}, x = Sa(
|
|
2584
2588
|
{
|
|
2585
|
-
inputContainerRef:
|
|
2586
|
-
optionsContainerRef:
|
|
2587
|
-
selectedValueIndex:
|
|
2588
|
-
isDropdownOpen:
|
|
2589
|
-
isDynamicFltering:
|
|
2589
|
+
inputContainerRef: u,
|
|
2590
|
+
optionsContainerRef: _,
|
|
2591
|
+
selectedValueIndex: be,
|
|
2592
|
+
isDropdownOpen: f,
|
|
2593
|
+
isDynamicFltering: W(t, "dynamicFiltering"),
|
|
2590
2594
|
items: xe,
|
|
2591
2595
|
isMultiple: t.multiple,
|
|
2592
|
-
totalItemCount: n(() =>
|
|
2596
|
+
totalItemCount: n(() => fe.value.length),
|
|
2593
2597
|
isVirtualScroll: !(t != null && t.multiple) && (t == null ? void 0 : t.virtualScroll) !== !1 && (t == null ? void 0 : t.lazyLoadType) === "none"
|
|
2594
2598
|
},
|
|
2595
2599
|
Ce,
|
|
2596
|
-
|
|
2597
|
-
|
|
2600
|
+
_e,
|
|
2601
|
+
ye
|
|
2598
2602
|
), C = xa(
|
|
2599
2603
|
{
|
|
2600
|
-
inputContainerRef:
|
|
2601
|
-
isDropdownOpen:
|
|
2604
|
+
inputContainerRef: u,
|
|
2605
|
+
isDropdownOpen: f
|
|
2602
2606
|
},
|
|
2603
|
-
|
|
2607
|
+
ye
|
|
2604
2608
|
), D = {
|
|
2605
|
-
[
|
|
2606
|
-
[
|
|
2607
|
-
[
|
|
2609
|
+
[d.CLOSE_DROPDOWN]: ye,
|
|
2610
|
+
[d.SELECT]: we,
|
|
2611
|
+
[d.SHOW_MORE]: y,
|
|
2608
2612
|
...C
|
|
2609
2613
|
};
|
|
2610
2614
|
t.error && $e(
|
|
@@ -2620,25 +2624,25 @@ const Oa = {
|
|
|
2620
2624
|
"2.0.0"
|
|
2621
2625
|
);
|
|
2622
2626
|
const M = () => {
|
|
2623
|
-
|
|
2624
|
-
},
|
|
2625
|
-
var
|
|
2626
|
-
if (await
|
|
2627
|
+
u.value.focus();
|
|
2628
|
+
}, X = async () => {
|
|
2629
|
+
var Z, se, Ae, Ke, qe;
|
|
2630
|
+
if (await j(), !f.value || t.multiple || !_.value)
|
|
2627
2631
|
return;
|
|
2628
|
-
const $ =
|
|
2632
|
+
const $ = be.value;
|
|
2629
2633
|
if ($ <= 0)
|
|
2630
2634
|
return;
|
|
2631
|
-
const
|
|
2632
|
-
(qe =
|
|
2635
|
+
const H = (Ke = (Ae = (se = (Z = _.value) == null ? void 0 : Z.$refs) == null ? void 0 : se.dropdownOptionsListboxRef) == null ? void 0 : Ae.$refs) == null ? void 0 : Ke.listboxItemRef;
|
|
2636
|
+
(qe = H == null ? void 0 : H.scrollToItem) == null || qe.call(H, $);
|
|
2633
2637
|
};
|
|
2634
2638
|
return te(
|
|
2635
|
-
() =>
|
|
2639
|
+
() => f.value,
|
|
2636
2640
|
($) => {
|
|
2637
|
-
$ && (l("open"),
|
|
2641
|
+
$ && (l("open"), X());
|
|
2638
2642
|
}
|
|
2639
2643
|
), e({
|
|
2640
2644
|
focus: M
|
|
2641
|
-
}), { __sfc: !0, attrs: s, slots: o, hasSlot: i, props: t, emit: l, t: r, emitValue: v, inputContainerRef:
|
|
2645
|
+
}), { __sfc: !0, attrs: s, slots: o, hasSlot: i, props: t, emit: l, t: r, emitValue: v, inputContainerRef: u, inputContainerRefWrapper: c, optionsContainerRef: _, isDropdownOpen: f, dropdownOptionsContainerId: p, labelId: S, descriptionId: m, errorId: k, isReadOnly: B, dropdownValue: b, cachedSelectedListboxOptions: O, cachedListboxSelectedValues: T, setCachedValues: L, ariaLabelAttribute: w, ariaDescribedByAttribute: N, ariaLabel: A, label: h, computedAriaLabelFallbackMessage: g, computedAriaLabel: R, isInputComponent: G, computedSize: E, conditionalClasses: F, descriptionConditionalClasses: le, searchTerm: q, items: V, staticCategories: ae, filteredItems: fe, isSearching: he, displayValue: Re, selectedValueItem: Me, selectedValueIndex: be, isMultiLevelSelect: J, flattenedItemsList: re, isTreePattern: Se, computedOptionRole: Ee, additionalItemsSelected: Ie, ariaDescribedBy: Le, listboxRef: ve, visibleDomOptions: xe, updateVisibleDomOptions: me, openDropdown: _e, closeDropdown: ye, toggleDropdown: Ce, clickOutsideDropdown: Te, clickOutsideDropdownOptions: Ne, onOptionSelected: we, emitShowMoreEvent: y, textboxKeyboardNavigationListeners: x, listboxKeyboardNavigationListeners: C, listboxListeners: D, focus: M, scrollToSelectedOption: X, BentoDropdownOptionsContainer: Gl, BentoTypography: ie, ErrorMessage: wt, FieldLabel: Tt, BentoTeleport: It, vBentoClickOutsideDirective: Lt, vBentoKeyboardNavigationDirective: ke };
|
|
2642
2646
|
}
|
|
2643
2647
|
});
|
|
2644
2648
|
var La = function() {
|
|
@@ -2657,7 +2661,7 @@ var La = function() {
|
|
|
2657
2661
|
})], null, !0) }, t.listboxListeners))], 1) : e._e(), e.errorMessage ? l(t.ErrorMessage, { staticClass: "b-dropdown__error-message", attrs: { id: t.errorId, "error-message": e.errorMessage } }) : e._e(), e.description || t.hasSlot("description") ? l(t.BentoTypography, { staticClass: "b-dropdown__description", class: t.descriptionConditionalClasses, attrs: { id: t.descriptionId, el: "span" } }, [e._t("description", function() {
|
|
2658
2662
|
return [e._v(" " + e._s(e.description) + " ")];
|
|
2659
2663
|
})], 2) : e._e()], 1);
|
|
2660
|
-
}, Ta = [], wa = /* @__PURE__ */
|
|
2664
|
+
}, Ta = [], wa = /* @__PURE__ */ K(
|
|
2661
2665
|
Ia,
|
|
2662
2666
|
La,
|
|
2663
2667
|
Ta,
|
|
@@ -2670,10 +2674,10 @@ export {
|
|
|
2670
2674
|
ss as B,
|
|
2671
2675
|
Kt as C,
|
|
2672
2676
|
la as D,
|
|
2673
|
-
|
|
2677
|
+
d as a,
|
|
2674
2678
|
oe as b,
|
|
2675
2679
|
ge as c,
|
|
2676
|
-
|
|
2680
|
+
Pe as d,
|
|
2677
2681
|
nt as e,
|
|
2678
2682
|
Ca as f,
|
|
2679
2683
|
it as g,
|
|
@@ -2682,4 +2686,4 @@ export {
|
|
|
2682
2686
|
Ge as j,
|
|
2683
2687
|
Ml as u
|
|
2684
2688
|
};
|
|
2685
|
-
//# sourceMappingURL=dropdown.
|
|
2689
|
+
//# sourceMappingURL=dropdown.B21PZqp4.js.map
|