@adyen/bento-vue2 1.79.1 → 1.80.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.
Files changed (180) hide show
  1. package/dist/@types/index.d.ts +399 -920
  2. package/dist/action-bar.js +1 -1
  3. package/dist/assets/accordion-item.css +1 -1
  4. package/dist/assets/action-bar.css +1 -1
  5. package/dist/assets/base-modal.css +1 -1
  6. package/dist/assets/button-actions.css +1 -1
  7. package/dist/assets/card.css +1 -1
  8. package/dist/assets/data-grid.css +1 -1
  9. package/dist/assets/date-picker.css +1 -1
  10. package/dist/assets/dialog-page.css +1 -1
  11. package/dist/assets/file-uploader.css +1 -1
  12. package/dist/assets/filter-bar.css +1 -1
  13. package/dist/assets/focus-trap.css +1 -1
  14. package/dist/assets/inspector.css +1 -1
  15. package/dist/assets/modal-fullscreen.css +1 -1
  16. package/dist/assets/sidepanel.css +1 -1
  17. package/dist/assets/timeline-item.css +1 -1
  18. package/dist/button.js +1 -1
  19. package/dist/card.js +1 -1
  20. package/dist/checkbox.js +3 -3
  21. package/dist/chunks/{action-bar.DOaFj-A2.js → action-bar.DYH79CCh.js} +3 -3
  22. package/dist/chunks/{action-bar.DOaFj-A2.js.map → action-bar.DYH79CCh.js.map} +1 -1
  23. package/dist/chunks/{base-modal.BJ6315kP.js → base-modal.MpaQpAHB.js} +3 -3
  24. package/dist/chunks/{base-modal.BJ6315kP.js.map → base-modal.MpaQpAHB.js.map} +1 -1
  25. package/dist/chunks/{button-actions-with-menu.DPKvfKJY.js → button-actions-with-menu.ouuwtS1H.js} +2 -2
  26. package/dist/chunks/{button-actions-with-menu.DPKvfKJY.js.map → button-actions-with-menu.ouuwtS1H.js.map} +1 -1
  27. package/dist/chunks/{button-actions.C3cP-anb.js → button-actions.BoZOEVZi.js} +2 -2
  28. package/dist/chunks/{button-actions.C3cP-anb.js.map → button-actions.BoZOEVZi.js.map} +1 -1
  29. package/dist/chunks/{card.XfRuWGfC.js → card.BEM0inJ6.js} +2 -2
  30. package/dist/chunks/{card.XfRuWGfC.js.map → card.BEM0inJ6.js.map} +1 -1
  31. package/dist/chunks/{checkbox-group.h4OYdn9w.js → checkbox-group.CIIa-cYP.js} +25 -25
  32. package/dist/chunks/{checkbox-group.h4OYdn9w.js.map → checkbox-group.CIIa-cYP.js.map} +1 -1
  33. package/dist/chunks/{checkbox.CwOK7ss2.js → checkbox.CiWvdg8S.js} +3 -3
  34. package/dist/chunks/{checkbox.CwOK7ss2.js.map → checkbox.CiWvdg8S.js.map} +1 -1
  35. package/dist/chunks/{code-snippet.bzFOFUj4.js → code-snippet.CL3-Y8Az.js} +4 -4
  36. package/dist/chunks/{code-snippet.bzFOFUj4.js.map → code-snippet.CL3-Y8Az.js.map} +1 -1
  37. package/dist/chunks/{controls-group.D62vSDSk.js → controls-group.GchVWe7h.js} +2 -2
  38. package/dist/chunks/{controls-group.D62vSDSk.js.map → controls-group.GchVWe7h.js.map} +1 -1
  39. package/dist/chunks/{copy.Hu3DFJwv.js → copy.DauzzgJV.js} +3 -3
  40. package/dist/chunks/{copy.Hu3DFJwv.js.map → copy.DauzzgJV.js.map} +1 -1
  41. package/dist/chunks/{dashboard-section.BvGMr9Vl.js → dashboard-section.DiCeWZh1.js} +2 -2
  42. package/dist/chunks/{dashboard-section.BvGMr9Vl.js.map → dashboard-section.DiCeWZh1.js.map} +1 -1
  43. package/dist/chunks/{dashed-underline.D107w00E.js → dashed-underline.BfQuyT28.js} +3 -3
  44. package/dist/chunks/{dashed-underline.D107w00E.js.map → dashed-underline.BfQuyT28.js.map} +1 -1
  45. package/dist/chunks/{data-grid-template.DShJunDa.js → data-grid-template.Co0jg7Gj.js} +3 -3
  46. package/dist/chunks/{data-grid-template.DShJunDa.js.map → data-grid-template.Co0jg7Gj.js.map} +1 -1
  47. package/dist/chunks/{data-grid.C8gSMQ0A.js → data-grid.CcddqHWZ.js} +238 -226
  48. package/dist/chunks/data-grid.CcddqHWZ.js.map +1 -0
  49. package/dist/chunks/{date-picker.Dvx50znw.js → date-picker.D-7m8ONP.js} +71 -70
  50. package/dist/chunks/date-picker.D-7m8ONP.js.map +1 -0
  51. package/dist/chunks/{date-range-picker.DYYyE_e2.js → date-range-picker.CvxP8n0I.js} +6 -6
  52. package/dist/chunks/{date-range-picker.DYYyE_e2.js.map → date-range-picker.CvxP8n0I.js.map} +1 -1
  53. package/dist/chunks/{dropdown-tag.Ctn5KMFU.js → dropdown-tag.B2Ot75dU.js} +3 -3
  54. package/dist/chunks/{dropdown-tag.Ctn5KMFU.js.map → dropdown-tag.B2Ot75dU.js.map} +1 -1
  55. package/dist/chunks/{dropdown.BpT6ct8O.js → dropdown.BLgcbjv8.js} +5 -5
  56. package/dist/chunks/{dropdown.BpT6ct8O.js.map → dropdown.BLgcbjv8.js.map} +1 -1
  57. package/dist/chunks/es6.MoTTyETW.js.map +1 -1
  58. package/dist/chunks/{field-label.C3h8Q8Xd.js → field-label.DHGAa4cq.js} +2 -2
  59. package/dist/chunks/{field-label.C3h8Q8Xd.js.map → field-label.DHGAa4cq.js.map} +1 -1
  60. package/dist/chunks/{file-uploader.CK6dhx8T.js → file-uploader.QLtB254W.js} +3 -3
  61. package/dist/chunks/{file-uploader.CK6dhx8T.js.map → file-uploader.QLtB254W.js.map} +1 -1
  62. package/dist/chunks/filter-bar.DLAT3ops.js +2461 -0
  63. package/dist/chunks/filter-bar.DLAT3ops.js.map +1 -0
  64. package/dist/chunks/{focus-trap.BJfpIboH.js → focus-trap.CNIU5jOz.js} +53 -50
  65. package/dist/chunks/focus-trap.CNIU5jOz.js.map +1 -0
  66. package/dist/chunks/{footer-actions.DPjWGWhJ.js → footer-actions.BA1gX7_s.js} +2 -2
  67. package/dist/chunks/{footer-actions.DPjWGWhJ.js.map → footer-actions.BA1gX7_s.js.map} +1 -1
  68. package/dist/chunks/{header-meta.qT3_T35I.js → header-meta.B0KYY5s_.js} +3 -3
  69. package/dist/chunks/{header-meta.qT3_T35I.js.map → header-meta.B0KYY5s_.js.map} +1 -1
  70. package/dist/chunks/{header-with-views.DnGWHrWw.js → header-with-views.D0zXZ9Jh.js} +8 -8
  71. package/dist/chunks/{header-with-views.DnGWHrWw.js.map → header-with-views.D0zXZ9Jh.js.map} +1 -1
  72. package/dist/chunks/{header.CLDtv3Ir.js → header.BwS-1scb.js} +3 -3
  73. package/dist/chunks/{header.CLDtv3Ir.js.map → header.BwS-1scb.js.map} +1 -1
  74. package/dist/chunks/{info-icon.DGrrXpIY.js → info-icon.iKLaNff6.js} +3 -3
  75. package/dist/chunks/{info-icon.DGrrXpIY.js.map → info-icon.iKLaNff6.js.map} +1 -1
  76. package/dist/chunks/{input-field-password.uhQuUzyj.js → input-field-password.DVC_KSqj.js} +5 -5
  77. package/dist/chunks/{input-field-password.uhQuUzyj.js.map → input-field-password.DVC_KSqj.js.map} +1 -1
  78. package/dist/chunks/{input-field-phone-number.BdbaTJwH.js → input-field-phone-number.DcY0wFJH.js} +3 -3
  79. package/dist/chunks/{input-field-phone-number.BdbaTJwH.js.map → input-field-phone-number.DcY0wFJH.js.map} +1 -1
  80. package/dist/chunks/{input-field.C4XJ53Cn.js → input-field.MpAZisFn.js} +3 -3
  81. package/dist/chunks/{input-field.C4XJ53Cn.js.map → input-field.MpAZisFn.js.map} +1 -1
  82. package/dist/chunks/{inspector.pmpheRch.js → inspector.C6bbjQC0.js} +2 -2
  83. package/dist/chunks/{inspector.pmpheRch.js.map → inspector.C6bbjQC0.js.map} +1 -1
  84. package/dist/chunks/{listbox-option-tag.B94BtpSU.js → listbox-option-tag.CK628fjn.js} +2 -2
  85. package/dist/chunks/{listbox-option-tag.B94BtpSU.js.map → listbox-option-tag.CK628fjn.js.map} +1 -1
  86. package/dist/chunks/{modal-fullscreen.B3Xx-Hoc.js → modal-fullscreen.B9onBrN-.js} +3 -3
  87. package/dist/chunks/{modal-fullscreen.B3Xx-Hoc.js.map → modal-fullscreen.B9onBrN-.js.map} +1 -1
  88. package/dist/chunks/{modal.D3OSxMF6.js → modal.BgimE0kj.js} +4 -4
  89. package/dist/chunks/{modal.D3OSxMF6.js.map → modal.BgimE0kj.js.map} +1 -1
  90. package/dist/chunks/{pagination.Bvhpu21H.js → pagination.DcTUYJsK.js} +2 -2
  91. package/dist/chunks/{pagination.Bvhpu21H.js.map → pagination.DcTUYJsK.js.map} +1 -1
  92. package/dist/chunks/popover.types.WDh5ggr3.js +6 -0
  93. package/dist/chunks/{popover.types.DK6opPkz.js.map → popover.types.WDh5ggr3.js.map} +1 -1
  94. package/dist/chunks/{popper-container.agLYtGwv.js → popper-container.Cdokz_NE.js} +2 -2
  95. package/dist/chunks/{popper-container.agLYtGwv.js.map → popper-container.Cdokz_NE.js.map} +1 -1
  96. package/dist/chunks/{radio-group.BTu23ZgN.js → radio-group.Cr7UcYij.js} +4 -4
  97. package/dist/chunks/{radio-group.BTu23ZgN.js.map → radio-group.Cr7UcYij.js.map} +1 -1
  98. package/dist/chunks/{rich-text-editor.xXfZRlsV.js → rich-text-editor.Bu4pffp2.js} +4 -4
  99. package/dist/chunks/{rich-text-editor.xXfZRlsV.js.map → rich-text-editor.Bu4pffp2.js.map} +1 -1
  100. package/dist/chunks/{search-bar.BcHoTrjP.js → search-bar.C41ZmlHr.js} +3 -3
  101. package/dist/chunks/{search-bar.BcHoTrjP.js.map → search-bar.C41ZmlHr.js.map} +1 -1
  102. package/dist/chunks/{secondary-nav.DEThy9WH.js → secondary-nav.R6nXAdRN.js} +2 -2
  103. package/dist/chunks/{secondary-nav.DEThy9WH.js.map → secondary-nav.R6nXAdRN.js.map} +1 -1
  104. package/dist/chunks/{segmented-control.Dj_ZKhmU.js → segmented-control._CuB62pG.js} +2 -2
  105. package/dist/chunks/{segmented-control.Dj_ZKhmU.js.map → segmented-control._CuB62pG.js.map} +1 -1
  106. package/dist/chunks/{selection-card-group.cD72SQlR.js → selection-card-group.jykyd9iE.js} +3 -3
  107. package/dist/chunks/{selection-card-group.cD72SQlR.js.map → selection-card-group.jykyd9iE.js.map} +1 -1
  108. package/dist/chunks/{sidepanel.ClG3dhHf.js → sidepanel.ztFrPPdy.js} +3 -3
  109. package/dist/chunks/{sidepanel.ClG3dhHf.js.map → sidepanel.ztFrPPdy.js.map} +1 -1
  110. package/dist/chunks/{structured-list-item.zoY-ATTu.js → structured-list-item.BLJabJwA.js} +4 -4
  111. package/dist/chunks/{structured-list-item.zoY-ATTu.js.map → structured-list-item.BLJabJwA.js.map} +1 -1
  112. package/dist/chunks/{summary-grid.types.BA0XCVKK.js → summary-grid.types.C2LMzLj-.js} +5 -5
  113. package/dist/chunks/{summary-grid.types.BA0XCVKK.js.map → summary-grid.types.C2LMzLj-.js.map} +1 -1
  114. package/dist/chunks/{tag.BdCP2CN_.js → tag.7fp_M9Au.js} +2 -2
  115. package/dist/chunks/{tag.BdCP2CN_.js.map → tag.7fp_M9Au.js.map} +1 -1
  116. package/dist/chunks/{textarea.DaNiOOJ7.js → textarea.Ci9sKDFy.js} +2 -2
  117. package/dist/chunks/{textarea.DaNiOOJ7.js.map → textarea.Ci9sKDFy.js.map} +1 -1
  118. package/dist/chunks/timeline-item.DRA5mfHH.js +255 -0
  119. package/dist/chunks/timeline-item.DRA5mfHH.js.map +1 -0
  120. package/dist/chunks/{tooltip.Dt87KVh2.js → tooltip.BcQ24pKP.js} +2 -2
  121. package/dist/chunks/{tooltip.Dt87KVh2.js.map → tooltip.BcQ24pKP.js.map} +1 -1
  122. package/dist/chunks/{tutorial.C-q4mxUb.js → tutorial.DVGxYGkx.js} +4 -4
  123. package/dist/chunks/{tutorial.C-q4mxUb.js.map → tutorial.DVGxYGkx.js.map} +1 -1
  124. package/dist/chunks/{use-cached-selected-values.FoXcm49J.js → use-cached-selected-values.nu4EL9kL.js} +2 -2
  125. package/dist/chunks/{use-cached-selected-values.FoXcm49J.js.map → use-cached-selected-values.nu4EL9kL.js.map} +1 -1
  126. package/dist/code-snippet.js +1 -1
  127. package/dist/dashboard-template.js +1 -1
  128. package/dist/dashed-underline.js +1 -1
  129. package/dist/data-grid-template.js +1 -1
  130. package/dist/data-grid.js +1 -1
  131. package/dist/date-picker.js +1 -1
  132. package/dist/date-range-picker.js +1 -1
  133. package/dist/dropdown.js +3 -3
  134. package/dist/file-uploader.js +1 -1
  135. package/dist/filter-bar.js +1 -1
  136. package/dist/focus-trap.js +1 -1
  137. package/dist/header-with-views.js +1 -1
  138. package/dist/header.js +1 -1
  139. package/dist/index.js +359 -396
  140. package/dist/index.js.map +1 -1
  141. package/dist/info-icon.js +1 -1
  142. package/dist/input-field-password.js +1 -1
  143. package/dist/input-field-phone-number.js +1 -1
  144. package/dist/input-field.js +1 -1
  145. package/dist/inspector.js +1 -1
  146. package/dist/internal.js +9 -9
  147. package/dist/menu.js +1 -1
  148. package/dist/modal-fullscreen.js +1 -1
  149. package/dist/modal.js +2 -2
  150. package/dist/pagination.js +1 -1
  151. package/dist/popover.js +2 -2
  152. package/dist/popper-container.js +1 -1
  153. package/dist/radio-group.js +1 -1
  154. package/dist/rich-text-editor.js +1 -1
  155. package/dist/search-bar.js +2 -2
  156. package/dist/secondary-nav.js +1 -1
  157. package/dist/segmented-control.js +1 -1
  158. package/dist/selection-card.js +1 -1
  159. package/dist/sidepanel.js +1 -1
  160. package/dist/structured-list.js +1 -1
  161. package/dist/styles/bento-dark.css +4 -0
  162. package/dist/styles/bento-light.css +4 -0
  163. package/dist/styles/bento.css +4 -0
  164. package/dist/styles/legacy.css +4 -0
  165. package/dist/styles/styleguide.css +4 -0
  166. package/dist/summary-grid.js +1 -1
  167. package/dist/tag.js +1 -1
  168. package/dist/textarea.js +1 -1
  169. package/dist/timeline.js +1 -1
  170. package/dist/tutorial.js +1 -1
  171. package/dist/web-types.json +362 -145
  172. package/package.json +3 -3
  173. package/dist/chunks/data-grid.C8gSMQ0A.js.map +0 -1
  174. package/dist/chunks/date-picker.Dvx50znw.js.map +0 -1
  175. package/dist/chunks/filter-bar.DpjD5bZe.js +0 -2277
  176. package/dist/chunks/filter-bar.DpjD5bZe.js.map +0 -1
  177. package/dist/chunks/focus-trap.BJfpIboH.js.map +0 -1
  178. package/dist/chunks/popover.types.DK6opPkz.js +0 -6
  179. package/dist/chunks/timeline-item.D2HsuNh-.js +0 -375
  180. package/dist/chunks/timeline-item.D2HsuNh-.js.map +0 -1
