@adyen/bento-vue3 1.54.2 → 1.55.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 (232) hide show
  1. package/dist/@types/index.d.ts +20 -2
  2. package/dist/action-bar.js +1 -1
  3. package/dist/alert.js +1 -1
  4. package/dist/assets/accordion-item.css +1 -1
  5. package/dist/assets/action-bar.css +1 -1
  6. package/dist/assets/base-modal.css +1 -1
  7. package/dist/assets/button.css +1 -1
  8. package/dist/assets/card.css +1 -1
  9. package/dist/assets/copy.css +1 -1
  10. package/dist/assets/dashboard-section.css +1 -1
  11. package/dist/assets/data-grid-template.css +1 -1
  12. package/dist/assets/data-grid.css +1 -1
  13. package/dist/assets/date-range-picker.css +1 -1
  14. package/dist/assets/dialog-page.css +1 -1
  15. package/dist/assets/dropdown-default-textbox.css +1 -1
  16. package/dist/assets/dropdown.css +1 -1
  17. package/dist/assets/file-uploader.css +1 -1
  18. package/dist/assets/filter-bar.css +1 -1
  19. package/dist/assets/focus-trap.css +1 -1
  20. package/dist/assets/input-field-phone-number.css +1 -1
  21. package/dist/assets/inspector.css +1 -1
  22. package/dist/assets/link.css +1 -1
  23. package/dist/assets/menu.css +1 -1
  24. package/dist/assets/modal-fullscreen.css +1 -1
  25. package/dist/assets/popover.css +1 -1
  26. package/dist/assets/popper-container.css +1 -1
  27. package/dist/assets/sidepanel.css +1 -1
  28. package/dist/assets/tabs.css +1 -1
  29. package/dist/assets/teleport.css +1 -1
  30. package/dist/assets/use-cached-selected-values.css +1 -1
  31. package/dist/button.js +3 -3
  32. package/dist/card.js +1 -1
  33. package/dist/checkbox.js +2 -2
  34. package/dist/chunks/{action-bar.CUDi5Po7.js → action-bar.CDOaDenE.js} +5 -5
  35. package/dist/chunks/{action-bar.CUDi5Po7.js.map → action-bar.CDOaDenE.js.map} +1 -1
  36. package/dist/chunks/{alert.DEf0borp.js → alert.4SefwHLO.js} +2 -2
  37. package/dist/chunks/{alert.DEf0borp.js.map → alert.4SefwHLO.js.map} +1 -1
  38. package/dist/chunks/{base-modal.BegK8cPb.js → base-modal.DZy1WuJs.js} +5 -5
  39. package/dist/chunks/{base-modal.BegK8cPb.js.map → base-modal.DZy1WuJs.js.map} +1 -1
  40. package/dist/chunks/{button-actions-with-menu.CcoKss9T.js → button-actions-with-menu.DQRTu42W.js} +4 -4
  41. package/dist/chunks/{button-actions-with-menu.CcoKss9T.js.map → button-actions-with-menu.DQRTu42W.js.map} +1 -1
  42. package/dist/chunks/{button-actions.CdlXZ29B.js → button-actions.N99QthUv.js} +2 -2
  43. package/dist/chunks/{button-actions.CdlXZ29B.js.map → button-actions.N99QthUv.js.map} +1 -1
  44. package/dist/chunks/{button.6HMG0xEY.js → button.DEVuqLVT.js} +2 -2
  45. package/dist/chunks/button.DEVuqLVT.js.map +1 -0
  46. package/dist/chunks/{calendar.BRsV4rkQ.js → calendar.CNt90BvO.js} +2 -2
  47. package/dist/chunks/calendar.CNt90BvO.js.map +1 -0
  48. package/dist/chunks/{card.C5bSqYsB.js → card.E2xhS_6Z.js} +2 -2
  49. package/dist/chunks/{card.C5bSqYsB.js.map → card.E2xhS_6Z.js.map} +1 -1
  50. package/dist/chunks/{checkbox-group.D235-2lq.js → checkbox-group.BMzsgOeI.js} +4 -4
  51. package/dist/chunks/{checkbox-group.D235-2lq.js.map → checkbox-group.BMzsgOeI.js.map} +1 -1
  52. package/dist/chunks/{checkbox.Dts62P-X.js → checkbox.BIaD03Bg.js} +17 -17
  53. package/dist/chunks/{checkbox.Dts62P-X.js.map → checkbox.BIaD03Bg.js.map} +1 -1
  54. package/dist/chunks/{code-snippet.BPZLkv_Z.js → code-snippet.DJgiqDzZ.js} +6 -6
  55. package/dist/chunks/{code-snippet.BPZLkv_Z.js.map → code-snippet.DJgiqDzZ.js.map} +1 -1
  56. package/dist/chunks/{controls-group.DcbOWqxA.js → controls-group.DJqvAWte.js} +2 -2
  57. package/dist/chunks/{controls-group.DcbOWqxA.js.map → controls-group.DJqvAWte.js.map} +1 -1
  58. package/dist/chunks/{copy.CFhrpASp.js → copy.MId-I684.js} +11 -11
  59. package/dist/chunks/{copy.CFhrpASp.js.map → copy.MId-I684.js.map} +1 -1
  60. package/dist/chunks/dashboard-section.CrbSjoA8.js +165 -0
  61. package/dist/chunks/dashboard-section.CrbSjoA8.js.map +1 -0
  62. package/dist/chunks/{dashed-underline.BYAXhfnX.js → dashed-underline.DWhGZIhS.js} +3 -3
  63. package/dist/chunks/{dashed-underline.BYAXhfnX.js.map → dashed-underline.DWhGZIhS.js.map} +1 -1
  64. package/dist/chunks/data-grid-template.LlK-7o84.js +93 -0
  65. package/dist/chunks/data-grid-template.LlK-7o84.js.map +1 -0
  66. package/dist/chunks/data-grid.CsyayKK3.js +3490 -0
  67. package/dist/chunks/data-grid.CsyayKK3.js.map +1 -0
  68. package/dist/chunks/{date-picker.DU9L_7lU.js → date-picker.CjwoOQ3B.js} +5 -5
  69. package/dist/chunks/{date-picker.DU9L_7lU.js.map → date-picker.CjwoOQ3B.js.map} +1 -1
  70. package/dist/chunks/{date-range-picker.LJJE3q1u.js → date-range-picker.DGY91Rwc.js} +27 -24
  71. package/dist/chunks/date-range-picker.DGY91Rwc.js.map +1 -0
  72. package/dist/chunks/{dialog-page.CXQafL9G.js → dialog-page.BRlAYf5w.js} +2 -2
  73. package/dist/chunks/{dialog-page.CXQafL9G.js.map → dialog-page.BRlAYf5w.js.map} +1 -1
  74. package/dist/chunks/{dropdown-default-textbox.CwsgzDpx.js → dropdown-default-textbox.CTyt2klK.js} +30 -30
  75. package/dist/chunks/{dropdown-default-textbox.CwsgzDpx.js.map → dropdown-default-textbox.CTyt2klK.js.map} +1 -1
  76. package/dist/chunks/{dropdown-tag.Deu1Ekpp.js → dropdown-tag.CJtSH5cZ.js} +3 -3
  77. package/dist/chunks/{dropdown-tag.Deu1Ekpp.js.map → dropdown-tag.CJtSH5cZ.js.map} +1 -1
  78. package/dist/chunks/{dropdown.BAwhx8jI.js → dropdown.CQvyjn6d.js} +8 -8
  79. package/dist/chunks/{dropdown.BAwhx8jI.js.map → dropdown.CQvyjn6d.js.map} +1 -1
  80. package/dist/chunks/{empty-state.BffIZp3a.js → empty-state.m0U14LVw.js} +2 -2
  81. package/dist/chunks/{empty-state.BffIZp3a.js.map → empty-state.m0U14LVw.js.map} +1 -1
  82. package/dist/chunks/{error-message.DH8Er2JS.js → error-message.CMgsMDny.js} +2 -2
  83. package/dist/chunks/{error-message.DH8Er2JS.js.map → error-message.CMgsMDny.js.map} +1 -1
  84. package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
  85. package/dist/chunks/{file-uploader.DkQDzuzC.js → file-uploader.D3KUe-MO.js} +5 -5
  86. package/dist/chunks/{file-uploader.DkQDzuzC.js.map → file-uploader.D3KUe-MO.js.map} +1 -1
  87. package/dist/chunks/{filter-bar.CqO88Dv2.js → filter-bar.cRJmUX-v.js} +30 -27
  88. package/dist/chunks/filter-bar.cRJmUX-v.js.map +1 -0
  89. package/dist/chunks/{fixed-scroller.Bfk75Nei.js → fixed-scroller.BNP4SR5J.js} +2 -2
  90. package/dist/chunks/{fixed-scroller.Bfk75Nei.js.map → fixed-scroller.BNP4SR5J.js.map} +1 -1
  91. package/dist/chunks/{focus-trap.BFCzfiI_.js → focus-trap.D9cfQpl7.js} +6 -6
  92. package/dist/chunks/{focus-trap.BFCzfiI_.js.map → focus-trap.D9cfQpl7.js.map} +1 -1
  93. package/dist/chunks/{footer-actions.A9H5F5D-.js → footer-actions.DmGDpPBW.js} +3 -3
  94. package/dist/chunks/{footer-actions.A9H5F5D-.js.map → footer-actions.DmGDpPBW.js.map} +1 -1
  95. package/dist/chunks/{form-layout-title.BWCOZyay.js → form-layout-title.P5ajTo4C.js} +2 -2
  96. package/dist/chunks/{form-layout-title.BWCOZyay.js.map → form-layout-title.P5ajTo4C.js.map} +1 -1
  97. package/dist/chunks/{header-with-views.f5wHqHsF.js → header-with-views.BJIQZVAq.js} +13 -13
  98. package/dist/chunks/{header-with-views.f5wHqHsF.js.map → header-with-views.BJIQZVAq.js.map} +1 -1
  99. package/dist/chunks/{header.CoyUQXFL.js → header.vHSsdURt.js} +4 -4
  100. package/dist/chunks/{header.CoyUQXFL.js.map → header.vHSsdURt.js.map} +1 -1
  101. package/dist/chunks/i18n.D9azDLPe.js.map +1 -1
  102. package/dist/chunks/{info-icon-with-popover.CBi7CmUZ.js → info-icon-with-popover.CXaaxjeT.js} +2 -2
  103. package/dist/chunks/{info-icon-with-popover.CBi7CmUZ.js.map → info-icon-with-popover.CXaaxjeT.js.map} +1 -1
  104. package/dist/chunks/{info-icon.Bomzzcc5.js → info-icon.7uhGVIn5.js} +2 -2
  105. package/dist/chunks/{info-icon.Bomzzcc5.js.map → info-icon.7uhGVIn5.js.map} +1 -1
  106. package/dist/chunks/{input-field-password.DXIJ0Z3R.js → input-field-password.CWr26esx.js} +6 -6
  107. package/dist/chunks/{input-field-password.DXIJ0Z3R.js.map → input-field-password.CWr26esx.js.map} +1 -1
  108. package/dist/chunks/{input-field-phone-number.KS95qk92.js → input-field-phone-number.zf8WxBCn.js} +8 -12
  109. package/dist/chunks/{input-field-phone-number.KS95qk92.js.map → input-field-phone-number.zf8WxBCn.js.map} +1 -1
  110. package/dist/chunks/{input-field.DcudjNKs.js → input-field.CR262X1w.js} +3 -3
  111. package/dist/chunks/{input-field.DcudjNKs.js.map → input-field.CR262X1w.js.map} +1 -1
  112. package/dist/chunks/{inspector.types.Fs9URmPq.js → inspector.types.YK45k4D_.js} +3 -3
  113. package/dist/chunks/{inspector.types.Fs9URmPq.js.map → inspector.types.YK45k4D_.js.map} +1 -1
  114. package/dist/chunks/keyboard-navigation.CqgGzfZQ.js.map +1 -1
  115. package/dist/chunks/{listbox-option-tag.CqnkZr9x.js → listbox-option-tag.BJh2kEN1.js} +2 -2
  116. package/dist/chunks/{listbox-option-tag.CqnkZr9x.js.map → listbox-option-tag.BJh2kEN1.js.map} +1 -1
  117. package/dist/chunks/{menu.P_KG1J8b.js → menu.CVMSGvtb.js} +5 -6
  118. package/dist/chunks/menu.CVMSGvtb.js.map +1 -0
  119. package/dist/chunks/{modal-fullscreen.DxuMKagz.js → modal-fullscreen.Cqlf6PWo.js} +5 -5
  120. package/dist/chunks/{modal-fullscreen.DxuMKagz.js.map → modal-fullscreen.Cqlf6PWo.js.map} +1 -1
  121. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.DfzxXSwn.js → modal.vue_vue_type_script_setup_true_lang.dXxru4S9.js} +5 -5
  122. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.DfzxXSwn.js.map → modal.vue_vue_type_script_setup_true_lang.dXxru4S9.js.map} +1 -1
  123. package/dist/chunks/{pagination.DzwiWHUO.js → pagination.C65tc-nX.js} +3 -3
  124. package/dist/chunks/{pagination.DzwiWHUO.js.map → pagination.C65tc-nX.js.map} +1 -1
  125. package/dist/chunks/{popover.Csq1gQ6T.js → popover.DjbACET6.js} +4 -4
  126. package/dist/chunks/{popover.Csq1gQ6T.js.map → popover.DjbACET6.js.map} +1 -1
  127. package/dist/chunks/{popper-container.DnlxQ9eS.js → popper-container.CDsbQiOS.js} +3 -3
  128. package/dist/chunks/{popper-container.DnlxQ9eS.js.map → popper-container.CDsbQiOS.js.map} +1 -1
  129. package/dist/chunks/{promo-banner.CN-TTSov.js → promo-banner.ZCfJQh-S.js} +2 -2
  130. package/dist/chunks/{promo-banner.CN-TTSov.js.map → promo-banner.ZCfJQh-S.js.map} +1 -1
  131. package/dist/chunks/{radio-group.Vm-hmL1q.js → radio-group.Tgf3BF5X.js} +4 -4
  132. package/dist/chunks/{radio-group.Vm-hmL1q.js.map → radio-group.Tgf3BF5X.js.map} +1 -1
  133. package/dist/chunks/{search-bar.SNqRBGY7.js → search-bar.CTn5DIQZ.js} +3 -3
  134. package/dist/chunks/{search-bar.SNqRBGY7.js.map → search-bar.CTn5DIQZ.js.map} +1 -1
  135. package/dist/chunks/{secondary-nav.DKXHuspN.js → secondary-nav.CnE-aV2P.js} +2 -2
  136. package/dist/chunks/{secondary-nav.DKXHuspN.js.map → secondary-nav.CnE-aV2P.js.map} +1 -1
  137. package/dist/chunks/{segmented-control.DBy-nbYM.js → segmented-control.Dg_ktsiS.js} +2 -2
  138. package/dist/chunks/{segmented-control.DBy-nbYM.js.map → segmented-control.Dg_ktsiS.js.map} +1 -1
  139. package/dist/chunks/{selection-card-group.D9dyC6Z_.js → selection-card-group.C2OFZgKd.js} +11 -11
  140. package/dist/chunks/{selection-card-group.D9dyC6Z_.js.map → selection-card-group.C2OFZgKd.js.map} +1 -1
  141. package/dist/chunks/{sidepanel.Ds2CCG9L.js → sidepanel.Drn-lKR3.js} +5 -5
  142. package/dist/chunks/{sidepanel.Ds2CCG9L.js.map → sidepanel.Drn-lKR3.js.map} +1 -1
  143. package/dist/chunks/{structured-list-item.CygGTBVl.js → structured-list-item.CWiwoP5F.js} +5 -5
  144. package/dist/chunks/{structured-list-item.CygGTBVl.js.map → structured-list-item.CWiwoP5F.js.map} +1 -1
  145. package/dist/chunks/{summary-grid.types.DzvuP-NU.js → summary-grid.types.DOYW579A.js} +5 -5
  146. package/dist/chunks/{summary-grid.types.DzvuP-NU.js.map → summary-grid.types.DOYW579A.js.map} +1 -1
  147. package/dist/chunks/tabs.DZk78MLK.js +266 -0
  148. package/dist/chunks/tabs.DZk78MLK.js.map +1 -0
  149. package/dist/chunks/{tag.C4SGN5Eb.js → tag.CmYkknFj.js} +2 -2
  150. package/dist/chunks/{tag.C4SGN5Eb.js.map → tag.CmYkknFj.js.map} +1 -1
  151. package/dist/chunks/{teleport.DfTpEQBR.js → teleport.zSiKZmRE.js} +5 -5
  152. package/dist/chunks/teleport.zSiKZmRE.js.map +1 -0
  153. package/dist/chunks/{textarea.bQwvvIkq.js → textarea.CR7su54i.js} +3 -3
  154. package/dist/chunks/{textarea.bQwvvIkq.js.map → textarea.CR7su54i.js.map} +1 -1
  155. package/dist/chunks/{timeline-item.Bxt_pNII.js → timeline-item.BhQp0ICP.js} +6 -6
  156. package/dist/chunks/{timeline-item.Bxt_pNII.js.map → timeline-item.BhQp0ICP.js.map} +1 -1
  157. package/dist/chunks/{toast.7D23cICy.js → toast.DxVfamh-.js} +2 -2
  158. package/dist/chunks/{toast.7D23cICy.js.map → toast.DxVfamh-.js.map} +1 -1
  159. package/dist/chunks/{toggle-button.7iAfO6Xx.js → toggle-button.D-9TFTy8.js} +2 -2
  160. package/dist/chunks/{toggle-button.7iAfO6Xx.js.map → toggle-button.D-9TFTy8.js.map} +1 -1
  161. package/dist/chunks/{tooltip.CyQxprBQ.js → tooltip.BkBDReK0.js} +2 -2
  162. package/dist/chunks/{tooltip.CyQxprBQ.js.map → tooltip.BkBDReK0.js.map} +1 -1
  163. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BtVT3Ltg.js → tutorial.vue_vue_type_script_setup_true_lang.ENhKvQLv.js} +5 -5
  164. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BtVT3Ltg.js.map → tutorial.vue_vue_type_script_setup_true_lang.ENhKvQLv.js.map} +1 -1
  165. package/dist/chunks/use-cached-selected-values.CQKeFUJd.js +1475 -0
  166. package/dist/chunks/use-cached-selected-values.CQKeFUJd.js.map +1 -0
  167. package/dist/code-snippet.js +1 -1
  168. package/dist/dashboard-template.js +1 -1
  169. package/dist/dashed-underline.js +1 -1
  170. package/dist/data-grid-template.js +1 -1
  171. package/dist/data-grid.js +1 -1
  172. package/dist/date-picker.js +2 -2
  173. package/dist/date-range-picker.js +2 -2
  174. package/dist/dropdown.js +4 -4
  175. package/dist/empty-state.js +1 -1
  176. package/dist/file-uploader.js +1 -1
  177. package/dist/filter-bar.js +1 -1
  178. package/dist/focus-trap.js +1 -1
  179. package/dist/form-layout.js +1 -1
  180. package/dist/header-with-views.js +1 -1
  181. package/dist/header.js +1 -1
  182. package/dist/index.js +54 -54
  183. package/dist/info-icon.js +1 -1
  184. package/dist/input-field-password.js +1 -1
  185. package/dist/input-field-phone-number.js +1 -1
  186. package/dist/input-field.js +1 -1
  187. package/dist/inspector.js +1 -1
  188. package/dist/internal.js +13 -13
  189. package/dist/menu.js +1 -1
  190. package/dist/modal-fullscreen.js +1 -1
  191. package/dist/modal.js +2 -2
  192. package/dist/pagination.js +1 -1
  193. package/dist/popover.js +1 -1
  194. package/dist/popper-container.js +1 -1
  195. package/dist/promo-banner.js +1 -1
  196. package/dist/radio-group.js +1 -1
  197. package/dist/search-bar.js +2 -2
  198. package/dist/secondary-nav.js +1 -1
  199. package/dist/segmented-control.js +1 -1
  200. package/dist/selection-card.js +1 -1
  201. package/dist/sidepanel.js +1 -1
  202. package/dist/structured-list.js +1 -1
  203. package/dist/styles/bento-dark.css +8 -4
  204. package/dist/styles/bento-light.css +8 -4
  205. package/dist/styles/bento.css +8 -4
  206. package/dist/styles/legacy.css +8 -5
  207. package/dist/styles/styleguide.css +8 -4
  208. package/dist/summary-grid.js +1 -1
  209. package/dist/tabs.js +1 -1
  210. package/dist/tag.js +1 -1
  211. package/dist/textarea.js +1 -1
  212. package/dist/timeline.js +1 -1
  213. package/dist/toast.js +1 -1
  214. package/dist/tutorial.js +1 -1
  215. package/dist/web-types.json +1 -1
  216. package/package.json +4 -4
  217. package/dist/chunks/button.6HMG0xEY.js.map +0 -1
  218. package/dist/chunks/calendar.BRsV4rkQ.js.map +0 -1
  219. package/dist/chunks/dashboard-section.DpL72ax7.js +0 -167
  220. package/dist/chunks/dashboard-section.DpL72ax7.js.map +0 -1
  221. package/dist/chunks/data-grid-template.CJxPIu3E.js +0 -93
  222. package/dist/chunks/data-grid-template.CJxPIu3E.js.map +0 -1
  223. package/dist/chunks/data-grid.jRydtYyG.js +0 -3380
  224. package/dist/chunks/data-grid.jRydtYyG.js.map +0 -1
  225. package/dist/chunks/date-range-picker.LJJE3q1u.js.map +0 -1
  226. package/dist/chunks/filter-bar.CqO88Dv2.js.map +0 -1
  227. package/dist/chunks/menu.P_KG1J8b.js.map +0 -1
  228. package/dist/chunks/tabs.B8BRqQpv.js +0 -272
  229. package/dist/chunks/tabs.B8BRqQpv.js.map +0 -1
  230. package/dist/chunks/teleport.DfTpEQBR.js.map +0 -1
  231. package/dist/chunks/use-cached-selected-values.DGfnlqdi.js +0 -1455
  232. package/dist/chunks/use-cached-selected-values.DGfnlqdi.js.map +0 -1
