@baishuyun/ui-base 6.33.0 → 6.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AiRuntimeContainer/index.js +1 -2
- package/dist/Amap/index.js +1 -1
- package/dist/Calendar/{Calendar-BNC0RpwL.js → Calendar-Cx-sUiyk.js} +1 -1
- package/dist/Calendar/index.js +3 -3
- package/dist/Card/index.js +1 -1
- package/dist/CheckBox/index.js +1 -1
- package/dist/ColorPicker/index.js +1 -1
- package/dist/ConfigProvider/index.js +1 -1
- package/dist/DatePicker/{DatePicker-DbcRkKy7.js → DatePicker-DwlDV-_e.js} +1 -1
- package/dist/DatePicker/{DatePickerPanel-DJdjyTxg.js → DatePickerPanel-Ca8f-74-.js} +1 -1
- package/dist/DatePicker/index.js +2 -2
- package/dist/DropDown/{DropDown-Bb4dkd_c.js → DropDown-D97QGQpV.js} +1 -1
- package/dist/DropDown/index.js +3 -3
- package/dist/Editor/index.js +3 -3
- package/dist/FieldCard/FieldCard-CTrNTXFc.js +286 -0
- package/dist/FieldCard/index.js +4 -4
- package/dist/Gantt/index.js +31 -31
- package/dist/Icon/index.js +1 -1
- package/dist/InputTag/{InputTag-3sZTy2HT.js → InputTag-5NTrA5bA.js} +1 -1
- package/dist/InputTag/index.js +3 -3
- package/dist/Kanban/index.js +4 -4
- package/dist/Loading/index.js +1 -1
- package/dist/Modal/index.js +1 -1
- package/dist/NotFoundContent/index.js +1 -1
- package/dist/Overlay/index.js +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/ScrollBar/ScrollBar-DJ6DaHDb.js +98 -0
- package/dist/ScrollBar/index.js +2 -2
- package/dist/Segmented/index.js +1 -1
- package/dist/Select/{Select-Bio92QMl.js → Select-cIKwnIMD.js} +1 -1
- package/dist/Select/index.js +3 -3
- package/dist/Table/{Table-8JyKy6tq.js → Table-B7fDob3i.js} +310 -307
- package/dist/Table/index.js +2 -2
- package/dist/Tabs/index.js +1 -1
- package/dist/Tooltip/index.js +1 -1
- package/dist/Tree/index.js +1 -1
- package/dist/components/ScrollBar/interface.d.ts +8 -4
- package/dist/index.js +9 -9
- package/dist/utils/hasTextSelection.d.ts +3 -0
- package/dist/vendors/hasTextSelection-7Q4xY0kK.js +7 -0
- package/dist/vendors/{version-DJ_rbXnB.js → version-Di95Ubpo.js} +1 -1
- package/package.json +1 -1
- package/dist/FieldCard/FieldCard-BW1JOjtx.js +0 -282
- package/dist/ScrollBar/ScrollBar-B7R4brL_.js +0 -67
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { t as e } from "../Icon/Icon-CcKDWNGy.js";
|
|
2
2
|
import { t } from "../vendors/cssVars-BbL_cmFM.js";
|
|
3
3
|
import { t as n } from "../vendors/useLocale-DvhRopWF.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import y from "
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import { useVirtualizer as
|
|
4
|
+
import { t as r } from "../vendors/hasTextSelection-7Q4xY0kK.js";
|
|
5
|
+
import { LoadingOutlined as i } from "@ant-design/icons";
|
|
6
|
+
import { clamp as a, groupBy as o, sumBy as s } from "lodash-es";
|
|
7
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
+
import u, { forwardRef as d, memo as f, useCallback as p, useEffect as m, useImperativeHandle as h, useLayoutEffect as g, useMemo as _, useRef as v, useState as y } from "react";
|
|
9
|
+
import b from "clsx";
|
|
10
|
+
import { useEventListener as x, useLatest as S, useMemoizedFn as C, useSize as w } from "ahooks";
|
|
11
|
+
import { useVirtualizer as ee } from "@tanstack/react-virtual";
|
|
12
|
+
import { useOverlayScrollbars as T } from "overlayscrollbars-react";
|
|
12
13
|
//#region src/components/Table/constants.ts
|
|
13
14
|
var E = {
|
|
14
15
|
ROW_HEIGHT: 34,
|
|
@@ -41,20 +42,20 @@ var E = {
|
|
|
41
42
|
className: "bsy-row-height-auto",
|
|
42
43
|
height: "auto"
|
|
43
44
|
}
|
|
44
|
-
},
|
|
45
|
+
}, j = {
|
|
45
46
|
ASC: "asc",
|
|
46
47
|
DESC: "desc",
|
|
47
48
|
NONE: null
|
|
48
|
-
},
|
|
49
|
+
}, M = {
|
|
49
50
|
wrapper: "custom-table-wrapper",
|
|
50
51
|
body: "custom-table-body"
|
|
51
|
-
},
|
|
52
|
+
}, N = (e = []) => e.flatMap((e) => e.children?.length ? e.children : [e]), te = (e, t) => t.findIndex((t) => e.isParent ? t.parentKey === e.key : t.key === e.key), P = (e, t, n, r = k.DEFAULT_WIDTH) => s(n === "left" ? t.slice(0, e) : t.slice(e + 1), (e) => e.width || r), F = (e, t, n) => n !== "left" && n !== "right" ? null : {
|
|
52
53
|
position: "sticky",
|
|
53
54
|
[n]: P(e, t, n),
|
|
54
55
|
zIndex: 2
|
|
55
|
-
},
|
|
56
|
+
}, ne = (e, t, n, r) => {
|
|
56
57
|
if (!t || !n) return e;
|
|
57
|
-
let i = n ===
|
|
58
|
+
let i = n === j.DESC ? -1 : 1;
|
|
58
59
|
return [...e].sort((e, n) => {
|
|
59
60
|
let a = e[t], o = n[t];
|
|
60
61
|
return r ? r(a, o, e, n) * i : a === o ? 0 : a == null ? 1 : o == null ? -1 : typeof a == "string" && typeof o == "string" ? a.localeCompare(o) * i : (a < o ? -1 : 1) * i;
|
|
@@ -65,7 +66,7 @@ var E = {
|
|
|
65
66
|
if (typeof r == "string" || typeof r == "number") return r;
|
|
66
67
|
let i = e.uniqueId ?? e._id ?? e.id;
|
|
67
68
|
return typeof i == "string" || typeof i == "number" ? i : n;
|
|
68
|
-
},
|
|
69
|
+
}, re = (e) => {
|
|
69
70
|
let t = [], n = [], r = [];
|
|
70
71
|
return e.forEach((e, i) => {
|
|
71
72
|
let a = {
|
|
@@ -78,7 +79,7 @@ var E = {
|
|
|
78
79
|
normalColumns: n,
|
|
79
80
|
rightFixedColumns: r
|
|
80
81
|
};
|
|
81
|
-
}, L = (e, t = k.DEFAULT_WIDTH) =>
|
|
82
|
+
}, L = (e, t = k.DEFAULT_WIDTH) => s(e, (e) => e.children?.length ? s(e.children, (e) => e.width || t) : e.width || t), ie = (e, t) => {
|
|
82
83
|
if (Object.keys(t).length === 0) return e;
|
|
83
84
|
let n = (e) => {
|
|
84
85
|
let r = !1, i = e.map((e) => {
|
|
@@ -92,8 +93,8 @@ var E = {
|
|
|
92
93
|
return r ? i : e;
|
|
93
94
|
};
|
|
94
95
|
return n(e);
|
|
95
|
-
},
|
|
96
|
-
let n =
|
|
96
|
+
}, ae = (e, t) => {
|
|
97
|
+
let n = re(e), r = L(e);
|
|
97
98
|
return {
|
|
98
99
|
...n,
|
|
99
100
|
fixedLeftWidth: L(n.leftFixedColumns),
|
|
@@ -101,14 +102,14 @@ var E = {
|
|
|
101
102
|
totalColumnsWidth: r,
|
|
102
103
|
needSpacer: r < t
|
|
103
104
|
};
|
|
104
|
-
},
|
|
105
|
-
let u =
|
|
106
|
-
|
|
105
|
+
}, oe = Object.freeze({}), se = f(({ column: e, style: t = oe, className: n = "", onResizeStart: r, isResizing: i = !1, resizable: a = !0, colSpan: o = 1, rowSpan: s = 1 }) => {
|
|
106
|
+
let u = v(null), d = v(null);
|
|
107
|
+
m(() => () => {
|
|
107
108
|
d.current?.(), d.current = null;
|
|
108
109
|
}, []);
|
|
109
|
-
let
|
|
110
|
+
let f = p((e) => {
|
|
110
111
|
u.current?.triggerClick?.(e);
|
|
111
|
-
}, []), h =
|
|
112
|
+
}, []), h = p((t) => {
|
|
112
113
|
if (!a || !r) return;
|
|
113
114
|
t.preventDefault(), t.stopPropagation(), d.current?.();
|
|
114
115
|
let n = null, i = (e) => {
|
|
@@ -127,25 +128,25 @@ var E = {
|
|
|
127
128
|
a,
|
|
128
129
|
r
|
|
129
130
|
]), g = typeof e.header == "function" ? e.header(e, { menuRef: u }) : e.title;
|
|
130
|
-
return /* @__PURE__ */
|
|
131
|
+
return /* @__PURE__ */ l("th", {
|
|
131
132
|
className: `custom-table-header-cell ${n} `,
|
|
132
133
|
style: t,
|
|
133
134
|
colSpan: o > 1 ? o : void 0,
|
|
134
|
-
rowSpan:
|
|
135
|
-
onClick:
|
|
136
|
-
children: [/* @__PURE__ */
|
|
135
|
+
rowSpan: s > 1 ? s : void 0,
|
|
136
|
+
onClick: f,
|
|
137
|
+
children: [/* @__PURE__ */ c("div", {
|
|
137
138
|
className: "header-cell-content",
|
|
138
139
|
children: g
|
|
139
|
-
}), a ? /* @__PURE__ */
|
|
140
|
+
}), a ? /* @__PURE__ */ c("div", {
|
|
140
141
|
className: `resize-handle ${i ? "resizing" : ""}`,
|
|
141
142
|
onMouseDown: h
|
|
142
143
|
}) : null]
|
|
143
144
|
});
|
|
144
145
|
});
|
|
145
|
-
|
|
146
|
+
se.displayName = "HeaderCell";
|
|
146
147
|
//#endregion
|
|
147
148
|
//#region src/components/Table/utils/flattenColumns.ts
|
|
148
|
-
var
|
|
149
|
+
var R = (e) => {
|
|
149
150
|
let t = [], n = [], r = (e, i = 0, a = null) => {
|
|
150
151
|
t[i] || (t[i] = []), e.forEach((e) => {
|
|
151
152
|
let o = e.children, s = e.fixed || a || void 0;
|
|
@@ -195,9 +196,9 @@ var se = (e) => {
|
|
|
195
196
|
flatColumns: n,
|
|
196
197
|
headerRows: i
|
|
197
198
|
};
|
|
198
|
-
},
|
|
199
|
-
let p = e.some((e) => !!(e.children && e.children.length > 0)), { flatColumns: m, headerRows: h } =
|
|
200
|
-
if (p) return
|
|
199
|
+
}, ce = Object.freeze([]), z = Object.freeze([]), le = d(({ columns: e = ce, enableFixed: t = !1, height: n = E.HEADER_HEIGHT, resizingColumn: r = null, onResizeStart: i, resizable: a = !0, disabledResizeColumns: o = z, totalColumnsWidth: s = 0, needSpacer: u = !1, headerRowSpan: d = 1 }, f) => {
|
|
200
|
+
let p = e.some((e) => !!(e.children && e.children.length > 0)), { flatColumns: m, headerRows: h } = _(() => {
|
|
201
|
+
if (p) return R(e);
|
|
201
202
|
let t = Math.max(1, d || 1);
|
|
202
203
|
if (t > 1) {
|
|
203
204
|
let n = [e.map((e) => ({
|
|
@@ -220,7 +221,7 @@ var se = (e) => {
|
|
|
220
221
|
e,
|
|
221
222
|
p,
|
|
222
223
|
d
|
|
223
|
-
]),
|
|
224
|
+
]), g = _(() => new Set(o), [o]), v = _(() => {
|
|
224
225
|
let e = /* @__PURE__ */ new Map(), t = m.length - 1, n = /* @__PURE__ */ new Map();
|
|
225
226
|
m.forEach((e, t) => {
|
|
226
227
|
n.set(e.key, t);
|
|
@@ -230,7 +231,7 @@ var se = (e) => {
|
|
|
230
231
|
i.forEach((i) => {
|
|
231
232
|
if (r.has(i.key)) return;
|
|
232
233
|
r.add(i.key);
|
|
233
|
-
let a = i.isParent ? m.findIndex((e) => e.parentKey === i.key) : n.get(i.key) ?? -1, o = i.align || "left", s =
|
|
234
|
+
let a = i.isParent ? m.findIndex((e) => e.parentKey === i.key) : n.get(i.key) ?? -1, o = i.align || "left", s = g.has(i.key), c = {
|
|
234
235
|
textAlign: o,
|
|
235
236
|
...F(a, m, i.fixed)
|
|
236
237
|
}, l = `custom-table-header-cell ${i.className || ""}`.trim();
|
|
@@ -251,14 +252,14 @@ var se = (e) => {
|
|
|
251
252
|
}, [
|
|
252
253
|
m,
|
|
253
254
|
h,
|
|
254
|
-
|
|
255
|
+
g
|
|
255
256
|
]), y = (e) => {
|
|
256
257
|
let t = v.get(e.key) || {
|
|
257
258
|
style: { textAlign: e.align || "left" },
|
|
258
259
|
className: `custom-table-header-cell ${e.className || ""}`.trim(),
|
|
259
|
-
isDisabled:
|
|
260
|
+
isDisabled: g.has(e.key)
|
|
260
261
|
};
|
|
261
|
-
return /* @__PURE__ */
|
|
262
|
+
return /* @__PURE__ */ c(se, {
|
|
262
263
|
column: e,
|
|
263
264
|
style: t.style,
|
|
264
265
|
className: t.className,
|
|
@@ -269,25 +270,25 @@ var se = (e) => {
|
|
|
269
270
|
rowSpan: e.rowSpan
|
|
270
271
|
}, e.key);
|
|
271
272
|
};
|
|
272
|
-
return /* @__PURE__ */
|
|
273
|
+
return /* @__PURE__ */ c("div", {
|
|
273
274
|
ref: f,
|
|
274
275
|
className: "custom-table-header",
|
|
275
|
-
style:
|
|
276
|
-
let e = { minWidth:
|
|
276
|
+
style: _(() => {
|
|
277
|
+
let e = { minWidth: s };
|
|
277
278
|
return t && (e.position = "sticky", e.top = 0, e.zIndex = 11), e;
|
|
278
|
-
}, [t,
|
|
279
|
-
children: /* @__PURE__ */
|
|
279
|
+
}, [t, s]),
|
|
280
|
+
children: /* @__PURE__ */ l("table", {
|
|
280
281
|
style: {
|
|
281
282
|
tableLayout: "fixed",
|
|
282
|
-
minWidth:
|
|
283
|
-
width: u ? "100%" :
|
|
283
|
+
minWidth: s,
|
|
284
|
+
width: u ? "100%" : s
|
|
284
285
|
},
|
|
285
|
-
children: [/* @__PURE__ */
|
|
286
|
+
children: [/* @__PURE__ */ l("colgroup", { children: [m.map((e) => /* @__PURE__ */ c("col", { style: { width: e.width || k.DEFAULT_WIDTH } }, e.key)), u ? /* @__PURE__ */ c("col", {
|
|
286
287
|
className: "spacer-col",
|
|
287
288
|
style: { width: "auto" }
|
|
288
|
-
}) : null] }), /* @__PURE__ */
|
|
289
|
+
}) : null] }), /* @__PURE__ */ c("thead", { children: h.map((e, t) => e.length === 0 ? /* @__PURE__ */ c("tr", { style: { height: n } }, t) : /* @__PURE__ */ l("tr", {
|
|
289
290
|
style: { height: p || d > 1 ? n : "auto" },
|
|
290
|
-
children: [e.map((e) => y(e)), u && t === 0 ? /* @__PURE__ */
|
|
291
|
+
children: [e.map((e) => y(e)), u && t === 0 ? /* @__PURE__ */ c("th", {
|
|
291
292
|
className: "custom-table-header-cell spacer-cell",
|
|
292
293
|
rowSpan: h.length
|
|
293
294
|
}) : null]
|
|
@@ -295,8 +296,8 @@ var se = (e) => {
|
|
|
295
296
|
})
|
|
296
297
|
});
|
|
297
298
|
});
|
|
298
|
-
|
|
299
|
-
var
|
|
299
|
+
le.displayName = "TableHeader";
|
|
300
|
+
var ue = f(le), de = (e, t) => {
|
|
300
301
|
let n = t.name, r = t.children || [], i = 0;
|
|
301
302
|
for (let t = 0; t < e.length; t++) {
|
|
302
303
|
let a = e[t], o = Object.keys(a);
|
|
@@ -306,7 +307,7 @@ var le = d(z), ue = (e, t) => {
|
|
|
306
307
|
}) && (i = t + 1);
|
|
307
308
|
}
|
|
308
309
|
return i;
|
|
309
|
-
},
|
|
310
|
+
}, fe = (e, t, n = "_id") => {
|
|
310
311
|
if (!e || e.length === 0) return [];
|
|
311
312
|
let r = t.filter((e) => !!(e.children && e.children.length > 0));
|
|
312
313
|
if (r.length === 0) return e.map((e) => ({
|
|
@@ -314,28 +315,28 @@ var le = d(z), ue = (e, t) => {
|
|
|
314
315
|
_rowspan: {},
|
|
315
316
|
_showMainFields: !0
|
|
316
317
|
}));
|
|
317
|
-
let i =
|
|
318
|
+
let i = o(e, (e) => String(e[n] || e._id || e.id)), a = {};
|
|
318
319
|
Object.entries(i).forEach(([e, t]) => {
|
|
319
320
|
let n = {};
|
|
320
321
|
r.forEach((e) => {
|
|
321
|
-
n[e.name] =
|
|
322
|
-
}),
|
|
322
|
+
n[e.name] = de(t, e);
|
|
323
|
+
}), a[e] = {
|
|
323
324
|
groupSize: t.length,
|
|
324
325
|
subformRowCounts: n
|
|
325
326
|
};
|
|
326
327
|
});
|
|
327
328
|
let s = [], c = {};
|
|
328
329
|
return e.forEach((e) => {
|
|
329
|
-
let t = String(e[n] || e._id || e.id), i =
|
|
330
|
-
c[t] =
|
|
331
|
-
let l =
|
|
330
|
+
let t = String(e[n] || e._id || e.id), i = a[t], o = c[t] ?? 0;
|
|
331
|
+
c[t] = o + 1;
|
|
332
|
+
let l = o === 0, u = {};
|
|
332
333
|
r.forEach((e) => {
|
|
333
334
|
u[e.key] = l ? i.groupSize : 0;
|
|
334
335
|
}), u._mainFields = l ? i.groupSize : 0, s.push({
|
|
335
336
|
...e,
|
|
336
337
|
_rowspan: u,
|
|
337
338
|
_showMainFields: l,
|
|
338
|
-
_groupIndex:
|
|
339
|
+
_groupIndex: o,
|
|
339
340
|
_groupSize: i.groupSize,
|
|
340
341
|
_subformRowCounts: i.subformRowCounts
|
|
341
342
|
});
|
|
@@ -352,10 +353,10 @@ var le = d(z), ue = (e, t) => {
|
|
|
352
353
|
}
|
|
353
354
|
return 1;
|
|
354
355
|
}, V = (e, t) => B(e, t) > 0, H = (e, t, n) => {
|
|
355
|
-
let r =
|
|
356
|
+
let r = te(e, t), i = e.align || "left", a = F(r, t, n);
|
|
356
357
|
return {
|
|
357
358
|
column: e,
|
|
358
|
-
className:
|
|
359
|
+
className: b("custom-table-cell", {
|
|
359
360
|
first: r === 0,
|
|
360
361
|
last: r >= 0 && r === t.length - 1,
|
|
361
362
|
fixed: !!n
|
|
@@ -365,8 +366,8 @@ var le = d(z), ue = (e, t) => {
|
|
|
365
366
|
...a
|
|
366
367
|
}
|
|
367
368
|
};
|
|
368
|
-
}, U = Object.freeze([]),
|
|
369
|
-
let T =
|
|
369
|
+
}, U = Object.freeze([]), pe = Object.freeze([]), me = ({ leftFixedColumns: e = U, normalColumns: t = U, rightFixedColumns: n = U, dataSource: i = pe, rowKey: a = "id", rowHeight: o = E.ROW_HEIGHT, emptyText: s, onRowClick: u, onRow: d, onCell: f, totalColumnsWidth: m = 0, needSpacer: h = !1, rowRefCallback: g, isDynamicHeight: v = !1, emptyRowContent: y, showEmptyRow: x = !0, startVirtualIndex: S, hideWhenEmpty: C = !1, wrapperClassName: w, forceRowHeight: ee = !1 }) => {
|
|
370
|
+
let T = _(() => N(e), [e]), D = _(() => N(t), [t]), O = _(() => N(n), [n]), A = _(() => [
|
|
370
371
|
...T,
|
|
371
372
|
...D,
|
|
372
373
|
...O
|
|
@@ -374,7 +375,7 @@ var le = d(z), ue = (e, t) => {
|
|
|
374
375
|
T,
|
|
375
376
|
D,
|
|
376
377
|
O
|
|
377
|
-
]),
|
|
378
|
+
]), j = _(() => {
|
|
378
379
|
let e = T.map((e) => H(e, A, "left")), t = D.map((e) => H(e, A, void 0)), n = O.map((e) => H(e, A, "right"));
|
|
379
380
|
return [
|
|
380
381
|
...e,
|
|
@@ -386,62 +387,62 @@ var le = d(z), ue = (e, t) => {
|
|
|
386
387
|
T,
|
|
387
388
|
D,
|
|
388
389
|
O
|
|
389
|
-
]),
|
|
390
|
-
e &&
|
|
391
|
-
}, [
|
|
390
|
+
]), M = p((e) => {
|
|
391
|
+
e && g && g(e);
|
|
392
|
+
}, [g]), te = (e, t, n) => {
|
|
392
393
|
let { column: r, className: i, style: a } = e;
|
|
393
394
|
if (!V(t, r)) return null;
|
|
394
|
-
let o = B(t, r),
|
|
395
|
-
if (
|
|
396
|
-
let e =
|
|
395
|
+
let o = B(t, r), s = r.dataIndex ? t[r.dataIndex] : void 0, l = r.render && typeof r.render == "function" ? r.render(s, t, n) : s, u, d = i, p = a;
|
|
396
|
+
if (f && typeof f == "function") {
|
|
397
|
+
let e = f(s, t, r, n, {
|
|
397
398
|
className: i,
|
|
398
399
|
style: a
|
|
399
400
|
});
|
|
400
|
-
e && (u = e, e.className && e.className !== i && (
|
|
401
|
+
e && (u = e, e.className && e.className !== i && (d = `${i} ${e.className}`.trim()), e.style && e.style !== a && (p = {
|
|
401
402
|
...a,
|
|
402
403
|
...e.style
|
|
403
404
|
}));
|
|
404
405
|
}
|
|
405
|
-
return /* @__PURE__ */
|
|
406
|
-
className:
|
|
406
|
+
return /* @__PURE__ */ c("td", {
|
|
407
|
+
className: d,
|
|
407
408
|
style: p,
|
|
408
409
|
rowSpan: o > 1 ? o : void 0,
|
|
409
410
|
...u,
|
|
410
|
-
children: /* @__PURE__ */
|
|
411
|
-
className:
|
|
411
|
+
children: /* @__PURE__ */ c("div", {
|
|
412
|
+
className: b("cell-content", r.align),
|
|
412
413
|
children: l
|
|
413
414
|
})
|
|
414
415
|
}, r.key);
|
|
415
416
|
};
|
|
416
|
-
if (
|
|
417
|
-
let P = () =>
|
|
417
|
+
if (C && i.length === 0) return null;
|
|
418
|
+
let P = () => y ?? /* @__PURE__ */ c("tr", {
|
|
418
419
|
className: "custom-table-empty-row",
|
|
419
|
-
children: /* @__PURE__ */
|
|
420
|
-
colSpan: A.length + (
|
|
420
|
+
children: /* @__PURE__ */ c("td", {
|
|
421
|
+
colSpan: A.length + (h ? 1 : 0),
|
|
421
422
|
style: {
|
|
422
423
|
textAlign: "center",
|
|
423
424
|
padding: "20px",
|
|
424
425
|
color: "#999"
|
|
425
426
|
},
|
|
426
|
-
children:
|
|
427
|
+
children: s
|
|
427
428
|
})
|
|
428
|
-
}), F =
|
|
429
|
-
return /* @__PURE__ */
|
|
430
|
-
className:
|
|
431
|
-
style: { minWidth:
|
|
432
|
-
children: /* @__PURE__ */
|
|
429
|
+
}), F = ee || !v;
|
|
430
|
+
return /* @__PURE__ */ c("div", {
|
|
431
|
+
className: b("custom-table-body", w),
|
|
432
|
+
style: { minWidth: m },
|
|
433
|
+
children: /* @__PURE__ */ l("table", {
|
|
433
434
|
style: {
|
|
434
435
|
tableLayout: "fixed",
|
|
435
|
-
minWidth:
|
|
436
|
-
width:
|
|
436
|
+
minWidth: m,
|
|
437
|
+
width: h ? "100%" : m
|
|
437
438
|
},
|
|
438
|
-
children: [/* @__PURE__ */
|
|
439
|
+
children: [/* @__PURE__ */ l("colgroup", { children: [A.map((e) => /* @__PURE__ */ c("col", { style: { width: e.width || k.DEFAULT_WIDTH } }, e.key)), h ? /* @__PURE__ */ c("col", {
|
|
439
440
|
className: "spacer-col",
|
|
440
441
|
style: { width: "auto" }
|
|
441
|
-
}) : null] }), /* @__PURE__ */
|
|
442
|
+
}) : null] }), /* @__PURE__ */ c("tbody", { children: i.length === 0 ? x ? P() : null : i.map((e, t) => {
|
|
442
443
|
let n = {};
|
|
443
|
-
if (
|
|
444
|
-
let r =
|
|
444
|
+
if (d && typeof d == "function") {
|
|
445
|
+
let r = d(e, t, {
|
|
445
446
|
className: "",
|
|
446
447
|
style: {}
|
|
447
448
|
}) || {};
|
|
@@ -451,26 +452,28 @@ var le = d(z), ue = (e, t) => {
|
|
|
451
452
|
...r
|
|
452
453
|
};
|
|
453
454
|
}
|
|
454
|
-
let
|
|
455
|
-
return /* @__PURE__ */
|
|
456
|
-
ref:
|
|
455
|
+
let i = typeof S == "number" ? S + t : typeof e.dataIndex == "number" ? e.dataIndex : t;
|
|
456
|
+
return /* @__PURE__ */ l("tr", {
|
|
457
|
+
ref: v ? M : void 0,
|
|
457
458
|
style: {
|
|
458
|
-
height: F ?
|
|
459
|
+
height: F ? o : "auto",
|
|
459
460
|
...n.style
|
|
460
461
|
},
|
|
461
|
-
className:
|
|
462
|
-
onClick:
|
|
463
|
-
|
|
462
|
+
className: b("custom-table-row", n.className),
|
|
463
|
+
onClick: u ? (n) => {
|
|
464
|
+
r(n.currentTarget) || u(e, t, n);
|
|
465
|
+
} : void 0,
|
|
466
|
+
"data-index": v ? i : void 0,
|
|
464
467
|
...n,
|
|
465
|
-
children: [
|
|
466
|
-
}, I(e,
|
|
468
|
+
children: [j.map((n) => te(n, e, t)), h ? /* @__PURE__ */ c("td", { className: "spacer-cell" }) : null]
|
|
469
|
+
}, I(e, a, t));
|
|
467
470
|
}) })]
|
|
468
471
|
})
|
|
469
472
|
});
|
|
470
473
|
};
|
|
471
|
-
|
|
472
|
-
var
|
|
473
|
-
let d =
|
|
474
|
+
me.displayName = "TableBody";
|
|
475
|
+
var he = f(me), ge = Object.freeze([]), _e = Object.freeze({}), W = ({ leftFixedColumns: e = ge, normalColumns: t = ge, rightFixedColumns: n = ge, footerData: r = _e, summary: i, render: a, enableFixed: o = !0, totalColumnsWidth: s = 0, needSpacer: u = !1 }) => {
|
|
476
|
+
let d = _(() => N(e), [e]), f = _(() => N(t), [t]), p = _(() => N(n), [n]), m = _(() => [
|
|
474
477
|
...d,
|
|
475
478
|
...f,
|
|
476
479
|
...p
|
|
@@ -478,7 +481,7 @@ var me = d(pe), he = Object.freeze([]), ge = Object.freeze({}), _e = ({ leftFixe
|
|
|
478
481
|
d,
|
|
479
482
|
f,
|
|
480
483
|
p
|
|
481
|
-
]), h =
|
|
484
|
+
]), h = _(() => {
|
|
482
485
|
let e = /* @__PURE__ */ new Map();
|
|
483
486
|
return m.forEach((t, n) => {
|
|
484
487
|
let r = { textAlign: t.align || "left" }, i = "custom-table-footer-cell";
|
|
@@ -494,70 +497,70 @@ var me = d(pe), he = Object.freeze([]), ge = Object.freeze({}), _e = ({ leftFixe
|
|
|
494
497
|
cellClassName: i
|
|
495
498
|
});
|
|
496
499
|
}), e;
|
|
497
|
-
}, [m, o]),
|
|
498
|
-
let t = (e.dataIndex ? r?.[e.dataIndex] : void 0) ?? i?.[e.key], { renderFooter: n } = e, o = n && typeof n == "function" ? n(t, e) : a && typeof a == "function" ? a(t, e) : t,
|
|
500
|
+
}, [m, o]), g = (e) => {
|
|
501
|
+
let t = (e.dataIndex ? r?.[e.dataIndex] : void 0) ?? i?.[e.key], { renderFooter: n } = e, o = n && typeof n == "function" ? n(t, e) : a && typeof a == "function" ? a(t, e) : t, s = h.get(e.key) || {
|
|
499
502
|
cellStyle: { textAlign: e.align || "left" },
|
|
500
503
|
cellClassName: "custom-table-footer-cell"
|
|
501
504
|
};
|
|
502
|
-
return /* @__PURE__ */
|
|
503
|
-
className:
|
|
504
|
-
style:
|
|
505
|
-
children: /* @__PURE__ */
|
|
505
|
+
return /* @__PURE__ */ c("td", {
|
|
506
|
+
className: s.cellClassName,
|
|
507
|
+
style: s.cellStyle,
|
|
508
|
+
children: /* @__PURE__ */ c("div", {
|
|
506
509
|
className: "cell-content",
|
|
507
510
|
children: o
|
|
508
511
|
})
|
|
509
512
|
}, e.key);
|
|
510
513
|
};
|
|
511
|
-
return /* @__PURE__ */
|
|
514
|
+
return /* @__PURE__ */ c("div", {
|
|
512
515
|
className: "custom-table-footer",
|
|
513
|
-
style:
|
|
514
|
-
let e = { minWidth:
|
|
516
|
+
style: _(() => {
|
|
517
|
+
let e = { minWidth: s };
|
|
515
518
|
return o && (e.position = "sticky", e.bottom = 0, e.zIndex = 10), e;
|
|
516
|
-
}, [o,
|
|
517
|
-
children: /* @__PURE__ */
|
|
519
|
+
}, [o, s]),
|
|
520
|
+
children: /* @__PURE__ */ l("table", {
|
|
518
521
|
style: {
|
|
519
522
|
tableLayout: "fixed",
|
|
520
|
-
minWidth:
|
|
521
|
-
width: u ? "100%" :
|
|
523
|
+
minWidth: s,
|
|
524
|
+
width: u ? "100%" : s
|
|
522
525
|
},
|
|
523
|
-
children: [/* @__PURE__ */
|
|
526
|
+
children: [/* @__PURE__ */ l("colgroup", { children: [m.map((e) => /* @__PURE__ */ c("col", { style: { width: e.width || k.DEFAULT_WIDTH } }, e.key)), u ? /* @__PURE__ */ c("col", {
|
|
524
527
|
className: "spacer-col",
|
|
525
528
|
style: { width: "auto" }
|
|
526
|
-
}) : null] }), /* @__PURE__ */
|
|
527
|
-
d.map((e) =>
|
|
528
|
-
f.map((e) =>
|
|
529
|
-
p.map((e) =>
|
|
530
|
-
u ? /* @__PURE__ */
|
|
529
|
+
}) : null] }), /* @__PURE__ */ c("tfoot", { children: /* @__PURE__ */ l("tr", { children: [
|
|
530
|
+
d.map((e) => g(e)),
|
|
531
|
+
f.map((e) => g(e)),
|
|
532
|
+
p.map((e) => g(e)),
|
|
533
|
+
u ? /* @__PURE__ */ c("td", { className: "spacer-cell" }) : null
|
|
531
534
|
] }) })]
|
|
532
535
|
})
|
|
533
536
|
});
|
|
534
537
|
};
|
|
535
|
-
|
|
536
|
-
var ve =
|
|
537
|
-
function
|
|
538
|
-
let r =
|
|
539
|
-
let t = r.current ?? [], n =
|
|
538
|
+
W.displayName = "TableFooter";
|
|
539
|
+
var ve = f(W), ye = [];
|
|
540
|
+
function be(e, t, n) {
|
|
541
|
+
let r = S(e), i = S(t.estimateSize), o = t.rowHeight, s = t.minRowHeight || D.MIN_HEIGHT, c = t.maxRowHeight || D.MAX_HEIGHT, l = p((e) => {
|
|
542
|
+
let t = r.current ?? [], n = i.current;
|
|
540
543
|
if (typeof n == "function") return n(e, t[e]);
|
|
541
544
|
let l = t[e];
|
|
542
|
-
return l && typeof l.rowHeight == "number" ?
|
|
545
|
+
return l && typeof l.rowHeight == "number" ? a(l.rowHeight, s, c) : o === "auto" ? D.MIN_HEIGHT : typeof o == "function" ? a(o(e), s, c) : typeof o == "number" ? a(o, s, c) : D.MIN_HEIGHT;
|
|
543
546
|
}, [
|
|
544
547
|
o,
|
|
545
548
|
s,
|
|
546
549
|
c,
|
|
547
|
-
|
|
550
|
+
i,
|
|
548
551
|
r
|
|
549
|
-
]), u = t.enabled ?? e.length > O.ENABLE_AUTO_SIZE, d = t.dynamicHeight ?? o === "auto",
|
|
552
|
+
]), u = t.enabled ?? e.length > O.ENABLE_AUTO_SIZE, d = t.dynamicHeight ?? o === "auto", f = v(/* @__PURE__ */ new Map()), h = v(null), g = _(() => {
|
|
550
553
|
if (e.length === 0) return null;
|
|
551
554
|
let n = I(e[0], t.rowKey, 0), r = I(e[e.length - 1], t.rowKey, e.length - 1);
|
|
552
555
|
return `${String(n)}-${String(r)}-${e.length}`;
|
|
553
556
|
}, [e, t.rowKey]);
|
|
554
|
-
|
|
555
|
-
let e =
|
|
557
|
+
m(() => {
|
|
558
|
+
let e = f.current;
|
|
556
559
|
return () => {
|
|
557
560
|
e.clear();
|
|
558
561
|
};
|
|
559
562
|
}, []);
|
|
560
|
-
let y =
|
|
563
|
+
let y = p((e) => I((r.current ?? [])[e], t.rowKey, e), [t.rowKey, r]), b = ee({
|
|
561
564
|
count: u ? e.length : 0,
|
|
562
565
|
getScrollElement: () => n.current,
|
|
563
566
|
estimateSize: l,
|
|
@@ -566,24 +569,24 @@ function ye(e, t, n) {
|
|
|
566
569
|
measureElement: d ? (e) => {
|
|
567
570
|
let t = e.getAttribute("data-index");
|
|
568
571
|
if (!t) return D.MIN_HEIGHT;
|
|
569
|
-
let n =
|
|
572
|
+
let n = f.current, r = n.get(t);
|
|
570
573
|
if (r !== void 0) return r;
|
|
571
574
|
let i = e.getBoundingClientRect().height, a = Math.max(D.MIN_HEIGHT, i);
|
|
572
575
|
return n.set(t, a), a;
|
|
573
576
|
} : void 0,
|
|
574
577
|
getItemKey: y
|
|
575
578
|
});
|
|
576
|
-
|
|
577
|
-
h.current !== null && h.current !==
|
|
578
|
-
}, [
|
|
579
|
-
let
|
|
580
|
-
|
|
581
|
-
}),
|
|
579
|
+
m(() => {
|
|
580
|
+
h.current !== null && h.current !== g && (f.current.clear(), typeof b.measure == "function" && b.measure()), h.current = g;
|
|
581
|
+
}, [g, b]);
|
|
582
|
+
let x = u ? b.getTotalSize() : 0, w = u ? b.getVirtualItems() : ye, T = u && w.length > 0 && w[0].start || 0, E = u && w.length > 0 ? x - (w[w.length - 1].end || 0) : 0, k = C(() => {
|
|
583
|
+
f.current.clear(), typeof b.measure == "function" && b.measure();
|
|
584
|
+
}), A = C((e) => {
|
|
582
585
|
if (e === void 0) {
|
|
583
|
-
|
|
586
|
+
f.current.clear(), typeof b.measure == "function" && b.measure();
|
|
584
587
|
return;
|
|
585
588
|
}
|
|
586
|
-
let n = Array.isArray(e) ? e : [e], i =
|
|
589
|
+
let n = Array.isArray(e) ? e : [e], i = f.current, a = r.current ?? [];
|
|
587
590
|
n.forEach((e) => {
|
|
588
591
|
if (typeof e == "number") i.delete(String(e));
|
|
589
592
|
else {
|
|
@@ -596,15 +599,15 @@ function ye(e, t, n) {
|
|
|
596
599
|
enabled: u,
|
|
597
600
|
virtualRows: w,
|
|
598
601
|
rowRefCallback: b.measureElement,
|
|
599
|
-
totalHeight:
|
|
600
|
-
paddingTop:
|
|
601
|
-
paddingBottom:
|
|
602
|
-
remeasure:
|
|
603
|
-
clearRowHeightCache:
|
|
602
|
+
totalHeight: x,
|
|
603
|
+
paddingTop: T,
|
|
604
|
+
paddingBottom: E,
|
|
605
|
+
remeasure: k,
|
|
606
|
+
clearRowHeightCache: A,
|
|
604
607
|
isDynamicHeight: d
|
|
605
608
|
};
|
|
606
609
|
}
|
|
607
|
-
function
|
|
610
|
+
function xe(e, t, n, r) {
|
|
608
611
|
let i = n ? t.flatMap((t) => {
|
|
609
612
|
let n = e[t.index];
|
|
610
613
|
return n ? [{
|
|
@@ -619,21 +622,21 @@ function be(e, t, n, r) {
|
|
|
619
622
|
}
|
|
620
623
|
//#endregion
|
|
621
624
|
//#region src/components/Table/hooks/useColumnResize.ts
|
|
622
|
-
function
|
|
623
|
-
let { minColumnWidth: t = k.MIN_WIDTH, maxColumnWidth: n = k.MAX_WIDTH, onColumnResize: r, onColumnResizeEnd:
|
|
625
|
+
function Se(e = {}) {
|
|
626
|
+
let { minColumnWidth: t = k.MIN_WIDTH, maxColumnWidth: n = k.MAX_WIDTH, onColumnResize: r, onColumnResizeEnd: i } = e, [o, s] = y(null), c = S(o), l = S(r), u = S(i), d = C((e, t, n) => {
|
|
624
627
|
s({
|
|
625
628
|
columnKey: e,
|
|
626
629
|
startWidth: t,
|
|
627
630
|
startX: n
|
|
628
631
|
});
|
|
629
|
-
}), f = (e, r) => Math.round(
|
|
630
|
-
return
|
|
632
|
+
}), f = (e, r) => Math.round(a(r.startWidth + e - r.startX, t, n));
|
|
633
|
+
return x("mousemove", (e) => {
|
|
631
634
|
let t = c.current;
|
|
632
635
|
t && l.current?.(e, t.columnKey, f(e.clientX, t));
|
|
633
636
|
}, {
|
|
634
637
|
target: document,
|
|
635
638
|
enable: !!o
|
|
636
|
-
}),
|
|
639
|
+
}), x("mouseup", (e) => {
|
|
637
640
|
let t = c.current;
|
|
638
641
|
t && (u.current?.(t.columnKey, f(e.clientX, t)), s(null));
|
|
639
642
|
}, {
|
|
@@ -647,10 +650,10 @@ function G(e = {}) {
|
|
|
647
650
|
}
|
|
648
651
|
//#endregion
|
|
649
652
|
//#region src/components/Table/hooks/useTableColumnWidths.ts
|
|
650
|
-
var
|
|
651
|
-
function
|
|
652
|
-
let o =
|
|
653
|
-
|
|
653
|
+
var Ce = {};
|
|
654
|
+
function we({ columns: e, scrollRef: t, minColumnWidth: n, maxColumnWidth: r, onColumnResize: i, onColumnResizeEnd: a }) {
|
|
655
|
+
let o = v(null), s = v(/* @__PURE__ */ new Map()), c = v(/* @__PURE__ */ new Map()), l = v(null), [u, d] = y(Ce), f = _(() => N(e), [e]), p = _(() => ie(e, u), [e, u]), h = _(() => N(p), [p]);
|
|
656
|
+
m(() => {
|
|
654
657
|
let e = c.current, t = /* @__PURE__ */ new Map();
|
|
655
658
|
for (let e of f) t.set(e.key, e.width || k.DEFAULT_WIDTH);
|
|
656
659
|
d((n) => {
|
|
@@ -674,49 +677,49 @@ function Se({ columns: e, scrollRef: t, minColumnWidth: n, maxColumnWidth: r, on
|
|
|
674
677
|
}
|
|
675
678
|
c.current = t;
|
|
676
679
|
}, [f]);
|
|
677
|
-
let
|
|
680
|
+
let g = C((e) => s.current.get(e.key) || e.width || k.DEFAULT_WIDTH), b = C((e) => {
|
|
678
681
|
let n = h.findIndex((t) => t.key === e);
|
|
679
682
|
if (n === -1) return 0;
|
|
680
683
|
let r = h[n], i = 0;
|
|
681
|
-
for (let e = 0; e <= n; e++) i +=
|
|
684
|
+
for (let e = 0; e <= n; e++) i += g(h[e]);
|
|
682
685
|
return r.fixed === "left" ? i : i - (t.current?.scrollLeft || 0);
|
|
683
|
-
}), x =
|
|
686
|
+
}), x = C((e) => {
|
|
684
687
|
o.current && (o.current.style.display = "block", o.current.style.left = `${e}px`);
|
|
685
|
-
}),
|
|
688
|
+
}), S = C((e, t) => {
|
|
686
689
|
s.current.set(e, t), d((n) => n[e] === t ? n : {
|
|
687
690
|
...n,
|
|
688
691
|
[e]: t
|
|
689
692
|
});
|
|
690
|
-
}), { isResizing: w, resizingColumn:
|
|
693
|
+
}), { isResizing: w, resizingColumn: ee, startResize: T } = Se({
|
|
691
694
|
minColumnWidth: n || k.MIN_WIDTH,
|
|
692
695
|
maxColumnWidth: r || k.MAX_WIDTH,
|
|
693
|
-
onColumnResizeEnd:
|
|
694
|
-
l.current = null,
|
|
696
|
+
onColumnResizeEnd: C((e, t) => {
|
|
697
|
+
l.current = null, S(e, t), a?.(e, t, s.current), o.current && (o.current.style.display = "none");
|
|
695
698
|
}),
|
|
696
|
-
onColumnResize:
|
|
699
|
+
onColumnResize: C((e, t, n) => {
|
|
697
700
|
let r = l.current;
|
|
698
701
|
!r || r.columnKey !== t || (x(r.left + n - r.startWidth), i?.(t, n, s.current));
|
|
699
702
|
})
|
|
700
703
|
});
|
|
701
704
|
return {
|
|
702
|
-
sizedColumns:
|
|
705
|
+
sizedColumns: p,
|
|
703
706
|
flatColumns: h,
|
|
704
707
|
isResizing: w,
|
|
705
|
-
resizingColumn:
|
|
706
|
-
handleResizeStart:
|
|
708
|
+
resizingColumn: ee,
|
|
709
|
+
handleResizeStart: C((e, t, n) => {
|
|
707
710
|
let r = b(e);
|
|
708
711
|
l.current = {
|
|
709
712
|
columnKey: e,
|
|
710
713
|
left: r,
|
|
711
714
|
startWidth: t
|
|
712
|
-
}, x(r),
|
|
715
|
+
}, x(r), T(e, t, n);
|
|
713
716
|
}),
|
|
714
717
|
resizeHandleRef: o
|
|
715
718
|
};
|
|
716
719
|
}
|
|
717
720
|
//#endregion
|
|
718
721
|
//#region src/components/Table/hooks/useTableViewport.ts
|
|
719
|
-
var
|
|
722
|
+
var Te = {
|
|
720
723
|
elementWidth: 0,
|
|
721
724
|
viewportClientHeight: 0,
|
|
722
725
|
scrollOffset: {
|
|
@@ -726,8 +729,8 @@ var Ce = {
|
|
|
726
729
|
headerHeight: E.HEADER_HEIGHT,
|
|
727
730
|
hasYScroll: !1
|
|
728
731
|
};
|
|
729
|
-
function
|
|
730
|
-
let s =
|
|
732
|
+
function Ee({ scrollRef: e, tableHeaderRef: t, bordered: n, hasFooter: r, headerRowSpan: i, dataSourceLength: a, overlayScrollbarOptions: o }) {
|
|
733
|
+
let s = w(e), c = s?.height ?? 0, [l, u] = y(Te), [d] = T({ options: {
|
|
731
734
|
overflow: {
|
|
732
735
|
x: o?.overflowX ?? "scroll",
|
|
733
736
|
y: o?.overflowY ?? "scroll"
|
|
@@ -738,14 +741,14 @@ function we({ scrollRef: e, tableHeaderRef: t, bordered: n, hasFooter: r, header
|
|
|
738
741
|
autoHideDelay: 400
|
|
739
742
|
}
|
|
740
743
|
} });
|
|
741
|
-
|
|
744
|
+
g(() => {
|
|
742
745
|
if (!e.current) return;
|
|
743
746
|
let t = e.current, n = t.parentElement;
|
|
744
747
|
n && d({
|
|
745
748
|
target: n,
|
|
746
749
|
elements: { viewport: t }
|
|
747
750
|
});
|
|
748
|
-
}, [d, e]),
|
|
751
|
+
}, [d, e]), g(() => {
|
|
749
752
|
let n = e.current;
|
|
750
753
|
if (!n) return;
|
|
751
754
|
let r = n.clientWidth, i = n.clientHeight, a = n.offsetLeft, o = n.offsetTop, s = t.current?.clientHeight || E.HEADER_HEIGHT, c = n.scrollHeight > n.clientHeight;
|
|
@@ -768,7 +771,7 @@ function we({ scrollRef: e, tableHeaderRef: t, bordered: n, hasFooter: r, header
|
|
|
768
771
|
e,
|
|
769
772
|
t
|
|
770
773
|
]);
|
|
771
|
-
let f = s?.width || l.elementWidth, p =
|
|
774
|
+
let f = s?.width || l.elementWidth, p = _(() => {
|
|
772
775
|
if (!c || !l.viewportClientHeight) return;
|
|
773
776
|
let e = n ? 2 : 0, t = l.viewportClientHeight - l.headerHeight - (r ? E.HEADER_HEIGHT : 0) - e;
|
|
774
777
|
return Math.max(0, t);
|
|
@@ -789,30 +792,30 @@ function we({ scrollRef: e, tableHeaderRef: t, bordered: n, hasFooter: r, header
|
|
|
789
792
|
}
|
|
790
793
|
//#endregion
|
|
791
794
|
//#region src/components/Table/style/resolveTableThemeVars.ts
|
|
792
|
-
var
|
|
795
|
+
var De = (e) => {
|
|
793
796
|
if (!e) return {};
|
|
794
797
|
let n = {};
|
|
795
798
|
return t(n, "--bsy-table-color-border", e.colorBorder), t(n, "--bsy-table-color-bg-header", e.colorBgHeader), t(n, "--bsy-table-color-bg-container", e.colorBgContainer), t(n, "--bsy-table-color-text", e.colorText), t(n, "--bsy-table-color-text-heading", e.colorTextHeading), t(n, "--bsy-table-color-bg-row-hover", e.colorBgRowHover), n;
|
|
796
|
-
},
|
|
799
|
+
}, Oe = Object.freeze([]), ke = Object.freeze({
|
|
797
800
|
left: !0,
|
|
798
801
|
right: !0
|
|
799
|
-
}),
|
|
800
|
-
let { t: oe } = n(), se =
|
|
802
|
+
}), Ae = Object.freeze([]), je = Object.freeze([]), G = d(({ columns: e = Ae, dataSource: t = je, rowKey: r = "id", height: i, bordered: a = !0, emptyText: o, onRowClick: s, scroll: d, footerData: f, footerSummary: p, renderFooter: g, hasFooter: y = !1, onRow: b, onCell: x, rowHeightStyle: S = "low", resizable: C = !0, disabledResizeColumns: w = Oe, minColumnWidth: ee, maxColumnWidth: T, onColumnResize: D, onColumnResizeEnd: k, renderBody: j, estimateSize: M, virtualEnabled: N, dataProcessor: te, headerRowSpan: P, fixedShadowMask: F = ke, onRenderEmpty: ne, overlayScrollbarOptions: I, wrapperStyle: re, theme: L }, ie) => {
|
|
803
|
+
let { t: oe } = n(), se = _(() => De(L), [L]), R = v(null), ce = v(null), { elementWidth: z, hasYScroll: le, scrollOffset: de, headerHeight: fe, bodyMinHeight: B } = Ee({
|
|
801
804
|
scrollRef: R,
|
|
802
805
|
tableHeaderRef: ce,
|
|
803
806
|
bordered: a,
|
|
804
807
|
hasFooter: y,
|
|
805
|
-
headerRowSpan:
|
|
808
|
+
headerRowSpan: P,
|
|
806
809
|
dataSourceLength: t.length,
|
|
807
|
-
overlayScrollbarOptions:
|
|
808
|
-
}), { sizedColumns:
|
|
810
|
+
overlayScrollbarOptions: I
|
|
811
|
+
}), { sizedColumns: V, flatColumns: H, isResizing: U, resizingColumn: pe, handleResizeStart: me, resizeHandleRef: ge } = we({
|
|
809
812
|
columns: e,
|
|
810
813
|
scrollRef: R,
|
|
811
|
-
minColumnWidth:
|
|
812
|
-
maxColumnWidth:
|
|
813
|
-
onColumnResize:
|
|
814
|
-
onColumnResizeEnd:
|
|
815
|
-
}), { className: _e, height: W } = A[S] || A.auto, { virtualRows:
|
|
814
|
+
minColumnWidth: ee,
|
|
815
|
+
maxColumnWidth: T,
|
|
816
|
+
onColumnResize: D,
|
|
817
|
+
onColumnResizeEnd: k
|
|
818
|
+
}), { className: _e, height: W } = A[S] || A.auto, { virtualRows: ye, totalHeight: Se, paddingTop: Ce, paddingBottom: Te, remeasure: G, rowRefCallback: Me, isDynamicHeight: K, clearRowHeightCache: Ne, enabled: q } = be(t, _(() => ({
|
|
816
819
|
rowHeight: W,
|
|
817
820
|
dynamicHeight: S === "auto",
|
|
818
821
|
rowKey: r,
|
|
@@ -826,20 +829,20 @@ var Te = (e) => {
|
|
|
826
829
|
M,
|
|
827
830
|
N
|
|
828
831
|
]), R);
|
|
829
|
-
|
|
830
|
-
clearRowHeightCache:
|
|
831
|
-
remeasure:
|
|
832
|
-
}), [
|
|
832
|
+
h(ie, () => ({
|
|
833
|
+
clearRowHeightCache: Ne,
|
|
834
|
+
remeasure: G
|
|
835
|
+
}), [Ne, G]);
|
|
833
836
|
let Pe = o || oe(E.EMPTY_TEXT_KEY);
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
}, [W,
|
|
837
|
-
let { leftFixedColumns: J, normalColumns: Y, rightFixedColumns: X, fixedLeftWidth:
|
|
838
|
-
|
|
839
|
-
|
|
837
|
+
m(() => {
|
|
838
|
+
G?.();
|
|
839
|
+
}, [W, G]);
|
|
840
|
+
let { leftFixedColumns: J, normalColumns: Y, rightFixedColumns: X, fixedLeftWidth: Z, fixedRightWidth: Fe, totalColumnsWidth: Q, needSpacer: $ } = _(() => ae(V, z), [V, z]), Ie = _(() => xe(t, ye, q, te), [
|
|
841
|
+
q,
|
|
842
|
+
ye,
|
|
840
843
|
t,
|
|
841
|
-
|
|
842
|
-
]), Le =
|
|
844
|
+
te
|
|
845
|
+
]), Le = _(() => {
|
|
843
846
|
let e = {};
|
|
844
847
|
return a ? e.border = "1px solid var(--bsy-table-color-border, var(--bsy-base-border-color, #e0e0e0))" : e.border = "none", (i || d?.y) && (e.maxHeight = i || d?.y), e;
|
|
845
848
|
}, [
|
|
@@ -847,12 +850,12 @@ var Te = (e) => {
|
|
|
847
850
|
i,
|
|
848
851
|
d
|
|
849
852
|
]), Re = !!(i || d?.y), ze, Be, Ve = !0;
|
|
850
|
-
if (!j && t.length === 0 && typeof
|
|
851
|
-
let e =
|
|
852
|
-
|
|
853
|
+
if (!j && t.length === 0 && typeof ne == "function") {
|
|
854
|
+
let e = ne();
|
|
855
|
+
u.isValidElement(e) && e.type === "tr" ? ze = e : e && (Be = e, Ve = !1);
|
|
853
856
|
}
|
|
854
|
-
return /* @__PURE__ */
|
|
855
|
-
className: `custom-table ${
|
|
857
|
+
return /* @__PURE__ */ l("div", {
|
|
858
|
+
className: `custom-table ${le ? "has-y-scroll" : ""}`,
|
|
856
859
|
style: {
|
|
857
860
|
position: "relative",
|
|
858
861
|
height: "100%",
|
|
@@ -860,54 +863,54 @@ var Te = (e) => {
|
|
|
860
863
|
},
|
|
861
864
|
"data-overlayscrollbars-initialize": "",
|
|
862
865
|
children: [
|
|
863
|
-
/* @__PURE__ */
|
|
866
|
+
/* @__PURE__ */ l("div", {
|
|
864
867
|
ref: R,
|
|
865
|
-
className: `custom-table-wrapper ${
|
|
868
|
+
className: `custom-table-wrapper ${U ? "resizing" : ""} ${_e} os-enabled`,
|
|
866
869
|
style: {
|
|
867
870
|
...Le,
|
|
868
|
-
...
|
|
871
|
+
...re
|
|
869
872
|
},
|
|
870
873
|
children: [
|
|
871
|
-
/* @__PURE__ */
|
|
874
|
+
/* @__PURE__ */ c(ue, {
|
|
872
875
|
ref: ce,
|
|
873
|
-
columns:
|
|
876
|
+
columns: V,
|
|
874
877
|
enableFixed: Re,
|
|
875
878
|
height: E.HEADER_HEIGHT,
|
|
876
879
|
resizingColumn: pe,
|
|
877
|
-
onResizeStart: C ?
|
|
880
|
+
onResizeStart: C ? me : void 0,
|
|
878
881
|
resizable: C,
|
|
879
882
|
disabledResizeColumns: w,
|
|
880
883
|
totalColumnsWidth: Q,
|
|
881
884
|
needSpacer: $,
|
|
882
|
-
headerRowSpan:
|
|
885
|
+
headerRowSpan: P
|
|
883
886
|
}),
|
|
884
|
-
/* @__PURE__ */
|
|
887
|
+
/* @__PURE__ */ c("div", {
|
|
885
888
|
className: "custom-table-body-wrapper",
|
|
886
889
|
style: { position: "relative" },
|
|
887
|
-
children: /* @__PURE__ */
|
|
890
|
+
children: /* @__PURE__ */ c("div", {
|
|
888
891
|
style: {
|
|
889
|
-
minHeight:
|
|
890
|
-
height:
|
|
891
|
-
paddingBottom:
|
|
892
|
+
minHeight: B,
|
|
893
|
+
height: Se,
|
|
894
|
+
paddingBottom: Te > 0 ? `${Te}px` : void 0,
|
|
892
895
|
paddingTop: Ce > 0 ? `${Ce}px` : void 0,
|
|
893
896
|
position: "relative"
|
|
894
897
|
},
|
|
895
898
|
children: j ? j({
|
|
896
|
-
columns:
|
|
897
|
-
flatColumns:
|
|
899
|
+
columns: V,
|
|
900
|
+
flatColumns: H,
|
|
898
901
|
leftFixedColumns: J,
|
|
899
902
|
normalColumns: Y,
|
|
900
903
|
rightFixedColumns: X,
|
|
901
904
|
totalColumnsWidth: Q,
|
|
902
905
|
needSpacer: $,
|
|
903
|
-
rowRefCallback:
|
|
904
|
-
isDynamicHeight:
|
|
906
|
+
rowRefCallback: Me,
|
|
907
|
+
isDynamicHeight: K,
|
|
905
908
|
rowHeight: W,
|
|
906
|
-
onRowClick:
|
|
909
|
+
onRowClick: s,
|
|
907
910
|
scrollRef: R,
|
|
908
|
-
virtualRows:
|
|
909
|
-
virtualEnabled:
|
|
910
|
-
}) : /* @__PURE__ */
|
|
911
|
+
virtualRows: ye,
|
|
912
|
+
virtualEnabled: q
|
|
913
|
+
}) : /* @__PURE__ */ c(he, {
|
|
911
914
|
leftFixedColumns: J,
|
|
912
915
|
normalColumns: Y,
|
|
913
916
|
rightFixedColumns: X,
|
|
@@ -917,59 +920,59 @@ var Te = (e) => {
|
|
|
917
920
|
emptyText: Pe,
|
|
918
921
|
emptyRowContent: ze,
|
|
919
922
|
showEmptyRow: Ve,
|
|
920
|
-
onRowClick:
|
|
923
|
+
onRowClick: s,
|
|
921
924
|
onRow: b,
|
|
922
925
|
onCell: x,
|
|
923
926
|
totalColumnsWidth: Q,
|
|
924
927
|
needSpacer: $,
|
|
925
|
-
rowRefCallback:
|
|
926
|
-
isDynamicHeight:
|
|
928
|
+
rowRefCallback: Me,
|
|
929
|
+
isDynamicHeight: K
|
|
927
930
|
})
|
|
928
931
|
})
|
|
929
932
|
}),
|
|
930
|
-
y && (f ||
|
|
933
|
+
y && (f || p || g) ? /* @__PURE__ */ c(ve, {
|
|
931
934
|
leftFixedColumns: J,
|
|
932
935
|
normalColumns: Y,
|
|
933
936
|
rightFixedColumns: X,
|
|
934
937
|
footerData: f,
|
|
935
|
-
summary:
|
|
936
|
-
render:
|
|
938
|
+
summary: p,
|
|
939
|
+
render: g,
|
|
937
940
|
enableFixed: Re,
|
|
938
941
|
totalColumnsWidth: Q,
|
|
939
942
|
needSpacer: $
|
|
940
943
|
}) : null
|
|
941
944
|
]
|
|
942
945
|
}),
|
|
943
|
-
Be ? /* @__PURE__ */
|
|
946
|
+
Be ? /* @__PURE__ */ c("div", {
|
|
944
947
|
className: "custom-table-empty-overlay",
|
|
945
948
|
style: {
|
|
946
|
-
height:
|
|
949
|
+
height: B,
|
|
947
950
|
left: de.left,
|
|
948
|
-
top: de.top +
|
|
951
|
+
top: de.top + fe + (a ? 1 : 0),
|
|
949
952
|
width: z || void 0
|
|
950
953
|
},
|
|
951
|
-
children: /* @__PURE__ */
|
|
954
|
+
children: /* @__PURE__ */ c("div", {
|
|
952
955
|
className: "custom-table-empty-overlay-inner",
|
|
953
956
|
children: Be
|
|
954
957
|
})
|
|
955
958
|
}) : null,
|
|
956
|
-
C ? /* @__PURE__ */
|
|
959
|
+
C ? /* @__PURE__ */ c("div", {
|
|
957
960
|
className: "custom-table-resize-handle",
|
|
958
961
|
ref: ge
|
|
959
962
|
}) : null,
|
|
960
|
-
|
|
963
|
+
F.left !== !1 && Z > 0 ? /* @__PURE__ */ c("div", {
|
|
961
964
|
className: "fixed-shadow-mask left",
|
|
962
|
-
style: { width:
|
|
965
|
+
style: { width: Z }
|
|
963
966
|
}) : null,
|
|
964
|
-
!$ &&
|
|
967
|
+
!$ && F.right !== !1 && Fe > 0 ? /* @__PURE__ */ c("div", {
|
|
965
968
|
className: "fixed-shadow-mask right",
|
|
966
|
-
style: { width:
|
|
969
|
+
style: { width: Fe }
|
|
967
970
|
}) : null
|
|
968
971
|
]
|
|
969
972
|
});
|
|
970
973
|
});
|
|
971
|
-
|
|
972
|
-
var
|
|
974
|
+
G.displayName = "Table";
|
|
975
|
+
var Me = u.memo(G), K = {
|
|
973
976
|
axisOffset: 18,
|
|
974
977
|
arrowSize: 16,
|
|
975
978
|
branchContinueOffset: 11,
|
|
@@ -979,26 +982,26 @@ var K = l.memo(Ae), q = {
|
|
|
979
982
|
prefixOffset: 34,
|
|
980
983
|
textGap: 16,
|
|
981
984
|
textOffset: 42
|
|
982
|
-
},
|
|
983
|
-
top: 17 +
|
|
985
|
+
}, Ne = {
|
|
986
|
+
top: 17 + K.branchContinueOffset,
|
|
984
987
|
bottom: -1
|
|
985
|
-
},
|
|
988
|
+
}, q = {
|
|
986
989
|
top: -1,
|
|
987
990
|
bottom: -1
|
|
988
|
-
},
|
|
991
|
+
}, Pe = {
|
|
989
992
|
top: -1,
|
|
990
993
|
bottom: "10%"
|
|
991
|
-
},
|
|
992
|
-
let t = Math.max(Number(e) || 0, 0), n =
|
|
994
|
+
}, J = /* @__PURE__ */ new Map(), Y = (e = 0) => {
|
|
995
|
+
let t = Math.max(Number(e) || 0, 0), n = J.get(t);
|
|
993
996
|
if (n) return n;
|
|
994
|
-
let r = t *
|
|
995
|
-
axisCenter:
|
|
996
|
-
arrowLeft:
|
|
997
|
-
prefixWidth:
|
|
998
|
-
textOffset:
|
|
997
|
+
let r = t * K.levelStep, i = {
|
|
998
|
+
axisCenter: K.axisOffset + r,
|
|
999
|
+
arrowLeft: K.iconOffset + r,
|
|
1000
|
+
prefixWidth: K.prefixOffset + r,
|
|
1001
|
+
textOffset: K.textOffset + r
|
|
999
1002
|
};
|
|
1000
|
-
return
|
|
1001
|
-
},
|
|
1003
|
+
return J.set(t, i), i;
|
|
1004
|
+
}, X = (e) => {
|
|
1002
1005
|
if (!Array.isArray(e) || e.length === 0) return [];
|
|
1003
1006
|
let t = e.length, n = Array(t), r = [];
|
|
1004
1007
|
for (let i = 0; i < t; i += 1) {
|
|
@@ -1017,32 +1020,32 @@ var K = l.memo(Ae), q = {
|
|
|
1017
1020
|
e !== void 0 && (n[e].subtreeEndIndex = t - 1);
|
|
1018
1021
|
}
|
|
1019
1022
|
return n;
|
|
1020
|
-
},
|
|
1023
|
+
}, Z = ({ rowIndex: e, subtreeEndIndex: t, type: n = "ancestor" }) => n === "current" ? Ne : e < t ? q : Pe, Fe = ({ depth: e = 0, hasChildren: t = !1, previousDepth: n = -1, rowIndex: r = 0, rowMeta: i = null, treeMeta: a = [] }) => {
|
|
1021
1024
|
if (t) return null;
|
|
1022
|
-
let o = Math.max(Number(e) || 0, 0), { prefixWidth: s, axisCenter: c } =
|
|
1025
|
+
let o = Math.max(Number(e) || 0, 0), { prefixWidth: s, axisCenter: c } = Y(o), l = i?.ancestorIndices || [];
|
|
1023
1026
|
if ((Number(n) || 0) > o) return {
|
|
1024
1027
|
left: c,
|
|
1025
1028
|
width: s - c
|
|
1026
1029
|
};
|
|
1027
1030
|
for (let e = 0; e < l.length; e += 1) {
|
|
1028
1031
|
let t = l[e], n = a?.[t];
|
|
1029
|
-
if (
|
|
1032
|
+
if (Z({
|
|
1030
1033
|
rowIndex: r,
|
|
1031
1034
|
subtreeEndIndex: n?.subtreeEndIndex ?? r
|
|
1032
|
-
}) !==
|
|
1033
|
-
let t =
|
|
1035
|
+
}) !== q) {
|
|
1036
|
+
let t = Y(e).axisCenter;
|
|
1034
1037
|
return {
|
|
1035
1038
|
left: t,
|
|
1036
1039
|
width: s - t
|
|
1037
1040
|
};
|
|
1038
1041
|
}
|
|
1039
1042
|
}
|
|
1040
|
-
let u = o === 0 ? 0 :
|
|
1043
|
+
let u = o === 0 ? 0 : Y(o - 1).prefixWidth;
|
|
1041
1044
|
return {
|
|
1042
1045
|
left: u,
|
|
1043
1046
|
width: s - u
|
|
1044
1047
|
};
|
|
1045
|
-
},
|
|
1048
|
+
}, Q = {
|
|
1046
1049
|
root: "_root_1vwno_1",
|
|
1047
1050
|
gutter: "_gutter_1vwno_26",
|
|
1048
1051
|
rail: "_rail_1vwno_33",
|
|
@@ -1052,118 +1055,118 @@ var K = l.memo(Ae), q = {
|
|
|
1052
1055
|
loading: "_loading_1vwno_82",
|
|
1053
1056
|
value: "_value_1vwno_95",
|
|
1054
1057
|
loadMore: "_loadMore_1vwno_106"
|
|
1055
|
-
},
|
|
1058
|
+
}, $ = (e) => {
|
|
1056
1059
|
e.stopPropagation();
|
|
1057
|
-
},
|
|
1058
|
-
let { prefixWidth: n } =
|
|
1059
|
-
return /* @__PURE__ */
|
|
1060
|
-
className:
|
|
1060
|
+
}, Ie = ({ depth: e, loadMore: t }) => {
|
|
1061
|
+
let { prefixWidth: n } = Y(e);
|
|
1062
|
+
return /* @__PURE__ */ l("div", {
|
|
1063
|
+
className: Q.root,
|
|
1061
1064
|
"data-testid": "hierarchy-tree",
|
|
1062
|
-
children: [/* @__PURE__ */
|
|
1063
|
-
className:
|
|
1065
|
+
children: [/* @__PURE__ */ c("div", {
|
|
1066
|
+
className: Q.gutter,
|
|
1064
1067
|
style: { width: n },
|
|
1065
|
-
children: /* @__PURE__ */
|
|
1066
|
-
className:
|
|
1068
|
+
children: /* @__PURE__ */ c("span", {
|
|
1069
|
+
className: Q.divider,
|
|
1067
1070
|
style: {
|
|
1068
1071
|
left: 0,
|
|
1069
1072
|
width: "100%"
|
|
1070
1073
|
}
|
|
1071
1074
|
})
|
|
1072
|
-
}), /* @__PURE__ */
|
|
1073
|
-
className:
|
|
1074
|
-
children: /* @__PURE__ */
|
|
1075
|
+
}), /* @__PURE__ */ c("div", {
|
|
1076
|
+
className: Q.value,
|
|
1077
|
+
children: /* @__PURE__ */ c("button", {
|
|
1075
1078
|
type: "button",
|
|
1076
|
-
className:
|
|
1079
|
+
className: Q.loadMore,
|
|
1077
1080
|
disabled: t.loading,
|
|
1078
1081
|
onClick: (e) => {
|
|
1079
|
-
|
|
1082
|
+
$(e), t.onClick();
|
|
1080
1083
|
},
|
|
1081
1084
|
children: t.label
|
|
1082
1085
|
})
|
|
1083
1086
|
})]
|
|
1084
1087
|
});
|
|
1085
|
-
},
|
|
1088
|
+
}, Le = (e, t, n) => (t.ancestorIndices || []).map((t, r) => {
|
|
1086
1089
|
let i = n[t];
|
|
1087
1090
|
return {
|
|
1088
|
-
axisCenter:
|
|
1091
|
+
axisCenter: Y(r).axisCenter,
|
|
1089
1092
|
key: `${t}-${r}`,
|
|
1090
|
-
segmentStyle:
|
|
1093
|
+
segmentStyle: Z({
|
|
1091
1094
|
rowIndex: e,
|
|
1092
1095
|
subtreeEndIndex: i?.subtreeEndIndex ?? e
|
|
1093
1096
|
})
|
|
1094
1097
|
};
|
|
1095
|
-
}),
|
|
1096
|
-
let { axisCenter: m, prefixWidth: h } =
|
|
1098
|
+
}), Re = ({ depth: t, children: n, rowIndex: r, previousDepth: a = -1, rowMeta: o, treeMeta: s, hasChildren: u = !1, expanded: d = !1, loading: f = !1, onToggle: p }) => {
|
|
1099
|
+
let { axisCenter: m, prefixWidth: h } = Y(t), g = r === Math.max(s.length - 1, 0), _ = Le(r, o, s), v = Fe({
|
|
1097
1100
|
depth: t,
|
|
1098
1101
|
hasChildren: u && d,
|
|
1099
1102
|
previousDepth: a,
|
|
1100
|
-
rowIndex:
|
|
1103
|
+
rowIndex: r,
|
|
1101
1104
|
rowMeta: o,
|
|
1102
|
-
treeMeta:
|
|
1103
|
-
}),
|
|
1105
|
+
treeMeta: s
|
|
1106
|
+
}), y = g ? {
|
|
1104
1107
|
left: 0,
|
|
1105
1108
|
width: "100%"
|
|
1106
|
-
} : v, x = u && d && o.subtreeEndIndex >
|
|
1107
|
-
rowIndex:
|
|
1109
|
+
} : v, x = u && d && o.subtreeEndIndex > r, S = Z({
|
|
1110
|
+
rowIndex: r,
|
|
1108
1111
|
subtreeEndIndex: o.subtreeEndIndex,
|
|
1109
1112
|
type: "current"
|
|
1110
1113
|
});
|
|
1111
|
-
return /* @__PURE__ */
|
|
1112
|
-
className:
|
|
1114
|
+
return /* @__PURE__ */ l("div", {
|
|
1115
|
+
className: Q.root,
|
|
1113
1116
|
"data-testid": "hierarchy-tree",
|
|
1114
|
-
children: [/* @__PURE__ */
|
|
1115
|
-
className:
|
|
1117
|
+
children: [/* @__PURE__ */ l("div", {
|
|
1118
|
+
className: Q.gutter,
|
|
1116
1119
|
style: { width: h },
|
|
1117
1120
|
children: [
|
|
1118
|
-
|
|
1119
|
-
className:
|
|
1121
|
+
y ? /* @__PURE__ */ c("span", {
|
|
1122
|
+
className: Q.divider,
|
|
1120
1123
|
"data-testid": "hierarchy-tree-divider",
|
|
1121
|
-
style:
|
|
1124
|
+
style: y
|
|
1122
1125
|
}) : null,
|
|
1123
|
-
_.map((e) => /* @__PURE__ */
|
|
1124
|
-
className:
|
|
1126
|
+
_.map((e) => /* @__PURE__ */ c("span", {
|
|
1127
|
+
className: Q.rail,
|
|
1125
1128
|
style: {
|
|
1126
1129
|
left: e.axisCenter,
|
|
1127
1130
|
...e.segmentStyle
|
|
1128
1131
|
}
|
|
1129
1132
|
}, e.key)),
|
|
1130
|
-
x ? /* @__PURE__ */
|
|
1131
|
-
className:
|
|
1133
|
+
x ? /* @__PURE__ */ c("span", {
|
|
1134
|
+
className: Q.rail,
|
|
1132
1135
|
style: {
|
|
1133
1136
|
left: m,
|
|
1134
1137
|
...S
|
|
1135
1138
|
}
|
|
1136
1139
|
}) : null,
|
|
1137
|
-
u ? f ? /* @__PURE__ */
|
|
1138
|
-
className:
|
|
1140
|
+
u ? f ? /* @__PURE__ */ c("span", {
|
|
1141
|
+
className: Q.loading,
|
|
1139
1142
|
"data-testid": "hierarchy-tree-loading",
|
|
1140
1143
|
style: { left: m },
|
|
1141
|
-
children: /* @__PURE__ */
|
|
1144
|
+
children: /* @__PURE__ */ c(i, {
|
|
1142
1145
|
style: { fontSize: 16 },
|
|
1143
1146
|
spin: !0
|
|
1144
1147
|
})
|
|
1145
|
-
}) : /* @__PURE__ */
|
|
1148
|
+
}) : /* @__PURE__ */ c("button", {
|
|
1146
1149
|
type: "button",
|
|
1147
|
-
className:
|
|
1150
|
+
className: b(Q.toggle, d && Q.toggleExpanded),
|
|
1148
1151
|
style: { left: m },
|
|
1149
1152
|
"aria-expanded": d,
|
|
1150
1153
|
onClick: (e) => {
|
|
1151
|
-
|
|
1154
|
+
$(e), p?.();
|
|
1152
1155
|
},
|
|
1153
|
-
children: /* @__PURE__ */
|
|
1156
|
+
children: /* @__PURE__ */ c(e, {
|
|
1154
1157
|
name: "arrow-right",
|
|
1155
1158
|
size: 16
|
|
1156
1159
|
})
|
|
1157
1160
|
}) : null
|
|
1158
1161
|
]
|
|
1159
|
-
}), /* @__PURE__ */
|
|
1160
|
-
className:
|
|
1162
|
+
}), /* @__PURE__ */ c("div", {
|
|
1163
|
+
className: Q.value,
|
|
1161
1164
|
children: n
|
|
1162
1165
|
})]
|
|
1163
1166
|
});
|
|
1164
|
-
},
|
|
1167
|
+
}, ze = (e) => e.loadMore ? /* @__PURE__ */ c(Ie, {
|
|
1165
1168
|
depth: e.depth,
|
|
1166
1169
|
loadMore: e.loadMore
|
|
1167
|
-
}) : /* @__PURE__ */
|
|
1170
|
+
}) : /* @__PURE__ */ c(Re, { ...e });
|
|
1168
1171
|
//#endregion
|
|
1169
|
-
export { k as _,
|
|
1172
|
+
export { k as _, Se as a, B as c, P as d, N as f, re as g, ne as h, De as i, fe as l, I as m, X as n, be as o, L as p, Me as r, he as s, ze as t, V as u, E as v, M as y };
|