bitz-react-admin-ui 2.6.5 → 2.6.6

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.
Files changed (28) hide show
  1. package/dist/_virtual/dayjs.min.mjs +2 -5
  2. package/dist/_virtual/index.mjs +2 -2
  3. package/dist/_virtual/index2.mjs +2 -2
  4. package/dist/components/BitzCalendar/index.mjs +1 -1
  5. package/dist/components/BitzDayJs/index.mjs +1 -1
  6. package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +1 -1
  7. package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +1 -1
  8. package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +1 -1
  9. package/dist/components/BitzFuiCalendar/CalendarBody.mjs +1 -1
  10. package/dist/components/BitzFuiCalendar/CalendarHead.mjs +1 -1
  11. package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +1 -1
  12. package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +1 -1
  13. package/dist/components/BitzFuiCalendar/ColumnData.mjs +1 -1
  14. package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +1 -1
  15. package/dist/components/BitzMeetingTime/index.mjs +1 -1
  16. package/dist/components/BitzTable/ActionCol/index.mjs +108 -84
  17. package/dist/components/BitzTable/Table/index.mjs +276 -278
  18. package/dist/components/BitzTable/index.d.ts +1 -0
  19. package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
  20. package/dist/node_modules/.store/dayjs@1.11.11/node_modules/dayjs/dayjs.min.mjs +292 -292
  21. package/dist/node_modules/.store/dayjs@1.11.11/node_modules/dayjs/locale/zh-cn.mjs +13 -13
  22. package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
  23. package/dist/node_modules/.store/react-is@18.3.1/node_modules/react-is/index.mjs +1 -1
  24. package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/index.mjs +1 -1
  25. package/dist/style.css +1 -1
  26. package/dist/utils/time.mjs +1 -1
  27. package/package.json +1 -1
  28. package/dist/_virtual/dayjs.min2.mjs +0 -4
@@ -1,43 +1,43 @@
1
1
  import { j as o } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
- import { useContext as _e, useState as _, useEffect as we, useMemo as u, useRef as X, useLayoutEffect as ve, useCallback as ie } from "react";
3
- import { isMobile as j } from "../../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
4
- import { Typography as xe, Skeleton as $t, Table as Kt, Spin as Ot } from "antd";
2
+ import { useContext as ve, useState as X, useEffect as we, useMemo as a, useRef as V, useCallback as ie, useLayoutEffect as Ht } from "react";
3
+ import { isMobile as T } from "../../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
4
+ import { Typography as xe, Skeleton as Rt, Table as $t, Spin as Kt } from "antd";
5
5
  import ce from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
6
- import qt from "../../BitzDrawer/index.mjs";
7
- import Vt from "../../BitzPagination/index.mjs";
8
- import It from "../../BitzNoData/index.mjs";
6
+ import Ot from "../../BitzDrawer/index.mjs";
7
+ import qt from "../../BitzPagination/index.mjs";
8
+ import Vt from "../../BitzNoData/index.mjs";
9
9
  import "../../BitzList/index.less.mjs";
10
- import Dt from "../../BitzList/List.mjs";
10
+ import _t from "../../BitzList/List.mjs";
11
11
  import "../../BitzPullRefresh/style/index.less.mjs";
12
- import _t from "../../BitzPullRefresh/PullRefresh.mjs";
13
- import vt, { BitzTableContext as Gt, toolCols as Yt } from "../Store/index.mjs";
14
- import { loopFilter as Jt, columnSort as Qt, genColumnKey as ge } from "../Store/utils/index.mjs";
12
+ import It from "../../BitzPullRefresh/PullRefresh.mjs";
13
+ import Dt, { BitzTableContext as vt, toolCols as Gt } from "../Store/index.mjs";
14
+ import { loopFilter as Yt, columnSort as Jt, genColumnKey as ge } from "../Store/utils/index.mjs";
15
15
  import Ge from "../../../node_modules/.store/ahooks@3.8.0/node_modules/ahooks/es/useSize/index.mjs";
16
- import Ut from "../../BitzTheme/index.mjs";
17
- import { tablePaddingInline as Xt } from "../../BitzConfigProvider/context.mjs";
16
+ import Qt from "../../BitzTheme/index.mjs";
17
+ import { tablePaddingInline as Ut } from "../../BitzConfigProvider/context.mjs";
18
18
  import Ye from "../../BitzHighlight/index.mjs";
19
- import Zt from "../../../node_modules/.store/antd@5.18.3/node_modules/antd/es/table/ExpandIcon.mjs";
19
+ import Xt 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
- import Et from "../../../node_modules/.store/antd@5.18.3/node_modules/antd/locale/en_US.mjs";
22
- import { getColumnsWithTool as At, loopBuildSkeleton as Ft, resetScroll as Je } from "./utils.mjs";
23
- import { getCssVar as es } from "./style.mjs";
24
- import ts from "./SortableRow.mjs";
25
- import ss from "./SortTableContext.mjs";
26
- import os from "./ResizableTitle copy.mjs";
27
- import ns from "../TextOverflow/index.mjs";
21
+ import Zt from "../../../node_modules/.store/antd@5.18.3/node_modules/antd/locale/en_US.mjs";
22
+ import { getColumnsWithTool as Et, loopBuildSkeleton as At, resetScroll as Je } from "./utils.mjs";
23
+ import { getCssVar as Ft } from "./style.mjs";
24
+ import es from "./SortableRow.mjs";
25
+ import ts from "./SortTableContext.mjs";
26
+ import ss from "./ResizableTitle copy.mjs";
27
+ import os from "../TextOverflow/index.mjs";
28
28
  import "./index.less.mjs";
