@shtabapp/ui-kit 1.71.2 → 1.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -1
- package/dist/STable-BHTC8_Gq.cjs +1 -0
- package/dist/{STable-1Bfr6VLH.js → STable-DpH_h2-n.js} +701 -682
- package/dist/components/SBanner/SBanner.types.d.ts +2 -0
- package/dist/components/SBanner/SBanner.types.d.ts.map +1 -1
- package/dist/components/SBanner/SBanner.vue.d.ts.map +1 -1
- package/dist/components/SNotification/SNotification.types.d.ts +2 -0
- package/dist/components/SNotification/SNotification.types.d.ts.map +1 -1
- package/dist/components/SNotification/SNotification.vue.d.ts.map +1 -1
- package/dist/components/STable/STable.types.d.ts +14 -0
- package/dist/components/STable/STable.types.d.ts.map +1 -1
- package/dist/components/STable/STable.vue.d.ts.map +1 -1
- package/dist/components/STable/parts/STableHeaderCell.vue.d.ts.map +1 -1
- package/dist/components/STable/utils/useTableColumns.d.ts.map +1 -1
- package/dist/components/STable/utils/useTableRowDnd.d.ts.map +1 -1
- package/dist/components/STable/utils/useTableStickyRows.d.ts +2 -1
- package/dist/components/STable/utils/useTableStickyRows.d.ts.map +1 -1
- package/dist/components/STag/STag.types.d.ts +1 -1
- package/dist/components/STag/STag.types.d.ts.map +1 -1
- package/dist/entries/table.cjs +1 -1
- package/dist/entries/table.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +220 -192
- package/dist/uikit-components.css +1 -1
- package/package.json +1 -1
- package/dist/STable-uR69d9kL.cjs +0 -1
|
@@ -8,21 +8,21 @@ 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
9
|
import { t as h } from "./SListItem-BOSQGRWA.js";
|
|
10
10
|
import { n as g, r as _, t as v } from "./SToggle-sGw-LSNd.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
|
|
12
|
-
import { ESSkeletonType as
|
|
13
|
-
import { tryOnScopeDispose as
|
|
14
|
-
import { elementScroll as
|
|
15
|
-
import { combine as
|
|
16
|
-
import { draggable as
|
|
17
|
-
import { setCustomNativeDragPreview as
|
|
18
|
-
import { pointerOutsideOfPreview as
|
|
19
|
-
import { attachClosestEdge as
|
|
20
|
-
import { disableNativeDragPreview as
|
|
21
|
-
import { autoScrollForElements 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 I, openBlock as L, ref as R, renderList as z, renderSlot as B, shallowRef as V, toDisplayString as H, toRaw as te, toValue as U, unref as W, useId as ne, useModel as re, useSlots as ie, useTemplateRef as ae, watch as G, withCtx as K, withModifiers as oe } from "vue";
|
|
12
|
+
import { ESSkeletonType as se, SIcon as ce, SSeparator as le, SSkeleton as ue, useUiKitI18n as de } from "@shtabapp/ui-kit-primitives";
|
|
13
|
+
import { tryOnScopeDispose as fe, useElementSize as pe, useEventListener as me, useRafFn as he, useResizeObserver as ge, useTimeoutFn as _e } from "@vueuse/core";
|
|
14
|
+
import { elementScroll as ve, observeElementOffset as ye, useVirtualizer as be } from "@tanstack/vue-virtual";
|
|
15
|
+
import { combine as q } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
|
16
|
+
import { draggable as xe, dropTargetForElements as Se, monitorForElements as Ce } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
|
17
|
+
import { setCustomNativeDragPreview as we } from "@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview";
|
|
18
|
+
import { pointerOutsideOfPreview as Te } from "@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview";
|
|
19
|
+
import { attachClosestEdge as Ee, extractClosestEdge as De } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
|
|
20
|
+
import { disableNativeDragPreview as Oe } from "@atlaskit/pragmatic-drag-and-drop/element/disable-native-drag-preview";
|
|
21
|
+
import { autoScrollForElements as ke } from "@atlaskit/pragmatic-drag-and-drop-auto-scroll/element";
|
|
22
22
|
//#region src/components/STable/STable.types.ts
|
|
23
|
-
var
|
|
23
|
+
var J = /* @__PURE__ */ function(e) {
|
|
24
24
|
return e.LEFT = "left", e.RIGHT = "right", e;
|
|
25
|
-
}({}),
|
|
25
|
+
}({}), Y = /* @__PURE__ */ function(e) {
|
|
26
26
|
return e.LEFT = "left", e.CENTER = "center", e.RIGHT = "right", e;
|
|
27
27
|
}({}), X = /* @__PURE__ */ function(e) {
|
|
28
28
|
return e.ASC = "asc", e.DESC = "desc", e;
|
|
@@ -61,20 +61,20 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
61
61
|
}),
|
|
62
62
|
emits: ["update:modelValue"],
|
|
63
63
|
setup(e) {
|
|
64
|
-
let t =
|
|
65
|
-
return
|
|
64
|
+
let t = re(e, "modelValue"), n = ae("checkboxRef");
|
|
65
|
+
return G([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) => (L(), x(W(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: W(s).EXTRA_SMALL
|
|
78
78
|
}, null, 8, [
|
|
79
79
|
"modelValue",
|
|
80
80
|
"indeterminate",
|
|
@@ -102,23 +102,23 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
102
102
|
focusColumnKey: {}
|
|
103
103
|
},
|
|
104
104
|
setup(e) {
|
|
105
|
-
return (t, n) => (
|
|
105
|
+
return (t, n) => (L(), C("tr", null, [(L(!0), C(y, null, z(e.cells, ({ key: n, cellPlan: r }) => (L(), C(y, { key: n }, [r ? (L(), C("td", {
|
|
106
106
|
key: 1,
|
|
107
107
|
id: `${e.cellIdPrefix}${e.rowKey ?? ""}-${r.descriptor.key}`,
|
|
108
|
-
class:
|
|
109
|
-
style:
|
|
108
|
+
class: N([r.cellClass, e.cellClass]),
|
|
109
|
+
style: P(r.style),
|
|
110
110
|
"aria-colindex": r.descriptor.colIndex,
|
|
111
111
|
"data-column-key": r.descriptor.key,
|
|
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 ? (L(), C("div", {
|
|
116
116
|
key: 0,
|
|
117
|
-
class:
|
|
118
|
-
style:
|
|
119
|
-
}, [
|
|
117
|
+
class: N(e.contentClass),
|
|
118
|
+
style: P(e.contentStyle)
|
|
119
|
+
}, [B(t.$slots, "default")], 6)) : S("", !0)], 14, Ge)) : (L(), C("td", {
|
|
120
120
|
key: 0,
|
|
121
|
-
class:
|
|
121
|
+
class: N([
|
|
122
122
|
"s-ui-table__cell",
|
|
123
123
|
"s-ui-table__filler-cell",
|
|
124
124
|
e.cellClass
|
|
@@ -133,16 +133,16 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
133
133
|
checkbox: "checkbox",
|
|
134
134
|
rightEdge: "right-edge",
|
|
135
135
|
columnsManager: "columns-manager"
|
|
136
|
-
}, Ye = new Set(["rightEdge", "columnsManager"]), Xe = (e) => Ye.has(e) ?
|
|
136
|
+
}, Ye = new Set(["rightEdge", "columnsManager"]), Xe = (e) => Ye.has(e) ? J.RIGHT : J.LEFT, Ze = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "-"), Qe = (e) => `--s-ui-table-col-w-${Ze(e)}`, $e = (e) => `--s-ui-table-sticky-${Ze(e)}`, et = (e) => `--s-ui-table-live-w-${Ze(e)}`, tt = (e) => `--s-ui-table-live-sticky-${Ze(e)}`, nt = (e, t) => e.maxWidth === void 0 ? Infinity : Math.max(0, e.maxWidth - e.baseWidth - t), rt = (e, t, n) => {
|
|
137
137
|
let r = e.reduce((e, t) => e + t.baseWidth, 0), i = 0;
|
|
138
138
|
return e.forEach((a, o) => {
|
|
139
139
|
let s = o === e.length - 1 ? t - i : Math.floor(t * a.baseWidth / r), c = n.get(a.key) ?? 0, l = Math.min(s, nt(a, c));
|
|
140
140
|
n.set(a.key, c + l), i += l;
|
|
141
141
|
}), t - i;
|
|
142
142
|
}, it = (e) => e ? 430 : 160, at = (e) => {
|
|
143
|
-
let t = e.filter((e) => e.sticky ===
|
|
143
|
+
let t = e.filter((e) => e.sticky === J.LEFT), n = t[t.length - 1];
|
|
144
144
|
n && (n.lastStickyLeft = !0);
|
|
145
|
-
let r = e.find((e) => e.sticky ===
|
|
145
|
+
let r = e.find((e) => e.sticky === J.RIGHT);
|
|
146
146
|
r && (r.firstStickyRight = !0);
|
|
147
147
|
}, ot = (e, t) => {
|
|
148
148
|
let n = /* @__PURE__ */ new Map(), r = t;
|
|
@@ -165,10 +165,10 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
165
165
|
});
|
|
166
166
|
}, ct = ({ columns: e, columnOrder: t, columnWidths: n, hiddenColumns: r, hasIndicator: i, hasCheckbox: a, hasRightEdge: o, hasColumnsManager: s, columnsResizable: c, columnsDraggable: l, viewportWidth: u }) => {
|
|
167
167
|
let d = b(() => {
|
|
168
|
-
let t =
|
|
168
|
+
let t = U(e);
|
|
169
169
|
return t.find((e) => e.primary)?.key ?? t[0]?.key;
|
|
170
170
|
}), f = b(() => {
|
|
171
|
-
let n =
|
|
171
|
+
let n = U(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) => {
|
|
@@ -181,14 +181,15 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
181
181
|
let t = o.get(e);
|
|
182
182
|
t && (e !== d.value && i.has(e) || c.push(t));
|
|
183
183
|
});
|
|
184
|
-
let l = [], u = [], f = [], p = [];
|
|
184
|
+
let l = [], u = [], f = [], p = [], m = [];
|
|
185
185
|
return c.forEach((e) => {
|
|
186
|
-
e.key === d.value ? l.push(e) : e.sticky ===
|
|
186
|
+
e.key === d.value ? u.push(e) : e.leading ? l.push(e) : e.sticky === J.LEFT ? f.push(e) : e.sticky === J.RIGHT ? m.push(e) : p.push(e);
|
|
187
187
|
}), [
|
|
188
188
|
...l,
|
|
189
189
|
...u,
|
|
190
190
|
...f,
|
|
191
|
-
...p
|
|
191
|
+
...p,
|
|
192
|
+
...m
|
|
192
193
|
];
|
|
193
194
|
}), p = (e, t) => {
|
|
194
195
|
let r = n.value?.[e.key];
|
|
@@ -200,12 +201,12 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
200
201
|
flexible: !1
|
|
201
202
|
} : {
|
|
202
203
|
baseWidth: it(t),
|
|
203
|
-
flexible: e.sticky !==
|
|
204
|
+
flexible: e.sticky !== J.RIGHT
|
|
204
205
|
};
|
|
205
206
|
}, m = (e) => {
|
|
206
|
-
|
|
207
|
+
U(o) && e("rightEdge", 40), U(s) && e("columnsManager", 32);
|
|
207
208
|
}, h = b(() => {
|
|
208
|
-
let e = [], t =
|
|
209
|
+
let e = [], t = U(c), n = U(l), r = (t, n) => {
|
|
209
210
|
let r = Xe(t);
|
|
210
211
|
e.push({
|
|
211
212
|
key: `__s-ui-table-${t}`,
|
|
@@ -216,7 +217,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
216
217
|
minWidth: n,
|
|
217
218
|
maxWidth: n,
|
|
218
219
|
sticky: r,
|
|
219
|
-
align:
|
|
220
|
+
align: Y.LEFT,
|
|
220
221
|
primary: !1,
|
|
221
222
|
resizable: !1,
|
|
222
223
|
draggable: !1,
|
|
@@ -231,46 +232,46 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
231
232
|
firstStickyRight: !1
|
|
232
233
|
});
|
|
233
234
|
};
|
|
234
|
-
|
|
235
|
-
let i = r.key === d.value, a = i ?
|
|
235
|
+
U(i) && r("indicator", 2), U(a) && r("checkbox", 24), f.value.forEach((r) => {
|
|
236
|
+
let i = r.key === d.value, a = !!r.leading && !i, o = i || a ? J.LEFT : r.sticky, { baseWidth: s, flexible: c } = p(r, i);
|
|
236
237
|
e.push({
|
|
237
238
|
key: r.key,
|
|
238
239
|
column: r,
|
|
239
|
-
width:
|
|
240
|
-
baseWidth:
|
|
241
|
-
flexible:
|
|
240
|
+
width: s,
|
|
241
|
+
baseWidth: s,
|
|
242
|
+
flexible: c,
|
|
242
243
|
minWidth: r.minWidth ?? 60,
|
|
243
244
|
maxWidth: r.maxWidth,
|
|
244
|
-
sticky:
|
|
245
|
-
align: r.align ??
|
|
245
|
+
sticky: o,
|
|
246
|
+
align: r.align ?? Y.LEFT,
|
|
246
247
|
primary: i,
|
|
247
248
|
resizable: t && (r.resizable ?? !0),
|
|
248
|
-
draggable: n && !i && (r.draggable ?? !0),
|
|
249
|
+
draggable: n && !i && !a && (r.draggable ?? !0),
|
|
249
250
|
sortable: r.sortable ?? !1,
|
|
250
|
-
hideable: !i && (r.hideable ?? !0),
|
|
251
|
+
hideable: !i && !a && (r.hideable ?? !0),
|
|
251
252
|
colIndex: 0,
|
|
252
253
|
widthVar: Qe(r.key),
|
|
253
254
|
liveWidthVar: et(r.key),
|
|
254
|
-
stickyOffsetVar:
|
|
255
|
-
liveStickyOffsetVar:
|
|
255
|
+
stickyOffsetVar: o ? $e(r.key) : void 0,
|
|
256
|
+
liveStickyOffsetVar: o ? tt(r.key) : void 0,
|
|
256
257
|
lastStickyLeft: !1,
|
|
257
258
|
firstStickyRight: !1
|
|
258
259
|
});
|
|
259
260
|
}), m(r);
|
|
260
261
|
let o = 0;
|
|
261
262
|
return e.forEach((e) => {
|
|
262
|
-
e.sticky !==
|
|
263
|
+
e.sticky !== J.RIGHT && (o += 1, e.colIndex = o);
|
|
263
264
|
}), e.forEach((e) => {
|
|
264
|
-
e.sticky ===
|
|
265
|
+
e.sticky === J.RIGHT && (o += 1, e.colIndex = o);
|
|
265
266
|
}), at(e), e;
|
|
266
|
-
}), g = b(() => st(h.value,
|
|
267
|
+
}), g = b(() => st(h.value, U(u))), _ = b(() => g.value.reduce((e, t) => e + t.width, 0)), v = b(() => {
|
|
267
268
|
let e = {}, t = 0;
|
|
268
269
|
g.value.forEach((n) => {
|
|
269
|
-
e[n.widthVar] = `${n.width}px`, n.sticky ===
|
|
270
|
+
e[n.widthVar] = `${n.width}px`, n.sticky === J.LEFT && n.stickyOffsetVar && (e[n.stickyOffsetVar] = `${t}px`, t += n.width);
|
|
270
271
|
});
|
|
271
272
|
let n = 0;
|
|
272
273
|
return [...g.value].reverse().forEach((t) => {
|
|
273
|
-
t.sticky ===
|
|
274
|
+
t.sticky === J.RIGHT && t.stickyOffsetVar && (e[t.stickyOffsetVar] = `${n}px`, n += t.width);
|
|
274
275
|
}), e;
|
|
275
276
|
});
|
|
276
277
|
return {
|
|
@@ -285,7 +286,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
285
286
|
}, $ = /* @__PURE__ */ function(e) {
|
|
286
287
|
return e.HEADER = "h", e.BODY = "b", e.CREATION = "c", e.AGGREGATE = "a", e;
|
|
287
288
|
}({}), lt = "button, a[href], input, select, textarea, [tabindex]", ut = Object.values($), dt = (e) => ut.find((t) => t === e), ft = ({ tableRootElement: e, tableElement: t, scrollElement: n, columnDescriptors: r, flatRows: i, snapshot: a, groupColumnKey: o, depthFooterColumnKey: s, loadMoreColumnKey: c, creationColumnKey: l, hasCreationRow: u, hasAggregateRow: d, isRowNavigable: f, pageSize: p, buildCellDomId: m, onBodyRowFocused: h, scrollToRowIndex: g }) => {
|
|
288
|
-
let _ =
|
|
289
|
+
let _ = V(), v = V(), y = V(!1), x = V(0), S = b(() => r.value.filter((e) => e.service !== qe.INDICATOR).map((e) => e.key)), C = b(() => r.value.filter((e) => e.service !== qe.INDICATOR && e.service !== qe.COLUMNS_MANAGER).map((e) => e.key)), w = (e) => {
|
|
289
290
|
if (!e) return;
|
|
290
291
|
let t = a.value.getRowIndexByKey(e);
|
|
291
292
|
return t === void 0 ? void 0 : i.value[t];
|
|
@@ -293,18 +294,18 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
293
294
|
if (e.kind === Q.ROW) return C.value;
|
|
294
295
|
let t = {
|
|
295
296
|
[Q.ROW]: void 0,
|
|
296
|
-
[Q.GROUP]:
|
|
297
|
-
[Q.DEPTH_FOOTER]:
|
|
298
|
-
[Q.LOAD_MORE]:
|
|
297
|
+
[Q.GROUP]: U(o),
|
|
298
|
+
[Q.DEPTH_FOOTER]: U(s),
|
|
299
|
+
[Q.LOAD_MORE]: U(c)
|
|
299
300
|
}[e.kind];
|
|
300
301
|
return t ? [t] : [];
|
|
301
302
|
}, E = (e) => {
|
|
302
303
|
if (e.section === "h") return S.value;
|
|
303
304
|
if (e.section === "c") {
|
|
304
|
-
let e =
|
|
305
|
-
return
|
|
305
|
+
let e = U(l);
|
|
306
|
+
return U(u) && e ? [e] : [];
|
|
306
307
|
}
|
|
307
|
-
if (e.section === "a") return
|
|
308
|
+
if (e.section === "a") return U(d) ? C.value : [];
|
|
308
309
|
let t = w(e.rowKey);
|
|
309
310
|
return t && f(t) ? T(t) : [];
|
|
310
311
|
}, D = (e, t) => {
|
|
@@ -327,13 +328,13 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
327
328
|
...e,
|
|
328
329
|
columnKey: D(t, e.columnKey)
|
|
329
330
|
};
|
|
330
|
-
}), A = b(() => i.value.length), j = b(() => A.value + +!!
|
|
331
|
+
}), A = b(() => i.value.length), j = b(() => A.value + +!!U(u) + +!!U(d)), M = (e) => {
|
|
331
332
|
if (e.section === "h") return 0;
|
|
332
333
|
if (e.section === "c") return A.value + 1;
|
|
333
|
-
if (e.section === "a") return A.value + 1 + +!!
|
|
334
|
+
if (e.section === "a") return A.value + 1 + +!!U(u);
|
|
334
335
|
let t = e.rowKey === void 0 ? void 0 : a.value.getRowIndexByKey(e.rowKey);
|
|
335
336
|
return t === void 0 ? void 0 : t + 1;
|
|
336
|
-
},
|
|
337
|
+
}, N = (e, t) => {
|
|
337
338
|
if (e <= 0) return {
|
|
338
339
|
section: "h",
|
|
339
340
|
columnKey: D(S.value, t)
|
|
@@ -348,26 +349,26 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
348
349
|
columnKey: D(r, t)
|
|
349
350
|
};
|
|
350
351
|
}
|
|
351
|
-
if (
|
|
352
|
-
let e =
|
|
352
|
+
if (U(u) && e === A.value + 1) {
|
|
353
|
+
let e = U(l);
|
|
353
354
|
return e ? {
|
|
354
355
|
section: "c",
|
|
355
356
|
columnKey: e
|
|
356
357
|
} : void 0;
|
|
357
358
|
}
|
|
358
|
-
if (
|
|
359
|
+
if (U(d) && e === j.value) return {
|
|
359
360
|
section: "a",
|
|
360
361
|
columnKey: D(S.value, t)
|
|
361
362
|
};
|
|
362
|
-
},
|
|
363
|
+
}, P = (e, t) => {
|
|
363
364
|
let n = e;
|
|
364
365
|
for (; n >= 0 && n <= j.value;) {
|
|
365
|
-
let e =
|
|
366
|
+
let e = N(n, v.value);
|
|
366
367
|
if (e) return e;
|
|
367
368
|
n += t;
|
|
368
369
|
}
|
|
369
|
-
},
|
|
370
|
-
let t = n.value, r =
|
|
370
|
+
}, F = (e) => document.getElementById(m(e)) ?? void 0, I = () => F(k.value), L = () => {
|
|
371
|
+
let t = n.value, r = I();
|
|
371
372
|
if (!t || !r || r.classList.contains("s-ui-table__cell--sticky-left") || r.classList.contains("s-ui-table__cell--sticky-right")) return;
|
|
372
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");
|
|
373
374
|
c && (o = Math.max(o, c.getBoundingClientRect().right));
|
|
@@ -379,72 +380,72 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
379
380
|
return;
|
|
380
381
|
}
|
|
381
382
|
u.right > s && (t.scrollLeft += u.right - s);
|
|
382
|
-
},
|
|
383
|
+
}, R = (e, t) => {
|
|
383
384
|
_.value = e, t && (v.value = e.columnKey);
|
|
384
385
|
let n = M(e);
|
|
385
386
|
n !== void 0 && (x.value = n);
|
|
386
|
-
},
|
|
387
|
+
}, z = (e, t) => {
|
|
387
388
|
let n = E(e), r = n.length > 0 && !n.includes(e.columnKey) ? {
|
|
388
389
|
...e,
|
|
389
390
|
columnKey: D(n, e.columnKey)
|
|
390
391
|
} : e;
|
|
391
|
-
if (
|
|
392
|
+
if (R(r, t?.updateDesired ?? !0), y.value = !1, r.section === "b" && r.rowKey) {
|
|
392
393
|
h(r.rowKey);
|
|
393
394
|
let e = a.value.getRowIndexByKey(r.rowKey);
|
|
394
395
|
(t?.scroll ?? !0) && e !== void 0 && g(e);
|
|
395
396
|
}
|
|
396
|
-
t?.focusElement !== !1 &&
|
|
397
|
-
|
|
397
|
+
t?.focusElement !== !1 && ee(() => {
|
|
398
|
+
I()?.focus({ preventScroll: !0 }), L();
|
|
398
399
|
});
|
|
399
|
-
},
|
|
400
|
+
}, B = (e, t) => {
|
|
400
401
|
let n = k.value;
|
|
401
402
|
if (t !== 0) {
|
|
402
403
|
let e = E(n), r = e[e.indexOf(n.columnKey) + t];
|
|
403
|
-
r &&
|
|
404
|
+
r && z({
|
|
404
405
|
...n,
|
|
405
406
|
columnKey: r
|
|
406
407
|
});
|
|
407
408
|
return;
|
|
408
409
|
}
|
|
409
410
|
if (e === 0) return;
|
|
410
|
-
let r = e > 0 ? 1 : -1, i =
|
|
411
|
-
i &&
|
|
412
|
-
},
|
|
411
|
+
let r = e > 0 ? 1 : -1, i = P((M(n) ?? x.value) + r, r);
|
|
412
|
+
i && z(i, { updateDesired: !1 });
|
|
413
|
+
}, H = (e) => {
|
|
413
414
|
let t = k.value, n = E(t), r = e === "start" ? n[0] : n[n.length - 1];
|
|
414
|
-
r &&
|
|
415
|
+
r && z({
|
|
415
416
|
...t,
|
|
416
417
|
columnKey: r
|
|
417
418
|
});
|
|
418
|
-
},
|
|
419
|
-
let t = e === "first" ?
|
|
419
|
+
}, te = (e) => {
|
|
420
|
+
let t = e === "first" ? P(0, 1) : P(j.value, -1);
|
|
420
421
|
if (!t) return;
|
|
421
422
|
let n = E(t), r = e === "first" ? n[0] : n[n.length - 1];
|
|
422
|
-
|
|
423
|
+
z(r ? {
|
|
423
424
|
...t,
|
|
424
425
|
columnKey: r
|
|
425
426
|
} : t);
|
|
426
|
-
},
|
|
427
|
-
let t = M(k.value) ?? x.value, n = Math.max(1, Math.round(
|
|
428
|
-
i &&
|
|
429
|
-
},
|
|
427
|
+
}, W = (e) => {
|
|
428
|
+
let t = M(k.value) ?? x.value, n = Math.max(1, Math.round(U(p))), r = Math.min(j.value, Math.max(0, t + e * n)), i = P(r, e) ?? P(r, e === 1 ? -1 : 1);
|
|
429
|
+
i && z(i, { updateDesired: !1 });
|
|
430
|
+
}, ne = (e) => {
|
|
430
431
|
let t = [];
|
|
431
432
|
return e.querySelectorAll(lt).forEach((e) => {
|
|
432
433
|
!(e instanceof HTMLElement) || e.offsetParent === null || e.hasAttribute("disabled") || e.closest("[aria-hidden=\"true\"]") || t.push(e);
|
|
433
434
|
}), t;
|
|
434
|
-
}, ne = () => {
|
|
435
|
-
let e = L(), t = e ? te(e)[0] : void 0;
|
|
436
|
-
return t ? (y.value = !0, t.focus(), !0) : !1;
|
|
437
435
|
}, re = () => {
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
436
|
+
let e = I(), t = e ? ne(e)[0] : void 0;
|
|
437
|
+
return t ? (y.value = !0, t.focus(), !0) : !1;
|
|
438
|
+
}, ie = () => {
|
|
439
|
+
y.value = !1, I()?.focus({ preventScroll: !0 });
|
|
440
|
+
}, ae = (e) => {
|
|
441
|
+
let t = I(), n = t ? ne(t) : [];
|
|
441
442
|
if (n.length === 0) return;
|
|
442
443
|
let r = document.activeElement, i = n.findIndex((e) => e === r || r instanceof Node && e.contains(r));
|
|
443
444
|
n[i === -1 ? e === 1 ? 0 : n.length - 1 : (i + e + n.length) % n.length]?.focus();
|
|
444
|
-
},
|
|
445
|
+
}, K = () => {
|
|
445
446
|
let e = k.value, n = E(e);
|
|
446
447
|
if (n.length > 0) {
|
|
447
|
-
|
|
448
|
+
z({
|
|
448
449
|
...e,
|
|
449
450
|
columnKey: D(n, v.value)
|
|
450
451
|
}, {
|
|
@@ -453,16 +454,16 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
453
454
|
});
|
|
454
455
|
return;
|
|
455
456
|
}
|
|
456
|
-
let r = Math.min(x.value, j.value), i =
|
|
457
|
+
let r = Math.min(x.value, j.value), i = P(r, -1) ?? P(r, 1);
|
|
457
458
|
if (i) {
|
|
458
|
-
|
|
459
|
+
z(i, {
|
|
459
460
|
scroll: !1,
|
|
460
461
|
updateDesired: !1
|
|
461
462
|
});
|
|
462
463
|
return;
|
|
463
464
|
}
|
|
464
465
|
if (S.value.length > 0) {
|
|
465
|
-
|
|
466
|
+
z(O.value, {
|
|
466
467
|
scroll: !1,
|
|
467
468
|
updateDesired: !1
|
|
468
469
|
});
|
|
@@ -470,43 +471,43 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
470
471
|
}
|
|
471
472
|
t.value?.focus();
|
|
472
473
|
};
|
|
473
|
-
|
|
474
|
+
G(() => {
|
|
474
475
|
let e = _.value?.rowKey;
|
|
475
476
|
return e === void 0 ? void 0 : a.value.getRowIndexByKey(e);
|
|
476
477
|
}, (e, t) => {
|
|
477
|
-
t === void 0 || e !== void 0 || document.activeElement === document.body &&
|
|
478
|
+
t === void 0 || e !== void 0 || document.activeElement === document.body && K();
|
|
478
479
|
}, { flush: "post" });
|
|
479
|
-
let
|
|
480
|
-
|
|
481
|
-
},
|
|
480
|
+
let oe = (e, t) => {
|
|
481
|
+
R(e, !0), y.value = t, e.section === "b" && e.rowKey && h(e.rowKey);
|
|
482
|
+
}, se = (e, t, n) => {
|
|
482
483
|
let r = k.value;
|
|
483
484
|
return r.section === e && r.rowKey === t && r.columnKey === n;
|
|
484
|
-
},
|
|
485
|
+
}, ce = (e, t, n) => se(e, t, n) ? 0 : -1, le = b(() => {
|
|
485
486
|
let e = k.value;
|
|
486
487
|
return e.section === "b" ? e.rowKey : void 0;
|
|
487
488
|
});
|
|
488
489
|
return {
|
|
489
490
|
focusAddress: k,
|
|
490
|
-
focusedBodyRowKey:
|
|
491
|
+
focusedBodyRowKey: le,
|
|
491
492
|
focusBodyRowIndex: b(() => {
|
|
492
|
-
let e =
|
|
493
|
+
let e = le.value;
|
|
493
494
|
return e === void 0 ? void 0 : a.value.getRowIndexByKey(e);
|
|
494
495
|
}),
|
|
495
496
|
cellEntered: y,
|
|
496
|
-
isCellFocused:
|
|
497
|
-
getCellTabIndex:
|
|
498
|
-
moveFocus:
|
|
499
|
-
moveToRowEdge:
|
|
500
|
-
moveToGridEdge:
|
|
501
|
-
moveByPage:
|
|
502
|
-
focusAddressNow:
|
|
503
|
-
syncFocusAddress:
|
|
504
|
-
enterCell:
|
|
505
|
-
exitCell:
|
|
506
|
-
cycleCellFocus:
|
|
507
|
-
restoreFocusAfterUnmount:
|
|
508
|
-
ensureFocusedCellVisibleHorizontally:
|
|
509
|
-
queryFocusedCellElement:
|
|
497
|
+
isCellFocused: se,
|
|
498
|
+
getCellTabIndex: ce,
|
|
499
|
+
moveFocus: B,
|
|
500
|
+
moveToRowEdge: H,
|
|
501
|
+
moveToGridEdge: te,
|
|
502
|
+
moveByPage: W,
|
|
503
|
+
focusAddressNow: z,
|
|
504
|
+
syncFocusAddress: oe,
|
|
505
|
+
enterCell: re,
|
|
506
|
+
exitCell: ie,
|
|
507
|
+
cycleCellFocus: ae,
|
|
508
|
+
restoreFocusAfterUnmount: K,
|
|
509
|
+
ensureFocusedCellVisibleHorizontally: L,
|
|
510
|
+
queryFocusedCellElement: I
|
|
510
511
|
};
|
|
511
512
|
}, pt = [
|
|
512
513
|
"data-index",
|
|
@@ -561,7 +562,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
561
562
|
"menuOpen"
|
|
562
563
|
],
|
|
563
564
|
setup(e, { emit: t }) {
|
|
564
|
-
let n = t, s =
|
|
565
|
+
let n = t, s = ie(), { t: c } = de(), f = R(!1), p = (e) => {
|
|
565
566
|
n("menuOpen"), e();
|
|
566
567
|
}, m = b(() => ({
|
|
567
568
|
"s-ui-table__group-row--active": e.active,
|
|
@@ -574,40 +575,40 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
574
575
|
})), h = b(() => {
|
|
575
576
|
if (e.row.depth !== 0) return { paddingInlineStart: `calc(var(--s-ui-dimension-4) + ${e.row.depth * e.treeIndent}px)` };
|
|
576
577
|
}), 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"));
|
|
577
|
-
return (t, b) => (
|
|
578
|
+
return (t, b) => (L(), C("tr", {
|
|
578
579
|
ref: e.dndRef,
|
|
579
|
-
class:
|
|
580
|
-
style:
|
|
580
|
+
class: N(["s-ui-table__group-row", m.value]),
|
|
581
|
+
style: P(e.extraRowStyle),
|
|
581
582
|
"data-index": e.rowIndex,
|
|
582
583
|
"aria-rowindex": e.rowIndex + 2,
|
|
583
584
|
"aria-level": e.row.depth + 1,
|
|
584
585
|
"aria-expanded": e.row.hasChildren ? e.expanded : void 0,
|
|
585
586
|
onClick: b[3] ||= (e) => n("rowClick", e)
|
|
586
587
|
}, [
|
|
587
|
-
(
|
|
588
|
+
(L(!0), C(y, null, z(e.leadingPlans, (m) => (L(), C("td", {
|
|
588
589
|
id: `${e.cellIdPrefix}${e.row.key}-${m.descriptor.key}`,
|
|
589
590
|
key: m.descriptor.key,
|
|
590
|
-
class:
|
|
591
|
-
style:
|
|
591
|
+
class: N([m.cellClass, "s-ui-table__group-cell"]),
|
|
592
|
+
style: P(m.style),
|
|
592
593
|
"aria-colindex": m.descriptor.colIndex,
|
|
593
594
|
"data-column-key": m.descriptor.key,
|
|
594
595
|
"data-row-key": e.row.key,
|
|
595
|
-
"data-section":
|
|
596
|
+
"data-section": W($).BODY,
|
|
596
597
|
tabindex: m.descriptor.key === e.focusColumnKey ? 0 : -1
|
|
597
|
-
}, [m.descriptor.key === e.groupColumnKey ? (
|
|
598
|
+
}, [m.descriptor.key === e.groupColumnKey ? (L(), C("div", {
|
|
598
599
|
key: 0,
|
|
599
600
|
class: "s-ui-table__group-content",
|
|
600
|
-
style:
|
|
601
|
-
}, [
|
|
602
|
-
D(
|
|
601
|
+
style: P(h.value)
|
|
602
|
+
}, [B(t.$slots, "row", {}, () => [
|
|
603
|
+
D(W(o), {
|
|
603
604
|
class: "s-ui-table__group-chevron",
|
|
604
|
-
appearance:
|
|
605
|
-
variant:
|
|
606
|
-
size:
|
|
605
|
+
appearance: W(i).BARE,
|
|
606
|
+
variant: W(r).NEUTRAL,
|
|
607
|
+
size: W(a).SMALL,
|
|
607
608
|
icon: _.value,
|
|
608
609
|
"aria-label": v.value,
|
|
609
610
|
tabindex: "-1",
|
|
610
|
-
onClick: b[0] ||=
|
|
611
|
+
onClick: b[0] ||= oe((e) => n("toggle"), ["stop"])
|
|
611
612
|
}, null, 8, [
|
|
612
613
|
"appearance",
|
|
613
614
|
"variant",
|
|
@@ -615,24 +616,24 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
615
616
|
"icon",
|
|
616
617
|
"aria-label"
|
|
617
618
|
]),
|
|
618
|
-
w("div", ht, [
|
|
619
|
+
w("div", ht, [B(t.$slots, "title", {}, () => [w("span", gt, H(e.title), 1)]), w("span", _t, H(g.value), 1)]),
|
|
619
620
|
w("div", {
|
|
620
621
|
class: "s-ui-table__group-actions",
|
|
621
|
-
onClick: b[2] ||=
|
|
622
|
-
}, [
|
|
622
|
+
onClick: b[2] ||= oe(() => {}, ["stop"])
|
|
623
|
+
}, [B(t.$slots, "actions"), W(s).menu ? (L(), x(W(u), {
|
|
623
624
|
key: 0,
|
|
624
625
|
modelValue: f.value,
|
|
625
626
|
"onUpdate:modelValue": b[1] ||= (e) => f.value = e,
|
|
626
|
-
placement:
|
|
627
|
+
placement: W(l).BOTTOM_END,
|
|
627
628
|
"teleport-to": !1
|
|
628
629
|
}, {
|
|
629
|
-
trigger:
|
|
630
|
-
class:
|
|
631
|
-
appearance:
|
|
632
|
-
variant:
|
|
633
|
-
size:
|
|
630
|
+
trigger: K(({ toggle: e }) => [D(W(o), {
|
|
631
|
+
class: N(["s-ui-table__group-kebab", { "s-ui-table__group-kebab--open": f.value }]),
|
|
632
|
+
appearance: W(i).BARE,
|
|
633
|
+
variant: W(r).NEUTRAL,
|
|
634
|
+
size: W(a).SMALL,
|
|
634
635
|
icon: "menu",
|
|
635
|
-
"aria-label":
|
|
636
|
+
"aria-label": W(c)("table.groupMenu"),
|
|
636
637
|
tabindex: "-1",
|
|
637
638
|
onClick: (t) => p(e)
|
|
638
639
|
}, null, 8, [
|
|
@@ -643,8 +644,8 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
643
644
|
"aria-label",
|
|
644
645
|
"onClick"
|
|
645
646
|
])]),
|
|
646
|
-
content:
|
|
647
|
-
default:
|
|
647
|
+
content: K(() => [D(W(d), { width: 220 }, {
|
|
648
|
+
default: K(() => [B(t.$slots, "menu")]),
|
|
648
649
|
_: 3
|
|
649
650
|
})]),
|
|
650
651
|
_: 3
|
|
@@ -654,15 +655,15 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
654
655
|
class: "s-ui-table__cell s-ui-table__filler-cell s-ui-table__group-cell",
|
|
655
656
|
role: "presentation"
|
|
656
657
|
}, null, -1),
|
|
657
|
-
(
|
|
658
|
+
(L(!0), C(y, null, z(e.trailingPlans, (t) => (L(), C("td", {
|
|
658
659
|
id: `${e.cellIdPrefix}${e.row.key}-${t.descriptor.key}`,
|
|
659
660
|
key: t.descriptor.key,
|
|
660
|
-
class:
|
|
661
|
-
style:
|
|
661
|
+
class: N([t.cellClass, "s-ui-table__group-cell"]),
|
|
662
|
+
style: P(t.style),
|
|
662
663
|
"aria-colindex": t.descriptor.colIndex,
|
|
663
664
|
"data-column-key": t.descriptor.key,
|
|
664
665
|
"data-row-key": e.row.key,
|
|
665
|
-
"data-section":
|
|
666
|
+
"data-section": W($).BODY,
|
|
666
667
|
tabindex: t.descriptor.key === e.focusColumnKey ? 0 : -1
|
|
667
668
|
}, null, 14, vt))), 128))
|
|
668
669
|
], 14, pt));
|
|
@@ -675,19 +676,19 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
675
676
|
__name: "STableHint",
|
|
676
677
|
props: { text: {} },
|
|
677
678
|
setup(e) {
|
|
678
|
-
let t =
|
|
679
|
-
return (n, r) => (
|
|
679
|
+
let t = R(!1);
|
|
680
|
+
return (n, r) => (L(), C("span", {
|
|
680
681
|
class: "s-ui-table__hint",
|
|
681
682
|
tabindex: "-1",
|
|
682
683
|
onPointerenter: r[0] ||= (e) => t.value = !0,
|
|
683
684
|
onPointerleave: r[1] ||= (e) => t.value = !1,
|
|
684
685
|
onFocusin: r[2] ||= (e) => t.value = !0,
|
|
685
686
|
onFocusout: r[3] ||= (e) => t.value = !1
|
|
686
|
-
}, [D(
|
|
687
|
+
}, [D(W(ce), {
|
|
687
688
|
class: "s-ui-table__hint-icon",
|
|
688
689
|
name: "infoCircle",
|
|
689
690
|
size: 16
|
|
690
|
-
}), t.value ? (
|
|
691
|
+
}), t.value ? (L(), C("span", bt, H(e.text), 1)) : S("", !0)], 32));
|
|
691
692
|
}
|
|
692
693
|
}), St = {
|
|
693
694
|
key: 0,
|
|
@@ -714,9 +715,11 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
714
715
|
"hide"
|
|
715
716
|
],
|
|
716
717
|
setup(e, { emit: t }) {
|
|
717
|
-
let n = t, s =
|
|
718
|
+
let n = t, s = ie(), { t: c } = de(), f = b(() => !!s.menu || e.descriptor.sortable || e.descriptor.hideable), p = b(() => ({
|
|
718
719
|
"s-ui-table__header-plaque--sorted": !!e.sortDirection,
|
|
719
|
-
"s-ui-table__header-plaque--sortable": e.descriptor.sortable
|
|
720
|
+
"s-ui-table__header-plaque--sortable": e.descriptor.sortable,
|
|
721
|
+
"s-ui-table__header-plaque--align-center": e.descriptor.align === Y.CENTER,
|
|
722
|
+
"s-ui-table__header-plaque--align-right": e.descriptor.align === Y.RIGHT
|
|
720
723
|
})), m = b(() => ({ "s-ui-table__header-actions--open": e.menuOpen })), g = b(() => e.sortDirection === X.DESC ? "descending" : "ascending"), _ = b(() => String(e.sortIndex ?? 1)), v = (t) => {
|
|
721
724
|
e.descriptor.sortable && n("sortToggle", t.shiftKey || t.ctrlKey || t.metaKey);
|
|
722
725
|
}, T = (e, t) => {
|
|
@@ -724,19 +727,19 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
724
727
|
}, O = (e) => {
|
|
725
728
|
n("hide"), e();
|
|
726
729
|
};
|
|
727
|
-
return (t, b) => (
|
|
728
|
-
class:
|
|
730
|
+
return (t, b) => (L(), C("div", {
|
|
731
|
+
class: N(["s-ui-table__header-plaque", p.value]),
|
|
729
732
|
onClick: v
|
|
730
733
|
}, [
|
|
731
|
-
e.descriptor.draggable ? (
|
|
734
|
+
e.descriptor.draggable ? (L(), C("span", St, [D(W(o), {
|
|
732
735
|
class: "s-ui-table__header-grip",
|
|
733
|
-
appearance:
|
|
734
|
-
variant:
|
|
735
|
-
size:
|
|
736
|
+
appearance: W(i).BARE,
|
|
737
|
+
variant: W(r).NEUTRAL,
|
|
738
|
+
size: W(a).SMALL,
|
|
736
739
|
icon: "dragAndDrop",
|
|
737
|
-
"aria-label":
|
|
740
|
+
"aria-label": W(c)("table.dragColumn"),
|
|
738
741
|
tabindex: "-1",
|
|
739
|
-
onClick: b[0] ||=
|
|
742
|
+
onClick: b[0] ||= oe(() => {}, ["stop"])
|
|
740
743
|
}, null, 8, [
|
|
741
744
|
"appearance",
|
|
742
745
|
"variant",
|
|
@@ -744,25 +747,25 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
744
747
|
"aria-label"
|
|
745
748
|
])])) : S("", !0),
|
|
746
749
|
w("span", Ct, [
|
|
747
|
-
w("span", wt, [
|
|
748
|
-
e.descriptor.column?.description ? (
|
|
750
|
+
w("span", wt, [B(t.$slots, "default", {}, () => [E(H(e.descriptor.column?.title), 1)])]),
|
|
751
|
+
e.descriptor.column?.description ? (L(), x(xt, {
|
|
749
752
|
key: 0,
|
|
750
753
|
text: e.descriptor.column.description
|
|
751
754
|
}, null, 8, ["text"])) : S("", !0),
|
|
752
|
-
e.sortDirection ? (
|
|
755
|
+
e.sortDirection ? (L(), C("span", Tt, [D(W(ce), {
|
|
753
756
|
name: g.value,
|
|
754
757
|
size: 16
|
|
755
|
-
}, null, 8, ["name"]), w("span", Et,
|
|
756
|
-
e.descriptor.sortable && !e.sortDirection ? (
|
|
758
|
+
}, null, 8, ["name"]), w("span", Et, H(_.value), 1)])) : S("", !0),
|
|
759
|
+
e.descriptor.sortable && !e.sortDirection ? (L(), x(W(o), {
|
|
757
760
|
key: 2,
|
|
758
761
|
class: "s-ui-table__header-sort-button",
|
|
759
|
-
appearance:
|
|
760
|
-
variant:
|
|
761
|
-
size:
|
|
762
|
+
appearance: W(i).BARE,
|
|
763
|
+
variant: W(r).NEUTRAL,
|
|
764
|
+
size: W(a).SMALL,
|
|
762
765
|
icon: "ascending",
|
|
763
|
-
"aria-label":
|
|
766
|
+
"aria-label": W(c)("table.sortAsc"),
|
|
764
767
|
tabindex: "-1",
|
|
765
|
-
onClick: b[1] ||=
|
|
768
|
+
onClick: b[1] ||= oe((e) => n("sortToggle", e.shiftKey || e.ctrlKey || e.metaKey), ["stop"])
|
|
766
769
|
}, null, 8, [
|
|
767
770
|
"appearance",
|
|
768
771
|
"variant",
|
|
@@ -770,23 +773,23 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
770
773
|
"aria-label"
|
|
771
774
|
])) : S("", !0)
|
|
772
775
|
]),
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
776
|
+
f.value ? (L(), C("span", {
|
|
777
|
+
key: 1,
|
|
778
|
+
class: N(["s-ui-table__header-actions", m.value]),
|
|
779
|
+
onClick: b[3] ||= oe(() => {}, ["stop"])
|
|
780
|
+
}, [D(W(u), {
|
|
778
781
|
"model-value": e.menuOpen,
|
|
779
|
-
placement:
|
|
782
|
+
placement: W(l).BOTTOM_END,
|
|
780
783
|
"teleport-to": !1,
|
|
781
784
|
"onUpdate:modelValue": b[2] ||= (e) => n("update:menuOpen", e)
|
|
782
785
|
}, {
|
|
783
|
-
trigger:
|
|
786
|
+
trigger: K(({ toggle: e }) => [D(W(o), {
|
|
784
787
|
class: "s-ui-table__header-kebab",
|
|
785
|
-
appearance:
|
|
786
|
-
variant:
|
|
787
|
-
size:
|
|
788
|
+
appearance: W(i).BARE,
|
|
789
|
+
variant: W(r).NEUTRAL,
|
|
790
|
+
size: W(a).SMALL,
|
|
788
791
|
icon: "menu",
|
|
789
|
-
"aria-label":
|
|
792
|
+
"aria-label": W(c)("table.columnMenu"),
|
|
790
793
|
tabindex: "-1",
|
|
791
794
|
onClick: (t) => e()
|
|
792
795
|
}, null, 8, [
|
|
@@ -796,39 +799,39 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
796
799
|
"aria-label",
|
|
797
800
|
"onClick"
|
|
798
801
|
])]),
|
|
799
|
-
content:
|
|
800
|
-
default:
|
|
801
|
-
e.descriptor.sortable ? (
|
|
802
|
+
content: K(({ close: n }) => [D(W(d), { width: 220 }, {
|
|
803
|
+
default: K(() => [W(s).menu ? B(t.$slots, "menu", { key: 0 }) : (L(), C(y, { key: 1 }, [
|
|
804
|
+
e.descriptor.sortable ? (L(), x(W(h), {
|
|
802
805
|
key: 0,
|
|
803
|
-
title:
|
|
806
|
+
title: W(c)("table.sortAsc"),
|
|
804
807
|
"icon-left": "ascending",
|
|
805
|
-
selected: e.sortDirection ===
|
|
806
|
-
onClick: (e) => T(
|
|
808
|
+
selected: e.sortDirection === W(X).ASC,
|
|
809
|
+
onClick: (e) => T(W(X).ASC, n)
|
|
807
810
|
}, null, 8, [
|
|
808
811
|
"title",
|
|
809
812
|
"selected",
|
|
810
813
|
"onClick"
|
|
811
814
|
])) : S("", !0),
|
|
812
|
-
e.descriptor.sortable ? (
|
|
815
|
+
e.descriptor.sortable ? (L(), x(W(h), {
|
|
813
816
|
key: 1,
|
|
814
|
-
title:
|
|
817
|
+
title: W(c)("table.sortDesc"),
|
|
815
818
|
"icon-left": "descending",
|
|
816
|
-
selected: e.sortDirection ===
|
|
817
|
-
onClick: (e) => T(
|
|
819
|
+
selected: e.sortDirection === W(X).DESC,
|
|
820
|
+
onClick: (e) => T(W(X).DESC, n)
|
|
818
821
|
}, null, 8, [
|
|
819
822
|
"title",
|
|
820
823
|
"selected",
|
|
821
824
|
"onClick"
|
|
822
825
|
])) : S("", !0),
|
|
823
|
-
e.descriptor.sortable && e.sortDirection ? (
|
|
826
|
+
e.descriptor.sortable && e.sortDirection ? (L(), x(W(h), {
|
|
824
827
|
key: 2,
|
|
825
|
-
title:
|
|
828
|
+
title: W(c)("table.sortReset"),
|
|
826
829
|
"icon-left": "closeMini",
|
|
827
830
|
onClick: (e) => T(void 0, n)
|
|
828
831
|
}, null, 8, ["title", "onClick"])) : S("", !0),
|
|
829
|
-
e.descriptor.hideable ? (
|
|
832
|
+
e.descriptor.hideable ? (L(), x(W(h), {
|
|
830
833
|
key: 3,
|
|
831
|
-
title:
|
|
834
|
+
title: W(c)("table.hideColumn"),
|
|
832
835
|
"icon-left": "eyeOff",
|
|
833
836
|
onClick: (e) => O(n)
|
|
834
837
|
}, null, 8, ["title", "onClick"])) : S("", !0)
|
|
@@ -836,7 +839,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
836
839
|
_: 2
|
|
837
840
|
}, 1024)]),
|
|
838
841
|
_: 3
|
|
839
|
-
}, 8, ["model-value", "placement"])) : S("", !0)
|
|
842
|
+
}, 8, ["model-value", "placement"])], 2)) : S("", !0)
|
|
840
843
|
], 2));
|
|
841
844
|
}
|
|
842
845
|
}), Ot = ["data-index", "aria-rowindex"], kt = {
|
|
@@ -856,19 +859,19 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
856
859
|
},
|
|
857
860
|
setup(e) {
|
|
858
861
|
let t = b(() => e.rowHeight ? { height: `${e.rowHeight}px` } : void 0);
|
|
859
|
-
return (n, r) => (
|
|
862
|
+
return (n, r) => (L(), C("tr", {
|
|
860
863
|
class: "s-ui-table__row s-ui-table__row--placeholder",
|
|
861
|
-
style:
|
|
864
|
+
style: P(t.value),
|
|
862
865
|
"data-index": e.rowIndex,
|
|
863
866
|
"aria-rowindex": e.rowIndex + 2,
|
|
864
867
|
"data-placeholder": "true"
|
|
865
|
-
}, [(
|
|
868
|
+
}, [(L(!0), C(y, null, z(e.cells, (t) => (L(), C(y, { key: t.key }, [t.cellPlan ? (L(), C("td", {
|
|
866
869
|
key: 1,
|
|
867
|
-
class:
|
|
868
|
-
style:
|
|
870
|
+
class: N(t.cellPlan.cellClass),
|
|
871
|
+
style: P(t.cellPlan.style),
|
|
869
872
|
"data-column-key": t.cellPlan.descriptor.key,
|
|
870
873
|
"data-row-key": e.rowKey
|
|
871
|
-
}, [t.cellPlan.descriptor.service ? S("", !0) : (
|
|
874
|
+
}, [t.cellPlan.descriptor.service ? S("", !0) : (L(), C("div", jt, [...r[0] ||= [w("span", { class: "s-ui-table__placeholder-bar" }, null, -1)]]))], 14, At)) : (L(), C("td", kt))], 64))), 128))], 12, Ot));
|
|
872
875
|
}
|
|
873
876
|
}), Nt = (t) => e(t) || n(t), Pt = (e) => Nt(e) ? void 0 : `s-ui-table__row--color-${e}`, Ft = (n) => {
|
|
874
877
|
if (!Nt(n)) return;
|
|
@@ -929,7 +932,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
929
932
|
expandableKeys: i
|
|
930
933
|
});
|
|
931
934
|
}, l = b(() => {
|
|
932
|
-
let r =
|
|
935
|
+
let r = te(U(e)), i = U(t), a = U(n), o = s.get(r);
|
|
933
936
|
if (o && o.itemKeyValue === i && o.childrenKeyValue === a) return o.index;
|
|
934
937
|
let l = c(r, i, a);
|
|
935
938
|
return s.set(r, {
|
|
@@ -943,7 +946,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
943
946
|
let n = /* @__PURE__ */ new Map();
|
|
944
947
|
return d.set(e, n), n;
|
|
945
948
|
}, p = b(() => {
|
|
946
|
-
let t =
|
|
949
|
+
let t = te(U(e)), { roots: n, nodeByKey: i } = l.value, s = U(r), c = U(a), d = U(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) => {
|
|
947
950
|
let r = g.get(e);
|
|
948
951
|
return r || (r = Gt(e, t.item, t.depth + 1, t.key), g.set(e, r)), b(r, n, !1, !1);
|
|
949
952
|
}, C = (e) => {
|
|
@@ -1014,7 +1017,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1014
1017
|
},
|
|
1015
1018
|
setup(e) {
|
|
1016
1019
|
let t = b(() => Ut(e.item, e.column.value ?? e.column.key)), n = b(() => t.value !== void 0 && t.value !== "");
|
|
1017
|
-
return (r, i) => n.value ? (
|
|
1020
|
+
return (r, i) => n.value ? (L(), C("span", qt, H(t.value), 1)) : e.column.placeholder ? (L(), C("span", Jt, H(e.column.placeholder), 1)) : S("", !0);
|
|
1018
1021
|
}
|
|
1019
1022
|
}), Xt = [
|
|
1020
1023
|
"id",
|
|
@@ -1112,7 +1115,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1112
1115
|
"toggleSelected"
|
|
1113
1116
|
],
|
|
1114
1117
|
setup(e, { emit: t }) {
|
|
1115
|
-
let n = t, s =
|
|
1118
|
+
let n = t, s = ie(), { t: c } = de(), l = $.BODY, u = (t) => `${e.cellIdPrefix}${e.row.key}-${t}`, d = (t) => t === e.focusColumnKey ? 0 : -1, f = b(() => [
|
|
1116
1119
|
{
|
|
1117
1120
|
"s-ui-table__row--selected": e.selected,
|
|
1118
1121
|
"s-ui-table__row--active": e.active,
|
|
@@ -1167,132 +1170,132 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1167
1170
|
value: Ut(e.row.item, n.value ?? n.key),
|
|
1168
1171
|
cellState: T(t)
|
|
1169
1172
|
};
|
|
1170
|
-
},
|
|
1173
|
+
}, ee = (t) => {
|
|
1171
1174
|
let n = [...e.leadingPlans, ...e.trailingPlans].find((e) => e.descriptor.key === t);
|
|
1172
1175
|
return n ? T(n) === Me.DISABLED : !1;
|
|
1173
|
-
},
|
|
1176
|
+
}, F = (e) => {
|
|
1174
1177
|
let t = e.target;
|
|
1175
1178
|
if (t instanceof Element) {
|
|
1176
1179
|
let r = t.closest("td[data-column-key]")?.getAttribute("data-column-key");
|
|
1177
|
-
r && !
|
|
1180
|
+
r && !ee(r) && n("cellClick", r, e);
|
|
1178
1181
|
}
|
|
1179
1182
|
n("rowClick", e);
|
|
1180
1183
|
};
|
|
1181
|
-
return (t, p) => (
|
|
1184
|
+
return (t, p) => (L(), C("tr", {
|
|
1182
1185
|
id: e.domId,
|
|
1183
1186
|
ref: e.dndRef,
|
|
1184
|
-
class:
|
|
1185
|
-
style:
|
|
1187
|
+
class: N(["s-ui-table__row", f.value]),
|
|
1188
|
+
style: P(h.value),
|
|
1186
1189
|
"data-index": e.rowIndex,
|
|
1187
1190
|
"aria-rowindex": e.rowIndex + 2,
|
|
1188
1191
|
"aria-level": e.row.depth + 1,
|
|
1189
1192
|
"aria-expanded": e.row.hasChildren ? e.rowExpanded : void 0,
|
|
1190
1193
|
"aria-selected": e.selected || void 0,
|
|
1191
|
-
onClick:
|
|
1194
|
+
onClick: F,
|
|
1192
1195
|
onContextmenu: p[3] ||= (e) => n("rowContextMenu", e)
|
|
1193
1196
|
}, [
|
|
1194
|
-
(
|
|
1197
|
+
(L(!0), C(y, null, z(e.leadingPlans, (f) => (L(), C("td", {
|
|
1195
1198
|
id: u(f.descriptor.key),
|
|
1196
1199
|
key: f.descriptor.key,
|
|
1197
|
-
class:
|
|
1198
|
-
style:
|
|
1200
|
+
class: N(f.cellClass),
|
|
1201
|
+
style: P(f.style),
|
|
1199
1202
|
"aria-colindex": f.descriptor.colIndex,
|
|
1200
1203
|
"data-column-key": f.descriptor.key,
|
|
1201
1204
|
"data-row-key": e.row.key,
|
|
1202
|
-
"data-section":
|
|
1205
|
+
"data-section": W(l),
|
|
1203
1206
|
"aria-disabled": D(f),
|
|
1204
1207
|
"aria-readonly": O(f),
|
|
1205
1208
|
tabindex: d(f.descriptor.key)
|
|
1206
|
-
}, [f.descriptor.service ===
|
|
1209
|
+
}, [f.descriptor.service === W(qe).INDICATOR ? (L(), C(y, { key: 0 }, [e.placeholder ? S("", !0) : B(t.$slots, "indicator", M({
|
|
1207
1210
|
key: 0,
|
|
1208
1211
|
ref_for: !0
|
|
1209
|
-
}, A()))], 64)) : f.descriptor.service ===
|
|
1212
|
+
}, A()))], 64)) : f.descriptor.service === W(qe).CHECKBOX ? (L(), C(y, { key: 1 }, [W(s).checkbox && !e.placeholder ? B(t.$slots, "checkbox", M({
|
|
1210
1213
|
key: 0,
|
|
1211
1214
|
ref_for: !0
|
|
1212
|
-
}, A())) : e.rowSelectable && !e.placeholder ? (
|
|
1215
|
+
}, A())) : e.rowSelectable && !e.placeholder ? (L(), x(We, {
|
|
1213
1216
|
key: 1,
|
|
1214
|
-
class:
|
|
1217
|
+
class: N(["s-ui-table__row-checkbox", { "s-ui-table__row-checkbox--active": e.selected || e.indeterminate }]),
|
|
1215
1218
|
"model-value": e.selected,
|
|
1216
1219
|
indeterminate: e.indeterminate,
|
|
1217
|
-
"screen-reader-label":
|
|
1220
|
+
"screen-reader-label": W(c)("table.selectRow"),
|
|
1218
1221
|
"onUpdate:modelValue": p[0] ||= (e) => n("toggleSelected"),
|
|
1219
|
-
onClick: p[1] ||=
|
|
1222
|
+
onClick: p[1] ||= oe(() => {}, ["stop"])
|
|
1220
1223
|
}, null, 8, [
|
|
1221
1224
|
"class",
|
|
1222
1225
|
"model-value",
|
|
1223
1226
|
"indeterminate",
|
|
1224
1227
|
"screen-reader-label"
|
|
1225
|
-
])) : S("", !0)], 64)) : e.placeholder ? (
|
|
1228
|
+
])) : S("", !0)], 64)) : e.placeholder ? (L(), C("div", {
|
|
1226
1229
|
key: 2,
|
|
1227
1230
|
class: "s-ui-table__cell-body",
|
|
1228
|
-
style:
|
|
1229
|
-
}, [...p[4] ||= [w("span", { class: "s-ui-table__placeholder-bar" }, null, -1)]], 4)) : (
|
|
1231
|
+
style: P(g(f))
|
|
1232
|
+
}, [...p[4] ||= [w("span", { class: "s-ui-table__placeholder-bar" }, null, -1)]], 4)) : (L(), C("div", {
|
|
1230
1233
|
key: 3,
|
|
1231
|
-
class:
|
|
1232
|
-
style:
|
|
1234
|
+
class: N(["s-ui-table__cell-body", E(f)]),
|
|
1235
|
+
style: P(g(f))
|
|
1233
1236
|
}, [
|
|
1234
|
-
f.chevron ? (
|
|
1237
|
+
f.chevron ? (L(), C(y, { key: 0 }, [W(s).chevron ? B(t.$slots, "chevron", M({
|
|
1235
1238
|
key: 0,
|
|
1236
1239
|
ref_for: !0
|
|
1237
|
-
}, A())) : e.row.hasChildren ? (
|
|
1240
|
+
}, A())) : e.row.hasChildren ? (L(), x(W(o), {
|
|
1238
1241
|
key: 1,
|
|
1239
1242
|
class: "s-ui-table__chevron",
|
|
1240
|
-
appearance:
|
|
1241
|
-
variant:
|
|
1242
|
-
size:
|
|
1243
|
+
appearance: W(i).BARE,
|
|
1244
|
+
variant: W(r).NEUTRAL,
|
|
1245
|
+
size: W(a).SMALL,
|
|
1243
1246
|
icon: e.rowExpanded ? "chevronMiniDown" : "chevronMiniRight",
|
|
1244
|
-
"aria-label": e.rowExpanded ?
|
|
1247
|
+
"aria-label": e.rowExpanded ? W(c)("table.collapse") : W(c)("table.expand"),
|
|
1245
1248
|
tabindex: "-1",
|
|
1246
|
-
onClick: p[2] ||=
|
|
1249
|
+
onClick: p[2] ||= oe((e) => n("toggleExpand"), ["stop"])
|
|
1247
1250
|
}, null, 8, [
|
|
1248
1251
|
"appearance",
|
|
1249
1252
|
"variant",
|
|
1250
1253
|
"size",
|
|
1251
1254
|
"icon",
|
|
1252
1255
|
"aria-label"
|
|
1253
|
-
])) : (
|
|
1254
|
-
|
|
1256
|
+
])) : (L(), C("span", Qt))], 64)) : S("", !0),
|
|
1257
|
+
W(s)[`cell:${f.descriptor.key}`] ? B(t.$slots, `cell:${f.descriptor.key}`, M({
|
|
1255
1258
|
key: 1,
|
|
1256
1259
|
ref_for: !0
|
|
1257
|
-
}, j(f))) : f.descriptor.column ? (
|
|
1260
|
+
}, j(f))) : f.descriptor.column ? (L(), x(Yt, {
|
|
1258
1261
|
key: 2,
|
|
1259
1262
|
column: f.descriptor.column,
|
|
1260
1263
|
item: e.row.item
|
|
1261
1264
|
}, null, 8, ["column", "item"])) : S("", !0),
|
|
1262
|
-
|
|
1265
|
+
W(s)["cell-actions"] && !e.placeholder ? (L(), C("span", $t, [B(t.$slots, "cell-actions", M({ ref_for: !0 }, j(f)))])) : S("", !0)
|
|
1263
1266
|
], 6))], 14, Zt))), 128)),
|
|
1264
1267
|
p[6] ||= w("td", {
|
|
1265
1268
|
class: "s-ui-table__cell s-ui-table__filler-cell",
|
|
1266
1269
|
role: "presentation"
|
|
1267
1270
|
}, null, -1),
|
|
1268
|
-
(
|
|
1271
|
+
(L(!0), C(y, null, z(e.trailingPlans, (n) => (L(), C("td", {
|
|
1269
1272
|
id: u(n.descriptor.key),
|
|
1270
1273
|
key: n.descriptor.key,
|
|
1271
|
-
class:
|
|
1272
|
-
style:
|
|
1274
|
+
class: N(n.cellClass),
|
|
1275
|
+
style: P(n.style),
|
|
1273
1276
|
"aria-colindex": n.descriptor.colIndex,
|
|
1274
1277
|
"data-column-key": n.descriptor.key,
|
|
1275
1278
|
"data-row-key": e.row.key,
|
|
1276
|
-
"data-section":
|
|
1279
|
+
"data-section": W(l),
|
|
1277
1280
|
"aria-disabled": D(n),
|
|
1278
1281
|
"aria-readonly": O(n),
|
|
1279
1282
|
tabindex: d(n.descriptor.key)
|
|
1280
|
-
}, [n.descriptor.service ===
|
|
1283
|
+
}, [n.descriptor.service === W(qe).RIGHT_EDGE ? (L(), C(y, { key: 0 }, [e.placeholder ? S("", !0) : (L(), C("div", tn, [B(t.$slots, "right-edge", M({ ref_for: !0 }, A()))]))], 64)) : e.placeholder ? (L(), C("div", {
|
|
1281
1284
|
key: 1,
|
|
1282
1285
|
class: "s-ui-table__cell-body",
|
|
1283
|
-
style:
|
|
1284
|
-
}, [...p[5] ||= [w("span", { class: "s-ui-table__placeholder-bar" }, null, -1)]], 4)) : (
|
|
1286
|
+
style: P(g(n))
|
|
1287
|
+
}, [...p[5] ||= [w("span", { class: "s-ui-table__placeholder-bar" }, null, -1)]], 4)) : (L(), C("div", {
|
|
1285
1288
|
key: 2,
|
|
1286
|
-
class:
|
|
1287
|
-
style:
|
|
1288
|
-
}, [
|
|
1289
|
+
class: N(["s-ui-table__cell-body", E(n)]),
|
|
1290
|
+
style: P(g(n))
|
|
1291
|
+
}, [W(s)[`cell:${n.descriptor.key}`] ? B(t.$slots, `cell:${n.descriptor.key}`, M({
|
|
1289
1292
|
key: 0,
|
|
1290
1293
|
ref_for: !0
|
|
1291
|
-
}, j(n))) : n.descriptor.column ? (
|
|
1294
|
+
}, j(n))) : n.descriptor.column ? (L(), x(Yt, {
|
|
1292
1295
|
key: 1,
|
|
1293
1296
|
column: n.descriptor.column,
|
|
1294
1297
|
item: e.row.item
|
|
1295
|
-
}, null, 8, ["column", "item"])) : S("", !0),
|
|
1298
|
+
}, null, 8, ["column", "item"])) : S("", !0), W(s)["cell-actions"] && !e.placeholder ? (L(), C("span", nn, [B(t.$slots, "cell-actions", M({ ref_for: !0 }, j(n)))])) : S("", !0)], 6))], 14, en))), 128))
|
|
1296
1299
|
], 46, Xt));
|
|
1297
1300
|
}
|
|
1298
1301
|
}), an = {
|
|
@@ -1305,31 +1308,31 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1305
1308
|
trailingPlans: {}
|
|
1306
1309
|
},
|
|
1307
1310
|
setup(e) {
|
|
1308
|
-
return (t, n) => (
|
|
1309
|
-
(
|
|
1311
|
+
return (t, n) => (L(), C("tr", an, [
|
|
1312
|
+
(L(!0), C(y, null, z(e.leadingPlans, (e) => (L(), C("td", {
|
|
1310
1313
|
key: e.descriptor.key,
|
|
1311
|
-
class:
|
|
1312
|
-
style:
|
|
1313
|
-
}, [e.descriptor.column ?
|
|
1314
|
+
class: N(e.cellClass),
|
|
1315
|
+
style: P(e.style)
|
|
1316
|
+
}, [e.descriptor.column ? B(t.$slots, "default", {
|
|
1314
1317
|
key: 0,
|
|
1315
1318
|
descriptor: e.descriptor
|
|
1316
|
-
}, () => [w("div", on, [D(
|
|
1319
|
+
}, () => [w("div", on, [D(W(ue), {
|
|
1317
1320
|
class: "s-ui-table__skeleton",
|
|
1318
|
-
type: e.descriptor.primary ?
|
|
1321
|
+
type: e.descriptor.primary ? W(se).S_TABLE_ROW : W(se).S_TABLE_CELL
|
|
1319
1322
|
}, null, 8, ["type"])])]) : S("", !0)], 6))), 128)),
|
|
1320
1323
|
n[0] ||= w("td", {
|
|
1321
1324
|
class: "s-ui-table__cell s-ui-table__filler-cell",
|
|
1322
1325
|
role: "presentation"
|
|
1323
1326
|
}, null, -1),
|
|
1324
|
-
(
|
|
1327
|
+
(L(!0), C(y, null, z(e.trailingPlans, (e) => (L(), C("td", {
|
|
1325
1328
|
key: e.descriptor.key,
|
|
1326
|
-
class:
|
|
1327
|
-
style:
|
|
1329
|
+
class: N(e.cellClass),
|
|
1330
|
+
style: P(e.style)
|
|
1328
1331
|
}, null, 6))), 128))
|
|
1329
1332
|
]));
|
|
1330
1333
|
}
|
|
1331
1334
|
}), 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 }) => {
|
|
1332
|
-
let o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c =
|
|
1335
|
+
let o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = V(), l = V(), u = (e) => r.value.find((t) => t.key === e), d = (e, t) => {
|
|
1333
1336
|
let n = u(e), r = u(t);
|
|
1334
1337
|
if (!n || !r || r.primary) return !1;
|
|
1335
1338
|
let i = (e) => e.sticky ?? "regular";
|
|
@@ -1343,11 +1346,11 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1343
1346
|
}
|
|
1344
1347
|
if (s.get(r) === t) return;
|
|
1345
1348
|
o.get(r)?.(), s.set(r, t);
|
|
1346
|
-
let i =
|
|
1349
|
+
let i = q(xe({
|
|
1347
1350
|
element: r,
|
|
1348
1351
|
canDrag: () => {
|
|
1349
1352
|
let e = u(t);
|
|
1350
|
-
return !!(
|
|
1353
|
+
return !!(U(n) && e?.draggable && !U(a));
|
|
1351
1354
|
},
|
|
1352
1355
|
getInitialData: () => ({
|
|
1353
1356
|
type: cn,
|
|
@@ -1356,9 +1359,9 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1356
1359
|
}),
|
|
1357
1360
|
onGenerateDragPreview: ({ nativeSetDragImage: e }) => {
|
|
1358
1361
|
let n = u(t);
|
|
1359
|
-
|
|
1362
|
+
we({
|
|
1360
1363
|
nativeSetDragImage: e,
|
|
1361
|
-
getOffset:
|
|
1364
|
+
getOffset: Te({
|
|
1362
1365
|
x: "8px",
|
|
1363
1366
|
y: "8px"
|
|
1364
1367
|
}),
|
|
@@ -1374,16 +1377,16 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1374
1377
|
onDrop: () => {
|
|
1375
1378
|
c.value = void 0, l.value = void 0;
|
|
1376
1379
|
}
|
|
1377
|
-
}),
|
|
1380
|
+
}), Se({
|
|
1378
1381
|
element: r,
|
|
1379
1382
|
canDrop: ({ source: n }) => un(n.data, e) && n.data.columnKey !== t && d(n.data.columnKey, t),
|
|
1380
|
-
getData: ({ input: e, element: n }) =>
|
|
1383
|
+
getData: ({ input: e, element: n }) => Ee({ columnKey: t }, {
|
|
1381
1384
|
input: e,
|
|
1382
1385
|
element: n,
|
|
1383
1386
|
allowedEdges: ["left", "right"]
|
|
1384
1387
|
}),
|
|
1385
1388
|
onDrag: ({ self: e }) => {
|
|
1386
|
-
let n =
|
|
1389
|
+
let n = De(e.data);
|
|
1387
1390
|
if (n === "left" || n === "right") {
|
|
1388
1391
|
let e = l.value;
|
|
1389
1392
|
(e?.targetKey !== t || e.edge !== n) && (l.value = {
|
|
@@ -1397,23 +1400,23 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1397
1400
|
}
|
|
1398
1401
|
}));
|
|
1399
1402
|
o.set(r, i);
|
|
1400
|
-
}, p =
|
|
1403
|
+
}, p = Ce({
|
|
1401
1404
|
canMonitor: ({ source: t }) => un(t.data, e),
|
|
1402
1405
|
onDrop: ({ source: t, location: n }) => {
|
|
1403
1406
|
c.value = void 0, l.value = void 0;
|
|
1404
1407
|
let r = n.current.dropTargets[0];
|
|
1405
1408
|
if (!r || !un(t.data, e)) return;
|
|
1406
|
-
let a = r.data, o = a.columnKey, s =
|
|
1409
|
+
let a = r.data, o = a.columnKey, s = De(a);
|
|
1407
1410
|
typeof o != "string" || s !== "left" && s !== "right" || o !== t.data.columnKey && i(t.data.columnKey, o, s);
|
|
1408
1411
|
}
|
|
1409
1412
|
});
|
|
1410
|
-
|
|
1413
|
+
F(() => {
|
|
1411
1414
|
p(), o.forEach((e) => {
|
|
1412
1415
|
e();
|
|
1413
1416
|
}), o.clear(), s.clear();
|
|
1414
1417
|
});
|
|
1415
|
-
let m =
|
|
1416
|
-
return
|
|
1418
|
+
let m = V();
|
|
1419
|
+
return G(l, (e) => {
|
|
1417
1420
|
let n = t.value, r = e ? n?.querySelector(`th[data-column-key="${e.targetKey}"]`) : void 0;
|
|
1418
1421
|
if (!e || !n || !r) {
|
|
1419
1422
|
m.value = void 0;
|
|
@@ -1428,11 +1431,11 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1428
1431
|
dropLineStyle: m
|
|
1429
1432
|
};
|
|
1430
1433
|
}, pn = {
|
|
1431
|
-
[
|
|
1432
|
-
[
|
|
1433
|
-
[
|
|
1434
|
+
[Y.LEFT]: "s-ui-table__cell--align-left",
|
|
1435
|
+
[Y.CENTER]: "s-ui-table__cell--align-center",
|
|
1436
|
+
[Y.RIGHT]: "s-ui-table__cell--align-right"
|
|
1434
1437
|
}, mn = ({ columnDescriptors: e, hasTreeStructure: t, expandColumnKey: n, primaryColumnKey: r }) => {
|
|
1435
|
-
let i = b(() => e.value.filter((e) => e.sticky !==
|
|
1438
|
+
let i = b(() => e.value.filter((e) => e.sticky !== J.RIGHT)), a = b(() => e.value.filter((e) => e.sticky === J.RIGHT)), o = b(() => {
|
|
1436
1439
|
let e = (e) => ({
|
|
1437
1440
|
key: e.key,
|
|
1438
1441
|
descriptor: e
|
|
@@ -1448,15 +1451,15 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1448
1451
|
}), s = (e) => {
|
|
1449
1452
|
if (!e.sticky || !e.stickyOffsetVar || !e.liveStickyOffsetVar) return;
|
|
1450
1453
|
let t = `var(${e.liveStickyOffsetVar}, var(${e.stickyOffsetVar}))`;
|
|
1451
|
-
return e.sticky ===
|
|
1454
|
+
return e.sticky === J.LEFT ? {
|
|
1452
1455
|
left: t,
|
|
1453
1456
|
"--s-ui-table-cell-inline-offset": t
|
|
1454
1457
|
} : { right: t };
|
|
1455
1458
|
}, c = (e) => {
|
|
1456
1459
|
let t = e.service ? Je[e.service] : void 0;
|
|
1457
1460
|
return {
|
|
1458
|
-
"s-ui-table__cell--sticky-left": e.sticky ===
|
|
1459
|
-
"s-ui-table__cell--sticky-right": e.sticky ===
|
|
1461
|
+
"s-ui-table__cell--sticky-left": e.sticky === J.LEFT,
|
|
1462
|
+
"s-ui-table__cell--sticky-right": e.sticky === J.RIGHT,
|
|
1460
1463
|
"s-ui-table__cell--last-sticky-left": e.lastStickyLeft,
|
|
1461
1464
|
"s-ui-table__cell--first-sticky-right": e.firstStickyRight,
|
|
1462
1465
|
"s-ui-table__cell--primary": e.primary,
|
|
@@ -1464,9 +1467,9 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1464
1467
|
[pn[e.align]]: !!e.column
|
|
1465
1468
|
};
|
|
1466
1469
|
}, l = (e) => {
|
|
1467
|
-
if (!
|
|
1468
|
-
let i =
|
|
1469
|
-
return e.key === (i ??
|
|
1470
|
+
if (!U(t) || !e.column) return !1;
|
|
1471
|
+
let i = U(n);
|
|
1472
|
+
return e.key === (i ?? U(r));
|
|
1470
1473
|
}, u = (e) => {
|
|
1471
1474
|
let t = ["s-ui-table__cell"];
|
|
1472
1475
|
return Object.entries(c(e)).forEach(([e, n]) => {
|
|
@@ -1502,7 +1505,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1502
1505
|
})
|
|
1503
1506
|
};
|
|
1504
1507
|
}, hn = ({ tableRootElement: e, scrollElement: t, columnDescriptors: n, columnWidths: r, enabled: i, onResizeEnd: a, remeasureRows: o }) => {
|
|
1505
|
-
let s =
|
|
1508
|
+
let s = R(), c = b(() => s.value?.columnKey), l = (e, t) => {
|
|
1506
1509
|
let n = Math.max(e.minWidth, t);
|
|
1507
1510
|
return e.maxWidth ? Math.min(e.maxWidth, n) : n;
|
|
1508
1511
|
}, u = (t, r) => {
|
|
@@ -1512,11 +1515,11 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1512
1515
|
s && i.style.setProperty(s.liveWidthVar, `${r}px`);
|
|
1513
1516
|
let c = 0;
|
|
1514
1517
|
o.forEach((e) => {
|
|
1515
|
-
e.sticky ===
|
|
1518
|
+
e.sticky === J.LEFT && e.liveStickyOffsetVar && (i.style.setProperty(e.liveStickyOffsetVar, `${c}px`), c += a(e));
|
|
1516
1519
|
});
|
|
1517
1520
|
let l = 0;
|
|
1518
1521
|
[...o].reverse().forEach((e) => {
|
|
1519
|
-
e.sticky ===
|
|
1522
|
+
e.sticky === J.RIGHT && e.liveStickyOffsetVar && (i.style.setProperty(e.liveStickyOffsetVar, `${l}px`), l += a(e));
|
|
1520
1523
|
});
|
|
1521
1524
|
}, d = () => {
|
|
1522
1525
|
let t = e.value;
|
|
@@ -1532,25 +1535,25 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1532
1535
|
let t = s.value;
|
|
1533
1536
|
t && (s.value = void 0, e && f(t.columnKey, t.liveWidth), d());
|
|
1534
1537
|
};
|
|
1535
|
-
return
|
|
1538
|
+
return me("pointermove", (e) => {
|
|
1536
1539
|
let t = s.value;
|
|
1537
1540
|
if (!t || e.pointerId !== t.pointerId) return;
|
|
1538
1541
|
let r = n.value.find((e) => e.key === t.columnKey);
|
|
1539
1542
|
if (!r) return;
|
|
1540
1543
|
let i = l(r, t.startWidth + (e.clientX - t.startClientX));
|
|
1541
1544
|
i !== t.liveWidth && (t.liveWidth = i, u(t.columnKey, i));
|
|
1542
|
-
}),
|
|
1545
|
+
}), me("pointerup", (e) => {
|
|
1543
1546
|
s.value && e.pointerId === s.value.pointerId && p(!0);
|
|
1544
|
-
}),
|
|
1547
|
+
}), me("pointercancel", () => {
|
|
1545
1548
|
p(!1);
|
|
1546
|
-
}),
|
|
1549
|
+
}), me("blur", () => {
|
|
1547
1550
|
p(!1);
|
|
1548
|
-
}),
|
|
1551
|
+
}), me("keydown", (e) => {
|
|
1549
1552
|
s.value && e.key === "Escape" && (e.preventDefault(), p(!1));
|
|
1550
1553
|
}), {
|
|
1551
1554
|
resizingColumnKey: c,
|
|
1552
1555
|
handleResizeHandlePointerdown: (e, t) => {
|
|
1553
|
-
if (!
|
|
1556
|
+
if (!U(i)) return;
|
|
1554
1557
|
let r = n.value.find((e) => e.key === t);
|
|
1555
1558
|
r?.resizable && (e.preventDefault(), e.stopPropagation(), e.isTrusted && e.target instanceof Element && e.target.setPointerCapture(e.pointerId), s.value = {
|
|
1556
1559
|
columnKey: t,
|
|
@@ -1561,7 +1564,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1561
1564
|
});
|
|
1562
1565
|
},
|
|
1563
1566
|
handleResizeHandleKeydown: (e, t) => {
|
|
1564
|
-
if (!
|
|
1567
|
+
if (!U(i) || e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
1565
1568
|
let r = n.value.find((e) => e.key === t);
|
|
1566
1569
|
if (!r?.resizable) return;
|
|
1567
1570
|
e.preventDefault();
|
|
@@ -1569,7 +1572,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1569
1572
|
s !== r.width && f(t, s);
|
|
1570
1573
|
},
|
|
1571
1574
|
handleResizeHandleDblclick: (e) => {
|
|
1572
|
-
if (!
|
|
1575
|
+
if (!U(i)) return;
|
|
1573
1576
|
let r = n.value.find((t) => t.key === e), a = t.value;
|
|
1574
1577
|
if (!r?.resizable || !a) return;
|
|
1575
1578
|
let o = r.minWidth;
|
|
@@ -1587,7 +1590,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1587
1590
|
}, v = () => {
|
|
1588
1591
|
let t = e.focusBodyRowIndex.value;
|
|
1589
1592
|
return t === void 0 ? void 0 : n.value[t];
|
|
1590
|
-
}, y = (e) => e.kind === Q.GROUP ?
|
|
1593
|
+
}, y = (e) => e.kind === Q.GROUP ? U(a) : U(r) ?? U(i), b = (t) => {
|
|
1591
1594
|
let n = t.target;
|
|
1592
1595
|
if (!(n instanceof HTMLElement)) return;
|
|
1593
1596
|
let r = n.closest("[data-section]");
|
|
@@ -1650,7 +1653,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1650
1653
|
let r = t.key === "ArrowLeft" || t.key === "ArrowRight";
|
|
1651
1654
|
if (t.altKey && t.shiftKey && r) return t.preventDefault(), f(n, t.key === "ArrowRight" ? 1 : -1), !0;
|
|
1652
1655
|
let i = t.altKey && t.key === "ArrowDown" || t.key === "ContextMenu", a = e.focusAddress.value.section === $.HEADER;
|
|
1653
|
-
return n.column && a && i ? (t.preventDefault(), d(n.key,
|
|
1656
|
+
return n.column && a && i ? (t.preventDefault(), d(n.key, U(s) !== n.key), !0) : !1;
|
|
1654
1657
|
};
|
|
1655
1658
|
return {
|
|
1656
1659
|
handleGridFocusIn: b,
|
|
@@ -1694,7 +1697,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1694
1697
|
case "Spacebar": {
|
|
1695
1698
|
t.preventDefault();
|
|
1696
1699
|
let n = e.focusedBodyRowKey.value;
|
|
1697
|
-
if (!
|
|
1700
|
+
if (!U(o) || !n) break;
|
|
1698
1701
|
l(n);
|
|
1699
1702
|
break;
|
|
1700
1703
|
}
|
|
@@ -1703,60 +1706,60 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1703
1706
|
}
|
|
1704
1707
|
};
|
|
1705
1708
|
}, _n = ({ tableId: e, enabled: t, dragMode: n, snapshot: r, scrollElement: i, isRowDraggable: a, dragExpandDelayMs: o, isExpanded: s, onHoverExpand: c, onReorder: l, onTreeDrop: u, resolveRowPreviewTitle: d }) => {
|
|
1706
|
-
let f = /* @__PURE__ */ new Map(), p =
|
|
1709
|
+
let f = /* @__PURE__ */ new Map(), p = V(), m = V(), h = V(), g = (e) => {
|
|
1707
1710
|
if (!(e instanceof HTMLElement)) return;
|
|
1708
1711
|
let t = Number(e.dataset.index);
|
|
1709
1712
|
if (Number.isInteger(t)) return r.value.flatRows[t];
|
|
1710
|
-
},
|
|
1711
|
-
if (!e || !
|
|
1712
|
-
let n =
|
|
1713
|
+
}, _ = (e) => {
|
|
1714
|
+
if (!e || !U(t) || e.kind !== Q.ROW && e.kind !== Q.GROUP) return !1;
|
|
1715
|
+
let n = U(a);
|
|
1713
1716
|
return n ? n(e.item) !== !1 : !0;
|
|
1714
|
-
},
|
|
1717
|
+
}, v = (e, t) => {
|
|
1715
1718
|
let { getSubtreeRangeByKey: n, getRowIndexByKey: i } = r.value, a = n(e), o = i(t);
|
|
1716
1719
|
return !a || o === void 0 ? !1 : o >= a[0] && o <= a[1];
|
|
1717
|
-
},
|
|
1718
|
-
let e =
|
|
1720
|
+
}, y = _e(() => {
|
|
1721
|
+
let e = b.value;
|
|
1719
1722
|
e && !s(e) && c(e);
|
|
1720
|
-
}, () =>
|
|
1721
|
-
|
|
1722
|
-
}, He, { immediate: !1 }),
|
|
1723
|
-
!(e.hasChildren || e.kind === Q.GROUP) || e.expanded ||
|
|
1724
|
-
},
|
|
1725
|
-
|
|
1726
|
-
},
|
|
1727
|
-
if (
|
|
1723
|
+
}, () => U(o) ?? 500, { immediate: !1 }), b = V(), x = _e(() => {
|
|
1724
|
+
C.value = S.value;
|
|
1725
|
+
}, He, { immediate: !1 }), S = V(), C = V(), w = (e) => {
|
|
1726
|
+
!(e.hasChildren || e.kind === Q.GROUP) || e.expanded || b.value !== e.key && (b.value = e.key, y.stop(), y.start());
|
|
1727
|
+
}, T = () => {
|
|
1728
|
+
y.stop(), b.value = void 0, x.stop(), S.value = void 0, C.value = void 0;
|
|
1729
|
+
}, E = (e, t, r, i) => {
|
|
1730
|
+
if (U(n) === Pe.TREE) {
|
|
1728
1731
|
let n = t.getBoundingClientRect(), i = Ve * n.height / 2;
|
|
1729
1732
|
if (Math.abs(r - (n.top + n.height / 2)) <= i) {
|
|
1730
|
-
if (e.kind === Q.GROUP ||
|
|
1731
|
-
|
|
1732
|
-
} else
|
|
1733
|
+
if (e.kind === Q.GROUP || C.value === e.key) return Fe.CHILD;
|
|
1734
|
+
S.value !== e.key && (S.value = e.key, x.stop(), x.start());
|
|
1735
|
+
} else S.value === e.key && (x.stop(), S.value = void 0, C.value = void 0);
|
|
1733
1736
|
}
|
|
1734
1737
|
return i === "top" ? Fe.BEFORE : Fe.AFTER;
|
|
1735
|
-
},
|
|
1738
|
+
}, D, O = (e) => {
|
|
1736
1739
|
[e, ...e.querySelectorAll("[id], [tabindex]")].forEach((e) => {
|
|
1737
1740
|
e.removeAttribute("id"), e.removeAttribute("tabindex");
|
|
1738
1741
|
});
|
|
1739
|
-
},
|
|
1742
|
+
}, k = (e) => {
|
|
1740
1743
|
let t = e.querySelector(".s-ui-table__cell--primary .s-ui-table__cell-body, .s-ui-table__cell--primary .s-ui-table__group-content"), n = t?.closest("td");
|
|
1741
1744
|
return t && n ? {
|
|
1742
1745
|
content: t,
|
|
1743
1746
|
cell: n
|
|
1744
1747
|
} : void 0;
|
|
1745
|
-
},
|
|
1748
|
+
}, A = (e, t) => {
|
|
1746
1749
|
let n = document.createElement("div");
|
|
1747
1750
|
n.className = "s-ui-table__row-drag-preview", n.setAttribute("aria-hidden", "true");
|
|
1748
|
-
let r =
|
|
1751
|
+
let r = k(e);
|
|
1749
1752
|
if (!r) return n.textContent = t ? d(t) : "", n;
|
|
1750
1753
|
let i = r.content.cloneNode(!0);
|
|
1751
|
-
return i instanceof Element &&
|
|
1752
|
-
},
|
|
1753
|
-
|
|
1754
|
-
},
|
|
1755
|
-
|
|
1756
|
-
},
|
|
1757
|
-
N(),
|
|
1754
|
+
return i instanceof Element && O(i), n.style.inlineSize = `${Math.round(r.cell.getBoundingClientRect().width)}px`, n.appendChild(i), n;
|
|
1755
|
+
}, j = (e, t) => {
|
|
1756
|
+
D && (D.style.transform = `translate(${e + 8}px, ${t + 8}px)`);
|
|
1757
|
+
}, M = (e) => {
|
|
1758
|
+
j(e.clientX, e.clientY);
|
|
1759
|
+
}, ee = (e, t, n) => {
|
|
1760
|
+
N(), D = document.createElement("div"), D.className = "s-ui-table__row-drag-layer", D.appendChild(e), document.body.appendChild(D), document.addEventListener("dragover", M), j(t, n);
|
|
1758
1761
|
}, N = () => {
|
|
1759
|
-
document.removeEventListener("dragover",
|
|
1762
|
+
document.removeEventListener("dragover", M), D?.remove(), D = void 0;
|
|
1760
1763
|
}, P = (t) => {
|
|
1761
1764
|
if (!(t instanceof HTMLElement)) {
|
|
1762
1765
|
f.forEach((e, t) => {
|
|
@@ -1765,11 +1768,11 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1765
1768
|
return;
|
|
1766
1769
|
}
|
|
1767
1770
|
if (f.has(t)) return;
|
|
1768
|
-
let n =
|
|
1771
|
+
let n = q(xe({
|
|
1769
1772
|
element: t,
|
|
1770
|
-
canDrag: () => g(
|
|
1773
|
+
canDrag: () => _(g(t)),
|
|
1771
1774
|
getInitialData: () => {
|
|
1772
|
-
let n =
|
|
1775
|
+
let n = g(t);
|
|
1773
1776
|
return {
|
|
1774
1777
|
type: ln,
|
|
1775
1778
|
tableId: e,
|
|
@@ -1778,84 +1781,88 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1778
1781
|
};
|
|
1779
1782
|
},
|
|
1780
1783
|
onGenerateDragPreview: ({ nativeSetDragImage: e, location: n }) => {
|
|
1781
|
-
let r =
|
|
1782
|
-
|
|
1784
|
+
let r = A(t, g(t)), { clientX: i, clientY: a } = n.current.input;
|
|
1785
|
+
Oe({ nativeSetDragImage: e }), ee(r, i, a);
|
|
1783
1786
|
},
|
|
1784
1787
|
onDragStart: () => {
|
|
1785
|
-
p.value =
|
|
1788
|
+
p.value = g(t)?.key, h.value = void 0;
|
|
1786
1789
|
},
|
|
1787
1790
|
onDrop: () => {
|
|
1788
|
-
p.value = void 0, m.value = void 0,
|
|
1791
|
+
p.value = void 0, m.value = void 0, T(), N();
|
|
1789
1792
|
}
|
|
1790
|
-
}),
|
|
1793
|
+
}), Se({
|
|
1791
1794
|
element: t,
|
|
1792
1795
|
canDrop: ({ source: n }) => {
|
|
1793
1796
|
if (!dn(n.data, e)) return !1;
|
|
1794
|
-
let r =
|
|
1795
|
-
return !r || r.key === n.data.rowKey ? !1 : !
|
|
1797
|
+
let r = g(t);
|
|
1798
|
+
return !r || r.key === n.data.rowKey ? !1 : !v(n.data.rowKey, r.key);
|
|
1796
1799
|
},
|
|
1797
|
-
getData: ({ input: e, element: t }) =>
|
|
1800
|
+
getData: ({ input: e, element: t }) => Ee({ rowKey: g(t)?.key ?? "" }, {
|
|
1798
1801
|
input: e,
|
|
1799
1802
|
element: t,
|
|
1800
1803
|
allowedEdges: ["top", "bottom"]
|
|
1801
1804
|
}),
|
|
1802
1805
|
onDrag: ({ self: e, location: n }) => {
|
|
1803
|
-
let r =
|
|
1806
|
+
let r = g(t);
|
|
1804
1807
|
if (!r) return;
|
|
1805
|
-
|
|
1806
|
-
let i =
|
|
1808
|
+
w(r);
|
|
1809
|
+
let i = De(e.data), a = i === "top" || i === "bottom" ? i : null, o = E(r, t, n.current.input.clientY, a), s = o === Fe.CHILD ? r.depth + 1 : r.depth, c = m.value;
|
|
1807
1810
|
(c?.targetKey !== r.key || c.action !== o || c.depth !== s) && (m.value = {
|
|
1808
1811
|
targetKey: r.key,
|
|
1809
1812
|
action: o,
|
|
1810
1813
|
depth: s
|
|
1811
|
-
})
|
|
1814
|
+
}), h.value = {
|
|
1815
|
+
targetKey: r.key,
|
|
1816
|
+
action: o,
|
|
1817
|
+
depth: s
|
|
1818
|
+
};
|
|
1812
1819
|
},
|
|
1813
1820
|
onDragLeave: () => {
|
|
1814
|
-
let e =
|
|
1815
|
-
m.value?.targetKey === e?.key && (m.value = void 0),
|
|
1821
|
+
let e = g(t);
|
|
1822
|
+
m.value?.targetKey === e?.key && (m.value = void 0), b.value === e?.key && (y.stop(), b.value = void 0);
|
|
1816
1823
|
}
|
|
1817
1824
|
}));
|
|
1818
1825
|
f.set(t, n);
|
|
1819
|
-
},
|
|
1826
|
+
}, I = Ce({
|
|
1820
1827
|
canMonitor: ({ source: t }) => dn(t.data, e),
|
|
1821
1828
|
onDrop: ({ source: t, location: i }) => {
|
|
1822
|
-
let a =
|
|
1823
|
-
if (p.value = void 0, m.value = void 0,
|
|
1824
|
-
let { flatRows: o, getRowIndexByKey: s } = r.value, c = s(t.data.rowKey), d = s(a.targetKey), f = c === void 0 ? void 0 : o[c],
|
|
1825
|
-
if (!f || !
|
|
1826
|
-
if (
|
|
1829
|
+
let a = h.value;
|
|
1830
|
+
if (h.value = void 0, p.value = void 0, m.value = void 0, T(), !i.current.dropTargets[0] || !a || !dn(t.data, e)) return;
|
|
1831
|
+
let { flatRows: o, getRowIndexByKey: s } = r.value, c = s(t.data.rowKey), d = s(a.targetKey), f = c === void 0 ? void 0 : o[c], g = d === void 0 ? void 0 : o[d];
|
|
1832
|
+
if (!f || !g || f.key === g.key || v(f.key, g.key)) return;
|
|
1833
|
+
if (U(n) === Pe.FLAT) {
|
|
1827
1834
|
if (a.action === Fe.CHILD) return;
|
|
1828
1835
|
l({
|
|
1829
1836
|
action: a.action,
|
|
1830
1837
|
sourceKey: f.key,
|
|
1831
1838
|
sourceItem: f.item,
|
|
1832
|
-
targetKey:
|
|
1833
|
-
targetItem:
|
|
1839
|
+
targetKey: g.key,
|
|
1840
|
+
targetItem: g.item,
|
|
1834
1841
|
sourceIndex: f.index,
|
|
1835
|
-
targetIndex:
|
|
1842
|
+
targetIndex: g.index
|
|
1836
1843
|
});
|
|
1837
1844
|
return;
|
|
1838
1845
|
}
|
|
1839
|
-
let
|
|
1846
|
+
let _ = a.action === Fe.CHILD, y = _ ? g.key : g.parentKey, b = y === void 0 ? void 0 : s(y), x = b === void 0 ? void 0 : o[b];
|
|
1840
1847
|
u({
|
|
1841
1848
|
action: a.action,
|
|
1842
1849
|
sourceKey: f.key,
|
|
1843
1850
|
sourceItem: f.item,
|
|
1844
|
-
targetKey:
|
|
1845
|
-
targetItem:
|
|
1846
|
-
parentKey:
|
|
1847
|
-
parentItem:
|
|
1848
|
-
depth:
|
|
1851
|
+
targetKey: g.key,
|
|
1852
|
+
targetItem: g.item,
|
|
1853
|
+
parentKey: y,
|
|
1854
|
+
parentItem: x?.item,
|
|
1855
|
+
depth: _ ? g.depth + 1 : g.depth
|
|
1849
1856
|
});
|
|
1850
1857
|
}
|
|
1851
1858
|
}), L;
|
|
1852
|
-
return
|
|
1853
|
-
L?.(), L = void 0, t && (L =
|
|
1859
|
+
return G(i, (t) => {
|
|
1860
|
+
L?.(), L = void 0, t && (L = ke({
|
|
1854
1861
|
element: t,
|
|
1855
1862
|
canScroll: ({ source: t }) => dn(t.data, e)
|
|
1856
1863
|
}));
|
|
1857
|
-
}, { immediate: !0 }),
|
|
1858
|
-
|
|
1864
|
+
}, { immediate: !0 }), F(() => {
|
|
1865
|
+
I(), L?.(), N(), f.forEach((e) => {
|
|
1859
1866
|
e();
|
|
1860
1867
|
}), f.clear();
|
|
1861
1868
|
}), {
|
|
@@ -1883,7 +1890,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1883
1890
|
rowHeight: t ? t.end - t.start : void 0
|
|
1884
1891
|
});
|
|
1885
1892
|
};
|
|
1886
|
-
if (!
|
|
1893
|
+
if (!U(t)) return u.forEach(x), y;
|
|
1887
1894
|
let S = r.value, C = n.value.filter((e) => {
|
|
1888
1895
|
let t = i(e);
|
|
1889
1896
|
return !t || t.end > 0 && t.start < S;
|
|
@@ -1930,8 +1937,8 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1930
1937
|
}, yn = ({ selected: e, cascade: t, treeIndex: n, groupRow: r, disabledKey: i, isItemSelectable: a }) => {
|
|
1931
1938
|
let o = b(() => new Set(e.value)), s = (e) => n.value.nodeByKey.get(e)?.parentKey, c = (e) => {
|
|
1932
1939
|
let t = n.value.nodeByKey.get(e);
|
|
1933
|
-
if (!t || Ht(t.item,
|
|
1934
|
-
let o =
|
|
1940
|
+
if (!t || Ht(t.item, U(r)) || Ht(t.item, U(i))) return !1;
|
|
1941
|
+
let o = U(a);
|
|
1935
1942
|
return o ? o(t.item) !== !1 : !0;
|
|
1936
1943
|
}, l = b(() => {
|
|
1937
1944
|
let e = [];
|
|
@@ -1964,7 +1971,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1964
1971
|
}, _ = (n) => {
|
|
1965
1972
|
if (!c(n)) return;
|
|
1966
1973
|
let r = new Set(e.value);
|
|
1967
|
-
if (!
|
|
1974
|
+
if (!U(t)) {
|
|
1968
1975
|
r.has(n) ? r.delete(n) : r.add(n), e.value = [...r];
|
|
1969
1976
|
return;
|
|
1970
1977
|
}
|
|
@@ -1996,10 +2003,10 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
1996
2003
|
}
|
|
1997
2004
|
};
|
|
1998
2005
|
}, bn = ({ 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 }) => {
|
|
1999
|
-
let m = b(() =>
|
|
2006
|
+
let m = b(() => U(e).find((e) => e.key === t.value)), h = b(() => U(i)?.columnKey ?? t.value), g = b(() => U(a) ?? t.value), _ = b(() => U(o) ?? t.value), v = b(() => U(s) ?? t.value), y = (e) => n.value.get(e.key)?.subtreeSize ?? 0, x = (e) => Wt(e.item, U(r)), S = (e) => {
|
|
2000
2007
|
let t = Ut(e.item, m.value?.value ?? m.value?.key);
|
|
2001
2008
|
return t === void 0 ? void 0 : String(t);
|
|
2002
|
-
}, C = (e) => ({ paddingInlineStart: `calc(var(--s-ui-dimension-4) + ${e *
|
|
2009
|
+
}, C = (e) => ({ paddingInlineStart: `calc(var(--s-ui-dimension-4) + ${e * U(c)}px)` }), w = (e) => {
|
|
2003
2010
|
f({
|
|
2004
2011
|
parentKey: e.parentKey ?? "",
|
|
2005
2012
|
parentItem: e.item,
|
|
@@ -2013,7 +2020,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2013
2020
|
click: () => {
|
|
2014
2021
|
w(e);
|
|
2015
2022
|
}
|
|
2016
|
-
}), E = b(() => new Set(
|
|
2023
|
+
}), E = b(() => new Set(U(l))), D = (e) => e.parentKey ? E.value.has(e.parentKey) : !1, O = (e) => {
|
|
2017
2024
|
!e.parentKey || D(e) || p({
|
|
2018
2025
|
key: e.parentKey,
|
|
2019
2026
|
item: e.item
|
|
@@ -2026,7 +2033,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2026
2033
|
loadMore: () => {
|
|
2027
2034
|
O(e);
|
|
2028
2035
|
}
|
|
2029
|
-
}), A = (e) =>
|
|
2036
|
+
}), A = (e) => U(u)?.[e];
|
|
2030
2037
|
return {
|
|
2031
2038
|
depthFooterColumnKey: h,
|
|
2032
2039
|
groupColumnKey: g,
|
|
@@ -2050,7 +2057,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2050
2057
|
return t ? `s-ui-table__aggregate-cell--tone-${t}` : void 0;
|
|
2051
2058
|
},
|
|
2052
2059
|
getFooterSlotScope: (t) => ({
|
|
2053
|
-
column:
|
|
2060
|
+
column: U(e).find((e) => e.key === t) ?? { key: t },
|
|
2054
2061
|
footerValue: A(t)
|
|
2055
2062
|
})
|
|
2056
2063
|
};
|
|
@@ -2103,7 +2110,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2103
2110
|
} : { column: { key: e.key } }
|
|
2104
2111
|
};
|
|
2105
2112
|
}, Sn = ({ windowIndexes: e, visibleRange: t, getRowKey: n, pinnedRowKey: r, enabled: i }) => {
|
|
2106
|
-
let a = /* @__PURE__ */ new Set(), o =
|
|
2113
|
+
let a = /* @__PURE__ */ new Set(), o = V(/* @__PURE__ */ new Set()), s = [], c = 12, l = 0, u = !1, d = !1, f = 0, p = "", m = () => {
|
|
2107
2114
|
l = performance.now(), u = !0, o.value = new Set(a);
|
|
2108
2115
|
}, h = (e) => {
|
|
2109
2116
|
let t = s.splice(0, e);
|
|
@@ -2118,7 +2125,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2118
2125
|
e < 20 && (c = Math.min(64, c + 2));
|
|
2119
2126
|
}, _ = () => {
|
|
2120
2127
|
u && (u = !1, g(performance.now() - l));
|
|
2121
|
-
}, v =
|
|
2128
|
+
}, v = he(() => {
|
|
2122
2129
|
f = 0, _(), d ? d = !1 : h(c) > 0 && m(), s.length === 0 && v.pause();
|
|
2123
2130
|
}, { immediate: !1 }), y = (e) => {
|
|
2124
2131
|
let n = t.value, r = n ? (n.startIndex + n.endIndex) / 2 : 0;
|
|
@@ -2130,7 +2137,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2130
2137
|
r !== void 0 && !a.has(r) && t.push(r);
|
|
2131
2138
|
}), t;
|
|
2132
2139
|
}, x = (e) => {
|
|
2133
|
-
let t =
|
|
2140
|
+
let t = U(r), n = t === void 0 ? -1 : e.indexOf(t);
|
|
2134
2141
|
return n > 0 && (e.splice(n, 1), e.unshift(t ?? "")), e;
|
|
2135
2142
|
}, S = (e) => {
|
|
2136
2143
|
let t = new Set(e.map(n)), r = 0;
|
|
@@ -2143,89 +2150,89 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2143
2150
|
(s.length > 0 || e > 0) && v.resume();
|
|
2144
2151
|
}, T = (e) => `${e[0]}:${e[e.length - 1]}:${e.length}`, E = (e) => {
|
|
2145
2152
|
let t = T(e);
|
|
2146
|
-
if (!
|
|
2153
|
+
if (!U(i) || t === p) return;
|
|
2147
2154
|
p = t, s = x(b(e));
|
|
2148
2155
|
let n = S(e), r = h(Math.max(0, c - f));
|
|
2149
2156
|
f += r, C(n + r), w(r);
|
|
2150
2157
|
};
|
|
2151
|
-
return
|
|
2158
|
+
return G(e, E, {
|
|
2152
2159
|
flush: "sync",
|
|
2153
2160
|
immediate: !0
|
|
2154
|
-
}),
|
|
2161
|
+
}), G(() => U(i), () => {
|
|
2155
2162
|
p = "", E(e.value);
|
|
2156
2163
|
}), {
|
|
2157
|
-
isRowHydrated: (e) => !
|
|
2164
|
+
isRowHydrated: (e) => !U(i) || e === U(r) || o.value.has(e),
|
|
2158
2165
|
hydratedKeys: o
|
|
2159
2166
|
};
|
|
2160
2167
|
}, Cn = {
|
|
2161
2168
|
pinned: [],
|
|
2162
2169
|
sliding: []
|
|
2163
|
-
}, wn = ({ snapshot: e, visibleRange: t,
|
|
2164
|
-
let
|
|
2165
|
-
let
|
|
2166
|
-
if (!n) return;
|
|
2167
|
-
let { flatRows:
|
|
2168
|
-
if (!
|
|
2169
|
-
let
|
|
2170
|
-
for (;
|
|
2171
|
-
let e =
|
|
2170
|
+
}, wn = ({ snapshot: e, visibleRange: t, groupRowSticky: n, depthFooterSticky: r, bottomVisibleRowIndex: i, getRowOffset: a }) => {
|
|
2171
|
+
let o = b(() => {
|
|
2172
|
+
let r = t.value;
|
|
2173
|
+
if (!r || !U(n)) return;
|
|
2174
|
+
let { flatRows: i, getRowIndexByKey: a } = e.value, o = i[r.startIndex];
|
|
2175
|
+
if (!o) return;
|
|
2176
|
+
let s = o.kind === Q.GROUP ? o.key : o.parentKey;
|
|
2177
|
+
for (; s;) {
|
|
2178
|
+
let e = a(s), t = e === void 0 ? void 0 : i[e];
|
|
2172
2179
|
if (!t) return;
|
|
2173
2180
|
if (t.kind === Q.GROUP) return t.index;
|
|
2174
|
-
|
|
2181
|
+
s = t.parentKey;
|
|
2175
2182
|
}
|
|
2176
|
-
}),
|
|
2183
|
+
}), s = (e) => e.kind === Q.DEPTH_FOOTER || e.kind === Q.LOAD_MORE ? e.parentKey : e.key, c = (t) => {
|
|
2177
2184
|
let { flatRows: n, getRowIndexByKey: r } = e.value, i = r(t);
|
|
2178
2185
|
return i === void 0 ? void 0 : n[i]?.parentKey;
|
|
2179
|
-
},
|
|
2180
|
-
let { flatRows: n, depthFooterIndexByParentKey: r } = e.value, i = n[t], a = i ?
|
|
2186
|
+
}, l = (t) => {
|
|
2187
|
+
let { flatRows: n, depthFooterIndexByParentKey: r } = e.value, i = n[t], a = i ? s(i) : void 0;
|
|
2181
2188
|
for (; a;) {
|
|
2182
2189
|
let e = r.get(a);
|
|
2183
2190
|
if (e !== void 0) return e;
|
|
2184
|
-
a =
|
|
2191
|
+
a = c(a);
|
|
2185
2192
|
}
|
|
2186
|
-
}, l = (e, t) => {
|
|
2187
|
-
let n = i(e)?.start;
|
|
2188
|
-
return n !== void 0 && n - t < 1200;
|
|
2189
2193
|
}, u = (e, t) => {
|
|
2194
|
+
let n = a(e)?.start;
|
|
2195
|
+
return n !== void 0 && n - t < 1200;
|
|
2196
|
+
}, d = (e, t) => {
|
|
2190
2197
|
let n = [e], r = e;
|
|
2191
|
-
for (; n.length < 6 &&
|
|
2192
|
-
let e =
|
|
2198
|
+
for (; n.length < 6 && u(r, t);) {
|
|
2199
|
+
let e = l(r + 1);
|
|
2193
2200
|
if (e === void 0) return n;
|
|
2194
2201
|
n.push(e), r = e;
|
|
2195
2202
|
}
|
|
2196
2203
|
return n;
|
|
2197
|
-
},
|
|
2198
|
-
let t =
|
|
2199
|
-
return t === void 0 ? [] :
|
|
2200
|
-
},
|
|
2204
|
+
}, f = (e) => {
|
|
2205
|
+
let t = l(e);
|
|
2206
|
+
return t === void 0 ? [] : d(t, a(e)?.end ?? 0);
|
|
2207
|
+
}, p = (t, n) => {
|
|
2201
2208
|
let { flatRows: r } = e.value;
|
|
2202
2209
|
return [t - 2, t - 1].filter((e) => r[e]?.kind === Q.DEPTH_FOOTER && !n.includes(e));
|
|
2203
|
-
},
|
|
2204
|
-
let e =
|
|
2205
|
-
if (!
|
|
2206
|
-
let t =
|
|
2210
|
+
}, m = b(() => {
|
|
2211
|
+
let e = i.value;
|
|
2212
|
+
if (!U(r) || e === void 0) return Cn;
|
|
2213
|
+
let t = f(e);
|
|
2207
2214
|
return {
|
|
2208
2215
|
pinned: t,
|
|
2209
|
-
sliding:
|
|
2216
|
+
sliding: p(e, t)
|
|
2210
2217
|
};
|
|
2211
|
-
}),
|
|
2212
|
-
let { pinned: e, sliding: t } =
|
|
2218
|
+
}), h = b(() => {
|
|
2219
|
+
let { pinned: e, sliding: t } = m.value;
|
|
2213
2220
|
return [...t, ...e];
|
|
2214
2221
|
});
|
|
2215
2222
|
return {
|
|
2216
|
-
activeGroupRowIndex:
|
|
2217
|
-
activeDepthFooterRowIndex: b(() =>
|
|
2218
|
-
activeDepthFooterRowIndexes:
|
|
2223
|
+
activeGroupRowIndex: o,
|
|
2224
|
+
activeDepthFooterRowIndex: b(() => m.value.pinned[0]),
|
|
2225
|
+
activeDepthFooterRowIndexes: h,
|
|
2219
2226
|
leavingDepthFooterRowIndex: b(() => {
|
|
2220
|
-
let [e, t] =
|
|
2227
|
+
let [e, t] = m.value.pinned;
|
|
2221
2228
|
return t === void 0 ? void 0 : e;
|
|
2222
2229
|
}),
|
|
2223
|
-
slidingDepthFooterRowIndexes: b(() =>
|
|
2224
|
-
farDepthFooterRowIndexes: b(() =>
|
|
2230
|
+
slidingDepthFooterRowIndexes: b(() => m.value.sliding),
|
|
2231
|
+
farDepthFooterRowIndexes: b(() => m.value.pinned.slice(2))
|
|
2225
2232
|
};
|
|
2226
2233
|
}, Tn = (e) => typeof e == "number" ? `${e}px` : e || void 0, En = ({ tfootBarStackHeight: e, hasFooterValues: t, scrollClientWidth: n, columnCssVars: r, totalWidth: i, height: a, maxHeight: o }) => ({
|
|
2227
2234
|
rootStyle: b(() => {
|
|
2228
|
-
let i =
|
|
2235
|
+
let i = U(n);
|
|
2229
2236
|
return {
|
|
2230
2237
|
"--s-ui-table-header-height": "40px",
|
|
2231
2238
|
"--s-ui-table-row-min-height": "40px",
|
|
@@ -2234,14 +2241,14 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2234
2241
|
"--s-ui-table-bottom-stack": `${e.value}px`,
|
|
2235
2242
|
"--s-ui-table-footer-bar-height": "40px",
|
|
2236
2243
|
"--s-ui-table-create-row-height": "40px",
|
|
2237
|
-
"--s-ui-table-aggregate-offset":
|
|
2244
|
+
"--s-ui-table-aggregate-offset": U(t) ? "40px" : "0px",
|
|
2238
2245
|
...i > 0 ? { "--s-ui-table-viewport-width": `${i}px` } : {},
|
|
2239
2246
|
...r.value
|
|
2240
2247
|
};
|
|
2241
2248
|
}),
|
|
2242
2249
|
scrollStyle: b(() => ({
|
|
2243
|
-
height: Tn(
|
|
2244
|
-
maxHeight: Tn(
|
|
2250
|
+
height: Tn(U(a)),
|
|
2251
|
+
maxHeight: Tn(U(o))
|
|
2245
2252
|
})),
|
|
2246
2253
|
tableStyle: b(() => ({ width: `max(100%, ${i.value}px)` }))
|
|
2247
2254
|
}), Dn, On = () => {
|
|
@@ -2256,8 +2263,8 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2256
2263
|
let r = Math.max(t, Be);
|
|
2257
2264
|
return n > 4 * r ? r : 0;
|
|
2258
2265
|
}, jn = (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, Mn = (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, Nn = (e, t) => e.active === t.active && e.maxUiScrollTop === t.maxUiScrollTop && e.maxModelScrollTop === t.maxModelScrollTop && e.edgeZone === t.edgeZone, Pn = (e, t) => !Nn(e, t) && (e.active || t.active), Fn = ({ scrollElement: e, totalSize: t, viewportHeight: n, extraHeight: r, onRescale: i }) => {
|
|
2259
|
-
let a =
|
|
2260
|
-
let e =
|
|
2266
|
+
let a = V(0), o = b(() => {
|
|
2267
|
+
let e = U(t), i = U(r), a = U(n), o = kn(e), s = e > o, c = s ? o : e, l = Math.max(1, c + i - a), u = Math.max(0, e + i - a), d = An(s, a, l);
|
|
2261
2268
|
return {
|
|
2262
2269
|
active: s,
|
|
2263
2270
|
uiHeight: c,
|
|
@@ -2266,32 +2273,32 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2266
2273
|
edgeZone: d,
|
|
2267
2274
|
ratio: s ? (u - 2 * d) / (l - 2 * d) : 1
|
|
2268
2275
|
};
|
|
2269
|
-
}), s = (e) => jn(o.value, e), c = (e) => Mn(o.value, e), l =
|
|
2270
|
-
|
|
2276
|
+
}), s = (e) => jn(o.value, e), c = (e) => Mn(o.value, e), l = V(0), u = V(-1);
|
|
2277
|
+
me(e, "scroll", () => {
|
|
2271
2278
|
let t = e.value;
|
|
2272
2279
|
t && (a.value = t.scrollTop, t.scrollTop !== u.value && (u.value = t.scrollTop, l.value = s(t.scrollTop)));
|
|
2273
2280
|
}, { passive: !0 });
|
|
2274
2281
|
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) => {
|
|
2275
2282
|
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);
|
|
2276
|
-
}, v = (t) => t === "y" ?
|
|
2283
|
+
}, v = (t) => t === "y" ? U(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) => {
|
|
2277
2284
|
let n = e.value;
|
|
2278
2285
|
if (!n || !S(t)) return;
|
|
2279
2286
|
let { maxModelScrollTop: r } = o.value, i = d(n), a = Math.max(0, Math.min(r, i + x(t, "y")));
|
|
2280
2287
|
a !== i && (t.preventDefault(), _(n, c(a), a), n.scrollLeft += x(t, "x"));
|
|
2281
2288
|
}, w, T = (t) => {
|
|
2282
|
-
w?.(), w = t ?
|
|
2289
|
+
w?.(), w = t ? me(e, "wheel", C, { passive: !1 }) : void 0;
|
|
2283
2290
|
};
|
|
2284
|
-
|
|
2291
|
+
fe(() => {
|
|
2285
2292
|
w?.();
|
|
2286
2293
|
});
|
|
2287
2294
|
let E = (e, t) => e.scrollTop === u.value ? l.value : jn(t, e.scrollTop);
|
|
2288
|
-
return
|
|
2289
|
-
|
|
2295
|
+
return I(() => {
|
|
2296
|
+
G(o, (t, n) => {
|
|
2290
2297
|
let r = e.value;
|
|
2291
2298
|
if (!r || !Pn(t, n)) return;
|
|
2292
2299
|
let a = E(r, n);
|
|
2293
2300
|
_(r, Mn(t, a), a), i?.(a);
|
|
2294
|
-
}),
|
|
2301
|
+
}), G(g, T, { immediate: !0 });
|
|
2295
2302
|
}), {
|
|
2296
2303
|
uiScrollTop: a,
|
|
2297
2304
|
modelScrollOffset: f,
|
|
@@ -2313,30 +2320,30 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2313
2320
|
onRescale: (e) => {
|
|
2314
2321
|
f?.(e, !1);
|
|
2315
2322
|
}
|
|
2316
|
-
}), m =
|
|
2323
|
+
}), m = V(0), h = 0, g = (e, t, n) => {
|
|
2317
2324
|
let r = Math.round((e - h) / n);
|
|
2318
2325
|
h = e, m.value = t ? Math.max(-24, Math.min(24, r)) : 0;
|
|
2319
|
-
}, _ =
|
|
2320
|
-
let n =
|
|
2326
|
+
}, _ = be(b(() => {
|
|
2327
|
+
let n = U(r);
|
|
2321
2328
|
return {
|
|
2322
|
-
count:
|
|
2323
|
-
enabled:
|
|
2329
|
+
count: U(e),
|
|
2330
|
+
enabled: U(t),
|
|
2324
2331
|
getScrollElement: () => o.value,
|
|
2325
2332
|
estimateSize: (e) => i?.(e) ?? n,
|
|
2326
2333
|
getItemKey: s,
|
|
2327
|
-
overscan:
|
|
2334
|
+
overscan: U(a),
|
|
2328
2335
|
shouldAdjustScrollPositionOnItemSizeChange: () => !1,
|
|
2329
|
-
observeElementOffset: (e, t) => (f = t,
|
|
2336
|
+
observeElementOffset: (e, t) => (f = t, ye(e, (e, r) => {
|
|
2330
2337
|
let i = p.uiToModel(e);
|
|
2331
2338
|
g(i, r, n), t(i, r);
|
|
2332
2339
|
})),
|
|
2333
2340
|
scrollToFn: (e, t, n) => {
|
|
2334
|
-
|
|
2341
|
+
ve(p.modelToUi(e + (t.adjustments ?? 0)), { behavior: t.behavior }, n);
|
|
2335
2342
|
}
|
|
2336
2343
|
};
|
|
2337
|
-
})), v = b(() =>
|
|
2344
|
+
})), v = b(() => U(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) => {
|
|
2338
2345
|
let r = t[0], i = t[t.length - 1];
|
|
2339
|
-
if (!(!r || !i)) return n > 0 ? [i.index + 1, Math.min(
|
|
2346
|
+
if (!(!r || !i)) return n > 0 ? [i.index + 1, Math.min(U(e) - 1, i.index + n)] : [Math.max(0, r.index + n), r.index - 1];
|
|
2340
2347
|
}, C = b(() => {
|
|
2341
2348
|
let e = v.value, t = e.map((e) => e.index), n = m.value, r = n === 0 ? void 0 : S(e, n);
|
|
2342
2349
|
if (!r) return t;
|
|
@@ -2347,7 +2354,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2347
2354
|
let t = Number(e.dataset.index);
|
|
2348
2355
|
return Number.isInteger(t) ? t : void 0;
|
|
2349
2356
|
}, E = (e) => {
|
|
2350
|
-
if (!
|
|
2357
|
+
if (!U(t) || !U(n)) return;
|
|
2351
2358
|
let r = o.value;
|
|
2352
2359
|
if (!r) return;
|
|
2353
2360
|
let i = r.querySelectorAll("tr[data-index]"), a = [];
|
|
@@ -2355,7 +2362,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2355
2362
|
let n = T(t);
|
|
2356
2363
|
n === void 0 || !(t instanceof HTMLElement) || (!e || !w.has(s(n))) && a.push(t);
|
|
2357
2364
|
}), a.length === 0) return;
|
|
2358
|
-
let c = _.value.measurementsCache, l = r.getBoundingClientRect().top +
|
|
2365
|
+
let c = _.value.measurementsCache, l = r.getBoundingClientRect().top + U(d), u = p.resolveModelOffset(r), f = [], m = Infinity;
|
|
2359
2366
|
a.forEach((e) => {
|
|
2360
2367
|
let t = Number(e.dataset.index), n = e.getBoundingClientRect();
|
|
2361
2368
|
f.push([t, Math.round(n.height)]), n.bottom > l + 1 && t < m && (m = t);
|
|
@@ -2368,23 +2375,23 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2368
2375
|
e < m && n !== void 0 && (h += t - n), _.value.resizeItem(e, t);
|
|
2369
2376
|
}), h !== 0 && p.setScrollTop(r, p.modelToUi(u + h), u + h);
|
|
2370
2377
|
};
|
|
2371
|
-
|
|
2378
|
+
G(C, () => E(!0), { flush: "post" });
|
|
2372
2379
|
let D = () => {
|
|
2373
2380
|
E(!0);
|
|
2374
2381
|
}, O = () => {
|
|
2375
2382
|
w.clear(), E(!1);
|
|
2376
2383
|
};
|
|
2377
|
-
|
|
2384
|
+
ge(o, () => {
|
|
2378
2385
|
O();
|
|
2379
|
-
}),
|
|
2386
|
+
}), G(() => U(c), () => {
|
|
2380
2387
|
w.clear(), E(!1);
|
|
2381
2388
|
}, { flush: "post" });
|
|
2382
2389
|
let k = (e, t) => {
|
|
2383
2390
|
if (e !== "auto") return e;
|
|
2384
|
-
let n =
|
|
2391
|
+
let n = U(l) - U(u), r = p.modelScrollOffset.value;
|
|
2385
2392
|
return t.end >= r + n ? "end" : t.start <= r ? "start" : void 0;
|
|
2386
2393
|
}, A = (e, t) => {
|
|
2387
|
-
let n =
|
|
2394
|
+
let n = U(l) - U(u);
|
|
2388
2395
|
return e === "start" ? t.start : e === "end" ? t.end - n : t.start - (n - t.size) / 2;
|
|
2389
2396
|
}, j = (e, t) => {
|
|
2390
2397
|
let n = _.value.measurementsCache, r = n[Math.max(0, Math.min(e, n.length - 1))];
|
|
@@ -2401,9 +2408,9 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2401
2408
|
}
|
|
2402
2409
|
let r = j(e, t);
|
|
2403
2410
|
r !== void 0 && p.setScrollTop(n, p.modelToUi(r), r);
|
|
2404
|
-
},
|
|
2405
|
-
if (!(!
|
|
2406
|
-
}),
|
|
2411
|
+
}, ee = b(() => {
|
|
2412
|
+
if (!(!U(t) || v.value.length === 0)) return _.value.range ?? void 0;
|
|
2413
|
+
}), N = (e) => {
|
|
2407
2414
|
let t = _.value.measurementsCache;
|
|
2408
2415
|
if (t.length === 0) return;
|
|
2409
2416
|
let n = 0, r = t.length - 1;
|
|
@@ -2413,7 +2420,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2413
2420
|
a.end <= e ? n = i + 1 : r = i;
|
|
2414
2421
|
}
|
|
2415
2422
|
return n;
|
|
2416
|
-
},
|
|
2423
|
+
}, P = (e) => {
|
|
2417
2424
|
let t = _.value.measurementsCache[e];
|
|
2418
2425
|
if (t) return {
|
|
2419
2426
|
start: t.start,
|
|
@@ -2431,10 +2438,10 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2431
2438
|
measureWindowRows: O,
|
|
2432
2439
|
measureNewRows: D,
|
|
2433
2440
|
scrollToIndex: M,
|
|
2434
|
-
visibleRange:
|
|
2435
|
-
getRowOffset:
|
|
2441
|
+
visibleRange: ee,
|
|
2442
|
+
getRowOffset: P,
|
|
2436
2443
|
getRowUiOffset: (e) => {
|
|
2437
|
-
let t =
|
|
2444
|
+
let t = P(e);
|
|
2438
2445
|
if (!t) return;
|
|
2439
2446
|
let n = p.uiShift.value;
|
|
2440
2447
|
return {
|
|
@@ -2442,7 +2449,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2442
2449
|
end: t.end - n
|
|
2443
2450
|
};
|
|
2444
2451
|
},
|
|
2445
|
-
getRowIndexAtOffset:
|
|
2452
|
+
getRowIndexAtOffset: N
|
|
2446
2453
|
};
|
|
2447
2454
|
}, Ln = [
|
|
2448
2455
|
"role",
|
|
@@ -2506,6 +2513,14 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2506
2513
|
},
|
|
2507
2514
|
childrenKey: { default: "children" },
|
|
2508
2515
|
groupRow: { type: [String, Function] },
|
|
2516
|
+
groupRowSticky: {
|
|
2517
|
+
type: Boolean,
|
|
2518
|
+
default: !0
|
|
2519
|
+
},
|
|
2520
|
+
columnsManagerBodySticky: {
|
|
2521
|
+
type: Boolean,
|
|
2522
|
+
default: !0
|
|
2523
|
+
},
|
|
2509
2524
|
groupTotalKey: {},
|
|
2510
2525
|
groupContentColumnKey: {},
|
|
2511
2526
|
disabledKey: {},
|
|
@@ -2617,19 +2632,19 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2617
2632
|
"update:sortState"
|
|
2618
2633
|
]),
|
|
2619
2634
|
setup(e, { expose: t, emit: n }) {
|
|
2620
|
-
let s =
|
|
2635
|
+
let s = re(e, "modelValue"), c = re(e, "selected"), p = re(e, "expanded"), m = re(e, "columnOrder"), h = re(e, "columnWidths"), O = re(e, "hiddenColumns"), A = re(e, "sortState"), j = n, F = ie(), { t: I } = de(), R = ne(), te = ae("scrollElementRef"), U = ae("tableElementRef"), se = ae("tableRootRef"), { width: ue, height: fe } = pe(te), { primaryColumnKey: me, columnDescriptors: he, columnCssVars: ge, totalWidth: _e, columnCount: ve } = ct({
|
|
2621
2636
|
columns: () => e.columns,
|
|
2622
2637
|
columnOrder: m,
|
|
2623
2638
|
columnWidths: h,
|
|
2624
2639
|
hiddenColumns: O,
|
|
2625
|
-
hasIndicator: () => !!
|
|
2640
|
+
hasIndicator: () => !!F.indicator,
|
|
2626
2641
|
hasCheckbox: () => e.selectable,
|
|
2627
|
-
hasRightEdge: () => !!
|
|
2642
|
+
hasRightEdge: () => !!F["right-edge"],
|
|
2628
2643
|
hasColumnsManager: () => e.columnsManageable,
|
|
2629
2644
|
columnsResizable: () => e.columnsResizable,
|
|
2630
2645
|
columnsDraggable: () => e.columnsDraggable,
|
|
2631
|
-
viewportWidth: () =>
|
|
2632
|
-
}), { treeIndex:
|
|
2646
|
+
viewportWidth: () => ue.value
|
|
2647
|
+
}), { treeIndex: ye, snapshot: be, flatRows: q, toggleExpanded: xe, expandAll: Se, collapseAll: Ce } = Kt({
|
|
2633
2648
|
items: () => e.items,
|
|
2634
2649
|
itemKey: () => e.itemKey,
|
|
2635
2650
|
childrenKey: () => e.childrenKey,
|
|
@@ -2637,32 +2652,35 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2637
2652
|
expanded: p,
|
|
2638
2653
|
depthFooter: () => e.depthFooter,
|
|
2639
2654
|
hasMoreChildrenKey: () => e.hasMoreChildrenKey
|
|
2640
|
-
}), { leadingDescriptors:
|
|
2641
|
-
columnDescriptors:
|
|
2655
|
+
}), { leadingDescriptors: we, trailingDescriptors: Te, headerCells: Ee, getStickyCellStyle: De, getHeaderCellClasses: Oe, leadingCellPlans: ke, trailingCellPlans: J, rowCellPlans: Y } = mn({
|
|
2656
|
+
columnDescriptors: he,
|
|
2642
2657
|
hasTreeStructure: () => Ae.value,
|
|
2643
2658
|
expandColumnKey: () => e.expandColumnKey,
|
|
2644
|
-
primaryColumnKey:
|
|
2645
|
-
}), X = b(() =>
|
|
2659
|
+
primaryColumnKey: me
|
|
2660
|
+
}), X = b(() => he.value.length + 1), Ae = b(() => ye.value.expandableKeys.length > 0), je = b(() => Ae.value ? "treegrid" : "grid"), Me = b(() => q.value.length + 1 + +!!e.creationRow + +!!e.footerValues), Ie = b(() => e.virtual), Le = b(() => ({
|
|
2661
|
+
"s-ui-table--rows-fixed": e.rowHeightMode === Ne.FIXED,
|
|
2662
|
+
"s-ui-table--columns-manager-body-static": !e.columnsManagerBodySticky
|
|
2663
|
+
})), Re = b(() => {
|
|
2646
2664
|
let t = 0;
|
|
2647
2665
|
return e.footerValues && (t += 40), e.creationRow && (t += 40), t;
|
|
2648
2666
|
}), ze = [];
|
|
2649
|
-
|
|
2667
|
+
G(q, (e) => {
|
|
2650
2668
|
ze = e;
|
|
2651
2669
|
}, {
|
|
2652
2670
|
flush: "sync",
|
|
2653
2671
|
immediate: !0
|
|
2654
2672
|
});
|
|
2655
2673
|
let { windowIndexes: Be, uiTotalSize: Ve, modelScrollOffset: He, scrollToIndex: Ue, visibleRange: Ge, getRowOffset: Je, getRowUiOffset: Ye, getRowIndexAtOffset: Xe, measureWindowRows: Ze, measureNewRows: Qe } = In({
|
|
2656
|
-
rowCount: () =>
|
|
2674
|
+
rowCount: () => q.value.length,
|
|
2657
2675
|
enabled: Ie,
|
|
2658
2676
|
autoMeasure: () => e.rowHeightMode === Ne.AUTO,
|
|
2659
2677
|
estimateRowSize: () => e.estimateRowSize,
|
|
2660
2678
|
estimateRowSizeByIndex: void 0,
|
|
2661
2679
|
overscan: () => e.overscan,
|
|
2662
|
-
scrollElement:
|
|
2680
|
+
scrollElement: te,
|
|
2663
2681
|
getRowKey: (e) => ze[e]?.key ?? e,
|
|
2664
|
-
rowsVersion:
|
|
2665
|
-
viewportHeight: () =>
|
|
2682
|
+
rowsVersion: q,
|
|
2683
|
+
viewportHeight: () => fe.value,
|
|
2666
2684
|
extraHeight: () => 40 + Re.value,
|
|
2667
2685
|
headerHeight: () => 40
|
|
2668
2686
|
}), { isRowHydrated: $e, hydratedKeys: et } = Sn({
|
|
@@ -2672,11 +2690,11 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2672
2690
|
pinnedRowKey: () => s.value,
|
|
2673
2691
|
enabled: () => Ie.value && e.scrollSeekPlaceholders
|
|
2674
2692
|
});
|
|
2675
|
-
|
|
2693
|
+
G(et, Qe, { flush: "post" });
|
|
2676
2694
|
let { resizingColumnKey: tt, handleResizeHandlePointerdown: nt, handleResizeHandleKeydown: rt, handleResizeHandleDblclick: it } = hn({
|
|
2677
|
-
tableRootElement:
|
|
2678
|
-
scrollElement:
|
|
2679
|
-
columnDescriptors:
|
|
2695
|
+
tableRootElement: se,
|
|
2696
|
+
scrollElement: te,
|
|
2697
|
+
columnDescriptors: he,
|
|
2680
2698
|
columnWidths: h,
|
|
2681
2699
|
enabled: () => e.columnsResizable,
|
|
2682
2700
|
onResizeEnd: (e, t) => {
|
|
@@ -2689,10 +2707,10 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2689
2707
|
Ze();
|
|
2690
2708
|
}
|
|
2691
2709
|
}), at = b(() => e.rowsDragMode ? e.rowsDragMode : Ae.value ? Pe.TREE : Pe.FLAT), { registerColumnHeaderElement: ot, draggingColumnKey: st, dropLineStyle: lt } = fn({
|
|
2692
|
-
tableId:
|
|
2693
|
-
tableRootElement:
|
|
2710
|
+
tableId: R,
|
|
2711
|
+
tableRootElement: se,
|
|
2694
2712
|
enabled: () => e.columnsDraggable,
|
|
2695
|
-
columnDescriptors:
|
|
2713
|
+
columnDescriptors: he,
|
|
2696
2714
|
onReorder: (t, n, r) => {
|
|
2697
2715
|
let i = m.value?.length ? [...m.value] : e.columns.map((e) => e.key);
|
|
2698
2716
|
e.columns.forEach((e) => {
|
|
@@ -2711,16 +2729,16 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2711
2729
|
}), ut = (e, t) => {
|
|
2712
2730
|
(e instanceof Element || e === null) && ot(t, e);
|
|
2713
2731
|
}, { registerRowElement: dt, draggingRowKey: pt, dropIndicator: mt } = _n({
|
|
2714
|
-
tableId:
|
|
2732
|
+
tableId: R,
|
|
2715
2733
|
enabled: () => e.rowsDraggable,
|
|
2716
2734
|
dragMode: at,
|
|
2717
|
-
snapshot:
|
|
2718
|
-
scrollElement:
|
|
2735
|
+
snapshot: be,
|
|
2736
|
+
scrollElement: te,
|
|
2719
2737
|
isRowDraggable: () => e.isRowDraggable,
|
|
2720
2738
|
dragExpandDelayMs: () => e.dragExpandDelayMs,
|
|
2721
2739
|
isExpanded: (e) => p.value.includes(e),
|
|
2722
2740
|
onHoverExpand: (e) => {
|
|
2723
|
-
|
|
2741
|
+
xe(e);
|
|
2724
2742
|
},
|
|
2725
2743
|
onReorder: (e) => {
|
|
2726
2744
|
j("rowsReorder", e);
|
|
@@ -2735,17 +2753,18 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2735
2753
|
let t = mt.value;
|
|
2736
2754
|
if (!(!t || t.targetKey !== e)) return t.action === Fe.CHILD ? "inside" : t.action === Fe.BEFORE ? "before" : "after";
|
|
2737
2755
|
}, { activeGroupRowIndex: _t, activeDepthFooterRowIndex: vt, activeDepthFooterRowIndexes: bt, leavingDepthFooterRowIndex: xt, slidingDepthFooterRowIndexes: St, farDepthFooterRowIndexes: Ct } = wn({
|
|
2738
|
-
snapshot:
|
|
2756
|
+
snapshot: be,
|
|
2739
2757
|
visibleRange: Ge,
|
|
2758
|
+
groupRowSticky: () => e.groupRowSticky,
|
|
2740
2759
|
depthFooterSticky: () => e.depthFooter?.sticky !== !1,
|
|
2741
2760
|
bottomVisibleRowIndex: b(() => {
|
|
2742
|
-
if (!Ie.value ||
|
|
2743
|
-
let e = He.value +
|
|
2761
|
+
if (!Ie.value || fe.value === 0) return;
|
|
2762
|
+
let e = He.value + fe.value - 40 - Re.value;
|
|
2744
2763
|
return Xe(Math.max(0, e));
|
|
2745
2764
|
}),
|
|
2746
2765
|
getRowOffset: Je
|
|
2747
2766
|
}), { renderEntries: wt } = vn({
|
|
2748
|
-
flatRows:
|
|
2767
|
+
flatRows: q,
|
|
2749
2768
|
virtualEnabled: Ie,
|
|
2750
2769
|
windowIndexes: Be,
|
|
2751
2770
|
uiTotalSize: Ve,
|
|
@@ -2756,14 +2775,14 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2756
2775
|
slidingDepthFooterRowIndexes: St,
|
|
2757
2776
|
farDepthFooterRowIndexes: Ct,
|
|
2758
2777
|
activeRowIndex: b(() => {
|
|
2759
|
-
if (s.value) return
|
|
2778
|
+
if (s.value) return be.value.getRowIndexByKey(s.value);
|
|
2760
2779
|
})
|
|
2761
|
-
}), Tt = b(() => !e.loading &&
|
|
2780
|
+
}), Tt = b(() => !e.loading && q.value.length === 0), { rootStyle: Et, scrollStyle: Ot, tableStyle: kt } = En({
|
|
2762
2781
|
tfootBarStackHeight: Re,
|
|
2763
2782
|
hasFooterValues: () => !!e.footerValues,
|
|
2764
|
-
scrollClientWidth: () =>
|
|
2765
|
-
columnCssVars:
|
|
2766
|
-
totalWidth:
|
|
2783
|
+
scrollClientWidth: () => ue.value,
|
|
2784
|
+
columnCssVars: ge,
|
|
2785
|
+
totalWidth: _e,
|
|
2767
2786
|
height: () => e.height,
|
|
2768
2787
|
maxHeight: () => e.maxHeight
|
|
2769
2788
|
}), { getColumnSortDirection: At, getColumnSortIndex: jt, applySortCycle: Nt, applySortExact: Pt, getHeaderAriaSort: Ft, getHeaderSlotScope: It } = xn({
|
|
@@ -2771,7 +2790,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2771
2790
|
onSortChange: (e) => {
|
|
2772
2791
|
j("sortChange", e);
|
|
2773
2792
|
}
|
|
2774
|
-
}), Lt =
|
|
2793
|
+
}), Lt = V(), Rt = (e, t) => {
|
|
2775
2794
|
Lt.value = t ? e : void 0;
|
|
2776
2795
|
}, zt = (t, n) => {
|
|
2777
2796
|
if (!e.columnsResizable || !t.resizable) return;
|
|
@@ -2783,7 +2802,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2783
2802
|
key: t.key,
|
|
2784
2803
|
width: r
|
|
2785
2804
|
}));
|
|
2786
|
-
}, Bt =
|
|
2805
|
+
}, Bt = V(!1), Vt = b(() => e.columns.filter((e) => e.key !== me.value && (e.hideable ?? !0))), Ut = (e) => (O.value ?? []).includes(e), Wt = b(() => {
|
|
2787
2806
|
let e = Vt.value.map((e) => {
|
|
2788
2807
|
let t = Ut(e.key);
|
|
2789
2808
|
return {
|
|
@@ -2802,7 +2821,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2802
2821
|
}, Jt = yn({
|
|
2803
2822
|
selected: c,
|
|
2804
2823
|
cascade: () => e.cascadeSelection,
|
|
2805
|
-
treeIndex:
|
|
2824
|
+
treeIndex: ye,
|
|
2806
2825
|
groupRow: () => e.groupRow,
|
|
2807
2826
|
disabledKey: () => e.disabledKey,
|
|
2808
2827
|
isItemSelectable: () => e.isItemSelectable
|
|
@@ -2830,7 +2849,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2830
2849
|
c,
|
|
2831
2850
|
l,
|
|
2832
2851
|
u,
|
|
2833
|
-
|
|
2852
|
+
he.value,
|
|
2834
2853
|
ln.value,
|
|
2835
2854
|
pn.value,
|
|
2836
2855
|
d,
|
|
@@ -2852,7 +2871,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2852
2871
|
placeholder: t,
|
|
2853
2872
|
memoKeys: en(e, t)
|
|
2854
2873
|
};
|
|
2855
|
-
})), an = b(() => Object.keys(
|
|
2874
|
+
})), an = b(() => Object.keys(F).filter((e) => e.startsWith("cell:"))), on = (e) => `s-ui-table-${R}-row-${e}`, cn = (e) => ({
|
|
2856
2875
|
...e,
|
|
2857
2876
|
selected: Xt(e.key),
|
|
2858
2877
|
indeterminate: !1,
|
|
@@ -2860,15 +2879,15 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2860
2879
|
disabled: $t(e),
|
|
2861
2880
|
group: e.kind === Q.GROUP,
|
|
2862
2881
|
toggleExpanded: () => {
|
|
2863
|
-
|
|
2882
|
+
xe(e.key);
|
|
2864
2883
|
},
|
|
2865
2884
|
toggleSelected: () => {
|
|
2866
2885
|
Qt(e.key);
|
|
2867
2886
|
}
|
|
2868
2887
|
}), { depthFooterColumnKey: ln, groupColumnKey: un, creationColumnKey: dn, loadMoreColumnKey: pn, getGroupCount: Cn, getGroupTotal: Tn, getGroupTitle: Dn, getDepthIndentStyle: On, emitDepthFooterClick: kn, getDepthFooterSlotScope: An, isLoadMoreRowLoading: jn, emitLoadMoreChildren: Mn, getLoadMoreSlotScope: Nn, getFooterValueText: Pn, getFooterToneClass: Fn, getFooterSlotScope: ir } = bn({
|
|
2869
2888
|
columns: () => e.columns,
|
|
2870
|
-
primaryColumnKey:
|
|
2871
|
-
treeNodeByKey: b(() =>
|
|
2889
|
+
primaryColumnKey: me,
|
|
2890
|
+
treeNodeByKey: b(() => ye.value.nodeByKey),
|
|
2872
2891
|
groupTotalKey: () => e.groupTotalKey,
|
|
2873
2892
|
depthFooter: () => e.depthFooter,
|
|
2874
2893
|
groupContentColumnKey: () => e.groupContentColumnKey,
|
|
@@ -2889,7 +2908,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2889
2908
|
count: Cn(e),
|
|
2890
2909
|
total: Tn(e)
|
|
2891
2910
|
}), or = (t, n) => {
|
|
2892
|
-
$t(t) || (s.value = t.key, e.expandOnClick && (t.hasChildren || t.kind === Q.GROUP) &&
|
|
2911
|
+
$t(t) || (s.value = t.key, e.expandOnClick && (t.hasChildren || t.kind === Q.GROUP) && xe(t.key), j("rowClick", {
|
|
2893
2912
|
key: t.key,
|
|
2894
2913
|
item: t.item,
|
|
2895
2914
|
event: n
|
|
@@ -2902,7 +2921,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2902
2921
|
});
|
|
2903
2922
|
}, cr = b(() => {
|
|
2904
2923
|
let e = /* @__PURE__ */ new Set();
|
|
2905
|
-
return
|
|
2924
|
+
return he.value.forEach((t) => {
|
|
2906
2925
|
t.column && e.add(t.key);
|
|
2907
2926
|
}), e;
|
|
2908
2927
|
}), lr = (e, t, n) => {
|
|
@@ -2913,10 +2932,10 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2913
2932
|
event: n
|
|
2914
2933
|
});
|
|
2915
2934
|
}, ur = (e) => e ? !$t(e) : !1, dr = b(() => {
|
|
2916
|
-
let t =
|
|
2935
|
+
let t = fe.value - 40 - Re.value;
|
|
2917
2936
|
return Math.max(1, Math.floor(t / e.estimateRowSize));
|
|
2918
2937
|
});
|
|
2919
|
-
f(() =>
|
|
2938
|
+
f(() => te.value, {
|
|
2920
2939
|
distance: () => e.endReachedDistance,
|
|
2921
2940
|
canLoadMore: () => e.canLoadMore?.() ?? !0,
|
|
2922
2941
|
onEndReached: () => {
|
|
@@ -2924,7 +2943,7 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2924
2943
|
}
|
|
2925
2944
|
});
|
|
2926
2945
|
let fr = (e, t) => {
|
|
2927
|
-
let n =
|
|
2946
|
+
let n = be.value.getRowIndexByKey(e);
|
|
2928
2947
|
if (n !== void 0) {
|
|
2929
2948
|
if (Ie.value) {
|
|
2930
2949
|
Ue(n, t?.align ?? "auto");
|
|
@@ -2932,13 +2951,13 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2932
2951
|
}
|
|
2933
2952
|
document.getElementById(on(e))?.scrollIntoView({ block: t?.align === "center" ? "center" : "nearest" });
|
|
2934
2953
|
}
|
|
2935
|
-
}, pr = (e) => `s-ui-table-${
|
|
2936
|
-
tableRootElement:
|
|
2937
|
-
tableElement:
|
|
2938
|
-
scrollElement:
|
|
2939
|
-
columnDescriptors:
|
|
2940
|
-
flatRows:
|
|
2941
|
-
snapshot:
|
|
2954
|
+
}, pr = (e) => `s-ui-table-${R}-cell-${e.section}-${e.rowKey ?? ""}-${e.columnKey}`, mr = ft({
|
|
2955
|
+
tableRootElement: se,
|
|
2956
|
+
tableElement: U,
|
|
2957
|
+
scrollElement: te,
|
|
2958
|
+
columnDescriptors: he,
|
|
2959
|
+
flatRows: q,
|
|
2960
|
+
snapshot: be,
|
|
2942
2961
|
groupColumnKey: un,
|
|
2943
2962
|
depthFooterColumnKey: ln,
|
|
2944
2963
|
loadMoreColumnKey: pn,
|
|
@@ -2952,22 +2971,22 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2952
2971
|
s.value = e;
|
|
2953
2972
|
},
|
|
2954
2973
|
scrollToRowIndex: (e) => {
|
|
2955
|
-
let t =
|
|
2974
|
+
let t = q.value[e];
|
|
2956
2975
|
t && fr(t.key);
|
|
2957
2976
|
}
|
|
2958
|
-
}), hr = `s-ui-table-${
|
|
2977
|
+
}), hr = `s-ui-table-${R}-cell-${$.BODY}-`, gr = `s-ui-table-${R}-cell-${$.CREATION}-`, _r = (e) => mr.focusedBodyRowKey.value === e ? mr.focusAddress.value.columnKey : void 0, vr = (e) => {
|
|
2959
2978
|
let t = mr.focusAddress.value;
|
|
2960
2979
|
return t.section === e ? t.columnKey : void 0;
|
|
2961
2980
|
}, yr = (e, t, n) => mr.getCellTabIndex(e, t, n), { handleGridFocusIn: br, handleGridKeydown: xr } = gn({
|
|
2962
2981
|
gridFocus: mr,
|
|
2963
|
-
columnDescriptors:
|
|
2964
|
-
flatRows:
|
|
2982
|
+
columnDescriptors: he,
|
|
2983
|
+
flatRows: q,
|
|
2965
2984
|
expandColumnKey: () => e.expandColumnKey,
|
|
2966
|
-
primaryColumnKey:
|
|
2985
|
+
primaryColumnKey: me,
|
|
2967
2986
|
groupColumnKey: un,
|
|
2968
2987
|
selectable: () => e.selectable,
|
|
2969
2988
|
openMenuColumnKey: Lt,
|
|
2970
|
-
toggleExpanded:
|
|
2989
|
+
toggleExpanded: xe,
|
|
2971
2990
|
toggleRowSelected: (e) => {
|
|
2972
2991
|
Jt.toggleRow(e);
|
|
2973
2992
|
},
|
|
@@ -2986,82 +3005,82 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
2986
3005
|
});
|
|
2987
3006
|
return t({
|
|
2988
3007
|
focusNavigation: async () => {
|
|
2989
|
-
mr.focusAddressNow(mr.focusAddress.value), await
|
|
3008
|
+
mr.focusAddressNow(mr.focusAddress.value), await ee();
|
|
2990
3009
|
},
|
|
2991
3010
|
scrollToRow: fr,
|
|
2992
|
-
expandAll:
|
|
2993
|
-
collapseAll:
|
|
3011
|
+
expandAll: Se,
|
|
3012
|
+
collapseAll: Ce,
|
|
2994
3013
|
clearSelection: () => {
|
|
2995
3014
|
Jt.clearSelection();
|
|
2996
3015
|
},
|
|
2997
|
-
getScrollElement: () =>
|
|
2998
|
-
}), (t, n) => (
|
|
3016
|
+
getScrollElement: () => te.value ?? void 0
|
|
3017
|
+
}), (t, n) => (L(), C("div", {
|
|
2999
3018
|
ref_key: "tableRootRef",
|
|
3000
|
-
ref:
|
|
3001
|
-
class:
|
|
3002
|
-
style:
|
|
3019
|
+
ref: se,
|
|
3020
|
+
class: N(["s-ui-table", Le.value]),
|
|
3021
|
+
style: P(W(Et))
|
|
3003
3022
|
}, [w("div", {
|
|
3004
3023
|
ref_key: "scrollElementRef",
|
|
3005
|
-
ref:
|
|
3024
|
+
ref: te,
|
|
3006
3025
|
class: "s-ui-table__scroll",
|
|
3007
|
-
style:
|
|
3026
|
+
style: P(W(Ot))
|
|
3008
3027
|
}, [w("table", {
|
|
3009
3028
|
class: "s-ui-table__table",
|
|
3010
|
-
style:
|
|
3029
|
+
style: P(W(kt)),
|
|
3011
3030
|
role: je.value,
|
|
3012
3031
|
"aria-rowcount": Me.value,
|
|
3013
|
-
"aria-colcount":
|
|
3032
|
+
"aria-colcount": W(ve),
|
|
3014
3033
|
"aria-busy": e.loading || e.loadingMore || void 0,
|
|
3015
3034
|
ref_key: "tableElementRef",
|
|
3016
|
-
ref:
|
|
3035
|
+
ref: U,
|
|
3017
3036
|
tabindex: "-1",
|
|
3018
|
-
onKeydown: n[5] ||= (...e) =>
|
|
3019
|
-
onFocusin: n[6] ||= (...e) =>
|
|
3037
|
+
onKeydown: n[5] ||= (...e) => W(xr) && W(xr)(...e),
|
|
3038
|
+
onFocusin: n[6] ||= (...e) => W(br) && W(br)(...e)
|
|
3020
3039
|
}, [
|
|
3021
3040
|
w("colgroup", null, [
|
|
3022
|
-
(
|
|
3041
|
+
(L(!0), C(y, null, z(W(we), (e) => (L(), C("col", {
|
|
3023
3042
|
key: e.key,
|
|
3024
|
-
style:
|
|
3043
|
+
style: P({ width: `var(${e.liveWidthVar}, var(${e.widthVar}))` })
|
|
3025
3044
|
}, null, 4))), 128)),
|
|
3026
3045
|
n[7] ||= w("col", { class: "s-ui-table__filler-col" }, null, -1),
|
|
3027
|
-
(
|
|
3046
|
+
(L(!0), C(y, null, z(W(Te), (e) => (L(), C("col", {
|
|
3028
3047
|
key: e.key,
|
|
3029
|
-
style:
|
|
3048
|
+
style: P({ width: `var(${e.liveWidthVar}, var(${e.widthVar}))` })
|
|
3030
3049
|
}, null, 4))), 128))
|
|
3031
3050
|
]),
|
|
3032
|
-
w("thead", Rn, [w("tr", zn, [(
|
|
3051
|
+
w("thead", Rn, [w("tr", zn, [(L(!0), C(y, null, z(W(Ee), ({ key: e, descriptor: s }) => (L(), C(y, { key: e }, [s ? (L(), C("th", {
|
|
3033
3052
|
key: 1,
|
|
3034
3053
|
id: pr({
|
|
3035
|
-
section:
|
|
3054
|
+
section: W($).HEADER,
|
|
3036
3055
|
columnKey: s.key
|
|
3037
3056
|
}),
|
|
3038
3057
|
ref_for: !0,
|
|
3039
3058
|
ref: (e) => ut(e, s.key),
|
|
3040
|
-
class:
|
|
3041
|
-
style:
|
|
3059
|
+
class: N(["s-ui-table__header-cell", [W(Oe)(s), { "s-ui-table__header-cell--dragging": W(st) === s.key }]]),
|
|
3060
|
+
style: P(W(De)(s)),
|
|
3042
3061
|
"data-column-key": s.key,
|
|
3043
|
-
"data-section":
|
|
3062
|
+
"data-section": W($).HEADER,
|
|
3044
3063
|
"aria-colindex": s.colIndex,
|
|
3045
|
-
"aria-sort":
|
|
3046
|
-
tabindex: yr(
|
|
3064
|
+
"aria-sort": W(Ft)(s),
|
|
3065
|
+
tabindex: yr(W($).HEADER, void 0, s.key),
|
|
3047
3066
|
scope: "col"
|
|
3048
|
-
}, [s.column ? (
|
|
3067
|
+
}, [s.column ? (L(), x(Dt, {
|
|
3049
3068
|
key: 0,
|
|
3050
3069
|
descriptor: s,
|
|
3051
|
-
"sort-direction":
|
|
3052
|
-
"sort-index":
|
|
3070
|
+
"sort-direction": W(At)(s.key),
|
|
3071
|
+
"sort-index": W(jt)(s.key),
|
|
3053
3072
|
"menu-open": Lt.value === s.key,
|
|
3054
3073
|
"onUpdate:menuOpen": (e) => Rt(s.key, e),
|
|
3055
|
-
onSortToggle: (e) =>
|
|
3056
|
-
onSortSet: (e) =>
|
|
3074
|
+
onSortToggle: (e) => W(Nt)(s.key, e),
|
|
3075
|
+
onSortSet: (e) => W(Pt)(s.key, e),
|
|
3057
3076
|
onHide: (e) => qt(s.key)
|
|
3058
|
-
}, T({ _: 2 }, [
|
|
3077
|
+
}, T({ _: 2 }, [W(F)[`header:${s.key}`] ? {
|
|
3059
3078
|
name: "default",
|
|
3060
|
-
fn:
|
|
3079
|
+
fn: K(() => [B(t.$slots, `header:${s.key}`, M({ ref_for: !0 }, W(It)(s)))]),
|
|
3061
3080
|
key: "0"
|
|
3062
|
-
} : void 0,
|
|
3081
|
+
} : void 0, W(F)[`header-menu:${s.key}`] ? {
|
|
3063
3082
|
name: "menu",
|
|
3064
|
-
fn:
|
|
3083
|
+
fn: K(() => [B(t.$slots, `header-menu:${s.key}`, M({ ref_for: !0 }, W(It)(s)))]),
|
|
3065
3084
|
key: "1"
|
|
3066
3085
|
} : void 0]), 1032, [
|
|
3067
3086
|
"descriptor",
|
|
@@ -3072,32 +3091,32 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
3072
3091
|
"onSortToggle",
|
|
3073
3092
|
"onSortSet",
|
|
3074
3093
|
"onHide"
|
|
3075
|
-
])) : s.service ===
|
|
3094
|
+
])) : s.service === W(qe).CHECKBOX ? (L(), x(We, {
|
|
3076
3095
|
key: 1,
|
|
3077
|
-
class:
|
|
3078
|
-
"model-value":
|
|
3079
|
-
indeterminate:
|
|
3080
|
-
"screen-reader-label":
|
|
3081
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
3096
|
+
class: N(["s-ui-table__header-checkbox", { "s-ui-table__header-checkbox--active": W(Yt) !== W(Z).UNCHECKED }]),
|
|
3097
|
+
"model-value": W(Yt) === W(Z).CHECKED,
|
|
3098
|
+
indeterminate: W(Yt) === W(Z).INDETERMINATE,
|
|
3099
|
+
"screen-reader-label": W(Yt) === W(Z).CHECKED ? W(I)("table.deselectAll") : W(I)("table.selectAll"),
|
|
3100
|
+
"onUpdate:modelValue": n[0] ||= (e) => W(Jt).toggleSelectAll()
|
|
3082
3101
|
}, null, 8, [
|
|
3083
3102
|
"class",
|
|
3084
3103
|
"model-value",
|
|
3085
3104
|
"indeterminate",
|
|
3086
3105
|
"screen-reader-label"
|
|
3087
|
-
])) : s.service ===
|
|
3106
|
+
])) : s.service === W(qe).COLUMNS_MANAGER ? (L(), C("div", Hn, [D(W(u), {
|
|
3088
3107
|
modelValue: Bt.value,
|
|
3089
3108
|
"onUpdate:modelValue": n[1] ||= (e) => Bt.value = e,
|
|
3090
|
-
placement:
|
|
3109
|
+
placement: W(l).BOTTOM_END,
|
|
3091
3110
|
shift: "",
|
|
3092
3111
|
"fit-viewport": ""
|
|
3093
3112
|
}, {
|
|
3094
|
-
trigger:
|
|
3113
|
+
trigger: K(({ toggle: e }) => [D(W(o), {
|
|
3095
3114
|
class: "s-ui-table__columns-manager-button",
|
|
3096
|
-
appearance:
|
|
3097
|
-
variant:
|
|
3098
|
-
size:
|
|
3115
|
+
appearance: W(i).BARE,
|
|
3116
|
+
variant: W(r).MAIN,
|
|
3117
|
+
size: W(a).SMALL,
|
|
3099
3118
|
icon: "tablePlus",
|
|
3100
|
-
"aria-label":
|
|
3119
|
+
"aria-label": W(I)("table.manageColumns"),
|
|
3101
3120
|
tabindex: "-1",
|
|
3102
3121
|
onClick: (t) => e()
|
|
3103
3122
|
}, null, 8, [
|
|
@@ -3107,30 +3126,30 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
3107
3126
|
"aria-label",
|
|
3108
3127
|
"onClick"
|
|
3109
3128
|
])]),
|
|
3110
|
-
content:
|
|
3129
|
+
content: K(() => [D(W(d), {
|
|
3111
3130
|
class: "s-ui-table__columns-menu",
|
|
3112
3131
|
width: 300
|
|
3113
3132
|
}, {
|
|
3114
|
-
default:
|
|
3133
|
+
default: K(() => [B(t.$slots, "columns-menu", {
|
|
3115
3134
|
columns: Vt.value,
|
|
3116
3135
|
isColumnHidden: Ut,
|
|
3117
3136
|
toggleColumn: Gt
|
|
3118
|
-
}, () => [(
|
|
3137
|
+
}, () => [(L(!0), C(y, null, z(Wt.value, (e, t) => (L(), C(y, { key: t }, [t > 0 ? (L(), x(W(le), {
|
|
3119
3138
|
key: 0,
|
|
3120
3139
|
class: "s-ui-table__columns-separator"
|
|
3121
|
-
})) : S("", !0), (
|
|
3140
|
+
})) : S("", !0), (L(!0), C(y, null, z(e, (e) => (L(), x(W(v), {
|
|
3122
3141
|
key: e.column.key,
|
|
3123
|
-
class:
|
|
3124
|
-
size:
|
|
3125
|
-
"label-placement":
|
|
3142
|
+
class: N(["s-ui-table__columns-item", e.classes]),
|
|
3143
|
+
size: W(_).SMALL,
|
|
3144
|
+
"label-placement": W(g).LEFT,
|
|
3126
3145
|
"model-value": !e.hidden,
|
|
3127
3146
|
"onUpdate:modelValue": (t) => Gt(e.column.key)
|
|
3128
3147
|
}, {
|
|
3129
|
-
default:
|
|
3148
|
+
default: K(() => [w("span", Un, [e.column.icon ? (L(), x(W(ce), {
|
|
3130
3149
|
key: 0,
|
|
3131
3150
|
name: e.column.icon,
|
|
3132
3151
|
size: 16
|
|
3133
|
-
}, null, 8, ["name"])) : S("", !0), w("span", Wn,
|
|
3152
|
+
}, null, 8, ["name"])) : S("", !0), w("span", Wn, H(e.column.title ?? e.column.key), 1)])]),
|
|
3134
3153
|
_: 2
|
|
3135
3154
|
}, 1032, [
|
|
3136
3155
|
"class",
|
|
@@ -3142,84 +3161,84 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
3142
3161
|
_: 3
|
|
3143
3162
|
})]),
|
|
3144
3163
|
_: 3
|
|
3145
|
-
}, 8, ["modelValue", "placement"])])) : S("", !0), s.resizable ? (
|
|
3164
|
+
}, 8, ["modelValue", "placement"])])) : S("", !0), s.resizable ? (L(), C("span", {
|
|
3146
3165
|
key: 3,
|
|
3147
|
-
class:
|
|
3166
|
+
class: N(["s-ui-table__resize-handle", { "s-ui-table__resize-handle--active": W(tt) === s.key }]),
|
|
3148
3167
|
role: "separator",
|
|
3149
3168
|
"aria-orientation": "vertical",
|
|
3150
|
-
"aria-label":
|
|
3169
|
+
"aria-label": W(I)("table.resizeColumn"),
|
|
3151
3170
|
tabindex: "-1",
|
|
3152
|
-
onPointerdown: (e) =>
|
|
3153
|
-
onKeydown: (e) =>
|
|
3154
|
-
onDblclick: (e) =>
|
|
3155
|
-
onClick: n[2] ||=
|
|
3156
|
-
}, null, 42, Gn)) : S("", !0)], 14, Vn)) : (
|
|
3171
|
+
onPointerdown: (e) => W(nt)(e, s.key),
|
|
3172
|
+
onKeydown: (e) => W(rt)(e, s.key),
|
|
3173
|
+
onDblclick: (e) => W(it)(s.key),
|
|
3174
|
+
onClick: n[2] ||= oe(() => {}, ["stop"])
|
|
3175
|
+
}, null, 42, Gn)) : S("", !0)], 14, Vn)) : (L(), C("th", Bn))], 64))), 128))])]),
|
|
3157
3176
|
w("tbody", Kn, [
|
|
3158
|
-
Tt.value ? (
|
|
3177
|
+
Tt.value ? (L(), C("tr", qn, [w("td", {
|
|
3159
3178
|
class: "s-ui-table__empty-cell",
|
|
3160
3179
|
colspan: X.value
|
|
3161
|
-
}, [w("div", Yn, [
|
|
3162
|
-
e.loading ? (
|
|
3180
|
+
}, [w("div", Yn, [B(t.$slots, "empty", {}, () => [w("span", Xn, H(W(I)("table.empty")), 1)])])], 8, Jn)])) : S("", !0),
|
|
3181
|
+
e.loading ? (L(!0), C(y, { key: 1 }, z(e.skeletonRowCount, (e) => (L(), x(sn, {
|
|
3163
3182
|
key: `skeleton-${e}`,
|
|
3164
|
-
"leading-plans":
|
|
3165
|
-
"trailing-plans":
|
|
3166
|
-
}, T({ _: 2 }, [
|
|
3183
|
+
"leading-plans": W(ke),
|
|
3184
|
+
"trailing-plans": W(J)
|
|
3185
|
+
}, T({ _: 2 }, [W(F)["skeleton-row"] ? {
|
|
3167
3186
|
name: "default",
|
|
3168
|
-
fn:
|
|
3187
|
+
fn: K((e) => [B(t.$slots, "skeleton-row", { column: e.descriptor.column })]),
|
|
3169
3188
|
key: "0"
|
|
3170
|
-
} : void 0]), 1032, ["leading-plans", "trailing-plans"]))), 128)) : (
|
|
3171
|
-
let
|
|
3172
|
-
if (
|
|
3173
|
-
let
|
|
3189
|
+
} : void 0]), 1032, ["leading-plans", "trailing-plans"]))), 128)) : (L(!0), C(y, { key: 2 }, z(nn.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) => {
|
|
3190
|
+
let R = b;
|
|
3191
|
+
if (ee && ee.el && ee.key === c && k(ee, R)) return ee;
|
|
3192
|
+
let V = (L(), C(y, { key: c }, [l ? (L(), C("tr", Zn, [w("td", {
|
|
3174
3193
|
class: "s-ui-table__spacer-cell",
|
|
3175
3194
|
colspan: X.value,
|
|
3176
|
-
style:
|
|
3177
|
-
}, null, 12, Qn)])) : n && n.kind ===
|
|
3195
|
+
style: P({ height: `${u}px` })
|
|
3196
|
+
}, null, 12, Qn)])) : n && n.kind === W(Q).GROUP ? (L(), x(yt, {
|
|
3178
3197
|
key: 1,
|
|
3179
3198
|
id: on(n.key),
|
|
3180
3199
|
stuck: f,
|
|
3181
3200
|
row: n,
|
|
3182
3201
|
"dnd-ref": e.rowsDraggable ? ht : void 0,
|
|
3183
|
-
dragging:
|
|
3202
|
+
dragging: W(pt) === n.key,
|
|
3184
3203
|
"drop-position": gt(n.key),
|
|
3185
3204
|
"row-index": n.index,
|
|
3186
|
-
"leading-plans":
|
|
3187
|
-
"trailing-plans":
|
|
3188
|
-
"group-column-key":
|
|
3205
|
+
"leading-plans": W(ke),
|
|
3206
|
+
"trailing-plans": W(J),
|
|
3207
|
+
"group-column-key": W(un),
|
|
3189
3208
|
"tree-indent": e.treeIndent,
|
|
3190
|
-
count:
|
|
3191
|
-
total:
|
|
3192
|
-
title:
|
|
3209
|
+
count: W(Cn)(n),
|
|
3210
|
+
total: W(Tn)(n),
|
|
3211
|
+
title: W(Dn)(n),
|
|
3193
3212
|
"extra-row-style": e.rowStyle?.(n.item, n),
|
|
3194
3213
|
expanded: n.expanded,
|
|
3195
3214
|
active: s.value === n.key,
|
|
3196
3215
|
"cell-id-prefix": hr,
|
|
3197
3216
|
"focus-column-key": _r(n.key),
|
|
3198
|
-
onToggle: (e) =>
|
|
3217
|
+
onToggle: (e) => W(xe)(n.key),
|
|
3199
3218
|
onRowClick: (e) => or(n, e),
|
|
3200
3219
|
onMenuOpen: (e) => j("groupMenuOpen", {
|
|
3201
3220
|
key: n.key,
|
|
3202
3221
|
item: n.item
|
|
3203
3222
|
})
|
|
3204
3223
|
}, T({ _: 2 }, [
|
|
3205
|
-
|
|
3224
|
+
W(F)["group-menu"] ? {
|
|
3206
3225
|
name: "menu",
|
|
3207
|
-
fn:
|
|
3226
|
+
fn: K(() => [B(t.$slots, "group-menu", M({ ref_for: !0 }, ar(n)))]),
|
|
3208
3227
|
key: "0"
|
|
3209
3228
|
} : void 0,
|
|
3210
|
-
|
|
3229
|
+
W(F)["group-row"] ? {
|
|
3211
3230
|
name: "row",
|
|
3212
|
-
fn:
|
|
3231
|
+
fn: K(() => [B(t.$slots, "group-row", M({ ref_for: !0 }, ar(n)))]),
|
|
3213
3232
|
key: "1"
|
|
3214
3233
|
} : void 0,
|
|
3215
|
-
|
|
3234
|
+
W(F)["group-title"] ? {
|
|
3216
3235
|
name: "title",
|
|
3217
|
-
fn:
|
|
3236
|
+
fn: K(() => [B(t.$slots, "group-title", M({ ref_for: !0 }, ar(n)))]),
|
|
3218
3237
|
key: "2"
|
|
3219
3238
|
} : void 0,
|
|
3220
|
-
|
|
3239
|
+
W(F)["group-actions"] ? {
|
|
3221
3240
|
name: "actions",
|
|
3222
|
-
fn:
|
|
3241
|
+
fn: K(() => [B(t.$slots, "group-actions", M({ ref_for: !0 }, ar(n)))]),
|
|
3223
3242
|
key: "3"
|
|
3224
3243
|
} : void 0
|
|
3225
3244
|
]), 1032, [
|
|
@@ -3244,29 +3263,29 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
3244
3263
|
"onToggle",
|
|
3245
3264
|
"onRowClick",
|
|
3246
3265
|
"onMenuOpen"
|
|
3247
|
-
])) : n && n.kind ===
|
|
3266
|
+
])) : n && n.kind === W(Q).DEPTH_FOOTER ? (L(), x(Ke, {
|
|
3248
3267
|
key: 2,
|
|
3249
|
-
class:
|
|
3268
|
+
class: N(["s-ui-table__depth-footer-row", {
|
|
3250
3269
|
"s-ui-table__depth-footer-row--stuck": p,
|
|
3251
3270
|
"s-ui-table__depth-footer-row--stuck-leaving": m,
|
|
3252
3271
|
"s-ui-table__depth-footer-row--stuck-sliding": h,
|
|
3253
3272
|
"s-ui-table__depth-footer-row--stuck-covered": g !== void 0,
|
|
3254
3273
|
"s-ui-table__depth-footer-row--stuck-covered-far": _
|
|
3255
3274
|
}]),
|
|
3256
|
-
style:
|
|
3275
|
+
style: P(tn(g)),
|
|
3257
3276
|
"data-index": n.index,
|
|
3258
3277
|
"aria-rowindex": n.index + 2,
|
|
3259
|
-
cells:
|
|
3260
|
-
"content-column-key":
|
|
3278
|
+
cells: W(Y),
|
|
3279
|
+
"content-column-key": W(ln),
|
|
3261
3280
|
"cell-class": "s-ui-table__depth-footer-cell",
|
|
3262
3281
|
"content-class": "s-ui-table__depth-footer-content",
|
|
3263
|
-
"content-style":
|
|
3264
|
-
section:
|
|
3282
|
+
"content-style": W(On)(n.depth),
|
|
3283
|
+
section: W($).BODY,
|
|
3265
3284
|
"row-key": n.key,
|
|
3266
3285
|
"cell-id-prefix": hr,
|
|
3267
3286
|
"focus-column-key": _r(n.key)
|
|
3268
3287
|
}, {
|
|
3269
|
-
default:
|
|
3288
|
+
default: K(() => [B(t.$slots, "depth-footer", M({ ref_for: !0 }, W(An)(n)))]),
|
|
3270
3289
|
_: 2
|
|
3271
3290
|
}, 1032, [
|
|
3272
3291
|
"class",
|
|
@@ -3279,29 +3298,29 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
3279
3298
|
"section",
|
|
3280
3299
|
"row-key",
|
|
3281
3300
|
"focus-column-key"
|
|
3282
|
-
])) : n && n.kind ===
|
|
3301
|
+
])) : n && n.kind === W(Q).LOAD_MORE ? (L(), x(Ke, {
|
|
3283
3302
|
key: 3,
|
|
3284
3303
|
class: "s-ui-table__load-more-row",
|
|
3285
3304
|
"data-index": n.index,
|
|
3286
3305
|
"aria-rowindex": n.index + 2,
|
|
3287
|
-
cells:
|
|
3288
|
-
"content-column-key":
|
|
3306
|
+
cells: W(Y),
|
|
3307
|
+
"content-column-key": W(pn),
|
|
3289
3308
|
"content-class": "s-ui-table__load-more-content",
|
|
3290
|
-
"content-style":
|
|
3291
|
-
section:
|
|
3309
|
+
"content-style": W(On)(n.depth),
|
|
3310
|
+
section: W($).BODY,
|
|
3292
3311
|
"row-key": n.key,
|
|
3293
3312
|
"cell-id-prefix": hr,
|
|
3294
3313
|
"focus-column-key": _r(n.key)
|
|
3295
3314
|
}, {
|
|
3296
|
-
default:
|
|
3297
|
-
appearance:
|
|
3298
|
-
variant:
|
|
3299
|
-
size:
|
|
3300
|
-
loading:
|
|
3315
|
+
default: K(() => [B(t.$slots, "load-more", M({ ref_for: !0 }, W(Nn)(n)), () => [D(W(o), {
|
|
3316
|
+
appearance: W(i).BARE,
|
|
3317
|
+
variant: W(r).NEUTRAL,
|
|
3318
|
+
size: W(a).SMALL,
|
|
3319
|
+
loading: W(jn)(n),
|
|
3301
3320
|
tabindex: "-1",
|
|
3302
|
-
onClick: (e) =>
|
|
3321
|
+
onClick: (e) => W(Mn)(n)
|
|
3303
3322
|
}, {
|
|
3304
|
-
default:
|
|
3323
|
+
default: K(() => [E(H(W(I)("table.loadMore")), 1)]),
|
|
3305
3324
|
_: 1
|
|
3306
3325
|
}, 8, [
|
|
3307
3326
|
"appearance",
|
|
@@ -3320,32 +3339,32 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
3320
3339
|
"section",
|
|
3321
3340
|
"row-key",
|
|
3322
3341
|
"focus-column-key"
|
|
3323
|
-
])) : n && v ? (
|
|
3342
|
+
])) : n && v ? (L(), x(Mt, {
|
|
3324
3343
|
key: 4,
|
|
3325
3344
|
"row-index": n.index,
|
|
3326
3345
|
"row-key": n.key,
|
|
3327
|
-
cells:
|
|
3346
|
+
cells: W(Y),
|
|
3328
3347
|
"row-height": d
|
|
3329
3348
|
}, null, 8, [
|
|
3330
3349
|
"row-index",
|
|
3331
3350
|
"row-key",
|
|
3332
3351
|
"cells",
|
|
3333
3352
|
"row-height"
|
|
3334
|
-
])) : n ? (
|
|
3353
|
+
])) : n ? (L(), x(rn, {
|
|
3335
3354
|
key: 5,
|
|
3336
3355
|
row: n,
|
|
3337
3356
|
"row-index": n.index,
|
|
3338
3357
|
"row-expanded": n.expanded,
|
|
3339
|
-
"leading-plans":
|
|
3340
|
-
"trailing-plans":
|
|
3358
|
+
"leading-plans": W(ke),
|
|
3359
|
+
"trailing-plans": W(J),
|
|
3341
3360
|
"dnd-ref": e.rowsDraggable ? ht : void 0,
|
|
3342
|
-
dragging:
|
|
3361
|
+
dragging: W(pt) === n.key,
|
|
3343
3362
|
"drop-position": gt(n.key),
|
|
3344
3363
|
"placeholder-height": d,
|
|
3345
3364
|
"dom-id": on(n.key),
|
|
3346
3365
|
selected: Xt(n.key),
|
|
3347
3366
|
indeterminate: Zt(n.key),
|
|
3348
|
-
"row-selectable": e.selectable &&
|
|
3367
|
+
"row-selectable": e.selectable && W(Jt).isNodeSelectable(n.key),
|
|
3349
3368
|
active: s.value === n.key,
|
|
3350
3369
|
disabled: $t(n),
|
|
3351
3370
|
"tree-indent": e.treeIndent,
|
|
@@ -3358,64 +3377,64 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
3358
3377
|
onRowClick: (e) => or(n, e),
|
|
3359
3378
|
onRowContextMenu: (e) => sr(n, e),
|
|
3360
3379
|
onCellClick: (e, t) => lr(n, e, t),
|
|
3361
|
-
onToggleExpand: (e) =>
|
|
3380
|
+
onToggleExpand: (e) => W(xe)(n.key),
|
|
3362
3381
|
onToggleSelected: (e) => Qt(n.key)
|
|
3363
3382
|
}, T({ _: 2 }, [
|
|
3364
|
-
|
|
3383
|
+
z(an.value, (e) => ({
|
|
3365
3384
|
name: e,
|
|
3366
|
-
fn:
|
|
3385
|
+
fn: K((n) => [B(t.$slots, e, M({ ref_for: !0 }, n))])
|
|
3367
3386
|
})),
|
|
3368
|
-
|
|
3387
|
+
W(F).chevron ? {
|
|
3369
3388
|
name: "chevron",
|
|
3370
|
-
fn:
|
|
3389
|
+
fn: K((e) => [B(t.$slots, "chevron", M({ ref_for: !0 }, e))]),
|
|
3371
3390
|
key: "0"
|
|
3372
3391
|
} : void 0,
|
|
3373
|
-
|
|
3392
|
+
W(F)["cell-actions"] ? {
|
|
3374
3393
|
name: "cell-actions",
|
|
3375
|
-
fn:
|
|
3394
|
+
fn: K((e) => [B(t.$slots, "cell-actions", M({ ref_for: !0 }, e))]),
|
|
3376
3395
|
key: "1"
|
|
3377
3396
|
} : void 0,
|
|
3378
|
-
|
|
3397
|
+
W(F).indicator ? {
|
|
3379
3398
|
name: "indicator",
|
|
3380
|
-
fn:
|
|
3399
|
+
fn: K((e) => [B(t.$slots, "indicator", M({ ref_for: !0 }, e))]),
|
|
3381
3400
|
key: "2"
|
|
3382
3401
|
} : void 0,
|
|
3383
|
-
|
|
3402
|
+
W(F).checkbox ? {
|
|
3384
3403
|
name: "checkbox",
|
|
3385
|
-
fn:
|
|
3404
|
+
fn: K((e) => [B(t.$slots, "checkbox", M({ ref_for: !0 }, e))]),
|
|
3386
3405
|
key: "3"
|
|
3387
3406
|
} : void 0,
|
|
3388
|
-
|
|
3407
|
+
W(F)["right-edge"] ? {
|
|
3389
3408
|
name: "right-edge",
|
|
3390
|
-
fn:
|
|
3409
|
+
fn: K((e) => [B(t.$slots, "right-edge", M({ ref_for: !0 }, e))]),
|
|
3391
3410
|
key: "4"
|
|
3392
3411
|
} : void 0
|
|
3393
3412
|
]), 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.onRowClick.onRowContextMenu.onCellClick.onToggleExpand.onToggleSelected".split("."))) : S("", !0)], 64));
|
|
3394
|
-
return
|
|
3413
|
+
return V.memo = R, V;
|
|
3395
3414
|
}, n, 3), 128)),
|
|
3396
|
-
e.loadingMore && !e.loading ? (
|
|
3415
|
+
e.loadingMore && !e.loading ? (L(!0), C(y, { key: 3 }, z(Math.min(3, e.skeletonRowCount), (e) => (L(), x(sn, {
|
|
3397
3416
|
key: `skeleton-more-${e}`,
|
|
3398
|
-
"leading-plans":
|
|
3399
|
-
"trailing-plans":
|
|
3400
|
-
}, T({ _: 2 }, [
|
|
3417
|
+
"leading-plans": W(ke),
|
|
3418
|
+
"trailing-plans": W(J)
|
|
3419
|
+
}, T({ _: 2 }, [W(F)["skeleton-row"] ? {
|
|
3401
3420
|
name: "default",
|
|
3402
|
-
fn:
|
|
3421
|
+
fn: K((e) => [B(t.$slots, "skeleton-row", { column: e.descriptor.column })]),
|
|
3403
3422
|
key: "0"
|
|
3404
3423
|
} : void 0]), 1032, ["leading-plans", "trailing-plans"]))), 128)) : S("", !0)
|
|
3405
3424
|
]),
|
|
3406
|
-
e.creationRow || e.footerValues ? (
|
|
3425
|
+
e.creationRow || e.footerValues ? (L(), C("tfoot", $n, [e.creationRow ? (L(), x(Ke, {
|
|
3407
3426
|
key: 0,
|
|
3408
3427
|
class: "s-ui-table__create-row",
|
|
3409
|
-
"aria-rowindex":
|
|
3410
|
-
cells:
|
|
3411
|
-
"content-column-key":
|
|
3428
|
+
"aria-rowindex": W(q).length + 2,
|
|
3429
|
+
cells: W(Y),
|
|
3430
|
+
"content-column-key": W(dn),
|
|
3412
3431
|
"cell-class": "s-ui-table__create-cell",
|
|
3413
3432
|
"content-class": "s-ui-table__create-content",
|
|
3414
|
-
section:
|
|
3433
|
+
section: W($).CREATION,
|
|
3415
3434
|
"cell-id-prefix": gr,
|
|
3416
|
-
"focus-column-key": vr(
|
|
3435
|
+
"focus-column-key": vr(W($).CREATION)
|
|
3417
3436
|
}, {
|
|
3418
|
-
default:
|
|
3437
|
+
default: K(() => [B(t.$slots, "creation-row")]),
|
|
3419
3438
|
_: 3
|
|
3420
3439
|
}, 8, [
|
|
3421
3440
|
"aria-rowindex",
|
|
@@ -3423,33 +3442,33 @@ var Y = /* @__PURE__ */ function(e) {
|
|
|
3423
3442
|
"content-column-key",
|
|
3424
3443
|
"section",
|
|
3425
3444
|
"focus-column-key"
|
|
3426
|
-
])) : S("", !0), e.footerValues ? (
|
|
3445
|
+
])) : S("", !0), e.footerValues ? (L(), C("tr", {
|
|
3427
3446
|
key: 1,
|
|
3428
3447
|
class: "s-ui-table__aggregate-row",
|
|
3429
|
-
"aria-rowindex":
|
|
3430
|
-
}, [(
|
|
3448
|
+
"aria-rowindex": W(q).length + 2 + +!!e.creationRow
|
|
3449
|
+
}, [(L(!0), C(y, null, z(W(Y), ({ key: e, cellPlan: n }) => (L(), C(y, { key: e }, [n ? (L(), C("td", {
|
|
3431
3450
|
key: 1,
|
|
3432
3451
|
id: pr({
|
|
3433
|
-
section:
|
|
3452
|
+
section: W($).AGGREGATE,
|
|
3434
3453
|
columnKey: n.descriptor.key
|
|
3435
3454
|
}),
|
|
3436
|
-
class:
|
|
3437
|
-
style:
|
|
3455
|
+
class: N(["s-ui-table__aggregate-cell", [n.cellClass, W(Fn)(n.descriptor.key)]]),
|
|
3456
|
+
style: P(n.style),
|
|
3438
3457
|
"aria-colindex": n.descriptor.colIndex,
|
|
3439
3458
|
"data-column-key": n.descriptor.key,
|
|
3440
|
-
"data-section":
|
|
3441
|
-
tabindex: yr(
|
|
3442
|
-
}, [n.descriptor.column ? (
|
|
3459
|
+
"data-section": W($).AGGREGATE,
|
|
3460
|
+
tabindex: yr(W($).AGGREGATE, void 0, n.descriptor.key)
|
|
3461
|
+
}, [n.descriptor.column ? (L(), C(y, { key: 0 }, [W(F)[`footer:${n.descriptor.key}`] ? B(t.$slots, `footer:${n.descriptor.key}`, M({
|
|
3443
3462
|
key: 0,
|
|
3444
3463
|
ref_for: !0
|
|
3445
|
-
},
|
|
3446
|
-
], 44, Ln)], 4),
|
|
3464
|
+
}, W(ir)(n.descriptor.key))) : (L(), C("span", rr, H(W(Pn)(n.descriptor.key)), 1))], 64)) : S("", !0)], 14, nr)) : (L(), C("td", tr))], 64))), 128))], 8, er)) : S("", !0)])) : S("", !0)
|
|
3465
|
+
], 44, Ln)], 4), W(lt) ? (L(), C("div", {
|
|
3447
3466
|
key: 0,
|
|
3448
3467
|
class: "s-ui-table__column-drop-line",
|
|
3449
|
-
style:
|
|
3468
|
+
style: P(W(lt)),
|
|
3450
3469
|
"aria-hidden": "true"
|
|
3451
3470
|
}, null, 4)) : S("", !0)], 6));
|
|
3452
3471
|
}
|
|
3453
3472
|
});
|
|
3454
3473
|
//#endregion
|
|
3455
|
-
export {
|
|
3474
|
+
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, ir as t, Q as u };
|