bitz-react-admin-ui 2.10.7-beta.2 → 2.10.7-beta.4

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 (186) hide show
  1. package/dist/assets/iconfont/IconChenggong.mjs +5 -18
  2. package/dist/assets/iconfont/IconClose.mjs +5 -18
  3. package/dist/assets/iconfont/IconColumnCancelFixed.mjs +5 -18
  4. package/dist/assets/iconfont/IconColumnFixedLeft.mjs +5 -18
  5. package/dist/assets/iconfont/IconColumnFixedRight.mjs +5 -18
  6. package/dist/assets/iconfont/IconCuowu.mjs +5 -18
  7. package/dist/assets/iconfont/IconDragOrder.mjs +5 -18
  8. package/dist/assets/iconfont/IconDuigoux.mjs +5 -18
  9. package/dist/assets/iconfont/IconFabu.mjs +8 -27
  10. package/dist/assets/iconfont/IconFanhui.mjs +5 -18
  11. package/dist/assets/iconfont/IconGaojisousuo.mjs +5 -18
  12. package/dist/assets/iconfont/IconHangfengexian.mjs +9 -35
  13. package/dist/assets/iconfont/IconHangliefengexian.mjs +9 -35
  14. package/dist/assets/iconfont/IconIcFluentHomeRegular.mjs +5 -18
  15. package/dist/assets/iconfont/IconIcon21.mjs +5 -18
  16. package/dist/assets/iconfont/IconJincoude.mjs +5 -18
  17. package/dist/assets/iconfont/IconJinggao.mjs +5 -18
  18. package/dist/assets/iconfont/IconKuansongde.mjs +5 -18
  19. package/dist/assets/iconfont/IconLiefengexian.mjs +9 -35
  20. package/dist/assets/iconfont/IconMore.mjs +9 -34
  21. package/dist/assets/iconfont/IconShanchu.mjs +5 -18
  22. package/dist/assets/iconfont/IconShanchu1.mjs +8 -27
  23. package/dist/assets/iconfont/IconSousuo.mjs +5 -18
  24. package/dist/assets/iconfont/IconTejincou.mjs +5 -18
  25. package/dist/assets/iconfont/IconTekuansong.mjs +5 -18
  26. package/dist/assets/iconfont/IconTishi1.mjs +5 -18
  27. package/dist/assets/iconfont/IconTuodong.mjs +5 -18
  28. package/dist/assets/iconfont/IconWubanmawentianchong.mjs +8 -29
  29. package/dist/assets/iconfont/IconWufengexian.mjs +5 -19
  30. package/dist/assets/iconfont/IconXinxitishi.mjs +5 -18
  31. package/dist/assets/iconfont/IconYoubanmawentianchong.mjs +8 -28
  32. package/dist/assets/iconfont/IconZhongdengde.mjs +5 -18
  33. package/dist/assets/iconfont/IconZhongzhi.mjs +5 -18
  34. package/dist/assets/iconfont/index.mjs +4 -1
  35. package/dist/components/BitzAddTag/index.mjs +17 -38
  36. package/dist/components/BitzAddressBook/index.mjs +33 -81
  37. package/dist/components/BitzAppRefresh/index.mjs +11 -17
  38. package/dist/components/BitzBetterScroll/index.mjs +13 -1
  39. package/dist/components/BitzButton/index.mjs +33 -25
  40. package/dist/components/BitzCalendar/index.mjs +42 -60
  41. package/dist/components/BitzCascader/BitzCascaderMobile.mjs +25 -47
  42. package/dist/components/BitzCascader/index.mjs +5 -1
  43. package/dist/components/BitzCollapse/index.mjs +5 -2
  44. package/dist/components/BitzConfigProvider/context.mjs +1 -3
  45. package/dist/components/BitzConfirmModal/index.mjs +22 -25
  46. package/dist/components/BitzDayJs/index.mjs +1 -1
  47. package/dist/components/BitzDescriptions/index.mjs +1 -11
  48. package/dist/components/BitzDrawer/index.mjs +14 -18
  49. package/dist/components/BitzEmpty/index.mjs +5 -1
  50. package/dist/components/BitzException/index.mjs +1 -6
  51. package/dist/components/BitzFloatLayout/index.mjs +14 -2
  52. package/dist/components/BitzFluentDatePicker/index.mjs +4 -1
  53. package/dist/components/BitzFluentRangePicker/index.mjs +4 -1
  54. package/dist/components/BitzFluentRangeTimePicker/index.mjs +4 -1
  55. package/dist/components/BitzFluentTimePicker/index.mjs +4 -1
  56. package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +1 -1
  57. package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +15 -15
  58. package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +4 -2
  59. package/dist/components/BitzFuiCalendar/CalendarBody.mjs +13 -24
  60. package/dist/components/BitzFuiCalendar/CalendarHead.mjs +1 -1
  61. package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +10 -14
  62. package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +25 -46
  63. package/dist/components/BitzFuiCalendar/ColumnData.mjs +9 -17
  64. package/dist/components/BitzFuiCalendar/FuiCalendarItem.mjs +19 -20
  65. package/dist/components/BitzFuiCalendar/index.mjs +3 -1
  66. package/dist/components/BitzFullScreen/index.mjs +40 -17
  67. package/dist/components/BitzHighlight/Child.mjs +12 -9
  68. package/dist/components/BitzHighlight/Highlight.mjs +10 -8
  69. package/dist/components/BitzHighlight/chunks.mjs +17 -20
  70. package/dist/components/BitzHighlight/style.mjs +25 -22
  71. package/dist/components/BitzImage/index.mjs +5 -1
  72. package/dist/components/BitzImage/previewImage.mjs +5 -12
  73. package/dist/components/BitzLanguageTabs/index.mjs +29 -20
  74. package/dist/components/BitzLazyLoad/index.mjs +1 -7
  75. package/dist/components/BitzList/List.mjs +1 -15
  76. package/dist/components/BitzList/LoadMore.mjs +23 -22
  77. package/dist/components/BitzLoadMore/index.mjs +7 -13
  78. package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +12 -10
  79. package/dist/components/BitzMeetingTime/index.mjs +15 -4
  80. package/dist/components/BitzMobileLoading/index.mjs +3 -1
  81. package/dist/components/BitzModal/index.mjs +13 -20
  82. package/dist/components/BitzNoData/index.mjs +8 -1
  83. package/dist/components/BitzNoMore/index.mjs +4 -1
  84. package/dist/components/BitzOrganizationSelection/index.mjs +32 -30
  85. package/dist/components/BitzPageContainer/index.mjs +21 -42
  86. package/dist/components/BitzPageHeader/index.mjs +14 -48
  87. package/dist/components/BitzPagination/index.mjs +9 -38
  88. package/dist/components/BitzPopover/index.mjs +8 -2
  89. package/dist/components/BitzPullRefresh/PullRefresh.mjs +43 -45
  90. package/dist/components/BitzQRCode/index.mjs +1 -6
  91. package/dist/components/BitzQueryFilter/QueryFilterContent.mjs +23 -20
  92. package/dist/components/BitzQueryFilter/QueryFilterDrawer.mjs +7 -1
  93. package/dist/components/BitzQueryFilter/QueryFilterMobile.mjs +3 -1
  94. package/dist/components/BitzQueryFilter/index.mjs +7 -39
  95. package/dist/components/BitzRefresh/index.mjs +13 -4
  96. package/dist/components/BitzRemark/index.mjs +6 -1
  97. package/dist/components/BitzSearch/index.mjs +12 -2
  98. package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +49 -99
  99. package/dist/components/BitzSelect/index.mjs +10 -2
  100. package/dist/components/BitzSkeleton/index.mjs +1 -31
  101. package/dist/components/BitzTabbar/BitzTabbar.mjs +7 -13
  102. package/dist/components/BitzTabbar/BitzTabbarItem.mjs +15 -3
  103. package/dist/components/BitzTable/ActionBar/ActionBar.mjs +41 -86
  104. package/dist/components/BitzTable/ActionBar/Button.mjs +4 -1
  105. package/dist/components/BitzTable/ActionBar/style.mjs +62 -67
  106. package/dist/components/BitzTable/ActionCol/index.mjs +65 -166
  107. package/dist/components/BitzTable/ActionCol/style.mjs +74 -88
  108. package/dist/components/BitzTable/Dropdown/index.mjs +15 -11
  109. package/dist/components/BitzTable/Dropdown/style.mjs +66 -70
  110. package/dist/components/BitzTable/SelectionBar/Button.mjs +22 -16
  111. package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +15 -13
  112. package/dist/components/BitzTable/SelectionBar/style.mjs +79 -96
  113. package/dist/components/BitzTable/Store/index.mjs +126 -152
  114. package/dist/components/BitzTable/Store/utils/index.mjs +11 -2
  115. package/dist/components/BitzTable/SubTable/index.mjs +63 -68
  116. package/dist/components/BitzTable/Table/ResizableTitle copy.mjs +27 -37
  117. package/dist/components/BitzTable/Table/SortTableContext.mjs +7 -19
  118. package/dist/components/BitzTable/Table/SortableRow.mjs +32 -34
  119. package/dist/components/BitzTable/Table/TdCell.mjs +14 -12
  120. package/dist/components/BitzTable/Table/index.mjs +418 -532
  121. package/dist/components/BitzTable/Table/useScrollConfig.mjs +18 -10
  122. package/dist/components/BitzTable/Table/utils.mjs +20 -21
  123. package/dist/components/BitzTable/TextOverflow/index.mjs +15 -14
  124. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.d.ts +0 -1
  125. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +120 -119
  126. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +114 -120
  127. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +26 -37
  128. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +340 -342
  129. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +23 -33
  130. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +16 -30
  131. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +168 -145
  132. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +12 -9
  133. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/ScopeSwitch.mjs +29 -17
  134. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +233 -170
  135. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +51 -54
  136. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +53 -53
  137. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +33 -33
  138. package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +52 -39
  139. package/dist/components/BitzTable/ToolBar/Modal/index.d.ts +1 -1
  140. package/dist/components/BitzTable/ToolBar/Modal/index.mjs +19 -38
  141. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +34 -20
  142. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +32 -44
  143. package/dist/components/BitzTable/ToolBar/style.mjs +59 -58
  144. package/dist/components/BitzTableOperations/index.mjs +8 -13
  145. package/dist/components/BitzTableSelect/Picker/index.mjs +4 -23
  146. package/dist/components/BitzTableSelect/Select/index.mjs +2 -48
  147. package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +16 -22
  148. package/dist/components/BitzTableSelect/SelectPopup/index.mjs +72 -156
  149. package/dist/components/BitzTableSelect/SingleSelect/index.mjs +1 -43
  150. package/dist/components/BitzTableSelect/TableCell/index.mjs +24 -52
  151. package/dist/components/BitzTableSelect/TextBlock/index.mjs +10 -18
  152. package/dist/components/BitzTableSelect/index.mjs +5 -39
  153. package/dist/components/BitzTag/index.mjs +10 -2
  154. package/dist/components/BitzText/index.mjs +37 -42
  155. package/dist/components/BitzTheme/index.mjs +5 -1
  156. package/dist/components/BitzTimeline/index.mjs +1 -11
  157. package/dist/components/BitzTimer/Form.mjs +32 -38
  158. package/dist/components/BitzTimer/Timer.mjs +8 -23
  159. package/dist/components/BitzTimer/index.mjs +36 -35
  160. package/dist/components/BitzToast/Toast/index.mjs +24 -12
  161. package/dist/components/BitzToast/index.mjs +7 -1
  162. package/dist/components/BitzTooltip/index.mjs +35 -45
  163. package/dist/components/BitzTooltip/style.mjs +41 -38
  164. package/dist/components/BitzUeEditor/config.mjs +183 -185
  165. package/dist/components/BitzUeEditor/index.mjs +10 -2
  166. package/dist/components/BitzUpload/index.mjs +56 -67
  167. package/dist/components/BitzWebAppDrawer/index.mjs +4 -18
  168. package/dist/components/BitzWebAppModal/index.mjs +6 -1
  169. package/dist/hooks/use-event-listener.mjs +4 -5
  170. package/dist/hooks/use-lock-fn.mjs +10 -13
  171. package/dist/hooks/use-scroll-parent.mjs +4 -4
  172. package/dist/hooks/useEvent.mjs +4 -7
  173. package/dist/hooks/useMergedState.mjs +6 -1
  174. package/dist/node_modules/dayjs/locale/zh-cn.mjs +10 -10
  175. package/dist/style.css +1 -1
  176. package/dist/utils/WithFluent.mjs +13 -9
  177. package/dist/utils/create.mjs +1 -7
  178. package/dist/utils/get-default-props.mjs +3 -1
  179. package/dist/utils/time.mjs +8 -8
  180. package/package.json +5 -5
  181. package/dist/_virtual/dayjs.min.mjs +0 -4
  182. package/dist/components/BitzTable/Select/index.d.ts +0 -3
  183. package/dist/components/BitzTable/Select/style.d.ts +0 -4
  184. package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.d.ts +0 -11
  185. package/dist/components/BitzTable/ToolBar/ExportIcon/styles.d.ts +0 -3
  186. package/dist/node_modules/dayjs/dayjs.min.mjs +0 -297
