@adyen/bento-vue2 1.76.2 → 1.77.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/@types/index.d.ts +300 -35
- 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/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown-tag.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/input-field-phone-number.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/pagination.css +1 -1
- package/dist/assets/payment-method.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/tag.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/timeline-item.css +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{checkbox-group.CtNVRcmP.js → checkbox-group.C3RH5Gcg.js} +2 -2
- package/dist/chunks/{checkbox-group.CtNVRcmP.js.map → checkbox-group.C3RH5Gcg.js.map} +1 -1
- package/dist/chunks/{checkbox.nyUc0gLb.js → checkbox.itbBlXev.js} +3 -3
- package/dist/chunks/{checkbox.nyUc0gLb.js.map → checkbox.itbBlXev.js.map} +1 -1
- package/dist/chunks/{code-snippet.DFf3KMSi.js → code-snippet.BEbA1bIn.js} +2 -2
- package/dist/chunks/{code-snippet.DFf3KMSi.js.map → code-snippet.BEbA1bIn.js.map} +1 -1
- package/dist/chunks/{currency.AvvbekWO.js → currency.Cwhzzxw2.js} +2 -2
- package/dist/chunks/{currency.AvvbekWO.js.map → currency.Cwhzzxw2.js.map} +1 -1
- package/dist/chunks/{data-grid.C07AmPwV.js → data-grid.B-kBw540.js} +7 -7
- package/dist/chunks/{data-grid.C07AmPwV.js.map → data-grid.B-kBw540.js.map} +1 -1
- package/dist/chunks/date-picker.CKaQJcPa.js +168 -0
- package/dist/chunks/date-picker.CKaQJcPa.js.map +1 -0
- package/dist/chunks/date-picker.types.Ckt7zxGy.js +5 -0
- package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -0
- package/dist/chunks/date-range-picker.BtPxkPN0.js +942 -0
- package/dist/chunks/date-range-picker.BtPxkPN0.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.yLeN0E2z.js → dropdown-default-textbox.BCOVaw-a.js} +10 -10
- package/dist/chunks/dropdown-default-textbox.BCOVaw-a.js.map +1 -0
- package/dist/chunks/dropdown-tag.BXMgDH3v.js +294 -0
- package/dist/chunks/dropdown-tag.BXMgDH3v.js.map +1 -0
- package/dist/chunks/{dropdown.RxD2TqnP.js → dropdown.-3x2IBDg.js} +305 -297
- package/dist/chunks/{dropdown.RxD2TqnP.js.map → dropdown.-3x2IBDg.js.map} +1 -1
- package/dist/chunks/es6.MoTTyETW.js.map +1 -1
- package/dist/chunks/{file-uploader.BGoCYrnw.js → file-uploader.BkTtqgvQ.js} +296 -295
- package/dist/chunks/{file-uploader.BGoCYrnw.js.map → file-uploader.BkTtqgvQ.js.map} +1 -1
- package/dist/chunks/{filter-bar.DVqgwt2p.js → filter-bar.BLnSnOlj.js} +201 -201
- package/dist/chunks/filter-bar.BLnSnOlj.js.map +1 -0
- package/dist/chunks/form-field.BBqLu-vs.js +10 -0
- package/dist/chunks/form-field.BBqLu-vs.js.map +1 -0
- package/dist/chunks/get-slot-text.Bjb9dTSV.js +12 -0
- package/dist/chunks/get-slot-text.Bjb9dTSV.js.map +1 -0
- package/dist/chunks/{header-with-views.jnhILkoQ.js → header-with-views.C6Y7mAkq.js} +3 -3
- package/dist/chunks/{header-with-views.jnhILkoQ.js.map → header-with-views.C6Y7mAkq.js.map} +1 -1
- package/dist/chunks/{input-field-password.CHn2GUcL.js → input-field-password.sthICA2L.js} +3 -3
- package/dist/chunks/{input-field-password.CHn2GUcL.js.map → input-field-password.sthICA2L.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.CpnfVw6w.js → input-field-phone-number.BjinuvOl.js} +5 -5
- package/dist/chunks/{input-field-phone-number.CpnfVw6w.js.map → input-field-phone-number.BjinuvOl.js.map} +1 -1
- package/dist/chunks/{input-field.sGmuIXiw.js → input-field.CwKD3p3q.js} +34 -34
- package/dist/chunks/input-field.CwKD3p3q.js.map +1 -0
- package/dist/chunks/link.D8qpqg3W.js.map +1 -1
- package/dist/chunks/{listbox-option-tag.Dl8GwHLT.js → listbox-option-tag.DkPz3wPc.js} +2 -2
- package/dist/chunks/{listbox-option-tag.Dl8GwHLT.js.map → listbox-option-tag.DkPz3wPc.js.map} +1 -1
- package/dist/chunks/{pagination.C0YW_A_o.js → pagination.BzyyZJy6.js} +7 -7
- package/dist/chunks/pagination.BzyyZJy6.js.map +1 -0
- package/dist/chunks/{payment-method.DtvfUnit.js → payment-method.CcASYR3B.js} +12 -12
- package/dist/chunks/payment-method.CcASYR3B.js.map +1 -0
- package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -1
- package/dist/chunks/{radio-group.AcYMFudv.js → radio-group.B8ukv-pw.js} +3 -3
- package/dist/chunks/{radio-group.AcYMFudv.js.map → radio-group.B8ukv-pw.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.eYW8X_YP.js → rich-text-editor.DzH-Z5oi.js} +2 -2
- package/dist/chunks/{rich-text-editor.eYW8X_YP.js.map → rich-text-editor.DzH-Z5oi.js.map} +1 -1
- package/dist/chunks/{search-bar.D8SJsbze.js → search-bar.CgzPXP8r.js} +3 -3
- package/dist/chunks/{search-bar.D8SJsbze.js.map → search-bar.CgzPXP8r.js.map} +1 -1
- package/dist/chunks/{secondary-nav.BFiTQaag.js → secondary-nav.3eZKyb8K.js} +4 -4
- package/dist/chunks/secondary-nav.3eZKyb8K.js.map +1 -0
- package/dist/chunks/{summary-grid.types.B80533d1.js → summary-grid.types.CaYrtyVO.js} +2 -2
- package/dist/chunks/{summary-grid.types.B80533d1.js.map → summary-grid.types.CaYrtyVO.js.map} +1 -1
- package/dist/chunks/tag.BltIbSh3.js +44 -0
- package/dist/chunks/tag.BltIbSh3.js.map +1 -0
- package/dist/chunks/textarea.h-WF62HP.js +173 -0
- package/dist/chunks/textarea.h-WF62HP.js.map +1 -0
- package/dist/chunks/{timeline-item.CZBuknZ_.js → timeline-item.BLhS7uNF.js} +5 -5
- package/dist/chunks/timeline-item.BLhS7uNF.js.map +1 -0
- package/dist/chunks/{toggle.BJMXpHRu.js → toggle.D2wmNu7m.js} +2 -2
- package/dist/chunks/{toggle.BJMXpHRu.js.map → toggle.D2wmNu7m.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +7 -6
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +1 -1
- package/dist/dropdown.js +3 -3
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/index.js +247 -246
- package/dist/index.js.map +1 -1
- 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/internal.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/payment-method.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/styles/bento-dark.css +4 -0
- package/dist/styles/bento-light.css +4 -0
- package/dist/styles/bento.css +4 -0
- package/dist/styles/legacy.css +4 -0
- package/dist/styles/styleguide.css +4 -0
- package/dist/summary-grid.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/web-types.json +144 -6
- package/package.json +6 -6
- package/dist/chunks/date-picker.DImAYvoM.js +0 -158
- package/dist/chunks/date-picker.DImAYvoM.js.map +0 -1
- package/dist/chunks/date-range-picker.NAG_5i8I.js +0 -914
- package/dist/chunks/date-range-picker.NAG_5i8I.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.yLeN0E2z.js.map +0 -1
- package/dist/chunks/dropdown-tag.CpvU8eSZ.js +0 -260
- package/dist/chunks/dropdown-tag.CpvU8eSZ.js.map +0 -1
- package/dist/chunks/filter-bar.DVqgwt2p.js.map +0 -1
- package/dist/chunks/get-slot-text.BQS5Olxm.js +0 -12
- package/dist/chunks/get-slot-text.BQS5Olxm.js.map +0 -1
- package/dist/chunks/input-field.sGmuIXiw.js.map +0 -1
- package/dist/chunks/pagination.C0YW_A_o.js.map +0 -1
- package/dist/chunks/payment-method.DtvfUnit.js.map +0 -1
- package/dist/chunks/secondary-nav.BFiTQaag.js.map +0 -1
- package/dist/chunks/tag.BwKc2d2E.js +0 -44
- package/dist/chunks/tag.BwKc2d2E.js.map +0 -1
- package/dist/chunks/textarea.CIQuLWQ8.js +0 -165
- package/dist/chunks/textarea.CIQuLWQ8.js.map +0 -1
- package/dist/chunks/timeline-item.CZBuknZ_.js.map +0 -1
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { ref as h, watch as
|
|
2
|
-
import { d as
|
|
1
|
+
import { ref as h, watch as G, computed as r, defineComponent as R, useSlots as he, toRefs as we, nextTick as x, useAttrs as Ae, toRef as L, inject as Me } from "vue";
|
|
2
|
+
import { d as Y, B as Pe } from "./typography.hlOAxsEn.js";
|
|
3
3
|
import { g as $ } from "./generate-uid.NJ8tVoha.js";
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { B as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
4
|
+
import { u as $e } from "./aria-label.CaUURpnB.js";
|
|
5
|
+
import { u as ee } from "./index.B6WW_F-J.js";
|
|
6
|
+
import { u as ke } from "./form-field.BBqLu-vs.js";
|
|
7
|
+
import { a as p, b as X, B as be, c as Fe, u as Ke, d as ze } from "./use-cached-selected-values.BZd3CTeP.js";
|
|
8
|
+
import { u as Ve } from "./use-form-layout-loading.D3lALhtC.js";
|
|
9
|
+
import { a as Z, b as P, c as We, B as V, D as Ue } from "./dropdown-default-textbox.BCOVaw-a.js";
|
|
10
|
+
import { u as je } from "./use-has-slot.C9lQZ6nz.js";
|
|
11
|
+
import { B as E, a as qe } from "./keyboard-navigation.pB8weElW.js";
|
|
12
|
+
import { B as He } from "./directive.Cbdox5VL.js";
|
|
13
|
+
import { F as Je, E as Ye } from "./field-label.Auq-Pzho.js";
|
|
14
|
+
import { P as ye } from "./popper-container.agLYtGwv.js";
|
|
15
|
+
import { h as Ze } from "./button-actions.B81vY51z.js";
|
|
15
16
|
import { n as k } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
16
17
|
/* empty css */
|
|
17
|
-
import { s as
|
|
18
|
+
import { s as Q } from "./events.CMzGybJJ.js";
|
|
18
19
|
import "../assets/dropdown.css";
|
|
19
|
-
const
|
|
20
|
+
const Qe = {
|
|
20
21
|
"en-US": {
|
|
21
22
|
apply: "Apply",
|
|
22
23
|
cancel: "Cancel",
|
|
@@ -30,62 +31,62 @@ const Je = {
|
|
|
30
31
|
apply: "Aplicar",
|
|
31
32
|
cancel: "Cancelar"
|
|
32
33
|
}
|
|
33
|
-
},
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
}, Xe = (n, t, o, e) => {
|
|
35
|
+
const a = h(n.value), { t: s } = ee();
|
|
36
|
+
G(n, () => {
|
|
37
|
+
a.value = n.value;
|
|
37
38
|
});
|
|
38
|
-
const
|
|
39
|
-
() => JSON.stringify(
|
|
39
|
+
const l = r(
|
|
40
|
+
() => JSON.stringify(a.value) === JSON.stringify(n.value)
|
|
40
41
|
), i = () => {
|
|
41
|
-
e(p.SELECT,
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
o.value && t.value && (
|
|
46
|
-
},
|
|
42
|
+
e(p.SELECT, a.value), e(p.CLOSE_DROPDOWN);
|
|
43
|
+
}, f = () => {
|
|
44
|
+
a.value = n.value, e(p.CLOSE_DROPDOWN);
|
|
45
|
+
}, m = () => {
|
|
46
|
+
o.value && t.value && (a.value = n.value);
|
|
47
|
+
}, u = r(() => [
|
|
47
48
|
{
|
|
48
|
-
title:
|
|
49
|
+
title: s("apply"),
|
|
49
50
|
event: i,
|
|
50
|
-
disabled:
|
|
51
|
+
disabled: l.value
|
|
51
52
|
},
|
|
52
53
|
{
|
|
53
|
-
title:
|
|
54
|
-
event:
|
|
54
|
+
title: s("cancel"),
|
|
55
|
+
event: f
|
|
55
56
|
}
|
|
56
|
-
]),
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
}, g = (
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
|
|
57
|
+
]), y = (d) => {
|
|
58
|
+
a.value = d, t.value || e(p.SELECT, d);
|
|
59
|
+
}, c = (d) => {
|
|
60
|
+
y(d), e(p.TAB);
|
|
61
|
+
}, g = (d) => {
|
|
62
|
+
y(d), e(p.ENTER);
|
|
63
|
+
}, b = (d) => {
|
|
64
|
+
y(d), e(p.SPACE);
|
|
65
|
+
}, S = () => {
|
|
66
|
+
f(), e(p.ESCAPE);
|
|
64
67
|
}, O = () => {
|
|
65
|
-
c(), e(p.ESCAPE);
|
|
66
|
-
}, L = () => {
|
|
67
68
|
e(p.SHOW_MORE);
|
|
68
|
-
},
|
|
69
|
-
[p.SELECT]:
|
|
70
|
-
[p.SHOW_MORE]:
|
|
71
|
-
[p.TAB]:
|
|
72
|
-
[p.SPACE]:
|
|
69
|
+
}, C = {
|
|
70
|
+
[p.SELECT]: y,
|
|
71
|
+
[p.SHOW_MORE]: O,
|
|
72
|
+
[p.TAB]: c,
|
|
73
|
+
[p.SPACE]: b,
|
|
73
74
|
[p.ENTER]: g
|
|
74
75
|
};
|
|
75
76
|
return {
|
|
76
77
|
// Values
|
|
77
|
-
actions:
|
|
78
|
-
internalSelectedValue:
|
|
78
|
+
actions: u,
|
|
79
|
+
internalSelectedValue: a,
|
|
79
80
|
// Methods
|
|
80
|
-
listeners:
|
|
81
|
-
onEscapeKey:
|
|
82
|
-
onOutsideDropdownClick:
|
|
81
|
+
listeners: C,
|
|
82
|
+
onEscapeKey: S,
|
|
83
|
+
onOutsideDropdownClick: m
|
|
83
84
|
};
|
|
84
|
-
},
|
|
85
|
-
i18n: { messages:
|
|
85
|
+
}, Ge = R({
|
|
86
|
+
i18n: { messages: Qe },
|
|
86
87
|
name: "bento-dropdown-options-container"
|
|
87
|
-
}),
|
|
88
|
-
...
|
|
88
|
+
}), et = /* @__PURE__ */ R({
|
|
89
|
+
...Ge,
|
|
89
90
|
props: {
|
|
90
91
|
/**
|
|
91
92
|
* Defines a string value that labels an interactive element.
|
|
@@ -144,8 +145,8 @@ const Je = {
|
|
|
144
145
|
*/
|
|
145
146
|
lazyLoadType: {
|
|
146
147
|
type: String,
|
|
147
|
-
default:
|
|
148
|
-
validator: (
|
|
148
|
+
default: be.AUTOMATIC,
|
|
149
|
+
validator: (n) => Object.values(be).includes(n)
|
|
149
150
|
},
|
|
150
151
|
/**
|
|
151
152
|
* Indicates if new options are lazy loading.
|
|
@@ -175,7 +176,7 @@ const Je = {
|
|
|
175
176
|
*
|
|
176
177
|
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
177
178
|
*/
|
|
178
|
-
searching:
|
|
179
|
+
searching: X.props.searching,
|
|
179
180
|
/**
|
|
180
181
|
* If enabled, dropdown will display non-selectable, static categories
|
|
181
182
|
*/
|
|
@@ -184,7 +185,7 @@ const Je = {
|
|
|
184
185
|
* Reference to the DOM element or Vue component for positioning
|
|
185
186
|
* the Dropdown container.
|
|
186
187
|
*/
|
|
187
|
-
targetElement: { type:
|
|
188
|
+
targetElement: { type: ye.props.targetElement.type, required: !0 },
|
|
188
189
|
/**
|
|
189
190
|
* Enables virtual scrolling if set to true or by providing an object with itemHeight function.
|
|
190
191
|
* The itemHeight function is used to calculate the height of rendered item given it's index.
|
|
@@ -195,12 +196,12 @@ const Je = {
|
|
|
195
196
|
}
|
|
196
197
|
},
|
|
197
198
|
emits: [],
|
|
198
|
-
setup(
|
|
199
|
-
const e =
|
|
199
|
+
setup(n, { expose: t, emit: o }) {
|
|
200
|
+
const e = n, a = he(), { selectedValue: s, multiple: l } = we(e), i = h(null), { t: f } = ee(), m = r(() => e.open && !e.disabled), u = r(() => f("noOptionsMatchThisSearch")), y = r(() => ({
|
|
200
201
|
"b-dropdown-options-container--single": !(e != null && e.multiple)
|
|
201
|
-
})),
|
|
202
|
+
})), c = r(() => ({
|
|
202
203
|
"b-dropdown-options-container__listbox--single": !(e != null && e.multiple)
|
|
203
|
-
})), { actions: g, internalSelectedValue:
|
|
204
|
+
})), { actions: g, internalSelectedValue: b, listeners: S, onEscapeKey: O, onOutsideDropdownClick: C } = Xe(s, l, m, o), d = r(() => e != null && e.multiple ? Ze : ye), I = r(() => {
|
|
204
205
|
var B;
|
|
205
206
|
const D = {
|
|
206
207
|
"min-width": `${(B = e == null ? void 0 : e.targetElement) == null ? void 0 : B.clientWidth}px`,
|
|
@@ -225,75 +226,75 @@ const Je = {
|
|
|
225
226
|
offset: [0, 8],
|
|
226
227
|
position: "bottom-start",
|
|
227
228
|
style: {
|
|
228
|
-
display:
|
|
229
|
+
display: m.value ? "block" : "none",
|
|
229
230
|
...D
|
|
230
231
|
},
|
|
231
232
|
targetElement: e.targetElement
|
|
232
233
|
};
|
|
233
234
|
});
|
|
234
235
|
return t({
|
|
235
|
-
onOutsideDropdownClick:
|
|
236
|
-
}), { __sfc: !0, slots:
|
|
236
|
+
onOutsideDropdownClick: C
|
|
237
|
+
}), { __sfc: !0, slots: a, emit: o, props: e, selectedValue: s, multiple: l, dropdownOptionsListboxRef: i, t: f, isDropdownOpen: m, noResultsMessage: u, conditionalClasses: y, conditionalListboxClasses: c, actions: g, internalSelectedValue: b, listeners: S, onEscapeKey: O, onOutsideDropdownClick: C, popperContainerOrPopoverComponent: d, popperContainerOrPopoverProps: I, BentoListbox: X };
|
|
237
238
|
}
|
|
238
239
|
});
|
|
239
|
-
var
|
|
240
|
+
var tt = function() {
|
|
240
241
|
var t = this, o = t._self._c, e = t._self._setupProxy;
|
|
241
|
-
return o(e.popperContainerOrPopoverComponent, t._b({ tag: "component", staticClass: "b-dropdown-options-container", class: e.conditionalClasses }, "component", e.popperContainerOrPopoverProps, !1), [o("div", { on: { keydown: function(
|
|
242
|
-
return !
|
|
243
|
-
} } }, [o(e.BentoListbox, t._g({ ref: "dropdownOptionsListboxRef", staticClass: "b-dropdown-options-container__listbox", class: e.conditionalListboxClasses, attrs: { id: t.id, "aria-label": t.ariaLabel, "component-loading": t.componentLoading, "empty-state": t.emptyState, "is-option-disabled": t.isOptionDisabled, items: t.items, "selected-value": e.internalSelectedValue, multiple: e.multiple, "static-categories": t.staticCategories, "no-results-message": e.noResultsMessage, searching: t.searching, loading: t.loading, "lazy-load-type": t.lazyLoadType, "has-more-items": t.hasMoreItems, "virtual-scroll": t.virtualScroll }, scopedSlots: t._u([t._l(e.slots, function(
|
|
244
|
-
return { key:
|
|
245
|
-
return [t._t(
|
|
242
|
+
return o(e.popperContainerOrPopoverComponent, t._b({ tag: "component", staticClass: "b-dropdown-options-container", class: e.conditionalClasses }, "component", e.popperContainerOrPopoverProps, !1), [o("div", { on: { keydown: function(a) {
|
|
243
|
+
return !a.type.indexOf("key") && t._k(a.keyCode, "esc", 27, a.key, ["Esc", "Escape"]) ? null : e.onEscapeKey.apply(null, arguments);
|
|
244
|
+
} } }, [o(e.BentoListbox, t._g({ ref: "dropdownOptionsListboxRef", staticClass: "b-dropdown-options-container__listbox", class: e.conditionalListboxClasses, attrs: { id: t.id, "aria-label": t.ariaLabel, "component-loading": t.componentLoading, "empty-state": t.emptyState, "is-option-disabled": t.isOptionDisabled, items: t.items, "selected-value": e.internalSelectedValue, multiple: e.multiple, "static-categories": t.staticCategories, "no-results-message": e.noResultsMessage, searching: t.searching, loading: t.loading, "lazy-load-type": t.lazyLoadType, "has-more-items": t.hasMoreItems, "virtual-scroll": t.virtualScroll }, scopedSlots: t._u([t._l(e.slots, function(a, s) {
|
|
245
|
+
return { key: s, fn: function(l) {
|
|
246
|
+
return [t._t(s, null, null, l)];
|
|
246
247
|
} };
|
|
247
248
|
})], null, !0) }, e.listeners))], 1)]);
|
|
248
|
-
},
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
249
|
+
}, ot = [], at = /* @__PURE__ */ k(
|
|
250
|
+
et,
|
|
251
|
+
tt,
|
|
252
|
+
ot,
|
|
252
253
|
!1,
|
|
253
254
|
null,
|
|
254
255
|
"ddc50615"
|
|
255
256
|
);
|
|
256
|
-
const
|
|
257
|
-
let
|
|
258
|
-
const
|
|
257
|
+
const nt = at.exports;
|
|
258
|
+
let _e = 0;
|
|
259
|
+
const lt = {
|
|
259
260
|
beforeCreate() {
|
|
260
|
-
this.uuid =
|
|
261
|
+
this.uuid = _e.toString(), _e += 1;
|
|
261
262
|
}
|
|
262
263
|
};
|
|
263
|
-
var
|
|
264
|
+
var st = function() {
|
|
264
265
|
var t = this, o = t._self._c;
|
|
265
266
|
return o("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? o("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), o("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" } })]);
|
|
266
|
-
},
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
267
|
+
}, it = [], rt = /* @__PURE__ */ k(
|
|
268
|
+
lt,
|
|
269
|
+
st,
|
|
270
|
+
it,
|
|
270
271
|
!1,
|
|
271
272
|
null,
|
|
272
273
|
null
|
|
273
274
|
);
|
|
274
|
-
const
|
|
275
|
-
let
|
|
276
|
-
const
|
|
275
|
+
const dt = rt.exports;
|
|
276
|
+
let ge = 0;
|
|
277
|
+
const ut = {
|
|
277
278
|
beforeCreate() {
|
|
278
|
-
this.uuid =
|
|
279
|
+
this.uuid = ge.toString(), ge += 1;
|
|
279
280
|
}
|
|
280
281
|
};
|
|
281
|
-
var
|
|
282
|
+
var ct = function() {
|
|
282
283
|
var t = this, o = t._self._c;
|
|
283
284
|
return o("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? o("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), o("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" } })]);
|
|
284
|
-
},
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
285
|
+
}, pt = [], ft = /* @__PURE__ */ k(
|
|
286
|
+
ut,
|
|
287
|
+
ct,
|
|
288
|
+
pt,
|
|
288
289
|
!1,
|
|
289
290
|
null,
|
|
290
291
|
null
|
|
291
292
|
);
|
|
292
|
-
const
|
|
293
|
+
const vt = ft.exports, mt = R({
|
|
293
294
|
name: "dropdown-small-textbox",
|
|
294
295
|
inheritAttrs: !1
|
|
295
|
-
}),
|
|
296
|
-
...
|
|
296
|
+
}), bt = /* @__PURE__ */ R({
|
|
297
|
+
...mt,
|
|
297
298
|
props: {
|
|
298
299
|
/**
|
|
299
300
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -353,134 +354,134 @@ const ct = ut.exports, pt = R({
|
|
|
353
354
|
value: { type: String, default: "" }
|
|
354
355
|
},
|
|
355
356
|
emits: ["clear", "close", "input", "keydown", "open"],
|
|
356
|
-
setup(
|
|
357
|
-
const e =
|
|
358
|
-
[`b-dropdown-small-textbox--${
|
|
359
|
-
[`b-dropdown-small-textbox--${
|
|
360
|
-
[`b-dropdown-small-textbox--${
|
|
361
|
-
})),
|
|
362
|
-
o("input",
|
|
363
|
-
},
|
|
364
|
-
o("keydown",
|
|
365
|
-
},
|
|
366
|
-
|
|
367
|
-
},
|
|
368
|
-
|
|
369
|
-
},
|
|
370
|
-
|
|
371
|
-
},
|
|
357
|
+
setup(n, { expose: t, emit: o }) {
|
|
358
|
+
const e = n, a = h(null), s = r(() => ({
|
|
359
|
+
[`b-dropdown-small-textbox--${Z.DISABLED}`]: e.disabled,
|
|
360
|
+
[`b-dropdown-small-textbox--${Z.READONLY}`]: e.readonly,
|
|
361
|
+
[`b-dropdown-small-textbox--${Z.OPENED}`]: e.open
|
|
362
|
+
})), l = r(() => e.open && !e.disabled && !e.readonly), i = (b) => {
|
|
363
|
+
o("input", b);
|
|
364
|
+
}, f = (b) => {
|
|
365
|
+
o("keydown", b);
|
|
366
|
+
}, m = (b) => {
|
|
367
|
+
Q(b), o("open");
|
|
368
|
+
}, u = (b) => {
|
|
369
|
+
Q(b), o("close");
|
|
370
|
+
}, y = (b) => {
|
|
371
|
+
Q(b), o("clear");
|
|
372
|
+
}, c = {
|
|
372
373
|
[P.INPUT]: i,
|
|
373
|
-
[P.OPEN]:
|
|
374
|
-
[P.CLOSE]:
|
|
375
|
-
[P.CLEAR]:
|
|
376
|
-
[P.KEYDOWN]:
|
|
374
|
+
[P.OPEN]: m,
|
|
375
|
+
[P.CLOSE]: u,
|
|
376
|
+
[P.CLEAR]: y,
|
|
377
|
+
[P.KEYDOWN]: f
|
|
377
378
|
}, g = () => {
|
|
378
|
-
|
|
379
|
+
a.value.focus();
|
|
379
380
|
};
|
|
380
381
|
return t({
|
|
381
382
|
focus: g
|
|
382
|
-
}), { __sfc: !0, emit: o, props: e, baseTextbox:
|
|
383
|
+
}), { __sfc: !0, emit: o, props: e, baseTextbox: a, conditionalClasses: s, isDropdownOpen: l, onInput: i, onKeyDown: f, openDropdown: m, closeDropdown: u, clearValue: y, listeners: c, focus: g, BentoDropdownSize: V, DropdownBaseTextbox: We, ChevronDownSmallIcon: dt, ChevronUpSmallIcon: vt };
|
|
383
384
|
}
|
|
384
385
|
});
|
|
385
|
-
var
|
|
386
|
+
var yt = function() {
|
|
386
387
|
var t = this, o = t._self._c, e = t._self._setupProxy;
|
|
387
388
|
return o("div", { staticClass: "b-dropdown-small-textbox", class: e.conditionalClasses }, [o(e.DropdownBaseTextbox, t._g(t._b({ ref: "baseTextbox", staticClass: "b-dropdown-small-textbox__textbox", attrs: { size: e.BentoDropdownSize.SMALL }, scopedSlots: t._u([{ key: "icon", fn: function() {
|
|
388
389
|
return [o("div", { staticClass: "b-dropdown-small-textbox__chevron" }, [o(e.ChevronUpSmallIcon, { directives: [{ name: "show", rawName: "v-show", value: e.isDropdownOpen, expression: "isDropdownOpen" }], attrs: { "svg-title": "opened" } }), o(e.ChevronDownSmallIcon, { directives: [{ name: "show", rawName: "v-show", value: !e.isDropdownOpen, expression: "!isDropdownOpen" }], attrs: { "svg-title": "closed" } })], 1)];
|
|
389
390
|
}, proxy: !0 }]) }, "dropdown-base-textbox", { ...t.$attrs, ...t.$props }, !1), e.listeners))], 1);
|
|
390
|
-
},
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
391
|
+
}, _t = [], gt = /* @__PURE__ */ k(
|
|
392
|
+
bt,
|
|
393
|
+
yt,
|
|
394
|
+
_t,
|
|
394
395
|
!1,
|
|
395
396
|
null,
|
|
396
397
|
"2e5cb799"
|
|
397
398
|
);
|
|
398
|
-
const
|
|
399
|
+
const ht = gt.exports, wt = (n, t) => t.value.reduce((o, e) => {
|
|
399
400
|
if (e.items) {
|
|
400
|
-
const
|
|
401
|
-
(
|
|
401
|
+
const a = e.items.filter(
|
|
402
|
+
(l) => n.value.find((i) => i.value === l.value)
|
|
402
403
|
);
|
|
403
|
-
|
|
404
|
+
a.length === e.items.length ? o.push(e.displayValue ?? e.label) : a.forEach(({ label: l, displayValue: i }) => o.push(i ?? l));
|
|
404
405
|
}
|
|
405
|
-
return
|
|
406
|
-
}, []).join(", "),
|
|
407
|
-
const
|
|
408
|
-
() => e.value &&
|
|
406
|
+
return n.value.find((a) => a.value === e.value) && o.push(e.displayValue ?? e.label), o;
|
|
407
|
+
}, []).join(", "), Ct = ({ items: n, placeholder: t, selectedValues: o, isMultiSelect: e }) => {
|
|
408
|
+
const a = r(
|
|
409
|
+
() => e.value && n.value.find((l) => {
|
|
409
410
|
var i;
|
|
410
|
-
return (i =
|
|
411
|
+
return (i = l.items) == null ? void 0 : i.length;
|
|
411
412
|
})
|
|
412
413
|
);
|
|
413
|
-
return r(() => o.value.length ?
|
|
414
|
-
}, Ce = (
|
|
414
|
+
return r(() => o.value.length ? a.value ? wt(o, n) : o.value.map(({ label: l, displayValue: i }) => i ?? l).join(", ") : t.value || null);
|
|
415
|
+
}, Ce = (n) => {
|
|
415
416
|
var t;
|
|
416
|
-
(t =
|
|
417
|
-
},
|
|
418
|
-
inputContainerRef:
|
|
417
|
+
(t = n.value.$children) == null || t[0].$refs.textbox.focus();
|
|
418
|
+
}, Lt = ({
|
|
419
|
+
inputContainerRef: n,
|
|
419
420
|
optionsContainerRef: t,
|
|
420
421
|
selectedValueIndex: o,
|
|
421
422
|
isDropdownOpen: e,
|
|
422
|
-
isDynamicFltering:
|
|
423
|
-
items:
|
|
424
|
-
isMultiple:
|
|
425
|
-
}, i,
|
|
426
|
-
const
|
|
427
|
-
var
|
|
428
|
-
|
|
429
|
-
},
|
|
423
|
+
isDynamicFltering: a,
|
|
424
|
+
items: s,
|
|
425
|
+
isMultiple: l
|
|
426
|
+
}, i, f, m) => {
|
|
427
|
+
const u = async (_) => {
|
|
428
|
+
var w;
|
|
429
|
+
a.value && await x(), (w = s.value[_]) == null || w.focus();
|
|
430
|
+
}, y = async (_) => {
|
|
430
431
|
var A, K;
|
|
431
|
-
|
|
432
|
-
const
|
|
432
|
+
a.value && await x();
|
|
433
|
+
const w = (A = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : A.$el.querySelectorAll(
|
|
433
434
|
"button"
|
|
434
435
|
);
|
|
435
|
-
|
|
436
|
-
},
|
|
437
|
-
var
|
|
438
|
-
return (
|
|
439
|
-
|
|
436
|
+
w.length ? (K = w[_]) == null || K.focus() : u(_);
|
|
437
|
+
}, c = (_) => {
|
|
438
|
+
var w;
|
|
439
|
+
return (w = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : w.setListboxFocusedIndex(
|
|
440
|
+
_
|
|
440
441
|
);
|
|
441
442
|
}, g = () => {
|
|
442
|
-
e.value ||
|
|
443
|
-
|
|
443
|
+
e.value || f(), x(() => {
|
|
444
|
+
c(0), u(0);
|
|
444
445
|
});
|
|
445
|
-
},
|
|
446
|
-
e.value ||
|
|
447
|
-
|
|
446
|
+
}, b = () => {
|
|
447
|
+
e.value || f(), x(() => {
|
|
448
|
+
c(s.value.length - 1), u(s.value.length - 1);
|
|
448
449
|
});
|
|
449
|
-
},
|
|
450
|
-
|
|
451
|
-
},
|
|
452
|
-
|
|
453
|
-
},
|
|
450
|
+
}, S = ({ detail: _ }) => {
|
|
451
|
+
_.preventDefault(), g();
|
|
452
|
+
}, O = ({ detail: _ }) => {
|
|
453
|
+
_.preventDefault(), b();
|
|
454
|
+
}, C = () => {
|
|
454
455
|
g();
|
|
455
|
-
},
|
|
456
|
-
|
|
457
|
-
}, I = ({ detail:
|
|
458
|
-
|
|
459
|
-
|
|
456
|
+
}, d = () => {
|
|
457
|
+
b();
|
|
458
|
+
}, I = ({ detail: _ }) => {
|
|
459
|
+
_.preventDefault(), i(), e.value && x(() => {
|
|
460
|
+
l ? y(0) : (c(o.value), u(o.value));
|
|
460
461
|
});
|
|
461
|
-
}, D = ({ detail:
|
|
462
|
-
|
|
463
|
-
|
|
462
|
+
}, D = ({ detail: _ }) => {
|
|
463
|
+
_.preventDefault(), i(), e.value && x(() => {
|
|
464
|
+
l ? y(0) : (c(o.value), u(o.value));
|
|
464
465
|
});
|
|
465
466
|
}, B = () => {
|
|
466
|
-
e.value &&
|
|
467
|
+
e.value && m();
|
|
467
468
|
}, F = () => {
|
|
468
|
-
e.value && (
|
|
469
|
+
e.value && (m(), Ce(n));
|
|
469
470
|
};
|
|
470
471
|
return r(() => ({
|
|
471
|
-
[E.ARROW_DOWN]:
|
|
472
|
-
[E.ARROW_UP]:
|
|
473
|
-
[E.HOME]:
|
|
474
|
-
[E.END]:
|
|
475
|
-
...
|
|
472
|
+
[E.ARROW_DOWN]: S,
|
|
473
|
+
[E.ARROW_UP]: O,
|
|
474
|
+
[E.HOME]: C,
|
|
475
|
+
[E.END]: d,
|
|
476
|
+
...a.value ? {} : { [E.SPACE]: I },
|
|
476
477
|
[E.ENTER]: D,
|
|
477
478
|
[E.TAB]: B,
|
|
478
479
|
[E.ESCAPE]: F
|
|
479
480
|
}));
|
|
480
|
-
},
|
|
481
|
+
}, xt = ({ inputContainerRef: n, isDropdownOpen: t }, o) => {
|
|
481
482
|
const e = () => {
|
|
482
|
-
t.value && o(),
|
|
483
|
-
Ce(
|
|
483
|
+
t.value && o(), x(() => {
|
|
484
|
+
Ce(n);
|
|
484
485
|
});
|
|
485
486
|
};
|
|
486
487
|
return {
|
|
@@ -490,18 +491,18 @@ const yt = bt.exports, _t = (a, t) => t.value.reduce((o, e) => {
|
|
|
490
491
|
[p.SPACE]: e
|
|
491
492
|
};
|
|
492
493
|
};
|
|
493
|
-
function
|
|
494
|
-
const
|
|
495
|
-
return
|
|
496
|
-
o !== void 0 && o(
|
|
494
|
+
function St(n, t, o, e) {
|
|
495
|
+
const a = h(n), s = h(t), l = (f, m = []) => m.flatMap((u) => u.label.toLocaleLowerCase().includes(f) ? e != null && e.value && u.items ? [...l(f, u.items)] : [u, ...l(f, u.items)] : u.items ? [...l(f, u.items)] : []);
|
|
496
|
+
return G(a, () => {
|
|
497
|
+
o !== void 0 && o(a.value);
|
|
497
498
|
}), r(() => {
|
|
498
|
-
if (!
|
|
499
|
-
return
|
|
500
|
-
const
|
|
501
|
-
return
|
|
499
|
+
if (!a.value || o !== void 0)
|
|
500
|
+
return s.value;
|
|
501
|
+
const f = a.value.toLocaleLowerCase();
|
|
502
|
+
return l(f, s.value);
|
|
502
503
|
});
|
|
503
504
|
}
|
|
504
|
-
const
|
|
505
|
+
const Ot = {
|
|
505
506
|
"en-US": {
|
|
506
507
|
all: "All",
|
|
507
508
|
ariaLabelFallback: "Dropdown",
|
|
@@ -515,15 +516,16 @@ const Lt = {
|
|
|
515
516
|
all: "Todos",
|
|
516
517
|
clearFilter: "Limpar filtro"
|
|
517
518
|
}
|
|
518
|
-
},
|
|
519
|
-
i18n: { messages:
|
|
519
|
+
}, Et = Symbol("input field component injection key"), Qt = Symbol("input field hint injection key"), Xt = Symbol("input field parent component injection key"), Dt = R({
|
|
520
|
+
i18n: { messages: Ot },
|
|
520
521
|
name: "b-dropdown",
|
|
521
522
|
components: {
|
|
522
|
-
DropdownInputDefault:
|
|
523
|
-
DropdownInputSmall:
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
|
|
523
|
+
DropdownInputDefault: Ue,
|
|
524
|
+
DropdownInputSmall: ht
|
|
525
|
+
},
|
|
526
|
+
model: { prop: "modelValue" }
|
|
527
|
+
}), Bt = /* @__PURE__ */ R({
|
|
528
|
+
...Dt,
|
|
527
529
|
props: {
|
|
528
530
|
description: { default: null },
|
|
529
531
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -544,163 +546,169 @@ const Lt = {
|
|
|
544
546
|
items: { default: () => [] },
|
|
545
547
|
loading: { type: Boolean, default: !1 },
|
|
546
548
|
componentLoading: { type: Boolean, default: !1 },
|
|
547
|
-
lazyLoadType: { default:
|
|
549
|
+
lazyLoadType: { default: X.props.lazyLoadType.default },
|
|
548
550
|
multiple: { type: Boolean, default: !1 },
|
|
549
551
|
search: { default: void 0 },
|
|
550
552
|
showSlotContentInMultiple: { type: Boolean, default: !1 },
|
|
551
553
|
size: { default: null },
|
|
552
554
|
staticCategories: { type: Boolean, default: !1 },
|
|
553
555
|
value: { default: null },
|
|
556
|
+
modelValue: { default: null },
|
|
554
557
|
virtualScroll: { type: Boolean, default: !1 },
|
|
555
558
|
enableValueLabelPair: { type: Boolean, default: !1 }
|
|
556
559
|
},
|
|
557
|
-
emits: ["input", "show-more", "open"],
|
|
558
|
-
setup(
|
|
559
|
-
var
|
|
560
|
-
const e =
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
),
|
|
560
|
+
emits: ["input", "update:model-value", "show-more", "open"],
|
|
561
|
+
setup(n, { expose: t, emit: o }) {
|
|
562
|
+
var me;
|
|
563
|
+
const e = n, a = Ae(), s = he(), l = je(s), { t: i } = ee(), { emitValue: f } = ke(o), m = h(null), u = h(null), y = h(null), c = h(!1), g = $("bento-dropdown-options-container"), b = $("dropdown-label"), S = $("dropdown-description"), O = $("dropdown-error"), { isReadOnly: C } = Ve(L(e, "readonly")), d = r(() => e.modelValue ?? e.value), { cachedSelectedListboxOptions: I, cachedListboxSelectedValues: D, setCachedValues: B } = Fe(
|
|
564
|
+
L(e, "items"),
|
|
565
|
+
d,
|
|
566
|
+
L(e, "multiple"),
|
|
567
|
+
L(e, "enableValueLabelPair")
|
|
568
|
+
), F = h(a["aria-label"]), W = h(a["aria-describedby"]), { ariaLabel: _, label: w } = we(e), A = r(() => i("ariaLabelFallback")), K = $e({
|
|
566
569
|
// TODO: take ariaLabel ref away when aria-label prop is removed
|
|
567
|
-
ariaLabel:
|
|
568
|
-
label:
|
|
569
|
-
defaultFallback:
|
|
570
|
-
}),
|
|
570
|
+
ariaLabel: _.value || F,
|
|
571
|
+
label: w,
|
|
572
|
+
defaultFallback: A
|
|
573
|
+
}), te = e.size === V.SMALL || Me(Et, !1), Le = r(() => te ? V.SMALL : V.DEFAULT), xe = r(() => ({
|
|
571
574
|
"b-dropdown--condensed": e.condensed
|
|
572
|
-
})),
|
|
575
|
+
})), Se = r(() => ({
|
|
573
576
|
"b-dropdown__description--error": !!e.errorMessage
|
|
574
|
-
})), T = h(""), M =
|
|
577
|
+
})), T = h(""), M = L(e, "items"), oe = L(e, "staticCategories"), U = St(T, M, (me = e == null ? void 0 : e.search) == null ? void 0 : me.searchEvent, oe), j = r(() => e.dynamicFiltering && !!T.value), Oe = Ct({
|
|
575
578
|
items: M,
|
|
576
|
-
placeholder:
|
|
577
|
-
isMultiSelect:
|
|
578
|
-
selectedValues:
|
|
579
|
-
}),
|
|
580
|
-
if (e != null && e.multiple && Array.isArray(
|
|
579
|
+
placeholder: L(e, "placeholder"),
|
|
580
|
+
isMultiSelect: L(e, "multiple"),
|
|
581
|
+
selectedValues: I
|
|
582
|
+
}), Ee = r(() => {
|
|
583
|
+
if (e != null && e.multiple && Array.isArray(d.value))
|
|
581
584
|
return e.items.filter(
|
|
582
|
-
({ value:
|
|
585
|
+
({ value: v }) => (e == null ? void 0 : e.value) && (e == null ? void 0 : e.value).includes(v)
|
|
583
586
|
);
|
|
584
587
|
if (!e.multiple && e.staticCategories) {
|
|
585
|
-
const
|
|
586
|
-
(J) => J.items.some((
|
|
588
|
+
const v = e.items.find(
|
|
589
|
+
(J) => J.items.some((Re) => Re.value === d.value)
|
|
587
590
|
);
|
|
588
|
-
return
|
|
591
|
+
return v ? v.items.find((J) => J.value === d.value) : null;
|
|
589
592
|
}
|
|
590
|
-
return e.items.find(({ value:
|
|
591
|
-
}),
|
|
592
|
-
const
|
|
593
|
-
return
|
|
594
|
-
}), { isMultiLevelSelect: q, flattenedItemsList:
|
|
593
|
+
return e.items.find(({ value: v }) => v === d.value);
|
|
594
|
+
}), ae = r(() => {
|
|
595
|
+
const v = U.value.findIndex(({ value: N }) => e.enableValueLabelPair ? d.value.value === N : d.value === N);
|
|
596
|
+
return v > -1 ? v : 0;
|
|
597
|
+
}), { isMultiLevelSelect: q, flattenedItemsList: ne } = Ke(M), le = r(() => q.value && !e.staticCategories), se = r(() => le.value ? "treeitem" : "option"), De = r(() => {
|
|
595
598
|
if (e.multiple) {
|
|
596
|
-
const
|
|
597
|
-
return
|
|
599
|
+
const v = Array.isArray(d.value) ? d.value.length : 0, N = q.value ? ne.value.length : M.value.length;
|
|
600
|
+
return v === 0 ? null : !e.hasMoreItems && N > 0 && N === v ? i("all") : v;
|
|
598
601
|
}
|
|
599
602
|
return null;
|
|
600
|
-
}),
|
|
603
|
+
}), Be = r(
|
|
601
604
|
() => [
|
|
602
|
-
e.description ?
|
|
603
|
-
|
|
605
|
+
e.description ? S : null,
|
|
606
|
+
W.value,
|
|
604
607
|
e.errorMessage ? O : null
|
|
605
608
|
].filter(Boolean).join(" ") || null
|
|
606
|
-
),
|
|
607
|
-
var
|
|
608
|
-
return (
|
|
609
|
-
}), { visibleDomOptions:
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
),
|
|
614
|
-
|
|
609
|
+
), ie = r(() => {
|
|
610
|
+
var v;
|
|
611
|
+
return (v = y.value) == null ? void 0 : v.$el;
|
|
612
|
+
}), { visibleDomOptions: re, updateVisibleDomOptions: H } = ze(
|
|
613
|
+
ie,
|
|
614
|
+
U,
|
|
615
|
+
se
|
|
616
|
+
), de = () => {
|
|
617
|
+
C.value || (c.value = !0, x(() => {
|
|
615
618
|
H();
|
|
616
619
|
}));
|
|
617
620
|
}, z = () => {
|
|
618
|
-
|
|
619
|
-
},
|
|
620
|
-
|
|
621
|
+
c.value = !1;
|
|
622
|
+
}, ue = () => {
|
|
623
|
+
C.value || (c.value = !c.value, x(() => {
|
|
621
624
|
H();
|
|
622
625
|
}), j.value && (T.value = ""));
|
|
623
|
-
},
|
|
624
|
-
j.value && (T.value = ""),
|
|
625
|
-
},
|
|
626
|
-
e.multiple || (T.value = "",
|
|
627
|
-
},
|
|
626
|
+
}, Ie = () => {
|
|
627
|
+
j.value && (T.value = ""), c.value && (c.value = !1, y.value.onOutsideDropdownClick());
|
|
628
|
+
}, ce = (v) => {
|
|
629
|
+
e.multiple || (T.value = "", c.value = !1), B(v), f(D.value);
|
|
630
|
+
}, pe = () => {
|
|
628
631
|
o(p.SHOW_MORE);
|
|
629
|
-
},
|
|
632
|
+
}, Te = Lt(
|
|
630
633
|
{
|
|
631
|
-
inputContainerRef:
|
|
632
|
-
optionsContainerRef:
|
|
633
|
-
selectedValueIndex:
|
|
634
|
-
isDropdownOpen:
|
|
635
|
-
isDynamicFltering:
|
|
636
|
-
items:
|
|
634
|
+
inputContainerRef: m,
|
|
635
|
+
optionsContainerRef: y,
|
|
636
|
+
selectedValueIndex: ae,
|
|
637
|
+
isDropdownOpen: c,
|
|
638
|
+
isDynamicFltering: L(e, "dynamicFiltering"),
|
|
639
|
+
items: re,
|
|
637
640
|
isMultiple: e.multiple
|
|
638
641
|
},
|
|
639
|
-
|
|
640
|
-
|
|
642
|
+
ue,
|
|
643
|
+
de,
|
|
641
644
|
z
|
|
642
|
-
),
|
|
645
|
+
), fe = xt(
|
|
643
646
|
{
|
|
644
|
-
inputContainerRef:
|
|
645
|
-
isDropdownOpen:
|
|
647
|
+
inputContainerRef: m,
|
|
648
|
+
isDropdownOpen: c
|
|
646
649
|
},
|
|
647
650
|
z
|
|
648
|
-
),
|
|
651
|
+
), Ne = {
|
|
649
652
|
[p.CLOSE_DROPDOWN]: z,
|
|
650
|
-
[p.SELECT]:
|
|
651
|
-
[p.SHOW_MORE]:
|
|
652
|
-
...
|
|
653
|
+
[p.SELECT]: ce,
|
|
654
|
+
[p.SHOW_MORE]: pe,
|
|
655
|
+
...fe
|
|
653
656
|
};
|
|
654
|
-
e.error &&
|
|
657
|
+
e.error && Y(
|
|
655
658
|
'BentoDropdown "error" property',
|
|
656
659
|
`Use the BentoDropdown "errorMessage" property instead to indicate that there is a modifier error.
|
|
657
660
|
Having the field as "undefined" will hide/remove the error.
|
|
658
661
|
<bento-dropdown errorMessage="Error message text" />`,
|
|
659
662
|
"2.0.0"
|
|
660
|
-
), e.size &&
|
|
661
|
-
|
|
662
|
-
|
|
663
|
+
), e.size && Y('BentoDropdown "size" property', "Do not use. Only 'default' size should be used.", "2.0.0"), e.value && Y(
|
|
664
|
+
'BentoDropdown "value" property',
|
|
665
|
+
`The use of "value" prop in "BentoDropdown" is no longer supported.
|
|
666
|
+
Use the "v-model" or "model-value" property instead.`,
|
|
667
|
+
"2.0.0"
|
|
668
|
+
);
|
|
669
|
+
const ve = () => {
|
|
670
|
+
m.value.focus();
|
|
663
671
|
};
|
|
664
|
-
return
|
|
665
|
-
() =>
|
|
666
|
-
(
|
|
667
|
-
|
|
672
|
+
return G(
|
|
673
|
+
() => c.value,
|
|
674
|
+
(v) => {
|
|
675
|
+
v && o("open");
|
|
668
676
|
}
|
|
669
677
|
), t({
|
|
670
|
-
focus:
|
|
671
|
-
}), { __sfc: !0, attrs:
|
|
678
|
+
focus: ve
|
|
679
|
+
}), { __sfc: !0, attrs: a, slots: s, hasSlot: l, props: e, emit: o, t: i, emitValue: f, inputContainerRef: m, inputContainerRefWrapper: u, optionsContainerRef: y, isDropdownOpen: c, dropdownOptionsContainerId: g, labelId: b, descriptionId: S, errorId: O, isReadOnly: C, dropdownValue: d, cachedSelectedListboxOptions: I, cachedListboxSelectedValues: D, setCachedValues: B, ariaLabelAttribute: F, ariaDescribedByAttribute: W, ariaLabel: _, label: w, computedAriaLabelFallbackMessage: A, computedAriaLabel: K, isInputComponent: te, computedSize: Le, conditionalClasses: xe, descriptionConditionalClasses: Se, searchTerm: T, items: M, staticCategories: oe, filteredItems: U, isSearching: j, displayValue: Oe, selectedValueItem: Ee, selectedValueIndex: ae, isMultiLevelSelect: q, flattenedItemsList: ne, isTreePattern: le, computedOptionRole: se, additionalItemsSelected: De, ariaDescribedBy: Be, listboxRef: ie, visibleDomOptions: re, updateVisibleDomOptions: H, openDropdown: de, closeDropdown: z, toggleDropdown: ue, clickOutsideDropdown: Ie, onOptionSelected: ce, emitShowMoreEvent: pe, textboxKeyboardNavigationListeners: Te, listboxKeyboardNavigationListeners: fe, listboxListeners: Ne, focus: ve, BentoDropdownOptionsContainer: nt, BentoTypography: Pe, ErrorMessage: Ye, FieldLabel: Je, vBentoClickOutsideDirective: He, vBentoKeyboardNavigationDirective: qe };
|
|
672
680
|
}
|
|
673
681
|
});
|
|
674
|
-
var
|
|
675
|
-
var
|
|
682
|
+
var It = function() {
|
|
683
|
+
var a;
|
|
676
684
|
var t = this, o = t._self._c, e = t._self._setupProxy;
|
|
677
|
-
return o("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: e.clickOutsideDropdown, expression: "clickOutsideDropdown" }], staticClass: "b-dropdown", class: e.conditionalClasses }, [e.label ? o(e.FieldLabel, { attrs: { id: e.labelId, condensed: t.condensed, label: e.label, "tooltip-text": t.tooltipText, optional: t.optional, required: t.required } }) : t._e(), o("div", t._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "inputContainerRefWrapper" }, e.textboxKeyboardNavigationListeners), [o(e.computedSize, { ref: "inputContainerRef", tag: "component", attrs: { condensed: t.condensed, value: e.searchTerm, "additional-items-selected": e.additionalItemsSelected, "aria-controls": e.dropdownOptionsContainerId, ariaExpanded: e.isDropdownOpen, "aria-labelledby": e.label ? e.labelId : null, "aria-describedby": e.ariaDescribedBy, "aria-label": e.computedAriaLabel, "aria-readonly": e.isReadOnly, readonly: e.isReadOnly, required: t.required, disabled: t.disabled, "display-value": e.displayValue, "dynamic-filtering": t.dynamicFiltering, "is-invalid": !!t.errorMessage || t.error, multiple: t.multiple, open: e.isDropdownOpen, "selected-value-item": e.isInputComponent ? void 0 : e.selectedValueItem, "show-slot-content-in-multiple": t.showSlotContentInMultiple }, on: { input: function(
|
|
678
|
-
e.searchTerm =
|
|
679
|
-
}, open: e.toggleDropdown, close: e.toggleDropdown }, scopedSlots: t._u([t._l(e.slots, function(
|
|
680
|
-
return { key:
|
|
681
|
-
return [t._t(
|
|
685
|
+
return o("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: e.clickOutsideDropdown, expression: "clickOutsideDropdown" }], staticClass: "b-dropdown", class: e.conditionalClasses }, [e.label ? o(e.FieldLabel, { attrs: { id: e.labelId, condensed: t.condensed, label: e.label, "tooltip-text": t.tooltipText, optional: t.optional, required: t.required } }) : t._e(), o("div", t._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "inputContainerRefWrapper" }, e.textboxKeyboardNavigationListeners), [o(e.computedSize, { ref: "inputContainerRef", tag: "component", attrs: { condensed: t.condensed, value: e.searchTerm, "additional-items-selected": e.additionalItemsSelected, "aria-controls": e.dropdownOptionsContainerId, ariaExpanded: e.isDropdownOpen, "aria-labelledby": e.label ? e.labelId : null, "aria-describedby": e.ariaDescribedBy, "aria-label": e.computedAriaLabel, "aria-readonly": e.isReadOnly, readonly: e.isReadOnly, required: t.required, disabled: t.disabled, "display-value": e.displayValue, "dynamic-filtering": t.dynamicFiltering, "is-invalid": !!t.errorMessage || t.error, multiple: t.multiple, open: e.isDropdownOpen, "selected-value-item": e.isInputComponent ? void 0 : e.selectedValueItem, "show-slot-content-in-multiple": t.showSlotContentInMultiple }, on: { input: function(s) {
|
|
686
|
+
e.searchTerm = s;
|
|
687
|
+
}, open: e.toggleDropdown, close: e.toggleDropdown }, scopedSlots: t._u([t._l(e.slots, function(s, l) {
|
|
688
|
+
return { key: l, fn: function(i) {
|
|
689
|
+
return [t._t(l, null, null, i)];
|
|
682
690
|
} };
|
|
683
|
-
})], null, !0) })], 1), e.inputContainerRef ? o(e.BentoDropdownOptionsContainer, t._g({ ref: "optionsContainerRef", attrs: { id: e.dropdownOptionsContainerId, "aria-label": e.computedAriaLabel, "component-loading": t.componentLoading, "empty-state": t.emptyState, "debounce-time": (
|
|
684
|
-
return { key:
|
|
685
|
-
return [t._t(
|
|
691
|
+
})], null, !0) })], 1), e.inputContainerRef ? o(e.BentoDropdownOptionsContainer, t._g({ ref: "optionsContainerRef", attrs: { id: e.dropdownOptionsContainerId, "aria-label": e.computedAriaLabel, "component-loading": t.componentLoading, "empty-state": t.emptyState, "debounce-time": (a = t.search) == null ? void 0 : a.debounceTime, disabled: t.disabled, "is-option-disabled": t.isOptionDisabled, items: e.filteredItems, multiple: t.multiple, "static-categories": e.staticCategories, open: e.isDropdownOpen, "selected-value": e.cachedSelectedListboxOptions, searching: e.isSearching, "target-element": e.inputContainerRefWrapper, loading: t.loading, "has-more-items": t.hasMoreItems, "lazy-load-type": t.lazyLoadType, "virtual-scroll": t.virtualScroll }, scopedSlots: t._u([t._l(e.slots, function(s, l) {
|
|
692
|
+
return { key: l, fn: function(i) {
|
|
693
|
+
return [t._t(l, null, null, i)];
|
|
686
694
|
} };
|
|
687
695
|
})], null, !0) }, e.listboxListeners)) : t._e(), t.errorMessage ? o(e.ErrorMessage, { staticClass: "b-dropdown__error-message", attrs: { id: e.errorId, "error-message": t.errorMessage } }) : t._e(), t.description || e.hasSlot("description") ? o(e.BentoTypography, { staticClass: "b-dropdown__description", class: e.descriptionConditionalClasses, attrs: { id: e.descriptionId, el: "span" } }, [t._t("description", function() {
|
|
688
696
|
return [t._v(" " + t._s(t.description) + " ")];
|
|
689
697
|
})], 2) : t._e()], 1);
|
|
690
|
-
},
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
698
|
+
}, Tt = [], Nt = /* @__PURE__ */ k(
|
|
699
|
+
Bt,
|
|
700
|
+
It,
|
|
701
|
+
Tt,
|
|
694
702
|
!1,
|
|
695
703
|
null,
|
|
696
|
-
"
|
|
704
|
+
"bc2a6da5"
|
|
697
705
|
);
|
|
698
|
-
const
|
|
706
|
+
const Gt = Nt.exports;
|
|
699
707
|
export {
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
708
|
+
Gt as B,
|
|
709
|
+
Qt as I,
|
|
710
|
+
Et as a,
|
|
711
|
+
Xt as b,
|
|
712
|
+
St as u
|
|
705
713
|
};
|
|
706
|
-
//# sourceMappingURL=dropdown.
|
|
714
|
+
//# sourceMappingURL=dropdown.-3x2IBDg.js.map
|