bitz-react-admin-ui 2.7.11 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) 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 +6 -6
  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 +182 -44
  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 +103 -62
  117. package/dist/components/BitzTable/Store/utils/index.mjs +5 -5
  118. package/dist/components/BitzTable/SubTable/index.mjs +122 -73
  119. package/dist/components/BitzTable/Table/ResizableTitle copy.mjs +43 -21
  120. package/dist/components/BitzTable/Table/SortTableContext.mjs +39 -17
  121. package/dist/components/BitzTable/Table/SortableRow.mjs +44 -20
  122. package/dist/components/BitzTable/Table/TdCell.d.ts +1 -0
  123. package/dist/components/BitzTable/Table/TdCell.mjs +9 -0
  124. package/dist/components/BitzTable/Table/index.d.ts +6 -0
  125. package/dist/components/BitzTable/Table/index.mjs +515 -264
  126. package/dist/components/BitzTable/Table/style.mjs +10 -1
  127. package/dist/components/BitzTable/Table/utils.mjs +11 -4
  128. package/dist/components/BitzTable/TextOverflow/index.mjs +12 -3
  129. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +105 -31
  130. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +104 -23
  131. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +68 -29
  132. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +346 -159
  133. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +50 -16
  134. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +42 -16
  135. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +135 -38
  136. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +9 -2
  137. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/ScopeSwitch.mjs +18 -5
  138. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +121 -49
  139. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +62 -18
  140. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +59 -16
  141. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +42 -14
  142. package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +20 -5
  143. package/dist/components/BitzTable/ToolBar/Modal/index.mjs +46 -14
  144. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +20 -9
  145. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +49 -2
  146. package/dist/components/BitzTable/ToolBar/style.mjs +6 -1
  147. package/dist/components/BitzTableOperations/index.mjs +13 -3
  148. package/dist/components/BitzTableSelect/Picker/index.mjs +43 -10
  149. package/dist/components/BitzTableSelect/Select/index.mjs +90 -21
  150. package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +23 -13
  151. package/dist/components/BitzTableSelect/SelectPopup/index.mjs +219 -69
  152. package/dist/components/BitzTableSelect/SingleSelect/index.mjs +87 -22
  153. package/dist/components/BitzTableSelect/TableCell/index.mjs +52 -11
  154. package/dist/components/BitzTableSelect/TextBlock/index.mjs +30 -12
  155. package/dist/components/BitzTableSelect/index.mjs +65 -14
  156. package/dist/components/BitzTableSelect/utils.mjs +3 -3
  157. package/dist/components/BitzTag/index.mjs +1 -1
  158. package/dist/components/BitzText/index.mjs +41 -14
  159. package/dist/components/BitzText/utils.mjs +3 -3
  160. package/dist/components/BitzTheme/index.mjs +6 -6
  161. package/dist/components/BitzTimeline/index.mjs +11 -1
  162. package/dist/components/BitzTimer/Form.mjs +32 -11
  163. package/dist/components/BitzTimer/Timer.mjs +76 -38
  164. package/dist/components/BitzTimer/index.mjs +66 -43
  165. package/dist/components/BitzToast/Toast/index.mjs +28 -10
  166. package/dist/components/BitzToast/index.mjs +1 -1
  167. package/dist/components/BitzTooltip/index.mjs +59 -20
  168. package/dist/components/BitzTooltip/style.mjs +9 -6
  169. package/dist/components/BitzTooltip/utils.mjs +2 -2
  170. package/dist/components/BitzTree/index.mjs +4 -1
  171. package/dist/components/BitzUeEditor/index.mjs +5 -5
  172. package/dist/components/BitzUpload/index.mjs +81 -43
  173. package/dist/components/BitzWebAppDrawer/index.mjs +35 -4
  174. package/dist/components/BitzWebAppModal/index.mjs +6 -3
  175. package/dist/hooks/use-event-listener.mjs +11 -2
  176. package/dist/hooks/use-lock-fn.mjs +13 -10
  177. package/dist/hooks/use-scroll-parent.mjs +16 -14
  178. package/dist/hooks/useEvent.mjs +7 -4
  179. package/dist/hooks/useMergedState.mjs +11 -11
  180. package/dist/node_modules/react-intersection-observer/dist/index.mjs +123 -0
  181. package/dist/style.css +1 -1
  182. package/dist/utils/WithFluent.mjs +9 -3
  183. package/dist/utils/create.mjs +7 -1
  184. package/package.json +2 -1
