bitz-react-admin-ui 2.7.5 → 2.7.6

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 (187) hide show
  1. package/dist/_virtual/dayjs.min.mjs +5 -2
  2. package/dist/_virtual/dayjs.min2.mjs +4 -0
  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 +53 -20
  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/BitzDayJs/index.mjs +1 -1
  51. package/dist/components/BitzDescriptions/index.mjs +11 -1
  52. package/dist/components/BitzDrawer/index.mjs +17 -2
  53. package/dist/components/BitzEmpty/index.mjs +6 -2
  54. package/dist/components/BitzException/index.mjs +6 -1
  55. package/dist/components/BitzFloatLayout/index.mjs +10 -1
  56. package/dist/components/BitzFluentDatePicker/index.mjs +1 -1
  57. package/dist/components/BitzFluentRangePicker/index.mjs +1 -1
  58. package/dist/components/BitzFluentRangeTimePicker/index.mjs +1 -1
  59. package/dist/components/BitzFluentTimePicker/index.mjs +6 -6
  60. package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +13 -16
  61. package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +27 -21
  62. package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +22 -4
  63. package/dist/components/BitzFuiCalendar/CalendarBody.mjs +28 -5
  64. package/dist/components/BitzFuiCalendar/CalendarHead.mjs +6 -3
  65. package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +13 -4
  66. package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +48 -16
  67. package/dist/components/BitzFuiCalendar/ColumnData.mjs +26 -10
  68. package/dist/components/BitzFuiCalendar/FuiCalendarItem.mjs +44 -8
  69. package/dist/components/BitzFuiCalendar/index.mjs +7 -1
  70. package/dist/components/BitzFullScreen/index.mjs +9 -6
  71. package/dist/components/BitzHighlight/Child.mjs +23 -9
  72. package/dist/components/BitzHighlight/Highlight.mjs +26 -5
  73. package/dist/components/BitzHighlight/chunks.mjs +20 -17
  74. package/dist/components/BitzHighlight/style.mjs +4 -1
  75. package/dist/components/BitzImage/index.mjs +1 -1
  76. package/dist/components/BitzImage/previewImage.mjs +12 -5
  77. package/dist/components/BitzLanguageTabs/index.mjs +14 -3
  78. package/dist/components/BitzLazyLoad/index.mjs +7 -1
  79. package/dist/components/BitzList/List.mjs +17 -3
  80. package/dist/components/BitzList/LoadMore.mjs +29 -20
  81. package/dist/components/BitzLoadMore/index.mjs +34 -14
  82. package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +25 -12
  83. package/dist/components/BitzMeetingTime/index.mjs +11 -7
  84. package/dist/components/BitzMobileLoading/index.mjs +1 -1
  85. package/dist/components/BitzModal/index.mjs +24 -11
  86. package/dist/components/BitzNoData/index.mjs +4 -1
  87. package/dist/components/BitzNoMore/index.mjs +1 -1
  88. package/dist/components/BitzOrganizationSelection/index.mjs +43 -14
  89. package/dist/components/BitzPageContainer/index.mjs +107 -46
  90. package/dist/components/BitzPageHeader/index.mjs +89 -21
  91. package/dist/components/BitzPagination/index.mjs +71 -22
  92. package/dist/components/BitzPopover/index.mjs +4 -4
  93. package/dist/components/BitzPullRefresh/PullRefresh.mjs +47 -18
  94. package/dist/components/BitzQRCode/index.mjs +6 -1
  95. package/dist/components/BitzQueryFilter/QueryFilterContent.mjs +35 -17
  96. package/dist/components/BitzQueryFilter/QueryFilterDrawer.mjs +20 -13
  97. package/dist/components/BitzQueryFilter/QueryFilterMobile.mjs +4 -1
  98. package/dist/components/BitzQueryFilter/index.mjs +69 -20
  99. package/dist/components/BitzRefresh/index.mjs +5 -1
  100. package/dist/components/BitzRemark/index.mjs +4 -4
  101. package/dist/components/BitzScheduleCenter/index.mjs +24 -30
  102. package/dist/components/BitzSearch/index.mjs +1 -1
  103. package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +123 -48
  104. package/dist/components/BitzSelect/index.mjs +1 -1
  105. package/dist/components/BitzSkeleton/index.mjs +31 -1
  106. package/dist/components/BitzSwitch/index.mjs +7 -2
  107. package/dist/components/BitzTabbar/BitzTabbar.mjs +25 -8
  108. package/dist/components/BitzTabbar/BitzTabbarItem.mjs +4 -1
  109. package/dist/components/BitzTable/ActionBar/ActionBar.mjs +80 -12
  110. package/dist/components/BitzTable/ActionBar/Button.mjs +20 -15
  111. package/dist/components/BitzTable/ActionBar/style.mjs +12 -9
  112. package/dist/components/BitzTable/ActionCol/index.mjs +183 -58
  113. package/dist/components/BitzTable/ActionCol/style.mjs +15 -12
  114. package/dist/components/BitzTable/Dropdown/index.mjs +8 -1
  115. package/dist/components/BitzTable/Dropdown/style.mjs +9 -6
  116. package/dist/components/BitzTable/SelectionBar/Button.mjs +19 -6
  117. package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +11 -4
  118. package/dist/components/BitzTable/SelectionBar/style.mjs +18 -8
  119. package/dist/components/BitzTable/Store/index.mjs +103 -62
  120. package/dist/components/BitzTable/Store/utils/index.mjs +5 -5
  121. package/dist/components/BitzTable/SubTable/index.mjs +122 -73
  122. package/dist/components/BitzTable/Table/ResizableTitle copy.mjs +43 -21
  123. package/dist/components/BitzTable/Table/SortTableContext.mjs +39 -17
  124. package/dist/components/BitzTable/Table/SortableRow.mjs +44 -20
  125. package/dist/components/BitzTable/Table/index.mjs +444 -211
  126. package/dist/components/BitzTable/Table/style.mjs +10 -1
  127. package/dist/components/BitzTable/Table/utils.mjs +11 -4
  128. package/dist/components/BitzTable/TextOverflow/index.mjs +12 -3
  129. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +105 -31
  130. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +104 -23
  131. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +68 -29
  132. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +325 -159
  133. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +50 -16
  134. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +42 -16
  135. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +135 -38
  136. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +9 -2
  137. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/ScopeSwitch.mjs +18 -5
  138. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +121 -49
  139. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +62 -18
  140. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +59 -16
  141. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +42 -14
  142. package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +17 -4
  143. package/dist/components/BitzTable/ToolBar/Modal/index.mjs +46 -14
  144. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +20 -9
  145. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +49 -2
  146. package/dist/components/BitzTable/ToolBar/style.mjs +6 -1
  147. package/dist/components/BitzTable/index.d.ts +1 -0
  148. package/dist/components/BitzTableOperations/index.mjs +13 -3
  149. package/dist/components/BitzTableSelect/Picker/index.mjs +43 -10
  150. package/dist/components/BitzTableSelect/Select/index.mjs +90 -21
  151. package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +23 -13
  152. package/dist/components/BitzTableSelect/SelectPopup/index.mjs +219 -69
  153. package/dist/components/BitzTableSelect/SingleSelect/index.mjs +87 -22
  154. package/dist/components/BitzTableSelect/TableCell/index.mjs +52 -11
  155. package/dist/components/BitzTableSelect/TextBlock/index.mjs +30 -12
  156. package/dist/components/BitzTableSelect/index.mjs +65 -14
  157. package/dist/components/BitzTableSelect/utils.mjs +3 -3
  158. package/dist/components/BitzTag/index.mjs +1 -1
  159. package/dist/components/BitzText/index.mjs +41 -14
  160. package/dist/components/BitzText/utils.mjs +3 -3
  161. package/dist/components/BitzTheme/index.mjs +6 -6
  162. package/dist/components/BitzTimeline/index.mjs +11 -1
  163. package/dist/components/BitzTimer/Form.mjs +32 -11
  164. package/dist/components/BitzTimer/Timer.mjs +76 -38
  165. package/dist/components/BitzTimer/index.mjs +66 -43
  166. package/dist/components/BitzToast/Toast/index.mjs +28 -10
  167. package/dist/components/BitzToast/index.mjs +1 -1
  168. package/dist/components/BitzTooltip/index.mjs +59 -20
  169. package/dist/components/BitzTooltip/style.mjs +9 -6
  170. package/dist/components/BitzTooltip/utils.mjs +2 -2
  171. package/dist/components/BitzTree/index.mjs +4 -1
  172. package/dist/components/BitzUeEditor/index.mjs +5 -5
  173. package/dist/components/BitzUpload/index.mjs +81 -43
  174. package/dist/components/BitzWebAppDrawer/index.mjs +35 -4
  175. package/dist/components/BitzWebAppModal/index.mjs +6 -3
  176. package/dist/hooks/use-event-listener.mjs +11 -2
  177. package/dist/hooks/use-lock-fn.mjs +13 -10
  178. package/dist/hooks/use-scroll-parent.mjs +16 -14
  179. package/dist/hooks/useEvent.mjs +7 -4
  180. package/dist/hooks/useMergedState.mjs +11 -11
  181. package/dist/node_modules/dayjs/dayjs.min.mjs +292 -292
  182. package/dist/node_modules/dayjs/locale/zh-cn.mjs +13 -13
  183. package/dist/style.css +1 -1
  184. package/dist/utils/WithFluent.mjs +9 -3
  185. package/dist/utils/create.mjs +7 -1
  186. package/dist/utils/time.mjs +1 -1
  187. package/package.json +1 -1
