@adyen/bento-vue2 1.42.0 → 1.44.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 (169) hide show
  1. package/dist/@types/index.d.ts +136 -53
  2. package/dist/action-bar.js +1 -1
  3. package/dist/assets/accordion-item.css +1 -1
  4. package/dist/assets/action-bar.css +1 -1
  5. package/dist/assets/base-modal.css +1 -1
  6. package/dist/assets/button-actions-with-menu.css +1 -1
  7. package/dist/assets/button-actions.css +1 -1
  8. package/dist/assets/card.css +1 -1
  9. package/dist/assets/data-grid.css +1 -1
  10. package/dist/assets/date-range-picker.css +1 -1
  11. package/dist/assets/dialog-page.css +1 -1
  12. package/dist/assets/dropdown-default-textbox.css +1 -1
  13. package/dist/assets/dropdown.css +1 -1
  14. package/dist/assets/file-uploader.css +1 -1
  15. package/dist/assets/filter-bar.css +1 -1
  16. package/dist/assets/header.css +1 -1
  17. package/dist/assets/inspector.css +1 -1
  18. package/dist/assets/menu.css +1 -1
  19. package/dist/assets/modal-fullscreen.css +1 -1
  20. package/dist/assets/popover.css +1 -1
  21. package/dist/assets/selection-card-group.css +1 -1
  22. package/dist/assets/sidepanel.css +1 -1
  23. package/dist/assets/textarea.css +1 -1
  24. package/dist/assets/typography.css +1 -1
  25. package/dist/button.js +7 -8
  26. package/dist/button.js.map +1 -1
  27. package/dist/card.js +1 -1
  28. package/dist/checkbox.js +2 -2
  29. package/dist/chunks/{action-bar.C1iwQWyj.js → action-bar.Dx12xlEW.js} +16 -16
  30. package/dist/chunks/action-bar.Dx12xlEW.js.map +1 -0
  31. package/dist/chunks/{base-modal.DroVbSCn.js → base-modal.BrqNR-ah.js} +2 -2
  32. package/dist/chunks/{base-modal.DroVbSCn.js.map → base-modal.BrqNR-ah.js.map} +1 -1
  33. package/dist/chunks/{button-actions-with-menu.dp6C-PKX.js → button-actions-with-menu.ptKgeQEb.js} +38 -29
  34. package/dist/chunks/button-actions-with-menu.ptKgeQEb.js.map +1 -0
  35. package/dist/chunks/button-actions.BIQ3qA8q.js +252 -0
  36. package/dist/chunks/button-actions.BIQ3qA8q.js.map +1 -0
  37. package/dist/chunks/{card.BcjxzwZV.js → card.D9g7fZDX.js} +2 -2
  38. package/dist/chunks/{card.BcjxzwZV.js.map → card.D9g7fZDX.js.map} +1 -1
  39. package/dist/chunks/{checkbox-group.B1FsPVSl.js → checkbox-group.Bcqac3y8.js} +2 -2
  40. package/dist/chunks/{checkbox-group.B1FsPVSl.js.map → checkbox-group.Bcqac3y8.js.map} +1 -1
  41. package/dist/chunks/{checkbox.kd1EnszA.js → checkbox.B1qjI4R_.js} +15 -15
  42. package/dist/chunks/{checkbox.kd1EnszA.js.map → checkbox.B1qjI4R_.js.map} +1 -1
  43. package/dist/chunks/{code-snippet.DGMVhQoj.js → code-snippet.rmKiWrIv.js} +4 -4
  44. package/dist/chunks/{code-snippet.DGMVhQoj.js.map → code-snippet.rmKiWrIv.js.map} +1 -1
  45. package/dist/chunks/{dashboard-section.D8ey7nzl.js → dashboard-section._KVy37B0.js} +3 -3
  46. package/dist/chunks/{dashboard-section.D8ey7nzl.js.map → dashboard-section._KVy37B0.js.map} +1 -1
  47. package/dist/chunks/{dashed-underline.dGO33Q_E.js → dashed-underline.DX5QlK14.js} +2 -2
  48. package/dist/chunks/{dashed-underline.dGO33Q_E.js.map → dashed-underline.DX5QlK14.js.map} +1 -1
  49. package/dist/chunks/{data-grid-template.BF7JMfoJ.js → data-grid-template.BgTUIoak.js} +2 -2
  50. package/dist/chunks/{data-grid-template.BF7JMfoJ.js.map → data-grid-template.BgTUIoak.js.map} +1 -1
  51. package/dist/chunks/data-grid.sAbzCVND.js +2556 -0
  52. package/dist/chunks/data-grid.sAbzCVND.js.map +1 -0
  53. package/dist/chunks/{date-picker.Dfg1_eo6.js → date-picker.DrSWxADA.js} +3 -3
  54. package/dist/chunks/{date-picker.Dfg1_eo6.js.map → date-picker.DrSWxADA.js.map} +1 -1
  55. package/dist/chunks/{date-range-picker.BvHFTptS.js → date-range-picker.CFIOD59O.js} +178 -175
  56. package/dist/chunks/date-range-picker.CFIOD59O.js.map +1 -0
  57. package/dist/chunks/{dropdown-default-textbox.DPZmj7xJ.js → dropdown-default-textbox.ZAFh7KqG.js} +111 -103
  58. package/dist/chunks/{dropdown-default-textbox.DPZmj7xJ.js.map → dropdown-default-textbox.ZAFh7KqG.js.map} +1 -1
  59. package/dist/chunks/{dropdown-tag.DqgJnpjk.js → dropdown-tag.Ntdp7P7W.js} +2 -2
  60. package/dist/chunks/{dropdown-tag.DqgJnpjk.js.map → dropdown-tag.Ntdp7P7W.js.map} +1 -1
  61. package/dist/chunks/{dropdown.2tXfuDlU.js → dropdown.DC9un4VJ.js} +240 -234
  62. package/dist/chunks/{dropdown.2tXfuDlU.js.map → dropdown.DC9un4VJ.js.map} +1 -1
  63. package/dist/chunks/es6.C-HLzYPA.js +11 -0
  64. package/dist/chunks/es6.C-HLzYPA.js.map +1 -0
  65. package/dist/chunks/{file-uploader.CK-Frs_q.js → file-uploader.ItCr8Ezn.js} +228 -227
  66. package/dist/chunks/file-uploader.ItCr8Ezn.js.map +1 -0
  67. package/dist/chunks/{filter-bar.DP_nQeeo.js → filter-bar.Dowrph-Z.js} +21 -22
  68. package/dist/chunks/filter-bar.Dowrph-Z.js.map +1 -0
  69. package/dist/chunks/{footer-actions.DwnLB4NW.js → footer-actions.B3GJ1wNP.js} +2 -2
  70. package/dist/chunks/{footer-actions.DwnLB4NW.js.map → footer-actions.B3GJ1wNP.js.map} +1 -1
  71. package/dist/chunks/{header.CAJtHW1k.js → header.BLjdXtYJ.js} +4 -4
  72. package/dist/chunks/{header.CAJtHW1k.js.map → header.BLjdXtYJ.js.map} +1 -1
  73. package/dist/chunks/index.Gcw_BUVh.js +367 -0
  74. package/dist/chunks/index.Gcw_BUVh.js.map +1 -0
  75. package/dist/chunks/{input-field-password.ijBN-aVx.js → input-field-password.CgxF9jhq.js} +4 -4
  76. package/dist/chunks/{input-field-password.ijBN-aVx.js.map → input-field-password.CgxF9jhq.js.map} +1 -1
  77. package/dist/chunks/{input-field.BoElSWuV.js → input-field.CcjqGkLs.js} +2 -2
  78. package/dist/chunks/{input-field.BoElSWuV.js.map → input-field.CcjqGkLs.js.map} +1 -1
  79. package/dist/chunks/{layout-row.6jCBhtd4.js → layout-row.DzS_XyyF.js} +2 -2
  80. package/dist/chunks/{layout-row.6jCBhtd4.js.map → layout-row.DzS_XyyF.js.map} +1 -1
  81. package/dist/chunks/{menu.N41WnXc8.js → menu.B78fzH_k.js} +81 -54
  82. package/dist/chunks/menu.B78fzH_k.js.map +1 -0
  83. package/dist/chunks/{modal-fullscreen.BbNe6M9T.js → modal-fullscreen.DgftXCJe.js} +2 -2
  84. package/dist/chunks/{modal-fullscreen.BbNe6M9T.js.map → modal-fullscreen.DgftXCJe.js.map} +1 -1
  85. package/dist/chunks/{modal.Cb4zg5fN.js → modal.BA745pfv.js} +4 -4
  86. package/dist/chunks/{modal.Cb4zg5fN.js.map → modal.BA745pfv.js.map} +1 -1
  87. package/dist/chunks/{pagination.FbkfItkS.js → pagination.CfwtuZ7R.js} +2 -2
  88. package/dist/chunks/{pagination.FbkfItkS.js.map → pagination.CfwtuZ7R.js.map} +1 -1
  89. package/dist/chunks/{popover.Uy-vuQq5.js → popover.ZlmaSYms.js} +2 -2
  90. package/dist/chunks/{popover.Uy-vuQq5.js.map → popover.ZlmaSYms.js.map} +1 -1
  91. package/dist/chunks/{promo-banner.CGz3MVPw.js → promo-banner.cTUF9seG.js} +2 -2
  92. package/dist/chunks/{promo-banner.CGz3MVPw.js.map → promo-banner.cTUF9seG.js.map} +1 -1
  93. package/dist/chunks/{search-bar.DD6eA0jG.js → search-bar.lYuXPzBX.js} +3 -3
  94. package/dist/chunks/{search-bar.DD6eA0jG.js.map → search-bar.lYuXPzBX.js.map} +1 -1
  95. package/dist/chunks/{secondary-nav.C56_jw55.js → secondary-nav.CF6WPYn4.js} +4 -4
  96. package/dist/chunks/{secondary-nav.C56_jw55.js.map → secondary-nav.CF6WPYn4.js.map} +1 -1
  97. package/dist/chunks/{selection-card-group.DwkH9xJd.js → selection-card-group.CjuBQ2UA.js} +11 -11
  98. package/dist/chunks/{selection-card-group.DwkH9xJd.js.map → selection-card-group.CjuBQ2UA.js.map} +1 -1
  99. package/dist/chunks/{sidepanel.CRJN9Acz.js → sidepanel.NUx7L5f1.js} +2 -2
  100. package/dist/chunks/{sidepanel.CRJN9Acz.js.map → sidepanel.NUx7L5f1.js.map} +1 -1
  101. package/dist/chunks/{teleport.CQKBJZU5.js → teleport.B5fwsT5y.js} +26 -17
  102. package/dist/chunks/teleport.B5fwsT5y.js.map +1 -0
  103. package/dist/chunks/textarea.F-JyRtIw.js +196 -0
  104. package/dist/chunks/{textarea.Y3yd_3ll.js.map → textarea.F-JyRtIw.js.map} +1 -1
  105. package/dist/chunks/{timeline-item.CCV4U3Zx.js → timeline-item.BJyB8-Wv.js} +3 -3
  106. package/dist/chunks/{timeline-item.CCV4U3Zx.js.map → timeline-item.BJyB8-Wv.js.map} +1 -1
  107. package/dist/chunks/{tutorial.4r7MKNEU.js → tutorial.DFvMZAN5.js} +4 -4
  108. package/dist/chunks/{tutorial.4r7MKNEU.js.map → tutorial.DFvMZAN5.js.map} +1 -1
  109. package/dist/chunks/{use-cached-selected-values.-_Gk6HO_.js → use-cached-selected-values.BiqVX5O7.js} +32 -29
  110. package/dist/chunks/{use-cached-selected-values.-_Gk6HO_.js.map → use-cached-selected-values.BiqVX5O7.js.map} +1 -1
  111. package/dist/code-snippet.js +1 -1
  112. package/dist/dashboard-template.js +1 -1
  113. package/dist/dashed-underline.js +1 -1
  114. package/dist/data-grid-template.js +1 -1
  115. package/dist/data-grid.js +1 -1
  116. package/dist/date-picker.js +1 -1
  117. package/dist/date-range-picker.js +1 -1
  118. package/dist/dropdown.js +4 -4
  119. package/dist/file-uploader.js +1 -1
  120. package/dist/filter-bar.js +1 -1
  121. package/dist/header.js +1 -1
  122. package/dist/index.js +88 -89
  123. package/dist/index.js.map +1 -1
  124. package/dist/input-field-password.js +1 -1
  125. package/dist/input-field.js +1 -1
  126. package/dist/internal.js +28 -24
  127. package/dist/internal.js.map +1 -1
  128. package/dist/layout.js +1 -1
  129. package/dist/menu.js +1 -1
  130. package/dist/modal-fullscreen.js +1 -1
  131. package/dist/modal.js +2 -2
  132. package/dist/pagination.js +1 -1
  133. package/dist/popover.js +1 -1
  134. package/dist/promo-banner.js +1 -1
  135. package/dist/search-bar.js +2 -2
  136. package/dist/secondary-nav.js +1 -1
  137. package/dist/selection-card.js +1 -1
  138. package/dist/sidepanel.js +1 -1
  139. package/dist/styles/bento-dark.css +3 -0
  140. package/dist/styles/bento-light.css +3 -0
  141. package/dist/styles/bento.css +3 -0
  142. package/dist/styles/legacy.css +3 -0
  143. package/dist/styles/styleguide.css +3 -0
  144. package/dist/textarea.js +1 -1
  145. package/dist/timeline.js +1 -1
  146. package/dist/tutorial.js +1 -1
  147. package/dist/web-types.json +122 -2
  148. package/package.json +7 -4
  149. package/dist/assets/loading-button.css +0 -1
  150. package/dist/chunks/action-bar.C1iwQWyj.js.map +0 -1
  151. package/dist/chunks/button-actions-with-menu.dp6C-PKX.js.map +0 -1
  152. package/dist/chunks/button-actions.Cpx4PQp0.js +0 -111
  153. package/dist/chunks/button-actions.Cpx4PQp0.js.map +0 -1
  154. package/dist/chunks/data-grid.bti50Fs6.js +0 -2373
  155. package/dist/chunks/data-grid.bti50Fs6.js.map +0 -1
  156. package/dist/chunks/date-range-picker.BvHFTptS.js.map +0 -1
  157. package/dist/chunks/es6.b4enG1py.js +0 -10
  158. package/dist/chunks/es6.b4enG1py.js.map +0 -1
  159. package/dist/chunks/file-uploader.CK-Frs_q.js.map +0 -1
  160. package/dist/chunks/filter-bar.DP_nQeeo.js.map +0 -1
  161. package/dist/chunks/index.BiaBX5uu.js +0 -345
  162. package/dist/chunks/index.BiaBX5uu.js.map +0 -1
  163. package/dist/chunks/loading-button.CiPmvU7F.js +0 -113
  164. package/dist/chunks/loading-button.CiPmvU7F.js.map +0 -1
  165. package/dist/chunks/menu.N41WnXc8.js.map +0 -1
  166. package/dist/chunks/teleport.CQKBJZU5.js.map +0 -1
  167. package/dist/chunks/textarea.Y3yd_3ll.js +0 -192
  168. package/dist/chunks/use-click-outside.D6aIgS15.js +0 -14
  169. package/dist/chunks/use-click-outside.D6aIgS15.js.map +0 -1
