bitz-react-admin-ui 1.6.5 → 1.6.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 (84) hide show
  1. package/README.md +2 -2
  2. package/dist/bitz-ui.mjs +126 -120
  3. package/dist/components/BitzFluentInput/index.mjs +20 -17
  4. package/dist/components/BitzFluentSelect/index.mjs +20 -18
  5. package/dist/components/BitzList/List.mjs +28 -0
  6. package/dist/components/BitzList/LoadMore.mjs +69 -0
  7. package/dist/components/BitzList/index.less.mjs +4 -0
  8. package/dist/components/BitzList/index.mjs +6 -0
  9. package/dist/components/BitzPullRefresh/PullRefresh.mjs +113 -0
  10. package/dist/components/BitzPullRefresh/index.mjs +6 -0
  11. package/dist/components/BitzPullRefresh/style/index.less.mjs +4 -0
  12. package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +133 -94
  13. package/dist/components/BitzTable/ActionBar/ActionBar.mjs +64 -0
  14. package/dist/components/BitzTable/ActionBar/Button.mjs +10 -0
  15. package/dist/components/BitzTable/ActionBar/index.mjs +6 -60
  16. package/dist/components/BitzTable/ActionBar/style.mjs +36 -32
  17. package/dist/components/BitzTable/ActionCol/index.mjs +29 -28
  18. package/dist/components/BitzTable/Table/index.mjs +302 -253
  19. package/dist/components/BitzTable/TableSkeleton/index.mjs +46 -42
  20. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnSettingModal.mjs +179 -173
  21. package/dist/components/BitzTable/ToolBar/ColConfigIcon/DndItem.mjs +28 -26
  22. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +10 -9
  23. package/dist/components/BitzTable/ToolBar/DensityIcon/index.mjs +1 -1
  24. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +28 -25
  25. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +3 -2
  26. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +23 -14
  27. package/dist/components/BitzTable/ToolBar/style.mjs +29 -20
  28. package/dist/hooks/use-event-listener.mjs +40 -0
  29. package/dist/hooks/use-lock-fn.mjs +21 -0
  30. package/dist/hooks/use-scroll-parent.mjs +34 -0
  31. package/dist/hooks/use-touch.mjs +33 -0
  32. package/dist/node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +751 -1050
  33. package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useSetState/index.mjs +16 -0
  34. package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useThrottleFn/index.mjs +28 -0
  35. package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useUpdateEffect/index.mjs +6 -0
  36. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_Symbol.mjs +5 -0
  37. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_baseGetTag.mjs +11 -0
  38. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_baseTrim.mjs +9 -0
  39. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_freeGlobal.mjs +5 -0
  40. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_getRawTag.mjs +16 -0
  41. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_objectToString.mjs +8 -0
  42. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_root.mjs +5 -0
  43. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.mjs +10 -0
  44. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/debounce.mjs +55 -0
  45. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isObject.mjs +8 -0
  46. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isObjectLike.mjs +7 -0
  47. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isSymbol.mjs +10 -0
  48. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/now.mjs +7 -0
  49. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/throttle.mjs +19 -0
  50. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/toNumber.mjs +23 -0
  51. package/dist/node_modules/.store/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs +48 -37
  52. package/dist/node_modules/_clsx@2.1.0@clsx/dist/clsx.mjs +23 -0
  53. package/dist/style.css +1 -1
  54. package/dist/type/bitz-ui.d.ts +2 -0
  55. package/dist/type/components/BitzList/List.d.ts +4 -0
  56. package/dist/type/components/BitzList/LoadMore.d.ts +4 -0
  57. package/dist/type/components/BitzList/PropsType.d.ts +35 -0
  58. package/dist/type/components/BitzList/index.d.ts +5 -0
  59. package/dist/type/components/BitzPagination/index.d.ts +8 -2
  60. package/dist/type/components/BitzPullRefresh/PropsType.d.ts +43 -0
  61. package/dist/type/components/BitzPullRefresh/PullRefresh.d.ts +4 -0
  62. package/dist/type/components/BitzPullRefresh/index.d.ts +5 -0
  63. package/dist/type/components/BitzSelect/component/BitzSelectMobile.d.ts +1 -0
  64. package/dist/type/components/BitzTable/ActionBar/ActionBar.d.ts +37 -0
  65. package/dist/type/components/BitzTable/ActionBar/Button.d.ts +6 -0
  66. package/dist/type/components/BitzTable/ActionBar/index.d.ts +6 -33
  67. package/dist/type/components/BitzTable/ActionBar/style.d.ts +2 -2
  68. package/dist/type/components/BitzTable/Store/index.d.ts +2 -3
  69. package/dist/type/components/BitzTable/Table/index.d.ts +2 -2
  70. package/dist/type/components/BitzTable/TableSkeleton/index.d.ts +1 -1
  71. package/dist/type/components/BitzTable/ToolBar/ExportIcon/index.d.ts +2 -1
  72. package/dist/type/components/BitzTable/ToolBar/style.d.ts +1 -2
  73. package/dist/type/components/BitzTable/index.d.ts +6 -7
  74. package/dist/type/hooks/use-event-listener.d.ts +11 -0
  75. package/dist/type/hooks/use-lock-fn.d.ts +2 -0
  76. package/dist/type/hooks/use-scroll-parent.d.ts +9 -0
  77. package/dist/type/hooks/use-touch.d.ts +18 -0
  78. package/dist/type/pages/Login2/useRowSelection.d.ts +6 -4
  79. package/dist/type/pages/Test/index.d.ts +3 -0
  80. package/dist/type/utils/get-default-props.d.ts +2 -0
  81. package/dist/type/utils/scroll.d.ts +6 -0
  82. package/dist/utils/get-default-props.mjs +12 -0
  83. package/dist/utils/scroll.mjs +15 -0
  84. package/package.json +2 -1
