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