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