bitz-react-admin-ui 1.6.6 → 1.6.8

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 (83) hide show
  1. package/dist/bitz-ui.mjs +126 -120
  2. package/dist/components/BitzFluentInput/index.mjs +17 -14
  3. package/dist/components/BitzFluentSelect/index.mjs +17 -15
  4. package/dist/components/BitzList/List.mjs +14 -0
  5. package/dist/components/BitzList/LoadMore.mjs +60 -0
  6. package/dist/components/BitzList/index.less.mjs +4 -0
  7. package/dist/components/BitzList/index.mjs +6 -0
  8. package/dist/components/BitzPullRefresh/PullRefresh.mjs +84 -0
  9. package/dist/components/BitzPullRefresh/index.mjs +6 -0
  10. package/dist/components/BitzPullRefresh/style/index.less.mjs +4 -0
  11. package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +86 -74
  12. package/dist/components/BitzTable/ActionBar/ActionBar.mjs +36 -0
  13. package/dist/components/BitzTable/ActionBar/Button.mjs +10 -0
  14. package/dist/components/BitzTable/ActionBar/index.mjs +6 -34
  15. package/dist/components/BitzTable/ActionBar/style.mjs +36 -27
  16. package/dist/components/BitzTable/ActionCol/index.mjs +18 -17
  17. package/dist/components/BitzTable/Table/index.mjs +154 -92
  18. package/dist/components/BitzTable/TableSkeleton/index.mjs +36 -32
  19. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnSettingModal.mjs +88 -99
  20. package/dist/components/BitzTable/ToolBar/ColConfigIcon/DndItem.mjs +20 -18
  21. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +8 -8
  22. package/dist/components/BitzTable/ToolBar/DensityIcon/index.mjs +7 -7
  23. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +13 -13
  24. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +5 -5
  25. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +7 -3
  26. package/dist/components/BitzTable/ToolBar/style.mjs +29 -20
  27. package/dist/hooks/use-event-listener.mjs +31 -0
  28. package/dist/hooks/use-lock-fn.mjs +18 -0
  29. package/dist/hooks/use-scroll-parent.mjs +32 -0
  30. package/dist/hooks/use-touch.mjs +33 -0
  31. package/dist/node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +751 -1050
  32. package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useSetState/index.mjs +16 -0
  33. package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useThrottleFn/index.mjs +28 -0
  34. package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useUpdateEffect/index.mjs +6 -0
  35. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_Symbol.mjs +5 -0
  36. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_baseGetTag.mjs +11 -0
  37. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_baseTrim.mjs +9 -0
  38. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_freeGlobal.mjs +5 -0
  39. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_getRawTag.mjs +16 -0
  40. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_objectToString.mjs +8 -0
  41. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_root.mjs +5 -0
  42. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.mjs +10 -0
  43. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/debounce.mjs +55 -0
  44. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isObject.mjs +8 -0
  45. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isObjectLike.mjs +7 -0
  46. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isSymbol.mjs +10 -0
  47. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/now.mjs +7 -0
  48. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/throttle.mjs +19 -0
  49. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/toNumber.mjs +23 -0
  50. package/dist/node_modules/.store/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs +48 -37
  51. package/dist/node_modules/_clsx@2.1.0@clsx/dist/clsx.mjs +23 -0
  52. package/dist/style.css +1 -1
  53. package/dist/type/bitz-ui.d.ts +2 -0
  54. package/dist/type/components/BitzList/List.d.ts +4 -0
  55. package/dist/type/components/BitzList/LoadMore.d.ts +4 -0
  56. package/dist/type/components/BitzList/PropsType.d.ts +35 -0
  57. package/dist/type/components/BitzList/index.d.ts +5 -0
  58. package/dist/type/components/BitzPagination/index.d.ts +8 -2
  59. package/dist/type/components/BitzPullRefresh/PropsType.d.ts +43 -0
  60. package/dist/type/components/BitzPullRefresh/PullRefresh.d.ts +4 -0
  61. package/dist/type/components/BitzPullRefresh/index.d.ts +5 -0
  62. package/dist/type/components/BitzSelect/component/BitzSelectMobile.d.ts +1 -0
  63. package/dist/type/components/BitzTable/ActionBar/ActionBar.d.ts +37 -0
  64. package/dist/type/components/BitzTable/ActionBar/Button.d.ts +6 -0
  65. package/dist/type/components/BitzTable/ActionBar/index.d.ts +6 -33
  66. package/dist/type/components/BitzTable/ActionBar/style.d.ts +2 -2
  67. package/dist/type/components/BitzTable/Store/index.d.ts +2 -3
  68. package/dist/type/components/BitzTable/Table/index.d.ts +2 -2
  69. package/dist/type/components/BitzTable/TableSkeleton/index.d.ts +1 -1
  70. package/dist/type/components/BitzTable/ToolBar/ExportIcon/index.d.ts +2 -1
  71. package/dist/type/components/BitzTable/ToolBar/style.d.ts +1 -2
  72. package/dist/type/components/BitzTable/index.d.ts +5 -1
  73. package/dist/type/hooks/use-event-listener.d.ts +11 -0
  74. package/dist/type/hooks/use-lock-fn.d.ts +2 -0
  75. package/dist/type/hooks/use-scroll-parent.d.ts +9 -0
  76. package/dist/type/hooks/use-touch.d.ts +18 -0
  77. package/dist/type/pages/Login2/useRowSelection.d.ts +6 -4
  78. package/dist/type/pages/Test/index.d.ts +3 -0
  79. package/dist/type/utils/get-default-props.d.ts +2 -0
  80. package/dist/type/utils/scroll.d.ts +6 -0
  81. package/dist/utils/get-default-props.mjs +12 -0
  82. package/dist/utils/scroll.mjs +15 -0
  83. package/package.json +2 -1
