@adyen/bento-vue3 1.72.0 → 1.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +2 -10
- package/dist/@types/index.d.ts +1543 -1703
- package/dist/@types/use-form-v4.d.ts +1 -1
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/avatar.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/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/country.css +1 -1
- package/dist/assets/currency.css +1 -1
- package/dist/assets/data-grid-template.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown-tag.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/form-layout-title.css +1 -1
- package/dist/assets/header-meta.css +1 -1
- package/dist/assets/header-with-views.css +1 -1
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/input-field-phone-number.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/listbox-option-tag.css +1 -1
- package/dist/assets/loading-indicator.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/pagination.css +1 -1
- package/dist/assets/popper-container.css +1 -1
- package/dist/assets/radio-group.css +1 -1
- package/dist/assets/radio-input.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/segmented-control.css +1 -1
- package/dist/assets/selection-card-group.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/step.css +1 -1
- package/dist/assets/tab.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/assets/tooltip.css +1 -1
- package/dist/assets/tutorial.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/avatar.js +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chip.js +1 -1
- package/dist/chunks/{accordion-item.6etqAJV9.js → accordion-item.Bd3v6erb.js} +2 -2
- package/dist/chunks/{accordion-item.6etqAJV9.js.map → accordion-item.Bd3v6erb.js.map} +1 -1
- package/dist/chunks/{action-bar.DDLTN9TB.js → action-bar.BZ04Y7Yi.js} +5 -5
- package/dist/chunks/{action-bar.DDLTN9TB.js.map → action-bar.BZ04Y7Yi.js.map} +1 -1
- package/dist/chunks/{ai-button.DsNrcgpK.js → ai-button.DaRuea3x.js} +2 -2
- package/dist/chunks/{ai-button.DsNrcgpK.js.map → ai-button.DaRuea3x.js.map} +1 -1
- package/dist/chunks/{alert.Dzx5MzgE.js → alert.C2pusd-_.js} +3 -3
- package/dist/chunks/{alert.Dzx5MzgE.js.map → alert.C2pusd-_.js.map} +1 -1
- package/dist/chunks/{avatar.Dq59yj6m.js → avatar.P2Fkz2I6.js} +27 -26
- package/dist/chunks/avatar.P2Fkz2I6.js.map +1 -0
- package/dist/chunks/{base-modal.Djw4pVal.js → base-modal.UA93s_8c.js} +7 -7
- package/dist/chunks/base-modal.UA93s_8c.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.DaKPEgPd.js → button-actions-with-menu.BeQ-j1bv.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.DaKPEgPd.js.map → button-actions-with-menu.BeQ-j1bv.js.map} +1 -1
- package/dist/chunks/{button-actions.D1eBtYgZ.js → button-actions.BQ3AFQqt.js} +13 -16
- package/dist/chunks/button-actions.BQ3AFQqt.js.map +1 -0
- package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -1
- package/dist/chunks/{button.C-MAa6ut.js → button.DhcxX2GJ.js} +2 -2
- package/dist/chunks/button.DhcxX2GJ.js.map +1 -0
- package/dist/chunks/{calendar.B1a_mV-Q.js → calendar.Cqjyxc69.js} +314 -310
- package/dist/chunks/calendar.Cqjyxc69.js.map +1 -0
- package/dist/chunks/{card.B9lWURmF.js → card.GxkxfBoV.js} +23 -23
- package/dist/chunks/card.GxkxfBoV.js.map +1 -0
- package/dist/chunks/{checkbox-group.CcgOK4yt.js → checkbox-group.8ebmaHsA.js} +4 -4
- package/dist/chunks/{checkbox-group.CcgOK4yt.js.map → checkbox-group.8ebmaHsA.js.map} +1 -1
- package/dist/chunks/{checkbox.73QYC0y8.js → checkbox.BI0dqARY.js} +4 -4
- package/dist/chunks/{checkbox.73QYC0y8.js.map → checkbox.BI0dqARY.js.map} +1 -1
- package/dist/chunks/{chip.CUwVpPVo.js → chip.DuLyhNCy.js} +2 -2
- package/dist/chunks/{chip.CUwVpPVo.js.map → chip.DuLyhNCy.js.map} +1 -1
- package/dist/chunks/{code-snippet.DL_1HNKV.js → code-snippet.CO78Nfj0.js} +7 -7
- package/dist/chunks/{code-snippet.DL_1HNKV.js.map → code-snippet.CO78Nfj0.js.map} +1 -1
- package/dist/chunks/{controls-group.CdTg-WDi.js → controls-group.cbGiHr7n.js} +2 -2
- package/dist/chunks/{controls-group.CdTg-WDi.js.map → controls-group.cbGiHr7n.js.map} +1 -1
- package/dist/chunks/{copy.Da1OGFTr.js → copy.ClKnDjMI.js} +5 -5
- package/dist/chunks/{copy.Da1OGFTr.js.map → copy.ClKnDjMI.js.map} +1 -1
- package/dist/chunks/country.DmnN9YIW.js +69 -0
- package/dist/chunks/country.DmnN9YIW.js.map +1 -0
- package/dist/chunks/country.types.C0Q_hhgJ.js.map +1 -1
- package/dist/chunks/{currency.CN4UnCx8.js → currency.CBZMwm21.js} +55 -38
- package/dist/chunks/currency.CBZMwm21.js.map +1 -0
- package/dist/chunks/{dashboard-section.BXE7_Y9R.js → dashboard-section.CVttsom5.js} +3 -3
- package/dist/chunks/{dashboard-section.BXE7_Y9R.js.map → dashboard-section.CVttsom5.js.map} +1 -1
- package/dist/chunks/{dashed-underline.28J-9i5D.js → dashed-underline.r62L_XBr.js} +3 -3
- package/dist/chunks/{dashed-underline.28J-9i5D.js.map → dashed-underline.r62L_XBr.js.map} +1 -1
- package/dist/chunks/{data-grid-template.B13OrA1T.js → data-grid-template.CFt1NV_4.js} +4 -4
- package/dist/chunks/{data-grid-template.B13OrA1T.js.map → data-grid-template.CFt1NV_4.js.map} +1 -1
- package/dist/chunks/data-grid.BjPdbx50.js +4071 -0
- package/dist/chunks/data-grid.BjPdbx50.js.map +1 -0
- package/dist/chunks/{date-input.BqBdAO1E.js → date-format.B8RU7D42.js} +6 -6
- package/dist/chunks/date-format.B8RU7D42.js.map +1 -0
- package/dist/chunks/date-picker.DSkvT_CA.js +234 -0
- package/dist/chunks/date-picker.DSkvT_CA.js.map +1 -0
- package/dist/chunks/date-range-picker.cmg75lC-.js +1117 -0
- package/dist/chunks/date-range-picker.cmg75lC-.js.map +1 -0
- package/dist/chunks/{date.4GAXrgy5.js → date.DZvVL-uz.js} +3 -3
- package/dist/chunks/{date.4GAXrgy5.js.map → date.DZvVL-uz.js.map} +1 -1
- package/dist/chunks/debounce.DUTu11PS.js.map +1 -1
- package/dist/chunks/{dialog-page.1ZVnUqpT.js → dialog-page.zWrBSgBD.js} +3 -3
- package/dist/chunks/dialog-page.zWrBSgBD.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.CGsOngY1.js → dropdown-default-textbox.MkU0tMf1.js} +29 -29
- package/dist/chunks/dropdown-default-textbox.MkU0tMf1.js.map +1 -0
- package/dist/chunks/{dropdown-tag.hIiGmmBD.js → dropdown-tag.DvQQIJsw.js} +134 -122
- package/dist/chunks/dropdown-tag.DvQQIJsw.js.map +1 -0
- package/dist/chunks/{dropdown.GyDAswAO.js → dropdown.bLsoTZbw.js} +350 -339
- package/dist/chunks/dropdown.bLsoTZbw.js.map +1 -0
- package/dist/chunks/{empty-state.BsKJ-1pT.js → empty-state.Be6M8ivH.js} +2 -2
- package/dist/chunks/{empty-state.BsKJ-1pT.js.map → empty-state.Be6M8ivH.js.map} +1 -1
- package/dist/chunks/es6.MoTTyETW.js.map +1 -1
- package/dist/chunks/{field-label.DSeawpYh.js → field-label.C97CrBI_.js} +3 -3
- package/dist/chunks/{field-label.DSeawpYh.js.map → field-label.C97CrBI_.js.map} +1 -1
- package/dist/chunks/{file-uploader.DELe6_NM.js → file-uploader.By0MTfKk.js} +87 -88
- package/dist/chunks/file-uploader.By0MTfKk.js.map +1 -0
- package/dist/chunks/filter-bar.nX73NKNC.js +2948 -0
- package/dist/chunks/filter-bar.nX73NKNC.js.map +1 -0
- package/dist/chunks/{fixed-scroller.BASYH576.js → fixed-scroller.Dmg8r9QP.js} +3 -3
- package/dist/chunks/{fixed-scroller.BASYH576.js.map → fixed-scroller.Dmg8r9QP.js.map} +1 -1
- package/dist/chunks/focus-trap.CpNGD7PH.js.map +1 -1
- package/dist/chunks/{footer-actions.Bqn-Jp0p.js → footer-actions.BO52wpv-.js} +3 -3
- package/dist/chunks/{footer-actions.Bqn-Jp0p.js.map → footer-actions.BO52wpv-.js.map} +1 -1
- package/dist/chunks/{form-layout-title.DdRqnXXi.js → form-layout-title.61ESsGAY.js} +20 -12
- package/dist/chunks/form-layout-title.61ESsGAY.js.map +1 -0
- package/dist/chunks/get-slot-text.DQlZEsId.js.map +1 -1
- package/dist/chunks/{header-meta.BXOpbsSR.js → header-meta.C4iaUsfq.js} +13 -10
- package/dist/chunks/{header-meta.BXOpbsSR.js.map → header-meta.C4iaUsfq.js.map} +1 -1
- package/dist/chunks/{header-with-views.afPw_Czi.js → header-with-views.BLW817ZC.js} +207 -207
- package/dist/chunks/header-with-views.BLW817ZC.js.map +1 -0
- package/dist/chunks/{header.9kRuPR3K.js → header.DARVAeE9.js} +3 -3
- package/dist/chunks/{header.9kRuPR3K.js.map → header.DARVAeE9.js.map} +1 -1
- package/dist/chunks/index.pdBj0KQU.js +15 -0
- package/dist/chunks/index.pdBj0KQU.js.map +1 -0
- package/dist/chunks/{info-icon.CRnO5lpq.js → info-icon.BhOm72U4.js} +3 -3
- package/dist/chunks/{info-icon.CRnO5lpq.js.map → info-icon.BhOm72U4.js.map} +1 -1
- package/dist/chunks/{input-field-password.JZkGOiMd.js → input-field-password.BtM3-txc.js} +8 -8
- package/dist/chunks/input-field-password.BtM3-txc.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.CF5P0_yu.js → input-field-phone-number.oaNB69nM.js} +631 -631
- package/dist/chunks/{input-field-phone-number.CF5P0_yu.js.map → input-field-phone-number.oaNB69nM.js.map} +1 -1
- package/dist/chunks/{input-field.2S8zBviE.js → input-field.D_tADgPG.js} +5 -5
- package/dist/chunks/input-field.D_tADgPG.js.map +1 -0
- package/dist/chunks/{inspector.C-yVhM15.js → inspector.BKP15cx6.js} +4 -4
- package/dist/chunks/inspector.BKP15cx6.js.map +1 -0
- package/dist/chunks/keyboard-navigation.pB8weElW.js.map +1 -1
- package/dist/chunks/{listbox-option-tag.CtJUykfB.js → listbox-option-tag.uHSB7MO6.js} +9 -9
- package/dist/chunks/listbox-option-tag.uHSB7MO6.js.map +1 -0
- package/dist/chunks/loading-indicator.Db794TT5.js +33 -0
- package/dist/chunks/loading-indicator.Db794TT5.js.map +1 -0
- package/dist/chunks/{modal-fullscreen.CIxazX33.js → modal-fullscreen.DTT-5rQX.js} +6 -6
- package/dist/chunks/{modal-fullscreen.CIxazX33.js.map → modal-fullscreen.DTT-5rQX.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.D4TJY7o_.js → modal.vue_vue_type_script_setup_true_lang.c3Ma1oAL.js} +6 -6
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.D4TJY7o_.js.map → modal.vue_vue_type_script_setup_true_lang.c3Ma1oAL.js.map} +1 -1
- package/dist/chunks/on-click-outside.D9aY9g8G.js.map +1 -1
- package/dist/chunks/{pagination.NDwXq6fh.js → pagination.D1Gdo5to.js} +5 -5
- package/dist/chunks/pagination.D1Gdo5to.js.map +1 -0
- package/dist/chunks/popover.types.BFFy1ChU.js +6 -0
- package/dist/chunks/{popover.types.Bp97CGc4.js.map → popover.types.BFFy1ChU.js.map} +1 -1
- package/dist/chunks/{popper-container.5cq-eu41.js → popper-container.Uod3yjsR.js} +2 -2
- package/dist/chunks/{popper-container.5cq-eu41.js.map → popper-container.Uod3yjsR.js.map} +1 -1
- package/dist/chunks/{promo-banner.ChT2zKkO.js → promo-banner.B-TLTLEd.js} +3 -3
- package/dist/chunks/promo-banner.B-TLTLEd.js.map +1 -0
- package/dist/chunks/radio-group.DWNqrkZ3.js +277 -0
- package/dist/chunks/radio-group.DWNqrkZ3.js.map +1 -0
- package/dist/chunks/{radio-input.odN9FOyr.js → radio-input.CBNE-AkM.js} +13 -14
- package/dist/chunks/radio-input.CBNE-AkM.js.map +1 -0
- package/dist/chunks/{rich-text-editor.D770fUpS.js → rich-text-editor.BK9AivIm.js} +6 -6
- package/dist/chunks/{rich-text-editor.D770fUpS.js.map → rich-text-editor.BK9AivIm.js.map} +1 -1
- package/dist/chunks/{search-bar.rZ_38y4j.js → search-bar.BD_R-vgA.js} +4 -4
- package/dist/chunks/{search-bar.rZ_38y4j.js.map → search-bar.BD_R-vgA.js.map} +1 -1
- package/dist/chunks/{secondary-nav.BBE8HyDR.js → secondary-nav.Du2PL7Ok.js} +5 -5
- package/dist/chunks/secondary-nav.Du2PL7Ok.js.map +1 -0
- package/dist/chunks/{segmented-control.D0SoqGlC.js → segmented-control.BCHGDSrf.js} +47 -45
- package/dist/chunks/segmented-control.BCHGDSrf.js.map +1 -0
- package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -1
- package/dist/chunks/{selection-card-group.KK9ZPqiU.js → selection-card-group._RgLiMyQ.js} +5 -5
- package/dist/chunks/selection-card-group._RgLiMyQ.js.map +1 -0
- package/dist/chunks/{sidepanel.CyPW8jxA.js → sidepanel.CS9CfAWZ.js} +19 -19
- package/dist/chunks/{sidepanel.CyPW8jxA.js.map → sidepanel.CS9CfAWZ.js.map} +1 -1
- package/dist/chunks/{step.Ci-e1V9E.js → step.CoSuGK16.js} +4 -4
- package/dist/chunks/step.CoSuGK16.js.map +1 -0
- package/dist/chunks/{structured-list-item.CSkcduKn.js → structured-list-item.BTPh7SPj.js} +6 -6
- package/dist/chunks/{structured-list-item.CSkcduKn.js.map → structured-list-item.BTPh7SPj.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.C-gcwqwB.js → summary-grid.types.ByQ4u19J.js} +6 -6
- package/dist/chunks/{summary-grid.types.C-gcwqwB.js.map → summary-grid.types.ByQ4u19J.js.map} +1 -1
- package/dist/chunks/{tab.8bEkiAkk.js → tab.CD5Eu6ql.js} +3 -3
- package/dist/chunks/tab.CD5Eu6ql.js.map +1 -0
- package/dist/chunks/{tag.BFYNxO6t.js → tag.CEmpyuYX.js} +2 -2
- package/dist/chunks/{tag.BFYNxO6t.js.map → tag.CEmpyuYX.js.map} +1 -1
- package/dist/chunks/textarea.C1jkfowf.js +246 -0
- package/dist/chunks/textarea.C1jkfowf.js.map +1 -0
- package/dist/chunks/{timeline-item.BiivSMPD.js → timeline-item.C8PA_w7m.js} +9 -9
- package/dist/chunks/timeline-item.C8PA_w7m.js.map +1 -0
- package/dist/chunks/{toast.DIhABAW8.js → toast.6oJx7SNq.js} +3 -3
- package/dist/chunks/{toast.DIhABAW8.js.map → toast.6oJx7SNq.js.map} +1 -1
- package/dist/chunks/toggle.Dd_NA8eH.js +143 -0
- package/dist/chunks/toggle.Dd_NA8eH.js.map +1 -0
- package/dist/chunks/tooltip.Dp9_ESm_.js +202 -0
- package/dist/chunks/tooltip.Dp9_ESm_.js.map +1 -0
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BDCDB169.js → tutorial.vue_vue_type_script_setup_true_lang.KvlJ_dl9.js} +6 -6
- package/dist/chunks/tutorial.vue_vue_type_script_setup_true_lang.KvlJ_dl9.js.map +1 -0
- package/dist/chunks/{use-cached-selected-values.CBOWMI4O.js → use-cached-selected-values.C32tjNKy.js} +114 -114
- package/dist/chunks/use-cached-selected-values.C32tjNKy.js.map +1 -0
- package/dist/chunks/{use-country-items.D_kamcYy.js → use-country-items.Dzbl2UsO.js} +7 -7
- package/dist/chunks/use-country-items.Dzbl2UsO.js.map +1 -0
- package/dist/chunks/use-country-phon-code.Bui3zD6W.js.map +1 -1
- package/dist/chunks/use-default-slot-validator.O02rzsob.js.map +1 -1
- package/dist/chunks/use-has-slot.B7eQSabc.js.map +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +1 -1
- package/dist/currency.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 +5 -4
- package/dist/date-range-picker.js +5 -4
- package/dist/date.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +5 -4
- 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 +405 -329
- package/dist/index.js.map +1 -1
- 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/inspector.js +1 -1
- package/dist/internal.js +12 -12
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/popover.js +2 -2
- package/dist/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +2 -2
- 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/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +25 -15
- package/dist/styles/bento-light.css +9 -3
- package/dist/styles/bento.css +9 -3
- package/dist/styles/legacy.css +9 -3
- package/dist/styles/styleguide.css +9 -3
- 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/toast.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/use-form-v4.js.map +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +14 -12
- package/dist/chunks/avatar.Dq59yj6m.js.map +0 -1
- package/dist/chunks/base-modal.Djw4pVal.js.map +0 -1
- package/dist/chunks/button-actions.D1eBtYgZ.js.map +0 -1
- package/dist/chunks/button.C-MAa6ut.js.map +0 -1
- package/dist/chunks/calendar.B1a_mV-Q.js.map +0 -1
- package/dist/chunks/card.B9lWURmF.js.map +0 -1
- package/dist/chunks/country.RVvsGwuV.js +0 -99
- package/dist/chunks/country.RVvsGwuV.js.map +0 -1
- package/dist/chunks/currency.CN4UnCx8.js.map +0 -1
- package/dist/chunks/data-grid._xo6LEB-.js +0 -4010
- package/dist/chunks/data-grid._xo6LEB-.js.map +0 -1
- package/dist/chunks/date-input.BqBdAO1E.js.map +0 -1
- package/dist/chunks/date-picker.Bkz4GmyC.js +0 -319
- package/dist/chunks/date-picker.Bkz4GmyC.js.map +0 -1
- package/dist/chunks/date-range-picker.9Zlg9xnH.js +0 -1171
- package/dist/chunks/date-range-picker.9Zlg9xnH.js.map +0 -1
- package/dist/chunks/dialog-page.1ZVnUqpT.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.CGsOngY1.js.map +0 -1
- package/dist/chunks/dropdown-tag.hIiGmmBD.js.map +0 -1
- package/dist/chunks/dropdown.GyDAswAO.js.map +0 -1
- package/dist/chunks/file-uploader.DELe6_NM.js.map +0 -1
- package/dist/chunks/filter-bar.BLhRZzJa.js +0 -3005
- package/dist/chunks/filter-bar.BLhRZzJa.js.map +0 -1
- package/dist/chunks/form-layout-title.DdRqnXXi.js.map +0 -1
- package/dist/chunks/header-with-views.afPw_Czi.js.map +0 -1
- package/dist/chunks/i18n.B6g5VX0q.js +0 -3131
- package/dist/chunks/i18n.B6g5VX0q.js.map +0 -1
- package/dist/chunks/input-field-password.JZkGOiMd.js.map +0 -1
- package/dist/chunks/input-field.2S8zBviE.js.map +0 -1
- package/dist/chunks/inspector.C-yVhM15.js.map +0 -1
- package/dist/chunks/listbox-option-tag.CtJUykfB.js.map +0 -1
- package/dist/chunks/loading-indicator.VHi5tbZa.js +0 -44
- package/dist/chunks/loading-indicator.VHi5tbZa.js.map +0 -1
- package/dist/chunks/pagination.NDwXq6fh.js.map +0 -1
- package/dist/chunks/popover.types.Bp97CGc4.js +0 -6
- package/dist/chunks/promo-banner.ChT2zKkO.js.map +0 -1
- package/dist/chunks/radio-group.BNiif4On.js +0 -329
- package/dist/chunks/radio-group.BNiif4On.js.map +0 -1
- package/dist/chunks/radio-input.odN9FOyr.js.map +0 -1
- package/dist/chunks/secondary-nav.BBE8HyDR.js.map +0 -1
- package/dist/chunks/segmented-control.D0SoqGlC.js.map +0 -1
- package/dist/chunks/selection-card-group.KK9ZPqiU.js.map +0 -1
- package/dist/chunks/step.Ci-e1V9E.js.map +0 -1
- package/dist/chunks/tab.8bEkiAkk.js.map +0 -1
- package/dist/chunks/textarea.C7RmLKEx.js +0 -295
- package/dist/chunks/textarea.C7RmLKEx.js.map +0 -1
- package/dist/chunks/timeline-item.BiivSMPD.js.map +0 -1
- package/dist/chunks/toggle.C8k7NQ7y.js +0 -161
- package/dist/chunks/toggle.C8k7NQ7y.js.map +0 -1
- package/dist/chunks/tooltip.CEHc6lzU.js +0 -211
- package/dist/chunks/tooltip.CEHc6lzU.js.map +0 -1
- package/dist/chunks/tutorial.vue_vue_type_script_setup_true_lang.BDCDB169.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.CBOWMI4O.js.map +0 -1
- package/dist/chunks/use-country-items.D_kamcYy.js.map +0 -1
|
@@ -0,0 +1,2948 @@
|
|
|
1
|
+
import { defineComponent as Q, useSlots as Ne, useAttrs as Ot, computed as p, ref as K, createBlock as w, openBlock as F, unref as T, normalizeClass as de, withCtx as C, createElementVNode as W, renderSlot as ce, createCommentVNode as Z, createVNode as R, createTextVNode as X, toDisplayString as x, watch as ie, createElementBlock as G, withDirectives as Rt, withKeys as me, nextTick as it, toRef as te, onBeforeUpdate as Ve, provide as rt, mergeProps as re, resolveComponent as N, Fragment as $e, reactive as wt, createSlots as Pe, renderList as ye, normalizeProps as Re, guardReactiveProps as we, onMounted as ut, resolveDynamicComponent as Oe } from "vue";
|
|
2
|
+
import { B as ke, b as Ae } from "./search-bar.BD_R-vgA.js";
|
|
3
|
+
import { u as kt } from "./use-bento-toast-controller.Kri_h7jS.js";
|
|
4
|
+
import { u as pe } from "./index.pdBj0KQU.js";
|
|
5
|
+
import { k as Nt } from "./index.E60QniEu.js";
|
|
6
|
+
import { F as dt } from "./fixed-scroller.Dmg8r9QP.js";
|
|
7
|
+
import { _ as Vt } from "./modal.vue_vue_type_script_setup_true_lang.c3Ma1oAL.js";
|
|
8
|
+
import { B as Mt } from "./button.DhcxX2GJ.js";
|
|
9
|
+
import { B as Ht } from "./radio-group.DWNqrkZ3.js";
|
|
10
|
+
import { t as Ce } from "./truncate.BfIl_-71.js";
|
|
11
|
+
import { u as jt, d as ct, h as qt, I as Kt, k as Jt, B as Yt } from "./button-actions.BQ3AFQqt.js";
|
|
12
|
+
import { b as zt } from "./tooltip.Dp9_ESm_.js";
|
|
13
|
+
import { _ as le } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
14
|
+
import { g as qe } from "./generate-uid.NJ8tVoha.js";
|
|
15
|
+
import { C as Wt } from "./cross-small.n1UO5wNB.js";
|
|
16
|
+
import { B as pt, a as We } from "./base-button.BYhf0xf3.js";
|
|
17
|
+
import { B as ve, d as Ke } from "./typography.yBEME_Gu.js";
|
|
18
|
+
import { u as bt } from "./use-has-slot.B7eQSabc.js";
|
|
19
|
+
import { u as ft } from "./aria-label.CaUURpnB.js";
|
|
20
|
+
import { g as vt } from "./get-slot-text.DQlZEsId.js";
|
|
21
|
+
import { B as Je } from "./input-field.D_tADgPG.js";
|
|
22
|
+
import { u as mt, B as Gt } from "./dropdown.bLsoTZbw.js";
|
|
23
|
+
import { g as Zt } from "./focus-trap.CpNGD7PH.js";
|
|
24
|
+
import { C as Qt } from "./chevron-up.kfuLRpZb.js";
|
|
25
|
+
import { C as Xt } from "./chevron-down.DCQ6ZLaq.js";
|
|
26
|
+
/* empty css */
|
|
27
|
+
import { B as Ye } from "./divider.DnKNNyWB.js";
|
|
28
|
+
import { c as Ge, b as xt } from "./use-cached-selected-values.C32tjNKy.js";
|
|
29
|
+
import { L as yt } from "./listbox-option-tag.uHSB7MO6.js";
|
|
30
|
+
import { B as el } from "./payment-method.CDnn1bjo.js";
|
|
31
|
+
import { u as tl } from "./use-country-items.Dzbl2UsO.js";
|
|
32
|
+
import { B as ll } from "./avatar.P2Fkz2I6.js";
|
|
33
|
+
import { D as al, B as ol, i as He, b as nl } from "./date-range-picker.cmg75lC-.js";
|
|
34
|
+
import { g as ht } from "./get-date-locale.CAyOIbcp.js";
|
|
35
|
+
import { D as Ze } from "./date-format.B8RU7D42.js";
|
|
36
|
+
import { b as sl, f as ge, i as il } from "./calendar.Cqjyxc69.js";
|
|
37
|
+
import { B as rl } from "./date-picker.DSkvT_CA.js";
|
|
38
|
+
import { R as Qe } from "./refresh.BB4ouvz_.js";
|
|
39
|
+
import "../assets/filter-bar.css";
|
|
40
|
+
const ul = { class: "b-filter-bar-button__container" }, dl = { class: "b-filter-bar-button__label-container" }, cl = {}, pl = /* @__PURE__ */ Q({
|
|
41
|
+
...cl,
|
|
42
|
+
__name: "filter-bar-button",
|
|
43
|
+
props: {
|
|
44
|
+
/**
|
|
45
|
+
* The number of applied values within the filter.
|
|
46
|
+
* Text can also be applied here such as 'All'.
|
|
47
|
+
* e.g. if 2 items in a dropdown filter have been applied, the number 2 will be shown here.
|
|
48
|
+
*/
|
|
49
|
+
appliedFiltersCount: { type: [String, Number], default: null },
|
|
50
|
+
/**
|
|
51
|
+
* Disables button functionality.
|
|
52
|
+
*/
|
|
53
|
+
disabled: { type: Boolean, default: !1 },
|
|
54
|
+
/**
|
|
55
|
+
* Signifies if the filter is open or closed.
|
|
56
|
+
*/
|
|
57
|
+
isFilterOpen: { type: Boolean, default: !1 },
|
|
58
|
+
/**
|
|
59
|
+
* Signifies if the filter is a persistent filter
|
|
60
|
+
*/
|
|
61
|
+
isPersistentFilter: { type: Boolean, default: !1 },
|
|
62
|
+
/**
|
|
63
|
+
* Renders the button without the applied state styles
|
|
64
|
+
*/
|
|
65
|
+
noAppliedStateStyles: { type: Boolean, default: !1 },
|
|
66
|
+
/**
|
|
67
|
+
* A secondary label to be added next to the primary for additional filtering information.
|
|
68
|
+
* i.e. Can be used to show the set value for said filter.
|
|
69
|
+
*/
|
|
70
|
+
secondaryLabel: { type: String, default: null }
|
|
71
|
+
},
|
|
72
|
+
emits: ["click"],
|
|
73
|
+
setup(e, { emit: n }) {
|
|
74
|
+
const l = e, s = n, t = Ne(), o = Ot(), d = bt(t), a = p(() => t.default ? vt(t)("default") : null), i = p(() => !d("default") && d("iconLeft")), v = ft({ ariaLabel: a }), b = K(null), A = p(() => {
|
|
75
|
+
var P;
|
|
76
|
+
return {
|
|
77
|
+
"aria-controls": (P = o["aria-controls"]) == null ? void 0 : P.toString()
|
|
78
|
+
};
|
|
79
|
+
}), $ = p(
|
|
80
|
+
() => (l.appliedFiltersCount || l.secondaryLabel || l.isPersistentFilter) && !l.noAppliedStateStyles
|
|
81
|
+
), c = p(() => ({
|
|
82
|
+
"b-filter-bar-button--applied": $.value,
|
|
83
|
+
"b-filter-bar-button--filter-open": l.isFilterOpen && !$.value,
|
|
84
|
+
"b-filter-bar-button--filter-open-applied": l.isFilterOpen && $.value,
|
|
85
|
+
"b-filter-bar-button--with-secondary-label": l.secondaryLabel,
|
|
86
|
+
"b-filter-bar-button--with-counter": l.appliedFiltersCount,
|
|
87
|
+
"b-filter-bar-button--icon-only": i.value
|
|
88
|
+
})), g = (P) => {
|
|
89
|
+
P.preventDefault(), l.disabled || s("click", P);
|
|
90
|
+
};
|
|
91
|
+
return (P, _) => (F(), w(T(pt), {
|
|
92
|
+
ref_key: "filterBarButtonRef",
|
|
93
|
+
ref: b,
|
|
94
|
+
class: de(["b-filter-bar-button", c.value]),
|
|
95
|
+
disabled: e.disabled,
|
|
96
|
+
"aria-label": T(v),
|
|
97
|
+
"aria-controls": A.value["aria-controls"],
|
|
98
|
+
type: "button",
|
|
99
|
+
onClick: g
|
|
100
|
+
}, {
|
|
101
|
+
iconRight: C(() => [
|
|
102
|
+
e.appliedFiltersCount && !i.value ? (F(), w(T(ve), {
|
|
103
|
+
key: 0,
|
|
104
|
+
class: "b-filter-bar-button__counter",
|
|
105
|
+
el: "span",
|
|
106
|
+
variant: "body",
|
|
107
|
+
stronger: ""
|
|
108
|
+
}, {
|
|
109
|
+
default: C(() => [
|
|
110
|
+
X(x(e.appliedFiltersCount), 1)
|
|
111
|
+
]),
|
|
112
|
+
_: 1
|
|
113
|
+
})) : Z("", !0)
|
|
114
|
+
]),
|
|
115
|
+
default: C(() => [
|
|
116
|
+
W("div", ul, [
|
|
117
|
+
T(d)("iconLeft") ? ce(P.$slots, "iconLeft", { key: 0 }, void 0, !0) : Z("", !0),
|
|
118
|
+
W("div", dl, [
|
|
119
|
+
R(T(ve), {
|
|
120
|
+
el: "span",
|
|
121
|
+
variant: "body",
|
|
122
|
+
stronger: "",
|
|
123
|
+
class: "b-filter-bar-button__label"
|
|
124
|
+
}, {
|
|
125
|
+
default: C(() => [
|
|
126
|
+
W("span", null, [
|
|
127
|
+
ce(P.$slots, "default", {}, void 0, !0)
|
|
128
|
+
]),
|
|
129
|
+
e.secondaryLabel && !i.value ? (F(), w(T(ve), {
|
|
130
|
+
key: 0,
|
|
131
|
+
el: "span",
|
|
132
|
+
variant: "body",
|
|
133
|
+
stronger: "",
|
|
134
|
+
class: "b-filter-bar-button__label"
|
|
135
|
+
}, {
|
|
136
|
+
default: C(() => _[0] || (_[0] = [
|
|
137
|
+
X(":")
|
|
138
|
+
])),
|
|
139
|
+
_: 1
|
|
140
|
+
})) : Z("", !0)
|
|
141
|
+
]),
|
|
142
|
+
_: 3
|
|
143
|
+
}),
|
|
144
|
+
e.secondaryLabel && !i.value ? (F(), w(T(ve), {
|
|
145
|
+
key: 0,
|
|
146
|
+
el: "span",
|
|
147
|
+
variant: "body",
|
|
148
|
+
stronger: "",
|
|
149
|
+
class: "b-filter-bar-button__secondary-label"
|
|
150
|
+
}, {
|
|
151
|
+
default: C(() => [
|
|
152
|
+
X(x(e.secondaryLabel), 1)
|
|
153
|
+
]),
|
|
154
|
+
_: 1
|
|
155
|
+
})) : Z("", !0)
|
|
156
|
+
])
|
|
157
|
+
])
|
|
158
|
+
]),
|
|
159
|
+
_: 3
|
|
160
|
+
}, 8, ["class", "disabled", "aria-label", "aria-controls"]));
|
|
161
|
+
}
|
|
162
|
+
}), Ee = /* @__PURE__ */ le(pl, [["__scopeId", "data-v-3556e231"]]);
|
|
163
|
+
var D = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.UPDATE = "update", e))(D || {}), Se = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.UPDATE_FILTER_VALUES_OBJECT = "update:filter-values-object", e.UPDATE_FILTER_VALUES_ARRAY = "update:filter-values", e))(Se || {}), se = /* @__PURE__ */ ((e) => (e.BOOLEAN = "BentoBooleanFilter", e.RANGE = "BentoRangeFilter", e.INPUT = "BentoInputFilter", e.INPUT_DROPDOWN = "BentoInputWithDropdownFilter", e.SELECT = "BentoSelectFilter", e.SELECT_AVATAR = "BentoSelectAvatarFilter", e.SELECT_COUNTRY = "BentoSelectCountryFilter", e.SELECT_CURRENCY = "BentoSelectCurrencyFilter", e.SELECT_PAYMENT_METHOD = "BentoSelectPaymentMethodFilter", e.SELECT_TAG = "BentoSelectTagFilter", e.DATE = "BentoDateFilter", e.DATE_RANGE = "BentoDateRangeFilter", e))(se || {});
|
|
164
|
+
const Xe = 430, xe = 700;
|
|
165
|
+
function bl(e, n) {
|
|
166
|
+
const l = K("div"), s = K(!1), t = K(0), o = p(() => !(t.value < Xe && n.value.small === "multi-line"));
|
|
167
|
+
function d() {
|
|
168
|
+
s.value = !1, l.value = "div";
|
|
169
|
+
}
|
|
170
|
+
function a() {
|
|
171
|
+
s.value = !0, l.value = dt;
|
|
172
|
+
}
|
|
173
|
+
function i() {
|
|
174
|
+
t.value > xe || t.value < xe && t.value >= Xe && n.value.medium === "multi-line" ? d() : a();
|
|
175
|
+
}
|
|
176
|
+
return ie(() => n.value, i), Nt(e, (v) => {
|
|
177
|
+
t.value = v[0].contentRect.width, i();
|
|
178
|
+
}), {
|
|
179
|
+
screenLayoutComponent: l,
|
|
180
|
+
showSearchbarInsideContainer: o,
|
|
181
|
+
isOneLineLayout: s
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
const fl = {}, vl = /* @__PURE__ */ Q({
|
|
185
|
+
...fl,
|
|
186
|
+
__name: "filter-bar-button-group",
|
|
187
|
+
props: {
|
|
188
|
+
isActive: { type: Boolean, default: !1 },
|
|
189
|
+
skipGrouping: { type: Boolean, default: !1 }
|
|
190
|
+
},
|
|
191
|
+
setup(e) {
|
|
192
|
+
const n = e, l = p(() => ({
|
|
193
|
+
"b-filter-bar-button-group--active": n.isActive,
|
|
194
|
+
"b-filter-bar-button-group--grouped": !n.skipGrouping
|
|
195
|
+
}));
|
|
196
|
+
return (s, t) => (F(), G("div", {
|
|
197
|
+
class: de(["b-filter-bar-button-group", l.value])
|
|
198
|
+
}, [
|
|
199
|
+
ce(s.$slots, "default", {}, void 0, !0)
|
|
200
|
+
], 2));
|
|
201
|
+
}
|
|
202
|
+
}), ml = /* @__PURE__ */ le(vl, [["__scopeId", "data-v-9ce16194"]]);
|
|
203
|
+
var ne = /* @__PURE__ */ ((e) => (e.APPLY = "apply", e.CLEAR = "clear", e.OPEN = "open", e.CLOSE = "close", e.RESET = "reset", e.CANCEL = "cancel", e))(ne || {});
|
|
204
|
+
const Ft = {
|
|
205
|
+
"en-US": {
|
|
206
|
+
apply: "Apply",
|
|
207
|
+
clear: "Clear",
|
|
208
|
+
clearFilter: "Clear filter {function}",
|
|
209
|
+
filtersHaveBeenCleared: "Filters have been cleared",
|
|
210
|
+
numberSelected: "{numberOfItemsSelected} selected",
|
|
211
|
+
reset: "Reset",
|
|
212
|
+
resetFilter: "Reset filter {function}"
|
|
213
|
+
},
|
|
214
|
+
"ja-JP": {
|
|
215
|
+
apply: "適用",
|
|
216
|
+
clear: "クリア",
|
|
217
|
+
reset: "リセット"
|
|
218
|
+
},
|
|
219
|
+
"pt-BR": {
|
|
220
|
+
apply: "Aplicar",
|
|
221
|
+
clear: "Limpar",
|
|
222
|
+
reset: "Reiniciar"
|
|
223
|
+
}
|
|
224
|
+
}, yl = { key: 0 }, hl = {
|
|
225
|
+
key: 1,
|
|
226
|
+
class: "b-base-filter"
|
|
227
|
+
}, Fl = {
|
|
228
|
+
i18n: { messages: Ft },
|
|
229
|
+
name: "bento-base-filter"
|
|
230
|
+
}, gl = /* @__PURE__ */ Q({
|
|
231
|
+
...Fl,
|
|
232
|
+
props: {
|
|
233
|
+
appliedFiltersCount: { default: null },
|
|
234
|
+
buttonLabel: { default: void 0 },
|
|
235
|
+
buttonSecondaryLabel: { default: void 0 },
|
|
236
|
+
disabled: { type: Boolean, default: !1 },
|
|
237
|
+
defaultValue: { default: null },
|
|
238
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
239
|
+
controlled: { type: Boolean, default: !1 },
|
|
240
|
+
disableApplyButton: { type: Boolean, default: !1 },
|
|
241
|
+
disableSecondaryButton: { type: Boolean, default: !1 },
|
|
242
|
+
field: {},
|
|
243
|
+
label: {},
|
|
244
|
+
fitContent: { type: Boolean, default: void 0 },
|
|
245
|
+
tooltipText: { default: void 0 },
|
|
246
|
+
tooltipPosition: { default: void 0 },
|
|
247
|
+
value: { default: void 0 }
|
|
248
|
+
},
|
|
249
|
+
emits: [
|
|
250
|
+
ne.APPLY,
|
|
251
|
+
ne.CLEAR,
|
|
252
|
+
ne.OPEN,
|
|
253
|
+
ne.CLOSE,
|
|
254
|
+
ne.RESET,
|
|
255
|
+
ne.CANCEL
|
|
256
|
+
],
|
|
257
|
+
setup(e, { expose: n, emit: l }) {
|
|
258
|
+
const s = l, t = e, { t: o } = pe({ messages: Ft }), d = qe("base-filter-popover"), a = K(!1), i = K(null), v = K(null), b = p(() => t.defaultValue !== null), A = p(() => b.value ? JSON.stringify(t.value) !== JSON.stringify(t.defaultValue) : t.appliedFiltersCount || t.buttonSecondaryLabel), $ = p(() => {
|
|
259
|
+
let I = t.buttonSecondaryLabel ? `: ${t.buttonSecondaryLabel}` : "";
|
|
260
|
+
return t.appliedFiltersCount && (I = `: ${o("numberSelected", { numberOfItemsSelected: t.appliedFiltersCount })}`), (b.value ? t.label : g.value) + I;
|
|
261
|
+
}), c = p(
|
|
262
|
+
() => b.value ? o("resetFilter", {
|
|
263
|
+
function: g.value
|
|
264
|
+
}) : o("clearFilter", {
|
|
265
|
+
function: g.value
|
|
266
|
+
})
|
|
267
|
+
), g = p(() => t.buttonLabel || t.label), P = async () => {
|
|
268
|
+
var I, B;
|
|
269
|
+
await it(), (B = (I = i.value) == null ? void 0 : I.$el) == null || B.focus();
|
|
270
|
+
}, _ = () => {
|
|
271
|
+
a.value && (a.value = !1, P(), s(ne.CLOSE));
|
|
272
|
+
}, U = () => {
|
|
273
|
+
b.value ? s(ne.RESET) : s(ne.CLEAR), P();
|
|
274
|
+
}, H = () => {
|
|
275
|
+
_(), U();
|
|
276
|
+
}, E = () => {
|
|
277
|
+
a.value ? _() : (a.value = !0, s(ne.OPEN));
|
|
278
|
+
}, j = () => {
|
|
279
|
+
_(), s(ne.APPLY);
|
|
280
|
+
}, h = () => {
|
|
281
|
+
_(), s(ne.CANCEL);
|
|
282
|
+
}, V = () => h(), M = p(() => [
|
|
283
|
+
{
|
|
284
|
+
title: o("apply"),
|
|
285
|
+
event: j,
|
|
286
|
+
disabled: t.disableApplyButton
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
title: b.value ? o("reset") : o("clear"),
|
|
290
|
+
event: H,
|
|
291
|
+
disabled: t.disableSecondaryButton
|
|
292
|
+
}
|
|
293
|
+
]);
|
|
294
|
+
return ie(
|
|
295
|
+
() => a.value,
|
|
296
|
+
(I, B) => {
|
|
297
|
+
var J, z;
|
|
298
|
+
!I && B && (z = (J = i.value) == null ? void 0 : J.filterBarButtonRef) != null && z.bentoBaseButtonRef && i.value.filterBarButtonRef.bentoBaseButtonRef.focus();
|
|
299
|
+
}
|
|
300
|
+
), jt(v, V, { ignore: [i] }), n({
|
|
301
|
+
closePopover: _
|
|
302
|
+
}), (I, B) => I.onlySlot ? (F(), G("div", yl, [
|
|
303
|
+
ce(I.$slots, "default", {}, void 0, !0)
|
|
304
|
+
])) : (F(), G("div", hl, [
|
|
305
|
+
Rt((F(), w(ml, {
|
|
306
|
+
"is-active": a.value,
|
|
307
|
+
"skip-grouping": !A.value
|
|
308
|
+
}, {
|
|
309
|
+
default: C(() => [
|
|
310
|
+
R(T(Ee), {
|
|
311
|
+
ref_key: "filterButtonRef",
|
|
312
|
+
ref: i,
|
|
313
|
+
"aria-label": $.value,
|
|
314
|
+
"aria-controls": a.value ? T(d) : null,
|
|
315
|
+
"applied-filters-count": I.appliedFiltersCount,
|
|
316
|
+
disabled: I.disabled,
|
|
317
|
+
"is-persistent-filter": b.value,
|
|
318
|
+
"is-filter-open": a.value,
|
|
319
|
+
"secondary-label": I.buttonSecondaryLabel,
|
|
320
|
+
onClick: E,
|
|
321
|
+
onKeydown: me(_, ["esc"])
|
|
322
|
+
}, {
|
|
323
|
+
default: C(() => [
|
|
324
|
+
X(x(g.value), 1)
|
|
325
|
+
]),
|
|
326
|
+
_: 1
|
|
327
|
+
}, 8, ["aria-label", "aria-controls", "applied-filters-count", "disabled", "is-persistent-filter", "is-filter-open", "secondary-label"]),
|
|
328
|
+
A.value ? (F(), w(T(Ee), {
|
|
329
|
+
key: 0,
|
|
330
|
+
"applied-filters-count": I.appliedFiltersCount,
|
|
331
|
+
disabled: I.disabled,
|
|
332
|
+
"is-persistent-filter": b.value,
|
|
333
|
+
"is-filter-open": a.value,
|
|
334
|
+
"secondary-label": I.buttonSecondaryLabel,
|
|
335
|
+
onClick: U
|
|
336
|
+
}, {
|
|
337
|
+
iconLeft: C(() => [
|
|
338
|
+
R(T(Wt), { "svg-title": c.value }, null, 8, ["svg-title"])
|
|
339
|
+
]),
|
|
340
|
+
_: 1
|
|
341
|
+
}, 8, ["applied-filters-count", "disabled", "is-persistent-filter", "is-filter-open", "secondary-label"])) : Z("", !0)
|
|
342
|
+
]),
|
|
343
|
+
_: 1
|
|
344
|
+
}, 8, ["is-active", "skip-grouping"])), [
|
|
345
|
+
[T(zt), I.tooltipText, I.tooltipPosition]
|
|
346
|
+
]),
|
|
347
|
+
i.value ? (F(), w(ct, { key: 0 }, {
|
|
348
|
+
default: C(() => [
|
|
349
|
+
i.value ? (F(), w(qt, {
|
|
350
|
+
key: 0,
|
|
351
|
+
id: T(d),
|
|
352
|
+
ref_key: "popoverRef",
|
|
353
|
+
ref: v,
|
|
354
|
+
class: "b-base-filter__popover",
|
|
355
|
+
divider: "",
|
|
356
|
+
open: a.value,
|
|
357
|
+
actions: I.controlled ? null : M.value,
|
|
358
|
+
"actions-layout": "space-between",
|
|
359
|
+
"target-element": i.value,
|
|
360
|
+
title: I.controlled ? null : I.label,
|
|
361
|
+
"fit-content": I.fitContent,
|
|
362
|
+
position: "bottom-start",
|
|
363
|
+
"without-space": I.controlled,
|
|
364
|
+
"fallback-position": ["bottom-end"]
|
|
365
|
+
}, {
|
|
366
|
+
default: C(() => [
|
|
367
|
+
W("div", {
|
|
368
|
+
onKeydown: me(h, ["esc"])
|
|
369
|
+
}, [
|
|
370
|
+
ce(I.$slots, "default", {}, void 0, !0)
|
|
371
|
+
], 32)
|
|
372
|
+
]),
|
|
373
|
+
_: 3
|
|
374
|
+
}, 8, ["id", "open", "actions", "target-element", "title", "fit-content", "without-space"])) : Z("", !0)
|
|
375
|
+
]),
|
|
376
|
+
_: 3
|
|
377
|
+
})) : Z("", !0)
|
|
378
|
+
]));
|
|
379
|
+
}
|
|
380
|
+
}), Be = /* @__PURE__ */ le(gl, [["__scopeId", "data-v-7f7255ee"]]), Sl = (e) => e instanceof Array, et = (e) => Sl(e) ? e.length === 0 || e.every((n) => n === "") : !e, tt = (e, n) => JSON.stringify(e) === JSON.stringify(n), he = (e, n) => {
|
|
381
|
+
const l = K(e.value);
|
|
382
|
+
ie(
|
|
383
|
+
() => e.value,
|
|
384
|
+
() => {
|
|
385
|
+
l.value = e.value;
|
|
386
|
+
}
|
|
387
|
+
);
|
|
388
|
+
const s = p(() => et(e.value)), t = p(
|
|
389
|
+
() => n.value !== null ? tt(n.value, e.value) : s.value
|
|
390
|
+
), o = p(() => tt(l.value, e.value) || et(l.value) && s.value);
|
|
391
|
+
return {
|
|
392
|
+
internalFilterValue: l,
|
|
393
|
+
isSecondaryButtonDisabled: t,
|
|
394
|
+
isApplyButtonDisabled: o
|
|
395
|
+
};
|
|
396
|
+
}, Cl = {
|
|
397
|
+
name: "bento-input-filter"
|
|
398
|
+
}, Bl = /* @__PURE__ */ Q({
|
|
399
|
+
...Cl,
|
|
400
|
+
props: {
|
|
401
|
+
defaultValue: { default: null },
|
|
402
|
+
disabled: { type: Boolean, default: !1 },
|
|
403
|
+
field: {},
|
|
404
|
+
label: {},
|
|
405
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
406
|
+
options: { default: void 0 },
|
|
407
|
+
value: { default: null }
|
|
408
|
+
},
|
|
409
|
+
emits: ["input", "update"],
|
|
410
|
+
setup(e, { emit: n }) {
|
|
411
|
+
var M, I;
|
|
412
|
+
const l = e, s = n, t = K(null), o = K((I = (M = l == null ? void 0 : l.options) == null ? void 0 : M.dropdown) == null ? void 0 : I.value), d = p(
|
|
413
|
+
() => {
|
|
414
|
+
var B, J;
|
|
415
|
+
return ((B = l == null ? void 0 : l.options) == null ? void 0 : B.variant) === "dropdown" && ((J = l == null ? void 0 : l.options) == null ? void 0 : J.dropdown) !== void 0;
|
|
416
|
+
}
|
|
417
|
+
), a = p(
|
|
418
|
+
() => {
|
|
419
|
+
var B;
|
|
420
|
+
return d.value ? { ...(B = l == null ? void 0 : l.options) == null ? void 0 : B.dropdown, value: o.value } : void 0;
|
|
421
|
+
}
|
|
422
|
+
), i = p(() => {
|
|
423
|
+
var B;
|
|
424
|
+
return ((B = l == null ? void 0 : l.options) == null ? void 0 : B.variant) === "dropdown" ? "dropdown" : "default";
|
|
425
|
+
}), v = p(
|
|
426
|
+
() => {
|
|
427
|
+
var B;
|
|
428
|
+
return d.value ? (B = l.value) == null ? void 0 : B.inputValue : l == null ? void 0 : l.value;
|
|
429
|
+
}
|
|
430
|
+
), { internalFilterValue: b, isSecondaryButtonDisabled: A, isApplyButtonDisabled: $ } = he(
|
|
431
|
+
v,
|
|
432
|
+
te(l, "defaultValue")
|
|
433
|
+
), c = p(() => l.label), g = p(() => Ce(v.value, 12)), P = p(() => ({
|
|
434
|
+
"b-input-filter--only-slot": l.onlySlot
|
|
435
|
+
}));
|
|
436
|
+
Ve(() => {
|
|
437
|
+
b.value === "" && (b.value = null);
|
|
438
|
+
}), ie(t, () => {
|
|
439
|
+
var B;
|
|
440
|
+
(B = t.value) == null || B.focusInput();
|
|
441
|
+
});
|
|
442
|
+
const _ = () => {
|
|
443
|
+
b.value = v.value;
|
|
444
|
+
}, U = () => {
|
|
445
|
+
!b.value && l.defaultValue !== null && (b.value = l.defaultValue), s("update", {
|
|
446
|
+
...l,
|
|
447
|
+
value: d.value ? {
|
|
448
|
+
inputValue: b.value,
|
|
449
|
+
dropdownValue: o.value
|
|
450
|
+
} : b.value
|
|
451
|
+
});
|
|
452
|
+
}, H = () => s("update", { ...l, value: l.defaultValue }), E = () => {
|
|
453
|
+
b.value = null, U();
|
|
454
|
+
}, j = () => {
|
|
455
|
+
s("input", { ...l, value: b.value });
|
|
456
|
+
}, h = (B) => {
|
|
457
|
+
b.value = B;
|
|
458
|
+
}, V = (B) => {
|
|
459
|
+
o.value = B;
|
|
460
|
+
};
|
|
461
|
+
return rt(Kt, d.value), ie(
|
|
462
|
+
() => l.options,
|
|
463
|
+
() => {
|
|
464
|
+
var B, J, z;
|
|
465
|
+
((B = l.options) != null && B.dropdown || (J = l.options) != null && J.dropdownPosition || (z = l.options) != null && z.variant) && Ke(
|
|
466
|
+
'BentoInputFilter "options" property',
|
|
467
|
+
`BentoInputFilter "options" no longer supports "dropdown", "dropdownPosition" or "variant" attributes.
|
|
468
|
+
Use the "BentoFilterItemType.INPUT_DROPDOWN" instead of "BentoFilterItemType.INPUT"
|
|
469
|
+
<bento-filter-bar
|
|
470
|
+
:config="[{
|
|
471
|
+
field: 'name',
|
|
472
|
+
label: 'Name',
|
|
473
|
+
type: BentoFilterItemType.INPUT_DROPDOWN,
|
|
474
|
+
options: [...],
|
|
475
|
+
}]"
|
|
476
|
+
/>`,
|
|
477
|
+
"2.0.0"
|
|
478
|
+
);
|
|
479
|
+
},
|
|
480
|
+
{ immediate: !0 }
|
|
481
|
+
), (B, J) => {
|
|
482
|
+
var z, ee;
|
|
483
|
+
return F(), w(T(Be), re(B.$props, {
|
|
484
|
+
"button-label": c.value,
|
|
485
|
+
"button-secondary-label": g.value,
|
|
486
|
+
"disable-apply-button": T($),
|
|
487
|
+
"disable-secondary-button": T(A),
|
|
488
|
+
"only-slot": B.onlySlot,
|
|
489
|
+
"popover-overflow-visible": d.value,
|
|
490
|
+
"tooltip-position": (z = B.options) == null ? void 0 : z.tooltipPosition,
|
|
491
|
+
"tooltip-text": (ee = B.options) == null ? void 0 : ee.tooltipText,
|
|
492
|
+
onApply: U,
|
|
493
|
+
onClear: E,
|
|
494
|
+
onOpen: _,
|
|
495
|
+
onReset: H
|
|
496
|
+
}), {
|
|
497
|
+
default: C(() => {
|
|
498
|
+
var S, f;
|
|
499
|
+
return [
|
|
500
|
+
W("div", {
|
|
501
|
+
class: de(["b-input-filter", P.value]),
|
|
502
|
+
onKeydown: me(U, ["enter"]),
|
|
503
|
+
onInput: j
|
|
504
|
+
}, [
|
|
505
|
+
R(T(Je), {
|
|
506
|
+
ref_key: "inputTextRef",
|
|
507
|
+
ref: t,
|
|
508
|
+
dropdown: a.value,
|
|
509
|
+
"dropdown-position": (S = B.options) == null ? void 0 : S.dropdownPosition,
|
|
510
|
+
placeholder: (f = B.options) == null ? void 0 : f.placeholder,
|
|
511
|
+
variant: i.value,
|
|
512
|
+
value: T(b),
|
|
513
|
+
disabled: B.disabled,
|
|
514
|
+
onInput: h,
|
|
515
|
+
onDropdownInput: V
|
|
516
|
+
}, null, 8, ["dropdown", "dropdown-position", "placeholder", "variant", "value", "disabled"])
|
|
517
|
+
], 34)
|
|
518
|
+
];
|
|
519
|
+
}),
|
|
520
|
+
_: 1
|
|
521
|
+
}, 16, ["button-label", "button-secondary-label", "disable-apply-button", "disable-secondary-button", "only-slot", "popover-overflow-visible", "tooltip-position", "tooltip-text"]);
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
}), gt = /* @__PURE__ */ le(Bl, [["__scopeId", "data-v-cfef2e49"]]), Dl = {
|
|
525
|
+
name: "bento-input-with-dropdown-filter"
|
|
526
|
+
}, Al = /* @__PURE__ */ Q({
|
|
527
|
+
...Dl,
|
|
528
|
+
props: {
|
|
529
|
+
disabled: { type: Boolean },
|
|
530
|
+
defaultValue: { default: void 0 },
|
|
531
|
+
field: {},
|
|
532
|
+
label: {},
|
|
533
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
534
|
+
options: { default: void 0 },
|
|
535
|
+
value: { default: void 0 }
|
|
536
|
+
},
|
|
537
|
+
emits: [D.INPUT, D.UPDATE],
|
|
538
|
+
setup(e, { emit: n }) {
|
|
539
|
+
const l = e, s = n, t = K(null), { internalFilterValue: o, isSecondaryButtonDisabled: d, isApplyButtonDisabled: a } = he(te(l, "value"), te(l, "defaultValue")), i = p(() => l.label), v = p(() => {
|
|
540
|
+
var h;
|
|
541
|
+
return Ce((h = l.value) == null ? void 0 : h.inputValue, 12);
|
|
542
|
+
}), b = p(
|
|
543
|
+
() => {
|
|
544
|
+
var h, V, M;
|
|
545
|
+
return ((h = o.value) == null ? void 0 : h.dropdownValue) ?? ((M = (V = l.options) == null ? void 0 : V.dropdown) == null ? void 0 : M.value);
|
|
546
|
+
}
|
|
547
|
+
), A = p(() => {
|
|
548
|
+
var h;
|
|
549
|
+
return {
|
|
550
|
+
...((h = l.options) == null ? void 0 : h.dropdown) || {},
|
|
551
|
+
value: b.value
|
|
552
|
+
};
|
|
553
|
+
}), $ = p(() => ({
|
|
554
|
+
"b-input-with-dropdown-filter--only-slot": l.onlySlot
|
|
555
|
+
})), c = p(() => {
|
|
556
|
+
var V;
|
|
557
|
+
return !(!!((V = o.value) != null && V.inputValue) && !!b.value) || a.value;
|
|
558
|
+
});
|
|
559
|
+
Ve(() => {
|
|
560
|
+
var h;
|
|
561
|
+
((h = o.value) == null ? void 0 : h.inputValue) === "" && (o.value = { ...o.value, inputValue: void 0 });
|
|
562
|
+
}), ie(t, () => {
|
|
563
|
+
var h;
|
|
564
|
+
(h = t.value) == null || h.focusInput();
|
|
565
|
+
});
|
|
566
|
+
const g = () => {
|
|
567
|
+
o.value = l.value;
|
|
568
|
+
}, P = () => {
|
|
569
|
+
var h;
|
|
570
|
+
!((h = o.value) != null && h.inputValue) && l.defaultValue !== null && (o.value = { ...l.defaultValue }), s(D.UPDATE, {
|
|
571
|
+
...l,
|
|
572
|
+
value: o.value
|
|
573
|
+
});
|
|
574
|
+
}, _ = () => s(D.UPDATE, { ...l, value: l.defaultValue }), U = () => {
|
|
575
|
+
o.value = null, P();
|
|
576
|
+
}, H = () => {
|
|
577
|
+
s(D.INPUT, { ...l, value: o.value });
|
|
578
|
+
}, E = (h) => {
|
|
579
|
+
o.value = { dropdownValue: b.value, inputValue: h };
|
|
580
|
+
}, j = (h) => {
|
|
581
|
+
o.value = { ...o.value, dropdownValue: h };
|
|
582
|
+
};
|
|
583
|
+
return rt(Jt, !0), (h, V) => {
|
|
584
|
+
var M, I;
|
|
585
|
+
return F(), w(T(Be), re(h.$props, {
|
|
586
|
+
"button-label": i.value,
|
|
587
|
+
"button-secondary-label": v.value,
|
|
588
|
+
"disable-apply-button": c.value,
|
|
589
|
+
"disable-secondary-button": T(d),
|
|
590
|
+
"only-slot": h.onlySlot,
|
|
591
|
+
"tooltip-position": (M = h.options) == null ? void 0 : M.tooltipPosition,
|
|
592
|
+
"tooltip-text": (I = h.options) == null ? void 0 : I.tooltipText,
|
|
593
|
+
onApply: P,
|
|
594
|
+
onClear: U,
|
|
595
|
+
onOpen: g,
|
|
596
|
+
onReset: _
|
|
597
|
+
}), {
|
|
598
|
+
default: C(() => {
|
|
599
|
+
var B, J;
|
|
600
|
+
return [
|
|
601
|
+
W("div", {
|
|
602
|
+
class: de(["b-input-with-dropdown-filter", $.value]),
|
|
603
|
+
onKeydown: me(P, ["enter"]),
|
|
604
|
+
onInput: H
|
|
605
|
+
}, [
|
|
606
|
+
R(T(Je), {
|
|
607
|
+
ref_key: "inputTextRef",
|
|
608
|
+
ref: t,
|
|
609
|
+
dropdown: A.value,
|
|
610
|
+
"dropdown-position": (B = h.options) == null ? void 0 : B.dropdownPosition,
|
|
611
|
+
variant: "dropdown",
|
|
612
|
+
value: (J = T(o)) == null ? void 0 : J.inputValue,
|
|
613
|
+
disabled: h.disabled,
|
|
614
|
+
onInput: E,
|
|
615
|
+
onDropdownInput: j
|
|
616
|
+
}, null, 8, ["dropdown", "dropdown-position", "value", "disabled"])
|
|
617
|
+
], 34)
|
|
618
|
+
];
|
|
619
|
+
}),
|
|
620
|
+
_: 1
|
|
621
|
+
}, 16, ["button-label", "button-secondary-label", "disable-apply-button", "disable-secondary-button", "only-slot", "tooltip-position", "tooltip-text"]);
|
|
622
|
+
};
|
|
623
|
+
}
|
|
624
|
+
}), St = /* @__PURE__ */ le(Al, [["__scopeId", "data-v-f10e25d2"]]), Tl = Q({
|
|
625
|
+
name: "bento-date-filter",
|
|
626
|
+
components: {
|
|
627
|
+
BentoBaseFilter: Be,
|
|
628
|
+
BentoDatePicker: rl,
|
|
629
|
+
BentoDivider: Ye,
|
|
630
|
+
Calendar: sl
|
|
631
|
+
},
|
|
632
|
+
props: {
|
|
633
|
+
/**
|
|
634
|
+
* Disables the filter from being interacted with.
|
|
635
|
+
*/
|
|
636
|
+
disabled: { type: Boolean, default: !1 },
|
|
637
|
+
isDateInput: { type: Boolean, default: !0 },
|
|
638
|
+
/**
|
|
639
|
+
* Default value of the filter to reset to.
|
|
640
|
+
*/
|
|
641
|
+
defaultValue: { type: Date, default: null },
|
|
642
|
+
/**
|
|
643
|
+
* Filter name/key referencing the actual property name in the data set.
|
|
644
|
+
* Should be unique per filter bar.
|
|
645
|
+
*/
|
|
646
|
+
field: { type: String, required: !0 },
|
|
647
|
+
/**
|
|
648
|
+
* Label text to be displayed
|
|
649
|
+
*/
|
|
650
|
+
label: { type: String, required: !0 },
|
|
651
|
+
/**
|
|
652
|
+
* Renders the base filter's slot content only - leaving out the button and the popover.
|
|
653
|
+
* Used for the allFiltersModal component.
|
|
654
|
+
*/
|
|
655
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
656
|
+
/**
|
|
657
|
+
* List of options that are needed to setup the filter
|
|
658
|
+
* Available options:
|
|
659
|
+
* - firstDayOfWeek: Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
|
|
660
|
+
* - isDateDisabled: Indicate if a date should be disabled or not
|
|
661
|
+
* - tooltipPosition: The position of the tooltip attached to the filter button
|
|
662
|
+
* - tooltipText: The content of the tooltip attached to the filter button
|
|
663
|
+
*/
|
|
664
|
+
options: {
|
|
665
|
+
type: Object,
|
|
666
|
+
default: void 0
|
|
667
|
+
},
|
|
668
|
+
/**
|
|
669
|
+
* Current value of the filter
|
|
670
|
+
*/
|
|
671
|
+
value: { type: Date, default: void 0 }
|
|
672
|
+
},
|
|
673
|
+
emits: [D.INPUT, D.UPDATE],
|
|
674
|
+
setup(e, { emit: n }) {
|
|
675
|
+
const { locale: l } = pe(void 0), s = ht(), { internalFilterValue: t, isSecondaryButtonDisabled: o, isApplyButtonDisabled: d } = he(
|
|
676
|
+
te(e, "value"),
|
|
677
|
+
te(e, "defaultValue")
|
|
678
|
+
), a = p(
|
|
679
|
+
() => {
|
|
680
|
+
var _;
|
|
681
|
+
return e.value ? ge(e.value, "dd MMM, yyyy", {
|
|
682
|
+
locale: s[(_ = l.value) == null ? void 0 : _.substring(0, 2)] || s.enUS
|
|
683
|
+
}) : null;
|
|
684
|
+
}
|
|
685
|
+
), i = p(() => e.label), v = p(() => a.value), b = () => {
|
|
686
|
+
n(D.UPDATE, { ...e, value: t.value });
|
|
687
|
+
}, A = () => {
|
|
688
|
+
t.value = null, b();
|
|
689
|
+
}, $ = () => {
|
|
690
|
+
t.value = e.defaultValue, b();
|
|
691
|
+
}, c = () => {
|
|
692
|
+
t.value = e.value;
|
|
693
|
+
}, g = (_) => {
|
|
694
|
+
t.value = _, n(D.INPUT, { ...e, value: t.value });
|
|
695
|
+
};
|
|
696
|
+
return {
|
|
697
|
+
// Values
|
|
698
|
+
internalFilterValue: t,
|
|
699
|
+
isApplyButtonDisabled: d,
|
|
700
|
+
isSecondaryButtonDisabled: o,
|
|
701
|
+
buttonLabel: i,
|
|
702
|
+
buttonSecondaryLabel: v,
|
|
703
|
+
// Events
|
|
704
|
+
clearFilter: A,
|
|
705
|
+
onDateSelected: g,
|
|
706
|
+
openFilter: c,
|
|
707
|
+
updateFilter: b,
|
|
708
|
+
resetFilter: $,
|
|
709
|
+
onDateInputSelected: (_) => {
|
|
710
|
+
t.value = _, g(_), b();
|
|
711
|
+
}
|
|
712
|
+
};
|
|
713
|
+
}
|
|
714
|
+
}), Il = { class: "b-date-filter" };
|
|
715
|
+
function _l(e, n, l, s, t, o) {
|
|
716
|
+
var b, A;
|
|
717
|
+
const d = N("bento-date-picker"), a = N("bento-divider"), i = N("calendar"), v = N("bento-base-filter");
|
|
718
|
+
return F(), w(v, {
|
|
719
|
+
"button-label": e.buttonLabel,
|
|
720
|
+
"button-secondary-label": e.buttonSecondaryLabel,
|
|
721
|
+
disabled: e.disabled,
|
|
722
|
+
"default-value": e.defaultValue,
|
|
723
|
+
"disable-apply-button": e.isApplyButtonDisabled,
|
|
724
|
+
"disable-secondary-button": e.isSecondaryButtonDisabled,
|
|
725
|
+
field: e.field,
|
|
726
|
+
label: e.label,
|
|
727
|
+
"only-slot": e.onlySlot,
|
|
728
|
+
"tooltip-position": (b = e.options) == null ? void 0 : b.tooltipPosition,
|
|
729
|
+
"tooltip-text": (A = e.options) == null ? void 0 : A.tooltipText,
|
|
730
|
+
"fit-content": "",
|
|
731
|
+
onApply: e.updateFilter,
|
|
732
|
+
onClear: e.clearFilter,
|
|
733
|
+
onOpen: e.openFilter,
|
|
734
|
+
onReset: e.resetFilter
|
|
735
|
+
}, {
|
|
736
|
+
default: C(() => {
|
|
737
|
+
var $, c, g, P, _, U;
|
|
738
|
+
return [
|
|
739
|
+
e.onlySlot ? (F(), w(d, {
|
|
740
|
+
key: 0,
|
|
741
|
+
value: e.internalFilterValue,
|
|
742
|
+
"first-day-of-week": ($ = e.options) == null ? void 0 : $.firstDayOfWeek,
|
|
743
|
+
"is-date-disabled": (c = e.options) == null ? void 0 : c.isDateDisabled,
|
|
744
|
+
variant: (g = e.options) == null ? void 0 : g.variant,
|
|
745
|
+
disabled: e.disabled,
|
|
746
|
+
onInput: e.onDateInputSelected
|
|
747
|
+
}, null, 8, ["value", "first-day-of-week", "is-date-disabled", "variant", "disabled", "onInput"])) : (F(), G($e, { key: 1 }, [
|
|
748
|
+
R(a, { class: "b-date-filter__divider" }),
|
|
749
|
+
W("div", Il, [
|
|
750
|
+
R(i, {
|
|
751
|
+
"first-day-of-week": (P = e.options) == null ? void 0 : P.firstDayOfWeek,
|
|
752
|
+
"is-date-disabled": (_ = e.options) == null ? void 0 : _.isDateDisabled,
|
|
753
|
+
"number-of-months": 1,
|
|
754
|
+
value: e.internalFilterValue,
|
|
755
|
+
variant: (U = e.options) == null ? void 0 : U.variant,
|
|
756
|
+
onInput: e.onDateSelected
|
|
757
|
+
}, null, 8, ["first-day-of-week", "is-date-disabled", "value", "variant", "onInput"])
|
|
758
|
+
])
|
|
759
|
+
], 64))
|
|
760
|
+
];
|
|
761
|
+
}),
|
|
762
|
+
_: 1
|
|
763
|
+
}, 8, ["button-label", "button-secondary-label", "disabled", "default-value", "disable-apply-button", "disable-secondary-button", "field", "label", "only-slot", "tooltip-position", "tooltip-text", "onApply", "onClear", "onOpen", "onReset"]);
|
|
764
|
+
}
|
|
765
|
+
const Ct = /* @__PURE__ */ le(Tl, [["render", _l], ["__scopeId", "data-v-66a62c70"]]), lt = {
|
|
766
|
+
"en-US": {
|
|
767
|
+
apply: "Apply",
|
|
768
|
+
clear: "Clear",
|
|
769
|
+
reset: "Reset"
|
|
770
|
+
},
|
|
771
|
+
"ja-JP": {
|
|
772
|
+
apply: "適用",
|
|
773
|
+
clear: "クリア",
|
|
774
|
+
reset: "リセット"
|
|
775
|
+
},
|
|
776
|
+
"pt-BR": {
|
|
777
|
+
apply: "Aplicar",
|
|
778
|
+
clear: "Limpar",
|
|
779
|
+
reset: "Reiniciar"
|
|
780
|
+
}
|
|
781
|
+
}, $l = Q({
|
|
782
|
+
i18n: { messages: lt },
|
|
783
|
+
name: "bento-date-range-filter",
|
|
784
|
+
components: {
|
|
785
|
+
BentoBaseFilter: Be,
|
|
786
|
+
BentoButtonActions: Yt,
|
|
787
|
+
BentoDateRangePicker: ol,
|
|
788
|
+
BentoTypography: ve,
|
|
789
|
+
BentoDivider: Ye,
|
|
790
|
+
DateRangePickerCalendar: al
|
|
791
|
+
},
|
|
792
|
+
props: {
|
|
793
|
+
/**
|
|
794
|
+
* Disables the filter from being interacted with.
|
|
795
|
+
*/
|
|
796
|
+
disabled: { type: Boolean, default: !1 },
|
|
797
|
+
/**
|
|
798
|
+
* Default value of the filter to reset to.
|
|
799
|
+
*/
|
|
800
|
+
defaultValue: { type: Object, default: null },
|
|
801
|
+
/**
|
|
802
|
+
* Filter name/key referencing the actual property name in the data set.
|
|
803
|
+
* Should be unique per filter bar.
|
|
804
|
+
*/
|
|
805
|
+
field: { type: String, required: !0 },
|
|
806
|
+
/**
|
|
807
|
+
* Label text to be displayed
|
|
808
|
+
*/
|
|
809
|
+
label: { type: String, required: !0 },
|
|
810
|
+
/**
|
|
811
|
+
* Renders the base filter's slot content only - leaving out the button and the popover.
|
|
812
|
+
* Used for the allFiltersModal component.
|
|
813
|
+
*/
|
|
814
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
815
|
+
/**
|
|
816
|
+
* List of options that are needed to setup the filter
|
|
817
|
+
* Available options:
|
|
818
|
+
* - allowTimeInput: Allows user to enter time values in the form
|
|
819
|
+
* - firstDayOfWeek: Allows user to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
|
|
820
|
+
* - isDateDisabled: Indicate if a date should be disabled or not
|
|
821
|
+
* - maxRange: Set a maximum number of dates to be selectable by the range
|
|
822
|
+
* - numberOfMonths: Number of months rendered on pane
|
|
823
|
+
* - quickSelectRanges: An array that sets the custom range dropdown items. @see BentoDateRangePicker
|
|
824
|
+
* - showEndDateOnOpen: Upon opening date range picker, end date's month will be pre-selected.
|
|
825
|
+
* - granularities: A list of available granularities.
|
|
826
|
+
* - variant: The type of calendar to display. Defaults to showing days.
|
|
827
|
+
* - tooltipPosition: The position of the tooltip attached to the filter button
|
|
828
|
+
* - tooltipText: The content of the tooltip attached to the filter button
|
|
829
|
+
*/
|
|
830
|
+
options: {
|
|
831
|
+
type: Object,
|
|
832
|
+
default: void 0
|
|
833
|
+
},
|
|
834
|
+
/**
|
|
835
|
+
* Current value of the filter
|
|
836
|
+
*/
|
|
837
|
+
value: {
|
|
838
|
+
type: Object,
|
|
839
|
+
default: () => ({ startDate: void 0, endDate: void 0 })
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
emits: [D.INPUT, D.UPDATE],
|
|
843
|
+
setup(e, { emit: n }) {
|
|
844
|
+
var f, r, O, Y;
|
|
845
|
+
const { locale: l, t: s } = pe({ messages: lt }), t = ht(), { internalFilterValue: o, isSecondaryButtonDisabled: d, isApplyButtonDisabled: a } = he(
|
|
846
|
+
te(e, "value"),
|
|
847
|
+
te(e, "defaultValue")
|
|
848
|
+
), i = K(!1), v = p(() => {
|
|
849
|
+
var u;
|
|
850
|
+
return ((u = e == null ? void 0 : e.options) == null ? void 0 : u.quickSelectRanges) && e.options.quickSelectRanges.map((L) => {
|
|
851
|
+
const y = L.data.endDate ? void 0 : new Date(Date.now()).getTime() - L.data.startDate.getTime();
|
|
852
|
+
return {
|
|
853
|
+
...L,
|
|
854
|
+
data: {
|
|
855
|
+
...L.data,
|
|
856
|
+
// Adding timeDifference to calculate an up-to-date endDate on range selection
|
|
857
|
+
timeDifference: y
|
|
858
|
+
}
|
|
859
|
+
};
|
|
860
|
+
});
|
|
861
|
+
}), b = (u) => {
|
|
862
|
+
var L;
|
|
863
|
+
return u ? ge(u, Ze.NUMERIC_DATE_YEAR_FIRST, {
|
|
864
|
+
locale: t[(L = l.value) == null ? void 0 : L.substring(0, 2)] || t.enUS
|
|
865
|
+
}) : void 0;
|
|
866
|
+
}, A = (u) => {
|
|
867
|
+
var L;
|
|
868
|
+
return u ? ge(u, Ze.HOUR_MINUTE_SECONDS, {
|
|
869
|
+
locale: t[(L = l.value) == null ? void 0 : L.substring(0, 2)] || t.enUS
|
|
870
|
+
}) : "";
|
|
871
|
+
}, $ = K(null), c = K(!1), g = wt({
|
|
872
|
+
startDate: b((f = e.value) == null ? void 0 : f.startDate),
|
|
873
|
+
endDate: b((r = e.value) == null ? void 0 : r.endDate),
|
|
874
|
+
startTime: A((O = e.value) == null ? void 0 : O.startDate),
|
|
875
|
+
endTime: A((Y = e.value) == null ? void 0 : Y.endDate)
|
|
876
|
+
});
|
|
877
|
+
ie(
|
|
878
|
+
() => e.value,
|
|
879
|
+
() => {
|
|
880
|
+
var u, L, y, m;
|
|
881
|
+
g.startDate = b((u = e.value) == null ? void 0 : u.startDate), g.endDate = b((L = e.value) == null ? void 0 : L.endDate), g.startTime = A((y = e.value) == null ? void 0 : y.startDate), g.endTime = A((m = e.value) == null ? void 0 : m.endDate);
|
|
882
|
+
}
|
|
883
|
+
);
|
|
884
|
+
function P(u) {
|
|
885
|
+
return (u == null ? void 0 : u.length) !== void 0;
|
|
886
|
+
}
|
|
887
|
+
const _ = (u) => {
|
|
888
|
+
var L, y, m, k, q, ae, ue, be, fe, Fe;
|
|
889
|
+
if (!u || !(u != null && u.startDate) && !u.endDate)
|
|
890
|
+
return null;
|
|
891
|
+
if (P((L = e.options) == null ? void 0 : L.quickSelectRanges) && ((m = (y = e.options) == null ? void 0 : y.quickSelectRanges) == null ? void 0 : m.length) > 0) {
|
|
892
|
+
const Ie = (q = (k = e.options) == null ? void 0 : k.quickSelectRanges) == null ? void 0 : q.find(({ value: Le, data: oe }) => u ? u.range ? Le === u.range : !u.startDate || !u.endDate ? !1 : oe != null && oe.endDate ? He(oe == null ? void 0 : oe.startDate, u.startDate) && He(oe == null ? void 0 : oe.endDate, u.endDate) : He(oe == null ? void 0 : oe.startDate, u.startDate) && nl(u.endDate) : !1);
|
|
893
|
+
if (Ie)
|
|
894
|
+
return Ie.label;
|
|
895
|
+
}
|
|
896
|
+
return !u.startDate || !u.endDate ? null : il(u.startDate, u.endDate) && ((ae = e == null ? void 0 : e.options) != null && ae.allowTimeInput) ? `${ge(u.startDate, "dd MMM, yyyy HH:mm:ss", {
|
|
897
|
+
locale: t[(ue = l.value) == null ? void 0 : ue.substring(0, 2)] || t.enUS
|
|
898
|
+
})} - ${ge(u.endDate, "HH:mm:ss", {
|
|
899
|
+
locale: t[(be = l.value) == null ? void 0 : be.substring(0, 2)] || t.enUS
|
|
900
|
+
})}` : `${ge(u.startDate, "dd MMM, yyyy", {
|
|
901
|
+
locale: t[(fe = l.value) == null ? void 0 : fe.substring(0, 2)] || t.enUS
|
|
902
|
+
})} - ${ge(u.endDate, "dd MMM, yyyy", {
|
|
903
|
+
locale: t[(Fe = l.value) == null ? void 0 : Fe.substring(0, 2)] || t.enUS
|
|
904
|
+
})}`;
|
|
905
|
+
}, U = K(_(e.value)), H = p(() => e.label), E = () => {
|
|
906
|
+
$.value.closePopover();
|
|
907
|
+
const { onlySlot: u, ...L } = e;
|
|
908
|
+
n(D.UPDATE, { ...L, value: o.value });
|
|
909
|
+
}, j = () => {
|
|
910
|
+
o.value = void 0, E();
|
|
911
|
+
}, h = () => {
|
|
912
|
+
o.value = e.defaultValue, E();
|
|
913
|
+
}, V = () => {
|
|
914
|
+
o.value = e.value;
|
|
915
|
+
}, M = () => {
|
|
916
|
+
var u, L, y, m;
|
|
917
|
+
o.value = e.value, i.value = !1, g.startDate = b((u = e.value) == null ? void 0 : u.startDate), g.endDate = b((L = e.value) == null ? void 0 : L.endDate), g.startTime = A((y = e.value) == null ? void 0 : y.startDate), g.endTime = A((m = e.value) == null ? void 0 : m.endDate);
|
|
918
|
+
}, I = (u) => {
|
|
919
|
+
i.value = !1, o.value = u, g.startDate = b(u.startDate), g.endDate = b(u.endDate), n(D.INPUT, { ...e, value: o.value });
|
|
920
|
+
}, B = (u) => {
|
|
921
|
+
u != null && u.startDate && (u != null && u.endDate) && (o.value = u, g.startDate = b(u.startDate), g.endDate = b(u.endDate), n(D.INPUT, { ...e, value: o.value }));
|
|
922
|
+
}, J = (u) => {
|
|
923
|
+
I(u), n(D.INPUT, { ...e, value: o.value });
|
|
924
|
+
}, z = p(
|
|
925
|
+
() => [
|
|
926
|
+
{
|
|
927
|
+
title: s("apply"),
|
|
928
|
+
event: E,
|
|
929
|
+
disabled: i.value || c.value || a.value
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
title: e.defaultValue ? s("reset") : s("clear"),
|
|
933
|
+
event: e.defaultValue ? h : j,
|
|
934
|
+
disabled: c.value && d.value
|
|
935
|
+
}
|
|
936
|
+
]
|
|
937
|
+
), ee = () => {
|
|
938
|
+
c.value = !0, o.value = { startDate: void 0, endDate: void 0 }, n(D.INPUT, { ...e, value: o.value });
|
|
939
|
+
}, S = (u) => {
|
|
940
|
+
c.value = !1, u.startTime && (g.startTime = u.startTime), u.endTime && (g.endTime = u.endTime);
|
|
941
|
+
};
|
|
942
|
+
return ie(
|
|
943
|
+
() => e.value,
|
|
944
|
+
(u) => {
|
|
945
|
+
U.value = _(u);
|
|
946
|
+
},
|
|
947
|
+
{ deep: !0 }
|
|
948
|
+
), {
|
|
949
|
+
// Refs
|
|
950
|
+
baseFilter: $,
|
|
951
|
+
// Values
|
|
952
|
+
actions: z,
|
|
953
|
+
formData: g,
|
|
954
|
+
internalFilterValue: o,
|
|
955
|
+
isApplyButtonDisabled: a,
|
|
956
|
+
isSecondaryButtonDisabled: d,
|
|
957
|
+
isSelectingDate: i,
|
|
958
|
+
buttonLabel: H,
|
|
959
|
+
buttonSecondaryLabel: U,
|
|
960
|
+
adjustedQuickSelectRanges: v,
|
|
961
|
+
// Events
|
|
962
|
+
onCancel: M,
|
|
963
|
+
onDateSelected: I,
|
|
964
|
+
openFilter: V,
|
|
965
|
+
clearFilter: j,
|
|
966
|
+
resetFilter: h,
|
|
967
|
+
updateFilter: E,
|
|
968
|
+
onDatePickerRangeError: ee,
|
|
969
|
+
onDatePickerRangeFormDateInputUpdate: S,
|
|
970
|
+
onDateInputSelected: J,
|
|
971
|
+
onRangeSelectorInput: B
|
|
972
|
+
};
|
|
973
|
+
}
|
|
974
|
+
}), Pl = {
|
|
975
|
+
key: 1,
|
|
976
|
+
class: "b-date-range-filter"
|
|
977
|
+
};
|
|
978
|
+
function El(e, n, l, s, t, o) {
|
|
979
|
+
var $, c;
|
|
980
|
+
const d = N("bento-date-range-picker"), a = N("bento-typography"), i = N("bento-divider"), v = N("bento-button-actions"), b = N("date-range-picker-calendar"), A = N("bento-base-filter");
|
|
981
|
+
return F(), w(A, {
|
|
982
|
+
ref: "baseFilter",
|
|
983
|
+
class: "b-base-filter-date-range-filter",
|
|
984
|
+
"button-label": e.buttonLabel,
|
|
985
|
+
"button-secondary-label": e.buttonSecondaryLabel,
|
|
986
|
+
controlled: !e.onlySlot,
|
|
987
|
+
disabled: e.disabled,
|
|
988
|
+
"disable-apply-button": e.isApplyButtonDisabled,
|
|
989
|
+
"disable-secondary-button": e.isSecondaryButtonDisabled,
|
|
990
|
+
"default-value": e.defaultValue,
|
|
991
|
+
field: e.field,
|
|
992
|
+
label: e.label,
|
|
993
|
+
"only-slot": e.onlySlot,
|
|
994
|
+
"tooltip-position": ($ = e.options) == null ? void 0 : $.tooltipPosition,
|
|
995
|
+
"tooltip-text": (c = e.options) == null ? void 0 : c.tooltipText,
|
|
996
|
+
"fit-content": "",
|
|
997
|
+
onOpen: e.openFilter,
|
|
998
|
+
onClear: e.clearFilter,
|
|
999
|
+
onReset: e.resetFilter,
|
|
1000
|
+
onCancel: e.onCancel
|
|
1001
|
+
}, {
|
|
1002
|
+
default: C(() => {
|
|
1003
|
+
var g, P, _, U, H, E, j, h, V, M, I, B, J, z, ee, S, f, r, O, Y, u;
|
|
1004
|
+
return [
|
|
1005
|
+
e.onlySlot ? (F(), w(d, {
|
|
1006
|
+
key: 0,
|
|
1007
|
+
"allow-time-input": (g = e.options) == null ? void 0 : g.allowTimeInput,
|
|
1008
|
+
value: e.internalFilterValue,
|
|
1009
|
+
"first-day-of-week": (P = e.options) == null ? void 0 : P.firstDayOfWeek,
|
|
1010
|
+
"is-date-disabled": (_ = e.options) == null ? void 0 : _.isDateDisabled,
|
|
1011
|
+
"number-of-months": (U = e.options) == null ? void 0 : U.numberOfMonths,
|
|
1012
|
+
"quick-select-ranges": (H = e.options) == null ? void 0 : H.quickSelectRanges,
|
|
1013
|
+
variant: (E = e.options) == null ? void 0 : E.variant,
|
|
1014
|
+
disabled: e.disabled,
|
|
1015
|
+
granularities: (j = e.options) == null ? void 0 : j.granularities,
|
|
1016
|
+
"max-range": (h = e.options) == null ? void 0 : h.maxRange,
|
|
1017
|
+
min: (V = e.options) == null ? void 0 : V.min,
|
|
1018
|
+
max: (M = e.options) == null ? void 0 : M.max,
|
|
1019
|
+
"date-form-data": e.formData,
|
|
1020
|
+
"show-end-date-on-open": (I = e.options) == null ? void 0 : I.showEndDateOnOpen,
|
|
1021
|
+
onInput: e.onDateInputSelected
|
|
1022
|
+
}, null, 8, ["allow-time-input", "value", "first-day-of-week", "is-date-disabled", "number-of-months", "quick-select-ranges", "variant", "disabled", "granularities", "max-range", "min", "max", "date-form-data", "show-end-date-on-open", "onInput"])) : (F(), G("div", Pl, [
|
|
1023
|
+
R(b, {
|
|
1024
|
+
"allow-time-input": (B = e.options) == null ? void 0 : B.allowTimeInput,
|
|
1025
|
+
"first-day-of-week": (J = e.options) == null ? void 0 : J.firstDayOfWeek,
|
|
1026
|
+
"is-date-disabled": (z = e.options) == null ? void 0 : z.isDateDisabled,
|
|
1027
|
+
granularities: (ee = e.options) == null ? void 0 : ee.granularities,
|
|
1028
|
+
"max-range": (S = e.options) == null ? void 0 : S.maxRange,
|
|
1029
|
+
min: (f = e.options) == null ? void 0 : f.min,
|
|
1030
|
+
max: (r = e.options) == null ? void 0 : r.max,
|
|
1031
|
+
"number-of-months": (O = e.options) == null ? void 0 : O.numberOfMonths,
|
|
1032
|
+
"quick-select-ranges": e.adjustedQuickSelectRanges,
|
|
1033
|
+
value: e.internalFilterValue,
|
|
1034
|
+
"date-form-data": e.formData,
|
|
1035
|
+
"show-end-date-on-open": (Y = e.options) == null ? void 0 : Y.showEndDateOnOpen,
|
|
1036
|
+
variant: (u = e.options) == null ? void 0 : u.variant,
|
|
1037
|
+
onInput: e.onDateSelected,
|
|
1038
|
+
onCustomRange: e.onRangeSelectorInput,
|
|
1039
|
+
onError: e.onDatePickerRangeError,
|
|
1040
|
+
onFormDate: e.onDatePickerRangeFormDateInputUpdate,
|
|
1041
|
+
onStartDateSelected: n[0] || (n[0] = (L) => e.isSelectingDate = !0)
|
|
1042
|
+
}, {
|
|
1043
|
+
title: C(() => [
|
|
1044
|
+
R(a, {
|
|
1045
|
+
strongest: "",
|
|
1046
|
+
variant: "body",
|
|
1047
|
+
el: "span"
|
|
1048
|
+
}, {
|
|
1049
|
+
default: C(() => [
|
|
1050
|
+
X(x(e.label), 1)
|
|
1051
|
+
]),
|
|
1052
|
+
_: 1
|
|
1053
|
+
})
|
|
1054
|
+
]),
|
|
1055
|
+
actions: C(() => [
|
|
1056
|
+
R(i, { class: "b-date-range-filter__divider" }),
|
|
1057
|
+
R(v, {
|
|
1058
|
+
class: "b-date-range-filter__actions",
|
|
1059
|
+
actions: e.actions,
|
|
1060
|
+
layout: "space-between"
|
|
1061
|
+
}, null, 8, ["actions"])
|
|
1062
|
+
]),
|
|
1063
|
+
_: 1
|
|
1064
|
+
}, 8, ["allow-time-input", "first-day-of-week", "is-date-disabled", "granularities", "max-range", "min", "max", "number-of-months", "quick-select-ranges", "value", "date-form-data", "show-end-date-on-open", "variant", "onInput", "onCustomRange", "onError", "onFormDate"])
|
|
1065
|
+
]))
|
|
1066
|
+
];
|
|
1067
|
+
}),
|
|
1068
|
+
_: 1
|
|
1069
|
+
}, 8, ["button-label", "button-secondary-label", "controlled", "disabled", "disable-apply-button", "disable-secondary-button", "default-value", "field", "label", "only-slot", "tooltip-position", "tooltip-text", "onOpen", "onClear", "onReset", "onCancel"]);
|
|
1070
|
+
}
|
|
1071
|
+
const Bt = /* @__PURE__ */ le($l, [["render", El], ["__scopeId", "data-v-51244862"]]), Dt = {
|
|
1072
|
+
"en-US": {
|
|
1073
|
+
all: "All",
|
|
1074
|
+
noFiltersMatchThisSearch: "No filters match this search",
|
|
1075
|
+
searchFilter: "Search {filter}"
|
|
1076
|
+
},
|
|
1077
|
+
"ja-JP": {
|
|
1078
|
+
all: "すべて"
|
|
1079
|
+
},
|
|
1080
|
+
"pt-BR": {
|
|
1081
|
+
all: "Todos"
|
|
1082
|
+
}
|
|
1083
|
+
}, Ll = { class: "b-select-filter-button__search-bar-wrapper" }, Ul = {
|
|
1084
|
+
key: 0,
|
|
1085
|
+
class: "b-select-filter-button__search-bar"
|
|
1086
|
+
}, Ol = { class: "b-select-filter-button__divider" }, Rl = {
|
|
1087
|
+
i18n: { messages: Dt }
|
|
1088
|
+
}, wl = /* @__PURE__ */ Q({
|
|
1089
|
+
...Rl,
|
|
1090
|
+
__name: "select-filter-button",
|
|
1091
|
+
props: {
|
|
1092
|
+
/**
|
|
1093
|
+
* Disables the filter from being interacted with.
|
|
1094
|
+
*/
|
|
1095
|
+
disabled: { type: Boolean, default: !1 },
|
|
1096
|
+
/**
|
|
1097
|
+
* Default value of the filter to reset to.
|
|
1098
|
+
*
|
|
1099
|
+
*/
|
|
1100
|
+
defaultValue: {
|
|
1101
|
+
type: [String, Number, Array],
|
|
1102
|
+
default: null
|
|
1103
|
+
},
|
|
1104
|
+
/**
|
|
1105
|
+
* Filter name/key referencing the actual property name in the data set.
|
|
1106
|
+
* Should be unique per filter bar.
|
|
1107
|
+
*/
|
|
1108
|
+
field: { type: String, required: !0 },
|
|
1109
|
+
/**
|
|
1110
|
+
* Label text to be displayed
|
|
1111
|
+
*/
|
|
1112
|
+
label: { type: String, required: !0 },
|
|
1113
|
+
/**
|
|
1114
|
+
* Renders the base filter's slot content only - leaving out the button and the popover.
|
|
1115
|
+
* Used for the allFiltersModal component.
|
|
1116
|
+
*/
|
|
1117
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
1118
|
+
/**
|
|
1119
|
+
* List of options that are needed to setup the filter
|
|
1120
|
+
* Available options:
|
|
1121
|
+
* - multiple: If "true", the user will be able to select multiple items.
|
|
1122
|
+
* - listboxItems: The option elements to populate the filter with.
|
|
1123
|
+
*
|
|
1124
|
+
* @default undefined
|
|
1125
|
+
*/
|
|
1126
|
+
options: {
|
|
1127
|
+
type: Object,
|
|
1128
|
+
default: void 0
|
|
1129
|
+
},
|
|
1130
|
+
/**
|
|
1131
|
+
* Current value of the filter
|
|
1132
|
+
*
|
|
1133
|
+
* @default undefined
|
|
1134
|
+
*/
|
|
1135
|
+
value: {
|
|
1136
|
+
type: [String, Number, Array, Object],
|
|
1137
|
+
default: void 0
|
|
1138
|
+
}
|
|
1139
|
+
},
|
|
1140
|
+
emits: ["input", "update"],
|
|
1141
|
+
setup(e, { emit: n }) {
|
|
1142
|
+
var ee, S;
|
|
1143
|
+
const l = Ne(), s = n, t = e, { t: o } = pe({ messages: Dt }), d = K(""), a = te(t, "options"), i = K(t.options.listboxItems ?? []), { cachedSelectedListboxOptions: v, setCachedValues: b, resetCache: A } = Ge(
|
|
1144
|
+
i,
|
|
1145
|
+
te(t, "value"),
|
|
1146
|
+
te(a.value, "multiple")
|
|
1147
|
+
), { cachedSelectedListboxOptions: $ } = Ge(
|
|
1148
|
+
i,
|
|
1149
|
+
te(t, "defaultValue"),
|
|
1150
|
+
te(a.value, "multiple")
|
|
1151
|
+
), { internalFilterValue: c, isSecondaryButtonDisabled: g, isApplyButtonDisabled: P } = he(v, $);
|
|
1152
|
+
ie(a, () => {
|
|
1153
|
+
i.value = a.value.listboxItems ?? [];
|
|
1154
|
+
});
|
|
1155
|
+
const _ = mt(
|
|
1156
|
+
d,
|
|
1157
|
+
i,
|
|
1158
|
+
(S = (ee = t.options) == null ? void 0 : ee.search) == null ? void 0 : S.searchEvent
|
|
1159
|
+
), U = p(() => o("noFiltersMatchThisSearch")), H = p(() => t.label), E = p(() => {
|
|
1160
|
+
var O, Y, u, L, y;
|
|
1161
|
+
const f = !((O = t == null ? void 0 : t.options) != null && O.multiple) && (t == null ? void 0 : t.value), r = ((Y = t == null ? void 0 : t.options) == null ? void 0 : Y.multiple) && Array.isArray(t.value) && t.value.length === 1;
|
|
1162
|
+
if (f || r) {
|
|
1163
|
+
if ((u = t.options) != null && u.enableValueLabelPair) {
|
|
1164
|
+
const q = ((L = c.value) == null ? void 0 : L.length) > 0 ? c.value[0].label : t.value;
|
|
1165
|
+
return Ce(q, 12);
|
|
1166
|
+
}
|
|
1167
|
+
let k = (y = t.options.listboxItems.flatMap((q) => q.items ? q.items : q).find(
|
|
1168
|
+
({ value: q }) => {
|
|
1169
|
+
var ae;
|
|
1170
|
+
return Array.isArray(t.value) ? (ae = t == null ? void 0 : t.value) == null ? void 0 : ae.includes(q) : q === t.value;
|
|
1171
|
+
}
|
|
1172
|
+
)) == null ? void 0 : y.label;
|
|
1173
|
+
return !k && t.value && (k = t.value[0]), Ce(k, 12);
|
|
1174
|
+
}
|
|
1175
|
+
return null;
|
|
1176
|
+
}), j = p(() => qe(`filter-listbox-${t.field}`)), h = (f) => {
|
|
1177
|
+
var u, L, y;
|
|
1178
|
+
c.value = f;
|
|
1179
|
+
const { onlySlot: r, ...O } = t;
|
|
1180
|
+
if ((u = t.options) != null && u.multiple) {
|
|
1181
|
+
let m;
|
|
1182
|
+
(L = t.options) != null && L.enableValueLabelPair ? m = f.length ? c.value : null : m = f.length ? c.value.map(({ value: k }) => k) : null, s(D.INPUT, { ...O, value: m });
|
|
1183
|
+
return;
|
|
1184
|
+
}
|
|
1185
|
+
let Y;
|
|
1186
|
+
(y = t.options) != null && y.enableValueLabelPair ? Y = f.length ? f[0] : null : Y = f.length ? f[0].value : null, s(D.INPUT, { ...O, value: Y });
|
|
1187
|
+
}, V = () => {
|
|
1188
|
+
var Y, u, L, y, m, k;
|
|
1189
|
+
const { onlySlot: f, ...r } = t;
|
|
1190
|
+
if (t.options.multiple) {
|
|
1191
|
+
c.value && ((Y = c.value) == null ? void 0 : Y.length) === 0 && (c.value = t.defaultValue !== null ? $.value : void 0);
|
|
1192
|
+
let q;
|
|
1193
|
+
(u = t.options) != null && u.enableValueLabelPair ? q = (L = c.value) != null && L.length ? c.value : null : q = (y = c.value) != null && y.length ? (m = c.value) == null ? void 0 : m.map(({ value: ae }) => ae) : null, s(D.UPDATE, {
|
|
1194
|
+
...r,
|
|
1195
|
+
value: q
|
|
1196
|
+
});
|
|
1197
|
+
return;
|
|
1198
|
+
}
|
|
1199
|
+
let O;
|
|
1200
|
+
(k = t.options) != null && k.enableValueLabelPair ? O = c.value.length ? c.value[0] : void 0 : O = c.value.length ? c.value[0].value : void 0, s(D.UPDATE, { ...r, value: O });
|
|
1201
|
+
}, M = () => {
|
|
1202
|
+
var f, r;
|
|
1203
|
+
c.value = v.value, (r = (f = t.options) == null ? void 0 : f.onOpen) == null || r.call(f);
|
|
1204
|
+
}, I = () => {
|
|
1205
|
+
d.value && (d.value = "");
|
|
1206
|
+
}, B = () => {
|
|
1207
|
+
b($.value), c.value = $.value, V();
|
|
1208
|
+
}, J = () => {
|
|
1209
|
+
A(), c.value = [], V();
|
|
1210
|
+
}, z = p(() => {
|
|
1211
|
+
var O, Y;
|
|
1212
|
+
if (t.value == null || !t.options.multiple)
|
|
1213
|
+
return null;
|
|
1214
|
+
const f = (O = t.options.listboxItems) == null ? void 0 : O.reduce((u, L) => {
|
|
1215
|
+
var y;
|
|
1216
|
+
return u += (y = L == null ? void 0 : L.items) != null && y.length ? L.items.length : 1, u;
|
|
1217
|
+
}, 0), r = (Y = t.value) == null ? void 0 : Y.length;
|
|
1218
|
+
return r === 1 ? null : r === f ? o("all") : r;
|
|
1219
|
+
});
|
|
1220
|
+
return (f, r) => {
|
|
1221
|
+
var O, Y;
|
|
1222
|
+
return F(), w(T(Be), {
|
|
1223
|
+
"applied-filters-count": z.value,
|
|
1224
|
+
"button-label": H.value,
|
|
1225
|
+
"button-secondary-label": E.value,
|
|
1226
|
+
disabled: e.disabled,
|
|
1227
|
+
"disable-apply-button": T(P),
|
|
1228
|
+
"disable-secondary-button": T(g),
|
|
1229
|
+
"default-value": e.defaultValue,
|
|
1230
|
+
label: e.label,
|
|
1231
|
+
field: e.field,
|
|
1232
|
+
"only-slot": !1,
|
|
1233
|
+
"tooltip-position": (O = e.options) == null ? void 0 : O.tooltipPosition,
|
|
1234
|
+
"tooltip-text": (Y = e.options) == null ? void 0 : Y.tooltipText,
|
|
1235
|
+
value: e.value,
|
|
1236
|
+
onApply: V,
|
|
1237
|
+
onClear: J,
|
|
1238
|
+
onReset: B,
|
|
1239
|
+
onOpen: M,
|
|
1240
|
+
onClose: I
|
|
1241
|
+
}, {
|
|
1242
|
+
default: C(() => {
|
|
1243
|
+
var u, L, y, m, k, q, ae, ue, be, fe, Fe, Ie, Le, oe, ze;
|
|
1244
|
+
return [
|
|
1245
|
+
W("div", Ll, [
|
|
1246
|
+
((u = e.options) == null ? void 0 : u.dynamicFiltering) ?? !0 ? (F(), G("div", Ul, [
|
|
1247
|
+
R(ke, {
|
|
1248
|
+
"debounce-time": (y = (L = e.options) == null ? void 0 : L.search) == null ? void 0 : y.debounceTime,
|
|
1249
|
+
value: d.value,
|
|
1250
|
+
"input-field-aria-label": T(o)("searchFilter", { filter: e.label.toLocaleLowerCase() }),
|
|
1251
|
+
onInput: r[0] || (r[0] = (Me) => d.value = Me)
|
|
1252
|
+
}, null, 8, ["debounce-time", "value", "input-field-aria-label"])
|
|
1253
|
+
])) : Z("", !0),
|
|
1254
|
+
W("div", Ol, [
|
|
1255
|
+
R(T(Ye))
|
|
1256
|
+
])
|
|
1257
|
+
]),
|
|
1258
|
+
R(T(xt), {
|
|
1259
|
+
id: j.value,
|
|
1260
|
+
"aria-label": e.label,
|
|
1261
|
+
class: "b-select-filter-button__wrapper",
|
|
1262
|
+
"component-loading": (m = e.options) == null ? void 0 : m.loading,
|
|
1263
|
+
"empty-state": (k = e.options) == null ? void 0 : k.emptyState,
|
|
1264
|
+
"has-more-items": (ae = (q = e.options) == null ? void 0 : q.lazy) == null ? void 0 : ae.hasMoreItems,
|
|
1265
|
+
items: T(_),
|
|
1266
|
+
"is-option-disabled": (ue = e.options) == null ? void 0 : ue.isOptionDisabled,
|
|
1267
|
+
"lazy-load-type": (fe = (be = e.options) == null ? void 0 : be.lazy) == null ? void 0 : fe.lazyLoadType,
|
|
1268
|
+
loading: (Ie = (Fe = e.options) == null ? void 0 : Fe.lazy) == null ? void 0 : Ie.loading,
|
|
1269
|
+
multiple: (Le = e.options) == null ? void 0 : Le.multiple,
|
|
1270
|
+
"static-categories": (oe = e.options) == null ? void 0 : oe.staticCategories,
|
|
1271
|
+
"no-results-message": U.value,
|
|
1272
|
+
searching: !!d.value,
|
|
1273
|
+
"selected-value": T(c),
|
|
1274
|
+
"virtual-scroll": (ze = e.options) == null ? void 0 : ze.virtualScroll,
|
|
1275
|
+
onSelect: h,
|
|
1276
|
+
onSpacePressed: h,
|
|
1277
|
+
onEnterPressed: h,
|
|
1278
|
+
onShowMore: r[1] || (r[1] = (Me) => {
|
|
1279
|
+
var _e, Ue;
|
|
1280
|
+
return (Ue = (_e = e.options) == null ? void 0 : _e.lazy) == null ? void 0 : Ue.showMoreEvent();
|
|
1281
|
+
})
|
|
1282
|
+
}, Pe({ _: 2 }, [
|
|
1283
|
+
ye(T(l), (Me, _e) => ({
|
|
1284
|
+
name: _e,
|
|
1285
|
+
fn: C((Ue) => [
|
|
1286
|
+
ce(f.$slots, _e, Re(we(Ue)), void 0, !0)
|
|
1287
|
+
])
|
|
1288
|
+
}))
|
|
1289
|
+
]), 1032, ["id", "aria-label", "component-loading", "empty-state", "has-more-items", "items", "is-option-disabled", "lazy-load-type", "loading", "multiple", "static-categories", "no-results-message", "searching", "selected-value", "virtual-scroll"])
|
|
1290
|
+
];
|
|
1291
|
+
}),
|
|
1292
|
+
_: 3
|
|
1293
|
+
}, 8, ["applied-filters-count", "button-label", "button-secondary-label", "disabled", "disable-apply-button", "disable-secondary-button", "default-value", "label", "field", "tooltip-position", "tooltip-text", "value"]);
|
|
1294
|
+
};
|
|
1295
|
+
}
|
|
1296
|
+
}), kl = /* @__PURE__ */ le(wl, [["__scopeId", "data-v-425e708e"]]), At = {
|
|
1297
|
+
"en-US": {
|
|
1298
|
+
noFiltersMatchThisSearch: "No filters match this search"
|
|
1299
|
+
}
|
|
1300
|
+
}, Nl = {
|
|
1301
|
+
i18n: { messages: At },
|
|
1302
|
+
name: "select-filter-dropdown"
|
|
1303
|
+
}, Vl = /* @__PURE__ */ Q({
|
|
1304
|
+
...Nl,
|
|
1305
|
+
props: {
|
|
1306
|
+
/**
|
|
1307
|
+
* Disables the filter from being interacted with.
|
|
1308
|
+
*/
|
|
1309
|
+
disabled: { type: Boolean, default: !1 },
|
|
1310
|
+
/**
|
|
1311
|
+
* Default value of the filter to reset to.
|
|
1312
|
+
*
|
|
1313
|
+
*/
|
|
1314
|
+
defaultValue: {
|
|
1315
|
+
type: [String, Number, Array],
|
|
1316
|
+
default: null
|
|
1317
|
+
},
|
|
1318
|
+
/**
|
|
1319
|
+
* Filter name/key referencing the actual property name in the data set.
|
|
1320
|
+
* Should be unique per filter bar.
|
|
1321
|
+
*/
|
|
1322
|
+
field: { type: String, required: !0 },
|
|
1323
|
+
/**
|
|
1324
|
+
* Label text to be displayed
|
|
1325
|
+
*/
|
|
1326
|
+
label: { type: String, required: !0 },
|
|
1327
|
+
/**
|
|
1328
|
+
* Renders the base filter's slot content only - leaving out the button and the popover.
|
|
1329
|
+
* Used for the allFiltersModal component.
|
|
1330
|
+
*
|
|
1331
|
+
*/
|
|
1332
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
1333
|
+
/**
|
|
1334
|
+
* List of options that are needed to setup the filter
|
|
1335
|
+
* Available options:
|
|
1336
|
+
* - multiple: If "true", the user will be able to select multiple items.
|
|
1337
|
+
* - listboxItems: The option elements to populate the filter with.
|
|
1338
|
+
*
|
|
1339
|
+
* @default undefined
|
|
1340
|
+
*/
|
|
1341
|
+
options: {
|
|
1342
|
+
type: Object,
|
|
1343
|
+
default: void 0
|
|
1344
|
+
},
|
|
1345
|
+
/**
|
|
1346
|
+
* Current value of the filter
|
|
1347
|
+
*
|
|
1348
|
+
* @default undefined
|
|
1349
|
+
*/
|
|
1350
|
+
value: {
|
|
1351
|
+
type: [String, Number, Array],
|
|
1352
|
+
default: void 0
|
|
1353
|
+
}
|
|
1354
|
+
},
|
|
1355
|
+
emits: ["input", "update"],
|
|
1356
|
+
setup(e, { emit: n }) {
|
|
1357
|
+
const { t: l } = pe({ messages: At }), s = Ne(), t = n, o = e, { internalFilterValue: d } = he(te(o, "value"), te(o, "defaultValue")), a = te(o, "options"), i = K(o.options.listboxItems);
|
|
1358
|
+
ie(a, () => {
|
|
1359
|
+
i.value = a.value.listboxItems;
|
|
1360
|
+
});
|
|
1361
|
+
const v = p(() => l("noFiltersMatchThisSearch")), b = (A) => {
|
|
1362
|
+
d.value = A;
|
|
1363
|
+
const { onlySlot: $, ...c } = o;
|
|
1364
|
+
t(D.INPUT, { ...c, value: d.value });
|
|
1365
|
+
};
|
|
1366
|
+
return (A, $) => {
|
|
1367
|
+
var c, g, P, _, U, H, E;
|
|
1368
|
+
return F(), w(T(Gt), {
|
|
1369
|
+
value: T(d),
|
|
1370
|
+
items: e.options.listboxItems,
|
|
1371
|
+
search: (c = e.options) == null ? void 0 : c.search,
|
|
1372
|
+
multiple: (g = e.options) == null ? void 0 : g.multiple,
|
|
1373
|
+
"static-categories": (P = e.options) == null ? void 0 : P.staticCategories,
|
|
1374
|
+
"no-results-message": v.value,
|
|
1375
|
+
"is-option-disabled": e.options.isOptionDisabled,
|
|
1376
|
+
"dynamic-filtering": ((_ = e.options) == null ? void 0 : _.dynamicFiltering) ?? !0,
|
|
1377
|
+
"component-loading": (U = e.options) == null ? void 0 : U.loading,
|
|
1378
|
+
"empty-state": (H = e.options) == null ? void 0 : H.emptyState,
|
|
1379
|
+
disabled: e.disabled,
|
|
1380
|
+
"enable-value-label-pair": (E = e.options) == null ? void 0 : E.enableValueLabelPair,
|
|
1381
|
+
onInput: b,
|
|
1382
|
+
onOpen: $[0] || ($[0] = () => {
|
|
1383
|
+
var j, h;
|
|
1384
|
+
return (h = (j = e.options) == null ? void 0 : j.onOpen) == null ? void 0 : h.call(j);
|
|
1385
|
+
})
|
|
1386
|
+
}, Pe({ _: 2 }, [
|
|
1387
|
+
ye(T(s), (j, h) => ({
|
|
1388
|
+
name: h,
|
|
1389
|
+
fn: C((V) => [
|
|
1390
|
+
ce(A.$slots, h, Re(we(V)))
|
|
1391
|
+
])
|
|
1392
|
+
}))
|
|
1393
|
+
]), 1032, ["value", "items", "search", "multiple", "static-categories", "no-results-message", "is-option-disabled", "dynamic-filtering", "component-loading", "empty-state", "disabled", "enable-value-label-pair"]);
|
|
1394
|
+
};
|
|
1395
|
+
}
|
|
1396
|
+
}), Te = {
|
|
1397
|
+
/**
|
|
1398
|
+
* Disables the filter from being interacted with.
|
|
1399
|
+
*/
|
|
1400
|
+
disabled: { type: Boolean, default: !1 },
|
|
1401
|
+
/**
|
|
1402
|
+
* Default value of the filter to reset to.
|
|
1403
|
+
*
|
|
1404
|
+
*/
|
|
1405
|
+
defaultValue: {
|
|
1406
|
+
type: [String, Number, Array, Object],
|
|
1407
|
+
default: null
|
|
1408
|
+
},
|
|
1409
|
+
/**
|
|
1410
|
+
* Filter name/key referencing the actual property name in the data set.
|
|
1411
|
+
* Should be unique per filter bar.
|
|
1412
|
+
*/
|
|
1413
|
+
field: { type: String, required: !0 },
|
|
1414
|
+
/**
|
|
1415
|
+
* Label text to be displayed
|
|
1416
|
+
*/
|
|
1417
|
+
label: { type: String, required: !0 },
|
|
1418
|
+
/**
|
|
1419
|
+
* Renders the base filter's slot content only - leaving out the button and the popover.
|
|
1420
|
+
* Used for the allFiltersModal component.
|
|
1421
|
+
*
|
|
1422
|
+
*/
|
|
1423
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
1424
|
+
/**
|
|
1425
|
+
* List of options that are needed to setup the filter
|
|
1426
|
+
* Available options:
|
|
1427
|
+
* - multiple: If "true", the user will be able to select multiple items.
|
|
1428
|
+
* - listboxItems: The option elements to populate the filter with.
|
|
1429
|
+
* - tooltipPosition: The position of the tooltip attached to the filter button
|
|
1430
|
+
* - tooltipText: The content of the tooltip attached to the filter button
|
|
1431
|
+
*
|
|
1432
|
+
* @default undefined
|
|
1433
|
+
*/
|
|
1434
|
+
options: {
|
|
1435
|
+
type: Object,
|
|
1436
|
+
default: void 0
|
|
1437
|
+
},
|
|
1438
|
+
/**
|
|
1439
|
+
* Current value of the filter
|
|
1440
|
+
*
|
|
1441
|
+
* @default undefined
|
|
1442
|
+
*/
|
|
1443
|
+
value: {
|
|
1444
|
+
type: [String, Number, Array, Object],
|
|
1445
|
+
default: void 0
|
|
1446
|
+
}
|
|
1447
|
+
}, Ml = {}, De = /* @__PURE__ */ Q({
|
|
1448
|
+
...Ml,
|
|
1449
|
+
__name: "select-filter",
|
|
1450
|
+
props: Te,
|
|
1451
|
+
emits: ["input", "update"],
|
|
1452
|
+
setup(e, { emit: n }) {
|
|
1453
|
+
const l = Ne(), s = n, t = e, o = (a) => s("input", a), d = (a) => s("update", a);
|
|
1454
|
+
return ut(() => {
|
|
1455
|
+
var a;
|
|
1456
|
+
(a = t == null ? void 0 : t.options) != null && a.messages && Ke(
|
|
1457
|
+
'BentoFilterBar filter of type "BentoFilterItemType.SELECT" options message property',
|
|
1458
|
+
`Please remove the "options.messages" property from this filter, it is not required any more for persistent filters.
|
|
1459
|
+
This will be the default behavior in the v2 and "options.messages" will be removed.`,
|
|
1460
|
+
"2.0.0"
|
|
1461
|
+
);
|
|
1462
|
+
}), (a, i) => a.onlySlot ? (F(), w(T(Vl), {
|
|
1463
|
+
key: 0,
|
|
1464
|
+
disabled: a.disabled,
|
|
1465
|
+
"default-value": a.defaultValue,
|
|
1466
|
+
field: a.field,
|
|
1467
|
+
label: a.label,
|
|
1468
|
+
options: a.options,
|
|
1469
|
+
value: a.value,
|
|
1470
|
+
onInput: o,
|
|
1471
|
+
onUpdate: d
|
|
1472
|
+
}, Pe({ _: 2 }, [
|
|
1473
|
+
ye(T(l), (v, b) => ({
|
|
1474
|
+
name: b,
|
|
1475
|
+
fn: C((A) => [
|
|
1476
|
+
ce(a.$slots, b, Re(we(A)))
|
|
1477
|
+
])
|
|
1478
|
+
}))
|
|
1479
|
+
]), 1032, ["disabled", "default-value", "field", "label", "options", "value"])) : (F(), w(T(kl), {
|
|
1480
|
+
key: 1,
|
|
1481
|
+
disabled: a.disabled,
|
|
1482
|
+
"default-value": a.defaultValue,
|
|
1483
|
+
field: a.field,
|
|
1484
|
+
label: a.label,
|
|
1485
|
+
options: a.options,
|
|
1486
|
+
value: a.value,
|
|
1487
|
+
onInput: o,
|
|
1488
|
+
onUpdate: d
|
|
1489
|
+
}, Pe({ _: 2 }, [
|
|
1490
|
+
ye(T(l), (v, b) => ({
|
|
1491
|
+
name: b,
|
|
1492
|
+
fn: C((A) => [
|
|
1493
|
+
ce(a.$slots, b, Re(we(A)))
|
|
1494
|
+
])
|
|
1495
|
+
}))
|
|
1496
|
+
]), 1032, ["disabled", "default-value", "field", "label", "options", "value"]));
|
|
1497
|
+
}
|
|
1498
|
+
}), Hl = Q({
|
|
1499
|
+
name: "bento-select-avatar-filter",
|
|
1500
|
+
components: {
|
|
1501
|
+
BentoSelectFilter: De,
|
|
1502
|
+
BentoAvatar: ll
|
|
1503
|
+
},
|
|
1504
|
+
props: {
|
|
1505
|
+
...Te,
|
|
1506
|
+
/**
|
|
1507
|
+
* List of options that are needed to setup the country filter
|
|
1508
|
+
* Available options:
|
|
1509
|
+
* - multiple: If "true", the user will be able to select multiple items.
|
|
1510
|
+
* - listboxItems: The option elements to populate the filter with {@see BentoSelectCountryFilterOptions}
|
|
1511
|
+
*/
|
|
1512
|
+
options: {
|
|
1513
|
+
type: Object,
|
|
1514
|
+
default: void 0
|
|
1515
|
+
}
|
|
1516
|
+
},
|
|
1517
|
+
emits: [D.INPUT, D.UPDATE],
|
|
1518
|
+
setup(e, { emit: n }) {
|
|
1519
|
+
return {
|
|
1520
|
+
// Enums
|
|
1521
|
+
BentoFilterEvent: D,
|
|
1522
|
+
// Methods
|
|
1523
|
+
onUpdate: (s) => n(D.UPDATE, s)
|
|
1524
|
+
};
|
|
1525
|
+
}
|
|
1526
|
+
});
|
|
1527
|
+
function jl(e, n, l, s, t, o) {
|
|
1528
|
+
const d = N("bento-avatar"), a = N("bento-select-filter");
|
|
1529
|
+
return F(), w(a, re(e.$props, {
|
|
1530
|
+
field: e.field,
|
|
1531
|
+
label: e.label,
|
|
1532
|
+
onUpdate: e.onUpdate,
|
|
1533
|
+
onInput: n[0] || (n[0] = (i) => e.$emit(e.BentoFilterEvent.INPUT, i))
|
|
1534
|
+
}), {
|
|
1535
|
+
default: C(({ label: i, data: v }) => [
|
|
1536
|
+
R(d, {
|
|
1537
|
+
username: i,
|
|
1538
|
+
src: v
|
|
1539
|
+
}, null, 8, ["username", "src"])
|
|
1540
|
+
]),
|
|
1541
|
+
_: 1
|
|
1542
|
+
}, 16, ["field", "label", "onUpdate"]);
|
|
1543
|
+
}
|
|
1544
|
+
const Tt = /* @__PURE__ */ le(Hl, [["render", jl]]), ql = Q({
|
|
1545
|
+
name: "bento-select-country-filter",
|
|
1546
|
+
components: {
|
|
1547
|
+
BentoSelectFilter: De,
|
|
1548
|
+
ListboxOptionTag: yt
|
|
1549
|
+
},
|
|
1550
|
+
props: {
|
|
1551
|
+
...Te,
|
|
1552
|
+
/**
|
|
1553
|
+
* List of options that are needed to setup the country filter
|
|
1554
|
+
* Available options:
|
|
1555
|
+
* - multiple: If "true", the user will be able to select multiple items.
|
|
1556
|
+
* - listboxItems: The option elements to populate the filter with {@see BentoSelectCurrencyFilterOptions}
|
|
1557
|
+
*/
|
|
1558
|
+
options: {
|
|
1559
|
+
type: Object,
|
|
1560
|
+
default: void 0
|
|
1561
|
+
}
|
|
1562
|
+
},
|
|
1563
|
+
emits: [D.INPUT, D.UPDATE],
|
|
1564
|
+
setup(e, { emit: n }) {
|
|
1565
|
+
return {
|
|
1566
|
+
// Enums
|
|
1567
|
+
BentoFilterEvent: D,
|
|
1568
|
+
// Methods
|
|
1569
|
+
onUpdate: (s) => {
|
|
1570
|
+
n(D.UPDATE, s);
|
|
1571
|
+
}
|
|
1572
|
+
};
|
|
1573
|
+
}
|
|
1574
|
+
});
|
|
1575
|
+
function Kl(e, n, l, s, t, o) {
|
|
1576
|
+
const d = N("listbox-option-tag"), a = N("bento-select-filter");
|
|
1577
|
+
return F(), w(a, re(e.$props, {
|
|
1578
|
+
field: e.field,
|
|
1579
|
+
label: e.label,
|
|
1580
|
+
onUpdate: e.onUpdate,
|
|
1581
|
+
onInput: n[0] || (n[0] = (i) => e.$emit(e.BentoFilterEvent.INPUT, i))
|
|
1582
|
+
}), {
|
|
1583
|
+
default: C((i) => [
|
|
1584
|
+
R(d, { option: i }, null, 8, ["option"])
|
|
1585
|
+
]),
|
|
1586
|
+
_: 1
|
|
1587
|
+
}, 16, ["field", "label", "onUpdate"]);
|
|
1588
|
+
}
|
|
1589
|
+
const It = /* @__PURE__ */ le(ql, [["render", Kl]]), Jl = {
|
|
1590
|
+
name: "bento-select-country-filter"
|
|
1591
|
+
}, _t = /* @__PURE__ */ Q({
|
|
1592
|
+
...Jl,
|
|
1593
|
+
props: {
|
|
1594
|
+
...Te,
|
|
1595
|
+
/**
|
|
1596
|
+
* List of options that are needed to setup the country filter
|
|
1597
|
+
* Available options:
|
|
1598
|
+
* - multiple: If "true", the user will be able to select multiple items.
|
|
1599
|
+
* - listboxItems: The option elements to populate the filter with {@see BentoSelectCountryFilterOptions}
|
|
1600
|
+
* - variant: Which label variant to display for the option item.
|
|
1601
|
+
*/
|
|
1602
|
+
options: {
|
|
1603
|
+
type: Object,
|
|
1604
|
+
default: void 0
|
|
1605
|
+
}
|
|
1606
|
+
},
|
|
1607
|
+
emits: [D.INPUT, D.UPDATE],
|
|
1608
|
+
setup(e, { emit: n }) {
|
|
1609
|
+
const l = e, s = n, t = K(l.options.variant), o = K(l.options.listboxItems);
|
|
1610
|
+
ie([() => l.options.variant, () => l.options.listboxItems], () => {
|
|
1611
|
+
t.value = l.options.variant, o.value = l.options.listboxItems;
|
|
1612
|
+
});
|
|
1613
|
+
const d = (v) => s(D.UPDATE, v), a = tl(t, o), i = p(() => ({
|
|
1614
|
+
...l != null && l.options ? l.options : {},
|
|
1615
|
+
listboxItems: a.value
|
|
1616
|
+
}));
|
|
1617
|
+
return (!t.value || t.value === "custom") && Ke(
|
|
1618
|
+
'BentoSelectCountryFilter type with `options.variant==="custom"`',
|
|
1619
|
+
"Use any of the other BentoSelectCountryFilter variants instead OR use BentoSelectFilter type for custom labels",
|
|
1620
|
+
"2.0.0"
|
|
1621
|
+
), (v, b) => (F(), w(De, re(l, {
|
|
1622
|
+
field: v.field,
|
|
1623
|
+
label: v.label,
|
|
1624
|
+
options: i.value,
|
|
1625
|
+
onUpdate: d,
|
|
1626
|
+
onInput: b[0] || (b[0] = (A) => v.$emit(T(D).INPUT, A))
|
|
1627
|
+
}), {
|
|
1628
|
+
default: C(({ label: A }) => [
|
|
1629
|
+
R(T(ve), { el: "span" }, {
|
|
1630
|
+
default: C(() => [
|
|
1631
|
+
X(x(A), 1)
|
|
1632
|
+
]),
|
|
1633
|
+
_: 2
|
|
1634
|
+
}, 1024)
|
|
1635
|
+
]),
|
|
1636
|
+
_: 1
|
|
1637
|
+
}, 16, ["field", "label", "options"]));
|
|
1638
|
+
}
|
|
1639
|
+
}), Yl = Q({
|
|
1640
|
+
name: "bento-select-payment-method-filter",
|
|
1641
|
+
components: {
|
|
1642
|
+
BentoSelectFilter: De,
|
|
1643
|
+
BentoPaymentMethod: el
|
|
1644
|
+
},
|
|
1645
|
+
props: {
|
|
1646
|
+
...Te,
|
|
1647
|
+
/**
|
|
1648
|
+
* List of options that are needed to setup the payment method filter
|
|
1649
|
+
* Available options:
|
|
1650
|
+
* - multiple: If "true", the user will be able to select multiple items.
|
|
1651
|
+
* - listboxItems: The option elements to populate the filter with {@see BentoSelectPaymentMethodFilterOptions}
|
|
1652
|
+
*/
|
|
1653
|
+
options: {
|
|
1654
|
+
type: Object,
|
|
1655
|
+
default: void 0
|
|
1656
|
+
}
|
|
1657
|
+
},
|
|
1658
|
+
emits: [D.INPUT, D.UPDATE],
|
|
1659
|
+
setup(e, { emit: n }) {
|
|
1660
|
+
return {
|
|
1661
|
+
// Enums
|
|
1662
|
+
BentoFilterEvent: D,
|
|
1663
|
+
// Methods
|
|
1664
|
+
onUpdate: (s) => n(D.UPDATE, s)
|
|
1665
|
+
};
|
|
1666
|
+
}
|
|
1667
|
+
});
|
|
1668
|
+
function zl(e, n, l, s, t, o) {
|
|
1669
|
+
const d = N("bento-payment-method"), a = N("bento-select-filter");
|
|
1670
|
+
return F(), w(a, re(e.$props, {
|
|
1671
|
+
field: e.field,
|
|
1672
|
+
label: e.label,
|
|
1673
|
+
onUpdate: e.onUpdate,
|
|
1674
|
+
onInput: n[0] || (n[0] = (i) => e.$emit(e.BentoFilterEvent.INPUT, i))
|
|
1675
|
+
}), {
|
|
1676
|
+
default: C(({ value: i, label: v }) => [
|
|
1677
|
+
R(d, {
|
|
1678
|
+
type: i,
|
|
1679
|
+
label: v
|
|
1680
|
+
}, null, 8, ["type", "label"])
|
|
1681
|
+
]),
|
|
1682
|
+
_: 1
|
|
1683
|
+
}, 16, ["field", "label", "onUpdate"]);
|
|
1684
|
+
}
|
|
1685
|
+
const $t = /* @__PURE__ */ le(Yl, [["render", zl]]), Wl = Q({
|
|
1686
|
+
name: "bento-select-country-filter",
|
|
1687
|
+
components: {
|
|
1688
|
+
BentoSelectFilter: De,
|
|
1689
|
+
ListboxOptionTag: yt
|
|
1690
|
+
},
|
|
1691
|
+
props: {
|
|
1692
|
+
...Te,
|
|
1693
|
+
/**
|
|
1694
|
+
* List of options that are needed to setup the tag filter
|
|
1695
|
+
* Available options:
|
|
1696
|
+
* - multiple: If "true", the user will be able to select multiple items.
|
|
1697
|
+
* - listboxItems: The option elements to populate the filter with {@see BentoSelectTagFilterOptions}
|
|
1698
|
+
*/
|
|
1699
|
+
options: {
|
|
1700
|
+
type: Object,
|
|
1701
|
+
default: void 0
|
|
1702
|
+
}
|
|
1703
|
+
},
|
|
1704
|
+
emits: [D.INPUT, D.UPDATE],
|
|
1705
|
+
setup(e, { emit: n }) {
|
|
1706
|
+
const l = (o) => n(D.UPDATE, o), s = p(
|
|
1707
|
+
() => {
|
|
1708
|
+
var o, d;
|
|
1709
|
+
return (d = (o = e == null ? void 0 : e.options) == null ? void 0 : o.listboxItems) == null ? void 0 : d.map(({ label: a, value: i, variant: v }) => ({ label: a, value: i, data: v }));
|
|
1710
|
+
}
|
|
1711
|
+
);
|
|
1712
|
+
return {
|
|
1713
|
+
// Values
|
|
1714
|
+
countryOptions: p(() => ({
|
|
1715
|
+
...e.options,
|
|
1716
|
+
listboxItems: s.value
|
|
1717
|
+
})),
|
|
1718
|
+
// Methods
|
|
1719
|
+
onUpdate: l,
|
|
1720
|
+
// Enums
|
|
1721
|
+
BentoFilterEvent: D
|
|
1722
|
+
};
|
|
1723
|
+
}
|
|
1724
|
+
});
|
|
1725
|
+
function Gl(e, n, l, s, t, o) {
|
|
1726
|
+
const d = N("listbox-option-tag"), a = N("bento-select-filter");
|
|
1727
|
+
return F(), w(a, re(e.$props, {
|
|
1728
|
+
field: e.field,
|
|
1729
|
+
label: e.label,
|
|
1730
|
+
options: e.countryOptions,
|
|
1731
|
+
onUpdate: e.onUpdate,
|
|
1732
|
+
onInput: n[0] || (n[0] = (i) => e.$emit(e.BentoFilterEvent.INPUT, i))
|
|
1733
|
+
}), {
|
|
1734
|
+
default: C(({ label: i, data: v }) => [
|
|
1735
|
+
R(d, {
|
|
1736
|
+
option: { value: i, data: v, label: "" }
|
|
1737
|
+
}, null, 8, ["option"])
|
|
1738
|
+
]),
|
|
1739
|
+
_: 1
|
|
1740
|
+
}, 16, ["field", "label", "options", "onUpdate"]);
|
|
1741
|
+
}
|
|
1742
|
+
const Pt = /* @__PURE__ */ le(Wl, [["render", Gl]]), at = {
|
|
1743
|
+
"en-US": {
|
|
1744
|
+
no: "No",
|
|
1745
|
+
yes: "Yes"
|
|
1746
|
+
},
|
|
1747
|
+
"ja-JP": {
|
|
1748
|
+
no: "いいえ",
|
|
1749
|
+
yes: "はい"
|
|
1750
|
+
},
|
|
1751
|
+
"pt-BR": {
|
|
1752
|
+
no: "Não",
|
|
1753
|
+
yes: "Sim"
|
|
1754
|
+
}
|
|
1755
|
+
}, Zl = Q({
|
|
1756
|
+
name: "bento-boolean-filter",
|
|
1757
|
+
i18n: { messages: at },
|
|
1758
|
+
components: { BentoBaseFilter: Be, BentoRadioGroup: Ht },
|
|
1759
|
+
props: {
|
|
1760
|
+
/**
|
|
1761
|
+
* Disables the filter from being interacted with.
|
|
1762
|
+
*/
|
|
1763
|
+
disabled: { type: Boolean, default: !1 },
|
|
1764
|
+
/**
|
|
1765
|
+
* Default value of the filter to reset to.
|
|
1766
|
+
*/
|
|
1767
|
+
defaultValue: { type: [String, Boolean], default: null },
|
|
1768
|
+
/**
|
|
1769
|
+
* Filter name/key referencing the actual property name in the data set.
|
|
1770
|
+
* Should be unique per filter bar.
|
|
1771
|
+
*/
|
|
1772
|
+
field: { type: String, required: !0 },
|
|
1773
|
+
/**
|
|
1774
|
+
* Label text to be displayed
|
|
1775
|
+
*/
|
|
1776
|
+
label: { type: String, required: !0 },
|
|
1777
|
+
/**
|
|
1778
|
+
* Current value of the filter
|
|
1779
|
+
*/
|
|
1780
|
+
value: { type: [String, Boolean], default: null },
|
|
1781
|
+
/**
|
|
1782
|
+
* Renders the base filter's slot content only - leaving out the button and the popover.
|
|
1783
|
+
* Used for the allFiltersModal component.
|
|
1784
|
+
*/
|
|
1785
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
1786
|
+
/**
|
|
1787
|
+
* List of options that are needed to setup the filter
|
|
1788
|
+
* Available options:
|
|
1789
|
+
* - positiveOption: The positive option label/value
|
|
1790
|
+
* - negativeOption: The positive option label/value
|
|
1791
|
+
* - tooltipPosition: The position of the tooltip attached to the filter button
|
|
1792
|
+
* - tooltipText: The content of the tooltip attached to the filter button
|
|
1793
|
+
*/
|
|
1794
|
+
options: {
|
|
1795
|
+
type: Object,
|
|
1796
|
+
default: void 0
|
|
1797
|
+
}
|
|
1798
|
+
},
|
|
1799
|
+
emits: [D.INPUT, D.UPDATE],
|
|
1800
|
+
setup(e, { emit: n }) {
|
|
1801
|
+
const { t: l } = pe({ messages: at }), s = (E) => typeof E == "boolean" ? E == null ? void 0 : E.toString() : E, t = (E) => {
|
|
1802
|
+
var j, h, V, M;
|
|
1803
|
+
return ((h = (j = e == null ? void 0 : e.options) == null ? void 0 : j.positiveOption) == null ? void 0 : h.value) !== void 0 && ((M = (V = e == null ? void 0 : e.options) == null ? void 0 : V.negativeOption) == null ? void 0 : M.value) !== void 0 && typeof e.options.positiveOption.value == "boolean" && typeof e.options.negativeOption.value == "boolean" && typeof E == "string" ? E === "true" : E;
|
|
1804
|
+
}, o = p(() => s(e.defaultValue)), d = p(() => s(e.value)), a = p(() => e.options && e.options.positiveOption && e.options.negativeOption ? [
|
|
1805
|
+
{
|
|
1806
|
+
...e.options.positiveOption,
|
|
1807
|
+
value: s(e.options.positiveOption.value)
|
|
1808
|
+
},
|
|
1809
|
+
{
|
|
1810
|
+
...e.options.negativeOption,
|
|
1811
|
+
value: s(e.options.negativeOption.value)
|
|
1812
|
+
}
|
|
1813
|
+
] : [
|
|
1814
|
+
{ value: "yes", label: l("yes") },
|
|
1815
|
+
{ value: "no", label: l("no") }
|
|
1816
|
+
]), { internalFilterValue: i, isSecondaryButtonDisabled: v, isApplyButtonDisabled: b } = he(
|
|
1817
|
+
d,
|
|
1818
|
+
o
|
|
1819
|
+
), A = p(() => e.label), $ = p(
|
|
1820
|
+
() => {
|
|
1821
|
+
var E;
|
|
1822
|
+
return Ce((E = a.value.find(({ value: j }) => j === d.value)) == null ? void 0 : E.label, 12);
|
|
1823
|
+
}
|
|
1824
|
+
), c = p(() => ({
|
|
1825
|
+
"b-boolean-filter--only-slot": e.onlySlot
|
|
1826
|
+
}));
|
|
1827
|
+
Ve(() => {
|
|
1828
|
+
i.value || (i.value = null);
|
|
1829
|
+
});
|
|
1830
|
+
const g = (E) => {
|
|
1831
|
+
i.value = E, n(D.INPUT, {
|
|
1832
|
+
...e,
|
|
1833
|
+
value: t(i.value)
|
|
1834
|
+
});
|
|
1835
|
+
}, P = () => {
|
|
1836
|
+
i.value = d.value;
|
|
1837
|
+
}, _ = () => {
|
|
1838
|
+
n(D.UPDATE, {
|
|
1839
|
+
...e,
|
|
1840
|
+
value: t(i.value)
|
|
1841
|
+
});
|
|
1842
|
+
};
|
|
1843
|
+
return {
|
|
1844
|
+
// Values
|
|
1845
|
+
items: a,
|
|
1846
|
+
conditionalClasses: c,
|
|
1847
|
+
buttonLabel: A,
|
|
1848
|
+
buttonSecondaryLabel: $,
|
|
1849
|
+
internalFilterValue: i,
|
|
1850
|
+
isApplyButtonDisabled: b,
|
|
1851
|
+
isSecondaryButtonDisabled: v,
|
|
1852
|
+
translatedValue: d,
|
|
1853
|
+
translatedDefaultValue: o,
|
|
1854
|
+
// Events
|
|
1855
|
+
onInput: g,
|
|
1856
|
+
updateFilter: _,
|
|
1857
|
+
clearFilter: () => {
|
|
1858
|
+
i.value = null, _();
|
|
1859
|
+
},
|
|
1860
|
+
openFilter: P,
|
|
1861
|
+
resetFilter: () => n(D.UPDATE, { ...e, value: e.defaultValue })
|
|
1862
|
+
};
|
|
1863
|
+
}
|
|
1864
|
+
});
|
|
1865
|
+
function Ql(e, n, l, s, t, o) {
|
|
1866
|
+
var i, v;
|
|
1867
|
+
const d = N("bento-radio-group"), a = N("bento-base-filter");
|
|
1868
|
+
return F(), w(a, re(e.$props, {
|
|
1869
|
+
value: e.translatedValue,
|
|
1870
|
+
"default-value": e.translatedDefaultValue,
|
|
1871
|
+
"button-label": e.buttonLabel,
|
|
1872
|
+
"button-secondary-label": e.buttonSecondaryLabel,
|
|
1873
|
+
"disable-apply-button": e.isApplyButtonDisabled,
|
|
1874
|
+
"disable-secondary-button": e.isSecondaryButtonDisabled,
|
|
1875
|
+
"only-slot": e.onlySlot,
|
|
1876
|
+
"tooltip-position": (i = e.options) == null ? void 0 : i.tooltipPosition,
|
|
1877
|
+
"tooltip-text": (v = e.options) == null ? void 0 : v.tooltipText,
|
|
1878
|
+
onApply: e.updateFilter,
|
|
1879
|
+
onClear: e.clearFilter,
|
|
1880
|
+
onOpen: e.openFilter,
|
|
1881
|
+
onReset: e.resetFilter
|
|
1882
|
+
}), {
|
|
1883
|
+
default: C(() => [
|
|
1884
|
+
W("div", {
|
|
1885
|
+
class: de(["b-boolean-filter", e.conditionalClasses]),
|
|
1886
|
+
onKeydown: n[0] || (n[0] = me((...b) => e.updateFilter && e.updateFilter(...b), ["enter"]))
|
|
1887
|
+
}, [
|
|
1888
|
+
R(d, {
|
|
1889
|
+
items: e.items,
|
|
1890
|
+
label: e.label,
|
|
1891
|
+
"model-value": e.internalFilterValue,
|
|
1892
|
+
disabled: e.disabled,
|
|
1893
|
+
"hide-label": "",
|
|
1894
|
+
"onUpdate:modelValue": e.onInput
|
|
1895
|
+
}, null, 8, ["items", "label", "model-value", "disabled", "onUpdate:modelValue"])
|
|
1896
|
+
], 34)
|
|
1897
|
+
]),
|
|
1898
|
+
_: 1
|
|
1899
|
+
}, 16, ["value", "default-value", "button-label", "button-secondary-label", "disable-apply-button", "disable-secondary-button", "only-slot", "tooltip-position", "tooltip-text", "onApply", "onClear", "onOpen", "onReset"]);
|
|
1900
|
+
}
|
|
1901
|
+
const Et = /* @__PURE__ */ le(Zl, [["render", Ql], ["__scopeId", "data-v-7772a6d5"]]), ot = {
|
|
1902
|
+
"en-US": {
|
|
1903
|
+
from: "From",
|
|
1904
|
+
to: "To"
|
|
1905
|
+
}
|
|
1906
|
+
}, Xl = Q({
|
|
1907
|
+
name: "bento-range-filter",
|
|
1908
|
+
i18n: { messages: ot },
|
|
1909
|
+
components: { BentoBaseFilter: Be, BentoInputField: Je },
|
|
1910
|
+
props: {
|
|
1911
|
+
/**
|
|
1912
|
+
* Disables the filter from being interacted with.
|
|
1913
|
+
*/
|
|
1914
|
+
disabled: { type: Boolean, default: !1 },
|
|
1915
|
+
/**
|
|
1916
|
+
* Default value of the filter to reset to.
|
|
1917
|
+
*/
|
|
1918
|
+
defaultValue: { type: Array, default: null },
|
|
1919
|
+
/**
|
|
1920
|
+
* Filter name/key referencing the actual property name in the data set.
|
|
1921
|
+
* Should be unique per filter bar.
|
|
1922
|
+
*/
|
|
1923
|
+
field: { type: String, required: !0 },
|
|
1924
|
+
/**
|
|
1925
|
+
* Label text to be displayed
|
|
1926
|
+
*/
|
|
1927
|
+
label: { type: String, required: !0 },
|
|
1928
|
+
/**
|
|
1929
|
+
* Current value of the filter
|
|
1930
|
+
*/
|
|
1931
|
+
value: { type: Array, default: () => ["", ""] },
|
|
1932
|
+
/**
|
|
1933
|
+
* Renders the base filter's slot content only - leaving out the button and the popover.
|
|
1934
|
+
* Used for the allFiltersModal component.
|
|
1935
|
+
*/
|
|
1936
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
1937
|
+
/**
|
|
1938
|
+
* List of options that are needed to setup the filter
|
|
1939
|
+
* Available options:
|
|
1940
|
+
* - tooltipPosition: The position of the tooltip attached to the filter button
|
|
1941
|
+
* - tooltipText: The content of the tooltip attached to the filter button
|
|
1942
|
+
*/
|
|
1943
|
+
options: { type: Object, default: void 0 }
|
|
1944
|
+
},
|
|
1945
|
+
emits: [D.INPUT, D.UPDATE],
|
|
1946
|
+
setup(e, { emit: n }) {
|
|
1947
|
+
const { t: l } = pe({ messages: ot }), s = K(null), { internalFilterValue: t, isSecondaryButtonDisabled: o, isApplyButtonDisabled: d } = he(
|
|
1948
|
+
te(e, "value"),
|
|
1949
|
+
te(e, "defaultValue")
|
|
1950
|
+
), a = p(() => {
|
|
1951
|
+
var V, M, I, B, J, z, ee, S;
|
|
1952
|
+
if (!((V = e.value) != null && V[0]) && !((M = e.value) != null && M[1]))
|
|
1953
|
+
return null;
|
|
1954
|
+
let H = "";
|
|
1955
|
+
(I = e.value) != null && I[0] ? (B = e.value) != null && B[1] || (H = "≥") : H = "≤";
|
|
1956
|
+
const E = (J = e.value) != null && J[0] ? `${Ce(e.value[0], 5)}` : "", j = (z = e.value) != null && z[0] && ((ee = e.value) != null && ee[1]) ? " - " : "", h = (S = e.value) != null && S[1] ? `${Ce(e.value[1], 5)}` : "";
|
|
1957
|
+
return `${H}${E}${j}${h}`;
|
|
1958
|
+
}), i = p(() => e.label), v = p(() => a.value), b = p(() => ({
|
|
1959
|
+
"b-range-filter--only-slot": e.onlySlot
|
|
1960
|
+
})), A = () => {
|
|
1961
|
+
t.value = e.value, it(() => s.value.focusInput());
|
|
1962
|
+
}, $ = () => {
|
|
1963
|
+
n(D.INPUT, { ...e, value: t.value });
|
|
1964
|
+
}, c = (H) => {
|
|
1965
|
+
t.value = [H, t.value[1]], $();
|
|
1966
|
+
}, g = (H) => {
|
|
1967
|
+
t.value = [t.value[0], H], $();
|
|
1968
|
+
}, P = () => {
|
|
1969
|
+
t.value.some((H) => H) || (t.value = e.defaultValue !== null ? e.defaultValue : void 0), n(D.UPDATE, {
|
|
1970
|
+
...e,
|
|
1971
|
+
value: t.value
|
|
1972
|
+
});
|
|
1973
|
+
};
|
|
1974
|
+
return {
|
|
1975
|
+
// Values
|
|
1976
|
+
inputTextRef: s,
|
|
1977
|
+
conditionalClasses: b,
|
|
1978
|
+
internalFilterValue: t,
|
|
1979
|
+
isApplyButtonDisabled: d,
|
|
1980
|
+
isSecondaryButtonDisabled: o,
|
|
1981
|
+
buttonLabel: i,
|
|
1982
|
+
buttonSecondaryLabel: v,
|
|
1983
|
+
// Events
|
|
1984
|
+
updateFrom: c,
|
|
1985
|
+
updateTo: g,
|
|
1986
|
+
updateFilter: P,
|
|
1987
|
+
clearFilter: () => {
|
|
1988
|
+
t.value = ["", ""], P();
|
|
1989
|
+
},
|
|
1990
|
+
openFilter: A,
|
|
1991
|
+
resetFilter: () => n(D.UPDATE, { ...e, value: e.defaultValue }),
|
|
1992
|
+
// Translations
|
|
1993
|
+
t: l
|
|
1994
|
+
};
|
|
1995
|
+
}
|
|
1996
|
+
});
|
|
1997
|
+
function xl(e, n, l, s, t, o) {
|
|
1998
|
+
var i, v;
|
|
1999
|
+
const d = N("bento-input-field"), a = N("bento-base-filter");
|
|
2000
|
+
return F(), w(a, re(e.$props, {
|
|
2001
|
+
"disable-apply-button": e.isApplyButtonDisabled,
|
|
2002
|
+
"disable-secondary-button": e.isSecondaryButtonDisabled,
|
|
2003
|
+
"button-label": e.buttonLabel,
|
|
2004
|
+
"button-secondary-label": e.buttonSecondaryLabel,
|
|
2005
|
+
"only-slot": e.onlySlot,
|
|
2006
|
+
"tooltip-position": (i = e.options) == null ? void 0 : i.tooltipPosition,
|
|
2007
|
+
"tooltip-text": (v = e.options) == null ? void 0 : v.tooltipText,
|
|
2008
|
+
onApply: e.updateFilter,
|
|
2009
|
+
onClear: e.clearFilter,
|
|
2010
|
+
onOpen: e.openFilter,
|
|
2011
|
+
onReset: e.resetFilter
|
|
2012
|
+
}), {
|
|
2013
|
+
default: C(() => [
|
|
2014
|
+
W("div", {
|
|
2015
|
+
class: de(["b-range-filter", e.conditionalClasses]),
|
|
2016
|
+
onKeydown: n[0] || (n[0] = me((...b) => e.updateFilter && e.updateFilter(...b), ["enter"]))
|
|
2017
|
+
}, [
|
|
2018
|
+
R(d, {
|
|
2019
|
+
ref: "inputTextRef",
|
|
2020
|
+
value: e.internalFilterValue ? e.internalFilterValue[0] : "",
|
|
2021
|
+
type: "number",
|
|
2022
|
+
"aria-label": e.t("from").toString(),
|
|
2023
|
+
disabled: e.disabled,
|
|
2024
|
+
onInput: e.updateFrom
|
|
2025
|
+
}, {
|
|
2026
|
+
default: C(() => [
|
|
2027
|
+
X(x(e.t("from")), 1)
|
|
2028
|
+
]),
|
|
2029
|
+
_: 1
|
|
2030
|
+
}, 8, ["value", "aria-label", "disabled", "onInput"]),
|
|
2031
|
+
R(d, {
|
|
2032
|
+
class: "b-range-filter__input-field",
|
|
2033
|
+
value: e.internalFilterValue ? e.internalFilterValue[1] : "",
|
|
2034
|
+
type: "number",
|
|
2035
|
+
"aria-label": e.t("to"),
|
|
2036
|
+
disabled: e.disabled,
|
|
2037
|
+
onInput: e.updateTo
|
|
2038
|
+
}, {
|
|
2039
|
+
default: C(() => [
|
|
2040
|
+
X(x(e.t("to")), 1)
|
|
2041
|
+
]),
|
|
2042
|
+
_: 1
|
|
2043
|
+
}, 8, ["value", "aria-label", "disabled", "onInput"])
|
|
2044
|
+
], 34)
|
|
2045
|
+
]),
|
|
2046
|
+
_: 1
|
|
2047
|
+
}, 16, ["disable-apply-button", "disable-secondary-button", "button-label", "button-secondary-label", "only-slot", "tooltip-position", "tooltip-text", "onApply", "onClear", "onOpen", "onReset"]);
|
|
2048
|
+
}
|
|
2049
|
+
const Lt = /* @__PURE__ */ le(Xl, [["render", xl], ["__scopeId", "data-v-355c6c3b"]]);
|
|
2050
|
+
var je = /* @__PURE__ */ ((e) => (e.INPUT = "input", e))(je || {});
|
|
2051
|
+
const ea = Q({
|
|
2052
|
+
name: "base-filter-button",
|
|
2053
|
+
components: { BaseButton: pt, BentoTypography: ve, ChevronUpIcon: Qt, ChevronDownIcon: Xt },
|
|
2054
|
+
props: {
|
|
2055
|
+
/**
|
|
2056
|
+
* The number of applies values within the filter.
|
|
2057
|
+
* e.g. if 2 items in a dropdown filter have been applied, the number 2 will be shown here.
|
|
2058
|
+
*/
|
|
2059
|
+
amountAppliedValues: { type: [Number, String], default: null },
|
|
2060
|
+
/**
|
|
2061
|
+
* Disables button functionality.
|
|
2062
|
+
*/
|
|
2063
|
+
disabled: { type: Boolean, default: !1 },
|
|
2064
|
+
/**
|
|
2065
|
+
* Signifies if the filter is open or closed.
|
|
2066
|
+
*/
|
|
2067
|
+
isFilterOpen: { type: Boolean, default: !1 },
|
|
2068
|
+
/**
|
|
2069
|
+
* Toggles if a chevron icon should be displayed in the button.
|
|
2070
|
+
* The chevron will change depending on the open state of the filter.
|
|
2071
|
+
*/
|
|
2072
|
+
hasChevron: { type: Boolean, default: !1 },
|
|
2073
|
+
/**
|
|
2074
|
+
* Renders the text in a stronger variant.
|
|
2075
|
+
*/
|
|
2076
|
+
bold: { type: Boolean, default: !1 }
|
|
2077
|
+
},
|
|
2078
|
+
emits: [We.CLICK],
|
|
2079
|
+
setup(e, { slots: n, emit: l, attrs: s }) {
|
|
2080
|
+
const t = p(() => n.default ? vt(n)("default") : null), o = ft({ ariaLabel: t }), d = K(null), a = p(() => {
|
|
2081
|
+
var b;
|
|
2082
|
+
return {
|
|
2083
|
+
"aria-controls": (b = s["aria-controls"]) == null ? void 0 : b.toString()
|
|
2084
|
+
};
|
|
2085
|
+
}), i = p(() => ({
|
|
2086
|
+
"b-base-filter-button--with-chevron": e.hasChevron,
|
|
2087
|
+
"b-base-filter-button--filter-open": e.isFilterOpen
|
|
2088
|
+
}));
|
|
2089
|
+
return {
|
|
2090
|
+
// Values
|
|
2091
|
+
ariaAttributes: a,
|
|
2092
|
+
computedAriaLabel: o,
|
|
2093
|
+
conditionalClasses: i,
|
|
2094
|
+
// Methods
|
|
2095
|
+
onClickButton: () => {
|
|
2096
|
+
e.disabled || l(We.CLICK);
|
|
2097
|
+
},
|
|
2098
|
+
hasSlot: bt(n),
|
|
2099
|
+
// Refs
|
|
2100
|
+
baseFilterButtonRef: d
|
|
2101
|
+
};
|
|
2102
|
+
}
|
|
2103
|
+
}), ta = { class: "b-base-filter-button__default-container" }, la = { class: "b-base-filter-button__label-container" }, aa = {
|
|
2104
|
+
key: 0,
|
|
2105
|
+
class: "b-base-filter-button__counter-wrapper"
|
|
2106
|
+
};
|
|
2107
|
+
function oa(e, n, l, s, t, o) {
|
|
2108
|
+
const d = N("bento-typography"), a = N("chevron-up-icon"), i = N("chevron-down-icon"), v = N("base-button");
|
|
2109
|
+
return F(), w(v, {
|
|
2110
|
+
ref: "baseFilterButtonRef",
|
|
2111
|
+
class: de(["b-base-filter-button", e.conditionalClasses]),
|
|
2112
|
+
disabled: e.disabled,
|
|
2113
|
+
"aria-label": e.computedAriaLabel,
|
|
2114
|
+
"aria-controls": e.ariaAttributes["aria-controls"],
|
|
2115
|
+
type: "button",
|
|
2116
|
+
onClick: e.onClickButton
|
|
2117
|
+
}, Pe({
|
|
2118
|
+
default: C(() => [
|
|
2119
|
+
W("div", ta, [
|
|
2120
|
+
W("div", la, [
|
|
2121
|
+
R(d, {
|
|
2122
|
+
el: "span",
|
|
2123
|
+
variant: "body",
|
|
2124
|
+
stronger: e.bold,
|
|
2125
|
+
class: "b-base-filter-button__label"
|
|
2126
|
+
}, {
|
|
2127
|
+
default: C(() => [
|
|
2128
|
+
ce(e.$slots, "default", {}, void 0, !0)
|
|
2129
|
+
]),
|
|
2130
|
+
_: 3
|
|
2131
|
+
}, 8, ["stronger"])
|
|
2132
|
+
]),
|
|
2133
|
+
e.amountAppliedValues && !e.hasChevron ? (F(), G("div", aa, [
|
|
2134
|
+
R(d, {
|
|
2135
|
+
class: "b-base-filter-button__counter",
|
|
2136
|
+
el: "span",
|
|
2137
|
+
variant: "body",
|
|
2138
|
+
stronger: ""
|
|
2139
|
+
}, {
|
|
2140
|
+
default: C(() => [
|
|
2141
|
+
X(x(e.amountAppliedValues), 1)
|
|
2142
|
+
]),
|
|
2143
|
+
_: 1
|
|
2144
|
+
})
|
|
2145
|
+
])) : Z("", !0)
|
|
2146
|
+
])
|
|
2147
|
+
]),
|
|
2148
|
+
_: 2
|
|
2149
|
+
}, [
|
|
2150
|
+
e.hasChevron ? {
|
|
2151
|
+
name: "iconRight",
|
|
2152
|
+
fn: C(() => [
|
|
2153
|
+
e.isFilterOpen ? (F(), w(a, {
|
|
2154
|
+
key: 0,
|
|
2155
|
+
"aria-hidden": "true"
|
|
2156
|
+
})) : (F(), w(i, {
|
|
2157
|
+
key: 1,
|
|
2158
|
+
"aria-hidden": "true"
|
|
2159
|
+
}))
|
|
2160
|
+
]),
|
|
2161
|
+
key: "0"
|
|
2162
|
+
} : void 0
|
|
2163
|
+
]), 1032, ["class", "disabled", "aria-label", "aria-controls", "onClick"]);
|
|
2164
|
+
}
|
|
2165
|
+
const na = /* @__PURE__ */ le(ea, [["render", oa], ["__scopeId", "data-v-af9efc73"]]), sa = Q({
|
|
2166
|
+
name: "all-filters-modal-button",
|
|
2167
|
+
components: { BaseFilterButton: na },
|
|
2168
|
+
props: {
|
|
2169
|
+
/**
|
|
2170
|
+
* Button label to be displayed
|
|
2171
|
+
*/
|
|
2172
|
+
label: { type: String, required: !0 },
|
|
2173
|
+
/**
|
|
2174
|
+
* Total count of applied filters
|
|
2175
|
+
*/
|
|
2176
|
+
appliedFiltersCount: { type: [Number, String], default: null },
|
|
2177
|
+
/**
|
|
2178
|
+
* Indicates whether the filter popover tied to this button is showing
|
|
2179
|
+
*/
|
|
2180
|
+
isFilterOpen: { type: Boolean, default: !1 },
|
|
2181
|
+
/**
|
|
2182
|
+
* Disables button functionality.
|
|
2183
|
+
*/
|
|
2184
|
+
disabled: { type: Boolean, default: !1 }
|
|
2185
|
+
},
|
|
2186
|
+
emits: ["click"],
|
|
2187
|
+
setup(e, { emit: n }) {
|
|
2188
|
+
return {
|
|
2189
|
+
conditionalClasses: p(() => ({
|
|
2190
|
+
"b-all-filters-modal-button--with-counter": e.appliedFiltersCount,
|
|
2191
|
+
"b-all-filters-modal-button--filter-open": e.isFilterOpen
|
|
2192
|
+
})),
|
|
2193
|
+
onClick: () => {
|
|
2194
|
+
n("click");
|
|
2195
|
+
}
|
|
2196
|
+
};
|
|
2197
|
+
}
|
|
2198
|
+
});
|
|
2199
|
+
function ia(e, n, l, s, t, o) {
|
|
2200
|
+
const d = N("base-filter-button");
|
|
2201
|
+
return F(), w(d, {
|
|
2202
|
+
class: de(["b-all-filters-modal-button", e.conditionalClasses]),
|
|
2203
|
+
"amount-applied-values": e.appliedFiltersCount,
|
|
2204
|
+
"is-filter-open": e.isFilterOpen,
|
|
2205
|
+
disabled: e.disabled,
|
|
2206
|
+
onClick: e.onClick
|
|
2207
|
+
}, {
|
|
2208
|
+
default: C(() => [
|
|
2209
|
+
X(x(e.label), 1)
|
|
2210
|
+
]),
|
|
2211
|
+
_: 1
|
|
2212
|
+
}, 8, ["class", "amount-applied-values", "is-filter-open", "disabled", "onClick"]);
|
|
2213
|
+
}
|
|
2214
|
+
const ra = /* @__PURE__ */ le(sa, [["render", ia], ["__scopeId", "data-v-b96a672f"]]);
|
|
2215
|
+
let nt = 0;
|
|
2216
|
+
const ua = {
|
|
2217
|
+
beforeCreate() {
|
|
2218
|
+
this.uuid = nt.toString(), nt += 1;
|
|
2219
|
+
}
|
|
2220
|
+
}, da = { key: 0 };
|
|
2221
|
+
function ca(e, n, l, s, t, o) {
|
|
2222
|
+
return F(), G("svg", re({ role: "img" }, e.$attrs, {
|
|
2223
|
+
class: "ui-assets-icons-16",
|
|
2224
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2225
|
+
width: "16",
|
|
2226
|
+
height: "16",
|
|
2227
|
+
fill: "none"
|
|
2228
|
+
}), [
|
|
2229
|
+
e.$attrs["svg-title"] ? (F(), G("title", da, x(e.$attrs["svg-title"]), 1)) : Z("", !0),
|
|
2230
|
+
n[0] || (n[0] = W("path", {
|
|
2231
|
+
fill: "#001222",
|
|
2232
|
+
d: "M12.6465 4.58337C12.32 3.42912 11.2588 2.58337 10 2.58337C8.74122 2.58337 7.67998 3.42912 7.35352 4.58337H1.25V6.08337H7.35352C7.67998 7.23763 8.74122 8.08337 10 8.08337C11.2588 8.08337 12.32 7.23763 12.6465 6.08337H14.75V4.58337H12.6465ZM11.25 5.33337C11.25 6.02373 10.6904 6.58337 10 6.58337C9.30964 6.58337 8.75 6.02373 8.75 5.33337C8.75 4.64302 9.30964 4.08337 10 4.08337C10.6904 4.08337 11.25 4.64302 11.25 5.33337Z"
|
|
2233
|
+
}, null, -1)),
|
|
2234
|
+
n[1] || (n[1] = W("path", {
|
|
2235
|
+
fill: "#001222",
|
|
2236
|
+
d: "M4 7.91687C5.25878 7.91687 6.32002 8.76262 6.64648 9.91687H14.75V11.4169H6.64648C6.32002 12.5711 5.25878 13.4169 4 13.4169C2.48122 13.4169 1.25 12.1857 1.25 10.6669C1.25 9.14809 2.48122 7.91687 4 7.91687ZM5.25 10.6669C5.25 9.97651 4.69036 9.41687 4 9.41687C3.30964 9.41687 2.75 9.97651 2.75 10.6669C2.75 11.3572 3.30964 11.9169 4 11.9169C4.69036 11.9169 5.25 11.3572 5.25 10.6669Z"
|
|
2237
|
+
}, null, -1))
|
|
2238
|
+
], 16);
|
|
2239
|
+
}
|
|
2240
|
+
const pa = /* @__PURE__ */ le(ua, [["render", ca]]), st = {
|
|
2241
|
+
"en-US": {
|
|
2242
|
+
activeFilters: "Active filters",
|
|
2243
|
+
all: "All",
|
|
2244
|
+
allFilters: "All filters",
|
|
2245
|
+
applyAll: "Apply all",
|
|
2246
|
+
cancel: "Cancel",
|
|
2247
|
+
clear: "Clear",
|
|
2248
|
+
clearAll: "Clear all",
|
|
2249
|
+
noFiltersMatchThisSearch: "No filters match this search",
|
|
2250
|
+
otherFilters: "Other filters",
|
|
2251
|
+
searchBar: "Search bar"
|
|
2252
|
+
},
|
|
2253
|
+
"ja-JP": {
|
|
2254
|
+
activeFilters: "適用中のフィルター",
|
|
2255
|
+
all: "すべて",
|
|
2256
|
+
allFilters: "すべてのフィルター",
|
|
2257
|
+
applyAll: "すべて適用",
|
|
2258
|
+
cancel: "キャンセル",
|
|
2259
|
+
clear: "クリア",
|
|
2260
|
+
clearAll: "すべてクリア",
|
|
2261
|
+
noFiltersMatchThisSearch: "この検索に一致するフィルターはありません",
|
|
2262
|
+
otherFilters: "その他のフィルター",
|
|
2263
|
+
searchBar: "検索バー"
|
|
2264
|
+
},
|
|
2265
|
+
"pt-BR": {
|
|
2266
|
+
activeFilters: "Filtros ativos",
|
|
2267
|
+
all: "Todos",
|
|
2268
|
+
allFilters: "Todos os filtros",
|
|
2269
|
+
applyAll: "Aplicar tudo",
|
|
2270
|
+
cancel: "Cancelar",
|
|
2271
|
+
clear: "Limpar",
|
|
2272
|
+
clearAll: "Limpar tudo",
|
|
2273
|
+
noFiltersMatchThisSearch: "Nenhum filtro corresponde a esta pesquisa",
|
|
2274
|
+
otherFilters: "Outros filtros",
|
|
2275
|
+
searchBar: "Barra de pesquisa"
|
|
2276
|
+
}
|
|
2277
|
+
}, ba = Q({
|
|
2278
|
+
i18n: { messages: st },
|
|
2279
|
+
name: "all-filters-modal",
|
|
2280
|
+
components: {
|
|
2281
|
+
AllFiltersModalButton: ra,
|
|
2282
|
+
BentoBooleanFilter: Et,
|
|
2283
|
+
BentoButton: Mt,
|
|
2284
|
+
BentoDateFilter: Ct,
|
|
2285
|
+
BentoDateRangeFilter: Bt,
|
|
2286
|
+
BentoInputFilter: gt,
|
|
2287
|
+
BentoInputWithDropdownFilter: St,
|
|
2288
|
+
BentoModal: Vt,
|
|
2289
|
+
BentoRangeFilter: Lt,
|
|
2290
|
+
BentoSearchBar: ke,
|
|
2291
|
+
BentoSelectAvatarFilter: Tt,
|
|
2292
|
+
BentoSelectCurrencyFilter: It,
|
|
2293
|
+
BentoSelectCountryFilter: _t,
|
|
2294
|
+
BentoSelectFilter: De,
|
|
2295
|
+
BentoSelectPaymentMethodFilter: $t,
|
|
2296
|
+
BentoSelectTagFilter: Pt,
|
|
2297
|
+
BentoTypography: ve,
|
|
2298
|
+
FilterBarButton: Ee,
|
|
2299
|
+
SlidersIcon: pa
|
|
2300
|
+
},
|
|
2301
|
+
props: {
|
|
2302
|
+
/**
|
|
2303
|
+
* Array of filters based on {@see FilterBarModel}.
|
|
2304
|
+
* Each one of the elements in the array correspond to a filter that will
|
|
2305
|
+
* be created and rendered in the AllFiltersModal.
|
|
2306
|
+
*
|
|
2307
|
+
* Can be used with v-model or independently with the @input event.
|
|
2308
|
+
*
|
|
2309
|
+
* @example
|
|
2310
|
+
* [{
|
|
2311
|
+
* field: 'company',
|
|
2312
|
+
* label: 'Company',
|
|
2313
|
+
* value: '200',
|
|
2314
|
+
* type: FilterType.TEXT,
|
|
2315
|
+
* }, {
|
|
2316
|
+
* field: 'name',
|
|
2317
|
+
* label: 'Name',
|
|
2318
|
+
* value: null,
|
|
2319
|
+
* type: FilterType.TEXT,
|
|
2320
|
+
* }]
|
|
2321
|
+
*/
|
|
2322
|
+
value: {
|
|
2323
|
+
type: Array,
|
|
2324
|
+
default: () => []
|
|
2325
|
+
}
|
|
2326
|
+
},
|
|
2327
|
+
emits: [je.INPUT],
|
|
2328
|
+
setup(e, { emit: n }) {
|
|
2329
|
+
const l = K(e.value), s = qe("all-filters-modal"), t = K([]), o = K(!1), d = K(0), a = K(null), i = K(""), { t: v, n: b } = pe({ messages: st }), A = mt(i, te(l, "value")), $ = K({});
|
|
2330
|
+
Ve(() => {
|
|
2331
|
+
$.value = [];
|
|
2332
|
+
}), ie(
|
|
2333
|
+
() => e.value,
|
|
2334
|
+
() => {
|
|
2335
|
+
o.value ? l.value = e.value.map((y, m) => ({ ...y, value: l.value[m].value })) : l.value = e.value;
|
|
2336
|
+
}
|
|
2337
|
+
);
|
|
2338
|
+
const c = (y) => y.sort((m, k) => m.label > k.label ? 1 : k.label > m.label ? -1 : 0), g = p(
|
|
2339
|
+
() => c(
|
|
2340
|
+
A.value.filter(
|
|
2341
|
+
(y) => {
|
|
2342
|
+
var m, k;
|
|
2343
|
+
return Array.isArray(y.value) ? ((m = y.value) == null ? void 0 : m.length) && ((k = y.value) == null ? void 0 : k.find((q) => q !== "")) : y.value;
|
|
2344
|
+
}
|
|
2345
|
+
)
|
|
2346
|
+
)
|
|
2347
|
+
), P = p(
|
|
2348
|
+
() => c(
|
|
2349
|
+
A.value.filter(
|
|
2350
|
+
(y) => {
|
|
2351
|
+
var m, k;
|
|
2352
|
+
return Array.isArray(y.value) ? ((m = y.value) == null ? void 0 : m.length) === 0 || ((k = y.value) == null ? void 0 : k.every((q) => q === "")) : !y.value;
|
|
2353
|
+
}
|
|
2354
|
+
)
|
|
2355
|
+
)
|
|
2356
|
+
), _ = p(() => {
|
|
2357
|
+
var y;
|
|
2358
|
+
return i.value && ((y = A.value) == null ? void 0 : y.length) === 0;
|
|
2359
|
+
}), U = p(() => l.value[d.value]), H = () => {
|
|
2360
|
+
const y = g.value.length ? g.value[0] : P.value[0], m = l.value.findIndex(
|
|
2361
|
+
(k) => k.label === y.label && k.field === y.field
|
|
2362
|
+
);
|
|
2363
|
+
d.value = m;
|
|
2364
|
+
};
|
|
2365
|
+
ut(() => {
|
|
2366
|
+
H();
|
|
2367
|
+
});
|
|
2368
|
+
const E = (y) => y.map((m) => {
|
|
2369
|
+
var k, q, ae, ue, be, fe;
|
|
2370
|
+
switch (m.type) {
|
|
2371
|
+
case se.SELECT:
|
|
2372
|
+
case se.SELECT_AVATAR:
|
|
2373
|
+
case se.SELECT_COUNTRY:
|
|
2374
|
+
case se.SELECT_CURRENCY:
|
|
2375
|
+
case se.SELECT_PAYMENT_METHOD:
|
|
2376
|
+
case se.SELECT_TAG:
|
|
2377
|
+
switch ((k = m.options) == null ? void 0 : k.multiple) {
|
|
2378
|
+
case !0:
|
|
2379
|
+
return {
|
|
2380
|
+
label: m.label,
|
|
2381
|
+
field: m.field,
|
|
2382
|
+
count: (q = m.value) != null && q.length ? (ae = m.value) == null ? void 0 : ae.length : null
|
|
2383
|
+
};
|
|
2384
|
+
default:
|
|
2385
|
+
return {
|
|
2386
|
+
label: m.label,
|
|
2387
|
+
field: m.field,
|
|
2388
|
+
count: m.value == null ? null : 1
|
|
2389
|
+
};
|
|
2390
|
+
}
|
|
2391
|
+
case se.DATE_RANGE:
|
|
2392
|
+
return {
|
|
2393
|
+
label: m.label,
|
|
2394
|
+
field: m.field,
|
|
2395
|
+
count: ((ue = m.value) == null ? void 0 : ue.startDate) != null && ((be = m.value) == null ? void 0 : be.endDate) != null ? 1 : null
|
|
2396
|
+
};
|
|
2397
|
+
case se.RANGE:
|
|
2398
|
+
return {
|
|
2399
|
+
label: m.label,
|
|
2400
|
+
field: m.field,
|
|
2401
|
+
count: (fe = m.value) != null && fe.find((Fe) => Fe !== "") ? 1 : null
|
|
2402
|
+
};
|
|
2403
|
+
case se.INPUT:
|
|
2404
|
+
case se.BOOLEAN:
|
|
2405
|
+
case se.DATE:
|
|
2406
|
+
default:
|
|
2407
|
+
return {
|
|
2408
|
+
label: m.label,
|
|
2409
|
+
field: m.field,
|
|
2410
|
+
count: m.value != null ? 1 : null
|
|
2411
|
+
};
|
|
2412
|
+
}
|
|
2413
|
+
}), j = p(
|
|
2414
|
+
() => {
|
|
2415
|
+
var y;
|
|
2416
|
+
return Array.isArray(U.value.value) ? ((y = U.value) == null ? void 0 : y.value.length) && U.value.value.find((m) => m !== "") : !!l.value[d.value].value;
|
|
2417
|
+
}
|
|
2418
|
+
), h = p(() => !j.value || U.value.disabled), V = p(
|
|
2419
|
+
() => {
|
|
2420
|
+
var y;
|
|
2421
|
+
return (y = E(e.value)) == null ? void 0 : y.filter(({ count: m }) => !!m).length;
|
|
2422
|
+
}
|
|
2423
|
+
), M = () => {
|
|
2424
|
+
o.value ? o.value = !1 : o.value = !0;
|
|
2425
|
+
}, I = (y) => {
|
|
2426
|
+
var k, q, ae;
|
|
2427
|
+
const m = E(l.value).find((ue) => ue.field === y.field).count;
|
|
2428
|
+
return typeof y.type == "string" && // Type guard to avoid casting
|
|
2429
|
+
y.type.includes("BentoSelect") && ((k = y.options) != null && k.multiple) && m === ((ae = (q = y.options) == null ? void 0 : q.listboxItems) == null ? void 0 : ae.length) ? v("all") : m === null ? null : b(m);
|
|
2430
|
+
}, B = (y, m) => {
|
|
2431
|
+
d.value = l.value.findIndex(
|
|
2432
|
+
(k) => k.label === y && k.field === m
|
|
2433
|
+
);
|
|
2434
|
+
}, J = () => {
|
|
2435
|
+
i.value = "";
|
|
2436
|
+
}, z = () => {
|
|
2437
|
+
o.value = !1, l.value = e.value, J(), H();
|
|
2438
|
+
}, ee = (y) => {
|
|
2439
|
+
const m = l.value.map(({ value: k, ...q }, ae) => ae === d.value ? { value: y.value, ...q } : { value: k, ...q });
|
|
2440
|
+
l.value = m;
|
|
2441
|
+
}, S = () => {
|
|
2442
|
+
ee({
|
|
2443
|
+
field: U.value.field,
|
|
2444
|
+
label: U.value.label,
|
|
2445
|
+
type: U.value.type,
|
|
2446
|
+
value: void 0
|
|
2447
|
+
});
|
|
2448
|
+
}, f = () => {
|
|
2449
|
+
l.value = e.value.map(({ value: y, ...m }) => ({
|
|
2450
|
+
...m,
|
|
2451
|
+
value: void 0
|
|
2452
|
+
}));
|
|
2453
|
+
}, r = () => {
|
|
2454
|
+
n(je.INPUT, l.value), o.value = !1;
|
|
2455
|
+
}, O = p(
|
|
2456
|
+
() => JSON.stringify(l.value) === JSON.stringify(e.value)
|
|
2457
|
+
), Y = p(() => [
|
|
2458
|
+
{
|
|
2459
|
+
title: v("applyAll"),
|
|
2460
|
+
disabled: O.value,
|
|
2461
|
+
event: r
|
|
2462
|
+
},
|
|
2463
|
+
{
|
|
2464
|
+
title: v("cancel"),
|
|
2465
|
+
event: z
|
|
2466
|
+
},
|
|
2467
|
+
{
|
|
2468
|
+
title: v("clearAll"),
|
|
2469
|
+
disabled: !V.value,
|
|
2470
|
+
event: f
|
|
2471
|
+
}
|
|
2472
|
+
]);
|
|
2473
|
+
return {
|
|
2474
|
+
// Values
|
|
2475
|
+
allFiltersModalUniqueId: s,
|
|
2476
|
+
allFiltersModalFiltersSection: t,
|
|
2477
|
+
allFiltersModalFilterButtons: $,
|
|
2478
|
+
numberOfActiveFilters: V,
|
|
2479
|
+
isEmptyResultForSearchFilter: _,
|
|
2480
|
+
isModalOpen: o,
|
|
2481
|
+
isClearButtonDisabled: h,
|
|
2482
|
+
activeFilters: g,
|
|
2483
|
+
otherFilters: P,
|
|
2484
|
+
modalActions: Y,
|
|
2485
|
+
selectedFilter: U,
|
|
2486
|
+
selectedFilterRef: a,
|
|
2487
|
+
searchTerm: i,
|
|
2488
|
+
// Methods
|
|
2489
|
+
onClickAllFiltersModal: M,
|
|
2490
|
+
getFilterCount: I,
|
|
2491
|
+
cancel: z,
|
|
2492
|
+
selectFilter: B,
|
|
2493
|
+
clearFilter: S,
|
|
2494
|
+
updateFilter: ee,
|
|
2495
|
+
onSearchbarClear: J,
|
|
2496
|
+
onKeydownRight: () => {
|
|
2497
|
+
Zt(1, a.value.$el).focus();
|
|
2498
|
+
},
|
|
2499
|
+
onKeydownLeft: () => {
|
|
2500
|
+
$.value[U.value.label].$el.focus();
|
|
2501
|
+
},
|
|
2502
|
+
// Translations
|
|
2503
|
+
t: v
|
|
2504
|
+
};
|
|
2505
|
+
}
|
|
2506
|
+
}), fa = { class: "b-all-filters-modal" }, va = {
|
|
2507
|
+
key: 0,
|
|
2508
|
+
class: "b-all-filters-modal__empty-search-message"
|
|
2509
|
+
}, ma = {
|
|
2510
|
+
key: 1,
|
|
2511
|
+
class: "b-all-filters-modal__filters-section"
|
|
2512
|
+
}, ya = ["aria-labelledby"], ha = {
|
|
2513
|
+
key: 2,
|
|
2514
|
+
class: "b-all-filters-modal__filters-section"
|
|
2515
|
+
}, Fa = ["aria-labelledby"], ga = { class: "b-all-filters-modal__selected-filter-text" }, Sa = { class: "b-all-filters-modal__selected-filter-component" }, Ca = { class: "b-all-filters-modal__clear-button" };
|
|
2516
|
+
function Ba(e, n, l, s, t, o) {
|
|
2517
|
+
const d = N("sliders-icon"), a = N("filter-bar-button"), i = N("bento-search-bar"), v = N("bento-typography"), b = N("all-filters-modal-button"), A = N("bento-button"), $ = N("bento-modal");
|
|
2518
|
+
return F(), G("div", fa, [
|
|
2519
|
+
R(a, {
|
|
2520
|
+
"is-filter-open": e.isModalOpen,
|
|
2521
|
+
"applied-filters-count": e.numberOfActiveFilters,
|
|
2522
|
+
"no-applied-state-styles": "",
|
|
2523
|
+
onClick: e.onClickAllFiltersModal
|
|
2524
|
+
}, {
|
|
2525
|
+
iconLeft: C(() => [
|
|
2526
|
+
R(d, { "aria-hidden": "true" })
|
|
2527
|
+
]),
|
|
2528
|
+
default: C(() => [
|
|
2529
|
+
X(x(e.t("allFilters")) + " ", 1)
|
|
2530
|
+
]),
|
|
2531
|
+
_: 1
|
|
2532
|
+
}, 8, ["is-filter-open", "applied-filters-count", "onClick"]),
|
|
2533
|
+
R($, {
|
|
2534
|
+
class: "'b-all-filters-modal__modal'",
|
|
2535
|
+
"is-open": e.isModalOpen,
|
|
2536
|
+
"with-column-layout": !0,
|
|
2537
|
+
size: "large",
|
|
2538
|
+
actions: e.modalActions,
|
|
2539
|
+
"is-dismissible": !1,
|
|
2540
|
+
"hide-close-button": "",
|
|
2541
|
+
onCloseModal: e.cancel
|
|
2542
|
+
}, {
|
|
2543
|
+
default: C(() => [
|
|
2544
|
+
X(x(e.t("allFilters")), 1)
|
|
2545
|
+
]),
|
|
2546
|
+
"content-col-1": C(() => [
|
|
2547
|
+
W("div", {
|
|
2548
|
+
ref: "allFiltersModalFiltersSection",
|
|
2549
|
+
class: "b-all-filters-modal__filters",
|
|
2550
|
+
onKeydown: n[1] || (n[1] = me((...c) => e.onKeydownRight && e.onKeydownRight(...c), ["right"]))
|
|
2551
|
+
}, [
|
|
2552
|
+
R(i, {
|
|
2553
|
+
class: "b-all-filters-modal__search-bar",
|
|
2554
|
+
value: e.searchTerm,
|
|
2555
|
+
"input-field-aria-label": e.t("searchBar").toString(),
|
|
2556
|
+
onInput: n[0] || (n[0] = (c) => e.searchTerm = c),
|
|
2557
|
+
onClear: e.onSearchbarClear
|
|
2558
|
+
}, null, 8, ["value", "input-field-aria-label", "onClear"]),
|
|
2559
|
+
e.isEmptyResultForSearchFilter ? (F(), G("div", va, [
|
|
2560
|
+
R(v, { el: "span" }, {
|
|
2561
|
+
default: C(() => [
|
|
2562
|
+
X(x(e.t("noFiltersMatchThisSearch")), 1)
|
|
2563
|
+
]),
|
|
2564
|
+
_: 1
|
|
2565
|
+
})
|
|
2566
|
+
])) : Z("", !0),
|
|
2567
|
+
e.activeFilters.length ? (F(), G("div", ma, [
|
|
2568
|
+
R(v, {
|
|
2569
|
+
id: `active-filters-${e.allFiltersModalUniqueId}`,
|
|
2570
|
+
class: "b-all-filters-modal__filters-section-title",
|
|
2571
|
+
el: "span",
|
|
2572
|
+
variant: "caption"
|
|
2573
|
+
}, {
|
|
2574
|
+
default: C(() => [
|
|
2575
|
+
X(x(e.t("activeFilters")), 1)
|
|
2576
|
+
]),
|
|
2577
|
+
_: 1
|
|
2578
|
+
}, 8, ["id"]),
|
|
2579
|
+
W("ul", {
|
|
2580
|
+
class: "b-all-filters-modal__filters-list",
|
|
2581
|
+
"aria-labelledby": `active-filters-${e.allFiltersModalUniqueId}`
|
|
2582
|
+
}, [
|
|
2583
|
+
(F(!0), G($e, null, ye(e.activeFilters, (c) => (F(), G("li", {
|
|
2584
|
+
key: `${c.label}-${c.field}`
|
|
2585
|
+
}, [
|
|
2586
|
+
R(b, {
|
|
2587
|
+
ref_for: !0,
|
|
2588
|
+
ref: (g) => e.allFiltersModalFilterButtons[c.label] = g,
|
|
2589
|
+
label: c.label,
|
|
2590
|
+
"applied-filters-count": e.getFilterCount(c),
|
|
2591
|
+
"is-filter-open": e.selectedFilter.label === c.label,
|
|
2592
|
+
disabled: c.disabled,
|
|
2593
|
+
onClick: (g) => e.selectFilter(c.label, c.field)
|
|
2594
|
+
}, null, 8, ["label", "applied-filters-count", "is-filter-open", "disabled", "onClick"])
|
|
2595
|
+
]))), 128))
|
|
2596
|
+
], 8, ya)
|
|
2597
|
+
])) : Z("", !0),
|
|
2598
|
+
e.otherFilters.length ? (F(), G("div", ha, [
|
|
2599
|
+
e.activeFilters.length ? (F(), w(v, {
|
|
2600
|
+
key: 0,
|
|
2601
|
+
id: `other-filters-${e.allFiltersModalUniqueId}`,
|
|
2602
|
+
class: "b-all-filters-modal__filters-section-title",
|
|
2603
|
+
el: "span",
|
|
2604
|
+
variant: "caption"
|
|
2605
|
+
}, {
|
|
2606
|
+
default: C(() => [
|
|
2607
|
+
X(x(e.t("otherFilters")), 1)
|
|
2608
|
+
]),
|
|
2609
|
+
_: 1
|
|
2610
|
+
}, 8, ["id"])) : Z("", !0),
|
|
2611
|
+
W("ul", {
|
|
2612
|
+
class: "b-all-filters-modal__filters-list",
|
|
2613
|
+
"aria-labelledby": `other-filters-${e.allFiltersModalUniqueId}`
|
|
2614
|
+
}, [
|
|
2615
|
+
(F(!0), G($e, null, ye(e.otherFilters, (c) => (F(), G("li", {
|
|
2616
|
+
key: `${c.label}-${c.field}`
|
|
2617
|
+
}, [
|
|
2618
|
+
R(b, {
|
|
2619
|
+
ref_for: !0,
|
|
2620
|
+
ref: (g) => e.allFiltersModalFilterButtons[c.label] = g,
|
|
2621
|
+
label: c.label,
|
|
2622
|
+
disabled: c.disabled,
|
|
2623
|
+
"applied-filters-count": e.getFilterCount(c),
|
|
2624
|
+
"is-filter-open": e.selectedFilter.label === c.label,
|
|
2625
|
+
onClick: (g) => e.selectFilter(c.label, c.field)
|
|
2626
|
+
}, null, 8, ["label", "disabled", "applied-filters-count", "is-filter-open", "onClick"])
|
|
2627
|
+
]))), 128))
|
|
2628
|
+
], 8, Fa)
|
|
2629
|
+
])) : Z("", !0)
|
|
2630
|
+
], 544)
|
|
2631
|
+
]),
|
|
2632
|
+
"content-col-2": C(() => [
|
|
2633
|
+
W("div", {
|
|
2634
|
+
class: "b-all-filters-modal__selected-filter-content",
|
|
2635
|
+
onKeydown: n[2] || (n[2] = me((...c) => e.onKeydownLeft && e.onKeydownLeft(...c), ["left"]))
|
|
2636
|
+
}, [
|
|
2637
|
+
W("div", ga, [
|
|
2638
|
+
R(v, {
|
|
2639
|
+
el: "div",
|
|
2640
|
+
variant: "title",
|
|
2641
|
+
medium: ""
|
|
2642
|
+
}, {
|
|
2643
|
+
default: C(() => [
|
|
2644
|
+
X(x(e.selectedFilter.label), 1)
|
|
2645
|
+
]),
|
|
2646
|
+
_: 1
|
|
2647
|
+
}),
|
|
2648
|
+
e.selectedFilter.description ? (F(), w(v, {
|
|
2649
|
+
key: 0,
|
|
2650
|
+
el: "div",
|
|
2651
|
+
variant: "body",
|
|
2652
|
+
wide: ""
|
|
2653
|
+
}, {
|
|
2654
|
+
default: C(() => [
|
|
2655
|
+
X(x(e.selectedFilter.description), 1)
|
|
2656
|
+
]),
|
|
2657
|
+
_: 1
|
|
2658
|
+
})) : Z("", !0)
|
|
2659
|
+
]),
|
|
2660
|
+
W("div", Sa, [
|
|
2661
|
+
(F(), w(Oe(e.selectedFilter.type), {
|
|
2662
|
+
ref: "selectedFilterRef",
|
|
2663
|
+
key: e.selectedFilter.field,
|
|
2664
|
+
field: e.selectedFilter.field,
|
|
2665
|
+
label: e.selectedFilter.label,
|
|
2666
|
+
options: e.selectedFilter.options,
|
|
2667
|
+
value: e.selectedFilter.value,
|
|
2668
|
+
"default-value": e.selectedFilter.defaultValue,
|
|
2669
|
+
"only-slot": !0,
|
|
2670
|
+
disabled: e.selectedFilter.disabled,
|
|
2671
|
+
onInput: e.updateFilter
|
|
2672
|
+
}, null, 40, ["field", "label", "options", "value", "default-value", "disabled", "onInput"]))
|
|
2673
|
+
]),
|
|
2674
|
+
W("div", Ca, [
|
|
2675
|
+
R(A, {
|
|
2676
|
+
variant: "secondary",
|
|
2677
|
+
disabled: e.isClearButtonDisabled,
|
|
2678
|
+
onClick: e.clearFilter
|
|
2679
|
+
}, {
|
|
2680
|
+
default: C(() => [
|
|
2681
|
+
X(x(e.t("clear")), 1)
|
|
2682
|
+
]),
|
|
2683
|
+
_: 1
|
|
2684
|
+
}, 8, ["disabled", "onClick"])
|
|
2685
|
+
])
|
|
2686
|
+
], 32)
|
|
2687
|
+
]),
|
|
2688
|
+
_: 1
|
|
2689
|
+
}, 8, ["is-open", "actions", "onCloseModal"])
|
|
2690
|
+
]);
|
|
2691
|
+
}
|
|
2692
|
+
const Da = /* @__PURE__ */ le(ba, [["render", Ba], ["__scopeId", "data-v-cf3baf81"]]), Ut = {
|
|
2693
|
+
"en-US": {
|
|
2694
|
+
clearFilters: "Clear filters",
|
|
2695
|
+
filtersHaveBeenCleared: "Filters have been cleared.",
|
|
2696
|
+
filtersHaveBeenReset: "Filters have been reset.",
|
|
2697
|
+
resetFilters: "Reset filters",
|
|
2698
|
+
searchBar: "Search bar",
|
|
2699
|
+
undo: "Undo"
|
|
2700
|
+
},
|
|
2701
|
+
"ja-JP": {
|
|
2702
|
+
clearFilters: "フィルターをクリア",
|
|
2703
|
+
filtersHaveBeenCleared: "フィルターをクリアしました",
|
|
2704
|
+
filtersHaveBeenReset: "フィルターがリセットされました",
|
|
2705
|
+
resetFilters: "フィルターのリセット",
|
|
2706
|
+
searchBar: "検索バー",
|
|
2707
|
+
undo: "元に戻す"
|
|
2708
|
+
},
|
|
2709
|
+
"pt-BR": {
|
|
2710
|
+
clearFilters: "Limpar filtros",
|
|
2711
|
+
filtersHaveBeenCleared: "Os filtros foram apagados",
|
|
2712
|
+
filtersHaveBeenReset: "Os filtros foram redefinidos",
|
|
2713
|
+
resetFilters: "Redefinir filtros",
|
|
2714
|
+
searchBar: "Barra de pesquisa",
|
|
2715
|
+
undo: "Desfazer"
|
|
2716
|
+
}
|
|
2717
|
+
}, Aa = {
|
|
2718
|
+
key: 0,
|
|
2719
|
+
class: "b-filter-bar__search-external-container"
|
|
2720
|
+
}, Ta = { key: 0 }, Ia = {
|
|
2721
|
+
i18n: { messages: Ut },
|
|
2722
|
+
name: "bento-filter-bar",
|
|
2723
|
+
components: {
|
|
2724
|
+
BentoBooleanFilter: Et,
|
|
2725
|
+
BentoDateFilter: Ct,
|
|
2726
|
+
BentoDateRangeFilter: Bt,
|
|
2727
|
+
BentoInputFilter: gt,
|
|
2728
|
+
BentoInputWithDropdownFilter: St,
|
|
2729
|
+
BentoRangeFilter: Lt,
|
|
2730
|
+
BentoSelectAvatarFilter: Tt,
|
|
2731
|
+
BentoSelectCountryFilter: _t,
|
|
2732
|
+
BentoSelectCurrencyFilter: It,
|
|
2733
|
+
BentoSelectFilter: De,
|
|
2734
|
+
BentoSelectPaymentMethodFilter: $t,
|
|
2735
|
+
BentoSelectTagFilter: Pt,
|
|
2736
|
+
BentoTeleport: ct,
|
|
2737
|
+
FixedScroller: dt
|
|
2738
|
+
}
|
|
2739
|
+
}, _a = /* @__PURE__ */ Q({
|
|
2740
|
+
...Ia,
|
|
2741
|
+
props: {
|
|
2742
|
+
config: { default: () => [] },
|
|
2743
|
+
filterValues: { default: () => [] },
|
|
2744
|
+
containerSizeLayout: { default: () => ({
|
|
2745
|
+
medium: "one-line",
|
|
2746
|
+
small: "multi-line"
|
|
2747
|
+
}) },
|
|
2748
|
+
search: { default: void 0 },
|
|
2749
|
+
searchTerm: { default: void 0 },
|
|
2750
|
+
showAppliedHiddenFilters: { type: Boolean, default: !1 },
|
|
2751
|
+
value: { default: () => [] },
|
|
2752
|
+
filterValuesObject: { default: void 0 }
|
|
2753
|
+
},
|
|
2754
|
+
emits: [
|
|
2755
|
+
Se.INPUT,
|
|
2756
|
+
Se.UPDATE_FILTER_VALUES_OBJECT,
|
|
2757
|
+
Se.UPDATE_FILTER_VALUES_ARRAY,
|
|
2758
|
+
Ae.CLEAR,
|
|
2759
|
+
Ae.INPUT,
|
|
2760
|
+
Ae.UPDATE
|
|
2761
|
+
],
|
|
2762
|
+
setup(e, { expose: n, emit: l }) {
|
|
2763
|
+
const s = e, t = l, { t: o } = pe({ messages: Ut }), d = K(null), a = p(
|
|
2764
|
+
() => {
|
|
2765
|
+
var S, f;
|
|
2766
|
+
return (f = ((S = s.config) == null ? void 0 : S.length) > 0 ? s.config : s.value) == null ? void 0 : f.map((r) => {
|
|
2767
|
+
var Y;
|
|
2768
|
+
let O = (Y = s.filterValues.find(({ field: u }) => u === r.field)) == null ? void 0 : Y.value;
|
|
2769
|
+
return s.filterValuesObject && r.field in s.filterValuesObject && (O = s.filterValuesObject[r.field]), O === void 0 && (O = (r == null ? void 0 : r.value) === void 0 && (r == null ? void 0 : r.defaultValue) !== void 0 ? r == null ? void 0 : r.defaultValue : r == null ? void 0 : r.value), { ...r, value: O !== void 0 ? O : r == null ? void 0 : r.value };
|
|
2770
|
+
});
|
|
2771
|
+
}
|
|
2772
|
+
), { addToast: i } = kt(), { screenLayoutComponent: v, showSearchbarInsideContainer: b, isOneLineLayout: A } = bl(
|
|
2773
|
+
d,
|
|
2774
|
+
te(s, "containerSizeLayout")
|
|
2775
|
+
), $ = p(() => ({
|
|
2776
|
+
"b-filter-bar__fixed-scroller": A.value,
|
|
2777
|
+
"b-filter-bar__container": !A.value
|
|
2778
|
+
// Multi-line
|
|
2779
|
+
})), c = p(() => ({
|
|
2780
|
+
"b-filter-bar__scroller-content": A.value,
|
|
2781
|
+
"b-filter-bar__filters": !A.value
|
|
2782
|
+
// Multi-line
|
|
2783
|
+
})), g = p(() => {
|
|
2784
|
+
var S;
|
|
2785
|
+
return ((S = s.search) == null ? void 0 : S.inputFieldAriaLabel) || o("searchBar");
|
|
2786
|
+
}), P = p(() => {
|
|
2787
|
+
if (!s.search)
|
|
2788
|
+
return;
|
|
2789
|
+
const { debounceTime: S, disabled: f, inputFieldAriaLabel: r, hint: O, placeholder: Y } = s.search;
|
|
2790
|
+
return { debounceTime: S, disabled: f, inputFieldAriaLabel: r, hint: O, placeholder: Y };
|
|
2791
|
+
}), _ = p(() => a.value.some(
|
|
2792
|
+
({ visible: f }) => f != null
|
|
2793
|
+
) ? a.value.some(({ visible: f }) => !f) : !1), U = p(
|
|
2794
|
+
() => a.value.filter(({ defaultValue: S }) => S !== void 0)
|
|
2795
|
+
), H = p(() => a.value.some(
|
|
2796
|
+
({ visible: f }) => f != null
|
|
2797
|
+
) ? a.value.filter(
|
|
2798
|
+
({ defaultValue: f, visible: r, value: O }) => (
|
|
2799
|
+
// eslint-disable-next-line eqeqeq
|
|
2800
|
+
f === void 0 && r || s.showAppliedHiddenFilters && O != null
|
|
2801
|
+
)
|
|
2802
|
+
) : a.value.filter(
|
|
2803
|
+
({ defaultValue: f, value: r }) => (
|
|
2804
|
+
// eslint-disable-next-line eqeqeq
|
|
2805
|
+
f === void 0 || s.showAppliedHiddenFilters && r != null
|
|
2806
|
+
)
|
|
2807
|
+
)), E = p(() => s.searchTerm != null), j = p(
|
|
2808
|
+
() => a.value.filter(({ defaultValue: S }) => S == null).some(({ value: S }) => S != null)
|
|
2809
|
+
), h = p(() => U.value.length === 0 && j.value), V = p(() => U.value.length === 0 ? !1 : !a.value.filter(({ defaultValue: f }) => f !== void 0 || f !== null).every(({ value: f, defaultValue: r }) => JSON.stringify(f) === JSON.stringify(r)) || j.value), M = (S) => {
|
|
2810
|
+
t(Se.INPUT, S), t(
|
|
2811
|
+
Se.UPDATE_FILTER_VALUES_ARRAY,
|
|
2812
|
+
S == null ? void 0 : S.filter(({ value: f }) => f !== null || f !== void 0).map(({ field: f, value: r }) => ({ field: f, value: r }))
|
|
2813
|
+
), t(
|
|
2814
|
+
Se.UPDATE_FILTER_VALUES_OBJECT,
|
|
2815
|
+
S == null ? void 0 : S.filter(({ value: f }) => f !== null || f !== void 0).reduce((f, r) => (f[r.field] = r.value, f), {})
|
|
2816
|
+
);
|
|
2817
|
+
}, I = (S) => {
|
|
2818
|
+
const f = a.value.findIndex(
|
|
2819
|
+
(O) => O.field === S.field
|
|
2820
|
+
), r = a.value.slice();
|
|
2821
|
+
r[f].value = S.value, M(r);
|
|
2822
|
+
}, B = () => {
|
|
2823
|
+
const S = a.value.slice(), f = a.value.map(({ value: r, ...O }) => ({
|
|
2824
|
+
...O,
|
|
2825
|
+
value: void 0
|
|
2826
|
+
}));
|
|
2827
|
+
i({
|
|
2828
|
+
text: o("filtersHaveBeenCleared"),
|
|
2829
|
+
action: {
|
|
2830
|
+
handler: () => M(S),
|
|
2831
|
+
text: o("undo")
|
|
2832
|
+
}
|
|
2833
|
+
}), M(f);
|
|
2834
|
+
}, J = () => {
|
|
2835
|
+
const S = a.value.slice(), f = a.value.map(({ defaultValue: r, ...O }) => ({
|
|
2836
|
+
...O,
|
|
2837
|
+
defaultValue: r,
|
|
2838
|
+
value: r
|
|
2839
|
+
}));
|
|
2840
|
+
i({
|
|
2841
|
+
text: o("filtersHaveBeenReset"),
|
|
2842
|
+
action: {
|
|
2843
|
+
handler: () => M(S),
|
|
2844
|
+
text: o("undo")
|
|
2845
|
+
}
|
|
2846
|
+
}), M(f);
|
|
2847
|
+
}, z = (S) => {
|
|
2848
|
+
t(Ae.INPUT, S), t(Ae.UPDATE, S);
|
|
2849
|
+
}, ee = () => {
|
|
2850
|
+
t(Ae.CLEAR);
|
|
2851
|
+
};
|
|
2852
|
+
return n({ isClearAllVisible: h, clearAllFilters: B, isResetAllVisible: V, resetAllFilters: J }), (S, f) => (F(), G("div", {
|
|
2853
|
+
ref_key: "filterBarRef",
|
|
2854
|
+
ref: d,
|
|
2855
|
+
class: "b-filter-bar"
|
|
2856
|
+
}, [
|
|
2857
|
+
!T(b) && E.value ? (F(), G("div", Aa, [
|
|
2858
|
+
R(ke, re({ class: "b-filter-bar__search-bar" }, P.value, {
|
|
2859
|
+
"input-field-aria-label": g.value,
|
|
2860
|
+
value: S.searchTerm,
|
|
2861
|
+
condensed: "",
|
|
2862
|
+
onInput: z,
|
|
2863
|
+
onClear: ee
|
|
2864
|
+
}), null, 16, ["input-field-aria-label", "value"])
|
|
2865
|
+
])) : Z("", !0),
|
|
2866
|
+
(F(), w(Oe(T(v)), {
|
|
2867
|
+
class: de($.value),
|
|
2868
|
+
condensed: ""
|
|
2869
|
+
}, {
|
|
2870
|
+
default: C(() => [
|
|
2871
|
+
W("div", {
|
|
2872
|
+
class: de(c.value)
|
|
2873
|
+
}, [
|
|
2874
|
+
T(b) && E.value ? (F(), G("div", Ta, [
|
|
2875
|
+
R(ke, re({ class: "b-filter-bar__search-bar" }, P.value, {
|
|
2876
|
+
"input-field-aria-label": g.value,
|
|
2877
|
+
value: S.searchTerm,
|
|
2878
|
+
condensed: "",
|
|
2879
|
+
onInput: z,
|
|
2880
|
+
onClear: ee
|
|
2881
|
+
}), null, 16, ["input-field-aria-label", "value"])
|
|
2882
|
+
])) : Z("", !0),
|
|
2883
|
+
U.value.length ? (F(!0), G($e, { key: 1 }, ye(U.value, (r) => (F(), w(Oe(r.type), {
|
|
2884
|
+
key: r.field,
|
|
2885
|
+
field: r.field,
|
|
2886
|
+
label: r.label,
|
|
2887
|
+
disabled: r == null ? void 0 : r.disabled,
|
|
2888
|
+
options: r.options,
|
|
2889
|
+
value: r.value,
|
|
2890
|
+
"default-value": r.defaultValue,
|
|
2891
|
+
onUpdate: I
|
|
2892
|
+
}, null, 40, ["field", "label", "disabled", "options", "value", "default-value"]))), 128)) : Z("", !0),
|
|
2893
|
+
(F(!0), G($e, null, ye(H.value, (r) => (F(), w(Oe(r.type), {
|
|
2894
|
+
key: r.field,
|
|
2895
|
+
field: r.field,
|
|
2896
|
+
label: r.label,
|
|
2897
|
+
disabled: r == null ? void 0 : r.disabled,
|
|
2898
|
+
options: r.options,
|
|
2899
|
+
value: r.value,
|
|
2900
|
+
onUpdate: I
|
|
2901
|
+
}, null, 40, ["field", "label", "disabled", "options", "value"]))), 128)),
|
|
2902
|
+
_.value ? (F(), w(Da, {
|
|
2903
|
+
key: 2,
|
|
2904
|
+
class: "b-filter-bar__all-filters-modal",
|
|
2905
|
+
value: a.value,
|
|
2906
|
+
onInput: M
|
|
2907
|
+
}, null, 8, ["value"])) : Z("", !0),
|
|
2908
|
+
h.value ? (F(), w(T(Ee), {
|
|
2909
|
+
key: 3,
|
|
2910
|
+
class: "b-filter-bar__clear-all",
|
|
2911
|
+
onClick: B
|
|
2912
|
+
}, {
|
|
2913
|
+
iconLeft: C(() => [
|
|
2914
|
+
R(T(Qe), { "aria-hidden": "true" })
|
|
2915
|
+
]),
|
|
2916
|
+
default: C(() => [
|
|
2917
|
+
X(x(T(o)("clearFilters")) + " ", 1)
|
|
2918
|
+
]),
|
|
2919
|
+
_: 1
|
|
2920
|
+
})) : Z("", !0),
|
|
2921
|
+
V.value ? (F(), w(T(Ee), {
|
|
2922
|
+
key: 4,
|
|
2923
|
+
class: "b-filter-bar__reset-all",
|
|
2924
|
+
onClick: J
|
|
2925
|
+
}, {
|
|
2926
|
+
iconLeft: C(() => [
|
|
2927
|
+
R(T(Qe), { "aria-hidden": "true" })
|
|
2928
|
+
]),
|
|
2929
|
+
default: C(() => [
|
|
2930
|
+
X(x(T(o)("resetFilters")) + " ", 1)
|
|
2931
|
+
]),
|
|
2932
|
+
_: 1
|
|
2933
|
+
})) : Z("", !0)
|
|
2934
|
+
], 2)
|
|
2935
|
+
]),
|
|
2936
|
+
_: 1
|
|
2937
|
+
}, 8, ["class"]))
|
|
2938
|
+
], 512));
|
|
2939
|
+
}
|
|
2940
|
+
}), fo = /* @__PURE__ */ le(_a, [["__scopeId", "data-v-08825006"]]);
|
|
2941
|
+
export {
|
|
2942
|
+
fo as B,
|
|
2943
|
+
Be as a,
|
|
2944
|
+
D as b,
|
|
2945
|
+
Se as c,
|
|
2946
|
+
se as d
|
|
2947
|
+
};
|
|
2948
|
+
//# sourceMappingURL=filter-bar.nX73NKNC.js.map
|