bitz-react-admin-ui 2.1.9 → 2.2.1

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 (63) hide show
  1. package/dist/components/BitzPagination/index.d.ts +4 -0
  2. package/dist/components/BitzPagination/index.mjs +22 -21
  3. package/dist/components/BitzTable/ActionBar/ActionBar.mjs +26 -22
  4. package/dist/components/BitzTable/ActionCol/index.d.ts +1 -1
  5. package/dist/components/BitzTable/ActionCol/index.mjs +61 -61
  6. package/dist/components/BitzTable/SelectionBar/Button.d.ts +2 -3
  7. package/dist/components/BitzTable/SelectionBar/Button.mjs +19 -25
  8. package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +19 -38
  9. package/dist/components/BitzTable/Store/index.d.ts +43 -22
  10. package/dist/components/BitzTable/Store/index.mjs +128 -125
  11. package/dist/components/BitzTable/Store/utils/index.d.ts +4 -5
  12. package/dist/components/BitzTable/Store/utils/index.mjs +31 -31
  13. package/dist/components/BitzTable/SubTable/index.mjs +90 -106
  14. package/dist/components/BitzTable/Table/SortTableContext.d.ts +12 -0
  15. package/dist/components/BitzTable/Table/SortTableContext.mjs +25 -0
  16. package/dist/components/BitzTable/Table/SortableRow.d.ts +7 -0
  17. package/dist/components/BitzTable/Table/SortableRow.mjs +54 -0
  18. package/dist/components/BitzTable/Table/index.d.ts +14 -1
  19. package/dist/components/BitzTable/Table/index.mjs +319 -273
  20. package/dist/components/BitzTable/Table/style.d.ts +2 -1
  21. package/dist/components/BitzTable/Table/style.mjs +17 -15
  22. package/dist/components/BitzTable/Table/utils.mjs +17 -16
  23. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.d.ts +1 -0
  24. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +84 -97
  25. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.d.ts +5 -4
  26. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +66 -60
  27. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +78 -72
  28. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.d.ts +1 -3
  29. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +190 -189
  30. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.d.ts +8 -0
  31. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +94 -0
  32. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.d.ts +10 -0
  33. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +58 -0
  34. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.d.ts +13 -7
  35. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +119 -80
  36. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.d.ts +2 -2
  37. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +26 -29
  38. package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.d.ts +3 -1
  39. package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.mjs +53 -77
  40. package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.d.ts +2 -2
  41. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.d.ts +12 -0
  42. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +61 -0
  43. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +50 -59
  44. package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +22 -23
  45. package/dist/components/BitzTable/ToolBar/Modal/index.d.ts +18 -0
  46. package/dist/components/BitzTable/ToolBar/Modal/index.mjs +50 -0
  47. package/dist/components/BitzTable/ToolBar/Modal/style.d.ts +2 -0
  48. package/dist/components/BitzTable/ToolBar/Modal/style.mjs +58 -0
  49. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +21 -21
  50. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +20 -22
  51. package/dist/components/BitzTable/ToolBar/index.d.ts +12 -11
  52. package/dist/components/BitzTable/ToolBar/style.mjs +41 -46
  53. package/dist/components/BitzTable/index.d.ts +4 -2
  54. package/dist/node_modules/.store/@ant-design_icons-svg@4.4.2/node_modules/@ant-design/icons-svg/es/asn/MenuOutlined.mjs +5 -0
  55. package/dist/node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/MenuOutlined.mjs +15 -0
  56. package/dist/node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +1098 -753
  57. package/dist/style.css +1 -1
  58. package/dist/utils/findNode.d.ts +2 -2
  59. package/package.json +1 -1
  60. package/dist/components/BitzTable/Select/index.mjs +0 -11
  61. package/dist/components/BitzTable/Select/style.mjs +0 -66
  62. package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.mjs +0 -78
  63. package/dist/components/BitzTable/ToolBar/ExportIcon/styles.mjs +0 -47