@@ -1,112 +1,174 @@
1
- import { j as s } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { useContext as ze, useState as U, useMemo as x, useRef as v, useEffect as Be, useCallback as Me } from "react";
3
- import { isMobile as z } from "../../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
4
- import { theme as Te, Table as A, Skeleton as ke } from "antd";
5
- import Ee from "../../BitzDrawer/index.mjs";
6
- import Le from "../../BitzLoadMore/index.mjs";
7
- import Ae from "../../BitzPagination/index.mjs";
8
- import We from "../../BitzNoData/index.mjs";
9
- import He, { TableContext as Pe } from "../Store/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 b, 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 E, Skeleton as Le } from "antd";
5
+ import We from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
6
+ import Ae from "../../BitzDrawer/index.mjs";
7
+ import Pe from "../../BitzPagination/index.mjs";
8
+ import Ee from "../../BitzNoData/index.mjs";
9
+ import "../../BitzList/index.less.mjs";
10
+ import He from "../../BitzList/List.mjs";
11
+ import "../../BitzPullRefresh/style/index.less.mjs";
12
+ import De from "../../BitzPullRefresh/PullRefresh.mjs";
13
+ import Se, { TableContext as Fe } from "../Store/index.mjs";
10
14
  import Oe from "../TableSkeleton/index.mjs";
11
- import { columnSort as X, genColumnKey as q } from "../Store/utils/index.mjs";
12
- import G from "../../../node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useSize/index.mjs";
15
+ import { columnSort as Q, genColumnKey as Y } from "../Store/utils/index.mjs";
16
+ import H from "../../../node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useSize/index.mjs";
17
+ import Ve from "../ActionCol/style.mjs";
13
18
  import "./index.less.mjs";
