bitz-react-admin-ui 2.7.5 → 2.7.7

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 (185) hide show
  1. package/dist/_virtual/index2.mjs +2 -2
  2. package/dist/_virtual/index3.mjs +2 -2
  3. package/dist/assets/iconfont/IconChenggong.mjs +25 -4
  4. package/dist/assets/iconfont/IconClose.mjs +24 -3
  5. package/dist/assets/iconfont/IconColumnCancelFixed.mjs +23 -2
  6. package/dist/assets/iconfont/IconColumnFixedLeft.mjs +27 -6
  7. package/dist/assets/iconfont/IconColumnFixedRight.mjs +27 -6
  8. package/dist/assets/iconfont/IconCuowu.mjs +23 -2
  9. package/dist/assets/iconfont/IconDragOrder.mjs +25 -4
  10. package/dist/assets/iconfont/IconDuigoux.mjs +25 -4
  11. package/dist/assets/iconfont/IconFabu.mjs +35 -5
  12. package/dist/assets/iconfont/IconFanhui.mjs +25 -4
  13. package/dist/assets/iconfont/IconGaojisousuo.mjs +26 -5
  14. package/dist/assets/iconfont/IconHangfengexian.mjs +41 -3
  15. package/dist/assets/iconfont/IconHangliefengexian.mjs +42 -4
  16. package/dist/assets/iconfont/IconIcFluentHomeRegular.mjs +26 -5
  17. package/dist/assets/iconfont/IconIcon21.mjs +25 -4
  18. package/dist/assets/iconfont/IconJincoude.mjs +25 -4
  19. package/dist/assets/iconfont/IconJinggao.mjs +25 -4
  20. package/dist/assets/iconfont/IconKuansongde.mjs +26 -5
  21. package/dist/assets/iconfont/IconLiefengexian.mjs +41 -3
  22. package/dist/assets/iconfont/IconMore.mjs +41 -4
  23. package/dist/assets/iconfont/IconShanchu.mjs +27 -6
  24. package/dist/assets/iconfont/IconShanchu1.mjs +35 -5
  25. package/dist/assets/iconfont/IconSousuo.mjs +27 -6
  26. package/dist/assets/iconfont/IconTejincou.mjs +25 -4
  27. package/dist/assets/iconfont/IconTekuansong.mjs +26 -5
  28. package/dist/assets/iconfont/IconTishi1.mjs +27 -6
  29. package/dist/assets/iconfont/IconTuodong.mjs +28 -7
  30. package/dist/assets/iconfont/IconWubanmawentianchong.mjs +35 -3
  31. package/dist/assets/iconfont/IconWufengexian.mjs +26 -4
  32. package/dist/assets/iconfont/IconXinxitishi.mjs +27 -6
  33. package/dist/assets/iconfont/IconYoubanmawentianchong.mjs +34 -3
  34. package/dist/assets/iconfont/IconZhongdengde.mjs +24 -3
  35. package/dist/assets/iconfont/IconZhongzhi.mjs +24 -3
  36. package/dist/assets/iconfont/index.mjs +33 -33
  37. package/dist/components/BitzAddTag/index.mjs +41 -8
  38. package/dist/components/BitzAddressBook/index.mjs +122 -35
  39. package/dist/components/BitzAppPage/index.mjs +18 -4
  40. package/dist/components/BitzAppRefresh/index.mjs +27 -15
  41. package/dist/components/BitzBetterScroll/index.mjs +5 -5
  42. package/dist/components/BitzButton/index.mjs +23 -9
  43. package/dist/components/BitzCalendar/index.mjs +52 -19
  44. package/dist/components/BitzCascader/BitzCascaderMobile.mjs +68 -30
  45. package/dist/components/BitzCascader/index.mjs +6 -2
  46. package/dist/components/BitzCollapse/index.mjs +4 -4
  47. package/dist/components/BitzConfigProvider/context.mjs +3 -1
  48. package/dist/components/BitzConfigProvider/index.mjs +12 -8
  49. package/dist/components/BitzConfirmModal/index.mjs +24 -1
  50. package/dist/components/BitzDescriptions/index.mjs +11 -1
  51. package/dist/components/BitzDrawer/index.mjs +17 -2
  52. package/dist/components/BitzEmpty/index.mjs +6 -2
  53. package/dist/components/BitzException/index.mjs +6 -1
  54. package/dist/components/BitzFloatLayout/index.mjs +10 -1
  55. package/dist/components/BitzFluentDatePicker/index.mjs +1 -1
  56. package/dist/components/BitzFluentRangePicker/index.mjs +1 -1
  57. package/dist/components/BitzFluentRangeTimePicker/index.mjs +1 -1
  58. package/dist/components/BitzFluentTimePicker/index.mjs +6 -6
  59. package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +13 -16
  60. package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +26 -20
  61. package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +21 -3
  62. package/dist/components/BitzFuiCalendar/CalendarBody.mjs +27 -4
  63. package/dist/components/BitzFuiCalendar/CalendarHead.mjs +5 -2
  64. package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +12 -3
  65. package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +47 -15
  66. package/dist/components/BitzFuiCalendar/ColumnData.mjs +25 -9
  67. package/dist/components/BitzFuiCalendar/FuiCalendarItem.mjs +44 -8
  68. package/dist/components/BitzFuiCalendar/index.mjs +7 -1
  69. package/dist/components/BitzFullScreen/index.mjs +9 -6
  70. package/dist/components/BitzHighlight/Child.mjs +23 -9
  71. package/dist/components/BitzHighlight/Highlight.mjs +26 -5
  72. package/dist/components/BitzHighlight/chunks.mjs +20 -17
  73. package/dist/components/BitzHighlight/style.mjs +4 -1
  74. package/dist/components/BitzImage/index.mjs +1 -1
  75. package/dist/components/BitzImage/previewImage.mjs +12 -5
  76. package/dist/components/BitzLanguageTabs/index.mjs +14 -3
  77. package/dist/components/BitzLazyLoad/index.mjs +7 -1
  78. package/dist/components/BitzList/List.mjs +17 -3
  79. package/dist/components/BitzList/LoadMore.mjs +29 -20
  80. package/dist/components/BitzLoadMore/index.mjs +34 -14
  81. package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +24 -11
  82. package/dist/components/BitzMeetingTime/index.mjs +10 -6
  83. package/dist/components/BitzMobileLoading/index.mjs +1 -1
  84. package/dist/components/BitzModal/index.mjs +24 -11
  85. package/dist/components/BitzNoData/index.mjs +4 -1
  86. package/dist/components/BitzNoMore/index.mjs +1 -1
  87. package/dist/components/BitzOrganizationSelection/index.mjs +43 -14
  88. package/dist/components/BitzPageContainer/index.mjs +107 -46
  89. package/dist/components/BitzPageHeader/index.mjs +89 -21
  90. package/dist/components/BitzPagination/index.mjs +71 -22
  91. package/dist/components/BitzPopover/index.mjs +4 -4
  92. package/dist/components/BitzPullRefresh/PullRefresh.mjs +47 -18
  93. package/dist/components/BitzQRCode/index.mjs +6 -1
  94. package/dist/components/BitzQueryFilter/QueryFilterContent.mjs +35 -17
  95. package/dist/components/BitzQueryFilter/QueryFilterDrawer.mjs +20 -13
  96. package/dist/components/BitzQueryFilter/QueryFilterMobile.mjs +4 -1
  97. package/dist/components/BitzQueryFilter/index.mjs +69 -20
  98. package/dist/components/BitzRefresh/index.mjs +5 -1
  99. package/dist/components/BitzRemark/index.mjs +4 -4
  100. package/dist/components/BitzScheduleCenter/index.mjs +24 -30
  101. package/dist/components/BitzSearch/index.mjs +1 -1
  102. package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +123 -48
  103. package/dist/components/BitzSelect/index.mjs +1 -1
  104. package/dist/components/BitzSkeleton/index.mjs +31 -1
  105. package/dist/components/BitzSwitch/index.mjs +7 -2
  106. package/dist/components/BitzTabbar/BitzTabbar.mjs +25 -8
  107. package/dist/components/BitzTabbar/BitzTabbarItem.mjs +4 -1
  108. package/dist/components/BitzTable/ActionBar/ActionBar.mjs +80 -12
  109. package/dist/components/BitzTable/ActionBar/Button.mjs +20 -15
  110. package/dist/components/BitzTable/ActionBar/style.mjs +12 -9
  111. package/dist/components/BitzTable/ActionCol/index.mjs +184 -55
  112. package/dist/components/BitzTable/ActionCol/style.mjs +15 -12
  113. package/dist/components/BitzTable/Dropdown/index.mjs +8 -1
  114. package/dist/components/BitzTable/Dropdown/style.mjs +9 -6
  115. package/dist/components/BitzTable/SelectionBar/Button.mjs +19 -6
  116. package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +11 -4
  117. package/dist/components/BitzTable/SelectionBar/style.mjs +18 -8
  118. package/dist/components/BitzTable/Store/index.mjs +103 -62
  119. package/dist/components/BitzTable/Store/utils/index.mjs +5 -5
  120. package/dist/components/BitzTable/SubTable/index.mjs +122 -73
  121. package/dist/components/BitzTable/Table/ResizableTitle copy.mjs +43 -21
  122. package/dist/components/BitzTable/Table/SortTableContext.mjs +39 -17
  123. package/dist/components/BitzTable/Table/SortableRow.mjs +44 -20
  124. package/dist/components/BitzTable/Table/index.mjs +444 -211
  125. package/dist/components/BitzTable/Table/style.mjs +10 -1
  126. package/dist/components/BitzTable/Table/utils.mjs +11 -4
  127. package/dist/components/BitzTable/TextOverflow/index.mjs +12 -3
  128. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +105 -31
  129. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +104 -23
  130. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +68 -29
  131. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +325 -159
  132. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +50 -16
  133. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +42 -16
  134. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +135 -38
  135. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +9 -2
  136. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/ScopeSwitch.mjs +18 -5
  137. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +121 -49
  138. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +62 -18
  139. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +59 -16
  140. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +42 -14
  141. package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +17 -4
  142. package/dist/components/BitzTable/ToolBar/Modal/index.mjs +46 -14
  143. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +20 -9
  144. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +49 -2
  145. package/dist/components/BitzTable/ToolBar/style.mjs +6 -1
  146. package/dist/components/BitzTable/index.d.ts +2 -0
  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/classnames/index.mjs +1 -1
  181. package/dist/node_modules/react-is/index.mjs +1 -1
  182. package/dist/style.css +1 -1
  183. package/dist/utils/WithFluent.mjs +9 -3
  184. package/dist/utils/create.mjs +7 -1
  185. package/package.json +1 -1