@@ -1,262 +1,263 @@
1
- import { j as i } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { css as he } from "../../../../../node_modules/.store/@emotion_css@11.11.2/node_modules/@emotion/css/dist/emotion-css.esm.mjs";
3
- import { theme as de, Flex as z, Typography as B, Space as ue, Checkbox as me, Button as fe } from "antd";
4
- import { forwardRef as pe, useMemo as L, useContext as xe, useEffect as F, useState as m, useCallback as ge, useImperativeHandle as Ce, memo as ye } from "react";
5
- import { useImmer as Me } from "../../../../../node_modules/.store/use-immer@0.9.0/node_modules/use-immer/dist/use-immer.module.mjs";
1
+ import { j as c } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { css as me } from "../../../../../node_modules/.store/@emotion_css@11.11.2/node_modules/@emotion/css/dist/emotion-css.esm.mjs";
3
+ import { theme as pe, Flex as B, Typography as q, Space as xe, Checkbox as ge, Button as Ce } from "antd";
4
+ import { forwardRef as ye, useRef as ke, useMemo as k, useContext as Me, useEffect as G, useState as m, useImperativeHandle as Se, memo as we } from "react";
5
+ import { useImmer as Le } from "../../../../../node_modules/.store/use-immer@0.9.0/node_modules/use-immer/dist/use-immer.module.mjs";
6
+ import je from "../../../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
6
7
  import "../../../index.mjs";
