@adyen/bento-vue2 2.1.1 → 2.2.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 +67 -10
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-scroller.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/alert.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/button.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-filter.css +1 -0
- package/dist/assets/date-range-filter.css +1 -0
- 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/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/fixed-scroller.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/grid-layout.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/input-with-dropdown-filter.css +1 -0
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/navigation-menu-group.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/table-of-contents.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/timeline-item.css +1 -1
- package/dist/assets/toggle.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.D29UQHoA.js → action-bar.DCknEWYe.js} +3 -3
- package/dist/chunks/{action-bar.D29UQHoA.js.map → action-bar.DCknEWYe.js.map} +1 -1
- package/dist/chunks/{ai-tag.BLi-Xoh_.js → ai-tag.DfnRfKPR.js} +2 -2
- package/dist/chunks/{ai-tag.BLi-Xoh_.js.map → ai-tag.DfnRfKPR.js.map} +1 -1
- package/dist/chunks/{alert.BddJPWMN.js → alert.DNS4RH4N.js} +52 -70
- package/dist/chunks/alert.DNS4RH4N.js.map +1 -0
- package/dist/chunks/{anchor-scroller.Clb_9RNz.js → anchor-scroller.BQc3CyTV.js} +2 -2
- package/dist/chunks/{anchor-scroller.Clb_9RNz.js.map → anchor-scroller.BQc3CyTV.js.map} +1 -1
- package/dist/chunks/{base-modal._-Cc6jfi.js → base-modal.BDLjv1Nd.js} +5 -5
- package/dist/chunks/{base-modal._-Cc6jfi.js.map → base-modal.BDLjv1Nd.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.1vZJWN1K.js → button-actions-with-menu.DnzDde3w.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.1vZJWN1K.js.map → button-actions-with-menu.DnzDde3w.js.map} +1 -1
- package/dist/chunks/{button-actions.CdetBz3J.js → button-actions.B332AjJp.js} +2 -2
- package/dist/chunks/button-actions.B332AjJp.js.map +1 -0
- package/dist/chunks/{calendar.BalfhApP.js → calendar.BZDISQai.js} +18 -18
- package/dist/chunks/{calendar.BalfhApP.js.map → calendar.BZDISQai.js.map} +1 -1
- package/dist/chunks/{card.BhhC01dV.js → card.CW8CUymm.js} +3 -3
- package/dist/chunks/{card.BhhC01dV.js.map → card.CW8CUymm.js.map} +1 -1
- package/dist/chunks/{checkbox-group.C-1v4X3c.js → checkbox-group.4OUTLAFJ.js} +3 -3
- package/dist/chunks/{checkbox-group.C-1v4X3c.js.map → checkbox-group.4OUTLAFJ.js.map} +1 -1
- package/dist/chunks/{checkbox.CnuIUi4-.js → checkbox.D-S3f_zM.js} +2 -2
- package/dist/chunks/{checkbox.CnuIUi4-.js.map → checkbox.D-S3f_zM.js.map} +1 -1
- package/dist/chunks/{code-snippet.Bkd8R0vf.js → code-snippet.D9BVc5mO.js} +4 -4
- package/dist/chunks/{code-snippet.Bkd8R0vf.js.map → code-snippet.D9BVc5mO.js.map} +1 -1
- package/dist/chunks/{controls-group.Bku83Fm_.js → controls-group.Bj-gJZ6W.js} +2 -2
- package/dist/chunks/{controls-group.Bku83Fm_.js.map → controls-group.Bj-gJZ6W.js.map} +1 -1
- package/dist/chunks/{copy.B12-P_8A.js → copy.Cmu6Z-5X.js} +3 -3
- package/dist/chunks/{copy.B12-P_8A.js.map → copy.Cmu6Z-5X.js.map} +1 -1
- package/dist/chunks/{dashboard-section.yS2FNoIV.js → dashboard-section.BJGzt3yh.js} +3 -3
- package/dist/chunks/{dashboard-section.yS2FNoIV.js.map → dashboard-section.BJGzt3yh.js.map} +1 -1
- package/dist/chunks/{dashed-underline.RcRbre03.js → dashed-underline.CCGmjCty.js} +3 -3
- package/dist/chunks/{dashed-underline.RcRbre03.js.map → dashed-underline.CCGmjCty.js.map} +1 -1
- package/dist/chunks/{data-grid-template.B5A9whlD.js → data-grid-template.BMdKtfXm.js} +4 -4
- package/dist/chunks/{data-grid-template.B5A9whlD.js.map → data-grid-template.BMdKtfXm.js.map} +1 -1
- package/dist/chunks/{data-grid.Pg5iM8CJ.js → data-grid.DP4IQ00C.js} +20 -20
- package/dist/chunks/{data-grid.Pg5iM8CJ.js.map → data-grid.DP4IQ00C.js.map} +1 -1
- package/dist/chunks/date-filter.DbgzfI2t.js +117 -0
- package/dist/chunks/date-filter.DbgzfI2t.js.map +1 -0
- package/dist/chunks/{date-picker.RFus1MVJ.js → date-picker.DxcdtoNh.js} +7 -7
- package/dist/chunks/{date-picker.RFus1MVJ.js.map → date-picker.DxcdtoNh.js.map} +1 -1
- package/dist/chunks/date-range-filter.DNYsTcZy.js +869 -0
- package/dist/chunks/date-range-filter.DNYsTcZy.js.map +1 -0
- package/dist/chunks/{date-range-picker.B2B4hO6R.js → date-range-picker.Pz5NFYCO.js} +34 -34
- package/dist/chunks/{date-range-picker.B2B4hO6R.js.map → date-range-picker.Pz5NFYCO.js.map} +1 -1
- package/dist/chunks/{date-time-picker.DJxDa81N.js → date-time-picker.DfE8jCuG.js} +5 -5
- package/dist/chunks/{date-time-picker.DJxDa81N.js.map → date-time-picker.DfE8jCuG.js.map} +1 -1
- package/dist/chunks/{draggable-handle.BM07OVdH.js → draggable-handle.De5DnjDK.js} +2 -2
- package/dist/chunks/{draggable-handle.BM07OVdH.js.map → draggable-handle.De5DnjDK.js.map} +1 -1
- package/dist/chunks/{draggable.BczXedk7.js → draggable.B1opQncT.js} +2 -2
- package/dist/chunks/{draggable.BczXedk7.js.map → draggable.B1opQncT.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.BmUNKoNw.js → dropdown-tag.B5vttt56.js} +3 -3
- package/dist/chunks/{dropdown-tag.BmUNKoNw.js.map → dropdown-tag.B5vttt56.js.map} +1 -1
- package/dist/chunks/{dropdown.CpZQYisR.js → dropdown.Dd8RNGXv.js} +963 -918
- package/dist/chunks/dropdown.Dd8RNGXv.js.map +1 -0
- package/dist/chunks/{empty-state.L3DTfiY7.js → empty-state.jbVOuwyN.js} +2 -2
- package/dist/chunks/{empty-state.L3DTfiY7.js.map → empty-state.jbVOuwyN.js.map} +1 -1
- package/dist/chunks/{field-label.BQaDr37D.js → field-label.Bz2PGQ-8.js} +2 -2
- package/dist/chunks/{field-label.BQaDr37D.js.map → field-label.Bz2PGQ-8.js.map} +1 -1
- package/dist/chunks/{file-uploader.Bo17jWtf.js → file-uploader.DmSy3J1u.js} +7 -6
- package/dist/chunks/{file-uploader.Bo17jWtf.js.map → file-uploader.DmSy3J1u.js.map} +1 -1
- package/dist/chunks/filter-bar.U5VrFM6-.js +1865 -0
- package/dist/chunks/filter-bar.U5VrFM6-.js.map +1 -0
- package/dist/chunks/{fixed-scroller.CHmrgoTQ.js → fixed-scroller.CkoOFRzH.js} +3 -3
- package/dist/chunks/{fixed-scroller.CHmrgoTQ.js.map → fixed-scroller.CkoOFRzH.js.map} +1 -1
- package/dist/chunks/{focus-trap.fd6_d2EW.js → focus-trap.BDpcWIxI.js} +1 -2
- package/dist/chunks/{focus-trap.fd6_d2EW.js.map → focus-trap.BDpcWIxI.js.map} +1 -1
- package/dist/chunks/{footer-actions.B8f-gEQV.js → footer-actions.CQYJ8Xvw.js} +2 -2
- package/dist/chunks/{footer-actions.B8f-gEQV.js.map → footer-actions.CQYJ8Xvw.js.map} +1 -1
- package/dist/chunks/{form-layout-title.b2BMYjnl.js → form-layout-title.MjuCRO9t.js} +2 -2
- package/dist/chunks/{form-layout-title.b2BMYjnl.js.map → form-layout-title.MjuCRO9t.js.map} +1 -1
- package/dist/chunks/grid-layout.m-5ySv9K.js +77 -0
- package/dist/chunks/grid-layout.m-5ySv9K.js.map +1 -0
- package/dist/chunks/{header-with-views.BJCjvhem.js → header-with-views.CvcWBdKH.js} +209 -209
- package/dist/chunks/{header-with-views.BJCjvhem.js.map → header-with-views.CvcWBdKH.js.map} +1 -1
- package/dist/chunks/{header.CDiold9n.js → header.CVKe-1fx.js} +4 -4
- package/dist/chunks/{header.CDiold9n.js.map → header.CVKe-1fx.js.map} +1 -1
- package/dist/chunks/{info-icon-with-popover.BzGVcMqy.js → info-icon-with-popover.BtholUjs.js} +3 -3
- package/dist/chunks/{info-icon-with-popover.BzGVcMqy.js.map → info-icon-with-popover.BtholUjs.js.map} +1 -1
- package/dist/chunks/{info-icon.D11usblr.js → info-icon.D_VTjUV3.js} +3 -3
- package/dist/chunks/{info-icon.D11usblr.js.map → info-icon.D_VTjUV3.js.map} +1 -1
- package/dist/chunks/{input-field-password.D4Jn2yCi.js → input-field-password.DhFP1D1o.js} +4 -4
- package/dist/chunks/{input-field-password.D4Jn2yCi.js.map → input-field-password.DhFP1D1o.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.lV7yePoJ.js → input-field-phone-number.BRxttmou.js} +2 -2
- package/dist/chunks/{input-field-phone-number.lV7yePoJ.js.map → input-field-phone-number.BRxttmou.js.map} +1 -1
- package/dist/chunks/{input-field.90DWNO1a.js → input-field.FsFuEZ1l.js} +3 -3
- package/dist/chunks/{input-field.90DWNO1a.js.map → input-field.FsFuEZ1l.js.map} +1 -1
- package/dist/chunks/{input-time.D7IsprlH.js → input-time.DMBL8dyh.js} +3 -3
- package/dist/chunks/{input-time.D7IsprlH.js.map → input-time.DMBL8dyh.js.map} +1 -1
- package/dist/chunks/input-with-dropdown-filter.DtYX8oGX.js +80 -0
- package/dist/chunks/input-with-dropdown-filter.DtYX8oGX.js.map +1 -0
- package/dist/chunks/{inspector-page.IoC9naSV.js → inspector-page.DvS0wYuG.js} +2 -2
- package/dist/chunks/{inspector-page.IoC9naSV.js.map → inspector-page.DvS0wYuG.js.map} +1 -1
- package/dist/chunks/{inspector.BwtV4rE9.js → inspector.DZau1W4j.js} +2 -2
- package/dist/chunks/{inspector.BwtV4rE9.js.map → inspector.DZau1W4j.js.map} +1 -1
- package/dist/chunks/{list-item.ByyA5h1d.js → list-item.DTHD5vRf.js} +3 -3
- package/dist/chunks/{list-item.ByyA5h1d.js.map → list-item.DTHD5vRf.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.Cp_W_p4z.js → listbox-option-tag.JQxyZV07.js} +2 -2
- package/dist/chunks/{listbox-option-tag.Cp_W_p4z.js.map → listbox-option-tag.JQxyZV07.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.DG8Q-jHL.js → modal-fullscreen.DdlC1oF4.js} +3 -3
- package/dist/chunks/{modal-fullscreen.DG8Q-jHL.js.map → modal-fullscreen.DdlC1oF4.js.map} +1 -1
- package/dist/chunks/{modal.UkzON4bz.js → modal.CcyPb4mE.js} +4 -4
- package/dist/chunks/{modal.UkzON4bz.js.map → modal.CcyPb4mE.js.map} +1 -1
- package/dist/chunks/{navigation-menu-group.BzKRuhrd.js → navigation-menu-group.Syx9ckwd.js} +2 -2
- package/dist/chunks/{navigation-menu-group.BzKRuhrd.js.map → navigation-menu-group.Syx9ckwd.js.map} +1 -1
- package/dist/chunks/{pagination.DZEVT-CA.js → pagination.BVGAPUhn.js} +2 -2
- package/dist/chunks/{pagination.DZEVT-CA.js.map → pagination.BVGAPUhn.js.map} +1 -1
- package/dist/chunks/popover.types.CoDfZgDc.js +6 -0
- package/dist/chunks/{popover.types.DvIwSAAp.js.map → popover.types.CoDfZgDc.js.map} +1 -1
- package/dist/chunks/{popper-container.Cj3AWXSd.js → popper-container.Co4j6qME.js} +2 -2
- package/dist/chunks/{popper-container.Cj3AWXSd.js.map → popper-container.Co4j6qME.js.map} +1 -1
- package/dist/chunks/{progress-bar.CaurNYsc.js → progress-bar.BVQrgM_5.js} +2 -2
- package/dist/chunks/{progress-bar.CaurNYsc.js.map → progress-bar.BVQrgM_5.js.map} +1 -1
- package/dist/chunks/promo-banner.CcYpFY9b.js.map +1 -1
- package/dist/chunks/{radio-group.CLbYlzD7.js → radio-group.Do6wZ8p5.js} +3 -3
- package/dist/chunks/{radio-group.CLbYlzD7.js.map → radio-group.Do6wZ8p5.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.5SMm2BbC.js → rich-text-editor.CTJGGcFd.js} +5 -5
- package/dist/chunks/{rich-text-editor.5SMm2BbC.js.map → rich-text-editor.CTJGGcFd.js.map} +1 -1
- package/dist/chunks/{search-bar.DrIwlAQj.js → search-bar.DFvrkNTD.js} +3 -3
- package/dist/chunks/{search-bar.DrIwlAQj.js.map → search-bar.DFvrkNTD.js.map} +1 -1
- package/dist/chunks/{secondary-nav.DRs5yAve.js → secondary-nav.BMsZqzdr.js} +3 -3
- package/dist/chunks/{secondary-nav.DRs5yAve.js.map → secondary-nav.BMsZqzdr.js.map} +1 -1
- package/dist/chunks/{segmented-control.CcQoBTfT.js → segmented-control.CgQbt9HC.js} +2 -2
- package/dist/chunks/{segmented-control.CcQoBTfT.js.map → segmented-control.CgQbt9HC.js.map} +1 -1
- package/dist/chunks/select-avatar-filter.DzuDTc_M.js +51 -0
- package/dist/chunks/select-avatar-filter.DzuDTc_M.js.map +1 -0
- package/dist/chunks/select-country-filter.DfLRX6oH.js +55 -0
- package/dist/chunks/select-country-filter.DfLRX6oH.js.map +1 -0
- package/dist/chunks/select-currency-filter.DZdYgqq3.js +89 -0
- package/dist/chunks/select-currency-filter.DZdYgqq3.js.map +1 -0
- package/dist/chunks/select-payment-method-filter.8NdbJiG5.js +51 -0
- package/dist/chunks/select-payment-method-filter.8NdbJiG5.js.map +1 -0
- package/dist/chunks/select-tag-filter.CTiPiXzG.js +59 -0
- package/dist/chunks/select-tag-filter.CTiPiXzG.js.map +1 -0
- package/dist/chunks/{selection-card-group.BYBAG8ig.js → selection-card-group.BhbzoA3X.js} +3 -3
- package/dist/chunks/{selection-card-group.BYBAG8ig.js.map → selection-card-group.BhbzoA3X.js.map} +1 -1
- package/dist/chunks/{sidepanel.CLbVkH7v.js → sidepanel.CbFGBFMX.js} +8 -8
- package/dist/chunks/sidepanel.CbFGBFMX.js.map +1 -0
- package/dist/chunks/{structured-list-item.BgcR0XlO.js → structured-list-item.C-9xk326.js} +4 -4
- package/dist/chunks/{structured-list-item.BgcR0XlO.js.map → structured-list-item.C-9xk326.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.Do2PZQGm.js → summary-grid.types.C4-lY9Xr.js} +6 -6
- package/dist/chunks/{summary-grid.types.Do2PZQGm.js.map → summary-grid.types.C4-lY9Xr.js.map} +1 -1
- package/dist/chunks/{tab.zeRxc-3T.js → tab.BHaKwojJ.js} +3 -3
- package/dist/chunks/{tab.zeRxc-3T.js.map → tab.BHaKwojJ.js.map} +1 -1
- package/dist/chunks/{tag.CgsX8v2m.js → tag.DSyMRETc.js} +2 -2
- package/dist/chunks/{tag.CgsX8v2m.js.map → tag.DSyMRETc.js.map} +1 -1
- package/dist/chunks/{textarea.DMBnJaB1.js → textarea.DFKus3jR.js} +2 -2
- package/dist/chunks/{textarea.DMBnJaB1.js.map → textarea.DFKus3jR.js.map} +1 -1
- package/dist/chunks/{timeline-item.CS7TCdoU.js → timeline-item.bXwmfW79.js} +80 -68
- package/dist/chunks/timeline-item.bXwmfW79.js.map +1 -0
- package/dist/chunks/{title-details.BhR2nis-.js → title-details.cMpPBjrP.js} +2 -2
- package/dist/chunks/{title-details.BhR2nis-.js.map → title-details.cMpPBjrP.js.map} +1 -1
- package/dist/chunks/{tooltip.BOe7LOfD.js → tooltip.BeDzwoCN.js} +3 -3
- package/dist/chunks/{tooltip.BOe7LOfD.js.map → tooltip.BeDzwoCN.js.map} +1 -1
- package/dist/chunks/{tutorial.DSbBx_2h.js → tutorial.C8ApuHSy.js} +4 -4
- package/dist/chunks/{tutorial.DSbBx_2h.js.map → tutorial.C8ApuHSy.js.map} +1 -1
- package/dist/chunks/typography.Cd386LC_.js.map +1 -1
- package/dist/chunks/{use-date-input-formatter.CouOE5tF.js → use-date-input-formatter.DgTh6Zx4.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.CouOE5tF.js.map → use-date-input-formatter.DgTh6Zx4.js.map} +1 -1
- package/dist/chunks/warning-filled.DI6aB6vH.js +26 -0
- package/dist/chunks/warning-filled.DI6aB6vH.js.map +1 -0
- 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/date-time-picker.js +1 -1
- package/dist/draggable.js +2 -2
- package/dist/dropdown.js +2 -2
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.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 +57 -57
- package/dist/info-icon.js +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/inspector.js +2 -2
- package/dist/internal.js +13 -13
- package/dist/list.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/navigation-menu.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/popover.js +2 -2
- package/dist/popper-container.js +1 -1
- package/dist/progress-bar.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/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.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 +74 -10
- package/package.json +7 -7
- package/dist/chunks/alert.BddJPWMN.js.map +0 -1
- package/dist/chunks/button-actions.CdetBz3J.js.map +0 -1
- package/dist/chunks/dropdown.CpZQYisR.js.map +0 -1
- package/dist/chunks/filter-bar.Bio9nf9V.js +0 -3132
- package/dist/chunks/filter-bar.Bio9nf9V.js.map +0 -1
- package/dist/chunks/grid-layout.BeCrjPgT.js +0 -75
- package/dist/chunks/grid-layout.BeCrjPgT.js.map +0 -1
- package/dist/chunks/popover.types.DvIwSAAp.js +0 -6
- package/dist/chunks/sidepanel.CLbVkH7v.js.map +0 -1
- package/dist/chunks/timeline-item.CS7TCdoU.js.map +0 -1
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
import { computed as n, ref as
|
|
2
|
-
import { B as
|
|
3
|
-
import { g as
|
|
4
|
-
import { u as
|
|
5
|
-
import { s as
|
|
6
|
-
import { u as
|
|
7
|
-
import { C as
|
|
8
|
-
import { C as
|
|
9
|
-
import { n as
|
|
10
|
-
import { C as
|
|
11
|
-
import { C as
|
|
1
|
+
import { computed as n, ref as y, onMounted as dt, onUnmounted as pt, watch as Q, defineComponent as W, getCurrentInstance as Ne, nextTick as j, toRef as J, useSlots as xe, useAttrs as Ge, toRefs as ft, inject as Ue } from "vue";
|
|
2
|
+
import { B as pe } from "./typography.Cd386LC_.js";
|
|
3
|
+
import { g as re } from "./generate-uid.DBWe4g6T.js";
|
|
4
|
+
import { u as fe } from "./index.CPOlyau9.js";
|
|
5
|
+
import { s as _e } from "./events.BQOQSSb7.js";
|
|
6
|
+
import { u as Je } from "./use-has-slot.C9lQZ6nz.js";
|
|
7
|
+
import { C as bt } from "./cross-circle-fill.D3dEmLeQ.js";
|
|
8
|
+
import { C as vt } from "./cross-circle-fill-small.CZN966bc.js";
|
|
9
|
+
import { n as q } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
10
|
+
import { C as Xe } from "./chevron-down.B_QiVCoO.js";
|
|
11
|
+
import { C as Ze } from "./chevron-up.YQRo8uKs.js";
|
|
12
12
|
/* empty css */
|
|
13
|
-
import { u as
|
|
14
|
-
import { u as
|
|
15
|
-
import { B as
|
|
16
|
-
import { B as
|
|
17
|
-
import { B as
|
|
18
|
-
import { o as
|
|
13
|
+
import { u as mt } from "./form-field.B60VsF8d.js";
|
|
14
|
+
import { u as _t } from "./use-form-layout-loading.CWbjZiwP.js";
|
|
15
|
+
import { B as K, a as $e } from "./keyboard-navigation.DWmhelVv.js";
|
|
16
|
+
import { B as Qe } from "./loading-indicator.PxbRzshH.js";
|
|
17
|
+
import { B as et } from "./empty-state.jbVOuwyN.js";
|
|
18
|
+
import { o as yt } from "./resize.Bqks3WUm.js";
|
|
19
19
|
import "./index.Cl4_42j5.js";
|
|
20
|
-
import { B as
|
|
21
|
-
import { C as
|
|
22
|
-
import { B as
|
|
23
|
-
import { b as
|
|
24
|
-
import { B as
|
|
25
|
-
import { F as Ot } from "./field-label.
|
|
26
|
-
import { E as
|
|
27
|
-
import { P as
|
|
20
|
+
import { B as Re, N as gt } from "./minus-small.CAycYt5H.js";
|
|
21
|
+
import { C as ht } from "./checkmark-small.BlvuuCsU.js";
|
|
22
|
+
import { B as St } from "./chip.Cc4f2vws.js";
|
|
23
|
+
import { b as Me, a as xt, h as Ct, e as It } from "./button-actions.B332AjJp.js";
|
|
24
|
+
import { B as Lt } from "./directive.D1-d-C2K.js";
|
|
25
|
+
import { F as Ot } from "./field-label.Bz2PGQ-8.js";
|
|
26
|
+
import { E as Et } from "./error-message.B-n8wzFo.js";
|
|
27
|
+
import { P as je } from "./popper-container.Co4j6qME.js";
|
|
28
28
|
import "../assets/dropdown.css";
|
|
29
|
-
const
|
|
29
|
+
const tt = (a, e, l, t) => {
|
|
30
30
|
const s = n(
|
|
31
31
|
() => !!a.value?.length && a.value?.length === e.value.length
|
|
32
32
|
), o = n(() => a.value == null || a.value.length === 0 ? !1 : a.value?.length !== e.value.length);
|
|
33
33
|
return {
|
|
34
34
|
isAllSelected: s,
|
|
35
35
|
isIndeterminate: o,
|
|
36
|
-
toggleSelectAll: (
|
|
37
|
-
|
|
36
|
+
toggleSelectAll: (v) => {
|
|
37
|
+
v ? l() : t();
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
|
-
function
|
|
42
|
-
const o =
|
|
41
|
+
function wt(a, { disabled: e, itemHeight: l, overscan: t = 5, prefixHeight: s }) {
|
|
42
|
+
const o = y(null), i = y([]), v = y(0), b = y(0), u = y(0);
|
|
43
43
|
let r;
|
|
44
44
|
const m = n(() => {
|
|
45
|
-
const S = typeof l == "number" ? a.value.length * l : a.value.reduce((
|
|
45
|
+
const S = typeof l == "number" ? a.value.length * l : a.value.reduce((g, A, k) => g + l(k), 0), B = typeof l == "number" ? v.value * l : a.value.slice(0, v.value).reduce((g, A, k) => g + l(k), 0);
|
|
46
46
|
return {
|
|
47
47
|
style: {
|
|
48
|
-
marginTop: `${
|
|
49
|
-
height: `${S -
|
|
48
|
+
marginTop: `${B}px`,
|
|
49
|
+
height: `${S - B}px`
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
}),
|
|
53
|
-
const S = s?.value ?? 0,
|
|
52
|
+
}), d = () => {
|
|
53
|
+
const S = s?.value ?? 0, B = Math.max(o.value.scrollTop - S, 0);
|
|
54
54
|
if (typeof l == "number")
|
|
55
|
-
return Math.floor(
|
|
56
|
-
let
|
|
57
|
-
for (let
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
60
|
-
|
|
55
|
+
return Math.floor(B / l);
|
|
56
|
+
let g = 0, A = 0;
|
|
57
|
+
for (let k = 0; k < a.value.length; k += 1) {
|
|
58
|
+
const $ = l(k);
|
|
59
|
+
if (g += $, g >= B) {
|
|
60
|
+
A = k;
|
|
61
61
|
break;
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
return
|
|
64
|
+
return A;
|
|
65
65
|
}, c = () => {
|
|
66
|
-
if (
|
|
67
|
-
return Math.ceil(
|
|
68
|
-
const S =
|
|
69
|
-
let
|
|
70
|
-
for (let
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
66
|
+
if (u.value = o.value.clientHeight, typeof l == "number")
|
|
67
|
+
return Math.ceil(u.value / l);
|
|
68
|
+
const S = v.value ?? 0;
|
|
69
|
+
let B = 0, g = 0;
|
|
70
|
+
for (let A = S; A < a.value.length; A += 1) {
|
|
71
|
+
const k = l(A);
|
|
72
|
+
if (B += k, g = A, B > u.value)
|
|
73
73
|
break;
|
|
74
74
|
}
|
|
75
|
-
return
|
|
76
|
-
},
|
|
75
|
+
return g - S;
|
|
76
|
+
}, _ = () => {
|
|
77
77
|
if (o.value) {
|
|
78
78
|
const S = c();
|
|
79
|
-
|
|
79
|
+
v.value = d(), b.value = Math.min(v.value + S + t, a.value.length), i.value = a.value.slice(v.value, b.value);
|
|
80
80
|
}
|
|
81
|
-
},
|
|
82
|
-
|
|
81
|
+
}, R = () => {
|
|
82
|
+
_();
|
|
83
83
|
};
|
|
84
|
-
e || (
|
|
85
|
-
o.value && (
|
|
86
|
-
|
|
87
|
-
}),
|
|
88
|
-
}),
|
|
84
|
+
e || (dt(() => {
|
|
85
|
+
o.value && (u.value = o.value.clientHeight, r = yt(o.value, ({ clientHeight: S }) => {
|
|
86
|
+
u.value = S, _();
|
|
87
|
+
}), _());
|
|
88
|
+
}), pt(() => {
|
|
89
89
|
r?.disconnect();
|
|
90
90
|
}), Q(
|
|
91
91
|
() => a.value,
|
|
92
92
|
() => {
|
|
93
|
-
|
|
93
|
+
_();
|
|
94
94
|
}
|
|
95
95
|
));
|
|
96
|
-
const
|
|
96
|
+
const L = {
|
|
97
97
|
ref: o,
|
|
98
98
|
style: { overflowY: "auto" }
|
|
99
|
-
},
|
|
99
|
+
}, O = (S) => {
|
|
100
100
|
if (!o.value)
|
|
101
101
|
return;
|
|
102
|
-
const
|
|
103
|
-
|
|
102
|
+
const B = typeof l == "number" ? S * l : a.value.slice(0, S).reduce((Y, V, C) => Y + l(C), 0), g = typeof l == "number" ? l : l(S), A = B + g, { scrollTop: k, clientHeight: $ } = o.value, E = k + $;
|
|
103
|
+
A > E ? o.value.scrollTop = $ > 0 ? A - $ : B : B < k && (o.value.scrollTop = B), _();
|
|
104
104
|
};
|
|
105
105
|
return e ? {
|
|
106
106
|
containerRef: o,
|
|
107
|
-
containerProps:
|
|
107
|
+
containerProps: L,
|
|
108
108
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
109
109
|
onScroll: () => {
|
|
110
110
|
},
|
|
@@ -112,22 +112,22 @@ function Et(a, { disabled: e, itemHeight: l, overscan: t = 5, prefixHeight: s })
|
|
|
112
112
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
113
113
|
scrollToIndex: () => {
|
|
114
114
|
},
|
|
115
|
-
startIndex:
|
|
115
|
+
startIndex: y(0)
|
|
116
116
|
} : {
|
|
117
117
|
containerRef: o,
|
|
118
|
-
containerProps:
|
|
119
|
-
onScroll:
|
|
118
|
+
containerProps: L,
|
|
119
|
+
onScroll: R,
|
|
120
120
|
list: i,
|
|
121
121
|
wrapperProps: m,
|
|
122
|
-
scrollToIndex:
|
|
123
|
-
startIndex:
|
|
122
|
+
scrollToIndex: O,
|
|
123
|
+
startIndex: v
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
-
var
|
|
127
|
-
const
|
|
126
|
+
var p = /* @__PURE__ */ ((a) => (a.SELECT = "select", a.SHOW_MORE = "show-more", a.ESCAPE = "escape-pressed", a.CLICK = "click", a.ENTER = "enter-pressed", a.SPACE = "space-pressed", a.TAB = "tab-pressed", a.CLOSE_DROPDOWN = "close-dropdown", a))(p || {}), ne = /* @__PURE__ */ ((a) => (a.AUTOMATIC = "automatic", a.BUTTON = "button", a.NONE = "none", a))(ne || {});
|
|
127
|
+
const Tt = W({
|
|
128
128
|
name: "bento-listbox-static-category",
|
|
129
129
|
components: {
|
|
130
|
-
BentoTypography:
|
|
130
|
+
BentoTypography: pe
|
|
131
131
|
},
|
|
132
132
|
props: {
|
|
133
133
|
/**
|
|
@@ -139,18 +139,18 @@ const wt = V({
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
|
-
var
|
|
142
|
+
var At = function() {
|
|
143
143
|
var e = this, l = e._self._c;
|
|
144
144
|
return e._self._setupProxy, l("div", { staticClass: "b-listbox-single-select-category", attrs: { role: "group", "aria-label": e.categoryLabel } }, [l("bento-typography", { staticClass: "b-listbox-single-select-category__label-text", attrs: { variant: "caption", el: "span", "aria-hidden": "true" } }, [e._v(" " + e._s(e.categoryLabel) + " ")]), l("div", [e._t("default")], 2)], 1);
|
|
145
|
-
},
|
|
146
|
-
wt,
|
|
145
|
+
}, Dt = [], kt = /* @__PURE__ */ q(
|
|
147
146
|
Tt,
|
|
148
147
|
At,
|
|
148
|
+
Dt,
|
|
149
149
|
!1,
|
|
150
150
|
null,
|
|
151
151
|
"bfbc1649"
|
|
152
152
|
);
|
|
153
|
-
const
|
|
153
|
+
const Bt = kt.exports, Rt = W({
|
|
154
154
|
name: "bento-listbox-option",
|
|
155
155
|
props: {
|
|
156
156
|
/**
|
|
@@ -166,7 +166,7 @@ const Dt = kt.exports, Bt = V({
|
|
|
166
166
|
*/
|
|
167
167
|
selected: { type: Boolean, default: !1 }
|
|
168
168
|
},
|
|
169
|
-
emits: [
|
|
169
|
+
emits: [p.CLICK, p.ENTER, p.SPACE, p.TAB],
|
|
170
170
|
setup(a, { emit: e }) {
|
|
171
171
|
const l = n(() => ({
|
|
172
172
|
"b-listbox-option--active": a.active,
|
|
@@ -175,13 +175,13 @@ const Dt = kt.exports, Bt = V({
|
|
|
175
175
|
}));
|
|
176
176
|
return {
|
|
177
177
|
// Enums
|
|
178
|
-
BentoKeyboardNavigationKeyDownEvent:
|
|
179
|
-
BentoListboxEvent:
|
|
178
|
+
BentoKeyboardNavigationKeyDownEvent: K,
|
|
179
|
+
BentoListboxEvent: p,
|
|
180
180
|
// Values
|
|
181
181
|
conditionalClasses: l,
|
|
182
182
|
// Events
|
|
183
183
|
onClick: (o) => {
|
|
184
|
-
e(
|
|
184
|
+
e(p.CLICK, o);
|
|
185
185
|
},
|
|
186
186
|
onOptionSelected: (o, i) => {
|
|
187
187
|
e(o, i);
|
|
@@ -189,7 +189,7 @@ const Dt = kt.exports, Bt = V({
|
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
191
|
});
|
|
192
|
-
var
|
|
192
|
+
var Mt = function() {
|
|
193
193
|
var e = this, l = e._self._c;
|
|
194
194
|
return e._self._setupProxy, l("div", e._b({ staticClass: "b-listbox-option", class: e.conditionalClasses, attrs: { role: "option" }, on: { click: e.onClick, keydown: [function(t) {
|
|
195
195
|
return !t.type.indexOf("key") && e._k(t.keyCode, "enter", 13, t.key, "Enter") ? null : e.onOptionSelected(e.BentoListboxEvent.ENTER, t);
|
|
@@ -198,38 +198,38 @@ var Rt = function() {
|
|
|
198
198
|
}, function(t) {
|
|
199
199
|
return !t.type.indexOf("key") && e._k(t.keyCode, "tab", 9, t.key, "Tab") ? null : e.onOptionSelected(e.BentoListboxEvent.TAB, t);
|
|
200
200
|
}] } }, "div", e.$attrs, !1), [e._t("default")], 2);
|
|
201
|
-
},
|
|
202
|
-
Bt,
|
|
201
|
+
}, Nt = [], $t = /* @__PURE__ */ q(
|
|
203
202
|
Rt,
|
|
204
203
|
Mt,
|
|
204
|
+
Nt,
|
|
205
205
|
!1,
|
|
206
206
|
null,
|
|
207
207
|
"6722b88d"
|
|
208
208
|
);
|
|
209
|
-
const
|
|
209
|
+
const Pe = $t.exports, Pt = {
|
|
210
210
|
__name: "checkmark",
|
|
211
211
|
setup(a) {
|
|
212
|
-
const e =
|
|
212
|
+
const e = Ne(), l = String(e?.uid ?? e?.proxy?._uid);
|
|
213
213
|
return { __sfc: !0, instance: e, uuid: l };
|
|
214
214
|
}
|
|
215
215
|
};
|
|
216
|
-
var
|
|
216
|
+
var Ft = function() {
|
|
217
217
|
var e = this, l = e._self._c;
|
|
218
218
|
return e._self._setupProxy, l("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? l("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), l("path", { attrs: { fill: "#001222", d: "M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z" } })]);
|
|
219
|
-
},
|
|
220
|
-
$t,
|
|
219
|
+
}, zt = [], Vt = /* @__PURE__ */ q(
|
|
221
220
|
Pt,
|
|
222
221
|
Ft,
|
|
222
|
+
zt,
|
|
223
223
|
!1,
|
|
224
224
|
null,
|
|
225
225
|
null
|
|
226
226
|
);
|
|
227
|
-
const
|
|
227
|
+
const Gt = Vt.exports, Ut = W({
|
|
228
228
|
name: "bento-listbox-single-select-option",
|
|
229
229
|
components: {
|
|
230
|
-
BentoListboxOption:
|
|
231
|
-
BentoTypography:
|
|
232
|
-
CheckmarkIcon:
|
|
230
|
+
BentoListboxOption: Pe,
|
|
231
|
+
BentoTypography: pe,
|
|
232
|
+
CheckmarkIcon: Gt
|
|
233
233
|
},
|
|
234
234
|
props: {
|
|
235
235
|
/**
|
|
@@ -253,7 +253,7 @@ const zt = Vt.exports, Gt = V({
|
|
|
253
253
|
*/
|
|
254
254
|
selected: { type: Boolean, default: !1 }
|
|
255
255
|
},
|
|
256
|
-
emits: [
|
|
256
|
+
emits: [p.ENTER, p.SELECT, p.SPACE, p.TAB],
|
|
257
257
|
setup(a, { emit: e }) {
|
|
258
258
|
const l = (i) => {
|
|
259
259
|
a.disabled || e(i, a.option);
|
|
@@ -264,13 +264,13 @@ const zt = Vt.exports, Gt = V({
|
|
|
264
264
|
ariaSelected: s,
|
|
265
265
|
tabIndex: o,
|
|
266
266
|
// Enums
|
|
267
|
-
BentoListboxEvent:
|
|
267
|
+
BentoListboxEvent: p,
|
|
268
268
|
// Events
|
|
269
269
|
onOptionSelected: l
|
|
270
270
|
};
|
|
271
271
|
}
|
|
272
272
|
});
|
|
273
|
-
var
|
|
273
|
+
var Wt = function() {
|
|
274
274
|
var e = this, l = e._self._c;
|
|
275
275
|
return e._self._setupProxy, l("bento-listbox-option", { staticClass: "b-listbox-single-select-option", attrs: { active: e.active, disabled: e.disabled, selected: e.selected, "aria-selected": e.ariaSelected, "aria-disabled": e.ariaDisabled, tabindex: e.tabIndex }, on: { click: function(t) {
|
|
276
276
|
return e.onOptionSelected(e.BentoListboxEvent.SELECT);
|
|
@@ -283,16 +283,16 @@ var Ut = function() {
|
|
|
283
283
|
} } }, [e._t("default", function() {
|
|
284
284
|
return [l("span", { staticClass: "b-listbox-single-select-option__text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.option.label))]), e.option.description ? l("bento-typography", { staticClass: "b-listbox-single-select-option__description", attrs: { el: "span" } }, [e._v(" " + e._s(e.option.description) + " ")]) : e._e()], 1)];
|
|
285
285
|
}, null, e.option), l("span", { staticClass: "b-listbox-single-select-option__check-icon" }, [l("checkmark-icon", { directives: [{ name: "show", rawName: "v-show", value: e.selected, expression: "selected" }], attrs: { "svg-title": "selected" } })], 1)], 2);
|
|
286
|
-
},
|
|
287
|
-
Gt,
|
|
286
|
+
}, Kt = [], qt = /* @__PURE__ */ q(
|
|
288
287
|
Ut,
|
|
289
288
|
Wt,
|
|
289
|
+
Kt,
|
|
290
290
|
!1,
|
|
291
291
|
null,
|
|
292
292
|
"232e0377"
|
|
293
293
|
);
|
|
294
|
-
const
|
|
295
|
-
const t = n(() => e?.value ? e.value - 1 : a.value.length - 1), s =
|
|
294
|
+
const Yt = qt.exports, lt = ({ items: a, totalItemCount: e }, l) => {
|
|
295
|
+
const t = n(() => e?.value ? e.value - 1 : a.value.length - 1), s = y(0), o = (c) => {
|
|
296
296
|
switch (c) {
|
|
297
297
|
case "increase":
|
|
298
298
|
s.value += 1;
|
|
@@ -301,53 +301,53 @@ const qt = Kt.exports, tt = ({ items: a, totalItemCount: e }, l) => {
|
|
|
301
301
|
s.value -= 1;
|
|
302
302
|
break;
|
|
303
303
|
}
|
|
304
|
-
}, i = ({ edgeCaseItem: c },
|
|
305
|
-
s.value !== c && (o(
|
|
306
|
-
},
|
|
307
|
-
|
|
304
|
+
}, i = ({ edgeCaseItem: c }, _) => {
|
|
305
|
+
s.value !== c && (o(_), l(s.value));
|
|
306
|
+
}, v = (c) => {
|
|
307
|
+
d(c), i(
|
|
308
308
|
{
|
|
309
309
|
edgeCaseItem: t.value
|
|
310
310
|
},
|
|
311
311
|
"increase"
|
|
312
312
|
/* INCREASE */
|
|
313
313
|
);
|
|
314
|
-
},
|
|
315
|
-
|
|
314
|
+
}, b = (c) => {
|
|
315
|
+
d(c), i(
|
|
316
316
|
{
|
|
317
317
|
edgeCaseItem: 0
|
|
318
318
|
},
|
|
319
319
|
"decrease"
|
|
320
320
|
/* DECREASE */
|
|
321
321
|
);
|
|
322
|
-
},
|
|
323
|
-
|
|
322
|
+
}, u = (c) => {
|
|
323
|
+
d(c), s.value = 0, l(s.value);
|
|
324
324
|
}, r = (c) => {
|
|
325
|
-
|
|
325
|
+
d(c), s.value = t.value, l(s.value);
|
|
326
326
|
}, m = (c) => {
|
|
327
327
|
s.value = c;
|
|
328
|
-
},
|
|
328
|
+
}, d = (c) => {
|
|
329
329
|
c?.detail?.preventDefault(), c?.detail?.stopPropagation();
|
|
330
330
|
};
|
|
331
331
|
return {
|
|
332
|
-
moveToFirstElement:
|
|
332
|
+
moveToFirstElement: u,
|
|
333
333
|
moveToLastElement: r,
|
|
334
|
-
moveToNextElement:
|
|
335
|
-
moveToPreviousElement:
|
|
334
|
+
moveToNextElement: v,
|
|
335
|
+
moveToPreviousElement: b,
|
|
336
336
|
setListboxFocusedIndex: m,
|
|
337
|
-
preventDefault:
|
|
337
|
+
preventDefault: d,
|
|
338
338
|
focusedIndex: s
|
|
339
339
|
};
|
|
340
|
-
},
|
|
341
|
-
const s =
|
|
340
|
+
}, We = (a, e, l = y("option"), t = !0) => {
|
|
341
|
+
const s = y([]), o = async () => {
|
|
342
342
|
if (!a.value || a.value.nodeType === Node.COMMENT_NODE)
|
|
343
343
|
return;
|
|
344
344
|
const i = Array.from(a.value.querySelectorAll(`[role="${l.value}"]`));
|
|
345
|
-
s.value = t ? i.filter((
|
|
345
|
+
s.value = t ? i.filter((v) => v.checkVisibility()) : i;
|
|
346
346
|
};
|
|
347
347
|
return Q(
|
|
348
348
|
e,
|
|
349
349
|
() => {
|
|
350
|
-
|
|
350
|
+
j(() => {
|
|
351
351
|
o();
|
|
352
352
|
});
|
|
353
353
|
},
|
|
@@ -356,13 +356,13 @@ const qt = Kt.exports, tt = ({ items: a, totalItemCount: e }, l) => {
|
|
|
356
356
|
visibleDomOptions: s,
|
|
357
357
|
updateVisibleDomOptions: o
|
|
358
358
|
};
|
|
359
|
-
},
|
|
359
|
+
}, at = (a, e) => `${a}-option-${encodeURIComponent(String(e))}`, jt = W({
|
|
360
360
|
name: "bento-listbox-single-select",
|
|
361
361
|
components: {
|
|
362
|
-
BentoListboxSingleSelectCategory:
|
|
363
|
-
BentoListboxSingleSelectOption:
|
|
362
|
+
BentoListboxSingleSelectCategory: Bt,
|
|
363
|
+
BentoListboxSingleSelectOption: Yt
|
|
364
364
|
},
|
|
365
|
-
directives: { BentoKeyboardNavigationDirective:
|
|
365
|
+
directives: { BentoKeyboardNavigationDirective: $e },
|
|
366
366
|
inheritAttrs: !1,
|
|
367
367
|
props: {
|
|
368
368
|
/**
|
|
@@ -424,71 +424,69 @@ const qt = Kt.exports, tt = ({ items: a, totalItemCount: e }, l) => {
|
|
|
424
424
|
*/
|
|
425
425
|
virtualScrollStartIndex: { type: Number, default: 0 }
|
|
426
426
|
},
|
|
427
|
-
emits: [
|
|
427
|
+
emits: [p.SELECT, p.ENTER, p.SPACE, p.TAB],
|
|
428
428
|
setup(a, { emit: e, expose: l, slots: t, attrs: s }) {
|
|
429
|
-
const o =
|
|
429
|
+
const o = y(), i = y([]), v = n(() => !!a.selectedValue?.length && a.selectedValue.at(0)), b = n(
|
|
430
430
|
() => ({
|
|
431
431
|
"aria-label": s["aria-label"]?.toString(),
|
|
432
|
-
"aria-busy": s["aria-busy"]?.toString()
|
|
433
|
-
"aria-atomic": s["aria-atomic"]?.toString(),
|
|
434
|
-
"aria-live": s["aria-live"]?.toString()
|
|
432
|
+
"aria-busy": s["aria-busy"]?.toString()
|
|
435
433
|
})
|
|
436
|
-
),
|
|
437
|
-
e(
|
|
438
|
-
}, m = (
|
|
434
|
+
), u = n(() => !!a.items.some(({ items: C }) => !!C)), r = (C) => (z) => {
|
|
435
|
+
e(C, [z]);
|
|
436
|
+
}, m = (C) => at(a.optionIdBase, C.value), { visibleDomOptions: d, updateVisibleDomOptions: c } = We(
|
|
439
437
|
o,
|
|
440
|
-
|
|
441
|
-
|
|
438
|
+
J(a, "items"),
|
|
439
|
+
y("option"),
|
|
442
440
|
!1
|
|
443
|
-
),
|
|
444
|
-
if (!
|
|
441
|
+
), _ = n(() => a.totalItemCount > 0), R = (C) => {
|
|
442
|
+
if (!_.value)
|
|
445
443
|
return;
|
|
446
|
-
const
|
|
447
|
-
if (
|
|
444
|
+
const z = C.target;
|
|
445
|
+
if (z === o.value || z?.getAttribute("role") !== "option")
|
|
448
446
|
return;
|
|
449
|
-
const
|
|
450
|
-
if (
|
|
451
|
-
const
|
|
452
|
-
|
|
447
|
+
const w = d.value.indexOf(z);
|
|
448
|
+
if (w !== -1) {
|
|
449
|
+
const x = w + a.virtualScrollStartIndex;
|
|
450
|
+
E(x);
|
|
453
451
|
}
|
|
454
|
-
},
|
|
455
|
-
if (
|
|
456
|
-
a.scrollToIndex(
|
|
457
|
-
const
|
|
458
|
-
|
|
452
|
+
}, L = async (C) => {
|
|
453
|
+
if (_.value && a.scrollToIndex) {
|
|
454
|
+
a.scrollToIndex(C), await j(), await c();
|
|
455
|
+
const z = C - a.virtualScrollStartIndex;
|
|
456
|
+
d.value[z]?.focus();
|
|
459
457
|
} else
|
|
460
|
-
|
|
461
|
-
},
|
|
462
|
-
|
|
463
|
-
}, S = (
|
|
464
|
-
if (!
|
|
458
|
+
d.value[C]?.focus();
|
|
459
|
+
}, O = async (C) => {
|
|
460
|
+
E(C), await L(C);
|
|
461
|
+
}, S = (C, z) => {
|
|
462
|
+
if (!C || !z)
|
|
465
463
|
return;
|
|
466
|
-
const
|
|
467
|
-
|
|
468
|
-
},
|
|
469
|
-
await c(),
|
|
464
|
+
const w = C.getBoundingClientRect(), x = z, P = x.getBoundingClientRect();
|
|
465
|
+
w.top < P.top ? x.scrollTop -= P.top - w.top : w.bottom > P.bottom && (x.scrollTop += w.bottom - P.bottom);
|
|
466
|
+
}, B = async (C, z) => {
|
|
467
|
+
await c(), _.value && a.scrollToIndex ? a.scrollToIndex(C) : S(d.value[C], z);
|
|
470
468
|
}, {
|
|
471
|
-
moveToNextElement:
|
|
472
|
-
moveToPreviousElement:
|
|
473
|
-
moveToFirstElement:
|
|
474
|
-
moveToLastElement:
|
|
475
|
-
setListboxFocusedIndex:
|
|
476
|
-
} =
|
|
469
|
+
moveToNextElement: g,
|
|
470
|
+
moveToPreviousElement: A,
|
|
471
|
+
moveToFirstElement: k,
|
|
472
|
+
moveToLastElement: $,
|
|
473
|
+
setListboxFocusedIndex: E
|
|
474
|
+
} = lt(
|
|
477
475
|
{
|
|
478
|
-
items:
|
|
479
|
-
totalItemCount:
|
|
476
|
+
items: d,
|
|
477
|
+
totalItemCount: J(a, "totalItemCount")
|
|
480
478
|
},
|
|
481
|
-
|
|
482
|
-
),
|
|
483
|
-
[
|
|
484
|
-
[
|
|
485
|
-
[
|
|
486
|
-
[
|
|
487
|
-
},
|
|
488
|
-
[
|
|
489
|
-
[
|
|
490
|
-
[
|
|
491
|
-
[
|
|
479
|
+
L
|
|
480
|
+
), Y = {
|
|
481
|
+
[K.ARROW_UP]: A,
|
|
482
|
+
[K.ARROW_DOWN]: g,
|
|
483
|
+
[K.HOME]: k,
|
|
484
|
+
[K.END]: $
|
|
485
|
+
}, V = {
|
|
486
|
+
[p.SELECT]: r(p.SELECT),
|
|
487
|
+
[p.SPACE]: r(p.SPACE),
|
|
488
|
+
[p.TAB]: r(p.TAB),
|
|
489
|
+
[p.ENTER]: r(p.ENTER)
|
|
492
490
|
};
|
|
493
491
|
return l({
|
|
494
492
|
/**
|
|
@@ -500,46 +498,46 @@ const qt = Kt.exports, tt = ({ items: a, totalItemCount: e }, l) => {
|
|
|
500
498
|
* Method to set the index of the item to be focused on
|
|
501
499
|
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
502
500
|
*/
|
|
503
|
-
setListboxFocusedIndex:
|
|
501
|
+
setListboxFocusedIndex: E,
|
|
504
502
|
/**
|
|
505
503
|
* Navigates to an item by global index, handling virtual scroll if enabled.
|
|
506
504
|
* Scrolls the virtual list and focuses the item.
|
|
507
505
|
*/
|
|
508
|
-
navigateToItem:
|
|
506
|
+
navigateToItem: O,
|
|
509
507
|
/**
|
|
510
508
|
* Scrolls to an item by global index without changing focus.
|
|
511
509
|
* Used when the dropdown opens via click to bring the selected option into view.
|
|
512
510
|
*/
|
|
513
|
-
scrollToItem:
|
|
511
|
+
scrollToItem: B
|
|
514
512
|
}), {
|
|
515
513
|
// Enums
|
|
516
|
-
BentoListboxEvent:
|
|
514
|
+
BentoListboxEvent: p,
|
|
517
515
|
// Values
|
|
518
516
|
listboxRef: o,
|
|
519
517
|
listboxItemRef: i,
|
|
520
|
-
selectedItem:
|
|
518
|
+
selectedItem: v,
|
|
521
519
|
slots: t,
|
|
522
|
-
ariaAttributes:
|
|
520
|
+
ariaAttributes: b,
|
|
523
521
|
getOptionId: m,
|
|
524
522
|
// Computed
|
|
525
|
-
hasCategories:
|
|
523
|
+
hasCategories: u,
|
|
526
524
|
// Methods
|
|
527
525
|
onOptionSelected: r,
|
|
528
526
|
// Keyboard navigation
|
|
529
|
-
listboxListeners:
|
|
530
|
-
listboxOptionListeners:
|
|
527
|
+
listboxListeners: Y,
|
|
528
|
+
listboxOptionListeners: V,
|
|
531
529
|
// Virtual scroll focus management
|
|
532
|
-
handleVirtualScrollingFocus:
|
|
530
|
+
handleVirtualScrollingFocus: R
|
|
533
531
|
};
|
|
534
532
|
}
|
|
535
533
|
});
|
|
536
|
-
var
|
|
534
|
+
var Ht = function() {
|
|
537
535
|
var e = this, l = e._self._c;
|
|
538
536
|
return e._self._setupProxy, l("div", e._g(e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", attrs: { role: "listbox" }, on: { focusin: e.handleVirtualScrollingFocus } }, "div", e.ariaAttributes, !1), e.listboxListeners), [e.hasCategories && e.staticCategories ? [e._l(e.items, function(t) {
|
|
539
537
|
return [t.items && t.items.length > 0 ? l("bento-listbox-single-select-category", { key: `category-${t.value}`, attrs: { "category-label": t.label } }, e._l(t.items, function(s) {
|
|
540
538
|
return l("bento-listbox-single-select-option", e._g({ key: s.value, ref: "listboxItemRef", refInFor: !0, attrs: { id: e.getOptionId(s), role: "option", active: e.activeDescendantId === e.getOptionId(s), option: s, disabled: e.isOptionDisabled ? e.isOptionDisabled(s) : null, selected: s.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(o, i) {
|
|
541
|
-
return { key: i, fn: function(
|
|
542
|
-
return [e._t(i, null, null,
|
|
539
|
+
return { key: i, fn: function(v) {
|
|
540
|
+
return [e._t(i, null, null, v)];
|
|
543
541
|
} };
|
|
544
542
|
})], null, !0) }, e.listboxOptionListeners));
|
|
545
543
|
}), 1) : l("bento-listbox-single-select-option", e._g({ key: `option-${t.value}`, ref: "listboxItemRef", refInFor: !0, attrs: { id: e.getOptionId(t), role: "option", active: e.activeDescendantId === e.getOptionId(t), option: t, disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, selected: t.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(s, o) {
|
|
@@ -554,34 +552,34 @@ var jt = function() {
|
|
|
554
552
|
} };
|
|
555
553
|
})], null, !0) }, e.listboxOptionListeners));
|
|
556
554
|
})], 2);
|
|
557
|
-
},
|
|
558
|
-
Yt,
|
|
555
|
+
}, Jt = [], Xt = /* @__PURE__ */ q(
|
|
559
556
|
jt,
|
|
560
557
|
Ht,
|
|
558
|
+
Jt,
|
|
561
559
|
!1,
|
|
562
560
|
null,
|
|
563
561
|
null
|
|
564
562
|
);
|
|
565
|
-
const
|
|
563
|
+
const Zt = Xt.exports, Qt = {
|
|
566
564
|
__name: "double-checkmark-small",
|
|
567
565
|
setup(a) {
|
|
568
|
-
const e =
|
|
566
|
+
const e = Ne(), l = String(e?.uid ?? e?.proxy?._uid);
|
|
569
567
|
return { __sfc: !0, instance: e, uuid: l };
|
|
570
568
|
}
|
|
571
569
|
};
|
|
572
|
-
var
|
|
570
|
+
var el = function() {
|
|
573
571
|
var e = this, l = e._self._c;
|
|
574
572
|
return e._self._setupProxy, l("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? l("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), l("path", { attrs: { fill: "#001222", d: "M9.69043 5.75L4.62988 10.8105L1.56934 7.75L2.62988 6.68945L4.62988 8.68945L8.62988 4.68945L9.69043 5.75Z" } }), l("path", { attrs: { fill: "#001222", d: "M13.9307 5.75L8.87012 10.8105L7.80957 9.75L12.8701 4.68945L13.9307 5.75Z" } })]);
|
|
575
|
-
},
|
|
576
|
-
Zt,
|
|
573
|
+
}, tl = [], ll = /* @__PURE__ */ q(
|
|
577
574
|
Qt,
|
|
578
575
|
el,
|
|
576
|
+
tl,
|
|
579
577
|
!1,
|
|
580
578
|
null,
|
|
581
579
|
null
|
|
582
580
|
);
|
|
583
|
-
const
|
|
584
|
-
...
|
|
581
|
+
const al = ll.exports, sl = {}, ol = /* @__PURE__ */ W({
|
|
582
|
+
...sl,
|
|
585
583
|
__name: "decorative-checkbox",
|
|
586
584
|
props: {
|
|
587
585
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -591,29 +589,29 @@ const ll = tl.exports, al = {}, sl = /* @__PURE__ */ V({
|
|
|
591
589
|
},
|
|
592
590
|
setup(a) {
|
|
593
591
|
const e = a, l = n(() => ({
|
|
594
|
-
[`b-checkbox-input--${
|
|
592
|
+
[`b-checkbox-input--${Re.DISABLED}`]: e.disabled
|
|
595
593
|
})), t = n(() => ({
|
|
596
|
-
[`b-checkbox-input__outline--${
|
|
597
|
-
[`b-checkbox-input__outline--${
|
|
598
|
-
[`b-checkbox-input__outline--${
|
|
594
|
+
[`b-checkbox-input__outline--${Re.UNCHECKED}`]: !e.checked && !e.indeterminate && !e.allSelected,
|
|
595
|
+
[`b-checkbox-input__outline--${Re.CHECKED}`]: (e.checked || e.allSelected) && !e.indeterminate,
|
|
596
|
+
[`b-checkbox-input__outline--${Re.INDETERMINATE}`]: e.indeterminate
|
|
599
597
|
}));
|
|
600
|
-
return { __sfc: !0, props: e, conditionalClasses: l, outlineConditionalClasses: t, CheckmarkSmallIcon:
|
|
598
|
+
return { __sfc: !0, props: e, conditionalClasses: l, outlineConditionalClasses: t, CheckmarkSmallIcon: ht, MinusSmallIcon: gt, DoubleCheckmarkSmallIcon: al };
|
|
601
599
|
}
|
|
602
600
|
});
|
|
603
|
-
var
|
|
601
|
+
var nl = function() {
|
|
604
602
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
605
603
|
return l("div", { staticClass: "b-checkbox-input", class: t.conditionalClasses, attrs: { role: "presentation" } }, [e.indeterminate ? l(t.MinusSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true" } }) : e.allSelected ? l(t.DoubleCheckmarkSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true", "data-testid": "decorative-checkbox-double-checkmark-icon" } }) : e.checked ? l(t.CheckmarkSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true" } }) : e._e(), l("div", { staticClass: "b-checkbox-input__outline", class: t.outlineConditionalClasses })], 1);
|
|
606
|
-
},
|
|
607
|
-
sl,
|
|
604
|
+
}, il = [], rl = /* @__PURE__ */ q(
|
|
608
605
|
ol,
|
|
609
606
|
nl,
|
|
607
|
+
il,
|
|
610
608
|
!1,
|
|
611
609
|
null,
|
|
612
610
|
"f89ecb37"
|
|
613
611
|
);
|
|
614
|
-
const
|
|
615
|
-
var
|
|
616
|
-
const
|
|
612
|
+
const Ke = rl.exports;
|
|
613
|
+
var st = /* @__PURE__ */ ((a) => (a.DISABLED = "disabled", a.STATIC_CATEGORY = "static-category", a))(st || {}), me = /* @__PURE__ */ ((a) => (a.SELECT_CATEGORY = "select-category", a.UNSELECT_CATEGORY = "unselect-category", a.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", a))(me || {});
|
|
614
|
+
const cl = {
|
|
617
615
|
"de-DE": { loading: "Laden", showMore: "Mehr anzeigen" },
|
|
618
616
|
"en-GB": { loading: "Loading", showMore: "Show more" },
|
|
619
617
|
"en-US": { loading: "Loading", showMore: "Show more" },
|
|
@@ -625,11 +623,11 @@ const rl = {
|
|
|
625
623
|
"ja-JP": { loading: "読み込み中", showMore: "さらに表示" },
|
|
626
624
|
"pt-BR": { loading: "Carregando", showMore: "Mostrar mais" },
|
|
627
625
|
"zh-CN": { loading: "正在加载", showMore: "显示更多" }
|
|
628
|
-
},
|
|
626
|
+
}, ul = {
|
|
629
627
|
name: "listbox-lazy-load",
|
|
630
|
-
i18n: { messages:
|
|
631
|
-
},
|
|
632
|
-
...
|
|
628
|
+
i18n: { messages: cl }
|
|
629
|
+
}, dl = /* @__PURE__ */ W({
|
|
630
|
+
...ul,
|
|
633
631
|
props: {
|
|
634
632
|
condensed: { type: Boolean, default: !1 },
|
|
635
633
|
hasMoreItems: { type: Boolean, default: !1 },
|
|
@@ -639,31 +637,31 @@ const rl = {
|
|
|
639
637
|
},
|
|
640
638
|
emits: ["show-more"],
|
|
641
639
|
setup(a) {
|
|
642
|
-
const e = a, { t: l } =
|
|
643
|
-
() => e.type ===
|
|
640
|
+
const e = a, { t: l } = fe(), t = n(
|
|
641
|
+
() => e.type === ne.BUTTON && e.hasMoreItems
|
|
644
642
|
), s = n(
|
|
645
|
-
() => e.loading ?
|
|
643
|
+
() => e.loading ? Me.LOADING : Me.START
|
|
646
644
|
), o = n(() => e.loading ? l("loading") : l("showMore"));
|
|
647
|
-
return { __sfc: !0, t: l, props: e, shouldDisplayShowMoreButton: t, loadingButtonState: s, showMoreButtonText: o, BentoLoadingIndicator:
|
|
645
|
+
return { __sfc: !0, t: l, props: e, shouldDisplayShowMoreButton: t, loadingButtonState: s, showMoreButtonText: o, BentoListboxLazyLoadType: ne, BentoLoadingIndicator: Qe, BentoLoadingButton: xt };
|
|
648
646
|
}
|
|
649
647
|
});
|
|
650
|
-
var
|
|
648
|
+
var pl = function() {
|
|
651
649
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
652
|
-
return t.shouldDisplayShowMoreButton || e.loading ? l("div", { staticClass: "b-listbox-lazy-load" }, [t.shouldDisplayShowMoreButton ? l(t.BentoLoadingButton, { attrs: { state: t.loadingButtonState, tabindex: e.tabindex, condensed: e.condensed, variant: "secondary" }, on: { "!click": function(s) {
|
|
650
|
+
return t.shouldDisplayShowMoreButton || e.loading ? l("div", { staticClass: "b-listbox-lazy-load" }, [l("div", { staticClass: "b-listbox-lazy-load__announcement", attrs: { role: "status", "aria-live": "polite", "aria-atomic": "true" } }, [e.type === t.BentoListboxLazyLoadType.AUTOMATIC && e.loading ? [e._v(" " + e._s(t.t("loading")) + " ")] : e._e()], 2), t.shouldDisplayShowMoreButton ? l(t.BentoLoadingButton, { attrs: { state: t.loadingButtonState, tabindex: e.tabindex, condensed: e.condensed, variant: "secondary" }, on: { "!click": function(s) {
|
|
653
651
|
return e.$emit("show-more", s);
|
|
654
652
|
} } }, [e._v(" " + e._s(t.showMoreButtonText) + " ")]) : e.loading ? l(t.BentoLoadingIndicator) : e._e()], 1) : e._e();
|
|
655
|
-
},
|
|
656
|
-
ul,
|
|
653
|
+
}, fl = [], bl = /* @__PURE__ */ q(
|
|
657
654
|
dl,
|
|
658
655
|
pl,
|
|
656
|
+
fl,
|
|
659
657
|
!1,
|
|
660
658
|
null,
|
|
661
|
-
"
|
|
659
|
+
"c2e191fb"
|
|
662
660
|
);
|
|
663
|
-
const
|
|
661
|
+
const ot = bl.exports, vl = {
|
|
664
662
|
"de-DE": { thereWasAnErrorLoadingNewItems: "Beim Laden neuer Artikel ist ein Fehler aufgetreten." },
|
|
665
663
|
"en-GB": { thereWasAnErrorLoadingNewItems: "There was an error loading new items." },
|
|
666
|
-
"en-US": { thereWasAnErrorLoadingNewItems: "There was an error loading new items." },
|
|
664
|
+
"en-US": { loadMoreItemsForCategory: "Load more items for {category}.", loadingItemsForCategory: "Loading items for {category}.", pressEnterOrSpaceToLoadMoreItems: "Press Enter or Space to load more items.", thereWasAnErrorLoadingNewItems: "There was an error loading new items." },
|
|
667
665
|
"es-419": { thereWasAnErrorLoadingNewItems: "Se produjo un error al cargar los nuevos elementos." },
|
|
668
666
|
"es-ES": { thereWasAnErrorLoadingNewItems: "Se produjo un error al cargar los nuevos elementos." },
|
|
669
667
|
"fr-FR": { thereWasAnErrorLoadingNewItems: "Une erreur s'est produite lors du chargement des nouveaux éléments." },
|
|
@@ -671,27 +669,31 @@ const st = fl.exports, bl = {
|
|
|
671
669
|
"ja-JP": { thereWasAnErrorLoadingNewItems: "新しいアイテムの読み込みにエラーが発生しました。" },
|
|
672
670
|
"pt-BR": { thereWasAnErrorLoadingNewItems: "Ocorreu um erro ao carregar novos itens." },
|
|
673
671
|
"zh-CN": { thereWasAnErrorLoadingNewItems: "加载新项目时出错。" }
|
|
674
|
-
},
|
|
672
|
+
}, ml = {
|
|
675
673
|
name: "listbox-multi-select-nested-lazy-load",
|
|
676
|
-
i18n: { messages:
|
|
677
|
-
},
|
|
678
|
-
...
|
|
674
|
+
i18n: { messages: vl }
|
|
675
|
+
}, _l = /* @__PURE__ */ W({
|
|
676
|
+
...ml,
|
|
679
677
|
props: {
|
|
680
678
|
index: null,
|
|
681
679
|
option: null
|
|
682
680
|
},
|
|
683
681
|
setup(a, { expose: e }) {
|
|
684
|
-
const l = a, t =
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
682
|
+
const l = a, t = y(!1), s = y(!1), o = y(""), i = y(null), v = re("nested-lazy-load-name");
|
|
683
|
+
let b = !1;
|
|
684
|
+
const { t: u } = fe();
|
|
685
|
+
async function r(m) {
|
|
686
|
+
if (m.stopImmediatePropagation(), !(t.value || b)) {
|
|
687
|
+
b = !0, await j(), i.value?.focus(), s.value = !1, t.value = !0, o.value = u("loadingItemsForCategory", { category: l.option.label }), b = !1;
|
|
688
688
|
try {
|
|
689
689
|
await l.option.lazyLoad?.lazyLoadEvent({
|
|
690
690
|
value: l.option.value,
|
|
691
691
|
index: l.index
|
|
692
|
-
});
|
|
692
|
+
}), o.value = "";
|
|
693
693
|
} catch {
|
|
694
|
-
s.value = !0
|
|
694
|
+
s.value = !0, o.value = `${u("thereWasAnErrorLoadingNewItems")} ${u(
|
|
695
|
+
"pressEnterOrSpaceToLoadMoreItems"
|
|
696
|
+
)}`;
|
|
695
697
|
}
|
|
696
698
|
t.value = !1;
|
|
697
699
|
}
|
|
@@ -700,29 +702,31 @@ const st = fl.exports, bl = {
|
|
|
700
702
|
/**
|
|
701
703
|
* Trigger the lazy load event programmatically.
|
|
702
704
|
*/
|
|
703
|
-
showMore:
|
|
704
|
-
}), { __sfc: !0, loading: t, failedAndRetry: s,
|
|
705
|
+
showMore: r
|
|
706
|
+
}), { __sfc: !0, loading: t, failedAndRetry: s, announcementMessage: o, nestedLazyLoadRef: i, accessibleNameId: v, pendingFocus: b, t: u, props: l, showMore: r, BentoEmptyState: et, BentoListboxLazyLoad: ot };
|
|
705
707
|
}
|
|
706
708
|
});
|
|
707
|
-
var
|
|
709
|
+
var yl = function() {
|
|
708
710
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
709
|
-
return l("div", { attrs: { role: "treeitem", tabindex: 0 }, on: { keydown: [function(s) {
|
|
711
|
+
return l("div", { ref: "nestedLazyLoadRef", attrs: { role: "treeitem", tabindex: 0, "aria-labelledby": t.accessibleNameId }, on: { keydown: [function(s) {
|
|
710
712
|
return !s.type.indexOf("key") && e._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : (s.preventDefault(), t.showMore.apply(null, arguments));
|
|
711
713
|
}, function(s) {
|
|
712
714
|
return !s.type.indexOf("key") && e._k(s.keyCode, "space", 32, s.key, [" ", "Spacebar"]) ? null : (s.preventDefault(), t.showMore.apply(null, arguments));
|
|
713
|
-
}] } }, [
|
|
714
|
-
|
|
715
|
-
|
|
715
|
+
}] } }, [l("span", { staticClass: "b-listbox-multi-select-nested-lazy-load__visually-hidden", attrs: { id: t.accessibleNameId } }, [e._v(" " + e._s(t.t("loadMoreItemsForCategory", { category: e.option.label })) + " ")]), l("div", { staticClass: "b-listbox-multi-select-nested-lazy-load__visually-hidden", attrs: { role: "status", "aria-live": "polite", "aria-atomic": "true" } }, [e._v(" " + e._s(t.announcementMessage) + " ")]), l("div", { attrs: { "aria-hidden": "true" }, on: { mousedown: function(s) {
|
|
716
|
+
s.preventDefault();
|
|
717
|
+
} } }, [t.failedAndRetry ? l(t.BentoEmptyState, { staticClass: "b-listbox-multi-select-nested-lazy-load__error-message", attrs: { variant: "basic" } }, [e._v(" " + e._s(t.t("thereWasAnErrorLoadingNewItems")) + " ")]) : e._e(), l(t.BentoListboxLazyLoad, { attrs: { type: "button", tabindex: -1, condensed: "", "has-more-items": e.option.lazyLoad?.hasMoreItems, loading: t.loading }, on: { "show-more": t.showMore } })], 1)]);
|
|
718
|
+
}, gl = [], hl = /* @__PURE__ */ q(
|
|
716
719
|
_l,
|
|
717
720
|
yl,
|
|
721
|
+
gl,
|
|
718
722
|
!1,
|
|
719
723
|
null,
|
|
720
|
-
"
|
|
724
|
+
"7df9b0cd"
|
|
721
725
|
);
|
|
722
|
-
const
|
|
726
|
+
const Sl = hl.exports, xl = {
|
|
723
727
|
"de-DE": { categoryClosed: "{category} geschlossen", categoryOpened: "{category} geöffnet" },
|
|
724
728
|
"en-GB": { categoryClosed: "{category} closed", categoryOpened: "{category} opened" },
|
|
725
|
-
"en-US": { categoryClosed: "{category} closed", categoryOpened: "{category} opened" },
|
|
729
|
+
"en-US": { allItemsForCategoryAreLoaded: "All items for {category} are loaded.", categoryClosed: "{category} closed", categoryOpened: "{category} opened" },
|
|
726
730
|
"es-419": { categoryClosed: "{category} cerrado", categoryOpened: "{category} abierta" },
|
|
727
731
|
"es-ES": { categoryClosed: "{category} cerrado", categoryOpened: "{category} abierto" },
|
|
728
732
|
"es-MX": { categoryClosed: "{category} cerrado", categoryOpened: "{category} abierto" },
|
|
@@ -731,16 +735,16 @@ const hl = gl.exports, Sl = {
|
|
|
731
735
|
"ja-JP": { categoryClosed: "{category}を閉じました", categoryOpened: "{category}を開きました" },
|
|
732
736
|
"pt-BR": { categoryClosed: "{category} fechada", categoryOpened: "{categoria} aberta" },
|
|
733
737
|
"zh-CN": { categoryClosed: "{category} 已关闭", categoryOpened: "{category} 已打开" }
|
|
734
|
-
},
|
|
735
|
-
i18n: { messages:
|
|
738
|
+
}, Cl = W({
|
|
739
|
+
i18n: { messages: xl },
|
|
736
740
|
name: "bento-listbox-multi-select-category",
|
|
737
741
|
components: {
|
|
738
|
-
BentoTypography:
|
|
739
|
-
BentoListboxOption:
|
|
740
|
-
BentoListboxMultiSelectNestedLazyLoad:
|
|
741
|
-
ChevronDownIcon:
|
|
742
|
-
ChevronUpIcon:
|
|
743
|
-
DecorativeCheckbox:
|
|
742
|
+
BentoTypography: pe,
|
|
743
|
+
BentoListboxOption: Pe,
|
|
744
|
+
BentoListboxMultiSelectNestedLazyLoad: Sl,
|
|
745
|
+
ChevronDownIcon: Xe,
|
|
746
|
+
ChevronUpIcon: Ze,
|
|
747
|
+
DecorativeCheckbox: Ke
|
|
744
748
|
},
|
|
745
749
|
props: {
|
|
746
750
|
/**
|
|
@@ -793,67 +797,73 @@ const hl = gl.exports, Sl = {
|
|
|
793
797
|
tabindex: { type: Number, default: -1 }
|
|
794
798
|
},
|
|
795
799
|
emits: [
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
800
|
+
me.SELECT_CATEGORY,
|
|
801
|
+
me.UNSELECT_CATEGORY,
|
|
802
|
+
me.TOGGLE_CATEGORY_VISIBILITY
|
|
799
803
|
],
|
|
800
804
|
setup(a, { emit: e }) {
|
|
801
|
-
const l =
|
|
802
|
-
[`b-listbox-multi-select-category--${
|
|
803
|
-
})),
|
|
804
|
-
|
|
805
|
-
},
|
|
806
|
-
const
|
|
807
|
-
return { isDisabled:
|
|
808
|
-
},
|
|
809
|
-
() => a.category.items.filter((
|
|
810
|
-
const { isDisabled:
|
|
811
|
-
return
|
|
805
|
+
const l = y(!1), { t } = fe(), s = re("category-group"), o = re("category-name"), i = y(null), v = y(""), b = (w) => a.isOptionDisabled ? a.isOptionDisabled(w) : !1, u = n(() => a.category.lazyLoad && a.category.items?.length === 0 ? !1 : a.category.items.every((w) => b(w))), r = J(a, "staticCategories"), m = n(() => l.value || a.staticCategories), d = n(() => ({
|
|
806
|
+
[`b-listbox-multi-select-category--${st.DISABLED}`]: u.value
|
|
807
|
+
})), c = (w, x) => {
|
|
808
|
+
w.preventDefault(), a.category.lazyLoad && a.category.items?.length === 0 && i.value.showMore(w), l.value = x !== void 0 ? x : !l.value, e(me.TOGGLE_CATEGORY_VISIBILITY, a.category.value);
|
|
809
|
+
}, _ = (w) => {
|
|
810
|
+
const x = b(w), P = a.selectedItemsList?.includes(w.value) || !1;
|
|
811
|
+
return { isDisabled: x, isPreSelected: P };
|
|
812
|
+
}, R = n(
|
|
813
|
+
() => a.category.items.filter((w) => {
|
|
814
|
+
const { isDisabled: x, isPreSelected: P } = _(w);
|
|
815
|
+
return x && P || !x;
|
|
812
816
|
})
|
|
813
|
-
),
|
|
814
|
-
() =>
|
|
815
|
-
),
|
|
816
|
-
const
|
|
817
|
-
return t(
|
|
818
|
-
}),
|
|
819
|
-
e(
|
|
820
|
-
},
|
|
821
|
-
e(
|
|
822
|
-
},
|
|
817
|
+
), L = n(
|
|
818
|
+
() => R.value?.filter(({ value: w }) => a.selectedItemsList?.includes(w))
|
|
819
|
+
), O = n(() => {
|
|
820
|
+
const w = l.value ? "categoryOpened" : "categoryClosed";
|
|
821
|
+
return t(w, { category: a.category.label });
|
|
822
|
+
}), S = () => {
|
|
823
|
+
e(me.SELECT_CATEGORY);
|
|
824
|
+
}, B = () => {
|
|
825
|
+
e(me.UNSELECT_CATEGORY);
|
|
826
|
+
}, g = n(
|
|
823
827
|
() => !!a.category.lazyLoad && a.selectedItemsList.includes(a.category.value)
|
|
824
828
|
), {
|
|
825
|
-
isAllSelected:
|
|
826
|
-
isIndeterminate:
|
|
827
|
-
toggleSelectAll:
|
|
828
|
-
} =
|
|
829
|
-
|
|
829
|
+
isAllSelected: A,
|
|
830
|
+
isIndeterminate: k,
|
|
831
|
+
toggleSelectAll: $
|
|
832
|
+
} = tt(L, R, S, B), E = n(() => g.value || A.value), Y = n(() => !g.value && k.value), V = n(() => Y.value ? "mixed" : `${E.value}`), C = y(E.value), z = () => {
|
|
833
|
+
C.value = !C.value, $(C.value);
|
|
830
834
|
};
|
|
831
|
-
return Q(
|
|
832
|
-
|
|
833
|
-
}),
|
|
835
|
+
return Q(E, () => {
|
|
836
|
+
C.value = E.value;
|
|
837
|
+
}), Q(
|
|
838
|
+
() => a.category.lazyLoad?.hasMoreItems,
|
|
839
|
+
(w, x) => {
|
|
840
|
+
v.value = x === !0 && w === !1 ? t("allItemsForCategoryAreLoaded", { category: a.category.label }) : "";
|
|
841
|
+
}
|
|
842
|
+
), {
|
|
834
843
|
// Refs
|
|
835
844
|
lazyLoadRef: i,
|
|
836
845
|
// Values
|
|
837
|
-
chevronTitle:
|
|
838
|
-
conditionalClass:
|
|
839
|
-
hasAllPropsDisabled:
|
|
846
|
+
chevronTitle: O,
|
|
847
|
+
conditionalClass: d,
|
|
848
|
+
hasAllPropsDisabled: u,
|
|
840
849
|
isOpen: l,
|
|
841
|
-
isAllSelected:
|
|
842
|
-
isIndeterminate:
|
|
843
|
-
isStaticCategory:
|
|
850
|
+
isAllSelected: E,
|
|
851
|
+
isIndeterminate: Y,
|
|
852
|
+
isStaticCategory: r,
|
|
844
853
|
categoryGroupId: s,
|
|
845
854
|
categoryNameId: o,
|
|
855
|
+
lazyLoadAnnouncement: v,
|
|
846
856
|
// Computed
|
|
847
|
-
showItemChildren:
|
|
848
|
-
ariaCheckedComputed:
|
|
857
|
+
showItemChildren: m,
|
|
858
|
+
ariaCheckedComputed: V,
|
|
849
859
|
// Methods
|
|
850
|
-
handleSelectAll:
|
|
851
|
-
toggleOpen:
|
|
852
|
-
toggleSelectAll:
|
|
860
|
+
handleSelectAll: z,
|
|
861
|
+
toggleOpen: c,
|
|
862
|
+
toggleSelectAll: $
|
|
853
863
|
};
|
|
854
864
|
}
|
|
855
865
|
});
|
|
856
|
-
var
|
|
866
|
+
var Il = function() {
|
|
857
867
|
var e = this, l = e._self._c;
|
|
858
868
|
return e._self._setupProxy, l("div", [e.isStaticCategory ? l("div", { staticClass: "b-listbox-multi-select-category b-listbox-multi-select-category--static-category", attrs: { "aria-hidden": "true" } }, [l("span", { staticClass: "b-listbox-multi-select-category__label" }, [l("bento-typography", { staticClass: "b-listbox-multi-select-category__label-text", attrs: { el: "span", variant: "caption" } }, [e._v(" " + e._s(e.category.label) + " ")])], 1)]) : l("bento-listbox-option", { staticClass: "b-listbox-multi-select-category__option", class: e.conditionalClass, attrs: { tabindex: e.tabindex, "aria-selected": e.ariaCheckedComputed !== "false", "aria-checked": e.ariaCheckedComputed, "aria-disabled": e.hasAllPropsDisabled, "aria-expanded": `${e.isOpen}`, role: "treeitem", "aria-owns": e.categoryGroupId, "aria-labelledby": e.categoryNameId }, on: { click: e.handleSelectAll, "enter-pressed": e.handleSelectAll, "space-pressed": function(t) {
|
|
859
869
|
return t.preventDefault(), e.handleSelectAll.apply(null, arguments);
|
|
@@ -863,24 +873,24 @@ var Cl = function() {
|
|
|
863
873
|
return !t.type.indexOf("key") && e._k(t.keyCode, "arrow-right", void 0, t.key, void 0) ? null : e.toggleOpen(t, !0);
|
|
864
874
|
}] } }, [l("decorative-checkbox", { attrs: { indeterminate: e.isIndeterminate, disabled: e.hasAllPropsDisabled, checked: e.isAllSelected } }), l("span", { staticClass: "b-listbox-multi-select-category__label" }, [l("bento-typography", { staticClass: "b-listbox-multi-select-category__label-text", attrs: { id: e.categoryNameId, el: "span" } }, [e._v(" " + e._s(e.category.label) + " ")]), l("div", { staticClass: "b-listbox-multi-select-category__label-chevron", attrs: { "aria-hidden": "true", "data-testid": "toggle-listbox" }, on: { "!click": function(t) {
|
|
865
875
|
return t.stopPropagation(), e.toggleOpen.apply(null, arguments);
|
|
866
|
-
} } }, [e.isOpen ? l("chevron-up-icon", { attrs: { "svg-title": e.chevronTitle } }) : l("chevron-down-icon", { attrs: { "svg-title": e.chevronTitle } })], 1)], 1)], 1), l("div", { directives: [{ name: "show", rawName: "v-show", value: e.showItemChildren, expression: "showItemChildren" }], attrs: { id: e.categoryGroupId, role: "group", "aria-label": e.category.label } }, [e._t("default"), e.category.lazyLoad?.hasMoreItems ? [l("bento-listbox-multi-select-nested-lazy-load", { ref: "lazyLoadRef", attrs: { option: e.category, index: e.optionIndex } })] : e._e()], 2)], 1);
|
|
867
|
-
},
|
|
868
|
-
xl,
|
|
876
|
+
} } }, [e.isOpen ? l("chevron-up-icon", { attrs: { "svg-title": e.chevronTitle } }) : l("chevron-down-icon", { attrs: { "svg-title": e.chevronTitle } })], 1)], 1), l("div", { staticClass: "b-listbox-multi-select-category__announcement", attrs: { role: "status", "aria-live": "polite", "aria-atomic": "true" } }, [e._v(" " + e._s(e.lazyLoadAnnouncement) + " ")])], 1), l("div", { directives: [{ name: "show", rawName: "v-show", value: e.showItemChildren, expression: "showItemChildren" }], attrs: { id: e.categoryGroupId, role: "group", "aria-label": e.category.label } }, [e._t("default"), e.category.lazyLoad?.hasMoreItems ? [l("bento-listbox-multi-select-nested-lazy-load", { ref: "lazyLoadRef", attrs: { option: e.category, index: e.optionIndex } })] : e._e()], 2)], 1);
|
|
877
|
+
}, Ll = [], Ol = /* @__PURE__ */ q(
|
|
869
878
|
Cl,
|
|
870
879
|
Il,
|
|
880
|
+
Ll,
|
|
871
881
|
!1,
|
|
872
882
|
null,
|
|
873
|
-
"
|
|
883
|
+
"95ee6c93"
|
|
874
884
|
);
|
|
875
|
-
const
|
|
876
|
-
var
|
|
877
|
-
const
|
|
885
|
+
const El = Ol.exports;
|
|
886
|
+
var ie = /* @__PURE__ */ ((a) => (a.SELECT_CATEGORY = "select-category", a.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", a.UNSELECT_CATEGORY = "unselect-category", a.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", a))(ie || {});
|
|
887
|
+
const wl = W({
|
|
878
888
|
name: "listbox-multi-select-options",
|
|
879
889
|
components: {
|
|
880
|
-
BentoListboxOption:
|
|
881
|
-
BentoTypography:
|
|
882
|
-
ListboxMultiSelectCategory:
|
|
883
|
-
DecorativeCheckbox:
|
|
890
|
+
BentoListboxOption: Pe,
|
|
891
|
+
BentoTypography: pe,
|
|
892
|
+
ListboxMultiSelectCategory: El,
|
|
893
|
+
DecorativeCheckbox: Ke
|
|
884
894
|
},
|
|
885
895
|
inheritAttrs: !1,
|
|
886
896
|
props: {
|
|
@@ -957,30 +967,30 @@ const El = V({
|
|
|
957
967
|
}
|
|
958
968
|
},
|
|
959
969
|
emits: [
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
970
|
+
ie.TOGGLE_CHECKBOX_SELECTION,
|
|
971
|
+
ie.SELECT_CATEGORY,
|
|
972
|
+
ie.UNSELECT_CATEGORY,
|
|
973
|
+
ie.TOGGLE_CATEGORY_VISIBILITY
|
|
964
974
|
],
|
|
965
975
|
setup(a, { emit: e }) {
|
|
966
|
-
const l = (
|
|
967
|
-
a.isOptionDisabled(
|
|
968
|
-
}, t = (
|
|
976
|
+
const l = (u) => {
|
|
977
|
+
a.isOptionDisabled(u) || e(ie.TOGGLE_CHECKBOX_SELECTION, u);
|
|
978
|
+
}, t = (u) => !!u.items, s = (u) => {
|
|
969
979
|
const r = a.isMultiLevel && a.searching;
|
|
970
|
-
return
|
|
971
|
-
}, o = (
|
|
980
|
+
return u.description && (!a.isMultiLevel || r);
|
|
981
|
+
}, o = (u) => {
|
|
972
982
|
const r = !!a.parentCategory?.lazyLoad && a.selectedItemsList.includes(a.parentCategory.value);
|
|
973
|
-
if (
|
|
974
|
-
const m = !!
|
|
975
|
-
return r || m || !!
|
|
983
|
+
if (u.items) {
|
|
984
|
+
const m = !!u.lazyLoad && a.selectedItemsList.includes(u.value);
|
|
985
|
+
return r || m || !!u.items.find((d) => a.selectedItemsList.includes(d.value));
|
|
976
986
|
}
|
|
977
|
-
return r || a.selectedItemsList.includes(
|
|
978
|
-
}, i = (
|
|
979
|
-
if (t(
|
|
980
|
-
const r = o(
|
|
981
|
-
e(r,
|
|
987
|
+
return r || a.selectedItemsList.includes(u.value);
|
|
988
|
+
}, i = (u) => {
|
|
989
|
+
if (t(u)) {
|
|
990
|
+
const r = o(u) ? ie.UNSELECT_CATEGORY : ie.SELECT_CATEGORY;
|
|
991
|
+
e(r, u);
|
|
982
992
|
} else
|
|
983
|
-
l(
|
|
993
|
+
l(u);
|
|
984
994
|
};
|
|
985
995
|
return {
|
|
986
996
|
// Values
|
|
@@ -993,14 +1003,14 @@ const El = V({
|
|
|
993
1003
|
shouldShowDescription: s,
|
|
994
1004
|
toggleCheckboxSelection: l,
|
|
995
1005
|
toggleSearchOption: i,
|
|
996
|
-
computedTabindex: (
|
|
1006
|
+
computedTabindex: (u) => a.itemsIndex[u] === a.focusedIndex ? 0 : -1,
|
|
997
1007
|
// Enums
|
|
998
|
-
BentoListboxEvent:
|
|
999
|
-
ListboxMultiSelectOptionsEvent:
|
|
1008
|
+
BentoListboxEvent: p,
|
|
1009
|
+
ListboxMultiSelectOptionsEvent: ie
|
|
1000
1010
|
};
|
|
1001
1011
|
}
|
|
1002
1012
|
});
|
|
1003
|
-
var
|
|
1013
|
+
var Tl = function() {
|
|
1004
1014
|
var e = this, l = e._self._c;
|
|
1005
1015
|
return e._self._setupProxy, l("div", e._l(e.items, function(t) {
|
|
1006
1016
|
return l("div", { key: `selected-${t.value}` }, [e.searching && e.isMultiLevel ? [l("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, tabindex: e.computedTabindex(t.value), "aria-selected": `${e.isOptionSelected(t)}`, "aria-checked": `${e.isOptionSelected(t)}`, "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(t) : null, role: e.$attrs.role || "option" }, on: { click: function(s) {
|
|
@@ -1027,21 +1037,21 @@ var wl = function() {
|
|
|
1027
1037
|
return [l("span", { staticClass: "b-listbox-multi-select__option-text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(t.label))]), e.shouldShowDescription(t) ? l("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(t.description) + " ")]) : e._e()], 1)];
|
|
1028
1038
|
}, null, t)], 2)]], 2);
|
|
1029
1039
|
}), 0);
|
|
1030
|
-
},
|
|
1031
|
-
El,
|
|
1040
|
+
}, Al = [], Dl = /* @__PURE__ */ q(
|
|
1032
1041
|
wl,
|
|
1033
1042
|
Tl,
|
|
1043
|
+
Al,
|
|
1034
1044
|
!1,
|
|
1035
1045
|
null,
|
|
1036
1046
|
"1cf47b26"
|
|
1037
1047
|
);
|
|
1038
|
-
const kl =
|
|
1048
|
+
const kl = Dl.exports, nt = (a) => {
|
|
1039
1049
|
const e = n(() => !!a.value?.find(({ items: t }) => !!t)), l = n(() => e.value ? a.value?.reduce((t, s) => (s.items ? t.push(...s.items.flat()) : t.push(s), t), []) : a.value);
|
|
1040
1050
|
return {
|
|
1041
1051
|
isMultiLevelSelect: e,
|
|
1042
1052
|
flattenedItemsList: l
|
|
1043
1053
|
};
|
|
1044
|
-
},
|
|
1054
|
+
}, Bl = {
|
|
1045
1055
|
"de-DE": { allSelected: "Alle ausgewählt ({total})", numberOfTotalSelected: "{number} von {total} ausgewählt", numbersSelected: "{number} ausgewählt", selectAll: "Alle auswählen ({total})" },
|
|
1046
1056
|
"en-GB": { allSelected: "All selected ({total})", numberOfTotalSelected: "{number} of {total} selected", numbersSelected: "{number} selected", selectAll: "Select all ({total})" },
|
|
1047
1057
|
"en-US": { allSelected: "All selected ({total})", numberOfTotalSelected: "{number} of {total} selected", numbersSelected: "{number} selected", selectAll: "Select all ({total})" },
|
|
@@ -1053,8 +1063,8 @@ const kl = Al.exports, ot = (a) => {
|
|
|
1053
1063
|
"ja-JP": { allSelected: "すべて選択 ({total})", numberOfTotalSelected: "{total}件中{number}件を選択済み", numbersSelected: "{number}件選択済み", selectAll: "すべて選択 ({total})" },
|
|
1054
1064
|
"pt-BR": { allSelected: "Todos os selecionados ({total})", numberOfTotalSelected: "{number} de {total} selecionados", numbersSelected: "{number} selecionados", selectAll: "Selecionar tudo ({total})" },
|
|
1055
1065
|
"zh-CN": { allSelected: "全部已选 ({total})", numberOfTotalSelected: "已选择 {number} 个,共 {total} 个", numbersSelected: "已选择 {number} 个", selectAll: "选择全部({total})个" }
|
|
1056
|
-
},
|
|
1057
|
-
...
|
|
1066
|
+
}, Rl = { i18n: { messages: Bl } }, Ml = /* @__PURE__ */ W({
|
|
1067
|
+
...Rl,
|
|
1058
1068
|
__name: "listbox-multi-select",
|
|
1059
1069
|
props: {
|
|
1060
1070
|
hasMoreItems: { type: Boolean, default: !1 },
|
|
@@ -1067,157 +1077,155 @@ const kl = Al.exports, ot = (a) => {
|
|
|
1067
1077
|
},
|
|
1068
1078
|
emits: ["select"],
|
|
1069
1079
|
setup(a, { expose: e, emit: l }) {
|
|
1070
|
-
const t = a, { t: s, n: o } =
|
|
1080
|
+
const t = a, { t: s, n: o } = fe(), i = xe(), v = Ge(), b = n(
|
|
1071
1081
|
() => ({
|
|
1072
|
-
"aria-label":
|
|
1073
|
-
"aria-busy":
|
|
1074
|
-
"aria-atomic": f["aria-atomic"]?.toString(),
|
|
1075
|
-
"aria-live": f["aria-live"]?.toString(),
|
|
1082
|
+
"aria-label": v["aria-label"]?.toString(),
|
|
1083
|
+
"aria-busy": v["aria-busy"]?.toString(),
|
|
1076
1084
|
"aria-multiselectable": !0
|
|
1077
1085
|
})
|
|
1078
|
-
),
|
|
1079
|
-
const h = t.isOptionDisabled(
|
|
1080
|
-
return { isDisabled: h, isPreSelected:
|
|
1081
|
-
},
|
|
1082
|
-
if (t.searching &&
|
|
1086
|
+
), u = y(null), r = y(null), m = y(null), d = y(null), c = n(() => t.selectedValues.map(({ value: f }) => f)), { isMultiLevelSelect: _, flattenedItemsList: R } = nt(J(t, "items")), L = n(() => t.items.some((f) => f.items && f.lazyLoad)), O = n(() => _.value ? t.items.reduce((f, h) => (h.items ? h.lazyLoad ? f.push(h) : f.push(...h.items) : f.push(h), f), []) : t.items), S = n(() => _.value && !t.staticCategories), B = n(() => S.value ? "tree" : "listbox"), g = n(() => S.value ? "treeitem" : "option"), A = (f) => {
|
|
1087
|
+
const h = t.isOptionDisabled(f), D = c.value?.includes(f.value) || !1;
|
|
1088
|
+
return { isDisabled: h, isPreSelected: D };
|
|
1089
|
+
}, k = n(() => {
|
|
1090
|
+
if (t.searching && _)
|
|
1083
1091
|
return t.items;
|
|
1084
|
-
const
|
|
1092
|
+
const f = O.value.filter((h) => {
|
|
1085
1093
|
if (h.lazyLoad)
|
|
1086
1094
|
return !0;
|
|
1087
|
-
const { isDisabled:
|
|
1088
|
-
return
|
|
1095
|
+
const { isDisabled: D, isPreSelected: F } = A(h);
|
|
1096
|
+
return D && F || !D;
|
|
1089
1097
|
});
|
|
1090
1098
|
return t.selectedValues.forEach((h) => {
|
|
1091
|
-
|
|
1092
|
-
}),
|
|
1093
|
-
}),
|
|
1094
|
-
() =>
|
|
1095
|
-
),
|
|
1096
|
-
const
|
|
1097
|
-
return
|
|
1098
|
-
}),
|
|
1099
|
-
const h = (
|
|
1100
|
-
const { isDisabled: G, isPreSelected:
|
|
1101
|
-
return G &&
|
|
1102
|
-
},
|
|
1103
|
-
l("select", [...t.selectedValues, ...
|
|
1104
|
-
},
|
|
1099
|
+
f.find((D) => D.value === h.value) || f.push(h);
|
|
1100
|
+
}), f;
|
|
1101
|
+
}), $ = n(
|
|
1102
|
+
() => k.value?.filter((f) => c.value?.includes(f.value))
|
|
1103
|
+
), E = () => _.value && !t.searching ? R.value.length : t.items.length, Y = n(() => {
|
|
1104
|
+
const f = k.value.length, h = E(), D = $.value?.length || 0;
|
|
1105
|
+
return D === 0 ? s("selectAll", { total: o(f) }) : D === h ? s("allSelected", { total: o(h) }) : D <= h ? s("numberOfTotalSelected", { number: o(D), total: o(h) }) : s("numbersSelected", { number: o(D) });
|
|
1106
|
+
}), V = (f) => {
|
|
1107
|
+
const h = (F) => {
|
|
1108
|
+
const { isDisabled: G, isPreSelected: Z } = A(F);
|
|
1109
|
+
return G && Z || !G;
|
|
1110
|
+
}, D = f.filter(h).filter((F) => !c.value.includes(F.value));
|
|
1111
|
+
l("select", [...t.selectedValues, ...D]);
|
|
1112
|
+
}, C = (f) => {
|
|
1105
1113
|
const h = (G) => {
|
|
1106
|
-
const { isDisabled:
|
|
1107
|
-
return !(
|
|
1108
|
-
},
|
|
1109
|
-
l("select",
|
|
1110
|
-
},
|
|
1111
|
-
|
|
1112
|
-
},
|
|
1113
|
-
|
|
1114
|
-
}, { isAllSelected:
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
),
|
|
1120
|
-
|
|
1114
|
+
const { isDisabled: Z, isPreSelected: M } = A(G);
|
|
1115
|
+
return !(Z && M);
|
|
1116
|
+
}, D = f.filter(h).map(({ value: G }) => G), F = t.selectedValues.filter((G) => !D?.includes(G.value));
|
|
1117
|
+
l("select", F);
|
|
1118
|
+
}, z = () => {
|
|
1119
|
+
V(R.value);
|
|
1120
|
+
}, w = () => {
|
|
1121
|
+
C(R.value);
|
|
1122
|
+
}, { isAllSelected: x, isIndeterminate: P, toggleSelectAll: se } = tt(
|
|
1123
|
+
$,
|
|
1124
|
+
k,
|
|
1125
|
+
z,
|
|
1126
|
+
w
|
|
1127
|
+
), ee = n(() => P.value ? "mixed" : `${x.value}`), X = y(x.value), I = () => {
|
|
1128
|
+
X.value = !X.value, se(X.value);
|
|
1121
1129
|
};
|
|
1122
|
-
Q(
|
|
1123
|
-
|
|
1130
|
+
Q(x, () => {
|
|
1131
|
+
X.value = x.value;
|
|
1124
1132
|
});
|
|
1125
|
-
const
|
|
1126
|
-
if (
|
|
1127
|
-
const h = (
|
|
1128
|
-
l("select", [...
|
|
1133
|
+
const te = (f) => {
|
|
1134
|
+
if (f.lazyLoad) {
|
|
1135
|
+
const h = (f.items ?? []).map(({ value: F }) => F), D = t.selectedValues.filter(({ value: F }) => !h.includes(F));
|
|
1136
|
+
l("select", [...D, f]);
|
|
1129
1137
|
} else
|
|
1130
|
-
|
|
1131
|
-
},
|
|
1132
|
-
|
|
1138
|
+
V(f.items);
|
|
1139
|
+
}, be = (f) => {
|
|
1140
|
+
f.lazyLoad ? l(
|
|
1133
1141
|
"select",
|
|
1134
|
-
t.selectedValues.filter(({ value: h }) => h !==
|
|
1135
|
-
) :
|
|
1136
|
-
},
|
|
1137
|
-
let
|
|
1138
|
-
if (
|
|
1139
|
-
l(
|
|
1142
|
+
t.selectedValues.filter(({ value: h }) => h !== f.value)
|
|
1143
|
+
) : C(f.items);
|
|
1144
|
+
}, ce = (f, h) => {
|
|
1145
|
+
let D = !1, F = t.selectedValues.filter(({ value: Z }) => h.value === Z ? (D = !0, !1) : !0);
|
|
1146
|
+
if (D) {
|
|
1147
|
+
l(f, F);
|
|
1140
1148
|
return;
|
|
1141
1149
|
}
|
|
1142
1150
|
const G = t.items.find(
|
|
1143
|
-
(
|
|
1151
|
+
(Z) => Z.items?.some((M) => M.value === h.value) && Z.lazyLoad && c.value.includes(Z.value)
|
|
1144
1152
|
);
|
|
1145
1153
|
if (G) {
|
|
1146
|
-
|
|
1147
|
-
const
|
|
1148
|
-
(
|
|
1154
|
+
F = F.filter(({ value: M }) => M !== G.value);
|
|
1155
|
+
const Z = G.items.filter(
|
|
1156
|
+
(M) => M.value !== h.value
|
|
1149
1157
|
);
|
|
1150
|
-
|
|
1158
|
+
F.push(...Z);
|
|
1151
1159
|
} else
|
|
1152
|
-
|
|
1153
|
-
l(
|
|
1154
|
-
},
|
|
1155
|
-
if (!
|
|
1160
|
+
F.push(h);
|
|
1161
|
+
l(f, F);
|
|
1162
|
+
}, ue = n(() => {
|
|
1163
|
+
if (!_.value)
|
|
1156
1164
|
return t.selectedValues;
|
|
1157
|
-
const
|
|
1158
|
-
(
|
|
1159
|
-
),
|
|
1160
|
-
|
|
1161
|
-
G.add(
|
|
1165
|
+
const f = (M) => c.value.includes(M.value), h = (M) => M.lazyLoad && f(M) ? !0 : !t.staticCategories && M.items.length > 0 && M.items.every((Le) => f(Le)), D = t.items.flatMap(
|
|
1166
|
+
(M) => M.items && !h(M) ? M.items : M
|
|
1167
|
+
), F = D.filter((M) => M.items ? !0 : f(M)), G = /* @__PURE__ */ new Set();
|
|
1168
|
+
D.forEach((M) => {
|
|
1169
|
+
G.add(M.value), M.items?.forEach((Le) => G.add(Le.value));
|
|
1162
1170
|
});
|
|
1163
|
-
const
|
|
1164
|
-
return [...
|
|
1165
|
-
}),
|
|
1166
|
-
if (!
|
|
1171
|
+
const Z = t.selectedValues.filter((M) => !G.has(M.value));
|
|
1172
|
+
return [...F, ...Z];
|
|
1173
|
+
}), ye = n(() => {
|
|
1174
|
+
if (!ue.value?.length)
|
|
1167
1175
|
return !1;
|
|
1168
|
-
const
|
|
1169
|
-
return
|
|
1170
|
-
}),
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
),
|
|
1175
|
-
|
|
1176
|
-
|
|
1176
|
+
const f = ["automatic", "button"].includes(t.lazyLoadType), h = t.selectedValues?.length > 0 && $.value?.length !== k.value?.length;
|
|
1177
|
+
return f && t.hasMoreItems ? !!t.selectedValues?.length : h;
|
|
1178
|
+
}), de = n(() => L.value ? !1 : ["automatic", "button"].includes(t.lazyLoadType) ? !t.hasMoreItems : !0), T = y([]), { visibleDomOptions: H, updateVisibleDomOptions: ge } = We(
|
|
1179
|
+
u,
|
|
1180
|
+
J(t, "items"),
|
|
1181
|
+
g
|
|
1182
|
+
), Fe = (f) => {
|
|
1183
|
+
T.value.includes(f) ? T.value = T.value.filter((h) => h !== f) : T.value.push(f), j(() => {
|
|
1184
|
+
ge();
|
|
1177
1185
|
});
|
|
1178
|
-
}, Ce = (
|
|
1179
|
-
|
|
1186
|
+
}, Ce = (f) => {
|
|
1187
|
+
H.value[f]?.focus();
|
|
1180
1188
|
}, {
|
|
1181
1189
|
moveToNextElement: Ie,
|
|
1182
|
-
moveToPreviousElement:
|
|
1183
|
-
moveToFirstElement:
|
|
1184
|
-
moveToLastElement:
|
|
1185
|
-
preventDefault:
|
|
1186
|
-
focusedIndex:
|
|
1187
|
-
setListboxFocusedIndex:
|
|
1188
|
-
} =
|
|
1190
|
+
moveToPreviousElement: Ee,
|
|
1191
|
+
moveToFirstElement: we,
|
|
1192
|
+
moveToLastElement: Te,
|
|
1193
|
+
preventDefault: ve,
|
|
1194
|
+
focusedIndex: Ae,
|
|
1195
|
+
setListboxFocusedIndex: he
|
|
1196
|
+
} = lt(
|
|
1189
1197
|
{
|
|
1190
|
-
items:
|
|
1198
|
+
items: H
|
|
1191
1199
|
},
|
|
1192
1200
|
Ce
|
|
1193
|
-
),
|
|
1194
|
-
[
|
|
1195
|
-
[
|
|
1196
|
-
[
|
|
1197
|
-
[
|
|
1201
|
+
), De = {
|
|
1202
|
+
[K.ARROW_UP]: (f) => Ee(f),
|
|
1203
|
+
[K.ARROW_DOWN]: (f) => Ie(f),
|
|
1204
|
+
[K.HOME]: we,
|
|
1205
|
+
[K.END]: Te
|
|
1198
1206
|
};
|
|
1199
1207
|
e({
|
|
1200
1208
|
/**
|
|
1201
1209
|
* Method to set the index of the item to be focused on
|
|
1202
1210
|
* Used for focus management to be kept in-sync with parent e.g. dropdowns
|
|
1203
1211
|
*/
|
|
1204
|
-
setListboxFocusedIndex:
|
|
1212
|
+
setListboxFocusedIndex: he
|
|
1205
1213
|
});
|
|
1206
|
-
const
|
|
1207
|
-
[
|
|
1208
|
-
[
|
|
1209
|
-
},
|
|
1210
|
-
let
|
|
1214
|
+
const Se = {
|
|
1215
|
+
[K.ARROW_UP]: ve,
|
|
1216
|
+
[K.ARROW_DOWN]: ve
|
|
1217
|
+
}, ke = n(() => {
|
|
1218
|
+
let f = de.value ? 1 : 0;
|
|
1211
1219
|
const h = {};
|
|
1212
|
-
return t.items.forEach((
|
|
1213
|
-
let
|
|
1214
|
-
|
|
1220
|
+
return t.items.forEach((D) => {
|
|
1221
|
+
let F = T.value.includes(D.value);
|
|
1222
|
+
D.items ? (t.staticCategories ? F = !0 : h[D.value] = f++, F && D.items.forEach((G) => h[G.value] = f++)) : h[D.value] = f++;
|
|
1215
1223
|
}), h;
|
|
1216
1224
|
});
|
|
1217
|
-
return { __sfc: !0, props: t, emit: l, t: s, n: o, slots: i, attrs:
|
|
1225
|
+
return { __sfc: !0, props: t, emit: l, t: s, n: o, slots: i, attrs: v, ariaAttributes: b, listboxRef: u, selectAllListboxItemsRef: r, selectedListboxItemsRef: m, listboxItemsRef: d, selectedItemsList: c, isMultiLevelSelect: _, flattenedItemsList: R, hasLazyLoadCategory: L, lazyLoadAwareFlattenedItems: O, isTreePattern: S, computedRole: B, computedOptionRole: g, optionStates: A, enabledItems: k, visibleSelectedList: $, calculateTotalItems: E, selectAllCheckboxText: Y, selectAll: V, unselectAll: C, selectAllItems: z, unselectAllItems: w, isAllSelected: x, isIndeterminate: P, toggleSelectAll: se, ariaCheckedComputed: ee, isSelectAllOn: X, handleSelectAll: I, selectAllCategory: te, unselectAllCategory: be, toggleCheckboxSelection: ce, selectedOptions: ue, showSelectedItems: ye, showSelectAllCheckbox: de, expandedCategories: T, visibleDomOptions: H, updateVisibleDomOptions: ge, toggleCategoryVisibility: Fe, focusItem: Ce, moveToNextElement: Ie, moveToPreviousElement: Ee, moveToFirstElement: we, moveToLastElement: Te, preventDefault: ve, focusedIndex: Ae, setListboxFocusedIndex: he, listboxListeners: De, chipsSectionListeners: Se, computedItemsIndex: ke, DecorativeCheckbox: Ke, BentoTypography: pe, BentoChip: St, BentoListboxOption: Pe, ListboxMultiSelectOptions: kl, vBentoKeyboardNavigationDirective: $e, BentoListboxEvent: p };
|
|
1218
1226
|
}
|
|
1219
1227
|
});
|
|
1220
|
-
var
|
|
1228
|
+
var Nl = function() {
|
|
1221
1229
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
1222
1230
|
return l("div", { ref: "listboxRef", staticClass: "b-listbox-multi-select" }, [t.showSelectedItems ? l("div", [l("ul", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-listbox-multi-select__chips" }, t.chipsSectionListeners), e._l(t.selectedOptions, function(s) {
|
|
1223
1231
|
return l("li", { key: s.value }, [l(t.BentoChip, { ref: "selectedListboxItemsRef", refInFor: !0, attrs: { disabled: e.isOptionDisabled(s), label: s.label, condensed: "" }, on: { click: function(o) {
|
|
@@ -1238,30 +1246,30 @@ var Ml = function() {
|
|
|
1238
1246
|
return [e._t(o, null, null, i)];
|
|
1239
1247
|
} };
|
|
1240
1248
|
})], null, !0) })], 1)]);
|
|
1241
|
-
},
|
|
1242
|
-
Rl,
|
|
1249
|
+
}, $l = [], Pl = /* @__PURE__ */ q(
|
|
1243
1250
|
Ml,
|
|
1244
1251
|
Nl,
|
|
1252
|
+
$l,
|
|
1245
1253
|
!1,
|
|
1246
1254
|
null,
|
|
1247
|
-
"
|
|
1255
|
+
"09ffd30d"
|
|
1248
1256
|
);
|
|
1249
|
-
const
|
|
1257
|
+
const He = Pl.exports, it = (a, e = 300) => {
|
|
1250
1258
|
let l;
|
|
1251
1259
|
return (...s) => {
|
|
1252
1260
|
l && clearTimeout(l), l = setTimeout(() => a(...s), e);
|
|
1253
1261
|
};
|
|
1254
|
-
},
|
|
1262
|
+
}, Fl = 36, zl = W({
|
|
1255
1263
|
name: "bento-listbox",
|
|
1256
1264
|
components: {
|
|
1257
|
-
BentoEmptyState:
|
|
1258
|
-
BentoListboxSingleSelect:
|
|
1259
|
-
BentoListboxMultiSelect:
|
|
1260
|
-
BentoTypography:
|
|
1261
|
-
BentoLoadingIndicator:
|
|
1262
|
-
BentoListboxLazyLoad:
|
|
1265
|
+
BentoEmptyState: et,
|
|
1266
|
+
BentoListboxSingleSelect: Zt,
|
|
1267
|
+
BentoListboxMultiSelect: He,
|
|
1268
|
+
BentoTypography: pe,
|
|
1269
|
+
BentoLoadingIndicator: Qe,
|
|
1270
|
+
BentoListboxLazyLoad: ot
|
|
1263
1271
|
},
|
|
1264
|
-
directives: { BentoKeyboardNavigationDirective:
|
|
1272
|
+
directives: { BentoKeyboardNavigationDirective: $e },
|
|
1265
1273
|
props: {
|
|
1266
1274
|
/**
|
|
1267
1275
|
* Defines a string value that labels an interactive element.
|
|
@@ -1321,8 +1329,8 @@ const je = $l.exports, nt = (a, e = 300) => {
|
|
|
1321
1329
|
*/
|
|
1322
1330
|
lazyLoadType: {
|
|
1323
1331
|
type: String,
|
|
1324
|
-
default:
|
|
1325
|
-
validator: (a) => Object.values(
|
|
1332
|
+
default: ne.NONE,
|
|
1333
|
+
validator: (a) => Object.values(ne).includes(a)
|
|
1326
1334
|
},
|
|
1327
1335
|
/**
|
|
1328
1336
|
* Indicates the listbox is loading filtered items.
|
|
@@ -1346,7 +1354,7 @@ const je = $l.exports, nt = (a, e = 300) => {
|
|
|
1346
1354
|
*
|
|
1347
1355
|
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
1348
1356
|
*/
|
|
1349
|
-
searching:
|
|
1357
|
+
searching: He.props.searching,
|
|
1350
1358
|
/**
|
|
1351
1359
|
* The `input` value.
|
|
1352
1360
|
* Providing an empty string or empty array will select no options.
|
|
@@ -1366,97 +1374,91 @@ const je = $l.exports, nt = (a, e = 300) => {
|
|
|
1366
1374
|
}
|
|
1367
1375
|
},
|
|
1368
1376
|
emits: [
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1377
|
+
p.SELECT,
|
|
1378
|
+
p.SPACE,
|
|
1379
|
+
p.SHOW_MORE,
|
|
1380
|
+
p.ENTER,
|
|
1381
|
+
p.ESCAPE,
|
|
1382
|
+
p.TAB
|
|
1375
1383
|
],
|
|
1376
1384
|
setup(a, { emit: e, slots: l, expose: t }) {
|
|
1377
|
-
const s =
|
|
1385
|
+
const s = y([]), o = J(a, "items"), i = n(() => a.lazyLoadType !== ne.AUTOMATIC), v = n(() => a.lazyLoadType === ne.AUTOMATIC), b = () => typeof a?.virtualScroll == "object" && a?.virtualScroll?.itemHeight ? a.virtualScroll.itemHeight : Fl, u = !a?.multiple && a?.virtualScroll !== !1 && a?.lazyLoadType === "none", {
|
|
1378
1386
|
containerRef: r,
|
|
1379
1387
|
containerProps: m,
|
|
1380
|
-
onScroll:
|
|
1388
|
+
onScroll: d,
|
|
1381
1389
|
list: c,
|
|
1382
|
-
wrapperProps:
|
|
1383
|
-
scrollToIndex:
|
|
1384
|
-
startIndex:
|
|
1385
|
-
} =
|
|
1386
|
-
itemHeight:
|
|
1390
|
+
wrapperProps: _,
|
|
1391
|
+
scrollToIndex: R,
|
|
1392
|
+
startIndex: L
|
|
1393
|
+
} = wt(o, {
|
|
1394
|
+
itemHeight: b(),
|
|
1387
1395
|
// Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
|
|
1388
|
-
disabled: !
|
|
1389
|
-
}),
|
|
1390
|
-
() => a.componentLoading !== void 0 || i.value ? "true" : void 0
|
|
1391
|
-
), A = n(
|
|
1396
|
+
disabled: !u
|
|
1397
|
+
}), O = n(() => u ? o.value.length : 0), S = n(
|
|
1392
1398
|
() => i.value && a.loading || a.componentLoading ? "true" : "false"
|
|
1393
|
-
),
|
|
1394
|
-
() => i.value || a.componentLoading !== void 0 ? "polite" : void 0
|
|
1395
|
-
), E = n(
|
|
1399
|
+
), B = n(
|
|
1396
1400
|
() => ({
|
|
1397
1401
|
"aria-label": a.ariaLabel,
|
|
1398
|
-
"aria-busy":
|
|
1399
|
-
"aria-atomic": S.value,
|
|
1400
|
-
"aria-live": _.value
|
|
1402
|
+
"aria-busy": S.value
|
|
1401
1403
|
})
|
|
1402
|
-
),
|
|
1404
|
+
), g = n(
|
|
1403
1405
|
() => a.componentLoading ? {
|
|
1404
|
-
...
|
|
1406
|
+
...B.value,
|
|
1405
1407
|
role: "alert"
|
|
1406
1408
|
} : {}
|
|
1407
|
-
),
|
|
1408
|
-
e(
|
|
1409
|
-
},
|
|
1410
|
-
e(
|
|
1411
|
-
},
|
|
1412
|
-
const
|
|
1413
|
-
if (!
|
|
1409
|
+
), A = (x) => (P) => {
|
|
1410
|
+
e(x, P);
|
|
1411
|
+
}, k = () => {
|
|
1412
|
+
e(p.SHOW_MORE);
|
|
1413
|
+
}, $ = it(() => {
|
|
1414
|
+
const x = r.value;
|
|
1415
|
+
if (!x)
|
|
1414
1416
|
return;
|
|
1415
|
-
const
|
|
1416
|
-
a.hasMoreItems &&
|
|
1417
|
-
}),
|
|
1418
|
-
|
|
1419
|
-
},
|
|
1420
|
-
() => a.lazyLoadType ===
|
|
1421
|
-
),
|
|
1422
|
-
() => a.loading ?
|
|
1423
|
-
),
|
|
1417
|
+
const P = Math.round(x.scrollTop) + x.clientHeight >= x.scrollHeight;
|
|
1418
|
+
a.hasMoreItems && P && !a.loading && k();
|
|
1419
|
+
}), E = () => {
|
|
1420
|
+
v.value ? $() : d();
|
|
1421
|
+
}, Y = n(() => a.items?.length === 0), V = n(
|
|
1422
|
+
() => a.lazyLoadType === ne.BUTTON && a.hasMoreItems
|
|
1423
|
+
), C = n(
|
|
1424
|
+
() => a.loading ? Me.LOADING : Me.START
|
|
1425
|
+
), z = n(() => ({
|
|
1424
1426
|
...a.emptyState,
|
|
1425
1427
|
variant: "condensed"
|
|
1426
|
-
})),
|
|
1427
|
-
[
|
|
1428
|
-
[
|
|
1429
|
-
[
|
|
1430
|
-
[
|
|
1428
|
+
})), w = {
|
|
1429
|
+
[p.SELECT]: A(p.SELECT),
|
|
1430
|
+
[p.SPACE]: A(p.SPACE),
|
|
1431
|
+
[p.TAB]: A(p.TAB),
|
|
1432
|
+
[p.ENTER]: A(p.ENTER)
|
|
1431
1433
|
};
|
|
1432
1434
|
return t({ listboxRef: r, listboxItemRef: s }), {
|
|
1433
1435
|
// Refs
|
|
1434
1436
|
listboxRef: r,
|
|
1435
1437
|
listboxItemRef: s,
|
|
1436
1438
|
// a11y
|
|
1437
|
-
ariaAttributes:
|
|
1438
|
-
listboxContainerAttributes:
|
|
1439
|
+
ariaAttributes: B,
|
|
1440
|
+
listboxContainerAttributes: g,
|
|
1439
1441
|
// Values
|
|
1440
1442
|
containerProps: m,
|
|
1441
|
-
isSearchResultEmpty:
|
|
1442
|
-
limitedEmptyStateProps:
|
|
1443
|
-
loadingButtonState:
|
|
1443
|
+
isSearchResultEmpty: Y,
|
|
1444
|
+
limitedEmptyStateProps: z,
|
|
1445
|
+
loadingButtonState: C,
|
|
1444
1446
|
slots: l,
|
|
1445
|
-
shouldDisplayShowMoreButton:
|
|
1447
|
+
shouldDisplayShowMoreButton: V,
|
|
1446
1448
|
virtualisedItems: c,
|
|
1447
|
-
wrapperProps:
|
|
1449
|
+
wrapperProps: _,
|
|
1448
1450
|
// Virtual scroll
|
|
1449
|
-
totalItemCount:
|
|
1450
|
-
scrollToIndex:
|
|
1451
|
-
virtualScrollStartIndex:
|
|
1451
|
+
totalItemCount: O,
|
|
1452
|
+
scrollToIndex: R,
|
|
1453
|
+
virtualScrollStartIndex: L,
|
|
1452
1454
|
// Enums
|
|
1453
|
-
BentoKeyboardNavigationKeyDownEvent:
|
|
1454
|
-
BentoListboxEvent:
|
|
1455
|
+
BentoKeyboardNavigationKeyDownEvent: K,
|
|
1456
|
+
BentoListboxEvent: p,
|
|
1455
1457
|
// Methods
|
|
1456
|
-
onListboxContainerScroll:
|
|
1457
|
-
onOptionSelected:
|
|
1458
|
-
emitShowMore:
|
|
1459
|
-
listboxListeners:
|
|
1458
|
+
onListboxContainerScroll: E,
|
|
1459
|
+
onOptionSelected: A,
|
|
1460
|
+
emitShowMore: k,
|
|
1461
|
+
listboxListeners: w
|
|
1460
1462
|
};
|
|
1461
1463
|
}
|
|
1462
1464
|
});
|
|
@@ -1471,15 +1473,15 @@ var Vl = function() {
|
|
|
1471
1473
|
return [e._t(s, null, null, o)];
|
|
1472
1474
|
} };
|
|
1473
1475
|
})], null, !0) }, "bento-listbox-single-select", e.ariaAttributes, !1), e.listboxListeners))], e.lazyLoadType !== "none" ? l("bento-listbox-lazy-load", { attrs: { "has-more-items": e.hasMoreItems, loading: e.loading, type: e.lazyLoadType }, on: { "show-more": e.emitShowMore } }) : e._e()]], 2)]);
|
|
1474
|
-
},
|
|
1475
|
-
Fl,
|
|
1476
|
-
Vl,
|
|
1476
|
+
}, Gl = [], Ul = /* @__PURE__ */ q(
|
|
1477
1477
|
zl,
|
|
1478
|
+
Vl,
|
|
1479
|
+
Gl,
|
|
1478
1480
|
!1,
|
|
1479
1481
|
null,
|
|
1480
|
-
"
|
|
1482
|
+
"023e82d8"
|
|
1481
1483
|
);
|
|
1482
|
-
const
|
|
1484
|
+
const ze = Ul.exports, Ve = (a, e) => {
|
|
1483
1485
|
for (const l of a) {
|
|
1484
1486
|
if (l.value === e)
|
|
1485
1487
|
return l;
|
|
@@ -1490,39 +1492,39 @@ const Fe = Gl.exports, Ve = (a, e) => {
|
|
|
1490
1492
|
}
|
|
1491
1493
|
}
|
|
1492
1494
|
return null;
|
|
1493
|
-
},
|
|
1494
|
-
const s =
|
|
1495
|
+
}, Wl = (a) => typeof a == "object" && a !== null && "value" in a && "label" in a, Kl = (a, e, l, t) => {
|
|
1496
|
+
const s = y([]), o = y(), i = (r) => {
|
|
1495
1497
|
l.value ? o.value = r.map(({ value: m }) => m) : o.value = r.length > 0 ? r[0].value : null;
|
|
1496
|
-
}, f = (r) => {
|
|
1497
|
-
l.value ? o.value = r.map(({ value: m, label: b }) => ({ value: m, label: b })) : o.value = r.length > 0 ? { value: r[0].value, label: r[0].label } : null;
|
|
1498
1498
|
}, v = (r) => {
|
|
1499
|
-
|
|
1500
|
-
},
|
|
1499
|
+
l.value ? o.value = r.map(({ value: m, label: d }) => ({ value: m, label: d })) : o.value = r.length > 0 ? { value: r[0].value, label: r[0].label } : null;
|
|
1500
|
+
}, b = (r) => {
|
|
1501
|
+
s.value = r, t?.value ? v(r) : i(r);
|
|
1502
|
+
}, u = () => {
|
|
1501
1503
|
s.value = [], o.value = null;
|
|
1502
1504
|
};
|
|
1503
1505
|
return Q(
|
|
1504
1506
|
() => e.value,
|
|
1505
1507
|
() => {
|
|
1506
1508
|
if (!e.value && e.value !== 0) {
|
|
1507
|
-
|
|
1509
|
+
u();
|
|
1508
1510
|
return;
|
|
1509
1511
|
}
|
|
1510
1512
|
const r = !Array.isArray(e.value), m = [...s.value];
|
|
1511
|
-
|
|
1512
|
-
const
|
|
1513
|
-
if (
|
|
1513
|
+
u();
|
|
1514
|
+
const d = (c) => {
|
|
1515
|
+
if (Wl(c))
|
|
1514
1516
|
s.value.push(c);
|
|
1515
1517
|
else {
|
|
1516
|
-
let
|
|
1517
|
-
|
|
1518
|
+
let _ = Ve(a.value, c);
|
|
1519
|
+
_ || (_ = Ve(m, c)), _ || (_ = { value: c, label: c.toString() }), s.value.push(_);
|
|
1518
1520
|
}
|
|
1519
1521
|
};
|
|
1520
1522
|
if (r) {
|
|
1521
1523
|
const c = e.value;
|
|
1522
|
-
|
|
1524
|
+
d(c), t?.value ? v(s.value) : i(s.value);
|
|
1523
1525
|
return;
|
|
1524
1526
|
}
|
|
1525
|
-
e.value.forEach(
|
|
1527
|
+
e.value.forEach(d), t?.value ? v(s.value) : i(s.value);
|
|
1526
1528
|
},
|
|
1527
1529
|
{ immediate: !0 }
|
|
1528
1530
|
), {
|
|
@@ -1530,12 +1532,12 @@ const Fe = Gl.exports, Ve = (a, e) => {
|
|
|
1530
1532
|
cachedSelectedListboxOptions: s,
|
|
1531
1533
|
cachedListboxSelectedValues: o,
|
|
1532
1534
|
// Methods
|
|
1533
|
-
resetCache:
|
|
1534
|
-
setCachedValues:
|
|
1535
|
+
resetCache: u,
|
|
1536
|
+
setCachedValues: b
|
|
1535
1537
|
};
|
|
1536
1538
|
};
|
|
1537
|
-
var
|
|
1538
|
-
const
|
|
1539
|
+
var Oe = /* @__PURE__ */ ((a) => (a.DEFAULT = "DropdownInputDefault", a.SMALL = "DropdownInputSmall", a))(Oe || {});
|
|
1540
|
+
const ql = {
|
|
1539
1541
|
"de-DE": { apply: "Anwenden", cancel: "Abbrechen", noOptionsMatchThisSearch: "Für diese Suche wurden keine Ergebnisse gefunden." },
|
|
1540
1542
|
"en-GB": { apply: "Apply", cancel: "Cancel", noOptionsMatchThisSearch: "No options match this search" },
|
|
1541
1543
|
"en-US": { apply: "Apply", cancel: "Cancel", noOptionsMatchThisSearch: "No options match this search" },
|
|
@@ -1547,62 +1549,62 @@ const Kl = {
|
|
|
1547
1549
|
"ja-JP": { apply: "適用", cancel: "キャンセル", noOptionsMatchThisSearch: "この検索に一致するオプションはありません" },
|
|
1548
1550
|
"pt-BR": { apply: "Aplicar", cancel: "Cancelar", noOptionsMatchThisSearch: "Nenhuma opção corresponde a esta busca" },
|
|
1549
1551
|
"zh-CN": { apply: "应用", cancel: "取消", noOptionsMatchThisSearch: "没有符合此搜索条件的选项" }
|
|
1550
|
-
},
|
|
1551
|
-
const s =
|
|
1552
|
+
}, Yl = (a, e, l, t) => {
|
|
1553
|
+
const s = y(a.value), { t: o } = fe();
|
|
1552
1554
|
Q(a, () => {
|
|
1553
1555
|
s.value = a.value;
|
|
1554
1556
|
});
|
|
1555
1557
|
const i = n(
|
|
1556
1558
|
() => JSON.stringify(s.value) === JSON.stringify(a.value)
|
|
1557
|
-
),
|
|
1558
|
-
t(
|
|
1559
|
-
},
|
|
1560
|
-
s.value = a.value, t(
|
|
1561
|
-
},
|
|
1559
|
+
), v = () => {
|
|
1560
|
+
t(p.SELECT, s.value), t(p.CLOSE_DROPDOWN);
|
|
1561
|
+
}, b = () => {
|
|
1562
|
+
s.value = a.value, t(p.CLOSE_DROPDOWN);
|
|
1563
|
+
}, u = () => {
|
|
1562
1564
|
l.value && e.value && (s.value = a.value);
|
|
1563
1565
|
}, r = n(() => [
|
|
1564
1566
|
{
|
|
1565
1567
|
title: o("apply"),
|
|
1566
|
-
event:
|
|
1568
|
+
event: v,
|
|
1567
1569
|
disabled: i.value
|
|
1568
1570
|
},
|
|
1569
1571
|
{
|
|
1570
1572
|
title: o("cancel"),
|
|
1571
|
-
event:
|
|
1573
|
+
event: b
|
|
1572
1574
|
}
|
|
1573
1575
|
]), m = (S) => {
|
|
1574
|
-
s.value = S, e.value || t(
|
|
1575
|
-
},
|
|
1576
|
-
m(S), t(
|
|
1576
|
+
s.value = S, e.value || t(p.SELECT, S);
|
|
1577
|
+
}, d = (S) => {
|
|
1578
|
+
m(S), t(p.TAB);
|
|
1577
1579
|
}, c = (S) => {
|
|
1578
|
-
m(S), t(
|
|
1579
|
-
},
|
|
1580
|
-
m(S), t(
|
|
1581
|
-
},
|
|
1582
|
-
|
|
1583
|
-
},
|
|
1584
|
-
t(
|
|
1585
|
-
},
|
|
1586
|
-
[
|
|
1587
|
-
[
|
|
1588
|
-
[
|
|
1589
|
-
[
|
|
1590
|
-
[
|
|
1580
|
+
m(S), t(p.ENTER);
|
|
1581
|
+
}, _ = (S) => {
|
|
1582
|
+
m(S), t(p.SPACE);
|
|
1583
|
+
}, R = () => {
|
|
1584
|
+
b(), t(p.ESCAPE);
|
|
1585
|
+
}, L = () => {
|
|
1586
|
+
t(p.SHOW_MORE);
|
|
1587
|
+
}, O = {
|
|
1588
|
+
[p.SELECT]: m,
|
|
1589
|
+
[p.SHOW_MORE]: L,
|
|
1590
|
+
[p.TAB]: d,
|
|
1591
|
+
[p.SPACE]: _,
|
|
1592
|
+
[p.ENTER]: c
|
|
1591
1593
|
};
|
|
1592
1594
|
return {
|
|
1593
1595
|
// Values
|
|
1594
1596
|
actions: r,
|
|
1595
1597
|
internalSelectedValue: s,
|
|
1596
1598
|
// Methods
|
|
1597
|
-
listeners:
|
|
1598
|
-
onEscapeKey:
|
|
1599
|
-
onOutsideDropdownClick:
|
|
1599
|
+
listeners: O,
|
|
1600
|
+
onEscapeKey: R,
|
|
1601
|
+
onOutsideDropdownClick: u
|
|
1600
1602
|
};
|
|
1601
|
-
},
|
|
1602
|
-
i18n: { messages:
|
|
1603
|
+
}, jl = W({
|
|
1604
|
+
i18n: { messages: ql },
|
|
1603
1605
|
name: "bento-dropdown-options-container"
|
|
1604
|
-
}),
|
|
1605
|
-
...
|
|
1606
|
+
}), Hl = /* @__PURE__ */ W({
|
|
1607
|
+
...jl,
|
|
1606
1608
|
props: {
|
|
1607
1609
|
/**
|
|
1608
1610
|
* Defines a string value that labels an interactive element.
|
|
@@ -1665,8 +1667,8 @@ const Kl = {
|
|
|
1665
1667
|
*/
|
|
1666
1668
|
lazyLoadType: {
|
|
1667
1669
|
type: String,
|
|
1668
|
-
default:
|
|
1669
|
-
validator: (a) => Object.values(
|
|
1670
|
+
default: ne.AUTOMATIC,
|
|
1671
|
+
validator: (a) => Object.values(ne).includes(a)
|
|
1670
1672
|
},
|
|
1671
1673
|
/**
|
|
1672
1674
|
* Indicates if new options are lazy loading.
|
|
@@ -1696,7 +1698,7 @@ const Kl = {
|
|
|
1696
1698
|
*
|
|
1697
1699
|
* If enabled, hides the "Select all" checkbox in "multiple" mode.
|
|
1698
1700
|
*/
|
|
1699
|
-
searching:
|
|
1701
|
+
searching: ze.props.searching,
|
|
1700
1702
|
/**
|
|
1701
1703
|
* If enabled, dropdown will display non-selectable, static categories
|
|
1702
1704
|
*/
|
|
@@ -1705,7 +1707,7 @@ const Kl = {
|
|
|
1705
1707
|
* Reference to the DOM element or Vue component for positioning
|
|
1706
1708
|
* the Dropdown container.
|
|
1707
1709
|
*/
|
|
1708
|
-
targetElement: { type:
|
|
1710
|
+
targetElement: { type: je.props.targetElement.type, required: !0 },
|
|
1709
1711
|
/**
|
|
1710
1712
|
* Enables virtual scrolling if set to true or by providing an object with itemHeight function.
|
|
1711
1713
|
* The itemHeight function is used to calculate the height of rendered item given it's index.
|
|
@@ -1717,12 +1719,12 @@ const Kl = {
|
|
|
1717
1719
|
},
|
|
1718
1720
|
emits: [],
|
|
1719
1721
|
setup(a, { expose: e, emit: l }) {
|
|
1720
|
-
const t = a, s =
|
|
1722
|
+
const t = a, s = xe(), { selectedValue: o, multiple: i } = ft(t), v = y(null), { t: b } = fe(), u = n(() => t.open && !t.disabled), r = n(() => b("noOptionsMatchThisSearch")), m = n(() => ({
|
|
1721
1723
|
"b-dropdown-options-container--single": !t?.multiple
|
|
1722
|
-
})),
|
|
1724
|
+
})), d = n(() => ({
|
|
1723
1725
|
"b-dropdown-options-container__listbox--single": !t?.multiple
|
|
1724
|
-
})), { actions: c, internalSelectedValue:
|
|
1725
|
-
const
|
|
1726
|
+
})), { actions: c, internalSelectedValue: _, listeners: R, onEscapeKey: L, onOutsideDropdownClick: O } = Yl(o, i, u, l), S = n(() => t?.multiple ? Ct : je), B = n(() => {
|
|
1727
|
+
const g = {
|
|
1726
1728
|
"min-width": `${t?.targetElement?.clientWidth}px`,
|
|
1727
1729
|
"max-width": "min(500px, 95%)"
|
|
1728
1730
|
};
|
|
@@ -1732,12 +1734,12 @@ const Kl = {
|
|
|
1732
1734
|
actions: c.value,
|
|
1733
1735
|
divider: !0,
|
|
1734
1736
|
fallbackPosition: ["top-start"],
|
|
1735
|
-
id:
|
|
1737
|
+
id: re(`dropdown-options-${t.id}`),
|
|
1736
1738
|
open: t.open,
|
|
1737
1739
|
position: "bottom-start",
|
|
1738
1740
|
style: {
|
|
1739
1741
|
width: "auto",
|
|
1740
|
-
...
|
|
1742
|
+
...g
|
|
1741
1743
|
},
|
|
1742
1744
|
targetElement: t.targetElement
|
|
1743
1745
|
} : {
|
|
@@ -1745,19 +1747,19 @@ const Kl = {
|
|
|
1745
1747
|
offset: [0, 8],
|
|
1746
1748
|
position: "bottom-start",
|
|
1747
1749
|
style: {
|
|
1748
|
-
display:
|
|
1749
|
-
...
|
|
1750
|
+
display: u.value ? "block" : "none",
|
|
1751
|
+
...g
|
|
1750
1752
|
},
|
|
1751
1753
|
targetElement: t.targetElement
|
|
1752
1754
|
};
|
|
1753
1755
|
});
|
|
1754
1756
|
return e({
|
|
1755
|
-
onOutsideDropdownClick:
|
|
1756
|
-
dropdownOptionsListboxRef:
|
|
1757
|
-
}), { __sfc: !0, slots: s, emit: l, props: t, selectedValue: o, multiple: i, dropdownOptionsListboxRef:
|
|
1757
|
+
onOutsideDropdownClick: O,
|
|
1758
|
+
dropdownOptionsListboxRef: v
|
|
1759
|
+
}), { __sfc: !0, slots: s, emit: l, props: t, selectedValue: o, multiple: i, dropdownOptionsListboxRef: v, t: b, isDropdownOpen: u, noResultsMessage: r, conditionalClasses: m, conditionalListboxClasses: d, actions: c, internalSelectedValue: _, listeners: R, onEscapeKey: L, onOutsideDropdownClick: O, popperContainerOrPopoverComponent: S, popperContainerOrPopoverProps: B, BentoListbox: ze };
|
|
1758
1760
|
}
|
|
1759
1761
|
});
|
|
1760
|
-
var
|
|
1762
|
+
var Jl = function() {
|
|
1761
1763
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
1762
1764
|
return t.isDropdownOpen ? l(t.popperContainerOrPopoverComponent, e._b({ tag: "component", staticClass: "b-dropdown-options-container", class: t.conditionalClasses }, "component", t.popperContainerOrPopoverProps, !1), [l("div", { on: { keydown: [function(s) {
|
|
1763
1765
|
s.stopPropagation();
|
|
@@ -1768,20 +1770,20 @@ var Hl = function() {
|
|
|
1768
1770
|
return [e._t(o, null, null, i)];
|
|
1769
1771
|
} };
|
|
1770
1772
|
})], null, !0) }, t.listeners))], 1)]) : e._e();
|
|
1771
|
-
},
|
|
1772
|
-
jl,
|
|
1773
|
+
}, Xl = [], Zl = /* @__PURE__ */ q(
|
|
1773
1774
|
Hl,
|
|
1774
1775
|
Jl,
|
|
1776
|
+
Xl,
|
|
1775
1777
|
!1,
|
|
1776
1778
|
null,
|
|
1777
1779
|
"94ce85b4"
|
|
1778
1780
|
);
|
|
1779
|
-
const
|
|
1780
|
-
var
|
|
1781
|
-
const
|
|
1781
|
+
const Ql = Zl.exports;
|
|
1782
|
+
var U = /* @__PURE__ */ ((a) => (a.OPEN = "dropdown-base-open", a.KEYDOWN = "dropdown-base-keydown", a.CLOSE = "dropdown-base-close", a.INPUT = "dropdown-base-input", a.CLEAR = "dropdown-base-clear", a.CLEAR_SELECTION = "dropdown-base-clear-selection", a))(U || {}), ae = /* @__PURE__ */ ((a) => (a.DISABLED = "disabled", a.READONLY = "readonly", a.HAS_ITEMS = "has-items", a.OPENED = "opened", a.ERROR = "error", a))(ae || {});
|
|
1783
|
+
const ea = /* @__PURE__ */ Symbol("dropdown small size injection key"), rt = /* @__PURE__ */ Symbol("dropdown underline style injection key"), ta = {
|
|
1782
1784
|
"de-DE": { clearSearch: "Suche löschen" },
|
|
1783
1785
|
"en-GB": { clearSearch: "Clear search" },
|
|
1784
|
-
"en-US": { clearSearch: "Clear search" },
|
|
1786
|
+
"en-US": { clearSearch: "Clear search", clearSelection: "Clear selection" },
|
|
1785
1787
|
"es-419": { clearSearch: "Borrar búsqueda" },
|
|
1786
1788
|
"es-ES": { clearSearch: "Borrar búsqueda" },
|
|
1787
1789
|
"es-MX": { clearSearch: "Borrar búsqueda" },
|
|
@@ -1790,17 +1792,21 @@ const Ql = /* @__PURE__ */ Symbol("dropdown small size injection key"), it = /*
|
|
|
1790
1792
|
"ja-JP": { clearSearch: "検索をクリア" },
|
|
1791
1793
|
"pt-BR": { clearSearch: "Limpar busca" },
|
|
1792
1794
|
"zh-CN": { clearSearch: "清除搜索" }
|
|
1793
|
-
},
|
|
1794
|
-
i18n: { messages:
|
|
1795
|
+
}, la = W({
|
|
1796
|
+
i18n: { messages: ta },
|
|
1795
1797
|
name: "dropdown-base-textbox",
|
|
1796
1798
|
inheritAttrs: !1
|
|
1797
|
-
}),
|
|
1798
|
-
...
|
|
1799
|
+
}), aa = /* @__PURE__ */ W({
|
|
1800
|
+
...la,
|
|
1799
1801
|
props: {
|
|
1800
1802
|
/**
|
|
1801
1803
|
* The number of additional items that have been selected in the dropdown.
|
|
1802
1804
|
*/
|
|
1803
1805
|
additionalItemsSelected: { type: [Number, String], default: 0 },
|
|
1806
|
+
/**
|
|
1807
|
+
* Allows the selected value to be cleared in a single-select dropdown.
|
|
1808
|
+
*/
|
|
1809
|
+
clearable: { type: Boolean, default: !1 },
|
|
1804
1810
|
/**
|
|
1805
1811
|
* If the combobox DOM element should be an `input` element.
|
|
1806
1812
|
*/
|
|
@@ -1889,16 +1895,20 @@ const Ql = /* @__PURE__ */ Symbol("dropdown small size injection key"), it = /*
|
|
|
1889
1895
|
},
|
|
1890
1896
|
emits: [],
|
|
1891
1897
|
setup(a, { expose: e, emit: l }) {
|
|
1892
|
-
const t = a, { t: s } =
|
|
1898
|
+
const t = a, { t: s } = fe(), o = Ge(), i = xe(), v = Je(i), b = y(null), u = y(null), r = re("textbox"), m = y(!1), d = y(t.value), c = Ue(rt, !1), _ = n(() => ({
|
|
1893
1899
|
[`b-dropdown-base-textbox--${ae.DISABLED}`]: t.disabled,
|
|
1894
1900
|
[`b-dropdown-base-textbox--${ae.READONLY}`]: t.readonly,
|
|
1895
1901
|
[`b-dropdown-base-textbox--${ae.HAS_ITEMS}`]: !!t.additionalItemsSelected,
|
|
1896
|
-
"b-dropdown-base-textbox--underline":
|
|
1897
|
-
})),
|
|
1898
|
-
() =>
|
|
1899
|
-
),
|
|
1902
|
+
"b-dropdown-base-textbox--underline": c
|
|
1903
|
+
})), R = n(
|
|
1904
|
+
() => V.value && o["aria-required"] ? "true" : null
|
|
1905
|
+
), L = n(() => ({
|
|
1900
1906
|
"b-dropdown-base-textbox__input--dynamic-filtering": t.dynamicFiltering
|
|
1901
|
-
})),
|
|
1907
|
+
})), O = n(() => t.dynamicFiltering && !!t.value && t.open), S = n(
|
|
1908
|
+
() => t.clearable && t.open && !t.multiple && t.hasSelectedValue
|
|
1909
|
+
), B = n(
|
|
1910
|
+
() => !t.disabled && !t.readonly && (O.value || S.value)
|
|
1911
|
+
), g = n(() => O.value ? s("clearSearch") : s("clearSelection")), A = (T) => V.value && !t.multiple && !!t.value && T, k = n(
|
|
1902
1912
|
() => ({
|
|
1903
1913
|
"aria-haspopup": "listbox",
|
|
1904
1914
|
"aria-controls": t.ariaControls,
|
|
@@ -1911,63 +1921,75 @@ const Ql = /* @__PURE__ */ Symbol("dropdown small size injection key"), it = /*
|
|
|
1911
1921
|
"aria-disabled": t.disabled ? !0 : null,
|
|
1912
1922
|
"aria-required": o["aria-required"]
|
|
1913
1923
|
})
|
|
1914
|
-
),
|
|
1924
|
+
), $ = n(
|
|
1915
1925
|
() => t.multiple ? t.selectedValueItem : []
|
|
1916
|
-
), _ = n(
|
|
1917
|
-
() => t.dynamicFiltering && !t.multiple && !t.alwaysComboboxIsInput
|
|
1918
1926
|
), E = n(
|
|
1919
|
-
() => t.
|
|
1920
|
-
),
|
|
1921
|
-
() => t.
|
|
1927
|
+
() => t.dynamicFiltering && !t.multiple && !t.alwaysComboboxIsInput
|
|
1928
|
+
), Y = n(
|
|
1929
|
+
() => t.open || t.alwaysComboboxIsInput || E.value && m.value
|
|
1930
|
+
), V = n(() => t.dynamicFiltering && Y.value), C = () => !t.value && t.hasSelectedValue && E.value ? t.displayValue ?? "" : t.value, z = n(() => !Y.value || t.alwaysComboboxIsInput && !t.open ? t.displayValue : E.value ? d.value : t.value), w = n(() => t.selectedValueItem && !t.multiple), x = n(
|
|
1931
|
+
() => t.multiple && t.selectedValueItem && $.value.length > 0 && t.showSlotContentInMultiple
|
|
1922
1932
|
);
|
|
1923
1933
|
Q(
|
|
1924
|
-
() =>
|
|
1925
|
-
(
|
|
1926
|
-
|
|
1927
|
-
|
|
1934
|
+
() => V.value,
|
|
1935
|
+
(T, H) => {
|
|
1936
|
+
T ? !H && E.value && (d.value = C()) : d.value = t.value, T && !t.alwaysComboboxIsInput && j(() => {
|
|
1937
|
+
b.value?.focus(), b.value?.select();
|
|
1928
1938
|
});
|
|
1929
1939
|
}
|
|
1930
1940
|
), Q(
|
|
1931
1941
|
() => t.value,
|
|
1932
|
-
(
|
|
1933
|
-
(!
|
|
1942
|
+
(T) => {
|
|
1943
|
+
(!E.value || T !== d.value) && (d.value = T);
|
|
1934
1944
|
}
|
|
1935
1945
|
), Q(
|
|
1936
1946
|
() => t.displayValue,
|
|
1937
1947
|
() => {
|
|
1938
|
-
|
|
1948
|
+
E.value && t.hasSelectedValue && (d.value = C());
|
|
1949
|
+
}
|
|
1950
|
+
), Q(
|
|
1951
|
+
() => t.hasSelectedValue,
|
|
1952
|
+
(T) => {
|
|
1953
|
+
E.value && !T && (d.value = t.value);
|
|
1939
1954
|
}
|
|
1940
1955
|
), Q(
|
|
1941
1956
|
() => t.open,
|
|
1942
|
-
(
|
|
1943
|
-
|
|
1957
|
+
(T) => {
|
|
1958
|
+
T || (m.value = !1);
|
|
1944
1959
|
}
|
|
1945
1960
|
);
|
|
1946
|
-
const
|
|
1947
|
-
!t.disabled && !t.readonly && (l(
|
|
1948
|
-
},
|
|
1949
|
-
t.open && (
|
|
1950
|
-
},
|
|
1951
|
-
l(
|
|
1952
|
-
},
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
},
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
},
|
|
1963
|
-
|
|
1961
|
+
const P = async () => {
|
|
1962
|
+
!t.disabled && !t.readonly && (l(U.OPEN), await j(), b.value.focus());
|
|
1963
|
+
}, se = (T) => {
|
|
1964
|
+
t.open && (T && _e(T), b.value.focus(), l(U.CLOSE));
|
|
1965
|
+
}, ee = (T) => t.open && T.target.tagName === "INPUT" ? null : t.open ? se() : P(), X = (T) => t.dynamicFiltering ? null : ee(T), I = () => {
|
|
1966
|
+
l(U.CLEAR), l(U.INPUT, ""), b.value.focus();
|
|
1967
|
+
}, te = () => {
|
|
1968
|
+
if (O.value) {
|
|
1969
|
+
I();
|
|
1970
|
+
return;
|
|
1971
|
+
}
|
|
1972
|
+
l(U.CLEAR_SELECTION);
|
|
1973
|
+
}, be = () => {
|
|
1974
|
+
m.value = !0;
|
|
1975
|
+
}, ce = () => {
|
|
1976
|
+
m.value = !1;
|
|
1977
|
+
}, ue = (T) => {
|
|
1978
|
+
!E.value || t.open || t.readonly || t.disabled || (T.preventDefault(), T.stopPropagation());
|
|
1979
|
+
}, ye = (T) => {
|
|
1980
|
+
!t.readonly && !t.disabled ? (E.value && (d.value = T.target.value), t.dynamicFiltering && !t.open && l(U.OPEN), l(U.INPUT, T.target.value), j(() => {
|
|
1981
|
+
V.value && b.value?.focus();
|
|
1982
|
+
})) : (T.preventDefault(), T.stopPropagation());
|
|
1983
|
+
}, de = (T = "textbox") => {
|
|
1984
|
+
const H = T === "clear-action" ? u.value : b.value;
|
|
1985
|
+
return H?.focus(), !!H;
|
|
1964
1986
|
};
|
|
1965
1987
|
return e({
|
|
1966
|
-
focus:
|
|
1967
|
-
}), { __sfc: !0, t: s, attrs: o, slots: i, hasSlot:
|
|
1988
|
+
focus: de
|
|
1989
|
+
}), { __sfc: !0, t: s, attrs: o, slots: i, hasSlot: v, props: t, emit: l, textbox: b, clearAction: u, textboxId: r, isTextboxFocused: m, localInputValue: d, isUnderlineStyle: c, conditionalClasses: _, showRequiredAttribute: R, comboboxConditionalClasses: L, isFiltering: O, showClearSelection: S, showClearAction: B, clearActionLabel: g, shouldShowAutocompleteSuggestion: A, ariaAttributes: k, selectedValueItems: $, shouldUseDynamicFilteringInputMode: E, shouldShowSearchValue: Y, shouldShowInput: V, getInitialInputValue: C, inputValue: z, shouldShowSingleSelectSlot: w, shouldShowMultipleSlot: x, onOpenDropdown: P, onCloseDropdown: se, onToggleDropdown: ee, onTextboxEnterKey: X, onClearSearch: I, onClearAction: te, onTextboxFocus: be, onTextboxBlur: ce, onClosedComboboxMouseDown: ue, onInputEvent: ye, focus: de, BentoTypography: pe, DropdownBaseTextboxEvent: U, CrossCircleFillIcon: bt, CrossCircleFillSmallIcon: vt, BentoDropdownSize: Oe };
|
|
1968
1990
|
}
|
|
1969
1991
|
});
|
|
1970
|
-
var
|
|
1992
|
+
var sa = function() {
|
|
1971
1993
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
1972
1994
|
return l("div", { class: e.$attrs.class, attrs: { "data-testid": "textbox-wrapper" }, on: { click: t.onToggleDropdown, keydown: function(s) {
|
|
1973
1995
|
return !s.type.indexOf("key") && e._k(s.keyCode, "escape", void 0, s.key, void 0) ? null : t.onCloseDropdown.apply(null, arguments);
|
|
@@ -1981,26 +2003,26 @@ var aa = function() {
|
|
|
1981
2003
|
return l("div", { key: s.value }, [l("div", { staticClass: "b-dropdown-base-textbox__input-selected-element" }, [e._t("default", function() {
|
|
1982
2004
|
return [e._v(" " + e._s(e.displayValue) + " ")];
|
|
1983
2005
|
}, null, s)], 2)]);
|
|
1984
|
-
}), 0)] : [e._v(e._s(e.displayValue))]], 2), e.additionalItemsSelected ? l("span", { staticClass: "b-dropdown-base-textbox__additional-items" }, [e._v(" " + e._s(e.additionalItemsSelected) + " ")]) : e._e(), t.hasSlot("icon") && !t.
|
|
1985
|
-
return s.stopPropagation(), t.
|
|
1986
|
-
}, keydown: function(s) {
|
|
1987
|
-
return !s.type.indexOf("key") && e._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : (s.stopPropagation(), t.
|
|
1988
|
-
},
|
|
1989
|
-
return !s.type.indexOf("key") && e._k(s.keyCode, "space", 32, s.key, [" ", "Spacebar"]) ? null : t.
|
|
1990
|
-
} } }, [e.size === t.BentoDropdownSize.SMALL ? l(t.CrossCircleFillSmallIcon, { attrs: { "
|
|
1991
|
-
},
|
|
1992
|
-
la,
|
|
2006
|
+
}), 0)] : [e._v(e._s(e.displayValue))]], 2), e.additionalItemsSelected ? l("span", { staticClass: "b-dropdown-base-textbox__additional-items" }, [e._v(" " + e._s(e.additionalItemsSelected) + " ")]) : e._e(), t.hasSlot("icon") && !t.showClearAction ? l("span", { staticClass: "b-dropdown-base-textbox__icon", attrs: { "aria-hidden": "true" } }, [e._t("icon")], 2) : e._e(), t.showClearAction ? l("span", { ref: "clearAction", staticClass: "b-dropdown-base-textbox__clear-action", attrs: { tabindex: e.disabled ? -1 : 0, role: "button", "aria-label": t.clearActionLabel, title: t.clearActionLabel, "data-testid": t.isFiltering ? "clear-search-button" : "clear-selection-button" }, on: { click: function(s) {
|
|
2007
|
+
return s.stopPropagation(), t.onClearAction.apply(null, arguments);
|
|
2008
|
+
}, keydown: [function(s) {
|
|
2009
|
+
return !s.type.indexOf("key") && e._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : (s.stopPropagation(), t.onClearAction.apply(null, arguments));
|
|
2010
|
+
}, function(s) {
|
|
2011
|
+
return !s.type.indexOf("key") && e._k(s.keyCode, "space", 32, s.key, [" ", "Spacebar"]) ? null : (s.preventDefault(), s.stopPropagation(), t.onClearAction.apply(null, arguments));
|
|
2012
|
+
}] } }, [e.size === t.BentoDropdownSize.SMALL ? l(t.CrossCircleFillSmallIcon, { attrs: { "aria-hidden": "true" } }) : l(t.CrossCircleFillIcon, { attrs: { "aria-hidden": "true" } })], 1) : e._e()])], 1);
|
|
2013
|
+
}, oa = [], na = /* @__PURE__ */ q(
|
|
1993
2014
|
aa,
|
|
1994
2015
|
sa,
|
|
2016
|
+
oa,
|
|
1995
2017
|
!1,
|
|
1996
2018
|
null,
|
|
1997
|
-
"
|
|
2019
|
+
"1d0dcd4b"
|
|
1998
2020
|
);
|
|
1999
|
-
const
|
|
2021
|
+
const ct = na.exports, ia = W({
|
|
2000
2022
|
name: "dropdown-default-textbox",
|
|
2001
2023
|
inheritAttrs: !1
|
|
2002
|
-
}),
|
|
2003
|
-
...
|
|
2024
|
+
}), ra = /* @__PURE__ */ W({
|
|
2025
|
+
...ia,
|
|
2004
2026
|
props: {
|
|
2005
2027
|
/**
|
|
2006
2028
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -2045,6 +2067,10 @@ const rt = oa.exports, na = V({
|
|
|
2045
2067
|
* Renders the dropdown with a condensed style.
|
|
2046
2068
|
*/
|
|
2047
2069
|
condensed: { type: Boolean, default: !1 },
|
|
2070
|
+
/**
|
|
2071
|
+
* Allows the selected value to be cleared in a single-select dropdown.
|
|
2072
|
+
*/
|
|
2073
|
+
clearable: { type: Boolean, default: !1 },
|
|
2048
2074
|
/**
|
|
2049
2075
|
* Disables any textbox functionality
|
|
2050
2076
|
*/
|
|
@@ -2093,39 +2119,40 @@ const rt = oa.exports, na = V({
|
|
|
2093
2119
|
*/
|
|
2094
2120
|
multiple: { type: Boolean, default: !1 }
|
|
2095
2121
|
},
|
|
2096
|
-
emits: ["clear", "close", "input", "keydown", "open"],
|
|
2122
|
+
emits: ["clear", "clear-selection", "close", "input", "keydown", "open"],
|
|
2097
2123
|
setup(a, { expose: e, emit: l }) {
|
|
2098
|
-
const t = a, s =
|
|
2124
|
+
const t = a, s = xe(), o = y(null), i = n(() => ({
|
|
2099
2125
|
[`b-dropdown-default-textbox--${ae.ERROR}`]: !t.disabled && !t.readonly && t.isInvalid,
|
|
2100
2126
|
[`b-dropdown-default-textbox--${ae.DISABLED}`]: t.disabled,
|
|
2101
2127
|
[`b-dropdown-default-textbox--${ae.READONLY}`]: t.readonly,
|
|
2102
2128
|
[`b-dropdown-default-textbox--${ae.OPENED}`]: t.open,
|
|
2103
2129
|
"b-dropdown-default-textbox--condensed": t.condensed
|
|
2104
|
-
})),
|
|
2105
|
-
l("input",
|
|
2106
|
-
},
|
|
2107
|
-
l("keydown",
|
|
2108
|
-
}, r = (
|
|
2109
|
-
|
|
2110
|
-
}, m = (
|
|
2111
|
-
|
|
2112
|
-
},
|
|
2113
|
-
|
|
2114
|
-
}, c = {
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
[
|
|
2118
|
-
[
|
|
2119
|
-
[
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2130
|
+
})), v = n(() => t.open && !t.disabled && !t.readonly), b = (L) => {
|
|
2131
|
+
l("input", L);
|
|
2132
|
+
}, u = (L) => {
|
|
2133
|
+
l("keydown", L);
|
|
2134
|
+
}, r = (L) => {
|
|
2135
|
+
_e(L), l("open");
|
|
2136
|
+
}, m = (L) => {
|
|
2137
|
+
_e(L), l("close");
|
|
2138
|
+
}, d = (L) => {
|
|
2139
|
+
_e(L), l("clear");
|
|
2140
|
+
}, c = () => {
|
|
2141
|
+
l("clear-selection");
|
|
2142
|
+
}, _ = {
|
|
2143
|
+
[U.INPUT]: b,
|
|
2144
|
+
[U.OPEN]: r,
|
|
2145
|
+
[U.CLOSE]: m,
|
|
2146
|
+
[U.CLEAR]: d,
|
|
2147
|
+
[U.CLEAR_SELECTION]: c,
|
|
2148
|
+
[U.KEYDOWN]: u
|
|
2149
|
+
}, R = (L) => o.value.focus(L);
|
|
2123
2150
|
return e({
|
|
2124
|
-
focus:
|
|
2125
|
-
}), { __sfc: !0, emit: l, slots: s, props: t, baseTextbox: o, conditionalClasses: i, isDropdownOpen:
|
|
2151
|
+
focus: R
|
|
2152
|
+
}), { __sfc: !0, emit: l, slots: s, props: t, baseTextbox: o, conditionalClasses: i, isDropdownOpen: v, onInput: b, onKeyDown: u, openDropdown: r, closeDropdown: m, clearValue: d, clearSelection: c, listeners: _, focus: R, DropdownBaseTextbox: ct, ChevronDownIcon: Xe, ChevronUpIcon: Ze };
|
|
2126
2153
|
}
|
|
2127
2154
|
});
|
|
2128
|
-
var
|
|
2155
|
+
var ca = function() {
|
|
2129
2156
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
2130
2157
|
return l("div", { staticClass: "b-dropdown-default-textbox", class: t.conditionalClasses, attrs: { "data-testid": "default-textbox" } }, [l(t.DropdownBaseTextbox, e._g(e._b({ ref: "baseTextbox", staticClass: "b-dropdown-default-textbox__textbox", attrs: { value: e.value }, scopedSlots: e._u([e._l(t.slots, function(s, o) {
|
|
2131
2158
|
return { key: o, fn: function(i) {
|
|
@@ -2134,55 +2161,55 @@ var ra = function() {
|
|
|
2134
2161
|
}), { key: "icon", fn: function() {
|
|
2135
2162
|
return [l("div", { staticClass: "b-dropdown-default-textbox__chevron" }, [l(t.ChevronUpIcon, { directives: [{ name: "show", rawName: "v-show", value: t.isDropdownOpen, expression: "isDropdownOpen" }], attrs: { "svg-title": "opened" } }), l(t.ChevronDownIcon, { directives: [{ name: "show", rawName: "v-show", value: !t.isDropdownOpen, expression: "!isDropdownOpen" }], attrs: { "svg-title": "closed" } })], 1)];
|
|
2136
2163
|
}, proxy: !0 }], null, !0) }, "dropdown-base-textbox", { ...e.$attrs, ...e.$props }, !1), t.listeners))], 1);
|
|
2137
|
-
},
|
|
2138
|
-
ia,
|
|
2164
|
+
}, ua = [], da = /* @__PURE__ */ q(
|
|
2139
2165
|
ra,
|
|
2140
2166
|
ca,
|
|
2167
|
+
ua,
|
|
2141
2168
|
!1,
|
|
2142
2169
|
null,
|
|
2143
|
-
"
|
|
2170
|
+
"39335cee"
|
|
2144
2171
|
);
|
|
2145
|
-
const
|
|
2172
|
+
const pa = da.exports, fa = {
|
|
2146
2173
|
__name: "chevron-down-small",
|
|
2147
2174
|
setup(a) {
|
|
2148
|
-
const e =
|
|
2175
|
+
const e = Ne(), l = String(e?.uid ?? e?.proxy?._uid);
|
|
2149
2176
|
return { __sfc: !0, instance: e, uuid: l };
|
|
2150
2177
|
}
|
|
2151
2178
|
};
|
|
2152
|
-
var
|
|
2179
|
+
var ba = function() {
|
|
2153
2180
|
var e = this, l = e._self._c;
|
|
2154
2181
|
return e._self._setupProxy, l("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? l("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), l("path", { attrs: { fill: "#001222", d: "M5.00011 5.43922L8.00011 8.43922L11.0001 5.43922L12.0608 6.49988L8.00011 10.5605L3.93945 6.49988L5.00011 5.43922Z" } })]);
|
|
2155
|
-
},
|
|
2156
|
-
pa,
|
|
2182
|
+
}, va = [], ma = /* @__PURE__ */ q(
|
|
2157
2183
|
fa,
|
|
2158
2184
|
ba,
|
|
2185
|
+
va,
|
|
2159
2186
|
!1,
|
|
2160
2187
|
null,
|
|
2161
2188
|
null
|
|
2162
2189
|
);
|
|
2163
|
-
const
|
|
2190
|
+
const _a = ma.exports, ya = {
|
|
2164
2191
|
__name: "chevron-up-small",
|
|
2165
2192
|
setup(a) {
|
|
2166
|
-
const e =
|
|
2193
|
+
const e = Ne(), l = String(e?.uid ?? e?.proxy?._uid);
|
|
2167
2194
|
return { __sfc: !0, instance: e, uuid: l };
|
|
2168
2195
|
}
|
|
2169
2196
|
};
|
|
2170
|
-
var
|
|
2197
|
+
var ga = function() {
|
|
2171
2198
|
var e = this, l = e._self._c;
|
|
2172
2199
|
return e._self._setupProxy, l("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? l("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), l("path", { attrs: { fill: "#001222", d: "M10.9999 10.5608L7.9999 7.56077L4.9999 10.5608L3.93924 9.50011L7.9999 5.43945L12.0606 9.50011L10.9999 10.5608Z" } })]);
|
|
2173
|
-
},
|
|
2174
|
-
_a,
|
|
2200
|
+
}, ha = [], Sa = /* @__PURE__ */ q(
|
|
2175
2201
|
ya,
|
|
2176
2202
|
ga,
|
|
2203
|
+
ha,
|
|
2177
2204
|
!1,
|
|
2178
2205
|
null,
|
|
2179
2206
|
null
|
|
2180
2207
|
);
|
|
2181
|
-
const
|
|
2208
|
+
const xa = Sa.exports, Ca = W({
|
|
2182
2209
|
name: "dropdown-small-textbox",
|
|
2183
2210
|
inheritAttrs: !1
|
|
2184
|
-
}),
|
|
2185
|
-
...
|
|
2211
|
+
}), Ia = /* @__PURE__ */ W({
|
|
2212
|
+
...Ca,
|
|
2186
2213
|
props: {
|
|
2187
2214
|
/**
|
|
2188
2215
|
* The number of additional items that have been selected in the dropdown.
|
|
@@ -2215,6 +2242,10 @@ const Sa = ha.exports, xa = V({
|
|
|
2215
2242
|
* Disables any textbox functionality
|
|
2216
2243
|
*/
|
|
2217
2244
|
disabled: { type: Boolean, default: !1 },
|
|
2245
|
+
/**
|
|
2246
|
+
* Allows the selected value to be cleared in a single-select dropdown.
|
|
2247
|
+
*/
|
|
2248
|
+
clearable: { type: Boolean, default: !1 },
|
|
2218
2249
|
/**
|
|
2219
2250
|
* Selected option's label
|
|
2220
2251
|
*/
|
|
@@ -2241,38 +2272,39 @@ const Sa = ha.exports, xa = V({
|
|
|
2241
2272
|
*/
|
|
2242
2273
|
value: { type: String, default: "" }
|
|
2243
2274
|
},
|
|
2244
|
-
emits: ["clear", "close", "input", "keydown", "open"],
|
|
2275
|
+
emits: ["clear", "clear-selection", "close", "input", "keydown", "open"],
|
|
2245
2276
|
setup(a, { expose: e, emit: l }) {
|
|
2246
|
-
const t = a, s =
|
|
2277
|
+
const t = a, s = xe(), o = y(null), i = Ue(rt, !1), v = n(() => ({
|
|
2247
2278
|
[`b-dropdown-small-textbox--${ae.DISABLED}`]: t.disabled,
|
|
2248
2279
|
[`b-dropdown-small-textbox--${ae.READONLY}`]: t.readonly,
|
|
2249
2280
|
[`b-dropdown-small-textbox--${ae.OPENED}`]: t.open,
|
|
2250
2281
|
"b-dropdown-small-textbox--underline": i
|
|
2251
|
-
})),
|
|
2252
|
-
l("input",
|
|
2253
|
-
}, r = (
|
|
2254
|
-
l("keydown",
|
|
2255
|
-
}, m = (
|
|
2256
|
-
|
|
2257
|
-
},
|
|
2258
|
-
|
|
2259
|
-
}, c = (
|
|
2260
|
-
|
|
2261
|
-
},
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
[
|
|
2265
|
-
[
|
|
2266
|
-
[
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2282
|
+
})), b = n(() => t.open && !t.disabled && !t.readonly), u = (O) => {
|
|
2283
|
+
l("input", O);
|
|
2284
|
+
}, r = (O) => {
|
|
2285
|
+
l("keydown", O);
|
|
2286
|
+
}, m = (O) => {
|
|
2287
|
+
_e(O), l("open");
|
|
2288
|
+
}, d = (O) => {
|
|
2289
|
+
_e(O), l("close");
|
|
2290
|
+
}, c = (O) => {
|
|
2291
|
+
_e(O), l("clear");
|
|
2292
|
+
}, _ = () => {
|
|
2293
|
+
l("clear-selection");
|
|
2294
|
+
}, R = {
|
|
2295
|
+
[U.INPUT]: u,
|
|
2296
|
+
[U.OPEN]: m,
|
|
2297
|
+
[U.CLOSE]: d,
|
|
2298
|
+
[U.CLEAR]: c,
|
|
2299
|
+
[U.CLEAR_SELECTION]: _,
|
|
2300
|
+
[U.KEYDOWN]: r
|
|
2301
|
+
}, L = (O) => o.value.focus(O);
|
|
2270
2302
|
return e({
|
|
2271
|
-
focus:
|
|
2272
|
-
}), { __sfc: !0, emit: l, slots: s, props: t, baseTextbox: o, isUnderlineStyle: i, conditionalClasses:
|
|
2303
|
+
focus: L
|
|
2304
|
+
}), { __sfc: !0, emit: l, slots: s, props: t, baseTextbox: o, isUnderlineStyle: i, conditionalClasses: v, isDropdownOpen: b, onInput: u, onKeyDown: r, openDropdown: m, closeDropdown: d, clearValue: c, clearSelection: _, listeners: R, focus: L, BentoDropdownSize: Oe, DropdownBaseTextbox: ct, ChevronDownSmallIcon: _a, ChevronUpSmallIcon: xa };
|
|
2273
2305
|
}
|
|
2274
2306
|
});
|
|
2275
|
-
var
|
|
2307
|
+
var La = function() {
|
|
2276
2308
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
2277
2309
|
return l("div", { staticClass: "b-dropdown-small-textbox", class: t.conditionalClasses }, [l(t.DropdownBaseTextbox, e._g(e._b({ ref: "baseTextbox", staticClass: "b-dropdown-small-textbox__textbox", attrs: { size: t.BentoDropdownSize.SMALL }, scopedSlots: e._u([e._l(t.slots, function(s, o) {
|
|
2278
2310
|
return { key: o, fn: function(i) {
|
|
@@ -2281,25 +2313,25 @@ var Ia = function() {
|
|
|
2281
2313
|
}), { key: "icon", fn: function() {
|
|
2282
2314
|
return [l("div", { staticClass: "b-dropdown-small-textbox__chevron" }, [l(t.ChevronUpSmallIcon, { directives: [{ name: "show", rawName: "v-show", value: t.isDropdownOpen, expression: "isDropdownOpen" }], attrs: { "svg-title": "opened" } }), l(t.ChevronDownSmallIcon, { directives: [{ name: "show", rawName: "v-show", value: !t.isDropdownOpen, expression: "!isDropdownOpen" }], attrs: { "svg-title": "closed" } })], 1)];
|
|
2283
2315
|
}, proxy: !0 }], null, !0) }, "dropdown-base-textbox", { ...e.$attrs, ...e.$props }, !1), t.listeners))], 1);
|
|
2284
|
-
}, Oa = [],
|
|
2285
|
-
Ca,
|
|
2316
|
+
}, Oa = [], Ea = /* @__PURE__ */ q(
|
|
2286
2317
|
Ia,
|
|
2318
|
+
La,
|
|
2287
2319
|
Oa,
|
|
2288
2320
|
!1,
|
|
2289
2321
|
null,
|
|
2290
|
-
"
|
|
2322
|
+
"039a291b"
|
|
2291
2323
|
);
|
|
2292
|
-
const
|
|
2324
|
+
const wa = Ea.exports, Ta = (a, e) => {
|
|
2293
2325
|
const l = /* @__PURE__ */ new Set(), t = new Set(a.value.map((o) => o.value)), s = e.value.reduce((o, i) => {
|
|
2294
2326
|
if (i.items)
|
|
2295
2327
|
if (t.has(i.value))
|
|
2296
|
-
o.push(i.displayValue ?? i.label), l.add(i.value), i.items.forEach((
|
|
2328
|
+
o.push(i.displayValue ?? i.label), l.add(i.value), i.items.forEach((b) => l.add(b.value));
|
|
2297
2329
|
else {
|
|
2298
|
-
const
|
|
2330
|
+
const b = i.items.filter(
|
|
2299
2331
|
(r) => t.has(r.value)
|
|
2300
2332
|
);
|
|
2301
|
-
|
|
2302
|
-
o.push(m ?? r), l.add(
|
|
2333
|
+
b.length > 0 && b.length === i.items.length ? (o.push(i.displayValue ?? i.label), l.add(i.value), i.items.forEach((r) => l.add(r.value))) : b.forEach(({ label: r, displayValue: m, value: d }) => {
|
|
2334
|
+
o.push(m ?? r), l.add(d);
|
|
2303
2335
|
});
|
|
2304
2336
|
}
|
|
2305
2337
|
else
|
|
@@ -2309,14 +2341,14 @@ const Ea = La.exports, wa = (a, e) => {
|
|
|
2309
2341
|
return a.value.forEach((o) => {
|
|
2310
2342
|
l.has(o.value) || s.push(o.displayValue ?? o.label);
|
|
2311
2343
|
}), s.join(", ");
|
|
2312
|
-
},
|
|
2344
|
+
}, Aa = ({ items: a, placeholder: e, selectedValues: l, isMultiSelect: t }) => {
|
|
2313
2345
|
const s = n(
|
|
2314
2346
|
() => t.value && a.value.find((i) => i.items?.length)
|
|
2315
2347
|
);
|
|
2316
|
-
return n(() => l.value.length ? s.value ?
|
|
2317
|
-
},
|
|
2348
|
+
return n(() => l.value.length ? s.value ? Ta(l, a) : l.value.map(({ label: i, displayValue: v }) => v ?? i).join(", ") : e.value || null);
|
|
2349
|
+
}, ut = (a) => {
|
|
2318
2350
|
a.value.$children?.[0].$refs.textbox.focus();
|
|
2319
|
-
},
|
|
2351
|
+
}, Da = ({
|
|
2320
2352
|
inputContainerRef: a,
|
|
2321
2353
|
optionsContainerRef: e,
|
|
2322
2354
|
selectedValueIndex: l,
|
|
@@ -2324,99 +2356,109 @@ const Ea = La.exports, wa = (a, e) => {
|
|
|
2324
2356
|
isDynamicFltering: s,
|
|
2325
2357
|
items: o,
|
|
2326
2358
|
isMultiple: i,
|
|
2327
|
-
isSearching:
|
|
2328
|
-
activeDescendantIndex:
|
|
2329
|
-
selectFirstMatchedOption:
|
|
2359
|
+
isSearching: v,
|
|
2360
|
+
activeDescendantIndex: b,
|
|
2361
|
+
selectFirstMatchedOption: u,
|
|
2330
2362
|
totalItemCount: r,
|
|
2331
2363
|
isVirtualScroll: m,
|
|
2332
|
-
removeActiveDescendant:
|
|
2333
|
-
}, c,
|
|
2334
|
-
const
|
|
2335
|
-
s.value && await
|
|
2336
|
-
},
|
|
2337
|
-
s.value && await
|
|
2338
|
-
const
|
|
2364
|
+
removeActiveDescendant: d
|
|
2365
|
+
}, c, _, R) => {
|
|
2366
|
+
const L = async (I) => {
|
|
2367
|
+
s.value && await j(), o.value[I]?.focus();
|
|
2368
|
+
}, O = async (I) => {
|
|
2369
|
+
s.value && await j();
|
|
2370
|
+
const te = e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.$el.querySelectorAll(
|
|
2339
2371
|
"button"
|
|
2340
2372
|
);
|
|
2341
|
-
|
|
2342
|
-
}, S = (
|
|
2343
|
-
|
|
2344
|
-
),
|
|
2345
|
-
await e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.navigateToItem(
|
|
2346
|
-
},
|
|
2347
|
-
|
|
2348
|
-
m ?
|
|
2373
|
+
te?.length ? te[I]?.focus() : L(I);
|
|
2374
|
+
}, S = (I) => e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.setListboxFocusedIndex(
|
|
2375
|
+
I
|
|
2376
|
+
), B = async (I) => {
|
|
2377
|
+
await e.value.$refs.dropdownOptionsListboxRef.$refs.listboxItemRef?.navigateToItem(I);
|
|
2378
|
+
}, g = (I) => {
|
|
2379
|
+
d?.(), !(I < 0) && j(() => {
|
|
2380
|
+
m ? B(I) : (S(I), L(I));
|
|
2349
2381
|
});
|
|
2350
|
-
},
|
|
2351
|
-
t.value ||
|
|
2352
|
-
},
|
|
2353
|
-
t.value ||
|
|
2354
|
-
const
|
|
2355
|
-
|
|
2356
|
-
},
|
|
2357
|
-
t.value ||
|
|
2358
|
-
|
|
2382
|
+
}, A = () => {
|
|
2383
|
+
t.value || _(), g(0);
|
|
2384
|
+
}, k = () => {
|
|
2385
|
+
t.value || _();
|
|
2386
|
+
const I = m ? r.value - 1 : o.value.length - 1, te = Math.min((b?.value ?? -1) + 1, I);
|
|
2387
|
+
g(te);
|
|
2388
|
+
}, $ = () => {
|
|
2389
|
+
t.value || _(), j(() => {
|
|
2390
|
+
g(m ? r.value - 1 : o.value.length - 1);
|
|
2359
2391
|
});
|
|
2360
|
-
},
|
|
2361
|
-
|
|
2362
|
-
},
|
|
2363
|
-
if (
|
|
2364
|
-
|
|
2392
|
+
}, E = (I) => {
|
|
2393
|
+
I.preventDefault(), I.stopPropagation();
|
|
2394
|
+
}, Y = ({ detail: I }) => {
|
|
2395
|
+
if (E(I), b?.value !== void 0 && b.value >= 0) {
|
|
2396
|
+
k();
|
|
2365
2397
|
return;
|
|
2366
2398
|
}
|
|
2367
|
-
|
|
2368
|
-
},
|
|
2369
|
-
|
|
2370
|
-
},
|
|
2371
|
-
|
|
2372
|
-
},
|
|
2373
|
-
|
|
2374
|
-
},
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2399
|
+
A();
|
|
2400
|
+
}, V = ({ detail: I }) => {
|
|
2401
|
+
E(I), $();
|
|
2402
|
+
}, C = ({ detail: I }) => {
|
|
2403
|
+
E(I), A();
|
|
2404
|
+
}, z = ({ detail: I }) => {
|
|
2405
|
+
E(I), $();
|
|
2406
|
+
}, w = () => {
|
|
2407
|
+
if (t.value) {
|
|
2408
|
+
if (i.value) {
|
|
2409
|
+
O(0);
|
|
2410
|
+
return;
|
|
2411
|
+
}
|
|
2412
|
+
j(() => {
|
|
2413
|
+
a.value.focus("clear-action") || g(l.value);
|
|
2414
|
+
});
|
|
2415
|
+
}
|
|
2416
|
+
}, x = ({ detail: I }) => {
|
|
2417
|
+
E(I), c(), w();
|
|
2418
|
+
}, P = async ({ detail: I }) => {
|
|
2419
|
+
if (E(I), s.value && !i.value)
|
|
2420
|
+
return t.value && v.value && await u(), void 0;
|
|
2421
|
+
c(), w();
|
|
2422
|
+
}, se = ({ detail: I }) => {
|
|
2423
|
+
I.stopPropagation(), t.value && R();
|
|
2424
|
+
}, ee = ({ detail: I }) => {
|
|
2425
|
+
I.stopPropagation(), t.value && (R(), ut(a));
|
|
2384
2426
|
};
|
|
2385
2427
|
return n(() => ({
|
|
2386
|
-
[
|
|
2387
|
-
[
|
|
2388
|
-
[
|
|
2389
|
-
[
|
|
2390
|
-
...s.value ? {} : { [
|
|
2391
|
-
[
|
|
2392
|
-
...s.value ? {} : { [
|
|
2393
|
-
[
|
|
2428
|
+
[K.ARROW_DOWN]: Y,
|
|
2429
|
+
[K.ARROW_UP]: V,
|
|
2430
|
+
[K.HOME]: C,
|
|
2431
|
+
[K.END]: z,
|
|
2432
|
+
...s.value ? {} : { [K.SPACE]: x },
|
|
2433
|
+
[K.ENTER]: P,
|
|
2434
|
+
...s.value ? {} : { [K.TAB]: se },
|
|
2435
|
+
[K.ESCAPE]: ee
|
|
2394
2436
|
}));
|
|
2395
2437
|
}, ka = ({ inputContainerRef: a, isDropdownOpen: e }, l) => {
|
|
2396
2438
|
const t = () => {
|
|
2397
|
-
e.value && l(),
|
|
2398
|
-
|
|
2439
|
+
e.value && l(), j(() => {
|
|
2440
|
+
ut(a);
|
|
2399
2441
|
});
|
|
2400
2442
|
};
|
|
2401
2443
|
return {
|
|
2402
|
-
[
|
|
2403
|
-
[
|
|
2404
|
-
[
|
|
2405
|
-
[
|
|
2444
|
+
[p.ENTER]: t,
|
|
2445
|
+
[p.ESCAPE]: t,
|
|
2446
|
+
[p.TAB]: t,
|
|
2447
|
+
[p.SPACE]: t
|
|
2406
2448
|
};
|
|
2407
2449
|
};
|
|
2408
|
-
function
|
|
2409
|
-
const o =
|
|
2450
|
+
function Ba(a, e, l, t, s) {
|
|
2451
|
+
const o = y(a), i = y(e), v = (r, m = []) => m.flatMap((d) => d.label.toLocaleLowerCase().includes(r) ? t?.value && d.items ? [...v(r, d.items)] : [d, ...v(r, d.items)] : d.items ? [...v(r, d.items)] : []), b = l !== void 0 ? it(() => l(o.value), s ?? 300) : void 0;
|
|
2410
2452
|
return Q(o, () => {
|
|
2411
|
-
|
|
2453
|
+
b !== void 0 && b();
|
|
2412
2454
|
}), n(() => {
|
|
2413
2455
|
if (!o.value || l !== void 0)
|
|
2414
2456
|
return i.value;
|
|
2415
2457
|
const r = o.value.toLocaleLowerCase();
|
|
2416
|
-
return
|
|
2458
|
+
return v(r, i.value);
|
|
2417
2459
|
});
|
|
2418
2460
|
}
|
|
2419
|
-
const
|
|
2461
|
+
const Ra = {
|
|
2420
2462
|
"de-DE": { all: "Alle", ariaLabelFallback: "Dropdown", clearSearch: "Filter löschen" },
|
|
2421
2463
|
"en-GB": { all: "All", ariaLabelFallback: "Dropdown", clearSearch: "Clear filter" },
|
|
2422
2464
|
"en-US": { all: "All", ariaLabelFallback: "Dropdown", clearSearch: "Clear filter" },
|
|
@@ -2428,17 +2470,17 @@ const Ba = {
|
|
|
2428
2470
|
"ja-JP": { all: "すべて", ariaLabelFallback: "ドロップダウン", clearSearch: "フィルターをクリア" },
|
|
2429
2471
|
"pt-BR": { all: "Todos", ariaLabelFallback: "Menu suspenso", clearSearch: "Limpar filtro" },
|
|
2430
2472
|
"zh-CN": { all: "全部", ariaLabelFallback: "下拉菜单", clearSearch: "清除筛选器" }
|
|
2431
|
-
},
|
|
2432
|
-
i18n: { messages:
|
|
2473
|
+
}, Ma = W({
|
|
2474
|
+
i18n: { messages: Ra },
|
|
2433
2475
|
name: "bento-dropdown",
|
|
2434
2476
|
components: {
|
|
2435
|
-
DropdownInputDefault:
|
|
2436
|
-
DropdownInputSmall:
|
|
2477
|
+
DropdownInputDefault: pa,
|
|
2478
|
+
DropdownInputSmall: wa
|
|
2437
2479
|
},
|
|
2438
2480
|
inheritAttrs: !1,
|
|
2439
2481
|
model: { prop: "modelValue", event: "update:model-value" }
|
|
2440
|
-
}),
|
|
2441
|
-
...
|
|
2482
|
+
}), Na = /* @__PURE__ */ W({
|
|
2483
|
+
...Ma,
|
|
2442
2484
|
props: {
|
|
2443
2485
|
description: { default: null },
|
|
2444
2486
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -2449,6 +2491,7 @@ const Ba = {
|
|
|
2449
2491
|
readonly: { type: Boolean, default: !1 },
|
|
2450
2492
|
required: { type: Boolean, default: !1 },
|
|
2451
2493
|
tooltipText: { default: null },
|
|
2494
|
+
clearable: { type: Boolean, default: !1 },
|
|
2452
2495
|
condensed: { type: Boolean, default: !1 },
|
|
2453
2496
|
emptyState: { default: void 0 },
|
|
2454
2497
|
dynamicFiltering: { type: Boolean, default: !1 },
|
|
@@ -2457,7 +2500,7 @@ const Ba = {
|
|
|
2457
2500
|
items: { default: () => [] },
|
|
2458
2501
|
loading: { type: Boolean, default: !1 },
|
|
2459
2502
|
componentLoading: { type: Boolean, default: !1 },
|
|
2460
|
-
lazyLoadType: { default:
|
|
2503
|
+
lazyLoadType: { default: ze.props.lazyLoadType.default },
|
|
2461
2504
|
multiple: { type: Boolean, default: !1 },
|
|
2462
2505
|
search: { default: void 0 },
|
|
2463
2506
|
showSlotContentInMultiple: { type: Boolean, default: !1 },
|
|
@@ -2469,145 +2512,147 @@ const Ba = {
|
|
|
2469
2512
|
},
|
|
2470
2513
|
emits: ["update:model-value", "show-more", "open"],
|
|
2471
2514
|
setup(a, { expose: e, emit: l }) {
|
|
2472
|
-
const t = a, s =
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
),
|
|
2515
|
+
const t = a, s = Ge(), o = xe(), i = (N) => Object.fromEntries(Object.entries(N).filter(([le]) => !le.startsWith("aria-"))), v = Je(o), { t: b } = fe(), { emitValue: u } = mt(l), r = y(null), m = y(null), d = y(null), c = y(!1), _ = y(!1), R = re("bento-dropdown-options-container"), L = re("dropdown-label"), O = re("dropdown-description"), S = re("dropdown-error"), { isReadOnly: B } = _t(J(t, "readonly")), g = n(() => t.modelValue), { cachedSelectedListboxOptions: A, cachedListboxSelectedValues: k, setCachedValues: $ } = Kl(
|
|
2516
|
+
J(t, "items"),
|
|
2517
|
+
g,
|
|
2518
|
+
J(t, "multiple"),
|
|
2519
|
+
J(t, "enableValueLabelPair")
|
|
2520
|
+
), E = y(s["aria-describedby"]), Y = n(() => b("ariaLabelFallback")), V = Ue(ea, !1), C = n(() => V ? Oe.SMALL : Oe.DEFAULT), z = n(() => ({
|
|
2478
2521
|
"b-dropdown--condensed": t.condensed
|
|
2479
|
-
})),
|
|
2522
|
+
})), w = n(() => ({
|
|
2480
2523
|
"b-dropdown__description--error": !!t.errorMessage
|
|
2481
|
-
})),
|
|
2482
|
-
|
|
2483
|
-
|
|
2524
|
+
})), x = y(""), P = J(t, "items"), se = J(t, "staticCategories"), ee = Ba(
|
|
2525
|
+
x,
|
|
2526
|
+
P,
|
|
2484
2527
|
t?.search?.searchEvent,
|
|
2485
|
-
|
|
2528
|
+
se,
|
|
2486
2529
|
t?.search?.debounceTime
|
|
2487
|
-
),
|
|
2488
|
-
items:
|
|
2489
|
-
placeholder:
|
|
2490
|
-
isMultiSelect:
|
|
2491
|
-
selectedValues:
|
|
2492
|
-
}),
|
|
2493
|
-
if (t?.multiple && Array.isArray(
|
|
2530
|
+
), X = n(() => t.dynamicFiltering && !!x.value), I = Aa({
|
|
2531
|
+
items: P,
|
|
2532
|
+
placeholder: J(t, "placeholder"),
|
|
2533
|
+
isMultiSelect: J(t, "multiple"),
|
|
2534
|
+
selectedValues: A
|
|
2535
|
+
}), te = n(() => {
|
|
2536
|
+
if (t?.multiple && Array.isArray(g.value))
|
|
2494
2537
|
return t.items.filter(
|
|
2495
|
-
({ value:
|
|
2538
|
+
({ value: N }) => g.value.includes(N)
|
|
2496
2539
|
);
|
|
2497
2540
|
if (!t.multiple && t.staticCategories) {
|
|
2498
|
-
const
|
|
2499
|
-
(
|
|
2541
|
+
const N = t.items.find(
|
|
2542
|
+
(oe) => oe.items?.some((Ye) => Ye.value === g.value)
|
|
2500
2543
|
);
|
|
2501
|
-
return (
|
|
2544
|
+
return (N ? N.items.find((oe) => oe.value === g.value) : t.items.find(({ value: oe }) => oe === g.value)) ?? null;
|
|
2502
2545
|
}
|
|
2503
|
-
return t.items.find(({ value:
|
|
2504
|
-
}),
|
|
2505
|
-
const le = (
|
|
2546
|
+
return t.items.find(({ value: N }) => N === g.value);
|
|
2547
|
+
}), be = n(() => {
|
|
2548
|
+
const le = (ce.value ? ue.value : ee.value).findIndex(({ value: oe }) => t.enableValueLabelPair ? g.value?.value === oe : g.value === oe);
|
|
2506
2549
|
return le > -1 ? le : 0;
|
|
2507
|
-
}), { isMultiLevelSelect:
|
|
2550
|
+
}), { isMultiLevelSelect: ce, flattenedItemsList: ue } = nt(P), ye = n(() => ce.value && !t.staticCategories), de = n(() => ye.value ? "treeitem" : "option"), T = n(() => {
|
|
2508
2551
|
if (t.multiple) {
|
|
2509
|
-
const
|
|
2510
|
-
return
|
|
2552
|
+
const N = Array.isArray(g.value) ? g.value.length : 0, le = ce.value ? ue.value.length : P.value.length;
|
|
2553
|
+
return N === 0 ? null : !t.hasMoreItems && le > 0 && le === N ? b("all") : N;
|
|
2511
2554
|
}
|
|
2512
2555
|
return null;
|
|
2513
|
-
}),
|
|
2514
|
-
() =>
|
|
2515
|
-
),
|
|
2516
|
-
() => !t.multiple && c.value &&
|
|
2556
|
+
}), H = n(
|
|
2557
|
+
() => ee.value.find((N) => !t.isOptionDisabled?.(N))
|
|
2558
|
+
), ge = n(() => t.multiple || !X.value || !_.value ? "" : H.value?.label ?? ""), Fe = n(() => ge.value.toLocaleLowerCase().startsWith(x.value.toLocaleLowerCase()) ? ge.value.slice(x.value.length) : ""), Ce = n(
|
|
2559
|
+
() => !t.multiple && c.value && X.value && _.value && H.value ? at(R, H.value.value) : null
|
|
2517
2560
|
), Ie = n(
|
|
2518
|
-
() => Ce.value ?
|
|
2519
|
-
),
|
|
2520
|
-
|
|
2521
|
-
},
|
|
2561
|
+
() => Ce.value ? ee.value.findIndex(({ value: N }) => N === H.value?.value) : -1
|
|
2562
|
+
), Ee = (N) => {
|
|
2563
|
+
x.value = N, _.value = !0;
|
|
2564
|
+
}, we = async () => {
|
|
2565
|
+
$([]), u(null), await j(), Be();
|
|
2566
|
+
}, Te = n(
|
|
2522
2567
|
() => [
|
|
2523
|
-
t.description ?
|
|
2524
|
-
|
|
2568
|
+
t.description ? O : null,
|
|
2569
|
+
E.value,
|
|
2525
2570
|
t.errorMessage ? S : null
|
|
2526
2571
|
].filter(Boolean).join(" ") || null
|
|
2527
|
-
),
|
|
2528
|
-
const
|
|
2529
|
-
return
|
|
2530
|
-
}), { visibleDomOptions:
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
),
|
|
2535
|
-
|
|
2536
|
-
|
|
2572
|
+
), ve = n(() => {
|
|
2573
|
+
const N = d.value?.dropdownOptionsListboxRef;
|
|
2574
|
+
return N?.listboxRef?.value ?? N?.listboxRef;
|
|
2575
|
+
}), { visibleDomOptions: Ae, updateVisibleDomOptions: he } = We(
|
|
2576
|
+
ve,
|
|
2577
|
+
ee,
|
|
2578
|
+
de
|
|
2579
|
+
), De = () => {
|
|
2580
|
+
B.value || (c.value = !0, j(() => {
|
|
2581
|
+
he();
|
|
2537
2582
|
}));
|
|
2538
|
-
},
|
|
2583
|
+
}, Se = () => {
|
|
2539
2584
|
c.value = !1;
|
|
2540
2585
|
}, ke = () => {
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
}),
|
|
2544
|
-
},
|
|
2545
|
-
|
|
2546
|
-
},
|
|
2547
|
-
|
|
2586
|
+
B.value || (c.value = !c.value, j(() => {
|
|
2587
|
+
he();
|
|
2588
|
+
}), X.value && (x.value = ""));
|
|
2589
|
+
}, f = () => {
|
|
2590
|
+
X.value && (x.value = ""), c.value && (c.value = !1, d.value.onOutsideDropdownClick());
|
|
2591
|
+
}, h = n(() => [
|
|
2592
|
+
f,
|
|
2548
2593
|
{
|
|
2549
|
-
ignore: [
|
|
2594
|
+
ignore: [ve]
|
|
2550
2595
|
}
|
|
2551
|
-
]),
|
|
2552
|
-
t.multiple || (
|
|
2553
|
-
},
|
|
2554
|
-
l(
|
|
2555
|
-
},
|
|
2596
|
+
]), D = async (N) => {
|
|
2597
|
+
t.multiple || (x.value = "", c.value = !1), $(N), u(k.value), t.multiple || (await j(), Be());
|
|
2598
|
+
}, F = async () => H.value ? (await D([H.value]), !0) : !1, G = () => {
|
|
2599
|
+
l(p.SHOW_MORE);
|
|
2600
|
+
}, Z = Da(
|
|
2556
2601
|
{
|
|
2557
2602
|
inputContainerRef: r,
|
|
2558
|
-
optionsContainerRef:
|
|
2559
|
-
selectedValueIndex:
|
|
2603
|
+
optionsContainerRef: d,
|
|
2604
|
+
selectedValueIndex: be,
|
|
2560
2605
|
isDropdownOpen: c,
|
|
2561
|
-
isDynamicFltering:
|
|
2562
|
-
items:
|
|
2563
|
-
isMultiple:
|
|
2564
|
-
isSearching:
|
|
2606
|
+
isDynamicFltering: J(t, "dynamicFiltering"),
|
|
2607
|
+
items: Ae,
|
|
2608
|
+
isMultiple: J(t, "multiple"),
|
|
2609
|
+
isSearching: X,
|
|
2565
2610
|
activeDescendantIndex: Ie,
|
|
2566
|
-
selectFirstMatchedOption:
|
|
2567
|
-
totalItemCount: n(() =>
|
|
2611
|
+
selectFirstMatchedOption: F,
|
|
2612
|
+
totalItemCount: n(() => ee.value.length),
|
|
2568
2613
|
isVirtualScroll: !t?.multiple && t?.virtualScroll !== !1 && t?.lazyLoadType === "none",
|
|
2569
2614
|
removeActiveDescendant: () => {
|
|
2570
|
-
|
|
2615
|
+
_.value = !1;
|
|
2571
2616
|
}
|
|
2572
2617
|
},
|
|
2573
2618
|
ke,
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
),
|
|
2619
|
+
De,
|
|
2620
|
+
Se
|
|
2621
|
+
), M = ka(
|
|
2577
2622
|
{
|
|
2578
2623
|
inputContainerRef: r,
|
|
2579
2624
|
isDropdownOpen: c
|
|
2580
2625
|
},
|
|
2581
|
-
|
|
2582
|
-
),
|
|
2583
|
-
[
|
|
2584
|
-
[
|
|
2585
|
-
[
|
|
2586
|
-
...
|
|
2587
|
-
},
|
|
2626
|
+
Se
|
|
2627
|
+
), Le = {
|
|
2628
|
+
[p.CLOSE_DROPDOWN]: Se,
|
|
2629
|
+
[p.SELECT]: D,
|
|
2630
|
+
[p.SHOW_MORE]: G,
|
|
2631
|
+
...M
|
|
2632
|
+
}, Be = () => {
|
|
2588
2633
|
r.value?.focus();
|
|
2589
|
-
},
|
|
2590
|
-
if (await
|
|
2634
|
+
}, qe = async () => {
|
|
2635
|
+
if (await j(), !c.value || t.multiple || !d.value)
|
|
2591
2636
|
return;
|
|
2592
|
-
const
|
|
2593
|
-
if (
|
|
2637
|
+
const N = be.value;
|
|
2638
|
+
if (N <= 0)
|
|
2594
2639
|
return;
|
|
2595
|
-
const le =
|
|
2596
|
-
le?.listboxItemRef?.scrollToItem?.(
|
|
2640
|
+
const le = d.value.dropdownOptionsListboxRef, oe = le?.listboxRef;
|
|
2641
|
+
le?.listboxItemRef?.scrollToItem?.(N, oe);
|
|
2597
2642
|
};
|
|
2598
2643
|
return Q(
|
|
2599
2644
|
() => c.value,
|
|
2600
|
-
(
|
|
2601
|
-
|
|
2645
|
+
(N) => {
|
|
2646
|
+
N && (l("open"), qe());
|
|
2602
2647
|
}
|
|
2603
2648
|
), e({
|
|
2604
|
-
focus:
|
|
2605
|
-
}), { __sfc: !0, attrs: s, slots: o, getRootAttributes: i, hasSlot:
|
|
2649
|
+
focus: Be
|
|
2650
|
+
}), { __sfc: !0, attrs: s, slots: o, getRootAttributes: i, hasSlot: v, props: t, emit: l, t: b, emitValue: u, inputContainerRef: r, inputContainerRefWrapper: m, optionsContainerRef: d, isDropdownOpen: c, shouldShowActiveDescendant: _, dropdownOptionsContainerId: R, labelId: L, descriptionId: O, errorId: S, isReadOnly: B, dropdownValue: g, cachedSelectedListboxOptions: A, cachedListboxSelectedValues: k, setCachedValues: $, ariaDescribedByAttribute: E, computedAriaLabelFallbackMessage: Y, isInputComponent: V, computedSize: C, conditionalClasses: z, descriptionConditionalClasses: w, searchTerm: x, items: P, staticCategories: se, filteredItems: ee, isSearching: X, displayValue: I, selectedValueItem: te, selectedValueIndex: be, isMultiLevelSelect: ce, flattenedItemsList: ue, isTreePattern: ye, computedOptionRole: de, additionalItemsSelected: T, firstEnabledFilteredItem: H, autocompleteSuggestion: ge, autocompleteSuggestionSuffix: Fe, activeDescendantId: Ce, activeDescendantIndex: Ie, onSearchTermInput: Ee, onClearSelection: we, ariaDescribedBy: Te, listboxRef: ve, visibleDomOptions: Ae, updateVisibleDomOptions: he, openDropdown: De, closeDropdown: Se, toggleDropdown: ke, clickOutsideDropdown: f, clickOutsideDropdownOptions: h, onOptionSelected: D, selectFirstMatchedOption: F, emitShowMoreEvent: G, textboxKeyboardNavigationListeners: Z, listboxKeyboardNavigationListeners: M, listboxListeners: Le, focus: Be, scrollToSelectedOption: qe, BentoDropdownOptionsContainer: Ql, BentoTypography: pe, ErrorMessage: Et, FieldLabel: Ot, BentoTeleport: It, vBentoClickOutsideDirective: Lt, vBentoKeyboardNavigationDirective: $e };
|
|
2606
2651
|
}
|
|
2607
2652
|
});
|
|
2608
|
-
var
|
|
2653
|
+
var $a = function() {
|
|
2609
2654
|
var e = this, l = e._self._c, t = e._self._setupProxy;
|
|
2610
|
-
return l("div", e._b({ directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: t.clickOutsideDropdownOptions, expression: "clickOutsideDropdownOptions" }], staticClass: "b-dropdown", class: t.conditionalClasses }, "div", t.getRootAttributes(e.$attrs), !1), [e.label ? l(t.FieldLabel, { attrs: { id: t.labelId, condensed: e.condensed, label: e.label, "tooltip-text": e.tooltipText, optional: e.optional, required: e.required } }) : e._e(), l("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "inputContainerRefWrapper" }, t.textboxKeyboardNavigationListeners), [l(t.computedSize, { ref: "inputContainerRef", tag: "component", attrs: { condensed: e.condensed, value: t.searchTerm, "additional-items-selected": t.additionalItemsSelected, "aria-controls": t.dropdownOptionsContainerId, "aria-active-descendant": t.activeDescendantId, ariaExpanded: t.isDropdownOpen, "aria-labelledby": e.label ? t.labelId : null, "aria-describedby": t.ariaDescribedBy, "aria-label": e.$attrs["aria-label"] ?? e.label ?? t.computedAriaLabelFallbackMessage, "aria-readonly": t.isReadOnly, "aria-required": e.required, readonly: t.isReadOnly, disabled: e.disabled, "display-value": t.displayValue, "dynamic-filtering": e.dynamicFiltering, "has-selected-value": t.cachedSelectedListboxOptions.length > 0, "is-invalid": !!e.errorMessage, multiple: e.multiple, open: t.isDropdownOpen, "selected-value-item": t.isInputComponent ? void 0 : t.selectedValueItem, "show-slot-content-in-multiple": e.showSlotContentInMultiple }, on: { input: t.onSearchTermInput, open: t.toggleDropdown, close: t.toggleDropdown }, scopedSlots: e._u([{ key: "autocomplete-suggestion", fn: function() {
|
|
2655
|
+
return l("div", e._b({ directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: t.clickOutsideDropdownOptions, expression: "clickOutsideDropdownOptions" }], staticClass: "b-dropdown", class: t.conditionalClasses }, "div", t.getRootAttributes(e.$attrs), !1), [e.label ? l(t.FieldLabel, { attrs: { id: t.labelId, condensed: e.condensed, label: e.label, "tooltip-text": e.tooltipText, optional: e.optional, required: e.required } }) : e._e(), l("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "inputContainerRefWrapper" }, t.textboxKeyboardNavigationListeners), [l(t.computedSize, { ref: "inputContainerRef", tag: "component", attrs: { condensed: e.condensed, value: t.searchTerm, "additional-items-selected": t.additionalItemsSelected, "aria-controls": t.dropdownOptionsContainerId, "aria-active-descendant": t.activeDescendantId, ariaExpanded: t.isDropdownOpen, "aria-labelledby": e.label ? t.labelId : null, "aria-describedby": t.ariaDescribedBy, "aria-label": e.$attrs["aria-label"] ?? e.label ?? t.computedAriaLabelFallbackMessage, "aria-readonly": t.isReadOnly, "aria-required": e.required, clearable: e.clearable && !e.required, readonly: t.isReadOnly, disabled: e.disabled, "display-value": t.displayValue, "dynamic-filtering": e.dynamicFiltering, "has-selected-value": t.cachedSelectedListboxOptions.length > 0, "is-invalid": !!e.errorMessage, multiple: e.multiple, open: t.isDropdownOpen, "selected-value-item": t.isInputComponent ? void 0 : t.selectedValueItem, "show-slot-content-in-multiple": e.showSlotContentInMultiple }, on: { input: t.onSearchTermInput, open: t.toggleDropdown, close: t.toggleDropdown, "clear-selection": t.onClearSelection }, scopedSlots: e._u([{ key: "autocomplete-suggestion", fn: function() {
|
|
2611
2656
|
return [t.autocompleteSuggestionSuffix ? [l("span", { staticClass: "b-dropdown__autocomplete-hidden-prefix" }, [e._v(e._s(t.searchTerm))]), e._v(e._s(t.autocompleteSuggestionSuffix) + " ")] : e._e()];
|
|
2612
2657
|
}, proxy: !0 }, e._l(t.slots, function(s, o) {
|
|
2613
2658
|
return { key: o, fn: function(i) {
|
|
@@ -2620,29 +2665,29 @@ var Na = function() {
|
|
|
2620
2665
|
})], null, !0) }, t.listboxListeners))], 1) : e._e(), e.errorMessage ? l(t.ErrorMessage, { staticClass: "b-dropdown__error-message", attrs: { id: t.errorId, "error-message": e.errorMessage } }) : e._e(), e.description || t.hasSlot("description") ? l(t.BentoTypography, { staticClass: "b-dropdown__description", class: t.descriptionConditionalClasses, attrs: { id: t.descriptionId, el: "span" } }, [e._t("description", function() {
|
|
2621
2666
|
return [e._v(" " + e._s(e.description) + " ")];
|
|
2622
2667
|
})], 2) : e._e()], 1);
|
|
2623
|
-
},
|
|
2624
|
-
Ma,
|
|
2668
|
+
}, Pa = [], Fa = /* @__PURE__ */ q(
|
|
2625
2669
|
Na,
|
|
2626
2670
|
$a,
|
|
2671
|
+
Pa,
|
|
2627
2672
|
!1,
|
|
2628
2673
|
null,
|
|
2629
|
-
"
|
|
2674
|
+
"5ac84d18"
|
|
2630
2675
|
);
|
|
2631
|
-
const
|
|
2676
|
+
const fs = Fa.exports;
|
|
2632
2677
|
export {
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2678
|
+
fs as B,
|
|
2679
|
+
Gt as C,
|
|
2680
|
+
pa as D,
|
|
2681
|
+
p as a,
|
|
2682
|
+
ne as b,
|
|
2683
|
+
Oe as c,
|
|
2684
|
+
ze as d,
|
|
2685
|
+
nt as e,
|
|
2686
|
+
Ba as f,
|
|
2687
|
+
it as g,
|
|
2688
|
+
ea as h,
|
|
2689
|
+
rt as i,
|
|
2690
|
+
Ke as j,
|
|
2691
|
+
Kl as u
|
|
2647
2692
|
};
|
|
2648
|
-
//# sourceMappingURL=dropdown.
|
|
2693
|
+
//# sourceMappingURL=dropdown.Dd8RNGXv.js.map
|