bitz-react-admin-ui 2.1.9 → 2.2.0

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 (61) hide show
  1. package/dist/_virtual/index.mjs +2 -2
  2. package/dist/_virtual/index2.mjs +2 -2
  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 +24 -21
  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 +5 -0
  19. package/dist/components/BitzTable/Table/index.mjs +265 -244
  20. package/dist/components/BitzTable/Table/utils.mjs +17 -16
  21. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.d.ts +1 -0
  22. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +84 -97
  23. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.d.ts +5 -4
  24. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +66 -60
  25. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +78 -72
  26. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.d.ts +1 -3
  27. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +190 -189
  28. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.d.ts +8 -0
  29. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +94 -0
  30. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.d.ts +10 -0
  31. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +58 -0
  32. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.d.ts +13 -7
  33. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +119 -80
  34. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.d.ts +2 -2
  35. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +26 -29
  36. package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.d.ts +3 -1
  37. package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.mjs +53 -77
  38. package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.d.ts +2 -2
  39. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.d.ts +12 -0
  40. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +61 -0
  41. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +50 -59
  42. package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +27 -32
  43. package/dist/components/BitzTable/ToolBar/Modal/index.d.ts +18 -0
  44. package/dist/components/BitzTable/ToolBar/Modal/index.mjs +50 -0
  45. package/dist/components/BitzTable/ToolBar/Modal/style.d.ts +2 -0
  46. package/dist/components/BitzTable/ToolBar/Modal/style.mjs +58 -0
  47. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +20 -20
  48. package/dist/components/BitzTable/ToolBar/index.d.ts +12 -11
  49. package/dist/components/BitzTable/index.d.ts +2 -0
  50. package/dist/node_modules/.store/@ant-design_icons-svg@4.4.2/node_modules/@ant-design/icons-svg/es/asn/MenuOutlined.mjs +5 -0
  51. package/dist/node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/MenuOutlined.mjs +15 -0
  52. package/dist/node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +1098 -753
  53. package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
  54. package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
  55. package/dist/style.css +1 -1
  56. package/dist/utils/findNode.d.ts +2 -2
  57. package/package.json +1 -1
  58. package/dist/components/BitzTable/Select/index.mjs +0 -11
  59. package/dist/components/BitzTable/Select/style.mjs +0 -66
  60. package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.mjs +0 -78
  61. package/dist/components/BitzTable/ToolBar/ExportIcon/styles.mjs +0 -47
@@ -1,40 +1,41 @@
1
1
  import { j as f } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { Skeleton as x, Table as l } from "antd";
