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