7
- import { columnSort as ke, genColumnKey as Le, updateNestedObject as K } from "../../../Store/utils/index.mjs";
8
- import O from "./DndList.mjs";
9
- import { BitzTableContext as Ke } from "../../../Store/index.mjs";
10
- import Se from "../../../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/RedoOutlined.mjs";
11
- import je from "../../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
12
- const we = pe(
13
- ({ display: $ }, V) => {
14
- const { token: W } = de.useToken(), X = L(() => ({
15
- width: "100%",
16
- ...{ display: $ ? "flex" : "none" }
17
- }), [$]), { defaultColumnKeyMap: Y, columns: H, columnsMap: Z, sortKeyColumns: _ } = xe(Ke), [a, P] = Me({
18
- columnsMap: {},
19
- sortKeyColumns: []
20
- });
21
- F(() => {
22
- P((e) => {
23
- e.columnsMap = { ...Z }, e.sortKeyColumns = [..._];
24
- });
8
+ import { columnSort as Ke, genColumnKey as be, updateNestedObject as j } from "../../../Store/utils/index.mjs";
9
+ import J from "./DndList.mjs";
10
+ import { BitzTableContext as Ne } from "../../../Store/index.mjs";
11
+ import ve from "../../../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/RedoOutlined.mjs";
12
+ import Ee from "../../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
13
+ const Re = ye(
14
+ ({ display: K, parentHeight: F }, H) => {
15
+ const { token: ee } = pe.useToken(), Q = ke(null), f = je(Q), te = k(() => ({
16
+ // display: display ? 'flex' : 'none'
17
+ width: K ? "100%" : 0,
18
+ height: "100%",
19
+ pointerEvents: K ? "auto" : "none",
20
+ opacity: K ? 1 : 0,
21
+ overflow: "hidden",
22
+ ...K ? {} : {
23
+ position: "absolute",
24
+ left: 0,
25
+ right: 0
26
+ }
27
+ }), [K]), O = {
28
+ height: k(() => typeof F == "number" && (f != null && f.height) ? F - (f == null ? void 0 : f.height) - 16 : "auto", [F, f == null ? void 0 : f.height]),
29
+ overflow: "hidden auto",
30
+ gap: 6
31
+ }, { defaultColumnKeyMap: se, columns: U, columnsMap: oe } = Me(Ne), [i, V] = Le({});
32
+ G(() => {
33
+ V({ ...oe });
25
34
  }, []);
26
- const q = L(() => ((s, t) => s.map(({ key: n, dataIndex: o, children: c, ...l }) => {
27
- var U;
28
- const g = Le(
29
- n || o,
30
- [t == null ? void 0 : t.columnKey, l.index].join("-")
31
- ), r = a.columnsMap[g || "null"] || { show: !0 };
35
+ const W = k(() => ((o, t) => o.map((s) => {
36
+ var _;
37
+ const { key: n, dataIndex: r, children: l, ...C } = s, y = be(s, [t == null ? void 0 : t.columnKey, C.index].join("-")), u = i[y || "null"] || { show: !0 };
32
38
  return {
33
- key: g,
34
- ...je(l, ["className"]),
39
+ key: y,
40
+ ...Ee(C, ["className"]),
35
41
  selectable: !1,
36
- disabled: r.disabled === !0,
37
- disableCheckbox: typeof r.disabled == "boolean" ? r == null ? void 0 : r.disabled : (U = r == null ? void 0 : r.disabled) == null ? void 0 : U.checkbox,
42
+ disabled: u.disabled === !0,
43
+ disableCheckbox: typeof u.disabled == "boolean" ? u == null ? void 0 : u.disabled : (_ = u == null ? void 0 : u.disabled) == null ? void 0 : _.checkbox,
38
44
  isLeaf: t ? !0 : void 0,
39
- ...r
45
+ ...u
40
46
  };
41
- }))(H ?? []).sort(ke(a.columnsMap)), [a.columnsMap, H]);
42
- F(() => {
43
- var n, o;
44
- const e = {}, s = {}, t = {};
45
- for (const c in a.columnsMap)
46
- ((n = a.columnsMap[c]) == null ? void 0 : n.fixed) === "left" ? e[c] = a.columnsMap[c] : ((o = a.columnsMap[c]) == null ? void 0 : o.fixed) === "right" ? s[c] = a.columnsMap[c] : t[c] = a.columnsMap[c];
47
- f(e), p(s), x(t);
48
- }, [a.columnsMap]);
49
- const [S, N] = m([]), [C, j] = m([]), [h, f] = m({}), [w, E] = m([]), [y, b] = m([]), [d, p] = m({}), [R, T] = m([]), [M, v] = m([]), [u, x] = m({});
50
- F(() => {
51
- const e = [], s = [], t = [], n = [], o = [], c = [];
52
- q.forEach((l) => {
53
- l.fixed === "left" ? (e.push(l), s.push(l.key)) : l.fixed === "right" ? (t.push(l), n.push(l.key)) : (o.push(l), c.push(l.key));
54
- }), N(e), j(s), E(t), b(n), T(o), v(c);
55
- }, [q]);
56
- const ee = (e) => {
57
- f(e);
58
- }, te = (e, s) => {
59
- f(e), j(s);
60
- }, se = (e) => {
47
+ }).filter((s) => !(s != null && s.isDragSortCol)))(U ?? []).sort(Ke(i)), [i, U]);
48
+ G(() => {
49
+ var s, n;
50
+ const e = {}, o = {}, t = {};
51
+ for (const r in i)
52
+ ((s = i[r]) == null ? void 0 : s.fixed) === "left" ? e[r] = i[r] : ((n = i[r]) == null ? void 0 : n.fixed) === "right" ? o[r] = i[r] : t[r] = i[r];
53
+ p(e), x(o), g(t);
54
+ }, [i]);
55
+ const [b, I] = m([]), [M, N] = m([]), [h, p] = m({}), [v, z] = m([]), [S, E] = m([]), [a, x] = m({}), [R, D] = m([]), [w, T] = m([]), [d, g] = m({});
56
+ G(() => {
57
+ const e = [], o = [], t = [], s = [], n = [], r = [];
58
+ W.forEach((l) => {
59
+ l.fixed === "left" ? (e.push(l), o.push(l.key)) : l.fixed === "right" ? (t.push(l), s.push(l.key)) : (n.push(l), r.push(l.key));
60
+ }), I(e), N(o), z(t), E(s), D(n), T(r);
61
+ }, [W]);
62
+ const ne = (e) => {
61
63
  p(e);
62
- }, oe = (e, s) => {
63
- p(e), b(s);
64
- }, ne = (e) => {
64
+ }, re = (e, o) => {
65
+ p(e), N(o);
66
+ }, ce = (e) => {
65
67
  x(e);
66
- }, ce = (e, s) => {
67
- x(e), v(s);
68
- }, G = (e, s, t, n) => {
69
- const o = { ...s[e] };
70
- delete s[e], x({
71
- ...u,
72
- [e]: { ...o, fixed: void 0, order: R.length }
68
+ }, le = (e, o) => {
69
+ x(e), E(o);
70
+ }, ie = (e) => {
71
+ g(e);
72
+ }, he = (e, o) => {
73
+ g(e), T(o);
74
+ }, X = (e, o, t, s) => {
75
+ const n = { ...o[e] };
76
+ delete o[e], g({
77
+ ...d,
78
+ [e]: { ...n, fixed: void 0, order: R.length }
73
79
  });
74
- const c = t.findIndex((r) => r.key === e), l = t.splice(c, 1)[0];
75
- T([...R, { ...l, fixed: void 0 }]);
76
- const g = n.splice(c, 1);
77
- return v([...M, ...g]), { map: s, list: t, keys: n };
78
- }, J = (e, s, t, n) => {
79
- const o = { ...s[e] };
80
- delete s[e], f({
80
+ const r = t.findIndex((y) => y.key === e), l = t.splice(r, 1)[0];
81
+ D([...R, { ...l, fixed: void 0 }]);
82
+ const C = s.splice(r, 1);
83
+ return T([...w, ...C]), { map: o, list: t, keys: s };
84
+ }, Y = (e, o, t, s) => {
85
+ const n = { ...o[e] };
86
+ delete o[e], p({
81
87
  ...h,
82
- [e]: { ...o, fixed: "left", order: S.length, show: !0 }
88
+ [e]: { ...n, fixed: "left", order: b.length, show: !0 }
83
89
  });
84
- const c = t.findIndex((r) => r.key === e), l = t.splice(c, 1)[0];
85
- N([...S, { ...l, fixed: "left" }]);
86
- const g = n.splice(c, 1);
87
- return j([...C, ...g]), { map: s, list: t, keys: n };
88
- }, Q = (e, s, t, n) => {
89
- const o = { ...s[e] };
90
- delete s[e], p({
91
- ...d,
90
+ const r = t.findIndex((y) => y.key === e), l = t.splice(r, 1)[0];
91
+ I([...b, { ...l, fixed: "left" }]);
92
+ const C = s.splice(r, 1);
93
+ return N([...M, ...C]), { map: o, list: t, keys: s };
94
+ }, Z = (e, o, t, s) => {
95
+ const n = { ...o[e] };
96
+ delete o[e], x({
97
+ ...a,
92
98
  [e]: {
93
- ...o,
99
+ ...n,
94
100
  fixed: "right",
95
- order: w.length,
101
+ order: v.length,
96
102
  show: !0
97
103
  }
98
104
  });
99
- const c = t.findIndex((r) => r.key === e), l = t.splice(c, 1)[0];
100
- E([...w, { ...l, fixed: "right" }]);
101
- const g = n.splice(c, 1);
102
- return b([...y, ...g]), { map: s, list: t, keys: n };
103
- }, D = (e, s) => {
104
- if (s === "left") {
105
- const { map: t, list: n, keys: o } = G(
105
+ const r = t.findIndex((y) => y.key === e), l = t.splice(r, 1)[0];
106
+ z([...v, { ...l, fixed: "right" }]);
107
+ const C = s.splice(r, 1);
108
+ return E([...S, ...C]), { map: o, list: t, keys: s };
109
+ }, $ = (e, o) => {
110
+ if (o === "left") {
111
+ const { map: t, list: s, keys: n } = X(
106
112
  e,
107
113
  h,
108
- S,
109
- C
114
+ b,
115
+ M
110
116
  );
111
- f({ ...t }), N([...n]), j([...o]);
112
- } else if (s === "center") {
113
- const { map: t, list: n, keys: o } = J(
117
+ p({ ...t }), I([...s]), N([...n]);
118
+ } else if (o === "center") {
119
+ const { map: t, list: s, keys: n } = Y(
114
120
  e,
115
- u,
121
+ d,
116
122
  R,
117
- M
123
+ w
118
124
  );
119
- x({ ...t }), T([...n]), v([...o]);
125
+ g({ ...t }), D([...s]), T([...n]);
120
126
  } else {
121
- const { map: t, list: n, keys: o } = J(
127
+ const { map: t, list: s, keys: n } = Y(
122
128
  e,
123
- d,
124
- w,
125
- y
129
+ a,
130
+ v,
131
+ S
126
132
  );
127
- p({ ...t }), E([...n]), b([...o]);
133
+ x({ ...t }), z([...s]), E([...n]);
128
134
  }
129
- }, A = (e, s) => {
130
- if (s === "left") {
131
- const { map: t, list: n, keys: o } = Q(
135
+ }, P = (e, o) => {
136
+ if (o === "left") {
137
+ const { map: t, list: s, keys: n } = Z(
132
138
  e,
133
139
  h,
134
- S,
135
- C
140
+ b,
141
+ M
136
142
  );
137
- f({ ...t }), N([...n]), j([...o]);
138
- } else if (s === "center") {
139
- const { map: t, list: n, keys: o } = Q(
143
+ p({ ...t }), I([...s]), N([...n]);
144
+ } else if (o === "center") {
145
+ const { map: t, list: s, keys: n } = Z(
140
146
  e,
141
- u,
147
+ d,
142
148
  R,
143
- M
149
+ w
144
150
  );
145
- x({ ...t }), T([...n]), v([...o]);
151
+ g({ ...t }), D([...s]), T([...n]);
146
152
  } else {
147
- const { map: t, list: n, keys: o } = G(
153
+ const { map: t, list: s, keys: n } = X(
148
154
  e,
149
- d,
150
- w,
151
- y
155
+ a,
156
+ v,
157
+ S
152
158
  );
153
- p({ ...t }), E([...n]), b([...o]);
159
+ x({ ...t }), z([...s]), E([...n]);
154
160
  }
155
- }, le = ({ target: e }) => {
156
- e.checked ? (f(K(h, "show", !0)), x(K(u, "show", !0)), p(K(d, "show", !0))) : (f(K(h, "show", !1)), x(K(u, "show", !1)), p(K(d, "show", !1)));
157
- }, I = L(() => [...C, ...M, ...y], [C, M, y]), k = L(() => {
158
- var s, t, n;
161
+ }, ae = ({ target: e }) => {
162
+ e.checked ? (p(j(h, "show", !0)), g(j(d, "show", !0)), x(j(a, "show", !0))) : (p(j(h, "show", !1)), g(j(d, "show", !1)), x(j(a, "show", !1)));
163
+ }, A = k(() => [...M, ...w, ...S], [M, w, S]), L = k(() => {
164
+ var o, t, s;
159
165
  const e = [];
160
- for (const o in h)
161
- (s = h[o]) != null && s.show && e.push(o);
162
- for (const o in u)
163
- (t = u[o]) != null && t.show && e.push(o);
164
- for (const o in d)
165
- (n = d[o]) != null && n.show && e.push(o);
166
+ for (const n in h)
167
+ (o = h[n]) != null && o.show && e.push(n);
168
+ for (const n in d)
169
+ (t = d[n]) != null && t.show && e.push(n);
170
+ for (const n in a)
171
+ (s = a[n]) != null && s.show && e.push(n);
166
172
  return e;
167
- }, [h, u, d]), re = L(() => I.length === k.length, [I, k]), ie = L(() => k.length > 0 && k.length < I.length, [k, I]), ae = ge(() => {
168
- P((e) => {
169
- e.columnsMap = { ...Y };
170
- });
171
- }, []);
172
- return Ce(V, () => ({
173
+ }, [h, d, a]), de = k(() => A.length === L.length, [A, L]), fe = k(() => L.length > 0 && L.length < A.length, [L, A]), ue = () => {
174
+ V({ ...se });
175
+ };
176
+ return Se(H, () => ({
173
177
  getLeftSortColumns: () => h,
174
- getLeftSortKeys: () => C,
175
- getCenterSortColumns: () => u,
176
- getCenterSortKeys: () => M,
177
- getRightSortColumns: () => d,
178
- getRightSortKeys: () => y,
179
- getCheckedKeys: () => k
180
- })), /* @__PURE__ */ i.jsxs(z, { vertical: !0, gap: 16, style: X, children: [
181
- /* @__PURE__ */ i.jsxs("div", { className: "sortContent", children: [
182
- /* @__PURE__ */ i.jsxs(z, { vertical: !0, className: "sortCard", gap: 6, children: [
183
- /* @__PURE__ */ i.jsx(B.Title, { level: 5, className: "title", children: "固定在左侧" }),
184
- /* @__PURE__ */ i.jsx(
185
- O,
178
+ getCenterSortColumns: () => d,
179
+ getRightSortColumns: () => a,
180
+ getCheckedKeys: () => L
181
+ })), /* @__PURE__ */ c.jsxs(B, { vertical: !0, gap: 16, style: te, children: [
182
+ /* @__PURE__ */ c.jsxs("div", { className: "sortContent", children: [
183
+ /* @__PURE__ */ c.jsxs(B, { vertical: !0, className: "sortCard", style: O, children: [
184
+ /* @__PURE__ */ c.jsx(q.Title, { level: 5, className: "title", children: "固定在左侧" }),
185
+ /* @__PURE__ */ c.jsx(
186
+ J,
186
187
  {
187
188
  placement: "left",
188
- dataList: S,
189
- keys: C,
189
+ dataList: b,
190
+ keys: M,
190
191
  columnsMap: h,
191
- onLeftClick: D,
192
- onRightClick: A,
193
- onChange: ee,
194
- onMoveEnd: te
192
+ onLeftClick: $,
193
+ onRightClick: P,
194
+ onChange: ne,
195
+ onMoveEnd: re
195
196
  }
196
197
  )
197
198
  ] }),
198
- /* @__PURE__ */ i.jsxs(z, { vertical: !0, className: "sortCard", gap: 6, children: [
199
- /* @__PURE__ */ i.jsx(B.Title, { level: 5, className: "title", children: "不固定" }),
200
- /* @__PURE__ */ i.jsx(
201
- O,
199
+ /* @__PURE__ */ c.jsxs(B, { vertical: !0, className: "sortCard", style: O, children: [
200
+ /* @__PURE__ */ c.jsx(q.Title, { level: 5, className: "title", children: "不固定" }),
201
+ /* @__PURE__ */ c.jsx(
202
+ J,
202
203
  {
203
204
  placement: "center",
204
205
  dataList: R,
205
- keys: M,
206
- columnsMap: u,
207
- onLeftClick: D,
208
- onRightClick: A,
209
- onChange: ne,
210
- onMoveEnd: ce
206
+ keys: w,
207
+ columnsMap: d,
208
+ onLeftClick: $,
209
+ onRightClick: P,
210
+ onChange: ie,
211
+ onMoveEnd: he
211
212
  }
212
213
  )
213
214
  ] }),
214
- /* @__PURE__ */ i.jsxs(z, { vertical: !0, className: "sortCard", gap: 6, children: [
215
- /* @__PURE__ */ i.jsx(B.Title, { level: 5, className: "title", children: "固定在右侧" }),
216
- /* @__PURE__ */ i.jsx(
217
- O,
215
+ /* @__PURE__ */ c.jsxs(B, { vertical: !0, className: "sortCard", style: O, children: [
216
+ /* @__PURE__ */ c.jsx(q.Title, { level: 5, className: "title", children: "固定在右侧" }),
217
+ /* @__PURE__ */ c.jsx(
218
+ J,
218
219
  {
219
220
  placement: "right",
220
- dataList: w,
221
- keys: y,
222
- columnsMap: d,
223
- onLeftClick: D,
224
- onRightClick: A,
225
- onChange: se,
226
- onMoveEnd: oe
221
+ dataList: v,
222
+ keys: S,
223
+ columnsMap: a,
224
+ onLeftClick: $,
225
+ onRightClick: P,
226
+ onChange: ce,
227
+ onMoveEnd: le
227
228
  }
228
229
  )
229
230
  ] })
230
231
  ] }),
231
- /* @__PURE__ */ i.jsxs(ue, { size: 16, className: "scope", children: [
232
- /* @__PURE__ */ i.jsx(
233
- me,
232
+ /* @__PURE__ */ c.jsxs(xe, { size: 16, className: "scope", ref: Q, children: [
233
+ /* @__PURE__ */ c.jsx(
234
+ ge,
234
235
  {
235
- indeterminate: ie,
236
- checked: re,
237
- onChange: le,
238
- children: "全选"
236
+ indeterminate: fe,
237
+ checked: de,
238
+ onChange: ae,
239
+ children: /* @__PURE__ */ c.jsx("span", { style: { whiteSpace: "nowrap" }, children: "全选" })
239
240
  }
240
241
  ),
241
- /* @__PURE__ */ i.jsx(
242
- fe,
242
+ /* @__PURE__ */ c.jsx(
243
+ Ce,
243
244
  {
244
245
  type: "link",
245
- icon: /* @__PURE__ */ i.jsx(Se, {}),
246
+ icon: /* @__PURE__ */ c.jsx(ve, {}),
246
247
  size: "small",
247
- onClick: ae,
248
- className: he`
248
+ onClick: ue,
249
+ className: me`
249
250
  &:hover {
250
- color: ${W.colorPrimary} !important;
251
+ color: ${ee.colorPrimary} !important;
251
252
  }
252
253
  `,
253
- children: "重置"
254
+ children: /* @__PURE__ */ c.jsx("span", { style: { whiteSpace: "nowrap" }, children: "重置" })
254
255
  }
255
256
  )
256
257
  ] })
257
258
  ] });
258
259
  }
259
- ), Oe = ye(we);
260
+ ), Ue = we(Re);
260
261
  export {
261
- Oe as default
262
+ Ue as default
262
263
  };
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export interface DndItemProps {
3
+ item: any;
4
+ onCheckboxChange?: (field: any, checked: boolean) => void;
5
+ isDragOverlay?: boolean;
6
+ }
7
+ declare const _default: React.NamedExoticComponent<DndItemProps>;
8
+ export default _default;
@@ -0,0 +1,94 @@
1
+ import { j as t } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import u from "react";
3
+ import { useSortable as j } from "../../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
4
+ import { CSS as I } from "../../../../../node_modules/.store/@dnd-kit_utilities@3.2.2/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs";
5
+ import { theme as x, Flex as p, Checkbox as D } from "antd";
6
+ import S from "../../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
7
+ import N from "../../../../../assets/iconfont/IconDragOrder.mjs";
8
+ import "../../../../../assets/iconfont/IconColumnFixedLeft.mjs";
9
+ import "../../../../../assets/iconfont/IconColumnFixedRight.mjs";
10
+ import "../../../../../assets/iconfont/IconColumnCancelFixed.mjs";
11
+ import "../../../../../assets/iconfont/IconMore.mjs";
12
+ import "../../../../../assets/iconfont/IconIcFluentHomeRegular.mjs";
13
+ import "../../../../../assets/iconfont/IconKuansongde.mjs";
14
+ import "../../../../../assets/iconfont/IconTekuansong.mjs";
15
+ import "../../../../../assets/iconfont/IconJincoude.mjs";
16
+ import "../../../../../assets/iconfont/IconZhongdengde.mjs";
17
+ import "../../../../../assets/iconfont/IconTejincou.mjs";
18
+ import "../../../../../assets/iconfont/IconWufengexian.mjs";
19
+ import "../../../../../assets/iconfont/IconHangliefengexian.mjs";
20
+ import "../../../../../assets/iconfont/IconHangfengexian.mjs";
21
+ import "../../../../../assets/iconfont/IconLiefengexian.mjs";
22
+ import "../../../../../assets/iconfont/IconYoubanmawentianchong.mjs";
23
+ import "../../../../../assets/iconfont/IconWubanmawentianchong.mjs";
24
+ import "../../../../../assets/iconfont/IconZhongzhi.mjs";
25
+ import "../../../../../assets/iconfont/IconGaojisousuo.mjs";
26
+ import "../../../../../assets/iconfont/IconSousuo.mjs";
27
+ import "../../../../../assets/iconfont/IconClose.mjs";
28
+ import "../../../../../assets/iconfont/IconFanhui.mjs";
29
+ import "../../../../../assets/iconfont/IconJinggao.mjs";
30
+ import "../../../../../assets/iconfont/IconIcon21.mjs";
31
+ import "../../../../../assets/iconfont/IconChenggong.mjs";
32
+ import "../../../../../assets/iconfont/IconTishi1.mjs";
33
+ import "../../../../../assets/iconfont/IconDuigoux.mjs";
34
+ import "../../../../../assets/iconfont/IconCuowu.mjs";
35
+ import "../../../../../assets/iconfont/IconXinxitishi.mjs";
36
+ import "../../../../../assets/iconfont/IconFabu.mjs";
37
+ import "../../../../../assets/iconfont/IconShanchu1.mjs";
38
+ import "../../../../../assets/iconfont/IconShanchu.mjs";
39
+ import "../../../../../assets/iconfont/IconTuodong.mjs";
40
+ const R = ({
41
+ item: r,
42
+ onCheckboxChange: o,
43
+ isDragOverlay: s
44
+ }) => {
45
+ const {
46
+ attributes: e,
47
+ isDragging: i,
48
+ setNodeRef: n,
49
+ listeners: a,
50
+ transform: l,
51
+ transition: c
52
+ } = j({
53
+ id: r == null ? void 0 : r.field
54
+ // disabled: item?.disabled,
55
+ }), { token: m } = x.useToken(), f = {
56
+ gap: 8,
57
+ transition: c,
58
+ transform: I.Transform.toString(l),
59
+ ...i && {
60
+ opacity: 0.6
61
+ },
62
+ ...s && {
63
+ backgroundColor: m.colorBgContainer
64
+ }
65
+ }, d = ({ target: g }) => {
66
+ o == null || o(r.field, g.checked);
67
+ };
68
+ return /* @__PURE__ */ t.jsxs(
69
+ p,
70
+ {
71
+ align: "center",
72
+ className: S({ sortItemDragging: i }, "sortItem"),
73
+ style: f,
74
+ ref: n,
75
+ ...e,
76
+ children: [
77
+ /* @__PURE__ */ t.jsx(p, { align: "center", className: "dragIcon", ...a, children: /* @__PURE__ */ t.jsx(N, { size: m.fontSize + 4 }) }),
78
+ /* @__PURE__ */ t.jsx(
79
+ D,
80
+ {
81
+ value: r.field,
82
+ checked: r.show,
83
+ onChange: d,
84
+ title: r.title,
85
+ children: r.title
86
+ }
87
+ )
88
+ ]
89
+ }
90
+ );
91
+ }, nr = u.memo(R);
92
+ export {
93
+ nr as default
94
+ };
@@ -0,0 +1,10 @@
1
+ import { ExportFieldsConfigProps } from "@/components/BitzTable/Store";
2
+ import { FC } from "react";
3
+ interface DndListProps {
4
+ dataList: ExportFieldsConfigProps[];
5
+ keys: any[];
6
+ onChange: (newDataList: any[]) => void;
7
+ onMoveEnd: (options: ExportFieldsConfigProps[], keys: any[]) => void;
8
+ }
9
+ declare const DndList: FC<DndListProps>;
10
+ export default DndList;
@@ -0,0 +1,58 @@
1
+ import { j as o } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { DndContext as j, closestCenter as u, DragOverlay as h } from "../../../../../node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs";
3
+ import { SortableContext as v, rectSortingStrategy as y, arrayMove as l } from "../../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
4
+ import { useState as C } from "react";
5
+ import m from "./DndItem.mjs";
6
+ const E = ({
7
+ dataList: r,
8
+ keys: a,
9
+ onChange: x,
10
+ onMoveEnd: d
11
+ }) => {
12
+ const [s, c] = C(-1), f = (t) => {
13
+ const { active: e } = t;
14
+ e && c(e.data.current.sortable.index);
15
+ }, D = (t) => {
16
+ const { over: e } = t;
17
+ if (e) {
18
+ const n = e.data.current.sortable.index;
19
+ s !== n && (g(s, n), c(-1));
20
+ }
21
+ }, g = (t, e) => {
22
+ const n = l(a, t, e), i = l(r, t, e);
23
+ d(i, n);
24
+ }, p = (t, e) => {
25
+ const n = r.findIndex((S) => S.field === t), i = JSON.parse(JSON.stringify(r));
26
+ i[n].show = e, x(i);
27
+ };
28
+ return /* @__PURE__ */ o.jsx(
29
+ j,
30
+ {
31
+ collisionDetection: u,
32
+ onDragStart: f,
33
+ onDragEnd: D,
34
+ onDragCancel: () => c(-1),
35
+ children: /* @__PURE__ */ o.jsx(
36
+ v,
37
+ {
38
+ items: a,
39
+ strategy: y,
40
+ children: /* @__PURE__ */ o.jsxs("div", { className: "sortList", children: [
41
+ r.map((t) => /* @__PURE__ */ o.jsx(m, { item: t, onCheckboxChange: p }, t.field)),
42
+ /* @__PURE__ */ o.jsx(h, { children: s !== -1 && /* @__PURE__ */ o.jsx(
43
+ m,
44
+ {
45
+ item: r[s],
46
+ isDragOverlay: !0
47
+ },
48
+ r[s].field
49
+ ) })
50
+ ] })
51
+ }
52
+ )
53
+ }
54
+ );
55
+ };
56
+ export {
57
+ E as default
58
+ };