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