bitz-react-admin-ui 2.5.9 → 2.6.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 (183) hide show
  1. package/dist/assets/iconfont/IconChenggong.mjs +25 -4
  2. package/dist/assets/iconfont/IconClose.mjs +24 -3
  3. package/dist/assets/iconfont/IconColumnCancelFixed.mjs +23 -2
  4. package/dist/assets/iconfont/IconColumnFixedLeft.mjs +27 -6
  5. package/dist/assets/iconfont/IconColumnFixedRight.mjs +27 -6
  6. package/dist/assets/iconfont/IconCuowu.mjs +23 -2
  7. package/dist/assets/iconfont/IconDragOrder.mjs +25 -4
  8. package/dist/assets/iconfont/IconDuigoux.mjs +25 -4
  9. package/dist/assets/iconfont/IconFabu.mjs +35 -5
  10. package/dist/assets/iconfont/IconFanhui.mjs +25 -4
  11. package/dist/assets/iconfont/IconGaojisousuo.mjs +26 -5
  12. package/dist/assets/iconfont/IconHangfengexian.mjs +41 -3
  13. package/dist/assets/iconfont/IconHangliefengexian.mjs +42 -4
  14. package/dist/assets/iconfont/IconIcFluentHomeRegular.mjs +26 -5
  15. package/dist/assets/iconfont/IconIcon21.mjs +25 -4
  16. package/dist/assets/iconfont/IconJincoude.mjs +25 -4
  17. package/dist/assets/iconfont/IconJinggao.mjs +25 -4
  18. package/dist/assets/iconfont/IconKuansongde.mjs +26 -5
  19. package/dist/assets/iconfont/IconLiefengexian.mjs +41 -3
  20. package/dist/assets/iconfont/IconMore.mjs +41 -4
  21. package/dist/assets/iconfont/IconShanchu.mjs +27 -6
  22. package/dist/assets/iconfont/IconShanchu1.mjs +35 -5
  23. package/dist/assets/iconfont/IconSousuo.mjs +27 -6
  24. package/dist/assets/iconfont/IconTejincou.mjs +25 -4
  25. package/dist/assets/iconfont/IconTekuansong.mjs +26 -5
  26. package/dist/assets/iconfont/IconTishi1.mjs +27 -6
  27. package/dist/assets/iconfont/IconTuodong.mjs +28 -7
  28. package/dist/assets/iconfont/IconWubanmawentianchong.mjs +35 -3
  29. package/dist/assets/iconfont/IconWufengexian.mjs +26 -4
  30. package/dist/assets/iconfont/IconXinxitishi.mjs +27 -6
  31. package/dist/assets/iconfont/IconYoubanmawentianchong.mjs +34 -3
  32. package/dist/assets/iconfont/IconZhongdengde.mjs +24 -3
  33. package/dist/assets/iconfont/IconZhongzhi.mjs +24 -3
  34. package/dist/assets/iconfont/index.mjs +33 -33
  35. package/dist/components/BitzAddTag/index.mjs +41 -8
  36. package/dist/components/BitzAddressBook/index.mjs +122 -35
  37. package/dist/components/BitzAppPage/index.mjs +18 -4
  38. package/dist/components/BitzAppRefresh/index.mjs +27 -15
  39. package/dist/components/BitzBetterScroll/index.mjs +5 -5
  40. package/dist/components/BitzButton/index.mjs +23 -9
  41. package/dist/components/BitzCalendar/index.mjs +52 -19
  42. package/dist/components/BitzCascader/BitzCascaderMobile.mjs +68 -30
  43. package/dist/components/BitzCascader/index.mjs +6 -2
  44. package/dist/components/BitzCollapse/index.mjs +4 -4
  45. package/dist/components/BitzConfigProvider/context.mjs +3 -1
  46. package/dist/components/BitzConfigProvider/index.mjs +12 -8
  47. package/dist/components/BitzConfirmModal/index.mjs +24 -1
  48. package/dist/components/BitzDescriptions/index.mjs +11 -1
  49. package/dist/components/BitzDrawer/index.mjs +17 -2
  50. package/dist/components/BitzEmpty/index.mjs +6 -2
  51. package/dist/components/BitzException/index.mjs +6 -1
  52. package/dist/components/BitzFloatLayout/index.mjs +10 -1
  53. package/dist/components/BitzFluentDatePicker/index.mjs +1 -1
  54. package/dist/components/BitzFluentRangePicker/index.mjs +1 -1
  55. package/dist/components/BitzFluentRangeTimePicker/index.mjs +1 -1
  56. package/dist/components/BitzFluentTimePicker/index.mjs +1 -1
  57. package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +13 -16
  58. package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +26 -20
  59. package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +21 -3
  60. package/dist/components/BitzFuiCalendar/CalendarBody.mjs +27 -4
  61. package/dist/components/BitzFuiCalendar/CalendarHead.mjs +5 -2
  62. package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +12 -3
  63. package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +47 -15
  64. package/dist/components/BitzFuiCalendar/ColumnData.mjs +25 -9
  65. package/dist/components/BitzFuiCalendar/FuiCalendarItem.mjs +44 -8
  66. package/dist/components/BitzFuiCalendar/index.mjs +7 -1
  67. package/dist/components/BitzFullScreen/index.mjs +9 -6
  68. package/dist/components/BitzHighlight/Child.mjs +23 -9
  69. package/dist/components/BitzHighlight/Highlight.mjs +26 -5
  70. package/dist/components/BitzHighlight/chunks.mjs +20 -17
  71. package/dist/components/BitzHighlight/style.mjs +4 -1
  72. package/dist/components/BitzImage/index.mjs +1 -1
  73. package/dist/components/BitzImage/previewImage.mjs +12 -5
  74. package/dist/components/BitzLanguageTabs/index.mjs +14 -3
  75. package/dist/components/BitzLazyLoad/index.mjs +7 -1
  76. package/dist/components/BitzList/List.mjs +17 -3
  77. package/dist/components/BitzList/LoadMore.mjs +29 -20
  78. package/dist/components/BitzLoadMore/index.mjs +34 -14
  79. package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +24 -11
  80. package/dist/components/BitzMeetingTime/index.mjs +10 -6
  81. package/dist/components/BitzMobileLoading/index.mjs +1 -1
  82. package/dist/components/BitzModal/index.mjs +24 -11
  83. package/dist/components/BitzNoData/index.mjs +4 -1
  84. package/dist/components/BitzNoMore/index.mjs +1 -1
  85. package/dist/components/BitzOrganizationSelection/index.mjs +43 -14
  86. package/dist/components/BitzPageContainer/index.mjs +107 -46
  87. package/dist/components/BitzPageHeader/index.mjs +89 -21
  88. package/dist/components/BitzPagination/index.mjs +71 -22
  89. package/dist/components/BitzPopover/index.mjs +4 -4
  90. package/dist/components/BitzPullRefresh/PullRefresh.mjs +47 -18
  91. package/dist/components/BitzQRCode/index.mjs +6 -1
  92. package/dist/components/BitzQueryFilter/QueryFilterContent.mjs +35 -17
  93. package/dist/components/BitzQueryFilter/QueryFilterDrawer.mjs +20 -13
  94. package/dist/components/BitzQueryFilter/QueryFilterMobile.mjs +4 -1
  95. package/dist/components/BitzQueryFilter/index.mjs +69 -20
  96. package/dist/components/BitzRefresh/index.mjs +5 -1
  97. package/dist/components/BitzRemark/index.mjs +4 -4
  98. package/dist/components/BitzScheduleCenter/index.mjs +24 -30
  99. package/dist/components/BitzSearch/index.mjs +1 -1
  100. package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +123 -48
  101. package/dist/components/BitzSelect/index.mjs +1 -1
  102. package/dist/components/BitzSkeleton/index.mjs +31 -1
  103. package/dist/components/BitzSwitch/index.mjs +7 -2
  104. package/dist/components/BitzTabbar/BitzTabbar.mjs +25 -8
  105. package/dist/components/BitzTabbar/BitzTabbarItem.mjs +4 -1
  106. package/dist/components/BitzTable/ActionBar/ActionBar.mjs +80 -12
  107. package/dist/components/BitzTable/ActionBar/Button.mjs +20 -15
  108. package/dist/components/BitzTable/ActionBar/style.mjs +12 -9
  109. package/dist/components/BitzTable/ActionCol/index.mjs +129 -33
  110. package/dist/components/BitzTable/ActionCol/style.mjs +15 -12
  111. package/dist/components/BitzTable/Dropdown/index.mjs +8 -1
  112. package/dist/components/BitzTable/Dropdown/style.mjs +9 -6
  113. package/dist/components/BitzTable/SelectionBar/Button.mjs +19 -6
  114. package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +11 -4
  115. package/dist/components/BitzTable/SelectionBar/style.mjs +18 -8
  116. package/dist/components/BitzTable/Store/index.mjs +170 -133
  117. package/dist/components/BitzTable/Store/utils/index.d.ts +1 -0
  118. package/dist/components/BitzTable/Store/utils/index.mjs +48 -38
  119. package/dist/components/BitzTable/SubTable/index.mjs +91 -43
  120. package/dist/components/BitzTable/Table/ResizableTitle copy.mjs +57 -40
  121. package/dist/components/BitzTable/Table/SortTableContext.mjs +39 -17
  122. package/dist/components/BitzTable/Table/SortableRow.mjs +44 -20
  123. package/dist/components/BitzTable/Table/index.mjs +476 -213
  124. package/dist/components/BitzTable/Table/style.mjs +10 -1
  125. package/dist/components/BitzTable/Table/utils.mjs +11 -4
  126. package/dist/components/BitzTable/TextOverflow/index.mjs +12 -3
  127. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +83 -27
  128. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +104 -23
  129. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +68 -29
  130. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +278 -150
  131. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +50 -16
  132. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +42 -16
  133. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +129 -38
  134. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +9 -2
  135. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +97 -43
  136. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +28 -6
  137. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +38 -9
  138. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +42 -14
  139. package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +17 -4
  140. package/dist/components/BitzTable/ToolBar/Modal/index.mjs +37 -8
  141. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +20 -9
  142. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +49 -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 +90 -21
  147. package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +23 -13
  148. package/dist/components/BitzTableSelect/SelectPopup/index.mjs +219 -69
  149. package/dist/components/BitzTableSelect/SingleSelect/index.mjs +87 -22
  150. package/dist/components/BitzTableSelect/TableCell/index.mjs +52 -11
  151. package/dist/components/BitzTableSelect/TextBlock/index.mjs +30 -12
  152. package/dist/components/BitzTableSelect/index.mjs +65 -14
  153. package/dist/components/BitzTableSelect/utils.mjs +3 -3
  154. package/dist/components/BitzTag/index.mjs +1 -1
  155. package/dist/components/BitzText/index.mjs +41 -14
  156. package/dist/components/BitzText/utils.mjs +3 -3
  157. package/dist/components/BitzTheme/index.mjs +6 -6
  158. package/dist/components/BitzTimeline/index.mjs +11 -1
  159. package/dist/components/BitzTimer/Form.mjs +32 -11
  160. package/dist/components/BitzTimer/Timer.mjs +76 -38
  161. package/dist/components/BitzTimer/index.mjs +66 -43
  162. package/dist/components/BitzToast/Toast/index.mjs +28 -10
  163. package/dist/components/BitzToast/index.mjs +1 -1
  164. package/dist/components/BitzTooltip/index.mjs +47 -17
  165. package/dist/components/BitzTooltip/style.mjs +9 -6
  166. package/dist/components/BitzTooltip/utils.mjs +2 -2
  167. package/dist/components/BitzTree/index.mjs +4 -1
  168. package/dist/components/BitzUeEditor/index.mjs +5 -5
  169. package/dist/components/BitzUpload/index.mjs +81 -43
  170. package/dist/components/BitzWebAppDrawer/index.mjs +35 -4
  171. package/dist/components/BitzWebAppModal/index.mjs +6 -3
  172. package/dist/hooks/use-event-listener.mjs +11 -2
  173. package/dist/hooks/use-lock-fn.mjs +13 -10
  174. package/dist/hooks/use-scroll-parent.mjs +16 -14
  175. package/dist/hooks/useEvent.mjs +7 -4
  176. package/dist/hooks/useMergedState.mjs +11 -11
  177. package/dist/node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useDebounceFn/index.mjs +29 -0
  178. package/dist/node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/utils/lodash-polyfill.mjs +7 -0
  179. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/debounce.mjs +37 -34
  180. package/dist/style.css +1 -1
  181. package/dist/utils/WithFluent.mjs +27 -5
  182. package/dist/utils/create.mjs +7 -1
  183. package/package.json +1 -1
