bitz-react-admin-ui 2.2.5 → 2.2.7

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 (30) hide show
  1. package/dist/_virtual/index.mjs +2 -2
  2. package/dist/_virtual/index2.mjs +2 -2
  3. package/dist/_virtual/isoWeek.mjs +4 -0
  4. package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +25 -25
  5. package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +10 -9
  6. package/dist/components/BitzFuiCalendar/CalendarBody.mjs +16 -13
  7. package/dist/components/BitzFuiCalendar/CalendarHead.mjs +22 -18
  8. package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +8 -8
  9. package/dist/components/BitzFuiCalendar/ColumnData.mjs +43 -44
  10. package/dist/components/BitzTable/Store/index.d.ts +5 -1
  11. package/dist/components/BitzTable/Store/index.mjs +159 -137
  12. package/dist/components/BitzTable/SubTable/index.mjs +86 -87
  13. package/dist/components/BitzTable/Table/SortableRow.mjs +2 -2
  14. package/dist/components/BitzTable/Table/index.d.ts +4 -10
  15. package/dist/components/BitzTable/Table/index.mjs +281 -282
  16. package/dist/components/BitzTable/Table/utils.d.ts +2 -2
  17. package/dist/components/BitzTable/Table/utils.mjs +29 -23
  18. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +107 -107
  19. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +5 -5
  20. package/dist/components/BitzTable/index.d.ts +9 -4
  21. package/dist/components/BitzTable/index.mjs +17 -15
  22. package/dist/components/BitzTable2/index.d.ts +2 -0
  23. package/dist/components/BitzTable2/index.mjs +4 -0
  24. package/dist/index.d.ts +1 -0
  25. package/dist/index.mjs +34 -32
  26. package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
  27. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isoWeek.mjs +34 -0
  28. package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
  29. package/dist/style.css +1 -1
  30. package/package.json +1 -1
@@ -1,193 +1,192 @@
1
- import { j as s } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { useContext as pe, useRef as S, useState as K, useEffect as Ct, useMemo as i, useCallback as ee } from "react";
3
- import { isMobile as O } from "../../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
4
- import { Table as oe, Skeleton as xt, Typography as We } from "antd";
5
- import te from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
6
- import gt from "../../BitzDrawer/index.mjs";
7
- import Bt from "../../BitzPagination/index.mjs";
8
- import jt from "../../BitzNoData/index.mjs";
1
+ import { j as o } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { useContext as ze, useRef as P, useState as O, useEffect as ut, useMemo as l, useCallback as te } from "react";
3
+ import { isMobile as q } from "../../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
4
+ import { Skeleton as ft, Typography as Te, Table as mt } from "antd";
5
+ import re from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
6
+ import bt from "../../BitzDrawer/index.mjs";
7
+ import yt from "../../BitzPagination/index.mjs";
8
+ import xt from "../../BitzNoData/index.mjs";
9
9
  import "../../BitzList/index.less.mjs";
10
- import zt from "../../BitzList/List.mjs";
10
+ import Ct from "../../BitzList/List.mjs";
11
11
  import "../../BitzPullRefresh/style/index.less.mjs";
12
- import wt from "../../BitzPullRefresh/PullRefresh.mjs";
13
- import Nt, { BitzTableContext as Tt } from "../Store/index.mjs";
14
- import { loopFilter as kt, columnSort as pt } from "../Store/utils/index.mjs";
15
- import re from "../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
16
- import Wt from "../ActionCol/style.mjs";
17
- import Mt from "../../BitzTheme/index.mjs";
18
- import Me from "../../BitzHighlight/index.mjs";
19
- import Lt from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/table/ExpandIcon.mjs";
12
+ import gt from "../../BitzPullRefresh/PullRefresh.mjs";
13
+ import wt, { BitzTableContext as Bt, toolCols as jt } from "../Store/index.mjs";
14
+ import { loopFilter as zt, columnSort as Tt } from "../Store/utils/index.mjs";
15
+ import oe from "../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
16
+ import Nt from "../ActionCol/style.mjs";
17
+ import kt from "../../BitzTheme/index.mjs";
18
+ import Ne from "../../BitzHighlight/index.mjs";
19
+ import pt from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/table/ExpandIcon.mjs";
20
20
  import "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/index.mjs";
21
21
  import St from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/locale/en_US.mjs";
22
- import { getColumnsWithTool as Pt, loopBuildSkeleton as Rt } from "./utils.mjs";
23
- import { getCssVar as Ht } from "./style.mjs";
24
- import $t from "./SortableRow.mjs";
25
- import At from "./SortTableContext.mjs";
22
+ import { getColumnsWithTool as Wt, loopBuildSkeleton as Mt } from "./utils.mjs";
23
+ import { getCssVar as Lt } from "./style.mjs";
24
+ import vt from "./SortableRow.mjs";
25
+ import Pt from "./SortTableContext.mjs";
26
26
  import "./index.less.mjs";
