bitz-react-admin-ui 2.1.0 → 2.1.2

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 (159) hide show
  1. package/dist/assets/iconfont/IconChenggong.mjs +10 -4
  2. package/dist/assets/iconfont/IconClose.mjs +7 -1
  3. package/dist/assets/iconfont/IconCuowu.mjs +8 -2
  4. package/dist/assets/iconfont/IconDuigoux.mjs +8 -2
  5. package/dist/assets/iconfont/IconFabu.mjs +18 -3
  6. package/dist/assets/iconfont/IconFanhui.mjs +11 -5
  7. package/dist/assets/iconfont/IconGaojisousuo.mjs +10 -4
  8. package/dist/assets/iconfont/IconHangfengexian.mjs +27 -4
  9. package/dist/assets/iconfont/IconHangliefengexian.mjs +27 -4
  10. package/dist/assets/iconfont/IconIcFluentHomeRegular.mjs +11 -5
  11. package/dist/assets/iconfont/IconIcon21.mjs +8 -2
  12. package/dist/assets/iconfont/IconJincoude.mjs +9 -3
  13. package/dist/assets/iconfont/IconJinggao.mjs +8 -2
  14. package/dist/assets/iconfont/IconKuansongde.mjs +11 -5
  15. package/dist/assets/iconfont/IconLiefengexian.mjs +28 -5
  16. package/dist/assets/iconfont/IconMore.mjs +26 -4
  17. package/dist/assets/iconfont/IconShanchu.mjs +11 -5
  18. package/dist/assets/iconfont/IconShanchu1.mjs +18 -3
  19. package/dist/assets/iconfont/IconSousuo.mjs +10 -4
  20. package/dist/assets/iconfont/IconTejincou.mjs +7 -1
  21. package/dist/assets/iconfont/IconTekuansong.mjs +11 -5
  22. package/dist/assets/iconfont/IconTishi1.mjs +12 -6
  23. package/dist/assets/iconfont/IconTuodong.mjs +12 -6
  24. package/dist/assets/iconfont/IconWubanmawentianchong.mjs +22 -5
  25. package/dist/assets/iconfont/IconWufengexian.mjs +11 -4
  26. package/dist/assets/iconfont/IconXinxitishi.mjs +9 -3
  27. package/dist/assets/iconfont/IconYoubanmawentianchong.mjs +23 -7
  28. package/dist/assets/iconfont/IconZhongdengde.mjs +10 -4
  29. package/dist/assets/iconfont/IconZhongzhi.mjs +11 -5
  30. package/dist/assets/iconfont/index.mjs +29 -29
  31. package/dist/components/BitzAddTag/index.mjs +41 -8
  32. package/dist/components/BitzAddressBook/index.mjs +122 -35
  33. package/dist/components/BitzAppPage/index.mjs +18 -4
  34. package/dist/components/BitzAppRefresh/index.mjs +27 -15
  35. package/dist/components/BitzBetterScroll/index.mjs +5 -5
  36. package/dist/components/BitzButton/index.mjs +23 -9
  37. package/dist/components/BitzCalendar/index.mjs +52 -19
  38. package/dist/components/BitzCascader/BitzCascaderMobile.mjs +68 -30
  39. package/dist/components/BitzCascader/index.mjs +6 -2
  40. package/dist/components/BitzCollapse/index.mjs +4 -4
  41. package/dist/components/BitzConfigProvider/context.mjs +3 -1
  42. package/dist/components/BitzConfigProvider/index.mjs +14 -13
  43. package/dist/components/BitzConfirmModal/index.mjs +24 -1
  44. package/dist/components/BitzConvert/DropdownToButton/index.mjs +14 -11
  45. package/dist/components/BitzConvert/index.mjs +1 -1
  46. package/dist/components/BitzDescriptions/index.mjs +11 -1
  47. package/dist/components/BitzDrawer/index.mjs +17 -2
  48. package/dist/components/BitzEmpty/index.mjs +6 -2
  49. package/dist/components/BitzException/index.mjs +6 -1
  50. package/dist/components/BitzFloatLayout/index.mjs +10 -1
  51. package/dist/components/BitzFluentInput/index.mjs +23 -4
  52. package/dist/components/BitzFluentSelect/index.mjs +24 -5
  53. package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +13 -16
  54. package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +26 -20
  55. package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +21 -3
  56. package/dist/components/BitzFuiCalendar/CalendarBody.mjs +29 -6
  57. package/dist/components/BitzFuiCalendar/CalendarHead.mjs +5 -2
  58. package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +12 -3
  59. package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +50 -18
  60. package/dist/components/BitzFuiCalendar/ColumnData.mjs +31 -15
  61. package/dist/components/BitzFuiCalendar/FuiCalendarItem.mjs +47 -5
  62. package/dist/components/BitzFuiCalendar/index.mjs +7 -1
  63. package/dist/components/BitzFullScreen/index.mjs +9 -6
  64. package/dist/components/BitzHighlight/Child.mjs +23 -9
  65. package/dist/components/BitzHighlight/Highlight.mjs +26 -5
  66. package/dist/components/BitzHighlight/chunks.mjs +20 -17
  67. package/dist/components/BitzHighlight/style.mjs +4 -1
  68. package/dist/components/BitzImage/index.mjs +1 -1
  69. package/dist/components/BitzImage/previewImage.mjs +12 -5
  70. package/dist/components/BitzLanguageTabs/index.mjs +14 -3
  71. package/dist/components/BitzLazyLoad/index.mjs +7 -1
  72. package/dist/components/BitzList/List.mjs +17 -3
  73. package/dist/components/BitzList/LoadMore.mjs +29 -20
  74. package/dist/components/BitzLoadMore/index.mjs +34 -14
  75. package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +24 -11
  76. package/dist/components/BitzMeetingTime/index.mjs +10 -6
  77. package/dist/components/BitzMobileLoading/index.mjs +1 -1
  78. package/dist/components/BitzModal/index.mjs +24 -11
  79. package/dist/components/BitzNoData/index.mjs +4 -1
  80. package/dist/components/BitzNoMore/index.mjs +1 -1
  81. package/dist/components/BitzOrganizationSelection/index.mjs +43 -14
  82. package/dist/components/BitzPageContainer/index.mjs +107 -46
  83. package/dist/components/BitzPageHeader/index.mjs +89 -21
  84. package/dist/components/BitzPagination/index.mjs +62 -14
  85. package/dist/components/BitzPopover/index.mjs +4 -4
  86. package/dist/components/BitzPullRefresh/PullRefresh.mjs +47 -18
  87. package/dist/components/BitzQRCode/index.mjs +6 -1
  88. package/dist/components/BitzQueryFilter/QueryFilterContent.mjs +35 -17
  89. package/dist/components/BitzQueryFilter/QueryFilterDrawer.mjs +20 -13
  90. package/dist/components/BitzQueryFilter/QueryFilterMobile.mjs +4 -1
  91. package/dist/components/BitzQueryFilter/index.mjs +69 -20
  92. package/dist/components/BitzRefresh/index.mjs +5 -1
  93. package/dist/components/BitzRemark/index.mjs +4 -4
  94. package/dist/components/BitzScheduleCenter/index.mjs +24 -30
  95. package/dist/components/BitzSearch/index.mjs +1 -1
  96. package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +123 -48
  97. package/dist/components/BitzSelect/index.mjs +1 -1
  98. package/dist/components/BitzSkeleton/index.mjs +31 -1
  99. package/dist/components/BitzSwitch/index.mjs +7 -2
  100. package/dist/components/BitzTabbar/BitzTabbar.mjs +25 -8
  101. package/dist/components/BitzTabbar/BitzTabbarItem.mjs +4 -1
  102. package/dist/components/BitzTable/ActionBar/ActionBar.mjs +33 -5
  103. package/dist/components/BitzTable/ActionBar/Button.mjs +1 -1
  104. package/dist/components/BitzTable/ActionBar/style.mjs +12 -9
  105. package/dist/components/BitzTable/ActionCol/index.mjs +90 -16
  106. package/dist/components/BitzTable/ActionCol/style.mjs +15 -12
  107. package/dist/components/BitzTable/Dropdown/index.mjs +8 -1
  108. package/dist/components/BitzTable/Dropdown/style.mjs +9 -6
  109. package/dist/components/BitzTable/SelectionBar/Button.mjs +32 -14
  110. package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +40 -8
  111. package/dist/components/BitzTable/SelectionBar/style.mjs +18 -8
  112. package/dist/components/BitzTable/Store/index.mjs +68 -45
  113. package/dist/components/BitzTable/Table/index.mjs +305 -145
  114. package/dist/components/BitzTable/Table/style.mjs +10 -1
  115. package/dist/components/BitzTable/Table/utils.mjs +11 -4
  116. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +82 -47
  117. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +95 -21
  118. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +68 -28
  119. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +246 -138
  120. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +6 -4
  121. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +9 -2
  122. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +142 -85
  123. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +32 -11
  124. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +33 -6
  125. package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +17 -4
  126. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +27 -10
  127. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +52 -9
  128. package/dist/components/BitzTable/ToolBar/index.d.ts +2 -2
  129. package/dist/components/BitzTable/index.d.ts +2 -2
  130. package/dist/components/BitzTable/index.mjs +2 -2
  131. package/dist/components/BitzTableOperations/index.mjs +13 -3
  132. package/dist/components/BitzTableSelect/Picker/index.mjs +43 -10
  133. package/dist/components/BitzTableSelect/Select/index.mjs +87 -21
  134. package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +21 -11
  135. package/dist/components/BitzTableSelect/SelectPopup/index.mjs +210 -40
  136. package/dist/components/BitzTableSelect/TableCell/index.mjs +49 -8
  137. package/dist/components/BitzTableSelect/TextBlock/index.mjs +27 -9
  138. package/dist/components/BitzTableSelect/index.mjs +61 -13
  139. package/dist/components/BitzTag/index.mjs +1 -1
  140. package/dist/components/BitzTheme/index.mjs +6 -6
  141. package/dist/components/BitzTimeline/index.mjs +11 -1
  142. package/dist/components/BitzTimer/Form.mjs +32 -11
  143. package/dist/components/BitzTimer/Timer.mjs +76 -38
  144. package/dist/components/BitzTimer/index.mjs +66 -43
  145. package/dist/components/BitzToast/Toast/index.mjs +28 -10
  146. package/dist/components/BitzToast/index.mjs +1 -1
  147. package/dist/components/BitzTree/index.mjs +4 -1
  148. package/dist/components/BitzUeEditor/index.mjs +5 -5
  149. package/dist/components/BitzUpload/index.mjs +81 -43
  150. package/dist/components/BitzWebAppDrawer/index.mjs +35 -4
  151. package/dist/components/BitzWebAppModal/index.mjs +6 -3
  152. package/dist/hooks/use-event-listener.mjs +11 -2
  153. package/dist/hooks/use-lock-fn.mjs +13 -10
  154. package/dist/hooks/use-scroll-parent.mjs +16 -14
  155. package/dist/hooks/useEvent.mjs +7 -4
  156. package/dist/hooks/useMergedState.mjs +11 -11
  157. package/dist/style.css +1 -1
  158. package/dist/utils/create.mjs +7 -1
  159. package/package.json +1 -1
