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