3
- function a(o, r) {
4
- return o == null ? void 0 : o.map((e) => {
2
+ import { Skeleton as x, Table as d } from "antd";
3
+ function a(i, r) {
4
+ return i == null ? void 0 : i.map((e) => {
5
5
  const n = { ...e };
6
- return e != null && e.isOperationCol || e != null && e.isCheckboxCol || e != null && e.isExpandIconCol || r.includes(e) ? e : (n != null && n.children && (n.children = a(n == null ? void 0 : n.children, r)), {
6
+ return e != null && e.isOperationCol || e != null && e.isDragSortCol || e != null && e.isCheckboxCol || e != null && e.isExpandIconCol || r.includes(e) ? e : (n != null && n.children && (n.children = a(n == null ? void 0 : n.children, r)), {
7
7
  ...n,
8
8
  sorter: !1,
9
- render: (d, i, t) => /* @__PURE__ */ f.jsx(
9
+ render: (t, l, o) => /* @__PURE__ */ f.jsx(
10
10
  x,
11
11
  {
12
12
  active: !0,
13
13
  title: !1,
14
14
  paragraph: {
15
15
  rows: 1,
16
- width: (t + 1) % 2 === 0 ? "100%" : "60%"
16
+ width: (o + 1) % 2 === 0 ? "100%" : "60%"
17
17
  }
18
18
  }
19
19
  )
20
20
  });
21
21
  });
22
22
  }
23
- const C = 0, c = 1;
24
- function s(o, r, e, n) {
25
- let d = C;
23
+ const C = 0, s = 1;
24
+ function h(i, r, e, n) {
25
+ const t = [...r];
26
+ let l = C;
26
27
  if (e) {
27
- const i = o.indexOf(l.SELECTION_COLUMN);
28
- i >= 0 && (d = i), r.splice(d, 0, l.SELECTION_COLUMN);
28
+ const o = (i ?? []).indexOf(d.SELECTION_COLUMN);
29
+ o >= 0 && (l = o), t.splice(l, 0, d.SELECTION_COLUMN);
29
30
  }
30
31
  if (n) {
31
- let i = 0;
32
- const t = o.indexOf(l.EXPAND_COLUMN);
33
- t >= 0 && (i = t), e && d === 0 && t === -1 && (i = c), r.splice(i, 0, l.EXPAND_COLUMN);
32
+ let o = 0;
33
+ const c = (i ?? []).indexOf(d.EXPAND_COLUMN);
34
+ c >= 0 && (o = c), e && l === 0 && c === -1 && (o = s), t.splice(o, 0, d.EXPAND_COLUMN);
34
35
  }
35
- return r;
36
+ return t;
36
37
  }
37
38
  export {
38
- s as getColumnsWithTool,
39
+ h as getColumnsWithTool,
39
40
  a as loopBuildSkeleton
40
41
  };
@@ -8,5 +8,6 @@ export interface ColumnConfigModalProps {
8
8
  onChange?: BitzTableToolBarProps['onColumnChange'];
9
9
  getContainer: ModalProps['getContainer'];
10
10
  }
11
+ export declare const exportConfigTitle = "\u5BFC\u51FA\u8BBE\u7F6E";
11
12
  declare const ColumnConfigModal: FC<ColumnConfigModalProps>;
12
13
  export default ColumnConfigModal;
@@ -1,122 +1,109 @@
1
1
  import { j as e } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { Modal as re, Typography as oe, Card as se, Segmented as ne, Flex as le, message as W } from "antd";
3
- import { useState as m, useContext as q, useRef as K, useMemo as ie, useEffect as ae } from "react";
4
- import { BitzTableContext as ce } from "../../Store/index.mjs";
5
- import A from "../../../BitzButton/index.mjs";
6
- import fe from "../../../BitzTheme/index.mjs";
7
- import me from "../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
8
- import ue from "./StylesConfig/index.mjs";
9
- import de from "./ColumnsSort/index.mjs";
10
- import pe from "./ExportConfig/index.mjs";
11
- import { styles as ge } from "./style.mjs";
12
- import { BitzConfigContext as ye } from "../../../BitzConfigProvider/context.mjs";
13
- import Ce from "../../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
14
- import xe from "../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
15
- const Ne = ({
16
- open: u,
17
- title: G,
18
- onChange: s,
19
- close: n,
2
+ import { Segmented as _, message as w } from "antd";
3
+ import { useState as m, useContext as H, useRef as j, useMemo as $ } from "react";
4
+ import { BitzTableContext as ee } from "../../Store/index.mjs";
5
+ import L from "../../../BitzButton/index.mjs";
6
+ import te from "../../../BitzTheme/index.mjs";
7
+ import oe from "./StylesConfig/index.mjs";
8
+ import re from "./ColumnsSort/index.mjs";
9
+ import se from "./ExportConfig/index.mjs";
10
+ import { BitzConfigContext as ne } from "../../../BitzConfigProvider/context.mjs";
11
+ import le from "../Modal/index.mjs";
12
+ import ie from "../../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
13
+ import ae from "../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
14
+ const fe = "导出设置", he = ({
15
+ open: A,
16
+ title: D,
17
+ onChange: n,
18
+ close: l,
20
19
  getContainer: I
21
20
  }) => {
22
- const { token: l } = fe.useToken(), [i, a] = m(1), [J, d] = m(!1);
21
+ const { token: T } = te.useToken(), [i, a] = m(1), [q, c] = m(!1);
23
22
  m(!1);
24
- const [P, r] = m(!1), {
25
- persistenceType: Q,
26
- persistenceKey: T,
27
- onlineChange: p,
28
- setColumnsMap: U,
29
- setSortKeyColumns: X,
30
- stylesStorageType: Y,
31
- stylesStorageKey: k,
32
- setTableStylesConfig: g,
33
- onlineStylesConfigChange: y,
34
- exportStorageType: Z,
35
- exportStorageKey: v,
36
- setTableExportConfig: _,
37
- onlineExportConfigChange: C
38
- } = q(ce), o = q(ye).Table, t = K(null), B = K(null), x = K(null), $ = async () => {
39
- var F, R, z, w, E, M, N, O, V, H, L, D;
40
- if (P)
23
+ const [G, o] = m(!1), {
24
+ persistenceType: J,
25
+ persistenceKey: R,
26
+ onlineChange: u,
27
+ setColumnsMap: N,
28
+ stylesStorageType: P,
29
+ stylesStorageKey: b,
30
+ setTableStylesConfig: p,
31
+ onlineStylesConfigChange: d,
32
+ defaultTableExportConfig: Q,
33
+ exportStorageType: U,
34
+ exportStorageKey: h,
35
+ setTableExportConfig: W,
36
+ onlineExportConfigChange: g
37
+ } = H(ee), r = H(ne).Table, s = j(null), k = j(null), x = j(null), X = async () => {
38
+ var v, z, B, E, F, K, M, O, V;
39
+ if (G)
41
40
  return;
42
- r(!0);
43
- const S = (F = t.current) == null ? void 0 : F.getCheckedKeys();
44
- if (!(S != null && S.length)) {
45
- a(2), W.error("表格至少需要显示一列"), r(!1);
41
+ o(!0);
42
+ const t = (v = s.current) == null ? void 0 : v.getCheckedKeys();
43
+ if (!(t != null && t.length)) {
44
+ a(2), w.error("表格至少需要显示一列"), o(!1);
46
45
  return;
47
46
  }
48
- if (!((R = x.current) == null ? void 0 : R.hasOne())) {
49
- a(3), W.error("导出设置至少需要一个字段"), r(!1);
47
+ if (!((z = x.current) == null ? void 0 : z.hasOne())) {
48
+ a(3), w.error("导出设置至少需要一个字段"), o(!1);
50
49
  return;
51
50
  }
52
- const j = (z = B.current) == null ? void 0 : z.getFormInstance(), f = await (j == null ? void 0 : j.getFieldsValue()), ee = xe(f, "stylesScope"), h = {
53
- ...(w = t.current) == null ? void 0 : w.getLeftSortColumns(),
54
- ...(E = t.current) == null ? void 0 : E.getCenterSortColumns(),
55
- ...(M = t.current) == null ? void 0 : M.getRightSortColumns()
56
- }, te = [
57
- ...((N = t.current) == null ? void 0 : N.getLeftSortKeys()) ?? [],
58
- ...((O = t.current) == null ? void 0 : O.getCenterSortKeys()) ?? [],
59
- ...((V = t.current) == null ? void 0 : V.getRightSortKeys()) ?? []
60
- ], b = ((H = x.current) == null ? void 0 : H.getExportConfig()) ?? [];
61
- g == null || g(ee), (L = o == null ? void 0 : o.setStylesScope) == null || L.call(o, f.stylesScope ? "global" : "current"), U(h), X(te), _(b), Y === "online" && k && (y == null || y(k, f)), Q === "online" && T && (p == null || p(T, h)), Z === "online" && v && (C == null || C(v, b)), r(!1), s ? (d(!0), (D = s == null ? void 0 : s(f, h, b)) == null || D.finally(() => {
62
- d(!1), n();
63
- })) : n();
64
- }, c = ie(() => l.mode === "dark", [l.mode]);
65
- return ae(() => {
66
- u || (a(1), d(!1), r(!1));
67
- }, [u]), /* @__PURE__ */ e.jsx(
68
- re,
51
+ const y = (B = k.current) == null ? void 0 : B.getFormInstance(), f = await (y == null ? void 0 : y.getFieldsValue()), Z = ae(f, "stylesScope"), C = {
52
+ ...(E = s.current) == null ? void 0 : E.getLeftSortColumns(),
53
+ ...(F = s.current) == null ? void 0 : F.getCenterSortColumns(),
54
+ ...(K = s.current) == null ? void 0 : K.getRightSortColumns()
55
+ }, S = ((M = x.current) == null ? void 0 : M.getExportConfig()) ?? Q;
56
+ p == null || p(Z), (O = r == null ? void 0 : r.setStylesScope) == null || O.call(r, f.stylesScope ? "global" : "current"), N(C), W(S), P === "online" && b && (d == null || d(b, f)), J === "online" && R && (u == null || u(R, C)), U === "online" && h && (g == null || g(h, S)), o(!1), n ? (c(!0), (V = n == null ? void 0 : n(f, C, S)) == null || V.finally(() => {
57
+ c(!1), l();
58
+ })) : l();
59
+ };
60
+ $(() => T.mode === "dark", [T.mode]);
61
+ const Y = () => {
62
+ a(1), c(!1), o(!1);
63
+ };
64
+ return /* @__PURE__ */ e.jsx(
65
+ le,
69
66
  {
70
- className: me(ge(l), "tableConfigModal"),
71
- title: /* @__PURE__ */ e.jsx(oe.Title, { style: { fontSize: 16, margin: 0 }, children: G }),
72
- destroyOnClose: !0,
67
+ open: A,
68
+ title: D,
69
+ close: l,
70
+ closeAfter: Y,
73
71
  getContainer: I,
74
- open: u,
75
- onCancel: n,
76
- style: {
77
- "--sortCard-bgColor": c ? "#444" : "#f2f2f2",
78
- "--sortCard-titleColor": c ? "#ccc" : "#777",
79
- "--radioCard-bgColor": c ? "#444" : "#F2F2F2",
80
- "--radioCard-bgHoverColor": c ? "#333" : l.colorBgContainer
81
- },
82
- styles: { body: { maxHeight: window.innerHeight - 300 } },
83
- width: 700,
84
72
  footer: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
85
73
  /* @__PURE__ */ e.jsx(
86
- A,
74
+ L,
87
75
  {
88
76
  type: "primary",
89
- icon: /* @__PURE__ */ e.jsx(Ce, {}),
90
- onClick: $,
91
- loading: J,
77
+ icon: /* @__PURE__ */ e.jsx(ie, {}),
78
+ onClick: X,
79
+ loading: q,
92
80
  children: "保存"
93
81
  }
94
82
  ),
95
- /* @__PURE__ */ e.jsx(A, { onClick: n, children: "取消" })
83
+ /* @__PURE__ */ e.jsx(L, { onClick: l, children: "取消" })
96
84
  ] }),
97
- children: /* @__PURE__ */ e.jsxs(se, { className: "container", bordered: !1, children: [
98
- /* @__PURE__ */ e.jsx("div", { className: "segmentedWrapper", children: /* @__PURE__ */ e.jsx(
99
- ne,
100
- {
101
- size: "large",
102
- options: [
103
- { label: "外观设置", value: 1 },
104
- { label: "列设置", value: 2 },
105
- { label: "导出设置", value: 3 }
106
- ],
107
- value: i,
108
- onChange: a
109
- }
110
- ) }),
111
- /* @__PURE__ */ e.jsxs(le, { className: "containerBody", children: [
112
- /* @__PURE__ */ e.jsx(ue, { ref: B, display: i === 1 }),
113
- /* @__PURE__ */ e.jsx(de, { ref: t, display: i === 2 }),
114
- /* @__PURE__ */ e.jsx(pe, { ref: x, display: i === 3 })
115
- ] })
85
+ extra: /* @__PURE__ */ e.jsx(
86
+ _,
87
+ {
88
+ size: "large",
89
+ options: [
90
+ { label: "外观设置", value: 1 },
91
+ { label: "列设置", value: 2 },
92
+ { label: fe, value: 3 }
93
+ ],
94
+ value: i,
95
+ onChange: a
96
+ }
97
+ ),
98
+ children: (t) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
99
+ /* @__PURE__ */ e.jsx(oe, { ref: k, display: i === 1 }),
100
+ /* @__PURE__ */ e.jsx(re, { parentHeight: t, ref: s, display: i === 2 }),
101
+ /* @__PURE__ */ e.jsx(se, { parentHeight: t, refInstance: x, display: i === 3, showSelectRadio: !1 })
116
102
  ] })
117
103
  }
118
104
  );
119
105
  };
120
106
  export {
121
- Ne as default
107
+ he as default,
108
+ fe as exportConfigTitle
122
109
  };
@@ -1,10 +1,11 @@
1
1
  import React from 'react';
2
2
  export interface DndItemProps {
3
- placement: 'left' | 'center' | 'right';
3
+ placement?: 'left' | 'center' | 'right';
4
4
  item: any;
5
- onLeftClick: (key: any, placement: 'left' | 'center' | 'right') => void;
6
- onRightClick: (key: any, placement: 'left' | 'center' | 'right') => void;
7
- onCheckboxChange: (key: any, checked: boolean) => void;
5
+ isDragOverlay?: boolean;
6
+ onLeftClick?: (key: any, placement: 'left' | 'center' | 'right') => void;
7
+ onRightClick?: (key: any, placement: 'left' | 'center' | 'right') => void;
8
+ onCheckboxChange?: (key: any, checked: boolean) => void;
8
9
  }
9
10
  declare const _default: React.NamedExoticComponent<DndItemProps>;
10
11
  export default _default;
@@ -1,13 +1,13 @@
1
1
  import { j as o } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import D, { useState as E, useMemo as F } from "react";
3
- import { useSortable as R } from "../../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
4
- import { CSS as b } from "../../../../../node_modules/.store/@dnd-kit_utilities@3.2.2/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs";
5
- import { Flex as p, Checkbox as v, Tooltip as w } from "antd";
6
- import M from "../../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
7
- import O from "../../../../../assets/iconfont/IconDragOrder.mjs";
8
- import g from "../../../../../assets/iconfont/IconColumnFixedLeft.mjs";
9
- import h from "../../../../../assets/iconfont/IconColumnFixedRight.mjs";
10
- import x from "../../../../../assets/iconfont/IconColumnCancelFixed.mjs";
2
+ import F, { useState as v, useMemo as M } from "react";
3
+ import { useSortable as O } from "../../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
4
+ import { CSS as _ } from "../../../../../node_modules/.store/@dnd-kit_utilities@3.2.2/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs";
5
+ import { theme as I, Flex as d, Checkbox as k, Tooltip as $ } from "antd";
6
+ import q from "../../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
7
+ import A from "../../../../../assets/iconfont/IconDragOrder.mjs";
8
+ import x from "../../../../../assets/iconfont/IconColumnFixedLeft.mjs";
9
+ import g from "../../../../../assets/iconfont/IconColumnFixedRight.mjs";
10
+ import h from "../../../../../assets/iconfont/IconColumnCancelFixed.mjs";
11
11
  import "../../../../../assets/iconfont/IconMore.mjs";
12
12
  import "../../../../../assets/iconfont/IconIcFluentHomeRegular.mjs";
13
13
  import "../../../../../assets/iconfont/IconKuansongde.mjs";
@@ -37,46 +37,53 @@ import "../../../../../assets/iconfont/IconFabu.mjs";
37
37
  import "../../../../../assets/iconfont/IconShanchu1.mjs";
38
38
  import "../../../../../assets/iconfont/IconShanchu.mjs";
39
39
  import "../../../../../assets/iconfont/IconTuodong.mjs";
40
- const d = ({ icon: t, className: r, open: e, title: i, onClick: n }) => /* @__PURE__ */ o.jsx(
41
- w,
42
- {
43
- getTooltipContainer: (s) => s.parentElement,
44
- title: i,
45
- open: e ? !1 : void 0,
46
- children: /* @__PURE__ */ o.jsx(t, { className: r, onClick: n })
47
- }
48
- ), T = ({
40
+ const j = ({ icon: t, className: n, open: r, title: e, onClick: i }) => {
41
+ const { token: s } = I.useToken();
42
+ return /* @__PURE__ */ o.jsx(
43
+ $,
44
+ {
45
+ getTooltipContainer: (p) => p.parentElement,
46
+ title: e,
47
+ open: r ? !1 : void 0,
48
+ children: /* @__PURE__ */ o.jsx(t, { size: s.fontSize + 4, className: n, onClick: i })
49
+ }
50
+ );
51
+ }, B = ({
49
52
  item: t,
53
+ isDragOverlay: n,
50
54
  placement: r,
51
55
  onLeftClick: e,
52
56
  onRightClick: i,
53
- onCheckboxChange: n
57
+ onCheckboxChange: s
54
58
  }) => {
55
59
  const {
56
- attributes: s,
60
+ attributes: p,
57
61
  isDragging: m,
58
- setNodeRef: u,
59
- listeners: j,
60
- transform: C,
61
- transition: I
62
- } = R({
62
+ setNodeRef: S,
63
+ listeners: y,
64
+ transform: N,
65
+ transition: T
66
+ } = O({
63
67
  id: t == null ? void 0 : t.key
64
68
  // disabled: item?.disabled,
65
- }), k = {
66
- transition: I,
67
- transform: b.Transform.toString(C)
68
- }, y = ({ target: l }) => {
69
- n(t.key, l.checked);
70
- }, [N, S] = E(!1), c = (l) => {
71
- S(l);
72
- }, { text: a, icon: f } = F(() => r === "left" ? {
69
+ }), { token: w } = I.useToken(), z = {
70
+ transition: T,
71
+ transform: _.Transform.toString(N),
72
+ ...m && {
73
+ opacity: 0.6
74
+ }
75
+ }, D = ({ target: l }) => {
76
+ s == null || s(t.key, l.checked);
77
+ }, [a, E] = v(!1), c = (l) => {
78
+ E(l);
79
+ }, { text: f, icon: u } = M(() => r === "left" ? {
73
80
  text: {
74
81
  left: "取消固定",
75
82
  right: "固定在右侧"
76
83
  },
77
84
  icon: {
78
- left: x,
79
- right: h
85
+ left: h,
86
+ right: g
80
87
  }
81
88
  } : r === "center" ? {
82
89
  text: {
@@ -84,8 +91,8 @@ const d = ({ icon: t, className: r, open: e, title: i, onClick: n }) => /* @__PU
84
91
  right: "固定在右侧"
85
92
  },
86
93
  icon: {
87
- left: g,
88
- right: h
94
+ left: x,
95
+ right: g
89
96
  }
90
97
  } : {
91
98
  text: {
@@ -93,59 +100,58 @@ const d = ({ icon: t, className: r, open: e, title: i, onClick: n }) => /* @__PU
93
100
  right: "取消固定"
94
101
  },
95
102
  icon: {
96
- left: g,
97
- right: x
103
+ left: x,
104
+ right: h
98
105
  }
99
106
  }, [r]);
100
107
  return /* @__PURE__ */ o.jsxs(
101
- p,
108
+ "div",
102
109
  {
103
- align: "center",
104
- className: M({ draggingSortItem: m }, "sortItem"),
105
- style: k,
106
- ref: u,
110
+ className: q({ sortItemDragging: m }, "sortItem", { showSortItemOperat: a && !n }),
111
+ style: z,
112
+ ref: S,
107
113
  onMouseEnter: () => c(!0),
108
114
  onMouseLeave: () => c(!1),
109
- ...s,
115
+ ...p,
110
116
  children: [
111
- /* @__PURE__ */ o.jsx(p, { align: "center", className: "dragIcon", ...j, children: /* @__PURE__ */ o.jsx(O, {}) }),
117
+ /* @__PURE__ */ o.jsx(d, { align: "center", className: "dragIcon", ...y, children: /* @__PURE__ */ o.jsx(A, { size: w.fontSize + 4 }) }),
112
118
  /* @__PURE__ */ o.jsx(
113
- v,
119
+ k,
114
120
  {
115
121
  checked: t.show,
116
- onChange: y,
122
+ onChange: D,
117
123
  title: t.title,
118
124
  children: t.title
119
125
  }
120
126
  ),
121
127
  /* @__PURE__ */ o.jsxs(
122
- p,
128
+ d,
123
129
  {
124
130
  style: {
125
131
  height: "100%",
126
- display: N ? "flex" : "none"
132
+ display: a && !n ? "flex" : "none"
127
133
  },
128
134
  align: "center",
129
135
  className: "operation pointerCursor",
130
136
  children: [
131
137
  /* @__PURE__ */ o.jsx(
132
- d,
138
+ j,
133
139
  {
134
140
  className: "leftOperation",
135
- title: a.left,
141
+ title: f.left,
136
142
  open: m,
137
- icon: f.left,
138
- onClick: () => e(t.key, r)
143
+ icon: u.left,
144
+ onClick: () => e == null ? void 0 : e(t.key, r)
139
145
  }
140
146
  ),
141
147
  /* @__PURE__ */ o.jsx(
142
- d,
148
+ j,
143
149
  {
144
150
  className: "rightOperation",
145
- title: a.right,
151
+ title: f.right,
146
152
  open: m,
147
- icon: f.right,
148
- onClick: () => i(t.key, r)
153
+ icon: u.right,
154
+ onClick: () => i == null ? void 0 : i(t.key, r)
149
155
  }
150
156
  )
151
157
  ]
@@ -154,7 +160,7 @@ const d = ({ icon: t, className: r, open: e, title: i, onClick: n }) => /* @__PU
154
160
  ]
155
161
  }
156
162
  );
157
- }, It = D.memo(T);
163
+ }, Tt = F.memo(B);
158
164
  export {
159
- It as default
165
+ Tt as default
160
166
  };