@@ -8,7 +8,13 @@ import h from "../../../node_modules/classnames/index.mjs";
8
8
  import c from "../../../node_modules/@ant-design/icons/es/icons/PlusCircleFilled.mjs";
9
9
  import o from "../../../node_modules/lodash-es/omit.mjs";
10
10
  import g from "../../../node_modules/@ant-design/icons/es/icons/CaretDownOutlined.mjs";
11
- const O = ({ size: C, add: n, excel: r, actions: m, children: E }) => {
11
+ const O = ({
12
+ size: C,
13
+ add: n,
14
+ excel: r,
15
+ actions: m,
16
+ children: E
17
+ }) => {
12
18
  const { blockCls: x, addBtnClassName: y, btnClassName: p } = k(C), w = f(() => [
13
19
  {
14
20
  key: "download",
@@ -25,17 +31,79 @@ const O = ({ size: C, add: n, excel: r, actions: m, children: E }) => {
25
31
  // ),
26
32
  },
27
33
  ...(r == null ? void 0 : r.otherMenu) ?? []
28
- ], [r]), d = f(() => m == null ? void 0 : m.map((t, e) => t.type === "primary" ? s.jsx(i, { type: "primary", icon: s.jsx(c, {}), className: h(y, t.className), ...o(t, "text", "type", "className", "children"), children: t == null ? void 0 : t.text }, e) : t.type === "secondary" ? s.jsx(i, { type: "text", className: h(p, t.className), ...o(t, "text", "type", "className", "children"), children: t == null ? void 0 : t.text }, e) : s.jsx(N, { getPopupContainer: (a) => {
29
- var j, u;
30
- return (u = (j = a.parentElement) == null ? void 0 : j.parentElement) == null ? void 0 : u.parentElement;
31
- }, ...o(t, "text", "className", "children"), children: s.jsx(i, { className: h(p, t.className), type: "text", children: s.jsxs(l, { size: 6, children: [!t.text || typeof t.text == "string" ? s.jsx("span", { children: t.text }) : t.text, s.jsx(g, {})] }) }) }, e)), [m]);
32
- return s.jsxs(l.Compact, { className: x, style: { height: "100%" }, children: [(n == null ? void 0 : n.show) !== !1 && s.jsx(i, { type: "primary", icon: s.jsx(c, {}), className: y, ...o(n, "text", "show", "type", "className", "children"), children: n == null ? void 0 : n.text }), m ? d : E, (r == null ? void 0 : r.show) !== !1 && s.jsx(N, { menu: { items: w, onClick: ({ key: t }) => {
33
- var e;
34
- return (e = r == null ? void 0 : r.onClick) == null ? void 0 : e.call(r, t);
35
- } }, trigger: (r == null ? void 0 : r.trigger) || ["click"], getPopupContainer: (t) => {
36
- var e, a;
37
- return (a = (e = t.parentElement) == null ? void 0 : e.parentElement) == null ? void 0 : a.parentElement;
38
- }, ...o(r, "text", "show", "menu", "trigger", "children"), children: s.jsx(i, { className: p, type: "text", children: s.jsxs(l, { size: 6, children: [s.jsx("span", { children: (r == null ? void 0 : r.text) ?? "Excel文档导入" }), s.jsx(g, {})] }) }) })] });
34
+ ], [r]), d = f(() => m == null ? void 0 : m.map((t, e) => t.type === "primary" ? /* @__PURE__ */ s.jsx(
35
+ i,
36
+ {
37
+ type: "primary",
38
+ icon: /* @__PURE__ */ s.jsx(c, {}),
39
+ className: h(y, t.className),
40
+ ...o(t, "text", "type", "className", "children"),
41
+ children: t == null ? void 0 : t.text
42
+ },
43
+ e
44
+ ) : t.type === "secondary" ? /* @__PURE__ */ s.jsx(
45
+ i,
46
+ {
47
+ type: "text",
48
+ className: h(p, t.className),
49
+ ...o(t, "text", "type", "className", "children"),
50
+ children: t == null ? void 0 : t.text
51
+ },
52
+ e
53
+ ) : /* @__PURE__ */ s.jsx(
54
+ N,
55
+ {
56
+ getPopupContainer: (a) => {
57
+ var j, u;
58
+ return (u = (j = a.parentElement) == null ? void 0 : j.parentElement) == null ? void 0 : u.parentElement;
59
+ },
60
+ ...o(t, "text", "className", "children"),
61
+ children: /* @__PURE__ */ s.jsx(
62
+ i,
63
+ {
64
+ className: h(p, t.className),
65
+ type: "text",
66
+ children: /* @__PURE__ */ s.jsxs(l, { size: 6, children: [
67
+ !t.text || typeof t.text == "string" ? /* @__PURE__ */ s.jsx("span", { children: t.text }) : t.text,
68
+ /* @__PURE__ */ s.jsx(g, {})
69
+ ] })
70
+ }
71
+ )
72
+ },
73
+ e
74
+ )), [m]);
75
+ return /* @__PURE__ */ s.jsxs(l.Compact, { className: x, style: { height: "100%" }, children: [
76
+ (n == null ? void 0 : n.show) !== !1 && /* @__PURE__ */ s.jsx(
77
+ i,
78
+ {
79
+ type: "primary",
80
+ icon: /* @__PURE__ */ s.jsx(c, {}),
81
+ className: y,
82
+ ...o(n, "text", "show", "type", "className", "children"),
83
+ children: n == null ? void 0 : n.text
84
+ }
85
+ ),
86
+ m ? d : E,
87
+ (r == null ? void 0 : r.show) !== !1 && /* @__PURE__ */ s.jsx(
88
+ N,
89
+ {
90
+ menu: { items: w, onClick: ({ key: t }) => {
91
+ var e;
92
+ return (e = r == null ? void 0 : r.onClick) == null ? void 0 : e.call(r, t);
93
+ } },
94
+ trigger: (r == null ? void 0 : r.trigger) || ["click"],
95
+ getPopupContainer: (t) => {
96
+ var e, a;
97
+ return (a = (e = t.parentElement) == null ? void 0 : e.parentElement) == null ? void 0 : a.parentElement;
98
+ },
99
+ ...o(r, "text", "show", "menu", "trigger", "children"),
100
+ children: /* @__PURE__ */ s.jsx(i, { className: p, type: "text", children: /* @__PURE__ */ s.jsxs(l, { size: 6, children: [
101
+ /* @__PURE__ */ s.jsx("span", { children: (r == null ? void 0 : r.text) ?? "Excel文档导入" }),
102
+ /* @__PURE__ */ s.jsx(g, {})
103
+ ] }) })
104
+ }
105
+ )
106
+ ] });
39
107
  };
