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