@@ -13,53 +13,88 @@ import { styles as re } from "./style.mjs";
13
13
  import { BitzConfigContext as se } from "../../../BitzConfigProvider/context.mjs";
14
14
  import le from "../../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
15
15
  import ne from "../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
16
- const be = A(({ title: R, onChange: r, getContainer: D }) => {
17
- const { token: s } = _.useToken(), l = G(), [n, N] = p(1), [V, g] = p(!1);
18
- p(!1);
19
- const {
20
- persistenceType: w,
21
- persistenceKey: y,
22
- onlineChange: a,
23
- setColumnsMap: H,
24
- setSortKeyColumns: L,
25
- stylesStorageType: E,
26
- stylesStorageKey: C,
27
- setTableStylesConfig: m,
28
- onlineStylesConfigChange: c
29
- // clearPersistenceStorage,
30
- } = M(Z), o = M(se).Table, t = T(null), x = T(null), O = async () => {
31
- var S, j, h, b, B, F, k, v, K;
32
- const d = (S = x.current) == null ? void 0 : S.getFormInstance(), u = await (d == null ? void 0 : d.getFieldsValue()), W = ne(u, "stylesScope"), f = {
33
- ...(j = t.current) == null ? void 0 : j.getLeftSortColumns(),
34
- ...(h = t.current) == null ? void 0 : h.getCenterSortColumns(),
35
- ...(b = t.current) == null ? void 0 : b.getRightSortColumns()
36
- }, q = [
37
- ...(B = t.current) == null ? void 0 : B.getLeftSortKeys(),
38
- ...(F = t.current) == null ? void 0 : F.getCenterSortKeys(),
39
- ...(k = t.current) == null ? void 0 : k.getRightSortKeys()
40
- ];
41
- m == null || m(W), (v = o == null ? void 0 : o.setStylesScope) == null || v.call(o, u.stylesScope ? "global" : "current"), H(f), L(q), E === "online" && C && (c == null || c(C, u)), w === "online" && y && (a == null || a(y, f)), r ? (g(!0), (K = r == null ? void 0 : r(f)) == null || K.finally(() => {
42
- g(!1), l.hide();
43
- })) : l.hide();
44
- }, i = Y(() => s.mode === "dark", [s.mode]);
45
- return e.jsx(J, { className: $(re(s), "tableConfigModal"), title: e.jsx(P.Title, { style: { fontSize: 16, margin: 0 }, children: R }), getContainer: D, ...I(l), style: {
46
- "--sortCard-bgColor": i ? "#444" : "#f2f2f2",
47
- "--sortCard-titleColor": i ? "#ccc" : "#777",
48
- "--radioCard-bgColor": i ? "#444" : "#F2F2F2",
49
- "--radioCard-bgHoverColor": i ? "#333" : s.colorBgContainer
50
- }, styles: { body: { maxHeight: window.innerHeight - 300 } }, width: 700, footer: e.jsxs(e.Fragment, { children: [e.jsx(z, {
51
- type: "primary",
52
- icon: e.jsx(le, {}),
53
- onClick: O,
54
- // disabled={!isEdit}
55
- loading: V,
56
- children: "保存"
57
- }), e.jsx(z, { onClick: () => l.hide(), children: "取消" })] }), children: e.jsxs(Q, { className: "container", bordered: !1, children: [e.jsx("div", { className: "segmentedWrapper", children: e.jsx(U, { size: "large", options: [
58
- { label: "外观设置", value: 1 },
59
- { label: "列设置", value: 2 },
60
- { label: "导出设置", value: 3 }
61
- ], value: n, onChange: N }) }), e.jsxs(X, { className: "containerBody", children: [e.jsx(ee, { ref: x, display: n === 1 }), e.jsx(te, { ref: t, display: n === 2 }), e.jsx(oe, { display: n === 3 })] })] }) });
62
- });
16
+ const be = A(
17
+ ({ title: R, onChange: r, getContainer: N }) => {
18
+ const { token: s } = _.useToken(), l = G(), [n, V] = p(1), [w, y] = p(!1);
19
+ p(!1);
20
+ const {
21
+ persistenceType: H,
22
+ persistenceKey: g,
23
+ onlineChange: a,
24
+ setColumnsMap: L,
25
+ setSortKeyColumns: E,
26
+ stylesStorageType: D,
27
+ stylesStorageKey: C,
28
+ setTableStylesConfig: m,
29
+ onlineStylesConfigChange: c
30
+ // clearPersistenceStorage,
31
+ } = M(Z), o = M(se).Table, t = T(null), x = T(null), O = async () => {
32
+ var S, j, h, b, k, v, B, F, K;
33
+ const d = (S = x.current) == null ? void 0 : S.getFormInstance(), f = await (d == null ? void 0 : d.getFieldsValue()), W = ne(f, "stylesScope"), u = {
34
+ ...(j = t.current) == null ? void 0 : j.getLeftSortColumns(),
35
+ ...(h = t.current) == null ? void 0 : h.getCenterSortColumns(),
36
+ ...(b = t.current) == null ? void 0 : b.getRightSortColumns()
37
+ }, q = [
38
+ ...(k = t.current) == null ? void 0 : k.getLeftSortKeys(),
39
+ ...(v = t.current) == null ? void 0 : v.getCenterSortKeys(),
40
+ ...(B = t.current) == null ? void 0 : B.getRightSortKeys()
41
+ ];
42
+ m == null || m(W), (F = o == null ? void 0 : o.setStylesScope) == null || F.call(o, f.stylesScope ? "global" : "current"), L(u), E(q), D === "online" && C && (c == null || c(C, f)), H === "online" && g && (a == null || a(g, u)), r ? (y(!0), (K = r == null ? void 0 : r(u)) == null || K.finally(() => {
43
+ y(!1), l.hide();
44
+ })) : l.hide();
45
+ }, i = Y(() => s.mode === "dark", [s.mode]);
46
+ return /* @__PURE__ */ e.jsx(
47
+ J,
48
+ {
49
+ className: $(re(s), "tableConfigModal"),
50
+ title: /* @__PURE__ */ e.jsx(P.Title, { style: { fontSize: 16, margin: 0 }, children: R }),
51
+ getContainer: N,
52
+ ...I(l),
53
+ style: {
54
+ "--sortCard-bgColor": i ? "#444" : "#f2f2f2",
55
+ "--sortCard-titleColor": i ? "#ccc" : "#777",
56
+ "--radioCard-bgColor": i ? "#444" : "#F2F2F2",
57
+ "--radioCard-bgHoverColor": i ? "#333" : s.colorBgContainer
58
+ },
59
+ styles: { body: { maxHeight: window.innerHeight - 300 } },
60
+ width: 700,
61
+ footer: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
62
+ /* @__PURE__ */ e.jsx(
63
+ z,
64
+ {
65
+ type: "primary",
66
+ icon: /* @__PURE__ */ e.jsx(le, {}),
67
+ onClick: O,
68
+ loading: w,
69
+ children: "保存"
70
+ }
71
+ ),
72
+ /* @__PURE__ */ e.jsx(z, { onClick: () => l.hide(), children: "取消" })
73
+ ] }),
74
+ children: /* @__PURE__ */ e.jsxs(Q, { className: "container", bordered: !1, children: [
75
+ /* @__PURE__ */ e.jsx("div", { className: "segmentedWrapper", children: /* @__PURE__ */ e.jsx(
76
+ U,
77
+ {
78
+ size: "large",
79
+ options: [
80
+ { label: "外观设置", value: 1 },
81
+ { label: "列设置", value: 2 },
82
+ { label: "导出设置", value: 3 }
83
+ ],
84
+ value: n,
85
+ onChange: V
86
+ }
87
+ ) }),
88
+ /* @__PURE__ */ e.jsxs(X, { className: "containerBody", children: [
89
+ /* @__PURE__ */ e.jsx(ee, { ref: x, display: n === 1 }),
90
+ /* @__PURE__ */ e.jsx(te, { ref: t, display: n === 2 }),
91
+ /* @__PURE__ */ e.jsx(oe, { display: n === 3 })
92
+ ] })
93
+ ] })
94
+ }
95
+ );
96
+ }
97
+ );
63
98
  export {
64
99
  be as default
65
100
  };
