@adyen/bento-vue3 1.84.2 → 1.85.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 +4 -0
- package/dist/@types/index.d.ts +244 -130
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +5 -0
- package/dist/ai-tag.js.map +1 -0
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/ai-tag.css +1 -0
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/draggable-handle.css +1 -0
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/layout-row.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/radio-group.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/button.js +2 -2
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/1-generic-use.CZhwP2Yc.js.map +1 -1
- package/dist/chunks/1-generic-use.R6x8PEGA.js.map +1 -1
- package/dist/chunks/2-generic-use.CNKjB4B7.js.map +1 -1
- package/dist/chunks/2-generic-use.w0fUhovx.js.map +1 -1
- package/dist/chunks/3-generic-use.BLEzR04g.js.map +1 -1
- package/dist/chunks/3-generic-use.D3NFHgI4.js.map +1 -1
- package/dist/chunks/4-generic-use.CULEpvgj.js.map +1 -1
- package/dist/chunks/4-generic-use.D82y3n39.js.map +1 -1
- package/dist/chunks/accordion-item.yRlQj4VF.js.map +1 -1
- package/dist/chunks/action-bar.BlhZoFfL.js +209 -0
- package/dist/chunks/action-bar.BlhZoFfL.js.map +1 -0
- package/dist/chunks/adding-payment-methods.BJZLPxtM.js.map +1 -1
- package/dist/chunks/adding-payment-methods.Dle8zt43.js.map +1 -1
- package/dist/chunks/adyen-giving.Ffw_DlJK.js.map +1 -1
- package/dist/chunks/adyen-giving.LiKHj_jY.js.map +1 -1
- package/dist/chunks/ai-button.PAbhTT01.js +57 -0
- package/dist/chunks/ai-button.PAbhTT01.js.map +1 -0
- package/dist/chunks/ai-tag.CqMBHSfn.js +131 -0
- package/dist/chunks/ai-tag.CqMBHSfn.js.map +1 -0
- package/dist/chunks/alert.BYcw-u3b.js.map +1 -1
- package/dist/chunks/aria-label.CaUURpnB.js.map +1 -1
- package/dist/chunks/arrow-left.DoP6zFsY.js +29 -0
- package/dist/chunks/arrow-left.DoP6zFsY.js.map +1 -0
- package/dist/chunks/arrow-right.BVd1Dgd8.js +29 -0
- package/dist/chunks/arrow-right.BVd1Dgd8.js.map +1 -0
- package/dist/chunks/artificial-intelligence-ai-filled.G_Yr_37U.js +44 -0
- package/dist/chunks/artificial-intelligence-ai-filled.G_Yr_37U.js.map +1 -0
- package/dist/chunks/avatar.CNGMjwg3.js.map +1 -1
- package/dist/chunks/base-button.CUd03aA2.js.map +1 -1
- package/dist/chunks/{base-modal.D3GyeCFT.js → base-modal.CNETR72d.js} +5 -5
- package/dist/chunks/{base-modal.D3GyeCFT.js.map → base-modal.CNETR72d.js.map} +1 -1
- package/dist/chunks/bin.DuHlEQBO.js.map +1 -1
- package/dist/chunks/{button-actions-with-menu.B8xFgt-p.js → button-actions-with-menu.DY0pTtk-.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.B8xFgt-p.js.map → button-actions-with-menu.DY0pTtk-.js.map} +1 -1
- package/dist/chunks/{button-actions.Crj4QFAd.js → button-actions.Dk8xU2cz.js} +2 -2
- package/dist/chunks/{button-actions.Crj4QFAd.js.map → button-actions.Dk8xU2cz.js.map} +1 -1
- package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -1
- package/dist/chunks/button.CSp48LJt.js.map +1 -1
- package/dist/chunks/{calendar.DKPx_cQU.js → calendar.Dbc0yjyg.js} +106 -100
- package/dist/chunks/{calendar.DKPx_cQU.js.map → calendar.Dbc0yjyg.js.map} +1 -1
- package/dist/chunks/{card.C_03IYJe.js → card.C7LbwK7Q.js} +2 -2
- package/dist/chunks/{card.C_03IYJe.js.map → card.C7LbwK7Q.js.map} +1 -1
- package/dist/chunks/{checkbox-group.DZrhxIHp.js → checkbox-group.CCpe-S-E.js} +4 -4
- package/dist/chunks/{checkbox-group.DZrhxIHp.js.map → checkbox-group.CCpe-S-E.js.map} +1 -1
- package/dist/chunks/{checkbox.BWgWtiLJ.js → checkbox.A35e7MsN.js} +3 -3
- package/dist/chunks/{checkbox.BWgWtiLJ.js.map → checkbox.A35e7MsN.js.map} +1 -1
- package/dist/chunks/checkmark-circle-fill._6-d40ru.js.map +1 -1
- package/dist/chunks/checkmark-small.x-gmK2Dt.js.map +1 -1
- package/dist/chunks/chevron-down.DCQ6ZLaq.js.map +1 -1
- package/dist/chunks/chevron-left.Cfn1uGLH.js.map +1 -1
- package/dist/chunks/chevron-up.kfuLRpZb.js.map +1 -1
- package/dist/chunks/click-outside.C1Ud8AA2.js.map +1 -1
- package/dist/chunks/{code-snippet.BX3Yeo0x.js → code-snippet.DKkTjYdC.js} +4 -4
- package/dist/chunks/{code-snippet.BX3Yeo0x.js.map → code-snippet.DKkTjYdC.js.map} +1 -1
- package/dist/chunks/codemirror.Cy7iSLbd.js.map +1 -1
- package/dist/chunks/constructNow.B8T1ljs6.js +8 -0
- package/dist/chunks/{constructNow.DuaJst0D.js.map → constructNow.B8T1ljs6.js.map} +1 -1
- package/dist/chunks/{controls-group.DpFv8c4E.js → controls-group.BHOKajou.js} +2 -2
- package/dist/chunks/{controls-group.DpFv8c4E.js.map → controls-group.BHOKajou.js.map} +1 -1
- package/dist/chunks/{copy.xg9ElNxd.js → copy.CgITv6wr.js} +3 -3
- package/dist/chunks/{copy.xg9ElNxd.js.map → copy.CgITv6wr.js.map} +1 -1
- package/dist/chunks/country.types.DaVCMxk-.js.map +1 -1
- package/dist/chunks/cross-circle-fill-small.Dv5-PxwF.js.map +1 -1
- package/dist/chunks/cross-circle-fill.CYLL7jfC.js.map +1 -1
- package/dist/chunks/cross-small.n1UO5wNB.js.map +1 -1
- package/dist/chunks/cross.B92GxFTY.js.map +1 -1
- package/dist/chunks/currency.DijmAkAB.js.map +1 -1
- package/dist/chunks/{dashboard-section.D_k3_Z2T.js → dashboard-section.CrXdP_MQ.js} +3 -3
- package/dist/chunks/{dashboard-section.D_k3_Z2T.js.map → dashboard-section.CrXdP_MQ.js.map} +1 -1
- package/dist/chunks/{dashed-underline.B0z2ZZh7.js → dashed-underline.BzppJBtk.js} +3 -3
- package/dist/chunks/{dashed-underline.B0z2ZZh7.js.map → dashed-underline.BzppJBtk.js.map} +1 -1
- package/dist/chunks/{data-grid-template.DdIrvOXp.js → data-grid-template.DFjdgxwb.js} +3 -3
- package/dist/chunks/{data-grid-template.DdIrvOXp.js.map → data-grid-template.DFjdgxwb.js.map} +1 -1
- package/dist/chunks/data-grid-template.keys.VezYtHtM.js.map +1 -1
- package/dist/chunks/{data-grid.CqtJp9rE.js → data-grid.KkCt0Bgm.js} +1064 -1065
- package/dist/chunks/data-grid.KkCt0Bgm.js.map +1 -0
- package/dist/chunks/date-input.BbZqj10S.js.map +1 -1
- package/dist/chunks/{date-picker.DGIwFh6T.js → date-picker.dQuj_OF_.js} +16 -16
- package/dist/chunks/{date-picker.DGIwFh6T.js.map → date-picker.dQuj_OF_.js.map} +1 -1
- package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -1
- package/dist/chunks/date-range-picker.BAKR_gDf.js +1100 -0
- package/dist/chunks/date-range-picker.BAKR_gDf.js.map +1 -0
- package/dist/chunks/date-range-picker.types.Ckt7zxGy.js.map +1 -1
- package/dist/chunks/date.CL55prL0.js.map +1 -1
- package/dist/chunks/de.DvtL0g75.js.map +1 -1
- package/dist/chunks/debounce.DUTu11PS.js.map +1 -1
- package/dist/chunks/delight.CDBAFnwC.js.map +1 -1
- package/dist/chunks/delight.xKDCvvaS.js.map +1 -1
- package/dist/chunks/dialog-page.CF10AQQ3.js +158 -0
- package/dist/chunks/dialog-page.CF10AQQ3.js.map +1 -0
- package/dist/chunks/{differenceInMonths.DcFDl4eH.js → differenceInMonths.BR4Z2HIa.js} +2 -2
- package/dist/chunks/{differenceInMonths.DcFDl4eH.js.map → differenceInMonths.BR4Z2HIa.js.map} +1 -1
- package/dist/chunks/directive.Cbdox5VL.js.map +1 -1
- package/dist/chunks/divider.Dho4_hQ7.js.map +1 -1
- package/dist/chunks/dot.ob6N-5Um.js.map +1 -1
- package/dist/chunks/dropdown-default-textbox.DFtFMu5G.js.map +1 -1
- package/dist/chunks/{dropdown-tag.Bf6TiNZw.js → dropdown-tag.CBgns9Y3.js} +3 -3
- package/dist/chunks/{dropdown-tag.Bf6TiNZw.js.map → dropdown-tag.CBgns9Y3.js.map} +1 -1
- package/dist/chunks/{dropdown.Dct8gr_q.js → dropdown.DmzMGz30.js} +22 -22
- package/dist/chunks/{dropdown.Dct8gr_q.js.map → dropdown.DmzMGz30.js.map} +1 -1
- package/dist/chunks/empty-state.D_ifpeU-.js.map +1 -1
- package/dist/chunks/en-GB.DCGuCmAv.js.map +1 -1
- package/dist/chunks/en-US.BZii9jNW.js.map +1 -1
- package/dist/chunks/es.bz0mzkMq.js.map +1 -1
- package/dist/chunks/es6.C1DXQV6f.js.map +1 -1
- package/dist/chunks/events.BQOQSSb7.js.map +1 -1
- package/dist/chunks/expand.C9IAqYYL.js.map +1 -1
- package/dist/chunks/{field-label.D7vU2Icm.js → field-label.OurHuGZS.js} +2 -2
- package/dist/chunks/{field-label.D7vU2Icm.js.map → field-label.OurHuGZS.js.map} +1 -1
- package/dist/chunks/{file-uploader.BmBKLzIx.js → file-uploader.CQgu9YIY.js} +4 -4
- package/dist/chunks/file-uploader.CQgu9YIY.js.map +1 -0
- package/dist/chunks/filter-bar.BJmaoSr2.js +4117 -0
- package/dist/chunks/filter-bar.BJmaoSr2.js.map +1 -0
- package/dist/chunks/{focus-trap.BaHvK7aT.js → focus-trap.DH57j-Ov.js} +2 -2
- package/dist/chunks/{focus-trap.BaHvK7aT.js.map → focus-trap.DH57j-Ov.js.map} +1 -1
- package/dist/chunks/{footer-actions.BqNvwVk7.js → footer-actions.BMggOsip.js} +2 -2
- package/dist/chunks/{footer-actions.BqNvwVk7.js.map → footer-actions.BMggOsip.js.map} +1 -1
- package/dist/chunks/form-field.D_2g7vaP.js.map +1 -1
- package/dist/chunks/{form-layout-title.CPsEzRzS.js → form-layout-title.wnvpIbOe.js} +2 -2
- package/dist/chunks/{form-layout-title.CPsEzRzS.js.map → form-layout-title.wnvpIbOe.js.map} +1 -1
- package/dist/chunks/form-layout.types.bZW9iR6_.js.map +1 -1
- package/dist/chunks/fr-CA.B1aPU8fp.js.map +1 -1
- package/dist/chunks/fr.Dj7wEToe.js.map +1 -1
- package/dist/chunks/generate-uid.NJ8tVoha.js.map +1 -1
- package/dist/chunks/getRoundingMethod.C3eaeGLR.js.map +1 -1
- package/dist/chunks/{getTimezoneOffsetInMilliseconds.C-aIpRfB.js → getTimezoneOffsetInMilliseconds.Tu2wlbTR.js} +3 -3
- package/dist/chunks/{getTimezoneOffsetInMilliseconds.C-aIpRfB.js.map → getTimezoneOffsetInMilliseconds.Tu2wlbTR.js.map} +1 -1
- package/dist/chunks/grab.B63hmf-_.js +26 -0
- package/dist/chunks/grab.B63hmf-_.js.map +1 -0
- package/dist/chunks/grid-layout.DDaRNz4-.js.map +1 -1
- package/dist/chunks/{header-meta.PysBmkSU.js → header-meta.CkLmuprc.js} +8 -8
- package/dist/chunks/{header-meta.PysBmkSU.js.map → header-meta.CkLmuprc.js.map} +1 -1
- package/dist/chunks/{header-with-views.XzJCg2Ln.js → header-with-views.BXZmqtnz.js} +612 -630
- package/dist/chunks/header-with-views.BXZmqtnz.js.map +1 -0
- package/dist/chunks/{header.yMTOq8MR.js → header.RiaBKasj.js} +3 -3
- package/dist/chunks/{header.yMTOq8MR.js.map → header.RiaBKasj.js.map} +1 -1
- package/dist/chunks/image.vue_vue_type_script_setup_true_lang.DQT2oNEF.js.map +1 -1
- package/dist/chunks/{index.E60QniEu.js → index.CL07S4Wa.js} +3 -3
- package/dist/chunks/{index.E60QniEu.js.map → index.CL07S4Wa.js.map} +1 -1
- package/dist/chunks/index.pdBj0KQU.js.map +1 -1
- package/dist/chunks/{info-icon.BQDGteil.js → info-icon.B6wfo65e.js} +3 -3
- package/dist/chunks/{info-icon.BQDGteil.js.map → info-icon.B6wfo65e.js.map} +1 -1
- package/dist/chunks/info.BKwey1HA.js.map +1 -1
- package/dist/chunks/{input-field-password.Drp3Gn3x.js → input-field-password.ClyJRN6h.js} +6 -6
- package/dist/chunks/{input-field-password.Drp3Gn3x.js.map → input-field-password.ClyJRN6h.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.CcCrGAZb.js → input-field-phone-number.CUdzwXz0.js} +3 -3
- package/dist/chunks/{input-field-phone-number.CcCrGAZb.js.map → input-field-phone-number.CUdzwXz0.js.map} +1 -1
- package/dist/chunks/{input-field.CBegTqdQ.js → input-field.CFNofr-W.js} +3 -3
- package/dist/chunks/{input-field.CBegTqdQ.js.map → input-field.CFNofr-W.js.map} +1 -1
- package/dist/chunks/{inspector.Dox76eqN.js → inspector.I4-8J_fd.js} +3 -3
- package/dist/chunks/{inspector.Dox76eqN.js.map → inspector.I4-8J_fd.js.map} +1 -1
- package/dist/chunks/inspector.types.DyHwE18g.js.map +1 -1
- package/dist/chunks/internal-error.BLZodVBE.js.map +1 -1
- package/dist/chunks/internal-error.BmrwJFpR.js.map +1 -1
- package/dist/chunks/isSameWeek.5sjhTHiU.js +14 -0
- package/dist/chunks/{isSameWeek.CUD7czUN.js.map → isSameWeek.5sjhTHiU.js.map} +1 -1
- package/dist/chunks/{it.Oaj6BklL.js → it.DEniTaO2.js} +2 -2
- package/dist/chunks/{it.Oaj6BklL.js.map → it.DEniTaO2.js.map} +1 -1
- package/dist/chunks/ja.Cm9tJMi2.js.map +1 -1
- package/dist/chunks/keyboard-navigation.DWmhelVv.js.map +1 -1
- package/dist/chunks/ko.Ceaof6EP.js.map +1 -1
- package/dist/chunks/{layout-row.CX8kV_w0.js → layout-row.Ccw24NzW.js} +3 -3
- package/dist/chunks/layout-row.Ccw24NzW.js.map +1 -0
- package/dist/chunks/link.BLCQlEZU.js.map +1 -1
- package/dist/chunks/{listbox-option-tag.BQZJF00q.js → listbox-option-tag.BHQiD5oC.js} +2 -2
- package/dist/chunks/{listbox-option-tag.BQZJF00q.js.map → listbox-option-tag.BHQiD5oC.js.map} +1 -1
- package/dist/chunks/loading-indicator.Db794TT5.js.map +1 -1
- package/dist/chunks/match.CMBZxEs9.js.map +1 -1
- package/dist/chunks/minus-small.DYIyF5XW.js.map +1 -1
- package/dist/chunks/{modal-fullscreen.BXjxVsAq.js → modal-fullscreen.f445bZ94.js} +4 -4
- package/dist/chunks/{modal-fullscreen.BXjxVsAq.js.map → modal-fullscreen.f445bZ94.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.CRovU08l.js → modal.vue_vue_type_script_setup_true_lang.KSBXRR2X.js} +4 -4
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.CRovU08l.js.map → modal.vue_vue_type_script_setup_true_lang.KSBXRR2X.js.map} +1 -1
- package/dist/chunks/nl.B6vCf2B9.js.map +1 -1
- package/dist/chunks/no-results-found.Bg_ZcEid.js.map +1 -1
- package/dist/chunks/no-results-found.BqvYsBR6.js.map +1 -1
- package/dist/chunks/notifications-cleared.BMZk37uf.js.map +1 -1
- package/dist/chunks/notifications-cleared.C7W9ZXY7.js.map +1 -1
- package/dist/chunks/on-click-outside.D9aY9g8G.js.map +1 -1
- package/dist/chunks/page-not-found.COJLPVaU.js.map +1 -1
- package/dist/chunks/page-not-found.DWW6W-PZ.js.map +1 -1
- package/dist/chunks/{pagination.BofKoYTB.js → pagination.DuRU9Xg_.js} +2 -2
- package/dist/chunks/{pagination.BofKoYTB.js.map → pagination.DuRU9Xg_.js.map} +1 -1
- package/dist/chunks/payment-method.BGEBaa4w.js.map +1 -1
- package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -1
- package/dist/chunks/planned-maintenance.C61sWB9h.js.map +1 -1
- package/dist/chunks/planned-maintenance.jmWYTdet.js.map +1 -1
- package/dist/chunks/popover.types.BbYumG-N.js +6 -0
- package/dist/chunks/{popover.types.DgfeurkF.js.map → popover.types.BbYumG-N.js.map} +1 -1
- package/dist/chunks/{popper-container.I9gzp1NR.js → popper-container.DdG_YvVF.js} +2 -2
- package/dist/chunks/{popper-container.I9gzp1NR.js.map → popper-container.DdG_YvVF.js.map} +1 -1
- package/dist/chunks/{promo-banner.BIRH5sVX.js → promo-banner.DzIYjBfG.js} +2 -2
- package/dist/chunks/{promo-banner.BIRH5sVX.js.map → promo-banner.DzIYjBfG.js.map} +1 -1
- package/dist/chunks/pt-BR.CiGdfP45.js.map +1 -1
- package/dist/chunks/{radio-group.BqsQRDjs.js → radio-group.EqsvAKt2.js} +4 -4
- package/dist/chunks/{radio-group.BqsQRDjs.js.map → radio-group.EqsvAKt2.js.map} +1 -1
- package/dist/chunks/radio-input.CBNE-AkM.js.map +1 -1
- package/dist/chunks/referrals.BvtT-kQS.js.map +1 -1
- package/dist/chunks/referrals.aX8WZigH.js.map +1 -1
- package/dist/chunks/refresh.BB4ouvz_.js.map +1 -1
- package/dist/chunks/resize.Bqks3WUm.js.map +1 -1
- package/dist/chunks/{rich-text-editor.Bafyvjc3.js → rich-text-editor.-JS_rIjs.js} +4 -4
- package/dist/chunks/{rich-text-editor.Bafyvjc3.js.map → rich-text-editor.-JS_rIjs.js.map} +1 -1
- package/dist/chunks/{search-bar.DrkPxPDP.js → search-bar.DPc0omnd.js} +3 -3
- package/dist/chunks/{search-bar.DrkPxPDP.js.map → search-bar.DPc0omnd.js.map} +1 -1
- package/dist/chunks/search.PczW-onY.js.map +1 -1
- package/dist/chunks/{secondary-nav.C0_VfFa9.js → secondary-nav.BGKR8l0u.js} +3 -3
- package/dist/chunks/{secondary-nav.C0_VfFa9.js.map → secondary-nav.BGKR8l0u.js.map} +1 -1
- package/dist/chunks/{segmented-control.CFlHfj3N.js → segmented-control.CFPAl4HD.js} +2 -2
- package/dist/chunks/{segmented-control.CFlHfj3N.js.map → segmented-control.CFPAl4HD.js.map} +1 -1
- package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -1
- package/dist/chunks/{selection-card-group.DNPlEqEq.js → selection-card-group.BL0LTYhI.js} +4 -4
- package/dist/chunks/{selection-card-group.DNPlEqEq.js.map → selection-card-group.BL0LTYhI.js.map} +1 -1
- package/dist/chunks/show.CT4Augxb.js.map +1 -1
- package/dist/chunks/{sidepanel.RJihFo_R.js → sidepanel.sWMdYcUC.js} +5 -5
- package/dist/chunks/{sidepanel.RJihFo_R.js.map → sidepanel.sWMdYcUC.js.map} +1 -1
- package/dist/chunks/{startOfWeek.Dxw2MhGp.js → startOfWeek.CM1KIrNi.js} +2 -2
- package/dist/chunks/{startOfWeek.Dxw2MhGp.js.map → startOfWeek.CM1KIrNi.js.map} +1 -1
- package/dist/chunks/status.types.ChOI6XGU.js.map +1 -1
- package/dist/chunks/step.DpgnDx29.js.map +1 -1
- package/dist/chunks/{structured-list-item.B-hdp7rW.js → structured-list-item.Uky_MJPp.js} +4 -4
- package/dist/chunks/{structured-list-item.B-hdp7rW.js.map → structured-list-item.Uky_MJPp.js.map} +1 -1
- package/dist/chunks/success.DhioLvPD.js.map +1 -1
- package/dist/chunks/success.nNwxJRBS.js.map +1 -1
- package/dist/chunks/summary-grid.keys.Xx-W5a2w.js.map +1 -1
- package/dist/chunks/{summary-grid.types.BVLRSBAF.js → summary-grid.types.R-TEtkgx.js} +5 -5
- package/dist/chunks/{summary-grid.types.BVLRSBAF.js.map → summary-grid.types.R-TEtkgx.js.map} +1 -1
- package/dist/chunks/sv.f8EfZjMZ.js.map +1 -1
- package/dist/chunks/tab.JPngc9oS.js.map +1 -1
- package/dist/chunks/tabs.keys.B4qGhjp2.js.map +1 -1
- package/dist/chunks/{tag.DFJIvNLs.js → tag.CNN_D55j.js} +2 -2
- package/dist/chunks/{tag.DFJIvNLs.js.map → tag.CNN_D55j.js.map} +1 -1
- package/dist/chunks/{textarea.CEDkF8BB.js → textarea.BGcYYD8C.js} +2 -2
- package/dist/chunks/{textarea.CEDkF8BB.js.map → textarea.BGcYYD8C.js.map} +1 -1
- package/dist/chunks/{timeline-item.BxGaSGLf.js → timeline-item.Cbd_rb9J.js} +6 -6
- package/dist/chunks/{timeline-item.BxGaSGLf.js.map → timeline-item.Cbd_rb9J.js.map} +1 -1
- package/dist/chunks/toggle.vl0ZwLhN.js.map +1 -1
- package/dist/chunks/{tooltip.Nn3o8_vO.js → tooltip.CqV3Okcs.js} +2 -2
- package/dist/chunks/{tooltip.Nn3o8_vO.js.map → tooltip.CqV3Okcs.js.map} +1 -1
- package/dist/chunks/truncate.BfIl_-71.js.map +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CEfCLTsD.js → tutorial.vue_vue_type_script_setup_true_lang.DkTE0rmi.js} +28 -28
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CEfCLTsD.js.map → tutorial.vue_vue_type_script_setup_true_lang.DkTE0rmi.js.map} +1 -1
- package/dist/chunks/typography.6Oo5TOMP.js.map +1 -1
- package/dist/chunks/upload-files.5wQwbfkp.js.map +1 -1
- package/dist/chunks/upload-files.jTQY6y2X.js.map +1 -1
- package/dist/chunks/use-bento-toast-controller.V61h7XzI.js.map +1 -1
- package/dist/chunks/{use-cached-selected-values.BZIa5TRx.js → use-cached-selected-values.iGHt7ROs.js} +15 -15
- package/dist/chunks/{use-cached-selected-values.BZIa5TRx.js.map → use-cached-selected-values.iGHt7ROs.js.map} +1 -1
- package/dist/chunks/use-country-items.JZCYNoW7.js.map +1 -1
- 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-expandable-content-height.GkjjbmPy.js.map +1 -1
- package/dist/chunks/use-form-layout-loading.CWbjZiwP.js.map +1 -1
- package/dist/chunks/use-has-slot.B7eQSabc.js.map +1 -1
- package/dist/chunks/warning-filled.BMGD0G-_.js.map +1 -1
- package/dist/chunks/wrong-environment.BOsyKdRI.js.map +1 -1
- package/dist/chunks/wrong-environment.BiHTPtbJ.js.map +1 -1
- package/dist/chunks/{zh-CN.BzH0fIXr.js → zh-CN.CgIooHto.js} +2 -2
- package/dist/chunks/{zh-CN.BzH0fIXr.js.map → zh-CN.CgIooHto.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +6 -5
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/draggable-handle.js +163 -0
- package/dist/draggable-handle.js.map +1 -0
- package/dist/dropdown.js +3 -3
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +319 -315
- 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 +11 -11
- package/dist/layout.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 +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +5 -0
- package/dist/styles/bento-light.css +5 -0
- package/dist/styles/bento.css +5 -0
- package/dist/styles/legacy.css +5 -0
- package/dist/styles/styleguide.css +5 -0
- package/dist/summary-grid.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/use-form-v4.js.map +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +6 -7
- package/dist/chunks/action-bar.CriH15oF.js +0 -204
- package/dist/chunks/action-bar.CriH15oF.js.map +0 -1
- package/dist/chunks/ai-button.CDRPf7IY.js +0 -93
- package/dist/chunks/ai-button.CDRPf7IY.js.map +0 -1
- package/dist/chunks/constructNow.DuaJst0D.js +0 -8
- package/dist/chunks/data-grid.CqtJp9rE.js.map +0 -1
- package/dist/chunks/date-range-picker.Df9XyFMH.js +0 -1896
- package/dist/chunks/date-range-picker.Df9XyFMH.js.map +0 -1
- package/dist/chunks/dialog-page.DaZSlMzY.js +0 -181
- package/dist/chunks/dialog-page.DaZSlMzY.js.map +0 -1
- package/dist/chunks/file-uploader.BmBKLzIx.js.map +0 -1
- package/dist/chunks/filter-bar.DHRuvmx9.js +0 -3363
- package/dist/chunks/filter-bar.DHRuvmx9.js.map +0 -1
- package/dist/chunks/header-with-views.XzJCg2Ln.js.map +0 -1
- package/dist/chunks/isSameWeek.CUD7czUN.js +0 -14
- package/dist/chunks/layout-row.CX8kV_w0.js.map +0 -1
- package/dist/chunks/popover.types.DgfeurkF.js +0 -6
|
@@ -0,0 +1,4117 @@
|
|
|
1
|
+
import { ref as M, onMounted as Xe, watch as se, computed as f, defineComponent as z, useSlots as ze, useAttrs as pl, createBlock as L, openBlock as S, unref as v, mergeProps as re, withCtx as w, createElementVNode as K, renderSlot as he, createCommentVNode as X, createVNode as E, createTextVNode as Z, toDisplayString as x, createElementBlock as Q, normalizeClass as ce, withDirectives as at, withKeys as ge, nextTick as Ot, toRef as ee, onBeforeUpdate as Ze, provide as At, resolveComponent as H, Fragment as Ve, reactive as vl, isRef as ml, createSlots as Ne, renderList as Ce, normalizeProps as Ge, guardReactiveProps as Ke, vShow as yl, resolveDynamicComponent as qe } from "vue";
|
|
2
|
+
import { B as Je, b as _e } from "./search-bar.DPc0omnd.js";
|
|
3
|
+
import { u as hl } from "./use-bento-toast-controller.V61h7XzI.js";
|
|
4
|
+
import { u as pe } from "./index.pdBj0KQU.js";
|
|
5
|
+
import { k as gl } from "./index.CL07S4Wa.js";
|
|
6
|
+
import { F as Pt } from "./fixed-scroller.e56yJp7Q.js";
|
|
7
|
+
import { _ as Fl } from "./modal.vue_vue_type_script_setup_true_lang.KSBXRR2X.js";
|
|
8
|
+
import { B as Sl } from "./button.CSp48LJt.js";
|
|
9
|
+
import { B as It } from "./radio-group.EqsvAKt2.js";
|
|
10
|
+
import { t as Fe } from "./truncate.BfIl_-71.js";
|
|
11
|
+
import { B as ye, d as xe, p as Bl } from "./typography.6Oo5TOMP.js";
|
|
12
|
+
import { u as Cl, d as _t, h as Dl, I as Tl, k as wl, B as Ol } from "./button-actions.Dk8xU2cz.js";
|
|
13
|
+
import { b as $t } from "./tooltip.CqV3Okcs.js";
|
|
14
|
+
import { _ as le } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
15
|
+
import { g as Me } from "./generate-uid.NJ8tVoha.js";
|
|
16
|
+
import { C as kt } from "./cross-small.n1UO5wNB.js";
|
|
17
|
+
import { B as Et, a as dt } from "./base-button.CUd03aA2.js";
|
|
18
|
+
import { u as Lt } from "./use-has-slot.B7eQSabc.js";
|
|
19
|
+
import { u as Ut } from "./aria-label.CaUURpnB.js";
|
|
20
|
+
import { g as Rt } from "./get-slot-text.CQRAP2_q.js";
|
|
21
|
+
import { B as ot } from "./input-field.CFNofr-W.js";
|
|
22
|
+
import { B as Al } from "./checkbox-group.CCpe-S-E.js";
|
|
23
|
+
import { u as it, B as Pl } from "./dropdown.DmzMGz30.js";
|
|
24
|
+
import { g as Il } from "./focus-trap.DH57j-Ov.js";
|
|
25
|
+
import { C as _l } from "./chevron-up.kfuLRpZb.js";
|
|
26
|
+
import { C as $l } from "./chevron-down.DCQ6ZLaq.js";
|
|
27
|
+
/* empty css */
|
|
28
|
+
import { C as kl } from "./checkbox-input.Dk9iFQQe.js";
|
|
29
|
+
import { c as ct, b as El, C as Ll } from "./use-cached-selected-values.iGHt7ROs.js";
|
|
30
|
+
import { B as st } from "./divider.Dho4_hQ7.js";
|
|
31
|
+
import { L as Vt } from "./listbox-option-tag.BHQiD5oC.js";
|
|
32
|
+
import { B as Ul } from "./payment-method.BGEBaa4w.js";
|
|
33
|
+
import { u as Rl } from "./use-country-items.JZCYNoW7.js";
|
|
34
|
+
import { B as Vl } from "./avatar.CNGMjwg3.js";
|
|
35
|
+
import { D as Nl, B as Ml, i as tt, a as Yl } from "./date-range-picker.BAKR_gDf.js";
|
|
36
|
+
import { ptBR as Hl } from "./pt-BR.CiGdfP45.js";
|
|
37
|
+
import { ja as Wl } from "./ja.Cm9tJMi2.js";
|
|
38
|
+
import { fr as jl } from "./fr.Dj7wEToe.js";
|
|
39
|
+
import { g as Nt } from "./en-US.BZii9jNW.js";
|
|
40
|
+
import { de as ql } from "./de.DvtL0g75.js";
|
|
41
|
+
import { b as Gl, g as Kl, q as Jl, r as Ql, p as $e, e as me, i as Xl } from "./calendar.Dbc0yjyg.js";
|
|
42
|
+
import { t as Pe, c as Le, i as Mt, g as rt } from "./getTimezoneOffsetInMilliseconds.Tu2wlbTR.js";
|
|
43
|
+
import { s as Ye } from "./startOfWeek.CM1KIrNi.js";
|
|
44
|
+
import { B as zl } from "./date-picker.dQuj_OF_.js";
|
|
45
|
+
import { R as ft } from "./refresh.BB4ouvz_.js";
|
|
46
|
+
import "../assets/filter-bar.css";
|
|
47
|
+
const Yt = (e) => e === null || typeof e != "object" ? !1 : Object.prototype.toString.call(e) === "[object Object]", Ht = (e) => Array.isArray(e), bt = (e) => Ht(e) ? e.length === 0 || e.every((l) => l === "") : !e, lt = (e, l) => JSON.stringify(e) === JSON.stringify(l), Ee = (e) => Yt(e) ? e instanceof Date ? new Date(e.getTime()) : Ht(e) ? e.map((l) => Ee(l)) : Object.keys(e).reduce((l, t) => (l[t] = Ee(e[t]), l), {}) : e, Zl = (e) => Yt(e) ? Object.fromEntries(Object.keys(e).map((l) => [l, void 0])) : void 0;
|
|
48
|
+
function Wt(e, l) {
|
|
49
|
+
const t = M(), a = M();
|
|
50
|
+
Xe(() => {
|
|
51
|
+
e.value != null && (a.value = Zl(e.value));
|
|
52
|
+
}), se(
|
|
53
|
+
() => e.value,
|
|
54
|
+
(d) => {
|
|
55
|
+
t.value = Ee(d);
|
|
56
|
+
},
|
|
57
|
+
{ immediate: !0 }
|
|
58
|
+
);
|
|
59
|
+
const n = f(
|
|
60
|
+
() => bt(e.value) || lt(e.value, a.value)
|
|
61
|
+
), o = f(
|
|
62
|
+
() => l.value != null ? lt(l.value, e.value) : n.value
|
|
63
|
+
), r = f(() => lt(t.value, e.value) || bt(t.value) && n.value);
|
|
64
|
+
function i(d) {
|
|
65
|
+
t.value = Ee(a.value), d && d(t.value);
|
|
66
|
+
}
|
|
67
|
+
function s(d) {
|
|
68
|
+
t.value = Ee(l.value), d && d(t.value);
|
|
69
|
+
}
|
|
70
|
+
function b(d) {
|
|
71
|
+
t.value = Ee(e.value), d && d(t.value);
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
// Values
|
|
75
|
+
internalFilterValue: t,
|
|
76
|
+
isSecondaryButtonDisabled: o,
|
|
77
|
+
isApplyButtonDisabled: r,
|
|
78
|
+
// Methods
|
|
79
|
+
clearFilter: i,
|
|
80
|
+
resetFilter: s,
|
|
81
|
+
openFilter: b
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
const xl = { class: "b-filter-bar-button__container" }, ea = { class: "b-filter-bar-button__label-container" }, ta = {}, la = /* @__PURE__ */ z({
|
|
85
|
+
...ta,
|
|
86
|
+
__name: "filter-bar-button",
|
|
87
|
+
props: {
|
|
88
|
+
/**
|
|
89
|
+
* Allows to set the button as active without setting a "secondaryLabel"
|
|
90
|
+
*/
|
|
91
|
+
active: { type: Boolean, default: !1 },
|
|
92
|
+
/**
|
|
93
|
+
* The number of applied values within the filter.
|
|
94
|
+
* Text can also be applied here such as 'All'.
|
|
95
|
+
* e.g. if 2 items in a dropdown filter have been applied, the number 2 will be shown here.
|
|
96
|
+
*/
|
|
97
|
+
appliedFiltersCount: { type: [String, Number], default: null },
|
|
98
|
+
/**
|
|
99
|
+
* Disables button functionality.
|
|
100
|
+
*/
|
|
101
|
+
disabled: { type: Boolean, default: !1 },
|
|
102
|
+
/**
|
|
103
|
+
* Signifies if the filter is open or closed.
|
|
104
|
+
*/
|
|
105
|
+
isFilterOpen: { type: Boolean, default: !1 },
|
|
106
|
+
/**
|
|
107
|
+
* Signifies if the filter is a persistent filter
|
|
108
|
+
*/
|
|
109
|
+
isPersistentFilter: { type: Boolean, default: !1 },
|
|
110
|
+
/**
|
|
111
|
+
* Renders the button without the applied state styles
|
|
112
|
+
*/
|
|
113
|
+
noAppliedStateStyles: { type: Boolean, default: !1 },
|
|
114
|
+
/**
|
|
115
|
+
* A secondary label to be added next to the primary for additional filtering information.
|
|
116
|
+
* i.e. Can be used to show the set value for said filter.
|
|
117
|
+
*/
|
|
118
|
+
secondaryLabel: { type: String, default: null }
|
|
119
|
+
},
|
|
120
|
+
emits: ["click"],
|
|
121
|
+
setup(e, { emit: l }) {
|
|
122
|
+
const t = e, a = l, n = ze(), o = pl(), r = Lt(n), i = f(() => n.default ? Rt(n)("default") : null), s = f(() => !r("default") && r("iconLeft")), b = Ut({ ariaLabel: i }), d = M(null), g = f(() => {
|
|
123
|
+
var m;
|
|
124
|
+
return {
|
|
125
|
+
"aria-controls": (m = o["aria-controls"]) == null ? void 0 : m.toString()
|
|
126
|
+
};
|
|
127
|
+
}), y = f(
|
|
128
|
+
() => (t.appliedFiltersCount || t.secondaryLabel || t.isPersistentFilter) && !t.noAppliedStateStyles
|
|
129
|
+
), u = f(() => ({
|
|
130
|
+
"b-filter-bar-button--applied": y.value || t.active,
|
|
131
|
+
"b-filter-bar-button--filter-open": t.isFilterOpen && !y.value,
|
|
132
|
+
"b-filter-bar-button--filter-open-applied": t.isFilterOpen && y.value,
|
|
133
|
+
"b-filter-bar-button--with-secondary-label": t.secondaryLabel,
|
|
134
|
+
"b-filter-bar-button--with-counter": t.appliedFiltersCount,
|
|
135
|
+
"b-filter-bar-button--icon-only": s.value
|
|
136
|
+
})), D = (m) => {
|
|
137
|
+
m.preventDefault(), t.disabled || a("click", m);
|
|
138
|
+
};
|
|
139
|
+
return (m, I) => (S(), L(v(Et), re({
|
|
140
|
+
ref_key: "filterBarButtonRef",
|
|
141
|
+
ref: d
|
|
142
|
+
}, m.$attrs, {
|
|
143
|
+
class: ["b-filter-bar-button", u.value],
|
|
144
|
+
disabled: e.disabled,
|
|
145
|
+
"aria-label": v(b),
|
|
146
|
+
"aria-controls": g.value["aria-controls"],
|
|
147
|
+
type: "button",
|
|
148
|
+
onClick: D
|
|
149
|
+
}), {
|
|
150
|
+
iconRight: w(() => [
|
|
151
|
+
e.appliedFiltersCount && !s.value ? (S(), L(v(ye), {
|
|
152
|
+
key: 0,
|
|
153
|
+
class: "b-filter-bar-button__counter",
|
|
154
|
+
el: "span",
|
|
155
|
+
variant: "body",
|
|
156
|
+
stronger: ""
|
|
157
|
+
}, {
|
|
158
|
+
default: w(() => [
|
|
159
|
+
Z(x(e.appliedFiltersCount), 1)
|
|
160
|
+
]),
|
|
161
|
+
_: 1
|
|
162
|
+
})) : X("", !0)
|
|
163
|
+
]),
|
|
164
|
+
default: w(() => [
|
|
165
|
+
K("div", xl, [
|
|
166
|
+
v(r)("iconLeft") ? he(m.$slots, "iconLeft", { key: 0 }, void 0, !0) : X("", !0),
|
|
167
|
+
K("div", ea, [
|
|
168
|
+
E(v(ye), {
|
|
169
|
+
el: "span",
|
|
170
|
+
variant: "body",
|
|
171
|
+
stronger: "",
|
|
172
|
+
class: "b-filter-bar-button__label"
|
|
173
|
+
}, {
|
|
174
|
+
default: w(() => [
|
|
175
|
+
K("span", null, [
|
|
176
|
+
he(m.$slots, "default", {}, void 0, !0)
|
|
177
|
+
]),
|
|
178
|
+
e.secondaryLabel && !s.value ? (S(), L(v(ye), {
|
|
179
|
+
key: 0,
|
|
180
|
+
el: "span",
|
|
181
|
+
variant: "body",
|
|
182
|
+
stronger: "",
|
|
183
|
+
class: "b-filter-bar-button__label"
|
|
184
|
+
}, {
|
|
185
|
+
default: w(() => I[0] || (I[0] = [
|
|
186
|
+
Z(":")
|
|
187
|
+
])),
|
|
188
|
+
_: 1
|
|
189
|
+
})) : X("", !0)
|
|
190
|
+
]),
|
|
191
|
+
_: 3
|
|
192
|
+
}),
|
|
193
|
+
e.secondaryLabel && !s.value ? (S(), L(v(ye), {
|
|
194
|
+
key: 0,
|
|
195
|
+
el: "span",
|
|
196
|
+
variant: "body",
|
|
197
|
+
stronger: "",
|
|
198
|
+
class: "b-filter-bar-button__secondary-label"
|
|
199
|
+
}, {
|
|
200
|
+
default: w(() => [
|
|
201
|
+
Z(x(e.secondaryLabel), 1)
|
|
202
|
+
]),
|
|
203
|
+
_: 1
|
|
204
|
+
})) : X("", !0)
|
|
205
|
+
])
|
|
206
|
+
])
|
|
207
|
+
]),
|
|
208
|
+
_: 3
|
|
209
|
+
}, 16, ["class", "disabled", "aria-label", "aria-controls"]));
|
|
210
|
+
}
|
|
211
|
+
}), Ae = /* @__PURE__ */ le(la, [["__scopeId", "data-v-e8fc31f4"]]);
|
|
212
|
+
var _ = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.UPDATE = "update", e))(_ || {}), we = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.UPDATE_FILTER_VALUES_OBJECT = "update:filter-values-object", e.UPDATE_FILTER_VALUES_ARRAY = "update:filter-values", e))(we || {}), 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.RADIO_GROUP = "BentoRadioGroupFilter", e.CHECKBOX_GROUP = "BentoCheckboxGroupFilter", e.TOGGLE = "BentoToggleFilter", e))(ie || {});
|
|
213
|
+
const pt = 430, vt = 700;
|
|
214
|
+
function aa(e, l) {
|
|
215
|
+
const t = M("div"), a = M(!1), n = M(0), o = f(() => !(n.value < pt && l.value.small === "multi-line"));
|
|
216
|
+
function r() {
|
|
217
|
+
a.value = !1, t.value = "div";
|
|
218
|
+
}
|
|
219
|
+
function i() {
|
|
220
|
+
a.value = !0, t.value = Pt;
|
|
221
|
+
}
|
|
222
|
+
function s() {
|
|
223
|
+
n.value > vt || n.value < vt && n.value >= pt && l.value.medium === "multi-line" ? r() : i();
|
|
224
|
+
}
|
|
225
|
+
return se(() => l.value, s), gl(e, (b) => {
|
|
226
|
+
n.value = b[0].contentRect.width, s();
|
|
227
|
+
}), {
|
|
228
|
+
screenLayoutComponent: t,
|
|
229
|
+
showSearchbarInsideContainer: o,
|
|
230
|
+
isOneLineLayout: a
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
const na = {}, oa = /* @__PURE__ */ z({
|
|
234
|
+
...na,
|
|
235
|
+
__name: "filter-bar-button-group",
|
|
236
|
+
props: {
|
|
237
|
+
isActive: { type: Boolean, default: !1 },
|
|
238
|
+
skipGrouping: { type: Boolean, default: !1 }
|
|
239
|
+
},
|
|
240
|
+
setup(e) {
|
|
241
|
+
const l = e, t = f(() => ({
|
|
242
|
+
"b-filter-bar-button-group--active": l.isActive,
|
|
243
|
+
"b-filter-bar-button-group--grouped": !l.skipGrouping
|
|
244
|
+
}));
|
|
245
|
+
return (a, n) => (S(), Q("div", {
|
|
246
|
+
class: ce(["b-filter-bar-button-group", t.value])
|
|
247
|
+
}, [
|
|
248
|
+
he(a.$slots, "default", {}, void 0, !0)
|
|
249
|
+
], 2));
|
|
250
|
+
}
|
|
251
|
+
}), jt = /* @__PURE__ */ le(oa, [["__scopeId", "data-v-9ce16194"]]);
|
|
252
|
+
var de = /* @__PURE__ */ ((e) => (e.APPLY = "apply", e.CLEAR = "clear", e.OPEN = "open", e.CLOSE = "close", e.RESET = "reset", e.CANCEL = "cancel", e))(de || {});
|
|
253
|
+
const qt = {
|
|
254
|
+
"en-US": {
|
|
255
|
+
apply: "Apply",
|
|
256
|
+
clear: "Clear",
|
|
257
|
+
clearFilter: "Clear filter {function}",
|
|
258
|
+
filtersHaveBeenCleared: "Filters have been cleared",
|
|
259
|
+
numberSelected: "{numberOfItemsSelected} selected",
|
|
260
|
+
reset: "Reset",
|
|
261
|
+
resetFilter: "Reset filter {function}"
|
|
262
|
+
},
|
|
263
|
+
"ja-JP": {
|
|
264
|
+
apply: "適用",
|
|
265
|
+
clear: "クリア",
|
|
266
|
+
clearFilter: "フィルターをクリア{function}",
|
|
267
|
+
filtersHaveBeenCleared: "フィルターをクリアしました",
|
|
268
|
+
numberSelected: "{numberOfItemsSelected}件選択済み",
|
|
269
|
+
reset: "リセット",
|
|
270
|
+
resetFilter: "フィルターをリセット{function}"
|
|
271
|
+
},
|
|
272
|
+
"pt-BR": {
|
|
273
|
+
apply: "Aplicar",
|
|
274
|
+
clear: "Limpar",
|
|
275
|
+
clearFilter: "Limpar filtro {function}",
|
|
276
|
+
filtersHaveBeenCleared: "Os filtros foram apagados",
|
|
277
|
+
numberSelected: "{numberOfItemsSelected} selecionados",
|
|
278
|
+
reset: "Reiniciar",
|
|
279
|
+
resetFilter: "Redefinir filtro {function}"
|
|
280
|
+
}
|
|
281
|
+
}, ia = { key: 0 }, sa = {
|
|
282
|
+
key: 1,
|
|
283
|
+
class: "b-base-filter"
|
|
284
|
+
}, ra = {
|
|
285
|
+
i18n: { messages: qt },
|
|
286
|
+
name: "bento-base-filter"
|
|
287
|
+
}, ua = /* @__PURE__ */ z({
|
|
288
|
+
...ra,
|
|
289
|
+
props: {
|
|
290
|
+
appliedFiltersCount: { default: null },
|
|
291
|
+
buttonLabel: { default: void 0 },
|
|
292
|
+
buttonSecondaryLabel: { default: void 0 },
|
|
293
|
+
disabled: { type: Boolean, default: !1 },
|
|
294
|
+
defaultValue: { type: [String, null, Object, Number, Array, Date, Boolean], default: null },
|
|
295
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
296
|
+
controlled: { type: Boolean, default: !1 },
|
|
297
|
+
disableApplyButton: { type: Boolean, default: !1 },
|
|
298
|
+
disableSecondaryButton: { type: Boolean, default: !1 },
|
|
299
|
+
field: {},
|
|
300
|
+
label: {},
|
|
301
|
+
fitContent: { type: Boolean, default: void 0 },
|
|
302
|
+
tooltipText: { default: void 0 },
|
|
303
|
+
tooltipPosition: { default: void 0 },
|
|
304
|
+
value: { type: [String, null, Object, Number, Array, Date, Boolean], default: void 0 }
|
|
305
|
+
},
|
|
306
|
+
emits: [
|
|
307
|
+
de.APPLY,
|
|
308
|
+
de.CLEAR,
|
|
309
|
+
de.OPEN,
|
|
310
|
+
de.CLOSE,
|
|
311
|
+
de.RESET,
|
|
312
|
+
de.CANCEL
|
|
313
|
+
],
|
|
314
|
+
setup(e, { expose: l, emit: t }) {
|
|
315
|
+
const a = t, n = e, { t: o } = pe({ messages: qt }), r = Me("base-filter-popover"), i = M(!1), s = M(null), b = M(null), d = f(() => n.defaultValue !== null), g = f(() => d.value ? JSON.stringify(n.value) !== JSON.stringify(n.defaultValue) : n.appliedFiltersCount || n.buttonSecondaryLabel), y = f(() => {
|
|
316
|
+
let k = n.buttonSecondaryLabel ? `: ${n.buttonSecondaryLabel}` : "";
|
|
317
|
+
return n.appliedFiltersCount && (k = `: ${o("numberSelected", { numberOfItemsSelected: n.appliedFiltersCount })}`), (d.value ? n.label : D.value) + k;
|
|
318
|
+
}), u = f(
|
|
319
|
+
() => d.value ? o("resetFilter", {
|
|
320
|
+
function: D.value
|
|
321
|
+
}) : o("clearFilter", {
|
|
322
|
+
function: D.value
|
|
323
|
+
})
|
|
324
|
+
), D = f(() => n.buttonLabel || n.label), m = async () => {
|
|
325
|
+
var k, O;
|
|
326
|
+
await Ot(), (O = (k = s.value) == null ? void 0 : k.$el) == null || O.focus();
|
|
327
|
+
}, I = () => {
|
|
328
|
+
i.value && (i.value = !1, m(), a(de.CLOSE));
|
|
329
|
+
}, $ = () => {
|
|
330
|
+
d.value ? a(de.RESET) : a(de.CLEAR), m();
|
|
331
|
+
}, C = () => {
|
|
332
|
+
I(), $();
|
|
333
|
+
}, B = () => {
|
|
334
|
+
i.value ? I() : (i.value = !0, a(de.OPEN));
|
|
335
|
+
}, V = () => {
|
|
336
|
+
I(), a(de.APPLY);
|
|
337
|
+
}, T = () => {
|
|
338
|
+
I(), a(de.CANCEL);
|
|
339
|
+
}, N = () => T(), Y = f(() => [
|
|
340
|
+
{
|
|
341
|
+
title: o("apply"),
|
|
342
|
+
event: V,
|
|
343
|
+
disabled: n.disableApplyButton
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
title: d.value ? o("reset") : o("clear"),
|
|
347
|
+
event: C,
|
|
348
|
+
disabled: n.disableSecondaryButton
|
|
349
|
+
}
|
|
350
|
+
]);
|
|
351
|
+
return se(
|
|
352
|
+
() => i.value,
|
|
353
|
+
(k, O) => {
|
|
354
|
+
var q, J;
|
|
355
|
+
!k && O && (J = (q = s.value) == null ? void 0 : q.filterBarButtonRef) != null && J.bentoBaseButtonRef && s.value.filterBarButtonRef.bentoBaseButtonRef.focus();
|
|
356
|
+
}
|
|
357
|
+
), Cl(b, N, { ignore: [s] }), l({
|
|
358
|
+
closePopover: I
|
|
359
|
+
}), (k, O) => k.onlySlot ? (S(), Q("div", ia, [
|
|
360
|
+
he(k.$slots, "default", {}, void 0, !0)
|
|
361
|
+
])) : (S(), Q("div", sa, [
|
|
362
|
+
at((S(), L(jt, {
|
|
363
|
+
"is-active": i.value,
|
|
364
|
+
"skip-grouping": !g.value
|
|
365
|
+
}, {
|
|
366
|
+
default: w(() => [
|
|
367
|
+
E(v(Ae), {
|
|
368
|
+
ref_key: "filterButtonRef",
|
|
369
|
+
ref: s,
|
|
370
|
+
"aria-label": y.value,
|
|
371
|
+
"aria-controls": i.value ? v(r) : null,
|
|
372
|
+
"applied-filters-count": k.appliedFiltersCount,
|
|
373
|
+
disabled: k.disabled,
|
|
374
|
+
"is-persistent-filter": d.value,
|
|
375
|
+
"is-filter-open": i.value,
|
|
376
|
+
"secondary-label": k.buttonSecondaryLabel,
|
|
377
|
+
onClick: B,
|
|
378
|
+
onKeydown: ge(I, ["esc"])
|
|
379
|
+
}, {
|
|
380
|
+
default: w(() => [
|
|
381
|
+
Z(x(D.value), 1)
|
|
382
|
+
]),
|
|
383
|
+
_: 1
|
|
384
|
+
}, 8, ["aria-label", "aria-controls", "applied-filters-count", "disabled", "is-persistent-filter", "is-filter-open", "secondary-label"]),
|
|
385
|
+
g.value ? (S(), L(v(Ae), {
|
|
386
|
+
key: 0,
|
|
387
|
+
"applied-filters-count": k.appliedFiltersCount,
|
|
388
|
+
disabled: k.disabled,
|
|
389
|
+
"is-persistent-filter": d.value,
|
|
390
|
+
"is-filter-open": i.value,
|
|
391
|
+
"secondary-label": k.buttonSecondaryLabel,
|
|
392
|
+
onClick: $
|
|
393
|
+
}, {
|
|
394
|
+
iconLeft: w(() => [
|
|
395
|
+
E(v(kt), { "svg-title": u.value }, null, 8, ["svg-title"])
|
|
396
|
+
]),
|
|
397
|
+
_: 1
|
|
398
|
+
}, 8, ["applied-filters-count", "disabled", "is-persistent-filter", "is-filter-open", "secondary-label"])) : X("", !0)
|
|
399
|
+
]),
|
|
400
|
+
_: 1
|
|
401
|
+
}, 8, ["is-active", "skip-grouping"])), [
|
|
402
|
+
[v($t), k.tooltipText, k.tooltipPosition]
|
|
403
|
+
]),
|
|
404
|
+
s.value ? (S(), L(_t, { key: 0 }, {
|
|
405
|
+
default: w(() => [
|
|
406
|
+
s.value ? (S(), L(Dl, {
|
|
407
|
+
key: 0,
|
|
408
|
+
id: v(r),
|
|
409
|
+
ref_key: "popoverRef",
|
|
410
|
+
ref: b,
|
|
411
|
+
class: "b-base-filter__popover",
|
|
412
|
+
divider: "",
|
|
413
|
+
"aria-label": k.label,
|
|
414
|
+
open: i.value,
|
|
415
|
+
actions: k.controlled ? null : Y.value,
|
|
416
|
+
"actions-layout": "space-between",
|
|
417
|
+
"target-element": s.value,
|
|
418
|
+
title: k.controlled ? null : k.label,
|
|
419
|
+
"fit-content": k.fitContent,
|
|
420
|
+
position: "bottom-start",
|
|
421
|
+
"without-space": k.controlled,
|
|
422
|
+
"fallback-position": ["bottom-end"],
|
|
423
|
+
"overflow-visible": ""
|
|
424
|
+
}, {
|
|
425
|
+
default: w(() => [
|
|
426
|
+
K("div", {
|
|
427
|
+
onKeydown: ge(T, ["esc"])
|
|
428
|
+
}, [
|
|
429
|
+
he(k.$slots, "default", {}, void 0, !0)
|
|
430
|
+
], 32)
|
|
431
|
+
]),
|
|
432
|
+
_: 3
|
|
433
|
+
}, 8, ["id", "aria-label", "open", "actions", "target-element", "title", "fit-content", "without-space"])) : X("", !0)
|
|
434
|
+
]),
|
|
435
|
+
_: 3
|
|
436
|
+
})) : X("", !0)
|
|
437
|
+
]));
|
|
438
|
+
}
|
|
439
|
+
}), Se = /* @__PURE__ */ le(ua, [["__scopeId", "data-v-79ccf445"]]), da = (e) => e instanceof Array, mt = (e) => da(e) ? e.length === 0 || e.every((l) => l === "") : !e, yt = (e, l) => JSON.stringify(e) === JSON.stringify(l), De = (e, l) => {
|
|
440
|
+
const t = M(e.value);
|
|
441
|
+
se(
|
|
442
|
+
() => e.value,
|
|
443
|
+
() => {
|
|
444
|
+
t.value = e.value;
|
|
445
|
+
}
|
|
446
|
+
);
|
|
447
|
+
const a = f(() => mt(e.value)), n = f(
|
|
448
|
+
() => l.value !== null ? yt(l.value, e.value) : a.value
|
|
449
|
+
), o = f(() => yt(t.value, e.value) || mt(t.value) && a.value);
|
|
450
|
+
return {
|
|
451
|
+
internalFilterValue: t,
|
|
452
|
+
isSecondaryButtonDisabled: n,
|
|
453
|
+
isApplyButtonDisabled: o
|
|
454
|
+
};
|
|
455
|
+
}, ca = {
|
|
456
|
+
name: "bento-input-filter"
|
|
457
|
+
}, fa = /* @__PURE__ */ z({
|
|
458
|
+
...ca,
|
|
459
|
+
props: {
|
|
460
|
+
defaultValue: { default: null },
|
|
461
|
+
disabled: { type: Boolean, default: !1 },
|
|
462
|
+
field: {},
|
|
463
|
+
label: {},
|
|
464
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
465
|
+
options: { default: void 0 },
|
|
466
|
+
value: { default: null }
|
|
467
|
+
},
|
|
468
|
+
emits: ["input", "update"],
|
|
469
|
+
setup(e, { emit: l }) {
|
|
470
|
+
var Y, k;
|
|
471
|
+
const t = e, a = l, n = M(null), o = M((k = (Y = t == null ? void 0 : t.options) == null ? void 0 : Y.dropdown) == null ? void 0 : k.value), r = f(
|
|
472
|
+
() => {
|
|
473
|
+
var O, q;
|
|
474
|
+
return ((O = t == null ? void 0 : t.options) == null ? void 0 : O.variant) === "dropdown" && ((q = t == null ? void 0 : t.options) == null ? void 0 : q.dropdown) !== void 0;
|
|
475
|
+
}
|
|
476
|
+
), i = f(
|
|
477
|
+
() => {
|
|
478
|
+
var O;
|
|
479
|
+
return r.value ? { ...(O = t == null ? void 0 : t.options) == null ? void 0 : O.dropdown, value: o.value } : void 0;
|
|
480
|
+
}
|
|
481
|
+
), s = f(() => {
|
|
482
|
+
var O;
|
|
483
|
+
return ((O = t == null ? void 0 : t.options) == null ? void 0 : O.variant) === "dropdown" ? "dropdown" : "default";
|
|
484
|
+
}), b = f(
|
|
485
|
+
() => {
|
|
486
|
+
var O;
|
|
487
|
+
return r.value ? (O = t.value) == null ? void 0 : O.inputValue : t == null ? void 0 : t.value;
|
|
488
|
+
}
|
|
489
|
+
), { internalFilterValue: d, isSecondaryButtonDisabled: g, isApplyButtonDisabled: y } = De(
|
|
490
|
+
b,
|
|
491
|
+
ee(t, "defaultValue")
|
|
492
|
+
), u = f(() => t.label), D = f(() => Fe(b.value, 12)), m = f(() => ({
|
|
493
|
+
"b-input-filter--only-slot": t.onlySlot
|
|
494
|
+
}));
|
|
495
|
+
Ze(() => {
|
|
496
|
+
d.value === "" && (d.value = null);
|
|
497
|
+
}), se(n, () => {
|
|
498
|
+
var O;
|
|
499
|
+
(O = n.value) == null || O.focusInput();
|
|
500
|
+
});
|
|
501
|
+
const I = () => {
|
|
502
|
+
d.value = b.value;
|
|
503
|
+
}, $ = () => {
|
|
504
|
+
!d.value && t.defaultValue !== null && (d.value = t.defaultValue), a("update", {
|
|
505
|
+
...t,
|
|
506
|
+
value: r.value ? {
|
|
507
|
+
inputValue: d.value,
|
|
508
|
+
dropdownValue: o.value
|
|
509
|
+
} : d.value
|
|
510
|
+
});
|
|
511
|
+
}, C = () => a("update", { ...t, value: t.defaultValue }), B = () => {
|
|
512
|
+
d.value = null, $();
|
|
513
|
+
}, V = () => {
|
|
514
|
+
a("input", { ...t, value: d.value });
|
|
515
|
+
}, T = (O) => {
|
|
516
|
+
d.value = O;
|
|
517
|
+
}, N = (O) => {
|
|
518
|
+
o.value = O;
|
|
519
|
+
};
|
|
520
|
+
return At(Tl, r.value), se(
|
|
521
|
+
() => t.options,
|
|
522
|
+
() => {
|
|
523
|
+
var O, q, J;
|
|
524
|
+
((O = t.options) != null && O.dropdown || (q = t.options) != null && q.dropdownPosition || (J = t.options) != null && J.variant) && xe(
|
|
525
|
+
'BentoInputFilter "options" property',
|
|
526
|
+
`BentoInputFilter "options" no longer supports "dropdown", "dropdownPosition" or "variant" attributes.
|
|
527
|
+
Use the "BentoFilterItemType.INPUT_DROPDOWN" instead of "BentoFilterItemType.INPUT"
|
|
528
|
+
<bento-filter-bar
|
|
529
|
+
:config="[{
|
|
530
|
+
field: 'name',
|
|
531
|
+
label: 'Name',
|
|
532
|
+
type: BentoFilterItemType.INPUT_DROPDOWN,
|
|
533
|
+
options: [...],
|
|
534
|
+
}]"
|
|
535
|
+
/>`,
|
|
536
|
+
"2.0.0"
|
|
537
|
+
);
|
|
538
|
+
},
|
|
539
|
+
{ immediate: !0 }
|
|
540
|
+
), (O, q) => {
|
|
541
|
+
var J, ne;
|
|
542
|
+
return S(), L(v(Se), re(O.$props, {
|
|
543
|
+
"button-label": u.value,
|
|
544
|
+
"button-secondary-label": D.value,
|
|
545
|
+
"disable-apply-button": v(y),
|
|
546
|
+
"disable-secondary-button": v(g),
|
|
547
|
+
"only-slot": O.onlySlot,
|
|
548
|
+
"popover-overflow-visible": r.value,
|
|
549
|
+
"tooltip-position": (J = O.options) == null ? void 0 : J.tooltipPosition,
|
|
550
|
+
"tooltip-text": (ne = O.options) == null ? void 0 : ne.tooltipText,
|
|
551
|
+
onApply: $,
|
|
552
|
+
onClear: B,
|
|
553
|
+
onOpen: I,
|
|
554
|
+
onReset: C
|
|
555
|
+
}), {
|
|
556
|
+
default: w(() => {
|
|
557
|
+
var A, h;
|
|
558
|
+
return [
|
|
559
|
+
K("div", {
|
|
560
|
+
class: ce(["b-input-filter", m.value]),
|
|
561
|
+
onKeydown: ge($, ["enter"]),
|
|
562
|
+
onInput: V
|
|
563
|
+
}, [
|
|
564
|
+
E(v(ot), {
|
|
565
|
+
ref_key: "inputTextRef",
|
|
566
|
+
ref: n,
|
|
567
|
+
dropdown: i.value,
|
|
568
|
+
"dropdown-position": (A = O.options) == null ? void 0 : A.dropdownPosition,
|
|
569
|
+
placeholder: (h = O.options) == null ? void 0 : h.placeholder,
|
|
570
|
+
variant: s.value,
|
|
571
|
+
"model-value": v(d),
|
|
572
|
+
disabled: O.disabled,
|
|
573
|
+
"onUpdate:modelValue": T,
|
|
574
|
+
onDropdownInput: N
|
|
575
|
+
}, null, 8, ["dropdown", "dropdown-position", "placeholder", "variant", "model-value", "disabled"])
|
|
576
|
+
], 34)
|
|
577
|
+
];
|
|
578
|
+
}),
|
|
579
|
+
_: 1
|
|
580
|
+
}, 16, ["button-label", "button-secondary-label", "disable-apply-button", "disable-secondary-button", "only-slot", "popover-overflow-visible", "tooltip-position", "tooltip-text"]);
|
|
581
|
+
};
|
|
582
|
+
}
|
|
583
|
+
}), Gt = /* @__PURE__ */ le(fa, [["__scopeId", "data-v-57f2a128"]]), ba = {
|
|
584
|
+
name: "bento-input-with-dropdown-filter"
|
|
585
|
+
}, pa = /* @__PURE__ */ z({
|
|
586
|
+
...ba,
|
|
587
|
+
props: {
|
|
588
|
+
disabled: { type: Boolean },
|
|
589
|
+
defaultValue: { default: void 0 },
|
|
590
|
+
field: {},
|
|
591
|
+
label: {},
|
|
592
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
593
|
+
options: { default: void 0 },
|
|
594
|
+
value: { default: void 0 }
|
|
595
|
+
},
|
|
596
|
+
emits: [_.INPUT, _.UPDATE],
|
|
597
|
+
setup(e, { emit: l }) {
|
|
598
|
+
const t = e, a = l, n = M(null), { internalFilterValue: o, isSecondaryButtonDisabled: r, isApplyButtonDisabled: i } = De(ee(t, "value"), ee(t, "defaultValue")), s = f(() => t.label), b = f(() => {
|
|
599
|
+
var T;
|
|
600
|
+
return Fe((T = t.value) == null ? void 0 : T.inputValue, 12);
|
|
601
|
+
}), d = f(
|
|
602
|
+
() => {
|
|
603
|
+
var T, N, Y, k, O;
|
|
604
|
+
return ((T = o.value) == null ? void 0 : T.dropdownValue) ?? ((Y = (N = t.options) == null ? void 0 : N.dropdown) == null ? void 0 : Y.modelValue) ?? ((O = (k = t.options) == null ? void 0 : k.dropdown) == null ? void 0 : O.value);
|
|
605
|
+
}
|
|
606
|
+
), g = f(() => {
|
|
607
|
+
var T;
|
|
608
|
+
return {
|
|
609
|
+
...((T = t.options) == null ? void 0 : T.dropdown) || {},
|
|
610
|
+
modelValue: d.value
|
|
611
|
+
};
|
|
612
|
+
}), y = f(() => ({
|
|
613
|
+
"b-input-with-dropdown-filter--only-slot": t.onlySlot
|
|
614
|
+
})), u = f(() => {
|
|
615
|
+
var N;
|
|
616
|
+
return !(!!((N = o.value) != null && N.inputValue) && !!d.value) || i.value;
|
|
617
|
+
});
|
|
618
|
+
Ze(() => {
|
|
619
|
+
var T;
|
|
620
|
+
((T = o.value) == null ? void 0 : T.inputValue) === "" && (o.value = { ...o.value, inputValue: void 0 });
|
|
621
|
+
}), se(n, () => {
|
|
622
|
+
var T;
|
|
623
|
+
(T = n.value) == null || T.focusInput();
|
|
624
|
+
});
|
|
625
|
+
const D = () => {
|
|
626
|
+
o.value = t.value;
|
|
627
|
+
}, m = () => {
|
|
628
|
+
var T;
|
|
629
|
+
!((T = o.value) != null && T.inputValue) && t.defaultValue !== null && (o.value = { ...t.defaultValue }), a(_.UPDATE, {
|
|
630
|
+
...t,
|
|
631
|
+
value: o.value
|
|
632
|
+
});
|
|
633
|
+
}, I = () => a(_.UPDATE, { ...t, value: t.defaultValue }), $ = () => {
|
|
634
|
+
o.value = null, m();
|
|
635
|
+
}, C = () => {
|
|
636
|
+
a(_.INPUT, { ...t, value: o.value });
|
|
637
|
+
}, B = (T) => {
|
|
638
|
+
o.value = { dropdownValue: d.value, inputValue: T };
|
|
639
|
+
}, V = (T) => {
|
|
640
|
+
o.value = { ...o.value, dropdownValue: T };
|
|
641
|
+
};
|
|
642
|
+
return At(wl, !0), (T, N) => {
|
|
643
|
+
var Y, k;
|
|
644
|
+
return S(), L(v(Se), re(T.$props, {
|
|
645
|
+
"button-label": s.value,
|
|
646
|
+
"button-secondary-label": b.value,
|
|
647
|
+
"disable-apply-button": u.value,
|
|
648
|
+
"disable-secondary-button": v(r),
|
|
649
|
+
"only-slot": T.onlySlot,
|
|
650
|
+
"tooltip-position": (Y = T.options) == null ? void 0 : Y.tooltipPosition,
|
|
651
|
+
"tooltip-text": (k = T.options) == null ? void 0 : k.tooltipText,
|
|
652
|
+
onApply: m,
|
|
653
|
+
onClear: $,
|
|
654
|
+
onOpen: D,
|
|
655
|
+
onReset: I
|
|
656
|
+
}), {
|
|
657
|
+
default: w(() => {
|
|
658
|
+
var O, q;
|
|
659
|
+
return [
|
|
660
|
+
K("div", {
|
|
661
|
+
class: ce(["b-input-with-dropdown-filter", y.value]),
|
|
662
|
+
onKeydown: ge(m, ["enter"]),
|
|
663
|
+
onInput: C
|
|
664
|
+
}, [
|
|
665
|
+
E(v(ot), {
|
|
666
|
+
ref_key: "inputTextRef",
|
|
667
|
+
ref: n,
|
|
668
|
+
dropdown: g.value,
|
|
669
|
+
"dropdown-position": (O = T.options) == null ? void 0 : O.dropdownPosition,
|
|
670
|
+
variant: "dropdown",
|
|
671
|
+
"model-value": (q = v(o)) == null ? void 0 : q.inputValue,
|
|
672
|
+
disabled: T.disabled,
|
|
673
|
+
"onUpdate:modelValue": B,
|
|
674
|
+
onDropdownInput: V
|
|
675
|
+
}, null, 8, ["dropdown", "dropdown-position", "model-value", "disabled"])
|
|
676
|
+
], 34)
|
|
677
|
+
];
|
|
678
|
+
}),
|
|
679
|
+
_: 1
|
|
680
|
+
}, 16, ["button-label", "button-secondary-label", "disable-apply-button", "disable-secondary-button", "only-slot", "tooltip-position", "tooltip-text"]);
|
|
681
|
+
};
|
|
682
|
+
}
|
|
683
|
+
}), Kt = /* @__PURE__ */ le(pa, [["__scopeId", "data-v-db04529c"]]), va = z({
|
|
684
|
+
name: "bento-date-filter",
|
|
685
|
+
components: {
|
|
686
|
+
BentoBaseFilter: Se,
|
|
687
|
+
BentoDatePicker: zl,
|
|
688
|
+
BentoDivider: st,
|
|
689
|
+
Calendar: Gl
|
|
690
|
+
},
|
|
691
|
+
props: {
|
|
692
|
+
/**
|
|
693
|
+
* Disables the filter from being interacted with.
|
|
694
|
+
*/
|
|
695
|
+
disabled: { type: Boolean, default: !1 },
|
|
696
|
+
isDateInput: { type: Boolean, default: !0 },
|
|
697
|
+
/**
|
|
698
|
+
* Default value of the filter to reset to.
|
|
699
|
+
*/
|
|
700
|
+
defaultValue: { type: Date, default: null },
|
|
701
|
+
/**
|
|
702
|
+
* Filter name/key referencing the actual property name in the data set.
|
|
703
|
+
* Should be unique per filter bar.
|
|
704
|
+
*/
|
|
705
|
+
field: { type: String, required: !0 },
|
|
706
|
+
/**
|
|
707
|
+
* Label text to be displayed
|
|
708
|
+
*/
|
|
709
|
+
label: { type: String, required: !0 },
|
|
710
|
+
/**
|
|
711
|
+
* Renders the base filter's slot content only - leaving out the button and the popover.
|
|
712
|
+
* Used for the allFiltersModal component.
|
|
713
|
+
*/
|
|
714
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
715
|
+
/**
|
|
716
|
+
* List of options that are needed to setup the filter
|
|
717
|
+
* Available options:
|
|
718
|
+
* - firstDayOfWeek: Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
|
|
719
|
+
* - isDateDisabled: Indicate if a date should be disabled or not
|
|
720
|
+
* - tooltipPosition: The position of the tooltip attached to the filter button
|
|
721
|
+
* - tooltipText: The content of the tooltip attached to the filter button
|
|
722
|
+
*/
|
|
723
|
+
options: {
|
|
724
|
+
type: Object,
|
|
725
|
+
default: void 0
|
|
726
|
+
},
|
|
727
|
+
/**
|
|
728
|
+
* Current value of the filter
|
|
729
|
+
*/
|
|
730
|
+
value: { type: Date, default: void 0 }
|
|
731
|
+
},
|
|
732
|
+
emits: [_.INPUT, _.UPDATE],
|
|
733
|
+
setup(e, { emit: l }) {
|
|
734
|
+
const { locale: t } = pe(void 0), { internalFilterValue: a, isSecondaryButtonDisabled: n, isApplyButtonDisabled: o } = De(
|
|
735
|
+
ee(e, "value"),
|
|
736
|
+
ee(e, "defaultValue")
|
|
737
|
+
), r = f(() => {
|
|
738
|
+
var I;
|
|
739
|
+
const m = ((I = e == null ? void 0 : e.options) == null ? void 0 : I.variant) === "month" ? { month: "long", year: "numeric" } : { day: "numeric", month: "short", year: "numeric" };
|
|
740
|
+
return e.value ? Kl(t.value, m).format(e.value) : null;
|
|
741
|
+
}), i = f(() => e.label), s = f(() => r.value), b = () => {
|
|
742
|
+
l(_.UPDATE, { ...e, value: a.value });
|
|
743
|
+
}, d = () => {
|
|
744
|
+
a.value = null, b();
|
|
745
|
+
}, g = () => {
|
|
746
|
+
a.value = e.defaultValue, b();
|
|
747
|
+
}, y = () => {
|
|
748
|
+
a.value = e.value;
|
|
749
|
+
}, u = (m) => {
|
|
750
|
+
a.value = m, l(_.INPUT, { ...e, value: a.value });
|
|
751
|
+
};
|
|
752
|
+
return {
|
|
753
|
+
// Values
|
|
754
|
+
internalFilterValue: a,
|
|
755
|
+
isApplyButtonDisabled: o,
|
|
756
|
+
isSecondaryButtonDisabled: n,
|
|
757
|
+
buttonLabel: i,
|
|
758
|
+
buttonSecondaryLabel: s,
|
|
759
|
+
// Events
|
|
760
|
+
clearFilter: d,
|
|
761
|
+
onDateSelected: u,
|
|
762
|
+
openFilter: y,
|
|
763
|
+
updateFilter: b,
|
|
764
|
+
resetFilter: g,
|
|
765
|
+
onDateInputSelected: (m) => {
|
|
766
|
+
a.value = m, u(m), b();
|
|
767
|
+
}
|
|
768
|
+
};
|
|
769
|
+
}
|
|
770
|
+
}), ma = { class: "b-date-filter" };
|
|
771
|
+
function ya(e, l, t, a, n, o) {
|
|
772
|
+
var d, g;
|
|
773
|
+
const r = H("bento-date-picker"), i = H("bento-divider"), s = H("calendar"), b = H("bento-base-filter");
|
|
774
|
+
return S(), L(b, {
|
|
775
|
+
"button-label": e.buttonLabel,
|
|
776
|
+
"button-secondary-label": e.buttonSecondaryLabel,
|
|
777
|
+
disabled: e.disabled,
|
|
778
|
+
"default-value": e.defaultValue,
|
|
779
|
+
"disable-apply-button": e.isApplyButtonDisabled,
|
|
780
|
+
"disable-secondary-button": e.isSecondaryButtonDisabled,
|
|
781
|
+
field: e.field,
|
|
782
|
+
label: e.label,
|
|
783
|
+
"only-slot": e.onlySlot,
|
|
784
|
+
"tooltip-position": (d = e.options) == null ? void 0 : d.tooltipPosition,
|
|
785
|
+
"tooltip-text": (g = e.options) == null ? void 0 : g.tooltipText,
|
|
786
|
+
"fit-content": "",
|
|
787
|
+
onApply: e.updateFilter,
|
|
788
|
+
onClear: e.clearFilter,
|
|
789
|
+
onOpen: e.openFilter,
|
|
790
|
+
onReset: e.resetFilter
|
|
791
|
+
}, {
|
|
792
|
+
default: w(() => {
|
|
793
|
+
var y, u, D, m, I, $;
|
|
794
|
+
return [
|
|
795
|
+
e.onlySlot ? (S(), L(r, {
|
|
796
|
+
key: 0,
|
|
797
|
+
value: e.internalFilterValue,
|
|
798
|
+
"first-day-of-week": (y = e.options) == null ? void 0 : y.firstDayOfWeek,
|
|
799
|
+
"is-date-disabled": (u = e.options) == null ? void 0 : u.isDateDisabled,
|
|
800
|
+
variant: (D = e.options) == null ? void 0 : D.variant,
|
|
801
|
+
disabled: e.disabled,
|
|
802
|
+
onInput: e.onDateInputSelected
|
|
803
|
+
}, null, 8, ["value", "first-day-of-week", "is-date-disabled", "variant", "disabled", "onInput"])) : (S(), Q(Ve, { key: 1 }, [
|
|
804
|
+
E(i, { class: "b-date-filter__divider" }),
|
|
805
|
+
K("div", ma, [
|
|
806
|
+
E(s, {
|
|
807
|
+
"first-day-of-week": (m = e.options) == null ? void 0 : m.firstDayOfWeek,
|
|
808
|
+
"is-date-disabled": (I = e.options) == null ? void 0 : I.isDateDisabled,
|
|
809
|
+
"number-of-months": 1,
|
|
810
|
+
value: e.internalFilterValue,
|
|
811
|
+
variant: ($ = e.options) == null ? void 0 : $.variant,
|
|
812
|
+
onInput: e.onDateSelected
|
|
813
|
+
}, null, 8, ["first-day-of-week", "is-date-disabled", "value", "variant", "onInput"])
|
|
814
|
+
])
|
|
815
|
+
], 64))
|
|
816
|
+
];
|
|
817
|
+
}),
|
|
818
|
+
_: 1
|
|
819
|
+
}, 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"]);
|
|
820
|
+
}
|
|
821
|
+
const Jt = /* @__PURE__ */ le(va, [["render", ya], ["__scopeId", "data-v-b572be46"]]);
|
|
822
|
+
function ha() {
|
|
823
|
+
return {
|
|
824
|
+
de: ql,
|
|
825
|
+
enUS: Nt,
|
|
826
|
+
fr: jl,
|
|
827
|
+
ja: Wl,
|
|
828
|
+
ptBR: Hl
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
function ga(e, l) {
|
|
832
|
+
const t = Pe(e, l == null ? void 0 : l.in);
|
|
833
|
+
return Jl(t, Ql(t)) + 1;
|
|
834
|
+
}
|
|
835
|
+
function Qe(e, l) {
|
|
836
|
+
return Ye(e, { ...l, weekStartsOn: 1 });
|
|
837
|
+
}
|
|
838
|
+
function Qt(e, l) {
|
|
839
|
+
const t = Pe(e, l == null ? void 0 : l.in), a = t.getFullYear(), n = Le(t, 0);
|
|
840
|
+
n.setFullYear(a + 1, 0, 4), n.setHours(0, 0, 0, 0);
|
|
841
|
+
const o = Qe(n), r = Le(t, 0);
|
|
842
|
+
r.setFullYear(a, 0, 4), r.setHours(0, 0, 0, 0);
|
|
843
|
+
const i = Qe(r);
|
|
844
|
+
return t.getTime() >= o.getTime() ? a + 1 : t.getTime() >= i.getTime() ? a : a - 1;
|
|
845
|
+
}
|
|
846
|
+
function Fa(e, l) {
|
|
847
|
+
const t = Qt(e, l), a = Le(e, 0);
|
|
848
|
+
return a.setFullYear(t, 0, 4), a.setHours(0, 0, 0, 0), Qe(a);
|
|
849
|
+
}
|
|
850
|
+
function Sa(e, l) {
|
|
851
|
+
const t = Pe(e, l == null ? void 0 : l.in), a = +Qe(t) - +Fa(t);
|
|
852
|
+
return Math.round(a / Mt) + 1;
|
|
853
|
+
}
|
|
854
|
+
function Xt(e, l) {
|
|
855
|
+
var d, g, y, u;
|
|
856
|
+
const t = Pe(e, l == null ? void 0 : l.in), a = t.getFullYear(), n = rt(), o = (l == null ? void 0 : l.firstWeekContainsDate) ?? ((g = (d = l == null ? void 0 : l.locale) == null ? void 0 : d.options) == null ? void 0 : g.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((u = (y = n.locale) == null ? void 0 : y.options) == null ? void 0 : u.firstWeekContainsDate) ?? 1, r = Le((l == null ? void 0 : l.in) || e, 0);
|
|
857
|
+
r.setFullYear(a + 1, 0, o), r.setHours(0, 0, 0, 0);
|
|
858
|
+
const i = Ye(r, l), s = Le((l == null ? void 0 : l.in) || e, 0);
|
|
859
|
+
s.setFullYear(a, 0, o), s.setHours(0, 0, 0, 0);
|
|
860
|
+
const b = Ye(s, l);
|
|
861
|
+
return +t >= +i ? a + 1 : +t >= +b ? a : a - 1;
|
|
862
|
+
}
|
|
863
|
+
function Ba(e, l) {
|
|
864
|
+
var i, s, b, d;
|
|
865
|
+
const t = rt(), a = (l == null ? void 0 : l.firstWeekContainsDate) ?? ((s = (i = l == null ? void 0 : l.locale) == null ? void 0 : i.options) == null ? void 0 : s.firstWeekContainsDate) ?? t.firstWeekContainsDate ?? ((d = (b = t.locale) == null ? void 0 : b.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, n = Xt(e, l), o = Le((l == null ? void 0 : l.in) || e, 0);
|
|
866
|
+
return o.setFullYear(n, 0, a), o.setHours(0, 0, 0, 0), Ye(o, l);
|
|
867
|
+
}
|
|
868
|
+
function Ca(e, l) {
|
|
869
|
+
const t = Pe(e, l == null ? void 0 : l.in), a = +Ye(t, l) - +Ba(t, l);
|
|
870
|
+
return Math.round(a / Mt) + 1;
|
|
871
|
+
}
|
|
872
|
+
function j(e, l) {
|
|
873
|
+
const t = e < 0 ? "-" : "", a = Math.abs(e).toString().padStart(l, "0");
|
|
874
|
+
return t + a;
|
|
875
|
+
}
|
|
876
|
+
const Be = {
|
|
877
|
+
// Year
|
|
878
|
+
y(e, l) {
|
|
879
|
+
const t = e.getFullYear(), a = t > 0 ? t : 1 - t;
|
|
880
|
+
return j(l === "yy" ? a % 100 : a, l.length);
|
|
881
|
+
},
|
|
882
|
+
// Month
|
|
883
|
+
M(e, l) {
|
|
884
|
+
const t = e.getMonth();
|
|
885
|
+
return l === "M" ? String(t + 1) : j(t + 1, 2);
|
|
886
|
+
},
|
|
887
|
+
// Day of the month
|
|
888
|
+
d(e, l) {
|
|
889
|
+
return j(e.getDate(), l.length);
|
|
890
|
+
},
|
|
891
|
+
// AM or PM
|
|
892
|
+
a(e, l) {
|
|
893
|
+
const t = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
894
|
+
switch (l) {
|
|
895
|
+
case "a":
|
|
896
|
+
case "aa":
|
|
897
|
+
return t.toUpperCase();
|
|
898
|
+
case "aaa":
|
|
899
|
+
return t;
|
|
900
|
+
case "aaaaa":
|
|
901
|
+
return t[0];
|
|
902
|
+
default:
|
|
903
|
+
return t === "am" ? "a.m." : "p.m.";
|
|
904
|
+
}
|
|
905
|
+
},
|
|
906
|
+
// Hour [1-12]
|
|
907
|
+
h(e, l) {
|
|
908
|
+
return j(e.getHours() % 12 || 12, l.length);
|
|
909
|
+
},
|
|
910
|
+
// Hour [0-23]
|
|
911
|
+
H(e, l) {
|
|
912
|
+
return j(e.getHours(), l.length);
|
|
913
|
+
},
|
|
914
|
+
// Minute
|
|
915
|
+
m(e, l) {
|
|
916
|
+
return j(e.getMinutes(), l.length);
|
|
917
|
+
},
|
|
918
|
+
// Second
|
|
919
|
+
s(e, l) {
|
|
920
|
+
return j(e.getSeconds(), l.length);
|
|
921
|
+
},
|
|
922
|
+
// Fraction of second
|
|
923
|
+
S(e, l) {
|
|
924
|
+
const t = l.length, a = e.getMilliseconds(), n = Math.trunc(
|
|
925
|
+
a * Math.pow(10, t - 3)
|
|
926
|
+
);
|
|
927
|
+
return j(n, l.length);
|
|
928
|
+
}
|
|
929
|
+
}, ke = {
|
|
930
|
+
midnight: "midnight",
|
|
931
|
+
noon: "noon",
|
|
932
|
+
morning: "morning",
|
|
933
|
+
afternoon: "afternoon",
|
|
934
|
+
evening: "evening",
|
|
935
|
+
night: "night"
|
|
936
|
+
}, ht = {
|
|
937
|
+
// Era
|
|
938
|
+
G: function(e, l, t) {
|
|
939
|
+
const a = e.getFullYear() > 0 ? 1 : 0;
|
|
940
|
+
switch (l) {
|
|
941
|
+
// AD, BC
|
|
942
|
+
case "G":
|
|
943
|
+
case "GG":
|
|
944
|
+
case "GGG":
|
|
945
|
+
return t.era(a, { width: "abbreviated" });
|
|
946
|
+
// A, B
|
|
947
|
+
case "GGGGG":
|
|
948
|
+
return t.era(a, { width: "narrow" });
|
|
949
|
+
default:
|
|
950
|
+
return t.era(a, { width: "wide" });
|
|
951
|
+
}
|
|
952
|
+
},
|
|
953
|
+
// Year
|
|
954
|
+
y: function(e, l, t) {
|
|
955
|
+
if (l === "yo") {
|
|
956
|
+
const a = e.getFullYear(), n = a > 0 ? a : 1 - a;
|
|
957
|
+
return t.ordinalNumber(n, { unit: "year" });
|
|
958
|
+
}
|
|
959
|
+
return Be.y(e, l);
|
|
960
|
+
},
|
|
961
|
+
// Local week-numbering year
|
|
962
|
+
Y: function(e, l, t, a) {
|
|
963
|
+
const n = Xt(e, a), o = n > 0 ? n : 1 - n;
|
|
964
|
+
if (l === "YY") {
|
|
965
|
+
const r = o % 100;
|
|
966
|
+
return j(r, 2);
|
|
967
|
+
}
|
|
968
|
+
return l === "Yo" ? t.ordinalNumber(o, { unit: "year" }) : j(o, l.length);
|
|
969
|
+
},
|
|
970
|
+
// ISO week-numbering year
|
|
971
|
+
R: function(e, l) {
|
|
972
|
+
const t = Qt(e);
|
|
973
|
+
return j(t, l.length);
|
|
974
|
+
},
|
|
975
|
+
// Extended year. This is a single number designating the year of this calendar system.
|
|
976
|
+
// The main difference between `y` and `u` localizers are B.C. years:
|
|
977
|
+
// | Year | `y` | `u` |
|
|
978
|
+
// |------|-----|-----|
|
|
979
|
+
// | AC 1 | 1 | 1 |
|
|
980
|
+
// | BC 1 | 1 | 0 |
|
|
981
|
+
// | BC 2 | 2 | -1 |
|
|
982
|
+
// Also `yy` always returns the last two digits of a year,
|
|
983
|
+
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
984
|
+
u: function(e, l) {
|
|
985
|
+
const t = e.getFullYear();
|
|
986
|
+
return j(t, l.length);
|
|
987
|
+
},
|
|
988
|
+
// Quarter
|
|
989
|
+
Q: function(e, l, t) {
|
|
990
|
+
const a = Math.ceil((e.getMonth() + 1) / 3);
|
|
991
|
+
switch (l) {
|
|
992
|
+
// 1, 2, 3, 4
|
|
993
|
+
case "Q":
|
|
994
|
+
return String(a);
|
|
995
|
+
// 01, 02, 03, 04
|
|
996
|
+
case "QQ":
|
|
997
|
+
return j(a, 2);
|
|
998
|
+
// 1st, 2nd, 3rd, 4th
|
|
999
|
+
case "Qo":
|
|
1000
|
+
return t.ordinalNumber(a, { unit: "quarter" });
|
|
1001
|
+
// Q1, Q2, Q3, Q4
|
|
1002
|
+
case "QQQ":
|
|
1003
|
+
return t.quarter(a, {
|
|
1004
|
+
width: "abbreviated",
|
|
1005
|
+
context: "formatting"
|
|
1006
|
+
});
|
|
1007
|
+
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
1008
|
+
case "QQQQQ":
|
|
1009
|
+
return t.quarter(a, {
|
|
1010
|
+
width: "narrow",
|
|
1011
|
+
context: "formatting"
|
|
1012
|
+
});
|
|
1013
|
+
default:
|
|
1014
|
+
return t.quarter(a, {
|
|
1015
|
+
width: "wide",
|
|
1016
|
+
context: "formatting"
|
|
1017
|
+
});
|
|
1018
|
+
}
|
|
1019
|
+
},
|
|
1020
|
+
// Stand-alone quarter
|
|
1021
|
+
q: function(e, l, t) {
|
|
1022
|
+
const a = Math.ceil((e.getMonth() + 1) / 3);
|
|
1023
|
+
switch (l) {
|
|
1024
|
+
// 1, 2, 3, 4
|
|
1025
|
+
case "q":
|
|
1026
|
+
return String(a);
|
|
1027
|
+
// 01, 02, 03, 04
|
|
1028
|
+
case "qq":
|
|
1029
|
+
return j(a, 2);
|
|
1030
|
+
// 1st, 2nd, 3rd, 4th
|
|
1031
|
+
case "qo":
|
|
1032
|
+
return t.ordinalNumber(a, { unit: "quarter" });
|
|
1033
|
+
// Q1, Q2, Q3, Q4
|
|
1034
|
+
case "qqq":
|
|
1035
|
+
return t.quarter(a, {
|
|
1036
|
+
width: "abbreviated",
|
|
1037
|
+
context: "standalone"
|
|
1038
|
+
});
|
|
1039
|
+
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
1040
|
+
case "qqqqq":
|
|
1041
|
+
return t.quarter(a, {
|
|
1042
|
+
width: "narrow",
|
|
1043
|
+
context: "standalone"
|
|
1044
|
+
});
|
|
1045
|
+
default:
|
|
1046
|
+
return t.quarter(a, {
|
|
1047
|
+
width: "wide",
|
|
1048
|
+
context: "standalone"
|
|
1049
|
+
});
|
|
1050
|
+
}
|
|
1051
|
+
},
|
|
1052
|
+
// Month
|
|
1053
|
+
M: function(e, l, t) {
|
|
1054
|
+
const a = e.getMonth();
|
|
1055
|
+
switch (l) {
|
|
1056
|
+
case "M":
|
|
1057
|
+
case "MM":
|
|
1058
|
+
return Be.M(e, l);
|
|
1059
|
+
// 1st, 2nd, ..., 12th
|
|
1060
|
+
case "Mo":
|
|
1061
|
+
return t.ordinalNumber(a + 1, { unit: "month" });
|
|
1062
|
+
// Jan, Feb, ..., Dec
|
|
1063
|
+
case "MMM":
|
|
1064
|
+
return t.month(a, {
|
|
1065
|
+
width: "abbreviated",
|
|
1066
|
+
context: "formatting"
|
|
1067
|
+
});
|
|
1068
|
+
// J, F, ..., D
|
|
1069
|
+
case "MMMMM":
|
|
1070
|
+
return t.month(a, {
|
|
1071
|
+
width: "narrow",
|
|
1072
|
+
context: "formatting"
|
|
1073
|
+
});
|
|
1074
|
+
default:
|
|
1075
|
+
return t.month(a, { width: "wide", context: "formatting" });
|
|
1076
|
+
}
|
|
1077
|
+
},
|
|
1078
|
+
// Stand-alone month
|
|
1079
|
+
L: function(e, l, t) {
|
|
1080
|
+
const a = e.getMonth();
|
|
1081
|
+
switch (l) {
|
|
1082
|
+
// 1, 2, ..., 12
|
|
1083
|
+
case "L":
|
|
1084
|
+
return String(a + 1);
|
|
1085
|
+
// 01, 02, ..., 12
|
|
1086
|
+
case "LL":
|
|
1087
|
+
return j(a + 1, 2);
|
|
1088
|
+
// 1st, 2nd, ..., 12th
|
|
1089
|
+
case "Lo":
|
|
1090
|
+
return t.ordinalNumber(a + 1, { unit: "month" });
|
|
1091
|
+
// Jan, Feb, ..., Dec
|
|
1092
|
+
case "LLL":
|
|
1093
|
+
return t.month(a, {
|
|
1094
|
+
width: "abbreviated",
|
|
1095
|
+
context: "standalone"
|
|
1096
|
+
});
|
|
1097
|
+
// J, F, ..., D
|
|
1098
|
+
case "LLLLL":
|
|
1099
|
+
return t.month(a, {
|
|
1100
|
+
width: "narrow",
|
|
1101
|
+
context: "standalone"
|
|
1102
|
+
});
|
|
1103
|
+
default:
|
|
1104
|
+
return t.month(a, { width: "wide", context: "standalone" });
|
|
1105
|
+
}
|
|
1106
|
+
},
|
|
1107
|
+
// Local week of year
|
|
1108
|
+
w: function(e, l, t, a) {
|
|
1109
|
+
const n = Ca(e, a);
|
|
1110
|
+
return l === "wo" ? t.ordinalNumber(n, { unit: "week" }) : j(n, l.length);
|
|
1111
|
+
},
|
|
1112
|
+
// ISO week of year
|
|
1113
|
+
I: function(e, l, t) {
|
|
1114
|
+
const a = Sa(e);
|
|
1115
|
+
return l === "Io" ? t.ordinalNumber(a, { unit: "week" }) : j(a, l.length);
|
|
1116
|
+
},
|
|
1117
|
+
// Day of the month
|
|
1118
|
+
d: function(e, l, t) {
|
|
1119
|
+
return l === "do" ? t.ordinalNumber(e.getDate(), { unit: "date" }) : Be.d(e, l);
|
|
1120
|
+
},
|
|
1121
|
+
// Day of year
|
|
1122
|
+
D: function(e, l, t) {
|
|
1123
|
+
const a = ga(e);
|
|
1124
|
+
return l === "Do" ? t.ordinalNumber(a, { unit: "dayOfYear" }) : j(a, l.length);
|
|
1125
|
+
},
|
|
1126
|
+
// Day of week
|
|
1127
|
+
E: function(e, l, t) {
|
|
1128
|
+
const a = e.getDay();
|
|
1129
|
+
switch (l) {
|
|
1130
|
+
// Tue
|
|
1131
|
+
case "E":
|
|
1132
|
+
case "EE":
|
|
1133
|
+
case "EEE":
|
|
1134
|
+
return t.day(a, {
|
|
1135
|
+
width: "abbreviated",
|
|
1136
|
+
context: "formatting"
|
|
1137
|
+
});
|
|
1138
|
+
// T
|
|
1139
|
+
case "EEEEE":
|
|
1140
|
+
return t.day(a, {
|
|
1141
|
+
width: "narrow",
|
|
1142
|
+
context: "formatting"
|
|
1143
|
+
});
|
|
1144
|
+
// Tu
|
|
1145
|
+
case "EEEEEE":
|
|
1146
|
+
return t.day(a, {
|
|
1147
|
+
width: "short",
|
|
1148
|
+
context: "formatting"
|
|
1149
|
+
});
|
|
1150
|
+
default:
|
|
1151
|
+
return t.day(a, {
|
|
1152
|
+
width: "wide",
|
|
1153
|
+
context: "formatting"
|
|
1154
|
+
});
|
|
1155
|
+
}
|
|
1156
|
+
},
|
|
1157
|
+
// Local day of week
|
|
1158
|
+
e: function(e, l, t, a) {
|
|
1159
|
+
const n = e.getDay(), o = (n - a.weekStartsOn + 8) % 7 || 7;
|
|
1160
|
+
switch (l) {
|
|
1161
|
+
// Numerical value (Nth day of week with current locale or weekStartsOn)
|
|
1162
|
+
case "e":
|
|
1163
|
+
return String(o);
|
|
1164
|
+
// Padded numerical value
|
|
1165
|
+
case "ee":
|
|
1166
|
+
return j(o, 2);
|
|
1167
|
+
// 1st, 2nd, ..., 7th
|
|
1168
|
+
case "eo":
|
|
1169
|
+
return t.ordinalNumber(o, { unit: "day" });
|
|
1170
|
+
case "eee":
|
|
1171
|
+
return t.day(n, {
|
|
1172
|
+
width: "abbreviated",
|
|
1173
|
+
context: "formatting"
|
|
1174
|
+
});
|
|
1175
|
+
// T
|
|
1176
|
+
case "eeeee":
|
|
1177
|
+
return t.day(n, {
|
|
1178
|
+
width: "narrow",
|
|
1179
|
+
context: "formatting"
|
|
1180
|
+
});
|
|
1181
|
+
// Tu
|
|
1182
|
+
case "eeeeee":
|
|
1183
|
+
return t.day(n, {
|
|
1184
|
+
width: "short",
|
|
1185
|
+
context: "formatting"
|
|
1186
|
+
});
|
|
1187
|
+
default:
|
|
1188
|
+
return t.day(n, {
|
|
1189
|
+
width: "wide",
|
|
1190
|
+
context: "formatting"
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1193
|
+
},
|
|
1194
|
+
// Stand-alone local day of week
|
|
1195
|
+
c: function(e, l, t, a) {
|
|
1196
|
+
const n = e.getDay(), o = (n - a.weekStartsOn + 8) % 7 || 7;
|
|
1197
|
+
switch (l) {
|
|
1198
|
+
// Numerical value (same as in `e`)
|
|
1199
|
+
case "c":
|
|
1200
|
+
return String(o);
|
|
1201
|
+
// Padded numerical value
|
|
1202
|
+
case "cc":
|
|
1203
|
+
return j(o, l.length);
|
|
1204
|
+
// 1st, 2nd, ..., 7th
|
|
1205
|
+
case "co":
|
|
1206
|
+
return t.ordinalNumber(o, { unit: "day" });
|
|
1207
|
+
case "ccc":
|
|
1208
|
+
return t.day(n, {
|
|
1209
|
+
width: "abbreviated",
|
|
1210
|
+
context: "standalone"
|
|
1211
|
+
});
|
|
1212
|
+
// T
|
|
1213
|
+
case "ccccc":
|
|
1214
|
+
return t.day(n, {
|
|
1215
|
+
width: "narrow",
|
|
1216
|
+
context: "standalone"
|
|
1217
|
+
});
|
|
1218
|
+
// Tu
|
|
1219
|
+
case "cccccc":
|
|
1220
|
+
return t.day(n, {
|
|
1221
|
+
width: "short",
|
|
1222
|
+
context: "standalone"
|
|
1223
|
+
});
|
|
1224
|
+
default:
|
|
1225
|
+
return t.day(n, {
|
|
1226
|
+
width: "wide",
|
|
1227
|
+
context: "standalone"
|
|
1228
|
+
});
|
|
1229
|
+
}
|
|
1230
|
+
},
|
|
1231
|
+
// ISO day of week
|
|
1232
|
+
i: function(e, l, t) {
|
|
1233
|
+
const a = e.getDay(), n = a === 0 ? 7 : a;
|
|
1234
|
+
switch (l) {
|
|
1235
|
+
// 2
|
|
1236
|
+
case "i":
|
|
1237
|
+
return String(n);
|
|
1238
|
+
// 02
|
|
1239
|
+
case "ii":
|
|
1240
|
+
return j(n, l.length);
|
|
1241
|
+
// 2nd
|
|
1242
|
+
case "io":
|
|
1243
|
+
return t.ordinalNumber(n, { unit: "day" });
|
|
1244
|
+
// Tue
|
|
1245
|
+
case "iii":
|
|
1246
|
+
return t.day(a, {
|
|
1247
|
+
width: "abbreviated",
|
|
1248
|
+
context: "formatting"
|
|
1249
|
+
});
|
|
1250
|
+
// T
|
|
1251
|
+
case "iiiii":
|
|
1252
|
+
return t.day(a, {
|
|
1253
|
+
width: "narrow",
|
|
1254
|
+
context: "formatting"
|
|
1255
|
+
});
|
|
1256
|
+
// Tu
|
|
1257
|
+
case "iiiiii":
|
|
1258
|
+
return t.day(a, {
|
|
1259
|
+
width: "short",
|
|
1260
|
+
context: "formatting"
|
|
1261
|
+
});
|
|
1262
|
+
default:
|
|
1263
|
+
return t.day(a, {
|
|
1264
|
+
width: "wide",
|
|
1265
|
+
context: "formatting"
|
|
1266
|
+
});
|
|
1267
|
+
}
|
|
1268
|
+
},
|
|
1269
|
+
// AM or PM
|
|
1270
|
+
a: function(e, l, t) {
|
|
1271
|
+
const n = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
1272
|
+
switch (l) {
|
|
1273
|
+
case "a":
|
|
1274
|
+
case "aa":
|
|
1275
|
+
return t.dayPeriod(n, {
|
|
1276
|
+
width: "abbreviated",
|
|
1277
|
+
context: "formatting"
|
|
1278
|
+
});
|
|
1279
|
+
case "aaa":
|
|
1280
|
+
return t.dayPeriod(n, {
|
|
1281
|
+
width: "abbreviated",
|
|
1282
|
+
context: "formatting"
|
|
1283
|
+
}).toLowerCase();
|
|
1284
|
+
case "aaaaa":
|
|
1285
|
+
return t.dayPeriod(n, {
|
|
1286
|
+
width: "narrow",
|
|
1287
|
+
context: "formatting"
|
|
1288
|
+
});
|
|
1289
|
+
default:
|
|
1290
|
+
return t.dayPeriod(n, {
|
|
1291
|
+
width: "wide",
|
|
1292
|
+
context: "formatting"
|
|
1293
|
+
});
|
|
1294
|
+
}
|
|
1295
|
+
},
|
|
1296
|
+
// AM, PM, midnight, noon
|
|
1297
|
+
b: function(e, l, t) {
|
|
1298
|
+
const a = e.getHours();
|
|
1299
|
+
let n;
|
|
1300
|
+
switch (a === 12 ? n = ke.noon : a === 0 ? n = ke.midnight : n = a / 12 >= 1 ? "pm" : "am", l) {
|
|
1301
|
+
case "b":
|
|
1302
|
+
case "bb":
|
|
1303
|
+
return t.dayPeriod(n, {
|
|
1304
|
+
width: "abbreviated",
|
|
1305
|
+
context: "formatting"
|
|
1306
|
+
});
|
|
1307
|
+
case "bbb":
|
|
1308
|
+
return t.dayPeriod(n, {
|
|
1309
|
+
width: "abbreviated",
|
|
1310
|
+
context: "formatting"
|
|
1311
|
+
}).toLowerCase();
|
|
1312
|
+
case "bbbbb":
|
|
1313
|
+
return t.dayPeriod(n, {
|
|
1314
|
+
width: "narrow",
|
|
1315
|
+
context: "formatting"
|
|
1316
|
+
});
|
|
1317
|
+
default:
|
|
1318
|
+
return t.dayPeriod(n, {
|
|
1319
|
+
width: "wide",
|
|
1320
|
+
context: "formatting"
|
|
1321
|
+
});
|
|
1322
|
+
}
|
|
1323
|
+
},
|
|
1324
|
+
// in the morning, in the afternoon, in the evening, at night
|
|
1325
|
+
B: function(e, l, t) {
|
|
1326
|
+
const a = e.getHours();
|
|
1327
|
+
let n;
|
|
1328
|
+
switch (a >= 17 ? n = ke.evening : a >= 12 ? n = ke.afternoon : a >= 4 ? n = ke.morning : n = ke.night, l) {
|
|
1329
|
+
case "B":
|
|
1330
|
+
case "BB":
|
|
1331
|
+
case "BBB":
|
|
1332
|
+
return t.dayPeriod(n, {
|
|
1333
|
+
width: "abbreviated",
|
|
1334
|
+
context: "formatting"
|
|
1335
|
+
});
|
|
1336
|
+
case "BBBBB":
|
|
1337
|
+
return t.dayPeriod(n, {
|
|
1338
|
+
width: "narrow",
|
|
1339
|
+
context: "formatting"
|
|
1340
|
+
});
|
|
1341
|
+
default:
|
|
1342
|
+
return t.dayPeriod(n, {
|
|
1343
|
+
width: "wide",
|
|
1344
|
+
context: "formatting"
|
|
1345
|
+
});
|
|
1346
|
+
}
|
|
1347
|
+
},
|
|
1348
|
+
// Hour [1-12]
|
|
1349
|
+
h: function(e, l, t) {
|
|
1350
|
+
if (l === "ho") {
|
|
1351
|
+
let a = e.getHours() % 12;
|
|
1352
|
+
return a === 0 && (a = 12), t.ordinalNumber(a, { unit: "hour" });
|
|
1353
|
+
}
|
|
1354
|
+
return Be.h(e, l);
|
|
1355
|
+
},
|
|
1356
|
+
// Hour [0-23]
|
|
1357
|
+
H: function(e, l, t) {
|
|
1358
|
+
return l === "Ho" ? t.ordinalNumber(e.getHours(), { unit: "hour" }) : Be.H(e, l);
|
|
1359
|
+
},
|
|
1360
|
+
// Hour [0-11]
|
|
1361
|
+
K: function(e, l, t) {
|
|
1362
|
+
const a = e.getHours() % 12;
|
|
1363
|
+
return l === "Ko" ? t.ordinalNumber(a, { unit: "hour" }) : j(a, l.length);
|
|
1364
|
+
},
|
|
1365
|
+
// Hour [1-24]
|
|
1366
|
+
k: function(e, l, t) {
|
|
1367
|
+
let a = e.getHours();
|
|
1368
|
+
return a === 0 && (a = 24), l === "ko" ? t.ordinalNumber(a, { unit: "hour" }) : j(a, l.length);
|
|
1369
|
+
},
|
|
1370
|
+
// Minute
|
|
1371
|
+
m: function(e, l, t) {
|
|
1372
|
+
return l === "mo" ? t.ordinalNumber(e.getMinutes(), { unit: "minute" }) : Be.m(e, l);
|
|
1373
|
+
},
|
|
1374
|
+
// Second
|
|
1375
|
+
s: function(e, l, t) {
|
|
1376
|
+
return l === "so" ? t.ordinalNumber(e.getSeconds(), { unit: "second" }) : Be.s(e, l);
|
|
1377
|
+
},
|
|
1378
|
+
// Fraction of second
|
|
1379
|
+
S: function(e, l) {
|
|
1380
|
+
return Be.S(e, l);
|
|
1381
|
+
},
|
|
1382
|
+
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1383
|
+
X: function(e, l, t) {
|
|
1384
|
+
const a = e.getTimezoneOffset();
|
|
1385
|
+
if (a === 0)
|
|
1386
|
+
return "Z";
|
|
1387
|
+
switch (l) {
|
|
1388
|
+
// Hours and optional minutes
|
|
1389
|
+
case "X":
|
|
1390
|
+
return Ft(a);
|
|
1391
|
+
// Hours, minutes and optional seconds without `:` delimiter
|
|
1392
|
+
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1393
|
+
// so this token always has the same output as `XX`
|
|
1394
|
+
case "XXXX":
|
|
1395
|
+
case "XX":
|
|
1396
|
+
return Oe(a);
|
|
1397
|
+
// Hours and minutes with `:` delimiter
|
|
1398
|
+
default:
|
|
1399
|
+
return Oe(a, ":");
|
|
1400
|
+
}
|
|
1401
|
+
},
|
|
1402
|
+
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
1403
|
+
x: function(e, l, t) {
|
|
1404
|
+
const a = e.getTimezoneOffset();
|
|
1405
|
+
switch (l) {
|
|
1406
|
+
// Hours and optional minutes
|
|
1407
|
+
case "x":
|
|
1408
|
+
return Ft(a);
|
|
1409
|
+
// Hours, minutes and optional seconds without `:` delimiter
|
|
1410
|
+
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1411
|
+
// so this token always has the same output as `xx`
|
|
1412
|
+
case "xxxx":
|
|
1413
|
+
case "xx":
|
|
1414
|
+
return Oe(a);
|
|
1415
|
+
// Hours and minutes with `:` delimiter
|
|
1416
|
+
default:
|
|
1417
|
+
return Oe(a, ":");
|
|
1418
|
+
}
|
|
1419
|
+
},
|
|
1420
|
+
// Timezone (GMT)
|
|
1421
|
+
O: function(e, l, t) {
|
|
1422
|
+
const a = e.getTimezoneOffset();
|
|
1423
|
+
switch (l) {
|
|
1424
|
+
// Short
|
|
1425
|
+
case "O":
|
|
1426
|
+
case "OO":
|
|
1427
|
+
case "OOO":
|
|
1428
|
+
return "GMT" + gt(a, ":");
|
|
1429
|
+
default:
|
|
1430
|
+
return "GMT" + Oe(a, ":");
|
|
1431
|
+
}
|
|
1432
|
+
},
|
|
1433
|
+
// Timezone (specific non-location)
|
|
1434
|
+
z: function(e, l, t) {
|
|
1435
|
+
const a = e.getTimezoneOffset();
|
|
1436
|
+
switch (l) {
|
|
1437
|
+
// Short
|
|
1438
|
+
case "z":
|
|
1439
|
+
case "zz":
|
|
1440
|
+
case "zzz":
|
|
1441
|
+
return "GMT" + gt(a, ":");
|
|
1442
|
+
default:
|
|
1443
|
+
return "GMT" + Oe(a, ":");
|
|
1444
|
+
}
|
|
1445
|
+
},
|
|
1446
|
+
// Seconds timestamp
|
|
1447
|
+
t: function(e, l, t) {
|
|
1448
|
+
const a = Math.trunc(+e / 1e3);
|
|
1449
|
+
return j(a, l.length);
|
|
1450
|
+
},
|
|
1451
|
+
// Milliseconds timestamp
|
|
1452
|
+
T: function(e, l, t) {
|
|
1453
|
+
return j(+e, l.length);
|
|
1454
|
+
}
|
|
1455
|
+
};
|
|
1456
|
+
function gt(e, l = "") {
|
|
1457
|
+
const t = e > 0 ? "-" : "+", a = Math.abs(e), n = Math.trunc(a / 60), o = a % 60;
|
|
1458
|
+
return o === 0 ? t + String(n) : t + String(n) + l + j(o, 2);
|
|
1459
|
+
}
|
|
1460
|
+
function Ft(e, l) {
|
|
1461
|
+
return e % 60 === 0 ? (e > 0 ? "-" : "+") + j(Math.abs(e) / 60, 2) : Oe(e, l);
|
|
1462
|
+
}
|
|
1463
|
+
function Oe(e, l = "") {
|
|
1464
|
+
const t = e > 0 ? "-" : "+", a = Math.abs(e), n = j(Math.trunc(a / 60), 2), o = j(a % 60, 2);
|
|
1465
|
+
return t + n + l + o;
|
|
1466
|
+
}
|
|
1467
|
+
const St = (e, l) => {
|
|
1468
|
+
switch (e) {
|
|
1469
|
+
case "P":
|
|
1470
|
+
return l.date({ width: "short" });
|
|
1471
|
+
case "PP":
|
|
1472
|
+
return l.date({ width: "medium" });
|
|
1473
|
+
case "PPP":
|
|
1474
|
+
return l.date({ width: "long" });
|
|
1475
|
+
default:
|
|
1476
|
+
return l.date({ width: "full" });
|
|
1477
|
+
}
|
|
1478
|
+
}, zt = (e, l) => {
|
|
1479
|
+
switch (e) {
|
|
1480
|
+
case "p":
|
|
1481
|
+
return l.time({ width: "short" });
|
|
1482
|
+
case "pp":
|
|
1483
|
+
return l.time({ width: "medium" });
|
|
1484
|
+
case "ppp":
|
|
1485
|
+
return l.time({ width: "long" });
|
|
1486
|
+
default:
|
|
1487
|
+
return l.time({ width: "full" });
|
|
1488
|
+
}
|
|
1489
|
+
}, Da = (e, l) => {
|
|
1490
|
+
const t = e.match(/(P+)(p+)?/) || [], a = t[1], n = t[2];
|
|
1491
|
+
if (!n)
|
|
1492
|
+
return St(e, l);
|
|
1493
|
+
let o;
|
|
1494
|
+
switch (a) {
|
|
1495
|
+
case "P":
|
|
1496
|
+
o = l.dateTime({ width: "short" });
|
|
1497
|
+
break;
|
|
1498
|
+
case "PP":
|
|
1499
|
+
o = l.dateTime({ width: "medium" });
|
|
1500
|
+
break;
|
|
1501
|
+
case "PPP":
|
|
1502
|
+
o = l.dateTime({ width: "long" });
|
|
1503
|
+
break;
|
|
1504
|
+
default:
|
|
1505
|
+
o = l.dateTime({ width: "full" });
|
|
1506
|
+
break;
|
|
1507
|
+
}
|
|
1508
|
+
return o.replace("{{date}}", St(a, l)).replace("{{time}}", zt(n, l));
|
|
1509
|
+
}, Ta = {
|
|
1510
|
+
p: zt,
|
|
1511
|
+
P: Da
|
|
1512
|
+
}, wa = /^D+$/, Oa = /^Y+$/, Aa = ["D", "DD", "YY", "YYYY"];
|
|
1513
|
+
function Pa(e) {
|
|
1514
|
+
return wa.test(e);
|
|
1515
|
+
}
|
|
1516
|
+
function Ia(e) {
|
|
1517
|
+
return Oa.test(e);
|
|
1518
|
+
}
|
|
1519
|
+
function _a(e, l, t) {
|
|
1520
|
+
const a = $a(e, l, t);
|
|
1521
|
+
if (console.warn(a), Aa.includes(e)) throw new RangeError(a);
|
|
1522
|
+
}
|
|
1523
|
+
function $a(e, l, t) {
|
|
1524
|
+
const a = e[0] === "Y" ? "years" : "days of the month";
|
|
1525
|
+
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${l}\`) for formatting ${a} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1526
|
+
}
|
|
1527
|
+
function ka(e) {
|
|
1528
|
+
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
1529
|
+
}
|
|
1530
|
+
function Ea(e) {
|
|
1531
|
+
return !(!ka(e) && typeof e != "number" || isNaN(+Pe(e)));
|
|
1532
|
+
}
|
|
1533
|
+
const La = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Ua = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ra = /^'([^]*?)'?$/, Va = /''/g, Na = /[a-zA-Z]/;
|
|
1534
|
+
function je(e, l, t) {
|
|
1535
|
+
var d, g, y, u, D, m, I, $;
|
|
1536
|
+
const a = rt(), n = (t == null ? void 0 : t.locale) ?? a.locale ?? Nt, o = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((g = (d = t == null ? void 0 : t.locale) == null ? void 0 : d.options) == null ? void 0 : g.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((u = (y = a.locale) == null ? void 0 : y.options) == null ? void 0 : u.firstWeekContainsDate) ?? 1, r = (t == null ? void 0 : t.weekStartsOn) ?? ((m = (D = t == null ? void 0 : t.locale) == null ? void 0 : D.options) == null ? void 0 : m.weekStartsOn) ?? a.weekStartsOn ?? (($ = (I = a.locale) == null ? void 0 : I.options) == null ? void 0 : $.weekStartsOn) ?? 0, i = Pe(e, t == null ? void 0 : t.in);
|
|
1537
|
+
if (!Ea(i))
|
|
1538
|
+
throw new RangeError("Invalid time value");
|
|
1539
|
+
let s = l.match(Ua).map((C) => {
|
|
1540
|
+
const B = C[0];
|
|
1541
|
+
if (B === "p" || B === "P") {
|
|
1542
|
+
const V = Ta[B];
|
|
1543
|
+
return V(C, n.formatLong);
|
|
1544
|
+
}
|
|
1545
|
+
return C;
|
|
1546
|
+
}).join("").match(La).map((C) => {
|
|
1547
|
+
if (C === "''")
|
|
1548
|
+
return { isToken: !1, value: "'" };
|
|
1549
|
+
const B = C[0];
|
|
1550
|
+
if (B === "'")
|
|
1551
|
+
return { isToken: !1, value: Ma(C) };
|
|
1552
|
+
if (ht[B])
|
|
1553
|
+
return { isToken: !0, value: C };
|
|
1554
|
+
if (B.match(Na))
|
|
1555
|
+
throw new RangeError(
|
|
1556
|
+
"Format string contains an unescaped latin alphabet character `" + B + "`"
|
|
1557
|
+
);
|
|
1558
|
+
return { isToken: !1, value: C };
|
|
1559
|
+
});
|
|
1560
|
+
n.localize.preprocessor && (s = n.localize.preprocessor(i, s));
|
|
1561
|
+
const b = {
|
|
1562
|
+
firstWeekContainsDate: o,
|
|
1563
|
+
weekStartsOn: r,
|
|
1564
|
+
locale: n
|
|
1565
|
+
};
|
|
1566
|
+
return s.map((C) => {
|
|
1567
|
+
if (!C.isToken) return C.value;
|
|
1568
|
+
const B = C.value;
|
|
1569
|
+
(!(t != null && t.useAdditionalWeekYearTokens) && Ia(B) || !(t != null && t.useAdditionalDayOfYearTokens) && Pa(B)) && _a(B, l, String(e));
|
|
1570
|
+
const V = ht[B[0]];
|
|
1571
|
+
return V(i, B, n.localize, b);
|
|
1572
|
+
}).join("");
|
|
1573
|
+
}
|
|
1574
|
+
function Ma(e) {
|
|
1575
|
+
const l = e.match(Ra);
|
|
1576
|
+
return l ? l[1].replace(Va, "'") : e;
|
|
1577
|
+
}
|
|
1578
|
+
const Bt = {
|
|
1579
|
+
"en-US": {
|
|
1580
|
+
apply: "Apply",
|
|
1581
|
+
clear: "Clear",
|
|
1582
|
+
reset: "Reset"
|
|
1583
|
+
},
|
|
1584
|
+
"ja-JP": {
|
|
1585
|
+
apply: "適用",
|
|
1586
|
+
clear: "クリア",
|
|
1587
|
+
reset: "リセット"
|
|
1588
|
+
},
|
|
1589
|
+
"pt-BR": {
|
|
1590
|
+
apply: "Aplicar",
|
|
1591
|
+
clear: "Limpar",
|
|
1592
|
+
reset: "Reiniciar"
|
|
1593
|
+
}
|
|
1594
|
+
}, Ya = z({
|
|
1595
|
+
i18n: { messages: Bt },
|
|
1596
|
+
name: "bento-date-range-filter",
|
|
1597
|
+
components: {
|
|
1598
|
+
BentoBaseFilter: Se,
|
|
1599
|
+
BentoButtonActions: Ol,
|
|
1600
|
+
BentoDateRangePicker: Ml,
|
|
1601
|
+
BentoTypography: ye,
|
|
1602
|
+
BentoDivider: st,
|
|
1603
|
+
DateRangePickerCalendar: Nl
|
|
1604
|
+
},
|
|
1605
|
+
props: {
|
|
1606
|
+
/**
|
|
1607
|
+
* Disables the filter from being interacted with.
|
|
1608
|
+
*/
|
|
1609
|
+
disabled: { type: Boolean, default: !1 },
|
|
1610
|
+
/**
|
|
1611
|
+
* Default value of the filter to reset to.
|
|
1612
|
+
*/
|
|
1613
|
+
defaultValue: { type: Object, default: null },
|
|
1614
|
+
/**
|
|
1615
|
+
* Filter name/key referencing the actual property name in the data set.
|
|
1616
|
+
* Should be unique per filter bar.
|
|
1617
|
+
*/
|
|
1618
|
+
field: { type: String, required: !0 },
|
|
1619
|
+
/**
|
|
1620
|
+
* Label text to be displayed
|
|
1621
|
+
*/
|
|
1622
|
+
label: { type: String, required: !0 },
|
|
1623
|
+
/**
|
|
1624
|
+
* Renders the base filter's slot content only - leaving out the button and the popover.
|
|
1625
|
+
* Used for the allFiltersModal component.
|
|
1626
|
+
*/
|
|
1627
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
1628
|
+
/**
|
|
1629
|
+
* List of options that are needed to setup the filter
|
|
1630
|
+
* Available options:
|
|
1631
|
+
* - allowTimeInput: Allows user to enter time values in the form
|
|
1632
|
+
* - firstDayOfWeek: Allows user to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
|
|
1633
|
+
* - isDateDisabled: Indicate if a date should be disabled or not
|
|
1634
|
+
* - maxRange: Set a maximum number of dates to be selectable by the range
|
|
1635
|
+
* - numberOfMonths: Number of months rendered on pane
|
|
1636
|
+
* - quickSelectRanges: An array that sets the custom range dropdown items. @see BentoDateRangePicker
|
|
1637
|
+
* - showEndDateOnOpen: Upon opening date range picker, end date's month will be pre-selected.
|
|
1638
|
+
* - granularities: A list of available granularities.
|
|
1639
|
+
* - variant: The type of calendar to display. Defaults to showing days.
|
|
1640
|
+
* - tooltipPosition: The position of the tooltip attached to the filter button
|
|
1641
|
+
* - tooltipText: The content of the tooltip attached to the filter button
|
|
1642
|
+
*/
|
|
1643
|
+
options: {
|
|
1644
|
+
type: Object,
|
|
1645
|
+
default: void 0
|
|
1646
|
+
},
|
|
1647
|
+
/**
|
|
1648
|
+
* Current value of the filter
|
|
1649
|
+
*/
|
|
1650
|
+
value: {
|
|
1651
|
+
type: Object,
|
|
1652
|
+
default: () => ({ startDate: void 0, endDate: void 0 })
|
|
1653
|
+
}
|
|
1654
|
+
},
|
|
1655
|
+
emits: [_.INPUT, _.UPDATE],
|
|
1656
|
+
setup(e, { emit: l }) {
|
|
1657
|
+
var ne, A, h, p;
|
|
1658
|
+
const { locale: t, t: a } = pe({ messages: Bt }), n = ha(), { internalFilterValue: o, isSecondaryButtonDisabled: r, isApplyButtonDisabled: i } = De(
|
|
1659
|
+
ee(e, "value"),
|
|
1660
|
+
ee(e, "defaultValue")
|
|
1661
|
+
), s = M(!1), b = f(() => {
|
|
1662
|
+
var c;
|
|
1663
|
+
return ((c = e == null ? void 0 : e.options) == null ? void 0 : c.quickSelectRanges) && e.options.quickSelectRanges.map((R) => {
|
|
1664
|
+
const W = R.data.endDate ? void 0 : new Date(Date.now()).getTime() - R.data.startDate.getTime();
|
|
1665
|
+
return {
|
|
1666
|
+
...R,
|
|
1667
|
+
data: {
|
|
1668
|
+
...R.data,
|
|
1669
|
+
// Adding timeDifference to calculate an up-to-date endDate on range selection
|
|
1670
|
+
timeDifference: W
|
|
1671
|
+
}
|
|
1672
|
+
};
|
|
1673
|
+
});
|
|
1674
|
+
}), d = M(null), g = M(!1), y = vl({
|
|
1675
|
+
startDate: me((ne = e.value) == null ? void 0 : ne.startDate),
|
|
1676
|
+
endDate: me((A = e.value) == null ? void 0 : A.endDate),
|
|
1677
|
+
startTime: $e((h = e.value) == null ? void 0 : h.startDate),
|
|
1678
|
+
endTime: $e((p = e.value) == null ? void 0 : p.endDate)
|
|
1679
|
+
});
|
|
1680
|
+
se(
|
|
1681
|
+
() => e.value,
|
|
1682
|
+
() => {
|
|
1683
|
+
var c, R, W, G;
|
|
1684
|
+
y.startDate = me((c = e.value) == null ? void 0 : c.startDate), y.endDate = me((R = e.value) == null ? void 0 : R.endDate), y.startTime = $e((W = e.value) == null ? void 0 : W.startDate), y.endTime = $e((G = e.value) == null ? void 0 : G.endDate);
|
|
1685
|
+
}
|
|
1686
|
+
);
|
|
1687
|
+
function u(c) {
|
|
1688
|
+
return (c == null ? void 0 : c.length) !== void 0;
|
|
1689
|
+
}
|
|
1690
|
+
const D = (c) => {
|
|
1691
|
+
var R, W, G, oe, P, F, U, te, ue, fe;
|
|
1692
|
+
if (!c || !(c != null && c.startDate) && !c.endDate)
|
|
1693
|
+
return null;
|
|
1694
|
+
if (u((R = e.options) == null ? void 0 : R.quickSelectRanges) && ((G = (W = e.options) == null ? void 0 : W.quickSelectRanges) == null ? void 0 : G.length) > 0) {
|
|
1695
|
+
const be = (P = (oe = e.options) == null ? void 0 : oe.quickSelectRanges) == null ? void 0 : P.find(({ value: ve, data: ae }) => c ? c.range ? ve === c.range : !c.startDate || !c.endDate ? !1 : ae != null && ae.endDate ? tt(ae == null ? void 0 : ae.startDate, c.startDate) && tt(ae == null ? void 0 : ae.endDate, c.endDate) : tt(ae == null ? void 0 : ae.startDate, c.startDate) && Yl(c.endDate) : !1);
|
|
1696
|
+
if (be)
|
|
1697
|
+
return be.label;
|
|
1698
|
+
}
|
|
1699
|
+
return !c.startDate || !c.endDate ? null : Xl(c.startDate, c.endDate) && ((F = e == null ? void 0 : e.options) != null && F.allowTimeInput) ? `${je(c.startDate, "dd MMM, yyyy HH:mm:ss", {
|
|
1700
|
+
locale: n[(U = t.value) == null ? void 0 : U.substring(0, 2)] || n.enUS
|
|
1701
|
+
})} - ${je(c.endDate, "HH:mm:ss", {
|
|
1702
|
+
locale: n[(te = t.value) == null ? void 0 : te.substring(0, 2)] || n.enUS
|
|
1703
|
+
})}` : `${je(c.startDate, "dd MMM, yyyy", {
|
|
1704
|
+
locale: n[(ue = t.value) == null ? void 0 : ue.substring(0, 2)] || n.enUS
|
|
1705
|
+
})} - ${je(c.endDate, "dd MMM, yyyy", {
|
|
1706
|
+
locale: n[(fe = t.value) == null ? void 0 : fe.substring(0, 2)] || n.enUS
|
|
1707
|
+
})}`;
|
|
1708
|
+
}, m = M(D(e.value)), I = f(() => e.label), $ = () => {
|
|
1709
|
+
d.value.closePopover();
|
|
1710
|
+
const { onlySlot: c, ...R } = e;
|
|
1711
|
+
l(_.UPDATE, { ...R, value: o.value });
|
|
1712
|
+
}, C = () => {
|
|
1713
|
+
o.value = void 0, $();
|
|
1714
|
+
}, B = () => {
|
|
1715
|
+
o.value = e.defaultValue, $();
|
|
1716
|
+
}, V = () => {
|
|
1717
|
+
o.value = e.value;
|
|
1718
|
+
}, T = () => {
|
|
1719
|
+
var c, R, W, G;
|
|
1720
|
+
o.value = e.value, s.value = !1, y.startDate = me((c = e.value) == null ? void 0 : c.startDate), y.endDate = me((R = e.value) == null ? void 0 : R.endDate), y.startTime = $e((W = e.value) == null ? void 0 : W.startDate), y.endTime = $e((G = e.value) == null ? void 0 : G.endDate);
|
|
1721
|
+
}, N = (c) => {
|
|
1722
|
+
s.value = !1, o.value = c, y.startDate = me(c.startDate), y.endDate = me(c.endDate), l(_.INPUT, { ...e, value: o.value });
|
|
1723
|
+
}, Y = (c) => {
|
|
1724
|
+
c != null && c.startDate && (c != null && c.endDate) && (o.value = c, y.startDate = me(c.startDate), y.endDate = me(c.endDate), l(_.INPUT, { ...e, value: o.value }));
|
|
1725
|
+
}, k = (c) => {
|
|
1726
|
+
N(c), l(_.INPUT, { ...e, value: o.value });
|
|
1727
|
+
}, O = f(
|
|
1728
|
+
() => [
|
|
1729
|
+
{
|
|
1730
|
+
title: a("apply"),
|
|
1731
|
+
event: $,
|
|
1732
|
+
disabled: s.value || g.value || i.value
|
|
1733
|
+
},
|
|
1734
|
+
{
|
|
1735
|
+
title: e.defaultValue ? a("reset") : a("clear"),
|
|
1736
|
+
event: e.defaultValue ? B : C,
|
|
1737
|
+
disabled: g.value && r.value
|
|
1738
|
+
}
|
|
1739
|
+
]
|
|
1740
|
+
), q = () => {
|
|
1741
|
+
g.value = !0, o.value = { startDate: void 0, endDate: void 0 }, l(_.INPUT, { ...e, value: o.value });
|
|
1742
|
+
}, J = (c) => {
|
|
1743
|
+
g.value = !1, c.startTime && (y.startTime = c.startTime), c.endTime && (y.endTime = c.endTime);
|
|
1744
|
+
};
|
|
1745
|
+
return se(
|
|
1746
|
+
() => e.value,
|
|
1747
|
+
(c) => {
|
|
1748
|
+
m.value = D(c);
|
|
1749
|
+
},
|
|
1750
|
+
{ deep: !0 }
|
|
1751
|
+
), {
|
|
1752
|
+
// Refs
|
|
1753
|
+
baseFilter: d,
|
|
1754
|
+
// Values
|
|
1755
|
+
actions: O,
|
|
1756
|
+
formData: y,
|
|
1757
|
+
internalFilterValue: o,
|
|
1758
|
+
isApplyButtonDisabled: i,
|
|
1759
|
+
isSecondaryButtonDisabled: r,
|
|
1760
|
+
isSelectingDate: s,
|
|
1761
|
+
buttonLabel: I,
|
|
1762
|
+
buttonSecondaryLabel: m,
|
|
1763
|
+
adjustedQuickSelectRanges: b,
|
|
1764
|
+
// Events
|
|
1765
|
+
onCancel: T,
|
|
1766
|
+
onDateSelected: N,
|
|
1767
|
+
openFilter: V,
|
|
1768
|
+
clearFilter: C,
|
|
1769
|
+
resetFilter: B,
|
|
1770
|
+
updateFilter: $,
|
|
1771
|
+
onDatePickerRangeError: q,
|
|
1772
|
+
onDatePickerRangeFormDateInputUpdate: J,
|
|
1773
|
+
onDateInputSelected: k,
|
|
1774
|
+
onRangeSelectorInput: Y
|
|
1775
|
+
};
|
|
1776
|
+
}
|
|
1777
|
+
}), Ha = {
|
|
1778
|
+
key: 1,
|
|
1779
|
+
class: "b-date-range-filter"
|
|
1780
|
+
};
|
|
1781
|
+
function Wa(e, l, t, a, n, o) {
|
|
1782
|
+
var y, u;
|
|
1783
|
+
const r = H("bento-date-range-picker"), i = H("bento-typography"), s = H("bento-divider"), b = H("bento-button-actions"), d = H("date-range-picker-calendar"), g = H("bento-base-filter");
|
|
1784
|
+
return S(), L(g, {
|
|
1785
|
+
ref: "baseFilter",
|
|
1786
|
+
class: "b-base-filter-date-range-filter",
|
|
1787
|
+
"button-label": e.buttonLabel,
|
|
1788
|
+
"button-secondary-label": e.buttonSecondaryLabel,
|
|
1789
|
+
controlled: !e.onlySlot,
|
|
1790
|
+
disabled: e.disabled,
|
|
1791
|
+
"disable-apply-button": e.isApplyButtonDisabled,
|
|
1792
|
+
"disable-secondary-button": e.isSecondaryButtonDisabled,
|
|
1793
|
+
"default-value": e.defaultValue,
|
|
1794
|
+
field: e.field,
|
|
1795
|
+
label: e.label,
|
|
1796
|
+
"only-slot": e.onlySlot,
|
|
1797
|
+
"tooltip-position": (y = e.options) == null ? void 0 : y.tooltipPosition,
|
|
1798
|
+
"tooltip-text": (u = e.options) == null ? void 0 : u.tooltipText,
|
|
1799
|
+
"fit-content": "",
|
|
1800
|
+
onOpen: e.openFilter,
|
|
1801
|
+
onClear: e.clearFilter,
|
|
1802
|
+
onReset: e.resetFilter,
|
|
1803
|
+
onCancel: e.onCancel
|
|
1804
|
+
}, {
|
|
1805
|
+
default: w(() => {
|
|
1806
|
+
var D, m, I, $, C, B, V, T, N, Y, k, O, q, J, ne, A, h, p, c, R, W;
|
|
1807
|
+
return [
|
|
1808
|
+
e.onlySlot ? (S(), L(r, {
|
|
1809
|
+
key: 0,
|
|
1810
|
+
"allow-time-input": (D = e.options) == null ? void 0 : D.allowTimeInput,
|
|
1811
|
+
"model-value": e.internalFilterValue,
|
|
1812
|
+
"first-day-of-week": (m = e.options) == null ? void 0 : m.firstDayOfWeek,
|
|
1813
|
+
"is-date-disabled": (I = e.options) == null ? void 0 : I.isDateDisabled,
|
|
1814
|
+
"number-of-months": ($ = e.options) == null ? void 0 : $.numberOfMonths,
|
|
1815
|
+
"quick-select-ranges": (C = e.options) == null ? void 0 : C.quickSelectRanges,
|
|
1816
|
+
variant: (B = e.options) == null ? void 0 : B.variant,
|
|
1817
|
+
disabled: e.disabled,
|
|
1818
|
+
granularities: (V = e.options) == null ? void 0 : V.granularities,
|
|
1819
|
+
"max-range": (T = e.options) == null ? void 0 : T.maxRange,
|
|
1820
|
+
min: (N = e.options) == null ? void 0 : N.min,
|
|
1821
|
+
max: (Y = e.options) == null ? void 0 : Y.max,
|
|
1822
|
+
"date-form-data": e.formData,
|
|
1823
|
+
"show-end-date-on-open": (k = e.options) == null ? void 0 : k.showEndDateOnOpen,
|
|
1824
|
+
"onUpdate:modelValue": e.onDateInputSelected
|
|
1825
|
+
}, null, 8, ["allow-time-input", "model-value", "first-day-of-week", "is-date-disabled", "number-of-months", "quick-select-ranges", "variant", "disabled", "granularities", "max-range", "min", "max", "date-form-data", "show-end-date-on-open", "onUpdate:modelValue"])) : (S(), Q("div", Ha, [
|
|
1826
|
+
E(d, {
|
|
1827
|
+
"allow-time-input": (O = e.options) == null ? void 0 : O.allowTimeInput,
|
|
1828
|
+
"first-day-of-week": (q = e.options) == null ? void 0 : q.firstDayOfWeek,
|
|
1829
|
+
"is-date-disabled": (J = e.options) == null ? void 0 : J.isDateDisabled,
|
|
1830
|
+
granularities: (ne = e.options) == null ? void 0 : ne.granularities,
|
|
1831
|
+
"max-range": (A = e.options) == null ? void 0 : A.maxRange,
|
|
1832
|
+
min: (h = e.options) == null ? void 0 : h.min,
|
|
1833
|
+
max: (p = e.options) == null ? void 0 : p.max,
|
|
1834
|
+
"number-of-months": (c = e.options) == null ? void 0 : c.numberOfMonths,
|
|
1835
|
+
"quick-select-ranges": e.adjustedQuickSelectRanges,
|
|
1836
|
+
value: e.internalFilterValue,
|
|
1837
|
+
"date-form-data": e.formData,
|
|
1838
|
+
"show-end-date-on-open": (R = e.options) == null ? void 0 : R.showEndDateOnOpen,
|
|
1839
|
+
variant: (W = e.options) == null ? void 0 : W.variant,
|
|
1840
|
+
onInput: e.onDateSelected,
|
|
1841
|
+
onCustomRange: e.onRangeSelectorInput,
|
|
1842
|
+
onError: e.onDatePickerRangeError,
|
|
1843
|
+
onFormDate: e.onDatePickerRangeFormDateInputUpdate,
|
|
1844
|
+
onStartDateSelected: l[0] || (l[0] = (G) => e.isSelectingDate = !0)
|
|
1845
|
+
}, {
|
|
1846
|
+
title: w(() => [
|
|
1847
|
+
E(i, {
|
|
1848
|
+
strongest: "",
|
|
1849
|
+
variant: "body",
|
|
1850
|
+
el: "span"
|
|
1851
|
+
}, {
|
|
1852
|
+
default: w(() => [
|
|
1853
|
+
Z(x(e.label), 1)
|
|
1854
|
+
]),
|
|
1855
|
+
_: 1
|
|
1856
|
+
})
|
|
1857
|
+
]),
|
|
1858
|
+
actions: w(() => [
|
|
1859
|
+
E(s, { class: "b-date-range-filter__divider" }),
|
|
1860
|
+
E(b, {
|
|
1861
|
+
class: "b-date-range-filter__actions",
|
|
1862
|
+
actions: e.actions,
|
|
1863
|
+
layout: "space-between"
|
|
1864
|
+
}, null, 8, ["actions"])
|
|
1865
|
+
]),
|
|
1866
|
+
_: 1
|
|
1867
|
+
}, 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"])
|
|
1868
|
+
]))
|
|
1869
|
+
];
|
|
1870
|
+
}),
|
|
1871
|
+
_: 1
|
|
1872
|
+
}, 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"]);
|
|
1873
|
+
}
|
|
1874
|
+
const Zt = /* @__PURE__ */ le(Ya, [["render", Wa], ["__scopeId", "data-v-601e4345"]]), ja = {
|
|
1875
|
+
name: "bento-radio-group-filter"
|
|
1876
|
+
}, qa = /* @__PURE__ */ z({
|
|
1877
|
+
...ja,
|
|
1878
|
+
props: {
|
|
1879
|
+
disabled: { type: Boolean },
|
|
1880
|
+
defaultValue: { default: void 0 },
|
|
1881
|
+
field: {},
|
|
1882
|
+
label: {},
|
|
1883
|
+
options: { default: () => ({
|
|
1884
|
+
items: []
|
|
1885
|
+
}) },
|
|
1886
|
+
onlySlot: { type: Boolean },
|
|
1887
|
+
value: { default: void 0 }
|
|
1888
|
+
},
|
|
1889
|
+
emits: ["input", "update"],
|
|
1890
|
+
setup(e, { emit: l }) {
|
|
1891
|
+
const t = e, a = l, {
|
|
1892
|
+
// Fields
|
|
1893
|
+
internalFilterValue: n,
|
|
1894
|
+
isSecondaryButtonDisabled: o,
|
|
1895
|
+
isApplyButtonDisabled: r,
|
|
1896
|
+
// Methods
|
|
1897
|
+
clearFilter: i,
|
|
1898
|
+
openFilter: s,
|
|
1899
|
+
resetFilter: b
|
|
1900
|
+
} = Wt(ee(t, "value"), ee(t, "defaultValue")), d = f(() => {
|
|
1901
|
+
var m;
|
|
1902
|
+
const D = ((m = t.options.items.find((I) => I.value === t.value)) == null ? void 0 : m.label) || "";
|
|
1903
|
+
return Fe(D, 12);
|
|
1904
|
+
}), g = f(() => ({
|
|
1905
|
+
"b-radio-group-filter--only-slot": t.onlySlot
|
|
1906
|
+
}));
|
|
1907
|
+
function y(D) {
|
|
1908
|
+
n.value = D, a("input", { ...t, value: n.value });
|
|
1909
|
+
}
|
|
1910
|
+
function u() {
|
|
1911
|
+
a("update", { ...t, value: n.value });
|
|
1912
|
+
}
|
|
1913
|
+
return (D, m) => (S(), L(v(Se), re(D.$props, {
|
|
1914
|
+
"button-label": D.label,
|
|
1915
|
+
"button-secondary-label": d.value,
|
|
1916
|
+
"disable-apply-button": v(r),
|
|
1917
|
+
"disable-secondary-button": v(o),
|
|
1918
|
+
"only-slot": D.onlySlot,
|
|
1919
|
+
onApply: u,
|
|
1920
|
+
onClear: m[1] || (m[1] = (I) => v(i)(u)),
|
|
1921
|
+
onOpen: v(s),
|
|
1922
|
+
onReset: m[2] || (m[2] = (I) => v(b)(u))
|
|
1923
|
+
}), {
|
|
1924
|
+
default: w(() => {
|
|
1925
|
+
var I;
|
|
1926
|
+
return [
|
|
1927
|
+
K("div", {
|
|
1928
|
+
class: ce(["b-radio-group-filter", g.value])
|
|
1929
|
+
}, [
|
|
1930
|
+
E(v(It), {
|
|
1931
|
+
modelValue: v(n),
|
|
1932
|
+
"onUpdate:modelValue": [
|
|
1933
|
+
m[0] || (m[0] = ($) => ml(n) ? n.value = $ : null),
|
|
1934
|
+
y
|
|
1935
|
+
],
|
|
1936
|
+
items: (I = D.options) == null ? void 0 : I.items,
|
|
1937
|
+
label: D.label,
|
|
1938
|
+
disabled: D.disabled,
|
|
1939
|
+
"hide-label": "",
|
|
1940
|
+
variant: "vertical"
|
|
1941
|
+
}, null, 8, ["modelValue", "items", "label", "disabled"])
|
|
1942
|
+
], 2)
|
|
1943
|
+
];
|
|
1944
|
+
}),
|
|
1945
|
+
_: 1
|
|
1946
|
+
}, 16, ["button-label", "button-secondary-label", "disable-apply-button", "disable-secondary-button", "only-slot", "onOpen"]));
|
|
1947
|
+
}
|
|
1948
|
+
}), xt = /* @__PURE__ */ le(qa, [["__scopeId", "data-v-b1a70e21"]]), el = {
|
|
1949
|
+
"en-US": {
|
|
1950
|
+
all: "All",
|
|
1951
|
+
noFiltersMatchThisSearch: "No filters match this search",
|
|
1952
|
+
searchFilter: "Search {filter}"
|
|
1953
|
+
},
|
|
1954
|
+
"ja-JP": {
|
|
1955
|
+
all: "すべて",
|
|
1956
|
+
noFiltersMatchThisSearch: "この検索に一致するフィルターはありません",
|
|
1957
|
+
searchFilter: "{filter}を検索"
|
|
1958
|
+
},
|
|
1959
|
+
"pt-BR": {
|
|
1960
|
+
all: "Todos",
|
|
1961
|
+
noFiltersMatchThisSearch: "Nenhum filtro corresponde a esta busca",
|
|
1962
|
+
searchFilter: "Procurar {filter}"
|
|
1963
|
+
}
|
|
1964
|
+
}, Ga = { class: "b-select-filter-button__search-bar-wrapper" }, Ka = {
|
|
1965
|
+
key: 0,
|
|
1966
|
+
class: "b-select-filter-button__search-bar"
|
|
1967
|
+
}, Ja = { class: "b-select-filter-button__divider" }, Qa = {
|
|
1968
|
+
i18n: { messages: el }
|
|
1969
|
+
}, Xa = /* @__PURE__ */ z({
|
|
1970
|
+
...Qa,
|
|
1971
|
+
__name: "select-filter-button",
|
|
1972
|
+
props: {
|
|
1973
|
+
/**
|
|
1974
|
+
* Disables the filter from being interacted with.
|
|
1975
|
+
*/
|
|
1976
|
+
disabled: { type: Boolean, default: !1 },
|
|
1977
|
+
/**
|
|
1978
|
+
* Default value of the filter to reset to.
|
|
1979
|
+
*
|
|
1980
|
+
*/
|
|
1981
|
+
defaultValue: {
|
|
1982
|
+
type: [String, Number, Array],
|
|
1983
|
+
default: null
|
|
1984
|
+
},
|
|
1985
|
+
/**
|
|
1986
|
+
* Filter name/key referencing the actual property name in the data set.
|
|
1987
|
+
* Should be unique per filter bar.
|
|
1988
|
+
*/
|
|
1989
|
+
field: { type: String, required: !0 },
|
|
1990
|
+
/**
|
|
1991
|
+
* Label text to be displayed
|
|
1992
|
+
*/
|
|
1993
|
+
label: { type: String, required: !0 },
|
|
1994
|
+
/**
|
|
1995
|
+
* Renders the base filter's slot content only - leaving out the button and the popover.
|
|
1996
|
+
* Used for the allFiltersModal component.
|
|
1997
|
+
*/
|
|
1998
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
1999
|
+
/**
|
|
2000
|
+
* List of options that are needed to setup the filter
|
|
2001
|
+
* Available options:
|
|
2002
|
+
* - multiple: If "true", the user will be able to select multiple items.
|
|
2003
|
+
* - listboxItems: The option elements to populate the filter with.
|
|
2004
|
+
*
|
|
2005
|
+
* @default undefined
|
|
2006
|
+
*/
|
|
2007
|
+
options: {
|
|
2008
|
+
type: Object,
|
|
2009
|
+
default: void 0
|
|
2010
|
+
},
|
|
2011
|
+
/**
|
|
2012
|
+
* Current value of the filter
|
|
2013
|
+
*
|
|
2014
|
+
* @default undefined
|
|
2015
|
+
*/
|
|
2016
|
+
value: {
|
|
2017
|
+
type: [String, Number, Array, Object],
|
|
2018
|
+
default: void 0
|
|
2019
|
+
}
|
|
2020
|
+
},
|
|
2021
|
+
emits: ["input", "update"],
|
|
2022
|
+
setup(e, { emit: l }) {
|
|
2023
|
+
var ne, A;
|
|
2024
|
+
const t = ze(), a = l, n = e, { t: o } = pe({ messages: el }), r = M(""), i = ee(n, "options"), s = M(n.options.listboxItems ?? []), { cachedSelectedListboxOptions: b, setCachedValues: d, resetCache: g } = ct(
|
|
2025
|
+
s,
|
|
2026
|
+
ee(n, "value"),
|
|
2027
|
+
ee(i.value, "multiple")
|
|
2028
|
+
), { cachedSelectedListboxOptions: y } = ct(
|
|
2029
|
+
s,
|
|
2030
|
+
ee(n, "defaultValue"),
|
|
2031
|
+
ee(i.value, "multiple")
|
|
2032
|
+
), { internalFilterValue: u, isSecondaryButtonDisabled: D, isApplyButtonDisabled: m } = De(b, y);
|
|
2033
|
+
se(i, () => {
|
|
2034
|
+
s.value = i.value.listboxItems ?? [];
|
|
2035
|
+
});
|
|
2036
|
+
const I = it(
|
|
2037
|
+
r,
|
|
2038
|
+
s,
|
|
2039
|
+
(A = (ne = n.options) == null ? void 0 : ne.search) == null ? void 0 : A.searchEvent
|
|
2040
|
+
), $ = f(() => o("noFiltersMatchThisSearch")), C = f(() => n.label), B = f(() => {
|
|
2041
|
+
var c, R, W, G, oe;
|
|
2042
|
+
const h = !((c = n == null ? void 0 : n.options) != null && c.multiple) && n.value != null, p = ((R = n == null ? void 0 : n.options) == null ? void 0 : R.multiple) && Array.isArray(n.value) && n.value.length === 1;
|
|
2043
|
+
if (h || p) {
|
|
2044
|
+
if ((W = n.options) != null && W.enableValueLabelPair) {
|
|
2045
|
+
let U = ((G = n.value) == null ? void 0 : G.length) > 0 ? n.value[0].label : n.value.label;
|
|
2046
|
+
return U || (U = n.value, Bl(
|
|
2047
|
+
'BentoFilterBar Select filter (single & multi): The "value" provided is incorrect. The "value" must be of type "BentoListboxSelectedValueLabelPair" or "Array<BentoListboxSelectedValueLabelPair>" when "enableValueLabelPair" is set to true'
|
|
2048
|
+
)), Fe(U, 12);
|
|
2049
|
+
}
|
|
2050
|
+
let F = (oe = n.options.listboxItems.flatMap((U) => U.items ? U.items : U).find(
|
|
2051
|
+
({ value: U }) => {
|
|
2052
|
+
var te;
|
|
2053
|
+
return Array.isArray(n.value) ? (te = n == null ? void 0 : n.value) == null ? void 0 : te.includes(U) : U === n.value;
|
|
2054
|
+
}
|
|
2055
|
+
)) == null ? void 0 : oe.label;
|
|
2056
|
+
return !F && n.value && (F = n.value[0]), Fe(F, 12);
|
|
2057
|
+
}
|
|
2058
|
+
return null;
|
|
2059
|
+
}), V = f(() => Me(`filter-listbox-${n.field}`)), T = (h) => {
|
|
2060
|
+
var W, G, oe;
|
|
2061
|
+
u.value = h;
|
|
2062
|
+
const { onlySlot: p, ...c } = n;
|
|
2063
|
+
if ((W = n.options) != null && W.multiple) {
|
|
2064
|
+
let P;
|
|
2065
|
+
(G = n.options) != null && G.enableValueLabelPair ? P = h.length ? u.value : null : P = h.length ? u.value.map(({ value: F }) => F) : null, a(_.INPUT, { ...c, value: P });
|
|
2066
|
+
return;
|
|
2067
|
+
}
|
|
2068
|
+
let R;
|
|
2069
|
+
(oe = n.options) != null && oe.enableValueLabelPair ? R = h.length ? h[0] : null : R = h.length ? h[0].value : null, a(_.INPUT, { ...c, value: R });
|
|
2070
|
+
}, N = () => {
|
|
2071
|
+
var R, W, G, oe, P, F;
|
|
2072
|
+
const { onlySlot: h, ...p } = n;
|
|
2073
|
+
if (n.options.multiple) {
|
|
2074
|
+
u.value && ((R = u.value) == null ? void 0 : R.length) === 0 && (u.value = n.defaultValue !== null ? y.value : void 0);
|
|
2075
|
+
let U;
|
|
2076
|
+
(W = n.options) != null && W.enableValueLabelPair ? U = (G = u.value) != null && G.length ? u.value : null : U = (oe = u.value) != null && oe.length ? (P = u.value) == null ? void 0 : P.map(({ value: te }) => te) : null, a(_.UPDATE, {
|
|
2077
|
+
...p,
|
|
2078
|
+
value: U
|
|
2079
|
+
});
|
|
2080
|
+
return;
|
|
2081
|
+
}
|
|
2082
|
+
let c;
|
|
2083
|
+
(F = n.options) != null && F.enableValueLabelPair ? c = u.value.length ? u.value[0] : void 0 : c = u.value.length ? u.value[0].value : void 0, a(_.UPDATE, { ...p, value: c });
|
|
2084
|
+
}, Y = () => {
|
|
2085
|
+
var h, p;
|
|
2086
|
+
u.value = b.value, (p = (h = n.options) == null ? void 0 : h.onOpen) == null || p.call(h);
|
|
2087
|
+
}, k = () => {
|
|
2088
|
+
r.value && (r.value = "");
|
|
2089
|
+
}, O = () => {
|
|
2090
|
+
d(y.value), u.value = y.value, N();
|
|
2091
|
+
}, q = () => {
|
|
2092
|
+
g(), u.value = [], N();
|
|
2093
|
+
}, J = f(() => {
|
|
2094
|
+
var c, R;
|
|
2095
|
+
if (n.value == null || !n.options.multiple)
|
|
2096
|
+
return null;
|
|
2097
|
+
const h = (c = n.options.listboxItems) == null ? void 0 : c.reduce((W, G) => {
|
|
2098
|
+
var oe;
|
|
2099
|
+
return W += (oe = G == null ? void 0 : G.items) != null && oe.length ? G.items.length : 1, W;
|
|
2100
|
+
}, 0), p = (R = n.value) == null ? void 0 : R.length;
|
|
2101
|
+
return p === 1 ? null : p === h ? o("all") : p;
|
|
2102
|
+
});
|
|
2103
|
+
return (h, p) => {
|
|
2104
|
+
var c, R;
|
|
2105
|
+
return S(), L(v(Se), {
|
|
2106
|
+
"applied-filters-count": J.value,
|
|
2107
|
+
"button-label": C.value,
|
|
2108
|
+
"button-secondary-label": B.value,
|
|
2109
|
+
disabled: e.disabled,
|
|
2110
|
+
"disable-apply-button": v(m),
|
|
2111
|
+
"disable-secondary-button": v(D),
|
|
2112
|
+
"default-value": e.defaultValue,
|
|
2113
|
+
label: e.label,
|
|
2114
|
+
field: e.field,
|
|
2115
|
+
"only-slot": !1,
|
|
2116
|
+
"tooltip-position": (c = e.options) == null ? void 0 : c.tooltipPosition,
|
|
2117
|
+
"tooltip-text": (R = e.options) == null ? void 0 : R.tooltipText,
|
|
2118
|
+
value: e.value,
|
|
2119
|
+
onApply: N,
|
|
2120
|
+
onClear: q,
|
|
2121
|
+
onReset: O,
|
|
2122
|
+
onOpen: Y,
|
|
2123
|
+
onClose: k
|
|
2124
|
+
}, {
|
|
2125
|
+
default: w(() => {
|
|
2126
|
+
var W, G, oe, P, F, U, te, ue, fe, be, ve, ae, Te, He, ut;
|
|
2127
|
+
return [
|
|
2128
|
+
K("div", Ga, [
|
|
2129
|
+
((W = e.options) == null ? void 0 : W.dynamicFiltering) ?? !0 ? (S(), Q("div", Ka, [
|
|
2130
|
+
E(Je, {
|
|
2131
|
+
"debounce-time": (oe = (G = e.options) == null ? void 0 : G.search) == null ? void 0 : oe.debounceTime,
|
|
2132
|
+
value: r.value,
|
|
2133
|
+
"input-field-aria-label": v(o)("searchFilter", { filter: e.label.toLocaleLowerCase() }),
|
|
2134
|
+
onInput: p[0] || (p[0] = (et) => r.value = et)
|
|
2135
|
+
}, null, 8, ["debounce-time", "value", "input-field-aria-label"])
|
|
2136
|
+
])) : X("", !0),
|
|
2137
|
+
K("div", Ja, [
|
|
2138
|
+
E(v(st))
|
|
2139
|
+
])
|
|
2140
|
+
]),
|
|
2141
|
+
E(v(El), {
|
|
2142
|
+
id: V.value,
|
|
2143
|
+
"aria-label": e.label,
|
|
2144
|
+
class: "b-select-filter-button__wrapper",
|
|
2145
|
+
"component-loading": (P = e.options) == null ? void 0 : P.loading,
|
|
2146
|
+
"empty-state": (F = e.options) == null ? void 0 : F.emptyState,
|
|
2147
|
+
"has-more-items": (te = (U = e.options) == null ? void 0 : U.lazy) == null ? void 0 : te.hasMoreItems,
|
|
2148
|
+
items: v(I),
|
|
2149
|
+
"is-option-disabled": (ue = e.options) == null ? void 0 : ue.isOptionDisabled,
|
|
2150
|
+
"lazy-load-type": (be = (fe = e.options) == null ? void 0 : fe.lazy) == null ? void 0 : be.lazyLoadType,
|
|
2151
|
+
loading: (ae = (ve = e.options) == null ? void 0 : ve.lazy) == null ? void 0 : ae.loading,
|
|
2152
|
+
multiple: (Te = e.options) == null ? void 0 : Te.multiple,
|
|
2153
|
+
"static-categories": (He = e.options) == null ? void 0 : He.staticCategories,
|
|
2154
|
+
"no-results-message": $.value,
|
|
2155
|
+
searching: !!r.value,
|
|
2156
|
+
"selected-value": v(u),
|
|
2157
|
+
"virtual-scroll": (ut = e.options) == null ? void 0 : ut.virtualScroll,
|
|
2158
|
+
onSelect: T,
|
|
2159
|
+
onSpacePressed: T,
|
|
2160
|
+
onEnterPressed: T,
|
|
2161
|
+
onShowMore: p[1] || (p[1] = (et) => {
|
|
2162
|
+
var Re, We;
|
|
2163
|
+
return (We = (Re = e.options) == null ? void 0 : Re.lazy) == null ? void 0 : We.showMoreEvent();
|
|
2164
|
+
})
|
|
2165
|
+
}, Ne({ _: 2 }, [
|
|
2166
|
+
Ce(v(t), (et, Re) => ({
|
|
2167
|
+
name: Re,
|
|
2168
|
+
fn: w((We) => [
|
|
2169
|
+
he(h.$slots, Re, Ge(Ke(We)), void 0, !0)
|
|
2170
|
+
])
|
|
2171
|
+
}))
|
|
2172
|
+
]), 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"])
|
|
2173
|
+
];
|
|
2174
|
+
}),
|
|
2175
|
+
_: 3
|
|
2176
|
+
}, 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"]);
|
|
2177
|
+
};
|
|
2178
|
+
}
|
|
2179
|
+
}), za = /* @__PURE__ */ le(Xa, [["__scopeId", "data-v-a5f40d81"]]), tl = {
|
|
2180
|
+
"en-US": {
|
|
2181
|
+
noFiltersMatchThisSearch: "No filters match this search"
|
|
2182
|
+
},
|
|
2183
|
+
"ja-JP": {
|
|
2184
|
+
noFiltersMatchThisSearch: "この検索に一致するフィルターはありません"
|
|
2185
|
+
},
|
|
2186
|
+
"pt-BR": {
|
|
2187
|
+
noFiltersMatchThisSearch: "Nenhum filtro corresponde a esta pesquisa"
|
|
2188
|
+
}
|
|
2189
|
+
}, Za = {
|
|
2190
|
+
i18n: { messages: tl },
|
|
2191
|
+
name: "select-filter-dropdown"
|
|
2192
|
+
}, xa = /* @__PURE__ */ z({
|
|
2193
|
+
...Za,
|
|
2194
|
+
props: {
|
|
2195
|
+
/**
|
|
2196
|
+
* Disables the filter from being interacted with.
|
|
2197
|
+
*/
|
|
2198
|
+
disabled: { type: Boolean, default: !1 },
|
|
2199
|
+
/**
|
|
2200
|
+
* Default value of the filter to reset to.
|
|
2201
|
+
*
|
|
2202
|
+
*/
|
|
2203
|
+
defaultValue: {
|
|
2204
|
+
type: [String, Number, Array],
|
|
2205
|
+
default: null
|
|
2206
|
+
},
|
|
2207
|
+
/**
|
|
2208
|
+
* Filter name/key referencing the actual property name in the data set.
|
|
2209
|
+
* Should be unique per filter bar.
|
|
2210
|
+
*/
|
|
2211
|
+
field: { type: String, required: !0 },
|
|
2212
|
+
/**
|
|
2213
|
+
* Label text to be displayed
|
|
2214
|
+
*/
|
|
2215
|
+
label: { type: String, required: !0 },
|
|
2216
|
+
/**
|
|
2217
|
+
* Renders the base filter's slot content only - leaving out the button and the popover.
|
|
2218
|
+
* Used for the allFiltersModal component.
|
|
2219
|
+
*
|
|
2220
|
+
*/
|
|
2221
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
2222
|
+
/**
|
|
2223
|
+
* List of options that are needed to setup the filter
|
|
2224
|
+
* Available options:
|
|
2225
|
+
* - multiple: If "true", the user will be able to select multiple items.
|
|
2226
|
+
* - listboxItems: The option elements to populate the filter with.
|
|
2227
|
+
*
|
|
2228
|
+
* @default undefined
|
|
2229
|
+
*/
|
|
2230
|
+
options: {
|
|
2231
|
+
type: Object,
|
|
2232
|
+
default: void 0
|
|
2233
|
+
},
|
|
2234
|
+
/**
|
|
2235
|
+
* Current value of the filter
|
|
2236
|
+
*
|
|
2237
|
+
* @default undefined
|
|
2238
|
+
*/
|
|
2239
|
+
value: {
|
|
2240
|
+
type: [String, Number, Array],
|
|
2241
|
+
default: void 0
|
|
2242
|
+
}
|
|
2243
|
+
},
|
|
2244
|
+
emits: ["input", "update"],
|
|
2245
|
+
setup(e, { emit: l }) {
|
|
2246
|
+
const { t } = pe({ messages: tl }), a = ze(), n = l, o = e, { internalFilterValue: r } = De(ee(o, "value"), ee(o, "defaultValue")), i = ee(o, "options"), s = M(o.options.listboxItems);
|
|
2247
|
+
se(i, () => {
|
|
2248
|
+
s.value = i.value.listboxItems;
|
|
2249
|
+
});
|
|
2250
|
+
const b = f(() => t("noFiltersMatchThisSearch")), d = (g) => {
|
|
2251
|
+
r.value = g;
|
|
2252
|
+
const { onlySlot: y, ...u } = o;
|
|
2253
|
+
n(_.INPUT, { ...u, value: r.value });
|
|
2254
|
+
};
|
|
2255
|
+
return (g, y) => {
|
|
2256
|
+
var u, D, m, I, $, C, B;
|
|
2257
|
+
return S(), L(v(Pl), {
|
|
2258
|
+
"model-value": v(r),
|
|
2259
|
+
items: e.options.listboxItems,
|
|
2260
|
+
search: (u = e.options) == null ? void 0 : u.search,
|
|
2261
|
+
multiple: (D = e.options) == null ? void 0 : D.multiple,
|
|
2262
|
+
"static-categories": (m = e.options) == null ? void 0 : m.staticCategories,
|
|
2263
|
+
"no-results-message": b.value,
|
|
2264
|
+
"is-option-disabled": e.options.isOptionDisabled,
|
|
2265
|
+
"dynamic-filtering": ((I = e.options) == null ? void 0 : I.dynamicFiltering) ?? !0,
|
|
2266
|
+
"component-loading": ($ = e.options) == null ? void 0 : $.loading,
|
|
2267
|
+
"empty-state": (C = e.options) == null ? void 0 : C.emptyState,
|
|
2268
|
+
disabled: e.disabled,
|
|
2269
|
+
"enable-value-label-pair": (B = e.options) == null ? void 0 : B.enableValueLabelPair,
|
|
2270
|
+
"onUpdate:modelValue": d,
|
|
2271
|
+
onOpen: y[0] || (y[0] = () => {
|
|
2272
|
+
var V, T;
|
|
2273
|
+
return (T = (V = e.options) == null ? void 0 : V.onOpen) == null ? void 0 : T.call(V);
|
|
2274
|
+
})
|
|
2275
|
+
}, Ne({ _: 2 }, [
|
|
2276
|
+
Ce(v(a), (V, T) => ({
|
|
2277
|
+
name: T,
|
|
2278
|
+
fn: w((N) => [
|
|
2279
|
+
he(g.$slots, T, Ge(Ke(N)))
|
|
2280
|
+
])
|
|
2281
|
+
}))
|
|
2282
|
+
]), 1032, ["model-value", "items", "search", "multiple", "static-categories", "no-results-message", "is-option-disabled", "dynamic-filtering", "component-loading", "empty-state", "disabled", "enable-value-label-pair"]);
|
|
2283
|
+
};
|
|
2284
|
+
}
|
|
2285
|
+
}), Ue = {
|
|
2286
|
+
/**
|
|
2287
|
+
* Disables the filter from being interacted with.
|
|
2288
|
+
*/
|
|
2289
|
+
disabled: { type: Boolean, default: !1 },
|
|
2290
|
+
/**
|
|
2291
|
+
* Default value of the filter to reset to.
|
|
2292
|
+
*
|
|
2293
|
+
*/
|
|
2294
|
+
defaultValue: {
|
|
2295
|
+
type: [String, Number, Array, Object],
|
|
2296
|
+
default: null
|
|
2297
|
+
},
|
|
2298
|
+
/**
|
|
2299
|
+
* Filter name/key referencing the actual property name in the data set.
|
|
2300
|
+
* Should be unique per filter bar.
|
|
2301
|
+
*/
|
|
2302
|
+
field: { type: String, required: !0 },
|
|
2303
|
+
/**
|
|
2304
|
+
* Label text to be displayed
|
|
2305
|
+
*/
|
|
2306
|
+
label: { type: String, required: !0 },
|
|
2307
|
+
/**
|
|
2308
|
+
* Renders the base filter's slot content only - leaving out the button and the popover.
|
|
2309
|
+
* Used for the allFiltersModal component.
|
|
2310
|
+
*
|
|
2311
|
+
*/
|
|
2312
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
2313
|
+
/**
|
|
2314
|
+
* List of options that are needed to setup the filter
|
|
2315
|
+
* Available options:
|
|
2316
|
+
* - multiple: If "true", the user will be able to select multiple items.
|
|
2317
|
+
* - listboxItems: The option elements to populate the filter with.
|
|
2318
|
+
* - tooltipPosition: The position of the tooltip attached to the filter button
|
|
2319
|
+
* - tooltipText: The content of the tooltip attached to the filter button
|
|
2320
|
+
*
|
|
2321
|
+
* @default undefined
|
|
2322
|
+
*/
|
|
2323
|
+
options: {
|
|
2324
|
+
type: Object,
|
|
2325
|
+
default: void 0
|
|
2326
|
+
},
|
|
2327
|
+
/**
|
|
2328
|
+
* Current value of the filter
|
|
2329
|
+
*
|
|
2330
|
+
* @default undefined
|
|
2331
|
+
*/
|
|
2332
|
+
value: {
|
|
2333
|
+
type: [String, Number, Array, Object],
|
|
2334
|
+
default: void 0
|
|
2335
|
+
}
|
|
2336
|
+
}, en = {}, Ie = /* @__PURE__ */ z({
|
|
2337
|
+
...en,
|
|
2338
|
+
__name: "select-filter",
|
|
2339
|
+
props: Ue,
|
|
2340
|
+
emits: ["input", "update"],
|
|
2341
|
+
setup(e, { emit: l }) {
|
|
2342
|
+
const t = ze(), a = l, n = e, o = (i) => a("input", i), r = (i) => a("update", i);
|
|
2343
|
+
return Xe(() => {
|
|
2344
|
+
var i;
|
|
2345
|
+
(i = n == null ? void 0 : n.options) != null && i.messages && xe(
|
|
2346
|
+
'BentoFilterBar filter of type "BentoFilterItemType.SELECT" options message property',
|
|
2347
|
+
`Please remove the "options.messages" property from this filter, it is not required any more for persistent filters.
|
|
2348
|
+
This will be the default behavior in the v2 and "options.messages" will be removed.`,
|
|
2349
|
+
"2.0.0"
|
|
2350
|
+
);
|
|
2351
|
+
}), (i, s) => i.onlySlot ? (S(), L(v(xa), {
|
|
2352
|
+
key: 0,
|
|
2353
|
+
disabled: i.disabled,
|
|
2354
|
+
"default-value": i.defaultValue,
|
|
2355
|
+
field: i.field,
|
|
2356
|
+
label: i.label,
|
|
2357
|
+
options: i.options,
|
|
2358
|
+
value: i.value,
|
|
2359
|
+
onInput: o,
|
|
2360
|
+
onUpdate: r
|
|
2361
|
+
}, Ne({ _: 2 }, [
|
|
2362
|
+
Ce(v(t), (b, d) => ({
|
|
2363
|
+
name: d,
|
|
2364
|
+
fn: w((g) => [
|
|
2365
|
+
he(i.$slots, d, Ge(Ke(g)))
|
|
2366
|
+
])
|
|
2367
|
+
}))
|
|
2368
|
+
]), 1032, ["disabled", "default-value", "field", "label", "options", "value"])) : (S(), L(v(za), {
|
|
2369
|
+
key: 1,
|
|
2370
|
+
disabled: i.disabled,
|
|
2371
|
+
"default-value": i.defaultValue,
|
|
2372
|
+
field: i.field,
|
|
2373
|
+
label: i.label,
|
|
2374
|
+
options: i.options,
|
|
2375
|
+
value: i.value,
|
|
2376
|
+
onInput: o,
|
|
2377
|
+
onUpdate: r
|
|
2378
|
+
}, Ne({ _: 2 }, [
|
|
2379
|
+
Ce(v(t), (b, d) => ({
|
|
2380
|
+
name: d,
|
|
2381
|
+
fn: w((g) => [
|
|
2382
|
+
he(i.$slots, d, Ge(Ke(g)))
|
|
2383
|
+
])
|
|
2384
|
+
}))
|
|
2385
|
+
]), 1032, ["disabled", "default-value", "field", "label", "options", "value"]));
|
|
2386
|
+
}
|
|
2387
|
+
}), tn = z({
|
|
2388
|
+
name: "bento-select-avatar-filter",
|
|
2389
|
+
components: {
|
|
2390
|
+
BentoSelectFilter: Ie,
|
|
2391
|
+
BentoAvatar: Vl
|
|
2392
|
+
},
|
|
2393
|
+
props: {
|
|
2394
|
+
...Ue,
|
|
2395
|
+
/**
|
|
2396
|
+
* List of options that are needed to setup the country filter
|
|
2397
|
+
* Available options:
|
|
2398
|
+
* - multiple: If "true", the user will be able to select multiple items.
|
|
2399
|
+
* - listboxItems: The option elements to populate the filter with {@see BentoSelectCountryFilterOptions}
|
|
2400
|
+
*/
|
|
2401
|
+
options: {
|
|
2402
|
+
type: Object,
|
|
2403
|
+
default: void 0
|
|
2404
|
+
}
|
|
2405
|
+
},
|
|
2406
|
+
emits: [_.INPUT, _.UPDATE],
|
|
2407
|
+
setup(e, { emit: l }) {
|
|
2408
|
+
return {
|
|
2409
|
+
// Enums
|
|
2410
|
+
BentoFilterEvent: _,
|
|
2411
|
+
// Methods
|
|
2412
|
+
onUpdate: (a) => l(_.UPDATE, a)
|
|
2413
|
+
};
|
|
2414
|
+
}
|
|
2415
|
+
});
|
|
2416
|
+
function ln(e, l, t, a, n, o) {
|
|
2417
|
+
const r = H("bento-avatar"), i = H("bento-select-filter");
|
|
2418
|
+
return S(), L(i, re(e.$props, {
|
|
2419
|
+
field: e.field,
|
|
2420
|
+
label: e.label,
|
|
2421
|
+
onUpdate: e.onUpdate,
|
|
2422
|
+
onInput: l[0] || (l[0] = (s) => e.$emit(e.BentoFilterEvent.INPUT, s))
|
|
2423
|
+
}), {
|
|
2424
|
+
default: w(({ label: s, data: b }) => [
|
|
2425
|
+
E(r, {
|
|
2426
|
+
username: s,
|
|
2427
|
+
src: b
|
|
2428
|
+
}, null, 8, ["username", "src"])
|
|
2429
|
+
]),
|
|
2430
|
+
_: 1
|
|
2431
|
+
}, 16, ["field", "label", "onUpdate"]);
|
|
2432
|
+
}
|
|
2433
|
+
const ll = /* @__PURE__ */ le(tn, [["render", ln]]), an = z({
|
|
2434
|
+
name: "bento-select-currency-filter",
|
|
2435
|
+
components: {
|
|
2436
|
+
BentoSelectFilter: Ie,
|
|
2437
|
+
ListboxOptionTag: Vt
|
|
2438
|
+
},
|
|
2439
|
+
props: {
|
|
2440
|
+
...Ue,
|
|
2441
|
+
/**
|
|
2442
|
+
* List of options that are needed to setup the country filter
|
|
2443
|
+
* Available options:
|
|
2444
|
+
* - multiple: If "true", the user will be able to select multiple items.
|
|
2445
|
+
* - listboxItems: The option elements to populate the filter with {@see BentoSelectCurrencyFilterOptions}
|
|
2446
|
+
*/
|
|
2447
|
+
options: {
|
|
2448
|
+
type: Object,
|
|
2449
|
+
default: void 0
|
|
2450
|
+
}
|
|
2451
|
+
},
|
|
2452
|
+
emits: [_.INPUT, _.UPDATE],
|
|
2453
|
+
setup(e, { emit: l }) {
|
|
2454
|
+
var r;
|
|
2455
|
+
const t = (i) => {
|
|
2456
|
+
l(_.UPDATE, i);
|
|
2457
|
+
}, a = M([]);
|
|
2458
|
+
se(
|
|
2459
|
+
() => {
|
|
2460
|
+
var i;
|
|
2461
|
+
return (i = e.options) == null ? void 0 : i.listboxItems;
|
|
2462
|
+
},
|
|
2463
|
+
(i) => {
|
|
2464
|
+
a.value = i || [];
|
|
2465
|
+
},
|
|
2466
|
+
{ immediate: !0 }
|
|
2467
|
+
);
|
|
2468
|
+
const n = (r = e.options) != null && r.search ? e.options.search : {
|
|
2469
|
+
debounceTime: 500,
|
|
2470
|
+
searchEvent: async (i) => {
|
|
2471
|
+
var g, y, u, D;
|
|
2472
|
+
if (!i) {
|
|
2473
|
+
a.value = ((g = e.options) == null ? void 0 : g.listboxItems) || [];
|
|
2474
|
+
return;
|
|
2475
|
+
}
|
|
2476
|
+
const s = (((y = e.options) == null ? void 0 : y.listboxItems) || []).map((m) => ({
|
|
2477
|
+
...m,
|
|
2478
|
+
label: `${m.value} ${m.label}`
|
|
2479
|
+
})), b = it(
|
|
2480
|
+
M(i),
|
|
2481
|
+
M(s),
|
|
2482
|
+
(D = (u = e.options) == null ? void 0 : u.search) == null ? void 0 : D.searchEvent,
|
|
2483
|
+
M(!1)
|
|
2484
|
+
).value, d = b == null ? void 0 : b.map((m) => ({
|
|
2485
|
+
...m,
|
|
2486
|
+
label: m.label.substring(m.value.length + 1)
|
|
2487
|
+
}));
|
|
2488
|
+
a.value = d;
|
|
2489
|
+
}
|
|
2490
|
+
}, o = f(() => ({
|
|
2491
|
+
...e.options,
|
|
2492
|
+
search: n,
|
|
2493
|
+
listboxItems: a.value
|
|
2494
|
+
}));
|
|
2495
|
+
return {
|
|
2496
|
+
// Enums
|
|
2497
|
+
BentoFilterEvent: _,
|
|
2498
|
+
// Methods
|
|
2499
|
+
onUpdate: t,
|
|
2500
|
+
internalOptions: o
|
|
2501
|
+
};
|
|
2502
|
+
}
|
|
2503
|
+
});
|
|
2504
|
+
function nn(e, l, t, a, n, o) {
|
|
2505
|
+
const r = H("listbox-option-tag"), i = H("bento-select-filter");
|
|
2506
|
+
return S(), L(i, re(e.$props, {
|
|
2507
|
+
field: e.field,
|
|
2508
|
+
label: e.label,
|
|
2509
|
+
options: e.internalOptions,
|
|
2510
|
+
onUpdate: e.onUpdate,
|
|
2511
|
+
onInput: l[0] || (l[0] = (s) => e.$emit(e.BentoFilterEvent.INPUT, s))
|
|
2512
|
+
}), {
|
|
2513
|
+
default: w((s) => [
|
|
2514
|
+
E(r, { option: s }, null, 8, ["option"])
|
|
2515
|
+
]),
|
|
2516
|
+
_: 1
|
|
2517
|
+
}, 16, ["field", "label", "options", "onUpdate"]);
|
|
2518
|
+
}
|
|
2519
|
+
const al = /* @__PURE__ */ le(an, [["render", nn]]), on = {
|
|
2520
|
+
name: "bento-select-country-filter"
|
|
2521
|
+
}, nl = /* @__PURE__ */ z({
|
|
2522
|
+
...on,
|
|
2523
|
+
props: {
|
|
2524
|
+
...Ue,
|
|
2525
|
+
/**
|
|
2526
|
+
* List of options that are needed to setup the country filter
|
|
2527
|
+
* Available options:
|
|
2528
|
+
* - multiple: If "true", the user will be able to select multiple items.
|
|
2529
|
+
* - listboxItems: The option elements to populate the filter with {@see BentoSelectCountryFilterOptions}
|
|
2530
|
+
* - variant: Which label variant to display for the option item.
|
|
2531
|
+
*/
|
|
2532
|
+
options: {
|
|
2533
|
+
type: Object,
|
|
2534
|
+
default: void 0
|
|
2535
|
+
}
|
|
2536
|
+
},
|
|
2537
|
+
emits: [_.INPUT, _.UPDATE],
|
|
2538
|
+
setup(e, { emit: l }) {
|
|
2539
|
+
const t = e, a = l, n = M(t.options.variant), o = M(t.options.listboxItems);
|
|
2540
|
+
se([() => t.options.variant, () => t.options.listboxItems], () => {
|
|
2541
|
+
n.value = t.options.variant, o.value = t.options.listboxItems;
|
|
2542
|
+
});
|
|
2543
|
+
const r = (b) => a(_.UPDATE, b), i = Rl(n, o), s = f(() => ({
|
|
2544
|
+
...t != null && t.options ? t.options : {},
|
|
2545
|
+
listboxItems: i.value
|
|
2546
|
+
}));
|
|
2547
|
+
return (!n.value || n.value === "custom") && xe(
|
|
2548
|
+
'BentoSelectCountryFilter type with `options.variant==="custom"`',
|
|
2549
|
+
"Use any of the other BentoSelectCountryFilter variants instead OR use BentoSelectFilter type for custom labels",
|
|
2550
|
+
"2.0.0"
|
|
2551
|
+
), (b, d) => (S(), L(Ie, re(t, {
|
|
2552
|
+
field: b.field,
|
|
2553
|
+
label: b.label,
|
|
2554
|
+
options: s.value,
|
|
2555
|
+
onUpdate: r,
|
|
2556
|
+
onInput: d[0] || (d[0] = (g) => b.$emit(v(_).INPUT, g))
|
|
2557
|
+
}), {
|
|
2558
|
+
default: w(({ label: g }) => [
|
|
2559
|
+
E(v(ye), { el: "span" }, {
|
|
2560
|
+
default: w(() => [
|
|
2561
|
+
Z(x(g), 1)
|
|
2562
|
+
]),
|
|
2563
|
+
_: 2
|
|
2564
|
+
}, 1024)
|
|
2565
|
+
]),
|
|
2566
|
+
_: 1
|
|
2567
|
+
}, 16, ["field", "label", "options"]));
|
|
2568
|
+
}
|
|
2569
|
+
}), sn = z({
|
|
2570
|
+
name: "bento-select-payment-method-filter",
|
|
2571
|
+
components: {
|
|
2572
|
+
BentoSelectFilter: Ie,
|
|
2573
|
+
BentoPaymentMethod: Ul
|
|
2574
|
+
},
|
|
2575
|
+
props: {
|
|
2576
|
+
...Ue,
|
|
2577
|
+
/**
|
|
2578
|
+
* List of options that are needed to setup the payment method filter
|
|
2579
|
+
* Available options:
|
|
2580
|
+
* - multiple: If "true", the user will be able to select multiple items.
|
|
2581
|
+
* - listboxItems: The option elements to populate the filter with {@see BentoSelectPaymentMethodFilterOptions}
|
|
2582
|
+
*/
|
|
2583
|
+
options: {
|
|
2584
|
+
type: Object,
|
|
2585
|
+
default: void 0
|
|
2586
|
+
}
|
|
2587
|
+
},
|
|
2588
|
+
emits: [_.INPUT, _.UPDATE],
|
|
2589
|
+
setup(e, { emit: l }) {
|
|
2590
|
+
return {
|
|
2591
|
+
// Enums
|
|
2592
|
+
BentoFilterEvent: _,
|
|
2593
|
+
// Methods
|
|
2594
|
+
onUpdate: (a) => l(_.UPDATE, a)
|
|
2595
|
+
};
|
|
2596
|
+
}
|
|
2597
|
+
});
|
|
2598
|
+
function rn(e, l, t, a, n, o) {
|
|
2599
|
+
const r = H("bento-payment-method"), i = H("bento-select-filter");
|
|
2600
|
+
return S(), L(i, re(e.$props, {
|
|
2601
|
+
field: e.field,
|
|
2602
|
+
label: e.label,
|
|
2603
|
+
onUpdate: e.onUpdate,
|
|
2604
|
+
onInput: l[0] || (l[0] = (s) => e.$emit(e.BentoFilterEvent.INPUT, s))
|
|
2605
|
+
}), {
|
|
2606
|
+
default: w(({ value: s, label: b }) => [
|
|
2607
|
+
E(r, {
|
|
2608
|
+
type: s,
|
|
2609
|
+
label: b
|
|
2610
|
+
}, null, 8, ["type", "label"])
|
|
2611
|
+
]),
|
|
2612
|
+
_: 1
|
|
2613
|
+
}, 16, ["field", "label", "onUpdate"]);
|
|
2614
|
+
}
|
|
2615
|
+
const ol = /* @__PURE__ */ le(sn, [["render", rn]]), un = z({
|
|
2616
|
+
name: "bento-select-country-filter",
|
|
2617
|
+
components: {
|
|
2618
|
+
BentoSelectFilter: Ie,
|
|
2619
|
+
ListboxOptionTag: Vt
|
|
2620
|
+
},
|
|
2621
|
+
props: {
|
|
2622
|
+
...Ue,
|
|
2623
|
+
/**
|
|
2624
|
+
* List of options that are needed to setup the tag filter
|
|
2625
|
+
* Available options:
|
|
2626
|
+
* - multiple: If "true", the user will be able to select multiple items.
|
|
2627
|
+
* - listboxItems: The option elements to populate the filter with {@see BentoSelectTagFilterOptions}
|
|
2628
|
+
*/
|
|
2629
|
+
options: {
|
|
2630
|
+
type: Object,
|
|
2631
|
+
default: void 0
|
|
2632
|
+
}
|
|
2633
|
+
},
|
|
2634
|
+
emits: [_.INPUT, _.UPDATE],
|
|
2635
|
+
setup(e, { emit: l }) {
|
|
2636
|
+
const t = (o) => l(_.UPDATE, o), a = f(
|
|
2637
|
+
() => {
|
|
2638
|
+
var o, r;
|
|
2639
|
+
return (r = (o = e == null ? void 0 : e.options) == null ? void 0 : o.listboxItems) == null ? void 0 : r.map(({ label: i, value: s, variant: b }) => ({ label: i, value: s, data: b }));
|
|
2640
|
+
}
|
|
2641
|
+
);
|
|
2642
|
+
return {
|
|
2643
|
+
// Values
|
|
2644
|
+
countryOptions: f(() => ({
|
|
2645
|
+
...e.options,
|
|
2646
|
+
listboxItems: a.value
|
|
2647
|
+
})),
|
|
2648
|
+
// Methods
|
|
2649
|
+
onUpdate: t,
|
|
2650
|
+
// Enums
|
|
2651
|
+
BentoFilterEvent: _
|
|
2652
|
+
};
|
|
2653
|
+
}
|
|
2654
|
+
});
|
|
2655
|
+
function dn(e, l, t, a, n, o) {
|
|
2656
|
+
const r = H("listbox-option-tag"), i = H("bento-select-filter");
|
|
2657
|
+
return S(), L(i, re(e.$props, {
|
|
2658
|
+
field: e.field,
|
|
2659
|
+
label: e.label,
|
|
2660
|
+
options: e.countryOptions,
|
|
2661
|
+
onUpdate: e.onUpdate,
|
|
2662
|
+
onInput: l[0] || (l[0] = (s) => e.$emit(e.BentoFilterEvent.INPUT, s))
|
|
2663
|
+
}), {
|
|
2664
|
+
default: w(({ label: s, data: b }) => [
|
|
2665
|
+
E(r, {
|
|
2666
|
+
option: { value: s, data: b, label: "" }
|
|
2667
|
+
}, null, 8, ["option"])
|
|
2668
|
+
]),
|
|
2669
|
+
_: 1
|
|
2670
|
+
}, 16, ["field", "label", "options", "onUpdate"]);
|
|
2671
|
+
}
|
|
2672
|
+
const il = /* @__PURE__ */ le(un, [["render", dn]]), sl = {
|
|
2673
|
+
"en-US": {
|
|
2674
|
+
filter: "My filter",
|
|
2675
|
+
resetFilter: "Reset filter {filterName}"
|
|
2676
|
+
}
|
|
2677
|
+
}, cn = { class: "b-toggle-filter" }, fn = { class: "b-toggle-filter__content" }, bn = {
|
|
2678
|
+
i18n: { messages: sl },
|
|
2679
|
+
name: "bento-toggle-filter"
|
|
2680
|
+
}, pn = /* @__PURE__ */ z({
|
|
2681
|
+
...bn,
|
|
2682
|
+
props: {
|
|
2683
|
+
description: {},
|
|
2684
|
+
disabled: { type: Boolean, default: !1 },
|
|
2685
|
+
field: {},
|
|
2686
|
+
label: {},
|
|
2687
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
2688
|
+
options: { default: void 0 },
|
|
2689
|
+
value: { type: Boolean, default: !1 }
|
|
2690
|
+
},
|
|
2691
|
+
emits: ["input", "update"],
|
|
2692
|
+
setup(e, { emit: l }) {
|
|
2693
|
+
const { t } = pe({ messages: sl }), a = Me("toggle-filter-checkbox-label"), n = Me("toggle-filter-checkbox-description"), o = e, r = l, i = M(o.value);
|
|
2694
|
+
se(
|
|
2695
|
+
() => o.value,
|
|
2696
|
+
(u) => {
|
|
2697
|
+
i.value = u;
|
|
2698
|
+
}
|
|
2699
|
+
);
|
|
2700
|
+
const s = f(() => ({
|
|
2701
|
+
"b-toggle-filter__only-slot--disabled": o.disabled
|
|
2702
|
+
})), b = (u) => {
|
|
2703
|
+
i.value = u, r("input", { ...o, value: u });
|
|
2704
|
+
}, d = () => {
|
|
2705
|
+
r("update", { ...o, value: i.value });
|
|
2706
|
+
}, g = () => {
|
|
2707
|
+
i.value = !i.value, d();
|
|
2708
|
+
}, y = () => {
|
|
2709
|
+
i.value = !1, d();
|
|
2710
|
+
};
|
|
2711
|
+
return (u, D) => {
|
|
2712
|
+
var m, I;
|
|
2713
|
+
return u.onlySlot ? (S(), Q("label", {
|
|
2714
|
+
key: 1,
|
|
2715
|
+
class: ce(["b-toggle-filter__only-slot", s.value])
|
|
2716
|
+
}, [
|
|
2717
|
+
E(v(kl), {
|
|
2718
|
+
"aria-labelledby": v(a),
|
|
2719
|
+
"aria-describedby": v(n),
|
|
2720
|
+
disabled: u.disabled,
|
|
2721
|
+
class: "b-toggle-filter__checkbox",
|
|
2722
|
+
"model-value": i.value,
|
|
2723
|
+
"onUpdate:modelValue": b
|
|
2724
|
+
}, null, 8, ["aria-labelledby", "aria-describedby", "disabled", "model-value"]),
|
|
2725
|
+
K("div", fn, [
|
|
2726
|
+
E(v(ye), {
|
|
2727
|
+
id: v(a),
|
|
2728
|
+
variant: "title",
|
|
2729
|
+
medium: ""
|
|
2730
|
+
}, {
|
|
2731
|
+
default: w(() => [
|
|
2732
|
+
Z(x(u.label), 1)
|
|
2733
|
+
]),
|
|
2734
|
+
_: 1
|
|
2735
|
+
}, 8, ["id"]),
|
|
2736
|
+
u.description ? (S(), L(v(ye), {
|
|
2737
|
+
key: 0,
|
|
2738
|
+
id: v(n)
|
|
2739
|
+
}, {
|
|
2740
|
+
default: w(() => [
|
|
2741
|
+
Z(x(u.description), 1)
|
|
2742
|
+
]),
|
|
2743
|
+
_: 1
|
|
2744
|
+
}, 8, ["id"])) : X("", !0)
|
|
2745
|
+
])
|
|
2746
|
+
], 2)) : at((S(), L(v(jt), {
|
|
2747
|
+
key: 0,
|
|
2748
|
+
"skip-grouping": !i.value
|
|
2749
|
+
}, {
|
|
2750
|
+
default: w(() => [
|
|
2751
|
+
E(v(Ae), {
|
|
2752
|
+
"aria-pressed": i.value ? "true" : "false",
|
|
2753
|
+
active: i.value,
|
|
2754
|
+
disabled: u.disabled,
|
|
2755
|
+
onClick: g
|
|
2756
|
+
}, {
|
|
2757
|
+
default: w(() => [
|
|
2758
|
+
K("div", cn, [
|
|
2759
|
+
Z(x(u.label) + " ", 1),
|
|
2760
|
+
at(E(v(Ll), {
|
|
2761
|
+
"aria-hidden": "true",
|
|
2762
|
+
class: "b-toggle-filter__checkmark"
|
|
2763
|
+
}, null, 512), [
|
|
2764
|
+
[yl, i.value]
|
|
2765
|
+
])
|
|
2766
|
+
])
|
|
2767
|
+
]),
|
|
2768
|
+
_: 1
|
|
2769
|
+
}, 8, ["aria-pressed", "active", "disabled"]),
|
|
2770
|
+
i.value ? (S(), L(v(Ae), {
|
|
2771
|
+
key: 0,
|
|
2772
|
+
"aria-label": v(t)("resetFilter", { filterName: u.label }),
|
|
2773
|
+
disabled: u.disabled,
|
|
2774
|
+
active: i.value,
|
|
2775
|
+
onClick: y
|
|
2776
|
+
}, {
|
|
2777
|
+
iconLeft: w(() => [
|
|
2778
|
+
E(v(kt), { "aria-hidden": "true" })
|
|
2779
|
+
]),
|
|
2780
|
+
_: 1
|
|
2781
|
+
}, 8, ["aria-label", "disabled", "active"])) : X("", !0)
|
|
2782
|
+
]),
|
|
2783
|
+
_: 1
|
|
2784
|
+
}, 8, ["skip-grouping"])), [
|
|
2785
|
+
[v($t), (m = u.options) == null ? void 0 : m.tooltipText, (I = u.options) == null ? void 0 : I.tooltipPosition]
|
|
2786
|
+
]);
|
|
2787
|
+
};
|
|
2788
|
+
}
|
|
2789
|
+
}), rl = /* @__PURE__ */ le(pn, [["__scopeId", "data-v-5cedf9b6"]]), Ct = {
|
|
2790
|
+
"en-US": {
|
|
2791
|
+
no: "No",
|
|
2792
|
+
yes: "Yes"
|
|
2793
|
+
},
|
|
2794
|
+
"ja-JP": {
|
|
2795
|
+
no: "いいえ",
|
|
2796
|
+
yes: "はい"
|
|
2797
|
+
},
|
|
2798
|
+
"pt-BR": {
|
|
2799
|
+
no: "Não",
|
|
2800
|
+
yes: "Sim"
|
|
2801
|
+
}
|
|
2802
|
+
}, vn = z({
|
|
2803
|
+
name: "bento-boolean-filter",
|
|
2804
|
+
i18n: { messages: Ct },
|
|
2805
|
+
components: { BentoBaseFilter: Se, BentoRadioGroup: It },
|
|
2806
|
+
props: {
|
|
2807
|
+
/**
|
|
2808
|
+
* Disables the filter from being interacted with.
|
|
2809
|
+
*/
|
|
2810
|
+
disabled: { type: Boolean, default: !1 },
|
|
2811
|
+
/**
|
|
2812
|
+
* Default value of the filter to reset to.
|
|
2813
|
+
*/
|
|
2814
|
+
defaultValue: { type: [String, Boolean], default: null },
|
|
2815
|
+
/**
|
|
2816
|
+
* Filter name/key referencing the actual property name in the data set.
|
|
2817
|
+
* Should be unique per filter bar.
|
|
2818
|
+
*/
|
|
2819
|
+
field: { type: String, required: !0 },
|
|
2820
|
+
/**
|
|
2821
|
+
* Label text to be displayed
|
|
2822
|
+
*/
|
|
2823
|
+
label: { type: String, required: !0 },
|
|
2824
|
+
/**
|
|
2825
|
+
* Current value of the filter
|
|
2826
|
+
*/
|
|
2827
|
+
value: { type: [String, Boolean], default: null },
|
|
2828
|
+
/**
|
|
2829
|
+
* Renders the base filter's slot content only - leaving out the button and the popover.
|
|
2830
|
+
* Used for the allFiltersModal component.
|
|
2831
|
+
*/
|
|
2832
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
2833
|
+
/**
|
|
2834
|
+
* List of options that are needed to setup the filter
|
|
2835
|
+
* Available options:
|
|
2836
|
+
* - positiveOption: The positive option label/value
|
|
2837
|
+
* - negativeOption: The positive option label/value
|
|
2838
|
+
* - tooltipPosition: The position of the tooltip attached to the filter button
|
|
2839
|
+
* - tooltipText: The content of the tooltip attached to the filter button
|
|
2840
|
+
*/
|
|
2841
|
+
options: {
|
|
2842
|
+
type: Object,
|
|
2843
|
+
default: void 0
|
|
2844
|
+
}
|
|
2845
|
+
},
|
|
2846
|
+
emits: [_.INPUT, _.UPDATE],
|
|
2847
|
+
setup(e, { emit: l }) {
|
|
2848
|
+
const { t } = pe({ messages: Ct }), a = (B) => typeof B == "boolean" ? B == null ? void 0 : B.toString() : B, n = (B) => {
|
|
2849
|
+
var V, T, N, Y;
|
|
2850
|
+
return ((T = (V = e == null ? void 0 : e.options) == null ? void 0 : V.positiveOption) == null ? void 0 : T.value) !== void 0 && ((Y = (N = e == null ? void 0 : e.options) == null ? void 0 : N.negativeOption) == null ? void 0 : Y.value) !== void 0 && typeof e.options.positiveOption.value == "boolean" && typeof e.options.negativeOption.value == "boolean" && typeof B == "string" ? B === "true" : B;
|
|
2851
|
+
}, o = f(() => a(e.defaultValue)), r = f(() => a(e.value)), i = f(() => e.options && e.options.positiveOption && e.options.negativeOption ? [
|
|
2852
|
+
{
|
|
2853
|
+
...e.options.positiveOption,
|
|
2854
|
+
value: a(e.options.positiveOption.value)
|
|
2855
|
+
},
|
|
2856
|
+
{
|
|
2857
|
+
...e.options.negativeOption,
|
|
2858
|
+
value: a(e.options.negativeOption.value)
|
|
2859
|
+
}
|
|
2860
|
+
] : [
|
|
2861
|
+
{ value: "yes", label: t("yes") },
|
|
2862
|
+
{ value: "no", label: t("no") }
|
|
2863
|
+
]), { internalFilterValue: s, isSecondaryButtonDisabled: b, isApplyButtonDisabled: d } = De(
|
|
2864
|
+
r,
|
|
2865
|
+
o
|
|
2866
|
+
), g = f(() => e.label), y = f(
|
|
2867
|
+
() => {
|
|
2868
|
+
var B;
|
|
2869
|
+
return Fe((B = i.value.find(({ value: V }) => V === r.value)) == null ? void 0 : B.label, 12);
|
|
2870
|
+
}
|
|
2871
|
+
), u = f(() => ({
|
|
2872
|
+
"b-boolean-filter--only-slot": e.onlySlot
|
|
2873
|
+
}));
|
|
2874
|
+
Ze(() => {
|
|
2875
|
+
s.value || (s.value = null);
|
|
2876
|
+
});
|
|
2877
|
+
const D = (B) => {
|
|
2878
|
+
s.value = B, l(_.INPUT, {
|
|
2879
|
+
...e,
|
|
2880
|
+
value: n(s.value)
|
|
2881
|
+
});
|
|
2882
|
+
}, m = () => {
|
|
2883
|
+
s.value = r.value;
|
|
2884
|
+
}, I = () => {
|
|
2885
|
+
l(_.UPDATE, {
|
|
2886
|
+
...e,
|
|
2887
|
+
value: n(s.value)
|
|
2888
|
+
});
|
|
2889
|
+
}, $ = () => l(_.UPDATE, { ...e, value: e.defaultValue }), C = () => {
|
|
2890
|
+
s.value = null, I();
|
|
2891
|
+
};
|
|
2892
|
+
return Xe(() => {
|
|
2893
|
+
xe(
|
|
2894
|
+
'Boolean filter "BentoFilterItemType.BOOLEAN"',
|
|
2895
|
+
'Use the Radio group filter type "BentoFilterItemType.RADIO_GROUP" instead.',
|
|
2896
|
+
"2.0.0"
|
|
2897
|
+
);
|
|
2898
|
+
}), {
|
|
2899
|
+
// Values
|
|
2900
|
+
items: i,
|
|
2901
|
+
conditionalClasses: u,
|
|
2902
|
+
buttonLabel: g,
|
|
2903
|
+
buttonSecondaryLabel: y,
|
|
2904
|
+
internalFilterValue: s,
|
|
2905
|
+
isApplyButtonDisabled: d,
|
|
2906
|
+
isSecondaryButtonDisabled: b,
|
|
2907
|
+
translatedValue: r,
|
|
2908
|
+
translatedDefaultValue: o,
|
|
2909
|
+
// Events
|
|
2910
|
+
onInput: D,
|
|
2911
|
+
updateFilter: I,
|
|
2912
|
+
clearFilter: C,
|
|
2913
|
+
openFilter: m,
|
|
2914
|
+
resetFilter: $
|
|
2915
|
+
};
|
|
2916
|
+
}
|
|
2917
|
+
});
|
|
2918
|
+
function mn(e, l, t, a, n, o) {
|
|
2919
|
+
var s, b;
|
|
2920
|
+
const r = H("bento-radio-group"), i = H("bento-base-filter");
|
|
2921
|
+
return S(), L(i, re(e.$props, {
|
|
2922
|
+
value: e.translatedValue,
|
|
2923
|
+
"default-value": e.translatedDefaultValue,
|
|
2924
|
+
"button-label": e.buttonLabel,
|
|
2925
|
+
"button-secondary-label": e.buttonSecondaryLabel,
|
|
2926
|
+
"disable-apply-button": e.isApplyButtonDisabled,
|
|
2927
|
+
"disable-secondary-button": e.isSecondaryButtonDisabled,
|
|
2928
|
+
"only-slot": e.onlySlot,
|
|
2929
|
+
"tooltip-position": (s = e.options) == null ? void 0 : s.tooltipPosition,
|
|
2930
|
+
"tooltip-text": (b = e.options) == null ? void 0 : b.tooltipText,
|
|
2931
|
+
onApply: e.updateFilter,
|
|
2932
|
+
onClear: e.clearFilter,
|
|
2933
|
+
onOpen: e.openFilter,
|
|
2934
|
+
onReset: e.resetFilter
|
|
2935
|
+
}), {
|
|
2936
|
+
default: w(() => [
|
|
2937
|
+
K("div", {
|
|
2938
|
+
class: ce(["b-boolean-filter", e.conditionalClasses]),
|
|
2939
|
+
onKeydown: l[0] || (l[0] = ge((...d) => e.updateFilter && e.updateFilter(...d), ["enter"]))
|
|
2940
|
+
}, [
|
|
2941
|
+
E(r, {
|
|
2942
|
+
items: e.items,
|
|
2943
|
+
label: e.label,
|
|
2944
|
+
"model-value": e.internalFilterValue,
|
|
2945
|
+
disabled: e.disabled,
|
|
2946
|
+
"hide-label": "",
|
|
2947
|
+
"onUpdate:modelValue": e.onInput
|
|
2948
|
+
}, null, 8, ["items", "label", "model-value", "disabled", "onUpdate:modelValue"])
|
|
2949
|
+
], 34)
|
|
2950
|
+
]),
|
|
2951
|
+
_: 1
|
|
2952
|
+
}, 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"]);
|
|
2953
|
+
}
|
|
2954
|
+
const ul = /* @__PURE__ */ le(vn, [["render", mn], ["__scopeId", "data-v-4f4270be"]]), Dt = {
|
|
2955
|
+
"en-US": {
|
|
2956
|
+
from: "From",
|
|
2957
|
+
to: "To"
|
|
2958
|
+
},
|
|
2959
|
+
"ja-JP": {
|
|
2960
|
+
from: "開始",
|
|
2961
|
+
to: "終了"
|
|
2962
|
+
},
|
|
2963
|
+
"pt-BR": {
|
|
2964
|
+
from: "De",
|
|
2965
|
+
to: "Até"
|
|
2966
|
+
}
|
|
2967
|
+
}, yn = z({
|
|
2968
|
+
name: "bento-range-filter",
|
|
2969
|
+
i18n: { messages: Dt },
|
|
2970
|
+
components: { BentoBaseFilter: Se, BentoInputField: ot },
|
|
2971
|
+
props: {
|
|
2972
|
+
/**
|
|
2973
|
+
* Disables the filter from being interacted with.
|
|
2974
|
+
*/
|
|
2975
|
+
disabled: { type: Boolean, default: !1 },
|
|
2976
|
+
/**
|
|
2977
|
+
* Default value of the filter to reset to.
|
|
2978
|
+
*/
|
|
2979
|
+
defaultValue: { type: Array, default: null },
|
|
2980
|
+
/**
|
|
2981
|
+
* Filter name/key referencing the actual property name in the data set.
|
|
2982
|
+
* Should be unique per filter bar.
|
|
2983
|
+
*/
|
|
2984
|
+
field: { type: String, required: !0 },
|
|
2985
|
+
/**
|
|
2986
|
+
* Label text to be displayed
|
|
2987
|
+
*/
|
|
2988
|
+
label: { type: String, required: !0 },
|
|
2989
|
+
/**
|
|
2990
|
+
* Current value of the filter
|
|
2991
|
+
*/
|
|
2992
|
+
value: { type: Array, default: () => ["", ""] },
|
|
2993
|
+
/**
|
|
2994
|
+
* Renders the base filter's slot content only - leaving out the button and the popover.
|
|
2995
|
+
* Used for the allFiltersModal component.
|
|
2996
|
+
*/
|
|
2997
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
2998
|
+
/**
|
|
2999
|
+
* List of options that are needed to setup the filter
|
|
3000
|
+
* Available options:
|
|
3001
|
+
* - tooltipPosition: The position of the tooltip attached to the filter button
|
|
3002
|
+
* - tooltipText: The content of the tooltip attached to the filter button
|
|
3003
|
+
*/
|
|
3004
|
+
options: { type: Object, default: void 0 }
|
|
3005
|
+
},
|
|
3006
|
+
emits: [_.INPUT, _.UPDATE],
|
|
3007
|
+
setup(e, { emit: l }) {
|
|
3008
|
+
const { t } = pe({ messages: Dt }), a = M(null), { internalFilterValue: n, isSecondaryButtonDisabled: o, isApplyButtonDisabled: r } = De(
|
|
3009
|
+
ee(e, "value"),
|
|
3010
|
+
ee(e, "defaultValue")
|
|
3011
|
+
), i = f(() => {
|
|
3012
|
+
var N, Y, k, O, q, J, ne, A;
|
|
3013
|
+
if (!((N = e.value) != null && N[0]) && !((Y = e.value) != null && Y[1]))
|
|
3014
|
+
return null;
|
|
3015
|
+
let C = "";
|
|
3016
|
+
(k = e.value) != null && k[0] ? (O = e.value) != null && O[1] || (C = "≥") : C = "≤";
|
|
3017
|
+
const B = (q = e.value) != null && q[0] ? `${Fe(e.value[0], 5)}` : "", V = (J = e.value) != null && J[0] && ((ne = e.value) != null && ne[1]) ? " - " : "", T = (A = e.value) != null && A[1] ? `${Fe(e.value[1], 5)}` : "";
|
|
3018
|
+
return `${C}${B}${V}${T}`;
|
|
3019
|
+
}), s = f(() => e.label), b = f(() => i.value), d = f(() => ({
|
|
3020
|
+
"b-range-filter--only-slot": e.onlySlot
|
|
3021
|
+
})), g = () => {
|
|
3022
|
+
n.value = e.value, Ot(() => a.value.focusInput());
|
|
3023
|
+
}, y = () => {
|
|
3024
|
+
l(_.INPUT, { ...e, value: n.value });
|
|
3025
|
+
}, u = (C) => {
|
|
3026
|
+
n.value = [C, n.value[1]], y();
|
|
3027
|
+
}, D = (C) => {
|
|
3028
|
+
n.value = [n.value[0], C], y();
|
|
3029
|
+
}, m = () => {
|
|
3030
|
+
n.value.some((C) => C) || (n.value = e.defaultValue !== null ? e.defaultValue : void 0), l(_.UPDATE, {
|
|
3031
|
+
...e,
|
|
3032
|
+
value: n.value
|
|
3033
|
+
});
|
|
3034
|
+
};
|
|
3035
|
+
return {
|
|
3036
|
+
// Values
|
|
3037
|
+
inputTextRef: a,
|
|
3038
|
+
conditionalClasses: d,
|
|
3039
|
+
internalFilterValue: n,
|
|
3040
|
+
isApplyButtonDisabled: r,
|
|
3041
|
+
isSecondaryButtonDisabled: o,
|
|
3042
|
+
buttonLabel: s,
|
|
3043
|
+
buttonSecondaryLabel: b,
|
|
3044
|
+
// Events
|
|
3045
|
+
updateFrom: u,
|
|
3046
|
+
updateTo: D,
|
|
3047
|
+
updateFilter: m,
|
|
3048
|
+
clearFilter: () => {
|
|
3049
|
+
n.value = ["", ""], m();
|
|
3050
|
+
},
|
|
3051
|
+
openFilter: g,
|
|
3052
|
+
resetFilter: () => l(_.UPDATE, { ...e, value: e.defaultValue }),
|
|
3053
|
+
// Translations
|
|
3054
|
+
t
|
|
3055
|
+
};
|
|
3056
|
+
}
|
|
3057
|
+
});
|
|
3058
|
+
function hn(e, l, t, a, n, o) {
|
|
3059
|
+
var s, b;
|
|
3060
|
+
const r = H("bento-input-field"), i = H("bento-base-filter");
|
|
3061
|
+
return S(), L(i, re(e.$props, {
|
|
3062
|
+
"disable-apply-button": e.isApplyButtonDisabled,
|
|
3063
|
+
"disable-secondary-button": e.isSecondaryButtonDisabled,
|
|
3064
|
+
"button-label": e.buttonLabel,
|
|
3065
|
+
"button-secondary-label": e.buttonSecondaryLabel,
|
|
3066
|
+
"only-slot": e.onlySlot,
|
|
3067
|
+
"tooltip-position": (s = e.options) == null ? void 0 : s.tooltipPosition,
|
|
3068
|
+
"tooltip-text": (b = e.options) == null ? void 0 : b.tooltipText,
|
|
3069
|
+
onApply: e.updateFilter,
|
|
3070
|
+
onClear: e.clearFilter,
|
|
3071
|
+
onOpen: e.openFilter,
|
|
3072
|
+
onReset: e.resetFilter
|
|
3073
|
+
}), {
|
|
3074
|
+
default: w(() => [
|
|
3075
|
+
K("div", {
|
|
3076
|
+
class: ce(["b-range-filter", e.conditionalClasses]),
|
|
3077
|
+
onKeydown: l[0] || (l[0] = ge((...d) => e.updateFilter && e.updateFilter(...d), ["enter"]))
|
|
3078
|
+
}, [
|
|
3079
|
+
E(r, {
|
|
3080
|
+
ref: "inputTextRef",
|
|
3081
|
+
"model-value": e.internalFilterValue ? e.internalFilterValue[0] : "",
|
|
3082
|
+
type: "number",
|
|
3083
|
+
"aria-label": e.t("from").toString(),
|
|
3084
|
+
disabled: e.disabled,
|
|
3085
|
+
"onUpdate:modelValue": e.updateFrom
|
|
3086
|
+
}, {
|
|
3087
|
+
default: w(() => [
|
|
3088
|
+
Z(x(e.t("from")), 1)
|
|
3089
|
+
]),
|
|
3090
|
+
_: 1
|
|
3091
|
+
}, 8, ["model-value", "aria-label", "disabled", "onUpdate:modelValue"]),
|
|
3092
|
+
E(r, {
|
|
3093
|
+
class: "b-range-filter__input-field",
|
|
3094
|
+
"model-value": e.internalFilterValue ? e.internalFilterValue[1] : "",
|
|
3095
|
+
type: "number",
|
|
3096
|
+
"aria-label": e.t("to"),
|
|
3097
|
+
disabled: e.disabled,
|
|
3098
|
+
"onUpdate:modelValue": e.updateTo
|
|
3099
|
+
}, {
|
|
3100
|
+
default: w(() => [
|
|
3101
|
+
Z(x(e.t("to")), 1)
|
|
3102
|
+
]),
|
|
3103
|
+
_: 1
|
|
3104
|
+
}, 8, ["model-value", "aria-label", "disabled", "onUpdate:modelValue"])
|
|
3105
|
+
], 34)
|
|
3106
|
+
]),
|
|
3107
|
+
_: 1
|
|
3108
|
+
}, 16, ["disable-apply-button", "disable-secondary-button", "button-label", "button-secondary-label", "only-slot", "tooltip-position", "tooltip-text", "onApply", "onClear", "onOpen", "onReset"]);
|
|
3109
|
+
}
|
|
3110
|
+
const dl = /* @__PURE__ */ le(yn, [["render", hn], ["__scopeId", "data-v-c71c8dbd"]]), cl = {
|
|
3111
|
+
"en-US": {
|
|
3112
|
+
all: "All"
|
|
3113
|
+
},
|
|
3114
|
+
"ja-JP": {
|
|
3115
|
+
all: "すべて"
|
|
3116
|
+
},
|
|
3117
|
+
"pt-BR": {
|
|
3118
|
+
all: "Todos"
|
|
3119
|
+
}
|
|
3120
|
+
}, gn = {
|
|
3121
|
+
name: "bento-checkbox-group-filter",
|
|
3122
|
+
i18n: { messages: cl }
|
|
3123
|
+
}, Fn = /* @__PURE__ */ z({
|
|
3124
|
+
...gn,
|
|
3125
|
+
props: {
|
|
3126
|
+
disabled: { type: Boolean, default: !1 },
|
|
3127
|
+
defaultValue: { default: void 0 },
|
|
3128
|
+
field: {},
|
|
3129
|
+
label: {},
|
|
3130
|
+
onlySlot: { type: Boolean, default: !1 },
|
|
3131
|
+
options: { default: void 0 },
|
|
3132
|
+
value: { default: void 0 }
|
|
3133
|
+
},
|
|
3134
|
+
emits: ["input", "update"],
|
|
3135
|
+
setup(e, { emit: l }) {
|
|
3136
|
+
const t = e, a = l, { t: n } = pe({ messages: cl }), {
|
|
3137
|
+
internalFilterValue: o,
|
|
3138
|
+
isSecondaryButtonDisabled: r,
|
|
3139
|
+
isApplyButtonDisabled: i,
|
|
3140
|
+
clearFilter: s,
|
|
3141
|
+
resetFilter: b,
|
|
3142
|
+
openFilter: d
|
|
3143
|
+
} = Wt(ee(t, "value"), ee(t, "defaultValue")), g = M(o.value ?? []), y = f(() => ({
|
|
3144
|
+
"b-checkbox-group-filter--only-slot": t.onlySlot
|
|
3145
|
+
})), u = f(() => t.label), D = f(
|
|
3146
|
+
() => {
|
|
3147
|
+
var C, B;
|
|
3148
|
+
return g.value.length === 1 ? Fe(
|
|
3149
|
+
((B = (C = t.options) == null ? void 0 : C.checkboxItems.find((V) => g.value[0] === V.value)) == null ? void 0 : B.label) ?? "",
|
|
3150
|
+
12
|
|
3151
|
+
) : null;
|
|
3152
|
+
}
|
|
3153
|
+
), m = f(() => {
|
|
3154
|
+
var C;
|
|
3155
|
+
return !g.value.length || D.value ? null : g.value.length === ((C = t.options) == null ? void 0 : C.checkboxItems.length) ? n("all") : g.value.length;
|
|
3156
|
+
}), I = (C) => {
|
|
3157
|
+
g.value = C ?? [], a("update", { ...t, value: C });
|
|
3158
|
+
}, $ = (C) => {
|
|
3159
|
+
o.value = C, a("input", { ...t, value: o.value });
|
|
3160
|
+
};
|
|
3161
|
+
return (C, B) => {
|
|
3162
|
+
var V, T;
|
|
3163
|
+
return S(), L(v(Se), re(C.$props, {
|
|
3164
|
+
"applied-filters-count": m.value,
|
|
3165
|
+
"button-label": u.value,
|
|
3166
|
+
"button-secondary-label": D.value,
|
|
3167
|
+
"disable-apply-button": v(i),
|
|
3168
|
+
"disable-secondary-button": v(r),
|
|
3169
|
+
"tooltip-position": (V = C.options) == null ? void 0 : V.tooltipPosition,
|
|
3170
|
+
"tooltip-text": (T = C.options) == null ? void 0 : T.tooltipText,
|
|
3171
|
+
onApply: B[1] || (B[1] = (N) => I(v(o))),
|
|
3172
|
+
onClear: B[2] || (B[2] = (N) => v(s)(I)),
|
|
3173
|
+
onOpen: v(d),
|
|
3174
|
+
onReset: B[3] || (B[3] = (N) => v(b)(I))
|
|
3175
|
+
}), {
|
|
3176
|
+
default: w(() => {
|
|
3177
|
+
var N;
|
|
3178
|
+
return [
|
|
3179
|
+
K("div", {
|
|
3180
|
+
class: ce(["b-checkbox-group-filter", y.value]),
|
|
3181
|
+
onKeydown: B[0] || (B[0] = ge((Y) => I(v(o)), ["enter"]))
|
|
3182
|
+
}, [
|
|
3183
|
+
E(Al, {
|
|
3184
|
+
"model-value": v(o),
|
|
3185
|
+
items: (N = C.options) == null ? void 0 : N.checkboxItems,
|
|
3186
|
+
label: C.label,
|
|
3187
|
+
disabled: C.disabled,
|
|
3188
|
+
"hide-label": "",
|
|
3189
|
+
"onUpdate:modelValue": $
|
|
3190
|
+
}, null, 8, ["model-value", "items", "label", "disabled"])
|
|
3191
|
+
], 34)
|
|
3192
|
+
];
|
|
3193
|
+
}),
|
|
3194
|
+
_: 1
|
|
3195
|
+
}, 16, ["applied-filters-count", "button-label", "button-secondary-label", "disable-apply-button", "disable-secondary-button", "tooltip-position", "tooltip-text", "onOpen"]);
|
|
3196
|
+
};
|
|
3197
|
+
}
|
|
3198
|
+
}), fl = /* @__PURE__ */ le(Fn, [["__scopeId", "data-v-a691cbf8"]]);
|
|
3199
|
+
var nt = /* @__PURE__ */ ((e) => (e.INPUT = "input", e))(nt || {});
|
|
3200
|
+
const Sn = z({
|
|
3201
|
+
name: "base-filter-button",
|
|
3202
|
+
components: { BaseButton: Et, BentoTypography: ye, ChevronUpIcon: _l, ChevronDownIcon: $l },
|
|
3203
|
+
props: {
|
|
3204
|
+
/**
|
|
3205
|
+
* The number of applies values within the filter.
|
|
3206
|
+
* e.g. if 2 items in a dropdown filter have been applied, the number 2 will be shown here.
|
|
3207
|
+
*/
|
|
3208
|
+
amountAppliedValues: { type: [Number, String], default: null },
|
|
3209
|
+
/**
|
|
3210
|
+
* Disables button functionality.
|
|
3211
|
+
*/
|
|
3212
|
+
disabled: { type: Boolean, default: !1 },
|
|
3213
|
+
/**
|
|
3214
|
+
* Signifies if the filter is open or closed.
|
|
3215
|
+
*/
|
|
3216
|
+
isFilterOpen: { type: Boolean, default: !1 },
|
|
3217
|
+
/**
|
|
3218
|
+
* Toggles if a chevron icon should be displayed in the button.
|
|
3219
|
+
* The chevron will change depending on the open state of the filter.
|
|
3220
|
+
*/
|
|
3221
|
+
hasChevron: { type: Boolean, default: !1 },
|
|
3222
|
+
/**
|
|
3223
|
+
* Renders the text in a stronger variant.
|
|
3224
|
+
*/
|
|
3225
|
+
bold: { type: Boolean, default: !1 }
|
|
3226
|
+
},
|
|
3227
|
+
emits: [dt.CLICK],
|
|
3228
|
+
setup(e, { slots: l, emit: t, attrs: a }) {
|
|
3229
|
+
const n = f(() => l.default ? Rt(l)("default") : null), o = Ut({ ariaLabel: n }), r = M(null), i = f(() => {
|
|
3230
|
+
var d;
|
|
3231
|
+
return {
|
|
3232
|
+
"aria-controls": (d = a["aria-controls"]) == null ? void 0 : d.toString()
|
|
3233
|
+
};
|
|
3234
|
+
}), s = f(() => ({
|
|
3235
|
+
"b-base-filter-button--with-chevron": e.hasChevron,
|
|
3236
|
+
"b-base-filter-button--filter-open": e.isFilterOpen
|
|
3237
|
+
}));
|
|
3238
|
+
return {
|
|
3239
|
+
// Values
|
|
3240
|
+
ariaAttributes: i,
|
|
3241
|
+
computedAriaLabel: o,
|
|
3242
|
+
conditionalClasses: s,
|
|
3243
|
+
// Methods
|
|
3244
|
+
onClickButton: () => {
|
|
3245
|
+
e.disabled || t(dt.CLICK);
|
|
3246
|
+
},
|
|
3247
|
+
hasSlot: Lt(l),
|
|
3248
|
+
// Refs
|
|
3249
|
+
baseFilterButtonRef: r
|
|
3250
|
+
};
|
|
3251
|
+
}
|
|
3252
|
+
}), Bn = { class: "b-base-filter-button__default-container" }, Cn = { class: "b-base-filter-button__label-container" }, Dn = {
|
|
3253
|
+
key: 0,
|
|
3254
|
+
class: "b-base-filter-button__counter-wrapper"
|
|
3255
|
+
};
|
|
3256
|
+
function Tn(e, l, t, a, n, o) {
|
|
3257
|
+
const r = H("bento-typography"), i = H("chevron-up-icon"), s = H("chevron-down-icon"), b = H("base-button");
|
|
3258
|
+
return S(), L(b, {
|
|
3259
|
+
ref: "baseFilterButtonRef",
|
|
3260
|
+
class: ce(["b-base-filter-button", e.conditionalClasses]),
|
|
3261
|
+
disabled: e.disabled,
|
|
3262
|
+
"aria-label": e.computedAriaLabel,
|
|
3263
|
+
"aria-controls": e.ariaAttributes["aria-controls"],
|
|
3264
|
+
type: "button",
|
|
3265
|
+
onClick: e.onClickButton
|
|
3266
|
+
}, Ne({
|
|
3267
|
+
default: w(() => [
|
|
3268
|
+
K("div", Bn, [
|
|
3269
|
+
K("div", Cn, [
|
|
3270
|
+
E(r, {
|
|
3271
|
+
el: "span",
|
|
3272
|
+
variant: "body",
|
|
3273
|
+
stronger: e.bold,
|
|
3274
|
+
class: "b-base-filter-button__label"
|
|
3275
|
+
}, {
|
|
3276
|
+
default: w(() => [
|
|
3277
|
+
he(e.$slots, "default", {}, void 0, !0)
|
|
3278
|
+
]),
|
|
3279
|
+
_: 3
|
|
3280
|
+
}, 8, ["stronger"])
|
|
3281
|
+
]),
|
|
3282
|
+
e.amountAppliedValues && !e.hasChevron ? (S(), Q("div", Dn, [
|
|
3283
|
+
E(r, {
|
|
3284
|
+
class: "b-base-filter-button__counter",
|
|
3285
|
+
el: "span",
|
|
3286
|
+
variant: "body",
|
|
3287
|
+
stronger: ""
|
|
3288
|
+
}, {
|
|
3289
|
+
default: w(() => [
|
|
3290
|
+
Z(x(e.amountAppliedValues), 1)
|
|
3291
|
+
]),
|
|
3292
|
+
_: 1
|
|
3293
|
+
})
|
|
3294
|
+
])) : X("", !0)
|
|
3295
|
+
])
|
|
3296
|
+
]),
|
|
3297
|
+
_: 2
|
|
3298
|
+
}, [
|
|
3299
|
+
e.hasChevron ? {
|
|
3300
|
+
name: "iconRight",
|
|
3301
|
+
fn: w(() => [
|
|
3302
|
+
e.isFilterOpen ? (S(), L(i, {
|
|
3303
|
+
key: 0,
|
|
3304
|
+
"aria-hidden": "true"
|
|
3305
|
+
})) : (S(), L(s, {
|
|
3306
|
+
key: 1,
|
|
3307
|
+
"aria-hidden": "true"
|
|
3308
|
+
}))
|
|
3309
|
+
]),
|
|
3310
|
+
key: "0"
|
|
3311
|
+
} : void 0
|
|
3312
|
+
]), 1032, ["class", "disabled", "aria-label", "aria-controls", "onClick"]);
|
|
3313
|
+
}
|
|
3314
|
+
const wn = /* @__PURE__ */ le(Sn, [["render", Tn], ["__scopeId", "data-v-af9efc73"]]), On = z({
|
|
3315
|
+
name: "all-filters-modal-button",
|
|
3316
|
+
components: { BaseFilterButton: wn },
|
|
3317
|
+
props: {
|
|
3318
|
+
/**
|
|
3319
|
+
* Button label to be displayed
|
|
3320
|
+
*/
|
|
3321
|
+
label: { type: String, required: !0 },
|
|
3322
|
+
/**
|
|
3323
|
+
* Total count of applied filters
|
|
3324
|
+
*/
|
|
3325
|
+
appliedFiltersCount: { type: [Number, String], default: null },
|
|
3326
|
+
/**
|
|
3327
|
+
* Indicates whether the filter popover tied to this button is showing
|
|
3328
|
+
*/
|
|
3329
|
+
isFilterOpen: { type: Boolean, default: !1 },
|
|
3330
|
+
/**
|
|
3331
|
+
* Disables button functionality.
|
|
3332
|
+
*/
|
|
3333
|
+
disabled: { type: Boolean, default: !1 }
|
|
3334
|
+
},
|
|
3335
|
+
emits: ["click"],
|
|
3336
|
+
setup(e, { emit: l }) {
|
|
3337
|
+
return {
|
|
3338
|
+
conditionalClasses: f(() => ({
|
|
3339
|
+
"b-all-filters-modal-button--with-counter": e.appliedFiltersCount,
|
|
3340
|
+
"b-all-filters-modal-button--filter-open": e.isFilterOpen
|
|
3341
|
+
})),
|
|
3342
|
+
onClick: () => {
|
|
3343
|
+
l("click");
|
|
3344
|
+
}
|
|
3345
|
+
};
|
|
3346
|
+
}
|
|
3347
|
+
});
|
|
3348
|
+
function An(e, l, t, a, n, o) {
|
|
3349
|
+
const r = H("base-filter-button");
|
|
3350
|
+
return S(), L(r, {
|
|
3351
|
+
class: ce(["b-all-filters-modal-button", e.conditionalClasses]),
|
|
3352
|
+
"amount-applied-values": e.appliedFiltersCount,
|
|
3353
|
+
"is-filter-open": e.isFilterOpen,
|
|
3354
|
+
disabled: e.disabled,
|
|
3355
|
+
onClick: e.onClick
|
|
3356
|
+
}, {
|
|
3357
|
+
default: w(() => [
|
|
3358
|
+
Z(x(e.label), 1)
|
|
3359
|
+
]),
|
|
3360
|
+
_: 1
|
|
3361
|
+
}, 8, ["class", "amount-applied-values", "is-filter-open", "disabled", "onClick"]);
|
|
3362
|
+
}
|
|
3363
|
+
const Pn = /* @__PURE__ */ le(On, [["render", An], ["__scopeId", "data-v-b96a672f"]]);
|
|
3364
|
+
let Tt = 0;
|
|
3365
|
+
const In = {
|
|
3366
|
+
beforeCreate() {
|
|
3367
|
+
this.uuid = Tt.toString(), Tt += 1;
|
|
3368
|
+
}
|
|
3369
|
+
}, _n = { key: 0 };
|
|
3370
|
+
function $n(e, l, t, a, n, o) {
|
|
3371
|
+
return S(), Q("svg", re({ role: "img" }, e.$attrs, {
|
|
3372
|
+
class: "ui-assets-icons-16",
|
|
3373
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3374
|
+
width: "16",
|
|
3375
|
+
height: "16",
|
|
3376
|
+
fill: "none"
|
|
3377
|
+
}), [
|
|
3378
|
+
e.$attrs["svg-title"] ? (S(), Q("title", _n, x(e.$attrs["svg-title"]), 1)) : X("", !0),
|
|
3379
|
+
l[0] || (l[0] = K("path", {
|
|
3380
|
+
fill: "#001222",
|
|
3381
|
+
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"
|
|
3382
|
+
}, null, -1)),
|
|
3383
|
+
l[1] || (l[1] = K("path", {
|
|
3384
|
+
fill: "#001222",
|
|
3385
|
+
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"
|
|
3386
|
+
}, null, -1))
|
|
3387
|
+
], 16);
|
|
3388
|
+
}
|
|
3389
|
+
const kn = /* @__PURE__ */ le(In, [["render", $n]]), wt = {
|
|
3390
|
+
"en-US": {
|
|
3391
|
+
activeFilters: "Active filters",
|
|
3392
|
+
all: "All",
|
|
3393
|
+
allFilters: "All filters",
|
|
3394
|
+
applyAll: "Apply all",
|
|
3395
|
+
cancel: "Cancel",
|
|
3396
|
+
clear: "Clear",
|
|
3397
|
+
clearAll: "Clear all",
|
|
3398
|
+
noFiltersMatchThisSearch: "No filters match this search",
|
|
3399
|
+
otherFilters: "Other filters",
|
|
3400
|
+
searchBar: "Search bar"
|
|
3401
|
+
},
|
|
3402
|
+
"ja-JP": {
|
|
3403
|
+
activeFilters: "アクティブなフィルター",
|
|
3404
|
+
all: "すべて",
|
|
3405
|
+
allFilters: "すべてのフィルター",
|
|
3406
|
+
applyAll: "すべて適用",
|
|
3407
|
+
cancel: "キャンセル",
|
|
3408
|
+
clear: "クリア",
|
|
3409
|
+
clearAll: "すべてクリア",
|
|
3410
|
+
noFiltersMatchThisSearch: "この検索に一致するフィルターはありません",
|
|
3411
|
+
otherFilters: "他のフィルター",
|
|
3412
|
+
searchBar: "検索バー"
|
|
3413
|
+
},
|
|
3414
|
+
"pt-BR": {
|
|
3415
|
+
activeFilters: "Filtros ativos",
|
|
3416
|
+
all: "Todos",
|
|
3417
|
+
allFilters: "Todos os filtros",
|
|
3418
|
+
applyAll: "Aplicar tudo",
|
|
3419
|
+
cancel: "Cancelar",
|
|
3420
|
+
clear: "Limpar",
|
|
3421
|
+
clearAll: "Limpar tudo",
|
|
3422
|
+
noFiltersMatchThisSearch: "Nenhum filtro corresponde a esta busca",
|
|
3423
|
+
otherFilters: "Outros filtros",
|
|
3424
|
+
searchBar: "Barra de pesquisa"
|
|
3425
|
+
}
|
|
3426
|
+
}, En = z({
|
|
3427
|
+
i18n: { messages: wt },
|
|
3428
|
+
name: "all-filters-modal",
|
|
3429
|
+
components: {
|
|
3430
|
+
AllFiltersModalButton: Pn,
|
|
3431
|
+
BentoBooleanFilter: ul,
|
|
3432
|
+
BentoButton: Sl,
|
|
3433
|
+
BentoCheckboxGroupFilter: fl,
|
|
3434
|
+
BentoDateFilter: Jt,
|
|
3435
|
+
BentoDateRangeFilter: Zt,
|
|
3436
|
+
BentoInputFilter: Gt,
|
|
3437
|
+
BentoInputWithDropdownFilter: Kt,
|
|
3438
|
+
BentoModal: Fl,
|
|
3439
|
+
BentoRadioGroupFilter: xt,
|
|
3440
|
+
BentoRangeFilter: dl,
|
|
3441
|
+
BentoSearchBar: Je,
|
|
3442
|
+
BentoSelectAvatarFilter: ll,
|
|
3443
|
+
BentoSelectCurrencyFilter: al,
|
|
3444
|
+
BentoSelectCountryFilter: nl,
|
|
3445
|
+
BentoSelectFilter: Ie,
|
|
3446
|
+
BentoSelectPaymentMethodFilter: ol,
|
|
3447
|
+
BentoSelectTagFilter: il,
|
|
3448
|
+
BentoToggleFilter: rl,
|
|
3449
|
+
BentoTypography: ye,
|
|
3450
|
+
FilterBarButton: Ae,
|
|
3451
|
+
SlidersIcon: kn
|
|
3452
|
+
},
|
|
3453
|
+
props: {
|
|
3454
|
+
/**
|
|
3455
|
+
* Array of filters based on {@see FilterBarModel}.
|
|
3456
|
+
* Each one of the elements in the array correspond to a filter that will
|
|
3457
|
+
* be created and rendered in the AllFiltersModal.
|
|
3458
|
+
*
|
|
3459
|
+
* Can be used with v-model or independently with the @input event.
|
|
3460
|
+
*
|
|
3461
|
+
* @example
|
|
3462
|
+
* [{
|
|
3463
|
+
* field: 'company',
|
|
3464
|
+
* label: 'Company',
|
|
3465
|
+
* value: '200',
|
|
3466
|
+
* type: FilterType.TEXT,
|
|
3467
|
+
* }, {
|
|
3468
|
+
* field: 'name',
|
|
3469
|
+
* label: 'Name',
|
|
3470
|
+
* value: null,
|
|
3471
|
+
* type: FilterType.TEXT,
|
|
3472
|
+
* }]
|
|
3473
|
+
*/
|
|
3474
|
+
value: {
|
|
3475
|
+
type: Array,
|
|
3476
|
+
default: () => []
|
|
3477
|
+
}
|
|
3478
|
+
},
|
|
3479
|
+
emits: [nt.INPUT],
|
|
3480
|
+
setup(e, { emit: l }) {
|
|
3481
|
+
const t = M(e.value), a = Me("all-filters-modal"), n = M([]), o = M(!1), r = M(0), i = M(null), s = M(""), { t: b, n: d } = pe({ messages: wt }), g = it(s, ee(t, "value")), y = M({});
|
|
3482
|
+
Ze(() => {
|
|
3483
|
+
y.value = [];
|
|
3484
|
+
}), se(
|
|
3485
|
+
() => e.value,
|
|
3486
|
+
() => {
|
|
3487
|
+
o.value ? t.value = e.value.map((P, F) => ({ ...P, value: t.value[F].value })) : t.value = e.value;
|
|
3488
|
+
}
|
|
3489
|
+
);
|
|
3490
|
+
const u = (P) => P.sort((F, U) => F.label > U.label ? 1 : U.label > F.label ? -1 : 0), D = f(
|
|
3491
|
+
() => u(
|
|
3492
|
+
g.value.filter(
|
|
3493
|
+
(P) => {
|
|
3494
|
+
var F, U;
|
|
3495
|
+
return Array.isArray(P.value) ? ((F = P.value) == null ? void 0 : F.length) && ((U = P.value) == null ? void 0 : U.find((te) => te !== "")) : P.value;
|
|
3496
|
+
}
|
|
3497
|
+
)
|
|
3498
|
+
)
|
|
3499
|
+
), m = f(
|
|
3500
|
+
() => u(
|
|
3501
|
+
g.value.filter(
|
|
3502
|
+
(P) => {
|
|
3503
|
+
var F, U;
|
|
3504
|
+
return Array.isArray(P.value) ? ((F = P.value) == null ? void 0 : F.length) === 0 || ((U = P.value) == null ? void 0 : U.every((te) => te === "")) : !P.value;
|
|
3505
|
+
}
|
|
3506
|
+
)
|
|
3507
|
+
)
|
|
3508
|
+
), I = f(() => {
|
|
3509
|
+
var P;
|
|
3510
|
+
return s.value && ((P = g.value) == null ? void 0 : P.length) === 0;
|
|
3511
|
+
}), $ = f(() => t.value[r.value]), C = () => {
|
|
3512
|
+
const P = D.value.length ? D.value[0] : m.value[0], F = t.value.findIndex(
|
|
3513
|
+
(U) => U.label === P.label && U.field === P.field
|
|
3514
|
+
);
|
|
3515
|
+
r.value = F;
|
|
3516
|
+
};
|
|
3517
|
+
Xe(() => {
|
|
3518
|
+
C();
|
|
3519
|
+
});
|
|
3520
|
+
const B = (P) => P.map((F) => {
|
|
3521
|
+
var U, te, ue, fe, be, ve, ae, Te;
|
|
3522
|
+
switch (F.type) {
|
|
3523
|
+
case ie.SELECT:
|
|
3524
|
+
case ie.SELECT_AVATAR:
|
|
3525
|
+
case ie.SELECT_COUNTRY:
|
|
3526
|
+
case ie.SELECT_CURRENCY:
|
|
3527
|
+
case ie.SELECT_PAYMENT_METHOD:
|
|
3528
|
+
case ie.SELECT_TAG:
|
|
3529
|
+
return ((U = F.options) == null ? void 0 : U.multiple) === !0 ? {
|
|
3530
|
+
label: F.label,
|
|
3531
|
+
field: F.field,
|
|
3532
|
+
count: (te = F.value) != null && te.length ? (ue = F.value) == null ? void 0 : ue.length : null
|
|
3533
|
+
} : {
|
|
3534
|
+
label: F.label,
|
|
3535
|
+
field: F.field,
|
|
3536
|
+
count: F.value == null ? null : 1
|
|
3537
|
+
};
|
|
3538
|
+
case ie.DATE_RANGE:
|
|
3539
|
+
return {
|
|
3540
|
+
label: F.label,
|
|
3541
|
+
field: F.field,
|
|
3542
|
+
count: ((fe = F.value) == null ? void 0 : fe.startDate) != null && ((be = F.value) == null ? void 0 : be.endDate) != null ? 1 : null
|
|
3543
|
+
};
|
|
3544
|
+
case ie.RANGE:
|
|
3545
|
+
return {
|
|
3546
|
+
label: F.label,
|
|
3547
|
+
field: F.field,
|
|
3548
|
+
count: (ve = F.value) != null && ve.find((He) => He !== "") ? 1 : null
|
|
3549
|
+
};
|
|
3550
|
+
case ie.CHECKBOX_GROUP:
|
|
3551
|
+
return {
|
|
3552
|
+
label: F.label,
|
|
3553
|
+
field: F.field,
|
|
3554
|
+
count: (ae = F.value) != null && ae.length ? (Te = F.value) == null ? void 0 : Te.length : null
|
|
3555
|
+
};
|
|
3556
|
+
case ie.TOGGLE:
|
|
3557
|
+
return {
|
|
3558
|
+
label: F.label,
|
|
3559
|
+
field: F.field,
|
|
3560
|
+
count: F.value ? 1 : null
|
|
3561
|
+
};
|
|
3562
|
+
case ie.INPUT:
|
|
3563
|
+
case ie.BOOLEAN:
|
|
3564
|
+
case ie.DATE:
|
|
3565
|
+
case ie.RADIO_GROUP:
|
|
3566
|
+
default:
|
|
3567
|
+
return {
|
|
3568
|
+
label: F.label,
|
|
3569
|
+
field: F.field,
|
|
3570
|
+
count: F.value != null ? 1 : null
|
|
3571
|
+
};
|
|
3572
|
+
}
|
|
3573
|
+
}), V = f(
|
|
3574
|
+
() => {
|
|
3575
|
+
var P;
|
|
3576
|
+
return Array.isArray($.value.value) ? ((P = $.value) == null ? void 0 : P.value.length) && $.value.value.find((F) => F !== "") : !!t.value[r.value].value;
|
|
3577
|
+
}
|
|
3578
|
+
), T = f(() => $.value.type !== ie.TOGGLE), N = f(() => !V.value || $.value.disabled), Y = f(
|
|
3579
|
+
() => {
|
|
3580
|
+
var P;
|
|
3581
|
+
return (P = B(e.value)) == null ? void 0 : P.filter(({ count: F }) => !!F).length;
|
|
3582
|
+
}
|
|
3583
|
+
), k = () => {
|
|
3584
|
+
o.value ? o.value = !1 : o.value = !0;
|
|
3585
|
+
}, O = (P) => {
|
|
3586
|
+
var ue, fe, be, ve, ae;
|
|
3587
|
+
const F = B(t.value).find((Te) => Te.field === P.field).count, U = typeof P.type == "string" && // Type guard to avoid casting
|
|
3588
|
+
P.type.includes("BentoSelect") && ((ue = P.options) == null ? void 0 : ue.multiple) && F === ((be = (fe = P.options) == null ? void 0 : fe.listboxItems) == null ? void 0 : be.length), te = typeof P.type == "string" && P.type === ie.CHECKBOX_GROUP && F === ((ae = (ve = P.options) == null ? void 0 : ve.checkboxItems) == null ? void 0 : ae.length);
|
|
3589
|
+
return U || te ? b("all") : F === null ? null : d(F);
|
|
3590
|
+
}, q = (P, F) => {
|
|
3591
|
+
r.value = t.value.findIndex(
|
|
3592
|
+
(U) => U.label === P && U.field === F
|
|
3593
|
+
);
|
|
3594
|
+
}, J = () => {
|
|
3595
|
+
s.value = "";
|
|
3596
|
+
}, ne = () => {
|
|
3597
|
+
o.value = !1, t.value = e.value, J(), C();
|
|
3598
|
+
}, A = (P) => {
|
|
3599
|
+
const F = t.value.map(({ value: U, ...te }, ue) => ue === r.value ? { value: P.value, ...te } : { value: U, ...te });
|
|
3600
|
+
t.value = F;
|
|
3601
|
+
}, h = () => {
|
|
3602
|
+
A({
|
|
3603
|
+
field: $.value.field,
|
|
3604
|
+
label: $.value.label,
|
|
3605
|
+
type: $.value.type,
|
|
3606
|
+
value: void 0
|
|
3607
|
+
});
|
|
3608
|
+
}, p = () => {
|
|
3609
|
+
t.value = e.value.map(({ value: P, ...F }) => ({
|
|
3610
|
+
...F,
|
|
3611
|
+
value: void 0
|
|
3612
|
+
}));
|
|
3613
|
+
}, c = () => {
|
|
3614
|
+
l(nt.INPUT, t.value), o.value = !1;
|
|
3615
|
+
}, R = f(
|
|
3616
|
+
() => JSON.stringify(t.value) === JSON.stringify(e.value)
|
|
3617
|
+
), W = f(() => [
|
|
3618
|
+
{
|
|
3619
|
+
title: b("applyAll"),
|
|
3620
|
+
disabled: R.value,
|
|
3621
|
+
event: c
|
|
3622
|
+
},
|
|
3623
|
+
{
|
|
3624
|
+
title: b("cancel"),
|
|
3625
|
+
event: ne
|
|
3626
|
+
},
|
|
3627
|
+
{
|
|
3628
|
+
title: b("clearAll"),
|
|
3629
|
+
disabled: !Y.value,
|
|
3630
|
+
event: p
|
|
3631
|
+
}
|
|
3632
|
+
]);
|
|
3633
|
+
return {
|
|
3634
|
+
// Values
|
|
3635
|
+
allFiltersModalUniqueId: a,
|
|
3636
|
+
allFiltersModalFiltersSection: n,
|
|
3637
|
+
allFiltersModalFilterButtons: y,
|
|
3638
|
+
numberOfActiveFilters: Y,
|
|
3639
|
+
isEmptyResultForSearchFilter: I,
|
|
3640
|
+
isModalOpen: o,
|
|
3641
|
+
isClearButtonDisabled: N,
|
|
3642
|
+
activeFilters: D,
|
|
3643
|
+
otherFilters: m,
|
|
3644
|
+
modalActions: W,
|
|
3645
|
+
selectedFilter: $,
|
|
3646
|
+
selectedFilterRef: i,
|
|
3647
|
+
searchTerm: s,
|
|
3648
|
+
shouldShowFilterTitle: T,
|
|
3649
|
+
// Methods
|
|
3650
|
+
onClickAllFiltersModal: k,
|
|
3651
|
+
getFilterCount: O,
|
|
3652
|
+
cancel: ne,
|
|
3653
|
+
selectFilter: q,
|
|
3654
|
+
clearFilter: h,
|
|
3655
|
+
updateFilter: A,
|
|
3656
|
+
onSearchbarClear: J,
|
|
3657
|
+
onKeydownRight: () => {
|
|
3658
|
+
Il(1, i.value.$el).focus();
|
|
3659
|
+
},
|
|
3660
|
+
onKeydownLeft: () => {
|
|
3661
|
+
y.value[$.value.label].$el.focus();
|
|
3662
|
+
},
|
|
3663
|
+
// Translations
|
|
3664
|
+
t: b
|
|
3665
|
+
};
|
|
3666
|
+
}
|
|
3667
|
+
}), Ln = { class: "b-all-filters-modal" }, Un = {
|
|
3668
|
+
key: 0,
|
|
3669
|
+
class: "b-all-filters-modal__empty-search-message"
|
|
3670
|
+
}, Rn = {
|
|
3671
|
+
key: 1,
|
|
3672
|
+
class: "b-all-filters-modal__filters-section"
|
|
3673
|
+
}, Vn = ["aria-labelledby"], Nn = {
|
|
3674
|
+
key: 2,
|
|
3675
|
+
class: "b-all-filters-modal__filters-section"
|
|
3676
|
+
}, Mn = ["aria-labelledby"], Yn = {
|
|
3677
|
+
key: 0,
|
|
3678
|
+
class: "b-all-filters-modal__selected-filter-text"
|
|
3679
|
+
}, Hn = { class: "b-all-filters-modal__selected-filter-component" }, Wn = { class: "b-all-filters-modal__clear-button" };
|
|
3680
|
+
function jn(e, l, t, a, n, o) {
|
|
3681
|
+
const r = H("sliders-icon"), i = H("filter-bar-button"), s = H("bento-search-bar"), b = H("bento-typography"), d = H("all-filters-modal-button"), g = H("bento-button"), y = H("bento-modal");
|
|
3682
|
+
return S(), Q("div", Ln, [
|
|
3683
|
+
E(i, {
|
|
3684
|
+
"is-filter-open": e.isModalOpen,
|
|
3685
|
+
"applied-filters-count": e.numberOfActiveFilters,
|
|
3686
|
+
"no-applied-state-styles": "",
|
|
3687
|
+
onClick: e.onClickAllFiltersModal
|
|
3688
|
+
}, {
|
|
3689
|
+
iconLeft: w(() => [
|
|
3690
|
+
E(r, { "aria-hidden": "true" })
|
|
3691
|
+
]),
|
|
3692
|
+
default: w(() => [
|
|
3693
|
+
Z(x(e.t("allFilters")) + " ", 1)
|
|
3694
|
+
]),
|
|
3695
|
+
_: 1
|
|
3696
|
+
}, 8, ["is-filter-open", "applied-filters-count", "onClick"]),
|
|
3697
|
+
E(y, {
|
|
3698
|
+
class: "'b-all-filters-modal__modal'",
|
|
3699
|
+
"is-open": e.isModalOpen,
|
|
3700
|
+
"with-column-layout": !0,
|
|
3701
|
+
size: "large",
|
|
3702
|
+
actions: e.modalActions,
|
|
3703
|
+
"is-dismissible": !1,
|
|
3704
|
+
"hide-close-button": "",
|
|
3705
|
+
onCloseModal: e.cancel
|
|
3706
|
+
}, {
|
|
3707
|
+
default: w(() => [
|
|
3708
|
+
Z(x(e.t("allFilters")), 1)
|
|
3709
|
+
]),
|
|
3710
|
+
"content-col-1": w(() => [
|
|
3711
|
+
K("div", {
|
|
3712
|
+
ref: "allFiltersModalFiltersSection",
|
|
3713
|
+
class: "b-all-filters-modal__filters",
|
|
3714
|
+
onKeydown: l[1] || (l[1] = ge((...u) => e.onKeydownRight && e.onKeydownRight(...u), ["right"]))
|
|
3715
|
+
}, [
|
|
3716
|
+
E(s, {
|
|
3717
|
+
class: "b-all-filters-modal__search-bar",
|
|
3718
|
+
value: e.searchTerm,
|
|
3719
|
+
"input-field-aria-label": e.t("searchBar").toString(),
|
|
3720
|
+
onInput: l[0] || (l[0] = (u) => e.searchTerm = u),
|
|
3721
|
+
onClear: e.onSearchbarClear
|
|
3722
|
+
}, null, 8, ["value", "input-field-aria-label", "onClear"]),
|
|
3723
|
+
e.isEmptyResultForSearchFilter ? (S(), Q("div", Un, [
|
|
3724
|
+
E(b, { el: "span" }, {
|
|
3725
|
+
default: w(() => [
|
|
3726
|
+
Z(x(e.t("noFiltersMatchThisSearch")), 1)
|
|
3727
|
+
]),
|
|
3728
|
+
_: 1
|
|
3729
|
+
})
|
|
3730
|
+
])) : X("", !0),
|
|
3731
|
+
e.activeFilters.length ? (S(), Q("div", Rn, [
|
|
3732
|
+
E(b, {
|
|
3733
|
+
id: `active-filters-${e.allFiltersModalUniqueId}`,
|
|
3734
|
+
class: "b-all-filters-modal__filters-section-title",
|
|
3735
|
+
el: "span",
|
|
3736
|
+
variant: "caption"
|
|
3737
|
+
}, {
|
|
3738
|
+
default: w(() => [
|
|
3739
|
+
Z(x(e.t("activeFilters")), 1)
|
|
3740
|
+
]),
|
|
3741
|
+
_: 1
|
|
3742
|
+
}, 8, ["id"]),
|
|
3743
|
+
K("ul", {
|
|
3744
|
+
class: "b-all-filters-modal__filters-list",
|
|
3745
|
+
"aria-labelledby": `active-filters-${e.allFiltersModalUniqueId}`
|
|
3746
|
+
}, [
|
|
3747
|
+
(S(!0), Q(Ve, null, Ce(e.activeFilters, (u) => (S(), Q("li", {
|
|
3748
|
+
key: `${u.label}-${u.field}`
|
|
3749
|
+
}, [
|
|
3750
|
+
E(d, {
|
|
3751
|
+
ref_for: !0,
|
|
3752
|
+
ref: (D) => e.allFiltersModalFilterButtons[u.label] = D,
|
|
3753
|
+
label: u.label,
|
|
3754
|
+
"applied-filters-count": e.getFilterCount(u),
|
|
3755
|
+
"is-filter-open": e.selectedFilter.label === u.label,
|
|
3756
|
+
disabled: u.disabled,
|
|
3757
|
+
onClick: (D) => e.selectFilter(u.label, u.field)
|
|
3758
|
+
}, null, 8, ["label", "applied-filters-count", "is-filter-open", "disabled", "onClick"])
|
|
3759
|
+
]))), 128))
|
|
3760
|
+
], 8, Vn)
|
|
3761
|
+
])) : X("", !0),
|
|
3762
|
+
e.otherFilters.length ? (S(), Q("div", Nn, [
|
|
3763
|
+
e.activeFilters.length ? (S(), L(b, {
|
|
3764
|
+
key: 0,
|
|
3765
|
+
id: `other-filters-${e.allFiltersModalUniqueId}`,
|
|
3766
|
+
class: "b-all-filters-modal__filters-section-title",
|
|
3767
|
+
el: "span",
|
|
3768
|
+
variant: "caption"
|
|
3769
|
+
}, {
|
|
3770
|
+
default: w(() => [
|
|
3771
|
+
Z(x(e.t("otherFilters")), 1)
|
|
3772
|
+
]),
|
|
3773
|
+
_: 1
|
|
3774
|
+
}, 8, ["id"])) : X("", !0),
|
|
3775
|
+
K("ul", {
|
|
3776
|
+
class: "b-all-filters-modal__filters-list",
|
|
3777
|
+
"aria-labelledby": `other-filters-${e.allFiltersModalUniqueId}`
|
|
3778
|
+
}, [
|
|
3779
|
+
(S(!0), Q(Ve, null, Ce(e.otherFilters, (u) => (S(), Q("li", {
|
|
3780
|
+
key: `${u.label}-${u.field}`
|
|
3781
|
+
}, [
|
|
3782
|
+
E(d, {
|
|
3783
|
+
ref_for: !0,
|
|
3784
|
+
ref: (D) => e.allFiltersModalFilterButtons[u.label] = D,
|
|
3785
|
+
label: u.label,
|
|
3786
|
+
disabled: u.disabled,
|
|
3787
|
+
"applied-filters-count": e.getFilterCount(u),
|
|
3788
|
+
"is-filter-open": e.selectedFilter.label === u.label,
|
|
3789
|
+
onClick: (D) => e.selectFilter(u.label, u.field)
|
|
3790
|
+
}, null, 8, ["label", "disabled", "applied-filters-count", "is-filter-open", "onClick"])
|
|
3791
|
+
]))), 128))
|
|
3792
|
+
], 8, Mn)
|
|
3793
|
+
])) : X("", !0)
|
|
3794
|
+
], 544)
|
|
3795
|
+
]),
|
|
3796
|
+
"content-col-2": w(() => [
|
|
3797
|
+
K("div", {
|
|
3798
|
+
class: "b-all-filters-modal__selected-filter-content",
|
|
3799
|
+
onKeydown: l[2] || (l[2] = ge((...u) => e.onKeydownLeft && e.onKeydownLeft(...u), ["left"]))
|
|
3800
|
+
}, [
|
|
3801
|
+
e.shouldShowFilterTitle ? (S(), Q("div", Yn, [
|
|
3802
|
+
E(b, {
|
|
3803
|
+
el: "div",
|
|
3804
|
+
variant: "title",
|
|
3805
|
+
medium: ""
|
|
3806
|
+
}, {
|
|
3807
|
+
default: w(() => [
|
|
3808
|
+
Z(x(e.selectedFilter.label), 1)
|
|
3809
|
+
]),
|
|
3810
|
+
_: 1
|
|
3811
|
+
}),
|
|
3812
|
+
e.selectedFilter.description ? (S(), L(b, {
|
|
3813
|
+
key: 0,
|
|
3814
|
+
el: "div",
|
|
3815
|
+
variant: "body",
|
|
3816
|
+
wide: ""
|
|
3817
|
+
}, {
|
|
3818
|
+
default: w(() => [
|
|
3819
|
+
Z(x(e.selectedFilter.description), 1)
|
|
3820
|
+
]),
|
|
3821
|
+
_: 1
|
|
3822
|
+
})) : X("", !0)
|
|
3823
|
+
])) : X("", !0),
|
|
3824
|
+
K("div", Hn, [
|
|
3825
|
+
(S(), L(qe(e.selectedFilter.type), {
|
|
3826
|
+
ref: "selectedFilterRef",
|
|
3827
|
+
key: e.selectedFilter.field,
|
|
3828
|
+
description: e.selectedFilter.description,
|
|
3829
|
+
field: e.selectedFilter.field,
|
|
3830
|
+
label: e.selectedFilter.label,
|
|
3831
|
+
options: e.selectedFilter.options,
|
|
3832
|
+
value: e.selectedFilter.value,
|
|
3833
|
+
"default-value": e.selectedFilter.defaultValue,
|
|
3834
|
+
"only-slot": !0,
|
|
3835
|
+
disabled: e.selectedFilter.disabled,
|
|
3836
|
+
onInput: e.updateFilter
|
|
3837
|
+
}, null, 40, ["description", "field", "label", "options", "value", "default-value", "disabled", "onInput"]))
|
|
3838
|
+
]),
|
|
3839
|
+
K("div", Wn, [
|
|
3840
|
+
E(g, {
|
|
3841
|
+
variant: "secondary",
|
|
3842
|
+
disabled: e.isClearButtonDisabled,
|
|
3843
|
+
onClick: e.clearFilter
|
|
3844
|
+
}, {
|
|
3845
|
+
default: w(() => [
|
|
3846
|
+
Z(x(e.t("clear")), 1)
|
|
3847
|
+
]),
|
|
3848
|
+
_: 1
|
|
3849
|
+
}, 8, ["disabled", "onClick"])
|
|
3850
|
+
])
|
|
3851
|
+
], 32)
|
|
3852
|
+
]),
|
|
3853
|
+
_: 1
|
|
3854
|
+
}, 8, ["is-open", "actions", "onCloseModal"])
|
|
3855
|
+
]);
|
|
3856
|
+
}
|
|
3857
|
+
const qn = /* @__PURE__ */ le(En, [["render", jn], ["__scopeId", "data-v-22ddbff2"]]), bl = {
|
|
3858
|
+
"en-US": {
|
|
3859
|
+
clearFilters: "Clear filters",
|
|
3860
|
+
filtersHaveBeenCleared: "Filters have been cleared.",
|
|
3861
|
+
filtersHaveBeenReset: "Filters have been reset.",
|
|
3862
|
+
resetFilters: "Reset filters",
|
|
3863
|
+
searchBar: "Search bar",
|
|
3864
|
+
undo: "Undo"
|
|
3865
|
+
},
|
|
3866
|
+
"ja-JP": {
|
|
3867
|
+
clearFilters: "フィルターをクリア",
|
|
3868
|
+
filtersHaveBeenCleared: "フィルターをクリアしました。",
|
|
3869
|
+
filtersHaveBeenReset: "フィルターがリセットされました。",
|
|
3870
|
+
resetFilters: "フィルターのリセット",
|
|
3871
|
+
searchBar: "検索バー",
|
|
3872
|
+
undo: "元に戻す"
|
|
3873
|
+
},
|
|
3874
|
+
"pt-BR": {
|
|
3875
|
+
clearFilters: "Limpar filtros",
|
|
3876
|
+
filtersHaveBeenCleared: "Os filtros foram apagados.",
|
|
3877
|
+
filtersHaveBeenReset: "Os filtros foram limpos.",
|
|
3878
|
+
resetFilters: "Redefinir filtros",
|
|
3879
|
+
searchBar: "Barra de busca",
|
|
3880
|
+
undo: "Desfazer"
|
|
3881
|
+
}
|
|
3882
|
+
}, Gn = {
|
|
3883
|
+
key: 0,
|
|
3884
|
+
class: "b-filter-bar__search-external-container"
|
|
3885
|
+
}, Kn = { key: 0 }, Jn = {
|
|
3886
|
+
i18n: { messages: bl },
|
|
3887
|
+
name: "bento-filter-bar",
|
|
3888
|
+
components: {
|
|
3889
|
+
BentoBooleanFilter: ul,
|
|
3890
|
+
BentoCheckboxGroupFilter: fl,
|
|
3891
|
+
BentoDateFilter: Jt,
|
|
3892
|
+
BentoDateRangeFilter: Zt,
|
|
3893
|
+
BentoInputFilter: Gt,
|
|
3894
|
+
BentoInputWithDropdownFilter: Kt,
|
|
3895
|
+
BentoRadioGroupFilter: xt,
|
|
3896
|
+
BentoRangeFilter: dl,
|
|
3897
|
+
BentoSelectAvatarFilter: ll,
|
|
3898
|
+
BentoSelectCountryFilter: nl,
|
|
3899
|
+
BentoSelectCurrencyFilter: al,
|
|
3900
|
+
BentoSelectFilter: Ie,
|
|
3901
|
+
BentoSelectPaymentMethodFilter: ol,
|
|
3902
|
+
BentoSelectTagFilter: il,
|
|
3903
|
+
BentoTeleport: _t,
|
|
3904
|
+
BentoToggleFilter: rl,
|
|
3905
|
+
FixedScroller: Pt
|
|
3906
|
+
}
|
|
3907
|
+
}, Qn = /* @__PURE__ */ z({
|
|
3908
|
+
...Jn,
|
|
3909
|
+
props: {
|
|
3910
|
+
config: { default: () => [] },
|
|
3911
|
+
filterValues: { default: () => [] },
|
|
3912
|
+
containerSizeLayout: { default: () => ({
|
|
3913
|
+
medium: "one-line",
|
|
3914
|
+
small: "multi-line"
|
|
3915
|
+
}) },
|
|
3916
|
+
search: { default: void 0 },
|
|
3917
|
+
searchTerm: { default: void 0 },
|
|
3918
|
+
showAppliedHiddenFilters: { type: Boolean, default: !1 },
|
|
3919
|
+
value: { default: () => [] },
|
|
3920
|
+
filterValuesObject: { default: void 0 }
|
|
3921
|
+
},
|
|
3922
|
+
emits: [
|
|
3923
|
+
we.INPUT,
|
|
3924
|
+
we.UPDATE_FILTER_VALUES_OBJECT,
|
|
3925
|
+
we.UPDATE_FILTER_VALUES_ARRAY,
|
|
3926
|
+
_e.CLEAR,
|
|
3927
|
+
_e.INPUT,
|
|
3928
|
+
_e.UPDATE
|
|
3929
|
+
],
|
|
3930
|
+
setup(e, { expose: l, emit: t }) {
|
|
3931
|
+
const a = e, n = t, { t: o } = pe({ messages: bl }), r = M(null), i = f(
|
|
3932
|
+
() => {
|
|
3933
|
+
var A, h;
|
|
3934
|
+
return (h = ((A = a.config) == null ? void 0 : A.length) > 0 ? a.config : a.value) == null ? void 0 : h.map((p) => {
|
|
3935
|
+
var R;
|
|
3936
|
+
let c = (R = a.filterValues.find(({ field: W }) => W === p.field)) == null ? void 0 : R.value;
|
|
3937
|
+
return a.filterValuesObject && p.field in a.filterValuesObject && (c = a.filterValuesObject[p.field]), c === void 0 && (c = (p == null ? void 0 : p.value) === void 0 && (p == null ? void 0 : p.defaultValue) !== void 0 ? p == null ? void 0 : p.defaultValue : p == null ? void 0 : p.value), { ...p, value: c !== void 0 ? c : p == null ? void 0 : p.value };
|
|
3938
|
+
});
|
|
3939
|
+
}
|
|
3940
|
+
), { addToast: s } = hl(), { screenLayoutComponent: b, showSearchbarInsideContainer: d, isOneLineLayout: g } = aa(
|
|
3941
|
+
r,
|
|
3942
|
+
ee(a, "containerSizeLayout")
|
|
3943
|
+
), y = f(() => ({
|
|
3944
|
+
"b-filter-bar__fixed-scroller": g.value,
|
|
3945
|
+
"b-filter-bar__container": !g.value
|
|
3946
|
+
// Multi-line
|
|
3947
|
+
})), u = f(() => ({
|
|
3948
|
+
"b-filter-bar__scroller-content": g.value,
|
|
3949
|
+
"b-filter-bar__filters": !g.value
|
|
3950
|
+
// Multi-line
|
|
3951
|
+
})), D = f(() => {
|
|
3952
|
+
var A;
|
|
3953
|
+
return ((A = a.search) == null ? void 0 : A.inputFieldAriaLabel) || o("searchBar");
|
|
3954
|
+
}), m = f(() => {
|
|
3955
|
+
if (!a.search)
|
|
3956
|
+
return;
|
|
3957
|
+
const { debounceTime: A, disabled: h, inputFieldAriaLabel: p, hint: c, placeholder: R } = a.search;
|
|
3958
|
+
return { debounceTime: A, disabled: h, inputFieldAriaLabel: p, hint: c, placeholder: R };
|
|
3959
|
+
}), I = f(() => i.value.some(
|
|
3960
|
+
({ visible: h }) => h != null
|
|
3961
|
+
) ? i.value.some(({ visible: h }) => !h) : !1), $ = f(
|
|
3962
|
+
() => i.value.filter(({ defaultValue: A }) => A !== void 0)
|
|
3963
|
+
), C = f(() => i.value.some(
|
|
3964
|
+
({ visible: h }) => h != null
|
|
3965
|
+
) ? i.value.filter(
|
|
3966
|
+
({ defaultValue: h, visible: p, value: c }) => (
|
|
3967
|
+
// eslint-disable-next-line eqeqeq
|
|
3968
|
+
h === void 0 && p || a.showAppliedHiddenFilters && c != null
|
|
3969
|
+
)
|
|
3970
|
+
) : i.value.filter(
|
|
3971
|
+
({ defaultValue: h, value: p }) => (
|
|
3972
|
+
// eslint-disable-next-line eqeqeq
|
|
3973
|
+
h === void 0 || a.showAppliedHiddenFilters && p != null
|
|
3974
|
+
)
|
|
3975
|
+
)), B = f(() => a.searchTerm != null), V = f(
|
|
3976
|
+
() => i.value.filter(({ defaultValue: A }) => A == null).some(({ value: A }) => A != null)
|
|
3977
|
+
), T = f(() => $.value.length === 0 && V.value), N = f(() => $.value.length === 0 ? !1 : !i.value.filter(({ defaultValue: h }) => h !== void 0 || h !== null).every(({ value: h, defaultValue: p }) => JSON.stringify(h) === JSON.stringify(p)) || V.value), Y = (A) => {
|
|
3978
|
+
n(we.INPUT, A), n(
|
|
3979
|
+
we.UPDATE_FILTER_VALUES_ARRAY,
|
|
3980
|
+
A == null ? void 0 : A.filter(({ value: h }) => h !== null || h !== void 0).map(({ field: h, value: p }) => ({ field: h, value: p }))
|
|
3981
|
+
), n(
|
|
3982
|
+
we.UPDATE_FILTER_VALUES_OBJECT,
|
|
3983
|
+
A == null ? void 0 : A.filter(({ value: h }) => h !== null || h !== void 0).reduce((h, p) => (h[p.field] = p.value, h), {})
|
|
3984
|
+
);
|
|
3985
|
+
}, k = (A) => {
|
|
3986
|
+
const h = i.value.findIndex(
|
|
3987
|
+
(c) => c.field === A.field
|
|
3988
|
+
), p = i.value.slice();
|
|
3989
|
+
p[h].value = A.value, Y(p);
|
|
3990
|
+
}, O = () => {
|
|
3991
|
+
const A = i.value.slice(), h = i.value.map(({ value: p, ...c }) => ({
|
|
3992
|
+
...c,
|
|
3993
|
+
value: void 0
|
|
3994
|
+
}));
|
|
3995
|
+
s({
|
|
3996
|
+
text: o("filtersHaveBeenCleared"),
|
|
3997
|
+
action: {
|
|
3998
|
+
handler: () => Y(A),
|
|
3999
|
+
text: o("undo")
|
|
4000
|
+
}
|
|
4001
|
+
}), Y(h);
|
|
4002
|
+
}, q = () => {
|
|
4003
|
+
const A = i.value.slice(), h = i.value.map(({ defaultValue: p, ...c }) => ({
|
|
4004
|
+
...c,
|
|
4005
|
+
defaultValue: p,
|
|
4006
|
+
value: p
|
|
4007
|
+
}));
|
|
4008
|
+
s({
|
|
4009
|
+
text: o("filtersHaveBeenReset"),
|
|
4010
|
+
action: {
|
|
4011
|
+
handler: () => Y(A),
|
|
4012
|
+
text: o("undo")
|
|
4013
|
+
}
|
|
4014
|
+
}), Y(h);
|
|
4015
|
+
}, J = (A) => {
|
|
4016
|
+
n(_e.INPUT, A), n(_e.UPDATE, A);
|
|
4017
|
+
}, ne = () => {
|
|
4018
|
+
n(_e.CLEAR);
|
|
4019
|
+
};
|
|
4020
|
+
return l({ isClearAllVisible: T, clearAllFilters: O, isResetAllVisible: N, resetAllFilters: q }), (A, h) => (S(), Q("div", {
|
|
4021
|
+
ref_key: "filterBarRef",
|
|
4022
|
+
ref: r,
|
|
4023
|
+
class: "b-filter-bar"
|
|
4024
|
+
}, [
|
|
4025
|
+
!v(d) && B.value ? (S(), Q("div", Gn, [
|
|
4026
|
+
E(Je, re({ class: "b-filter-bar__search-bar" }, m.value, {
|
|
4027
|
+
"input-field-aria-label": D.value,
|
|
4028
|
+
value: A.searchTerm,
|
|
4029
|
+
condensed: "",
|
|
4030
|
+
onInput: J,
|
|
4031
|
+
onClear: ne
|
|
4032
|
+
}), null, 16, ["input-field-aria-label", "value"])
|
|
4033
|
+
])) : X("", !0),
|
|
4034
|
+
(S(), L(qe(v(b)), {
|
|
4035
|
+
class: ce(y.value),
|
|
4036
|
+
condensed: ""
|
|
4037
|
+
}, {
|
|
4038
|
+
default: w(() => [
|
|
4039
|
+
K("div", {
|
|
4040
|
+
class: ce(u.value)
|
|
4041
|
+
}, [
|
|
4042
|
+
v(d) && B.value ? (S(), Q("div", Kn, [
|
|
4043
|
+
E(Je, re({ class: "b-filter-bar__search-bar" }, m.value, {
|
|
4044
|
+
"input-field-aria-label": D.value,
|
|
4045
|
+
value: A.searchTerm,
|
|
4046
|
+
condensed: "",
|
|
4047
|
+
onInput: J,
|
|
4048
|
+
onClear: ne
|
|
4049
|
+
}), null, 16, ["input-field-aria-label", "value"])
|
|
4050
|
+
])) : X("", !0),
|
|
4051
|
+
$.value.length ? (S(!0), Q(Ve, { key: 1 }, Ce($.value, (p) => (S(), L(qe(p.type), {
|
|
4052
|
+
key: p.field,
|
|
4053
|
+
field: p.field,
|
|
4054
|
+
label: p.label,
|
|
4055
|
+
disabled: p == null ? void 0 : p.disabled,
|
|
4056
|
+
options: p.options,
|
|
4057
|
+
value: p.value,
|
|
4058
|
+
"default-value": p.defaultValue,
|
|
4059
|
+
onUpdate: k
|
|
4060
|
+
}, null, 40, ["field", "label", "disabled", "options", "value", "default-value"]))), 128)) : X("", !0),
|
|
4061
|
+
(S(!0), Q(Ve, null, Ce(C.value, (p) => (S(), L(qe(p.type), {
|
|
4062
|
+
key: p.field,
|
|
4063
|
+
field: p.field,
|
|
4064
|
+
label: p.label,
|
|
4065
|
+
disabled: p == null ? void 0 : p.disabled,
|
|
4066
|
+
options: p.options,
|
|
4067
|
+
value: p.value,
|
|
4068
|
+
onUpdate: k
|
|
4069
|
+
}, null, 40, ["field", "label", "disabled", "options", "value"]))), 128)),
|
|
4070
|
+
I.value ? (S(), L(qn, {
|
|
4071
|
+
key: 2,
|
|
4072
|
+
class: "b-filter-bar__all-filters-modal",
|
|
4073
|
+
value: i.value,
|
|
4074
|
+
onInput: Y
|
|
4075
|
+
}, null, 8, ["value"])) : X("", !0),
|
|
4076
|
+
T.value ? (S(), L(v(Ae), {
|
|
4077
|
+
key: 3,
|
|
4078
|
+
class: "b-filter-bar__clear-all",
|
|
4079
|
+
onClick: O
|
|
4080
|
+
}, {
|
|
4081
|
+
iconLeft: w(() => [
|
|
4082
|
+
E(v(ft), { "aria-hidden": "true" })
|
|
4083
|
+
]),
|
|
4084
|
+
default: w(() => [
|
|
4085
|
+
Z(x(v(o)("clearFilters")) + " ", 1)
|
|
4086
|
+
]),
|
|
4087
|
+
_: 1
|
|
4088
|
+
})) : X("", !0),
|
|
4089
|
+
N.value ? (S(), L(v(Ae), {
|
|
4090
|
+
key: 4,
|
|
4091
|
+
class: "b-filter-bar__reset-all",
|
|
4092
|
+
onClick: q
|
|
4093
|
+
}, {
|
|
4094
|
+
iconLeft: w(() => [
|
|
4095
|
+
E(v(ft), { "aria-hidden": "true" })
|
|
4096
|
+
]),
|
|
4097
|
+
default: w(() => [
|
|
4098
|
+
Z(x(v(o)("resetFilters")) + " ", 1)
|
|
4099
|
+
]),
|
|
4100
|
+
_: 1
|
|
4101
|
+
})) : X("", !0)
|
|
4102
|
+
], 2)
|
|
4103
|
+
]),
|
|
4104
|
+
_: 1
|
|
4105
|
+
}, 8, ["class"]))
|
|
4106
|
+
], 512));
|
|
4107
|
+
}
|
|
4108
|
+
}), Ho = /* @__PURE__ */ le(Qn, [["__scopeId", "data-v-ae476a4a"]]);
|
|
4109
|
+
export {
|
|
4110
|
+
Ho as B,
|
|
4111
|
+
Se as a,
|
|
4112
|
+
_ as b,
|
|
4113
|
+
we as c,
|
|
4114
|
+
ie as d,
|
|
4115
|
+
Wt as u
|
|
4116
|
+
};
|
|
4117
|
+
//# sourceMappingURL=filter-bar.BJmaoSr2.js.map
|