bitz-react-admin-ui 2.2.8 → 2.3.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 (176) hide show
  1. package/dist/_virtual/dayjs.min.mjs +5 -2
  2. package/dist/_virtual/dayjs.min2.mjs +4 -0
  3. package/dist/assets/iconfont/IconChenggong.mjs +10 -4
  4. package/dist/assets/iconfont/IconClose.mjs +7 -1
  5. package/dist/assets/iconfont/IconColumnCancelFixed.mjs +25 -4
  6. package/dist/assets/iconfont/IconColumnFixedLeft.mjs +29 -8
  7. package/dist/assets/iconfont/IconColumnFixedRight.mjs +28 -7
  8. package/dist/assets/iconfont/IconCuowu.mjs +8 -2
  9. package/dist/assets/iconfont/IconDragOrder.mjs +28 -7
  10. package/dist/assets/iconfont/IconDuigoux.mjs +8 -2
  11. package/dist/assets/iconfont/IconFabu.mjs +18 -3
  12. package/dist/assets/iconfont/IconFanhui.mjs +11 -5
  13. package/dist/assets/iconfont/IconGaojisousuo.mjs +10 -4
  14. package/dist/assets/iconfont/IconHangfengexian.mjs +27 -4
  15. package/dist/assets/iconfont/IconHangliefengexian.mjs +27 -4
  16. package/dist/assets/iconfont/IconIcFluentHomeRegular.mjs +11 -5
  17. package/dist/assets/iconfont/IconIcon21.mjs +8 -2
  18. package/dist/assets/iconfont/IconJincoude.mjs +9 -3
  19. package/dist/assets/iconfont/IconJinggao.mjs +8 -2
  20. package/dist/assets/iconfont/IconKuansongde.mjs +11 -5
  21. package/dist/assets/iconfont/IconLiefengexian.mjs +28 -5
  22. package/dist/assets/iconfont/IconMore.mjs +26 -4
  23. package/dist/assets/iconfont/IconShanchu.mjs +11 -5
  24. package/dist/assets/iconfont/IconShanchu1.mjs +18 -3
  25. package/dist/assets/iconfont/IconSousuo.mjs +10 -4
  26. package/dist/assets/iconfont/IconTejincou.mjs +7 -1
  27. package/dist/assets/iconfont/IconTekuansong.mjs +11 -5
  28. package/dist/assets/iconfont/IconTishi1.mjs +12 -6
  29. package/dist/assets/iconfont/IconTuodong.mjs +12 -6
  30. package/dist/assets/iconfont/IconWubanmawentianchong.mjs +22 -5
  31. package/dist/assets/iconfont/IconWufengexian.mjs +11 -4
  32. package/dist/assets/iconfont/IconXinxitishi.mjs +9 -3
  33. package/dist/assets/iconfont/IconYoubanmawentianchong.mjs +23 -7
  34. package/dist/assets/iconfont/IconZhongdengde.mjs +10 -4
  35. package/dist/assets/iconfont/IconZhongzhi.mjs +11 -5
  36. package/dist/assets/iconfont/index.mjs +33 -33
  37. package/dist/components/BitzAddTag/index.mjs +41 -8
  38. package/dist/components/BitzAddressBook/index.mjs +122 -35
  39. package/dist/components/BitzAppPage/index.mjs +18 -4
  40. package/dist/components/BitzAppRefresh/index.mjs +27 -15
  41. package/dist/components/BitzBetterScroll/index.mjs +5 -5
  42. package/dist/components/BitzButton/index.mjs +23 -9
  43. package/dist/components/BitzCalendar/index.mjs +53 -20
  44. package/dist/components/BitzCascader/BitzCascaderMobile.mjs +68 -30
  45. package/dist/components/BitzCascader/index.mjs +6 -2
  46. package/dist/components/BitzCollapse/index.mjs +4 -4
  47. package/dist/components/BitzConfigProvider/context.mjs +3 -1
  48. package/dist/components/BitzConfigProvider/index.mjs +12 -8
  49. package/dist/components/BitzConfirmModal/index.mjs +24 -1
  50. package/dist/components/BitzConvert/DropdownToButton/index.mjs +14 -11
  51. package/dist/components/BitzConvert/index.mjs +1 -1
  52. package/dist/components/BitzDayJs/index.mjs +1 -1
  53. package/dist/components/BitzDescriptions/index.mjs +11 -1
  54. package/dist/components/BitzDrawer/index.mjs +17 -2
  55. package/dist/components/BitzEmpty/index.mjs +6 -2
  56. package/dist/components/BitzException/index.mjs +6 -1
  57. package/dist/components/BitzFloatLayout/index.mjs +10 -1
  58. package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +13 -16
  59. package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +27 -21
  60. package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +22 -4
  61. package/dist/components/BitzFuiCalendar/CalendarBody.mjs +28 -5
  62. package/dist/components/BitzFuiCalendar/CalendarHead.mjs +6 -3
  63. package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +13 -4
  64. package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +52 -20
  65. package/dist/components/BitzFuiCalendar/ColumnData.mjs +31 -15
  66. package/dist/components/BitzFuiCalendar/FuiCalendarItem.mjs +47 -5
  67. package/dist/components/BitzFuiCalendar/index.mjs +7 -1
  68. package/dist/components/BitzFullScreen/index.mjs +9 -6
  69. package/dist/components/BitzHighlight/Child.mjs +23 -9
  70. package/dist/components/BitzHighlight/Highlight.mjs +26 -5
  71. package/dist/components/BitzHighlight/chunks.mjs +20 -17
  72. package/dist/components/BitzHighlight/style.mjs +4 -1
  73. package/dist/components/BitzImage/index.mjs +1 -1
  74. package/dist/components/BitzImage/previewImage.mjs +12 -5
  75. package/dist/components/BitzLanguageTabs/index.mjs +14 -3
  76. package/dist/components/BitzLazyLoad/index.mjs +7 -1
  77. package/dist/components/BitzList/List.mjs +17 -3
  78. package/dist/components/BitzList/LoadMore.mjs +29 -20
  79. package/dist/components/BitzLoadMore/index.mjs +34 -14
  80. package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +25 -12
  81. package/dist/components/BitzMeetingTime/index.mjs +11 -7
  82. package/dist/components/BitzMobileLoading/index.mjs +1 -1
  83. package/dist/components/BitzModal/index.mjs +24 -11
  84. package/dist/components/BitzNoData/index.mjs +4 -1
  85. package/dist/components/BitzNoMore/index.mjs +1 -1
  86. package/dist/components/BitzOrganizationSelection/index.mjs +43 -14
  87. package/dist/components/BitzPageContainer/index.mjs +107 -46
  88. package/dist/components/BitzPageHeader/index.mjs +89 -21
  89. package/dist/components/BitzPagination/index.mjs +71 -22
  90. package/dist/components/BitzPopover/index.mjs +4 -4
  91. package/dist/components/BitzPullRefresh/PullRefresh.mjs +47 -18
  92. package/dist/components/BitzQRCode/index.mjs +6 -1
  93. package/dist/components/BitzQueryFilter/QueryFilterContent.mjs +35 -17
  94. package/dist/components/BitzQueryFilter/QueryFilterDrawer.mjs +20 -13
  95. package/dist/components/BitzQueryFilter/QueryFilterMobile.mjs +4 -1
  96. package/dist/components/BitzQueryFilter/index.mjs +69 -20
  97. package/dist/components/BitzRefresh/index.mjs +5 -1
  98. package/dist/components/BitzRemark/index.mjs +4 -4
  99. package/dist/components/BitzScheduleCenter/index.mjs +24 -30
  100. package/dist/components/BitzSearch/index.mjs +1 -1
  101. package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +123 -48
  102. package/dist/components/BitzSelect/index.mjs +1 -1
  103. package/dist/components/BitzSkeleton/index.mjs +31 -1
  104. package/dist/components/BitzSwitch/index.mjs +7 -2
  105. package/dist/components/BitzTabbar/BitzTabbar.mjs +25 -8
  106. package/dist/components/BitzTabbar/BitzTabbarItem.mjs +4 -1
  107. package/dist/components/BitzTable/ActionBar/ActionBar.mjs +73 -12
  108. package/dist/components/BitzTable/ActionBar/Button.mjs +1 -1
  109. package/dist/components/BitzTable/ActionBar/style.mjs +12 -9
  110. package/dist/components/BitzTable/ActionCol/index.mjs +95 -21
  111. package/dist/components/BitzTable/ActionCol/style.mjs +15 -12
  112. package/dist/components/BitzTable/Dropdown/index.mjs +8 -1
  113. package/dist/components/BitzTable/Dropdown/style.mjs +9 -6
  114. package/dist/components/BitzTable/SelectionBar/Button.mjs +19 -6
  115. package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +8 -2
  116. package/dist/components/BitzTable/SelectionBar/style.mjs +18 -8
  117. package/dist/components/BitzTable/Store/index.d.ts +2 -2
  118. package/dist/components/BitzTable/Store/index.mjs +248 -212
  119. package/dist/components/BitzTable/Store/utils/index.mjs +25 -25
  120. package/dist/components/BitzTable/SubTable/index.mjs +121 -73
  121. package/dist/components/BitzTable/Table/ResizableTitle.mjs +23 -5
  122. package/dist/components/BitzTable/Table/SortTableContext.mjs +20 -7
  123. package/dist/components/BitzTable/Table/SortableRow.mjs +44 -20
  124. package/dist/components/BitzTable/Table/index.mjs +417 -207
  125. package/dist/components/BitzTable/Table/style.mjs +11 -1
  126. package/dist/components/BitzTable/Table/utils.mjs +11 -4
  127. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +92 -28
  128. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +97 -22
  129. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +68 -29
  130. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +253 -145
  131. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +38 -12
  132. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +42 -16
  133. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +96 -20
  134. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +9 -2
  135. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +100 -46
  136. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +30 -8
  137. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +44 -14
  138. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +44 -12
  139. package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +17 -4
  140. package/dist/components/BitzTable/ToolBar/Modal/index.mjs +49 -12
  141. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +20 -9
  142. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +48 -2
  143. package/dist/components/BitzTable/ToolBar/style.mjs +6 -1
  144. package/dist/components/BitzTableOperations/index.mjs +13 -3
  145. package/dist/components/BitzTableSelect/Picker/index.mjs +43 -10
  146. package/dist/components/BitzTableSelect/Select/index.mjs +87 -21
  147. package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +30 -20
  148. package/dist/components/BitzTableSelect/SelectPopup/index.mjs +239 -61
  149. package/dist/components/BitzTableSelect/TableCell/index.mjs +49 -8
  150. package/dist/components/BitzTableSelect/TextBlock/index.mjs +23 -5
  151. package/dist/components/BitzTableSelect/index.mjs +61 -13
  152. package/dist/components/BitzTag/index.mjs +1 -1
  153. package/dist/components/BitzTheme/index.mjs +6 -6
  154. package/dist/components/BitzTimeline/index.mjs +11 -1
  155. package/dist/components/BitzTimer/Form.mjs +32 -11
  156. package/dist/components/BitzTimer/Timer.mjs +76 -38
  157. package/dist/components/BitzTimer/index.mjs +66 -43
  158. package/dist/components/BitzToast/Toast/index.mjs +28 -10
  159. package/dist/components/BitzToast/index.mjs +1 -1
  160. package/dist/components/BitzTree/index.mjs +4 -1
  161. package/dist/components/BitzUeEditor/index.mjs +5 -5
  162. package/dist/components/BitzUpload/index.mjs +81 -43
  163. package/dist/components/BitzWebAppDrawer/index.mjs +35 -4
  164. package/dist/components/BitzWebAppModal/index.mjs +6 -3
  165. package/dist/hooks/use-event-listener.mjs +11 -2
  166. package/dist/hooks/use-lock-fn.mjs +13 -10
  167. package/dist/hooks/use-scroll-parent.mjs +16 -14
  168. package/dist/hooks/useEvent.mjs +7 -4
  169. package/dist/hooks/useMergedState.mjs +11 -11
  170. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs +292 -292
  171. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs +13 -13
  172. package/dist/style.css +1 -1
  173. package/dist/utils/WithFluent.mjs +27 -12
  174. package/dist/utils/create.mjs +7 -1
  175. package/dist/utils/time.mjs +1 -1
  176. package/package.json +1 -1
