bitz-react-admin-ui 2.0.9 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/dist/assets/iconfont/IconChenggong.mjs +4 -10
  2. package/dist/assets/iconfont/IconClose.mjs +1 -7
  3. package/dist/assets/iconfont/IconCuowu.mjs +2 -8
  4. package/dist/assets/iconfont/IconDuigoux.mjs +2 -8
  5. package/dist/assets/iconfont/IconFabu.mjs +3 -18
  6. package/dist/assets/iconfont/IconFanhui.mjs +5 -11
  7. package/dist/assets/iconfont/IconGaojisousuo.mjs +4 -10
  8. package/dist/assets/iconfont/IconHangfengexian.mjs +4 -27
  9. package/dist/assets/iconfont/IconHangliefengexian.mjs +4 -27
  10. package/dist/assets/iconfont/IconIcFluentHomeRegular.mjs +5 -11
  11. package/dist/assets/iconfont/IconIcon21.mjs +2 -8
  12. package/dist/assets/iconfont/IconJincoude.mjs +3 -9
  13. package/dist/assets/iconfont/IconJinggao.mjs +2 -8
  14. package/dist/assets/iconfont/IconKuansongde.mjs +5 -11
  15. package/dist/assets/iconfont/IconLiefengexian.mjs +5 -28
  16. package/dist/assets/iconfont/IconMore.mjs +4 -26
  17. package/dist/assets/iconfont/IconShanchu.mjs +5 -11
  18. package/dist/assets/iconfont/IconShanchu1.mjs +3 -18
  19. package/dist/assets/iconfont/IconSousuo.mjs +4 -10
  20. package/dist/assets/iconfont/IconTejincou.mjs +1 -7
  21. package/dist/assets/iconfont/IconTekuansong.mjs +5 -11
  22. package/dist/assets/iconfont/IconTishi1.mjs +6 -12
  23. package/dist/assets/iconfont/IconTuodong.mjs +6 -12
  24. package/dist/assets/iconfont/IconWubanmawentianchong.mjs +5 -22
  25. package/dist/assets/iconfont/IconWufengexian.mjs +4 -11
  26. package/dist/assets/iconfont/IconXinxitishi.mjs +3 -9
  27. package/dist/assets/iconfont/IconYoubanmawentianchong.mjs +7 -23
  28. package/dist/assets/iconfont/IconZhongdengde.mjs +4 -10
  29. package/dist/assets/iconfont/IconZhongzhi.mjs +5 -11
  30. package/dist/assets/iconfont/index.mjs +29 -29
  31. package/dist/components/BitzAddTag/index.mjs +8 -41
  32. package/dist/components/BitzAddressBook/index.mjs +35 -122
  33. package/dist/components/BitzAppPage/index.mjs +4 -18
  34. package/dist/components/BitzAppRefresh/index.mjs +15 -27
  35. package/dist/components/BitzBetterScroll/index.mjs +5 -5
  36. package/dist/components/BitzButton/index.mjs +9 -23
  37. package/dist/components/BitzCalendar/index.mjs +19 -52
  38. package/dist/components/BitzCascader/BitzCascaderMobile.mjs +30 -68
  39. package/dist/components/BitzCascader/index.mjs +2 -6
  40. package/dist/components/BitzCollapse/index.mjs +4 -4
  41. package/dist/components/BitzConfigProvider/context.mjs +1 -3
  42. package/dist/components/BitzConfigProvider/index.mjs +8 -12
  43. package/dist/components/BitzConfirmModal/index.mjs +1 -24
  44. package/dist/components/BitzConvert/DropdownToButton/index.mjs +11 -14
  45. package/dist/components/BitzConvert/index.mjs +1 -1
  46. package/dist/components/BitzDescriptions/index.mjs +1 -11
  47. package/dist/components/BitzDrawer/index.mjs +2 -17
  48. package/dist/components/BitzEmpty/index.mjs +2 -6
  49. package/dist/components/BitzException/index.mjs +1 -6
  50. package/dist/components/BitzFloatLayout/index.mjs +1 -10
  51. package/dist/components/BitzFluentInput/index.mjs +4 -23
  52. package/dist/components/BitzFluentSelect/index.mjs +5 -24
  53. package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +16 -13
  54. package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +20 -26
  55. package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +3 -21
  56. package/dist/components/BitzFuiCalendar/CalendarBody.mjs +6 -29
  57. package/dist/components/BitzFuiCalendar/CalendarHead.mjs +2 -5
  58. package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +3 -12
  59. package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +18 -50
  60. package/dist/components/BitzFuiCalendar/ColumnData.mjs +15 -31
  61. package/dist/components/BitzFuiCalendar/FuiCalendarItem.mjs +5 -47
  62. package/dist/components/BitzFuiCalendar/index.mjs +1 -7
  63. package/dist/components/BitzFullScreen/index.mjs +6 -9
  64. package/dist/components/BitzHighlight/Child.mjs +9 -23
  65. package/dist/components/BitzHighlight/Highlight.mjs +5 -26
  66. package/dist/components/BitzHighlight/chunks.mjs +17 -20
  67. package/dist/components/BitzHighlight/style.mjs +1 -4
  68. package/dist/components/BitzImage/index.mjs +1 -1
  69. package/dist/components/BitzImage/previewImage.mjs +5 -12
  70. package/dist/components/BitzLanguageTabs/index.mjs +3 -14
  71. package/dist/components/BitzLazyLoad/index.mjs +1 -7
  72. package/dist/components/BitzList/List.mjs +3 -17
  73. package/dist/components/BitzList/LoadMore.mjs +20 -29
  74. package/dist/components/BitzLoadMore/index.mjs +14 -34
  75. package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +11 -24
  76. package/dist/components/BitzMeetingTime/index.mjs +6 -10
  77. package/dist/components/BitzMobileLoading/index.mjs +1 -1
  78. package/dist/components/BitzModal/index.mjs +11 -24
  79. package/dist/components/BitzNoData/index.mjs +1 -4
  80. package/dist/components/BitzNoMore/index.mjs +1 -1
  81. package/dist/components/BitzOrganizationSelection/index.mjs +14 -43
  82. package/dist/components/BitzPageContainer/index.mjs +46 -107
  83. package/dist/components/BitzPageHeader/index.mjs +21 -89
  84. package/dist/components/BitzPagination/index.mjs +14 -62
  85. package/dist/components/BitzPopover/index.mjs +4 -4
  86. package/dist/components/BitzPullRefresh/PullRefresh.mjs +18 -47
  87. package/dist/components/BitzQRCode/index.mjs +1 -6
  88. package/dist/components/BitzQueryFilter/QueryFilterContent.mjs +17 -35
  89. package/dist/components/BitzQueryFilter/QueryFilterDrawer.mjs +13 -20
  90. package/dist/components/BitzQueryFilter/QueryFilterMobile.mjs +1 -4
  91. package/dist/components/BitzQueryFilter/index.mjs +20 -69
  92. package/dist/components/BitzRefresh/index.mjs +1 -5
  93. package/dist/components/BitzRemark/index.mjs +4 -4
  94. package/dist/components/BitzScheduleCenter/index.mjs +30 -24
  95. package/dist/components/BitzSearch/index.mjs +1 -1
  96. package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +48 -123
  97. package/dist/components/BitzSelect/index.mjs +1 -1
  98. package/dist/components/BitzSkeleton/index.mjs +1 -31
  99. package/dist/components/BitzSwitch/index.mjs +2 -7
  100. package/dist/components/BitzTabbar/BitzTabbar.mjs +8 -25
  101. package/dist/components/BitzTabbar/BitzTabbarItem.mjs +1 -4
  102. package/dist/components/BitzTable/ActionBar/ActionBar.mjs +5 -33
  103. package/dist/components/BitzTable/ActionBar/Button.mjs +1 -1
  104. package/dist/components/BitzTable/ActionBar/style.mjs +9 -12
  105. package/dist/components/BitzTable/ActionCol/index.mjs +16 -90
  106. package/dist/components/BitzTable/ActionCol/style.mjs +12 -15
  107. package/dist/components/BitzTable/Dropdown/index.mjs +1 -8
  108. package/dist/components/BitzTable/Dropdown/style.mjs +6 -9
  109. package/dist/components/BitzTable/SelectionBar/Button.mjs +14 -32
  110. package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +8 -40
  111. package/dist/components/BitzTable/SelectionBar/style.mjs +8 -18
  112. package/dist/components/BitzTable/Store/index.mjs +45 -68
  113. package/dist/components/BitzTable/Table/index.mjs +145 -305
  114. package/dist/components/BitzTable/Table/style.mjs +1 -10
  115. package/dist/components/BitzTable/Table/utils.mjs +4 -11
  116. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +47 -82
  117. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +21 -95
  118. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +28 -68
  119. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.d.ts +2 -2
  120. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +142 -250
  121. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.d.ts +3 -3
  122. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +6 -8
  123. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +2 -9
  124. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.d.ts +2 -2
  125. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +89 -137
  126. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.d.ts +2 -2
  127. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +8 -29
  128. package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.mjs +18 -7
  129. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +6 -33
  130. package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +4 -17
  131. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +10 -27
  132. package/dist/components/BitzTable/ToolBar/Wrapper/context.d.ts +4 -0
  133. package/dist/components/BitzTable/ToolBar/Wrapper/context.mjs +5 -0
  134. package/dist/components/BitzTable/ToolBar/Wrapper/index.d.ts +4 -3
  135. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +18 -60
  136. package/dist/components/BitzTable/ToolBar/index.d.ts +6 -4
  137. package/dist/components/BitzTableOperations/index.mjs +3 -13
  138. package/dist/components/BitzTableSelect/Picker/index.mjs +10 -43
  139. package/dist/components/BitzTableSelect/Select/index.mjs +21 -87
  140. package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +11 -21
  141. package/dist/components/BitzTableSelect/SelectPopup/index.mjs +40 -210
  142. package/dist/components/BitzTableSelect/TableCell/index.mjs +8 -49
  143. package/dist/components/BitzTableSelect/TextBlock/index.mjs +9 -27
  144. package/dist/components/BitzTableSelect/index.mjs +13 -61
  145. package/dist/components/BitzTag/index.mjs +1 -1
  146. package/dist/components/BitzTheme/index.mjs +6 -6
  147. package/dist/components/BitzTimeline/index.mjs +1 -11
  148. package/dist/components/BitzTimer/Form.mjs +11 -32
  149. package/dist/components/BitzTimer/Timer.mjs +38 -76
  150. package/dist/components/BitzTimer/index.mjs +43 -66
  151. package/dist/components/BitzToast/Toast/index.mjs +10 -28
  152. package/dist/components/BitzToast/index.mjs +1 -1
  153. package/dist/components/BitzTree/index.mjs +1 -4
  154. package/dist/components/BitzUeEditor/index.mjs +5 -5
  155. package/dist/components/BitzUpload/index.mjs +43 -81
  156. package/dist/components/BitzWebAppDrawer/index.mjs +4 -35
  157. package/dist/components/BitzWebAppModal/index.mjs +3 -6
  158. package/dist/hooks/use-event-listener.mjs +2 -11
  159. package/dist/hooks/use-lock-fn.mjs +10 -13
  160. package/dist/hooks/use-scroll-parent.mjs +14 -16
  161. package/dist/hooks/useEvent.mjs +4 -7
  162. package/dist/hooks/useMergedState.mjs +11 -11
  163. package/dist/style.css +1 -1
  164. package/dist/utils/create.mjs +1 -7
  165. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