@@ -1,2373 +0,0 @@
1
- import { ref as E, reactive as Ee, toRefs as be, computed as S, watchEffect as Kt, watch as Z, onMounted as ye, nextTick as Y, onUnmounted as Je, onBeforeUpdate as Qt, defineComponent as J, toRef as Ke, useSlots as Oe, provide as en, inject as Me } from "vue";
2
- import { C as tn } from "./checkmark-circle-fill.Cn7JN_Tk.js";
3
- import { W as nn } from "./warning-filled.CLKRzGMT.js";
4
- import { n as W } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
5
- import { C as Qe } from "./cross.CsUPDmaA.js";
6
- import { N as Pe } from "./checkbox-input.Bo4NxNOh.js";
7
- import { d as sn } from "./popper-container.CnWphJTN.js";
8
- import { K as ee, B as on } from "./tooltip.DH8TqpYV.js";
9
- import { B as ln } from "./action-bar.C1iwQWyj.js";
10
- import { B as an } from "./pagination.FbkfItkS.js";
11
- import { B as et } from "./loading-indicator.z8COalOc.js";
12
- import { B as me, p as tt } from "./typography.Bu_WAKdf.js";
13
- import { u as rn } from "./aria-label.CaUURpnB.js";
14
- import { g as dn } from "./get-slot-text.Cgn-E48s.js";
15
- import { u as oe } from "./i18n.BQkEbtPM.js";
16
- import { B as cn } from "./empty-state.B8ZeRgDi.js";
17
- import { B as ve } from "./filter-bar.DP_nQeeo.js";
18
- import { E as un } from "./tabs.keys.Bc2pSKRw.js";
19
- import { D as fn } from "./data-grid-template.keys.2_AkxuNT.js";
20
- import { o as Re } from "./resize.Bqks3WUm.js";
21
- import "./index.Cl4_42j5.js";
22
- import { a as ze, B as gn } from "./popover.Uy-vuQq5.js";
23
- import { B as nt } from "./button.CufUNBkv.js";
24
- import { B as st } from "./toggle.INRYdQzz.js";
25
- import { B as _n } from "./search-bar.DD6eA0jG.js";
26
- import { u as vn } from "./dropdown.2tXfuDlU.js";
27
- import { g as ot } from "./generate-uid.D-HFI38h.js";
28
- import { S as Cn } from "./search.CBKhp7zB.js";
29
- import { B as we } from "./toggle-button.CYplDIO-.js";
30
- import { B as mn } from "./directive.O3yEdalv.js";
31
- import { B as lt } from "./checkbox.kd1EnszA.js";
32
- import { B as hn } from "./info-icon.p-28zHUJ.js";
33
- import { B as at, O as pn, D as Sn } from "./menu.N41WnXc8.js";
34
- import { A as Ln } from "./dialog-page.CplkzZGZ.js";
35
- import { H as En, S as bn } from "./show.IEAxtCB7.js";
36
- import { l as Be } from "./events.CMzGybJJ.js";
37
- import { B as yn, a as On } from "./loading-button.CiPmvU7F.js";
38
- import { u as it } from "./use-has-slot.C9lQZ6nz.js";
39
- import { u as Rn } from "./use-expandable-content-height.GkjjbmPy.js";
40
- import { E as wn } from "./link.v-y0fKjn.js";
41
- import { C as An } from "./copy.DgzxvExj.js";
42
- import { C as In, a as Tn } from "./chevron-up.B2uWhZf7.js";
43
- import "../assets/data-grid.css";
44
- var Le = /* @__PURE__ */ ((s) => (s.WRAP = "wrap", s.ELLIPSIS = "ellipsis", s))(Le || {}), ne = /* @__PURE__ */ ((s) => (s.OUTLINE = "outline", s.SCROLL = "scroll", s.STICKY_FILTERS = "sticky-filters", s.OVERFLOW_SHADOW_LEFT = "overflow-shadow-left", s.OVERFLOW_SHADOW_RIGHT = "overflow-shadow-right", s.NO_SPACING_TOP = "no-spacing-top", s))(ne || {}), se = /* @__PURE__ */ ((s) => (s.ASCENDING = "asc", s.DESCENDING = "desc", s))(se || {}), O = /* @__PURE__ */ ((s) => (s.COLUMNS = "columns", s.COLUMN_RESIZE = "column-resize", s.ITEMS_PAGE = "items-page", s.NAVIGATE = "navigate", s.FILTER_SEARCH_INPUT = "filter-search-input", s.FILTER_SEARCH_CLEAR = "filter-search-clear", s.UPDATE_COLUMNS = "update:columns", s.UPDATE_CONDENSED = "update:condensed", s.UPDATE_FILTERS = "update:filters", s.UPDATE_FILTER_VALUES = "update:filter-values", s.UPDATE_FILTER_SEARCH_TERM = "update:filter-search-term", s.UPDATE_PAGINATION = "update:pagination", s.UPDATE_SELECTION = "update:selection", s.UPDATE_SHOW_MORE = "update:show-more", s.UPDATE_SORT_BY = "update:sort-by", s.ROW_CLICK = "row-click", s.SELECT = "select", s.SELECT_ALL_ACROSS_PAGES = "select-all-across-pages", s.SORT = "sort", s))(O || {}), Ce = /* @__PURE__ */ ((s) => (s.ASCENDING = "ascending", s.DESCENDING = "descending", s.NONE = "none", s))(Ce || {}), U = /* @__PURE__ */ ((s) => (s.COLUMN_RESIZE = "column-resize", s.COLUMN_RESIZING = "column-resizing", s.SELECT_ALL_ROWS = "select-all-rows", s.SELECT_ALL_ACROSS_PAGES = "select-all-across-pages", s.COLUMN_MOVE = "column-move", s.COLUMN_UPDATE = "column-update", s.COLUMN_MENU_OPEN = "column-menu-open", s.COLUMN_MENU_CLOSE = "column-menu-close", s.COLUMN_HOVER = "column-hover", s.COLUMN_DRAG_START = "column-dragstart", s.COLUMN_DRAG_ENTER = "column-dragenter", s.COLUMN_DRAG_END = "column-dragend", s.COLUMN_DROP = "column-drop", s))(U || {});
45
- const Nn = (s, e) => {
46
- const n = E(null), t = E(!1), o = E(void 0), l = s.value.reduce((C, b) => (C[b.field] = null, C), {}), r = Ee(l), _ = be(r);
47
- let u = 0, m = "";
48
- const v = S(
49
- () => Object.fromEntries(s.value.map(({ field: C, width: b, minWidth: y }) => [C, { width: b, minWidth: y }]))
50
- );
51
- Kt(() => o.value = v.value);
52
- let c = null, i = null;
53
- const a = (C) => {
54
- const b = C.clientX - u, y = m, A = o.value[y].width + b;
55
- o.value[y].width = A > v.value[y].minWidth ? A : v.value[y].minWidth, e(U.COLUMN_RESIZING, o.value), u = C.clientX;
56
- }, f = () => {
57
- t.value = !1, c == null || c(), i == null || i(), m && e(U.COLUMN_RESIZE, {
58
- field: m,
59
- width: o.value[m].width
60
- }), c = null, i = null, m = "", u = null;
61
- }, L = (C, b, y) => {
62
- if (y.preventDefault(), C) {
63
- if (t.value = !0, y.buttons !== 1) {
64
- f();
65
- return;
66
- }
67
- m = b, u = y.clientX, c = Be(window, "mousemove", a), i = Be(window, "mouseup", f);
68
- }
69
- };
70
- return Z(
71
- () => t.value,
72
- (C, b) => {
73
- !C && b && (e(U.COLUMN_HOVER, n.value), n.value = null);
74
- }
75
- ), {
76
- resizeData: o,
77
- allColumnRefs: _,
78
- startResize: L,
79
- isResizing: t,
80
- columnHoverEventToEmitAfterResizing: n
81
- };
82
- }, Dn = 100, $e = 50, V = "b-actions-column", xn = 32, Fn = 56, Mn = 56, Pn = 80, zn = 36, Bn = 1, rt = 16, $n = 20, Un = (s, e, n) => {
83
- const t = {}, o = [], l = (_) => {
84
- const u = t[_];
85
- u && u.frozen !== !0 && (t[_].frozen = !0, o.push(_));
86
- };
87
- function r() {
88
- if (o.length === n.length)
89
- return;
90
- const _ = { min: {}, max: {} };
91
- let u = s, m = e, v = 0;
92
- o.forEach((c) => {
93
- u -= t[c].computedWidth, m -= t[c].flex;
94
- });
95
- for (let c = 0, i = n.length; c < i; c += 1) {
96
- const a = n[c];
97
- if (t[a.field] && t[a.field].frozen === !0)
98
- continue;
99
- let L = u / m * a.flex;
100
- L < a.minWidth && (v += a.minWidth - L, L = a.minWidth, _.min[a.field] = !0), t[a.field] = {
101
- frozen: !1,
102
- computedWidth: L,
103
- flex: a.flex
104
- };
105
- }
106
- v > 0 ? Object.keys(_.min).forEach((c) => {
107
- l(c);
108
- }) : n.forEach(({ field: c }) => {
109
- l(c);
110
- }), r();
111
- }
112
- return r(), t;
113
- }, Ue = (s, e) => {
114
- let n = Bn;
115
- return e && (n += rt * 2), s != null && s.offsetWidth ? s.offsetWidth + n : 0;
116
- }, kn = (s) => {
117
- var e, n, t, o;
118
- return (e = s == null ? void 0 : s.hasNestedContent) != null && e.value ? (n = s == null ? void 0 : s.hasSelectableColumn) != null && n.value ? (t = s == null ? void 0 : s.hasSelectableAcrossPages) != null && t.value ? Pn : Mn : zn : (o = s == null ? void 0 : s.hasSelectableAcrossPages) != null && o.value ? Fn : xn;
119
- }, Wn = (s, e, n, t, o, l) => {
120
- const r = E(s.value), _ = E(e), u = E(n), m = E(t), v = E(o), c = E(!1);
121
- Z(
122
- () => s.value,
123
- (p, h) => {
124
- var x, g;
125
- const w = (p == null ? void 0 : p.map(({ field: F }) => F).toString()) === (h == null ? void 0 : h.map(({ field: F }) => F).toString());
126
- if (!((x = l == null ? void 0 : l.allowColumnDragAndDrop) != null && x.value) || !w) {
127
- r.value = s.value;
128
- return;
129
- }
130
- r.value = ((g = r.value) == null ? void 0 : g.length) === 0 ? s.value : s.value.sort((F, I) => {
131
- const N = r.value.findIndex((M) => M.field === F.field), $ = r.value.findIndex((M) => M.field === I.field);
132
- return N === -1 ? 1 : $ === -1 ? -1 : N - $;
133
- });
134
- }
135
- );
136
- const i = E();
137
- let a = null;
138
- const f = S(() => {
139
- var N, $;
140
- const p = [];
141
- let h = 0, w = 0;
142
- const x = {};
143
- let g = r.value.filter((M) => M.visible !== !1);
144
- const F = r.value.filter((M) => M.visible === !1);
145
- if ((N = l == null ? void 0 : l.hasSelectableColumn) != null && N.value || ($ = l == null ? void 0 : l.hasNestedContent) != null && $.value) {
146
- const M = kn(l);
147
- g = [
148
- {
149
- field: V,
150
- label: "",
151
- minWidth: M,
152
- width: M,
153
- frozen: !0,
154
- padding: { left: !1, right: !1 }
155
- },
156
- ...g
157
- ];
158
- }
159
- g.forEach((M) => {
160
- const D = { ...M };
161
- let j;
162
- D.flex && D.flex > 0 ? (h += D.flex, j = 0, p.push(D)) : j = Math.max(
163
- (D == null ? void 0 : D.width) ?? Dn,
164
- (D == null ? void 0 : D.minWidth) ?? $e
165
- ), w += j, D.width = j, D.minWidth = (D == null ? void 0 : D.minWidth) ?? $e, x[D.field] = D;
166
- });
167
- const I = Math.max(i.value - w, 0);
168
- if (h > 0 && i.value > 0) {
169
- const M = Un(I, h, p);
170
- Object.keys(M).forEach((D) => {
171
- x[D].width = M[D].computedWidth;
172
- });
173
- }
174
- return F.forEach((M) => {
175
- const D = { ...M };
176
- x[D.field] = D;
177
- }), Object.values(x);
178
- }), L = E(void 0), C = (p) => {
179
- L.value = { ...L.value, ...p };
180
- }, b = async () => {
181
- r.value.some((p) => p == null ? void 0 : p.autoWidth) && (c.value = !0, await Y(), r == null || r.value.filter((p) => p == null ? void 0 : p.autoWidth).forEach(({ field: p, minWidth: h }) => {
182
- var F, I, N, $;
183
- const w = Ue(
184
- (F = m.value) == null ? void 0 : F[p],
185
- (I = l == null ? void 0 : l.hasColumnPanel) == null ? void 0 : I.value
186
- ), x = ($ = (N = v.value) == null ? void 0 : N[p]) == null ? void 0 : $.reduce(
187
- (M, D) => Math.max(M, Ue(D)),
188
- 0
189
- ), g = Math.max(w, x ?? 0);
190
- (h === void 0 || g > h) && C({
191
- [p]: {
192
- width: g
193
- }
194
- });
195
- }), c.value = !1);
196
- };
197
- Z([() => r.value, () => _.value], async () => {
198
- r.value.some((p) => p == null ? void 0 : p.autoWidth) && await b();
199
- });
200
- const y = S(
201
- () => f.value.map((p) => {
202
- var h, w;
203
- return {
204
- ...p,
205
- // Override column width with resized ones
206
- width: ((w = (h = L.value) == null ? void 0 : h[p.field]) == null ? void 0 : w.width) ?? p.width
207
- };
208
- })
209
- ), A = S(
210
- () => {
211
- var p;
212
- return (p = y.value) == null ? void 0 : p.filter(({ visible: h }) => h !== !1).reduce((h, w) => w.width + h, 0);
213
- }
214
- ), z = S(
215
- () => i.value <= A.value
216
- ), T = S(() => ({
217
- width: i.value > A.value ? "100%" : "fit-content"
218
- }));
219
- return ye(() => {
220
- var h;
221
- const p = l != null && l.isDataGridTemplate ? $n : 0;
222
- Y(() => {
223
- u.value && (i.value = u.value.getBoundingClientRect().width - p);
224
- const w = Z(
225
- u,
226
- () => {
227
- u.value && (Y(() => w()), a = Re(u.value, ({ width: x }) => {
228
- i.value = x - p;
229
- }));
230
- },
231
- { immediate: !0 }
232
- );
233
- }), (h = document == null ? void 0 : document.fonts) != null && h.ready ? document.fonts.ready.then(() => {
234
- b();
235
- }) : b();
236
- }), Je(() => {
237
- a == null || a.disconnect();
238
- }), Qt(() => {
239
- var p;
240
- v.value && ((p = Object.keys(v.value)) == null ? void 0 : p.length) > 0 && Object.keys(v.value).forEach((w) => {
241
- v.value[w] = [];
242
- });
243
- }), {
244
- columnDefs: y,
245
- gridColumnWidthStyle: T,
246
- onColumnWidthOverride: C,
247
- isMeasuringColumnWidths: c,
248
- isTotalWidthOfColumnsTakingUpAllAvailableGridWidth: z,
249
- columns: r,
250
- totalWidthOfAllColumns: A
251
- };
252
- }, Gn = (s, e, n, t, o) => {
253
- const l = E(s.value ?? []), r = Ee({
254
- allItemsSelected: !1,
255
- isIndeterminate: !1
256
- }), _ = () => {
257
- e(O.SELECT, l.value), e(O.UPDATE_SELECTION, l.value);
258
- }, u = (c) => {
259
- var a, f, L, C, b;
260
- if (l.value = c, ((a = n.value) == null ? void 0 : a.length) > 0 && ((f = n.value) == null ? void 0 : f.filter((y) => !o(y)).every((y) => l.value.includes(t(y))))) {
261
- r.allItemsSelected = !0;
262
- const y = ((L = n.value) == null ? void 0 : L.length) > 0 && n.value.every((A) => l.value.includes(t(A)));
263
- r.isIndeterminate = !y;
264
- } else
265
- r.allItemsSelected = !1, r.isIndeterminate = ((C = l.value) == null ? void 0 : C.length) > 0 && ((b = n.value) == null ? void 0 : b.length) > 0 && n.value.some((y) => l.value.includes(t(y)));
266
- }, m = (c) => {
267
- Y(() => {
268
- var i, a, f;
269
- if (r.allItemsSelected = c, c) {
270
- l.value = (a = (i = n.value) == null ? void 0 : i.filter((C) => !o(C))) == null ? void 0 : a.map((C) => t(C));
271
- const L = ((f = n.value) == null ? void 0 : f.length) > 0 && n.value.every((C) => l.value.includes(t(C)));
272
- r.isIndeterminate = l.value.length > 0 && !L;
273
- } else
274
- l.value = [], r.isIndeterminate = !1;
275
- _();
276
- });
277
- }, v = (c) => {
278
- Y(() => {
279
- u(c), _();
280
- });
281
- };
282
- return Z(
283
- () => s.value,
284
- () => {
285
- u(s.value ?? []);
286
- },
287
- { immediate: !0 }
288
- ), Z(
289
- () => n.value,
290
- () => {
291
- u(l.value);
292
- }
293
- ), { onAllRowSelect: m, onRowSelect: v, allItemsSelectedState: r, selectedItems: l };
294
- }, Hn = (s, e, n) => ({ isSorting: (r) => s.value.some((_) => _.field === r), getSortingDirection: (r) => {
295
- var _;
296
- return (_ = s.value.find((u) => u.field === r)) == null ? void 0 : _.direction;
297
- }, sortByColumnField: (r) => {
298
- var m;
299
- if (!e.value.some((v) => v.field === r && v.sortable))
300
- return;
301
- const u = [{
302
- field: r,
303
- direction: ((m = s.value.find((v) => v.field === r)) == null ? void 0 : m.direction) === se.ASCENDING ? se.DESCENDING : se.ASCENDING
304
- }];
305
- n("sort", u);
306
- } });
307
- var H = ((s) => (s[s.ARROW_DOWN = ee.ARROW_DOWN] = "ARROW_DOWN", s[s.ARROW_UP = ee.ARROW_UP] = "ARROW_UP", s[s.ARROW_LEFT = ee.ARROW_LEFT] = "ARROW_LEFT", s[s.ARROW_RIGHT = ee.ARROW_RIGHT] = "ARROW_RIGHT", s[s.PAGE_UP = ee.PAGE_UP] = "PAGE_UP", s[s.PAGE_DOWN = ee.PAGE_DOWN] = "PAGE_DOWN", s[s.END = ee.END] = "END", s[s.HOME = ee.HOME] = "HOME", s))(H || {});
308
- const Vn = (s, e, n) => {
309
- const t = S(() => {
310
- const a = e.value.filter(({ visible: f }) => f !== !1);
311
- return n.value ? a.length + 1 : a.length;
312
- }), o = S(
313
- () => [...Object.values(s.value)].flat(1).sort((a, f) => {
314
- const L = Number(a.getAttribute("data-cellindex")), C = Number(f.getAttribute("data-cellindex"));
315
- return L > C ? 1 : C > L ? -1 : 0;
316
- })
317
- ), l = (a) => Math.floor(a / t.value), r = (a, f, L) => {
318
- const C = o.value.length - 1, b = t.value - 1, y = l(a), A = a - t.value * y;
319
- return {
320
- [H.PAGE_UP]: A,
321
- [H.PAGE_DOWN]: C - b + A,
322
- [H.END]: L ? C : t.value * y + b,
323
- [H.HOME]: L ? 0 : t.value * y
324
- }[f];
325
- }, _ = (a, f) => {
326
- const C = {
327
- [H.ARROW_DOWN]: t.value,
328
- [H.ARROW_UP]: -t.value,
329
- [H.ARROW_LEFT]: -1,
330
- [H.ARROW_RIGHT]: 1
331
- }[f], b = a + C;
332
- return b < 0 || b >= o.value.length ? a : b;
333
- }, u = (a) => [
334
- H.PAGE_UP,
335
- H.PAGE_DOWN,
336
- H.END,
337
- H.HOME
338
- ].includes(a), m = (a, f, L) => {
339
- const C = o.value.indexOf(a);
340
- return u(f) ? r(C, f, L) : _(C, f);
341
- }, v = (a, f, L) => {
342
- if (!o.value.includes(a))
343
- return;
344
- const C = m(a, f, L);
345
- o.value[C].focus();
346
- }, c = (a) => a in H;
347
- return {
348
- isNavigationKeyCode: c,
349
- focusOnNextGridcell: v,
350
- navigationInput: (a) => {
351
- const { ctrlKey: f, keyCode: L, target: C } = a;
352
- Object.values(s.value).flat(1).includes(C) && c(L) && v(C, L, f);
353
- }
354
- };
355
- }, Zn = 90, jn = (s, e, n, t, o) => {
356
- const l = E(s), r = E(e), _ = E(n), u = E(t), m = S(() => l.value !== "none"), v = S(() => l.value === "automatic"), c = () => {
357
- o(O.UPDATE_SHOW_MORE);
358
- };
359
- return Z(
360
- () => r.value,
361
- () => {
362
- v.value && _.value.offsetHeight / r.value * 100 > Zn && !u.value && c();
363
- }
364
- ), { isLazyLoad: m, isInfiniteScroll: v, verticalScrollPosition: r, emitLazyLoadEvent: c };
365
- }, qn = (s, e, n) => {
366
- const t = E(s), o = E(e), l = Ee({
367
- dragging: null,
368
- dragToLeft: null,
369
- target: null
370
- }), r = (a, f = 0) => {
371
- const L = t.value.findIndex((y) => y.field === a.field), C = L + f;
372
- if (C < 0 || C > t.value.length - 1)
373
- return;
374
- const b = [...t.value];
375
- b.splice(C, 0, b.splice(L, 1)[0]), n(O.COLUMNS, b), n(O.UPDATE_COLUMNS, b);
376
- }, _ = (a, f) => {
377
- l.dragging = a, f.dataTransfer.setData("text", ""), f.dataTransfer.dropEffect = "move";
378
- }, u = (a, f) => {
379
- l.target = a;
380
- const L = f.currentTarget.getBoundingClientRect(), C = L.left + L.width / 2, b = f.clientX ?? 0;
381
- l.dragToLeft = b <= C;
382
- }, m = (a) => {
383
- var f, L;
384
- if (((f = l.dragging) == null ? void 0 : f.field) !== a.field) {
385
- const C = t.value.findIndex((p) => {
386
- var h;
387
- return p.field === ((h = l.dragging) == null ? void 0 : h.field);
388
- }), b = t.value.findIndex((p) => p.field === a.field), y = l.dragToLeft ? b : b + 1, A = y > C ? y - 1 : y;
389
- let z = [...t.value];
390
- z.splice(
391
- A === -1 ? 0 : A,
392
- 0,
393
- z.splice(C, 1)[0]
394
- );
395
- const T = t.value.findIndex((p) => !(p != null && p.frozen));
396
- ((L = l.dragging) == null ? void 0 : L.frozen) !== a.frozen && y !== T && (z = z.map(
397
- (p) => {
398
- var h;
399
- return ((h = l.dragging) == null ? void 0 : h.field) === p.field ? { ...p, frozen: !!(a != null && a.frozen) } : p;
400
- }
401
- )), n(O.COLUMNS, z), n(O.UPDATE_COLUMNS, z);
402
- }
403
- l.dragging = null, l.target = null;
404
- }, v = () => {
405
- l.dragging = null, l.dragToLeft = null, l.target = null;
406
- }, c = S(() => o.value ? {
407
- [U.COLUMN_DRAG_START]: (a, f) => _(a, f),
408
- [U.COLUMN_DRAG_ENTER]: (a, f) => u(a, f),
409
- [U.COLUMN_DROP]: (a) => m(a),
410
- [U.COLUMN_DRAG_END]: () => v()
411
- } : {}), i = S(() => (a) => o.value ? {
412
- dragenter: (f) => {
413
- f.preventDefault(), u(a, f);
414
- },
415
- drop: () => {
416
- m(a);
417
- },
418
- dragover: (f) => {
419
- f.preventDefault();
420
- }
421
- } : {});
422
- return {
423
- // Values
424
- draggingColumns: l,
425
- // Methods
426
- draggingEventsForColumns: c,
427
- draggingEventsForRowCell: i,
428
- onMoveColumnByOffset: r
429
- };
430
- }, Yn = (s, e) => {
431
- const n = E(s), t = S(
432
- () => [...n.value].sort((c, i) => c.frozen === i.frozen ? 0 : c.frozen ? -1 : 1)
433
- ), o = S(
434
- () => t.value.filter((c) => c.frozen && c.visible !== !1)
435
- ), l = S(
436
- () => t.value.filter((c) => !c.frozen && c.visible !== !1)
437
- ), r = S(
438
- () => [
439
- { columnSet: o.value, id: "frozen", isFrozenColumns: !0 },
440
- { columnSet: l.value, id: "unfrozen" }
441
- ].filter(({ columnSet: c }) => c.length)
442
- ), _ = S(
443
- () => n.value.filter((c) => (c == null ? void 0 : c.visible) !== !1 && (c == null ? void 0 : c.field) !== V).length === 1
444
- ), u = (c) => e(O.UPDATE_CONDENSED, c), m = (c) => {
445
- e(O.COLUMNS, c), e(O.UPDATE_COLUMNS, c);
446
- };
447
- return {
448
- // Values
449
- columnSets: r,
450
- isOnlyOneVisibleColumn: _,
451
- sortedColumns: t,
452
- // Methods
453
- onConfigSettingsUpdate: u,
454
- onConfigSettingsColumnsUpdate: m,
455
- onConfigSettingsColumnUpdate: (c) => {
456
- const i = t.value.map(
457
- (a) => (a == null ? void 0 : a.field) === c.field ? c : a
458
- );
459
- m(i);
460
- }
461
- };
462
- }, ke = (s, e) => {
463
- const n = E(0);
464
- let t = null;
465
- const o = () => {
466
- s != null && s.value && e.value && (n.value = s.value.offsetHeight);
467
- };
468
- return ye(() => {
469
- Y(() => {
470
- const l = Z(
471
- s,
472
- () => {
473
- s != null && s.value && (Y(() => l()), t = Re(s.value, () => {
474
- o();
475
- }));
476
- },
477
- { immediate: !0 }
478
- );
479
- Z(
480
- e,
481
- () => {
482
- e.value ? o() : n.value = 0;
483
- },
484
- { immediate: !0 }
485
- );
486
- });
487
- }), Je(() => {
488
- t == null || t.disconnect();
489
- }), n;
490
- }, Xn = (s, e, n, t, o) => {
491
- const l = E(0), r = E(!1), _ = E(!1);
492
- Z(
493
- () => l.value,
494
- () => {
495
- s.value.scrollLeft = l.value, e.value.scrollLeft = l.value, r.value = !!l.value, _.value = e.value.scrollWidth - e.value.offsetWidth > l.value;
496
- }
497
- ), ye(async () => {
498
- var i, a;
499
- await Y(), ((i = e.value) == null ? void 0 : i.offsetWidth) < ((a = e.value) == null ? void 0 : a.scrollWidth) && (_.value = !0);
500
- });
501
- const u = (i) => {
502
- if (l.value = i.target.scrollLeft, n.value = s.value.scrollHeight - i.target.scrollTop, t != null && t.value) {
503
- const a = i.target.scrollLeft;
504
- t.value.scrollLeft !== a && (t.value.scrollLeft = a);
505
- }
506
- }, m = (i) => {
507
- i.key !== "Tab" && i.key !== "ArrowRight" && i.key !== "ArrowLeft" || (i.preventDefault(), s.value.scrollLeft = 0, s.value.style.overflowX = "hidden", setTimeout(() => {
508
- s.value.style.overflowX = "auto";
509
- }));
510
- }, v = (i) => {
511
- const a = i.target.scrollLeft;
512
- s.value.scrollLeft !== a && (s.value.scrollLeft = a);
513
- }, c = S(() => {
514
- var i, a, f;
515
- return {
516
- "b-data-grid__horizontal-scrollbar--sticky-pagination": ((i = o == null ? void 0 : o.pagination) == null ? void 0 : i.value) && ((a = o == null ? void 0 : o.stickyPagination) == null ? void 0 : a.value) && !((f = o == null ? void 0 : o.isLazyLoad) != null && f.value)
517
- };
518
- });
519
- return {
520
- // Values
521
- scrollLeftPosition: l,
522
- hasLeftOverflow: r,
523
- hasRightOverflow: _,
524
- horizontalScrollbarConditionalClasses: c,
525
- // Methods
526
- updateScrollPosition: u,
527
- updateScrollPositionOnFrozenColumnsNavigation: m,
528
- syncVirtualScrollerWithBody: v
529
- };
530
- }, Jn = (s, e, n, t) => {
531
- const o = E(null), l = S(() => {
532
- var L, C, b, y;
533
- if (!o.value || o.value.field === V)
534
- return {
535
- hoveredOverColumnField: "",
536
- isSeparatorOffset: !1,
537
- noBorderLeft: !1,
538
- noBorderRight: !1
539
- };
540
- const r = (C = (L = s.value.find((A) => A.isFrozenColumns)) == null ? void 0 : L.columnSet) == null ? void 0 : C.filter((A) => A.field !== V), _ = s.value.find((A) => !(A != null && A.isFrozenColumns)), u = o.value.frozen && (r == null ? void 0 : r[0].field) === o.value.field, m = !o.value.frozen && ((b = _ == null ? void 0 : _.columnSet) == null ? void 0 : b[0].field) === o.value.field, v = (e.value || n.value) && u, c = (e.value || n.value) && !r && m, i = r && m, a = (r == null ? void 0 : r.length) > 0 && o.value.frozen && (r == null ? void 0 : r[r.length - 1].field) === o.value.field, f = n.value && t.value && !o.value.frozen && ((y = _ == null ? void 0 : _.columnSet) == null ? void 0 : y[_.columnSet.length - 1].field) === o.value.field;
541
- return {
542
- hoveredOverColumnField: o.value.field,
543
- isSeparatorOffset: f,
544
- noBorderLeft: !!v || !!c || !!i,
545
- noBorderRight: !!a || !!f
546
- };
547
- });
548
- return {
549
- hoveredOverColumn: o,
550
- hoveredOverColumnState: l
551
- };
552
- };
553
- let We = 0;
554
- const Kn = {
555
- beforeCreate() {
556
- this.uuid = We.toString(), We += 1;
557
- }
558
- };
559
- var Qn = function() {
560
- var e = this, n = e._self._c;
561
- return n("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? n("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), n("g", { attrs: { fill: "#00112C", "clip-path": "url(#uia-icons-16-arrow_up_down_sort__a" + e.uuid + ")" } }, [n("path", { attrs: { 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" } }), n("path", { attrs: { 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" } })]), n("defs", [n("clipPath", { attrs: { id: "uia-icons-16-arrow_up_down_sort__a" + e.uuid } }, [n("rect", { attrs: { width: "16", height: "16", fill: "#fff" } })])])]);
562
- }, es = [], ts = /* @__PURE__ */ W(
563
- Kn,
564
- Qn,
565
- es,
566
- !1,
567
- null,
568
- null
569
- );
570
- const ns = ts.exports;
571
- let Ge = 0;
572
- const ss = {
573
- beforeCreate() {
574
- this.uuid = Ge.toString(), Ge += 1;
575
- }
576
- };
577
- var os = function() {
578
- var e = this, n = e._self._c;
579
- return n("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? n("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), n("path", { attrs: { fill: "#00112C", 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" } })]);
580
- }, ls = [], as = /* @__PURE__ */ W(
581
- ss,
582
- os,
583
- ls,
584
- !1,
585
- null,
586
- null
587
- );
588
- const is = as.exports;
589
- let He = 0;
590
- const rs = {
591
- beforeCreate() {
592
- this.uuid = He.toString(), He += 1;
593
- }
594
- };
595
- var ds = function() {
596
- var e = this, n = e._self._c;
597
- return n("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? n("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), n("g", { attrs: { "clip-path": "url(#uia-icons-16-freeze__a" + e.uuid + ")" } }, [n("path", { attrs: { fill: "#00112C", 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" } })]), n("defs", [n("clipPath", { attrs: { id: "uia-icons-16-freeze__a" + e.uuid } }, [n("rect", { attrs: { width: "16", height: "16", fill: "#fff", transform: "matrix(1 0 0 -1 0 16)" } })])])]);
598
- }, cs = [], us = /* @__PURE__ */ W(
599
- rs,
600
- ds,
601
- cs,
602
- !1,
603
- null,
604
- null
605
- );
606
- const dt = us.exports;
607
- let Ve = 0;
608
- const fs = {
609
- beforeCreate() {
610
- this.uuid = Ve.toString(), Ve += 1;
611
- }
612
- };
613
- var gs = function() {
614
- var e = this, n = e._self._c;
615
- return n("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? n("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), n("g", { attrs: { fill: "#00112C", "clip-path": "url(#uia-icons-16-sort_ascending__a" + e.uuid + ")" } }, [n("path", { attrs: { 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" } }), n("path", { attrs: { d: "M6.75 7.25H1.25V8.75H6.75V7.25Z" } }), n("path", { attrs: { d: "M1.25 11.25H8.75V12.75H1.25V11.25Z" } }), n("path", { attrs: { d: "M6.75 3.25H1.25V4.75H6.75V3.25Z" } })]), n("defs", [n("clipPath", { attrs: { id: "uia-icons-16-sort_ascending__a" + e.uuid } }, [n("rect", { attrs: { width: "16", height: "16", fill: "#fff" } })])])]);
616
- }, _s = [], vs = /* @__PURE__ */ W(
617
- fs,
618
- gs,
619
- _s,
620
- !1,
621
- null,
622
- null
623
- );
624
- const Cs = vs.exports;
625
- let Ze = 0;
626
- const ms = {
627
- beforeCreate() {
628
- this.uuid = Ze.toString(), Ze += 1;
629
- }
630
- };
631
- var hs = function() {
632
- var e = this, n = e._self._c;
633
- return n("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? n("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), n("g", { attrs: { fill: "#00112C", "clip-path": "url(#uia-icons-16-sort_descending__a" + e.uuid + ")" } }, [n("path", { attrs: { 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" } }), n("path", { attrs: { d: "M6.75 7.25H1.25V8.75H6.75V7.25Z" } }), n("path", { attrs: { d: "M1.25 3.25H9.09V4.75H1.25V3.25Z" } }), n("path", { attrs: { d: "M6.75 11.25H1.25V12.75H6.75V11.25Z" } })]), n("defs", [n("clipPath", { attrs: { id: "uia-icons-16-sort_descending__a" + e.uuid } }, [n("rect", { attrs: { width: "16", height: "16", fill: "#fff" } })])])]);
634
- }, ps = [], Ss = /* @__PURE__ */ W(
635
- ms,
636
- hs,
637
- ps,
638
- !1,
639
- null,
640
- null
641
- );
642
- const Ls = Ss.exports;
643
- let je = 0;
644
- const Es = {
645
- beforeCreate() {
646
- this.uuid = je.toString(), je += 1;
647
- }
648
- };
649
- var bs = function() {
650
- var e = this, n = e._self._c;
651
- return n("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? n("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), n("path", { attrs: { fill: "#00112C", d: "M8 11.25L12.5 5.25H3.5L8 11.25Z" } })]);
652
- }, ys = [], Os = /* @__PURE__ */ W(
653
- Es,
654
- bs,
655
- ys,
656
- !1,
657
- null,
658
- null
659
- );
660
- const Rs = Os.exports, ws = {
661
- "en-US": {
662
- sortColumn: "Sort {name} column",
663
- sortColumnInAscendingOrder: "Sort {name} column in ascending order",
664
- sortColumnInDescendingOrder: "Sort {name} column in descending order",
665
- freezeColumn: "Freeze column",
666
- hideColumn: "Hide column",
667
- moveColumnLeft: "Move column left",
668
- moveColumnRight: "Move column right",
669
- selectAll: "Select all",
670
- selectPage: "Select this page",
671
- selectionMenu: "Selection menu",
672
- showColumn: "Show column",
673
- unfreezeColumn: "Unfreeze column",
674
- columnActions: "{name} column actions"
675
- },
676
- "pt-BR": {
677
- freezeColumn: "Congelar coluna",
678
- hideColumn: "Ocultar coluna",
679
- moveColumnLeft: "Mover coluna para a esquerda",
680
- moveColumnRight: "Mover coluna para a direita",
681
- selectAll: "Selecionar tudo",
682
- unfreezeColumn: "Descongelar coluna"
683
- },
684
- "ja-JP": {
685
- freezeColumn: "列を固定",
686
- hideColumn: "列を非表示",
687
- moveColumnLeft: "列を左へ移動",
688
- moveColumnRight: "列を右へ移動",
689
- selectAll: "すべて選択",
690
- unfreezeColumn: "列の固定を解除"
691
- }
692
- }, As = {
693
- i18n: { messages: ws },
694
- name: "data-grid-columns"
695
- }, Is = /* @__PURE__ */ J({
696
- ...As,
697
- props: {
698
- /**
699
- * Column definitions using 'key' to relate to data object.
700
- */
701
- columns: {
702
- type: Array,
703
- required: !0
704
- },
705
- /**
706
- * Columns being dragged, contains dragging column and a target column
707
- */
708
- draggingColumns: {
709
- type: Object,
710
- default: void 0
711
- },
712
- /**
713
- * Toggle the columns draggable events.
714
- */
715
- hasDraggableColumns: {
716
- type: Boolean,
717
- default: !0
718
- },
719
- /**
720
- * If resize is enabled
721
- */
722
- hasResizableColumns: {
723
- type: Boolean,
724
- default: !0
725
- },
726
- /**
727
- * Signifies if the column panel is enabled.
728
- */
729
- hasColumnPanel: {
730
- type: Boolean,
731
- default: !1
732
- },
733
- /**
734
- * If set to true, aligns the first column panel to the right of its button.
735
- */
736
- hasFirstColumnPanelRightAligned: {
737
- type: Boolean,
738
- default: !1
739
- },
740
- /**
741
- * If the data grid has overflow on the left side
742
- */
743
- hasLeftOverflow: {
744
- type: Boolean,
745
- default: !1
746
- },
747
- /**
748
- * The column hovered over state and whether the hovered over column should show a border right or left.
749
- */
750
- hoveredOverColumnState: {
751
- type: Object,
752
- required: !0
753
- },
754
- /**
755
- * Toggled to true when the DataGrid has auto width columns and is measuring the
756
- */
757
- isMeasuringColumnWidths: {
758
- type: Boolean,
759
- default: !1
760
- },
761
- /**
762
- * Used to disable hiding the last visible column.
763
- */
764
- isOnlyOneVisibleColumn: {
765
- type: Boolean,
766
- default: !1
767
- },
768
- /**
769
- * If these columns are frozen (pinned) columns
770
- */
771
- isFrozenColumns: {
772
- type: Boolean,
773
- default: !1
774
- },
775
- /**
776
- * Show frozen columns separator
777
- */
778
- showFrozenColumnsSeparator: {
779
- type: Boolean,
780
- default: !1
781
- },
782
- /**
783
- * The column all items selected state
784
- */
785
- allItemsSelectedState: {
786
- type: Object,
787
- default: void 0
788
- },
789
- /**
790
- * Determines if the user has enabled row selection
791
- */
792
- selectable: {
793
- type: Boolean,
794
- default: !1
795
- },
796
- /**
797
- * Adds an extra option when selecting all, to select items in other pages too
798
- */
799
- selectableAcrossPages: {
800
- type: Boolean,
801
- default: !1
802
- },
803
- /**
804
- * Sortby handles proper rendering of sort icon in header. Sorting currently is only supported server side.
805
- * It does make sure the currently sorted column has a more visible sort icon, and the sort icon points in the right direction.
806
- */
807
- sortBy: {
808
- type: Array,
809
- // NOTE: is an array to allow multi-sorting in the future
810
- default: () => []
811
- },
812
- /**
813
- * Truncates all data grid column headers
814
- */
815
- truncateColumnHeaders: {
816
- type: Boolean,
817
- default: !1
818
- }
819
- },
820
- emits: ["sort", "column-hover"],
821
- setup(s, { expose: e, emit: n }) {
822
- const t = s, o = 100, { t: l } = oe(), { columns: r, sortBy: _ } = be(t), u = E({}), m = E({}), v = E(), c = E(), i = (d) => n(U.SELECT_ALL_ROWS, d), a = (d) => d.field === V, f = S(() => [
823
- {
824
- text: l("selectPage"),
825
- handler: () => i(!0)
826
- },
827
- {
828
- text: l("selectAll"),
829
- handler: () => n(U.SELECT_ALL_ACROSS_PAGES)
830
- }
831
- ]), { startResize: L, isResizing: C, columnHoverEventToEmitAfterResizing: b } = Nn(r, n), { isSorting: y, getSortingDirection: A, sortByColumnField: z } = Hn(_, r, n), T = (d) => {
832
- var K;
833
- if (!d.sortable)
834
- return null;
835
- const P = (K = t.sortBy.find(({ field: le }) => le === d.field)) == null ? void 0 : K.direction;
836
- return P ? {
837
- [se.ASCENDING]: Ce.ASCENDING,
838
- [se.DESCENDING]: Ce.DESCENDING
839
- }[P] : Ce.NONE;
840
- }, p = S(() => (d) => t.hasDraggableColumns ? {
841
- dragstart: (P) => {
842
- n(U.COLUMN_DRAG_START, d, P);
843
- },
844
- dragover: (P) => {
845
- P.preventDefault();
846
- },
847
- dragenter: (P) => {
848
- P.preventDefault(), n(U.COLUMN_DRAG_ENTER, d, P);
849
- },
850
- drop: () => {
851
- n(U.COLUMN_DROP, d);
852
- },
853
- dragend: () => {
854
- n(U.COLUMN_DRAG_END);
855
- }
856
- } : {}), h = S(() => (d) => [
857
- {
858
- text: l("moveColumnLeft"),
859
- handler: () => n(U.COLUMN_MOVE, d, -1),
860
- icon: Ln,
861
- disabled: t.columns[0].field === d.field
862
- },
863
- {
864
- text: l("moveColumnRight"),
865
- handler: () => n(U.COLUMN_MOVE, d, 1),
866
- icon: is,
867
- disabled: t.columns[t.columns.length - 1].field === d.field
868
- },
869
- {
870
- text: d != null && d.frozen ? l("unfreezeColumn") : l("freezeColumn"),
871
- handler: () => n(U.COLUMN_UPDATE, { ...d, frozen: !(d != null && d.frozen) }),
872
- icon: dt
873
- },
874
- {
875
- text: (d == null ? void 0 : d.visible) !== !1 ? l("hideColumn") : l("showColumn"),
876
- handler: () => {
877
- n(U.COLUMN_UPDATE, {
878
- ...d,
879
- visible: (d == null ? void 0 : d.visible) === !1
880
- });
881
- },
882
- icon: (d == null ? void 0 : d.visible) !== !1 ? En : bn,
883
- disabled: (d == null ? void 0 : d.mandatory) || (d == null ? void 0 : d.visible) !== !1 && t.isOnlyOneVisibleColumn
884
- }
885
- ]), w = (d) => {
886
- v.value = d.field, c.value && clearTimeout(c.value);
887
- }, x = () => {
888
- const d = setTimeout(() => {
889
- v.value = "";
890
- }, o);
891
- c.value = d;
892
- }, g = (d) => {
893
- let P = {
894
- mouseenter: () => {
895
- w(d), C.value ? b.value = d : n("column-hover", d);
896
- },
897
- mouseleave: () => {
898
- x(), C.value ? b.value = null : n("column-hover", null);
899
- },
900
- focus: () => w(d)
901
- };
902
- return a(d) || (P = {
903
- ...P,
904
- ...p.value(d)
905
- }), P;
906
- }, F = (d) => d.infoIconTooltip || d.sortable || t.hasColumnPanel, I = (d, P) => {
907
- var X;
908
- ((X = u.value) == null ? void 0 : X[P]) === void 0 && (u.value = { ...u.value, [P]: null }), d !== null && (u.value[P] = d);
909
- }, N = S(() => {
910
- var P;
911
- const d = {
912
- "b-data-grid-columns--is-measuring": t.isMeasuringColumnWidths
913
- };
914
- return (P = r.value[0]) != null && P.frozen ? {
915
- ...d,
916
- "b-data-grid-columns--frozen": !0,
917
- "b-data-grid-columns--frozen-separator": t.showFrozenColumnsSeparator,
918
- "b-data-grid-columns--overflow-shadow-left": t.hasLeftOverflow
919
- } : {
920
- ...d,
921
- "b-data-grid-columns--unfrozen": !0
922
- };
923
- }), $ = (d, P) => d && P === 0 ? ze.BOTTOM_START : ze.BOTTOM_END, M = (d, P) => {
924
- var X, K, le, k, ae, fe, de, ge, ce, ie;
925
- return {
926
- "b-data-grid-columns__column--column-hovered": d.field === t.hoveredOverColumnState.hoveredOverColumnField,
927
- "b-data-grid-columns__column--column-hovered-no-border-left": d.field === t.hoveredOverColumnState.hoveredOverColumnField && t.hoveredOverColumnState.noBorderLeft,
928
- "b-data-grid-columns__column--column-hovered-no-border-right": d.field === t.hoveredOverColumnState.hoveredOverColumnField && t.hoveredOverColumnState.noBorderRight,
929
- "b-data-grid-columns__column--last-frozen-frozen-column": t.isFrozenColumns && P === r.value.length - 1,
930
- "b-data-grid-columns__column--sortable": d.sortable,
931
- "b-data-grid-columns__column--padding-left-unset": ((X = d == null ? void 0 : d.padding) == null ? void 0 : X.left) === !1,
932
- "b-data-grid-columns__column--padding-right-unset": ((K = d == null ? void 0 : d.padding) == null ? void 0 : K.right) === !1,
933
- "b-data-grid-columns__column--numeric": d == null ? void 0 : d.numeric,
934
- "b-data-grid-columns__column--frozen": d == null ? void 0 : d.frozen,
935
- "b-data-grid-columns__column--is-re-ordering": (d == null ? void 0 : d.field) === ((k = (le = t.draggingColumns) == null ? void 0 : le.dragging) == null ? void 0 : k.field),
936
- "b-data-grid-columns__column--is-re-ordering-target-left": (d == null ? void 0 : d.field) === ((fe = (ae = t.draggingColumns) == null ? void 0 : ae.target) == null ? void 0 : fe.field) && ((de = t.draggingColumns) == null ? void 0 : de.dragToLeft),
937
- "b-data-grid-columns__column--is-re-ordering-target-right": (d == null ? void 0 : d.field) === ((ce = (ge = t.draggingColumns) == null ? void 0 : ge.target) == null ? void 0 : ce.field) && !((ie = t.draggingColumns) != null && ie.dragToLeft),
938
- "b-data-grid-columns__column--with-sorting-or-column-panel": d.sortable || d.infoIconTooltip || t.hasColumnPanel && v.value === d.field || t.selectableAcrossPages
939
- };
940
- }, D = (d) => ({
941
- "b-data-grid-columns__column-header-and-actions--numeric": d == null ? void 0 : d.numeric
942
- }), j = (d) => ({
943
- "b-data-grid-columns__column-actions--numeric": d == null ? void 0 : d.numeric
944
- }), re = (d) => ({
945
- "b-data-grid-columns__column-separator-container--is-resizeable": t.hasResizableColumns,
946
- "b-data-grid-columns__column-separator-container--is-offset": t.hoveredOverColumnState.hoveredOverColumnField === d.field && t.hoveredOverColumnState.isSeparatorOffset
947
- }), he = S(() => ({
948
- "b-data-grid-columns__column-header--truncated": t.truncateColumnHeaders
949
- }));
950
- return e({
951
- columnHeaderRefs: u
952
- }), { __sfc: !0, props: t, emit: n, CLOSING_CONTEXTUAL_MENU_DELAY_MS: o, t: l, columns: r, sortBy: _, columnHeaderRefs: u, contextMenuRef: m, hoveredColumnField: v, closingTimeOutId: c, onAllRowSelect: i, isActionsColumn: a, selectAllMenu: f, startResize: L, isResizing: C, columnHoverEventToEmitAfterResizing: b, isSorting: y, getSortingDirection: A, sortByColumnField: z, getSortingColumnDirection: T, draggingEventsForColumn: p, contextualMenuData: h, showContextualMenu: w, hideContextualMenu: x, dataGridColumnEvents: g, hasColumnActions: F, registerColumnsRefs: I, conditionalColumnsClasses: N, computeMenuPosition: $, conditionalColumnClasses: M, conditionalColumnHeaderAndActionsClasses: D, conditionalColumnActionsClasses: j, conditionalColumnSeparatorClasses: re, conditionalColumnHeaderClasses: he, BentoCheckbox: lt, BentoDatagridSortDirection: se, BentoTypography: me, BentoInfoIcon: hn, DatagridColumnsEvent: U, BentoMenu: at, BentoToggleButton: we, ArrowUpAndDownSortIcon: ns, SortAscendingIcon: Cs, SortDescendingIcon: Ls, TriangleDown: Rs };
953
- }
954
- });
955
- var Ts = function() {
956
- var e = this, n = e._self._c, t = e._self._setupProxy;
957
- return n("div", { staticClass: "b-data-grid-columns", class: t.conditionalColumnsClasses, attrs: { "data-testid": "data-grid-columns" } }, e._l(t.columns, function(o, l) {
958
- return n("div", e._g({ key: o.field, ref: (r) => t.registerColumnsRefs(r, o.field), refInFor: !0, staticClass: "b-data-grid-columns__column", class: t.conditionalColumnClasses(o, l), style: { width: o.autoWidth && e.isMeasuringColumnWidths ? "auto" : `${o.width}px` }, attrs: { "aria-colindex": l + 1, "aria-label": o.label, "aria-sort": t.getSortingColumnDirection(o), "data-testid": `${o.field}-column-header`, draggable: e.hasDraggableColumns && !t.isResizing && !t.isActionsColumn(o), role: "columnheader", tabindex: o.sortable || e.hasColumnPanel || o.infoIconTooltip ? "0" : "-1" } }, t.dataGridColumnEvents(o)), [t.isActionsColumn(o) && e.selectable ? n("div", { staticClass: "b-data-grid-columns__select-column" }, [n(t.BentoCheckbox, { attrs: { "model-value": e.allItemsSelectedState.allItemsSelected, "data-testid": "checkbox-select-all", indeterminate: e.allItemsSelectedState.isIndeterminate, value: "data-grid-select-all" }, on: { "update:model-value": t.onAllRowSelect } }), e.selectableAcrossPages ? [n(t.BentoMenu, { staticClass: "b-data-grid-columns__select-column-menu", attrs: { data: t.selectAllMenu, "menu-position": "bottom-start", "menu-fixed-positioning": "", button: { variant: "tertiary", condensed: !0 } }, scopedSlots: e._u([{ key: "iconLeft", fn: function() {
959
- return [n(t.TriangleDown, { attrs: { "svg-title": t.t("selectionMenu") } })];
960
- }, proxy: !0 }], null, !0) })] : e._e()], 2) : [n("div", { staticClass: "b-data-grid-columns__column-header-and-actions", class: t.conditionalColumnHeaderAndActionsClasses(o), attrs: { "aria-label": t.t("columnActions", { name: o.label }), "aria-live": "polite", role: "region" } }, [n(t.BentoTypography, { staticClass: "b-data-grid-columns__column-header", class: t.conditionalColumnHeaderClasses, attrs: { el: "div", strongest: "" } }, [e._t(`head-${o.field}`, function() {
961
- return [n("span", { staticClass: "b-data-grid-columns__label" }, [e._v(e._s(o.label))])];
962
- }, { column: o })], 2), t.hasColumnActions(o) ? n("div", { staticClass: "b-data-grid-columns__column-actions", class: t.conditionalColumnActionsClasses(o) }, [o.infoIconTooltip ? n("div", { staticClass: "b-data-grid-columns__column-info-icon" }, [n(t.BentoInfoIcon, { attrs: { "tooltip-text": o.infoIconTooltip } })], 1) : e._e(), o.sortable ? n("div", { staticClass: "b-data-grid-columns__column-sort" }, [n(t.BentoToggleButton, { attrs: { condensed: "", toggled: t.isSorting(o.field), variant: "tertiary" }, on: { click: function(r) {
963
- return t.sortByColumnField(o.field);
964
- } }, scopedSlots: e._u([{ key: "iconLeft", fn: function() {
965
- return [t.getSortingDirection(o.field) ? t.getSortingDirection(o.field) === t.BentoDatagridSortDirection.ASCENDING ? n(t.SortAscendingIcon, { attrs: { "svg-title": t.t("sortColumnInDescendingOrder", { name: o.label }) } }) : t.getSortingDirection(o.field) === t.BentoDatagridSortDirection.DESCENDING ? n(t.SortDescendingIcon, { attrs: { "svg-title": t.t("sortColumnInAscendingOrder", { name: o.label }) } }) : e._e() : n(t.ArrowUpAndDownSortIcon, { attrs: { "svg-title": t.t("sortColumn", { name: o.label }) } })];
966
- }, proxy: !0 }], null, !0) })], 1) : e._e(), e.hasColumnPanel && t.hoveredColumnField === o.field ? n(t.BentoMenu, { ref: (r) => t.contextMenuRef[o.field] = r, refInFor: !0, staticClass: "b-data-grid-columns__menu", attrs: { data: t.contextualMenuData(o), "menu-position": t.computeMenuPosition(e.hasFirstColumnPanelRightAligned, l), "menu-fixed-positioning": !0, button: { variant: "tertiary", condensed: !0 } }, on: { open: function(r) {
967
- return e.$emit(t.DatagridColumnsEvent.COLUMN_MENU_OPEN);
968
- }, close: function(r) {
969
- return e.$emit(t.DatagridColumnsEvent.COLUMN_MENU_CLOSE);
970
- } } }) : e._e()], 1) : e._e()], 1), n("div", { staticClass: "b-data-grid-columns__column-separator-container", class: t.conditionalColumnSeparatorClasses(o), attrs: { "data-testid": `data-grid-column-${o.field}`, role: "presentation" }, on: { mousedown: function(r) {
971
- return t.startResize(e.hasResizableColumns, o.field, r);
972
- }, click: function(r) {
973
- r.stopPropagation();
974
- } } }, [!e.isFrozenColumns || e.isFrozenColumns && l !== t.columns.length - 1 ? n("div", { staticClass: "b-data-grid-columns__column-separator" }) : e._e()])]], 2);
975
- }), 0);
976
- }, Ns = [], Ds = /* @__PURE__ */ W(
977
- Is,
978
- Ts,
979
- Ns,
980
- !1,
981
- null,
982
- "43622155"
983
- );
984
- const xs = Ds.exports;
985
- var te = /* @__PURE__ */ ((s) => (s.CONFIG_SETTINGS = "config-settings", s.UPDATE_COLUMNS = "update:columns", s))(te || {});
986
- let qe = 0;
987
- const Fs = {
988
- beforeCreate() {
989
- this.uuid = qe.toString(), qe += 1;
990
- }
991
- };
992
- var Ms = function() {
993
- var e = this, n = e._self._c;
994
- return n("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? n("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), n("g", { attrs: { fill: "#00112C", "clip-path": "url(#uia-icons-16-settings__a" + e.uuid + ")" } }, [n("path", { attrs: { 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" } }), n("path", { attrs: { 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" } })]), n("defs", [n("clipPath", { attrs: { id: "uia-icons-16-settings__a" + e.uuid } }, [n("rect", { attrs: { width: "16", height: "16", fill: "#fff" } })])])]);
995
- }, Ps = [], zs = /* @__PURE__ */ W(
996
- Fs,
997
- Ms,
998
- Ps,
999
- !1,
1000
- null,
1001
- null
1002
- );
1003
- const Bs = zs.exports, $s = {
1004
- "en-US": {
1005
- toggleColumnVisibility: "Toggle {label} column visibility",
1006
- toggleColumnFreeze: "Toggle {label} column freeze"
1007
- }
1008
- }, Us = J({
1009
- i18n: { messages: $s },
1010
- name: "bento-data-grid",
1011
- components: {
1012
- BentoFreezeIcon: dt,
1013
- BentoToggle: st
1014
- },
1015
- props: {
1016
- /**
1017
- * Is column visibitlity toggle disabled
1018
- */
1019
- isColumnVisibilityToggleDisabled: {
1020
- type: Boolean,
1021
- required: !0
1022
- },
1023
- /**
1024
- * Column definition
1025
- */
1026
- column: {
1027
- type: Object,
1028
- required: !0
1029
- }
1030
- },
1031
- emits: ["visible-column", "updated-column"],
1032
- setup(s, { emit: e }) {
1033
- const { t: n } = oe(), t = E(!1), o = S(() => {
1034
- var c;
1035
- return (c = s.column) == null ? void 0 : c.frozen;
1036
- }), l = S(() => {
1037
- var c;
1038
- return ((c = s.column) == null ? void 0 : c.visible) !== !1;
1039
- }), r = () => {
1040
- e("visible-column", { ...s.column, visible: !l.value });
1041
- }, _ = () => {
1042
- e("updated-column", { ...s.column, frozen: !o.value });
1043
- }, u = () => {
1044
- o.value || (t.value = !0);
1045
- }, m = () => {
1046
- o.value || (t.value = !1);
1047
- }, v = S(() => ({
1048
- "b-data-grid-config-settings-column-row__freeze-icon--frozen": o.value
1049
- }));
1050
- return {
1051
- // Values
1052
- isFreezeIconOptionShown: t,
1053
- isColumnFrozen: o,
1054
- freezeIconConditionalClasses: v,
1055
- isColumnVisible: l,
1056
- // Methods
1057
- toggleColumnVisibility: r,
1058
- showFreezeIcon: u,
1059
- hideFreezeIcon: m,
1060
- toggleColumnFreeze: _,
1061
- // Translations
1062
- t: n
1063
- };
1064
- }
1065
- });
1066
- var ks = function() {
1067
- var e = this, n = e._self._c;
1068
- return e._self._setupProxy, n("div", { staticClass: "b-data-grid-config-settings-column-row", on: { mouseover: e.showFreezeIcon, mouseleave: e.hideFreezeIcon } }, [n("bento-toggle", { attrs: { "aria-label": e.t("toggleColumnVisibility", { label: e.column.label }), disabled: e.isColumnVisibilityToggleDisabled, "label-position": "after", value: e.isColumnVisible }, on: { input: e.toggleColumnVisibility } }, [e._v(" " + e._s(e.column.label) + " ")]), n("bento-freeze-icon", { directives: [{ name: "show", rawName: "v-show", value: e.isColumnFrozen || e.isFreezeIconOptionShown, expression: "isColumnFrozen || isFreezeIconOptionShown" }], staticClass: "b-data-grid-config-settings-column-row__freeze-icon", class: e.freezeIconConditionalClasses, attrs: { "aria-label": e.t("toggleColumnFreeze", { label: e.column.label }) }, nativeOn: { click: function(t) {
1069
- return e.toggleColumnFreeze.apply(null, arguments);
1070
- } } })], 1);
1071
- }, Ws = [], Gs = /* @__PURE__ */ W(
1072
- Us,
1073
- ks,
1074
- Ws,
1075
- !1,
1076
- null,
1077
- "eae7733f"
1078
- );
1079
- const Hs = Gs.exports, Vs = {
1080
- "en-US": {
1081
- closeConfigSettingsPanel: "Close configuration settings panel",
1082
- closeSearch: "Close search",
1083
- columns: "Columns",
1084
- columnVisibilitySearchFilter: "Column visibility search filter",
1085
- condensed: "Condensed",
1086
- condensedToggle: "Condensed toggle",
1087
- configSettingsPanel: "Configuration settings Panel",
1088
- displayOptions: "Display options",
1089
- noColumnsMatch: "No columns match this search",
1090
- search: "Search",
1091
- showAllColumns: "Show all columns ({numberOfColumns})",
1092
- size: "Size",
1093
- toggleConfigSettingsPanelVisibility: "Toggle Configuration settings panel visibility"
1094
- },
1095
- "pt-BR": {
1096
- condensed: "Condensado",
1097
- search: "Buscar",
1098
- size: "Tamanho"
1099
- },
1100
- "ja-JP": {
1101
- condensed: "凝縮",
1102
- search: "検索",
1103
- size: "サイズ"
1104
- }
1105
- }, Zs = J({
1106
- i18n: { messages: Vs },
1107
- name: "bento-data-grid",
1108
- components: {
1109
- BentoButton: nt,
1110
- BentoCrossIcon: Qe,
1111
- BentoPopover: gn,
1112
- BentoSettingsIcon: Bs,
1113
- BentoToggleButton: we,
1114
- BentoDataGridConfigSettingsConfigRow: Hs,
1115
- BentoSearchBar: _n,
1116
- BentoSearchIcon: Cn,
1117
- BentoToggle: st,
1118
- BentoTypography: me
1119
- },
1120
- directives: { BentoClickOutsideDirective: mn },
1121
- props: {
1122
- /**
1123
- * Column definitions
1124
- */
1125
- columns: {
1126
- type: Array,
1127
- required: !0
1128
- },
1129
- /**
1130
- * Sets the row cells to the condensed padding state.
1131
- */
1132
- condensed: {
1133
- type: Boolean,
1134
- default: !1
1135
- }
1136
- },
1137
- emits: [te.CONFIG_SETTINGS, te.UPDATE_COLUMNS],
1138
- setup(s, { emit: e }) {
1139
- const { t: n } = oe(), t = E(null), o = ot("data-grid-config-settings-popover"), l = E(null), r = E(!1), _ = E(!0), u = E(null), m = E(""), v = Ke(s, "columns"), c = E(!1), i = vn(m, v), a = () => {
1140
- m.value = "";
1141
- }, f = S(
1142
- () => !s.columns.some((h) => h.visible === !1 && !h.mandatory)
1143
- ), L = () => {
1144
- a(), c.value = !c.value, c.value ? Y(() => {
1145
- var h;
1146
- return (h = l.value.$refs.bentoInputField) == null ? void 0 : h.focusInput();
1147
- }) : Y(() => {
1148
- var h, w;
1149
- return (w = (h = u == null ? void 0 : u.value) == null ? void 0 : h.$el) == null ? void 0 : w.focus();
1150
- }), _.value = f.value;
1151
- }, C = (h) => h.mandatory ?? !1, b = (h) => {
1152
- const w = s.columns.map((x) => ({
1153
- ...x,
1154
- visible: h.field === x.field ? h.visible : x.visible
1155
- }));
1156
- e(te.UPDATE_COLUMNS, w);
1157
- }, y = (h) => {
1158
- h ? e(
1159
- te.UPDATE_COLUMNS,
1160
- s.columns.map((w) => ({ ...w, visible: !0 }))
1161
- ) : e(
1162
- te.UPDATE_COLUMNS,
1163
- s.columns.map((w) => ({ ...w, visible: (w == null ? void 0 : w.mandatory) === !0 }))
1164
- );
1165
- }, A = (h) => {
1166
- const w = s.columns.map((x) => ({
1167
- ...x,
1168
- frozen: h.field === x.field ? !!(h != null && h.frozen) : !!(x != null && x.frozen)
1169
- }));
1170
- e(te.UPDATE_COLUMNS, w);
1171
- }, z = (h) => {
1172
- r.value = h, _.value = f.value;
1173
- };
1174
- return {
1175
- // Values
1176
- configSettingsButtonRef: t,
1177
- popoverId: o,
1178
- isConfigSettingsPanelOpen: r,
1179
- allColumnsVisbilityToggleState: _,
1180
- filteredColumnVisibilityColumns: i,
1181
- searchTerm: m,
1182
- isColumnVisibilityFilterShown: c,
1183
- searchBarRef: l,
1184
- searchButtonRef: u,
1185
- DATAGRID_ACTIONS_COLUMN_FIELD_NAME: V,
1186
- // Methods
1187
- setConfigSettingsPanelVisibility: z,
1188
- emitCondensedToggle: (h) => e(te.CONFIG_SETTINGS, h),
1189
- toggleAllColumnVisibility: y,
1190
- clearAction: a,
1191
- toggleColumnFilter: L,
1192
- emitVisibleColumns: b,
1193
- emitFrozenColumns: A,
1194
- onClickOutside: () => z(!1),
1195
- isColumnVisibilityToggleDisabled: C,
1196
- // Translations
1197
- t: n
1198
- };
1199
- }
1200
- });
1201
- var js = function() {
1202
- var e = this, n = e._self._c;
1203
- return e._self._setupProxy, n("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: e.onClickOutside, expression: "onClickOutside" }], staticClass: "b-data-grid-config-settings" }, [n("div", { staticClass: "b-data-grid-config-settings__button-and-separator" }, [n("div", { ref: "configSettingsButtonRef", staticClass: "b-data-grid-config-settings__button-container" }, [n("bento-toggle-button", { attrs: { "aria-controls": e.isConfigSettingsPanelOpen ? e.popoverId : null, variant: "tertiary", condensed: "", toggled: e.isConfigSettingsPanelOpen }, on: { click: function(t) {
1204
- return e.setConfigSettingsPanelVisibility(!e.isConfigSettingsPanelOpen);
1205
- } }, scopedSlots: e._u([{ key: "iconLeft", fn: function() {
1206
- return [n("bento-settings-icon", { attrs: { "svg-title": e.t("toggleConfigSettingsPanelVisibility") } })];
1207
- }, proxy: !0 }]) })], 1)]), e.configSettingsButtonRef ? n("bento-popover", { staticClass: "b-data-grid-config-settings__panel", attrs: { id: e.popoverId, open: e.isConfigSettingsPanelOpen, "aria-label": e.t("configSettingsPanel"), "target-element": e.configSettingsButtonRef, position: "bottom-end" } }, [n("div", { staticClass: "b-data-grid-config-settings__panel-header" }, [n("bento-typography", { attrs: { el: "span", strongest: "" } }, [e._v(" " + e._s(e.t("displayOptions")) + " ")]), n("bento-button", { attrs: { variant: "tertiary" }, on: { click: function(t) {
1208
- return e.setConfigSettingsPanelVisibility(!1);
1209
- } }, scopedSlots: e._u([{ key: "iconLeft", fn: function() {
1210
- return [n("bento-cross-icon", { attrs: { "svg-title": e.t("closeConfigSettingsPanel") } })];
1211
- }, proxy: !0 }], null, !1, 353359238) })], 1), n("div", { staticClass: "b-data-grid-config-settings__condensed-view-settings" }, [n("bento-typography", { staticClass: "b-data-grid-config-settings__condensed-view-title", attrs: { el: "span", stronger: "" } }, [e._v(" " + e._s(e.t("size")) + " ")]), n("bento-toggle", { attrs: { "label-position": "after", "aria-label": e.t("condensedToggle"), value: e.condensed }, on: { input: e.emitCondensedToggle } }, [e._v(" " + e._s(e.t("condensed")) + " ")])], 1), n("div", { staticClass: "b-data-grid-config-settings__column-visibility-settings" }, [n("div", { staticClass: "b-data-grid-config-settings__column-visibility-header" }, [n("bento-typography", { staticClass: "b-data-grid-config-settings__column-visibility-title", attrs: { el: "span", stronger: "" } }, [e._v(" " + e._s(e.t("columns")) + " ")]), e.isColumnVisibilityFilterShown ? n("bento-button", { attrs: { variant: "tertiary" }, on: { click: e.toggleColumnFilter }, scopedSlots: e._u([{ key: "iconLeft", fn: function() {
1212
- return [n("bento-cross-icon")];
1213
- }, proxy: !0 }], null, !1, 2651303519) }, [e._v(" " + e._s(e.t("closeSearch")) + " ")]) : n("bento-button", { ref: "searchButtonRef", attrs: { variant: "tertiary" }, on: { click: e.toggleColumnFilter }, scopedSlots: e._u([{ key: "iconLeft", fn: function() {
1214
- return [n("bento-search-icon")];
1215
- }, proxy: !0 }], null, !1, 2341044271) }, [e._v(e._s(e.t("search")))])], 1), e.isColumnVisibilityFilterShown ? n("div", { staticClass: "b-data-grid-config-settings__column-visibility-search" }, [n("bento-search-bar", { ref: "searchBarRef", attrs: { value: e.searchTerm, "input-field-aria-label": e.t("columnVisibilitySearchFilter").toString() }, on: { input: function(t) {
1216
- e.searchTerm = t;
1217
- }, clear: e.clearAction, "escape-pressed": e.toggleColumnFilter } })], 1) : n("div", { staticClass: "b-data-grid-config-settings__column-visibility-show-all" }, [n("bento-toggle", { attrs: { "label-position": "after", value: e.allColumnsVisbilityToggleState }, on: { input: e.toggleAllColumnVisibility } }, [e._v(" " + e._s(e.t("showAllColumns", { numberOfColumns: e.columns.length })) + " ")])], 1), n("div", { staticClass: "b-data-grid-config-settings__column-visibility-toggles" }, [e._l(e.filteredColumnVisibilityColumns, function(t) {
1218
- return n("div", { key: t.field }, [t.field !== e.DATAGRID_ACTIONS_COLUMN_FIELD_NAME ? n("bento-data-grid-config-settings-config-row", { attrs: { column: t, "is-column-visibility-toggle-disabled": e.isColumnVisibilityToggleDisabled(t) }, on: { "visible-column": e.emitVisibleColumns, "updated-column": e.emitFrozenColumns } }) : e._e()], 1);
1219
- }), e.filteredColumnVisibilityColumns.length === 0 ? n("bento-typography", { staticClass: "b-data-grid-config-settings__column-visibility-empty-search-message", attrs: { el: "span" } }, [e._v(" " + e._s(e.t("noColumnsMatch")) + " ")]) : e._e()], 2)])]) : e._e()], 1);
1220
- }, qs = [], Ys = /* @__PURE__ */ W(
1221
- Zs,
1222
- js,
1223
- qs,
1224
- !1,
1225
- null,
1226
- "e7f0a261"
1227
- );
1228
- const Xs = Ys.exports, ct = {
1229
- "en-US": {
1230
- gettingYourData: "Getting your data",
1231
- loading: "Loading",
1232
- selectRow: "Select row",
1233
- showMore: "Show more",
1234
- sortAscending: "{field} sort ascending",
1235
- sortDescending: "{field} sort descending",
1236
- sortInactive: "{field} sort inactive"
1237
- },
1238
- "pt-BR": {
1239
- loading: "Carregando",
1240
- showMore: "Mostrar mais"
1241
- },
1242
- "ja-JP": {
1243
- loading: "読み込み中",
1244
- showMore: "表示内容を増やす"
1245
- }
1246
- }, Js = {
1247
- i18n: { messages: ct }
1248
- }, Ks = /* @__PURE__ */ J({
1249
- ...Js,
1250
- __name: "data-grid-lazy-load",
1251
- props: {
1252
- loading: { type: Boolean },
1253
- isInfiniteScroll: { type: Boolean }
1254
- },
1255
- setup(s) {
1256
- const { t: e } = oe();
1257
- return { __sfc: !0, t: e, BentoLoadingButton: yn, BentoLoadingButtonState: On, BentoLoadingIndicator: et, BentoDatagridEvent: O };
1258
- }
1259
- });
1260
- var Qs = function() {
1261
- var e = this, n = e._self._c, t = e._self._setupProxy;
1262
- return n("div", { staticClass: "b-data-grid-lazy-load" }, [e.loading && e.isInfiniteScroll ? n(t.BentoLoadingIndicator) : e._e(), e.loading && !e.isInfiniteScroll ? n(t.BentoLoadingButton, { attrs: { variant: "secondary", state: t.BentoLoadingButtonState.LOADING } }, [e._v(e._s(t.t("loading")))]) : e._e(), !e.loading && !e.isInfiniteScroll ? n(t.BentoLoadingButton, { attrs: { state: t.BentoLoadingButtonState.START, variant: "secondary" }, on: { click: function(o) {
1263
- return e.$emit(t.BentoDatagridEvent.UPDATE_SHOW_MORE);
1264
- } } }, [e._v(e._s(t.t("showMore")))]) : e._e()], 1);
1265
- }, eo = [], to = /* @__PURE__ */ W(
1266
- Ks,
1267
- Qs,
1268
- eo,
1269
- !1,
1270
- null,
1271
- "fd9b8204"
1272
- );
1273
- const no = to.exports;
1274
- let Ye = 0;
1275
- const so = {
1276
- beforeCreate() {
1277
- this.uuid = Ye.toString(), Ye += 1;
1278
- }
1279
- };
1280
- var oo = function() {
1281
- var e = this, n = e._self._c;
1282
- return n("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? n("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), n("path", { attrs: { fill: "#00112C", 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" } })]);
1283
- }, lo = [], ao = /* @__PURE__ */ W(
1284
- so,
1285
- oo,
1286
- lo,
1287
- !1,
1288
- null,
1289
- null
1290
- );
1291
- const io = ao.exports, ro = {
1292
- "en-US": {
1293
- copy: "Copy",
1294
- edit: "Edit",
1295
- open: "Open",
1296
- more: "More"
1297
- },
1298
- "pt-BR": {
1299
- copy: "Copiar",
1300
- edit: "Editar",
1301
- open: "Abrir",
1302
- more: "Mais"
1303
- },
1304
- "ja-JP": {
1305
- copy: "コピー",
1306
- edit: "編集",
1307
- open: "を開く",
1308
- more: "表示を増やす"
1309
- }
1310
- }, co = {
1311
- i18n: { messages: ro },
1312
- name: "data-grid-cell-actions"
1313
- }, uo = /* @__PURE__ */ J({
1314
- ...co,
1315
- props: {
1316
- /**
1317
- * Column definitions using 'key' to relate to data object.
1318
- */
1319
- cellActions: {
1320
- type: Array,
1321
- required: !0,
1322
- validator: (s) => (s == null ? void 0 : s.length) <= 2
1323
- },
1324
- /**
1325
- * The column field key.
1326
- */
1327
- columnKey: {
1328
- type: String,
1329
- required: !0
1330
- },
1331
- /**
1332
- * The row data item object.
1333
- */
1334
- rowDataItem: {
1335
- type: Object,
1336
- required: !0
1337
- }
1338
- },
1339
- emits: ["menu-item-click-close"],
1340
- setup(s, { emit: e }) {
1341
- const n = s, { t } = oe(), o = S(() => {
1342
- var i;
1343
- return ((i = n.cellActions) == null ? void 0 : i.length) > 2 && tt(
1344
- "WARNING: BentoDataGrid Cell actions can only have a maximum of 2 actions, if you need more consider using the menuData property instead."
1345
- ), n.cellActions.slice(0, 2);
1346
- }), l = S(() => (i, a) => {
1347
- if (!(!a && i.isShort || a && !i.isShort))
1348
- switch (i.variant) {
1349
- case "copy":
1350
- return t("copy");
1351
- case "edit":
1352
- return t("edit");
1353
- case "open":
1354
- return t("open");
1355
- case "more":
1356
- return t("more");
1357
- default:
1358
- return i.title;
1359
- }
1360
- }), r = (i) => (i == null ? void 0 : i.event) !== void 0 ? {
1361
- click: () => i.event(n.rowDataItem, n.columnKey)
1362
- } : {}, _ = (i) => ({
1363
- ...i,
1364
- handler: () => {
1365
- i != null && i.handler && typeof i.handler == "function" && (i == null || i.handler()), i != null && i.event && typeof i.event == "function" && (i == null || i.event(n.rowDataItem, n.columnKey));
1366
- }
1367
- }), u = (i) => i.map((a) => {
1368
- const f = a;
1369
- return f != null && f.items && (f.items = u(f.items)), { ..._(f) };
1370
- });
1371
- return { __sfc: !0, t, props: n, emit: e, limitedRowCellActionsProps: o, getButtonTitle: l, generateButtonEvents: r, generateMenuEvents: _, transformMenuEvents: u, getCopyText: (i) => {
1372
- var a, f;
1373
- return (i == null ? void 0 : i.getCopyData) !== void 0 ? i.getCopyData(n.rowDataItem, n.columnKey) : (f = (a = n.rowDataItem) == null ? void 0 : a[n.columnKey]) == null ? void 0 : f.toString();
1374
- }, shouldShowMenuIconRight: (i) => i.iconRight || ((i == null ? void 0 : i.variant) === "more" || (i == null ? void 0 : i.variant) === "open") && !i.isShort, shouldShowMenuIconLeft: (i) => i.iconLeft || (i == null ? void 0 : i.variant) === "more", BentoButton: nt, BentoMenu: at, Copy: An, Edit1Icon: io, ExternalLinkIcon: wn, OptionsVerticalIcon: pn };
1375
- }
1376
- });
1377
- var fo = function() {
1378
- var e = this, n = e._self._c, t = e._self._setupProxy;
1379
- return n("Transition", { attrs: { name: "b-data-grid-cell-actions__animation", appear: "" } }, [n("div", { staticClass: "b-data-grid-cell-actions" }, [n("div", { staticClass: "b-data-grid-cell-actions__background-gradient" }), n("div", { staticClass: "b-data-grid-cell-actions__actions", attrs: { role: "group" } }, e._l(t.limitedRowCellActionsProps, function(o, l) {
1380
- return n("div", { key: l, staticClass: "b-data-grid-cell-actions__action" }, [o.menuData ? n(t.BentoMenu, { attrs: { data: t.transformMenuEvents(o.menuData), button: {
1381
- condensed: !0,
1382
- variant: "secondary",
1383
- disabled: o.disabled
1384
- }, teleport: "" }, on: { "menu-item-click": function(r) {
1385
- return t.emit("menu-item-click-close");
1386
- } }, scopedSlots: e._u([t.shouldShowMenuIconLeft(o) ? { key: "iconLeft", fn: function() {
1387
- return [(o == null ? void 0 : o.variant) === "more" ? n(t.OptionsVerticalIcon, { attrs: { "svg-title": t.getButtonTitle(o, !0) } }) : n(o.iconLeft, { tag: "component", attrs: { "svg-title": t.getButtonTitle(o, !0) } })];
1388
- }, proxy: !0 } : null, o != null && o.isShort ? null : { key: "default", fn: function() {
1389
- return [e._v(" " + e._s(t.getButtonTitle(o)) + " ")];
1390
- }, proxy: !0 }, t.shouldShowMenuIconRight(o) ? { key: "iconRight", fn: function() {
1391
- return [(o == null ? void 0 : o.variant) === "open" ? n(t.ExternalLinkIcon, { attrs: { "svg-title": t.getButtonTitle(o, !0) } }) : n(o.iconRight, { tag: "component", attrs: { "svg-title": o.title } })];
1392
- }, proxy: !0 } : null], null, !0) }) : o.variant === "copy" ? n(t.Copy, { attrs: { text: t.getCopyText(o), "button-text": t.getButtonTitle(o), button: {
1393
- condensed: !0,
1394
- variant: "secondary"
1395
- } } }) : n(t.BentoButton, e._g({ attrs: { condensed: "", variant: "secondary", critical: o.critical, disabled: o.disabled, link: o.link }, scopedSlots: e._u([o.iconLeft || o.variant === "edit" ? { key: "iconLeft", fn: function() {
1396
- return [(o == null ? void 0 : o.variant) === "edit" ? n(t.Edit1Icon, { attrs: { "svg-title": t.getButtonTitle(o, !0) } }) : n(o.iconLeft, { tag: "component", attrs: { "svg-title": o.title } })];
1397
- }, proxy: !0 } : null, o != null && o.isShort ? null : { key: "default", fn: function() {
1398
- return [e._v(" " + e._s(t.getButtonTitle(o)) + " ")];
1399
- }, proxy: !0 }, o.iconRight || o.variant === "open" ? { key: "iconRight", fn: function() {
1400
- return [(o == null ? void 0 : o.variant) === "open" ? n(t.ExternalLinkIcon, { attrs: { "svg-title": t.getButtonTitle(o, !0) } }) : n(o.iconRight, { tag: "component", attrs: { "svg-title": o.title } })];
1401
- }, proxy: !0 } : null], null, !0) }, t.generateButtonEvents(o)))], 1);
1402
- }), 0)])]);
1403
- }, go = [], _o = /* @__PURE__ */ W(
1404
- uo,
1405
- fo,
1406
- go,
1407
- !1,
1408
- null,
1409
- "a6bb216c"
1410
- );
1411
- const vo = _o.exports;
1412
- var G = /* @__PURE__ */ ((s) => (s.ACTION_COL_NESTED_CONTENT_AND_SELECTION_ENABLED = "action-col-nested-content-and-selection-enabled", s.ACTION_COL_NESTED_CONTENT_ENABLED = "action-col-nested-content-enabled", s.ACTION_COL_SELECTION_ENABLED = "action-col-selection-enabled", s.COLUMN_HOVERED = "column-hovered", s.COLUMN_HOVERED_NO_BORDER_LEFT = "column-hovered-no-border-left", s.COLUMN_HOVERED_NO_BORDER_RIGHT = "column-hovered-no-border-right", s.CONDENSED = "condensed", s.FROZEN = "frozen", s.IS_COLUMN_REORDERING = "is-column-re-ordering", s.IS_COLUMN_REORDERING_TARGET_LEFT = "is-column-re-order-target-left", s.IS_COLUMN_REORDERING_TARGET_RIGHT = "is-column-re-order-target-right", s.LAST_FROZEN_COLUMN_CELL = "last-frozen-column-cell", s.NESTED_CONTENT_ENABLED = "nested-content-toggle-enabled", s.NUMERIC = "numeric", s.OVERFLOW_ELLIPSIS = "overflow-ellipsis", s.PADDING_LEFT_UNSET = "padding-left-unset", s.PADDING_RIGHT_UNSET = "padding-right-unset", s))(G || {});
1413
- const Co = {
1414
- "en-US": {
1415
- collapseNestedContent: "Collapse nested content",
1416
- expandNestedContent: "Expand nested content",
1417
- selectRow: "Select row"
1418
- }
1419
- }, mo = {
1420
- i18n: { messages: Co },
1421
- name: "data-grid-cell"
1422
- }, ho = /* @__PURE__ */ J({
1423
- ...mo,
1424
- props: {
1425
- draggingEventsForRowCell: {
1426
- type: Function,
1427
- required: !0
1428
- },
1429
- /**
1430
- * The columns sets including
1431
- */
1432
- columnSets: {
1433
- type: Array,
1434
- required: !0
1435
- },
1436
- /**
1437
- * The columns set we are iterating over
1438
- */
1439
- column: {
1440
- type: Object,
1441
- required: !0
1442
- },
1443
- colIndex: {
1444
- type: Number,
1445
- required: !0
1446
- },
1447
- columnSetIndex: {
1448
- type: Number,
1449
- required: !0
1450
- },
1451
- /**
1452
- * Sets the row cells to the condensed padding state.
1453
- */
1454
- condensed: {
1455
- type: Boolean,
1456
- default: !1
1457
- },
1458
- /**
1459
- * Columns being dragged, contains dragging column and a target column
1460
- */
1461
- draggingColumns: {
1462
- type: Object,
1463
- default: void 0
1464
- },
1465
- /**
1466
- * A customisable method to retrieve a unique identifier for a data item in the array of data supplied.
1467
- * This is used selecting and performance reasons and must exist in each data item.
1468
- */
1469
- getDataItemId: {
1470
- type: Function,
1471
- default: (s) => s.id
1472
- },
1473
- /**
1474
- * The column hovered over state and whether the hovered over column should show a border right or left.
1475
- */
1476
- hoveredOverColumnState: {
1477
- type: Object,
1478
- required: !0
1479
- },
1480
- /**
1481
- * A customisable method to determine if a row is not selectable.
1482
- * The default is that every row is selectable.
1483
- */
1484
- isDataItemDisabled: {
1485
- type: Function,
1486
- default: () => !1
1487
- },
1488
- isMeasuringColumnWidths: {
1489
- type: Boolean,
1490
- default: !1
1491
- },
1492
- /**
1493
- * Determines if the nested content is visible.
1494
- */
1495
- isNestedContentExpanded: {
1496
- type: Boolean,
1497
- default: !1
1498
- },
1499
- /**
1500
- * Determines if the nest content slot is enabled for this data row.
1501
- */
1502
- nestedContent: {
1503
- type: Boolean,
1504
- default: !1
1505
- },
1506
- /**
1507
- * The IDs of the rows this cell controls to show / hide them.
1508
- */
1509
- nestedRowsElementIds: {
1510
- type: Array,
1511
- default: () => []
1512
- },
1513
- /**
1514
- * The row data object
1515
- */
1516
- rowData: {
1517
- type: Object,
1518
- required: !0
1519
- },
1520
- rowIndex: {
1521
- type: Number,
1522
- required: !0
1523
- },
1524
- /**
1525
- * Determines if the row selection is enabled.
1526
- */
1527
- selectable: {
1528
- type: Boolean,
1529
- default: !1
1530
- },
1531
- selectedItems: {
1532
- type: Array,
1533
- required: !0
1534
- }
1535
- },
1536
- emits: ["on-frozen-columns-key-press", "select-row", "register-row-cell-element", "cell-hovered", "nested-content-toggled"],
1537
- setup(s, { expose: e, emit: n }) {
1538
- const t = s, o = Oe(), l = it(o), { t: r } = oe(), _ = E(null), u = E(null), m = E(!1), v = E([]), c = S(() => {
1539
- var g;
1540
- return !!((g = t.rowData) != null && g[t.column.field]);
1541
- }), i = S(
1542
- () => t.column.field === V ? t.nestedRowsElementIds.join(" ") : ""
1543
- ), a = S(
1544
- () => t.column.field === V && !t.selectable && !t.nestedContent
1545
- ), f = (g, F) => (g == null ? void 0 : g.overflow) === Le.ELLIPSIS ? `${F}` : void 0, L = (g) => g ?? "-", C = (g) => t.columnSets.slice(0, g).reduce((F, { columnSet: I }) => F + I.length, 0), b = (g, F) => g + C(F), y = (g, F, I) => C() * g + b(F, I), A = (g) => {
1546
- var F;
1547
- (g === null || !_.value.contains(g) && !((F = v.value) != null && F.map((I) => I.value).some((I) => I === g || (I == null ? void 0 : I.contains(g))))) && (m.value = !1);
1548
- }, z = () => {
1549
- m.value = !1;
1550
- }, T = (g) => {
1551
- const I = { ...{
1552
- ...t.draggingEventsForRowCell(g)
1553
- } };
1554
- return g.frozen && (I.keyup = (N) => n("on-frozen-columns-key-press", N), I.keydown = (N) => n("on-frozen-columns-key-press", N)), g.cellActions && (I.mouseenter = () => {
1555
- m.value = !0;
1556
- }, I.mouseleave = (N) => {
1557
- m.value = !1, A(N == null ? void 0 : N.relatedTarget);
1558
- }, I.mouseleave = (N) => {
1559
- A(N == null ? void 0 : N.relatedTarget);
1560
- }, I.focus = (N) => {
1561
- m.value = !0;
1562
- }, I.focusout = (N) => {
1563
- A(N == null ? void 0 : N.relatedTarget);
1564
- }), I;
1565
- }, p = () => {
1566
- n("nested-content-toggled");
1567
- };
1568
- Z(
1569
- () => m.value,
1570
- () => {
1571
- m.value === !0 ? n("cell-hovered", t.rowIndex) : n("cell-hovered", -1);
1572
- }
1573
- );
1574
- const h = (g) => {
1575
- v.value.push(g);
1576
- }, w = (g) => {
1577
- _.value.contains(g == null ? void 0 : g.relatedTarget) || (m.value = !1);
1578
- };
1579
- en(Sn, {
1580
- registerMenuContainerElement: h,
1581
- menuMouseLeave: w
1582
- });
1583
- const x = (g) => {
1584
- var F, I, N, $, M, D, j;
1585
- return {
1586
- [`b-data-grid-cell--${G.COLUMN_HOVERED}`]: (g == null ? void 0 : g.field) === t.hoveredOverColumnState.hoveredOverColumnField,
1587
- [`b-data-grid-cell--${G.COLUMN_HOVERED_NO_BORDER_LEFT}`]: (g == null ? void 0 : g.field) === t.hoveredOverColumnState.hoveredOverColumnField && t.hoveredOverColumnState.noBorderLeft,
1588
- [`b-data-grid-cell--${G.COLUMN_HOVERED_NO_BORDER_RIGHT}`]: (g == null ? void 0 : g.field) === t.hoveredOverColumnState.hoveredOverColumnField && t.hoveredOverColumnState.noBorderRight,
1589
- [`b-data-grid-cell--${G.PADDING_LEFT_UNSET}`]: ((F = g == null ? void 0 : g.padding) == null ? void 0 : F.left) === !1,
1590
- [`b-data-grid-cell--${G.PADDING_RIGHT_UNSET}`]: ((I = g == null ? void 0 : g.padding) == null ? void 0 : I.right) === !1,
1591
- [`b-data-grid-cell--${G.NUMERIC}`]: g == null ? void 0 : g.numeric,
1592
- [`b-data-grid-cell--${G.CONDENSED}`]: t.condensed,
1593
- [`b-data-grid-cell--${G.OVERFLOW_ELLIPSIS}`]: (g == null ? void 0 : g.overflow) === Le.ELLIPSIS,
1594
- [`b-data-grid-cell--${G.IS_COLUMN_REORDERING}`]: ((N = t.draggingColumns.dragging) == null ? void 0 : N.field) === g.field,
1595
- [`b-data-grid-cell--${G.IS_COLUMN_REORDERING_TARGET_LEFT}`]: (($ = t.draggingColumns.target) == null ? void 0 : $.field) === g.field && ((M = t.draggingColumns) == null ? void 0 : M.dragToLeft),
1596
- [`b-data-grid-cell--${G.IS_COLUMN_REORDERING_TARGET_RIGHT}`]: ((D = t.draggingColumns.target) == null ? void 0 : D.field) === g.field && !((j = t.draggingColumns) != null && j.dragToLeft),
1597
- [`b-data-grid-cell--${G.FROZEN}`]: g == null ? void 0 : g.frozen,
1598
- [`b-data-grid-cell--${G.NESTED_CONTENT_ENABLED}`]: t.nestedContent,
1599
- [`b-data-grid-cell--${G.ACTION_COL_NESTED_CONTENT_ENABLED}`]: t.nestedContent && !t.selectable && g.field === V,
1600
- [`b-data-grid-cell--${G.ACTION_COL_NESTED_CONTENT_AND_SELECTION_ENABLED}`]: t.nestedContent && t.selectable && g.field === V,
1601
- [`b-data-grid-cell--${G.ACTION_COL_SELECTION_ENABLED}`]: g.field === V && t.selectable
1602
- };
1603
- };
1604
- return e({
1605
- gridcellRef: _
1606
- }), { __sfc: !0, slots: o, hasSlot: l, t: r, props: t, emit: n, gridcellRef: _, cellActionsRef: u, shouldShowCellActions: m, childrenMenuContainerElements: v, hasRowData: c, controlledNestedRowElementIds: i, ariaHidden: a, conditionalTitleAttribute: f, getRowData: L, sumColumnAmountsInColumnSets: C, getColIndex: b, getCellIndex: y, isLeavingCellFocus: A, onMenuClose: z, getGridcellEvents: T, toggleNestedContent: p, registerMenuContainerElement: h, menuMouseLeave: w, conditionalRowCellClasses: x, DATAGRID_ACTIONS_COLUMN_FIELD_NAME: V, BentoCheckbox: lt, BentoTypography: me, BentoToggleButton: we, DataGridCellActions: vo, ChevronDownIcon: In, ChevronUpIcon: Tn };
1607
- }
1608
- });
1609
- var po = function() {
1610
- var o;
1611
- var e = this, n = e._self._c, t = e._self._setupProxy;
1612
- return n("div", e._g({ key: `cell-${e.column.field}`, ref: "gridcellRef", staticClass: "b-data-grid-cell", class: t.conditionalRowCellClasses(e.column), style: {
1613
- width: e.column.autoWidth && e.isMeasuringColumnWidths ? "auto" : `${e.column.width}px`
1614
- }, attrs: { "aria-hidden": t.ariaHidden, "data-testid": `cell-${e.column.field}`, "data-cellindex": t.getCellIndex(e.rowIndex, e.colIndex, e.columnSetIndex), role: "gridcell", tabindex: t.getCellIndex(e.rowIndex, e.colIndex, e.columnSetIndex) === 0 ? "0" : "-1", "aria-colindex": t.getColIndex(e.colIndex, e.columnSetIndex) + 1 } }, t.getGridcellEvents(e.column)), [e.column.field === t.DATAGRID_ACTIONS_COLUMN_FIELD_NAME ? [e.selectable ? [n(t.BentoCheckbox, { staticClass: "b-data-grid-cell__select-cell", attrs: { "aria-label": t.t("selectRow"), "model-value": e.selectedItems, disabled: e.isDataItemDisabled(e.rowData), value: e.getDataItemId(e.rowData) }, on: { "update:model-value": function(l) {
1615
- return e.$emit("select-row", l);
1616
- } } })] : e._e(), e.nestedContent ? [n(t.BentoToggleButton, { ref: "menuButtonRef", attrs: { "aria-haspopup": "true", "aria-controls": t.controlledNestedRowElementIds, condensed: "", variant: "tertiary", toggled: e.isNestedContentExpanded }, on: { click: t.toggleNestedContent }, scopedSlots: e._u([{ key: "iconLeft", fn: function() {
1617
- return [e.isNestedContentExpanded ? n(t.ChevronUpIcon, { staticClass: "b-accordion-item__icon", attrs: { "svg-title": t.t("collapseNestedContent") } }) : n(t.ChevronDownIcon, { staticClass: "b-accordion-item__icon", attrs: { "svg-title": t.t("expandNestedContent") } })];
1618
- }, proxy: !0 }], null, !1, 1879847906) })] : e._e()] : [n(t.BentoTypography, { attrs: { el: "div" } }, [e._t(`item-${e.column.field}`, function() {
1619
- return [n("span", { attrs: { title: t.conditionalTitleAttribute(e.column, e.rowData[e.column.field]) } }, [e._v(e._s(t.getRowData(e.rowData[e.column.field])))])];
1620
- }, { item: e.rowData })], 2), ((o = e.column.cellActions) == null ? void 0 : o.length) > 0 ? n("div", { staticClass: "b-data-grid-cell__cell-actions" }, [t.shouldShowCellActions && (t.hasRowData || t.hasSlot(`item-${e.column.field}`)) ? n(t.DataGridCellActions, { ref: "cellActionsRef", attrs: { "cell-actions": e.column.cellActions, "column-key": e.column.field, "row-data-item": e.rowData }, on: { "menu-item-click-close": t.onMenuClose } }) : e._e()], 1) : e._e()]], 2);
1621
- }, So = [], Lo = /* @__PURE__ */ W(
1622
- ho,
1623
- po,
1624
- So,
1625
- !1,
1626
- null,
1627
- "50c6b8ee"
1628
- );
1629
- const Eo = Lo.exports, bo = {
1630
- name: "data-grid-row"
1631
- }, yo = /* @__PURE__ */ J({
1632
- ...bo,
1633
- props: {
1634
- /**
1635
- * When true, will emit a 'rowClick' event when a row is clicked. Will add cursor: pointer to rows.
1636
- */
1637
- allowRowClicks: { type: Boolean, default: !1 },
1638
- /**
1639
- * The columns sets including
1640
- */
1641
- columnSets: {
1642
- type: Array,
1643
- required: !0
1644
- },
1645
- /**
1646
- * Sets the row cells to the condensed padding state.
1647
- */
1648
- condensed: {
1649
- type: Boolean,
1650
- default: !1
1651
- },
1652
- /**
1653
- * Columns being dragged, contains dragging column and a target column
1654
- */
1655
- draggingColumns: {
1656
- type: Object,
1657
- default: void 0
1658
- },
1659
- /**
1660
- * Dragging event handlers for each row cell
1661
- */
1662
- draggingEventsForRowCell: {
1663
- type: Function,
1664
- required: !0
1665
- },
1666
- /**
1667
- * A customisable method to retrieve a unique identifier for a data item in the array of data supplied.
1668
- * This is used selecting and performance reasons and must exist in each data item.
1669
- */
1670
- getDataItemId: {
1671
- type: Function,
1672
- default: (s) => s.id
1673
- },
1674
- /**
1675
- * Set to true if the datagrid has been scrolled and the left side has overflowing space.
1676
- */
1677
- hasLeftOverflow: {
1678
- type: Boolean,
1679
- default: !1
1680
- },
1681
- /**
1682
- * Enables the nested content slot functionality.
1683
- */
1684
- hasNestedContent: {
1685
- type: Boolean,
1686
- default: !1
1687
- },
1688
- /**
1689
- * Highlighted row IDs.
1690
- */
1691
- highlightedRows: {
1692
- type: Array,
1693
- default: () => []
1694
- },
1695
- /**
1696
- * The row index of a currently hovered row.
1697
- */
1698
- hoveredRowIndex: {
1699
- type: Number,
1700
- default: -1
1701
- },
1702
- /**
1703
- * The column hovered over state and whether the hovered over column should show a border right or left.
1704
- */
1705
- hoveredOverColumnState: {
1706
- type: Object,
1707
- required: !0
1708
- },
1709
- /**
1710
- * A customisable method to determine if a row is not selectable.
1711
- * The default is that every row is selectable.
1712
- */
1713
- isDataItemDisabled: {
1714
- type: Function,
1715
- default: () => !1
1716
- },
1717
- /**
1718
- * If the row is the last child in it's parent container.
1719
- */
1720
- isRowLastChild: {
1721
- type: Boolean,
1722
- default: !1
1723
- },
1724
- /**
1725
- * If columns are being measured for the autoWidth functionality.
1726
- */
1727
- isMeasuringColumnWidths: {
1728
- type: Boolean,
1729
- default: !1
1730
- },
1731
- /**
1732
- * The row data object
1733
- */
1734
- rowData: {
1735
- type: Object,
1736
- required: !0
1737
- },
1738
- /**
1739
- * The row index.
1740
- */
1741
- rowIndex: {
1742
- type: Number,
1743
- required: !0
1744
- },
1745
- /**
1746
- * The number of rows that this row is within.
1747
- */
1748
- rowSetSize: {
1749
- type: Number,
1750
- default: 0
1751
- },
1752
- /**
1753
- * Determines whether to render frozen seperator on the row.
1754
- */
1755
- showFrozenColumnsSeparator: {
1756
- type: Boolean,
1757
- default: !1
1758
- },
1759
- /**
1760
- * Determines if the row selection is enabled.
1761
- */
1762
- selectable: {
1763
- type: Boolean,
1764
- default: !1
1765
- },
1766
- /**
1767
- * The array of IDs for the selected rows.
1768
- */
1769
- selectedItems: {
1770
- type: Array,
1771
- required: !0
1772
- },
1773
- /**
1774
- * Enables / Disables the nested-content slot
1775
- */
1776
- shouldShowNestedContent: {
1777
- type: Function,
1778
- default: (s) => !0
1779
- }
1780
- },
1781
- emits: ["cell-hovered", "on-frozen-columns-key-press", "select-row", "row-click"],
1782
- setup(s, { expose: e, emit: n }) {
1783
- const t = s, o = Oe(), l = it(o), r = E({}), _ = E(!1), u = E(), m = ot("nested-content-slot"), v = S(() => {
1784
- if (t.hasNestedContent) {
1785
- const T = _.value.toString();
1786
- return {
1787
- "aria-expanded": t.shouldShowNestedContent(t.rowData) ? T : void 0,
1788
- "aria-level": "1",
1789
- "aria-posinset": t.rowIndex + 1,
1790
- "aria-setsize": t.rowSetSize
1791
- };
1792
- }
1793
- return { "aria-rowindex": t.rowIndex + 1 };
1794
- }), c = (T, p) => {
1795
- const h = T;
1796
- T !== null && (h != null && h.gridcellRef) && (r.value[p] = h.gridcellRef);
1797
- }, i = (T) => {
1798
- if (!t.selectable)
1799
- return null;
1800
- const p = t.getDataItemId(T);
1801
- return t.selectedItems.includes(p).toString();
1802
- }, a = (T) => {
1803
- t.allowRowClicks && n("row-click", t.rowData, T);
1804
- }, { updateContentHeight: f, contentHeight: L } = Rn(u, _), C = S(() => {
1805
- if (t.hasNestedContent)
1806
- return {
1807
- paddingLeft: `${r.value[V].clientWidth + rt}px`,
1808
- "max-height": t.hasNestedContent && L.value ? L.value : 0
1809
- };
1810
- });
1811
- Z(
1812
- () => u.value,
1813
- () => {
1814
- let T = null;
1815
- !T && u.value && (T = Re(u.value, () => {
1816
- u.value && f();
1817
- }));
1818
- }
1819
- );
1820
- const b = () => {
1821
- _.value = !_.value, f();
1822
- }, y = (T, p) => ({
1823
- "b-data-grid-row-container__row--disabled": t.isDataItemDisabled(T),
1824
- "b-data-grid-row-container__row--row-clicks-enabled": t.allowRowClicks,
1825
- "b-data-grid-row-container__row--highlighted": t.highlightedRows.includes(t.getDataItemId(T)) || t.selectedItems.includes(t.getDataItemId(T)),
1826
- "b-data-grid-row-container__row--hovered": t.hoveredRowIndex === p,
1827
- "b-data-grid-row-container__row--is-last-child": t.isRowLastChild && !_.value
1828
- }), A = (T) => ({
1829
- "b-data-grid-row-container__row-cell-set--frozen": T,
1830
- [`b-data-grid-row-container__row-cell-set--${ne.OVERFLOW_SHADOW_LEFT}`]: T && t.hasLeftOverflow,
1831
- "b-data-grid-row-container__row-cell-set--frozen-separator": T && t.showFrozenColumnsSeparator,
1832
- "b-data-grid-row-container__row-cell-set--unfrozen": !T,
1833
- "b-data-grid-row-container__row-cell-set--is-measuring": t.isMeasuringColumnWidths
1834
- }), z = S(() => ({
1835
- "b-data-grid-row-container__row-nested-slot--is-last-child": t.isRowLastChild
1836
- }));
1837
- return e({
1838
- gridcellRefs: r
1839
- }), { __sfc: !0, slots: o, hasSlot: l, props: t, emit: n, gridcellRefs: r, isNestedContentShown: _, nestedContentRef: u, nestedContentSlotId: m, ariaRowAttributes: v, registerRowCellRef: c, getRowAriaSelectedValue: i, onRowClick: a, updateContentHeight: f, contentHeight: L, nestedContentStyles: C, nestedContentToggled: b, conditionalRowClasses: y, conditionalRowSetClasses: A, conditionalNestedContentRowClasses: z, DataGridCell: Eo };
1840
- }
1841
- });
1842
- var Oo = function() {
1843
- var e = this, n = e._self._c, t = e._self._setupProxy;
1844
- return n("div", { staticClass: "b-data-grid-row-container" }, [n("div", e._b({ key: e.rowIndex, staticClass: "b-data-grid-row-container__row", class: t.conditionalRowClasses(e.rowData, e.rowIndex), attrs: { role: "row", "aria-selected": t.getRowAriaSelectedValue(e.rowData) }, on: { click: t.onRowClick } }, "div", t.ariaRowAttributes, !1), [e._l(e.columnSets, function({ columnSet: o, id: l, isFrozenColumns: r }, _) {
1845
- return [o != null && o.length ? n("div", { key: `data-grid-rows-${l}`, staticClass: "b-data-grid-row-container__cells", class: t.conditionalRowSetClasses(r), attrs: { "data-testid": `data-grid-${l}-rows` } }, e._l(o, function(u, m) {
1846
- return n(t.DataGridCell, { key: `cell-${u.field}`, ref: (v) => t.registerRowCellRef(v, u.field), refInFor: !0, staticClass: "b-data-grid-row-container__cell", attrs: { column: u, "column-set-index": _, "col-index": m, "column-sets": e.columnSets, condensed: e.condensed, "dragging-columns": e.draggingColumns, "dragging-events-for-row-cell": e.draggingEventsForRowCell, "get-data-item-id": e.getDataItemId, "hovered-over-column-state": e.hoveredOverColumnState, "is-data-item-disabled": e.isDataItemDisabled, "is-measuring-column-widths": e.isMeasuringColumnWidths, "is-nested-content-expanded": t.isNestedContentShown, "nested-content": e.hasNestedContent && e.shouldShowNestedContent(e.rowData), "nested-rows-element-ids": [t.nestedContentSlotId], "row-data": e.rowData, "row-index": e.rowIndex, selectable: e.selectable, "selected-items": e.selectedItems }, on: { "cell-hovered": function(v) {
1847
- return t.emit("cell-hovered", v);
1848
- }, "on-frozen-columns-key-press": function(v) {
1849
- return t.emit("on-frozen-columns-key-press", v);
1850
- }, "select-row": function(v) {
1851
- return t.emit("select-row", v);
1852
- }, "nested-content-toggled": t.nestedContentToggled }, scopedSlots: e._u([e._l(t.slots, function(v, c) {
1853
- return { key: c, fn: function(i) {
1854
- return [e._t(c, null, null, i)];
1855
- } };
1856
- })], null, !0) });
1857
- }), 1) : e._e()];
1858
- })], 2), e.hasNestedContent && t.hasSlot("nested-slot") ? n("Transition", { key: `${e.rowIndex}-nest-content`, attrs: { name: "b-data-grid-row-container__animation--nested-content" } }, [t.isNestedContentShown ? n("div", { staticClass: "b-data-grid-row-container__row-nested-slot", class: t.conditionalNestedContentRowClasses, style: t.nestedContentStyles, attrs: { id: t.nestedContentSlotId, "aria-level": "2", "aria-posinset": "1", "aria-setsize": "1", role: "row", tabindex: "-1" } }, [n("div", { ref: "nestedContentRef" }, [e._t("nested-slot", null, { item: e.rowData })], 2)]) : e._e()]) : e._e()], 1);
1859
- }, Ro = [], wo = /* @__PURE__ */ W(
1860
- yo,
1861
- Oo,
1862
- Ro,
1863
- !1,
1864
- null,
1865
- "69cd59d7"
1866
- );
1867
- const Ao = wo.exports;
1868
- let Xe = 0;
1869
- const Io = {
1870
- beforeCreate() {
1871
- this.uuid = Xe.toString(), Xe += 1;
1872
- }
1873
- };
1874
- var To = function() {
1875
- var e = this, n = e._self._c;
1876
- return n("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? n("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), n("g", { attrs: { "clip-path": "url(#uia-icons-16-warning_circle_fill__a" + e.uuid + ")" } }, [n("path", { attrs: { fill: "#00112C", 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" } })]), n("defs", [n("clipPath", { attrs: { id: "uia-icons-16-warning_circle_fill__a" + e.uuid } }, [n("rect", { attrs: { width: "16", height: "16", fill: "#fff" } })])])]);
1877
- }, No = [], Do = /* @__PURE__ */ W(
1878
- Io,
1879
- To,
1880
- No,
1881
- !1,
1882
- null,
1883
- null
1884
- );
1885
- const xo = Do.exports, Fo = {}, Mo = /* @__PURE__ */ J({
1886
- ...Fo,
1887
- __name: "data-grid-static-icon",
1888
- props: {
1889
- colored: { type: Boolean, default: !1 },
1890
- tooltipText: null,
1891
- variant: { default: "no-value" }
1892
- },
1893
- setup(s) {
1894
- const e = s, n = S(() => {
1895
- switch (e.variant) {
1896
- case "checkmark":
1897
- return tn;
1898
- case "warning":
1899
- return nn;
1900
- case "error":
1901
- return xo;
1902
- case "cross":
1903
- return Qe;
1904
- case "no-value":
1905
- return Pe;
1906
- default:
1907
- return Pe;
1908
- }
1909
- }), t = S(() => ({
1910
- "b-data-grid-static-icon--colored": e.colored && e.variant !== "no-value"
1911
- })), o = S(() => `b-data-grid-static-icon__${e.variant}`), l = S(() => sn.AUTO);
1912
- return { __sfc: !0, props: e, computedIcon: n, conditionalClasses: t, computedIconClass: o, tooltipPosition: l, vBentoTooltipDirective: on };
1913
- }
1914
- });
1915
- var Po = function() {
1916
- var e = this, n = e._self._c, t = e._self._setupProxy;
1917
- return n("div", { directives: [{ name: "bento-tooltip-directive", rawName: "v-bento-tooltip-directive:[tooltipPosition]", value: e.tooltipText, expression: "tooltipText", arg: t.tooltipPosition }], staticClass: "b-data-grid-static-icon", class: t.conditionalClasses, attrs: { "aria-label": e.tooltipText, tabindex: "0" } }, [n(t.computedIcon, { tag: "component", class: t.computedIconClass, attrs: { "svg-title": e.tooltipText } })], 1);
1918
- }, zo = [], Bo = /* @__PURE__ */ W(
1919
- Mo,
1920
- Po,
1921
- zo,
1922
- !1,
1923
- null,
1924
- "f8532817"
1925
- );
1926
- const Dl = Bo.exports, $o = {
1927
- i18n: { messages: ct },
1928
- name: "bento-data-grid"
1929
- }, Uo = /* @__PURE__ */ J({
1930
- ...$o,
1931
- props: {
1932
- /**
1933
- * When true, will emit a 'rowClick' event when a row is clicked. Will add cursor: pointer to rows.
1934
- */
1935
- allowRowClicks: { type: Boolean, default: !1 },
1936
- /**
1937
- * When true, column headers will become draggable, allowing users to rearrange columns.
1938
- */
1939
- allowColumnDragAndDrop: { type: Boolean, default: !0 },
1940
- /**
1941
- * List of actions that will be rendered in the action bar when user selects items.
1942
- *
1943
- * Each object in the list should have a `title`, an `event` and,
1944
- * optionally, an `icon`.
1945
- *
1946
- * The component will display 4 actions and the hide the rest inside a menu.
1947
- *
1948
- * @see BentoButton for a list of all the other props supported by each button action.
1949
- */
1950
- bulkActions: {
1951
- type: Array,
1952
- default: null
1953
- },
1954
- /**
1955
- * Sets the row cells to the condensed padding state.
1956
- */
1957
- condensed: {
1958
- type: Boolean,
1959
- default: !1
1960
- },
1961
- /**
1962
- * Column definitions using 'key' to relate to data object.
1963
- */
1964
- columns: {
1965
- type: Array,
1966
- required: !0
1967
- },
1968
- /**
1969
- * Enables / hides the display options panel and the column contextual menu functionality.
1970
- */
1971
- columnPanel: { type: Boolean, default: !1 },
1972
- /**
1973
- * An array of data objects to display.
1974
- */
1975
- data: {
1976
- type: Array,
1977
- required: !0
1978
- },
1979
- /**
1980
- * Empty state props that will be passed down to inner empty-state component
1981
- */
1982
- emptyState: {
1983
- type: Object,
1984
- default: void 0
1985
- },
1986
- /**
1987
- * filter-bar value (i.e. filters) that will be passed down to inner filter-bar component
1988
- * {@see BentoFilterBarModel}
1989
- */
1990
- filters: {
1991
- type: ve.props.value.type,
1992
- default: void 0
1993
- },
1994
- /**
1995
- * An array of the values for each filter set in `value`.
1996
- * {@see BentoFilterValues}
1997
- */
1998
- filterValues: {
1999
- type: ve.props.filterValues.type,
2000
- default: () => []
2001
- },
2002
- /**
2003
- * Filter bar search term useful to filter all the data by text
2004
- */
2005
- filterSearchTerm: {
2006
- type: ve.props.searchTerm.type,
2007
- default: void 0
2008
- },
2009
- /**
2010
- * Allows the grid to be rendered inside a confined space.
2011
- */
2012
- fitContent: { type: Boolean, default: !1 },
2013
- /**
2014
- * A customisable method to retrieve a unique identifier for a data item in the array of data supplied.
2015
- * This is used selecting and performance reasons and must exist in each data item.
2016
- */
2017
- getDataItemId: {
2018
- type: Function,
2019
- default: (s) => s.id
2020
- },
2021
- /**
2022
- * If resize is enabled
2023
- */
2024
- hasResizableColumns: {
2025
- type: Boolean,
2026
- default: !0
2027
- },
2028
- /**
2029
- * Enables the nested content slot functionality.
2030
- */
2031
- hasNestedContent: {
2032
- type: Boolean,
2033
- default: !1
2034
- },
2035
- /**
2036
- * Highlighted items
2037
- */
2038
- highlightedRows: {
2039
- type: Array,
2040
- default: () => []
2041
- },
2042
- /**
2043
- * A customisable method to determine if a row is not selectable.
2044
- * The default is that every row is selectable.
2045
- */
2046
- isDataItemDisabled: {
2047
- type: Function,
2048
- default: () => !1
2049
- },
2050
- /**
2051
- * The type of `Lazy Load`.
2052
- * Type "automatic" will enable infinite scrolling
2053
- * Type "button" will enable lazy loading with "Show more" button
2054
- * @values automatic, button, none
2055
- */
2056
- lazyLoadType: {
2057
- type: String,
2058
- default: "none",
2059
- validator: (s) => ["automatic", "button", "none"].includes(s)
2060
- },
2061
- /**
2062
- * If the loading indicator should be shown.
2063
- */
2064
- loading: {
2065
- type: Boolean,
2066
- default: !1
2067
- },
2068
- /**
2069
- * Enables / Disables the table's surrounding border.
2070
- */
2071
- outline: {
2072
- type: Boolean,
2073
- default: !1
2074
- },
2075
- /**
2076
- * Renders the data grid with no top spacing, to render inside containers that already have spacing
2077
- */
2078
- noSpacingTop: {
2079
- type: Boolean,
2080
- default: !1
2081
- },
2082
- /**
2083
- * Pagination props that will be passed down to inner pagination component
2084
- */
2085
- pagination: {
2086
- type: Object,
2087
- default: void 0
2088
- },
2089
- /**
2090
- * Adds an extra option when selecting all items that allows user to select items in other pages too.
2091
- */
2092
- selectableAcrossPages: {
2093
- type: Boolean,
2094
- default: !1
2095
- },
2096
- /**
2097
- * Sticks the horizontal scrollbar to the bottom of the screen if the data-grid is larger than the screen height.
2098
- */
2099
- stickyHorizontalScrollbar: {
2100
- type: Boolean,
2101
- default: !1
2102
- },
2103
- /**
2104
- * Make pagination stick to the bottom of the page when the data-grid is bigger than the screen.
2105
- * Because styles have to be applied to pagination container element, this has to be a data-grid prop (rather than a pagination prop).
2106
- */
2107
- stickyPagination: {
2108
- type: Boolean,
2109
- default: !1
2110
- },
2111
- /**
2112
- * Make data-grid filters stick to the top of the page along with the data-grid headers.
2113
- * Defaults to true.
2114
- */
2115
- stickyFilters: {
2116
- type: Boolean,
2117
- default: !0
2118
- },
2119
- /**
2120
- * Enables / Disables rows to be selected via a checkbox. On select the "select" event will be emitted.
2121
- */
2122
- selectable: {
2123
- type: Boolean,
2124
- default: !1
2125
- },
2126
- /**
2127
- * Selected items
2128
- */
2129
- selection: {
2130
- type: Array,
2131
- default: () => []
2132
- },
2133
- /**
2134
- * Enables / Disables the nested-content slot
2135
- */
2136
- shouldShowNestedContent: {
2137
- type: Function,
2138
- default: (s) => !0
2139
- },
2140
- /**
2141
- * Sortby handles proper rendering of sort icon in header. Sorting currently is only supported server side.
2142
- * It does make sure the currently sorted column has a more visible sort icon, and the sort icon points in the right direction.
2143
- */
2144
- sortBy: {
2145
- type: Array,
2146
- // NOTE: is an array to allow multi-sorting in the future
2147
- default: () => []
2148
- },
2149
- /**
2150
- * Title of the data grid to be rendered as tab title when a data grid is passed in a tab layout.
2151
- */
2152
- tabTitle: {
2153
- type: String,
2154
- default: null
2155
- },
2156
- /**
2157
- * Truncates all data grid column headers
2158
- */
2159
- truncateColumnHeaders: {
2160
- type: Boolean,
2161
- default: !1
2162
- }
2163
- },
2164
- emits: [
2165
- O.COLUMNS,
2166
- O.COLUMN_RESIZE,
2167
- O.ITEMS_PAGE,
2168
- O.FILTER_SEARCH_INPUT,
2169
- O.FILTER_SEARCH_CLEAR,
2170
- O.NAVIGATE,
2171
- O.UPDATE_COLUMNS,
2172
- O.UPDATE_CONDENSED,
2173
- O.UPDATE_FILTER_VALUES,
2174
- O.UPDATE_FILTERS,
2175
- O.UPDATE_FILTER_SEARCH_TERM,
2176
- O.UPDATE_SHOW_MORE,
2177
- O.UPDATE_PAGINATION,
2178
- O.UPDATE_SELECTION,
2179
- O.UPDATE_SORT_BY,
2180
- O.ROW_CLICK,
2181
- O.SELECT,
2182
- O.SELECT_ALL_ACROSS_PAGES,
2183
- O.SORT
2184
- ],
2185
- setup(s, { expose: e, emit: n }) {
2186
- const t = s, o = Oe(), l = E(null), r = E(), _ = E({}), u = E(null), m = E(null), v = E(), c = E(null), i = E(null), {
2187
- allowColumnDragAndDrop: a,
2188
- columns: f,
2189
- columnPanel: L,
2190
- data: C,
2191
- lazyLoadType: b,
2192
- loading: y,
2193
- hasNestedContent: A,
2194
- selectable: z,
2195
- selection: T,
2196
- selectableAcrossPages: p,
2197
- stickyPagination: h,
2198
- outline: w,
2199
- pagination: x
2200
- } = be(t), g = E(-1), { t: F } = oe(), I = S(() => re.value.filter((R) => R.frozen).length), N = Me(
2201
- fn,
2202
- () => ({
2203
- isDataGridTemplate: !1,
2204
- stickyTabs: E(!1),
2205
- tabsRef: E(null)
2206
- })
2207
- ), { isDataGridTemplate: $, stickyTabs: M, tabsRef: D } = N(), j = S(() => t.fitContent || $ ? 0 : null), {
2208
- columnDefs: re,
2209
- onColumnWidthOverride: he,
2210
- gridColumnWidthStyle: d,
2211
- isMeasuringColumnWidths: P,
2212
- isTotalWidthOfColumnsTakingUpAllAvailableGridWidth: X,
2213
- columns: K,
2214
- totalWidthOfAllColumns: le
2215
- } = Wn(f, C, l, _, u, {
2216
- hasColumnPanel: L,
2217
- hasSelectableColumn: z,
2218
- hasSelectableAcrossPages: p,
2219
- hasNestedContent: A,
2220
- allowColumnDragAndDrop: a,
2221
- isDataGridTemplate: $
2222
- }), k = (R, ...B) => {
2223
- (R === O.COLUMNS || R === O.UPDATE_COLUMNS) && ([K.value] = B), n(R, ...B);
2224
- }, ae = ke(D, M), fe = S(
2225
- () => t.stickyFilters ? `${ae.value}px` : null
2226
- ), de = ke(m, Ke(t, "stickyFilters")), ge = S(
2227
- () => `${de.value + ae.value}px`
2228
- ), {
2229
- sortedColumns: ce,
2230
- columnSets: ie,
2231
- isOnlyOneVisibleColumn: ut,
2232
- onConfigSettingsUpdate: ft,
2233
- onConfigSettingsColumnsUpdate: gt,
2234
- onConfigSettingsColumnUpdate: _t
2235
- } = Yn(re, k), { hoveredOverColumn: vt, hoveredOverColumnState: Ct } = Jn(
2236
- ie,
2237
- z,
2238
- w,
2239
- X
2240
- ), { draggingColumns: mt, draggingEventsForColumns: ht, draggingEventsForRowCell: pt, onMoveColumnByOffset: St } = qn(ce, a, k), { onAllRowSelect: Lt, onRowSelect: Et, selectedItems: Ae, allItemsSelectedState: bt } = Gn(
2241
- T,
2242
- k,
2243
- C,
2244
- t.getDataItemId,
2245
- t.isDataItemDisabled
2246
- ), { navigationInput: yt } = Vn(u, f, z), { isLazyLoad: pe, isInfiniteScroll: Ot, verticalScrollPosition: Ie, emitLazyLoadEvent: Rt } = jn(
2247
- b,
2248
- c,
2249
- l,
2250
- y,
2251
- k
2252
- ), {
2253
- updateScrollPosition: wt,
2254
- updateScrollPositionOnFrozenColumnsNavigation: At,
2255
- syncVirtualScrollerWithBody: It,
2256
- hasLeftOverflow: Se,
2257
- hasRightOverflow: Te,
2258
- horizontalScrollbarConditionalClasses: Tt
2259
- } = Xn(l, r, Ie, i, {
2260
- isLazyLoad: pe,
2261
- pagination: x,
2262
- stickyPagination: h
2263
- }), Ne = () => {
2264
- v.value.isClearAllVisible ? v.value.clearAllFilters() : v.value.isResetAllVisible && v.value.resetAllFilters();
2265
- }, Nt = S(() => {
2266
- var R, B;
2267
- return {
2268
- ...t.emptyState,
2269
- variant: ((R = t.emptyState) == null ? void 0 : R.variant) === "embedded" || ((B = t.emptyState) == null ? void 0 : B.variant) === "basic" ? t.emptyState.variant : "basic"
2270
- };
2271
- }), Dt = S(() => ({
2272
- [`b-data-grid--${ne.OUTLINE}`]: t.outline,
2273
- [`b-data-grid--${ne.SCROLL}`]: t.fitContent || pe.value,
2274
- [`b-data-grid--${ne.STICKY_FILTERS}`]: t.filters && t.stickyFilters,
2275
- [`b-data-grid--${ne.OVERFLOW_SHADOW_LEFT}`]: Se.value && !I.value,
2276
- [`b-data-grid--${ne.OVERFLOW_SHADOW_RIGHT}`]: Te.value,
2277
- [`b-data-grid--${ne.NO_SPACING_TOP}`]: t.noSpacingTop
2278
- })), xt = S(() => ({
2279
- "b-data-grid__body--sticky-horizontal-scrollbar": t.stickyHorizontalScrollbar
2280
- })), Ft = S(() => ie.value.findIndex((R) => R.columnSet.length)), Mt = S(() => !((t.selectable || t.hasNestedContent) && I.value === 1) || Se.value), Pt = S(() => ({
2281
- "b-data-grid__filters--sticky": !!t.stickyFilters || $
2282
- })), zt = S(() => {
2283
- var R, B, q, Q, _e, ue;
2284
- return {
2285
- "b-data-grid__pagination--padding-left-unset": ((q = (B = (R = t.columns) == null ? void 0 : R[0]) == null ? void 0 : B.padding) == null ? void 0 : q.left) === !1,
2286
- "b-data-grid__pagination--padding-right-unset": ((ue = (_e = (Q = t.columns) == null ? void 0 : Q[t.columns.length - 1]) == null ? void 0 : _e.padding) == null ? void 0 : ue.right) === !1,
2287
- "b-data-grid__pagination--sticky": !!t.stickyPagination || $
2288
- };
2289
- }), Bt = (R) => {
2290
- const B = R;
2291
- R !== null && (B != null && B.columnHeaderRefs) && Object.entries(B == null ? void 0 : B.columnHeaderRefs).forEach(([q, Q]) => {
2292
- _.value[q] = Q;
2293
- });
2294
- }, $t = (R, B) => {
2295
- const q = R;
2296
- R !== null && (q != null && q.gridcellRefs) && Object.entries(q == null ? void 0 : q.gridcellRefs).map(([Q, _e]) => {
2297
- var ue;
2298
- ((ue = u.value) == null ? void 0 : ue[Q]) === void 0 && (u.value = { ...u.value, [Q]: [] }), u.value[Q][B] = _e;
2299
- });
2300
- }, Ut = (R, B) => {
2301
- t.allowRowClicks && k(O.ROW_CLICK, R, B);
2302
- }, kt = (R) => {
2303
- g.value = R;
2304
- }, Wt = S(() => !!t.selectableAcrossPages && !!t.pagination), Gt = S(() => t.hasNestedContent ? "treegrid" : "grid"), Ht = rn({
2305
- label: o != null && o.header ? dn(o)("header") : null,
2306
- defaultFallback: "data grid"
2307
- }), De = S(() => {
2308
- var R;
2309
- return ((R = Ae.value) == null ? void 0 : R.length) ?? 0;
2310
- }), Vt = S(() => t.bulkActions && De.value > 0), Zt = (R) => k(O.COLUMN_RESIZE, R), jt = (R) => {
2311
- k(O.UPDATE_SORT_BY, R), k(O.SORT, R);
2312
- }, qt = (R, B) => {
2313
- k(O.NAVIGATE, R), k(O.UPDATE_PAGINATION, {
2314
- ...t.pagination,
2315
- size: B,
2316
- page: R
2317
- });
2318
- }, Yt = (R) => {
2319
- k(O.ITEMS_PAGE, R);
2320
- }, Xt = () => {
2321
- k(O.FILTER_SEARCH_CLEAR);
2322
- }, Jt = (R) => {
2323
- k(O.UPDATE_FILTER_SEARCH_TERM, R), k(O.FILTER_SEARCH_INPUT, R);
2324
- }, xe = S(() => f.value.some((R) => R.mandatory));
2325
- xe.value || tt(
2326
- "WARNING: At least one BentoDataGrid column should be set as mandatory to ensure data is always displayed correctly."
2327
- );
2328
- const Fe = Me(un, () => null);
2329
- return Fe(t.tabTitle), e({ onEmptyStateClearResetButtonClick: Ne }), { __sfc: !0, props: t, slots: o, body: l, columnsRef: r, columnHeaderRefs: _, gridcellRefs: u, filtersRef: m, filterBarRef: v, verticalScrollPositionRef: c, virtualHorizontalScrollbarRef: i, allowColumnDragAndDrop: a, columns: f, columnPanel: L, data: C, lazyLoadType: b, loading: y, hasNestedContent: A, selectable: z, selection: T, selectableAcrossPages: p, stickyPagination: h, outline: w, pagination: x, hoveredRowIndex: g, t: F, frozenColumnsLength: I, registerDatagridInDataGridTemplate: N, isDataGridTemplate: $, stickyTabs: M, tabsRef: D, computedColumnsTabIndex: j, columnDefs: re, onColumnWidthOverride: he, gridColumnWidthStyle: d, isMeasuringColumnWidths: P, isTotalWidthOfColumnsTakingUpAllAvailableGridWidth: X, localColumnsState: K, totalWidthOfAllColumns: le, definedEmitsFunction: n, emit: k, stickyFiltersHeight: ae, computedStickyFiltersTopPosition: fe, columnHeadersHeight: de, computedColumnHeadersTopPosition: ge, sortedColumns: ce, columnSets: ie, isOnlyOneVisibleColumn: ut, onConfigSettingsUpdate: ft, onConfigSettingsColumnsUpdate: gt, onConfigSettingsColumnUpdate: _t, hoveredOverColumn: vt, hoveredOverColumnState: Ct, draggingColumns: mt, draggingEventsForColumns: ht, draggingEventsForRowCell: pt, onMoveColumnByOffset: St, onAllRowSelect: Lt, onRowSelect: Et, selectedItems: Ae, allItemsSelectedState: bt, navigationInput: yt, isLazyLoad: pe, isInfiniteScroll: Ot, verticalScrollPosition: Ie, emitLazyLoadEvent: Rt, updateScrollPosition: wt, updateScrollPositionOnFrozenColumnsNavigation: At, syncVirtualScrollerWithBody: It, hasLeftOverflow: Se, hasRightOverflow: Te, horizontalScrollbarConditionalClasses: Tt, onEmptyStateClearResetButtonClick: Ne, limitedEmptyStateProps: Nt, conditionalGridClasses: Dt, conditionalGridBodyClasses: xt, computedColumnPanelAlignment: Ft, showFrozenColumnsSeparator: Mt, conditionalFilterClasses: Pt, conditionalPaginationClasses: zt, registerColumnHeaderRefs: Bt, registerRowCellRefs: $t, onRowClick: Ut, onCellHover: kt, selectableAcrossPagesComputed: Wt, ariaGridRole: Gt, ariaGridHeaderText: Ht, itemsSelectedCounter: De, showActionBar: Vt, onColumnResized: Zt, onSort: jt, onPaginationNavigate: qt, onItemsPerPageChange: Yt, onSearchTermCleared: Xt, onSearchTermInput: Jt, hasMandatoryColumn: xe, setTitle: Fe, BentoActionBar: ln, BentoPagination: an, BentoLoadingIndicator: et, BentoTypography: me, BentoDataGridConfigSettings: Xs, DataGridColumns: xs, DataGridLazyLoad: no, DataGridRow: Ao, BentoDatagridEvent: O, BentoEmptyState: cn, BentoFilterBar: ve };
2330
- }
2331
- });
2332
- var ko = function() {
2333
- var o;
2334
- var e = this, n = e._self._c, t = e._self._setupProxy;
2335
- return n("div", { staticClass: "b-data-grid", class: t.conditionalGridClasses, attrs: { "aria-rowcount": t.data.length, "aria-colcount": t.columns.length, "aria-label": t.ariaGridHeaderText, role: t.ariaGridRole } }, [e.filters ? n("div", { ref: "filtersRef", staticClass: "b-data-grid__filters", class: t.conditionalFilterClasses, style: { top: t.computedStickyFiltersTopPosition } }, [e.filters ? n(t.BentoFilterBar, { ref: "filterBarRef", attrs: { config: e.filters, "filter-values": e.filterValues, "search-term": e.filterSearchTerm }, on: { "search-input": t.onSearchTermInput, "search-clear": t.onSearchTermCleared, input: (l) => e.$emit(t.BentoDatagridEvent.UPDATE_FILTERS, l), "update:filter-values": (l) => e.$emit(t.BentoDatagridEvent.UPDATE_FILTER_VALUES, l) } }) : e._e()], 1) : e._e(), e.$slots.header ? n("div", { staticClass: "b-data-grid__header" }, [e._t("header")], 2) : e._e(), n("div", { staticClass: "b-data-grid__column-headers", style: { top: t.computedColumnHeadersTopPosition } }, [t.columnPanel ? n(t.BentoDataGridConfigSettings, { staticClass: "b-data-grid__config-settings", attrs: { columns: t.localColumnsState, condensed: e.condensed }, on: { "config-settings": t.onConfigSettingsUpdate, "update:columns": t.onConfigSettingsColumnsUpdate } }) : e._e(), n("div", { ref: "columnsRef", staticClass: "b-data-grid__columns-row", attrs: { role: "rowgroup", tabindex: t.computedColumnsTabIndex }, on: { scroll: t.updateScrollPosition } }, [n("div", { staticClass: "b-data-grid__columns", style: t.gridColumnWidthStyle, attrs: { role: "row" } }, [e._l(t.columnSets, function({ columnSet: l, id: r, isFrozenColumns: _ }, u) {
2336
- return [l != null && l.length ? n(t.DataGridColumns, e._g({ key: `data-grid-columns-${r}`, ref: (m) => t.registerColumnHeaderRefs(m), refInFor: !0, attrs: { columns: l, "has-resizable-columns": e.hasResizableColumns, "sort-by": e.sortBy, "all-items-selected-state": t.allItemsSelectedState, "is-frozen-columns": _, "show-frozen-columns-separator": t.showFrozenColumnsSeparator, "dragging-columns": t.draggingColumns, "has-draggable-columns": t.allowColumnDragAndDrop, "has-column-panel": t.columnPanel, "has-left-overflow": t.hasLeftOverflow, "has-first-column-panel-right-aligned": u === t.computedColumnPanelAlignment, "hovered-over-column-state": t.hoveredOverColumnState, "is-measuring-column-widths": t.isMeasuringColumnWidths, "is-only-one-visible-column": t.isOnlyOneVisibleColumn, selectable: t.selectable, "selectable-across-pages": t.selectableAcrossPagesComputed, "truncate-column-headers": e.truncateColumnHeaders }, on: { "column-hover": function(m) {
2337
- t.hoveredOverColumn = m;
2338
- }, "column-move": t.onMoveColumnByOffset, "column-update": t.onConfigSettingsColumnUpdate, "column-resize": t.onColumnResized, "column-resizing": t.onColumnWidthOverride, "select-all-rows": t.onAllRowSelect, "select-all-across-pages": function(m) {
2339
- return t.emit(t.BentoDatagridEvent.SELECT_ALL_ACROSS_PAGES);
2340
- }, sort: t.onSort }, scopedSlots: e._u([e._l(t.slots, function(m, v) {
2341
- return { key: v, fn: function(c) {
2342
- return [e._t(v, null, null, c)];
2343
- } };
2344
- })], null, !0) }, t.draggingEventsForColumns)) : e._e()];
2345
- })], 2)])], 1), n("div", { ref: "body", staticClass: "b-data-grid__body", class: t.conditionalGridBodyClasses, attrs: { "data-testid": "data-grid-body", tabindex: t.loading ? "0" : "-1", "aria-busy": t.loading, "aria-live": "polite" }, on: { scroll: t.updateScrollPosition } }, [t.loading && !t.isLazyLoad ? n("div", { staticClass: "b-data-grid__loading" }, [n(t.BentoLoadingIndicator, { staticClass: "b-data-grid__loading-indicator", attrs: { large: "" } }), n(t.BentoTypography, { attrs: { el: "span", variant: "caption" } }, [e._v(e._s(t.t("gettingYourData")))])], 1) : ((o = t.data) == null ? void 0 : o.length) === 0 && e.emptyState ? n("div", { staticClass: "b-data-grid__empty-state" }, [n(t.BentoEmptyState, e._b({}, "bento-empty-state", t.limitedEmptyStateProps, !1))], 1) : n("div", { staticClass: "b-data-grid__rows", attrs: { role: "rowgroup" }, on: { keydown: t.navigationInput } }, e._l(t.data, function(l, r) {
2346
- var _, u;
2347
- return n(t.DataGridRow, { key: r, ref: (m) => t.registerRowCellRefs(m, r), refInFor: !0, style: t.gridColumnWidthStyle, attrs: { "allow-row-clicks": e.allowRowClicks, "column-sets": t.columnSets, condensed: e.condensed, "dragging-columns": t.draggingColumns, "dragging-events-for-row-cell": t.draggingEventsForRowCell, "get-data-item-id": e.getDataItemId, "has-nested-content": t.hasNestedContent, "has-left-overflow": t.hasLeftOverflow, "highlighted-rows": e.highlightedRows, "hovered-row-index": t.hoveredRowIndex, "hovered-over-column-state": t.hoveredOverColumnState, "is-data-item-disabled": e.isDataItemDisabled, "is-row-last-child": r + 1 === ((_ = t.data) == null ? void 0 : _.length), "is-measuring-column-widths": t.isMeasuringColumnWidths, "row-data": l, "row-index": r, "row-set-size": (u = t.data) == null ? void 0 : u.length, "show-frozen-columns-separator": t.showFrozenColumnsSeparator, "should-show-nested-content": e.shouldShowNestedContent, selectable: t.selectable, "selected-items": t.selectedItems }, on: { "cell-hovered": t.onCellHover, "row-click": t.onRowClick, "on-frozen-columns-key-press": t.updateScrollPositionOnFrozenColumnsNavigation, "select-row": t.onRowSelect }, scopedSlots: e._u([e._l(t.slots, function(m, v) {
2348
- return { key: v, fn: function(c) {
2349
- return [e._t(v, null, null, c)];
2350
- } };
2351
- })], null, !0) });
2352
- }), 1)]), t.isLazyLoad ? n(t.DataGridLazyLoad, { attrs: { loading: t.loading, "is-infinite-scroll": t.isInfiniteScroll }, on: { "update:show-more": t.emitLazyLoadEvent } }) : e._e(), e.stickyHorizontalScrollbar ? n("div", { ref: "virtualHorizontalScrollbarRef", staticClass: "b-data-grid__horizontal-scrollbar", class: t.horizontalScrollbarConditionalClasses, attrs: { "aria-hidden": "true", "data-testid": "sticky-horizontal-scrollbar" }, on: { scroll: t.syncVirtualScrollerWithBody } }, [n("div", { style: { width: `${t.totalWidthOfAllColumns}px`, height: "15px" } })]) : e._e(), t.pagination && !t.isLazyLoad ? n("div", { staticClass: "b-data-grid__pagination", class: t.conditionalPaginationClasses, attrs: { "data-testid": "pagination-container" } }, [n(t.BentoPagination, e._b({ attrs: { "aria-label": `${t.ariaGridHeaderText} navigation` }, on: { navigate: t.onPaginationNavigate, "items-page": t.onItemsPerPageChange } }, "bento-pagination", t.pagination, !1))], 1) : e._e(), e.$slots.footer ? n("div", { staticClass: "b-data-grid__footer" }, [e._t("footer")], 2) : e._e(), t.showActionBar ? n(t.BentoActionBar, { attrs: { actions: e.bulkActions, "item-counter": t.itemsSelectedCounter, "extra-bottom-spacing": t.stickyPagination }, on: { close: function(l) {
2353
- return t.onAllRowSelect(!1);
2354
- } } }) : e._e()], 1);
2355
- }, Wo = [], Go = /* @__PURE__ */ W(
2356
- Uo,
2357
- ko,
2358
- Wo,
2359
- !1,
2360
- null,
2361
- "c48486f5"
2362
- );
2363
- const xl = Go.exports;
2364
- export {
2365
- Le as B,
2366
- Dl as a,
2367
- ne as b,
2368
- se as c,
2369
- xl as d,
2370
- O as e,
2371
- Ce as f
2372
- };
2373
- //# sourceMappingURL=data-grid.bti50Fs6.js.map