bitz-react-admin-ui 2.1.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/dist/assets/iconfont/IconChenggong.mjs +10 -4
  2. package/dist/assets/iconfont/IconClose.mjs +7 -1
  3. package/dist/assets/iconfont/IconCuowu.mjs +8 -2
  4. package/dist/assets/iconfont/IconDuigoux.mjs +8 -2
  5. package/dist/assets/iconfont/IconFabu.mjs +18 -3
  6. package/dist/assets/iconfont/IconFanhui.mjs +11 -5
  7. package/dist/assets/iconfont/IconGaojisousuo.mjs +10 -4
  8. package/dist/assets/iconfont/IconHangfengexian.mjs +27 -4
  9. package/dist/assets/iconfont/IconHangliefengexian.mjs +27 -4
  10. package/dist/assets/iconfont/IconIcFluentHomeRegular.mjs +11 -5
  11. package/dist/assets/iconfont/IconIcon21.mjs +8 -2
  12. package/dist/assets/iconfont/IconJincoude.mjs +9 -3
  13. package/dist/assets/iconfont/IconJinggao.mjs +8 -2
  14. package/dist/assets/iconfont/IconKuansongde.mjs +11 -5
  15. package/dist/assets/iconfont/IconLiefengexian.mjs +28 -5
  16. package/dist/assets/iconfont/IconMore.mjs +26 -4
  17. package/dist/assets/iconfont/IconShanchu.mjs +11 -5
  18. package/dist/assets/iconfont/IconShanchu1.mjs +18 -3
  19. package/dist/assets/iconfont/IconSousuo.mjs +10 -4
  20. package/dist/assets/iconfont/IconTejincou.mjs +7 -1
  21. package/dist/assets/iconfont/IconTekuansong.mjs +11 -5
  22. package/dist/assets/iconfont/IconTishi1.mjs +12 -6
  23. package/dist/assets/iconfont/IconTuodong.mjs +12 -6
  24. package/dist/assets/iconfont/IconWubanmawentianchong.mjs +22 -5
  25. package/dist/assets/iconfont/IconWufengexian.mjs +11 -4
  26. package/dist/assets/iconfont/IconXinxitishi.mjs +9 -3
  27. package/dist/assets/iconfont/IconYoubanmawentianchong.mjs +23 -7
  28. package/dist/assets/iconfont/IconZhongdengde.mjs +10 -4
  29. package/dist/assets/iconfont/IconZhongzhi.mjs +11 -5
  30. package/dist/assets/iconfont/index.mjs +29 -29
  31. package/dist/components/BitzAddTag/index.mjs +41 -8
  32. package/dist/components/BitzAddressBook/index.mjs +122 -35
  33. package/dist/components/BitzAppPage/index.mjs +18 -4
  34. package/dist/components/BitzAppRefresh/index.mjs +27 -15
  35. package/dist/components/BitzBetterScroll/index.mjs +5 -5
  36. package/dist/components/BitzButton/index.mjs +23 -9
  37. package/dist/components/BitzCalendar/index.mjs +52 -19
  38. package/dist/components/BitzCascader/BitzCascaderMobile.mjs +68 -30
  39. package/dist/components/BitzCascader/index.mjs +6 -2
  40. package/dist/components/BitzCollapse/index.mjs +4 -4
  41. package/dist/components/BitzConfigProvider/context.mjs +3 -1
  42. package/dist/components/BitzConfigProvider/index.mjs +14 -13
  43. package/dist/components/BitzConfirmModal/index.mjs +24 -1
  44. package/dist/components/BitzConvert/DropdownToButton/index.mjs +14 -11
  45. package/dist/components/BitzConvert/index.mjs +1 -1
  46. package/dist/components/BitzDescriptions/index.mjs +11 -1
  47. package/dist/components/BitzDrawer/index.mjs +17 -2
  48. package/dist/components/BitzEmpty/index.mjs +6 -2
  49. package/dist/components/BitzException/index.mjs +6 -1
  50. package/dist/components/BitzFloatLayout/index.mjs +10 -1
  51. package/dist/components/BitzFluentInput/index.mjs +23 -4
  52. package/dist/components/BitzFluentSelect/index.mjs +24 -5
  53. package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +13 -16
  54. package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +26 -20
  55. package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +21 -3
  56. package/dist/components/BitzFuiCalendar/CalendarBody.mjs +29 -6
  57. package/dist/components/BitzFuiCalendar/CalendarHead.mjs +5 -2
  58. package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +12 -3
  59. package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +50 -18
  60. package/dist/components/BitzFuiCalendar/ColumnData.mjs +31 -15
  61. package/dist/components/BitzFuiCalendar/FuiCalendarItem.mjs +47 -5
  62. package/dist/components/BitzFuiCalendar/index.mjs +7 -1
  63. package/dist/components/BitzFullScreen/index.mjs +9 -6
  64. package/dist/components/BitzHighlight/Child.mjs +23 -9
  65. package/dist/components/BitzHighlight/Highlight.mjs +26 -5
  66. package/dist/components/BitzHighlight/chunks.mjs +20 -17
  67. package/dist/components/BitzHighlight/style.mjs +4 -1
  68. package/dist/components/BitzImage/index.mjs +1 -1
  69. package/dist/components/BitzImage/previewImage.mjs +12 -5
  70. package/dist/components/BitzLanguageTabs/index.mjs +14 -3
  71. package/dist/components/BitzLazyLoad/index.mjs +7 -1
  72. package/dist/components/BitzList/List.mjs +17 -3
  73. package/dist/components/BitzList/LoadMore.mjs +29 -20
  74. package/dist/components/BitzLoadMore/index.mjs +34 -14
  75. package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +24 -11
  76. package/dist/components/BitzMeetingTime/index.mjs +10 -6
  77. package/dist/components/BitzMobileLoading/index.mjs +1 -1
  78. package/dist/components/BitzModal/index.mjs +24 -11
  79. package/dist/components/BitzNoData/index.mjs +4 -1
  80. package/dist/components/BitzNoMore/index.mjs +1 -1
  81. package/dist/components/BitzOrganizationSelection/index.mjs +43 -14
  82. package/dist/components/BitzPageContainer/index.mjs +107 -46
  83. package/dist/components/BitzPageHeader/index.mjs +89 -21
  84. package/dist/components/BitzPagination/index.mjs +62 -14
  85. package/dist/components/BitzPopover/index.mjs +4 -4
  86. package/dist/components/BitzPullRefresh/PullRefresh.mjs +47 -18
  87. package/dist/components/BitzQRCode/index.mjs +6 -1
  88. package/dist/components/BitzQueryFilter/QueryFilterContent.mjs +35 -17
  89. package/dist/components/BitzQueryFilter/QueryFilterDrawer.mjs +20 -13
  90. package/dist/components/BitzQueryFilter/QueryFilterMobile.mjs +4 -1
  91. package/dist/components/BitzQueryFilter/index.mjs +69 -20
  92. package/dist/components/BitzRefresh/index.mjs +5 -1
  93. package/dist/components/BitzRemark/index.mjs +4 -4
  94. package/dist/components/BitzScheduleCenter/index.mjs +24 -30
  95. package/dist/components/BitzSearch/index.mjs +1 -1
  96. package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +123 -48
  97. package/dist/components/BitzSelect/index.mjs +1 -1
  98. package/dist/components/BitzSkeleton/index.mjs +31 -1
  99. package/dist/components/BitzSwitch/index.mjs +7 -2
  100. package/dist/components/BitzTabbar/BitzTabbar.mjs +25 -8
  101. package/dist/components/BitzTabbar/BitzTabbarItem.mjs +4 -1
  102. package/dist/components/BitzTable/ActionBar/ActionBar.mjs +33 -5
  103. package/dist/components/BitzTable/ActionBar/Button.mjs +1 -1
  104. package/dist/components/BitzTable/ActionBar/style.mjs +12 -9
  105. package/dist/components/BitzTable/ActionCol/index.mjs +90 -16
  106. package/dist/components/BitzTable/ActionCol/style.mjs +15 -12
  107. package/dist/components/BitzTable/Dropdown/index.mjs +8 -1
  108. package/dist/components/BitzTable/Dropdown/style.mjs +9 -6
  109. package/dist/components/BitzTable/SelectionBar/Button.mjs +32 -14
  110. package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +40 -8
  111. package/dist/components/BitzTable/SelectionBar/style.mjs +18 -8
  112. package/dist/components/BitzTable/Store/index.mjs +68 -45
  113. package/dist/components/BitzTable/Table/index.mjs +305 -145
  114. package/dist/components/BitzTable/Table/style.mjs +10 -1
  115. package/dist/components/BitzTable/Table/utils.mjs +11 -4
  116. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +82 -47
  117. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +95 -21
  118. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +68 -28
  119. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +246 -138
  120. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +6 -4
  121. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +9 -2
  122. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +142 -85
  123. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +32 -11
  124. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +33 -6
  125. package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +17 -4
  126. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +27 -10
  127. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +52 -9
  128. package/dist/components/BitzTable/ToolBar/index.d.ts +2 -2
  129. package/dist/components/BitzTable/index.d.ts +2 -2
  130. package/dist/components/BitzTable/index.mjs +2 -2
  131. package/dist/components/BitzTableOperations/index.mjs +13 -3
  132. package/dist/components/BitzTableSelect/Picker/index.mjs +43 -10
  133. package/dist/components/BitzTableSelect/Select/index.mjs +87 -21
  134. package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +21 -11
  135. package/dist/components/BitzTableSelect/SelectPopup/index.mjs +210 -40
  136. package/dist/components/BitzTableSelect/TableCell/index.mjs +49 -8
  137. package/dist/components/BitzTableSelect/TextBlock/index.mjs +27 -9
  138. package/dist/components/BitzTableSelect/index.mjs +61 -13
  139. package/dist/components/BitzTag/index.mjs +1 -1
  140. package/dist/components/BitzTheme/index.mjs +6 -6
  141. package/dist/components/BitzTimeline/index.mjs +11 -1
  142. package/dist/components/BitzTimer/Form.mjs +32 -11
  143. package/dist/components/BitzTimer/Timer.mjs +76 -38
  144. package/dist/components/BitzTimer/index.mjs +66 -43
  145. package/dist/components/BitzToast/Toast/index.mjs +28 -10
  146. package/dist/components/BitzToast/index.mjs +1 -1
  147. package/dist/components/BitzTree/index.mjs +4 -1
  148. package/dist/components/BitzUeEditor/index.mjs +5 -5
  149. package/dist/components/BitzUpload/index.mjs +81 -43
  150. package/dist/components/BitzWebAppDrawer/index.mjs +35 -4
  151. package/dist/components/BitzWebAppModal/index.mjs +6 -3
  152. package/dist/hooks/use-event-listener.mjs +11 -2
  153. package/dist/hooks/use-lock-fn.mjs +13 -10
  154. package/dist/hooks/use-scroll-parent.mjs +16 -14
  155. package/dist/hooks/useEvent.mjs +7 -4
  156. package/dist/hooks/useMergedState.mjs +11 -11
  157. package/dist/style.css +1 -1
  158. package/dist/utils/create.mjs +7 -1
  159. package/package.json +1 -1