14
- import $e from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/at.mjs";
15
- function Se({ showPagination: p = !0, fillEvenRow: W = !0, evenRowBgColor: H = "#f9f9f9", height: m, dataSource: t = [], total: B = 0, columns: u, loading: w = !1, skeletonNum: J = 2, skeletonRender: P, skeletonRowNum: Q = 4, skeletonRowsWidth: Y = ["35%", "100%", "100%", "60%"], mobileLoadEmit: Z = () => {
16
- }, mobileRefreshEmit: I = () => {
17
- }, operationFilter: M, enableControlPage: ee, pagination: ne, paginationEmit: se = () => {
18
- }, mobilePageHeight: le = 500, mobileCancelText: te = "取消", noDataTitle: oe, noDataImg: re, color: ie, size: O, showTableTool: ae = !0, tableAction: de, tableToolbar: ce, selectionBar: he, scroll: i, resetPage: fe, ...a }) {
19
- const { token: xe } = Te.useToken(), d = ze(Pe), [ue, T] = U(!1), be = x(() => !!(t != null && t.length) && (t == null ? void 0 : t.length) >= B, [t, B]), [ge, ye] = U([]), we = (e, n) => {
20
- var h;
21
- const l = (h = M == null ? void 0 : M(e, n)) == null ? void 0 : h.filter((c) => c.type !== "divider");
22
- l != null && l.length && (ye(l), T(!0));
23
- }, $ = () => {
24
- T(!1);
25
- }, je = (e) => {
19
+ import _e from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/at.mjs";
20
+ function $e({ showPagination: B = !0, fillEvenRow: D = !0, evenRowBgColor: Ke = "#f9f9f9", height: m, dataSource: s = [], total: k = 0, columns: g, loading: j = !1, skeletonNum: Z = 2, skeletonRender: S, skeletonRowNum: I = 4, skeletonRowsWidth: ee = ["35%", "100%", "100%", "60%"], mobileLoadEmit: oe, mobileRefreshEmit: F, operationFilter: z, enableControlPage: te, pagination: ne, paginationEmit: le = () => {
21
+ }, mobilePageHeight: Re = 500, mobileCancelText: re = "取消", noDataTitle: se, noDataImg: ae, color: qe, size: O, showTableTool: ie = !0, tableAction: ce, tableToolbar: de, selectionBar: he, scroll: c, resetPage: ue, ...d }) {
22
+ var U;
23
+ const { token: h } = ze.useToken(), { gap: fe } = Ve(), u = ve(Fe), [xe, L] = J(!1), be = b(() => !!(s != null && s.length) && (s == null ? void 0 : s.length) >= k, [s, k]), [ge, pe] = J([]), Ce = (e, o) => {
26
24
  var n;
27
- T(!1), (n = e.onClick) == null || n.call(e);
28
- }, b = v(null), g = G(b), S = v(null), k = v(null), _ = v(null), y = G(_), pe = x(() => {
29
- var e;
30
- return ((e = k.current) == null ? void 0 : e.getSize()) || 10;
31
- }, [k.current]), me = (e) => {
32
- var V, F;
33
- const n = e.length, l = e.filter((f) => f.width), c = l.map((f) => f.width).reduce((f, ve) => f + ve, 0);
34
- let r = 0;
35
- if (b.current) {
36
- const f = window.getComputedStyle(b.current);
37
- r = parseInt(f.getPropertyValue("--toolCell-width"));
25
+ const l = (n = z == null ? void 0 : z(e, o)) == null ? void 0 : n.filter((r) => r.type !== "divider");
26
+ l != null && l.length && (pe(l), L(!0));
27
+ }, V = () => {
28
+ L(!1);
29
+ }, ye = (e) => {
30
+ var o;
31
+ L(!1), (o = e.onClick) == null || o.call(e);
32
+ }, p = P(null), C = H(p), N = P(null), W = H(N), _ = P(null), y = H(_), me = () => {
33
+ var l;
34
+ const e = (l = N.current) == null ? void 0 : l.querySelectorAll(".ant-table-body tr:not(.ant-table-measure-row)"), o = [];
35
+ if (e == null || e.forEach((n) => {
36
+ var r;
37
+ o.push(((r = n.querySelector(".operationCol .actionGroup")) == null ? void 0 : r.clientWidth) || 0);
38
+ }), o.length)
39
+ return Math.ceil(Math.max(...o)) + fe * 2;
40
+ }, $ = () => {
41
+ var r;
42
+ const e = (r = N.current) == null ? void 0 : r.querySelector(".ant-table-body"), o = e == null ? void 0 : e.clientWidth, l = ((e == null ? void 0 : e.offsetWidth) || 0) - o, n = l > 0;
43
+ return { tbodyWidth: o, scrollBarWidth: l, hasScrollBar: n };
44
+ }, we = (e) => {
45
+ const o = e.length, l = e.filter((x) => x.width), r = l.map((x) => x.width).reduce((x, Te) => x + Te, 0);
46
+ let a = 0;
47
+ if (p.current) {
48
+ const x = window.getComputedStyle(p.current);
49
+ a = parseInt(x.getPropertyValue("--toolCell-width"));
38
50
  }
39
- let o = 0;
40
- a.rowSelection && (o += r), a.expandable && (o += r);
41
- const L = (F = (V = S.current) == null ? void 0 : V.querySelector(".ant-table-body")) == null ? void 0 : F.clientWidth, C = parseInt(`${N.x}`) || 0, Ce = Math.max(C, L), R = (parseInt(`${Ce}`) || 0) - c - o;
42
- return R >= 0 ? R / (n - l.length) : void 0;
43
- }, { y: E } = x(() => {
51
+ let i = 0;
52
+ d.rowSelection && (i += a), d.expandable && (i += a);
53
+ const { tbodyWidth: v } = $(), f = parseInt(`${T.x}`) || 0, Ne = Math.max(f, v), X = (parseInt(`${Ne}`) || 0) - r - i;
54
+ return X >= 0 ? X / (o - l.length) : void 0;
55
+ }, { y: A, hasScrollBar: K } = b(() => {
44
56
  if (typeof m > "u")
45
57
  return {};
46
- let e = 40, n = 40;
47
- if (b.current) {
48
- const r = window.getComputedStyle(b.current);
49
- e = parseInt(r.getPropertyValue("--cell-block") || "40"), n = parseInt(r.getPropertyValue("--toolbar-height") || "40");
58
+ const { hasScrollBar: e } = $();
59
+ let o = 40, l = 40, n = 10;
60
+ if (p.current) {
61
+ const f = window.getComputedStyle(p.current);
62
+ o = parseInt(f.getPropertyValue("--cell-block")), l = parseInt(f.getPropertyValue("--toolbar-height")), n = parseInt(f.getPropertyValue("--container-gap")) || 0;
50
63
  }
51
- const l = y == null ? void 0 : y.height;
52
- return { y: m - (l || 0) - n - e };
53
- }, [m, y == null ? void 0 : y.height, g == null ? void 0 : g.height]), N = x(() => i != null && i.x ? { x: i.x, y: i.y || E } : i != null && i.y ? { x: 1e3, y: i.y } : { x: 1e3, y: E }, [i, E]), j = x(() => {
54
- const e = (r) => r.map((o) => {
55
- const L = q((o == null ? void 0 : o.key) || (o == null ? void 0 : o.dataIndex), o.index), C = d.columnsMap[L];
56
- return C && C.show === !1 ? !1 : o.children ? {
57
- ...o,
58
- children: e(o.children)
59
- } : o;
60
- }).filter(Boolean), n = e(u);
61
- if (z)
62
- return n.sort(X(d.columnsMap));
63
- const l = n.sort(X(d.columnsMap)), h = me(l), c = l.map((r) => ({
64
- ...r,
65
- ...r.width ? {} : {
64
+ const r = (y == null ? void 0 : y.height) || 0, a = r ? n : 0;
65
+ return { y: m - r - a - l - o, hasScrollBar: e };
66
+ }, [
67
+ m,
68
+ y == null ? void 0 : y.height,
69
+ C == null ? void 0 : C.height,
70
+ W == null ? void 0 : W.height
71
+ ]), T = b(() => c != null && c.x ? { x: c.x, y: c.y || A } : c != null && c.y ? { x: 1e3, y: c.y } : { x: 1e3, y: A }, [c, A]), w = b(() => {
72
+ const e = (a) => a.map((i) => {
73
+ const v = Y((i == null ? void 0 : i.key) || (i == null ? void 0 : i.dataIndex), i.index), f = u.columnsMap[v];
74
+ return f && f.show === !1 ? !1 : i.children ? {
75
+ ...i,
76
+ children: e(i.children)
77
+ } : i;
78
+ }).filter(Boolean), o = e(g);
79
+ if (M)
80
+ return o.sort(Q(u.columnsMap));
81
+ const l = o.sort(Q(u.columnsMap)), n = we(l), r = l.map((a) => ({
82
+ ...a,
83
+ ...a.width ? {
84
+ width: a.useMaxWidth ? me() ?? a.width : a.width
85
+ } : {
66
86
  // 给未设置width的列设置平均数
67
- width: h
87
+ width: n
68
88
  }
69
89
  }));
70
- return [A.SELECTION_COLUMN, A.EXPAND_COLUMN, ...c];
90
+ return [E.SELECTION_COLUMN, E.EXPAND_COLUMN, ...r];
71
91
  }, [
72
- d.columnsMap,
73
- u,
74
- z,
75
- N.x,
76
- a.rowSelection,
77
- a.expandable,
78
- g == null ? void 0 : g.height
92
+ u.columnsMap,
93
+ g,
94
+ M,
95
+ T.x,
96
+ d.rowSelection,
97
+ d.expandable,
98
+ C == null ? void 0 : C.height
79
99
  ]);
80
- Be(() => {
81
- if (u && u.length > 0) {
82
- const e = u.map((n) => (
100
+ Me(() => {
101
+ if (g && g.length > 0) {
102
+ const e = g.map((o) => (
83
103
  // @ts-ignore
84
- q((n == null ? void 0 : n.key) ?? (n == null ? void 0 : n.dataIndex), n == null ? void 0 : n.dataIndex)
104
+ Y((o == null ? void 0 : o.key) ?? (o == null ? void 0 : o.dataIndex), o == null ? void 0 : o.dataIndex)
85
105
  ));
86
- d.setSortKeyColumns(e);
106
+ u.setSortKeyColumns(e);
87
107
  }
88
- }, [u]);
89
- const Ne = x(() => `${O ?? (d == null ? void 0 : d.tableSize) ?? "lg"}BitzTable`, [O, d.tableSize]), D = x(() => ({
90
- "--evenRow-BgColor": H
91
- // '--tableBody-bootomBorderColor': token.Table?.borderColor || '#f0f0f0',
92
- }), [
93
- H
94
- /** token.Table?.borderColor */
95
- ]), K = Me((e, n) => W ? n % 2 === 0 ? "oddRow" : "evenRow" : "", [W]);
96
- return s.jsxs("div", { className: "bitzTableBlock", children: [!z && s.jsxs("div", { ref: b, className: `bitzTableContainer ${Ne}`, style: { height: m }, children: [s.jsxs("div", { className: "bitzTableContainerBody", ref: S, children: [ae && s.jsxs("div", { className: "bitzTableToolbarBlock", children: [de || s.jsx("div", {}), ce, (a == null ? void 0 : a.rowSelection) && s.jsx(s.Fragment, { children: he })] }), s.jsx(A, { columns: j, dataSource: t, loading: !1, pagination: !1, scroll: N, ...a, style: D, rowClassName: K }), s.jsx(Oe, { columns: j, pageSize: pe, scroll: N, rowSelection: a.rowSelection, expandable: a.expandable, style: D, rowClassName: K, loading: w })] }), p && s.jsx(Ae, { elRefInstance: _, refInstance: k, enableControl: ee, pagination: ne, total: B, dataSource: t, resetPage: fe, paginationEmit: se })] }), z && s.jsxs(s.Fragment, { children: [(w || (t == null ? void 0 : t.length) > 0) && s.jsx(Le, { color: ie, height: le, loading: w, showNoMore: be, refreshEmit: I, loadEmit: Z, extra: s.jsxs("div", { className: "mobileTable", children: [t == null ? void 0 : t.map((e, n) => s.jsx("div", { className: "mobileTableRow", onClick: () => we(e, n), children: s.jsx("div", { className: "rowBox", children: j == null ? void 0 : j.map((l, h) => {
97
- var c;
98
- return s.jsx("div", { children: !(l != null && l.mobileHide) && s.jsxs("div", { className: "row", children: [!l.mobileHideLabel && s.jsxs("div", { className: "label", children: [`${l.title}`, ":"] }), s.jsx("div", { className: "value", children: ((c = l == null ? void 0 : l.render) == null ? void 0 : c.call(l, $e(e, (l == null ? void 0 : l.dataIndex) || ""), e, n)) || (e == null ? void 0 : e[l.dataIndex]) })] }) }, h);
99
- }) }) }, n)), w && Array.from({ length: J }).map((e, n) => s.jsx("div", { className: "mobileTableRow", children: s.jsx("div", { className: "rowBox", children: P ? P() : s.jsx(ke, { title: !1, paragraph: {
100
- rows: Q,
101
- width: Y
102
- }, active: !0 }) }) }, n)), s.jsx(Ee, { className: "tableMobileDrawer", open: ue, placement: "bottom", height: "auto", closable: !1, onClose: $, children: s.jsxs("div", { className: "drawerBox", children: [s.jsx("div", { className: "boxBody", children: ge.map((e, n) => s.jsx("div", { className: "operaList", onClick: () => je(e), ...e.danger && {
103
- style: { color: xe.colorError }
104
- }, children: e.label }, n)) }), s.jsx("div", { className: "boxLine" }), s.jsx("div", { className: "boxFooter", onClick: $, children: te })] }) })] }) }), !w && s.jsx(We, { data: t, title: oe, img: re })] })] });
108
+ }, [g]);
109
+ const R = b(() => `${O ?? (u == null ? void 0 : u.tableSize) ?? "lg"}BitzTable`, [O, u.tableSize]), Be = b(() => We(
110
+ "bitzTableContainer",
111
+ /* "hideBorder", */
112
+ { hasScrollBar: K },
113
+ R
114
+ ), [R, K]), je = b(() => {
115
+ var e, o, l, n, r;
116
+ return {
117
+ height: m,
118
+ "--toolbar-bgColor": (e = h.Table) == null ? void 0 : e.toolbarBgColor,
119
+ "--thead-bgColor": (o = h.Table) == null ? void 0 : o.theadBgColor,
120
+ "--thead-hoverBgColor": (l = h.Table) == null ? void 0 : l.theadHoverBgColor,
121
+ "--evenRow-BgColor": (n = h.Table) == null ? void 0 : n.evenRowBgColor,
122
+ "--expandIcon-borderColor": (r = h.Table) == null ? void 0 : r.expandIconBorderColor
123
+ // '--tableBody-bootomBorderColor': token.Table?.borderColor || '#f0f0f0',
124
+ };
125
+ }, [m]), q = ke((e, o) => D ? o % 2 === 0 ? "oddRow" : "evenRow" : "", [D]), G = t.jsx(He, {
126
+ finished: be,
127
+ // @ts-ignore
128
+ onLoad: oe,
129
+ loadingText: "加载中...",
130
+ finishedText: "没有更多了",
131
+ errorText: "加载失败",
132
+ children: t.jsxs("div", { className: "mobileList", style: { backgroundColor: (U = h.Table) == null ? void 0 : U.mobileListBgColor }, children: [s == null ? void 0 : s.map((e, o) => {
133
+ var l;
134
+ return t.jsx("div", { className: "listItem", style: { backgroundColor: (l = h.Table) == null ? void 0 : l.listItemBgColor }, onClick: () => Ce(e, o), children: w == null ? void 0 : w.map((n, r) => {
135
+ var a;
136
+ return !(n != null && n.mobileHide) && t.jsxs("div", { className: "row", style: { color: h.colorText }, children: [!n.mobileHideLabel && t.jsxs("div", { className: "label", children: [`${n.title}`, ":"] }), t.jsx("div", { className: "value", children: ((a = n == null ? void 0 : n.render) == null ? void 0 : a.call(n, _e(e, (n == null ? void 0 : n.dataIndex) || ""), e, o)) || (e == null ? void 0 : e[n.dataIndex]) })] }, r);
137
+ }) }, o);
138
+ }), j && Array.from({ length: Z }).map((e, o) => {
139
+ var l;
140
+ return t.jsx("div", { className: "listItem", style: { backgroundColor: (l = h.Table) == null ? void 0 : l.listItemBgColor }, children: t.jsx("div", { className: "row", children: S ? S() : t.jsx(Le, { title: !1, paragraph: {
141
+ rows: I,
142
+ width: ee
143
+ }, active: !0 }) }) }, o);
144
+ })] })
145
+ });
146
+ return t.jsxs("div", { className: "bitzTableBlock", children: [!M && t.jsxs("div", { ref: p, className: Be, style: je, children: [t.jsxs("div", { className: "bitzTableContainerBody", ref: N, children: [ie && t.jsxs("div", { className: "bitzTableToolbarBlock", children: [ce || t.jsx("div", {}), de, (d == null ? void 0 : d.rowSelection) && t.jsx(t.Fragment, { children: he })] }), t.jsx(E, {
147
+ columns: w,
148
+ dataSource: s,
149
+ loading: !1,
150
+ pagination: !1,
151
+ scroll: T,
152
+ ...d,
153
+ // style={style}
154
+ rowClassName: q
155
+ }), t.jsx(Oe, {
156
+ columns: w,
157
+ dataLength: s.length,
158
+ scroll: T,
159
+ rowSelection: d.rowSelection,
160
+ expandable: d.expandable,
161
+ // style={style}
162
+ rowClassName: q,
163
+ loading: j
164
+ })] }), B && t.jsx(Pe, { elRefInstance: _, enableControl: te, pagination: ne, total: k, dataSource: s, resetPage: ue, paginationEmit: le })] }), M && t.jsxs(t.Fragment, { children: [(j || (s == null ? void 0 : s.length) > 0) && t.jsx(t.Fragment, { children: F ? t.jsx(De, { onRefresh: F, children: G }) : G }), !j && t.jsx(Ee, { data: s, title: se, img: ae }), t.jsx(Ae, { className: "tableMobileDrawer", open: xe, placement: "bottom", height: "auto", closable: !1, onClose: V, children: t.jsxs("div", { className: "drawerBox", children: [t.jsx("div", { className: "boxBody", children: ge.map((e, o) => t.jsx("div", { className: "operaList", onClick: () => ye(e), ...e.danger && {
165
+ style: { color: h.colorError }
166
+ }, children: e.label }, o)) }), t.jsx("div", { className: "boxLine" }), t.jsx("div", { className: "boxFooter", onClick: V, children: re })] }) })] })] });
105
167
  }
106
- const Ie = (p) => (
168
+ const uo = (B) => (
107
169
  // @ts-ignore
108
- s.jsx(He, { initValue: p, children: s.jsx(Se, { ...p }) })
170
+ t.jsx(Se, { initValue: B, children: t.jsx($e, { ...B }) })
109
171
  );
110
172
  export {
111
- Ie as default
173
+ uo as default
112
174
  };
@@ -1,30 +1,32 @@
1
- import { j as s } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { theme as L, Skeleton as j, Table as d } from "antd";
3
- import T from "../../../node_modules/.store/antd@5.15.0/node_modules/antd/es/table/ExpandIcon.mjs";
4
- import { useContext as _, useMemo as c, useRef as R, useEffect as w } from "react";
1
+ import { j as i } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { theme as L, Skeleton as O, Table as l } from "antd";
3
+ import R from "../../../node_modules/.store/antd@5.15.0/node_modules/antd/es/table/ExpandIcon.mjs";
4
+ import { useContext as S, useMemo as f, useRef as T, useEffect as g } from "react";
5
5
  import "../../../node_modules/.store/antd@5.15.0/node_modules/antd/es/config-provider/index.mjs";
6
- import N from "../../../node_modules/.store/antd@5.15.0/node_modules/antd/locale/en_US.mjs";
7
- import { ConfigContext as O } from "../../../node_modules/.store/antd@5.15.0/node_modules/antd/es/config-provider/context.mjs";
8
- const q = ({ columns: n, pageSize: a, rowSelection: i, expandable: o, loading: l, ...m }) => {
9
- var u;
10
- const { token: x } = L.useToken(), { table: f, locale: y = N } = _(O), C = { ...y.Table }, b = ((u = f == null ? void 0 : f.expandable) == null ? void 0 : u.expandIcon) || (o == null ? void 0 : o.expandIcon) || T(C), k = c(() => {
11
- const t = a >= 20 ? 20 : a;
12
- return Array.from({ length: t }).map((e, r) => ({ index: r }));
13
- }, [a]), I = c(() => {
6
+ import h from "../../../node_modules/.store/antd@5.15.0/node_modules/antd/locale/en_US.mjs";
7
+ import { ConfigContext as w } from "../../../node_modules/.store/antd@5.15.0/node_modules/antd/es/config-provider/context.mjs";
8
+ const U = ({ columns: s, dataLength: c, rowSelection: a, expandable: r, loading: o, ...u }) => {
9
+ var m;
10
+ const { token: x } = L.useToken(), { table: p, locale: y = h } = S(w), C = { ...y.Table }, b = ((m = p == null ? void 0 : p.expandable) == null ? void 0 : m.expandIcon) || (r == null ? void 0 : r.expandIcon) || R(C), k = f(() => {
11
+ if (!o)
12
+ return [];
13
+ const t = c > 4 ? c >= 20 ? 20 : c : 4;
14
+ return Array.from({ length: t }).map((e, n) => ({ index: n }));
15
+ }, [o, c]), I = f(() => {
14
16
  var t;
15
- return (t = n == null ? void 0 : n.filter((e) => Object.keys(e).length !== 0)) == null ? void 0 : t.map((e) => e != null && e.fixed ? e : {
17
+ return (t = s == null ? void 0 : s.filter((e) => Object.keys(e).length !== 0)) == null ? void 0 : t.map((e) => e != null && e.isOperationCol ? e : {
16
18
  ...e,
17
19
  sorter: !1,
18
- render: (r, M, E) => s.jsx(j, { active: !0, title: !1, paragraph: {
20
+ render: (n, N, _) => i.jsx(O, { active: !0, title: !1, paragraph: {
19
21
  rows: 1,
20
- width: (E + 1) % 2 === 0 ? "100%" : "60%"
22
+ width: (_ + 1) % 2 === 0 ? "100%" : "60%"
21
23
  } })
22
24
  });
23
- }, [n]), g = c(() => {
24
- if (o)
25
+ }, [s]), E = f(() => {
26
+ if (r)
25
27
  return {
26
- ...o,
27
- expandedRowRender: () => s.jsx(s.Fragment, {}),
28
+ ...r,
29
+ expandedRowRender: () => i.jsx(i.Fragment, {}),
28
30
  expandIcon: (t) => {
29
31
  const e = b(t);
30
32
  return {
@@ -40,27 +42,29 @@ const q = ({ columns: n, pageSize: a, rowSelection: i, expandable: o, loading: l
40
42
  };
41
43
  }
42
44
  };
43
- }, [o]), h = c(() => {
44
- if (i)
45
+ }, [r]), j = f(() => {
46
+ if (a)
45
47
  return {
46
- ...i,
48
+ ...a,
47
49
  selectedRowKeys: [],
48
50
  getCheckboxProps: () => ({ disabled: !0 })
49
51
  };
50
- }, [i]), p = R();
51
- return w(() => {
52
- var e, r;
53
- const t = (r = (e = p.current) == null ? void 0 : e.nativeElement) == null ? void 0 : r.querySelector(".ant-table-body");
54
- t && (t.scrollTop = 0);
55
- }, [l]), s.jsx(d, { ...m, expandable: g, rowSelection: h, pagination: !1, columns: [d.SELECTION_COLUMN, d.EXPAND_COLUMN, ...I], rowKey: "index", dataSource: k, loading: !1, style: {
52
+ }, [a]), d = T();
53
+ return g(() => {
54
+ var e, n;
55
+ const t = (n = (e = d.current) == null ? void 0 : e.nativeElement) == null ? void 0 : n.querySelector(".ant-table-body");
56
+ t && (t.scrollLeft = 0);
57
+ }, [o]), i.jsx(l, { ...u, ref: d, expandable: E, rowSelection: j, pagination: !1, columns: [l.SELECTION_COLUMN, l.EXPAND_COLUMN, ...I], rowKey: "index", dataSource: k, loading: !1, style: {
58
+ ...u.style,
56
59
  position: "absolute",
57
60
  inset: 0,
58
61
  top: 40,
59
- zIndex: l ? 9999 : -1,
62
+ zIndex: o ? 100 : -1,
60
63
  /** 保险起见,使用了zIndex也要用opacity控制显隐 */
61
- opacity: l ? 1 : 0
62
- }, ref: p });
64
+ opacity: o ? 1 : 0,
65
+ background: o ? "#fff" : "transparent"
66
+ } });
63
67
  };
64
68
  export {
65
- q as default
69
+ U as default
66
70
  };
@@ -1,126 +1,115 @@
1
- import { j as e } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { create as X, useModal as Y, antdModalV5 as Z } from "@ebay/nice-modal-react";
3
- import { Modal as _, Checkbox as $ } from "antd";
4
- import t from "./index.module.less.mjs";
5
- import { useState as w, useContext as L, useEffect as ss, useCallback as B, useMemo as y } from "react";
6
- import { TableContext as es } from "../../Store/index.mjs";
7
- import { genColumnKey as g, columnSort as os } from "../../Store/utils/index.mjs";
8
- import F from "../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
9
- import { DndContext as ls, DragOverlay as ts, defaultDropAnimationSideEffects as ns } from "../../../../node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs";
10
- import { SortableContext as as, verticalListSortingStrategy as cs, arrayMove as is } from "../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
11
- import rs from "./DndItem.mjs";
12
- import { restrictToVerticalAxis as ms, restrictToWindowEdges as us } from "../../../../node_modules/.store/@dnd-kit_modifiers@6.0.1/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs";
13
- import T from "../../../BitzButton/index.mjs";
1
+ import { j as s } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { create as Q, useModal as U, antdModalV5 as X } from "@ebay/nice-modal-react";
3
+ import { Modal as Y, Checkbox as Z, Button as $ } from "antd";
4
+ import a from "./index.module.less.mjs";
5
+ import { useState as A, useContext as L, useEffect as ee, useCallback as I, useMemo as k } from "react";
6
+ import { TableContext as se } from "../../Store/index.mjs";
7
+ import { genColumnKey as _, columnSort as oe } from "../../Store/utils/index.mjs";
8
+ import d from "../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
9
+ import { DndContext as te } from "../../../../node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs";
10
+ import { SortableContext as le, verticalListSortingStrategy as ne, arrayMove as ae } from "../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
11
+ import ce from "./DndItem.mjs";
12
+ import { restrictToVerticalAxis as ie, restrictToWindowEdges as ue } from "../../../../node_modules/.store/@dnd-kit_modifiers@6.0.1/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs";
13
+ import F from "../../../BitzButton/index.mjs";
14
14
  import "./index.less.mjs";
15
- import { useImmer as ds } from "../../../../node_modules/.store/use-immer@0.9.0/node_modules/use-immer/dist/use-immer.module.mjs";
16
- import ps from "../../../../assets/iconfont/IconTuodong.mjs";
17
- import O from "../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
18
- import xs from "../../../../node_modules/.store/@ant-design_icons@5.3.1/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
19
- import hs from "../../../../node_modules/.store/@ant-design_icons@5.3.1/node_modules/@ant-design/icons/es/icons/RedoOutlined.mjs";
20
- const fs = {
21
- sideEffects: ns({
22
- styles: {
23
- active: {
24
- opacity: "0.5"
25
- }
26
- }
27
- })
28
- }, Os = X(() => {
29
- var S;
30
- const x = Y(), [d, j] = w(null), [z, v] = w(!1), [c, h] = ds({
15
+ import { useImmer as me } from "../../../../node_modules/.store/use-immer@0.9.0/node_modules/use-immer/dist/use-immer.module.mjs";
16
+ import H from "../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
17
+ import re from "../../../../node_modules/.store/@ant-design_icons@5.3.1/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
18
+ import de from "../../../../node_modules/.store/@ant-design_icons@5.3.1/node_modules/@ant-design/icons/es/icons/RedoOutlined.mjs";
19
+ const Be = Q(() => {
20
+ var D;
21
+ const h = U(), [C, b] = A(null), [T, S] = A(!1), [c, x] = me({
31
22
  columnsMap: {},
32
23
  sortKeyColumns: []
33
24
  }), {
34
25
  persistenceType: R,
35
- persistenceKey: k,
36
- onlineChange: C,
37
- columnsMap: V,
38
- setColumnsMap: W,
39
- sortKeyColumns: q,
40
- setSortKeyColumns: G,
26
+ persistenceKey: v,
27
+ onlineChange: f,
28
+ columnsMap: z,
29
+ setColumnsMap: O,
30
+ sortKeyColumns: V,
31
+ setSortKeyColumns: W,
41
32
  // clearPersistenceStorage,
42
33
  ...l
43
- } = L(es);
44
- ss(() => {
45
- h((s) => {
46
- s.columnsMap = { ...V }, s.sortKeyColumns = [...q];
34
+ } = L(se);
35
+ ee(() => {
36
+ x((e) => {
37
+ e.columnsMap = { ...z }, e.sortKeyColumns = [...V];
47
38
  });
48
39
  }, []);
49
- const H = B(() => {
50
- h((s) => {
51
- s.columnsMap = { ...l.defaultColumnKeyMap };
40
+ const q = I(() => {
41
+ x((e) => {
42
+ e.columnsMap = { ...l.defaultColumnKeyMap };
52
43
  });
53
- }, []), p = y(() => {
44
+ }, []), p = k(() => {
54
45
  var o, n;
55
- const s = [];
56
- return (o = l == null ? void 0 : l.columns) != null && o.length && ((n = l == null ? void 0 : l.columns) == null || n.map(({ key: u, dataIndex: a, ...r }) => {
57
- const f = g(u || a, [u || a].filter(Boolean).join("-")), m = c.columnsMap[f || "null"];
58
- return (m == null ? void 0 : m.show) !== !1 && s.push({
59
- key: f,
60
- ...O(r, ["className"]),
46
+ const e = [];
47
+ return (o = l == null ? void 0 : l.columns) != null && o.length && ((n = l == null ? void 0 : l.columns) == null || n.map(({ key: r, dataIndex: t, ...u }) => {
48
+ const y = _(r || t, [r || t].filter(Boolean).join("-")), m = c.columnsMap[y || "null"];
49
+ return (m == null ? void 0 : m.show) !== !1 && e.push({
50
+ key: y,
51
+ ...H(u, ["className"]),
61
52
  selectable: !1,
62
53
  disabled: (m == null ? void 0 : m.disable) === !0
63
54
  }), m;
64
- })), s.sort(os(c.columnsMap));
65
- }, [c.columnsMap, l == null ? void 0 : l.columns]), M = B((s) => {
55
+ })), e.sort(oe(c.columnsMap));
56
+ }, [c.columnsMap, l == null ? void 0 : l.columns]), j = I((e) => {
66
57
  var o;
67
- return (o = c.sortKeyColumns) == null ? void 0 : o.findIndex((n) => n === s);
68
- }, [c.sortKeyColumns]), N = y(() => d ? M(d) : -1, [d, M]), E = y(() => {
69
- const s = [], o = /* @__PURE__ */ new Map();
70
- return { list: ((u, a) => u.map(({ key: r, dataIndex: f, children: m, ...K }) => {
71
- var I;
72
- const b = g(r || f, [a == null ? void 0 : a.columnKey, K.index].filter(Boolean).join("-")), i = c.columnsMap[b || "null"] || { show: !0 };
73
- (i == null ? void 0 : i.show) !== !1 && !m && s.push(b);
74
- const A = {
75
- key: b,
76
- ...O(K, ["className"]),
58
+ return (o = c.sortKeyColumns) == null ? void 0 : o.findIndex((n) => n === e);
59
+ }, [c.sortKeyColumns]), E = k(() => C ? j(C) : -1, [C, j]), N = k(() => {
60
+ const e = [], o = /* @__PURE__ */ new Map();
61
+ return { list: ((r, t) => r.map(({ key: u, dataIndex: y, children: m, ...K }) => {
62
+ var B;
63
+ const M = _(u || y, [t == null ? void 0 : t.columnKey, K.index].filter(Boolean).join("-")), i = c.columnsMap[M || "null"] || { show: !0 };
64
+ (i == null ? void 0 : i.show) !== !1 && !m && e.push(M);
65
+ const w = {
66
+ key: M,
67
+ ...H(K, ["className"]),
77
68
  selectable: !1,
78
69
  disabled: i.disable === !0,
79
- disableCheckbox: typeof i.disable == "boolean" ? i == null ? void 0 : i.disable : (I = i == null ? void 0 : i.disable) == null ? void 0 : I.checkbox,
80
- isLeaf: a ? !0 : void 0
70
+ disableCheckbox: typeof i.disable == "boolean" ? i == null ? void 0 : i.disable : (B = i == null ? void 0 : i.disable) == null ? void 0 : B.checkbox,
71
+ isLeaf: t ? !0 : void 0
81
72
  };
82
- return o.set(r, A), A;
83
- }))(l == null ? void 0 : l.columns), keys: s, map: o };
84
- }, [c.columnsMap, l == null ? void 0 : l.columns]), J = (s, o) => {
73
+ return o.set(u, w), w;
74
+ }))(l == null ? void 0 : l.columns), keys: e, map: o };
75
+ }, [c.columnsMap, l == null ? void 0 : l.columns]), G = (e, o) => {
85
76
  const n = { ...c.columnsMap };
86
- ((a) => {
87
- const r = { ...n[a] };
88
- r.show = !s, n[a] = r;
89
- })(o.key), v(!0), h((a) => {
90
- a.columnsMap = { ...n };
77
+ ((t) => {
78
+ const u = { ...n[t] };
79
+ u.show = !e, n[t] = u;
80
+ })(o.key), S(!0), x((t) => {
81
+ t.columnsMap = { ...n };
91
82
  });
92
- }, P = (s, o) => {
93
- const n = { ...c.columnsMap }, u = is(c.sortKeyColumns, s, o);
94
- u.forEach((a, r) => {
95
- n[a] = { ...n[a] || {}, order: r };
96
- }), v(!0), h((a) => {
97
- a.columnsMap = { ...n }, a.sortKeyColumns = u;
83
+ }, J = (e, o) => {
84
+ const n = { ...c.columnsMap }, r = ae(c.sortKeyColumns, e, o);
85
+ r.forEach((t, u) => {
86
+ n[t] = { ...n[t] || {}, order: u };
87
+ }), S(!0), x((t) => {
88
+ t.columnsMap = { ...n }, t.sortKeyColumns = r;
98
89
  });
99
- }, Q = y(() => {
100
- var s, o;
101
- return d ? ((o = (s = l == null ? void 0 : l.columns) == null ? void 0 : s.find((n) => n.key === d)) == null ? void 0 : o.title) ?? "" : "";
102
- }, [l == null ? void 0 : l.columns, d]), U = () => {
103
- W(c.columnsMap), G(c.sortKeyColumns), R === "online" && k && (C == null || C(k, c.columnsMap)), x.resolve({ ...c.columnsMap }), x.hide();
104
- }, D = () => {
105
- x.hide();
90
+ }, P = () => {
91
+ O(c.columnsMap), W(c.sortKeyColumns), R === "online" && v && (f == null || f(v, c.columnsMap)), h.resolve({ ...c.columnsMap }), h.hide();
92
+ }, g = () => {
93
+ h.hide();
106
94
  };
107
- return e.jsxs(_, { className: "tableColumnSettingModal", title: "自定义列", ...Z(x), width: 600, onCancel: D, footer: e.jsxs(e.Fragment, { children: [e.jsx(T, { type: "primary", icon: e.jsx(xs, {}), onClick: U, disabled: !z, children: "保存" }), e.jsx(T, { onClick: D, children: "取消" })] }), children: [e.jsx("div", { className: t.introduce, children: "选择要在表中显示的可用列。拖动选定的列以对其重新排序。" }), e.jsxs("div", { className: t.container, children: [e.jsxs("div", { className: t.block, children: [e.jsxs("div", { className: t.header, children: [e.jsx("div", { className: t.title, children: "可用列" }), e.jsx("div", {})] }), e.jsx("div", { className: t.body, children: e.jsx("ul", { className: t.content, children: (S = E.list) == null ? void 0 : S.map((s) => {
108
- const o = E.keys.includes(s.key);
109
- return e.jsxs("li", { className: F(t.item, {
110
- [t.checked]: !o
111
- }), onClick: () => !s.disabled && J(o, s), children: [e.jsx($, { checked: o, disabled: s.disabled }), e.jsx("span", { className: t["content-item-text"], children: s.title })] }, s.key);
112
- }) }) })] }), e.jsxs("div", { className: t.block, children: [e.jsxs("div", { className: t.header, children: [e.jsx("div", { className: t.title, children: "选定列" }), e.jsxs("div", { className: t.reset, onClick: H, children: [e.jsx("div", { children: "重置  " }), e.jsx(hs, {})] })] }), e.jsx("div", { className: t.body, children: e.jsxs(ls, { modifiers: [ms, us], onDragStart: (s) => {
113
- const { active: o } = s;
114
- o && j(o == null ? void 0 : o.id);
115
- }, onDragCancel: () => j(null), onDragEnd: (s) => {
116
- j(null);
117
- const { over: o } = s;
95
+ return s.jsxs(Y, { className: "tableColumnSettingModal", title: "自定义列", ...X(h), styles: { body: { maxHeight: window.innerHeight - 300 } }, width: 600, onCancel: g, footer: s.jsxs(s.Fragment, { children: [s.jsx(F, { type: "primary", icon: s.jsx(re, {}), onClick: P, disabled: !T, children: "保存" }), s.jsx(F, { onClick: g, children: "取消" })] }), children: [s.jsx("div", { className: d(a.introduce, "tableColumnSetting_introduce"), children: "选择要在表中显示的可用列。拖动选定的列以对其重新排序。" }), s.jsxs("div", { className: d(a.container, "tableColumnSetting_container"), style: { maxHeight: window.innerHeight - 390, overflow: "auto" }, children: [s.jsxs("div", { className: a.block, children: [s.jsxs("div", { className: d(a.header, "tableColumnSetting_header"), children: [s.jsx("div", { className: d(a.title, "tableColumnSetting_title"), children: "可用列" }), s.jsx("div", {})] }), s.jsx("div", { className: d(a.body, "tableColumnSetting_body"), children: s.jsx("ul", { className: a.content, children: (D = N.list) == null ? void 0 : D.map((e) => {
96
+ const o = N.keys.includes(e.key);
97
+ return s.jsxs("li", { className: d(a.item, {
98
+ [a.checked]: !o,
99
+ tableColumnSetting_checked: !o
100
+ }), onClick: () => !e.disabled && G(o, e), children: [s.jsx(Z, { checked: o, disabled: e.disabled }), s.jsx("span", { className: d(a["content-item-text"], "tableColumnSetting_content-item-text"), children: e.title })] }, e.key);
101
+ }) }) })] }), s.jsxs("div", { className: a.block, children: [s.jsxs("div", { className: a.header, children: [s.jsx("div", { className: a.title, children: "选定列" }), s.jsx($, { type: "link", icon: s.jsx(de, {}), size: "small", onClick: q, children: "重置" })] }), s.jsx("div", { className: d(a.body, "tableColumnSetting_body-order"), children: s.jsx(te, { modifiers: [ie, ue], onDragStart: (e) => {
102
+ const { active: o } = e;
103
+ o && b(o == null ? void 0 : o.id);
104
+ }, onDragCancel: () => b(null), onDragEnd: (e) => {
105
+ b(null);
106
+ const { over: o } = e;
118
107
  if (o) {
119
- const n = M(o.id);
120
- N !== n && P(N, n);
108
+ const n = j(o.id);
109
+ E !== n && J(E, n);
121
110
  }
122
- }, children: [e.jsx(as, { items: p == null ? void 0 : p.map((s) => s.key), strategy: cs, children: e.jsx("ul", { className: t.content, style: { background: "#fff" }, children: p == null ? void 0 : p.map((s) => e.jsx(rs, { item: s }, s.key)) }) }), e.jsx(ts, { adjustScale: !1, dropAnimation: fs, children: d ? e.jsxs("li", { className: F(t.moveItem), children: [e.jsx(ps, { size: 14, className: t.dragIcon }), e.jsx("span", { className: t["moveItem-text"], children: Q })] }) : null })] }) })] })] })] });
111
+ }, children: s.jsx(le, { items: p == null ? void 0 : p.map((e) => e.key), strategy: ne, children: s.jsx("ul", { className: a.content, children: p == null ? void 0 : p.map((e) => s.jsx(ce, { item: e }, e.key)) }) }) }) })] })] })] });
123
112
  });
124
113
  export {
125
- Os as default
114
+ Be as default
126
115
  };