- import { j as o } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { useContext as J, useState as P, useRef as T, useEffect as Q, useMemo as l, useCallback as je } from "react";
1
+ import { j as r } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { useContext as J, useState as E, useRef as v, useEffect as Q, useMemo as l, useCallback as pe } from "react";
3
3
  import { isMobile as Y } from "../../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
4
4
  import { Table as te, Skeleton as at } from "antd";
5
5
  import Z from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
6
- import dt from "../../BitzDrawer/index.mjs";
7
- import ut from "../../BitzPagination/index.mjs";
6
+ import ut from "../../BitzDrawer/index.mjs";
7
+ import dt from "../../BitzPagination/index.mjs";
8
8
  import ht from "../../BitzNoData/index.mjs";
9
9
  import "../../BitzList/index.less.mjs";
10
10
  import ft from "../../BitzList/List.mjs";
@@ -16,177 +16,160 @@ import ee from "../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/e
16
16
  import wt from "../ActionCol/style.mjs";
17
17
  import Bt from "../../BitzTheme/index.mjs";
18
18
  import { BitzConfigContext as zt } from "../../BitzConfigProvider/context.mjs";
19
- import vt from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/table/ExpandIcon.mjs";
19
+ import jt from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/table/ExpandIcon.mjs";
20
20
  import "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/index.mjs";
