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