27
- import { ConfigContext as Dt } from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/context.mjs";
28
- import Kt from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/at.mjs";
29
- const Le = [oe.SELECTION_COLUMN, oe.EXPAND_COLUMN];
30
- function Ot({
31
- showPagination: p = !0,
32
- showSelected: se = !0,
33
- height: W,
27
+ import { ConfigContext as Ht } from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/context.mjs";
28
+ import $t from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/at.mjs";
29
+ function Rt({
30
+ showPagination: W = !0,
31
+ height: M,
34
32
  dataSource: b,
35
- total: w = 0,
36
- columns: N,
37
- loading: l,
38
- skeletonNum: V = {
33
+ total: B = 0,
34
+ columns: T,
35
+ loading: i,
36
+ skeletonNum: F = {
39
37
  pc: 10,
40
38
  mobile: 10
41
39
  },
42
- skeletonRender: ne,
43
- skeletonRowNum: Se = 4,
44
- skeletonRowsWidth: Pe = ["35%", "100%", "100%", "60%"],
40
+ skeletonRender: se,
41
+ skeletonRowNum: ke = 4,
42
+ skeletonRowsWidth: pe = ["35%", "100%", "100%", "60%"],
45
43
  // mobileLoadEmit,
46
- mobileRefreshEmit: le,
47
- operationFilter: _,
48
- enableControlPage: Re,
49
- pagination: C,
50
- paginationEmit: P = () => {
44
+ mobileRefreshEmit: ne,
45
+ operationFilter: D,
46
+ enableControlPage: Se,
47
+ pagination: x,
48
+ paginationEmit: H = () => {
51
49
  },
52
- enabledRowDragSort: R,
53
- onRowDragEnd: q,
50
+ enabledRowDragSort: N,
51
+ onRowDragEnd: G,
54
52
  mobilePageHeight: Vt = 500,
55
- mobileCancelText: He = "取消",
56
- noDataTitle: $e,
57
- noDataImg: Ae,
58
- color: _t,
53
+ mobileCancelText: We = "取消",
54
+ noDataTitle: Me,
55
+ noDataImg: Le,
56
+ color: Kt,
59
57
  size: ie,
60
- showTableTool: De = !0,
61
- tableAction: Ke,
62
- tableToolbar: Oe,
63
- selectionBar: Ve,
64
- scroll: d,
58
+ showTableTool: ve = !0,
59
+ tableAction: Pe,
60
+ tableToolbar: He,
61
+ selectionBar: $e,
62
+ scroll: a,
65
63
  components: j,
66
- expandable: x,
67
- rowSelection: a,
68
- resetPage: _e,
69
- ...h
64
+ expandable: C,
65
+ rowSelection: k,
66
+ selelctionAlert: h,
67
+ resetPage: Re,
68
+ ...d
70
69
  }) {
71
- var we, Ne, Te, ke;
72
- const { token: g } = Mt.useToken(), { Table: c } = g, { tableSpaceBetweenPage: ce = 10 } = c, { gap: qe } = Wt(), { showColumnBorder: Fe, hideRowBorder: ae, rowHoverable: Ge, ...u } = pe(Tt), H = S(void 0), F = S(0), [G, Ee] = K(0), [Ue, E] = K(!1), [y, ve] = K([]);
73
- Ct(() => {
70
+ var je;
71
+ const { token: g } = kt.useToken(), { Table: c } = g, { tableSpaceBetweenPage: le = 10 } = c, { gap: Ve } = Nt(), { showColumnBorder: Ke, hideRowBorder: ce, rowHoverable: Oe, ...u } = ze(Bt), $ = P(void 0), _ = P(0), [I, qe] = O(0), [Fe, J] = O(!1), [y, De] = O([]);
72
+ ut(() => {
74
73
  let e = [...b ?? []];
75
- (C == null ? void 0 : C.page) !== 1 && (e = [...y, ...e]), ve(e);
74
+ (x == null ? void 0 : x.page) !== 1 && (e = [...y, ...e]), De(e);
76
75
  }, [b]);
77
- const Ie = i(() => !!(y != null && y.length) && (y == null ? void 0 : y.length) >= w, [y, w]), [Xe, Je] = K([]), Qe = (e, t) => {
78
- var n;
79
- const o = (n = _ == null ? void 0 : _(e, t)) == null ? void 0 : n.filter(
80
- (r) => r.type !== "divider"
76
+ const Ge = l(() => !!(y != null && y.length) && (y == null ? void 0 : y.length) >= B, [y, B]), [_e, Ie] = O([]), Je = (e, t) => {
77
+ var s;
78
+ const r = (s = D == null ? void 0 : D(e, t)) == null ? void 0 : s.filter(
79
+ (n) => n.type !== "divider"
81
80
  );
82
- o != null && o.length && (Je(o), E(!0));
83
- }, de = () => {
84
- E(!1);
85
- }, Ye = (e) => {
81
+ r != null && r.length && (Ie(r), J(!0));
82
+ }, ae = () => {
83
+ J(!1);
84
+ }, Qe = (e) => {
86
85
  var t;
87
- E(!1), (t = e.onClick) == null || t.call(e);
88
- }, B = S(null), U = re(B), he = S(null), v = re(he), I = S(null), k = re(I), Ze = () => {
89
- var o;
90
- const e = (o = B.current) == null ? void 0 : o.querySelectorAll(
86
+ J(!1), (t = e.onClick) == null || t.call(e);
87
+ }, w = P(null), Q = oe(w), he = P(null), U = oe(he), X = P(null), S = oe(X), Ue = () => {
88
+ var r;
89
+ const e = (r = w.current) == null ? void 0 : r.querySelectorAll(
91
90
  "& > .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)"
92
91
  ), t = [];
93
- if (e == null || e.forEach((n) => {
94
- var r;
92
+ if (e == null || e.forEach((s) => {
93
+ var n;
95
94
  t.push(
96
- ((r = n.querySelector("& > .operationCol .actionGroup")) == null ? void 0 : r.clientWidth) || 0
95
+ ((n = s.querySelector("& > .operationCol .actionGroup")) == null ? void 0 : n.clientWidth) || 0
97
96
  );
98
97
  }), t.length)
99
- return Math.ceil(Math.max(...t)) + qe * 2;
100
- }, ue = () => {
101
- var m, f, L;
102
- const e = (m = B.current) == null ? void 0 : m.querySelector(
98
+ return Math.ceil(Math.max(...t)) + Ve * 2;
99
+ }, de = () => {
100
+ var m, f, v;
101
+ const e = (m = w.current) == null ? void 0 : m.querySelector(
103
102
  ".ant-table-body"
104
- ), t = e == null ? void 0 : e.clientWidth, n = ((e == null ? void 0 : e.offsetWidth) || 0) - t > 0, r = (L = (f = B.current) == null ? void 0 : f.querySelector(
103
+ ), t = e == null ? void 0 : e.clientWidth, s = ((e == null ? void 0 : e.offsetWidth) || 0) - t > 0, n = (v = (f = w.current) == null ? void 0 : f.querySelector(
105
104
  ".ant-table-cell-scrollbar"
106
- )) == null ? void 0 : L.offsetWidth;
107
- return { tbodyWidth: t, hasScrollBar: n, scrollbarSize: r };
108
- }, { y: X, tbodyWidth: J, hasScrollBar: $, scrollbarSize: M } = i(() => {
109
- const { tbodyWidth: e, hasScrollBar: t, scrollbarSize: o } = ue();
110
- if (typeof W > "u")
105
+ )) == null ? void 0 : v.offsetWidth;
106
+ return { tbodyWidth: t, hasScrollBar: s, scrollbarSize: n };
107
+ }, { y: Y, tbodyWidth: Z, hasScrollBar: R, scrollbarSize: L } = l(() => {
108
+ const { tbodyWidth: e, hasScrollBar: t, scrollbarSize: r } = de();
109
+ if (typeof M > "u")
111
110
  return {
112
111
  tbodyWidth: e,
113
112
  hasScrollBar: t,
114
- scrollbarSize: o
113
+ scrollbarSize: r
115
114
  };
116
- let n = 40, r = 40;
117
- if (B.current) {
118
- const D = window.getComputedStyle(B.current);
119
- n = parseInt(D.getPropertyValue("--cell-height")), r = parseInt(D.getPropertyValue("--toolbar-height"));
115
+ let s = 40, n = 40;
116
+ if (w.current) {
117
+ const K = window.getComputedStyle(w.current);
118
+ s = parseInt(K.getPropertyValue("--cell-height")), n = parseInt(K.getPropertyValue("--toolbar-height"));
120
119
  }
121
- const m = (k == null ? void 0 : k.height) || 0, f = m ? ce : 0;
122
- return { y: (u.fullscreen ? window.innerHeight : W) - m - f - r - n, tbodyWidth: e, hasScrollBar: t, scrollbarSize: o };
120
+ const m = (S == null ? void 0 : S.height) || 0, f = m ? le : 0;
121
+ return { y: (u.fullscreen ? window.innerHeight : M) - m - f - n - s, tbodyWidth: e, hasScrollBar: t, scrollbarSize: r };
123
122
  }, [
124
123
  u.fullscreen,
125
- W,
126
- k == null ? void 0 : k.height,
127
- U == null ? void 0 : U.height,
128
- v == null ? void 0 : v.height
129
- ]), et = i(() => {
130
- let e = (d == null ? void 0 : d.x) ?? 1e3;
131
- return F.current && (e -= F.current), G && H.current && (e -= G * H.current), J && (e = Math.max(e, J)), d != null && d.x ? { x: e, y: d.y || X } : d != null && d.y ? { x: e, y: d.y } : { x: e, y: X };
132
- }, [d, X, J, G]), tt = (e) => {
133
- const t = e.length, o = e.filter((z) => z.width), r = o.map((z) => z.width).reduce((z, Z) => z + Z, 0);
124
+ M,
125
+ S == null ? void 0 : S.height,
126
+ Q == null ? void 0 : Q.height,
127
+ U == null ? void 0 : U.height
128
+ ]), Xe = l(() => {
129
+ let e = (a == null ? void 0 : a.x) ?? 1e3;
130
+ return _.current && (e -= _.current), I && $.current && (e -= I * $.current), Z && (e = Math.max(e, Z)), a != null && a.x ? { x: e, y: a.y || Y } : a != null && a.y ? { x: e, y: a.y } : { x: e, y: Y };
131
+ }, [a, Y, Z, I]), Ye = (e) => {
132
+ const t = e.length, r = e.filter((z) => z.width), n = r.map((z) => z.width).reduce((z, ee) => z + ee, 0);
134
133
  let m = 0;
135
- if (B.current) {
136
- const z = window.getComputedStyle(B.current), Z = parseInt(
134
+ if (w.current) {
135
+ const z = window.getComputedStyle(w.current), ee = parseInt(
137
136
  z.getPropertyValue("--toolCell-paddingInline")
138
137
  );
139
- m = parseInt(z.getPropertyValue("--fontSize")) + 4 + 2 * Z;
138
+ m = parseInt(z.getPropertyValue("--fontSize")) + 4 + 2 * ee;
140
139
  }
141
140
  let f = 0;
142
- a && (f += m), x && (f += m);
143
- const { tbodyWidth: L } = ue(), Y = Math.max((d == null ? void 0 : d.x) ?? 0, L ?? 0) - r - f, D = t - o.length;
144
- return Y >= 0 ? Y / D : void 0;
145
- }, A = i(() => {
146
- const t = (N ?? []).filter((f) => !Le.includes(f)), { filterColumns: o, width: n, autoWidthColLength: r } = kt(
141
+ k && (f += m), C && (f += m), N && (f += m);
142
+ const { tbodyWidth: v } = de(), A = Math.max((a == null ? void 0 : a.x) ?? 0, v ?? 0) - n - f, K = t - r.length;
143
+ return A >= 0 ? A / K : void 0;
144
+ }, V = l(() => {
145
+ const t = (T ?? []).filter((f) => !jt.includes(f)), { filterColumns: r, width: s, autoWidthColLength: n } = zt(
147
146
  t,
148
147
  u.columnsMap
149
- ), m = o.sort(pt(u.columnsMap));
150
- if (!O) {
151
- const f = tt(t);
152
- H.current = Math.ceil(f ?? 0), F.current = Math.ceil(n), Ee(r);
148
+ ), m = r.sort(Tt(u.columnsMap));
149
+ if (!q) {
150
+ const f = Ye(t);
151
+ $.current = Math.ceil(f ?? 0), _.current = Math.ceil(s), qe(n);
153
152
  }
154
153
  return m;
155
- }, [u.columnsMap]), T = i(() => {
156
- if (O)
157
- return A;
158
- const e = A.findIndex((r) => r == null ? void 0 : r.isOperationCol), t = (N ?? []).findIndex((r) => r == null ? void 0 : r.isOperationCol), o = A.slice();
159
- o.splice(e, 1, N == null ? void 0 : N[t]);
160
- const n = o.map((r) => ({
161
- ...r,
162
- ...r != null && r.isDragSortCol ? {
163
- onCell: (...m) => {
164
- var f;
165
- return {
166
- ...(f = r == null ? void 0 : r.onCell) == null ? void 0 : f.call(r, m),
167
- "data-column-name": "dragSortCell"
168
- };
169
- }
170
- } : {},
171
- ...r != null && r.width ? {
172
- width: r != null && r.useMaxWidth ? Ze() ?? r.width : r.width
154
+ }, [u.columnsMap]), p = l(() => {
155
+ if (q)
156
+ return V;
157
+ const e = V.findIndex((s) => s == null ? void 0 : s.isOperationCol), t = V.slice();
158
+ if (e >= 0) {
159
+ const s = (T ?? []).findIndex((n) => n == null ? void 0 : n.isOperationCol);
160
+ t.splice(e, 1, T == null ? void 0 : T[s]);
161
+ }
162
+ const r = t.map((s) => ({
163
+ ...s,
164
+ ...s != null && s.width ? {
165
+ width: s != null && s.useMaxWidth ? Ue() ?? s.width : s.width
173
166
  } : {
174
167
  // 给未设置width的列设置平均数
175
- width: H
168
+ width: $
176
169
  }
177
170
  }));
178
- return Pt(N, n, a, x);
179
- }, [N, A]), fe = i(() => Rt(T, Le), [T]), rt = i(() => l ? fe : T, [l, T, fe]), me = i(() => {
180
- const e = (b ?? []).length, t = e > (V.pc ?? 10) ? e >= 20 ? 20 : e : V.pc ?? 10;
181
- return Array.from({ length: t }).map((n, r) => ({
182
- key: `${Date.now()}${r}`
171
+ return Wt(
172
+ T,
173
+ r,
174
+ N,
175
+ !!k,
176
+ !!C
177
+ );
178
+ }, [T, V, N]), ue = l(() => Mt(p), [p]), Ze = l(() => i ? ue : p, [i, p, ue]), fe = l(() => {
179
+ const e = (b ?? []).length, t = e > (F.pc ?? 10) ? e >= 20 ? 20 : e : F.pc ?? 10;
180
+ return Array.from({ length: t }).map((s, n) => ({
181
+ key: `${Date.now()}${n}`
183
182
  }));
184
- }, [b]), be = i(() => l ? me : b ?? [], [l, b, me]), { table: Q, locale: ot = St } = pe(Dt), st = { ...ot.Table }, nt = ((we = Q == null ? void 0 : Q.expandable) == null ? void 0 : we.expandIcon) || (x == null ? void 0 : x.expandIcon) || Lt(st), ye = i(() => {
185
- if (x)
183
+ }, [b]), me = l(() => i ? fe : b ?? [], [i, b, fe]), { table: E, locale: Ee = St } = ze(Ht), Ae = { ...Ee.Table }, et = ((je = E == null ? void 0 : E.expandable) == null ? void 0 : je.expandIcon) || (C == null ? void 0 : C.expandIcon) || pt(Ae), be = l(() => {
184
+ if (C)
186
185
  return {
187
- ...x,
188
- expandedRowRender: () => /* @__PURE__ */ s.jsx(s.Fragment, {}),
186
+ ...C,
187
+ expandedRowRender: () => /* @__PURE__ */ o.jsx(o.Fragment, {}),
189
188
  expandIcon: (e) => {
190
- const t = nt(e);
189
+ const t = et(e);
191
190
  return {
192
191
  ...t,
193
192
  props: {
@@ -201,131 +200,131 @@ function Ot({
201
200
  };
202
201
  }
203
202
  };
204
- }, [x]), lt = i(() => l ? ye : x, [l, x, ye]), Ce = i(() => {
205
- if (a)
203
+ }, [C]), tt = l(() => i ? be : C, [i, C, be]), ye = l(() => {
204
+ if (k)
206
205
  return {
207
- ...a,
206
+ ...k,
208
207
  selectedRowKeys: [],
209
208
  getCheckboxProps: () => ({ disabled: !0 })
210
209
  };
211
- }, [a]), it = i(() => l ? Ce : a, [l, a, Ce]), xe = i(() => l ? "key" : h.rowKey, [l, h.rowKey]), ge = i(() => `${ie ?? u.stylesConfig.size}BitzTable`, [ie, u.stylesConfig.size]), ct = ee(
210
+ }, [k]), rt = l(() => i ? ye : k, [i, k, ye]), xe = l(() => i ? "key" : d.rowKey, [i, d.rowKey]), Ce = l(() => `${ie ?? u.stylesConfig.size}BitzTable`, [ie, u.stylesConfig.size]), ot = te(
212
211
  (e, t) => {
213
- var n;
214
- if (!h.onRow || l)
212
+ var s;
213
+ if (!d.onRow || i)
215
214
  return {};
216
- const o = (n = h.onRow) == null ? void 0 : n.call(h, e, t);
217
- return o.onClick && (o.className = "rowPointerCursor"), o;
215
+ const r = (s = d.onRow) == null ? void 0 : s.call(d, e, t);
216
+ return r.onClick && (r.className = "rowPointerCursor"), r;
218
217
  },
219
- [h.onRow, l]
220
- ), at = i(() => te(
218
+ [d.onRow, i]
219
+ ), st = l(() => re(
221
220
  "bitzTableContainer",
222
- { hideBorder: ae },
223
- { hasScrollBar: $ },
224
- ge,
225
- h.className
221
+ { hideBorder: ce },
222
+ { hasScrollBar: R },
223
+ Ce,
224
+ d.className
226
225
  ), [
227
- h.className,
228
- ge,
229
- $,
226
+ d.className,
227
+ Ce,
228
+ R,
230
229
  u.fullscreen,
231
- ae
232
- ]), dt = i(() => ({
230
+ ce
231
+ ]), nt = l(() => ({
233
232
  "--container-bgColor": g.colorBgContainer
234
- }), [g.colorBgContainer]), ht = i(() => {
235
- const e = u.fullscreen ? "100%" : W;
233
+ }), [g.colorBgContainer]), it = l(() => {
234
+ const e = u.fullscreen ? "100%" : M;
236
235
  let t;
237
- return (M ?? 0) > 0 && (t = M), Ht({
236
+ return (L ?? 0) > 0 && (t = L), Lt({
238
237
  height: e,
239
238
  fontFamily: g.fontFamily,
240
239
  evenRowBgColor: u.zebra ? c == null ? void 0 : c.evenRowBgColor : g.colorBgContainer,
241
240
  colorBgContainer: g.colorBgContainer,
242
241
  table: c,
243
- gap: ce,
242
+ gap: le,
244
243
  borderColor: (c == null ? void 0 : c.borderColor) || g.colorBorderSecondary,
245
244
  scrollbarWidth: t,
246
- other: h.style
245
+ other: d.style
247
246
  });
248
247
  }, [
249
- h.style,
248
+ d.style,
250
249
  u.fullscreen,
251
- W,
250
+ M,
252
251
  c,
253
252
  u == null ? void 0 : u.zebra,
254
- M
255
- ]), ut = ee(
256
- (e, t, o) => {
257
- const n = t % 2 === 0 ? "oddRow" : "evenRow";
258
- if (h.rowClassName) {
259
- const r = h.rowClassName(e, t, o);
260
- return te(n, r);
253
+ L
254
+ ]), lt = te(
255
+ (e, t, r) => {
256
+ const s = t % 2 === 0 ? "oddRow" : "evenRow";
257
+ if (d.rowClassName) {
258
+ const n = d.rowClassName(e, t, r);
259
+ return re(s, n);
261
260
  }
262
- return n;
261
+ return s;
263
262
  },
264
- [h.rowClassName]
265
- ), Be = /* @__PURE__ */ s.jsx(
266
- zt,
263
+ [d.rowClassName]
264
+ ), ge = /* @__PURE__ */ o.jsx(
265
+ Ct,
267
266
  {
268
- finished: Ie,
267
+ finished: Ge,
269
268
  onLoad: async () => (
270
269
  // @ts-ignore
271
- !l && (P == null ? void 0 : P((C == null ? void 0 : C.page) + 1, C == null ? void 0 : C.size))
270
+ !i && (H == null ? void 0 : H((x == null ? void 0 : x.page) + 1, x == null ? void 0 : x.size))
272
271
  ),
273
272
  loadingText: "加载中...",
274
273
  finishedText: "没有更多了",
275
274
  errorText: "加载失败",
276
- children: /* @__PURE__ */ s.jsxs(
275
+ children: /* @__PURE__ */ o.jsxs(
277
276
  "div",
278
277
  {
279
278
  className: "mobileList",
280
279
  style: { backgroundColor: c == null ? void 0 : c.mobileListBgColor },
281
280
  children: [
282
- y == null ? void 0 : y.map((e, t) => /* @__PURE__ */ s.jsx(
281
+ y == null ? void 0 : y.map((e, t) => /* @__PURE__ */ o.jsx(
283
282
  "div",
284
283
  {
285
284
  className: "listItem",
286
285
  style: { backgroundColor: c == null ? void 0 : c.listItemBgColor },
287
- onClick: () => Qe(e, t),
288
- children: T == null ? void 0 : T.map((o, n) => {
289
- var r;
290
- return !(o != null && o.mobileHide) && /* @__PURE__ */ s.jsxs(
286
+ onClick: () => Je(e, t),
287
+ children: p == null ? void 0 : p.map((r, s) => {
288
+ var n;
289
+ return !(r != null && r.mobileHide) && /* @__PURE__ */ o.jsxs(
291
290
  "div",
292
291
  {
293
292
  className: "row",
294
293
  style: { color: g.colorText },
295
294
  children: [
296
- !o.mobileHideLabel && /* @__PURE__ */ s.jsxs("div", { className: "label", children: [
297
- `${o.title}`,
295
+ !r.mobileHideLabel && /* @__PURE__ */ o.jsxs("div", { className: "label", children: [
296
+ `${r.title}`,
298
297
  ":"
299
298
  ] }),
300
- /* @__PURE__ */ s.jsx("div", { className: "value", children: ((r = o == null ? void 0 : o.render) == null ? void 0 : r.call(
301
- o,
302
- Kt(e, (o == null ? void 0 : o.dataIndex) || ""),
299
+ /* @__PURE__ */ o.jsx("div", { className: "value", children: ((n = r == null ? void 0 : r.render) == null ? void 0 : n.call(
300
+ r,
301
+ $t(e, (r == null ? void 0 : r.dataIndex) || ""),
303
302
  e,
304
303
  t
305
- )) || (e == null ? void 0 : e[o.dataIndex]) })
304
+ )) || (e == null ? void 0 : e[r.dataIndex]) })
306
305
  ]
307
306
  },
308
- n
307
+ s
309
308
  );
310
309
  })
311
310
  },
312
311
  t
313
312
  )),
314
- Array.from({ length: V.mobile ?? 2 }).map((e, t) => /* @__PURE__ */ s.jsx(
313
+ Array.from({ length: F.mobile ?? 2 }).map((e, t) => /* @__PURE__ */ o.jsx(
315
314
  "div",
316
315
  {
317
316
  className: "listItem",
318
317
  style: {
319
- display: l ? "block" : "none",
318
+ display: i ? "block" : "none",
320
319
  backgroundColor: c == null ? void 0 : c.listItemBgColor
321
320
  },
322
- children: /* @__PURE__ */ s.jsx("div", { className: "row", children: ne ? ne() : /* @__PURE__ */ s.jsx(
323
- xt,
321
+ children: /* @__PURE__ */ o.jsx("div", { className: "row", children: se ? se() : /* @__PURE__ */ o.jsx(
322
+ ft,
324
323
  {
325
324
  title: !1,
326
325
  paragraph: {
327
- rows: Se,
328
- width: Pe
326
+ rows: ke,
327
+ width: pe
329
328
  },
330
329
  active: !0
331
330
  }
@@ -337,148 +336,148 @@ function Ot({
337
336
  }
338
337
  )
339
338
  }
340
- ), je = /* @__PURE__ */ s.jsxs("div", { className: "alert", children: [
341
- /* @__PURE__ */ s.jsx(
342
- Me,
339
+ ), we = l(() => /* @__PURE__ */ o.jsxs("div", { className: "alert", children: [
340
+ /* @__PURE__ */ o.jsx(
341
+ Ne,
343
342
  {
344
343
  highlightTag: "strong",
345
- keywords: `${w}`,
346
- sourceString: `共 ${w} 条`,
344
+ keywords: `${B}`,
345
+ sourceString: `共 ${B} 条`,
347
346
  tagClass: "totalText"
348
347
  }
349
348
  ),
350
- se && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
351
- /* @__PURE__ */ s.jsx(We.Text, { className: "splitBorder", children: "/" }),
352
- /* @__PURE__ */ s.jsx(
353
- Me,
349
+ !!h && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
350
+ /* @__PURE__ */ o.jsx(Te.Text, { className: "splitBorder", children: "/" }),
351
+ /* @__PURE__ */ o.jsx(
352
+ Ne,
354
353
  {
355
354
  highlightTag: "strong",
356
- keywords: `${((Ne = a == null ? void 0 : a.selectedRowKeys) == null ? void 0 : Ne.length) ?? 0}`,
357
- sourceString: `已选中 ${((Te = a == null ? void 0 : a.selectedRowKeys) == null ? void 0 : Te.length) ?? 0} 条`
355
+ keywords: `${(h == null ? void 0 : h.num) ?? 0}`,
356
+ sourceString: `已选中 ${(h == null ? void 0 : h.num) ?? 0} 条`
358
357
  }
359
358
  ),
360
- !!((ke = a == null ? void 0 : a.selectedRowKeys) != null && ke.length) && /* @__PURE__ */ s.jsx(
361
- We.Link,
359
+ !!(h != null && h.num) && /* @__PURE__ */ o.jsx(
360
+ Te.Link,
362
361
  {
363
362
  className: "cleanSelected",
364
- onClick: a.onClear,
363
+ onClick: h == null ? void 0 : h.onClear,
365
364
  children: "取消选中"
366
365
  }
367
366
  )
368
367
  ] })
369
- ] }), ft = (e) => {
370
- var o;
368
+ ] }), [B, h]), ct = (e) => {
369
+ var r;
371
370
  const t = { ...e };
372
- return t.className.includes("ant-table-cell-fix-right") && !$ && ((o = t.style) != null && o.right) && (t.style = {
371
+ return t.className.includes("ant-table-cell-fix-right") && !R && ((r = t.style) != null && r.right) && (t.style = {
373
372
  ...t.style,
374
- right: t.style.right - (M || 0)
375
- }), /* @__PURE__ */ s.jsx("th", { ...t });
376
- }, mt = (e) => {
373
+ right: t.style.right - (L || 0)
374
+ }), /* @__PURE__ */ o.jsx("th", { ...t });
375
+ }, at = (e) => {
377
376
  var t;
378
- l || e.active.id !== ((t = e.over) == null ? void 0 : t.id) && (q == null || q(e));
379
- }, ze = ee(() => R ? {
380
- row: (e) => $t({ ...e, loading: l == null ? void 0 : l.toString() })
381
- } : {}, [R, R ? l : !1]), bt = i(() => ({
377
+ i || e.active.id !== ((t = e.over) == null ? void 0 : t.id) && (G == null || G(e));
378
+ }, Be = te(() => N ? {
379
+ row: (e) => vt({ ...e, loading: i == null ? void 0 : i.toString() })
380
+ } : {}, [N, N ? i : !1]), ht = l(() => ({
382
381
  ...j,
383
382
  header: {
384
383
  ...j == null ? void 0 : j.header,
385
- cell: ft
384
+ cell: ct
386
385
  },
387
386
  body: {
388
387
  ...j == null ? void 0 : j.body,
389
- ...ze()
388
+ ...Be()
390
389
  }
391
- }), [j, $, M, ze]);
392
- return /* @__PURE__ */ s.jsxs(
390
+ }), [j, R, L, Be]);
391
+ return /* @__PURE__ */ o.jsxs(
393
392
  "div",
394
393
  {
395
- className: te("bitzTableBlock", {
394
+ className: re("bitzTableBlock", {
396
395
  fullscreen: u.fullscreen
397
396
  }),
398
- style: dt,
397
+ style: nt,
399
398
  children: [
400
- !O && /* @__PURE__ */ s.jsxs("div", { ref: B, className: at, style: ht, children: [
401
- /* @__PURE__ */ s.jsxs("div", { className: "bitzTableContainerBody", ref: he, children: [
402
- De && /* @__PURE__ */ s.jsxs("div", { className: "bitzTableToolbarBlock", children: [
403
- Ke || /* @__PURE__ */ s.jsx("div", {}),
404
- Oe,
405
- Ve
399
+ !q && /* @__PURE__ */ o.jsxs("div", { ref: w, className: st, style: it, children: [
400
+ /* @__PURE__ */ o.jsxs("div", { className: "bitzTableContainerBody", ref: he, children: [
401
+ ve && /* @__PURE__ */ o.jsxs("div", { className: "bitzTableToolbarBlock", children: [
402
+ Pe || /* @__PURE__ */ o.jsx("div", {}),
403
+ He,
404
+ $e
406
405
  ] }),
407
- /* @__PURE__ */ s.jsx(
408
- At,
406
+ /* @__PURE__ */ o.jsx(
407
+ Pt,
409
408
  {
410
- enabledRowDragSort: R,
411
- dataSource: be,
409
+ enabledRowDragSort: N,
410
+ dataSource: me,
412
411
  mergeRowKey: xe,
413
- onDragEnd: mt,
414
- children: /* @__PURE__ */ s.jsx(
415
- oe,
412
+ onDragEnd: at,
413
+ children: /* @__PURE__ */ o.jsx(
414
+ mt,
416
415
  {
417
- ...h,
418
- bordered: Fe,
419
- columns: rt,
420
- dataSource: be,
416
+ ...d,
417
+ bordered: Ke,
418
+ columns: Ze,
419
+ dataSource: me,
421
420
  loading: !1,
422
421
  pagination: !1,
423
- scroll: et,
424
- expandable: lt,
425
- rowSelection: it,
426
- onRow: ct,
427
- rowHoverable: Ge,
428
- rowClassName: ut,
422
+ scroll: Xe,
423
+ expandable: tt,
424
+ rowSelection: rt,
425
+ onRow: ot,
426
+ rowHoverable: Oe,
427
+ rowClassName: lt,
429
428
  className: "bitzTable",
430
- components: bt,
429
+ components: ht,
431
430
  rowKey: xe
432
431
  }
433
432
  )
434
433
  }
435
434
  )
436
435
  ] }),
437
- p && !!w && /* @__PURE__ */ s.jsxs("div", { className: "bitzTablePagination", ref: I, children: [
438
- je,
439
- /* @__PURE__ */ s.jsx(
440
- Bt,
436
+ W && !!B && /* @__PURE__ */ o.jsxs("div", { className: "bitzTablePagination", ref: X, children: [
437
+ we,
438
+ /* @__PURE__ */ o.jsx(
439
+ yt,
441
440
  {
442
441
  size: "small",
443
- enableControl: Re,
444
- pagination: C,
445
- total: w,
442
+ enableControl: Se,
443
+ pagination: x,
444
+ total: B,
446
445
  dataSource: b,
447
- resetPage: _e,
446
+ resetPage: Re,
448
447
  hideTotalText: !0,
449
- paginationEmit: P
448
+ paginationEmit: H
450
449
  }
451
450
  )
452
451
  ] }),
453
- !p && se && !!w && /* @__PURE__ */ s.jsx("div", { className: "bitzTablePagination", ref: I, children: je })
452
+ !W && !!h && !!B && /* @__PURE__ */ o.jsx("div", { className: "bitzTablePagination", ref: X, children: we })
454
453
  ] }),
455
- O && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
456
- (l || !!(b != null && b.length)) && /* @__PURE__ */ s.jsx(s.Fragment, { children: le ? (
454
+ q && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
455
+ (i || !!(b != null && b.length)) && /* @__PURE__ */ o.jsx(o.Fragment, { children: ne ? (
457
456
  // @ts-ignore
458
- /* @__PURE__ */ s.jsx(
459
- wt,
457
+ /* @__PURE__ */ o.jsx(
458
+ gt,
460
459
  {
461
- onRefresh: async () => !l && le(),
462
- children: Be
460
+ onRefresh: async () => !i && ne(),
461
+ children: ge
463
462
  }
464
463
  )
465
- ) : Be }),
466
- !l && /* @__PURE__ */ s.jsx(jt, { data: b, title: $e, img: Ae }),
467
- /* @__PURE__ */ s.jsx(
468
- gt,
464
+ ) : ge }),
465
+ !i && /* @__PURE__ */ o.jsx(xt, { data: b, title: Me, img: Le }),
466
+ /* @__PURE__ */ o.jsx(
467
+ bt,
469
468
  {
470
469
  className: "tableMobileDrawer",
471
- open: Ue,
470
+ open: Fe,
472
471
  placement: "bottom",
473
472
  height: "auto",
474
473
  closable: !1,
475
- onClose: de,
476
- children: /* @__PURE__ */ s.jsxs("div", { className: "drawerBox", children: [
477
- /* @__PURE__ */ s.jsx("div", { className: "boxBody", children: Xe.map((e, t) => /* @__PURE__ */ s.jsx(
474
+ onClose: ae,
475
+ children: /* @__PURE__ */ o.jsxs("div", { className: "drawerBox", children: [
476
+ /* @__PURE__ */ o.jsx("div", { className: "boxBody", children: _e.map((e, t) => /* @__PURE__ */ o.jsx(
478
477
  "div",
479
478
  {
480
479
  className: "operaList",
481
- onClick: () => Ye(e),
480
+ onClick: () => Qe(e),
482
481
  ...e.danger && {
483
482
  style: { color: g.colorError }
484
483
  },
@@ -486,8 +485,8 @@ function Ot({
486
485
  },
487
486
  t
488
487
  )) }),
489
- /* @__PURE__ */ s.jsx("div", { className: "boxLine" }),
490
- /* @__PURE__ */ s.jsx("div", { className: "boxFooter", onClick: de, children: He })
488
+ /* @__PURE__ */ o.jsx("div", { className: "boxLine" }),
489
+ /* @__PURE__ */ o.jsx("div", { className: "boxFooter", onClick: ae, children: We })
491
490
  ] })
492
491
  }
493
492
  )
@@ -496,7 +495,7 @@ function Ot({
496
495
  }
497
496
  );
498
497
  }
499
- const Cr = (p) => /* @__PURE__ */ s.jsx(Nt, { initValue: p, children: /* @__PURE__ */ s.jsx(Ot, { ...p }) });
498
+ const mr = (W) => /* @__PURE__ */ o.jsx(wt, { initValue: W, children: /* @__PURE__ */ o.jsx(Rt, { ...W }) });
500
499
  export {
501
- Cr as default
500
+ mr as default
502
501
  };