@adyen/bento-vue2 1.67.0 → 1.68.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/index.d.ts +2270 -2199
- package/dist/action-bar.js +1 -1
- 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/checkbox.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/header-meta.css +1 -0
- package/dist/assets/header-with-views.css +1 -1
- package/dist/assets/header.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/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/summary-grid.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.BxX3I27_.js → action-bar.Dy6tfK8c.js} +4 -4
- package/dist/chunks/{action-bar.BxX3I27_.js.map → action-bar.Dy6tfK8c.js.map} +1 -1
- package/dist/chunks/{base-modal.QGDM_kjG.js → base-modal.CkkfT6r6.js} +55 -118
- package/dist/chunks/base-modal.CkkfT6r6.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.itkbcqzk.js → button-actions-with-menu.CcxUTbsI.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.itkbcqzk.js.map → button-actions-with-menu.CcxUTbsI.js.map} +1 -1
- package/dist/chunks/{button-actions.BKdI_ooV.js → button-actions.Ju27CRNG.js} +2 -2
- package/dist/chunks/button-actions.Ju27CRNG.js.map +1 -0
- package/dist/chunks/{card.BktfAMv5.js → card.CASAAsuJ.js} +2 -2
- package/dist/chunks/{card.BktfAMv5.js.map → card.CASAAsuJ.js.map} +1 -1
- package/dist/chunks/{checkbox-group.BVMGnokj.js → checkbox-group.DLJUsfPM.js} +2 -2
- package/dist/chunks/{checkbox-group.BVMGnokj.js.map → checkbox-group.DLJUsfPM.js.map} +1 -1
- package/dist/chunks/{checkbox.Bg5FM5Oa.js → checkbox.D45-Bhm3.js} +36 -35
- package/dist/chunks/checkbox.D45-Bhm3.js.map +1 -0
- package/dist/chunks/{code-snippet.DDiQ9R3o.js → code-snippet.dIKi0D7d.js} +3 -3
- package/dist/chunks/{code-snippet.DDiQ9R3o.js.map → code-snippet.dIKi0D7d.js.map} +1 -1
- package/dist/chunks/{country.Df7erZov.js → country.melpzEsY.js} +2 -2
- package/dist/chunks/{country.Df7erZov.js.map → country.melpzEsY.js.map} +1 -1
- package/dist/chunks/{dashboard-section.Beep1lY8.js → dashboard-section.DBT99mLj.js} +2 -2
- package/dist/chunks/{dashboard-section.Beep1lY8.js.map → dashboard-section.DBT99mLj.js.map} +1 -1
- package/dist/chunks/{dashed-underline.BQwLgzz6.js → dashed-underline.BbH6Lnd2.js} +2 -2
- package/dist/chunks/{dashed-underline.BQwLgzz6.js.map → dashed-underline.BbH6Lnd2.js.map} +1 -1
- package/dist/chunks/{data-grid-template.nkx0pCMA.js → data-grid-template.B2lDfM2o.js} +2 -2
- package/dist/chunks/{data-grid-template.nkx0pCMA.js.map → data-grid-template.B2lDfM2o.js.map} +1 -1
- package/dist/chunks/{data-grid.CkwZVy3a.js → data-grid.CLz90HDC.js} +1198 -1143
- package/dist/chunks/data-grid.CLz90HDC.js.map +1 -0
- package/dist/chunks/{date-picker.BLBXaDHv.js → date-picker.DGIS6Pp-.js} +2 -2
- package/dist/chunks/{date-picker.BLBXaDHv.js.map → date-picker.DGIS6Pp-.js.map} +1 -1
- package/dist/chunks/{date-range-picker.am63DgMj.js → date-range-picker.CIaKRXIQ.js} +5 -5
- package/dist/chunks/{date-range-picker.am63DgMj.js.map → date-range-picker.CIaKRXIQ.js.map} +1 -1
- package/dist/chunks/dropdown-default-textbox.94q6opSD.js.map +1 -1
- package/dist/chunks/dropdown-tag.BaosvGGZ.js +240 -0
- package/dist/chunks/dropdown-tag.BaosvGGZ.js.map +1 -0
- package/dist/chunks/{dropdown.HA6ISg2h.js → dropdown.DazYAy4B.js} +220 -363
- package/dist/chunks/dropdown.DazYAy4B.js.map +1 -0
- package/dist/chunks/es6.n1ewaW31.js.map +1 -1
- package/dist/chunks/{filter-bar.DbqsoAI1.js → filter-bar.DL19SXF1.js} +674 -669
- package/dist/chunks/filter-bar.DL19SXF1.js.map +1 -0
- package/dist/chunks/{footer-actions.BUfQFz7J.js → footer-actions.BE_zzX-e.js} +2 -2
- package/dist/chunks/{footer-actions.BUfQFz7J.js.map → footer-actions.BE_zzX-e.js.map} +1 -1
- package/dist/chunks/header-meta.CfloYa86.js +183 -0
- package/dist/chunks/header-meta.CfloYa86.js.map +1 -0
- package/dist/chunks/{header-with-views.JllLR2nW.js → header-with-views.DzsU00YA.js} +526 -520
- package/dist/chunks/header-with-views.DzsU00YA.js.map +1 -0
- package/dist/chunks/header.DvHS-PnC.js +103 -0
- package/dist/chunks/header.DvHS-PnC.js.map +1 -0
- package/dist/chunks/{input-field-password.BtOdV0gF.js → input-field-password.C1zTapiN.js} +4 -4
- package/dist/chunks/{input-field-password.BtOdV0gF.js.map → input-field-password.C1zTapiN.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.Dq-LnGag.js → input-field-phone-number.K8BYjWfa.js} +623 -607
- package/dist/chunks/{input-field-phone-number.Dq-LnGag.js.map → input-field-phone-number.K8BYjWfa.js.map} +1 -1
- package/dist/chunks/{input-field.Bg77qHT2.js → input-field.5S-pUNxA.js} +7 -7
- package/dist/chunks/input-field.5S-pUNxA.js.map +1 -0
- package/dist/chunks/{menu.EgYjFAku.js → menu.dX3_vU05.js} +154 -153
- package/dist/chunks/{menu.EgYjFAku.js.map → menu.dX3_vU05.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.BNTUOC7o.js → modal-fullscreen.DHotw1RI.js} +76 -63
- package/dist/chunks/modal-fullscreen.DHotw1RI.js.map +1 -0
- package/dist/chunks/{modal.OvB4kEGR.js → modal.eoNQ6E3U.js} +4 -4
- package/dist/chunks/{modal.OvB4kEGR.js.map → modal.eoNQ6E3U.js.map} +1 -1
- package/dist/chunks/{pagination.Dw153NzQ.js → pagination.4J7ZMyf5.js} +2 -2
- package/dist/chunks/{pagination.Dw153NzQ.js.map → pagination.4J7ZMyf5.js.map} +1 -1
- package/dist/chunks/popover.Bo4Bkudr.js +145 -0
- package/dist/chunks/popover.Bo4Bkudr.js.map +1 -0
- package/dist/chunks/popover.types.CBqyA4ly.js +6 -0
- package/dist/chunks/popover.types.CBqyA4ly.js.map +1 -0
- package/dist/chunks/{rich-text-editor.CRJRvfJn.js → rich-text-editor.DQd_kHTx.js} +2 -2
- package/dist/chunks/{rich-text-editor.CRJRvfJn.js.map → rich-text-editor.DQd_kHTx.js.map} +1 -1
- package/dist/chunks/{search-bar.BTZSePJh.js → search-bar.CuBj5FAE.js} +3 -3
- package/dist/chunks/{search-bar.BTZSePJh.js.map → search-bar.CuBj5FAE.js.map} +1 -1
- package/dist/chunks/{secondary-nav.BBhSBNn7.js → secondary-nav.C6usurfD.js} +2 -2
- package/dist/chunks/{secondary-nav.BBhSBNn7.js.map → secondary-nav.C6usurfD.js.map} +1 -1
- package/dist/chunks/{selection-card-group.0o5T4tab.js → selection-card-group.BHvjGlKU.js} +8 -8
- package/dist/chunks/{selection-card-group.0o5T4tab.js.map → selection-card-group.BHvjGlKU.js.map} +1 -1
- package/dist/chunks/{sidepanel.Dt-BnFzN.js → sidepanel.DyThBUgV.js} +2 -2
- package/dist/chunks/{sidepanel.Dt-BnFzN.js.map → sidepanel.DyThBUgV.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.DsvtLg3D.js → summary-grid.types.D_FU3sUq.js} +4 -4
- package/dist/chunks/summary-grid.types.D_FU3sUq.js.map +1 -0
- package/dist/chunks/{textarea.RAU710Uw.js → textarea.UPM6N9V1.js} +7 -7
- package/dist/chunks/textarea.UPM6N9V1.js.map +1 -0
- package/dist/chunks/{timeline-item.Dz66luo5.js → timeline-item.DqLhj0Lb.js} +3 -3
- package/dist/chunks/{timeline-item.Dz66luo5.js.map → timeline-item.DqLhj0Lb.js.map} +1 -1
- package/dist/chunks/{tutorial.DAKO-fKz.js → tutorial.DRRfp81j.js} +7 -6
- package/dist/chunks/{tutorial.DAKO-fKz.js.map → tutorial.DRRfp81j.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.DQPABFfG.js → use-cached-selected-values.0EeyFfyF.js} +413 -410
- package/dist/chunks/use-cached-selected-values.0EeyFfyF.js.map +1 -0
- package/dist/chunks/{use-country-items.HFnjuDsG.js → use-country-items.BllTb5MK.js} +2 -2
- package/dist/chunks/{use-country-items.HFnjuDsG.js.map → use-country-items.BllTb5MK.js.map} +1 -1
- package/dist/chunks/{use-country-phon-code.DVgE19zT.js → use-country-phon-code.BOaJ9PDl.js} +507 -498
- package/dist/chunks/{use-country-phon-code.DVgE19zT.js.map → use-country-phon-code.BOaJ9PDl.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +2 -2
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker.js +1 -1
- package/dist/dropdown.js +3 -3
- package/dist/filter-bar.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +155 -154
- 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 +15 -14
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +11 -11
- package/dist/pagination.js +1 -1
- package/dist/popover.js +3 -2
- package/dist/popover.js.map +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/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/styles/bento-dark.css +10 -2
- package/dist/styles/bento-light.css +10 -2
- package/dist/styles/bento.css +10 -2
- package/dist/styles/legacy.css +10 -2
- package/dist/styles/styleguide.css +10 -2
- package/dist/summary-grid.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +265 -51
- package/package.json +6 -6
- package/dist/assets/info-icon-with-popover.css +0 -1
- package/dist/chunks/base-modal.QGDM_kjG.js.map +0 -1
- package/dist/chunks/button-actions.BKdI_ooV.js.map +0 -1
- package/dist/chunks/checkbox.Bg5FM5Oa.js.map +0 -1
- package/dist/chunks/data-grid.CkwZVy3a.js.map +0 -1
- package/dist/chunks/dropdown-tag.DYIkCBa6.js +0 -215
- package/dist/chunks/dropdown-tag.DYIkCBa6.js.map +0 -1
- package/dist/chunks/dropdown.HA6ISg2h.js.map +0 -1
- package/dist/chunks/filter-bar.DbqsoAI1.js.map +0 -1
- package/dist/chunks/header-with-views.JllLR2nW.js.map +0 -1
- package/dist/chunks/header.04Y0unpy.js +0 -188
- package/dist/chunks/header.04Y0unpy.js.map +0 -1
- package/dist/chunks/info-icon-with-popover.B1DnkW4B.js +0 -71
- package/dist/chunks/info-icon-with-popover.B1DnkW4B.js.map +0 -1
- package/dist/chunks/input-field.Bg77qHT2.js.map +0 -1
- package/dist/chunks/modal-fullscreen.BNTUOC7o.js.map +0 -1
- package/dist/chunks/popover.BGHbPUOr.js +0 -295
- package/dist/chunks/popover.BGHbPUOr.js.map +0 -1
- package/dist/chunks/summary-grid.types.DsvtLg3D.js.map +0 -1
- package/dist/chunks/textarea.RAU710Uw.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.DQPABFfG.js.map +0 -1
|
@@ -1,118 +1,119 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { B as
|
|
3
|
-
import { B as
|
|
4
|
-
import { B as
|
|
1
|
+
import { computed as i, ref as S, onMounted as $e, onUnmounted as Me, watch as X, defineComponent as G, nextTick as _e, toRef as H, useSlots as we, useAttrs as Ge } from "vue";
|
|
2
|
+
import { B as j } from "./typography.J1v_SPG3.js";
|
|
3
|
+
import { B as Pe } from "./loading-indicator.z8COalOc.js";
|
|
4
|
+
import { B as Fe } from "./empty-state.mtXfb1BB.js";
|
|
5
5
|
import { u as se } from "./i18n.BQkEbtPM.js";
|
|
6
|
-
import { d as
|
|
6
|
+
import { d as Ye } from "./debounce.DUTu11PS.js";
|
|
7
7
|
import "./index.Cl4_42j5.js";
|
|
8
|
-
import { B as
|
|
9
|
-
import { C as J, N as
|
|
10
|
-
import { C as
|
|
11
|
-
import { n as
|
|
12
|
-
import { C as
|
|
13
|
-
import { C as
|
|
8
|
+
import { B as Ue } from "./chip.OV0EWIP3.js";
|
|
9
|
+
import { C as J, N as ze } from "./minus-small.DJacLGTw.js";
|
|
10
|
+
import { C as Ve } from "./checkmark-small.DVDtD4HQ.js";
|
|
11
|
+
import { n as M } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
12
|
+
import { C as We } from "./chevron-down.eYtgv5ly.js";
|
|
13
|
+
import { C as Ke } from "./chevron-up.d8cwIlA_.js";
|
|
14
|
+
import { g as be } from "./generate-uid.NJ8tVoha.js";
|
|
14
15
|
import { B as N, a as le } from "./keyboard-navigation.pB8weElW.js";
|
|
15
|
-
import { d as
|
|
16
|
+
import { d as je, e as fe } from "./button-actions.Ju27CRNG.js";
|
|
16
17
|
/* empty css */
|
|
17
|
-
import { o as
|
|
18
|
+
import { o as qe } from "./resize.Bqks3WUm.js";
|
|
18
19
|
import "../assets/use-cached-selected-values.css";
|
|
19
|
-
const
|
|
20
|
-
const n =
|
|
20
|
+
const ge = (s, e, l, t) => {
|
|
21
|
+
const n = i(
|
|
21
22
|
() => {
|
|
22
|
-
var f,
|
|
23
|
-
return !!((f = s.value) != null && f.length) && ((
|
|
23
|
+
var f, A;
|
|
24
|
+
return !!((f = s.value) != null && f.length) && ((A = s.value) == null ? void 0 : A.length) === e.value.length;
|
|
24
25
|
}
|
|
25
|
-
),
|
|
26
|
+
), o = i(() => {
|
|
26
27
|
var f;
|
|
27
28
|
return s.value == null || s.value.length === 0 ? !1 : ((f = s.value) == null ? void 0 : f.length) !== e.value.length;
|
|
28
29
|
});
|
|
29
30
|
return {
|
|
30
31
|
isAllSelected: n,
|
|
31
|
-
isIndeterminate:
|
|
32
|
+
isIndeterminate: o,
|
|
32
33
|
toggleSelectAll: (f) => {
|
|
33
34
|
f ? l() : t();
|
|
34
35
|
}
|
|
35
36
|
};
|
|
36
37
|
};
|
|
37
|
-
function
|
|
38
|
-
const
|
|
38
|
+
function He(s, { disabled: e, itemHeight: l, overscan: t = 5, prefixHeight: n }) {
|
|
39
|
+
const o = S(null), r = S([]), f = S(0), A = S(0), d = S(0);
|
|
39
40
|
let b;
|
|
40
|
-
const
|
|
41
|
-
const
|
|
41
|
+
const T = i(() => {
|
|
42
|
+
const I = typeof l == "number" ? s.value.length * l : s.value.reduce((x, m, y) => x + l(y), 0), O = typeof l == "number" ? f.value * l : s.value.slice(0, f.value).reduce((x, m, y) => x + l(y), 0);
|
|
42
43
|
return {
|
|
43
44
|
style: {
|
|
44
|
-
marginTop: `${
|
|
45
|
-
height: `${
|
|
45
|
+
marginTop: `${O}px`,
|
|
46
|
+
height: `${I - O}px`
|
|
46
47
|
}
|
|
47
48
|
};
|
|
48
|
-
}),
|
|
49
|
-
const
|
|
49
|
+
}), g = () => {
|
|
50
|
+
const I = (n == null ? void 0 : n.value) ?? 0, O = Math.max(o.value.scrollTop - I, 0);
|
|
50
51
|
if (typeof l == "number")
|
|
51
|
-
return Math.floor(
|
|
52
|
-
let
|
|
52
|
+
return Math.floor(O / l);
|
|
53
|
+
let x = 0, m = 0;
|
|
53
54
|
for (let y = 0; y < s.value.length; y += 1) {
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
55
|
+
const D = l(y);
|
|
56
|
+
if (x += D, x >= O) {
|
|
56
57
|
m = y;
|
|
57
58
|
break;
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
61
|
return m;
|
|
61
|
-
},
|
|
62
|
-
if (d.value =
|
|
62
|
+
}, p = () => {
|
|
63
|
+
if (d.value = o.value.clientHeight, typeof l == "number")
|
|
63
64
|
return Math.ceil(d.value / l);
|
|
64
|
-
const
|
|
65
|
-
let
|
|
66
|
-
for (let m =
|
|
65
|
+
const I = f.value ?? 0;
|
|
66
|
+
let O = 0, x = 0;
|
|
67
|
+
for (let m = I; m < s.value.length; m += 1) {
|
|
67
68
|
const y = l(m);
|
|
68
|
-
if (
|
|
69
|
+
if (O += y, x = m, O > d.value)
|
|
69
70
|
break;
|
|
70
71
|
}
|
|
71
|
-
return
|
|
72
|
+
return x - I;
|
|
72
73
|
}, C = () => {
|
|
73
|
-
if (
|
|
74
|
-
const
|
|
75
|
-
f.value =
|
|
74
|
+
if (o.value) {
|
|
75
|
+
const I = p();
|
|
76
|
+
f.value = g(), A.value = Math.min(f.value + I + t, s.value.length), r.value = s.value.slice(f.value, A.value);
|
|
76
77
|
}
|
|
77
|
-
},
|
|
78
|
+
}, R = () => {
|
|
78
79
|
C();
|
|
79
80
|
};
|
|
80
|
-
e || (
|
|
81
|
-
|
|
82
|
-
d.value =
|
|
81
|
+
e || ($e(() => {
|
|
82
|
+
o.value && (d.value = o.value.clientHeight, b = qe(o.value, ({ clientHeight: I }) => {
|
|
83
|
+
d.value = I, C();
|
|
83
84
|
}), C());
|
|
84
|
-
}),
|
|
85
|
+
}), Me(() => {
|
|
85
86
|
b == null || b.disconnect();
|
|
86
|
-
}),
|
|
87
|
+
}), X(
|
|
87
88
|
() => s.value,
|
|
88
89
|
() => {
|
|
89
90
|
C();
|
|
90
91
|
}
|
|
91
92
|
));
|
|
92
|
-
const
|
|
93
|
-
ref:
|
|
93
|
+
const B = {
|
|
94
|
+
ref: o,
|
|
94
95
|
style: { overflowY: "auto" }
|
|
95
96
|
};
|
|
96
97
|
return e ? {
|
|
97
|
-
containerRef:
|
|
98
|
-
containerProps:
|
|
98
|
+
containerRef: o,
|
|
99
|
+
containerProps: B,
|
|
99
100
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
100
101
|
onScroll: () => {
|
|
101
102
|
},
|
|
102
103
|
list: s
|
|
103
104
|
} : {
|
|
104
|
-
containerRef:
|
|
105
|
-
containerProps:
|
|
106
|
-
onScroll:
|
|
105
|
+
containerRef: o,
|
|
106
|
+
containerProps: B,
|
|
107
|
+
onScroll: R,
|
|
107
108
|
list: r,
|
|
108
|
-
wrapperProps:
|
|
109
|
+
wrapperProps: T
|
|
109
110
|
};
|
|
110
111
|
}
|
|
111
|
-
var c = /* @__PURE__ */ ((s) => (s.SELECT = "select", s.SHOW_MORE = "show-more", s.ESCAPE = "escape-pressed", s.CLICK = "click", s.ENTER = "enter-pressed", s.SPACE = "space-pressed", s.TAB = "tab-pressed", s.CLOSE_DROPDOWN = "close-dropdown", s))(c || {}),
|
|
112
|
-
const
|
|
112
|
+
var c = /* @__PURE__ */ ((s) => (s.SELECT = "select", s.SHOW_MORE = "show-more", s.ESCAPE = "escape-pressed", s.CLICK = "click", s.ENTER = "enter-pressed", s.SPACE = "space-pressed", s.TAB = "tab-pressed", s.CLOSE_DROPDOWN = "close-dropdown", s))(c || {}), K = /* @__PURE__ */ ((s) => (s.AUTOMATIC = "automatic", s.BUTTON = "button", s.NONE = "none", s))(K || {});
|
|
113
|
+
const Xe = G({
|
|
113
114
|
name: "bento-listbox-static-category",
|
|
114
115
|
components: {
|
|
115
|
-
BentoTypography:
|
|
116
|
+
BentoTypography: j
|
|
116
117
|
},
|
|
117
118
|
props: {
|
|
118
119
|
/**
|
|
@@ -124,18 +125,18 @@ const He = w({
|
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
});
|
|
127
|
-
var
|
|
128
|
+
var Je = function() {
|
|
128
129
|
var e = this, l = e._self._c;
|
|
129
|
-
return e._self._setupProxy, l("div", { staticClass: "b-listbox-single-select-category" }, [l("bento-typography", { staticClass: "b-listbox-single-select-category__label-text", attrs: { variant: "caption", el: "span" } }, [e._v(" " + e._s(e.categoryLabel) + " ")]), l("div", [e._t("default")], 2)], 1);
|
|
130
|
-
},
|
|
131
|
-
He,
|
|
130
|
+
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);
|
|
131
|
+
}, Ze = [], Qe = /* @__PURE__ */ M(
|
|
132
132
|
Xe,
|
|
133
133
|
Je,
|
|
134
|
+
Ze,
|
|
134
135
|
!1,
|
|
135
136
|
null,
|
|
136
|
-
"
|
|
137
|
+
"bfbc1649"
|
|
137
138
|
);
|
|
138
|
-
const
|
|
139
|
+
const et = Qe.exports, tt = G({
|
|
139
140
|
name: "bento-listbox-option",
|
|
140
141
|
props: {
|
|
141
142
|
/**
|
|
@@ -149,7 +150,7 @@ const Qe = Ze.exports, et = w({
|
|
|
149
150
|
},
|
|
150
151
|
emits: [c.CLICK, c.ENTER, c.SPACE, c.TAB],
|
|
151
152
|
setup(s, { emit: e }) {
|
|
152
|
-
const l =
|
|
153
|
+
const l = i(() => ({
|
|
153
154
|
"b-listbox-option--disabled": s.disabled,
|
|
154
155
|
"b-listbox-option--selected": s.selected
|
|
155
156
|
}));
|
|
@@ -160,16 +161,16 @@ const Qe = Ze.exports, et = w({
|
|
|
160
161
|
// Values
|
|
161
162
|
conditionalClasses: l,
|
|
162
163
|
// Events
|
|
163
|
-
onClick: (
|
|
164
|
-
e(c.CLICK,
|
|
164
|
+
onClick: (o) => {
|
|
165
|
+
e(c.CLICK, o);
|
|
165
166
|
},
|
|
166
|
-
onOptionSelected: (
|
|
167
|
-
e(
|
|
167
|
+
onOptionSelected: (o, r) => {
|
|
168
|
+
e(o, r);
|
|
168
169
|
}
|
|
169
170
|
};
|
|
170
171
|
}
|
|
171
172
|
});
|
|
172
|
-
var
|
|
173
|
+
var st = function() {
|
|
173
174
|
var e = this, l = e._self._c;
|
|
174
175
|
return e._self._setupProxy, l("div", e._b({ staticClass: "b-listbox-option", class: e.conditionalClasses, attrs: { role: "option" }, on: { click: e.onClick, keydown: [function(t) {
|
|
175
176
|
return !t.type.indexOf("key") && e._k(t.keyCode, "enter", 13, t.key, "Enter") ? null : e.onOptionSelected(e.BentoListboxEvent.ENTER, t);
|
|
@@ -178,38 +179,38 @@ var tt = function() {
|
|
|
178
179
|
}, function(t) {
|
|
179
180
|
return !t.type.indexOf("key") && e._k(t.keyCode, "tab", 9, t.key, "Tab") ? null : e.onOptionSelected(e.BentoListboxEvent.TAB, t);
|
|
180
181
|
}] } }, "div", e.$attrs, !1), [e._t("default")], 2);
|
|
181
|
-
},
|
|
182
|
-
et,
|
|
182
|
+
}, lt = [], nt = /* @__PURE__ */ M(
|
|
183
183
|
tt,
|
|
184
184
|
st,
|
|
185
|
+
lt,
|
|
185
186
|
!1,
|
|
186
187
|
null,
|
|
187
188
|
"a1e9ebff"
|
|
188
189
|
);
|
|
189
|
-
const Z =
|
|
190
|
-
let
|
|
191
|
-
const
|
|
190
|
+
const Z = nt.exports;
|
|
191
|
+
let ve = 0;
|
|
192
|
+
const ot = {
|
|
192
193
|
beforeCreate() {
|
|
193
|
-
this.uuid =
|
|
194
|
+
this.uuid = ve.toString(), ve += 1;
|
|
194
195
|
}
|
|
195
196
|
};
|
|
196
197
|
var it = function() {
|
|
197
198
|
var e = this, l = e._self._c;
|
|
198
199
|
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" } })]);
|
|
199
|
-
},
|
|
200
|
-
nt,
|
|
201
|
-
it,
|
|
200
|
+
}, at = [], ct = /* @__PURE__ */ M(
|
|
202
201
|
ot,
|
|
202
|
+
it,
|
|
203
|
+
at,
|
|
203
204
|
!1,
|
|
204
205
|
null,
|
|
205
206
|
null
|
|
206
207
|
);
|
|
207
|
-
const
|
|
208
|
+
const rt = ct.exports, ut = G({
|
|
208
209
|
name: "bento-listbox-single-select-option",
|
|
209
210
|
components: {
|
|
210
211
|
BentoListboxOption: Z,
|
|
211
|
-
BentoTypography:
|
|
212
|
-
CheckmarkIcon:
|
|
212
|
+
BentoTypography: j,
|
|
213
|
+
CheckmarkIcon: rt
|
|
213
214
|
},
|
|
214
215
|
props: {
|
|
215
216
|
/**
|
|
@@ -233,12 +234,12 @@ const ct = at.exports, rt = w({
|
|
|
233
234
|
setup(s, { emit: e }) {
|
|
234
235
|
const l = (r) => {
|
|
235
236
|
s.disabled || e(r, s.option);
|
|
236
|
-
}, t =
|
|
237
|
+
}, t = i(() => s.disabled ? !0 : null), n = i(() => s.selected ? !0 : null), o = i(() => s.disabled ? -1 : 0);
|
|
237
238
|
return {
|
|
238
239
|
// Values
|
|
239
240
|
ariaDisabled: t,
|
|
240
241
|
ariaSelected: n,
|
|
241
|
-
tabIndex:
|
|
242
|
+
tabIndex: o,
|
|
242
243
|
// Enums
|
|
243
244
|
BentoListboxEvent: c,
|
|
244
245
|
// Events
|
|
@@ -246,7 +247,7 @@ const ct = at.exports, rt = w({
|
|
|
246
247
|
};
|
|
247
248
|
}
|
|
248
249
|
});
|
|
249
|
-
var
|
|
250
|
+
var dt = function() {
|
|
250
251
|
var e = this, l = e._self._c;
|
|
251
252
|
return e._self._setupProxy, l("bento-listbox-option", { staticClass: "b-listbox-single-select-option", attrs: { disabled: e.disabled, selected: e.selected, "aria-selected": e.ariaSelected, "aria-disabled": e.ariaDisabled, tabindex: e.tabIndex }, on: { click: function(t) {
|
|
252
253
|
return e.onOptionSelected(e.BentoListboxEvent.SELECT);
|
|
@@ -259,17 +260,17 @@ var ut = function() {
|
|
|
259
260
|
} } }, [e._t("default", function() {
|
|
260
261
|
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)];
|
|
261
262
|
}, 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);
|
|
262
|
-
},
|
|
263
|
-
rt,
|
|
263
|
+
}, bt = [], ft = /* @__PURE__ */ M(
|
|
264
264
|
ut,
|
|
265
265
|
dt,
|
|
266
|
+
bt,
|
|
266
267
|
!1,
|
|
267
268
|
null,
|
|
268
269
|
"5a5ff36a"
|
|
269
270
|
);
|
|
270
|
-
const
|
|
271
|
-
const l =
|
|
272
|
-
switch (
|
|
271
|
+
const vt = ft.exports, pe = ({ items: s }, e) => {
|
|
272
|
+
const l = i(() => s.value.length - 1), t = S(0), n = (g) => {
|
|
273
|
+
switch (g) {
|
|
273
274
|
case "increase":
|
|
274
275
|
t.value += 1;
|
|
275
276
|
break;
|
|
@@ -277,67 +278,67 @@ const ft = bt.exports, pe = ({ items: s }, e) => {
|
|
|
277
278
|
t.value -= 1;
|
|
278
279
|
break;
|
|
279
280
|
}
|
|
280
|
-
},
|
|
281
|
-
t.value !==
|
|
282
|
-
}, r = (
|
|
283
|
-
|
|
281
|
+
}, o = ({ edgeCaseItem: g }, p) => {
|
|
282
|
+
t.value !== g && (n(p), e(t.value));
|
|
283
|
+
}, r = (g) => {
|
|
284
|
+
T(g), o(
|
|
284
285
|
{
|
|
285
286
|
edgeCaseItem: l.value
|
|
286
287
|
},
|
|
287
288
|
"increase"
|
|
288
289
|
/* INCREASE */
|
|
289
290
|
);
|
|
290
|
-
}, f = (
|
|
291
|
-
|
|
291
|
+
}, f = (g) => {
|
|
292
|
+
T(g), o(
|
|
292
293
|
{
|
|
293
294
|
edgeCaseItem: 0
|
|
294
295
|
},
|
|
295
296
|
"decrease"
|
|
296
297
|
/* DECREASE */
|
|
297
298
|
);
|
|
298
|
-
},
|
|
299
|
+
}, A = () => {
|
|
299
300
|
t.value = 0, e(t.value);
|
|
300
301
|
}, d = () => {
|
|
301
302
|
t.value = l.value, e(t.value);
|
|
302
|
-
}, b = (
|
|
303
|
-
t.value =
|
|
304
|
-
},
|
|
305
|
-
var
|
|
306
|
-
(
|
|
303
|
+
}, b = (g) => {
|
|
304
|
+
t.value = g;
|
|
305
|
+
}, T = (g) => {
|
|
306
|
+
var p;
|
|
307
|
+
(p = g == null ? void 0 : g.detail) == null || p.preventDefault();
|
|
307
308
|
};
|
|
308
309
|
return {
|
|
309
|
-
moveToFirstElement:
|
|
310
|
+
moveToFirstElement: A,
|
|
310
311
|
moveToLastElement: d,
|
|
311
312
|
moveToNextElement: r,
|
|
312
313
|
moveToPreviousElement: f,
|
|
313
314
|
setListboxFocusedIndex: b,
|
|
314
|
-
preventDefault:
|
|
315
|
+
preventDefault: T,
|
|
315
316
|
focusedIndex: t
|
|
316
317
|
};
|
|
317
|
-
},
|
|
318
|
-
const n =
|
|
318
|
+
}, ye = (s, e, l = S("option"), t = !0) => {
|
|
319
|
+
const n = S([]), o = async () => {
|
|
319
320
|
if (!s.value || s.value.nodeType === Node.COMMENT_NODE)
|
|
320
321
|
return;
|
|
321
322
|
const r = Array.from(s.value.querySelectorAll(`[role="${l.value}"]`));
|
|
322
323
|
n.value = t ? r.filter((f) => f.checkVisibility()) : r;
|
|
323
324
|
};
|
|
324
|
-
return
|
|
325
|
+
return X(
|
|
325
326
|
e,
|
|
326
327
|
() => {
|
|
327
|
-
|
|
328
|
-
|
|
328
|
+
_e(() => {
|
|
329
|
+
o();
|
|
329
330
|
});
|
|
330
331
|
},
|
|
331
332
|
{ immediate: !0 }
|
|
332
333
|
), {
|
|
333
334
|
visibleDomOptions: n,
|
|
334
|
-
updateVisibleDomOptions:
|
|
335
|
+
updateVisibleDomOptions: o
|
|
335
336
|
};
|
|
336
|
-
},
|
|
337
|
+
}, mt = G({
|
|
337
338
|
name: "bento-listbox-single-select",
|
|
338
339
|
components: {
|
|
339
|
-
BentoListboxSingleSelectCategory:
|
|
340
|
-
BentoListboxSingleSelectOption:
|
|
340
|
+
BentoListboxSingleSelectCategory: et,
|
|
341
|
+
BentoListboxSingleSelectOption: vt
|
|
341
342
|
},
|
|
342
343
|
directives: { BentoKeyboardNavigationDirective: le },
|
|
343
344
|
inheritAttrs: !1,
|
|
@@ -382,41 +383,41 @@ const ft = bt.exports, pe = ({ items: s }, e) => {
|
|
|
382
383
|
},
|
|
383
384
|
emits: [c.SELECT, c.ENTER, c.SPACE, c.TAB],
|
|
384
385
|
setup(s, { emit: e, expose: l, slots: t, attrs: n }) {
|
|
385
|
-
const
|
|
386
|
+
const o = S(null), r = S([]), f = i(() => {
|
|
386
387
|
var m;
|
|
387
388
|
return !!((m = s.selectedValue) != null && m.length) && s.selectedValue.at(0);
|
|
388
|
-
}),
|
|
389
|
+
}), A = i(
|
|
389
390
|
() => {
|
|
390
|
-
var m, y,
|
|
391
|
+
var m, y, D, P;
|
|
391
392
|
return {
|
|
392
393
|
"aria-label": (m = n["aria-label"]) == null ? void 0 : m.toString(),
|
|
393
394
|
"aria-busy": (y = n["aria-busy"]) == null ? void 0 : y.toString(),
|
|
394
|
-
"aria-atomic": (
|
|
395
|
-
"aria-live": (
|
|
395
|
+
"aria-atomic": (D = n["aria-atomic"]) == null ? void 0 : D.toString(),
|
|
396
|
+
"aria-live": (P = n["aria-live"]) == null ? void 0 : P.toString()
|
|
396
397
|
};
|
|
397
398
|
}
|
|
398
|
-
), d =
|
|
399
|
+
), d = i(() => !!s.items.some(({ items: m }) => !!m)), b = (m) => (y) => {
|
|
399
400
|
e(m, [y]);
|
|
400
|
-
}, { visibleDomOptions:
|
|
401
|
+
}, { visibleDomOptions: T } = ye(o, H(s, "items"), S("option"), !1), g = (m) => {
|
|
401
402
|
var y;
|
|
402
|
-
(y =
|
|
403
|
+
(y = T.value[m]) == null || y.focus();
|
|
403
404
|
}, {
|
|
404
|
-
moveToNextElement:
|
|
405
|
+
moveToNextElement: p,
|
|
405
406
|
moveToPreviousElement: C,
|
|
406
|
-
moveToFirstElement:
|
|
407
|
-
moveToLastElement:
|
|
408
|
-
setListboxFocusedIndex:
|
|
407
|
+
moveToFirstElement: R,
|
|
408
|
+
moveToLastElement: B,
|
|
409
|
+
setListboxFocusedIndex: I
|
|
409
410
|
} = pe(
|
|
410
411
|
{
|
|
411
|
-
items:
|
|
412
|
+
items: T
|
|
412
413
|
},
|
|
413
|
-
|
|
414
|
-
),
|
|
414
|
+
g
|
|
415
|
+
), O = {
|
|
415
416
|
[N.ARROW_UP]: C,
|
|
416
|
-
[N.ARROW_DOWN]:
|
|
417
|
-
[N.HOME]:
|
|
418
|
-
[N.END]:
|
|
419
|
-
},
|
|
417
|
+
[N.ARROW_DOWN]: p,
|
|
418
|
+
[N.HOME]: R,
|
|
419
|
+
[N.END]: B
|
|
420
|
+
}, x = {
|
|
420
421
|
[c.SELECT]: b(c.SELECT),
|
|
421
422
|
[c.SPACE]: b(c.SPACE),
|
|
422
423
|
[c.TAB]: b(c.TAB),
|
|
@@ -432,53 +433,53 @@ const ft = bt.exports, pe = ({ items: s }, e) => {
|
|
|
432
433
|
* Method to set the index of the item to be focused on
|
|
433
434
|
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
434
435
|
*/
|
|
435
|
-
setListboxFocusedIndex:
|
|
436
|
+
setListboxFocusedIndex: I
|
|
436
437
|
}), {
|
|
437
438
|
// Enums
|
|
438
439
|
BentoListboxEvent: c,
|
|
439
440
|
// Values
|
|
440
|
-
listboxRef:
|
|
441
|
+
listboxRef: o,
|
|
441
442
|
listboxItemRef: r,
|
|
442
443
|
selectedItem: f,
|
|
443
444
|
slots: t,
|
|
444
|
-
ariaAttributes:
|
|
445
|
+
ariaAttributes: A,
|
|
445
446
|
// Computed
|
|
446
447
|
hasCategories: d,
|
|
447
448
|
// Methods
|
|
448
449
|
onOptionSelected: b,
|
|
449
450
|
// Keyboard navigation
|
|
450
|
-
listboxListeners:
|
|
451
|
-
listboxOptionListeners:
|
|
451
|
+
listboxListeners: O,
|
|
452
|
+
listboxOptionListeners: x
|
|
452
453
|
};
|
|
453
454
|
}
|
|
454
455
|
});
|
|
455
|
-
var
|
|
456
|
+
var _t = function() {
|
|
456
457
|
var e = this, l = e._self._c;
|
|
457
458
|
return e._self._setupProxy, l("div", e._g(e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", attrs: { role: "listbox" } }, "div", e.ariaAttributes, !1), e.listboxListeners), [e.hasCategories && e.staticCategories ? e._l(e.items, function(t) {
|
|
458
|
-
return l("bento-listbox-single-select-category", { key: t.value, attrs: { "category-label": t.label
|
|
459
|
-
return l("bento-listbox-single-select-option", e._g({ key: n.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: n, disabled: e.isOptionDisabled ? e.isOptionDisabled(n) : null, selected: n.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(
|
|
459
|
+
return l("bento-listbox-single-select-category", { key: t.value, attrs: { "category-label": t.label } }, e._l(t.items, function(n) {
|
|
460
|
+
return l("bento-listbox-single-select-option", e._g({ key: n.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: n, disabled: e.isOptionDisabled ? e.isOptionDisabled(n) : null, selected: n.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(o, r) {
|
|
460
461
|
return { key: r, fn: function(f) {
|
|
461
462
|
return [e._t(r, null, null, f)];
|
|
462
463
|
} };
|
|
463
464
|
})], null, !0) }, e.listboxOptionListeners));
|
|
464
465
|
}), 1);
|
|
465
466
|
}) : e._l(e.items, function(t) {
|
|
466
|
-
return l("bento-listbox-single-select-option", e._g({ key: t.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: t, disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, selected: t.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(n,
|
|
467
|
-
return { key:
|
|
468
|
-
return [e._t(
|
|
467
|
+
return l("bento-listbox-single-select-option", e._g({ key: t.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: t, disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, selected: t.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(n, o) {
|
|
468
|
+
return { key: o, fn: function(r) {
|
|
469
|
+
return [e._t(o, null, null, r)];
|
|
469
470
|
} };
|
|
470
471
|
})], null, !0) }, e.listboxOptionListeners));
|
|
471
472
|
})], 2);
|
|
472
|
-
},
|
|
473
|
-
vt,
|
|
473
|
+
}, gt = [], pt = /* @__PURE__ */ M(
|
|
474
474
|
mt,
|
|
475
475
|
_t,
|
|
476
|
+
gt,
|
|
476
477
|
!1,
|
|
477
478
|
null,
|
|
478
479
|
null
|
|
479
480
|
);
|
|
480
|
-
const
|
|
481
|
-
...
|
|
481
|
+
const yt = pt.exports, ht = {}, xt = /* @__PURE__ */ G({
|
|
482
|
+
...ht,
|
|
482
483
|
__name: "listbox-decorative-checkbox",
|
|
483
484
|
props: {
|
|
484
485
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -486,42 +487,42 @@ const gt = pt.exports, yt = {}, xt = /* @__PURE__ */ w({
|
|
|
486
487
|
checked: { type: Boolean, default: !1 }
|
|
487
488
|
},
|
|
488
489
|
setup(s) {
|
|
489
|
-
const e = s, l =
|
|
490
|
+
const e = s, l = i(() => ({
|
|
490
491
|
[`b-checkbox-input--${J.DISABLED}`]: e.disabled
|
|
491
|
-
})), t =
|
|
492
|
+
})), t = i(() => ({
|
|
492
493
|
[`b-checkbox-input__outline--${J.UNCHECKED}`]: !e.checked && !e.indeterminate,
|
|
493
494
|
[`b-checkbox-input__outline--${J.CHECKED}`]: e.checked && !e.indeterminate,
|
|
494
495
|
[`b-checkbox-input__outline--${J.INDETERMINATE}`]: e.indeterminate
|
|
495
496
|
}));
|
|
496
|
-
return { __sfc: !0, props: e, conditionalClasses: l, outlineConditionalClasses: t, CheckmarkSmallIcon:
|
|
497
|
+
return { __sfc: !0, props: e, conditionalClasses: l, outlineConditionalClasses: t, CheckmarkSmallIcon: Ve, MinusSmallIcon: ze };
|
|
497
498
|
}
|
|
498
499
|
});
|
|
499
|
-
var
|
|
500
|
+
var Ct = function() {
|
|
500
501
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
501
502
|
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.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);
|
|
502
|
-
},
|
|
503
|
+
}, St = [], Ot = /* @__PURE__ */ M(
|
|
503
504
|
xt,
|
|
504
|
-
ht,
|
|
505
505
|
Ct,
|
|
506
|
+
St,
|
|
506
507
|
!1,
|
|
507
508
|
null,
|
|
508
509
|
"5dc60f05"
|
|
509
510
|
);
|
|
510
|
-
const ne =
|
|
511
|
-
var
|
|
512
|
-
const
|
|
511
|
+
const ne = Ot.exports;
|
|
512
|
+
var he = /* @__PURE__ */ ((s) => (s.DISABLED = "disabled", s.STATIC_CATEGORY = "static-category", s))(he || {}), z = /* @__PURE__ */ ((s) => (s.SELECT_CATEGORY = "select-category", s.UNSELECT_CATEGORY = "unselect-category", s.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", s))(z || {});
|
|
513
|
+
const Et = {
|
|
513
514
|
"en-US": {
|
|
514
515
|
categoryClosed: "{category} closed",
|
|
515
516
|
categoryOpened: "{category} opened"
|
|
516
517
|
}
|
|
517
|
-
},
|
|
518
|
-
i18n: { messages:
|
|
518
|
+
}, Tt = G({
|
|
519
|
+
i18n: { messages: Et },
|
|
519
520
|
name: "bento-listbox-multi-select-category",
|
|
520
521
|
components: {
|
|
521
|
-
BentoTypography:
|
|
522
|
+
BentoTypography: j,
|
|
522
523
|
BentoListboxOption: Z,
|
|
523
|
-
ChevronDownIcon:
|
|
524
|
-
ChevronUpIcon:
|
|
524
|
+
ChevronDownIcon: We,
|
|
525
|
+
ChevronUpIcon: Ke,
|
|
525
526
|
ListboxDecorativeCheckbox: ne
|
|
526
527
|
},
|
|
527
528
|
props: {
|
|
@@ -568,99 +569,101 @@ const Ot = {
|
|
|
568
569
|
tabindex: { type: Number, default: -1 }
|
|
569
570
|
},
|
|
570
571
|
emits: [
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
572
|
+
z.SELECT_CATEGORY,
|
|
573
|
+
z.UNSELECT_CATEGORY,
|
|
574
|
+
z.TOGGLE_CATEGORY_VISIBILITY
|
|
574
575
|
],
|
|
575
576
|
setup(s, { emit: e }) {
|
|
576
|
-
const l =
|
|
577
|
-
() => s.category.items.every((
|
|
578
|
-
),
|
|
579
|
-
[`b-listbox-multi-select-category--${
|
|
580
|
-
})),
|
|
581
|
-
|
|
582
|
-
},
|
|
583
|
-
var
|
|
584
|
-
const
|
|
585
|
-
return { isDisabled:
|
|
586
|
-
},
|
|
587
|
-
() => s.category.items.filter((
|
|
588
|
-
const { isDisabled:
|
|
589
|
-
return
|
|
577
|
+
const l = S(!1), { t } = se(), n = be("category-group"), o = be("category-name"), r = (E) => s.isOptionDisabled ? s.isOptionDisabled(E) : !1, f = i(
|
|
578
|
+
() => s.category.items.every((E) => r(E))
|
|
579
|
+
), A = H(s, "staticCategories"), d = i(() => l.value || s.staticCategories), b = i(() => ({
|
|
580
|
+
[`b-listbox-multi-select-category--${he.DISABLED}`]: f.value
|
|
581
|
+
})), T = (E, L) => {
|
|
582
|
+
E.preventDefault(), l.value = L !== void 0 ? L : !l.value, e(z.TOGGLE_CATEGORY_VISIBILITY, s.category.value);
|
|
583
|
+
}, g = (E) => {
|
|
584
|
+
var Y;
|
|
585
|
+
const L = r(E), $ = ((Y = s.selectedItemsList) == null ? void 0 : Y.includes(E.value)) || !1;
|
|
586
|
+
return { isDisabled: L, isPreSelected: $ };
|
|
587
|
+
}, p = i(
|
|
588
|
+
() => s.category.items.filter((E) => {
|
|
589
|
+
const { isDisabled: L, isPreSelected: $ } = g(E);
|
|
590
|
+
return L && $ || !L;
|
|
590
591
|
})
|
|
591
|
-
),
|
|
592
|
+
), C = i(
|
|
592
593
|
() => {
|
|
593
|
-
var
|
|
594
|
-
return (
|
|
595
|
-
({ value:
|
|
596
|
-
var
|
|
597
|
-
return (
|
|
594
|
+
var E;
|
|
595
|
+
return (E = p.value) == null ? void 0 : E.filter(
|
|
596
|
+
({ value: L }) => {
|
|
597
|
+
var $;
|
|
598
|
+
return ($ = s.selectedItemsList) == null ? void 0 : $.includes(L);
|
|
598
599
|
}
|
|
599
600
|
);
|
|
600
601
|
}
|
|
601
|
-
),
|
|
602
|
-
const
|
|
603
|
-
return t(
|
|
604
|
-
}),
|
|
605
|
-
e(
|
|
606
|
-
},
|
|
607
|
-
e(
|
|
608
|
-
}, { isAllSelected:
|
|
609
|
-
p,
|
|
610
|
-
E,
|
|
602
|
+
), R = i(() => {
|
|
603
|
+
const E = l.value ? "categoryOpened" : "categoryClosed";
|
|
604
|
+
return t(E, { category: s.category.label });
|
|
605
|
+
}), B = () => {
|
|
606
|
+
e(z.SELECT_CATEGORY);
|
|
607
|
+
}, I = () => {
|
|
608
|
+
e(z.UNSELECT_CATEGORY);
|
|
609
|
+
}, { isAllSelected: O, isIndeterminate: x, toggleSelectAll: m } = ge(
|
|
611
610
|
C,
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
611
|
+
p,
|
|
612
|
+
B,
|
|
613
|
+
I
|
|
614
|
+
), y = i(() => x.value ? "mixed" : `${O.value}`), D = S(O.value), P = () => {
|
|
615
|
+
D.value = !D.value, m(D.value);
|
|
615
616
|
};
|
|
616
|
-
return
|
|
617
|
-
|
|
617
|
+
return X(O, () => {
|
|
618
|
+
D.value = O.value;
|
|
618
619
|
}), {
|
|
619
620
|
// Values
|
|
620
|
-
chevronTitle:
|
|
621
|
-
conditionalClass:
|
|
622
|
-
hasAllPropsDisabled:
|
|
621
|
+
chevronTitle: R,
|
|
622
|
+
conditionalClass: b,
|
|
623
|
+
hasAllPropsDisabled: f,
|
|
623
624
|
isOpen: l,
|
|
624
|
-
isAllSelected:
|
|
625
|
-
isIndeterminate:
|
|
626
|
-
isStaticCategory:
|
|
625
|
+
isAllSelected: O,
|
|
626
|
+
isIndeterminate: x,
|
|
627
|
+
isStaticCategory: A,
|
|
628
|
+
categoryGroupId: n,
|
|
629
|
+
categoryNameId: o,
|
|
627
630
|
// Computed
|
|
628
|
-
showItemChildren:
|
|
629
|
-
ariaCheckedComputed:
|
|
631
|
+
showItemChildren: d,
|
|
632
|
+
ariaCheckedComputed: y,
|
|
630
633
|
// Methods
|
|
631
|
-
handleSelectAll:
|
|
632
|
-
toggleOpen:
|
|
633
|
-
toggleSelectAll:
|
|
634
|
+
handleSelectAll: P,
|
|
635
|
+
toggleOpen: T,
|
|
636
|
+
toggleSelectAll: m
|
|
634
637
|
};
|
|
635
638
|
}
|
|
636
639
|
});
|
|
637
|
-
var
|
|
640
|
+
var It = function() {
|
|
638
641
|
var e = this, l = e._self._c;
|
|
639
|
-
return e._self._setupProxy, l("div", [e.isStaticCategory ? l("div", { staticClass: "b-listbox-multi-select-category b-listbox-multi-select-category--static-category" }, [l("span", { staticClass: "b-listbox-multi-select-category__label" }, [l("bento-typography", { staticClass: "b-listbox-multi-select-category__label-text", attrs: { el: "span", variant: "caption" } }, [e._v(" " + e._s(e.category.label) + " ")])], 1)]) : l("bento-listbox-option", { staticClass: "b-listbox-multi-select-category__option", class: e.conditionalClass, attrs: { tabindex: e.tabindex, "aria-selected": e.ariaCheckedComputed !== "false", "aria-checked": e.ariaCheckedComputed, "aria-disabled": e.hasAllPropsDisabled, "aria-expanded": e.isOpen
|
|
642
|
+
return e._self._setupProxy, l("div", [e.isStaticCategory ? l("div", { staticClass: "b-listbox-multi-select-category b-listbox-multi-select-category--static-category", attrs: { "aria-hidden": "true" } }, [l("span", { staticClass: "b-listbox-multi-select-category__label" }, [l("bento-typography", { staticClass: "b-listbox-multi-select-category__label-text", attrs: { el: "span", variant: "caption" } }, [e._v(" " + e._s(e.category.label) + " ")])], 1)]) : l("bento-listbox-option", { staticClass: "b-listbox-multi-select-category__option", class: e.conditionalClass, attrs: { tabindex: e.tabindex, "aria-selected": e.ariaCheckedComputed !== "false", "aria-checked": e.ariaCheckedComputed, "aria-disabled": e.hasAllPropsDisabled, "aria-expanded": `${e.isOpen}`, role: "treeitem", "aria-owns": e.categoryGroupId, "aria-labelledby": e.categoryNameId }, on: { click: e.handleSelectAll, "enter-pressed": e.handleSelectAll, "space-pressed": function(t) {
|
|
640
643
|
return t.preventDefault(), e.handleSelectAll.apply(null, arguments);
|
|
641
644
|
} }, nativeOn: { keydown: [function(t) {
|
|
642
645
|
return !t.type.indexOf("key") && e._k(t.keyCode, "arrow-left", void 0, t.key, void 0) ? null : e.toggleOpen(t, !1);
|
|
643
646
|
}, function(t) {
|
|
644
647
|
return !t.type.indexOf("key") && e._k(t.keyCode, "arrow-right", void 0, t.key, void 0) ? null : e.toggleOpen(t, !0);
|
|
645
|
-
}] } }, [l("listbox-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: { el: "span" } }, [e._v(" " + e._s(e.category.label) + " ")]), l("div", { staticClass: "b-listbox-multi-select-category__label-chevron", attrs: { "data-testid": "toggle-listbox" }, on: { "!click": function(t) {
|
|
648
|
+
}] } }, [l("listbox-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) {
|
|
646
649
|
return t.stopPropagation(), e.toggleOpen.apply(null, arguments);
|
|
647
|
-
} } }, [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" }] }, [e._t("default")], 2)], 1);
|
|
648
|
-
},
|
|
649
|
-
Et,
|
|
650
|
+
} } }, [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);
|
|
651
|
+
}, At = [], Lt = /* @__PURE__ */ M(
|
|
650
652
|
Tt,
|
|
651
653
|
It,
|
|
654
|
+
At,
|
|
652
655
|
!1,
|
|
653
656
|
null,
|
|
654
|
-
"
|
|
657
|
+
"0bc88880"
|
|
655
658
|
);
|
|
656
|
-
const
|
|
657
|
-
var
|
|
658
|
-
const
|
|
659
|
+
const kt = Lt.exports;
|
|
660
|
+
var w = /* @__PURE__ */ ((s) => (s.SELECT_CATEGORY = "select-category", s.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", s.UNSELECT_CATEGORY = "unselect-category", s.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", s))(w || {});
|
|
661
|
+
const Rt = G({
|
|
659
662
|
name: "listbox-multi-select-options",
|
|
660
663
|
components: {
|
|
661
664
|
BentoListboxOption: Z,
|
|
662
|
-
BentoTypography:
|
|
663
|
-
ListboxMultiSelectCategory:
|
|
665
|
+
BentoTypography: j,
|
|
666
|
+
ListboxMultiSelectCategory: kt,
|
|
664
667
|
ListboxDecorativeCheckbox: ne
|
|
665
668
|
},
|
|
666
669
|
inheritAttrs: !1,
|
|
@@ -731,43 +734,43 @@ const kt = w({
|
|
|
731
734
|
}
|
|
732
735
|
},
|
|
733
736
|
emits: [
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
737
|
+
w.TOGGLE_CHECKBOX_SELECTION,
|
|
738
|
+
w.SELECT_CATEGORY,
|
|
739
|
+
w.UNSELECT_CATEGORY,
|
|
740
|
+
w.TOGGLE_CATEGORY_VISIBILITY
|
|
738
741
|
],
|
|
739
742
|
setup(s, { emit: e }) {
|
|
740
743
|
const l = (d) => {
|
|
741
|
-
s.isOptionDisabled(d) || e(
|
|
744
|
+
s.isOptionDisabled(d) || e(w.TOGGLE_CHECKBOX_SELECTION, d);
|
|
742
745
|
}, t = (d) => !!d.items, n = (d) => {
|
|
743
746
|
const b = s.isMultiLevel && s.searching;
|
|
744
747
|
return d.description && (!s.isMultiLevel || b);
|
|
745
|
-
},
|
|
748
|
+
}, o = (d) => d.items ? !!d.items.find((b) => s.selectedItemsList.includes(b.value)) : s.selectedItemsList.includes(d.value), r = (d) => {
|
|
746
749
|
if (t(d)) {
|
|
747
|
-
const b =
|
|
750
|
+
const b = o(d) ? w.UNSELECT_CATEGORY : w.SELECT_CATEGORY;
|
|
748
751
|
e(b, d);
|
|
749
752
|
} else
|
|
750
753
|
l(d);
|
|
751
754
|
};
|
|
752
755
|
return {
|
|
753
756
|
// Values
|
|
754
|
-
conditionalClasses:
|
|
757
|
+
conditionalClasses: i(() => ({
|
|
755
758
|
"b-listbox-multi-select-options__static-category-option": s.staticCategories,
|
|
756
759
|
"b-listbox-multi-select-options__category-option": s.categoryItems
|
|
757
760
|
})),
|
|
758
761
|
// Methods
|
|
759
|
-
isOptionSelected:
|
|
762
|
+
isOptionSelected: o,
|
|
760
763
|
shouldShowDescription: n,
|
|
761
764
|
toggleCheckboxSelection: l,
|
|
762
765
|
toggleSearchOption: r,
|
|
763
766
|
computedTabindex: (d) => s.itemsIndex[d] === s.focusedIndex ? 0 : -1,
|
|
764
767
|
// Enums
|
|
765
768
|
BentoListboxEvent: c,
|
|
766
|
-
ListboxMultiSelectOptionsEvent:
|
|
769
|
+
ListboxMultiSelectOptionsEvent: w
|
|
767
770
|
};
|
|
768
771
|
}
|
|
769
772
|
});
|
|
770
|
-
var
|
|
773
|
+
var Dt = function() {
|
|
771
774
|
var e = this, l = e._self._c;
|
|
772
775
|
return e._self._setupProxy, l("div", e._l(e.items, function(t) {
|
|
773
776
|
return l("div", { key: `selected-${t.value}` }, [e.searching && e.isMultiLevel ? [l("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, tabindex: e.computedTabindex(t.value), "aria-selected": `${e.isOptionSelected(t)}`, "aria-checked": `${e.isOptionSelected(t)}`, "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(t) : null, role: e.$attrs.role }, on: { click: function(n) {
|
|
@@ -794,27 +797,27 @@ var Rt = function() {
|
|
|
794
797
|
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)];
|
|
795
798
|
}, null, t)], 2)]], 2);
|
|
796
799
|
}), 0);
|
|
797
|
-
},
|
|
798
|
-
kt,
|
|
800
|
+
}, Bt = [], Nt = /* @__PURE__ */ M(
|
|
799
801
|
Rt,
|
|
800
802
|
Dt,
|
|
803
|
+
Bt,
|
|
801
804
|
!1,
|
|
802
805
|
null,
|
|
803
806
|
"64d7fa1f"
|
|
804
807
|
);
|
|
805
|
-
const
|
|
806
|
-
const e =
|
|
808
|
+
const $t = Nt.exports, Mt = (s) => {
|
|
809
|
+
const e = i(() => {
|
|
807
810
|
var t;
|
|
808
811
|
return !!((t = s.value) != null && t.find(({ items: n }) => !!n));
|
|
809
|
-
}), l =
|
|
812
|
+
}), l = i(() => {
|
|
810
813
|
var t;
|
|
811
|
-
return e.value ? (t = s.value) == null ? void 0 : t.reduce((n,
|
|
814
|
+
return e.value ? (t = s.value) == null ? void 0 : t.reduce((n, o) => (o.items ? n.push(...o.items.flat()) : n.push(o), n), []) : s.value;
|
|
812
815
|
});
|
|
813
816
|
return {
|
|
814
817
|
isMultiLevelSelect: e,
|
|
815
818
|
flattenedItemsList: l
|
|
816
819
|
};
|
|
817
|
-
},
|
|
820
|
+
}, wt = {
|
|
818
821
|
"en-US": {
|
|
819
822
|
allSelected: "All selected ({total})",
|
|
820
823
|
numberOfTotalSelected: "{number} of {total} selected",
|
|
@@ -833,8 +836,8 @@ const Nt = Bt.exports, $t = (s) => {
|
|
|
833
836
|
numbersSelected: "{number} selecionados",
|
|
834
837
|
selectAll: "Selecionar todos ({total})"
|
|
835
838
|
}
|
|
836
|
-
},
|
|
837
|
-
...
|
|
839
|
+
}, Gt = { i18n: { messages: wt } }, Pt = /* @__PURE__ */ G({
|
|
840
|
+
...Gt,
|
|
838
841
|
__name: "listbox-multi-select",
|
|
839
842
|
props: {
|
|
840
843
|
hasMoreItems: { type: Boolean, default: !1 },
|
|
@@ -847,100 +850,100 @@ const Nt = Bt.exports, $t = (s) => {
|
|
|
847
850
|
},
|
|
848
851
|
emits: ["select"],
|
|
849
852
|
setup(s, { expose: e, emit: l }) {
|
|
850
|
-
const t = s, { t: n, n:
|
|
853
|
+
const t = s, { t: n, n: o } = se(), r = we(), f = Ge(), A = i(
|
|
851
854
|
() => {
|
|
852
|
-
var a, u, v,
|
|
855
|
+
var a, u, v, h;
|
|
853
856
|
return {
|
|
854
857
|
"aria-label": (a = f["aria-label"]) == null ? void 0 : a.toString(),
|
|
855
858
|
"aria-busy": (u = f["aria-busy"]) == null ? void 0 : u.toString(),
|
|
856
859
|
"aria-atomic": (v = f["aria-atomic"]) == null ? void 0 : v.toString(),
|
|
857
|
-
"aria-live": (
|
|
860
|
+
"aria-live": (h = f["aria-live"]) == null ? void 0 : h.toString(),
|
|
858
861
|
"aria-multiselectable": !0
|
|
859
862
|
};
|
|
860
863
|
}
|
|
861
|
-
), d =
|
|
862
|
-
var
|
|
863
|
-
const u = t.isOptionDisabled(a), v = ((
|
|
864
|
+
), d = S(null), b = S(null), T = S(null), g = S(null), p = i(() => t.selectedValues.map(({ value: a }) => a)), { isMultiLevelSelect: C, flattenedItemsList: R } = Mt(H(t, "items")), B = i(() => C.value && !t.staticCategories), I = i(() => B.value ? "tree" : "listbox"), O = i(() => B.value ? "treeitem" : "option"), x = (a) => {
|
|
865
|
+
var h;
|
|
866
|
+
const u = t.isOptionDisabled(a), v = ((h = p.value) == null ? void 0 : h.includes(a.value)) || !1;
|
|
864
867
|
return { isDisabled: u, isPreSelected: v };
|
|
865
|
-
}, m =
|
|
868
|
+
}, m = i(() => {
|
|
866
869
|
if (t.searching && C)
|
|
867
870
|
return t.items;
|
|
868
|
-
const a =
|
|
869
|
-
const { isDisabled: v, isPreSelected:
|
|
870
|
-
return v &&
|
|
871
|
+
const a = R.value.filter((u) => {
|
|
872
|
+
const { isDisabled: v, isPreSelected: h } = x(u);
|
|
873
|
+
return v && h || !v;
|
|
871
874
|
});
|
|
872
875
|
return t.selectedValues.forEach((u) => {
|
|
873
876
|
a.find((v) => v.value === u.value) || a.push(u);
|
|
874
877
|
}), a;
|
|
875
|
-
}), y =
|
|
878
|
+
}), y = i(
|
|
876
879
|
() => {
|
|
877
880
|
var a;
|
|
878
881
|
return (a = m.value) == null ? void 0 : a.filter((u) => {
|
|
879
882
|
var v;
|
|
880
883
|
return u.items && C.value && t.searching ? u.items.filter(
|
|
881
884
|
(_) => (t.selectedValues ?? []).includes(_.value)
|
|
882
|
-
).length === u.items.length : (v =
|
|
885
|
+
).length === u.items.length : (v = p.value) == null ? void 0 : v.includes(u.value);
|
|
883
886
|
});
|
|
884
887
|
}
|
|
885
|
-
),
|
|
886
|
-
var
|
|
887
|
-
const a = m.value.length, u =
|
|
888
|
-
return v === 0 ? n("selectAll", { total:
|
|
889
|
-
}),
|
|
890
|
-
const u = (
|
|
891
|
-
const { isDisabled: _, isPreSelected:
|
|
892
|
-
return _ &&
|
|
893
|
-
}, v = a.filter(u).filter((
|
|
888
|
+
), D = () => C.value && !t.searching ? R.value.length : t.items.length, P = i(() => {
|
|
889
|
+
var h;
|
|
890
|
+
const a = m.value.length, u = D(), v = ((h = y.value) == null ? void 0 : h.length) || 0;
|
|
891
|
+
return v === 0 ? n("selectAll", { total: o(a) }) : v === u ? n("allSelected", { total: o(u) }) : v <= u ? n("numberOfTotalSelected", { number: o(v), total: o(u) }) : n("numbersSelected", { number: o(v) });
|
|
892
|
+
}), E = (a) => {
|
|
893
|
+
const u = (h) => {
|
|
894
|
+
const { isDisabled: _, isPreSelected: F } = x(h);
|
|
895
|
+
return _ && F || !_;
|
|
896
|
+
}, v = a.filter(u).filter((h) => !p.value.includes(h.value));
|
|
894
897
|
l("select", [...t.selectedValues, ...v]);
|
|
895
|
-
},
|
|
898
|
+
}, L = (a) => {
|
|
896
899
|
const u = (_) => {
|
|
897
|
-
const { isDisabled:
|
|
898
|
-
return !(
|
|
899
|
-
}, v = a.filter(u).map(({ value: _ }) => _),
|
|
900
|
-
l("select",
|
|
901
|
-
},
|
|
902
|
-
|
|
903
|
-
},
|
|
904
|
-
|
|
905
|
-
}, { isAllSelected:
|
|
900
|
+
const { isDisabled: F, isPreSelected: Ne } = x(_);
|
|
901
|
+
return !(F && Ne);
|
|
902
|
+
}, v = a.filter(u).map(({ value: _ }) => _), h = t.selectedValues.filter((_) => !(v != null && v.includes(_.value)));
|
|
903
|
+
l("select", h);
|
|
904
|
+
}, $ = () => {
|
|
905
|
+
E(R.value);
|
|
906
|
+
}, Y = () => {
|
|
907
|
+
L(R.value);
|
|
908
|
+
}, { isAllSelected: U, isIndeterminate: k, toggleSelectAll: V } = ge(
|
|
906
909
|
y,
|
|
907
910
|
m,
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
), xe =
|
|
911
|
-
|
|
911
|
+
$,
|
|
912
|
+
Y
|
|
913
|
+
), xe = i(() => k.value ? "mixed" : `${U.value}`), q = S(U.value), Ce = () => {
|
|
914
|
+
q.value = !q.value, V(q.value);
|
|
912
915
|
};
|
|
913
|
-
|
|
914
|
-
|
|
916
|
+
X(U, () => {
|
|
917
|
+
q.value = U.value;
|
|
915
918
|
});
|
|
916
|
-
const
|
|
917
|
-
|
|
918
|
-
},
|
|
919
|
-
|
|
920
|
-
},
|
|
919
|
+
const Se = (a) => {
|
|
920
|
+
E(a.items);
|
|
921
|
+
}, Oe = (a) => {
|
|
922
|
+
L(a.items);
|
|
923
|
+
}, Ee = (a, u) => {
|
|
921
924
|
let v = !1;
|
|
922
|
-
const
|
|
923
|
-
v ||
|
|
924
|
-
},
|
|
925
|
+
const h = t.selectedValues.filter(({ value: _ }) => u.value === _ ? (v = !0, !1) : !0);
|
|
926
|
+
v || h.push(u), l(a, h);
|
|
927
|
+
}, Te = i(() => {
|
|
925
928
|
if (!C.value)
|
|
926
929
|
return t.selectedValues;
|
|
927
|
-
const a = (_) =>
|
|
930
|
+
const a = (_) => p.value.includes(_.value), u = (_) => !t.staticCategories && _.every((F) => a(F));
|
|
928
931
|
return t.items.flatMap(
|
|
929
932
|
(_) => _.items && !u(_.items) ? _.items : _
|
|
930
933
|
).filter((_) => _.items ? !0 : a(_));
|
|
931
|
-
}),
|
|
932
|
-
var v,
|
|
933
|
-
const a = ["automatic", "button"].includes(t.lazyLoadType), u = ((v = t.selectedValues) == null ? void 0 : v.length) > 0 && ((
|
|
934
|
-
return a && t.hasMoreItems ? !!((
|
|
935
|
-
}),
|
|
934
|
+
}), Ie = i(() => {
|
|
935
|
+
var v, h, _, F;
|
|
936
|
+
const a = ["automatic", "button"].includes(t.lazyLoadType), u = ((v = t.selectedValues) == null ? void 0 : v.length) > 0 && ((h = y.value) == null ? void 0 : h.length) !== ((_ = R.value) == null ? void 0 : _.length);
|
|
937
|
+
return a && t.hasMoreItems ? !!((F = t.selectedValues) != null && F.length) : u;
|
|
938
|
+
}), Ae = i(() => ["automatic", "button"].includes(t.lazyLoadType) ? !t.hasMoreItems : !0), W = S([]), { visibleDomOptions: Q, updateVisibleDomOptions: oe } = ye(
|
|
936
939
|
d,
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
),
|
|
940
|
-
|
|
941
|
-
|
|
940
|
+
H(t, "items"),
|
|
941
|
+
O
|
|
942
|
+
), Le = (a) => {
|
|
943
|
+
W.value.includes(a) ? W.value = W.value.filter((u) => u !== a) : W.value.push(a), _e(() => {
|
|
944
|
+
oe();
|
|
942
945
|
});
|
|
943
|
-
},
|
|
946
|
+
}, ie = (a) => {
|
|
944
947
|
var u;
|
|
945
948
|
(u = Q.value[a]) == null || u.focus();
|
|
946
949
|
}, {
|
|
@@ -949,14 +952,14 @@ const Nt = Bt.exports, $t = (s) => {
|
|
|
949
952
|
moveToFirstElement: re,
|
|
950
953
|
moveToLastElement: ue,
|
|
951
954
|
preventDefault: ee,
|
|
952
|
-
focusedIndex:
|
|
955
|
+
focusedIndex: ke,
|
|
953
956
|
setListboxFocusedIndex: de
|
|
954
957
|
} = pe(
|
|
955
958
|
{
|
|
956
959
|
items: Q
|
|
957
960
|
},
|
|
958
|
-
|
|
959
|
-
),
|
|
961
|
+
ie
|
|
962
|
+
), Re = {
|
|
960
963
|
[N.ARROW_UP]: (a) => ce(a),
|
|
961
964
|
[N.ARROW_DOWN]: (a) => ae(a),
|
|
962
965
|
[N.HOME]: re,
|
|
@@ -969,24 +972,24 @@ const Nt = Bt.exports, $t = (s) => {
|
|
|
969
972
|
*/
|
|
970
973
|
setListboxFocusedIndex: de
|
|
971
974
|
});
|
|
972
|
-
const
|
|
975
|
+
const De = {
|
|
973
976
|
[N.ARROW_UP]: ee,
|
|
974
977
|
[N.ARROW_DOWN]: ee
|
|
975
|
-
},
|
|
978
|
+
}, Be = i(() => {
|
|
976
979
|
let a = 1;
|
|
977
980
|
const u = {};
|
|
978
981
|
return t.items.forEach((v) => {
|
|
979
|
-
let
|
|
980
|
-
v.items ? (t.staticCategories ?
|
|
982
|
+
let h = W.value.includes(v.value);
|
|
983
|
+
v.items ? (t.staticCategories ? h = !0 : u[v.value] = a++, h && v.items.forEach((_) => u[_.value] = a++)) : u[v.value] = a++;
|
|
981
984
|
}), u;
|
|
982
985
|
});
|
|
983
|
-
return { __sfc: !0, props: t, emit: l, t: n, n:
|
|
986
|
+
return { __sfc: !0, props: t, emit: l, t: n, n: o, slots: r, attrs: f, ariaAttributes: A, listboxRef: d, selectAllListboxItemsRef: b, selectedListboxItemsRef: T, listboxItemsRef: g, selectedItemsList: p, isMultiLevelSelect: C, flattenedItemsList: R, isTreePattern: B, computedRole: I, computedOptionRole: O, optionStates: x, enabledItems: m, visibleSelectedList: y, calculateTotalItems: D, selectAllCheckboxText: P, selectAll: E, unselectAll: L, selectAllItems: $, unselectAllItems: Y, isAllSelected: U, isIndeterminate: k, toggleSelectAll: V, ariaCheckedComputed: xe, isSelectAllOn: q, handleSelectAll: Ce, selectAllCategory: Se, unselectAllCategory: Oe, toggleCheckboxSelection: Ee, selectedOptions: Te, showSelectedItems: Ie, showSelectAllCheckbox: Ae, expandedCategories: W, visibleDomOptions: Q, updateVisibleDomOptions: oe, toggleCategoryVisibility: Le, focusItem: ie, moveToNextElement: ae, moveToPreviousElement: ce, moveToFirstElement: re, moveToLastElement: ue, preventDefault: ee, focusedIndex: ke, setListboxFocusedIndex: de, listboxListeners: Re, chipsSectionListeners: De, computedItemsIndex: Be, ListboxDecorativeCheckbox: ne, BentoTypography: j, BentoChip: Ue, BentoListboxOption: Z, ListboxMultiSelectOptions: $t, vBentoKeyboardNavigationDirective: le, BentoListboxEvent: c };
|
|
984
987
|
}
|
|
985
988
|
});
|
|
986
|
-
var
|
|
989
|
+
var Ft = function() {
|
|
987
990
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
988
991
|
return l("div", { ref: "listboxRef", staticClass: "b-listbox-multi-select" }, [t.showSelectedItems ? l("div", [l("ul", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-listbox-multi-select__chips" }, t.chipsSectionListeners), e._l(t.selectedOptions, function(n) {
|
|
989
|
-
return l("li", { key: n.value }, [l(t.BentoChip, { ref: "selectedListboxItemsRef", refInFor: !0, attrs: { disabled: e.isOptionDisabled(n), label: n.label, condensed: "" }, on: { click: function(
|
|
992
|
+
return l("li", { key: n.value }, [l(t.BentoChip, { ref: "selectedListboxItemsRef", refInFor: !0, attrs: { disabled: e.isOptionDisabled(n), label: n.label, condensed: "" }, on: { click: function(o) {
|
|
990
993
|
n.items ? t.unselectAllCategory(n) : t.toggleCheckboxSelection("select", n);
|
|
991
994
|
} } })], 1);
|
|
992
995
|
}), 0), l("hr", { staticClass: "b-listbox-multi-select__divider", attrs: { "aria-hidden": "true" } })]) : e._e(), l("div", e._g(e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], attrs: { role: t.computedRole } }, "div", t.ariaAttributes, !1), t.listboxListeners), [t.showSelectAllCheckbox ? l(t.BentoListboxOption, { ref: "selectAllListboxItemsRef", staticClass: "b-listbox-multi-select__option", attrs: { tabindex: t.focusedIndex === 0 ? 0 : -1, "aria-selected": t.ariaCheckedComputed !== "false", "aria-checked": t.ariaCheckedComputed, role: t.computedOptionRole }, on: { click: t.handleSelectAll, "enter-pressed": t.handleSelectAll, "space-pressed": function(n) {
|
|
@@ -999,20 +1002,20 @@ var Pt = function() {
|
|
|
999
1002
|
return t.toggleCheckboxSelection(t.BentoListboxEvent.TAB, n);
|
|
1000
1003
|
}, "enter-pressed": function(n) {
|
|
1001
1004
|
return t.toggleCheckboxSelection(t.BentoListboxEvent.ENTER, n);
|
|
1002
|
-
} }, scopedSlots: e._u([e._l(t.slots, function(n,
|
|
1003
|
-
return { key:
|
|
1004
|
-
return [e._t(
|
|
1005
|
+
} }, scopedSlots: e._u([e._l(t.slots, function(n, o) {
|
|
1006
|
+
return { key: o, fn: function(r) {
|
|
1007
|
+
return [e._t(o, null, null, r)];
|
|
1005
1008
|
} };
|
|
1006
1009
|
})], null, !0) })], 1)]);
|
|
1007
|
-
},
|
|
1008
|
-
Gt,
|
|
1010
|
+
}, Yt = [], Ut = /* @__PURE__ */ M(
|
|
1009
1011
|
Pt,
|
|
1010
1012
|
Ft,
|
|
1013
|
+
Yt,
|
|
1011
1014
|
!1,
|
|
1012
1015
|
null,
|
|
1013
1016
|
"88e0c352"
|
|
1014
1017
|
);
|
|
1015
|
-
const
|
|
1018
|
+
const me = Ut.exports, zt = {
|
|
1016
1019
|
"en-US": {
|
|
1017
1020
|
loading: "Loading",
|
|
1018
1021
|
showMore: "Show more"
|
|
@@ -1025,18 +1028,18 @@ const ve = Yt.exports, Ut = {
|
|
|
1025
1028
|
loading: "Carregando",
|
|
1026
1029
|
showMore: "Mostrar mais"
|
|
1027
1030
|
}
|
|
1028
|
-
},
|
|
1031
|
+
}, Vt = 36, Wt = G({
|
|
1029
1032
|
name: "bento-listbox",
|
|
1030
1033
|
components: {
|
|
1031
|
-
BentoEmptyState:
|
|
1032
|
-
BentoListboxSingleSelect:
|
|
1033
|
-
BentoListboxMultiSelect:
|
|
1034
|
-
BentoTypography:
|
|
1035
|
-
BentoLoadingIndicator:
|
|
1036
|
-
BentoLoadingButton:
|
|
1034
|
+
BentoEmptyState: Fe,
|
|
1035
|
+
BentoListboxSingleSelect: yt,
|
|
1036
|
+
BentoListboxMultiSelect: me,
|
|
1037
|
+
BentoTypography: j,
|
|
1038
|
+
BentoLoadingIndicator: Pe,
|
|
1039
|
+
BentoLoadingButton: je
|
|
1037
1040
|
},
|
|
1038
1041
|
directives: { BentoKeyboardNavigationDirective: le },
|
|
1039
|
-
i18n: { messages:
|
|
1042
|
+
i18n: { messages: zt },
|
|
1040
1043
|
props: {
|
|
1041
1044
|
/**
|
|
1042
1045
|
* Defines a string value that labels an interactive element.
|
|
@@ -1092,8 +1095,8 @@ const ve = Yt.exports, Ut = {
|
|
|
1092
1095
|
*/
|
|
1093
1096
|
lazyLoadType: {
|
|
1094
1097
|
type: String,
|
|
1095
|
-
default:
|
|
1096
|
-
validator: (s) => Object.values(
|
|
1098
|
+
default: K.NONE,
|
|
1099
|
+
validator: (s) => Object.values(K).includes(s)
|
|
1097
1100
|
},
|
|
1098
1101
|
/**
|
|
1099
1102
|
* Indicates the listbox is loading filtered items.
|
|
@@ -1117,7 +1120,7 @@ const ve = Yt.exports, Ut = {
|
|
|
1117
1120
|
*
|
|
1118
1121
|
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
1119
1122
|
*/
|
|
1120
|
-
searching:
|
|
1123
|
+
searching: me.props.searching,
|
|
1121
1124
|
/**
|
|
1122
1125
|
* The `input` value.
|
|
1123
1126
|
* Providing an empty string or empty array will select no options.
|
|
@@ -1145,116 +1148,116 @@ const ve = Yt.exports, Ut = {
|
|
|
1145
1148
|
c.TAB
|
|
1146
1149
|
],
|
|
1147
1150
|
setup(s, { emit: e, slots: l }) {
|
|
1148
|
-
const t =
|
|
1149
|
-
var
|
|
1150
|
-
return typeof (s == null ? void 0 : s.virtualScroll) == "object" && ((
|
|
1151
|
+
const t = S([]), n = H(s, "items"), { t: o } = se(), r = i(() => s.lazyLoadType !== K.AUTOMATIC), f = i(() => s.lazyLoadType === K.AUTOMATIC), A = () => {
|
|
1152
|
+
var k;
|
|
1153
|
+
return typeof (s == null ? void 0 : s.virtualScroll) == "object" && ((k = s == null ? void 0 : s.virtualScroll) != null && k.itemHeight) ? s.virtualScroll.itemHeight : Vt;
|
|
1151
1154
|
}, {
|
|
1152
1155
|
containerRef: d,
|
|
1153
1156
|
containerProps: b,
|
|
1154
|
-
onScroll:
|
|
1155
|
-
list:
|
|
1156
|
-
wrapperProps:
|
|
1157
|
-
} =
|
|
1158
|
-
itemHeight:
|
|
1157
|
+
onScroll: T,
|
|
1158
|
+
list: g,
|
|
1159
|
+
wrapperProps: p
|
|
1160
|
+
} = He(n, {
|
|
1161
|
+
itemHeight: A(),
|
|
1159
1162
|
// Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
|
|
1160
1163
|
disabled: (s == null ? void 0 : s.multiple) || (s == null ? void 0 : s.virtualScroll) === !1 || (s == null ? void 0 : s.lazyLoadType) !== "none"
|
|
1161
|
-
}), C =
|
|
1164
|
+
}), C = i(
|
|
1162
1165
|
() => s.componentLoading !== void 0 || r.value ? "true" : void 0
|
|
1163
|
-
),
|
|
1166
|
+
), R = i(
|
|
1164
1167
|
() => r.value && s.loading || s.componentLoading ? "true" : "false"
|
|
1165
|
-
),
|
|
1168
|
+
), B = i(
|
|
1166
1169
|
() => r.value || s.componentLoading !== void 0 ? "polite" : void 0
|
|
1167
|
-
),
|
|
1170
|
+
), I = i(
|
|
1168
1171
|
() => ({
|
|
1169
1172
|
"aria-label": s.ariaLabel,
|
|
1170
|
-
"aria-busy":
|
|
1173
|
+
"aria-busy": R.value,
|
|
1171
1174
|
"aria-atomic": C.value,
|
|
1172
|
-
"aria-live":
|
|
1175
|
+
"aria-live": B.value
|
|
1173
1176
|
})
|
|
1174
|
-
),
|
|
1177
|
+
), O = i(
|
|
1175
1178
|
() => s.componentLoading ? {
|
|
1176
|
-
...
|
|
1179
|
+
...I.value,
|
|
1177
1180
|
role: "alert"
|
|
1178
1181
|
} : {}
|
|
1179
|
-
),
|
|
1180
|
-
e(
|
|
1182
|
+
), x = (k) => (V) => {
|
|
1183
|
+
e(k, V);
|
|
1181
1184
|
}, m = () => {
|
|
1182
1185
|
e(c.SHOW_MORE);
|
|
1183
|
-
}, y =
|
|
1184
|
-
const
|
|
1185
|
-
if (!
|
|
1186
|
+
}, y = Ye(() => {
|
|
1187
|
+
const k = d.value;
|
|
1188
|
+
if (!k)
|
|
1186
1189
|
return;
|
|
1187
|
-
const
|
|
1188
|
-
s.hasMoreItems &&
|
|
1189
|
-
}),
|
|
1190
|
-
f.value ? y() :
|
|
1191
|
-
},
|
|
1192
|
-
var
|
|
1193
|
-
return ((
|
|
1194
|
-
}),
|
|
1195
|
-
() => s.lazyLoadType ===
|
|
1196
|
-
),
|
|
1197
|
-
() => s.loading ?
|
|
1198
|
-
),
|
|
1190
|
+
const V = Math.round(k.scrollTop) + k.clientHeight >= k.scrollHeight;
|
|
1191
|
+
s.hasMoreItems && V && !s.loading && m();
|
|
1192
|
+
}), D = () => {
|
|
1193
|
+
f.value ? y() : T();
|
|
1194
|
+
}, P = i(() => {
|
|
1195
|
+
var k;
|
|
1196
|
+
return ((k = s.items) == null ? void 0 : k.length) === 0;
|
|
1197
|
+
}), E = i(
|
|
1198
|
+
() => s.lazyLoadType === K.BUTTON && s.hasMoreItems
|
|
1199
|
+
), L = i(
|
|
1200
|
+
() => s.loading ? fe.LOADING : fe.START
|
|
1201
|
+
), $ = i(() => s.loading ? o("loading") : o("showMore")), Y = i(() => ({
|
|
1199
1202
|
...s.emptyState,
|
|
1200
1203
|
variant: "condensed"
|
|
1201
|
-
})),
|
|
1202
|
-
[c.SELECT]:
|
|
1203
|
-
[c.SPACE]:
|
|
1204
|
-
[c.TAB]:
|
|
1205
|
-
[c.ENTER]:
|
|
1204
|
+
})), U = {
|
|
1205
|
+
[c.SELECT]: x(c.SELECT),
|
|
1206
|
+
[c.SPACE]: x(c.SPACE),
|
|
1207
|
+
[c.TAB]: x(c.TAB),
|
|
1208
|
+
[c.ENTER]: x(c.ENTER)
|
|
1206
1209
|
};
|
|
1207
1210
|
return {
|
|
1208
1211
|
// Refs
|
|
1209
1212
|
listboxRef: d,
|
|
1210
1213
|
listboxItemRef: t,
|
|
1211
1214
|
// a11y
|
|
1212
|
-
ariaAttributes:
|
|
1213
|
-
listboxContainerAttributes:
|
|
1215
|
+
ariaAttributes: I,
|
|
1216
|
+
listboxContainerAttributes: O,
|
|
1214
1217
|
// Values
|
|
1215
1218
|
containerProps: b,
|
|
1216
|
-
isSearchResultEmpty:
|
|
1217
|
-
limitedEmptyStateProps:
|
|
1218
|
-
loadingButtonState:
|
|
1219
|
+
isSearchResultEmpty: P,
|
|
1220
|
+
limitedEmptyStateProps: Y,
|
|
1221
|
+
loadingButtonState: L,
|
|
1219
1222
|
slots: l,
|
|
1220
|
-
shouldDisplayShowMoreButton:
|
|
1221
|
-
showMoreButtonText:
|
|
1222
|
-
virtualisedItems:
|
|
1223
|
-
wrapperProps:
|
|
1223
|
+
shouldDisplayShowMoreButton: E,
|
|
1224
|
+
showMoreButtonText: $,
|
|
1225
|
+
virtualisedItems: g,
|
|
1226
|
+
wrapperProps: p,
|
|
1224
1227
|
// Enums
|
|
1225
1228
|
BentoKeyboardNavigationKeyDownEvent: N,
|
|
1226
1229
|
BentoListboxEvent: c,
|
|
1227
1230
|
// Methods
|
|
1228
|
-
onListboxContainerScroll:
|
|
1229
|
-
onOptionSelected:
|
|
1231
|
+
onListboxContainerScroll: D,
|
|
1232
|
+
onOptionSelected: x,
|
|
1230
1233
|
emitShowMore: m,
|
|
1231
|
-
listboxListeners:
|
|
1234
|
+
listboxListeners: U
|
|
1232
1235
|
};
|
|
1233
1236
|
}
|
|
1234
1237
|
});
|
|
1235
|
-
var
|
|
1238
|
+
var Kt = function() {
|
|
1236
1239
|
var t;
|
|
1237
1240
|
var e = this, l = e._self._c;
|
|
1238
|
-
return e._self._setupProxy, l("div", e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", staticClass: "b-listbox", style: (t = e.containerProps) == null ? void 0 : t.style, attrs: { id: e.id, tabindex: "-1", "data-testid": "listbox-container" }, on: { scroll: e.onListboxContainerScroll } }, "div", e.listboxContainerAttributes, !1), [l("div", e._b({}, "div", e.wrapperProps, !1), [e.componentLoading ? l("div", { staticClass: "b-listbox__loading-filtered-items" }, [l("bento-loading-indicator")], 1) : e.isSearchResultEmpty ? l("div", { staticClass: "b-listbox__empty-search-message" }, [e.emptyState ? l("bento-empty-state", e._b({}, "bento-empty-state", e.limitedEmptyStateProps, !1)) : l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.noResultsMessage))])], 1) : [e.multiple ? [l("bento-listbox-multi-select", e._g(e._b({ ref: "listboxItemRef", attrs: { "has-more-items": e.hasMoreItems, items: e.items, "lazy-load-type": e.lazyLoadType, "static-categories": e.staticCategories, "selected-values": e.selectedValue, searching: e.searching, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(n,
|
|
1239
|
-
return { key:
|
|
1240
|
-
return [e._t(
|
|
1241
|
+
return e._self._setupProxy, l("div", e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", staticClass: "b-listbox", style: (t = e.containerProps) == null ? void 0 : t.style, attrs: { id: e.id, tabindex: "-1", "data-testid": "listbox-container" }, on: { scroll: e.onListboxContainerScroll } }, "div", e.listboxContainerAttributes, !1), [l("div", e._b({}, "div", e.wrapperProps, !1), [e.componentLoading ? l("div", { staticClass: "b-listbox__loading-filtered-items" }, [l("bento-loading-indicator")], 1) : e.isSearchResultEmpty ? l("div", { staticClass: "b-listbox__empty-search-message" }, [e.emptyState ? l("bento-empty-state", e._b({}, "bento-empty-state", e.limitedEmptyStateProps, !1)) : l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.noResultsMessage))])], 1) : [e.multiple ? [l("bento-listbox-multi-select", e._g(e._b({ ref: "listboxItemRef", attrs: { "has-more-items": e.hasMoreItems, items: e.items, "lazy-load-type": e.lazyLoadType, "static-categories": e.staticCategories, "selected-values": e.selectedValue, searching: e.searching, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(n, o) {
|
|
1242
|
+
return { key: o, fn: function(r) {
|
|
1243
|
+
return [e._t(o, null, null, r)];
|
|
1241
1244
|
} };
|
|
1242
|
-
})], null, !0) }, "bento-listbox-multi-select", e.ariaAttributes, !1), e.listboxListeners))] : [l("bento-listbox-single-select", e._g(e._b({ ref: "listboxItemRef", attrs: { items: e.virtualisedItems, "selected-value": e.selectedValue, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(n,
|
|
1243
|
-
return { key:
|
|
1244
|
-
return [e._t(
|
|
1245
|
+
})], null, !0) }, "bento-listbox-multi-select", e.ariaAttributes, !1), e.listboxListeners))] : [l("bento-listbox-single-select", e._g(e._b({ ref: "listboxItemRef", attrs: { items: e.virtualisedItems, "selected-value": e.selectedValue, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(n, o) {
|
|
1246
|
+
return { key: o, fn: function(r) {
|
|
1247
|
+
return [e._t(o, null, null, r)];
|
|
1245
1248
|
} };
|
|
1246
1249
|
})], 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(n) {
|
|
1247
1250
|
return e.emitShowMore.apply(null, arguments);
|
|
1248
1251
|
} } }, [e._v(" " + e._s(e.showMoreButtonText) + " ")])], 1) : e.loading ? l("div", { staticClass: "b-listbox__lazy-load" }, [l("bento-loading-indicator")], 1) : e._e()]], 2)]);
|
|
1249
|
-
},
|
|
1250
|
-
Vt,
|
|
1252
|
+
}, jt = [], qt = /* @__PURE__ */ M(
|
|
1251
1253
|
Wt,
|
|
1252
1254
|
Kt,
|
|
1255
|
+
jt,
|
|
1253
1256
|
!1,
|
|
1254
1257
|
null,
|
|
1255
1258
|
"46b000a2"
|
|
1256
1259
|
);
|
|
1257
|
-
const
|
|
1260
|
+
const vs = qt.exports, te = (s, e) => {
|
|
1258
1261
|
for (const l of s) {
|
|
1259
1262
|
if (l.value === e)
|
|
1260
1263
|
return l;
|
|
@@ -1265,56 +1268,56 @@ const bs = jt.exports, te = (s, e) => {
|
|
|
1265
1268
|
}
|
|
1266
1269
|
}
|
|
1267
1270
|
return null;
|
|
1268
|
-
},
|
|
1269
|
-
const n =
|
|
1270
|
-
l.value ?
|
|
1271
|
+
}, Ht = (s) => typeof s == "object" && s !== null && "value" in s && "label" in s, ms = (s, e, l, t) => {
|
|
1272
|
+
const n = S([]), o = S(), r = (b) => {
|
|
1273
|
+
l.value ? o.value = b.map(({ value: T }) => T) : o.value = b.length > 0 ? b[0].value : null;
|
|
1271
1274
|
}, f = (b) => {
|
|
1272
|
-
l.value ?
|
|
1273
|
-
},
|
|
1275
|
+
l.value ? o.value = b.map(({ value: T, label: g }) => ({ value: T, label: g })) : o.value = b.length > 0 ? { value: b[0].value, label: b[0].label } : null;
|
|
1276
|
+
}, A = (b) => {
|
|
1274
1277
|
n.value = b, t != null && t.value ? f(b) : r(b);
|
|
1275
1278
|
}, d = () => {
|
|
1276
|
-
n.value = [],
|
|
1279
|
+
n.value = [], o.value = null;
|
|
1277
1280
|
};
|
|
1278
|
-
return
|
|
1281
|
+
return X(
|
|
1279
1282
|
() => e.value,
|
|
1280
1283
|
() => {
|
|
1281
1284
|
if (!e.value && e.value !== 0) {
|
|
1282
1285
|
d();
|
|
1283
1286
|
return;
|
|
1284
1287
|
}
|
|
1285
|
-
const b = !Array.isArray(e.value),
|
|
1288
|
+
const b = !Array.isArray(e.value), T = [...n.value];
|
|
1286
1289
|
d();
|
|
1287
|
-
const
|
|
1288
|
-
if (
|
|
1289
|
-
n.value.push(
|
|
1290
|
+
const g = (p) => {
|
|
1291
|
+
if (Ht(p))
|
|
1292
|
+
n.value.push(p);
|
|
1290
1293
|
else {
|
|
1291
|
-
let C = te(s.value,
|
|
1292
|
-
C || (C = te(
|
|
1294
|
+
let C = te(s.value, p);
|
|
1295
|
+
C || (C = te(T, p)), C || (C = { value: p, label: p.toString() }), n.value.push(C);
|
|
1293
1296
|
}
|
|
1294
1297
|
};
|
|
1295
1298
|
if (b) {
|
|
1296
|
-
const
|
|
1297
|
-
p
|
|
1299
|
+
const p = e.value;
|
|
1300
|
+
g(p), t != null && t.value ? f(n.value) : r(n.value);
|
|
1298
1301
|
return;
|
|
1299
1302
|
}
|
|
1300
|
-
e.value.forEach(
|
|
1303
|
+
e.value.forEach(g), t != null && t.value ? f(n.value) : r(n.value);
|
|
1301
1304
|
},
|
|
1302
1305
|
{ immediate: !0 }
|
|
1303
1306
|
), {
|
|
1304
1307
|
// Values
|
|
1305
1308
|
cachedSelectedListboxOptions: n,
|
|
1306
|
-
cachedListboxSelectedValues:
|
|
1309
|
+
cachedListboxSelectedValues: o,
|
|
1307
1310
|
// Methods
|
|
1308
1311
|
resetCache: d,
|
|
1309
|
-
setCachedValues:
|
|
1312
|
+
setCachedValues: A
|
|
1310
1313
|
};
|
|
1311
1314
|
};
|
|
1312
1315
|
export {
|
|
1313
|
-
|
|
1316
|
+
K as B,
|
|
1314
1317
|
c as a,
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1318
|
+
vs as b,
|
|
1319
|
+
ms as c,
|
|
1320
|
+
ye as d,
|
|
1321
|
+
Mt as u
|
|
1319
1322
|
};
|
|
1320
|
-
//# sourceMappingURL=use-cached-selected-values.
|
|
1323
|
+
//# sourceMappingURL=use-cached-selected-values.0EeyFfyF.js.map
|