@adyen/bento-vue2 1.62.0 → 1.63.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 +181 -235
- package/dist/accordion.js +1 -1
- 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/card.css +1 -1
- package/dist/assets/checkbox-input.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/file-uploader.css +1 -1
- package/dist/assets/header-with-views.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/listbox-option-tag.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/use-cached-selected-values.css +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +3 -3
- package/dist/chunks/{accordion-item.D1t0oHlP.js → accordion-item.BNtdoVto.js} +9 -8
- package/dist/chunks/{accordion-item.D1t0oHlP.js.map → accordion-item.BNtdoVto.js.map} +1 -1
- package/dist/chunks/{action-bar.whU1em8H.js → action-bar.Dsp7iRxz.js} +2 -2
- package/dist/chunks/{action-bar.whU1em8H.js.map → action-bar.Dsp7iRxz.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.RoaQFPKT.js → button-actions-with-menu.CtW_16tY.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.RoaQFPKT.js.map → button-actions-with-menu.CtW_16tY.js.map} +1 -1
- package/dist/chunks/{calendar.DoOFNX-Z.js → calendar.DbTC35rM.js} +2 -2
- package/dist/chunks/{calendar.DoOFNX-Z.js.map → calendar.DbTC35rM.js.map} +1 -1
- package/dist/chunks/card.CypgT0Ji.js +136 -0
- package/dist/chunks/card.CypgT0Ji.js.map +1 -0
- package/dist/chunks/{checkbox-group.B0IGYf1q.js → checkbox-group.6y92U6AF.js} +2 -2
- package/dist/chunks/{checkbox-group.B0IGYf1q.js.map → checkbox-group.6y92U6AF.js.map} +1 -1
- package/dist/chunks/checkbox-input.CNWigbX4.js +117 -0
- package/dist/chunks/checkbox-input.CNWigbX4.js.map +1 -0
- package/dist/chunks/{checkbox.DkCukYh0.js → checkbox.C9nJVvMq.js} +9 -8
- package/dist/chunks/{checkbox.DkCukYh0.js.map → checkbox.C9nJVvMq.js.map} +1 -1
- package/dist/chunks/chevron-down.eYtgv5ly.js +24 -0
- package/dist/chunks/chevron-down.eYtgv5ly.js.map +1 -0
- package/dist/chunks/{chevron-left.BS24hEFa.js → chevron-right.C--ZOC9j.js} +5 -5
- package/dist/chunks/chevron-right.C--ZOC9j.js.map +1 -0
- package/dist/chunks/chevron-up.d8cwIlA_.js +24 -0
- package/dist/chunks/chevron-up.d8cwIlA_.js.map +1 -0
- package/dist/chunks/{code-snippet.n93oYvH4.js → code-snippet.CBU8Tlbs.js} +2 -2
- package/dist/chunks/{code-snippet.n93oYvH4.js.map → code-snippet.CBU8Tlbs.js.map} +1 -1
- package/dist/chunks/{dashboard-section.BEw-n-XQ.js → dashboard-section.CspNW0CA.js} +3 -3
- package/dist/chunks/{dashboard-section.BEw-n-XQ.js.map → dashboard-section.CspNW0CA.js.map} +1 -1
- package/dist/chunks/{data-grid-template.DGFmCUII.js → data-grid-template.BhzgqkZp.js} +3 -3
- package/dist/chunks/{data-grid-template.DGFmCUII.js.map → data-grid-template.BhzgqkZp.js.map} +1 -1
- package/dist/chunks/{data-grid.BcGRXt9C.js → data-grid.BfsBhYpW.js} +451 -452
- package/dist/chunks/data-grid.BfsBhYpW.js.map +1 -0
- package/dist/chunks/{date-picker.Dc_HdQnr.js → date-picker.CPQ6WLZE.js} +3 -3
- package/dist/chunks/{date-picker.Dc_HdQnr.js.map → date-picker.CPQ6WLZE.js.map} +1 -1
- package/dist/chunks/date-range-picker.CNB28UaM.js +1005 -0
- package/dist/chunks/date-range-picker.CNB28UaM.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.7PMxHqoa.js → dropdown-default-textbox.BNuuA4ES.js} +15 -14
- package/dist/chunks/{dropdown-default-textbox.7PMxHqoa.js.map → dropdown-default-textbox.BNuuA4ES.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.qKSu6xYY.js → dropdown-tag.DmVsDrL_.js} +3 -3
- package/dist/chunks/{dropdown-tag.qKSu6xYY.js.map → dropdown-tag.DmVsDrL_.js.map} +1 -1
- package/dist/chunks/{dropdown.BNLPzKbr.js → dropdown.B_PWXFtT.js} +3 -3
- package/dist/chunks/{dropdown.BNLPzKbr.js.map → dropdown.B_PWXFtT.js.map} +1 -1
- package/dist/chunks/es6.n1ewaW31.js.map +1 -1
- package/dist/chunks/{filter-bar.TiqZofNt.js → filter-bar.D6HeYnzZ.js} +15 -14
- package/dist/chunks/{filter-bar.TiqZofNt.js.map → filter-bar.D6HeYnzZ.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.Ctz5dFqz.js → fixed-scroller.XN-jvWqb.js} +12 -12
- package/dist/chunks/fixed-scroller.XN-jvWqb.js.map +1 -0
- package/dist/chunks/{header-with-views.MFHmiIXb.js → header-with-views.Dkn8IDew.js} +270 -270
- package/dist/chunks/header-with-views.Dkn8IDew.js.map +1 -0
- package/dist/chunks/{header.B1PrBQG0.js → header.DNzQO7u-.js} +2 -2
- package/dist/chunks/{header.B1PrBQG0.js.map → header.DNzQO7u-.js.map} +1 -1
- package/dist/chunks/{input-field-password.BlX3Icgt.js → input-field-password.CY3eRVpe.js} +3 -3
- package/dist/chunks/{input-field-password.BlX3Icgt.js.map → input-field-password.CY3eRVpe.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.Ofvi2A48.js → input-field-phone-number.CN5qZ0VL.js} +3 -3
- package/dist/chunks/{input-field-phone-number.Ofvi2A48.js.map → input-field-phone-number.CN5qZ0VL.js.map} +1 -1
- package/dist/chunks/{input-field.Dck9dAeK.js → input-field.DKhsSYF8.js} +2 -2
- package/dist/chunks/{input-field.Dck9dAeK.js.map → input-field.DKhsSYF8.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.EzSkn_lM.js → listbox-option-tag.DFmB_TuD.js} +9 -9
- package/dist/chunks/listbox-option-tag.DFmB_TuD.js.map +1 -0
- package/dist/chunks/menu.W_kuhRKI.js +514 -0
- package/dist/chunks/menu.W_kuhRKI.js.map +1 -0
- package/dist/chunks/minus-small.DJacLGTw.js +27 -0
- package/dist/chunks/minus-small.DJacLGTw.js.map +1 -0
- package/dist/chunks/{pagination.BvhUFgsT.js → pagination.DvP8FqiW.js} +2 -2
- package/dist/chunks/{pagination.BvhUFgsT.js.map → pagination.DvP8FqiW.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.BTJpOiYL.js → rich-text-editor.aSOSl4Rz.js} +2 -2
- package/dist/chunks/{rich-text-editor.BTJpOiYL.js.map → rich-text-editor.aSOSl4Rz.js.map} +1 -1
- package/dist/chunks/{search-bar.Ch1dLZAb.js → search-bar.Sh4A8UId.js} +3 -3
- package/dist/chunks/{search-bar.Ch1dLZAb.js.map → search-bar.Sh4A8UId.js.map} +1 -1
- package/dist/chunks/{secondary-nav.DBssP9fQ.js → secondary-nav.BFtGx_IN.js} +2 -2
- package/dist/chunks/{secondary-nav.DBssP9fQ.js.map → secondary-nav.BFtGx_IN.js.map} +1 -1
- package/dist/chunks/{selection-card-group.CjFm-cAm.js → selection-card-group.CrWy35QU.js} +2 -2
- package/dist/chunks/{selection-card-group.CjFm-cAm.js.map → selection-card-group.CrWy35QU.js.map} +1 -1
- package/dist/chunks/{tabs.zkTl2PQR.js → tabs.Dx6teJGW.js} +2 -2
- package/dist/chunks/{tabs.zkTl2PQR.js.map → tabs.Dx6teJGW.js.map} +1 -1
- package/dist/chunks/{tutorial.C9PYfB4z.js → tutorial.BNZh6N3h.js} +2 -2
- package/dist/chunks/{tutorial.C9PYfB4z.js.map → tutorial.BNZh6N3h.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.Da6xbfzO.js → use-cached-selected-values.CDBmVxYM.js} +514 -481
- package/dist/chunks/use-cached-selected-values.CDBmVxYM.js.map +1 -0
- package/dist/code-snippet.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/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 +31 -31
- 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 +5 -5
- package/dist/menu.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/styles/bento-dark.css +4 -0
- package/dist/styles/bento-light.css +4 -0
- package/dist/styles/bento.css +4 -0
- package/dist/styles/legacy.css +4 -0
- package/dist/styles/styleguide.css +4 -0
- package/dist/tabs.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +176 -120
- package/package.json +7 -7
- package/dist/chunks/card.Cu6MicVI.js +0 -123
- package/dist/chunks/card.Cu6MicVI.js.map +0 -1
- package/dist/chunks/checkbox-input.B-4Rw5mp.js +0 -137
- package/dist/chunks/checkbox-input.B-4Rw5mp.js.map +0 -1
- package/dist/chunks/chevron-left.BS24hEFa.js.map +0 -1
- package/dist/chunks/chevron-up.CHK1E4p9.js +0 -43
- package/dist/chunks/chevron-up.CHK1E4p9.js.map +0 -1
- package/dist/chunks/data-grid.BcGRXt9C.js.map +0 -1
- package/dist/chunks/date-range-picker.D6xJAHoB.js +0 -977
- package/dist/chunks/date-range-picker.D6xJAHoB.js.map +0 -1
- package/dist/chunks/fixed-scroller.Ctz5dFqz.js.map +0 -1
- package/dist/chunks/header-with-views.MFHmiIXb.js.map +0 -1
- package/dist/chunks/listbox-option-tag.EzSkn_lM.js.map +0 -1
- package/dist/chunks/menu.CTVbNfuo.js +0 -601
- package/dist/chunks/menu.CTVbNfuo.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.Da6xbfzO.js.map +0 -1
|
@@ -1,116 +1,118 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { B as
|
|
3
|
-
import { B as
|
|
4
|
-
import { B as
|
|
5
|
-
import { u as
|
|
6
|
-
import { d as
|
|
1
|
+
import { computed as i, ref as T, onMounted as Ce, onUnmounted as xe, watch as j, defineComponent as M, toRef as G, useSlots as Se } from "vue";
|
|
2
|
+
import { B as Y } from "./typography.J1v_SPG3.js";
|
|
3
|
+
import { B as Ee } from "./loading-indicator.z8COalOc.js";
|
|
4
|
+
import { B as Oe } from "./empty-state.mtXfb1BB.js";
|
|
5
|
+
import { u as Z } from "./i18n.BQkEbtPM.js";
|
|
6
|
+
import { d as Te } from "./debounce.DUTu11PS.js";
|
|
7
7
|
import "./index.Cl4_42j5.js";
|
|
8
|
-
import { B as
|
|
9
|
-
import {
|
|
10
|
-
import { C as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
8
|
+
import { B as Ae } from "./chip.OV0EWIP3.js";
|
|
9
|
+
import { C as q, N as Le } from "./minus-small.DJacLGTw.js";
|
|
10
|
+
import { C as Ie } from "./checkmark-small.DVDtD4HQ.js";
|
|
11
|
+
import { n as N } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
12
|
+
import { C as ke } from "./chevron-down.eYtgv5ly.js";
|
|
13
|
+
import { C as Re } from "./chevron-up.d8cwIlA_.js";
|
|
14
|
+
import { B, a as Q } from "./keyboard-navigation.pB8weElW.js";
|
|
15
|
+
import { d as De, e as ce } from "./button-actions._OIvTdKt.js";
|
|
14
16
|
/* empty css */
|
|
15
|
-
import { o as
|
|
17
|
+
import { o as Be } from "./resize.Bqks3WUm.js";
|
|
16
18
|
import "../assets/use-cached-selected-values.css";
|
|
17
|
-
const
|
|
18
|
-
const o =
|
|
19
|
+
const de = (l, e, t, s) => {
|
|
20
|
+
const o = i(
|
|
19
21
|
() => {
|
|
20
|
-
var
|
|
21
|
-
return !!((
|
|
22
|
+
var v, S;
|
|
23
|
+
return !!((v = l.value) != null && v.length) && ((S = l.value) == null ? void 0 : S.length) === e.value.length;
|
|
22
24
|
}
|
|
23
|
-
), n =
|
|
24
|
-
var
|
|
25
|
-
return
|
|
25
|
+
), n = i(() => {
|
|
26
|
+
var v;
|
|
27
|
+
return l.value == null || l.value.length === 0 ? !1 : ((v = l.value) == null ? void 0 : v.length) !== e.value.length;
|
|
26
28
|
});
|
|
27
29
|
return {
|
|
28
30
|
isAllSelected: o,
|
|
29
31
|
isIndeterminate: n,
|
|
30
|
-
toggleSelectAll: (
|
|
31
|
-
|
|
32
|
+
toggleSelectAll: (v) => {
|
|
33
|
+
v ? t() : s();
|
|
32
34
|
}
|
|
33
35
|
};
|
|
34
36
|
};
|
|
35
|
-
function
|
|
36
|
-
const n =
|
|
37
|
+
function $e(l, { disabled: e, itemHeight: t, overscan: s = 5, prefixHeight: o }) {
|
|
38
|
+
const n = T(null), d = T([]), v = T(0), S = T(0), c = T(0);
|
|
37
39
|
let r;
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
+
const h = i(() => {
|
|
41
|
+
const f = typeof t == "number" ? l.value.length * t : l.value.reduce((A, L, y) => A + t(y), 0), C = typeof t == "number" ? v.value * t : l.value.slice(0, v.value).reduce((A, L, y) => A + t(y), 0);
|
|
40
42
|
return {
|
|
41
43
|
style: {
|
|
42
|
-
marginTop: `${
|
|
43
|
-
height: `${
|
|
44
|
+
marginTop: `${C}px`,
|
|
45
|
+
height: `${f - C}px`
|
|
44
46
|
}
|
|
45
47
|
};
|
|
46
48
|
}), O = () => {
|
|
47
|
-
const
|
|
49
|
+
const f = (o == null ? void 0 : o.value) ?? 0, C = Math.max(n.value.scrollTop - f, 0);
|
|
48
50
|
if (typeof t == "number")
|
|
49
|
-
return Math.floor(
|
|
50
|
-
let
|
|
51
|
-
for (let
|
|
52
|
-
const
|
|
53
|
-
if (
|
|
54
|
-
|
|
51
|
+
return Math.floor(C / t);
|
|
52
|
+
let A = 0, L = 0;
|
|
53
|
+
for (let y = 0; y < l.value.length; y += 1) {
|
|
54
|
+
const w = t(y);
|
|
55
|
+
if (A += w, A >= C) {
|
|
56
|
+
L = y;
|
|
55
57
|
break;
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
|
-
return
|
|
59
|
-
},
|
|
60
|
-
if (
|
|
61
|
-
return Math.ceil(
|
|
62
|
-
const
|
|
63
|
-
let
|
|
64
|
-
for (let
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
60
|
+
return L;
|
|
61
|
+
}, g = () => {
|
|
62
|
+
if (c.value = n.value.clientHeight, typeof t == "number")
|
|
63
|
+
return Math.ceil(c.value / t);
|
|
64
|
+
const f = v.value ?? 0;
|
|
65
|
+
let C = 0, A = 0;
|
|
66
|
+
for (let L = f; L < l.value.length; L += 1) {
|
|
67
|
+
const y = t(L);
|
|
68
|
+
if (C += y, A = L, C > c.value)
|
|
67
69
|
break;
|
|
68
70
|
}
|
|
69
|
-
return
|
|
71
|
+
return A - f;
|
|
70
72
|
}, u = () => {
|
|
71
73
|
if (n.value) {
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
+
const f = g();
|
|
75
|
+
v.value = O(), S.value = Math.min(v.value + f + s, l.value.length), d.value = l.value.slice(v.value, S.value);
|
|
74
76
|
}
|
|
75
77
|
}, I = () => {
|
|
76
78
|
u();
|
|
77
79
|
};
|
|
78
|
-
e || (
|
|
79
|
-
n.value && (
|
|
80
|
-
|
|
80
|
+
e || (Ce(() => {
|
|
81
|
+
n.value && (c.value = n.value.clientHeight, r = Be(n.value, ({ clientHeight: f }) => {
|
|
82
|
+
c.value = f, u();
|
|
81
83
|
}), u());
|
|
82
|
-
}),
|
|
84
|
+
}), xe(() => {
|
|
83
85
|
r == null || r.disconnect();
|
|
84
|
-
}),
|
|
85
|
-
() =>
|
|
86
|
+
}), j(
|
|
87
|
+
() => l.value,
|
|
86
88
|
() => {
|
|
87
89
|
u();
|
|
88
90
|
}
|
|
89
91
|
));
|
|
90
|
-
const
|
|
92
|
+
const D = {
|
|
91
93
|
ref: n,
|
|
92
94
|
style: { overflowY: "auto" }
|
|
93
95
|
};
|
|
94
96
|
return e ? {
|
|
95
97
|
containerRef: n,
|
|
96
|
-
containerProps:
|
|
98
|
+
containerProps: D,
|
|
97
99
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
98
100
|
onScroll: () => {
|
|
99
101
|
},
|
|
100
|
-
list:
|
|
102
|
+
list: l
|
|
101
103
|
} : {
|
|
102
104
|
containerRef: n,
|
|
103
|
-
containerProps:
|
|
105
|
+
containerProps: D,
|
|
104
106
|
onScroll: I,
|
|
105
107
|
list: d,
|
|
106
|
-
wrapperProps:
|
|
108
|
+
wrapperProps: h
|
|
107
109
|
};
|
|
108
110
|
}
|
|
109
|
-
var a = /* @__PURE__ */ ((
|
|
110
|
-
const
|
|
111
|
+
var a = /* @__PURE__ */ ((l) => (l.SELECT = "select", l.SHOW_MORE = "show-more", l.ESCAPE = "escape-pressed", l.CLICK = "click", l.ENTER = "enter-pressed", l.SPACE = "space-pressed", l.TAB = "tab-pressed", l.CLOSE_DROPDOWN = "close-dropdown", l))(a || {}), z = /* @__PURE__ */ ((l) => (l.AUTOMATIC = "automatic", l.BUTTON = "button", l.NONE = "none", l))(z || {});
|
|
112
|
+
const Ne = M({
|
|
111
113
|
name: "bento-listbox-static-category",
|
|
112
114
|
components: {
|
|
113
|
-
BentoTypography:
|
|
115
|
+
BentoTypography: Y
|
|
114
116
|
},
|
|
115
117
|
props: {
|
|
116
118
|
/**
|
|
@@ -122,18 +124,18 @@ const ke = P({
|
|
|
122
124
|
}
|
|
123
125
|
}
|
|
124
126
|
});
|
|
125
|
-
var
|
|
127
|
+
var Me = function() {
|
|
126
128
|
var e = this, t = e._self._c;
|
|
127
129
|
return e._self._setupProxy, t("div", { staticClass: "b-listbox-single-select-category" }, [t("bento-typography", { staticClass: "b-listbox-single-select-category__label-text", attrs: { variant: "caption", el: "span" } }, [e._v(" " + e._s(e.categoryLabel) + " ")]), t("div", [e._t("default")], 2)], 1);
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
}, we = [], Pe = /* @__PURE__ */ N(
|
|
131
|
+
Ne,
|
|
132
|
+
Me,
|
|
133
|
+
we,
|
|
132
134
|
!1,
|
|
133
135
|
null,
|
|
134
136
|
"4aa8cc6e"
|
|
135
137
|
);
|
|
136
|
-
const
|
|
138
|
+
const Fe = Pe.exports, Ge = M({
|
|
137
139
|
name: "bento-listbox-option",
|
|
138
140
|
props: {
|
|
139
141
|
/**
|
|
@@ -146,14 +148,14 @@ const Me = Ne.exports, $e = P({
|
|
|
146
148
|
selected: { type: Boolean, default: !1 }
|
|
147
149
|
},
|
|
148
150
|
emits: [a.CLICK, a.ENTER, a.SPACE, a.TAB],
|
|
149
|
-
setup(
|
|
150
|
-
const t =
|
|
151
|
-
"b-listbox-option--disabled":
|
|
152
|
-
"b-listbox-option--selected":
|
|
151
|
+
setup(l, { emit: e }) {
|
|
152
|
+
const t = i(() => ({
|
|
153
|
+
"b-listbox-option--disabled": l.disabled,
|
|
154
|
+
"b-listbox-option--selected": l.selected
|
|
153
155
|
}));
|
|
154
156
|
return {
|
|
155
157
|
// Enums
|
|
156
|
-
BentoKeyboardNavigationKeyDownEvent:
|
|
158
|
+
BentoKeyboardNavigationKeyDownEvent: B,
|
|
157
159
|
BentoListboxEvent: a,
|
|
158
160
|
// Values
|
|
159
161
|
conditionalClasses: t,
|
|
@@ -167,47 +169,47 @@ const Me = Ne.exports, $e = P({
|
|
|
167
169
|
};
|
|
168
170
|
}
|
|
169
171
|
});
|
|
170
|
-
var
|
|
172
|
+
var Ue = function() {
|
|
171
173
|
var e = this, t = e._self._c;
|
|
172
|
-
return e._self._setupProxy, t("div", e._b({ staticClass: "b-listbox-option", class: e.conditionalClasses, attrs: { role: "option" }, on: { click: e.onClick, keydown: [function(
|
|
173
|
-
return !
|
|
174
|
-
}, function(
|
|
175
|
-
return !
|
|
176
|
-
}, function(
|
|
177
|
-
return !
|
|
174
|
+
return e._self._setupProxy, t("div", e._b({ staticClass: "b-listbox-option", class: e.conditionalClasses, attrs: { role: "option" }, on: { click: e.onClick, keydown: [function(s) {
|
|
175
|
+
return !s.type.indexOf("key") && e._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : e.onOptionSelected(e.BentoListboxEvent.ENTER, s);
|
|
176
|
+
}, function(s) {
|
|
177
|
+
return !s.type.indexOf("key") && e._k(s.keyCode, "space", 32, s.key, [" ", "Spacebar"]) ? null : e.onOptionSelected(e.BentoListboxEvent.SPACE, s);
|
|
178
|
+
}, function(s) {
|
|
179
|
+
return !s.type.indexOf("key") && e._k(s.keyCode, "tab", 9, s.key, "Tab") ? null : e.onOptionSelected(e.BentoListboxEvent.TAB, s);
|
|
178
180
|
}] } }, "div", e.$attrs, !1), [e._t("default")], 2);
|
|
179
|
-
},
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
}, ze = [], Ye = /* @__PURE__ */ N(
|
|
182
|
+
Ge,
|
|
183
|
+
Ue,
|
|
184
|
+
ze,
|
|
183
185
|
!1,
|
|
184
186
|
null,
|
|
185
187
|
"a1e9ebff"
|
|
186
188
|
);
|
|
187
|
-
const
|
|
188
|
-
let
|
|
189
|
-
const
|
|
189
|
+
const H = Ye.exports;
|
|
190
|
+
let re = 0;
|
|
191
|
+
const We = {
|
|
190
192
|
beforeCreate() {
|
|
191
|
-
this.uuid =
|
|
193
|
+
this.uuid = re.toString(), re += 1;
|
|
192
194
|
}
|
|
193
195
|
};
|
|
194
|
-
var
|
|
196
|
+
var Ke = function() {
|
|
195
197
|
var e = this, t = e._self._c;
|
|
196
198
|
return t("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"] ? t("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), t("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" } })]);
|
|
197
|
-
},
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
199
|
+
}, qe = [], je = /* @__PURE__ */ N(
|
|
200
|
+
We,
|
|
201
|
+
Ke,
|
|
202
|
+
qe,
|
|
201
203
|
!1,
|
|
202
204
|
null,
|
|
203
205
|
null
|
|
204
206
|
);
|
|
205
|
-
const
|
|
207
|
+
const He = je.exports, Ve = M({
|
|
206
208
|
name: "bento-listbox-single-select-option",
|
|
207
209
|
components: {
|
|
208
|
-
BentoListboxOption:
|
|
209
|
-
BentoTypography:
|
|
210
|
-
CheckmarkIcon:
|
|
210
|
+
BentoListboxOption: H,
|
|
211
|
+
BentoTypography: Y,
|
|
212
|
+
CheckmarkIcon: He
|
|
211
213
|
},
|
|
212
214
|
props: {
|
|
213
215
|
/**
|
|
@@ -228,13 +230,13 @@ const We = Ye.exports, Ke = P({
|
|
|
228
230
|
selected: { type: Boolean, default: !1 }
|
|
229
231
|
},
|
|
230
232
|
emits: [a.ENTER, a.SELECT, a.SPACE, a.TAB],
|
|
231
|
-
setup(
|
|
233
|
+
setup(l, { emit: e }) {
|
|
232
234
|
const t = (d) => {
|
|
233
|
-
|
|
234
|
-
},
|
|
235
|
+
l.disabled || e(d, l.option);
|
|
236
|
+
}, s = i(() => l.disabled ? !0 : null), o = i(() => l.selected ? !0 : null), n = i(() => l.disabled ? -1 : 0);
|
|
235
237
|
return {
|
|
236
238
|
// Values
|
|
237
|
-
ariaDisabled:
|
|
239
|
+
ariaDisabled: s,
|
|
238
240
|
ariaSelected: o,
|
|
239
241
|
tabIndex: n,
|
|
240
242
|
// Enums
|
|
@@ -244,31 +246,31 @@ const We = Ye.exports, Ke = P({
|
|
|
244
246
|
};
|
|
245
247
|
}
|
|
246
248
|
});
|
|
247
|
-
var
|
|
249
|
+
var Xe = function() {
|
|
248
250
|
var e = this, t = e._self._c;
|
|
249
|
-
return e._self._setupProxy, t("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(
|
|
251
|
+
return e._self._setupProxy, t("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(s) {
|
|
250
252
|
return e.onOptionSelected(e.BentoListboxEvent.SELECT);
|
|
251
|
-
}, "enter-pressed": function(
|
|
253
|
+
}, "enter-pressed": function(s) {
|
|
252
254
|
return e.onOptionSelected(e.BentoListboxEvent.ENTER);
|
|
253
|
-
}, "space-pressed": function(
|
|
254
|
-
return
|
|
255
|
-
}, "tab-pressed": function(
|
|
255
|
+
}, "space-pressed": function(s) {
|
|
256
|
+
return s.preventDefault(), e.onOptionSelected(e.BentoListboxEvent.SPACE);
|
|
257
|
+
}, "tab-pressed": function(s) {
|
|
256
258
|
return e.onOptionSelected(e.BentoListboxEvent.TAB);
|
|
257
259
|
} } }, [e._t("default", function() {
|
|
258
260
|
return [t("span", { staticClass: "b-listbox-single-select-option__text" }, [t("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.option.label))]), e.option.description ? t("bento-typography", { staticClass: "b-listbox-single-select-option__description", attrs: { el: "span" } }, [e._v(" " + e._s(e.option.description) + " ")]) : e._e()], 1)];
|
|
259
261
|
}, null, e.option), t("span", { staticClass: "b-listbox-single-select-option__check-icon" }, [t("checkmark-icon", { directives: [{ name: "show", rawName: "v-show", value: e.selected, expression: "selected" }], attrs: { "svg-title": "selected" } })], 1)], 2);
|
|
260
|
-
},
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
262
|
+
}, Je = [], Ze = /* @__PURE__ */ N(
|
|
263
|
+
Ve,
|
|
264
|
+
Xe,
|
|
265
|
+
Je,
|
|
264
266
|
!1,
|
|
265
267
|
null,
|
|
266
268
|
"5a5ff36a"
|
|
267
269
|
);
|
|
268
|
-
const
|
|
269
|
-
const
|
|
270
|
-
() => e.value ?
|
|
271
|
-
), o =
|
|
270
|
+
const Qe = Ze.exports, fe = ({ items: l, hasStaticCategories: e }, t) => {
|
|
271
|
+
const s = i(
|
|
272
|
+
() => e.value ? l.value.flatMap((u) => u.items) : l.value
|
|
273
|
+
), o = i(() => s.value.length - 1), n = T(0), d = (u) => {
|
|
272
274
|
switch (u) {
|
|
273
275
|
case "increase":
|
|
274
276
|
n.value += 1;
|
|
@@ -277,18 +279,18 @@ const Xe = He.exports, de = ({ items: s, hasStaticCategories: e }, t) => {
|
|
|
277
279
|
n.value -= 1;
|
|
278
280
|
break;
|
|
279
281
|
}
|
|
280
|
-
},
|
|
282
|
+
}, v = ({ edgeCaseItem: u }, I) => {
|
|
281
283
|
n.value !== u && (d(I), t(n.value));
|
|
282
284
|
}, S = (u) => {
|
|
283
|
-
|
|
285
|
+
g(u), v(
|
|
284
286
|
{
|
|
285
287
|
edgeCaseItem: o.value
|
|
286
288
|
},
|
|
287
289
|
"increase"
|
|
288
290
|
/* INCREASE */
|
|
289
291
|
);
|
|
290
|
-
},
|
|
291
|
-
|
|
292
|
+
}, c = (u) => {
|
|
293
|
+
g(u), v(
|
|
292
294
|
{
|
|
293
295
|
edgeCaseItem: 0
|
|
294
296
|
},
|
|
@@ -297,28 +299,28 @@ const Xe = He.exports, de = ({ items: s, hasStaticCategories: e }, t) => {
|
|
|
297
299
|
);
|
|
298
300
|
}, r = () => {
|
|
299
301
|
n.value = 0, t(n.value);
|
|
300
|
-
},
|
|
302
|
+
}, h = () => {
|
|
301
303
|
n.value = o.value, t(n.value);
|
|
302
304
|
}, O = (u) => {
|
|
303
305
|
n.value = u;
|
|
304
|
-
},
|
|
306
|
+
}, g = (u) => {
|
|
305
307
|
var I;
|
|
306
308
|
(I = u == null ? void 0 : u.detail) == null || I.preventDefault();
|
|
307
309
|
};
|
|
308
310
|
return {
|
|
309
311
|
moveToFirstElement: r,
|
|
310
|
-
moveToLastElement:
|
|
312
|
+
moveToLastElement: h,
|
|
311
313
|
moveToNextElement: S,
|
|
312
|
-
moveToPreviousElement:
|
|
314
|
+
moveToPreviousElement: c,
|
|
313
315
|
setListboxFocusedIndex: O,
|
|
314
|
-
preventDefault:
|
|
316
|
+
preventDefault: g,
|
|
315
317
|
focusedIndex: n
|
|
316
318
|
};
|
|
317
|
-
},
|
|
319
|
+
}, et = M({
|
|
318
320
|
name: "bento-listbox-single-select",
|
|
319
321
|
components: {
|
|
320
|
-
BentoListboxSingleSelectCategory:
|
|
321
|
-
BentoListboxSingleSelectOption:
|
|
322
|
+
BentoListboxSingleSelectCategory: Fe,
|
|
323
|
+
BentoListboxSingleSelectOption: Qe
|
|
322
324
|
},
|
|
323
325
|
directives: { BentoKeyboardNavigationDirective: Q },
|
|
324
326
|
inheritAttrs: !1,
|
|
@@ -362,33 +364,33 @@ const Xe = He.exports, de = ({ items: s, hasStaticCategories: e }, t) => {
|
|
|
362
364
|
staticCategories: { type: Boolean, default: !1 }
|
|
363
365
|
},
|
|
364
366
|
emits: [a.SELECT, a.ENTER, a.SPACE, a.TAB],
|
|
365
|
-
setup(
|
|
366
|
-
const o =
|
|
367
|
-
var
|
|
368
|
-
return !!((
|
|
369
|
-
}),
|
|
370
|
-
e(
|
|
371
|
-
},
|
|
372
|
-
var
|
|
373
|
-
(
|
|
367
|
+
setup(l, { emit: e, expose: t, slots: s }) {
|
|
368
|
+
const o = T(null), n = T([]), d = i(() => {
|
|
369
|
+
var f;
|
|
370
|
+
return !!((f = l.selectedValue) != null && f.length) && l.selectedValue.at(0);
|
|
371
|
+
}), v = i(() => !!l.items.some(({ items: f }) => !!f)), S = (f) => (C) => {
|
|
372
|
+
e(f, [C]);
|
|
373
|
+
}, c = (f) => {
|
|
374
|
+
var C;
|
|
375
|
+
(C = o.value.querySelectorAll('[role="option"]')[f]) == null || C.focus();
|
|
374
376
|
}, {
|
|
375
377
|
moveToNextElement: r,
|
|
376
|
-
moveToPreviousElement:
|
|
378
|
+
moveToPreviousElement: h,
|
|
377
379
|
moveToFirstElement: O,
|
|
378
|
-
moveToLastElement:
|
|
380
|
+
moveToLastElement: g,
|
|
379
381
|
setListboxFocusedIndex: u
|
|
380
|
-
} =
|
|
382
|
+
} = fe(
|
|
381
383
|
{
|
|
382
|
-
items:
|
|
383
|
-
hasStaticCategories:
|
|
384
|
+
items: G(l, "items"),
|
|
385
|
+
hasStaticCategories: G(l, "staticCategories")
|
|
384
386
|
},
|
|
385
|
-
|
|
387
|
+
c
|
|
386
388
|
), I = {
|
|
387
|
-
[
|
|
388
|
-
[
|
|
389
|
-
[
|
|
390
|
-
[
|
|
391
|
-
},
|
|
389
|
+
[B.ARROW_UP]: h,
|
|
390
|
+
[B.ARROW_DOWN]: r,
|
|
391
|
+
[B.HOME]: O,
|
|
392
|
+
[B.END]: g
|
|
393
|
+
}, D = {
|
|
392
394
|
[a.SELECT]: S(a.SELECT),
|
|
393
395
|
[a.SPACE]: S(a.SPACE),
|
|
394
396
|
[a.TAB]: S(a.TAB),
|
|
@@ -412,58 +414,88 @@ const Xe = He.exports, de = ({ items: s, hasStaticCategories: e }, t) => {
|
|
|
412
414
|
listboxRef: o,
|
|
413
415
|
listboxItemRef: n,
|
|
414
416
|
selectedItem: d,
|
|
415
|
-
slots:
|
|
417
|
+
slots: s,
|
|
416
418
|
// Computed
|
|
417
|
-
hasCategories:
|
|
419
|
+
hasCategories: v,
|
|
418
420
|
// Methods
|
|
419
421
|
onOptionSelected: S,
|
|
420
422
|
// Keyboard navigation
|
|
421
423
|
listboxListeners: I,
|
|
422
|
-
listboxOptionListeners:
|
|
424
|
+
listboxOptionListeners: D
|
|
423
425
|
};
|
|
424
426
|
}
|
|
425
427
|
});
|
|
426
|
-
var
|
|
428
|
+
var tt = function() {
|
|
427
429
|
var e = this, t = e._self._c;
|
|
428
|
-
return e._self._setupProxy, t("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef" }, e.listboxListeners), [e.hasCategories && e.staticCategories ? e._l(e.items, function(
|
|
429
|
-
return t("bento-listbox-single-select-category", { key:
|
|
430
|
+
return e._self._setupProxy, t("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef" }, e.listboxListeners), [e.hasCategories && e.staticCategories ? e._l(e.items, function(s) {
|
|
431
|
+
return t("bento-listbox-single-select-category", { key: s.value, attrs: { "category-label": s.label, role: "group" } }, e._l(s.items, function(o) {
|
|
430
432
|
return t("bento-listbox-single-select-option", e._g({ key: o.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: o, disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null, selected: o.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(n, d) {
|
|
431
|
-
return { key: d, fn: function(
|
|
432
|
-
return [e._t(d, null, null,
|
|
433
|
+
return { key: d, fn: function(v) {
|
|
434
|
+
return [e._t(d, null, null, v)];
|
|
433
435
|
} };
|
|
434
436
|
})], null, !0) }, e.listboxOptionListeners));
|
|
435
437
|
}), 1);
|
|
436
|
-
}) : e._l(e.items, function(
|
|
437
|
-
return t("bento-listbox-single-select-option", e._g({ key:
|
|
438
|
+
}) : e._l(e.items, function(s) {
|
|
439
|
+
return t("bento-listbox-single-select-option", e._g({ key: s.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: s, disabled: e.isOptionDisabled ? e.isOptionDisabled(s) : null, selected: s.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(o, n) {
|
|
438
440
|
return { key: n, fn: function(d) {
|
|
439
441
|
return [e._t(n, null, null, d)];
|
|
440
442
|
} };
|
|
441
443
|
})], null, !0) }, e.listboxOptionListeners));
|
|
442
444
|
})], 2);
|
|
443
|
-
},
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
445
|
+
}, st = [], lt = /* @__PURE__ */ N(
|
|
446
|
+
et,
|
|
447
|
+
tt,
|
|
448
|
+
st,
|
|
447
449
|
!1,
|
|
448
450
|
null,
|
|
449
451
|
null
|
|
450
452
|
);
|
|
451
|
-
const
|
|
452
|
-
|
|
453
|
-
|
|
453
|
+
const nt = lt.exports, ot = {}, it = /* @__PURE__ */ M({
|
|
454
|
+
...ot,
|
|
455
|
+
__name: "listbox-decorative-checkbox",
|
|
456
|
+
props: {
|
|
457
|
+
disabled: { type: Boolean, default: !1 },
|
|
458
|
+
indeterminate: { type: Boolean, default: !1 },
|
|
459
|
+
checked: { type: Boolean, default: !1 }
|
|
460
|
+
},
|
|
461
|
+
setup(l) {
|
|
462
|
+
const e = l, t = i(() => ({
|
|
463
|
+
[`b-checkbox-input--${q.DISABLED}`]: e.disabled
|
|
464
|
+
})), s = i(() => ({
|
|
465
|
+
[`b-checkbox-input__outline--${q.UNCHECKED}`]: !e.checked && !e.indeterminate,
|
|
466
|
+
[`b-checkbox-input__outline--${q.CHECKED}`]: e.checked && !e.indeterminate,
|
|
467
|
+
[`b-checkbox-input__outline--${q.INDETERMINATE}`]: e.indeterminate
|
|
468
|
+
}));
|
|
469
|
+
return { __sfc: !0, props: e, conditionalClasses: t, outlineConditionalClasses: s, CheckmarkSmallIcon: Ie, MinusSmallIcon: Le };
|
|
470
|
+
}
|
|
471
|
+
});
|
|
472
|
+
var at = function() {
|
|
473
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
474
|
+
return t("div", { staticClass: "b-checkbox-input", class: s.conditionalClasses, attrs: { role: "presentation" } }, [e.indeterminate ? t(s.MinusSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true" } }) : e.checked ? t(s.CheckmarkSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true" } }) : e._e(), t("div", { staticClass: "b-checkbox-input__outline", class: s.outlineConditionalClasses })], 1);
|
|
475
|
+
}, ct = [], rt = /* @__PURE__ */ N(
|
|
476
|
+
it,
|
|
477
|
+
at,
|
|
478
|
+
ct,
|
|
479
|
+
!1,
|
|
480
|
+
null,
|
|
481
|
+
"5dc60f05"
|
|
482
|
+
);
|
|
483
|
+
const ee = rt.exports;
|
|
484
|
+
var X = /* @__PURE__ */ ((l) => (l.DISABLED = "disabled", l.STATIC_CATEGORY = "static-category", l))(X || {}), K = /* @__PURE__ */ ((l) => (l.SELECT_CATEGORY = "select-category", l.UNSELECT_CATEGORY = "unselect-category", l))(K || {});
|
|
485
|
+
const ut = {
|
|
454
486
|
"en-US": {
|
|
455
487
|
categoryClosed: "{category} closed",
|
|
456
488
|
categoryOpened: "{category} opened"
|
|
457
489
|
}
|
|
458
|
-
},
|
|
459
|
-
i18n: { messages:
|
|
490
|
+
}, dt = M({
|
|
491
|
+
i18n: { messages: ut },
|
|
460
492
|
name: "bento-listbox-multi-select-category",
|
|
461
493
|
components: {
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
494
|
+
BentoTypography: Y,
|
|
495
|
+
BentoListboxOption: H,
|
|
496
|
+
ChevronDownIcon: ke,
|
|
497
|
+
ChevronUpIcon: Re,
|
|
498
|
+
ListboxDecorativeCheckbox: ee
|
|
467
499
|
},
|
|
468
500
|
props: {
|
|
469
501
|
/**
|
|
@@ -508,99 +540,100 @@ const tt = {
|
|
|
508
540
|
*/
|
|
509
541
|
tabindex: { type: Number, default: -1 }
|
|
510
542
|
},
|
|
511
|
-
emits: [
|
|
512
|
-
setup(
|
|
513
|
-
const t =
|
|
514
|
-
() =>
|
|
515
|
-
), d =
|
|
543
|
+
emits: [K.SELECT_CATEGORY, K.UNSELECT_CATEGORY],
|
|
544
|
+
setup(l, { emit: e }) {
|
|
545
|
+
const t = T(!1), { t: s } = Z(), o = (E) => l.isOptionDisabled ? l.isOptionDisabled(E) : !1, n = i(
|
|
546
|
+
() => l.category.items.every((E) => o(E))
|
|
547
|
+
), d = G(l, "staticCategories"), v = i(() => t.value || l.staticCategories), S = i(() => ({
|
|
516
548
|
[`b-listbox-multi-select-category--${X.DISABLED}`]: n.value,
|
|
517
|
-
[`b-listbox-multi-select-category--${X.STATIC_CATEGORY}`]:
|
|
518
|
-
})),
|
|
519
|
-
|
|
520
|
-
}, r = (
|
|
521
|
-
var
|
|
522
|
-
const
|
|
523
|
-
return { isDisabled:
|
|
524
|
-
},
|
|
525
|
-
() =>
|
|
526
|
-
const { isDisabled:
|
|
527
|
-
return
|
|
549
|
+
[`b-listbox-multi-select-category--${X.STATIC_CATEGORY}`]: l.staticCategories
|
|
550
|
+
})), c = (E) => {
|
|
551
|
+
E.preventDefault(), t.value = !t.value;
|
|
552
|
+
}, r = (E) => {
|
|
553
|
+
var U;
|
|
554
|
+
const $ = o(E), k = ((U = l.selectedItemsList) == null ? void 0 : U.includes(E.value)) || !1;
|
|
555
|
+
return { isDisabled: $, isPreSelected: k };
|
|
556
|
+
}, h = i(
|
|
557
|
+
() => l.category.items.filter((E) => {
|
|
558
|
+
const { isDisabled: $, isPreSelected: k } = r(E);
|
|
559
|
+
return $ && k || !$;
|
|
528
560
|
})
|
|
529
|
-
), O =
|
|
561
|
+
), O = i(
|
|
530
562
|
() => {
|
|
531
|
-
var
|
|
532
|
-
return (
|
|
533
|
-
({ value:
|
|
534
|
-
var
|
|
535
|
-
return (
|
|
563
|
+
var E;
|
|
564
|
+
return (E = h.value) == null ? void 0 : E.filter(
|
|
565
|
+
({ value: $ }) => {
|
|
566
|
+
var k;
|
|
567
|
+
return (k = l.selectedItemsList) == null ? void 0 : k.includes($);
|
|
536
568
|
}
|
|
537
569
|
);
|
|
538
570
|
}
|
|
539
|
-
),
|
|
540
|
-
const
|
|
541
|
-
return
|
|
542
|
-
}), u =
|
|
571
|
+
), g = i(() => {
|
|
572
|
+
const E = t.value ? "categoryOpened" : "categoryClosed";
|
|
573
|
+
return s(E, { category: l.category.label });
|
|
574
|
+
}), u = i(
|
|
543
575
|
() => ({
|
|
544
576
|
el: "span",
|
|
545
|
-
variant:
|
|
577
|
+
variant: l.staticCategories ? "caption" : "body"
|
|
546
578
|
})
|
|
547
579
|
), I = () => {
|
|
548
|
-
e(
|
|
549
|
-
},
|
|
550
|
-
e(
|
|
551
|
-
}, { isAllSelected:
|
|
580
|
+
e(K.SELECT_CATEGORY);
|
|
581
|
+
}, D = () => {
|
|
582
|
+
e(K.UNSELECT_CATEGORY);
|
|
583
|
+
}, { isAllSelected: f, isIndeterminate: C, toggleSelectAll: A } = de(
|
|
552
584
|
O,
|
|
553
|
-
|
|
585
|
+
h,
|
|
554
586
|
I,
|
|
555
|
-
|
|
556
|
-
),
|
|
557
|
-
|
|
587
|
+
D
|
|
588
|
+
), L = i(() => C.value ? "mixed" : `${f.value}`), y = T(f.value), w = () => {
|
|
589
|
+
y.value = !y.value, A(y.value);
|
|
558
590
|
};
|
|
559
|
-
return
|
|
560
|
-
|
|
591
|
+
return j(f, () => {
|
|
592
|
+
y.value = f.value;
|
|
561
593
|
}), {
|
|
562
594
|
// Values
|
|
563
|
-
chevronTitle:
|
|
595
|
+
chevronTitle: g,
|
|
564
596
|
conditionalClass: S,
|
|
565
597
|
hasAllPropsDisabled: n,
|
|
566
598
|
isOpen: t,
|
|
567
|
-
isAllSelected:
|
|
568
|
-
isIndeterminate:
|
|
599
|
+
isAllSelected: f,
|
|
600
|
+
isIndeterminate: C,
|
|
569
601
|
isStaticCategory: d,
|
|
570
602
|
// Computed
|
|
571
|
-
showItemChildren:
|
|
603
|
+
showItemChildren: v,
|
|
572
604
|
categoryLabelProps: u,
|
|
605
|
+
ariaCheckedComputed: L,
|
|
573
606
|
// Methods
|
|
574
|
-
handleSelectAll:
|
|
575
|
-
toggleOpen:
|
|
576
|
-
toggleSelectAll:
|
|
607
|
+
handleSelectAll: w,
|
|
608
|
+
toggleOpen: c,
|
|
609
|
+
toggleSelectAll: A
|
|
577
610
|
};
|
|
578
611
|
}
|
|
579
612
|
});
|
|
580
|
-
var
|
|
613
|
+
var ft = function() {
|
|
581
614
|
var e = this, t = e._self._c;
|
|
582
|
-
return e._self._setupProxy, t("div", [t("bento-listbox-option", { staticClass: "b-listbox-multi-select-category__option", class: e.conditionalClass, attrs: { tabindex: e.tabindex }, on: { click: e.handleSelectAll, "enter-pressed": e.handleSelectAll, "space-pressed": function(
|
|
583
|
-
return
|
|
584
|
-
} } }, [e.isStaticCategory ? e._e() : t("
|
|
585
|
-
return
|
|
615
|
+
return e._self._setupProxy, t("div", [t("bento-listbox-option", { staticClass: "b-listbox-multi-select-category__option", class: e.conditionalClass, attrs: { tabindex: e.tabindex, "aria-checked": e.ariaCheckedComputed, "aria-disabled": e.hasAllPropsDisabled }, on: { click: e.handleSelectAll, "enter-pressed": e.handleSelectAll, "space-pressed": function(s) {
|
|
616
|
+
return s.preventDefault(), e.handleSelectAll.apply(null, arguments);
|
|
617
|
+
} } }, [e.isStaticCategory ? e._e() : t("listbox-decorative-checkbox", { attrs: { indeterminate: e.isIndeterminate, disabled: e.hasAllPropsDisabled, checked: e.isAllSelected } }), t("span", { staticClass: "b-listbox-multi-select-category__label" }, [t("bento-typography", e._b({ staticClass: "b-listbox-multi-select-category__label-text" }, "bento-typography", e.categoryLabelProps, !1), [e._v(" " + e._s(e.category.label) + " ")]), e.isStaticCategory ? e._e() : t("div", { staticClass: "b-listbox-multi-select-category__label-chevron", attrs: { "data-testid": "toggle-listbox" }, on: { "!click": function(s) {
|
|
618
|
+
return s.stopPropagation(), e.toggleOpen.apply(null, arguments);
|
|
586
619
|
} } }, [e.isOpen ? t("chevron-up-icon", { attrs: { "svg-title": e.chevronTitle } }) : t("chevron-down-icon", { attrs: { "svg-title": e.chevronTitle } })], 1)], 1)], 1), t("div", { directives: [{ name: "show", rawName: "v-show", value: e.showItemChildren, expression: "showItemChildren" }] }, [e._t("default")], 2)], 1);
|
|
587
|
-
},
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
620
|
+
}, bt = [], vt = /* @__PURE__ */ N(
|
|
621
|
+
dt,
|
|
622
|
+
ft,
|
|
623
|
+
bt,
|
|
591
624
|
!1,
|
|
592
625
|
null,
|
|
593
|
-
"
|
|
626
|
+
"8586f887"
|
|
594
627
|
);
|
|
595
|
-
const
|
|
596
|
-
var
|
|
597
|
-
const
|
|
628
|
+
const mt = vt.exports;
|
|
629
|
+
var F = /* @__PURE__ */ ((l) => (l.SELECT_CATEGORY = "select-category", l.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", l.UNSELECT_CATEGORY = "unselect-category", l))(F || {});
|
|
630
|
+
const _t = M({
|
|
598
631
|
name: "listbox-multi-select-options",
|
|
599
632
|
components: {
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
633
|
+
BentoListboxOption: H,
|
|
634
|
+
BentoTypography: Y,
|
|
635
|
+
ListboxMultiSelectCategory: mt,
|
|
636
|
+
ListboxDecorativeCheckbox: ee
|
|
604
637
|
},
|
|
605
638
|
props: {
|
|
606
639
|
/**
|
|
@@ -662,95 +695,95 @@ const it = P({
|
|
|
662
695
|
staticCategories: { type: Boolean, default: !1 }
|
|
663
696
|
},
|
|
664
697
|
emits: [
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
698
|
+
F.TOGGLE_CHECKBOX_SELECTION,
|
|
699
|
+
F.SELECT_CATEGORY,
|
|
700
|
+
F.UNSELECT_CATEGORY
|
|
668
701
|
],
|
|
669
|
-
setup(
|
|
670
|
-
const t = (
|
|
671
|
-
|
|
672
|
-
},
|
|
673
|
-
const r =
|
|
674
|
-
return
|
|
675
|
-
}, n = (
|
|
676
|
-
if (
|
|
677
|
-
const r = n(
|
|
678
|
-
e(r,
|
|
702
|
+
setup(l, { emit: e }) {
|
|
703
|
+
const t = (c) => {
|
|
704
|
+
l.isOptionDisabled(c) || e(F.TOGGLE_CHECKBOX_SELECTION, c);
|
|
705
|
+
}, s = (c) => !!c.items, o = (c) => {
|
|
706
|
+
const r = l.isMultiLevel && l.searching;
|
|
707
|
+
return c.description && (!l.isMultiLevel || r);
|
|
708
|
+
}, n = (c) => c.items ? !!c.items.find((r) => l.selectedItemsList.includes(r.value)) : l.selectedItemsList.includes(c.value), d = (c) => {
|
|
709
|
+
if (s(c)) {
|
|
710
|
+
const r = n(c) ? F.UNSELECT_CATEGORY : F.SELECT_CATEGORY;
|
|
711
|
+
e(r, c);
|
|
679
712
|
} else
|
|
680
|
-
t(
|
|
713
|
+
t(c);
|
|
681
714
|
};
|
|
682
715
|
return {
|
|
683
716
|
// Values
|
|
684
|
-
conditionalClasses:
|
|
685
|
-
"b-listbox-multi-select-options__static-category-option":
|
|
686
|
-
"b-listbox-multi-select-options__category-option":
|
|
717
|
+
conditionalClasses: i(() => ({
|
|
718
|
+
"b-listbox-multi-select-options__static-category-option": l.staticCategories,
|
|
719
|
+
"b-listbox-multi-select-options__category-option": l.categoryItems
|
|
687
720
|
})),
|
|
688
721
|
// Methods
|
|
689
722
|
isOptionSelected: n,
|
|
690
723
|
shouldShowDescription: o,
|
|
691
724
|
toggleCheckboxSelection: t,
|
|
692
725
|
toggleSearchOption: d,
|
|
693
|
-
computedTabindex: (
|
|
726
|
+
computedTabindex: (c) => c + 1 === l.focusedIndex ? 0 : -1,
|
|
694
727
|
// Enums
|
|
695
728
|
BentoListboxEvent: a,
|
|
696
|
-
ListboxMultiSelectOptionsEvent:
|
|
729
|
+
ListboxMultiSelectOptionsEvent: F
|
|
697
730
|
};
|
|
698
731
|
}
|
|
699
732
|
});
|
|
700
|
-
var
|
|
733
|
+
var pt = function() {
|
|
701
734
|
var e = this, t = e._self._c;
|
|
702
|
-
return e._self._setupProxy, t("div", e._l(e.items, function(
|
|
703
|
-
return t("div", { key: `selected-${
|
|
704
|
-
return e.toggleSearchOption(
|
|
735
|
+
return e._self._setupProxy, t("div", e._l(e.items, function(s, o) {
|
|
736
|
+
return t("div", { key: `selected-${s.value}` }, [e.searching && e.isMultiLevel ? [t("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(s) : null, tabindex: e.computedTabindex(o), "aria-checked": `${e.isOptionSelected(s)}`, "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(s) : null }, on: { click: function(n) {
|
|
737
|
+
return e.toggleSearchOption(s);
|
|
705
738
|
}, "enter-pressed": function(n) {
|
|
706
|
-
return e.toggleSearchOption(
|
|
739
|
+
return e.toggleSearchOption(s);
|
|
707
740
|
}, "space-pressed": function(n) {
|
|
708
|
-
return n.preventDefault(), e.toggleSearchOption(
|
|
709
|
-
} } }, [t("
|
|
710
|
-
return [t("span", { staticClass: "b-listbox-multi-select__option-text" }, [t("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(
|
|
711
|
-
}, null,
|
|
712
|
-
return e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY,
|
|
741
|
+
return n.preventDefault(), e.toggleSearchOption(s);
|
|
742
|
+
} } }, [t("listbox-decorative-checkbox", { attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(s) : null, checked: e.isOptionSelected(s) } }), e._t("default", function() {
|
|
743
|
+
return [t("span", { staticClass: "b-listbox-multi-select__option-text" }, [t("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(s.label))]), e.shouldShowDescription(s) ? t("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(s.description) + " ")]) : e._e()], 1)];
|
|
744
|
+
}, null, s)], 2)] : [s.items ? [t("listbox-multi-select-category", { attrs: { category: s, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled, "selected-items-list": e.selectedItemsList, tabindex: e.computedTabindex(o) }, on: { "select-category": function(n) {
|
|
745
|
+
return e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, s);
|
|
713
746
|
}, "unselect-category": function(n) {
|
|
714
|
-
return e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY,
|
|
715
|
-
} } }, [t("listbox-multi-select-options", { attrs: { "category-items": "", items:
|
|
716
|
-
return e.toggleCheckboxSelection(
|
|
747
|
+
return e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, s);
|
|
748
|
+
} } }, [t("listbox-multi-select-options", { attrs: { "category-items": "", items: s.items, "is-option-disabled": e.isOptionDisabled, "focused-index": e.focusedIndex, "is-multi-level": e.isMultiLevel, "static-categories": e.staticCategories, "selected-items-list": e.selectedItemsList, searching: e.searching }, on: { "toggle-checkbox-selection": (n) => e.toggleCheckboxSelection(n) } })], 1)] : t("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(s) : null, tabindex: e.computedTabindex(o), "aria-checked": `${e.isOptionSelected(s)}`, "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(s) : null }, on: { click: function(n) {
|
|
749
|
+
return e.toggleCheckboxSelection(s);
|
|
717
750
|
}, "enter-pressed": function(n) {
|
|
718
|
-
return e.toggleCheckboxSelection(
|
|
751
|
+
return e.toggleCheckboxSelection(s);
|
|
719
752
|
}, "space-pressed": function(n) {
|
|
720
|
-
return n.preventDefault(), e.toggleCheckboxSelection(
|
|
721
|
-
} } }, [t("
|
|
722
|
-
return [t("span", { staticClass: "b-listbox-multi-select__option-text" }, [t("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(
|
|
723
|
-
}, null,
|
|
753
|
+
return n.preventDefault(), e.toggleCheckboxSelection(s);
|
|
754
|
+
} } }, [t("listbox-decorative-checkbox", { attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(s) : null, checked: e.isOptionSelected(s) } }), e._t("default", function() {
|
|
755
|
+
return [t("span", { staticClass: "b-listbox-multi-select__option-text" }, [t("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(s.label))]), e.shouldShowDescription(s) ? t("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(s.description) + " ")]) : e._e()], 1)];
|
|
756
|
+
}, null, s)], 2)]], 2);
|
|
724
757
|
}), 0);
|
|
725
|
-
},
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
758
|
+
}, gt = [], yt = /* @__PURE__ */ N(
|
|
759
|
+
_t,
|
|
760
|
+
pt,
|
|
761
|
+
gt,
|
|
729
762
|
!1,
|
|
730
763
|
null,
|
|
731
|
-
"
|
|
764
|
+
"0f830765"
|
|
732
765
|
);
|
|
733
|
-
const
|
|
734
|
-
const e =
|
|
735
|
-
var
|
|
736
|
-
return !!((
|
|
737
|
-
}), t =
|
|
738
|
-
var
|
|
739
|
-
return e.value ? (
|
|
766
|
+
const ht = yt.exports, Ct = (l) => {
|
|
767
|
+
const e = i(() => {
|
|
768
|
+
var s;
|
|
769
|
+
return !!((s = l.value) != null && s.find(({ items: o }) => !!o));
|
|
770
|
+
}), t = i(() => {
|
|
771
|
+
var s;
|
|
772
|
+
return e.value ? (s = l.value) == null ? void 0 : s.reduce((o, n) => (n.items ? o.push(...n.items.flat()) : o.push(n), o), []) : l.value;
|
|
740
773
|
});
|
|
741
774
|
return {
|
|
742
775
|
isMultiLevelSelect: e,
|
|
743
776
|
flattenedItemsList: t
|
|
744
777
|
};
|
|
745
|
-
},
|
|
778
|
+
}, xt = {
|
|
746
779
|
"en-US": {
|
|
747
780
|
allSelected: "All selected ({total})",
|
|
748
781
|
numberOfTotalSelected: "{number} of {total} selected",
|
|
749
782
|
numbersSelected: "{number} selected",
|
|
750
783
|
selectAll: "Select all ({total})"
|
|
751
784
|
}
|
|
752
|
-
},
|
|
753
|
-
...
|
|
785
|
+
}, St = { i18n: { messages: xt } }, Et = /* @__PURE__ */ M({
|
|
786
|
+
...St,
|
|
754
787
|
__name: "listbox-multi-select",
|
|
755
788
|
props: {
|
|
756
789
|
hasMoreItems: { type: Boolean, default: !1 },
|
|
@@ -762,141 +795,141 @@ const dt = ut.exports, ft = (s) => {
|
|
|
762
795
|
staticCategories: { type: Boolean, default: !1 }
|
|
763
796
|
},
|
|
764
797
|
emits: ["select"],
|
|
765
|
-
setup(
|
|
766
|
-
const t =
|
|
767
|
-
var
|
|
768
|
-
const _ = t.isOptionDisabled(
|
|
798
|
+
setup(l, { emit: e }) {
|
|
799
|
+
const t = l, { t: s } = Z(), o = Se(), n = T(null), d = T(null), v = T(null), S = T(null), c = i(() => t.selectedValues.map(({ value: b }) => b)), { isMultiLevelSelect: r, flattenedItemsList: h } = Ct(G(t, "items")), O = (b) => {
|
|
800
|
+
var x;
|
|
801
|
+
const _ = t.isOptionDisabled(b), m = ((x = c.value) == null ? void 0 : x.includes(b.value)) || !1;
|
|
769
802
|
return { isDisabled: _, isPreSelected: m };
|
|
770
|
-
},
|
|
803
|
+
}, g = i(() => {
|
|
771
804
|
if (t.searching && r)
|
|
772
805
|
return t.items;
|
|
773
|
-
const
|
|
774
|
-
const { isDisabled: m, isPreSelected:
|
|
775
|
-
return m &&
|
|
806
|
+
const b = h.value.filter((_) => {
|
|
807
|
+
const { isDisabled: m, isPreSelected: x } = O(_);
|
|
808
|
+
return m && x || !m;
|
|
776
809
|
});
|
|
777
810
|
return t.selectedValues.forEach((_) => {
|
|
778
|
-
|
|
779
|
-
}),
|
|
780
|
-
}), u =
|
|
811
|
+
b.find((m) => m.value === _.value) || b.push(_);
|
|
812
|
+
}), b;
|
|
813
|
+
}), u = i(
|
|
781
814
|
() => {
|
|
782
|
-
var
|
|
783
|
-
return (
|
|
815
|
+
var b;
|
|
816
|
+
return (b = g.value) == null ? void 0 : b.filter((_) => {
|
|
784
817
|
var m;
|
|
785
818
|
return _.items && r.value && t.searching ? _.items.filter(
|
|
786
|
-
(
|
|
787
|
-
).length === _.items.length : (m =
|
|
819
|
+
(p) => (t.selectedValues ?? []).includes(p.value)
|
|
820
|
+
).length === _.items.length : (m = c.value) == null ? void 0 : m.includes(_.value);
|
|
788
821
|
});
|
|
789
822
|
}
|
|
790
|
-
), I = () => r.value && !t.searching ?
|
|
791
|
-
var
|
|
792
|
-
const
|
|
793
|
-
return m === 0 ?
|
|
794
|
-
}),
|
|
795
|
-
const _ = (
|
|
796
|
-
const { isDisabled:
|
|
797
|
-
return
|
|
798
|
-
}, m =
|
|
823
|
+
), I = () => r.value && !t.searching ? h.value.length : t.items.length, D = i(() => {
|
|
824
|
+
var x;
|
|
825
|
+
const b = g.value.length, _ = I(), m = ((x = u.value) == null ? void 0 : x.length) || 0;
|
|
826
|
+
return m === 0 ? s("selectAll", { total: b }) : m === _ ? s("allSelected", { total: _ }) : m <= _ ? s("numberOfTotalSelected", { number: m, total: _ }) : s("numbersSelected", { number: m });
|
|
827
|
+
}), f = (b) => {
|
|
828
|
+
const _ = (x) => {
|
|
829
|
+
const { isDisabled: p, isPreSelected: P } = O(x);
|
|
830
|
+
return p && P || !p;
|
|
831
|
+
}, m = b.filter(_).filter((x) => !c.value.includes(x.value));
|
|
799
832
|
e("select", [...t.selectedValues, ...m]);
|
|
800
|
-
},
|
|
801
|
-
const _ = (
|
|
802
|
-
const { isDisabled:
|
|
803
|
-
return !(
|
|
804
|
-
}, m =
|
|
805
|
-
e("select",
|
|
833
|
+
}, C = (b) => {
|
|
834
|
+
const _ = (p) => {
|
|
835
|
+
const { isDisabled: P, isPreSelected: he } = O(p);
|
|
836
|
+
return !(P && he);
|
|
837
|
+
}, m = b.filter(_).map(({ value: p }) => p), x = t.selectedValues.filter((p) => !(m != null && m.includes(p.value)));
|
|
838
|
+
e("select", x);
|
|
839
|
+
}, A = () => {
|
|
840
|
+
f(h.value);
|
|
806
841
|
}, L = () => {
|
|
807
|
-
|
|
808
|
-
},
|
|
809
|
-
x(y.value);
|
|
810
|
-
}, { isAllSelected: E, isIndeterminate: C, toggleSelectAll: N } = ue(
|
|
842
|
+
C(h.value);
|
|
843
|
+
}, { isAllSelected: y, isIndeterminate: w, toggleSelectAll: E } = de(
|
|
811
844
|
u,
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
),
|
|
816
|
-
|
|
845
|
+
g,
|
|
846
|
+
A,
|
|
847
|
+
L
|
|
848
|
+
), $ = i(() => w.value ? "mixed" : `${y.value}`), k = T(y.value), U = () => {
|
|
849
|
+
k.value = !k.value, E(k.value);
|
|
817
850
|
};
|
|
818
|
-
|
|
819
|
-
|
|
851
|
+
j(y, () => {
|
|
852
|
+
k.value = y.value;
|
|
820
853
|
});
|
|
821
|
-
const
|
|
822
|
-
|
|
823
|
-
},
|
|
824
|
-
|
|
825
|
-
},
|
|
854
|
+
const R = (b) => {
|
|
855
|
+
f(b.items);
|
|
856
|
+
}, W = (b) => {
|
|
857
|
+
C(b.items);
|
|
858
|
+
}, be = (b, _) => {
|
|
826
859
|
let m = !1;
|
|
827
|
-
const
|
|
828
|
-
m ||
|
|
829
|
-
},
|
|
860
|
+
const x = t.selectedValues.filter(({ value: p }) => _.value === p ? (m = !0, !1) : !0);
|
|
861
|
+
m || x.push(_), e(b, x);
|
|
862
|
+
}, ve = i(() => {
|
|
830
863
|
if (!r.value)
|
|
831
864
|
return t.selectedValues;
|
|
832
|
-
const
|
|
865
|
+
const b = (p) => c.value.includes(p.value), _ = (p) => !t.staticCategories && p.every((P) => b(P));
|
|
833
866
|
return t.items.flatMap(
|
|
834
|
-
(
|
|
835
|
-
).filter((
|
|
836
|
-
}),
|
|
837
|
-
var m,
|
|
838
|
-
const
|
|
839
|
-
return
|
|
840
|
-
}),
|
|
867
|
+
(p) => p.items && !_(p.items) ? p.items : p
|
|
868
|
+
).filter((p) => p.items ? !0 : b(p));
|
|
869
|
+
}), me = i(() => {
|
|
870
|
+
var m, x, p, P;
|
|
871
|
+
const b = ["automatic", "button"].includes(t.lazyLoadType), _ = ((m = t.selectedValues) == null ? void 0 : m.length) > 0 && ((x = u.value) == null ? void 0 : x.length) !== ((p = h.value) == null ? void 0 : p.length);
|
|
872
|
+
return b && t.hasMoreItems ? !!((P = t.selectedValues) != null && P.length) : _;
|
|
873
|
+
}), _e = i(() => ["automatic", "button"].includes(t.lazyLoadType) ? !t.hasMoreItems : !0), te = i(() => ({ label: D, value: y })), se = i(() => [te, ...G(t, "items").value]), le = (b) => {
|
|
841
874
|
var m;
|
|
842
875
|
(m = Array.from(
|
|
843
876
|
n.value.querySelectorAll('[role="option"]')
|
|
844
|
-
).filter((
|
|
877
|
+
).filter((x) => x.checkVisibility())[b]) == null || m.focus();
|
|
845
878
|
}, {
|
|
846
|
-
moveToNextElement:
|
|
847
|
-
moveToPreviousElement:
|
|
848
|
-
moveToFirstElement:
|
|
879
|
+
moveToNextElement: ne,
|
|
880
|
+
moveToPreviousElement: oe,
|
|
881
|
+
moveToFirstElement: ie,
|
|
849
882
|
moveToLastElement: ae,
|
|
850
|
-
preventDefault:
|
|
851
|
-
focusedIndex:
|
|
852
|
-
} =
|
|
883
|
+
preventDefault: V,
|
|
884
|
+
focusedIndex: pe
|
|
885
|
+
} = fe(
|
|
853
886
|
{
|
|
854
|
-
items:
|
|
855
|
-
hasStaticCategories:
|
|
887
|
+
items: T(se),
|
|
888
|
+
hasStaticCategories: G(t, "staticCategories")
|
|
856
889
|
},
|
|
857
|
-
|
|
858
|
-
),
|
|
859
|
-
[
|
|
860
|
-
[
|
|
861
|
-
[
|
|
862
|
-
[
|
|
863
|
-
},
|
|
864
|
-
[
|
|
865
|
-
[
|
|
890
|
+
le
|
|
891
|
+
), ge = {
|
|
892
|
+
[B.ARROW_UP]: (b) => oe(b),
|
|
893
|
+
[B.ARROW_DOWN]: (b) => ne(b),
|
|
894
|
+
[B.HOME]: ie,
|
|
895
|
+
[B.END]: ae
|
|
896
|
+
}, ye = {
|
|
897
|
+
[B.ARROW_UP]: V,
|
|
898
|
+
[B.ARROW_DOWN]: V
|
|
866
899
|
};
|
|
867
|
-
return { __sfc: !0, props: t, emit: e, t:
|
|
900
|
+
return { __sfc: !0, props: t, emit: e, t: s, slots: o, listboxRef: n, selectAllListboxItemsRef: d, selectedListboxItemsRef: v, listboxItemsRef: S, selectedItemsList: c, isMultiLevelSelect: r, flattenedItemsList: h, optionStates: O, enabledItems: g, visibleSelectedList: u, calculateTotalItems: I, selectAllCheckboxText: D, selectAll: f, unselectAll: C, selectAllItems: A, unselectAllItems: L, isAllSelected: y, isIndeterminate: w, toggleSelectAll: E, ariaCheckedComputed: $, isSelectAllOn: k, handleSelectAll: U, selectAllCategory: R, unselectAllCategory: W, toggleCheckboxSelection: be, selectedOptions: ve, showSelectedItems: me, showSelectAllCheckbox: _e, computedselectAllItemRefs: te, computedItems: se, focusItem: le, moveToNextElement: ne, moveToPreviousElement: oe, moveToFirstElement: ie, moveToLastElement: ae, preventDefault: V, focusedIndex: pe, listboxListeners: ge, chipsSectionListeners: ye, ListboxDecorativeCheckbox: ee, BentoTypography: Y, BentoChip: Ae, BentoListboxOption: H, ListboxMultiSelectOptions: ht, vBentoKeyboardNavigationDirective: Q, BentoListboxEvent: a };
|
|
868
901
|
}
|
|
869
902
|
});
|
|
870
|
-
var
|
|
871
|
-
var e = this, t = e._self._c,
|
|
872
|
-
return t("div", { ref: "listboxRef", staticClass: "b-listbox-multi-select" }, [
|
|
873
|
-
return t("li", { key: o.value }, [t(
|
|
874
|
-
o.items ?
|
|
903
|
+
var Ot = function() {
|
|
904
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
905
|
+
return t("div", { ref: "listboxRef", staticClass: "b-listbox-multi-select" }, [s.showSelectedItems ? t("div", [t("ul", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-listbox-multi-select__chips" }, s.chipsSectionListeners), e._l(s.selectedOptions, function(o) {
|
|
906
|
+
return t("li", { key: o.value }, [t(s.BentoChip, { ref: "selectedListboxItemsRef", refInFor: !0, attrs: { disabled: e.isOptionDisabled(o), label: o.label, condensed: "" }, on: { click: function(n) {
|
|
907
|
+
o.items ? s.unselectAllCategory(o) : s.toggleCheckboxSelection("select", o);
|
|
875
908
|
} } })], 1);
|
|
876
|
-
}), 0), t("hr", { staticClass: "b-listbox-multi-select__divider" })]) : e._e(), t("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }] },
|
|
877
|
-
return o.preventDefault(),
|
|
878
|
-
} } }, [t(
|
|
879
|
-
return
|
|
880
|
-
}, "select-category":
|
|
881
|
-
return
|
|
909
|
+
}), 0), t("hr", { staticClass: "b-listbox-multi-select__divider" })]) : e._e(), t("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }] }, s.listboxListeners), [s.showSelectAllCheckbox ? t(s.BentoListboxOption, { ref: "selectAllListboxItemsRef", staticClass: "b-listbox-multi-select__option", attrs: { tabindex: s.focusedIndex === 0 ? 0 : -1, "aria-checked": s.ariaCheckedComputed }, on: { click: s.handleSelectAll, "enter-pressed": s.handleSelectAll, "space-pressed": function(o) {
|
|
910
|
+
return o.preventDefault(), s.handleSelectAll.apply(null, arguments);
|
|
911
|
+
} } }, [t(s.ListboxDecorativeCheckbox, { attrs: { checked: s.isAllSelected, indeterminate: s.isIndeterminate } }), t(s.BentoTypography, { attrs: { el: "span" } }, [e._v(" " + e._s(s.selectAllCheckboxText) + " ")])], 1) : e._e(), s.showSelectAllCheckbox ? t("hr", { staticClass: "b-listbox-multi-select__divider" }) : e._e(), t(s.ListboxMultiSelectOptions, { ref: "listboxItemsRef", attrs: { items: e.items, "is-option-disabled": e.isOptionDisabled, "is-multi-level": s.isMultiLevelSelect, "static-categories": e.staticCategories, searching: e.searching, "selected-items-list": s.selectedItemsList, "focused-index": s.focusedIndex }, on: { "toggle-checkbox-selection": function(o) {
|
|
912
|
+
return s.toggleCheckboxSelection("select", o);
|
|
913
|
+
}, "select-category": s.selectAllCategory, "unselect-category": s.unselectAllCategory, "space-pressed": function(o) {
|
|
914
|
+
return s.toggleCheckboxSelection(s.BentoListboxEvent.SPACE, o);
|
|
882
915
|
}, "tab-pressed": function(o) {
|
|
883
|
-
return
|
|
916
|
+
return s.toggleCheckboxSelection(s.BentoListboxEvent.TAB, o);
|
|
884
917
|
}, "enter-pressed": function(o) {
|
|
885
|
-
return
|
|
886
|
-
} }, scopedSlots: e._u([e._l(
|
|
918
|
+
return s.toggleCheckboxSelection(s.BentoListboxEvent.ENTER, o);
|
|
919
|
+
} }, scopedSlots: e._u([e._l(s.slots, function(o, n) {
|
|
887
920
|
return { key: n, fn: function(d) {
|
|
888
921
|
return [e._t(n, null, null, d)];
|
|
889
922
|
} };
|
|
890
923
|
})], null, !0) })], 1)]);
|
|
891
|
-
},
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
924
|
+
}, Tt = [], At = /* @__PURE__ */ N(
|
|
925
|
+
Et,
|
|
926
|
+
Ot,
|
|
927
|
+
Tt,
|
|
895
928
|
!1,
|
|
896
929
|
null,
|
|
897
|
-
"
|
|
930
|
+
"9645b94f"
|
|
898
931
|
);
|
|
899
|
-
const
|
|
932
|
+
const ue = At.exports, Lt = {
|
|
900
933
|
"en-US": {
|
|
901
934
|
loading: "Loading",
|
|
902
935
|
showMore: "Show more"
|
|
@@ -909,18 +942,18 @@ const re = pt.exports, yt = {
|
|
|
909
942
|
loading: "Carregando",
|
|
910
943
|
showMore: "Mostrar mais"
|
|
911
944
|
}
|
|
912
|
-
},
|
|
945
|
+
}, It = 36, kt = M({
|
|
913
946
|
name: "bento-listbox",
|
|
914
947
|
components: {
|
|
915
|
-
BentoEmptyState:
|
|
916
|
-
BentoListboxSingleSelect:
|
|
917
|
-
BentoListboxMultiSelect:
|
|
918
|
-
BentoTypography:
|
|
919
|
-
BentoLoadingIndicator:
|
|
920
|
-
BentoLoadingButton:
|
|
948
|
+
BentoEmptyState: Oe,
|
|
949
|
+
BentoListboxSingleSelect: nt,
|
|
950
|
+
BentoListboxMultiSelect: ue,
|
|
951
|
+
BentoTypography: Y,
|
|
952
|
+
BentoLoadingIndicator: Ee,
|
|
953
|
+
BentoLoadingButton: De
|
|
921
954
|
},
|
|
922
955
|
directives: { BentoKeyboardNavigationDirective: Q },
|
|
923
|
-
i18n: { messages:
|
|
956
|
+
i18n: { messages: Lt },
|
|
924
957
|
props: {
|
|
925
958
|
/**
|
|
926
959
|
* Defines a string value that labels an interactive element.
|
|
@@ -976,8 +1009,8 @@ const re = pt.exports, yt = {
|
|
|
976
1009
|
*/
|
|
977
1010
|
lazyLoadType: {
|
|
978
1011
|
type: String,
|
|
979
|
-
default:
|
|
980
|
-
validator: (
|
|
1012
|
+
default: z.NONE,
|
|
1013
|
+
validator: (l) => Object.values(z).includes(l)
|
|
981
1014
|
},
|
|
982
1015
|
/**
|
|
983
1016
|
* Indicates the listbox is loading filtered items.
|
|
@@ -1001,7 +1034,7 @@ const re = pt.exports, yt = {
|
|
|
1001
1034
|
*
|
|
1002
1035
|
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
1003
1036
|
*/
|
|
1004
|
-
searching:
|
|
1037
|
+
searching: ue.props.searching,
|
|
1005
1038
|
/**
|
|
1006
1039
|
* The `input` value.
|
|
1007
1040
|
* Providing an empty string or empty array will select no options.
|
|
@@ -1028,87 +1061,87 @@ const re = pt.exports, yt = {
|
|
|
1028
1061
|
a.ESCAPE,
|
|
1029
1062
|
a.TAB
|
|
1030
1063
|
],
|
|
1031
|
-
setup(
|
|
1032
|
-
const
|
|
1033
|
-
var
|
|
1034
|
-
return typeof (
|
|
1064
|
+
setup(l, { emit: e, slots: t }) {
|
|
1065
|
+
const s = T([]), o = G(l, "items"), { t: n } = Z(), d = i(() => l.lazyLoadType !== z.AUTOMATIC), v = i(() => l.lazyLoadType === z.AUTOMATIC), S = () => {
|
|
1066
|
+
var R;
|
|
1067
|
+
return typeof (l == null ? void 0 : l.virtualScroll) == "object" && ((R = l == null ? void 0 : l.virtualScroll) != null && R.itemHeight) ? l.virtualScroll.itemHeight : It;
|
|
1035
1068
|
}, {
|
|
1036
|
-
containerRef:
|
|
1069
|
+
containerRef: c,
|
|
1037
1070
|
containerProps: r,
|
|
1038
|
-
onScroll:
|
|
1071
|
+
onScroll: h,
|
|
1039
1072
|
list: O,
|
|
1040
|
-
wrapperProps:
|
|
1041
|
-
} =
|
|
1073
|
+
wrapperProps: g
|
|
1074
|
+
} = $e(o, {
|
|
1042
1075
|
itemHeight: S(),
|
|
1043
1076
|
// Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
|
|
1044
|
-
disabled: (
|
|
1045
|
-
}), u =
|
|
1046
|
-
() =>
|
|
1047
|
-
), I =
|
|
1048
|
-
() => d.value &&
|
|
1049
|
-
),
|
|
1050
|
-
() => d.value ||
|
|
1051
|
-
),
|
|
1052
|
-
e(
|
|
1053
|
-
},
|
|
1077
|
+
disabled: (l == null ? void 0 : l.multiple) || (l == null ? void 0 : l.virtualScroll) === !1 || (l == null ? void 0 : l.lazyLoadType) !== "none"
|
|
1078
|
+
}), u = i(
|
|
1079
|
+
() => l.componentLoading !== void 0 || d.value ? "true" : void 0
|
|
1080
|
+
), I = i(
|
|
1081
|
+
() => d.value && l.loading || l.componentLoading ? "true" : "false"
|
|
1082
|
+
), D = i(
|
|
1083
|
+
() => d.value || l.componentLoading !== void 0 ? "polite" : void 0
|
|
1084
|
+
), f = (R) => (W) => {
|
|
1085
|
+
e(R, W);
|
|
1086
|
+
}, C = () => {
|
|
1054
1087
|
e(a.SHOW_MORE);
|
|
1055
|
-
},
|
|
1056
|
-
const
|
|
1057
|
-
if (!
|
|
1088
|
+
}, A = Te(() => {
|
|
1089
|
+
const R = c.value;
|
|
1090
|
+
if (!R)
|
|
1058
1091
|
return;
|
|
1059
|
-
const
|
|
1060
|
-
|
|
1061
|
-
}),
|
|
1062
|
-
|
|
1063
|
-
},
|
|
1064
|
-
var
|
|
1065
|
-
return ((
|
|
1066
|
-
}),
|
|
1067
|
-
() =>
|
|
1068
|
-
),
|
|
1069
|
-
() =>
|
|
1070
|
-
),
|
|
1071
|
-
...
|
|
1092
|
+
const W = Math.round(R.scrollTop) + R.clientHeight >= R.scrollHeight;
|
|
1093
|
+
l.hasMoreItems && W && !l.loading && C();
|
|
1094
|
+
}), L = () => {
|
|
1095
|
+
v.value ? A() : h();
|
|
1096
|
+
}, y = i(() => {
|
|
1097
|
+
var R;
|
|
1098
|
+
return ((R = l.items) == null ? void 0 : R.length) === 0;
|
|
1099
|
+
}), w = i(
|
|
1100
|
+
() => l.lazyLoadType === z.BUTTON && l.hasMoreItems
|
|
1101
|
+
), E = i(
|
|
1102
|
+
() => l.loading ? ce.LOADING : ce.START
|
|
1103
|
+
), $ = i(() => l.loading ? n("loading") : n("showMore")), k = i(() => ({
|
|
1104
|
+
...l.emptyState,
|
|
1072
1105
|
variant: "condensed"
|
|
1073
|
-
})),
|
|
1074
|
-
[a.SELECT]:
|
|
1075
|
-
[a.SPACE]:
|
|
1076
|
-
[a.TAB]:
|
|
1077
|
-
[a.ENTER]:
|
|
1106
|
+
})), U = {
|
|
1107
|
+
[a.SELECT]: f(a.SELECT),
|
|
1108
|
+
[a.SPACE]: f(a.SPACE),
|
|
1109
|
+
[a.TAB]: f(a.TAB),
|
|
1110
|
+
[a.ENTER]: f(a.ENTER)
|
|
1078
1111
|
};
|
|
1079
1112
|
return {
|
|
1080
1113
|
// Refs
|
|
1081
|
-
listboxRef:
|
|
1082
|
-
listboxItemRef:
|
|
1114
|
+
listboxRef: c,
|
|
1115
|
+
listboxItemRef: s,
|
|
1083
1116
|
// a11y
|
|
1084
1117
|
ariaAtomic: u,
|
|
1085
1118
|
ariaBusy: I,
|
|
1086
|
-
ariaLive:
|
|
1119
|
+
ariaLive: D,
|
|
1087
1120
|
// Values
|
|
1088
1121
|
containerProps: r,
|
|
1089
|
-
isSearchResultEmpty:
|
|
1090
|
-
limitedEmptyStateProps:
|
|
1091
|
-
loadingButtonState:
|
|
1122
|
+
isSearchResultEmpty: y,
|
|
1123
|
+
limitedEmptyStateProps: k,
|
|
1124
|
+
loadingButtonState: E,
|
|
1092
1125
|
slots: t,
|
|
1093
|
-
shouldDisplayShowMoreButton:
|
|
1094
|
-
showMoreButtonText:
|
|
1126
|
+
shouldDisplayShowMoreButton: w,
|
|
1127
|
+
showMoreButtonText: $,
|
|
1095
1128
|
virtualisedItems: O,
|
|
1096
|
-
wrapperProps:
|
|
1129
|
+
wrapperProps: g,
|
|
1097
1130
|
// Enums
|
|
1098
|
-
BentoKeyboardNavigationKeyDownEvent:
|
|
1131
|
+
BentoKeyboardNavigationKeyDownEvent: B,
|
|
1099
1132
|
BentoListboxEvent: a,
|
|
1100
1133
|
// Methods
|
|
1101
|
-
onListboxContainerScroll:
|
|
1102
|
-
onOptionSelected:
|
|
1103
|
-
emitShowMore:
|
|
1104
|
-
listboxListeners:
|
|
1134
|
+
onListboxContainerScroll: L,
|
|
1135
|
+
onOptionSelected: f,
|
|
1136
|
+
emitShowMore: C,
|
|
1137
|
+
listboxListeners: U
|
|
1105
1138
|
};
|
|
1106
1139
|
}
|
|
1107
1140
|
});
|
|
1108
|
-
var
|
|
1109
|
-
var
|
|
1141
|
+
var Rt = function() {
|
|
1142
|
+
var s;
|
|
1110
1143
|
var e = this, t = e._self._c;
|
|
1111
|
-
return e._self._setupProxy, t("div", { directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", staticClass: "b-listbox", style: (
|
|
1144
|
+
return e._self._setupProxy, t("div", { directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", staticClass: "b-listbox", style: (s = e.containerProps) == null ? void 0 : s.style, attrs: { id: e.id, role: "listbox", tabindex: "-1", "aria-busy": e.ariaBusy, "aria-atomic": e.ariaAtomic, "aria-label": e.ariaLabel, "aria-live": e.ariaLive }, on: { scroll: e.onListboxContainerScroll } }, [t("div", e._b({}, "div", e.wrapperProps, !1), [e.componentLoading ? t("div", { staticClass: "b-listbox__loading-filtered-items" }, [t("bento-loading-indicator")], 1) : e.isSearchResultEmpty ? t("div", { staticClass: "b-listbox__empty-search-message" }, [e.emptyState ? t("bento-empty-state", e._b({}, "bento-empty-state", e.limitedEmptyStateProps, !1)) : t("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.noResultsMessage))])], 1) : [e.multiple ? [t("bento-listbox-multi-select", e._g({ 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(o, n) {
|
|
1112
1145
|
return { key: n, fn: function(d) {
|
|
1113
1146
|
return [e._t(n, null, null, d)];
|
|
1114
1147
|
} };
|
|
@@ -1119,58 +1152,58 @@ var xt = function() {
|
|
|
1119
1152
|
})], null, !0) }, e.listboxListeners))], e.shouldDisplayShowMoreButton ? t("div", { staticClass: "b-listbox__lazy-load" }, [t("bento-loading-button", { attrs: { state: e.loadingButtonState, variant: "secondary" }, on: { "!click": function(o) {
|
|
1120
1153
|
return e.emitShowMore.apply(null, arguments);
|
|
1121
1154
|
} } }, [e._v(" " + e._s(e.showMoreButtonText) + " ")])], 1) : e.loading ? t("div", { staticClass: "b-listbox__lazy-load" }, [t("bento-loading-indicator")], 1) : e._e()]], 2)]);
|
|
1122
|
-
},
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1155
|
+
}, Dt = [], Bt = /* @__PURE__ */ N(
|
|
1156
|
+
kt,
|
|
1157
|
+
Rt,
|
|
1158
|
+
Dt,
|
|
1126
1159
|
!1,
|
|
1127
1160
|
null,
|
|
1128
1161
|
"37a9ab16"
|
|
1129
1162
|
);
|
|
1130
|
-
const
|
|
1131
|
-
for (const t of
|
|
1163
|
+
const Zt = Bt.exports, J = (l, e) => {
|
|
1164
|
+
for (const t of l) {
|
|
1132
1165
|
if (t.value === e)
|
|
1133
1166
|
return t;
|
|
1134
1167
|
if (t.items) {
|
|
1135
|
-
const
|
|
1136
|
-
if (
|
|
1137
|
-
return
|
|
1168
|
+
const s = J(t.items, e);
|
|
1169
|
+
if (s)
|
|
1170
|
+
return s;
|
|
1138
1171
|
}
|
|
1139
1172
|
}
|
|
1140
1173
|
return null;
|
|
1141
|
-
},
|
|
1142
|
-
const o =
|
|
1143
|
-
t.value ? n.value = r.map(({ value:
|
|
1144
|
-
},
|
|
1145
|
-
t.value ? n.value = r.map(({ value:
|
|
1174
|
+
}, $t = (l) => typeof l == "object" && l !== null && "value" in l && "label" in l, Qt = (l, e, t, s) => {
|
|
1175
|
+
const o = T([]), n = T(), d = (r) => {
|
|
1176
|
+
t.value ? n.value = r.map(({ value: h }) => h) : n.value = r.length > 0 ? r[0].value : null;
|
|
1177
|
+
}, v = (r) => {
|
|
1178
|
+
t.value ? n.value = r.map(({ value: h, label: O }) => ({ value: h, label: O })) : n.value = r.length > 0 ? { value: r[0].value, label: r[0].label } : null;
|
|
1146
1179
|
}, S = (r) => {
|
|
1147
|
-
o.value = r,
|
|
1148
|
-
},
|
|
1180
|
+
o.value = r, s != null && s.value ? v(r) : d(r);
|
|
1181
|
+
}, c = () => {
|
|
1149
1182
|
o.value = [], n.value = null;
|
|
1150
1183
|
};
|
|
1151
|
-
return
|
|
1152
|
-
|
|
1184
|
+
return j(
|
|
1185
|
+
() => e.value,
|
|
1153
1186
|
() => {
|
|
1154
1187
|
if (!e.value && e.value !== 0) {
|
|
1155
|
-
|
|
1188
|
+
c();
|
|
1156
1189
|
return;
|
|
1157
1190
|
}
|
|
1158
|
-
const r = !Array.isArray(e.value),
|
|
1159
|
-
|
|
1160
|
-
const O = (
|
|
1161
|
-
if (
|
|
1162
|
-
o.value.push(
|
|
1191
|
+
const r = !Array.isArray(e.value), h = [...o.value];
|
|
1192
|
+
c();
|
|
1193
|
+
const O = (g) => {
|
|
1194
|
+
if ($t(g))
|
|
1195
|
+
o.value.push(g);
|
|
1163
1196
|
else {
|
|
1164
|
-
let u =
|
|
1165
|
-
u || (u =
|
|
1197
|
+
let u = J(l.value, g);
|
|
1198
|
+
u || (u = J(h, g)), u || (u = { value: g, label: g.toString() }), o.value.push(u);
|
|
1166
1199
|
}
|
|
1167
1200
|
};
|
|
1168
1201
|
if (r) {
|
|
1169
|
-
const
|
|
1170
|
-
O(
|
|
1202
|
+
const g = e.value;
|
|
1203
|
+
O(g), s != null && s.value ? v(o.value) : d(o.value);
|
|
1171
1204
|
return;
|
|
1172
1205
|
}
|
|
1173
|
-
e.value.forEach(O),
|
|
1206
|
+
e.value.forEach(O), s != null && s.value ? v(o.value) : d(o.value);
|
|
1174
1207
|
},
|
|
1175
1208
|
{ immediate: !0 }
|
|
1176
1209
|
), {
|
|
@@ -1178,15 +1211,15 @@ const Ut = Et.exports, V = (s, e) => {
|
|
|
1178
1211
|
cachedSelectedListboxOptions: o,
|
|
1179
1212
|
cachedListboxSelectedValues: n,
|
|
1180
1213
|
// Methods
|
|
1181
|
-
resetCache:
|
|
1214
|
+
resetCache: c,
|
|
1182
1215
|
setCachedValues: S
|
|
1183
1216
|
};
|
|
1184
1217
|
};
|
|
1185
1218
|
export {
|
|
1186
|
-
|
|
1219
|
+
z as B,
|
|
1187
1220
|
a,
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1221
|
+
Zt as b,
|
|
1222
|
+
Qt as c,
|
|
1223
|
+
Ct as u
|
|
1191
1224
|
};
|
|
1192
|
-
//# sourceMappingURL=use-cached-selected-values.
|
|
1225
|
+
//# sourceMappingURL=use-cached-selected-values.CDBmVxYM.js.map
|