40
108
  export {
41
109
  O as default
@@ -1,23 +1,28 @@
1
- import { j as s } from "../../../node_modules/react/jsx-runtime.mjs";
1
+ import { j as e } from "../../../node_modules/react/jsx-runtime.mjs";
2
2
  import p from "../../BitzButton/index.mjs";
3
3
  import c from "../../../node_modules/classnames/index.mjs";
4
- import { useMemo as e } from "react";
5
- import d from "./style.mjs";
6
- import x from "../../../node_modules/@ant-design/icons/es/icons/PlusCircleFilled.mjs";
7
- const z = ({ className: n, icon: o, type: r, ...i }) => {
8
- const { addBtnClassName: m, btnClassName: u } = d(), a = e(() => {
9
- if (o)
10
- return o;
4
+ import { useMemo as s } from "react";
5
+ import x from "./style.mjs";
6
+ import B from "../../../node_modules/@ant-design/icons/es/icons/PlusCircleFilled.mjs";
7
+ const z = ({
8
+ className: o,
9
+ icon: n,
10
+ type: r,
11
+ ...i
12
+ }) => {
13
+ const { addBtnClassName: m, btnClassName: a } = x(), u = s(() => {
14
+ if (n)
15
+ return n;
11
16
  if (r === "primary")
12
- return s.jsx(x, {});
13
- }, [o, r]), f = e(() => {
14
- let t = u;
15
- return r === "primary" && (t = m), c(t, n);
16
- }, [r, n]), l = e(() => {
17
+ return /* @__PURE__ */ e.jsx(B, {});
18
+ }, [n, r]), l = s(() => {
19
+ let t = a;
20
+ return r === "primary" && (t = m), c(t, o);
21
+ }, [r, o]), f = s(() => {
17
22
  let t = "text";
18
23
  return r === "primary" && (t = "primary"), t;
19
- }, [r, n]);
20
- return s.jsx(p, { className: f, icon: a, type: l, ...i });
24
+ }, [r, o]);
25
+ return /* @__PURE__ */ e.jsx(p, { className: l, icon: u, type: f, ...i });
21
26
  };
22
27
  export {
23
28
  z as default
@@ -79,15 +79,18 @@ const tt = (l) => {
79
79
  }
80
80
  }
81
81
  ];
82
- G({
83
- theme: y,
84
- token: i,
85
- hashId: n,
86
- path: [r]
87
- }, () => [
88
- D(r, a, c, i),
89
- A(r, p, i)
90
- ]);
82
+ G(
83
+ {
84
+ theme: y,
85
+ token: i,
86
+ hashId: n,
87
+ path: [r]
88
+ },
89
+ () => [
90
+ D(r, a, c, i),
91
+ A(r, p, i)
92
+ ]
93
+ );
91
94
  const b = `${v}${c}`, N = x(a, b, n), R = x(a, p, b, n);
92
95
  return { blockCls: r, addBtnClassName: N, btnClassName: R };
93
96
  };