@@ -1,10 +1,10 @@
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";
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";
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 ut from "../../BitzDrawer/index.mjs";
7
- import dt from "../../BitzPagination/index.mjs";
6
+ import dt from "../../BitzDrawer/index.mjs";
7
+ import ut 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,160 +16,177 @@ 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 jt from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/table/ExpandIcon.mjs";
19
+ import vt 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 pt from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/locale/en_US.mjs";
21
+ import jt 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 Tt } from "./style.mjs";
23
+ import { getCssVar as pt } from "./style.mjs";
24
24
  import "./index.less.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";
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";
27
27
  const Ne = [te.SELECTION_COLUMN, te.EXPAND_COLUMN];
28
- function Mt({
29
- rowHoverable: L,
30
- zebra: oe,
28
+ function Lt({
29
+ rowHoverable: S,
30
+ zebra: re,
31
31
  showPagination: ke = !0,
32
- height: M,
33
- dataSource: u = [],
34
- total: A = 0,
32
+ height: L,
33
+ dataSource: d = [],
34
+ total: E = 0,
35
35
  columns: N,
36
36
  loading: a = !1,
37
- skeletonNum: P = {
37
+ skeletonNum: H = {
38
38
  pc: 10,
39
39
  mobile: 10
40
40
  },
41
- skeletonRender: re,
42
- skeletonRowNum: Te = 4,
43
- skeletonRowsWidth: ve = ["35%", "100%", "100%", "60%"],
41
+ skeletonRender: oe,
42
+ skeletonRowNum: pe = 4,
43
+ skeletonRowsWidth: Te = ["35%", "100%", "100%", "60%"],
44
44
  // mobileLoadEmit,
45
45
  mobileRefreshEmit: ne,
46
- operationFilter: H,
47
- enableControlPage: Le,
46
+ operationFilter: A,
47
+ enableControlPage: Se,
48
48
  pagination: m,
49
- paginationEmit: S = () => {
49
+ paginationEmit: R = () => {
50
50
  },
51
- mobilePageHeight: Wt = 500,
52
- mobileCancelText: Me = "取消",
53
- noDataTitle: We,
54
- noDataImg: Re,
55
- color: Rt,
51
+ mobilePageHeight: Mt = 500,
52
+ mobileCancelText: Le = "取消",
53
+ noDataTitle: Me,
54
+ noDataImg: We,
55
+ color: Wt,
56
56
  size: se,
57
- showTableTool: Se = !0,
57
+ showTableTool: Re = !0,
58
58
  tableAction: De,
59
- tableToolbar: Ee,
60
- selectionBar: Ae,
61
- scroll: d,
59
+ tableToolbar: Pe,
60
+ selectionBar: Ee,
61
+ scroll: u,
62
62
  components: K,
63
63
  expandable: b,
64
64
  rowSelection: z,
65
- resetPage: Pe,
65
+ resetPage: He,
66
66
  ...i
67
67
  }) {
68
68
  var Be, ze;
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([]);
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([]);
70
70
  Q(() => {
71
- let e = [...u];
71
+ let e = [...d];
72
72
  (m == null ? void 0 : m.page) !== 1 && (e = [...f, ...e]), $e(e);
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) => {
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) => {
75
75
  var n;
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));
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));
78
80
  }, ae = () => {
79
- O(!1);
80
- }, _e = (e) => {
81
+ I(!1);
82
+ }, qe = (e) => {
81
83
  var t;
82
- O(!1), (t = e.onClick) == null || t.call(e);
84
+ I(!1), (t = e.onClick) == null || t.call(e);
83
85
  };
84
86
  Q(() => (document == null || document.addEventListener("fullscreenchange", (e) => {
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));
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));
87
89
  }), document == null ? void 0 : document.removeEventListener("fullscreenchange", () => {
88
90
  })), []);
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 = [];
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 = [];
92
96
  if (e == null || e.forEach((n) => {
93
97
  var s;
94
- t.push(((s = n.querySelector("& > .operationCol .actionGroup")) == null ? void 0 : s.clientWidth) || 0);
98
+ t.push(
99
+ ((s = n.querySelector("& > .operationCol .actionGroup")) == null ? void 0 : s.clientWidth) || 0
100
+ );
95
101
  }), t.length)
