@adyen/bento-vue3 1.72.0 → 1.73.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 (95) hide show
  1. package/dist/@types/index.d.ts +25 -0
  2. package/dist/assets/accordion-item.css +1 -1
  3. package/dist/assets/action-bar.css +1 -1
  4. package/dist/assets/base-modal.css +1 -1
  5. package/dist/assets/button-actions.css +1 -1
  6. package/dist/assets/card.css +1 -1
  7. package/dist/assets/data-grid-template.css +1 -1
  8. package/dist/assets/data-grid.css +1 -1
  9. package/dist/assets/date-range-picker.css +1 -1
  10. package/dist/assets/dialog-page.css +1 -1
  11. package/dist/assets/dropdown.css +1 -1
  12. package/dist/assets/file-uploader.css +1 -1
  13. package/dist/assets/form-layout-title.css +1 -1
  14. package/dist/assets/input-field-phone-number.css +1 -1
  15. package/dist/assets/inspector.css +1 -1
  16. package/dist/assets/modal-fullscreen.css +1 -1
  17. package/dist/assets/radio-group.css +1 -1
  18. package/dist/assets/radio-input.css +1 -1
  19. package/dist/assets/segmented-control.css +1 -1
  20. package/dist/assets/sidepanel.css +1 -1
  21. package/dist/checkbox.js +2 -2
  22. package/dist/chunks/{checkbox-group.CcgOK4yt.js → checkbox-group.DdflEpl9.js} +2 -2
  23. package/dist/chunks/{checkbox-group.CcgOK4yt.js.map → checkbox-group.DdflEpl9.js.map} +1 -1
  24. package/dist/chunks/{checkbox.73QYC0y8.js → checkbox.C8g1CvTm.js} +18 -18
  25. package/dist/chunks/{checkbox.73QYC0y8.js.map → checkbox.C8g1CvTm.js.map} +1 -1
  26. package/dist/chunks/{code-snippet.DL_1HNKV.js → code-snippet.CrLlNrvo.js} +2 -2
  27. package/dist/chunks/{code-snippet.DL_1HNKV.js.map → code-snippet.CrLlNrvo.js.map} +1 -1
  28. package/dist/chunks/data-grid.DreajC_w.js +4069 -0
  29. package/dist/chunks/data-grid.DreajC_w.js.map +1 -0
  30. package/dist/chunks/{date-picker.Bkz4GmyC.js → date-picker.Dwx2Q5hg.js} +14 -14
  31. package/dist/chunks/{date-picker.Bkz4GmyC.js.map → date-picker.Dwx2Q5hg.js.map} +1 -1
  32. package/dist/chunks/{date-range-picker.9Zlg9xnH.js → date-range-picker.6mEJDgNr.js} +109 -106
  33. package/dist/chunks/date-range-picker.6mEJDgNr.js.map +1 -0
  34. package/dist/chunks/{dropdown-tag.hIiGmmBD.js → dropdown-tag.fEWQOFYE.js} +2 -2
  35. package/dist/chunks/{dropdown-tag.hIiGmmBD.js.map → dropdown-tag.fEWQOFYE.js.map} +1 -1
  36. package/dist/chunks/{dropdown.GyDAswAO.js → dropdown.DGpN3WNH.js} +271 -267
  37. package/dist/chunks/{dropdown.GyDAswAO.js.map → dropdown.DGpN3WNH.js.map} +1 -1
  38. package/dist/chunks/es6.MoTTyETW.js.map +1 -1
  39. package/dist/chunks/{filter-bar.BLhRZzJa.js → filter-bar.DajTlHPO.js} +7 -7
  40. package/dist/chunks/{filter-bar.BLhRZzJa.js.map → filter-bar.DajTlHPO.js.map} +1 -1
  41. package/dist/chunks/{form-layout-title.DdRqnXXi.js → form-layout-title.DzwxO39t.js} +19 -11
  42. package/dist/chunks/form-layout-title.DzwxO39t.js.map +1 -0
  43. package/dist/chunks/{header-with-views.afPw_Czi.js → header-with-views.Dav18t9C.js} +3 -3
  44. package/dist/chunks/{header-with-views.afPw_Czi.js.map → header-with-views.Dav18t9C.js.map} +1 -1
  45. package/dist/chunks/{input-field-password.JZkGOiMd.js → input-field-password.L64foAS-.js} +3 -3
  46. package/dist/chunks/{input-field-password.JZkGOiMd.js.map → input-field-password.L64foAS-.js.map} +1 -1
  47. package/dist/chunks/{input-field-phone-number.CF5P0_yu.js → input-field-phone-number.DoJXn0mQ.js} +202 -199
  48. package/dist/chunks/{input-field-phone-number.CF5P0_yu.js.map → input-field-phone-number.DoJXn0mQ.js.map} +1 -1
  49. package/dist/chunks/{input-field.2S8zBviE.js → input-field.CDtTOgw7.js} +2 -2
  50. package/dist/chunks/{input-field.2S8zBviE.js.map → input-field.CDtTOgw7.js.map} +1 -1
  51. package/dist/chunks/{pagination.NDwXq6fh.js → pagination.CmOEkbVb.js} +2 -2
  52. package/dist/chunks/{pagination.NDwXq6fh.js.map → pagination.CmOEkbVb.js.map} +1 -1
  53. package/dist/chunks/{radio-group.BNiif4On.js → radio-group.CX9lqMeM.js} +57 -55
  54. package/dist/chunks/radio-group.CX9lqMeM.js.map +1 -0
  55. package/dist/chunks/{radio-input.odN9FOyr.js → radio-input.CBNE-AkM.js} +13 -14
  56. package/dist/chunks/radio-input.CBNE-AkM.js.map +1 -0
  57. package/dist/chunks/{rich-text-editor.D770fUpS.js → rich-text-editor.Cjb5BGaV.js} +2 -2
  58. package/dist/chunks/{rich-text-editor.D770fUpS.js.map → rich-text-editor.Cjb5BGaV.js.map} +1 -1
  59. package/dist/chunks/{search-bar.rZ_38y4j.js → search-bar.DP713Pmh.js} +3 -3
  60. package/dist/chunks/{search-bar.rZ_38y4j.js.map → search-bar.DP713Pmh.js.map} +1 -1
  61. package/dist/chunks/{secondary-nav.BBE8HyDR.js → secondary-nav.B1R_oNdP.js} +2 -2
  62. package/dist/chunks/{secondary-nav.BBE8HyDR.js.map → secondary-nav.B1R_oNdP.js.map} +1 -1
  63. package/dist/chunks/{selection-card-group.KK9ZPqiU.js → selection-card-group.Bo3xkW0P.js} +9 -9
  64. package/dist/chunks/{selection-card-group.KK9ZPqiU.js.map → selection-card-group.Bo3xkW0P.js.map} +1 -1
  65. package/dist/code-snippet.js +1 -1
  66. package/dist/data-grid.js +1 -1
  67. package/dist/date-picker.js +1 -1
  68. package/dist/date-range-picker.js +1 -1
  69. package/dist/dropdown.js +2 -2
  70. package/dist/filter-bar.js +1 -1
  71. package/dist/form-layout.js +1 -1
  72. package/dist/header-with-views.js +1 -1
  73. package/dist/index.js +21 -21
  74. package/dist/input-field-password.js +1 -1
  75. package/dist/input-field-phone-number.js +1 -1
  76. package/dist/input-field.js +1 -1
  77. package/dist/pagination.js +1 -1
  78. package/dist/radio-group.js +2 -2
  79. package/dist/rich-text-editor.js +1 -1
  80. package/dist/search-bar.js +2 -2
  81. package/dist/secondary-nav.js +1 -1
  82. package/dist/selection-card.js +1 -1
  83. package/dist/styles/bento-dark.css +20 -13
  84. package/dist/styles/bento-light.css +4 -1
  85. package/dist/styles/bento.css +4 -1
  86. package/dist/styles/legacy.css +4 -1
  87. package/dist/styles/styleguide.css +4 -1
  88. package/dist/web-types.json +1 -1
  89. package/package.json +4 -4
  90. package/dist/chunks/data-grid._xo6LEB-.js +0 -4010
  91. package/dist/chunks/data-grid._xo6LEB-.js.map +0 -1
  92. package/dist/chunks/date-range-picker.9Zlg9xnH.js.map +0 -1
  93. package/dist/chunks/form-layout-title.DdRqnXXi.js.map +0 -1
  94. package/dist/chunks/radio-group.BNiif4On.js.map +0 -1
  95. package/dist/chunks/radio-input.odN9FOyr.js.map +0 -1