@@ -1,159 +1,287 @@
1
1
  import { j as l } from "../../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
- import { findParentFirstNodeByClass as pe } from "../../../../../utils/findNode.mjs";
3
- import { css as me } from "../../../../../node_modules/.store/@emotion_css@11.11.2/node_modules/@emotion/css/dist/emotion-css.esm.mjs";
4
- import { theme as ge, Flex as T, Typography as P, Space as xe, Checkbox as Ce, Button as ye } from "antd";
5
- import { forwardRef as ke, useRef as Le, useState as m, useEffect as D, useMemo as M, useContext as we, useImperativeHandle as Me, memo as Se } from "react";
6
- import { useImmer as je } from "../../../../../node_modules/.store/use-immer@0.9.0/node_modules/use-immer/dist/use-immer.module.mjs";
2
+ import { findParentFirstNodeByClass as Ce } from "../../../../../utils/findNode.mjs";
3
+ import { css as te } from "../../../../../node_modules/.store/@emotion_css@11.11.2/node_modules/@emotion/css/dist/emotion-css.esm.mjs";
4
+ import { theme as ye, Flex as O, Typography as G, Space as ke, Checkbox as we, Button as se } from "antd";
5
+ import { forwardRef as Me, useRef as Se, useState as u, useEffect as P, useMemo as S, useContext as je, useImperativeHandle as Le, memo as be } from "react";
6
+ import { useImmer as Ke } from "../../../../../node_modules/.store/use-immer@0.9.0/node_modules/use-immer/dist/use-immer.module.mjs";
7
7
  import "../../../index.mjs";
