@shtabapp/ui-kit 1.79.0 → 1.80.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/CHANGELOG.md +14 -0
- package/dist/{SAvatar-hWbsODUa.js → SAvatar-6uaisUHm.js} +23 -21
- package/dist/{SAvatar-ClmtSIFg.cjs → SAvatar-BQNqFdkk.cjs} +1 -1
- package/dist/{SAvatarGroup-By8oMNTe.cjs → SAvatarGroup-D27squmU.cjs} +1 -1
- package/dist/{SAvatarGroup-CSSCQKdH.js → SAvatarGroup-DnVhY7I1.js} +1 -1
- package/dist/SBadge-Dn87LB9z.cjs +1 -0
- package/dist/{SBadge-BDxQJh6c.js → SBadge-Du9iIiXS.js} +4 -2
- package/dist/{SButton-BxsPvcET.cjs → SButton-B3o80WMR.cjs} +1 -1
- package/dist/{SButton-B21hubD2.js → SButton-D-dmK8Cm.js} +1 -1
- package/dist/{SChip-suCSzJ9O.js → SChip-C6Z1VRf9.js} +1 -1
- package/dist/{SChip-no4cGQNB.cjs → SChip-Cr6wNKd7.cjs} +1 -1
- package/dist/{SColorPicker-DHjY2NVd.cjs → SColorPicker--sBL2SBq.cjs} +1 -1
- package/dist/{SColorPicker-C5pA54Q3.js → SColorPicker-D2072gdX.js} +3 -3
- package/dist/SDropdown-B_nsm3Jf.cjs +1 -0
- package/dist/SDropdown-aWjZrahp.js +541 -0
- package/dist/{SInput-DRV4XHWh.js → SInput-D2pCcaym.js} +1 -1
- package/dist/{SInput-Doale-L0.cjs → SInput-DG9R9tJC.cjs} +1 -1
- package/dist/{SList-DuSCQL0t.js → SList-DKstFJu1.js} +1 -1
- package/dist/{SList-B98BGyt8.cjs → SList-_VnusDWn.cjs} +1 -1
- package/dist/SListItem-B7RIawMl.cjs +1 -0
- package/dist/SListItem-Bw0OXPVk.js +231 -0
- package/dist/{SPhotoEdit-D3a1Ptp0.cjs → SPhotoEdit-C1K1n0ti.cjs} +1 -1
- package/dist/{SPhotoEdit-CuVHNypX.js → SPhotoEdit-eKRRevtl.js} +1 -1
- package/dist/SSelect-91iBEAHR.cjs +1 -0
- package/dist/{SSelect-BU4eSrVf.js → SSelect-CKw3a1AD.js} +238 -230
- package/dist/STable-CdMVPiYt.cjs +1 -0
- package/dist/{STable-BTKXjbrB.js → STable-Dbr1oX01.js} +1032 -1002
- package/dist/{STabs-B07Q6QYO.js → STabs-DhwF2GvF.js} +1 -1
- package/dist/{STabs-JtF4ca3o.cjs → STabs-yf2Mtaji.cjs} +1 -1
- package/dist/{STag-BKLs0RRY.js → STag-BCGC8smg.js} +1 -1
- package/dist/{STag-Btut_n-4.cjs → STag-DBerzc3o.cjs} +1 -1
- package/dist/{STagGroup-CNZVwrG2.js → STagGroup-B2FeOTSD.js} +1 -1
- package/dist/{STagGroup-Ddeb_8Ot.cjs → STagGroup-GecKyBlJ.cjs} +1 -1
- package/dist/components/SAvatar/SAvatar.vue.d.ts.map +1 -1
- package/dist/components/SBadge/SBadge.vue.d.ts.map +1 -1
- package/dist/components/SDropdown/SDropdown.types.d.ts +16 -1
- package/dist/components/SDropdown/SDropdown.types.d.ts.map +1 -1
- package/dist/components/SDropdown/SDropdown.vue.d.ts +2 -2
- package/dist/components/SDropdown/SDropdown.vue.d.ts.map +1 -1
- package/dist/components/SDropdown/utils/dropdownFocusables.d.ts +9 -0
- package/dist/components/SDropdown/utils/dropdownFocusables.d.ts.map +1 -0
- package/dist/components/SDropdown/utils/useDropdownFocus.d.ts +31 -0
- package/dist/components/SDropdown/utils/useDropdownFocus.d.ts.map +1 -0
- package/dist/components/SListItem/SListItem.types.d.ts +5 -3
- package/dist/components/SListItem/SListItem.types.d.ts.map +1 -1
- package/dist/components/SListItem/SListItem.vue.d.ts.map +1 -1
- package/dist/components/SSelect/SSelect.vue.d.ts.map +1 -1
- package/dist/components/STable/STable.vue.d.ts.map +1 -1
- package/dist/components/STable/utils/useTableGridFocus.d.ts +5 -2
- package/dist/components/STable/utils/useTableGridFocus.d.ts.map +1 -1
- package/dist/components/STable/utils/useTableGridKeyboard.d.ts.map +1 -1
- package/dist/components/SToastProvider/SToastProvider.vue.d.ts +1 -1
- package/dist/components/SToastProvider/SToastProvider.vue.d.ts.map +1 -1
- package/dist/entries/avatar-group.cjs +1 -1
- package/dist/entries/avatar-group.js +1 -1
- package/dist/entries/avatar.cjs +1 -1
- package/dist/entries/avatar.js +1 -1
- package/dist/entries/badge.cjs +1 -1
- package/dist/entries/badge.js +1 -1
- package/dist/entries/button.cjs +1 -1
- package/dist/entries/button.js +1 -1
- package/dist/entries/chip.cjs +1 -1
- package/dist/entries/chip.js +1 -1
- package/dist/entries/color-picker.cjs +1 -1
- package/dist/entries/color-picker.js +1 -1
- package/dist/entries/dropdown.cjs +1 -1
- package/dist/entries/dropdown.js +1 -1
- package/dist/entries/input.cjs +1 -1
- package/dist/entries/input.js +1 -1
- package/dist/entries/list-item.cjs +1 -1
- package/dist/entries/list-item.js +1 -1
- package/dist/entries/list.cjs +1 -1
- package/dist/entries/list.js +1 -1
- package/dist/entries/photo-edit.cjs +1 -1
- package/dist/entries/photo-edit.js +1 -1
- package/dist/entries/select.cjs +1 -1
- package/dist/entries/select.js +1 -1
- package/dist/entries/table.cjs +1 -1
- package/dist/entries/table.js +1 -1
- package/dist/entries/tabs.cjs +1 -1
- package/dist/entries/tabs.js +1 -1
- package/dist/entries/tag-group.cjs +1 -1
- package/dist/entries/tag-group.js +2 -2
- package/dist/entries/tag.cjs +1 -1
- package/dist/entries/tag.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +447 -423
- package/dist/uikit-components.css +1 -1
- package/package.json +3 -3
- package/dist/SBadge-d1GOPFP-.cjs +0 -1
- package/dist/SDropdown-CPfoNHbg.cjs +0 -1
- package/dist/SDropdown-DvPW3_WP.js +0 -400
- package/dist/SListItem-B3MQgu4Q.js +0 -227
- package/dist/SListItem-CZtR8bgI.cjs +0 -1
- package/dist/SSelect-CPQIcGhK.cjs +0 -1
- package/dist/STable-RmVTPyg2.cjs +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { n as e, t } from "./contrastSurfaceTextColor-BDlLSSXC.js";
|
|
2
2
|
import { t as n } from "./colorValue-CSh0chxp.js";
|
|
3
|
-
import { i as r, n as i, r as a, t as o } from "./SButton-
|
|
3
|
+
import { i as r, n as i, r as a, t as o } from "./SButton-D-dmK8Cm.js";
|
|
4
4
|
import { i as s, t as c } from "./SCheckbox-Dulusx5v.js";
|
|
5
5
|
import { s as l } from "./useFloatingOverlay-TxzVisMJ.js";
|
|
6
|
-
import { t as u } from "./SDropdown-
|
|
6
|
+
import { t as u } from "./SDropdown-aWjZrahp.js";
|
|
7
7
|
import { t as d } from "./SDropdownMenu-2koPU6IG.js";
|
|
8
8
|
import { a as f, o as p, r as m } from "./treeKeyboardNavigation-SmxTdnDz.js";
|
|
9
|
-
import { t as h } from "./SListItem-
|
|
9
|
+
import { t as h } from "./SListItem-Bw0OXPVk.js";
|
|
10
10
|
import { n as g, r as _, t as v } from "./SToggle-MSdprnRP.js";
|
|
11
|
-
import { Fragment as y, computed as b, createBlock as x, createCommentVNode as S, createElementBlock as C, createElementVNode as w, createSlots as T, createTextVNode as E, createVNode as D, defineComponent as O, isMemoSame as k, markRaw as A, mergeModels as j, mergeProps as M, nextTick as ee, normalizeClass as N, normalizeStyle as P, onBeforeUnmount as F, onMounted as
|
|
12
|
-
import { ESSkeletonType as
|
|
13
|
-
import { tryOnScopeDispose as
|
|
11
|
+
import { Fragment as y, computed as b, createBlock as x, createCommentVNode as S, createElementBlock as C, createElementVNode as w, createSlots as T, createTextVNode as E, createVNode as D, defineComponent as O, isMemoSame as k, markRaw as A, mergeModels as j, mergeProps as M, nextTick as ee, normalizeClass as N, normalizeStyle as P, onBeforeUnmount as F, onMounted as te, openBlock as I, ref as L, renderList as R, renderSlot as z, shallowRef as B, toDisplayString as V, toRaw as ne, toValue as H, unref as U, useId as re, useModel as ie, useSlots as ae, useTemplateRef as oe, watch as W, withCtx as G, withModifiers as se } from "vue";
|
|
12
|
+
import { ESSkeletonType as ce, SIcon as le, SSeparator as ue, SSkeleton as de, useUiKitI18n as fe } from "@shtabapp/ui-kit-primitives";
|
|
13
|
+
import { tryOnScopeDispose as pe, useElementSize as me, useEventListener as K, useRafFn as he, useResizeObserver as ge, useTimeoutFn as _e } from "@vueuse/core";
|
|
14
14
|
import { elementScroll as ve, observeElementOffset as ye, useVirtualizer as be } from "@tanstack/vue-virtual";
|
|
15
|
-
import { combine as
|
|
16
|
-
import { draggable as
|
|
15
|
+
import { combine as xe } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
|
16
|
+
import { draggable as q, dropTargetForElements as Se, monitorForElements as Ce } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
|
17
17
|
import { setCustomNativeDragPreview as we } from "@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview";
|
|
18
18
|
import { pointerOutsideOfPreview as Te } from "@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview";
|
|
19
19
|
import { attachClosestEdge as Ee, extractClosestEdge as De } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
|
|
@@ -61,20 +61,20 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
61
61
|
}),
|
|
62
62
|
emits: ["update:modelValue"],
|
|
63
63
|
setup(e) {
|
|
64
|
-
let t =
|
|
65
|
-
return
|
|
64
|
+
let t = ie(e, "modelValue"), n = oe("checkboxRef");
|
|
65
|
+
return W([n, () => e.screenReaderLabel], () => {
|
|
66
66
|
let t = n.value?.$el, r = t instanceof HTMLElement ? t.querySelector("input") : void 0;
|
|
67
67
|
r && (r.tabIndex = -1, r.setAttribute("aria-label", e.screenReaderLabel));
|
|
68
68
|
}, {
|
|
69
69
|
immediate: !0,
|
|
70
70
|
flush: "post"
|
|
71
|
-
}), (r, i) => (
|
|
71
|
+
}), (r, i) => (I(), x(U(c), {
|
|
72
72
|
ref_key: "checkboxRef",
|
|
73
73
|
ref: n,
|
|
74
74
|
modelValue: t.value,
|
|
75
75
|
"onUpdate:modelValue": i[0] ||= (e) => t.value = e,
|
|
76
76
|
indeterminate: e.indeterminate,
|
|
77
|
-
size:
|
|
77
|
+
size: U(s).EXTRA_SMALL
|
|
78
78
|
}, null, 8, [
|
|
79
79
|
"modelValue",
|
|
80
80
|
"indeterminate",
|
|
@@ -102,7 +102,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
102
102
|
focusColumnKey: {}
|
|
103
103
|
},
|
|
104
104
|
setup(e) {
|
|
105
|
-
return (t, n) => (
|
|
105
|
+
return (t, n) => (I(), C("tr", null, [(I(!0), C(y, null, R(e.cells, ({ key: n, cellPlan: r }) => (I(), C(y, { key: n }, [r ? (I(), C("td", {
|
|
106
106
|
key: 1,
|
|
107
107
|
id: `${e.cellIdPrefix}${e.rowKey ?? ""}-${r.descriptor.key}`,
|
|
108
108
|
class: N([r.cellClass, e.cellClass]),
|
|
@@ -112,11 +112,11 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
112
112
|
"data-row-key": e.rowKey,
|
|
113
113
|
"data-section": e.section,
|
|
114
114
|
tabindex: r.descriptor.key === e.focusColumnKey ? 0 : -1
|
|
115
|
-
}, [r.descriptor.key === e.contentColumnKey ? (
|
|
115
|
+
}, [r.descriptor.key === e.contentColumnKey ? (I(), C("div", {
|
|
116
116
|
key: 0,
|
|
117
117
|
class: N(e.contentClass),
|
|
118
118
|
style: P(e.contentStyle)
|
|
119
|
-
}, [
|
|
119
|
+
}, [z(t.$slots, "default")], 6)) : S("", !0)], 14, Ge)) : (I(), C("td", {
|
|
120
120
|
key: 0,
|
|
121
121
|
class: N([
|
|
122
122
|
"s-ui-table__cell",
|
|
@@ -165,10 +165,10 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
165
165
|
});
|
|
166
166
|
}, ct = ({ columns: e, columnOrder: t, columnWidths: n, hiddenColumns: r, hasIndicator: i, hasCheckbox: a, hasRightEdge: o, hasColumnsManager: s, columnsManagerWidth: c = 32, columnsResizable: l, columnsDraggable: u, viewportWidth: d }) => {
|
|
167
167
|
let f = b(() => {
|
|
168
|
-
let t =
|
|
168
|
+
let t = H(e);
|
|
169
169
|
return t.find((e) => e.primary)?.key ?? t[0]?.key;
|
|
170
170
|
}), p = b(() => {
|
|
171
|
-
let n =
|
|
171
|
+
let n = H(e), i = new Set(r.value ?? []), a = t.value, o = new Map(n.map((e) => [e.key, e])), s = [];
|
|
172
172
|
a ? (a.forEach((e) => {
|
|
173
173
|
o.has(e) && s.push(e);
|
|
174
174
|
}), n.forEach((e) => {
|
|
@@ -204,9 +204,9 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
204
204
|
flexible: e.sticky !== J.RIGHT
|
|
205
205
|
};
|
|
206
206
|
}, h = (e) => {
|
|
207
|
-
|
|
207
|
+
H(o) && e("rightEdge", 40), H(s) && e("columnsManager", H(c));
|
|
208
208
|
}, g = b(() => {
|
|
209
|
-
let e = [], t =
|
|
209
|
+
let e = [], t = H(l), n = H(u), r = (t, n) => {
|
|
210
210
|
let r = Xe(t);
|
|
211
211
|
e.push({
|
|
212
212
|
key: `__s-ui-table-${t}`,
|
|
@@ -232,7 +232,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
232
232
|
firstStickyRight: !1
|
|
233
233
|
});
|
|
234
234
|
};
|
|
235
|
-
|
|
235
|
+
H(i) && r("indicator", 2), H(a) && r("checkbox", 24), p.value.forEach((r) => {
|
|
236
236
|
let i = r.key === f.value, a = !!r.leading && !i, o = i || a ? J.LEFT : r.sticky, { baseWidth: s, flexible: c } = m(r, i);
|
|
237
237
|
e.push({
|
|
238
238
|
key: r.key,
|
|
@@ -264,7 +264,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
264
264
|
}), e.forEach((e) => {
|
|
265
265
|
e.sticky === J.RIGHT && (o += 1, e.colIndex = o);
|
|
266
266
|
}), at(e), e;
|
|
267
|
-
}), _ = b(() => st(g.value,
|
|
267
|
+
}), _ = b(() => st(g.value, H(d))), v = b(() => _.value.reduce((e, t) => e + t.width, 0)), y = b(() => {
|
|
268
268
|
let e = {}, t = 0;
|
|
269
269
|
_.value.forEach((n) => {
|
|
270
270
|
e[n.widthVar] = `${n.width}px`, n.sticky === J.LEFT && n.stickyOffsetVar && (e[n.stickyOffsetVar] = `${t}px`, t += n.width);
|
|
@@ -285,122 +285,122 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
285
285
|
};
|
|
286
286
|
}, $ = /* @__PURE__ */ function(e) {
|
|
287
287
|
return e.HEADER = "h", e.BODY = "b", e.CREATION = "c", e.AGGREGATE = "a", e;
|
|
288
|
-
}({}), lt = "button, a[href], input, select, textarea, [tabindex]", ut = Object.values($), dt = (e) => ut.find((t) => t === e), ft = ({ tableRootElement: e, tableElement: t,
|
|
289
|
-
let
|
|
288
|
+
}({}), lt = "button, a[href], input, select, textarea, [tabindex]", ut = Object.values($), dt = (e) => ut.find((t) => t === e), ft = ({ tableRootElement: e, tableElement: t, exitElement: n, scrollElement: r, columnDescriptors: i, flatRows: a, snapshot: o, groupColumnKey: s, depthFooterColumnKey: c, loadMoreColumnKey: l, creationColumnKey: u, hasCreationRow: d, hasAggregateRow: f, isRowNavigable: p, pageSize: m, buildCellDomId: h, onBodyRowFocused: g, scrollToRowIndex: _ }) => {
|
|
289
|
+
let v = B(), y = B(), x = B(!1), S = B(0), C = b(() => i.value.filter((e) => e.service !== qe.INDICATOR).map((e) => e.key)), w = b(() => i.value.filter((e) => e.service !== qe.INDICATOR && e.service !== qe.COLUMNS_MANAGER).map((e) => e.key)), T = (e) => {
|
|
290
290
|
if (!e) return;
|
|
291
|
-
let t =
|
|
292
|
-
return t === void 0 ? void 0 :
|
|
293
|
-
},
|
|
294
|
-
if (e.kind === Q.ROW) return
|
|
291
|
+
let t = o.value.getRowIndexByKey(e);
|
|
292
|
+
return t === void 0 ? void 0 : a.value[t];
|
|
293
|
+
}, E = (e) => {
|
|
294
|
+
if (e.kind === Q.ROW) return w.value;
|
|
295
295
|
let t = {
|
|
296
296
|
[Q.ROW]: void 0,
|
|
297
|
-
[Q.GROUP]:
|
|
298
|
-
[Q.DEPTH_FOOTER]:
|
|
299
|
-
[Q.LOAD_MORE]:
|
|
297
|
+
[Q.GROUP]: H(s),
|
|
298
|
+
[Q.DEPTH_FOOTER]: H(c),
|
|
299
|
+
[Q.LOAD_MORE]: H(l)
|
|
300
300
|
}[e.kind];
|
|
301
301
|
return t ? [t] : [];
|
|
302
|
-
},
|
|
303
|
-
if (e.section === "h") return
|
|
302
|
+
}, D = (e) => {
|
|
303
|
+
if (e.section === "h") return C.value;
|
|
304
304
|
if (e.section === "c") {
|
|
305
|
-
let e =
|
|
306
|
-
return
|
|
305
|
+
let e = H(u);
|
|
306
|
+
return H(d) && e ? [e] : [];
|
|
307
307
|
}
|
|
308
|
-
if (e.section === "a") return
|
|
309
|
-
let t =
|
|
310
|
-
return t &&
|
|
311
|
-
},
|
|
308
|
+
if (e.section === "a") return H(f) ? w.value : [];
|
|
309
|
+
let t = T(e.rowKey);
|
|
310
|
+
return t && p(t) ? E(t) : [];
|
|
311
|
+
}, O = (e, t) => {
|
|
312
312
|
if (t && e.includes(t)) return t;
|
|
313
|
-
let n =
|
|
313
|
+
let n = C.value, r = t ? n.indexOf(t) : -1, i = e[0] ?? "";
|
|
314
314
|
if (r === -1) return i;
|
|
315
315
|
let a = i, o = Infinity;
|
|
316
316
|
return e.forEach((e) => {
|
|
317
317
|
let t = Math.abs(n.indexOf(e) - r);
|
|
318
318
|
t < o && (o = t, a = e);
|
|
319
319
|
}), a;
|
|
320
|
-
},
|
|
320
|
+
}, k = b(() => ({
|
|
321
321
|
section: "h",
|
|
322
|
-
columnKey:
|
|
323
|
-
})),
|
|
324
|
-
let e =
|
|
325
|
-
if (!e) return
|
|
326
|
-
let t =
|
|
327
|
-
return t.length === 0 ?
|
|
322
|
+
columnKey: O(C.value, y.value)
|
|
323
|
+
})), A = b(() => {
|
|
324
|
+
let e = v.value;
|
|
325
|
+
if (!e) return k.value;
|
|
326
|
+
let t = D(e);
|
|
327
|
+
return t.length === 0 ? k.value : t.includes(e.columnKey) ? e : {
|
|
328
328
|
...e,
|
|
329
|
-
columnKey:
|
|
329
|
+
columnKey: O(t, e.columnKey)
|
|
330
330
|
};
|
|
331
|
-
}),
|
|
331
|
+
}), j = b(() => a.value.length), M = b(() => j.value + +!!H(d) + +!!H(f)), N = (e) => {
|
|
332
332
|
if (e.section === "h") return 0;
|
|
333
|
-
if (e.section === "c") return
|
|
334
|
-
if (e.section === "a") return
|
|
335
|
-
let t = e.rowKey === void 0 ? void 0 :
|
|
333
|
+
if (e.section === "c") return j.value + 1;
|
|
334
|
+
if (e.section === "a") return j.value + 1 + +!!H(d);
|
|
335
|
+
let t = e.rowKey === void 0 ? void 0 : o.value.getRowIndexByKey(e.rowKey);
|
|
336
336
|
return t === void 0 ? void 0 : t + 1;
|
|
337
|
-
},
|
|
337
|
+
}, P = (e, t) => {
|
|
338
338
|
if (e <= 0) return {
|
|
339
339
|
section: "h",
|
|
340
|
-
columnKey:
|
|
340
|
+
columnKey: O(C.value, t)
|
|
341
341
|
};
|
|
342
|
-
if (e <=
|
|
343
|
-
let n =
|
|
344
|
-
if (!n || !
|
|
345
|
-
let r =
|
|
342
|
+
if (e <= j.value) {
|
|
343
|
+
let n = a.value[e - 1];
|
|
344
|
+
if (!n || !p(n)) return;
|
|
345
|
+
let r = E(n);
|
|
346
346
|
return r.length === 0 ? void 0 : {
|
|
347
347
|
section: "b",
|
|
348
348
|
rowKey: n.key,
|
|
349
|
-
columnKey:
|
|
349
|
+
columnKey: O(r, t)
|
|
350
350
|
};
|
|
351
351
|
}
|
|
352
|
-
if (
|
|
353
|
-
let e =
|
|
352
|
+
if (H(d) && e === j.value + 1) {
|
|
353
|
+
let e = H(u);
|
|
354
354
|
return e ? {
|
|
355
355
|
section: "c",
|
|
356
356
|
columnKey: e
|
|
357
357
|
} : void 0;
|
|
358
358
|
}
|
|
359
|
-
if (
|
|
359
|
+
if (H(f) && e === M.value) return {
|
|
360
360
|
section: "a",
|
|
361
|
-
columnKey:
|
|
361
|
+
columnKey: O(C.value, t)
|
|
362
362
|
};
|
|
363
|
-
},
|
|
363
|
+
}, F = (e, t) => {
|
|
364
364
|
let n = e;
|
|
365
|
-
for (; n >= 0 && n <=
|
|
366
|
-
let e =
|
|
365
|
+
for (; n >= 0 && n <= M.value;) {
|
|
366
|
+
let e = P(n, y.value);
|
|
367
367
|
if (e) return e;
|
|
368
368
|
n += t;
|
|
369
369
|
}
|
|
370
|
-
},
|
|
371
|
-
let t =
|
|
372
|
-
if (!t || !
|
|
370
|
+
}, te = (e) => document.getElementById(h(e)) ?? void 0, I = () => te(A.value), L = () => {
|
|
371
|
+
let t = r.value, n = I();
|
|
372
|
+
if (!t || !n || n.classList.contains("s-ui-table__cell--sticky-left") || n.classList.contains("s-ui-table__cell--sticky-right")) return;
|
|
373
373
|
let i = t.getBoundingClientRect(), a = e.value, o = i.left, s = i.right, c = a?.querySelector("th.s-ui-table__cell--last-sticky-left");
|
|
374
374
|
c && (o = Math.max(o, c.getBoundingClientRect().right));
|
|
375
375
|
let l = a?.querySelector("th.s-ui-table__cell--first-sticky-right");
|
|
376
376
|
l && (s = Math.min(s, l.getBoundingClientRect().left));
|
|
377
|
-
let u =
|
|
377
|
+
let u = n.getBoundingClientRect();
|
|
378
378
|
if (u.left < o) {
|
|
379
379
|
t.scrollLeft -= o - u.left;
|
|
380
380
|
return;
|
|
381
381
|
}
|
|
382
382
|
u.right > s && (t.scrollLeft += u.right - s);
|
|
383
383
|
}, R = (e, t) => {
|
|
384
|
-
|
|
385
|
-
let n =
|
|
386
|
-
n !== void 0 && (
|
|
384
|
+
v.value = e, t && (y.value = e.columnKey);
|
|
385
|
+
let n = N(e);
|
|
386
|
+
n !== void 0 && (S.value = n);
|
|
387
387
|
}, z = (e, t) => {
|
|
388
|
-
let n =
|
|
388
|
+
let n = D(e), r = n.length > 0 && !n.includes(e.columnKey) ? {
|
|
389
389
|
...e,
|
|
390
|
-
columnKey:
|
|
390
|
+
columnKey: O(n, e.columnKey)
|
|
391
391
|
} : e;
|
|
392
|
-
if (R(r, t?.updateDesired ?? !0),
|
|
393
|
-
|
|
394
|
-
let e =
|
|
395
|
-
(t?.scroll ?? !0) && e !== void 0 &&
|
|
392
|
+
if (R(r, t?.updateDesired ?? !0), x.value = !1, r.section === "b" && r.rowKey) {
|
|
393
|
+
g(r.rowKey);
|
|
394
|
+
let e = o.value.getRowIndexByKey(r.rowKey);
|
|
395
|
+
(t?.scroll ?? !0) && e !== void 0 && _(e);
|
|
396
396
|
}
|
|
397
397
|
t?.focusElement !== !1 && ee(() => {
|
|
398
398
|
I()?.focus({ preventScroll: !0 }), L();
|
|
399
399
|
});
|
|
400
|
-
},
|
|
401
|
-
let n =
|
|
400
|
+
}, V = (e, t) => {
|
|
401
|
+
let n = A.value;
|
|
402
402
|
if (t !== 0) {
|
|
403
|
-
let e =
|
|
403
|
+
let e = D(n), r = e[e.indexOf(n.columnKey) + t];
|
|
404
404
|
r && z({
|
|
405
405
|
...n,
|
|
406
406
|
columnKey: r
|
|
@@ -408,53 +408,53 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
408
408
|
return;
|
|
409
409
|
}
|
|
410
410
|
if (e === 0) return;
|
|
411
|
-
let r = e > 0 ? 1 : -1, i =
|
|
411
|
+
let r = e > 0 ? 1 : -1, i = F((N(n) ?? S.value) + r, r);
|
|
412
412
|
i && z(i, { updateDesired: !1 });
|
|
413
|
-
},
|
|
414
|
-
let t =
|
|
413
|
+
}, ne = (e) => {
|
|
414
|
+
let t = A.value, n = D(t), r = e === "start" ? n[0] : n[n.length - 1];
|
|
415
415
|
r && z({
|
|
416
416
|
...t,
|
|
417
417
|
columnKey: r
|
|
418
418
|
});
|
|
419
|
-
},
|
|
420
|
-
let t = e === "first" ?
|
|
419
|
+
}, U = (e) => {
|
|
420
|
+
let t = e === "first" ? F(0, 1) : F(M.value, -1);
|
|
421
421
|
if (!t) return;
|
|
422
|
-
let n =
|
|
422
|
+
let n = D(t), r = e === "first" ? n[0] : n[n.length - 1];
|
|
423
423
|
z(r ? {
|
|
424
424
|
...t,
|
|
425
425
|
columnKey: r
|
|
426
426
|
} : t);
|
|
427
|
-
},
|
|
428
|
-
let t =
|
|
427
|
+
}, re = (e) => {
|
|
428
|
+
let t = N(A.value) ?? S.value, n = Math.max(1, Math.round(H(m))), r = Math.min(M.value, Math.max(0, t + e * n)), i = F(r, e) ?? F(r, e === 1 ? -1 : 1);
|
|
429
429
|
i && z(i, { updateDesired: !1 });
|
|
430
|
-
},
|
|
430
|
+
}, ie = (e) => {
|
|
431
431
|
let t = [];
|
|
432
432
|
return e.querySelectorAll(lt).forEach((e) => {
|
|
433
433
|
!(e instanceof HTMLElement) || e.offsetParent === null || e.hasAttribute("disabled") || e.closest("[aria-hidden=\"true\"]") || t.push(e);
|
|
434
434
|
}), t;
|
|
435
|
-
},
|
|
436
|
-
let e = I(), t = e ?
|
|
437
|
-
return t ? (
|
|
438
|
-
},
|
|
439
|
-
|
|
440
|
-
},
|
|
441
|
-
let t = I(), n = t ?
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
},
|
|
446
|
-
let e =
|
|
435
|
+
}, ae = () => {
|
|
436
|
+
let e = I(), t = e ? ie(e)[0] : void 0;
|
|
437
|
+
return t ? (x.value = !0, t.focus(), !0) : !1;
|
|
438
|
+
}, oe = () => {
|
|
439
|
+
x.value = !1, I()?.focus({ preventScroll: !0 });
|
|
440
|
+
}, G = (e) => {
|
|
441
|
+
let t = I(), n = t ? ie(t) : [], r = document.activeElement, i = n.findIndex((e) => e === r || r instanceof Node && e.contains(r)), a = i === -1 ? void 0 : n[i + e];
|
|
442
|
+
return a ? (a.focus(), !0) : !1;
|
|
443
|
+
}, se = (e) => {
|
|
444
|
+
x.value = !1, (e === 1 ? n.value : t.value)?.focus({ preventScroll: !0 });
|
|
445
|
+
}, ce = () => {
|
|
446
|
+
let e = A.value, n = D(e);
|
|
447
447
|
if (n.length > 0) {
|
|
448
448
|
z({
|
|
449
449
|
...e,
|
|
450
|
-
columnKey:
|
|
450
|
+
columnKey: O(n, y.value)
|
|
451
451
|
}, {
|
|
452
452
|
scroll: !1,
|
|
453
453
|
updateDesired: !1
|
|
454
454
|
});
|
|
455
455
|
return;
|
|
456
456
|
}
|
|
457
|
-
let r = Math.min(
|
|
457
|
+
let r = Math.min(S.value, M.value), i = F(r, -1) ?? F(r, 1);
|
|
458
458
|
if (i) {
|
|
459
459
|
z(i, {
|
|
460
460
|
scroll: !1,
|
|
@@ -462,8 +462,8 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
462
462
|
});
|
|
463
463
|
return;
|
|
464
464
|
}
|
|
465
|
-
if (
|
|
466
|
-
z(
|
|
465
|
+
if (C.value.length > 0) {
|
|
466
|
+
z(k.value, {
|
|
467
467
|
scroll: !1,
|
|
468
468
|
updateDesired: !1
|
|
469
469
|
});
|
|
@@ -471,41 +471,42 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
471
471
|
}
|
|
472
472
|
t.value?.focus();
|
|
473
473
|
};
|
|
474
|
-
|
|
475
|
-
let e =
|
|
476
|
-
return e === void 0 ? void 0 :
|
|
474
|
+
W(() => {
|
|
475
|
+
let e = v.value?.rowKey;
|
|
476
|
+
return e === void 0 ? void 0 : o.value.getRowIndexByKey(e);
|
|
477
477
|
}, (e, t) => {
|
|
478
|
-
t === void 0 || e !== void 0 || document.activeElement === document.body &&
|
|
478
|
+
t === void 0 || e !== void 0 || document.activeElement === document.body && ce();
|
|
479
479
|
}, { flush: "post" });
|
|
480
|
-
let
|
|
481
|
-
R(e, !0),
|
|
482
|
-
},
|
|
483
|
-
let r =
|
|
480
|
+
let le = (e, t) => {
|
|
481
|
+
R(e, !0), x.value = t, e.section === "b" && e.rowKey && g(e.rowKey);
|
|
482
|
+
}, ue = (e, t, n) => {
|
|
483
|
+
let r = A.value;
|
|
484
484
|
return r.section === e && r.rowKey === t && r.columnKey === n;
|
|
485
|
-
},
|
|
486
|
-
let e =
|
|
485
|
+
}, de = (e, t, n) => ue(e, t, n) ? 0 : -1, fe = b(() => {
|
|
486
|
+
let e = A.value;
|
|
487
487
|
return e.section === "b" ? e.rowKey : void 0;
|
|
488
488
|
});
|
|
489
489
|
return {
|
|
490
|
-
focusAddress:
|
|
491
|
-
focusedBodyRowKey:
|
|
490
|
+
focusAddress: A,
|
|
491
|
+
focusedBodyRowKey: fe,
|
|
492
492
|
focusBodyRowIndex: b(() => {
|
|
493
|
-
let e =
|
|
494
|
-
return e === void 0 ? void 0 :
|
|
493
|
+
let e = fe.value;
|
|
494
|
+
return e === void 0 ? void 0 : o.value.getRowIndexByKey(e);
|
|
495
495
|
}),
|
|
496
|
-
cellEntered:
|
|
497
|
-
isCellFocused:
|
|
498
|
-
getCellTabIndex:
|
|
499
|
-
moveFocus:
|
|
500
|
-
moveToRowEdge:
|
|
501
|
-
moveToGridEdge:
|
|
502
|
-
moveByPage:
|
|
496
|
+
cellEntered: x,
|
|
497
|
+
isCellFocused: ue,
|
|
498
|
+
getCellTabIndex: de,
|
|
499
|
+
moveFocus: V,
|
|
500
|
+
moveToRowEdge: ne,
|
|
501
|
+
moveToGridEdge: U,
|
|
502
|
+
moveByPage: re,
|
|
503
503
|
focusAddressNow: z,
|
|
504
|
-
syncFocusAddress:
|
|
505
|
-
enterCell:
|
|
506
|
-
exitCell:
|
|
507
|
-
|
|
508
|
-
|
|
504
|
+
syncFocusAddress: le,
|
|
505
|
+
enterCell: ae,
|
|
506
|
+
exitCell: oe,
|
|
507
|
+
moveCellFocus: G,
|
|
508
|
+
leaveGrid: se,
|
|
509
|
+
restoreFocusAfterUnmount: ce,
|
|
509
510
|
ensureFocusedCellVisibleHorizontally: L,
|
|
510
511
|
queryFocusedCellElement: I
|
|
511
512
|
};
|
|
@@ -566,7 +567,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
566
567
|
"menuOpen"
|
|
567
568
|
],
|
|
568
569
|
setup(e, { emit: t }) {
|
|
569
|
-
let n = t, s =
|
|
570
|
+
let n = t, s = ae(), { t: c } = fe(), f = L(!1), p = (e) => {
|
|
570
571
|
n("menuOpen"), e();
|
|
571
572
|
}, m = b(() => ({
|
|
572
573
|
"s-ui-table__group-row--active": e.active,
|
|
@@ -579,7 +580,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
579
580
|
})), h = b(() => {
|
|
580
581
|
if (e.row.depth !== 0) return { paddingInlineStart: `calc(var(--s-ui-dimension-4) + ${e.row.depth * e.treeIndent}px)` };
|
|
581
582
|
}), g = b(() => e.total === void 0 ? String(e.count) : `${e.count}/${e.total}`), _ = b(() => e.expanded ? "chevronMiniDown" : "chevronMiniRight"), v = b(() => e.expanded ? c("table.collapse") : c("table.expand"));
|
|
582
|
-
return (t, b) => (
|
|
583
|
+
return (t, b) => (I(), C("tr", {
|
|
583
584
|
ref: e.dndRef,
|
|
584
585
|
class: N(["s-ui-table__group-row", m.value]),
|
|
585
586
|
style: P(e.extraRowStyle),
|
|
@@ -589,7 +590,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
589
590
|
"aria-expanded": e.treegrid && e.row.hasChildren ? e.expanded : void 0,
|
|
590
591
|
onClick: b[3] ||= (e) => n("rowClick", e)
|
|
591
592
|
}, [
|
|
592
|
-
(
|
|
593
|
+
(I(!0), C(y, null, R(e.leadingPlans, (m) => (I(), C("td", {
|
|
593
594
|
id: `${e.cellIdPrefix}${e.row.key}-${m.descriptor.key}`,
|
|
594
595
|
key: m.descriptor.key,
|
|
595
596
|
class: N([m.cellClass, "s-ui-table__group-cell"]),
|
|
@@ -597,22 +598,22 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
597
598
|
"aria-colindex": m.descriptor.colIndex,
|
|
598
599
|
"data-column-key": m.descriptor.key,
|
|
599
600
|
"data-row-key": e.row.key,
|
|
600
|
-
"data-section":
|
|
601
|
+
"data-section": U($).BODY,
|
|
601
602
|
tabindex: m.descriptor.key === e.focusColumnKey ? 0 : -1
|
|
602
|
-
}, [m.descriptor.key === e.groupColumnKey ? (
|
|
603
|
+
}, [m.descriptor.key === e.groupColumnKey ? (I(), C("div", {
|
|
603
604
|
key: 1,
|
|
604
605
|
class: "s-ui-table__group-content",
|
|
605
606
|
style: P(h.value)
|
|
606
|
-
}, [
|
|
607
|
-
D(
|
|
607
|
+
}, [z(t.$slots, "row", {}, () => [
|
|
608
|
+
D(U(o), {
|
|
608
609
|
class: "s-ui-table__group-chevron",
|
|
609
|
-
appearance:
|
|
610
|
-
variant:
|
|
611
|
-
size:
|
|
610
|
+
appearance: U(i).BARE,
|
|
611
|
+
variant: U(r).NEUTRAL,
|
|
612
|
+
size: U(a).SMALL,
|
|
612
613
|
icon: _.value,
|
|
613
614
|
"aria-label": v.value,
|
|
614
615
|
tabindex: "-1",
|
|
615
|
-
onClick: b[0] ||=
|
|
616
|
+
onClick: b[0] ||= se((e) => n("toggle"), ["stop"])
|
|
616
617
|
}, null, 8, [
|
|
617
618
|
"appearance",
|
|
618
619
|
"variant",
|
|
@@ -620,24 +621,24 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
620
621
|
"icon",
|
|
621
622
|
"aria-label"
|
|
622
623
|
]),
|
|
623
|
-
w("div", ht, [
|
|
624
|
+
w("div", ht, [z(t.$slots, "title", {}, () => [w("span", gt, V(e.title), 1)]), w("span", _t, V(g.value), 1)]),
|
|
624
625
|
w("div", {
|
|
625
626
|
class: "s-ui-table__group-actions",
|
|
626
|
-
onClick: b[2] ||=
|
|
627
|
-
}, [
|
|
627
|
+
onClick: b[2] ||= se(() => {}, ["stop"])
|
|
628
|
+
}, [z(t.$slots, "actions"), U(s).menu ? (I(), x(U(u), {
|
|
628
629
|
key: 0,
|
|
629
630
|
modelValue: f.value,
|
|
630
631
|
"onUpdate:modelValue": b[1] ||= (e) => f.value = e,
|
|
631
|
-
placement:
|
|
632
|
+
placement: U(l).BOTTOM_END,
|
|
632
633
|
"teleport-to": !1
|
|
633
634
|
}, {
|
|
634
|
-
trigger:
|
|
635
|
+
trigger: G(({ toggle: e }) => [D(U(o), {
|
|
635
636
|
class: N(["s-ui-table__group-kebab", { "s-ui-table__group-kebab--open": f.value }]),
|
|
636
|
-
appearance:
|
|
637
|
-
variant:
|
|
638
|
-
size:
|
|
637
|
+
appearance: U(i).BARE,
|
|
638
|
+
variant: U(r).NEUTRAL,
|
|
639
|
+
size: U(a).SMALL,
|
|
639
640
|
icon: "menu",
|
|
640
|
-
"aria-label":
|
|
641
|
+
"aria-label": U(c)("table.groupMenu"),
|
|
641
642
|
tabindex: "-1",
|
|
642
643
|
onClick: (t) => p(e)
|
|
643
644
|
}, null, 8, [
|
|
@@ -648,13 +649,13 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
648
649
|
"aria-label",
|
|
649
650
|
"onClick"
|
|
650
651
|
])]),
|
|
651
|
-
content:
|
|
652
|
-
default:
|
|
652
|
+
content: G(() => [D(U(d), { width: 220 }, {
|
|
653
|
+
default: G(() => [z(t.$slots, "menu")]),
|
|
653
654
|
_: 3
|
|
654
655
|
})]),
|
|
655
656
|
_: 3
|
|
656
657
|
}, 8, ["modelValue", "placement"])) : S("", !0)])
|
|
657
|
-
])], 4)) :
|
|
658
|
+
])], 4)) : z(t.$slots, "group-cell", {
|
|
658
659
|
key: 0,
|
|
659
660
|
columnKey: m.descriptor.key
|
|
660
661
|
})], 14, mt))), 128)),
|
|
@@ -662,7 +663,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
662
663
|
class: "s-ui-table__cell s-ui-table__filler-cell s-ui-table__group-cell",
|
|
663
664
|
role: "presentation"
|
|
664
665
|
}, null, -1),
|
|
665
|
-
(
|
|
666
|
+
(I(!0), C(y, null, R(e.trailingPlans, (t) => (I(), C("td", {
|
|
666
667
|
id: `${e.cellIdPrefix}${e.row.key}-${t.descriptor.key}`,
|
|
667
668
|
key: t.descriptor.key,
|
|
668
669
|
class: N([t.cellClass, "s-ui-table__group-cell"]),
|
|
@@ -670,7 +671,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
670
671
|
"aria-colindex": t.descriptor.colIndex,
|
|
671
672
|
"data-column-key": t.descriptor.key,
|
|
672
673
|
"data-row-key": e.row.key,
|
|
673
|
-
"data-section":
|
|
674
|
+
"data-section": U($).BODY,
|
|
674
675
|
tabindex: t.descriptor.key === e.focusColumnKey ? 0 : -1
|
|
675
676
|
}, null, 14, vt))), 128))
|
|
676
677
|
], 14, pt));
|
|
@@ -683,19 +684,19 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
683
684
|
__name: "STableHint",
|
|
684
685
|
props: { text: {} },
|
|
685
686
|
setup(e) {
|
|
686
|
-
let t =
|
|
687
|
-
return (n, r) => (
|
|
687
|
+
let t = L(!1);
|
|
688
|
+
return (n, r) => (I(), C("span", {
|
|
688
689
|
class: "s-ui-table__hint",
|
|
689
690
|
tabindex: "-1",
|
|
690
691
|
onPointerenter: r[0] ||= (e) => t.value = !0,
|
|
691
692
|
onPointerleave: r[1] ||= (e) => t.value = !1,
|
|
692
693
|
onFocusin: r[2] ||= (e) => t.value = !0,
|
|
693
694
|
onFocusout: r[3] ||= (e) => t.value = !1
|
|
694
|
-
}, [D(
|
|
695
|
+
}, [D(U(le), {
|
|
695
696
|
class: "s-ui-table__hint-icon",
|
|
696
697
|
name: "infoCircle",
|
|
697
698
|
size: 16
|
|
698
|
-
}), t.value ? (
|
|
699
|
+
}), t.value ? (I(), C("span", bt, V(e.text), 1)) : S("", !0)], 32));
|
|
699
700
|
}
|
|
700
701
|
}), St = {
|
|
701
702
|
key: 0,
|
|
@@ -729,7 +730,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
729
730
|
"hide"
|
|
730
731
|
],
|
|
731
732
|
setup(e, { emit: t }) {
|
|
732
|
-
let n = t, s =
|
|
733
|
+
let n = t, s = ae(), { t: c } = fe(), f = b(() => e.menuEnabled === !1 ? !1 : !!s.menu || e.descriptor.sortable || e.descriptor.hideable), p = b(() => ({
|
|
733
734
|
"s-ui-table__header-plaque--sorted": !!e.sortDirection,
|
|
734
735
|
"s-ui-table__header-plaque--sortable": e.descriptor.sortable,
|
|
735
736
|
"s-ui-table__header-plaque--align-center": e.descriptor.align === Y.CENTER,
|
|
@@ -741,19 +742,19 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
741
742
|
}, T = (e) => {
|
|
742
743
|
n("hide"), e();
|
|
743
744
|
};
|
|
744
|
-
return (t, b) => (
|
|
745
|
+
return (t, b) => (I(), C("div", {
|
|
745
746
|
class: N(["s-ui-table__header-plaque", p.value]),
|
|
746
747
|
onClick: _
|
|
747
748
|
}, [
|
|
748
|
-
e.descriptor.draggable ? (
|
|
749
|
+
e.descriptor.draggable ? (I(), C("span", St, [D(U(o), {
|
|
749
750
|
class: "s-ui-table__header-grip",
|
|
750
|
-
appearance:
|
|
751
|
-
variant:
|
|
752
|
-
size:
|
|
751
|
+
appearance: U(i).BARE,
|
|
752
|
+
variant: U(r).NEUTRAL,
|
|
753
|
+
size: U(a).SMALL,
|
|
753
754
|
icon: "dragAndDrop",
|
|
754
|
-
"aria-label":
|
|
755
|
+
"aria-label": U(c)("table.dragColumn"),
|
|
755
756
|
tabindex: "-1",
|
|
756
|
-
onClick: b[0] ||=
|
|
757
|
+
onClick: b[0] ||= se(() => {}, ["stop"])
|
|
757
758
|
}, null, 8, [
|
|
758
759
|
"appearance",
|
|
759
760
|
"variant",
|
|
@@ -761,25 +762,25 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
761
762
|
"aria-label"
|
|
762
763
|
])])) : S("", !0),
|
|
763
764
|
w("span", Ct, [
|
|
764
|
-
w("span", wt, [
|
|
765
|
-
e.descriptor.column?.description ? (
|
|
765
|
+
w("span", wt, [z(t.$slots, "default", {}, () => [E(V(e.descriptor.column?.title), 1)])]),
|
|
766
|
+
e.descriptor.column?.description ? (I(), x(xt, {
|
|
766
767
|
key: 0,
|
|
767
768
|
text: e.descriptor.column.description
|
|
768
769
|
}, null, 8, ["text"])) : S("", !0),
|
|
769
|
-
e.sortDirection ? (
|
|
770
|
+
e.sortDirection ? (I(), C("span", Tt, [D(U(le), {
|
|
770
771
|
name: g.value,
|
|
771
772
|
size: 16
|
|
772
|
-
}, null, 8, ["name"]), e.sortIndex === void 0 ? S("", !0) : (
|
|
773
|
-
e.descriptor.sortable && !e.sortDirection ? (
|
|
773
|
+
}, null, 8, ["name"]), e.sortIndex === void 0 ? S("", !0) : (I(), C("span", Et, V(e.sortIndex), 1))])) : S("", !0),
|
|
774
|
+
e.descriptor.sortable && !e.sortDirection ? (I(), x(U(o), {
|
|
774
775
|
key: 2,
|
|
775
776
|
class: "s-ui-table__header-sort-button",
|
|
776
|
-
appearance:
|
|
777
|
-
variant:
|
|
778
|
-
size:
|
|
777
|
+
appearance: U(i).BARE,
|
|
778
|
+
variant: U(r).NEUTRAL,
|
|
779
|
+
size: U(a).SMALL,
|
|
779
780
|
icon: "ascending",
|
|
780
|
-
"aria-label":
|
|
781
|
+
"aria-label": U(c)("table.sortAsc"),
|
|
781
782
|
tabindex: "-1",
|
|
782
|
-
onClick: b[1] ||=
|
|
783
|
+
onClick: b[1] ||= se((e) => n("sortToggle", e.shiftKey || e.ctrlKey || e.metaKey), ["stop"])
|
|
783
784
|
}, null, 8, [
|
|
784
785
|
"appearance",
|
|
785
786
|
"variant",
|
|
@@ -787,23 +788,23 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
787
788
|
"aria-label"
|
|
788
789
|
])) : S("", !0)
|
|
789
790
|
]),
|
|
790
|
-
f.value ? (
|
|
791
|
+
f.value ? (I(), C("span", {
|
|
791
792
|
key: 1,
|
|
792
793
|
class: N(["s-ui-table__header-actions", m.value]),
|
|
793
|
-
onClick: b[3] ||=
|
|
794
|
-
}, [D(
|
|
794
|
+
onClick: b[3] ||= se(() => {}, ["stop"])
|
|
795
|
+
}, [D(U(u), {
|
|
795
796
|
"model-value": e.menuOpen,
|
|
796
|
-
placement:
|
|
797
|
+
placement: U(l).BOTTOM_END,
|
|
797
798
|
"teleport-to": !1,
|
|
798
799
|
"onUpdate:modelValue": b[2] ||= (e) => n("update:menuOpen", e)
|
|
799
800
|
}, {
|
|
800
|
-
trigger:
|
|
801
|
+
trigger: G(({ toggle: e }) => [D(U(o), {
|
|
801
802
|
class: "s-ui-table__header-kebab",
|
|
802
|
-
appearance:
|
|
803
|
-
variant:
|
|
804
|
-
size:
|
|
803
|
+
appearance: U(i).BARE,
|
|
804
|
+
variant: U(r).NEUTRAL,
|
|
805
|
+
size: U(a).SMALL,
|
|
805
806
|
icon: "menu",
|
|
806
|
-
"aria-label":
|
|
807
|
+
"aria-label": U(c)("table.columnMenu"),
|
|
807
808
|
tabindex: "-1",
|
|
808
809
|
onClick: (t) => e()
|
|
809
810
|
}, null, 8, [
|
|
@@ -813,39 +814,39 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
813
814
|
"aria-label",
|
|
814
815
|
"onClick"
|
|
815
816
|
])]),
|
|
816
|
-
content:
|
|
817
|
-
default:
|
|
818
|
-
e.descriptor.sortable ? (
|
|
817
|
+
content: G(({ close: n }) => [D(U(d), { width: 220 }, {
|
|
818
|
+
default: G(() => [U(s).menu ? z(t.$slots, "menu", { key: 0 }) : (I(), C(y, { key: 1 }, [
|
|
819
|
+
e.descriptor.sortable ? (I(), x(U(h), {
|
|
819
820
|
key: 0,
|
|
820
|
-
title:
|
|
821
|
+
title: U(c)("table.sortAsc"),
|
|
821
822
|
"icon-left": "ascending",
|
|
822
|
-
selected: e.sortDirection ===
|
|
823
|
-
onClick: (e) => v(
|
|
823
|
+
selected: e.sortDirection === U(X).ASC,
|
|
824
|
+
onClick: (e) => v(U(X).ASC, n)
|
|
824
825
|
}, null, 8, [
|
|
825
826
|
"title",
|
|
826
827
|
"selected",
|
|
827
828
|
"onClick"
|
|
828
829
|
])) : S("", !0),
|
|
829
|
-
e.descriptor.sortable ? (
|
|
830
|
+
e.descriptor.sortable ? (I(), x(U(h), {
|
|
830
831
|
key: 1,
|
|
831
|
-
title:
|
|
832
|
+
title: U(c)("table.sortDesc"),
|
|
832
833
|
"icon-left": "descending",
|
|
833
|
-
selected: e.sortDirection ===
|
|
834
|
-
onClick: (e) => v(
|
|
834
|
+
selected: e.sortDirection === U(X).DESC,
|
|
835
|
+
onClick: (e) => v(U(X).DESC, n)
|
|
835
836
|
}, null, 8, [
|
|
836
837
|
"title",
|
|
837
838
|
"selected",
|
|
838
839
|
"onClick"
|
|
839
840
|
])) : S("", !0),
|
|
840
|
-
e.descriptor.sortable && e.sortDirection ? (
|
|
841
|
+
e.descriptor.sortable && e.sortDirection ? (I(), x(U(h), {
|
|
841
842
|
key: 2,
|
|
842
|
-
title:
|
|
843
|
+
title: U(c)("table.sortReset"),
|
|
843
844
|
"icon-left": "closeMini",
|
|
844
845
|
onClick: (e) => v(void 0, n)
|
|
845
846
|
}, null, 8, ["title", "onClick"])) : S("", !0),
|
|
846
|
-
e.descriptor.hideable ? (
|
|
847
|
+
e.descriptor.hideable ? (I(), x(U(h), {
|
|
847
848
|
key: 3,
|
|
848
|
-
title:
|
|
849
|
+
title: U(c)("table.hideColumn"),
|
|
849
850
|
"icon-left": "eyeOff",
|
|
850
851
|
onClick: (e) => T(n)
|
|
851
852
|
}, null, 8, ["title", "onClick"])) : S("", !0)
|
|
@@ -873,19 +874,19 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
873
874
|
},
|
|
874
875
|
setup(e) {
|
|
875
876
|
let t = b(() => e.rowHeight ? { height: `${e.rowHeight}px` } : void 0);
|
|
876
|
-
return (n, r) => (
|
|
877
|
+
return (n, r) => (I(), C("tr", {
|
|
877
878
|
class: "s-ui-table__row s-ui-table__row--placeholder",
|
|
878
879
|
style: P(t.value),
|
|
879
880
|
"data-index": e.rowIndex,
|
|
880
881
|
"aria-rowindex": e.rowIndex + 2,
|
|
881
882
|
"data-placeholder": "true"
|
|
882
|
-
}, [(
|
|
883
|
+
}, [(I(!0), C(y, null, R(e.cells, (t) => (I(), C(y, { key: t.key }, [t.cellPlan ? (I(), C("td", {
|
|
883
884
|
key: 1,
|
|
884
885
|
class: N(t.cellPlan.cellClass),
|
|
885
886
|
style: P(t.cellPlan.style),
|
|
886
887
|
"data-column-key": t.cellPlan.descriptor.key,
|
|
887
888
|
"data-row-key": e.rowKey
|
|
888
|
-
}, [t.cellPlan.descriptor.service ? S("", !0) : (
|
|
889
|
+
}, [t.cellPlan.descriptor.service ? S("", !0) : (I(), C("div", jt, [...r[0] ||= [w("span", { class: "s-ui-table__placeholder-bar" }, null, -1)]]))], 14, At)) : (I(), C("td", kt))], 64))), 128))], 12, Ot));
|
|
889
890
|
}
|
|
890
891
|
}), Nt = (t) => e(t) || n(t), Pt = (e) => Nt(e) ? void 0 : `s-ui-table__row--color-${e}`, Ft = (n) => {
|
|
891
892
|
if (!Nt(n)) return;
|
|
@@ -946,7 +947,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
946
947
|
expandableKeys: i
|
|
947
948
|
});
|
|
948
949
|
}, l = b(() => {
|
|
949
|
-
let r =
|
|
950
|
+
let r = ne(H(e)), i = H(t), a = H(n), o = s.get(r);
|
|
950
951
|
if (o && o.itemKeyValue === i && o.childrenKeyValue === a) return o.index;
|
|
951
952
|
let l = c(r, i, a);
|
|
952
953
|
return s.set(r, {
|
|
@@ -960,7 +961,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
960
961
|
let n = /* @__PURE__ */ new Map();
|
|
961
962
|
return d.set(e, n), n;
|
|
962
963
|
}, p = b(() => {
|
|
963
|
-
let t =
|
|
964
|
+
let t = ne(H(e)), { roots: n, nodeByKey: i } = l.value, s = H(r), c = H(a), d = H(o), p = u.value, m = c ? new Set(c.depths) : void 0, h = c?.show ?? (() => !0), g = f(t), _ = [], v = [], y = /* @__PURE__ */ new Map(), b = (e, t, n, r) => (e.index = _.length, e.kind = t, e.hasChildren = n, e.expanded = r, e.subtreeEnd = e.index, _.push(e), e), x = (e, t, n, r) => (e.row ||= Gt(e.key, e.item, e.depth, e.parentKey), b(e.row, t, n, r)), S = (e, t, n) => {
|
|
964
965
|
let r = g.get(e);
|
|
965
966
|
return r || (r = Gt(e, t.item, t.depth + 1, t.key), g.set(e, r)), b(r, n, !1, !1);
|
|
966
967
|
}, C = (e) => {
|
|
@@ -1031,7 +1032,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1031
1032
|
},
|
|
1032
1033
|
setup(e) {
|
|
1033
1034
|
let t = b(() => Ut(e.item, e.column.value ?? e.column.key)), n = b(() => t.value !== void 0 && t.value !== "");
|
|
1034
|
-
return (r, i) => n.value ? (
|
|
1035
|
+
return (r, i) => n.value ? (I(), C("span", qt, V(t.value), 1)) : e.column.placeholder ? (I(), C("span", Jt, V(e.column.placeholder), 1)) : S("", !0);
|
|
1035
1036
|
}
|
|
1036
1037
|
}), Xt = [
|
|
1037
1038
|
"id",
|
|
@@ -1133,7 +1134,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1133
1134
|
"toggleSelected"
|
|
1134
1135
|
],
|
|
1135
1136
|
setup(e, { emit: t }) {
|
|
1136
|
-
let n = t, s =
|
|
1137
|
+
let n = t, s = ae(), { t: c } = fe(), l = $.BODY, u = (t) => `${e.cellIdPrefix}${e.row.key}-${t}`, d = (t) => t === e.focusColumnKey ? 0 : -1, f = b(() => [
|
|
1137
1138
|
{
|
|
1138
1139
|
"s-ui-table__row--selected": e.selected,
|
|
1139
1140
|
"s-ui-table__row--active": e.active,
|
|
@@ -1199,7 +1200,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1199
1200
|
}
|
|
1200
1201
|
n("rowClick", e);
|
|
1201
1202
|
};
|
|
1202
|
-
return (t, p) => (
|
|
1203
|
+
return (t, p) => (I(), C("tr", {
|
|
1203
1204
|
id: e.domId,
|
|
1204
1205
|
ref: e.dndRef,
|
|
1205
1206
|
class: N(["s-ui-table__row", f.value]),
|
|
@@ -1212,7 +1213,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1212
1213
|
onClick: F,
|
|
1213
1214
|
onContextmenu: p[3] ||= (e) => n("rowContextMenu", e)
|
|
1214
1215
|
}, [
|
|
1215
|
-
(
|
|
1216
|
+
(I(!0), C(y, null, R(e.leadingPlans, (f) => (I(), C("td", {
|
|
1216
1217
|
id: u(f.descriptor.key),
|
|
1217
1218
|
key: f.descriptor.key,
|
|
1218
1219
|
class: N(f.cellClass),
|
|
@@ -1220,73 +1221,73 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1220
1221
|
"aria-colindex": f.descriptor.colIndex,
|
|
1221
1222
|
"data-column-key": f.descriptor.key,
|
|
1222
1223
|
"data-row-key": e.row.key,
|
|
1223
|
-
"data-section":
|
|
1224
|
+
"data-section": U(l),
|
|
1224
1225
|
"aria-disabled": D(f),
|
|
1225
1226
|
"aria-readonly": O(f),
|
|
1226
1227
|
tabindex: d(f.descriptor.key)
|
|
1227
|
-
}, [f.descriptor.service ===
|
|
1228
|
+
}, [f.descriptor.service === U(qe).INDICATOR ? (I(), C(y, { key: 0 }, [e.placeholder ? S("", !0) : z(t.$slots, "indicator", M({
|
|
1228
1229
|
key: 0,
|
|
1229
1230
|
ref_for: !0
|
|
1230
|
-
}, A()))], 64)) : f.descriptor.service ===
|
|
1231
|
+
}, A()))], 64)) : f.descriptor.service === U(qe).CHECKBOX ? (I(), C(y, { key: 1 }, [U(s).checkbox && !e.placeholder ? z(t.$slots, "checkbox", M({
|
|
1231
1232
|
key: 0,
|
|
1232
1233
|
ref_for: !0
|
|
1233
|
-
}, A())) : e.rowSelectable && !e.placeholder ? (
|
|
1234
|
+
}, A())) : e.rowSelectable && !e.placeholder ? (I(), x(We, {
|
|
1234
1235
|
key: 1,
|
|
1235
1236
|
class: N(["s-ui-table__row-checkbox", { "s-ui-table__row-checkbox--active": e.selected || e.indeterminate }]),
|
|
1236
1237
|
"model-value": e.selected,
|
|
1237
1238
|
indeterminate: e.indeterminate,
|
|
1238
|
-
"screen-reader-label":
|
|
1239
|
+
"screen-reader-label": U(c)("table.selectRow"),
|
|
1239
1240
|
"onUpdate:modelValue": p[0] ||= (e) => n("toggleSelected"),
|
|
1240
|
-
onClick: p[1] ||=
|
|
1241
|
+
onClick: p[1] ||= se(() => {}, ["stop"])
|
|
1241
1242
|
}, null, 8, [
|
|
1242
1243
|
"class",
|
|
1243
1244
|
"model-value",
|
|
1244
1245
|
"indeterminate",
|
|
1245
1246
|
"screen-reader-label"
|
|
1246
|
-
])) : S("", !0)], 64)) : e.placeholder ? (
|
|
1247
|
+
])) : S("", !0)], 64)) : e.placeholder ? (I(), C("div", {
|
|
1247
1248
|
key: 2,
|
|
1248
1249
|
class: "s-ui-table__cell-body",
|
|
1249
1250
|
style: P(g(f))
|
|
1250
|
-
}, [...p[4] ||= [w("span", { class: "s-ui-table__placeholder-bar" }, null, -1)]], 4)) : (
|
|
1251
|
+
}, [...p[4] ||= [w("span", { class: "s-ui-table__placeholder-bar" }, null, -1)]], 4)) : (I(), C("div", {
|
|
1251
1252
|
key: 3,
|
|
1252
1253
|
class: N(["s-ui-table__cell-body", E(f)]),
|
|
1253
1254
|
style: P(g(f))
|
|
1254
1255
|
}, [
|
|
1255
|
-
f.chevron ? (
|
|
1256
|
+
f.chevron ? (I(), C(y, { key: 0 }, [U(s).chevron ? z(t.$slots, "chevron", M({
|
|
1256
1257
|
key: 0,
|
|
1257
1258
|
ref_for: !0
|
|
1258
|
-
}, A())) : e.row.hasChildren ? (
|
|
1259
|
+
}, A())) : e.row.hasChildren ? (I(), x(U(o), {
|
|
1259
1260
|
key: 1,
|
|
1260
1261
|
class: "s-ui-table__chevron",
|
|
1261
|
-
appearance:
|
|
1262
|
-
variant:
|
|
1263
|
-
size:
|
|
1262
|
+
appearance: U(i).BARE,
|
|
1263
|
+
variant: U(r).NEUTRAL,
|
|
1264
|
+
size: U(a).SMALL,
|
|
1264
1265
|
icon: e.rowExpanded ? "chevronMiniDown" : "chevronMiniRight",
|
|
1265
|
-
"aria-label": e.rowExpanded ?
|
|
1266
|
+
"aria-label": e.rowExpanded ? U(c)("table.collapse") : U(c)("table.expand"),
|
|
1266
1267
|
tabindex: "-1",
|
|
1267
|
-
onClick: p[2] ||=
|
|
1268
|
+
onClick: p[2] ||= se((e) => n("toggleExpand"), ["stop"])
|
|
1268
1269
|
}, null, 8, [
|
|
1269
1270
|
"appearance",
|
|
1270
1271
|
"variant",
|
|
1271
1272
|
"size",
|
|
1272
1273
|
"icon",
|
|
1273
1274
|
"aria-label"
|
|
1274
|
-
])) : (
|
|
1275
|
-
|
|
1275
|
+
])) : (I(), C("span", Qt))], 64)) : S("", !0),
|
|
1276
|
+
U(s)[`cell:${f.descriptor.key}`] ? z(t.$slots, `cell:${f.descriptor.key}`, M({
|
|
1276
1277
|
key: 1,
|
|
1277
1278
|
ref_for: !0
|
|
1278
|
-
}, j(f))) : f.descriptor.column ? (
|
|
1279
|
+
}, j(f))) : f.descriptor.column ? (I(), x(Yt, {
|
|
1279
1280
|
key: 2,
|
|
1280
1281
|
column: f.descriptor.column,
|
|
1281
1282
|
item: e.row.item
|
|
1282
1283
|
}, null, 8, ["column", "item"])) : S("", !0),
|
|
1283
|
-
|
|
1284
|
+
U(s)["cell-actions"] && !e.placeholder ? (I(), C("span", $t, [z(t.$slots, "cell-actions", M({ ref_for: !0 }, j(f)))])) : S("", !0)
|
|
1284
1285
|
], 6))], 14, Zt))), 128)),
|
|
1285
1286
|
p[6] ||= w("td", {
|
|
1286
1287
|
class: "s-ui-table__cell s-ui-table__filler-cell",
|
|
1287
1288
|
role: "presentation"
|
|
1288
1289
|
}, null, -1),
|
|
1289
|
-
(
|
|
1290
|
+
(I(!0), C(y, null, R(e.trailingPlans, (n) => (I(), C("td", {
|
|
1290
1291
|
id: u(n.descriptor.key),
|
|
1291
1292
|
key: n.descriptor.key,
|
|
1292
1293
|
class: N(n.cellClass),
|
|
@@ -1294,26 +1295,26 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1294
1295
|
"aria-colindex": n.descriptor.colIndex,
|
|
1295
1296
|
"data-column-key": n.descriptor.key,
|
|
1296
1297
|
"data-row-key": e.row.key,
|
|
1297
|
-
"data-section":
|
|
1298
|
+
"data-section": U(l),
|
|
1298
1299
|
"aria-disabled": D(n),
|
|
1299
1300
|
"aria-readonly": O(n),
|
|
1300
1301
|
tabindex: d(n.descriptor.key)
|
|
1301
|
-
}, [n.descriptor.service ===
|
|
1302
|
+
}, [n.descriptor.service === U(qe).RIGHT_EDGE ? (I(), C(y, { key: 0 }, [e.placeholder ? S("", !0) : (I(), C("div", tn, [z(t.$slots, "right-edge", M({ ref_for: !0 }, A()))]))], 64)) : e.placeholder ? (I(), C("div", {
|
|
1302
1303
|
key: 1,
|
|
1303
1304
|
class: "s-ui-table__cell-body",
|
|
1304
1305
|
style: P(g(n))
|
|
1305
|
-
}, [...p[5] ||= [w("span", { class: "s-ui-table__placeholder-bar" }, null, -1)]], 4)) : (
|
|
1306
|
+
}, [...p[5] ||= [w("span", { class: "s-ui-table__placeholder-bar" }, null, -1)]], 4)) : (I(), C("div", {
|
|
1306
1307
|
key: 2,
|
|
1307
1308
|
class: N(["s-ui-table__cell-body", E(n)]),
|
|
1308
1309
|
style: P(g(n))
|
|
1309
|
-
}, [
|
|
1310
|
+
}, [U(s)[`cell:${n.descriptor.key}`] ? z(t.$slots, `cell:${n.descriptor.key}`, M({
|
|
1310
1311
|
key: 0,
|
|
1311
1312
|
ref_for: !0
|
|
1312
|
-
}, j(n))) : n.descriptor.column ? (
|
|
1313
|
+
}, j(n))) : n.descriptor.column ? (I(), x(Yt, {
|
|
1313
1314
|
key: 1,
|
|
1314
1315
|
column: n.descriptor.column,
|
|
1315
1316
|
item: e.row.item
|
|
1316
|
-
}, null, 8, ["column", "item"])) : S("", !0),
|
|
1317
|
+
}, null, 8, ["column", "item"])) : S("", !0), U(s)["cell-actions"] && !e.placeholder ? (I(), C("span", nn, [z(t.$slots, "cell-actions", M({ ref_for: !0 }, j(n)))])) : S("", !0)], 6))], 14, en))), 128))
|
|
1317
1318
|
], 46, Xt));
|
|
1318
1319
|
}
|
|
1319
1320
|
}), an = {
|
|
@@ -1326,23 +1327,23 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1326
1327
|
trailingPlans: {}
|
|
1327
1328
|
},
|
|
1328
1329
|
setup(e) {
|
|
1329
|
-
return (t, n) => (
|
|
1330
|
-
(
|
|
1330
|
+
return (t, n) => (I(), C("tr", an, [
|
|
1331
|
+
(I(!0), C(y, null, R(e.leadingPlans, (e) => (I(), C("td", {
|
|
1331
1332
|
key: e.descriptor.key,
|
|
1332
1333
|
class: N(e.cellClass),
|
|
1333
1334
|
style: P(e.style)
|
|
1334
|
-
}, [e.descriptor.column ?
|
|
1335
|
+
}, [e.descriptor.column ? z(t.$slots, "default", {
|
|
1335
1336
|
key: 0,
|
|
1336
1337
|
descriptor: e.descriptor
|
|
1337
|
-
}, () => [w("div", on, [D(
|
|
1338
|
+
}, () => [w("div", on, [D(U(de), {
|
|
1338
1339
|
class: "s-ui-table__skeleton",
|
|
1339
|
-
type: e.descriptor.primary ?
|
|
1340
|
+
type: e.descriptor.primary ? U(ce).S_TABLE_ROW : U(ce).S_TABLE_CELL
|
|
1340
1341
|
}, null, 8, ["type"])])]) : S("", !0)], 6))), 128)),
|
|
1341
1342
|
n[0] ||= w("td", {
|
|
1342
1343
|
class: "s-ui-table__cell s-ui-table__filler-cell",
|
|
1343
1344
|
role: "presentation"
|
|
1344
1345
|
}, null, -1),
|
|
1345
|
-
(
|
|
1346
|
+
(I(!0), C(y, null, R(e.trailingPlans, (e) => (I(), C("td", {
|
|
1346
1347
|
key: e.descriptor.key,
|
|
1347
1348
|
class: N(e.cellClass),
|
|
1348
1349
|
style: P(e.style)
|
|
@@ -1350,7 +1351,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1350
1351
|
]));
|
|
1351
1352
|
}
|
|
1352
1353
|
}), cn = "s-ui-table-column", ln = "s-ui-table-row", un = (e, t) => e.type === "s-ui-table-column" && e.tableId === t, dn = (e, t) => e.type === "s-ui-table-row" && e.tableId === t, fn = ({ tableId: e, tableRootElement: t, enabled: n, columnDescriptors: r, onReorder: i, isResizing: a }) => {
|
|
1353
|
-
let o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c =
|
|
1354
|
+
let o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = B(), l = B(), u = (e) => r.value.find((t) => t.key === e), d = (e, t) => {
|
|
1354
1355
|
let n = u(e), r = u(t);
|
|
1355
1356
|
if (!n || !r || r.primary) return !1;
|
|
1356
1357
|
let i = (e) => e.sticky ?? "regular";
|
|
@@ -1364,11 +1365,11 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1364
1365
|
}
|
|
1365
1366
|
if (s.get(r) === t) return;
|
|
1366
1367
|
o.get(r)?.(), s.set(r, t);
|
|
1367
|
-
let i = q(
|
|
1368
|
+
let i = xe(q({
|
|
1368
1369
|
element: r,
|
|
1369
1370
|
canDrag: () => {
|
|
1370
1371
|
let e = u(t);
|
|
1371
|
-
return !!(
|
|
1372
|
+
return !!(H(n) && e?.draggable && !H(a));
|
|
1372
1373
|
},
|
|
1373
1374
|
getInitialData: () => ({
|
|
1374
1375
|
type: cn,
|
|
@@ -1433,8 +1434,8 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1433
1434
|
e();
|
|
1434
1435
|
}), o.clear(), s.clear();
|
|
1435
1436
|
});
|
|
1436
|
-
let m =
|
|
1437
|
-
return
|
|
1437
|
+
let m = B();
|
|
1438
|
+
return W(l, (e) => {
|
|
1438
1439
|
let n = t.value, r = e ? n?.querySelector(`th[data-column-key="${e.targetKey}"]`) : void 0;
|
|
1439
1440
|
if (!e || !n || !r) {
|
|
1440
1441
|
m.value = void 0;
|
|
@@ -1485,9 +1486,9 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1485
1486
|
[pn[e.align]]: !!e.column
|
|
1486
1487
|
};
|
|
1487
1488
|
}, l = (e) => {
|
|
1488
|
-
if (!
|
|
1489
|
-
let i =
|
|
1490
|
-
return e.key === (i ??
|
|
1489
|
+
if (!H(t) || !e.column) return !1;
|
|
1490
|
+
let i = H(n);
|
|
1491
|
+
return e.key === (i ?? H(r));
|
|
1491
1492
|
}, u = (e) => {
|
|
1492
1493
|
let t = ["s-ui-table__cell"];
|
|
1493
1494
|
return Object.entries(c(e)).forEach(([e, n]) => {
|
|
@@ -1523,7 +1524,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1523
1524
|
})
|
|
1524
1525
|
};
|
|
1525
1526
|
}, hn = ({ tableRootElement: e, scrollElement: t, columnDescriptors: n, columnWidths: r, enabled: i, onResizeEnd: a, remeasureRows: o }) => {
|
|
1526
|
-
let s =
|
|
1527
|
+
let s = L(), c = b(() => s.value?.columnKey), l = (e, t) => {
|
|
1527
1528
|
let n = Math.max(e.minWidth, t);
|
|
1528
1529
|
return e.maxWidth ? Math.min(e.maxWidth, n) : n;
|
|
1529
1530
|
}, u = (t, r) => {
|
|
@@ -1553,25 +1554,25 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1553
1554
|
let t = s.value;
|
|
1554
1555
|
t && (s.value = void 0, e && f(t.columnKey, t.liveWidth), d());
|
|
1555
1556
|
};
|
|
1556
|
-
return
|
|
1557
|
+
return K("pointermove", (e) => {
|
|
1557
1558
|
let t = s.value;
|
|
1558
1559
|
if (!t || e.pointerId !== t.pointerId) return;
|
|
1559
1560
|
let r = n.value.find((e) => e.key === t.columnKey);
|
|
1560
1561
|
if (!r) return;
|
|
1561
1562
|
let i = l(r, t.startWidth + (e.clientX - t.startClientX));
|
|
1562
1563
|
i !== t.liveWidth && (t.liveWidth = i, u(t.columnKey, i));
|
|
1563
|
-
}),
|
|
1564
|
+
}), K("pointerup", (e) => {
|
|
1564
1565
|
s.value && e.pointerId === s.value.pointerId && p(!0);
|
|
1565
|
-
}),
|
|
1566
|
+
}), K("pointercancel", () => {
|
|
1566
1567
|
p(!1);
|
|
1567
|
-
}),
|
|
1568
|
+
}), K("blur", () => {
|
|
1568
1569
|
p(!1);
|
|
1569
|
-
}),
|
|
1570
|
+
}), K("keydown", (e) => {
|
|
1570
1571
|
s.value && e.key === "Escape" && (e.preventDefault(), p(!1));
|
|
1571
1572
|
}), {
|
|
1572
1573
|
resizingColumnKey: c,
|
|
1573
1574
|
handleResizeHandlePointerdown: (e, t) => {
|
|
1574
|
-
if (!
|
|
1575
|
+
if (!H(i)) return;
|
|
1575
1576
|
let r = n.value.find((e) => e.key === t);
|
|
1576
1577
|
r?.resizable && (e.preventDefault(), e.stopPropagation(), e.isTrusted && e.target instanceof Element && e.target.setPointerCapture(e.pointerId), s.value = {
|
|
1577
1578
|
columnKey: t,
|
|
@@ -1582,7 +1583,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1582
1583
|
});
|
|
1583
1584
|
},
|
|
1584
1585
|
handleResizeHandleKeydown: (e, t) => {
|
|
1585
|
-
if (!
|
|
1586
|
+
if (!H(i) || e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
1586
1587
|
let r = n.value.find((e) => e.key === t);
|
|
1587
1588
|
if (!r?.resizable) return;
|
|
1588
1589
|
e.preventDefault();
|
|
@@ -1590,7 +1591,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1590
1591
|
s !== r.width && f(t, s);
|
|
1591
1592
|
},
|
|
1592
1593
|
handleResizeHandleDblclick: (e) => {
|
|
1593
|
-
if (!
|
|
1594
|
+
if (!H(i)) return;
|
|
1594
1595
|
let r = n.value.find((t) => t.key === e), a = t.value;
|
|
1595
1596
|
if (!r?.resizable || !a) return;
|
|
1596
1597
|
let o = r.minWidth;
|
|
@@ -1601,25 +1602,35 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1601
1602
|
s !== r.width && f(e, s);
|
|
1602
1603
|
}
|
|
1603
1604
|
};
|
|
1604
|
-
}, gn = ({ gridFocus: e, columnDescriptors: t, flatRows: n, expandColumnKey: r, primaryColumnKey: i, groupColumnKey: a, selectable: o, openMenuColumnKey: s, toggleExpanded: c, toggleRowSelected: l, applySortCycle: u, setColumnMenuOpen: d, resizeColumnByKeyboard: f, onDepthFooterActivate: p, onLoadMoreActivate: h, onRowActivate: g }) => {
|
|
1605
|
+
}, gn = "input, textarea, select, [contenteditable=\"true\"]", _n = ({ gridFocus: e, columnDescriptors: t, flatRows: n, expandColumnKey: r, primaryColumnKey: i, groupColumnKey: a, selectable: o, openMenuColumnKey: s, toggleExpanded: c, toggleRowSelected: l, applySortCycle: u, setColumnMenuOpen: d, resizeColumnByKeyboard: f, onDepthFooterActivate: p, onLoadMoreActivate: h, onRowActivate: g }) => {
|
|
1605
1606
|
let _ = () => {
|
|
1606
1607
|
let n = e.focusAddress.value.columnKey;
|
|
1607
1608
|
return t.value.find((e) => e.key === n);
|
|
1608
1609
|
}, v = () => {
|
|
1609
1610
|
let t = e.focusBodyRowIndex.value;
|
|
1610
1611
|
return t === void 0 ? void 0 : n.value[t];
|
|
1611
|
-
}, y = (e) => e.kind === Q.GROUP ?
|
|
1612
|
+
}, y = (e) => e.kind === Q.GROUP ? H(a) : H(r) ?? H(i), b = (t, n, r) => {
|
|
1613
|
+
let i = t.currentTarget, a = t.relatedTarget;
|
|
1614
|
+
return !(i instanceof Node && a instanceof Node && i.contains(a)) && n.matches(":focus-visible") && !n.matches(gn) && !e.isCellFocused(r.section, r.rowKey, r.columnKey);
|
|
1615
|
+
}, x = (e) => {
|
|
1616
|
+
let t = dt(e.dataset.section ?? null), n = e.dataset.columnKey;
|
|
1617
|
+
return !t || !n ? null : {
|
|
1618
|
+
section: t,
|
|
1619
|
+
rowKey: e.dataset.rowKey,
|
|
1620
|
+
columnKey: n
|
|
1621
|
+
};
|
|
1622
|
+
}, S = (t) => {
|
|
1612
1623
|
let n = t.target;
|
|
1613
1624
|
if (!(n instanceof HTMLElement)) return;
|
|
1614
|
-
let r = n.closest("[data-section]");
|
|
1615
|
-
if (!
|
|
1616
|
-
let
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
},
|
|
1625
|
+
let r = n.closest("[data-section]"), i = r instanceof HTMLElement ? x(r) : null;
|
|
1626
|
+
if (!i) return;
|
|
1627
|
+
let a = r !== n;
|
|
1628
|
+
if (a && b(t, n, i)) {
|
|
1629
|
+
e.focusAddressNow(e.focusAddress.value, { scroll: !1 });
|
|
1630
|
+
return;
|
|
1631
|
+
}
|
|
1632
|
+
e.syncFocusAddress(i, a);
|
|
1633
|
+
}, C = (t) => {
|
|
1623
1634
|
let r = e.focusAddress.value;
|
|
1624
1635
|
if (r.section !== $.BODY || !r.rowKey) return !1;
|
|
1625
1636
|
let i = v();
|
|
@@ -1630,7 +1641,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1630
1641
|
rowKey: a.rowKey,
|
|
1631
1642
|
columnKey: r.columnKey
|
|
1632
1643
|
}), !0) : (c(a.rowKey), !0) : !1;
|
|
1633
|
-
},
|
|
1644
|
+
}, w = (t) => {
|
|
1634
1645
|
let n = e.focusAddress.value;
|
|
1635
1646
|
if (n.section === $.HEADER) {
|
|
1636
1647
|
let n = _();
|
|
@@ -1659,33 +1670,41 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1659
1670
|
return;
|
|
1660
1671
|
}
|
|
1661
1672
|
e.enterCell() || g(r, t);
|
|
1662
|
-
},
|
|
1663
|
-
if (t.
|
|
1664
|
-
|
|
1673
|
+
}, T = (t) => {
|
|
1674
|
+
if (t.defaultPrevented) return;
|
|
1675
|
+
let n = t.shiftKey ? -1 : 1;
|
|
1676
|
+
if (e.cellEntered.value && e.moveCellFocus(n)) {
|
|
1677
|
+
t.preventDefault();
|
|
1665
1678
|
return;
|
|
1666
1679
|
}
|
|
1667
|
-
|
|
1668
|
-
},
|
|
1680
|
+
e.leaveGrid(n);
|
|
1681
|
+
}, E = (t) => {
|
|
1682
|
+
t.key === "Escape" && (t.preventDefault(), e.exitCell());
|
|
1683
|
+
}, D = (t) => {
|
|
1669
1684
|
let n = _();
|
|
1670
1685
|
if (!n) return !1;
|
|
1671
1686
|
let r = t.key === "ArrowLeft" || t.key === "ArrowRight";
|
|
1672
1687
|
if (t.altKey && t.shiftKey && r) return t.preventDefault(), f(n, t.key === "ArrowRight" ? 1 : -1), !0;
|
|
1673
1688
|
let i = t.altKey && t.key === "ArrowDown" || t.key === "ContextMenu", a = e.focusAddress.value.section === $.HEADER;
|
|
1674
|
-
return n.column && a && i ? (t.preventDefault(), d(n.key,
|
|
1689
|
+
return n.column && a && i ? (t.preventDefault(), d(n.key, H(s) !== n.key), !0) : !1;
|
|
1675
1690
|
};
|
|
1676
1691
|
return {
|
|
1677
|
-
handleGridFocusIn:
|
|
1692
|
+
handleGridFocusIn: S,
|
|
1678
1693
|
handleGridKeydown: (t) => {
|
|
1694
|
+
if (t.key === "Tab") {
|
|
1695
|
+
T(t);
|
|
1696
|
+
return;
|
|
1697
|
+
}
|
|
1679
1698
|
if (e.cellEntered.value) {
|
|
1680
|
-
|
|
1699
|
+
E(t);
|
|
1681
1700
|
return;
|
|
1682
1701
|
}
|
|
1683
|
-
if (!
|
|
1702
|
+
if (!D(t)) switch (t.key) {
|
|
1684
1703
|
case "ArrowRight":
|
|
1685
|
-
t.preventDefault(),
|
|
1704
|
+
t.preventDefault(), C("ArrowRight") || e.moveFocus(0, 1);
|
|
1686
1705
|
break;
|
|
1687
1706
|
case "ArrowLeft":
|
|
1688
|
-
t.preventDefault(),
|
|
1707
|
+
t.preventDefault(), C("ArrowLeft") || e.moveFocus(0, -1);
|
|
1689
1708
|
break;
|
|
1690
1709
|
case "ArrowDown":
|
|
1691
1710
|
t.preventDefault(), e.moveFocus(1, 0);
|
|
@@ -1709,13 +1728,13 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1709
1728
|
t.preventDefault(), e.enterCell();
|
|
1710
1729
|
break;
|
|
1711
1730
|
case "Enter":
|
|
1712
|
-
t.preventDefault(),
|
|
1731
|
+
t.preventDefault(), w(t);
|
|
1713
1732
|
break;
|
|
1714
1733
|
case " ":
|
|
1715
1734
|
case "Spacebar": {
|
|
1716
1735
|
t.preventDefault();
|
|
1717
1736
|
let n = e.focusedBodyRowKey.value;
|
|
1718
|
-
if (!
|
|
1737
|
+
if (!H(o) || !n) break;
|
|
1719
1738
|
l(n);
|
|
1720
1739
|
break;
|
|
1721
1740
|
}
|
|
@@ -1723,14 +1742,14 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1723
1742
|
}
|
|
1724
1743
|
}
|
|
1725
1744
|
};
|
|
1726
|
-
},
|
|
1727
|
-
let p = /* @__PURE__ */ new Map(), m =
|
|
1745
|
+
}, vn = ({ tableId: e, enabled: t, dragMode: n, snapshot: r, scrollElement: i, isRowDraggable: a, dragExpandDelayMs: o, dragInsideDelayMs: s, isExpanded: c, onHoverExpand: l, onReorder: u, onTreeDrop: d, resolveRowPreviewTitle: f }) => {
|
|
1746
|
+
let p = /* @__PURE__ */ new Map(), m = B(), h = B(), g = B(), _ = (e) => {
|
|
1728
1747
|
if (!(e instanceof HTMLElement)) return;
|
|
1729
1748
|
let t = Number(e.dataset.index);
|
|
1730
1749
|
if (Number.isInteger(t)) return r.value.flatRows[t];
|
|
1731
1750
|
}, v = (e) => {
|
|
1732
|
-
if (!e || !
|
|
1733
|
-
let n =
|
|
1751
|
+
if (!e || !H(t) || e.kind !== Q.ROW && e.kind !== Q.GROUP) return !1;
|
|
1752
|
+
let n = H(a);
|
|
1734
1753
|
return n ? n(e.item) !== !1 : !0;
|
|
1735
1754
|
}, y = (e, t) => {
|
|
1736
1755
|
let { getSubtreeRangeByKey: n, getRowIndexByKey: i } = r.value, a = n(e), o = i(t);
|
|
@@ -1738,14 +1757,14 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1738
1757
|
}, b = _e(() => {
|
|
1739
1758
|
let e = x.value;
|
|
1740
1759
|
e && !c(e) && l(e);
|
|
1741
|
-
}, () =>
|
|
1760
|
+
}, () => H(o) ?? 500, { immediate: !1 }), x = B(), S = _e(() => {
|
|
1742
1761
|
w.value = C.value;
|
|
1743
|
-
}, () =>
|
|
1762
|
+
}, () => H(s) ?? 1300, { immediate: !1 }), C = B(), w = B(), T = (e) => {
|
|
1744
1763
|
!(e.hasChildren || e.kind === Q.GROUP) || e.expanded || x.value !== e.key && (x.value = e.key, b.stop(), b.start());
|
|
1745
1764
|
}, E = () => {
|
|
1746
1765
|
b.stop(), x.value = void 0, S.stop(), C.value = void 0, w.value = void 0;
|
|
1747
1766
|
}, D = (e, t, r, i) => {
|
|
1748
|
-
if (
|
|
1767
|
+
if (H(n) === Pe.TREE) {
|
|
1749
1768
|
let n = t.getBoundingClientRect(), i = Ve * n.height / 2;
|
|
1750
1769
|
if (Math.abs(r - (n.top + n.height / 2)) <= i) {
|
|
1751
1770
|
if (e.kind === Q.GROUP || w.value === e.key) return Fe.CHILD;
|
|
@@ -1778,7 +1797,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1778
1797
|
P(), O = document.createElement("div"), O.className = "s-ui-table__row-drag-layer", O.appendChild(e), document.body.appendChild(O), document.addEventListener("dragover", ee), M(t, n);
|
|
1779
1798
|
}, P = () => {
|
|
1780
1799
|
document.removeEventListener("dragover", ee), O?.remove(), O = void 0;
|
|
1781
|
-
},
|
|
1800
|
+
}, te = (t) => {
|
|
1782
1801
|
if (!(t instanceof HTMLElement)) {
|
|
1783
1802
|
p.forEach((e, t) => {
|
|
1784
1803
|
t.isConnected || (e(), p.delete(t));
|
|
@@ -1786,7 +1805,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1786
1805
|
return;
|
|
1787
1806
|
}
|
|
1788
1807
|
if (p.has(t)) return;
|
|
1789
|
-
let n = q(
|
|
1808
|
+
let n = xe(q({
|
|
1790
1809
|
element: t,
|
|
1791
1810
|
canDrag: () => v(_(t)),
|
|
1792
1811
|
getInitialData: () => {
|
|
@@ -1841,14 +1860,14 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1841
1860
|
}
|
|
1842
1861
|
}));
|
|
1843
1862
|
p.set(t, n);
|
|
1844
|
-
},
|
|
1863
|
+
}, I = Ce({
|
|
1845
1864
|
canMonitor: ({ source: t }) => dn(t.data, e),
|
|
1846
1865
|
onDrop: ({ source: t, location: i }) => {
|
|
1847
1866
|
let a = g.value;
|
|
1848
1867
|
if (g.value = void 0, m.value = void 0, h.value = void 0, E(), !i.current.dropTargets[0] || !a || !dn(t.data, e)) return;
|
|
1849
1868
|
let { flatRows: o, getRowIndexByKey: s } = r.value, c = s(t.data.rowKey), l = s(a.targetKey), f = c === void 0 ? void 0 : o[c], p = l === void 0 ? void 0 : o[l];
|
|
1850
1869
|
if (!f || !p || f.key === p.key || y(f.key, p.key)) return;
|
|
1851
|
-
if (
|
|
1870
|
+
if (H(n) === Pe.FLAT) {
|
|
1852
1871
|
if (a.action === Fe.CHILD) return;
|
|
1853
1872
|
u({
|
|
1854
1873
|
action: a.action,
|
|
@@ -1873,22 +1892,22 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1873
1892
|
depth: _ ? p.depth + 1 : p.depth
|
|
1874
1893
|
});
|
|
1875
1894
|
}
|
|
1876
|
-
}),
|
|
1877
|
-
return
|
|
1878
|
-
|
|
1895
|
+
}), L;
|
|
1896
|
+
return W(i, (t) => {
|
|
1897
|
+
L?.(), L = void 0, t && (L = ke({
|
|
1879
1898
|
element: t,
|
|
1880
1899
|
canScroll: ({ source: t }) => dn(t.data, e)
|
|
1881
1900
|
}));
|
|
1882
1901
|
}, { immediate: !0 }), F(() => {
|
|
1883
|
-
|
|
1902
|
+
I(), L?.(), P(), p.forEach((e) => {
|
|
1884
1903
|
e();
|
|
1885
1904
|
}), p.clear();
|
|
1886
1905
|
}), {
|
|
1887
|
-
registerRowElement:
|
|
1906
|
+
registerRowElement: te,
|
|
1888
1907
|
draggingRowKey: m,
|
|
1889
1908
|
dropIndicator: h
|
|
1890
1909
|
};
|
|
1891
|
-
},
|
|
1910
|
+
}, yn = ({ flatRows: e, virtualEnabled: t, windowIndexes: n, uiTotalSize: r, getRowUiOffset: i, activeGroupRowIndex: a, activeDepthFooterRowIndexes: o, leavingDepthFooterRowIndex: s, slidingDepthFooterRowIndexes: c, farDepthFooterRowIndexes: l, activeRowIndex: u }) => {
|
|
1892
1911
|
let d = b(() => {
|
|
1893
1912
|
let e = [];
|
|
1894
1913
|
return a.value !== void 0 && e.push(a.value), e.push(...o.value), u.value !== void 0 && e.push(u.value), e;
|
|
@@ -1908,7 +1927,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1908
1927
|
rowHeight: t ? t.end - t.start : void 0
|
|
1909
1928
|
});
|
|
1910
1929
|
};
|
|
1911
|
-
if (!
|
|
1930
|
+
if (!H(t)) return u.forEach(x), y;
|
|
1912
1931
|
let S = r.value, C = n.value.filter((e) => {
|
|
1913
1932
|
let t = i(e);
|
|
1914
1933
|
return !t || t.end > 0 && t.start < S;
|
|
@@ -1952,11 +1971,11 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1952
1971
|
k = r + n;
|
|
1953
1972
|
}), A(S - k), y;
|
|
1954
1973
|
}) };
|
|
1955
|
-
},
|
|
1974
|
+
}, bn = ({ selected: e, cascade: t, treeIndex: n, groupRow: r, disabledKey: i, isItemSelectable: a }) => {
|
|
1956
1975
|
let o = b(() => new Set(e.value)), s = (e) => n.value.nodeByKey.get(e)?.parentKey, c = (e) => {
|
|
1957
1976
|
let t = n.value.nodeByKey.get(e);
|
|
1958
|
-
if (!t || Ht(t.item,
|
|
1959
|
-
let o =
|
|
1977
|
+
if (!t || Ht(t.item, H(r)) || Ht(t.item, H(i))) return !1;
|
|
1978
|
+
let o = H(a);
|
|
1960
1979
|
return o ? o(t.item) !== !1 : !0;
|
|
1961
1980
|
}, l = b(() => {
|
|
1962
1981
|
let e = [];
|
|
@@ -1989,7 +2008,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1989
2008
|
}, _ = (n) => {
|
|
1990
2009
|
if (!c(n)) return;
|
|
1991
2010
|
let r = new Set(e.value);
|
|
1992
|
-
if (!
|
|
2011
|
+
if (!H(t)) {
|
|
1993
2012
|
r.has(n) ? r.delete(n) : r.add(n), e.value = [...r];
|
|
1994
2013
|
return;
|
|
1995
2014
|
}
|
|
@@ -2020,11 +2039,11 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2020
2039
|
e.value = [];
|
|
2021
2040
|
}
|
|
2022
2041
|
};
|
|
2023
|
-
},
|
|
2024
|
-
let m = b(() =>
|
|
2042
|
+
}, xn = ({ columns: e, primaryColumnKey: t, treeNodeByKey: n, groupTotalKey: r, depthFooter: i, groupContentColumnKey: a, creationContentColumnKey: o, loadMoreContentColumnKey: s, treeIndent: c, loadingMoreChildrenKeys: l, footerValues: u, stuckDepthFooterRowIndex: d, onDepthFooterClick: f, onLoadMoreChildren: p }) => {
|
|
2043
|
+
let m = b(() => H(e).find((e) => e.key === t.value)), h = b(() => H(i)?.columnKey ?? t.value), g = b(() => H(a) ?? t.value), _ = b(() => H(o) ?? t.value), v = b(() => H(s) ?? t.value), y = (e) => n.value.get(e.key)?.subtreeSize ?? 0, x = (e) => Wt(e.item, H(r)), S = (e) => {
|
|
2025
2044
|
let t = Ut(e.item, m.value?.value ?? m.value?.key);
|
|
2026
2045
|
return t === void 0 ? void 0 : String(t);
|
|
2027
|
-
}, C = (e) => ({ paddingInlineStart: `calc(var(--s-ui-dimension-4) + ${e *
|
|
2046
|
+
}, C = (e) => ({ paddingInlineStart: `calc(var(--s-ui-dimension-4) + ${e * H(c)}px)` }), w = (e) => {
|
|
2028
2047
|
f({
|
|
2029
2048
|
parentKey: e.parentKey ?? "",
|
|
2030
2049
|
parentItem: e.item,
|
|
@@ -2038,7 +2057,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2038
2057
|
click: () => {
|
|
2039
2058
|
w(e);
|
|
2040
2059
|
}
|
|
2041
|
-
}), E = b(() => new Set(
|
|
2060
|
+
}), E = b(() => new Set(H(l))), D = (e) => e.parentKey ? E.value.has(e.parentKey) : !1, O = (e) => {
|
|
2042
2061
|
!e.parentKey || D(e) || p({
|
|
2043
2062
|
key: e.parentKey,
|
|
2044
2063
|
item: e.item
|
|
@@ -2051,7 +2070,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2051
2070
|
loadMore: () => {
|
|
2052
2071
|
O(e);
|
|
2053
2072
|
}
|
|
2054
|
-
}), A = (e) =>
|
|
2073
|
+
}), A = (e) => H(u)?.[e];
|
|
2055
2074
|
return {
|
|
2056
2075
|
depthFooterColumnKey: h,
|
|
2057
2076
|
groupColumnKey: g,
|
|
@@ -2075,11 +2094,11 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2075
2094
|
return t ? `s-ui-table__aggregate-cell--tone-${t}` : void 0;
|
|
2076
2095
|
},
|
|
2077
2096
|
getFooterSlotScope: (t) => ({
|
|
2078
|
-
column:
|
|
2097
|
+
column: H(e).find((e) => e.key === t) ?? { key: t },
|
|
2079
2098
|
footerValue: A(t)
|
|
2080
2099
|
})
|
|
2081
2100
|
};
|
|
2082
|
-
},
|
|
2101
|
+
}, Sn = ({ sortState: e, onSortChange: t }) => {
|
|
2083
2102
|
let n = b(() => new Map(e.value.map((e) => [e.key, e]))), r = (e) => n.value.get(e)?.direction, i = (t) => {
|
|
2084
2103
|
if (e.value.length < 2) return;
|
|
2085
2104
|
let n = e.value.findIndex((e) => e.key === t);
|
|
@@ -2127,8 +2146,8 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2127
2146
|
sortIndex: i(e.key)
|
|
2128
2147
|
} : { column: { key: e.key } }
|
|
2129
2148
|
};
|
|
2130
|
-
},
|
|
2131
|
-
let o = /* @__PURE__ */ new Set(), s =
|
|
2149
|
+
}, Cn = ({ windowIndexes: e, visibleRange: t, getRowKey: n, rowsVersion: r, pinnedRowKey: i, enabled: a }) => {
|
|
2150
|
+
let o = /* @__PURE__ */ new Set(), s = B(/* @__PURE__ */ new Set()), c = [], l = 12, u = 0, d = !1, f = !1, p = 0, m = "", h = () => {
|
|
2132
2151
|
u = performance.now(), d = !0, s.value = new Set(o);
|
|
2133
2152
|
}, g = (e) => {
|
|
2134
2153
|
let t = c.splice(0, e);
|
|
@@ -2155,7 +2174,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2155
2174
|
r !== void 0 && !o.has(r) && t.push(r);
|
|
2156
2175
|
}), t;
|
|
2157
2176
|
}, S = (e) => {
|
|
2158
|
-
let t =
|
|
2177
|
+
let t = H(i), n = t === void 0 ? -1 : e.indexOf(t);
|
|
2159
2178
|
return n > 0 && (e.splice(n, 1), e.unshift(t ?? "")), e;
|
|
2160
2179
|
}, C = (e) => {
|
|
2161
2180
|
let t = new Set(e.map(n)), r = 0;
|
|
@@ -2168,27 +2187,27 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2168
2187
|
(c.length > 0 || e > 0) && y.resume();
|
|
2169
2188
|
}, E = (e) => e.map((e) => n(e) ?? "").join("\0"), D = (e) => {
|
|
2170
2189
|
let t = E(e);
|
|
2171
|
-
if (!
|
|
2190
|
+
if (!H(a) || t === m) return;
|
|
2172
2191
|
m = t, c = S(x(e));
|
|
2173
2192
|
let n = C(e), r = g(Math.max(0, l - p));
|
|
2174
2193
|
p += r, w(n + r), T(r);
|
|
2175
2194
|
};
|
|
2176
|
-
return
|
|
2195
|
+
return W(e, D, {
|
|
2177
2196
|
flush: "sync",
|
|
2178
2197
|
immediate: !0
|
|
2179
|
-
}),
|
|
2198
|
+
}), W(() => H(r), () => D(e.value), { flush: "sync" }), W(() => H(a), () => {
|
|
2180
2199
|
m = "", D(e.value);
|
|
2181
2200
|
}), {
|
|
2182
|
-
isRowHydrated: (e) => !
|
|
2201
|
+
isRowHydrated: (e) => !H(a) || e === H(i) || s.value.has(e),
|
|
2183
2202
|
hydratedKeys: s
|
|
2184
2203
|
};
|
|
2185
|
-
},
|
|
2204
|
+
}, wn = {
|
|
2186
2205
|
pinned: [],
|
|
2187
2206
|
sliding: []
|
|
2188
|
-
},
|
|
2207
|
+
}, Tn = ({ snapshot: e, visibleRange: t, groupRowSticky: n, depthFooterSticky: r, bottomVisibleRowIndex: i, getRowOffset: a }) => {
|
|
2189
2208
|
let o = b(() => {
|
|
2190
2209
|
let r = t.value;
|
|
2191
|
-
if (!r || !
|
|
2210
|
+
if (!r || !H(n)) return;
|
|
2192
2211
|
let { flatRows: i, getRowIndexByKey: a } = e.value, o = i[r.startIndex];
|
|
2193
2212
|
if (!o) return;
|
|
2194
2213
|
let s = o.kind === Q.GROUP ? o.key : o.parentKey;
|
|
@@ -2227,7 +2246,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2227
2246
|
return [t - 2, t - 1].filter((e) => r[e]?.kind === Q.DEPTH_FOOTER && !n.includes(e));
|
|
2228
2247
|
}, m = b(() => {
|
|
2229
2248
|
let e = i.value;
|
|
2230
|
-
if (!
|
|
2249
|
+
if (!H(r) || e === void 0) return wn;
|
|
2231
2250
|
let t = f(e);
|
|
2232
2251
|
return {
|
|
2233
2252
|
pinned: t,
|
|
@@ -2248,9 +2267,9 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2248
2267
|
slidingDepthFooterRowIndexes: b(() => m.value.sliding),
|
|
2249
2268
|
farDepthFooterRowIndexes: b(() => m.value.pinned.slice(2))
|
|
2250
2269
|
};
|
|
2251
|
-
},
|
|
2270
|
+
}, En = (e) => typeof e == "number" ? `${e}px` : e || void 0, Dn = ({ tfootBarStackHeight: e, hasFooterValues: t, scrollClientWidth: n, columnCssVars: r, totalWidth: i, height: a, maxHeight: o }) => ({
|
|
2252
2271
|
rootStyle: b(() => {
|
|
2253
|
-
let i =
|
|
2272
|
+
let i = H(n);
|
|
2254
2273
|
return {
|
|
2255
2274
|
"--s-ui-table-header-height": "40px",
|
|
2256
2275
|
"--s-ui-table-row-min-height": "40px",
|
|
@@ -2259,30 +2278,30 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2259
2278
|
"--s-ui-table-bottom-stack": `${e.value}px`,
|
|
2260
2279
|
"--s-ui-table-footer-bar-height": "40px",
|
|
2261
2280
|
"--s-ui-table-create-row-height": "40px",
|
|
2262
|
-
"--s-ui-table-aggregate-offset":
|
|
2281
|
+
"--s-ui-table-aggregate-offset": H(t) ? "40px" : "0px",
|
|
2263
2282
|
...i > 0 ? { "--s-ui-table-viewport-width": `${i}px` } : {},
|
|
2264
2283
|
...r.value
|
|
2265
2284
|
};
|
|
2266
2285
|
}),
|
|
2267
2286
|
scrollStyle: b(() => ({
|
|
2268
|
-
height:
|
|
2269
|
-
maxHeight:
|
|
2287
|
+
height: En(H(a)),
|
|
2288
|
+
maxHeight: En(H(o))
|
|
2270
2289
|
})),
|
|
2271
2290
|
tableStyle: b(() => ({ width: `max(100%, ${i.value}px)` }))
|
|
2272
|
-
}),
|
|
2273
|
-
if (
|
|
2274
|
-
if (typeof document > "u") return
|
|
2291
|
+
}), On, kn = () => {
|
|
2292
|
+
if (On !== void 0) return On;
|
|
2293
|
+
if (typeof document > "u") return On = Le, On;
|
|
2275
2294
|
let e = document.createElement("div");
|
|
2276
2295
|
e.style.cssText = `position:absolute;visibility:hidden;pointer-events:none;width:1px;height:${ze}px`, document.body.appendChild(e);
|
|
2277
2296
|
let t = e.offsetHeight;
|
|
2278
|
-
return e.remove(),
|
|
2279
|
-
},
|
|
2297
|
+
return e.remove(), On = t > 0 ? t : Le, On;
|
|
2298
|
+
}, An = (e) => e > 16e6 ? kn() - Re : Infinity, jn = (e, t, n) => {
|
|
2280
2299
|
if (!e) return 0;
|
|
2281
2300
|
let r = Math.max(t, Be);
|
|
2282
2301
|
return n > 4 * r ? r : 0;
|
|
2283
|
-
},
|
|
2284
|
-
let a =
|
|
2285
|
-
let e =
|
|
2302
|
+
}, Mn = (e, t) => !e.active || t <= e.edgeZone ? t : t >= e.maxUiScrollTop - e.edgeZone ? Math.min(e.maxModelScrollTop, e.maxModelScrollTop - (e.maxUiScrollTop - t)) : e.edgeZone + (t - e.edgeZone) * e.ratio, Nn = (e, t) => e.active ? t <= e.edgeZone ? Math.max(0, t) : t >= e.maxModelScrollTop - e.edgeZone ? Math.min(e.maxUiScrollTop, e.maxUiScrollTop - (e.maxModelScrollTop - t)) : e.edgeZone + (t - e.edgeZone) / e.ratio : t, Pn = (e, t) => e.active === t.active && e.maxUiScrollTop === t.maxUiScrollTop && e.maxModelScrollTop === t.maxModelScrollTop && e.edgeZone === t.edgeZone, Fn = (e, t) => !Pn(e, t) && (e.active || t.active), In = ({ scrollElement: e, totalSize: t, viewportHeight: n, extraHeight: r, onRescale: i }) => {
|
|
2303
|
+
let a = B(0), o = b(() => {
|
|
2304
|
+
let e = H(t), i = H(r), a = H(n), o = An(e), s = e > o, c = s ? o : e, l = Math.max(1, c + i - a), u = Math.max(0, e + i - a), d = jn(s, a, l);
|
|
2286
2305
|
return {
|
|
2287
2306
|
active: s,
|
|
2288
2307
|
uiHeight: c,
|
|
@@ -2291,32 +2310,32 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2291
2310
|
edgeZone: d,
|
|
2292
2311
|
ratio: s ? (u - 2 * d) / (l - 2 * d) : 1
|
|
2293
2312
|
};
|
|
2294
|
-
}), s = (e) =>
|
|
2295
|
-
|
|
2313
|
+
}), s = (e) => Mn(o.value, e), c = (e) => Nn(o.value, e), l = B(0), u = B(-1);
|
|
2314
|
+
K(e, "scroll", () => {
|
|
2296
2315
|
let t = e.value;
|
|
2297
2316
|
t && (a.value = t.scrollTop, t.scrollTop !== u.value && (u.value = t.scrollTop, l.value = s(t.scrollTop)));
|
|
2298
2317
|
}, { passive: !0 });
|
|
2299
2318
|
let d = (e) => e.scrollTop === u.value ? l.value : s(e.scrollTop), f = b(() => o.value.active ? l.value : s(a.value)), p = b(() => o.value.active ? f.value - a.value : 0), m = b(() => o.value.uiHeight), h = b(() => o.value.maxModelScrollTop), g = b(() => o.value.active), _ = (e, t, n) => {
|
|
2300
2319
|
e.scrollTop = t, a.value = e.scrollTop, u.value = e.scrollTop, l.value = n !== void 0 && Math.abs(e.scrollTop - t) <= 4 ? Math.max(0, Math.min(o.value.maxModelScrollTop, n)) : s(e.scrollTop);
|
|
2301
|
-
}, v = (t) => t === "y" ?
|
|
2320
|
+
}, v = (t) => t === "y" ? H(n) : e.value?.clientWidth ?? 0, y = (e, t) => e === WheelEvent.DOM_DELTA_LINE ? 40 : e === WheelEvent.DOM_DELTA_PAGE ? v(t) : 1, x = (e, t) => (t === "x" ? e.deltaX : e.deltaY) * y(e.deltaMode, t), S = (e) => o.value.active && e.deltaY !== 0 && !e.ctrlKey, C = (t) => {
|
|
2302
2321
|
let n = e.value;
|
|
2303
2322
|
if (!n || !S(t)) return;
|
|
2304
2323
|
let { maxModelScrollTop: r } = o.value, i = d(n), a = Math.max(0, Math.min(r, i + x(t, "y")));
|
|
2305
2324
|
a !== i && (t.preventDefault(), _(n, c(a), a), n.scrollLeft += x(t, "x"));
|
|
2306
2325
|
}, w, T = (t) => {
|
|
2307
|
-
w?.(), w = t ?
|
|
2326
|
+
w?.(), w = t ? K(e, "wheel", C, { passive: !1 }) : void 0;
|
|
2308
2327
|
};
|
|
2309
|
-
|
|
2328
|
+
pe(() => {
|
|
2310
2329
|
w?.();
|
|
2311
2330
|
});
|
|
2312
|
-
let E = (e, t) => e.scrollTop === u.value ? l.value :
|
|
2313
|
-
return
|
|
2314
|
-
|
|
2331
|
+
let E = (e, t) => e.scrollTop === u.value ? l.value : Mn(t, e.scrollTop);
|
|
2332
|
+
return te(() => {
|
|
2333
|
+
W(o, (t, n) => {
|
|
2315
2334
|
let r = e.value;
|
|
2316
|
-
if (!r || !
|
|
2335
|
+
if (!r || !Fn(t, n)) return;
|
|
2317
2336
|
let a = E(r, n);
|
|
2318
|
-
_(r,
|
|
2319
|
-
}),
|
|
2337
|
+
_(r, Nn(t, a), a), i?.(a);
|
|
2338
|
+
}), W(g, T, { immediate: !0 });
|
|
2320
2339
|
}), {
|
|
2321
2340
|
uiScrollTop: a,
|
|
2322
2341
|
modelScrollOffset: f,
|
|
@@ -2329,8 +2348,8 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2329
2348
|
resolveModelOffset: d,
|
|
2330
2349
|
setScrollTop: _
|
|
2331
2350
|
};
|
|
2332
|
-
},
|
|
2333
|
-
let f, p =
|
|
2351
|
+
}, Ln = ({ rowCount: e, enabled: t, autoMeasure: n, estimateRowSize: r, estimateRowSizeByIndex: i, overscan: a, scrollElement: o, getRowKey: s, rowsVersion: c, viewportHeight: l, extraHeight: u, headerHeight: d }) => {
|
|
2352
|
+
let f, p = In({
|
|
2334
2353
|
scrollElement: o,
|
|
2335
2354
|
totalSize: () => _.value.getTotalSize(),
|
|
2336
2355
|
viewportHeight: l,
|
|
@@ -2338,18 +2357,18 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2338
2357
|
onRescale: (e) => {
|
|
2339
2358
|
f?.(e, !1);
|
|
2340
2359
|
}
|
|
2341
|
-
}), m =
|
|
2360
|
+
}), m = B(0), h = 0, g = (e, t, n) => {
|
|
2342
2361
|
let r = Math.round((e - h) / n);
|
|
2343
2362
|
h = e, m.value = t ? Math.max(-24, Math.min(24, r)) : 0;
|
|
2344
2363
|
}, _ = be(b(() => {
|
|
2345
|
-
let n =
|
|
2364
|
+
let n = H(r);
|
|
2346
2365
|
return {
|
|
2347
|
-
count:
|
|
2348
|
-
enabled:
|
|
2366
|
+
count: H(e),
|
|
2367
|
+
enabled: H(t),
|
|
2349
2368
|
getScrollElement: () => o.value,
|
|
2350
2369
|
estimateSize: (e) => i?.(e) ?? n,
|
|
2351
2370
|
getItemKey: s,
|
|
2352
|
-
overscan:
|
|
2371
|
+
overscan: H(a),
|
|
2353
2372
|
shouldAdjustScrollPositionOnItemSizeChange: () => !1,
|
|
2354
2373
|
observeElementOffset: (e, t) => (f = t, ye(e, (e, r) => {
|
|
2355
2374
|
let i = p.uiToModel(e);
|
|
@@ -2359,9 +2378,9 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2359
2378
|
ve(p.modelToUi(e + (t.adjustments ?? 0)), { behavior: t.behavior }, n);
|
|
2360
2379
|
}
|
|
2361
2380
|
};
|
|
2362
|
-
})), v = b(() =>
|
|
2381
|
+
})), v = b(() => H(t) ? _.value.getVirtualItems() : []), y = b(() => _.value.getTotalSize()), x = (e, t) => Array.from({ length: Math.max(0, t - e + 1) }, (t, n) => e + n), S = (t, n) => {
|
|
2363
2382
|
let r = t[0], i = t[t.length - 1];
|
|
2364
|
-
if (!(!r || !i)) return n > 0 ? [i.index + 1, Math.min(
|
|
2383
|
+
if (!(!r || !i)) return n > 0 ? [i.index + 1, Math.min(H(e) - 1, i.index + n)] : [Math.max(0, r.index + n), r.index - 1];
|
|
2365
2384
|
}, C = b(() => {
|
|
2366
2385
|
let e = v.value, t = e.map((e) => e.index), n = m.value, r = n === 0 ? void 0 : S(e, n);
|
|
2367
2386
|
if (!r) return t;
|
|
@@ -2372,7 +2391,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2372
2391
|
let t = Number(e.dataset.index);
|
|
2373
2392
|
return Number.isInteger(t) ? t : void 0;
|
|
2374
2393
|
}, E = (e) => {
|
|
2375
|
-
if (!
|
|
2394
|
+
if (!H(t) || !H(n)) return;
|
|
2376
2395
|
let r = o.value;
|
|
2377
2396
|
if (!r) return;
|
|
2378
2397
|
let i = r.querySelectorAll("tr[data-index]"), a = [];
|
|
@@ -2380,7 +2399,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2380
2399
|
let n = T(t);
|
|
2381
2400
|
n === void 0 || !(t instanceof HTMLElement) || (!e || !w.has(s(n))) && a.push(t);
|
|
2382
2401
|
}), a.length === 0) return;
|
|
2383
|
-
let c = _.value.measurementsCache, l = r.getBoundingClientRect().top +
|
|
2402
|
+
let c = _.value.measurementsCache, l = r.getBoundingClientRect().top + H(d), u = p.resolveModelOffset(r), f = [], m = Infinity;
|
|
2384
2403
|
a.forEach((e) => {
|
|
2385
2404
|
let t = Number(e.dataset.index), n = e.getBoundingClientRect();
|
|
2386
2405
|
f.push([t, Math.round(n.height)]), n.bottom > l + 1 && t < m && (m = t);
|
|
@@ -2393,7 +2412,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2393
2412
|
e < m && n !== void 0 && (h += t - n), _.value.resizeItem(e, t);
|
|
2394
2413
|
}), h !== 0 && p.setScrollTop(r, p.modelToUi(u + h), u + h);
|
|
2395
2414
|
};
|
|
2396
|
-
|
|
2415
|
+
W(C, () => E(!0), { flush: "post" });
|
|
2397
2416
|
let D = () => {
|
|
2398
2417
|
E(!0);
|
|
2399
2418
|
}, O = () => {
|
|
@@ -2401,15 +2420,15 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2401
2420
|
};
|
|
2402
2421
|
ge(o, () => {
|
|
2403
2422
|
O();
|
|
2404
|
-
}),
|
|
2423
|
+
}), W(() => H(c), () => {
|
|
2405
2424
|
w.clear(), E(!1);
|
|
2406
2425
|
}, { flush: "post" });
|
|
2407
2426
|
let k = (e, t) => {
|
|
2408
2427
|
if (e !== "auto") return e;
|
|
2409
|
-
let n =
|
|
2428
|
+
let n = H(l) - H(u), r = p.modelScrollOffset.value;
|
|
2410
2429
|
return t.end >= r + n ? "end" : t.start <= r ? "start" : void 0;
|
|
2411
2430
|
}, A = (e, t) => {
|
|
2412
|
-
let n =
|
|
2431
|
+
let n = H(l) - H(u);
|
|
2413
2432
|
return e === "start" ? t.start : e === "end" ? t.end - n : t.start - (n - t.size) / 2;
|
|
2414
2433
|
}, j = (e, t) => {
|
|
2415
2434
|
let n = _.value.measurementsCache, r = n[Math.max(0, Math.min(e, n.length - 1))];
|
|
@@ -2427,7 +2446,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2427
2446
|
let r = j(e, t);
|
|
2428
2447
|
r !== void 0 && p.setScrollTop(n, p.modelToUi(r), r);
|
|
2429
2448
|
}, ee = b(() => {
|
|
2430
|
-
if (!(!
|
|
2449
|
+
if (!(!H(t) || v.value.length === 0)) return _.value.range ?? void 0;
|
|
2431
2450
|
}), N = (e) => {
|
|
2432
2451
|
let t = _.value.measurementsCache;
|
|
2433
2452
|
if (t.length === 0) return;
|
|
@@ -2469,29 +2488,29 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2469
2488
|
},
|
|
2470
2489
|
getRowIndexAtOffset: N
|
|
2471
2490
|
};
|
|
2472
|
-
},
|
|
2491
|
+
}, Rn = [
|
|
2473
2492
|
"role",
|
|
2474
2493
|
"aria-rowcount",
|
|
2475
2494
|
"aria-colcount",
|
|
2476
2495
|
"aria-busy"
|
|
2477
|
-
],
|
|
2496
|
+
], zn = { class: "s-ui-table__head" }, Bn = {
|
|
2478
2497
|
class: "s-ui-table__head-row",
|
|
2479
2498
|
"aria-rowindex": 1
|
|
2480
|
-
},
|
|
2499
|
+
}, Vn = {
|
|
2481
2500
|
key: 0,
|
|
2482
2501
|
class: "s-ui-table__header-cell s-ui-table__filler-cell",
|
|
2483
2502
|
role: "presentation"
|
|
2484
|
-
},
|
|
2503
|
+
}, Hn = [
|
|
2485
2504
|
"id",
|
|
2486
2505
|
"data-column-key",
|
|
2487
2506
|
"data-section",
|
|
2488
2507
|
"aria-colindex",
|
|
2489
2508
|
"aria-sort",
|
|
2490
2509
|
"tabindex"
|
|
2491
|
-
],
|
|
2510
|
+
], Un = {
|
|
2492
2511
|
key: 2,
|
|
2493
2512
|
class: "s-ui-table__columns-manager"
|
|
2494
|
-
},
|
|
2513
|
+
}, Wn = { class: "s-ui-table__columns-item-main" }, Gn = { class: "s-ui-table__columns-item-title" }, Kn = [
|
|
2495
2514
|
"aria-label",
|
|
2496
2515
|
"aria-valuenow",
|
|
2497
2516
|
"aria-valuemin",
|
|
@@ -2500,31 +2519,31 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2500
2519
|
"onPointerdown",
|
|
2501
2520
|
"onKeydown",
|
|
2502
2521
|
"onDblclick"
|
|
2503
|
-
],
|
|
2522
|
+
], qn = { class: "s-ui-table__body" }, Jn = {
|
|
2504
2523
|
key: 0,
|
|
2505
2524
|
class: "s-ui-table__empty-row",
|
|
2506
2525
|
"aria-rowindex": 2
|
|
2507
|
-
},
|
|
2526
|
+
}, Yn = ["colspan"], Xn = { class: "s-ui-table__empty-content" }, Zn = { class: "s-ui-table__empty-text" }, Qn = {
|
|
2508
2527
|
key: 0,
|
|
2509
2528
|
class: "s-ui-table__spacer",
|
|
2510
2529
|
"aria-hidden": "true"
|
|
2511
|
-
},
|
|
2530
|
+
}, $n = ["colspan"], er = {
|
|
2512
2531
|
key: 0,
|
|
2513
2532
|
class: "s-ui-table__foot"
|
|
2514
|
-
},
|
|
2533
|
+
}, tr = ["aria-rowindex"], nr = {
|
|
2515
2534
|
key: 0,
|
|
2516
2535
|
class: "s-ui-table__aggregate-cell s-ui-table__filler-cell",
|
|
2517
2536
|
role: "presentation"
|
|
2518
|
-
},
|
|
2537
|
+
}, rr = [
|
|
2519
2538
|
"id",
|
|
2520
2539
|
"aria-colindex",
|
|
2521
2540
|
"data-column-key",
|
|
2522
2541
|
"data-section",
|
|
2523
2542
|
"tabindex"
|
|
2524
|
-
],
|
|
2543
|
+
], ir = {
|
|
2525
2544
|
key: 1,
|
|
2526
2545
|
class: "s-ui-table__aggregate-text"
|
|
2527
|
-
},
|
|
2546
|
+
}, ar = /* @__PURE__ */ O({
|
|
2528
2547
|
__name: "STable",
|
|
2529
2548
|
props: /*@__PURE__*/ j({
|
|
2530
2549
|
items: {},
|
|
@@ -2660,7 +2679,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2660
2679
|
"update:sortState"
|
|
2661
2680
|
]),
|
|
2662
2681
|
setup(e, { expose: t, emit: n }) {
|
|
2663
|
-
let s =
|
|
2682
|
+
let s = ie(e, "modelValue"), c = ie(e, "selected"), p = ie(e, "expanded"), m = ie(e, "columnOrder"), h = ie(e, "columnWidths"), O = ie(e, "hiddenColumns"), A = ie(e, "sortState"), j = n, F = ae(), { t: te } = fe(), L = re(), ne = oe("scrollElementRef"), H = oe("tableElementRef"), ce = oe("gridExitRef"), de = oe("tableRootRef"), { width: pe, height: K } = me(ne), { primaryColumnKey: he, columnDescriptors: ge, columnCssVars: _e, totalWidth: ve, columnCount: ye } = ct({
|
|
2664
2683
|
columns: () => e.columns,
|
|
2665
2684
|
columnOrder: m,
|
|
2666
2685
|
columnWidths: h,
|
|
@@ -2672,8 +2691,8 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2672
2691
|
columnsManagerWidth: () => e.columnsManagerWidth,
|
|
2673
2692
|
columnsResizable: () => e.columnsResizable,
|
|
2674
2693
|
columnsDraggable: () => e.columnsDraggable,
|
|
2675
|
-
viewportWidth: () =>
|
|
2676
|
-
}), { treeIndex:
|
|
2694
|
+
viewportWidth: () => pe.value
|
|
2695
|
+
}), { treeIndex: be, snapshot: xe, flatRows: q, toggleExpanded: Se, expandAll: Ce, collapseAll: we } = Kt({
|
|
2677
2696
|
items: () => e.items,
|
|
2678
2697
|
itemKey: () => e.itemKey,
|
|
2679
2698
|
childrenKey: () => e.childrenKey,
|
|
@@ -2681,50 +2700,50 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2681
2700
|
expanded: p,
|
|
2682
2701
|
depthFooter: () => e.depthFooter,
|
|
2683
2702
|
hasMoreChildrenKey: () => e.hasMoreChildrenKey
|
|
2684
|
-
}), { leadingDescriptors:
|
|
2685
|
-
columnDescriptors:
|
|
2686
|
-
hasTreeStructure: () =>
|
|
2703
|
+
}), { leadingDescriptors: Te, trailingDescriptors: Ee, headerCells: De, getStickyCellStyle: Oe, getHeaderCellClasses: ke, leadingCellPlans: J, trailingCellPlans: Y, rowCellPlans: X } = mn({
|
|
2704
|
+
columnDescriptors: ge,
|
|
2705
|
+
hasTreeStructure: () => je.value,
|
|
2687
2706
|
expandColumnKey: () => e.expandColumnKey,
|
|
2688
|
-
primaryColumnKey:
|
|
2689
|
-
}),
|
|
2707
|
+
primaryColumnKey: he
|
|
2708
|
+
}), Ae = b(() => ge.value.length + 1), je = b(() => be.value.expandableKeys.length > 0), Me = b(() => je.value ? "treegrid" : "grid"), Ie = b(() => q.value.length + 1 + +!!e.creationRow + +!!e.footerValues), Le = b(() => e.virtual), Re = b(() => ({
|
|
2690
2709
|
"s-ui-table--rows-fixed": e.rowHeightMode === Ne.FIXED,
|
|
2691
2710
|
"s-ui-table--columns-manager-body-static": !e.columnsManagerBodySticky
|
|
2692
|
-
})),
|
|
2711
|
+
})), ze = b(() => {
|
|
2693
2712
|
let t = 0;
|
|
2694
2713
|
return e.footerValues && (t += 40), e.creationRow && (t += 40), t;
|
|
2695
|
-
}),
|
|
2696
|
-
|
|
2697
|
-
|
|
2714
|
+
}), Be = [];
|
|
2715
|
+
W(q, (e) => {
|
|
2716
|
+
Be = e;
|
|
2698
2717
|
}, {
|
|
2699
2718
|
flush: "sync",
|
|
2700
2719
|
immediate: !0
|
|
2701
2720
|
});
|
|
2702
|
-
let { windowIndexes:
|
|
2721
|
+
let { windowIndexes: Ve, uiTotalSize: He, modelScrollOffset: Ue, scrollToIndex: Ge, visibleRange: Je, getRowOffset: Ye, getRowUiOffset: Xe, getRowIndexAtOffset: Ze, measureWindowRows: Qe, measureNewRows: $e } = Ln({
|
|
2703
2722
|
rowCount: () => q.value.length,
|
|
2704
|
-
enabled:
|
|
2723
|
+
enabled: Le,
|
|
2705
2724
|
autoMeasure: () => e.rowHeightMode === Ne.AUTO,
|
|
2706
2725
|
estimateRowSize: () => e.estimateRowSize,
|
|
2707
2726
|
estimateRowSizeByIndex: void 0,
|
|
2708
2727
|
overscan: () => e.overscan,
|
|
2709
|
-
scrollElement:
|
|
2710
|
-
getRowKey: (e) =>
|
|
2728
|
+
scrollElement: ne,
|
|
2729
|
+
getRowKey: (e) => Be[e]?.key ?? e,
|
|
2711
2730
|
rowsVersion: q,
|
|
2712
|
-
viewportHeight: () =>
|
|
2713
|
-
extraHeight: () => 40 +
|
|
2731
|
+
viewportHeight: () => K.value,
|
|
2732
|
+
extraHeight: () => 40 + ze.value,
|
|
2714
2733
|
headerHeight: () => 40
|
|
2715
|
-
}), { isRowHydrated:
|
|
2716
|
-
windowIndexes:
|
|
2717
|
-
visibleRange:
|
|
2718
|
-
getRowKey: (e) =>
|
|
2734
|
+
}), { isRowHydrated: et, hydratedKeys: tt } = Cn({
|
|
2735
|
+
windowIndexes: Ve,
|
|
2736
|
+
visibleRange: Je,
|
|
2737
|
+
getRowKey: (e) => Be[e]?.key,
|
|
2719
2738
|
rowsVersion: q,
|
|
2720
2739
|
pinnedRowKey: () => s.value,
|
|
2721
|
-
enabled: () =>
|
|
2740
|
+
enabled: () => Le.value && e.scrollSeekPlaceholders
|
|
2722
2741
|
});
|
|
2723
|
-
|
|
2724
|
-
let { resizingColumnKey:
|
|
2725
|
-
tableRootElement:
|
|
2726
|
-
scrollElement:
|
|
2727
|
-
columnDescriptors:
|
|
2742
|
+
W(tt, $e, { flush: "post" });
|
|
2743
|
+
let { resizingColumnKey: nt, handleResizeHandlePointerdown: rt, handleResizeHandleKeydown: it, handleResizeHandleDblclick: at } = hn({
|
|
2744
|
+
tableRootElement: de,
|
|
2745
|
+
scrollElement: ne,
|
|
2746
|
+
columnDescriptors: ge,
|
|
2728
2747
|
columnWidths: h,
|
|
2729
2748
|
enabled: () => e.columnsResizable,
|
|
2730
2749
|
onResizeEnd: (e, t) => {
|
|
@@ -2734,13 +2753,13 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2734
2753
|
});
|
|
2735
2754
|
},
|
|
2736
2755
|
remeasureRows: () => {
|
|
2737
|
-
|
|
2756
|
+
Qe();
|
|
2738
2757
|
}
|
|
2739
|
-
}),
|
|
2740
|
-
tableId:
|
|
2741
|
-
tableRootElement:
|
|
2758
|
+
}), ot = b(() => e.rowsDragMode ? e.rowsDragMode : je.value ? Pe.TREE : Pe.FLAT), { registerColumnHeaderElement: st, draggingColumnKey: lt, dropLineStyle: ut } = fn({
|
|
2759
|
+
tableId: L,
|
|
2760
|
+
tableRootElement: de,
|
|
2742
2761
|
enabled: () => e.columnsDraggable,
|
|
2743
|
-
columnDescriptors:
|
|
2762
|
+
columnDescriptors: ge,
|
|
2744
2763
|
onReorder: (t, n, r) => {
|
|
2745
2764
|
let i = m.value?.length ? [...m.value] : e.columns.map((e) => e.key);
|
|
2746
2765
|
e.columns.forEach((e) => {
|
|
@@ -2755,21 +2774,21 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2755
2774
|
order: a
|
|
2756
2775
|
});
|
|
2757
2776
|
},
|
|
2758
|
-
isResizing: () => !!
|
|
2759
|
-
}),
|
|
2760
|
-
(e instanceof Element || e === null) &&
|
|
2761
|
-
}, { registerRowElement:
|
|
2762
|
-
tableId:
|
|
2777
|
+
isResizing: () => !!nt.value
|
|
2778
|
+
}), dt = (e, t) => {
|
|
2779
|
+
(e instanceof Element || e === null) && st(t, e);
|
|
2780
|
+
}, { registerRowElement: pt, draggingRowKey: mt, dropIndicator: ht } = vn({
|
|
2781
|
+
tableId: L,
|
|
2763
2782
|
enabled: () => e.rowsDraggable,
|
|
2764
|
-
dragMode:
|
|
2765
|
-
snapshot:
|
|
2766
|
-
scrollElement:
|
|
2783
|
+
dragMode: ot,
|
|
2784
|
+
snapshot: xe,
|
|
2785
|
+
scrollElement: ne,
|
|
2767
2786
|
isRowDraggable: () => e.isRowDraggable,
|
|
2768
2787
|
dragExpandDelayMs: () => e.dragExpandDelayMs,
|
|
2769
2788
|
dragInsideDelayMs: () => e.dragInsideDelayMs,
|
|
2770
2789
|
isExpanded: (e) => p.value.includes(e),
|
|
2771
2790
|
onHoverExpand: (e) => {
|
|
2772
|
-
|
|
2791
|
+
Se(e);
|
|
2773
2792
|
},
|
|
2774
2793
|
onReorder: (e) => {
|
|
2775
2794
|
j("rowsReorder", e);
|
|
@@ -2777,56 +2796,56 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2777
2796
|
onTreeDrop: (e) => {
|
|
2778
2797
|
j("rowsDrop", e);
|
|
2779
2798
|
},
|
|
2780
|
-
resolveRowPreviewTitle: (e) =>
|
|
2781
|
-
}),
|
|
2782
|
-
(e instanceof Element || e === null) &&
|
|
2783
|
-
},
|
|
2784
|
-
let t =
|
|
2799
|
+
resolveRowPreviewTitle: (e) => kn(e) ?? e.key
|
|
2800
|
+
}), gt = (e) => {
|
|
2801
|
+
(e instanceof Element || e === null) && pt(e);
|
|
2802
|
+
}, _t = (e) => {
|
|
2803
|
+
let t = ht.value;
|
|
2785
2804
|
if (!(!t || t.targetKey !== e)) return t.action === Fe.CHILD ? "inside" : t.action === Fe.BEFORE ? "before" : "after";
|
|
2786
|
-
}, { activeGroupRowIndex:
|
|
2787
|
-
snapshot:
|
|
2788
|
-
visibleRange:
|
|
2805
|
+
}, { activeGroupRowIndex: vt, activeDepthFooterRowIndex: bt, activeDepthFooterRowIndexes: xt, leavingDepthFooterRowIndex: St, slidingDepthFooterRowIndexes: Ct, farDepthFooterRowIndexes: wt } = Tn({
|
|
2806
|
+
snapshot: xe,
|
|
2807
|
+
visibleRange: Je,
|
|
2789
2808
|
groupRowSticky: () => e.groupRowSticky,
|
|
2790
2809
|
depthFooterSticky: () => e.depthFooter?.sticky !== !1,
|
|
2791
2810
|
bottomVisibleRowIndex: b(() => {
|
|
2792
|
-
if (!
|
|
2793
|
-
let e =
|
|
2794
|
-
return
|
|
2811
|
+
if (!Le.value || K.value === 0) return;
|
|
2812
|
+
let e = Ue.value + K.value - 40 - ze.value;
|
|
2813
|
+
return Ze(Math.max(0, e));
|
|
2795
2814
|
}),
|
|
2796
|
-
getRowOffset:
|
|
2797
|
-
}), { renderEntries:
|
|
2815
|
+
getRowOffset: Ye
|
|
2816
|
+
}), { renderEntries: Tt } = yn({
|
|
2798
2817
|
flatRows: q,
|
|
2799
|
-
virtualEnabled:
|
|
2800
|
-
windowIndexes:
|
|
2801
|
-
uiTotalSize:
|
|
2802
|
-
getRowUiOffset:
|
|
2803
|
-
activeGroupRowIndex:
|
|
2804
|
-
activeDepthFooterRowIndexes:
|
|
2805
|
-
leavingDepthFooterRowIndex:
|
|
2806
|
-
slidingDepthFooterRowIndexes:
|
|
2807
|
-
farDepthFooterRowIndexes:
|
|
2818
|
+
virtualEnabled: Le,
|
|
2819
|
+
windowIndexes: Ve,
|
|
2820
|
+
uiTotalSize: He,
|
|
2821
|
+
getRowUiOffset: Xe,
|
|
2822
|
+
activeGroupRowIndex: vt,
|
|
2823
|
+
activeDepthFooterRowIndexes: xt,
|
|
2824
|
+
leavingDepthFooterRowIndex: St,
|
|
2825
|
+
slidingDepthFooterRowIndexes: Ct,
|
|
2826
|
+
farDepthFooterRowIndexes: wt,
|
|
2808
2827
|
activeRowIndex: b(() => {
|
|
2809
|
-
if (s.value) return
|
|
2828
|
+
if (s.value) return xe.value.getRowIndexByKey(s.value);
|
|
2810
2829
|
})
|
|
2811
|
-
}),
|
|
2812
|
-
tfootBarStackHeight:
|
|
2830
|
+
}), Et = b(() => !e.loading && q.value.length === 0), { rootStyle: Ot, scrollStyle: kt, tableStyle: At } = Dn({
|
|
2831
|
+
tfootBarStackHeight: ze,
|
|
2813
2832
|
hasFooterValues: () => !!e.footerValues,
|
|
2814
|
-
scrollClientWidth: () =>
|
|
2815
|
-
columnCssVars:
|
|
2816
|
-
totalWidth:
|
|
2833
|
+
scrollClientWidth: () => pe.value,
|
|
2834
|
+
columnCssVars: _e,
|
|
2835
|
+
totalWidth: ve,
|
|
2817
2836
|
height: () => e.height,
|
|
2818
2837
|
maxHeight: () => e.maxHeight
|
|
2819
|
-
}), { getColumnSortDirection:
|
|
2838
|
+
}), { getColumnSortDirection: jt, getColumnSortIndex: Nt, applySortCycle: Pt, applySortExact: Ft, getHeaderAriaSort: It, getHeaderSlotScope: Lt } = Sn({
|
|
2820
2839
|
sortState: A,
|
|
2821
2840
|
onSortChange: (e) => {
|
|
2822
2841
|
j("sortChange", e);
|
|
2823
2842
|
}
|
|
2824
|
-
}),
|
|
2825
|
-
|
|
2826
|
-
},
|
|
2843
|
+
}), Rt = B(), zt = (e, t) => {
|
|
2844
|
+
Rt.value = t ? e : void 0;
|
|
2845
|
+
}, Bt = (e) => {
|
|
2827
2846
|
let t = e.column?.title;
|
|
2828
|
-
return t ?
|
|
2829
|
-
},
|
|
2847
|
+
return t ? te("table.resizeNamedColumn", { title: t }) : te("table.resizeColumn");
|
|
2848
|
+
}, Vt = (t, n) => {
|
|
2830
2849
|
if (!e.columnsResizable || !t.resizable) return;
|
|
2831
2850
|
let r = Math.min(t.maxWidth ?? Infinity, Math.max(t.minWidth, t.width + n * 8));
|
|
2832
2851
|
r !== t.width && (h.value = {
|
|
@@ -2836,9 +2855,9 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2836
2855
|
key: t.key,
|
|
2837
2856
|
width: r
|
|
2838
2857
|
}));
|
|
2839
|
-
},
|
|
2840
|
-
let e =
|
|
2841
|
-
let t =
|
|
2858
|
+
}, Ut = B(!1), Wt = b(() => e.columns.filter((e) => e.key !== he.value && (e.hideable ?? !0))), Gt = (e) => (O.value ?? []).includes(e), qt = b(() => {
|
|
2859
|
+
let e = Wt.value.map((e) => {
|
|
2860
|
+
let t = Gt(e.key);
|
|
2842
2861
|
return {
|
|
2843
2862
|
column: e,
|
|
2844
2863
|
hidden: t,
|
|
@@ -2846,22 +2865,22 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2846
2865
|
};
|
|
2847
2866
|
});
|
|
2848
2867
|
return [e.filter((e) => !e.hidden), e.filter((e) => e.hidden)].filter((e) => e.length > 0);
|
|
2849
|
-
}),
|
|
2868
|
+
}), Jt = (e) => {
|
|
2850
2869
|
let t = new Set(O.value ?? []);
|
|
2851
2870
|
t.has(e) ? t.delete(e) : t.add(e), O.value = [...t];
|
|
2852
|
-
},
|
|
2871
|
+
}, Yt = (e) => {
|
|
2853
2872
|
let t = new Set(O.value ?? []);
|
|
2854
2873
|
t.add(e), O.value = [...t];
|
|
2855
|
-
},
|
|
2874
|
+
}, Xt = bn({
|
|
2856
2875
|
selected: c,
|
|
2857
2876
|
cascade: () => e.cascadeSelection,
|
|
2858
|
-
treeIndex:
|
|
2877
|
+
treeIndex: be,
|
|
2859
2878
|
groupRow: () => e.groupRow,
|
|
2860
2879
|
disabledKey: () => e.disabledKey,
|
|
2861
2880
|
isItemSelectable: () => e.isItemSelectable
|
|
2862
|
-
}),
|
|
2863
|
-
|
|
2864
|
-
},
|
|
2881
|
+
}), Zt = Xt.headerCheckState, Qt = (e) => Xt.isSelected(e), $t = (t) => e.cascadeSelection && Xt.getCheckState(t) === Z.INDETERMINATE, en = (e) => {
|
|
2882
|
+
Xt.toggleRow(e);
|
|
2883
|
+
}, tn = (t) => Ht(t.item, e.disabledKey), nn = ({ row: t, spacerHeight: n, rowHeight: r, stuckTop: i, stuckBottom: a, stuckBottomLeaving: o, stuckBottomSliding: c, stuckBottomCoverHeight: l, stuckBottomFar: u }, d) => [
|
|
2865
2884
|
t ?? n,
|
|
2866
2885
|
t?.index,
|
|
2867
2886
|
t?.expanded,
|
|
@@ -2870,12 +2889,12 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2870
2889
|
t?.hasChildren,
|
|
2871
2890
|
t?.depth,
|
|
2872
2891
|
t?.parentKey,
|
|
2873
|
-
t ? Zt(t.key) : !1,
|
|
2874
2892
|
t ? Qt(t.key) : !1,
|
|
2893
|
+
t ? $t(t.key) : !1,
|
|
2875
2894
|
t ? s.value === t.key : !1,
|
|
2876
|
-
t ?
|
|
2877
|
-
t ?
|
|
2878
|
-
t ?
|
|
2895
|
+
t ? yr(t.key) : void 0,
|
|
2896
|
+
t ? mt.value === t.key : !1,
|
|
2897
|
+
t ? _t(t.key) : void 0,
|
|
2879
2898
|
r,
|
|
2880
2899
|
i,
|
|
2881
2900
|
a,
|
|
@@ -2883,9 +2902,9 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2883
2902
|
c,
|
|
2884
2903
|
l,
|
|
2885
2904
|
u,
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2905
|
+
ge.value,
|
|
2906
|
+
dn.value,
|
|
2907
|
+
wn.value,
|
|
2889
2908
|
d,
|
|
2890
2909
|
e.loadingMoreChildrenKeys,
|
|
2891
2910
|
e.treeIndent,
|
|
@@ -2896,33 +2915,33 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2896
2915
|
e.selectable,
|
|
2897
2916
|
e.cascadeSelection,
|
|
2898
2917
|
e.rowsDraggable,
|
|
2899
|
-
|
|
2900
|
-
],
|
|
2918
|
+
je.value
|
|
2919
|
+
], an = (e) => {
|
|
2901
2920
|
if (e !== void 0) return { "--s-ui-table-stuck-cover-height": `${e}px` };
|
|
2902
|
-
},
|
|
2903
|
-
let t = e.row?.kind === Q.ROW &&
|
|
2921
|
+
}, on = b(() => Tt.value.map((e) => {
|
|
2922
|
+
let t = e.row?.kind === Q.ROW && !et(e.row.key);
|
|
2904
2923
|
return {
|
|
2905
2924
|
...e,
|
|
2906
2925
|
placeholder: t,
|
|
2907
|
-
memoKeys:
|
|
2926
|
+
memoKeys: nn(e, t)
|
|
2908
2927
|
};
|
|
2909
|
-
})),
|
|
2928
|
+
})), cn = b(() => Object.keys(F).filter((e) => e.startsWith("cell:"))), ln = (e) => `s-ui-table-${L}-row-${e}`, un = (e) => ({
|
|
2910
2929
|
...e,
|
|
2911
|
-
selected:
|
|
2930
|
+
selected: Qt(e.key),
|
|
2912
2931
|
indeterminate: !1,
|
|
2913
2932
|
active: s.value === e.key,
|
|
2914
|
-
disabled:
|
|
2933
|
+
disabled: tn(e),
|
|
2915
2934
|
group: e.kind === Q.GROUP,
|
|
2916
2935
|
toggleExpanded: () => {
|
|
2917
|
-
|
|
2936
|
+
Se(e.key);
|
|
2918
2937
|
},
|
|
2919
2938
|
toggleSelected: () => {
|
|
2920
|
-
|
|
2939
|
+
en(e.key);
|
|
2921
2940
|
}
|
|
2922
|
-
}), { depthFooterColumnKey:
|
|
2941
|
+
}), { depthFooterColumnKey: dn, groupColumnKey: pn, creationColumnKey: gn, loadMoreColumnKey: wn, getGroupCount: En, getGroupTotal: On, getGroupTitle: kn, getDepthIndentStyle: An, emitDepthFooterClick: jn, getDepthFooterSlotScope: Mn, isLoadMoreRowLoading: Nn, emitLoadMoreChildren: Pn, getLoadMoreSlotScope: Fn, getFooterValueText: In, getFooterToneClass: ar, getFooterSlotScope: or } = xn({
|
|
2923
2942
|
columns: () => e.columns,
|
|
2924
|
-
primaryColumnKey:
|
|
2925
|
-
treeNodeByKey: b(() =>
|
|
2943
|
+
primaryColumnKey: he,
|
|
2944
|
+
treeNodeByKey: b(() => be.value.nodeByKey),
|
|
2926
2945
|
groupTotalKey: () => e.groupTotalKey,
|
|
2927
2946
|
depthFooter: () => e.depthFooter,
|
|
2928
2947
|
groupContentColumnKey: () => e.groupContentColumnKey,
|
|
@@ -2931,105 +2950,106 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2931
2950
|
treeIndent: () => e.treeIndent,
|
|
2932
2951
|
loadingMoreChildrenKeys: () => e.loadingMoreChildrenKeys,
|
|
2933
2952
|
footerValues: () => e.footerValues,
|
|
2934
|
-
stuckDepthFooterRowIndex:
|
|
2953
|
+
stuckDepthFooterRowIndex: bt,
|
|
2935
2954
|
onDepthFooterClick: (e) => {
|
|
2936
2955
|
j("depthFooterClick", e);
|
|
2937
2956
|
},
|
|
2938
2957
|
onLoadMoreChildren: (e) => {
|
|
2939
2958
|
j("loadMoreChildren", e);
|
|
2940
2959
|
}
|
|
2941
|
-
}),
|
|
2942
|
-
...
|
|
2943
|
-
count:
|
|
2944
|
-
total:
|
|
2945
|
-
}),
|
|
2946
|
-
|
|
2960
|
+
}), sr = (e) => ({
|
|
2961
|
+
...un(e),
|
|
2962
|
+
count: En(e),
|
|
2963
|
+
total: On(e)
|
|
2964
|
+
}), cr = (t, n) => {
|
|
2965
|
+
tn(t) || (s.value = t.key, e.expandOnClick && (t.hasChildren || t.kind === Q.GROUP) && Se(t.key), j("rowClick", {
|
|
2947
2966
|
key: t.key,
|
|
2948
2967
|
item: t.item,
|
|
2949
2968
|
event: n
|
|
2950
2969
|
}));
|
|
2951
|
-
},
|
|
2970
|
+
}, lr = (e, t) => {
|
|
2952
2971
|
j("rowContextMenu", {
|
|
2953
2972
|
key: e.key,
|
|
2954
2973
|
item: e.item,
|
|
2955
2974
|
event: t
|
|
2956
2975
|
});
|
|
2957
|
-
},
|
|
2976
|
+
}, ur = b(() => {
|
|
2958
2977
|
let e = /* @__PURE__ */ new Set();
|
|
2959
|
-
return
|
|
2978
|
+
return ge.value.forEach((t) => {
|
|
2960
2979
|
t.column && e.add(t.key);
|
|
2961
2980
|
}), e;
|
|
2962
|
-
}),
|
|
2963
|
-
!
|
|
2981
|
+
}), dr = (e, t, n) => {
|
|
2982
|
+
!ur.value.has(t) || tn(e) || j("cellClick", {
|
|
2964
2983
|
key: e.key,
|
|
2965
2984
|
item: e.item,
|
|
2966
2985
|
columnKey: t,
|
|
2967
2986
|
event: n
|
|
2968
2987
|
});
|
|
2969
|
-
},
|
|
2970
|
-
let t =
|
|
2988
|
+
}, fr = (e) => e ? !tn(e) : !1, pr = b(() => {
|
|
2989
|
+
let t = K.value - 40 - ze.value;
|
|
2971
2990
|
return Math.max(1, Math.floor(t / e.estimateRowSize));
|
|
2972
2991
|
});
|
|
2973
|
-
f(() =>
|
|
2992
|
+
f(() => ne.value, {
|
|
2974
2993
|
distance: () => e.endReachedDistance,
|
|
2975
2994
|
canLoadMore: () => e.canLoadMore?.() ?? !0,
|
|
2976
2995
|
onEndReached: () => {
|
|
2977
2996
|
j("endReached", { direction: "bottom" });
|
|
2978
2997
|
}
|
|
2979
2998
|
});
|
|
2980
|
-
let
|
|
2981
|
-
let n =
|
|
2999
|
+
let mr = (e, t) => {
|
|
3000
|
+
let n = xe.value.getRowIndexByKey(e);
|
|
2982
3001
|
if (n !== void 0) {
|
|
2983
|
-
if (
|
|
2984
|
-
|
|
3002
|
+
if (Le.value) {
|
|
3003
|
+
Ge(n, t?.align ?? "auto");
|
|
2985
3004
|
return;
|
|
2986
3005
|
}
|
|
2987
|
-
document.getElementById(
|
|
3006
|
+
document.getElementById(ln(e))?.scrollIntoView({ block: t?.align === "center" ? "center" : "nearest" });
|
|
2988
3007
|
}
|
|
2989
|
-
},
|
|
2990
|
-
tableRootElement:
|
|
2991
|
-
tableElement:
|
|
2992
|
-
|
|
2993
|
-
|
|
3008
|
+
}, hr = (e) => `s-ui-table-${L}-cell-${e.section}-${e.rowKey ?? ""}-${e.columnKey}`, gr = ft({
|
|
3009
|
+
tableRootElement: de,
|
|
3010
|
+
tableElement: H,
|
|
3011
|
+
exitElement: ce,
|
|
3012
|
+
scrollElement: ne,
|
|
3013
|
+
columnDescriptors: ge,
|
|
2994
3014
|
flatRows: q,
|
|
2995
|
-
snapshot:
|
|
2996
|
-
groupColumnKey:
|
|
2997
|
-
depthFooterColumnKey:
|
|
2998
|
-
loadMoreColumnKey:
|
|
2999
|
-
creationColumnKey:
|
|
3015
|
+
snapshot: xe,
|
|
3016
|
+
groupColumnKey: pn,
|
|
3017
|
+
depthFooterColumnKey: dn,
|
|
3018
|
+
loadMoreColumnKey: wn,
|
|
3019
|
+
creationColumnKey: gn,
|
|
3000
3020
|
hasCreationRow: () => !!e.creationRow,
|
|
3001
3021
|
hasAggregateRow: () => !!e.footerValues,
|
|
3002
|
-
isRowNavigable:
|
|
3003
|
-
pageSize:
|
|
3004
|
-
buildCellDomId:
|
|
3022
|
+
isRowNavigable: fr,
|
|
3023
|
+
pageSize: pr,
|
|
3024
|
+
buildCellDomId: hr,
|
|
3005
3025
|
onBodyRowFocused: (e) => {
|
|
3006
3026
|
s.value = e;
|
|
3007
3027
|
},
|
|
3008
3028
|
scrollToRowIndex: (e) => {
|
|
3009
3029
|
let t = q.value[e];
|
|
3010
|
-
t &&
|
|
3030
|
+
t && mr(t.key);
|
|
3011
3031
|
}
|
|
3012
|
-
}),
|
|
3013
|
-
let t =
|
|
3032
|
+
}), _r = `s-ui-table-${L}-cell-${$.BODY}-`, vr = `s-ui-table-${L}-cell-${$.CREATION}-`, yr = (e) => gr.focusedBodyRowKey.value === e ? gr.focusAddress.value.columnKey : void 0, br = (e) => {
|
|
3033
|
+
let t = gr.focusAddress.value;
|
|
3014
3034
|
return t.section === e ? t.columnKey : void 0;
|
|
3015
|
-
},
|
|
3016
|
-
gridFocus:
|
|
3017
|
-
columnDescriptors:
|
|
3035
|
+
}, xr = (e, t, n) => gr.getCellTabIndex(e, t, n), { handleGridFocusIn: Sr, handleGridKeydown: Cr } = _n({
|
|
3036
|
+
gridFocus: gr,
|
|
3037
|
+
columnDescriptors: ge,
|
|
3018
3038
|
flatRows: q,
|
|
3019
3039
|
expandColumnKey: () => e.expandColumnKey,
|
|
3020
|
-
primaryColumnKey:
|
|
3021
|
-
groupColumnKey:
|
|
3040
|
+
primaryColumnKey: he,
|
|
3041
|
+
groupColumnKey: pn,
|
|
3022
3042
|
selectable: () => e.selectable,
|
|
3023
|
-
openMenuColumnKey:
|
|
3024
|
-
toggleExpanded:
|
|
3043
|
+
openMenuColumnKey: Rt,
|
|
3044
|
+
toggleExpanded: Se,
|
|
3025
3045
|
toggleRowSelected: (e) => {
|
|
3026
|
-
|
|
3046
|
+
Xt.toggleRow(e);
|
|
3027
3047
|
},
|
|
3028
|
-
applySortCycle:
|
|
3029
|
-
setColumnMenuOpen:
|
|
3030
|
-
resizeColumnByKeyboard:
|
|
3031
|
-
onDepthFooterActivate:
|
|
3032
|
-
onLoadMoreActivate:
|
|
3048
|
+
applySortCycle: Pt,
|
|
3049
|
+
setColumnMenuOpen: zt,
|
|
3050
|
+
resizeColumnByKeyboard: Vt,
|
|
3051
|
+
onDepthFooterActivate: jn,
|
|
3052
|
+
onLoadMoreActivate: Pn,
|
|
3033
3053
|
onRowActivate: (e, t) => {
|
|
3034
3054
|
j("rowClick", {
|
|
3035
3055
|
key: e.key,
|
|
@@ -3040,487 +3060,497 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
3040
3060
|
});
|
|
3041
3061
|
return t({
|
|
3042
3062
|
focusNavigation: async () => {
|
|
3043
|
-
|
|
3063
|
+
gr.focusAddressNow(gr.focusAddress.value), await ee();
|
|
3044
3064
|
},
|
|
3045
|
-
scrollToRow:
|
|
3046
|
-
expandAll:
|
|
3047
|
-
collapseAll:
|
|
3065
|
+
scrollToRow: mr,
|
|
3066
|
+
expandAll: Ce,
|
|
3067
|
+
collapseAll: we,
|
|
3048
3068
|
clearSelection: () => {
|
|
3049
|
-
|
|
3069
|
+
Xt.clearSelection();
|
|
3050
3070
|
},
|
|
3051
|
-
getScrollElement: () =>
|
|
3052
|
-
}), (t, n) => (
|
|
3071
|
+
getScrollElement: () => ne.value ?? void 0
|
|
3072
|
+
}), (t, n) => (I(), C("div", {
|
|
3053
3073
|
ref_key: "tableRootRef",
|
|
3054
|
-
ref:
|
|
3055
|
-
class: N(["s-ui-table",
|
|
3056
|
-
style: P(
|
|
3057
|
-
}, [w("div", {
|
|
3058
|
-
ref_key: "scrollElementRef",
|
|
3059
|
-
ref: te,
|
|
3060
|
-
class: "s-ui-table__scroll",
|
|
3061
|
-
style: P(W(Ot))
|
|
3062
|
-
}, [w("table", {
|
|
3063
|
-
class: "s-ui-table__table",
|
|
3064
|
-
style: P(W(kt)),
|
|
3065
|
-
role: je.value,
|
|
3066
|
-
"aria-rowcount": Me.value,
|
|
3067
|
-
"aria-colcount": W(ve),
|
|
3068
|
-
"aria-busy": e.loading || e.loadingMore || void 0,
|
|
3069
|
-
ref_key: "tableElementRef",
|
|
3070
|
-
ref: U,
|
|
3071
|
-
tabindex: "-1",
|
|
3072
|
-
onKeydown: n[5] ||= (...e) => W(Sr) && W(Sr)(...e),
|
|
3073
|
-
onFocusin: n[6] ||= (...e) => W(xr) && W(xr)(...e)
|
|
3074
|
+
ref: de,
|
|
3075
|
+
class: N(["s-ui-table", Re.value]),
|
|
3076
|
+
style: P(U(Ot))
|
|
3074
3077
|
}, [
|
|
3075
|
-
w("
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
section: W($).HEADER,
|
|
3090
|
-
columnKey: c.key
|
|
3091
|
-
}),
|
|
3092
|
-
ref_for: !0,
|
|
3093
|
-
ref: (e) => ut(e, c.key),
|
|
3094
|
-
class: N(["s-ui-table__header-cell", [W(Oe)(c), { "s-ui-table__header-cell--dragging": W(st) === c.key }]]),
|
|
3095
|
-
style: P(W(De)(c)),
|
|
3096
|
-
"data-column-key": c.key,
|
|
3097
|
-
"data-section": W($).HEADER,
|
|
3098
|
-
"aria-colindex": c.colIndex,
|
|
3099
|
-
"aria-sort": W(Ft)(c),
|
|
3100
|
-
tabindex: br(W($).HEADER, void 0, c.key),
|
|
3101
|
-
scope: "col"
|
|
3102
|
-
}, [c.column ? (L(), x(Dt, {
|
|
3103
|
-
key: 0,
|
|
3104
|
-
descriptor: c,
|
|
3105
|
-
"sort-direction": W(At)(c.key),
|
|
3106
|
-
"sort-index": W(jt)(c.key),
|
|
3107
|
-
"menu-enabled": e.columnMenu,
|
|
3108
|
-
"menu-open": Lt.value === c.key,
|
|
3109
|
-
"onUpdate:menuOpen": (e) => Rt(c.key, e),
|
|
3110
|
-
onSortToggle: (e) => W(Nt)(c.key, e),
|
|
3111
|
-
onSortSet: (e) => W(Pt)(c.key, e),
|
|
3112
|
-
onHide: (e) => Jt(c.key)
|
|
3113
|
-
}, T({ _: 2 }, [W(F)[`header:${c.key}`] ? {
|
|
3114
|
-
name: "default",
|
|
3115
|
-
fn: K(() => [B(t.$slots, `header:${c.key}`, M({ ref_for: !0 }, W(It)(c)))]),
|
|
3116
|
-
key: "0"
|
|
3117
|
-
} : void 0, W(F)[`header-menu:${c.key}`] ? {
|
|
3118
|
-
name: "menu",
|
|
3119
|
-
fn: K(() => [B(t.$slots, `header-menu:${c.key}`, M({ ref_for: !0 }, W(It)(c)))]),
|
|
3120
|
-
key: "1"
|
|
3121
|
-
} : void 0]), 1032, [
|
|
3122
|
-
"descriptor",
|
|
3123
|
-
"sort-direction",
|
|
3124
|
-
"sort-index",
|
|
3125
|
-
"menu-enabled",
|
|
3126
|
-
"menu-open",
|
|
3127
|
-
"onUpdate:menuOpen",
|
|
3128
|
-
"onSortToggle",
|
|
3129
|
-
"onSortSet",
|
|
3130
|
-
"onHide"
|
|
3131
|
-
])) : c.service === W(qe).CHECKBOX ? (L(), x(We, {
|
|
3132
|
-
key: 1,
|
|
3133
|
-
class: N(["s-ui-table__header-checkbox", { "s-ui-table__header-checkbox--active": W(Xt) !== W(Z).UNCHECKED }]),
|
|
3134
|
-
"model-value": W(Xt) === W(Z).CHECKED,
|
|
3135
|
-
indeterminate: W(Xt) === W(Z).INDETERMINATE,
|
|
3136
|
-
"screen-reader-label": W(Xt) === W(Z).CHECKED ? W(I)("table.deselectAll") : W(I)("table.selectAll"),
|
|
3137
|
-
"onUpdate:modelValue": n[0] ||= (e) => W(Yt).toggleSelectAll()
|
|
3138
|
-
}, null, 8, [
|
|
3139
|
-
"class",
|
|
3140
|
-
"model-value",
|
|
3141
|
-
"indeterminate",
|
|
3142
|
-
"screen-reader-label"
|
|
3143
|
-
])) : c.service === W(qe).COLUMNS_MANAGER ? (L(), C("div", Hn, [D(W(u), {
|
|
3144
|
-
modelValue: Vt.value,
|
|
3145
|
-
"onUpdate:modelValue": n[1] ||= (e) => Vt.value = e,
|
|
3146
|
-
placement: W(l).BOTTOM_END,
|
|
3147
|
-
shift: "",
|
|
3148
|
-
"fit-viewport": ""
|
|
3149
|
-
}, {
|
|
3150
|
-
trigger: K(({ toggle: e }) => [D(W(o), {
|
|
3151
|
-
class: "s-ui-table__columns-manager-button",
|
|
3152
|
-
appearance: W(i).BARE,
|
|
3153
|
-
variant: W(r).MAIN,
|
|
3154
|
-
size: W(a).SMALL,
|
|
3155
|
-
icon: "tablePlus",
|
|
3156
|
-
"aria-label": W(I)("table.manageColumns"),
|
|
3157
|
-
tabindex: "-1",
|
|
3158
|
-
onClick: (t) => e()
|
|
3159
|
-
}, null, 8, [
|
|
3160
|
-
"appearance",
|
|
3161
|
-
"variant",
|
|
3162
|
-
"size",
|
|
3163
|
-
"aria-label",
|
|
3164
|
-
"onClick"
|
|
3165
|
-
])]),
|
|
3166
|
-
content: K(() => [D(W(d), {
|
|
3167
|
-
class: "s-ui-table__columns-menu",
|
|
3168
|
-
width: 300
|
|
3169
|
-
}, {
|
|
3170
|
-
default: K(() => [B(t.$slots, "columns-menu", {
|
|
3171
|
-
columns: Ut.value,
|
|
3172
|
-
isColumnHidden: Wt,
|
|
3173
|
-
toggleColumn: qt
|
|
3174
|
-
}, () => [(L(!0), C(y, null, z(Gt.value, (e, t) => (L(), C(y, { key: t }, [t > 0 ? (L(), x(W(le), {
|
|
3175
|
-
key: 0,
|
|
3176
|
-
class: "s-ui-table__columns-separator"
|
|
3177
|
-
})) : S("", !0), (L(!0), C(y, null, z(e, (e) => (L(), x(W(v), {
|
|
3178
|
-
key: e.column.key,
|
|
3179
|
-
class: N(["s-ui-table__columns-item", e.classes]),
|
|
3180
|
-
size: W(_).SMALL,
|
|
3181
|
-
"label-placement": W(g).LEFT,
|
|
3182
|
-
"model-value": !e.hidden,
|
|
3183
|
-
"onUpdate:modelValue": (t) => qt(e.column.key)
|
|
3184
|
-
}, {
|
|
3185
|
-
default: K(() => [w("span", Un, [e.column.icon ? (L(), x(W(ce), {
|
|
3186
|
-
key: 0,
|
|
3187
|
-
name: e.column.icon,
|
|
3188
|
-
size: 16
|
|
3189
|
-
}, null, 8, ["name"])) : S("", !0), w("span", Wn, H(e.column.title ?? e.column.key), 1)])]),
|
|
3190
|
-
_: 2
|
|
3191
|
-
}, 1032, [
|
|
3192
|
-
"class",
|
|
3193
|
-
"size",
|
|
3194
|
-
"label-placement",
|
|
3195
|
-
"model-value",
|
|
3196
|
-
"onUpdate:modelValue"
|
|
3197
|
-
]))), 128))], 64))), 128))])]),
|
|
3198
|
-
_: 3
|
|
3199
|
-
})]),
|
|
3200
|
-
_: 3
|
|
3201
|
-
}, 8, ["modelValue", "placement"])])) : S("", !0), c.resizable ? (L(), C("span", {
|
|
3202
|
-
key: 3,
|
|
3203
|
-
class: N(["s-ui-table__resize-handle", { "s-ui-table__resize-handle--active": W(tt) === c.key }]),
|
|
3204
|
-
role: "separator",
|
|
3205
|
-
"aria-orientation": "vertical",
|
|
3206
|
-
"aria-label": zt(c),
|
|
3207
|
-
"aria-valuenow": c.width,
|
|
3208
|
-
"aria-valuemin": c.minWidth,
|
|
3209
|
-
"aria-valuemax": c.maxWidth,
|
|
3210
|
-
"aria-valuetext": W(I)("table.columnWidth", { width: String(c.width) }),
|
|
3078
|
+
w("div", {
|
|
3079
|
+
ref_key: "scrollElementRef",
|
|
3080
|
+
ref: ne,
|
|
3081
|
+
class: "s-ui-table__scroll",
|
|
3082
|
+
style: P(U(kt))
|
|
3083
|
+
}, [w("table", {
|
|
3084
|
+
class: "s-ui-table__table",
|
|
3085
|
+
style: P(U(At)),
|
|
3086
|
+
role: Me.value,
|
|
3087
|
+
"aria-rowcount": Ie.value,
|
|
3088
|
+
"aria-colcount": U(ye),
|
|
3089
|
+
"aria-busy": e.loading || e.loadingMore || void 0,
|
|
3090
|
+
ref_key: "tableElementRef",
|
|
3091
|
+
ref: H,
|
|
3211
3092
|
tabindex: "-1",
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
},
|
|
3093
|
+
onKeydown: n[5] ||= (...e) => U(Cr) && U(Cr)(...e),
|
|
3094
|
+
onFocusin: n[6] ||= (...e) => U(Sr) && U(Sr)(...e)
|
|
3095
|
+
}, [
|
|
3096
|
+
w("colgroup", null, [
|
|
3097
|
+
(I(!0), C(y, null, R(U(Te), (e) => (I(), C("col", {
|
|
3098
|
+
key: e.key,
|
|
3099
|
+
style: P({ width: `var(${e.liveWidthVar}, var(${e.widthVar}))` })
|
|
3100
|
+
}, null, 4))), 128)),
|
|
3101
|
+
n[7] ||= w("col", { class: "s-ui-table__filler-col" }, null, -1),
|
|
3102
|
+
(I(!0), C(y, null, R(U(Ee), (e) => (I(), C("col", {
|
|
3103
|
+
key: e.key,
|
|
3104
|
+
style: P({ width: `var(${e.liveWidthVar}, var(${e.widthVar}))` })
|
|
3105
|
+
}, null, 4))), 128))
|
|
3106
|
+
]),
|
|
3107
|
+
w("thead", zn, [w("tr", Bn, [(I(!0), C(y, null, R(U(De), ({ key: s, descriptor: c }) => (I(), C(y, { key: s }, [c ? (I(), C("th", {
|
|
3108
|
+
key: 1,
|
|
3109
|
+
id: hr({
|
|
3110
|
+
section: U($).HEADER,
|
|
3111
|
+
columnKey: c.key
|
|
3112
|
+
}),
|
|
3113
|
+
ref_for: !0,
|
|
3114
|
+
ref: (e) => dt(e, c.key),
|
|
3115
|
+
class: N(["s-ui-table__header-cell", [U(ke)(c), { "s-ui-table__header-cell--dragging": U(lt) === c.key }]]),
|
|
3116
|
+
style: P(U(Oe)(c)),
|
|
3117
|
+
"data-column-key": c.key,
|
|
3118
|
+
"data-section": U($).HEADER,
|
|
3119
|
+
"aria-colindex": c.colIndex,
|
|
3120
|
+
"aria-sort": U(It)(c),
|
|
3121
|
+
tabindex: xr(U($).HEADER, void 0, c.key),
|
|
3122
|
+
scope: "col"
|
|
3123
|
+
}, [c.column ? (I(), x(Dt, {
|
|
3124
|
+
key: 0,
|
|
3125
|
+
descriptor: c,
|
|
3126
|
+
"sort-direction": U(jt)(c.key),
|
|
3127
|
+
"sort-index": U(Nt)(c.key),
|
|
3128
|
+
"menu-enabled": e.columnMenu,
|
|
3129
|
+
"menu-open": Rt.value === c.key,
|
|
3130
|
+
"onUpdate:menuOpen": (e) => zt(c.key, e),
|
|
3131
|
+
onSortToggle: (e) => U(Pt)(c.key, e),
|
|
3132
|
+
onSortSet: (e) => U(Ft)(c.key, e),
|
|
3133
|
+
onHide: (e) => Yt(c.key)
|
|
3134
|
+
}, T({ _: 2 }, [U(F)[`header:${c.key}`] ? {
|
|
3227
3135
|
name: "default",
|
|
3228
|
-
fn:
|
|
3136
|
+
fn: G(() => [z(t.$slots, `header:${c.key}`, M({ ref_for: !0 }, U(Lt)(c)))]),
|
|
3229
3137
|
key: "0"
|
|
3230
|
-
} : void 0
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
key: "2"
|
|
3283
|
-
} : void 0,
|
|
3284
|
-
W(F)["group-title"] ? {
|
|
3285
|
-
name: "title",
|
|
3286
|
-
fn: K(() => [B(t.$slots, "group-title", M({ ref_for: !0 }, or(n)))]),
|
|
3287
|
-
key: "3"
|
|
3288
|
-
} : void 0,
|
|
3289
|
-
W(F)["group-actions"] ? {
|
|
3290
|
-
name: "actions",
|
|
3291
|
-
fn: K(() => [B(t.$slots, "group-actions", M({ ref_for: !0 }, or(n)))]),
|
|
3292
|
-
key: "4"
|
|
3293
|
-
} : void 0
|
|
3294
|
-
]), 1032, [
|
|
3295
|
-
"id",
|
|
3296
|
-
"stuck",
|
|
3297
|
-
"row",
|
|
3298
|
-
"dnd-ref",
|
|
3299
|
-
"dragging",
|
|
3300
|
-
"drop-position",
|
|
3301
|
-
"row-index",
|
|
3302
|
-
"leading-plans",
|
|
3303
|
-
"trailing-plans",
|
|
3304
|
-
"group-column-key",
|
|
3305
|
-
"tree-indent",
|
|
3306
|
-
"count",
|
|
3307
|
-
"total",
|
|
3308
|
-
"title",
|
|
3309
|
-
"extra-row-style",
|
|
3310
|
-
"expanded",
|
|
3311
|
-
"active",
|
|
3312
|
-
"focus-column-key",
|
|
3313
|
-
"treegrid",
|
|
3314
|
-
"onToggle",
|
|
3315
|
-
"onRowClick",
|
|
3316
|
-
"onMenuOpen"
|
|
3317
|
-
])) : n && n.kind === W(Q).DEPTH_FOOTER ? (L(), x(Ke, {
|
|
3318
|
-
key: 2,
|
|
3319
|
-
class: N(["s-ui-table__depth-footer-row", {
|
|
3320
|
-
"s-ui-table__depth-footer-row--stuck": p,
|
|
3321
|
-
"s-ui-table__depth-footer-row--stuck-leaving": m,
|
|
3322
|
-
"s-ui-table__depth-footer-row--stuck-sliding": h,
|
|
3323
|
-
"s-ui-table__depth-footer-row--stuck-covered": g !== void 0,
|
|
3324
|
-
"s-ui-table__depth-footer-row--stuck-covered-far": _
|
|
3325
|
-
}]),
|
|
3326
|
-
style: P(nn(g)),
|
|
3327
|
-
"data-index": n.index,
|
|
3328
|
-
"aria-rowindex": n.index + 2,
|
|
3329
|
-
cells: W(Y),
|
|
3330
|
-
"content-column-key": W(un),
|
|
3331
|
-
"cell-class": "s-ui-table__depth-footer-cell",
|
|
3332
|
-
"content-class": "s-ui-table__depth-footer-content",
|
|
3333
|
-
"content-style": W(kn)(n.depth),
|
|
3334
|
-
section: W($).BODY,
|
|
3335
|
-
"row-key": n.key,
|
|
3336
|
-
"cell-id-prefix": gr,
|
|
3337
|
-
"focus-column-key": vr(n.key)
|
|
3338
|
-
}, {
|
|
3339
|
-
default: K(() => [B(t.$slots, "depth-footer", M({ ref_for: !0 }, W(jn)(n)))]),
|
|
3340
|
-
_: 2
|
|
3341
|
-
}, 1032, [
|
|
3342
|
-
"class",
|
|
3343
|
-
"style",
|
|
3344
|
-
"data-index",
|
|
3345
|
-
"aria-rowindex",
|
|
3346
|
-
"cells",
|
|
3347
|
-
"content-column-key",
|
|
3348
|
-
"content-style",
|
|
3349
|
-
"section",
|
|
3350
|
-
"row-key",
|
|
3351
|
-
"focus-column-key"
|
|
3352
|
-
])) : n && n.kind === W(Q).LOAD_MORE ? (L(), x(Ke, {
|
|
3353
|
-
key: 3,
|
|
3354
|
-
class: "s-ui-table__load-more-row",
|
|
3355
|
-
"data-index": n.index,
|
|
3356
|
-
"aria-rowindex": n.index + 2,
|
|
3357
|
-
cells: W(Y),
|
|
3358
|
-
"content-column-key": W(Cn),
|
|
3359
|
-
"content-class": "s-ui-table__load-more-content",
|
|
3360
|
-
"content-style": W(kn)(n.depth),
|
|
3361
|
-
section: W($).BODY,
|
|
3362
|
-
"row-key": n.key,
|
|
3363
|
-
"cell-id-prefix": gr,
|
|
3364
|
-
"focus-column-key": vr(n.key)
|
|
3138
|
+
} : void 0, U(F)[`header-menu:${c.key}`] ? {
|
|
3139
|
+
name: "menu",
|
|
3140
|
+
fn: G(() => [z(t.$slots, `header-menu:${c.key}`, M({ ref_for: !0 }, U(Lt)(c)))]),
|
|
3141
|
+
key: "1"
|
|
3142
|
+
} : void 0]), 1032, [
|
|
3143
|
+
"descriptor",
|
|
3144
|
+
"sort-direction",
|
|
3145
|
+
"sort-index",
|
|
3146
|
+
"menu-enabled",
|
|
3147
|
+
"menu-open",
|
|
3148
|
+
"onUpdate:menuOpen",
|
|
3149
|
+
"onSortToggle",
|
|
3150
|
+
"onSortSet",
|
|
3151
|
+
"onHide"
|
|
3152
|
+
])) : c.service === U(qe).CHECKBOX ? (I(), x(We, {
|
|
3153
|
+
key: 1,
|
|
3154
|
+
class: N(["s-ui-table__header-checkbox", { "s-ui-table__header-checkbox--active": U(Zt) !== U(Z).UNCHECKED }]),
|
|
3155
|
+
"model-value": U(Zt) === U(Z).CHECKED,
|
|
3156
|
+
indeterminate: U(Zt) === U(Z).INDETERMINATE,
|
|
3157
|
+
"screen-reader-label": U(Zt) === U(Z).CHECKED ? U(te)("table.deselectAll") : U(te)("table.selectAll"),
|
|
3158
|
+
"onUpdate:modelValue": n[0] ||= (e) => U(Xt).toggleSelectAll()
|
|
3159
|
+
}, null, 8, [
|
|
3160
|
+
"class",
|
|
3161
|
+
"model-value",
|
|
3162
|
+
"indeterminate",
|
|
3163
|
+
"screen-reader-label"
|
|
3164
|
+
])) : c.service === U(qe).COLUMNS_MANAGER ? (I(), C("div", Un, [D(U(u), {
|
|
3165
|
+
modelValue: Ut.value,
|
|
3166
|
+
"onUpdate:modelValue": n[1] ||= (e) => Ut.value = e,
|
|
3167
|
+
placement: U(l).BOTTOM_END,
|
|
3168
|
+
shift: "",
|
|
3169
|
+
"fit-viewport": ""
|
|
3170
|
+
}, {
|
|
3171
|
+
trigger: G(({ toggle: e }) => [D(U(o), {
|
|
3172
|
+
class: "s-ui-table__columns-manager-button",
|
|
3173
|
+
appearance: U(i).BARE,
|
|
3174
|
+
variant: U(r).MAIN,
|
|
3175
|
+
size: U(a).SMALL,
|
|
3176
|
+
icon: "tablePlus",
|
|
3177
|
+
"aria-label": U(te)("table.manageColumns"),
|
|
3178
|
+
tabindex: "-1",
|
|
3179
|
+
onClick: (t) => e()
|
|
3180
|
+
}, null, 8, [
|
|
3181
|
+
"appearance",
|
|
3182
|
+
"variant",
|
|
3183
|
+
"size",
|
|
3184
|
+
"aria-label",
|
|
3185
|
+
"onClick"
|
|
3186
|
+
])]),
|
|
3187
|
+
content: G(() => [D(U(d), {
|
|
3188
|
+
class: "s-ui-table__columns-menu",
|
|
3189
|
+
width: 300
|
|
3365
3190
|
}, {
|
|
3366
|
-
default:
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3191
|
+
default: G(() => [z(t.$slots, "columns-menu", {
|
|
3192
|
+
columns: Wt.value,
|
|
3193
|
+
isColumnHidden: Gt,
|
|
3194
|
+
toggleColumn: Jt
|
|
3195
|
+
}, () => [(I(!0), C(y, null, R(qt.value, (e, t) => (I(), C(y, { key: t }, [t > 0 ? (I(), x(U(ue), {
|
|
3196
|
+
key: 0,
|
|
3197
|
+
class: "s-ui-table__columns-separator"
|
|
3198
|
+
})) : S("", !0), (I(!0), C(y, null, R(e, (e) => (I(), x(U(v), {
|
|
3199
|
+
key: e.column.key,
|
|
3200
|
+
class: N(["s-ui-table__columns-item", e.classes]),
|
|
3201
|
+
size: U(_).SMALL,
|
|
3202
|
+
"label-placement": U(g).LEFT,
|
|
3203
|
+
"model-value": !e.hidden,
|
|
3204
|
+
"onUpdate:modelValue": (t) => Jt(e.column.key)
|
|
3373
3205
|
}, {
|
|
3374
|
-
default:
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
"
|
|
3206
|
+
default: G(() => [w("span", Wn, [e.column.icon ? (I(), x(U(le), {
|
|
3207
|
+
key: 0,
|
|
3208
|
+
name: e.column.icon,
|
|
3209
|
+
size: 16
|
|
3210
|
+
}, null, 8, ["name"])) : S("", !0), w("span", Gn, V(e.column.title ?? e.column.key), 1)])]),
|
|
3211
|
+
_: 2
|
|
3212
|
+
}, 1032, [
|
|
3213
|
+
"class",
|
|
3379
3214
|
"size",
|
|
3380
|
-
"
|
|
3381
|
-
"
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
"
|
|
3411
|
-
"
|
|
3412
|
-
|
|
3413
|
-
"
|
|
3414
|
-
"
|
|
3415
|
-
"
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3215
|
+
"label-placement",
|
|
3216
|
+
"model-value",
|
|
3217
|
+
"onUpdate:modelValue"
|
|
3218
|
+
]))), 128))], 64))), 128))])]),
|
|
3219
|
+
_: 3
|
|
3220
|
+
})]),
|
|
3221
|
+
_: 3
|
|
3222
|
+
}, 8, ["modelValue", "placement"])])) : S("", !0), c.resizable ? (I(), C("span", {
|
|
3223
|
+
key: 3,
|
|
3224
|
+
class: N(["s-ui-table__resize-handle", { "s-ui-table__resize-handle--active": U(nt) === c.key }]),
|
|
3225
|
+
role: "separator",
|
|
3226
|
+
"aria-orientation": "vertical",
|
|
3227
|
+
"aria-label": Bt(c),
|
|
3228
|
+
"aria-valuenow": c.width,
|
|
3229
|
+
"aria-valuemin": c.minWidth,
|
|
3230
|
+
"aria-valuemax": c.maxWidth,
|
|
3231
|
+
"aria-valuetext": U(te)("table.columnWidth", { width: String(c.width) }),
|
|
3232
|
+
tabindex: "-1",
|
|
3233
|
+
onPointerdown: (e) => U(rt)(e, c.key),
|
|
3234
|
+
onKeydown: (e) => U(it)(e, c.key),
|
|
3235
|
+
onDblclick: (e) => U(at)(c.key),
|
|
3236
|
+
onClick: n[2] ||= se(() => {}, ["stop"])
|
|
3237
|
+
}, null, 42, Kn)) : S("", !0)], 14, Hn)) : (I(), C("th", Vn))], 64))), 128))])]),
|
|
3238
|
+
w("tbody", qn, [
|
|
3239
|
+
Et.value ? (I(), C("tr", Jn, [w("td", {
|
|
3240
|
+
class: "s-ui-table__empty-cell",
|
|
3241
|
+
colspan: Ae.value
|
|
3242
|
+
}, [w("div", Xn, [z(t.$slots, "empty", {}, () => [w("span", Zn, V(U(te)("table.empty")), 1)])])], 8, Yn)])) : S("", !0),
|
|
3243
|
+
e.loading ? (I(!0), C(y, { key: 1 }, R(e.skeletonRowCount, (e) => (I(), x(sn, {
|
|
3244
|
+
key: `skeleton-${e}`,
|
|
3245
|
+
"leading-plans": U(J),
|
|
3246
|
+
"trailing-plans": U(Y)
|
|
3247
|
+
}, T({ _: 2 }, [U(F)["skeleton-row"] ? {
|
|
3248
|
+
name: "default",
|
|
3249
|
+
fn: G((e) => [z(t.$slots, "skeleton-row", { column: e.descriptor.column })]),
|
|
3250
|
+
key: "0"
|
|
3251
|
+
} : void 0]), 1032, ["leading-plans", "trailing-plans"]))), 128)) : (I(!0), C(y, { key: 2 }, R(on.value, ({ row: n, renderKey: c, spacer: l, spacerHeight: u, rowHeight: d, stuckTop: f, stuckBottom: p, stuckBottomLeaving: m, stuckBottomSliding: h, stuckBottomCoverHeight: g, stuckBottomFar: _, placeholder: v, memoKeys: b }, O, A, ee) => {
|
|
3252
|
+
let L = b;
|
|
3253
|
+
if (ee && ee.el && ee.key === c && k(ee, L)) return ee;
|
|
3254
|
+
let B = (I(), C(y, { key: c }, [l ? (I(), C("tr", Qn, [w("td", {
|
|
3255
|
+
class: "s-ui-table__spacer-cell",
|
|
3256
|
+
colspan: Ae.value,
|
|
3257
|
+
style: P({ height: `${u}px` })
|
|
3258
|
+
}, null, 12, $n)])) : n && n.kind === U(Q).GROUP ? (I(), x(yt, {
|
|
3259
|
+
key: 1,
|
|
3260
|
+
id: ln(n.key),
|
|
3261
|
+
stuck: f,
|
|
3262
|
+
row: n,
|
|
3263
|
+
"dnd-ref": e.rowsDraggable ? gt : void 0,
|
|
3264
|
+
dragging: U(mt) === n.key,
|
|
3265
|
+
"drop-position": _t(n.key),
|
|
3266
|
+
"row-index": n.index,
|
|
3267
|
+
"leading-plans": U(J),
|
|
3268
|
+
"trailing-plans": U(Y),
|
|
3269
|
+
"group-column-key": U(pn),
|
|
3270
|
+
"tree-indent": e.treeIndent,
|
|
3271
|
+
count: U(En)(n),
|
|
3272
|
+
total: U(On)(n),
|
|
3273
|
+
title: U(kn)(n),
|
|
3274
|
+
"extra-row-style": e.rowStyle?.(n.item, n),
|
|
3275
|
+
expanded: n.expanded,
|
|
3276
|
+
active: s.value === n.key,
|
|
3277
|
+
"cell-id-prefix": _r,
|
|
3278
|
+
"focus-column-key": yr(n.key),
|
|
3279
|
+
treegrid: je.value,
|
|
3280
|
+
onToggle: (e) => U(Se)(n.key),
|
|
3281
|
+
onRowClick: (e) => cr(n, e),
|
|
3282
|
+
onMenuOpen: (e) => j("groupMenuOpen", {
|
|
3283
|
+
key: n.key,
|
|
3284
|
+
item: n.item
|
|
3285
|
+
})
|
|
3286
|
+
}, T({ _: 2 }, [
|
|
3287
|
+
U(F)["group-menu"] ? {
|
|
3288
|
+
name: "menu",
|
|
3289
|
+
fn: G(() => [z(t.$slots, "group-menu", M({ ref_for: !0 }, sr(n)))]),
|
|
3290
|
+
key: "0"
|
|
3291
|
+
} : void 0,
|
|
3292
|
+
U(F)["group-row"] ? {
|
|
3293
|
+
name: "row",
|
|
3294
|
+
fn: G(() => [z(t.$slots, "group-row", M({ ref_for: !0 }, sr(n)))]),
|
|
3295
|
+
key: "1"
|
|
3296
|
+
} : void 0,
|
|
3297
|
+
U(F)["group-cell"] ? {
|
|
3298
|
+
name: "group-cell",
|
|
3299
|
+
fn: G((e) => [z(t.$slots, "group-cell", M({ ref_for: !0 }, {
|
|
3300
|
+
...sr(n),
|
|
3301
|
+
...e
|
|
3302
|
+
}))]),
|
|
3303
|
+
key: "2"
|
|
3304
|
+
} : void 0,
|
|
3305
|
+
U(F)["group-title"] ? {
|
|
3306
|
+
name: "title",
|
|
3307
|
+
fn: G(() => [z(t.$slots, "group-title", M({ ref_for: !0 }, sr(n)))]),
|
|
3308
|
+
key: "3"
|
|
3309
|
+
} : void 0,
|
|
3310
|
+
U(F)["group-actions"] ? {
|
|
3311
|
+
name: "actions",
|
|
3312
|
+
fn: G(() => [z(t.$slots, "group-actions", M({ ref_for: !0 }, sr(n)))]),
|
|
3313
|
+
key: "4"
|
|
3314
|
+
} : void 0
|
|
3315
|
+
]), 1032, [
|
|
3316
|
+
"id",
|
|
3317
|
+
"stuck",
|
|
3318
|
+
"row",
|
|
3319
|
+
"dnd-ref",
|
|
3320
|
+
"dragging",
|
|
3321
|
+
"drop-position",
|
|
3322
|
+
"row-index",
|
|
3323
|
+
"leading-plans",
|
|
3324
|
+
"trailing-plans",
|
|
3325
|
+
"group-column-key",
|
|
3326
|
+
"tree-indent",
|
|
3327
|
+
"count",
|
|
3328
|
+
"total",
|
|
3329
|
+
"title",
|
|
3330
|
+
"extra-row-style",
|
|
3331
|
+
"expanded",
|
|
3332
|
+
"active",
|
|
3333
|
+
"focus-column-key",
|
|
3334
|
+
"treegrid",
|
|
3335
|
+
"onToggle",
|
|
3336
|
+
"onRowClick",
|
|
3337
|
+
"onMenuOpen"
|
|
3338
|
+
])) : n && n.kind === U(Q).DEPTH_FOOTER ? (I(), x(Ke, {
|
|
3339
|
+
key: 2,
|
|
3340
|
+
class: N(["s-ui-table__depth-footer-row", {
|
|
3341
|
+
"s-ui-table__depth-footer-row--stuck": p,
|
|
3342
|
+
"s-ui-table__depth-footer-row--stuck-leaving": m,
|
|
3343
|
+
"s-ui-table__depth-footer-row--stuck-sliding": h,
|
|
3344
|
+
"s-ui-table__depth-footer-row--stuck-covered": g !== void 0,
|
|
3345
|
+
"s-ui-table__depth-footer-row--stuck-covered-far": _
|
|
3346
|
+
}]),
|
|
3347
|
+
style: P(an(g)),
|
|
3348
|
+
"data-index": n.index,
|
|
3349
|
+
"aria-rowindex": n.index + 2,
|
|
3350
|
+
cells: U(X),
|
|
3351
|
+
"content-column-key": U(dn),
|
|
3352
|
+
"cell-class": "s-ui-table__depth-footer-cell",
|
|
3353
|
+
"content-class": "s-ui-table__depth-footer-content",
|
|
3354
|
+
"content-style": U(An)(n.depth),
|
|
3355
|
+
section: U($).BODY,
|
|
3356
|
+
"row-key": n.key,
|
|
3357
|
+
"cell-id-prefix": _r,
|
|
3358
|
+
"focus-column-key": yr(n.key)
|
|
3359
|
+
}, {
|
|
3360
|
+
default: G(() => [z(t.$slots, "depth-footer", M({ ref_for: !0 }, U(Mn)(n)))]),
|
|
3361
|
+
_: 2
|
|
3362
|
+
}, 1032, [
|
|
3363
|
+
"class",
|
|
3364
|
+
"style",
|
|
3365
|
+
"data-index",
|
|
3366
|
+
"aria-rowindex",
|
|
3367
|
+
"cells",
|
|
3368
|
+
"content-column-key",
|
|
3369
|
+
"content-style",
|
|
3370
|
+
"section",
|
|
3371
|
+
"row-key",
|
|
3372
|
+
"focus-column-key"
|
|
3373
|
+
])) : n && n.kind === U(Q).LOAD_MORE ? (I(), x(Ke, {
|
|
3374
|
+
key: 3,
|
|
3375
|
+
class: "s-ui-table__load-more-row",
|
|
3376
|
+
"data-index": n.index,
|
|
3377
|
+
"aria-rowindex": n.index + 2,
|
|
3378
|
+
cells: U(X),
|
|
3379
|
+
"content-column-key": U(wn),
|
|
3380
|
+
"content-class": "s-ui-table__load-more-content",
|
|
3381
|
+
"content-style": U(An)(n.depth),
|
|
3382
|
+
section: U($).BODY,
|
|
3383
|
+
"row-key": n.key,
|
|
3384
|
+
"cell-id-prefix": _r,
|
|
3385
|
+
"focus-column-key": yr(n.key)
|
|
3386
|
+
}, {
|
|
3387
|
+
default: G(() => [z(t.$slots, "load-more", M({ ref_for: !0 }, U(Fn)(n)), () => [D(U(o), {
|
|
3388
|
+
appearance: U(i).BARE,
|
|
3389
|
+
variant: U(r).NEUTRAL,
|
|
3390
|
+
size: U(a).SMALL,
|
|
3391
|
+
loading: U(Nn)(n),
|
|
3392
|
+
tabindex: "-1",
|
|
3393
|
+
onClick: (e) => U(Pn)(n)
|
|
3394
|
+
}, {
|
|
3395
|
+
default: G(() => [E(V(U(te)("table.loadMore")), 1)]),
|
|
3396
|
+
_: 1
|
|
3397
|
+
}, 8, [
|
|
3398
|
+
"appearance",
|
|
3399
|
+
"variant",
|
|
3400
|
+
"size",
|
|
3401
|
+
"loading",
|
|
3402
|
+
"onClick"
|
|
3403
|
+
])])]),
|
|
3404
|
+
_: 2
|
|
3405
|
+
}, 1032, [
|
|
3406
|
+
"data-index",
|
|
3407
|
+
"aria-rowindex",
|
|
3408
|
+
"cells",
|
|
3409
|
+
"content-column-key",
|
|
3410
|
+
"content-style",
|
|
3411
|
+
"section",
|
|
3412
|
+
"row-key",
|
|
3413
|
+
"focus-column-key"
|
|
3414
|
+
])) : n && v ? (I(), x(Mt, {
|
|
3415
|
+
key: 4,
|
|
3416
|
+
"row-index": n.index,
|
|
3417
|
+
"row-key": n.key,
|
|
3418
|
+
cells: U(X),
|
|
3419
|
+
"row-height": d
|
|
3420
|
+
}, null, 8, [
|
|
3421
|
+
"row-index",
|
|
3422
|
+
"row-key",
|
|
3423
|
+
"cells",
|
|
3424
|
+
"row-height"
|
|
3425
|
+
])) : n ? (I(), x(rn, {
|
|
3426
|
+
key: 5,
|
|
3427
|
+
row: n,
|
|
3428
|
+
"row-index": n.index,
|
|
3429
|
+
"row-expanded": n.expanded,
|
|
3430
|
+
"leading-plans": U(J),
|
|
3431
|
+
"trailing-plans": U(Y),
|
|
3432
|
+
"dnd-ref": e.rowsDraggable ? gt : void 0,
|
|
3433
|
+
dragging: U(mt) === n.key,
|
|
3434
|
+
"drop-position": _t(n.key),
|
|
3435
|
+
"placeholder-height": d,
|
|
3436
|
+
"dom-id": ln(n.key),
|
|
3437
|
+
selected: Qt(n.key),
|
|
3438
|
+
indeterminate: $t(n.key),
|
|
3439
|
+
"row-selectable": e.selectable && U(Xt).isNodeSelectable(n.key),
|
|
3440
|
+
active: s.value === n.key,
|
|
3441
|
+
disabled: tn(n),
|
|
3442
|
+
"tree-indent": e.treeIndent,
|
|
3443
|
+
"row-state": e.rowState?.(n.item),
|
|
3444
|
+
"row-color": e.rowColor?.(n.item, n),
|
|
3445
|
+
"extra-row-class": e.rowClass?.(n.item, n),
|
|
3446
|
+
"extra-row-style": e.rowStyle?.(n.item, n),
|
|
3447
|
+
"cell-id-prefix": _r,
|
|
3448
|
+
"focus-column-key": yr(n.key),
|
|
3449
|
+
treegrid: je.value,
|
|
3450
|
+
onRowClick: (e) => cr(n, e),
|
|
3451
|
+
onRowContextMenu: (e) => lr(n, e),
|
|
3452
|
+
onCellClick: (e, t) => dr(n, e, t),
|
|
3453
|
+
onToggleExpand: (e) => U(Se)(n.key),
|
|
3454
|
+
onToggleSelected: (e) => en(n.key)
|
|
3455
|
+
}, T({ _: 2 }, [
|
|
3456
|
+
R(cn.value, (e) => ({
|
|
3457
|
+
name: e,
|
|
3458
|
+
fn: G((n) => [z(t.$slots, e, M({ ref_for: !0 }, n))])
|
|
3459
|
+
})),
|
|
3460
|
+
U(F).chevron ? {
|
|
3461
|
+
name: "chevron",
|
|
3462
|
+
fn: G((e) => [z(t.$slots, "chevron", M({ ref_for: !0 }, e))]),
|
|
3463
|
+
key: "0"
|
|
3464
|
+
} : void 0,
|
|
3465
|
+
U(F)["cell-actions"] ? {
|
|
3466
|
+
name: "cell-actions",
|
|
3467
|
+
fn: G((e) => [z(t.$slots, "cell-actions", M({ ref_for: !0 }, e))]),
|
|
3468
|
+
key: "1"
|
|
3469
|
+
} : void 0,
|
|
3470
|
+
U(F).indicator ? {
|
|
3471
|
+
name: "indicator",
|
|
3472
|
+
fn: G((e) => [z(t.$slots, "indicator", M({ ref_for: !0 }, e))]),
|
|
3473
|
+
key: "2"
|
|
3474
|
+
} : void 0,
|
|
3475
|
+
U(F).checkbox ? {
|
|
3476
|
+
name: "checkbox",
|
|
3477
|
+
fn: G((e) => [z(t.$slots, "checkbox", M({ ref_for: !0 }, e))]),
|
|
3478
|
+
key: "3"
|
|
3479
|
+
} : void 0,
|
|
3480
|
+
U(F)["right-edge"] ? {
|
|
3481
|
+
name: "right-edge",
|
|
3482
|
+
fn: G((e) => [z(t.$slots, "right-edge", M({ ref_for: !0 }, e))]),
|
|
3483
|
+
key: "4"
|
|
3484
|
+
} : void 0
|
|
3485
|
+
]), 1032, /* @__PURE__ */ "row.row-index.row-expanded.leading-plans.trailing-plans.dnd-ref.dragging.drop-position.placeholder-height.dom-id.selected.indeterminate.row-selectable.active.disabled.tree-indent.row-state.row-color.extra-row-class.extra-row-style.focus-column-key.treegrid.onRowClick.onRowContextMenu.onCellClick.onToggleExpand.onToggleSelected".split("."))) : S("", !0)], 64));
|
|
3486
|
+
return B.memo = L, B;
|
|
3487
|
+
}, n, 3), 128)),
|
|
3488
|
+
e.loadingMore && !e.loading ? (I(!0), C(y, { key: 3 }, R(Math.min(3, e.skeletonRowCount), (e) => (I(), x(sn, {
|
|
3489
|
+
key: `skeleton-more-${e}`,
|
|
3490
|
+
"leading-plans": U(J),
|
|
3491
|
+
"trailing-plans": U(Y)
|
|
3492
|
+
}, T({ _: 2 }, [U(F)["skeleton-row"] ? {
|
|
3493
|
+
name: "default",
|
|
3494
|
+
fn: G((e) => [z(t.$slots, "skeleton-row", { column: e.descriptor.column })]),
|
|
3495
|
+
key: "0"
|
|
3496
|
+
} : void 0]), 1032, ["leading-plans", "trailing-plans"]))), 128)) : S("", !0)
|
|
3497
|
+
]),
|
|
3498
|
+
e.creationRow || e.footerValues ? (I(), C("tfoot", er, [e.creationRow ? (I(), x(Ke, {
|
|
3499
|
+
key: 0,
|
|
3500
|
+
class: "s-ui-table__create-row",
|
|
3501
|
+
"aria-rowindex": U(q).length + 2,
|
|
3502
|
+
cells: U(X),
|
|
3503
|
+
"content-column-key": U(gn),
|
|
3504
|
+
"cell-class": "s-ui-table__create-cell",
|
|
3505
|
+
"content-class": "s-ui-table__create-content",
|
|
3506
|
+
section: U($).CREATION,
|
|
3507
|
+
"cell-id-prefix": vr,
|
|
3508
|
+
"focus-column-key": br(U($).CREATION)
|
|
3509
|
+
}, {
|
|
3510
|
+
default: G(() => [z(t.$slots, "creation-row")]),
|
|
3511
|
+
_: 3
|
|
3512
|
+
}, 8, [
|
|
3513
|
+
"aria-rowindex",
|
|
3514
|
+
"cells",
|
|
3515
|
+
"content-column-key",
|
|
3516
|
+
"section",
|
|
3517
|
+
"focus-column-key"
|
|
3518
|
+
])) : S("", !0), e.footerValues ? (I(), C("tr", {
|
|
3519
|
+
key: 1,
|
|
3520
|
+
class: "s-ui-table__aggregate-row",
|
|
3521
|
+
"aria-rowindex": U(q).length + 2 + +!!e.creationRow
|
|
3522
|
+
}, [(I(!0), C(y, null, R(U(X), ({ key: e, cellPlan: n }) => (I(), C(y, { key: e }, [n ? (I(), C("td", {
|
|
3523
|
+
key: 1,
|
|
3524
|
+
id: hr({
|
|
3525
|
+
section: U($).AGGREGATE,
|
|
3526
|
+
columnKey: n.descriptor.key
|
|
3527
|
+
}),
|
|
3528
|
+
class: N(["s-ui-table__aggregate-cell", [n.cellClass, U(ar)(n.descriptor.key)]]),
|
|
3529
|
+
style: P(n.style),
|
|
3530
|
+
"aria-colindex": n.descriptor.colIndex,
|
|
3531
|
+
"data-column-key": n.descriptor.key,
|
|
3532
|
+
"data-section": U($).AGGREGATE,
|
|
3533
|
+
tabindex: xr(U($).AGGREGATE, void 0, n.descriptor.key)
|
|
3534
|
+
}, [n.descriptor.column ? (I(), C(y, { key: 0 }, [U(F)[`footer:${n.descriptor.key}`] ? z(t.$slots, `footer:${n.descriptor.key}`, M({
|
|
3535
|
+
key: 0,
|
|
3536
|
+
ref_for: !0
|
|
3537
|
+
}, U(or)(n.descriptor.key))) : (I(), C("span", ir, V(U(In)(n.descriptor.key)), 1))], 64)) : S("", !0)], 14, rr)) : (I(), C("td", nr))], 64))), 128))], 8, tr)) : S("", !0)])) : S("", !0)
|
|
3538
|
+
], 44, Rn)], 4),
|
|
3539
|
+
w("span", {
|
|
3540
|
+
ref_key: "gridExitRef",
|
|
3541
|
+
ref: ce,
|
|
3542
|
+
class: "s-ui-table__grid-exit",
|
|
3543
|
+
tabindex: "-1",
|
|
3544
|
+
"aria-hidden": "true"
|
|
3545
|
+
}, null, 512),
|
|
3546
|
+
U(ut) ? (I(), C("div", {
|
|
3514
3547
|
key: 0,
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
style: P(W(lt)),
|
|
3521
|
-
"aria-hidden": "true"
|
|
3522
|
-
}, null, 4)) : S("", !0)], 6));
|
|
3548
|
+
class: "s-ui-table__column-drop-line",
|
|
3549
|
+
style: P(U(ut)),
|
|
3550
|
+
"aria-hidden": "true"
|
|
3551
|
+
}, null, 4)) : S("", !0)
|
|
3552
|
+
], 6));
|
|
3523
3553
|
}
|
|
3524
3554
|
});
|
|
3525
3555
|
//#endregion
|
|
3526
|
-
export { J as a, je as c, Ae as d, Pe as f, Y as i, Ne as l, Me as n, Fe as o, X as p, Z as r, Ie as s,
|
|
3556
|
+
export { J as a, je as c, Ae as d, Pe as f, Y as i, Ne as l, Me as n, Fe as o, X as p, Z as r, Ie as s, ar as t, Q as u };
|