96
- return Math.ceil(Math.max(...t)) + He * 2;
102
+ return Math.ceil(Math.max(...t)) + Ae * 2;
97
103
  }, he = () => {
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;
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;
100
110
  return { tbodyWidth: t, scrollbarSize: s, hasScrollBar: n };
101
- }, { y: q, hasScrollBar: fe, scrollbarSize: G } = l(() => {
111
+ }, { y: F, hasScrollBar: fe, scrollbarSize: G } = l(() => {
102
112
  const { hasScrollBar: e, scrollbarSize: t } = he();
103
- if (typeof M > "u")
113
+ if (typeof L > "u")
104
114
  return {
105
115
  hasScrollBar: e,
106
116
  scrollbarSize: t
107
117
  };
108
- let o = 40, n = 40;
118
+ let r = 40, n = 40;
109
119
  if (g.current) {
110
120
  const D = window.getComputedStyle(g.current);
111
- o = parseInt(D.getPropertyValue("--cell-height")), n = parseInt(D.getPropertyValue("--toolbar-height"));
121
+ r = parseInt(D.getPropertyValue("--cell-height")), n = parseInt(D.getPropertyValue("--toolbar-height"));
112
122
  }
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 };
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 };
115
125
  }, [
116
126
  k,
117
- M,
118
- T == null ? void 0 : T.height,
119
- I == null ? void 0 : I.height,
120
- _ == null ? void 0 : _.height
127
+ L,
128
+ p == null ? void 0 : p.height,
129
+ _ == null ? void 0 : _.height,
130
+ q == null ? void 0 : q.height
121
131
  ]), me = l(() => {
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);
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);
126
136
  let h = 0;
