@hkyhy/marsun-components-core 0.1.35 → 0.1.37
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/components/AgentHub/Chat/Detail/ChatPanel/style.module.scss.js +13 -13
- package/dist/components/AgentHub/Chat/Detail/MessageItem/index.js +195 -144
- package/dist/components/AgentHub/Chat/Detail/MessageItem/index.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/MessageItem/style.module.scss.js +20 -20
- package/dist/components/Table/ColumnConfigPanel.js +166 -186
- package/dist/components/Table/ColumnConfigPanel.js.map +1 -1
- package/dist/components/Table/Table.js +223 -205
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/Table/columnConfigUtils.js +121 -97
- package/dist/components/Table/columnConfigUtils.js.map +1 -1
- package/dist/components/Table/style.module.scss.js +32 -14
- package/dist/components/Table/style.module.scss.js.map +1 -1
- package/dist/marsun-components-core.css +1 -1
- package/dist/styles/global.css +1 -1
- package/package.json +1 -1
|
@@ -1,330 +1,348 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { Space as
|
|
4
|
-
import
|
|
1
|
+
import { jsxs as j, jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as zt, useState as U, useEffect as ot, useMemo as S, useCallback as E } from "react";
|
|
3
|
+
import { Space as Ft, Button as dt, Tooltip as pt, Table as kt } from "antd";
|
|
4
|
+
import M from "classnames";
|
|
5
5
|
import { Eye as ht } from "../Icons/index.js";
|
|
6
|
-
import { ColumnConfigTrigger as
|
|
7
|
-
import { applyColumnConfig as
|
|
8
|
-
import { FLEX_SPACER_COL_KEY as
|
|
9
|
-
import { emptyTablePrefs as
|
|
10
|
-
import { normalizeHiddenRowKeys as
|
|
11
|
-
import { parseTablePrefs as
|
|
12
|
-
import
|
|
6
|
+
import { ColumnConfigTrigger as Ct } from "./ColumnConfigPanel.js";
|
|
7
|
+
import { applyColumnConfig as Dt, columnsToPanelItems as $t, columnsToConfig as jt, hideColumnAtPath as Bt, COLUMN_CONFIG_COL_KEY as Gt, isInternalColumnKey as yt, shortChildId as Pt } from "./columnConfigUtils.js";
|
|
8
|
+
import { FLEX_SPACER_COL_KEY as fe } from "./columnConfigUtils.js";
|
|
9
|
+
import { emptyTablePrefs as Ut } from "./tablePrefsTypes.js";
|
|
10
|
+
import { normalizeHiddenRowKeys as Q, mergeTablePrefs as mt, applyHiddenRows as Mt } from "./tablePrefsUtils.js";
|
|
11
|
+
import { parseTablePrefs as he, serializeTablePrefs as ye } from "./tablePrefsUtils.js";
|
|
12
|
+
import o from "./style.module.scss.js";
|
|
13
13
|
import ft from "./columnConfig.module.scss.js";
|
|
14
|
-
import
|
|
15
|
-
const
|
|
16
|
-
function
|
|
17
|
-
return `共 ${
|
|
14
|
+
import Xt from "../Empty/Empty.js";
|
|
15
|
+
const Yt = { x: "max-content" }, T = 40, qt = 64;
|
|
16
|
+
function Zt(e) {
|
|
17
|
+
return `共 ${e} 项`;
|
|
18
18
|
}
|
|
19
|
-
function gt(
|
|
19
|
+
function gt(e) {
|
|
20
20
|
var i;
|
|
21
|
-
if (!(
|
|
22
|
-
let
|
|
23
|
-
for (const
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
26
|
-
if ((i =
|
|
27
|
-
|
|
21
|
+
if (!(e != null && e.length)) return 0;
|
|
22
|
+
let a = 0;
|
|
23
|
+
for (const s of e) {
|
|
24
|
+
const L = s.key != null ? String(s.key) : "";
|
|
25
|
+
if (L && yt(L)) continue;
|
|
26
|
+
if ((i = s.children) != null && i.length) {
|
|
27
|
+
a += gt(s.children);
|
|
28
28
|
continue;
|
|
29
29
|
}
|
|
30
|
-
const
|
|
31
|
-
typeof
|
|
30
|
+
const l = s.width;
|
|
31
|
+
typeof l == "number" && Number.isFinite(l) && l > 0 ? a += l : a += qt;
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return a;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
35
|
+
function Jt(e, a) {
|
|
36
|
+
return e.key != null && String(e.key) !== "" ? String(e.key) : e.dataIndex != null ? Array.isArray(e.dataIndex) ? e.dataIndex.join(".") : String(e.dataIndex) : `__col_${a}`;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
if (typeof i == "function") return String(i(
|
|
38
|
+
function Qt(e, a, i) {
|
|
39
|
+
if (typeof i == "function") return String(i(e, a));
|
|
40
40
|
if (typeof i == "string" && i) {
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
41
|
+
const s = e[i];
|
|
42
|
+
if (s != null && s !== "") return String(s);
|
|
43
43
|
}
|
|
44
|
-
return String(
|
|
44
|
+
return String(a);
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
const Vt = 6;
|
|
47
|
+
function Lt(e, a, i, s = [], L = 0, l) {
|
|
48
|
+
let k = 0;
|
|
49
|
+
return e.map((r, d) => {
|
|
50
|
+
var O, x;
|
|
51
|
+
const b = Jt(r, d);
|
|
52
|
+
if (yt(b)) return r;
|
|
53
|
+
const A = i ? Pt(i, b) : b, N = [...s, A], _ = r.onHeaderCell;
|
|
54
|
+
let p = l;
|
|
55
|
+
L === 0 && (p = (O = r.children) != null && O.length ? k++ : void 0);
|
|
56
|
+
const C = p == null ? void 0 : L === 0 ? o.headerDepth0 : L === 1 ? o.headerDepth1 : o.headerDepth2, z = p == null ? void 0 : o[`headerGroup${p % Vt}`], h = /* @__PURE__ */ j("span", { className: o.headerTitleWithEye, children: [
|
|
57
|
+
/* @__PURE__ */ f("span", { className: o.headerTitleText, children: r.title }),
|
|
58
|
+
/* @__PURE__ */ f(pt, { title: "隐藏此列", children: /* @__PURE__ */ f(
|
|
54
59
|
"button",
|
|
55
60
|
{
|
|
56
61
|
type: "button",
|
|
57
|
-
className:
|
|
62
|
+
className: o.headerEyeBtn,
|
|
58
63
|
"aria-label": "隐藏此列",
|
|
59
|
-
onClick: (
|
|
60
|
-
|
|
64
|
+
onClick: (H) => {
|
|
65
|
+
H.stopPropagation(), a(N);
|
|
61
66
|
},
|
|
62
|
-
children: /* @__PURE__ */
|
|
67
|
+
children: /* @__PURE__ */ f(ht, { size: 12 })
|
|
63
68
|
}
|
|
64
69
|
) })
|
|
65
|
-
] })
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
70
|
+
] }), c = (H) => {
|
|
71
|
+
const I = typeof _ == "function" ? _(H) : _ || {};
|
|
72
|
+
return {
|
|
73
|
+
...I,
|
|
74
|
+
className: M(I.className, z, C)
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
return (x = r.children) != null && x.length ? {
|
|
78
|
+
...r,
|
|
79
|
+
title: h,
|
|
80
|
+
onHeaderCell: c,
|
|
69
81
|
children: Lt(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
82
|
+
r.children,
|
|
83
|
+
a,
|
|
84
|
+
b,
|
|
85
|
+
N,
|
|
86
|
+
L + 1,
|
|
87
|
+
p
|
|
74
88
|
)
|
|
75
|
-
} : {
|
|
89
|
+
} : {
|
|
90
|
+
...r,
|
|
91
|
+
title: h,
|
|
92
|
+
onHeaderCell: c
|
|
93
|
+
};
|
|
76
94
|
});
|
|
77
95
|
}
|
|
78
|
-
function
|
|
79
|
-
className:
|
|
80
|
-
style:
|
|
96
|
+
function oe({
|
|
97
|
+
className: e,
|
|
98
|
+
style: a,
|
|
81
99
|
scroll: i,
|
|
82
|
-
pagination:
|
|
83
|
-
locale:
|
|
84
|
-
columns:
|
|
85
|
-
dataSource:
|
|
86
|
-
rowKey:
|
|
87
|
-
tableName:
|
|
88
|
-
columnConfigEnabled:
|
|
89
|
-
fetchColumnConfig:
|
|
90
|
-
saveColumnConfig:
|
|
91
|
-
onColumnConfigChange:
|
|
92
|
-
fetchTablePrefs:
|
|
93
|
-
saveTablePrefs:
|
|
94
|
-
onTablePrefsChange:
|
|
95
|
-
rowConfigEnabled:
|
|
96
|
-
lockedRowKeys:
|
|
97
|
-
hiddenRowKeys:
|
|
98
|
-
onHiddenRowKeysChange:
|
|
99
|
-
rowHideSelectedKeys:
|
|
100
|
-
rowConfigToolbar:
|
|
101
|
-
rowSelection:
|
|
100
|
+
pagination: s,
|
|
101
|
+
locale: L,
|
|
102
|
+
columns: l,
|
|
103
|
+
dataSource: k,
|
|
104
|
+
rowKey: r,
|
|
105
|
+
tableName: d,
|
|
106
|
+
columnConfigEnabled: b,
|
|
107
|
+
fetchColumnConfig: A,
|
|
108
|
+
saveColumnConfig: N,
|
|
109
|
+
onColumnConfigChange: _,
|
|
110
|
+
fetchTablePrefs: p,
|
|
111
|
+
saveTablePrefs: C,
|
|
112
|
+
onTablePrefsChange: z,
|
|
113
|
+
rowConfigEnabled: h = !1,
|
|
114
|
+
lockedRowKeys: c,
|
|
115
|
+
hiddenRowKeys: O,
|
|
116
|
+
onHiddenRowKeysChange: x,
|
|
117
|
+
rowHideSelectedKeys: H,
|
|
118
|
+
rowConfigToolbar: I,
|
|
119
|
+
rowSelection: y,
|
|
102
120
|
...St
|
|
103
121
|
}) {
|
|
104
|
-
var
|
|
105
|
-
const
|
|
122
|
+
var it;
|
|
123
|
+
const v = b ?? !!d, X = zt(l), [u, B] = U(null), [V, _t] = U(!1), [R, Y] = U(!v), [K, Ot] = U([]);
|
|
106
124
|
ot(() => {
|
|
107
|
-
X.current =
|
|
108
|
-
}, [
|
|
109
|
-
if (!
|
|
125
|
+
X.current = l;
|
|
126
|
+
}, [l]), ot(() => {
|
|
127
|
+
if (!v || !d || !(p || A)) {
|
|
110
128
|
Y(!0);
|
|
111
129
|
return;
|
|
112
130
|
}
|
|
113
131
|
let t = !1;
|
|
114
132
|
return Y(!1), (async () => {
|
|
115
|
-
var
|
|
133
|
+
var g;
|
|
116
134
|
try {
|
|
117
|
-
if (
|
|
118
|
-
const
|
|
119
|
-
t ||
|
|
120
|
-
} else if (
|
|
121
|
-
const
|
|
122
|
-
t ||
|
|
135
|
+
if (p) {
|
|
136
|
+
const m = await p(d);
|
|
137
|
+
t || B((g = m == null ? void 0 : m.columns) != null && g.length ? m : null);
|
|
138
|
+
} else if (A) {
|
|
139
|
+
const m = await A(d);
|
|
140
|
+
t || B(m != null && m.length ? Ut(m) : null);
|
|
123
141
|
}
|
|
124
142
|
} catch {
|
|
125
|
-
t ||
|
|
143
|
+
t || B(null);
|
|
126
144
|
} finally {
|
|
127
145
|
t || Y(!0);
|
|
128
146
|
}
|
|
129
147
|
})(), () => {
|
|
130
148
|
t = !0;
|
|
131
149
|
};
|
|
132
|
-
}, [
|
|
133
|
-
const
|
|
150
|
+
}, [v, d, p, A]);
|
|
151
|
+
const G = (it = u == null ? void 0 : u.columns) != null && it.length ? u.columns : null, W = S(() => O !== void 0 ? Q(O, c) : Q(K, c), [O, K, c]), F = E(
|
|
134
152
|
(t) => {
|
|
135
|
-
const
|
|
136
|
-
|
|
153
|
+
const n = Q(t, c);
|
|
154
|
+
O === void 0 && Ot(n), x == null || x(n);
|
|
137
155
|
},
|
|
138
|
-
[
|
|
139
|
-
),
|
|
156
|
+
[O, c, x]
|
|
157
|
+
), P = E(
|
|
140
158
|
async (t) => {
|
|
141
|
-
if (
|
|
142
|
-
await
|
|
159
|
+
if (B(t), z == null || z(t), _ == null || _(t.columns), d && C) {
|
|
160
|
+
await C(d, t);
|
|
143
161
|
return;
|
|
144
162
|
}
|
|
145
|
-
|
|
163
|
+
d && N && await N(d, t.columns);
|
|
146
164
|
},
|
|
147
|
-
[
|
|
148
|
-
), w =
|
|
149
|
-
const t =
|
|
150
|
-
return
|
|
151
|
-
}, [
|
|
165
|
+
[d, C, N, z, _]
|
|
166
|
+
), w = S(() => {
|
|
167
|
+
const t = l || [];
|
|
168
|
+
return v ? Dt(t, G) : t;
|
|
169
|
+
}, [l, v, G]), tt = S(
|
|
152
170
|
() => $t(
|
|
153
|
-
X.current ||
|
|
171
|
+
X.current || l
|
|
154
172
|
),
|
|
155
173
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- 随 columns 结构变
|
|
156
|
-
[
|
|
157
|
-
),
|
|
174
|
+
[l]
|
|
175
|
+
), et = E(
|
|
158
176
|
async (t) => {
|
|
159
|
-
await
|
|
177
|
+
await P(mt(u, { columns: t }));
|
|
160
178
|
},
|
|
161
|
-
[
|
|
162
|
-
),
|
|
179
|
+
[u, P]
|
|
180
|
+
), nt = E(
|
|
163
181
|
async (t) => {
|
|
164
|
-
var
|
|
182
|
+
var g;
|
|
165
183
|
if (!t.length) return;
|
|
166
|
-
const
|
|
167
|
-
X.current ||
|
|
184
|
+
const n = (g = u == null ? void 0 : u.columns) != null && g.length && u.columns.length ? u.columns : jt(
|
|
185
|
+
X.current || l
|
|
168
186
|
);
|
|
169
|
-
await
|
|
187
|
+
await P(mt(u, { columns: Bt(n, t) }));
|
|
170
188
|
},
|
|
171
|
-
[
|
|
172
|
-
),
|
|
173
|
-
const t = (
|
|
174
|
-
t.length &&
|
|
175
|
-
}, [
|
|
176
|
-
|
|
177
|
-
}, [
|
|
189
|
+
[u, l, P]
|
|
190
|
+
), Wt = E(() => {
|
|
191
|
+
const t = (H || []).map(String);
|
|
192
|
+
t.length && F([...W, ...t]);
|
|
193
|
+
}, [H, W, F]), xt = E(() => {
|
|
194
|
+
F([]);
|
|
195
|
+
}, [F]), rt = E(
|
|
178
196
|
(t) => {
|
|
179
|
-
const
|
|
180
|
-
|
|
197
|
+
const n = String(t);
|
|
198
|
+
n && ((c || []).map(String).includes(n) || F([...W, n]));
|
|
181
199
|
},
|
|
182
|
-
[
|
|
183
|
-
), q =
|
|
200
|
+
[c, W, F]
|
|
201
|
+
), q = S(() => {
|
|
184
202
|
let t = w;
|
|
185
|
-
if (
|
|
186
|
-
t = Lt(t, (
|
|
187
|
-
|
|
203
|
+
if (v && R) {
|
|
204
|
+
t = Lt(t, (g) => {
|
|
205
|
+
nt(g);
|
|
188
206
|
});
|
|
189
|
-
const
|
|
190
|
-
key:
|
|
191
|
-
width:
|
|
207
|
+
const n = {
|
|
208
|
+
key: Gt,
|
|
209
|
+
width: T,
|
|
192
210
|
fixed: "right",
|
|
193
211
|
align: "center",
|
|
194
212
|
className: ft.configCol,
|
|
195
213
|
onHeaderCell: () => ({
|
|
196
214
|
className: ft.configColHeader,
|
|
197
215
|
style: {
|
|
198
|
-
width:
|
|
199
|
-
minWidth:
|
|
200
|
-
maxWidth:
|
|
216
|
+
width: T,
|
|
217
|
+
minWidth: T,
|
|
218
|
+
maxWidth: T
|
|
201
219
|
}
|
|
202
220
|
}),
|
|
203
221
|
onCell: () => ({
|
|
204
222
|
style: {
|
|
205
|
-
width:
|
|
206
|
-
minWidth:
|
|
207
|
-
maxWidth:
|
|
223
|
+
width: T,
|
|
224
|
+
minWidth: T,
|
|
225
|
+
maxWidth: T
|
|
208
226
|
}
|
|
209
227
|
}),
|
|
210
|
-
title: /* @__PURE__ */
|
|
211
|
-
|
|
228
|
+
title: /* @__PURE__ */ f(
|
|
229
|
+
Ct,
|
|
212
230
|
{
|
|
213
|
-
open:
|
|
214
|
-
onOpenChange:
|
|
231
|
+
open: V,
|
|
232
|
+
onOpenChange: _t,
|
|
215
233
|
defaultItems: tt,
|
|
216
|
-
savedConfig:
|
|
217
|
-
onConfirm:
|
|
234
|
+
savedConfig: G,
|
|
235
|
+
onConfirm: et
|
|
218
236
|
}
|
|
219
237
|
),
|
|
220
238
|
render: () => null
|
|
221
239
|
};
|
|
222
|
-
t = [...t,
|
|
240
|
+
t = [...t, n];
|
|
223
241
|
}
|
|
224
242
|
return t;
|
|
225
243
|
}, [
|
|
226
|
-
|
|
244
|
+
v,
|
|
227
245
|
R,
|
|
228
246
|
w,
|
|
229
|
-
|
|
247
|
+
V,
|
|
230
248
|
tt,
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
]),
|
|
249
|
+
G,
|
|
250
|
+
et,
|
|
251
|
+
nt
|
|
252
|
+
]), Ht = S(() => h ? Mt(k, W, typeof r == "function" || typeof r == "string" ? r : void 0, c) : k, [h, k, W, r, c]), It = s === !1 ? !1 : {
|
|
235
253
|
showSizeChanger: !0,
|
|
236
|
-
showTotal:
|
|
237
|
-
...
|
|
254
|
+
showTotal: Zt,
|
|
255
|
+
...s && typeof s == "object" ? s : {}
|
|
238
256
|
}, vt = {
|
|
239
|
-
emptyText: /* @__PURE__ */
|
|
240
|
-
...
|
|
241
|
-
},
|
|
242
|
-
const
|
|
243
|
-
return
|
|
244
|
-
}), st =
|
|
245
|
-
|
|
257
|
+
emptyText: /* @__PURE__ */ f(Xt, { iconType: "simple", description: "暂无数据" }),
|
|
258
|
+
...L
|
|
259
|
+
}, Z = S(() => new Set((c || []).map(String)), [c]), Et = h && (H || []).some((t) => {
|
|
260
|
+
const n = String(t);
|
|
261
|
+
return n && !Z.has(n);
|
|
262
|
+
}), st = h && W.length > 0, Tt = h && I !== !1 ? /* @__PURE__ */ j(
|
|
263
|
+
Ft,
|
|
246
264
|
{
|
|
247
265
|
size: "small",
|
|
248
|
-
className:
|
|
266
|
+
className: M("marsun-table-row-config", o["marsun-table-row-config"]),
|
|
249
267
|
children: [
|
|
250
|
-
/* @__PURE__ */
|
|
251
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ f(dt, { size: "small", disabled: !Et, onClick: Wt, children: "隐藏选中行" }),
|
|
269
|
+
/* @__PURE__ */ j(dt, { size: "small", disabled: !st, onClick: xt, children: [
|
|
252
270
|
"恢复隐藏行",
|
|
253
|
-
st ? `(${
|
|
271
|
+
st ? `(${W.length})` : ""
|
|
254
272
|
] })
|
|
255
273
|
]
|
|
256
274
|
}
|
|
257
|
-
) : null,
|
|
258
|
-
if (!
|
|
259
|
-
const t = typeof
|
|
275
|
+
) : null, lt = I === !1 ? null : I !== void 0 ? I : Tt, D = S(() => {
|
|
276
|
+
if (!y || !h) return y;
|
|
277
|
+
const t = typeof y.columnWidth == "number" ? y.columnWidth : 48;
|
|
260
278
|
return {
|
|
261
|
-
...
|
|
279
|
+
...y,
|
|
262
280
|
columnWidth: t + 20,
|
|
263
|
-
renderCell: (
|
|
281
|
+
renderCell: (n, g, m, at) => {
|
|
264
282
|
var ut;
|
|
265
|
-
const At = ((ut =
|
|
266
|
-
return /* @__PURE__ */
|
|
283
|
+
const At = ((ut = y.renderCell) == null ? void 0 : ut.call(y, n, g, m, at)) ?? at, ct = Qt(g, m, r), J = Z.has(ct);
|
|
284
|
+
return /* @__PURE__ */ j("span", { className: o.rowSelectWithEye, children: [
|
|
267
285
|
At,
|
|
268
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ f(pt, { title: J ? "主对标不可隐藏" : "隐藏此行", children: /* @__PURE__ */ f(
|
|
269
287
|
"button",
|
|
270
288
|
{
|
|
271
289
|
type: "button",
|
|
272
|
-
className:
|
|
290
|
+
className: o.rowEyeBtn,
|
|
273
291
|
"aria-label": J ? "主对标不可隐藏" : "隐藏此行",
|
|
274
292
|
disabled: J,
|
|
275
|
-
onClick: (
|
|
276
|
-
|
|
293
|
+
onClick: (Nt) => {
|
|
294
|
+
Nt.stopPropagation(), rt(ct);
|
|
277
295
|
},
|
|
278
|
-
children: /* @__PURE__ */
|
|
296
|
+
children: /* @__PURE__ */ f(ht, { size: 14 })
|
|
279
297
|
}
|
|
280
298
|
) })
|
|
281
299
|
] });
|
|
282
300
|
}
|
|
283
301
|
};
|
|
284
|
-
}, [
|
|
302
|
+
}, [y, h, r, Z, rt]), $ = S(() => {
|
|
285
303
|
const t = gt(q);
|
|
286
304
|
if (!t) return 0;
|
|
287
|
-
const
|
|
288
|
-
return t +
|
|
289
|
-
}, [q,
|
|
290
|
-
const t = i === void 0 ? { ...
|
|
291
|
-
return
|
|
292
|
-
}, [i,
|
|
293
|
-
return /* @__PURE__ */
|
|
294
|
-
|
|
295
|
-
/* @__PURE__ */
|
|
296
|
-
|
|
305
|
+
const n = D ? typeof D.columnWidth == "number" ? D.columnWidth : 48 : 0;
|
|
306
|
+
return t + n;
|
|
307
|
+
}, [q, D]), bt = S(() => {
|
|
308
|
+
const t = i === void 0 ? { ...Yt } : { ...i };
|
|
309
|
+
return $ > 0 ? { ...t, x: $ } : t;
|
|
310
|
+
}, [i, $]);
|
|
311
|
+
return /* @__PURE__ */ j("div", { className: M("marsun-table-shell", o["marsun-table-shell"]), children: [
|
|
312
|
+
lt ? /* @__PURE__ */ f("div", { className: o["marsun-table-toolbar"], children: lt }) : null,
|
|
313
|
+
/* @__PURE__ */ f(
|
|
314
|
+
kt,
|
|
297
315
|
{
|
|
298
|
-
className:
|
|
316
|
+
className: M("marsun-table", o["marsun-table"], e),
|
|
299
317
|
style: {
|
|
300
|
-
...
|
|
301
|
-
|
|
318
|
+
...a,
|
|
319
|
+
...$ > 0 ? { "--marsun-table-scroll-x": `${$}px` } : null
|
|
302
320
|
},
|
|
303
|
-
scroll:
|
|
304
|
-
pagination:
|
|
321
|
+
scroll: bt,
|
|
322
|
+
pagination: It,
|
|
305
323
|
locale: vt,
|
|
306
324
|
columns: q,
|
|
307
|
-
dataSource:
|
|
308
|
-
rowKey:
|
|
309
|
-
rowSelection:
|
|
325
|
+
dataSource: Ht,
|
|
326
|
+
rowKey: r,
|
|
327
|
+
rowSelection: D,
|
|
310
328
|
...St
|
|
311
329
|
}
|
|
312
330
|
)
|
|
313
331
|
] });
|
|
314
332
|
}
|
|
315
333
|
export {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
334
|
+
Gt as COLUMN_CONFIG_COL_KEY,
|
|
335
|
+
fe as FLEX_SPACER_COL_KEY,
|
|
336
|
+
Dt as applyColumnConfig,
|
|
337
|
+
Mt as applyHiddenRows,
|
|
338
|
+
jt as columnsToConfig,
|
|
339
|
+
oe as default,
|
|
340
|
+
Ut as emptyTablePrefs,
|
|
341
|
+
Bt as hideColumnAtPath,
|
|
324
342
|
yt as isInternalColumnKey,
|
|
325
343
|
mt as mergeTablePrefs,
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
344
|
+
Q as normalizeHiddenRowKeys,
|
|
345
|
+
he as parseTablePrefs,
|
|
346
|
+
ye as serializeTablePrefs
|
|
329
347
|
};
|
|
330
348
|
//# sourceMappingURL=Table.js.map
|