bitz-react-admin-ui 2.7.1 → 2.7.3

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.
@@ -1,5 +1,5 @@
1
1
  import { j as o } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
- import { useContext as ve, useState as V, useEffect as we, useMemo as d, useRef as _, useLayoutEffect as Ge, useCallback as ie } from "react";
2
+ import { useContext as Ge, useState as V, useEffect as we, useMemo as d, useRef as _, useLayoutEffect as Ye, useCallback as ie } from "react";
3
3
  import { isMobile as T } from "../../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
4
4
  import { Typography as xe, Skeleton as Kt, Table as Ot, Spin as qt } from "antd";
5
5
  import ce from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
@@ -9,17 +9,17 @@ import It from "../../BitzNoData/index.mjs";
9
9
  import "../../BitzList/index.less.mjs";
10
10
  import Dt from "../../BitzList/List.mjs";
11
11
  import "../../BitzPullRefresh/style/index.less.mjs";
12
- import vt from "../../BitzPullRefresh/PullRefresh.mjs";
13
- import Gt, { BitzTableContext as Yt, toolCols as Jt } from "../Store/index.mjs";
14
- import { loopFilter as Qt, columnSort as Ut, genColumnKey as ge } from "../Store/utils/index.mjs";
15
- import Ye from "../../../node_modules/.store/ahooks@3.8.0/node_modules/ahooks/es/useSize/index.mjs";
16
- import Xt from "../../BitzTheme/index.mjs";
17
- import { tablePaddingInline as Zt } from "../../BitzConfigProvider/context.mjs";
18
- import Je from "../../BitzHighlight/index.mjs";
19
- import Et from "../../../node_modules/.store/antd@5.18.3/node_modules/antd/es/table/ExpandIcon.mjs";
12
+ import Gt from "../../BitzPullRefresh/PullRefresh.mjs";
13
+ import Yt, { BitzTableContext as Jt, toolCols as Qt } from "../Store/index.mjs";
14
+ import { loopFilter as Ut, columnSort as Xt, genColumnKey as ge } from "../Store/utils/index.mjs";
15
+ import Je from "../../../node_modules/.store/ahooks@3.8.0/node_modules/ahooks/es/useSize/index.mjs";
16
+ import Zt from "../../BitzTheme/index.mjs";
17
+ import { tablePaddingInline as Et } from "../../BitzConfigProvider/context.mjs";
18
+ import Qe from "../../BitzHighlight/index.mjs";
19
+ import vt from "../../../node_modules/.store/antd@5.18.3/node_modules/antd/es/table/ExpandIcon.mjs";
20
20
  import "../../../node_modules/.store/antd@5.18.3/node_modules/antd/es/config-provider/index.mjs";
21
21
  import At from "../../../node_modules/.store/antd@5.18.3/node_modules/antd/locale/en_US.mjs";
22
- import { getColumnsWithTool as Ft, loopBuildSkeleton as es, resetScroll as Qe } from "./utils.mjs";
22
+ import { getColumnsWithTool as Ft, loopBuildSkeleton as es, resetScroll as Ue } from "./utils.mjs";
23
23
  import { getCssVar as ts } from "./style.mjs";
24
24
  import ss from "./SortableRow.mjs";
25
25
  import os from "./SortTableContext.mjs";
@@ -29,25 +29,25 @@ import "./index.less.mjs";
29
29
  import { ConfigContext as ls } from "../../../node_modules/.store/antd@5.18.3/node_modules/antd/es/config-provider/context.mjs";
30
30
  import is from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/at.mjs";