@@ -1,21 +1,26 @@
1
- import { j as n } from "../../../../../node_modules/react/jsx-runtime.mjs";
1
+ import { j as t } from "../../../../../node_modules/react/jsx-runtime.mjs";
2
2
  import { BitzTableContext as Q } from "../../../Store/index.mjs";
3
3
  import U from "../../../../BitzTheme/index.mjs";
4
4
  import { findParentFirstNodeByClass as W } from "../../../../../utils/findNode.mjs";
5
5
  import { css as X } from "../../../../../node_modules/@emotion/css/dist/emotion-css.esm.mjs";
6
- import { Form as k, Flex as C, Checkbox as Y, Button as Z, Radio as d, InputNumber as H, Select as ee } from "antd";
7
- import { memo as ne, useRef as D, useEffect as I, useMemo as p, useContext as te, useState as h, useImperativeHandle as oe } from "react";
6
+ import { Form as T, Flex as C, Checkbox as Y, Button as Z, Radio as u, InputNumber as H, Select as ee } from "antd";
7
+ import { memo as te, useRef as I, useEffect as K, useMemo as p, useContext as ne, useState as h, useImperativeHandle as oe } from "react";
8
8
  import le from "./DndList.mjs";
9
9
  import se from "../../../../../node_modules/lodash-es/merge.mjs";
