@adyen/bento-vue2 1.90.0 → 1.91.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/components.d.ts +2 -0
- package/dist/@types/index.d.ts +254 -109
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.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/data-grid.css +1 -1
- package/dist/assets/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/draggable-handle.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/error-message.css +1 -1
- package/dist/assets/field-label.css +1 -0
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/input-time.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.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.B63qIiiH.js → action-bar.Dj830k6L.js} +3 -3
- package/dist/chunks/{action-bar.B63qIiiH.js.map → action-bar.Dj830k6L.js.map} +1 -1
- package/dist/chunks/{ai-tag.CCJCOdXu.js → ai-tag.AyG2UWCB.js} +2 -2
- package/dist/chunks/{ai-tag.CCJCOdXu.js.map → ai-tag.AyG2UWCB.js.map} +1 -1
- package/dist/chunks/{base-modal.DpmeDmq-.js → base-modal.C52VMtnd.js} +4 -4
- package/dist/chunks/{base-modal.DpmeDmq-.js.map → base-modal.C52VMtnd.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.ChTUOsZl.js → button-actions-with-menu.OsPQ-POD.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.ChTUOsZl.js.map → button-actions-with-menu.OsPQ-POD.js.map} +1 -1
- package/dist/chunks/{button-actions.BmU1DngD.js → button-actions.Bdbu0bvt.js} +2 -2
- package/dist/chunks/{button-actions.BmU1DngD.js.map → button-actions.Bdbu0bvt.js.map} +1 -1
- package/dist/chunks/{calendar.uvIGF_jU.js → calendar.CqsfThnC.js} +271 -253
- package/dist/chunks/calendar.CqsfThnC.js.map +1 -0
- package/dist/chunks/{card.WWUfBkqf.js → card.8z7UQeVK.js} +2 -2
- package/dist/chunks/{card.WWUfBkqf.js.map → card.8z7UQeVK.js.map} +1 -1
- package/dist/chunks/{checkbox-group.CI0xDnql.js → checkbox-group.Dur2Edtw.js} +4 -4
- package/dist/chunks/{checkbox-group.CI0xDnql.js.map → checkbox-group.Dur2Edtw.js.map} +1 -1
- package/dist/chunks/{checkbox.TsWA6O3Z.js → checkbox.vNjt6QDJ.js} +18 -18
- package/dist/chunks/{checkbox.TsWA6O3Z.js.map → checkbox.vNjt6QDJ.js.map} +1 -1
- package/dist/chunks/{click-outside.CDz_x8mN.js → click-outside.BG01Sm0A.js} +2 -2
- package/dist/chunks/{click-outside.CDz_x8mN.js.map → click-outside.BG01Sm0A.js.map} +1 -1
- package/dist/chunks/{code-snippet.4DX9iUV8.js → code-snippet.BVpFBhKq.js} +3 -3
- package/dist/chunks/{code-snippet.4DX9iUV8.js.map → code-snippet.BVpFBhKq.js.map} +1 -1
- package/dist/chunks/{controls-group.D_KE99mg.js → controls-group.DSm2Ujwt.js} +2 -2
- package/dist/chunks/{controls-group.D_KE99mg.js.map → controls-group.DSm2Ujwt.js.map} +1 -1
- package/dist/chunks/{dashboard-section.TWlLdQHG.js → dashboard-section.DNxNVV44.js} +2 -2
- package/dist/chunks/{dashboard-section.TWlLdQHG.js.map → dashboard-section.DNxNVV44.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CpDuQ3Fo.js → dashed-underline.DL2_sik5.js} +2 -2
- package/dist/chunks/{dashed-underline.CpDuQ3Fo.js.map → dashed-underline.DL2_sik5.js.map} +1 -1
- package/dist/chunks/{data-grid-template.DZaE-kOS.js → data-grid-template.BFv1zr6g.js} +2 -2
- package/dist/chunks/{data-grid-template.DZaE-kOS.js.map → data-grid-template.BFv1zr6g.js.map} +1 -1
- package/dist/chunks/{data-grid.x6cEW0az.js → data-grid.ZHY5EzP3.js} +318 -316
- package/dist/chunks/{data-grid.x6cEW0az.js.map → data-grid.ZHY5EzP3.js.map} +1 -1
- package/dist/chunks/date-picker.kl6aFlr1.js +237 -0
- package/dist/chunks/date-picker.kl6aFlr1.js.map +1 -0
- package/dist/chunks/{date-range-picker.DPGy2h-9.js → date-range-picker.LCWVAa5R.js} +412 -391
- package/dist/chunks/date-range-picker.LCWVAa5R.js.map +1 -0
- package/dist/chunks/{directive.rXUeDb8p.js → directive.Bfr4fuOy.js} +2 -2
- package/dist/chunks/{directive.rXUeDb8p.js.map → directive.Bfr4fuOy.js.map} +1 -1
- package/dist/{draggable-handle.js → chunks/draggable-handle.Ba28eM8o.js} +49 -40
- package/dist/chunks/draggable-handle.Ba28eM8o.js.map +1 -0
- package/dist/chunks/{dropdown-tag.t3FlJUSy.js → dropdown-tag.B61hPq5n.js} +2 -2
- package/dist/chunks/{dropdown-tag.t3FlJUSy.js.map → dropdown-tag.B61hPq5n.js.map} +1 -1
- package/dist/chunks/dropdown.Ca-f8tdX.js +1140 -0
- package/dist/chunks/dropdown.Ca-f8tdX.js.map +1 -0
- package/dist/chunks/error-message.CyERcfdt.js +72 -0
- package/dist/chunks/error-message.CyERcfdt.js.map +1 -0
- package/dist/chunks/field-label.DjjjkcO6.js +97 -0
- package/dist/chunks/field-label.DjjjkcO6.js.map +1 -0
- package/dist/chunks/{file-uploader.Cig5gDXT.js → file-uploader.DeWmLpfp.js} +5 -4
- package/dist/chunks/{file-uploader.Cig5gDXT.js.map → file-uploader.DeWmLpfp.js.map} +1 -1
- package/dist/chunks/{filter-bar.x445KK3y.js → filter-bar.Bd4ghW_B.js} +888 -871
- package/dist/chunks/filter-bar.Bd4ghW_B.js.map +1 -0
- package/dist/chunks/{footer-actions.CIkul1OD.js → footer-actions.CvUaoMzj.js} +2 -2
- package/dist/chunks/{footer-actions.CIkul1OD.js.map → footer-actions.CvUaoMzj.js.map} +1 -1
- package/dist/chunks/{form-layout-title.DR5M7GP3.js → form-layout-title.DzGajv4U.js} +70 -61
- package/dist/chunks/form-layout-title.DzGajv4U.js.map +1 -0
- package/dist/chunks/{header-meta.BC5fdpD1.js → header-meta.AXUGoqDd.js} +2 -2
- package/dist/chunks/{header-meta.BC5fdpD1.js.map → header-meta.AXUGoqDd.js.map} +1 -1
- package/dist/chunks/{header-with-views.-cvdi9-L.js → header-with-views.Ba4dswJF.js} +10 -10
- package/dist/chunks/{header-with-views.-cvdi9-L.js.map → header-with-views.Ba4dswJF.js.map} +1 -1
- package/dist/chunks/{header.DtmZjxiU.js → header.C7B7RBib.js} +3 -3
- package/dist/chunks/{header.DtmZjxiU.js.map → header.C7B7RBib.js.map} +1 -1
- package/dist/chunks/{input-field-password.Bdlw4dzr.js → input-field-password.BNAtIn_D.js} +4 -4
- package/dist/chunks/{input-field-password.Bdlw4dzr.js.map → input-field-password.BNAtIn_D.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.DPuWxBBz.js → input-field-phone-number.CEYx1s4b.js} +3 -3
- package/dist/chunks/{input-field-phone-number.DPuWxBBz.js.map → input-field-phone-number.CEYx1s4b.js.map} +1 -1
- package/dist/chunks/{input-field.DH25CU_G.js → input-field.Dh5W0Az-.js} +74 -70
- package/dist/chunks/input-field.Dh5W0Az-.js.map +1 -0
- package/dist/chunks/input-time.BLuMfakv.js +135 -0
- package/dist/chunks/input-time.BLuMfakv.js.map +1 -0
- package/dist/chunks/{modal-fullscreen.CaxuXW-H.js → modal-fullscreen.DTvg2NLk.js} +2 -2
- package/dist/chunks/{modal-fullscreen.CaxuXW-H.js.map → modal-fullscreen.DTvg2NLk.js.map} +1 -1
- package/dist/chunks/{modal.Brif0vAy.js → modal.D_TcWTkf.js} +4 -4
- package/dist/chunks/{modal.Brif0vAy.js.map → modal.D_TcWTkf.js.map} +1 -1
- package/dist/chunks/on-click-outside.Cy1eFULD.js +109 -0
- package/dist/chunks/on-click-outside.Cy1eFULD.js.map +1 -0
- package/dist/chunks/{pagination.BmrU_sn_.js → pagination.D6BxMw5L.js} +37 -37
- package/dist/chunks/{pagination.BmrU_sn_.js.map → pagination.D6BxMw5L.js.map} +1 -1
- package/dist/chunks/{radio-group.5oS-AeYN.js → radio-group.Bb-L-0io.js} +3 -3
- package/dist/chunks/{radio-group.5oS-AeYN.js.map → radio-group.Bb-L-0io.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.DSGTe8Zt.js → rich-text-editor.Dtdfh-0V.js} +6 -5
- package/dist/chunks/{rich-text-editor.DSGTe8Zt.js.map → rich-text-editor.Dtdfh-0V.js.map} +1 -1
- package/dist/chunks/{search-bar.CNfoeLLt.js → search-bar.MVJS9-Mh.js} +4 -4
- package/dist/chunks/{search-bar.CNfoeLLt.js.map → search-bar.MVJS9-Mh.js.map} +1 -1
- package/dist/chunks/{secondary-nav.IF5CgeIP.js → secondary-nav.C-nPZR-2.js} +2 -2
- package/dist/chunks/{secondary-nav.IF5CgeIP.js.map → secondary-nav.C-nPZR-2.js.map} +1 -1
- package/dist/chunks/{selection-card-group.DZjFeQKR.js → selection-card-group.CLJPaknG.js} +10 -10
- package/dist/chunks/{selection-card-group.DZjFeQKR.js.map → selection-card-group.CLJPaknG.js.map} +1 -1
- package/dist/chunks/{sidepanel.DZDXuyzg.js → sidepanel.BTRfwGiS.js} +4 -4
- package/dist/chunks/{sidepanel.DZDXuyzg.js.map → sidepanel.BTRfwGiS.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.CrPNQbX0.js → summary-grid.types.DUIqCmwg.js} +2 -2
- package/dist/chunks/{summary-grid.types.CrPNQbX0.js.map → summary-grid.types.DUIqCmwg.js.map} +1 -1
- package/dist/chunks/{textarea.Bi53QF5Q.js → textarea.CJS-1I41.js} +5 -4
- package/dist/chunks/{textarea.Bi53QF5Q.js.map → textarea.CJS-1I41.js.map} +1 -1
- package/dist/chunks/{timeline-item.C6Bi0eam.js → timeline-item.BOUWkLi1.js} +4 -4
- package/dist/chunks/{timeline-item.C6Bi0eam.js.map → timeline-item.BOUWkLi1.js.map} +1 -1
- package/dist/chunks/{tutorial.BCiZMLJE.js → tutorial.CZt_mcuT.js} +2 -2
- package/dist/chunks/{tutorial.BCiZMLJE.js.map → tutorial.CZt_mcuT.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.Bn3Y8Iuq.js → use-cached-selected-values.BJbWbkEQ.js} +180 -175
- package/dist/chunks/use-cached-selected-values.BJbWbkEQ.js.map +1 -0
- package/dist/chunks/{use-date-input-formatter.DRMt9yR2.js → use-date-input-formatter.Djf8AoLr.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.DRMt9yR2.js.map → use-date-input-formatter.Djf8AoLr.js.map} +1 -1
- package/dist/chunks/use-touch-device.DTqFAbXh.js +11 -0
- package/dist/chunks/use-touch-device.DTqFAbXh.js.map +1 -0
- package/dist/click-outside.js +1 -1
- package/dist/code-snippet.js +1 -1
- 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 +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/draggable.js +1396 -0
- package/dist/draggable.js.map +1 -0
- package/dist/dropdown.js +11 -12
- package/dist/dropdown.js.map +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +274 -271
- 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/input-time.js +1 -1
- package/dist/internal.js +24 -23
- package/dist/internal.js.map +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- 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 +100 -4
- package/package.json +8 -13
- package/dist/assets/dropdown-default-textbox.css +0 -1
- package/dist/chunks/calendar.uvIGF_jU.js.map +0 -1
- package/dist/chunks/date-picker.Dln8ocL4.js +0 -222
- package/dist/chunks/date-picker.Dln8ocL4.js.map +0 -1
- package/dist/chunks/date-range-picker.DPGy2h-9.js.map +0 -1
- package/dist/chunks/debounce.DUTu11PS.js +0 -10
- package/dist/chunks/debounce.DUTu11PS.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.CjhLIxVq.js +0 -364
- package/dist/chunks/dropdown-default-textbox.CjhLIxVq.js.map +0 -1
- package/dist/chunks/dropdown.CvNI2V33.js +0 -790
- package/dist/chunks/dropdown.CvNI2V33.js.map +0 -1
- package/dist/chunks/error-message.BUNKRa_w.js +0 -160
- package/dist/chunks/error-message.BUNKRa_w.js.map +0 -1
- package/dist/chunks/filter-bar.x445KK3y.js.map +0 -1
- package/dist/chunks/form-layout-title.DR5M7GP3.js.map +0 -1
- package/dist/chunks/input-field.DH25CU_G.js.map +0 -1
- package/dist/chunks/input-time.6eJ4-QdU.js +0 -92
- package/dist/chunks/input-time.6eJ4-QdU.js.map +0 -1
- package/dist/chunks/on-click-outside.BW4rkhzG.js +0 -91
- package/dist/chunks/on-click-outside.BW4rkhzG.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.Bn3Y8Iuq.js.map +0 -1
- package/dist/draggable-handle.js.map +0 -1
|
@@ -1,790 +0,0 @@
|
|
|
1
|
-
import { ref as g, watch as ee, computed as c, defineComponent as A, useSlots as Se, toRefs as we, nextTick as C, useAttrs as Re, toRef as L, inject as ke } from "vue";
|
|
2
|
-
import { d as X, B as Fe } from "./typography.C8lPlsbD.js";
|
|
3
|
-
import { a as Z, b as k, c as Pe, B as V, D as $e } from "./dropdown-default-textbox.CjhLIxVq.js";
|
|
4
|
-
/* empty css */
|
|
5
|
-
import { n as P } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
6
|
-
import { s as Q } from "./events.BQOQSSb7.js";
|
|
7
|
-
import { g as F } from "./generate-uid.NJ8tVoha.js";
|
|
8
|
-
import { u as Ke } from "./aria-label.CaUURpnB.js";
|
|
9
|
-
import { u as te } from "./index.B6WW_F-J.js";
|
|
10
|
-
import { u as ze } from "./form-field.D_2g7vaP.js";
|
|
11
|
-
import { B as u, b as G, a as ye, u as Ve, c as qe, d as We } from "./use-cached-selected-values.Bn3Y8Iuq.js";
|
|
12
|
-
import { u as Ue } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
13
|
-
import { d as je } from "./debounce.DUTu11PS.js";
|
|
14
|
-
import { u as He } from "./use-has-slot.C9lQZ6nz.js";
|
|
15
|
-
import { B as E, a as Je } from "./keyboard-navigation.DWmhelVv.js";
|
|
16
|
-
import { B as Ye } from "./directive.rXUeDb8p.js";
|
|
17
|
-
import { F as Xe, E as Ze } from "./error-message.BUNKRa_w.js";
|
|
18
|
-
import { P as _e } from "./popper-container.C_n9Ds1W.js";
|
|
19
|
-
import { h as Qe } from "./button-actions.BmU1DngD.js";
|
|
20
|
-
import "../assets/dropdown.css";
|
|
21
|
-
const Ge = {
|
|
22
|
-
"de-DE": {
|
|
23
|
-
apply: "Anwenden",
|
|
24
|
-
cancel: "Abbrechen",
|
|
25
|
-
noOptionsMatchThisSearch: "Für diese Suche wurden keine Ergebnisse gefunden."
|
|
26
|
-
},
|
|
27
|
-
"en-GB": {
|
|
28
|
-
apply: "Apply",
|
|
29
|
-
cancel: "Cancel",
|
|
30
|
-
noOptionsMatchThisSearch: "No options match this search"
|
|
31
|
-
},
|
|
32
|
-
"en-US": {
|
|
33
|
-
apply: "Apply",
|
|
34
|
-
cancel: "Cancel",
|
|
35
|
-
noOptionsMatchThisSearch: "No options match this search"
|
|
36
|
-
},
|
|
37
|
-
"es-ES": {
|
|
38
|
-
apply: "Aplicar",
|
|
39
|
-
cancel: "Cancelar",
|
|
40
|
-
noOptionsMatchThisSearch: "No hay opciones que coincidan con esta búsqueda"
|
|
41
|
-
},
|
|
42
|
-
"es-MX": {
|
|
43
|
-
apply: "Aplicar",
|
|
44
|
-
cancel: "Cancelar",
|
|
45
|
-
noOptionsMatchThisSearch: "No hay opciones que coincidan con esta búsqueda"
|
|
46
|
-
},
|
|
47
|
-
"fr-FR": {
|
|
48
|
-
apply: "Appliquer",
|
|
49
|
-
cancel: "Annuler",
|
|
50
|
-
noOptionsMatchThisSearch: "Aucune option ne correspond à cette recherche"
|
|
51
|
-
},
|
|
52
|
-
"it-IT": {
|
|
53
|
-
apply: "Applica",
|
|
54
|
-
cancel: "Annulla",
|
|
55
|
-
noOptionsMatchThisSearch: "Nessun risultato corrispondente a questa ricerca"
|
|
56
|
-
},
|
|
57
|
-
"ja-JP": {
|
|
58
|
-
apply: "適用",
|
|
59
|
-
cancel: "キャンセル",
|
|
60
|
-
noOptionsMatchThisSearch: "この検索に一致するオプションはありません"
|
|
61
|
-
},
|
|
62
|
-
"pt-BR": {
|
|
63
|
-
apply: "Aplicar",
|
|
64
|
-
cancel: "Cancelar",
|
|
65
|
-
noOptionsMatchThisSearch: "Nenhuma opção corresponde a esta busca"
|
|
66
|
-
},
|
|
67
|
-
"zh-CN": {
|
|
68
|
-
apply: "应用",
|
|
69
|
-
cancel: "取消",
|
|
70
|
-
noOptionsMatchThisSearch: "没有符合此搜索条件的选项"
|
|
71
|
-
}
|
|
72
|
-
}, et = (n, t, a, e) => {
|
|
73
|
-
const o = g(n.value), { t: l } = te();
|
|
74
|
-
ee(n, () => {
|
|
75
|
-
o.value = n.value;
|
|
76
|
-
});
|
|
77
|
-
const i = c(
|
|
78
|
-
() => JSON.stringify(o.value) === JSON.stringify(n.value)
|
|
79
|
-
), r = () => {
|
|
80
|
-
e(u.SELECT, o.value), e(u.CLOSE_DROPDOWN);
|
|
81
|
-
}, b = () => {
|
|
82
|
-
o.value = n.value, e(u.CLOSE_DROPDOWN);
|
|
83
|
-
}, y = () => {
|
|
84
|
-
a.value && t.value && (o.value = n.value);
|
|
85
|
-
}, p = c(() => [
|
|
86
|
-
{
|
|
87
|
-
title: l("apply"),
|
|
88
|
-
event: r,
|
|
89
|
-
disabled: i.value
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
title: l("cancel"),
|
|
93
|
-
event: b
|
|
94
|
-
}
|
|
95
|
-
]), f = (d) => {
|
|
96
|
-
o.value = d, t.value || e(u.SELECT, d);
|
|
97
|
-
}, s = (d) => {
|
|
98
|
-
f(d), e(u.TAB);
|
|
99
|
-
}, h = (d) => {
|
|
100
|
-
f(d), e(u.ENTER);
|
|
101
|
-
}, m = (d) => {
|
|
102
|
-
f(d), e(u.SPACE);
|
|
103
|
-
}, O = () => {
|
|
104
|
-
b(), e(u.ESCAPE);
|
|
105
|
-
}, x = () => {
|
|
106
|
-
e(u.SHOW_MORE);
|
|
107
|
-
}, w = {
|
|
108
|
-
[u.SELECT]: f,
|
|
109
|
-
[u.SHOW_MORE]: x,
|
|
110
|
-
[u.TAB]: s,
|
|
111
|
-
[u.SPACE]: m,
|
|
112
|
-
[u.ENTER]: h
|
|
113
|
-
};
|
|
114
|
-
return {
|
|
115
|
-
// Values
|
|
116
|
-
actions: p,
|
|
117
|
-
internalSelectedValue: o,
|
|
118
|
-
// Methods
|
|
119
|
-
listeners: w,
|
|
120
|
-
onEscapeKey: O,
|
|
121
|
-
onOutsideDropdownClick: y
|
|
122
|
-
};
|
|
123
|
-
}, tt = A({
|
|
124
|
-
i18n: { messages: Ge },
|
|
125
|
-
name: "bento-dropdown-options-container"
|
|
126
|
-
}), at = /* @__PURE__ */ A({
|
|
127
|
-
...tt,
|
|
128
|
-
props: {
|
|
129
|
-
/**
|
|
130
|
-
* Defines a string value that labels an interactive element.
|
|
131
|
-
*/
|
|
132
|
-
ariaLabel: { type: String, default: null },
|
|
133
|
-
/**
|
|
134
|
-
* Indicates that dropdown items are loading
|
|
135
|
-
*/
|
|
136
|
-
componentLoading: { type: Boolean, default: !1 },
|
|
137
|
-
/**
|
|
138
|
-
* Empty state props used with the inner empty state component which is displayed when no search results are found.
|
|
139
|
-
*/
|
|
140
|
-
emptyState: {
|
|
141
|
-
type: Object,
|
|
142
|
-
default: void 0
|
|
143
|
-
},
|
|
144
|
-
/**
|
|
145
|
-
* Disables dropdown functionality
|
|
146
|
-
*/
|
|
147
|
-
disabled: { type: Boolean, default: !1 },
|
|
148
|
-
/**
|
|
149
|
-
* Indicates whether there are more items to load
|
|
150
|
-
*/
|
|
151
|
-
hasMoreItems: { type: Boolean, default: !1 },
|
|
152
|
-
/**
|
|
153
|
-
* Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.
|
|
154
|
-
*/
|
|
155
|
-
id: { type: String, required: !0 },
|
|
156
|
-
/**
|
|
157
|
-
* Function that allows the options to be disabled
|
|
158
|
-
*
|
|
159
|
-
* @type {BentoDropdownIsOptionDisabled}
|
|
160
|
-
* @param {BentoDropdownOptionItem} option - Dropdown option object
|
|
161
|
-
* @param {string} option.label - Option's label text
|
|
162
|
-
* @param {string|number} option.value - Option's value
|
|
163
|
-
* @param {unknown} option.data - Option's extra data to be passed to the default slot
|
|
164
|
-
*/
|
|
165
|
-
isOptionDisabled: {
|
|
166
|
-
type: Function,
|
|
167
|
-
default: void 0
|
|
168
|
-
},
|
|
169
|
-
/**
|
|
170
|
-
* The option elements to populate the dropdown with.
|
|
171
|
-
* It must be an array of {@see BentoDropdownOptionItem }
|
|
172
|
-
* * @property {string} value.label - Text to be displayed in the option
|
|
173
|
-
* * @property {string,number} value.value - Value of the option
|
|
174
|
-
*/
|
|
175
|
-
items: {
|
|
176
|
-
type: Array,
|
|
177
|
-
required: !0
|
|
178
|
-
},
|
|
179
|
-
/**
|
|
180
|
-
* The type of `Lazy Load`.
|
|
181
|
-
* Type "automatic" will enable infinite scrolling
|
|
182
|
-
* Type "button" will enable lazy loading with "Show more" button
|
|
183
|
-
*/
|
|
184
|
-
lazyLoadType: {
|
|
185
|
-
type: String,
|
|
186
|
-
default: ye.AUTOMATIC,
|
|
187
|
-
validator: (n) => Object.values(ye).includes(n)
|
|
188
|
-
},
|
|
189
|
-
/**
|
|
190
|
-
* Indicates if new options are lazy loading.
|
|
191
|
-
*/
|
|
192
|
-
loading: { type: Boolean, default: !1 },
|
|
193
|
-
/**
|
|
194
|
-
* If enabled, the user will be able to select multiple items.
|
|
195
|
-
*/
|
|
196
|
-
multiple: { type: Boolean, default: !1 },
|
|
197
|
-
/**
|
|
198
|
-
* Indicates if the dropdown is open so that
|
|
199
|
-
* the container can be displayed.
|
|
200
|
-
*/
|
|
201
|
-
open: { type: Boolean, required: !0 },
|
|
202
|
-
/**
|
|
203
|
-
* The `input` value.
|
|
204
|
-
* Providing an empty string or empty array will select no options.
|
|
205
|
-
* Set to an empty string `''` if you don't want any of the available options to be selected for single select
|
|
206
|
-
*/
|
|
207
|
-
selectedValue: {
|
|
208
|
-
type: Array,
|
|
209
|
-
default: null
|
|
210
|
-
},
|
|
211
|
-
/**
|
|
212
|
-
* Flag that indicates that an external search it's being made
|
|
213
|
-
* to filter out the items inside the the multi-select listbox
|
|
214
|
-
*
|
|
215
|
-
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
216
|
-
*/
|
|
217
|
-
searching: G.props.searching,
|
|
218
|
-
/**
|
|
219
|
-
* If enabled, dropdown will display non-selectable, static categories
|
|
220
|
-
*/
|
|
221
|
-
staticCategories: { type: Boolean, default: !1 },
|
|
222
|
-
/**
|
|
223
|
-
* Reference to the DOM element or Vue component for positioning
|
|
224
|
-
* the Dropdown container.
|
|
225
|
-
*/
|
|
226
|
-
targetElement: { type: _e.props.targetElement.type, required: !0 },
|
|
227
|
-
/**
|
|
228
|
-
* Enables virtual scrolling if set to true or by providing an object with itemHeight function.
|
|
229
|
-
* The itemHeight function is used to calculate the height of rendered item given it's index.
|
|
230
|
-
*/
|
|
231
|
-
virtualScroll: {
|
|
232
|
-
type: [Boolean, Object],
|
|
233
|
-
default: !1
|
|
234
|
-
}
|
|
235
|
-
},
|
|
236
|
-
emits: [],
|
|
237
|
-
setup(n, { expose: t, emit: a }) {
|
|
238
|
-
const e = n, o = Se(), { selectedValue: l, multiple: i } = we(e), r = g(null), { t: b } = te(), y = c(() => e.open && !e.disabled), p = c(() => b("noOptionsMatchThisSearch")), f = c(() => ({
|
|
239
|
-
"b-dropdown-options-container--single": !(e != null && e.multiple)
|
|
240
|
-
})), s = c(() => ({
|
|
241
|
-
"b-dropdown-options-container__listbox--single": !(e != null && e.multiple)
|
|
242
|
-
})), { actions: h, internalSelectedValue: m, listeners: O, onEscapeKey: x, onOutsideDropdownClick: w } = et(l, i, y, a), d = c(() => e != null && e.multiple ? Qe : _e), T = c(() => {
|
|
243
|
-
var B;
|
|
244
|
-
const D = {
|
|
245
|
-
"min-width": `${(B = e == null ? void 0 : e.targetElement) == null ? void 0 : B.clientWidth}px`,
|
|
246
|
-
"max-width": "min(500px, 95%)"
|
|
247
|
-
};
|
|
248
|
-
return e != null && e.multiple ? {
|
|
249
|
-
actionsLayout: "space-between",
|
|
250
|
-
ariaLabel: e.ariaLabel,
|
|
251
|
-
actions: h.value,
|
|
252
|
-
divider: !0,
|
|
253
|
-
fallbackPosition: ["top-start"],
|
|
254
|
-
id: F(`dropdown-options-${e.id}`),
|
|
255
|
-
open: e.open,
|
|
256
|
-
position: "bottom-start",
|
|
257
|
-
style: {
|
|
258
|
-
width: "auto",
|
|
259
|
-
...D
|
|
260
|
-
},
|
|
261
|
-
targetElement: e.targetElement
|
|
262
|
-
} : {
|
|
263
|
-
fallbackPosition: ["top-start"],
|
|
264
|
-
offset: [0, 8],
|
|
265
|
-
position: "bottom-start",
|
|
266
|
-
style: {
|
|
267
|
-
display: y.value ? "block" : "none",
|
|
268
|
-
...D
|
|
269
|
-
},
|
|
270
|
-
targetElement: e.targetElement
|
|
271
|
-
};
|
|
272
|
-
});
|
|
273
|
-
return t({
|
|
274
|
-
onOutsideDropdownClick: w
|
|
275
|
-
}), { __sfc: !0, slots: o, emit: a, props: e, selectedValue: l, multiple: i, dropdownOptionsListboxRef: r, t: b, isDropdownOpen: y, noResultsMessage: p, conditionalClasses: f, conditionalListboxClasses: s, actions: h, internalSelectedValue: m, listeners: O, onEscapeKey: x, onOutsideDropdownClick: w, popperContainerOrPopoverComponent: d, popperContainerOrPopoverProps: T, BentoListbox: G };
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
var ot = function() {
|
|
279
|
-
var t = this, a = t._self._c, e = t._self._setupProxy;
|
|
280
|
-
return e.isDropdownOpen ? a(e.popperContainerOrPopoverComponent, t._b({ tag: "component", staticClass: "b-dropdown-options-container", class: e.conditionalClasses }, "component", e.popperContainerOrPopoverProps, !1), [a("div", { on: { keydown: function(o) {
|
|
281
|
-
return !o.type.indexOf("key") && t._k(o.keyCode, "esc", 27, o.key, ["Esc", "Escape"]) ? null : e.onEscapeKey.apply(null, arguments);
|
|
282
|
-
} } }, [a(e.BentoListbox, t._g({ ref: "dropdownOptionsListboxRef", staticClass: "b-dropdown-options-container__listbox", class: e.conditionalListboxClasses, attrs: { id: t.id, "aria-label": t.ariaLabel, "component-loading": t.componentLoading, "empty-state": t.emptyState, "is-option-disabled": t.isOptionDisabled, items: t.items, "selected-value": e.internalSelectedValue, multiple: e.multiple, "static-categories": t.staticCategories, "no-results-message": e.noResultsMessage, searching: t.searching, loading: t.loading, "lazy-load-type": t.lazyLoadType, "has-more-items": t.hasMoreItems, "virtual-scroll": t.virtualScroll }, scopedSlots: t._u([t._l(e.slots, function(o, l) {
|
|
283
|
-
return { key: l, fn: function(i) {
|
|
284
|
-
return [t._t(l, null, null, i)];
|
|
285
|
-
} };
|
|
286
|
-
})], null, !0) }, e.listeners))], 1)]) : t._e();
|
|
287
|
-
}, nt = [], lt = /* @__PURE__ */ P(
|
|
288
|
-
at,
|
|
289
|
-
ot,
|
|
290
|
-
nt,
|
|
291
|
-
!1,
|
|
292
|
-
null,
|
|
293
|
-
"eb9fd4be"
|
|
294
|
-
);
|
|
295
|
-
const st = lt.exports;
|
|
296
|
-
let he = 0;
|
|
297
|
-
const it = {
|
|
298
|
-
beforeCreate() {
|
|
299
|
-
this.uuid = he.toString(), he += 1;
|
|
300
|
-
}
|
|
301
|
-
};
|
|
302
|
-
var rt = function() {
|
|
303
|
-
var t = this, a = t._self._c;
|
|
304
|
-
return a("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? a("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), a("path", { attrs: { fill: "#001222", d: "M5.00011 5.43922L8.00011 8.43922L11.0001 5.43922L12.0608 6.49988L8.00011 10.5605L3.93945 6.49988L5.00011 5.43922Z" } })]);
|
|
305
|
-
}, ct = [], dt = /* @__PURE__ */ P(
|
|
306
|
-
it,
|
|
307
|
-
rt,
|
|
308
|
-
ct,
|
|
309
|
-
!1,
|
|
310
|
-
null,
|
|
311
|
-
null
|
|
312
|
-
);
|
|
313
|
-
const ut = dt.exports;
|
|
314
|
-
let ge = 0;
|
|
315
|
-
const pt = {
|
|
316
|
-
beforeCreate() {
|
|
317
|
-
this.uuid = ge.toString(), ge += 1;
|
|
318
|
-
}
|
|
319
|
-
};
|
|
320
|
-
var ft = function() {
|
|
321
|
-
var t = this, a = t._self._c;
|
|
322
|
-
return a("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? a("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), a("path", { attrs: { fill: "#001222", d: "M10.9999 10.5608L7.9999 7.56077L4.9999 10.5608L3.93924 9.50011L7.9999 5.43945L12.0606 9.50011L10.9999 10.5608Z" } })]);
|
|
323
|
-
}, vt = [], mt = /* @__PURE__ */ P(
|
|
324
|
-
pt,
|
|
325
|
-
ft,
|
|
326
|
-
vt,
|
|
327
|
-
!1,
|
|
328
|
-
null,
|
|
329
|
-
null
|
|
330
|
-
);
|
|
331
|
-
const bt = mt.exports, yt = A({
|
|
332
|
-
name: "dropdown-small-textbox",
|
|
333
|
-
inheritAttrs: !1
|
|
334
|
-
}), _t = /* @__PURE__ */ A({
|
|
335
|
-
...yt,
|
|
336
|
-
props: {
|
|
337
|
-
/**
|
|
338
|
-
* The number of additional items that have been selected in the dropdown.
|
|
339
|
-
*/
|
|
340
|
-
additionalItemsSelected: { type: [Number, String], default: 0 },
|
|
341
|
-
/**
|
|
342
|
-
* Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.
|
|
343
|
-
*/
|
|
344
|
-
ariaControls: { type: String, required: !0 },
|
|
345
|
-
/**
|
|
346
|
-
* Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.
|
|
347
|
-
*/
|
|
348
|
-
ariaExpanded: {
|
|
349
|
-
type: [String, Boolean],
|
|
350
|
-
required: !0
|
|
351
|
-
},
|
|
352
|
-
/**
|
|
353
|
-
* If no label element is used then the aria-label is be set should be set.
|
|
354
|
-
*/
|
|
355
|
-
ariaLabel: { type: String, default: null },
|
|
356
|
-
/**
|
|
357
|
-
* Corresponds to the label's id that labels the textbox element.
|
|
358
|
-
*/
|
|
359
|
-
ariaLabelledby: { type: String, default: null },
|
|
360
|
-
/**
|
|
361
|
-
* Disables any textbox functionality
|
|
362
|
-
*/
|
|
363
|
-
disabled: { type: Boolean, default: !1 },
|
|
364
|
-
/**
|
|
365
|
-
* Selected option's label
|
|
366
|
-
*/
|
|
367
|
-
displayValue: { type: String, default: null },
|
|
368
|
-
/**
|
|
369
|
-
* Sets the possibility to type into the textbox
|
|
370
|
-
*/
|
|
371
|
-
dynamicFiltering: { type: Boolean, default: !1 },
|
|
372
|
-
/**
|
|
373
|
-
* Marks the textbox as invalid, rendering an error state
|
|
374
|
-
*/
|
|
375
|
-
isInvalid: { type: Boolean, default: !1 },
|
|
376
|
-
/**
|
|
377
|
-
* Indicates if the dropdown is open so that
|
|
378
|
-
* the respective event can be emitted
|
|
379
|
-
*/
|
|
380
|
-
open: { type: Boolean, default: !1 },
|
|
381
|
-
/**
|
|
382
|
-
* Sets the dropdown to readonly state
|
|
383
|
-
*/
|
|
384
|
-
readonly: { type: Boolean, default: !1 },
|
|
385
|
-
/**
|
|
386
|
-
* The input value
|
|
387
|
-
*/
|
|
388
|
-
value: { type: String, default: "" }
|
|
389
|
-
},
|
|
390
|
-
emits: ["clear", "close", "input", "keydown", "open"],
|
|
391
|
-
setup(n, { expose: t, emit: a }) {
|
|
392
|
-
const e = n, o = g(null), l = c(() => ({
|
|
393
|
-
[`b-dropdown-small-textbox--${Z.DISABLED}`]: e.disabled,
|
|
394
|
-
[`b-dropdown-small-textbox--${Z.READONLY}`]: e.readonly,
|
|
395
|
-
[`b-dropdown-small-textbox--${Z.OPENED}`]: e.open
|
|
396
|
-
})), i = c(() => e.open && !e.disabled && !e.readonly), r = (m) => {
|
|
397
|
-
a("input", m);
|
|
398
|
-
}, b = (m) => {
|
|
399
|
-
a("keydown", m);
|
|
400
|
-
}, y = (m) => {
|
|
401
|
-
Q(m), a("open");
|
|
402
|
-
}, p = (m) => {
|
|
403
|
-
Q(m), a("close");
|
|
404
|
-
}, f = (m) => {
|
|
405
|
-
Q(m), a("clear");
|
|
406
|
-
}, s = {
|
|
407
|
-
[k.INPUT]: r,
|
|
408
|
-
[k.OPEN]: y,
|
|
409
|
-
[k.CLOSE]: p,
|
|
410
|
-
[k.CLEAR]: f,
|
|
411
|
-
[k.KEYDOWN]: b
|
|
412
|
-
}, h = () => {
|
|
413
|
-
o.value.focus();
|
|
414
|
-
};
|
|
415
|
-
return t({
|
|
416
|
-
focus: h
|
|
417
|
-
}), { __sfc: !0, emit: a, props: e, baseTextbox: o, conditionalClasses: l, isDropdownOpen: i, onInput: r, onKeyDown: b, openDropdown: y, closeDropdown: p, clearValue: f, listeners: s, focus: h, BentoDropdownSize: V, DropdownBaseTextbox: Pe, ChevronDownSmallIcon: ut, ChevronUpSmallIcon: bt };
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
var ht = function() {
|
|
421
|
-
var t = this, a = t._self._c, e = t._self._setupProxy;
|
|
422
|
-
return a("div", { staticClass: "b-dropdown-small-textbox", class: e.conditionalClasses }, [a(e.DropdownBaseTextbox, t._g(t._b({ ref: "baseTextbox", staticClass: "b-dropdown-small-textbox__textbox", attrs: { size: e.BentoDropdownSize.SMALL }, scopedSlots: t._u([{ key: "icon", fn: function() {
|
|
423
|
-
return [a("div", { staticClass: "b-dropdown-small-textbox__chevron" }, [a(e.ChevronUpSmallIcon, { directives: [{ name: "show", rawName: "v-show", value: e.isDropdownOpen, expression: "isDropdownOpen" }], attrs: { "svg-title": "opened" } }), a(e.ChevronDownSmallIcon, { directives: [{ name: "show", rawName: "v-show", value: !e.isDropdownOpen, expression: "!isDropdownOpen" }], attrs: { "svg-title": "closed" } })], 1)];
|
|
424
|
-
}, proxy: !0 }]) }, "dropdown-base-textbox", { ...t.$attrs, ...t.$props }, !1), e.listeners))], 1);
|
|
425
|
-
}, gt = [], St = /* @__PURE__ */ P(
|
|
426
|
-
_t,
|
|
427
|
-
ht,
|
|
428
|
-
gt,
|
|
429
|
-
!1,
|
|
430
|
-
null,
|
|
431
|
-
"faba160c"
|
|
432
|
-
);
|
|
433
|
-
const wt = St.exports, Ct = (n, t) => t.value.reduce((a, e) => {
|
|
434
|
-
if (e.items) {
|
|
435
|
-
const o = e.items.filter(
|
|
436
|
-
(i) => n.value.find((r) => r.value === i.value)
|
|
437
|
-
);
|
|
438
|
-
o.length === e.items.length ? a.push(e.displayValue ?? e.label) : o.forEach(({ label: i, displayValue: r }) => a.push(r ?? i));
|
|
439
|
-
}
|
|
440
|
-
return n.value.find((o) => o.value === e.value) && a.push(e.displayValue ?? e.label), a;
|
|
441
|
-
}, []).join(", "), Lt = ({ items: n, placeholder: t, selectedValues: a, isMultiSelect: e }) => {
|
|
442
|
-
const o = c(
|
|
443
|
-
() => e.value && n.value.find((i) => {
|
|
444
|
-
var r;
|
|
445
|
-
return (r = i.items) == null ? void 0 : r.length;
|
|
446
|
-
})
|
|
447
|
-
);
|
|
448
|
-
return c(() => a.value.length ? o.value ? Ct(a, n) : a.value.map(({ label: i, displayValue: r }) => r ?? i).join(", ") : t.value || null);
|
|
449
|
-
}, Ce = (n) => {
|
|
450
|
-
var t;
|
|
451
|
-
(t = n.value.$children) == null || t[0].$refs.textbox.focus();
|
|
452
|
-
}, Ot = ({
|
|
453
|
-
inputContainerRef: n,
|
|
454
|
-
optionsContainerRef: t,
|
|
455
|
-
selectedValueIndex: a,
|
|
456
|
-
isDropdownOpen: e,
|
|
457
|
-
isDynamicFltering: o,
|
|
458
|
-
items: l,
|
|
459
|
-
isMultiple: i
|
|
460
|
-
}, r, b, y) => {
|
|
461
|
-
const p = async (_) => {
|
|
462
|
-
var S;
|
|
463
|
-
o.value && await C(), (S = l.value[_]) == null || S.focus();
|
|
464
|
-
}, f = async (_) => {
|
|
465
|
-
var N, K;
|
|
466
|
-
o.value && await C();
|
|
467
|
-
const S = (N = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : N.$el.querySelectorAll(
|
|
468
|
-
"button"
|
|
469
|
-
);
|
|
470
|
-
S.length ? (K = S[_]) == null || K.focus() : p(_);
|
|
471
|
-
}, s = (_) => {
|
|
472
|
-
var S;
|
|
473
|
-
return (S = t.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef) == null ? void 0 : S.setListboxFocusedIndex(
|
|
474
|
-
_
|
|
475
|
-
);
|
|
476
|
-
}, h = () => {
|
|
477
|
-
e.value || b(), C(() => {
|
|
478
|
-
s(0), p(0);
|
|
479
|
-
});
|
|
480
|
-
}, m = () => {
|
|
481
|
-
e.value || b(), C(() => {
|
|
482
|
-
s(l.value.length - 1), p(l.value.length - 1);
|
|
483
|
-
});
|
|
484
|
-
}, O = ({ detail: _ }) => {
|
|
485
|
-
_.preventDefault(), h();
|
|
486
|
-
}, x = ({ detail: _ }) => {
|
|
487
|
-
_.preventDefault(), m();
|
|
488
|
-
}, w = () => {
|
|
489
|
-
h();
|
|
490
|
-
}, d = () => {
|
|
491
|
-
m();
|
|
492
|
-
}, T = ({ detail: _ }) => {
|
|
493
|
-
_.preventDefault(), r(), e.value && C(() => {
|
|
494
|
-
i ? f(0) : (s(a.value), p(a.value));
|
|
495
|
-
});
|
|
496
|
-
}, D = ({ detail: _ }) => {
|
|
497
|
-
_.preventDefault(), r(), e.value && C(() => {
|
|
498
|
-
i ? f(0) : (s(a.value), p(a.value));
|
|
499
|
-
});
|
|
500
|
-
}, B = () => {
|
|
501
|
-
e.value && y();
|
|
502
|
-
}, $ = () => {
|
|
503
|
-
e.value && (y(), Ce(n));
|
|
504
|
-
};
|
|
505
|
-
return c(() => ({
|
|
506
|
-
[E.ARROW_DOWN]: O,
|
|
507
|
-
[E.ARROW_UP]: x,
|
|
508
|
-
[E.HOME]: w,
|
|
509
|
-
[E.END]: d,
|
|
510
|
-
...o.value ? {} : { [E.SPACE]: T },
|
|
511
|
-
[E.ENTER]: D,
|
|
512
|
-
[E.TAB]: B,
|
|
513
|
-
[E.ESCAPE]: $
|
|
514
|
-
}));
|
|
515
|
-
}, xt = ({ inputContainerRef: n, isDropdownOpen: t }, a) => {
|
|
516
|
-
const e = () => {
|
|
517
|
-
t.value && a(), C(() => {
|
|
518
|
-
Ce(n);
|
|
519
|
-
});
|
|
520
|
-
};
|
|
521
|
-
return {
|
|
522
|
-
[u.ENTER]: e,
|
|
523
|
-
[u.ESCAPE]: e,
|
|
524
|
-
[u.TAB]: e,
|
|
525
|
-
[u.SPACE]: e
|
|
526
|
-
};
|
|
527
|
-
};
|
|
528
|
-
function Et(n, t, a, e, o) {
|
|
529
|
-
const l = g(n), i = g(t), r = (p, f = []) => f.flatMap((s) => s.label.toLocaleLowerCase().includes(p) ? e != null && e.value && s.items ? [...r(p, s.items)] : [s, ...r(p, s.items)] : s.items ? [...r(p, s.items)] : []), b = a !== void 0 ? je(() => a(l.value), o ?? 300) : void 0;
|
|
530
|
-
return ee(l, () => {
|
|
531
|
-
b !== void 0 && b();
|
|
532
|
-
}), c(() => {
|
|
533
|
-
if (!l.value || a !== void 0)
|
|
534
|
-
return i.value;
|
|
535
|
-
const p = l.value.toLocaleLowerCase();
|
|
536
|
-
return r(p, i.value);
|
|
537
|
-
});
|
|
538
|
-
}
|
|
539
|
-
const Dt = {
|
|
540
|
-
"de-DE": {
|
|
541
|
-
all: "Alle",
|
|
542
|
-
ariaLabelFallback: "Dropdown",
|
|
543
|
-
clearSearch: "Filter löschen"
|
|
544
|
-
},
|
|
545
|
-
"en-GB": {
|
|
546
|
-
all: "All",
|
|
547
|
-
ariaLabelFallback: "Dropdown",
|
|
548
|
-
clearSearch: "Clear filter"
|
|
549
|
-
},
|
|
550
|
-
"en-US": {
|
|
551
|
-
all: "All",
|
|
552
|
-
ariaLabelFallback: "Dropdown",
|
|
553
|
-
clearSearch: "Clear filter"
|
|
554
|
-
},
|
|
555
|
-
"es-ES": {
|
|
556
|
-
all: "Todos",
|
|
557
|
-
ariaLabelFallback: "Menú desplegable",
|
|
558
|
-
clearSearch: "Limpiar filtro"
|
|
559
|
-
},
|
|
560
|
-
"es-MX": {
|
|
561
|
-
all: "Todos",
|
|
562
|
-
ariaLabelFallback: "Menú desplegable",
|
|
563
|
-
clearSearch: "Limpiar filtro"
|
|
564
|
-
},
|
|
565
|
-
"fr-FR": {
|
|
566
|
-
all: "Tous",
|
|
567
|
-
ariaLabelFallback: "Menu déroulant",
|
|
568
|
-
clearSearch: "Effacer le filtre"
|
|
569
|
-
},
|
|
570
|
-
"it-IT": {
|
|
571
|
-
all: "Tutti",
|
|
572
|
-
ariaLabelFallback: "Menu a discesa",
|
|
573
|
-
clearSearch: "Cancella filtro"
|
|
574
|
-
},
|
|
575
|
-
"ja-JP": {
|
|
576
|
-
all: "すべて",
|
|
577
|
-
ariaLabelFallback: "ドロップダウン",
|
|
578
|
-
clearSearch: "フィルターをクリア"
|
|
579
|
-
},
|
|
580
|
-
"pt-BR": {
|
|
581
|
-
all: "Todos",
|
|
582
|
-
ariaLabelFallback: "Menu suspenso",
|
|
583
|
-
clearSearch: "Limpar filtro"
|
|
584
|
-
},
|
|
585
|
-
"zh-CN": {
|
|
586
|
-
all: "全部",
|
|
587
|
-
ariaLabelFallback: "下拉菜单",
|
|
588
|
-
clearSearch: "清除筛选器"
|
|
589
|
-
}
|
|
590
|
-
}, Bt = /* @__PURE__ */ Symbol("input field component injection key"), ea = /* @__PURE__ */ Symbol("input field hint injection key"), ta = /* @__PURE__ */ Symbol("input field parent component injection key"), Tt = A({
|
|
591
|
-
i18n: { messages: Dt },
|
|
592
|
-
name: "b-dropdown",
|
|
593
|
-
components: {
|
|
594
|
-
DropdownInputDefault: $e,
|
|
595
|
-
DropdownInputSmall: wt
|
|
596
|
-
},
|
|
597
|
-
model: { prop: "modelValue" }
|
|
598
|
-
}), It = /* @__PURE__ */ A({
|
|
599
|
-
...Tt,
|
|
600
|
-
props: {
|
|
601
|
-
description: { default: null },
|
|
602
|
-
disabled: { type: Boolean, default: !1 },
|
|
603
|
-
errorMessage: { default: null },
|
|
604
|
-
label: { default: null },
|
|
605
|
-
optional: { type: Boolean, default: !1 },
|
|
606
|
-
placeholder: { default: null },
|
|
607
|
-
readonly: { type: Boolean, default: !1 },
|
|
608
|
-
required: { type: Boolean, default: !1 },
|
|
609
|
-
tooltipText: { default: null },
|
|
610
|
-
ariaLabel: { default: null },
|
|
611
|
-
condensed: { type: Boolean, default: !1 },
|
|
612
|
-
emptyState: { default: void 0 },
|
|
613
|
-
dynamicFiltering: { type: Boolean, default: !1 },
|
|
614
|
-
error: { type: Boolean, default: !1 },
|
|
615
|
-
hasMoreItems: { type: Boolean, default: !1 },
|
|
616
|
-
isOptionDisabled: { type: Function, default: void 0 },
|
|
617
|
-
items: { default: () => [] },
|
|
618
|
-
loading: { type: Boolean, default: !1 },
|
|
619
|
-
componentLoading: { type: Boolean, default: !1 },
|
|
620
|
-
lazyLoadType: { default: G.props.lazyLoadType.default },
|
|
621
|
-
multiple: { type: Boolean, default: !1 },
|
|
622
|
-
search: { default: void 0 },
|
|
623
|
-
showSlotContentInMultiple: { type: Boolean, default: !1 },
|
|
624
|
-
size: { default: null },
|
|
625
|
-
staticCategories: { type: Boolean, default: !1 },
|
|
626
|
-
value: { default: null },
|
|
627
|
-
modelValue: { default: null },
|
|
628
|
-
virtualScroll: { type: Boolean, default: !1 },
|
|
629
|
-
enableValueLabelPair: { type: Boolean, default: !1 }
|
|
630
|
-
},
|
|
631
|
-
emits: ["input", "update:model-value", "show-more", "open"],
|
|
632
|
-
setup(n, { expose: t, emit: a }) {
|
|
633
|
-
var me, be;
|
|
634
|
-
const e = n, o = Re(), l = Se(), i = He(l), { t: r } = te(), { emitValue: b } = ze(a), y = g(null), p = g(null), f = g(null), s = g(!1), h = F("bento-dropdown-options-container"), m = F("dropdown-label"), O = F("dropdown-description"), x = F("dropdown-error"), { isReadOnly: w } = Ue(L(e, "readonly")), d = c(() => e.modelValue ?? e.value), { cachedSelectedListboxOptions: T, cachedListboxSelectedValues: D, setCachedValues: B } = Ve(
|
|
635
|
-
L(e, "items"),
|
|
636
|
-
d,
|
|
637
|
-
L(e, "multiple"),
|
|
638
|
-
L(e, "enableValueLabelPair")
|
|
639
|
-
), $ = g(o["aria-label"]), q = g(o["aria-describedby"]), { ariaLabel: _, label: S } = we(e), N = c(() => r("ariaLabelFallback")), K = Ke({
|
|
640
|
-
// TODO: take ariaLabel ref away when aria-label prop is removed
|
|
641
|
-
ariaLabel: _.value || $,
|
|
642
|
-
label: S,
|
|
643
|
-
defaultFallback: N
|
|
644
|
-
}), ae = e.size === V.SMALL || ke(Bt, !1), Le = c(() => ae ? V.SMALL : V.DEFAULT), Oe = c(() => ({
|
|
645
|
-
"b-dropdown--condensed": e.condensed
|
|
646
|
-
})), xe = c(() => ({
|
|
647
|
-
"b-dropdown__description--error": !!e.errorMessage
|
|
648
|
-
})), I = g(""), R = L(e, "items"), oe = L(e, "staticCategories"), W = Et(
|
|
649
|
-
I,
|
|
650
|
-
R,
|
|
651
|
-
(me = e == null ? void 0 : e.search) == null ? void 0 : me.searchEvent,
|
|
652
|
-
oe,
|
|
653
|
-
(be = e == null ? void 0 : e.search) == null ? void 0 : be.debounceTime
|
|
654
|
-
), U = c(() => e.dynamicFiltering && !!I.value), Ee = Lt({
|
|
655
|
-
items: R,
|
|
656
|
-
placeholder: L(e, "placeholder"),
|
|
657
|
-
isMultiSelect: L(e, "multiple"),
|
|
658
|
-
selectedValues: T
|
|
659
|
-
}), De = c(() => {
|
|
660
|
-
if (e != null && e.multiple && Array.isArray(d.value))
|
|
661
|
-
return e.items.filter(
|
|
662
|
-
({ value: v }) => (e == null ? void 0 : e.value) && (e == null ? void 0 : e.value).includes(v)
|
|
663
|
-
);
|
|
664
|
-
if (!e.multiple && e.staticCategories) {
|
|
665
|
-
const v = e.items.find(
|
|
666
|
-
(Y) => Y.items.some((Ne) => Ne.value === d.value)
|
|
667
|
-
);
|
|
668
|
-
return v ? v.items.find((Y) => Y.value === d.value) : null;
|
|
669
|
-
}
|
|
670
|
-
return e.items.find(({ value: v }) => v === d.value);
|
|
671
|
-
}), ne = c(() => {
|
|
672
|
-
const v = W.value.findIndex(({ value: M }) => e.enableValueLabelPair ? d.value.value === M : d.value === M);
|
|
673
|
-
return v > -1 ? v : 0;
|
|
674
|
-
}), { isMultiLevelSelect: j, flattenedItemsList: le } = qe(R), se = c(() => j.value && !e.staticCategories), ie = c(() => se.value ? "treeitem" : "option"), Be = c(() => {
|
|
675
|
-
if (e.multiple) {
|
|
676
|
-
const v = Array.isArray(d.value) ? d.value.length : 0, M = j.value ? le.value.length : R.value.length;
|
|
677
|
-
return v === 0 ? null : !e.hasMoreItems && M > 0 && M === v ? r("all") : v;
|
|
678
|
-
}
|
|
679
|
-
return null;
|
|
680
|
-
}), Te = c(
|
|
681
|
-
() => [
|
|
682
|
-
e.description ? O : null,
|
|
683
|
-
q.value,
|
|
684
|
-
e.errorMessage ? x : null
|
|
685
|
-
].filter(Boolean).join(" ") || null
|
|
686
|
-
), re = c(() => {
|
|
687
|
-
var v;
|
|
688
|
-
return (v = f.value) == null ? void 0 : v.$el;
|
|
689
|
-
}), { visibleDomOptions: ce, updateVisibleDomOptions: H } = We(
|
|
690
|
-
re,
|
|
691
|
-
W,
|
|
692
|
-
ie
|
|
693
|
-
), de = () => {
|
|
694
|
-
w.value || (s.value = !0, C(() => {
|
|
695
|
-
H();
|
|
696
|
-
}));
|
|
697
|
-
}, z = () => {
|
|
698
|
-
s.value = !1;
|
|
699
|
-
}, ue = () => {
|
|
700
|
-
w.value || (s.value = !s.value, C(() => {
|
|
701
|
-
H();
|
|
702
|
-
}), U.value && (I.value = ""));
|
|
703
|
-
}, Ie = () => {
|
|
704
|
-
U.value && (I.value = ""), s.value && (s.value = !1, f.value.onOutsideDropdownClick());
|
|
705
|
-
}, pe = async (v) => {
|
|
706
|
-
e.multiple || (I.value = "", s.value = !1), B(v), b(D.value), e.multiple || (await C(), J());
|
|
707
|
-
}, fe = () => {
|
|
708
|
-
a(u.SHOW_MORE);
|
|
709
|
-
}, Me = Ot(
|
|
710
|
-
{
|
|
711
|
-
inputContainerRef: y,
|
|
712
|
-
optionsContainerRef: f,
|
|
713
|
-
selectedValueIndex: ne,
|
|
714
|
-
isDropdownOpen: s,
|
|
715
|
-
isDynamicFltering: L(e, "dynamicFiltering"),
|
|
716
|
-
items: ce,
|
|
717
|
-
isMultiple: e.multiple
|
|
718
|
-
},
|
|
719
|
-
ue,
|
|
720
|
-
de,
|
|
721
|
-
z
|
|
722
|
-
), ve = xt(
|
|
723
|
-
{
|
|
724
|
-
inputContainerRef: y,
|
|
725
|
-
isDropdownOpen: s
|
|
726
|
-
},
|
|
727
|
-
z
|
|
728
|
-
), Ae = {
|
|
729
|
-
[u.CLOSE_DROPDOWN]: z,
|
|
730
|
-
[u.SELECT]: pe,
|
|
731
|
-
[u.SHOW_MORE]: fe,
|
|
732
|
-
...ve
|
|
733
|
-
};
|
|
734
|
-
e.error && X(
|
|
735
|
-
'BentoDropdown "error" property',
|
|
736
|
-
`Use the BentoDropdown "errorMessage" property instead to indicate that there is a modifier error.
|
|
737
|
-
Having the field as "undefined" will hide/remove the error.
|
|
738
|
-
<bento-dropdown errorMessage="Error message text" />`,
|
|
739
|
-
"2.0.0"
|
|
740
|
-
), e.size && X('BentoDropdown "size" property', "Do not use. Only 'default' size should be used.", "2.0.0"), e.value && X(
|
|
741
|
-
'BentoDropdown "value" property',
|
|
742
|
-
`The use of "value" prop in "BentoDropdown" is no longer supported.
|
|
743
|
-
Use the "v-model" or "model-value" property instead.`,
|
|
744
|
-
"2.0.0"
|
|
745
|
-
);
|
|
746
|
-
const J = () => {
|
|
747
|
-
y.value.focus();
|
|
748
|
-
};
|
|
749
|
-
return ee(
|
|
750
|
-
() => s.value,
|
|
751
|
-
(v) => {
|
|
752
|
-
v && a("open");
|
|
753
|
-
}
|
|
754
|
-
), t({
|
|
755
|
-
focus: J
|
|
756
|
-
}), { __sfc: !0, attrs: o, slots: l, hasSlot: i, props: e, emit: a, t: r, emitValue: b, inputContainerRef: y, inputContainerRefWrapper: p, optionsContainerRef: f, isDropdownOpen: s, dropdownOptionsContainerId: h, labelId: m, descriptionId: O, errorId: x, isReadOnly: w, dropdownValue: d, cachedSelectedListboxOptions: T, cachedListboxSelectedValues: D, setCachedValues: B, ariaLabelAttribute: $, ariaDescribedByAttribute: q, ariaLabel: _, label: S, computedAriaLabelFallbackMessage: N, computedAriaLabel: K, isInputComponent: ae, computedSize: Le, conditionalClasses: Oe, descriptionConditionalClasses: xe, searchTerm: I, items: R, staticCategories: oe, filteredItems: W, isSearching: U, displayValue: Ee, selectedValueItem: De, selectedValueIndex: ne, isMultiLevelSelect: j, flattenedItemsList: le, isTreePattern: se, computedOptionRole: ie, additionalItemsSelected: Be, ariaDescribedBy: Te, listboxRef: re, visibleDomOptions: ce, updateVisibleDomOptions: H, openDropdown: de, closeDropdown: z, toggleDropdown: ue, clickOutsideDropdown: Ie, onOptionSelected: pe, emitShowMoreEvent: fe, textboxKeyboardNavigationListeners: Me, listboxKeyboardNavigationListeners: ve, listboxListeners: Ae, focus: J, BentoDropdownOptionsContainer: st, BentoTypography: Fe, ErrorMessage: Ze, FieldLabel: Xe, vBentoClickOutsideDirective: Ye, vBentoKeyboardNavigationDirective: Je };
|
|
757
|
-
}
|
|
758
|
-
});
|
|
759
|
-
var Mt = function() {
|
|
760
|
-
var t = this, a = t._self._c, e = t._self._setupProxy;
|
|
761
|
-
return a("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: e.clickOutsideDropdown, expression: "clickOutsideDropdown" }], staticClass: "b-dropdown", class: e.conditionalClasses }, [e.label ? a(e.FieldLabel, { attrs: { id: e.labelId, condensed: t.condensed, label: e.label, "tooltip-text": t.tooltipText, optional: t.optional, required: t.required } }) : t._e(), a("div", t._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "inputContainerRefWrapper" }, e.textboxKeyboardNavigationListeners), [a(e.computedSize, { ref: "inputContainerRef", tag: "component", attrs: { condensed: t.condensed, value: e.searchTerm, "additional-items-selected": e.additionalItemsSelected, "aria-controls": e.dropdownOptionsContainerId, ariaExpanded: e.isDropdownOpen, "aria-labelledby": e.label ? e.labelId : null, "aria-describedby": e.ariaDescribedBy, "aria-label": e.computedAriaLabel, "aria-readonly": e.isReadOnly, "aria-required": t.required, readonly: e.isReadOnly, disabled: t.disabled, "display-value": e.displayValue, "dynamic-filtering": t.dynamicFiltering, "is-invalid": !!t.errorMessage || t.error, multiple: t.multiple, open: e.isDropdownOpen, "selected-value-item": e.isInputComponent ? void 0 : e.selectedValueItem, "show-slot-content-in-multiple": t.showSlotContentInMultiple }, on: { input: function(o) {
|
|
762
|
-
e.searchTerm = o;
|
|
763
|
-
}, open: e.toggleDropdown, close: e.toggleDropdown }, scopedSlots: t._u([t._l(e.slots, function(o, l) {
|
|
764
|
-
return { key: l, fn: function(i) {
|
|
765
|
-
return [t._t(l, null, null, i)];
|
|
766
|
-
} };
|
|
767
|
-
})], null, !0) })], 1), e.inputContainerRef ? a(e.BentoDropdownOptionsContainer, t._g({ ref: "optionsContainerRef", attrs: { id: e.dropdownOptionsContainerId, "aria-label": e.computedAriaLabel, "component-loading": t.componentLoading, "empty-state": t.emptyState, disabled: t.disabled, "is-option-disabled": t.isOptionDisabled, items: e.filteredItems, multiple: t.multiple, "static-categories": e.staticCategories, open: e.isDropdownOpen, "selected-value": e.cachedSelectedListboxOptions, searching: e.isSearching, "target-element": e.inputContainerRefWrapper, loading: t.loading, "has-more-items": t.hasMoreItems, "lazy-load-type": t.lazyLoadType, "virtual-scroll": t.virtualScroll }, scopedSlots: t._u([t._l(e.slots, function(o, l) {
|
|
768
|
-
return { key: l, fn: function(i) {
|
|
769
|
-
return [t._t(l, null, null, i)];
|
|
770
|
-
} };
|
|
771
|
-
})], null, !0) }, e.listboxListeners)) : t._e(), t.errorMessage ? a(e.ErrorMessage, { staticClass: "b-dropdown__error-message", attrs: { id: e.errorId, "error-message": t.errorMessage } }) : t._e(), t.description || e.hasSlot("description") ? a(e.BentoTypography, { staticClass: "b-dropdown__description", class: e.descriptionConditionalClasses, attrs: { id: e.descriptionId, el: "span" } }, [t._t("description", function() {
|
|
772
|
-
return [t._v(" " + t._s(t.description) + " ")];
|
|
773
|
-
})], 2) : t._e()], 1);
|
|
774
|
-
}, At = [], Nt = /* @__PURE__ */ P(
|
|
775
|
-
It,
|
|
776
|
-
Mt,
|
|
777
|
-
At,
|
|
778
|
-
!1,
|
|
779
|
-
null,
|
|
780
|
-
"3edb5f79"
|
|
781
|
-
);
|
|
782
|
-
const aa = Nt.exports;
|
|
783
|
-
export {
|
|
784
|
-
aa as B,
|
|
785
|
-
ea as I,
|
|
786
|
-
Bt as a,
|
|
787
|
-
ta as b,
|
|
788
|
-
Et as u
|
|
789
|
-
};
|
|
790
|
-
//# sourceMappingURL=dropdown.CvNI2V33.js.map
|