@@ -1,29 +1,103 @@
1
- import { j as o } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
1
+ import { j as s } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
2
  import E, { useState as O, useMemo as R } from "react";
3
- import { useSortable as w } from "../../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.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 { Flex as f, Checkbox as M, Tooltip as T } from "antd";
3
+ import { useSortable as v } from "../../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
4
+ import { CSS as w } from "../../../../../node_modules/.store/@dnd-kit_utilities@3.2.2/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs";
5
+ import { Flex as f, Checkbox as D, Tooltip as M } from "antd";
6
6
  import h from "../../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
7
7
  import i from "../../../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/PicRightOutlined.mjs";
8
- const g = ({ icon: s, className: e, open: r, title: n, onClick: t }) => o.jsx(T, { getTooltipContainer: (l) => l.parentElement, title: n, open: r ? !1 : void 0, children: o.jsx(s, { className: e, onClick: t }) }), v = ({ item: s, placement: e, onLeftClick: r, onRightClick: n, onCheckboxChange: t }) => {
9
- const { attributes: l, isDragging: a, setNodeRef: u, listeners: x, transform: p, transition: k } = w({
10
- id: s == null ? void 0 : s.key
8
+ const g = ({ icon: o, className: r, open: e, title: n, onClick: t }) => /* @__PURE__ */ s.jsx(
9
+ M,
10
+ {
11
+ getTooltipContainer: (l) => l.parentElement,
12
+ title: n,
13
+ open: e ? !1 : void 0,
14
+ children: /* @__PURE__ */ s.jsx(o, { className: r, onClick: t })
15
+ }
16
+ ), T = ({
17
+ item: o,
18
+ placement: r,
19
+ onLeftClick: e,
20
+ onRightClick: n,
21
+ onCheckboxChange: t
22
+ }) => {
23
+ const {
24
+ attributes: l,
25
+ isDragging: a,
26
+ setNodeRef: u,
27
+ listeners: x,
28
+ transform: p,
29
+ transition: j
30
+ } = v({
31
+ id: o == null ? void 0 : o.key
11
32
  // disabled: item?.disabled,
12
- }), C = {
13
- transition: k,
14
- transform: D.Transform.toString(p)
15
- }, j = h({
16
- disabledCheckbox: (s == null ? void 0 : s.disabled) || (s == null ? void 0 : s.fixed)
17
- }), N = ({ target: c }) => {
18
- s != null && s.disabled || s != null && s.fixed || t(s.key, c.checked);
19
- }, [b, y] = O(!1), d = (c) => {
33
+ }), k = {
34
+ transition: j,
35
+ transform: w.Transform.toString(p)
36
+ }, C = h({
37
+ disabledCheckbox: (o == null ? void 0 : o.disabled) || (o == null ? void 0 : o.fixed)
38
+ }), b = ({ target: c }) => {
39
+ o != null && o.disabled || o != null && o.fixed || t(o.key, c.checked);
40
+ }, [N, y] = O(!1), d = (c) => {
20
41
  y(c);
21
- }, { left: S, right: I } = R(() => e === "left" ? { left: "取消固定", right: "固定在右侧" } : e === "center" ? { left: "固定在左侧", right: "固定在右侧" } : { left: "固定在左侧", right: "取消固定" }, [e]);
22
- return o.jsxs(f, { align: "center", className: h({ draggingSortItem: a }, "sortItem"), style: C, ref: u, onMouseEnter: () => d(!0), onMouseLeave: () => d(!1), ...l, children: [o.jsx(f, { align: "center", className: "dragIcon", ...x, children: o.jsx(i, {}) }), o.jsx(M, { checked: s.show, className: j, onChange: N, title: s.title, children: s.title }), !(s != null && s.isOperationCol) && o.jsxs(f, { style: {
23
- height: "100%",
24
- display: b ? "flex" : "none"
25
- }, className: "operation pointerCursor", children: [o.jsx(g, { className: "leftOperation", title: S, open: a, icon: i, onClick: () => r(s.key, e) }), o.jsx(g, { className: "rightOperation", title: I, open: a, icon: i, onClick: () => n(s.key, e) })] })] });
26
- }, A = E.memo(v);
42
+ }, { left: S, right: I } = R(() => r === "left" ? { left: "取消固定", right: "固定在右侧" } : r === "center" ? { left: "固定在左侧", right: "固定在右侧" } : { left: "固定在左侧", right: "取消固定" }, [r]);
43
+ return /* @__PURE__ */ s.jsxs(
44
+ f,
45
+ {
46
+ align: "center",
47
+ className: h({ draggingSortItem: a }, "sortItem"),
48
+ style: k,
49
+ ref: u,
50
+ onMouseEnter: () => d(!0),
51
+ onMouseLeave: () => d(!1),
52
+ ...l,
53
+ children: [
54
+ /* @__PURE__ */ s.jsx(f, { align: "center", className: "dragIcon", ...x, children: /* @__PURE__ */ s.jsx(i, {}) }),
55
+ /* @__PURE__ */ s.jsx(
56
+ D,
57
+ {
58
+ checked: o.show,
59
+ className: C,
60
+ onChange: b,
61
+ title: o.title,
62
+ children: o.title
63
+ }
64
+ ),
65
+ !(o != null && o.isOperationCol) && /* @__PURE__ */ s.jsxs(
66
+ f,
67
+ {
68
+ style: {
69
+ height: "100%",
70
+ display: N ? "flex" : "none"
71
+ },
72
+ className: "operation pointerCursor",
73
+ children: [
74
+ /* @__PURE__ */ s.jsx(
75
+ g,
76
+ {
77
+ className: "leftOperation",
78
+ title: S,
79
+ open: a,
80
+ icon: i,
81
+ onClick: () => e(o.key, r)
82
+ }
83
+ ),
84
+ /* @__PURE__ */ s.jsx(
85
+ g,
86
+ {
87
+ className: "rightOperation",
88
+ title: I,
89
+ open: a,
90
+ icon: i,
91
+ onClick: () => n(o.key, r)
92
+ }
93
+ )
94
+ ]
95
+ }
96
+ )
97
+ ]
98
+ }
99
+ );
100
+ }, A = E.memo(T);
27
101
  export {
28
102
  A as default
29
103
  };