@@ -0,0 +1,4069 @@
1
+ import { ref as S, onMounted as Ke, nextTick as be, watch as Ee, onUnmounted as vn, reactive as Et, toRefs as pt, computed as w, watchEffect as Cl, onBeforeUpdate as wl, createElementBlock as A, openBlock as c, mergeProps as oe, createCommentVNode as B, createElementVNode as T, toDisplayString as Y, defineComponent as Ue, inject as Me, normalizeClass as re, Fragment as we, renderList as Le, unref as l, toHandlers as ft, createBlock as H, withCtx as G, createVNode as X, renderSlot as ke, withModifiers as bl, normalizeStyle as We, resolveComponent as Te, withDirectives as St, createTextVNode as me, vShow as _l, toRef as wt, resolveDirective as yl, Transition as mn, createSlots as qe, resolveDynamicComponent as Je, useSlots as Lt, provide as dt, withKeys as Bt, normalizeProps as El, guardReactiveProps as pl } from "vue";
2
+ import { C as Sl } from "./checkmark-circle-fill._6-d40ru.js";
3
+ import { W as Ll } from "./warning-filled.BMGD0G-_.js";
4
+ /* empty css */
5
+ import { _ as de } from "./_plugin-vue_export-helper.CHgC5LLL.js";
6
+ import { C as hn } from "./cross.B92GxFTY.js";
7
+ import { N as Wt } from "./minus-small.DYIyF5XW.js";
8
+ import { E as Ie, b as Rl, T as Al, B as Ol } from "./tooltip.CEHc6lzU.js";
9
+ import { d as Tl } from "./popper-container.5cq-eu41.js";
10
+ import { B as Il } from "./dashed-underline.28J-9i5D.js";
11
+ import { B as Qe, p as Cn } from "./typography.yBEME_Gu.js";
12
+ import { u as Ge } from "./i18n.B6g5VX0q.js";
13
+ import { B as Nl } from "./action-bar.DDLTN9TB.js";
14
+ import { B as Dl } from "./pagination.CmOEkbVb.js";
15
+ import { B as Rt } from "./loading-indicator.VHi5tbZa.js";
16
+ import { u as At } from "./use-has-slot.B7eQSabc.js";
17
+ import { u as $l } from "./aria-label.CaUURpnB.js";
18
+ import { g as kl } from "./get-slot-text.DQlZEsId.js";
19
+ import { B as Ct } from "./filter-bar.DajTlHPO.js";
20
+ import { B as Ml } from "./empty-state.BsKJ-1pT.js";
21
+ import { E as Ul } from "./tabs.keys.Cb4Vw5Jh.js";
22
+ import { D as zl } from "./data-grid-template.keys.2_AkxuNT.js";
23
+ import { b as Fl } from "./index.E60QniEu.js";
24
+ import { o as Ot } from "./resize.Bqks3WUm.js";
25
+ import { f as bt, c as Tt, h as Pl, a as Ht, b as Gt, O as Vt, D as Bl } from "./button-actions.D1eBtYgZ.js";
26
+ import { B as wn } from "./button.C-MAa6ut.js";
27
+ import { B as bn } from "./toggle.C8k7NQ7y.js";
28
+ import { B as Wl } from "./search-bar.DP713Pmh.js";
29
+ import { B as Hl } from "./directive.Cbdox5VL.js";
30
+ import { u as Gl } from "./dropdown.DGpN3WNH.js";
31
+ import { g as _t } from "./generate-uid.NJ8tVoha.js";
32
+ import { S as Vl } from "./search.PczW-onY.js";
33
+ import { B as ut } from "./checkbox.C8g1CvTm.js";
34
+ import { B as xl } from "./info-icon.CRnO5lpq.js";
35
+ import { B as xt } from "./popover.types.Bp97CGc4.js";
36
+ import { A as Zl } from "./dialog-page.1ZVnUqpT.js";
37
+ import { H as jl, S as ql } from "./show.CT4Augxb.js";
38
+ import { l as Zt } from "./events.CMzGybJJ.js";
39
+ import { b as _n } from "./focus-trap.CpNGD7PH.js";
40
+ import { u as Kl } from "./use-expandable-content-height.GkjjbmPy.js";
41
+ import { E as jt } from "./link.cwPmWlsk.js";
42
+ import { C as qt } from "./copy.Da1OGFTr.js";
43
+ import { C as Yl } from "./chevron-down.DCQ6ZLaq.js";
44
+ import { C as Jl } from "./chevron-up.kfuLRpZb.js";
45
+ import "../assets/data-grid.css";
46
+ const Kt = (e) => {
47
+ if (!e)
48
+ return 0;
49
+ const s = window.getComputedStyle(e);
50
+ let i = e.offsetHeight;
51
+ const t = window.getComputedStyle(e, "::after");
52
+ if (t.content !== "none" && t.position === "absolute") {
53
+ const n = parseFloat(t.height), o = parseFloat(t.bottom);
54
+ !isNaN(n) && !isNaN(o) && o < 0 && o + n <= 0 && (i += n);
55
+ }
56
+ const u = parseFloat(s.top);
57
+ return !isNaN(u) && u < 0 && (i += u), i;
58
+ }, Yt = (e, s, i = S(!1), t = null) => {
59
+ const u = S(0);
60
+ let n = null, o = null;
61
+ const v = () => {
62
+ const g = s.value ? Kt(e.value) : 0, C = i.value && t ? Kt(t.value) : 0;
63
+ u.value = g + C;
64
+ };
65
+ return Ke(() => {
66
+ be(() => {
67
+ const g = Ee(
68
+ e,
69
+ () => {
70
+ e != null && e.value && (be(() => g()), n = Ot(e.value, v), o = new MutationObserver(v), o.observe(e.value, { attributes: !0, attributeFilter: ["class"] }));
71
+ },
72
+ { immediate: !0 }
73
+ );
74
+ Ee(
75
+ [s, i],
76
+ () => {
77
+ v();
78
+ },
79
+ { immediate: !0 }
80
+ );
81
+ });
82
+ }), vn(() => {
83
+ n == null || n.disconnect(), o == null || o.disconnect();
84
+ }), u;
85
+ };
86
+ var yt = /* @__PURE__ */ ((e) => (e.WRAP = "wrap", e.ELLIPSIS = "ellipsis", e))(yt || {}), $e = /* @__PURE__ */ ((e) => (e.OUTLINE = "outline", e.SCROLL = "scroll", e.STICKY_FILTERS = "sticky-filters", e.OVERFLOW_SHADOW_LEFT = "overflow-shadow-left", e.OVERFLOW_SHADOW_RIGHT = "overflow-shadow-right", e.NO_SPACING_TOP = "no-spacing-top", e.FIT_CONTENT = "fit-content", e.ZEBRA_ROWS = "zebra-rows", e))($e || {}), He = /* @__PURE__ */ ((e) => (e.ASCENDING = "asc", e.DESCENDING = "desc", e))(He || {}), F = /* @__PURE__ */ ((e) => (e.COLUMNS = "columns", e.COLUMN_RESIZE = "column-resize", e.ITEMS_PAGE = "items-page", e.NAVIGATE = "navigate", e.NESTED_CONTENT_TOGGLED = "nested-content-toggled", e.FILTER_SEARCH_INPUT = "filter-search-input", e.FILTER_SEARCH_CLEAR = "filter-search-clear", e.UPDATE_COLUMNS = "update:columns", e.UPDATE_CONDENSED = "update:condensed", e.UPDATE_FILTERS = "update:filters", e.UPDATE_FILTER_VALUES = "update:filter-values", e.UPDATE_FILTER_VALUES_OBJECT = "update:filter-values-object", e.UPDATE_FILTER_SEARCH_TERM = "update:filter-search-term", e.UPDATE_PAGINATION = "update:pagination", e.UPDATE_SELECTION = "update:selection", e.UPDATE_SHOW_MORE = "update:show-more", e.UPDATE_SORT_BY = "update:sort-by", e.UPDATE_ZEBRA_ROWS = "update:zebra-rows", e.ROW_CLICK = "row-click", e.SELECT = "select", e.SELECT_ALL_ACROSS_PAGES = "select-all-across-pages", e.SORT = "sort", e))(F || {}), ct = /* @__PURE__ */ ((e) => (e.ASCENDING = "ascending", e.DESCENDING = "descending", e.NONE = "none", e))(ct || {}), le = /* @__PURE__ */ ((e) => (e.COLUMN_RESIZE = "column-resize", e.COLUMN_RESIZING = "column-resizing", e.SELECT_ALL_ROWS = "select-all-rows", e.SELECT_ALL_ACROSS_PAGES = "select-all-across-pages", e.DESELECT_ALL = "deselect-all", e.COLUMN_MOVE = "column-move", e.COLUMN_UPDATE = "column-update", e.COLUMN_MENU_OPEN = "column-menu-open", e.COLUMN_MENU_CLOSE = "column-menu-close", e.COLUMN_HOVER = "column-hover", e.COLUMN_DRAG_START = "column-dragstart", e.COLUMN_DRAG_ENTER = "column-dragenter", e.COLUMN_DRAG_END = "column-dragend", e.COLUMN_DROP = "column-drop", e))(le || {});
87
+ const Xl = (e, s) => {
88
+ const i = S(null), t = S(!1), u = S(void 0), n = e.value.reduce(($, k) => ($[k.field] = null, $), {}), o = Et(n), v = pt(o);
89
+ let g = 0, C = "";
90
+ const L = w(
91
+ () => Object.fromEntries(e.value.map(({ field: $, width: k, minWidth: E }) => [$, { width: k, minWidth: E }]))
92
+ );
93
+ Cl(() => u.value = L.value);
94
+ let O = null, D = null;
95
+ const _ = ($) => {
96
+ const k = $.clientX - g, E = C, b = u.value[E].width + k;
97
+ u.value[E].width = b > L.value[E].minWidth ? b : L.value[E].minWidth, s(le.COLUMN_RESIZING, u.value), g = $.clientX;
98
+ }, d = () => {
99
+ t.value = !1, O == null || O(), D == null || D(), C && s(le.COLUMN_RESIZE, {
100
+ field: C,
101
+ width: u.value[C].width
102
+ }), O = null, D = null, C = "", g = null;
103
+ }, I = ($, k, E) => {
104
+ if (E.preventDefault(), $) {
105
+ if (t.value = !0, E.buttons !== 1) {
106
+ d();
107
+ return;
108
+ }
109
+ C = k, g = E.clientX, O = Zt(window, "mousemove", _), D = Zt(window, "mouseup", d);
110
+ }
111
+ };
112
+ return Ee(
113
+ () => t.value,
114
+ ($, k) => {
115
+ !$ && k && (s(le.COLUMN_HOVER, i.value), i.value = null);
116
+ }
117
+ ), {
118
+ resizeData: u,
119
+ allColumnRefs: v,
120
+ startResize: I,
121
+ isResizing: t,
122
+ columnHoverEventToEmitAfterResizing: i
123
+ };
124
+ }, Ql = 100, Jt = 50, ye = "b-actions-column", eo = 32, to = 56, no = 56, lo = 80, oo = 36, so = 1, yn = 16, ao = 20, io = (e, s, i) => {
125
+ const t = {}, u = [], n = (v) => {
126
+ const g = t[v];
127
+ g && g.frozen !== !0 && (t[v].frozen = !0, u.push(v));
128
+ };
129
+ function o() {
130
+ if (u.length === i.length)
131
+ return;
132
+ const v = { min: {} };
133
+ let g = e, C = s, L = 0;
134
+ u.forEach((O) => {
135
+ g -= t[O].computedWidth, C -= t[O].flex;
136
+ });
137
+ for (let O = 0, D = i.length; O < D; O += 1) {
138
+ const _ = i[O];
139
+ if (t[_.field] && t[_.field].frozen === !0)
140
+ continue;
141
+ let I = g / C * _.flex;
142
+ I < _.minWidth && (L += _.minWidth - I, I = _.minWidth, v.min[_.field] = !0), t[_.field] = {
143
+ frozen: !1,
144
+ computedWidth: I,
145
+ flex: _.flex
146
+ };
147
+ }
148
+ L > 0 ? Object.keys(v.min).forEach((O) => {
149
+ n(O);
150
+ }) : i.forEach(({ field: O }) => {
151
+ n(O);
152
+ }), o();
153
+ }
154
+ return o(), t;
155
+ }, Xt = (e, s) => {
156
+ let i = so;
157
+ return s && (i += yn * 2), e != null && e.offsetWidth ? e.offsetWidth + i : 0;
158
+ }, ro = (e) => {
159
+ var s, i, t, u, n;
160
+ return (s = e == null ? void 0 : e.hasNestedContent) != null && s.value || (i = e == null ? void 0 : e.hasNestedRows) != null && i.value ? (t = e == null ? void 0 : e.hasSelectableColumn) != null && t.value ? (u = e == null ? void 0 : e.hasSelectableAcrossPages) != null && u.value ? lo : no : oo : (n = e == null ? void 0 : e.hasSelectableAcrossPages) != null && n.value ? to : eo;
161
+ }, uo = (e, s, i, t, u, n) => {
162
+ const o = S(e.value), v = S(s), g = S(i), C = S(t), L = S(u), O = S(!1), D = S(0);
163
+ Ee(
164
+ () => e.value,
165
+ (m, h) => {
166
+ var V, ue;
167
+ const z = (m == null ? void 0 : m.map(({ field: se }) => se).toString()) === (h == null ? void 0 : h.map(({ field: se }) => se).toString());
168
+ if (!((V = n == null ? void 0 : n.allowColumnDragAndDrop) != null && V.value) || !z) {
169
+ o.value = e.value;
170
+ return;
171
+ }
172
+ o.value = ((ue = o.value) == null ? void 0 : ue.length) === 0 ? e.value : e.value.sort((se, pe) => {
173
+ const he = o.value.findIndex((Ce) => Ce.field === se.field), ce = o.value.findIndex((Ce) => Ce.field === pe.field);
174
+ return he === -1 ? 1 : ce === -1 ? -1 : he - ce;
175
+ });
176
+ }
177
+ );
178
+ const _ = S();
179
+ let d = null;
180
+ const I = w(() => {
181
+ var he, ce, Ce;
182
+ const m = [];
183
+ let h = 0, z = 0;
184
+ const V = {};
185
+ let ue = o.value.filter((te) => te.visible !== !1);
186
+ const se = o.value.filter((te) => te.visible === !1);
187
+ if ((he = n == null ? void 0 : n.hasSelectableColumn) != null && he.value || (ce = n == null ? void 0 : n.hasNestedContent) != null && ce.value || (Ce = n == null ? void 0 : n.hasNestedRows) != null && Ce.value) {
188
+ const te = ro(n);
189
+ ue = [
190
+ {
191
+ field: ye,
192
+ label: "",
193
+ minWidth: te,
194
+ width: te,
195
+ frozen: !0,
196
+ padding: { left: !1, right: !1 }
197
+ },
198
+ ...ue
199
+ ];
200
+ }
201
+ ue.forEach((te) => {
202
+ const x = { ...te };
203
+ let Re;
204
+ x.flex && x.flex > 0 ? (h += x.flex, Re = 0, m.push(x)) : Re = Math.max(
205
+ (x == null ? void 0 : x.width) ?? Ql,
206
+ (x == null ? void 0 : x.minWidth) ?? Jt
207
+ ), z += Re, x.width = Re, x.minWidth = (x == null ? void 0 : x.minWidth) ?? Jt, V[x.field] = x;
208
+ }), z += D.value;
209
+ const pe = Math.max(_.value - z, 0);
210
+ if (h > 0 && _.value > 0) {
211
+ const te = io(pe, h, m);
212
+ Object.keys(te).forEach((x) => {
213
+ V[x].width = te[x].computedWidth;
214
+ });
215
+ }
216
+ return se.forEach((te) => {
217
+ const x = { ...te };
218
+ V[x.field] = x;
219
+ }), Object.values(V);
220
+ }), $ = S(void 0), k = (m) => {
221
+ $.value = { ...$.value, ...m };
222
+ }, E = async () => {
223
+ o.value.some((m) => m == null ? void 0 : m.autoWidth) && (O.value = !0, await be(), await be(), o == null || o.value.filter((m) => m == null ? void 0 : m.autoWidth).forEach(({ field: m, minWidth: h }) => {
224
+ var se, pe, he, ce;
225
+ const z = Xt(
226
+ (se = C.value) == null ? void 0 : se[m],
227
+ (pe = n == null ? void 0 : n.hasColumnPanel) == null ? void 0 : pe.value
228
+ ), V = (ce = (he = L.value) == null ? void 0 : he[m]) == null ? void 0 : ce.reduce(
229
+ (Ce, te) => Math.max(Ce, Xt(te)),
230
+ 0
231
+ ), ue = Math.max(z, V ?? 0);
232
+ (h === void 0 || ue > h) && k({
233
+ [m]: {
234
+ width: ue
235
+ }
236
+ });
237
+ }), O.value = !1);
238
+ };
239
+ Ee([() => o.value, () => v.value], async () => {
240
+ o.value.some((m) => m == null ? void 0 : m.autoWidth) && await E();
241
+ });
242
+ const b = w(
243
+ () => I.value.map((m) => {
244
+ var h, z;
245
+ return {
246
+ ...m,
247
+ // Override column width with resized ones
248
+ width: ((z = (h = $.value) == null ? void 0 : h[m.field]) == null ? void 0 : z.width) ?? m.width
249
+ };
250
+ })
251
+ ), a = w(
252
+ () => {
253
+ var m;
254
+ return ((m = b.value) == null ? void 0 : m.filter(({ visible: h }) => h !== !1).reduce((h, z) => z.width + h, 0)) + D.value;
255
+ }
256
+ ), p = w(
257
+ () => _.value <= a.value
258
+ ), f = w(() => ({
259
+ width: _.value > a.value ? "100%" : "fit-content"
260
+ }));
261
+ return Ke(() => {
262
+ var h;
263
+ const m = n != null && n.isDataGridTemplate ? ao : 0;
264
+ be(() => {
265
+ g.value && (_.value = g.value.getBoundingClientRect().width - m);
266
+ const z = Ee(
267
+ g,
268
+ () => {
269
+ g.value && (be(() => z()), d = Ot(g.value, ({ width: V }) => {
270
+ _.value = V - m;
271
+ }));
272
+ },
273
+ { immediate: !0 }
274
+ );
275
+ }), (h = document == null ? void 0 : document.fonts) != null && h.ready ? document.fonts.ready.then(() => {
276
+ E();
277
+ }) : E();
278
+ }), vn(() => {
279
+ d == null || d.disconnect();
280
+ }), wl(() => {
281
+ var m;
282
+ L.value && ((m = Object.keys(L.value)) == null ? void 0 : m.length) > 0 && Object.keys(L.value).forEach((z) => {
283
+ L.value[z] = [];
284
+ });
285
+ }), {
286
+ columnDefs: b,
287
+ gridRowWidthStyle: f,
288
+ onColumnWidthOverride: k,
289
+ isMeasuringColumnWidths: O,
290
+ isTotalWidthOfColumnsTakingUpAllAvailableGridWidth: p,
291
+ columns: o,
292
+ totalWidthOfAllColumns: a,
293
+ rowActionsMaxWidth: D
294
+ };
295
+ }, co = (e, s, i, t, u, n, o) => {
296
+ const v = S(e.value ?? []), g = Et({
297
+ allItemsSelected: !1,
298
+ isIndeterminate: !1
299
+ }), C = w(
300
+ () => i.value.flatMap((b) => {
301
+ var a;
302
+ return [b, ((a = b == null ? void 0 : b.children) == null ? void 0 : a.length) > 0 ? b == null ? void 0 : b.children : []];
303
+ }).flat()
304
+ ), L = w(
305
+ () => {
306
+ var b, a;
307
+ return ((b = i.value) == null ? void 0 : b.length) > 0 && ((a = C.value) == null ? void 0 : a.filter((p) => !u(p)).every((p) => v.value.includes(t(p))));
308
+ }
309
+ ), O = w(() => {
310
+ var b;
311
+ return !(n != null && n.value) || ((b = o == null ? void 0 : o.value) == null ? void 0 : b.totalCount) === void 0 ? !1 : v.value.length === o.value.totalCount;
312
+ }), D = () => {
313
+ s(F.SELECT, v.value), s(F.UPDATE_SELECTION, v.value);
314
+ }, _ = (b) => {
315
+ var a, p, f;
316
+ if (v.value = b, L.value) {
317
+ g.allItemsSelected = !0;
318
+ const m = ((a = i.value) == null ? void 0 : a.length) > 0 && i.value.every((h) => v.value.includes(t(h)));
319
+ g.isIndeterminate = (n == null ? void 0 : n.value) && !O.value || !m;
320
+ } else
321
+ g.allItemsSelected = !1, g.isIndeterminate = ((p = v.value) == null ? void 0 : p.length) > 0 && ((f = i.value) == null ? void 0 : f.length) > 0 && i.value.some(
322
+ (m) => {
323
+ var h;
324
+ return v.value.includes(t(m)) || ((h = m == null ? void 0 : m.children) == null ? void 0 : h.some((z) => v.value.includes(t(z))));
325
+ }
326
+ );
327
+ }, d = (b) => {
328
+ be(() => {
329
+ var a, p, f;
330
+ if (g.allItemsSelected = b, b) {
331
+ v.value = (p = (a = C.value) == null ? void 0 : a.filter(
332
+ (h) => !u(h) && ((h == null ? void 0 : h.children) === void 0 || h.children.every((z) => !u(z)))
333
+ )) == null ? void 0 : p.map((h) => t(h));
334
+ const m = ((f = i.value) == null ? void 0 : f.length) > 0 && i.value.every((h) => v.value.includes(t(h)));
335
+ g.isIndeterminate = (n == null ? void 0 : n.value) && !O.value || v.value.length > 0 && !m;
336
+ } else
337
+ v.value = [], g.isIndeterminate = !1;
338
+ D();
339
+ });
340
+ }, I = () => {
341
+ be(() => {
342
+ _([]), D();
343
+ });
344
+ }, $ = (b, a) => {
345
+ be(() => {
346
+ var p;
347
+ _(((p = a == null ? void 0 : a.children) == null ? void 0 : p.length) > 0 ? k(b, a) : b), D();
348
+ });
349
+ }, k = (b, a) => {
350
+ var m;
351
+ const p = t(a), f = (m = a.children) == null ? void 0 : m.filter((h) => !u(h)).map((h) => t(h));
352
+ if (b.includes(p)) {
353
+ const h = b;
354
+ return f.forEach((z) => {
355
+ h.includes(z) || h.push(z);
356
+ }), h;
357
+ }
358
+ return b.filter((h) => !f.includes(h));
359
+ }, E = (b, a, p) => {
360
+ be(() => {
361
+ var m, h;
362
+ const f = t(a);
363
+ b.includes(t(p)) ? _(
364
+ !b.includes(f) && ((m = a == null ? void 0 : a.children) != null && m.every((z) => b.includes(t(z)))) ? [...b, f] : b
365
+ ) : _(
366
+ b.includes(f) && !((h = a == null ? void 0 : a.children) != null && h.every((z) => b.includes(t(z)))) ? b.filter((z) => z !== f) : b
367
+ ), D();
368
+ });
369
+ };
370
+ return Ee(
371
+ () => e.value,
372
+ () => {
373
+ _(e.value ?? []);
374
+ },
375
+ { immediate: !0 }
376
+ ), Ee(
377
+ () => i.value,
378
+ () => {
379
+ const b = i.value.filter((a) => v.value.includes(t(a))).flatMap(
380
+ (a) => {
381
+ var p;
382
+ return ((p = a == null ? void 0 : a.children) == null ? void 0 : p.length) > 0 ? a.children.map((f) => t(f)).filter((f) => !v.value.includes(f)) : [];
383
+ }
384
+ );
385
+ (b == null ? void 0 : b.length) > 0 ? (_([...v.value, ...b]), D()) : _(v.value);
386
+ }
387
+ ), {
388
+ onAllRowSelect: d,
389
+ onRowSelect: $,
390
+ onNestedRowSelect: E,
391
+ onDeselectAll: I,
392
+ allItemsSelectedState: g,
393
+ selectedItems: v,
394
+ isEveryItemSelected: L,
395
+ isEveryItemAcrossPagesSelected: O
396
+ };
397
+ }, fo = (e, s, i) => ({ isSorting: (o) => e.value.some((v) => v.field === o), getSortingDirection: (o) => {
398
+ var v;
399
+ return (v = e.value.find((g) => g.field === o)) == null ? void 0 : v.direction;
400
+ }, sortByColumnField: (o) => {
401
+ var C;
402
+ if (!s.value.some((L) => L.field === o && L.sortable))
403
+ return;
404
+ const g = [{
405
+ field: o,
406
+ direction: ((C = e.value.find((L) => L.field === o)) == null ? void 0 : C.direction) === He.ASCENDING ? He.DESCENDING : He.ASCENDING
407
+ }];
408
+ i("sort", g);
409
+ } });
410
+ var _e = ((e) => (e[e.ARROW_DOWN = Ie.ARROW_DOWN] = "ARROW_DOWN", e[e.ARROW_UP = Ie.ARROW_UP] = "ARROW_UP", e[e.ARROW_LEFT = Ie.ARROW_LEFT] = "ARROW_LEFT", e[e.ARROW_RIGHT = Ie.ARROW_RIGHT] = "ARROW_RIGHT", e[e.PAGE_UP = Ie.PAGE_UP] = "PAGE_UP", e[e.PAGE_DOWN = Ie.PAGE_DOWN] = "PAGE_DOWN", e[e.END = Ie.END] = "END", e[e.HOME = Ie.HOME] = "HOME", e))(_e || {});
411
+ const Xe = "b-row-actions-column", go = (e, s, i, t, u, n) => {
412
+ const o = w(() => n.value || t.value ? !0 : i.value.some((E) => E.infoIconTooltip || E.sortable)), v = w(() => {
413
+ let E = i.value.filter(({ visible: b }) => b !== !1);
414
+ return u.value && (E = [
415
+ ...E,
416
+ { field: Xe, label: "" }
417
+ ]), E;
418
+ }), g = w(() => v.value.length), C = w(() => {
419
+ if (!e.value)
420
+ return [];
421
+ const E = Object.keys(e.value)[0];
422
+ if (!E || !e.value[E])
423
+ return [];
424
+ const b = [];
425
+ if (o.value)
426
+ for (const p of v.value) {
427
+ const f = s.value[p.field];
428
+ b.push(f);
429
+ }
430
+ const a = e.value[E].length;
431
+ for (let p = 0; p < a; p++)
432
+ for (const f of v.value) {
433
+ const m = e.value[f.field];
434
+ m != null && m[p] && b.push(m[p]);
435
+ }
436
+ return b;
437
+ }), L = (E) => Math.floor(E / g.value), O = (E, b, a) => {
438
+ const p = C.value.length - 1, f = g.value - 1, m = L(E), h = E - g.value * m;
439
+ return {
440
+ [_e.PAGE_UP]: h + (o.value ? g.value : 0),
441
+ [_e.PAGE_DOWN]: p - f + h,
442
+ [_e.END]: a ? p : g.value * m + f,
443
+ [_e.HOME]: a ? o.value ? g.value : 0 : g.value * m
444
+ }[b];
445
+ }, D = (E, b) => {
446
+ const a = L(E), f = {
447
+ [_e.ARROW_DOWN]: g.value,
448
+ [_e.ARROW_UP]: a === 0 && !o.value ? 0 : -g.value,
449
+ [_e.ARROW_LEFT]: -1,
450
+ [_e.ARROW_RIGHT]: 1
451
+ }[b], m = E + f;
452
+ return m < 0 || m >= C.value.length ? E : m;
453
+ }, _ = (E) => [
454
+ _e.PAGE_UP,
455
+ _e.PAGE_DOWN,
456
+ _e.END,
457
+ _e.HOME
458
+ ].includes(E), d = (E, b, a) => {
459
+ const p = C.value.indexOf(E);
460
+ return _(b) ? O(p, b, a) : D(p, b);
461
+ }, I = (E, b, a) => {
462
+ if (!C.value.includes(E))
463
+ return;
464
+ const p = d(E, b, a);
465
+ C.value[p].focus();
466
+ }, $ = (E) => E in _e;
467
+ return {
468
+ isNavigationKeyCode: $,
469
+ focusOnNextGridcell: I,
470
+ navigationInput: (E) => {
471
+ const { ctrlKey: b, key: a, target: p } = E, f = a;
472
+ let m = p;
473
+ m.getAttribute("role") !== "menuitem" && (C.value.includes(m) || (m = p.closest('[role="gridcell"], [role="columnheader"]')), C.value.includes(m) && $(f) && I(m, f, b));
474
+ }
475
+ };
476
+ }, vo = 90, mo = (e, s, i, t, u) => {
477
+ const n = S(e), o = S(s), v = S(i), g = S(t), C = w(() => n.value !== "none"), L = w(() => n.value === "automatic"), O = () => {
478
+ u(F.UPDATE_SHOW_MORE);
479
+ };
480
+ return Ee(
481
+ () => o.value,
482
+ () => {
483
+ L.value && v.value.offsetHeight / o.value * 100 > vo && !g.value && O();
484
+ }
485
+ ), { isLazyLoad: C, isInfiniteScroll: L, verticalScrollPosition: o, emitLazyLoadEvent: O };
486
+ }, ho = (e, s, i) => {
487
+ const t = S(e), u = S(s), n = Et({
488
+ dragging: null,
489
+ dragToLeft: null,
490
+ target: null
491
+ }), o = (_, d = 0) => {
492
+ const I = t.value.findIndex((E) => E.field === _.field), $ = I + d;
493
+ if ($ < 0 || $ > t.value.length - 1)
494
+ return;
495
+ const k = [...t.value];
496
+ k.splice($, 0, k.splice(I, 1)[0]), i(F.COLUMNS, k), i(F.UPDATE_COLUMNS, k);
497
+ }, v = (_, d) => {
498
+ n.dragging = _, d.dataTransfer.setData("text", ""), d.dataTransfer.dropEffect = "move";
499
+ }, g = (_, d) => {
500
+ n.target = _;
501
+ const I = d.currentTarget.getBoundingClientRect(), $ = I.left + I.width / 2, k = d.clientX ?? 0;
502
+ n.dragToLeft = k <= $;
503
+ }, C = (_) => {
504
+ var d, I;
505
+ if (((d = n.dragging) == null ? void 0 : d.field) !== _.field) {
506
+ const $ = t.value.findIndex((f) => {
507
+ var m;
508
+ return f.field === ((m = n.dragging) == null ? void 0 : m.field);
509
+ }), k = t.value.findIndex((f) => f.field === _.field), E = n.dragToLeft ? k : k + 1, b = E > $ ? E - 1 : E;
510
+ let a = [...t.value];
511
+ a.splice(
512
+ b === -1 ? 0 : b,
513
+ 0,
514
+ a.splice($, 1)[0]
515
+ );
516
+ const p = t.value.findIndex((f) => !(f != null && f.frozen));
517
+ ((I = n.dragging) == null ? void 0 : I.frozen) !== _.frozen && E !== p && (a = a.map(
518
+ (f) => {
519
+ var m;
520
+ return ((m = n.dragging) == null ? void 0 : m.field) === f.field ? { ...f, frozen: !!(_ != null && _.frozen) } : f;
521
+ }
522
+ )), i(F.COLUMNS, a), i(F.UPDATE_COLUMNS, a);
523
+ }
524
+ n.dragging = null, n.target = null;
525
+ }, L = () => {
526
+ n.dragging = null, n.dragToLeft = null, n.target = null;
527
+ }, O = w(() => u.value ? {
528
+ [le.COLUMN_DRAG_START]: (_, d) => v(_, d),
529
+ [le.COLUMN_DRAG_ENTER]: (_, d) => g(_, d),
530
+ [le.COLUMN_DROP]: (_) => C(_),
531
+ [le.COLUMN_DRAG_END]: () => L()
532
+ } : {}), D = w(() => (_) => u.value ? {
533
+ dragenter: (d) => {
534
+ d.preventDefault(), g(_, d);
535
+ },
536
+ drop: () => {
537
+ C(_);
538
+ },
539
+ dragover: (d) => {
540
+ d.preventDefault();
541
+ }
542
+ } : {});
543
+ return {
544
+ // Values
545
+ draggingColumns: n,
546
+ // Methods
547
+ draggingEventsForColumns: O,
548
+ draggingEventsForRowCell: D,
549
+ onMoveColumnByOffset: o
550
+ };
551
+ }, Co = (e, s, i) => {
552
+ const t = S(e), u = S(s.value), n = w(
553
+ () => [...t.value].sort((d, I) => d.frozen === I.frozen ? 0 : d.frozen ? -1 : 1)
554
+ ), o = w(
555
+ () => n.value.filter((d) => d.frozen && d.visible !== !1)
556
+ ), v = w(
557
+ () => n.value.filter((d) => !d.frozen && d.visible !== !1)
558
+ ), g = w(
559
+ () => [
560
+ { columnSet: o.value, id: "frozen", isFrozenColumns: !0 },
561
+ { columnSet: v.value, id: "unfrozen" }
562
+ ].filter(({ columnSet: d }) => d.length)
563
+ ), C = w(
564
+ () => t.value.filter((d) => (d == null ? void 0 : d.visible) !== !1 && (d == null ? void 0 : d.field) !== ye).length === 1
565
+ ), L = (d) => i(F.UPDATE_CONDENSED, d), O = (d) => {
566
+ u.value = d, i(F.UPDATE_ZEBRA_ROWS, d);
567
+ }, D = (d) => {
568
+ i(F.COLUMNS, d), i(F.UPDATE_COLUMNS, d);
569
+ }, _ = (d) => {
570
+ const I = n.value.map(
571
+ ($) => ($ == null ? void 0 : $.field) === d.field ? d : $
572
+ );
573
+ D(I);
574
+ };
575
+ return Ee(s, (d) => {
576
+ u.value = d;
577
+ }), {
578
+ // Values
579
+ columnSets: g,
580
+ isOnlyOneVisibleColumn: C,
581
+ internalZebraRows: u,
582
+ sortedColumns: n,
583
+ // Methods
584
+ onConfigSettingsColumnsUpdate: D,
585
+ onConfigSettingsColumnUpdate: _,
586
+ onConfigSettingsCondensedUpdate: L,
587
+ onConfigSettingsZebraRowsUpdate: O
588
+ };
589
+ }, wo = (e, s, i, t, u, n, o) => {
590
+ const v = S(0), g = S(!1), C = S(!1);
591
+ Ee([() => v.value, () => n.value], ([d]) => {
592
+ e.value.scrollLeft = d, s.value.scrollLeft = d, g.value = !!d, C.value = s.value.scrollWidth - s.value.offsetWidth > d;
593
+ }), Ke(async () => {
594
+ var d, I;
595
+ await be(), await be(), ((d = s.value) == null ? void 0 : d.offsetWidth) < ((I = s.value) == null ? void 0 : I.scrollWidth) && (C.value = !0);
596
+ });
597
+ const L = (d) => {
598
+ if (v.value = d.target.scrollLeft, i.value = e.value.scrollHeight - d.target.scrollTop, t != null && t.value) {
599
+ const I = d.target.scrollLeft;
600
+ t.value.scrollLeft !== I && (t.value.scrollLeft = I);
601
+ }
602
+ }, O = (d) => {
603
+ d.key === "Tab" || d.key !== "ArrowRight" && d.key !== "ArrowLeft" || (d.preventDefault(), e.value.scrollLeft = 0, e.value.style.overflowX = "hidden", setTimeout(() => {
604
+ e.value && (e.value.style.overflowX = "auto");
605
+ }));
606
+ }, D = (d) => {
607
+ const I = d.target.scrollLeft;
608
+ e.value.scrollLeft !== I && (e.value.scrollLeft = I);
609
+ }, _ = w(() => {
610
+ var d, I, $, k;
611
+ return (d = o == null ? void 0 : o.pagination) != null && d.value && ((I = o == null ? void 0 : o.stickyPagination) != null && I.value || o != null && o.isDataGridTemplate) && !(($ = o == null ? void 0 : o.isLazyLoad) != null && $.value) ? { bottom: `${(((k = u.value) == null ? void 0 : k.clientHeight) ?? 0) + 1}px` } : {};
612
+ });
613
+ return {
614
+ // Values
615
+ scrollLeftPosition: v,
616
+ hasLeftOverflow: g,
617
+ hasRightOverflow: C,
618
+ horizontalScrollbarConditionalStyles: _,
619
+ // Methods
620
+ updateScrollPosition: L,
621
+ updateScrollPositionOnFrozenColumnsNavigation: O,
622
+ syncVirtualScrollerWithBody: D
623
+ };
624
+ }, bo = (e, s, i, t) => {
625
+ const u = S(null), n = w(() => {
626
+ var I, $, k, E;
627
+ if (!u.value || u.value.field === ye)
628
+ return {
629
+ hoveredOverColumnField: "",
630
+ isSeparatorOffset: !1,
631
+ noBorderLeft: !1,
632
+ noBorderRight: !1
633
+ };
634
+ const o = ($ = (I = e.value.find((b) => b.isFrozenColumns)) == null ? void 0 : I.columnSet) == null ? void 0 : $.filter((b) => b.field !== ye), v = e.value.find((b) => !(b != null && b.isFrozenColumns)), g = u.value.frozen && (o == null ? void 0 : o[0].field) === u.value.field, C = !u.value.frozen && ((k = v == null ? void 0 : v.columnSet) == null ? void 0 : k[0].field) === u.value.field, L = (s.value || i.value) && g, O = (s.value || i.value) && !o && C, D = o && C, _ = (o == null ? void 0 : o.length) > 0 && u.value.frozen && (o == null ? void 0 : o[o.length - 1].field) === u.value.field, d = i.value && t.value && !u.value.frozen && ((E = v == null ? void 0 : v.columnSet) == null ? void 0 : E[v.columnSet.length - 1].field) === u.value.field;
635
+ return {
636
+ hoveredOverColumnField: u.value.field,
637
+ isSeparatorOffset: d,
638
+ noBorderLeft: !!L || !!O || !!D,
639
+ noBorderRight: !!_ || !!d
640
+ };
641
+ });
642
+ return {
643
+ hoveredOverColumn: u,
644
+ hoveredOverColumnState: n
645
+ };
646
+ }, It = (e) => {
647
+ const i = _n(e).filter((t) => t.node !== e);
648
+ return (i == null ? void 0 : i.length) > 0 ? (i[0].node.focus(), !0) : !1;
649
+ }, Ze = (e) => {
650
+ const s = _n(e), i = s == null ? void 0 : s.filter((t) => t.node !== e);
651
+ if ((i == null ? void 0 : i.length) > 0)
652
+ return i.forEach((t) => t.node.setAttribute("tabindex", "-1")), i;
653
+ }, En = (e) => {
654
+ (e == null ? void 0 : e.length) > 0 && e.forEach((s) => s == null ? void 0 : s.node.setAttribute("tabindex", "0"));
655
+ }, Qt = () => {
656
+ const e = window.getSelection().getRangeAt(0).cloneContents(), s = e.querySelectorAll('[role="row"]');
657
+ let i = "<table>", t = "";
658
+ const u = (n) => {
659
+ n.forEach((o) => {
660
+ const v = o.closest("[role]").getAttribute("role") === "gridcell" ? "td" : "th", g = o.textContent.trim();
661
+ g && (i += `<${v}>${g}</${v}>`, t += `${g} `);
662
+ });
663
+ };
664
+ if (!s.length) {
665
+ const n = e.querySelectorAll(
666
+ '[role="gridcell"] > .b-typography:first-of-type, [role="columnheader"] .b-typography'
667
+ );
668
+ if (n.length)
669
+ i += "<tr>", u(n), i += "</tr>";
670
+ else {
671
+ navigator.clipboard.writeText(e.textContent);
672
+ return;
673
+ }
674
+ }
675
+ s.forEach((n) => {
676
+ const o = n.querySelectorAll(
677
+ '[role="gridcell"] > .b-typography:first-of-type, [role="columnheader"] .b-typography'
678
+ );
679
+ if (i += "<tr>", o.length)
680
+ u(o);
681
+ else {
682
+ const v = n.textContent.trim();
683
+ i += `<td>${v}</td>`, t += `${v} `;
684
+ }
685
+ i += "</tr>", t += `
686
+ `;
687
+ }), i += "</table>", navigator.clipboard.write([
688
+ new ClipboardItem({
689
+ "text/html": new Blob([i], { type: "text/html" }),
690
+ "text/plain": new Blob([t || e.textContent.trim()], { type: "text/plain" })
691
+ })
692
+ ]);
693
+ };
694
+ let en = 0;
695
+ const _o = {
696
+ beforeCreate() {
697
+ this.uuid = en.toString(), en += 1;
698
+ }
699
+ }, yo = { key: 0 }, Eo = ["clip-path"], po = ["id"];
700
+ function So(e, s, i, t, u, n) {
701
+ return c(), A("svg", oe({ role: "img" }, e.$attrs, {
702
+ class: "ui-assets-icons-16",
703
+ xmlns: "http://www.w3.org/2000/svg",
704
+ width: "16",
705
+ height: "16",
706
+ fill: "none"
707
+ }), [
708
+ e.$attrs["svg-title"] ? (c(), A("title", yo, Y(e.$attrs["svg-title"]), 1)) : B("", !0),
709
+ T("g", {
710
+ fill: "#001222",
711
+ "clip-path": "url(#uia-ui-assets/icons-16-arrow_up_down_sort__a" + e.uuid + ")"
712
+ }, s[0] || (s[0] = [
713
+ T("path", { d: "M9.06077 4.00011L5.00011 -0.0605469L0.939453 4.00011L2.00011 5.06077L4.25 2.81089V10.75H5.75V2.81066L8.00011 5.06077L9.06077 4.00011Z" }, null, -1),
714
+ T("path", { d: "M10.25 13.1893L8.00011 10.9395L6.93945 12.0001L11.0001 16.0608L15.0608 12.0001L14.0001 10.9395L11.75 13.1896V5.25H10.25V13.1893Z" }, null, -1)
715
+ ]), 8, Eo),
716
+ T("defs", null, [
717
+ T("clipPath", {
718
+ id: "uia-ui-assets/icons-16-arrow_up_down_sort__a" + e.uuid
719
+ }, s[1] || (s[1] = [
720
+ T("rect", {
721
+ width: "16",
722
+ height: "16",
723
+ fill: "#fff"
724
+ }, null, -1)
725
+ ]), 8, po)
726
+ ])
727
+ ], 16);
728
+ }
729
+ const Lo = /* @__PURE__ */ de(_o, [["render", So]]);
730
+ let tn = 0;
731
+ const Ro = {
732
+ beforeCreate() {
733
+ this.uuid = tn.toString(), tn += 1;
734
+ }
735
+ }, Ao = { key: 0 };
736
+ function Oo(e, s, i, t, u, n) {
737
+ return c(), A("svg", oe({ role: "img" }, e.$attrs, {
738
+ class: "ui-assets-icons-16",
739
+ xmlns: "http://www.w3.org/2000/svg",
740
+ width: "16",
741
+ height: "16",
742
+ fill: "none"
743
+ }), [
744
+ e.$attrs["svg-title"] ? (c(), A("title", Ao, Y(e.$attrs["svg-title"]), 1)) : B("", !0),
745
+ s[0] || (s[0] = T("path", {
746
+ fill: "#001222",
747
+ 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"
748
+ }, null, -1))
749
+ ], 16);
750
+ }
751
+ const To = /* @__PURE__ */ de(Ro, [["render", Oo]]);
752
+ let nn = 0;
753
+ const Io = {
754
+ beforeCreate() {
755
+ this.uuid = nn.toString(), nn += 1;
756
+ }
757
+ }, No = { key: 0 }, Do = ["clip-path"], $o = ["id"];
758
+ function ko(e, s, i, t, u, n) {
759
+ return c(), A("svg", oe({ role: "img" }, e.$attrs, {
760
+ class: "ui-assets-icons-16",
761
+ xmlns: "http://www.w3.org/2000/svg",
762
+ width: "16",
763
+ height: "16",
764
+ fill: "none"
765
+ }), [
766
+ e.$attrs["svg-title"] ? (c(), A("title", No, Y(e.$attrs["svg-title"]), 1)) : B("", !0),
767
+ T("g", {
768
+ "clip-path": "url(#uia-ui-assets/icons-16-freeze__a" + e.uuid + ")"
769
+ }, s[0] || (s[0] = [
770
+ T("path", {
771
+ fill: "#001222",
772
+ d: "M10.5605 14.5L9.94434 13.8838C9.6002 13.5397 9.18722 13.3072 8.75 13.1836V10.9336L10.1689 10.1162L11.6865 10.9941L12.1094 12.5605C12.1146 12.5821 12.1182 12.6044 12.124 12.626L12.1553 12.7441L12.3496 13.4688L13.7988 13.0801L13.6162 12.4004L13.6201 12.3984L13.5547 12.1592C13.4254 11.5178 13.8153 10.878 14.4561 10.7061L14.5742 10.6748L15.2988 10.4805L14.9102 9.03125L14.2295 9.21387L14.2285 9.20996L13.5049 9.40625L12.4346 9.69531L10.9199 8.81836V7.18262L12.8633 6.05762C13.1889 6.37496 13.597 6.61697 14.0674 6.74316L14.1855 6.77441L14.9102 6.96875L15.2988 5.52051L14.5742 5.32617L14.4561 5.29395C13.7894 5.11503 13.3935 4.4294 13.5723 3.7627L13.6045 3.64453L13.7988 2.91992L12.3496 2.53125L12.1553 3.25586L12.124 3.37402C11.9979 3.84406 12.0018 4.31824 12.1133 4.75879L10.1689 5.88477L8.75 5.06738V2.81738C9.18731 2.69384 9.60013 2.46036 9.94434 2.11621L10.5605 1.5L9.5 0.439453L8.88379 1.05566C8.39567 1.54362 7.60433 1.54362 7.11621 1.05566L6.5 0.439453L5.43945 1.5L6.05566 2.11621C6.39987 2.46036 6.81269 2.69384 7.25 2.81738V5.06738L5.83105 5.88477L3.88574 4.75879C3.99724 4.31819 4.00207 3.84412 3.87598 3.37402L3.84473 3.25586L3.65039 2.53125L2.20117 2.91992L2.39551 3.64453L2.42773 3.7627C2.60651 4.42942 2.21066 5.11507 1.54395 5.29395L1.42578 5.32617L0.701172 5.52051L1.08984 6.96875L1.81445 6.77441L1.93262 6.74316C2.40275 6.61703 2.81018 6.37474 3.13574 6.05762L5.08008 7.18262V8.81836L3.13574 9.94336C2.81015 9.62622 2.40287 9.38399 1.93262 9.25781L1.81445 9.22559L1.08984 9.03125L0.701172 10.4805L1.42578 10.6748L1.54395 10.7061C2.2106 10.8849 2.60644 11.5706 2.42773 12.2373L2.39551 12.3555L2.20117 13.0801L3.65039 13.4688L3.84473 12.7441L3.87598 12.626C4.00207 12.1559 3.99723 11.6817 3.88574 11.2412L5.83105 10.1162L7.25 10.9336V13.1836C6.81278 13.3072 6.3998 13.5397 6.05566 13.8838L5.43945 14.5L6.5 15.5605L7.11621 14.9443C7.60433 14.4564 8.39567 14.4564 8.88379 14.9443L9.5 15.5605L10.5605 14.5ZM6.58008 8.81641V7.18262L8 6.36426L9.41992 7.18262V8.81641L8 9.63477L6.58008 8.81641Z"
773
+ }, null, -1)
774
+ ]), 8, Do),
775
+ T("defs", null, [
776
+ T("clipPath", {
777
+ id: "uia-ui-assets/icons-16-freeze__a" + e.uuid
778
+ }, s[1] || (s[1] = [
779
+ T("rect", {
780
+ width: "16",
781
+ height: "16",
782
+ fill: "#fff",
783
+ transform: "matrix(1 0 0 -1 0 16)"
784
+ }, null, -1)
785
+ ]), 8, $o)
786
+ ])
787
+ ], 16);
788
+ }
789
+ const pn = /* @__PURE__ */ de(Io, [["render", ko]]);
790
+ let ln = 0;
791
+ const Mo = {
792
+ beforeCreate() {
793
+ this.uuid = ln.toString(), ln += 1;
794
+ }
795
+ }, Uo = { key: 0 }, zo = ["clip-path"], Fo = ["id"];
796
+ function Po(e, s, i, t, u, n) {
797
+ return c(), A("svg", oe({ role: "img" }, e.$attrs, {
798
+ class: "ui-assets-icons-16",
799
+ xmlns: "http://www.w3.org/2000/svg",
800
+ width: "16",
801
+ height: "16",
802
+ fill: "none"
803
+ }), [
804
+ e.$attrs["svg-title"] ? (c(), A("title", Uo, Y(e.$attrs["svg-title"]), 1)) : B("", !0),
805
+ T("g", {
806
+ fill: "#001222",
807
+ "clip-path": "url(#uia-ui-assets/icons-16-sort_ascending__a" + e.uuid + ")"
808
+ }, s[0] || (s[0] = [
809
+ T("path", { d: "M12.0001 1.93945L16.0608 6.00011L15.0001 7.06077L12.75 4.81066V12.75H11.25V4.81089L9.00011 7.06077L7.93945 6.00011L12.0001 1.93945Z" }, null, -1),
810
+ T("path", { d: "M6.75 7.25H1.25V8.75H6.75V7.25Z" }, null, -1),
811
+ T("path", { d: "M1.25 11.25H8.75V12.75H1.25V11.25Z" }, null, -1),
812
+ T("path", { d: "M6.75 3.25H1.25V4.75H6.75V3.25Z" }, null, -1)
813
+ ]), 8, zo),
814
+ T("defs", null, [
815
+ T("clipPath", {
816
+ id: "uia-ui-assets/icons-16-sort_ascending__a" + e.uuid
817
+ }, s[1] || (s[1] = [
818
+ T("rect", {
819
+ width: "16",
820
+ height: "16",
821
+ fill: "#fff"
822
+ }, null, -1)
823
+ ]), 8, Fo)
824
+ ])
825
+ ], 16);
826
+ }
827
+ const Bo = /* @__PURE__ */ de(Mo, [["render", Po]]);
828
+ let on = 0;
829
+ const Wo = {
830
+ beforeCreate() {
831
+ this.uuid = on.toString(), on += 1;
832
+ }
833
+ }, Ho = { key: 0 }, Go = ["clip-path"], Vo = ["id"];
834
+ function xo(e, s, i, t, u, n) {
835
+ return c(), A("svg", oe({ role: "img" }, e.$attrs, {
836
+ class: "ui-assets-icons-16",
837
+ xmlns: "http://www.w3.org/2000/svg",
838
+ width: "16",
839
+ height: "16",
840
+ fill: "none"
841
+ }), [
842
+ e.$attrs["svg-title"] ? (c(), A("title", Ho, Y(e.$attrs["svg-title"]), 1)) : B("", !0),
843
+ T("g", {
844
+ fill: "#001222",
845
+ "clip-path": "url(#uia-ui-assets/icons-16-sort_descending__a" + e.uuid + ")"
846
+ }, s[0] || (s[0] = [
847
+ T("path", { d: "M12.75 3.25V11.1896L15.0001 8.93945L16.0608 10.0001L12.0001 14.0608L7.93945 10.0001L9.00011 8.93945L11.25 11.1893V3.25H12.75Z" }, null, -1),
848
+ T("path", { d: "M6.75 7.25H1.25V8.75H6.75V7.25Z" }, null, -1),
849
+ T("path", { d: "M1.25 3.25H9.09V4.75H1.25V3.25Z" }, null, -1),
850
+ T("path", { d: "M6.75 11.25H1.25V12.75H6.75V11.25Z" }, null, -1)
851
+ ]), 8, Go),
852
+ T("defs", null, [
853
+ T("clipPath", {
854
+ id: "uia-ui-assets/icons-16-sort_descending__a" + e.uuid
855
+ }, s[1] || (s[1] = [
856
+ T("rect", {
857
+ width: "16",
858
+ height: "16",
859
+ fill: "#fff"
860
+ }, null, -1)
861
+ ]), 8, Vo)
862
+ ])
863
+ ], 16);
864
+ }
865
+ const Zo = /* @__PURE__ */ de(Wo, [["render", xo]]);
866
+ let sn = 0;
867
+ const jo = {
868
+ beforeCreate() {
869
+ this.uuid = sn.toString(), sn += 1;
870
+ }
871
+ }, qo = { key: 0 };
872
+ function Ko(e, s, i, t, u, n) {
873
+ return c(), A("svg", oe({ role: "img" }, e.$attrs, {
874
+ class: "ui-assets-icons-16",
875
+ xmlns: "http://www.w3.org/2000/svg",
876
+ width: "16",
877
+ height: "16",
878
+ fill: "none"
879
+ }), [
880
+ e.$attrs["svg-title"] ? (c(), A("title", qo, Y(e.$attrs["svg-title"]), 1)) : B("", !0),
881
+ s[0] || (s[0] = T("path", {
882
+ fill: "#001222",
883
+ d: "M8 11.25L12.5 5.25H3.5L8 11.25Z"
884
+ }, null, -1))
885
+ ], 16);
886
+ }
887
+ const Yo = /* @__PURE__ */ de(jo, [["render", Ko]]), Sn = {
888
+ "en-US": {
889
+ columnActions: "{name} column actions",
890
+ deselectAll: "Deselect all",
891
+ freezeColumn: "Freeze column",
892
+ hideColumn: "Hide column",
893
+ moveColumnLeft: "Move column left",
894
+ moveColumnRight: "Move column right",
895
+ rowActionsColumn: "Row actions column",
896
+ selectAll: "Select all",
897
+ selectAllMenu: "Select all menu",
898
+ selectPage: "Select this page",
899
+ selectionMenu: "Selection menu",
900
+ showColumn: "Show column",
901
+ sortColumn: "Sort {name} column",
902
+ sortColumnInAscendingOrder: "Sort {name} column in ascending order",
903
+ sortColumnInDescendingOrder: "Sort {name} column in descending order",
904
+ unfreezeColumn: "Unfreeze column"
905
+ },
906
+ "ja-JP": {
907
+ freezeColumn: "列を固定",
908
+ hideColumn: "列を非表示",
909
+ moveColumnLeft: "列を左へ移動",
910
+ moveColumnRight: "列を右へ移動",
911
+ selectAll: "すべて選択",
912
+ unfreezeColumn: "列の固定を解除"
913
+ },
914
+ "pt-BR": {
915
+ freezeColumn: "Congelar coluna",
916
+ hideColumn: "Ocultar coluna",
917
+ moveColumnLeft: "Mover coluna para a esquerda",
918
+ moveColumnRight: "Mover coluna para a direita",
919
+ selectAll: "Selecionar tudo",
920
+ unfreezeColumn: "Descongelar coluna"
921
+ }
922
+ }, Ln = Symbol("data-grid slashed zero key"), et = Symbol("data-grid small container key"), gt = Symbol("data-grid touch device key"), Jo = ["aria-colindex", "aria-label", "aria-sort", "data-testid", "draggable", "tabindex"], Xo = { class: "b-data-grid-columns__select-column-menu-button" }, Qo = ["aria-label"], es = { class: "b-data-grid-columns__label" }, ts = {
923
+ key: 0,
924
+ class: "b-data-grid-columns__column-info-icon"
925
+ }, ns = {
926
+ key: 1,
927
+ class: "b-data-grid-columns__column-sort"
928
+ }, ls = ["data-testid", "onMousedown"], os = {
929
+ key: 0,
930
+ class: "b-data-grid-columns__column-separator"
931
+ }, ss = ["aria-label", "aria-colindex"], as = {
932
+ i18n: { messages: Sn },
933
+ name: "data-grid-columns"
934
+ }, is = /* @__PURE__ */ Ue({
935
+ ...as,
936
+ props: {
937
+ /**
938
+ * Column definitions using 'key' to relate to data object.
939
+ */
940
+ columns: {
941
+ type: Array,
942
+ required: !0
943
+ },
944
+ /**
945
+ * Columns being dragged, contains dragging column and a target column
946
+ */
947
+ draggingColumns: {
948
+ type: Object,
949
+ default: void 0
950
+ },
951
+ /**
952
+ * Toggle the columns draggable events.
953
+ */
954
+ hasDraggableColumns: {
955
+ type: Boolean,
956
+ default: !0
957
+ },
958
+ /**
959
+ * If resize is enabled
960
+ */
961
+ hasResizableColumns: {
962
+ type: Boolean,
963
+ default: !0
964
+ },
965
+ /**
966
+ * Signifies if the column panel is enabled.
967
+ */
968
+ hasColumnPanel: {
969
+ type: Boolean,
970
+ default: !1
971
+ },
972
+ /**
973
+ * If set to true, aligns the first column panel to the right of its button.
974
+ */
975
+ hasFirstColumnPanelRightAligned: {
976
+ type: Boolean,
977
+ default: !1
978
+ },
979
+ /**
980
+ * If the data grid has overflow on the left side
981
+ */
982
+ hasLeftOverflow: {
983
+ type: Boolean,
984
+ default: !1
985
+ },
986
+ /**
987
+ * The column hovered over state and whether the hovered over column should show a border right or left.
988
+ */
989
+ hoveredOverColumnState: {
990
+ type: Object,
991
+ required: !0
992
+ },
993
+ /**
994
+ * Toggled to true when the DataGrid has auto width columns and is measuring the
995
+ */
996
+ isMeasuringColumnWidths: {
997
+ type: Boolean,
998
+ default: !1
999
+ },
1000
+ /**
1001
+ * Used to disable hiding the last visible column.
1002
+ */
1003
+ isOnlyOneVisibleColumn: {
1004
+ type: Boolean,
1005
+ default: !1
1006
+ },
1007
+ /**
1008
+ * If these columns are frozen (pinned) columns
1009
+ */
1010
+ isFrozenColumns: {
1011
+ type: Boolean,
1012
+ default: !1
1013
+ },
1014
+ /**
1015
+ * Show frozen columns separator
1016
+ */
1017
+ showFrozenColumnsSeparator: {
1018
+ type: Boolean,
1019
+ default: !1
1020
+ },
1021
+ /**
1022
+ * The column all items selected state
1023
+ */
1024
+ allItemsSelectedState: {
1025
+ type: Object,
1026
+ default: void 0
1027
+ },
1028
+ /**
1029
+ * Determines if the user has enabled row selection
1030
+ */
1031
+ selectable: {
1032
+ type: Boolean,
1033
+ default: !1
1034
+ },
1035
+ /**
1036
+ * Adds an extra option when selecting all, to select items in other pages too
1037
+ */
1038
+ selectableAcrossPages: {
1039
+ type: Boolean,
1040
+ default: !1
1041
+ },
1042
+ /**
1043
+ * Determines which state of row selection is currently active. Used to display the "Select all" menu options.
1044
+ */
1045
+ selectionState: {
1046
+ type: String,
1047
+ default: void 0
1048
+ },
1049
+ /**
1050
+ * Sortby handles proper rendering of sort icon in header. Sorting currently is only supported server side.
1051
+ * It does make sure the currently sorted column has a more visible sort icon, and the sort icon points in the right direction.
1052
+ */
1053
+ sortBy: {
1054
+ type: Array,
1055
+ // NOTE: is an array to allow multi-sorting in the future
1056
+ default: () => []
1057
+ },
1058
+ /**
1059
+ * Truncates all data grid column headers
1060
+ */
1061
+ truncateColumnHeaders: {
1062
+ type: Boolean,
1063
+ default: !1
1064
+ },
1065
+ /**
1066
+ * The maximum width of the row actions in all rows
1067
+ */
1068
+ rowActionsMaximumWidth: {
1069
+ type: Number,
1070
+ default: 0
1071
+ }
1072
+ },
1073
+ emits: ["sort", "column-hover"],
1074
+ setup(e, { expose: s, emit: i }) {
1075
+ const t = e, u = i, n = 100, { t: o } = Ge({ messages: Sn }), { columns: v, sortBy: g } = pt(t), C = S(), L = S({}), O = S({}), D = S(), _ = S(), d = (r) => u(le.SELECT_ALL_ROWS, r), I = (r) => r.field === ye, $ = w(
1076
+ () => [
1077
+ t.selectionState !== "page" && {
1078
+ text: o("selectPage"),
1079
+ handler: () => d(!0)
1080
+ },
1081
+ {
1082
+ text: o("selectAll"),
1083
+ handler: () => u(le.SELECT_ALL_ACROSS_PAGES)
1084
+ },
1085
+ t.selectionState !== "none" && {
1086
+ text: o("deselectAll"),
1087
+ handler: () => u(le.DESELECT_ALL)
1088
+ }
1089
+ ].filter(Boolean)
1090
+ ), { startResize: k, isResizing: E, columnHoverEventToEmitAfterResizing: b } = Xl(v, u), { isSorting: a, getSortingDirection: p, sortByColumnField: f } = fo(g, v, u), m = (r) => {
1091
+ var fe;
1092
+ if (!r.sortable)
1093
+ return null;
1094
+ const W = (fe = t.sortBy.find(({ field: ge }) => ge === r.field)) == null ? void 0 : fe.direction;
1095
+ return W ? {
1096
+ [He.ASCENDING]: ct.ASCENDING,
1097
+ [He.DESCENDING]: ct.DESCENDING
1098
+ }[W] : ct.NONE;
1099
+ }, h = w(() => (r) => t.hasDraggableColumns ? {
1100
+ dragstart: (W) => {
1101
+ u(le.COLUMN_DRAG_START, r, W);
1102
+ },
1103
+ dragover: (W) => {
1104
+ W.preventDefault();
1105
+ },
1106
+ dragenter: (W) => {
1107
+ W.preventDefault(), u(le.COLUMN_DRAG_ENTER, r, W);
1108
+ },
1109
+ drop: () => {
1110
+ u(le.COLUMN_DROP, r);
1111
+ },
1112
+ dragend: () => {
1113
+ u(le.COLUMN_DRAG_END);
1114
+ }
1115
+ } : {}), z = w(
1116
+ () => (r) => [
1117
+ {
1118
+ text: o("moveColumnLeft"),
1119
+ handler: () => u(le.COLUMN_MOVE, r, -1),
1120
+ icon: Zl,
1121
+ disabled: t.columns[0].field === r.field
1122
+ },
1123
+ {
1124
+ text: o("moveColumnRight"),
1125
+ handler: () => u(le.COLUMN_MOVE, r, 1),
1126
+ icon: To,
1127
+ disabled: t.columns[t.columns.length - 1].field === r.field
1128
+ },
1129
+ !ce.value && {
1130
+ text: r != null && r.frozen ? o("unfreezeColumn") : o("freezeColumn"),
1131
+ handler: () => u(le.COLUMN_UPDATE, { ...r, frozen: !(r != null && r.frozen) }),
1132
+ icon: pn
1133
+ },
1134
+ {
1135
+ text: (r == null ? void 0 : r.visible) !== !1 ? o("hideColumn") : o("showColumn"),
1136
+ handler: () => {
1137
+ u(le.COLUMN_UPDATE, {
1138
+ ...r,
1139
+ visible: (r == null ? void 0 : r.visible) === !1
1140
+ });
1141
+ },
1142
+ icon: (r == null ? void 0 : r.visible) !== !1 ? jl : ql,
1143
+ disabled: (r == null ? void 0 : r.mandatory) || (r == null ? void 0 : r.visible) !== !1 && t.isOnlyOneVisibleColumn
1144
+ }
1145
+ ].filter(Boolean)
1146
+ ), V = (r) => {
1147
+ D.value = r.field, _.value && clearTimeout(_.value);
1148
+ }, ue = (r) => {
1149
+ const W = setTimeout(() => {
1150
+ r.field === D.value && (D.value = "");
1151
+ }, n);
1152
+ _.value = W;
1153
+ }, se = (r) => {
1154
+ let W = {
1155
+ mouseenter: () => {
1156
+ V(r), E.value ? b.value = r : u("column-hover", r);
1157
+ },
1158
+ mouseleave: () => {
1159
+ ue(r), E.value ? b.value = null : u("column-hover", null);
1160
+ },
1161
+ focus: () => {
1162
+ V(r), I(r) && It(L.value[r.field]);
1163
+ },
1164
+ focusout: (U) => {
1165
+ var fe;
1166
+ (fe = C.value) != null && fe.contains(U == null ? void 0 : U.relatedTarget) || ue(r);
1167
+ }
1168
+ };
1169
+ return I(r) || (W = {
1170
+ ...W,
1171
+ ...h.value(r)
1172
+ }), W;
1173
+ }, pe = (r) => r.infoIconTooltip || r.sortable || t.hasColumnPanel, he = (r, W) => {
1174
+ var U;
1175
+ ((U = L.value) == null ? void 0 : U[W]) === void 0 && (L.value = { ...L.value, [W]: null }), r !== null && (L.value[W] = r);
1176
+ }, ce = Me(
1177
+ et,
1178
+ w(() => !1)
1179
+ ), Ce = Me(gt, S(!1)), te = w(() => {
1180
+ var W;
1181
+ const r = {
1182
+ "b-data-grid-columns--is-measuring": t.isMeasuringColumnWidths
1183
+ };
1184
+ return (W = v.value[0]) != null && W.frozen && !ce.value ? {
1185
+ ...r,
1186
+ "b-data-grid-columns--frozen": !0,
1187
+ "b-data-grid-columns--frozen-separator": t.showFrozenColumnsSeparator,
1188
+ "b-data-grid-columns--overflow-shadow-left": t.hasLeftOverflow
1189
+ } : {
1190
+ ...r,
1191
+ "b-data-grid-columns--unfrozen": !0
1192
+ };
1193
+ }), x = w(() => ({
1194
+ "b-data-grid-columns__select-column--all": t.selectableAcrossPages
1195
+ })), Re = (r, W) => r && W === 0 ? xt.BOTTOM_START : xt.BOTTOM_END, R = (r, W) => {
1196
+ var U, fe, ge, Ve, y, M, J, ee, ne, ae;
1197
+ return {
1198
+ "b-data-grid-columns__column--column-hovered": r.field === t.hoveredOverColumnState.hoveredOverColumnField,
1199
+ "b-data-grid-columns__column--column-hovered-no-border-left": r.field === t.hoveredOverColumnState.hoveredOverColumnField && t.hoveredOverColumnState.noBorderLeft,
1200
+ "b-data-grid-columns__column--column-hovered-no-border-right": r.field === t.hoveredOverColumnState.hoveredOverColumnField && t.hoveredOverColumnState.noBorderRight,
1201
+ "b-data-grid-columns__column--last-frozen-frozen-column": t.isFrozenColumns && W === v.value.length - 1,
1202
+ "b-data-grid-columns__column--sortable": r.sortable,
1203
+ "b-data-grid-columns__column--padding-left-unset": ((U = r == null ? void 0 : r.padding) == null ? void 0 : U.left) === !1,
1204
+ "b-data-grid-columns__column--padding-right-unset": ((fe = r == null ? void 0 : r.padding) == null ? void 0 : fe.right) === !1,
1205
+ "b-data-grid-columns__column--numeric": r == null ? void 0 : r.numeric,
1206
+ "b-data-grid-columns__column--frozen": r == null ? void 0 : r.frozen,
1207
+ "b-data-grid-columns__column--is-re-ordering": (r == null ? void 0 : r.field) === ((Ve = (ge = t.draggingColumns) == null ? void 0 : ge.dragging) == null ? void 0 : Ve.field),
1208
+ "b-data-grid-columns__column--is-re-ordering-target-left": (r == null ? void 0 : r.field) === ((M = (y = t.draggingColumns) == null ? void 0 : y.target) == null ? void 0 : M.field) && ((J = t.draggingColumns) == null ? void 0 : J.dragToLeft),
1209
+ "b-data-grid-columns__column--is-re-ordering-target-right": (r == null ? void 0 : r.field) === ((ne = (ee = t.draggingColumns) == null ? void 0 : ee.target) == null ? void 0 : ne.field) && !((ae = t.draggingColumns) != null && ae.dragToLeft),
1210
+ "b-data-grid-columns__column--with-sorting-or-column-panel": r.sortable || r.infoIconTooltip || t.hasColumnPanel || t.selectableAcrossPages,
1211
+ "b-data-grid-columns--small-container": ce.value
1212
+ };
1213
+ }, j = (r) => ({
1214
+ "b-data-grid-columns__column-header-and-actions--numeric": r == null ? void 0 : r.numeric
1215
+ }), q = (r) => ({
1216
+ "b-data-grid-columns__column-actions--numeric": r == null ? void 0 : r.numeric
1217
+ }), K = (r) => ({
1218
+ "b-data-grid-columns__column-separator-container--is-resizeable": t.hasResizableColumns,
1219
+ "b-data-grid-columns__column-separator-container--is-offset": t.hoveredOverColumnState.hoveredOverColumnField === r.field && t.hoveredOverColumnState.isSeparatorOffset
1220
+ }), Ae = w(() => ({
1221
+ "b-data-grid-columns__column-header--truncated": t.truncateColumnHeaders
1222
+ })), ze = (r) => ({
1223
+ "b-data-grid-columns__menu--hovered": D.value === r.field || Ce.value
1224
+ });
1225
+ return s({
1226
+ columnHeaderRefs: L
1227
+ }), (r, W) => (c(), A("div", {
1228
+ ref_key: "allColumnsRef",
1229
+ ref: C,
1230
+ class: re(["b-data-grid-columns", te.value]),
1231
+ "data-testid": "data-grid-columns"
1232
+ }, [
1233
+ (c(!0), A(we, null, Le(l(v), (U, fe) => (c(), A("div", oe({
1234
+ key: U.field,
1235
+ ref_for: !0,
1236
+ ref: (ge) => he(ge, U.field),
1237
+ "aria-colindex": fe + 1,
1238
+ "aria-label": U.label,
1239
+ "aria-sort": m(U),
1240
+ class: [R(U, fe), "b-data-grid-columns__column"],
1241
+ "data-testid": `${U.field}-column-header`,
1242
+ draggable: e.hasDraggableColumns && !l(E) && !I(U),
1243
+ role: "columnheader",
1244
+ tabindex: U.sortable || e.hasColumnPanel || U.infoIconTooltip ? "0" : "-1",
1245
+ style: { width: U.autoWidth && e.isMeasuringColumnWidths ? "auto" : `${U.width}px` }
1246
+ }, ft(se(U), !0)), [
1247
+ I(U) && e.selectable ? (c(), A("div", {
1248
+ key: 0,
1249
+ class: re(["b-data-grid-columns__select-column", x.value])
1250
+ }, [
1251
+ e.selectableAcrossPages ? B("", !0) : (c(), H(l(ut), {
1252
+ key: 0,
1253
+ "aria-label": l(o)("selectAll"),
1254
+ "model-value": e.allItemsSelectedState.allItemsSelected,
1255
+ "data-testid": "checkbox-select-all",
1256
+ indeterminate: e.allItemsSelectedState.isIndeterminate,
1257
+ value: "data-grid-select-all",
1258
+ "onUpdate:modelValue": d
1259
+ }, null, 8, ["aria-label", "model-value", "indeterminate"])),
1260
+ e.selectableAcrossPages ? (c(), A(we, { key: 1 }, [
1261
+ e.selectionState === "all" ? (c(), H(l(ut), {
1262
+ key: 0,
1263
+ "aria-label": l(o)("deselectAll"),
1264
+ "model-value": e.allItemsSelectedState.allItemsSelected,
1265
+ "data-testid": "checkbox-deselect-all",
1266
+ value: "data-grid-deselect-all",
1267
+ class: "b-data-grid-columns__deselect-all-checkbox",
1268
+ onInput: W[0] || (W[0] = (ge) => r.$emit(l(le).DESELECT_ALL))
1269
+ }, null, 8, ["aria-label", "model-value"])) : (c(), H(l(bt), {
1270
+ key: 1,
1271
+ button: { variant: "tertiary", condensed: !0, "aria-label": l(o)("selectAllMenu") },
1272
+ data: $.value,
1273
+ class: "b-data-grid-columns__select-column-menu",
1274
+ "disable-arrow-down-opening-menu": "",
1275
+ "menu-fixed-positioning": "",
1276
+ "menu-position": "bottom-start"
1277
+ }, {
1278
+ iconLeft: G(() => [
1279
+ T("div", Xo, [
1280
+ X(l(ut), {
1281
+ indeterminate: e.allItemsSelectedState.isIndeterminate,
1282
+ "model-value": e.allItemsSelectedState.allItemsSelected,
1283
+ "aria-hidden": "true",
1284
+ class: "b-data-grid-columns__select-column-menu-checkbox",
1285
+ "data-testid": "checkbox-select-all",
1286
+ tabindex: "-1",
1287
+ value: "data-grid-select-all"
1288
+ }, null, 8, ["indeterminate", "model-value"]),
1289
+ X(l(Yo), {
1290
+ "svg-title": l(o)("selectionMenu"),
1291
+ "aria-hidden": "true"
1292
+ }, null, 8, ["svg-title"])
1293
+ ])
1294
+ ]),
1295
+ _: 1
1296
+ }, 8, ["button", "data"]))
1297
+ ], 64)) : B("", !0)
1298
+ ], 2)) : (c(), A(we, { key: 1 }, [
1299
+ T("div", {
1300
+ "aria-label": l(o)("columnActions", { name: U.label }),
1301
+ "aria-live": "polite",
1302
+ role: "region",
1303
+ class: re(["b-data-grid-columns__column-header-and-actions", j(U)])
1304
+ }, [
1305
+ X(l(Qe), {
1306
+ el: "div",
1307
+ strongest: "",
1308
+ class: re(["b-data-grid-columns__column-header", Ae.value])
1309
+ }, {
1310
+ default: G(() => [
1311
+ ke(r.$slots, `head-${U.field}`, { column: U }, () => [
1312
+ T("span", es, Y(U.label), 1)
1313
+ ], !0)
1314
+ ]),
1315
+ _: 2
1316
+ }, 1032, ["class"]),
1317
+ pe(U) ? (c(), A("div", {
1318
+ key: 0,
1319
+ class: re(["b-data-grid-columns__column-actions", q(U)])
1320
+ }, [
1321
+ U.infoIconTooltip ? (c(), A("div", ts, [
1322
+ X(l(xl), {
1323
+ "tooltip-text": U.infoIconTooltip
1324
+ }, null, 8, ["tooltip-text"])
1325
+ ])) : B("", !0),
1326
+ U.sortable ? (c(), A("div", ns, [
1327
+ X(l(Tt), {
1328
+ condensed: "",
1329
+ toggled: l(a)(U.field),
1330
+ variant: "tertiary",
1331
+ onClick: (ge) => l(f)(U.field)
1332
+ }, {
1333
+ iconLeft: G(() => [
1334
+ l(p)(U.field) ? l(p)(U.field) === l(He).ASCENDING ? (c(), H(l(Bo), {
1335
+ key: 1,
1336
+ "svg-title": l(o)("sortColumnInDescendingOrder", { name: U.label })
1337
+ }, null, 8, ["svg-title"])) : l(p)(U.field) === l(He).DESCENDING ? (c(), H(l(Zo), {
1338
+ key: 2,
1339
+ "svg-title": l(o)("sortColumnInAscendingOrder", { name: U.label })
1340
+ }, null, 8, ["svg-title"])) : B("", !0) : (c(), H(l(Lo), {
1341
+ key: 0,
1342
+ "svg-title": l(o)("sortColumn", { name: U.label })
1343
+ }, null, 8, ["svg-title"]))
1344
+ ]),
1345
+ _: 2
1346
+ }, 1032, ["toggled", "onClick"])
1347
+ ])) : B("", !0),
1348
+ e.hasColumnPanel ? (c(), H(l(bt), {
1349
+ key: 2,
1350
+ ref_for: !0,
1351
+ ref: (ge) => O.value[U.field] = ge,
1352
+ class: re(["b-data-grid-columns__menu", ze(U)]),
1353
+ "disable-arrow-down-opening-menu": "",
1354
+ data: z.value(U),
1355
+ "menu-position": Re(e.hasFirstColumnPanelRightAligned, fe),
1356
+ "menu-fixed-positioning": !0,
1357
+ button: { variant: "tertiary", condensed: !0 },
1358
+ onOpen: W[1] || (W[1] = (ge) => r.$emit(l(le).COLUMN_MENU_OPEN)),
1359
+ onClose: W[2] || (W[2] = (ge) => r.$emit(l(le).COLUMN_MENU_CLOSE))
1360
+ }, null, 8, ["class", "data", "menu-position"])) : B("", !0)
1361
+ ], 2)) : B("", !0)
1362
+ ], 10, Qo),
1363
+ T("div", {
1364
+ "data-testid": `data-grid-column-${U.field}`,
1365
+ class: re(["b-data-grid-columns__column-separator-container", K(U)]),
1366
+ role: "presentation",
1367
+ onMousedown: (ge) => l(k)(e.hasResizableColumns, U.field, ge),
1368
+ onClick: W[3] || (W[3] = bl(() => {
1369
+ }, ["stop"]))
1370
+ }, [
1371
+ !e.isFrozenColumns || e.isFrozenColumns && fe !== l(v).length - 1 ? (c(), A("div", os)) : B("", !0)
1372
+ ], 42, ls)
1373
+ ], 64))
1374
+ ], 16, Jo))), 128)),
1375
+ e.rowActionsMaximumWidth && !e.isFrozenColumns ? (c(), A(we, { key: 0 }, [
1376
+ W[4] || (W[4] = T("div", {
1377
+ role: "presentation",
1378
+ class: "b-data-grid-columns__row-actions-filler"
1379
+ }, null, -1)),
1380
+ T("div", {
1381
+ ref: (U) => he(U, l(Xe)),
1382
+ "aria-label": l(o)("rowActionsColumn"),
1383
+ "aria-colindex": l(v).length + 1,
1384
+ class: "b-data-grid-columns__column",
1385
+ role: "columnheader",
1386
+ tabindex: "0",
1387
+ style: We({ minWidth: `${e.rowActionsMaximumWidth}px` })
1388
+ }, null, 12, ss)
1389
+ ], 64)) : B("", !0)
1390
+ ], 2));
1391
+ }
1392
+ }), rs = /* @__PURE__ */ de(is, [["__scopeId", "data-v-34c6201d"]]);
1393
+ var De = /* @__PURE__ */ ((e) => (e.UPDATE_CONDENSED = "update:condensed", e.UPDATE_COLUMNS = "update:columns", e.UPDATE_ZEBRA_ROWS = "update:zebra-rows", e))(De || {});
1394
+ let an = 0;
1395
+ const ds = {
1396
+ beforeCreate() {
1397
+ this.uuid = an.toString(), an += 1;
1398
+ }
1399
+ }, us = { key: 0 }, cs = ["clip-path"], fs = ["id"];
1400
+ function gs(e, s, i, t, u, n) {
1401
+ return c(), A("svg", oe({ role: "img" }, e.$attrs, {
1402
+ class: "ui-assets-icons-16",
1403
+ xmlns: "http://www.w3.org/2000/svg",
1404
+ width: "16",
1405
+ height: "16",
1406
+ fill: "none"
1407
+ }), [
1408
+ e.$attrs["svg-title"] ? (c(), A("title", us, Y(e.$attrs["svg-title"]), 1)) : B("", !0),
1409
+ T("g", {
1410
+ fill: "#001222",
1411
+ "clip-path": "url(#uia-ui-assets/icons-16-settings__a" + e.uuid + ")"
1412
+ }, s[0] || (s[0] = [
1413
+ T("path", { d: "M8 5.25C6.48122 5.25 5.25 6.48122 5.25 8C5.25 9.51878 6.48122 10.75 8 10.75C9.51878 10.75 10.75 9.51878 10.75 8C10.75 6.48122 9.51878 5.25 8 5.25ZM6.75 8C6.75 7.30964 7.30964 6.75 8 6.75C8.69036 6.75 9.25 7.30964 9.25 8C9.25 8.69036 8.69036 9.25 8 9.25C7.30964 9.25 6.75 8.69036 6.75 8Z" }, null, -1),
1414
+ T("path", { d: "M6.84701 0.973015L6.59985 0.35083L5.9537 0.526056C4.64534 0.880867 3.48225 1.56808 2.55285 2.48641L2.07533 2.95826L2.49158 3.48495C2.79648 3.87074 2.85279 4.419 2.58992 4.87589C2.32905 5.32931 1.82436 5.55631 1.33473 5.48726L0.677319 5.39455L0.505539 6.03586C0.33838 6.65992 0.25 7.32519 0.25 7.99991C0.25 8.67463 0.33838 9.3399 0.505539 9.96396L0.677319 10.6053L1.33473 10.5126C1.82436 10.4435 2.32905 10.6705 2.58992 11.1239C2.85279 11.5808 2.79648 12.1291 2.49158 12.5149L2.07533 13.0416L2.55285 13.5134C3.48225 14.4317 4.64534 15.119 5.9537 15.4738L6.59985 15.649L6.84701 15.0268C7.02659 14.5748 7.47549 14.2499 8 14.2499C8.52452 14.2499 8.97341 14.5748 9.15299 15.0268L9.40016 15.649L10.0463 15.4738C11.3547 15.119 12.5177 14.4317 13.4471 13.5134L13.9247 13.0416L13.5084 12.5149C13.2035 12.1291 13.1472 11.5808 13.4101 11.1239C13.671 10.6705 14.1756 10.4435 14.6653 10.5126L15.3227 10.6053L15.4945 9.96396C15.6616 9.3399 15.75 8.67463 15.75 7.99991C15.75 7.32519 15.6616 6.65992 15.4945 6.03586L15.3227 5.39455L14.6653 5.48726C14.1756 5.55631 13.671 5.32931 13.4101 4.87589C13.1472 4.419 13.2035 3.87074 13.5084 3.48495L13.9247 2.95826L13.4471 2.48641C12.5177 1.56808 11.3547 0.880867 10.0463 0.526056L9.40016 0.35083L9.15299 0.973015C8.97341 1.42506 8.52452 1.74991 8 1.74991C7.47549 1.74991 7.02659 1.42506 6.84701 0.973015ZM3.89008 5.62393C4.33946 4.84286 4.36394 3.9353 4.03405 3.16853C4.55803 2.73795 5.15349 2.39116 5.80146 2.14902C6.30062 2.81653 7.10051 3.24991 8 3.24991C8.89949 3.24991 9.69938 2.81653 10.1985 2.14902C10.8465 2.39116 11.442 2.73795 11.966 3.16853C11.6361 3.9353 11.6605 4.84287 12.1099 5.62393C12.5612 6.40839 13.3382 6.88092 14.1658 6.97982C14.221 7.31075 14.25 7.65319 14.25 7.99991C14.25 8.34663 14.221 8.68908 14.1658 9.02001C13.3382 9.11891 12.5612 9.59143 12.1099 10.3759C11.6605 11.157 11.6361 12.0645 11.9659 12.8313C11.442 13.2619 10.8465 13.6087 10.1985 13.8508C9.69938 13.1833 8.89949 12.7499 8 12.7499C7.10051 12.7499 6.30062 13.1833 5.80146 13.8508C5.15349 13.6087 4.55803 13.2619 4.03405 12.8313C4.36394 12.0645 4.33946 11.157 3.89008 10.3759C3.43875 9.59143 2.66177 9.1189 1.8342 9.02C1.77896 8.68908 1.75 8.34663 1.75 7.99991C1.75 7.65319 1.77896 7.31074 1.8342 6.97982C2.66177 6.88092 3.43875 6.40839 3.89008 5.62393Z" }, null, -1)
1415
+ ]), 8, cs),
1416
+ T("defs", null, [
1417
+ T("clipPath", {
1418
+ id: "uia-ui-assets/icons-16-settings__a" + e.uuid
1419
+ }, s[1] || (s[1] = [
1420
+ T("rect", {
1421
+ width: "16",
1422
+ height: "16",
1423
+ fill: "#fff"
1424
+ }, null, -1)
1425
+ ]), 8, fs)
1426
+ ])
1427
+ ], 16);
1428
+ }
1429
+ const vs = /* @__PURE__ */ de(ds, [["render", gs]]), rn = {
1430
+ "en-US": {
1431
+ toggleColumnFreeze: "Toggle {label} column freeze",
1432
+ toggleColumnVisibility: "Toggle {label} column visibility"
1433
+ }
1434
+ }, ms = Ue({
1435
+ i18n: { messages: rn },
1436
+ name: "bento-data-grid",
1437
+ components: {
1438
+ BentoFreezeIcon: pn,
1439
+ BentoToggle: bn
1440
+ },
1441
+ props: {
1442
+ /**
1443
+ * Is column visibitlity toggle disabled
1444
+ */
1445
+ isColumnVisibilityToggleDisabled: {
1446
+ type: Boolean,
1447
+ required: !0
1448
+ },
1449
+ /**
1450
+ * Column definition
1451
+ */
1452
+ column: {
1453
+ type: Object,
1454
+ required: !0
1455
+ }
1456
+ },
1457
+ emits: ["visible-column", "updated-column"],
1458
+ setup(e, { emit: s }) {
1459
+ const { t: i } = Ge({ messages: rn }), t = S(!1), u = w(() => {
1460
+ var D;
1461
+ return (D = e.column) == null ? void 0 : D.frozen;
1462
+ }), n = w(() => {
1463
+ var D;
1464
+ return ((D = e.column) == null ? void 0 : D.visible) !== !1;
1465
+ }), o = Me(
1466
+ et,
1467
+ w(() => !1)
1468
+ ), v = () => {
1469
+ s("visible-column", { ...e.column, visible: !n.value });
1470
+ }, g = () => {
1471
+ s("updated-column", { ...e.column, frozen: !u.value });
1472
+ }, C = () => {
1473
+ u.value || (t.value = !0);
1474
+ }, L = () => {
1475
+ u.value || (t.value = !1);
1476
+ }, O = w(() => ({
1477
+ "b-data-grid-config-settings-column-row__freeze-icon--frozen": u.value
1478
+ }));
1479
+ return {
1480
+ // Values
1481
+ isFreezeIconOptionShown: t,
1482
+ isColumnFrozen: u,
1483
+ freezeIconConditionalClasses: O,
1484
+ isColumnVisible: n,
1485
+ isSmallContainer: o,
1486
+ // Methods
1487
+ toggleColumnVisibility: v,
1488
+ showFreezeIcon: C,
1489
+ hideFreezeIcon: L,
1490
+ toggleColumnFreeze: g,
1491
+ // Translations
1492
+ t: i
1493
+ };
1494
+ }
1495
+ });
1496
+ function hs(e, s, i, t, u, n) {
1497
+ const o = Te("bento-toggle"), v = Te("bento-freeze-icon");
1498
+ return c(), A("div", {
1499
+ class: "b-data-grid-config-settings-column-row",
1500
+ onMouseover: s[0] || (s[0] = (...g) => e.showFreezeIcon && e.showFreezeIcon(...g)),
1501
+ onMouseleave: s[1] || (s[1] = (...g) => e.hideFreezeIcon && e.hideFreezeIcon(...g))
1502
+ }, [
1503
+ X(o, {
1504
+ "aria-label": e.t("toggleColumnVisibility", { label: e.column.label }),
1505
+ disabled: e.isColumnVisibilityToggleDisabled,
1506
+ "label-position": "after",
1507
+ value: e.isColumnVisible,
1508
+ onInput: e.toggleColumnVisibility
1509
+ }, {
1510
+ default: G(() => [
1511
+ me(Y(e.column.label), 1)
1512
+ ]),
1513
+ _: 1
1514
+ }, 8, ["aria-label", "disabled", "value", "onInput"]),
1515
+ St(X(v, {
1516
+ "aria-label": e.t("toggleColumnFreeze", { label: e.column.label }),
1517
+ class: re(["b-data-grid-config-settings-column-row__freeze-icon", e.freezeIconConditionalClasses]),
1518
+ onClick: e.toggleColumnFreeze
1519
+ }, null, 8, ["aria-label", "class", "onClick"]), [
1520
+ [_l, (e.isColumnFrozen || e.isFreezeIconOptionShown) && !e.isSmallContainer]
1521
+ ])
1522
+ ], 32);
1523
+ }
1524
+ const Cs = /* @__PURE__ */ de(ms, [["render", hs], ["__scopeId", "data-v-1fd5ff6e"]]), dn = {
1525
+ "en-US": {
1526
+ appearance: "Appearance",
1527
+ closeConfigSettingsPanel: "Close configuration settings panel",
1528
+ closeSearch: "Close search",
1529
+ columnVisibilitySearchFilter: "Column visibility search filter",
1530
+ columns: "Columns",
1531
+ condensed: "Condensed",
1532
+ condensedToggle: "Condensed toggle",
1533
+ configSettingsPanel: "Configuration settings Panel",
1534
+ displayOptions: "Display options",
1535
+ noColumnsMatch: "No columns match this search",
1536
+ search: "Search",
1537
+ showAllColumns: "Show all columns ({numberOfColumns})",
1538
+ toggleConfigSettingsPanelVisibility: "Toggle Configuration settings panel visibility",
1539
+ zebraRows: "Zebra rows",
1540
+ zebraRowsToggle: "Zebra rows toggle"
1541
+ },
1542
+ "ja-JP": {
1543
+ appearance: "外観",
1544
+ condensed: "凝縮",
1545
+ search: "検索"
1546
+ },
1547
+ "pt-BR": {
1548
+ appearance: "Aparência",
1549
+ condensed: "Condensado",
1550
+ search: "Buscar"
1551
+ }
1552
+ }, ws = Ue({
1553
+ i18n: { messages: dn },
1554
+ name: "bento-data-grid",
1555
+ components: {
1556
+ BentoButton: wn,
1557
+ BentoCrossIcon: hn,
1558
+ BentoPopover: Pl,
1559
+ BentoSettingsIcon: vs,
1560
+ BentoToggleButton: Tt,
1561
+ BentoDataGridConfigSettingsConfigRow: Cs,
1562
+ BentoSearchBar: Wl,
1563
+ BentoSearchIcon: Vl,
1564
+ BentoToggle: bn,
1565
+ BentoTypography: Qe
1566
+ },
1567
+ directives: { BentoClickOutsideDirective: Hl },
1568
+ props: {
1569
+ /**
1570
+ * Column definitions
1571
+ */
1572
+ columns: {
1573
+ type: Array,
1574
+ required: !0
1575
+ },
1576
+ /**
1577
+ * Sets the row cells to the condensed padding state.
1578
+ */
1579
+ condensed: {
1580
+ type: Boolean,
1581
+ default: !1
1582
+ },
1583
+ /**
1584
+ * Sets a different background color for even rows.
1585
+ */
1586
+ zebraRows: {
1587
+ type: Boolean,
1588
+ default: !1
1589
+ }
1590
+ },
1591
+ emits: [
1592
+ De.UPDATE_CONDENSED,
1593
+ De.UPDATE_COLUMNS,
1594
+ De.UPDATE_ZEBRA_ROWS
1595
+ ],
1596
+ setup(e, { emit: s }) {
1597
+ const { t: i } = Ge({ messages: dn }), t = S(null), u = _t("data-grid-config-settings-popover"), n = S(null), o = S(!1), v = S(!0), g = S(null), C = S(""), L = wt(e, "columns"), O = S(!1), D = Gl(C, L), _ = () => {
1598
+ C.value = "";
1599
+ }, d = w(
1600
+ () => !e.columns.some((h) => h.visible === !1 && !h.mandatory)
1601
+ ), I = () => {
1602
+ _(), O.value = !O.value, O.value ? be(() => {
1603
+ var h;
1604
+ return (h = n.value.$refs.bentoInputField) == null ? void 0 : h.focusInput();
1605
+ }) : be(() => {
1606
+ var h, z;
1607
+ return (z = (h = g == null ? void 0 : g.value) == null ? void 0 : h.$el) == null ? void 0 : z.focus();
1608
+ }), v.value = d.value;
1609
+ }, $ = (h) => h.mandatory ?? !1, k = (h) => {
1610
+ const z = e.columns.map((V) => ({
1611
+ ...V,
1612
+ visible: h.field === V.field ? h.visible : V.visible
1613
+ }));
1614
+ s(De.UPDATE_COLUMNS, z);
1615
+ }, E = (h) => {
1616
+ h ? s(
1617
+ De.UPDATE_COLUMNS,
1618
+ e.columns.map((z) => ({ ...z, visible: !0 }))
1619
+ ) : s(
1620
+ De.UPDATE_COLUMNS,
1621
+ e.columns.map((z) => ({ ...z, visible: (z == null ? void 0 : z.mandatory) === !0 }))
1622
+ );
1623
+ }, b = (h) => {
1624
+ const z = e.columns.map((V) => ({
1625
+ ...V,
1626
+ frozen: h.field === V.field ? !!(h != null && h.frozen) : !!(V != null && V.frozen)
1627
+ }));
1628
+ s(De.UPDATE_COLUMNS, z);
1629
+ }, a = (h) => {
1630
+ o.value = h, v.value = d.value;
1631
+ };
1632
+ return {
1633
+ // Values
1634
+ configSettingsButtonRef: t,
1635
+ popoverId: u,
1636
+ isConfigSettingsPanelOpen: o,
1637
+ allColumnsVisbilityToggleState: v,
1638
+ filteredColumnVisibilityColumns: D,
1639
+ searchTerm: C,
1640
+ isColumnVisibilityFilterShown: O,
1641
+ searchBarRef: n,
1642
+ searchButtonRef: g,
1643
+ DATAGRID_ACTIONS_COLUMN_FIELD_NAME: ye,
1644
+ // Methods
1645
+ setConfigSettingsPanelVisibility: a,
1646
+ emitCondensedToggle: (h) => s(De.UPDATE_CONDENSED, h),
1647
+ toggleAllColumnVisibility: E,
1648
+ clearAction: _,
1649
+ toggleColumnFilter: I,
1650
+ emitVisibleColumns: k,
1651
+ emitFrozenColumns: b,
1652
+ onClickOutside: () => a(!1),
1653
+ isColumnVisibilityToggleDisabled: $,
1654
+ emitZebraRowsToggle: (h) => s(De.UPDATE_ZEBRA_ROWS, h),
1655
+ // Translations
1656
+ t: i
1657
+ };
1658
+ }
1659
+ }), bs = { class: "b-data-grid-config-settings" }, _s = { class: "b-data-grid-config-settings__button-and-separator" }, ys = {
1660
+ ref: "configSettingsButtonRef",
1661
+ class: "b-data-grid-config-settings__button-container"
1662
+ }, Es = { class: "b-data-grid-config-settings__panel-header" }, ps = { class: "b-data-grid-config-settings__appearance" }, Ss = { class: "b-data-grid-config-settings__appearance-button" }, Ls = { class: "b-data-grid-config-settings__appearance-button" }, Rs = { class: "b-data-grid-config-settings__column-visibility-settings" }, As = { class: "b-data-grid-config-settings__column-visibility-header" }, Os = {
1663
+ key: 0,
1664
+ class: "b-data-grid-config-settings__column-visibility-search"
1665
+ }, Ts = {
1666
+ key: 1,
1667
+ class: "b-data-grid-config-settings__column-visibility-show-all"
1668
+ }, Is = { class: "b-data-grid-config-settings__column-visibility-toggles" };
1669
+ function Ns(e, s, i, t, u, n) {
1670
+ const o = Te("bento-settings-icon"), v = Te("bento-toggle-button"), g = Te("bento-typography"), C = Te("bento-cross-icon"), L = Te("bento-button"), O = Te("bento-toggle"), D = Te("bento-search-icon"), _ = Te("bento-search-bar"), d = Te("bento-data-grid-config-settings-config-row"), I = Te("bento-popover"), $ = yl("bento-click-outside-directive");
1671
+ return St((c(), A("div", bs, [
1672
+ T("div", _s, [
1673
+ T("div", ys, [
1674
+ X(v, {
1675
+ "aria-controls": e.isConfigSettingsPanelOpen ? e.popoverId : null,
1676
+ variant: "tertiary",
1677
+ condensed: "",
1678
+ toggled: e.isConfigSettingsPanelOpen,
1679
+ onClick: s[0] || (s[0] = (k) => e.setConfigSettingsPanelVisibility(!e.isConfigSettingsPanelOpen))
1680
+ }, {
1681
+ iconLeft: G(() => [
1682
+ X(o, {
1683
+ "svg-title": e.t("toggleConfigSettingsPanelVisibility")
1684
+ }, null, 8, ["svg-title"])
1685
+ ]),
1686
+ _: 1
1687
+ }, 8, ["aria-controls", "toggled"])
1688
+ ], 512)
1689
+ ]),
1690
+ e.configSettingsButtonRef ? (c(), H(I, {
1691
+ key: 0,
1692
+ id: e.popoverId,
1693
+ open: e.isConfigSettingsPanelOpen,
1694
+ class: "b-data-grid-config-settings__panel",
1695
+ "aria-label": e.t("configSettingsPanel"),
1696
+ "target-element": e.configSettingsButtonRef,
1697
+ position: "bottom-end"
1698
+ }, {
1699
+ default: G(() => [
1700
+ T("div", Es, [
1701
+ X(g, {
1702
+ el: "span",
1703
+ strongest: ""
1704
+ }, {
1705
+ default: G(() => [
1706
+ me(Y(e.t("displayOptions")), 1)
1707
+ ]),
1708
+ _: 1
1709
+ }),
1710
+ X(L, {
1711
+ variant: "tertiary",
1712
+ onClick: s[1] || (s[1] = (k) => e.setConfigSettingsPanelVisibility(!1))
1713
+ }, {
1714
+ iconLeft: G(() => [
1715
+ X(C, {
1716
+ "svg-title": e.t("closeConfigSettingsPanel")
1717
+ }, null, 8, ["svg-title"])
1718
+ ]),
1719
+ _: 1
1720
+ })
1721
+ ]),
1722
+ T("div", ps, [
1723
+ X(g, {
1724
+ class: "b-data-grid-config-settings__appearance-title",
1725
+ el: "span",
1726
+ stronger: ""
1727
+ }, {
1728
+ default: G(() => [
1729
+ me(Y(e.t("appearance")), 1)
1730
+ ]),
1731
+ _: 1
1732
+ }),
1733
+ T("div", Ss, [
1734
+ X(O, {
1735
+ "label-position": "after",
1736
+ "aria-label": e.t("condensedToggle"),
1737
+ value: e.condensed,
1738
+ onInput: e.emitCondensedToggle
1739
+ }, {
1740
+ default: G(() => [
1741
+ me(Y(e.t("condensed")), 1)
1742
+ ]),
1743
+ _: 1
1744
+ }, 8, ["aria-label", "value", "onInput"])
1745
+ ]),
1746
+ T("div", Ls, [
1747
+ X(O, {
1748
+ "label-position": "after",
1749
+ "aria-label": e.t("zebraRowsToggle"),
1750
+ value: e.zebraRows,
1751
+ onInput: e.emitZebraRowsToggle
1752
+ }, {
1753
+ default: G(() => [
1754
+ me(Y(e.t("zebraRows")), 1)
1755
+ ]),
1756
+ _: 1
1757
+ }, 8, ["aria-label", "value", "onInput"])
1758
+ ])
1759
+ ]),
1760
+ T("div", Rs, [
1761
+ T("div", As, [
1762
+ X(g, {
1763
+ class: "b-data-grid-config-settings__column-visibility-title",
1764
+ el: "span",
1765
+ stronger: ""
1766
+ }, {
1767
+ default: G(() => [
1768
+ me(Y(e.t("columns")), 1)
1769
+ ]),
1770
+ _: 1
1771
+ }),
1772
+ e.isColumnVisibilityFilterShown ? (c(), H(L, {
1773
+ key: 1,
1774
+ variant: "tertiary",
1775
+ onClick: e.toggleColumnFilter
1776
+ }, {
1777
+ iconLeft: G(() => [
1778
+ X(C)
1779
+ ]),
1780
+ default: G(() => [
1781
+ me(" " + Y(e.t("closeSearch")), 1)
1782
+ ]),
1783
+ _: 1
1784
+ }, 8, ["onClick"])) : (c(), H(L, {
1785
+ key: 0,
1786
+ ref: "searchButtonRef",
1787
+ variant: "tertiary",
1788
+ onClick: e.toggleColumnFilter
1789
+ }, {
1790
+ iconLeft: G(() => [
1791
+ X(D)
1792
+ ]),
1793
+ default: G(() => [
1794
+ me(Y(e.t("search")), 1)
1795
+ ]),
1796
+ _: 1
1797
+ }, 8, ["onClick"]))
1798
+ ]),
1799
+ e.isColumnVisibilityFilterShown ? (c(), A("div", Os, [
1800
+ X(_, {
1801
+ ref: "searchBarRef",
1802
+ value: e.searchTerm,
1803
+ "input-field-aria-label": e.t("columnVisibilitySearchFilter").toString(),
1804
+ onInput: s[2] || (s[2] = (k) => e.searchTerm = k),
1805
+ onClear: e.clearAction,
1806
+ onEscapePressed: e.toggleColumnFilter
1807
+ }, null, 8, ["value", "input-field-aria-label", "onClear", "onEscapePressed"])
1808
+ ])) : (c(), A("div", Ts, [
1809
+ X(O, {
1810
+ "label-position": "after",
1811
+ value: e.allColumnsVisbilityToggleState,
1812
+ onInput: e.toggleAllColumnVisibility
1813
+ }, {
1814
+ default: G(() => [
1815
+ me(Y(e.t("showAllColumns", { numberOfColumns: e.columns.length })), 1)
1816
+ ]),
1817
+ _: 1
1818
+ }, 8, ["value", "onInput"])
1819
+ ])),
1820
+ T("div", Is, [
1821
+ (c(!0), A(we, null, Le(e.filteredColumnVisibilityColumns, (k) => (c(), A("div", {
1822
+ key: k.field
1823
+ }, [
1824
+ k.field !== e.DATAGRID_ACTIONS_COLUMN_FIELD_NAME ? (c(), H(d, {
1825
+ key: 0,
1826
+ column: k,
1827
+ "is-column-visibility-toggle-disabled": e.isColumnVisibilityToggleDisabled(k),
1828
+ onVisibleColumn: e.emitVisibleColumns,
1829
+ onUpdatedColumn: e.emitFrozenColumns
1830
+ }, null, 8, ["column", "is-column-visibility-toggle-disabled", "onVisibleColumn", "onUpdatedColumn"])) : B("", !0)
1831
+ ]))), 128)),
1832
+ e.filteredColumnVisibilityColumns.length === 0 ? (c(), H(g, {
1833
+ key: 0,
1834
+ el: "span",
1835
+ class: "b-data-grid-config-settings__column-visibility-empty-search-message"
1836
+ }, {
1837
+ default: G(() => [
1838
+ me(Y(e.t("noColumnsMatch")), 1)
1839
+ ]),
1840
+ _: 1
1841
+ })) : B("", !0)
1842
+ ])
1843
+ ])
1844
+ ]),
1845
+ _: 1
1846
+ }, 8, ["id", "open", "aria-label", "target-element"])) : B("", !0)
1847
+ ])), [
1848
+ [$, e.onClickOutside]
1849
+ ]);
1850
+ }
1851
+ const Ds = /* @__PURE__ */ de(ws, [["render", Ns], ["__scopeId", "data-v-5219be62"]]), vt = {
1852
+ "en-US": {
1853
+ gettingYourData: "Getting your data",
1854
+ loading: "Loading",
1855
+ selectRow: "Select row",
1856
+ showMore: "Show more",
1857
+ sortAscending: "{field} sort ascending",
1858
+ sortDescending: "{field} sort descending",
1859
+ sortInactive: "{field} sort inactive"
1860
+ },
1861
+ "ja-JP": {
1862
+ loading: "読み込み中",
1863
+ showMore: "表示内容を増やす"
1864
+ },
1865
+ "pt-BR": {
1866
+ loading: "Carregando",
1867
+ showMore: "Mostrar mais"
1868
+ }
1869
+ }, $s = { class: "b-data-grid-lazy-load" }, ks = {
1870
+ i18n: { messages: vt }
1871
+ }, Ms = /* @__PURE__ */ Ue({
1872
+ ...ks,
1873
+ __name: "data-grid-lazy-load",
1874
+ props: {
1875
+ loading: { type: Boolean },
1876
+ isInfiniteScroll: { type: Boolean }
1877
+ },
1878
+ setup(e) {
1879
+ const { t: s } = Ge({ messages: vt });
1880
+ return (i, t) => (c(), A("div", $s, [
1881
+ i.loading && i.isInfiniteScroll ? (c(), H(l(Rt), { key: 0 })) : B("", !0),
1882
+ i.loading && !i.isInfiniteScroll ? (c(), H(l(Ht), {
1883
+ key: 1,
1884
+ variant: "secondary",
1885
+ state: l(Gt).LOADING
1886
+ }, {
1887
+ default: G(() => [
1888
+ me(Y(l(s)("loading")), 1)
1889
+ ]),
1890
+ _: 1
1891
+ }, 8, ["state"])) : B("", !0),
1892
+ !i.loading && !i.isInfiniteScroll ? (c(), H(l(Ht), {
1893
+ key: 2,
1894
+ state: l(Gt).START,
1895
+ variant: "secondary",
1896
+ onClick: t[0] || (t[0] = (u) => i.$emit(l(F).UPDATE_SHOW_MORE))
1897
+ }, {
1898
+ default: G(() => [
1899
+ me(Y(l(s)("showMore")), 1)
1900
+ ]),
1901
+ _: 1
1902
+ }, 8, ["state"])) : B("", !0)
1903
+ ]));
1904
+ }
1905
+ }), Us = /* @__PURE__ */ de(Ms, [["__scopeId", "data-v-a4824c2d"]]);
1906
+ let un = 0;
1907
+ const zs = {
1908
+ beforeCreate() {
1909
+ this.uuid = un.toString(), un += 1;
1910
+ }
1911
+ }, Fs = { key: 0 };
1912
+ function Ps(e, s, i, t, u, n) {
1913
+ return c(), A("svg", oe({ role: "img" }, e.$attrs, {
1914
+ class: "ui-assets-icons-16",
1915
+ xmlns: "http://www.w3.org/2000/svg",
1916
+ width: "16",
1917
+ height: "16",
1918
+ fill: "none"
1919
+ }), [
1920
+ e.$attrs["svg-title"] ? (c(), A("title", Fs, Y(e.$attrs["svg-title"]), 1)) : B("", !0),
1921
+ s[0] || (s[0] = T("path", {
1922
+ fill: "#001222",
1923
+ d: "M9.38867 2.21717C10.4626 1.14323 12.2044 1.14323 13.2783 2.21717L13.7832 2.72205C14.857 3.79601 14.8571 5.53782 13.7832 6.6117L5.64355 14.7504H1.25V10.3558L9.38867 2.21717ZM2.75 10.9769V13.2504H5.02246L11.2715 6.9994L8.99902 4.72693L2.75 10.9769ZM12.2168 3.27772C11.7286 2.78987 10.9373 2.78967 10.4492 3.27772L10.0596 3.66639L12.332 5.93885L12.7217 5.55018C13.2098 5.06203 13.2098 4.27076 12.7217 3.7826L12.2168 3.27772Z"
1924
+ }, null, -1))
1925
+ ], 16);
1926
+ }
1927
+ const cn = /* @__PURE__ */ de(zs, [["render", Ps]]), Rn = {
1928
+ "en-US": {
1929
+ copy: "Copy",
1930
+ edit: "Edit",
1931
+ more: "More",
1932
+ open: "Open"
1933
+ },
1934
+ "ja-JP": {
1935
+ copy: "コピー",
1936
+ edit: "編集",
1937
+ more: "表示を増やす",
1938
+ open: "を開く"
1939
+ },
1940
+ "pt-BR": {
1941
+ copy: "Copiar",
1942
+ edit: "Editar",
1943
+ more: "Mais",
1944
+ open: "Abrir"
1945
+ }
1946
+ }, Bs = { class: "b-data-grid-cell-actions" }, Ws = {
1947
+ i18n: { messages: Rn },
1948
+ name: "data-grid-cell-actions"
1949
+ }, Hs = /* @__PURE__ */ Ue({
1950
+ ...Ws,
1951
+ props: {
1952
+ /**
1953
+ * Column definitions using 'key' to relate to data object.
1954
+ */
1955
+ cellActions: {
1956
+ type: [Array, Function],
1957
+ required: !0,
1958
+ validator: (e) => (e == null ? void 0 : e.length) <= 2
1959
+ },
1960
+ /**
1961
+ * The column field key.
1962
+ */
1963
+ columnKey: {
1964
+ type: String,
1965
+ default: void 0
1966
+ },
1967
+ /**
1968
+ * Disables any opening of the cell actions menus using the down arrow key.
1969
+ */
1970
+ disableArrowDownOpeningMenu: {
1971
+ type: Boolean,
1972
+ default: !1
1973
+ },
1974
+ /**
1975
+ * Set to true if the datagrid has been scrolled and the right side has overflowing space.
1976
+ */
1977
+ hasRightOverflow: {
1978
+ type: Boolean,
1979
+ default: !1
1980
+ },
1981
+ /**
1982
+ * Set to true if the row has a darker background when zebra rows is enabled.
1983
+ */
1984
+ hasZebraBackground: {
1985
+ type: Boolean,
1986
+ default: !1
1987
+ },
1988
+ /**
1989
+ * Set to true if the row is selected.
1990
+ */
1991
+ isSelected: {
1992
+ type: Boolean,
1993
+ default: !1
1994
+ },
1995
+ /**
1996
+ * Set to true if the row is highlighted.
1997
+ */
1998
+ isHighlighted: {
1999
+ type: Boolean,
2000
+ default: !1
2001
+ },
2002
+ /**
2003
+ * Set if set to true will teleport the action menu component
2004
+ */
2005
+ teleportMenu: {
2006
+ type: Boolean,
2007
+ default: !1
2008
+ },
2009
+ /**
2010
+ * The row data item object.
2011
+ */
2012
+ rowDataItem: {
2013
+ type: Object,
2014
+ required: !0
2015
+ }
2016
+ },
2017
+ emits: ["menu-open", "menu-close", "menu-item-click"],
2018
+ setup(e, { emit: s }) {
2019
+ const { t: i } = Ge({ messages: Rn }), t = e, u = s, n = Me(gt, S(!1)), o = (a) => {
2020
+ if ("text" in a && a.text !== void 0)
2021
+ return a.text;
2022
+ switch (a.variant) {
2023
+ case "copy":
2024
+ return i("copy");
2025
+ case "edit":
2026
+ return i("edit");
2027
+ case "open":
2028
+ return i("open");
2029
+ case "more":
2030
+ return i("more");
2031
+ default:
2032
+ return a.title;
2033
+ }
2034
+ }, v = (a) => {
2035
+ switch (a.variant) {
2036
+ case "copy":
2037
+ return qt;
2038
+ case "edit":
2039
+ return cn;
2040
+ case "open":
2041
+ return jt;
2042
+ default:
2043
+ return;
2044
+ }
2045
+ }, g = w(() => t.columnKey === void 0), C = w(() => ({
2046
+ "b-data-grid-cell-actions__background-gradient--with-row-actions-and-overflow": g.value && t.hasRightOverflow,
2047
+ "b-data-grid-cell-actions__background-gradient--zebra": t.hasZebraBackground,
2048
+ "b-data-grid-cell-actions__background-gradient--highlighted": t.isHighlighted,
2049
+ "b-data-grid-cell-actions__background-gradient--selected": t.isSelected
2050
+ })), L = w(() => ({
2051
+ "b-data-grid-cell-actions__actions--with-row-actions": g.value,
2052
+ "b-data-grid-cell-actions__actions--zebra": t.hasZebraBackground,
2053
+ "b-data-grid-cell-actions__actions--highlighted": t.isHighlighted,
2054
+ "b-data-grid-cell-actions__actions--selected": t.isSelected
2055
+ })), O = w(() => !g.value || g.value && t.hasRightOverflow);
2056
+ function D(a) {
2057
+ return typeof a == "function";
2058
+ }
2059
+ const _ = w(() => {
2060
+ var p;
2061
+ const a = D(t.cellActions) ? (p = t.cellActions) == null ? void 0 : p.call(t, t.rowDataItem, t.columnKey) : t.cellActions;
2062
+ if (n.value && !g.value && a) {
2063
+ const f = [];
2064
+ return a.forEach((m) => {
2065
+ m.menuData ? m.menuData.forEach((h) => {
2066
+ f.push(h);
2067
+ }) : f.push({
2068
+ text: o(m),
2069
+ event: m.event,
2070
+ critical: m.critical,
2071
+ disabled: m.disabled,
2072
+ icon: v(m)
2073
+ });
2074
+ }), [
2075
+ {
2076
+ variant: "more",
2077
+ isShort: !0,
2078
+ iconLeft: Vt,
2079
+ menuData: k(f)
2080
+ }
2081
+ ];
2082
+ }
2083
+ return !n.value && (a == null ? void 0 : a.length) > 2 && Cn(
2084
+ "WARNING: BentoDataGrid Cell actions can only have a maximum of 2 actions, if you need more consider using the menuData property instead."
2085
+ ), a == null ? void 0 : a.slice(0, 2);
2086
+ }), d = w(() => (a, p) => {
2087
+ if (!(!p && a.isShort || p && !a.isShort))
2088
+ switch (a.variant) {
2089
+ case "copy":
2090
+ return i("copy");
2091
+ case "edit":
2092
+ return i("edit");
2093
+ case "open":
2094
+ return i("open");
2095
+ case "more":
2096
+ return i("more");
2097
+ default:
2098
+ return a.title;
2099
+ }
2100
+ }), I = (a) => (a == null ? void 0 : a.event) !== void 0 ? {
2101
+ click: (p) => {
2102
+ p.stopPropagation(), a.event(t.rowDataItem, t.columnKey);
2103
+ }
2104
+ } : {}, $ = (a) => ({
2105
+ ...a,
2106
+ handler: () => {
2107
+ a != null && a.handler && typeof a.handler == "function" && (a == null || a.handler()), a != null && a.event && typeof a.event == "function" && (a == null || a.event(t.rowDataItem, t.columnKey));
2108
+ }
2109
+ }), k = (a) => a.map((p) => {
2110
+ const f = p;
2111
+ return f != null && f.items && (f.items = k(f.items)), { ...$(f) };
2112
+ }), E = (a) => {
2113
+ var p, f;
2114
+ return (a == null ? void 0 : a.getCopyData) !== void 0 ? a.getCopyData(t.rowDataItem, t.columnKey) : t.columnKey ? (f = (p = t.rowDataItem) == null ? void 0 : p[t.columnKey]) == null ? void 0 : f.toString() : "";
2115
+ }, b = (a) => a.iconLeft || (a == null ? void 0 : a.variant) === "more";
2116
+ return (a, p) => (c(), H(mn, {
2117
+ name: "b-data-grid-cell-actions__animation",
2118
+ appear: ""
2119
+ }, {
2120
+ default: G(() => [
2121
+ T("div", Bs, [
2122
+ O.value && !l(n) ? (c(), A("div", {
2123
+ key: 0,
2124
+ class: re(["b-data-grid-cell-actions__background-gradient", C.value])
2125
+ }, null, 2)) : B("", !0),
2126
+ T("div", {
2127
+ class: re(["b-data-grid-cell-actions__actions", L.value]),
2128
+ role: "group"
2129
+ }, [
2130
+ (c(!0), A(we, null, Le(_.value, (f, m) => (c(), A("div", {
2131
+ key: m,
2132
+ class: "b-data-grid-cell-actions__action"
2133
+ }, [
2134
+ f.menuData ? (c(), H(l(bt), {
2135
+ key: 0,
2136
+ data: k(f.menuData),
2137
+ button: {
2138
+ condensed: !0,
2139
+ variant: "secondary",
2140
+ disabled: f.disabled
2141
+ },
2142
+ "disable-arrow-down-opening-menu": e.disableArrowDownOpeningMenu,
2143
+ teleport: e.teleportMenu,
2144
+ onOpen: p[0] || (p[0] = (h) => u("menu-open")),
2145
+ onClose: p[1] || (p[1] = (h) => u("menu-close")),
2146
+ onMenuItemClick: p[2] || (p[2] = (h) => u("menu-item-click"))
2147
+ }, qe({ _: 2 }, [
2148
+ b(f) ? {
2149
+ name: "iconLeft",
2150
+ fn: G(() => [
2151
+ (f == null ? void 0 : f.variant) === "more" ? (c(), H(l(Vt), {
2152
+ key: 0,
2153
+ "svg-title": d.value(f, !0)
2154
+ }, null, 8, ["svg-title"])) : (c(), H(Je(f.iconLeft), {
2155
+ key: 1,
2156
+ "svg-title": d.value(f, !0)
2157
+ }, null, 8, ["svg-title"]))
2158
+ ]),
2159
+ key: "0"
2160
+ } : void 0,
2161
+ f != null && f.isShort ? void 0 : {
2162
+ name: "default",
2163
+ fn: G(() => [
2164
+ me(Y(d.value(f)), 1)
2165
+ ]),
2166
+ key: "1"
2167
+ }
2168
+ ]), 1032, ["data", "button", "disable-arrow-down-opening-menu", "teleport"])) : f.variant === "copy" ? (c(), H(l(qt), {
2169
+ key: 1,
2170
+ text: E(f),
2171
+ "button-text": d.value(f),
2172
+ button: {
2173
+ condensed: !0,
2174
+ variant: "secondary"
2175
+ }
2176
+ }, null, 8, ["text", "button-text"])) : (c(), H(l(wn), oe({
2177
+ key: 2,
2178
+ condensed: "",
2179
+ variant: "secondary",
2180
+ critical: f.critical,
2181
+ disabled: f.disabled,
2182
+ link: f.link
2183
+ }, ft(I(f))), qe({ _: 2 }, [
2184
+ f.iconLeft || f.variant === "edit" ? {
2185
+ name: "iconLeft",
2186
+ fn: G(() => [
2187
+ (f == null ? void 0 : f.variant) === "edit" ? (c(), H(l(cn), {
2188
+ key: 0,
2189
+ "svg-title": d.value(f, !0)
2190
+ }, null, 8, ["svg-title"])) : (c(), H(Je(f.iconLeft), {
2191
+ key: 1,
2192
+ "svg-title": f.title
2193
+ }, null, 8, ["svg-title"]))
2194
+ ]),
2195
+ key: "0"
2196
+ } : void 0,
2197
+ f != null && f.isShort ? void 0 : {
2198
+ name: "default",
2199
+ fn: G(() => [
2200
+ me(Y(d.value(f)), 1)
2201
+ ]),
2202
+ key: "1"
2203
+ },
2204
+ f.iconRight || f.variant === "open" ? {
2205
+ name: "iconRight",
2206
+ fn: G(() => [
2207
+ (f == null ? void 0 : f.variant) === "open" ? (c(), H(l(jt), {
2208
+ key: 0,
2209
+ "svg-title": d.value(f, !0)
2210
+ }, null, 8, ["svg-title"])) : (c(), H(Je(f.iconRight), {
2211
+ key: 1,
2212
+ "svg-title": f.title
2213
+ }, null, 8, ["svg-title"]))
2214
+ ]),
2215
+ key: "2"
2216
+ } : void 0
2217
+ ]), 1040, ["critical", "disabled", "link"]))
2218
+ ]))), 128))
2219
+ ], 2)
2220
+ ])
2221
+ ]),
2222
+ _: 1
2223
+ }));
2224
+ }
2225
+ }), An = /* @__PURE__ */ de(Hs, [["__scopeId", "data-v-01d575ef"]]);
2226
+ var ve = /* @__PURE__ */ ((e) => (e.ACTION_COL_NESTED_CONTENT_AND_SELECTION_ENABLED = "action-col-nested-content-and-selection-enabled", e.ACTION_COL_NESTED_CONTENT_ENABLED = "action-col-nested-content-enabled", e.ACTION_COL_SELECTION_ENABLED = "action-col-selection-enabled", e.COLUMN_HOVERED = "column-hovered", e.COLUMN_HOVERED_NO_BORDER_LEFT = "column-hovered-no-border-left", e.COLUMN_HOVERED_NO_BORDER_RIGHT = "column-hovered-no-border-right", e.CONDENSED = "condensed", e.FROZEN = "frozen", e.IS_COLUMN_REORDERING = "is-column-re-ordering", e.IS_COLUMN_REORDERING_TARGET_LEFT = "is-column-re-order-target-left", e.IS_COLUMN_REORDERING_TARGET_RIGHT = "is-column-re-order-target-right", e.LAST_FROZEN_COLUMN_CELL = "last-frozen-column-cell", e.NESTED_CONTENT_ENABLED = "nested-content-toggle-enabled", e.NUMERIC = "numeric", e.OVERFLOW_ELLIPSIS = "overflow-ellipsis", e.PADDING_LEFT_UNSET = "padding-left-unset", e.PADDING_RIGHT_UNSET = "padding-right-unset", e.SLASHED_ZERO = "slashed-zero", e))(ve || {});
2227
+ const fn = () => {
2228
+ const e = document.activeElement;
2229
+ return e ? e.matches(":focus-visible") || e.matches(".focus-visible") : !1;
2230
+ }, On = {
2231
+ "en-US": {
2232
+ collapseNestedContent: "Collapse nested content",
2233
+ expandNestedContent: "Expand nested content",
2234
+ selectRow: "Select row"
2235
+ }
2236
+ }, Gs = ["aria-hidden", "data-testid", "data-cellindex", "tabindex", "aria-colindex"], Vs = ["title"], xs = {
2237
+ key: 0,
2238
+ class: "b-data-grid-cell__cell-actions"
2239
+ }, Zs = {
2240
+ i18n: { messages: On },
2241
+ name: "data-grid-cell"
2242
+ }, js = /* @__PURE__ */ Ue({
2243
+ ...Zs,
2244
+ props: {
2245
+ draggingEventsForRowCell: {
2246
+ type: Function,
2247
+ required: !0
2248
+ },
2249
+ /**
2250
+ * The columns sets including
2251
+ */
2252
+ columnSets: {
2253
+ type: Array,
2254
+ required: !0
2255
+ },
2256
+ /**
2257
+ * The columns set we are iterating over
2258
+ */
2259
+ column: {
2260
+ type: Object,
2261
+ required: !0
2262
+ },
2263
+ colIndex: {
2264
+ type: Number,
2265
+ required: !0
2266
+ },
2267
+ columnSetIndex: {
2268
+ type: Number,
2269
+ required: !0
2270
+ },
2271
+ /**
2272
+ * Sets the row cells to the condensed padding state.
2273
+ */
2274
+ condensed: {
2275
+ type: Boolean,
2276
+ default: !1
2277
+ },
2278
+ /**
2279
+ * Columns being dragged, contains dragging column and a target column
2280
+ */
2281
+ draggingColumns: {
2282
+ type: Object,
2283
+ default: void 0
2284
+ },
2285
+ /**
2286
+ * A customisable method to retrieve a unique identifier for a data item in the array of data supplied.
2287
+ * This is used selecting and performance reasons and must exist in each data item.
2288
+ */
2289
+ getDataItemId: {
2290
+ type: Function,
2291
+ default: (e) => e.id
2292
+ },
2293
+ /**
2294
+ * Set to true if the cell has a darker background when zebra rows is enabled.
2295
+ */
2296
+ hasZebraBackground: {
2297
+ type: Boolean,
2298
+ default: !1
2299
+ },
2300
+ /**
2301
+ * Set to true if the row is selected.
2302
+ */
2303
+ isSelected: {
2304
+ type: Boolean,
2305
+ default: !1
2306
+ },
2307
+ /**
2308
+ * Set to true if the row is highlighted.
2309
+ */
2310
+ isHighlighted: {
2311
+ type: Boolean,
2312
+ default: !1
2313
+ },
2314
+ /**
2315
+ * The column hovered over state and whether the hovered over column should show a border right or left.
2316
+ */
2317
+ hoveredOverColumnState: {
2318
+ type: Object,
2319
+ required: !0
2320
+ },
2321
+ /**
2322
+ * A customisable method to determine if a row is not selectable.
2323
+ * The default is that every row is selectable.
2324
+ */
2325
+ isDataItemDisabled: {
2326
+ type: Function,
2327
+ default: () => !1
2328
+ },
2329
+ isMeasuringColumnWidths: {
2330
+ type: Boolean,
2331
+ default: !1
2332
+ },
2333
+ /**
2334
+ * Determines if the nested content is visible.
2335
+ */
2336
+ isNestedContentExpanded: {
2337
+ type: Boolean,
2338
+ default: !1
2339
+ },
2340
+ /**
2341
+ * Determines if the nest content slot is enabled for this data row.
2342
+ */
2343
+ nestedContent: {
2344
+ type: Boolean,
2345
+ default: !1
2346
+ },
2347
+ /**
2348
+ * The IDs of the rows this cell controls to show / hide them.
2349
+ */
2350
+ nestedRowsElementIds: {
2351
+ type: Array,
2352
+ default: () => []
2353
+ },
2354
+ /**
2355
+ * The row data object
2356
+ */
2357
+ rowData: {
2358
+ type: Object,
2359
+ required: !0
2360
+ },
2361
+ rowIndex: {
2362
+ type: Number,
2363
+ required: !0
2364
+ },
2365
+ /**
2366
+ * The row selection checkbox indeterminate state.
2367
+ */
2368
+ selectionIsIndeterminate: {
2369
+ type: Boolean,
2370
+ default: !1
2371
+ },
2372
+ /**
2373
+ * Determines if the row selection is enabled.
2374
+ */
2375
+ selectable: {
2376
+ type: Boolean,
2377
+ default: !1
2378
+ },
2379
+ selectedItems: {
2380
+ type: Array,
2381
+ required: !0
2382
+ }
2383
+ },
2384
+ emits: ["on-frozen-columns-key-press", "select-row", "register-row-cell-element", "cell-hovered", "nested-content-toggled"],
2385
+ setup(e, { expose: s, emit: i }) {
2386
+ const t = Lt(), u = At(t), { t: n } = Ge({ messages: On }), o = e, v = i, g = S(null), C = S(null), L = S(!1), O = S([]), D = S(!1), _ = S(), d = S(!1), I = w(() => {
2387
+ var R;
2388
+ return !!((R = o.rowData) != null && R[o.column.field]);
2389
+ }), $ = w(
2390
+ () => {
2391
+ var R;
2392
+ return o.column.field === ye && ((R = o.nestedRowsElementIds) == null ? void 0 : R.length) > 0 ? o.nestedRowsElementIds.join(" ") : void 0;
2393
+ }
2394
+ ), k = w(
2395
+ () => o.column.field === ye && !o.selectable && !o.nestedContent
2396
+ ), E = w(() => m(o.rowIndex, o.colIndex, o.columnSetIndex) === 0 && !d.value ? "0" : o.column.field === ye ? "-1" : D.value ? "0" : "-1"), b = (R, j) => (R == null ? void 0 : R.overflow) === yt.ELLIPSIS ? `${j}` : void 0, a = (R) => R ?? "-", p = (R) => o.columnSets.slice(0, R).reduce((j, { columnSet: q }) => j + q.length, 0), f = (R, j) => R + p(j), m = (R, j, q) => p() * R + f(j, q), h = (R) => {
2397
+ var j;
2398
+ (R === null || !g.value.contains(R) && !((j = O.value) != null && j.map((q) => q.value).some((q) => q === R || (q == null ? void 0 : q.contains(R))))) && (L.value = !1);
2399
+ }, z = () => {
2400
+ L.value = !1;
2401
+ }, V = S(!1), ue = (R) => {
2402
+ const j = {
2403
+ ...o.draggingEventsForRowCell(R),
2404
+ // Focus on the first interactive child in the grid cell if one exists
2405
+ focus: async () => {
2406
+ if (!fn())
2407
+ return;
2408
+ D.value = !0, d.value = !0, En(_.value), await be(), It(g.value) && (V.value = !0);
2409
+ },
2410
+ focusout: () => {
2411
+ fn() && (V.value = !1);
2412
+ },
2413
+ keydown: (K) => {
2414
+ K.key !== Ie.TAB && (V.value = !1, D.value = !1, Ze(g.value));
2415
+ }
2416
+ }, q = { ...j };
2417
+ return R.frozen && (q.keyup = (K) => v("on-frozen-columns-key-press", K), q.keydown = (K) => {
2418
+ j.keydown(K), v("on-frozen-columns-key-press", K);
2419
+ }), R.cellActions && (q.mouseenter = () => {
2420
+ L.value = !0;
2421
+ }, q.mouseleave = (K) => {
2422
+ h(K == null ? void 0 : K.relatedTarget);
2423
+ }, q.focus = async (K) => {
2424
+ j.focus(K), await be(), L.value = !0;
2425
+ }, q.focusout = (K) => {
2426
+ j.focusout(K), h(K == null ? void 0 : K.relatedTarget);
2427
+ }), q;
2428
+ };
2429
+ Ke(() => {
2430
+ _.value = Ze(g.value);
2431
+ });
2432
+ const se = () => {
2433
+ v("nested-content-toggled");
2434
+ };
2435
+ Ee(
2436
+ () => L.value,
2437
+ () => {
2438
+ L.value === !0 ? v("cell-hovered", o.rowIndex) : v("cell-hovered", -1);
2439
+ }
2440
+ ), dt(Bl, {
2441
+ registerMenuContainerElement: (R) => {
2442
+ O.value.push(R);
2443
+ },
2444
+ menuMouseLeave: (R) => {
2445
+ g.value.contains(R == null ? void 0 : R.relatedTarget) || (L.value = !1);
2446
+ }
2447
+ });
2448
+ const ce = Me(Ln, S(!1)), Ce = Me(
2449
+ et,
2450
+ w(() => !1)
2451
+ ), te = Me(gt, S(!1)), x = (R) => {
2452
+ var j, q, K, Ae, ze, r, W;
2453
+ return {
2454
+ [`b-data-grid-cell--${ve.COLUMN_HOVERED}`]: (R == null ? void 0 : R.field) === o.hoveredOverColumnState.hoveredOverColumnField,
2455
+ [`b-data-grid-cell--${ve.COLUMN_HOVERED_NO_BORDER_LEFT}`]: (R == null ? void 0 : R.field) === o.hoveredOverColumnState.hoveredOverColumnField && o.hoveredOverColumnState.noBorderLeft,
2456
+ [`b-data-grid-cell--${ve.COLUMN_HOVERED_NO_BORDER_RIGHT}`]: (R == null ? void 0 : R.field) === o.hoveredOverColumnState.hoveredOverColumnField && o.hoveredOverColumnState.noBorderRight,
2457
+ [`b-data-grid-cell--${ve.PADDING_LEFT_UNSET}`]: ((j = R == null ? void 0 : R.padding) == null ? void 0 : j.left) === !1,
2458
+ [`b-data-grid-cell--${ve.PADDING_RIGHT_UNSET}`]: ((q = R == null ? void 0 : R.padding) == null ? void 0 : q.right) === !1,
2459
+ [`b-data-grid-cell--${ve.NUMERIC}`]: R == null ? void 0 : R.numeric,
2460
+ [`b-data-grid-cell--${ve.CONDENSED}`]: o.condensed,
2461
+ [`b-data-grid-cell--${ve.OVERFLOW_ELLIPSIS}`]: (R == null ? void 0 : R.overflow) === yt.ELLIPSIS,
2462
+ [`b-data-grid-cell--${ve.IS_COLUMN_REORDERING}`]: ((K = o.draggingColumns.dragging) == null ? void 0 : K.field) === R.field,
2463
+ [`b-data-grid-cell--${ve.IS_COLUMN_REORDERING_TARGET_LEFT}`]: ((Ae = o.draggingColumns.target) == null ? void 0 : Ae.field) === R.field && ((ze = o.draggingColumns) == null ? void 0 : ze.dragToLeft),
2464
+ [`b-data-grid-cell--${ve.IS_COLUMN_REORDERING_TARGET_RIGHT}`]: ((r = o.draggingColumns.target) == null ? void 0 : r.field) === R.field && !((W = o.draggingColumns) != null && W.dragToLeft),
2465
+ [`b-data-grid-cell--${ve.FROZEN}`]: R == null ? void 0 : R.frozen,
2466
+ [`b-data-grid-cell--${ve.NESTED_CONTENT_ENABLED}`]: o.nestedContent,
2467
+ [`b-data-grid-cell--${ve.ACTION_COL_NESTED_CONTENT_ENABLED}`]: o.nestedContent && !o.selectable && R.field === ye,
2468
+ [`b-data-grid-cell--${ve.ACTION_COL_NESTED_CONTENT_AND_SELECTION_ENABLED}`]: o.nestedContent && o.selectable && R.field === ye,
2469
+ [`b-data-grid-cell--${ve.ACTION_COL_SELECTION_ENABLED}`]: R.field === ye && o.selectable,
2470
+ [`b-data-grid-cell--${ve.SLASHED_ZERO}`]: ce.value,
2471
+ "b-data-grid-cell--small-container": Ce.value
2472
+ };
2473
+ }, Re = w(() => ({
2474
+ "b-data-grid-cell__cell-content--is-focused-on-inside-interactive-element": V.value
2475
+ }));
2476
+ return s({
2477
+ gridcellRef: g
2478
+ }), (R, j) => {
2479
+ var q;
2480
+ return c(), A("div", oe({
2481
+ key: `cell-${e.column.field}`,
2482
+ ref_key: "gridcellRef",
2483
+ ref: g,
2484
+ "aria-hidden": k.value,
2485
+ "data-testid": `cell-${e.column.field}`,
2486
+ "data-cellindex": m(e.rowIndex, e.colIndex, e.columnSetIndex),
2487
+ class: ["b-data-grid-cell", x(e.column)],
2488
+ role: "gridcell",
2489
+ tabindex: E.value,
2490
+ "aria-colindex": f(e.colIndex, e.columnSetIndex) + 1,
2491
+ style: {
2492
+ width: e.column.autoWidth && e.isMeasuringColumnWidths ? "auto" : `${e.column.width}px`
2493
+ }
2494
+ }, ft(ue(e.column), !0)), [
2495
+ e.column.field === l(ye) ? (c(), A(we, { key: 0 }, [
2496
+ e.selectable ? (c(), H(l(ut), {
2497
+ key: 0,
2498
+ class: "b-data-grid-cell__select-cell",
2499
+ "aria-label": l(n)("selectRow"),
2500
+ disabled: e.isDataItemDisabled(e.rowData),
2501
+ indeterminate: e.selectionIsIndeterminate,
2502
+ "model-value": e.selectedItems,
2503
+ value: e.getDataItemId(e.rowData),
2504
+ tabindex: D.value ? 0 : -1,
2505
+ "onUpdate:modelValue": j[0] || (j[0] = (K) => R.$emit("select-row", K))
2506
+ }, null, 8, ["aria-label", "disabled", "indeterminate", "model-value", "value", "tabindex"])) : B("", !0),
2507
+ e.nestedContent ? (c(), H(l(Tt), {
2508
+ key: 1,
2509
+ ref: "menuButtonRef",
2510
+ "aria-haspopup": "true",
2511
+ "aria-controls": $.value,
2512
+ condensed: "",
2513
+ variant: "tertiary",
2514
+ toggled: e.isNestedContentExpanded,
2515
+ onClick: se
2516
+ }, {
2517
+ iconLeft: G(() => [
2518
+ e.isNestedContentExpanded ? (c(), H(l(Jl), {
2519
+ key: 0,
2520
+ class: "b-accordion-item__icon",
2521
+ "svg-title": l(n)("collapseNestedContent")
2522
+ }, null, 8, ["svg-title"])) : (c(), H(l(Yl), {
2523
+ key: 1,
2524
+ class: "b-accordion-item__icon",
2525
+ "svg-title": l(n)("expandNestedContent")
2526
+ }, null, 8, ["svg-title"]))
2527
+ ]),
2528
+ _: 1
2529
+ }, 8, ["aria-controls", "toggled"])) : B("", !0)
2530
+ ], 64)) : (c(), A(we, { key: 1 }, [
2531
+ X(l(Qe), {
2532
+ el: "div",
2533
+ class: re(["b-data-grid-cell__cell-content", Re.value]),
2534
+ "data-testid": "cell-content"
2535
+ }, {
2536
+ default: G(() => [
2537
+ ke(R.$slots, `item-${e.column.field}`, {
2538
+ item: e.rowData,
2539
+ rowIndex: e.rowIndex
2540
+ }, () => [
2541
+ T("span", {
2542
+ title: b(e.column, e.rowData[e.column.field])
2543
+ }, Y(a(e.rowData[e.column.field])), 9, Vs)
2544
+ ], !0)
2545
+ ]),
2546
+ _: 3
2547
+ }, 8, ["class"]),
2548
+ ((q = e.column.cellActions) == null ? void 0 : q.length) > 0 ? (c(), A("div", xs, [
2549
+ (L.value || l(te)) && (I.value || l(u)(`item-${e.column.field}`)) ? (c(), H(An, {
2550
+ key: 0,
2551
+ ref_key: "cellActionsRef",
2552
+ ref: C,
2553
+ "cell-actions": e.column.cellActions,
2554
+ "column-key": e.column.field,
2555
+ "row-data-item": e.rowData,
2556
+ "has-zebra-background": e.hasZebraBackground,
2557
+ "is-highlighted": e.isHighlighted,
2558
+ "is-selected": e.isSelected,
2559
+ "teleport-menu": "",
2560
+ onMenuItemClick: z
2561
+ }, null, 8, ["cell-actions", "column-key", "row-data-item", "has-zebra-background", "is-highlighted", "is-selected"])) : B("", !0)
2562
+ ])) : B("", !0)
2563
+ ], 64))
2564
+ ], 16, Gs);
2565
+ };
2566
+ }
2567
+ }), qs = /* @__PURE__ */ de(js, [["__scopeId", "data-v-2ef55c2a"]]), Ks = { class: "b-data-grid-row-container" }, Ys = ["id", "aria-selected"], Js = ["data-testid"], Xs = ["aria-colindex", "data-cellindex"], Qs = {
2568
+ key: 0,
2569
+ class: "b-data-grid-row-container__row-nested-rows-loading-container"
2570
+ }, ea = { key: 2 }, ta = {
2571
+ name: "data-grid-row"
2572
+ }, na = /* @__PURE__ */ Ue({
2573
+ ...ta,
2574
+ props: {
2575
+ /**
2576
+ * Row actions property that generates which button to show in row actions area
2577
+ */
2578
+ rowActions: {
2579
+ type: [Function, Array],
2580
+ default: void 0
2581
+ },
2582
+ /**
2583
+ * When true, will emit a 'rowClick' event when a row is clicked. Will add cursor: pointer to rows.
2584
+ */
2585
+ allowRowClicks: { type: Boolean, default: !1 },
2586
+ /**
2587
+ * The columns sets including
2588
+ */
2589
+ columnSets: {
2590
+ type: Array,
2591
+ required: !0
2592
+ },
2593
+ /**
2594
+ * Sets the row cells to the condensed padding state.
2595
+ */
2596
+ condensed: {
2597
+ type: Boolean,
2598
+ default: !1
2599
+ },
2600
+ /**
2601
+ * Columns being dragged, contains dragging column and a target column
2602
+ */
2603
+ draggingColumns: {
2604
+ type: Object,
2605
+ default: void 0
2606
+ },
2607
+ /**
2608
+ * Dragging event handlers for each row cell
2609
+ */
2610
+ draggingEventsForRowCell: {
2611
+ type: Function,
2612
+ required: !0
2613
+ },
2614
+ /**
2615
+ * A customisable method to retrieve a unique identifier for a data item in the array of data supplied.
2616
+ * This is used selecting and performance reasons and must exist in each data item.
2617
+ */
2618
+ getDataItemId: {
2619
+ type: Function,
2620
+ default: (e) => e.id
2621
+ },
2622
+ /**
2623
+ * Set to true if the datagrid has been scrolled and the left side has overflowing space.
2624
+ */
2625
+ hasLeftOverflow: {
2626
+ type: Boolean,
2627
+ default: !1
2628
+ },
2629
+ /**
2630
+ * Enables the nested content slot functionality.
2631
+ */
2632
+ hasNestedContent: {
2633
+ type: Boolean,
2634
+ default: !1
2635
+ },
2636
+ /**
2637
+ * Enables the nested content slot functionality.
2638
+ */
2639
+ hasNestedRows: {
2640
+ type: Boolean,
2641
+ default: !1
2642
+ },
2643
+ /**
2644
+ * Set to true if the datagrid has been scrolled and the right side has overflowing space.
2645
+ */
2646
+ hasRightOverflow: {
2647
+ type: Boolean,
2648
+ default: !1
2649
+ },
2650
+ /**
2651
+ * Highlighted row IDs.
2652
+ */
2653
+ highlightedRows: {
2654
+ type: Array,
2655
+ default: () => []
2656
+ },
2657
+ /**
2658
+ * The row index of a currently hovered row.
2659
+ */
2660
+ hoveredRowIndex: {
2661
+ type: Number,
2662
+ default: -1
2663
+ },
2664
+ /**
2665
+ * The column hovered over state and whether the hovered over column should show a border right or left.
2666
+ */
2667
+ hoveredOverColumnState: {
2668
+ type: Object,
2669
+ required: !0
2670
+ },
2671
+ /**
2672
+ * A customisable method to determine if a row is not selectable.
2673
+ * The default is that every row is selectable.
2674
+ */
2675
+ isDataItemDisabled: {
2676
+ type: Function,
2677
+ default: () => !1
2678
+ },
2679
+ /**
2680
+ * If the row is of an even number.
2681
+ * Rows are 0th based index e.g. index 0 is an odd-numbered row.
2682
+ */
2683
+ isRowEven: {
2684
+ type: Boolean,
2685
+ default: !1
2686
+ },
2687
+ /**
2688
+ * If the row is the last child in it's parent container.
2689
+ */
2690
+ isRowLastChild: {
2691
+ type: Boolean,
2692
+ default: !1
2693
+ },
2694
+ /**
2695
+ * If columns are being measured for the autoWidth functionality.
2696
+ */
2697
+ isMeasuringColumnWidths: {
2698
+ type: Boolean,
2699
+ default: !1
2700
+ },
2701
+ /**
2702
+ * Determines if this row is nested inside another row.
2703
+ */
2704
+ isNestedRow: {
2705
+ type: Boolean,
2706
+ default: !1
2707
+ },
2708
+ /**
2709
+ * The maximum width of the row actions in all rows
2710
+ */
2711
+ rowActionsMaximumWidth: {
2712
+ type: Number,
2713
+ default: 0
2714
+ },
2715
+ /**
2716
+ * The row data object
2717
+ */
2718
+ rowData: {
2719
+ type: Object,
2720
+ required: !0
2721
+ },
2722
+ /**
2723
+ * The row index.
2724
+ */
2725
+ rowIndex: {
2726
+ type: Number,
2727
+ required: !0
2728
+ },
2729
+ /**
2730
+ * The row ID to be using for the ID attribute.
2731
+ */
2732
+ rowId: {
2733
+ type: Number,
2734
+ default: void 0
2735
+ },
2736
+ /**
2737
+ * The number of rows that this row is within.
2738
+ */
2739
+ rowSetSize: {
2740
+ type: Number,
2741
+ default: 0
2742
+ },
2743
+ /**
2744
+ * Determines whether to render frozen seperator on the row.
2745
+ */
2746
+ showFrozenColumnsSeparator: {
2747
+ type: Boolean,
2748
+ default: !1
2749
+ },
2750
+ /**
2751
+ * Determines if the row selection is enabled.
2752
+ */
2753
+ selectable: {
2754
+ type: Boolean,
2755
+ default: !1
2756
+ },
2757
+ /**
2758
+ * The array of IDs for the selected rows.
2759
+ */
2760
+ selectedItems: {
2761
+ type: Array,
2762
+ required: !0
2763
+ },
2764
+ /**
2765
+ * Enables / Disables the nested-content slot
2766
+ */
2767
+ shouldShowNestedContent: {
2768
+ type: Function,
2769
+ default: (e) => !0
2770
+ },
2771
+ /**
2772
+ * Returns the nested rows for a given BentoDatagridDataItem.
2773
+ */
2774
+ shouldShowNestedRows: {
2775
+ type: Function,
2776
+ default: (e) => !0
2777
+ }
2778
+ },
2779
+ emits: ["cell-hovered", "on-frozen-columns-key-press", "select-row", "select-nested-row", "row-click", "nested-content-toggled"],
2780
+ setup(e, { expose: s, emit: i }) {
2781
+ const t = Lt(), u = At(t), n = e, o = i, v = S({}), g = S(!1), C = S(), L = S(), O = _t("nested-content-slot"), D = S(!1), _ = S();
2782
+ Ke(() => {
2783
+ L.value && (_.value = Ze(L.value));
2784
+ });
2785
+ const d = w(() => n.shouldShowNestedRows(n.rowData)), I = w(
2786
+ () => {
2787
+ var y, M;
2788
+ return !n.isNestedRow && n.hasNestedRows && d.value && ((M = (y = n.rowData) == null ? void 0 : y.children) == null ? void 0 : M.length) > 0;
2789
+ }
2790
+ ), $ = w(
2791
+ () => {
2792
+ var y, M;
2793
+ return !n.isNestedRow && n.hasNestedRows && d.value && (((y = n.rowData) == null ? void 0 : y.children) === void 0 || ((M = n == null ? void 0 : n.rowData) == null ? void 0 : M.children.length) === 0);
2794
+ }
2795
+ ), k = w(
2796
+ () => n.hasNestedContent && n.shouldShowNestedContent(n.rowData) || n.hasNestedRows && d.value && !n.isNestedRow
2797
+ ), E = w(() => {
2798
+ if (n.hasNestedContent || n.hasNestedRows) {
2799
+ const y = g.value.toString();
2800
+ return {
2801
+ "aria-expanded": k.value ? y : void 0,
2802
+ "aria-level": n.isNestedRow ? "2" : "1",
2803
+ "aria-posinset": n.rowIndex + 1,
2804
+ "aria-setsize": n.rowSetSize
2805
+ };
2806
+ }
2807
+ return { "aria-rowindex": n.rowIndex + 1 };
2808
+ }), b = w(() => {
2809
+ if ($.value)
2810
+ return {
2811
+ "aria-busy": "true",
2812
+ "aria-live": "polite"
2813
+ };
2814
+ if (!(I.value || !n.hasNestedContent || !n.shouldShowNestedContent(n.rowData)))
2815
+ return {
2816
+ "aria-level": n.isNestedRow ? "3" : "2",
2817
+ "aria-posinset": "1",
2818
+ "aria-setsize": "1",
2819
+ id: O,
2820
+ role: "row",
2821
+ tabindex: "-1"
2822
+ };
2823
+ }), a = w(() => {
2824
+ var y, M;
2825
+ return I.value ? (M = (y = n.rowData) == null ? void 0 : y.children) == null ? void 0 : M.reduce((J, ee, ne) => (J[ne] = _t("nested-row"), J), {}) : [];
2826
+ }), p = w(() => {
2827
+ var y;
2828
+ if (g.value) {
2829
+ if (n.hasNestedContent && n.shouldShowNestedContent(n.rowData))
2830
+ return [O];
2831
+ if (I.value && ((y = Object.keys(a.value)) == null ? void 0 : y.length) > 0) {
2832
+ const M = Object.values(a.value);
2833
+ if ((M == null ? void 0 : M.length) > 0)
2834
+ return M;
2835
+ }
2836
+ return [];
2837
+ }
2838
+ }), f = w(() => {
2839
+ var M, J;
2840
+ const y = (J = (M = n.rowData) == null ? void 0 : M.children) == null ? void 0 : J.map((ee) => n.getDataItemId(ee));
2841
+ if ((y == null ? void 0 : y.length) > 0) {
2842
+ const ee = y.every((ae) => {
2843
+ var Q;
2844
+ return (Q = n == null ? void 0 : n.selectedItems) == null ? void 0 : Q.includes(ae);
2845
+ }), ne = y.some((ae) => {
2846
+ var Q;
2847
+ return (Q = n == null ? void 0 : n.selectedItems) == null ? void 0 : Q.includes(ae);
2848
+ });
2849
+ return !ee && ne;
2850
+ }
2851
+ return !1;
2852
+ }), m = (y, M) => {
2853
+ const J = y;
2854
+ y !== null && (J != null && J.gridcellRef) && (v.value[M] = J.gridcellRef);
2855
+ }, h = (y) => a.value[y], z = (y) => {
2856
+ if (!n.selectable)
2857
+ return null;
2858
+ const M = n.getDataItemId(y);
2859
+ return n.selectedItems.includes(M).toString();
2860
+ }, V = (y) => {
2861
+ var ee;
2862
+ if (!n.allowRowClicks)
2863
+ return;
2864
+ let M = !1;
2865
+ const J = ["button", "input", "a"];
2866
+ for (let ne = 0; ne < J.length; ne++)
2867
+ if ((ee = y == null ? void 0 : y.target) != null && ee.closest(J[ne])) {
2868
+ M = !0;
2869
+ break;
2870
+ }
2871
+ M || o("row-click", n.rowData, y);
2872
+ }, ue = (y) => {
2873
+ o("select-row", y, n.rowData);
2874
+ }, se = (y, M) => {
2875
+ o("select-nested-row", M, n.rowData, y);
2876
+ }, pe = () => {
2877
+ D.value = !0;
2878
+ }, he = () => {
2879
+ D.value = !1;
2880
+ }, ce = () => {
2881
+ var y;
2882
+ En([(y = _.value) == null ? void 0 : y[0]]), It(L.value);
2883
+ }, Ce = () => {
2884
+ Ze(L.value);
2885
+ }, te = (y) => {
2886
+ var M, J;
2887
+ y.key !== Ie.TAB && Ze(L.value), y.key === Ie.ARROW_RIGHT && ((M = _.value) == null ? void 0 : M.length) > 1 && _.value[0].node === document.activeElement ? (Ze(L.value), _.value[1].node.setAttribute("tabindex", "0"), _.value[1].node.focus(), y.stopPropagation(), y.preventDefault()) : y.key === Ie.ARROW_LEFT && ((J = _.value) == null ? void 0 : J.length) > 1 && _.value[1].node === document.activeElement && (Ze(L.value), _.value[0].node.setAttribute("tabindex", "0"), _.value[0].node.focus(), y.stopPropagation(), y.preventDefault());
2888
+ }, x = () => n.columnSets.reduce((y, { columnSet: M }) => y + M.length, 0), Re = () => x() * n.rowIndex + x(), { updateContentHeight: R, contentHeight: j } = Kl(C, g), q = w(() => {
2889
+ var y;
2890
+ if (n.hasNestedContent || n.hasNestedRows)
2891
+ return {
2892
+ paddingLeft: `${I.value || $.value ? 0 : v.value[ye].offsetWidth + yn}px`,
2893
+ "max-height": (n.hasNestedContent || n.hasNestedRows) && j.value && !((y = j == null ? void 0 : j.value) != null && y.includes("null")) ? j.value : 0
2894
+ };
2895
+ });
2896
+ Ee(
2897
+ () => C.value,
2898
+ () => {
2899
+ let y = null;
2900
+ !y && C.value && (y = Ot(C.value, () => {
2901
+ C.value && R();
2902
+ }));
2903
+ }
2904
+ );
2905
+ const K = () => {
2906
+ g.value = !g.value, R(), o("nested-content-toggled", n.rowData);
2907
+ };
2908
+ Ee(
2909
+ () => {
2910
+ var y;
2911
+ return (y = n.rowData) == null ? void 0 : y.children;
2912
+ },
2913
+ (y, M) => {
2914
+ var J, ee;
2915
+ ((ee = (J = n == null ? void 0 : n.rowData) == null ? void 0 : J.children) == null ? void 0 : ee.length) > 0 && M === void 0 && !g.value && R();
2916
+ }
2917
+ );
2918
+ const Ae = Me(
2919
+ et,
2920
+ w(() => !1)
2921
+ ), ze = (y) => n.highlightedRows.includes(n.getDataItemId(y)), r = (y) => n.selectedItems.includes(n.getDataItemId(y)), W = (y, M) => ({
2922
+ "b-data-grid-row-container__row--disabled": n.isDataItemDisabled(y),
2923
+ "b-data-grid-row-container__row--row-clicks-enabled": n.allowRowClicks,
2924
+ "b-data-grid-row-container__row--highlighted": ze(y),
2925
+ "b-data-grid-row-container__row--selected": r(y),
2926
+ "b-data-grid-row-container__row--hovered": n.hoveredRowIndex === M,
2927
+ "b-data-grid-row-container__row--is-last-child": n.isRowLastChild && !g.value,
2928
+ "b-data-grid-row-container__row--nested-row": n.isNestedRow,
2929
+ "b-data-grid-row-container__row--zebra": n.isRowEven
2930
+ }), U = (y, M) => ({
2931
+ "b-data-grid-row-container__row-cell-set--frozen": y && !M,
2932
+ [`b-data-grid-row-container__row-cell-set--${$e.OVERFLOW_SHADOW_LEFT}`]: !M && y && n.hasLeftOverflow,
2933
+ "b-data-grid-row-container__row-cell-set--frozen-separator": !M && y && n.showFrozenColumnsSeparator,
2934
+ "b-data-grid-row-container__row-cell-set--unfrozen": !y || M,
2935
+ "b-data-grid-row-container__row-cell-set--is-measuring": n.isMeasuringColumnWidths
2936
+ }), fe = w(() => ({
2937
+ "b-data-grid-row-container__row-nested-slot--is-last-child": n.isRowLastChild,
2938
+ "b-data-grid-row-container__row-nested-slot": !I.value && n.shouldShowNestedContent(n.rowData)
2939
+ })), ge = w(() => ({
2940
+ "b-data-grid-row-container__row-actions-container--row-actions-menu-open": D.value
2941
+ })), Ve = w(() => ({
2942
+ minWidth: `${n.rowActionsMaximumWidth}px`
2943
+ }));
2944
+ return s({
2945
+ gridcellRefs: v,
2946
+ rowActionsRef: L
2947
+ }), (y, M) => {
2948
+ var J;
2949
+ return c(), A("div", Ks, [
2950
+ (c(), A("div", oe(E.value, {
2951
+ id: (J = e.rowId) == null ? void 0 : J.toString(),
2952
+ key: e.rowIndex,
2953
+ class: ["b-data-grid-row-container__row", W(e.rowData, e.rowIndex)],
2954
+ role: "row",
2955
+ "aria-selected": z(e.rowData),
2956
+ onClick: V,
2957
+ onKeyup: [
2958
+ Bt(V, ["enter"]),
2959
+ Bt(V, ["space"])
2960
+ ]
2961
+ }), [
2962
+ (c(!0), A(we, null, Le(e.columnSets, ({ columnSet: ee, id: ne, isFrozenColumns: ae }, Q) => (c(), A(we, null, [
2963
+ ee != null && ee.length ? (c(), A("div", {
2964
+ key: `data-grid-rows-${ne}`,
2965
+ class: re(["b-data-grid-row-container__cells", U(ae, l(Ae))]),
2966
+ "data-testid": `data-grid-${ne}-rows`
2967
+ }, [
2968
+ (c(!0), A(we, null, Le(ee, (Pe, mt) => (c(), H(l(qs), {
2969
+ key: `cell-${Pe.field}`,
2970
+ ref_for: !0,
2971
+ ref: (Be) => m(Be, Pe.field),
2972
+ class: "b-data-grid-row-container__cell",
2973
+ column: Pe,
2974
+ "column-set-index": Q,
2975
+ "col-index": mt,
2976
+ "column-sets": e.columnSets,
2977
+ condensed: e.condensed,
2978
+ "dragging-columns": e.draggingColumns,
2979
+ "dragging-events-for-row-cell": e.draggingEventsForRowCell,
2980
+ "get-data-item-id": e.getDataItemId,
2981
+ "has-zebra-background": e.isRowEven,
2982
+ "is-highlighted": ze(e.rowData),
2983
+ "is-selected": r(e.rowData),
2984
+ "hovered-over-column-state": e.hoveredOverColumnState,
2985
+ "is-data-item-disabled": e.isDataItemDisabled,
2986
+ "is-measuring-column-widths": e.isMeasuringColumnWidths,
2987
+ "is-nested-content-expanded": g.value,
2988
+ "nested-content": k.value,
2989
+ "nested-rows-element-ids": p.value,
2990
+ "row-data": e.rowData,
2991
+ "row-index": e.rowIndex,
2992
+ "selection-is-indeterminate": f.value,
2993
+ selectable: e.selectable,
2994
+ "selected-items": e.selectedItems,
2995
+ onCellHovered: M[0] || (M[0] = (Be) => o("cell-hovered", Be)),
2996
+ onOnFrozenColumnsKeyPress: M[1] || (M[1] = (Be) => o("on-frozen-columns-key-press", Be)),
2997
+ onSelectRow: ue,
2998
+ onNestedContentToggled: K
2999
+ }, qe({ _: 2 }, [
3000
+ Le(l(t), (Be, tt) => ({
3001
+ name: tt,
3002
+ fn: G((nt) => [
3003
+ ke(y.$slots, tt, oe({ ref_for: !0 }, nt), void 0, !0)
3004
+ ])
3005
+ }))
3006
+ ]), 1032, ["column", "column-set-index", "col-index", "column-sets", "condensed", "dragging-columns", "dragging-events-for-row-cell", "get-data-item-id", "has-zebra-background", "is-highlighted", "is-selected", "hovered-over-column-state", "is-data-item-disabled", "is-measuring-column-widths", "is-nested-content-expanded", "nested-content", "nested-rows-element-ids", "row-data", "row-index", "selection-is-indeterminate", "selectable", "selected-items"]))), 128))
3007
+ ], 10, Js)) : B("", !0),
3008
+ !ae && e.rowActions ? (c(), A("div", {
3009
+ key: `data-grid-row-actions-${ne}`,
3010
+ ref_for: !0,
3011
+ ref_key: "rowActionsRef",
3012
+ ref: L,
3013
+ "aria-colindex": x().toString(),
3014
+ class: re(["b-data-grid-row-container__row-actions-container", ge.value]),
3015
+ style: We(Ve.value),
3016
+ "data-cellindex": Re(),
3017
+ tabindex: "-1",
3018
+ role: "gridcell",
3019
+ onFocus: ce,
3020
+ "on:focusOut": Ce,
3021
+ onKeydown: te
3022
+ }, [
3023
+ X(l(An), {
3024
+ class: "b-data-grid-row-container__row-actions",
3025
+ "disable-arrow-down-opening-menu": "",
3026
+ "cell-actions": e.rowActions,
3027
+ "has-right-overflow": e.hasRightOverflow,
3028
+ "row-data-item": e.rowData,
3029
+ "teleport-menu": "",
3030
+ onMenuOpen: pe,
3031
+ onMenuClose: he
3032
+ }, null, 8, ["cell-actions", "has-right-overflow", "row-data-item"])
3033
+ ], 46, Xs)) : B("", !0)
3034
+ ], 64))), 256))
3035
+ ], 16, Ys)),
3036
+ e.hasNestedContent && l(u)("nested-slot") && e.shouldShowNestedContent(e.rowData) || e.hasNestedRows && d.value ? (c(), H(mn, {
3037
+ key: `${e.rowIndex}-nest-content`,
3038
+ name: "b-data-grid-row-container__animation--nested-content"
3039
+ }, {
3040
+ default: G(() => [
3041
+ g.value ? (c(), A("div", oe({ key: 0 }, b.value, {
3042
+ class: fe.value,
3043
+ "data-testid": "nested-content-container",
3044
+ style: q.value
3045
+ }), [
3046
+ T("div", {
3047
+ ref_key: "nestedContentRef",
3048
+ ref: C
3049
+ }, [
3050
+ $.value ? (c(), A("div", Qs, [
3051
+ X(l(Rt))
3052
+ ])) : I.value ? (c(!0), A(we, { key: 1 }, Le(e.rowData.children, (ee, ne) => (c(), H(Tn, oe({ ref_for: !0 }, n, {
3053
+ id: h(ne),
3054
+ key: `child-${ne}`,
3055
+ "row-data": ee,
3056
+ "row-index": ne,
3057
+ "row-set-size": e.rowData.children.length,
3058
+ "is-nested-row": "",
3059
+ onCellHovered: M[2] || (M[2] = (ae) => o("cell-hovered", ae)),
3060
+ onRowClick: M[3] || (M[3] = (ae) => o("row-click", ...ae)),
3061
+ onOnFrozenColumnsKeyPress: M[4] || (M[4] = (ae) => o("on-frozen-columns-key-press", ae)),
3062
+ onSelectRow: (ae) => se(ee, ae)
3063
+ }), qe({ _: 2 }, [
3064
+ Le(l(t), (ae, Q) => ({
3065
+ name: Q,
3066
+ fn: G((Pe) => [
3067
+ ke(y.$slots, Q, oe({ ref_for: !0 }, Pe), void 0, !0)
3068
+ ])
3069
+ }))
3070
+ ]), 1040, ["id", "row-data", "row-index", "row-set-size", "onSelectRow"]))), 128)) : l(u)("nested-slot") && e.shouldShowNestedContent(e.rowData) ? (c(), A("div", ea, [
3071
+ ke(y.$slots, "nested-slot", { item: e.rowData }, void 0, !0)
3072
+ ])) : B("", !0)
3073
+ ], 512)
3074
+ ], 16)) : B("", !0)
3075
+ ]),
3076
+ _: 3
3077
+ })) : B("", !0)
3078
+ ]);
3079
+ };
3080
+ }
3081
+ }), Tn = /* @__PURE__ */ de(na, [["__scopeId", "data-v-e81349a5"]]);
3082
+ let gn = 0;
3083
+ const la = {
3084
+ beforeCreate() {
3085
+ this.uuid = gn.toString(), gn += 1;
3086
+ }
3087
+ }, oa = { key: 0 }, sa = ["clip-path"], aa = ["id"];
3088
+ function ia(e, s, i, t, u, n) {
3089
+ return c(), A("svg", oe({ role: "img" }, e.$attrs, {
3090
+ class: "ui-assets-icons-16",
3091
+ xmlns: "http://www.w3.org/2000/svg",
3092
+ width: "16",
3093
+ height: "16",
3094
+ fill: "none"
3095
+ }), [
3096
+ e.$attrs["svg-title"] ? (c(), A("title", oa, Y(e.$attrs["svg-title"]), 1)) : B("", !0),
3097
+ T("g", {
3098
+ "clip-path": "url(#uia-ui-assets/icons-16-warning_circle_fill__a" + e.uuid + ")"
3099
+ }, s[0] || (s[0] = [
3100
+ T("path", {
3101
+ fill: "#001222",
3102
+ d: "M8 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 8C0.25 3.71979 3.71979 0.25 8 0.25ZM8 9.75C7.44772 9.75 7 10.1977 7 10.75C7 11.3023 7.44772 11.75 8 11.75C8.55228 11.75 9 11.3023 9 10.75C9 10.1977 8.55228 9.75 8 9.75ZM7.25 4.25V8.75H8.75V4.25H7.25Z"
3103
+ }, null, -1)
3104
+ ]), 8, sa),
3105
+ T("defs", null, [
3106
+ T("clipPath", {
3107
+ id: "uia-ui-assets/icons-16-warning_circle_fill__a" + e.uuid
3108
+ }, s[1] || (s[1] = [
3109
+ T("rect", {
3110
+ width: "16",
3111
+ height: "16",
3112
+ fill: "#fff"
3113
+ }, null, -1)
3114
+ ]), 8, aa)
3115
+ ])
3116
+ ], 16);
3117
+ }
3118
+ const ra = /* @__PURE__ */ de(la, [["render", ia]]), da = ["aria-label"], ua = {}, ca = /* @__PURE__ */ Ue({
3119
+ ...ua,
3120
+ __name: "data-grid-static-icon",
3121
+ props: {
3122
+ colored: { type: Boolean, default: !1 },
3123
+ tooltipText: {},
3124
+ variant: { default: "no-value" }
3125
+ },
3126
+ setup(e) {
3127
+ const s = e, i = w(() => {
3128
+ switch (s.variant) {
3129
+ case "checkmark":
3130
+ return Sl;
3131
+ case "warning":
3132
+ return Ll;
3133
+ case "error":
3134
+ return ra;
3135
+ case "cross":
3136
+ return hn;
3137
+ case "no-value":
3138
+ return Wt;
3139
+ default:
3140
+ return Wt;
3141
+ }
3142
+ }), t = w(() => ({
3143
+ "b-data-grid-static-icon--colored": s.colored && s.variant !== "no-value"
3144
+ })), u = w(() => `b-data-grid-static-icon__${s.variant}`), n = w(() => Tl.AUTO);
3145
+ return (o, v) => St((c(), A("div", {
3146
+ "aria-label": o.tooltipText,
3147
+ class: re(["b-data-grid-static-icon", t.value]),
3148
+ tabindex: "0"
3149
+ }, [
3150
+ (c(), H(Je(i.value), {
3151
+ class: re(u.value),
3152
+ "svg-title": o.tooltipText
3153
+ }, null, 8, ["class", "svg-title"]))
3154
+ ], 10, da)), [
3155
+ [l(Rl), o.tooltipText, n.value]
3156
+ ]);
3157
+ }
3158
+ }), hi = /* @__PURE__ */ de(ca, [["__scopeId", "data-v-b8c9e150"]]), In = {
3159
+ "de-DE": {
3160
+ numberResults: "1 Ergebnis | {count} Ergebnisse"
3161
+ },
3162
+ "en-US": {
3163
+ numberResults: "1 result | {count} results"
3164
+ },
3165
+ "es-ES": {
3166
+ numberResults: "1 resultado | {count} resultados"
3167
+ },
3168
+ "fr-FR": {
3169
+ numberResults: "1 résultat | {count} résultats"
3170
+ },
3171
+ "ja-JP": {
3172
+ numberResults: "結果が見つかりませんでした | {count}件の結果"
3173
+ },
3174
+ "pt-BR": {
3175
+ numberResults: "1 resultado | {count} resultados"
3176
+ }
3177
+ }, fa = { class: "b-data-grid-summary-cell" }, ga = { class: "b-data-grid-summary-cell__list" }, va = {
3178
+ i18n: { messages: In }
3179
+ }, ma = /* @__PURE__ */ Ue({
3180
+ ...va,
3181
+ __name: "data-grid-summary-cell",
3182
+ props: {
3183
+ label: {},
3184
+ items: {},
3185
+ dashedUnderline: { default: () => ({}) },
3186
+ searchTerm: { default: "" },
3187
+ tooltipText: { default: null }
3188
+ },
3189
+ setup(e) {
3190
+ const { tc: s } = Ge({ messages: In }), i = e, t = S(), u = w(() => {
3191
+ var C;
3192
+ return {
3193
+ popoverPosition: "right",
3194
+ // Default is right but can be overriden
3195
+ ...i.dashedUnderline,
3196
+ popoverTitle: ((C = i == null ? void 0 : i.dashedUnderline) == null ? void 0 : C.popoverTitle) ?? i.label,
3197
+ // We force teleport as this is needed for the popover to appear above all the data grid elements
3198
+ teleport: {
3199
+ disabled: !1
3200
+ }
3201
+ };
3202
+ }), n = w(() => {
3203
+ var C;
3204
+ return ((C = i.searchTerm) == null ? void 0 : C.toLowerCase()) ?? "";
3205
+ }), o = (C) => i.searchTerm && C.toLowerCase().includes(n.value) ? "mark" : "span", v = w(() => i.searchTerm ? i.items.filter((C) => C.toLowerCase().includes(n.value)).length : 0), g = w(
3206
+ () => i.tooltipText ?? (v.value > 0 ? s("numberResults", v.value) : "")
3207
+ );
3208
+ return (C, L) => (c(), A("div", fa, [
3209
+ C.items.length > 1 ? (c(), H(l(Il), oe({
3210
+ key: 0,
3211
+ ref_key: "dashedUnderlineRef",
3212
+ ref: t
3213
+ }, u.value), {
3214
+ "popover-content": G(() => [
3215
+ X(l(Qe), { class: "b-data-grid-summary-cell__popover-content" }, {
3216
+ default: G(() => [
3217
+ T("ul", ga, [
3218
+ (c(!0), A(we, null, Le(C.items, (O) => (c(), A("li", { key: O }, [
3219
+ (c(), H(Je(o(O)), null, {
3220
+ default: G(() => [
3221
+ me(Y(O), 1)
3222
+ ]),
3223
+ _: 2
3224
+ }, 1024))
3225
+ ]))), 128))
3226
+ ])
3227
+ ]),
3228
+ _: 1
3229
+ })
3230
+ ]),
3231
+ default: G(() => [
3232
+ me(Y(C.label) + " ", 1)
3233
+ ]),
3234
+ _: 1
3235
+ }, 16)) : (c(), A(we, { key: 1 }, [
3236
+ me(Y(C.items[0]), 1)
3237
+ ], 64)),
3238
+ t.value && g.value ? (c(), H(l(Al), {
3239
+ key: 2,
3240
+ content: g.value,
3241
+ "disabled-focus-trap": !0,
3242
+ position: l(Ol).RIGHT,
3243
+ "fallback-position": ["left", "bottom"],
3244
+ "is-shown": !!g.value,
3245
+ "target-element": t.value
3246
+ }, null, 8, ["content", "position", "is-shown", "target-element"])) : B("", !0)
3247
+ ]));
3248
+ }
3249
+ }), Ci = /* @__PURE__ */ de(ma, [["__scopeId", "data-v-0ada93f3"]]), ha = ["aria-rowcount", "aria-colcount", "aria-label", "role", "aria-busy"], Ca = {
3250
+ key: 1,
3251
+ class: "b-data-grid__header"
3252
+ }, wa = ["tabindex"], ba = {
3253
+ key: 0,
3254
+ class: "b-data-grid__loading"
3255
+ }, _a = {
3256
+ key: 1,
3257
+ class: "b-data-grid__empty-state"
3258
+ }, ya = {
3259
+ key: 5,
3260
+ class: "b-data-grid__footer"
3261
+ }, Ea = {
3262
+ i18n: { messages: vt },
3263
+ name: "bento-data-grid"
3264
+ }, pa = /* @__PURE__ */ Ue({
3265
+ ...Ea,
3266
+ props: {
3267
+ /**
3268
+ * When true, will emit a 'rowClick' event when a row is clicked. Will add cursor: pointer to rows.
3269
+ */
3270
+ allowRowClicks: { type: Boolean, default: !1 },
3271
+ /**
3272
+ * When true, column headers will become draggable, allowing users to rearrange columns.
3273
+ */
3274
+ allowColumnDragAndDrop: { type: Boolean, default: !0 },
3275
+ /**
3276
+ * List of actions that will be rendered in the action bar when user selects items.
3277
+ *
3278
+ * Each object in the list should have a `title`, an `event` and,
3279
+ * optionally, an `icon`.
3280
+ *
3281
+ * The component will display 4 actions and the hide the rest inside a menu.
3282
+ *
3283
+ * @see BentoButton for a list of all the other props supported by each button action.
3284
+ */
3285
+ bulkActions: {
3286
+ type: Array,
3287
+ default: null
3288
+ },
3289
+ /**
3290
+ * Sets the row cells to the condensed padding state.
3291
+ */
3292
+ condensed: {
3293
+ type: Boolean,
3294
+ default: !1
3295
+ },
3296
+ /**
3297
+ * Column definitions using 'key' to relate to data object.
3298
+ */
3299
+ columns: {
3300
+ type: Array,
3301
+ required: !0
3302
+ },
3303
+ /**
3304
+ * Enables / hides the display options panel and the column contextual menu functionality.
3305
+ */
3306
+ columnPanel: { type: Boolean, default: !1 },
3307
+ /**
3308
+ * An array of data objects to display.
3309
+ */
3310
+ data: {
3311
+ type: Array,
3312
+ required: !0
3313
+ },
3314
+ /**
3315
+ * Empty state props that will be passed down to inner empty-state component
3316
+ */
3317
+ emptyState: {
3318
+ type: Object,
3319
+ default: void 0
3320
+ },
3321
+ /**
3322
+ * filter-bar value (i.e. filters) that will be passed down to inner filter-bar component
3323
+ * {@see BentoFilterBarModel}
3324
+ */
3325
+ filters: {
3326
+ // TODO: Change this to BentoFilterBarProps['value'] when the interface is available
3327
+ type: Array,
3328
+ default: void 0
3329
+ },
3330
+ /**
3331
+ * Defines the layout (multi-line or one-line) to be used in the filter bar for different
3332
+ * container sizes:
3333
+ * - Large (>=700px): Always multi-line
3334
+ * - Medium (>=430px & <700px)
3335
+ * - Small (<430px)
3336
+ *
3337
+ * @default
3338
+ * {
3339
+ * medium: 'multi-line',
3340
+ * small: 'one-line'
3341
+ * }
3342
+ */
3343
+ filtersContainerSizeLayout: {
3344
+ type: Object,
3345
+ default: void 0
3346
+ },
3347
+ /**
3348
+ * An array of the values for each filter set in `value`.
3349
+ * {@see BentoFilterValues}
3350
+ */
3351
+ filterValues: {
3352
+ type: Ct.props.filterValues.type,
3353
+ default: () => []
3354
+ },
3355
+ /**
3356
+ * An object of the values for each filter in the filter bar where key is a the field name and the value is the BentoFilterBarValue.
3357
+ *
3358
+ * @example
3359
+ * {
3360
+ * 'company': '200',
3361
+ * 'name': 'some text'
3362
+ * },
3363
+ */
3364
+ filterValuesObject: {
3365
+ type: Object,
3366
+ default: () => {
3367
+ }
3368
+ },
3369
+ // TODO: Move this prop as a part of "config" BentoFilterBarModel = Array<BentoFilterModel | BentoFilterSearchModel> in Bento 2.0.
3370
+ // It was not done now because it's a breaking change for the types.
3371
+ /**
3372
+ * Filter's search bar properties with which the placeholder, hint and other
3373
+ * "bento-search-bar" properties can be set. @see {@link BentoFilterBarSearchBarProps}
3374
+ */
3375
+ filterSearchConfig: {
3376
+ type: Object,
3377
+ default: void 0
3378
+ },
3379
+ /**
3380
+ * Filter bar search term useful to filter all the data by text
3381
+ */
3382
+ filterSearchTerm: {
3383
+ type: Ct.props.searchTerm.type,
3384
+ default: void 0
3385
+ },
3386
+ /**
3387
+ * Allows the grid to be rendered inside a confined space.
3388
+ * This makes the data-grid expand to fill the height of its parent container, with the grid body becoming scrollable.
3389
+ */
3390
+ fitContent: { type: Boolean, default: !1 },
3391
+ /**
3392
+ * A customisable method to retrieve a unique identifier for a data item in the array of data supplied.
3393
+ * This is used selecting and performance reasons and must exist in each data item.
3394
+ */
3395
+ getDataItemId: {
3396
+ type: Function,
3397
+ default: (e) => e.id
3398
+ },
3399
+ /**
3400
+ * Row actions propery that generates which button to show in row actions area
3401
+ */
3402
+ rowActions: {
3403
+ type: [Function, Array],
3404
+ default: void 0
3405
+ },
3406
+ /**
3407
+ * If resize is enabled
3408
+ */
3409
+ hasResizableColumns: {
3410
+ type: Boolean,
3411
+ default: !0
3412
+ },
3413
+ /**
3414
+ * Enables the nested content slot functionality.
3415
+ */
3416
+ hasNestedContent: {
3417
+ type: Boolean,
3418
+ default: !1
3419
+ },
3420
+ /**
3421
+ * Enables the nested content slot functionality.
3422
+ */
3423
+ hasNestedRows: {
3424
+ type: Boolean,
3425
+ default: !1
3426
+ },
3427
+ /**
3428
+ * Highlighted items
3429
+ */
3430
+ highlightedRows: {
3431
+ type: Array,
3432
+ default: () => []
3433
+ },
3434
+ /**
3435
+ * A customisable method to determine if a row is not selectable.
3436
+ * The default is that every row is selectable.
3437
+ */
3438
+ isDataItemDisabled: {
3439
+ type: Function,
3440
+ default: () => !1
3441
+ },
3442
+ /**
3443
+ * The type of `Lazy Load`.
3444
+ * Type "automatic" will enable infinite scrolling
3445
+ * Type "button" will enable lazy loading with "Show more" button
3446
+ * @values automatic, button, none
3447
+ */
3448
+ lazyLoadType: {
3449
+ type: String,
3450
+ default: "none",
3451
+ validator: (e) => ["automatic", "button", "none"].includes(e)
3452
+ },
3453
+ /**
3454
+ * If the loading indicator should be shown.
3455
+ */
3456
+ loading: {
3457
+ type: Boolean,
3458
+ default: !1
3459
+ },
3460
+ /**
3461
+ * Enables / Disables the table's surrounding border.
3462
+ */
3463
+ outline: {
3464
+ type: Boolean,
3465
+ default: !1
3466
+ },
3467
+ /**
3468
+ * Renders the data grid with no top spacing, to render inside containers that already have spacing
3469
+ */
3470
+ noSpacingTop: {
3471
+ type: Boolean,
3472
+ default: !1
3473
+ },
3474
+ /**
3475
+ * Pagination props that will be passed down to inner pagination component
3476
+ */
3477
+ pagination: {
3478
+ type: Object,
3479
+ default: void 0
3480
+ },
3481
+ /**
3482
+ * Adds an extra option when selecting all items that allows user to select items in other pages too.
3483
+ * Needs pagination.totalCount to be set.
3484
+ */
3485
+ selectableAcrossPages: {
3486
+ type: Boolean,
3487
+ default: !1
3488
+ },
3489
+ /**
3490
+ * Renders a font numeric style with slashed zeros instead of normal ones.
3491
+ */
3492
+ slashedZero: { type: Boolean, default: !1 },
3493
+ /**
3494
+ * Sticks the horizontal scrollbar to the bottom of the screen if the data-grid is larger than the screen height.
3495
+ */
3496
+ stickyHorizontalScrollbar: {
3497
+ type: Boolean,
3498
+ default: !1
3499
+ },
3500
+ /**
3501
+ * Make pagination stick to the bottom of the page when the data-grid is bigger than the screen.
3502
+ * Because styles have to be applied to pagination container element, this has to be a data-grid prop (rather than a pagination prop).
3503
+ */
3504
+ stickyPagination: {
3505
+ type: Boolean,
3506
+ default: !1
3507
+ },
3508
+ /**
3509
+ * Make data-grid filters stick to the top of the page along with the data-grid headers.
3510
+ * Defaults to true.
3511
+ */
3512
+ stickyFilters: {
3513
+ type: Boolean,
3514
+ default: !0
3515
+ },
3516
+ /**
3517
+ * Enables / Disables rows to be selected via a checkbox. On select the "select" event will be emitted.
3518
+ */
3519
+ selectable: {
3520
+ type: Boolean,
3521
+ default: !1
3522
+ },
3523
+ /**
3524
+ * Selected items
3525
+ */
3526
+ selection: {
3527
+ type: Array,
3528
+ default: () => []
3529
+ },
3530
+ /**
3531
+ * Enables / Disables the nested-content slot
3532
+ */
3533
+ shouldShowNestedContent: {
3534
+ type: Function,
3535
+ default: (e) => !0
3536
+ },
3537
+ /**
3538
+ * Returns the nested rows for a given BentoDatagridDataItem.
3539
+ */
3540
+ shouldShowNestedRows: {
3541
+ type: Function,
3542
+ default: (e) => !0
3543
+ },
3544
+ /**
3545
+ * Sortby handles proper rendering of sort icon in header. Sorting currently is only supported server side.
3546
+ * It does make sure the currently sorted column has a more visible sort icon, and the sort icon points in the right direction.
3547
+ */
3548
+ sortBy: {
3549
+ type: Array,
3550
+ // NOTE: is an array to allow multi-sorting in the future
3551
+ default: () => []
3552
+ },
3553
+ /**
3554
+ * Title of the data grid to be rendered as tab title when a data grid is passed in a tab layout.
3555
+ */
3556
+ tabTitle: {
3557
+ type: String,
3558
+ default: null
3559
+ },
3560
+ /**
3561
+ * Truncates all data grid column headers
3562
+ */
3563
+ truncateColumnHeaders: {
3564
+ type: Boolean,
3565
+ default: !1
3566
+ },
3567
+ /**
3568
+ * Toggles the alternating background color of rows.
3569
+ */
3570
+ zebraRows: {
3571
+ type: Boolean,
3572
+ default: !1
3573
+ }
3574
+ },
3575
+ emits: [
3576
+ F.COLUMNS,
3577
+ F.COLUMN_RESIZE,
3578
+ F.ITEMS_PAGE,
3579
+ F.FILTER_SEARCH_INPUT,
3580
+ F.FILTER_SEARCH_CLEAR,
3581
+ F.NAVIGATE,
3582
+ F.NESTED_CONTENT_TOGGLED,
3583
+ F.UPDATE_COLUMNS,
3584
+ F.UPDATE_CONDENSED,
3585
+ F.UPDATE_FILTER_VALUES,
3586
+ F.UPDATE_FILTER_VALUES_OBJECT,
3587
+ F.UPDATE_FILTERS,
3588
+ F.UPDATE_FILTER_SEARCH_TERM,
3589
+ F.UPDATE_SHOW_MORE,
3590
+ F.UPDATE_PAGINATION,
3591
+ F.UPDATE_SELECTION,
3592
+ F.UPDATE_SORT_BY,
3593
+ F.ROW_CLICK,
3594
+ F.SELECT,
3595
+ F.SELECT_ALL_ACROSS_PAGES,
3596
+ F.SORT
3597
+ ],
3598
+ setup(e, { expose: s, emit: i }) {
3599
+ const t = e, u = Lt(), n = At(u), o = S(null), v = S(), g = S({}), C = S(null), L = S(null), O = S(), D = S(null), _ = S(null), d = S(null), {
3600
+ allowColumnDragAndDrop: I,
3601
+ columns: $,
3602
+ columnPanel: k,
3603
+ data: E,
3604
+ lazyLoadType: b,
3605
+ loading: a,
3606
+ hasNestedContent: p,
3607
+ hasNestedRows: f,
3608
+ selectable: m,
3609
+ selection: h,
3610
+ selectableAcrossPages: z,
3611
+ stickyPagination: V,
3612
+ outline: ue,
3613
+ pagination: se,
3614
+ zebraRows: pe
3615
+ } = pt(t), he = S(-1), { t: ce } = Ge({ messages: vt }), Ce = w(() => fe.value.filter((N) => N.frozen).length), te = 550, x = S(), { width: Re } = Fl(x), R = w(() => Re.value <= te);
3616
+ dt(et, R);
3617
+ const j = S(!1);
3618
+ Ke(() => {
3619
+ typeof window < "u" && (j.value = "ontouchstart" in window || (navigator == null ? void 0 : navigator.maxTouchPoints) > 0);
3620
+ }), dt(gt, j);
3621
+ const q = Me(
3622
+ zl,
3623
+ () => ({
3624
+ additionalContentSlotRef: S(null),
3625
+ isDataGridTemplate: !1,
3626
+ stickyAditionalContent: S(!1),
3627
+ stickyTabs: S(!1),
3628
+ tabsRef: S(null)
3629
+ })
3630
+ ), { additionalContentSlotRef: K, isDataGridTemplate: Ae, stickyTabs: ze, tabsRef: r, stickyAdditionalContent: W } = q(), U = w(() => Ae ? 0 : null), {
3631
+ columnDefs: fe,
3632
+ onColumnWidthOverride: ge,
3633
+ gridRowWidthStyle: Ve,
3634
+ isMeasuringColumnWidths: y,
3635
+ isTotalWidthOfColumnsTakingUpAllAvailableGridWidth: M,
3636
+ columns: J,
3637
+ totalWidthOfAllColumns: ee,
3638
+ rowActionsMaxWidth: ne
3639
+ } = uo($, E, o, g, C, {
3640
+ hasColumnPanel: k,
3641
+ hasSelectableColumn: m,
3642
+ hasSelectableAcrossPages: z,
3643
+ hasNestedContent: p,
3644
+ hasNestedRows: f,
3645
+ allowColumnDragAndDrop: I,
3646
+ isDataGridTemplate: Ae
3647
+ }), ae = i, Q = (N, ...P) => {
3648
+ (N === F.COLUMNS || N === F.UPDATE_COLUMNS) && ([J.value] = P), ae(N, ...P);
3649
+ }, Pe = Yt(
3650
+ r,
3651
+ ze,
3652
+ W,
3653
+ K
3654
+ ), mt = w(
3655
+ () => t.stickyFilters ? `${Pe.value}px` : null
3656
+ ), Be = Yt(L, wt(t, "stickyFilters")), tt = w(
3657
+ () => `${Be.value + Pe.value}px`
3658
+ ), {
3659
+ sortedColumns: nt,
3660
+ columnSets: lt,
3661
+ isOnlyOneVisibleColumn: Nn,
3662
+ internalZebraRows: ht,
3663
+ onConfigSettingsColumnsUpdate: Dn,
3664
+ onConfigSettingsColumnUpdate: $n,
3665
+ onConfigSettingsCondensedUpdate: kn,
3666
+ onConfigSettingsZebraRowsUpdate: Mn
3667
+ } = Co(fe, pe, Q), { hoveredOverColumn: Un, hoveredOverColumnState: Nt } = bo(
3668
+ lt,
3669
+ m,
3670
+ ue,
3671
+ M
3672
+ ), { draggingColumns: Dt, draggingEventsForColumns: zn, draggingEventsForRowCell: Fn, onMoveColumnByOffset: Pn } = ho(nt, I, Q), $t = w(
3673
+ () => {
3674
+ var N;
3675
+ return ((N = t.data) == null ? void 0 : N.length) > 0 && !!t.selectableAcrossPages && !!t.pagination && t.pagination.totalCount > 0;
3676
+ }
3677
+ ), {
3678
+ onAllRowSelect: kt,
3679
+ onRowSelect: Bn,
3680
+ onNestedRowSelect: Wn,
3681
+ onDeselectAll: Hn,
3682
+ selectedItems: ot,
3683
+ allItemsSelectedState: Gn,
3684
+ isEveryItemSelected: Vn,
3685
+ isEveryItemAcrossPagesSelected: xn
3686
+ } = co(
3687
+ h,
3688
+ Q,
3689
+ E,
3690
+ t.getDataItemId,
3691
+ t.isDataItemDisabled,
3692
+ $t,
3693
+ se
3694
+ ), { navigationInput: st } = go(
3695
+ C,
3696
+ g,
3697
+ nt,
3698
+ m,
3699
+ w(() => t.rowActions !== void 0),
3700
+ k
3701
+ ), { isLazyLoad: Ye, isInfiniteScroll: Zn, verticalScrollPosition: jn, emitLazyLoadEvent: qn } = mo(
3702
+ b,
3703
+ _,
3704
+ o,
3705
+ a,
3706
+ Q
3707
+ ), {
3708
+ updateScrollPosition: at,
3709
+ updateScrollPositionOnFrozenColumnsNavigation: Kn,
3710
+ syncVirtualScrollerWithBody: Mt,
3711
+ hasLeftOverflow: it,
3712
+ hasRightOverflow: Ut,
3713
+ horizontalScrollbarConditionalStyles: Yn
3714
+ } = wo(
3715
+ o,
3716
+ v,
3717
+ jn,
3718
+ d,
3719
+ D,
3720
+ ee,
3721
+ {
3722
+ isLazyLoad: Ye,
3723
+ pagination: se,
3724
+ stickyPagination: V,
3725
+ isDataGridTemplate: Ae
3726
+ }
3727
+ ), Jn = () => {
3728
+ O.value.isClearAllVisible ? O.value.clearAllFilters() : O.value.isResetAllVisible && O.value.resetAllFilters();
3729
+ }, Xn = w(() => {
3730
+ var N, P;
3731
+ return {
3732
+ ...t.emptyState,
3733
+ variant: ((N = t.emptyState) == null ? void 0 : N.variant) === "embedded" || ((P = t.emptyState) == null ? void 0 : P.variant) === "basic" ? t.emptyState.variant : "basic"
3734
+ };
3735
+ }), Qn = w(() => ({
3736
+ [`b-data-grid--${$e.OUTLINE}`]: t.outline,
3737
+ [`b-data-grid--${$e.SCROLL}`]: t.fitContent || Ye.value,
3738
+ [`b-data-grid--${$e.STICKY_FILTERS}`]: t.filters && t.stickyFilters,
3739
+ [`b-data-grid--${$e.OVERFLOW_SHADOW_LEFT}`]: it.value && !Ce.value,
3740
+ [`b-data-grid--${$e.OVERFLOW_SHADOW_RIGHT}`]: Ut.value && t.rowActions === void 0,
3741
+ [`b-data-grid--${$e.NO_SPACING_TOP}`]: t.noSpacingTop,
3742
+ [`b-data-grid--${$e.FIT_CONTENT}`]: t.fitContent,
3743
+ [`b-data-grid--${$e.ZEBRA_ROWS}`]: ht.value
3744
+ })), el = w(() => ({
3745
+ "b-data-grid__body--sticky-horizontal-scrollbar": t.stickyHorizontalScrollbar
3746
+ })), tl = w(() => lt.value.findIndex((N) => N.columnSet.length)), zt = w(() => !((t.selectable || t.hasNestedContent || t.hasNestedRows) && Ce.value === 1) || it.value), nl = w(() => ({
3747
+ "b-data-grid__filters--sticky": !!t.stickyFilters || Ae
3748
+ })), ll = w(() => {
3749
+ var N, P, ie, Z, Se, Ne;
3750
+ return {
3751
+ "b-data-grid__pagination--padding-left-unset": ((ie = (P = (N = t.columns) == null ? void 0 : N[0]) == null ? void 0 : P.padding) == null ? void 0 : ie.left) === !1,
3752
+ "b-data-grid__pagination--padding-right-unset": ((Ne = (Se = (Z = t.columns) == null ? void 0 : Z[t.columns.length - 1]) == null ? void 0 : Se.padding) == null ? void 0 : Ne.right) === !1,
3753
+ "b-data-grid__pagination--sticky": !!t.stickyPagination || Ae
3754
+ };
3755
+ }), ol = (N) => {
3756
+ const P = N;
3757
+ N !== null && (P != null && P.columnHeaderRefs) && Object.entries(P == null ? void 0 : P.columnHeaderRefs).forEach(([ie, Z]) => {
3758
+ g.value[ie] = Z;
3759
+ });
3760
+ }, sl = (N, P) => {
3761
+ var Z, Se, Ne, xe;
3762
+ const ie = N;
3763
+ if (N !== null && ie != null && ie.gridcellRefs) {
3764
+ const Fe = t.rowActions !== void 0 && (ie == null ? void 0 : ie.rowActionsRef);
3765
+ Object.entries(ie == null ? void 0 : ie.gridcellRefs).map(([Oe, je]) => {
3766
+ var rt;
3767
+ ((rt = C.value) == null ? void 0 : rt[Oe]) === void 0 && (C.value = { ...C.value, [Oe]: [] }), C.value[Oe][P] = je;
3768
+ }), Fe && (((Z = C.value) == null ? void 0 : Z[Xe]) === void 0 && (C.value = { ...C.value, [Xe]: [] }), C.value[Xe][P] = (Se = ie.rowActionsRef) == null ? void 0 : Se[0], ne.value = Math.max(
3769
+ ne.value,
3770
+ ((xe = (Ne = ie.rowActionsRef) == null ? void 0 : Ne[0]) == null ? void 0 : xe.offsetWidth) ?? 0
3771
+ ));
3772
+ }
3773
+ }, al = (N, P) => {
3774
+ t.allowRowClicks && Q(F.ROW_CLICK, N, P);
3775
+ }, il = (N) => {
3776
+ he.value = N;
3777
+ }, rl = w(() => t.hasNestedContent || t.hasNestedRows ? "treegrid" : "grid"), Ft = $l({
3778
+ label: u != null && u.header ? kl(u)("header") : null,
3779
+ defaultFallback: "data grid"
3780
+ }), dl = w(() => {
3781
+ var N;
3782
+ return xn.value ? "all" : Vn.value ? "page" : ((N = ot.value) == null ? void 0 : N.length) > 0 ? "single" : "none";
3783
+ }), Pt = w(() => {
3784
+ var N;
3785
+ return ((N = ot.value) == null ? void 0 : N.length) ?? 0;
3786
+ }), ul = w(() => t.bulkActions && Pt.value > 0), cl = (N) => Q(F.COLUMN_RESIZE, N), fl = (N) => {
3787
+ Q(F.UPDATE_SORT_BY, N), Q(F.SORT, N);
3788
+ }, gl = (N, P) => {
3789
+ Q(F.NAVIGATE, N), Q(F.UPDATE_PAGINATION, {
3790
+ ...t.pagination,
3791
+ size: P,
3792
+ page: N
3793
+ });
3794
+ }, vl = (N) => {
3795
+ Q(F.ITEMS_PAGE, N);
3796
+ }, ml = () => {
3797
+ Q(F.FILTER_SEARCH_CLEAR);
3798
+ }, hl = (N) => {
3799
+ Q(F.UPDATE_FILTER_SEARCH_TERM, N), Q(F.FILTER_SEARCH_INPUT, N);
3800
+ };
3801
+ return w(() => $.value.some((N) => N.mandatory)).value || Cn(
3802
+ "WARNING: At least one BentoDataGrid column should be set as mandatory to ensure data is always displayed correctly."
3803
+ ), Me(Ul, () => null)(t.tabTitle), dt(Ln, wt(t, "slashedZero")), s({ onEmptyStateClearResetButtonClick: Jn }), (N, P) => {
3804
+ var ie;
3805
+ return c(), A("div", {
3806
+ ref_key: "dataGridRef",
3807
+ ref: x,
3808
+ class: re(["b-data-grid", Qn.value]),
3809
+ "aria-rowcount": l(E).length,
3810
+ "aria-colcount": l($).length,
3811
+ "aria-label": l(Ft),
3812
+ role: rl.value,
3813
+ "aria-busy": l(a),
3814
+ onCopy: P[12] || (P[12] = //@ts-ignore
3815
+ (...Z) => l(Qt) && l(Qt)(...Z))
3816
+ }, [
3817
+ e.filters ? (c(), A("div", {
3818
+ key: 0,
3819
+ ref_key: "filtersRef",
3820
+ ref: L,
3821
+ class: re(["b-data-grid__filters", nl.value]),
3822
+ style: We({ top: mt.value })
3823
+ }, [
3824
+ e.filters ? (c(), H(l(Ct), {
3825
+ key: 0,
3826
+ ref_key: "filterBarRef",
3827
+ ref: O,
3828
+ config: e.filters,
3829
+ "container-size-layout": e.filtersContainerSizeLayout,
3830
+ "filter-values": e.filterValues,
3831
+ "filter-values-object": e.filterValuesObject,
3832
+ search: e.filterSearchConfig,
3833
+ "search-term": e.filterSearchTerm,
3834
+ onSearchInput: hl,
3835
+ onSearchClear: ml,
3836
+ onInput: P[0] || (P[0] = (Z) => N.$emit(l(F).UPDATE_FILTERS, Z)),
3837
+ "onUpdate:filterValues": P[1] || (P[1] = (Z) => N.$emit(l(F).UPDATE_FILTER_VALUES, Z)),
3838
+ "onUpdate:filterValuesObject": P[2] || (P[2] = (Z) => N.$emit(l(F).UPDATE_FILTER_VALUES_OBJECT, Z))
3839
+ }, null, 8, ["config", "container-size-layout", "filter-values", "filter-values-object", "search", "search-term"])) : B("", !0)
3840
+ ], 6)) : B("", !0),
3841
+ N.$slots.header ? (c(), A("div", Ca, [
3842
+ ke(N.$slots, "header", {}, void 0, !0)
3843
+ ])) : B("", !0),
3844
+ T("div", {
3845
+ class: "b-data-grid__column-headers",
3846
+ style: We({ top: tt.value })
3847
+ }, [
3848
+ l(k) ? (c(), H(l(Ds), {
3849
+ key: 0,
3850
+ class: "b-data-grid__config-settings",
3851
+ columns: l(J),
3852
+ condensed: e.condensed,
3853
+ "zebra-rows": l(ht),
3854
+ "onUpdate:condensed": l(kn),
3855
+ "onUpdate:zebraRows": l(Mn),
3856
+ "onUpdate:columns": l(Dn)
3857
+ }, null, 8, ["columns", "condensed", "zebra-rows", "onUpdate:condensed", "onUpdate:zebraRows", "onUpdate:columns"])) : B("", !0),
3858
+ T("div", {
3859
+ ref_key: "columnsRef",
3860
+ ref: v,
3861
+ role: "rowgroup",
3862
+ class: "b-data-grid__columns-row",
3863
+ tabindex: U.value,
3864
+ onScroll: P[5] || (P[5] = //@ts-ignore
3865
+ (...Z) => l(at) && l(at)(...Z)),
3866
+ onKeydown: P[6] || (P[6] = //@ts-ignore
3867
+ (...Z) => l(st) && l(st)(...Z))
3868
+ }, [
3869
+ T("div", {
3870
+ style: We(l(Ve)),
3871
+ class: "b-data-grid__columns",
3872
+ role: "row"
3873
+ }, [
3874
+ (c(!0), A(we, null, Le(l(lt), ({ columnSet: Z, id: Se, isFrozenColumns: Ne }, xe) => {
3875
+ var Fe;
3876
+ return c(), A(we, null, [
3877
+ Z != null && Z.length ? (c(), H(l(rs), oe({
3878
+ key: `data-grid-columns-${Se}`,
3879
+ ref_for: !0,
3880
+ ref: (Oe) => ol(Oe),
3881
+ columns: Z,
3882
+ "has-resizable-columns": e.hasResizableColumns,
3883
+ "sort-by": e.sortBy,
3884
+ "all-items-selected-state": l(Gn),
3885
+ "is-frozen-columns": Ne,
3886
+ "show-frozen-columns-separator": zt.value,
3887
+ "dragging-columns": l(Dt),
3888
+ "has-draggable-columns": l(I),
3889
+ "has-column-panel": l(k),
3890
+ "has-left-overflow": l(it),
3891
+ "has-first-column-panel-right-aligned": xe === tl.value,
3892
+ "hovered-over-column-state": l(Nt),
3893
+ "is-measuring-column-widths": l(y),
3894
+ "is-only-one-visible-column": l(Nn),
3895
+ selectable: ((Fe = l(E)) == null ? void 0 : Fe.length) > 0 && l(m),
3896
+ "selectable-across-pages": $t.value,
3897
+ "selected-items": l(ot),
3898
+ "selection-state": dl.value,
3899
+ "truncate-column-headers": e.truncateColumnHeaders,
3900
+ "row-actions-maximum-width": l(ne)
3901
+ }, ft(l(zn)), {
3902
+ onColumnHover: P[3] || (P[3] = (Oe) => Un.value = Oe),
3903
+ onColumnMove: l(Pn),
3904
+ onColumnUpdate: l($n),
3905
+ onColumnResize: cl,
3906
+ onColumnResizing: l(ge),
3907
+ onSelectAllRows: l(kt),
3908
+ onSelectAllAcrossPages: P[4] || (P[4] = (Oe) => Q(l(F).SELECT_ALL_ACROSS_PAGES)),
3909
+ onDeselectAll: l(Hn),
3910
+ onSort: fl
3911
+ }), qe({ _: 2 }, [
3912
+ Le(l(u), (Oe, je) => ({
3913
+ name: je,
3914
+ fn: G((rt) => [
3915
+ ke(N.$slots, je, oe({ ref_for: !0 }, rt), void 0, !0)
3916
+ ])
3917
+ }))
3918
+ ]), 1040, ["columns", "has-resizable-columns", "sort-by", "all-items-selected-state", "is-frozen-columns", "show-frozen-columns-separator", "dragging-columns", "has-draggable-columns", "has-column-panel", "has-left-overflow", "has-first-column-panel-right-aligned", "hovered-over-column-state", "is-measuring-column-widths", "is-only-one-visible-column", "selectable", "selectable-across-pages", "selected-items", "selection-state", "truncate-column-headers", "row-actions-maximum-width", "onColumnMove", "onColumnUpdate", "onColumnResizing", "onSelectAllRows", "onDeselectAll"])) : B("", !0)
3919
+ ], 64);
3920
+ }), 256))
3921
+ ], 4)
3922
+ ], 40, wa)
3923
+ ], 4),
3924
+ T("div", {
3925
+ ref_key: "body",
3926
+ ref: o,
3927
+ "data-testid": "data-grid-body",
3928
+ class: re(["b-data-grid__body", el.value]),
3929
+ onScroll: P[9] || (P[9] = //@ts-ignore
3930
+ (...Z) => l(at) && l(at)(...Z))
3931
+ }, [
3932
+ l(a) && !l(Ye) ? (c(), A("div", ba, [
3933
+ X(l(Rt), {
3934
+ class: "b-data-grid__loading-indicator",
3935
+ large: ""
3936
+ }),
3937
+ X(l(Qe), {
3938
+ el: "span",
3939
+ variant: "caption"
3940
+ }, {
3941
+ default: G(() => [
3942
+ me(Y(l(ce)("gettingYourData")), 1)
3943
+ ]),
3944
+ _: 1
3945
+ })
3946
+ ])) : ((ie = l(E)) == null ? void 0 : ie.length) === 0 && e.emptyState ? (c(), A("div", _a, [
3947
+ X(l(Ml), El(pl(Xn.value)), null, 16)
3948
+ ])) : (c(), A("div", {
3949
+ key: 2,
3950
+ class: "b-data-grid__rows",
3951
+ role: "rowgroup",
3952
+ onKeydown: P[8] || (P[8] = //@ts-ignore
3953
+ (...Z) => l(st) && l(st)(...Z))
3954
+ }, [
3955
+ (c(!0), A(we, null, Le(l(E), (Z, Se) => {
3956
+ var Ne, xe;
3957
+ return c(), H(l(Tn), {
3958
+ key: Se,
3959
+ ref_for: !0,
3960
+ ref: (Fe) => sl(Fe, Se),
3961
+ style: We(l(Ve)),
3962
+ "allow-row-clicks": e.allowRowClicks,
3963
+ "column-sets": l(lt),
3964
+ condensed: e.condensed,
3965
+ "dragging-columns": l(Dt),
3966
+ "dragging-events-for-row-cell": l(Fn),
3967
+ "get-data-item-id": e.getDataItemId,
3968
+ "has-nested-content": l(p),
3969
+ "has-nested-rows": l(f),
3970
+ "has-left-overflow": l(it),
3971
+ "has-right-overflow": l(Ut),
3972
+ "highlighted-rows": e.highlightedRows,
3973
+ "hovered-row-index": he.value,
3974
+ "hovered-over-column-state": l(Nt),
3975
+ "is-data-item-disabled": e.isDataItemDisabled,
3976
+ "is-row-even": l(ht) ? Se % 2 !== 0 : !1,
3977
+ "is-row-last-child": Se + 1 === ((Ne = l(E)) == null ? void 0 : Ne.length),
3978
+ "is-measuring-column-widths": l(y),
3979
+ "row-actions-maximum-width": l(ne),
3980
+ "row-actions": e.rowActions,
3981
+ "row-data": Z,
3982
+ "row-index": Se,
3983
+ "row-set-size": (xe = l(E)) == null ? void 0 : xe.length,
3984
+ "show-frozen-columns-separator": zt.value,
3985
+ "should-show-nested-content": e.shouldShowNestedContent,
3986
+ "should-show-nested-rows": e.shouldShowNestedRows,
3987
+ selectable: l(m),
3988
+ "selected-items": l(ot),
3989
+ onCellHovered: il,
3990
+ onNestedContentToggled: P[7] || (P[7] = (Fe) => Q(l(F).NESTED_CONTENT_TOGGLED, Fe)),
3991
+ onRowClick: al,
3992
+ onOnFrozenColumnsKeyPress: l(Kn),
3993
+ onSelectRow: l(Bn),
3994
+ onSelectNestedRow: l(Wn)
3995
+ }, qe({ _: 2 }, [
3996
+ Le(l(u), (Fe, Oe) => ({
3997
+ name: Oe,
3998
+ fn: G((je) => [
3999
+ ke(N.$slots, Oe, oe({ ref_for: !0 }, je), void 0, !0)
4000
+ ])
4001
+ }))
4002
+ ]), 1032, ["style", "allow-row-clicks", "column-sets", "condensed", "dragging-columns", "dragging-events-for-row-cell", "get-data-item-id", "has-nested-content", "has-nested-rows", "has-left-overflow", "has-right-overflow", "highlighted-rows", "hovered-row-index", "hovered-over-column-state", "is-data-item-disabled", "is-row-even", "is-row-last-child", "is-measuring-column-widths", "row-actions-maximum-width", "row-actions", "row-data", "row-index", "row-set-size", "show-frozen-columns-separator", "should-show-nested-content", "should-show-nested-rows", "selectable", "selected-items", "onOnFrozenColumnsKeyPress", "onSelectRow", "onSelectNestedRow"]);
4003
+ }), 128))
4004
+ ], 32))
4005
+ ], 34),
4006
+ l(Ye) ? (c(), H(l(Us), {
4007
+ key: 2,
4008
+ loading: l(a),
4009
+ "is-infinite-scroll": l(Zn),
4010
+ "onUpdate:showMore": l(qn)
4011
+ }, null, 8, ["loading", "is-infinite-scroll", "onUpdate:showMore"])) : B("", !0),
4012
+ e.stickyHorizontalScrollbar ? (c(), A("div", {
4013
+ key: 3,
4014
+ ref_key: "virtualHorizontalScrollbarRef",
4015
+ ref: d,
4016
+ class: "b-data-grid__horizontal-scrollbar",
4017
+ "aria-hidden": "true",
4018
+ "data-testid": "sticky-horizontal-scrollbar",
4019
+ style: We(l(Yn)),
4020
+ onScroll: P[10] || (P[10] = //@ts-ignore
4021
+ (...Z) => l(Mt) && l(Mt)(...Z))
4022
+ }, [
4023
+ T("div", {
4024
+ style: We({ width: `${l(ee)}px`, height: "15px" })
4025
+ }, null, 4)
4026
+ ], 36)) : B("", !0),
4027
+ l(se) && !l(Ye) ? (c(), A("div", {
4028
+ key: 4,
4029
+ ref_key: "paginationContainerRef",
4030
+ ref: D,
4031
+ "data-testid": "pagination-container",
4032
+ class: re(["b-data-grid__pagination", ll.value])
4033
+ }, [
4034
+ X(l(Dl), oe(l(se), {
4035
+ "aria-label": `${l(Ft)} navigation`,
4036
+ onNavigate: gl,
4037
+ onItemsPage: vl
4038
+ }), {
4039
+ default: G(() => [
4040
+ l(n)("pagination-slot") ? ke(N.$slots, "pagination-slot", { key: 0 }, void 0, !0) : B("", !0)
4041
+ ]),
4042
+ _: 3
4043
+ }, 16, ["aria-label"])
4044
+ ], 2)) : B("", !0),
4045
+ N.$slots.footer ? (c(), A("div", ya, [
4046
+ ke(N.$slots, "footer", {}, void 0, !0)
4047
+ ])) : B("", !0),
4048
+ ul.value ? (c(), H(l(Nl), {
4049
+ key: 6,
4050
+ actions: e.bulkActions,
4051
+ "item-counter": Pt.value,
4052
+ "extra-bottom-spacing": l(V),
4053
+ onClose: P[11] || (P[11] = (Z) => l(kt)(!1))
4054
+ }, null, 8, ["actions", "item-counter", "extra-bottom-spacing"])) : B("", !0)
4055
+ ], 42, ha);
4056
+ };
4057
+ }
4058
+ }), wi = /* @__PURE__ */ de(pa, [["__scopeId", "data-v-9458a247"]]);
4059
+ export {
4060
+ yt as B,
4061
+ hi as a,
4062
+ Ci as b,
4063
+ $e as c,
4064
+ wi as d,
4065
+ He as e,
4066
+ F as f,
4067
+ ct as g
4068
+ };
4069
+ //# sourceMappingURL=data-grid.DreajC_w.js.map