@@ -1,73 +1,73 @@
1
1
  import { j as e } from "../../../../node_modules/react/jsx-runtime.mjs";
2
- import { Card as C, Flex as l, message as j } from "antd";
2
+ import { Card as j, Flex as l, message as C } from "antd";
3
3
  import { CheckCircleOutlined as y } from "@ant-design/icons";
4
- import { useState as k, useContext as b, useRef as B, useMemo as E } from "react";
5
- import { BitzTableContext as O } from "../../Store/index.mjs";
4
+ import { useState as b, useContext as B, useRef as k } from "react";
5
+ import { BitzTableContext as E } from "../../Store/index.mjs";
6
6
  import c from "../../../BitzButton/index.mjs";
7
- import R from "../../../BitzTheme/index.mjs";
8
- import T from "../Modal/index.mjs";
9
- import z from "../ColConfigIcon/ExportConfig/index.mjs";
10
- const G = ({
7
+ import O from "../../../BitzTheme/index.mjs";
8
+ import R from "../Modal/index.mjs";
9
+ import T from "../ColConfigIcon/ExportConfig/index.mjs";
10
+ import { useLingui as v } from "@lingui/react";
11
+ const K = ({
11
12
  open: f,
12
13
  title: m,
13
- onExport: n,
14
+ onExport: i,
14
15
  close: t,
15
16
  getContainer: d
16
17
  }) => {
17
- const { token: s } = R.useToken(), [p, r] = k(!1), { defaultTableExportConfig: u } = b(O), o = B(null), x = async () => {
18
- var i, a;
18
+ const {
19
+ _: o
20
+ } = v();
21
+ O.useToken();
22
+ const [p, r] = b(!1), {
23
+ defaultTableExportConfig: u
24
+ } = B(E), n = k(null), x = async () => {
25
+ var s, a;
19
26
  if (p)
20
27
  return;
21
- if (r(!0), !((i = o.current) == null ? void 0 : i.hasOne())) {
22
- j.error("导出设置至少需要一个字段"), r(!1);
28
+ if (r(!0), !((s = n.current) == null ? void 0 : s.hasOne())) {
29
+ C.error(o(
30
+ /*i18n*/
31
+ {
32
+ id: "oMKr8D"
33
+ }
34
+ )), r(!1);
23
35
  return;
24
36
  }
25
- const g = ((a = o.current) == null ? void 0 : a.getExportConfig()) ?? u;
26
- n && (r(!1), n(g), t());
27
- };
28
- E(() => s.mode === "dark", [s.mode]);
29
- const h = () => {
37
+ const g = ((a = n.current) == null ? void 0 : a.getExportConfig()) ?? u;
38
+ i && (r(!1), i(g), t());
39
+ }, h = () => {
30
40
  r(!1);
31
41
  };
32
- return /* @__PURE__ */ e.jsx(
33
- T,
34
- {
35
- open: f,
36
- title: m,
37
- close: t,
38
- closeAfter: h,
39
- getContainer: d,
40
- footer: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
41
- /* @__PURE__ */ e.jsx(
42
- c,
42
+ return /* @__PURE__ */ e.jsx(R, { open: f, title: m, close: t, closeAfter: h, getContainer: d, footer: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
43
+ /* @__PURE__ */ e.jsx(
44
+ c,
45
+ {
46
+ type: "primary",
47
+ icon: /* @__PURE__ */ e.jsx(y, {}),
48
+ onClick: x,
49
+ children: o(
50
+ /*i18n*/
43
51
  {
44
- type: "primary",
45
- icon: /* @__PURE__ */ e.jsx(y, {}),
46
- onClick: x,
47
- children: "导出"
52
+ id: "v6FJm2"
48
53
  }
49
- ),
50
- /* @__PURE__ */ e.jsx(c, { onClick: t, children: "取消" })
51
- ] }),
52
- children: /* @__PURE__ */ e.jsx(
53
- C,
54
- {
55
- className: "container",
56
- bordered: !1,
57
- styles: { body: { paddingBlock: 24 } },
58
- children: /* @__PURE__ */ e.jsx(l, { vertical: !0, align: "center", gap: 24, style: { height: "100%" }, children: /* @__PURE__ */ e.jsx(l, { className: "containerBody", children: /* @__PURE__ */ e.jsx(
59
- z,
60
- {
61
- refInstance: o,
62
- display: !0,
63
- showSelectRadio: !0
64
- }
65
- ) }) })
66
- }
67
- )
54
+ )
55
+ }
56
+ ),
57
+ /* @__PURE__ */ e.jsx(c, { onClick: t, children: o(
58
+ /*i18n*/
59
+ {
60
+ id: "jxD+iQ"
61
+ }
62
+ ) })
63
+ ] }), children: /* @__PURE__ */ e.jsx(j, { className: "container", bordered: !1, styles: {
64
+ body: {
65
+ paddingBlock: 24
68
66
  }
69
- );
67
+ }, children: /* @__PURE__ */ e.jsx(l, { vertical: !0, align: "center", gap: 24, style: {
68
+ height: "100%"
69
+ }, children: /* @__PURE__ */ e.jsx(l, { className: "containerBody", children: /* @__PURE__ */ e.jsx(T, { refInstance: n, display: !0, showSelectRadio: !0 }) }) }) }) });
70
70
  };