@@ -1,48 +1,88 @@
1
1
  import { j as m } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { genColumnKey as S, columnSort as j } from "../../../Store/utils/index.mjs";
3
- import { DndContext as w } from "../../../../../node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs";
4
- import { restrictToVerticalAxis as E, restrictToWindowEdges as y } from "../../../../../node_modules/.store/@dnd-kit_modifiers@6.0.1/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs";
5
- import { SortableContext as I, verticalListSortingStrategy as K, arrayMove as k } from "../../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
6
- import { Flex as A } from "antd";
7
- import { useMemo as N, useState as R } from "react";
8
- import T from "./DndItem.mjs";
9
- import F from "../../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
10
- const O = ({ placement: x, dataList: n, keys: a, columnsMap: s, onLeftClick: u, onRightClick: g, onChange: h, onMoveEnd: p }) => {
11
- const d = N(() => {
2
+ import { genColumnKey as C, columnSort as S } from "../../../Store/utils/index.mjs";
3
+ import { DndContext as D } from "../../../../../node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs";
4
+ import { restrictToVerticalAxis as y, restrictToWindowEdges as E } from "../../../../../node_modules/.store/@dnd-kit_modifiers@6.0.1/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs";
5
+ import { SortableContext as I, verticalListSortingStrategy as K, arrayMove as A } from "../../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
6
+ import { Flex as N } from "antd";
7
+ import { useMemo as T, useState as F } from "react";
8
+ import R from "./DndItem.mjs";
9
+ import V from "../../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
10
+ const P = ({
11
+ placement: u,
12
+ dataList: n,
13
+ keys: f,
14
+ columnsMap: s,
15
+ onLeftClick: a,
16
+ onRightClick: p,
17
+ onChange: h,
18
+ onMoveEnd: d
19
+ }) => {
20
+ const g = T(() => {
12
21
  const o = [];
13
- return n != null && n.length && (n == null || n.map(({ key: r, dataIndex: e, ...i }) => {
14
- const c = S(r || e, [r || e].join("-")), t = s[c || "null"];
15
- return o.push({
16
- key: c,
17
- ...F(i, ["className"]),
18
- selectable: !1,
19
- disabled: (t == null ? void 0 : t.disabled) === !0,
20
- show: t == null ? void 0 : t.show
21
- }), t;
22
- })), o.sort(j(s));
23
- }, [s, n]), [f, l] = R(-1), C = (o) => {
22
+ return n != null && n.length && (n == null || n.map(
23
+ ({ key: r, dataIndex: e, ...i }) => {
24
+ const c = C(
25
+ r || e,
26
+ [r || e].join("-")
27
+ ), t = s[c || "null"];
28
+ return o.push({
29
+ key: c,
30
+ ...V(i, ["className"]),
31
+ selectable: !1,
32
+ disabled: (t == null ? void 0 : t.disabled) === !0,
33
+ show: t == null ? void 0 : t.show
34
+ }), t;
35
+ }
36
+ )), o.sort(S(s));
37
+ }, [s, n]), [x, l] = F(-1), v = (o) => {
24
38
  const { active: r } = o;
25
39
  r && l(r.data.current.sortable.index);
26
40
  }, b = (o) => {
27
41
  const { over: r } = o;
28
42
  if (r) {
29
43
  const e = r.data.current.sortable.index;
30
- f !== e && (v(f, e), l(-1));
44
+ x !== e && (j(x, e), l(-1));
31
45
  }
32
- }, v = (o, r) => {
33
- const e = {}, i = k(a, o, r);
46
+ }, j = (o, r) => {
47
+ const e = {}, i = A(f, o, r);
34
48
  i.forEach((c, t) => {
35
49
  e[c] = { ...s[c], order: t };
36
- }), p(e, i);
37
- }, D = (o, r) => {
50
+ }), d(e, i);
51
+ }, w = (o, r) => {
38
52
  const e = { ...s };
39
53
  e[o] = { ...e[o], show: r }, h(
40
54
  e
41
55
  /*, newCheckedKeys*/
42
56
  );
43
57
  };
44
- return m.jsx(w, { modifiers: [E, y], onDragStart: C, onDragEnd: b, onDragCancel: () => l(-1), children: m.jsx(I, { items: a, strategy: K, children: m.jsx(A, { vertical: !0, className: "sortList", children: d.map((o) => m.jsx(T, { item: o, placement: x, onLeftClick: u, onRightClick: g, onCheckboxChange: D }, o.key)) }) }) });
58
+ return /* @__PURE__ */ m.jsx(
59
+ D,
60
+ {
61
+ modifiers: [y, E],
62
+ onDragStart: v,
63
+ onDragEnd: b,
64
+ onDragCancel: () => l(-1),
65
+ children: /* @__PURE__ */ m.jsx(
66
+ I,
67
+ {
68
+ items: f,
69
+ strategy: K,
70
+ children: /* @__PURE__ */ m.jsx(N, { vertical: !0, className: "sortList", children: g.map((o) => /* @__PURE__ */ m.jsx(
71
+ R,
72
+ {
73
+ item: o,
74
+ placement: u,
75
+ onLeftClick: a,
76
+ onRightClick: p,
77
+ onCheckboxChange: w
78
+ },
79
+ o.key
80
+ )) })
81
+ }
82
+ )
83
+ }
84
+ );
45
85
  };
46
86
  export {
47
- O as default
87
+ P as default
48
88
  };