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