10
10
  import re from "../../../../../node_modules/@ant-design/icons/es/icons/RedoOutlined.mjs";
11
- function ie({ display: s, postHeight: r, showSelectRadio: j = !1, refInstance: M }) {
12
- const { token: K } = U.useToken();
13
- D(null);
14
- const m = D(null);
15
- I(() => {
11
+ function ae({
12
+ display: s,
13
+ postHeight: r,
14
+ showSelectRadio: j = !1,
15
+ refInstance: M
16
+ }) {
17
+ const { token: O } = U.useToken();
18
+ I(null);
19
+ const m = I(null);
20
+ K(() => {
16
21
  m.current && (r == null || r(m.current.clientHeight));
17
22
  }, [m.current]);
18
- const O = p(() => ({
23
+ const P = p(() => ({
19
24
  // display: display ? 'flex' : 'none'
20
25
  width: s ? "100%" : 0,
21
26
  pointerEvents: s ? "auto" : "none",
@@ -26,62 +31,154 @@ function ie({ display: s, postHeight: r, showSelectRadio: j = !1, refInstance: M
26
31
  left: 0,
27
32
  right: 0
28
33
  }
29
- }), [s]), i = te(Q), b = i.defaultTableExportConfig, y = i.exportConfigHardCodedValue, v = i.exportConfig, w = i.selected, t = i.pagination, a = i.total, [c, A] = h([]), [u, f] = h([]), [E, F] = h("current"), [x, T] = h("page"), [B, N] = h(1);
30
- I(() => {
31
- var R, S, V, z;
34
+ }), [s]), a = ne(Q), N = a.defaultTableExportConfig, y = a.exportConfigHardCodedValue, v = a.exportConfig, w = a.selected, n = a.pagination, i = a.total, [c, A] = h([]), [f, d] = h([]), [k, b] = h("current"), [x, R] = h("page"), [E, S] = h(1);
35
+ K(() => {
36
+ var V, z, B, F;
32
37
  let e = { ...v };
33
- y && (e = se(v, y)), f(e.fields), A(e.fields.map((J) => J.field));
38
+ y && (e = se(v, y)), d(e.fields), A(e.fields.map((J) => J.field));
34
39
  let g = j && w ? "selectedRows" : e.config.key;
35
- F(g), T(((S = (R = e.config) == null ? void 0 : R.info) == null ? void 0 : S.type) ?? "page"), N(((z = (V = e.config) == null ? void 0 : V.info) == null ? void 0 : z.value) ?? 1);
40
+ b(g), R(((z = (V = e.config) == null ? void 0 : V.info) == null ? void 0 : z.type) ?? "page"), S(((F = (B = e.config) == null ? void 0 : B.info) == null ? void 0 : F.value) ?? 1);
36
41
  }, [v, y, j, w]);
37
- const l = p(() => u.filter((e) => e.show).map((e) => e.field), [u]), P = p(() => c.length === l.length, [c, l]), L = p(() => l.length > 0 && l.length < c.length, [l, c]), _ = ({ target: e }) => {
38
- f(u.map((o) => ({ ...o, show: e.checked })));
42
+ const l = p(() => f.filter((e) => e.show).map((e) => e.field), [f]), D = p(() => c.length === l.length, [c, l]), L = p(() => l.length > 0 && l.length < c.length, [l, c]), _ = ({ target: e }) => {
43
+ d(f.map((o) => ({ ...o, show: e.checked })));
39
44
  }, $ = (e, o) => {
40
- f(e), A(o);
45
+ d(e), A(o);
41
46
  }, G = p(() => {
42
47
  if (x === "page") {
43
- if (a && (t != null && t.size)) {
44
- let e = Math.floor(a / (t == null ? void 0 : t.size));
45
- return a % (t == null ? void 0 : t.size) && e++, e;
48
+ if (i && (n != null && n.size)) {
49
+ let e = Math.floor(i / (n == null ? void 0 : n.size));
50
+ return i % (n == null ? void 0 : n.size) && e++, e;
46
51
  }
47
52
  return 1;
48
53
  }
49
- return a;
50
- }, [x, t, a]), q = () => {
51
- f(b.fields), F(b.config.key);
54
+ return i;
55
+ }, [x, n, i]), q = () => {
56
+ d(N.fields), b(N.config.key);
52
57
  };
53
58
  return oe(M, () => ({
54
59
  getExportConfig: () => {
55
60
  const e = {
56
61
  fields: [],
57
62
  config: {
58
- key: E,
63
+ key: k,
59
64
  info: void 0
60
65
  }
61
66
  };
62
- return u.forEach((o) => {
67
+ return f.forEach((o) => {
63
68
  let g = !1;
64
69
  l.includes(o.field) && (g = !0), e.fields.push({ ...o, show: g });
65
- }), E === "any" && (e.config.info = {
70
+ }), k === "any" && (e.config.info = {
66
71
  type: x,
67
- value: (B || 0) < 1 ? 1 : B || 1
72
+ value: (E || 0) < 1 ? 1 : E || 1
68
73
  }), { ...e };
69
74
  },
70
75
  hasOne: () => l.length > 0
71
- })), n.jsx("div", { ref: m, style: O, children: n.jsxs(k, { style: { width: "100%" }, labelCol: { span: 3 }, labelAlign: "left", colon: !1, className: "exportConfigFormContent", ...r && {
72
- style: { paddingTop: 16 }
73
- }, children: [n.jsx(k.Item, { label: "导出字段", className: "exportFields", children: n.jsxs(C, { gap: 8, vertical: !0, children: [n.jsxs(C, { gap: 20, className: "checkAllAndReset", children: [n.jsx(Y, { checked: P, indeterminate: L, onChange: _, style: { alignSelf: "flex-start" }, children: n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "全选" }) }), r && n.jsx(Z, { type: "link", icon: n.jsx(re, {}), size: "small", onClick: q, className: X`
76
+ })), /* @__PURE__ */ t.jsx("div", { ref: m, style: P, children: /* @__PURE__ */ t.jsxs(
77
+ T,
78
+ {
79
+ style: { width: "100%" },
80
+ labelCol: { span: 3 },
81
+ labelAlign: "left",
82
+ colon: !1,
83
+ className: "exportConfigFormContent",
84
+ ...r && {
85
+ style: { paddingTop: 16 }
86
+ },
87
+ children: [
88
+ /* @__PURE__ */ t.jsx(T.Item, { label: "导出字段", className: "exportFields", children: /* @__PURE__ */ t.jsxs(C, { gap: 8, vertical: !0, children: [
89
+ /* @__PURE__ */ t.jsxs(C, { gap: 20, className: "checkAllAndReset", children: [
90
+ /* @__PURE__ */ t.jsx(
91
+ Y,
92
+ {
93
+ checked: D,
94
+ indeterminate: L,
95
+ onChange: _,
96
+ style: { alignSelf: "flex-start" },
97
+ children: /* @__PURE__ */ t.jsx("span", { style: { whiteSpace: "nowrap" }, children: "全选" })
98
+ }
99
+ ),
100
+ r && /* @__PURE__ */ t.jsx(
101
+ Z,
102
+ {
103
+ type: "link",
104
+ icon: /* @__PURE__ */ t.jsx(re, {}),
105
+ size: "small",
106
+ onClick: q,
107
+ className: X`
74
108
  &:hover {
75
- color: ${K.colorPrimary} !important;
109
+ color: ${O.colorPrimary} !important;
76
110
  }
77
- `, children: n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "重置" }) })] }), n.jsx(le, { dataList: u, keys: c, onChange: f, onMoveEnd: $ })] }) }), n.jsx(k.Item, { label: "导出设置", className: "exportTotal", ...r && {
78
- style: { paddingBottom: 8 }
79
- }, children: n.jsx(d.Group, { value: E, onChange: ({ target: e }) => F(e.value), children: n.jsxs(C, { vertical: !0, gap: 8, align: "flex-start", children: [j && w && n.jsx(d, { value: "selectedRows", children: "导出选中数据" }), n.jsx(d, { value: "current", children: "仅导出当前页" }), n.jsx(d, { value: "any", children: n.jsxs(C, { align: "center", gap: 8, children: [n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "导出" }), n.jsx(H, { controls: !1, precision: 0, min: 1, max: G, value: B, onChange: (e) => N(e), style: { width: 120 }, addonAfter: n.jsx(ee, { value: x, onChange: T, options: [
80
- { label: "页", value: "page" },
81
- { label: "条", value: "pieces" }
82
- ], onClick: (e) => e.preventDefault(), getPopupContainer: (e) => W(e, "containerBody") }) }), n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "数据" })] }) }), n.jsx(d, { value: "all", children: "导出全部数据" })] }) }) })] }) });
111
+ `,
112
+ children: /* @__PURE__ */ t.jsx("span", { style: { whiteSpace: "nowrap" }, children: "重置" })
113
+ }
114
+ )
115
+ ] }),
116
+ /* @__PURE__ */ t.jsx(
117
+ le,
118
+ {
119
+ dataList: f,
120
+ keys: c,
121
+ onChange: d,
122
+ onMoveEnd: $
123
+ }
124
+ )
125
+ ] }) }),
126
+ /* @__PURE__ */ t.jsx(
127
+ T.Item,
128
+ {
129
+ label: "导出设置",
130
+ className: "exportTotal",
131
+ ...r && {
132
+ style: { paddingBottom: 8 }
133
+ },
134
+ children: /* @__PURE__ */ t.jsx(
135
+ u.Group,
136
+ {
137
+ value: k,
138
+ onChange: ({ target: e }) => b(e.value),
139
+ children: /* @__PURE__ */ t.jsxs(C, { vertical: !0, gap: 8, align: "flex-start", children: [
140
+ j && w && /* @__PURE__ */ t.jsx(u, { value: "selectedRows", children: "导出选中数据" }),
141
+ /* @__PURE__ */ t.jsx(u, { value: "current", children: "仅导出当前页" }),
142
+ /* @__PURE__ */ t.jsx(u, { value: "any", children: /* @__PURE__ */ t.jsxs(C, { align: "center", gap: 8, children: [
143
+ /* @__PURE__ */ t.jsx("span", { style: { whiteSpace: "nowrap" }, children: "导出" }),
144
+ /* @__PURE__ */ t.jsx(
145
+ H,
146
+ {
147
+ controls: !1,
148
+ precision: 0,
149
+ min: 1,
150
+ max: G,
151
+ value: E,
152
+ onChange: (e) => S(e),
153
+ style: { width: 120 },
154
+ addonAfter: /* @__PURE__ */ t.jsx(
155
+ ee,
156
+ {
157
+ value: x,
158
+ onChange: R,
159
+ options: [
160
+ { label: "页", value: "page" },
161
+ { label: "条", value: "pieces" }
162
+ ],
163
+ onClick: (e) => e.preventDefault(),
164
+ getPopupContainer: (e) => W(e, "containerBody")
165
+ }
166
+ )
167
+ }
168
+ ),
169
+ /* @__PURE__ */ t.jsx("span", { style: { whiteSpace: "nowrap" }, children: "数据" })
170
+ ] }) }),
171
+ /* @__PURE__ */ t.jsx(u, { value: "all", children: "导出全部数据" })
172
+ ] })
173
+ }
174
+ )
175
+ }
176
+ )
177
+ ]
178
+ }
179
+ ) });
83
180
  }
84
- const Ce = ne(ie);
181
+ const Ce = te(ae);
85
182
  export {
86
183
  Ce as default
87
184
  };
@@ -1,6 +1,13 @@
1
1
  import { j as r } from "../../../../../node_modules/react/jsx-runtime.mjs";
2
2
  import { Radio as i, Flex as o, Typography as s } from "antd";
3
- const x = ({ label: e, value: t, children: a }) => r.jsx(i, { value: t, children: r.jsxs(o, { vertical: !0, align: "center", gap: 8, children: [a, r.jsx(s.Text, { children: e })] }) });
3
+ const d = ({
4
+ label: e,
5
+ value: t,
6
+ children: a
7
+ }) => /* @__PURE__ */ r.jsx(i, { value: t, children: /* @__PURE__ */ r.jsxs(o, { vertical: !0, align: "center", gap: 8, children: [
8
+ a,
9
+ /* @__PURE__ */ r.jsx(s.Text, { children: e })
10
+ ] }) });
4
11
  export {
5
- x as default
12
+ d as default
6
13
  };
@@ -1,9 +1,22 @@
1
1
  import { j as e } from "../../../../../node_modules/react/jsx-runtime.mjs";
2
- import { Flex as c, Switch as u } from "antd";
3
- import { useId as i } from "react";
4
- const r = "stylesScope", h = ({ value: o, disabled: t, onChange: l }) => {
5
- const s = i();
6
- return e.jsxs(c, { align: "center", gap: 10, children: [e.jsx("label", { htmlFor: `${r}${s}`, className: "stylesScopeLabel", children: "应用到全局表格" }), e.jsx(u, { id: `${r}${s}`, value: o, onChange: l, disabled: t, checkedChildren: "是", unCheckedChildren: "否" })] });
2
+ import { Flex as l, Switch as i } from "antd";
3
+ import { useId as n } from "react";
4
+ const s = "stylesScope", h = ({ value: t, disabled: o, onChange: c }) => {
5
+ const r = n();
6
+ return /* @__PURE__ */ e.jsxs(l, { align: "center", gap: 10, children: [
7
+ /* @__PURE__ */ e.jsx("label", { htmlFor: `${s}${r}`, className: "stylesScopeLabel", children: "应用到全局表格" }),
8
+ /* @__PURE__ */ e.jsx(
9
+ i,
10
+ {
11
+ id: `${s}${r}`,
12
+ value: t,
13
+ onChange: c,
14
+ disabled: o,
15
+ checkedChildren: "是",
16
+ unCheckedChildren: "否"
17
+ }
18
+ )
19
+ ] });
7
20
  };
8
21
  export {
9
22
  h as default
@@ -1,36 +1,36 @@
1
1
  import { j as e } from "../../../../../node_modules/react/jsx-runtime.mjs";
2
- import T from "../../../../../assets/iconfont/IconKuansongde.mjs";
3
- import A from "../../../../../assets/iconfont/IconTekuansong.mjs";
4
- import G from "../../../../../assets/iconfont/IconJincoude.mjs";
5
- import N from "../../../../../assets/iconfont/IconZhongdengde.mjs";
6
- import W from "../../../../../assets/iconfont/IconTejincou.mjs";
7
- import D from "../../../../../assets/iconfont/IconWufengexian.mjs";
8
- import V from "../../../../../assets/iconfont/IconHangliefengexian.mjs";
9
- import $ from "../../../../../assets/iconfont/IconHangfengexian.mjs";
2
+ import G from "../../../../../assets/iconfont/IconKuansongde.mjs";
3
+ import N from "../../../../../assets/iconfont/IconTekuansong.mjs";
4
+ import W from "../../../../../assets/iconfont/IconJincoude.mjs";
5
+ import E from "../../../../../assets/iconfont/IconZhongdengde.mjs";
6
+ import A from "../../../../../assets/iconfont/IconTejincou.mjs";
7
+ import V from "../../../../../assets/iconfont/IconWufengexian.mjs";
8
+ import $ from "../../../../../assets/iconfont/IconHangliefengexian.mjs";
9
+ import D from "../../../../../assets/iconfont/IconHangfengexian.mjs";
10
10
  import J from "../../../../../assets/iconfont/IconLiefengexian.mjs";
11
11
  import K from "../../../../../assets/iconfont/IconYoubanmawentianchong.mjs";
12
12
  import L from "../../../../../assets/iconfont/IconWubanmawentianchong.mjs";
13
13
  import { BitzConfigContext as M } from "../../../../BitzConfigProvider/context.mjs";
14
14
  import { BitzTableContext as O } from "../../../Store/index.mjs";
15
15
  import Y from "../../../../BitzTheme/index.mjs";
16
- import { Form as n, Radio as p, Row as Z, Col as I, Button as q } from "antd";
16
+ import { Form as n, Radio as p, Row as Z, Col as P, Button as q } from "antd";
17
17
  import Q from "../../../../../node_modules/classnames/index.mjs";
18
- import { forwardRef as U, useRef as P, useEffect as x, useMemo as X, useContext as h, useImperativeHandle as _, useState as ee, memo as oe } from "react";
18
+ import { forwardRef as U, useRef as v, useEffect as x, useMemo as X, useContext as h, useImperativeHandle as _, useState as ee, memo as oe } from "react";
19
19
  import { BitzToolBarContext as re } from "../../Wrapper/context.mjs";
20
20
  import s from "./RadioCard.mjs";
21
21
  import le from "./ScopeSwitch.mjs";
22
22
  import se from "../../../../../node_modules/@ant-design/icons/es/icons/RedoOutlined.mjs";
23
- const te = ({ defaultSize: l, items: u }) => u.map((t) => t.key === l ? {
23
+ const te = ({ defaultSize: l, items: d }) => d.map((t) => t.key === l ? {
24
24
  ...t,
25
25
  label: `${t.label}(默认)`
26
- } : t), ie = U(({ display: l, postHeight: u }, t) => {
26
+ } : t), ie = U(({ display: l, postHeight: d }, t) => {
27
27
  var j, g;
28
- const { token: o } = Y.useToken(), y = P(null);
28
+ const { token: o } = Y.useToken(), y = v(null);
29
29
  x(() => {
30
30
  var r;
31
- u((r = y.current) == null ? void 0 : r.clientHeight);
31
+ d((r = y.current) == null ? void 0 : r.clientHeight);
32
32
  }, []);
33
- const v = X(() => ({
33
+ const C = X(() => ({
34
34
  display: "flex",
35
35
  width: l ? "100%" : 0,
36
36
  pointerEvents: l ? "auto" : "none",
@@ -44,79 +44,151 @@ const te = ({ defaultSize: l, items: u }) => u.map((t) => t.key === l ? {
44
44
  }), [l]), S = {
45
45
  size: 26,
46
46
  color: o.colorPrimary
47
- }, [a] = n.useForm(), B = (j = h(M).Table) == null ? void 0 : j.stylesScope, { defaultTableSize: w, stylesConfig: E, defaultTableStylesConfig: b } = h(O), i = (g = h(re).config) == null ? void 0 : g.stylesConfig, d = (r, c) => {
48
- var C, z;
47
+ }, [a] = n.useForm(), w = (j = h(M).Table) == null ? void 0 : j.stylesScope, { defaultTableSize: H, stylesConfig: R, defaultTableStylesConfig: b } = h(O), i = (g = h(re).config) == null ? void 0 : g.stylesConfig, u = (r, c) => {
48
+ var z, I;
49
49
  let m = c;
50
- return (C = i == null ? void 0 : i[r]) != null && C.disabled && (m = Q(c, "disabledControl")), {
51
- disabled: (z = i == null ? void 0 : i[r]) == null ? void 0 : z.disabled,
50
+ return (z = i == null ? void 0 : i[r]) != null && z.disabled && (m = Q(c, "disabledControl")), {
51
+ disabled: (I = i == null ? void 0 : i[r]) == null ? void 0 : I.disabled,
52
52
  className: m
53
53
  };
54
54
  };
55
55
  x(() => {
56
56
  a.setFieldsValue({
57
57
  ...b,
58
- ...E,
59
- stylesScope: B === "global"
58
+ ...R,
59
+ stylesScope: w === "global"
60
60
  });
61
61
  }, []);
62
- const H = () => {
62
+ const k = () => {
63
63
  a.setFieldsValue({
64
64
  ...b,
65
65
  stylesScope: !1
66
66
  });
67
- }, R = te({
68
- defaultSize: w,
67
+ }, T = te({
68
+ defaultSize: H,
69
69
  items: [
70
70
  {
71
71
  key: "xs",
72
72
  label: "特紧凑",
73
- icon: W
73
+ icon: A
74
74
  },
75
75
  {
76
76
  key: "sm",
77
77
  label: "紧凑",
78
- icon: G
78
+ icon: W
79
79
  },
80
80
  {
81
81
  key: "md",
82
82
  label: "中等",
83
- icon: N
83
+ icon: E
84
84
  },
85
85
  {
86
86
  key: "lg",
87
87
  label: "宽松",
88
- icon: T
88
+ icon: G
89
89
  },
90
90
  {
91
91
  key: "xl",
92
92
  label: "特宽松",
93
- icon: A
93
+ icon: N
94
94
  }
95
95
  ]
96
96
  });
97
97
  _(t, () => ({
98
98
  getFormInstance: () => a
99
99
  }));
100
- const f = P(null), [F, k] = ee("auto");
100
+ const f = v(null), [B, F] = ee("auto");
101
101
  return x(() => {
102
- f && k(f.current.clientWidth + 10);
103
- }, []), e.jsx("div", { style: v, ref: y, children: e.jsxs(n, { form: a, style: { width: "100%" }, labelCol: { span: 3 }, labelAlign: "left", colon: !1, className: "stylesConfigFormContent", children: [e.jsx(n.Item, { label: "行高", name: "size", children: e.jsx(p.Group, { ...d("size", "sizeRadioGroup"), children: R.map(({ key: r, label: c, icon: m }) => e.jsx(s, { label: c, value: r, children: e.jsx(m, { ...S }) }, r)) }) }), e.jsx(n.Item, { label: "分割线", name: "bordered", children: e.jsxs(p.Group, { ...d("bordered", "splitBorderRadioGroup"), children: [e.jsx(s, { label: "无分割线", value: "hide", children: e.jsx(D, { size: 26, color: o.colorPrimaryHover }) }), e.jsx(s, { label: "行分割线", value: "row", children: e.jsx($, { size: 26, color: [
104
- o.colorPrimaryHover,
105
- o.colorPrimary,
106
- o.colorPrimary,
107
- o.colorPrimaryHover
108
- ] }) }), e.jsx(s, { label: "列分割线", value: "column", children: e.jsx(J, { size: 26, color: [
109
- o.colorPrimaryHover,
110
- o.colorPrimary,
111
- o.colorPrimary,
112
- o.colorPrimaryHover
113
- ] }) }), e.jsx(s, { label: "行列分割线", value: "row-column", children: e.jsx(V, { size: 26, color: [
114
- o.colorPrimaryHover,
115
- o.colorPrimary,
116
- o.colorPrimary,
117
- o.colorPrimaryHover
118
- ] }) })] }) }), e.jsx(n.Item, { label: "斑马纹", name: "zebra", children: e.jsxs(p.Group, { ...d("zebra", "zebraRadioGroup"), children: [e.jsx(s, { label: "有斑马纹", value: !0, children: e.jsx(K, { size: 26, color: [o.colorPrimaryHover, o.colorPrimary] }) }), e.jsx(s, { label: "无斑马纹", value: !1, children: e.jsx(L, { size: 26, color: o.colorPrimaryHover }) })] }) }), e.jsxs(Z, { gutter: 16, className: "scopeAndReset", children: [e.jsx(I, { ref: f, style: { width: F }, className: "scope", children: e.jsx(n.Item, { name: "stylesScope", children: e.jsx(le, {}) }) }), e.jsx(I, { style: { alignSelf: "flex-end" }, className: "reset", children: e.jsx(q, { type: "link", icon: e.jsx(se, {}), size: "small", onClick: H, children: "重置" }) })] })] }) });
119
- }), Ee = oe(ie);
102
+ f && F(f.current.clientWidth + 10);
103
+ }, []), /* @__PURE__ */ e.jsx("div", { style: C, ref: y, children: /* @__PURE__ */ e.jsxs(
104
+ n,
105
+ {
106
+ form: a,
107
+ style: { width: "100%" },
108
+ labelCol: { span: 3 },
109
+ labelAlign: "left",
110
+ colon: !1,
111
+ className: "stylesConfigFormContent",
112
+ children: [
113
+ /* @__PURE__ */ e.jsx(n.Item, { label: "行高", name: "size", children: /* @__PURE__ */ e.jsx(p.Group, { ...u("size", "sizeRadioGroup"), children: T.map(({ key: r, label: c, icon: m }) => /* @__PURE__ */ e.jsx(s, { label: c, value: r, children: /* @__PURE__ */ e.jsx(m, { ...S }) }, r)) }) }),
114
+ /* @__PURE__ */ e.jsx(n.Item, { label: "分割线", name: "bordered", children: /* @__PURE__ */ e.jsxs(
115
+ p.Group,
116
+ {
117
+ ...u("bordered", "splitBorderRadioGroup"),
118
+ children: [
119
+ /* @__PURE__ */ e.jsx(s, { label: "无分割线", value: "hide", children: /* @__PURE__ */ e.jsx(V, { size: 26, color: o.colorPrimaryHover }) }),
120
+ /* @__PURE__ */ e.jsx(s, { label: "行分割线", value: "row", children: /* @__PURE__ */ e.jsx(
121
+ D,
122
+ {
123
+ size: 26,
124
+ color: [
125
+ o.colorPrimaryHover,
126
+ o.colorPrimary,
127
+ o.colorPrimary,
128
+ o.colorPrimaryHover
129
+ ]
130
+ }
131
+ ) }),
132
+ /* @__PURE__ */ e.jsx(s, { label: "列分割线", value: "column", children: /* @__PURE__ */ e.jsx(
133
+ J,
134
+ {
135
+ size: 26,
136
+ color: [
137
+ o.colorPrimaryHover,
138
+ o.colorPrimary,
139
+ o.colorPrimary,
140
+ o.colorPrimaryHover
141
+ ]
142
+ }
143
+ ) }),
144
+ /* @__PURE__ */ e.jsx(s, { label: "行列分割线", value: "row-column", children: /* @__PURE__ */ e.jsx(
145
+ $,
146
+ {
147
+ size: 26,
148
+ color: [
149
+ o.colorPrimaryHover,
150
+ o.colorPrimary,
151
+ o.colorPrimary,
152
+ o.colorPrimaryHover
153
+ ]
154
+ }
155
+ ) })
156
+ ]
157
+ }
158
+ ) }),
159
+ /* @__PURE__ */ e.jsx(n.Item, { label: "斑马纹", name: "zebra", children: /* @__PURE__ */ e.jsxs(p.Group, { ...u("zebra", "zebraRadioGroup"), children: [
160
+ /* @__PURE__ */ e.jsx(s, { label: "有斑马纹", value: !0, children: /* @__PURE__ */ e.jsx(
161
+ K,
162
+ {
163
+ size: 26,
164
+ color: [o.colorPrimaryHover, o.colorPrimary]
165
+ }
166
+ ) }),
167
+ /* @__PURE__ */ e.jsx(s, { label: "无斑马纹", value: !1, children: /* @__PURE__ */ e.jsx(
168
+ L,
169
+ {
170
+ size: 26,
171
+ color: o.colorPrimaryHover
172
+ }
173
+ ) })
174
+ ] }) }),
175
+ /* @__PURE__ */ e.jsxs(Z, { gutter: 16, className: "scopeAndReset", children: [
176
+ /* @__PURE__ */ e.jsx(P, { ref: f, style: { width: B }, className: "scope", children: /* @__PURE__ */ e.jsx(n.Item, { name: "stylesScope", children: /* @__PURE__ */ e.jsx(le, {}) }) }),
177
+ /* @__PURE__ */ e.jsx(P, { style: { alignSelf: "flex-end" }, className: "reset", children: /* @__PURE__ */ e.jsx(
178
+ q,
179
+ {
180
+ type: "link",
181
+ icon: /* @__PURE__ */ e.jsx(se, {}),
182
+ size: "small",
183
+ onClick: k,
184
+ children: "重置"
185
+ }
186
+ ) })
187
+ ] })
188
+ ]
189
+ }
190
+ ) });
191
+ }), Re = oe(ie);
120
192
  export {
121
- Ee as default
193
+ Re as default
122
194
  };
@@ -1,18 +1,25 @@
1
1
  import { j as t } from "../../../../node_modules/react/jsx-runtime.mjs";
2
- import { useRef as v, useContext as B, useState as S, useEffect as b, useMemo as w } from "react";
3
- import { theme as D, Popconfirm as E, Statistic as F } from "antd";
4
- import k from "./ColumnConfigModal.mjs";
5
- import z from "../style.mjs";
6
- import I from "../../../BitzButton/index.mjs";
7
- import { BitzTableContext as R } from "../../Store/index.mjs";
8
- import { css as A } from "../../../../node_modules/@emotion/css/dist/emotion-css.esm.mjs";
9
- import N from "../../../../node_modules/@ant-design/icons/es/icons/SettingOutlined.mjs";
10
- const c = "表格设置", K = (e) => {
11
- const { order: f, show: m = !0, icon: d = t.jsx(N, {}) } = e, { token: p } = D.useToken(), i = v(), { fullscreen: r, isSaving: n, countdown: o, cancelAutoSave: x, immediateSave: a, setCountdown: C } = B(R), { toolbarItemClassName: g } = z(), [h, l] = S(!1);
12
- b(() => (n && o > 0 ? i.current = setInterval(() => {
13
- C((s) => s - 1);
14
- }, 1e3) : clearInterval(i.current), o === 0 && n && a(), () => clearInterval(i.current)), [n, o]);
15
- const j = w(() => r ? !1 : void 0, [r]), y = A`
2
+ import { useRef as y, useContext as S, useState as b, useEffect as w, useMemo as k } from "react";
3
+ import { theme as z, Popconfirm as I, Statistic as R } from "antd";
4
+ import B from "./ColumnConfigModal.mjs";
5
+ import N from "../style.mjs";
6
+ import E from "../../../BitzButton/index.mjs";
7
+ import { BitzTableContext as M } from "../../Store/index.mjs";
8
+ import { css as O } from "../../../../node_modules/@emotion/css/dist/emotion-css.esm.mjs";
9
+ import T from "../../../../node_modules/@ant-design/icons/es/icons/SettingOutlined.mjs";
10
+ const f = "表格设置", K = (e) => {
11
+ const { order: m, show: u = !0, icon: d = /* @__PURE__ */ t.jsx(T, {}) } = e, { token: p } = z.useToken(), s = y(), {
12
+ fullscreen: r,
13
+ isSaving: n,
14
+ countdown: o,
15
+ cancelAutoSave: x,
16
+ immediateSave: a,
17
+ setCountdown: C
18
+ } = S(M), { toolbarItemClassName: g } = N(), [h, l] = b(!1);
19
+ w(() => (n && o > 0 ? s.current = setInterval(() => {
20
+ C((i) => i - 1);
21
+ }, 1e3) : clearInterval(s.current), o === 0 && n && a(), () => clearInterval(s.current)), [n, o]);
22
+ const j = k(() => r ? !1 : void 0, [r]), v = O`
16
23
  .ant-statistic {
17
24
  display: inline-block;
18
25
  }
@@ -36,10 +43,47 @@ const c = "表格设置", K = (e) => {
36
43
  }
37
44
  }
38
45
  `;
39
- return m ? t.jsxs(t.Fragment, { children: [t.jsx(k, { open: h, title: c, onChange: async (...s) => {
40
- var u;
41
- return (u = e.onChange) == null ? void 0 : u.call(e, ...s);
42
- }, getContainer: j, close: () => l(!1) }), t.jsx(E, { placement: "topRight", title: "是否保存列宽设置", open: n, description: t.jsxs("span", { children: [t.jsx(F, { value: o, suffix: "秒" }), "后将自动保存"] }), onConfirm: a, onCancel: x, overlayClassName: y, children: t.jsx(I, { type: "text", className: g, onClick: () => l(!0), icon: d, style: { order: f }, children: c }) })] }) : null;
46
+ return u ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
47
+ /* @__PURE__ */ t.jsx(
48
+ B,
49
+ {
50
+ open: h,
51
+ title: f,
52
+ onChange: async (...i) => {
53
+ var c;
54
+ return (c = e.onChange) == null ? void 0 : c.call(e, ...i);
55
+ },
56
+ getContainer: j,
57
+ close: () => l(!1)
58
+ }
59
+ ),
60
+ /* @__PURE__ */ t.jsx(
61
+ I,
62
+ {
63
+ placement: "topRight",
64
+ title: "是否保存列宽设置",
65
+ open: n,
66
+ description: /* @__PURE__ */ t.jsxs("span", { children: [
67
+ /* @__PURE__ */ t.jsx(R, { value: o, suffix: "秒" }),
68
+ "后将自动保存"
69
+ ] }),
70
+ onConfirm: a,
71
+ onCancel: x,
72
+ overlayClassName: v,
73
+ children: /* @__PURE__ */ t.jsx(
74
+ E,
75
+ {
76
+ type: "text",
77
+ className: g,
78
+ onClick: () => l(!0),
79
+ icon: d,
80
+ style: { order: m },
81
+ children: f
82
+ }
83
+ )
84
+ }
85
+ )
86
+ ] }) : null;
43
87
  };
44
88
  export {
45
89
  K as default