@@ -1,4 +1,13 @@
1
- const F = ({ height: w, token: i, evenRowBgColor: y, table: o, gap: I, borderColor: R, scrollbarWidth: e, other: u }) => {
1
+ const F = ({
2
+ height: w,
3
+ token: i,
4
+ evenRowBgColor: y,
5
+ table: o,
6
+ gap: I,
7
+ borderColor: R,
8
+ scrollbarWidth: e,
9
+ other: u
10
+ }) => {
2
11
  var h, g, r, x, n, T, p, s, d, $, m, H, C, S, f, c, k, z, B, v;
3
12
  return {
4
13
  height: w,
@@ -7,10 +7,17 @@ function S(t) {
7
7
  return e != null && e.isOperationCol || e != null && e.isCheckboxCol || e != null && e.isExpandIconCol || I.includes(e) ? e : (o != null && o.children && (o.children = S(o == null ? void 0 : o.children)), {
8
8
  ...o,
9
9
  sorter: !1,
10
- render: (c, d, n) => E.jsx(O, { active: !0, title: !1, paragraph: {
11
- rows: 1,
12
- width: (n + 1) % 2 === 0 ? "100%" : "60%"
13
- } })
10
+ render: (c, d, n) => /* @__PURE__ */ E.jsx(
11
+ O,
12
+ {
13
+ active: !0,
14
+ title: !1,
15
+ paragraph: {
16
+ rows: 1,
17
+ width: (n + 1) % 2 === 0 ? "100%" : "60%"
18
+ }
19
+ }
20
+ )
14
21
  });
15
22
  });
16
23
  }
@@ -15,9 +15,18 @@ const c = "-", m = a`
15
15
  }
16
16
  `, f = ({ value: o, children: s }) => {
17
17
  const t = e(() => o || c, [o]), i = e(() => r ? { open: !1 } : { title: t }, [r, t]);
18
- return p.jsx(l.Text, { ellipsis: {
19
- tooltip: i
20
- }, style: { fontSize: "inherit", width: "100%" }, copyable: !!o, className: m, children: s || t });
18
+ return /* @__PURE__ */ p.jsx(
19
+ l.Text,
20
+ {
21
+ ellipsis: {
22
+ tooltip: i
23
+ },
24
+ style: { fontSize: "inherit", width: "100%" },
25
+ copyable: !!o,
26
+ className: m,
27
+ children: s || t
28
+ }
29
+ );
21
30
  }, T = n(f);
22
31
  export {
23
32
  T as default
@@ -5,36 +5,56 @@ import { BitzTableContext as de } from "../../Store/index.mjs";
5
5
  import q from "../../../BitzButton/index.mjs";
6
6
  import he from "../../../BitzTheme/index.mjs";
7
7
  import xe from "./StylesConfig/index.mjs";
8
- import Ce from "./ColumnsSort/index.mjs";
9
- import ye from "./ExportConfig/index.mjs";
8
+ import ye from "./ColumnsSort/index.mjs";
9
+ import Ce from "./ExportConfig/index.mjs";
10
10
  import { BitzConfigContext as Se } from "../../../BitzConfigProvider/context.mjs";
11
11
  import He from "../Modal/index.mjs";
12
12
  import { blockGap as J, modalHeaderHeight as P, modalFooterHeight as Q } from "../Modal/style.mjs";
13
13
  import je from "../../../../node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
14
14
  import Ee from "../../../../node_modules/lodash-es/omit.mjs";
15
- const Te = "导出设置", Ae = ({ open: p, title: U, onChange: u, close: g, getContainer: X }) => {
16
- const { token: b } = he.useToken(), [s, i] = f(-1), [Y, d] = f(!1);
15
+ const Te = "导出设置", Ae = ({
16
+ open: p,
17
+ title: U,
18
+ onChange: u,
19
+ close: g,
20
+ getContainer: X
21
+ }) => {
22
+ const { token: b } = he.useToken(), [n, i] = f(-1), [Y, d] = f(!1);
17
23
  f(!1);
18
- const [Z, c] = f(!1), { persistenceType: _, persistenceKey: k, onlineChange: h, setColumnsMap: ee, stylesStorageType: te, stylesStorageKey: v, setTableStylesConfig: x, onlineStylesConfigChange: C, defaultTableExportConfig: oe, exportStorageType: re, exportStorageKey: w, setTableExportConfig: ne, onlineExportConfigChange: y } = W(de), a = W(Se).Table, m = l(null), B = l(null), S = l(null), se = async () => {
19
- var z, D, K, M, O, V, N, A, L;
24
+ const [Z, c] = f(!1), {
25
+ persistenceType: _,
26
+ persistenceKey: k,
27
+ onlineChange: h,
28
+ setColumnsMap: ee,
29
+ stylesStorageType: te,
30
+ stylesStorageKey: v,
31
+ setTableStylesConfig: x,
32
+ onlineStylesConfigChange: y,
33
+ defaultTableExportConfig: oe,
34
+ exportStorageType: re,
35
+ exportStorageKey: w,
36
+ setTableExportConfig: se,
37
+ onlineExportConfigChange: C
38
+ } = W(de), a = W(Se).Table, m = l(null), B = l(null), S = l(null), ne = async () => {
39
+ var F, K, M, O, V, N, L, A, D;
20
40
  if (Z)
21
41
  return;
22
42
  c(!0);
23
- const e = (z = m.current) == null ? void 0 : z.getCheckedKeys();
43
+ const e = (F = m.current) == null ? void 0 : F.getCheckedKeys();
24
44
  if (!(e != null && e.length)) {
25
45
  i(2), I.error("表格至少需要显示一列"), c(!1);
26
46
  return;
27
47
  }
28
- if (!((D = S.current) == null ? void 0 : D.hasOne())) {
48
+ if (!((K = S.current) == null ? void 0 : K.hasOne())) {
29
49
  i(3), I.error("导出设置至少需要一个字段"), c(!1);
30
50
  return;
31
51
  }
32
- const o = (K = B.current) == null ? void 0 : K.getFormInstance(), n = await (o == null ? void 0 : o.getFieldsValue()), fe = Ee(n, "stylesScope"), T = {
33
- ...(M = m.current) == null ? void 0 : M.getLeftSortColumns(),
34
- ...(O = m.current) == null ? void 0 : O.getCenterSortColumns(),
35
- ...(V = m.current) == null ? void 0 : V.getRightSortColumns()
36
- }, R = ((N = S.current) == null ? void 0 : N.getExportConfig()) ?? oe;
37
- x == null || x(fe), (A = a == null ? void 0 : a.setStylesScope) == null || A.call(a, n.stylesScope ? "global" : "current"), ee(T), ne(R), te === "online" && v && (C == null || C(v, n)), _ === "online" && k && (h == null || h(k, T)), re === "online" && w && (y == null || y(w, R)), c(!1), u ? (d(!0), (L = u == null ? void 0 : u(n, T, R)) == null || L.finally(() => {
52
+ const o = (M = B.current) == null ? void 0 : M.getFormInstance(), s = await (o == null ? void 0 : o.getFieldsValue()), fe = Ee(s, "stylesScope"), T = {
53
+ ...(O = m.current) == null ? void 0 : O.getLeftSortColumns(),
54
+ ...(V = m.current) == null ? void 0 : V.getCenterSortColumns(),
55
+ ...(N = m.current) == null ? void 0 : N.getRightSortColumns()
56
+ }, R = ((L = S.current) == null ? void 0 : L.getExportConfig()) ?? oe;
57
+ x == null || x(fe), (A = a == null ? void 0 : a.setStylesScope) == null || A.call(a, s.stylesScope ? "global" : "current"), ee(T), se(R), te === "online" && v && (y == null || y(v, s)), _ === "online" && k && (h == null || h(k, T)), re === "online" && w && (C == null || C(w, R)), c(!1), u ? (d(!0), (D = u == null ? void 0 : u(s, T, R)) == null || D.finally(() => {
38
58
  d(!1), g();
39
59
  })) : g();
40
60
  };
@@ -51,29 +71,83 @@ const Te = "导出设置", Ae = ({ open: p, title: U, onChange: u, close: g, get
51
71
  var o;
52
72
  const e = (o = j.current) == null ? void 0 : o.clientHeight, r = window.innerHeight - J - P - Q - 48 - e - 32;
53
73
  E.current[2] = window.innerHeight - J, ae(r);
54
- }, F = (e, r) => {
55
- var n;
56
- const o = (n = j.current) == null ? void 0 : n.clientHeight;
74
+ }, z = (e, r) => {
75
+ var s;
76
+ const o = (s = j.current) == null ? void 0 : s.clientHeight;
57
77
  E.current[r] = P + Q + 48 + 32 + o + e;
58
78
  };
59
79
  return $(() => {
60
80
  var r, o;
61
81
  const e = (o = (r = H.current) == null ? void 0 : r.parentElement) == null ? void 0 : o.parentElement;
62
- e && (e.style.height = `${E.current[s]}px`);
63
- }, [s]), $(() => {
82
+ e && (e.style.height = `${E.current[n]}px`);
83
+ }, [n]), $(() => {
64
84
  p && i(1);
65
- }, [p]), t.jsx(He, { open: p, title: U, close: g, closeAfter: le, getContainer: X, footer: t.jsxs(t.Fragment, { children: [t.jsx(q, {
66
- type: "primary",
67
- icon: t.jsx(je, {}),
68
- onClick: se,
69
- // disabled={!isEdit}
70
- loading: Y,
71
- children: "保存"
72
- }), t.jsx(q, { onClick: g, children: "取消" })] }), children: t.jsx(ue, { className: "container", bordered: !1, ref: H, children: t.jsxs(G, { vertical: !0, align: "center", children: [t.jsx("div", { className: "segmentedWrapper", ref: j, children: t.jsx(ge, { size: "large", options: [
73
- { label: "外观设置", value: 1 },
74
- { label: "列设置", value: 2 },
75
- { label: Te, value: 3 }
76
- ], value: s, onChange: ie }) }), t.jsxs(G, { className: "containerBody", children: [t.jsx(xe, { ref: B, postHeight: (e) => F(e, 1), display: s === 1 }), t.jsx(Ce, { ref: m, postHeight: me, height: ce, display: s === 2 }), t.jsx(ye, { refInstance: S, postHeight: (e) => F(e, 3), display: s === 3, showSelectRadio: !1 })] })] }) }) });
85
+ }, [p]), /* @__PURE__ */ t.jsx(
86
+ He,
87
+ {
88
+ open: p,
89
+ title: U,
90
+ close: g,
91
+ closeAfter: le,
92
+ getContainer: X,
93
+ footer: /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
94
+ /* @__PURE__ */ t.jsx(
95
+ q,
96
+ {
97
+ type: "primary",
98
+ icon: /* @__PURE__ */ t.jsx(je, {}),
99
+ onClick: ne,
100
+ loading: Y,
101
+ children: "保存"
102
+ }
103
+ ),
104
+ /* @__PURE__ */ t.jsx(q, { onClick: g, children: "取消" })
105
+ ] }),
106
+ children: /* @__PURE__ */ t.jsx(ue, { className: "container", bordered: !1, ref: H, children: /* @__PURE__ */ t.jsxs(G, { vertical: !0, align: "center", children: [
107
+ /* @__PURE__ */ t.jsx("div", { className: "segmentedWrapper", ref: j, children: /* @__PURE__ */ t.jsx(
108
+ ge,
109
+ {
110
+ size: "large",
111
+ options: [
112
+ { label: "外观设置", value: 1 },
113
+ { label: "列设置", value: 2 },
114
+ { label: Te, value: 3 }
115
+ ],
116
+ value: n,
117
+ onChange: ie
118
+ }
119
+ ) }),
120
+ /* @__PURE__ */ t.jsxs(G, { className: "containerBody", children: [
121
+ /* @__PURE__ */ t.jsx(
122
+ xe,
123
+ {
124
+ ref: B,
125
+ postHeight: (e) => z(e, 1),
126
+ display: n === 1
127
+ }
128
+ ),
129
+ /* @__PURE__ */ t.jsx(
130
+ ye,
131
+ {
132
+ ref: m,
133
+ postHeight: me,
134
+ height: ce,
135
+ display: n === 2
136
+ }
137
+ ),
138
+ /* @__PURE__ */ t.jsx(
139
+ Ce,
140
+ {
141
+ refInstance: S,
142
+ postHeight: (e) => z(e, 3),
143
+ display: n === 3,
144
+ showSelectRadio: !1
145
+ }
146
+ )
147
+ ] })
148
+ ] }) })
149
+ }
150
+ );
77
151
  };
78
152
  export {
79
153
  Ae as default,
@@ -1,29 +1,58 @@
1
- import { j as t } from "../../../../../node_modules/react/jsx-runtime.mjs";
1
+ import { j as e } from "../../../../../node_modules/react/jsx-runtime.mjs";
2
2
  import F, { useState as E, useMemo as M } from "react";
3
3
  import { useSortable as O } from "../../../../../node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
4
- import { CSS as k } from "../../../../../node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs";
5
- import { theme as j, Flex as p, Checkbox as _, Tooltip as v } from "antd";
4
+ import { CSS as v } from "../../../../../node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs";
5
+ import { theme as j, Flex as d, Checkbox as _, Tooltip as k } from "antd";
6
6
  import $ from "../../../../../node_modules/classnames/index.mjs";
7
7
  import q from "../../../../../assets/iconfont/IconDragOrder.mjs";
8
8
  import u from "../../../../../assets/iconfont/IconColumnFixedLeft.mjs";
9
9
  import x from "../../../../../assets/iconfont/IconColumnFixedRight.mjs";
10
10
  import g from "../../../../../assets/iconfont/IconColumnCancelFixed.mjs";
11
- const h = ({ icon: e, className: i, open: o, title: r, onClick: s }) => {
11
+ const h = ({ icon: t, className: i, open: o, title: r, onClick: s }) => {
12
12
  const { token: n } = j.useToken();
13
- return t.jsx(v, { getTooltipContainer: (a) => a.parentElement, title: r, open: o ? !1 : void 0, children: t.jsx(e, { size: n.fontSize + 4, className: i, onClick: s }) });
14
- }, A = ({ item: e, isDragOverlay: i, placement: o, onLeftClick: r, onRightClick: s, onCheckboxChange: n }) => {
15
- const { attributes: a, isDragging: l, setNodeRef: I, listeners: y, transform: S, transition: N } = O({
16
- id: e == null ? void 0 : e.key
13
+ return /* @__PURE__ */ e.jsx(
14
+ k,
15
+ {
16
+ getTooltipContainer: (a) => a.parentElement,
17
+ title: r,
18
+ open: o ? !1 : void 0,
19
+ children: /* @__PURE__ */ e.jsx(
20
+ t,
21
+ {
22
+ size: n.fontSize + 4,
23
+ className: i,
24
+ onClick: s
25
+ }
26
+ )
27
+ }
28
+ );
29
+ }, A = ({
30
+ item: t,
31
+ isDragOverlay: i,
32
+ placement: o,
33
+ onLeftClick: r,
34
+ onRightClick: s,
35
+ onCheckboxChange: n
36
+ }) => {
37
+ const {
38
+ attributes: a,
39
+ isDragging: l,
40
+ setNodeRef: I,
41
+ listeners: y,
42
+ transform: S,
43
+ transition: N
44
+ } = O({
45
+ id: t == null ? void 0 : t.key
17
46
  // disabled: item?.disabled,
18
47
  }), { token: T } = j.useToken(), w = {
19
48
  transition: N,
20
- transform: k.Transform.toString(S),
49
+ transform: v.Transform.toString(S),
21
50
  ...l && {
22
51
  opacity: 0.6
23
52
  }
24
53
  }, z = ({ target: D }) => {
25
- n == null || n(e.key, D.checked);
26
- }, [c, f] = E(!1), { text: m, icon: d } = M(() => o === "left" ? {
54
+ n == null || n(t.key, D.checked);
55
+ }, [c, f] = E(!1), { text: m, icon: p } = M(() => o === "left" ? {
27
56
  text: {
28
57
  left: "取消固定",
29
58
  right: "固定在右侧"
@@ -51,18 +80,70 @@ const h = ({ icon: e, className: i, open: o, title: r, onClick: s }) => {
51
80
  right: g
52
81
  }
53
82
  }, [o]);
54
- return t.jsxs("div", { className: $({ sortItemDragging: l }, "sortItem", {
55
- showSortItemOperat: c && !i
56
- }), style: w, ref: I, onMouseEnter: () => f(!0), onMouseLeave: () => f(!1), ...a, children: [t.jsx(p, { align: "center", className: "dragIcon", ...y, children: t.jsx(q, { size: T.fontSize + 4, style: { opacity: c ? 1 : 0.3 } }) }), t.jsx(_, {
57
- checked: e.show,
58
- // className={checkboxCls}
59
- onChange: z,
60
- title: e.title,
61
- children: e.title
62
- }), t.jsxs(p, { style: {
63
- height: "100%",
64
- display: c && !i ? "flex" : "none"
65
- }, align: "center", className: "operation pointerCursor", children: [t.jsx(h, { className: "leftOperation", title: m.left, open: l, icon: d.left, onClick: () => r == null ? void 0 : r(e.key, o) }), t.jsx(h, { className: "rightOperation", title: m.right, open: l, icon: d.right, onClick: () => s == null ? void 0 : s(e.key, o) })] })] });
83
+ return /* @__PURE__ */ e.jsxs(
84
+ "div",
85
+ {
86
+ className: $({ sortItemDragging: l }, "sortItem", {
87
+ showSortItemOperat: c && !i
88
+ }),
89
+ style: w,
90
+ ref: I,
91
+ onMouseEnter: () => f(!0),
92
+ onMouseLeave: () => f(!1),
93
+ ...a,
94
+ children: [
95
+ /* @__PURE__ */ e.jsx(d, { align: "center", className: "dragIcon", ...y, children: /* @__PURE__ */ e.jsx(
96
+ q,
97
+ {
98
+ size: T.fontSize + 4,
99
+ style: { opacity: c ? 1 : 0.3 }
100
+ }
101
+ ) }),
102
+ /* @__PURE__ */ e.jsx(
103
+ _,
104
+ {
105
+ checked: t.show,
106
+ onChange: z,
107
+ title: t.title,
108
+ children: t.title
109
+ }
110
+ ),
111
+ /* @__PURE__ */ e.jsxs(
112
+ d,
113
+ {
114
+ style: {
115
+ height: "100%",
116
+ display: c && !i ? "flex" : "none"
117
+ },
118
+ align: "center",
119
+ className: "operation pointerCursor",
120
+ children: [
121
+ /* @__PURE__ */ e.jsx(
122
+ h,
123
+ {
124
+ className: "leftOperation",
125
+ title: m.left,
126
+ open: l,
127
+ icon: p.left,
128
+ onClick: () => r == null ? void 0 : r(t.key, o)
129
+ }
130
+ ),
131
+ /* @__PURE__ */ e.jsx(
132
+ h,
133
+ {
134
+ className: "rightOperation",
135
+ title: m.right,
136
+ open: l,
137
+ icon: p.right,
138
+ onClick: () => s == null ? void 0 : s(t.key, o)
139
+ }
140
+ )
141
+ ]
142
+ }
143
+ )
144
+ ]
145
+ }
146
+ );
66
147
  }, W = F.memo(A);
67
148
  export {
68
149
  W as default
@@ -1,17 +1,26 @@
1
1
  import { j as s } from "../../../../../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/@dnd-kit/core/dist/core.esm.mjs";
4
- import { restrictToVerticalAxis as K, restrictToWindowEdges as A } from "../../../../../node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs";
5
- import { SortableContext as N, verticalListSortingStrategy as O, arrayMove as R } from "../../../../../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/@dnd-kit/core/dist/core.esm.mjs";
4
+ import { restrictToVerticalAxis as k, restrictToWindowEdges as A } from "../../../../../node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs";
5
+ import { SortableContext as N, verticalListSortingStrategy as O, arrayMove as T } from "../../../../../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/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