31
31
  function cs({
32
- showPagination: J = !0,
33
- height: L,
34
- minHeight: Z,
32
+ showPagination: Q = !0,
33
+ height: H,
34
+ minHeight: E,
35
35
  dataSource: z,
36
- total: H = 0,
36
+ total: L = 0,
37
37
  columns: ae,
38
38
  loading: c,
39
- dataProps: Ue = {},
40
- skeletonNum: E = {
39
+ dataProps: Xe = {},
40
+ skeletonNum: v = {
41
41
  pc: 10,
42
42
  mobile: 10
43
43
  },
44
44
  skeletonRender: de,
45
- skeletonRowNum: Xe = 4,
46
- skeletonRowsWidth: Ze = ["35%", "100%", "100%", "60%"],
45
+ skeletonRowNum: Ze = 4,
46
+ skeletonRowsWidth: Ee = ["35%", "100%", "100%", "60%"],
47
47
  // mobileLoadEmit,
48
48
  mobileRefreshEmit: Te,
49
49
  operationFilter: a,
50
- enableControlPage: Ee,
50
+ enableControlPage: ve,
51
51
  pagination: N,
52
52
  paginationEmit: I = () => {
53
53
  },
@@ -74,13 +74,13 @@ function cs({
74
74
  ...b
75
75
  }) {
76
76
  var Ie;
77
- const { token: S } = Xt.useToken(), { Table: f } = S, ke = f.tableSpaceBetweenPage ?? 10, lt = f.cellPaddingInline ?? Zt, F = f.minHeight ?? 500, { showColumnBorder: ee, hideRowBorder: ze, rowHoverable: it, ...i } = ve(Yt), [ct, te] = V(!1), [j, at] = V([]);
77
+ const { token: S } = Zt.useToken(), { Table: f } = S, ke = f.tableSpaceBetweenPage ?? 10, lt = f.cellPaddingInline ?? Et, F = f.minHeight ?? 500, { showColumnBorder: ee, hideRowBorder: ze, rowHoverable: it, ...i } = Ge(Jt), [ct, te] = V(!1), [j, at] = V([]);
78
78
  we(() => {
79
79
  let e = [...z ?? []];
80
80
  (N == null ? void 0 : N.page) !== 1 && (e = [...j, ...e]), at(e);
81
81
  }, [T ? z : 0]);
82
- const Ne = d(() => !!(j != null && j.length) && (j == null ? void 0 : j.length) >= H, [j, H]), [se, dt] = V([]), [ut, Be] = V(!1), ft = async (e, t) => {
83
- var r, l, g;
82
+ const Ne = d(() => !!(j != null && j.length) && (j == null ? void 0 : j.length) >= L, [j, L]), [se, dt] = V([]), [ut, Be] = V(!1), ft = async (e, t) => {
83
+ var r, l, w;
84
84
  let s, n = !1;
85
85
  if (typeof a == "function")
86
86
  s = (r = a == null ? void 0 : a(e, t)) == null ? void 0 : r.filter(
@@ -90,7 +90,7 @@ function cs({
90
90
  Be(!0), te(!0), n = !0;
91
91
  try {
92
92
  const h = await (a == null ? void 0 : a.request(e, t));
93
- (g = a.fieldsName) != null && g.label ? s = h == null ? void 0 : h.map((y) => {
93
+ (w = a.fieldsName) != null && w.label ? s = h == null ? void 0 : h.map((y) => {
94
94
  var k;
95
95
  return {
96
96
  ...y,
@@ -107,11 +107,11 @@ function cs({
107
107
  }, ht = (e, t) => {
108
108
  var s, n;
109
109
  te(!1), (s = e.onClick) == null || s.call(e), !(e != null && e.onClick) && typeof a != "function" && (a != null && a.onClick) && a.onClick((n = se == null ? void 0 : se[t]) == null ? void 0 : n.key);
110
- }, he = _(null), Se = _(null), P = _(null), me = _(null), v = Ye(me), be = _(null), G = Ye(be), mt = (...e) => {
111
- Qe(he), ue == null || ue(...e);
110
+ }, he = _(null), Se = _(null), P = _(null), me = _(null), G = Je(me), be = _(null), Y = Je(be), mt = (...e) => {
111
+ Ue(he), ue == null || ue(...e);
112
112
  }, bt = (...e) => {
113
- Qe(he), I == null || I(...e);
114
- }, Y = d(() => !(u != null && u.auto) && A, [u == null ? void 0 : u.auto, A]), yt = () => {
113
+ Ue(he), I == null || I(...e);
114
+ }, J = d(() => !(u != null && u.auto) && A, [u == null ? void 0 : u.auto, A]), yt = () => {
115
115
  var s;
116
116
  const e = (s = P.current) == null ? void 0 : s.querySelectorAll(
117
117
  "& > .bitzTableContainerBody > .ant-table-wrapper.bitzTable > .ant-spin-nested-loading > .ant-spin-container > .ant-table > .ant-table-container > .ant-table-body > table > .ant-table-tbody > tr:not(.ant-table-measure-row, .ant-table-expanded-row)"
@@ -124,7 +124,7 @@ function cs({
124
124
  }), t.length)
125
125
  return Math.ceil(Math.max(...t));
126
126
  }, Ct = () => {
127
- var r, l, g, h;
127
+ var r, l, w, h;
128
128
  let e = (r = P.current) == null ? void 0 : r.querySelector(
129
129
  ".ant-table-content"
130
130
  );
@@ -132,32 +132,32 @@ function cs({
132
132
  ".ant-table-body"
133
133
  ));
134
134
  let t = 0, s = !1, n = 0;
135
- return e && (t = e.clientWidth - (ee ? 1 : 0), s = e.offsetWidth - e.clientWidth > 0, n = (h = (g = P.current) == null ? void 0 : g.querySelector(
135
+ return e && (t = e.clientWidth - (ee ? 1 : 0), s = e.offsetWidth - e.clientWidth > 0, n = (h = (w = P.current) == null ? void 0 : w.querySelector(
136
136
  ".ant-table-cell-scrollbar"
137
137
  )) == null ? void 0 : h.offsetWidth), { hasScrollBar: s, scrollbarSize: n, tbodyWidth: t };
138
138
  }, Me = d(() => {
139
- const e = (z ?? []).length, t = e > (E.pc ?? 10) ? e >= 15 ? 15 : e : E.pc ?? 10;
139
+ const e = (z ?? []).length, t = e > (v.pc ?? 10) ? e >= 15 ? 15 : e : v.pc ?? 10;
140
140
  return Array.from({ length: t }).map((n, r) => ({
141
141
  key: `${Date.now()}${r}`
142
142
  }));
143
- }, [z]), oe = d(() => c ? Me : z ?? [], [c, z, Me]), { hasScrollBar: M, scrollbarSize: B, tbodyWidth: Q } = d(() => Ct(), [oe, i.fullscreen, v == null ? void 0 : v.height]), ye = d(() => {
144
- if (typeof L > "u")
143
+ }, [z]), oe = d(() => c ? Me : z ?? [], [c, z, Me]), { hasScrollBar: M, scrollbarSize: B, tbodyWidth: U } = d(() => Ct(), [oe, i.fullscreen, G == null ? void 0 : G.height]), ye = d(() => {
144
+ if (typeof H > "u")
145
145
  return;
146
146
  let e = 40, t = 40;
147
147
  if (P.current) {
148
148
  const k = window.getComputedStyle(P.current);
149
149
  e = parseInt(k.getPropertyValue("--cell-height")), t = parseInt(k.getPropertyValue("--toolbar-height"));
150
150
  }
151
- const s = (G == null ? void 0 : G.height) || 0, n = s ? ke : 0, r = Z ?? F, l = L >= r ? L : r;
151
+ const s = (Y == null ? void 0 : Y.height) || 0, n = s ? ke : 0, r = E ?? F, l = H >= r ? H : r;
152
152
  return (i.fullscreen ? window.innerHeight : l) - s - n - t - e;
153
153
  }, [
154
154
  i.fullscreen,
155
- L,
156
- Z,
155
+ H,
156
+ E,
157
157
  F,
158
- G == null ? void 0 : G.height,
158
+ Y == null ? void 0 : Y.height,
159
159
  oe,
160
- v == null ? void 0 : v.height,
160
+ G == null ? void 0 : G.height,
161
161
  i.tableSize
162
162
  ]), wt = () => {
163
163
  let e = 0;
@@ -169,18 +169,18 @@ function cs({
169
169
  }
170
170
  let t = 0;
171
171
  return O && (t += e), W && (t += e), D && (t += e), t;
172
- }, [x, xt] = V([]), [U, gt] = V(0);
173
- Ge(() => {
172
+ }, [g, xt] = V([]), [X, gt] = V(0);
173
+ Ye(() => {
174
174
  var h;
175
- const e = ae ?? [], t = (h = e.find((y) => y.isOperationCol)) == null ? void 0 : h.width, s = e.filter((y) => !Jt.includes(y)), r = Qt(s, i.columnsMap).sort(Ut(i.columnsMap)), l = r.findIndex((y) => y.isOperationCol);
175
+ const e = ae ?? [], t = (h = e.find((y) => y.isOperationCol)) == null ? void 0 : h.width, s = e.filter((y) => !Qt.includes(y)), r = Ut(s, i.columnsMap).sort(Xt(i.columnsMap)), l = r.findIndex((y) => y.isOperationCol);
176
176
  l >= 0 && (r[l].width = t);
177
- let g = 0;
178
- T || (g = wt()), xt(r), gt(g);
177
+ let w = 0;
178
+ T || (w = wt()), xt(r), gt(w);
179
179
  }, [i.columnsMap, ae]);
180
180
  const [C, Tt] = V([]);
181
181
  we(() => {
182
- if (Y) {
183
- const e = x.map((t, s) => {
182
+ if (J) {
183
+ const e = g.map((t, s) => {
184
184
  let n = t.width;
185
185
  if (t != null && t.isOperationCol && (t != null && t.useMaxWidth)) {
186
186
  const l = yt();
@@ -193,7 +193,7 @@ function cs({
193
193
  });
194
194
  Tt(e);
195
195
  }
196
- }, [x, Y]);
196
+ }, [g, J]);
197
197
  const pe = _(!1), Pe = _(!1), ne = d(() => {
198
198
  let e;
199
199
  if (typeof ye == "number" && (e = ye - 1), typeof (u == null ? void 0 : u.y) == "number" && (e = u.y - 2), u != null && u.auto)
@@ -202,58 +202,58 @@ function cs({
202
202
  y: e
203
203
  };
204
204
  let t = u == null ? void 0 : u.x;
205
- return A && C.length && (t = C.reduce((r, l) => r + l.width, 0) + U, Q && t < Q - (M ? B : 0) && (pe.current = !0, t = Q)), u != null && u.y ? { x: t, y: u.y } : { x: t, y: e };
205
+ return A && C.length && (t = C.reduce((r, l) => r + l.width, 0) + X, U && t < U - (M ? B : 0) && (pe.current = !0, t = U)), u != null && u.y ? { x: t, y: u.y } : { x: t, y: e };
206
206
  }, [
207
207
  u,
208
208
  ye,
209
209
  A,
210
210
  C,
211
- U,
211
+ X,
212
212
  ee,
213
213
  M,
214
214
  B
215
215
  ]);
216
216
  we(() => {
217
- if (Y && C.length) {
218
- const t = C.reduce((r, l) => r + l.width, 0) + U, n = Q - (M ? B : 0);
217
+ if (J && C.length) {
218
+ const t = C.reduce((r, l) => r + l.width, 0) + X, n = U - (M ? B : 0);
219
219
  if (t < n || pe.current && t > n && !Pe.current) {
220
- const r = /* @__PURE__ */ new Map(), l = x.findIndex(
221
- (w) => w == null ? void 0 : w.isOperationCol
220
+ const r = /* @__PURE__ */ new Map(), l = g.findIndex(
221
+ (x) => x == null ? void 0 : x.isOperationCol
222
222
  );
223
- let g = "";
224
- l >= 0 && (g = ge(
225
- x[l],
223
+ let w = "";
224
+ l >= 0 && (w = ge(
225
+ g[l],
226
226
  l
227
- )), C.forEach((w) => r.set(w.key, w.width));
228
- let h = n - t, y = x.length;
227
+ )), C.forEach((x) => r.set(x.key, x.width));
228
+ let h = n - t, y = g.length;
229
229
  if (l >= 0 && y--, h >= y) {
230
- const w = Math.floor(h / y);
230
+ const x = Math.floor(h / y);
231
231
  r.forEach((re, le) => {
232
- r.set(le, re + (g === le ? 0 : w));
233
- }), h = h - w * y;
232
+ r.set(le, re + (w === le ? 0 : x));
233
+ }), h = h - x * y;
234
234
  }
235
235
  let k = 0;
236
- l === 0 && x.length > 1 && k++;
237
- const q = ge(x[k]);
236
+ l === 0 && g.length > 1 && k++;
237
+ const q = ge(g[k]);
238
238
  r.set(q, r.get(q) + h);
239
239
  const p = { ...i.columnsMap };
240
- for (const w in p)
241
- p[w].show && (p[w].width = r.get(w));
240
+ for (const x in p)
241
+ p[x].show && (p[x].width = r.get(x));
242
242
  i.setColumnsMap(p);
243
243
  }
244
244
  }
245
245
  }, [
246
- Y,
246
+ J,
247
247
  C,
248
- U,
248
+ X,
249
249
  ee,
250
250
  M,
251
251
  B
252
252
  ]);
253
253
  const $ = d(() => {
254
254
  if (T)
255
- return x;
256
- const e = x.length - 1, t = x.map((s, n) => {
255
+ return g;
256
+ const e = g.length - 1, t = g.map((s, n) => {
257
257
  var r;
258
258
  return {
259
259
  ...s,
@@ -272,12 +272,16 @@ function cs({
272
272
  },
273
273
  width: C.length ? (r = C[n]) == null ? void 0 : r.width : (s == null ? void 0 : s.width) || void 0,
274
274
  ...ne.x !== void 0 ? {
275
- onHeaderCell: (l) => ({
276
- width: l.width,
277
- stretchref: Se,
278
- datagridref: me,
279
- onResize: jt(n)
280
- })
275
+ onHeaderCell: (l) => {
276
+ var w;
277
+ return {
278
+ ...(w = s.onHeaderCell) == null ? void 0 : w.call(s),
279
+ width: l.width,
280
+ stretchref: Se,
281
+ datagridref: me,
282
+ onResize: jt(n)
283
+ };
284
+ }
281
285
  } : {},
282
286
  ...!(s != null && s.render) && s.copyable ? {
283
287
  render: (l) => ["number", "bigint"].includes(typeof l) ? l : /* @__PURE__ */ o.jsx(rs, { value: l })
@@ -291,18 +295,18 @@ function cs({
291
295
  !!O,
292
296
  !!W
293
297
  );
294
- }, [x, C]), jt = (e) => (t, { size: s, minWidth: n }) => {
298
+ }, [g, C]), jt = (e) => (t, { size: s, minWidth: n }) => {
295
299
  const l = (s.width > n ? s.width : n) - C[e].width;
296
300
  if (l === 0)
297
301
  return;
298
- const h = C.reduce((X, K) => X + K.width, 0) + l + U, k = Q - (M ? B : 0);
299
- let q = "", p = -1, w = 0;
302
+ const h = C.reduce((Z, K) => Z + K.width, 0) + l + X, k = U - (M ? B : 0);
303
+ let q = "", p = -1, x = 0;
300
304
  if (l < 0 && h < k) {
301
305
  p = e + 1;
302
- const X = x.length - 1, K = x[X];
303
- (e === X - 1 && (K != null && K.isOperationCol) || e === X && !(K != null && K.isOperationCol)) && (p = e - 1);
306
+ const Z = g.length - 1, K = g[Z];
307
+ (e === Z - 1 && (K != null && K.isOperationCol) || e === Z && !(K != null && K.isOperationCol)) && (p = e - 1);
304
308
  let De = 0;
305
- ne.x > k && (De = ne.x - k), q = `${C[p].key}`, w = C[p].width - l - De;
309
+ ne.x > k && (De = ne.x - k), q = `${C[p].key}`, x = C[p].width - l - De;
306
310
  }
307
311
  const re = `${C[e].key}`, le = {
308
312
  ...i.columnsMap,
@@ -313,12 +317,12 @@ function cs({
313
317
  ...q && p >= 0 && {
314
318
  [q]: {
315
319
  ...i.columnsMap[q],
316
- width: w
320
+ width: x
317
321
  }
318
322
  }
319
323
  };
320
324
  i.setColumnsMap(le), Pe.current = !0, i.persistenceType === "online" && i.persistenceKey && i.startAutoSaveCountdown();
321
- }, Le = d(() => es($), [$]), kt = d(() => c ? Le : $, [c, $, Le]), { table: Ce, locale: zt = At } = ve(ls), Nt = { ...zt.Table }, Bt = ((Ie = Ce == null ? void 0 : Ce.expandable) == null ? void 0 : Ie.expandIcon) || (W == null ? void 0 : W.expandIcon) || Et(Nt), He = d(() => {
325
+ }, He = d(() => es($), [$]), kt = d(() => c ? He : $, [c, $, He]), { table: Ce, locale: zt = At } = Ge(ls), Nt = { ...zt.Table }, Bt = ((Ie = Ce == null ? void 0 : Ce.expandable) == null ? void 0 : Ie.expandIcon) || (W == null ? void 0 : W.expandIcon) || vt(Nt), Le = d(() => {
322
326
  if (W)
323
327
  return {
324
328
  ...W,
@@ -338,7 +342,7 @@ function cs({
338
342
  };
339
343
  }
340
344
  };
341
- }, [W]), Wt = d(() => c ? He : W, [c, W, He]), Re = d(() => {
345
+ }, [W]), Wt = d(() => c ? Le : W, [c, W, Le]), Re = d(() => {
342
346
  if (O)
343
347
  return {
344
348
  ...O,
@@ -370,10 +374,10 @@ function cs({
370
374
  b.sticky
371
375
  ]), Pt = d(() => ({
372
376
  "--container-bgColor": S.colorBgContainer
373
- }), [S.colorBgContainer]), Lt = d(() => {
374
- const e = Z ?? F;
377
+ }), [S.colorBgContainer]), Ht = d(() => {
378
+ const e = E ?? F;
375
379
  let t;
376
- L && (t = L >= e ? L : e);
380
+ H && (t = H >= e ? H : e);
377
381
  const s = i.fullscreen ? "100%" : t;
378
382
  let n;
379
383
  return (B ?? 0) > 0 && (n = B), ts({
@@ -389,13 +393,13 @@ function cs({
389
393
  }, [
390
394
  b.style,
391
395
  i.fullscreen,
392
- L,
393
- Z,
396
+ H,
397
+ E,
394
398
  F,
395
399
  f,
396
400
  i == null ? void 0 : i.zebra,
397
401
  B
398
- ]), Ht = ie(
402
+ ]), Lt = ie(
399
403
  (e, t, s) => {
400
404
  const n = t % 2 === 0 ? "oddRow" : "evenRow";
401
405
  if (b.rowClassName) {
@@ -454,7 +458,7 @@ function cs({
454
458
  },
455
459
  t
456
460
  )),
457
- Array.from({ length: E.mobile ?? 2 }).map((e, t) => /* @__PURE__ */ o.jsx(
461
+ Array.from({ length: v.mobile ?? 2 }).map((e, t) => /* @__PURE__ */ o.jsx(
458
462
  "div",
459
463
  {
460
464
  className: "listItem",
@@ -467,8 +471,8 @@ function cs({
467
471
  {
468
472
  title: !1,
469
473
  paragraph: {
470
- rows: Xe,
471
- width: Ze
474
+ rows: Ze,
475
+ width: Ee
472
476
  },
473
477
  active: !0
474
478
  }
@@ -487,26 +491,26 @@ function cs({
487
491
  T ? f : 0,
488
492
  T ? j : 0,
489
493
  T ? $ : 0,
490
- T ? E : 0,
494
+ T ? v : 0,
491
495
  T ? de : 0
492
496
  ]);
493
- Ge(() => {
497
+ Ye(() => {
494
498
  i.setSelected(!!(m != null && m.num));
495
499
  }, [m]);
496
500
  const qe = d(() => /* @__PURE__ */ o.jsxs("div", { className: "alert", children: [
497
501
  /* @__PURE__ */ o.jsx(
498
- Je,
502
+ Qe,
499
503
  {
500
504
  highlightTag: "strong",
501
- keywords: `${H}`,
502
- sourceString: `共 ${H} 条`,
505
+ keywords: `${L}`,
506
+ sourceString: `共 ${L} 条`,
503
507
  tagClass: "totalText"
504
508
  }
505
509
  ),
506
510
  !!m && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
507
511
  /* @__PURE__ */ o.jsx(xe.Text, { className: "splitBorder", children: "/" }),
508
512
  /* @__PURE__ */ o.jsx(
509
- Je,
513
+ Qe,
510
514
  {
511
515
  highlightTag: "strong",
512
516
  keywords: `${(m == null ? void 0 : m.num) ?? 0}`,
@@ -522,21 +526,21 @@ function cs({
522
526
  }
523
527
  )
524
528
  ] })
525
- ] }), [H, m]), Rt = (e) => {
529
+ ] }), [L, m]), Rt = (e) => {
526
530
  c || fe == null || fe(e);
527
531
  }, Ve = ie(() => D ? {
528
532
  row: (e) => ss({ ...e, loading: c == null ? void 0 : c.toString() })
529
533
  } : {}, [D, D ? c : !1]), _e = ie(
530
534
  (e) => {
531
535
  var n, r;
532
- if (Y)
536
+ if (J)
533
537
  return ns({ ...e, hasScrollBar: M, scrollbarSize: B });
534
538
  const t = { ...e };
535
539
  return ((n = t.className) == null ? void 0 : n.includes(
536
540
  "ant-table-cell-fix-right"
537
541
  )) && !M && ((r = t.style) != null && r.right) && (t.style = { ...t.style ?? {} }, t.style.right = Number(t.style.right ?? 0) - (B || 0)), /* @__PURE__ */ o.jsx("th", { ...t });
538
542
  },
539
- [M, B, Y]
543
+ [M, B, J]
540
544
  ), $t = d(() => ({
541
545
  ...R,
542
546
  header: {
@@ -555,9 +559,9 @@ function cs({
555
559
  fullscreen: i.fullscreen
556
560
  }),
557
561
  style: Pt,
558
- ...Ue,
562
+ ...Xe,
559
563
  children: [
560
- !T && /* @__PURE__ */ o.jsxs("div", { ref: P, className: pt, style: Lt, children: [
564
+ !T && /* @__PURE__ */ o.jsxs("div", { ref: P, className: pt, style: Ht, children: [
561
565
  /* @__PURE__ */ o.jsxs("div", { className: "bitzTableContainerBody", ref: me, children: [
562
566
  tt && /* @__PURE__ */ o.jsxs("div", { className: "bitzTableToolbarBlock", children: [
563
567
  st || /* @__PURE__ */ o.jsx("div", {}),
@@ -597,7 +601,7 @@ function cs({
597
601
  rowSelection: St,
598
602
  onRow: Mt,
599
603
  rowHoverable: it,
600
- rowClassName: Ht,
604
+ rowClassName: Lt,
601
605
  className: "bitzTable",
602
606
  components: $t,
603
607
  rowKey: $e,
@@ -608,15 +612,15 @@ function cs({
608
612
  }
609
613
  )
610
614
  ] }),
611
- J && !!H && /* @__PURE__ */ o.jsxs("div", { className: "bitzTablePagination", ref: be, children: [
615
+ Q && !!L && /* @__PURE__ */ o.jsxs("div", { className: "bitzTablePagination", ref: be, children: [
612
616
  qe,
613
617
  /* @__PURE__ */ o.jsx(
614
618
  _t,
615
619
  {
616
620
  size: "small",
617
- enableControl: Ee,
621
+ enableControl: ve,
618
622
  pagination: N,
619
- total: H,
623
+ total: L,
620
624
  dataSource: z,
621
625
  resetPage: rt,
622
626
  hideTotalText: !0,
@@ -624,13 +628,13 @@ function cs({
624
628
  }
625
629
  )
626
630
  ] }),
627
- !J && !!m && !!H && /* @__PURE__ */ o.jsx("div", { className: "bitzTablePagination", ref: be, children: qe })
631
+ !Q && !!m && !!L && /* @__PURE__ */ o.jsx("div", { className: "bitzTablePagination", ref: be, children: qe })
628
632
  ] }),
629
633
  T && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
630
634
  (c || !!(z != null && z.length)) && /* @__PURE__ */ o.jsx(o.Fragment, { children: Te ? (
631
635
  // @ts-ignore
632
636
  /* @__PURE__ */ o.jsx(
633
- vt,
637
+ Gt,
634
638
  {
635
639
  onRefresh: async () => !c && Te(),
636
640
  children: Oe
@@ -670,7 +674,7 @@ function cs({
670
674
  }
671
675
  );
672
676
  }
673
- const Is = (J) => /* @__PURE__ */ o.jsx(Gt, { initValue: J, children: /* @__PURE__ */ o.jsx(cs, { ...J }) });
677
+ const Is = (Q) => /* @__PURE__ */ o.jsx(Yt, { initValue: Q, children: /* @__PURE__ */ o.jsx(cs, { ...Q }) });
674
678
  export {
675
679
  Is as default
676
680
  };
@@ -1,20 +1,20 @@
1
- import { j as a } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
- import { Skeleton as p, Table as d } from "antd";
3
- import { toolCols as u, SORTER_COLUMN as x } from "../Store/index.mjs";
4
- function I(t) {
1
+ import { j as E } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
+ import { Skeleton as O, Table as f } from "antd";
3
+ import { toolCols as I, SORTER_COLUMN as p } from "../Store/index.mjs";
4
+ function S(t) {
5
5
  return t == null ? void 0 : t.map((e) => {
6
6
  const o = { ...e };
7
- return e != null && e.isOperationCol || e != null && e.isCheckboxCol || e != null && e.isExpandIconCol || u.includes(e) ? e : (o != null && o.children && (o.children = I(o == null ? void 0 : o.children)), {
7
+ return e != null && e.isOperationCol || e != null && e.isCheckboxCol || e != null && e.isExpandIconCol || I.includes(e) ? e : (o != null && o.children && (o.children = S(o == null ? void 0 : o.children)), {
8
8
  ...o,
9
9
  sorter: !1,
10
- render: (r, i, l) => /* @__PURE__ */ a.jsx(
11
- p,
10
+ render: (c, d, n) => /* @__PURE__ */ E.jsx(
11
+ O,
12
12
  {
13
13
  active: !0,
14
14
  title: !1,
15
15
  paragraph: {
16
16
  rows: 1,
17
- width: (l + 1) % 2 === 0 ? "100%" : "60%"
17
+ width: (n + 1) % 2 === 0 ? "100%" : "60%"
18
18
  }
19
19
  }
20
20
  )
@@ -22,35 +22,35 @@ function I(t) {
22
22
  });
23
23
  }
24
24
  const L = (t) => {
25
- var o, r, i, l;
26
- let e = (r = (o = t.current) == null ? void 0 : o.nativeElement) == null ? void 0 : r.querySelector(".ant-table-content");
27
- e || (e = (l = (i = t.current) == null ? void 0 : i.nativeElement) == null ? void 0 : l.querySelector(".ant-table-body")), e && e.scroll({
25
+ var o, c, d, n;
26
+ let e = (c = (o = t.current) == null ? void 0 : o.nativeElement) == null ? void 0 : c.querySelector(".ant-table-content");
27
+ e || (e = (n = (d = t.current) == null ? void 0 : d.nativeElement) == null ? void 0 : n.querySelector(".ant-table-body")), e && e.scroll({
28
28
  top: 0,
29
29
  left: 0
30
30
  // behavior: 'smooth'
31
31
  });
32
- }, E = 0, O = 1, h = 2;
33
- function b(t, e, o, r, i) {
34
- const l = [...t ?? []], c = [...e];
35
- let f = E;
36
- if (o) {
37
- const n = l.indexOf(x);
38
- n >= 0 && (f = n), c.splice(f, 0, x);
39
- }
40
- let s = 0;
41
- if (r) {
42
- const n = l.indexOf(d.SELECTION_COLUMN);
43
- n >= 0 && (s = n), o && f === 0 && n === -1 && (s = O), c.splice(s, 0, d.SELECTION_COLUMN);
44
- }
45
- if (i) {
46
- let n = 0;
47
- const C = l.indexOf(d.EXPAND_COLUMN);
48
- C >= 0 && (n = C), o && f === 0 && C === -1 && (n = 1), r && s === 1 && C === -1 && (n = h), c.splice(n, 0, d.EXPAND_COLUMN);
49
- }
50
- return c;
32
+ }, a = 0, C = 1, h = 2;
33
+ function y(t, e, o, c, d) {
34
+ const n = [...t ?? []], x = [...e];
35
+ let r = n.indexOf(p);
36
+ o ? r === -1 && (r = a) : r = -1;
37
+ let l = n.indexOf(f.SELECTION_COLUMN);
38
+ c ? l === -1 && (r === a ? l = C : r === -1 && (l = 0)) : l = -1;
39
+ let i = n.indexOf(f.EXPAND_COLUMN);
40
+ return d ? i === -1 && (r === a && l === C ? i = h : r === -1 && l === -1 ? i = 0 : (r === a && l === -1 || r === -1 && [0, C].includes(l)) && (i = 1)) : i = -1, [
41
+ { key: "sorter", order: r, col: p },
42
+ {
43
+ key: "selection",
44
+ order: l,
45
+ col: f.SELECTION_COLUMN
46
+ },
47
+ { key: "expand", order: i, col: f.EXPAND_COLUMN }
48
+ ].filter((s) => s.order >= 0).sort((s, u) => s.order - u.order).forEach((s) => {
49
+ x.splice(s.order, 0, s.col);
50
+ }), x;
51
51
  }
52
52
  export {
53
- b as getColumnsWithTool,
54
- I as loopBuildSkeleton,
53
+ y as getColumnsWithTool,
54
+ S as loopBuildSkeleton,
55
55
  L as resetScroll
56
56
  };
@@ -1,17 +1,17 @@
1
1
  import { j as e } from "../../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
2
  import { Flex as l, Switch as i } from "antd";
3
- import { useId as d } from "react";
4
- const r = "stylesScope", m = ({ value: o, disabled: t, onChange: c }) => {
5
- const s = d();
6
- return /* @__PURE__ */ e.jsxs(l, { gap: 10, children: [
7
- /* @__PURE__ */ e.jsx("label", { htmlFor: `${r}${s}`, className: "stylesScopeLabel", children: "应用到全局表格" }),
3
+ import { useId as n } from "react";
4
+ const s = "stylesScope", h = ({ value: t, disabled: o, onChange: c }) => {
5
+ const r = n();
6
+ return /* @__PURE__ */ e.jsxs(l, { align: "center", gap: 10, children: [
7
+ /* @__PURE__ */ e.jsx("label", { htmlFor: `${s}${r}`, className: "stylesScopeLabel", children: "应用到全局表格" }),
8
8
  /* @__PURE__ */ e.jsx(
9
9
  i,
10
10
  {
11
- id: `${r}${s}`,
12
- value: o,
11
+ id: `${s}${r}`,
12
+ value: t,
13
13
  onChange: c,
14
- disabled: t,
14
+ disabled: o,
15
15
  checkedChildren: "是",
16
16
  unCheckedChildren: "否"
17
17
  }
@@ -19,5 +19,5 @@ const r = "stylesScope", m = ({ value: o, disabled: t, onChange: c }) => {
19
19
  ] });
20
20
  };
21
21
  export {
22
- m as default
22
+ h as default
23
23
  };
@@ -1,5 +1,5 @@
1
1
  import { getDefaultExportFromCjs as u } from "../../../../../_virtual/_commonjsHelpers.mjs";
2
- import { __module as i } from "../../../../../_virtual/index.mjs";
2
+ import { __module as i } from "../../../../../_virtual/index2.mjs";
3
3
  /*!
4
4
  Copyright (c) 2018 Jed Watson.
5
5
  Licensed under the MIT License (MIT), see
@@ -1,5 +1,5 @@
1
1
  import { getDefaultExportFromCjs as e } from "../../../../../_virtual/_commonjsHelpers.mjs";
2
- import { __module as r } from "../../../../../_virtual/index2.mjs";
2
+ import { __module as r } from "../../../../../_virtual/index.mjs";
3
3
  import { __require as o } from "../../../react-is@16.13.1/node_modules/react-is/index.mjs";
4
4
  import { __require as p } from "./factoryWithTypeCheckers.mjs";
5
5
  import { __require as t } from "./factoryWithThrowingShims.mjs";