21
- import jt from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/locale/en_US.mjs";
21
+ import pt from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/locale/en_US.mjs";
22
22
  import { getColumnsWithTool as Nt, loopBuildSkeleton as kt } from "./utils.mjs";
23
- import { getCssVar as pt } from "./style.mjs";
23
+ import { getCssVar as Tt } from "./style.mjs";
24
24
  import "./index.less.mjs";
25
- import { ConfigContext as Tt } from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/context.mjs";
26
- import St from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/at.mjs";
25
+ import { ConfigContext as vt } from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/context.mjs";
26
+ import Lt from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/at.mjs";
27
27
  const Ne = [te.SELECTION_COLUMN, te.EXPAND_COLUMN];
28
- function Lt({
29
- rowHoverable: S,
30
- zebra: re,
28
+ function Mt({
29
+ rowHoverable: L,
30
+ zebra: oe,
31
31
  showPagination: ke = !0,
32
- height: L,
33
- dataSource: d = [],
34
- total: E = 0,
32
+ height: M,
33
+ dataSource: u = [],
34
+ total: A = 0,
35
35
  columns: N,
36
36
  loading: a = !1,
37
- skeletonNum: H = {
37
+ skeletonNum: P = {
38
38
  pc: 10,
39
39
  mobile: 10
40
40
  },
41
- skeletonRender: oe,
42
- skeletonRowNum: pe = 4,
43
- skeletonRowsWidth: Te = ["35%", "100%", "100%", "60%"],
41
+ skeletonRender: re,
42
+ skeletonRowNum: Te = 4,
43
+ skeletonRowsWidth: ve = ["35%", "100%", "100%", "60%"],
44
44
  // mobileLoadEmit,
45
45
  mobileRefreshEmit: ne,
46
- operationFilter: A,
47
- enableControlPage: Se,
46
+ operationFilter: H,
47
+ enableControlPage: Le,
48
48
  pagination: m,
49
- paginationEmit: R = () => {
49
+ paginationEmit: S = () => {
50
50
  },
51
- mobilePageHeight: Mt = 500,
52
- mobileCancelText: Le = "取消",
53
- noDataTitle: Me,
54
- noDataImg: We,
55
- color: Wt,
51
+ mobilePageHeight: Wt = 500,
52
+ mobileCancelText: Me = "取消",
53
+ noDataTitle: We,
54
+ noDataImg: Re,
55
+ color: Rt,
56
56
  size: se,
57
- showTableTool: Re = !0,
57
+ showTableTool: Se = !0,
58
58
  tableAction: De,
59
- tableToolbar: Pe,
60
- selectionBar: Ee,
61
- scroll: u,
59
+ tableToolbar: Ee,
60
+ selectionBar: Ae,
61
+ scroll: d,
62
62
  components: K,
63
63
  expandable: b,
64
64
  rowSelection: z,
65
- resetPage: He,
65
+ resetPage: Pe,
66
66
  ...i
67
67
  }) {
68
68
  var Be, ze;
69
- const { token: x } = Bt.useToken(), { Table: c } = x, { tableSpaceBetweenPage: le = 10 } = c, { gap: Ae } = wt(), { stylesConfig: w, ...M } = J(Ct), ce = (Be = J(zt).Table) == null ? void 0 : Be.rowHoverable, [k, ie] = P(!1), $ = T(void 0), V = T(0), O = T(0), [Ke, I] = P(!1), [f, $e] = P([]);
69
+ const { token: x } = Bt.useToken(), { Table: c } = x, { tableSpaceBetweenPage: le = 10 } = c, { gap: He } = wt(), { stylesConfig: w, ...W } = J(Ct), ce = (Be = J(zt).Table) == null ? void 0 : Be.rowHoverable, [k, ie] = E(!1), $ = v(void 0), F = v(0), V = v(0), [Ke, O] = E(!1), [f, $e] = E([]);
70
70
  Q(() => {
71
- let e = [...d];
71
+ let e = [...u];
72
72
  (m == null ? void 0 : m.page) !== 1 && (e = [...f, ...e]), $e(e);
73
- }, [d]);
74
- const Ve = l(() => !!(f != null && f.length) && (f == null ? void 0 : f.length) >= E, [f, E]), [Oe, Ie] = P([]), _e = (e, t) => {
73
+ }, [u]);
74
+ const Fe = l(() => !!(f != null && f.length) && (f == null ? void 0 : f.length) >= A, [f, A]), [Ve, Oe] = E([]), Ie = (e, t) => {
75
75
  var n;
76
- const r = (n = A == null ? void 0 : A(e, t)) == null ? void 0 : n.filter(
77
- (s) => s.type !== "divider"
78
- );
79
- r != null && r.length && (Ie(r), I(!0));
76
+ const o = (n = H == null ? void 0 : H(e, t)) == null ? void 0 : n.filter((s) => s.type !== "divider");
77
+ o != null && o.length && (Oe(o), O(!0));
80
78
  }, ae = () => {
81
- I(!1);
82
- }, qe = (e) => {
79
+ O(!1);
80
+ }, _e = (e) => {
83
81
  var t;
84
- I(!1), (t = e.onClick) == null || t.call(e);
82
+ O(!1), (t = e.onClick) == null || t.call(e);
85
83
  };
86
84
  Q(() => (document == null || document.addEventListener("fullscreenchange", (e) => {
87
- var t, r, n;
88
- (t = e.target) != null && t.classList.contains("bitzTableBlock") && (ie(!!document.fullscreenElement), (n = (r = document.fullscreenElement) == null ? void 0 : r.classList) != null && n.contains("bitzTableBlock") || ie(!1));
85
+ var t, o, n;
86
+ (t = e.target) != null && t.classList.contains("bitzTableBlock") && (ie(!!document.fullscreenElement), (n = (o = document.fullscreenElement) == null ? void 0 : o.classList) != null && n.contains("bitzTableBlock") || ie(!1));
89
87
  }), document == null ? void 0 : document.removeEventListener("fullscreenchange", () => {
90
88
  })), []);
91
- const g = T(null), _ = ee(g), de = T(null), q = ee(de), ue = T(null), p = ee(ue), Fe = () => {
92
- var r;
93
- const e = (r = g.current) == null ? void 0 : r.querySelectorAll(
94
- "& > .bitzTableContainerBody > .ant-table-wrapper.bitzTable > .ant-spin-nested-loading > .ant-spin-container > .ant-table > .ant-table-container > .ant-table-body > table > .ant-table-tbody > tr:not(.ant-table-measure-row, .ant-table-expanded-row)"
95
- ), t = [];
89
+ const g = v(null), I = ee(g), ue = v(null), _ = ee(ue), de = v(null), T = ee(de), qe = () => {
90
+ var o;
91
+ const e = (o = g.current) == null ? void 0 : o.querySelectorAll("& > .bitzTableContainerBody > .ant-table-wrapper.bitzTable > .ant-spin-nested-loading > .ant-spin-container > .ant-table > .ant-table-container > .ant-table-body > table > .ant-table-tbody > tr:not(.ant-table-measure-row, .ant-table-expanded-row)"), t = [];
96
92
  if (e == null || e.forEach((n) => {
97
93
  var s;
98
- t.push(
99
- ((s = n.querySelector("& > .operationCol .actionGroup")) == null ? void 0 : s.clientWidth) || 0
100
- );
94
+ t.push(((s = n.querySelector("& > .operationCol .actionGroup")) == null ? void 0 : s.clientWidth) || 0);
101
95
  }), t.length)
102
- return Math.ceil(Math.max(...t)) + Ae * 2;
96
+ return Math.ceil(Math.max(...t)) + He * 2;
103
97
  }, he = () => {
104
- var h, C, j;
105
- const e = (h = g.current) == null ? void 0 : h.querySelector(
106
- ".ant-table-body"
107
- ), t = e == null ? void 0 : e.clientWidth, n = ((e == null ? void 0 : e.offsetWidth) || 0) - t > 0, s = (j = (C = g.current) == null ? void 0 : C.querySelector(
108
- ".ant-table-cell-scrollbar"
109
- )) == null ? void 0 : j.offsetWidth;
98
+ var h, C, p;
99
+ const e = (h = g.current) == null ? void 0 : h.querySelector(".ant-table-body"), t = e == null ? void 0 : e.clientWidth, n = ((e == null ? void 0 : e.offsetWidth) || 0) - t > 0, s = (p = (C = g.current) == null ? void 0 : C.querySelector(".ant-table-cell-scrollbar")) == null ? void 0 : p.offsetWidth;
110
100
  return { tbodyWidth: t, scrollbarSize: s, hasScrollBar: n };
111
- }, { y: F, hasScrollBar: fe, scrollbarSize: G } = l(() => {
101
+ }, { y: q, hasScrollBar: fe, scrollbarSize: G } = l(() => {
112
102
  const { hasScrollBar: e, scrollbarSize: t } = he();
113
- if (typeof L > "u")
103
+ if (typeof M > "u")
114
104
  return {
115
105
  hasScrollBar: e,
116
106
  scrollbarSize: t
117
107
  };
118
- let r = 40, n = 40;
108
+ let o = 40, n = 40;
119
109
  if (g.current) {
120
110
  const D = window.getComputedStyle(g.current);
121
- r = parseInt(D.getPropertyValue("--cell-height")), n = parseInt(D.getPropertyValue("--toolbar-height"));
111
+ o = parseInt(D.getPropertyValue("--cell-height")), n = parseInt(D.getPropertyValue("--toolbar-height"));
122
112
  }
123
- const s = (p == null ? void 0 : p.height) || 0, h = s ? le : 0;
124
- return { y: (k ? window.innerHeight : L) - s - h - n - r, hasScrollBar: e, scrollbarSize: t };
113
+ const s = (T == null ? void 0 : T.height) || 0, h = s ? le : 0;
114
+ return { y: (k ? window.innerHeight : M) - s - h - n - o, hasScrollBar: e, scrollbarSize: t };
125
115
  }, [
126
116
  k,
127
- L,
128
- p == null ? void 0 : p.height,
129
- _ == null ? void 0 : _.height,
130
- q == null ? void 0 : q.height
117
+ M,
118
+ T == null ? void 0 : T.height,
119
+ I == null ? void 0 : I.height,
120
+ _ == null ? void 0 : _.height
131
121
  ]), me = l(() => {
132
- let e = (u == null ? void 0 : u.x) ?? 1e3;
133
- return V.current && (e -= V.current), O.current && (e -= O.current * ($.current || 0)), u != null && u.x ? { x: e, y: u.y || F } : u != null && u.y ? { x: e, y: u.y } : { x: e, y: F };
134
- }, [u, F, $.current]), Ge = (e) => {
135
- const t = e.length, r = e.filter((B) => B.width), s = r.map((B) => B.width).reduce((B, X) => B + X, 0);
122
+ let e = (d == null ? void 0 : d.x) ?? 1e3;
123
+ return F.current && (e -= F.current), V.current && (e -= V.current * ($.current || 0)), d != null && d.x ? { x: e, y: d.y || q } : d != null && d.y ? { x: e, y: d.y } : { x: e, y: q };
124
+ }, [d, q, $.current]), Ge = (e) => {
125
+ const t = e.length, o = e.filter((B) => B.width), s = o.map((B) => B.width).reduce((B, X) => B + X, 0);
136
126
  let h = 0;
137
127
  if (g.current) {
138
- const B = window.getComputedStyle(g.current), X = parseInt(
139
- B.getPropertyValue("--toolCell-paddingInline")
140
- );
128
+ const B = window.getComputedStyle(g.current), X = parseInt(B.getPropertyValue("--toolCell-paddingInline"));
141
129
  h = parseInt(B.getPropertyValue("--fontSize")) + 4 + 2 * X;
142
130
  }
143
131
  let C = 0;
144
132
  z && (C += h), b && (C += h);
145
- const { tbodyWidth: j } = he(), y = parseInt(`${me.x}`) || 0, D = Math.max(y, j), ve = (parseInt(`${D}`) || 0) - s - C;
146
- return ve >= 0 ? ve / (t - r.length) : void 0;
147
- }, v = l(() => {
148
- const e = N ?? [], t = e.filter((y) => !Ne.includes(y)), { filterColumns: r, width: n, autoWidthColLength: s } = yt(
149
- t,
150
- M.columnsMap
151
- );
152
- V.current = Math.ceil(n), O.current = s;
153
- const h = r.sort(xt(M.columnsMap));
133
+ const { tbodyWidth: p } = he(), y = parseInt(`${me.x}`) || 0, D = Math.max(y, p), je = (parseInt(`${D}`) || 0) - s - C;
134
+ return je >= 0 ? je / (t - o.length) : void 0;
135
+ }, j = l(() => {
136
+ const e = N ?? [], t = e.filter((y) => !Ne.includes(y)), { filterColumns: o, width: n, autoWidthColLength: s } = yt(t, W.columnsMap);
137
+ F.current = Math.ceil(n), V.current = s;
138
+ const h = o.sort(xt(W.columnsMap));
154
139
  if (Y)
155
140
  return h;
156
141
  const C = Ge(h);
157
142
  $.current = Math.ceil(C ?? 0);
158
- const j = h.map((y) => ({
143
+ const p = h.map((y) => ({
159
144
  ...y,
160
145
  ...y.width ? {
161
- width: y.useMaxWidth ? Fe() ?? y.width : y.width
146
+ width: y.useMaxWidth ? qe() ?? y.width : y.width
162
147
  } : {
163
148
  // 给未设置width的列设置平均数
164
149
  width: C
165
150
  }
166
151
  }));
167
- return Nt(e, j, z, b);
168
- }, [N, M.columnsMap, M.sortKeyColumns]);
152
+ return Nt(e, p, z, b);
153
+ }, [N, W.columnsMap, W.sortKeyColumns]);
169
154
  Q(() => {
170
155
  if (N && N.length > 0) {
171
- const e = N.map(
172
- (t) => (
173
- // @ts-ignore
174
- gt((t == null ? void 0 : t.key) ?? (t == null ? void 0 : t.dataIndex), t == null ? void 0 : t.dataIndex)
175
- )
176
- );
177
- M.setSortKeyColumns(e);
156
+ const e = N.map((t) => (
157
+ // @ts-ignore
158
+ gt((t == null ? void 0 : t.key) ?? (t == null ? void 0 : t.dataIndex), t == null ? void 0 : t.dataIndex)
159
+ ));
160
+ W.setSortKeyColumns(e);
178
161
  }
179
162
  }, [N]);
180
- const be = l(() => kt(v, Ne), [v]), Ue = l(() => a ? be : v, [a, v, be]), Ce = l(() => {
181
- const e = d == null ? void 0 : d.length, t = e > (H.pc ?? 10) ? e >= 20 ? 20 : e : H.pc ?? 10;
163
+ const be = l(() => kt(j, Ne), [j]), Ue = l(() => a ? be : j, [a, j, be]), Ce = l(() => {
164
+ const e = u == null ? void 0 : u.length, t = e > (P.pc ?? 10) ? e >= 20 ? 20 : e : P.pc ?? 10;
182
165
  return Array.from({ length: t }).map((n, s) => ({
183
166
  key: `${Date.now()}${s}`
184
167
  }));
185
- }, [d]), Xe = l(() => a ? Ce : d, [a, d, Ce]), { table: U, locale: Je = jt } = J(Tt), Qe = { ...Je.Table }, Ye = ((ze = U == null ? void 0 : U.expandable) == null ? void 0 : ze.expandIcon) || (b == null ? void 0 : b.expandIcon) || vt(Qe), ye = l(() => {
168
+ }, [u]), Xe = l(() => a ? Ce : u, [a, u, Ce]), { table: U, locale: Je = pt } = J(vt), Qe = { ...Je.Table }, Ye = ((ze = U == null ? void 0 : U.expandable) == null ? void 0 : ze.expandIcon) || (b == null ? void 0 : b.expandIcon) || jt(Qe), ye = l(() => {
186
169
  if (b)
187
170
  return {
188
171
  ...b,
189
- expandedRowRender: () => /* @__PURE__ */ o.jsx(o.Fragment, {}),
172
+ expandedRowRender: () => r.jsx(r.Fragment, {}),
190
173
  expandIcon: (e) => {
191
174
  const t = Ye(e);
192
175
  return {
@@ -209,234 +192,91 @@ function Lt({
209
192
  selectedRowKeys: [],
210
193
  getCheckboxProps: () => ({ disabled: !0 })
211
194
  };
212
- }, [z]), et = l(() => a ? xe : z, [a, z, xe]), tt = l(() => a ? void 0 : i.rowKey, [a, i.rowKey]), ge = l(() => `${se ?? w.size}BitzTable`, [se, w.size]), W = l(() => i.bordered ?? w.bordered, [i.bordered, w.bordered]), rt = l(() => !!["column", "row-column"].includes(W), [W]), ot = je(
213
- (e, t) => {
214
- var n;
215
- if (!i.onRow)
216
- return {};
217
- const r = (n = i.onRow) == null ? void 0 : n.call(i, e, t);
218
- return r.onClick && (r.className = "rowPointerCursor"), r;
219
- },
220
- [i.onRow]
221
- ), nt = l(() => {
195
+ }, [z]), et = l(() => a ? xe : z, [a, z, xe]), tt = l(() => a ? void 0 : i.rowKey, [a, i.rowKey]), ge = l(() => `${se ?? w.size}BitzTable`, [se, w.size]), R = l(() => i.bordered ?? w.bordered, [i.bordered, w.bordered]), ot = l(() => !!["column", "row-column"].includes(R), [R]), rt = pe((e, t) => {
196
+ var n;
197
+ if (!i.onRow)
198
+ return {};
199
+ const o = (n = i.onRow) == null ? void 0 : n.call(i, e, t);
200
+ return o.onClick && (o.className = "rowPointerCursor"), o;
201
+ }, [i.onRow]), nt = l(() => {
222
202
  let e = !1;
223
- return (W === "hide" || W === "column") && (e = !0), Z(
224
- "bitzTableContainer",
225
- { hideBorder: e },
226
- { hasScrollBar: fe },
227
- ge,
228
- i.className
229
- );
230
- }, [i.className, ge, fe, k, W]), st = l(() => ({
203
+ return (R === "hide" || R === "column") && (e = !0), Z("bitzTableContainer", { hideBorder: e }, { hasScrollBar: fe }, ge, i.className);
204
+ }, [i.className, ge, fe, k, R]), st = l(() => ({
231
205
  "--container-bgColor": x.colorBgContainer
232
206
  }), [x.colorBgContainer]), lt = l(() => {
233
- const e = re ?? w.zebra, t = k ? "100%" : L;
234
- let r;
235
- return (G ?? 0) > 0 && (r = G), pt({
207
+ const e = oe ?? w.zebra, t = k ? "100%" : M;
208
+ let o;
209
+ return (G ?? 0) > 0 && (o = G), Tt({
236
210
  height: t,
237
211
  evenRowBgColor: e ? c == null ? void 0 : c.evenRowBgColor : x.colorBgContainer,
238
212
  colorBgContainer: x.colorBgContainer,
239
213
  table: c,
240
214
  gap: le,
241
215
  borderColor: (c == null ? void 0 : c.borderColor) || x.colorBorderSecondary,
242
- scrollbarWidth: r,
216
+ scrollbarWidth: o,
243
217
  other: i.style
244
218
  });
245
219
  }, [
246
220
  i.style,
247
221
  k,
248
- L,
222
+ M,
249
223
  c,
250
- re,
224
+ oe,
251
225
  w == null ? void 0 : w.zebra,
252
226
  G
253
- ]), ct = je(
254
- (e, t, r) => {
255
- const n = t % 2 === 0 ? "oddRow" : "evenRow";
256
- if (i.rowClassName) {
257
- const s = i.rowClassName(e, t, r);
258
- return Z(n, s);
259
- }
260
- return n;
261
- },
262
- [i.rowClassName]
263
- ), we = /* @__PURE__ */ o.jsx(
264
- ft,
265
- {
266
- finished: Ve,
267
- onLoad: async () => (
268
- // @ts-ignore
269
- !a && (R == null ? void 0 : R((m == null ? void 0 : m.page) + 1, m == null ? void 0 : m.size))
270
- ),
271
- loadingText: "加载中...",
272
- finishedText: "没有更多了",
273
- errorText: "加载失败",
274
- children: /* @__PURE__ */ o.jsxs(
275
- "div",
276
- {
277
- className: "mobileList",
278
- style: { backgroundColor: c == null ? void 0 : c.mobileListBgColor },
279
- children: [
280
- f == null ? void 0 : f.map((e, t) => /* @__PURE__ */ o.jsx(
281
- "div",
282
- {
283
- className: "listItem",
284
- style: { backgroundColor: c == null ? void 0 : c.listItemBgColor },
285
- onClick: () => _e(e, t),
286
- children: v == null ? void 0 : v.map((r, n) => {
287
- var s;
288
- return !(r != null && r.mobileHide) && /* @__PURE__ */ o.jsxs(
289
- "div",
290
- {
291
- className: "row",
292
- style: { color: x.colorText },
293
- children: [
294
- !r.mobileHideLabel && /* @__PURE__ */ o.jsxs("div", { className: "label", children: [
295
- `${r.title}`,
296
- ":"
297
- ] }),
298
- /* @__PURE__ */ o.jsx("div", { className: "value", children: ((s = r == null ? void 0 : r.render) == null ? void 0 : s.call(
299
- r,
300
- St(e, (r == null ? void 0 : r.dataIndex) || ""),
301
- e,
302
- t
303
- )) || (e == null ? void 0 : e[r.dataIndex]) })
304
- ]
305
- },
306
- n
307
- );
308
- })
309
- },
310
- t
311
- )),
312
- Array.from({ length: H.mobile ?? 2 }).map((e, t) => /* @__PURE__ */ o.jsx(
313
- "div",
314
- {
315
- className: "listItem",
316
- style: {
317
- display: a ? "block" : "none",
318
- backgroundColor: c == null ? void 0 : c.listItemBgColor
319
- },
320
- children: /* @__PURE__ */ o.jsx("div", { className: "row", children: oe ? oe() : /* @__PURE__ */ o.jsx(
321
- at,
322
- {
323
- title: !1,
324
- paragraph: {
325
- rows: pe,
326
- width: Te
327
- },
328
- active: !0
329
- }
330
- ) })
331
- },
332
- `${Date.now()}${t}`
333
- ))
334
- ]
335
- }
336
- )
227
+ ]), ct = pe((e, t, o) => {
228
+ const n = t % 2 === 0 ? "oddRow" : "evenRow";
229
+ if (i.rowClassName) {
230
+ const s = i.rowClassName(e, t, o);
231
+ return Z(n, s);
337
232
  }
338
- ), it = l(() => {
233
+ return n;
234
+ }, [i.rowClassName]), we = r.jsx(ft, { finished: Fe, onLoad: async () => (
235
+ // @ts-ignore
236
+ !a && (S == null ? void 0 : S((m == null ? void 0 : m.page) + 1, m == null ? void 0 : m.size))
237
+ ), loadingText: "加载中...", finishedText: "没有更多了", errorText: "加载失败", children: r.jsxs("div", { className: "mobileList", style: { backgroundColor: c == null ? void 0 : c.mobileListBgColor }, children: [f == null ? void 0 : f.map((e, t) => r.jsx("div", { className: "listItem", style: { backgroundColor: c == null ? void 0 : c.listItemBgColor }, onClick: () => Ie(e, t), children: j == null ? void 0 : j.map((o, n) => {
238
+ var s;
239
+ return !(o != null && o.mobileHide) && r.jsxs("div", { className: "row", style: { color: x.colorText }, children: [!o.mobileHideLabel && r.jsxs("div", { className: "label", children: [`${o.title}`, ":"] }), r.jsx("div", { className: "value", children: ((s = o == null ? void 0 : o.render) == null ? void 0 : s.call(o, Lt(e, (o == null ? void 0 : o.dataIndex) || ""), e, t)) || (e == null ? void 0 : e[o.dataIndex]) })] }, n);
240
+ }) }, t)), Array.from({ length: P.mobile ?? 2 }).map((e, t) => r.jsx("div", { className: "listItem", style: {
241
+ display: a ? "block" : "none",
242
+ backgroundColor: c == null ? void 0 : c.listItemBgColor
243
+ }, children: r.jsx("div", { className: "row", children: re ? re() : r.jsx(at, { title: !1, paragraph: {
244
+ rows: Te,
245
+ width: ve
246
+ }, active: !0 }) }) }, `${Date.now()}${t}`))] }) }), it = l(() => {
339
247
  if (K)
340
248
  return K;
341
- if (!(S ?? ce ?? !0))
249
+ if (!(L ?? ce ?? !0))
342
250
  return {
343
251
  body: {
344
- cell: ({ onMouseEnter: t, onMouseLeave: r, ...n }) => /* @__PURE__ */ o.jsx("td", { ...n })
252
+ cell: ({ onMouseEnter: t, onMouseLeave: o, ...n }) => r.jsx("td", { ...n })
345
253
  }
346
254
  };
347
- }, [K, S, ce]);
348
- return /* @__PURE__ */ o.jsxs(
349
- "div",
350
- {
351
- className: Z("bitzTableBlock", { fullscreen: k }),
352
- style: st,
353
- children: [
354
- !Y && /* @__PURE__ */ o.jsxs("div", { ref: g, className: nt, style: lt, children: [
355
- /* @__PURE__ */ o.jsxs("div", { className: "bitzTableContainerBody", ref: de, children: [
356
- Re && /* @__PURE__ */ o.jsxs("div", { className: "bitzTableToolbarBlock", children: [
357
- De || /* @__PURE__ */ o.jsx("div", {}),
358
- Pe,
359
- Ee
360
- ] }),
361
- /* @__PURE__ */ o.jsx(
362
- te,
363
- {
364
- ...i,
365
- bordered: rt,
366
- columns: Ue,
367
- dataSource: Xe,
368
- loading: !1,
369
- pagination: !1,
370
- scroll: me,
371
- expandable: Ze,
372
- rowSelection: et,
373
- onRow: ot,
374
- rowClassName: ct,
375
- className: "bitzTable",
376
- components: it,
377
- rowKey: tt
378
- }
379
- )
380
- ] }),
381
- ke && /* @__PURE__ */ o.jsx(
382
- ut,
383
- {
384
- size: "small",
385
- elRefInstance: ue,
386
- enableControl: Se,
387
- pagination: m,
388
- total: E,
389
- dataSource: d,
390
- resetPage: He,
391
- paginationEmit: R
392
- }
393
- )
394
- ] }),
395
- Y && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
396
- (a || (d == null ? void 0 : d.length) > 0) && /* @__PURE__ */ o.jsx(o.Fragment, { children: ne ? (
397
- // @ts-ignore
398
- /* @__PURE__ */ o.jsx(
399
- mt,
400
- {
401
- onRefresh: async () => !a && ne(),
402
- children: we
403
- }
404
- )
405
- ) : we }),
406
- !a && /* @__PURE__ */ o.jsx(ht, { data: d, title: Me, img: We }),
407
- /* @__PURE__ */ o.jsx(
408
- dt,
409
- {
410
- className: "tableMobileDrawer",
411
- open: Ke,
412
- placement: "bottom",
413
- height: "auto",
414
- closable: !1,
415
- onClose: ae,
416
- children: /* @__PURE__ */ o.jsxs("div", { className: "drawerBox", children: [
417
- /* @__PURE__ */ o.jsx("div", { className: "boxBody", children: Oe.map((e, t) => /* @__PURE__ */ o.jsx(
418
- "div",
419
- {
420
- className: "operaList",
421
- onClick: () => qe(e),
422
- ...e.danger && {
423
- style: { color: x.colorError }
424
- },
425
- children: e.label
426
- },
427
- t
428
- )) }),
429
- /* @__PURE__ */ o.jsx("div", { className: "boxLine" }),
430
- /* @__PURE__ */ o.jsx("div", { className: "boxFooter", onClick: ae, children: Le })
431
- ] })
432
- }
433
- )
434
- ] })
435
- ]
436
- }
437
- );
255
+ }, [K, L, ce]);
256
+ return r.jsxs("div", { className: Z("bitzTableBlock", { fullscreen: k }), style: st, children: [!Y && r.jsxs("div", { ref: g, className: nt, style: lt, children: [r.jsxs("div", { className: "bitzTableContainerBody", ref: ue, children: [Se && r.jsxs("div", { className: "bitzTableToolbarBlock", children: [De || r.jsx("div", {}), Ee, Ae] }), r.jsx(te, {
257
+ ...i,
258
+ bordered: ot,
259
+ columns: Ue,
260
+ dataSource: Xe,
261
+ loading: !1,
262
+ pagination: !1,
263
+ scroll: me,
264
+ expandable: Ze,
265
+ rowSelection: et,
266
+ // style={style}
267
+ onRow: rt,
268
+ rowClassName: ct,
269
+ className: "bitzTable",
270
+ components: it,
271
+ rowKey: tt
272
+ })] }), ke && r.jsx(dt, { size: "small", elRefInstance: de, enableControl: Le, pagination: m, total: A, dataSource: u, resetPage: Pe, paginationEmit: S })] }), Y && r.jsxs(r.Fragment, { children: [(a || (u == null ? void 0 : u.length) > 0) && r.jsx(r.Fragment, { children: ne ? (
273
+ // @ts-ignore
274
+ r.jsx(mt, { onRefresh: async () => !a && ne(), children: we })
275
+ ) : we }), !a && r.jsx(ht, { data: u, title: We, img: Re }), r.jsx(ut, { className: "tableMobileDrawer", open: Ke, placement: "bottom", height: "auto", closable: !1, onClose: ae, children: r.jsxs("div", { className: "drawerBox", children: [r.jsx("div", { className: "boxBody", children: Ve.map((e, t) => r.jsx("div", { className: "operaList", onClick: () => _e(e), ...e.danger && {
276
+ style: { color: x.colorError }
277
+ }, children: e.label }, t)) }), r.jsx("div", { className: "boxLine" }), r.jsx("div", { className: "boxFooter", onClick: ae, children: Me })] }) })] })] });
438
278
  }
439
- const lr = (S) => /* @__PURE__ */ o.jsx(bt, { initValue: S, children: /* @__PURE__ */ o.jsx(Lt, { ...S }) });
279
+ const lo = (L) => r.jsx(bt, { initValue: L, children: r.jsx(Mt, { ...L }) });
440
280
  export {
441
- lr as default
281
+ lo as default
442
282
  };
@@ -1,13 +1,4 @@
1
- const j = ({
2
- height: v,
3
- evenRowBgColor: w,
4
- colorBgContainer: e,
5
- table: o,
6
- gap: I,
7
- borderColor: R,
8
- scrollbarWidth: u,
9
- other: V
10
- }) => {
1
+ const j = ({ height: v, evenRowBgColor: w, colorBgContainer: e, table: o, gap: I, borderColor: R, scrollbarWidth: u, other: V }) => {
11
2
  var h, i, g, x, r, n, T, p, s, d, $, H, m, S, C, k, f, z, B, c;
12
3
  return {
13
4
  height: v,
@@ -6,17 +6,10 @@ function a(o, r) {
6
6
  return e != null && e.isOperationCol || e != null && e.isCheckboxCol || e != null && e.isExpandIconCol || r.includes(e) ? e : (n != null && n.children && (n.children = a(n == null ? void 0 : n.children, r)), {
7
7
  ...n,
8
8
  sorter: !1,
9
- render: (d, i, t) => /* @__PURE__ */ f.jsx(
10
- x,
11
- {
12
- active: !0,
13
- title: !1,
14
- paragraph: {
15
- rows: 1,
16
- width: (t + 1) % 2 === 0 ? "100%" : "60%"
17
- }
18
- }
19
- )
9
+ render: (d, i, t) => f.jsx(x, { active: !0, title: !1, paragraph: {
10
+ rows: 1,
11
+ width: (t + 1) % 2 === 0 ? "100%" : "60%"
12
+ } })
20
13
  });
21
14
  });
22
15
  }