71
71
  export {
72
- G as default
72
+ K as default
73
73
  };
@@ -1,46 +1,46 @@
1
1
  import { j as t } from "../../../../node_modules/react/jsx-runtime.mjs";
2
- import { memo as j, useState as y, useContext as l, useMemo as E } from "react";
3
- import { DownloadOutlined as b } from "@ant-design/icons";
4
- import h from "../style.mjs";
5
- import B from "../../../BitzButton/index.mjs";
6
- import { BitzTableContext as i } from "../../Store/index.mjs";
7
- import { exportConfigTitle as C } from "../ColConfigIcon/ColumnConfigModal.mjs";
2
+ import { memo as y, useState as E, useContext as l, useMemo as b } from "react";
3
+ import { DownloadOutlined as h } from "@ant-design/icons";
4
+ import B from "../style.mjs";
5
+ import C from "../../../BitzButton/index.mjs";
6
+ import { BitzTableContext as a } from "../../Store/index.mjs";
8
7
  import I from "./ExportModal.mjs";
9
- const z = ({
8
+ import { useLingui as T } from "@lingui/react";
9
+ const v = ({
10
10
  show: p = !0,
11
- order: a,
11
+ order: f,
12
12
  onClick: o,
13
- icon: f = /* @__PURE__ */ t.jsx(b, {})
13
+ icon: u = /* @__PURE__ */ t.jsx(h, {})
14
14
  }) => {
15
- const { toolbarItemClassName: x } = h(), [u, s] = y(!1);
16
- l(i).exportConfig;
17
- const { loading: c, fullscreen: n, dataSource: e } = l(i), d = E(() => n ? !1 : void 0, [n]), g = async (r) => {
18
- var m;
19
- o == null || o(r.config.key, r.fields, (m = r.config) == null ? void 0 : m.info);
15
+ const {
16
+ _: r
17
+ } = T(), {
18
+ toolbarItemClassName: x
19
+ } = B(), [c, n] = E(!1);
20
+ l(a).exportConfig;
21
+ const {
22
+ loading: d,
23
+ fullscreen: m,
24
+ dataSource: e
25
+ } = l(a), g = b(() => m ? !1 : void 0, [m]), j = async (s) => {
26
+ var i;
27
+ o == null || o(s.config.key, s.fields, (i = s.config) == null ? void 0 : i.info);
20
28
  };
21
29
  return p ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
22
- /* @__PURE__ */ t.jsx(
23
- I,
30
+ /* @__PURE__ */ t.jsx(I, { open: c, title: r(
31
+ /*i18n*/
24
32
  {
25
- open: u,
26
- title: C,
27
- getContainer: d,
28
- onExport: g,
29
- close: () => s(!1)
33
+ id: "TPCk/T"
30
34
  }
31
- ),
32
- /* @__PURE__ */ t.jsx(
33
- B,
35
+ ), getContainer: g, onExport: j, close: () => n(!1) }),
36
+ /* @__PURE__ */ t.jsx(C, { type: "text", className: x, icon: u, style: {
37
+ order: f
38
+ }, disabled: d || !(e != null && e.length), onClick: () => n(!0), children: r(
39
+ /*i18n*/
34
40
  {
35
- type: "text",
36
- className: x,
37
- icon: f,
38
- style: { order: a },
39
- disabled: c || !(e != null && e.length),
40
- onClick: () => s(!0),
41
- children: "导出"
41
+ id: "v6FJm2"
42
42
  }
43
- )
43
+ ) })
44
44
  ] }) : (
45
45
  // <Dropdown
46
46
  // open={open}
@@ -68,7 +68,7 @@ const z = ({
68
68
  // </Dropdown>
69
69
  null
70
70
  );
71
- }, G = j(z);
71
+ }, G = y(v);
72
72
  export {
73
73
  G as default
74
74
  };
@@ -1,50 +1,63 @@
1
- import { j as s } from "../../../../node_modules/react/jsx-runtime.mjs";
2
- import { memo as E, useContext as B, useMemo as z, useEffect as F } from "react";
3
- import { FullscreenExitOutlined as L, FullscreenOutlined as T } from "@ant-design/icons";
4
- import g from "../style.mjs";
5
- import j from "../../../BitzButton/index.mjs";
1
+ import { j as o } from "../../../../node_modules/react/jsx-runtime.mjs";
2
+ import { memo as E, useContext as g, useMemo as z, useEffect as F } from "react";
3
+ import { FullscreenExitOutlined as L, FullscreenOutlined as j } from "@ant-design/icons";
4
+ import T from "../style.mjs";
5
+ import C from "../../../BitzButton/index.mjs";
6
6
  import l from "../../../../node_modules/screenfull/index.mjs";
7
- import C from "../../../BitzToast/index.mjs";
8
- import { findParentFirstNodeByClass as h } from "../../../../utils/findNode.mjs";
9
- import { BitzTableContext as k } from "../../Store/index.mjs";
10
- const y = ({
11
- order: d,
12
- show: p = !0
7
+ import h from "../../../BitzToast/index.mjs";
8
+ import { findParentFirstNodeByClass as k } from "../../../../utils/findNode.mjs";
9
+ import { BitzTableContext as y } from "../../Store/index.mjs";
10
+ import { useLingui as I } from "@lingui/react";
11
+ const v = ({
12
+ order: p,
13
+ show: x = !0
13
14
  }) => {
14
- const { toolbarItemClassName: b } = g(), { fullscreen: n, setFullscreen: o } = B(k), r = z(() => n ? {
15
- title: "退出全屏",
16
- icon: /* @__PURE__ */ s.jsx(L, {})
15
+ const {
16
+ _: n
17
+ } = I(), {
18
+ toolbarItemClassName: b
19
+ } = T(), {
20
+ fullscreen: s,
21
+ setFullscreen: r
22
+ } = g(y), i = z(() => s ? {
23
+ title: n(
24
+ /*i18n*/
25
+ {
26
+ id: "HMDSro"
27
+ }
28
+ ),
29
+ icon: /* @__PURE__ */ o.jsx(L, {})
17
30
  } : {
18
- title: "全屏",
19
- icon: /* @__PURE__ */ s.jsx(T, {})
20
- }, [n]), x = (e) => {
21
- l.isEnabled || C.error("您的浏览器不支持全屏");
22
- const t = h(e.target, "bitzTableBlock");
23
- n ? l.exit() : l.request(t);
31
+ title: n(
32
+ /*i18n*/
33
+ {
34
+ id: "sgaIOj"
35
+ }
36
+ ),
37
+ icon: /* @__PURE__ */ o.jsx(j, {})
38
+ }, [s]), B = (e) => {
39
+ l.isEnabled || h.error(n(
40
+ /*i18n*/
41
+ {
42
+ id: "3xBuJn"
43
+ }
44
+ ));
45
+ const t = k(e.target, "bitzTableBlock");
46
+ s ? l.exit() : l.request(t);
24
47
  };
25
48
  return F(() => {
26
49
  const e = "bz-fullscreen", t = (c) => {
27
- var i, m;
28
- ((i = c.target) != null && i.classList.contains("bitzTableBlock") || (m = c.target) != null && m.classList.contains(e)) && setTimeout(() => {
29
- var u, a, f;
30
- o(!!document.fullscreenElement), (a = (u = document.fullscreenElement) == null ? void 0 : u.classList) != null && a.contains(
31
- "bitzTableBlock"
32
- ) || (f = document.fullscreenElement) != null && f.classList.contains(e) || o(!1);
50
+ var u, m;
51
+ ((u = c.target) != null && u.classList.contains("bitzTableBlock") || (m = c.target) != null && m.classList.contains(e)) && setTimeout(() => {
52
+ var a, f, d;
53
+ r(!!document.fullscreenElement), (f = (a = document.fullscreenElement) == null ? void 0 : a.classList) != null && f.contains("bitzTableBlock") || (d = document.fullscreenElement) != null && d.classList.contains(e) || r(!1);
33
54
  }, 300);
34
55
  };
35
56
  return document == null || document.addEventListener("fullscreenchange", t), () => document == null ? void 0 : document.removeEventListener("fullscreenchange", t);
36
- }, []), p ? /* @__PURE__ */ s.jsx(
37
- j,
38
- {
39
- type: "text",
40
- className: b,
41
- onClick: x,
42
- icon: r.icon,
43
- style: { order: d },
44
- children: r.title
45
- }
46
- ) : null;
47
- }, R = E(y);
57
+ }, []), x ? /* @__PURE__ */ o.jsx(C, { type: "text", className: b, onClick: B, icon: i.icon, style: {
58
+ order: p
59
+ }, children: i.title }) : null;
60
+ }, P = E(v);
48
61
  export {
49
- R as default
62
+ P as default
50
63
  };
@@ -15,5 +15,5 @@ export interface ModalProps {
15
15
  styles?: AntModalProps['styles'];
16
16
  children: ReactNode;
17
17
  }
18
- declare function Modal({ open, title, close, closeAfter, getContainer, footer, extra, styles: modalStyles, children, }: ModalProps): import("react/jsx-runtime").JSX.Element;
18
+ declare function Modal({ open, title, close, closeAfter, getContainer, footer, extra, styles: modalStyles, children, width, }: ModalProps): import("react/jsx-runtime").JSX.Element;
19
19
  export default Modal;
@@ -3,54 +3,35 @@ import { Modal as C, Typography as c } from "antd";
3
3
  import { useMemo as p } from "react";
4
4
  import g from "../../../BitzTheme/index.mjs";
5
5
  import u from "../../../../node_modules/classnames/index.mjs";
6
- import { styles as y, modalTitleHeight as x } from "./style.mjs";
7
- function H({
6
+ import { styles as y, modalTitleHeight as h } from "./style.mjs";
7
+ function w({
8
8
  open: e,
9
9
  title: s,
10
10
  close: a,
11
11
  closeAfter: l,
12
12
  getContainer: i,
13
13
  footer: m,
14
- extra: h,
14
+ extra: x,
15
15
  styles: n,
16
- children: d
16
+ children: d,
17
+ width: M
17
18
  }) {
18
- const { token: o } = g.useToken(), r = p(() => o.mode === "dark", [o.mode]), f = () => {
19
+ const {
20
+ token: o
21
+ } = g.useToken(), r = p(() => o.mode === "dark", [o.mode]), f = () => {
19
22
  l();
20
23
  };
21
- return /* @__PURE__ */ t.jsx(
22
- C,
23
- {
24
- className: u(y(o), "tableConfigModal"),
25
- title: /* @__PURE__ */ t.jsx(
26
- c.Title,
27
- {
28
- style: {
29
- fontSize: 16,
30
- lineHeight: `${x}px`,
31
- margin: 0
32
- },
33
- children: s
34
- }
35
- ),
36
- getContainer: i,
37
- open: e,
38
- onCancel: a,
39
- afterClose: f,
40
- style: {
41
- "--sortCard-bgColor": r ? "#444" : "#f2f2f2",
42
- "--sortCard-titleColor": r ? "#ccc" : "#777",
43
- "--radioCard-bgColor": r ? "#444" : "#F2F2F2",
44
- "--radioCard-bgHoverColor": r ? "#333" : o.colorBgContainer
45
- },
46
- styles: n,
47
- width: 700,
48
- footer: m,
49
- destroyOnClose: !0,
50
- children: d
51
- }
52
- );
24
+ return /* @__PURE__ */ t.jsx(C, { className: u(y(o), "tableConfigModal"), title: /* @__PURE__ */ t.jsx(c.Title, { style: {
25
+ fontSize: 16,
26
+ lineHeight: `${h}px`,
27
+ margin: 0
28
+ }, children: s }), getContainer: i, open: e, onCancel: a, afterClose: f, style: {
29
+ "--sortCard-bgColor": r ? "#444" : "#f2f2f2",
30
+ "--sortCard-titleColor": r ? "#ccc" : "#777",
31
+ "--radioCard-bgColor": r ? "#444" : "#F2F2F2",
32
+ "--radioCard-bgHoverColor": r ? "#333" : o.colorBgContainer
33
+ }, styles: n, width: 860, footer: m, destroyOnClose: !0, children: d });
53
34
  }
54
35
  export {
55
- H as default
36
+ w as default
56
37
  };
@@ -1,25 +1,39 @@
1
1
  import { j as o } from "../../../../node_modules/react/jsx-runtime.mjs";
2
- import { memo as a, useContext as c } from "react";
3
- import { Tooltip as p } from "antd";
4
- import { ReloadOutlined as f } from "@ant-design/icons";
5
- import d from "../style.mjs";
6
- import u from "../../../BitzButton/index.mjs";
7
- import { BitzTableContext as x } from "../../Store/index.mjs";
8
- const h = (t) => {
9
- const { onClick: e, order: r, show: s = !0, icon: n = /* @__PURE__ */ o.jsx(f, {}) } = t, { loading: l, selected: m } = c(x), { toolbarItemClassName: i } = d();
10
- return s ? /* @__PURE__ */ o.jsx(p, { title: "刷新", open: !1, children: /* @__PURE__ */ o.jsx(
11
- u,
2
+ import { memo as c, useContext as a } from "react";
3
+ import { Tooltip as u } from "antd";
4
+ import { ReloadOutlined as d } from "@ant-design/icons";
5
+ import f from "../style.mjs";
6
+ import x from "../../../BitzButton/index.mjs";
7
+ import { BitzTableContext as h } from "../../Store/index.mjs";
8
+ import { useLingui as j } from "@lingui/react";
9
+ const g = (e) => {
10
+ const {
11
+ _: t
12
+ } = j(), {
13
+ onClick: s,
14
+ order: r,
15
+ show: i = !0,
16
+ icon: n = /* @__PURE__ */ o.jsx(d, {})
17
+ } = e, {
18
+ loading: m,
19
+ selected: l
20
+ } = a(h), {
21
+ toolbarItemClassName: p
22
+ } = f();
23
+ return i ? /* @__PURE__ */ o.jsx(u, { title: t(
24
+ /*i18n*/
12
25
  {
13
- type: "text",
14
- className: i,
15
- disabled: l || m,
16
- onClick: e,
17
- icon: n,
18
- style: { order: r },
19
- children: "刷新"
26
+ id: "JpgJsu"
20
27
  }
21
- ) }) : null;
22
- }, z = a(h);
28
+ ), open: !1, children: /* @__PURE__ */ o.jsx(x, { type: "text", className: p, disabled: m || l, onClick: s, icon: n, style: {
29
+ order: r
30
+ }, children: t(
31
+ /*i18n*/
32
+ {
33
+ id: "JpgJsu"
34
+ }
35
+ ) }) }) : null;
36
+ }, N = c(g);
23
37
  export {
24
- z as default
38
+ N as default
25
39
  };
@@ -17,15 +17,32 @@ const F = ["export", "refresh", "fullscreen", "config"], J = ({
17
17
  onRefresh: d,
18
18
  onColumnChange: a
19
19
  }) => {
20
- const { Table: e } = c(R), { selected: u, setToolbarWidth: x } = c(k), i = h(() => {
20
+ const {
21
+ Table: e
22
+ } = c(R), {
23
+ selected: u,
24
+ setToolbarWidth: x
25
+ } = c(k), i = h(() => {
21
26
  const s = l || (e == null ? void 0 : e.toolbar) || F;
22
27
  return t != null && t.length ? s.filter((n) => !t.includes(n)) : s;
23
28
  }, [e == null ? void 0 : e.toolbar, t, l]), o = h(() => {
24
29
  const s = {
25
- export: { order: 1, show: !1 },
26
- refresh: { order: 2, show: !1 },
27
- fullscreen: { order: 3, show: !1 },
28
- config: { order: 4, show: !1 }
30
+ export: {
31
+ order: 1,
32
+ show: !1
33
+ },
34
+ refresh: {
35
+ order: 2,
36
+ show: !1
37
+ },
38
+ fullscreen: {
39
+ order: 3,
40
+ show: !1
41
+ },
42
+ config: {
43
+ order: 4,
44
+ show: !1
45
+ }
29
46
  };
30
47
  return i.forEach((n, w) => {
31
48
  s[n].order = w + 1, s[n].show = i.includes(n);
@@ -33,46 +50,17 @@ const F = ["export", "refresh", "fullscreen", "config"], J = ({
33
50
  }, [i]), f = g(null);
34
51
  return C(() => {
35
52
  f.current && x(f.current.clientWidth);
36
- }, [f.current]), /* @__PURE__ */ r.jsx(b.Provider, { value: m ?? {}, children: /* @__PURE__ */ r.jsx(
37
- j,
38
- {
39
- ref: f,
40
- style: { height: "100%", ...u && { zIndex: 10 } },
41
- children: /* @__PURE__ */ r.jsxs(z.Compact, { children: [
42
- /* @__PURE__ */ r.jsx(
43
- I,
44
- {
45
- order: o.export.order,
46
- show: o.export.show,
47
- onClick: p
48
- }
49
- ),
50
- /* @__PURE__ */ r.jsx(
51
- B,
52
- {
53
- order: o.refresh.order,
54
- show: o.refresh.show,
55
- onClick: d
56
- }
57
- ),
58
- /* @__PURE__ */ r.jsx(
59
- E,
60
- {
61
- order: o.fullscreen.order,
62
- show: o.fullscreen.show
63
- }
64
- ),
65
- /* @__PURE__ */ r.jsx(
66
- T,
67
- {
68
- order: o.config.order,
69
- show: o.config.show,
70
- onChange: a
71
- }
72
- )
73
- ] })
53
+ }, [f.current]), /* @__PURE__ */ r.jsx(b.Provider, { value: m ?? {}, children: /* @__PURE__ */ r.jsx(j, { ref: f, style: {
54
+ height: "100%",
55
+ ...u && {
56
+ zIndex: 10
74
57
  }
75
- ) });
58
+ }, children: /* @__PURE__ */ r.jsxs(z.Compact, { children: [
59
+ /* @__PURE__ */ r.jsx(I, { order: o.export.order, show: o.export.show, onClick: p }),
60
+ /* @__PURE__ */ r.jsx(B, { order: o.refresh.order, show: o.refresh.show, onClick: d }),
61
+ /* @__PURE__ */ r.jsx(E, { order: o.fullscreen.order, show: o.fullscreen.show }),
62
+ /* @__PURE__ */ r.jsx(T, { order: o.config.order, show: o.config.show, onChange: a })
63
+ ] }) }) });
76
64
  };
77
65
  export {
78
66
  J as default