8
- import { columnSort as be, genColumnKey as Ke, updateNestedObject as S } from "../../../Store/utils/index.mjs";
9
- import $ from "./DndList.mjs";
10
- import { BitzTableContext as Re } from "../../../Store/index.mjs";
11
- import Ee from "../../../../../node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/RedoOutlined.mjs";
12
- import Ne from "../../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
13
- const Ae = ke(({ display: q }, ee) => {
14
- const { token: te } = ge.useToken(), A = Le(null), [z, se] = m("auto");
15
- D(() => {
16
- const e = pe(A.current, "ant-card-body");
17
- if (e) {
18
- const { paddingBlockStart: s, paddingBlockEnd: t } = window.getComputedStyle(e), o = parseInt(s) + parseInt(t), n = e.clientHeight - o, c = e.firstElementChild;
19
- if (c) {
20
- const { rowGap: r } = window.getComputedStyle(c), i = c == null ? void 0 : c.querySelector(".extraContent"), p = i == null ? void 0 : i.clientHeight, a = n - p - parseInt(r), { rowGap: _ } = window.getComputedStyle(A.current), H = a - parseInt(_) - 36;
21
- se(H);
8
+ import { columnSort as Re, genColumnKey as ve, updateNestedObject as j, removePropertiesWithoutMutation as Ne } from "../../../Store/utils/index.mjs";
9
+ import W from "./DndList.mjs";
10
+ import { BitzTableContext as Ee } from "../../../Store/index.mjs";
11
+ import oe from "../../../../../node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/RedoOutlined.mjs";
12
+ import Ie from "../../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
13
+ import He from "../../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
14
+ const Te = Me(
15
+ ({ display: q }, ne) => {
16
+ const { token: J } = ye.useToken(), E = Se(null), [A, re] = u("auto");
17
+ P(() => {
18
+ const e = Ce(E.current, "ant-card-body");
19
+ if (e) {
20
+ const { paddingBlockStart: s, paddingBlockEnd: t } = window.getComputedStyle(e), n = parseInt(s) + parseInt(t), o = e.clientHeight - n, r = e.firstElementChild;
21
+ if (r) {
22
+ const { rowGap: c } = window.getComputedStyle(r), a = r == null ? void 0 : r.querySelector(".extraContent"), f = a == null ? void 0 : a.clientHeight, d = o - f - parseInt(c), { rowGap: ee } = window.getComputedStyle(E.current), z = d - parseInt(ee) - 36;
23
+ re(z);
24
+ }
22
25
  }
23
- }
24
- }, [A.current]);
25
- const ne = M(() => ({
26
- display: q ? "flex" : "none",
27
- width: "100%"
28
- }), [q]), { defaultColumnKeyMap: J, baseColumns: Q, columnsMap: U } = we(Re), [d, V] = je({});
29
- D(() => {
30
- const e = Object.keys(U).length ? U : J;
31
- V(e);
32
- }, []);
33
- const W = M(() => ((s, t) => s.map((o) => {
34
- var H;
35
- const { key: n, dataIndex: c, children: r, ...i } = o, p = Ke(o, [t == null ? void 0 : t.columnKey, i.index].join("-")), a = d[p || "null"] || {
36
- show: !0
37
- };
38
- return {
39
- key: p,
40
- ...Ne(i, ["className"]),
41
- selectable: !1,
42
- disabled: a.disabled === !0,
43
- disableCheckbox: typeof a.disabled == "boolean" ? a == null ? void 0 : a.disabled : (H = a == null ? void 0 : a.disabled) == null ? void 0 : H.checkbox,
44
- isLeaf: t ? !0 : void 0,
45
- ...a
46
- };
47
- }))(Q ?? []).sort(be(d)), [d, Q]);
48
- D(() => {
49
- var o, n;
50
- const e = {}, s = {}, t = {};
51
- for (const c in d)
52
- ((o = d[c]) == null ? void 0 : o.fixed) === "left" ? e[c] = d[c] : ((n = d[c]) == null ? void 0 : n.fixed) === "right" ? s[c] = d[c] : t[c] = d[c];
53
- g(e), x(s), C(t);
54
- }, [d]);
55
- const [j, I] = m([]), [y, b] = m([]), [h, g] = m({}), [K, B] = m([]), [k, R] = m([]), [u, x] = m({}), [E, F] = m([]), [L, N] = m([]), [f, C] = m({});
56
- D(() => {
57
- const e = [], s = [], t = [], o = [], n = [], c = [];
58
- W.forEach((r) => {
59
- r.fixed === "left" ? (e.push(r), s.push(r.key)) : r.fixed === "right" ? (t.push(r), o.push(r.key)) : (n.push(r), c.push(r.key));
60
- }), I(e), b(s), B(t), R(o), F(n), N(c);
61
- }, [W]);
62
- const oe = (e) => {
63
- g(e);
64
- }, ce = (e, s) => {
65
- g(e), b(s);
66
- }, re = (e) => {
67
- x(e);
68
- }, le = (e, s) => {
69
- x(e), R(s);
70
- }, ie = (e) => {
71
- C(e);
72
- }, ae = (e, s) => {
73
- C(e), N(s);
74
- }, X = (e, s, t, o) => {
75
- const n = { ...s[e] };
76
- delete s[e], C({
77
- ...f,
78
- [e]: { ...n, fixed: void 0, order: E.length }
79
- });
80
- const c = t.findIndex((p) => p.key === e), r = t.splice(c, 1)[0];
81
- F([...E, { ...r, fixed: void 0 }]);
82
- const i = o.splice(c, 1);
83
- return N([...L, ...i]), { map: s, list: t, keys: o };
84
- }, Y = (e, s, t, o) => {
85
- const n = { ...s[e] };
86
- delete s[e], g({
87
- ...h,
88
- [e]: { ...n, fixed: "left", order: j.length, show: !0 }
89
- });
90
- const c = t.findIndex((p) => p.key === e), r = t.splice(c, 1)[0];
91
- I([...j, { ...r, fixed: "left" }]);
92
- const i = o.splice(c, 1);
93
- return b([...y, ...i]), { map: s, list: t, keys: o };
94
- }, Z = (e, s, t, o) => {
95
- const n = { ...s[e] };
96
- delete s[e], x({
97
- ...u,
98
- [e]: {
99
- ...n,
100
- fixed: "right",
101
- order: K.length,
26
+ }, [E.current]);
27
+ const ce = S(() => ({
28
+ display: q ? "flex" : "none",
29
+ width: "100%"
30
+ }), [q]), { defaultColumnKeyMap: Q, baseColumns: U, columnsMap: V } = je(Ee), [i, D] = Ke({});
31
+ P(() => {
32
+ const e = Object.keys(V).length ? V : Q;
33
+ D(e);
34
+ }, []);
35
+ const X = S(() => ((s, t) => s.map((n) => {
36
+ var z;
37
+ const { key: o, dataIndex: r, children: c, ...a } = n, f = ve(
38
+ n,
39
+ [t == null ? void 0 : t.columnKey, a.index].join("-")
40
+ ), d = i[f || "null"] || {
102
41
  show: !0
42
+ };
43
+ return {
44
+ key: f,
45
+ ...Ie(a, ["className"]),
46
+ selectable: !1,
47
+ disabled: d.disabled === !0,
48
+ disableCheckbox: typeof d.disabled == "boolean" ? d == null ? void 0 : d.disabled : (z = d == null ? void 0 : d.disabled) == null ? void 0 : z.checkbox,
49
+ isLeaf: t ? !0 : void 0,
50
+ ...d
51
+ };
52
+ }))(U ?? []).sort(Re(i)), [i, U]);
53
+ P(() => {
54
+ var n, o;
55
+ const e = {}, s = {}, t = {};
56
+ for (const r in i)
57
+ ((n = i[r]) == null ? void 0 : n.fixed) === "left" ? e[r] = i[r] : ((o = i[r]) == null ? void 0 : o.fixed) === "right" ? s[r] = i[r] : t[r] = i[r];
58
+ g(e), x(s), C(t);
59
+ }, [i]);
60
+ const [L, I] = u([]), [y, b] = u([]), [h, g] = u({}), [K, H] = u([]), [k, R] = u([]), [m, x] = u({}), [v, T] = u([]), [w, N] = u([]), [p, C] = u({});
61
+ P(() => {
62
+ const e = [], s = [], t = [], n = [], o = [], r = [];
63
+ X.forEach((c) => {
64
+ c.fixed === "left" ? (e.push(c), s.push(c.key)) : c.fixed === "right" ? (t.push(c), n.push(c.key)) : (o.push(c), r.push(c.key));
65
+ }), I(e), b(s), H(t), R(n), T(o), N(r);
66
+ }, [X]);
67
+ const le = (e) => {
68
+ g(e);
69
+ }, ie = (e, s) => {
70
+ g(e), b(s);
71
+ }, ae = (e) => {
72
+ x(e);
73
+ }, de = (e, s) => {
74
+ x(e), R(s);
75
+ }, he = (e) => {
76
+ C(e);
77
+ }, me = (e, s) => {
78
+ C(e), N(s);
79
+ }, Y = (e, s, t, n) => {
80
+ const o = { ...s[e] };
81
+ delete s[e], C({
82
+ ...p,
83
+ [e]: { ...o, fixed: void 0, order: v.length }
84
+ });
85
+ const r = t.findIndex((f) => f.key === e), c = t.splice(r, 1)[0];
86
+ T([...v, { ...c, fixed: void 0 }]);
87
+ const a = n.splice(r, 1);
88
+ return N([...w, ...a]), { map: s, list: t, keys: n };
89
+ }, Z = (e, s, t, n) => {
90
+ const o = { ...s[e] };
91
+ delete s[e], g({
92
+ ...h,
93
+ [e]: { ...o, fixed: "left", order: L.length, show: !0 }
94
+ });
95
+ const r = t.findIndex((f) => f.key === e), c = t.splice(r, 1)[0];
96
+ I([...L, { ...c, fixed: "left" }]);
97
+ const a = n.splice(r, 1);
98
+ return b([...y, ...a]), { map: s, list: t, keys: n };
99
+ }, _ = (e, s, t, n) => {
100
+ const o = { ...s[e] };
101
+ delete s[e], x({
102
+ ...m,
103
+ [e]: {
104
+ ...o,
105
+ fixed: "right",
106
+ order: K.length,
107
+ show: !0
108
+ }
109
+ });
110
+ const r = t.findIndex((f) => f.key === e), c = t.splice(r, 1)[0];
111
+ H([...K, { ...c, fixed: "right" }]);
112
+ const a = n.splice(r, 1);
113
+ return R([...k, ...a]), { map: s, list: t, keys: n };
114
+ }, $ = (e, s) => {
115
+ if (s === "left") {
116
+ const { map: t, list: n, keys: o } = Y(
117
+ e,
118
+ h,
119
+ L,
120
+ y
121
+ );
122
+ g({ ...t }), I([...n]), b([...o]);
123
+ } else if (s === "center") {
124
+ const { map: t, list: n, keys: o } = Z(
125
+ e,
126
+ p,
127
+ v,
128
+ w
129
+ );
130
+ C({ ...t }), T([...n]), N([...o]);
131
+ } else {
132
+ const { map: t, list: n, keys: o } = Z(
133
+ e,
134
+ m,
135
+ K,
136
+ k
137
+ );
138
+ x({ ...t }), H([...n]), R([...o]);
139
+ }
140
+ }, F = (e, s) => {
141
+ if (s === "left") {
142
+ const { map: t, list: n, keys: o } = _(
143
+ e,
144
+ h,
145
+ L,
146
+ y
147
+ );
148
+ g({ ...t }), I([...n]), b([...o]);
149
+ } else if (s === "center") {
150
+ const { map: t, list: n, keys: o } = _(
151
+ e,
152
+ p,
153
+ v,
154
+ w
155
+ );
156
+ C({ ...t }), T([...n]), N([...o]);
157
+ } else {
158
+ const { map: t, list: n, keys: o } = Y(
159
+ e,
160
+ m,
161
+ K,
162
+ k
163
+ );
164
+ x({ ...t }), H([...n]), R([...o]);
103
165
  }
104
- });
105
- const c = t.findIndex((p) => p.key === e), r = t.splice(c, 1)[0];
106
- B([...K, { ...r, fixed: "right" }]);
107
- const i = o.splice(c, 1);
108
- return R([...k, ...i]), { map: s, list: t, keys: o };
109
- }, O = (e, s) => {
110
- if (s === "left") {
111
- const { map: t, list: o, keys: n } = X(e, h, j, y);
112
- g({ ...t }), I([...o]), b([...n]);
113
- } else if (s === "center") {
114
- const { map: t, list: o, keys: n } = Y(e, f, E, L);
115
- C({ ...t }), F([...o]), N([...n]);
116
- } else {
117
- const { map: t, list: o, keys: n } = Y(e, u, K, k);
118
- x({ ...t }), B([...o]), R([...n]);
119
- }
120
- }, G = (e, s) => {
121
- if (s === "left") {
122
- const { map: t, list: o, keys: n } = Z(e, h, j, y);
123
- g({ ...t }), I([...o]), b([...n]);
124
- } else if (s === "center") {
125
- const { map: t, list: o, keys: n } = Z(e, f, E, L);
126
- C({ ...t }), F([...o]), N([...n]);
127
- } else {
128
- const { map: t, list: o, keys: n } = X(e, u, K, k);
129
- x({ ...t }), B([...o]), R([...n]);
130
- }
131
- }, de = ({ target: e }) => {
132
- e.checked ? (g(S(h, "show", !0)), C(S(f, "show", !0)), x(S(u, "show", !0))) : (g(S(h, "show", !1)), C(S(f, "show", !1)), x(S(u, "show", !1)));
133
- }, v = M(() => [...y, ...L, ...k], [y, L, k]), w = M(() => {
134
- var s, t, o;
135
- const e = [];
136
- for (const n in h)
137
- (s = h[n]) != null && s.show && e.push(n);
138
- for (const n in f)
139
- (t = f[n]) != null && t.show && e.push(n);
140
- for (const n in u)
141
- (o = u[n]) != null && o.show && e.push(n);
142
- return e;
143
- }, [h, f, u]), he = M(() => v.length === w.length, [v, w]), ue = M(() => w.length > 0 && w.length < v.length, [w, v]), fe = () => {
144
- V({ ...J });
145
- };
146
- return Me(ee, () => ({
147
- getLeftSortColumns: () => h,
148
- getCenterSortColumns: () => f,
149
- getRightSortColumns: () => u,
150
- getCheckedKeys: () => w
151
- })), l.jsxs(T, { vertical: !0, gap: 16, style: ne, ref: A, children: [l.jsxs("div", { className: "sortContent", children: [l.jsxs(T, { vertical: !0, className: "sortCard", gap: 6, style: { height: z }, children: [l.jsx(P.Title, { level: 5, className: "title", children: "固定在左侧" }), l.jsx($, { placement: "left", dataList: j, keys: y, columnsMap: h, onLeftClick: O, onRightClick: G, onChange: oe, onMoveEnd: ce })] }), l.jsxs(T, { vertical: !0, className: "sortCard", gap: 6, style: { height: z }, children: [l.jsx(P.Title, { level: 5, className: "title", children: "不固定" }), l.jsx($, { placement: "center", dataList: E, keys: L, columnsMap: f, onLeftClick: O, onRightClick: G, onChange: ie, onMoveEnd: ae })] }), l.jsxs(T, { vertical: !0, className: "sortCard", gap: 6, style: { height: z }, children: [l.jsx(P.Title, { level: 5, className: "title", children: "固定在右侧" }), l.jsx($, { placement: "right", dataList: K, keys: k, columnsMap: u, onLeftClick: O, onRightClick: G, onChange: re, onMoveEnd: le })] })] }), l.jsxs(xe, { size: 16, align: "end", style: { height: 36 }, children: [l.jsx(Ce, { indeterminate: ue, checked: he, onChange: de, children: "全选" }), l.jsx(ye, { type: "link", icon: l.jsx(Ee, {}), size: "small", onClick: fe, className: me`
166
+ }, pe = ({ target: e }) => {
167
+ e.checked ? (g(j(h, "show", !0)), C(j(p, "show", !0)), x(j(m, "show", !0))) : (g(j(h, "show", !1)), C(j(p, "show", !1)), x(j(m, "show", !1)));
168
+ }, B = S(() => [...y, ...w, ...k], [y, w, k]), M = S(() => {
169
+ var s, t, n;
170
+ const e = [];
171
+ for (const o in h)
172
+ (s = h[o]) != null && s.show && e.push(o);
173
+ for (const o in p)
174
+ (t = p[o]) != null && t.show && e.push(o);
175
+ for (const o in m)
176
+ (n = m[o]) != null && n.show && e.push(o);
177
+ return e;
178
+ }, [h, p, m]), fe = S(() => B.length === M.length, [B, M]), ue = S(() => M.length > 0 && M.length < B.length, [M, B]), ge = () => {
179
+ const e = He(i, Q);
180
+ D({ ...e });
181
+ }, xe = () => {
182
+ const e = Ne(i, ["width"]);
183
+ D(e);
184
+ };
185
+ return Le(ne, () => ({
186
+ getLeftSortColumns: () => h,
187
+ getCenterSortColumns: () => p,
188
+ getRightSortColumns: () => m,
189
+ getCheckedKeys: () => M
190
+ })), /* @__PURE__ */ l.jsxs(O, { vertical: !0, gap: 16, style: ce, ref: E, children: [
191
+ /* @__PURE__ */ l.jsxs("div", { className: "sortContent", children: [
192
+ /* @__PURE__ */ l.jsxs(O, { vertical: !0, className: "sortCard", gap: 6, style: { height: A }, children: [
193
+ /* @__PURE__ */ l.jsx(G.Title, { level: 5, className: "title", children: "固定在左侧" }),
194
+ /* @__PURE__ */ l.jsx(
195
+ W,
196
+ {
197
+ placement: "left",
198
+ dataList: L,
199
+ keys: y,
200
+ columnsMap: h,
201
+ onLeftClick: $,
202
+ onRightClick: F,
203
+ onChange: le,
204
+ onMoveEnd: ie
205
+ }
206
+ )
207
+ ] }),
208
+ /* @__PURE__ */ l.jsxs(O, { vertical: !0, className: "sortCard", gap: 6, style: { height: A }, children: [
209
+ /* @__PURE__ */ l.jsx(G.Title, { level: 5, className: "title", children: "不固定" }),
210
+ /* @__PURE__ */ l.jsx(
211
+ W,
212
+ {
213
+ placement: "center",
214
+ dataList: v,
215
+ keys: w,
216
+ columnsMap: p,
217
+ onLeftClick: $,
218
+ onRightClick: F,
219
+ onChange: he,
220
+ onMoveEnd: me
221
+ }
222
+ )
223
+ ] }),
224
+ /* @__PURE__ */ l.jsxs(O, { vertical: !0, className: "sortCard", gap: 6, style: { height: A }, children: [
225
+ /* @__PURE__ */ l.jsx(G.Title, { level: 5, className: "title", children: "固定在右侧" }),
226
+ /* @__PURE__ */ l.jsx(
227
+ W,
228
+ {
229
+ placement: "right",
230
+ dataList: K,
231
+ keys: k,
232
+ columnsMap: m,
233
+ onLeftClick: $,
234
+ onRightClick: F,
235
+ onChange: ae,
236
+ onMoveEnd: de
237
+ }
238
+ )
239
+ ] })
240
+ ] }),
241
+ /* @__PURE__ */ l.jsxs(ke, { size: 16, align: "end", style: { height: 36 }, children: [
242
+ /* @__PURE__ */ l.jsx(
243
+ we,
244
+ {
245
+ indeterminate: ue,
246
+ checked: fe,
247
+ onChange: pe,
248
+ children: "全选"
249
+ }
250
+ ),
251
+ /* @__PURE__ */ l.jsx(
252
+ se,
253
+ {
254
+ type: "link",
255
+ icon: /* @__PURE__ */ l.jsx(oe, {}),
256
+ size: "small",
257
+ onClick: ge,
258
+ className: te`
259
+ &:hover {
260
+ color: ${J.colorPrimary} !important;
261
+ }
262
+ `,
263
+ children: "重置列排序和显隐"
264
+ }
265
+ ),
266
+ /* @__PURE__ */ l.jsx(
267
+ se,
268
+ {
269
+ type: "link",
270
+ icon: /* @__PURE__ */ l.jsx(oe, {}),
271
+ size: "small",
272
+ onClick: xe,
273
+ className: te`
152
274
  &:hover {
153
- color: ${te.colorPrimary} !important;
275
+ color: ${J.colorPrimary} !important;
154
276
  }
155
- `, children: "重置" })] })] });
156
- }), qe = Se(Ae);
277
+ `,
278
+ children: "重置列宽度"
279
+ }
280
+ )
281
+ ] })
282
+ ] });
283
+ }
284
+ ), Ue = be(Te);
157
285
  export {
158
- qe as default
286
+ Ue as default
159
287
  };
@@ -1,35 +1,69 @@
1
1
  import { j as e } from "../../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
2
  import j, { useState as I } from "react";
3
3
  import { useSortable as x } from "../../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
4
- import { CSS as y } from "../../../../../node_modules/.store/@dnd-kit_utilities@3.2.2/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs";
5
- import { theme as D, Flex as a, Checkbox as h } from "antd";
6
- import N from "../../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
4
+ import { CSS as D } from "../../../../../node_modules/.store/@dnd-kit_utilities@3.2.2/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs";
5
+ import { theme as y, Flex as a, Checkbox as N } from "antd";
6
+ import h from "../../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
7
7
  import w from "../../../../../assets/iconfont/IconDragOrder.mjs";
8
- const R = ({ item: t, onCheckboxChange: r, isDragOverlay: l }) => {
9
- const { attributes: i, isDragging: o, setNodeRef: c, listeners: f, transform: m, transition: d } = x({
8
+ const R = ({
9
+ item: t,
10
+ onCheckboxChange: r,
11
+ isDragOverlay: l
12
+ }) => {
13
+ const {
14
+ attributes: i,
15
+ isDragging: o,
16
+ setNodeRef: c,
17
+ listeners: f,
18
+ transform: m,
19
+ transition: d
20
+ } = x({
10
21
  id: t == null ? void 0 : t.field
11
22
  // disabled: item?.disabled,
12
- }), { token: s } = D.useToken(), u = {
23
+ }), { token: s } = y.useToken(), u = {
13
24
  gap: 8,
14
25
  transition: d,
15
- transform: y.Transform.toString(m),
26
+ transform: D.Transform.toString(m),
16
27
  ...o && {
17
28
  opacity: 0.6
18
29
  },
19
30
  ...l && {
20
31
  backgroundColor: s.colorBgContainer
21
32
  }
22
- }, [g, n] = I(!1), p = ({ target: S }) => {
33
+ }, [p, n] = I(!1), g = ({ target: S }) => {
23
34
  r == null || r(t.field, S.checked);
24
35
  };
25
- return e.jsxs(a, { align: "center", className: N({ sortItemDragging: o }, "sortItem"), style: u, ref: c, onMouseEnter: () => n(!0), onMouseLeave: () => n(!1), ...i, children: [e.jsx(a, { align: "center", className: "dragIcon", ...f, children: e.jsx(w, { size: s.fontSize + 4, style: { opacity: g ? 1 : 0.3 } }) }), e.jsx(h, {
26
- value: t.field,
27
- checked: t.show,
28
- onChange: p,
29
- // className={checkboxCls}
30
- title: t.title,
31
- children: t.title
32
- })] });
36
+ return /* @__PURE__ */ e.jsxs(
37
+ a,
38
+ {
39
+ align: "center",
40
+ className: h({ sortItemDragging: o }, "sortItem"),
41
+ style: u,
42
+ ref: c,
43
+ onMouseEnter: () => n(!0),
44
+ onMouseLeave: () => n(!1),
45
+ ...i,
46
+ children: [
47
+ /* @__PURE__ */ e.jsx(a, { align: "center", className: "dragIcon", ...f, children: /* @__PURE__ */ e.jsx(
48
+ w,
49
+ {
50
+ size: s.fontSize + 4,
51
+ style: { opacity: p ? 1 : 0.3 }
52
+ }
53
+ ) }),
54
+ /* @__PURE__ */ e.jsx(
55
+ N,
56
+ {
57
+ value: t.field,
58
+ checked: t.show,
59
+ onChange: g,
60
+ title: t.title,
61
+ children: t.title
62
+ }
63
+ )
64
+ ]
65
+ }
66
+ );
33
67
  }, B = j.memo(R);
34
68
  export {
35
69
  B as default
@@ -1,27 +1,53 @@
1
1
  import { j as o } from "../../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
- import { DndContext as p, closestCenter as j, DragOverlay as u } from "../../../../../node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs";
3
- import { SortableContext as C, rectSortingStrategy as v, 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 y } from "react";
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
5
  import m from "./DndItem.mjs";
6
- const N = ({ dataList: n, keys: a, onChange: x, onMoveEnd: d }) => {
7
- const [s, c] = y(-1), f = (t) => {
6
+ const E = ({ dataList: r, keys: a, onChange: x, onMoveEnd: d }) => {
7
+ const [s, c] = C(-1), f = (t) => {
8
8
  const { active: e } = t;
9
9
  e && c(e.data.current.sortable.index);
10
- }, g = (t) => {
10
+ }, D = (t) => {
11
11
  const { over: e } = t;
12
12
  if (e) {
13
- const r = e.data.current.sortable.index;
14
- s !== r && (D(s, r), c(-1));
13
+ const n = e.data.current.sortable.index;
14
+ s !== n && (g(s, n), c(-1));
15
15
  }
16
- }, D = (t, e) => {
17
- const r = l(a, t, e), i = l(n, t, e);
18
- d(i, r);
19
- }, S = (t, e) => {
20
- const r = n.findIndex((h) => h.field === t), i = JSON.parse(JSON.stringify(n));
21
- i[r].show = e, x(i);
16
+ }, g = (t, e) => {
17
+ const n = l(a, t, e), i = l(r, t, e);
18
+ d(i, n);
19
+ }, p = (t, e) => {
20
+ const n = r.findIndex((S) => S.field === t), i = JSON.parse(JSON.stringify(r));
21
+ i[n].show = e, x(i);
22
22
  };
23
- return o.jsx(p, { collisionDetection: j, onDragStart: f, onDragEnd: g, onDragCancel: () => c(-1), children: o.jsx(C, { items: a, strategy: v, children: o.jsxs("div", { className: "sortList", children: [n.map((t) => o.jsx(m, { item: t, onCheckboxChange: S }, t.field)), o.jsx(u, { children: s !== -1 && o.jsx(m, { item: n[s], isDragOverlay: !0 }, n[s].field) })] }) }) });
23
+ return /* @__PURE__ */ o.jsx(
24
+ j,
25
+ {
26
+ collisionDetection: u,
27
+ onDragStart: f,
28
+ onDragEnd: D,
29
+ onDragCancel: () => c(-1),
30
+ children: /* @__PURE__ */ o.jsx(v, { items: a, strategy: y, children: /* @__PURE__ */ o.jsxs("div", { className: "sortList", children: [
31
+ r.map((t) => /* @__PURE__ */ o.jsx(
32
+ m,
33
+ {
34
+ item: t,
35
+ onCheckboxChange: p
36
+ },
37
+ t.field
38
+ )),
39
+ /* @__PURE__ */ o.jsx(h, { children: s !== -1 && /* @__PURE__ */ o.jsx(
40
+ m,
41
+ {
42
+ item: r[s],
43
+ isDragOverlay: !0
44
+ },
45
+ r[s].field
46
+ ) })
47
+ ] }) })
48
+ }
49
+ );
24
50
  };
25
51
  export {
26
- N as default
52
+ E as default
27
53
  };