@@ -1,3380 +0,0 @@
1
- import { ref as T, reactive as et, toRefs as tt, computed as E, watchEffect as Un, watch as me, onMounted as nt, nextTick as ge, onUnmounted as Ut, onBeforeUpdate as Pn, createElementBlock as b, openBlock as c, mergeProps as ee, createCommentVNode as U, createElementVNode as N, toDisplayString as K, defineComponent as Ee, normalizeClass as ce, Fragment as ve, renderList as Ce, unref as s, toHandlers as Ve, createVNode as Y, createBlock as P, withCtx as H, renderSlot as Le, withModifiers as Bn, resolveComponent as he, withDirectives as lt, createTextVNode as ue, vShow as Wn, toRef as Ye, resolveDirective as Gn, Transition as Pt, createSlots as Te, resolveDynamicComponent as Me, useSlots as st, provide as Bt, inject as Ke, normalizeStyle as ke, normalizeProps as Hn, guardReactiveProps as Vn } from "vue";
2
- import { C as xn } from "./checkmark-circle-fill.jicbqe7k.js";
3
- import { W as Zn } from "./warning-filled.DmHh0nYG.js";
4
- /* empty css */
5
- import { _ as ie } from "./_plugin-vue_export-helper.CHgC5LLL.js";
6
- import { C as Wt } from "./cross.CbLEjiVy.js";
7
- import { N as _t } from "./checkbox-input.CgbJsFXD.js";
8
- import { l as St } from "./events.FNmSWp_P.js";
9
- import { K as ye, B as jn } from "./tooltip.CyQxprBQ.js";
10
- import { c as qn } from "./popper-container.types.BCZMbVFD.js";
11
- import { B as Yn } from "./action-bar.CUDi5Po7.js";
12
- import { B as Kn } from "./pagination.DzwiWHUO.js";
13
- import { B as ot } from "./loading-indicator.DEepb9Wl.js";
14
- import { B as xe, p as Gt } from "./typography.DN5eC5ch.js";
15
- import { u as it } from "./use-has-slot.B7eQSabc.js";
16
- import { u as Xn } from "./aria-label.CaUURpnB.js";
17
- import { g as Jn } from "./get-slot-text.DQlZEsId.js";
18
- import { u as Ne } from "./i18n.D9azDLPe.js";
19
- import { B as qe } from "./filter-bar.CqO88Dv2.js";
20
- import { B as Qn } from "./empty-state.BffIZp3a.js";
21
- import { E as el } from "./tabs.keys.Bc2pSKRw.js";
22
- import { D as tl } from "./data-grid-template.keys.2_AkxuNT.js";
23
- import { o as at } from "./resize.Bqks3WUm.js";
24
- import { a as wt, B as nl } from "./popover.Csq1gQ6T.js";
25
- import { B as Ht } from "./button.6HMG0xEY.js";
26
- import { B as Vt } from "./toggle.hoD_i2Ey.js";
27
- import { B as ll } from "./search-bar.SNqRBGY7.js";
28
- import { u as sl } from "./dropdown.BAwhx8jI.js";
29
- import { B as ol } from "./directive.Cbdox5VL.js";
30
- import { g as Xe } from "./generate-uid.NJ8tVoha.js";
31
- import { S as il } from "./search.CW_aTqip.js";
32
- import { B as rt } from "./toggle-button.7iAfO6Xx.js";
33
- import { B as xt } from "./checkbox.Dts62P-X.js";
34
- import { B as al } from "./info-icon.Bomzzcc5.js";
35
- import { B as Je, O as rl, D as dl } from "./menu.P_KG1J8b.js";
36
- import { A as ul } from "./dialog-page.CXQafL9G.js";
37
- import { H as cl, S as fl } from "./show.ByWWaogc.js";
38
- import { u as gl } from "./use-expandable-content-height.GkjjbmPy.js";
39
- import { E as Lt } from "./link.D3Fq5tt_.js";
40
- import { C as vl } from "./copy.CFhrpASp.js";
41
- import { C as ml, a as hl } from "./chevron-up.-0oLlHmh.js";
42
- import { d as Et, e as yt } from "./button-actions.CdlXZ29B.js";
43
- import "../assets/data-grid.css";
44
- var Qe = /* @__PURE__ */ ((e) => (e.WRAP = "wrap", e.ELLIPSIS = "ellipsis", e))(Qe || {}), Oe = /* @__PURE__ */ ((e) => (e.OUTLINE = "outline", e.SCROLL = "scroll", e.STICKY_FILTERS = "sticky-filters", e.OVERFLOW_SHADOW_LEFT = "overflow-shadow-left", e.OVERFLOW_SHADOW_RIGHT = "overflow-shadow-right", e.NO_SPACING_TOP = "no-spacing-top", e))(Oe || {}), pe = /* @__PURE__ */ ((e) => (e.ASCENDING = "asc", e.DESCENDING = "desc", e))(pe || {}), k = /* @__PURE__ */ ((e) => (e.COLUMNS = "columns", e.COLUMN_RESIZE = "column-resize", e.ITEMS_PAGE = "items-page", e.NAVIGATE = "navigate", e.NESTED_CONTENT_TOGGLED = "nested-content-toggled", e.FILTER_SEARCH_INPUT = "filter-search-input", e.FILTER_SEARCH_CLEAR = "filter-search-clear", e.UPDATE_COLUMNS = "update:columns", e.UPDATE_CONDENSED = "update:condensed", e.UPDATE_FILTERS = "update:filters", e.UPDATE_FILTER_VALUES = "update:filter-values", e.UPDATE_FILTER_SEARCH_TERM = "update:filter-search-term", e.UPDATE_PAGINATION = "update:pagination", e.UPDATE_SELECTION = "update:selection", e.UPDATE_SHOW_MORE = "update:show-more", e.UPDATE_SORT_BY = "update:sort-by", e.ROW_CLICK = "row-click", e.SELECT = "select", e.SELECT_ALL_ACROSS_PAGES = "select-all-across-pages", e.SORT = "sort", e))(k || {}), He = /* @__PURE__ */ ((e) => (e.ASCENDING = "ascending", e.DESCENDING = "descending", e.NONE = "none", e))(He || {}), te = /* @__PURE__ */ ((e) => (e.COLUMN_RESIZE = "column-resize", e.COLUMN_RESIZING = "column-resizing", e.SELECT_ALL_ROWS = "select-all-rows", e.SELECT_ALL_ACROSS_PAGES = "select-all-across-pages", e.COLUMN_MOVE = "column-move", e.COLUMN_UPDATE = "column-update", e.COLUMN_MENU_OPEN = "column-menu-open", e.COLUMN_MENU_CLOSE = "column-menu-close", e.COLUMN_HOVER = "column-hover", e.COLUMN_DRAG_START = "column-dragstart", e.COLUMN_DRAG_ENTER = "column-dragenter", e.COLUMN_DRAG_END = "column-dragend", e.COLUMN_DROP = "column-drop", e))(te || {});
45
- const Cl = (e, r) => {
46
- const v = T(null), n = T(!1), d = T(void 0), t = e.value.reduce((i, h) => (i[h.field] = null, i), {}), o = et(t), _ = tt(o);
47
- let S = 0, w = "";
48
- const p = E(
49
- () => Object.fromEntries(e.value.map(({ field: i, width: h, minWidth: $ }) => [i, { width: h, minWidth: $ }]))
50
- );
51
- Un(() => d.value = p.value);
52
- let g = null, y = null;
53
- const u = (i) => {
54
- const h = i.clientX - S, $ = w, R = d.value[$].width + h;
55
- d.value[$].width = R > p.value[$].minWidth ? R : p.value[$].minWidth, r(te.COLUMN_RESIZING, d.value), S = i.clientX;
56
- }, l = () => {
57
- n.value = !1, g == null || g(), y == null || y(), w && r(te.COLUMN_RESIZE, {
58
- field: w,
59
- width: d.value[w].width
60
- }), g = null, y = null, w = "", S = null;
61
- }, f = (i, h, $) => {
62
- if ($.preventDefault(), i) {
63
- if (n.value = !0, $.buttons !== 1) {
64
- l();
65
- return;
66
- }
67
- w = h, S = $.clientX, g = St(window, "mousemove", u), y = St(window, "mouseup", l);
68
- }
69
- };
70
- return me(
71
- () => n.value,
72
- (i, h) => {
73
- !i && h && (r(te.COLUMN_HOVER, v.value), v.value = null);
74
- }
75
- ), {
76
- resizeData: d,
77
- allColumnRefs: _,
78
- startResize: f,
79
- isResizing: n,
80
- columnHoverEventToEmitAfterResizing: v
81
- };
82
- }, _l = 100, bt = 50, fe = "b-actions-column", Sl = 32, wl = 56, Ll = 56, El = 80, yl = 36, bl = 1, Zt = 16, Ol = 20, pl = (e, r, v) => {
83
- const n = {}, d = [], t = (_) => {
84
- const S = n[_];
85
- S && S.frozen !== !0 && (n[_].frozen = !0, d.push(_));
86
- };
87
- function o() {
88
- if (d.length === v.length)
89
- return;
90
- const _ = { min: {} };
91
- let S = e, w = r, p = 0;
92
- d.forEach((g) => {
93
- S -= n[g].computedWidth, w -= n[g].flex;
94
- });
95
- for (let g = 0, y = v.length; g < y; g += 1) {
96
- const u = v[g];
97
- if (n[u.field] && n[u.field].frozen === !0)
98
- continue;
99
- let f = S / w * u.flex;
100
- f < u.minWidth && (p += u.minWidth - f, f = u.minWidth, _.min[u.field] = !0), n[u.field] = {
101
- frozen: !1,
102
- computedWidth: f,
103
- flex: u.flex
104
- };
105
- }
106
- p > 0 ? Object.keys(_.min).forEach((g) => {
107
- t(g);
108
- }) : v.forEach(({ field: g }) => {
109
- t(g);
110
- }), o();
111
- }
112
- return o(), n;
113
- }, Ot = (e, r) => {
114
- let v = bl;
115
- return r && (v += Zt * 2), e != null && e.offsetWidth ? e.offsetWidth + v : 0;
116
- }, Rl = (e) => {
117
- var r, v, n, d, t;
118
- return (r = e == null ? void 0 : e.hasNestedContent) != null && r.value || (v = e == null ? void 0 : e.hasNestedRows) != null && v.value ? (n = e == null ? void 0 : e.hasSelectableColumn) != null && n.value ? (d = e == null ? void 0 : e.hasSelectableAcrossPages) != null && d.value ? El : Ll : yl : (t = e == null ? void 0 : e.hasSelectableAcrossPages) != null && t.value ? wl : Sl;
119
- }, Nl = (e, r, v, n, d, t) => {
120
- const o = T(e.value), _ = T(r), S = T(v), w = T(n), p = T(d), g = T(!1);
121
- me(
122
- () => e.value,
123
- (L, O) => {
124
- var x, ne;
125
- const W = (L == null ? void 0 : L.map(({ field: J }) => J).toString()) === (O == null ? void 0 : O.map(({ field: J }) => J).toString());
126
- if (!((x = t == null ? void 0 : t.allowColumnDragAndDrop) != null && x.value) || !W) {
127
- o.value = e.value;
128
- return;
129
- }
130
- o.value = ((ne = o.value) == null ? void 0 : ne.length) === 0 ? e.value : e.value.sort((J, C) => {
131
- const V = o.value.findIndex((G) => G.field === J.field), F = o.value.findIndex((G) => G.field === C.field);
132
- return V === -1 ? 1 : F === -1 ? -1 : V - F;
133
- });
134
- }
135
- );
136
- const y = T();
137
- let u = null;
138
- const l = E(() => {
139
- var V, F, G;
140
- const L = [];
141
- let O = 0, W = 0;
142
- const x = {};
143
- let ne = o.value.filter((Z) => Z.visible !== !1);
144
- const J = o.value.filter((Z) => Z.visible === !1);
145
- if ((V = t == null ? void 0 : t.hasSelectableColumn) != null && V.value || (F = t == null ? void 0 : t.hasNestedContent) != null && F.value || (G = t == null ? void 0 : t.hasNestedRows) != null && G.value) {
146
- const Z = Rl(t);
147
- ne = [
148
- {
149
- field: fe,
150
- label: "",
151
- minWidth: Z,
152
- width: Z,
153
- frozen: !0,
154
- padding: { left: !1, right: !1 }
155
- },
156
- ...ne
157
- ];
158
- }
159
- ne.forEach((Z) => {
160
- const m = { ...Z };
161
- let D;
162
- m.flex && m.flex > 0 ? (O += m.flex, D = 0, L.push(m)) : D = Math.max(
163
- (m == null ? void 0 : m.width) ?? _l,
164
- (m == null ? void 0 : m.minWidth) ?? bt
165
- ), W += D, m.width = D, m.minWidth = (m == null ? void 0 : m.minWidth) ?? bt, x[m.field] = m;
166
- });
167
- const C = Math.max(y.value - W, 0);
168
- if (O > 0 && y.value > 0) {
169
- const Z = pl(C, O, L);
170
- Object.keys(Z).forEach((m) => {
171
- x[m].width = Z[m].computedWidth;
172
- });
173
- }
174
- return J.forEach((Z) => {
175
- const m = { ...Z };
176
- x[m.field] = m;
177
- }), Object.values(x);
178
- }), f = T(void 0), i = (L) => {
179
- f.value = { ...f.value, ...L };
180
- }, h = async () => {
181
- o.value.some((L) => L == null ? void 0 : L.autoWidth) && (g.value = !0, await ge(), await ge(), o == null || o.value.filter((L) => L == null ? void 0 : L.autoWidth).forEach(({ field: L, minWidth: O }) => {
182
- var J, C, V, F;
183
- const W = Ot(
184
- (J = w.value) == null ? void 0 : J[L],
185
- (C = t == null ? void 0 : t.hasColumnPanel) == null ? void 0 : C.value
186
- ), x = (F = (V = p.value) == null ? void 0 : V[L]) == null ? void 0 : F.reduce(
187
- (G, Z) => Math.max(G, Ot(Z)),
188
- 0
189
- ), ne = Math.max(W, x ?? 0);
190
- (O === void 0 || ne > O) && i({
191
- [L]: {
192
- width: ne
193
- }
194
- });
195
- }), g.value = !1);
196
- };
197
- me([() => o.value, () => _.value], async () => {
198
- o.value.some((L) => L == null ? void 0 : L.autoWidth) && await h();
199
- });
200
- const $ = E(
201
- () => l.value.map((L) => {
202
- var O, W;
203
- return {
204
- ...L,
205
- // Override column width with resized ones
206
- width: ((W = (O = f.value) == null ? void 0 : O[L.field]) == null ? void 0 : W.width) ?? L.width
207
- };
208
- })
209
- ), R = E(
210
- () => {
211
- var L;
212
- return (L = $.value) == null ? void 0 : L.filter(({ visible: O }) => O !== !1).reduce((O, W) => W.width + O, 0);
213
- }
214
- ), B = E(
215
- () => y.value <= R.value
216
- ), X = E(() => ({
217
- width: y.value > R.value ? "100%" : "fit-content"
218
- }));
219
- return nt(() => {
220
- var O;
221
- const L = t != null && t.isDataGridTemplate ? Ol : 0;
222
- ge(() => {
223
- S.value && (y.value = S.value.getBoundingClientRect().width - L);
224
- const W = me(
225
- S,
226
- () => {
227
- S.value && (ge(() => W()), u = at(S.value, ({ width: x }) => {
228
- y.value = x - L;
229
- }));
230
- },
231
- { immediate: !0 }
232
- );
233
- }), (O = document == null ? void 0 : document.fonts) != null && O.ready ? document.fonts.ready.then(() => {
234
- h();
235
- }) : h();
236
- }), Ut(() => {
237
- u == null || u.disconnect();
238
- }), Pn(() => {
239
- var L;
240
- p.value && ((L = Object.keys(p.value)) == null ? void 0 : L.length) > 0 && Object.keys(p.value).forEach((W) => {
241
- p.value[W] = [];
242
- });
243
- }), {
244
- columnDefs: $,
245
- gridColumnWidthStyle: X,
246
- onColumnWidthOverride: i,
247
- isMeasuringColumnWidths: g,
248
- isTotalWidthOfColumnsTakingUpAllAvailableGridWidth: B,
249
- columns: o,
250
- totalWidthOfAllColumns: R
251
- };
252
- }, Al = (e, r, v, n, d) => {
253
- const t = T(e.value ?? []), o = et({
254
- allItemsSelected: !1,
255
- isIndeterminate: !1
256
- }), _ = E(
257
- () => v.value.flatMap((l) => {
258
- var f;
259
- return [l, ((f = l == null ? void 0 : l.children) == null ? void 0 : f.length) > 0 ? l == null ? void 0 : l.children : []];
260
- }).flat()
261
- ), S = () => {
262
- r(k.SELECT, t.value), r(k.UPDATE_SELECTION, t.value);
263
- }, w = (l) => {
264
- var i, h, $, R, B;
265
- if (t.value = l, ((i = v.value) == null ? void 0 : i.length) > 0 && ((h = _.value) == null ? void 0 : h.filter((X) => !d(X)).every((X) => t.value.includes(n(X))))) {
266
- o.allItemsSelected = !0;
267
- const X = (($ = v.value) == null ? void 0 : $.length) > 0 && v.value.every((L) => t.value.includes(n(L)));
268
- o.isIndeterminate = !X;
269
- } else
270
- o.allItemsSelected = !1, o.isIndeterminate = ((R = t.value) == null ? void 0 : R.length) > 0 && ((B = v.value) == null ? void 0 : B.length) > 0 && v.value.some(
271
- (X) => {
272
- var L;
273
- return t.value.includes(n(X)) || ((L = X == null ? void 0 : X.children) == null ? void 0 : L.some((O) => t.value.includes(n(O))));
274
- }
275
- );
276
- }, p = (l) => {
277
- ge(() => {
278
- var f, i, h;
279
- if (o.allItemsSelected = l, l) {
280
- t.value = (i = (f = _.value) == null ? void 0 : f.filter(
281
- (R) => !d(R) && ((R == null ? void 0 : R.children) === void 0 || R.children.every((B) => !d(B)))
282
- )) == null ? void 0 : i.map((R) => n(R));
283
- const $ = ((h = v.value) == null ? void 0 : h.length) > 0 && v.value.every((R) => t.value.includes(n(R)));
284
- o.isIndeterminate = t.value.length > 0 && !$;
285
- } else
286
- t.value = [], o.isIndeterminate = !1;
287
- S();
288
- });
289
- }, g = (l, f) => {
290
- ge(() => {
291
- var i;
292
- w(((i = f == null ? void 0 : f.children) == null ? void 0 : i.length) > 0 ? y(l, f) : l), S();
293
- });
294
- }, y = (l, f) => {
295
- var $;
296
- const i = n(f), h = ($ = f.children) == null ? void 0 : $.filter((R) => !d(R)).map((R) => n(R));
297
- if (l.includes(i)) {
298
- const R = l;
299
- return h.forEach((B) => {
300
- R.includes(B) || R.push(B);
301
- }), R;
302
- }
303
- return l.filter((R) => !h.includes(R));
304
- }, u = (l, f, i) => {
305
- ge(() => {
306
- var $, R;
307
- const h = n(f);
308
- l.includes(n(i)) ? w(
309
- !l.includes(h) && (($ = f == null ? void 0 : f.children) != null && $.every((B) => l.includes(n(B)))) ? [...l, h] : l
310
- ) : w(
311
- l.includes(h) && !((R = f == null ? void 0 : f.children) != null && R.every((B) => l.includes(n(B)))) ? l.filter((B) => B !== h) : l
312
- ), S();
313
- });
314
- };
315
- return me(
316
- () => e.value,
317
- () => {
318
- w(e.value ?? []);
319
- },
320
- { immediate: !0 }
321
- ), me(
322
- () => v.value,
323
- () => {
324
- const l = v.value.filter((f) => t.value.includes(n(f))).flatMap(
325
- (f) => {
326
- var i;
327
- return ((i = f == null ? void 0 : f.children) == null ? void 0 : i.length) > 0 ? f.children.map((h) => n(h)).filter((h) => !t.value.includes(h)) : [];
328
- }
329
- );
330
- (l == null ? void 0 : l.length) > 0 ? (w([...t.value, ...l]), S()) : w(t.value);
331
- }
332
- ), { onAllRowSelect: p, onRowSelect: g, onNestedRowSelect: u, allItemsSelectedState: o, selectedItems: t };
333
- }, Tl = (e, r, v) => ({ isSorting: (o) => e.value.some((_) => _.field === o), getSortingDirection: (o) => {
334
- var _;
335
- return (_ = e.value.find((S) => S.field === o)) == null ? void 0 : _.direction;
336
- }, sortByColumnField: (o) => {
337
- var w;
338
- if (!r.value.some((p) => p.field === o && p.sortable))
339
- return;
340
- const S = [{
341
- field: o,
342
- direction: ((w = e.value.find((p) => p.field === o)) == null ? void 0 : w.direction) === pe.ASCENDING ? pe.DESCENDING : pe.ASCENDING
343
- }];
344
- v("sort", S);
345
- } });
346
- var de = ((e) => (e[e.ARROW_DOWN = ye.ARROW_DOWN] = "ARROW_DOWN", e[e.ARROW_UP = ye.ARROW_UP] = "ARROW_UP", e[e.ARROW_LEFT = ye.ARROW_LEFT] = "ARROW_LEFT", e[e.ARROW_RIGHT = ye.ARROW_RIGHT] = "ARROW_RIGHT", e[e.PAGE_UP = ye.PAGE_UP] = "PAGE_UP", e[e.PAGE_DOWN = ye.PAGE_DOWN] = "PAGE_DOWN", e[e.END = ye.END] = "END", e[e.HOME = ye.HOME] = "HOME", e))(de || {});
347
- const Il = (e, r, v) => {
348
- const n = E(() => {
349
- const u = r.value.filter(({ visible: l }) => l !== !1);
350
- return v.value ? u.length + 1 : u.length;
351
- }), d = E(
352
- () => [...Object.values(e.value)].flat(1).sort((u, l) => {
353
- const f = Number(u.getAttribute("data-cellindex")), i = Number(l.getAttribute("data-cellindex"));
354
- return f > i ? 1 : i > f ? -1 : 0;
355
- })
356
- ), t = (u) => Math.floor(u / n.value), o = (u, l, f) => {
357
- const i = d.value.length - 1, h = n.value - 1, $ = t(u), R = u - n.value * $;
358
- return {
359
- [de.PAGE_UP]: R,
360
- [de.PAGE_DOWN]: i - h + R,
361
- [de.END]: f ? i : n.value * $ + h,
362
- [de.HOME]: f ? 0 : n.value * $
363
- }[l];
364
- }, _ = (u, l) => {
365
- const i = {
366
- [de.ARROW_DOWN]: n.value,
367
- [de.ARROW_UP]: -n.value,
368
- [de.ARROW_LEFT]: -1,
369
- [de.ARROW_RIGHT]: 1
370
- }[l], h = u + i;
371
- return h < 0 || h >= d.value.length ? u : h;
372
- }, S = (u) => [
373
- de.PAGE_UP,
374
- de.PAGE_DOWN,
375
- de.END,
376
- de.HOME
377
- ].includes(u), w = (u, l, f) => {
378
- const i = d.value.indexOf(u);
379
- return S(l) ? o(i, l, f) : _(i, l);
380
- }, p = (u, l, f) => {
381
- if (!d.value.includes(u))
382
- return;
383
- const i = w(u, l, f);
384
- d.value[i].focus();
385
- }, g = (u) => u in de;
386
- return {
387
- isNavigationKeyCode: g,
388
- focusOnNextGridcell: p,
389
- navigationInput: (u) => {
390
- const { ctrlKey: l, keyCode: f, target: i } = u;
391
- Object.values(e.value).flat(1).includes(i) && g(f) && p(i, f, l);
392
- }
393
- };
394
- }, $l = 90, Dl = (e, r, v, n, d) => {
395
- const t = T(e), o = T(r), _ = T(v), S = T(n), w = E(() => t.value !== "none"), p = E(() => t.value === "automatic"), g = () => {
396
- d(k.UPDATE_SHOW_MORE);
397
- };
398
- return me(
399
- () => o.value,
400
- () => {
401
- p.value && _.value.offsetHeight / o.value * 100 > $l && !S.value && g();
402
- }
403
- ), { isLazyLoad: w, isInfiniteScroll: p, verticalScrollPosition: o, emitLazyLoadEvent: g };
404
- }, kl = (e, r, v) => {
405
- const n = T(e), d = T(r), t = et({
406
- dragging: null,
407
- dragToLeft: null,
408
- target: null
409
- }), o = (u, l = 0) => {
410
- const f = n.value.findIndex(($) => $.field === u.field), i = f + l;
411
- if (i < 0 || i > n.value.length - 1)
412
- return;
413
- const h = [...n.value];
414
- h.splice(i, 0, h.splice(f, 1)[0]), v(k.COLUMNS, h), v(k.UPDATE_COLUMNS, h);
415
- }, _ = (u, l) => {
416
- t.dragging = u, l.dataTransfer.setData("text", ""), l.dataTransfer.dropEffect = "move";
417
- }, S = (u, l) => {
418
- t.target = u;
419
- const f = l.currentTarget.getBoundingClientRect(), i = f.left + f.width / 2, h = l.clientX ?? 0;
420
- t.dragToLeft = h <= i;
421
- }, w = (u) => {
422
- var l, f;
423
- if (((l = t.dragging) == null ? void 0 : l.field) !== u.field) {
424
- const i = n.value.findIndex((L) => {
425
- var O;
426
- return L.field === ((O = t.dragging) == null ? void 0 : O.field);
427
- }), h = n.value.findIndex((L) => L.field === u.field), $ = t.dragToLeft ? h : h + 1, R = $ > i ? $ - 1 : $;
428
- let B = [...n.value];
429
- B.splice(
430
- R === -1 ? 0 : R,
431
- 0,
432
- B.splice(i, 1)[0]
433
- );
434
- const X = n.value.findIndex((L) => !(L != null && L.frozen));
435
- ((f = t.dragging) == null ? void 0 : f.frozen) !== u.frozen && $ !== X && (B = B.map(
436
- (L) => {
437
- var O;
438
- return ((O = t.dragging) == null ? void 0 : O.field) === L.field ? { ...L, frozen: !!(u != null && u.frozen) } : L;
439
- }
440
- )), v(k.COLUMNS, B), v(k.UPDATE_COLUMNS, B);
441
- }
442
- t.dragging = null, t.target = null;
443
- }, p = () => {
444
- t.dragging = null, t.dragToLeft = null, t.target = null;
445
- }, g = E(() => d.value ? {
446
- [te.COLUMN_DRAG_START]: (u, l) => _(u, l),
447
- [te.COLUMN_DRAG_ENTER]: (u, l) => S(u, l),
448
- [te.COLUMN_DROP]: (u) => w(u),
449
- [te.COLUMN_DRAG_END]: () => p()
450
- } : {}), y = E(() => (u) => d.value ? {
451
- dragenter: (l) => {
452
- l.preventDefault(), S(u, l);
453
- },
454
- drop: () => {
455
- w(u);
456
- },
457
- dragover: (l) => {
458
- l.preventDefault();
459
- }
460
- } : {});
461
- return {
462
- // Values
463
- draggingColumns: t,
464
- // Methods
465
- draggingEventsForColumns: g,
466
- draggingEventsForRowCell: y,
467
- onMoveColumnByOffset: o
468
- };
469
- }, Ml = (e, r) => {
470
- const v = T(e), n = E(
471
- () => [...v.value].sort((g, y) => g.frozen === y.frozen ? 0 : g.frozen ? -1 : 1)
472
- ), d = E(
473
- () => n.value.filter((g) => g.frozen && g.visible !== !1)
474
- ), t = E(
475
- () => n.value.filter((g) => !g.frozen && g.visible !== !1)
476
- ), o = E(
477
- () => [
478
- { columnSet: d.value, id: "frozen", isFrozenColumns: !0 },
479
- { columnSet: t.value, id: "unfrozen" }
480
- ].filter(({ columnSet: g }) => g.length)
481
- ), _ = E(
482
- () => v.value.filter((g) => (g == null ? void 0 : g.visible) !== !1 && (g == null ? void 0 : g.field) !== fe).length === 1
483
- ), S = (g) => r(k.UPDATE_CONDENSED, g), w = (g) => {
484
- r(k.COLUMNS, g), r(k.UPDATE_COLUMNS, g);
485
- };
486
- return {
487
- // Values
488
- columnSets: o,
489
- isOnlyOneVisibleColumn: _,
490
- sortedColumns: n,
491
- // Methods
492
- onConfigSettingsUpdate: S,
493
- onConfigSettingsColumnsUpdate: w,
494
- onConfigSettingsColumnUpdate: (g) => {
495
- const y = n.value.map(
496
- (u) => (u == null ? void 0 : u.field) === g.field ? g : u
497
- );
498
- w(y);
499
- }
500
- };
501
- }, pt = (e, r) => {
502
- const v = T(0);
503
- let n = null;
504
- const d = () => {
505
- e != null && e.value && r.value && (v.value = e.value.offsetHeight);
506
- };
507
- return nt(() => {
508
- ge(() => {
509
- const t = me(
510
- e,
511
- () => {
512
- e != null && e.value && (ge(() => t()), n = at(e.value, () => {
513
- d();
514
- }));
515
- },
516
- { immediate: !0 }
517
- );
518
- me(
519
- r,
520
- () => {
521
- r.value ? d() : v.value = 0;
522
- },
523
- { immediate: !0 }
524
- );
525
- });
526
- }), Ut(() => {
527
- n == null || n.disconnect();
528
- }), v;
529
- }, zl = (e, r, v, n, d) => {
530
- const t = T(0), o = T(!1), _ = T(!1);
531
- me(
532
- () => t.value,
533
- () => {
534
- e.value.scrollLeft = t.value, r.value.scrollLeft = t.value, o.value = !!t.value, _.value = r.value.scrollWidth - r.value.offsetWidth > t.value;
535
- }
536
- ), nt(async () => {
537
- var y, u;
538
- await ge(), await ge(), ((y = r.value) == null ? void 0 : y.offsetWidth) < ((u = r.value) == null ? void 0 : u.scrollWidth) && (_.value = !0);
539
- });
540
- const S = (y) => {
541
- if (t.value = y.target.scrollLeft, v.value = e.value.scrollHeight - y.target.scrollTop, n != null && n.value) {
542
- const u = y.target.scrollLeft;
543
- n.value.scrollLeft !== u && (n.value.scrollLeft = u);
544
- }
545
- }, w = (y) => {
546
- y.key !== "Tab" && y.key !== "ArrowRight" && y.key !== "ArrowLeft" || (y.preventDefault(), e.value.scrollLeft = 0, e.value.style.overflowX = "hidden", setTimeout(() => {
547
- e.value.style.overflowX = "auto";
548
- }));
549
- }, p = (y) => {
550
- const u = y.target.scrollLeft;
551
- e.value.scrollLeft !== u && (e.value.scrollLeft = u);
552
- }, g = E(() => {
553
- var y, u, l;
554
- return {
555
- "b-data-grid__horizontal-scrollbar--sticky-pagination": ((y = d == null ? void 0 : d.pagination) == null ? void 0 : y.value) && (((u = d == null ? void 0 : d.stickyPagination) == null ? void 0 : u.value) || (d == null ? void 0 : d.isDataGridTemplate)) && !((l = d == null ? void 0 : d.isLazyLoad) != null && l.value)
556
- };
557
- });
558
- return {
559
- // Values
560
- scrollLeftPosition: t,
561
- hasLeftOverflow: o,
562
- hasRightOverflow: _,
563
- horizontalScrollbarConditionalClasses: g,
564
- // Methods
565
- updateScrollPosition: S,
566
- updateScrollPositionOnFrozenColumnsNavigation: w,
567
- syncVirtualScrollerWithBody: p
568
- };
569
- }, Fl = (e, r, v, n) => {
570
- const d = T(null), t = E(() => {
571
- var f, i, h, $;
572
- if (!d.value || d.value.field === fe)
573
- return {
574
- hoveredOverColumnField: "",
575
- isSeparatorOffset: !1,
576
- noBorderLeft: !1,
577
- noBorderRight: !1
578
- };
579
- const o = (i = (f = e.value.find((R) => R.isFrozenColumns)) == null ? void 0 : f.columnSet) == null ? void 0 : i.filter((R) => R.field !== fe), _ = e.value.find((R) => !(R != null && R.isFrozenColumns)), S = d.value.frozen && (o == null ? void 0 : o[0].field) === d.value.field, w = !d.value.frozen && ((h = _ == null ? void 0 : _.columnSet) == null ? void 0 : h[0].field) === d.value.field, p = (r.value || v.value) && S, g = (r.value || v.value) && !o && w, y = o && w, u = (o == null ? void 0 : o.length) > 0 && d.value.frozen && (o == null ? void 0 : o[o.length - 1].field) === d.value.field, l = v.value && n.value && !d.value.frozen && (($ = _ == null ? void 0 : _.columnSet) == null ? void 0 : $[_.columnSet.length - 1].field) === d.value.field;
580
- return {
581
- hoveredOverColumnField: d.value.field,
582
- isSeparatorOffset: l,
583
- noBorderLeft: !!p || !!g || !!y,
584
- noBorderRight: !!u || !!l
585
- };
586
- });
587
- return {
588
- hoveredOverColumn: d,
589
- hoveredOverColumnState: t
590
- };
591
- };
592
- let Rt = 0;
593
- const Ul = {
594
- beforeCreate() {
595
- this.uuid = Rt.toString(), Rt += 1;
596
- }
597
- }, Pl = { key: 0 }, Bl = ["clip-path"], Wl = ["id"];
598
- function Gl(e, r, v, n, d, t) {
599
- return c(), b("svg", ee({ role: "img" }, e.$attrs, {
600
- class: "ui-assets-icons-16",
601
- xmlns: "http://www.w3.org/2000/svg",
602
- width: "16",
603
- height: "16",
604
- fill: "none"
605
- }), [
606
- e.$attrs["svg-title"] ? (c(), b("title", Pl, K(e.$attrs["svg-title"]), 1)) : U("", !0),
607
- N("g", {
608
- fill: "#00112C",
609
- "clip-path": "url(#uia-ui-assets/icons-16-arrow_up_down_sort__a" + e.uuid + ")"
610
- }, r[0] || (r[0] = [
611
- N("path", { d: "M9.06077 4.00011L5.00011 -0.0605469L0.939453 4.00011L2.00011 5.06077L4.25 2.81089V10.75H5.75V2.81066L8.00011 5.06077L9.06077 4.00011Z" }, null, -1),
612
- N("path", { d: "M10.25 13.1893L8.00011 10.9395L6.93945 12.0001L11.0001 16.0608L15.0608 12.0001L14.0001 10.9395L11.75 13.1896V5.25H10.25V13.1893Z" }, null, -1)
613
- ]), 8, Bl),
614
- N("defs", null, [
615
- N("clipPath", {
616
- id: "uia-ui-assets/icons-16-arrow_up_down_sort__a" + e.uuid
617
- }, r[1] || (r[1] = [
618
- N("rect", {
619
- width: "16",
620
- height: "16",
621
- fill: "#fff"
622
- }, null, -1)
623
- ]), 8, Wl)
624
- ])
625
- ], 16);
626
- }
627
- const Hl = /* @__PURE__ */ ie(Ul, [["render", Gl]]);
628
- let Nt = 0;
629
- const Vl = {
630
- beforeCreate() {
631
- this.uuid = Nt.toString(), Nt += 1;
632
- }
633
- }, xl = { key: 0 };
634
- function Zl(e, r, v, n, d, t) {
635
- return c(), b("svg", ee({ role: "img" }, e.$attrs, {
636
- class: "ui-assets-icons-16",
637
- xmlns: "http://www.w3.org/2000/svg",
638
- width: "16",
639
- height: "16",
640
- fill: "none"
641
- }), [
642
- e.$attrs["svg-title"] ? (c(), b("title", xl, K(e.$attrs["svg-title"]), 1)) : U("", !0),
643
- r[0] || (r[0] = N("path", {
644
- fill: "#00112C",
645
- d: "M12.1933 8.7454L7.93903 12.9996L8.99969 14.0603L15.0604 7.99963L8.99969 1.93896L7.93903 2.99963L12.1848 7.24541L1.24902 7.25658L1.25056 8.75658L12.1933 8.7454Z"
646
- }, null, -1))
647
- ], 16);
648
- }
649
- const jl = /* @__PURE__ */ ie(Vl, [["render", Zl]]);
650
- let At = 0;
651
- const ql = {
652
- beforeCreate() {
653
- this.uuid = At.toString(), At += 1;
654
- }
655
- }, Yl = { key: 0 }, Kl = ["clip-path"], Xl = ["id"];
656
- function Jl(e, r, v, n, d, t) {
657
- return c(), b("svg", ee({ role: "img" }, e.$attrs, {
658
- class: "ui-assets-icons-16",
659
- xmlns: "http://www.w3.org/2000/svg",
660
- width: "16",
661
- height: "16",
662
- fill: "none"
663
- }), [
664
- e.$attrs["svg-title"] ? (c(), b("title", Yl, K(e.$attrs["svg-title"]), 1)) : U("", !0),
665
- N("g", {
666
- "clip-path": "url(#uia-ui-assets/icons-16-freeze__a" + e.uuid + ")"
667
- }, r[0] || (r[0] = [
668
- N("path", {
669
- fill: "#00112C",
670
- d: "M7.99989 14.0605L9.49989 15.5605L10.5605 14.4999L8.75 12.6893V10.9334L10.169 10.116L11.6861 10.9939L12.3501 13.4688L13.7988 13.0801L13.2488 11.0301L15.2988 10.4801L14.9101 9.03129L12.4363 9.695L10.9199 8.81745V7.18276L12.4365 6.3051L14.9101 6.96875L15.2988 5.51999L13.2488 4.96999L13.7988 2.91999L12.3501 2.53129L11.686 5.00635L10.1693 5.88407L8.75 5.06648L8.75 3.31043L10.5605 1.49989L9.49989 0.439226L7.99989 1.93923L6.49989 0.439226L5.43923 1.49989L7.25 3.31066V5.06639L5.83078 5.88392L4.31419 5.00626L3.65018 2.53129L2.20141 2.91998L2.384 3.60052L2.38063 3.60143L2.75032 4.97028L0.701408 5.51999L1.0901 6.96875L1.7708 6.78612L1.77173 6.78955L3.56437 6.30541L5.07992 7.18246L5.07992 8.81775L3.564 9.69502L1.0901 9.03129L0.701408 10.4801L2.75141 11.0301L2.20141 13.0801L3.65018 13.4687L4.31414 10.994L5.83106 10.1161L7.25 10.9335V12.6891L5.43923 14.4999L6.49989 15.5605L7.99989 14.0605ZM9.41992 7.18345V8.81644L7.99992 9.63441L6.57992 8.81644L6.57992 7.18345L7.99992 6.36548L9.41992 7.18345Z"
671
- }, null, -1)
672
- ]), 8, Kl),
673
- N("defs", null, [
674
- N("clipPath", {
675
- id: "uia-ui-assets/icons-16-freeze__a" + e.uuid
676
- }, r[1] || (r[1] = [
677
- N("rect", {
678
- width: "16",
679
- height: "16",
680
- fill: "#fff",
681
- transform: "matrix(1 0 0 -1 0 16)"
682
- }, null, -1)
683
- ]), 8, Xl)
684
- ])
685
- ], 16);
686
- }
687
- const jt = /* @__PURE__ */ ie(ql, [["render", Jl]]);
688
- let Tt = 0;
689
- const Ql = {
690
- beforeCreate() {
691
- this.uuid = Tt.toString(), Tt += 1;
692
- }
693
- }, es = { key: 0 }, ts = ["clip-path"], ns = ["id"];
694
- function ls(e, r, v, n, d, t) {
695
- return c(), b("svg", ee({ role: "img" }, e.$attrs, {
696
- class: "ui-assets-icons-16",
697
- xmlns: "http://www.w3.org/2000/svg",
698
- width: "16",
699
- height: "16",
700
- fill: "none"
701
- }), [
702
- e.$attrs["svg-title"] ? (c(), b("title", es, K(e.$attrs["svg-title"]), 1)) : U("", !0),
703
- N("g", {
704
- fill: "#00112C",
705
- "clip-path": "url(#uia-ui-assets/icons-16-sort_ascending__a" + e.uuid + ")"
706
- }, r[0] || (r[0] = [
707
- N("path", { d: "M12.0001 1.93945L16.0608 6.00011L15.0001 7.06077L12.75 4.81066V12.75H11.25V4.81089L9.00011 7.06077L7.93945 6.00011L12.0001 1.93945Z" }, null, -1),
708
- N("path", { d: "M6.75 7.25H1.25V8.75H6.75V7.25Z" }, null, -1),
709
- N("path", { d: "M1.25 11.25H8.75V12.75H1.25V11.25Z" }, null, -1),
710
- N("path", { d: "M6.75 3.25H1.25V4.75H6.75V3.25Z" }, null, -1)
711
- ]), 8, ts),
712
- N("defs", null, [
713
- N("clipPath", {
714
- id: "uia-ui-assets/icons-16-sort_ascending__a" + e.uuid
715
- }, r[1] || (r[1] = [
716
- N("rect", {
717
- width: "16",
718
- height: "16",
719
- fill: "#fff"
720
- }, null, -1)
721
- ]), 8, ns)
722
- ])
723
- ], 16);
724
- }
725
- const ss = /* @__PURE__ */ ie(Ql, [["render", ls]]);
726
- let It = 0;
727
- const os = {
728
- beforeCreate() {
729
- this.uuid = It.toString(), It += 1;
730
- }
731
- }, is = { key: 0 }, as = ["clip-path"], rs = ["id"];
732
- function ds(e, r, v, n, d, t) {
733
- return c(), b("svg", ee({ role: "img" }, e.$attrs, {
734
- class: "ui-assets-icons-16",
735
- xmlns: "http://www.w3.org/2000/svg",
736
- width: "16",
737
- height: "16",
738
- fill: "none"
739
- }), [
740
- e.$attrs["svg-title"] ? (c(), b("title", is, K(e.$attrs["svg-title"]), 1)) : U("", !0),
741
- N("g", {
742
- fill: "#00112C",
743
- "clip-path": "url(#uia-ui-assets/icons-16-sort_descending__a" + e.uuid + ")"
744
- }, r[0] || (r[0] = [
745
- N("path", { d: "M12.75 3.25V11.1896L15.0001 8.93945L16.0608 10.0001L12.0001 14.0608L7.93945 10.0001L9.00011 8.93945L11.25 11.1893V3.25H12.75Z" }, null, -1),
746
- N("path", { d: "M6.75 7.25H1.25V8.75H6.75V7.25Z" }, null, -1),
747
- N("path", { d: "M1.25 3.25H9.09V4.75H1.25V3.25Z" }, null, -1),
748
- N("path", { d: "M6.75 11.25H1.25V12.75H6.75V11.25Z" }, null, -1)
749
- ]), 8, as),
750
- N("defs", null, [
751
- N("clipPath", {
752
- id: "uia-ui-assets/icons-16-sort_descending__a" + e.uuid
753
- }, r[1] || (r[1] = [
754
- N("rect", {
755
- width: "16",
756
- height: "16",
757
- fill: "#fff"
758
- }, null, -1)
759
- ]), 8, rs)
760
- ])
761
- ], 16);
762
- }
763
- const us = /* @__PURE__ */ ie(os, [["render", ds]]);
764
- let $t = 0;
765
- const cs = {
766
- beforeCreate() {
767
- this.uuid = $t.toString(), $t += 1;
768
- }
769
- }, fs = { key: 0 };
770
- function gs(e, r, v, n, d, t) {
771
- return c(), b("svg", ee({ role: "img" }, e.$attrs, {
772
- class: "ui-assets-icons-16",
773
- xmlns: "http://www.w3.org/2000/svg",
774
- width: "16",
775
- height: "16",
776
- fill: "none"
777
- }), [
778
- e.$attrs["svg-title"] ? (c(), b("title", fs, K(e.$attrs["svg-title"]), 1)) : U("", !0),
779
- r[0] || (r[0] = N("path", {
780
- fill: "#00112C",
781
- d: "M8 11.25L12.5 5.25H3.5L8 11.25Z"
782
- }, null, -1))
783
- ], 16);
784
- }
785
- const vs = /* @__PURE__ */ ie(cs, [["render", gs]]), qt = {
786
- "en-US": {
787
- columnActions: "{name} column actions",
788
- freezeColumn: "Freeze column",
789
- hideColumn: "Hide column",
790
- moveColumnLeft: "Move column left",
791
- moveColumnRight: "Move column right",
792
- selectAll: "Select all",
793
- selectPage: "Select this page",
794
- selectionMenu: "Selection menu",
795
- showColumn: "Show column",
796
- sortColumn: "Sort {name} column",
797
- sortColumnInAscendingOrder: "Sort {name} column in ascending order",
798
- sortColumnInDescendingOrder: "Sort {name} column in descending order",
799
- unfreezeColumn: "Unfreeze column"
800
- },
801
- "ja-JP": {
802
- freezeColumn: "列を固定",
803
- hideColumn: "列を非表示",
804
- moveColumnLeft: "列を左へ移動",
805
- moveColumnRight: "列を右へ移動",
806
- selectAll: "すべて選択",
807
- unfreezeColumn: "列の固定を解除"
808
- },
809
- "pt-BR": {
810
- freezeColumn: "Congelar coluna",
811
- hideColumn: "Ocultar coluna",
812
- moveColumnLeft: "Mover coluna para a esquerda",
813
- moveColumnRight: "Mover coluna para a direita",
814
- selectAll: "Selecionar tudo",
815
- unfreezeColumn: "Descongelar coluna"
816
- }
817
- }, ms = ["aria-colindex", "aria-label", "aria-sort", "data-testid", "draggable", "tabindex"], hs = {
818
- key: 0,
819
- class: "b-data-grid-columns__select-column"
820
- }, Cs = ["aria-label"], _s = { class: "b-data-grid-columns__label" }, Ss = {
821
- key: 0,
822
- class: "b-data-grid-columns__column-info-icon"
823
- }, ws = {
824
- key: 1,
825
- class: "b-data-grid-columns__column-sort"
826
- }, Ls = ["data-testid", "onMousedown"], Es = {
827
- key: 0,
828
- class: "b-data-grid-columns__column-separator"
829
- }, ys = {
830
- i18n: { messages: qt },
831
- name: "data-grid-columns"
832
- }, bs = /* @__PURE__ */ Ee({
833
- ...ys,
834
- props: {
835
- /**
836
- * Column definitions using 'key' to relate to data object.
837
- */
838
- columns: {
839
- type: Array,
840
- required: !0
841
- },
842
- /**
843
- * Columns being dragged, contains dragging column and a target column
844
- */
845
- draggingColumns: {
846
- type: Object,
847
- default: void 0
848
- },
849
- /**
850
- * Toggle the columns draggable events.
851
- */
852
- hasDraggableColumns: {
853
- type: Boolean,
854
- default: !0
855
- },
856
- /**
857
- * If resize is enabled
858
- */
859
- hasResizableColumns: {
860
- type: Boolean,
861
- default: !0
862
- },
863
- /**
864
- * Signifies if the column panel is enabled.
865
- */
866
- hasColumnPanel: {
867
- type: Boolean,
868
- default: !1
869
- },
870
- /**
871
- * If set to true, aligns the first column panel to the right of its button.
872
- */
873
- hasFirstColumnPanelRightAligned: {
874
- type: Boolean,
875
- default: !1
876
- },
877
- /**
878
- * If the data grid has overflow on the left side
879
- */
880
- hasLeftOverflow: {
881
- type: Boolean,
882
- default: !1
883
- },
884
- /**
885
- * The column hovered over state and whether the hovered over column should show a border right or left.
886
- */
887
- hoveredOverColumnState: {
888
- type: Object,
889
- required: !0
890
- },
891
- /**
892
- * Toggled to true when the DataGrid has auto width columns and is measuring the
893
- */
894
- isMeasuringColumnWidths: {
895
- type: Boolean,
896
- default: !1
897
- },
898
- /**
899
- * Used to disable hiding the last visible column.
900
- */
901
- isOnlyOneVisibleColumn: {
902
- type: Boolean,
903
- default: !1
904
- },
905
- /**
906
- * If these columns are frozen (pinned) columns
907
- */
908
- isFrozenColumns: {
909
- type: Boolean,
910
- default: !1
911
- },
912
- /**
913
- * Show frozen columns separator
914
- */
915
- showFrozenColumnsSeparator: {
916
- type: Boolean,
917
- default: !1
918
- },
919
- /**
920
- * The column all items selected state
921
- */
922
- allItemsSelectedState: {
923
- type: Object,
924
- default: void 0
925
- },
926
- /**
927
- * Determines if the user has enabled row selection
928
- */
929
- selectable: {
930
- type: Boolean,
931
- default: !1
932
- },
933
- /**
934
- * Adds an extra option when selecting all, to select items in other pages too
935
- */
936
- selectableAcrossPages: {
937
- type: Boolean,
938
- default: !1
939
- },
940
- /**
941
- * Sortby handles proper rendering of sort icon in header. Sorting currently is only supported server side.
942
- * It does make sure the currently sorted column has a more visible sort icon, and the sort icon points in the right direction.
943
- */
944
- sortBy: {
945
- type: Array,
946
- // NOTE: is an array to allow multi-sorting in the future
947
- default: () => []
948
- },
949
- /**
950
- * Truncates all data grid column headers
951
- */
952
- truncateColumnHeaders: {
953
- type: Boolean,
954
- default: !1
955
- }
956
- },
957
- emits: ["sort", "column-hover"],
958
- setup(e, { expose: r, emit: v }) {
959
- const n = e, d = v, t = 100, { t: o } = Ne({ messages: qt }), { columns: _, sortBy: S } = tt(n), w = T({}), p = T({}), g = T(), y = T(), u = (a) => d(te.SELECT_ALL_ROWS, a), l = (a) => a.field === fe, f = E(() => [
960
- {
961
- text: o("selectPage"),
962
- handler: () => u(!0)
963
- },
964
- {
965
- text: o("selectAll"),
966
- handler: () => d(te.SELECT_ALL_ACROSS_PAGES)
967
- }
968
- ]), { startResize: i, isResizing: h, columnHoverEventToEmitAfterResizing: $ } = Cl(_, d), { isSorting: R, getSortingDirection: B, sortByColumnField: X } = Tl(S, _, d), L = (a) => {
969
- var ae;
970
- if (!a.sortable)
971
- return null;
972
- const M = (ae = n.sortBy.find(({ field: Q }) => Q === a.field)) == null ? void 0 : ae.direction;
973
- return M ? {
974
- [pe.ASCENDING]: He.ASCENDING,
975
- [pe.DESCENDING]: He.DESCENDING
976
- }[M] : He.NONE;
977
- }, O = E(() => (a) => n.hasDraggableColumns ? {
978
- dragstart: (M) => {
979
- d(te.COLUMN_DRAG_START, a, M);
980
- },
981
- dragover: (M) => {
982
- M.preventDefault();
983
- },
984
- dragenter: (M) => {
985
- M.preventDefault(), d(te.COLUMN_DRAG_ENTER, a, M);
986
- },
987
- drop: () => {
988
- d(te.COLUMN_DROP, a);
989
- },
990
- dragend: () => {
991
- d(te.COLUMN_DRAG_END);
992
- }
993
- } : {}), W = E(() => (a) => [
994
- {
995
- text: o("moveColumnLeft"),
996
- handler: () => d(te.COLUMN_MOVE, a, -1),
997
- icon: ul,
998
- disabled: n.columns[0].field === a.field
999
- },
1000
- {
1001
- text: o("moveColumnRight"),
1002
- handler: () => d(te.COLUMN_MOVE, a, 1),
1003
- icon: jl,
1004
- disabled: n.columns[n.columns.length - 1].field === a.field
1005
- },
1006
- {
1007
- text: a != null && a.frozen ? o("unfreezeColumn") : o("freezeColumn"),
1008
- handler: () => d(te.COLUMN_UPDATE, { ...a, frozen: !(a != null && a.frozen) }),
1009
- icon: jt
1010
- },
1011
- {
1012
- text: (a == null ? void 0 : a.visible) !== !1 ? o("hideColumn") : o("showColumn"),
1013
- handler: () => {
1014
- d(te.COLUMN_UPDATE, {
1015
- ...a,
1016
- visible: (a == null ? void 0 : a.visible) === !1
1017
- });
1018
- },
1019
- icon: (a == null ? void 0 : a.visible) !== !1 ? cl : fl,
1020
- disabled: (a == null ? void 0 : a.mandatory) || (a == null ? void 0 : a.visible) !== !1 && n.isOnlyOneVisibleColumn
1021
- }
1022
- ]), x = (a) => {
1023
- g.value = a.field, y.value && clearTimeout(y.value);
1024
- }, ne = () => {
1025
- const a = setTimeout(() => {
1026
- g.value = "";
1027
- }, t);
1028
- y.value = a;
1029
- }, J = (a) => {
1030
- let M = {
1031
- mouseenter: () => {
1032
- x(a), h.value ? $.value = a : d("column-hover", a);
1033
- },
1034
- mouseleave: () => {
1035
- ne(), h.value ? $.value = null : d("column-hover", null);
1036
- },
1037
- focus: () => x(a)
1038
- };
1039
- return l(a) || (M = {
1040
- ...M,
1041
- ...O.value(a)
1042
- }), M;
1043
- }, C = (a) => a.infoIconTooltip || a.sortable || n.hasColumnPanel, V = (a, M) => {
1044
- var A;
1045
- ((A = w.value) == null ? void 0 : A[M]) === void 0 && (w.value = { ...w.value, [M]: null }), a !== null && (w.value[M] = a);
1046
- }, F = E(() => {
1047
- var M;
1048
- const a = {
1049
- "b-data-grid-columns--is-measuring": n.isMeasuringColumnWidths
1050
- };
1051
- return (M = _.value[0]) != null && M.frozen ? {
1052
- ...a,
1053
- "b-data-grid-columns--frozen": !0,
1054
- "b-data-grid-columns--frozen-separator": n.showFrozenColumnsSeparator,
1055
- "b-data-grid-columns--overflow-shadow-left": n.hasLeftOverflow
1056
- } : {
1057
- ...a,
1058
- "b-data-grid-columns--unfrozen": !0
1059
- };
1060
- }), G = (a, M) => a && M === 0 ? wt.BOTTOM_START : wt.BOTTOM_END, Z = (a, M) => {
1061
- var A, ae, Q, Re, Ae, se, Ie, ze, Fe, Ue;
1062
- return {
1063
- "b-data-grid-columns__column--column-hovered": a.field === n.hoveredOverColumnState.hoveredOverColumnField,
1064
- "b-data-grid-columns__column--column-hovered-no-border-left": a.field === n.hoveredOverColumnState.hoveredOverColumnField && n.hoveredOverColumnState.noBorderLeft,
1065
- "b-data-grid-columns__column--column-hovered-no-border-right": a.field === n.hoveredOverColumnState.hoveredOverColumnField && n.hoveredOverColumnState.noBorderRight,
1066
- "b-data-grid-columns__column--last-frozen-frozen-column": n.isFrozenColumns && M === _.value.length - 1,
1067
- "b-data-grid-columns__column--sortable": a.sortable,
1068
- "b-data-grid-columns__column--padding-left-unset": ((A = a == null ? void 0 : a.padding) == null ? void 0 : A.left) === !1,
1069
- "b-data-grid-columns__column--padding-right-unset": ((ae = a == null ? void 0 : a.padding) == null ? void 0 : ae.right) === !1,
1070
- "b-data-grid-columns__column--numeric": a == null ? void 0 : a.numeric,
1071
- "b-data-grid-columns__column--frozen": a == null ? void 0 : a.frozen,
1072
- "b-data-grid-columns__column--is-re-ordering": (a == null ? void 0 : a.field) === ((Re = (Q = n.draggingColumns) == null ? void 0 : Q.dragging) == null ? void 0 : Re.field),
1073
- "b-data-grid-columns__column--is-re-ordering-target-left": (a == null ? void 0 : a.field) === ((se = (Ae = n.draggingColumns) == null ? void 0 : Ae.target) == null ? void 0 : se.field) && ((Ie = n.draggingColumns) == null ? void 0 : Ie.dragToLeft),
1074
- "b-data-grid-columns__column--is-re-ordering-target-right": (a == null ? void 0 : a.field) === ((Fe = (ze = n.draggingColumns) == null ? void 0 : ze.target) == null ? void 0 : Fe.field) && !((Ue = n.draggingColumns) != null && Ue.dragToLeft),
1075
- "b-data-grid-columns__column--with-sorting-or-column-panel": a.sortable || a.infoIconTooltip || n.hasColumnPanel && g.value === a.field || n.selectableAcrossPages
1076
- };
1077
- }, m = (a) => ({
1078
- "b-data-grid-columns__column-header-and-actions--numeric": a == null ? void 0 : a.numeric
1079
- }), D = (a) => ({
1080
- "b-data-grid-columns__column-actions--numeric": a == null ? void 0 : a.numeric
1081
- }), j = (a) => ({
1082
- "b-data-grid-columns__column-separator-container--is-resizeable": n.hasResizableColumns,
1083
- "b-data-grid-columns__column-separator-container--is-offset": n.hoveredOverColumnState.hoveredOverColumnField === a.field && n.hoveredOverColumnState.isSeparatorOffset
1084
- }), le = E(() => ({
1085
- "b-data-grid-columns__column-header--truncated": n.truncateColumnHeaders
1086
- }));
1087
- return r({
1088
- columnHeaderRefs: w
1089
- }), (a, M) => (c(), b("div", {
1090
- class: ce(["b-data-grid-columns", F.value]),
1091
- "data-testid": "data-grid-columns"
1092
- }, [
1093
- (c(!0), b(ve, null, Ce(s(_), (A, ae) => (c(), b("div", ee({
1094
- key: A.field,
1095
- ref_for: !0,
1096
- ref: (Q) => V(Q, A.field),
1097
- "aria-colindex": ae + 1,
1098
- "aria-label": A.label,
1099
- "aria-sort": L(A),
1100
- class: [Z(A, ae), "b-data-grid-columns__column"],
1101
- "data-testid": `${A.field}-column-header`,
1102
- draggable: e.hasDraggableColumns && !s(h) && !l(A),
1103
- role: "columnheader",
1104
- tabindex: A.sortable || e.hasColumnPanel || A.infoIconTooltip ? "0" : "-1",
1105
- style: { width: A.autoWidth && e.isMeasuringColumnWidths ? "auto" : `${A.width}px` }
1106
- }, Ve(J(A), !0)), [
1107
- l(A) && e.selectable ? (c(), b("div", hs, [
1108
- Y(s(xt), {
1109
- "aria-label": s(o)("selectAll"),
1110
- "model-value": e.allItemsSelectedState.allItemsSelected,
1111
- "data-testid": "checkbox-select-all",
1112
- indeterminate: e.allItemsSelectedState.isIndeterminate,
1113
- value: "data-grid-select-all",
1114
- "onUpdate:modelValue": u
1115
- }, null, 8, ["aria-label", "model-value", "indeterminate"]),
1116
- e.selectableAcrossPages ? (c(), P(s(Je), {
1117
- key: 0,
1118
- class: "b-data-grid-columns__select-column-menu",
1119
- data: f.value,
1120
- "menu-position": "bottom-start",
1121
- "menu-fixed-positioning": "",
1122
- button: { variant: "tertiary", condensed: !0 }
1123
- }, {
1124
- iconLeft: H(() => [
1125
- Y(s(vs), {
1126
- "svg-title": s(o)("selectionMenu")
1127
- }, null, 8, ["svg-title"])
1128
- ]),
1129
- _: 1
1130
- }, 8, ["data"])) : U("", !0)
1131
- ])) : (c(), b(ve, { key: 1 }, [
1132
- N("div", {
1133
- "aria-label": s(o)("columnActions", { name: A.label }),
1134
- "aria-live": "polite",
1135
- role: "region",
1136
- class: ce(["b-data-grid-columns__column-header-and-actions", m(A)])
1137
- }, [
1138
- Y(s(xe), {
1139
- el: "div",
1140
- strongest: "",
1141
- class: ce(["b-data-grid-columns__column-header", le.value])
1142
- }, {
1143
- default: H(() => [
1144
- Le(a.$slots, `head-${A.field}`, { column: A }, () => [
1145
- N("span", _s, K(A.label), 1)
1146
- ], !0)
1147
- ]),
1148
- _: 2
1149
- }, 1032, ["class"]),
1150
- C(A) ? (c(), b("div", {
1151
- key: 0,
1152
- class: ce(["b-data-grid-columns__column-actions", D(A)])
1153
- }, [
1154
- A.infoIconTooltip ? (c(), b("div", Ss, [
1155
- Y(s(al), {
1156
- "tooltip-text": A.infoIconTooltip
1157
- }, null, 8, ["tooltip-text"])
1158
- ])) : U("", !0),
1159
- A.sortable ? (c(), b("div", ws, [
1160
- Y(s(rt), {
1161
- condensed: "",
1162
- toggled: s(R)(A.field),
1163
- variant: "tertiary",
1164
- onClick: (Q) => s(X)(A.field)
1165
- }, {
1166
- iconLeft: H(() => [
1167
- s(B)(A.field) ? s(B)(A.field) === s(pe).ASCENDING ? (c(), P(s(ss), {
1168
- key: 1,
1169
- "svg-title": s(o)("sortColumnInDescendingOrder", { name: A.label })
1170
- }, null, 8, ["svg-title"])) : s(B)(A.field) === s(pe).DESCENDING ? (c(), P(s(us), {
1171
- key: 2,
1172
- "svg-title": s(o)("sortColumnInAscendingOrder", { name: A.label })
1173
- }, null, 8, ["svg-title"])) : U("", !0) : (c(), P(s(Hl), {
1174
- key: 0,
1175
- "svg-title": s(o)("sortColumn", { name: A.label })
1176
- }, null, 8, ["svg-title"]))
1177
- ]),
1178
- _: 2
1179
- }, 1032, ["toggled", "onClick"])
1180
- ])) : U("", !0),
1181
- e.hasColumnPanel && g.value === A.field ? (c(), P(s(Je), {
1182
- key: 2,
1183
- ref_for: !0,
1184
- ref: (Q) => p.value[A.field] = Q,
1185
- class: "b-data-grid-columns__menu",
1186
- data: W.value(A),
1187
- "menu-position": G(e.hasFirstColumnPanelRightAligned, ae),
1188
- "menu-fixed-positioning": !0,
1189
- button: { variant: "tertiary", condensed: !0 },
1190
- onOpen: M[0] || (M[0] = (Q) => a.$emit(s(te).COLUMN_MENU_OPEN)),
1191
- onClose: M[1] || (M[1] = (Q) => a.$emit(s(te).COLUMN_MENU_CLOSE))
1192
- }, null, 8, ["data", "menu-position"])) : U("", !0)
1193
- ], 2)) : U("", !0)
1194
- ], 10, Cs),
1195
- N("div", {
1196
- "data-testid": `data-grid-column-${A.field}`,
1197
- class: ce(["b-data-grid-columns__column-separator-container", j(A)]),
1198
- role: "presentation",
1199
- onMousedown: (Q) => s(i)(e.hasResizableColumns, A.field, Q),
1200
- onClick: M[2] || (M[2] = Bn(() => {
1201
- }, ["stop"]))
1202
- }, [
1203
- !e.isFrozenColumns || e.isFrozenColumns && ae !== s(_).length - 1 ? (c(), b("div", Es)) : U("", !0)
1204
- ], 42, Ls)
1205
- ], 64))
1206
- ], 16, ms))), 128))
1207
- ], 2));
1208
- }
1209
- }), Os = /* @__PURE__ */ ie(bs, [["__scopeId", "data-v-cfa55fda"]]);
1210
- var be = /* @__PURE__ */ ((e) => (e.CONFIG_SETTINGS = "config-settings", e.UPDATE_COLUMNS = "update:columns", e))(be || {});
1211
- let Dt = 0;
1212
- const ps = {
1213
- beforeCreate() {
1214
- this.uuid = Dt.toString(), Dt += 1;
1215
- }
1216
- }, Rs = { key: 0 }, Ns = ["clip-path"], As = ["id"];
1217
- function Ts(e, r, v, n, d, t) {
1218
- return c(), b("svg", ee({ role: "img" }, e.$attrs, {
1219
- class: "ui-assets-icons-16",
1220
- xmlns: "http://www.w3.org/2000/svg",
1221
- width: "16",
1222
- height: "16",
1223
- fill: "none"
1224
- }), [
1225
- e.$attrs["svg-title"] ? (c(), b("title", Rs, K(e.$attrs["svg-title"]), 1)) : U("", !0),
1226
- N("g", {
1227
- fill: "#00112C",
1228
- "clip-path": "url(#uia-ui-assets/icons-16-settings__a" + e.uuid + ")"
1229
- }, r[0] || (r[0] = [
1230
- N("path", { d: "M8 5.25C6.48122 5.25 5.25 6.48122 5.25 8C5.25 9.51878 6.48122 10.75 8 10.75C9.51878 10.75 10.75 9.51878 10.75 8C10.75 6.48122 9.51878 5.25 8 5.25ZM6.75 8C6.75 7.30964 7.30964 6.75 8 6.75C8.69036 6.75 9.25 7.30964 9.25 8C9.25 8.69036 8.69036 9.25 8 9.25C7.30964 9.25 6.75 8.69036 6.75 8Z" }, null, -1),
1231
- N("path", { d: "M6.84701 0.973015L6.59985 0.35083L5.9537 0.526056C4.64534 0.880867 3.48225 1.56808 2.55285 2.48641L2.07533 2.95826L2.49158 3.48495C2.79648 3.87074 2.85279 4.419 2.58992 4.87589C2.32905 5.32931 1.82436 5.55631 1.33473 5.48726L0.677319 5.39455L0.505539 6.03586C0.33838 6.65992 0.25 7.32519 0.25 7.99991C0.25 8.67463 0.33838 9.3399 0.505539 9.96396L0.677319 10.6053L1.33473 10.5126C1.82436 10.4435 2.32905 10.6705 2.58992 11.1239C2.85279 11.5808 2.79648 12.1291 2.49158 12.5149L2.07533 13.0416L2.55285 13.5134C3.48225 14.4317 4.64534 15.119 5.9537 15.4738L6.59985 15.649L6.84701 15.0268C7.02659 14.5748 7.47549 14.2499 8 14.2499C8.52452 14.2499 8.97341 14.5748 9.15299 15.0268L9.40016 15.649L10.0463 15.4738C11.3547 15.119 12.5177 14.4317 13.4471 13.5134L13.9247 13.0416L13.5084 12.5149C13.2035 12.1291 13.1472 11.5808 13.4101 11.1239C13.671 10.6705 14.1756 10.4435 14.6653 10.5126L15.3227 10.6053L15.4945 9.96396C15.6616 9.3399 15.75 8.67463 15.75 7.99991C15.75 7.32519 15.6616 6.65992 15.4945 6.03586L15.3227 5.39455L14.6653 5.48726C14.1756 5.55631 13.671 5.32931 13.4101 4.87589C13.1472 4.419 13.2035 3.87074 13.5084 3.48495L13.9247 2.95826L13.4471 2.48641C12.5177 1.56808 11.3547 0.880867 10.0463 0.526056L9.40016 0.35083L9.15299 0.973015C8.97341 1.42506 8.52452 1.74991 8 1.74991C7.47549 1.74991 7.02659 1.42506 6.84701 0.973015ZM3.89008 5.62393C4.33946 4.84286 4.36394 3.9353 4.03405 3.16853C4.55803 2.73795 5.15349 2.39116 5.80146 2.14902C6.30062 2.81653 7.10051 3.24991 8 3.24991C8.89949 3.24991 9.69938 2.81653 10.1985 2.14902C10.8465 2.39116 11.442 2.73795 11.966 3.16853C11.6361 3.9353 11.6605 4.84287 12.1099 5.62393C12.5612 6.40839 13.3382 6.88092 14.1658 6.97982C14.221 7.31075 14.25 7.65319 14.25 7.99991C14.25 8.34663 14.221 8.68908 14.1658 9.02001C13.3382 9.11891 12.5612 9.59143 12.1099 10.3759C11.6605 11.157 11.6361 12.0645 11.9659 12.8313C11.442 13.2619 10.8465 13.6087 10.1985 13.8508C9.69938 13.1833 8.89949 12.7499 8 12.7499C7.10051 12.7499 6.30062 13.1833 5.80146 13.8508C5.15349 13.6087 4.55803 13.2619 4.03405 12.8313C4.36394 12.0645 4.33946 11.157 3.89008 10.3759C3.43875 9.59143 2.66177 9.1189 1.8342 9.02C1.77896 8.68908 1.75 8.34663 1.75 7.99991C1.75 7.65319 1.77896 7.31074 1.8342 6.97982C2.66177 6.88092 3.43875 6.40839 3.89008 5.62393Z" }, null, -1)
1232
- ]), 8, Ns),
1233
- N("defs", null, [
1234
- N("clipPath", {
1235
- id: "uia-ui-assets/icons-16-settings__a" + e.uuid
1236
- }, r[1] || (r[1] = [
1237
- N("rect", {
1238
- width: "16",
1239
- height: "16",
1240
- fill: "#fff"
1241
- }, null, -1)
1242
- ]), 8, As)
1243
- ])
1244
- ], 16);
1245
- }
1246
- const Is = /* @__PURE__ */ ie(ps, [["render", Ts]]), kt = {
1247
- "en-US": {
1248
- toggleColumnFreeze: "Toggle {label} column freeze",
1249
- toggleColumnVisibility: "Toggle {label} column visibility"
1250
- }
1251
- }, $s = Ee({
1252
- i18n: { messages: kt },
1253
- name: "bento-data-grid",
1254
- components: {
1255
- BentoFreezeIcon: jt,
1256
- BentoToggle: Vt
1257
- },
1258
- props: {
1259
- /**
1260
- * Is column visibitlity toggle disabled
1261
- */
1262
- isColumnVisibilityToggleDisabled: {
1263
- type: Boolean,
1264
- required: !0
1265
- },
1266
- /**
1267
- * Column definition
1268
- */
1269
- column: {
1270
- type: Object,
1271
- required: !0
1272
- }
1273
- },
1274
- emits: ["visible-column", "updated-column"],
1275
- setup(e, { emit: r }) {
1276
- const { t: v } = Ne({ messages: kt }), n = T(!1), d = E(() => {
1277
- var g;
1278
- return (g = e.column) == null ? void 0 : g.frozen;
1279
- }), t = E(() => {
1280
- var g;
1281
- return ((g = e.column) == null ? void 0 : g.visible) !== !1;
1282
- }), o = () => {
1283
- r("visible-column", { ...e.column, visible: !t.value });
1284
- }, _ = () => {
1285
- r("updated-column", { ...e.column, frozen: !d.value });
1286
- }, S = () => {
1287
- d.value || (n.value = !0);
1288
- }, w = () => {
1289
- d.value || (n.value = !1);
1290
- }, p = E(() => ({
1291
- "b-data-grid-config-settings-column-row__freeze-icon--frozen": d.value
1292
- }));
1293
- return {
1294
- // Values
1295
- isFreezeIconOptionShown: n,
1296
- isColumnFrozen: d,
1297
- freezeIconConditionalClasses: p,
1298
- isColumnVisible: t,
1299
- // Methods
1300
- toggleColumnVisibility: o,
1301
- showFreezeIcon: S,
1302
- hideFreezeIcon: w,
1303
- toggleColumnFreeze: _,
1304
- // Translations
1305
- t: v
1306
- };
1307
- }
1308
- });
1309
- function Ds(e, r, v, n, d, t) {
1310
- const o = he("bento-toggle"), _ = he("bento-freeze-icon");
1311
- return c(), b("div", {
1312
- class: "b-data-grid-config-settings-column-row",
1313
- onMouseover: r[0] || (r[0] = (...S) => e.showFreezeIcon && e.showFreezeIcon(...S)),
1314
- onMouseleave: r[1] || (r[1] = (...S) => e.hideFreezeIcon && e.hideFreezeIcon(...S))
1315
- }, [
1316
- Y(o, {
1317
- "aria-label": e.t("toggleColumnVisibility", { label: e.column.label }),
1318
- disabled: e.isColumnVisibilityToggleDisabled,
1319
- "label-position": "after",
1320
- value: e.isColumnVisible,
1321
- onInput: e.toggleColumnVisibility
1322
- }, {
1323
- default: H(() => [
1324
- ue(K(e.column.label), 1)
1325
- ]),
1326
- _: 1
1327
- }, 8, ["aria-label", "disabled", "value", "onInput"]),
1328
- lt(Y(_, {
1329
- "aria-label": e.t("toggleColumnFreeze", { label: e.column.label }),
1330
- class: ce(["b-data-grid-config-settings-column-row__freeze-icon", e.freezeIconConditionalClasses]),
1331
- onClick: e.toggleColumnFreeze
1332
- }, null, 8, ["aria-label", "class", "onClick"]), [
1333
- [Wn, e.isColumnFrozen || e.isFreezeIconOptionShown]
1334
- ])
1335
- ], 32);
1336
- }
1337
- const ks = /* @__PURE__ */ ie($s, [["render", Ds], ["__scopeId", "data-v-bb87a729"]]), Mt = {
1338
- "en-US": {
1339
- closeConfigSettingsPanel: "Close configuration settings panel",
1340
- closeSearch: "Close search",
1341
- columnVisibilitySearchFilter: "Column visibility search filter",
1342
- columns: "Columns",
1343
- condensed: "Condensed",
1344
- condensedToggle: "Condensed toggle",
1345
- configSettingsPanel: "Configuration settings Panel",
1346
- displayOptions: "Display options",
1347
- noColumnsMatch: "No columns match this search",
1348
- search: "Search",
1349
- showAllColumns: "Show all columns ({numberOfColumns})",
1350
- size: "Size",
1351
- toggleConfigSettingsPanelVisibility: "Toggle Configuration settings panel visibility"
1352
- },
1353
- "ja-JP": {
1354
- condensed: "凝縮",
1355
- search: "検索",
1356
- size: "サイズ"
1357
- },
1358
- "pt-BR": {
1359
- condensed: "Condensado",
1360
- search: "Buscar",
1361
- size: "Tamanho"
1362
- }
1363
- }, Ms = Ee({
1364
- i18n: { messages: Mt },
1365
- name: "bento-data-grid",
1366
- components: {
1367
- BentoButton: Ht,
1368
- BentoCrossIcon: Wt,
1369
- BentoPopover: nl,
1370
- BentoSettingsIcon: Is,
1371
- BentoToggleButton: rt,
1372
- BentoDataGridConfigSettingsConfigRow: ks,
1373
- BentoSearchBar: ll,
1374
- BentoSearchIcon: il,
1375
- BentoToggle: Vt,
1376
- BentoTypography: xe
1377
- },
1378
- directives: { BentoClickOutsideDirective: ol },
1379
- props: {
1380
- /**
1381
- * Column definitions
1382
- */
1383
- columns: {
1384
- type: Array,
1385
- required: !0
1386
- },
1387
- /**
1388
- * Sets the row cells to the condensed padding state.
1389
- */
1390
- condensed: {
1391
- type: Boolean,
1392
- default: !1
1393
- }
1394
- },
1395
- emits: [be.CONFIG_SETTINGS, be.UPDATE_COLUMNS],
1396
- setup(e, { emit: r }) {
1397
- const { t: v } = Ne({ messages: Mt }), n = T(null), d = Xe("data-grid-config-settings-popover"), t = T(null), o = T(!1), _ = T(!0), S = T(null), w = T(""), p = Ye(e, "columns"), g = T(!1), y = sl(w, p), u = () => {
1398
- w.value = "";
1399
- }, l = E(
1400
- () => !e.columns.some((O) => O.visible === !1 && !O.mandatory)
1401
- ), f = () => {
1402
- u(), g.value = !g.value, g.value ? ge(() => {
1403
- var O;
1404
- return (O = t.value.$refs.bentoInputField) == null ? void 0 : O.focusInput();
1405
- }) : ge(() => {
1406
- var O, W;
1407
- return (W = (O = S == null ? void 0 : S.value) == null ? void 0 : O.$el) == null ? void 0 : W.focus();
1408
- }), _.value = l.value;
1409
- }, i = (O) => O.mandatory ?? !1, h = (O) => {
1410
- const W = e.columns.map((x) => ({
1411
- ...x,
1412
- visible: O.field === x.field ? O.visible : x.visible
1413
- }));
1414
- r(be.UPDATE_COLUMNS, W);
1415
- }, $ = (O) => {
1416
- O ? r(
1417
- be.UPDATE_COLUMNS,
1418
- e.columns.map((W) => ({ ...W, visible: !0 }))
1419
- ) : r(
1420
- be.UPDATE_COLUMNS,
1421
- e.columns.map((W) => ({ ...W, visible: (W == null ? void 0 : W.mandatory) === !0 }))
1422
- );
1423
- }, R = (O) => {
1424
- const W = e.columns.map((x) => ({
1425
- ...x,
1426
- frozen: O.field === x.field ? !!(O != null && O.frozen) : !!(x != null && x.frozen)
1427
- }));
1428
- r(be.UPDATE_COLUMNS, W);
1429
- }, B = (O) => {
1430
- o.value = O, _.value = l.value;
1431
- };
1432
- return {
1433
- // Values
1434
- configSettingsButtonRef: n,
1435
- popoverId: d,
1436
- isConfigSettingsPanelOpen: o,
1437
- allColumnsVisbilityToggleState: _,
1438
- filteredColumnVisibilityColumns: y,
1439
- searchTerm: w,
1440
- isColumnVisibilityFilterShown: g,
1441
- searchBarRef: t,
1442
- searchButtonRef: S,
1443
- DATAGRID_ACTIONS_COLUMN_FIELD_NAME: fe,
1444
- // Methods
1445
- setConfigSettingsPanelVisibility: B,
1446
- emitCondensedToggle: (O) => r(be.CONFIG_SETTINGS, O),
1447
- toggleAllColumnVisibility: $,
1448
- clearAction: u,
1449
- toggleColumnFilter: f,
1450
- emitVisibleColumns: h,
1451
- emitFrozenColumns: R,
1452
- onClickOutside: () => B(!1),
1453
- isColumnVisibilityToggleDisabled: i,
1454
- // Translations
1455
- t: v
1456
- };
1457
- }
1458
- }), zs = { class: "b-data-grid-config-settings" }, Fs = { class: "b-data-grid-config-settings__button-and-separator" }, Us = {
1459
- ref: "configSettingsButtonRef",
1460
- class: "b-data-grid-config-settings__button-container"
1461
- }, Ps = { class: "b-data-grid-config-settings__panel-header" }, Bs = { class: "b-data-grid-config-settings__condensed-view-settings" }, Ws = { class: "b-data-grid-config-settings__column-visibility-settings" }, Gs = { class: "b-data-grid-config-settings__column-visibility-header" }, Hs = {
1462
- key: 0,
1463
- class: "b-data-grid-config-settings__column-visibility-search"
1464
- }, Vs = {
1465
- key: 1,
1466
- class: "b-data-grid-config-settings__column-visibility-show-all"
1467
- }, xs = { class: "b-data-grid-config-settings__column-visibility-toggles" };
1468
- function Zs(e, r, v, n, d, t) {
1469
- const o = he("bento-settings-icon"), _ = he("bento-toggle-button"), S = he("bento-typography"), w = he("bento-cross-icon"), p = he("bento-button"), g = he("bento-toggle"), y = he("bento-search-icon"), u = he("bento-search-bar"), l = he("bento-data-grid-config-settings-config-row"), f = he("bento-popover"), i = Gn("bento-click-outside-directive");
1470
- return lt((c(), b("div", zs, [
1471
- N("div", Fs, [
1472
- N("div", Us, [
1473
- Y(_, {
1474
- "aria-controls": e.isConfigSettingsPanelOpen ? e.popoverId : null,
1475
- variant: "tertiary",
1476
- condensed: "",
1477
- toggled: e.isConfigSettingsPanelOpen,
1478
- onClick: r[0] || (r[0] = (h) => e.setConfigSettingsPanelVisibility(!e.isConfigSettingsPanelOpen))
1479
- }, {
1480
- iconLeft: H(() => [
1481
- Y(o, {
1482
- "svg-title": e.t("toggleConfigSettingsPanelVisibility")
1483
- }, null, 8, ["svg-title"])
1484
- ]),
1485
- _: 1
1486
- }, 8, ["aria-controls", "toggled"])
1487
- ], 512)
1488
- ]),
1489
- e.configSettingsButtonRef ? (c(), P(f, {
1490
- key: 0,
1491
- id: e.popoverId,
1492
- open: e.isConfigSettingsPanelOpen,
1493
- class: "b-data-grid-config-settings__panel",
1494
- "aria-label": e.t("configSettingsPanel"),
1495
- "target-element": e.configSettingsButtonRef,
1496
- position: "bottom-end"
1497
- }, {
1498
- default: H(() => [
1499
- N("div", Ps, [
1500
- Y(S, {
1501
- el: "span",
1502
- strongest: ""
1503
- }, {
1504
- default: H(() => [
1505
- ue(K(e.t("displayOptions")), 1)
1506
- ]),
1507
- _: 1
1508
- }),
1509
- Y(p, {
1510
- variant: "tertiary",
1511
- onClick: r[1] || (r[1] = (h) => e.setConfigSettingsPanelVisibility(!1))
1512
- }, {
1513
- iconLeft: H(() => [
1514
- Y(w, {
1515
- "svg-title": e.t("closeConfigSettingsPanel")
1516
- }, null, 8, ["svg-title"])
1517
- ]),
1518
- _: 1
1519
- })
1520
- ]),
1521
- N("div", Bs, [
1522
- Y(S, {
1523
- class: "b-data-grid-config-settings__condensed-view-title",
1524
- el: "span",
1525
- stronger: ""
1526
- }, {
1527
- default: H(() => [
1528
- ue(K(e.t("size")), 1)
1529
- ]),
1530
- _: 1
1531
- }),
1532
- Y(g, {
1533
- "label-position": "after",
1534
- "aria-label": e.t("condensedToggle"),
1535
- value: e.condensed,
1536
- onInput: e.emitCondensedToggle
1537
- }, {
1538
- default: H(() => [
1539
- ue(K(e.t("condensed")), 1)
1540
- ]),
1541
- _: 1
1542
- }, 8, ["aria-label", "value", "onInput"])
1543
- ]),
1544
- N("div", Ws, [
1545
- N("div", Gs, [
1546
- Y(S, {
1547
- class: "b-data-grid-config-settings__column-visibility-title",
1548
- el: "span",
1549
- stronger: ""
1550
- }, {
1551
- default: H(() => [
1552
- ue(K(e.t("columns")), 1)
1553
- ]),
1554
- _: 1
1555
- }),
1556
- e.isColumnVisibilityFilterShown ? (c(), P(p, {
1557
- key: 1,
1558
- variant: "tertiary",
1559
- onClick: e.toggleColumnFilter
1560
- }, {
1561
- iconLeft: H(() => [
1562
- Y(w)
1563
- ]),
1564
- default: H(() => [
1565
- ue(" " + K(e.t("closeSearch")), 1)
1566
- ]),
1567
- _: 1
1568
- }, 8, ["onClick"])) : (c(), P(p, {
1569
- key: 0,
1570
- ref: "searchButtonRef",
1571
- variant: "tertiary",
1572
- onClick: e.toggleColumnFilter
1573
- }, {
1574
- iconLeft: H(() => [
1575
- Y(y)
1576
- ]),
1577
- default: H(() => [
1578
- ue(K(e.t("search")), 1)
1579
- ]),
1580
- _: 1
1581
- }, 8, ["onClick"]))
1582
- ]),
1583
- e.isColumnVisibilityFilterShown ? (c(), b("div", Hs, [
1584
- Y(u, {
1585
- ref: "searchBarRef",
1586
- value: e.searchTerm,
1587
- "input-field-aria-label": e.t("columnVisibilitySearchFilter").toString(),
1588
- onInput: r[2] || (r[2] = (h) => e.searchTerm = h),
1589
- onClear: e.clearAction,
1590
- onEscapePressed: e.toggleColumnFilter
1591
- }, null, 8, ["value", "input-field-aria-label", "onClear", "onEscapePressed"])
1592
- ])) : (c(), b("div", Vs, [
1593
- Y(g, {
1594
- "label-position": "after",
1595
- value: e.allColumnsVisbilityToggleState,
1596
- onInput: e.toggleAllColumnVisibility
1597
- }, {
1598
- default: H(() => [
1599
- ue(K(e.t("showAllColumns", { numberOfColumns: e.columns.length })), 1)
1600
- ]),
1601
- _: 1
1602
- }, 8, ["value", "onInput"])
1603
- ])),
1604
- N("div", xs, [
1605
- (c(!0), b(ve, null, Ce(e.filteredColumnVisibilityColumns, (h) => (c(), b("div", {
1606
- key: h.field
1607
- }, [
1608
- h.field !== e.DATAGRID_ACTIONS_COLUMN_FIELD_NAME ? (c(), P(l, {
1609
- key: 0,
1610
- column: h,
1611
- "is-column-visibility-toggle-disabled": e.isColumnVisibilityToggleDisabled(h),
1612
- onVisibleColumn: e.emitVisibleColumns,
1613
- onUpdatedColumn: e.emitFrozenColumns
1614
- }, null, 8, ["column", "is-column-visibility-toggle-disabled", "onVisibleColumn", "onUpdatedColumn"])) : U("", !0)
1615
- ]))), 128)),
1616
- e.filteredColumnVisibilityColumns.length === 0 ? (c(), P(S, {
1617
- key: 0,
1618
- el: "span",
1619
- class: "b-data-grid-config-settings__column-visibility-empty-search-message"
1620
- }, {
1621
- default: H(() => [
1622
- ue(K(e.t("noColumnsMatch")), 1)
1623
- ]),
1624
- _: 1
1625
- })) : U("", !0)
1626
- ])
1627
- ])
1628
- ]),
1629
- _: 1
1630
- }, 8, ["id", "open", "aria-label", "target-element"])) : U("", !0)
1631
- ])), [
1632
- [i, e.onClickOutside]
1633
- ]);
1634
- }
1635
- const js = /* @__PURE__ */ ie(Ms, [["render", Zs], ["__scopeId", "data-v-f5950a53"]]), Ze = {
1636
- "en-US": {
1637
- gettingYourData: "Getting your data",
1638
- loading: "Loading",
1639
- selectRow: "Select row",
1640
- showMore: "Show more",
1641
- sortAscending: "{field} sort ascending",
1642
- sortDescending: "{field} sort descending",
1643
- sortInactive: "{field} sort inactive"
1644
- },
1645
- "ja-JP": {
1646
- loading: "読み込み中",
1647
- showMore: "表示内容を増やす"
1648
- },
1649
- "pt-BR": {
1650
- loading: "Carregando",
1651
- showMore: "Mostrar mais"
1652
- }
1653
- }, qs = { class: "b-data-grid-lazy-load" }, Ys = {
1654
- i18n: { messages: Ze }
1655
- }, Ks = /* @__PURE__ */ Ee({
1656
- ...Ys,
1657
- __name: "data-grid-lazy-load",
1658
- props: {
1659
- loading: { type: Boolean },
1660
- isInfiniteScroll: { type: Boolean }
1661
- },
1662
- setup(e) {
1663
- const { t: r } = Ne({ messages: Ze });
1664
- return (v, n) => (c(), b("div", qs, [
1665
- v.loading && v.isInfiniteScroll ? (c(), P(s(ot), { key: 0 })) : U("", !0),
1666
- v.loading && !v.isInfiniteScroll ? (c(), P(s(Et), {
1667
- key: 1,
1668
- variant: "secondary",
1669
- state: s(yt).LOADING
1670
- }, {
1671
- default: H(() => [
1672
- ue(K(s(r)("loading")), 1)
1673
- ]),
1674
- _: 1
1675
- }, 8, ["state"])) : U("", !0),
1676
- !v.loading && !v.isInfiniteScroll ? (c(), P(s(Et), {
1677
- key: 2,
1678
- state: s(yt).START,
1679
- variant: "secondary",
1680
- onClick: n[0] || (n[0] = (d) => v.$emit(s(k).UPDATE_SHOW_MORE))
1681
- }, {
1682
- default: H(() => [
1683
- ue(K(s(r)("showMore")), 1)
1684
- ]),
1685
- _: 1
1686
- }, 8, ["state"])) : U("", !0)
1687
- ]));
1688
- }
1689
- }), Xs = /* @__PURE__ */ ie(Ks, [["__scopeId", "data-v-a4824c2d"]]);
1690
- let zt = 0;
1691
- const Js = {
1692
- beforeCreate() {
1693
- this.uuid = zt.toString(), zt += 1;
1694
- }
1695
- }, Qs = { key: 0 };
1696
- function eo(e, r, v, n, d, t) {
1697
- return c(), b("svg", ee({ role: "img" }, e.$attrs, {
1698
- class: "ui-assets-icons-16",
1699
- xmlns: "http://www.w3.org/2000/svg",
1700
- width: "16",
1701
- height: "16",
1702
- fill: "none"
1703
- }), [
1704
- e.$attrs["svg-title"] ? (c(), b("title", Qs, K(e.$attrs["svg-title"]), 1)) : U("", !0),
1705
- r[0] || (r[0] = N("path", {
1706
- fill: "#00112C",
1707
- d: "M12.9243 1.86372C12.0456 0.985043 10.621 0.985041 9.74234 1.86372L1.25 10.3561V14.7501H5.64399L14.1363 6.25772C15.015 5.37904 15.015 3.95442 14.1363 3.07574L12.9243 1.86372ZM10.803 2.92438C11.0959 2.63149 11.5708 2.63149 11.8637 2.92438L13.0757 4.1364C13.3686 4.42929 13.3686 4.90416 13.0757 5.19706L12.3333 5.93947L10.0606 3.6668L10.803 2.92438ZM8.99993 4.72746L11.2726 7.00013L5.02267 13.2501H2.75V10.9774L8.99993 4.72746Z"
1708
- }, null, -1))
1709
- ], 16);
1710
- }
1711
- const to = /* @__PURE__ */ ie(Js, [["render", eo]]), Yt = {
1712
- "en-US": {
1713
- copy: "Copy",
1714
- edit: "Edit",
1715
- more: "More",
1716
- open: "Open"
1717
- },
1718
- "ja-JP": {
1719
- copy: "コピー",
1720
- edit: "編集",
1721
- more: "表示を増やす",
1722
- open: "を開く"
1723
- },
1724
- "pt-BR": {
1725
- copy: "Copiar",
1726
- edit: "Editar",
1727
- more: "Mais",
1728
- open: "Abrir"
1729
- }
1730
- }, no = { class: "b-data-grid-cell-actions" }, lo = {
1731
- class: "b-data-grid-cell-actions__actions",
1732
- role: "group"
1733
- }, so = {
1734
- i18n: { messages: Yt },
1735
- name: "data-grid-cell-actions"
1736
- }, oo = /* @__PURE__ */ Ee({
1737
- ...so,
1738
- props: {
1739
- /**
1740
- * Column definitions using 'key' to relate to data object.
1741
- */
1742
- cellActions: {
1743
- type: [Array, Function],
1744
- required: !0,
1745
- validator: (e) => (e == null ? void 0 : e.length) <= 2
1746
- },
1747
- /**
1748
- * The column field key.
1749
- */
1750
- columnKey: {
1751
- type: String,
1752
- required: !0
1753
- },
1754
- /**
1755
- * The row data item object.
1756
- */
1757
- rowDataItem: {
1758
- type: Object,
1759
- required: !0
1760
- }
1761
- },
1762
- emits: ["menu-item-click-close"],
1763
- setup(e, { emit: r }) {
1764
- const { t: v } = Ne({ messages: Yt }), n = e, d = r;
1765
- function t(l) {
1766
- return typeof l == "function";
1767
- }
1768
- const o = E(() => {
1769
- var f;
1770
- const l = t(n.cellActions) ? (f = n.cellActions) == null ? void 0 : f.call(n, n.rowDataItem, n.columnKey) : n.cellActions;
1771
- return (l == null ? void 0 : l.length) > 2 && Gt(
1772
- "WARNING: BentoDataGrid Cell actions can only have a maximum of 2 actions, if you need more consider using the menuData property instead."
1773
- ), l == null ? void 0 : l.slice(0, 2);
1774
- }), _ = E(() => (l, f) => {
1775
- if (!(!f && l.isShort || f && !l.isShort))
1776
- switch (l.variant) {
1777
- case "copy":
1778
- return v("copy");
1779
- case "edit":
1780
- return v("edit");
1781
- case "open":
1782
- return v("open");
1783
- case "more":
1784
- return v("more");
1785
- default:
1786
- return l.title;
1787
- }
1788
- }), S = (l) => (l == null ? void 0 : l.event) !== void 0 ? {
1789
- click: () => l.event(n.rowDataItem, n.columnKey)
1790
- } : {}, w = (l) => ({
1791
- ...l,
1792
- handler: () => {
1793
- l != null && l.handler && typeof l.handler == "function" && (l == null || l.handler()), l != null && l.event && typeof l.event == "function" && (l == null || l.event(n.rowDataItem, n.columnKey));
1794
- }
1795
- }), p = (l) => l.map((f) => {
1796
- const i = f;
1797
- return i != null && i.items && (i.items = p(i.items)), { ...w(i) };
1798
- }), g = (l) => {
1799
- var f, i;
1800
- return (l == null ? void 0 : l.getCopyData) !== void 0 ? l.getCopyData(n.rowDataItem, n.columnKey) : (i = (f = n.rowDataItem) == null ? void 0 : f[n.columnKey]) == null ? void 0 : i.toString();
1801
- }, y = (l) => l.iconRight || ((l == null ? void 0 : l.variant) === "more" || (l == null ? void 0 : l.variant) === "open") && !l.isShort, u = (l) => l.iconLeft || (l == null ? void 0 : l.variant) === "more";
1802
- return (l, f) => (c(), P(Pt, {
1803
- name: "b-data-grid-cell-actions__animation",
1804
- appear: ""
1805
- }, {
1806
- default: H(() => [
1807
- N("div", no, [
1808
- f[1] || (f[1] = N("div", { class: "b-data-grid-cell-actions__background-gradient" }, null, -1)),
1809
- N("div", lo, [
1810
- (c(!0), b(ve, null, Ce(o.value, (i, h) => (c(), b("div", {
1811
- key: h,
1812
- class: "b-data-grid-cell-actions__action"
1813
- }, [
1814
- i.menuData ? (c(), P(s(Je), {
1815
- key: 0,
1816
- data: p(i.menuData),
1817
- button: {
1818
- condensed: !0,
1819
- variant: "secondary",
1820
- disabled: i.disabled
1821
- },
1822
- teleport: "",
1823
- onMenuItemClick: f[0] || (f[0] = ($) => d("menu-item-click-close"))
1824
- }, Te({ _: 2 }, [
1825
- u(i) ? {
1826
- name: "iconLeft",
1827
- fn: H(() => [
1828
- (i == null ? void 0 : i.variant) === "more" ? (c(), P(s(rl), {
1829
- key: 0,
1830
- "svg-title": _.value(i, !0)
1831
- }, null, 8, ["svg-title"])) : (c(), P(Me(i.iconLeft), {
1832
- key: 1,
1833
- "svg-title": _.value(i, !0)
1834
- }, null, 8, ["svg-title"]))
1835
- ]),
1836
- key: "0"
1837
- } : void 0,
1838
- i != null && i.isShort ? void 0 : {
1839
- name: "default",
1840
- fn: H(() => [
1841
- ue(K(_.value(i)), 1)
1842
- ]),
1843
- key: "1"
1844
- },
1845
- y(i) ? {
1846
- name: "iconRight",
1847
- fn: H(() => [
1848
- (i == null ? void 0 : i.variant) === "open" ? (c(), P(s(Lt), {
1849
- key: 0,
1850
- "svg-title": _.value(i, !0)
1851
- }, null, 8, ["svg-title"])) : (c(), P(Me(i.iconRight), {
1852
- key: 1,
1853
- "svg-title": i.title
1854
- }, null, 8, ["svg-title"]))
1855
- ]),
1856
- key: "2"
1857
- } : void 0
1858
- ]), 1032, ["data", "button"])) : i.variant === "copy" ? (c(), P(s(vl), {
1859
- key: 1,
1860
- text: g(i),
1861
- "button-text": _.value(i),
1862
- button: {
1863
- condensed: !0,
1864
- variant: "secondary"
1865
- }
1866
- }, null, 8, ["text", "button-text"])) : (c(), P(s(Ht), ee({
1867
- key: 2,
1868
- condensed: "",
1869
- variant: "secondary",
1870
- critical: i.critical,
1871
- disabled: i.disabled,
1872
- link: i.link
1873
- }, Ve(S(i))), Te({ _: 2 }, [
1874
- i.iconLeft || i.variant === "edit" ? {
1875
- name: "iconLeft",
1876
- fn: H(() => [
1877
- (i == null ? void 0 : i.variant) === "edit" ? (c(), P(s(to), {
1878
- key: 0,
1879
- "svg-title": _.value(i, !0)
1880
- }, null, 8, ["svg-title"])) : (c(), P(Me(i.iconLeft), {
1881
- key: 1,
1882
- "svg-title": i.title
1883
- }, null, 8, ["svg-title"]))
1884
- ]),
1885
- key: "0"
1886
- } : void 0,
1887
- i != null && i.isShort ? void 0 : {
1888
- name: "default",
1889
- fn: H(() => [
1890
- ue(K(_.value(i)), 1)
1891
- ]),
1892
- key: "1"
1893
- },
1894
- i.iconRight || i.variant === "open" ? {
1895
- name: "iconRight",
1896
- fn: H(() => [
1897
- (i == null ? void 0 : i.variant) === "open" ? (c(), P(s(Lt), {
1898
- key: 0,
1899
- "svg-title": _.value(i, !0)
1900
- }, null, 8, ["svg-title"])) : (c(), P(Me(i.iconRight), {
1901
- key: 1,
1902
- "svg-title": i.title
1903
- }, null, 8, ["svg-title"]))
1904
- ]),
1905
- key: "2"
1906
- } : void 0
1907
- ]), 1040, ["critical", "disabled", "link"]))
1908
- ]))), 128))
1909
- ])
1910
- ])
1911
- ]),
1912
- _: 1
1913
- }));
1914
- }
1915
- }), io = /* @__PURE__ */ ie(oo, [["__scopeId", "data-v-1b3e0c2e"]]), Kt = Symbol("data-grid slashed zero key");
1916
- var oe = /* @__PURE__ */ ((e) => (e.ACTION_COL_NESTED_CONTENT_AND_SELECTION_ENABLED = "action-col-nested-content-and-selection-enabled", e.ACTION_COL_NESTED_CONTENT_ENABLED = "action-col-nested-content-enabled", e.ACTION_COL_SELECTION_ENABLED = "action-col-selection-enabled", e.COLUMN_HOVERED = "column-hovered", e.COLUMN_HOVERED_NO_BORDER_LEFT = "column-hovered-no-border-left", e.COLUMN_HOVERED_NO_BORDER_RIGHT = "column-hovered-no-border-right", e.CONDENSED = "condensed", e.FROZEN = "frozen", e.IS_COLUMN_REORDERING = "is-column-re-ordering", e.IS_COLUMN_REORDERING_TARGET_LEFT = "is-column-re-order-target-left", e.IS_COLUMN_REORDERING_TARGET_RIGHT = "is-column-re-order-target-right", e.LAST_FROZEN_COLUMN_CELL = "last-frozen-column-cell", e.NESTED_CONTENT_ENABLED = "nested-content-toggle-enabled", e.NUMERIC = "numeric", e.OVERFLOW_ELLIPSIS = "overflow-ellipsis", e.PADDING_LEFT_UNSET = "padding-left-unset", e.PADDING_RIGHT_UNSET = "padding-right-unset", e.SLASHED_ZERO = "slashed-zero", e))(oe || {});
1917
- const Xt = {
1918
- "en-US": {
1919
- collapseNestedContent: "Collapse nested content",
1920
- expandNestedContent: "Expand nested content",
1921
- selectRow: "Select row"
1922
- }
1923
- }, ao = ["aria-hidden", "data-testid", "data-cellindex", "tabindex", "aria-colindex"], ro = ["title"], uo = {
1924
- key: 0,
1925
- class: "b-data-grid-cell__cell-actions"
1926
- }, co = {
1927
- i18n: { messages: Xt },
1928
- name: "data-grid-cell"
1929
- }, fo = /* @__PURE__ */ Ee({
1930
- ...co,
1931
- props: {
1932
- draggingEventsForRowCell: {
1933
- type: Function,
1934
- required: !0
1935
- },
1936
- /**
1937
- * The columns sets including
1938
- */
1939
- columnSets: {
1940
- type: Array,
1941
- required: !0
1942
- },
1943
- /**
1944
- * The columns set we are iterating over
1945
- */
1946
- column: {
1947
- type: Object,
1948
- required: !0
1949
- },
1950
- colIndex: {
1951
- type: Number,
1952
- required: !0
1953
- },
1954
- columnSetIndex: {
1955
- type: Number,
1956
- required: !0
1957
- },
1958
- /**
1959
- * Sets the row cells to the condensed padding state.
1960
- */
1961
- condensed: {
1962
- type: Boolean,
1963
- default: !1
1964
- },
1965
- /**
1966
- * Columns being dragged, contains dragging column and a target column
1967
- */
1968
- draggingColumns: {
1969
- type: Object,
1970
- default: void 0
1971
- },
1972
- /**
1973
- * A customisable method to retrieve a unique identifier for a data item in the array of data supplied.
1974
- * This is used selecting and performance reasons and must exist in each data item.
1975
- */
1976
- getDataItemId: {
1977
- type: Function,
1978
- default: (e) => e.id
1979
- },
1980
- /**
1981
- * The column hovered over state and whether the hovered over column should show a border right or left.
1982
- */
1983
- hoveredOverColumnState: {
1984
- type: Object,
1985
- required: !0
1986
- },
1987
- /**
1988
- * A customisable method to determine if a row is not selectable.
1989
- * The default is that every row is selectable.
1990
- */
1991
- isDataItemDisabled: {
1992
- type: Function,
1993
- default: () => !1
1994
- },
1995
- isMeasuringColumnWidths: {
1996
- type: Boolean,
1997
- default: !1
1998
- },
1999
- /**
2000
- * Determines if the nested content is visible.
2001
- */
2002
- isNestedContentExpanded: {
2003
- type: Boolean,
2004
- default: !1
2005
- },
2006
- /**
2007
- * Determines if the nest content slot is enabled for this data row.
2008
- */
2009
- nestedContent: {
2010
- type: Boolean,
2011
- default: !1
2012
- },
2013
- /**
2014
- * The IDs of the rows this cell controls to show / hide them.
2015
- */
2016
- nestedRowsElementIds: {
2017
- type: Array,
2018
- default: () => []
2019
- },
2020
- /**
2021
- * The row data object
2022
- */
2023
- rowData: {
2024
- type: Object,
2025
- required: !0
2026
- },
2027
- rowIndex: {
2028
- type: Number,
2029
- required: !0
2030
- },
2031
- /**
2032
- * The row selection checkbox indeterminate state.
2033
- */
2034
- selectionIsIndeterminate: {
2035
- type: Boolean,
2036
- default: !1
2037
- },
2038
- /**
2039
- * Determines if the row selection is enabled.
2040
- */
2041
- selectable: {
2042
- type: Boolean,
2043
- default: !1
2044
- },
2045
- selectedItems: {
2046
- type: Array,
2047
- required: !0
2048
- }
2049
- },
2050
- emits: ["on-frozen-columns-key-press", "select-row", "register-row-cell-element", "cell-hovered", "nested-content-toggled"],
2051
- setup(e, { expose: r, emit: v }) {
2052
- const n = st(), d = it(n), { t } = Ne({ messages: Xt }), o = e, _ = v, S = T(null), w = T(null), p = T(!1), g = T([]), y = E(() => {
2053
- var C;
2054
- return !!((C = o.rowData) != null && C[o.column.field]);
2055
- }), u = E(
2056
- () => {
2057
- var C;
2058
- return o.column.field === fe && ((C = o.nestedRowsElementIds) == null ? void 0 : C.length) > 0 ? o.nestedRowsElementIds.join(" ") : void 0;
2059
- }
2060
- ), l = E(
2061
- () => o.column.field === fe && !o.selectable && !o.nestedContent
2062
- ), f = (C, V) => (C == null ? void 0 : C.overflow) === Qe.ELLIPSIS ? `${V}` : void 0, i = (C) => C ?? "-", h = (C) => o.columnSets.slice(0, C).reduce((V, { columnSet: F }) => V + F.length, 0), $ = (C, V) => C + h(V), R = (C, V, F) => h() * C + $(V, F), B = (C) => {
2063
- var V;
2064
- (C === null || !S.value.contains(C) && !((V = g.value) != null && V.map((F) => F.value).some((F) => F === C || (F == null ? void 0 : F.contains(C))))) && (p.value = !1);
2065
- }, X = () => {
2066
- p.value = !1;
2067
- }, L = (C) => {
2068
- const F = { ...{
2069
- ...o.draggingEventsForRowCell(C)
2070
- } };
2071
- return C.frozen && (F.keyup = (G) => _("on-frozen-columns-key-press", G), F.keydown = (G) => _("on-frozen-columns-key-press", G)), C.cellActions && (F.mouseenter = () => {
2072
- p.value = !0;
2073
- }, F.mouseleave = (G) => {
2074
- p.value = !1, B(G == null ? void 0 : G.relatedTarget);
2075
- }, F.mouseleave = (G) => {
2076
- B(G == null ? void 0 : G.relatedTarget);
2077
- }, F.focus = (G) => {
2078
- p.value = !0;
2079
- }, F.focusout = (G) => {
2080
- B(G == null ? void 0 : G.relatedTarget);
2081
- }), F;
2082
- }, O = () => {
2083
- _("nested-content-toggled");
2084
- };
2085
- me(
2086
- () => p.value,
2087
- () => {
2088
- p.value === !0 ? _("cell-hovered", o.rowIndex) : _("cell-hovered", -1);
2089
- }
2090
- ), Bt(dl, {
2091
- registerMenuContainerElement: (C) => {
2092
- g.value.push(C);
2093
- },
2094
- menuMouseLeave: (C) => {
2095
- S.value.contains(C == null ? void 0 : C.relatedTarget) || (p.value = !1);
2096
- }
2097
- });
2098
- const ne = Ke(Kt, T(!1)), J = (C) => {
2099
- var V, F, G, Z, m, D, j;
2100
- return {
2101
- [`b-data-grid-cell--${oe.COLUMN_HOVERED}`]: (C == null ? void 0 : C.field) === o.hoveredOverColumnState.hoveredOverColumnField,
2102
- [`b-data-grid-cell--${oe.COLUMN_HOVERED_NO_BORDER_LEFT}`]: (C == null ? void 0 : C.field) === o.hoveredOverColumnState.hoveredOverColumnField && o.hoveredOverColumnState.noBorderLeft,
2103
- [`b-data-grid-cell--${oe.COLUMN_HOVERED_NO_BORDER_RIGHT}`]: (C == null ? void 0 : C.field) === o.hoveredOverColumnState.hoveredOverColumnField && o.hoveredOverColumnState.noBorderRight,
2104
- [`b-data-grid-cell--${oe.PADDING_LEFT_UNSET}`]: ((V = C == null ? void 0 : C.padding) == null ? void 0 : V.left) === !1,
2105
- [`b-data-grid-cell--${oe.PADDING_RIGHT_UNSET}`]: ((F = C == null ? void 0 : C.padding) == null ? void 0 : F.right) === !1,
2106
- [`b-data-grid-cell--${oe.NUMERIC}`]: C == null ? void 0 : C.numeric,
2107
- [`b-data-grid-cell--${oe.CONDENSED}`]: o.condensed,
2108
- [`b-data-grid-cell--${oe.OVERFLOW_ELLIPSIS}`]: (C == null ? void 0 : C.overflow) === Qe.ELLIPSIS,
2109
- [`b-data-grid-cell--${oe.IS_COLUMN_REORDERING}`]: ((G = o.draggingColumns.dragging) == null ? void 0 : G.field) === C.field,
2110
- [`b-data-grid-cell--${oe.IS_COLUMN_REORDERING_TARGET_LEFT}`]: ((Z = o.draggingColumns.target) == null ? void 0 : Z.field) === C.field && ((m = o.draggingColumns) == null ? void 0 : m.dragToLeft),
2111
- [`b-data-grid-cell--${oe.IS_COLUMN_REORDERING_TARGET_RIGHT}`]: ((D = o.draggingColumns.target) == null ? void 0 : D.field) === C.field && !((j = o.draggingColumns) != null && j.dragToLeft),
2112
- [`b-data-grid-cell--${oe.FROZEN}`]: C == null ? void 0 : C.frozen,
2113
- [`b-data-grid-cell--${oe.NESTED_CONTENT_ENABLED}`]: o.nestedContent,
2114
- [`b-data-grid-cell--${oe.ACTION_COL_NESTED_CONTENT_ENABLED}`]: o.nestedContent && !o.selectable && C.field === fe,
2115
- [`b-data-grid-cell--${oe.ACTION_COL_NESTED_CONTENT_AND_SELECTION_ENABLED}`]: o.nestedContent && o.selectable && C.field === fe,
2116
- [`b-data-grid-cell--${oe.ACTION_COL_SELECTION_ENABLED}`]: C.field === fe && o.selectable,
2117
- [`b-data-grid-cell--${oe.SLASHED_ZERO}`]: ne.value
2118
- };
2119
- };
2120
- return r({
2121
- gridcellRef: S
2122
- }), (C, V) => {
2123
- var F;
2124
- return c(), b("div", ee({
2125
- key: `cell-${e.column.field}`,
2126
- ref_key: "gridcellRef",
2127
- ref: S,
2128
- "aria-hidden": l.value,
2129
- "data-testid": `cell-${e.column.field}`,
2130
- "data-cellindex": R(e.rowIndex, e.colIndex, e.columnSetIndex),
2131
- class: ["b-data-grid-cell", J(e.column)],
2132
- role: "gridcell",
2133
- tabindex: R(e.rowIndex, e.colIndex, e.columnSetIndex) === 0 ? "0" : "-1",
2134
- "aria-colindex": $(e.colIndex, e.columnSetIndex) + 1,
2135
- style: {
2136
- width: e.column.autoWidth && e.isMeasuringColumnWidths ? "auto" : `${e.column.width}px`
2137
- }
2138
- }, Ve(L(e.column), !0)), [
2139
- e.column.field === s(fe) ? (c(), b(ve, { key: 0 }, [
2140
- e.selectable ? (c(), P(s(xt), {
2141
- key: 0,
2142
- class: "b-data-grid-cell__select-cell",
2143
- "aria-label": s(t)("selectRow"),
2144
- disabled: e.isDataItemDisabled(e.rowData),
2145
- indeterminate: e.selectionIsIndeterminate,
2146
- "model-value": e.selectedItems,
2147
- value: e.getDataItemId(e.rowData),
2148
- "onUpdate:modelValue": V[0] || (V[0] = (G) => C.$emit("select-row", G))
2149
- }, null, 8, ["aria-label", "disabled", "indeterminate", "model-value", "value"])) : U("", !0),
2150
- e.nestedContent ? (c(), P(s(rt), {
2151
- key: 1,
2152
- ref: "menuButtonRef",
2153
- "aria-haspopup": "true",
2154
- "aria-controls": u.value,
2155
- condensed: "",
2156
- variant: "tertiary",
2157
- toggled: e.isNestedContentExpanded,
2158
- onClick: O
2159
- }, {
2160
- iconLeft: H(() => [
2161
- e.isNestedContentExpanded ? (c(), P(s(ml), {
2162
- key: 0,
2163
- class: "b-accordion-item__icon",
2164
- "svg-title": s(t)("collapseNestedContent")
2165
- }, null, 8, ["svg-title"])) : (c(), P(s(hl), {
2166
- key: 1,
2167
- class: "b-accordion-item__icon",
2168
- "svg-title": s(t)("expandNestedContent")
2169
- }, null, 8, ["svg-title"]))
2170
- ]),
2171
- _: 1
2172
- }, 8, ["aria-controls", "toggled"])) : U("", !0)
2173
- ], 64)) : (c(), b(ve, { key: 1 }, [
2174
- Y(s(xe), { el: "div" }, {
2175
- default: H(() => [
2176
- Le(C.$slots, `item-${e.column.field}`, {
2177
- item: e.rowData,
2178
- rowIndex: e.rowIndex
2179
- }, () => [
2180
- N("span", {
2181
- title: f(e.column, e.rowData[e.column.field])
2182
- }, K(i(e.rowData[e.column.field])), 9, ro)
2183
- ], !0)
2184
- ]),
2185
- _: 3
2186
- }),
2187
- ((F = e.column.cellActions) == null ? void 0 : F.length) > 0 ? (c(), b("div", uo, [
2188
- p.value && (y.value || s(d)(`item-${e.column.field}`)) ? (c(), P(io, {
2189
- key: 0,
2190
- ref_key: "cellActionsRef",
2191
- ref: w,
2192
- "cell-actions": e.column.cellActions,
2193
- "column-key": e.column.field,
2194
- "row-data-item": e.rowData,
2195
- onMenuItemClickClose: X
2196
- }, null, 8, ["cell-actions", "column-key", "row-data-item"])) : U("", !0)
2197
- ])) : U("", !0)
2198
- ], 64))
2199
- ], 16, ao);
2200
- };
2201
- }
2202
- }), go = /* @__PURE__ */ ie(fo, [["__scopeId", "data-v-7d208720"]]), vo = { class: "b-data-grid-row-container" }, mo = ["id", "aria-selected"], ho = ["data-testid"], Co = {
2203
- key: 0,
2204
- class: "b-data-grid-row-container__row-nested-rows-loading-container"
2205
- }, _o = { key: 2 }, So = {
2206
- name: "data-grid-row"
2207
- }, wo = /* @__PURE__ */ Ee({
2208
- ...So,
2209
- props: {
2210
- /**
2211
- * When true, will emit a 'rowClick' event when a row is clicked. Will add cursor: pointer to rows.
2212
- */
2213
- allowRowClicks: { type: Boolean, default: !1 },
2214
- /**
2215
- * The columns sets including
2216
- */
2217
- columnSets: {
2218
- type: Array,
2219
- required: !0
2220
- },
2221
- /**
2222
- * Sets the row cells to the condensed padding state.
2223
- */
2224
- condensed: {
2225
- type: Boolean,
2226
- default: !1
2227
- },
2228
- /**
2229
- * Columns being dragged, contains dragging column and a target column
2230
- */
2231
- draggingColumns: {
2232
- type: Object,
2233
- default: void 0
2234
- },
2235
- /**
2236
- * Dragging event handlers for each row cell
2237
- */
2238
- draggingEventsForRowCell: {
2239
- type: Function,
2240
- required: !0
2241
- },
2242
- /**
2243
- * A customisable method to retrieve a unique identifier for a data item in the array of data supplied.
2244
- * This is used selecting and performance reasons and must exist in each data item.
2245
- */
2246
- getDataItemId: {
2247
- type: Function,
2248
- default: (e) => e.id
2249
- },
2250
- /**
2251
- * Set to true if the datagrid has been scrolled and the left side has overflowing space.
2252
- */
2253
- hasLeftOverflow: {
2254
- type: Boolean,
2255
- default: !1
2256
- },
2257
- /**
2258
- * Enables the nested content slot functionality.
2259
- */
2260
- hasNestedContent: {
2261
- type: Boolean,
2262
- default: !1
2263
- },
2264
- /**
2265
- * Enables the nested content slot functionality.
2266
- */
2267
- hasNestedRows: {
2268
- type: Boolean,
2269
- default: !1
2270
- },
2271
- /**
2272
- * Highlighted row IDs.
2273
- */
2274
- highlightedRows: {
2275
- type: Array,
2276
- default: () => []
2277
- },
2278
- /**
2279
- * The row index of a currently hovered row.
2280
- */
2281
- hoveredRowIndex: {
2282
- type: Number,
2283
- default: -1
2284
- },
2285
- /**
2286
- * The column hovered over state and whether the hovered over column should show a border right or left.
2287
- */
2288
- hoveredOverColumnState: {
2289
- type: Object,
2290
- required: !0
2291
- },
2292
- /**
2293
- * A customisable method to determine if a row is not selectable.
2294
- * The default is that every row is selectable.
2295
- */
2296
- isDataItemDisabled: {
2297
- type: Function,
2298
- default: () => !1
2299
- },
2300
- /**
2301
- * If the row is the last child in it's parent container.
2302
- */
2303
- isRowLastChild: {
2304
- type: Boolean,
2305
- default: !1
2306
- },
2307
- /**
2308
- * If columns are being measured for the autoWidth functionality.
2309
- */
2310
- isMeasuringColumnWidths: {
2311
- type: Boolean,
2312
- default: !1
2313
- },
2314
- /**
2315
- * Determines if this row is nested inside another row.
2316
- */
2317
- isNestedRow: {
2318
- type: Boolean,
2319
- default: !1
2320
- },
2321
- /**
2322
- * The row data object
2323
- */
2324
- rowData: {
2325
- type: Object,
2326
- required: !0
2327
- },
2328
- /**
2329
- * The row index.
2330
- */
2331
- rowIndex: {
2332
- type: Number,
2333
- required: !0
2334
- },
2335
- /**
2336
- * The row ID to be using for the ID attribute.
2337
- */
2338
- rowId: {
2339
- type: Number,
2340
- default: void 0
2341
- },
2342
- /**
2343
- * The number of rows that this row is within.
2344
- */
2345
- rowSetSize: {
2346
- type: Number,
2347
- default: 0
2348
- },
2349
- /**
2350
- * Determines whether to render frozen seperator on the row.
2351
- */
2352
- showFrozenColumnsSeparator: {
2353
- type: Boolean,
2354
- default: !1
2355
- },
2356
- /**
2357
- * Determines if the row selection is enabled.
2358
- */
2359
- selectable: {
2360
- type: Boolean,
2361
- default: !1
2362
- },
2363
- /**
2364
- * The array of IDs for the selected rows.
2365
- */
2366
- selectedItems: {
2367
- type: Array,
2368
- required: !0
2369
- },
2370
- /**
2371
- * Enables / Disables the nested-content slot
2372
- */
2373
- shouldShowNestedContent: {
2374
- type: Function,
2375
- default: (e) => !0
2376
- },
2377
- /**
2378
- * Returns the nested rows for a given BentoDatagridDataItem.
2379
- */
2380
- shouldShowNestedRows: {
2381
- type: Function,
2382
- default: (e) => !0
2383
- }
2384
- },
2385
- emits: ["cell-hovered", "on-frozen-columns-key-press", "select-row", "select-nested-row", "row-click", "nested-content-toggled"],
2386
- setup(e, { expose: r, emit: v }) {
2387
- const n = st(), d = it(n), t = e, o = v, _ = T({}), S = T(!1), w = T(), p = Xe("nested-content-slot"), g = E(() => t.shouldShowNestedRows(t.rowData)), y = E(
2388
- () => {
2389
- var m, D;
2390
- return !t.isNestedRow && t.hasNestedRows && g.value && ((D = (m = t.rowData) == null ? void 0 : m.children) == null ? void 0 : D.length) > 0;
2391
- }
2392
- ), u = E(
2393
- () => {
2394
- var m, D;
2395
- return !t.isNestedRow && t.hasNestedRows && g.value && (((m = t.rowData) == null ? void 0 : m.children) === void 0 || ((D = t == null ? void 0 : t.rowData) == null ? void 0 : D.children.length) === 0);
2396
- }
2397
- ), l = E(
2398
- () => t.hasNestedContent && t.shouldShowNestedContent(t.rowData) || t.hasNestedRows && g.value && !t.isNestedRow
2399
- ), f = E(() => {
2400
- if (t.hasNestedContent || t.hasNestedRows) {
2401
- const m = S.value.toString();
2402
- return {
2403
- "aria-expanded": l.value ? m : void 0,
2404
- "aria-level": t.isNestedRow ? "2" : "1",
2405
- "aria-posinset": t.rowIndex + 1,
2406
- "aria-setsize": t.rowSetSize
2407
- };
2408
- }
2409
- return { "aria-rowindex": t.rowIndex + 1 };
2410
- }), i = E(() => {
2411
- if (u.value)
2412
- return {
2413
- "aria-busy": "true",
2414
- "aria-live": "polite"
2415
- };
2416
- if (!(y.value || !t.hasNestedContent || !t.shouldShowNestedContent(t.rowData)))
2417
- return {
2418
- "aria-level": t.isNestedRow ? "3" : "2",
2419
- "aria-posinset": "1",
2420
- "aria-setsize": "1",
2421
- id: p,
2422
- role: "row",
2423
- tabindex: "-1"
2424
- };
2425
- }), h = E(() => {
2426
- var m, D;
2427
- return y.value ? (D = (m = t.rowData) == null ? void 0 : m.children) == null ? void 0 : D.reduce((j, le, a) => (j[a] = Xe("nested-row"), j), {}) : [];
2428
- }), $ = E(() => {
2429
- var m;
2430
- if (S.value) {
2431
- if (t.hasNestedContent && t.shouldShowNestedContent(t.rowData))
2432
- return [p];
2433
- if (y.value && ((m = Object.keys(h.value)) == null ? void 0 : m.length) > 0) {
2434
- const D = Object.values(h.value);
2435
- if ((D == null ? void 0 : D.length) > 0)
2436
- return D;
2437
- }
2438
- return [];
2439
- }
2440
- }), R = E(() => {
2441
- var D, j;
2442
- const m = (j = (D = t.rowData) == null ? void 0 : D.children) == null ? void 0 : j.map((le) => t.getDataItemId(le));
2443
- if ((m == null ? void 0 : m.length) > 0) {
2444
- const le = m.every((M) => {
2445
- var A;
2446
- return (A = t == null ? void 0 : t.selectedItems) == null ? void 0 : A.includes(M);
2447
- }), a = m.some((M) => {
2448
- var A;
2449
- return (A = t == null ? void 0 : t.selectedItems) == null ? void 0 : A.includes(M);
2450
- });
2451
- return !le && a;
2452
- }
2453
- return !1;
2454
- }), B = (m, D) => {
2455
- const j = m;
2456
- m !== null && (j != null && j.gridcellRef) && (_.value[D] = j.gridcellRef);
2457
- }, X = (m) => h.value[m], L = (m) => {
2458
- if (!t.selectable)
2459
- return null;
2460
- const D = t.getDataItemId(m);
2461
- return t.selectedItems.includes(D).toString();
2462
- }, O = (m) => {
2463
- !(m.target.type === "checkbox") && t.allowRowClicks && o("row-click", t.rowData, m);
2464
- }, W = (m) => {
2465
- o("select-row", m, t.rowData);
2466
- }, x = (m, D) => {
2467
- o("select-nested-row", D, t.rowData, m);
2468
- }, { updateContentHeight: ne, contentHeight: J } = gl(w, S), C = E(() => {
2469
- var m;
2470
- if (t.hasNestedContent || t.hasNestedRows)
2471
- return {
2472
- paddingLeft: `${y.value || u.value ? 0 : _.value[fe].clientWidth + Zt}px`,
2473
- "max-height": (t.hasNestedContent || t.hasNestedRows) && J.value && !((m = J == null ? void 0 : J.value) != null && m.includes("null")) ? J.value : 0
2474
- };
2475
- });
2476
- me(
2477
- () => w.value,
2478
- () => {
2479
- let m = null;
2480
- !m && w.value && (m = at(w.value, () => {
2481
- w.value && ne();
2482
- }));
2483
- }
2484
- );
2485
- const V = () => {
2486
- S.value = !S.value, ne(), o("nested-content-toggled", t.rowData);
2487
- };
2488
- me(
2489
- () => {
2490
- var m;
2491
- return (m = t.rowData) == null ? void 0 : m.children;
2492
- },
2493
- (m, D) => {
2494
- var j, le;
2495
- ((le = (j = t == null ? void 0 : t.rowData) == null ? void 0 : j.children) == null ? void 0 : le.length) > 0 && D === void 0 && !S.value && ne();
2496
- }
2497
- );
2498
- const F = (m, D) => ({
2499
- "b-data-grid-row-container__row--disabled": t.isDataItemDisabled(m),
2500
- "b-data-grid-row-container__row--row-clicks-enabled": t.allowRowClicks,
2501
- "b-data-grid-row-container__row--highlighted": t.highlightedRows.includes(t.getDataItemId(m)) || t.selectedItems.includes(t.getDataItemId(m)),
2502
- "b-data-grid-row-container__row--hovered": t.hoveredRowIndex === D,
2503
- "b-data-grid-row-container__row--is-last-child": t.isRowLastChild && !S.value,
2504
- "b-data-grid-row-container__row--nested-row": t.isNestedRow
2505
- }), G = (m) => ({
2506
- "b-data-grid-row-container__row-cell-set--frozen": m,
2507
- [`b-data-grid-row-container__row-cell-set--${Oe.OVERFLOW_SHADOW_LEFT}`]: m && t.hasLeftOverflow,
2508
- "b-data-grid-row-container__row-cell-set--frozen-separator": m && t.showFrozenColumnsSeparator,
2509
- "b-data-grid-row-container__row-cell-set--unfrozen": !m,
2510
- "b-data-grid-row-container__row-cell-set--is-measuring": t.isMeasuringColumnWidths
2511
- }), Z = E(() => ({
2512
- "b-data-grid-row-container__row-nested-slot--is-last-child": t.isRowLastChild,
2513
- "b-data-grid-row-container__row-nested-slot": !y.value && t.shouldShowNestedContent(t.rowData)
2514
- }));
2515
- return r({
2516
- gridcellRefs: _
2517
- }), (m, D) => (c(), b("div", vo, [
2518
- (c(), b("div", ee(f.value, {
2519
- id: e.rowId,
2520
- key: e.rowIndex,
2521
- class: ["b-data-grid-row-container__row", F(e.rowData, e.rowIndex)],
2522
- role: "row",
2523
- "aria-selected": L(e.rowData),
2524
- onClick: O
2525
- }), [
2526
- (c(!0), b(ve, null, Ce(e.columnSets, ({ columnSet: j, id: le, isFrozenColumns: a }, M) => (c(), b(ve, null, [
2527
- j != null && j.length ? (c(), b("div", {
2528
- key: `data-grid-rows-${le}`,
2529
- class: ce(["b-data-grid-row-container__cells", G(a)]),
2530
- "data-testid": `data-grid-${le}-rows`
2531
- }, [
2532
- (c(!0), b(ve, null, Ce(j, (A, ae) => (c(), P(s(go), {
2533
- key: `cell-${A.field}`,
2534
- ref_for: !0,
2535
- ref: (Q) => B(Q, A.field),
2536
- class: "b-data-grid-row-container__cell",
2537
- column: A,
2538
- "column-set-index": M,
2539
- "col-index": ae,
2540
- "column-sets": e.columnSets,
2541
- condensed: e.condensed,
2542
- "dragging-columns": e.draggingColumns,
2543
- "dragging-events-for-row-cell": e.draggingEventsForRowCell,
2544
- "get-data-item-id": e.getDataItemId,
2545
- "hovered-over-column-state": e.hoveredOverColumnState,
2546
- "is-data-item-disabled": e.isDataItemDisabled,
2547
- "is-measuring-column-widths": e.isMeasuringColumnWidths,
2548
- "is-nested-content-expanded": S.value,
2549
- "nested-content": l.value,
2550
- "nested-rows-element-ids": $.value,
2551
- "row-data": e.rowData,
2552
- "row-index": e.rowIndex,
2553
- "selection-is-indeterminate": R.value,
2554
- selectable: e.selectable,
2555
- "selected-items": e.selectedItems,
2556
- onCellHovered: D[0] || (D[0] = (Q) => o("cell-hovered", Q)),
2557
- onOnFrozenColumnsKeyPress: D[1] || (D[1] = (Q) => o("on-frozen-columns-key-press", Q)),
2558
- onSelectRow: W,
2559
- onNestedContentToggled: V
2560
- }, Te({ _: 2 }, [
2561
- Ce(s(n), (Q, Re) => ({
2562
- name: Re,
2563
- fn: H((Ae) => [
2564
- Le(m.$slots, Re, ee({ ref_for: !0 }, Ae), void 0, !0)
2565
- ])
2566
- }))
2567
- ]), 1032, ["column", "column-set-index", "col-index", "column-sets", "condensed", "dragging-columns", "dragging-events-for-row-cell", "get-data-item-id", "hovered-over-column-state", "is-data-item-disabled", "is-measuring-column-widths", "is-nested-content-expanded", "nested-content", "nested-rows-element-ids", "row-data", "row-index", "selection-is-indeterminate", "selectable", "selected-items"]))), 128))
2568
- ], 10, ho)) : U("", !0)
2569
- ], 64))), 256))
2570
- ], 16, mo)),
2571
- e.hasNestedContent && s(d)("nested-slot") && e.shouldShowNestedContent(e.rowData) || e.hasNestedRows && g.value ? (c(), P(Pt, {
2572
- key: `${e.rowIndex}-nest-content`,
2573
- name: "b-data-grid-row-container__animation--nested-content"
2574
- }, {
2575
- default: H(() => [
2576
- S.value ? (c(), b("div", ee({ key: 0 }, i.value, {
2577
- class: Z.value,
2578
- "data-testid": "nested-content-container",
2579
- style: C.value
2580
- }), [
2581
- N("div", {
2582
- ref_key: "nestedContentRef",
2583
- ref: w
2584
- }, [
2585
- u.value ? (c(), b("div", Co, [
2586
- Y(s(ot))
2587
- ])) : y.value ? (c(!0), b(ve, { key: 1 }, Ce(e.rowData.children, (j, le) => (c(), P(Jt, ee({ ref_for: !0 }, t, {
2588
- id: X(le),
2589
- key: `child-${le}`,
2590
- "row-data": j,
2591
- "row-index": le,
2592
- "row-set-size": e.rowData.children.length,
2593
- "is-nested-row": "",
2594
- onCellHovered: D[2] || (D[2] = (a) => o("cell-hovered", a)),
2595
- onRowClick: D[3] || (D[3] = (a) => o("row-click", a)),
2596
- onOnFrozenColumnsKeyPress: D[4] || (D[4] = (a) => o("con-frozen-columns-key-press", a)),
2597
- onSelectRow: (a) => x(j, a)
2598
- }), Te({ _: 2 }, [
2599
- Ce(s(n), (a, M) => ({
2600
- name: M,
2601
- fn: H((A) => [
2602
- Le(m.$slots, M, ee({ ref_for: !0 }, A), void 0, !0)
2603
- ])
2604
- }))
2605
- ]), 1040, ["id", "row-data", "row-index", "row-set-size", "onSelectRow"]))), 128)) : s(d)("nested-slot") && e.shouldShowNestedContent(e.rowData) ? (c(), b("div", _o, [
2606
- Le(m.$slots, "nested-slot", { item: e.rowData }, void 0, !0)
2607
- ])) : U("", !0)
2608
- ], 512)
2609
- ], 16)) : U("", !0)
2610
- ]),
2611
- _: 3
2612
- })) : U("", !0)
2613
- ]));
2614
- }
2615
- }), Jt = /* @__PURE__ */ ie(wo, [["__scopeId", "data-v-4880c9c8"]]);
2616
- let Ft = 0;
2617
- const Lo = {
2618
- beforeCreate() {
2619
- this.uuid = Ft.toString(), Ft += 1;
2620
- }
2621
- }, Eo = { key: 0 }, yo = ["clip-path"], bo = ["id"];
2622
- function Oo(e, r, v, n, d, t) {
2623
- return c(), b("svg", ee({ role: "img" }, e.$attrs, {
2624
- class: "ui-assets-icons-16",
2625
- xmlns: "http://www.w3.org/2000/svg",
2626
- width: "16",
2627
- height: "16",
2628
- fill: "none"
2629
- }), [
2630
- e.$attrs["svg-title"] ? (c(), b("title", Eo, K(e.$attrs["svg-title"]), 1)) : U("", !0),
2631
- N("g", {
2632
- "clip-path": "url(#uia-ui-assets/icons-16-warning_circle_fill__a" + e.uuid + ")"
2633
- }, r[0] || (r[0] = [
2634
- N("path", {
2635
- fill: "#00112C",
2636
- d: "M0.25 8C0.25 3.71979 3.71979 0.25 8 0.25C12.2802 0.25 15.75 3.71979 15.75 8C15.75 12.2802 12.2802 15.75 8 15.75C3.71979 15.75 0.25 12.2802 0.25 8ZM8.75 8.75V4.25H7.25V8.75H8.75ZM8 11.5C8.41421 11.5 8.75 11.1642 8.75 10.75C8.75 10.3358 8.41421 10 8 10C7.58579 10 7.25 10.3358 7.25 10.75C7.25 11.1642 7.58579 11.5 8 11.5Z"
2637
- }, null, -1)
2638
- ]), 8, yo),
2639
- N("defs", null, [
2640
- N("clipPath", {
2641
- id: "uia-ui-assets/icons-16-warning_circle_fill__a" + e.uuid
2642
- }, r[1] || (r[1] = [
2643
- N("rect", {
2644
- width: "16",
2645
- height: "16",
2646
- fill: "#fff"
2647
- }, null, -1)
2648
- ]), 8, bo)
2649
- ])
2650
- ], 16);
2651
- }
2652
- const po = /* @__PURE__ */ ie(Lo, [["render", Oo]]), Ro = ["aria-label"], No = {}, Ao = /* @__PURE__ */ Ee({
2653
- ...No,
2654
- __name: "data-grid-static-icon",
2655
- props: {
2656
- colored: { type: Boolean, default: !1 },
2657
- tooltipText: {},
2658
- variant: { default: "no-value" }
2659
- },
2660
- setup(e) {
2661
- const r = e, v = E(() => {
2662
- switch (r.variant) {
2663
- case "checkmark":
2664
- return xn;
2665
- case "warning":
2666
- return Zn;
2667
- case "error":
2668
- return po;
2669
- case "cross":
2670
- return Wt;
2671
- case "no-value":
2672
- return _t;
2673
- default:
2674
- return _t;
2675
- }
2676
- }), n = E(() => ({
2677
- "b-data-grid-static-icon--colored": r.colored && r.variant !== "no-value"
2678
- })), d = E(() => `b-data-grid-static-icon__${r.variant}`), t = E(() => qn.AUTO);
2679
- return (o, _) => lt((c(), b("div", {
2680
- "aria-label": o.tooltipText,
2681
- class: ce(["b-data-grid-static-icon", n.value]),
2682
- tabindex: "0"
2683
- }, [
2684
- (c(), P(Me(v.value), {
2685
- class: ce(d.value),
2686
- "svg-title": o.tooltipText
2687
- }, null, 8, ["class", "svg-title"]))
2688
- ], 10, Ro)), [
2689
- [s(jn), o.tooltipText, t.value]
2690
- ]);
2691
- }
2692
- }), Ai = /* @__PURE__ */ ie(Ao, [["__scopeId", "data-v-3ee55e9a"]]), To = ["aria-rowcount", "aria-colcount", "aria-label", "role"], Io = {
2693
- key: 1,
2694
- class: "b-data-grid__header"
2695
- }, $o = ["tabindex"], Do = ["tabindex", "aria-busy"], ko = {
2696
- key: 0,
2697
- class: "b-data-grid__loading"
2698
- }, Mo = {
2699
- key: 1,
2700
- class: "b-data-grid__empty-state"
2701
- }, zo = {
2702
- key: 5,
2703
- class: "b-data-grid__footer"
2704
- }, Fo = {
2705
- i18n: { messages: Ze },
2706
- name: "bento-data-grid"
2707
- }, Uo = /* @__PURE__ */ Ee({
2708
- ...Fo,
2709
- props: {
2710
- /**
2711
- * When true, will emit a 'rowClick' event when a row is clicked. Will add cursor: pointer to rows.
2712
- */
2713
- allowRowClicks: { type: Boolean, default: !1 },
2714
- /**
2715
- * When true, column headers will become draggable, allowing users to rearrange columns.
2716
- */
2717
- allowColumnDragAndDrop: { type: Boolean, default: !0 },
2718
- /**
2719
- * List of actions that will be rendered in the action bar when user selects items.
2720
- *
2721
- * Each object in the list should have a `title`, an `event` and,
2722
- * optionally, an `icon`.
2723
- *
2724
- * The component will display 4 actions and the hide the rest inside a menu.
2725
- *
2726
- * @see BentoButton for a list of all the other props supported by each button action.
2727
- */
2728
- bulkActions: {
2729
- type: Array,
2730
- default: null
2731
- },
2732
- /**
2733
- * Sets the row cells to the condensed padding state.
2734
- */
2735
- condensed: {
2736
- type: Boolean,
2737
- default: !1
2738
- },
2739
- /**
2740
- * Column definitions using 'key' to relate to data object.
2741
- */
2742
- columns: {
2743
- type: Array,
2744
- required: !0
2745
- },
2746
- /**
2747
- * Enables / hides the display options panel and the column contextual menu functionality.
2748
- */
2749
- columnPanel: { type: Boolean, default: !1 },
2750
- /**
2751
- * An array of data objects to display.
2752
- */
2753
- data: {
2754
- type: Array,
2755
- required: !0
2756
- },
2757
- /**
2758
- * Empty state props that will be passed down to inner empty-state component
2759
- */
2760
- emptyState: {
2761
- type: Object,
2762
- default: void 0
2763
- },
2764
- /**
2765
- * filter-bar value (i.e. filters) that will be passed down to inner filter-bar component
2766
- * {@see BentoFilterBarModel}
2767
- */
2768
- filters: {
2769
- // TODO: Change this to BentoFilterBarProps['value'] when the interface is available
2770
- type: Array,
2771
- default: void 0
2772
- },
2773
- /**
2774
- * An array of the values for each filter set in `value`.
2775
- * {@see BentoFilterValues}
2776
- */
2777
- filterValues: {
2778
- type: qe.props.filterValues.type,
2779
- default: () => []
2780
- },
2781
- // TODO: Move this prop as a part of "config" BentoFilterBarModel = Array<BentoFilterModel | BentoFilterSearchModel> in Bento 2.0.
2782
- // It was not done now because it's a breaking change for the types.
2783
- /**
2784
- * Filter's search bar properties with which the placeholder, hint and other
2785
- * "bento-search-bar" properties can be set. @see {@link BentoFilterBarSearchBarProps}
2786
- */
2787
- filterSearchConfig: {
2788
- type: Object,
2789
- default: void 0
2790
- },
2791
- /**
2792
- * Filter bar search term useful to filter all the data by text
2793
- */
2794
- filterSearchTerm: {
2795
- type: qe.props.searchTerm.type,
2796
- default: void 0
2797
- },
2798
- /**
2799
- * Allows the grid to be rendered inside a confined space.
2800
- */
2801
- fitContent: { type: Boolean, default: !1 },
2802
- /**
2803
- * A customisable method to retrieve a unique identifier for a data item in the array of data supplied.
2804
- * This is used selecting and performance reasons and must exist in each data item.
2805
- */
2806
- getDataItemId: {
2807
- type: Function,
2808
- default: (e) => e.id
2809
- },
2810
- /**
2811
- * If resize is enabled
2812
- */
2813
- hasResizableColumns: {
2814
- type: Boolean,
2815
- default: !0
2816
- },
2817
- /**
2818
- * Enables the nested content slot functionality.
2819
- */
2820
- hasNestedContent: {
2821
- type: Boolean,
2822
- default: !1
2823
- },
2824
- /**
2825
- * Enables the nested content slot functionality.
2826
- */
2827
- hasNestedRows: {
2828
- type: Boolean,
2829
- default: !1
2830
- },
2831
- /**
2832
- * Highlighted items
2833
- */
2834
- highlightedRows: {
2835
- type: Array,
2836
- default: () => []
2837
- },
2838
- /**
2839
- * A customisable method to determine if a row is not selectable.
2840
- * The default is that every row is selectable.
2841
- */
2842
- isDataItemDisabled: {
2843
- type: Function,
2844
- default: () => !1
2845
- },
2846
- /**
2847
- * The type of `Lazy Load`.
2848
- * Type "automatic" will enable infinite scrolling
2849
- * Type "button" will enable lazy loading with "Show more" button
2850
- * @values automatic, button, none
2851
- */
2852
- lazyLoadType: {
2853
- type: String,
2854
- default: "none",
2855
- validator: (e) => ["automatic", "button", "none"].includes(e)
2856
- },
2857
- /**
2858
- * If the loading indicator should be shown.
2859
- */
2860
- loading: {
2861
- type: Boolean,
2862
- default: !1
2863
- },
2864
- /**
2865
- * Enables / Disables the table's surrounding border.
2866
- */
2867
- outline: {
2868
- type: Boolean,
2869
- default: !1
2870
- },
2871
- /**
2872
- * Renders the data grid with no top spacing, to render inside containers that already have spacing
2873
- */
2874
- noSpacingTop: {
2875
- type: Boolean,
2876
- default: !1
2877
- },
2878
- /**
2879
- * Pagination props that will be passed down to inner pagination component
2880
- */
2881
- pagination: {
2882
- type: Object,
2883
- default: void 0
2884
- },
2885
- /**
2886
- * Adds an extra option when selecting all items that allows user to select items in other pages too.
2887
- */
2888
- selectableAcrossPages: {
2889
- type: Boolean,
2890
- default: !1
2891
- },
2892
- /**
2893
- * Renders a font numeric style with slashed zeros instead of normal ones.
2894
- */
2895
- slashedZero: { type: Boolean, default: !1 },
2896
- /**
2897
- * Sticks the horizontal scrollbar to the bottom of the screen if the data-grid is larger than the screen height.
2898
- */
2899
- stickyHorizontalScrollbar: {
2900
- type: Boolean,
2901
- default: !1
2902
- },
2903
- /**
2904
- * Make pagination stick to the bottom of the page when the data-grid is bigger than the screen.
2905
- * Because styles have to be applied to pagination container element, this has to be a data-grid prop (rather than a pagination prop).
2906
- */
2907
- stickyPagination: {
2908
- type: Boolean,
2909
- default: !1
2910
- },
2911
- /**
2912
- * Make data-grid filters stick to the top of the page along with the data-grid headers.
2913
- * Defaults to true.
2914
- */
2915
- stickyFilters: {
2916
- type: Boolean,
2917
- default: !0
2918
- },
2919
- /**
2920
- * Enables / Disables rows to be selected via a checkbox. On select the "select" event will be emitted.
2921
- */
2922
- selectable: {
2923
- type: Boolean,
2924
- default: !1
2925
- },
2926
- /**
2927
- * Selected items
2928
- */
2929
- selection: {
2930
- type: Array,
2931
- default: () => []
2932
- },
2933
- /**
2934
- * Enables / Disables the nested-content slot
2935
- */
2936
- shouldShowNestedContent: {
2937
- type: Function,
2938
- default: (e) => !0
2939
- },
2940
- /**
2941
- * Returns the nested rows for a given BentoDatagridDataItem.
2942
- */
2943
- shouldShowNestedRows: {
2944
- type: Function,
2945
- default: (e) => !0
2946
- },
2947
- /**
2948
- * Sortby handles proper rendering of sort icon in header. Sorting currently is only supported server side.
2949
- * It does make sure the currently sorted column has a more visible sort icon, and the sort icon points in the right direction.
2950
- */
2951
- sortBy: {
2952
- type: Array,
2953
- // NOTE: is an array to allow multi-sorting in the future
2954
- default: () => []
2955
- },
2956
- /**
2957
- * Title of the data grid to be rendered as tab title when a data grid is passed in a tab layout.
2958
- */
2959
- tabTitle: {
2960
- type: String,
2961
- default: null
2962
- },
2963
- /**
2964
- * Truncates all data grid column headers
2965
- */
2966
- truncateColumnHeaders: {
2967
- type: Boolean,
2968
- default: !1
2969
- }
2970
- },
2971
- emits: [
2972
- k.COLUMNS,
2973
- k.COLUMN_RESIZE,
2974
- k.ITEMS_PAGE,
2975
- k.FILTER_SEARCH_INPUT,
2976
- k.FILTER_SEARCH_CLEAR,
2977
- k.NAVIGATE,
2978
- k.NESTED_CONTENT_TOGGLED,
2979
- k.UPDATE_COLUMNS,
2980
- k.UPDATE_CONDENSED,
2981
- k.UPDATE_FILTER_VALUES,
2982
- k.UPDATE_FILTERS,
2983
- k.UPDATE_FILTER_SEARCH_TERM,
2984
- k.UPDATE_SHOW_MORE,
2985
- k.UPDATE_PAGINATION,
2986
- k.UPDATE_SELECTION,
2987
- k.UPDATE_SORT_BY,
2988
- k.ROW_CLICK,
2989
- k.SELECT,
2990
- k.SELECT_ALL_ACROSS_PAGES,
2991
- k.SORT
2992
- ],
2993
- setup(e, { expose: r, emit: v }) {
2994
- const n = e, d = st(), t = it(d), o = T(null), _ = T(), S = T({}), w = T(null), p = T(null), g = T(), y = T(null), u = T(null), {
2995
- allowColumnDragAndDrop: l,
2996
- columns: f,
2997
- columnPanel: i,
2998
- data: h,
2999
- lazyLoadType: $,
3000
- loading: R,
3001
- hasNestedContent: B,
3002
- hasNestedRows: X,
3003
- selectable: L,
3004
- selection: O,
3005
- selectableAcrossPages: W,
3006
- stickyPagination: x,
3007
- outline: ne,
3008
- pagination: J
3009
- } = tt(n), C = T(-1), { t: V } = Ne({ messages: Ze }), F = E(() => le.value.filter((I) => I.frozen).length), G = Ke(
3010
- tl,
3011
- () => ({
3012
- isDataGridTemplate: !1,
3013
- stickyTabs: T(!1),
3014
- tabsRef: T(null)
3015
- })
3016
- ), { isDataGridTemplate: Z, stickyTabs: m, tabsRef: D } = G(), j = E(() => n.fitContent || Z ? 0 : null), {
3017
- columnDefs: le,
3018
- onColumnWidthOverride: a,
3019
- gridColumnWidthStyle: M,
3020
- isMeasuringColumnWidths: A,
3021
- isTotalWidthOfColumnsTakingUpAllAvailableGridWidth: ae,
3022
- columns: Q,
3023
- totalWidthOfAllColumns: Re
3024
- } = Nl(f, h, o, S, w, {
3025
- hasColumnPanel: i,
3026
- hasSelectableColumn: L,
3027
- hasSelectableAcrossPages: W,
3028
- hasNestedContent: B,
3029
- hasNestedRows: X,
3030
- allowColumnDragAndDrop: l,
3031
- isDataGridTemplate: Z
3032
- }), Ae = v, se = (I, ...z) => {
3033
- (I === k.COLUMNS || I === k.UPDATE_COLUMNS) && ([Q.value] = z), Ae(I, ...z);
3034
- }, Ie = pt(D, m), ze = E(
3035
- () => n.stickyFilters ? `${Ie.value}px` : null
3036
- ), Fe = pt(p, Ye(n, "stickyFilters")), Ue = E(
3037
- () => `${Fe.value + Ie.value}px`
3038
- ), {
3039
- sortedColumns: Qt,
3040
- columnSets: Pe,
3041
- isOnlyOneVisibleColumn: en,
3042
- onConfigSettingsUpdate: tn,
3043
- onConfigSettingsColumnsUpdate: nn,
3044
- onConfigSettingsColumnUpdate: ln
3045
- } = Ml(le, se), { hoveredOverColumn: sn, hoveredOverColumnState: dt } = Fl(
3046
- Pe,
3047
- L,
3048
- ne,
3049
- ae
3050
- ), { draggingColumns: ut, draggingEventsForColumns: on, draggingEventsForRowCell: an, onMoveColumnByOffset: rn } = kl(Qt, l, se), { onAllRowSelect: ct, onRowSelect: dn, onNestedRowSelect: un, selectedItems: ft, allItemsSelectedState: cn } = Al(
3051
- O,
3052
- se,
3053
- h,
3054
- n.getDataItemId,
3055
- n.isDataItemDisabled
3056
- ), { navigationInput: gt } = Il(w, f, L), { isLazyLoad: $e, isInfiniteScroll: fn, verticalScrollPosition: gn, emitLazyLoadEvent: vn } = Dl(
3057
- $,
3058
- y,
3059
- o,
3060
- R,
3061
- se
3062
- ), {
3063
- updateScrollPosition: Be,
3064
- updateScrollPositionOnFrozenColumnsNavigation: mn,
3065
- syncVirtualScrollerWithBody: vt,
3066
- hasLeftOverflow: We,
3067
- hasRightOverflow: hn,
3068
- horizontalScrollbarConditionalClasses: Cn
3069
- } = zl(o, _, gn, u, {
3070
- isLazyLoad: $e,
3071
- pagination: J,
3072
- stickyPagination: x,
3073
- isDataGridTemplate: Z
3074
- }), _n = () => {
3075
- g.value.isClearAllVisible ? g.value.clearAllFilters() : g.value.isResetAllVisible && g.value.resetAllFilters();
3076
- }, Sn = E(() => {
3077
- var I, z;
3078
- return {
3079
- ...n.emptyState,
3080
- variant: ((I = n.emptyState) == null ? void 0 : I.variant) === "embedded" || ((z = n.emptyState) == null ? void 0 : z.variant) === "basic" ? n.emptyState.variant : "basic"
3081
- };
3082
- }), wn = E(() => ({
3083
- [`b-data-grid--${Oe.OUTLINE}`]: n.outline,
3084
- [`b-data-grid--${Oe.SCROLL}`]: n.fitContent || $e.value,
3085
- [`b-data-grid--${Oe.STICKY_FILTERS}`]: n.filters && n.stickyFilters,
3086
- [`b-data-grid--${Oe.OVERFLOW_SHADOW_LEFT}`]: We.value && !F.value,
3087
- [`b-data-grid--${Oe.OVERFLOW_SHADOW_RIGHT}`]: hn.value,
3088
- [`b-data-grid--${Oe.NO_SPACING_TOP}`]: n.noSpacingTop
3089
- })), Ln = E(() => ({
3090
- "b-data-grid__body--sticky-horizontal-scrollbar": n.stickyHorizontalScrollbar
3091
- })), En = E(() => Pe.value.findIndex((I) => I.columnSet.length)), mt = E(() => !((n.selectable || n.hasNestedContent || n.hasNestedRows) && F.value === 1) || We.value), yn = E(() => ({
3092
- "b-data-grid__filters--sticky": !!n.stickyFilters || Z
3093
- })), bn = E(() => {
3094
- var I, z, re, q, _e, Se;
3095
- return {
3096
- "b-data-grid__pagination--padding-left-unset": ((re = (z = (I = n.columns) == null ? void 0 : I[0]) == null ? void 0 : z.padding) == null ? void 0 : re.left) === !1,
3097
- "b-data-grid__pagination--padding-right-unset": ((Se = (_e = (q = n.columns) == null ? void 0 : q[n.columns.length - 1]) == null ? void 0 : _e.padding) == null ? void 0 : Se.right) === !1,
3098
- "b-data-grid__pagination--sticky": !!n.stickyPagination || Z
3099
- };
3100
- }), On = (I) => {
3101
- const z = I;
3102
- I !== null && (z != null && z.columnHeaderRefs) && Object.entries(z == null ? void 0 : z.columnHeaderRefs).forEach(([re, q]) => {
3103
- S.value[re] = q;
3104
- });
3105
- }, pn = (I, z) => {
3106
- const re = I;
3107
- I !== null && (re != null && re.gridcellRefs) && Object.entries(re == null ? void 0 : re.gridcellRefs).map(([q, _e]) => {
3108
- var Se;
3109
- ((Se = w.value) == null ? void 0 : Se[q]) === void 0 && (w.value = { ...w.value, [q]: [] }), w.value[q][z] = _e;
3110
- });
3111
- }, Rn = (I, z) => {
3112
- n.allowRowClicks && se(k.ROW_CLICK, I, z);
3113
- }, Nn = (I) => {
3114
- C.value = I;
3115
- }, An = E(() => !!n.selectableAcrossPages && !!n.pagination), Tn = E(() => n.hasNestedContent || n.hasNestedRows ? "treegrid" : "grid"), ht = Xn({
3116
- label: d != null && d.header ? Jn(d)("header") : null,
3117
- defaultFallback: "data grid"
3118
- }), Ct = E(() => {
3119
- var I;
3120
- return ((I = ft.value) == null ? void 0 : I.length) ?? 0;
3121
- }), In = E(() => n.bulkActions && Ct.value > 0), $n = (I) => se(k.COLUMN_RESIZE, I), Dn = (I) => {
3122
- se(k.UPDATE_SORT_BY, I), se(k.SORT, I);
3123
- }, kn = (I, z) => {
3124
- se(k.NAVIGATE, I), se(k.UPDATE_PAGINATION, {
3125
- ...n.pagination,
3126
- size: z,
3127
- page: I
3128
- });
3129
- }, Mn = (I) => {
3130
- se(k.ITEMS_PAGE, I);
3131
- }, zn = () => {
3132
- se(k.FILTER_SEARCH_CLEAR);
3133
- }, Fn = (I) => {
3134
- se(k.UPDATE_FILTER_SEARCH_TERM, I), se(k.FILTER_SEARCH_INPUT, I);
3135
- };
3136
- return E(() => f.value.some((I) => I.mandatory)).value || Gt(
3137
- "WARNING: At least one BentoDataGrid column should be set as mandatory to ensure data is always displayed correctly."
3138
- ), Ke(el, () => null)(n.tabTitle), Bt(Kt, Ye(n, "slashedZero")), r({ onEmptyStateClearResetButtonClick: _n }), (I, z) => {
3139
- var re;
3140
- return c(), b("div", {
3141
- class: ce(["b-data-grid", wn.value]),
3142
- "aria-rowcount": s(h).length,
3143
- "aria-colcount": s(f).length,
3144
- "aria-label": s(ht),
3145
- role: Tn.value
3146
- }, [
3147
- e.filters ? (c(), b("div", {
3148
- key: 0,
3149
- ref_key: "filtersRef",
3150
- ref: p,
3151
- class: ce(["b-data-grid__filters", yn.value]),
3152
- style: ke({ top: ze.value })
3153
- }, [
3154
- e.filters ? (c(), P(s(qe), {
3155
- key: 0,
3156
- ref_key: "filterBarRef",
3157
- ref: g,
3158
- config: e.filters,
3159
- "filter-values": e.filterValues,
3160
- search: e.filterSearchConfig,
3161
- "search-term": e.filterSearchTerm,
3162
- onSearchInput: Fn,
3163
- onSearchClear: zn,
3164
- onInput: z[0] || (z[0] = (q) => I.$emit(s(k).UPDATE_FILTERS, q)),
3165
- "onUpdate:filterValues": z[1] || (z[1] = (q) => I.$emit(s(k).UPDATE_FILTER_VALUES, q))
3166
- }, null, 8, ["config", "filter-values", "search", "search-term"])) : U("", !0)
3167
- ], 6)) : U("", !0),
3168
- I.$slots.header ? (c(), b("div", Io, [
3169
- Le(I.$slots, "header", {}, void 0, !0)
3170
- ])) : U("", !0),
3171
- N("div", {
3172
- class: "b-data-grid__column-headers",
3173
- style: ke({ top: Ue.value })
3174
- }, [
3175
- s(i) ? (c(), P(s(js), {
3176
- key: 0,
3177
- class: "b-data-grid__config-settings",
3178
- columns: s(Q),
3179
- condensed: e.condensed,
3180
- onConfigSettings: s(tn),
3181
- "onUpdate:columns": s(nn)
3182
- }, null, 8, ["columns", "condensed", "onConfigSettings", "onUpdate:columns"])) : U("", !0),
3183
- N("div", {
3184
- ref_key: "columnsRef",
3185
- ref: _,
3186
- role: "rowgroup",
3187
- class: "b-data-grid__columns-row",
3188
- tabindex: j.value,
3189
- onScroll: z[4] || (z[4] = //@ts-ignore
3190
- (...q) => s(Be) && s(Be)(...q))
3191
- }, [
3192
- N("div", {
3193
- style: ke(s(M)),
3194
- class: "b-data-grid__columns",
3195
- role: "row"
3196
- }, [
3197
- (c(!0), b(ve, null, Ce(s(Pe), ({ columnSet: q, id: _e, isFrozenColumns: Se }, Ge) => (c(), b(ve, null, [
3198
- q != null && q.length ? (c(), P(s(Os), ee({
3199
- key: `data-grid-columns-${_e}`,
3200
- ref_for: !0,
3201
- ref: (we) => On(we),
3202
- columns: q,
3203
- "has-resizable-columns": e.hasResizableColumns,
3204
- "sort-by": e.sortBy,
3205
- "all-items-selected-state": s(cn),
3206
- "is-frozen-columns": Se,
3207
- "show-frozen-columns-separator": mt.value,
3208
- "dragging-columns": s(ut),
3209
- "has-draggable-columns": s(l),
3210
- "has-column-panel": s(i),
3211
- "has-left-overflow": s(We),
3212
- "has-first-column-panel-right-aligned": Ge === En.value,
3213
- "hovered-over-column-state": s(dt),
3214
- "is-measuring-column-widths": s(A),
3215
- "is-only-one-visible-column": s(en),
3216
- selectable: s(L),
3217
- "selectable-across-pages": An.value,
3218
- "truncate-column-headers": e.truncateColumnHeaders
3219
- }, Ve(s(on)), {
3220
- onColumnHover: z[2] || (z[2] = (we) => sn.value = we),
3221
- onColumnMove: s(rn),
3222
- onColumnUpdate: s(ln),
3223
- onColumnResize: $n,
3224
- onColumnResizing: s(a),
3225
- onSelectAllRows: s(ct),
3226
- onSelectAllAcrossPages: z[3] || (z[3] = (we) => se(s(k).SELECT_ALL_ACROSS_PAGES)),
3227
- onSort: Dn
3228
- }), Te({ _: 2 }, [
3229
- Ce(s(d), (we, De) => ({
3230
- name: De,
3231
- fn: H((je) => [
3232
- Le(I.$slots, De, ee({ ref_for: !0 }, je), void 0, !0)
3233
- ])
3234
- }))
3235
- ]), 1040, ["columns", "has-resizable-columns", "sort-by", "all-items-selected-state", "is-frozen-columns", "show-frozen-columns-separator", "dragging-columns", "has-draggable-columns", "has-column-panel", "has-left-overflow", "has-first-column-panel-right-aligned", "hovered-over-column-state", "is-measuring-column-widths", "is-only-one-visible-column", "selectable", "selectable-across-pages", "truncate-column-headers", "onColumnMove", "onColumnUpdate", "onColumnResizing", "onSelectAllRows"])) : U("", !0)
3236
- ], 64))), 256))
3237
- ], 4)
3238
- ], 40, $o)
3239
- ], 4),
3240
- N("div", {
3241
- ref_key: "body",
3242
- ref: o,
3243
- "data-testid": "data-grid-body",
3244
- class: ce(["b-data-grid__body", Ln.value]),
3245
- tabindex: s(R) ? "0" : "-1",
3246
- "aria-busy": s(R),
3247
- "aria-live": "polite",
3248
- onScroll: z[7] || (z[7] = //@ts-ignore
3249
- (...q) => s(Be) && s(Be)(...q))
3250
- }, [
3251
- s(R) && !s($e) ? (c(), b("div", ko, [
3252
- Y(s(ot), {
3253
- class: "b-data-grid__loading-indicator",
3254
- large: ""
3255
- }),
3256
- Y(s(xe), {
3257
- el: "span",
3258
- variant: "caption"
3259
- }, {
3260
- default: H(() => [
3261
- ue(K(s(V)("gettingYourData")), 1)
3262
- ]),
3263
- _: 1
3264
- })
3265
- ])) : ((re = s(h)) == null ? void 0 : re.length) === 0 && e.emptyState ? (c(), b("div", Mo, [
3266
- Y(s(Qn), Hn(Vn(Sn.value)), null, 16)
3267
- ])) : (c(), b("div", {
3268
- key: 2,
3269
- class: "b-data-grid__rows",
3270
- role: "rowgroup",
3271
- onKeydown: z[6] || (z[6] = //@ts-ignore
3272
- (...q) => s(gt) && s(gt)(...q))
3273
- }, [
3274
- (c(!0), b(ve, null, Ce(s(h), (q, _e) => {
3275
- var Se, Ge;
3276
- return c(), P(s(Jt), {
3277
- key: _e,
3278
- ref_for: !0,
3279
- ref: (we) => pn(we, _e),
3280
- style: ke(s(M)),
3281
- "allow-row-clicks": e.allowRowClicks,
3282
- "column-sets": s(Pe),
3283
- condensed: e.condensed,
3284
- "dragging-columns": s(ut),
3285
- "dragging-events-for-row-cell": s(an),
3286
- "get-data-item-id": e.getDataItemId,
3287
- "has-nested-content": s(B),
3288
- "has-nested-rows": s(X),
3289
- "has-left-overflow": s(We),
3290
- "highlighted-rows": e.highlightedRows,
3291
- "hovered-row-index": C.value,
3292
- "hovered-over-column-state": s(dt),
3293
- "is-data-item-disabled": e.isDataItemDisabled,
3294
- "is-row-last-child": _e + 1 === ((Se = s(h)) == null ? void 0 : Se.length),
3295
- "is-measuring-column-widths": s(A),
3296
- "row-data": q,
3297
- "row-index": _e,
3298
- "row-set-size": (Ge = s(h)) == null ? void 0 : Ge.length,
3299
- "show-frozen-columns-separator": mt.value,
3300
- "should-show-nested-content": e.shouldShowNestedContent,
3301
- "should-show-nested-rows": e.shouldShowNestedRows,
3302
- selectable: s(L),
3303
- "selected-items": s(ft),
3304
- onCellHovered: Nn,
3305
- onNestedContentToggled: z[5] || (z[5] = (we) => se(s(k).NESTED_CONTENT_TOGGLED, we)),
3306
- onRowClick: Rn,
3307
- onOnFrozenColumnsKeyPress: s(mn),
3308
- onSelectRow: s(dn),
3309
- onSelectNestedRow: s(un)
3310
- }, Te({ _: 2 }, [
3311
- Ce(s(d), (we, De) => ({
3312
- name: De,
3313
- fn: H((je) => [
3314
- Le(I.$slots, De, ee({ ref_for: !0 }, je), void 0, !0)
3315
- ])
3316
- }))
3317
- ]), 1032, ["style", "allow-row-clicks", "column-sets", "condensed", "dragging-columns", "dragging-events-for-row-cell", "get-data-item-id", "has-nested-content", "has-nested-rows", "has-left-overflow", "highlighted-rows", "hovered-row-index", "hovered-over-column-state", "is-data-item-disabled", "is-row-last-child", "is-measuring-column-widths", "row-data", "row-index", "row-set-size", "show-frozen-columns-separator", "should-show-nested-content", "should-show-nested-rows", "selectable", "selected-items", "onOnFrozenColumnsKeyPress", "onSelectRow", "onSelectNestedRow"]);
3318
- }), 128))
3319
- ], 32))
3320
- ], 42, Do),
3321
- s($e) ? (c(), P(s(Xs), {
3322
- key: 2,
3323
- loading: s(R),
3324
- "is-infinite-scroll": s(fn),
3325
- "onUpdate:showMore": s(vn)
3326
- }, null, 8, ["loading", "is-infinite-scroll", "onUpdate:showMore"])) : U("", !0),
3327
- e.stickyHorizontalScrollbar ? (c(), b("div", {
3328
- key: 3,
3329
- ref_key: "virtualHorizontalScrollbarRef",
3330
- ref: u,
3331
- class: ce(["b-data-grid__horizontal-scrollbar", s(Cn)]),
3332
- "aria-hidden": "true",
3333
- "data-testid": "sticky-horizontal-scrollbar",
3334
- onScroll: z[8] || (z[8] = //@ts-ignore
3335
- (...q) => s(vt) && s(vt)(...q))
3336
- }, [
3337
- N("div", {
3338
- style: ke({ width: `${s(Re)}px`, height: "15px" })
3339
- }, null, 4)
3340
- ], 34)) : U("", !0),
3341
- s(J) && !s($e) ? (c(), b("div", {
3342
- key: 4,
3343
- "data-testid": "pagination-container",
3344
- class: ce(["b-data-grid__pagination", bn.value])
3345
- }, [
3346
- Y(s(Kn), ee(s(J), {
3347
- "aria-label": `${s(ht)} navigation`,
3348
- onNavigate: kn,
3349
- onItemsPage: Mn
3350
- }), {
3351
- default: H(() => [
3352
- s(t)("pagination-slot") ? Le(I.$slots, "pagination-slot", { key: 0 }, void 0, !0) : U("", !0)
3353
- ]),
3354
- _: 3
3355
- }, 16, ["aria-label"])
3356
- ], 2)) : U("", !0),
3357
- I.$slots.footer ? (c(), b("div", zo, [
3358
- Le(I.$slots, "footer", {}, void 0, !0)
3359
- ])) : U("", !0),
3360
- In.value ? (c(), P(s(Yn), {
3361
- key: 6,
3362
- actions: e.bulkActions,
3363
- "item-counter": Ct.value,
3364
- "extra-bottom-spacing": s(x),
3365
- onClose: z[9] || (z[9] = (q) => s(ct)(!1))
3366
- }, null, 8, ["actions", "item-counter", "extra-bottom-spacing"])) : U("", !0)
3367
- ], 10, To);
3368
- };
3369
- }
3370
- }), Ti = /* @__PURE__ */ ie(Uo, [["__scopeId", "data-v-2c5c798a"]]);
3371
- export {
3372
- Qe as B,
3373
- Ai as a,
3374
- Oe as b,
3375
- pe as c,
3376
- Ti as d,
3377
- k as e,
3378
- He as f
3379
- };
3380
- //# sourceMappingURL=data-grid.jRydtYyG.js.map