@@ -1,4 +1,14 @@
1
- const j = ({ height: v, fontFamily: w, evenRowBgColor: e, colorBgContainer: I, table: o, gap: R, borderColor: u, scrollbarWidth: y, other: V }) => {
1
+ const j = ({
2
+ height: v,
3
+ fontFamily: w,
4
+ evenRowBgColor: e,
5
+ colorBgContainer: I,
6
+ table: o,
7
+ gap: R,
8
+ borderColor: u,
9
+ scrollbarWidth: y,
10
+ other: V
11
+ }) => {
2
12
  var i, h, g, x, r, n, T, p, s, d, $, H, m, S, C, f, k, z, B, c;
3
13
  return {
4
14
  height: v,
@@ -7,10 +7,17 @@ function O(l) {
7
7
  return o != null && o.isOperationCol || o != null && o.isCheckboxCol || o != null && o.isExpandIconCol || I.includes(o) ? o : (e != null && e.children && (e.children = O(e == null ? void 0 : e.children)), {
8
8
  ...e,
9
9
  sorter: !1,
10
- render: (c, d, t) => p.jsx(a, { active: !0, title: !1, paragraph: {
11
- rows: 1,
12
- width: (t + 1) % 2 === 0 ? "100%" : "60%"
13
- } })
10
+ render: (c, d, t) => /* @__PURE__ */ p.jsx(
11
+ a,
12
+ {
13
+ active: !0,
14
+ title: !1,
15
+ paragraph: {
16
+ rows: 1,
17
+ width: (t + 1) % 2 === 0 ? "100%" : "60%"
18
+ }
19
+ }
20
+ )
14
21
  });
15
22
  });
16
23
  }
@@ -1,8 +1,8 @@
1
1
  import { j as e } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { Segmented as _, message as V } from "antd";
3
- import { useState as m, useContext as w, useRef as j, useMemo as $ } from "react";
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
4
  import { BitzTableContext as ee } from "../../Store/index.mjs";
5
- import A from "../../../BitzButton/index.mjs";
5
+ import L from "../../../BitzButton/index.mjs";
6
6
  import te from "../../../BitzTheme/index.mjs";
7
7
  import oe from "./StylesConfig/index.mjs";
8
8
  import re from "./ColumnsSort/index.mjs";
@@ -11,29 +11,49 @@ import { BitzConfigContext as ne } from "../../../BitzConfigProvider/context.mjs
11
11
  import le from "../Modal/index.mjs";
12
12
  import ie from "../../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
13
13
  import ae from "../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
14
- const fe = "导出设置", he = ({ open: H, title: L, onChange: n, close: l, getContainer: I }) => {
14
+ const fe = "导出设置", he = ({
15
+ open: A,
16
+ title: D,
17
+ onChange: n,
18
+ close: l,
19
+ getContainer: I
20
+ }) => {
15
21
  const { token: T } = te.useToken(), [i, a] = m(1), [q, c] = m(!1);
16
22
  m(!1);
17
- const [G, o] = m(!1), { persistenceType: J, persistenceKey: R, onlineChange: u, setColumnsMap: N, stylesStorageType: P, stylesStorageKey: b, setTableStylesConfig: p, onlineStylesConfigChange: g, defaultTableExportConfig: Q, exportStorageType: U, exportStorageKey: h, setTableExportConfig: W, onlineExportConfigChange: d } = w(ee), r = w(ne).Table, s = j(null), k = j(null), x = j(null), X = async () => {
18
- var B, v, z, D, E, F, K, M, O;
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;
19
39
  if (G)
20
40
  return;
21
41
  o(!0);
22
- const t = (B = s.current) == null ? void 0 : B.getCheckedKeys();
42
+ const t = (v = s.current) == null ? void 0 : v.getCheckedKeys();
23
43
  if (!(t != null && t.length)) {
24
- a(2), V.error("表格至少需要显示一列"), o(!1);
44
+ a(2), w.error("表格至少需要显示一列"), o(!1);
25
45
  return;
26
46
  }
27
- if (!((v = x.current) == null ? void 0 : v.hasOne())) {
28
- a(3), V.error("导出设置至少需要一个字段"), o(!1);
47
+ if (!((z = x.current) == null ? void 0 : z.hasOne())) {
48
+ a(3), w.error("导出设置至少需要一个字段"), o(!1);
29
49
  return;
30
50
  }
31
- const y = (z = k.current) == null ? void 0 : z.getFormInstance(), f = await (y == null ? void 0 : y.getFieldsValue()), Z = ae(f, "stylesScope"), C = {
32
- ...(D = s.current) == null ? void 0 : D.getLeftSortColumns(),
33
- ...(E = s.current) == null ? void 0 : E.getCenterSortColumns(),
34
- ...(F = s.current) == null ? void 0 : F.getRightSortColumns()
35
- }, S = ((K = x.current) == null ? void 0 : K.getExportConfig()) ?? Q;
36
- p == null || p(Z), (M = r == null ? void 0 : r.setStylesScope) == null || M.call(r, f.stylesScope ? "global" : "current"), N(C), W(S), P === "online" && b && (g == null || g(b, f)), J === "online" && R && (u == null || u(R, C)), U === "online" && h && (d == null || d(h, S)), o(!1), n ? (c(!0), (O = n == null ? void 0 : n(f, C, S)) == null || O.finally(() => {
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(() => {
37
57
  c(!1), l();
38
58
  })) : l();
39
59
  };
@@ -41,18 +61,62 @@ const fe = "导出设置", he = ({ open: H, title: L, onChange: n, close: l, get
41
61
  const Y = () => {
42
62
  a(1), c(!1), o(!1);
43
63
  };
44
- return e.jsx(le, { open: H, title: L, close: l, closeAfter: Y, getContainer: I, footer: e.jsxs(e.Fragment, { children: [e.jsx(A, {
45
- type: "primary",
46
- icon: e.jsx(ie, {}),
47
- onClick: X,
48
- // disabled={!isEdit}
49
- loading: q,
50
- children: "保存"
51
- }), e.jsx(A, { onClick: l, children: "取消" })] }), extra: e.jsx(_, { size: "large", options: [
52
- { label: "外观设置", value: 1 },
53
- { label: "列设置", value: 2 },
54
- { label: fe, value: 3 }
55
- ], value: i, onChange: a }), children: (t) => e.jsxs(e.Fragment, { children: [e.jsx(oe, { ref: k, display: i === 1 }), e.jsx(re, { parentHeight: t, ref: s, display: i === 2 }), e.jsx(se, { parentHeight: t, refInstance: x, display: i === 3, showSelectRadio: !1 })] }) });
64
+ return /* @__PURE__ */ e.jsx(
65
+ le,
66
+ {
67
+ open: A,
68
+ title: D,
69
+ close: l,
70
+ closeAfter: Y,
71
+ getContainer: I,
72
+ footer: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
73
+ /* @__PURE__ */ e.jsx(
74
+ L,
75
+ {
76
+ type: "primary",
77
+ icon: /* @__PURE__ */ e.jsx(ie, {}),
78
+ onClick: X,
79
+ loading: q,
80
+ children: "保存"
81
+ }
82
+ ),
83
+ /* @__PURE__ */ e.jsx(L, { onClick: l, children: "取消" })
84
+ ] }),
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(
101
+ re,
102
+ {
103
+ parentHeight: t,
104
+ ref: s,
105
+ display: i === 2
106
+ }
107
+ ),
108
+ /* @__PURE__ */ e.jsx(
109
+ se,
110
+ {
111
+ parentHeight: t,
112
+ refInstance: x,
113
+ display: i === 3,
114
+ showSelectRadio: !1
115
+ }
116
+ )
117
+ ] })
118
+ }
119
+ );
56
120
  };
57
121
  export {
58
122
  he as default,
@@ -1,8 +1,8 @@
1
1
  import { j as o } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import F, { useState as M, useMemo as O } from "react";
3
- import { useSortable as k } from "../../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
4
- import { CSS as v } 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 _, Tooltip as $ } from "antd";
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
6
  import q from "../../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
7
7
  import A from "../../../../../assets/iconfont/IconDragOrder.mjs";
8
8
  import x from "../../../../../assets/iconfont/IconColumnFixedLeft.mjs";
@@ -39,22 +39,51 @@ import "../../../../../assets/iconfont/IconShanchu.mjs";
39
39
  import "../../../../../assets/iconfont/IconTuodong.mjs";
40
40
  const j = ({ icon: t, className: n, open: r, title: e, onClick: i }) => {
41
41
  const { token: s } = I.useToken();
42
- return o.jsx($, { getTooltipContainer: (p) => p.parentElement, title: e, open: r ? !1 : void 0, children: o.jsx(t, { size: s.fontSize + 4, className: n, onClick: i }) });
43
- }, B = ({ item: t, isDragOverlay: n, placement: r, onLeftClick: e, onRightClick: i, onCheckboxChange: s }) => {
44
- const { attributes: p, isDragging: m, setNodeRef: S, listeners: y, transform: N, transition: T } = k({
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(
49
+ t,
50
+ {
51
+ size: s.fontSize + 4,
52
+ className: n,
53
+ onClick: i
54
+ }
55
+ )
56
+ }
57
+ );
58
+ }, B = ({
59
+ item: t,
60
+ isDragOverlay: n,
61
+ placement: r,
62
+ onLeftClick: e,
63
+ onRightClick: i,
64
+ onCheckboxChange: s
65
+ }) => {
66
+ const {
67
+ attributes: p,
68
+ isDragging: m,
69
+ setNodeRef: S,
70
+ listeners: y,
71
+ transform: N,
72
+ transition: T
73
+ } = O({
45
74
  id: t == null ? void 0 : t.key
46
75
  // disabled: item?.disabled,
47
76
  }), { token: w } = I.useToken(), z = {
48
77
  transition: T,
49
- transform: v.Transform.toString(N),
78
+ transform: _.Transform.toString(N),
50
79
  ...m && {
51
80
  opacity: 0.6
52
81
  }
53
82
  }, D = ({ target: l }) => {
54
83
  s == null || s(t.key, l.checked);
55
- }, [a, E] = M(!1), c = (l) => {
84
+ }, [a, E] = v(!1), c = (l) => {
56
85
  E(l);
57
- }, { text: f, icon: u } = O(() => r === "left" ? {
86
+ }, { text: f, icon: u } = M(() => r === "left" ? {
58
87
  text: {
59
88
  left: "取消固定",
60
89
  right: "固定在右侧"
@@ -82,18 +111,64 @@ const j = ({ icon: t, className: n, open: r, title: e, onClick: i }) => {
82
111
  right: h
83
112
  }
84
113
  }, [r]);
85
- return o.jsxs("div", { className: q({ sortItemDragging: m }, "sortItem", {
86
- showSortItemOperat: a && !n
87
- }), style: z, ref: S, onMouseEnter: () => c(!0), onMouseLeave: () => c(!1), ...p, children: [o.jsx(d, { align: "center", className: "dragIcon", ...y, children: o.jsx(A, { size: w.fontSize + 4 }) }), o.jsx(_, {
88
- checked: t.show,
89
- // className={checkboxCls}
90
- onChange: D,
91
- title: t.title,
92
- children: t.title
93
- }), o.jsxs(d, { style: {
94
- height: "100%",
95
- display: a && !n ? "flex" : "none"
96
- }, align: "center", className: "operation pointerCursor", children: [o.jsx(j, { className: "leftOperation", title: f.left, open: m, icon: u.left, onClick: () => e == null ? void 0 : e(t.key, r) }), o.jsx(j, { className: "rightOperation", title: f.right, open: m, icon: u.right, onClick: () => i == null ? void 0 : i(t.key, r) })] })] });
114
+ return /* @__PURE__ */ o.jsxs(
115
+ "div",
116
+ {
117
+ className: q({ sortItemDragging: m }, "sortItem", {
118
+ showSortItemOperat: a && !n
119
+ }),
120
+ style: z,
121
+ ref: S,
122
+ onMouseEnter: () => c(!0),
123
+ onMouseLeave: () => c(!1),
124
+ ...p,
125
+ children: [
126
+ /* @__PURE__ */ o.jsx(d, { align: "center", className: "dragIcon", ...y, children: /* @__PURE__ */ o.jsx(A, { size: w.fontSize + 4 }) }),
127
+ /* @__PURE__ */ o.jsx(
128
+ k,
129
+ {
130
+ checked: t.show,
131
+ onChange: D,
132
+ title: t.title,
133
+ children: t.title
134
+ }
135
+ ),
136
+ /* @__PURE__ */ o.jsxs(
137
+ d,
138
+ {
139
+ style: {
140
+ height: "100%",
141
+ display: a && !n ? "flex" : "none"
142
+ },
143
+ align: "center",
144
+ className: "operation pointerCursor",
145
+ children: [
146
+ /* @__PURE__ */ o.jsx(
147
+ j,
148
+ {
149
+ className: "leftOperation",
150
+ title: f.left,
151
+ open: m,
152
+ icon: u.left,
153
+ onClick: () => e == null ? void 0 : e(t.key, r)
154
+ }
155
+ ),
156
+ /* @__PURE__ */ o.jsx(
157
+ j,
158
+ {
159
+ className: "rightOperation",
160
+ title: f.right,
161
+ open: m,
162
+ icon: u.right,
163
+ onClick: () => i == null ? void 0 : i(t.key, r)
164
+ }
165
+ )
166
+ ]
167
+ }
168
+ )
169
+ ]
170
+ }
171
+ );
97
172
  }, Tt = F.memo(B);
98
173
  export {
99
174
  Tt as default
@@ -1,17 +1,26 @@
1
1
  import { j as s } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { genColumnKey as S, columnSort as w } from "../../../Store/utils/index.mjs";
3
- import { DndContext as k, closestCenter as E, DragOverlay as I } from "../../../../../node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs";
4
- import { restrictToVerticalAxis as K, restrictToWindowEdges as A } from "../../../../../node_modules/.store/@dnd-kit_modifiers@6.0.1/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs";
5
- import { SortableContext as N, verticalListSortingStrategy as O, arrayMove as R } from "../../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
6
- import { Flex as T } from "antd";
7
- import { useMemo as F, useState as V } from "react";
8
- import g from "./DndItem.mjs";
2
+ import { genColumnKey as w, columnSort as S } from "../../../Store/utils/index.mjs";
3
+ import { DndContext as I, closestCenter as E, DragOverlay as K } from "../../../../../node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs";
4
+ import { restrictToVerticalAxis as k, restrictToWindowEdges as A } from "../../../../../node_modules/.store/@dnd-kit_modifiers@6.0.1/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs";
5
+ import { SortableContext as N, verticalListSortingStrategy as O, arrayMove as T } from "../../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
6
+ import { Flex as F } from "antd";
7
+ import { useMemo as R, useState as V } from "react";
8
+ import u from "./DndItem.mjs";
9
9
  import W from "../../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
10
- const U = ({ placement: h, dataList: t, keys: d, columnsMap: c, onLeftClick: u, onRightClick: p, onChange: C, onMoveEnd: D }) => {
11
- const x = F(() => {
10
+ const U = ({
11
+ placement: g,
12
+ dataList: t,
13
+ keys: d,
14
+ columnsMap: c,
15
+ onLeftClick: h,
16
+ onRightClick: p,
17
+ onChange: j,
18
+ onMoveEnd: v
19
+ }) => {
20
+ const x = R(() => {
12
21
  const e = [];
13
- return t != null && t.length && (t == null || t.map((o) => {
14
- const { key: r, dataIndex: l, ...m } = o, a = S(o, [r || l].join("-")), n = c[a || "null"];
22
+ return t != null && t.length && (t == null || t.map((r) => {
23
+ const { key: o, dataIndex: l, ...m } = r, a = w(r, [o || l].join("-")), n = c[a || "null"];
15
24
  return e.push({
16
25
  key: a,
17
26
  ...W(m, ["className"]),
@@ -19,29 +28,59 @@ const U = ({ placement: h, dataList: t, keys: d, columnsMap: c, onLeftClick: u,
19
28
  disabled: (n == null ? void 0 : n.disabled) === !0,
20
29
  show: n == null ? void 0 : n.show
21
30
  }), n;
22
- })), e.sort(w(c));
23
- }, [c, t]), [i, f] = V(-1), j = (e) => {
24
- const { active: o } = e;
25
- o && f(o.data.current.sortable.index);
26
- }, v = (e) => {
27
- const { over: o } = e;
28
- if (o) {
29
- const r = o.data.current.sortable.index;
30
- i !== r && (y(i, r), f(-1));
31
+ })), e.sort(S(c));
32
+ }, [c, t]), [i, f] = V(-1), y = (e) => {
33
+ const { active: r } = e;
34
+ r && f(r.data.current.sortable.index);
35
+ }, D = (e) => {
36
+ const { over: r } = e;
37
+ if (r) {
38
+ const o = r.data.current.sortable.index;
39
+ i !== o && (C(i, o), f(-1));
31
40
  }
32
- }, y = (e, o) => {
33
- const r = {}, l = R(d, e, o);
41
+ }, C = (e, r) => {
42
+ const o = {}, l = T(d, e, r);
34
43
  l.forEach((m, a) => {
35
- r[m] = { ...c[m], order: a };
36
- }), D(r, l);
37
- }, b = (e, o) => {
38
- const r = { ...c };
39
- r[e] = { ...r[e], show: o }, C(
40
- r
44
+ o[m] = { ...c[m], order: a };
45
+ }), v(o, l);
46
+ }, b = (e, r) => {
47
+ const o = { ...c };
48
+ o[e] = { ...o[e], show: r }, j(
49
+ o
41
50
  /*, newCheckedKeys*/
42
51
  );
43
52
  };
44
- return s.jsx(k, { modifiers: [K, A], collisionDetection: E, onDragStart: j, onDragEnd: v, onDragCancel: () => f(-1), children: s.jsx(N, { items: d, strategy: O, children: s.jsxs(T, { vertical: !0, className: "sortList", children: [x.map((e) => s.jsx(g, { item: e, placement: h, onLeftClick: u, onRightClick: p, onCheckboxChange: b }, e.key)), s.jsx(I, { children: i !== -1 && s.jsx(g, { item: x[i], isDragOverlay: !0 }, x[i].key) })] }) }) });
53
+ return /* @__PURE__ */ s.jsx(
54
+ I,
55
+ {
56
+ modifiers: [k, A],
57
+ collisionDetection: E,
58
+ onDragStart: y,
59
+ onDragEnd: D,
60
+ onDragCancel: () => f(-1),
61
+ children: /* @__PURE__ */ s.jsx(N, { items: d, strategy: O, children: /* @__PURE__ */ s.jsxs(F, { vertical: !0, className: "sortList", children: [
62
+ x.map((e) => /* @__PURE__ */ s.jsx(
63
+ u,
64
+ {
65
+ item: e,
66
+ placement: g,
67
+ onLeftClick: h,
68
+ onRightClick: p,
69
+ onCheckboxChange: b
70
+ },
71
+ e.key
72
+ )),
73
+ /* @__PURE__ */ s.jsx(K, { children: i !== -1 && /* @__PURE__ */ s.jsx(
74
+ u,
75
+ {
76
+ item: x[i],
77
+ isDragOverlay: !0
78
+ },
79
+ x[i].key
80
+ ) })
81
+ ] }) })
82
+ }
83
+ );
45
84
  };
46
85
  export {
47
86
  U as default