127
137
  if (g.current) {
128
- const B = window.getComputedStyle(g.current), X = parseInt(B.getPropertyValue("--toolCell-paddingInline"));
138
+ const B = window.getComputedStyle(g.current), X = parseInt(
139
+ B.getPropertyValue("--toolCell-paddingInline")
140
+ );
129
141
  h = parseInt(B.getPropertyValue("--fontSize")) + 4 + 2 * X;
130
142
  }
131
143
  let C = 0;
132
144
  z && (C += h), b && (C += h);
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));
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));
139
154
  if (Y)
140
155
  return h;
141
156
  const C = Ge(h);
142
157
  $.current = Math.ceil(C ?? 0);
143
- const p = h.map((y) => ({
158
+ const j = h.map((y) => ({
144
159
  ...y,
145
160
  ...y.width ? {
146
- width: y.useMaxWidth ? qe() ?? y.width : y.width
161
+ width: y.useMaxWidth ? Fe() ?? y.width : y.width
147
162
  } : {
148
163
  // 给未设置width的列设置平均数
149
164
  width: C
150
165
  }
151
166
  }));
152
- return Nt(e, p, z, b);
153
- }, [N, W.columnsMap, W.sortKeyColumns]);
167
+ return Nt(e, j, z, b);
168
+ }, [N, M.columnsMap, M.sortKeyColumns]);
154
169
  Q(() => {
155
170
  if (N && N.length > 0) {
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);
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);
161
178
  }
