@adyen/bento-vue3 1.66.0 → 1.68.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 +2017 -2206
- 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/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.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/footer-actions.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-password.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.OzhLTUKc.js → action-bar.C93kgr7l.js} +4 -4
- package/dist/chunks/{action-bar.OzhLTUKc.js.map → action-bar.C93kgr7l.js.map} +1 -1
- package/dist/chunks/{base-modal.CCwWuH6k.js → base-modal.C3_r3rmc.js} +120 -183
- package/dist/chunks/base-modal.C3_r3rmc.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.xZYmwO7S.js → button-actions-with-menu.DUccmaB2.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.xZYmwO7S.js.map → button-actions-with-menu.DUccmaB2.js.map} +1 -1
- package/dist/chunks/{button-actions.D1pXI1AJ.js → button-actions.CZdO9YOk.js} +7 -7
- package/dist/chunks/button-actions.CZdO9YOk.js.map +1 -0
- package/dist/chunks/{card.DiBtLuRU.js → card.CS34Mi_G.js} +2 -2
- package/dist/chunks/{card.DiBtLuRU.js.map → card.CS34Mi_G.js.map} +1 -1
- package/dist/chunks/{checkbox-group.Dc5Olq0c.js → checkbox-group.JRo6xNpe.js} +2 -2
- package/dist/chunks/{checkbox-group.Dc5Olq0c.js.map → checkbox-group.JRo6xNpe.js.map} +1 -1
- package/dist/chunks/{checkbox.fkPJvdUo.js → checkbox.DGrG3GN1.js} +70 -67
- package/dist/chunks/checkbox.DGrG3GN1.js.map +1 -0
- package/dist/chunks/{code-snippet.DPIhpuKa.js → code-snippet.aucmPbLw.js} +3 -3
- package/dist/chunks/{code-snippet.DPIhpuKa.js.map → code-snippet.aucmPbLw.js.map} +1 -1
- package/dist/chunks/{country.BhAcCmRx.js → country.Q95voxeL.js} +2 -2
- package/dist/chunks/{country.BhAcCmRx.js.map → country.Q95voxeL.js.map} +1 -1
- package/dist/chunks/{dashboard-section.BmtN9b0B.js → dashboard-section.CUcq2ahu.js} +2 -2
- package/dist/chunks/{dashboard-section.BmtN9b0B.js.map → dashboard-section.CUcq2ahu.js.map} +1 -1
- package/dist/chunks/{dashed-underline.ywc0ydgS.js → dashed-underline.DkzQkpaf.js} +2 -2
- package/dist/chunks/{dashed-underline.ywc0ydgS.js.map → dashed-underline.DkzQkpaf.js.map} +1 -1
- package/dist/chunks/{data-grid-template.DAuqLhPI.js → data-grid-template.CDsV2GFG.js} +2 -2
- package/dist/chunks/{data-grid-template.DAuqLhPI.js.map → data-grid-template.CDsV2GFG.js.map} +1 -1
- package/dist/chunks/data-grid.BJHcfrTG.js +3861 -0
- package/dist/chunks/data-grid.BJHcfrTG.js.map +1 -0
- package/dist/chunks/{date-picker.Bk4FNLyR.js → date-picker.DgpMAGYp.js} +3 -3
- package/dist/chunks/{date-picker.Bk4FNLyR.js.map → date-picker.DgpMAGYp.js.map} +1 -1
- package/dist/chunks/date-range-picker.Bxa_f6Q0.js +1225 -0
- package/dist/chunks/date-range-picker.Bxa_f6Q0.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.B05elQig.js → dropdown-default-textbox.Ce5D3ipi.js} +40 -39
- package/dist/chunks/dropdown-default-textbox.Ce5D3ipi.js.map +1 -0
- package/dist/chunks/dropdown-tag.AV8Pi1SS.js +230 -0
- package/dist/chunks/dropdown-tag.AV8Pi1SS.js.map +1 -0
- package/dist/chunks/dropdown.CJBk1euy.js +814 -0
- package/dist/chunks/dropdown.CJBk1euy.js.map +1 -0
- package/dist/chunks/es6.n1ewaW31.js.map +1 -1
- package/dist/chunks/{filter-bar.BxfaFHTk.js → filter-bar.6D-9UEng.js} +848 -833
- package/dist/chunks/filter-bar.6D-9UEng.js.map +1 -0
- package/dist/chunks/{footer-actions.vQ4flLqU.js → footer-actions.Bje-DDqw.js} +2 -2
- package/dist/chunks/{footer-actions.vQ4flLqU.js.map → footer-actions.Bje-DDqw.js.map} +1 -1
- package/dist/chunks/header-meta.Yt43-cUI.js +234 -0
- package/dist/chunks/header-meta.Yt43-cUI.js.map +1 -0
- package/dist/chunks/{header-with-views.COrWDbtU.js → header-with-views.DbBUHvvE.js} +959 -923
- package/dist/chunks/header-with-views.DbBUHvvE.js.map +1 -0
- package/dist/chunks/header.wiq0wlgm.js +141 -0
- package/dist/chunks/header.wiq0wlgm.js.map +1 -0
- package/dist/chunks/{input-field-password.XrXAnMpT.js → input-field-password.Cr3A_4n0.js} +86 -85
- package/dist/chunks/input-field-password.Cr3A_4n0.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.CNurVdiF.js → input-field-phone-number.DZp5IzU3.js} +548 -532
- package/dist/chunks/{input-field-phone-number.CNurVdiF.js.map → input-field-phone-number.DZp5IzU3.js.map} +1 -1
- package/dist/chunks/input-field.CmV2d_Zc.js +304 -0
- package/dist/chunks/input-field.CmV2d_Zc.js.map +1 -0
- package/dist/chunks/{menu.CiyYOoKd.js → menu.C-3obPGl.js} +182 -180
- package/dist/chunks/{menu.CiyYOoKd.js.map → menu.C-3obPGl.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.CuL9oSAq.js → modal-fullscreen.DBTnoSX9.js} +90 -77
- package/dist/chunks/modal-fullscreen.DBTnoSX9.js.map +1 -0
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.LnD61fHp.js → modal.vue_vue_type_script_setup_true_lang.Cd-mQUJ8.js} +10 -10
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.LnD61fHp.js.map → modal.vue_vue_type_script_setup_true_lang.Cd-mQUJ8.js.map} +1 -1
- package/dist/chunks/{pagination._rYMF2W_.js → pagination.DLYrWpKr.js} +2 -2
- package/dist/chunks/{pagination._rYMF2W_.js.map → pagination.DLYrWpKr.js.map} +1 -1
- package/dist/chunks/popover.DYgCCUCJ.js +200 -0
- package/dist/chunks/popover.DYgCCUCJ.js.map +1 -0
- package/dist/chunks/popover.types.V8old-GW.js +6 -0
- package/dist/chunks/popover.types.V8old-GW.js.map +1 -0
- package/dist/chunks/promo-banner.CQp3z2CP.js.map +1 -1
- package/dist/chunks/{rich-text-editor.RD8aCPTi.js → rich-text-editor.Dx78coVL.js} +5 -4
- package/dist/chunks/{rich-text-editor.RD8aCPTi.js.map → rich-text-editor.Dx78coVL.js.map} +1 -1
- package/dist/chunks/{search-bar.i7BY4IGB.js → search-bar.CpQ_MEVj.js} +3 -3
- package/dist/chunks/{search-bar.i7BY4IGB.js.map → search-bar.CpQ_MEVj.js.map} +1 -1
- package/dist/chunks/{secondary-nav.DkRQsIx7.js → secondary-nav.RTBLEukC.js} +2 -2
- package/dist/chunks/{secondary-nav.DkRQsIx7.js.map → secondary-nav.RTBLEukC.js.map} +1 -1
- package/dist/chunks/{sidepanel.CTIjklfG.js → sidepanel.DPN__L3Q.js} +2 -2
- package/dist/chunks/{sidepanel.CTIjklfG.js.map → sidepanel.DPN__L3Q.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.BTr6x5cg.js → summary-grid.types.CjbbSZBJ.js} +4 -4
- package/dist/chunks/summary-grid.types.CjbbSZBJ.js.map +1 -0
- package/dist/chunks/{textarea.DXSe9MHH.js → textarea.BBhN67-I.js} +41 -40
- package/dist/chunks/textarea.BBhN67-I.js.map +1 -0
- package/dist/chunks/{timeline-item.Coz_LRD3.js → timeline-item.CuCII37W.js} +3 -3
- package/dist/chunks/{timeline-item.Coz_LRD3.js.map → timeline-item.CuCII37W.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.E8oBlhrC.js → tutorial.vue_vue_type_script_setup_true_lang.nYHtTHqy.js} +28 -27
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.E8oBlhrC.js.map → tutorial.vue_vue_type_script_setup_true_lang.nYHtTHqy.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.rqtiP4Nd.js → use-cached-selected-values.Dyoz6cUK.js} +591 -571
- package/dist/chunks/use-cached-selected-values.Dyoz6cUK.js.map +1 -0
- package/dist/chunks/{use-country-items.4kZgVg_l.js → use-country-items.Duh4bMqW.js} +2 -2
- package/dist/chunks/{use-country-items.4kZgVg_l.js.map → use-country-items.Duh4bMqW.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 +4 -4
- 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 +157 -156
- 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/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 +1 -1
- package/package.json +23 -6
- package/dist/assets/info-icon-with-popover.css +0 -1
- package/dist/chunks/base-modal.CCwWuH6k.js.map +0 -1
- package/dist/chunks/button-actions.D1pXI1AJ.js.map +0 -1
- package/dist/chunks/checkbox.fkPJvdUo.js.map +0 -1
- package/dist/chunks/data-grid.BrYCmbPR.js +0 -3779
- package/dist/chunks/data-grid.BrYCmbPR.js.map +0 -1
- package/dist/chunks/date-range-picker.-YsRuGmp.js +0 -1208
- package/dist/chunks/date-range-picker.-YsRuGmp.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.B05elQig.js.map +0 -1
- package/dist/chunks/dropdown-tag.BUDNO3d0.js +0 -202
- package/dist/chunks/dropdown-tag.BUDNO3d0.js.map +0 -1
- package/dist/chunks/dropdown.usAqDecC.js +0 -957
- package/dist/chunks/dropdown.usAqDecC.js.map +0 -1
- package/dist/chunks/filter-bar.BxfaFHTk.js.map +0 -1
- package/dist/chunks/header-with-views.COrWDbtU.js.map +0 -1
- package/dist/chunks/header.DAEUKoX5.js +0 -254
- package/dist/chunks/header.DAEUKoX5.js.map +0 -1
- package/dist/chunks/info-icon-with-popover.Duk1tj5G.js +0 -97
- package/dist/chunks/info-icon-with-popover.Duk1tj5G.js.map +0 -1
- package/dist/chunks/input-field-password.XrXAnMpT.js.map +0 -1
- package/dist/chunks/input-field.EOIwm2tq.js +0 -298
- package/dist/chunks/input-field.EOIwm2tq.js.map +0 -1
- package/dist/chunks/modal-fullscreen.CuL9oSAq.js.map +0 -1
- package/dist/chunks/popover.maCMPyz8.js +0 -350
- package/dist/chunks/popover.maCMPyz8.js.map +0 -1
- package/dist/chunks/summary-grid.types.BTr6x5cg.js.map +0 -1
- package/dist/chunks/textarea.DXSe9MHH.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.rqtiP4Nd.js.map +0 -1
|
@@ -1,118 +1,119 @@
|
|
|
1
|
-
import { computed as m, ref as
|
|
2
|
-
import { B as
|
|
1
|
+
import { computed as m, ref as k, onMounted as ct, onUnmounted as dt, watch as ye, defineComponent as Z, resolveComponent as L, createElementBlock as O, openBlock as v, createVNode as G, createElementVNode as z, withCtx as A, createTextVNode as K, toDisplayString as V, renderSlot as j, mergeProps as Y, withKeys as me, createCommentVNode as J, createBlock as R, withModifiers as re, normalizeProps as ae, guardReactiveProps as ve, withDirectives as ce, vShow as we, nextTick as Ye, toRef as fe, resolveDirective as Ue, toHandlers as se, Fragment as le, renderList as q, createSlots as pe, normalizeClass as ge, unref as x, useSlots as ut, useAttrs as bt } from "vue";
|
|
2
|
+
import { B as F, a as Ce } from "./keyboard-navigation.CqgGzfZQ.js";
|
|
3
3
|
import "./events.FNmSWp_P.js";
|
|
4
|
-
import { B as
|
|
5
|
-
import { B as
|
|
6
|
-
import { B as
|
|
4
|
+
import { B as de } from "./typography.DN5eC5ch.js";
|
|
5
|
+
import { B as mt } from "./loading-indicator.DEepb9Wl.js";
|
|
6
|
+
import { B as vt } from "./empty-state.D7llINgF.js";
|
|
7
7
|
import { u as Ie } from "./i18n.B6g5VX0q.js";
|
|
8
|
-
import { d as
|
|
9
|
-
import { B as
|
|
10
|
-
import { _ as
|
|
11
|
-
import { C as
|
|
12
|
-
import { C as
|
|
13
|
-
import { C as
|
|
14
|
-
import { C as
|
|
15
|
-
import {
|
|
8
|
+
import { d as ft } from "./debounce.DUTu11PS.js";
|
|
9
|
+
import { B as pt } from "./chip.CneNX2_j.js";
|
|
10
|
+
import { _ as H } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
11
|
+
import { C as he, N as gt } from "./minus-small.DYIyF5XW.js";
|
|
12
|
+
import { C as yt } from "./checkmark-small.x-gmK2Dt.js";
|
|
13
|
+
import { C as St } from "./chevron-down.DCQ6ZLaq.js";
|
|
14
|
+
import { C as ht } from "./chevron-up.kfuLRpZb.js";
|
|
15
|
+
import { g as Ne } from "./generate-uid.NJ8tVoha.js";
|
|
16
|
+
import { d as Ct, e as Pe } from "./button-actions.CZdO9YOk.js";
|
|
16
17
|
/* empty css */
|
|
17
|
-
import { o as
|
|
18
|
+
import { o as Et } from "./resize.Bqks3WUm.js";
|
|
18
19
|
import "../assets/use-cached-selected-values.css";
|
|
19
|
-
const
|
|
20
|
-
const
|
|
20
|
+
const ze = (e, t, i, s) => {
|
|
21
|
+
const r = m(
|
|
21
22
|
() => {
|
|
22
|
-
var p,
|
|
23
|
-
return !!((p = e.value) != null && p.length) && ((
|
|
23
|
+
var p, y;
|
|
24
|
+
return !!((p = e.value) != null && p.length) && ((y = e.value) == null ? void 0 : y.length) === t.value.length;
|
|
24
25
|
}
|
|
25
26
|
), o = m(() => {
|
|
26
27
|
var p;
|
|
27
28
|
return e.value == null || e.value.length === 0 ? !1 : ((p = e.value) == null ? void 0 : p.length) !== t.value.length;
|
|
28
29
|
});
|
|
29
30
|
return {
|
|
30
|
-
isAllSelected:
|
|
31
|
+
isAllSelected: r,
|
|
31
32
|
isIndeterminate: o,
|
|
32
33
|
toggleSelectAll: (p) => {
|
|
33
34
|
p ? i() : s();
|
|
34
35
|
}
|
|
35
36
|
};
|
|
36
37
|
};
|
|
37
|
-
function
|
|
38
|
-
const o =
|
|
38
|
+
function Ot(e, { disabled: t, itemHeight: i, overscan: s = 5, prefixHeight: r }) {
|
|
39
|
+
const o = k(null), n = k([]), p = k(0), y = k(0), a = k(0);
|
|
39
40
|
let u;
|
|
40
41
|
const l = m(() => {
|
|
41
|
-
const
|
|
42
|
+
const D = typeof i == "number" ? e.value.length * i : e.value.reduce((I, S, _) => I + i(_), 0), B = typeof i == "number" ? p.value * i : e.value.slice(0, p.value).reduce((I, S, _) => I + i(_), 0);
|
|
42
43
|
return {
|
|
43
44
|
style: {
|
|
44
|
-
marginTop: `${
|
|
45
|
-
height: `${
|
|
45
|
+
marginTop: `${B}px`,
|
|
46
|
+
height: `${D - B}px`
|
|
46
47
|
}
|
|
47
48
|
};
|
|
48
49
|
}), f = () => {
|
|
49
|
-
const
|
|
50
|
+
const D = (r == null ? void 0 : r.value) ?? 0, B = Math.max(o.value.scrollTop - D, 0);
|
|
50
51
|
if (typeof i == "number")
|
|
51
|
-
return Math.floor(
|
|
52
|
-
let
|
|
52
|
+
return Math.floor(B / i);
|
|
53
|
+
let I = 0, S = 0;
|
|
53
54
|
for (let _ = 0; _ < e.value.length; _ += 1) {
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
|
|
55
|
+
const w = i(_);
|
|
56
|
+
if (I += w, I >= B) {
|
|
57
|
+
S = _;
|
|
57
58
|
break;
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
|
-
return
|
|
61
|
+
return S;
|
|
61
62
|
}, E = () => {
|
|
62
|
-
if (
|
|
63
|
-
return Math.ceil(
|
|
64
|
-
const
|
|
65
|
-
let
|
|
66
|
-
for (let
|
|
67
|
-
const _ = i(
|
|
68
|
-
if (
|
|
63
|
+
if (a.value = o.value.clientHeight, typeof i == "number")
|
|
64
|
+
return Math.ceil(a.value / i);
|
|
65
|
+
const D = p.value ?? 0;
|
|
66
|
+
let B = 0, I = 0;
|
|
67
|
+
for (let S = D; S < e.value.length; S += 1) {
|
|
68
|
+
const _ = i(S);
|
|
69
|
+
if (B += _, I = S, B > a.value)
|
|
69
70
|
break;
|
|
70
71
|
}
|
|
71
|
-
return
|
|
72
|
+
return I - D;
|
|
72
73
|
}, T = () => {
|
|
73
74
|
if (o.value) {
|
|
74
|
-
const
|
|
75
|
-
p.value = f(),
|
|
75
|
+
const D = E();
|
|
76
|
+
p.value = f(), y.value = Math.min(p.value + D + s, e.value.length), n.value = e.value.slice(p.value, y.value);
|
|
76
77
|
}
|
|
77
|
-
},
|
|
78
|
+
}, $ = () => {
|
|
78
79
|
T();
|
|
79
80
|
};
|
|
80
|
-
t || (
|
|
81
|
-
o.value && (
|
|
82
|
-
|
|
81
|
+
t || (ct(() => {
|
|
82
|
+
o.value && (a.value = o.value.clientHeight, u = Et(o.value, ({ clientHeight: D }) => {
|
|
83
|
+
a.value = D, T();
|
|
83
84
|
}), T());
|
|
84
|
-
}),
|
|
85
|
+
}), dt(() => {
|
|
85
86
|
u == null || u.disconnect();
|
|
86
|
-
}),
|
|
87
|
+
}), ye(
|
|
87
88
|
() => e.value,
|
|
88
89
|
() => {
|
|
89
90
|
T();
|
|
90
91
|
}
|
|
91
92
|
));
|
|
92
|
-
const
|
|
93
|
+
const P = {
|
|
93
94
|
ref: o,
|
|
94
95
|
style: { overflowY: "auto" }
|
|
95
96
|
};
|
|
96
97
|
return t ? {
|
|
97
98
|
containerRef: o,
|
|
98
|
-
containerProps:
|
|
99
|
+
containerProps: P,
|
|
99
100
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
100
101
|
onScroll: () => {
|
|
101
102
|
},
|
|
102
103
|
list: e
|
|
103
104
|
} : {
|
|
104
105
|
containerRef: o,
|
|
105
|
-
containerProps:
|
|
106
|
-
onScroll:
|
|
107
|
-
list:
|
|
106
|
+
containerProps: P,
|
|
107
|
+
onScroll: $,
|
|
108
|
+
list: n,
|
|
108
109
|
wrapperProps: l
|
|
109
110
|
};
|
|
110
111
|
}
|
|
111
|
-
var g = /* @__PURE__ */ ((e) => (e.SELECT = "select", e.SHOW_MORE = "show-more", e.ESCAPE = "escape-pressed", e.CLICK = "click", e.ENTER = "enter-pressed", e.SPACE = "space-pressed", e.TAB = "tab-pressed", e.CLOSE_DROPDOWN = "close-dropdown", e))(g || {}),
|
|
112
|
-
const
|
|
112
|
+
var g = /* @__PURE__ */ ((e) => (e.SELECT = "select", e.SHOW_MORE = "show-more", e.ESCAPE = "escape-pressed", e.CLICK = "click", e.ENTER = "enter-pressed", e.SPACE = "space-pressed", e.TAB = "tab-pressed", e.CLOSE_DROPDOWN = "close-dropdown", e))(g || {}), ne = /* @__PURE__ */ ((e) => (e.AUTOMATIC = "automatic", e.BUTTON = "button", e.NONE = "none", e))(ne || {});
|
|
113
|
+
const Tt = Z({
|
|
113
114
|
name: "bento-listbox-static-category",
|
|
114
115
|
components: {
|
|
115
|
-
BentoTypography:
|
|
116
|
+
BentoTypography: de
|
|
116
117
|
},
|
|
117
118
|
props: {
|
|
118
119
|
/**
|
|
@@ -123,26 +124,31 @@ const Ot = J({
|
|
|
123
124
|
required: !0
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
|
-
}),
|
|
127
|
-
function
|
|
128
|
-
const
|
|
129
|
-
return v(), O("div",
|
|
130
|
-
|
|
127
|
+
}), _t = ["aria-label"];
|
|
128
|
+
function It(e, t, i, s, r, o) {
|
|
129
|
+
const n = L("bento-typography");
|
|
130
|
+
return v(), O("div", {
|
|
131
|
+
class: "b-listbox-single-select-category",
|
|
132
|
+
role: "group",
|
|
133
|
+
"aria-label": e.categoryLabel
|
|
134
|
+
}, [
|
|
135
|
+
G(n, {
|
|
131
136
|
variant: "caption",
|
|
132
137
|
el: "span",
|
|
133
|
-
class: "b-listbox-single-select-category__label-text"
|
|
138
|
+
class: "b-listbox-single-select-category__label-text",
|
|
139
|
+
"aria-hidden": "true"
|
|
134
140
|
}, {
|
|
135
141
|
default: A(() => [
|
|
136
|
-
|
|
142
|
+
K(V(e.categoryLabel), 1)
|
|
137
143
|
]),
|
|
138
144
|
_: 1
|
|
139
145
|
}),
|
|
140
|
-
|
|
141
|
-
|
|
146
|
+
z("div", null, [
|
|
147
|
+
j(e.$slots, "default", {}, void 0, !0)
|
|
142
148
|
])
|
|
143
|
-
]);
|
|
149
|
+
], 8, _t);
|
|
144
150
|
}
|
|
145
|
-
const
|
|
151
|
+
const At = /* @__PURE__ */ H(Tt, [["render", It], ["__scopeId", "data-v-27c4e09a"]]), kt = Z({
|
|
146
152
|
name: "bento-listbox-option",
|
|
147
153
|
props: {
|
|
148
154
|
/**
|
|
@@ -162,7 +168,7 @@ const It = /* @__PURE__ */ q(Ot, [["render", _t], ["__scopeId", "data-v-a90eff17
|
|
|
162
168
|
}));
|
|
163
169
|
return {
|
|
164
170
|
// Enums
|
|
165
|
-
BentoKeyboardNavigationKeyDownEvent:
|
|
171
|
+
BentoKeyboardNavigationKeyDownEvent: F,
|
|
166
172
|
BentoListboxEvent: g,
|
|
167
173
|
// Values
|
|
168
174
|
conditionalClasses: i,
|
|
@@ -170,35 +176,35 @@ const It = /* @__PURE__ */ q(Ot, [["render", _t], ["__scopeId", "data-v-a90eff17
|
|
|
170
176
|
onClick: (o) => {
|
|
171
177
|
t(g.CLICK, o);
|
|
172
178
|
},
|
|
173
|
-
onOptionSelected: (o,
|
|
174
|
-
t(o,
|
|
179
|
+
onOptionSelected: (o, n) => {
|
|
180
|
+
t(o, n);
|
|
175
181
|
}
|
|
176
182
|
};
|
|
177
183
|
}
|
|
178
184
|
});
|
|
179
|
-
function
|
|
185
|
+
function Lt(e, t, i, s, r, o) {
|
|
180
186
|
return v(), O("div", Y({
|
|
181
187
|
class: ["b-listbox-option", e.conditionalClasses],
|
|
182
188
|
role: "option"
|
|
183
189
|
}, e.$attrs, {
|
|
184
|
-
onClick: t[0] || (t[0] = (...
|
|
190
|
+
onClick: t[0] || (t[0] = (...n) => e.onClick && e.onClick(...n)),
|
|
185
191
|
onKeydown: [
|
|
186
|
-
t[1] || (t[1] =
|
|
187
|
-
t[2] || (t[2] =
|
|
188
|
-
t[3] || (t[3] =
|
|
192
|
+
t[1] || (t[1] = me((n) => e.onOptionSelected(e.BentoListboxEvent.ENTER, n), ["enter"])),
|
|
193
|
+
t[2] || (t[2] = me((n) => e.onOptionSelected(e.BentoListboxEvent.SPACE, n), ["space"])),
|
|
194
|
+
t[3] || (t[3] = me((n) => e.onOptionSelected(e.BentoListboxEvent.TAB, n), ["tab"]))
|
|
189
195
|
]
|
|
190
196
|
}), [
|
|
191
|
-
|
|
197
|
+
j(e.$slots, "default", {}, void 0, !0)
|
|
192
198
|
], 16);
|
|
193
199
|
}
|
|
194
|
-
const
|
|
195
|
-
let
|
|
196
|
-
const
|
|
200
|
+
const Ee = /* @__PURE__ */ H(kt, [["render", Lt], ["__scopeId", "data-v-b7af43a6"]]);
|
|
201
|
+
let Me = 0;
|
|
202
|
+
const $t = {
|
|
197
203
|
beforeCreate() {
|
|
198
|
-
this.uuid =
|
|
204
|
+
this.uuid = Me.toString(), Me += 1;
|
|
199
205
|
}
|
|
200
|
-
},
|
|
201
|
-
function
|
|
206
|
+
}, Dt = { key: 0 };
|
|
207
|
+
function Bt(e, t, i, s, r, o) {
|
|
202
208
|
return v(), O("svg", Y({ role: "img" }, e.$attrs, {
|
|
203
209
|
class: "ui-assets-icons-16",
|
|
204
210
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -206,19 +212,19 @@ function Dt(e, t, i, s, n, o) {
|
|
|
206
212
|
height: "16",
|
|
207
213
|
fill: "none"
|
|
208
214
|
}), [
|
|
209
|
-
e.$attrs["svg-title"] ? (v(), O("title",
|
|
210
|
-
t[0] || (t[0] =
|
|
215
|
+
e.$attrs["svg-title"] ? (v(), O("title", Dt, V(e.$attrs["svg-title"]), 1)) : J("", !0),
|
|
216
|
+
t[0] || (t[0] = z("path", {
|
|
211
217
|
fill: "#001222",
|
|
212
218
|
d: "M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z"
|
|
213
219
|
}, null, -1))
|
|
214
220
|
], 16);
|
|
215
221
|
}
|
|
216
|
-
const
|
|
222
|
+
const Rt = /* @__PURE__ */ H($t, [["render", Bt]]), Nt = Z({
|
|
217
223
|
name: "bento-listbox-single-select-option",
|
|
218
224
|
components: {
|
|
219
|
-
BentoListboxOption:
|
|
220
|
-
BentoTypography:
|
|
221
|
-
CheckmarkIcon:
|
|
225
|
+
BentoListboxOption: Ee,
|
|
226
|
+
BentoTypography: de,
|
|
227
|
+
CheckmarkIcon: Rt
|
|
222
228
|
},
|
|
223
229
|
props: {
|
|
224
230
|
/**
|
|
@@ -240,13 +246,13 @@ const Bt = /* @__PURE__ */ q(Lt, [["render", Dt]]), Rt = J({
|
|
|
240
246
|
},
|
|
241
247
|
emits: [g.ENTER, g.SELECT, g.SPACE, g.TAB],
|
|
242
248
|
setup(e, { emit: t }) {
|
|
243
|
-
const i = (
|
|
244
|
-
e.disabled || t(
|
|
245
|
-
}, s = m(() => e.disabled ? !0 : null),
|
|
249
|
+
const i = (n) => {
|
|
250
|
+
e.disabled || t(n, e.option);
|
|
251
|
+
}, s = m(() => e.disabled ? !0 : null), r = m(() => e.selected ? !0 : null), o = m(() => e.disabled ? -1 : 0);
|
|
246
252
|
return {
|
|
247
253
|
// Values
|
|
248
254
|
ariaDisabled: s,
|
|
249
|
-
ariaSelected:
|
|
255
|
+
ariaSelected: r,
|
|
250
256
|
tabIndex: o,
|
|
251
257
|
// Enums
|
|
252
258
|
BentoListboxEvent: g,
|
|
@@ -254,53 +260,53 @@ const Bt = /* @__PURE__ */ q(Lt, [["render", Dt]]), Rt = J({
|
|
|
254
260
|
onOptionSelected: i
|
|
255
261
|
};
|
|
256
262
|
}
|
|
257
|
-
}),
|
|
258
|
-
function xt(e, t, i, s,
|
|
259
|
-
const
|
|
260
|
-
return v(),
|
|
263
|
+
}), Pt = { class: "b-listbox-single-select-option__text" }, Mt = { class: "b-listbox-single-select-option__check-icon" };
|
|
264
|
+
function xt(e, t, i, s, r, o) {
|
|
265
|
+
const n = L("bento-typography"), p = L("checkmark-icon"), y = L("bento-listbox-option");
|
|
266
|
+
return v(), R(y, {
|
|
261
267
|
class: "b-listbox-single-select-option",
|
|
262
268
|
disabled: e.disabled,
|
|
263
269
|
selected: e.selected,
|
|
264
270
|
"aria-selected": e.ariaSelected,
|
|
265
271
|
"aria-disabled": e.ariaDisabled,
|
|
266
272
|
tabindex: e.tabIndex,
|
|
267
|
-
onClick: t[0] || (t[0] = (
|
|
268
|
-
onEnterPressed: t[1] || (t[1] = (
|
|
269
|
-
onSpacePressed: t[2] || (t[2] =
|
|
270
|
-
onTabPressed: t[3] || (t[3] = (
|
|
273
|
+
onClick: t[0] || (t[0] = (a) => e.onOptionSelected(e.BentoListboxEvent.SELECT)),
|
|
274
|
+
onEnterPressed: t[1] || (t[1] = (a) => e.onOptionSelected(e.BentoListboxEvent.ENTER)),
|
|
275
|
+
onSpacePressed: t[2] || (t[2] = re((a) => e.onOptionSelected(e.BentoListboxEvent.SPACE), ["prevent"])),
|
|
276
|
+
onTabPressed: t[3] || (t[3] = (a) => e.onOptionSelected(e.BentoListboxEvent.TAB))
|
|
271
277
|
}, {
|
|
272
278
|
default: A(() => [
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
279
|
+
j(e.$slots, "default", ae(ve(e.option)), () => [
|
|
280
|
+
z("span", Pt, [
|
|
281
|
+
G(n, { el: "span" }, {
|
|
276
282
|
default: A(() => [
|
|
277
|
-
|
|
283
|
+
K(V(e.option.label), 1)
|
|
278
284
|
]),
|
|
279
285
|
_: 1
|
|
280
286
|
}),
|
|
281
|
-
e.option.description ? (v(),
|
|
287
|
+
e.option.description ? (v(), R(n, {
|
|
282
288
|
key: 0,
|
|
283
289
|
class: "b-listbox-single-select-option__description",
|
|
284
290
|
el: "span"
|
|
285
291
|
}, {
|
|
286
292
|
default: A(() => [
|
|
287
|
-
|
|
293
|
+
K(V(e.option.description), 1)
|
|
288
294
|
]),
|
|
289
295
|
_: 1
|
|
290
|
-
})) :
|
|
296
|
+
})) : J("", !0)
|
|
291
297
|
])
|
|
292
298
|
], !0),
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
[
|
|
299
|
+
z("span", Mt, [
|
|
300
|
+
ce(G(p, { "svg-title": "selected" }, null, 512), [
|
|
301
|
+
[we, e.selected]
|
|
296
302
|
])
|
|
297
303
|
])
|
|
298
304
|
]),
|
|
299
305
|
_: 3
|
|
300
306
|
}, 8, ["disabled", "selected", "aria-selected", "aria-disabled", "tabindex"]);
|
|
301
307
|
}
|
|
302
|
-
const
|
|
303
|
-
const i = m(() => e.value.length - 1), s =
|
|
308
|
+
const Gt = /* @__PURE__ */ H(Nt, [["render", xt], ["__scopeId", "data-v-226f4c84"]]), Ve = ({ items: e }, t) => {
|
|
309
|
+
const i = m(() => e.value.length - 1), s = k(0), r = (f) => {
|
|
304
310
|
switch (f) {
|
|
305
311
|
case "increase":
|
|
306
312
|
s.value += 1;
|
|
@@ -310,8 +316,8 @@ const Mt = /* @__PURE__ */ q(Rt, [["render", xt], ["__scopeId", "data-v-226f4c84
|
|
|
310
316
|
break;
|
|
311
317
|
}
|
|
312
318
|
}, o = ({ edgeCaseItem: f }, E) => {
|
|
313
|
-
s.value !== f && (
|
|
314
|
-
},
|
|
319
|
+
s.value !== f && (r(E), t(s.value));
|
|
320
|
+
}, n = (f) => {
|
|
315
321
|
l(f), o(
|
|
316
322
|
{
|
|
317
323
|
edgeCaseItem: i.value
|
|
@@ -327,9 +333,9 @@ const Mt = /* @__PURE__ */ q(Rt, [["render", xt], ["__scopeId", "data-v-226f4c84
|
|
|
327
333
|
"decrease"
|
|
328
334
|
/* DECREASE */
|
|
329
335
|
);
|
|
330
|
-
},
|
|
336
|
+
}, y = () => {
|
|
331
337
|
s.value = 0, t(s.value);
|
|
332
|
-
},
|
|
338
|
+
}, a = () => {
|
|
333
339
|
s.value = i.value, t(s.value);
|
|
334
340
|
}, u = (f) => {
|
|
335
341
|
s.value = f;
|
|
@@ -338,40 +344,40 @@ const Mt = /* @__PURE__ */ q(Rt, [["render", xt], ["__scopeId", "data-v-226f4c84
|
|
|
338
344
|
(E = f == null ? void 0 : f.detail) == null || E.preventDefault();
|
|
339
345
|
};
|
|
340
346
|
return {
|
|
341
|
-
moveToFirstElement:
|
|
342
|
-
moveToLastElement:
|
|
343
|
-
moveToNextElement:
|
|
347
|
+
moveToFirstElement: y,
|
|
348
|
+
moveToLastElement: a,
|
|
349
|
+
moveToNextElement: n,
|
|
344
350
|
moveToPreviousElement: p,
|
|
345
351
|
setListboxFocusedIndex: u,
|
|
346
352
|
preventDefault: l,
|
|
347
353
|
focusedIndex: s
|
|
348
354
|
};
|
|
349
|
-
},
|
|
350
|
-
const
|
|
355
|
+
}, Fe = (e, t, i = k("option"), s = !0) => {
|
|
356
|
+
const r = k([]), o = async () => {
|
|
351
357
|
if (!e.value || e.value.nodeType === Node.COMMENT_NODE)
|
|
352
358
|
return;
|
|
353
|
-
const
|
|
354
|
-
|
|
359
|
+
const n = Array.from(e.value.querySelectorAll(`[role="${i.value}"]`));
|
|
360
|
+
r.value = s ? n.filter((p) => p.checkVisibility()) : n;
|
|
355
361
|
};
|
|
356
|
-
return
|
|
362
|
+
return ye(
|
|
357
363
|
t,
|
|
358
364
|
() => {
|
|
359
|
-
|
|
365
|
+
Ye(() => {
|
|
360
366
|
o();
|
|
361
367
|
});
|
|
362
368
|
},
|
|
363
369
|
{ immediate: !0 }
|
|
364
370
|
), {
|
|
365
|
-
visibleDomOptions:
|
|
371
|
+
visibleDomOptions: r,
|
|
366
372
|
updateVisibleDomOptions: o
|
|
367
373
|
};
|
|
368
|
-
},
|
|
374
|
+
}, wt = Z({
|
|
369
375
|
name: "bento-listbox-single-select",
|
|
370
376
|
components: {
|
|
371
|
-
BentoListboxSingleSelectCategory:
|
|
372
|
-
BentoListboxSingleSelectOption:
|
|
377
|
+
BentoListboxSingleSelectCategory: At,
|
|
378
|
+
BentoListboxSingleSelectOption: Gt
|
|
373
379
|
},
|
|
374
|
-
directives: { BentoKeyboardNavigationDirective:
|
|
380
|
+
directives: { BentoKeyboardNavigationDirective: Ce },
|
|
375
381
|
inheritAttrs: !1,
|
|
376
382
|
props: {
|
|
377
383
|
/**
|
|
@@ -413,42 +419,42 @@ const Mt = /* @__PURE__ */ q(Rt, [["render", xt], ["__scopeId", "data-v-226f4c84
|
|
|
413
419
|
staticCategories: { type: Boolean, default: !1 }
|
|
414
420
|
},
|
|
415
421
|
emits: [g.SELECT, g.ENTER, g.SPACE, g.TAB],
|
|
416
|
-
setup(e, { emit: t, expose: i, slots: s, attrs:
|
|
417
|
-
const o =
|
|
418
|
-
var
|
|
419
|
-
return !!((
|
|
420
|
-
}),
|
|
422
|
+
setup(e, { emit: t, expose: i, slots: s, attrs: r }) {
|
|
423
|
+
const o = k(null), n = k([]), p = m(() => {
|
|
424
|
+
var S;
|
|
425
|
+
return !!((S = e.selectedValue) != null && S.length) && e.selectedValue.at(0);
|
|
426
|
+
}), y = m(
|
|
421
427
|
() => {
|
|
422
|
-
var
|
|
428
|
+
var S, _, w, Q;
|
|
423
429
|
return {
|
|
424
|
-
"aria-label": (
|
|
425
|
-
"aria-busy": (_ =
|
|
426
|
-
"aria-atomic": (
|
|
427
|
-
"aria-live": (
|
|
430
|
+
"aria-label": (S = r["aria-label"]) == null ? void 0 : S.toString(),
|
|
431
|
+
"aria-busy": (_ = r["aria-busy"]) == null ? void 0 : _.toString(),
|
|
432
|
+
"aria-atomic": (w = r["aria-atomic"]) == null ? void 0 : w.toString(),
|
|
433
|
+
"aria-live": (Q = r["aria-live"]) == null ? void 0 : Q.toString()
|
|
428
434
|
};
|
|
429
435
|
}
|
|
430
|
-
),
|
|
431
|
-
t(
|
|
432
|
-
}, { visibleDomOptions: l } =
|
|
436
|
+
), a = m(() => !!e.items.some(({ items: S }) => !!S)), u = (S) => (_) => {
|
|
437
|
+
t(S, [_]);
|
|
438
|
+
}, { visibleDomOptions: l } = Fe(o, fe(e, "items"), k("option"), !1), f = (S) => {
|
|
433
439
|
var _;
|
|
434
|
-
(_ = l.value[
|
|
440
|
+
(_ = l.value[S]) == null || _.focus();
|
|
435
441
|
}, {
|
|
436
442
|
moveToNextElement: E,
|
|
437
443
|
moveToPreviousElement: T,
|
|
438
|
-
moveToFirstElement:
|
|
439
|
-
moveToLastElement:
|
|
440
|
-
setListboxFocusedIndex:
|
|
441
|
-
} =
|
|
444
|
+
moveToFirstElement: $,
|
|
445
|
+
moveToLastElement: P,
|
|
446
|
+
setListboxFocusedIndex: D
|
|
447
|
+
} = Ve(
|
|
442
448
|
{
|
|
443
449
|
items: l
|
|
444
450
|
},
|
|
445
451
|
f
|
|
446
|
-
),
|
|
447
|
-
[
|
|
448
|
-
[
|
|
449
|
-
[
|
|
450
|
-
[
|
|
451
|
-
},
|
|
452
|
+
), B = {
|
|
453
|
+
[F.ARROW_UP]: T,
|
|
454
|
+
[F.ARROW_DOWN]: E,
|
|
455
|
+
[F.HOME]: $,
|
|
456
|
+
[F.END]: P
|
|
457
|
+
}, I = {
|
|
452
458
|
[g.SELECT]: u(g.SELECT),
|
|
453
459
|
[g.SPACE]: u(g.SPACE),
|
|
454
460
|
[g.TAB]: u(g.TAB),
|
|
@@ -459,41 +465,40 @@ const Mt = /* @__PURE__ */ q(Rt, [["render", xt], ["__scopeId", "data-v-226f4c84
|
|
|
459
465
|
* Reference for a single listbox item.
|
|
460
466
|
* Required for keyboard navigation in dropdown as $children is removed in vue@3
|
|
461
467
|
*/
|
|
462
|
-
listboxItemRef:
|
|
468
|
+
listboxItemRef: n,
|
|
463
469
|
/**
|
|
464
470
|
* Method to set the index of the item to be focused on
|
|
465
471
|
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
466
472
|
*/
|
|
467
|
-
setListboxFocusedIndex:
|
|
473
|
+
setListboxFocusedIndex: D
|
|
468
474
|
}), {
|
|
469
475
|
// Enums
|
|
470
476
|
BentoListboxEvent: g,
|
|
471
477
|
// Values
|
|
472
478
|
listboxRef: o,
|
|
473
|
-
listboxItemRef:
|
|
479
|
+
listboxItemRef: n,
|
|
474
480
|
selectedItem: p,
|
|
475
481
|
slots: s,
|
|
476
|
-
ariaAttributes:
|
|
482
|
+
ariaAttributes: y,
|
|
477
483
|
// Computed
|
|
478
|
-
hasCategories:
|
|
484
|
+
hasCategories: a,
|
|
479
485
|
// Methods
|
|
480
486
|
onOptionSelected: u,
|
|
481
487
|
// Keyboard navigation
|
|
482
|
-
listboxListeners:
|
|
483
|
-
listboxOptionListeners:
|
|
488
|
+
listboxListeners: B,
|
|
489
|
+
listboxOptionListeners: I
|
|
484
490
|
};
|
|
485
491
|
}
|
|
486
492
|
});
|
|
487
|
-
function
|
|
488
|
-
const
|
|
489
|
-
return
|
|
490
|
-
e.hasCategories && e.staticCategories ? (v(!0), O(
|
|
491
|
-
key:
|
|
492
|
-
"category-label":
|
|
493
|
-
role: "group"
|
|
493
|
+
function Yt(e, t, i, s, r, o) {
|
|
494
|
+
const n = L("bento-listbox-single-select-option"), p = L("bento-listbox-single-select-category"), y = Ue("bento-keyboard-navigation-directive");
|
|
495
|
+
return ce((v(), O("div", Y({ ref: "listboxRef" }, e.ariaAttributes, { role: "listbox" }, se(e.listboxListeners, !0)), [
|
|
496
|
+
e.hasCategories && e.staticCategories ? (v(!0), O(le, { key: 0 }, q(e.items, (a) => (v(), R(p, {
|
|
497
|
+
key: a.value,
|
|
498
|
+
"category-label": a.label
|
|
494
499
|
}, {
|
|
495
500
|
default: A(() => [
|
|
496
|
-
(v(!0), O(
|
|
501
|
+
(v(!0), O(le, null, q(a.items, (u) => (v(), R(n, Y({
|
|
497
502
|
key: u.value,
|
|
498
503
|
ref_for: !0,
|
|
499
504
|
ref: "listboxItemRef",
|
|
@@ -501,38 +506,38 @@ function wt(e, t, i, s, n, o) {
|
|
|
501
506
|
option: u,
|
|
502
507
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(u) : null,
|
|
503
508
|
selected: u.value === e.selectedItem.value
|
|
504
|
-
},
|
|
505
|
-
|
|
509
|
+
}, se(e.listboxOptionListeners)), pe({ _: 2 }, [
|
|
510
|
+
q(e.slots, (l, f) => ({
|
|
506
511
|
name: f,
|
|
507
512
|
fn: A((E) => [
|
|
508
|
-
|
|
513
|
+
j(e.$slots, f, Y({ ref_for: !0 }, E))
|
|
509
514
|
])
|
|
510
515
|
}))
|
|
511
516
|
]), 1040, ["option", "disabled", "selected"]))), 128))
|
|
512
517
|
]),
|
|
513
518
|
_: 2
|
|
514
|
-
}, 1032, ["category-label"]))), 128)) : (v(!0), O(
|
|
515
|
-
key:
|
|
519
|
+
}, 1032, ["category-label"]))), 128)) : (v(!0), O(le, { key: 1 }, q(e.items, (a) => (v(), R(n, Y({
|
|
520
|
+
key: a.value,
|
|
516
521
|
ref_for: !0,
|
|
517
522
|
ref: "listboxItemRef",
|
|
518
523
|
role: "option",
|
|
519
|
-
option:
|
|
520
|
-
disabled: e.isOptionDisabled ? e.isOptionDisabled(
|
|
521
|
-
selected:
|
|
522
|
-
},
|
|
523
|
-
|
|
524
|
+
option: a,
|
|
525
|
+
disabled: e.isOptionDisabled ? e.isOptionDisabled(a) : null,
|
|
526
|
+
selected: a.value === e.selectedItem.value
|
|
527
|
+
}, se(e.listboxOptionListeners)), pe({ _: 2 }, [
|
|
528
|
+
q(e.slots, (u, l) => ({
|
|
524
529
|
name: l,
|
|
525
530
|
fn: A((f) => [
|
|
526
|
-
|
|
531
|
+
j(e.$slots, l, Y({ ref_for: !0 }, f))
|
|
527
532
|
])
|
|
528
533
|
}))
|
|
529
534
|
]), 1040, ["option", "disabled", "selected"]))), 128))
|
|
530
535
|
], 16)), [
|
|
531
|
-
[
|
|
536
|
+
[y]
|
|
532
537
|
]);
|
|
533
538
|
}
|
|
534
|
-
const
|
|
535
|
-
...
|
|
539
|
+
const Ut = /* @__PURE__ */ H(wt, [["render", Yt]]), zt = {}, Vt = /* @__PURE__ */ Z({
|
|
540
|
+
...zt,
|
|
536
541
|
__name: "listbox-decorative-checkbox",
|
|
537
542
|
props: {
|
|
538
543
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -541,47 +546,47 @@ const Yt = /* @__PURE__ */ q(Gt, [["render", wt]]), Ut = {}, zt = /* @__PURE__ *
|
|
|
541
546
|
},
|
|
542
547
|
setup(e) {
|
|
543
548
|
const t = e, i = m(() => ({
|
|
544
|
-
[`b-checkbox-input--${
|
|
549
|
+
[`b-checkbox-input--${he.DISABLED}`]: t.disabled
|
|
545
550
|
})), s = m(() => ({
|
|
546
|
-
[`b-checkbox-input__outline--${
|
|
547
|
-
[`b-checkbox-input__outline--${
|
|
548
|
-
[`b-checkbox-input__outline--${
|
|
551
|
+
[`b-checkbox-input__outline--${he.UNCHECKED}`]: !t.checked && !t.indeterminate,
|
|
552
|
+
[`b-checkbox-input__outline--${he.CHECKED}`]: t.checked && !t.indeterminate,
|
|
553
|
+
[`b-checkbox-input__outline--${he.INDETERMINATE}`]: t.indeterminate
|
|
549
554
|
}));
|
|
550
|
-
return (
|
|
551
|
-
class:
|
|
555
|
+
return (r, o) => (v(), O("div", {
|
|
556
|
+
class: ge(["b-checkbox-input", i.value]),
|
|
552
557
|
role: "presentation"
|
|
553
558
|
}, [
|
|
554
|
-
|
|
559
|
+
r.indeterminate ? (v(), R(x(gt), {
|
|
555
560
|
key: 0,
|
|
556
561
|
class: "b-checkbox-input__icon",
|
|
557
562
|
"svg-title": "",
|
|
558
563
|
"aria-hidden": "true"
|
|
559
|
-
})) :
|
|
564
|
+
})) : r.checked ? (v(), R(x(yt), {
|
|
560
565
|
key: 1,
|
|
561
566
|
class: "b-checkbox-input__icon",
|
|
562
567
|
"svg-title": "",
|
|
563
568
|
"aria-hidden": "true"
|
|
564
|
-
})) :
|
|
565
|
-
|
|
566
|
-
class:
|
|
569
|
+
})) : J("", !0),
|
|
570
|
+
z("div", {
|
|
571
|
+
class: ge(["b-checkbox-input__outline", s.value])
|
|
567
572
|
}, null, 2)
|
|
568
573
|
], 2));
|
|
569
574
|
}
|
|
570
|
-
}), Ae = /* @__PURE__ */
|
|
571
|
-
var
|
|
572
|
-
const
|
|
575
|
+
}), Ae = /* @__PURE__ */ H(Vt, [["__scopeId", "data-v-c604b68a"]]);
|
|
576
|
+
var Ke = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.STATIC_CATEGORY = "static-category", e))(Ke || {}), te = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.UNSELECT_CATEGORY = "unselect-category", e.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", e))(te || {});
|
|
577
|
+
const Ft = {
|
|
573
578
|
"en-US": {
|
|
574
579
|
categoryClosed: "{category} closed",
|
|
575
580
|
categoryOpened: "{category} opened"
|
|
576
581
|
}
|
|
577
|
-
},
|
|
578
|
-
i18n: { messages:
|
|
582
|
+
}, Kt = Z({
|
|
583
|
+
i18n: { messages: Ft },
|
|
579
584
|
name: "bento-listbox-multi-select-category",
|
|
580
585
|
components: {
|
|
581
|
-
BentoTypography:
|
|
582
|
-
BentoListboxOption:
|
|
583
|
-
ChevronDownIcon:
|
|
584
|
-
ChevronUpIcon:
|
|
586
|
+
BentoTypography: de,
|
|
587
|
+
BentoListboxOption: Ee,
|
|
588
|
+
ChevronDownIcon: St,
|
|
589
|
+
ChevronUpIcon: ht,
|
|
585
590
|
ListboxDecorativeCheckbox: Ae
|
|
586
591
|
},
|
|
587
592
|
props: {
|
|
@@ -628,132 +633,140 @@ const Vt = {
|
|
|
628
633
|
tabindex: { type: Number, default: -1 }
|
|
629
634
|
},
|
|
630
635
|
emits: [
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
636
|
+
te.SELECT_CATEGORY,
|
|
637
|
+
te.UNSELECT_CATEGORY,
|
|
638
|
+
te.TOGGLE_CATEGORY_VISIBILITY
|
|
634
639
|
],
|
|
635
640
|
setup(e, { emit: t }) {
|
|
636
|
-
const i =
|
|
637
|
-
() => e.category.items.every((
|
|
638
|
-
),
|
|
639
|
-
[`b-listbox-multi-select-category--${
|
|
640
|
-
})),
|
|
641
|
-
|
|
642
|
-
},
|
|
643
|
-
var
|
|
644
|
-
const
|
|
645
|
-
return { isDisabled:
|
|
646
|
-
},
|
|
647
|
-
() => e.category.items.filter((
|
|
648
|
-
const { isDisabled:
|
|
649
|
-
return
|
|
641
|
+
const i = k(!1), { t: s } = Ie(), r = Ne("category-group"), o = Ne("category-name"), n = (N) => e.isOptionDisabled ? e.isOptionDisabled(N) : !1, p = m(
|
|
642
|
+
() => e.category.items.every((N) => n(N))
|
|
643
|
+
), y = fe(e, "staticCategories"), a = m(() => i.value || e.staticCategories), u = m(() => ({
|
|
644
|
+
[`b-listbox-multi-select-category--${Ke.DISABLED}`]: p.value
|
|
645
|
+
})), l = (N, U) => {
|
|
646
|
+
N.preventDefault(), i.value = U !== void 0 ? U : !i.value, t(te.TOGGLE_CATEGORY_VISIBILITY, e.category.value);
|
|
647
|
+
}, f = (N) => {
|
|
648
|
+
var oe;
|
|
649
|
+
const U = n(N), W = ((oe = e.selectedItemsList) == null ? void 0 : oe.includes(N.value)) || !1;
|
|
650
|
+
return { isDisabled: U, isPreSelected: W };
|
|
651
|
+
}, E = m(
|
|
652
|
+
() => e.category.items.filter((N) => {
|
|
653
|
+
const { isDisabled: U, isPreSelected: W } = f(N);
|
|
654
|
+
return U && W || !U;
|
|
650
655
|
})
|
|
651
|
-
),
|
|
656
|
+
), T = m(
|
|
652
657
|
() => {
|
|
653
|
-
var
|
|
654
|
-
return (
|
|
655
|
-
({ value:
|
|
658
|
+
var N;
|
|
659
|
+
return (N = E.value) == null ? void 0 : N.filter(
|
|
660
|
+
({ value: U }) => {
|
|
656
661
|
var W;
|
|
657
|
-
return (W = e.selectedItemsList) == null ? void 0 : W.includes(
|
|
662
|
+
return (W = e.selectedItemsList) == null ? void 0 : W.includes(U);
|
|
658
663
|
}
|
|
659
664
|
);
|
|
660
665
|
}
|
|
661
|
-
),
|
|
662
|
-
const
|
|
663
|
-
return s(
|
|
664
|
-
}),
|
|
665
|
-
t(
|
|
666
|
-
},
|
|
667
|
-
t(
|
|
668
|
-
}, { isAllSelected:
|
|
669
|
-
f,
|
|
670
|
-
l,
|
|
666
|
+
), $ = m(() => {
|
|
667
|
+
const N = i.value ? "categoryOpened" : "categoryClosed";
|
|
668
|
+
return s(N, { category: e.category.label });
|
|
669
|
+
}), P = () => {
|
|
670
|
+
t(te.SELECT_CATEGORY);
|
|
671
|
+
}, D = () => {
|
|
672
|
+
t(te.UNSELECT_CATEGORY);
|
|
673
|
+
}, { isAllSelected: B, isIndeterminate: I, toggleSelectAll: S } = ze(
|
|
671
674
|
T,
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
+
E,
|
|
676
|
+
P,
|
|
677
|
+
D
|
|
678
|
+
), _ = m(() => I.value ? "mixed" : `${B.value}`), w = k(B.value), Q = () => {
|
|
679
|
+
w.value = !w.value, S(w.value);
|
|
675
680
|
};
|
|
676
|
-
return
|
|
677
|
-
|
|
681
|
+
return ye(B, () => {
|
|
682
|
+
w.value = B.value;
|
|
678
683
|
}), {
|
|
679
684
|
// Values
|
|
680
|
-
chevronTitle:
|
|
681
|
-
conditionalClass:
|
|
682
|
-
hasAllPropsDisabled:
|
|
685
|
+
chevronTitle: $,
|
|
686
|
+
conditionalClass: u,
|
|
687
|
+
hasAllPropsDisabled: p,
|
|
683
688
|
isOpen: i,
|
|
684
|
-
isAllSelected:
|
|
685
|
-
isIndeterminate:
|
|
686
|
-
isStaticCategory:
|
|
689
|
+
isAllSelected: B,
|
|
690
|
+
isIndeterminate: I,
|
|
691
|
+
isStaticCategory: y,
|
|
692
|
+
categoryGroupId: r,
|
|
693
|
+
categoryNameId: o,
|
|
687
694
|
// Computed
|
|
688
|
-
showItemChildren:
|
|
689
|
-
ariaCheckedComputed:
|
|
695
|
+
showItemChildren: a,
|
|
696
|
+
ariaCheckedComputed: _,
|
|
690
697
|
// Methods
|
|
691
|
-
handleSelectAll:
|
|
692
|
-
toggleOpen:
|
|
693
|
-
toggleSelectAll:
|
|
698
|
+
handleSelectAll: Q,
|
|
699
|
+
toggleOpen: l,
|
|
700
|
+
toggleSelectAll: S
|
|
694
701
|
};
|
|
695
702
|
}
|
|
696
|
-
}),
|
|
703
|
+
}), Wt = { class: "b-listbox-multi-select-category__label" }, jt = {
|
|
697
704
|
key: 1,
|
|
698
|
-
class: "b-listbox-multi-select-category b-listbox-multi-select-category--static-category"
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
705
|
+
class: "b-listbox-multi-select-category b-listbox-multi-select-category--static-category",
|
|
706
|
+
"aria-hidden": "true"
|
|
707
|
+
}, qt = { class: "b-listbox-multi-select-category__label" }, Ht = ["id", "aria-label"];
|
|
708
|
+
function Xt(e, t, i, s, r, o) {
|
|
709
|
+
const n = L("listbox-decorative-checkbox"), p = L("bento-typography"), y = L("chevron-up-icon"), a = L("chevron-down-icon"), u = L("bento-listbox-option");
|
|
702
710
|
return v(), O("div", null, [
|
|
703
|
-
e.isStaticCategory ? (v(), O("div",
|
|
704
|
-
|
|
705
|
-
|
|
711
|
+
e.isStaticCategory ? (v(), O("div", jt, [
|
|
712
|
+
z("span", qt, [
|
|
713
|
+
G(p, {
|
|
706
714
|
el: "span",
|
|
707
715
|
variant: "caption",
|
|
708
716
|
class: "b-listbox-multi-select-category__label-text"
|
|
709
717
|
}, {
|
|
710
718
|
default: A(() => [
|
|
711
|
-
|
|
719
|
+
K(V(e.category.label), 1)
|
|
712
720
|
]),
|
|
713
721
|
_: 1
|
|
714
722
|
})
|
|
715
723
|
])
|
|
716
|
-
])) : (v(),
|
|
724
|
+
])) : (v(), R(u, {
|
|
717
725
|
key: 0,
|
|
718
|
-
class:
|
|
726
|
+
class: ge(["b-listbox-multi-select-category__option", e.conditionalClass]),
|
|
719
727
|
tabindex: e.tabindex,
|
|
728
|
+
"aria-selected": e.ariaCheckedComputed !== "false",
|
|
720
729
|
"aria-checked": e.ariaCheckedComputed,
|
|
721
730
|
"aria-disabled": e.hasAllPropsDisabled,
|
|
722
|
-
"aria-expanded": e.isOpen
|
|
731
|
+
"aria-expanded": `${e.isOpen}`,
|
|
723
732
|
role: "treeitem",
|
|
733
|
+
"aria-owns": e.categoryGroupId,
|
|
734
|
+
"aria-labelledby": e.categoryNameId,
|
|
724
735
|
onClick: e.handleSelectAll,
|
|
725
736
|
onEnterPressed: e.handleSelectAll,
|
|
726
|
-
onSpacePressed:
|
|
737
|
+
onSpacePressed: re(e.handleSelectAll, ["prevent"]),
|
|
727
738
|
onKeydown: [
|
|
728
|
-
t[1] || (t[1] =
|
|
729
|
-
t[2] || (t[2] =
|
|
739
|
+
t[1] || (t[1] = me((l) => e.toggleOpen(l, !1), ["arrow-left", "native"])),
|
|
740
|
+
t[2] || (t[2] = me((l) => e.toggleOpen(l, !0), ["arrow-right", "native"]))
|
|
730
741
|
]
|
|
731
742
|
}, {
|
|
732
743
|
default: A(() => [
|
|
733
|
-
|
|
744
|
+
G(n, {
|
|
734
745
|
indeterminate: e.isIndeterminate,
|
|
735
746
|
disabled: e.hasAllPropsDisabled,
|
|
736
747
|
checked: e.isAllSelected
|
|
737
748
|
}, null, 8, ["indeterminate", "disabled", "checked"]),
|
|
738
|
-
|
|
739
|
-
|
|
749
|
+
z("span", Wt, [
|
|
750
|
+
G(p, {
|
|
751
|
+
id: e.categoryNameId,
|
|
740
752
|
el: "span",
|
|
741
753
|
class: "b-listbox-multi-select-category__label-text"
|
|
742
754
|
}, {
|
|
743
755
|
default: A(() => [
|
|
744
|
-
|
|
756
|
+
K(V(e.category.label), 1)
|
|
745
757
|
]),
|
|
746
758
|
_: 1
|
|
747
|
-
}),
|
|
748
|
-
|
|
759
|
+
}, 8, ["id"]),
|
|
760
|
+
z("div", {
|
|
761
|
+
"aria-hidden": "true",
|
|
749
762
|
class: "b-listbox-multi-select-category__label-chevron",
|
|
750
763
|
"data-testid": "toggle-listbox",
|
|
751
|
-
onClickCapture: t[0] || (t[0] =
|
|
764
|
+
onClickCapture: t[0] || (t[0] = re((...l) => e.toggleOpen && e.toggleOpen(...l), ["stop"]))
|
|
752
765
|
}, [
|
|
753
|
-
e.isOpen ? (v(),
|
|
766
|
+
e.isOpen ? (v(), R(y, {
|
|
754
767
|
key: 0,
|
|
755
768
|
"svg-title": e.chevronTitle
|
|
756
|
-
}, null, 8, ["svg-title"])) : (v(),
|
|
769
|
+
}, null, 8, ["svg-title"])) : (v(), R(a, {
|
|
757
770
|
key: 1,
|
|
758
771
|
"svg-title": e.chevronTitle
|
|
759
772
|
}, null, 8, ["svg-title"]))
|
|
@@ -761,22 +774,26 @@ function qt(e, t, i, s, n, o) {
|
|
|
761
774
|
])
|
|
762
775
|
]),
|
|
763
776
|
_: 1
|
|
764
|
-
}, 8, ["class", "tabindex", "aria-checked", "aria-disabled", "aria-expanded", "onClick", "onEnterPressed", "onSpacePressed"])),
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
777
|
+
}, 8, ["class", "tabindex", "aria-selected", "aria-checked", "aria-disabled", "aria-expanded", "aria-owns", "aria-labelledby", "onClick", "onEnterPressed", "onSpacePressed"])),
|
|
778
|
+
ce(z("div", {
|
|
779
|
+
id: e.categoryGroupId,
|
|
780
|
+
role: "group",
|
|
781
|
+
"aria-label": e.category.label
|
|
782
|
+
}, [
|
|
783
|
+
j(e.$slots, "default", {}, void 0, !0)
|
|
784
|
+
], 8, Ht), [
|
|
785
|
+
[we, e.showItemChildren]
|
|
769
786
|
])
|
|
770
787
|
]);
|
|
771
788
|
}
|
|
772
|
-
const
|
|
773
|
-
var
|
|
774
|
-
const
|
|
789
|
+
const Jt = /* @__PURE__ */ H(Kt, [["render", Xt], ["__scopeId", "data-v-f331aae2"]]);
|
|
790
|
+
var X = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", e.UNSELECT_CATEGORY = "unselect-category", e.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", e))(X || {});
|
|
791
|
+
const Zt = Z({
|
|
775
792
|
name: "listbox-multi-select-options",
|
|
776
793
|
components: {
|
|
777
|
-
BentoListboxOption:
|
|
778
|
-
BentoTypography:
|
|
779
|
-
ListboxMultiSelectCategory:
|
|
794
|
+
BentoListboxOption: Ee,
|
|
795
|
+
BentoTypography: de,
|
|
796
|
+
ListboxMultiSelectCategory: Jt,
|
|
780
797
|
ListboxDecorativeCheckbox: Ae
|
|
781
798
|
},
|
|
782
799
|
inheritAttrs: !1,
|
|
@@ -847,23 +864,23 @@ const Xt = J({
|
|
|
847
864
|
}
|
|
848
865
|
},
|
|
849
866
|
emits: [
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
867
|
+
X.TOGGLE_CHECKBOX_SELECTION,
|
|
868
|
+
X.SELECT_CATEGORY,
|
|
869
|
+
X.UNSELECT_CATEGORY,
|
|
870
|
+
X.TOGGLE_CATEGORY_VISIBILITY
|
|
854
871
|
],
|
|
855
872
|
setup(e, { emit: t }) {
|
|
856
|
-
const i = (
|
|
857
|
-
e.isOptionDisabled(
|
|
858
|
-
}, s = (
|
|
873
|
+
const i = (a) => {
|
|
874
|
+
e.isOptionDisabled(a) || t(X.TOGGLE_CHECKBOX_SELECTION, a);
|
|
875
|
+
}, s = (a) => !!a.items, r = (a) => {
|
|
859
876
|
const u = e.isMultiLevel && e.searching;
|
|
860
|
-
return
|
|
861
|
-
}, o = (
|
|
862
|
-
if (s(
|
|
863
|
-
const u = o(
|
|
864
|
-
t(u,
|
|
877
|
+
return a.description && (!e.isMultiLevel || u);
|
|
878
|
+
}, o = (a) => a.items ? !!a.items.find((u) => e.selectedItemsList.includes(u.value)) : e.selectedItemsList.includes(a.value), n = (a) => {
|
|
879
|
+
if (s(a)) {
|
|
880
|
+
const u = o(a) ? X.UNSELECT_CATEGORY : X.SELECT_CATEGORY;
|
|
881
|
+
t(u, a);
|
|
865
882
|
} else
|
|
866
|
-
i(
|
|
883
|
+
i(a);
|
|
867
884
|
};
|
|
868
885
|
return {
|
|
869
886
|
// Values
|
|
@@ -873,63 +890,64 @@ const Xt = J({
|
|
|
873
890
|
})),
|
|
874
891
|
// Methods
|
|
875
892
|
isOptionSelected: o,
|
|
876
|
-
shouldShowDescription:
|
|
893
|
+
shouldShowDescription: r,
|
|
877
894
|
toggleCheckboxSelection: i,
|
|
878
|
-
toggleSearchOption:
|
|
879
|
-
computedTabindex: (
|
|
895
|
+
toggleSearchOption: n,
|
|
896
|
+
computedTabindex: (a) => e.itemsIndex[a] === e.focusedIndex ? 0 : -1,
|
|
880
897
|
// Enums
|
|
881
898
|
BentoListboxEvent: g,
|
|
882
|
-
ListboxMultiSelectOptionsEvent:
|
|
899
|
+
ListboxMultiSelectOptionsEvent: X
|
|
883
900
|
};
|
|
884
901
|
}
|
|
885
|
-
}),
|
|
886
|
-
function
|
|
887
|
-
const
|
|
902
|
+
}), Qt = { class: "b-listbox-multi-select__option-text" }, es = { class: "b-listbox-multi-select__option-text" };
|
|
903
|
+
function ts(e, t, i, s, r, o) {
|
|
904
|
+
const n = L("listbox-decorative-checkbox"), p = L("bento-typography"), y = L("bento-listbox-option"), a = L("listbox-multi-select-options", !0), u = L("listbox-multi-select-category");
|
|
888
905
|
return v(), O("div", null, [
|
|
889
|
-
(v(!0), O(
|
|
906
|
+
(v(!0), O(le, null, q(e.items, (l) => (v(), O("div", {
|
|
890
907
|
key: `selected-${l.value}`
|
|
891
908
|
}, [
|
|
892
|
-
e.searching && e.isMultiLevel ? (v(),
|
|
909
|
+
e.searching && e.isMultiLevel ? (v(), R(y, {
|
|
893
910
|
key: 0,
|
|
894
|
-
class:
|
|
911
|
+
class: ge(["b-listbox-multi-select-options", e.conditionalClasses]),
|
|
895
912
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
896
913
|
tabindex: e.computedTabindex(l.value),
|
|
914
|
+
"aria-selected": `${e.isOptionSelected(l)}`,
|
|
897
915
|
"aria-checked": `${e.isOptionSelected(l)}`,
|
|
898
916
|
"aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
899
917
|
role: e.$attrs.role,
|
|
900
918
|
onClick: (f) => e.toggleSearchOption(l),
|
|
901
919
|
onEnterPressed: (f) => e.toggleSearchOption(l),
|
|
902
|
-
onSpacePressed:
|
|
920
|
+
onSpacePressed: re((f) => e.toggleSearchOption(l), ["prevent"])
|
|
903
921
|
}, {
|
|
904
922
|
default: A(() => [
|
|
905
|
-
|
|
923
|
+
G(n, {
|
|
906
924
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
907
925
|
checked: e.isOptionSelected(l)
|
|
908
926
|
}, null, 8, ["disabled", "checked"]),
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
927
|
+
j(e.$slots, "default", Y({ ref_for: !0 }, l), () => [
|
|
928
|
+
z("span", Qt, [
|
|
929
|
+
G(p, { el: "span" }, {
|
|
912
930
|
default: A(() => [
|
|
913
|
-
|
|
931
|
+
K(V(l.label), 1)
|
|
914
932
|
]),
|
|
915
933
|
_: 2
|
|
916
934
|
}, 1024),
|
|
917
|
-
e.shouldShowDescription(l) ? (v(),
|
|
935
|
+
e.shouldShowDescription(l) ? (v(), R(p, {
|
|
918
936
|
key: 0,
|
|
919
937
|
class: "b-listbox-multi-select__option-description",
|
|
920
938
|
el: "span"
|
|
921
939
|
}, {
|
|
922
940
|
default: A(() => [
|
|
923
|
-
|
|
941
|
+
K(V(l.description), 1)
|
|
924
942
|
]),
|
|
925
943
|
_: 2
|
|
926
|
-
}, 1024)) :
|
|
944
|
+
}, 1024)) : J("", !0)
|
|
927
945
|
])
|
|
928
946
|
], !0)
|
|
929
947
|
]),
|
|
930
948
|
_: 2
|
|
931
|
-
}, 1032, ["class", "disabled", "tabindex", "aria-checked", "aria-disabled", "role", "onClick", "onEnterPressed", "onSpacePressed"])) : (v(), O(
|
|
932
|
-
l.items ? (v(),
|
|
949
|
+
}, 1032, ["class", "disabled", "tabindex", "aria-selected", "aria-checked", "aria-disabled", "role", "onClick", "onEnterPressed", "onSpacePressed"])) : (v(), O(le, { key: 1 }, [
|
|
950
|
+
l.items ? (v(), R(u, {
|
|
933
951
|
key: 0,
|
|
934
952
|
category: l,
|
|
935
953
|
"static-categories": e.staticCategories,
|
|
@@ -941,7 +959,7 @@ function Qt(e, t, i, s, n, o) {
|
|
|
941
959
|
onToggleCategoryVisibility: t[1] || (t[1] = (f) => e.$emit(e.ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY, f))
|
|
942
960
|
}, {
|
|
943
961
|
default: A(() => [
|
|
944
|
-
|
|
962
|
+
G(a, {
|
|
945
963
|
"category-items": "",
|
|
946
964
|
items: l.items,
|
|
947
965
|
"is-option-disabled": e.isOptionDisabled,
|
|
@@ -956,63 +974,64 @@ function Qt(e, t, i, s, n, o) {
|
|
|
956
974
|
}, null, 8, ["items", "is-option-disabled", "items-index", "focused-index", "is-multi-level", "static-categories", "selected-items-list", "searching", "role"])
|
|
957
975
|
]),
|
|
958
976
|
_: 2
|
|
959
|
-
}, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "tabindex", "onSelectCategory", "onUnselectCategory"])) : (v(),
|
|
977
|
+
}, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "tabindex", "onSelectCategory", "onUnselectCategory"])) : (v(), R(y, {
|
|
960
978
|
key: 1,
|
|
961
|
-
class:
|
|
979
|
+
class: ge(["b-listbox-multi-select-options", e.conditionalClasses]),
|
|
962
980
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
963
981
|
tabindex: e.computedTabindex(l.value),
|
|
982
|
+
"aria-selected": `${e.isOptionSelected(l)}`,
|
|
964
983
|
"aria-checked": `${e.isOptionSelected(l)}`,
|
|
965
984
|
"aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
966
985
|
role: e.$attrs.role,
|
|
967
986
|
onClick: (f) => e.toggleCheckboxSelection(l),
|
|
968
987
|
onEnterPressed: (f) => e.toggleCheckboxSelection(l),
|
|
969
|
-
onSpacePressed:
|
|
988
|
+
onSpacePressed: re((f) => e.toggleCheckboxSelection(l), ["prevent"])
|
|
970
989
|
}, {
|
|
971
990
|
default: A(() => [
|
|
972
|
-
|
|
991
|
+
G(n, {
|
|
973
992
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
974
993
|
checked: e.isOptionSelected(l)
|
|
975
994
|
}, null, 8, ["disabled", "checked"]),
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
995
|
+
j(e.$slots, "default", Y({ ref_for: !0 }, l), () => [
|
|
996
|
+
z("span", es, [
|
|
997
|
+
G(p, { el: "span" }, {
|
|
979
998
|
default: A(() => [
|
|
980
|
-
|
|
999
|
+
K(V(l.label), 1)
|
|
981
1000
|
]),
|
|
982
1001
|
_: 2
|
|
983
1002
|
}, 1024),
|
|
984
|
-
e.shouldShowDescription(l) ? (v(),
|
|
1003
|
+
e.shouldShowDescription(l) ? (v(), R(p, {
|
|
985
1004
|
key: 0,
|
|
986
1005
|
class: "b-listbox-multi-select__option-description",
|
|
987
1006
|
el: "span"
|
|
988
1007
|
}, {
|
|
989
1008
|
default: A(() => [
|
|
990
|
-
|
|
1009
|
+
K(V(l.description), 1)
|
|
991
1010
|
]),
|
|
992
1011
|
_: 2
|
|
993
|
-
}, 1024)) :
|
|
1012
|
+
}, 1024)) : J("", !0)
|
|
994
1013
|
])
|
|
995
1014
|
], !0)
|
|
996
1015
|
]),
|
|
997
1016
|
_: 2
|
|
998
|
-
}, 1032, ["class", "disabled", "tabindex", "aria-checked", "aria-disabled", "role", "onClick", "onEnterPressed", "onSpacePressed"]))
|
|
1017
|
+
}, 1032, ["class", "disabled", "tabindex", "aria-selected", "aria-checked", "aria-disabled", "role", "onClick", "onEnterPressed", "onSpacePressed"]))
|
|
999
1018
|
], 64))
|
|
1000
1019
|
]))), 128))
|
|
1001
1020
|
]);
|
|
1002
1021
|
}
|
|
1003
|
-
const
|
|
1022
|
+
const ss = /* @__PURE__ */ H(Zt, [["render", ts], ["__scopeId", "data-v-fd1a6cbe"]]), ls = (e) => {
|
|
1004
1023
|
const t = m(() => {
|
|
1005
1024
|
var s;
|
|
1006
|
-
return !!((s = e.value) != null && s.find(({ items:
|
|
1025
|
+
return !!((s = e.value) != null && s.find(({ items: r }) => !!r));
|
|
1007
1026
|
}), i = m(() => {
|
|
1008
1027
|
var s;
|
|
1009
|
-
return t.value ? (s = e.value) == null ? void 0 : s.reduce((
|
|
1028
|
+
return t.value ? (s = e.value) == null ? void 0 : s.reduce((r, o) => (o.items ? r.push(...o.items.flat()) : r.push(o), r), []) : e.value;
|
|
1010
1029
|
});
|
|
1011
1030
|
return {
|
|
1012
1031
|
isMultiLevelSelect: t,
|
|
1013
1032
|
flattenedItemsList: i
|
|
1014
1033
|
};
|
|
1015
|
-
},
|
|
1034
|
+
}, We = {
|
|
1016
1035
|
"en-US": {
|
|
1017
1036
|
allSelected: "All selected ({total})",
|
|
1018
1037
|
numberOfTotalSelected: "{number} of {total} selected",
|
|
@@ -1031,12 +1050,12 @@ const es = /* @__PURE__ */ q(Xt, [["render", Qt], ["__scopeId", "data-v-c82ac201
|
|
|
1031
1050
|
numbersSelected: "{number} selecionados",
|
|
1032
1051
|
selectAll: "Selecionar todos ({total})"
|
|
1033
1052
|
}
|
|
1034
|
-
},
|
|
1053
|
+
}, os = { key: 0 }, is = ["role"], ns = {
|
|
1035
1054
|
key: 1,
|
|
1036
1055
|
class: "b-listbox-multi-select__divider",
|
|
1037
1056
|
"aria-hidden": "true"
|
|
1038
|
-
},
|
|
1039
|
-
...
|
|
1057
|
+
}, as = { i18n: { messages: We } }, rs = /* @__PURE__ */ Z({
|
|
1058
|
+
...as,
|
|
1040
1059
|
__name: "listbox-multi-select",
|
|
1041
1060
|
props: {
|
|
1042
1061
|
hasMoreItems: { type: Boolean, default: !1 },
|
|
@@ -1049,136 +1068,136 @@ const es = /* @__PURE__ */ q(Xt, [["render", Qt], ["__scopeId", "data-v-c82ac201
|
|
|
1049
1068
|
},
|
|
1050
1069
|
emits: ["select"],
|
|
1051
1070
|
setup(e, { expose: t, emit: i }) {
|
|
1052
|
-
const s = e,
|
|
1071
|
+
const s = e, r = i, { t: o, n } = Ie({ messages: We }), p = ut(), y = bt(), a = m(
|
|
1053
1072
|
() => {
|
|
1054
1073
|
var c, b, d, h;
|
|
1055
1074
|
return {
|
|
1056
|
-
"aria-label": (c =
|
|
1057
|
-
"aria-busy": (b =
|
|
1058
|
-
"aria-atomic": (d =
|
|
1059
|
-
"aria-live": (h =
|
|
1075
|
+
"aria-label": (c = y["aria-label"]) == null ? void 0 : c.toString(),
|
|
1076
|
+
"aria-busy": (b = y["aria-busy"]) == null ? void 0 : b.toString(),
|
|
1077
|
+
"aria-atomic": (d = y["aria-atomic"]) == null ? void 0 : d.toString(),
|
|
1078
|
+
"aria-live": (h = y["aria-live"]) == null ? void 0 : h.toString(),
|
|
1060
1079
|
"aria-multiselectable": !0
|
|
1061
1080
|
};
|
|
1062
1081
|
}
|
|
1063
|
-
), u =
|
|
1082
|
+
), u = k(null), l = k(null), f = k(null), E = k(null), T = m(() => s.selectedValues.map(({ value: c }) => c)), { isMultiLevelSelect: $, flattenedItemsList: P } = ls(fe(s, "items")), D = m(() => $.value && !s.staticCategories), B = m(() => D.value ? "tree" : "listbox"), I = m(() => D.value ? "treeitem" : "option"), S = (c) => {
|
|
1064
1083
|
var h;
|
|
1065
1084
|
const b = s.isOptionDisabled(c), d = ((h = T.value) == null ? void 0 : h.includes(c.value)) || !1;
|
|
1066
1085
|
return { isDisabled: b, isPreSelected: d };
|
|
1067
1086
|
}, _ = m(() => {
|
|
1068
|
-
if (s.searching &&
|
|
1087
|
+
if (s.searching && $)
|
|
1069
1088
|
return s.items;
|
|
1070
|
-
const c =
|
|
1071
|
-
const { isDisabled: d, isPreSelected: h } =
|
|
1089
|
+
const c = P.value.filter((b) => {
|
|
1090
|
+
const { isDisabled: d, isPreSelected: h } = S(b);
|
|
1072
1091
|
return d && h || !d;
|
|
1073
1092
|
});
|
|
1074
1093
|
return s.selectedValues.forEach((b) => {
|
|
1075
1094
|
c.find((d) => d.value === b.value) || c.push(b);
|
|
1076
1095
|
}), c;
|
|
1077
|
-
}),
|
|
1096
|
+
}), w = m(
|
|
1078
1097
|
() => {
|
|
1079
1098
|
var c;
|
|
1080
1099
|
return (c = _.value) == null ? void 0 : c.filter((b) => {
|
|
1081
1100
|
var d;
|
|
1082
|
-
return b.items &&
|
|
1101
|
+
return b.items && $.value && s.searching ? b.items.filter(
|
|
1083
1102
|
(C) => (s.selectedValues ?? []).includes(C.value)
|
|
1084
1103
|
).length === b.items.length : (d = T.value) == null ? void 0 : d.includes(b.value);
|
|
1085
1104
|
});
|
|
1086
1105
|
}
|
|
1087
|
-
),
|
|
1106
|
+
), Q = () => $.value && !s.searching ? P.value.length : s.items.length, N = m(() => {
|
|
1088
1107
|
var h;
|
|
1089
|
-
const c = _.value.length, b =
|
|
1090
|
-
return d === 0 ? o("selectAll", { total:
|
|
1091
|
-
}),
|
|
1108
|
+
const c = _.value.length, b = Q(), d = ((h = w.value) == null ? void 0 : h.length) || 0;
|
|
1109
|
+
return d === 0 ? o("selectAll", { total: n(c) }) : d === b ? o("allSelected", { total: n(b) }) : d <= b ? o("numberOfTotalSelected", { number: n(d), total: n(b) }) : o("numbersSelected", { number: n(d) });
|
|
1110
|
+
}), U = (c) => {
|
|
1092
1111
|
const b = (h) => {
|
|
1093
|
-
const { isDisabled: C, isPreSelected:
|
|
1094
|
-
return C &&
|
|
1112
|
+
const { isDisabled: C, isPreSelected: ee } = S(h);
|
|
1113
|
+
return C && ee || !C;
|
|
1095
1114
|
}, d = c.filter(b).filter((h) => !T.value.includes(h.value));
|
|
1096
|
-
|
|
1097
|
-
},
|
|
1115
|
+
r("select", [...s.selectedValues, ...d]);
|
|
1116
|
+
}, W = (c) => {
|
|
1098
1117
|
const b = (C) => {
|
|
1099
|
-
const { isDisabled:
|
|
1100
|
-
return !(
|
|
1118
|
+
const { isDisabled: ee, isPreSelected: rt } = S(C);
|
|
1119
|
+
return !(ee && rt);
|
|
1101
1120
|
}, d = c.filter(b).map(({ value: C }) => C), h = s.selectedValues.filter((C) => !(d != null && d.includes(C.value)));
|
|
1102
|
-
|
|
1103
|
-
},
|
|
1104
|
-
|
|
1121
|
+
r("select", h);
|
|
1122
|
+
}, oe = () => {
|
|
1123
|
+
U(P.value);
|
|
1105
1124
|
}, Oe = () => {
|
|
1106
|
-
|
|
1107
|
-
}, { isAllSelected:
|
|
1108
|
-
|
|
1125
|
+
W(P.value);
|
|
1126
|
+
}, { isAllSelected: M, isIndeterminate: ie, toggleSelectAll: je } = ze(
|
|
1127
|
+
w,
|
|
1109
1128
|
_,
|
|
1110
|
-
|
|
1129
|
+
oe,
|
|
1111
1130
|
Oe
|
|
1112
|
-
),
|
|
1113
|
-
|
|
1131
|
+
), ke = m(() => ie.value ? "mixed" : `${M.value}`), Se = k(M.value), Te = () => {
|
|
1132
|
+
Se.value = !Se.value, je(Se.value);
|
|
1114
1133
|
};
|
|
1115
|
-
|
|
1116
|
-
|
|
1134
|
+
ye(M, () => {
|
|
1135
|
+
Se.value = M.value;
|
|
1117
1136
|
});
|
|
1118
|
-
const
|
|
1119
|
-
|
|
1120
|
-
},
|
|
1121
|
-
|
|
1122
|
-
},
|
|
1137
|
+
const qe = (c) => {
|
|
1138
|
+
U(c.items);
|
|
1139
|
+
}, Le = (c) => {
|
|
1140
|
+
W(c.items);
|
|
1141
|
+
}, ue = (c, b) => {
|
|
1123
1142
|
let d = !1;
|
|
1124
1143
|
const h = s.selectedValues.filter(({ value: C }) => b.value === C ? (d = !0, !1) : !0);
|
|
1125
|
-
d || h.push(b),
|
|
1126
|
-
},
|
|
1127
|
-
if (
|
|
1144
|
+
d || h.push(b), r(c, h);
|
|
1145
|
+
}, He = m(() => {
|
|
1146
|
+
if (!$.value)
|
|
1128
1147
|
return s.selectedValues;
|
|
1129
|
-
const c = (C) => T.value.includes(C.value), b = (C) => !s.staticCategories && C.every((
|
|
1148
|
+
const c = (C) => T.value.includes(C.value), b = (C) => !s.staticCategories && C.every((ee) => c(ee));
|
|
1130
1149
|
return s.items.flatMap(
|
|
1131
1150
|
(C) => C.items && !b(C.items) ? C.items : C
|
|
1132
1151
|
).filter((C) => C.items ? !0 : c(C));
|
|
1133
|
-
}),
|
|
1134
|
-
var d, h, C,
|
|
1135
|
-
const c = ["automatic", "button"].includes(s.lazyLoadType), b = ((d = s.selectedValues) == null ? void 0 : d.length) > 0 && ((h =
|
|
1136
|
-
return c && s.hasMoreItems ? !!((
|
|
1137
|
-
}),
|
|
1152
|
+
}), Xe = m(() => {
|
|
1153
|
+
var d, h, C, ee;
|
|
1154
|
+
const c = ["automatic", "button"].includes(s.lazyLoadType), b = ((d = s.selectedValues) == null ? void 0 : d.length) > 0 && ((h = w.value) == null ? void 0 : h.length) !== ((C = P.value) == null ? void 0 : C.length);
|
|
1155
|
+
return c && s.hasMoreItems ? !!((ee = s.selectedValues) != null && ee.length) : b;
|
|
1156
|
+
}), $e = m(() => ["automatic", "button"].includes(s.lazyLoadType) ? !s.hasMoreItems : !0), be = k([]), { visibleDomOptions: De, updateVisibleDomOptions: Je } = Fe(
|
|
1138
1157
|
u,
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
),
|
|
1142
|
-
|
|
1143
|
-
|
|
1158
|
+
fe(s, "items"),
|
|
1159
|
+
I
|
|
1160
|
+
), Ze = (c) => {
|
|
1161
|
+
be.value.includes(c) ? be.value = be.value.filter((b) => b !== c) : be.value.push(c), Ye(() => {
|
|
1162
|
+
Je();
|
|
1144
1163
|
});
|
|
1145
|
-
},
|
|
1164
|
+
}, Qe = (c) => {
|
|
1146
1165
|
var b;
|
|
1147
|
-
(b =
|
|
1166
|
+
(b = De.value[c]) == null || b.focus();
|
|
1148
1167
|
}, {
|
|
1149
|
-
moveToNextElement:
|
|
1150
|
-
moveToPreviousElement:
|
|
1151
|
-
moveToFirstElement:
|
|
1152
|
-
moveToLastElement:
|
|
1153
|
-
preventDefault:
|
|
1154
|
-
focusedIndex:
|
|
1155
|
-
setListboxFocusedIndex:
|
|
1156
|
-
} =
|
|
1168
|
+
moveToNextElement: et,
|
|
1169
|
+
moveToPreviousElement: tt,
|
|
1170
|
+
moveToFirstElement: st,
|
|
1171
|
+
moveToLastElement: lt,
|
|
1172
|
+
preventDefault: Be,
|
|
1173
|
+
focusedIndex: Re,
|
|
1174
|
+
setListboxFocusedIndex: ot
|
|
1175
|
+
} = Ve(
|
|
1157
1176
|
{
|
|
1158
|
-
items:
|
|
1177
|
+
items: De
|
|
1159
1178
|
},
|
|
1160
|
-
|
|
1161
|
-
),
|
|
1162
|
-
[
|
|
1163
|
-
[
|
|
1164
|
-
[
|
|
1165
|
-
[
|
|
1179
|
+
Qe
|
|
1180
|
+
), it = {
|
|
1181
|
+
[F.ARROW_UP]: (c) => tt(c),
|
|
1182
|
+
[F.ARROW_DOWN]: (c) => et(c),
|
|
1183
|
+
[F.HOME]: st,
|
|
1184
|
+
[F.END]: lt
|
|
1166
1185
|
};
|
|
1167
1186
|
t({
|
|
1168
1187
|
/**
|
|
1169
1188
|
* Method to set the index of the item to be focused on
|
|
1170
1189
|
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
1171
1190
|
*/
|
|
1172
|
-
setListboxFocusedIndex:
|
|
1191
|
+
setListboxFocusedIndex: ot
|
|
1173
1192
|
});
|
|
1174
|
-
const
|
|
1175
|
-
[
|
|
1176
|
-
[
|
|
1177
|
-
},
|
|
1193
|
+
const nt = {
|
|
1194
|
+
[F.ARROW_UP]: Be,
|
|
1195
|
+
[F.ARROW_DOWN]: Be
|
|
1196
|
+
}, at = m(() => {
|
|
1178
1197
|
let c = 1;
|
|
1179
1198
|
const b = {};
|
|
1180
1199
|
return s.items.forEach((d) => {
|
|
1181
|
-
let h =
|
|
1200
|
+
let h = be.value.includes(d.value);
|
|
1182
1201
|
d.items ? (s.staticCategories ? h = !0 : b[d.value] = c++, h && d.items.forEach((C) => b[C.value] = c++)) : b[d.value] = c++;
|
|
1183
1202
|
}), b;
|
|
1184
1203
|
});
|
|
@@ -1187,90 +1206,91 @@ const es = /* @__PURE__ */ q(Xt, [["render", Qt], ["__scopeId", "data-v-c82ac201
|
|
|
1187
1206
|
ref: u,
|
|
1188
1207
|
class: "b-listbox-multi-select"
|
|
1189
1208
|
}, [
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
(v(!0), O(
|
|
1209
|
+
Xe.value ? (v(), O("div", os, [
|
|
1210
|
+
ce((v(), O("ul", Y({ class: "b-listbox-multi-select__chips" }, se(nt, !0)), [
|
|
1211
|
+
(v(!0), O(le, null, q(He.value, (d) => (v(), O("li", {
|
|
1193
1212
|
key: d.value
|
|
1194
1213
|
}, [
|
|
1195
|
-
|
|
1214
|
+
G(x(pt), {
|
|
1196
1215
|
ref_for: !0,
|
|
1197
1216
|
ref_key: "selectedListboxItemsRef",
|
|
1198
1217
|
ref: f,
|
|
1199
1218
|
disabled: c.isOptionDisabled(d),
|
|
1200
1219
|
label: d.label,
|
|
1201
1220
|
condensed: "",
|
|
1202
|
-
onClick: (h) => d.items ?
|
|
1221
|
+
onClick: (h) => d.items ? Le(d) : ue("select", d)
|
|
1203
1222
|
}, null, 8, ["disabled", "label", "onClick"])
|
|
1204
1223
|
]))), 128))
|
|
1205
1224
|
], 16)), [
|
|
1206
|
-
[x(
|
|
1225
|
+
[x(Ce)]
|
|
1207
1226
|
]),
|
|
1208
|
-
b[4] || (b[4] =
|
|
1227
|
+
b[4] || (b[4] = z("hr", {
|
|
1209
1228
|
class: "b-listbox-multi-select__divider",
|
|
1210
1229
|
"aria-hidden": "true"
|
|
1211
1230
|
}, null, -1))
|
|
1212
|
-
])) :
|
|
1213
|
-
|
|
1214
|
-
|
|
1231
|
+
])) : J("", !0),
|
|
1232
|
+
ce((v(), O("div", Y(a.value, { role: B.value }, se(it, !0)), [
|
|
1233
|
+
$e.value ? (v(), R(x(Ee), {
|
|
1215
1234
|
key: 0,
|
|
1216
1235
|
ref_key: "selectAllListboxItemsRef",
|
|
1217
1236
|
ref: l,
|
|
1218
1237
|
class: "b-listbox-multi-select__option",
|
|
1219
|
-
tabindex: x(
|
|
1220
|
-
"aria-
|
|
1221
|
-
|
|
1238
|
+
tabindex: x(Re) === 0 ? 0 : -1,
|
|
1239
|
+
"aria-selected": ke.value !== "false",
|
|
1240
|
+
"aria-checked": ke.value,
|
|
1241
|
+
role: I.value,
|
|
1222
1242
|
onClick: Te,
|
|
1223
1243
|
onEnterPressed: Te,
|
|
1224
|
-
onSpacePressed:
|
|
1244
|
+
onSpacePressed: re(Te, ["prevent"])
|
|
1225
1245
|
}, {
|
|
1226
1246
|
default: A(() => [
|
|
1227
|
-
|
|
1228
|
-
checked: x(
|
|
1229
|
-
indeterminate: x(
|
|
1247
|
+
G(x(Ae), {
|
|
1248
|
+
checked: x(M),
|
|
1249
|
+
indeterminate: x(ie)
|
|
1230
1250
|
}, null, 8, ["checked", "indeterminate"]),
|
|
1231
|
-
|
|
1251
|
+
G(x(de), { el: "span" }, {
|
|
1232
1252
|
default: A(() => [
|
|
1233
|
-
|
|
1253
|
+
K(V(N.value), 1)
|
|
1234
1254
|
]),
|
|
1235
1255
|
_: 1
|
|
1236
1256
|
})
|
|
1237
1257
|
]),
|
|
1238
1258
|
_: 1
|
|
1239
|
-
}, 8, ["tabindex", "aria-checked", "role"])) :
|
|
1240
|
-
|
|
1241
|
-
|
|
1259
|
+
}, 8, ["tabindex", "aria-selected", "aria-checked", "role"])) : J("", !0),
|
|
1260
|
+
$e.value ? (v(), O("hr", ns)) : J("", !0),
|
|
1261
|
+
G(x(ss), {
|
|
1242
1262
|
ref_key: "listboxItemsRef",
|
|
1243
1263
|
ref: E,
|
|
1244
1264
|
items: c.items,
|
|
1245
1265
|
"is-option-disabled": c.isOptionDisabled,
|
|
1246
|
-
"is-multi-level": x(
|
|
1266
|
+
"is-multi-level": x($),
|
|
1247
1267
|
"static-categories": c.staticCategories,
|
|
1248
1268
|
searching: c.searching,
|
|
1249
1269
|
"selected-items-list": T.value,
|
|
1250
|
-
"focused-index": x(
|
|
1251
|
-
"items-index":
|
|
1252
|
-
role:
|
|
1253
|
-
onToggleCheckboxSelection: b[0] || (b[0] = (d) =>
|
|
1254
|
-
onSelectCategory:
|
|
1255
|
-
onUnselectCategory:
|
|
1256
|
-
onToggleCategoryVisibility:
|
|
1257
|
-
onSpacePressed: b[1] || (b[1] = (d) =>
|
|
1258
|
-
onTabPressed: b[2] || (b[2] = (d) =>
|
|
1259
|
-
onEnterPressed: b[3] || (b[3] = (d) =>
|
|
1260
|
-
},
|
|
1261
|
-
|
|
1270
|
+
"focused-index": x(Re),
|
|
1271
|
+
"items-index": at.value,
|
|
1272
|
+
role: I.value,
|
|
1273
|
+
onToggleCheckboxSelection: b[0] || (b[0] = (d) => ue("select", d)),
|
|
1274
|
+
onSelectCategory: qe,
|
|
1275
|
+
onUnselectCategory: Le,
|
|
1276
|
+
onToggleCategoryVisibility: Ze,
|
|
1277
|
+
onSpacePressed: b[1] || (b[1] = (d) => ue(x(g).SPACE, d)),
|
|
1278
|
+
onTabPressed: b[2] || (b[2] = (d) => ue(x(g).TAB, d)),
|
|
1279
|
+
onEnterPressed: b[3] || (b[3] = (d) => ue(x(g).ENTER, d))
|
|
1280
|
+
}, pe({ _: 2 }, [
|
|
1281
|
+
q(x(p), (d, h) => ({
|
|
1262
1282
|
name: h,
|
|
1263
1283
|
fn: A((C) => [
|
|
1264
|
-
|
|
1284
|
+
j(c.$slots, h, ae(ve(C)), void 0, !0)
|
|
1265
1285
|
])
|
|
1266
1286
|
}))
|
|
1267
1287
|
]), 1032, ["items", "is-option-disabled", "is-multi-level", "static-categories", "searching", "selected-items-list", "focused-index", "items-index", "role"])
|
|
1268
|
-
], 16,
|
|
1269
|
-
[x(
|
|
1288
|
+
], 16, is)), [
|
|
1289
|
+
[x(Ce)]
|
|
1270
1290
|
])
|
|
1271
1291
|
], 512));
|
|
1272
1292
|
}
|
|
1273
|
-
}),
|
|
1293
|
+
}), xe = /* @__PURE__ */ H(rs, [["__scopeId", "data-v-dc031d72"]]), Ge = {
|
|
1274
1294
|
"en-US": {
|
|
1275
1295
|
loading: "Loading",
|
|
1276
1296
|
showMore: "Show more"
|
|
@@ -1283,18 +1303,18 @@ const es = /* @__PURE__ */ q(Xt, [["render", Qt], ["__scopeId", "data-v-c82ac201
|
|
|
1283
1303
|
loading: "Carregando",
|
|
1284
1304
|
showMore: "Mostrar mais"
|
|
1285
1305
|
}
|
|
1286
|
-
},
|
|
1306
|
+
}, cs = 36, ds = Z({
|
|
1287
1307
|
name: "bento-listbox",
|
|
1288
1308
|
components: {
|
|
1289
|
-
BentoEmptyState:
|
|
1290
|
-
BentoListboxSingleSelect:
|
|
1291
|
-
BentoListboxMultiSelect:
|
|
1292
|
-
BentoTypography:
|
|
1293
|
-
BentoLoadingIndicator:
|
|
1294
|
-
BentoLoadingButton:
|
|
1309
|
+
BentoEmptyState: vt,
|
|
1310
|
+
BentoListboxSingleSelect: Ut,
|
|
1311
|
+
BentoListboxMultiSelect: xe,
|
|
1312
|
+
BentoTypography: de,
|
|
1313
|
+
BentoLoadingIndicator: mt,
|
|
1314
|
+
BentoLoadingButton: Ct
|
|
1295
1315
|
},
|
|
1296
|
-
directives: { BentoKeyboardNavigationDirective:
|
|
1297
|
-
i18n: { messages:
|
|
1316
|
+
directives: { BentoKeyboardNavigationDirective: Ce },
|
|
1317
|
+
i18n: { messages: Ge },
|
|
1298
1318
|
props: {
|
|
1299
1319
|
/**
|
|
1300
1320
|
* Defines a string value that labels an interactive element.
|
|
@@ -1350,8 +1370,8 @@ const es = /* @__PURE__ */ q(Xt, [["render", Qt], ["__scopeId", "data-v-c82ac201
|
|
|
1350
1370
|
*/
|
|
1351
1371
|
lazyLoadType: {
|
|
1352
1372
|
type: String,
|
|
1353
|
-
default:
|
|
1354
|
-
validator: (e) => Object.values(
|
|
1373
|
+
default: ne.NONE,
|
|
1374
|
+
validator: (e) => Object.values(ne).includes(e)
|
|
1355
1375
|
},
|
|
1356
1376
|
/**
|
|
1357
1377
|
* Indicates the listbox is loading filtered items.
|
|
@@ -1375,7 +1395,7 @@ const es = /* @__PURE__ */ q(Xt, [["render", Qt], ["__scopeId", "data-v-c82ac201
|
|
|
1375
1395
|
*
|
|
1376
1396
|
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
1377
1397
|
*/
|
|
1378
|
-
searching:
|
|
1398
|
+
searching: xe.props.searching,
|
|
1379
1399
|
/**
|
|
1380
1400
|
* The `input` value.
|
|
1381
1401
|
* Providing an empty string or empty array will select no options.
|
|
@@ -1403,109 +1423,109 @@ const es = /* @__PURE__ */ q(Xt, [["render", Qt], ["__scopeId", "data-v-c82ac201
|
|
|
1403
1423
|
g.TAB
|
|
1404
1424
|
],
|
|
1405
1425
|
setup(e, { emit: t, slots: i }) {
|
|
1406
|
-
const s =
|
|
1407
|
-
var
|
|
1408
|
-
return typeof (e == null ? void 0 : e.virtualScroll) == "object" && ((
|
|
1426
|
+
const s = k([]), r = fe(e, "items"), { t: o } = Ie({ messages: Ge }), n = m(() => e.lazyLoadType !== ne.AUTOMATIC), p = m(() => e.lazyLoadType === ne.AUTOMATIC), y = () => {
|
|
1427
|
+
var M;
|
|
1428
|
+
return typeof (e == null ? void 0 : e.virtualScroll) == "object" && ((M = e == null ? void 0 : e.virtualScroll) != null && M.itemHeight) ? e.virtualScroll.itemHeight : cs;
|
|
1409
1429
|
}, {
|
|
1410
|
-
containerRef:
|
|
1430
|
+
containerRef: a,
|
|
1411
1431
|
containerProps: u,
|
|
1412
1432
|
onScroll: l,
|
|
1413
1433
|
list: f,
|
|
1414
1434
|
wrapperProps: E
|
|
1415
|
-
} =
|
|
1416
|
-
itemHeight:
|
|
1435
|
+
} = Ot(r, {
|
|
1436
|
+
itemHeight: y(),
|
|
1417
1437
|
// Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
|
|
1418
1438
|
disabled: (e == null ? void 0 : e.multiple) || (e == null ? void 0 : e.virtualScroll) === !1 || (e == null ? void 0 : e.lazyLoadType) !== "none"
|
|
1419
1439
|
}), T = m(
|
|
1420
|
-
() => e.componentLoading !== void 0 ||
|
|
1421
|
-
),
|
|
1422
|
-
() =>
|
|
1423
|
-
),
|
|
1424
|
-
() =>
|
|
1425
|
-
),
|
|
1440
|
+
() => e.componentLoading !== void 0 || n.value ? "true" : void 0
|
|
1441
|
+
), $ = m(
|
|
1442
|
+
() => n.value && e.loading || e.componentLoading ? "true" : "false"
|
|
1443
|
+
), P = m(
|
|
1444
|
+
() => n.value || e.componentLoading !== void 0 ? "polite" : void 0
|
|
1445
|
+
), D = m(
|
|
1426
1446
|
() => ({
|
|
1427
1447
|
"aria-label": e.ariaLabel,
|
|
1428
|
-
"aria-busy":
|
|
1448
|
+
"aria-busy": $.value,
|
|
1429
1449
|
"aria-atomic": T.value,
|
|
1430
|
-
"aria-live":
|
|
1450
|
+
"aria-live": P.value
|
|
1431
1451
|
})
|
|
1432
|
-
),
|
|
1452
|
+
), B = m(
|
|
1433
1453
|
() => e.componentLoading ? {
|
|
1434
|
-
...
|
|
1454
|
+
...D.value,
|
|
1435
1455
|
role: "alert"
|
|
1436
1456
|
} : {}
|
|
1437
|
-
),
|
|
1438
|
-
t(
|
|
1439
|
-
},
|
|
1457
|
+
), I = (M) => (ie) => {
|
|
1458
|
+
t(M, ie);
|
|
1459
|
+
}, S = () => {
|
|
1440
1460
|
t(g.SHOW_MORE);
|
|
1441
|
-
}, _ =
|
|
1442
|
-
const
|
|
1443
|
-
if (!
|
|
1461
|
+
}, _ = ft(() => {
|
|
1462
|
+
const M = a.value;
|
|
1463
|
+
if (!M)
|
|
1444
1464
|
return;
|
|
1445
|
-
const
|
|
1446
|
-
e.hasMoreItems &&
|
|
1447
|
-
}),
|
|
1465
|
+
const ie = Math.round(M.scrollTop) + M.clientHeight >= M.scrollHeight;
|
|
1466
|
+
e.hasMoreItems && ie && !e.loading && S();
|
|
1467
|
+
}), w = () => {
|
|
1448
1468
|
p.value ? _() : l();
|
|
1449
|
-
},
|
|
1450
|
-
var
|
|
1451
|
-
return ((
|
|
1452
|
-
}),
|
|
1453
|
-
() => e.lazyLoadType ===
|
|
1454
|
-
),
|
|
1455
|
-
() => e.loading ?
|
|
1456
|
-
),
|
|
1469
|
+
}, Q = m(() => {
|
|
1470
|
+
var M;
|
|
1471
|
+
return ((M = e.items) == null ? void 0 : M.length) === 0;
|
|
1472
|
+
}), N = m(
|
|
1473
|
+
() => e.lazyLoadType === ne.BUTTON && e.hasMoreItems
|
|
1474
|
+
), U = m(
|
|
1475
|
+
() => e.loading ? Pe.LOADING : Pe.START
|
|
1476
|
+
), W = m(() => e.loading ? o("loading") : o("showMore")), oe = m(() => ({
|
|
1457
1477
|
...e.emptyState,
|
|
1458
1478
|
variant: "condensed"
|
|
1459
1479
|
})), Oe = {
|
|
1460
|
-
[g.SELECT]:
|
|
1461
|
-
[g.SPACE]:
|
|
1462
|
-
[g.TAB]:
|
|
1463
|
-
[g.ENTER]:
|
|
1480
|
+
[g.SELECT]: I(g.SELECT),
|
|
1481
|
+
[g.SPACE]: I(g.SPACE),
|
|
1482
|
+
[g.TAB]: I(g.TAB),
|
|
1483
|
+
[g.ENTER]: I(g.ENTER)
|
|
1464
1484
|
};
|
|
1465
1485
|
return {
|
|
1466
1486
|
// Refs
|
|
1467
|
-
listboxRef:
|
|
1487
|
+
listboxRef: a,
|
|
1468
1488
|
listboxItemRef: s,
|
|
1469
1489
|
// a11y
|
|
1470
|
-
ariaAttributes:
|
|
1471
|
-
listboxContainerAttributes:
|
|
1490
|
+
ariaAttributes: D,
|
|
1491
|
+
listboxContainerAttributes: B,
|
|
1472
1492
|
// Values
|
|
1473
1493
|
containerProps: u,
|
|
1474
|
-
isSearchResultEmpty:
|
|
1475
|
-
limitedEmptyStateProps:
|
|
1476
|
-
loadingButtonState:
|
|
1494
|
+
isSearchResultEmpty: Q,
|
|
1495
|
+
limitedEmptyStateProps: oe,
|
|
1496
|
+
loadingButtonState: U,
|
|
1477
1497
|
slots: i,
|
|
1478
|
-
shouldDisplayShowMoreButton:
|
|
1479
|
-
showMoreButtonText:
|
|
1498
|
+
shouldDisplayShowMoreButton: N,
|
|
1499
|
+
showMoreButtonText: W,
|
|
1480
1500
|
virtualisedItems: f,
|
|
1481
1501
|
wrapperProps: E,
|
|
1482
1502
|
// Enums
|
|
1483
|
-
BentoKeyboardNavigationKeyDownEvent:
|
|
1503
|
+
BentoKeyboardNavigationKeyDownEvent: F,
|
|
1484
1504
|
BentoListboxEvent: g,
|
|
1485
1505
|
// Methods
|
|
1486
|
-
onListboxContainerScroll:
|
|
1487
|
-
onOptionSelected:
|
|
1488
|
-
emitShowMore:
|
|
1506
|
+
onListboxContainerScroll: w,
|
|
1507
|
+
onOptionSelected: I,
|
|
1508
|
+
emitShowMore: S,
|
|
1489
1509
|
listboxListeners: Oe
|
|
1490
1510
|
};
|
|
1491
1511
|
}
|
|
1492
|
-
}),
|
|
1512
|
+
}), us = ["id"], bs = {
|
|
1493
1513
|
key: 0,
|
|
1494
1514
|
class: "b-listbox__loading-filtered-items"
|
|
1495
|
-
},
|
|
1515
|
+
}, ms = {
|
|
1496
1516
|
key: 1,
|
|
1497
1517
|
class: "b-listbox__empty-search-message"
|
|
1498
|
-
},
|
|
1518
|
+
}, vs = {
|
|
1499
1519
|
key: 2,
|
|
1500
1520
|
class: "b-listbox__lazy-load"
|
|
1501
|
-
},
|
|
1521
|
+
}, fs = {
|
|
1502
1522
|
key: 3,
|
|
1503
1523
|
class: "b-listbox__lazy-load"
|
|
1504
1524
|
};
|
|
1505
|
-
function
|
|
1525
|
+
function ps(e, t, i, s, r, o) {
|
|
1506
1526
|
var E;
|
|
1507
|
-
const
|
|
1508
|
-
return
|
|
1527
|
+
const n = L("bento-loading-indicator"), p = L("bento-empty-state"), y = L("bento-typography"), a = L("bento-listbox-multi-select"), u = L("bento-listbox-single-select"), l = L("bento-loading-button"), f = Ue("bento-keyboard-navigation-directive");
|
|
1528
|
+
return ce((v(), O("div", Y({
|
|
1509
1529
|
id: e.id,
|
|
1510
1530
|
ref: "listboxRef",
|
|
1511
1531
|
class: "b-listbox",
|
|
@@ -1515,21 +1535,21 @@ function vs(e, t, i, s, n, o) {
|
|
|
1515
1535
|
"data-testid": "listbox-container",
|
|
1516
1536
|
onScroll: t[0] || (t[0] = (...T) => e.onListboxContainerScroll && e.onListboxContainerScroll(...T))
|
|
1517
1537
|
}), [
|
|
1518
|
-
|
|
1519
|
-
e.componentLoading ? (v(), O("div",
|
|
1520
|
-
|
|
1521
|
-
])) : e.isSearchResultEmpty ? (v(), O("div",
|
|
1522
|
-
e.emptyState ? (v(),
|
|
1538
|
+
z("div", ae(ve(e.wrapperProps)), [
|
|
1539
|
+
e.componentLoading ? (v(), O("div", bs, [
|
|
1540
|
+
G(n)
|
|
1541
|
+
])) : e.isSearchResultEmpty ? (v(), O("div", ms, [
|
|
1542
|
+
e.emptyState ? (v(), R(p, ae(Y({ key: 0 }, e.limitedEmptyStateProps)), null, 16)) : (v(), R(y, {
|
|
1523
1543
|
key: 1,
|
|
1524
1544
|
el: "span"
|
|
1525
1545
|
}, {
|
|
1526
1546
|
default: A(() => [
|
|
1527
|
-
|
|
1547
|
+
K(V(e.noResultsMessage), 1)
|
|
1528
1548
|
]),
|
|
1529
1549
|
_: 1
|
|
1530
1550
|
}))
|
|
1531
|
-
])) : (v(), O(
|
|
1532
|
-
e.multiple ? (v(),
|
|
1551
|
+
])) : (v(), O(le, { key: 2 }, [
|
|
1552
|
+
e.multiple ? (v(), R(a, Y({
|
|
1533
1553
|
key: 0,
|
|
1534
1554
|
ref: "listboxItemRef",
|
|
1535
1555
|
"has-more-items": e.hasMoreItems
|
|
@@ -1540,14 +1560,14 @@ function vs(e, t, i, s, n, o) {
|
|
|
1540
1560
|
"selected-values": e.selectedValue,
|
|
1541
1561
|
searching: e.searching,
|
|
1542
1562
|
"is-option-disabled": e.isOptionDisabled
|
|
1543
|
-
},
|
|
1544
|
-
|
|
1545
|
-
name:
|
|
1546
|
-
fn: A((
|
|
1547
|
-
|
|
1563
|
+
}, se(e.listboxListeners)), pe({ _: 2 }, [
|
|
1564
|
+
q(e.slots, (T, $) => ({
|
|
1565
|
+
name: $,
|
|
1566
|
+
fn: A((P) => [
|
|
1567
|
+
j(e.$slots, $, ae(ve(P)), void 0, !0)
|
|
1548
1568
|
])
|
|
1549
1569
|
}))
|
|
1550
|
-
]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (v(),
|
|
1570
|
+
]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (v(), R(u, Y({
|
|
1551
1571
|
key: 1,
|
|
1552
1572
|
ref: "listboxItemRef",
|
|
1553
1573
|
items: e.virtualisedItems
|
|
@@ -1555,35 +1575,35 @@ function vs(e, t, i, s, n, o) {
|
|
|
1555
1575
|
"selected-value": e.selectedValue,
|
|
1556
1576
|
"static-categories": e.staticCategories,
|
|
1557
1577
|
"is-option-disabled": e.isOptionDisabled
|
|
1558
|
-
},
|
|
1559
|
-
|
|
1560
|
-
name:
|
|
1561
|
-
fn: A((
|
|
1562
|
-
|
|
1578
|
+
}, se(e.listboxListeners)), pe({ _: 2 }, [
|
|
1579
|
+
q(e.slots, (T, $) => ({
|
|
1580
|
+
name: $,
|
|
1581
|
+
fn: A((P) => [
|
|
1582
|
+
j(e.$slots, $, ae(ve(P)), void 0, !0)
|
|
1563
1583
|
])
|
|
1564
1584
|
}))
|
|
1565
1585
|
]), 1040, ["items", "selected-value", "static-categories", "is-option-disabled"])),
|
|
1566
|
-
e.shouldDisplayShowMoreButton ? (v(), O("div",
|
|
1567
|
-
|
|
1586
|
+
e.shouldDisplayShowMoreButton ? (v(), O("div", vs, [
|
|
1587
|
+
G(l, {
|
|
1568
1588
|
state: e.loadingButtonState,
|
|
1569
1589
|
variant: "secondary",
|
|
1570
1590
|
onClickCapture: e.emitShowMore
|
|
1571
1591
|
}, {
|
|
1572
1592
|
default: A(() => [
|
|
1573
|
-
|
|
1593
|
+
K(V(e.showMoreButtonText), 1)
|
|
1574
1594
|
]),
|
|
1575
1595
|
_: 1
|
|
1576
1596
|
}, 8, ["state", "onClickCapture"])
|
|
1577
|
-
])) : e.loading ? (v(), O("div",
|
|
1578
|
-
|
|
1579
|
-
])) :
|
|
1597
|
+
])) : e.loading ? (v(), O("div", fs, [
|
|
1598
|
+
G(n)
|
|
1599
|
+
])) : J("", !0)
|
|
1580
1600
|
], 64))
|
|
1581
1601
|
], 16)
|
|
1582
|
-
], 16,
|
|
1602
|
+
], 16, us)), [
|
|
1583
1603
|
[f]
|
|
1584
1604
|
]);
|
|
1585
1605
|
}
|
|
1586
|
-
const
|
|
1606
|
+
const Ms = /* @__PURE__ */ H(ds, [["render", ps], ["__scopeId", "data-v-c9aaa0e3"]]), _e = (e, t) => {
|
|
1587
1607
|
for (const i of e) {
|
|
1588
1608
|
if (i.value === t)
|
|
1589
1609
|
return i;
|
|
@@ -1594,56 +1614,56 @@ const Rs = /* @__PURE__ */ q(rs, [["render", vs], ["__scopeId", "data-v-c9aaa0e3
|
|
|
1594
1614
|
}
|
|
1595
1615
|
}
|
|
1596
1616
|
return null;
|
|
1597
|
-
},
|
|
1598
|
-
const
|
|
1617
|
+
}, gs = (e) => typeof e == "object" && e !== null && "value" in e && "label" in e, xs = (e, t, i, s) => {
|
|
1618
|
+
const r = k([]), o = k(), n = (u) => {
|
|
1599
1619
|
i.value ? o.value = u.map(({ value: l }) => l) : o.value = u.length > 0 ? u[0].value : null;
|
|
1600
1620
|
}, p = (u) => {
|
|
1601
1621
|
i.value ? o.value = u.map(({ value: l, label: f }) => ({ value: l, label: f })) : o.value = u.length > 0 ? { value: u[0].value, label: u[0].label } : null;
|
|
1602
|
-
},
|
|
1603
|
-
|
|
1604
|
-
},
|
|
1605
|
-
|
|
1622
|
+
}, y = (u) => {
|
|
1623
|
+
r.value = u, s != null && s.value ? p(u) : n(u);
|
|
1624
|
+
}, a = () => {
|
|
1625
|
+
r.value = [], o.value = null;
|
|
1606
1626
|
};
|
|
1607
|
-
return
|
|
1627
|
+
return ye(
|
|
1608
1628
|
() => t.value,
|
|
1609
1629
|
() => {
|
|
1610
1630
|
if (!t.value && t.value !== 0) {
|
|
1611
|
-
|
|
1631
|
+
a();
|
|
1612
1632
|
return;
|
|
1613
1633
|
}
|
|
1614
|
-
const u = !Array.isArray(t.value), l = [...
|
|
1615
|
-
|
|
1634
|
+
const u = !Array.isArray(t.value), l = [...r.value];
|
|
1635
|
+
a();
|
|
1616
1636
|
const f = (E) => {
|
|
1617
|
-
if (
|
|
1618
|
-
|
|
1637
|
+
if (gs(E))
|
|
1638
|
+
r.value.push(E);
|
|
1619
1639
|
else {
|
|
1620
1640
|
let T = _e(e.value, E);
|
|
1621
|
-
T || (T = _e(l, E)), T || (T = { value: E, label: E.toString() }),
|
|
1641
|
+
T || (T = _e(l, E)), T || (T = { value: E, label: E.toString() }), r.value.push(T);
|
|
1622
1642
|
}
|
|
1623
1643
|
};
|
|
1624
1644
|
if (u) {
|
|
1625
1645
|
const E = t.value;
|
|
1626
|
-
f(E), s != null && s.value ? p(
|
|
1646
|
+
f(E), s != null && s.value ? p(r.value) : n(r.value);
|
|
1627
1647
|
return;
|
|
1628
1648
|
}
|
|
1629
|
-
t.value.forEach(f), s != null && s.value ? p(
|
|
1649
|
+
t.value.forEach(f), s != null && s.value ? p(r.value) : n(r.value);
|
|
1630
1650
|
},
|
|
1631
1651
|
{ immediate: !0 }
|
|
1632
1652
|
), {
|
|
1633
1653
|
// Values
|
|
1634
|
-
cachedSelectedListboxOptions:
|
|
1654
|
+
cachedSelectedListboxOptions: r,
|
|
1635
1655
|
cachedListboxSelectedValues: o,
|
|
1636
1656
|
// Methods
|
|
1637
|
-
resetCache:
|
|
1638
|
-
setCachedValues:
|
|
1657
|
+
resetCache: a,
|
|
1658
|
+
setCachedValues: y
|
|
1639
1659
|
};
|
|
1640
1660
|
};
|
|
1641
1661
|
export {
|
|
1642
|
-
|
|
1662
|
+
ne as B,
|
|
1643
1663
|
g as a,
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1664
|
+
Ms as b,
|
|
1665
|
+
xs as c,
|
|
1666
|
+
Fe as d,
|
|
1667
|
+
ls as u
|
|
1648
1668
|
};
|
|
1649
|
-
//# sourceMappingURL=use-cached-selected-values.
|
|
1669
|
+
//# sourceMappingURL=use-cached-selected-values.Dyoz6cUK.js.map
|