@@ -1,51 +1,166 @@
1
1
  import { j as n } from "../../../node_modules/react/jsx-runtime.mjs";
2
- import D from "../../../node_modules/ahooks/es/useSize/index.mjs";
3
- import { Space as L, Skeleton as P, theme as E } from "antd";
4
- import { forwardRef as M, useContext as H, useMemo as b, useState as O, Fragment as _, useRef as F } from "react";
5
- import C from "../../BitzButton/index.mjs";
6
- import q, { actionColBtnGap as G } from "./style.mjs";
2
+ import P from "../../../node_modules/ahooks/es/useSize/index.mjs";
3
+ import { Space as E, Skeleton as M, theme as D } from "antd";
4
+ import { forwardRef as F, useContext as H, useMemo as N, useState as O, Fragment as _, useRef as I } from "react";
5
+ import j from "../../BitzButton/index.mjs";
6
+ import $, { actionColBtnGap as q } from "./style.mjs";
7
7
  import "../index.mjs";
8
- import T from "../Dropdown/index.mjs";
9
- import { tablePaddingInline as J } from "../../BitzConfigProvider/context.mjs";
10
- import { BitzTableContext as K } from "../Store/index.mjs";
11
- const N = ({ skeletonCls: f, ...r }) => n.jsxs(C, { type: "text", ...r, children: [n.jsx("span", { children: r.children }), n.jsx(P, { active: !0, title: !1, className: f, paragraph: {
12
- rows: 1,
13
- width: "100%"
14
- } })] }), Q = M(({ loading: f, maxCount: r, useMaxWidth: u, actionGroup: i, customActions: o }, y) => {
15
- const { loading: g, fullscreen: B } = H(K), a = b(() => f ?? g, [f, g]), { primaryBtnClassName: l, dangerBtnClassName: h, secondaryBtnClassName: j, maskClassName: S, skeletonBtnClassName: m, skeletonClassName: x } = q(), [k] = O([
16
- n.jsx(N, { className: m, skeletonCls: x, children: "占位" }, 1),
17
- n.jsx(N, { className: m, skeletonCls: x, children: "占位" }, 2)
18
- ]), w = b(() => {
19
- if (a && u)
20
- return k;
21
- const c = r - 1 > 0 ? r - 1 : 2, p = i.length > r ? c : i.length, e = i.slice(0, p), s = [];
22
- if (e != null && e.length && e.forEach((t, d) => {
23
- s.push(a ? n.jsx(N, { className: m, skeletonCls: x, children: t == null ? void 0 : t.label }, d) : t.children ? n.jsx(T, { menu: { items: t.children }, children: n.jsx(C, { type: "text", className: t.danger ? h : l, children: t == null ? void 0 : t.label }) }, d) : n.jsx(C, { type: "text", className: t.danger ? h : l, onClick: t == null ? void 0 : t.onClick, children: t == null ? void 0 : t.label }, d));
24
- }), p === c && i.length > r) {
25
- const t = i.slice(c, i.length);
26
- s.push(a ? n.jsx(N, { className: m, skeletonCls: x, children: "更多" }, -1) : n.jsx(T, { menu: { items: t }, children: n.jsx(C, { type: "text", className: j, children: "更多" }) }, -1));
8
+ import R from "../Dropdown/index.mjs";
9
+ import { tablePaddingInline as G } from "../../BitzConfigProvider/context.mjs";
10
+ import { BitzTableContext as J } from "../Store/index.mjs";
11
+ const k = ({
12
+ skeletonCls: u,
13
+ ...s
14
+ }) => /* @__PURE__ */ n.jsxs(j, { type: "text", ...s, children: [
15
+ /* @__PURE__ */ n.jsx("span", { children: s.children }),
16
+ /* @__PURE__ */ n.jsx(
17
+ M,
18
+ {
19
+ active: !0,
20
+ title: !1,
21
+ className: u,
22
+ paragraph: {
23
+ rows: 1,
24
+ width: "100%"
25
+ }
27
26
  }
28
- return s;
29
- }, [a, r, u, i]), z = b(() => {
30
- if (!(o != null && o.length))
31
- return;
32
- if (a && u)
33
- return k;
34
- const c = o.map((e, s) => n.jsx(N, { className: m, skeletonCls: x, children: e == null ? void 0 : e.label }, s)), p = o.map((e, s) => {
35
- let t = n.jsx(C, { type: "text", className: e.danger ? h : l, onClick: e.onClick, children: e == null ? void 0 : e.label }, s);
36
- e.type === "secondary" && (t = n.jsx(C, { type: "text", className: j, onClick: e.onClick, children: e == null ? void 0 : e.label }, s));
37
- const d = e.render ?? ((I, R) => n.jsx(_, { children: I }, R));
38
- return d == null ? void 0 : d(t, s);
39
- });
40
- return a ? c : p;
41
- }, [a, u, o]);
42
- return n.jsxs("div", { onClick: (c) => c.stopPropagation(), style: { overflow: "hidden" }, children: [n.jsx(L, { size: G, ref: y, className: "actionGroup", children: z ?? w }), n.jsx("div", { className: S })] });
43
- });
44
- function te(f) {
45
- var m;
46
- const { actionGroup: r, loading: u, maxCount: i = 3, customActions: o, defaultWidth: y, ...g } = f, B = ((m = E.useToken().token.Table) == null ? void 0 : m.cellPaddingInline) ?? J, a = F(null), l = D(a), h = F(0), j = b(() => (l != null && l.width && !h.current && (h.current = l == null ? void 0 : l.width), !(l != null && l.width) && h.current ? h.current + B * 2 + 1 : l != null && l.width ? l.width + B * 2 + 1 : y ?? 141), [l, B, y]);
47
- return b(() => ({
48
- width: Math.floor(j),
27
+ )
28
+ ] }), K = F(
29
+ ({ loading: u, maxCount: s, useMaxWidth: m, actionGroup: i, customActions: o }, b) => {
30
+ const { loading: x, fullscreen: S } = H(J), a = N(() => u ?? x, [u, x]), {
31
+ primaryBtnClassName: p,
32
+ dangerBtnClassName: l,
33
+ secondaryBtnClassName: f,
34
+ maskClassName: y,
35
+ skeletonBtnClassName: C,
36
+ skeletonClassName: h
37
+ } = $(), [T] = O([
38
+ /* @__PURE__ */ n.jsx(
39
+ k,
40
+ {
41
+ className: C,
42
+ skeletonCls: h,
43
+ children: "占位"
44
+ },
45
+ 1
46
+ ),
47
+ /* @__PURE__ */ n.jsx(
48
+ k,
49
+ {
50
+ className: C,
51
+ skeletonCls: h,
52
+ children: "占位"
53
+ },
54
+ 2
55
+ )
56
+ ]), B = N(() => {
57
+ if (a && m)
58
+ return T;
59
+ const d = s - 1 > 0 ? s - 1 : 2, g = i.length > s ? d : i.length, t = i.slice(0, g), r = [];
60
+ if (t != null && t.length && t.forEach((e, c) => {
61
+ r.push(
62
+ a ? /* @__PURE__ */ n.jsx(
63
+ k,
64
+ {
65
+ className: C,
66
+ skeletonCls: h,
67
+ children: e == null ? void 0 : e.label
68
+ },
69
+ c
70
+ ) : e.children ? /* @__PURE__ */ n.jsx(R, { menu: { items: e.children }, children: /* @__PURE__ */ n.jsx(
71
+ j,
72
+ {
73
+ type: "text",
74
+ className: e.danger ? l : p,
75
+ children: e == null ? void 0 : e.label
76
+ }
77
+ ) }, c) : /* @__PURE__ */ n.jsx(
78
+ j,
79
+ {
80
+ type: "text",
81
+ className: e.danger ? l : p,
82
+ onClick: e == null ? void 0 : e.onClick,
83
+ children: e == null ? void 0 : e.label
84
+ },
85
+ c
86
+ )
87
+ );
88
+ }), g === d && i.length > s) {
89
+ const e = i.slice(
90
+ d,
91
+ i.length
92
+ );
93
+ r.push(
94
+ a ? /* @__PURE__ */ n.jsx(
95
+ k,
96
+ {
97
+ className: C,
98
+ skeletonCls: h,
99
+ children: "更多"
100
+ },
101
+ -1
102
+ ) : /* @__PURE__ */ n.jsx(R, { menu: { items: e }, children: /* @__PURE__ */ n.jsx(j, { type: "text", className: f, children: "更多" }) }, -1)
103
+ );
104
+ }
105
+ return r;
106
+ }, [a, s, m, i]), w = N(() => {
107
+ if (!(o != null && o.length))
108
+ return;
109
+ if (a && m)
110
+ return T;
111
+ const d = o.map((t, r) => /* @__PURE__ */ n.jsx(
112
+ k,
113
+ {
114
+ className: C,
115
+ skeletonCls: h,
116
+ children: t == null ? void 0 : t.label
117
+ },
118
+ r
119
+ )), g = o.map((t, r) => {
120
+ let e = /* @__PURE__ */ n.jsx(
121
+ j,
122
+ {
123
+ type: "text",
124
+ className: t.danger ? l : p,
125
+ onClick: t.onClick,
126
+ children: t == null ? void 0 : t.label
127
+ },
128
+ r
129
+ );
130
+ t.type === "secondary" && (e = /* @__PURE__ */ n.jsx(
131
+ j,
132
+ {
133
+ type: "text",
134
+ className: f,
135
+ onClick: t.onClick,
136
+ children: t == null ? void 0 : t.label
137
+ },
138
+ r
139
+ ));
140
+ const c = t.render ?? ((z, L) => /* @__PURE__ */ n.jsx(_, { children: z }, L));
141
+ return c == null ? void 0 : c(e, r);
142
+ });
143
+ return a ? d : g;
144
+ }, [a, m, o]);
145
+ return /* @__PURE__ */ n.jsxs("div", { onClick: (d) => d.stopPropagation(), style: { overflow: "hidden" }, children: [
146
+ /* @__PURE__ */ n.jsx(E, { size: q, ref: b, className: "actionGroup", children: w ?? B }),
147
+ /* @__PURE__ */ n.jsx("div", { className: y })
148
+ ] });
149
+ }
150
+ );
151
+ function te(u) {
152
+ var h;
153
+ const {
154
+ actionGroup: s,
155
+ loading: m,
156
+ maxCount: i = 3,
157
+ customActions: o,
158
+ defaultWidth: b,
159
+ width: x,
160
+ ...S
161
+ } = u, a = ((h = D.useToken().token.Table) == null ? void 0 : h.cellPaddingInline) ?? G, p = I(null), l = P(p), f = I(0), y = N(() => x || (l != null && l.width && !f.current && (f.current = l == null ? void 0 : l.width), !(l != null && l.width) && f.current ? f.current + a * 2 + 1 : l != null && l.width ? l.width + a * 2 + 1 : b ?? 141), [x, l, a, b]);
162
+ return N(() => ({
163
+ width: Math.floor(y),
49
164
  mobileHide: !0,
50
165
  isOperationCol: !0,
51
166
  title: "操作",
@@ -54,26 +169,36 @@ function te(f) {
54
169
  dataIndex: "operationCol",
55
170
  className: "operationCol",
56
171
  disabled: !0,
57
- render: (x, k, w) => {
58
- var p, e;
59
- const z = ((p = o == null ? void 0 : o(k, w)) == null ? void 0 : p.filter((s) => s.type != "detail")) ?? [], c = ((e = r == null ? void 0 : r(k, w)) == null ? void 0 : e.filter((s) => {
60
- var d;
61
- const t = typeof s.hidden == "function" ? (d = s.hidden) == null ? void 0 : d.call(s) : s.hidden;
62
- return s.type != "detail" && !t;
172
+ render: (T, B, w) => {
173
+ var t, r;
174
+ const d = ((t = o == null ? void 0 : o(B, w)) == null ? void 0 : t.filter((e) => e.type != "detail")) ?? [], g = ((r = s == null ? void 0 : s(B, w)) == null ? void 0 : r.filter((e) => {
175
+ var z;
176
+ const c = typeof e.hidden == "function" ? (z = e.hidden) == null ? void 0 : z.call(e) : e.hidden;
177
+ return e.type != "detail" && !c;
63
178
  })) ?? [];
64
- return n.jsx(Q, { actionGroup: c, customActions: z, loading: u, maxCount: i, useMaxWidth: g.useMaxWidth, ref: a });
179
+ return /* @__PURE__ */ n.jsx(
180
+ K,
181
+ {
182
+ actionGroup: g,
183
+ customActions: d,
184
+ loading: m,
185
+ maxCount: i,
186
+ useMaxWidth: S.useMaxWidth,
187
+ ref: p
188
+ }
189
+ );
65
190
  },
66
- ...g
191
+ ...S
67
192
  }), [
68
- j,
69
- a.current,
70
- u,
193
+ y,
194
+ p.current,
195
+ m,
71
196
  i,
72
- r,
197
+ s,
73
198
  o
74
199
  ]);
75
200
  }
76
201
  export {
77
- Q as BitzTableAction,
202
+ K as BitzTableAction,
78
203
  te as default
79
204
  };
@@ -103,18 +103,21 @@ const W = () => {
103
103
  }
104
104
  }
105
105
  ];
106
- N({
107
- theme: h,
108
- token: i,
109
- hashId: r,
110
- path: [e]
111
- }, () => [
112
- u(e, B),
113
- d(a, i),
114
- g(l, i),
115
- y(c, i),
116
- C(m, p)
117
- ]);
106
+ N(
107
+ {
108
+ theme: h,
109
+ token: i,
110
+ hashId: r,
111
+ path: [e]
112
+ },
113
+ () => [
114
+ u(e, B),
115
+ d(a, i),
116
+ g(l, i),
117
+ y(c, i),
118
+ C(m, p)
119
+ ]
120
+ );
118
121
  const v = n(e, a, r), $ = n(e, l, r), f = n(e, c, r), S = n(e, m, r), x = n(p, r), b = n(B, r);
119
122
  return {
120
123
  defaultCls: e,
@@ -8,7 +8,14 @@ const p = (r, s) => r == null ? void 0 : r.map((t) => {
8
8
  return o != null && o.children && (o.children = p(o == null ? void 0 : o.children, s), o.popupClassName = s), o;
9
9
  }), j = ({ menu: r, overlayClassName: s, ...t }) => {
10
10
  const { popupClassName: o } = n(), a = m(() => p(r == null ? void 0 : r.items, o), [r == null ? void 0 : r.items]);
11
- return e.jsx(c, { ...t, menu: { ...r, items: a }, overlayClassName: d(o, s) });
11
+ return /* @__PURE__ */ e.jsx(
12
+ c,
13
+ {
14
+ ...t,
15
+ menu: { ...r, items: a },
16
+ overlayClassName: d(o, s)
17
+ }
18
+ );
12
19
  };
13
20
  export {
14
21
  j as default
@@ -93,12 +93,15 @@ const ie = () => {
93
93
  }
94
94
  ];
95
95
  };
96
- j({
97
- theme: N,
98
- token: m,
99
- hashId: i,
100
- path: [o]
101
- }, () => [G(o, a, m)]);
96
+ j(
97
+ {
98
+ theme: N,
99
+ token: m,
100
+ hashId: i,
101
+ path: [o]
102
+ },
103
+ () => [G(o, a, m)]
104
+ );
102
105
  const I = `${D}${a}`;
103
106
  return {
104
107
  popupClassName: v(o, I, i)
@@ -5,15 +5,28 @@ import { useMemo as m } from "react";
5
5
  import c from "./style.mjs";
6
6
  import d from "../Dropdown/style.mjs";
7
7
  import x from "../../../node_modules/@ant-design/icons/es/icons/CaretDownOutlined.mjs";
8
- const i = (t, o) => t == null ? void 0 : t.map((e) => {
8
+ const a = (t, o) => t == null ? void 0 : t.map((e) => {
9
9
  const r = { ...e };
10
- return r != null && r.children && (r.children = i(r == null ? void 0 : r.children, o), r.popupClassName = o), r;
11
- }), y = ({ ...t }) => {
10
+ return r != null && r.children && (r.children = a(r == null ? void 0 : r.children, o), r.popupClassName = o), r;
11
+ }), y = ({
12
+ ...t
13
+ }) => {
12
14
  const { btnClassName: o } = c();
13
- return s.jsx(n, { className: o, type: "text", ...t });
15
+ return /* @__PURE__ */ s.jsx(n, { className: o, type: "text", ...t });
14
16
  }, S = ({ menu: t, children: o }) => {
15
- const { btnClassName: e } = c(), { popupClassName: r } = d(), a = m(() => i(t == null ? void 0 : t.items, r), [t == null ? void 0 : t.items]);
16
- return s.jsx(p, { menu: { ...t, items: a }, overlayClassName: r, trigger: ["click"], children: s.jsx(n, { className: e, type: "text", children: s.jsxs(l, { size: 2, children: [s.jsx("span", { children: o }), s.jsx(x, {})] }) }) });
17
+ const { btnClassName: e } = c(), { popupClassName: r } = d(), i = m(() => a(t == null ? void 0 : t.items, r), [t == null ? void 0 : t.items]);
18
+ return /* @__PURE__ */ s.jsx(
19
+ p,
20
+ {
21
+ menu: { ...t, items: i },
22
+ overlayClassName: r,
23
+ trigger: ["click"],
24
+ children: /* @__PURE__ */ s.jsx(n, { className: e, type: "text", children: /* @__PURE__ */ s.jsxs(l, { size: 2, children: [
25
+ /* @__PURE__ */ s.jsx("span", { children: o }),
26
+ /* @__PURE__ */ s.jsx(x, {})
27
+ ] }) })
28
+ }
29
+ );
17
30
  };
18
31
  export {
19
32
  y as BitzSelectionBarButton,
@@ -8,11 +8,18 @@ const N = ({ children: o }) => {
8
8
  const { blockClassName: r, showCls: a, batchOperationClassName: m } = d(), { selected: s, toolbarWidth: e } = n(x), l = p(() => i(r, {
9
9
  [`${a}`]: s
10
10
  }), [s]);
11
- return t.jsx("div", { className: l, children: t.jsx(c.Compact, { className: m, style: {
12
- ...e && {
13
- width: `calc(100% - 50px - ${e}px)`
11
+ return /* @__PURE__ */ t.jsx("div", { className: l, children: /* @__PURE__ */ t.jsx(
12
+ c.Compact,
13
+ {
14
+ className: m,
15
+ style: {
16
+ ...e && {
17
+ width: `calc(100% - 50px - ${e}px)`
18
+ }
19
+ },
20
+ children: o || /* @__PURE__ */ t.jsx("div", {})
14
21
  }
15
- }, children: o || t.jsx("div", {}) }) });
22
+ ) });
16
23
  };
17
24
  export {
18
25
  N as default
@@ -102,14 +102,24 @@ const ot = () => {
102
102
  }
103
103
  ];
104
104
  };
105
- j({
106
- theme: T,
107
- token: a,
108
- hashId: o,
109
- path: [r]
110
- }, () => [
111
- x(r, l, s, m, f, a)
112
- ]);
105
+ j(
106
+ {
107
+ theme: T,
108
+ token: a,
109
+ hashId: o,
110
+ path: [r]
111
+ },
112
+ () => [
113
+ x(
114
+ r,
115
+ l,
116
+ s,
117
+ m,
118
+ f,
119
+ a
120
+ )
121
+ ]
122
+ );
113
123
  const w = `${d}${r}`, y = i(r, w, o), B = i(m, o), N = i(f, o), v = i(s, o);
114
124
  return {
115
125
  blockClassName: y,