162
179
  }, [N]);
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;
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;
165
182
  return Array.from({ length: t }).map((n, s) => ({
166
183
  key: `${Date.now()}${s}`
167
184
  }));
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(() => {
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(() => {
169
186
  if (b)
170
187
  return {
171
188
  ...b,
172
- expandedRowRender: () => r.jsx(r.Fragment, {}),
189
+ expandedRowRender: () => /* @__PURE__ */ o.jsx(o.Fragment, {}),
173
190
  expandIcon: (e) => {
174
191
  const t = Ye(e);
175
192
  return {
@@ -192,91 +209,234 @@ function Mt({
192
209
  selectedRowKeys: [],
193
210
  getCheckboxProps: () => ({ disabled: !0 })
194
211
  };
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(() => {
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(() => {
202
222
  let e = !1;
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(() => ({
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(() => ({
205
231
  "--container-bgColor": x.colorBgContainer
206
232
  }), [x.colorBgContainer]), lt = l(() => {
207
- const e = oe ?? w.zebra, t = k ? "100%" : M;
208
- let o;
209
- return (G ?? 0) > 0 && (o = G), Tt({
233
+ const e = re ?? w.zebra, t = k ? "100%" : L;
234
+ let r;
235
+ return (G ?? 0) > 0 && (r = G), pt({
210
236
  height: t,
211
237
  evenRowBgColor: e ? c == null ? void 0 : c.evenRowBgColor : x.colorBgContainer,
212
238
  colorBgContainer: x.colorBgContainer,
213
239
  table: c,
214
240
  gap: le,
215
241
  borderColor: (c == null ? void 0 : c.borderColor) || x.colorBorderSecondary,
216
- scrollbarWidth: o,
242
+ scrollbarWidth: r,
217
243
  other: i.style
218
244
  });
219
245
  }, [
220
246
  i.style,
221
247
  k,
222
- M,
248
+ L,
223
249
  c,
224
- oe,
250
+ re,
225
251
  w == null ? void 0 : w.zebra,
226
252
  G
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);
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
+ )
232
337
  }
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(() => {
338
+ ), it = l(() => {
247
339
  if (K)
248
340
  return K;
249
- if (!(L ?? ce ?? !0))
341
+ if (!(S ?? ce ?? !0))
250
342
  return {
251
343
  body: {
252
- cell: ({ onMouseEnter: t, onMouseLeave: o, ...n }) => r.jsx("td", { ...n })
344
+ cell: ({ onMouseEnter: t, onMouseLeave: r, ...n }) => /* @__PURE__ */ o.jsx("td", { ...n })
253
345
  }
254
346
  };
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 })] }) })] })] });
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
+ );
278
438
  }
279
- const lo = (L) => r.jsx(bt, { initValue: L, children: r.jsx(Mt, { ...L }) });
439
+ const lr = (S) => /* @__PURE__ */ o.jsx(bt, { initValue: S, children: /* @__PURE__ */ o.jsx(Lt, { ...S }) });
280
440
  export {
281
- lo as default
441
+ lr as default
282
442
  };
@@ -1,4 +1,13 @@
1
- const j = ({ height: v, evenRowBgColor: w, colorBgContainer: e, table: o, gap: I, borderColor: R, scrollbarWidth: u, other: V }) => {
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
+ }) => {
2
11
  var h, i, g, x, r, n, T, p, s, d, $, H, m, S, C, k, f, z, B, c;
3
12
  return {
4
13
  height: v,
@@ -6,10 +6,17 @@ 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) => f.jsx(x, { active: !0, title: !1, paragraph: {
10
- rows: 1,
11
- width: (t + 1) % 2 === 0 ? "100%" : "60%"
12
- } })
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
+ )
13
20
  });
14
21
  });
15
22
  }