@@ -1,285 +1,334 @@
1
- import { j as s } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { useContext as me, useState as U, useMemo as x, useRef as m, useEffect as ve, useCallback as Be } from "react";
3
- import { isMobile as v } from "../../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
4
- import { theme as ze, Table as L, Skeleton as Te } from "antd";
5
- import ke from "../../BitzDrawer/index.mjs";
6
- import Me from "../../BitzLoadMore/index.mjs";
7
- import Ee from "../../BitzPagination/index.mjs";
8
- import Le from "../../BitzNoData/index.mjs";
9
- import Ae, { TableContext as He } from "../Store/index.mjs";
10
- import We from "../TableSkeleton/index.mjs";
11
- import { columnSort as q, genColumnKey as X } from "../Store/utils/index.mjs";
12
- import F from "../../../node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useSize/index.mjs";
1
+ import { j as t } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { useContext as ve, useState as J, useMemo as g, useRef as P, useEffect as Me, useCallback as ke } from "react";
3
+ import { isMobile as M } from "../../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
4
+ import { theme as ze, Table as A, Skeleton as Le } from "antd";
5
+ import We from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
6
+ import He from "../../BitzDrawer/index.mjs";
7
+ import Pe from "../../BitzPagination/index.mjs";
8
+ import Ae from "../../BitzNoData/index.mjs";
9
+ import "../../BitzList/index.less.mjs";
10
+ import Se from "../../BitzList/List.mjs";
11
+ import "../../BitzPullRefresh/style/index.less.mjs";
12
+ import Ee from "../../BitzPullRefresh/PullRefresh.mjs";
13
+ import Oe, { TableContext as Ve } from "../Store/index.mjs";
14
+ import _e from "../TableSkeleton/index.mjs";
15
+ import { columnSort as Q, genColumnKey as Y } from "../Store/utils/index.mjs";
16
+ import S from "../../../node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useSize/index.mjs";
17
+ import $e from "../ActionCol/style.mjs";
13
18
  import "./index.less.mjs";
