@shtabapp/ui-kit 1.66.0 → 1.68.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 +19 -0
- package/dist/SButton-CLTNdnCK.cjs +1 -0
- package/dist/{SButton-DQTSlo61.js → SButton-LAOBxpd4.js} +5 -0
- package/dist/{SChip-B6vcMlZD.cjs → SChip-Dcvk3JI8.cjs} +1 -1
- package/dist/{SChip-DBlJ-4jv.js → SChip-NDTK29yq.js} +1 -1
- package/dist/{SColorPicker-C_161aLA.js → SColorPicker-BmaA5Xnp.js} +4 -4
- package/dist/{SColorPicker-B_rbs-0d.cjs → SColorPicker-D7mTRL7K.cjs} +1 -1
- package/dist/{SDropdown-B1OGbIYg.cjs → SDropdown-BdgpPzfl.cjs} +1 -1
- package/dist/{SDropdown-CiXHI3g1.js → SDropdown-xNcC6JDy.js} +1 -1
- package/dist/{SInput-Be10IJ_E.cjs → SInput-B4So5LGW.cjs} +1 -1
- package/dist/{SInput-CqC-jrCC.js → SInput-D8NftspL.js} +1 -1
- package/dist/{SList-Bxet9twB.js → SList-BuXrkB03.js} +1 -1
- package/dist/{SList-3YwWEhUU.cjs → SList-CvP0U6U1.cjs} +1 -1
- package/dist/{SListItem-Chd81xY0.js → SListItem-BOSQGRWA.js} +1 -1
- package/dist/{SListItem-Rb59ZhEw.cjs → SListItem-BeaflFVf.cjs} +1 -1
- package/dist/{SPhotoEdit-0grpjqZQ.cjs → SPhotoEdit-CShhPLJt.cjs} +1 -1
- package/dist/{SPhotoEdit-COkIQFxd.js → SPhotoEdit-r63G2NZI.js} +1 -1
- package/dist/{SSelect-EhvfGB4d.cjs → SSelect-Coyrc99Y.cjs} +1 -1
- package/dist/{SSelect-C3-8vi2u.js → SSelect-DUtNtnqM.js} +5 -5
- package/dist/{STable-CADyNvk8.js → STable-CMWr1QBp.js} +1285 -1257
- package/dist/STable-COnHb4vC.cjs +1 -0
- package/dist/{STabs-BbABxzdN.js → STabs-BARXqgoB.js} +1 -1
- package/dist/{STabs-a337ikYi.cjs → STabs-n5hMERTK.cjs} +1 -1
- package/dist/{STag-BJV5gtD6.js → STag-C5KhPWjQ.js} +1 -1
- package/dist/{STag-B68ch31f.cjs → STag-ZPrc5q4N.cjs} +1 -1
- package/dist/{STagGroup-DnNdOCrX.js → STagGroup-BGwvunuu.js} +1 -1
- package/dist/{STagGroup-B4ktVLZ5.cjs → STagGroup-ccEvIkK7.cjs} +1 -1
- package/dist/components/SButton/SButton.types.d.ts +2 -0
- package/dist/components/SButton/SButton.types.d.ts.map +1 -1
- package/dist/components/SButton/SButton.vue.d.ts.map +1 -1
- package/dist/components/STable/STable.types.d.ts +25 -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/constants/tableSizes.d.ts +17 -4
- package/dist/components/STable/constants/tableSizes.d.ts.map +1 -1
- package/dist/components/STable/index.d.ts +2 -2
- package/dist/components/STable/index.d.ts.map +1 -1
- package/dist/components/STable/parts/STableRow.vue.d.ts +3 -1
- package/dist/components/STable/parts/STableRow.vue.d.ts.map +1 -1
- package/dist/components/STable/utils/resolveTableRowColor.d.ts +5 -0
- package/dist/components/STable/utils/resolveTableRowColor.d.ts.map +1 -0
- package/dist/components/STable/utils/useTableCellPlans.d.ts +2 -0
- package/dist/components/STable/utils/useTableCellPlans.d.ts.map +1 -1
- package/dist/components/STable/utils/useTableColumns.d.ts +1 -0
- package/dist/components/STable/utils/useTableColumns.d.ts.map +1 -1
- package/dist/components/STable/utils/useTableScrollScale.d.ts +2 -1
- package/dist/components/STable/utils/useTableScrollScale.d.ts.map +1 -1
- package/dist/components/STable/utils/useTableVirtualRows.d.ts +3 -1
- package/dist/components/STable/utils/useTableVirtualRows.d.ts.map +1 -1
- package/dist/composables/connectedPosition/getOverflow.d.ts.map +1 -1
- package/dist/composables/useFloatingOverlay.d.ts.map +1 -1
- package/dist/entries/button.cjs +1 -1
- package/dist/entries/button.js +1 -1
- package/dist/entries/chip.cjs +1 -1
- package/dist/entries/chip.js +1 -1
- package/dist/entries/color-picker.cjs +1 -1
- package/dist/entries/color-picker.js +1 -1
- package/dist/entries/composables.cjs +1 -1
- package/dist/entries/composables.js +1 -1
- package/dist/entries/dropdown.cjs +1 -1
- package/dist/entries/dropdown.js +2 -2
- package/dist/entries/input.cjs +1 -1
- package/dist/entries/input.js +1 -1
- package/dist/entries/list-item.cjs +1 -1
- package/dist/entries/list-item.js +1 -1
- package/dist/entries/list.cjs +1 -1
- package/dist/entries/list.js +1 -1
- package/dist/entries/photo-edit.cjs +1 -1
- package/dist/entries/photo-edit.js +1 -1
- package/dist/entries/select.cjs +1 -1
- package/dist/entries/select.js +1 -1
- package/dist/entries/table.cjs +1 -1
- package/dist/entries/table.d.ts +2 -2
- package/dist/entries/table.d.ts.map +1 -1
- package/dist/entries/table.js +2 -2
- package/dist/entries/tabs.cjs +1 -1
- package/dist/entries/tabs.js +1 -1
- package/dist/entries/tag-group.cjs +1 -1
- package/dist/entries/tag-group.js +2 -2
- package/dist/entries/tag.cjs +1 -1
- package/dist/entries/tag.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +117 -117
- package/dist/uikit-components.css +1 -1
- package/dist/useFloatingOverlay-Dp44TxvN.cjs +1 -0
- package/dist/{useFloatingOverlay-B1BvRxLz.js → useFloatingOverlay-b9_eDGNE.js} +66 -67
- package/package.json +1 -1
- package/dist/SButton-BN-PppY7.cjs +0 -1
- package/dist/STable-D1x-kIBO.cjs +0 -1
- package/dist/useFloatingOverlay-CtQBdvS9.cjs +0 -1
|
@@ -1,48 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { a as o } from "./
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
1
|
+
import { n as e, t } from "./contrastSurfaceTextColor-BDlLSSXC.js";
|
|
2
|
+
import { t as n } from "./colorValue-CSh0chxp.js";
|
|
3
|
+
import { i as r, n as i, r as a, t as o } from "./SButton-LAOBxpd4.js";
|
|
4
|
+
import { i as s, t as c } from "./SCheckbox-BMkOc5cn.js";
|
|
5
|
+
import { a as l } from "./useFloatingOverlay-b9_eDGNE.js";
|
|
6
|
+
import { t as u } from "./SDropdown-xNcC6JDy.js";
|
|
7
|
+
import { t as d } from "./SDropdownMenu-2koPU6IG.js";
|
|
8
|
+
import { a as f, o as p, r as m } from "./treeKeyboardNavigation-SmxTdnDz.js";
|
|
9
|
+
import { t as h } from "./SListItem-BOSQGRWA.js";
|
|
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 N, normalizeClass as P, normalizeStyle as F, onBeforeUnmount as I, onMounted as L, openBlock as R, ref as z, renderList as B, renderSlot as V, shallowRef as H, toDisplayString as U, toRaw as ee, toValue as W, unref as G, useId as te, useModel as ne, useSlots as re, useTemplateRef as ie, watch as K, withCtx as q, withModifiers as ae } from "vue";
|
|
12
|
+
import { ESSkeletonType as oe, SIcon as se, SSeparator as ce, SSkeleton as le, useUiKitI18n as ue } from "@shtabapp/ui-kit-primitives";
|
|
13
|
+
import { tryOnScopeDispose as de, useElementSize as fe, useEventListener as pe, useRafFn as me, useResizeObserver as he, useTimeoutFn as ge } from "@vueuse/core";
|
|
14
|
+
import { elementScroll as _e, observeElementOffset as ve, useVirtualizer as ye } from "@tanstack/vue-virtual";
|
|
15
|
+
import { combine as J } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
|
16
|
+
import { draggable as be, dropTargetForElements as xe, monitorForElements as Se } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
|
17
|
+
import { setCustomNativeDragPreview as Ce } from "@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview";
|
|
18
|
+
import { pointerOutsideOfPreview as we } from "@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview";
|
|
19
|
+
import { attachClosestEdge as Te, extractClosestEdge as Ee } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
|
|
20
|
+
import { disableNativeDragPreview as De } from "@atlaskit/pragmatic-drag-and-drop/element/disable-native-drag-preview";
|
|
21
|
+
import { autoScrollForElements as Oe } from "@atlaskit/pragmatic-drag-and-drop-auto-scroll/element";
|
|
20
22
|
//#region src/components/STable/STable.types.ts
|
|
21
|
-
var
|
|
23
|
+
var Y = /* @__PURE__ */ function(e) {
|
|
22
24
|
return e.LEFT = "left", e.RIGHT = "right", e;
|
|
23
|
-
}({}),
|
|
25
|
+
}({}), ke = /* @__PURE__ */ function(e) {
|
|
24
26
|
return e.LEFT = "left", e.CENTER = "center", e.RIGHT = "right", e;
|
|
25
|
-
}({}),
|
|
27
|
+
}({}), X = /* @__PURE__ */ function(e) {
|
|
26
28
|
return e.ASC = "asc", e.DESC = "desc", e;
|
|
27
|
-
}({}),
|
|
29
|
+
}({}), Ae = /* @__PURE__ */ function(e) {
|
|
28
30
|
return e.DEFAULT = "default", e.COMPLETED = "completed", e;
|
|
29
|
-
}({}),
|
|
31
|
+
}({}), je = /* @__PURE__ */ function(e) {
|
|
32
|
+
return e.RED_ORANGE = "red-orange", e.ORANGE = "orange", e.YELLOW = "yellow", e.GREEN = "green", e.TEAL = "teal", e.CYAN = "cyan", e.BLUE = "blue", e.INDIGO = "indigo", e.VIOLET = "violet", e.MAGENTA = "magenta", e.PINK = "pink", e.RED = "red", e;
|
|
33
|
+
}({}), Me = /* @__PURE__ */ function(e) {
|
|
30
34
|
return e.DEFAULT = "default", e.DISABLED = "disabled", e.READONLY = "readonly", e.EDITING = "editing", e;
|
|
31
|
-
}({}),
|
|
35
|
+
}({}), Ne = /* @__PURE__ */ function(e) {
|
|
32
36
|
return e.AUTO = "auto", e.FIXED = "fixed", e;
|
|
33
|
-
}({}),
|
|
37
|
+
}({}), Pe = /* @__PURE__ */ function(e) {
|
|
34
38
|
return e.FLAT = "flat", e.TREE = "tree", e;
|
|
35
|
-
}({}),
|
|
39
|
+
}({}), Fe = /* @__PURE__ */ function(e) {
|
|
36
40
|
return e.BEFORE = "before", e.AFTER = "after", e.CHILD = "child", e;
|
|
37
|
-
}({}),
|
|
41
|
+
}({}), Ie = /* @__PURE__ */ function(e) {
|
|
38
42
|
return e.NEUTRAL = "neutral", e.SUCCESS = "success", e.WARNING = "warning", e.DANGER = "danger", e;
|
|
39
43
|
}({}), Z = /* @__PURE__ */ function(e) {
|
|
40
44
|
return e.UNCHECKED = "unchecked", e.CHECKED = "checked", e.INDETERMINATE = "indeterminate", e;
|
|
41
45
|
}({}), Q = /* @__PURE__ */ function(e) {
|
|
42
46
|
return e.ROW = "row", e.GROUP = "group", e.DEPTH_FOOTER = "depthFooter", e.LOAD_MORE = "loadMore", e;
|
|
43
|
-
}({}),
|
|
47
|
+
}({}), Le = 16e6, Re = 1e5, ze = 1e9, Be = 2e3, Ve = .3, He = 1300, Ue = "__s-ui-table-filler__", We = /* @__PURE__ */ O({
|
|
44
48
|
__name: "STableCheckbox",
|
|
45
|
-
props: /*@__PURE__*/
|
|
49
|
+
props: /*@__PURE__*/ j({
|
|
46
50
|
screenReaderLabel: {},
|
|
47
51
|
indeterminate: {
|
|
48
52
|
type: Boolean,
|
|
@@ -57,34 +61,34 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
57
61
|
}),
|
|
58
62
|
emits: ["update:modelValue"],
|
|
59
63
|
setup(e) {
|
|
60
|
-
let t =
|
|
61
|
-
return
|
|
64
|
+
let t = ne(e, "modelValue"), n = ie("checkboxRef");
|
|
65
|
+
return K([n, () => e.screenReaderLabel], () => {
|
|
62
66
|
let t = n.value?.$el, r = t instanceof HTMLElement ? t.querySelector("input") : void 0;
|
|
63
67
|
r && (r.tabIndex = -1, r.setAttribute("aria-label", e.screenReaderLabel));
|
|
64
68
|
}, {
|
|
65
69
|
immediate: !0,
|
|
66
70
|
flush: "post"
|
|
67
|
-
}), (r,
|
|
71
|
+
}), (r, i) => (R(), x(G(c), {
|
|
68
72
|
ref_key: "checkboxRef",
|
|
69
73
|
ref: n,
|
|
70
74
|
modelValue: t.value,
|
|
71
|
-
"onUpdate:modelValue":
|
|
75
|
+
"onUpdate:modelValue": i[0] ||= (e) => t.value = e,
|
|
72
76
|
indeterminate: e.indeterminate,
|
|
73
|
-
size:
|
|
77
|
+
size: G(s).EXTRA_SMALL
|
|
74
78
|
}, null, 8, [
|
|
75
79
|
"modelValue",
|
|
76
80
|
"indeterminate",
|
|
77
81
|
"size"
|
|
78
82
|
]));
|
|
79
83
|
}
|
|
80
|
-
}),
|
|
84
|
+
}), Ge = [
|
|
81
85
|
"id",
|
|
82
86
|
"aria-colindex",
|
|
83
87
|
"data-column-key",
|
|
84
88
|
"data-row-key",
|
|
85
89
|
"data-section",
|
|
86
90
|
"tabindex"
|
|
87
|
-
],
|
|
91
|
+
], Ke = /* @__PURE__ */ O({
|
|
88
92
|
__name: "STableContentRow",
|
|
89
93
|
props: {
|
|
90
94
|
cells: {},
|
|
@@ -98,23 +102,23 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
98
102
|
focusColumnKey: {}
|
|
99
103
|
},
|
|
100
104
|
setup(e) {
|
|
101
|
-
return (t, n) => (
|
|
105
|
+
return (t, n) => (R(), C("tr", null, [(R(!0), C(y, null, B(e.cells, ({ key: n, cellPlan: r }) => (R(), C(y, { key: n }, [r ? (R(), C("td", {
|
|
102
106
|
key: 1,
|
|
103
107
|
id: `${e.cellIdPrefix}${e.rowKey ?? ""}-${r.descriptor.key}`,
|
|
104
|
-
class:
|
|
105
|
-
style:
|
|
108
|
+
class: P([r.cellClass, e.cellClass]),
|
|
109
|
+
style: F(r.style),
|
|
106
110
|
"aria-colindex": r.descriptor.colIndex,
|
|
107
111
|
"data-column-key": r.descriptor.key,
|
|
108
112
|
"data-row-key": e.rowKey,
|
|
109
113
|
"data-section": e.section,
|
|
110
114
|
tabindex: r.descriptor.key === e.focusColumnKey ? 0 : -1
|
|
111
|
-
}, [r.descriptor.key === e.contentColumnKey ? (
|
|
115
|
+
}, [r.descriptor.key === e.contentColumnKey ? (R(), C("div", {
|
|
112
116
|
key: 0,
|
|
113
|
-
class:
|
|
114
|
-
style:
|
|
115
|
-
}, [
|
|
117
|
+
class: P(e.contentClass),
|
|
118
|
+
style: F(e.contentStyle)
|
|
119
|
+
}, [V(t.$slots, "default")], 6)) : S("", !0)], 14, Ge)) : (R(), C("td", {
|
|
116
120
|
key: 0,
|
|
117
|
-
class:
|
|
121
|
+
class: P([
|
|
118
122
|
"s-ui-table__cell",
|
|
119
123
|
"s-ui-table__filler-cell",
|
|
120
124
|
e.cellClass
|
|
@@ -122,36 +126,36 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
122
126
|
role: "presentation"
|
|
123
127
|
}, null, 2))], 64))), 128))]));
|
|
124
128
|
}
|
|
125
|
-
}),
|
|
129
|
+
}), qe = /* @__PURE__ */ function(e) {
|
|
126
130
|
return e.INDICATOR = "indicator", e.CHECKBOX = "checkbox", e.RIGHT_EDGE = "rightEdge", e.COLUMNS_MANAGER = "columnsManager", e;
|
|
127
|
-
}({}),
|
|
131
|
+
}({}), Je = {
|
|
128
132
|
indicator: "indicator",
|
|
129
133
|
checkbox: "checkbox",
|
|
130
134
|
rightEdge: "right-edge",
|
|
131
135
|
columnsManager: "columns-manager"
|
|
132
|
-
},
|
|
136
|
+
}, Ye = new Set(["rightEdge", "columnsManager"]), Xe = (e) => Ye.has(e) ? Y.RIGHT : Y.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) => {
|
|
133
137
|
let r = e.reduce((e, t) => e + t.baseWidth, 0), i = 0;
|
|
134
138
|
return e.forEach((a, o) => {
|
|
135
|
-
let s = o === e.length - 1 ? t - i : Math.floor(t * a.baseWidth / r), c = n.get(a.key) ?? 0, l = Math.min(s,
|
|
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));
|
|
136
140
|
n.set(a.key, c + l), i += l;
|
|
137
141
|
}), t - i;
|
|
138
|
-
},
|
|
139
|
-
let t = e.filter((e) => e.sticky ===
|
|
142
|
+
}, it = (e) => e ? 430 : 160, at = (e) => {
|
|
143
|
+
let t = e.filter((e) => e.sticky === Y.LEFT), n = t[t.length - 1];
|
|
140
144
|
n && (n.lastStickyLeft = !0);
|
|
141
|
-
let r = e.find((e) => e.sticky ===
|
|
145
|
+
let r = e.find((e) => e.sticky === Y.RIGHT);
|
|
142
146
|
r && (r.firstStickyRight = !0);
|
|
143
|
-
},
|
|
147
|
+
}, ot = (e, t) => {
|
|
144
148
|
let n = /* @__PURE__ */ new Map(), r = t;
|
|
145
149
|
for (let t = 0; t < e.length && r > 0; t += 1) {
|
|
146
|
-
let t = e.filter((e) =>
|
|
150
|
+
let t = e.filter((e) => nt(e, n.get(e.key) ?? 0) > 0);
|
|
147
151
|
if (t.length === 0) return n;
|
|
148
|
-
r =
|
|
152
|
+
r = rt(t, r, n);
|
|
149
153
|
}
|
|
150
154
|
return n;
|
|
151
|
-
},
|
|
155
|
+
}, st = (e, t) => {
|
|
152
156
|
let n = e.reduce((e, t) => e + t.baseWidth, 0), r = e.filter((e) => e.flexible), i = Math.floor(t) - n;
|
|
153
157
|
if (i <= 0 || r.length === 0) return e;
|
|
154
|
-
let a =
|
|
158
|
+
let a = ot(r, i);
|
|
155
159
|
return e.map((e) => {
|
|
156
160
|
let t = a.get(e.key);
|
|
157
161
|
return t ? {
|
|
@@ -159,12 +163,12 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
159
163
|
width: e.baseWidth + t
|
|
160
164
|
} : e;
|
|
161
165
|
});
|
|
162
|
-
},
|
|
163
|
-
let d =
|
|
164
|
-
let t =
|
|
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
|
+
let d = b(() => {
|
|
168
|
+
let t = W(e);
|
|
165
169
|
return t.find((e) => e.primary)?.key ?? t[0]?.key;
|
|
166
|
-
}), f =
|
|
167
|
-
let n =
|
|
170
|
+
}), f = b(() => {
|
|
171
|
+
let n = W(e), i = new Set(r.value ?? []), a = t.value, o = new Map(n.map((e) => [e.key, e])), s = [];
|
|
168
172
|
a ? (a.forEach((e) => {
|
|
169
173
|
o.has(e) && s.push(e);
|
|
170
174
|
}), n.forEach((e) => {
|
|
@@ -179,7 +183,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
179
183
|
});
|
|
180
184
|
let l = [], u = [], f = [], p = [];
|
|
181
185
|
return c.forEach((e) => {
|
|
182
|
-
e.key === d.value ? l.push(e) : e.sticky ===
|
|
186
|
+
e.key === d.value ? l.push(e) : e.sticky === Y.LEFT ? u.push(e) : e.sticky === Y.RIGHT ? p.push(e) : f.push(e);
|
|
183
187
|
}), [
|
|
184
188
|
...l,
|
|
185
189
|
...u,
|
|
@@ -195,14 +199,14 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
195
199
|
baseWidth: e.width,
|
|
196
200
|
flexible: !1
|
|
197
201
|
} : {
|
|
198
|
-
baseWidth:
|
|
199
|
-
flexible: e.sticky !==
|
|
202
|
+
baseWidth: it(t),
|
|
203
|
+
flexible: e.sticky !== Y.RIGHT
|
|
200
204
|
};
|
|
201
205
|
}, m = (e) => {
|
|
202
|
-
|
|
203
|
-
}, h =
|
|
204
|
-
let e = [], t =
|
|
205
|
-
let r =
|
|
206
|
+
W(o) && e("rightEdge", 40), W(s) && e("columnsManager", 32);
|
|
207
|
+
}, h = b(() => {
|
|
208
|
+
let e = [], t = W(c), n = W(l), r = (t, n) => {
|
|
209
|
+
let r = Xe(t);
|
|
206
210
|
e.push({
|
|
207
211
|
key: `__s-ui-table-${t}`,
|
|
208
212
|
service: t,
|
|
@@ -212,23 +216,23 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
212
216
|
minWidth: n,
|
|
213
217
|
maxWidth: n,
|
|
214
218
|
sticky: r,
|
|
215
|
-
align:
|
|
219
|
+
align: ke.LEFT,
|
|
216
220
|
primary: !1,
|
|
217
221
|
resizable: !1,
|
|
218
222
|
draggable: !1,
|
|
219
223
|
sortable: !1,
|
|
220
224
|
hideable: !1,
|
|
221
225
|
colIndex: 0,
|
|
222
|
-
widthVar:
|
|
223
|
-
liveWidthVar:
|
|
224
|
-
stickyOffsetVar:
|
|
225
|
-
liveStickyOffsetVar:
|
|
226
|
+
widthVar: Qe(t),
|
|
227
|
+
liveWidthVar: et(t),
|
|
228
|
+
stickyOffsetVar: $e(t),
|
|
229
|
+
liveStickyOffsetVar: tt(t),
|
|
226
230
|
lastStickyLeft: !1,
|
|
227
231
|
firstStickyRight: !1
|
|
228
232
|
});
|
|
229
233
|
};
|
|
230
|
-
|
|
231
|
-
let i = r.key === d.value, a = i ?
|
|
234
|
+
W(i) && r("indicator", 2), W(a) && r("checkbox", 24), f.value.forEach((r) => {
|
|
235
|
+
let i = r.key === d.value, a = i ? Y.LEFT : r.sticky, { baseWidth: o, flexible: s } = p(r, i);
|
|
232
236
|
e.push({
|
|
233
237
|
key: r.key,
|
|
234
238
|
column: r,
|
|
@@ -238,50 +242,50 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
238
242
|
minWidth: r.minWidth ?? 60,
|
|
239
243
|
maxWidth: r.maxWidth,
|
|
240
244
|
sticky: a,
|
|
241
|
-
align: r.align ??
|
|
245
|
+
align: r.align ?? ke.LEFT,
|
|
242
246
|
primary: i,
|
|
243
247
|
resizable: t && (r.resizable ?? !0),
|
|
244
248
|
draggable: n && !i && (r.draggable ?? !0),
|
|
245
249
|
sortable: r.sortable ?? !1,
|
|
246
250
|
hideable: !i && (r.hideable ?? !0),
|
|
247
251
|
colIndex: 0,
|
|
248
|
-
widthVar:
|
|
249
|
-
liveWidthVar:
|
|
250
|
-
stickyOffsetVar: a ?
|
|
251
|
-
liveStickyOffsetVar: a ?
|
|
252
|
+
widthVar: Qe(r.key),
|
|
253
|
+
liveWidthVar: et(r.key),
|
|
254
|
+
stickyOffsetVar: a ? $e(r.key) : void 0,
|
|
255
|
+
liveStickyOffsetVar: a ? tt(r.key) : void 0,
|
|
252
256
|
lastStickyLeft: !1,
|
|
253
257
|
firstStickyRight: !1
|
|
254
258
|
});
|
|
255
259
|
}), m(r);
|
|
256
260
|
let o = 0;
|
|
257
261
|
return e.forEach((e) => {
|
|
258
|
-
e.sticky !==
|
|
262
|
+
e.sticky !== Y.RIGHT && (o += 1, e.colIndex = o);
|
|
259
263
|
}), e.forEach((e) => {
|
|
260
|
-
e.sticky ===
|
|
261
|
-
}),
|
|
262
|
-
}), g =
|
|
264
|
+
e.sticky === Y.RIGHT && (o += 1, e.colIndex = o);
|
|
265
|
+
}), at(e), e;
|
|
266
|
+
}), g = b(() => st(h.value, W(u))), _ = b(() => g.value.reduce((e, t) => e + t.width, 0)), v = b(() => {
|
|
263
267
|
let e = {}, t = 0;
|
|
264
268
|
g.value.forEach((n) => {
|
|
265
|
-
e[n.widthVar] = `${n.width}px`, n.sticky ===
|
|
269
|
+
e[n.widthVar] = `${n.width}px`, n.sticky === Y.LEFT && n.stickyOffsetVar && (e[n.stickyOffsetVar] = `${t}px`, t += n.width);
|
|
266
270
|
});
|
|
267
271
|
let n = 0;
|
|
268
272
|
return [...g.value].reverse().forEach((t) => {
|
|
269
|
-
t.sticky ===
|
|
273
|
+
t.sticky === Y.RIGHT && t.stickyOffsetVar && (e[t.stickyOffsetVar] = `${n}px`, n += t.width);
|
|
270
274
|
}), e;
|
|
271
275
|
});
|
|
272
276
|
return {
|
|
273
277
|
primaryColumnKey: d,
|
|
274
278
|
orderedDataColumns: f,
|
|
275
279
|
columnDescriptors: g,
|
|
276
|
-
dataColumnDescriptors:
|
|
277
|
-
columnCssVars:
|
|
278
|
-
totalWidth:
|
|
279
|
-
columnCount:
|
|
280
|
+
dataColumnDescriptors: b(() => g.value.filter((e) => e.column)),
|
|
281
|
+
columnCssVars: v,
|
|
282
|
+
totalWidth: _,
|
|
283
|
+
columnCount: b(() => g.value.length)
|
|
280
284
|
};
|
|
281
285
|
}, $ = /* @__PURE__ */ function(e) {
|
|
282
286
|
return e.HEADER = "h", e.BODY = "b", e.CREATION = "c", e.AGGREGATE = "a", e;
|
|
283
|
-
}({}),
|
|
284
|
-
let
|
|
287
|
+
}({}), 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 _ = H(), v = H(), y = H(!1), x = H(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) => {
|
|
285
289
|
if (!e) return;
|
|
286
290
|
let t = a.value.getRowIndexByKey(e);
|
|
287
291
|
return t === void 0 ? void 0 : i.value[t];
|
|
@@ -289,18 +293,18 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
289
293
|
if (e.kind === Q.ROW) return C.value;
|
|
290
294
|
let t = {
|
|
291
295
|
[Q.ROW]: void 0,
|
|
292
|
-
[Q.GROUP]:
|
|
293
|
-
[Q.DEPTH_FOOTER]:
|
|
294
|
-
[Q.LOAD_MORE]:
|
|
296
|
+
[Q.GROUP]: W(o),
|
|
297
|
+
[Q.DEPTH_FOOTER]: W(s),
|
|
298
|
+
[Q.LOAD_MORE]: W(c)
|
|
295
299
|
}[e.kind];
|
|
296
300
|
return t ? [t] : [];
|
|
297
301
|
}, E = (e) => {
|
|
298
302
|
if (e.section === "h") return S.value;
|
|
299
303
|
if (e.section === "c") {
|
|
300
|
-
let e =
|
|
301
|
-
return
|
|
304
|
+
let e = W(l);
|
|
305
|
+
return W(u) && e ? [e] : [];
|
|
302
306
|
}
|
|
303
|
-
if (e.section === "a") return
|
|
307
|
+
if (e.section === "a") return W(d) ? C.value : [];
|
|
304
308
|
let t = w(e.rowKey);
|
|
305
309
|
return t && f(t) ? T(t) : [];
|
|
306
310
|
}, D = (e, t) => {
|
|
@@ -312,21 +316,21 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
312
316
|
let t = Math.abs(n.indexOf(e) - r);
|
|
313
317
|
t < o && (o = t, a = e);
|
|
314
318
|
}), a;
|
|
315
|
-
}, O =
|
|
319
|
+
}, O = b(() => ({
|
|
316
320
|
section: "h",
|
|
317
|
-
columnKey: D(S.value,
|
|
318
|
-
})), k =
|
|
319
|
-
let e =
|
|
321
|
+
columnKey: D(S.value, v.value)
|
|
322
|
+
})), k = b(() => {
|
|
323
|
+
let e = _.value;
|
|
320
324
|
if (!e) return O.value;
|
|
321
325
|
let t = E(e);
|
|
322
326
|
return t.length === 0 ? O.value : t.includes(e.columnKey) ? e : {
|
|
323
327
|
...e,
|
|
324
328
|
columnKey: D(t, e.columnKey)
|
|
325
329
|
};
|
|
326
|
-
}),
|
|
330
|
+
}), A = b(() => i.value.length), j = b(() => A.value + +!!W(u) + +!!W(d)), M = (e) => {
|
|
327
331
|
if (e.section === "h") return 0;
|
|
328
|
-
if (e.section === "c") return
|
|
329
|
-
if (e.section === "a") return
|
|
332
|
+
if (e.section === "c") return A.value + 1;
|
|
333
|
+
if (e.section === "a") return A.value + 1 + +!!W(u);
|
|
330
334
|
let t = e.rowKey === void 0 ? void 0 : a.value.getRowIndexByKey(e.rowKey);
|
|
331
335
|
return t === void 0 ? void 0 : t + 1;
|
|
332
336
|
}, P = (e, t) => {
|
|
@@ -334,7 +338,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
334
338
|
section: "h",
|
|
335
339
|
columnKey: D(S.value, t)
|
|
336
340
|
};
|
|
337
|
-
if (e <=
|
|
341
|
+
if (e <= A.value) {
|
|
338
342
|
let n = i.value[e - 1];
|
|
339
343
|
if (!n || !f(n)) return;
|
|
340
344
|
let r = T(n);
|
|
@@ -344,21 +348,21 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
344
348
|
columnKey: D(r, t)
|
|
345
349
|
};
|
|
346
350
|
}
|
|
347
|
-
if (
|
|
348
|
-
let e =
|
|
351
|
+
if (W(u) && e === A.value + 1) {
|
|
352
|
+
let e = W(l);
|
|
349
353
|
return e ? {
|
|
350
354
|
section: "c",
|
|
351
355
|
columnKey: e
|
|
352
356
|
} : void 0;
|
|
353
357
|
}
|
|
354
|
-
if (
|
|
358
|
+
if (W(d) && e === j.value) return {
|
|
355
359
|
section: "a",
|
|
356
360
|
columnKey: D(S.value, t)
|
|
357
361
|
};
|
|
358
362
|
}, F = (e, t) => {
|
|
359
363
|
let n = e;
|
|
360
|
-
for (; n >= 0 && n <=
|
|
361
|
-
let e = P(n,
|
|
364
|
+
for (; n >= 0 && n <= j.value;) {
|
|
365
|
+
let e = P(n, v.value);
|
|
362
366
|
if (e) return e;
|
|
363
367
|
n += t;
|
|
364
368
|
}
|
|
@@ -375,90 +379,90 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
375
379
|
return;
|
|
376
380
|
}
|
|
377
381
|
u.right > s && (t.scrollLeft += u.right - s);
|
|
378
|
-
},
|
|
379
|
-
|
|
380
|
-
let n =
|
|
382
|
+
}, z = (e, t) => {
|
|
383
|
+
_.value = e, t && (v.value = e.columnKey);
|
|
384
|
+
let n = M(e);
|
|
381
385
|
n !== void 0 && (x.value = n);
|
|
382
|
-
},
|
|
386
|
+
}, B = (e, t) => {
|
|
383
387
|
let n = E(e), r = n.length > 0 && !n.includes(e.columnKey) ? {
|
|
384
388
|
...e,
|
|
385
389
|
columnKey: D(n, e.columnKey)
|
|
386
390
|
} : e;
|
|
387
|
-
if (
|
|
391
|
+
if (z(r, t?.updateDesired ?? !0), y.value = !1, r.section === "b" && r.rowKey) {
|
|
388
392
|
h(r.rowKey);
|
|
389
393
|
let e = a.value.getRowIndexByKey(r.rowKey);
|
|
390
394
|
(t?.scroll ?? !0) && e !== void 0 && g(e);
|
|
391
395
|
}
|
|
392
|
-
t?.focusElement !== !1 &&
|
|
396
|
+
t?.focusElement !== !1 && N(() => {
|
|
393
397
|
L()?.focus({ preventScroll: !0 }), R();
|
|
394
398
|
});
|
|
395
|
-
},
|
|
399
|
+
}, V = (e, t) => {
|
|
396
400
|
let n = k.value;
|
|
397
401
|
if (t !== 0) {
|
|
398
402
|
let e = E(n), r = e[e.indexOf(n.columnKey) + t];
|
|
399
|
-
r &&
|
|
403
|
+
r && B({
|
|
400
404
|
...n,
|
|
401
405
|
columnKey: r
|
|
402
406
|
});
|
|
403
407
|
return;
|
|
404
408
|
}
|
|
405
409
|
if (e === 0) return;
|
|
406
|
-
let r = e > 0 ? 1 : -1, i = F((
|
|
407
|
-
i &&
|
|
408
|
-
},
|
|
410
|
+
let r = e > 0 ? 1 : -1, i = F((M(n) ?? x.value) + r, r);
|
|
411
|
+
i && B(i, { updateDesired: !1 });
|
|
412
|
+
}, U = (e) => {
|
|
409
413
|
let t = k.value, n = E(t), r = e === "start" ? n[0] : n[n.length - 1];
|
|
410
|
-
r &&
|
|
414
|
+
r && B({
|
|
411
415
|
...t,
|
|
412
416
|
columnKey: r
|
|
413
417
|
});
|
|
414
|
-
},
|
|
415
|
-
let t = e === "first" ? F(0, 1) : F(
|
|
418
|
+
}, ee = (e) => {
|
|
419
|
+
let t = e === "first" ? F(0, 1) : F(j.value, -1);
|
|
416
420
|
if (!t) return;
|
|
417
421
|
let n = E(t), r = e === "first" ? n[0] : n[n.length - 1];
|
|
418
|
-
|
|
422
|
+
B(r ? {
|
|
419
423
|
...t,
|
|
420
424
|
columnKey: r
|
|
421
425
|
} : t);
|
|
422
|
-
},
|
|
423
|
-
let t =
|
|
424
|
-
i &&
|
|
425
|
-
},
|
|
426
|
+
}, G = (e) => {
|
|
427
|
+
let t = M(k.value) ?? x.value, n = Math.max(1, Math.round(W(p))), r = Math.min(j.value, Math.max(0, t + e * n)), i = F(r, e) ?? F(r, e === 1 ? -1 : 1);
|
|
428
|
+
i && B(i, { updateDesired: !1 });
|
|
429
|
+
}, te = (e) => {
|
|
426
430
|
let t = [];
|
|
427
|
-
return e.querySelectorAll(
|
|
431
|
+
return e.querySelectorAll(lt).forEach((e) => {
|
|
428
432
|
!(e instanceof HTMLElement) || e.offsetParent === null || e.hasAttribute("disabled") || e.closest("[aria-hidden=\"true\"]") || t.push(e);
|
|
429
433
|
}), t;
|
|
430
|
-
},
|
|
431
|
-
let e = L(), t = e ?
|
|
432
|
-
return t ? (
|
|
433
|
-
},
|
|
434
|
-
|
|
435
|
-
},
|
|
436
|
-
let t = L(), n = 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
|
+
}, re = () => {
|
|
438
|
+
y.value = !1, L()?.focus({ preventScroll: !0 });
|
|
439
|
+
}, ie = (e) => {
|
|
440
|
+
let t = L(), n = t ? te(t) : [];
|
|
437
441
|
if (n.length === 0) return;
|
|
438
442
|
let r = document.activeElement, i = n.findIndex((e) => e === r || r instanceof Node && e.contains(r));
|
|
439
443
|
n[i === -1 ? e === 1 ? 0 : n.length - 1 : (i + e + n.length) % n.length]?.focus();
|
|
440
|
-
},
|
|
444
|
+
}, q = () => {
|
|
441
445
|
let e = k.value, n = E(e);
|
|
442
446
|
if (n.length > 0) {
|
|
443
|
-
|
|
447
|
+
B({
|
|
444
448
|
...e,
|
|
445
|
-
columnKey: D(n,
|
|
449
|
+
columnKey: D(n, v.value)
|
|
446
450
|
}, {
|
|
447
451
|
scroll: !1,
|
|
448
452
|
updateDesired: !1
|
|
449
453
|
});
|
|
450
454
|
return;
|
|
451
455
|
}
|
|
452
|
-
let r = Math.min(x.value,
|
|
456
|
+
let r = Math.min(x.value, j.value), i = F(r, -1) ?? F(r, 1);
|
|
453
457
|
if (i) {
|
|
454
|
-
|
|
458
|
+
B(i, {
|
|
455
459
|
scroll: !1,
|
|
456
460
|
updateDesired: !1
|
|
457
461
|
});
|
|
458
462
|
return;
|
|
459
463
|
}
|
|
460
464
|
if (S.value.length > 0) {
|
|
461
|
-
|
|
465
|
+
B(O.value, {
|
|
462
466
|
scroll: !1,
|
|
463
467
|
updateDesired: !1
|
|
464
468
|
});
|
|
@@ -466,64 +470,64 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
466
470
|
}
|
|
467
471
|
t.value?.focus();
|
|
468
472
|
};
|
|
469
|
-
|
|
470
|
-
let e =
|
|
473
|
+
K(() => {
|
|
474
|
+
let e = _.value?.rowKey;
|
|
471
475
|
return e === void 0 ? void 0 : a.value.getRowIndexByKey(e);
|
|
472
476
|
}, (e, t) => {
|
|
473
|
-
t === void 0 || e !== void 0 || document.activeElement === document.body &&
|
|
477
|
+
t === void 0 || e !== void 0 || document.activeElement === document.body && q();
|
|
474
478
|
}, { flush: "post" });
|
|
475
|
-
let
|
|
476
|
-
|
|
477
|
-
},
|
|
479
|
+
let ae = (e, t) => {
|
|
480
|
+
z(e, !0), y.value = t, e.section === "b" && e.rowKey && h(e.rowKey);
|
|
481
|
+
}, oe = (e, t, n) => {
|
|
478
482
|
let r = k.value;
|
|
479
483
|
return r.section === e && r.rowKey === t && r.columnKey === n;
|
|
480
|
-
},
|
|
484
|
+
}, se = (e, t, n) => oe(e, t, n) ? 0 : -1, ce = b(() => {
|
|
481
485
|
let e = k.value;
|
|
482
486
|
return e.section === "b" ? e.rowKey : void 0;
|
|
483
487
|
});
|
|
484
488
|
return {
|
|
485
489
|
focusAddress: k,
|
|
486
|
-
focusedBodyRowKey:
|
|
487
|
-
focusBodyRowIndex:
|
|
488
|
-
let e =
|
|
490
|
+
focusedBodyRowKey: ce,
|
|
491
|
+
focusBodyRowIndex: b(() => {
|
|
492
|
+
let e = ce.value;
|
|
489
493
|
return e === void 0 ? void 0 : a.value.getRowIndexByKey(e);
|
|
490
494
|
}),
|
|
491
|
-
cellEntered:
|
|
492
|
-
isCellFocused:
|
|
493
|
-
getCellTabIndex:
|
|
494
|
-
moveFocus:
|
|
495
|
-
moveToRowEdge:
|
|
496
|
-
moveToGridEdge:
|
|
497
|
-
moveByPage:
|
|
498
|
-
focusAddressNow:
|
|
499
|
-
syncFocusAddress:
|
|
500
|
-
enterCell:
|
|
501
|
-
exitCell:
|
|
502
|
-
cycleCellFocus:
|
|
503
|
-
restoreFocusAfterUnmount:
|
|
495
|
+
cellEntered: y,
|
|
496
|
+
isCellFocused: oe,
|
|
497
|
+
getCellTabIndex: se,
|
|
498
|
+
moveFocus: V,
|
|
499
|
+
moveToRowEdge: U,
|
|
500
|
+
moveToGridEdge: ee,
|
|
501
|
+
moveByPage: G,
|
|
502
|
+
focusAddressNow: B,
|
|
503
|
+
syncFocusAddress: ae,
|
|
504
|
+
enterCell: ne,
|
|
505
|
+
exitCell: re,
|
|
506
|
+
cycleCellFocus: ie,
|
|
507
|
+
restoreFocusAfterUnmount: q,
|
|
504
508
|
ensureFocusedCellVisibleHorizontally: R,
|
|
505
509
|
queryFocusedCellElement: L
|
|
506
510
|
};
|
|
507
|
-
},
|
|
511
|
+
}, pt = [
|
|
508
512
|
"data-index",
|
|
509
513
|
"aria-rowindex",
|
|
510
514
|
"aria-level",
|
|
511
515
|
"aria-expanded"
|
|
512
|
-
],
|
|
516
|
+
], mt = [
|
|
513
517
|
"id",
|
|
514
518
|
"aria-colindex",
|
|
515
519
|
"data-column-key",
|
|
516
520
|
"data-row-key",
|
|
517
521
|
"data-section",
|
|
518
522
|
"tabindex"
|
|
519
|
-
],
|
|
523
|
+
], ht = { class: "s-ui-table__group-main" }, gt = { class: "s-ui-table__group-title" }, _t = { class: "s-ui-table__group-counter" }, vt = [
|
|
520
524
|
"id",
|
|
521
525
|
"aria-colindex",
|
|
522
526
|
"data-column-key",
|
|
523
527
|
"data-row-key",
|
|
524
528
|
"data-section",
|
|
525
529
|
"tabindex"
|
|
526
|
-
],
|
|
530
|
+
], yt = /* @__PURE__ */ O({
|
|
527
531
|
__name: "STableGroupRow",
|
|
528
532
|
props: {
|
|
529
533
|
row: {},
|
|
@@ -555,53 +559,53 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
555
559
|
"rowClick",
|
|
556
560
|
"menuOpen"
|
|
557
561
|
],
|
|
558
|
-
setup(
|
|
559
|
-
let
|
|
560
|
-
|
|
561
|
-
}, m =
|
|
562
|
-
"s-ui-table__group-row--active":
|
|
563
|
-
"s-ui-table__group-row--collapsed": !
|
|
564
|
-
"s-ui-table__group-row--stuck":
|
|
565
|
-
"s-ui-table__group-row--dragging":
|
|
566
|
-
"s-ui-table__group-row--drop-before":
|
|
567
|
-
"s-ui-table__group-row--drop-after":
|
|
568
|
-
"s-ui-table__group-row--drop-inside":
|
|
569
|
-
})), h =
|
|
570
|
-
if (
|
|
571
|
-
}),
|
|
572
|
-
return (
|
|
573
|
-
ref:
|
|
574
|
-
class:
|
|
575
|
-
"data-index":
|
|
576
|
-
"aria-rowindex":
|
|
577
|
-
"aria-level":
|
|
578
|
-
"aria-expanded":
|
|
579
|
-
onClick:
|
|
562
|
+
setup(e, { emit: t }) {
|
|
563
|
+
let n = t, s = re(), { t: c } = ue(), f = z(!1), p = (e) => {
|
|
564
|
+
n("menuOpen"), e();
|
|
565
|
+
}, m = b(() => ({
|
|
566
|
+
"s-ui-table__group-row--active": e.active,
|
|
567
|
+
"s-ui-table__group-row--collapsed": !e.expanded,
|
|
568
|
+
"s-ui-table__group-row--stuck": e.stuck,
|
|
569
|
+
"s-ui-table__group-row--dragging": e.dragging,
|
|
570
|
+
"s-ui-table__group-row--drop-before": e.dropPosition === "before",
|
|
571
|
+
"s-ui-table__group-row--drop-after": e.dropPosition === "after",
|
|
572
|
+
"s-ui-table__group-row--drop-inside": e.dropPosition === "inside"
|
|
573
|
+
})), h = b(() => {
|
|
574
|
+
if (e.row.depth !== 0) return { paddingInlineStart: `calc(var(--s-ui-dimension-4) + ${e.row.depth * e.treeIndent}px)` };
|
|
575
|
+
}), 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"));
|
|
576
|
+
return (t, b) => (R(), C("tr", {
|
|
577
|
+
ref: e.dndRef,
|
|
578
|
+
class: P(["s-ui-table__group-row", m.value]),
|
|
579
|
+
"data-index": e.rowIndex,
|
|
580
|
+
"aria-rowindex": e.rowIndex + 2,
|
|
581
|
+
"aria-level": e.row.depth + 1,
|
|
582
|
+
"aria-expanded": e.row.hasChildren ? e.expanded : void 0,
|
|
583
|
+
onClick: b[3] ||= (e) => n("rowClick", e)
|
|
580
584
|
}, [
|
|
581
|
-
(
|
|
582
|
-
id: `${
|
|
585
|
+
(R(!0), C(y, null, B(e.leadingPlans, (m) => (R(), C("td", {
|
|
586
|
+
id: `${e.cellIdPrefix}${e.row.key}-${m.descriptor.key}`,
|
|
583
587
|
key: m.descriptor.key,
|
|
584
|
-
class:
|
|
585
|
-
style:
|
|
588
|
+
class: P([m.cellClass, "s-ui-table__group-cell"]),
|
|
589
|
+
style: F(m.style),
|
|
586
590
|
"aria-colindex": m.descriptor.colIndex,
|
|
587
591
|
"data-column-key": m.descriptor.key,
|
|
588
|
-
"data-row-key":
|
|
589
|
-
"data-section":
|
|
590
|
-
tabindex: m.descriptor.key ===
|
|
591
|
-
}, [m.descriptor.key ===
|
|
592
|
+
"data-row-key": e.row.key,
|
|
593
|
+
"data-section": G($).BODY,
|
|
594
|
+
tabindex: m.descriptor.key === e.focusColumnKey ? 0 : -1
|
|
595
|
+
}, [m.descriptor.key === e.groupColumnKey ? (R(), C("div", {
|
|
592
596
|
key: 0,
|
|
593
597
|
class: "s-ui-table__group-content",
|
|
594
|
-
style:
|
|
595
|
-
}, [
|
|
596
|
-
|
|
598
|
+
style: F(h.value)
|
|
599
|
+
}, [V(t.$slots, "row", {}, () => [
|
|
600
|
+
D(G(o), {
|
|
597
601
|
class: "s-ui-table__group-chevron",
|
|
598
|
-
appearance:
|
|
599
|
-
variant:
|
|
600
|
-
size:
|
|
601
|
-
icon:
|
|
602
|
-
"aria-label":
|
|
602
|
+
appearance: G(i).BARE,
|
|
603
|
+
variant: G(r).NEUTRAL,
|
|
604
|
+
size: G(a).SMALL,
|
|
605
|
+
icon: _.value,
|
|
606
|
+
"aria-label": v.value,
|
|
603
607
|
tabindex: "-1",
|
|
604
|
-
onClick:
|
|
608
|
+
onClick: b[0] ||= ae((e) => n("toggle"), ["stop"])
|
|
605
609
|
}, null, 8, [
|
|
606
610
|
"appearance",
|
|
607
611
|
"variant",
|
|
@@ -609,26 +613,26 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
609
613
|
"icon",
|
|
610
614
|
"aria-label"
|
|
611
615
|
]),
|
|
612
|
-
|
|
613
|
-
|
|
616
|
+
w("div", ht, [V(t.$slots, "title", {}, () => [w("span", gt, U(e.title), 1)]), w("span", _t, U(g.value), 1)]),
|
|
617
|
+
w("div", {
|
|
614
618
|
class: "s-ui-table__group-actions",
|
|
615
|
-
onClick:
|
|
616
|
-
}, [
|
|
619
|
+
onClick: b[2] ||= ae(() => {}, ["stop"])
|
|
620
|
+
}, [V(t.$slots, "actions"), G(s).menu ? (R(), x(G(u), {
|
|
617
621
|
key: 0,
|
|
618
622
|
modelValue: f.value,
|
|
619
|
-
"onUpdate:modelValue":
|
|
620
|
-
placement:
|
|
623
|
+
"onUpdate:modelValue": b[1] ||= (e) => f.value = e,
|
|
624
|
+
placement: G(l).BOTTOM_END,
|
|
621
625
|
"teleport-to": !1
|
|
622
626
|
}, {
|
|
623
|
-
trigger:
|
|
624
|
-
class:
|
|
625
|
-
appearance:
|
|
626
|
-
variant:
|
|
627
|
-
size:
|
|
628
|
-
icon: "
|
|
629
|
-
"aria-label":
|
|
627
|
+
trigger: q(({ toggle: e }) => [D(G(o), {
|
|
628
|
+
class: P(["s-ui-table__group-kebab", { "s-ui-table__group-kebab--open": f.value }]),
|
|
629
|
+
appearance: G(i).BARE,
|
|
630
|
+
variant: G(r).NEUTRAL,
|
|
631
|
+
size: G(a).SMALL,
|
|
632
|
+
icon: "menu",
|
|
633
|
+
"aria-label": G(c)("table.groupMenu"),
|
|
630
634
|
tabindex: "-1",
|
|
631
|
-
onClick: (
|
|
635
|
+
onClick: (t) => p(e)
|
|
632
636
|
}, null, 8, [
|
|
633
637
|
"class",
|
|
634
638
|
"appearance",
|
|
@@ -637,60 +641,60 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
637
641
|
"aria-label",
|
|
638
642
|
"onClick"
|
|
639
643
|
])]),
|
|
640
|
-
content:
|
|
641
|
-
default:
|
|
644
|
+
content: q(() => [D(G(d), { width: 220 }, {
|
|
645
|
+
default: q(() => [V(t.$slots, "menu")]),
|
|
642
646
|
_: 3
|
|
643
647
|
})]),
|
|
644
648
|
_: 3
|
|
645
|
-
}, 8, ["modelValue", "placement"])) :
|
|
646
|
-
])], 4)) :
|
|
647
|
-
|
|
649
|
+
}, 8, ["modelValue", "placement"])) : S("", !0)])
|
|
650
|
+
])], 4)) : S("", !0)], 14, mt))), 128)),
|
|
651
|
+
b[4] ||= w("td", {
|
|
648
652
|
class: "s-ui-table__cell s-ui-table__filler-cell s-ui-table__group-cell",
|
|
649
653
|
role: "presentation"
|
|
650
654
|
}, null, -1),
|
|
651
|
-
(
|
|
652
|
-
id: `${
|
|
653
|
-
key:
|
|
654
|
-
class:
|
|
655
|
-
style:
|
|
656
|
-
"aria-colindex":
|
|
657
|
-
"data-column-key":
|
|
658
|
-
"data-row-key":
|
|
659
|
-
"data-section":
|
|
660
|
-
tabindex:
|
|
661
|
-
}, null, 14,
|
|
662
|
-
], 10,
|
|
655
|
+
(R(!0), C(y, null, B(e.trailingPlans, (t) => (R(), C("td", {
|
|
656
|
+
id: `${e.cellIdPrefix}${e.row.key}-${t.descriptor.key}`,
|
|
657
|
+
key: t.descriptor.key,
|
|
658
|
+
class: P([t.cellClass, "s-ui-table__group-cell"]),
|
|
659
|
+
style: F(t.style),
|
|
660
|
+
"aria-colindex": t.descriptor.colIndex,
|
|
661
|
+
"data-column-key": t.descriptor.key,
|
|
662
|
+
"data-row-key": e.row.key,
|
|
663
|
+
"data-section": G($).BODY,
|
|
664
|
+
tabindex: t.descriptor.key === e.focusColumnKey ? 0 : -1
|
|
665
|
+
}, null, 14, vt))), 128))
|
|
666
|
+
], 10, pt));
|
|
663
667
|
}
|
|
664
|
-
}),
|
|
668
|
+
}), bt = {
|
|
665
669
|
key: 0,
|
|
666
670
|
class: "s-ui-table__hint-bubble",
|
|
667
671
|
role: "tooltip"
|
|
668
|
-
},
|
|
672
|
+
}, xt = /* @__PURE__ */ O({
|
|
669
673
|
__name: "STableHint",
|
|
670
674
|
props: { text: {} },
|
|
671
675
|
setup(e) {
|
|
672
|
-
let t =
|
|
673
|
-
return (n, r) => (
|
|
676
|
+
let t = z(!1);
|
|
677
|
+
return (n, r) => (R(), C("span", {
|
|
674
678
|
class: "s-ui-table__hint",
|
|
675
679
|
tabindex: "-1",
|
|
676
680
|
onPointerenter: r[0] ||= (e) => t.value = !0,
|
|
677
681
|
onPointerleave: r[1] ||= (e) => t.value = !1,
|
|
678
682
|
onFocusin: r[2] ||= (e) => t.value = !0,
|
|
679
683
|
onFocusout: r[3] ||= (e) => t.value = !1
|
|
680
|
-
}, [
|
|
684
|
+
}, [D(G(se), {
|
|
681
685
|
class: "s-ui-table__hint-icon",
|
|
682
686
|
name: "infoCircle",
|
|
683
687
|
size: 16
|
|
684
|
-
}), t.value ? (
|
|
688
|
+
}), t.value ? (R(), C("span", bt, U(e.text), 1)) : S("", !0)], 32));
|
|
685
689
|
}
|
|
686
|
-
}),
|
|
690
|
+
}), St = {
|
|
687
691
|
key: 0,
|
|
688
692
|
class: "s-ui-table__header-grip-area"
|
|
689
|
-
},
|
|
693
|
+
}, Ct = { class: "s-ui-table__header-name" }, wt = { class: "s-ui-table__header-title" }, Tt = {
|
|
690
694
|
key: 1,
|
|
691
695
|
class: "s-ui-table__header-sort",
|
|
692
696
|
"aria-hidden": "true"
|
|
693
|
-
},
|
|
697
|
+
}, Et = { class: "s-ui-table__header-sort-badge" }, Dt = /* @__PURE__ */ O({
|
|
694
698
|
__name: "STableHeaderCell",
|
|
695
699
|
props: {
|
|
696
700
|
descriptor: {},
|
|
@@ -707,82 +711,82 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
707
711
|
"sortSet",
|
|
708
712
|
"hide"
|
|
709
713
|
],
|
|
710
|
-
setup(
|
|
711
|
-
let
|
|
712
|
-
"s-ui-table__header-plaque--sorted": !!
|
|
713
|
-
"s-ui-table__header-plaque--sortable":
|
|
714
|
-
})),
|
|
715
|
-
|
|
716
|
-
},
|
|
717
|
-
|
|
714
|
+
setup(e, { emit: t }) {
|
|
715
|
+
let n = t, s = re(), { t: c } = ue(), f = b(() => !!s.menu || e.descriptor.sortable || e.descriptor.hideable), p = b(() => ({
|
|
716
|
+
"s-ui-table__header-plaque--sorted": !!e.sortDirection,
|
|
717
|
+
"s-ui-table__header-plaque--sortable": e.descriptor.sortable
|
|
718
|
+
})), 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) => {
|
|
719
|
+
e.descriptor.sortable && n("sortToggle", t.shiftKey || t.ctrlKey || t.metaKey);
|
|
720
|
+
}, T = (e, t) => {
|
|
721
|
+
n("sortSet", e), t();
|
|
718
722
|
}, O = (e) => {
|
|
719
|
-
|
|
723
|
+
n("hide"), e();
|
|
720
724
|
};
|
|
721
|
-
return (
|
|
722
|
-
class:
|
|
723
|
-
onClick:
|
|
725
|
+
return (t, b) => (R(), C("div", {
|
|
726
|
+
class: P(["s-ui-table__header-plaque", p.value]),
|
|
727
|
+
onClick: v
|
|
724
728
|
}, [
|
|
725
|
-
|
|
729
|
+
e.descriptor.draggable ? (R(), C("span", St, [D(G(o), {
|
|
726
730
|
class: "s-ui-table__header-grip",
|
|
727
|
-
appearance:
|
|
728
|
-
variant:
|
|
729
|
-
size:
|
|
731
|
+
appearance: G(i).BARE,
|
|
732
|
+
variant: G(r).NEUTRAL,
|
|
733
|
+
size: G(a).SMALL,
|
|
730
734
|
icon: "dragAndDrop",
|
|
731
|
-
"aria-label":
|
|
735
|
+
"aria-label": G(c)("table.dragColumn"),
|
|
732
736
|
tabindex: "-1",
|
|
733
|
-
onClick:
|
|
737
|
+
onClick: b[0] ||= ae(() => {}, ["stop"])
|
|
734
738
|
}, null, 8, [
|
|
735
739
|
"appearance",
|
|
736
740
|
"variant",
|
|
737
741
|
"size",
|
|
738
742
|
"aria-label"
|
|
739
|
-
])])) :
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
+
])])) : S("", !0),
|
|
744
|
+
w("span", Ct, [
|
|
745
|
+
w("span", wt, [V(t.$slots, "default", {}, () => [E(U(e.descriptor.column?.title), 1)])]),
|
|
746
|
+
e.descriptor.column?.description ? (R(), x(xt, {
|
|
743
747
|
key: 0,
|
|
744
|
-
text:
|
|
745
|
-
}, null, 8, ["text"])) :
|
|
746
|
-
|
|
747
|
-
name:
|
|
748
|
+
text: e.descriptor.column.description
|
|
749
|
+
}, null, 8, ["text"])) : S("", !0),
|
|
750
|
+
e.sortDirection ? (R(), C("span", Tt, [D(G(se), {
|
|
751
|
+
name: g.value,
|
|
748
752
|
size: 16
|
|
749
|
-
}, null, 8, ["name"]),
|
|
750
|
-
|
|
753
|
+
}, null, 8, ["name"]), w("span", Et, U(_.value), 1)])) : S("", !0),
|
|
754
|
+
e.descriptor.sortable && !e.sortDirection ? (R(), x(G(o), {
|
|
751
755
|
key: 2,
|
|
752
756
|
class: "s-ui-table__header-sort-button",
|
|
753
|
-
appearance:
|
|
754
|
-
variant:
|
|
755
|
-
size:
|
|
757
|
+
appearance: G(i).BARE,
|
|
758
|
+
variant: G(r).NEUTRAL,
|
|
759
|
+
size: G(a).SMALL,
|
|
756
760
|
icon: "ascending",
|
|
757
|
-
"aria-label":
|
|
761
|
+
"aria-label": G(c)("table.sortAsc"),
|
|
758
762
|
tabindex: "-1",
|
|
759
|
-
onClick:
|
|
763
|
+
onClick: b[1] ||= ae((e) => n("sortToggle", e.shiftKey || e.ctrlKey || e.metaKey), ["stop"])
|
|
760
764
|
}, null, 8, [
|
|
761
765
|
"appearance",
|
|
762
766
|
"variant",
|
|
763
767
|
"size",
|
|
764
768
|
"aria-label"
|
|
765
|
-
])) :
|
|
769
|
+
])) : S("", !0)
|
|
766
770
|
]),
|
|
767
|
-
|
|
768
|
-
class:
|
|
769
|
-
onClick:
|
|
770
|
-
}, [
|
|
771
|
+
w("span", {
|
|
772
|
+
class: P(["s-ui-table__header-actions", m.value]),
|
|
773
|
+
onClick: b[3] ||= ae(() => {}, ["stop"])
|
|
774
|
+
}, [f.value ? (R(), x(G(u), {
|
|
771
775
|
key: 0,
|
|
772
|
-
"model-value":
|
|
773
|
-
placement:
|
|
776
|
+
"model-value": e.menuOpen,
|
|
777
|
+
placement: G(l).BOTTOM_END,
|
|
774
778
|
"teleport-to": !1,
|
|
775
|
-
"onUpdate:modelValue":
|
|
779
|
+
"onUpdate:modelValue": b[2] ||= (e) => n("update:menuOpen", e)
|
|
776
780
|
}, {
|
|
777
|
-
trigger:
|
|
781
|
+
trigger: q(({ toggle: e }) => [D(G(o), {
|
|
778
782
|
class: "s-ui-table__header-kebab",
|
|
779
|
-
appearance:
|
|
780
|
-
variant:
|
|
781
|
-
size:
|
|
782
|
-
icon: "
|
|
783
|
-
"aria-label":
|
|
783
|
+
appearance: G(i).BARE,
|
|
784
|
+
variant: G(r).NEUTRAL,
|
|
785
|
+
size: G(a).SMALL,
|
|
786
|
+
icon: "menu",
|
|
787
|
+
"aria-label": G(c)("table.columnMenu"),
|
|
784
788
|
tabindex: "-1",
|
|
785
|
-
onClick: (
|
|
789
|
+
onClick: (t) => e()
|
|
786
790
|
}, null, 8, [
|
|
787
791
|
"appearance",
|
|
788
792
|
"variant",
|
|
@@ -790,57 +794,57 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
790
794
|
"aria-label",
|
|
791
795
|
"onClick"
|
|
792
796
|
])]),
|
|
793
|
-
content:
|
|
794
|
-
default:
|
|
795
|
-
|
|
797
|
+
content: q(({ close: n }) => [D(G(d), { width: 220 }, {
|
|
798
|
+
default: q(() => [G(s).menu ? V(t.$slots, "menu", { key: 0 }) : (R(), C(y, { key: 1 }, [
|
|
799
|
+
e.descriptor.sortable ? (R(), x(G(h), {
|
|
796
800
|
key: 0,
|
|
797
|
-
title:
|
|
801
|
+
title: G(c)("table.sortAsc"),
|
|
798
802
|
"icon-left": "ascending",
|
|
799
|
-
selected:
|
|
800
|
-
onClick: (
|
|
803
|
+
selected: e.sortDirection === G(X).ASC,
|
|
804
|
+
onClick: (e) => T(G(X).ASC, n)
|
|
801
805
|
}, null, 8, [
|
|
802
806
|
"title",
|
|
803
807
|
"selected",
|
|
804
808
|
"onClick"
|
|
805
|
-
])) :
|
|
806
|
-
|
|
809
|
+
])) : S("", !0),
|
|
810
|
+
e.descriptor.sortable ? (R(), x(G(h), {
|
|
807
811
|
key: 1,
|
|
808
|
-
title:
|
|
812
|
+
title: G(c)("table.sortDesc"),
|
|
809
813
|
"icon-left": "descending",
|
|
810
|
-
selected:
|
|
811
|
-
onClick: (
|
|
814
|
+
selected: e.sortDirection === G(X).DESC,
|
|
815
|
+
onClick: (e) => T(G(X).DESC, n)
|
|
812
816
|
}, null, 8, [
|
|
813
817
|
"title",
|
|
814
818
|
"selected",
|
|
815
819
|
"onClick"
|
|
816
|
-
])) :
|
|
817
|
-
|
|
820
|
+
])) : S("", !0),
|
|
821
|
+
e.descriptor.sortable && e.sortDirection ? (R(), x(G(h), {
|
|
818
822
|
key: 2,
|
|
819
|
-
title:
|
|
823
|
+
title: G(c)("table.sortReset"),
|
|
820
824
|
"icon-left": "closeMini",
|
|
821
|
-
onClick: (
|
|
822
|
-
}, null, 8, ["title", "onClick"])) :
|
|
823
|
-
|
|
825
|
+
onClick: (e) => T(void 0, n)
|
|
826
|
+
}, null, 8, ["title", "onClick"])) : S("", !0),
|
|
827
|
+
e.descriptor.hideable ? (R(), x(G(h), {
|
|
824
828
|
key: 3,
|
|
825
|
-
title:
|
|
829
|
+
title: G(c)("table.hideColumn"),
|
|
826
830
|
"icon-left": "eyeOff",
|
|
827
|
-
onClick: (
|
|
828
|
-
}, null, 8, ["title", "onClick"])) :
|
|
831
|
+
onClick: (e) => O(n)
|
|
832
|
+
}, null, 8, ["title", "onClick"])) : S("", !0)
|
|
829
833
|
], 64))]),
|
|
830
834
|
_: 2
|
|
831
835
|
}, 1024)]),
|
|
832
836
|
_: 3
|
|
833
|
-
}, 8, ["model-value", "placement"])) :
|
|
837
|
+
}, 8, ["model-value", "placement"])) : S("", !0)], 2)
|
|
834
838
|
], 2));
|
|
835
839
|
}
|
|
836
|
-
}),
|
|
840
|
+
}), Ot = ["data-index", "aria-rowindex"], kt = {
|
|
837
841
|
key: 0,
|
|
838
842
|
class: "s-ui-table__cell s-ui-table__filler-cell",
|
|
839
843
|
role: "presentation"
|
|
840
|
-
},
|
|
844
|
+
}, At = ["data-column-key", "data-row-key"], jt = {
|
|
841
845
|
key: 0,
|
|
842
846
|
class: "s-ui-table__cell-body"
|
|
843
|
-
},
|
|
847
|
+
}, Mt = /* @__PURE__ */ O({
|
|
844
848
|
__name: "STablePlaceholderRow",
|
|
845
849
|
props: {
|
|
846
850
|
rowIndex: {},
|
|
@@ -849,34 +853,38 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
849
853
|
rowHeight: {}
|
|
850
854
|
},
|
|
851
855
|
setup(e) {
|
|
852
|
-
let t =
|
|
853
|
-
return (n, r) => (
|
|
856
|
+
let t = b(() => e.rowHeight ? { height: `${e.rowHeight}px` } : void 0);
|
|
857
|
+
return (n, r) => (R(), C("tr", {
|
|
854
858
|
class: "s-ui-table__row s-ui-table__row--placeholder",
|
|
855
|
-
style:
|
|
859
|
+
style: F(t.value),
|
|
856
860
|
"data-index": e.rowIndex,
|
|
857
861
|
"aria-rowindex": e.rowIndex + 2,
|
|
858
862
|
"data-placeholder": "true"
|
|
859
|
-
}, [(
|
|
863
|
+
}, [(R(!0), C(y, null, B(e.cells, (t) => (R(), C(y, { key: t.key }, [t.cellPlan ? (R(), C("td", {
|
|
860
864
|
key: 1,
|
|
861
|
-
class:
|
|
862
|
-
style:
|
|
865
|
+
class: P(t.cellPlan.cellClass),
|
|
866
|
+
style: F(t.cellPlan.style),
|
|
863
867
|
"data-column-key": t.cellPlan.descriptor.key,
|
|
864
868
|
"data-row-key": e.rowKey
|
|
865
|
-
}, [t.cellPlan.descriptor.service ?
|
|
869
|
+
}, [t.cellPlan.descriptor.service ? S("", !0) : (R(), C("div", jt, [...r[0] ||= [w("span", { class: "s-ui-table__placeholder-bar" }, null, -1)]]))], 14, At)) : (R(), C("td", kt))], 64))), 128))], 12, Ot));
|
|
866
870
|
}
|
|
867
|
-
}),
|
|
871
|
+
}), Nt = (t) => e(t) || n(t), Pt = (e) => Nt(e) ? void 0 : `s-ui-table__row--color-${e}`, Ft = (n) => {
|
|
872
|
+
if (!Nt(n)) return;
|
|
873
|
+
let r = { "--s-ui-table-row-color": n };
|
|
874
|
+
return e(n) && (r["--s-ui-table-row-color-contrast"] = t(n)), r;
|
|
875
|
+
}, It = "__s-ui-table-load-more:", Lt = "__s-ui-table-depth-footer:", Rt = (e) => `${It}${e}`, zt = (e) => `${Lt}${e}`, Bt = p, Vt = (e, t) => {
|
|
868
876
|
let n = e[t];
|
|
869
877
|
if (Array.isArray(n)) return n;
|
|
870
|
-
},
|
|
878
|
+
}, Ht = (e, t) => t ? typeof t == "function" ? t(e) === !0 : e[t] === !0 : !1, Ut = (e, t) => {
|
|
871
879
|
if (!t) return;
|
|
872
880
|
if (typeof t == "function") return t(e);
|
|
873
881
|
let n = e[t];
|
|
874
882
|
if (typeof n == "string" || typeof n == "number") return n;
|
|
875
|
-
},
|
|
883
|
+
}, Wt = (e, t) => {
|
|
876
884
|
if (!t) return;
|
|
877
885
|
let n = e[t];
|
|
878
886
|
return typeof n == "number" ? n : void 0;
|
|
879
|
-
},
|
|
887
|
+
}, Gt = (e, t, n, r) => A({
|
|
880
888
|
key: e,
|
|
881
889
|
item: t,
|
|
882
890
|
depth: n,
|
|
@@ -886,10 +894,10 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
886
894
|
expanded: !1,
|
|
887
895
|
parentKey: r,
|
|
888
896
|
subtreeEnd: 0
|
|
889
|
-
}),
|
|
897
|
+
}), Kt = ({ items: e, itemKey: t, childrenKey: n, groupRow: r, expanded: i, depthFooter: a, hasMoreChildrenKey: o }) => {
|
|
890
898
|
let s = /* @__PURE__ */ new WeakMap(), c = (e, t, n) => {
|
|
891
899
|
let r = /* @__PURE__ */ new Map(), i = [], a = (e, i, a) => {
|
|
892
|
-
let s =
|
|
900
|
+
let s = Bt(e, t);
|
|
893
901
|
if (!s) return;
|
|
894
902
|
let c = {
|
|
895
903
|
key: s,
|
|
@@ -901,7 +909,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
901
909
|
row: void 0
|
|
902
910
|
};
|
|
903
911
|
r.set(s, c);
|
|
904
|
-
let l =
|
|
912
|
+
let l = Vt(e, n);
|
|
905
913
|
return l && o(c, l), c;
|
|
906
914
|
}, o = (e, t) => {
|
|
907
915
|
let n = [];
|
|
@@ -913,13 +921,13 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
913
921
|
return e.forEach((e) => {
|
|
914
922
|
let t = a(e, 0, void 0);
|
|
915
923
|
t && s.push(t);
|
|
916
|
-
}),
|
|
924
|
+
}), A({
|
|
917
925
|
nodeByKey: r,
|
|
918
926
|
roots: s,
|
|
919
927
|
expandableKeys: i
|
|
920
928
|
});
|
|
921
|
-
}, l =
|
|
922
|
-
let r =
|
|
929
|
+
}, l = b(() => {
|
|
930
|
+
let r = ee(W(e)), i = W(t), a = W(n), o = s.get(r);
|
|
923
931
|
if (o && o.itemKeyValue === i && o.childrenKeyValue === a) return o.index;
|
|
924
932
|
let l = c(r, i, a);
|
|
925
933
|
return s.set(r, {
|
|
@@ -927,33 +935,33 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
927
935
|
childrenKeyValue: a,
|
|
928
936
|
index: l
|
|
929
937
|
}), l;
|
|
930
|
-
}), u =
|
|
938
|
+
}), u = b(() => new Set(i.value)), d = /* @__PURE__ */ new WeakMap(), f = (e) => {
|
|
931
939
|
let t = d.get(e);
|
|
932
940
|
if (t) return t;
|
|
933
941
|
let n = /* @__PURE__ */ new Map();
|
|
934
942
|
return d.set(e, n), n;
|
|
935
|
-
}, p =
|
|
936
|
-
let t =
|
|
943
|
+
}, p = b(() => {
|
|
944
|
+
let t = ee(W(e)), { roots: n, nodeByKey: i } = l.value, s = W(r), c = W(a), d = W(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) => {
|
|
937
945
|
let r = g.get(e);
|
|
938
|
-
return r || (r =
|
|
946
|
+
return r || (r = Gt(e, t.item, t.depth + 1, t.key), g.set(e, r)), b(r, n, !1, !1);
|
|
939
947
|
}, C = (e) => {
|
|
940
|
-
d && e.item[d] === !0 && S(
|
|
948
|
+
d && e.item[d] === !0 && S(Rt(e.key), e, Q.LOAD_MORE);
|
|
941
949
|
}, w = (e) => {
|
|
942
950
|
if (m !== void 0 && m.has(e.depth) && h(e.item, e.depth)) {
|
|
943
|
-
let t = S(
|
|
951
|
+
let t = S(zt(e.key), e, Q.DEPTH_FOOTER);
|
|
944
952
|
y.set(e.key, t.index);
|
|
945
953
|
}
|
|
946
|
-
}, T = (e) => s &&
|
|
947
|
-
let t = T(e), n = t === Q.GROUP, r = E(e), i =
|
|
948
|
-
n && v.push(a.index), i && (e.children?.forEach((e) =>
|
|
954
|
+
}, T = (e) => s && Ht(e.item, s) ? Q.GROUP : Q.ROW, E = (e) => e.children !== void 0 && e.children.length > 0, D = (e, t, n) => (t || n) && p.has(e.key), O = (e) => {
|
|
955
|
+
let t = T(e), n = t === Q.GROUP, r = E(e), i = D(e, r, n), a = x(e, t, r, i);
|
|
956
|
+
n && v.push(a.index), i && (e.children?.forEach((e) => O(e)), C(e), w(e)), a.subtreeEnd = _.length - 1;
|
|
949
957
|
};
|
|
950
|
-
n.forEach((e) =>
|
|
951
|
-
let
|
|
958
|
+
n.forEach((e) => O(e));
|
|
959
|
+
let k = A(_), j = (e) => i.get(e)?.row ?? g.get(e), M = (e) => {
|
|
952
960
|
let t = j(e);
|
|
953
|
-
return t &&
|
|
961
|
+
return t && k[t.index] === t ? t : void 0;
|
|
954
962
|
};
|
|
955
|
-
return
|
|
956
|
-
flatRows:
|
|
963
|
+
return A({
|
|
964
|
+
flatRows: k,
|
|
957
965
|
getRowIndexByKey: (e) => M(e)?.index,
|
|
958
966
|
getSubtreeRangeByKey: (e) => {
|
|
959
967
|
let t = M(e);
|
|
@@ -962,7 +970,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
962
970
|
groupRowIndexes: v,
|
|
963
971
|
depthFooterIndexByParentKey: y
|
|
964
972
|
});
|
|
965
|
-
}), m =
|
|
973
|
+
}), m = b(() => p.value.flatRows), h = (e) => u.value.has(e), g = (e, t) => {
|
|
966
974
|
l.value.nodeByKey.get(e)?.children?.forEach((e) => {
|
|
967
975
|
t.add(e.key), g(e.key, t);
|
|
968
976
|
});
|
|
@@ -990,30 +998,30 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
990
998
|
i.value = [];
|
|
991
999
|
}
|
|
992
1000
|
};
|
|
993
|
-
},
|
|
1001
|
+
}, qt = {
|
|
994
1002
|
key: 0,
|
|
995
1003
|
class: "s-ui-table__cell-text"
|
|
996
|
-
},
|
|
1004
|
+
}, Jt = {
|
|
997
1005
|
key: 1,
|
|
998
1006
|
class: "s-ui-table__cell-placeholder"
|
|
999
|
-
},
|
|
1007
|
+
}, Yt = /* @__PURE__ */ O({
|
|
1000
1008
|
__name: "STableCellText",
|
|
1001
1009
|
props: {
|
|
1002
1010
|
column: {},
|
|
1003
1011
|
item: {}
|
|
1004
1012
|
},
|
|
1005
1013
|
setup(e) {
|
|
1006
|
-
let t =
|
|
1007
|
-
return (r, i) => n.value ? (
|
|
1014
|
+
let t = b(() => Ut(e.item, e.column.value ?? e.column.key)), n = b(() => t.value !== void 0 && t.value !== "");
|
|
1015
|
+
return (r, i) => n.value ? (R(), C("span", qt, U(t.value), 1)) : e.column.placeholder ? (R(), C("span", Jt, U(e.column.placeholder), 1)) : S("", !0);
|
|
1008
1016
|
}
|
|
1009
|
-
}),
|
|
1017
|
+
}), Xt = [
|
|
1010
1018
|
"id",
|
|
1011
1019
|
"data-index",
|
|
1012
1020
|
"aria-rowindex",
|
|
1013
1021
|
"aria-level",
|
|
1014
1022
|
"aria-expanded",
|
|
1015
1023
|
"aria-selected"
|
|
1016
|
-
],
|
|
1024
|
+
], Zt = [
|
|
1017
1025
|
"id",
|
|
1018
1026
|
"aria-colindex",
|
|
1019
1027
|
"data-column-key",
|
|
@@ -1022,13 +1030,13 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1022
1030
|
"aria-disabled",
|
|
1023
1031
|
"aria-readonly",
|
|
1024
1032
|
"tabindex"
|
|
1025
|
-
],
|
|
1033
|
+
], Qt = {
|
|
1026
1034
|
key: 2,
|
|
1027
1035
|
class: "s-ui-table__chevron-spacer"
|
|
1028
|
-
},
|
|
1036
|
+
}, $t = {
|
|
1029
1037
|
key: 3,
|
|
1030
1038
|
class: "s-ui-table__cell-body-action"
|
|
1031
|
-
},
|
|
1039
|
+
}, en = [
|
|
1032
1040
|
"id",
|
|
1033
1041
|
"aria-colindex",
|
|
1034
1042
|
"data-column-key",
|
|
@@ -1037,13 +1045,13 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1037
1045
|
"aria-disabled",
|
|
1038
1046
|
"aria-readonly",
|
|
1039
1047
|
"tabindex"
|
|
1040
|
-
],
|
|
1048
|
+
], tn = {
|
|
1041
1049
|
key: 0,
|
|
1042
1050
|
class: "s-ui-table__right-edge"
|
|
1043
|
-
},
|
|
1051
|
+
}, nn = {
|
|
1044
1052
|
key: 2,
|
|
1045
1053
|
class: "s-ui-table__cell-body-action"
|
|
1046
|
-
},
|
|
1054
|
+
}, rn = /* @__PURE__ */ O({
|
|
1047
1055
|
__name: "STableRow",
|
|
1048
1056
|
props: {
|
|
1049
1057
|
row: {},
|
|
@@ -1077,6 +1085,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1077
1085
|
},
|
|
1078
1086
|
treeIndent: {},
|
|
1079
1087
|
rowState: {},
|
|
1088
|
+
rowColor: {},
|
|
1080
1089
|
extraRowClass: {},
|
|
1081
1090
|
dndRef: { type: Function },
|
|
1082
1091
|
dragging: {
|
|
@@ -1099,218 +1108,224 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1099
1108
|
"toggleExpand",
|
|
1100
1109
|
"toggleSelected"
|
|
1101
1110
|
],
|
|
1102
|
-
setup(
|
|
1103
|
-
let
|
|
1111
|
+
setup(e, { emit: t }) {
|
|
1112
|
+
let n = t, s = re(), { t: c } = ue(), l = $.BODY, u = (t) => `${e.cellIdPrefix}${e.row.key}-${t}`, d = (t) => t === e.focusColumnKey ? 0 : -1, f = b(() => [
|
|
1104
1113
|
{
|
|
1105
|
-
"s-ui-table__row--selected":
|
|
1106
|
-
"s-ui-table__row--active":
|
|
1107
|
-
"s-ui-table__row--disabled":
|
|
1108
|
-
"s-ui-table__row--dragging":
|
|
1109
|
-
"s-ui-table__row--drop-before":
|
|
1110
|
-
"s-ui-table__row--drop-after":
|
|
1111
|
-
"s-ui-table__row--drop-inside":
|
|
1114
|
+
"s-ui-table__row--selected": e.selected,
|
|
1115
|
+
"s-ui-table__row--active": e.active,
|
|
1116
|
+
"s-ui-table__row--disabled": e.disabled,
|
|
1117
|
+
"s-ui-table__row--dragging": e.dragging,
|
|
1118
|
+
"s-ui-table__row--drop-before": e.dropPosition === "before",
|
|
1119
|
+
"s-ui-table__row--drop-after": e.dropPosition === "after",
|
|
1120
|
+
"s-ui-table__row--drop-inside": e.dropPosition === "inside",
|
|
1121
|
+
"s-ui-table__row--colored": !!e.rowColor
|
|
1112
1122
|
},
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
if (!(!
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
},
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
[
|
|
1126
|
-
[
|
|
1127
|
-
},
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1123
|
+
k.value,
|
|
1124
|
+
p.value,
|
|
1125
|
+
e.extraRowClass
|
|
1126
|
+
]), p = b(() => e.rowColor ? Pt(e.rowColor) : void 0), m = b(() => e.rowColor ? Ft(e.rowColor) : void 0), h = b(() => {
|
|
1127
|
+
let t = e.placeholder && e.placeholderHeight ? { height: `${e.placeholderHeight}px` } : void 0;
|
|
1128
|
+
if (!(!t && !m.value)) return {
|
|
1129
|
+
...t,
|
|
1130
|
+
...m.value
|
|
1131
|
+
};
|
|
1132
|
+
}), g = (t) => {
|
|
1133
|
+
if (!(!t.chevron || e.row.depth === 0)) return { paddingInlineStart: `calc(var(--s-ui-dimension-4) + ${e.row.depth * e.treeIndent}px)` };
|
|
1134
|
+
}, _ = {
|
|
1135
|
+
[Ae.DEFAULT]: void 0,
|
|
1136
|
+
[Ae.COMPLETED]: "s-ui-table__row--state-completed"
|
|
1137
|
+
}, v = {
|
|
1138
|
+
[Me.DEFAULT]: void 0,
|
|
1139
|
+
[Me.DISABLED]: "s-ui-table__cell-body--state-disabled",
|
|
1140
|
+
[Me.READONLY]: "s-ui-table__cell-body--state-readonly",
|
|
1141
|
+
[Me.EDITING]: "s-ui-table__cell-body--state-editing"
|
|
1142
|
+
}, T = (t) => {
|
|
1143
|
+
let n = t.descriptor.column?.cellState;
|
|
1144
|
+
return n ? typeof n == "function" ? n(e.row.item) : n : Me.DEFAULT;
|
|
1145
|
+
}, E = (e) => v[T(e)], D = (e) => T(e) === Me.DISABLED || void 0, O = (e) => T(e) === Me.READONLY || void 0, k = b(() => e.rowState ? _[e.rowState] : void 0), A = () => ({
|
|
1146
|
+
...e.row,
|
|
1147
|
+
selected: e.selected,
|
|
1148
|
+
indeterminate: e.indeterminate,
|
|
1149
|
+
active: e.active,
|
|
1150
|
+
disabled: e.disabled,
|
|
1151
|
+
group: e.row.kind === Q.GROUP,
|
|
1137
1152
|
toggleExpanded: () => {
|
|
1138
|
-
|
|
1153
|
+
n("toggleExpand");
|
|
1139
1154
|
},
|
|
1140
1155
|
toggleSelected: () => {
|
|
1141
|
-
|
|
1156
|
+
n("toggleSelected");
|
|
1142
1157
|
}
|
|
1143
|
-
}),
|
|
1144
|
-
let
|
|
1158
|
+
}), j = (t) => {
|
|
1159
|
+
let n = t.descriptor.column ?? { key: t.descriptor.key };
|
|
1145
1160
|
return {
|
|
1146
|
-
...
|
|
1147
|
-
column:
|
|
1148
|
-
value:
|
|
1149
|
-
cellState:
|
|
1161
|
+
...A(),
|
|
1162
|
+
column: n,
|
|
1163
|
+
value: Ut(e.row.item, n.value ?? n.key),
|
|
1164
|
+
cellState: T(t)
|
|
1150
1165
|
};
|
|
1151
|
-
}, N = (
|
|
1152
|
-
let
|
|
1153
|
-
return
|
|
1154
|
-
},
|
|
1166
|
+
}, N = (t) => {
|
|
1167
|
+
let n = [...e.leadingPlans, ...e.trailingPlans].find((e) => e.descriptor.key === t);
|
|
1168
|
+
return n ? T(n) === Me.DISABLED : !1;
|
|
1169
|
+
}, I = (e) => {
|
|
1155
1170
|
let t = e.target;
|
|
1156
1171
|
if (t instanceof Element) {
|
|
1157
|
-
let
|
|
1158
|
-
|
|
1172
|
+
let r = t.closest("td[data-column-key]")?.getAttribute("data-column-key");
|
|
1173
|
+
r && !N(r) && n("cellClick", r, e);
|
|
1159
1174
|
}
|
|
1160
|
-
|
|
1175
|
+
n("rowClick", e);
|
|
1161
1176
|
};
|
|
1162
|
-
return (
|
|
1163
|
-
id:
|
|
1164
|
-
ref:
|
|
1165
|
-
class:
|
|
1166
|
-
style:
|
|
1167
|
-
"data-index":
|
|
1168
|
-
"aria-rowindex":
|
|
1169
|
-
"aria-level":
|
|
1170
|
-
"aria-expanded":
|
|
1171
|
-
"aria-selected":
|
|
1172
|
-
onClick:
|
|
1173
|
-
onContextmenu:
|
|
1177
|
+
return (t, p) => (R(), C("tr", {
|
|
1178
|
+
id: e.domId,
|
|
1179
|
+
ref: e.dndRef,
|
|
1180
|
+
class: P(["s-ui-table__row", f.value]),
|
|
1181
|
+
style: F(h.value),
|
|
1182
|
+
"data-index": e.rowIndex,
|
|
1183
|
+
"aria-rowindex": e.rowIndex + 2,
|
|
1184
|
+
"aria-level": e.row.depth + 1,
|
|
1185
|
+
"aria-expanded": e.row.hasChildren ? e.rowExpanded : void 0,
|
|
1186
|
+
"aria-selected": e.selected || void 0,
|
|
1187
|
+
onClick: I,
|
|
1188
|
+
onContextmenu: p[3] ||= (e) => n("rowContextMenu", e)
|
|
1174
1189
|
}, [
|
|
1175
|
-
(
|
|
1190
|
+
(R(!0), C(y, null, B(e.leadingPlans, (f) => (R(), C("td", {
|
|
1176
1191
|
id: u(f.descriptor.key),
|
|
1177
1192
|
key: f.descriptor.key,
|
|
1178
|
-
class:
|
|
1179
|
-
style:
|
|
1193
|
+
class: P(f.cellClass),
|
|
1194
|
+
style: F(f.style),
|
|
1180
1195
|
"aria-colindex": f.descriptor.colIndex,
|
|
1181
1196
|
"data-column-key": f.descriptor.key,
|
|
1182
|
-
"data-row-key":
|
|
1183
|
-
"data-section":
|
|
1184
|
-
"aria-disabled":
|
|
1185
|
-
"aria-readonly":
|
|
1197
|
+
"data-row-key": e.row.key,
|
|
1198
|
+
"data-section": G(l),
|
|
1199
|
+
"aria-disabled": D(f),
|
|
1200
|
+
"aria-readonly": O(f),
|
|
1186
1201
|
tabindex: d(f.descriptor.key)
|
|
1187
|
-
}, [f.descriptor.service ===
|
|
1202
|
+
}, [f.descriptor.service === G(qe).INDICATOR ? (R(), C(y, { key: 0 }, [e.placeholder ? S("", !0) : V(t.$slots, "indicator", M({
|
|
1188
1203
|
key: 0,
|
|
1189
1204
|
ref_for: !0
|
|
1190
|
-
},
|
|
1205
|
+
}, A()))], 64)) : f.descriptor.service === G(qe).CHECKBOX ? (R(), C(y, { key: 1 }, [G(s).checkbox && !e.placeholder ? V(t.$slots, "checkbox", M({
|
|
1191
1206
|
key: 0,
|
|
1192
1207
|
ref_for: !0
|
|
1193
|
-
},
|
|
1208
|
+
}, A())) : e.rowSelectable && !e.placeholder ? (R(), x(We, {
|
|
1194
1209
|
key: 1,
|
|
1195
|
-
class:
|
|
1196
|
-
"model-value":
|
|
1197
|
-
indeterminate:
|
|
1198
|
-
"screen-reader-label":
|
|
1199
|
-
"onUpdate:modelValue":
|
|
1200
|
-
onClick:
|
|
1210
|
+
class: P(["s-ui-table__row-checkbox", { "s-ui-table__row-checkbox--active": e.selected || e.indeterminate }]),
|
|
1211
|
+
"model-value": e.selected,
|
|
1212
|
+
indeterminate: e.indeterminate,
|
|
1213
|
+
"screen-reader-label": G(c)("table.selectRow"),
|
|
1214
|
+
"onUpdate:modelValue": p[0] ||= (e) => n("toggleSelected"),
|
|
1215
|
+
onClick: p[1] ||= ae(() => {}, ["stop"])
|
|
1201
1216
|
}, null, 8, [
|
|
1202
1217
|
"class",
|
|
1203
1218
|
"model-value",
|
|
1204
1219
|
"indeterminate",
|
|
1205
1220
|
"screen-reader-label"
|
|
1206
|
-
])) :
|
|
1221
|
+
])) : S("", !0)], 64)) : e.placeholder ? (R(), C("div", {
|
|
1207
1222
|
key: 2,
|
|
1208
1223
|
class: "s-ui-table__cell-body",
|
|
1209
|
-
style:
|
|
1210
|
-
}, [...
|
|
1224
|
+
style: F(g(f))
|
|
1225
|
+
}, [...p[4] ||= [w("span", { class: "s-ui-table__placeholder-bar" }, null, -1)]], 4)) : (R(), C("div", {
|
|
1211
1226
|
key: 3,
|
|
1212
|
-
class:
|
|
1213
|
-
style:
|
|
1227
|
+
class: P(["s-ui-table__cell-body", E(f)]),
|
|
1228
|
+
style: F(g(f))
|
|
1214
1229
|
}, [
|
|
1215
|
-
f.chevron ? (
|
|
1230
|
+
f.chevron ? (R(), C(y, { key: 0 }, [G(s).chevron ? V(t.$slots, "chevron", M({
|
|
1216
1231
|
key: 0,
|
|
1217
1232
|
ref_for: !0
|
|
1218
|
-
},
|
|
1233
|
+
}, A())) : e.row.hasChildren ? (R(), x(G(o), {
|
|
1219
1234
|
key: 1,
|
|
1220
1235
|
class: "s-ui-table__chevron",
|
|
1221
|
-
appearance:
|
|
1222
|
-
variant:
|
|
1223
|
-
size:
|
|
1224
|
-
icon:
|
|
1225
|
-
"aria-label":
|
|
1236
|
+
appearance: G(i).BARE,
|
|
1237
|
+
variant: G(r).NEUTRAL,
|
|
1238
|
+
size: G(a).SMALL,
|
|
1239
|
+
icon: e.rowExpanded ? "chevronMiniDown" : "chevronMiniRight",
|
|
1240
|
+
"aria-label": e.rowExpanded ? G(c)("table.collapse") : G(c)("table.expand"),
|
|
1226
1241
|
tabindex: "-1",
|
|
1227
|
-
onClick:
|
|
1242
|
+
onClick: p[2] ||= ae((e) => n("toggleExpand"), ["stop"])
|
|
1228
1243
|
}, null, 8, [
|
|
1229
1244
|
"appearance",
|
|
1230
1245
|
"variant",
|
|
1231
1246
|
"size",
|
|
1232
1247
|
"icon",
|
|
1233
1248
|
"aria-label"
|
|
1234
|
-
])) : (
|
|
1235
|
-
|
|
1249
|
+
])) : (R(), C("span", Qt))], 64)) : S("", !0),
|
|
1250
|
+
G(s)[`cell:${f.descriptor.key}`] ? V(t.$slots, `cell:${f.descriptor.key}`, M({
|
|
1236
1251
|
key: 1,
|
|
1237
1252
|
ref_for: !0
|
|
1238
|
-
},
|
|
1253
|
+
}, j(f))) : f.descriptor.column ? (R(), x(Yt, {
|
|
1239
1254
|
key: 2,
|
|
1240
1255
|
column: f.descriptor.column,
|
|
1241
|
-
item:
|
|
1242
|
-
}, null, 8, ["column", "item"])) :
|
|
1243
|
-
|
|
1244
|
-
], 6))], 14,
|
|
1245
|
-
|
|
1256
|
+
item: e.row.item
|
|
1257
|
+
}, null, 8, ["column", "item"])) : S("", !0),
|
|
1258
|
+
G(s)["cell-actions"] && !e.placeholder ? (R(), C("span", $t, [V(t.$slots, "cell-actions", M({ ref_for: !0 }, j(f)))])) : S("", !0)
|
|
1259
|
+
], 6))], 14, Zt))), 128)),
|
|
1260
|
+
p[6] ||= w("td", {
|
|
1246
1261
|
class: "s-ui-table__cell s-ui-table__filler-cell",
|
|
1247
1262
|
role: "presentation"
|
|
1248
1263
|
}, null, -1),
|
|
1249
|
-
(
|
|
1250
|
-
id: u(
|
|
1251
|
-
key:
|
|
1252
|
-
class:
|
|
1253
|
-
style:
|
|
1254
|
-
"aria-colindex":
|
|
1255
|
-
"data-column-key":
|
|
1256
|
-
"data-row-key":
|
|
1257
|
-
"data-section":
|
|
1258
|
-
"aria-disabled":
|
|
1259
|
-
"aria-readonly":
|
|
1260
|
-
tabindex: d(
|
|
1261
|
-
}, [
|
|
1264
|
+
(R(!0), C(y, null, B(e.trailingPlans, (n) => (R(), C("td", {
|
|
1265
|
+
id: u(n.descriptor.key),
|
|
1266
|
+
key: n.descriptor.key,
|
|
1267
|
+
class: P(n.cellClass),
|
|
1268
|
+
style: F(n.style),
|
|
1269
|
+
"aria-colindex": n.descriptor.colIndex,
|
|
1270
|
+
"data-column-key": n.descriptor.key,
|
|
1271
|
+
"data-row-key": e.row.key,
|
|
1272
|
+
"data-section": G(l),
|
|
1273
|
+
"aria-disabled": D(n),
|
|
1274
|
+
"aria-readonly": O(n),
|
|
1275
|
+
tabindex: d(n.descriptor.key)
|
|
1276
|
+
}, [n.descriptor.service === G(qe).RIGHT_EDGE ? (R(), C(y, { key: 0 }, [e.placeholder ? S("", !0) : (R(), C("div", tn, [V(t.$slots, "right-edge", M({ ref_for: !0 }, A()))]))], 64)) : e.placeholder ? (R(), C("div", {
|
|
1262
1277
|
key: 1,
|
|
1263
1278
|
class: "s-ui-table__cell-body",
|
|
1264
|
-
style:
|
|
1265
|
-
}, [...
|
|
1279
|
+
style: F(g(n))
|
|
1280
|
+
}, [...p[5] ||= [w("span", { class: "s-ui-table__placeholder-bar" }, null, -1)]], 4)) : (R(), C("div", {
|
|
1266
1281
|
key: 2,
|
|
1267
|
-
class:
|
|
1268
|
-
style:
|
|
1269
|
-
}, [
|
|
1282
|
+
class: P(["s-ui-table__cell-body", E(n)]),
|
|
1283
|
+
style: F(g(n))
|
|
1284
|
+
}, [G(s)[`cell:${n.descriptor.key}`] ? V(t.$slots, `cell:${n.descriptor.key}`, M({
|
|
1270
1285
|
key: 0,
|
|
1271
1286
|
ref_for: !0
|
|
1272
|
-
},
|
|
1287
|
+
}, j(n))) : n.descriptor.column ? (R(), x(Yt, {
|
|
1273
1288
|
key: 1,
|
|
1274
|
-
column:
|
|
1275
|
-
item:
|
|
1276
|
-
}, null, 8, ["column", "item"])) :
|
|
1277
|
-
], 46,
|
|
1289
|
+
column: n.descriptor.column,
|
|
1290
|
+
item: e.row.item
|
|
1291
|
+
}, null, 8, ["column", "item"])) : S("", !0), G(s)["cell-actions"] && !e.placeholder ? (R(), C("span", nn, [V(t.$slots, "cell-actions", M({ ref_for: !0 }, j(n)))])) : S("", !0)], 6))], 14, en))), 128))
|
|
1292
|
+
], 46, Xt));
|
|
1278
1293
|
}
|
|
1279
|
-
}),
|
|
1294
|
+
}), an = {
|
|
1280
1295
|
class: "s-ui-table__row s-ui-table__row--skeleton",
|
|
1281
1296
|
"aria-hidden": "true"
|
|
1282
|
-
},
|
|
1297
|
+
}, on = { class: "s-ui-table__cell-body" }, sn = /* @__PURE__ */ O({
|
|
1283
1298
|
__name: "STableSkeletonRow",
|
|
1284
1299
|
props: {
|
|
1285
1300
|
leadingPlans: {},
|
|
1286
1301
|
trailingPlans: {}
|
|
1287
1302
|
},
|
|
1288
1303
|
setup(e) {
|
|
1289
|
-
return (t, n) => (
|
|
1290
|
-
(
|
|
1304
|
+
return (t, n) => (R(), C("tr", an, [
|
|
1305
|
+
(R(!0), C(y, null, B(e.leadingPlans, (e) => (R(), C("td", {
|
|
1291
1306
|
key: e.descriptor.key,
|
|
1292
|
-
class:
|
|
1293
|
-
style:
|
|
1294
|
-
}, [e.descriptor.column ?
|
|
1307
|
+
class: P(e.cellClass),
|
|
1308
|
+
style: F(e.style)
|
|
1309
|
+
}, [e.descriptor.column ? V(t.$slots, "default", {
|
|
1295
1310
|
key: 0,
|
|
1296
1311
|
descriptor: e.descriptor
|
|
1297
|
-
}, () => [
|
|
1312
|
+
}, () => [w("div", on, [D(G(le), {
|
|
1298
1313
|
class: "s-ui-table__skeleton",
|
|
1299
|
-
type: e.descriptor.primary ?
|
|
1300
|
-
}, null, 8, ["type"])])]) :
|
|
1301
|
-
n[0] ||=
|
|
1314
|
+
type: e.descriptor.primary ? G(oe).S_TABLE_ROW : G(oe).S_TABLE_CELL
|
|
1315
|
+
}, null, 8, ["type"])])]) : S("", !0)], 6))), 128)),
|
|
1316
|
+
n[0] ||= w("td", {
|
|
1302
1317
|
class: "s-ui-table__cell s-ui-table__filler-cell",
|
|
1303
1318
|
role: "presentation"
|
|
1304
1319
|
}, null, -1),
|
|
1305
|
-
(
|
|
1320
|
+
(R(!0), C(y, null, B(e.trailingPlans, (e) => (R(), C("td", {
|
|
1306
1321
|
key: e.descriptor.key,
|
|
1307
|
-
class:
|
|
1308
|
-
style:
|
|
1322
|
+
class: P(e.cellClass),
|
|
1323
|
+
style: F(e.style)
|
|
1309
1324
|
}, null, 6))), 128))
|
|
1310
1325
|
]));
|
|
1311
1326
|
}
|
|
1312
|
-
}),
|
|
1313
|
-
let o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c =
|
|
1327
|
+
}), 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 }) => {
|
|
1328
|
+
let o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = H(), l = H(), u = (e) => r.value.find((t) => t.key === e), d = (e, t) => {
|
|
1314
1329
|
let n = u(e), r = u(t);
|
|
1315
1330
|
if (!n || !r || r.primary) return !1;
|
|
1316
1331
|
let i = (e) => e.sticky ?? "regular";
|
|
@@ -1324,22 +1339,22 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1324
1339
|
}
|
|
1325
1340
|
if (s.get(r) === t) return;
|
|
1326
1341
|
o.get(r)?.(), s.set(r, t);
|
|
1327
|
-
let i =
|
|
1342
|
+
let i = J(be({
|
|
1328
1343
|
element: r,
|
|
1329
1344
|
canDrag: () => {
|
|
1330
1345
|
let e = u(t);
|
|
1331
|
-
return !!(
|
|
1346
|
+
return !!(W(n) && e?.draggable && !W(a));
|
|
1332
1347
|
},
|
|
1333
1348
|
getInitialData: () => ({
|
|
1334
|
-
type:
|
|
1349
|
+
type: cn,
|
|
1335
1350
|
tableId: e,
|
|
1336
1351
|
columnKey: t
|
|
1337
1352
|
}),
|
|
1338
1353
|
onGenerateDragPreview: ({ nativeSetDragImage: e }) => {
|
|
1339
1354
|
let n = u(t);
|
|
1340
|
-
|
|
1355
|
+
Ce({
|
|
1341
1356
|
nativeSetDragImage: e,
|
|
1342
|
-
getOffset:
|
|
1357
|
+
getOffset: we({
|
|
1343
1358
|
x: "8px",
|
|
1344
1359
|
y: "8px"
|
|
1345
1360
|
}),
|
|
@@ -1355,16 +1370,16 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1355
1370
|
onDrop: () => {
|
|
1356
1371
|
c.value = void 0, l.value = void 0;
|
|
1357
1372
|
}
|
|
1358
|
-
}),
|
|
1373
|
+
}), xe({
|
|
1359
1374
|
element: r,
|
|
1360
|
-
canDrop: ({ source: n }) =>
|
|
1361
|
-
getData: ({ input: e, element: n }) =>
|
|
1375
|
+
canDrop: ({ source: n }) => un(n.data, e) && n.data.columnKey !== t && d(n.data.columnKey, t),
|
|
1376
|
+
getData: ({ input: e, element: n }) => Te({ columnKey: t }, {
|
|
1362
1377
|
input: e,
|
|
1363
1378
|
element: n,
|
|
1364
1379
|
allowedEdges: ["left", "right"]
|
|
1365
1380
|
}),
|
|
1366
1381
|
onDrag: ({ self: e }) => {
|
|
1367
|
-
let n =
|
|
1382
|
+
let n = Ee(e.data);
|
|
1368
1383
|
if (n === "left" || n === "right") {
|
|
1369
1384
|
let e = l.value;
|
|
1370
1385
|
(e?.targetKey !== t || e.edge !== n) && (l.value = {
|
|
@@ -1378,23 +1393,23 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1378
1393
|
}
|
|
1379
1394
|
}));
|
|
1380
1395
|
o.set(r, i);
|
|
1381
|
-
}, p =
|
|
1382
|
-
canMonitor: ({ source: t }) =>
|
|
1396
|
+
}, p = Se({
|
|
1397
|
+
canMonitor: ({ source: t }) => un(t.data, e),
|
|
1383
1398
|
onDrop: ({ source: t, location: n }) => {
|
|
1384
1399
|
c.value = void 0, l.value = void 0;
|
|
1385
1400
|
let r = n.current.dropTargets[0];
|
|
1386
|
-
if (!r || !
|
|
1387
|
-
let a = r.data, o = a.columnKey, s =
|
|
1401
|
+
if (!r || !un(t.data, e)) return;
|
|
1402
|
+
let a = r.data, o = a.columnKey, s = Ee(a);
|
|
1388
1403
|
typeof o != "string" || s !== "left" && s !== "right" || o !== t.data.columnKey && i(t.data.columnKey, o, s);
|
|
1389
1404
|
}
|
|
1390
1405
|
});
|
|
1391
|
-
|
|
1406
|
+
I(() => {
|
|
1392
1407
|
p(), o.forEach((e) => {
|
|
1393
1408
|
e();
|
|
1394
1409
|
}), o.clear(), s.clear();
|
|
1395
1410
|
});
|
|
1396
|
-
let m =
|
|
1397
|
-
return
|
|
1411
|
+
let m = H();
|
|
1412
|
+
return K(l, (e) => {
|
|
1398
1413
|
let n = t.value, r = e ? n?.querySelector(`th[data-column-key="${e.targetKey}"]`) : void 0;
|
|
1399
1414
|
if (!e || !n || !r) {
|
|
1400
1415
|
m.value = void 0;
|
|
@@ -1408,12 +1423,12 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1408
1423
|
dropIndicator: l,
|
|
1409
1424
|
dropLineStyle: m
|
|
1410
1425
|
};
|
|
1411
|
-
},
|
|
1412
|
-
[
|
|
1413
|
-
[
|
|
1414
|
-
[
|
|
1415
|
-
},
|
|
1416
|
-
let i =
|
|
1426
|
+
}, pn = {
|
|
1427
|
+
[ke.LEFT]: "s-ui-table__cell--align-left",
|
|
1428
|
+
[ke.CENTER]: "s-ui-table__cell--align-center",
|
|
1429
|
+
[ke.RIGHT]: "s-ui-table__cell--align-right"
|
|
1430
|
+
}, mn = ({ columnDescriptors: e, hasTreeStructure: t, expandColumnKey: n, primaryColumnKey: r }) => {
|
|
1431
|
+
let i = b(() => e.value.filter((e) => e.sticky !== Y.RIGHT)), a = b(() => e.value.filter((e) => e.sticky === Y.RIGHT)), o = b(() => {
|
|
1417
1432
|
let e = (e) => ({
|
|
1418
1433
|
key: e.key,
|
|
1419
1434
|
descriptor: e
|
|
@@ -1421,7 +1436,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1421
1436
|
return [
|
|
1422
1437
|
...i.value.map(e),
|
|
1423
1438
|
{
|
|
1424
|
-
key:
|
|
1439
|
+
key: Ue,
|
|
1425
1440
|
descriptor: void 0
|
|
1426
1441
|
},
|
|
1427
1442
|
...a.value.map(e)
|
|
@@ -1429,22 +1444,25 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1429
1444
|
}), s = (e) => {
|
|
1430
1445
|
if (!e.sticky || !e.stickyOffsetVar || !e.liveStickyOffsetVar) return;
|
|
1431
1446
|
let t = `var(${e.liveStickyOffsetVar}, var(${e.stickyOffsetVar}))`;
|
|
1432
|
-
return e.sticky ===
|
|
1447
|
+
return e.sticky === Y.LEFT ? {
|
|
1448
|
+
left: t,
|
|
1449
|
+
"--s-ui-table-cell-inline-offset": t
|
|
1450
|
+
} : { right: t };
|
|
1433
1451
|
}, c = (e) => {
|
|
1434
|
-
let t = e.service ?
|
|
1452
|
+
let t = e.service ? Je[e.service] : void 0;
|
|
1435
1453
|
return {
|
|
1436
|
-
"s-ui-table__cell--sticky-left": e.sticky ===
|
|
1437
|
-
"s-ui-table__cell--sticky-right": e.sticky ===
|
|
1454
|
+
"s-ui-table__cell--sticky-left": e.sticky === Y.LEFT,
|
|
1455
|
+
"s-ui-table__cell--sticky-right": e.sticky === Y.RIGHT,
|
|
1438
1456
|
"s-ui-table__cell--last-sticky-left": e.lastStickyLeft,
|
|
1439
1457
|
"s-ui-table__cell--first-sticky-right": e.firstStickyRight,
|
|
1440
1458
|
"s-ui-table__cell--primary": e.primary,
|
|
1441
1459
|
[`s-ui-table__cell--service-${t}`]: !!t,
|
|
1442
|
-
[
|
|
1460
|
+
[pn[e.align]]: !!e.column
|
|
1443
1461
|
};
|
|
1444
1462
|
}, l = (e) => {
|
|
1445
|
-
if (!
|
|
1446
|
-
let i =
|
|
1447
|
-
return e.key === (i ??
|
|
1463
|
+
if (!W(t) || !e.column) return !1;
|
|
1464
|
+
let i = W(n);
|
|
1465
|
+
return e.key === (i ?? W(r));
|
|
1448
1466
|
}, u = (e) => {
|
|
1449
1467
|
let t = ["s-ui-table__cell"];
|
|
1450
1468
|
return Object.entries(c(e)).forEach(([e, n]) => {
|
|
@@ -1455,7 +1473,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1455
1473
|
style: s(e),
|
|
1456
1474
|
chevron: l(e)
|
|
1457
1475
|
};
|
|
1458
|
-
}, d =
|
|
1476
|
+
}, d = b(() => i.value.map(u)), f = b(() => a.value.map(u));
|
|
1459
1477
|
return {
|
|
1460
1478
|
leadingDescriptors: i,
|
|
1461
1479
|
trailingDescriptors: a,
|
|
@@ -1464,7 +1482,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1464
1482
|
getHeaderCellClasses: c,
|
|
1465
1483
|
leadingCellPlans: d,
|
|
1466
1484
|
trailingCellPlans: f,
|
|
1467
|
-
rowCellPlans:
|
|
1485
|
+
rowCellPlans: b(() => {
|
|
1468
1486
|
let e = (e) => ({
|
|
1469
1487
|
key: e.descriptor.key,
|
|
1470
1488
|
cellPlan: e
|
|
@@ -1472,15 +1490,15 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1472
1490
|
return [
|
|
1473
1491
|
...d.value.map(e),
|
|
1474
1492
|
{
|
|
1475
|
-
key:
|
|
1493
|
+
key: Ue,
|
|
1476
1494
|
cellPlan: void 0
|
|
1477
1495
|
},
|
|
1478
1496
|
...f.value.map(e)
|
|
1479
1497
|
];
|
|
1480
1498
|
})
|
|
1481
1499
|
};
|
|
1482
|
-
},
|
|
1483
|
-
let s =
|
|
1500
|
+
}, hn = ({ tableRootElement: e, scrollElement: t, columnDescriptors: n, columnWidths: r, enabled: i, onResizeEnd: a, remeasureRows: o }) => {
|
|
1501
|
+
let s = z(), c = b(() => s.value?.columnKey), l = (e, t) => {
|
|
1484
1502
|
let n = Math.max(e.minWidth, t);
|
|
1485
1503
|
return e.maxWidth ? Math.min(e.maxWidth, n) : n;
|
|
1486
1504
|
}, u = (t, r) => {
|
|
@@ -1490,11 +1508,11 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1490
1508
|
s && i.style.setProperty(s.liveWidthVar, `${r}px`);
|
|
1491
1509
|
let c = 0;
|
|
1492
1510
|
o.forEach((e) => {
|
|
1493
|
-
e.sticky ===
|
|
1511
|
+
e.sticky === Y.LEFT && e.liveStickyOffsetVar && (i.style.setProperty(e.liveStickyOffsetVar, `${c}px`), c += a(e));
|
|
1494
1512
|
});
|
|
1495
1513
|
let l = 0;
|
|
1496
1514
|
[...o].reverse().forEach((e) => {
|
|
1497
|
-
e.sticky ===
|
|
1515
|
+
e.sticky === Y.RIGHT && e.liveStickyOffsetVar && (i.style.setProperty(e.liveStickyOffsetVar, `${l}px`), l += a(e));
|
|
1498
1516
|
});
|
|
1499
1517
|
}, d = () => {
|
|
1500
1518
|
let t = e.value;
|
|
@@ -1510,25 +1528,25 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1510
1528
|
let t = s.value;
|
|
1511
1529
|
t && (s.value = void 0, e && f(t.columnKey, t.liveWidth), d());
|
|
1512
1530
|
};
|
|
1513
|
-
return
|
|
1531
|
+
return pe("pointermove", (e) => {
|
|
1514
1532
|
let t = s.value;
|
|
1515
1533
|
if (!t || e.pointerId !== t.pointerId) return;
|
|
1516
1534
|
let r = n.value.find((e) => e.key === t.columnKey);
|
|
1517
1535
|
if (!r) return;
|
|
1518
1536
|
let i = l(r, t.startWidth + (e.clientX - t.startClientX));
|
|
1519
1537
|
i !== t.liveWidth && (t.liveWidth = i, u(t.columnKey, i));
|
|
1520
|
-
}),
|
|
1538
|
+
}), pe("pointerup", (e) => {
|
|
1521
1539
|
s.value && e.pointerId === s.value.pointerId && p(!0);
|
|
1522
|
-
}),
|
|
1540
|
+
}), pe("pointercancel", () => {
|
|
1523
1541
|
p(!1);
|
|
1524
|
-
}),
|
|
1542
|
+
}), pe("blur", () => {
|
|
1525
1543
|
p(!1);
|
|
1526
|
-
}),
|
|
1544
|
+
}), pe("keydown", (e) => {
|
|
1527
1545
|
s.value && e.key === "Escape" && (e.preventDefault(), p(!1));
|
|
1528
1546
|
}), {
|
|
1529
1547
|
resizingColumnKey: c,
|
|
1530
1548
|
handleResizeHandlePointerdown: (e, t) => {
|
|
1531
|
-
if (!
|
|
1549
|
+
if (!W(i)) return;
|
|
1532
1550
|
let r = n.value.find((e) => e.key === t);
|
|
1533
1551
|
r?.resizable && (e.preventDefault(), e.stopPropagation(), e.isTrusted && e.target instanceof Element && e.target.setPointerCapture(e.pointerId), s.value = {
|
|
1534
1552
|
columnKey: t,
|
|
@@ -1539,7 +1557,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1539
1557
|
});
|
|
1540
1558
|
},
|
|
1541
1559
|
handleResizeHandleKeydown: (e, t) => {
|
|
1542
|
-
if (!
|
|
1560
|
+
if (!W(i) || e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
1543
1561
|
let r = n.value.find((e) => e.key === t);
|
|
1544
1562
|
if (!r?.resizable) return;
|
|
1545
1563
|
e.preventDefault();
|
|
@@ -1547,7 +1565,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1547
1565
|
s !== r.width && f(t, s);
|
|
1548
1566
|
},
|
|
1549
1567
|
handleResizeHandleDblclick: (e) => {
|
|
1550
|
-
if (!
|
|
1568
|
+
if (!W(i)) return;
|
|
1551
1569
|
let r = n.value.find((t) => t.key === e), a = t.value;
|
|
1552
1570
|
if (!r?.resizable || !a) return;
|
|
1553
1571
|
let o = r.minWidth;
|
|
@@ -1558,19 +1576,19 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1558
1576
|
s !== r.width && f(e, s);
|
|
1559
1577
|
}
|
|
1560
1578
|
};
|
|
1561
|
-
},
|
|
1579
|
+
}, gn = ({ gridFocus: e, columnDescriptors: t, flatRows: n, expandColumnKey: r, primaryColumnKey: i, groupColumnKey: a, selectable: o, openMenuColumnKey: s, toggleExpanded: c, toggleRowSelected: l, applySortCycle: u, setColumnMenuOpen: d, resizeColumnByKeyboard: f, onDepthFooterActivate: p, onLoadMoreActivate: h, onRowActivate: g }) => {
|
|
1562
1580
|
let _ = () => {
|
|
1563
1581
|
let n = e.focusAddress.value.columnKey;
|
|
1564
1582
|
return t.value.find((e) => e.key === n);
|
|
1565
1583
|
}, v = () => {
|
|
1566
1584
|
let t = e.focusBodyRowIndex.value;
|
|
1567
1585
|
return t === void 0 ? void 0 : n.value[t];
|
|
1568
|
-
}, y = (e) => e.kind === Q.GROUP ?
|
|
1586
|
+
}, y = (e) => e.kind === Q.GROUP ? W(a) : W(r) ?? W(i), b = (t) => {
|
|
1569
1587
|
let n = t.target;
|
|
1570
1588
|
if (!(n instanceof HTMLElement)) return;
|
|
1571
1589
|
let r = n.closest("[data-section]");
|
|
1572
1590
|
if (!(r instanceof HTMLElement)) return;
|
|
1573
|
-
let i =
|
|
1591
|
+
let i = dt(r.dataset.section ?? null), a = r.dataset.columnKey;
|
|
1574
1592
|
!i || !a || e.syncFocusAddress({
|
|
1575
1593
|
section: i,
|
|
1576
1594
|
rowKey: r.dataset.rowKey,
|
|
@@ -1581,7 +1599,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1581
1599
|
if (r.section !== $.BODY || !r.rowKey) return !1;
|
|
1582
1600
|
let i = v();
|
|
1583
1601
|
if (!i || i.kind === Q.DEPTH_FOOTER || r.columnKey !== y(i)) return !1;
|
|
1584
|
-
let a =
|
|
1602
|
+
let a = m(t, i.key, n.value);
|
|
1585
1603
|
return a ? a.type === "select" ? (e.focusAddressNow({
|
|
1586
1604
|
section: $.BODY,
|
|
1587
1605
|
rowKey: a.rowKey,
|
|
@@ -1604,7 +1622,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1604
1622
|
return;
|
|
1605
1623
|
}
|
|
1606
1624
|
if (r.kind === Q.DEPTH_FOOTER) {
|
|
1607
|
-
|
|
1625
|
+
p(r);
|
|
1608
1626
|
return;
|
|
1609
1627
|
}
|
|
1610
1628
|
if (r.kind === Q.LOAD_MORE) {
|
|
@@ -1626,9 +1644,9 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1626
1644
|
let n = _();
|
|
1627
1645
|
if (!n) return !1;
|
|
1628
1646
|
let r = t.key === "ArrowLeft" || t.key === "ArrowRight";
|
|
1629
|
-
if (t.altKey && t.shiftKey && r) return t.preventDefault(),
|
|
1647
|
+
if (t.altKey && t.shiftKey && r) return t.preventDefault(), f(n, t.key === "ArrowRight" ? 1 : -1), !0;
|
|
1630
1648
|
let i = t.altKey && t.key === "ArrowDown" || t.key === "ContextMenu", a = e.focusAddress.value.section === $.HEADER;
|
|
1631
|
-
return n.column && a && i ? (t.preventDefault(),
|
|
1649
|
+
return n.column && a && i ? (t.preventDefault(), d(n.key, W(s) !== n.key), !0) : !1;
|
|
1632
1650
|
};
|
|
1633
1651
|
return {
|
|
1634
1652
|
handleGridFocusIn: b,
|
|
@@ -1672,7 +1690,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1672
1690
|
case "Spacebar": {
|
|
1673
1691
|
t.preventDefault();
|
|
1674
1692
|
let n = e.focusedBodyRowKey.value;
|
|
1675
|
-
if (!
|
|
1693
|
+
if (!W(o) || !n) break;
|
|
1676
1694
|
l(n);
|
|
1677
1695
|
break;
|
|
1678
1696
|
}
|
|
@@ -1680,36 +1698,36 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1680
1698
|
}
|
|
1681
1699
|
}
|
|
1682
1700
|
};
|
|
1683
|
-
},
|
|
1684
|
-
let f = /* @__PURE__ */ new Map(), p =
|
|
1701
|
+
}, _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 }) => {
|
|
1702
|
+
let f = /* @__PURE__ */ new Map(), p = H(), m = H(), h = (e) => {
|
|
1685
1703
|
if (!(e instanceof HTMLElement)) return;
|
|
1686
1704
|
let t = Number(e.dataset.index);
|
|
1687
1705
|
if (Number.isInteger(t)) return r.value.flatRows[t];
|
|
1688
1706
|
}, g = (e) => {
|
|
1689
|
-
if (!e || !
|
|
1690
|
-
let n =
|
|
1707
|
+
if (!e || !W(t) || e.kind !== Q.ROW && e.kind !== Q.GROUP) return !1;
|
|
1708
|
+
let n = W(a);
|
|
1691
1709
|
return n ? n(e.item) !== !1 : !0;
|
|
1692
1710
|
}, _ = (e, t) => {
|
|
1693
1711
|
let { getSubtreeRangeByKey: n, getRowIndexByKey: i } = r.value, a = n(e), o = i(t);
|
|
1694
1712
|
return !a || o === void 0 ? !1 : o >= a[0] && o <= a[1];
|
|
1695
|
-
}, v =
|
|
1713
|
+
}, v = ge(() => {
|
|
1696
1714
|
let e = y.value;
|
|
1697
1715
|
e && !s(e) && c(e);
|
|
1698
|
-
}, () =>
|
|
1716
|
+
}, () => W(o) ?? 500, { immediate: !1 }), y = H(), b = ge(() => {
|
|
1699
1717
|
S.value = x.value;
|
|
1700
|
-
},
|
|
1718
|
+
}, He, { immediate: !1 }), x = H(), S = H(), C = (e) => {
|
|
1701
1719
|
!(e.hasChildren || e.kind === Q.GROUP) || e.expanded || y.value !== e.key && (y.value = e.key, v.stop(), v.start());
|
|
1702
1720
|
}, w = () => {
|
|
1703
1721
|
v.stop(), y.value = void 0, b.stop(), x.value = void 0, S.value = void 0;
|
|
1704
1722
|
}, T = (e, t, r, i) => {
|
|
1705
|
-
if (
|
|
1706
|
-
let n = t.getBoundingClientRect(), i =
|
|
1723
|
+
if (W(n) === Pe.TREE) {
|
|
1724
|
+
let n = t.getBoundingClientRect(), i = Ve * n.height / 2;
|
|
1707
1725
|
if (Math.abs(r - (n.top + n.height / 2)) <= i) {
|
|
1708
|
-
if (e.kind === Q.GROUP || S.value === e.key) return
|
|
1726
|
+
if (e.kind === Q.GROUP || S.value === e.key) return Fe.CHILD;
|
|
1709
1727
|
x.value !== e.key && (x.value = e.key, b.stop(), b.start());
|
|
1710
1728
|
} else x.value === e.key && (b.stop(), x.value = void 0, S.value = void 0);
|
|
1711
1729
|
}
|
|
1712
|
-
return i === "top" ?
|
|
1730
|
+
return i === "top" ? Fe.BEFORE : Fe.AFTER;
|
|
1713
1731
|
}, E, D = (e) => {
|
|
1714
1732
|
[e, ...e.querySelectorAll("[id], [tabindex]")].forEach((e) => {
|
|
1715
1733
|
e.removeAttribute("id"), e.removeAttribute("tabindex");
|
|
@@ -1732,10 +1750,10 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1732
1750
|
}, j = (e) => {
|
|
1733
1751
|
A(e.clientX, e.clientY);
|
|
1734
1752
|
}, M = (e, t, n) => {
|
|
1735
|
-
|
|
1736
|
-
},
|
|
1753
|
+
N(), E = document.createElement("div"), E.className = "s-ui-table__row-drag-layer", E.appendChild(e), document.body.appendChild(E), document.addEventListener("dragover", j), A(t, n);
|
|
1754
|
+
}, N = () => {
|
|
1737
1755
|
document.removeEventListener("dragover", j), E?.remove(), E = void 0;
|
|
1738
|
-
},
|
|
1756
|
+
}, P = (t) => {
|
|
1739
1757
|
if (!(t instanceof HTMLElement)) {
|
|
1740
1758
|
f.forEach((e, t) => {
|
|
1741
1759
|
t.isConnected || (e(), f.delete(t));
|
|
@@ -1743,13 +1761,13 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1743
1761
|
return;
|
|
1744
1762
|
}
|
|
1745
1763
|
if (f.has(t)) return;
|
|
1746
|
-
let n =
|
|
1764
|
+
let n = J(be({
|
|
1747
1765
|
element: t,
|
|
1748
1766
|
canDrag: () => g(h(t)),
|
|
1749
1767
|
getInitialData: () => {
|
|
1750
1768
|
let n = h(t);
|
|
1751
1769
|
return {
|
|
1752
|
-
type:
|
|
1770
|
+
type: ln,
|
|
1753
1771
|
tableId: e,
|
|
1754
1772
|
rowKey: n?.key ?? "",
|
|
1755
1773
|
rowIndex: n?.index ?? -1
|
|
@@ -1757,22 +1775,22 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1757
1775
|
},
|
|
1758
1776
|
onGenerateDragPreview: ({ nativeSetDragImage: e, location: n }) => {
|
|
1759
1777
|
let r = k(t, h(t)), { clientX: i, clientY: a } = n.current.input;
|
|
1760
|
-
|
|
1778
|
+
De({ nativeSetDragImage: e }), M(r, i, a);
|
|
1761
1779
|
},
|
|
1762
1780
|
onDragStart: () => {
|
|
1763
1781
|
p.value = h(t)?.key;
|
|
1764
1782
|
},
|
|
1765
1783
|
onDrop: () => {
|
|
1766
|
-
p.value = void 0, m.value = void 0, w(),
|
|
1784
|
+
p.value = void 0, m.value = void 0, w(), N();
|
|
1767
1785
|
}
|
|
1768
|
-
}),
|
|
1786
|
+
}), xe({
|
|
1769
1787
|
element: t,
|
|
1770
1788
|
canDrop: ({ source: n }) => {
|
|
1771
|
-
if (!
|
|
1789
|
+
if (!dn(n.data, e)) return !1;
|
|
1772
1790
|
let r = h(t);
|
|
1773
1791
|
return !r || r.key === n.data.rowKey ? !1 : !_(n.data.rowKey, r.key);
|
|
1774
1792
|
},
|
|
1775
|
-
getData: ({ input: e, element: t }) =>
|
|
1793
|
+
getData: ({ input: e, element: t }) => Te({ rowKey: h(t)?.key ?? "" }, {
|
|
1776
1794
|
input: e,
|
|
1777
1795
|
element: t,
|
|
1778
1796
|
allowedEdges: ["top", "bottom"]
|
|
@@ -1781,7 +1799,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1781
1799
|
let r = h(t);
|
|
1782
1800
|
if (!r) return;
|
|
1783
1801
|
C(r);
|
|
1784
|
-
let i =
|
|
1802
|
+
let i = Ee(e.data), a = i === "top" || i === "bottom" ? i : null, o = T(r, t, n.current.input.clientY, a), s = o === Fe.CHILD ? r.depth + 1 : r.depth, c = m.value;
|
|
1785
1803
|
(c?.targetKey !== r.key || c.action !== o || c.depth !== s) && (m.value = {
|
|
1786
1804
|
targetKey: r.key,
|
|
1787
1805
|
action: o,
|
|
@@ -1794,15 +1812,15 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1794
1812
|
}
|
|
1795
1813
|
}));
|
|
1796
1814
|
f.set(t, n);
|
|
1797
|
-
},
|
|
1798
|
-
canMonitor: ({ source: t }) =>
|
|
1815
|
+
}, F = Se({
|
|
1816
|
+
canMonitor: ({ source: t }) => dn(t.data, e),
|
|
1799
1817
|
onDrop: ({ source: t, location: i }) => {
|
|
1800
1818
|
let a = m.value;
|
|
1801
|
-
if (p.value = void 0, m.value = void 0, w(), !i.current.dropTargets[0] || !a || !
|
|
1819
|
+
if (p.value = void 0, m.value = void 0, w(), !i.current.dropTargets[0] || !a || !dn(t.data, e)) return;
|
|
1802
1820
|
let { flatRows: o, getRowIndexByKey: s } = r.value, c = s(t.data.rowKey), d = s(a.targetKey), f = c === void 0 ? void 0 : o[c], h = d === void 0 ? void 0 : o[d];
|
|
1803
1821
|
if (!f || !h || f.key === h.key || _(f.key, h.key)) return;
|
|
1804
|
-
if (
|
|
1805
|
-
if (a.action ===
|
|
1822
|
+
if (W(n) === Pe.FLAT) {
|
|
1823
|
+
if (a.action === Fe.CHILD) return;
|
|
1806
1824
|
l({
|
|
1807
1825
|
action: a.action,
|
|
1808
1826
|
sourceKey: f.key,
|
|
@@ -1814,7 +1832,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1814
1832
|
});
|
|
1815
1833
|
return;
|
|
1816
1834
|
}
|
|
1817
|
-
let g = a.action ===
|
|
1835
|
+
let g = a.action === Fe.CHILD, v = g ? h.key : h.parentKey, y = v === void 0 ? void 0 : s(v), b = y === void 0 ? void 0 : o[y];
|
|
1818
1836
|
u({
|
|
1819
1837
|
action: a.action,
|
|
1820
1838
|
sourceKey: f.key,
|
|
@@ -1827,26 +1845,26 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1827
1845
|
});
|
|
1828
1846
|
}
|
|
1829
1847
|
}), L;
|
|
1830
|
-
return
|
|
1831
|
-
L?.(), L = void 0, t && (L =
|
|
1848
|
+
return K(i, (t) => {
|
|
1849
|
+
L?.(), L = void 0, t && (L = Oe({
|
|
1832
1850
|
element: t,
|
|
1833
|
-
canScroll: ({ source: t }) =>
|
|
1851
|
+
canScroll: ({ source: t }) => dn(t.data, e)
|
|
1834
1852
|
}));
|
|
1835
|
-
}, { immediate: !0 }),
|
|
1836
|
-
|
|
1853
|
+
}, { immediate: !0 }), I(() => {
|
|
1854
|
+
F(), L?.(), N(), f.forEach((e) => {
|
|
1837
1855
|
e();
|
|
1838
1856
|
}), f.clear();
|
|
1839
1857
|
}), {
|
|
1840
|
-
registerRowElement:
|
|
1858
|
+
registerRowElement: P,
|
|
1841
1859
|
draggingRowKey: p,
|
|
1842
1860
|
dropIndicator: m
|
|
1843
1861
|
};
|
|
1844
|
-
},
|
|
1845
|
-
let d =
|
|
1862
|
+
}, vn = ({ flatRows: e, virtualEnabled: t, windowIndexes: n, uiTotalSize: r, getRowUiOffset: i, activeGroupRowIndex: a, activeDepthFooterRowIndexes: o, leavingDepthFooterRowIndex: s, slidingDepthFooterRowIndexes: c, farDepthFooterRowIndexes: l, activeRowIndex: u }) => {
|
|
1863
|
+
let d = b(() => {
|
|
1846
1864
|
let e = [];
|
|
1847
1865
|
return a.value !== void 0 && e.push(a.value), e.push(...o.value), u.value !== void 0 && e.push(u.value), e;
|
|
1848
1866
|
});
|
|
1849
|
-
return { renderEntries:
|
|
1867
|
+
return { renderEntries: b(() => {
|
|
1850
1868
|
let u = e.value, f = a.value, p = new Set(o.value), m = new Set(c.value), h = new Set(l.value), g = s.value, _ = g === void 0 ? void 0 : i(g), v = _ ? _.end - _.start : void 0, y = [], b = (e, t, n) => e && !t && !n ? v : void 0, x = (e) => {
|
|
1851
1869
|
let t = i(e.index), n = p.has(e.index), r = e.index === g, a = m.has(e.index);
|
|
1852
1870
|
y.push({
|
|
@@ -1861,7 +1879,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1861
1879
|
rowHeight: t ? t.end - t.start : void 0
|
|
1862
1880
|
});
|
|
1863
1881
|
};
|
|
1864
|
-
if (!
|
|
1882
|
+
if (!W(t)) return u.forEach(x), y;
|
|
1865
1883
|
let S = r.value, C = n.value.filter((e) => {
|
|
1866
1884
|
let t = i(e);
|
|
1867
1885
|
return !t || t.end > 0 && t.start < S;
|
|
@@ -1905,23 +1923,23 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1905
1923
|
k = r + n;
|
|
1906
1924
|
}), A(S - k), y;
|
|
1907
1925
|
}) };
|
|
1908
|
-
},
|
|
1909
|
-
let o =
|
|
1926
|
+
}, yn = ({ selected: e, cascade: t, treeIndex: n, groupRow: r, disabledKey: i, isItemSelectable: a }) => {
|
|
1927
|
+
let o = b(() => new Set(e.value)), s = (e) => n.value.nodeByKey.get(e)?.parentKey, c = (e) => {
|
|
1910
1928
|
let t = n.value.nodeByKey.get(e);
|
|
1911
|
-
if (!t ||
|
|
1912
|
-
let o =
|
|
1929
|
+
if (!t || Ht(t.item, W(r)) || Ht(t.item, W(i))) return !1;
|
|
1930
|
+
let o = W(a);
|
|
1913
1931
|
return o ? o(t.item) !== !1 : !0;
|
|
1914
|
-
}, l =
|
|
1932
|
+
}, l = b(() => {
|
|
1915
1933
|
let e = [];
|
|
1916
1934
|
return n.value.nodeByKey.forEach((t, n) => {
|
|
1917
1935
|
c(n) && e.push(n);
|
|
1918
|
-
}),
|
|
1919
|
-
}), u =
|
|
1936
|
+
}), A(e);
|
|
1937
|
+
}), u = b(() => {
|
|
1920
1938
|
let e = /* @__PURE__ */ new Map();
|
|
1921
1939
|
return o.value.forEach((t) => {
|
|
1922
1940
|
let n = s(t);
|
|
1923
1941
|
for (; n;) e.set(n, (e.get(n) ?? 0) + 1), n = s(n);
|
|
1924
|
-
}),
|
|
1942
|
+
}), A(e);
|
|
1925
1943
|
}), d = (e) => o.value.has(e), f = (e) => o.value.has(e) ? Z.CHECKED : (u.value.get(e) ?? 0) > 0 ? Z.INDETERMINATE : Z.UNCHECKED, p = (e, t) => {
|
|
1926
1944
|
c(e) && t.push(e), n.value.nodeByKey.get(e)?.children?.forEach((e) => {
|
|
1927
1945
|
p(e.key, t);
|
|
@@ -1939,10 +1957,10 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1939
1957
|
}, g = (e, t) => {
|
|
1940
1958
|
let n = s(e);
|
|
1941
1959
|
for (; n;) t.delete(n), n = s(n);
|
|
1942
|
-
},
|
|
1960
|
+
}, _ = (n) => {
|
|
1943
1961
|
if (!c(n)) return;
|
|
1944
1962
|
let r = new Set(e.value);
|
|
1945
|
-
if (!
|
|
1963
|
+
if (!W(t)) {
|
|
1946
1964
|
r.has(n) ? r.delete(n) : r.add(n), e.value = [...r];
|
|
1947
1965
|
return;
|
|
1948
1966
|
}
|
|
@@ -1952,7 +1970,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1952
1970
|
}), h(n, r)) : (i.forEach((e) => {
|
|
1953
1971
|
r.delete(e);
|
|
1954
1972
|
}), g(n, r)), e.value = [...r];
|
|
1955
|
-
},
|
|
1973
|
+
}, v = b(() => {
|
|
1956
1974
|
let e = l.value.length, t = l.value.reduce((e, t) => o.value.has(t) ? e + 1 : e, 0);
|
|
1957
1975
|
return e === 0 || t === 0 ? Z.UNCHECKED : t >= e ? Z.CHECKED : Z.INDETERMINATE;
|
|
1958
1976
|
});
|
|
@@ -1960,10 +1978,10 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1960
1978
|
isSelected: d,
|
|
1961
1979
|
isNodeSelectable: c,
|
|
1962
1980
|
getCheckState: f,
|
|
1963
|
-
toggleRow:
|
|
1964
|
-
headerCheckState:
|
|
1981
|
+
toggleRow: _,
|
|
1982
|
+
headerCheckState: v,
|
|
1965
1983
|
toggleSelectAll: () => {
|
|
1966
|
-
if (
|
|
1984
|
+
if (v.value === Z.CHECKED) {
|
|
1967
1985
|
e.value = [];
|
|
1968
1986
|
return;
|
|
1969
1987
|
}
|
|
@@ -1973,11 +1991,11 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1973
1991
|
e.value = [];
|
|
1974
1992
|
}
|
|
1975
1993
|
};
|
|
1976
|
-
},
|
|
1977
|
-
let m =
|
|
1978
|
-
let t =
|
|
1994
|
+
}, 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 }) => {
|
|
1995
|
+
let m = b(() => W(e).find((e) => e.key === t.value)), h = b(() => W(i)?.columnKey ?? t.value), g = b(() => W(a) ?? t.value), _ = b(() => W(o) ?? t.value), v = b(() => W(s) ?? t.value), y = (e) => n.value.get(e.key)?.subtreeSize ?? 0, x = (e) => Wt(e.item, W(r)), S = (e) => {
|
|
1996
|
+
let t = Ut(e.item, m.value?.value ?? m.value?.key);
|
|
1979
1997
|
return t === void 0 ? void 0 : String(t);
|
|
1980
|
-
}, C = (e) => ({ paddingInlineStart: `calc(var(--s-ui-dimension-4) + ${e *
|
|
1998
|
+
}, C = (e) => ({ paddingInlineStart: `calc(var(--s-ui-dimension-4) + ${e * W(c)}px)` }), w = (e) => {
|
|
1981
1999
|
f({
|
|
1982
2000
|
parentKey: e.parentKey ?? "",
|
|
1983
2001
|
parentItem: e.item,
|
|
@@ -1991,7 +2009,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1991
2009
|
click: () => {
|
|
1992
2010
|
w(e);
|
|
1993
2011
|
}
|
|
1994
|
-
}), E =
|
|
2012
|
+
}), E = b(() => new Set(W(l))), D = (e) => e.parentKey ? E.value.has(e.parentKey) : !1, O = (e) => {
|
|
1995
2013
|
!e.parentKey || D(e) || p({
|
|
1996
2014
|
key: e.parentKey,
|
|
1997
2015
|
item: e.item
|
|
@@ -2004,13 +2022,13 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2004
2022
|
loadMore: () => {
|
|
2005
2023
|
O(e);
|
|
2006
2024
|
}
|
|
2007
|
-
}), A = (e) =>
|
|
2025
|
+
}), A = (e) => W(u)?.[e];
|
|
2008
2026
|
return {
|
|
2009
2027
|
depthFooterColumnKey: h,
|
|
2010
2028
|
groupColumnKey: g,
|
|
2011
|
-
creationColumnKey:
|
|
2012
|
-
loadMoreColumnKey:
|
|
2013
|
-
getGroupCount:
|
|
2029
|
+
creationColumnKey: _,
|
|
2030
|
+
loadMoreColumnKey: v,
|
|
2031
|
+
getGroupCount: y,
|
|
2014
2032
|
getGroupTotal: x,
|
|
2015
2033
|
getGroupTitle: S,
|
|
2016
2034
|
getDepthIndentStyle: C,
|
|
@@ -2028,12 +2046,12 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2028
2046
|
return t ? `s-ui-table__aggregate-cell--tone-${t}` : void 0;
|
|
2029
2047
|
},
|
|
2030
2048
|
getFooterSlotScope: (t) => ({
|
|
2031
|
-
column:
|
|
2049
|
+
column: W(e).find((e) => e.key === t) ?? { key: t },
|
|
2032
2050
|
footerValue: A(t)
|
|
2033
2051
|
})
|
|
2034
2052
|
};
|
|
2035
|
-
},
|
|
2036
|
-
let n =
|
|
2053
|
+
}, xn = ({ sortState: e, onSortChange: t }) => {
|
|
2054
|
+
let n = b(() => new Map(e.value.map((e) => [e.key, e]))), r = (e) => n.value.get(e)?.direction, i = (t) => {
|
|
2037
2055
|
if (e.value.length < 2) return;
|
|
2038
2056
|
let n = e.value.findIndex((e) => e.key === t);
|
|
2039
2057
|
return n === -1 ? void 0 : n + 1;
|
|
@@ -2044,12 +2062,12 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2044
2062
|
getColumnSortDirection: r,
|
|
2045
2063
|
getColumnSortIndex: i,
|
|
2046
2064
|
applySortCycle: (t, n) => {
|
|
2047
|
-
let r = [...e.value], i = r.findIndex((e) => e.key === t), o = i === -1 ? void 0 : r[i], s = o ? o.direction ===
|
|
2065
|
+
let r = [...e.value], i = r.findIndex((e) => e.key === t), o = i === -1 ? void 0 : r[i], s = o ? o.direction === X.ASC ? {
|
|
2048
2066
|
key: t,
|
|
2049
|
-
direction:
|
|
2067
|
+
direction: X.DESC
|
|
2050
2068
|
} : void 0 : {
|
|
2051
2069
|
key: t,
|
|
2052
|
-
direction:
|
|
2070
|
+
direction: X.ASC
|
|
2053
2071
|
};
|
|
2054
2072
|
if (!n) {
|
|
2055
2073
|
a(s ? [s] : []);
|
|
@@ -2072,7 +2090,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2072
2090
|
getHeaderAriaSort: (e) => {
|
|
2073
2091
|
if (!e.column) return;
|
|
2074
2092
|
let t = r(e.key);
|
|
2075
|
-
if (t) return t ===
|
|
2093
|
+
if (t) return t === X.ASC ? "ascending" : "descending";
|
|
2076
2094
|
},
|
|
2077
2095
|
getHeaderSlotScope: (e) => e.column ? {
|
|
2078
2096
|
column: e.column,
|
|
@@ -2080,8 +2098,8 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2080
2098
|
sortIndex: i(e.key)
|
|
2081
2099
|
} : { column: { key: e.key } }
|
|
2082
2100
|
};
|
|
2083
|
-
},
|
|
2084
|
-
let a = /* @__PURE__ */ new Set(), o =
|
|
2101
|
+
}, Sn = ({ windowIndexes: e, visibleRange: t, getRowKey: n, pinnedRowKey: r, enabled: i }) => {
|
|
2102
|
+
let a = /* @__PURE__ */ new Set(), o = H(/* @__PURE__ */ new Set()), s = [], c = 12, l = 0, u = !1, d = !1, f = 0, p = "", m = () => {
|
|
2085
2103
|
l = performance.now(), u = !0, o.value = new Set(a);
|
|
2086
2104
|
}, h = (e) => {
|
|
2087
2105
|
let t = s.splice(0, e);
|
|
@@ -2096,7 +2114,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2096
2114
|
e < 20 && (c = Math.min(64, c + 2));
|
|
2097
2115
|
}, _ = () => {
|
|
2098
2116
|
u && (u = !1, g(performance.now() - l));
|
|
2099
|
-
}, v =
|
|
2117
|
+
}, v = me(() => {
|
|
2100
2118
|
f = 0, _(), d ? d = !1 : h(c) > 0 && m(), s.length === 0 && v.pause();
|
|
2101
2119
|
}, { immediate: !1 }), y = (e) => {
|
|
2102
2120
|
let n = t.value, r = n ? (n.startIndex + n.endIndex) / 2 : 0;
|
|
@@ -2108,7 +2126,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2108
2126
|
r !== void 0 && !a.has(r) && t.push(r);
|
|
2109
2127
|
}), t;
|
|
2110
2128
|
}, x = (e) => {
|
|
2111
|
-
let t =
|
|
2129
|
+
let t = W(r), n = t === void 0 ? -1 : e.indexOf(t);
|
|
2112
2130
|
return n > 0 && (e.splice(n, 1), e.unshift(t ?? "")), e;
|
|
2113
2131
|
}, S = (e) => {
|
|
2114
2132
|
let t = new Set(e.map(n)), r = 0;
|
|
@@ -2121,25 +2139,25 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2121
2139
|
(s.length > 0 || e > 0) && v.resume();
|
|
2122
2140
|
}, T = (e) => `${e[0]}:${e[e.length - 1]}:${e.length}`, E = (e) => {
|
|
2123
2141
|
let t = T(e);
|
|
2124
|
-
if (!
|
|
2142
|
+
if (!W(i) || t === p) return;
|
|
2125
2143
|
p = t, s = x(b(e));
|
|
2126
2144
|
let n = S(e), r = h(Math.max(0, c - f));
|
|
2127
2145
|
f += r, C(n + r), w(r);
|
|
2128
2146
|
};
|
|
2129
|
-
return
|
|
2147
|
+
return K(e, E, {
|
|
2130
2148
|
flush: "sync",
|
|
2131
2149
|
immediate: !0
|
|
2132
|
-
}),
|
|
2150
|
+
}), K(() => W(i), () => {
|
|
2133
2151
|
p = "", E(e.value);
|
|
2134
2152
|
}), {
|
|
2135
|
-
isRowHydrated: (e) => !
|
|
2153
|
+
isRowHydrated: (e) => !W(i) || e === W(r) || o.value.has(e),
|
|
2136
2154
|
hydratedKeys: o
|
|
2137
2155
|
};
|
|
2138
|
-
},
|
|
2156
|
+
}, Cn = {
|
|
2139
2157
|
pinned: [],
|
|
2140
2158
|
sliding: []
|
|
2141
|
-
},
|
|
2142
|
-
let a =
|
|
2159
|
+
}, wn = ({ snapshot: e, visibleRange: t, depthFooterSticky: n, bottomVisibleRowIndex: r, getRowOffset: i }) => {
|
|
2160
|
+
let a = b(() => {
|
|
2143
2161
|
let n = t.value;
|
|
2144
2162
|
if (!n) return;
|
|
2145
2163
|
let { flatRows: r, getRowIndexByKey: i } = e.value, a = r[n.startIndex];
|
|
@@ -2178,64 +2196,64 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2178
2196
|
}, f = (t, n) => {
|
|
2179
2197
|
let { flatRows: r } = e.value;
|
|
2180
2198
|
return [t - 2, t - 1].filter((e) => r[e]?.kind === Q.DEPTH_FOOTER && !n.includes(e));
|
|
2181
|
-
}, p =
|
|
2199
|
+
}, p = b(() => {
|
|
2182
2200
|
let e = r.value;
|
|
2183
|
-
if (!
|
|
2201
|
+
if (!W(n) || e === void 0) return Cn;
|
|
2184
2202
|
let t = d(e);
|
|
2185
2203
|
return {
|
|
2186
2204
|
pinned: t,
|
|
2187
2205
|
sliding: f(e, t)
|
|
2188
2206
|
};
|
|
2189
|
-
}), m =
|
|
2207
|
+
}), m = b(() => {
|
|
2190
2208
|
let { pinned: e, sliding: t } = p.value;
|
|
2191
2209
|
return [...t, ...e];
|
|
2192
2210
|
});
|
|
2193
2211
|
return {
|
|
2194
2212
|
activeGroupRowIndex: a,
|
|
2195
|
-
activeDepthFooterRowIndex:
|
|
2213
|
+
activeDepthFooterRowIndex: b(() => p.value.pinned[0]),
|
|
2196
2214
|
activeDepthFooterRowIndexes: m,
|
|
2197
|
-
leavingDepthFooterRowIndex:
|
|
2215
|
+
leavingDepthFooterRowIndex: b(() => {
|
|
2198
2216
|
let [e, t] = p.value.pinned;
|
|
2199
2217
|
return t === void 0 ? void 0 : e;
|
|
2200
2218
|
}),
|
|
2201
|
-
slidingDepthFooterRowIndexes:
|
|
2202
|
-
farDepthFooterRowIndexes:
|
|
2219
|
+
slidingDepthFooterRowIndexes: b(() => p.value.sliding),
|
|
2220
|
+
farDepthFooterRowIndexes: b(() => p.value.pinned.slice(2))
|
|
2203
2221
|
};
|
|
2204
|
-
},
|
|
2205
|
-
rootStyle:
|
|
2206
|
-
let i =
|
|
2222
|
+
}, 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 }) => ({
|
|
2223
|
+
rootStyle: b(() => {
|
|
2224
|
+
let i = W(n);
|
|
2207
2225
|
return {
|
|
2208
2226
|
"--s-ui-table-header-height": "40px",
|
|
2209
|
-
"--s-ui-table-row-min-height": "
|
|
2227
|
+
"--s-ui-table-row-min-height": "40px",
|
|
2210
2228
|
"--s-ui-table-scrollbar-size": "12px",
|
|
2211
2229
|
"--s-ui-table-header-stack": "40px",
|
|
2212
2230
|
"--s-ui-table-bottom-stack": `${e.value}px`,
|
|
2213
2231
|
"--s-ui-table-footer-bar-height": "40px",
|
|
2214
|
-
"--s-ui-table-create-row-height": "
|
|
2215
|
-
"--s-ui-table-aggregate-offset":
|
|
2232
|
+
"--s-ui-table-create-row-height": "40px",
|
|
2233
|
+
"--s-ui-table-aggregate-offset": W(t) ? "40px" : "0px",
|
|
2216
2234
|
...i > 0 ? { "--s-ui-table-viewport-width": `${i}px` } : {},
|
|
2217
2235
|
...r.value
|
|
2218
2236
|
};
|
|
2219
2237
|
}),
|
|
2220
|
-
scrollStyle:
|
|
2221
|
-
height:
|
|
2222
|
-
maxHeight:
|
|
2238
|
+
scrollStyle: b(() => ({
|
|
2239
|
+
height: Tn(W(a)),
|
|
2240
|
+
maxHeight: Tn(W(o))
|
|
2223
2241
|
})),
|
|
2224
|
-
tableStyle:
|
|
2225
|
-
}),
|
|
2226
|
-
if (
|
|
2227
|
-
if (typeof document > "u") return
|
|
2242
|
+
tableStyle: b(() => ({ width: `max(100%, ${i.value}px)` }))
|
|
2243
|
+
}), Dn, On = () => {
|
|
2244
|
+
if (Dn !== void 0) return Dn;
|
|
2245
|
+
if (typeof document > "u") return Dn = Le, Dn;
|
|
2228
2246
|
let e = document.createElement("div");
|
|
2229
|
-
e.style.cssText = `position:absolute;visibility:hidden;pointer-events:none;width:1px;height:${
|
|
2247
|
+
e.style.cssText = `position:absolute;visibility:hidden;pointer-events:none;width:1px;height:${ze}px`, document.body.appendChild(e);
|
|
2230
2248
|
let t = e.offsetHeight;
|
|
2231
|
-
return e.remove(),
|
|
2232
|
-
},
|
|
2249
|
+
return e.remove(), Dn = t > 0 ? t : Le, Dn;
|
|
2250
|
+
}, kn = (e) => e > 16e6 ? On() - Re : Infinity, An = (e, t, n) => {
|
|
2233
2251
|
if (!e) return 0;
|
|
2234
|
-
let r = Math.max(t,
|
|
2252
|
+
let r = Math.max(t, Be);
|
|
2235
2253
|
return n > 4 * r ? r : 0;
|
|
2236
|
-
},
|
|
2237
|
-
let a =
|
|
2238
|
-
let e =
|
|
2254
|
+
}, 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 }) => {
|
|
2255
|
+
let a = H(0), o = b(() => {
|
|
2256
|
+
let e = W(t), i = W(r), a = W(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);
|
|
2239
2257
|
return {
|
|
2240
2258
|
active: s,
|
|
2241
2259
|
uiHeight: c,
|
|
@@ -2244,140 +2262,145 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2244
2262
|
edgeZone: d,
|
|
2245
2263
|
ratio: s ? (u - 2 * d) / (l - 2 * d) : 1
|
|
2246
2264
|
};
|
|
2247
|
-
}), s = (e) =>
|
|
2248
|
-
|
|
2265
|
+
}), s = (e) => jn(o.value, e), c = (e) => Mn(o.value, e), l = H(0), u = H(-1);
|
|
2266
|
+
pe(e, "scroll", () => {
|
|
2249
2267
|
let t = e.value;
|
|
2250
|
-
t && (a.value = t.scrollTop, t.scrollTop !== u && (l = s(t.scrollTop)));
|
|
2268
|
+
t && (a.value = t.scrollTop, t.scrollTop !== u.value && (u.value = t.scrollTop, l.value = s(t.scrollTop)));
|
|
2251
2269
|
}, { passive: !0 });
|
|
2252
|
-
let d =
|
|
2253
|
-
e.scrollTop = t, a.value = e.scrollTop, u = e.scrollTop, l = s(e.scrollTop);
|
|
2254
|
-
}, v = (
|
|
2270
|
+
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) => {
|
|
2271
|
+
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);
|
|
2272
|
+
}, v = (t) => t === "y" ? W(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) => {
|
|
2255
2273
|
let n = e.value;
|
|
2256
|
-
if (!n || !
|
|
2257
|
-
let { maxModelScrollTop: r } = o.value, i = Math.max(0, Math.min(r,
|
|
2258
|
-
|
|
2259
|
-
},
|
|
2260
|
-
|
|
2274
|
+
if (!n || !S(t)) return;
|
|
2275
|
+
let { maxModelScrollTop: r } = o.value, i = d(n), a = Math.max(0, Math.min(r, i + x(t, "y")));
|
|
2276
|
+
a !== i && (t.preventDefault(), _(n, c(a), a), n.scrollLeft += x(t, "x"));
|
|
2277
|
+
}, w, T = (t) => {
|
|
2278
|
+
w?.(), w = t ? pe(e, "wheel", C, { passive: !1 }) : void 0;
|
|
2261
2279
|
};
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
})
|
|
2265
|
-
|
|
2280
|
+
de(() => {
|
|
2281
|
+
w?.();
|
|
2282
|
+
});
|
|
2283
|
+
let E = (e, t) => e.scrollTop === u.value ? l.value : jn(t, e.scrollTop);
|
|
2284
|
+
return L(() => {
|
|
2285
|
+
K(o, (t, n) => {
|
|
2266
2286
|
let r = e.value;
|
|
2267
|
-
!r || !
|
|
2268
|
-
|
|
2287
|
+
if (!r || !Pn(t, n)) return;
|
|
2288
|
+
let a = E(r, n);
|
|
2289
|
+
_(r, Mn(t, a), a), i?.(a);
|
|
2290
|
+
}), K(g, T, { immediate: !0 });
|
|
2269
2291
|
}), {
|
|
2270
2292
|
uiScrollTop: a,
|
|
2271
|
-
modelScrollOffset:
|
|
2272
|
-
uiShift:
|
|
2273
|
-
uiTotalSize:
|
|
2274
|
-
maxModelScrollTop:
|
|
2275
|
-
active:
|
|
2293
|
+
modelScrollOffset: f,
|
|
2294
|
+
uiShift: p,
|
|
2295
|
+
uiTotalSize: m,
|
|
2296
|
+
maxModelScrollTop: h,
|
|
2297
|
+
active: g,
|
|
2276
2298
|
uiToModel: s,
|
|
2277
2299
|
modelToUi: c,
|
|
2278
|
-
|
|
2300
|
+
resolveModelOffset: d,
|
|
2301
|
+
setScrollTop: _
|
|
2279
2302
|
};
|
|
2280
|
-
},
|
|
2281
|
-
let
|
|
2303
|
+
}, In = ({ rowCount: e, enabled: t, autoMeasure: n, estimateRowSize: r, estimateRowSizeByIndex: i, overscan: a, scrollElement: o, getRowKey: s, rowsVersion: c, viewportHeight: l, extraHeight: u, headerHeight: d }) => {
|
|
2304
|
+
let f, p = Fn({
|
|
2282
2305
|
scrollElement: o,
|
|
2283
|
-
totalSize: () =>
|
|
2306
|
+
totalSize: () => _.value.getTotalSize(),
|
|
2284
2307
|
viewportHeight: l,
|
|
2285
2308
|
extraHeight: u,
|
|
2286
2309
|
onRescale: (e) => {
|
|
2287
|
-
|
|
2310
|
+
f?.(e, !1);
|
|
2288
2311
|
}
|
|
2289
|
-
}),
|
|
2290
|
-
let r = Math.round((e -
|
|
2291
|
-
|
|
2292
|
-
},
|
|
2293
|
-
let n =
|
|
2312
|
+
}), m = H(0), h = 0, g = (e, t, n) => {
|
|
2313
|
+
let r = Math.round((e - h) / n);
|
|
2314
|
+
h = e, m.value = t ? Math.max(-24, Math.min(24, r)) : 0;
|
|
2315
|
+
}, _ = ye(b(() => {
|
|
2316
|
+
let n = W(r);
|
|
2294
2317
|
return {
|
|
2295
|
-
count:
|
|
2296
|
-
enabled:
|
|
2318
|
+
count: W(e),
|
|
2319
|
+
enabled: W(t),
|
|
2297
2320
|
getScrollElement: () => o.value,
|
|
2298
2321
|
estimateSize: (e) => i?.(e) ?? n,
|
|
2299
2322
|
getItemKey: s,
|
|
2300
|
-
overscan:
|
|
2323
|
+
overscan: W(a),
|
|
2301
2324
|
shouldAdjustScrollPositionOnItemSizeChange: () => !1,
|
|
2302
|
-
observeElementOffset: (e, t) => (
|
|
2303
|
-
let i =
|
|
2304
|
-
|
|
2325
|
+
observeElementOffset: (e, t) => (f = t, ve(e, (e, r) => {
|
|
2326
|
+
let i = p.uiToModel(e);
|
|
2327
|
+
g(i, r, n), t(i, r);
|
|
2305
2328
|
})),
|
|
2306
2329
|
scrollToFn: (e, t, n) => {
|
|
2307
|
-
|
|
2330
|
+
_e(p.modelToUi(e + (t.adjustments ?? 0)), { behavior: t.behavior }, n);
|
|
2308
2331
|
}
|
|
2309
2332
|
};
|
|
2310
|
-
})), v =
|
|
2333
|
+
})), v = b(() => W(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) => {
|
|
2311
2334
|
let r = t[0], i = t[t.length - 1];
|
|
2312
|
-
if (!(!r || !i)) return n > 0 ? [i.index + 1, Math.min(
|
|
2313
|
-
},
|
|
2314
|
-
let e = v.value, t = e.map((e) => e.index), n =
|
|
2335
|
+
if (!(!r || !i)) return n > 0 ? [i.index + 1, Math.min(W(e) - 1, i.index + n)] : [Math.max(0, r.index + n), r.index - 1];
|
|
2336
|
+
}, C = b(() => {
|
|
2337
|
+
let e = v.value, t = e.map((e) => e.index), n = m.value, r = n === 0 ? void 0 : S(e, n);
|
|
2315
2338
|
if (!r) return t;
|
|
2316
|
-
let i =
|
|
2339
|
+
let i = x(r[0], r[1]);
|
|
2317
2340
|
return n > 0 ? [...t, ...i] : [...i, ...t];
|
|
2318
|
-
}),
|
|
2341
|
+
}), w = /* @__PURE__ */ new Set(), T = (e) => {
|
|
2319
2342
|
if (!(e instanceof HTMLElement) || e.dataset.placeholder) return;
|
|
2320
2343
|
let t = Number(e.dataset.index);
|
|
2321
2344
|
return Number.isInteger(t) ? t : void 0;
|
|
2322
|
-
},
|
|
2323
|
-
if (!
|
|
2345
|
+
}, E = (e) => {
|
|
2346
|
+
if (!W(t) || !W(n)) return;
|
|
2324
2347
|
let r = o.value;
|
|
2325
2348
|
if (!r) return;
|
|
2326
2349
|
let i = r.querySelectorAll("tr[data-index]"), a = [];
|
|
2327
2350
|
if (i.forEach((t) => {
|
|
2328
|
-
let n =
|
|
2329
|
-
n === void 0 || !(t instanceof HTMLElement) || (!e || !
|
|
2351
|
+
let n = T(t);
|
|
2352
|
+
n === void 0 || !(t instanceof HTMLElement) || (!e || !w.has(s(n))) && a.push(t);
|
|
2330
2353
|
}), a.length === 0) return;
|
|
2331
|
-
let c =
|
|
2354
|
+
let c = _.value.measurementsCache, l = r.getBoundingClientRect().top + W(d), u = p.resolveModelOffset(r), f = [], m = Infinity;
|
|
2332
2355
|
a.forEach((e) => {
|
|
2333
2356
|
let t = Number(e.dataset.index), n = e.getBoundingClientRect();
|
|
2334
|
-
|
|
2357
|
+
f.push([t, Math.round(n.height)]), n.bottom > l + 1 && t < m && (m = t);
|
|
2335
2358
|
});
|
|
2336
|
-
let
|
|
2337
|
-
|
|
2359
|
+
let h = 0;
|
|
2360
|
+
f.forEach(([e, t]) => {
|
|
2338
2361
|
if (t <= 0) return;
|
|
2339
|
-
|
|
2362
|
+
w.add(s(e));
|
|
2340
2363
|
let n = c[e]?.size;
|
|
2341
|
-
e <
|
|
2342
|
-
}),
|
|
2364
|
+
e < m && n !== void 0 && (h += t - n), _.value.resizeItem(e, t);
|
|
2365
|
+
}), h !== 0 && p.setScrollTop(r, p.modelToUi(u + h), u + h);
|
|
2343
2366
|
};
|
|
2344
|
-
|
|
2345
|
-
let
|
|
2346
|
-
|
|
2347
|
-
},
|
|
2348
|
-
|
|
2367
|
+
K(C, () => E(!0), { flush: "post" });
|
|
2368
|
+
let D = () => {
|
|
2369
|
+
E(!0);
|
|
2370
|
+
}, O = () => {
|
|
2371
|
+
w.clear(), E(!1);
|
|
2349
2372
|
};
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
}),
|
|
2353
|
-
|
|
2373
|
+
he(o, () => {
|
|
2374
|
+
O();
|
|
2375
|
+
}), K(() => W(c), () => {
|
|
2376
|
+
w.clear(), E(!1);
|
|
2354
2377
|
}, { flush: "post" });
|
|
2355
|
-
let
|
|
2378
|
+
let k = (e, t) => {
|
|
2356
2379
|
if (e !== "auto") return e;
|
|
2357
|
-
let n =
|
|
2380
|
+
let n = W(l) - W(u), r = p.modelScrollOffset.value;
|
|
2358
2381
|
return t.end >= r + n ? "end" : t.start <= r ? "start" : void 0;
|
|
2359
|
-
}, k = (e, t) => {
|
|
2360
|
-
let n = H(l) - H(u);
|
|
2361
|
-
return e === "start" ? t.start : e === "end" ? t.end - n : t.start - (n - t.size) / 2;
|
|
2362
2382
|
}, A = (e, t) => {
|
|
2363
|
-
let n =
|
|
2383
|
+
let n = W(l) - W(u);
|
|
2384
|
+
return e === "start" ? t.start : e === "end" ? t.end - n : t.start - (n - t.size) / 2;
|
|
2385
|
+
}, j = (e, t) => {
|
|
2386
|
+
let n = _.value.measurementsCache, r = n[Math.max(0, Math.min(e, n.length - 1))];
|
|
2364
2387
|
if (!r) return;
|
|
2365
|
-
let i =
|
|
2388
|
+
let i = k(t, r);
|
|
2366
2389
|
if (!i) return;
|
|
2367
|
-
let a =
|
|
2368
|
-
return Math.max(0, Math.min(
|
|
2369
|
-
},
|
|
2390
|
+
let a = A(i, r);
|
|
2391
|
+
return Math.max(0, Math.min(p.maxModelScrollTop.value, a));
|
|
2392
|
+
}, M = (e, t = "auto") => {
|
|
2370
2393
|
let n = o.value;
|
|
2371
|
-
if (!
|
|
2372
|
-
|
|
2394
|
+
if (!p.active.value || !n) {
|
|
2395
|
+
_.value.scrollToIndex(e, { align: t });
|
|
2373
2396
|
return;
|
|
2374
2397
|
}
|
|
2375
|
-
let r =
|
|
2376
|
-
r !== void 0 &&
|
|
2377
|
-
},
|
|
2378
|
-
if (!(!
|
|
2379
|
-
}),
|
|
2380
|
-
let t =
|
|
2398
|
+
let r = j(e, t);
|
|
2399
|
+
r !== void 0 && p.setScrollTop(n, p.modelToUi(r), r);
|
|
2400
|
+
}, N = b(() => {
|
|
2401
|
+
if (!(!W(t) || v.value.length === 0)) return _.value.range ?? void 0;
|
|
2402
|
+
}), P = (e) => {
|
|
2403
|
+
let t = _.value.measurementsCache;
|
|
2381
2404
|
if (t.length === 0) return;
|
|
2382
2405
|
let n = 0, r = t.length - 1;
|
|
2383
2406
|
for (; n < r;) {
|
|
@@ -2386,91 +2409,91 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2386
2409
|
a.end <= e ? n = i + 1 : r = i;
|
|
2387
2410
|
}
|
|
2388
2411
|
return n;
|
|
2389
|
-
},
|
|
2390
|
-
let t =
|
|
2412
|
+
}, F = (e) => {
|
|
2413
|
+
let t = _.value.measurementsCache[e];
|
|
2391
2414
|
if (t) return {
|
|
2392
2415
|
start: t.start,
|
|
2393
2416
|
end: t.end
|
|
2394
2417
|
};
|
|
2395
2418
|
};
|
|
2396
2419
|
return {
|
|
2397
|
-
rowVirtualizer:
|
|
2420
|
+
rowVirtualizer: _,
|
|
2398
2421
|
virtualItems: v,
|
|
2399
|
-
windowIndexes:
|
|
2422
|
+
windowIndexes: C,
|
|
2400
2423
|
totalSize: y,
|
|
2401
|
-
uiTotalSize:
|
|
2402
|
-
modelScrollOffset:
|
|
2403
|
-
scrollCompressed:
|
|
2404
|
-
measureWindowRows:
|
|
2405
|
-
measureNewRows:
|
|
2406
|
-
scrollToIndex:
|
|
2407
|
-
visibleRange:
|
|
2408
|
-
getRowOffset:
|
|
2424
|
+
uiTotalSize: p.uiTotalSize,
|
|
2425
|
+
modelScrollOffset: p.modelScrollOffset,
|
|
2426
|
+
scrollCompressed: p.active,
|
|
2427
|
+
measureWindowRows: O,
|
|
2428
|
+
measureNewRows: D,
|
|
2429
|
+
scrollToIndex: M,
|
|
2430
|
+
visibleRange: N,
|
|
2431
|
+
getRowOffset: F,
|
|
2409
2432
|
getRowUiOffset: (e) => {
|
|
2410
|
-
let t =
|
|
2433
|
+
let t = F(e);
|
|
2411
2434
|
if (!t) return;
|
|
2412
|
-
let n =
|
|
2435
|
+
let n = p.uiShift.value;
|
|
2413
2436
|
return {
|
|
2414
2437
|
start: t.start - n,
|
|
2415
2438
|
end: t.end - n
|
|
2416
2439
|
};
|
|
2417
2440
|
},
|
|
2418
|
-
getRowIndexAtOffset:
|
|
2441
|
+
getRowIndexAtOffset: P
|
|
2419
2442
|
};
|
|
2420
|
-
},
|
|
2443
|
+
}, Ln = [
|
|
2421
2444
|
"role",
|
|
2422
2445
|
"aria-rowcount",
|
|
2423
2446
|
"aria-colcount",
|
|
2424
2447
|
"aria-busy"
|
|
2425
|
-
],
|
|
2448
|
+
], Rn = { class: "s-ui-table__head" }, zn = {
|
|
2426
2449
|
class: "s-ui-table__head-row",
|
|
2427
2450
|
"aria-rowindex": 1
|
|
2428
|
-
},
|
|
2451
|
+
}, Bn = {
|
|
2429
2452
|
key: 0,
|
|
2430
2453
|
class: "s-ui-table__header-cell s-ui-table__filler-cell",
|
|
2431
2454
|
role: "presentation"
|
|
2432
|
-
},
|
|
2455
|
+
}, Vn = [
|
|
2433
2456
|
"id",
|
|
2434
2457
|
"data-column-key",
|
|
2435
2458
|
"data-section",
|
|
2436
2459
|
"aria-colindex",
|
|
2437
2460
|
"aria-sort",
|
|
2438
2461
|
"tabindex"
|
|
2439
|
-
],
|
|
2462
|
+
], Hn = {
|
|
2440
2463
|
key: 2,
|
|
2441
2464
|
class: "s-ui-table__columns-manager"
|
|
2442
|
-
},
|
|
2465
|
+
}, Un = { class: "s-ui-table__columns-item-main" }, Wn = { class: "s-ui-table__columns-item-title" }, Gn = [
|
|
2443
2466
|
"aria-label",
|
|
2444
2467
|
"onPointerdown",
|
|
2445
2468
|
"onKeydown",
|
|
2446
2469
|
"onDblclick"
|
|
2447
|
-
],
|
|
2470
|
+
], Kn = { class: "s-ui-table__body" }, qn = {
|
|
2448
2471
|
key: 0,
|
|
2449
2472
|
class: "s-ui-table__empty-row",
|
|
2450
2473
|
"aria-rowindex": 2
|
|
2451
|
-
},
|
|
2474
|
+
}, Jn = ["colspan"], Yn = { class: "s-ui-table__empty-content" }, Xn = { class: "s-ui-table__empty-text" }, Zn = {
|
|
2452
2475
|
key: 0,
|
|
2453
2476
|
class: "s-ui-table__spacer",
|
|
2454
2477
|
"aria-hidden": "true"
|
|
2455
|
-
},
|
|
2478
|
+
}, Qn = ["colspan"], $n = {
|
|
2456
2479
|
key: 0,
|
|
2457
2480
|
class: "s-ui-table__foot"
|
|
2458
|
-
},
|
|
2481
|
+
}, er = ["aria-rowindex"], tr = {
|
|
2459
2482
|
key: 0,
|
|
2460
2483
|
class: "s-ui-table__aggregate-cell s-ui-table__filler-cell",
|
|
2461
2484
|
role: "presentation"
|
|
2462
|
-
},
|
|
2485
|
+
}, nr = [
|
|
2463
2486
|
"id",
|
|
2464
2487
|
"aria-colindex",
|
|
2465
2488
|
"data-column-key",
|
|
2466
2489
|
"data-section",
|
|
2467
2490
|
"tabindex"
|
|
2468
|
-
],
|
|
2491
|
+
], rr = {
|
|
2469
2492
|
key: 1,
|
|
2470
2493
|
class: "s-ui-table__aggregate-text"
|
|
2471
|
-
},
|
|
2494
|
+
}, ir = /* @__PURE__ */ O({
|
|
2472
2495
|
__name: "STable",
|
|
2473
|
-
props: /*@__PURE__*/
|
|
2496
|
+
props: /*@__PURE__*/ j({
|
|
2474
2497
|
items: {},
|
|
2475
2498
|
columns: {},
|
|
2476
2499
|
itemKey: {
|
|
@@ -2493,6 +2516,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2493
2516
|
isItemSelectable: { type: Function },
|
|
2494
2517
|
columnsManageable: { type: Boolean },
|
|
2495
2518
|
rowState: { type: Function },
|
|
2519
|
+
rowColor: { type: Function },
|
|
2496
2520
|
expandColumnKey: {},
|
|
2497
2521
|
expandOnClick: {
|
|
2498
2522
|
type: Boolean,
|
|
@@ -2510,8 +2534,8 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2510
2534
|
type: Boolean,
|
|
2511
2535
|
default: !0
|
|
2512
2536
|
},
|
|
2513
|
-
rowHeightMode: { default: () =>
|
|
2514
|
-
estimateRowSize: { default: () =>
|
|
2537
|
+
rowHeightMode: { default: () => Ne.AUTO },
|
|
2538
|
+
estimateRowSize: { default: () => 40 },
|
|
2515
2539
|
overscan: { default: () => 8 },
|
|
2516
2540
|
height: {},
|
|
2517
2541
|
maxHeight: {},
|
|
@@ -2565,7 +2589,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2565
2589
|
sortState: { default: () => [] },
|
|
2566
2590
|
sortStateModifiers: {}
|
|
2567
2591
|
}),
|
|
2568
|
-
emits: /*@__PURE__*/
|
|
2592
|
+
emits: /*@__PURE__*/ j([
|
|
2569
2593
|
"rowClick",
|
|
2570
2594
|
"rowContextMenu",
|
|
2571
2595
|
"cellClick",
|
|
@@ -2587,70 +2611,71 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2587
2611
|
"update:hiddenColumns",
|
|
2588
2612
|
"update:sortState"
|
|
2589
2613
|
]),
|
|
2590
|
-
setup(
|
|
2591
|
-
let
|
|
2592
|
-
columns: () =>
|
|
2593
|
-
columnOrder:
|
|
2594
|
-
columnWidths:
|
|
2595
|
-
hiddenColumns:
|
|
2596
|
-
hasIndicator: () => !!
|
|
2597
|
-
hasCheckbox: () =>
|
|
2598
|
-
hasRightEdge: () => !!
|
|
2599
|
-
hasColumnsManager: () =>
|
|
2600
|
-
columnsResizable: () =>
|
|
2601
|
-
columnsDraggable: () =>
|
|
2602
|
-
viewportWidth: () =>
|
|
2603
|
-
}), { treeIndex:
|
|
2604
|
-
items: () =>
|
|
2605
|
-
itemKey: () =>
|
|
2606
|
-
childrenKey: () =>
|
|
2607
|
-
groupRow: () =>
|
|
2608
|
-
expanded:
|
|
2609
|
-
depthFooter: () =>
|
|
2610
|
-
hasMoreChildrenKey: () =>
|
|
2611
|
-
}), { leadingDescriptors:
|
|
2612
|
-
columnDescriptors:
|
|
2613
|
-
hasTreeStructure: () =>
|
|
2614
|
-
expandColumnKey: () =>
|
|
2615
|
-
primaryColumnKey:
|
|
2616
|
-
}),
|
|
2617
|
-
let
|
|
2618
|
-
return
|
|
2614
|
+
setup(e, { expose: t, emit: n }) {
|
|
2615
|
+
let s = ne(e, "modelValue"), c = ne(e, "selected"), p = ne(e, "expanded"), m = ne(e, "columnOrder"), h = ne(e, "columnWidths"), O = ne(e, "hiddenColumns"), A = ne(e, "sortState"), j = n, I = re(), { t: L } = ue(), z = te(), ee = ie("scrollElementRef"), W = ie("tableElementRef"), oe = ie("tableRootRef"), { width: le, height: de } = fe(ee), { primaryColumnKey: pe, columnDescriptors: me, columnCssVars: he, totalWidth: ge, columnCount: _e } = ct({
|
|
2616
|
+
columns: () => e.columns,
|
|
2617
|
+
columnOrder: m,
|
|
2618
|
+
columnWidths: h,
|
|
2619
|
+
hiddenColumns: O,
|
|
2620
|
+
hasIndicator: () => !!I.indicator,
|
|
2621
|
+
hasCheckbox: () => e.selectable,
|
|
2622
|
+
hasRightEdge: () => !!I["right-edge"],
|
|
2623
|
+
hasColumnsManager: () => e.columnsManageable,
|
|
2624
|
+
columnsResizable: () => e.columnsResizable,
|
|
2625
|
+
columnsDraggable: () => e.columnsDraggable,
|
|
2626
|
+
viewportWidth: () => le.value
|
|
2627
|
+
}), { treeIndex: ve, snapshot: ye, flatRows: J, toggleExpanded: be, expandAll: xe, collapseAll: Se } = Kt({
|
|
2628
|
+
items: () => e.items,
|
|
2629
|
+
itemKey: () => e.itemKey,
|
|
2630
|
+
childrenKey: () => e.childrenKey,
|
|
2631
|
+
groupRow: () => e.groupRow,
|
|
2632
|
+
expanded: p,
|
|
2633
|
+
depthFooter: () => e.depthFooter,
|
|
2634
|
+
hasMoreChildrenKey: () => e.hasMoreChildrenKey
|
|
2635
|
+
}), { leadingDescriptors: Ce, trailingDescriptors: we, headerCells: Te, getStickyCellStyle: Ee, getHeaderCellClasses: De, leadingCellPlans: Oe, trailingCellPlans: Y, rowCellPlans: ke } = mn({
|
|
2636
|
+
columnDescriptors: me,
|
|
2637
|
+
hasTreeStructure: () => Ae.value,
|
|
2638
|
+
expandColumnKey: () => e.expandColumnKey,
|
|
2639
|
+
primaryColumnKey: pe
|
|
2640
|
+
}), X = b(() => me.value.length + 1), Ae = b(() => ve.value.expandableKeys.length > 0), je = b(() => Ae.value ? "treegrid" : "grid"), Me = b(() => J.value.length + 1 + +!!e.creationRow + +!!e.footerValues), Ie = b(() => e.virtual), Le = b(() => ({ "s-ui-table--rows-fixed": e.rowHeightMode === Ne.FIXED })), Re = b(() => {
|
|
2641
|
+
let t = 0;
|
|
2642
|
+
return e.footerValues && (t += 40), e.creationRow && (t += 40), t;
|
|
2619
2643
|
}), ze = [];
|
|
2620
|
-
|
|
2644
|
+
K(J, (e) => {
|
|
2621
2645
|
ze = e;
|
|
2622
2646
|
}, {
|
|
2623
2647
|
flush: "sync",
|
|
2624
2648
|
immediate: !0
|
|
2625
2649
|
});
|
|
2626
|
-
let { windowIndexes:
|
|
2627
|
-
rowCount: () =>
|
|
2650
|
+
let { windowIndexes: Be, uiTotalSize: Ve, modelScrollOffset: He, scrollToIndex: Ue, visibleRange: Ge, getRowOffset: Je, getRowUiOffset: Ye, getRowIndexAtOffset: Xe, measureWindowRows: Ze, measureNewRows: Qe } = In({
|
|
2651
|
+
rowCount: () => J.value.length,
|
|
2628
2652
|
enabled: Ie,
|
|
2629
|
-
autoMeasure: () =>
|
|
2630
|
-
estimateRowSize: () =>
|
|
2653
|
+
autoMeasure: () => e.rowHeightMode === Ne.AUTO,
|
|
2654
|
+
estimateRowSize: () => e.estimateRowSize,
|
|
2631
2655
|
estimateRowSizeByIndex: void 0,
|
|
2632
|
-
overscan: () =>
|
|
2633
|
-
scrollElement:
|
|
2656
|
+
overscan: () => e.overscan,
|
|
2657
|
+
scrollElement: ee,
|
|
2634
2658
|
getRowKey: (e) => ze[e]?.key ?? e,
|
|
2635
|
-
rowsVersion:
|
|
2636
|
-
viewportHeight: () =>
|
|
2637
|
-
extraHeight: () => 40 + Re.value
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2659
|
+
rowsVersion: J,
|
|
2660
|
+
viewportHeight: () => de.value,
|
|
2661
|
+
extraHeight: () => 40 + Re.value,
|
|
2662
|
+
headerHeight: () => 40
|
|
2663
|
+
}), { isRowHydrated: $e, hydratedKeys: et } = Sn({
|
|
2664
|
+
windowIndexes: Be,
|
|
2665
|
+
visibleRange: Ge,
|
|
2641
2666
|
getRowKey: (e) => ze[e]?.key,
|
|
2642
|
-
pinnedRowKey: () =>
|
|
2643
|
-
enabled: () => Ie.value &&
|
|
2667
|
+
pinnedRowKey: () => s.value,
|
|
2668
|
+
enabled: () => Ie.value && e.scrollSeekPlaceholders
|
|
2644
2669
|
});
|
|
2645
|
-
|
|
2646
|
-
let { resizingColumnKey: tt, handleResizeHandlePointerdown: nt, handleResizeHandleKeydown: rt, handleResizeHandleDblclick:
|
|
2647
|
-
tableRootElement:
|
|
2648
|
-
scrollElement:
|
|
2649
|
-
columnDescriptors:
|
|
2650
|
-
columnWidths:
|
|
2651
|
-
enabled: () =>
|
|
2670
|
+
K(et, Qe, { flush: "post" });
|
|
2671
|
+
let { resizingColumnKey: tt, handleResizeHandlePointerdown: nt, handleResizeHandleKeydown: rt, handleResizeHandleDblclick: it } = hn({
|
|
2672
|
+
tableRootElement: oe,
|
|
2673
|
+
scrollElement: ee,
|
|
2674
|
+
columnDescriptors: me,
|
|
2675
|
+
columnWidths: h,
|
|
2676
|
+
enabled: () => e.columnsResizable,
|
|
2652
2677
|
onResizeEnd: (e, t) => {
|
|
2653
|
-
|
|
2678
|
+
j("columnResizeEnd", {
|
|
2654
2679
|
key: e,
|
|
2655
2680
|
width: t
|
|
2656
2681
|
});
|
|
@@ -2658,104 +2683,104 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2658
2683
|
remeasureRows: () => {
|
|
2659
2684
|
Ze();
|
|
2660
2685
|
}
|
|
2661
|
-
}),
|
|
2662
|
-
tableId:
|
|
2663
|
-
tableRootElement:
|
|
2664
|
-
enabled: () =>
|
|
2665
|
-
columnDescriptors:
|
|
2666
|
-
onReorder: (
|
|
2667
|
-
let
|
|
2668
|
-
|
|
2669
|
-
|
|
2686
|
+
}), at = b(() => e.rowsDragMode ? e.rowsDragMode : Ae.value ? Pe.TREE : Pe.FLAT), { registerColumnHeaderElement: ot, draggingColumnKey: st, dropLineStyle: lt } = fn({
|
|
2687
|
+
tableId: z,
|
|
2688
|
+
tableRootElement: oe,
|
|
2689
|
+
enabled: () => e.columnsDraggable,
|
|
2690
|
+
columnDescriptors: me,
|
|
2691
|
+
onReorder: (t, n, r) => {
|
|
2692
|
+
let i = m.value?.length ? [...m.value] : e.columns.map((e) => e.key);
|
|
2693
|
+
e.columns.forEach((e) => {
|
|
2694
|
+
i.includes(e.key) || i.push(e.key);
|
|
2670
2695
|
});
|
|
2671
|
-
let a =
|
|
2696
|
+
let a = i.filter((e) => e !== t), o = a.indexOf(n);
|
|
2672
2697
|
if (o === -1) return;
|
|
2673
|
-
let s =
|
|
2674
|
-
a.splice(s, 0,
|
|
2675
|
-
key:
|
|
2698
|
+
let s = r === "left" ? o : o + 1;
|
|
2699
|
+
a.splice(s, 0, t), m.value = a, j("columnReorder", {
|
|
2700
|
+
key: t,
|
|
2676
2701
|
toIndex: s,
|
|
2677
2702
|
order: a
|
|
2678
2703
|
});
|
|
2679
2704
|
},
|
|
2680
2705
|
isResizing: () => !!tt.value
|
|
2681
|
-
}),
|
|
2682
|
-
(e instanceof Element || e === null) &&
|
|
2683
|
-
}, { registerRowElement:
|
|
2684
|
-
tableId:
|
|
2685
|
-
enabled: () =>
|
|
2686
|
-
dragMode:
|
|
2687
|
-
snapshot:
|
|
2688
|
-
scrollElement:
|
|
2689
|
-
isRowDraggable: () =>
|
|
2690
|
-
dragExpandDelayMs: () =>
|
|
2691
|
-
isExpanded: (e) =>
|
|
2706
|
+
}), ut = (e, t) => {
|
|
2707
|
+
(e instanceof Element || e === null) && ot(t, e);
|
|
2708
|
+
}, { registerRowElement: dt, draggingRowKey: pt, dropIndicator: mt } = _n({
|
|
2709
|
+
tableId: z,
|
|
2710
|
+
enabled: () => e.rowsDraggable,
|
|
2711
|
+
dragMode: at,
|
|
2712
|
+
snapshot: ye,
|
|
2713
|
+
scrollElement: ee,
|
|
2714
|
+
isRowDraggable: () => e.isRowDraggable,
|
|
2715
|
+
dragExpandDelayMs: () => e.dragExpandDelayMs,
|
|
2716
|
+
isExpanded: (e) => p.value.includes(e),
|
|
2692
2717
|
onHoverExpand: (e) => {
|
|
2693
|
-
|
|
2718
|
+
be(e);
|
|
2694
2719
|
},
|
|
2695
2720
|
onReorder: (e) => {
|
|
2696
|
-
|
|
2721
|
+
j("rowsReorder", e);
|
|
2697
2722
|
},
|
|
2698
2723
|
onTreeDrop: (e) => {
|
|
2699
|
-
|
|
2724
|
+
j("rowsDrop", e);
|
|
2700
2725
|
},
|
|
2701
2726
|
resolveRowPreviewTitle: (e) => Dn(e) ?? e.key
|
|
2702
|
-
}),
|
|
2703
|
-
(e instanceof Element || e === null) &&
|
|
2704
|
-
},
|
|
2727
|
+
}), ht = (e) => {
|
|
2728
|
+
(e instanceof Element || e === null) && dt(e);
|
|
2729
|
+
}, gt = (e) => {
|
|
2705
2730
|
let t = mt.value;
|
|
2706
|
-
if (!(!t || t.targetKey !== e)) return t.action ===
|
|
2707
|
-
}, { activeGroupRowIndex:
|
|
2708
|
-
snapshot:
|
|
2709
|
-
visibleRange:
|
|
2710
|
-
depthFooterSticky: () =>
|
|
2711
|
-
bottomVisibleRowIndex:
|
|
2712
|
-
if (!Ie.value ||
|
|
2713
|
-
let e =
|
|
2731
|
+
if (!(!t || t.targetKey !== e)) return t.action === Fe.CHILD ? "inside" : t.action === Fe.BEFORE ? "before" : "after";
|
|
2732
|
+
}, { activeGroupRowIndex: _t, activeDepthFooterRowIndex: vt, activeDepthFooterRowIndexes: bt, leavingDepthFooterRowIndex: xt, slidingDepthFooterRowIndexes: St, farDepthFooterRowIndexes: Ct } = wn({
|
|
2733
|
+
snapshot: ye,
|
|
2734
|
+
visibleRange: Ge,
|
|
2735
|
+
depthFooterSticky: () => e.depthFooter?.sticky !== !1,
|
|
2736
|
+
bottomVisibleRowIndex: b(() => {
|
|
2737
|
+
if (!Ie.value || de.value === 0) return;
|
|
2738
|
+
let e = He.value + de.value - 40 - Re.value;
|
|
2714
2739
|
return Xe(Math.max(0, e));
|
|
2715
2740
|
}),
|
|
2716
2741
|
getRowOffset: Je
|
|
2717
|
-
}), { renderEntries:
|
|
2718
|
-
flatRows:
|
|
2742
|
+
}), { renderEntries: wt } = vn({
|
|
2743
|
+
flatRows: J,
|
|
2719
2744
|
virtualEnabled: Ie,
|
|
2720
|
-
windowIndexes:
|
|
2721
|
-
uiTotalSize:
|
|
2745
|
+
windowIndexes: Be,
|
|
2746
|
+
uiTotalSize: Ve,
|
|
2722
2747
|
getRowUiOffset: Ye,
|
|
2723
|
-
activeGroupRowIndex:
|
|
2748
|
+
activeGroupRowIndex: _t,
|
|
2724
2749
|
activeDepthFooterRowIndexes: bt,
|
|
2725
2750
|
leavingDepthFooterRowIndex: xt,
|
|
2726
2751
|
slidingDepthFooterRowIndexes: St,
|
|
2727
|
-
farDepthFooterRowIndexes:
|
|
2728
|
-
activeRowIndex:
|
|
2729
|
-
if (
|
|
2752
|
+
farDepthFooterRowIndexes: Ct,
|
|
2753
|
+
activeRowIndex: b(() => {
|
|
2754
|
+
if (s.value) return ye.value.getRowIndexByKey(s.value);
|
|
2730
2755
|
})
|
|
2731
|
-
}),
|
|
2756
|
+
}), Tt = b(() => !e.loading && J.value.length === 0), { rootStyle: Et, scrollStyle: Ot, tableStyle: kt } = En({
|
|
2732
2757
|
tfootBarStackHeight: Re,
|
|
2733
|
-
hasFooterValues: () => !!
|
|
2734
|
-
scrollClientWidth: () =>
|
|
2735
|
-
columnCssVars:
|
|
2736
|
-
totalWidth:
|
|
2737
|
-
height: () =>
|
|
2738
|
-
maxHeight: () =>
|
|
2739
|
-
}), { getColumnSortDirection:
|
|
2740
|
-
sortState:
|
|
2758
|
+
hasFooterValues: () => !!e.footerValues,
|
|
2759
|
+
scrollClientWidth: () => le.value,
|
|
2760
|
+
columnCssVars: he,
|
|
2761
|
+
totalWidth: ge,
|
|
2762
|
+
height: () => e.height,
|
|
2763
|
+
maxHeight: () => e.maxHeight
|
|
2764
|
+
}), { getColumnSortDirection: At, getColumnSortIndex: jt, applySortCycle: Nt, applySortExact: Pt, getHeaderAriaSort: Ft, getHeaderSlotScope: It } = xn({
|
|
2765
|
+
sortState: A,
|
|
2741
2766
|
onSortChange: (e) => {
|
|
2742
|
-
|
|
2767
|
+
j("sortChange", e);
|
|
2743
2768
|
}
|
|
2744
|
-
}),
|
|
2745
|
-
|
|
2746
|
-
},
|
|
2747
|
-
if (!
|
|
2748
|
-
let
|
|
2749
|
-
|
|
2750
|
-
...
|
|
2751
|
-
[
|
|
2752
|
-
},
|
|
2753
|
-
key:
|
|
2754
|
-
width:
|
|
2769
|
+
}), Lt = H(), Rt = (e, t) => {
|
|
2770
|
+
Lt.value = t ? e : void 0;
|
|
2771
|
+
}, zt = (t, n) => {
|
|
2772
|
+
if (!e.columnsResizable || !t.resizable) return;
|
|
2773
|
+
let r = Math.min(t.maxWidth ?? Infinity, Math.max(t.minWidth, t.width + n * 8));
|
|
2774
|
+
r !== t.width && (h.value = {
|
|
2775
|
+
...h.value,
|
|
2776
|
+
[t.key]: r
|
|
2777
|
+
}, j("columnResizeEnd", {
|
|
2778
|
+
key: t.key,
|
|
2779
|
+
width: r
|
|
2755
2780
|
}));
|
|
2756
|
-
},
|
|
2757
|
-
let e =
|
|
2758
|
-
let t =
|
|
2781
|
+
}, Bt = H(!1), Vt = b(() => e.columns.filter((e) => e.key !== pe.value && (e.hideable ?? !0))), Ut = (e) => (O.value ?? []).includes(e), Wt = b(() => {
|
|
2782
|
+
let e = Vt.value.map((e) => {
|
|
2783
|
+
let t = Ut(e.key);
|
|
2759
2784
|
return {
|
|
2760
2785
|
column: e,
|
|
2761
2786
|
hidden: t,
|
|
@@ -2763,273 +2788,274 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
2763
2788
|
};
|
|
2764
2789
|
});
|
|
2765
2790
|
return [e.filter((e) => !e.hidden), e.filter((e) => e.hidden)].filter((e) => e.length > 0);
|
|
2766
|
-
}),
|
|
2767
|
-
let t = new Set(
|
|
2768
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
2791
|
+
}), Gt = (e) => {
|
|
2792
|
+
let t = new Set(O.value ?? []);
|
|
2793
|
+
t.has(e) ? t.delete(e) : t.add(e), O.value = [...t];
|
|
2769
2794
|
}, qt = (e) => {
|
|
2770
|
-
let t = new Set(
|
|
2771
|
-
t.add(e),
|
|
2772
|
-
}, Jt =
|
|
2773
|
-
selected:
|
|
2774
|
-
cascade: () =>
|
|
2775
|
-
treeIndex:
|
|
2776
|
-
groupRow: () =>
|
|
2777
|
-
disabledKey: () =>
|
|
2778
|
-
isItemSelectable: () =>
|
|
2779
|
-
}), Yt = Jt.headerCheckState,
|
|
2795
|
+
let t = new Set(O.value ?? []);
|
|
2796
|
+
t.add(e), O.value = [...t];
|
|
2797
|
+
}, Jt = yn({
|
|
2798
|
+
selected: c,
|
|
2799
|
+
cascade: () => e.cascadeSelection,
|
|
2800
|
+
treeIndex: ve,
|
|
2801
|
+
groupRow: () => e.groupRow,
|
|
2802
|
+
disabledKey: () => e.disabledKey,
|
|
2803
|
+
isItemSelectable: () => e.isItemSelectable
|
|
2804
|
+
}), Yt = Jt.headerCheckState, Xt = (e) => Jt.isSelected(e), Zt = (t) => e.cascadeSelection && Jt.getCheckState(t) === Z.INDETERMINATE, Qt = (e) => {
|
|
2780
2805
|
Jt.toggleRow(e);
|
|
2781
|
-
},
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
n,
|
|
2806
|
+
}, $t = (t) => Ht(t.item, e.disabledKey), en = ({ row: t, spacerHeight: n, rowHeight: r, stuckTop: i, stuckBottom: a, stuckBottomLeaving: o, stuckBottomSliding: c, stuckBottomCoverHeight: l, stuckBottomFar: u }, d) => [
|
|
2807
|
+
t ?? n,
|
|
2808
|
+
t?.index,
|
|
2809
|
+
t?.expanded,
|
|
2810
|
+
t?.item,
|
|
2811
|
+
t?.kind,
|
|
2812
|
+
t?.hasChildren,
|
|
2813
|
+
t?.depth,
|
|
2814
|
+
t?.parentKey,
|
|
2815
|
+
t ? Xt(t.key) : !1,
|
|
2816
|
+
t ? Zt(t.key) : !1,
|
|
2817
|
+
t ? s.value === t.key : !1,
|
|
2818
|
+
t ? _r(t.key) : void 0,
|
|
2819
|
+
t ? pt.value === t.key : !1,
|
|
2820
|
+
t ? gt(t.key) : void 0,
|
|
2797
2821
|
r,
|
|
2822
|
+
i,
|
|
2798
2823
|
a,
|
|
2799
2824
|
o,
|
|
2800
|
-
s,
|
|
2801
2825
|
c,
|
|
2802
2826
|
l,
|
|
2803
|
-
he.value,
|
|
2804
|
-
xn.value,
|
|
2805
|
-
wn.value,
|
|
2806
2827
|
u,
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2828
|
+
me.value,
|
|
2829
|
+
ln.value,
|
|
2830
|
+
pn.value,
|
|
2831
|
+
d,
|
|
2832
|
+
e.loadingMoreChildrenKeys,
|
|
2833
|
+
e.treeIndent,
|
|
2834
|
+
e.rowClass,
|
|
2835
|
+
e.rowState,
|
|
2836
|
+
e.rowColor,
|
|
2837
|
+
e.selectable,
|
|
2838
|
+
e.cascadeSelection,
|
|
2839
|
+
e.rowsDraggable
|
|
2840
|
+
], tn = (e) => {
|
|
2815
2841
|
if (e !== void 0) return { "--s-ui-table-stuck-cover-height": `${e}px` };
|
|
2816
|
-
},
|
|
2842
|
+
}, nn = b(() => wt.value.map((e) => {
|
|
2817
2843
|
let t = e.row?.kind === Q.ROW && !$e(e.row.key);
|
|
2818
2844
|
return {
|
|
2819
2845
|
...e,
|
|
2820
2846
|
placeholder: t,
|
|
2821
|
-
memoKeys:
|
|
2847
|
+
memoKeys: en(e, t)
|
|
2822
2848
|
};
|
|
2823
|
-
})),
|
|
2849
|
+
})), an = b(() => Object.keys(I).filter((e) => e.startsWith("cell:"))), on = (e) => `s-ui-table-${z}-row-${e}`, cn = (e) => ({
|
|
2824
2850
|
...e,
|
|
2825
|
-
selected:
|
|
2851
|
+
selected: Xt(e.key),
|
|
2826
2852
|
indeterminate: !1,
|
|
2827
|
-
active:
|
|
2828
|
-
disabled:
|
|
2853
|
+
active: s.value === e.key,
|
|
2854
|
+
disabled: $t(e),
|
|
2829
2855
|
group: e.kind === Q.GROUP,
|
|
2830
2856
|
toggleExpanded: () => {
|
|
2831
|
-
|
|
2857
|
+
be(e.key);
|
|
2832
2858
|
},
|
|
2833
2859
|
toggleSelected: () => {
|
|
2834
|
-
|
|
2860
|
+
Qt(e.key);
|
|
2835
2861
|
}
|
|
2836
|
-
}), { depthFooterColumnKey:
|
|
2837
|
-
columns: () =>
|
|
2838
|
-
primaryColumnKey:
|
|
2839
|
-
treeNodeByKey:
|
|
2840
|
-
groupTotalKey: () =>
|
|
2841
|
-
depthFooter: () =>
|
|
2842
|
-
groupContentColumnKey: () =>
|
|
2843
|
-
creationContentColumnKey: () =>
|
|
2844
|
-
loadMoreContentColumnKey: () =>
|
|
2845
|
-
treeIndent: () =>
|
|
2846
|
-
loadingMoreChildrenKeys: () =>
|
|
2847
|
-
footerValues: () =>
|
|
2848
|
-
stuckDepthFooterRowIndex:
|
|
2862
|
+
}), { 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({
|
|
2863
|
+
columns: () => e.columns,
|
|
2864
|
+
primaryColumnKey: pe,
|
|
2865
|
+
treeNodeByKey: b(() => ve.value.nodeByKey),
|
|
2866
|
+
groupTotalKey: () => e.groupTotalKey,
|
|
2867
|
+
depthFooter: () => e.depthFooter,
|
|
2868
|
+
groupContentColumnKey: () => e.groupContentColumnKey,
|
|
2869
|
+
creationContentColumnKey: () => e.creationContentColumnKey,
|
|
2870
|
+
loadMoreContentColumnKey: () => e.loadMoreContentColumnKey,
|
|
2871
|
+
treeIndent: () => e.treeIndent,
|
|
2872
|
+
loadingMoreChildrenKeys: () => e.loadingMoreChildrenKeys,
|
|
2873
|
+
footerValues: () => e.footerValues,
|
|
2874
|
+
stuckDepthFooterRowIndex: vt,
|
|
2849
2875
|
onDepthFooterClick: (e) => {
|
|
2850
|
-
|
|
2876
|
+
j("depthFooterClick", e);
|
|
2851
2877
|
},
|
|
2852
2878
|
onLoadMoreChildren: (e) => {
|
|
2853
|
-
|
|
2879
|
+
j("loadMoreChildren", e);
|
|
2854
2880
|
}
|
|
2855
2881
|
}), ar = (e) => ({
|
|
2856
|
-
...
|
|
2857
|
-
count:
|
|
2858
|
-
total:
|
|
2859
|
-
}), or = (
|
|
2860
|
-
|
|
2861
|
-
key:
|
|
2862
|
-
item:
|
|
2863
|
-
event:
|
|
2882
|
+
...cn(e),
|
|
2883
|
+
count: Cn(e),
|
|
2884
|
+
total: Tn(e)
|
|
2885
|
+
}), or = (t, n) => {
|
|
2886
|
+
$t(t) || (s.value = t.key, e.expandOnClick && (t.hasChildren || t.kind === Q.GROUP) && be(t.key), j("rowClick", {
|
|
2887
|
+
key: t.key,
|
|
2888
|
+
item: t.item,
|
|
2889
|
+
event: n
|
|
2864
2890
|
}));
|
|
2865
2891
|
}, sr = (e, t) => {
|
|
2866
|
-
|
|
2892
|
+
j("rowContextMenu", {
|
|
2867
2893
|
key: e.key,
|
|
2868
2894
|
item: e.item,
|
|
2869
2895
|
event: t
|
|
2870
2896
|
});
|
|
2871
|
-
}, cr =
|
|
2897
|
+
}, cr = b(() => {
|
|
2872
2898
|
let e = /* @__PURE__ */ new Set();
|
|
2873
|
-
return
|
|
2899
|
+
return me.value.forEach((t) => {
|
|
2874
2900
|
t.column && e.add(t.key);
|
|
2875
2901
|
}), e;
|
|
2876
2902
|
}), lr = (e, t, n) => {
|
|
2877
|
-
!cr.value.has(t) ||
|
|
2903
|
+
!cr.value.has(t) || $t(e) || j("cellClick", {
|
|
2878
2904
|
key: e.key,
|
|
2879
2905
|
item: e.item,
|
|
2880
2906
|
columnKey: t,
|
|
2881
2907
|
event: n
|
|
2882
2908
|
});
|
|
2883
|
-
}, ur = (e) => e ?
|
|
2884
|
-
let
|
|
2885
|
-
return Math.max(1, Math.floor(
|
|
2909
|
+
}, ur = (e) => e ? !$t(e) : !1, dr = b(() => {
|
|
2910
|
+
let t = de.value - 40 - Re.value;
|
|
2911
|
+
return Math.max(1, Math.floor(t / e.estimateRowSize));
|
|
2886
2912
|
});
|
|
2887
|
-
|
|
2888
|
-
distance: () =>
|
|
2889
|
-
canLoadMore: () =>
|
|
2913
|
+
f(() => ee.value, {
|
|
2914
|
+
distance: () => e.endReachedDistance,
|
|
2915
|
+
canLoadMore: () => e.canLoadMore?.() ?? !0,
|
|
2890
2916
|
onEndReached: () => {
|
|
2891
|
-
|
|
2917
|
+
j("endReached", { direction: "bottom" });
|
|
2892
2918
|
}
|
|
2893
2919
|
});
|
|
2894
2920
|
let fr = (e, t) => {
|
|
2895
|
-
let n =
|
|
2921
|
+
let n = ye.value.getRowIndexByKey(e);
|
|
2896
2922
|
if (n !== void 0) {
|
|
2897
2923
|
if (Ie.value) {
|
|
2898
|
-
|
|
2924
|
+
Ue(n, t?.align ?? "auto");
|
|
2899
2925
|
return;
|
|
2900
2926
|
}
|
|
2901
|
-
document.getElementById(
|
|
2927
|
+
document.getElementById(on(e))?.scrollIntoView({ block: t?.align === "center" ? "center" : "nearest" });
|
|
2902
2928
|
}
|
|
2903
|
-
}, pr = (e) => `s-ui-table-${
|
|
2904
|
-
tableRootElement:
|
|
2905
|
-
tableElement:
|
|
2906
|
-
scrollElement:
|
|
2907
|
-
columnDescriptors:
|
|
2908
|
-
flatRows:
|
|
2909
|
-
snapshot:
|
|
2910
|
-
groupColumnKey:
|
|
2911
|
-
depthFooterColumnKey:
|
|
2912
|
-
loadMoreColumnKey:
|
|
2913
|
-
creationColumnKey:
|
|
2914
|
-
hasCreationRow: () => !!
|
|
2915
|
-
hasAggregateRow: () => !!
|
|
2929
|
+
}, pr = (e) => `s-ui-table-${z}-cell-${e.section}-${e.rowKey ?? ""}-${e.columnKey}`, mr = ft({
|
|
2930
|
+
tableRootElement: oe,
|
|
2931
|
+
tableElement: W,
|
|
2932
|
+
scrollElement: ee,
|
|
2933
|
+
columnDescriptors: me,
|
|
2934
|
+
flatRows: J,
|
|
2935
|
+
snapshot: ye,
|
|
2936
|
+
groupColumnKey: un,
|
|
2937
|
+
depthFooterColumnKey: ln,
|
|
2938
|
+
loadMoreColumnKey: pn,
|
|
2939
|
+
creationColumnKey: dn,
|
|
2940
|
+
hasCreationRow: () => !!e.creationRow,
|
|
2941
|
+
hasAggregateRow: () => !!e.footerValues,
|
|
2916
2942
|
isRowNavigable: ur,
|
|
2917
2943
|
pageSize: dr,
|
|
2918
2944
|
buildCellDomId: pr,
|
|
2919
2945
|
onBodyRowFocused: (e) => {
|
|
2920
|
-
|
|
2946
|
+
s.value = e;
|
|
2921
2947
|
},
|
|
2922
2948
|
scrollToRowIndex: (e) => {
|
|
2923
|
-
let t =
|
|
2949
|
+
let t = J.value[e];
|
|
2924
2950
|
t && fr(t.key);
|
|
2925
2951
|
}
|
|
2926
|
-
}), hr = `s-ui-table-${
|
|
2952
|
+
}), hr = `s-ui-table-${z}-cell-${$.BODY}-`, gr = `s-ui-table-${z}-cell-${$.CREATION}-`, _r = (e) => mr.focusedBodyRowKey.value === e ? mr.focusAddress.value.columnKey : void 0, vr = (e) => {
|
|
2927
2953
|
let t = mr.focusAddress.value;
|
|
2928
2954
|
return t.section === e ? t.columnKey : void 0;
|
|
2929
|
-
}, yr = (e, t, n) => mr.getCellTabIndex(e, t, n), { handleGridFocusIn: br, handleGridKeydown: xr } =
|
|
2955
|
+
}, yr = (e, t, n) => mr.getCellTabIndex(e, t, n), { handleGridFocusIn: br, handleGridKeydown: xr } = gn({
|
|
2930
2956
|
gridFocus: mr,
|
|
2931
|
-
columnDescriptors:
|
|
2932
|
-
flatRows:
|
|
2933
|
-
expandColumnKey: () =>
|
|
2934
|
-
primaryColumnKey:
|
|
2935
|
-
groupColumnKey:
|
|
2936
|
-
selectable: () =>
|
|
2937
|
-
openMenuColumnKey:
|
|
2938
|
-
toggleExpanded:
|
|
2957
|
+
columnDescriptors: me,
|
|
2958
|
+
flatRows: J,
|
|
2959
|
+
expandColumnKey: () => e.expandColumnKey,
|
|
2960
|
+
primaryColumnKey: pe,
|
|
2961
|
+
groupColumnKey: un,
|
|
2962
|
+
selectable: () => e.selectable,
|
|
2963
|
+
openMenuColumnKey: Lt,
|
|
2964
|
+
toggleExpanded: be,
|
|
2939
2965
|
toggleRowSelected: (e) => {
|
|
2940
2966
|
Jt.toggleRow(e);
|
|
2941
2967
|
},
|
|
2942
2968
|
applySortCycle: Nt,
|
|
2943
|
-
setColumnMenuOpen:
|
|
2944
|
-
resizeColumnByKeyboard:
|
|
2945
|
-
onDepthFooterActivate:
|
|
2946
|
-
onLoadMoreActivate:
|
|
2969
|
+
setColumnMenuOpen: Rt,
|
|
2970
|
+
resizeColumnByKeyboard: zt,
|
|
2971
|
+
onDepthFooterActivate: kn,
|
|
2972
|
+
onLoadMoreActivate: Mn,
|
|
2947
2973
|
onRowActivate: (e, t) => {
|
|
2948
|
-
|
|
2974
|
+
j("rowClick", {
|
|
2949
2975
|
key: e.key,
|
|
2950
2976
|
item: e.item,
|
|
2951
2977
|
event: t
|
|
2952
2978
|
});
|
|
2953
2979
|
}
|
|
2954
2980
|
});
|
|
2955
|
-
return
|
|
2981
|
+
return t({
|
|
2956
2982
|
focusNavigation: async () => {
|
|
2957
|
-
mr.focusAddressNow(mr.focusAddress.value), await
|
|
2983
|
+
mr.focusAddressNow(mr.focusAddress.value), await N();
|
|
2958
2984
|
},
|
|
2959
2985
|
scrollToRow: fr,
|
|
2960
|
-
expandAll:
|
|
2961
|
-
collapseAll:
|
|
2986
|
+
expandAll: xe,
|
|
2987
|
+
collapseAll: Se,
|
|
2962
2988
|
clearSelection: () => {
|
|
2963
2989
|
Jt.clearSelection();
|
|
2964
2990
|
},
|
|
2965
|
-
getScrollElement: () =>
|
|
2966
|
-
}), (
|
|
2991
|
+
getScrollElement: () => ee.value ?? void 0
|
|
2992
|
+
}), (t, n) => (R(), C("div", {
|
|
2967
2993
|
ref_key: "tableRootRef",
|
|
2968
|
-
ref:
|
|
2969
|
-
class:
|
|
2970
|
-
style:
|
|
2971
|
-
}, [
|
|
2994
|
+
ref: oe,
|
|
2995
|
+
class: P(["s-ui-table", Le.value]),
|
|
2996
|
+
style: F(G(Et))
|
|
2997
|
+
}, [w("div", {
|
|
2972
2998
|
ref_key: "scrollElementRef",
|
|
2973
|
-
ref:
|
|
2999
|
+
ref: ee,
|
|
2974
3000
|
class: "s-ui-table__scroll",
|
|
2975
|
-
style:
|
|
2976
|
-
}, [
|
|
3001
|
+
style: F(G(Ot))
|
|
3002
|
+
}, [w("table", {
|
|
2977
3003
|
class: "s-ui-table__table",
|
|
2978
|
-
style:
|
|
2979
|
-
role:
|
|
2980
|
-
"aria-rowcount":
|
|
2981
|
-
"aria-colcount":
|
|
2982
|
-
"aria-busy":
|
|
3004
|
+
style: F(G(kt)),
|
|
3005
|
+
role: je.value,
|
|
3006
|
+
"aria-rowcount": Me.value,
|
|
3007
|
+
"aria-colcount": G(_e),
|
|
3008
|
+
"aria-busy": e.loading || e.loadingMore || void 0,
|
|
2983
3009
|
ref_key: "tableElementRef",
|
|
2984
|
-
ref:
|
|
3010
|
+
ref: W,
|
|
2985
3011
|
tabindex: "-1",
|
|
2986
|
-
onKeydown:
|
|
2987
|
-
onFocusin:
|
|
3012
|
+
onKeydown: n[5] ||= (...e) => G(xr) && G(xr)(...e),
|
|
3013
|
+
onFocusin: n[6] ||= (...e) => G(br) && G(br)(...e)
|
|
2988
3014
|
}, [
|
|
2989
|
-
|
|
2990
|
-
(
|
|
3015
|
+
w("colgroup", null, [
|
|
3016
|
+
(R(!0), C(y, null, B(G(Ce), (e) => (R(), C("col", {
|
|
2991
3017
|
key: e.key,
|
|
2992
|
-
style:
|
|
3018
|
+
style: F({ width: `var(${e.liveWidthVar}, var(${e.widthVar}))` })
|
|
2993
3019
|
}, null, 4))), 128)),
|
|
2994
|
-
|
|
2995
|
-
(
|
|
3020
|
+
n[7] ||= w("col", { class: "s-ui-table__filler-col" }, null, -1),
|
|
3021
|
+
(R(!0), C(y, null, B(G(we), (e) => (R(), C("col", {
|
|
2996
3022
|
key: e.key,
|
|
2997
|
-
style:
|
|
3023
|
+
style: F({ width: `var(${e.liveWidthVar}, var(${e.widthVar}))` })
|
|
2998
3024
|
}, null, 4))), 128))
|
|
2999
3025
|
]),
|
|
3000
|
-
|
|
3026
|
+
w("thead", Rn, [w("tr", zn, [(R(!0), C(y, null, B(G(Te), ({ key: e, descriptor: s }) => (R(), C(y, { key: e }, [s ? (R(), C("th", {
|
|
3001
3027
|
key: 1,
|
|
3002
3028
|
id: pr({
|
|
3003
|
-
section:
|
|
3004
|
-
columnKey:
|
|
3029
|
+
section: G($).HEADER,
|
|
3030
|
+
columnKey: s.key
|
|
3005
3031
|
}),
|
|
3006
3032
|
ref_for: !0,
|
|
3007
|
-
ref: (e) =>
|
|
3008
|
-
class:
|
|
3009
|
-
style:
|
|
3010
|
-
"data-column-key":
|
|
3011
|
-
"data-section":
|
|
3012
|
-
"aria-colindex":
|
|
3013
|
-
"aria-sort":
|
|
3014
|
-
tabindex: yr(
|
|
3033
|
+
ref: (e) => ut(e, s.key),
|
|
3034
|
+
class: P(["s-ui-table__header-cell", [G(De)(s), { "s-ui-table__header-cell--dragging": G(st) === s.key }]]),
|
|
3035
|
+
style: F(G(Ee)(s)),
|
|
3036
|
+
"data-column-key": s.key,
|
|
3037
|
+
"data-section": G($).HEADER,
|
|
3038
|
+
"aria-colindex": s.colIndex,
|
|
3039
|
+
"aria-sort": G(Ft)(s),
|
|
3040
|
+
tabindex: yr(G($).HEADER, void 0, s.key),
|
|
3015
3041
|
scope: "col"
|
|
3016
|
-
}, [
|
|
3042
|
+
}, [s.column ? (R(), x(Dt, {
|
|
3017
3043
|
key: 0,
|
|
3018
|
-
descriptor:
|
|
3019
|
-
"sort-direction":
|
|
3020
|
-
"sort-index":
|
|
3021
|
-
"menu-open":
|
|
3022
|
-
"onUpdate:menuOpen": (e) =>
|
|
3023
|
-
onSortToggle: (e) =>
|
|
3024
|
-
onSortSet: (e) =>
|
|
3025
|
-
onHide: (e) => qt(
|
|
3026
|
-
},
|
|
3044
|
+
descriptor: s,
|
|
3045
|
+
"sort-direction": G(At)(s.key),
|
|
3046
|
+
"sort-index": G(jt)(s.key),
|
|
3047
|
+
"menu-open": Lt.value === s.key,
|
|
3048
|
+
"onUpdate:menuOpen": (e) => Rt(s.key, e),
|
|
3049
|
+
onSortToggle: (e) => G(Nt)(s.key, e),
|
|
3050
|
+
onSortSet: (e) => G(Pt)(s.key, e),
|
|
3051
|
+
onHide: (e) => qt(s.key)
|
|
3052
|
+
}, T({ _: 2 }, [G(I)[`header:${s.key}`] ? {
|
|
3027
3053
|
name: "default",
|
|
3028
|
-
fn:
|
|
3054
|
+
fn: q(() => [V(t.$slots, `header:${s.key}`, M({ ref_for: !0 }, G(It)(s)))]),
|
|
3029
3055
|
key: "0"
|
|
3030
|
-
} : void 0,
|
|
3056
|
+
} : void 0, G(I)[`header-menu:${s.key}`] ? {
|
|
3031
3057
|
name: "menu",
|
|
3032
|
-
fn:
|
|
3058
|
+
fn: q(() => [V(t.$slots, `header-menu:${s.key}`, M({ ref_for: !0 }, G(It)(s)))]),
|
|
3033
3059
|
key: "1"
|
|
3034
3060
|
} : void 0]), 1032, [
|
|
3035
3061
|
"descriptor",
|
|
@@ -3040,34 +3066,34 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
3040
3066
|
"onSortToggle",
|
|
3041
3067
|
"onSortSet",
|
|
3042
3068
|
"onHide"
|
|
3043
|
-
])) :
|
|
3069
|
+
])) : s.service === G(qe).CHECKBOX ? (R(), x(We, {
|
|
3044
3070
|
key: 1,
|
|
3045
|
-
class:
|
|
3046
|
-
"model-value":
|
|
3047
|
-
indeterminate:
|
|
3048
|
-
"screen-reader-label":
|
|
3049
|
-
"onUpdate:modelValue":
|
|
3071
|
+
class: P(["s-ui-table__header-checkbox", { "s-ui-table__header-checkbox--active": G(Yt) !== G(Z).UNCHECKED }]),
|
|
3072
|
+
"model-value": G(Yt) === G(Z).CHECKED,
|
|
3073
|
+
indeterminate: G(Yt) === G(Z).INDETERMINATE,
|
|
3074
|
+
"screen-reader-label": G(Yt) === G(Z).CHECKED ? G(L)("table.deselectAll") : G(L)("table.selectAll"),
|
|
3075
|
+
"onUpdate:modelValue": n[0] ||= (e) => G(Jt).toggleSelectAll()
|
|
3050
3076
|
}, null, 8, [
|
|
3051
3077
|
"class",
|
|
3052
3078
|
"model-value",
|
|
3053
3079
|
"indeterminate",
|
|
3054
3080
|
"screen-reader-label"
|
|
3055
|
-
])) :
|
|
3056
|
-
modelValue:
|
|
3057
|
-
"onUpdate:modelValue":
|
|
3058
|
-
placement:
|
|
3081
|
+
])) : s.service === G(qe).COLUMNS_MANAGER ? (R(), C("div", Hn, [D(G(u), {
|
|
3082
|
+
modelValue: Bt.value,
|
|
3083
|
+
"onUpdate:modelValue": n[1] ||= (e) => Bt.value = e,
|
|
3084
|
+
placement: G(l).BOTTOM_END,
|
|
3059
3085
|
shift: "",
|
|
3060
3086
|
"fit-viewport": ""
|
|
3061
3087
|
}, {
|
|
3062
|
-
trigger:
|
|
3088
|
+
trigger: q(({ toggle: e }) => [D(G(o), {
|
|
3063
3089
|
class: "s-ui-table__columns-manager-button",
|
|
3064
|
-
appearance:
|
|
3065
|
-
variant:
|
|
3066
|
-
size:
|
|
3090
|
+
appearance: G(i).BARE,
|
|
3091
|
+
variant: G(r).NEUTRAL,
|
|
3092
|
+
size: G(a).SMALL,
|
|
3067
3093
|
icon: "tablePlus",
|
|
3068
|
-
"aria-label":
|
|
3094
|
+
"aria-label": G(L)("table.manageColumns"),
|
|
3069
3095
|
tabindex: "-1",
|
|
3070
|
-
onClick: (
|
|
3096
|
+
onClick: (t) => e()
|
|
3071
3097
|
}, null, 8, [
|
|
3072
3098
|
"appearance",
|
|
3073
3099
|
"variant",
|
|
@@ -3075,30 +3101,30 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
3075
3101
|
"aria-label",
|
|
3076
3102
|
"onClick"
|
|
3077
3103
|
])]),
|
|
3078
|
-
content:
|
|
3104
|
+
content: q(() => [D(G(d), {
|
|
3079
3105
|
class: "s-ui-table__columns-menu",
|
|
3080
3106
|
width: 300
|
|
3081
3107
|
}, {
|
|
3082
|
-
default:
|
|
3083
|
-
columns:
|
|
3084
|
-
isColumnHidden:
|
|
3085
|
-
toggleColumn:
|
|
3086
|
-
}, () => [(
|
|
3108
|
+
default: q(() => [V(t.$slots, "columns-menu", {
|
|
3109
|
+
columns: Vt.value,
|
|
3110
|
+
isColumnHidden: Ut,
|
|
3111
|
+
toggleColumn: Gt
|
|
3112
|
+
}, () => [(R(!0), C(y, null, B(Wt.value, (e, t) => (R(), C(y, { key: t }, [t > 0 ? (R(), x(G(ce), {
|
|
3087
3113
|
key: 0,
|
|
3088
3114
|
class: "s-ui-table__columns-separator"
|
|
3089
|
-
})) :
|
|
3115
|
+
})) : S("", !0), (R(!0), C(y, null, B(e, (e) => (R(), x(G(v), {
|
|
3090
3116
|
key: e.column.key,
|
|
3091
|
-
class:
|
|
3092
|
-
size:
|
|
3093
|
-
"label-placement":
|
|
3117
|
+
class: P(["s-ui-table__columns-item", e.classes]),
|
|
3118
|
+
size: G(_).SMALL,
|
|
3119
|
+
"label-placement": G(g).LEFT,
|
|
3094
3120
|
"model-value": !e.hidden,
|
|
3095
|
-
"onUpdate:modelValue": (t) =>
|
|
3121
|
+
"onUpdate:modelValue": (t) => Gt(e.column.key)
|
|
3096
3122
|
}, {
|
|
3097
|
-
default:
|
|
3123
|
+
default: q(() => [w("span", Un, [e.column.icon ? (R(), x(G(se), {
|
|
3098
3124
|
key: 0,
|
|
3099
3125
|
name: e.column.icon,
|
|
3100
3126
|
size: 16
|
|
3101
|
-
}, null, 8, ["name"])) :
|
|
3127
|
+
}, null, 8, ["name"])) : S("", !0), w("span", Wn, U(e.column.title ?? e.column.key), 1)])]),
|
|
3102
3128
|
_: 2
|
|
3103
3129
|
}, 1032, [
|
|
3104
3130
|
"class",
|
|
@@ -3110,83 +3136,83 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
3110
3136
|
_: 3
|
|
3111
3137
|
})]),
|
|
3112
3138
|
_: 3
|
|
3113
|
-
}, 8, ["modelValue", "placement"])])) :
|
|
3139
|
+
}, 8, ["modelValue", "placement"])])) : S("", !0), s.resizable ? (R(), C("span", {
|
|
3114
3140
|
key: 3,
|
|
3115
|
-
class:
|
|
3141
|
+
class: P(["s-ui-table__resize-handle", { "s-ui-table__resize-handle--active": G(tt) === s.key }]),
|
|
3116
3142
|
role: "separator",
|
|
3117
3143
|
"aria-orientation": "vertical",
|
|
3118
|
-
"aria-label":
|
|
3144
|
+
"aria-label": G(L)("table.resizeColumn"),
|
|
3119
3145
|
tabindex: "-1",
|
|
3120
|
-
onPointerdown: (e) =>
|
|
3121
|
-
onKeydown: (e) =>
|
|
3122
|
-
onDblclick: (e) =>
|
|
3123
|
-
onClick:
|
|
3124
|
-
}, null, 42,
|
|
3125
|
-
|
|
3126
|
-
|
|
3146
|
+
onPointerdown: (e) => G(nt)(e, s.key),
|
|
3147
|
+
onKeydown: (e) => G(rt)(e, s.key),
|
|
3148
|
+
onDblclick: (e) => G(it)(s.key),
|
|
3149
|
+
onClick: n[2] ||= ae(() => {}, ["stop"])
|
|
3150
|
+
}, null, 42, Gn)) : S("", !0)], 14, Vn)) : (R(), C("th", Bn))], 64))), 128))])]),
|
|
3151
|
+
w("tbody", Kn, [
|
|
3152
|
+
Tt.value ? (R(), C("tr", qn, [w("td", {
|
|
3127
3153
|
class: "s-ui-table__empty-cell",
|
|
3128
|
-
colspan:
|
|
3129
|
-
}, [
|
|
3130
|
-
|
|
3154
|
+
colspan: X.value
|
|
3155
|
+
}, [w("div", Yn, [V(t.$slots, "empty", {}, () => [w("span", Xn, U(G(L)("table.empty")), 1)])])], 8, Jn)])) : S("", !0),
|
|
3156
|
+
e.loading ? (R(!0), C(y, { key: 1 }, B(e.skeletonRowCount, (e) => (R(), x(sn, {
|
|
3131
3157
|
key: `skeleton-${e}`,
|
|
3132
|
-
"leading-plans":
|
|
3133
|
-
"trailing-plans":
|
|
3134
|
-
},
|
|
3158
|
+
"leading-plans": G(Oe),
|
|
3159
|
+
"trailing-plans": G(Y)
|
|
3160
|
+
}, T({ _: 2 }, [G(I)["skeleton-row"] ? {
|
|
3135
3161
|
name: "default",
|
|
3136
|
-
fn:
|
|
3162
|
+
fn: q((e) => [V(t.$slots, "skeleton-row", { column: e.descriptor.column })]),
|
|
3137
3163
|
key: "0"
|
|
3138
|
-
} : void 0]), 1032, ["leading-plans", "trailing-plans"]))), 128)) : (
|
|
3139
|
-
let z =
|
|
3140
|
-
if (
|
|
3141
|
-
let
|
|
3164
|
+
} : void 0]), 1032, ["leading-plans", "trailing-plans"]))), 128)) : (R(!0), C(y, { key: 2 }, B(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, N) => {
|
|
3165
|
+
let z = b;
|
|
3166
|
+
if (N && N.el && N.key === c && k(N, z)) return N;
|
|
3167
|
+
let H = (R(), C(y, { key: c }, [l ? (R(), C("tr", Zn, [w("td", {
|
|
3142
3168
|
class: "s-ui-table__spacer-cell",
|
|
3143
|
-
colspan:
|
|
3144
|
-
style:
|
|
3145
|
-
}, null, 12,
|
|
3169
|
+
colspan: X.value,
|
|
3170
|
+
style: F({ height: `${u}px` })
|
|
3171
|
+
}, null, 12, Qn)])) : n && n.kind === G(Q).GROUP ? (R(), x(yt, {
|
|
3146
3172
|
key: 1,
|
|
3147
|
-
id:
|
|
3173
|
+
id: on(n.key),
|
|
3148
3174
|
stuck: f,
|
|
3149
|
-
row:
|
|
3150
|
-
"dnd-ref":
|
|
3151
|
-
dragging:
|
|
3152
|
-
"drop-position":
|
|
3153
|
-
"row-index":
|
|
3154
|
-
"leading-plans":
|
|
3155
|
-
"trailing-plans":
|
|
3156
|
-
"group-column-key":
|
|
3157
|
-
"tree-indent":
|
|
3158
|
-
count:
|
|
3159
|
-
total:
|
|
3160
|
-
title:
|
|
3161
|
-
expanded:
|
|
3162
|
-
active:
|
|
3175
|
+
row: n,
|
|
3176
|
+
"dnd-ref": e.rowsDraggable ? ht : void 0,
|
|
3177
|
+
dragging: G(pt) === n.key,
|
|
3178
|
+
"drop-position": gt(n.key),
|
|
3179
|
+
"row-index": n.index,
|
|
3180
|
+
"leading-plans": G(Oe),
|
|
3181
|
+
"trailing-plans": G(Y),
|
|
3182
|
+
"group-column-key": G(un),
|
|
3183
|
+
"tree-indent": e.treeIndent,
|
|
3184
|
+
count: G(Cn)(n),
|
|
3185
|
+
total: G(Tn)(n),
|
|
3186
|
+
title: G(Dn)(n),
|
|
3187
|
+
expanded: n.expanded,
|
|
3188
|
+
active: s.value === n.key,
|
|
3163
3189
|
"cell-id-prefix": hr,
|
|
3164
|
-
"focus-column-key": _r(
|
|
3165
|
-
onToggle: (e) =>
|
|
3166
|
-
onRowClick: (e) => or(
|
|
3167
|
-
onMenuOpen: (e) =>
|
|
3168
|
-
key:
|
|
3169
|
-
item:
|
|
3190
|
+
"focus-column-key": _r(n.key),
|
|
3191
|
+
onToggle: (e) => G(be)(n.key),
|
|
3192
|
+
onRowClick: (e) => or(n, e),
|
|
3193
|
+
onMenuOpen: (e) => j("groupMenuOpen", {
|
|
3194
|
+
key: n.key,
|
|
3195
|
+
item: n.item
|
|
3170
3196
|
})
|
|
3171
|
-
},
|
|
3172
|
-
|
|
3197
|
+
}, T({ _: 2 }, [
|
|
3198
|
+
G(I)["group-menu"] ? {
|
|
3173
3199
|
name: "menu",
|
|
3174
|
-
fn:
|
|
3200
|
+
fn: q(() => [V(t.$slots, "group-menu", M({ ref_for: !0 }, ar(n)))]),
|
|
3175
3201
|
key: "0"
|
|
3176
3202
|
} : void 0,
|
|
3177
|
-
|
|
3203
|
+
G(I)["group-row"] ? {
|
|
3178
3204
|
name: "row",
|
|
3179
|
-
fn:
|
|
3205
|
+
fn: q(() => [V(t.$slots, "group-row", M({ ref_for: !0 }, ar(n)))]),
|
|
3180
3206
|
key: "1"
|
|
3181
3207
|
} : void 0,
|
|
3182
|
-
|
|
3208
|
+
G(I)["group-title"] ? {
|
|
3183
3209
|
name: "title",
|
|
3184
|
-
fn:
|
|
3210
|
+
fn: q(() => [V(t.$slots, "group-title", M({ ref_for: !0 }, ar(n)))]),
|
|
3185
3211
|
key: "2"
|
|
3186
3212
|
} : void 0,
|
|
3187
|
-
|
|
3213
|
+
G(I)["group-actions"] ? {
|
|
3188
3214
|
name: "actions",
|
|
3189
|
-
fn:
|
|
3215
|
+
fn: q(() => [V(t.$slots, "group-actions", M({ ref_for: !0 }, ar(n)))]),
|
|
3190
3216
|
key: "3"
|
|
3191
3217
|
} : void 0
|
|
3192
3218
|
]), 1032, [
|
|
@@ -3210,29 +3236,29 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
3210
3236
|
"onToggle",
|
|
3211
3237
|
"onRowClick",
|
|
3212
3238
|
"onMenuOpen"
|
|
3213
|
-
])) :
|
|
3239
|
+
])) : n && n.kind === G(Q).DEPTH_FOOTER ? (R(), x(Ke, {
|
|
3214
3240
|
key: 2,
|
|
3215
|
-
class:
|
|
3241
|
+
class: P(["s-ui-table__depth-footer-row", {
|
|
3216
3242
|
"s-ui-table__depth-footer-row--stuck": p,
|
|
3217
3243
|
"s-ui-table__depth-footer-row--stuck-leaving": m,
|
|
3218
3244
|
"s-ui-table__depth-footer-row--stuck-sliding": h,
|
|
3219
|
-
"s-ui-table__depth-footer-row--stuck-covered":
|
|
3220
|
-
"s-ui-table__depth-footer-row--stuck-covered-far":
|
|
3245
|
+
"s-ui-table__depth-footer-row--stuck-covered": g !== void 0,
|
|
3246
|
+
"s-ui-table__depth-footer-row--stuck-covered-far": _
|
|
3221
3247
|
}]),
|
|
3222
|
-
style:
|
|
3223
|
-
"data-index":
|
|
3224
|
-
"aria-rowindex":
|
|
3225
|
-
cells:
|
|
3226
|
-
"content-column-key":
|
|
3248
|
+
style: F(tn(g)),
|
|
3249
|
+
"data-index": n.index,
|
|
3250
|
+
"aria-rowindex": n.index + 2,
|
|
3251
|
+
cells: G(ke),
|
|
3252
|
+
"content-column-key": G(ln),
|
|
3227
3253
|
"cell-class": "s-ui-table__depth-footer-cell",
|
|
3228
3254
|
"content-class": "s-ui-table__depth-footer-content",
|
|
3229
|
-
"content-style":
|
|
3230
|
-
section:
|
|
3231
|
-
"row-key":
|
|
3255
|
+
"content-style": G(On)(n.depth),
|
|
3256
|
+
section: G($).BODY,
|
|
3257
|
+
"row-key": n.key,
|
|
3232
3258
|
"cell-id-prefix": hr,
|
|
3233
|
-
"focus-column-key": _r(
|
|
3259
|
+
"focus-column-key": _r(n.key)
|
|
3234
3260
|
}, {
|
|
3235
|
-
default:
|
|
3261
|
+
default: q(() => [V(t.$slots, "depth-footer", M({ ref_for: !0 }, G(An)(n)))]),
|
|
3236
3262
|
_: 2
|
|
3237
3263
|
}, 1032, [
|
|
3238
3264
|
"class",
|
|
@@ -3245,29 +3271,29 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
3245
3271
|
"section",
|
|
3246
3272
|
"row-key",
|
|
3247
3273
|
"focus-column-key"
|
|
3248
|
-
])) :
|
|
3274
|
+
])) : n && n.kind === G(Q).LOAD_MORE ? (R(), x(Ke, {
|
|
3249
3275
|
key: 3,
|
|
3250
3276
|
class: "s-ui-table__load-more-row",
|
|
3251
|
-
"data-index":
|
|
3252
|
-
"aria-rowindex":
|
|
3253
|
-
cells:
|
|
3254
|
-
"content-column-key":
|
|
3277
|
+
"data-index": n.index,
|
|
3278
|
+
"aria-rowindex": n.index + 2,
|
|
3279
|
+
cells: G(ke),
|
|
3280
|
+
"content-column-key": G(pn),
|
|
3255
3281
|
"content-class": "s-ui-table__load-more-content",
|
|
3256
|
-
"content-style":
|
|
3257
|
-
section:
|
|
3258
|
-
"row-key":
|
|
3282
|
+
"content-style": G(On)(n.depth),
|
|
3283
|
+
section: G($).BODY,
|
|
3284
|
+
"row-key": n.key,
|
|
3259
3285
|
"cell-id-prefix": hr,
|
|
3260
|
-
"focus-column-key": _r(
|
|
3286
|
+
"focus-column-key": _r(n.key)
|
|
3261
3287
|
}, {
|
|
3262
|
-
default:
|
|
3263
|
-
appearance:
|
|
3264
|
-
variant:
|
|
3265
|
-
size:
|
|
3266
|
-
loading:
|
|
3288
|
+
default: q(() => [V(t.$slots, "load-more", M({ ref_for: !0 }, G(Nn)(n)), () => [D(G(o), {
|
|
3289
|
+
appearance: G(i).BARE,
|
|
3290
|
+
variant: G(r).NEUTRAL,
|
|
3291
|
+
size: G(a).SMALL,
|
|
3292
|
+
loading: G(jn)(n),
|
|
3267
3293
|
tabindex: "-1",
|
|
3268
|
-
onClick: (e) =>
|
|
3294
|
+
onClick: (e) => G(Mn)(n)
|
|
3269
3295
|
}, {
|
|
3270
|
-
default:
|
|
3296
|
+
default: q(() => [E(U(G(L)("table.loadMore")), 1)]),
|
|
3271
3297
|
_: 1
|
|
3272
3298
|
}, 8, [
|
|
3273
3299
|
"appearance",
|
|
@@ -3286,72 +3312,73 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
3286
3312
|
"section",
|
|
3287
3313
|
"row-key",
|
|
3288
3314
|
"focus-column-key"
|
|
3289
|
-
])) :
|
|
3315
|
+
])) : n && v ? (R(), x(Mt, {
|
|
3290
3316
|
key: 4,
|
|
3291
|
-
"row-index":
|
|
3292
|
-
"row-key":
|
|
3293
|
-
cells:
|
|
3294
|
-
"row-height":
|
|
3317
|
+
"row-index": n.index,
|
|
3318
|
+
"row-key": n.key,
|
|
3319
|
+
cells: G(ke),
|
|
3320
|
+
"row-height": d
|
|
3295
3321
|
}, null, 8, [
|
|
3296
3322
|
"row-index",
|
|
3297
3323
|
"row-key",
|
|
3298
3324
|
"cells",
|
|
3299
3325
|
"row-height"
|
|
3300
|
-
])) :
|
|
3326
|
+
])) : n ? (R(), x(rn, {
|
|
3301
3327
|
key: 5,
|
|
3302
|
-
row:
|
|
3303
|
-
"row-index":
|
|
3304
|
-
"row-expanded":
|
|
3305
|
-
"leading-plans":
|
|
3306
|
-
"trailing-plans":
|
|
3307
|
-
"dnd-ref":
|
|
3308
|
-
dragging:
|
|
3309
|
-
"drop-position":
|
|
3310
|
-
"placeholder-height":
|
|
3311
|
-
"dom-id":
|
|
3312
|
-
selected:
|
|
3313
|
-
indeterminate:
|
|
3314
|
-
"row-selectable":
|
|
3315
|
-
active:
|
|
3316
|
-
disabled:
|
|
3317
|
-
"tree-indent":
|
|
3318
|
-
"row-state":
|
|
3319
|
-
"
|
|
3328
|
+
row: n,
|
|
3329
|
+
"row-index": n.index,
|
|
3330
|
+
"row-expanded": n.expanded,
|
|
3331
|
+
"leading-plans": G(Oe),
|
|
3332
|
+
"trailing-plans": G(Y),
|
|
3333
|
+
"dnd-ref": e.rowsDraggable ? ht : void 0,
|
|
3334
|
+
dragging: G(pt) === n.key,
|
|
3335
|
+
"drop-position": gt(n.key),
|
|
3336
|
+
"placeholder-height": d,
|
|
3337
|
+
"dom-id": on(n.key),
|
|
3338
|
+
selected: Xt(n.key),
|
|
3339
|
+
indeterminate: Zt(n.key),
|
|
3340
|
+
"row-selectable": e.selectable && G(Jt).isNodeSelectable(n.key),
|
|
3341
|
+
active: s.value === n.key,
|
|
3342
|
+
disabled: $t(n),
|
|
3343
|
+
"tree-indent": e.treeIndent,
|
|
3344
|
+
"row-state": e.rowState?.(n.item),
|
|
3345
|
+
"row-color": e.rowColor?.(n.item, n),
|
|
3346
|
+
"extra-row-class": e.rowClass?.(n.item, n),
|
|
3320
3347
|
"cell-id-prefix": hr,
|
|
3321
|
-
"focus-column-key": _r(
|
|
3322
|
-
onRowClick: (e) => or(
|
|
3323
|
-
onRowContextMenu: (e) => sr(
|
|
3324
|
-
onCellClick: (e, t) => lr(
|
|
3325
|
-
onToggleExpand: (e) =>
|
|
3326
|
-
onToggleSelected: (e) =>
|
|
3327
|
-
},
|
|
3328
|
-
|
|
3348
|
+
"focus-column-key": _r(n.key),
|
|
3349
|
+
onRowClick: (e) => or(n, e),
|
|
3350
|
+
onRowContextMenu: (e) => sr(n, e),
|
|
3351
|
+
onCellClick: (e, t) => lr(n, e, t),
|
|
3352
|
+
onToggleExpand: (e) => G(be)(n.key),
|
|
3353
|
+
onToggleSelected: (e) => Qt(n.key)
|
|
3354
|
+
}, T({ _: 2 }, [
|
|
3355
|
+
B(an.value, (e) => ({
|
|
3329
3356
|
name: e,
|
|
3330
|
-
fn:
|
|
3357
|
+
fn: q((n) => [V(t.$slots, e, M({ ref_for: !0 }, n))])
|
|
3331
3358
|
})),
|
|
3332
|
-
|
|
3359
|
+
G(I).chevron ? {
|
|
3333
3360
|
name: "chevron",
|
|
3334
|
-
fn:
|
|
3361
|
+
fn: q((e) => [V(t.$slots, "chevron", M({ ref_for: !0 }, e))]),
|
|
3335
3362
|
key: "0"
|
|
3336
3363
|
} : void 0,
|
|
3337
|
-
|
|
3364
|
+
G(I)["cell-actions"] ? {
|
|
3338
3365
|
name: "cell-actions",
|
|
3339
|
-
fn:
|
|
3366
|
+
fn: q((e) => [V(t.$slots, "cell-actions", M({ ref_for: !0 }, e))]),
|
|
3340
3367
|
key: "1"
|
|
3341
3368
|
} : void 0,
|
|
3342
|
-
|
|
3369
|
+
G(I).indicator ? {
|
|
3343
3370
|
name: "indicator",
|
|
3344
|
-
fn:
|
|
3371
|
+
fn: q((e) => [V(t.$slots, "indicator", M({ ref_for: !0 }, e))]),
|
|
3345
3372
|
key: "2"
|
|
3346
3373
|
} : void 0,
|
|
3347
|
-
|
|
3374
|
+
G(I).checkbox ? {
|
|
3348
3375
|
name: "checkbox",
|
|
3349
|
-
fn:
|
|
3376
|
+
fn: q((e) => [V(t.$slots, "checkbox", M({ ref_for: !0 }, e))]),
|
|
3350
3377
|
key: "3"
|
|
3351
3378
|
} : void 0,
|
|
3352
|
-
|
|
3379
|
+
G(I)["right-edge"] ? {
|
|
3353
3380
|
name: "right-edge",
|
|
3354
|
-
fn:
|
|
3381
|
+
fn: q((e) => [V(t.$slots, "right-edge", M({ ref_for: !0 }, e))]),
|
|
3355
3382
|
key: "4"
|
|
3356
3383
|
} : void 0
|
|
3357
3384
|
]), 1032, [
|
|
@@ -3372,6 +3399,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
3372
3399
|
"disabled",
|
|
3373
3400
|
"tree-indent",
|
|
3374
3401
|
"row-state",
|
|
3402
|
+
"row-color",
|
|
3375
3403
|
"extra-row-class",
|
|
3376
3404
|
"focus-column-key",
|
|
3377
3405
|
"onRowClick",
|
|
@@ -3379,32 +3407,32 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
3379
3407
|
"onCellClick",
|
|
3380
3408
|
"onToggleExpand",
|
|
3381
3409
|
"onToggleSelected"
|
|
3382
|
-
])) :
|
|
3383
|
-
return
|
|
3384
|
-
},
|
|
3385
|
-
|
|
3410
|
+
])) : S("", !0)], 64));
|
|
3411
|
+
return H.memo = z, H;
|
|
3412
|
+
}, n, 3), 128)),
|
|
3413
|
+
e.loadingMore && !e.loading ? (R(!0), C(y, { key: 3 }, B(Math.min(3, e.skeletonRowCount), (e) => (R(), x(sn, {
|
|
3386
3414
|
key: `skeleton-more-${e}`,
|
|
3387
|
-
"leading-plans":
|
|
3388
|
-
"trailing-plans":
|
|
3389
|
-
},
|
|
3415
|
+
"leading-plans": G(Oe),
|
|
3416
|
+
"trailing-plans": G(Y)
|
|
3417
|
+
}, T({ _: 2 }, [G(I)["skeleton-row"] ? {
|
|
3390
3418
|
name: "default",
|
|
3391
|
-
fn:
|
|
3419
|
+
fn: q((e) => [V(t.$slots, "skeleton-row", { column: e.descriptor.column })]),
|
|
3392
3420
|
key: "0"
|
|
3393
|
-
} : void 0]), 1032, ["leading-plans", "trailing-plans"]))), 128)) :
|
|
3421
|
+
} : void 0]), 1032, ["leading-plans", "trailing-plans"]))), 128)) : S("", !0)
|
|
3394
3422
|
]),
|
|
3395
|
-
|
|
3423
|
+
e.creationRow || e.footerValues ? (R(), C("tfoot", $n, [e.creationRow ? (R(), x(Ke, {
|
|
3396
3424
|
key: 0,
|
|
3397
3425
|
class: "s-ui-table__create-row",
|
|
3398
|
-
"aria-rowindex":
|
|
3399
|
-
cells:
|
|
3400
|
-
"content-column-key":
|
|
3426
|
+
"aria-rowindex": G(J).length + 2,
|
|
3427
|
+
cells: G(ke),
|
|
3428
|
+
"content-column-key": G(dn),
|
|
3401
3429
|
"cell-class": "s-ui-table__create-cell",
|
|
3402
3430
|
"content-class": "s-ui-table__create-content",
|
|
3403
|
-
section:
|
|
3431
|
+
section: G($).CREATION,
|
|
3404
3432
|
"cell-id-prefix": gr,
|
|
3405
|
-
"focus-column-key": vr(
|
|
3433
|
+
"focus-column-key": vr(G($).CREATION)
|
|
3406
3434
|
}, {
|
|
3407
|
-
default:
|
|
3435
|
+
default: q(() => [V(t.$slots, "creation-row")]),
|
|
3408
3436
|
_: 3
|
|
3409
3437
|
}, 8, [
|
|
3410
3438
|
"aria-rowindex",
|
|
@@ -3412,33 +3440,33 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
3412
3440
|
"content-column-key",
|
|
3413
3441
|
"section",
|
|
3414
3442
|
"focus-column-key"
|
|
3415
|
-
])) :
|
|
3443
|
+
])) : S("", !0), e.footerValues ? (R(), C("tr", {
|
|
3416
3444
|
key: 1,
|
|
3417
3445
|
class: "s-ui-table__aggregate-row",
|
|
3418
|
-
"aria-rowindex":
|
|
3419
|
-
}, [(
|
|
3446
|
+
"aria-rowindex": G(J).length + 2 + +!!e.creationRow
|
|
3447
|
+
}, [(R(!0), C(y, null, B(G(ke), ({ key: e, cellPlan: n }) => (R(), C(y, { key: e }, [n ? (R(), C("td", {
|
|
3420
3448
|
key: 1,
|
|
3421
3449
|
id: pr({
|
|
3422
|
-
section:
|
|
3423
|
-
columnKey:
|
|
3450
|
+
section: G($).AGGREGATE,
|
|
3451
|
+
columnKey: n.descriptor.key
|
|
3424
3452
|
}),
|
|
3425
|
-
class:
|
|
3426
|
-
style:
|
|
3427
|
-
"aria-colindex":
|
|
3428
|
-
"data-column-key":
|
|
3429
|
-
"data-section":
|
|
3430
|
-
tabindex: yr(
|
|
3431
|
-
}, [
|
|
3453
|
+
class: P(["s-ui-table__aggregate-cell", [n.cellClass, G(Fn)(n.descriptor.key)]]),
|
|
3454
|
+
style: F(n.style),
|
|
3455
|
+
"aria-colindex": n.descriptor.colIndex,
|
|
3456
|
+
"data-column-key": n.descriptor.key,
|
|
3457
|
+
"data-section": G($).AGGREGATE,
|
|
3458
|
+
tabindex: yr(G($).AGGREGATE, void 0, n.descriptor.key)
|
|
3459
|
+
}, [n.descriptor.column ? (R(), C(y, { key: 0 }, [G(I)[`footer:${n.descriptor.key}`] ? V(t.$slots, `footer:${n.descriptor.key}`, M({
|
|
3432
3460
|
key: 0,
|
|
3433
3461
|
ref_for: !0
|
|
3434
|
-
},
|
|
3435
|
-
], 44,
|
|
3462
|
+
}, G(ir)(n.descriptor.key))) : (R(), C("span", rr, U(G(Pn)(n.descriptor.key)), 1))], 64)) : S("", !0)], 14, nr)) : (R(), C("td", tr))], 64))), 128))], 8, er)) : S("", !0)])) : S("", !0)
|
|
3463
|
+
], 44, Ln)], 4), G(lt) ? (R(), C("div", {
|
|
3436
3464
|
key: 0,
|
|
3437
3465
|
class: "s-ui-table__column-drop-line",
|
|
3438
|
-
style:
|
|
3466
|
+
style: F(G(lt)),
|
|
3439
3467
|
"aria-hidden": "true"
|
|
3440
|
-
}, null, 4)) :
|
|
3468
|
+
}, null, 4)) : S("", !0)], 6));
|
|
3441
3469
|
}
|
|
3442
3470
|
});
|
|
3443
3471
|
//#endregion
|
|
3444
|
-
export {
|
|
3472
|
+
export { Y as a, je as c, Ae as d, Pe as f, ke 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 };
|