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