14
- import Oe from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/at.mjs";
15
- function Pe({
16
- showPagination: N = !0,
17
- fillEvenRow: A = !0,
18
- evenRowBgColor: H = "#f9f9f9",
19
- height: C,
20
- dataSource: r = [],
21
- total: B = 0,
22
- columns: b,
23
- loading: w = !1,
24
- skeletonNum: G = 2,
25
- skeletonRender: W,
26
- skeletonRowNum: J = 4,
27
- skeletonRowsWidth: Q = ["35%", "100%", "100%", "60%"],
28
- mobileLoadEmit: Y = () => {
29
- },
30
- mobileRefreshEmit: Z = () => {
31
- },
19
+ import De from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/at.mjs";
20
+ function Ke({
21
+ showPagination: B = !0,
22
+ fillEvenRow: E = !0,
23
+ evenRowBgColor: Re = "#f9f9f9",
24
+ height: w,
25
+ dataSource: s = [],
26
+ total: k = 0,
27
+ columns: u,
28
+ loading: j = !1,
29
+ skeletonNum: Z = 2,
30
+ skeletonRender: O,
31
+ skeletonRowNum: I = 4,
32
+ skeletonRowsWidth: ee = ["35%", "100%", "100%", "60%"],
33
+ mobileLoadEmit: oe,
34
+ mobileRefreshEmit: V,
32
35
  operationFilter: z,
33
- enableControlPage: I,
34
- pagination: ee,
35
- paginationEmit: ne = () => {
36
+ enableControlPage: te,
37
+ pagination: le,
38
+ paginationEmit: re = () => {
36
39
  },
37
- mobilePageHeight: se = 500,
38
- mobileCancelText: le = "取消",
39
- noDataTitle: re,
40
- noDataImg: te,
41
- color: oe,
42
- size: O,
40
+ mobilePageHeight: qe = 500,
41
+ mobileCancelText: ne = "取消",
42
+ noDataTitle: se,
43
+ noDataImg: ae,
44
+ color: Ge,
45
+ size: _,
43
46
  showTableTool: ie = !0,
44
- tableAction: ae,
45
- tableToolbar: de,
46
- selectionBar: ce,
47
- scroll: i,
48
- resetPage: he,
49
- ...a
47
+ tableAction: ce,
48
+ tableToolbar: he,
49
+ selectionBar: de,
50
+ scroll: c,
51
+ resetPage: fe,
52
+ ...h
50
53
  }) {
51
- const { token: fe } = ze.useToken(), d = me(He), [xe, T] = U(!1), be = x(() => !!(r != null && r.length) && (r == null ? void 0 : r.length) >= B, [r, B]), [ue, ge] = U([]), ye = (e, n) => {
52
- var h;
53
- const l = (h = z == null ? void 0 : z(e, n)) == null ? void 0 : h.filter(
54
- (c) => c.type !== "divider"
54
+ var X;
55
+ const { token: d } = ze.useToken(), { gap: xe } = $e(), f = ve(Ve), [be, L] = J(!1), ge = g(() => !!(s != null && s.length) && (s == null ? void 0 : s.length) >= k, [s, k]), [ue, Ce] = J([]), pe = (e, o) => {
56
+ var l;
57
+ const r = (l = z == null ? void 0 : z(e, o)) == null ? void 0 : l.filter(
58
+ (n) => n.type !== "divider"
55
59
  );
56
- l != null && l.length && (ge(l), T(!0));
57
- }, P = () => {
58
- T(!1);
59
- }, we = (e) => {
60
+ r != null && r.length && (Ce(r), L(!0));
61
+ }, $ = () => {
62
+ L(!1);
63
+ }, ye = (e) => {
64
+ var o;
65
+ L(!1), (o = e.onClick) == null || o.call(e);
66
+ }, C = P(null), p = S(C), N = P(null), W = S(N), D = P(null), y = S(D), we = () => {
67
+ var r;
68
+ const e = (r = N.current) == null ? void 0 : r.querySelectorAll(
69
+ ".ant-table-body tr:not(.ant-table-measure-row)"
70
+ ), o = [];
71
+ if (e == null || e.forEach((l) => {
72
+ var n;
73
+ o.push(
74
+ ((n = l.querySelector(".operationCol .actionGroup")) == null ? void 0 : n.clientWidth) || 0
75
+ );
76
+ }), o.length)
77
+ return Math.ceil(Math.max(...o)) + xe * 2;
78
+ }, K = () => {
60
79
  var n;
61
- T(!1), (n = e.onClick) == null || n.call(e);
62
- }, u = m(null), g = F(u), R = m(null), k = m(null), _ = m(null), y = F(_), je = x(() => {
63
- var e;
64
- return ((e = k.current) == null ? void 0 : e.getSize()) || 10;
65
- }, [k.current]), pe = (e) => {
66
- var V, S;
67
- const n = e.length, l = e.filter((f) => f.width), c = l.map((f) => f.width).reduce((f, Ce) => f + Ce, 0);
68
- let o = 0;
69
- if (u.current) {
70
- const f = window.getComputedStyle(u.current);
71
- o = parseInt(f.getPropertyValue("--toolCell-width"));
80
+ const e = (n = N.current) == null ? void 0 : n.querySelector(
81
+ ".ant-table-body"
82
+ ), o = e == null ? void 0 : e.clientWidth, r = ((e == null ? void 0 : e.offsetWidth) || 0) - o, l = r > 0;
83
+ return { tbodyWidth: o, scrollBarWidth: r, hasScrollBar: l };
84
+ }, me = (e) => {
85
+ const o = e.length, r = e.filter((b) => b.width), n = r.map((b) => b.width).reduce((b, Te) => b + Te, 0);
86
+ let a = 0;
87
+ if (C.current) {
88
+ const b = window.getComputedStyle(C.current);
89
+ a = parseInt(b.getPropertyValue("--toolCell-width"));
72
90
  }
73
- let t = 0;
74
- a.rowSelection && (t += o), a.expandable && (t += o);
75
- const E = (S = (V = R.current) == null ? void 0 : V.querySelector(".ant-table-body")) == null ? void 0 : S.clientWidth, p = (parseInt(`${E}`) || 0) - c - t;
76
- return p >= 0 ? p / (n - l.length) : void 0;
77
- }, j = x(() => {
78
- const e = (o) => o.map((t) => {
79
- const E = X(
80
- (t == null ? void 0 : t.key) || (t == null ? void 0 : t.dataIndex),
81
- t.index
82
- ), p = d.columnsMap[E];
83
- return p && p.show === !1 ? !1 : t.children ? {
84
- ...t,
85
- children: e(t.children)
86
- } : t;
87
- }).filter(Boolean), n = e(b);
88
- if (v)
89
- return n.sort(q(d.columnsMap));
90
- const l = n.sort(q(d.columnsMap)), h = pe(l), c = l.map((o, t) => ({
91
- ...o,
92
- ...o.width ? {} : {
91
+ let i = 0;
92
+ h.rowSelection && (i += a), h.expandable && (i += a);
93
+ const { tbodyWidth: v } = K(), x = parseInt(`${T.x}`) || 0, Ne = Math.max(x, v), F = (parseInt(`${Ne}`) || 0) - n - i;
94
+ return F >= 0 ? F / (o - r.length) : void 0;
95
+ }, { y: H, hasScrollBar: R } = g(() => {
96
+ if (typeof w > "u")
97
+ return {};
98
+ const { hasScrollBar: e } = K();
99
+ let o = 40, r = 40, l = 10;
100
+ if (C.current) {
101
+ const x = window.getComputedStyle(C.current);
102
+ o = parseInt(x.getPropertyValue("--cell-block")), r = parseInt(x.getPropertyValue("--toolbar-height")), l = parseInt(x.getPropertyValue("--container-gap")) || 0;
103
+ }
104
+ const n = (y == null ? void 0 : y.height) || 0, a = n ? l : 0;
105
+ return { y: w - n - a - r - o, hasScrollBar: e };
106
+ }, [
107
+ w,
108
+ y == null ? void 0 : y.height,
109
+ p == null ? void 0 : p.height,
110
+ W == null ? void 0 : W.height
111
+ ]), T = g(() => c != null && c.x ? { x: c.x, y: c.y || H } : c != null && c.y ? { x: 1e3, y: c.y } : { x: 1e3, y: H }, [c, H]), m = g(() => {
112
+ const e = (a) => a.map((i) => {
113
+ const v = Y(
114
+ (i == null ? void 0 : i.key) || (i == null ? void 0 : i.dataIndex),
115
+ i.index
116
+ ), x = f.columnsMap[v];
117
+ return x && x.show === !1 ? !1 : i.children ? {
118
+ ...i,
119
+ children: e(i.children)
120
+ } : i;
121
+ }).filter(Boolean), o = e(u);
122
+ if (M)
123
+ return o.sort(Q(f.columnsMap));
124
+ const r = o.sort(Q(f.columnsMap)), l = me(r), n = r.map((a) => ({
125
+ ...a,
126
+ ...a.width ? {
127
+ width: a.useMaxWidth ? we() ?? a.width : a.width
128
+ } : {
93
129
  // 给未设置width的列设置平均数
94
- width: h
130
+ width: l
95
131
  }
96
132
  }));
97
- return [L.SELECTION_COLUMN, L.EXPAND_COLUMN, ...c];
133
+ return [A.SELECTION_COLUMN, A.EXPAND_COLUMN, ...n];
98
134
  }, [
99
- d.columnsMap,
100
- b,
101
- v,
102
- a.rowSelection,
103
- a.expandable,
104
- g == null ? void 0 : g.height
135
+ f.columnsMap,
136
+ u,
137
+ M,
138
+ T.x,
139
+ h.rowSelection,
140
+ h.expandable,
141
+ p == null ? void 0 : p.height
105
142
  ]);
106
- ve(() => {
107
- if (b && b.length > 0) {
108
- const e = b.map(
109
- (n) => (
143
+ Me(() => {
144
+ if (u && u.length > 0) {
145
+ const e = u.map(
146
+ (o) => (
110
147
  // @ts-ignore
111
- X((n == null ? void 0 : n.key) ?? (n == null ? void 0 : n.dataIndex), n == null ? void 0 : n.dataIndex)
148
+ Y((o == null ? void 0 : o.key) ?? (o == null ? void 0 : o.dataIndex), o == null ? void 0 : o.dataIndex)
112
149
  )
113
150
  );
114
- d.setSortKeyColumns(e);
151
+ f.setSortKeyColumns(e);
115
152
  }
116
- }, [b]);
117
- const { y: M } = x(() => {
118
- if (typeof C > "u")
119
- return {};
120
- let e = 40, n = 40;
121
- if (u.current) {
122
- const o = window.getComputedStyle(u.current);
123
- e = parseInt(
124
- o.getPropertyValue("--cell-block") || "40"
125
- ), n = parseInt(
126
- o.getPropertyValue("--toolbar-height") || "40"
127
- );
153
+ }, [u]);
154
+ const q = g(() => `${_ ?? (f == null ? void 0 : f.tableSize) ?? "lg"}BitzTable`, [_, f.tableSize]), Be = g(() => We(
155
+ "bitzTableContainer",
156
+ /* "hideBorder", */
157
+ { hasScrollBar: R },
158
+ q
159
+ ), [q, R]), je = g(() => {
160
+ var e, o, r, l, n;
161
+ return {
162
+ height: w,
163
+ "--toolbar-bgColor": (e = d.Table) == null ? void 0 : e.toolbarBgColor,
164
+ "--thead-bgColor": (o = d.Table) == null ? void 0 : o.theadBgColor,
165
+ "--thead-hoverBgColor": (r = d.Table) == null ? void 0 : r.theadHoverBgColor,
166
+ "--evenRow-BgColor": (l = d.Table) == null ? void 0 : l.evenRowBgColor,
167
+ "--expandIcon-borderColor": (n = d.Table) == null ? void 0 : n.expandIconBorderColor
168
+ // '--tableBody-bootomBorderColor': token.Table?.borderColor || '#f0f0f0',
169
+ };
170
+ }, [w]), G = ke(
171
+ (e, o) => E ? o % 2 === 0 ? "oddRow" : "evenRow" : "",
172
+ [E]
173
+ ), U = /* @__PURE__ */ t.jsx(
174
+ Se,
175
+ {
176
+ finished: ge,
177
+ onLoad: oe,
178
+ loadingText: "加载中...",
179
+ finishedText: "没有更多了",
180
+ errorText: "加载失败",
181
+ children: /* @__PURE__ */ t.jsxs(
182
+ "div",
183
+ {
184
+ className: "mobileList",
185
+ style: { backgroundColor: (X = d.Table) == null ? void 0 : X.mobileListBgColor },
186
+ children: [
187
+ s == null ? void 0 : s.map((e, o) => {
188
+ var r;
189
+ return /* @__PURE__ */ t.jsx(
190
+ "div",
191
+ {
192
+ className: "listItem",
193
+ style: { backgroundColor: (r = d.Table) == null ? void 0 : r.listItemBgColor },
194
+ onClick: () => pe(e, o),
195
+ children: m == null ? void 0 : m.map((l, n) => {
196
+ var a;
197
+ return !(l != null && l.mobileHide) && /* @__PURE__ */ t.jsxs(
198
+ "div",
199
+ {
200
+ className: "row",
201
+ style: { color: d.colorText },
202
+ children: [
203
+ !l.mobileHideLabel && /* @__PURE__ */ t.jsxs("div", { className: "label", children: [
204
+ `${l.title}`,
205
+ ":"
206
+ ] }),
207
+ /* @__PURE__ */ t.jsx("div", { className: "value", children: ((a = l == null ? void 0 : l.render) == null ? void 0 : a.call(
208
+ l,
209
+ De(e, (l == null ? void 0 : l.dataIndex) || ""),
210
+ e,
211
+ o
212
+ )) || (e == null ? void 0 : e[l.dataIndex]) })
213
+ ]
214
+ },
215
+ n
216
+ );
217
+ })
218
+ },
219
+ o
220
+ );
221
+ }),
222
+ j && Array.from({ length: Z }).map((e, o) => {
223
+ var r;
224
+ return /* @__PURE__ */ t.jsx(
225
+ "div",
226
+ {
227
+ className: "listItem",
228
+ style: { backgroundColor: (r = d.Table) == null ? void 0 : r.listItemBgColor },
229
+ children: /* @__PURE__ */ t.jsx("div", { className: "row", children: O ? O() : /* @__PURE__ */ t.jsx(
230
+ Le,
231
+ {
232
+ title: !1,
233
+ paragraph: {
234
+ rows: I,
235
+ width: ee
236
+ },
237
+ active: !0
238
+ }
239
+ ) })
240
+ },
241
+ o
242
+ );
243
+ })
244
+ ]
245
+ }
246
+ )
128
247
  }
129
- const l = y == null ? void 0 : y.height;
130
- return { y: C - (l || 0) - n - e };
131
- }, [C, y == null ? void 0 : y.height, g == null ? void 0 : g.height]), $ = x(() => i != null && i.x ? { x: i.x, y: i.y || M } : i != null && i.y ? { x: 1e3, y: i.y } : { x: 1e3, y: M }, [i, M]), Ne = x(() => `${O ?? (d == null ? void 0 : d.tableSize) ?? "lg"}BitzTable`, [O, d.tableSize]), D = x(() => ({
132
- "--evenRow-BgColor": H
133
- // '--tableBody-bootomBorderColor': token.Table?.borderColor || '#f0f0f0',
134
- }), [
135
- H
136
- /** token.Table?.borderColor */
137
- ]), K = Be(
138
- (e, n) => A ? n % 2 === 0 ? "oddRow" : "evenRow" : "",
139
- [A]
140
248
  );
141
- return /* @__PURE__ */ s.jsxs("div", { className: "bitzTableBlock", children: [
142
- !v && /* @__PURE__ */ s.jsxs(
143
- "div",
144
- {
145
- ref: u,
146
- className: `bitzTableContainer ${Ne}`,
147
- style: { height: C },
148
- children: [
149
- /* @__PURE__ */ s.jsxs("div", { className: "bitzTableContainerBody", ref: R, children: [
150
- ie && /* @__PURE__ */ s.jsxs("div", { className: "bitzTableToolbarBlock", children: [
151
- ae || /* @__PURE__ */ s.jsx("div", {}),
152
- de,
153
- (a == null ? void 0 : a.rowSelection) && /* @__PURE__ */ s.jsx(s.Fragment, { children: ce })
154
- ] }),
155
- /* @__PURE__ */ s.jsx(
156
- L,
157
- {
158
- columns: j,
159
- dataSource: r,
160
- loading: !1,
161
- pagination: !1,
162
- scroll: $,
163
- ...a,
164
- style: D,
165
- rowClassName: K
166
- }
167
- ),
168
- /* @__PURE__ */ s.jsx(
169
- We,
170
- {
171
- columns: j,
172
- pageSize: je,
173
- scroll: $,
174
- rowSelection: a.rowSelection,
175
- expandable: a.expandable,
176
- style: D,
177
- rowClassName: K,
178
- loading: w
179
- }
180
- )
181
- ] }),
182
- N && /* @__PURE__ */ s.jsx(
183
- Ee,
184
- {
185
- elRefInstance: _,
186
- refInstance: k,
187
- enableControl: I,
188
- pagination: ee,
189
- total: B,
190
- dataSource: r,
191
- resetPage: he,
192
- paginationEmit: ne
193
- }
194
- )
195
- ]
196
- }
197
- ),
198
- v && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
199
- (w || (r == null ? void 0 : r.length) > 0) && /* @__PURE__ */ s.jsx(
200
- Me,
249
+ return /* @__PURE__ */ t.jsxs("div", { className: "bitzTableBlock", children: [
250
+ !M && /* @__PURE__ */ t.jsxs("div", { ref: C, className: Be, style: je, children: [
251
+ /* @__PURE__ */ t.jsxs("div", { className: "bitzTableContainerBody", ref: N, children: [
252
+ ie && /* @__PURE__ */ t.jsxs("div", { className: "bitzTableToolbarBlock", children: [
253
+ ce || /* @__PURE__ */ t.jsx("div", {}),
254
+ he,
255
+ (h == null ? void 0 : h.rowSelection) && /* @__PURE__ */ t.jsx(t.Fragment, { children: de })
256
+ ] }),
257
+ /* @__PURE__ */ t.jsx(
258
+ A,
259
+ {
260
+ columns: m,
261
+ dataSource: s,
262
+ loading: !1,
263
+ pagination: !1,
264
+ scroll: T,
265
+ ...h,
266
+ rowClassName: G
267
+ }
268
+ ),
269
+ /* @__PURE__ */ t.jsx(
270
+ _e,
271
+ {
272
+ columns: m,
273
+ dataLength: s.length,
274
+ scroll: T,
275
+ rowSelection: h.rowSelection,
276
+ expandable: h.expandable,
277
+ rowClassName: G,
278
+ loading: j
279
+ }
280
+ )
281
+ ] }),
282
+ B && /* @__PURE__ */ t.jsx(
283
+ Pe,
284
+ {
285
+ elRefInstance: D,
286
+ enableControl: te,
287
+ pagination: le,
288
+ total: k,
289
+ dataSource: s,
290
+ resetPage: fe,
291
+ paginationEmit: re
292
+ }
293
+ )
294
+ ] }),
295
+ M && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
296
+ (j || (s == null ? void 0 : s.length) > 0) && /* @__PURE__ */ t.jsx(t.Fragment, { children: V ? /* @__PURE__ */ t.jsx(Ee, { onRefresh: V, children: U }) : U }),
297
+ !j && /* @__PURE__ */ t.jsx(Ae, { data: s, title: se, img: ae }),
298
+ /* @__PURE__ */ t.jsx(
299
+ He,
201
300
  {
202
- color: oe,
203
- height: se,
204
- loading: w,
205
- showNoMore: be,
206
- refreshEmit: Z,
207
- loadEmit: Y,
208
- extra: /* @__PURE__ */ s.jsxs("div", { className: "mobileTable", children: [
209
- r == null ? void 0 : r.map((e, n) => /* @__PURE__ */ s.jsx(
301
+ className: "tableMobileDrawer",
302
+ open: be,
303
+ placement: "bottom",
304
+ height: "auto",
305
+ closable: !1,
306
+ onClose: $,
307
+ children: /* @__PURE__ */ t.jsxs("div", { className: "drawerBox", children: [
308
+ /* @__PURE__ */ t.jsx("div", { className: "boxBody", children: ue.map((e, o) => /* @__PURE__ */ t.jsx(
210
309
  "div",
211
310
  {
212
- className: "mobileTableRow",
213
- onClick: () => ye(e, n),
214
- children: /* @__PURE__ */ s.jsx("div", { className: "rowBox", children: j == null ? void 0 : j.map(
215
- (l, h) => {
216
- var c;
217
- return /* @__PURE__ */ s.jsx("div", { children: !(l != null && l.mobileHideRow) && /* @__PURE__ */ s.jsxs("div", { className: "row", children: [
218
- !l.mobileHideLabel && /* @__PURE__ */ s.jsxs("div", { className: "label", children: [
219
- `${l.title}`,
220
- ":"
221
- ] }),
222
- /* @__PURE__ */ s.jsx("div", { className: "value", children: ((c = l == null ? void 0 : l.render) == null ? void 0 : c.call(
223
- l,
224
- Oe(e, (l == null ? void 0 : l.dataIndex) || ""),
225
- e,
226
- n
227
- )) || (e == null ? void 0 : e[l.dataIndex]) })
228
- ] }) }, h);
229
- }
230
- ) })
231
- },
232
- n
233
- )),
234
- w && Array.from({ length: G }).map((e, n) => /* @__PURE__ */ s.jsx("div", { className: "mobileTableRow", children: /* @__PURE__ */ s.jsx("div", { className: "rowBox", children: W ? W() : /* @__PURE__ */ s.jsx(
235
- Te,
236
- {
237
- title: !1,
238
- paragraph: {
239
- rows: J,
240
- width: Q
311
+ className: "operaList",
312
+ onClick: () => ye(e),
313
+ ...e.danger && {
314
+ style: { color: d.colorError }
241
315
  },
242
- active: !0
243
- }
244
- ) }) }, n)),
245
- /* @__PURE__ */ s.jsx(
246
- ke,
247
- {
248
- className: "tableMobileDrawer",
249
- open: xe,
250
- placement: "bottom",
251
- height: "auto",
252
- closable: !1,
253
- onClose: P,
254
- children: /* @__PURE__ */ s.jsxs("div", { className: "drawerBox", children: [
255
- /* @__PURE__ */ s.jsx("div", { className: "boxBody", children: ue.map((e, n) => /* @__PURE__ */ s.jsx(
256
- "div",
257
- {
258
- className: "operaList",
259
- onClick: () => we(e),
260
- ...e.danger && {
261
- style: { color: fe.colorError }
262
- },
263
- children: e.label
264
- },
265
- n
266
- )) }),
267
- /* @__PURE__ */ s.jsx("div", { className: "boxLine" }),
268
- /* @__PURE__ */ s.jsx("div", { className: "boxFooter", onClick: P, children: le })
269
- ] })
270
- }
271
- )
316
+ children: e.label
317
+ },
318
+ o
319
+ )) }),
320
+ /* @__PURE__ */ t.jsx("div", { className: "boxLine" }),
321
+ /* @__PURE__ */ t.jsx("div", { className: "boxFooter", onClick: $, children: ne })
272
322
  ] })
273
323
  }
274
- ),
275
- !w && /* @__PURE__ */ s.jsx(Le, { data: r, title: re, img: te })
324
+ )
276
325
  ] })
277
326
  ] });
278
327
  }
279
- const Ye = (N) => (
328
+ const fo = (B) => (
280
329
  // @ts-ignore
281
- /* @__PURE__ */ s.jsx(Ae, { initValue: N, children: /* @__PURE__ */ s.jsx(Pe, { ...N }) })
330
+ /* @__PURE__ */ t.jsx(Oe, { initValue: B, children: /* @__PURE__ */ t.jsx(Ke, { ...B }) })
282
331
  );
283
332
  export {
284
- Ye as default
333
+ fo as default
285
334
  };