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