29
- import { ConfigContext as rs } from "../../../node_modules/.store/antd@5.18.3/node_modules/antd/es/config-provider/context.mjs";
30
- import ls from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/at.mjs";
31
- function is({
32
- showPagination: Z = !0,
29
+ import { ConfigContext as ns } from "../../../node_modules/.store/antd@5.18.3/node_modules/antd/es/config-provider/context.mjs";
30
+ import rs from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/at.mjs";
31
+ function ls({
32
+ showPagination: Y = !0,
33
33
  height: L,
34
- minHeight: ee,
34
+ minHeight: Z,
35
35
  dataSource: z,
36
36
  total: H = 0,
37
37
  columns: ae,
38
- loading: a,
38
+ loading: c,
39
39
  dataProps: Qe = {},
40
- skeletonNum: te = {
40
+ skeletonNum: E = {
41
41
  pc: 10,
42
42
  mobile: 10
43
43
  },
@@ -49,71 +49,71 @@ function is({
49
49
  operationFilter: d,
50
50
  enableControlPage: Ze,
51
51
  pagination: N,
52
- paginationEmit: v = () => {
52
+ paginationEmit: _ = () => {
53
53
  },
54
- onChange: fe,
55
- enabledRowDragSort: G,
56
- onRowDragEnd: ue,
57
- resizableColumns: se,
58
- mobilePageHeight: cs = 500,
54
+ onChange: ue,
55
+ enabledRowDragSort: I,
56
+ onRowDragEnd: fe,
57
+ resizableColumns: A,
58
+ mobilePageHeight: is = 500,
59
59
  mobileCancelText: Ee = "取消",
60
60
  noDataTitle: Ae,
61
61
  noDataImg: Fe,
62
- color: as,
62
+ color: cs,
63
63
  size: je,
64
64
  showTableTool: et = !0,
65
65
  tableAction: tt,
66
66
  tableToolbar: st,
67
67
  selectionBar: ot,
68
- scroll: h,
68
+ scroll: u,
69
69
  components: R,
70
70
  expandable: W,
71
- rowSelection: q,
72
- selectionAlert: y,
71
+ rowSelection: O,
72
+ selectionAlert: m,
73
73
  resetPage: nt,
74
- ...C
74
+ ...b
75
75
  }) {
76
76
  var Ie;
77
- const { token: S } = Ut.useToken(), { Table: m } = S, ke = m.tableSpaceBetweenPage ?? 10, rt = m.cellPaddingInline ?? Xt, oe = m.minHeight ?? 500, { showColumnBorder: V, hideRowBorder: ze, rowHoverable: lt, ...i } = _e(Gt), [it, ne] = _(!1), [k, ct] = _([]);
77
+ const { token: S } = Qt.useToken(), { Table: f } = S, ke = f.tableSpaceBetweenPage ?? 10, rt = f.cellPaddingInline ?? Ut, F = f.minHeight ?? 500, { showColumnBorder: ee, hideRowBorder: ze, rowHoverable: lt, ...i } = ve(vt), [it, te] = X(!1), [j, ct] = X([]);
78
78
  we(() => {
79
79
  let e = [...z ?? []];
80
- (N == null ? void 0 : N.page) !== 1 && (e = [...k, ...e]), ct(e);
81
- }, [j ? z : 0]);
82
- const Ne = u(() => !!(k != null && k.length) && (k == null ? void 0 : k.length) >= H, [k, H]), [re, at] = _([]), [dt, Be] = _(!1), ft = async (e, t) => {
83
- var r, l, f;
80
+ (N == null ? void 0 : N.page) !== 1 && (e = [...j, ...e]), ct(e);
81
+ }, [T ? z : 0]);
82
+ const Ne = a(() => !!(j != null && j.length) && (j == null ? void 0 : j.length) >= H, [j, H]), [se, at] = X([]), [dt, Be] = X(!1), ut = async (e, t) => {
83
+ var r, l, g;
84
84
  let s, n = !1;
85
85
  if (typeof d == "function")
86
86
  s = (r = d == null ? void 0 : d(e, t)) == null ? void 0 : r.filter(
87
- (c) => c.type !== "divider"
87
+ (h) => h.type !== "divider"
88
88
  );
89
89
  else if (s = (l = d == null ? void 0 : d.custom) == null ? void 0 : l.call(d, e, t), d != null && d.request) {
90
- Be(!0), ne(!0), n = !0;
90
+ Be(!0), te(!0), n = !0;
91
91
  try {
92
- const c = await (d == null ? void 0 : d.request(e, t));
93
- (f = d.fieldsName) != null && f.label ? s = c == null ? void 0 : c.map((b) => {
94
- var g;
92
+ const h = await (d == null ? void 0 : d.request(e, t));
93
+ (g = d.fieldsName) != null && g.label ? s = h == null ? void 0 : h.map((y) => {
94
+ var k;
95
95
  return {
96
- ...b,
97
- label: b == null ? void 0 : b[((g = d.fieldsName) == null ? void 0 : g.label) ?? "label"]
96
+ ...y,
97
+ label: y == null ? void 0 : y[((k = d.fieldsName) == null ? void 0 : k.label) ?? "label"]
98
98
  };
99
- }) : s = c ?? [];
99
+ }) : s = h ?? [];
100
100
  } finally {
101
101
  Be(!1);
102
102
  }
103
103
  }
104
- s != null && s.length && (at(s), n || ne(!0));
104
+ s != null && s.length && (at(s), n || te(!0));
105
105
  }, We = () => {
106
- ne(!1);
107
- }, ut = (e, t) => {
106
+ te(!1);
107
+ }, ft = (e, t) => {
108
108
  var s, n;
109
- ne(!1), (s = e.onClick) == null || s.call(e), !(e != null && e.onClick) && typeof d != "function" && (d != null && d.onClick) && d.onClick((n = re == null ? void 0 : re[t]) == null ? void 0 : n.key);
110
- }, he = X(null), Se = X(null), p = X(null), Y = X(null), J = Ge(Y), me = X(null), Q = Ge(me), ht = (...e) => {
111
- Je(he), fe == null || fe(...e);
109
+ te(!1), (s = e.onClick) == null || s.call(e), !(e != null && e.onClick) && typeof d != "function" && (d != null && d.onClick) && d.onClick((n = se == null ? void 0 : se[t]) == null ? void 0 : n.key);
110
+ }, he = V(null), Se = V(null), P = V(null), me = V(null), D = Ge(me), be = V(null), v = Ge(be), ht = (...e) => {
111
+ Je(he), ue == null || ue(...e);
112
112
  }, mt = (...e) => {
113
- Je(he), v == null || v(...e);
114
- }, U = u(() => !(h != null && h.auto) && se, [h == null ? void 0 : h.auto, se]), bt = () => {
113
+ Je(he), _ == null || _(...e);
114
+ }, G = a(() => !(u != null && u.auto) && A, [u == null ? void 0 : u.auto, A]), bt = () => {
115
115
  var s;
116
- const e = (s = p.current) == null ? void 0 : s.querySelectorAll(
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)"
118
118
  ), t = [];
119
119
  if (e == null || e.forEach((n) => {
@@ -122,140 +122,136 @@ function is({
122
122
  ((r = n.querySelector("& > .operationCol .actionGroup")) == null ? void 0 : r.clientWidth) || 0
123
123
  );
124
124
  }), t.length)
125
- return Math.ceil(Math.max(...t)) + rt * 2;
125
+ return Math.ceil(Math.max(...t));
126
126
  }, yt = () => {
127
- var n, r, l, f;
128
- let e = (n = p.current) == null ? void 0 : n.querySelector(
127
+ var r, l, g, h;
128
+ let e = (r = P.current) == null ? void 0 : r.querySelector(
129
129
  ".ant-table-content"
130
130
  );
131
- e || (e = (r = p.current) == null ? void 0 : r.querySelector(
131
+ e || (e = (l = P.current) == null ? void 0 : l.querySelector(
132
132
  ".ant-table-body"
133
133
  ));
134
- let t = !1, s = 0;
135
- return e && (e.clientWidth - (V ? 1 : 0), t = e.offsetWidth - e.clientWidth > 0, s = (f = (l = p.current) == null ? void 0 : l.querySelector(
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(
136
136
  ".ant-table-cell-scrollbar"
137
- )) == null ? void 0 : f.offsetWidth), { hasScrollBar: t, scrollbarSize: s };
138
- }, Me = u(() => {
139
- const e = (z ?? []).length, t = e > (te.pc ?? 10) ? e >= 15 ? 15 : e : te.pc ?? 10;
137
+ )) == null ? void 0 : h.offsetWidth), { hasScrollBar: s, scrollbarSize: n, tbodyWidth: t };
138
+ }, Me = a(() => {
139
+ const e = (z ?? []).length, t = e > (E.pc ?? 10) ? e >= 15 ? 15 : e : E.pc ?? 10;
140
140
  return Array.from({ length: t }).map((n, r) => ({
141
141
  key: `${Date.now()}${r}`
142
142
  }));
143
- }, [z]), pe = u(() => a ? Me : z ?? [], [a, z, Me]), { hasScrollBar: M, scrollbarSize: B } = u(() => yt(), [J == null ? void 0 : J.height, i.fullscreen]), be = u(() => {
143
+ }, [z]), oe = a(() => c ? Me : z ?? [], [c, z, Me]), { hasScrollBar: M, scrollbarSize: B, tbodyWidth: J } = a(() => yt(), [oe, i.fullscreen, D == null ? void 0 : D.height]), ye = a(() => {
144
144
  if (typeof L > "u")
145
145
  return;
146
146
  let e = 40, t = 40;
147
- if (p.current) {
148
- const g = window.getComputedStyle(p.current);
149
- e = parseInt(g.getPropertyValue("--cell-height")), t = parseInt(g.getPropertyValue("--toolbar-height"));
147
+ if (P.current) {
148
+ const k = window.getComputedStyle(P.current);
149
+ e = parseInt(k.getPropertyValue("--cell-height")), t = parseInt(k.getPropertyValue("--toolbar-height"));
150
150
  }
151
- const s = (Q == null ? void 0 : Q.height) || 0, n = s ? ke : 0, r = ee ?? oe, l = L >= r ? L : r;
151
+ const s = (v == null ? void 0 : v.height) || 0, n = s ? ke : 0, r = Z ?? F, l = L >= r ? L : r;
152
152
  return (i.fullscreen ? window.innerHeight : l) - s - n - t - e;
153
153
  }, [
154
154
  i.fullscreen,
155
155
  L,
156
- ee,
156
+ Z,
157
+ F,
158
+ v == null ? void 0 : v.height,
157
159
  oe,
158
- Q == null ? void 0 : Q.height,
159
- J == null ? void 0 : J.height,
160
+ D == null ? void 0 : D.height,
160
161
  i.tableSize
161
162
  ]), Ct = () => {
162
163
  let e = 0;
163
- if (p.current) {
164
- const s = window.getComputedStyle(p.current), n = parseInt(
164
+ if (P.current) {
165
+ const s = window.getComputedStyle(P.current), n = parseInt(
165
166
  s.getPropertyValue("--toolCell-paddingInline")
166
167
  );
167
168
  e = parseInt(s.getPropertyValue("--fontSize")) + 4 + 2 * n;
168
169
  }
169
170
  let t = 0;
170
- return q && (t += e), W && (t += e), G && (t += e), t;
171
- }, [T, wt] = _([]), [E, xt] = _(0);
172
- ve(() => {
173
- var c;
174
- const e = ae ?? [], t = (c = e.find((b) => b.isOperationCol)) == null ? void 0 : c.width, s = e.filter((b) => !Yt.includes(b)), r = Jt(s, i.columnsMap).sort(Qt(i.columnsMap)), l = r.findIndex((b) => b.isOperationCol);
171
+ return O && (t += e), W && (t += e), I && (t += e), t;
172
+ }, { sortColumns: x, toolColWidth: Q } = a(() => {
173
+ var h;
174
+ const e = ae ?? [], t = (h = e.find((y) => y.isOperationCol)) == null ? void 0 : h.width, s = e.filter((y) => !Gt.includes(y)), r = Yt(s, i.columnsMap).sort(Jt(i.columnsMap)), l = r.findIndex((y) => y.isOperationCol);
175
175
  l >= 0 && (r[l].width = t);
176
- let f = 0;
177
- j || (f = Ct()), wt(r), xt(f);
178
- }, [i.columnsMap, ae]);
179
- const [w, gt] = _([]);
176
+ let g = 0;
177
+ return T || (g = Ct()), { sortColumns: r, toolColWidth: g };
178
+ }, [i.columnsMap, ae]), [C, wt] = X([]);
180
179
  we(() => {
181
- if (U) {
182
- const e = T.map((t, s) => {
180
+ if (G) {
181
+ const e = x.map((t, s) => {
183
182
  let n = t.width;
184
- return t != null && t.isOperationCol && (t != null && t.useMaxWidth) && (n = bt() ?? t.width), {
183
+ if (t != null && t.isOperationCol && (t != null && t.useMaxWidth)) {
184
+ const l = bt();
185
+ l && (n = l + rt * 2);
186
+ }
187
+ return {
185
188
  key: ge(t, s),
186
189
  width: n ?? 0
187
190
  };
188
191
  });
189
- gt(e);
192
+ wt(e);
190
193
  }
191
- }, [T, U]);
192
- const le = u(() => {
193
- var s;
194
+ }, [x, G]);
195
+ const pe = V(!1), Pe = V(!1), ne = a(() => {
194
196
  let e;
195
- if (typeof be == "number" && (e = be - 1), typeof (h == null ? void 0 : h.y) == "number" && (e = h.y - 2), h != null && h.auto)
197
+ if (typeof ye == "number" && (e = ye - 1), typeof (u == null ? void 0 : u.y) == "number" && (e = u.y - 2), u != null && u.auto)
196
198
  return {
197
199
  x: void 0,
198
200
  y: e
199
201
  };
200
- let t = h == null ? void 0 : h.x;
201
- if (se && w.length) {
202
- t = w.reduce((b, g) => b + g.width, 0) + E;
203
- const r = V ? 1 : 0, l = M ? B : 0, f = t + r + l, c = (s = Y.current) == null ? void 0 : s.offsetWidth;
204
- c && f < c && (t = c - r - l);
205
- }
206
- return h != null && h.y ? { x: t, y: h.y } : { x: t, y: e };
202
+ let t = u == null ? void 0 : u.x;
203
+ return A && C.length && (t = C.reduce((r, l) => r + l.width, 0) + Q, J && t < J - (M ? B : 0) && (pe.current = !0, t = J)), u != null && u.y ? { x: t, y: u.y } : { x: t, y: e };
207
204
  }, [
208
- h,
209
- be,
210
- se,
211
- w,
212
- E,
213
- V,
205
+ u,
206
+ ye,
207
+ A,
208
+ C,
209
+ Q,
210
+ ee,
214
211
  M,
215
212
  B
216
213
  ]);
217
- X(!1), we(() => {
218
- var e;
219
- if (U && w.length) {
220
- const t = w.reduce((f, c) => f + c.width, 0), s = V ? 1 : 0, n = M ? B : 0, r = t + E + s + n, l = (e = Y.current) == null ? void 0 : e.offsetWidth;
221
- if (l && r < l) {
222
- const f = /* @__PURE__ */ new Map(), c = T.findIndex(
223
- (x) => x == null ? void 0 : x.isOperationCol
214
+ we(() => {
215
+ if (G && C.length) {
216
+ const t = C.reduce((r, l) => r + l.width, 0) + Q, n = J - (M ? B : 0);
217
+ if (t < n || pe.current && t > n && !Pe.current) {
218
+ const r = /* @__PURE__ */ new Map(), l = x.findIndex(
219
+ (w) => w == null ? void 0 : w.isOperationCol
224
220
  );
225
- let b = "";
226
- c >= 0 && (b = ge(
227
- T[c],
228
- c
229
- )), w.forEach((x) => f.set(x.key, x.width));
230
- let g = l - r, P = T.length;
231
- if (c >= 0 && P--, g >= P) {
232
- const x = Math.floor(g / P);
233
- f.forEach((Ce, A) => {
234
- f.set(A, Ce + (b === A ? 0 : x));
235
- }), g = g - x * P;
221
+ let g = "";
222
+ l >= 0 && (g = ge(
223
+ x[l],
224
+ l
225
+ )), C.forEach((w) => r.set(w.key, w.width));
226
+ let h = n - t, y = x.length;
227
+ if (l >= 0 && y--, h >= y) {
228
+ const w = Math.floor(h / y);
229
+ r.forEach((re, le) => {
230
+ r.set(le, re + (g === le ? 0 : w));
231
+ }), h = h - w * y;
236
232
  }
237
- let I = 0;
238
- c === 0 && T.length > 1 && I++;
239
- const K = ge(T[I]);
240
- f.set(K, f.get(K) + g);
241
- const D = { ...i.columnsMap };
242
- for (const x in D)
243
- D[x].show && (D[x].width = f.get(x));
244
- i.setColumnsMap(D);
233
+ let k = 0;
234
+ l === 0 && x.length > 1 && k++;
235
+ const q = ge(x[k]);
236
+ r.set(q, r.get(q) + h);
237
+ const p = { ...i.columnsMap };
238
+ for (const w in p)
239
+ p[w].show && (p[w].width = r.get(w));
240
+ i.setColumnsMap(p);
245
241
  }
246
242
  }
247
243
  }, [
248
- U,
249
- w,
250
- E,
251
- V,
244
+ G,
245
+ C,
246
+ Q,
247
+ ee,
252
248
  M,
253
249
  B
254
250
  ]);
255
- const $ = u(() => {
256
- if (j)
257
- return T;
258
- const e = T.length - 1, t = T.map((s, n) => {
251
+ const $ = a(() => {
252
+ if (T)
253
+ return x;
254
+ const e = x.length - 1, t = x.map((s, n) => {
259
255
  var r;
260
256
  return {
261
257
  ...s,
@@ -272,59 +268,61 @@ function is({
272
268
  ...e === n && {
273
269
  className: ce(s.className, "lastColumn")
274
270
  },
275
- width: w.length ? (r = w[n]) == null ? void 0 : r.width : (s == null ? void 0 : s.width) || void 0,
276
- ...le.x !== void 0 ? {
271
+ width: C.length ? (r = C[n]) == null ? void 0 : r.width : (s == null ? void 0 : s.width) || void 0,
272
+ ...ne.x !== void 0 ? {
277
273
  onHeaderCell: (l) => ({
278
274
  width: l.width,
279
275
  stretchref: Se,
280
- datagridref: Y,
281
- onResize: Tt(n)
276
+ datagridref: me,
277
+ onResize: xt(n)
282
278
  })
283
279
  } : {},
284
280
  ...!(s != null && s.render) && s.copyable ? {
285
- render: (l) => ["number", "bigint"].includes(typeof l) ? l : /* @__PURE__ */ o.jsx(ns, { value: l })
281
+ render: (l) => ["number", "bigint"].includes(typeof l) ? l : /* @__PURE__ */ o.jsx(os, { value: l })
286
282
  } : {}
287
283
  };
288
284
  });
289
- return At(
285
+ return Et(
290
286
  ae,
291
287
  t,
292
- G,
293
- !!q,
288
+ I,
289
+ !!O,
294
290
  !!W
295
291
  );
296
- }, [T, w]), Tt = (e) => (t, { size: s, minWidth: n }) => {
297
- var A;
298
- const l = (s.width > n ? s.width : n) - w[e].width, f = w.reduce((F, O) => F + O.width, 0) + l, c = V ? 1 : 0, b = M ? B : 0, g = f + E + c + b, P = (A = Y.current) == null ? void 0 : A.offsetWidth;
299
- let I = "", K = -1, D = 0;
300
- if (P && l < 0 && g < P) {
301
- K = e + 1;
302
- const F = T.length - 1, O = T[F];
303
- (e === F - 1 && (O != null && O.isOperationCol) || e === F && !(O != null && O.isOperationCol)) && (K = e - 1);
292
+ }, [x, C]), xt = (e) => (t, { size: s, minWidth: n }) => {
293
+ const l = (s.width > n ? s.width : n) - C[e].width;
294
+ if (l === 0)
295
+ return;
296
+ const h = C.reduce((U, K) => U + K.width, 0) + l + Q, k = J - (M ? B : 0);
297
+ let q = "", p = -1, w = 0;
298
+ if (l < 0 && h < k) {
299
+ p = e + 1;
300
+ const U = x.length - 1, K = x[U];
301
+ (e === U - 1 && (K != null && K.isOperationCol) || e === U && !(K != null && K.isOperationCol)) && (p = e - 1);
304
302
  let De = 0;
305
- le.x > P - c - b && (De = le.x - P + c + b), I = `${w[K].key}`, D = w[K].width - l - De;
303
+ ne.x > k && (De = ne.x - k), q = `${C[p].key}`, w = C[p].width - l - De;
306
304
  }
307
- const x = `${w[e].key}`, Ce = {
305
+ const re = `${C[e].key}`, le = {
308
306
  ...i.columnsMap,
309
- [x]: {
310
- ...i.columnsMap[x],
311
- width: w[e].width + l
307
+ [re]: {
308
+ ...i.columnsMap[re],
309
+ width: C[e].width + l
312
310
  },
313
- ...I && K >= 0 && {
314
- [I]: {
315
- ...i.columnsMap[I],
316
- width: D
311
+ ...q && p >= 0 && {
312
+ [q]: {
313
+ ...i.columnsMap[q],
314
+ width: w
317
315
  }
318
316
  }
319
317
  };
320
- i.setColumnsMap(Ce), i.persistenceType === "online" && i.persistenceKey && i.startAutoSaveCountdown();
321
- }, Pe = u(() => Ft($), [$]), jt = u(() => a ? Pe : $, [a, $, Pe]), { table: ye, locale: kt = Et } = _e(rs), zt = { ...kt.Table }, Nt = ((Ie = ye == null ? void 0 : ye.expandable) == null ? void 0 : Ie.expandIcon) || (W == null ? void 0 : W.expandIcon) || Zt(zt), Le = u(() => {
318
+ i.setColumnsMap(le), Pe.current = !0, i.persistenceType === "online" && i.persistenceKey && i.startAutoSaveCountdown();
319
+ }, Le = a(() => At($), [$]), gt = a(() => c ? Le : $, [c, $, Le]), { table: Ce, locale: Tt = Zt } = ve(ns), jt = { ...Tt.Table }, kt = ((Ie = Ce == null ? void 0 : Ce.expandable) == null ? void 0 : Ie.expandIcon) || (W == null ? void 0 : W.expandIcon) || Xt(jt), He = a(() => {
322
320
  if (W)
323
321
  return {
324
322
  ...W,
325
323
  expandedRowRender: () => /* @__PURE__ */ o.jsx(o.Fragment, {}),
326
324
  expandIcon: (e) => {
327
- const t = Nt(e);
325
+ const t = kt(e);
328
326
  return {
329
327
  ...t,
330
328
  props: {
@@ -338,80 +336,80 @@ function is({
338
336
  };
339
337
  }
340
338
  };
341
- }, [W]), Bt = u(() => a ? Le : W, [a, W, Le]), He = u(() => {
342
- if (q)
339
+ }, [W]), zt = a(() => c ? He : W, [c, W, He]), Re = a(() => {
340
+ if (O)
343
341
  return {
344
- ...q,
342
+ ...O,
345
343
  selectedRowKeys: [],
346
344
  getCheckboxProps: () => ({ disabled: !0 })
347
345
  };
348
- }, [q]), Wt = u(() => a ? He : q, [a, q, He]), Re = u(() => a ? "key" : C.rowKey, [a, C.rowKey]), $e = u(() => `${je ?? i.stylesConfig.size}BitzTable`, [je, i.stylesConfig.size]), St = ie(
346
+ }, [O]), Nt = a(() => c ? Re : O, [c, O, Re]), $e = a(() => c ? "key" : b.rowKey, [c, b.rowKey]), Ke = a(() => `${je ?? i.stylesConfig.size}BitzTable`, [je, i.stylesConfig.size]), Bt = ie(
349
347
  (e, t) => {
350
348
  var n;
351
- if (!C.onRow || a)
349
+ if (!b.onRow || c)
352
350
  return {};
353
- const s = (n = C.onRow) == null ? void 0 : n.call(C, e, t);
351
+ const s = (n = b.onRow) == null ? void 0 : n.call(b, e, t);
354
352
  return s.onClick && (s.className = "rowPointerCursor"), s;
355
353
  },
356
- [C.onRow, a]
357
- ), Mt = u(() => ce(
354
+ [b.onRow, c]
355
+ ), Wt = a(() => ce(
358
356
  "bitzTableContainer",
359
357
  { hideBorder: ze },
360
358
  { hasScrollBar: M },
361
- { stickyTable: !!(C != null && C.sticky) },
362
- $e,
363
- C.className
359
+ { stickyTable: !!(b != null && b.sticky) },
360
+ Ke,
361
+ b.className
364
362
  ), [
365
- C.className,
366
- $e,
363
+ b.className,
364
+ Ke,
367
365
  M,
368
366
  i.fullscreen,
369
367
  ze,
370
- C.sticky
371
- ]), pt = u(() => ({
368
+ b.sticky
369
+ ]), St = a(() => ({
372
370
  "--container-bgColor": S.colorBgContainer
373
- }), [S.colorBgContainer]), Pt = u(() => {
374
- const e = ee ?? oe;
371
+ }), [S.colorBgContainer]), Mt = a(() => {
372
+ const e = Z ?? F;
375
373
  let t;
376
374
  L && (t = L >= e ? L : e);
377
375
  const s = i.fullscreen ? "100%" : t;
378
376
  let n;
379
- return (B ?? 0) > 0 && (n = B), es({
377
+ return (B ?? 0) > 0 && (n = B), Ft({
380
378
  height: s ?? "auto",
381
379
  token: S,
382
- evenRowBgColor: i.zebra ? m == null ? void 0 : m.evenRowBgColor : S.colorBgContainer,
383
- table: m,
380
+ evenRowBgColor: i.zebra ? f == null ? void 0 : f.evenRowBgColor : S.colorBgContainer,
381
+ table: f,
384
382
  gap: ke,
385
- borderColor: (m == null ? void 0 : m.borderColor) || S.colorBorderSecondary,
383
+ borderColor: (f == null ? void 0 : f.borderColor) || S.colorBorderSecondary,
386
384
  scrollbarWidth: n,
387
- other: C.style
385
+ other: b.style
388
386
  });
389
387
  }, [
390
- C.style,
388
+ b.style,
391
389
  i.fullscreen,
392
390
  L,
393
- ee,
394
- oe,
395
- m,
391
+ Z,
392
+ F,
393
+ f,
396
394
  i == null ? void 0 : i.zebra,
397
395
  B
398
- ]), Lt = ie(
396
+ ]), pt = ie(
399
397
  (e, t, s) => {
400
398
  const n = t % 2 === 0 ? "oddRow" : "evenRow";
401
- if (C.rowClassName) {
402
- const r = C.rowClassName(e, t, s);
399
+ if (b.rowClassName) {
400
+ const r = b.rowClassName(e, t, s);
403
401
  return ce(n, r);
404
402
  }
405
403
  return n;
406
404
  },
407
- [C.rowClassName]
408
- ), Ke = u(() => /* @__PURE__ */ o.jsx(
409
- Dt,
405
+ [b.rowClassName]
406
+ ), Oe = a(() => /* @__PURE__ */ o.jsx(
407
+ _t,
410
408
  {
411
409
  finished: Ne,
412
410
  onLoad: async () => (
413
411
  // @ts-ignore
414
- !a && (v == null ? void 0 : v((N == null ? void 0 : N.page) + 1, N == null ? void 0 : N.size))
412
+ !c && (_ == null ? void 0 : _((N == null ? void 0 : N.page) + 1, N == null ? void 0 : N.size))
415
413
  ),
416
414
  loadingText: "加载中...",
417
415
  finishedText: "没有更多了",
@@ -420,14 +418,14 @@ function is({
420
418
  "div",
421
419
  {
422
420
  className: "mobileList",
423
- style: { backgroundColor: m == null ? void 0 : m.mobileListBgColor },
421
+ style: { backgroundColor: f == null ? void 0 : f.mobileListBgColor },
424
422
  children: [
425
- k == null ? void 0 : k.map((e, t) => /* @__PURE__ */ o.jsx(
423
+ j == null ? void 0 : j.map((e, t) => /* @__PURE__ */ o.jsx(
426
424
  "div",
427
425
  {
428
426
  className: "listItem",
429
- style: { backgroundColor: m == null ? void 0 : m.listItemBgColor },
430
- onClick: () => ft(e, t),
427
+ style: { backgroundColor: f == null ? void 0 : f.listItemBgColor },
428
+ onClick: () => ut(e, t),
431
429
  children: $ == null ? void 0 : $.map((s, n) => {
432
430
  var r;
433
431
  return !(s != null && s.mobileHide) && /* @__PURE__ */ o.jsxs(
@@ -442,7 +440,7 @@ function is({
442
440
  ] }),
443
441
  /* @__PURE__ */ o.jsx("div", { className: "value", children: ((r = s == null ? void 0 : s.render) == null ? void 0 : r.call(
444
442
  s,
445
- ls(e, (s == null ? void 0 : s.dataIndex) || ""),
443
+ rs(e, (s == null ? void 0 : s.dataIndex) || ""),
446
444
  e,
447
445
  t
448
446
  )) || (e == null ? void 0 : e[s.dataIndex]) })
@@ -454,16 +452,16 @@ function is({
454
452
  },
455
453
  t
456
454
  )),
457
- Array.from({ length: te.mobile ?? 2 }).map((e, t) => /* @__PURE__ */ o.jsx(
455
+ Array.from({ length: E.mobile ?? 2 }).map((e, t) => /* @__PURE__ */ o.jsx(
458
456
  "div",
459
457
  {
460
458
  className: "listItem",
461
459
  style: {
462
- display: a ? "block" : "none",
463
- backgroundColor: m == null ? void 0 : m.listItemBgColor
460
+ display: c ? "block" : "none",
461
+ backgroundColor: f == null ? void 0 : f.listItemBgColor
464
462
  },
465
463
  children: /* @__PURE__ */ o.jsx("div", { className: "row", children: de ? de() : /* @__PURE__ */ o.jsx(
466
- $t,
464
+ Rt,
467
465
  {
468
466
  title: !1,
469
467
  paragraph: {
@@ -481,19 +479,19 @@ function is({
481
479
  )
482
480
  }
483
481
  ), [
484
- j ? Ne : 0,
485
- j ? a : 0,
486
- j ? N : 0,
487
- j ? m : 0,
488
- j ? k : 0,
489
- j ? $ : 0,
490
- j ? te : 0,
491
- j ? de : 0
482
+ T ? Ne : 0,
483
+ T ? c : 0,
484
+ T ? N : 0,
485
+ T ? f : 0,
486
+ T ? j : 0,
487
+ T ? $ : 0,
488
+ T ? E : 0,
489
+ T ? de : 0
492
490
  ]);
493
- ve(() => {
494
- i.setSelected(!!(y != null && y.num));
495
- }, [y]);
496
- const Oe = u(() => /* @__PURE__ */ o.jsxs("div", { className: "alert", children: [
491
+ Ht(() => {
492
+ i.setSelected(!!(m != null && m.num));
493
+ }, [m]);
494
+ const qe = a(() => /* @__PURE__ */ o.jsxs("div", { className: "alert", children: [
497
495
  /* @__PURE__ */ o.jsx(
498
496
  Ye,
499
497
  {
@@ -503,62 +501,62 @@ function is({
503
501
  tagClass: "totalText"
504
502
  }
505
503
  ),
506
- !!y && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
504
+ !!m && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
507
505
  /* @__PURE__ */ o.jsx(xe.Text, { className: "splitBorder", children: "/" }),
508
506
  /* @__PURE__ */ o.jsx(
509
507
  Ye,
510
508
  {
511
509
  highlightTag: "strong",
512
- keywords: `${(y == null ? void 0 : y.num) ?? 0}`,
513
- sourceString: `已选中 ${(y == null ? void 0 : y.num) ?? 0} 条`
510
+ keywords: `${(m == null ? void 0 : m.num) ?? 0}`,
511
+ sourceString: `已选中 ${(m == null ? void 0 : m.num) ?? 0} 条`
514
512
  }
515
513
  ),
516
- !!(y != null && y.num) && /* @__PURE__ */ o.jsx(
514
+ !!(m != null && m.num) && /* @__PURE__ */ o.jsx(
517
515
  xe.Link,
518
516
  {
519
517
  className: "cleanSelected",
520
- onClick: y == null ? void 0 : y.onClear,
518
+ onClick: m == null ? void 0 : m.onClear,
521
519
  children: "取消选中"
522
520
  }
523
521
  )
524
522
  ] })
525
- ] }), [H, y]), Ht = (e) => {
526
- a || ue == null || ue(e);
527
- }, qe = ie(() => G ? {
528
- row: (e) => ts({ ...e, loading: a == null ? void 0 : a.toString() })
529
- } : {}, [G, G ? a : !1]), Ve = ie(
523
+ ] }), [H, m]), Pt = (e) => {
524
+ c || fe == null || fe(e);
525
+ }, Ve = ie(() => I ? {
526
+ row: (e) => es({ ...e, loading: c == null ? void 0 : c.toString() })
527
+ } : {}, [I, I ? c : !1]), _e = ie(
530
528
  (e) => {
531
529
  var n, r;
532
- if (U)
533
- return os({ ...e, hasScrollBar: M, scrollbarSize: B });
530
+ if (G)
531
+ return ss({ ...e, hasScrollBar: M, scrollbarSize: B });
534
532
  const t = { ...e };
535
533
  return ((n = t.className) == null ? void 0 : n.includes(
536
534
  "ant-table-cell-fix-right"
537
535
  )) && !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
536
  },
539
- [M, B, U]
540
- ), Rt = u(() => ({
537
+ [M, B, G]
538
+ ), Lt = a(() => ({
541
539
  ...R,
542
540
  header: {
543
541
  ...R == null ? void 0 : R.header,
544
- cell: Ve
542
+ cell: _e
545
543
  },
546
544
  body: {
547
545
  ...R == null ? void 0 : R.body,
548
- ...qe()
546
+ ...Ve()
549
547
  }
550
- }), [R, Ve, qe]);
548
+ }), [R, _e, Ve]);
551
549
  return /* @__PURE__ */ o.jsxs(
552
550
  "div",
553
551
  {
554
552
  className: ce("bitzTableBlock", {
555
553
  fullscreen: i.fullscreen
556
554
  }),
557
- style: pt,
555
+ style: St,
558
556
  ...Qe,
559
557
  children: [
560
- !j && /* @__PURE__ */ o.jsxs("div", { ref: p, className: Mt, style: Pt, children: [
561
- /* @__PURE__ */ o.jsxs("div", { className: "bitzTableContainerBody", ref: Y, children: [
558
+ !T && /* @__PURE__ */ o.jsxs("div", { ref: P, className: Wt, style: Mt, children: [
559
+ /* @__PURE__ */ o.jsxs("div", { className: "bitzTableContainerBody", ref: me, children: [
562
560
  et && /* @__PURE__ */ o.jsxs("div", { className: "bitzTableToolbarBlock", children: [
563
561
  tt || /* @__PURE__ */ o.jsx("div", {}),
564
562
  st,
@@ -577,30 +575,30 @@ function is({
577
575
  }
578
576
  ),
579
577
  /* @__PURE__ */ o.jsx(
580
- ss,
578
+ ts,
581
579
  {
582
- enabledRowDragSort: G,
583
- dataSource: pe,
584
- mergeRowKey: Re,
585
- onDragEnd: Ht,
580
+ enabledRowDragSort: I,
581
+ dataSource: oe,
582
+ mergeRowKey: $e,
583
+ onDragEnd: Pt,
586
584
  children: /* @__PURE__ */ o.jsx(
587
- Kt,
585
+ $t,
588
586
  {
589
- ...C,
590
- bordered: V,
591
- columns: jt,
592
- dataSource: pe,
587
+ ...b,
588
+ bordered: ee,
589
+ columns: gt,
590
+ dataSource: oe,
593
591
  loading: !1,
594
592
  pagination: !1,
595
- scroll: le,
596
- expandable: Bt,
597
- rowSelection: Wt,
598
- onRow: St,
593
+ scroll: ne,
594
+ expandable: zt,
595
+ rowSelection: Nt,
596
+ onRow: Bt,
599
597
  rowHoverable: lt,
600
- rowClassName: Lt,
598
+ rowClassName: pt,
601
599
  className: "bitzTable",
602
- components: Rt,
603
- rowKey: Re,
600
+ components: Lt,
601
+ rowKey: $e,
604
602
  onChange: ht,
605
603
  ref: he
606
604
  }
@@ -608,10 +606,10 @@ function is({
608
606
  }
609
607
  )
610
608
  ] }),
611
- Z && !!H && /* @__PURE__ */ o.jsxs("div", { className: "bitzTablePagination", ref: me, children: [
612
- Oe,
609
+ Y && !!H && /* @__PURE__ */ o.jsxs("div", { className: "bitzTablePagination", ref: be, children: [
610
+ qe,
613
611
  /* @__PURE__ */ o.jsx(
614
- Vt,
612
+ qt,
615
613
  {
616
614
  size: "small",
617
615
  enableControl: Ze,
@@ -624,22 +622,22 @@ function is({
624
622
  }
625
623
  )
626
624
  ] }),
627
- !Z && !!y && !!H && /* @__PURE__ */ o.jsx("div", { className: "bitzTablePagination", ref: me, children: Oe })
625
+ !Y && !!m && !!H && /* @__PURE__ */ o.jsx("div", { className: "bitzTablePagination", ref: be, children: qe })
628
626
  ] }),
629
- j && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
630
- (a || !!(z != null && z.length)) && /* @__PURE__ */ o.jsx(o.Fragment, { children: Te ? (
627
+ T && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
628
+ (c || !!(z != null && z.length)) && /* @__PURE__ */ o.jsx(o.Fragment, { children: Te ? (
631
629
  // @ts-ignore
632
630
  /* @__PURE__ */ o.jsx(
633
- _t,
631
+ It,
634
632
  {
635
- onRefresh: async () => !a && Te(),
636
- children: Ke
633
+ onRefresh: async () => !c && Te(),
634
+ children: Oe
637
635
  }
638
636
  )
639
- ) : Ke }),
640
- !a && /* @__PURE__ */ o.jsx(It, { data: z, title: Ae, img: Fe }),
637
+ ) : Oe }),
638
+ !c && /* @__PURE__ */ o.jsx(Vt, { data: z, title: Ae, img: Fe }),
641
639
  /* @__PURE__ */ o.jsx(
642
- qt,
640
+ Ot,
643
641
  {
644
642
  className: "tableMobileDrawer",
645
643
  open: it,
@@ -648,11 +646,11 @@ function is({
648
646
  closable: !1,
649
647
  onClose: We,
650
648
  children: /* @__PURE__ */ o.jsxs("div", { className: "drawerBox", children: [
651
- /* @__PURE__ */ o.jsx("div", { className: "boxBody", children: dt ? /* @__PURE__ */ o.jsx("div", { className: "operaList", children: /* @__PURE__ */ o.jsx(Ot, {}) }) : re.map((e, t) => /* @__PURE__ */ o.jsx(
649
+ /* @__PURE__ */ o.jsx("div", { className: "boxBody", children: dt ? /* @__PURE__ */ o.jsx("div", { className: "operaList", children: /* @__PURE__ */ o.jsx(Kt, {}) }) : se.map((e, t) => /* @__PURE__ */ o.jsx(
652
650
  "div",
653
651
  {
654
652
  className: "operaList",
655
- onClick: () => ut(e, t),
653
+ onClick: () => ft(e, t),
656
654
  ...e.danger && {
657
655
  style: { color: S.colorError }
658
656
  },
@@ -670,7 +668,7 @@ function is({
670
668
  }
671
669
  );
672
670
  }
673
- const Is = (Z) => /* @__PURE__ */ o.jsx(vt, { initValue: Z, children: /* @__PURE__ */ o.jsx(is, { ...Z }) });
671
+ const Vs = (Y) => /* @__PURE__ */ o.jsx(Dt, { initValue: Y, children: /* @__PURE__ */ o.jsx(ls, { ...Y }) });
674
672
  export {
675
- Is as default
673
+ Vs as default
676
674
  };