@@ -1,2277 +0,0 @@
1
- import { defineComponent as N, useSlots as de, useAttrs as et, computed as r, ref as x, watch as Y, nextTick as Ee, toRef as H, onBeforeUpdate as pe, provide as Oe, reactive as tt, onMounted as xe } from "vue";
2
- import { B as lt } from "./radio-group.BTu23ZgN.js";
3
- import { u as Z } from "./index.B6WW_F-J.js";
4
- import { t as le } from "./truncate.BfIl_-71.js";
5
- import { u as at, g as nt, I as ot, h as st, B as it } from "./button-actions.C3cP-anb.js";
6
- import { b as rt } from "./tooltip.Dt87KVh2.js";
7
- import { n as V } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
8
- import { g as ve } from "./generate-uid.NJ8tVoha.js";
9
- import { B as Re } from "./teleport.dQFcCuAw.js";
10
- import { C as ut } from "./cross-small.CoQUe8SS.js";
11
- import { B as Ue, a as ge } from "./base-button.Cv-1788W.js";
12
- import { B as ue, d as _e } from "./typography.hlOAxsEn.js";
13
- import { u as $e } from "./use-has-slot.C9lQZ6nz.js";
14
- import { u as ke } from "./aria-label.CaUURpnB.js";
15
- import { g as we } from "./get-slot-text.Bjb9dTSV.js";
16
- import { B as ye } from "./input-field.C4XJ53Cn.js";
17
- import { B as me, b as oe } from "./search-bar.BcHoTrjP.js";
18
- import "./index.Cl4_42j5.js";
19
- import { k as ct } from "./index.BDK4hwK_.js";
20
- import { F as Ve } from "./fixed-scroller.CgVOf5VE.js";
21
- import { B as dt } from "./modal.D3OSxMF6.js";
22
- import { B as pt } from "./button.CS_kdxYh.js";
23
- import { u as Fe, B as ft } from "./dropdown.BpT6ct8O.js";
24
- import { g as bt } from "./focus-trap.BJfpIboH.js";
25
- import { C as vt } from "./chevron-up.d8cwIlA_.js";
26
- import { C as _t } from "./chevron-down.eYtgv5ly.js";
27
- /* empty css */
28
- import { B as he } from "./divider.DX5gwN7p.js";
29
- import { c as Ce, b as yt } from "./use-cached-selected-values.FoXcm49J.js";
30
- import { L as Ne } from "./listbox-option-tag.B94BtpSU.js";
31
- import { B as mt } from "./payment-method.C8Ie97qE.js";
32
- import { u as Ft } from "./use-country-items.B3Cd3Tdo.js";
33
- import { B as ht } from "./avatar.CeDqq2Z-.js";
34
- import { D as St, B as Bt, i as fe, a as gt } from "./date-range-picker.DYYyE_e2.js";
35
- import { g as Me } from "./differenceInMonths.Cab3nOsb.js";
36
- import { D as De } from "./date-format.B8RU7D42.js";
37
- import { b as Ct, f as ee, i as Dt } from "./calendar.Bhj58zR3.js";
38
- import { B as At } from "./date-picker.Dvx50znw.js";
39
- import { R as Tt } from "./refresh.arF7jP-l.js";
40
- import { u as Pt } from "./use-bento-toast-controller.BhtohoS1.js";
41
- import "../assets/filter-bar.css";
42
- const It = {}, Lt = /* @__PURE__ */ N({
43
- ...It,
44
- __name: "filter-bar-button",
45
- props: {
46
- /**
47
- * The number of applied values within the filter.
48
- * Text can also be applied here such as 'All'.
49
- * e.g. if 2 items in a dropdown filter have been applied, the number 2 will be shown here.
50
- */
51
- appliedFiltersCount: { type: [String, Number], default: null },
52
- /**
53
- * Disables button functionality.
54
- */
55
- disabled: { type: Boolean, default: !1 },
56
- /**
57
- * Signifies if the filter is open or closed.
58
- */
59
- isFilterOpen: { type: Boolean, default: !1 },
60
- /**
61
- * Signifies if the filter is a persistent filter
62
- */
63
- isPersistentFilter: { type: Boolean, default: !1 },
64
- /**
65
- * Renders the button without the applied state styles
66
- */
67
- noAppliedStateStyles: { type: Boolean, default: !1 },
68
- /**
69
- * A secondary label to be added next to the primary for additional filtering information.
70
- * i.e. Can be used to show the set value for said filter.
71
- */
72
- secondaryLabel: { type: String, default: null }
73
- },
74
- emits: ["click"],
75
- setup(a, { emit: e }) {
76
- const t = a, l = de(), n = et(), o = $e(l), s = r(() => l.default ? we(l)("default") : null), u = r(() => !o("default") && o("iconLeft")), c = ke({ ariaLabel: s }), d = x(null), _ = r(() => {
77
- var m;
78
- return {
79
- "aria-controls": (m = n["aria-controls"]) == null ? void 0 : m.toString()
80
- };
81
- }), h = r(
82
- () => (t.appliedFiltersCount || t.secondaryLabel || t.isPersistentFilter) && !t.noAppliedStateStyles
83
- ), b = r(() => ({
84
- "b-filter-bar-button--applied": h.value,
85
- "b-filter-bar-button--filter-open": t.isFilterOpen && !h.value,
86
- "b-filter-bar-button--filter-open-applied": t.isFilterOpen && h.value,
87
- "b-filter-bar-button--with-secondary-label": t.secondaryLabel,
88
- "b-filter-bar-button--with-counter": t.appliedFiltersCount,
89
- "b-filter-bar-button--icon-only": u.value
90
- }));
91
- return { __sfc: !0, props: t, emit: e, slots: l, attrs: n, hasSlot: o, labelSlot: s, isIconOnly: u, computedAriaLabel: c, filterBarButtonRef: d, ariaAttributes: _, isAppliedFilter: h, conditionalClasses: b, onClickButton: (m) => {
92
- m.preventDefault(), t.disabled || e("click", m);
93
- }, BaseButton: Ue, BentoTypography: ue };
94
- }
95
- });
96
- var Et = function() {
97
- var e = this, t = e._self._c, l = e._self._setupProxy;
98
- return t(l.BaseButton, { ref: "filterBarButtonRef", staticClass: "b-filter-bar-button", class: l.conditionalClasses, attrs: { disabled: e.disabled, "aria-label": l.computedAriaLabel, "aria-controls": l.ariaAttributes["aria-controls"], type: "button" }, on: { click: l.onClickButton }, scopedSlots: e._u([{ key: "iconRight", fn: function() {
99
- return [e.appliedFiltersCount && !l.isIconOnly ? t(l.BentoTypography, { staticClass: "b-filter-bar-button__counter", attrs: { el: "span", variant: "body", stronger: "" } }, [e._v(" " + e._s(e.appliedFiltersCount) + " ")]) : e._e()];
100
- }, proxy: !0 }]) }, [t("div", { staticClass: "b-filter-bar-button__container" }, [l.hasSlot("iconLeft") ? [e._t("iconLeft")] : e._e(), t("div", { staticClass: "b-filter-bar-button__label-container" }, [t(l.BentoTypography, { staticClass: "b-filter-bar-button__label", attrs: { el: "span", variant: "body", stronger: "" } }, [t("span", [e._t("default")], 2), e.secondaryLabel && !l.isIconOnly ? t(l.BentoTypography, { staticClass: "b-filter-bar-button__label", attrs: { el: "span", variant: "body", stronger: "" } }, [e._v(":")]) : e._e()], 1), e.secondaryLabel && !l.isIconOnly ? t(l.BentoTypography, { staticClass: "b-filter-bar-button__secondary-label", attrs: { el: "span", variant: "body", stronger: "" } }, [e._v(" " + e._s(e.secondaryLabel) + " ")]) : e._e()], 1)], 2)]);
101
- }, Ot = [], xt = /* @__PURE__ */ V(
102
- Lt,
103
- Et,
104
- Ot,
105
- !1,
106
- null,
107
- "a64471d2"
108
- );
109
- const Se = xt.exports, Rt = {}, Ut = /* @__PURE__ */ N({
110
- ...Rt,
111
- __name: "filter-bar-button-group",
112
- props: {
113
- isActive: { type: Boolean, default: !1 },
114
- skipGrouping: { type: Boolean, default: !1 }
115
- },
116
- setup(a) {
117
- const e = a, t = r(() => ({
118
- "b-filter-bar-button-group--active": e.isActive,
119
- "b-filter-bar-button-group--grouped": !e.skipGrouping
120
- }));
121
- return { __sfc: !0, props: e, conditionalClasses: t };
122
- }
123
- });
124
- var $t = function() {
125
- var e = this, t = e._self._c, l = e._self._setupProxy;
126
- return t("div", { staticClass: "b-filter-bar-button-group", class: l.conditionalClasses }, [e._t("default")], 2);
127
- }, kt = [], wt = /* @__PURE__ */ V(
128
- Ut,
129
- $t,
130
- kt,
131
- !1,
132
- null,
133
- "c0b008f0"
134
- );
135
- const Vt = wt.exports;
136
- var J = /* @__PURE__ */ ((a) => (a.APPLY = "apply", a.CLEAR = "clear", a.OPEN = "open", a.CLOSE = "close", a.RESET = "reset", a.CANCEL = "cancel", a))(J || {});
137
- const Nt = {
138
- "en-US": {
139
- apply: "Apply",
140
- clear: "Clear",
141
- clearFilter: "Clear filter {function}",
142
- filtersHaveBeenCleared: "Filters have been cleared",
143
- numberSelected: "{numberOfItemsSelected} selected",
144
- reset: "Reset",
145
- resetFilter: "Reset filter {function}"
146
- },
147
- "ja-JP": {
148
- apply: "適用",
149
- clear: "クリア",
150
- reset: "リセット"
151
- },
152
- "pt-BR": {
153
- apply: "Aplicar",
154
- clear: "Limpar",
155
- reset: "Reiniciar"
156
- }
157
- }, Mt = {
158
- i18n: { messages: Nt },
159
- name: "bento-base-filter"
160
- }, Ht = /* @__PURE__ */ N({
161
- ...Mt,
162
- props: {
163
- appliedFiltersCount: { default: null },
164
- buttonLabel: { default: void 0 },
165
- buttonSecondaryLabel: { default: void 0 },
166
- disabled: { type: Boolean, default: !1 },
167
- defaultValue: { default: null },
168
- onlySlot: { type: Boolean, default: !1 },
169
- controlled: { type: Boolean, default: !1 },
170
- disableApplyButton: { type: Boolean, default: !1 },
171
- disableSecondaryButton: { type: Boolean, default: !1 },
172
- field: null,
173
- label: null,
174
- fitContent: { type: Boolean, default: void 0 },
175
- tooltipText: { default: void 0 },
176
- tooltipPosition: { default: void 0 },
177
- value: { default: void 0 }
178
- },
179
- emits: [
180
- J.APPLY,
181
- J.CLEAR,
182
- J.OPEN,
183
- J.CLOSE,
184
- J.RESET,
185
- J.CANCEL
186
- ],
187
- setup(a, { expose: e, emit: t }) {
188
- const l = a, { t: n } = Z(), o = ve("base-filter-popover"), s = x(!1), u = x(null), c = x(null), d = r(() => l.defaultValue !== null), _ = r(() => d.value ? JSON.stringify(l.value) !== JSON.stringify(l.defaultValue) : l.appliedFiltersCount || l.buttonSecondaryLabel), h = r(() => {
189
- let L = l.buttonSecondaryLabel ? `: ${l.buttonSecondaryLabel}` : "";
190
- return l.appliedFiltersCount && (L = `: ${n("numberSelected", { numberOfItemsSelected: l.appliedFiltersCount })}`), (d.value ? l.label : A.value) + L;
191
- }), b = r(
192
- () => d.value ? n("resetFilter", {
193
- function: A.value
194
- }) : n("clearFilter", {
195
- function: A.value
196
- })
197
- ), A = r(() => l.buttonLabel || l.label), m = async () => {
198
- var L, g;
199
- await Ee(), (g = (L = u.value) == null ? void 0 : L.$el) == null || g.focus();
200
- }, D = () => {
201
- s.value && (s.value = !1, m(), t(J.CLOSE));
202
- }, P = () => {
203
- d.value ? t(J.RESET) : t(J.CLEAR), m();
204
- }, U = () => {
205
- D(), P();
206
- }, $ = () => {
207
- s.value ? D() : (s.value = !0, t(J.OPEN));
208
- }, C = () => {
209
- D(), t(J.APPLY);
210
- }, S = () => {
211
- D(), t(J.CANCEL);
212
- }, E = () => S(), I = r(() => [
213
- {
214
- title: n("apply"),
215
- event: C,
216
- disabled: l.disableApplyButton
217
- },
218
- {
219
- title: d.value ? n("reset") : n("clear"),
220
- event: U,
221
- disabled: l.disableSecondaryButton
222
- }
223
- ]);
224
- return Y(
225
- () => s.value,
226
- (L, g) => {
227
- var k, j;
228
- !L && g && (j = (k = u.value) == null ? void 0 : k.filterBarButtonRef) != null && j.bentoBaseButtonRef && u.value.filterBarButtonRef.bentoBaseButtonRef.focus();
229
- }
230
- ), at(c, E, { ignore: [u] }), e({
231
- closePopover: D
232
- }), { __sfc: !0, emit: t, props: l, t: n, popoverId: o, isFilterOpen: s, filterButtonRef: u, popoverRef: c, isPersistentFilter: d, isValueChanged: _, computedAriaLabel: h, computedClearButtonLabel: b, computedButtonText: A, resetFocus: m, closePopover: D, resetFilter: P, onClickSecondaryAction: U, onClickFilter: $, onClickApply: C, onCancel: S, onClickOutside: E, actions: I, BentoPopover: nt, vBentoTooltipDirective: rt, FilterBarButton: Se, FilterBarButtonGroup: Vt, BentoTeleport: Re, CrossSmallIcon: ut };
233
- }
234
- });
235
- var jt = function() {
236
- var e = this, t = e._self._c, l = e._self._setupProxy;
237
- return e.onlySlot ? t("div", [e._t("default")], 2) : t("div", { staticClass: "b-base-filter" }, [t(l.FilterBarButtonGroup, { directives: [{ name: "bento-tooltip-directive", rawName: "v-bento-tooltip-directive:[tooltipPosition]", value: e.tooltipText, expression: "tooltipText", arg: e.tooltipPosition }], attrs: { "is-active": l.isFilterOpen, "skip-grouping": !l.isValueChanged } }, [t(l.FilterBarButton, { ref: "filterButtonRef", attrs: { "aria-label": l.computedAriaLabel, "aria-controls": l.isFilterOpen ? l.popoverId : null, "applied-filters-count": e.appliedFiltersCount, disabled: e.disabled, "is-persistent-filter": l.isPersistentFilter, "is-filter-open": l.isFilterOpen, "secondary-label": e.buttonSecondaryLabel }, on: { click: l.onClickFilter, keydown: function(n) {
238
- return !n.type.indexOf("key") && e._k(n.keyCode, "esc", 27, n.key, ["Esc", "Escape"]) ? null : l.closePopover.apply(null, arguments);
239
- } } }, [e._v(" " + e._s(l.computedButtonText) + " ")]), l.isValueChanged ? t(l.FilterBarButton, { attrs: { "applied-filters-count": e.appliedFiltersCount, disabled: e.disabled, "is-persistent-filter": l.isPersistentFilter, "is-filter-open": l.isFilterOpen, "secondary-label": e.buttonSecondaryLabel }, on: { click: l.resetFilter }, scopedSlots: e._u([{ key: "iconLeft", fn: function() {
240
- return [t(l.CrossSmallIcon, { attrs: { "svg-title": l.computedClearButtonLabel } })];
241
- }, proxy: !0 }], null, !1, 892273033) }) : e._e()], 1), l.filterButtonRef ? t(l.BentoTeleport, [l.filterButtonRef ? t(l.BentoPopover, { ref: "popoverRef", staticClass: "b-base-filter__popover", attrs: { id: l.popoverId, divider: "", open: l.isFilterOpen, actions: e.controlled ? null : l.actions, "actions-layout": "space-between", "target-element": l.filterButtonRef, title: e.controlled ? null : e.label, "fit-content": e.fitContent, position: "bottom-start", "without-space": e.controlled, "fallback-position": ["bottom-end"], "overflow-visible": "" } }, [t("div", { on: { keydown: function(n) {
242
- return !n.type.indexOf("key") && e._k(n.keyCode, "esc", 27, n.key, ["Esc", "Escape"]) ? null : l.onCancel.apply(null, arguments);
243
- } } }, [e._t("default")], 2)]) : e._e()], 1) : e._e()], 1);
244
- }, qt = [], Jt = /* @__PURE__ */ V(
245
- Ht,
246
- jt,
247
- qt,
248
- !1,
249
- null,
250
- "83cb499e"
251
- );
252
- const ae = Jt.exports, Yt = (a) => a instanceof Array, Ae = (a) => Yt(a) ? a.length === 0 || a.every((e) => e === "") : !a, Te = (a, e) => JSON.stringify(a) === JSON.stringify(e), Q = (a, e) => {
253
- const t = x(a.value);
254
- Y(
255
- () => a.value,
256
- () => {
257
- t.value = a.value;
258
- }
259
- );
260
- const l = r(() => Ae(a.value)), n = r(
261
- () => e.value !== null ? Te(e.value, a.value) : l.value
262
- ), o = r(() => Te(t.value, a.value) || Ae(t.value) && l.value);
263
- return {
264
- internalFilterValue: t,
265
- isSecondaryButtonDisabled: n,
266
- isApplyButtonDisabled: o
267
- };
268
- }, zt = {
269
- name: "bento-input-filter"
270
- }, Gt = /* @__PURE__ */ N({
271
- ...zt,
272
- props: {
273
- defaultValue: { default: null },
274
- disabled: { type: Boolean, default: !1 },
275
- field: null,
276
- label: null,
277
- onlySlot: { type: Boolean, default: !1 },
278
- options: { default: void 0 },
279
- value: { default: null }
280
- },
281
- emits: ["input", "update"],
282
- setup(a, { emit: e }) {
283
- var I, L;
284
- const t = a, l = x(null), n = x((L = (I = t == null ? void 0 : t.options) == null ? void 0 : I.dropdown) == null ? void 0 : L.value), o = r(
285
- () => {
286
- var g, k;
287
- return ((g = t == null ? void 0 : t.options) == null ? void 0 : g.variant) === "dropdown" && ((k = t == null ? void 0 : t.options) == null ? void 0 : k.dropdown) !== void 0;
288
- }
289
- ), s = r(
290
- () => {
291
- var g;
292
- return o.value ? { ...(g = t == null ? void 0 : t.options) == null ? void 0 : g.dropdown, value: n.value } : void 0;
293
- }
294
- ), u = r(() => {
295
- var g;
296
- return ((g = t == null ? void 0 : t.options) == null ? void 0 : g.variant) === "dropdown" ? "dropdown" : "default";
297
- }), c = r(
298
- () => {
299
- var g;
300
- return o.value ? (g = t.value) == null ? void 0 : g.inputValue : t == null ? void 0 : t.value;
301
- }
302
- ), { internalFilterValue: d, isSecondaryButtonDisabled: _, isApplyButtonDisabled: h } = Q(
303
- c,
304
- H(t, "defaultValue")
305
- ), b = r(() => t.label), A = r(() => le(c.value, 12)), m = r(() => ({
306
- "b-input-filter--only-slot": t.onlySlot
307
- }));
308
- pe(() => {
309
- d.value === "" && (d.value = null);
310
- }), Y(l, () => {
311
- var g;
312
- (g = l.value) == null || g.focusInput();
313
- });
314
- const D = () => {
315
- d.value = c.value;
316
- }, P = () => {
317
- !d.value && t.defaultValue !== null && (d.value = t.defaultValue), e("update", {
318
- ...t,
319
- value: o.value ? {
320
- inputValue: d.value,
321
- dropdownValue: n.value
322
- } : d.value
323
- });
324
- }, U = () => e("update", { ...t, value: t.defaultValue }), $ = () => {
325
- d.value = null, P();
326
- }, C = () => {
327
- e("input", { ...t, value: d.value });
328
- }, S = (g) => {
329
- d.value = g;
330
- }, E = (g) => {
331
- n.value = g;
332
- };
333
- return Oe(ot, o.value), Y(
334
- () => t.options,
335
- () => {
336
- var g, k, j;
337
- ((g = t.options) != null && g.dropdown || (k = t.options) != null && k.dropdownPosition || (j = t.options) != null && j.variant) && _e(
338
- 'BentoInputFilter "options" property',
339
- `BentoInputFilter "options" no longer supports "dropdown", "dropdownPosition" or "variant" attributes.
340
- Use the "BentoFilterItemType.INPUT_DROPDOWN" instead of "BentoFilterItemType.INPUT"
341
- <bento-filter-bar
342
- :config="[{
343
- field: 'name',
344
- label: 'Name',
345
- type: BentoFilterItemType.INPUT_DROPDOWN,
346
- options: [...],
347
- }]"
348
- />`,
349
- "2.0.0"
350
- );
351
- },
352
- { immediate: !0 }
353
- ), { __sfc: !0, props: t, emit: e, inputTextRef: l, dropdownValue: n, isDropdownVariant: o, dropdownProp: s, inputVariant: u, valueProp: c, internalFilterValue: d, isSecondaryButtonDisabled: _, isApplyButtonDisabled: h, buttonLabel: b, buttonSecondaryLabel: A, conditionalClasses: m, openFilter: D, updateFilter: P, resetFilter: U, clearFilter: $, onInput: C, setInternalFilterValue: S, onDropdownInput: E, BentoBaseFilter: ae, BentoInputField: ye };
354
- }
355
- });
356
- var Wt = function() {
357
- var n, o, s, u;
358
- var e = this, t = e._self._c, l = e._self._setupProxy;
359
- return t(l.BentoBaseFilter, e._b({ attrs: { "button-label": l.buttonLabel, "button-secondary-label": l.buttonSecondaryLabel, "disable-apply-button": l.isApplyButtonDisabled, "disable-secondary-button": l.isSecondaryButtonDisabled, "only-slot": e.onlySlot, "popover-overflow-visible": l.isDropdownVariant, "tooltip-position": (n = e.options) == null ? void 0 : n.tooltipPosition, "tooltip-text": (o = e.options) == null ? void 0 : o.tooltipText }, on: { apply: l.updateFilter, clear: l.clearFilter, open: l.openFilter, reset: l.resetFilter } }, "bento-base-filter", e.$props, !1), [t("div", { staticClass: "b-input-filter", class: l.conditionalClasses, on: { keydown: function(c) {
360
- return !c.type.indexOf("key") && e._k(c.keyCode, "enter", 13, c.key, "Enter") ? null : l.updateFilter.apply(null, arguments);
361
- }, input: l.onInput } }, [t(l.BentoInputField, { ref: "inputTextRef", attrs: { dropdown: l.dropdownProp, "dropdown-position": (s = e.options) == null ? void 0 : s.dropdownPosition, placeholder: (u = e.options) == null ? void 0 : u.placeholder, variant: l.inputVariant, "model-value": l.internalFilterValue, disabled: e.disabled }, on: { "update:model-value": l.setInternalFilterValue, "dropdown-input": l.onDropdownInput } })], 1)]);
362
- }, Kt = [], Zt = /* @__PURE__ */ V(
363
- Gt,
364
- Wt,
365
- Kt,
366
- !1,
367
- null,
368
- "72e86cb6"
369
- );
370
- const He = Zt.exports;
371
- var F = /* @__PURE__ */ ((a) => (a.INPUT = "input", a.UPDATE = "update", a))(F || {}), te = /* @__PURE__ */ ((a) => (a.INPUT = "input", a.UPDATE_FILTER_VALUES_OBJECT = "update:filter-values-object", a.UPDATE_FILTER_VALUES_ARRAY = "update:filter-values", a))(te || {}), W = /* @__PURE__ */ ((a) => (a.BOOLEAN = "BentoBooleanFilter", a.RANGE = "BentoRangeFilter", a.INPUT = "BentoInputFilter", a.INPUT_DROPDOWN = "BentoInputWithDropdownFilter", a.SELECT = "BentoSelectFilter", a.SELECT_AVATAR = "BentoSelectAvatarFilter", a.SELECT_COUNTRY = "BentoSelectCountryFilter", a.SELECT_CURRENCY = "BentoSelectCurrencyFilter", a.SELECT_PAYMENT_METHOD = "BentoSelectPaymentMethodFilter", a.SELECT_TAG = "BentoSelectTagFilter", a.DATE = "BentoDateFilter", a.DATE_RANGE = "BentoDateRangeFilter", a))(W || {});
372
- const Qt = {
373
- name: "bento-input-with-dropdown-filter"
374
- }, Xt = /* @__PURE__ */ N({
375
- ...Qt,
376
- props: {
377
- disabled: { type: Boolean },
378
- defaultValue: { default: void 0 },
379
- field: null,
380
- label: null,
381
- onlySlot: { type: Boolean, default: !1 },
382
- options: { default: void 0 },
383
- value: { default: void 0 }
384
- },
385
- emits: [F.INPUT, F.UPDATE],
386
- setup(a, { emit: e }) {
387
- const t = a, l = x(null), { internalFilterValue: n, isSecondaryButtonDisabled: o, isApplyButtonDisabled: s } = Q(H(t, "value"), H(t, "defaultValue")), u = r(() => t.label), c = r(() => {
388
- var S;
389
- return le((S = t.value) == null ? void 0 : S.inputValue, 12);
390
- }), d = r(
391
- () => {
392
- var S, E, I, L, g;
393
- return ((S = n.value) == null ? void 0 : S.dropdownValue) ?? ((I = (E = t.options) == null ? void 0 : E.dropdown) == null ? void 0 : I.modelValue) ?? ((g = (L = t.options) == null ? void 0 : L.dropdown) == null ? void 0 : g.value);
394
- }
395
- ), _ = r(() => {
396
- var S;
397
- return {
398
- ...((S = t.options) == null ? void 0 : S.dropdown) || {},
399
- modelValue: d.value
400
- };
401
- }), h = r(() => ({
402
- "b-input-with-dropdown-filter--only-slot": t.onlySlot
403
- })), b = r(() => {
404
- var E;
405
- return !(!!((E = n.value) != null && E.inputValue) && !!d.value) || s.value;
406
- });
407
- pe(() => {
408
- var S;
409
- ((S = n.value) == null ? void 0 : S.inputValue) === "" && (n.value = { ...n.value, inputValue: void 0 });
410
- }), Y(l, () => {
411
- var S;
412
- (S = l.value) == null || S.focusInput();
413
- });
414
- const A = () => {
415
- n.value = t.value;
416
- }, m = () => {
417
- var S;
418
- !((S = n.value) != null && S.inputValue) && t.defaultValue !== null && (n.value = { ...t.defaultValue }), e(F.UPDATE, {
419
- ...t,
420
- value: n.value
421
- });
422
- }, D = () => e(F.UPDATE, { ...t, value: t.defaultValue }), P = () => {
423
- n.value = null, m();
424
- }, U = () => {
425
- e(F.INPUT, { ...t, value: n.value });
426
- }, $ = (S) => {
427
- n.value = { dropdownValue: d.value, inputValue: S };
428
- }, C = (S) => {
429
- n.value = { ...n.value, dropdownValue: S };
430
- };
431
- return Oe(st, !0), { __sfc: !0, props: t, emit: e, inputTextRef: l, internalFilterValue: n, isSecondaryButtonDisabled: o, isApplyButtonDisabled: s, buttonLabel: u, buttonSecondaryLabel: c, dropdownSelection: d, dropdownOptions: _, conditionalClasses: h, shouldDisableApply: b, openFilter: A, updateFilter: m, resetFilter: D, clearFilter: P, onInput: U, setInternalFilterValue: $, onDropdownInput: C, BentoBaseFilter: ae, BentoInputField: ye };
432
- }
433
- });
434
- var el = function() {
435
- var n, o, s, u;
436
- var e = this, t = e._self._c, l = e._self._setupProxy;
437
- return t(l.BentoBaseFilter, e._b({ attrs: { "button-label": l.buttonLabel, "button-secondary-label": l.buttonSecondaryLabel, "disable-apply-button": l.shouldDisableApply, "disable-secondary-button": l.isSecondaryButtonDisabled, "only-slot": e.onlySlot, "tooltip-position": (n = e.options) == null ? void 0 : n.tooltipPosition, "tooltip-text": (o = e.options) == null ? void 0 : o.tooltipText }, on: { apply: l.updateFilter, clear: l.clearFilter, open: l.openFilter, reset: l.resetFilter } }, "bento-base-filter", e.$props, !1), [t("div", { staticClass: "b-input-with-dropdown-filter", class: l.conditionalClasses, on: { keydown: function(c) {
438
- return !c.type.indexOf("key") && e._k(c.keyCode, "enter", 13, c.key, "Enter") ? null : l.updateFilter.apply(null, arguments);
439
- }, input: l.onInput } }, [t(l.BentoInputField, { ref: "inputTextRef", attrs: { dropdown: l.dropdownOptions, "dropdown-position": (s = e.options) == null ? void 0 : s.dropdownPosition, variant: "dropdown", "model-value": (u = l.internalFilterValue) == null ? void 0 : u.inputValue, disabled: e.disabled }, on: { "update:model-value": l.setInternalFilterValue, "dropdown-input": l.onDropdownInput } })], 1)]);
440
- }, tl = [], ll = /* @__PURE__ */ V(
441
- Xt,
442
- el,
443
- tl,
444
- !1,
445
- null,
446
- "f2603e12"
447
- );
448
- const je = ll.exports, al = N({
449
- name: "bento-date-filter",
450
- components: {
451
- BentoBaseFilter: ae,
452
- BentoDatePicker: At,
453
- BentoDivider: he,
454
- Calendar: Ct
455
- },
456
- props: {
457
- /**
458
- * Disables the filter from being interacted with.
459
- */
460
- disabled: { type: Boolean, default: !1 },
461
- isDateInput: { type: Boolean, default: !0 },
462
- /**
463
- * Default value of the filter to reset to.
464
- */
465
- defaultValue: { type: Date, default: null },
466
- /**
467
- * Filter name/key referencing the actual property name in the data set.
468
- * Should be unique per filter bar.
469
- */
470
- field: { type: String, required: !0 },
471
- /**
472
- * Label text to be displayed
473
- */
474
- label: { type: String, required: !0 },
475
- /**
476
- * Renders the base filter's slot content only - leaving out the button and the popover.
477
- * Used for the allFiltersModal component.
478
- */
479
- onlySlot: { type: Boolean, default: !1 },
480
- /**
481
- * List of options that are needed to setup the filter
482
- * Available options:
483
- * - firstDayOfWeek: Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
484
- * - isDateDisabled: Indicate if a date should be disabled or not
485
- * - tooltipPosition: The position of the tooltip attached to the filter button
486
- * - tooltipText: The content of the tooltip attached to the filter button
487
- */
488
- options: {
489
- type: Object,
490
- default: void 0
491
- },
492
- /**
493
- * Current value of the filter
494
- */
495
- value: { type: Date, default: void 0 }
496
- },
497
- emits: [F.INPUT, F.UPDATE],
498
- setup(a, { emit: e }) {
499
- const { locale: t } = Z(void 0, !0), l = Me(), { internalFilterValue: n, isSecondaryButtonDisabled: o, isApplyButtonDisabled: s } = Q(
500
- H(a, "value"),
501
- H(a, "defaultValue")
502
- ), u = r(
503
- () => {
504
- var P;
505
- return a.value ? ee(a.value, "dd MMM, yyyy", {
506
- locale: l[(P = t.value) == null ? void 0 : P.substring(0, 2)] || l.enUS
507
- }) : null;
508
- }
509
- ), c = r(() => a.label), d = r(() => u.value), _ = () => {
510
- e(F.UPDATE, { ...a, value: n.value });
511
- }, h = () => {
512
- n.value = null, _();
513
- }, b = () => {
514
- n.value = a.defaultValue, _();
515
- }, A = () => {
516
- n.value = a.value;
517
- }, m = (P) => {
518
- n.value = P, e(F.INPUT, { ...a, value: n.value });
519
- };
520
- return {
521
- // Values
522
- internalFilterValue: n,
523
- isApplyButtonDisabled: s,
524
- isSecondaryButtonDisabled: o,
525
- buttonLabel: c,
526
- buttonSecondaryLabel: d,
527
- // Events
528
- clearFilter: h,
529
- onDateSelected: m,
530
- openFilter: A,
531
- updateFilter: _,
532
- resetFilter: b,
533
- onDateInputSelected: (P) => {
534
- n.value = P, m(P), _();
535
- }
536
- };
537
- }
538
- });
539
- var nl = function() {
540
- var l, n, o, s, u, c, d, _;
541
- var e = this, t = e._self._c;
542
- return e._self._setupProxy, t("bento-base-filter", { attrs: { "button-label": e.buttonLabel, "button-secondary-label": e.buttonSecondaryLabel, disabled: e.disabled, "default-value": e.defaultValue, "disable-apply-button": e.isApplyButtonDisabled, "disable-secondary-button": e.isSecondaryButtonDisabled, field: e.field, label: e.label, "only-slot": e.onlySlot, "tooltip-position": (l = e.options) == null ? void 0 : l.tooltipPosition, "tooltip-text": (n = e.options) == null ? void 0 : n.tooltipText, "fit-content": "" }, on: { apply: e.updateFilter, clear: e.clearFilter, open: e.openFilter, reset: e.resetFilter } }, [e.onlySlot ? t("bento-date-picker", { attrs: { value: e.internalFilterValue, "first-day-of-week": (o = e.options) == null ? void 0 : o.firstDayOfWeek, "is-date-disabled": (s = e.options) == null ? void 0 : s.isDateDisabled, variant: (u = e.options) == null ? void 0 : u.variant, disabled: e.disabled }, on: { input: e.onDateInputSelected } }) : [t("bento-divider", { staticClass: "b-date-filter__divider" }), t("div", { staticClass: "b-date-filter" }, [t("calendar", { attrs: { "first-day-of-week": (c = e.options) == null ? void 0 : c.firstDayOfWeek, "is-date-disabled": (d = e.options) == null ? void 0 : d.isDateDisabled, "number-of-months": 1, value: e.internalFilterValue, variant: (_ = e.options) == null ? void 0 : _.variant }, on: { input: e.onDateSelected } })], 1)]], 2);
543
- }, ol = [], sl = /* @__PURE__ */ V(
544
- al,
545
- nl,
546
- ol,
547
- !1,
548
- null,
549
- "9422876d"
550
- );
551
- const qe = sl.exports, il = {
552
- "en-US": {
553
- apply: "Apply",
554
- clear: "Clear",
555
- reset: "Reset"
556
- },
557
- "ja-JP": {
558
- apply: "適用",
559
- clear: "クリア",
560
- reset: "リセット"
561
- },
562
- "pt-BR": {
563
- apply: "Aplicar",
564
- clear: "Limpar",
565
- reset: "Reiniciar"
566
- }
567
- }, rl = N({
568
- i18n: { messages: il },
569
- name: "bento-date-range-filter",
570
- components: {
571
- BentoBaseFilter: ae,
572
- BentoButtonActions: it,
573
- BentoDateRangePicker: Bt,
574
- BentoTypography: ue,
575
- BentoDivider: he,
576
- DateRangePickerCalendar: St
577
- },
578
- props: {
579
- /**
580
- * Disables the filter from being interacted with.
581
- */
582
- disabled: { type: Boolean, default: !1 },
583
- /**
584
- * Default value of the filter to reset to.
585
- */
586
- defaultValue: { type: Object, default: null },
587
- /**
588
- * Filter name/key referencing the actual property name in the data set.
589
- * Should be unique per filter bar.
590
- */
591
- field: { type: String, required: !0 },
592
- /**
593
- * Label text to be displayed
594
- */
595
- label: { type: String, required: !0 },
596
- /**
597
- * Renders the base filter's slot content only - leaving out the button and the popover.
598
- * Used for the allFiltersModal component.
599
- */
600
- onlySlot: { type: Boolean, default: !1 },
601
- /**
602
- * List of options that are needed to setup the filter
603
- * Available options:
604
- * - allowTimeInput: Allows user to enter time values in the form
605
- * - firstDayOfWeek: Allows user to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
606
- * - isDateDisabled: Indicate if a date should be disabled or not
607
- * - maxRange: Set a maximum number of dates to be selectable by the range
608
- * - numberOfMonths: Number of months rendered on pane
609
- * - quickSelectRanges: An array that sets the custom range dropdown items. @see BentoDateRangePicker
610
- * - showEndDateOnOpen: Upon opening date range picker, end date's month will be pre-selected.
611
- * - granularities: A list of available granularities.
612
- * - variant: The type of calendar to display. Defaults to showing days.
613
- * - tooltipPosition: The position of the tooltip attached to the filter button
614
- * - tooltipText: The content of the tooltip attached to the filter button
615
- */
616
- options: {
617
- type: Object,
618
- default: void 0
619
- },
620
- /**
621
- * Current value of the filter
622
- */
623
- value: {
624
- type: Object,
625
- default: () => ({ startDate: void 0, endDate: void 0 })
626
- }
627
- },
628
- emits: [F.INPUT, F.UPDATE],
629
- setup(a, { emit: e }) {
630
- var y, R, w, q;
631
- const { locale: t, t: l } = Z(), n = Me(), { internalFilterValue: o, isSecondaryButtonDisabled: s, isApplyButtonDisabled: u } = Q(
632
- H(a, "value"),
633
- H(a, "defaultValue")
634
- ), c = x(!1), d = r(() => {
635
- var i;
636
- return ((i = a == null ? void 0 : a.options) == null ? void 0 : i.quickSelectRanges) && a.options.quickSelectRanges.map((O) => {
637
- const v = O.data.endDate ? void 0 : new Date(Date.now()).getTime() - O.data.startDate.getTime();
638
- return {
639
- ...O,
640
- data: {
641
- ...O.data,
642
- // Adding timeDifference to calculate an up-to-date endDate on range selection
643
- timeDifference: v
644
- }
645
- };
646
- });
647
- }), _ = (i) => {
648
- var O;
649
- return i ? ee(i, De.NUMERIC_DATE_YEAR_FIRST, {
650
- locale: n[(O = t.value) == null ? void 0 : O.substring(0, 2)] || n.enUS
651
- }) : void 0;
652
- }, h = (i) => {
653
- var O;
654
- return i ? ee(i, De.HOUR_MINUTE_SECONDS, {
655
- locale: n[(O = t.value) == null ? void 0 : O.substring(0, 2)] || n.enUS
656
- }) : "";
657
- }, b = x(null), A = x(!1), m = tt({
658
- startDate: _((y = a.value) == null ? void 0 : y.startDate),
659
- endDate: _((R = a.value) == null ? void 0 : R.endDate),
660
- startTime: h((w = a.value) == null ? void 0 : w.startDate),
661
- endTime: h((q = a.value) == null ? void 0 : q.endDate)
662
- });
663
- Y(
664
- () => a.value,
665
- () => {
666
- var i, O, v, p;
667
- m.startDate = _((i = a.value) == null ? void 0 : i.startDate), m.endDate = _((O = a.value) == null ? void 0 : O.endDate), m.startTime = h((v = a.value) == null ? void 0 : v.startDate), m.endTime = h((p = a.value) == null ? void 0 : p.endDate);
668
- }
669
- );
670
- function D(i) {
671
- return (i == null ? void 0 : i.length) !== void 0;
672
- }
673
- const P = (i) => {
674
- var O, v, p, T, M, K, X, ie, re, ce;
675
- if (!i || !(i != null && i.startDate) && !i.endDate)
676
- return null;
677
- if (D((O = a.options) == null ? void 0 : O.quickSelectRanges) && ((p = (v = a.options) == null ? void 0 : v.quickSelectRanges) == null ? void 0 : p.length) > 0) {
678
- const Be = (M = (T = a.options) == null ? void 0 : T.quickSelectRanges) == null ? void 0 : M.find(({ value: Xe, data: G }) => i ? i.range ? Xe === i.range : !i.startDate || !i.endDate ? !1 : G != null && G.endDate ? fe(G == null ? void 0 : G.startDate, i.startDate) && fe(G == null ? void 0 : G.endDate, i.endDate) : fe(G == null ? void 0 : G.startDate, i.startDate) && gt(i.endDate) : !1);
679
- if (Be)
680
- return Be.label;
681
- }
682
- return !i.startDate || !i.endDate ? null : Dt(i.startDate, i.endDate) && ((K = a == null ? void 0 : a.options) != null && K.allowTimeInput) ? `${ee(i.startDate, "dd MMM, yyyy HH:mm:ss", {
683
- locale: n[(X = t.value) == null ? void 0 : X.substring(0, 2)] || n.enUS
684
- })} - ${ee(i.endDate, "HH:mm:ss", {
685
- locale: n[(ie = t.value) == null ? void 0 : ie.substring(0, 2)] || n.enUS
686
- })}` : `${ee(i.startDate, "dd MMM, yyyy", {
687
- locale: n[(re = t.value) == null ? void 0 : re.substring(0, 2)] || n.enUS
688
- })} - ${ee(i.endDate, "dd MMM, yyyy", {
689
- locale: n[(ce = t.value) == null ? void 0 : ce.substring(0, 2)] || n.enUS
690
- })}`;
691
- }, U = x(P(a.value)), $ = r(() => a.label), C = () => {
692
- b.value.closePopover();
693
- const { onlySlot: i, ...O } = a;
694
- e(F.UPDATE, { ...O, value: o.value });
695
- }, S = () => {
696
- o.value = void 0, C();
697
- }, E = () => {
698
- o.value = a.defaultValue, C();
699
- }, I = () => {
700
- o.value = a.value;
701
- }, L = () => {
702
- var i, O, v, p;
703
- o.value = a.value, c.value = !1, m.startDate = _((i = a.value) == null ? void 0 : i.startDate), m.endDate = _((O = a.value) == null ? void 0 : O.endDate), m.startTime = h((v = a.value) == null ? void 0 : v.startDate), m.endTime = h((p = a.value) == null ? void 0 : p.endDate);
704
- }, g = (i) => {
705
- c.value = !1, o.value = i, m.startDate = _(i.startDate), m.endDate = _(i.endDate), e(F.INPUT, { ...a, value: o.value });
706
- }, k = (i) => {
707
- i != null && i.startDate && (i != null && i.endDate) && (o.value = i, m.startDate = _(i.startDate), m.endDate = _(i.endDate), e(F.INPUT, { ...a, value: o.value }));
708
- }, j = (i) => {
709
- g(i), e(F.INPUT, { ...a, value: o.value });
710
- }, z = r(
711
- () => [
712
- {
713
- title: l("apply"),
714
- event: C,
715
- disabled: c.value || A.value || u.value
716
- },
717
- {
718
- title: a.defaultValue ? l("reset") : l("clear"),
719
- event: a.defaultValue ? E : S,
720
- disabled: A.value && s.value
721
- }
722
- ]
723
- ), B = () => {
724
- A.value = !0, o.value = { startDate: void 0, endDate: void 0 }, e(F.INPUT, { ...a, value: o.value });
725
- }, f = (i) => {
726
- A.value = !1, i.startTime && (m.startTime = i.startTime), i.endTime && (m.endTime = i.endTime);
727
- };
728
- return Y(
729
- () => a.value,
730
- (i) => {
731
- U.value = P(i);
732
- },
733
- { deep: !0 }
734
- ), {
735
- // Refs
736
- baseFilter: b,
737
- // Values
738
- actions: z,
739
- formData: m,
740
- internalFilterValue: o,
741
- isApplyButtonDisabled: u,
742
- isSecondaryButtonDisabled: s,
743
- isSelectingDate: c,
744
- buttonLabel: $,
745
- buttonSecondaryLabel: U,
746
- adjustedQuickSelectRanges: d,
747
- // Events
748
- onCancel: L,
749
- onDateSelected: g,
750
- openFilter: I,
751
- clearFilter: S,
752
- resetFilter: E,
753
- updateFilter: C,
754
- onDatePickerRangeError: B,
755
- onDatePickerRangeFormDateInputUpdate: f,
756
- onDateInputSelected: j,
757
- onRangeSelectorInput: k
758
- };
759
- }
760
- });
761
- var ul = function() {
762
- var l, n, o, s, u, c, d, _, h, b, A, m, D, P, U, $, C, S, E, I, L, g, k;
763
- var e = this, t = e._self._c;
764
- return e._self._setupProxy, t("bento-base-filter", { ref: "baseFilter", staticClass: "b-base-filter-date-range-filter", attrs: { "button-label": e.buttonLabel, "button-secondary-label": e.buttonSecondaryLabel, controlled: !e.onlySlot, disabled: e.disabled, "disable-apply-button": e.isApplyButtonDisabled, "disable-secondary-button": e.isSecondaryButtonDisabled, "default-value": e.defaultValue, field: e.field, label: e.label, "only-slot": e.onlySlot, "tooltip-position": (l = e.options) == null ? void 0 : l.tooltipPosition, "tooltip-text": (n = e.options) == null ? void 0 : n.tooltipText, "fit-content": "" }, on: { open: e.openFilter, clear: e.clearFilter, reset: e.resetFilter, cancel: e.onCancel } }, [e.onlySlot ? t("bento-date-range-picker", { attrs: { "allow-time-input": (o = e.options) == null ? void 0 : o.allowTimeInput, "model-value": e.internalFilterValue, "first-day-of-week": (s = e.options) == null ? void 0 : s.firstDayOfWeek, "is-date-disabled": (u = e.options) == null ? void 0 : u.isDateDisabled, "number-of-months": (c = e.options) == null ? void 0 : c.numberOfMonths, "quick-select-ranges": (d = e.options) == null ? void 0 : d.quickSelectRanges, variant: (_ = e.options) == null ? void 0 : _.variant, disabled: e.disabled, granularities: (h = e.options) == null ? void 0 : h.granularities, "max-range": (b = e.options) == null ? void 0 : b.maxRange, min: (A = e.options) == null ? void 0 : A.min, max: (m = e.options) == null ? void 0 : m.max, "date-form-data": e.formData, "show-end-date-on-open": (D = e.options) == null ? void 0 : D.showEndDateOnOpen }, on: { "update:model-value": e.onDateInputSelected } }) : [t("div", { staticClass: "b-date-range-filter" }, [t("date-range-picker-calendar", { attrs: { "allow-time-input": (P = e.options) == null ? void 0 : P.allowTimeInput, "first-day-of-week": (U = e.options) == null ? void 0 : U.firstDayOfWeek, "is-date-disabled": ($ = e.options) == null ? void 0 : $.isDateDisabled, granularities: (C = e.options) == null ? void 0 : C.granularities, "max-range": (S = e.options) == null ? void 0 : S.maxRange, min: (E = e.options) == null ? void 0 : E.min, max: (I = e.options) == null ? void 0 : I.max, "number-of-months": (L = e.options) == null ? void 0 : L.numberOfMonths, "quick-select-ranges": e.adjustedQuickSelectRanges, value: e.internalFilterValue, "date-form-data": e.formData, "show-end-date-on-open": (g = e.options) == null ? void 0 : g.showEndDateOnOpen, variant: (k = e.options) == null ? void 0 : k.variant }, on: { input: e.onDateSelected, "custom-range": e.onRangeSelectorInput, error: e.onDatePickerRangeError, "form-date": e.onDatePickerRangeFormDateInputUpdate, "start-date-selected": function(j) {
765
- e.isSelectingDate = !0;
766
- } }, scopedSlots: e._u([{ key: "title", fn: function() {
767
- return [t("bento-typography", { attrs: { strongest: "", variant: "body", el: "span" } }, [e._v(" " + e._s(e.label) + " ")])];
768
- }, proxy: !0 }, { key: "actions", fn: function() {
769
- return [t("bento-divider", { staticClass: "b-date-range-filter__divider" }), t("bento-button-actions", { staticClass: "b-date-range-filter__actions", attrs: { actions: e.actions, layout: "space-between" } })];
770
- }, proxy: !0 }]) })], 1)]], 2);
771
- }, cl = [], dl = /* @__PURE__ */ V(
772
- rl,
773
- ul,
774
- cl,
775
- !1,
776
- null,
777
- "9fb1aa27"
778
- );
779
- const Je = dl.exports, pl = {
780
- "en-US": {
781
- all: "All",
782
- noFiltersMatchThisSearch: "No filters match this search",
783
- searchFilter: "Search {filter}"
784
- },
785
- "ja-JP": {
786
- all: "すべて"
787
- },
788
- "pt-BR": {
789
- all: "Todos"
790
- }
791
- }, fl = {
792
- i18n: { messages: pl }
793
- }, bl = /* @__PURE__ */ N({
794
- ...fl,
795
- __name: "select-filter-button",
796
- props: {
797
- /**
798
- * Disables the filter from being interacted with.
799
- */
800
- disabled: { type: Boolean, default: !1 },
801
- /**
802
- * Default value of the filter to reset to.
803
- *
804
- */
805
- defaultValue: {
806
- type: [String, Number, Array],
807
- default: null
808
- },
809
- /**
810
- * Filter name/key referencing the actual property name in the data set.
811
- * Should be unique per filter bar.
812
- */
813
- field: { type: String, required: !0 },
814
- /**
815
- * Label text to be displayed
816
- */
817
- label: { type: String, required: !0 },
818
- /**
819
- * Renders the base filter's slot content only - leaving out the button and the popover.
820
- * Used for the allFiltersModal component.
821
- */
822
- onlySlot: { type: Boolean, default: !1 },
823
- /**
824
- * List of options that are needed to setup the filter
825
- * Available options:
826
- * - multiple: If "true", the user will be able to select multiple items.
827
- * - listboxItems: The option elements to populate the filter with.
828
- *
829
- * @default undefined
830
- */
831
- options: {
832
- type: Object,
833
- default: void 0
834
- },
835
- /**
836
- * Current value of the filter
837
- *
838
- * @default undefined
839
- */
840
- value: {
841
- type: [String, Number, Array, Object],
842
- default: void 0
843
- }
844
- },
845
- emits: ["input", "update"],
846
- setup(a, { emit: e }) {
847
- var z, B;
848
- const t = a, l = de(), { t: n } = Z(), o = x(""), s = H(t, "options"), u = x(t.options.listboxItems ?? []), { cachedSelectedListboxOptions: c, setCachedValues: d, resetCache: _ } = Ce(
849
- u,
850
- H(t, "value"),
851
- H(s.value, "multiple")
852
- ), { cachedSelectedListboxOptions: h } = Ce(
853
- u,
854
- H(t, "defaultValue"),
855
- H(s.value, "multiple")
856
- ), { internalFilterValue: b, isSecondaryButtonDisabled: A, isApplyButtonDisabled: m } = Q(c, h);
857
- Y(s, () => {
858
- u.value = s.value.listboxItems ?? [];
859
- });
860
- const D = Fe(
861
- o,
862
- u,
863
- (B = (z = t.options) == null ? void 0 : z.search) == null ? void 0 : B.searchEvent
864
- ), P = r(() => n("noFiltersMatchThisSearch")), U = r(() => t.label), $ = r(() => {
865
- var R, w, q, i, O;
866
- const f = !((R = t == null ? void 0 : t.options) != null && R.multiple) && (t == null ? void 0 : t.value), y = ((w = t == null ? void 0 : t.options) == null ? void 0 : w.multiple) && Array.isArray(t.value) && t.value.length === 1;
867
- if (f || y) {
868
- if ((q = t.options) != null && q.enableValueLabelPair) {
869
- const T = ((i = b.value) == null ? void 0 : i.length) > 0 ? b.value[0].label : t.value;
870
- return le(T, 12);
871
- }
872
- let p = (O = t.options.listboxItems.flatMap((T) => T.items ? T.items : T).find(
873
- ({ value: T }) => {
874
- var M;
875
- return Array.isArray(t.value) ? (M = t == null ? void 0 : t.value) == null ? void 0 : M.includes(T) : T === t.value;
876
- }
877
- )) == null ? void 0 : O.label;
878
- return !p && t.value && (p = t.value[0]), le(p, 12);
879
- }
880
- return null;
881
- }), C = r(() => ve(`filter-listbox-${t.field}`)), S = (f) => {
882
- var q, i, O;
883
- b.value = f;
884
- const { onlySlot: y, ...R } = t;
885
- if ((q = t.options) != null && q.multiple) {
886
- let v;
887
- (i = t.options) != null && i.enableValueLabelPair ? v = f.length ? b.value : null : v = f.length ? b.value.map(({ value: p }) => p) : null, e(F.INPUT, { ...R, value: v });
888
- return;
889
- }
890
- let w;
891
- (O = t.options) != null && O.enableValueLabelPair ? w = f.length ? f[0] : null : w = f.length ? f[0].value : null, e(F.INPUT, { ...R, value: w });
892
- }, E = () => {
893
- var w, q, i, O, v, p;
894
- const { onlySlot: f, ...y } = t;
895
- if (t.options.multiple) {
896
- b.value && ((w = b.value) == null ? void 0 : w.length) === 0 && (b.value = t.defaultValue !== null ? h.value : void 0);
897
- let T;
898
- (q = t.options) != null && q.enableValueLabelPair ? T = (i = b.value) != null && i.length ? b.value : null : T = (O = b.value) != null && O.length ? (v = b.value) == null ? void 0 : v.map(({ value: M }) => M) : null, e(F.UPDATE, {
899
- ...y,
900
- value: T
901
- });
902
- return;
903
- }
904
- let R;
905
- (p = t.options) != null && p.enableValueLabelPair ? R = b.value.length ? b.value[0] : void 0 : R = b.value.length ? b.value[0].value : void 0, e(F.UPDATE, { ...y, value: R });
906
- }, I = () => {
907
- var f, y;
908
- b.value = c.value, (y = (f = t.options) == null ? void 0 : f.onOpen) == null || y.call(f);
909
- }, L = () => {
910
- o.value && (o.value = "");
911
- }, g = () => {
912
- d(h.value), b.value = h.value, E();
913
- }, k = () => {
914
- _(), b.value = [], E();
915
- }, j = r(() => {
916
- var R, w;
917
- if (t.value == null || !t.options.multiple)
918
- return null;
919
- const f = (R = t.options.listboxItems) == null ? void 0 : R.reduce((q, i) => {
920
- var O;
921
- return q += (O = i == null ? void 0 : i.items) != null && O.length ? i.items.length : 1, q;
922
- }, 0), y = (w = t.value) == null ? void 0 : w.length;
923
- return y === 1 ? null : y === f ? n("all") : y;
924
- });
925
- return { __sfc: !0, slots: l, emit: e, props: t, t: n, searchTerm: o, optionsRef: s, itemsRef: u, cachedSelectedListboxOptions: c, setCachedValues: d, resetCache: _, cachedDefaultSelectedListboxOptions: h, internalFilterValue: b, isSecondaryButtonDisabled: A, isApplyButtonDisabled: m, filteredItems: D, noResultsMessage: P, buttonLabel: U, buttonSecondaryLabel: $, listboxFilterId: C, onOptionSelected: S, updateFilter: E, openFilter: I, closeFilter: L, resetFilter: g, clearFilter: k, appliedFiltersCount: j, BentoSearchBar: me, BentoDivider: he, BentoListbox: yt, BentoBaseFilter: ae };
926
- }
927
- });
928
- var vl = function() {
929
- var n, o, s, u, c, d, _, h, b, A, m, D, P, U, $, C, S;
930
- var e = this, t = e._self._c, l = e._self._setupProxy;
931
- return t(l.BentoBaseFilter, { attrs: { "applied-filters-count": l.appliedFiltersCount, "button-label": l.buttonLabel, "button-secondary-label": l.buttonSecondaryLabel, disabled: e.disabled, "disable-apply-button": l.isApplyButtonDisabled, "disable-secondary-button": l.isSecondaryButtonDisabled, "default-value": e.defaultValue, label: e.label, field: e.field, "only-slot": !1, "tooltip-position": (n = e.options) == null ? void 0 : n.tooltipPosition, "tooltip-text": (o = e.options) == null ? void 0 : o.tooltipText, value: e.value }, on: { apply: l.updateFilter, clear: l.clearFilter, reset: l.resetFilter, open: l.openFilter, close: l.closeFilter } }, [t("div", { staticClass: "b-select-filter-button__search-bar-wrapper" }, [((s = e.options) == null ? void 0 : s.dynamicFiltering) ?? !0 ? t("div", { staticClass: "b-select-filter-button__search-bar" }, [t(l.BentoSearchBar, { attrs: { "debounce-time": (c = (u = e.options) == null ? void 0 : u.search) == null ? void 0 : c.debounceTime, value: l.searchTerm, "input-field-aria-label": l.t("searchFilter", { filter: e.label.toLocaleLowerCase() }) }, on: { input: function(E) {
932
- l.searchTerm = E;
933
- } } })], 1) : e._e(), t("div", { staticClass: "b-select-filter-button__divider" }, [t(l.BentoDivider)], 1)]), t(l.BentoListbox, { staticClass: "b-select-filter-button__wrapper", attrs: { id: l.listboxFilterId, "aria-label": e.label, "component-loading": (d = e.options) == null ? void 0 : d.loading, "empty-state": (_ = e.options) == null ? void 0 : _.emptyState, "has-more-items": (b = (h = e.options) == null ? void 0 : h.lazy) == null ? void 0 : b.hasMoreItems, items: l.filteredItems, "is-option-disabled": (A = e.options) == null ? void 0 : A.isOptionDisabled, "lazy-load-type": (D = (m = e.options) == null ? void 0 : m.lazy) == null ? void 0 : D.lazyLoadType, loading: (U = (P = e.options) == null ? void 0 : P.lazy) == null ? void 0 : U.loading, multiple: ($ = e.options) == null ? void 0 : $.multiple, "static-categories": (C = e.options) == null ? void 0 : C.staticCategories, "no-results-message": l.noResultsMessage, searching: !!l.searchTerm, "selected-value": l.internalFilterValue, "virtual-scroll": (S = e.options) == null ? void 0 : S.virtualScroll }, on: { select: l.onOptionSelected, "space-pressed": l.onOptionSelected, "enter-pressed": l.onOptionSelected, "show-more": function(E) {
934
- var I, L;
935
- (L = (I = e.options) == null ? void 0 : I.lazy) == null || L.showMoreEvent();
936
- } }, scopedSlots: e._u([e._l(l.slots, function(E, I) {
937
- return { key: I, fn: function(L) {
938
- return [e._t(I, null, null, L)];
939
- } };
940
- })], null, !0) })], 1);
941
- }, _l = [], yl = /* @__PURE__ */ V(
942
- bl,
943
- vl,
944
- _l,
945
- !1,
946
- null,
947
- "f283e2d6"
948
- );
949
- const ml = yl.exports, Fl = {
950
- "en-US": {
951
- noFiltersMatchThisSearch: "No filters match this search"
952
- }
953
- }, hl = {
954
- i18n: { messages: Fl },
955
- name: "select-filter-dropdown"
956
- }, Sl = /* @__PURE__ */ N({
957
- ...hl,
958
- props: {
959
- /**
960
- * Disables the filter from being interacted with.
961
- */
962
- disabled: { type: Boolean, default: !1 },
963
- /**
964
- * Default value of the filter to reset to.
965
- *
966
- */
967
- defaultValue: {
968
- type: [String, Number, Array],
969
- default: null
970
- },
971
- /**
972
- * Filter name/key referencing the actual property name in the data set.
973
- * Should be unique per filter bar.
974
- */
975
- field: { type: String, required: !0 },
976
- /**
977
- * Label text to be displayed
978
- */
979
- label: { type: String, required: !0 },
980
- /**
981
- * Renders the base filter's slot content only - leaving out the button and the popover.
982
- * Used for the allFiltersModal component.
983
- *
984
- */
985
- onlySlot: { type: Boolean, default: !1 },
986
- /**
987
- * List of options that are needed to setup the filter
988
- * Available options:
989
- * - multiple: If "true", the user will be able to select multiple items.
990
- * - listboxItems: The option elements to populate the filter with.
991
- *
992
- * @default undefined
993
- */
994
- options: {
995
- type: Object,
996
- default: void 0
997
- },
998
- /**
999
- * Current value of the filter
1000
- *
1001
- * @default undefined
1002
- */
1003
- value: {
1004
- type: [String, Number, Array],
1005
- default: void 0
1006
- }
1007
- },
1008
- emits: ["input", "update"],
1009
- setup(a, { emit: e }) {
1010
- const t = a, { t: l } = Z(), n = de(), { internalFilterValue: o } = Q(H(t, "value"), H(t, "defaultValue")), s = H(t, "options"), u = x(t.options.listboxItems);
1011
- Y(s, () => {
1012
- u.value = s.value.listboxItems;
1013
- });
1014
- const c = r(() => l("noFiltersMatchThisSearch"));
1015
- return { __sfc: !0, t: l, slots: n, emit: e, props: t, internalFilterValue: o, optionsRef: s, itemsRef: u, noResultsMessage: c, onOptionSelected: (_) => {
1016
- o.value = _;
1017
- const { onlySlot: h, ...b } = t;
1018
- e(F.INPUT, { ...b, value: o.value });
1019
- }, BentoDropdown: ft };
1020
- }
1021
- });
1022
- var Bl = function() {
1023
- var n, o, s, u, c, d, _;
1024
- var e = this, t = e._self._c, l = e._self._setupProxy;
1025
- return t(l.BentoDropdown, { attrs: { "model-value": l.internalFilterValue, items: e.options.listboxItems, search: (n = e.options) == null ? void 0 : n.search, multiple: (o = e.options) == null ? void 0 : o.multiple, "static-categories": (s = e.options) == null ? void 0 : s.staticCategories, "no-results-message": l.noResultsMessage, "is-option-disabled": e.options.isOptionDisabled, "dynamic-filtering": ((u = e.options) == null ? void 0 : u.dynamicFiltering) ?? !0, "component-loading": (c = e.options) == null ? void 0 : c.loading, "empty-state": (d = e.options) == null ? void 0 : d.emptyState, disabled: e.disabled, "enable-value-label-pair": (_ = e.options) == null ? void 0 : _.enableValueLabelPair }, on: { "update:model-value": l.onOptionSelected, open: () => {
1026
- var h, b;
1027
- return (b = (h = e.options) == null ? void 0 : h.onOpen) == null ? void 0 : b.call(h);
1028
- } }, scopedSlots: e._u([e._l(l.slots, function(h, b) {
1029
- return { key: b, fn: function(A) {
1030
- return [e._t(b, null, null, A)];
1031
- } };
1032
- })], null, !0) });
1033
- }, gl = [], Cl = /* @__PURE__ */ V(
1034
- Sl,
1035
- Bl,
1036
- gl,
1037
- !1,
1038
- null,
1039
- null
1040
- );
1041
- const Dl = Cl.exports, se = {
1042
- /**
1043
- * Disables the filter from being interacted with.
1044
- */
1045
- disabled: { type: Boolean, default: !1 },
1046
- /**
1047
- * Default value of the filter to reset to.
1048
- *
1049
- */
1050
- defaultValue: {
1051
- type: [String, Number, Array, Object],
1052
- default: null
1053
- },
1054
- /**
1055
- * Filter name/key referencing the actual property name in the data set.
1056
- * Should be unique per filter bar.
1057
- */
1058
- field: { type: String, required: !0 },
1059
- /**
1060
- * Label text to be displayed
1061
- */
1062
- label: { type: String, required: !0 },
1063
- /**
1064
- * Renders the base filter's slot content only - leaving out the button and the popover.
1065
- * Used for the allFiltersModal component.
1066
- *
1067
- */
1068
- onlySlot: { type: Boolean, default: !1 },
1069
- /**
1070
- * List of options that are needed to setup the filter
1071
- * Available options:
1072
- * - multiple: If "true", the user will be able to select multiple items.
1073
- * - listboxItems: The option elements to populate the filter with.
1074
- * - tooltipPosition: The position of the tooltip attached to the filter button
1075
- * - tooltipText: The content of the tooltip attached to the filter button
1076
- *
1077
- * @default undefined
1078
- */
1079
- options: {
1080
- type: Object,
1081
- default: void 0
1082
- },
1083
- /**
1084
- * Current value of the filter
1085
- *
1086
- * @default undefined
1087
- */
1088
- value: {
1089
- type: [String, Number, Array, Object],
1090
- default: void 0
1091
- }
1092
- }, Al = {}, Tl = /* @__PURE__ */ N({
1093
- ...Al,
1094
- __name: "select-filter",
1095
- props: se,
1096
- emits: ["input", "update"],
1097
- setup(a, { emit: e }) {
1098
- const t = a, l = de(), n = (s) => e("input", s), o = (s) => e("update", s);
1099
- return xe(() => {
1100
- var s;
1101
- (s = t == null ? void 0 : t.options) != null && s.messages && _e(
1102
- 'BentoFilterBar filter of type "BentoFilterItemType.SELECT" options message property',
1103
- `Please remove the "options.messages" property from this filter, it is not required any more for persistent filters.
1104
- This will be the default behavior in the v2 and "options.messages" will be removed.`,
1105
- "2.0.0"
1106
- );
1107
- }), { __sfc: !0, slots: l, emit: e, props: t, onInput: n, onUpdate: o, SelectFilterButton: ml, SelectFilterDropdown: Dl };
1108
- }
1109
- });
1110
- var Pl = function() {
1111
- var e = this, t = e._self._c, l = e._self._setupProxy;
1112
- return e.onlySlot ? t(l.SelectFilterDropdown, { attrs: { disabled: e.disabled, "default-value": e.defaultValue, field: e.field, label: e.label, options: e.options, value: e.value }, on: { input: l.onInput, update: l.onUpdate }, scopedSlots: e._u([e._l(l.slots, function(n, o) {
1113
- return { key: o, fn: function(s) {
1114
- return [e._t(o, null, null, s)];
1115
- } };
1116
- })], null, !0) }) : t(l.SelectFilterButton, { attrs: { disabled: e.disabled, "default-value": e.defaultValue, field: e.field, label: e.label, options: e.options, value: e.value }, on: { input: l.onInput, update: l.onUpdate }, scopedSlots: e._u([e._l(l.slots, function(n, o) {
1117
- return { key: o, fn: function(s) {
1118
- return [e._t(o, null, null, s)];
1119
- } };
1120
- })], null, !0) });
1121
- }, Il = [], Ll = /* @__PURE__ */ V(
1122
- Tl,
1123
- Pl,
1124
- Il,
1125
- !1,
1126
- null,
1127
- null
1128
- );
1129
- const ne = Ll.exports, El = N({
1130
- name: "bento-select-avatar-filter",
1131
- components: {
1132
- BentoSelectFilter: ne,
1133
- BentoAvatar: ht
1134
- },
1135
- props: {
1136
- ...se,
1137
- /**
1138
- * List of options that are needed to setup the country filter
1139
- * Available options:
1140
- * - multiple: If "true", the user will be able to select multiple items.
1141
- * - listboxItems: The option elements to populate the filter with {@see BentoSelectCountryFilterOptions}
1142
- */
1143
- options: {
1144
- type: Object,
1145
- default: void 0
1146
- }
1147
- },
1148
- emits: [F.INPUT, F.UPDATE],
1149
- setup(a, { emit: e }) {
1150
- return {
1151
- // Enums
1152
- BentoFilterEvent: F,
1153
- // Methods
1154
- onUpdate: (l) => e(F.UPDATE, l)
1155
- };
1156
- }
1157
- });
1158
- var Ol = function() {
1159
- var e = this, t = e._self._c;
1160
- return e._self._setupProxy, t("bento-select-filter", e._b({ attrs: { field: e.field, label: e.label }, on: { update: e.onUpdate, input: (l) => e.$emit(e.BentoFilterEvent.INPUT, l) }, scopedSlots: e._u([{ key: "default", fn: function({ label: l, data: n }) {
1161
- return [t("bento-avatar", { attrs: { username: l, src: n } })];
1162
- } }]) }, "bento-select-filter", e.$props, !1));
1163
- }, xl = [], Rl = /* @__PURE__ */ V(
1164
- El,
1165
- Ol,
1166
- xl,
1167
- !1,
1168
- null,
1169
- null
1170
- );
1171
- const Ye = Rl.exports, Ul = N({
1172
- name: "bento-select-currency-filter",
1173
- components: {
1174
- BentoSelectFilter: ne,
1175
- ListboxOptionTag: Ne
1176
- },
1177
- props: {
1178
- ...se,
1179
- /**
1180
- * List of options that are needed to setup the country filter
1181
- * Available options:
1182
- * - multiple: If "true", the user will be able to select multiple items.
1183
- * - listboxItems: The option elements to populate the filter with {@see BentoSelectCurrencyFilterOptions}
1184
- */
1185
- options: {
1186
- type: Object,
1187
- default: void 0
1188
- }
1189
- },
1190
- emits: [F.INPUT, F.UPDATE],
1191
- setup(a, { emit: e }) {
1192
- var s;
1193
- const t = (u) => {
1194
- e(F.UPDATE, u);
1195
- }, l = x([]);
1196
- Y(
1197
- () => {
1198
- var u;
1199
- return (u = a.options) == null ? void 0 : u.listboxItems;
1200
- },
1201
- (u) => {
1202
- l.value = u || [];
1203
- },
1204
- { immediate: !0 }
1205
- );
1206
- const n = (s = a.options) != null && s.search ? a.options.search : {
1207
- debounceTime: 500,
1208
- searchEvent: async (u) => {
1209
- var h, b, A, m;
1210
- if (!u) {
1211
- l.value = ((h = a.options) == null ? void 0 : h.listboxItems) || [];
1212
- return;
1213
- }
1214
- const c = (((b = a.options) == null ? void 0 : b.listboxItems) || []).map((D) => ({
1215
- ...D,
1216
- label: `${D.value} ${D.label}`
1217
- })), d = Fe(
1218
- x(u),
1219
- x(c),
1220
- (m = (A = a.options) == null ? void 0 : A.search) == null ? void 0 : m.searchEvent,
1221
- x(!1)
1222
- ).value, _ = d == null ? void 0 : d.map((D) => ({
1223
- ...D,
1224
- label: D.label.substring(D.value.length + 1)
1225
- }));
1226
- l.value = _;
1227
- }
1228
- }, o = r(() => ({
1229
- ...a.options,
1230
- search: n,
1231
- listboxItems: l.value
1232
- }));
1233
- return {
1234
- // Enums
1235
- BentoFilterEvent: F,
1236
- // Methods
1237
- onUpdate: t,
1238
- internalOptions: o
1239
- };
1240
- }
1241
- });
1242
- var $l = function() {
1243
- var e = this, t = e._self._c;
1244
- return e._self._setupProxy, t("bento-select-filter", e._b({ attrs: { field: e.field, label: e.label, options: e.internalOptions }, on: { update: e.onUpdate, input: (l) => e.$emit(e.BentoFilterEvent.INPUT, l) }, scopedSlots: e._u([{ key: "default", fn: function(l) {
1245
- return [t("listbox-option-tag", { attrs: { option: l } })];
1246
- } }]) }, "bento-select-filter", e.$props, !1));
1247
- }, kl = [], wl = /* @__PURE__ */ V(
1248
- Ul,
1249
- $l,
1250
- kl,
1251
- !1,
1252
- null,
1253
- null
1254
- );
1255
- const ze = wl.exports, Vl = {
1256
- name: "bento-select-country-filter"
1257
- }, Nl = /* @__PURE__ */ N({
1258
- ...Vl,
1259
- props: {
1260
- ...se,
1261
- /**
1262
- * List of options that are needed to setup the country filter
1263
- * Available options:
1264
- * - multiple: If "true", the user will be able to select multiple items.
1265
- * - listboxItems: The option elements to populate the filter with {@see BentoSelectCountryFilterOptions}
1266
- * - variant: Which label variant to display for the option item.
1267
- */
1268
- options: {
1269
- type: Object,
1270
- default: void 0
1271
- }
1272
- },
1273
- emits: [F.INPUT, F.UPDATE],
1274
- setup(a, { emit: e }) {
1275
- const t = a, l = x(t.options.variant), n = x(t.options.listboxItems);
1276
- Y([() => t.options.variant, () => t.options.listboxItems], () => {
1277
- l.value = t.options.variant, n.value = t.options.listboxItems;
1278
- });
1279
- const o = (c) => e(F.UPDATE, c), s = Ft(l, n), u = r(() => ({
1280
- ...t != null && t.options ? t.options : {},
1281
- listboxItems: s.value
1282
- }));
1283
- return (!l.value || l.value === "custom") && _e(
1284
- 'BentoSelectCountryFilter type with `options.variant==="custom"`',
1285
- "Use any of the other BentoSelectCountryFilter variants instead OR use BentoSelectFilter type for custom labels",
1286
- "2.0.0"
1287
- ), { __sfc: !0, props: t, emit: e, variant: l, listboxItems: n, onUpdate: o, countryItems: s, countryOptions: u, BentoFilterEvent: F, BentoTypography: ue, BentoSelectFilter: ne };
1288
- }
1289
- });
1290
- var Ml = function() {
1291
- var e = this, t = e._self._c, l = e._self._setupProxy;
1292
- return t(l.BentoSelectFilter, e._b({ attrs: { field: e.field, label: e.label, options: l.countryOptions }, on: { update: l.onUpdate, input: (n) => e.$emit(l.BentoFilterEvent.INPUT, n) }, scopedSlots: e._u([{ key: "default", fn: function({ label: n }) {
1293
- return [t(l.BentoTypography, { attrs: { el: "span" } }, [e._v(e._s(n))])];
1294
- } }]) }, "bento-select-filter", l.props, !1));
1295
- }, Hl = [], jl = /* @__PURE__ */ V(
1296
- Nl,
1297
- Ml,
1298
- Hl,
1299
- !1,
1300
- null,
1301
- null
1302
- );
1303
- const Ge = jl.exports, ql = N({
1304
- name: "bento-select-payment-method-filter",
1305
- components: {
1306
- BentoSelectFilter: ne,
1307
- BentoPaymentMethod: mt
1308
- },
1309
- props: {
1310
- ...se,
1311
- /**
1312
- * List of options that are needed to setup the payment method filter
1313
- * Available options:
1314
- * - multiple: If "true", the user will be able to select multiple items.
1315
- * - listboxItems: The option elements to populate the filter with {@see BentoSelectPaymentMethodFilterOptions}
1316
- */
1317
- options: {
1318
- type: Object,
1319
- default: void 0
1320
- }
1321
- },
1322
- emits: [F.INPUT, F.UPDATE],
1323
- setup(a, { emit: e }) {
1324
- return {
1325
- // Enums
1326
- BentoFilterEvent: F,
1327
- // Methods
1328
- onUpdate: (l) => e(F.UPDATE, l)
1329
- };
1330
- }
1331
- });
1332
- var Jl = function() {
1333
- var e = this, t = e._self._c;
1334
- return e._self._setupProxy, t("bento-select-filter", e._b({ attrs: { field: e.field, label: e.label }, on: { update: e.onUpdate, input: (l) => e.$emit(e.BentoFilterEvent.INPUT, l) }, scopedSlots: e._u([{ key: "default", fn: function({ value: l, label: n }) {
1335
- return [t("bento-payment-method", { attrs: { type: l, label: n } })];
1336
- } }]) }, "bento-select-filter", e.$props, !1));
1337
- }, Yl = [], zl = /* @__PURE__ */ V(
1338
- ql,
1339
- Jl,
1340
- Yl,
1341
- !1,
1342
- null,
1343
- null
1344
- );
1345
- const We = zl.exports, Gl = N({
1346
- name: "bento-select-country-filter",
1347
- components: {
1348
- BentoSelectFilter: ne,
1349
- ListboxOptionTag: Ne
1350
- },
1351
- props: {
1352
- ...se,
1353
- /**
1354
- * List of options that are needed to setup the tag filter
1355
- * Available options:
1356
- * - multiple: If "true", the user will be able to select multiple items.
1357
- * - listboxItems: The option elements to populate the filter with {@see BentoSelectTagFilterOptions}
1358
- */
1359
- options: {
1360
- type: Object,
1361
- default: void 0
1362
- }
1363
- },
1364
- emits: [F.INPUT, F.UPDATE],
1365
- setup(a, { emit: e }) {
1366
- const t = (o) => e(F.UPDATE, o), l = r(
1367
- () => {
1368
- var o, s;
1369
- return (s = (o = a == null ? void 0 : a.options) == null ? void 0 : o.listboxItems) == null ? void 0 : s.map(({ label: u, value: c, variant: d }) => ({ label: u, value: c, data: d }));
1370
- }
1371
- );
1372
- return {
1373
- // Values
1374
- countryOptions: r(() => ({
1375
- ...a.options,
1376
- listboxItems: l.value
1377
- })),
1378
- // Methods
1379
- onUpdate: t,
1380
- // Enums
1381
- BentoFilterEvent: F
1382
- };
1383
- }
1384
- });
1385
- var Wl = function() {
1386
- var e = this, t = e._self._c;
1387
- return e._self._setupProxy, t("bento-select-filter", e._b({ attrs: { field: e.field, label: e.label, options: e.countryOptions }, on: { update: e.onUpdate, input: (l) => e.$emit(e.BentoFilterEvent.INPUT, l) }, scopedSlots: e._u([{ key: "default", fn: function({ label: l, data: n }) {
1388
- return [t("listbox-option-tag", { attrs: { option: { value: l, data: n, label: "" } } })];
1389
- } }]) }, "bento-select-filter", e.$props, !1));
1390
- }, Kl = [], Zl = /* @__PURE__ */ V(
1391
- Gl,
1392
- Wl,
1393
- Kl,
1394
- !1,
1395
- null,
1396
- null
1397
- );
1398
- const Ke = Zl.exports, Ql = {
1399
- "en-US": {
1400
- no: "No",
1401
- yes: "Yes"
1402
- },
1403
- "ja-JP": {
1404
- no: "いいえ",
1405
- yes: "はい"
1406
- },
1407
- "pt-BR": {
1408
- no: "Não",
1409
- yes: "Sim"
1410
- }
1411
- }, Xl = N({
1412
- name: "bento-boolean-filter",
1413
- i18n: { messages: Ql },
1414
- components: { BentoBaseFilter: ae, BentoRadioGroup: lt },
1415
- props: {
1416
- /**
1417
- * Disables the filter from being interacted with.
1418
- */
1419
- disabled: { type: Boolean, default: !1 },
1420
- /**
1421
- * Default value of the filter to reset to.
1422
- */
1423
- defaultValue: { type: [String, Boolean], default: null },
1424
- /**
1425
- * Filter name/key referencing the actual property name in the data set.
1426
- * Should be unique per filter bar.
1427
- */
1428
- field: { type: String, required: !0 },
1429
- /**
1430
- * Label text to be displayed
1431
- */
1432
- label: { type: String, required: !0 },
1433
- /**
1434
- * Current value of the filter
1435
- */
1436
- value: { type: [String, Boolean], default: null },
1437
- /**
1438
- * Renders the base filter's slot content only - leaving out the button and the popover.
1439
- * Used for the allFiltersModal component.
1440
- */
1441
- onlySlot: { type: Boolean, default: !1 },
1442
- /**
1443
- * List of options that are needed to setup the filter
1444
- * Available options:
1445
- * - positiveOption: The positive option label/value
1446
- * - negativeOption: The positive option label/value
1447
- * - tooltipPosition: The position of the tooltip attached to the filter button
1448
- * - tooltipText: The content of the tooltip attached to the filter button
1449
- */
1450
- options: {
1451
- type: Object,
1452
- default: void 0
1453
- }
1454
- },
1455
- emits: [F.INPUT, F.UPDATE],
1456
- setup(a, { emit: e }) {
1457
- const { t } = Z(), l = (C) => typeof C == "boolean" ? C == null ? void 0 : C.toString() : C, n = (C) => {
1458
- var S, E, I, L;
1459
- return ((E = (S = a == null ? void 0 : a.options) == null ? void 0 : S.positiveOption) == null ? void 0 : E.value) !== void 0 && ((L = (I = a == null ? void 0 : a.options) == null ? void 0 : I.negativeOption) == null ? void 0 : L.value) !== void 0 && typeof a.options.positiveOption.value == "boolean" && typeof a.options.negativeOption.value == "boolean" && typeof C == "string" ? C === "true" : C;
1460
- }, o = r(() => l(a.defaultValue)), s = r(() => l(a.value)), u = r(() => a.options && a.options.positiveOption && a.options.negativeOption ? [
1461
- {
1462
- ...a.options.positiveOption,
1463
- value: l(a.options.positiveOption.value)
1464
- },
1465
- {
1466
- ...a.options.negativeOption,
1467
- value: l(a.options.negativeOption.value)
1468
- }
1469
- ] : [
1470
- { value: "yes", label: t("yes") },
1471
- { value: "no", label: t("no") }
1472
- ]), { internalFilterValue: c, isSecondaryButtonDisabled: d, isApplyButtonDisabled: _ } = Q(
1473
- s,
1474
- o
1475
- ), h = r(() => a.label), b = r(
1476
- () => {
1477
- var C;
1478
- return le((C = u.value.find(({ value: S }) => S === s.value)) == null ? void 0 : C.label, 12);
1479
- }
1480
- ), A = r(() => ({
1481
- "b-boolean-filter--only-slot": a.onlySlot
1482
- }));
1483
- pe(() => {
1484
- c.value || (c.value = null);
1485
- });
1486
- const m = (C) => {
1487
- c.value = C, e(F.INPUT, {
1488
- ...a,
1489
- value: n(c.value)
1490
- });
1491
- }, D = () => {
1492
- c.value = s.value;
1493
- }, P = () => {
1494
- e(F.UPDATE, {
1495
- ...a,
1496
- value: n(c.value)
1497
- });
1498
- };
1499
- return {
1500
- // Values
1501
- items: u,
1502
- conditionalClasses: A,
1503
- buttonLabel: h,
1504
- buttonSecondaryLabel: b,
1505
- internalFilterValue: c,
1506
- isApplyButtonDisabled: _,
1507
- isSecondaryButtonDisabled: d,
1508
- translatedValue: s,
1509
- translatedDefaultValue: o,
1510
- // Events
1511
- onInput: m,
1512
- updateFilter: P,
1513
- clearFilter: () => {
1514
- c.value = null, P();
1515
- },
1516
- openFilter: D,
1517
- resetFilter: () => e(F.UPDATE, { ...a, value: a.defaultValue })
1518
- };
1519
- }
1520
- });
1521
- var ea = function() {
1522
- var l, n;
1523
- var e = this, t = e._self._c;
1524
- return e._self._setupProxy, t("bento-base-filter", e._b({ attrs: { value: e.translatedValue, "default-value": e.translatedDefaultValue, "button-label": e.buttonLabel, "button-secondary-label": e.buttonSecondaryLabel, "disable-apply-button": e.isApplyButtonDisabled, "disable-secondary-button": e.isSecondaryButtonDisabled, "only-slot": e.onlySlot, "tooltip-position": (l = e.options) == null ? void 0 : l.tooltipPosition, "tooltip-text": (n = e.options) == null ? void 0 : n.tooltipText }, on: { apply: e.updateFilter, clear: e.clearFilter, open: e.openFilter, reset: e.resetFilter } }, "bento-base-filter", e.$props, !1), [t("div", { staticClass: "b-boolean-filter", class: e.conditionalClasses, on: { keydown: function(o) {
1525
- return !o.type.indexOf("key") && e._k(o.keyCode, "enter", 13, o.key, "Enter") ? null : e.updateFilter.apply(null, arguments);
1526
- } } }, [t("bento-radio-group", { attrs: { items: e.items, label: e.label, "model-value": e.internalFilterValue, disabled: e.disabled, "hide-label": "" }, on: { "update:model-value": e.onInput } })], 1)]);
1527
- }, ta = [], la = /* @__PURE__ */ V(
1528
- Xl,
1529
- ea,
1530
- ta,
1531
- !1,
1532
- null,
1533
- "69632f6f"
1534
- );
1535
- const Ze = la.exports, aa = {
1536
- "en-US": {
1537
- from: "From",
1538
- to: "To"
1539
- }
1540
- }, na = N({
1541
- name: "bento-range-filter",
1542
- i18n: { messages: aa },
1543
- components: { BentoBaseFilter: ae, BentoInputField: ye },
1544
- props: {
1545
- /**
1546
- * Disables the filter from being interacted with.
1547
- */
1548
- disabled: { type: Boolean, default: !1 },
1549
- /**
1550
- * Default value of the filter to reset to.
1551
- */
1552
- defaultValue: { type: Array, default: null },
1553
- /**
1554
- * Filter name/key referencing the actual property name in the data set.
1555
- * Should be unique per filter bar.
1556
- */
1557
- field: { type: String, required: !0 },
1558
- /**
1559
- * Label text to be displayed
1560
- */
1561
- label: { type: String, required: !0 },
1562
- /**
1563
- * Current value of the filter
1564
- */
1565
- value: { type: Array, default: () => ["", ""] },
1566
- /**
1567
- * Renders the base filter's slot content only - leaving out the button and the popover.
1568
- * Used for the allFiltersModal component.
1569
- */
1570
- onlySlot: { type: Boolean, default: !1 },
1571
- /**
1572
- * List of options that are needed to setup the filter
1573
- * Available options:
1574
- * - tooltipPosition: The position of the tooltip attached to the filter button
1575
- * - tooltipText: The content of the tooltip attached to the filter button
1576
- */
1577
- options: { type: Object, default: void 0 }
1578
- },
1579
- emits: [F.INPUT, F.UPDATE],
1580
- setup(a, { emit: e }) {
1581
- const { t } = Z(), l = x(null), { internalFilterValue: n, isSecondaryButtonDisabled: o, isApplyButtonDisabled: s } = Q(
1582
- H(a, "value"),
1583
- H(a, "defaultValue")
1584
- ), u = r(() => {
1585
- var I, L, g, k, j, z, B, f;
1586
- if (!((I = a.value) != null && I[0]) && !((L = a.value) != null && L[1]))
1587
- return null;
1588
- let $ = "";
1589
- (g = a.value) != null && g[0] ? (k = a.value) != null && k[1] || ($ = "≥") : $ = "≤";
1590
- const C = (j = a.value) != null && j[0] ? `${le(a.value[0], 5)}` : "", S = (z = a.value) != null && z[0] && ((B = a.value) != null && B[1]) ? " - " : "", E = (f = a.value) != null && f[1] ? `${le(a.value[1], 5)}` : "";
1591
- return `${$}${C}${S}${E}`;
1592
- }), c = r(() => a.label), d = r(() => u.value), _ = r(() => ({
1593
- "b-range-filter--only-slot": a.onlySlot
1594
- })), h = () => {
1595
- n.value = a.value, Ee(() => l.value.focusInput());
1596
- }, b = () => {
1597
- e(F.INPUT, { ...a, value: n.value });
1598
- }, A = ($) => {
1599
- n.value = [$, n.value[1]], b();
1600
- }, m = ($) => {
1601
- n.value = [n.value[0], $], b();
1602
- }, D = () => {
1603
- n.value.some(($) => $) || (n.value = a.defaultValue !== null ? a.defaultValue : void 0), e(F.UPDATE, {
1604
- ...a,
1605
- value: n.value
1606
- });
1607
- };
1608
- return {
1609
- // Values
1610
- inputTextRef: l,
1611
- conditionalClasses: _,
1612
- internalFilterValue: n,
1613
- isApplyButtonDisabled: s,
1614
- isSecondaryButtonDisabled: o,
1615
- buttonLabel: c,
1616
- buttonSecondaryLabel: d,
1617
- // Events
1618
- updateFrom: A,
1619
- updateTo: m,
1620
- updateFilter: D,
1621
- clearFilter: () => {
1622
- n.value = ["", ""], D();
1623
- },
1624
- openFilter: h,
1625
- resetFilter: () => e(F.UPDATE, { ...a, value: a.defaultValue }),
1626
- // Translations
1627
- t
1628
- };
1629
- }
1630
- });
1631
- var oa = function() {
1632
- var l, n;
1633
- var e = this, t = e._self._c;
1634
- return e._self._setupProxy, t("bento-base-filter", e._b({ attrs: { "disable-apply-button": e.isApplyButtonDisabled, "disable-secondary-button": e.isSecondaryButtonDisabled, "button-label": e.buttonLabel, "button-secondary-label": e.buttonSecondaryLabel, "only-slot": e.onlySlot, "tooltip-position": (l = e.options) == null ? void 0 : l.tooltipPosition, "tooltip-text": (n = e.options) == null ? void 0 : n.tooltipText }, on: { apply: e.updateFilter, clear: e.clearFilter, open: e.openFilter, reset: e.resetFilter } }, "bento-base-filter", e.$props, !1), [t("div", { staticClass: "b-range-filter", class: e.conditionalClasses, on: { keydown: function(o) {
1635
- return !o.type.indexOf("key") && e._k(o.keyCode, "enter", 13, o.key, "Enter") ? null : e.updateFilter.apply(null, arguments);
1636
- } } }, [t("bento-input-field", { ref: "inputTextRef", attrs: { "model-value": e.internalFilterValue ? e.internalFilterValue[0] : "", type: "number", "aria-label": e.t("from").toString(), disabled: e.disabled }, on: { "update:model-value": e.updateFrom } }, [e._v(" " + e._s(e.t("from")) + " ")]), t("bento-input-field", { staticClass: "b-range-filter__input-field", attrs: { "model-value": e.internalFilterValue ? e.internalFilterValue[1] : "", type: "number", "aria-label": e.t("to"), disabled: e.disabled }, on: { "update:model-value": e.updateTo } }, [e._v(" " + e._s(e.t("to")) + " ")])], 1)]);
1637
- }, sa = [], ia = /* @__PURE__ */ V(
1638
- na,
1639
- oa,
1640
- sa,
1641
- !1,
1642
- null,
1643
- "540f94ab"
1644
- );
1645
- const Qe = ia.exports, Pe = 430, Ie = 700;
1646
- function ra(a, e) {
1647
- const t = x("div"), l = x(!1), n = x(0), o = r(() => !(n.value < Pe && e.value.small === "multi-line"));
1648
- function s() {
1649
- l.value = !1, t.value = "div";
1650
- }
1651
- function u() {
1652
- l.value = !0, t.value = Ve;
1653
- }
1654
- function c() {
1655
- n.value > Ie || n.value < Ie && n.value >= Pe && e.value.medium === "multi-line" ? s() : u();
1656
- }
1657
- return Y(() => e.value, c), ct(a, (d) => {
1658
- n.value = d[0].contentRect.width, c();
1659
- }), {
1660
- screenLayoutComponent: t,
1661
- showSearchbarInsideContainer: o,
1662
- isOneLineLayout: l
1663
- };
1664
- }
1665
- var be = /* @__PURE__ */ ((a) => (a.INPUT = "input", a))(be || {});
1666
- const ua = N({
1667
- name: "base-filter-button",
1668
- components: { BaseButton: Ue, BentoTypography: ue, ChevronUpIcon: vt, ChevronDownIcon: _t },
1669
- props: {
1670
- /**
1671
- * The number of applies values within the filter.
1672
- * e.g. if 2 items in a dropdown filter have been applied, the number 2 will be shown here.
1673
- */
1674
- amountAppliedValues: { type: [Number, String], default: null },
1675
- /**
1676
- * Disables button functionality.
1677
- */
1678
- disabled: { type: Boolean, default: !1 },
1679
- /**
1680
- * Signifies if the filter is open or closed.
1681
- */
1682
- isFilterOpen: { type: Boolean, default: !1 },
1683
- /**
1684
- * Toggles if a chevron icon should be displayed in the button.
1685
- * The chevron will change depending on the open state of the filter.
1686
- */
1687
- hasChevron: { type: Boolean, default: !1 },
1688
- /**
1689
- * Renders the text in a stronger variant.
1690
- */
1691
- bold: { type: Boolean, default: !1 }
1692
- },
1693
- emits: [ge.CLICK],
1694
- setup(a, { slots: e, emit: t, attrs: l }) {
1695
- const n = r(() => e.default ? we(e)("default") : null), o = ke({ ariaLabel: n }), s = x(null), u = r(() => {
1696
- var _;
1697
- return {
1698
- "aria-controls": (_ = l["aria-controls"]) == null ? void 0 : _.toString()
1699
- };
1700
- }), c = r(() => ({
1701
- "b-base-filter-button--with-chevron": a.hasChevron,
1702
- "b-base-filter-button--filter-open": a.isFilterOpen
1703
- }));
1704
- return {
1705
- // Values
1706
- ariaAttributes: u,
1707
- computedAriaLabel: o,
1708
- conditionalClasses: c,
1709
- // Methods
1710
- onClickButton: () => {
1711
- a.disabled || t(ge.CLICK);
1712
- },
1713
- hasSlot: $e(e),
1714
- // Refs
1715
- baseFilterButtonRef: s
1716
- };
1717
- }
1718
- });
1719
- var ca = function() {
1720
- var e = this, t = e._self._c;
1721
- return e._self._setupProxy, t("base-button", { ref: "baseFilterButtonRef", staticClass: "b-base-filter-button", class: e.conditionalClasses, attrs: { disabled: e.disabled, "aria-label": e.computedAriaLabel, "aria-controls": e.ariaAttributes["aria-controls"], type: "button" }, on: { click: e.onClickButton }, scopedSlots: e._u([e.hasChevron ? { key: "iconRight", fn: function() {
1722
- return [e.isFilterOpen ? t("chevron-up-icon", { attrs: { "aria-hidden": "true" } }) : t("chevron-down-icon", { attrs: { "aria-hidden": "true" } })];
1723
- }, proxy: !0 } : null], null, !0) }, [t("div", { staticClass: "b-base-filter-button__default-container" }, [t("div", { staticClass: "b-base-filter-button__label-container" }, [t("bento-typography", { staticClass: "b-base-filter-button__label", attrs: { el: "span", variant: "body", stronger: e.bold } }, [e._t("default")], 2)], 1), e.amountAppliedValues && !e.hasChevron ? t("div", { staticClass: "b-base-filter-button__counter-wrapper" }, [t("bento-typography", { staticClass: "b-base-filter-button__counter", attrs: { el: "span", variant: "body", stronger: "" } }, [e._v(" " + e._s(e.amountAppliedValues) + " ")])], 1) : e._e()])]);
1724
- }, da = [], pa = /* @__PURE__ */ V(
1725
- ua,
1726
- ca,
1727
- da,
1728
- !1,
1729
- null,
1730
- "66b170d4"
1731
- );
1732
- const fa = pa.exports, ba = N({
1733
- name: "all-filters-modal-button",
1734
- components: { BaseFilterButton: fa },
1735
- props: {
1736
- /**
1737
- * Button label to be displayed
1738
- */
1739
- label: { type: String, required: !0 },
1740
- /**
1741
- * Total count of applied filters
1742
- */
1743
- appliedFiltersCount: { type: [Number, String], default: null },
1744
- /**
1745
- * Indicates whether the filter popover tied to this button is showing
1746
- */
1747
- isFilterOpen: { type: Boolean, default: !1 },
1748
- /**
1749
- * Disables button functionality.
1750
- */
1751
- disabled: { type: Boolean, default: !1 }
1752
- },
1753
- emits: ["click"],
1754
- setup(a, { emit: e }) {
1755
- return {
1756
- conditionalClasses: r(() => ({
1757
- "b-all-filters-modal-button--with-counter": a.appliedFiltersCount,
1758
- "b-all-filters-modal-button--filter-open": a.isFilterOpen
1759
- })),
1760
- onClick: () => {
1761
- e("click");
1762
- }
1763
- };
1764
- }
1765
- });
1766
- var va = function() {
1767
- var e = this, t = e._self._c;
1768
- return e._self._setupProxy, t("base-filter-button", { staticClass: "b-all-filters-modal-button", class: e.conditionalClasses, attrs: { "amount-applied-values": e.appliedFiltersCount, "is-filter-open": e.isFilterOpen, disabled: e.disabled }, on: { click: e.onClick } }, [e._v(" " + e._s(e.label) + " ")]);
1769
- }, _a = [], ya = /* @__PURE__ */ V(
1770
- ba,
1771
- va,
1772
- _a,
1773
- !1,
1774
- null,
1775
- "4c415ac7"
1776
- );
1777
- const ma = ya.exports;
1778
- let Le = 0;
1779
- const Fa = {
1780
- beforeCreate() {
1781
- this.uuid = Le.toString(), Le += 1;
1782
- }
1783
- };
1784
- var ha = function() {
1785
- var e = this, t = e._self._c;
1786
- return t("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? t("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), t("path", { attrs: { fill: "#001222", 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" } }), t("path", { attrs: { fill: "#001222", 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" } })]);
1787
- }, Sa = [], Ba = /* @__PURE__ */ V(
1788
- Fa,
1789
- ha,
1790
- Sa,
1791
- !1,
1792
- null,
1793
- null
1794
- );
1795
- const ga = Ba.exports, Ca = {
1796
- "en-US": {
1797
- activeFilters: "Active filters",
1798
- all: "All",
1799
- allFilters: "All filters",
1800
- applyAll: "Apply all",
1801
- cancel: "Cancel",
1802
- clear: "Clear",
1803
- clearAll: "Clear all",
1804
- noFiltersMatchThisSearch: "No filters match this search",
1805
- otherFilters: "Other filters",
1806
- searchBar: "Search bar"
1807
- },
1808
- "ja-JP": {
1809
- activeFilters: "適用中のフィルター",
1810
- all: "すべて",
1811
- allFilters: "すべてのフィルター",
1812
- applyAll: "すべて適用",
1813
- cancel: "キャンセル",
1814
- clear: "クリア",
1815
- clearAll: "すべてクリア",
1816
- noFiltersMatchThisSearch: "この検索に一致するフィルターはありません",
1817
- otherFilters: "その他のフィルター",
1818
- searchBar: "検索バー"
1819
- },
1820
- "pt-BR": {
1821
- activeFilters: "Filtros ativos",
1822
- all: "Todos",
1823
- allFilters: "Todos os filtros",
1824
- applyAll: "Aplicar tudo",
1825
- cancel: "Cancelar",
1826
- clear: "Limpar",
1827
- clearAll: "Limpar tudo",
1828
- noFiltersMatchThisSearch: "Nenhum filtro corresponde a esta pesquisa",
1829
- otherFilters: "Outros filtros",
1830
- searchBar: "Barra de pesquisa"
1831
- }
1832
- }, Da = N({
1833
- i18n: { messages: Ca },
1834
- name: "all-filters-modal",
1835
- components: {
1836
- AllFiltersModalButton: ma,
1837
- BentoBooleanFilter: Ze,
1838
- BentoButton: pt,
1839
- BentoDateFilter: qe,
1840
- BentoDateRangeFilter: Je,
1841
- BentoInputFilter: He,
1842
- BentoInputWithDropdownFilter: je,
1843
- BentoModal: dt,
1844
- BentoRangeFilter: Qe,
1845
- BentoSearchBar: me,
1846
- BentoSelectAvatarFilter: Ye,
1847
- BentoSelectCurrencyFilter: ze,
1848
- BentoSelectCountryFilter: Ge,
1849
- BentoSelectFilter: ne,
1850
- BentoSelectPaymentMethodFilter: We,
1851
- BentoSelectTagFilter: Ke,
1852
- BentoTypography: ue,
1853
- FilterBarButton: Se,
1854
- SlidersIcon: ga
1855
- },
1856
- props: {
1857
- /**
1858
- * Array of filters based on {@see FilterBarModel}.
1859
- * Each one of the elements in the array correspond to a filter that will
1860
- * be created and rendered in the AllFiltersModal.
1861
- *
1862
- * Can be used with v-model or independently with the @input event.
1863
- *
1864
- * @example
1865
- * [{
1866
- * field: 'company',
1867
- * label: 'Company',
1868
- * value: '200',
1869
- * type: FilterType.TEXT,
1870
- * }, {
1871
- * field: 'name',
1872
- * label: 'Name',
1873
- * value: null,
1874
- * type: FilterType.TEXT,
1875
- * }]
1876
- */
1877
- value: {
1878
- type: Array,
1879
- default: () => []
1880
- }
1881
- },
1882
- emits: [be.INPUT],
1883
- setup(a, { emit: e }) {
1884
- const t = x(a.value), l = ve("all-filters-modal"), n = x([]), o = x(!1), s = x(0), u = x(null), c = x(""), { t: d, n: _ } = Z(), h = Fe(c, H(t, "value")), b = x({});
1885
- pe(() => {
1886
- b.value = [];
1887
- }), Y(
1888
- () => a.value,
1889
- () => {
1890
- o.value ? t.value = a.value.map((v, p) => ({ ...v, value: t.value[p].value })) : t.value = a.value;
1891
- }
1892
- );
1893
- const A = (v) => v.sort((p, T) => p.label > T.label ? 1 : T.label > p.label ? -1 : 0), m = r(
1894
- () => A(
1895
- h.value.filter(
1896
- (v) => {
1897
- var p, T;
1898
- return Array.isArray(v.value) ? ((p = v.value) == null ? void 0 : p.length) && ((T = v.value) == null ? void 0 : T.find((M) => M !== "")) : v.value;
1899
- }
1900
- )
1901
- )
1902
- ), D = r(
1903
- () => A(
1904
- h.value.filter(
1905
- (v) => {
1906
- var p, T;
1907
- return Array.isArray(v.value) ? ((p = v.value) == null ? void 0 : p.length) === 0 || ((T = v.value) == null ? void 0 : T.every((M) => M === "")) : !v.value;
1908
- }
1909
- )
1910
- )
1911
- ), P = r(() => {
1912
- var v;
1913
- return c.value && ((v = h.value) == null ? void 0 : v.length) === 0;
1914
- }), U = r(() => t.value[s.value]), $ = () => {
1915
- const v = m.value.length ? m.value[0] : D.value[0], p = t.value.findIndex(
1916
- (T) => T.label === v.label && T.field === v.field
1917
- );
1918
- s.value = p;
1919
- };
1920
- xe(() => {
1921
- $();
1922
- });
1923
- const C = (v) => v.map((p) => {
1924
- var T, M, K, X, ie, re;
1925
- switch (p.type) {
1926
- case W.SELECT:
1927
- case W.SELECT_AVATAR:
1928
- case W.SELECT_COUNTRY:
1929
- case W.SELECT_CURRENCY:
1930
- case W.SELECT_PAYMENT_METHOD:
1931
- case W.SELECT_TAG:
1932
- return ((T = p.options) == null ? void 0 : T.multiple) === !0 ? {
1933
- label: p.label,
1934
- field: p.field,
1935
- count: (M = p.value) != null && M.length ? (K = p.value) == null ? void 0 : K.length : null
1936
- } : {
1937
- label: p.label,
1938
- field: p.field,
1939
- count: p.value == null ? null : 1
1940
- };
1941
- case W.DATE_RANGE:
1942
- return {
1943
- label: p.label,
1944
- field: p.field,
1945
- count: ((X = p.value) == null ? void 0 : X.startDate) != null && ((ie = p.value) == null ? void 0 : ie.endDate) != null ? 1 : null
1946
- };
1947
- case W.RANGE:
1948
- return {
1949
- label: p.label,
1950
- field: p.field,
1951
- count: (re = p.value) != null && re.find((ce) => ce !== "") ? 1 : null
1952
- };
1953
- case W.INPUT:
1954
- case W.BOOLEAN:
1955
- case W.DATE:
1956
- default:
1957
- return {
1958
- label: p.label,
1959
- field: p.field,
1960
- count: p.value != null ? 1 : null
1961
- };
1962
- }
1963
- }), S = r(
1964
- () => {
1965
- var v;
1966
- return Array.isArray(U.value.value) ? ((v = U.value) == null ? void 0 : v.value.length) && U.value.value.find((p) => p !== "") : !!t.value[s.value].value;
1967
- }
1968
- ), E = r(() => !S.value || U.value.disabled), I = r(
1969
- () => {
1970
- var v;
1971
- return (v = C(a.value)) == null ? void 0 : v.filter(({ count: p }) => !!p).length;
1972
- }
1973
- ), L = () => {
1974
- o.value ? o.value = !1 : o.value = !0;
1975
- }, g = (v) => {
1976
- var T, M, K;
1977
- const p = C(t.value).find((X) => X.field === v.field).count;
1978
- return typeof v.type == "string" && // Type guard to avoid casting
1979
- v.type.includes("BentoSelect") && ((T = v.options) != null && T.multiple) && p === ((K = (M = v.options) == null ? void 0 : M.listboxItems) == null ? void 0 : K.length) ? d("all") : p === null ? null : _(p);
1980
- }, k = (v, p) => {
1981
- s.value = t.value.findIndex(
1982
- (T) => T.label === v && T.field === p
1983
- );
1984
- }, j = () => {
1985
- c.value = "";
1986
- }, z = () => {
1987
- o.value = !1, t.value = a.value, j(), $();
1988
- }, B = (v) => {
1989
- const p = t.value.map(({ value: T, ...M }, K) => K === s.value ? { value: v.value, ...M } : { value: T, ...M });
1990
- t.value = p;
1991
- }, f = () => {
1992
- B({
1993
- field: U.value.field,
1994
- label: U.value.label,
1995
- type: U.value.type,
1996
- value: void 0
1997
- });
1998
- }, y = () => {
1999
- t.value = a.value.map(({ value: v, ...p }) => ({
2000
- ...p,
2001
- value: void 0
2002
- }));
2003
- }, R = () => {
2004
- e(be.INPUT, t.value), o.value = !1;
2005
- }, w = r(
2006
- () => JSON.stringify(t.value) === JSON.stringify(a.value)
2007
- ), q = r(() => [
2008
- {
2009
- title: d("applyAll"),
2010
- disabled: w.value,
2011
- event: R
2012
- },
2013
- {
2014
- title: d("cancel"),
2015
- event: z
2016
- },
2017
- {
2018
- title: d("clearAll"),
2019
- disabled: !I.value,
2020
- event: y
2021
- }
2022
- ]);
2023
- return {
2024
- // Values
2025
- allFiltersModalUniqueId: l,
2026
- allFiltersModalFiltersSection: n,
2027
- allFiltersModalFilterButtons: b,
2028
- numberOfActiveFilters: I,
2029
- isEmptyResultForSearchFilter: P,
2030
- isModalOpen: o,
2031
- isClearButtonDisabled: E,
2032
- activeFilters: m,
2033
- otherFilters: D,
2034
- modalActions: q,
2035
- selectedFilter: U,
2036
- selectedFilterRef: u,
2037
- searchTerm: c,
2038
- // Methods
2039
- onClickAllFiltersModal: L,
2040
- getFilterCount: g,
2041
- cancel: z,
2042
- selectFilter: k,
2043
- clearFilter: f,
2044
- updateFilter: B,
2045
- onSearchbarClear: j,
2046
- onKeydownRight: () => {
2047
- bt(1, u.value.$el).focus();
2048
- },
2049
- onKeydownLeft: () => {
2050
- b.value[U.value.label].$el.focus();
2051
- },
2052
- // Translations
2053
- t: d
2054
- };
2055
- }
2056
- });
2057
- var Aa = function() {
2058
- var e = this, t = e._self._c;
2059
- return e._self._setupProxy, t("div", { staticClass: "b-all-filters-modal" }, [t("filter-bar-button", { attrs: { "is-filter-open": e.isModalOpen, "applied-filters-count": e.numberOfActiveFilters, "no-applied-state-styles": "" }, on: { click: e.onClickAllFiltersModal }, scopedSlots: e._u([{ key: "iconLeft", fn: function() {
2060
- return [t("sliders-icon", { attrs: { "aria-hidden": "true" } })];
2061
- }, proxy: !0 }]) }, [e._v(" " + e._s(e.t("allFilters")) + " ")]), t("bento-modal", { staticClass: "'b-all-filters-modal__modal'", attrs: { "is-open": e.isModalOpen, "with-column-layout": !0, size: "large", actions: e.modalActions, "is-dismissible": !1, "hide-close-button": "" }, on: { "close-modal": e.cancel }, scopedSlots: e._u([{ key: "default", fn: function() {
2062
- return [e._v(" " + e._s(e.t("allFilters")) + " ")];
2063
- }, proxy: !0 }, { key: "content-col-1", fn: function() {
2064
- return [t("div", { ref: "allFiltersModalFiltersSection", staticClass: "b-all-filters-modal__filters", on: { keydown: function(l) {
2065
- return !l.type.indexOf("key") && e._k(l.keyCode, "right", 39, l.key, ["Right", "ArrowRight"]) || "button" in l && l.button !== 2 ? null : e.onKeydownRight.apply(null, arguments);
2066
- } } }, [t("bento-search-bar", { staticClass: "b-all-filters-modal__search-bar", attrs: { value: e.searchTerm, "input-field-aria-label": e.t("searchBar").toString() }, on: { input: function(l) {
2067
- e.searchTerm = l;
2068
- }, clear: e.onSearchbarClear } }), e.isEmptyResultForSearchFilter ? t("div", { staticClass: "b-all-filters-modal__empty-search-message" }, [t("bento-typography", { attrs: { el: "span" } }, [e._v(" " + e._s(e.t("noFiltersMatchThisSearch")))])], 1) : e._e(), e.activeFilters.length ? t("div", { staticClass: "b-all-filters-modal__filters-section" }, [t("bento-typography", { staticClass: "b-all-filters-modal__filters-section-title", attrs: { id: `active-filters-${e.allFiltersModalUniqueId}`, el: "span", variant: "caption" } }, [e._v(" " + e._s(e.t("activeFilters")))]), t("ul", { staticClass: "b-all-filters-modal__filters-list", attrs: { "aria-labelledby": `active-filters-${e.allFiltersModalUniqueId}` } }, e._l(e.activeFilters, function(l) {
2069
- return t("li", { key: `${l.label}-${l.field}` }, [t("all-filters-modal-button", { ref: (n) => e.allFiltersModalFilterButtons[l.label] = n, refInFor: !0, attrs: { label: l.label, "applied-filters-count": e.getFilterCount(l), "is-filter-open": e.selectedFilter.label === l.label, disabled: l.disabled }, on: { click: function(n) {
2070
- return e.selectFilter(l.label, l.field);
2071
- } } })], 1);
2072
- }), 0)], 1) : e._e(), e.otherFilters.length ? t("div", { staticClass: "b-all-filters-modal__filters-section" }, [e.activeFilters.length ? t("bento-typography", { staticClass: "b-all-filters-modal__filters-section-title", attrs: { id: `other-filters-${e.allFiltersModalUniqueId}`, el: "span", variant: "caption" } }, [e._v(" " + e._s(e.t("otherFilters")))]) : e._e(), t("ul", { staticClass: "b-all-filters-modal__filters-list", attrs: { "aria-labelledby": `other-filters-${e.allFiltersModalUniqueId}` } }, e._l(e.otherFilters, function(l) {
2073
- return t("li", { key: `${l.label}-${l.field}` }, [t("all-filters-modal-button", { ref: (n) => e.allFiltersModalFilterButtons[l.label] = n, refInFor: !0, attrs: { label: l.label, disabled: l.disabled, "applied-filters-count": e.getFilterCount(l), "is-filter-open": e.selectedFilter.label === l.label }, on: { click: function(n) {
2074
- return e.selectFilter(l.label, l.field);
2075
- } } })], 1);
2076
- }), 0)], 1) : e._e()], 1)];
2077
- }, proxy: !0 }, { key: "content-col-2", fn: function() {
2078
- return [t("div", { staticClass: "b-all-filters-modal__selected-filter-content", on: { keydown: function(l) {
2079
- return !l.type.indexOf("key") && e._k(l.keyCode, "left", 37, l.key, ["Left", "ArrowLeft"]) || "button" in l && l.button !== 0 ? null : e.onKeydownLeft.apply(null, arguments);
2080
- } } }, [t("div", { staticClass: "b-all-filters-modal__selected-filter-text" }, [t("bento-typography", { attrs: { el: "div", variant: "title", medium: "" } }, [e._v(e._s(e.selectedFilter.label))]), e.selectedFilter.description ? t("bento-typography", { attrs: { el: "div", variant: "body", wide: "" } }, [e._v(" " + e._s(e.selectedFilter.description) + " ")]) : e._e()], 1), t("div", { staticClass: "b-all-filters-modal__selected-filter-component" }, [t(e.selectedFilter.type, { key: e.selectedFilter.field, ref: "selectedFilterRef", tag: "component", attrs: { field: e.selectedFilter.field, label: e.selectedFilter.label, options: e.selectedFilter.options, value: e.selectedFilter.value, "default-value": e.selectedFilter.defaultValue, "only-slot": !0, disabled: e.selectedFilter.disabled }, on: { input: e.updateFilter } })], 1), t("div", { staticClass: "b-all-filters-modal__clear-button" }, [t("bento-button", { attrs: { variant: "secondary", disabled: e.isClearButtonDisabled }, on: { click: e.clearFilter } }, [e._v(e._s(e.t("clear")))])], 1)])];
2081
- }, proxy: !0 }]) })], 1);
2082
- }, Ta = [], Pa = /* @__PURE__ */ V(
2083
- Da,
2084
- Aa,
2085
- Ta,
2086
- !1,
2087
- null,
2088
- "d3bf9be0"
2089
- );
2090
- const Ia = Pa.exports, La = {
2091
- "en-US": {
2092
- clearFilters: "Clear filters",
2093
- filtersHaveBeenCleared: "Filters have been cleared.",
2094
- filtersHaveBeenReset: "Filters have been reset.",
2095
- resetFilters: "Reset filters",
2096
- searchBar: "Search bar",
2097
- undo: "Undo"
2098
- },
2099
- "ja-JP": {
2100
- clearFilters: "フィルターをクリア",
2101
- filtersHaveBeenCleared: "フィルターをクリアしました",
2102
- filtersHaveBeenReset: "フィルターがリセットされました",
2103
- resetFilters: "フィルターのリセット",
2104
- searchBar: "検索バー",
2105
- undo: "元に戻す"
2106
- },
2107
- "pt-BR": {
2108
- clearFilters: "Limpar filtros",
2109
- filtersHaveBeenCleared: "Os filtros foram apagados",
2110
- filtersHaveBeenReset: "Os filtros foram redefinidos",
2111
- resetFilters: "Redefinir filtros",
2112
- searchBar: "Barra de pesquisa",
2113
- undo: "Desfazer"
2114
- }
2115
- }, Ea = {
2116
- i18n: { messages: La },
2117
- name: "bento-filter-bar",
2118
- components: {
2119
- BentoBooleanFilter: Ze,
2120
- BentoDateFilter: qe,
2121
- BentoDateRangeFilter: Je,
2122
- BentoInputFilter: He,
2123
- BentoInputWithDropdownFilter: je,
2124
- BentoRangeFilter: Qe,
2125
- BentoSelectAvatarFilter: Ye,
2126
- BentoSelectCountryFilter: Ge,
2127
- BentoSelectCurrencyFilter: ze,
2128
- BentoSelectFilter: ne,
2129
- BentoSelectPaymentMethodFilter: We,
2130
- BentoSelectTagFilter: Ke,
2131
- BentoTeleport: Re,
2132
- FixedScroller: Ve
2133
- }
2134
- }, Oa = /* @__PURE__ */ N({
2135
- ...Ea,
2136
- props: {
2137
- config: { default: () => [] },
2138
- filterValues: { default: () => [] },
2139
- containerSizeLayout: { default: () => ({
2140
- medium: "one-line",
2141
- small: "multi-line"
2142
- }) },
2143
- search: { default: void 0 },
2144
- searchTerm: { default: void 0 },
2145
- showAppliedHiddenFilters: { type: Boolean, default: !1 },
2146
- value: { default: () => [] },
2147
- filterValuesObject: { default: void 0 }
2148
- },
2149
- emits: [
2150
- te.INPUT,
2151
- te.UPDATE_FILTER_VALUES_OBJECT,
2152
- te.UPDATE_FILTER_VALUES_ARRAY,
2153
- oe.CLEAR,
2154
- oe.INPUT,
2155
- oe.UPDATE
2156
- ],
2157
- setup(a, { expose: e, emit: t }) {
2158
- const l = a, { t: n } = Z(), o = x(null), s = r(
2159
- () => {
2160
- var B, f;
2161
- return (f = ((B = l.config) == null ? void 0 : B.length) > 0 ? l.config : l.value) == null ? void 0 : f.map((y) => {
2162
- var w;
2163
- let R = (w = l.filterValues.find(({ field: q }) => q === y.field)) == null ? void 0 : w.value;
2164
- return l.filterValuesObject && y.field in l.filterValuesObject && (R = l.filterValuesObject[y.field]), R === void 0 && (R = (y == null ? void 0 : y.value) === void 0 && (y == null ? void 0 : y.defaultValue) !== void 0 ? y == null ? void 0 : y.defaultValue : y == null ? void 0 : y.value), { ...y, value: R !== void 0 ? R : y == null ? void 0 : y.value };
2165
- });
2166
- }
2167
- ), { addToast: u } = Pt(), { screenLayoutComponent: c, showSearchbarInsideContainer: d, isOneLineLayout: _ } = ra(
2168
- o,
2169
- H(l, "containerSizeLayout")
2170
- ), h = r(() => ({
2171
- "b-filter-bar__fixed-scroller": _.value,
2172
- "b-filter-bar__container": !_.value
2173
- // Multi-line
2174
- })), b = r(() => ({
2175
- "b-filter-bar__scroller-content": _.value,
2176
- "b-filter-bar__filters": !_.value
2177
- // Multi-line
2178
- })), A = r(() => {
2179
- var B;
2180
- return ((B = l.search) == null ? void 0 : B.inputFieldAriaLabel) || n("searchBar");
2181
- }), m = r(() => {
2182
- if (!l.search)
2183
- return;
2184
- const { debounceTime: B, disabled: f, inputFieldAriaLabel: y, hint: R, placeholder: w } = l.search;
2185
- return { debounceTime: B, disabled: f, inputFieldAriaLabel: y, hint: R, placeholder: w };
2186
- }), D = r(() => s.value.some(
2187
- ({ visible: f }) => f != null
2188
- ) ? s.value.some(({ visible: f }) => !f) : !1), P = r(
2189
- () => s.value.filter(({ defaultValue: B }) => B !== void 0)
2190
- ), U = r(() => s.value.some(
2191
- ({ visible: f }) => f != null
2192
- ) ? s.value.filter(
2193
- ({ defaultValue: f, visible: y, value: R }) => (
2194
- // eslint-disable-next-line eqeqeq
2195
- f === void 0 && y || l.showAppliedHiddenFilters && R != null
2196
- )
2197
- ) : s.value.filter(
2198
- ({ defaultValue: f, value: y }) => (
2199
- // eslint-disable-next-line eqeqeq
2200
- f === void 0 || l.showAppliedHiddenFilters && y != null
2201
- )
2202
- )), $ = r(() => l.searchTerm != null), C = r(
2203
- () => s.value.filter(({ defaultValue: B }) => B == null).some(({ value: B }) => B != null)
2204
- ), S = r(() => P.value.length === 0 && C.value), E = r(() => P.value.length === 0 ? !1 : !s.value.filter(({ defaultValue: f }) => f !== void 0 || f !== null).every(({ value: f, defaultValue: y }) => JSON.stringify(f) === JSON.stringify(y)) || C.value), I = (B) => {
2205
- t(te.INPUT, B), t(
2206
- te.UPDATE_FILTER_VALUES_ARRAY,
2207
- B == null ? void 0 : B.filter(({ value: f }) => f !== null || f !== void 0).map(({ field: f, value: y }) => ({ field: f, value: y }))
2208
- ), t(
2209
- te.UPDATE_FILTER_VALUES_OBJECT,
2210
- B == null ? void 0 : B.filter(({ value: f }) => f !== null || f !== void 0).reduce((f, y) => (f[y.field] = y.value, f), {})
2211
- );
2212
- }, L = (B) => {
2213
- const f = s.value.findIndex(
2214
- (R) => R.field === B.field
2215
- ), y = s.value.slice();
2216
- y[f].value = B.value, I(y);
2217
- }, g = () => {
2218
- const B = s.value.slice(), f = s.value.map(({ value: y, ...R }) => ({
2219
- ...R,
2220
- value: void 0
2221
- }));
2222
- u({
2223
- text: n("filtersHaveBeenCleared"),
2224
- action: {
2225
- handler: () => I(B),
2226
- text: n("undo")
2227
- }
2228
- }), I(f);
2229
- }, k = () => {
2230
- const B = s.value.slice(), f = s.value.map(({ defaultValue: y, ...R }) => ({
2231
- ...R,
2232
- defaultValue: y,
2233
- value: y
2234
- }));
2235
- u({
2236
- text: n("filtersHaveBeenReset"),
2237
- action: {
2238
- handler: () => I(B),
2239
- text: n("undo")
2240
- }
2241
- }), I(f);
2242
- }, j = (B) => {
2243
- t(oe.INPUT, B), t(oe.UPDATE, B);
2244
- }, z = () => {
2245
- t(oe.CLEAR);
2246
- };
2247
- return e({ isClearAllVisible: S, clearAllFilters: g, isResetAllVisible: E, resetAllFilters: k }), { __sfc: !0, props: l, emit: t, t: n, filterBarRef: o, valueAndFilterValuesPropsMerged: s, addToast: u, screenLayoutComponent: c, showSearchbarInsideContainer: d, isOneLineLayout: _, containerConditionalClasses: h, contentConditionalClasses: b, searchBarAriaLabel: A, searchBarProps: m, hasHiddenFilters: D, persistentFilters: P, regularFilters: U, isSearchBarEnabled: $, hasActiveFilters: C, isClearAllVisible: S, isResetAllVisible: E, updateAllFilters: I, updateFilterHandler: L, clearAllFilters: g, resetAllFilters: k, onSearchbarInput: j, onSearchbarClear: z, FilterBarButton: Se, BentoSearchBar: me, AllFiltersModal: Ia, RefreshIcon: Tt };
2248
- }
2249
- });
2250
- var xa = function() {
2251
- var e = this, t = e._self._c, l = e._self._setupProxy;
2252
- return t("div", { ref: "filterBarRef", staticClass: "b-filter-bar" }, [!l.showSearchbarInsideContainer && l.isSearchBarEnabled ? t("div", { staticClass: "b-filter-bar__search-external-container" }, [t(l.BentoSearchBar, e._b({ staticClass: "b-filter-bar__search-bar", attrs: { "input-field-aria-label": l.searchBarAriaLabel, value: e.searchTerm, condensed: "" }, on: { input: l.onSearchbarInput, clear: l.onSearchbarClear } }, "bento-search-bar", l.searchBarProps, !1))], 1) : e._e(), t(l.screenLayoutComponent, { tag: "component", class: l.containerConditionalClasses, attrs: { condensed: "" } }, [t("div", { class: l.contentConditionalClasses }, [l.showSearchbarInsideContainer && l.isSearchBarEnabled ? t("div", [t(l.BentoSearchBar, e._b({ staticClass: "b-filter-bar__search-bar", attrs: { "input-field-aria-label": l.searchBarAriaLabel, value: e.searchTerm, condensed: "" }, on: { input: l.onSearchbarInput, clear: l.onSearchbarClear } }, "bento-search-bar", l.searchBarProps, !1))], 1) : e._e(), l.persistentFilters.length ? e._l(l.persistentFilters, function(n) {
2253
- return t(n.type, { key: n.field, tag: "component", attrs: { field: n.field, label: n.label, disabled: n == null ? void 0 : n.disabled, options: n.options, value: n.value, "default-value": n.defaultValue }, on: { update: l.updateFilterHandler } });
2254
- }) : e._e(), e._l(l.regularFilters, function(n) {
2255
- return t(n.type, { key: n.field, tag: "component", attrs: { field: n.field, label: n.label, disabled: n == null ? void 0 : n.disabled, options: n.options, value: n.value }, on: { update: l.updateFilterHandler } });
2256
- }), l.hasHiddenFilters ? t(l.AllFiltersModal, { staticClass: "b-filter-bar__all-filters-modal", attrs: { value: l.valueAndFilterValuesPropsMerged }, on: { input: l.updateAllFilters } }) : e._e(), l.isClearAllVisible ? t(l.FilterBarButton, { staticClass: "b-filter-bar__clear-all", on: { click: l.clearAllFilters }, scopedSlots: e._u([{ key: "iconLeft", fn: function() {
2257
- return [t(l.RefreshIcon, { attrs: { "aria-hidden": "true" } })];
2258
- }, proxy: !0 }], null, !1, 4046500904) }, [e._v(" " + e._s(l.t("clearFilters")) + " ")]) : e._e(), l.isResetAllVisible ? t(l.FilterBarButton, { staticClass: "b-filter-bar__reset-all", on: { click: l.resetAllFilters }, scopedSlots: e._u([{ key: "iconLeft", fn: function() {
2259
- return [t(l.RefreshIcon, { attrs: { "aria-hidden": "true" } })];
2260
- }, proxy: !0 }], null, !1, 4046500904) }, [e._v(" " + e._s(l.t("resetFilters")) + " ")]) : e._e()], 2)])], 1);
2261
- }, Ra = [], Ua = /* @__PURE__ */ V(
2262
- Oa,
2263
- xa,
2264
- Ra,
2265
- !1,
2266
- null,
2267
- "b5b27933"
2268
- );
2269
- const gn = Ua.exports;
2270
- export {
2271
- gn as B,
2272
- ae as a,
2273
- F as b,
2274
- te as c,
2275
- W as d
2276
- };
2277
- //# sourceMappingURL=filter-bar.DpjD5bZe.js.map