bitz-react-admin-ui 2.5.9 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/dist/assets/iconfont/IconChenggong.mjs +25 -4
  2. package/dist/assets/iconfont/IconClose.mjs +24 -3
  3. package/dist/assets/iconfont/IconColumnCancelFixed.mjs +23 -2
  4. package/dist/assets/iconfont/IconColumnFixedLeft.mjs +27 -6
  5. package/dist/assets/iconfont/IconColumnFixedRight.mjs +27 -6
  6. package/dist/assets/iconfont/IconCuowu.mjs +23 -2
  7. package/dist/assets/iconfont/IconDragOrder.mjs +25 -4
  8. package/dist/assets/iconfont/IconDuigoux.mjs +25 -4
  9. package/dist/assets/iconfont/IconFabu.mjs +35 -5
  10. package/dist/assets/iconfont/IconFanhui.mjs +25 -4
  11. package/dist/assets/iconfont/IconGaojisousuo.mjs +26 -5
  12. package/dist/assets/iconfont/IconHangfengexian.mjs +41 -3
  13. package/dist/assets/iconfont/IconHangliefengexian.mjs +42 -4
  14. package/dist/assets/iconfont/IconIcFluentHomeRegular.mjs +26 -5
  15. package/dist/assets/iconfont/IconIcon21.mjs +25 -4
  16. package/dist/assets/iconfont/IconJincoude.mjs +25 -4
  17. package/dist/assets/iconfont/IconJinggao.mjs +25 -4
  18. package/dist/assets/iconfont/IconKuansongde.mjs +26 -5
  19. package/dist/assets/iconfont/IconLiefengexian.mjs +41 -3
  20. package/dist/assets/iconfont/IconMore.mjs +41 -4
  21. package/dist/assets/iconfont/IconShanchu.mjs +27 -6
  22. package/dist/assets/iconfont/IconShanchu1.mjs +35 -5
  23. package/dist/assets/iconfont/IconSousuo.mjs +27 -6
  24. package/dist/assets/iconfont/IconTejincou.mjs +25 -4
  25. package/dist/assets/iconfont/IconTekuansong.mjs +26 -5
  26. package/dist/assets/iconfont/IconTishi1.mjs +27 -6
  27. package/dist/assets/iconfont/IconTuodong.mjs +28 -7
  28. package/dist/assets/iconfont/IconWubanmawentianchong.mjs +35 -3
  29. package/dist/assets/iconfont/IconWufengexian.mjs +26 -4
  30. package/dist/assets/iconfont/IconXinxitishi.mjs +27 -6
  31. package/dist/assets/iconfont/IconYoubanmawentianchong.mjs +34 -3
  32. package/dist/assets/iconfont/IconZhongdengde.mjs +24 -3
  33. package/dist/assets/iconfont/IconZhongzhi.mjs +24 -3
  34. package/dist/assets/iconfont/index.mjs +33 -33
  35. package/dist/components/BitzAddTag/index.mjs +41 -8
  36. package/dist/components/BitzAddressBook/index.mjs +122 -35
  37. package/dist/components/BitzAppPage/index.mjs +18 -4
  38. package/dist/components/BitzAppRefresh/index.mjs +27 -15
  39. package/dist/components/BitzBetterScroll/index.mjs +5 -5
  40. package/dist/components/BitzButton/index.mjs +23 -9
  41. package/dist/components/BitzCalendar/index.mjs +52 -19
  42. package/dist/components/BitzCascader/BitzCascaderMobile.mjs +68 -30
  43. package/dist/components/BitzCascader/index.mjs +6 -2
  44. package/dist/components/BitzCollapse/index.mjs +4 -4
  45. package/dist/components/BitzConfigProvider/context.mjs +3 -1
  46. package/dist/components/BitzConfigProvider/index.mjs +12 -8
  47. package/dist/components/BitzConfirmModal/index.mjs +24 -1
  48. package/dist/components/BitzDescriptions/index.mjs +11 -1
  49. package/dist/components/BitzDrawer/index.mjs +17 -2
  50. package/dist/components/BitzEmpty/index.mjs +6 -2
  51. package/dist/components/BitzException/index.mjs +6 -1
  52. package/dist/components/BitzFloatLayout/index.mjs +10 -1
  53. package/dist/components/BitzFluentDatePicker/index.mjs +1 -1
  54. package/dist/components/BitzFluentRangePicker/index.mjs +1 -1
  55. package/dist/components/BitzFluentRangeTimePicker/index.mjs +1 -1
  56. package/dist/components/BitzFluentTimePicker/index.mjs +1 -1
  57. package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +13 -16
  58. package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +26 -20
  59. package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +21 -3
  60. package/dist/components/BitzFuiCalendar/CalendarBody.mjs +27 -4
  61. package/dist/components/BitzFuiCalendar/CalendarHead.mjs +5 -2
  62. package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +12 -3
  63. package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +47 -15
  64. package/dist/components/BitzFuiCalendar/ColumnData.mjs +25 -9
  65. package/dist/components/BitzFuiCalendar/FuiCalendarItem.mjs +44 -8
  66. package/dist/components/BitzFuiCalendar/index.mjs +7 -1
  67. package/dist/components/BitzFullScreen/index.mjs +9 -6
  68. package/dist/components/BitzHighlight/Child.mjs +23 -9
  69. package/dist/components/BitzHighlight/Highlight.mjs +26 -5
  70. package/dist/components/BitzHighlight/chunks.mjs +20 -17
  71. package/dist/components/BitzHighlight/style.mjs +4 -1
  72. package/dist/components/BitzImage/index.mjs +1 -1
  73. package/dist/components/BitzImage/previewImage.mjs +12 -5
  74. package/dist/components/BitzLanguageTabs/index.mjs +14 -3
  75. package/dist/components/BitzLazyLoad/index.mjs +7 -1
  76. package/dist/components/BitzList/List.mjs +17 -3
  77. package/dist/components/BitzList/LoadMore.mjs +29 -20
  78. package/dist/components/BitzLoadMore/index.mjs +34 -14
  79. package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +24 -11
  80. package/dist/components/BitzMeetingTime/index.mjs +10 -6
  81. package/dist/components/BitzMobileLoading/index.mjs +1 -1
  82. package/dist/components/BitzModal/index.mjs +24 -11
  83. package/dist/components/BitzNoData/index.mjs +4 -1
  84. package/dist/components/BitzNoMore/index.mjs +1 -1
  85. package/dist/components/BitzOrganizationSelection/index.mjs +43 -14
  86. package/dist/components/BitzPageContainer/index.mjs +107 -46
  87. package/dist/components/BitzPageHeader/index.mjs +89 -21
  88. package/dist/components/BitzPagination/index.mjs +71 -22
  89. package/dist/components/BitzPopover/index.mjs +4 -4
  90. package/dist/components/BitzPullRefresh/PullRefresh.mjs +47 -18
  91. package/dist/components/BitzQRCode/index.mjs +6 -1
  92. package/dist/components/BitzQueryFilter/QueryFilterContent.mjs +35 -17
  93. package/dist/components/BitzQueryFilter/QueryFilterDrawer.mjs +20 -13
  94. package/dist/components/BitzQueryFilter/QueryFilterMobile.mjs +4 -1
  95. package/dist/components/BitzQueryFilter/index.mjs +69 -20
  96. package/dist/components/BitzRefresh/index.mjs +5 -1
  97. package/dist/components/BitzRemark/index.mjs +4 -4
  98. package/dist/components/BitzScheduleCenter/index.mjs +24 -30
  99. package/dist/components/BitzSearch/index.mjs +1 -1
  100. package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +123 -48
  101. package/dist/components/BitzSelect/index.mjs +1 -1
  102. package/dist/components/BitzSkeleton/index.mjs +31 -1
  103. package/dist/components/BitzSwitch/index.mjs +7 -2
  104. package/dist/components/BitzTabbar/BitzTabbar.mjs +25 -8
  105. package/dist/components/BitzTabbar/BitzTabbarItem.mjs +4 -1
  106. package/dist/components/BitzTable/ActionBar/ActionBar.mjs +80 -12
  107. package/dist/components/BitzTable/ActionBar/Button.mjs +20 -15
  108. package/dist/components/BitzTable/ActionBar/style.mjs +12 -9
  109. package/dist/components/BitzTable/ActionCol/index.mjs +129 -33
  110. package/dist/components/BitzTable/ActionCol/style.mjs +15 -12
  111. package/dist/components/BitzTable/Dropdown/index.mjs +8 -1
  112. package/dist/components/BitzTable/Dropdown/style.mjs +9 -6
  113. package/dist/components/BitzTable/SelectionBar/Button.mjs +19 -6
  114. package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +11 -4
  115. package/dist/components/BitzTable/SelectionBar/style.mjs +18 -8
  116. package/dist/components/BitzTable/Store/index.mjs +170 -133
  117. package/dist/components/BitzTable/Store/utils/index.d.ts +1 -0
  118. package/dist/components/BitzTable/Store/utils/index.mjs +48 -38
  119. package/dist/components/BitzTable/SubTable/index.mjs +91 -43
  120. package/dist/components/BitzTable/Table/ResizableTitle copy.mjs +57 -40
  121. package/dist/components/BitzTable/Table/SortTableContext.mjs +39 -17
  122. package/dist/components/BitzTable/Table/SortableRow.mjs +44 -20
  123. package/dist/components/BitzTable/Table/index.mjs +476 -213
  124. package/dist/components/BitzTable/Table/style.mjs +10 -1
  125. package/dist/components/BitzTable/Table/utils.mjs +11 -4
  126. package/dist/components/BitzTable/TextOverflow/index.mjs +12 -3
  127. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +83 -27
  128. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +104 -23
  129. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +68 -29
  130. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +278 -150
  131. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +50 -16
  132. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +42 -16
  133. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +129 -38
  134. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +9 -2
  135. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +97 -43
  136. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +28 -6
  137. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +38 -9
  138. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +42 -14
  139. package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +17 -4
  140. package/dist/components/BitzTable/ToolBar/Modal/index.mjs +37 -8
  141. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +20 -9
  142. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +49 -2
  143. package/dist/components/BitzTable/ToolBar/style.mjs +6 -1
  144. package/dist/components/BitzTableOperations/index.mjs +13 -3
  145. package/dist/components/BitzTableSelect/Picker/index.mjs +43 -10
  146. package/dist/components/BitzTableSelect/Select/index.mjs +90 -21
  147. package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +23 -13
  148. package/dist/components/BitzTableSelect/SelectPopup/index.mjs +219 -69
  149. package/dist/components/BitzTableSelect/SingleSelect/index.mjs +87 -22
  150. package/dist/components/BitzTableSelect/TableCell/index.mjs +52 -11
  151. package/dist/components/BitzTableSelect/TextBlock/index.mjs +30 -12
  152. package/dist/components/BitzTableSelect/index.mjs +65 -14
  153. package/dist/components/BitzTableSelect/utils.mjs +3 -3
  154. package/dist/components/BitzTag/index.mjs +1 -1
  155. package/dist/components/BitzText/index.mjs +41 -14
  156. package/dist/components/BitzText/utils.mjs +3 -3
  157. package/dist/components/BitzTheme/index.mjs +6 -6
  158. package/dist/components/BitzTimeline/index.mjs +11 -1
  159. package/dist/components/BitzTimer/Form.mjs +32 -11
  160. package/dist/components/BitzTimer/Timer.mjs +76 -38
  161. package/dist/components/BitzTimer/index.mjs +66 -43
  162. package/dist/components/BitzToast/Toast/index.mjs +28 -10
  163. package/dist/components/BitzToast/index.mjs +1 -1
  164. package/dist/components/BitzTooltip/index.mjs +47 -17
  165. package/dist/components/BitzTooltip/style.mjs +9 -6
  166. package/dist/components/BitzTooltip/utils.mjs +2 -2
  167. package/dist/components/BitzTree/index.mjs +4 -1
  168. package/dist/components/BitzUeEditor/index.mjs +5 -5
  169. package/dist/components/BitzUpload/index.mjs +81 -43
  170. package/dist/components/BitzWebAppDrawer/index.mjs +35 -4
  171. package/dist/components/BitzWebAppModal/index.mjs +6 -3
  172. package/dist/hooks/use-event-listener.mjs +11 -2
  173. package/dist/hooks/use-lock-fn.mjs +13 -10
  174. package/dist/hooks/use-scroll-parent.mjs +16 -14
  175. package/dist/hooks/useEvent.mjs +7 -4
  176. package/dist/hooks/useMergedState.mjs +11 -11
  177. package/dist/node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useDebounceFn/index.mjs +29 -0
  178. package/dist/node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/utils/lodash-polyfill.mjs +7 -0
  179. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/debounce.mjs +37 -34
  180. package/dist/style.css +1 -1
  181. package/dist/utils/WithFluent.mjs +27 -5
  182. package/dist/utils/create.mjs +7 -1
  183. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
- import { j as ze } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
- import { Table as fe } from "antd";
3
- import N from "../../../hooks/useMergedState.mjs";
4
- import { createContext as Ne, useRef as ve, useState as K, useContext as Ee, useMemo as d, useEffect as y, useCallback as v } from "react";
5
- import { flattenColumns as Ie, genColumnKey as E } from "./utils/index.mjs";
6
- import { getUuid as Je } from "../../../utils/uuid.mjs";
7
- import { BitzConfigContext as Be } from "../../BitzConfigProvider/context.mjs";
1
+ import { j as Ve } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
+ import { Table as ce } from "antd";
3
+ import z from "../../../hooks/useMergedState.mjs";
4
+ import { createContext as ze, useRef as Ne, useState as K, useContext as ve, useMemo as d, useEffect as y, useCallback as N } from "react";
5
+ import { flattenColumns as Ee, genColumnKey as v } from "./utils/index.mjs";
6
+ import { getUuid as Ie } from "../../../utils/uuid.mjs";
7
+ import { BitzConfigContext as Je } from "../../BitzConfigProvider/context.mjs";
8
8
  import u from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
9
- const je = {
9
+ const Be = {
10
10
  fixed: "left",
11
11
  className: "sorterCol",
12
12
  isDragSorterCol: !0,
@@ -16,38 +16,47 @@ const je = {
16
16
  onCell: () => ({
17
17
  "data-column-name": "dragSorterCell"
18
18
  })
19
- }, Me = [
20
- je,
21
- fe.SELECTION_COLUMN,
22
- fe.EXPAND_COLUMN
19
+ }, je = [
20
+ Be,
21
+ ce.SELECTION_COLUMN,
22
+ ce.EXPAND_COLUMN
23
23
  ];
24
- function ke(e) {
25
- var H, R, L, P, U, D, G, _, F, W, Z, A, X, q, Q, Y, $, p, ee, te, ne, ie, ae, oe, le;
26
- const T = ve(Je()), [re, se] = K(!1), [ue, de] = K(!1), [ye, Se] = K(0), r = Ee(Be).Table, Ce = r == null ? void 0 : r.defaultSize, I = e.defaultSize ?? Ce ?? "lg", ge = e.defaultZebra ?? (r == null ? void 0 : r.zebra) ?? !0, me = e.defaultBordered ?? (r == null ? void 0 : r.bordered) ?? "row-column", O = d(() => {
24
+ function Me(e) {
25
+ var k, H, R, L, P, U, D, G, _, F, W, Z, A, X, q, Q, Y, $, p, ee, te, ne, ie, ae, oe;
26
+ const T = Ne(Ie()), [fe, re] = K(!1), [se, ue] = K(!1), [de, ye] = K(0), r = ve(Je).Table, Se = r == null ? void 0 : r.defaultSize, E = e.defaultSize ?? Se ?? "lg", Ce = e.defaultZebra ?? (r == null ? void 0 : r.zebra) ?? !0, ge = e.defaultBordered ?? (r == null ? void 0 : r.bordered) ?? "row-column", O = d(() => {
27
27
  var t;
28
- return u({
29
- size: e.size ?? I,
30
- zebra: e.zebra ?? ge,
31
- bordered: e.bordered ?? me
32
- }, (t = e.stylesConfigState) == null ? void 0 : t.defaultValue);
33
- }, [e.size, e.zebra, e.bordered, e.defaultStylesConfig]), [S, J] = N(() => {
34
- var n, i, l;
35
- const { persistenceType: t, persistenceKey: o, onlineGet: c } = e.stylesConfigState || {};
36
- if (o && t && typeof window < "u" && t !== "online") {
37
- const a = window[t];
38
- try {
39
- const f = a == null ? void 0 : a.getItem(o);
40
- if (f)
41
- return (n = e == null ? void 0 : e.stylesConfigState) != null && n.defaultValue ? u(JSON.parse(f), (i = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : i.defaultValue) : JSON.parse(f);
42
- } catch (f) {
43
- console.warn(f);
28
+ return u(
29
+ {
30
+ size: e.size ?? E,
31
+ zebra: e.zebra ?? Ce,
32
+ bordered: e.bordered ?? ge
33
+ },
34
+ (t = e.stylesConfigState) == null ? void 0 : t.defaultValue
35
+ );
36
+ }, [e.size, e.zebra, e.bordered, e.defaultStylesConfig]), [S, I] = z(
37
+ () => {
38
+ var n, i, l;
39
+ const { persistenceType: t, persistenceKey: o, onlineGet: c } = e.stylesConfigState || {};
40
+ if (o && t && typeof window < "u" && t !== "online") {
41
+ const a = window[t];
42
+ try {
43
+ const f = a == null ? void 0 : a.getItem(o);
44
+ if (f)
45
+ return (n = e == null ? void 0 : e.stylesConfigState) != null && n.defaultValue ? u(
46
+ JSON.parse(f),
47
+ (i = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : i.defaultValue
48
+ ) : JSON.parse(f);
49
+ } catch (f) {
50
+ console.warn(f);
51
+ }
44
52
  }
53
+ return e.stylesConfig || ((l = e.stylesConfigState) == null ? void 0 : l.value) || O;
54
+ },
55
+ {
56
+ value: ((k = e.stylesConfigState) == null ? void 0 : k.value) || e.stylesConfig,
57
+ onChange: ((H = e.stylesConfigState) == null ? void 0 : H.onChange) || e.onStylesConfigChange
45
58
  }
46
- return e.stylesConfig || ((l = e.stylesConfigState) == null ? void 0 : l.value) || O;
47
- }, {
48
- value: ((H = e.stylesConfigState) == null ? void 0 : H.value) || e.stylesConfig,
49
- onChange: ((R = e.stylesConfigState) == null ? void 0 : R.onChange) || e.onStylesConfigChange
50
- });
59
+ );
51
60
  y(() => {
52
61
  var c, n;
53
62
  if (!((c = e.stylesConfigState) != null && c.persistenceKey) || !((n = e.stylesConfigState) != null && n.persistenceType) || typeof window > "u")
@@ -62,13 +71,13 @@ function ke(e) {
62
71
  try {
63
72
  i == null || i.setItem(o, JSON.stringify(S));
64
73
  } catch (l) {
65
- console.warn(l), j();
74
+ console.warn(l), B();
66
75
  }
67
76
  }
68
77
  }, [
69
- (L = e.stylesConfigState) == null ? void 0 : L.persistenceKey,
78
+ (R = e.stylesConfigState) == null ? void 0 : R.persistenceKey,
70
79
  S,
71
- (P = e.stylesConfigState) == null ? void 0 : P.persistenceType
80
+ (L = e.stylesConfigState) == null ? void 0 : L.persistenceType
72
81
  ]), y(() => {
73
82
  var t, o, c;
74
83
  if ((t = e.stylesConfigState) != null && t.persistenceKey && ((o = e.stylesConfigState) == null ? void 0 : o.persistenceType) === "online") {
@@ -77,14 +86,18 @@ function ke(e) {
77
86
  (c = n == null ? void 0 : n(i)) == null || c.then((l) => {
78
87
  var f;
79
88
  const a = u(l ?? {}, (f = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : f.value);
80
- J(Object.keys(a).length ? a : O);
89
+ I(
90
+ Object.keys(a).length ? a : O
91
+ );
81
92
  });
82
93
  } catch (l) {
83
94
  console.warn(l);
84
95
  }
85
96
  }
86
97
  }, []);
87
- const s = d(() => (e.columns ?? []).filter((t) => !Me.includes(t) && t.title), [e.columns]), h = d(() => {
98
+ const s = d(() => (e.columns ?? []).filter(
99
+ (t) => !je.includes(t) && t.title
100
+ ), [e.columns]), h = d(() => {
88
101
  var n;
89
102
  const t = {
90
103
  fields: [],
@@ -97,11 +110,11 @@ function ke(e) {
97
110
  return (l = i == null ? void 0 : i.children) == null ? void 0 : l.length;
98
111
  }), c = s.filter((i) => !i.isOperationCol);
99
112
  if (o)
100
- t.fields = Ie(c);
113
+ t.fields = Ee(c);
101
114
  else {
102
115
  const i = [];
103
116
  c.forEach((l, a) => {
104
- const f = E(l, a);
117
+ const f = v(l, a);
105
118
  f && i.push({
106
119
  field: f,
107
120
  title: l.title,
@@ -110,24 +123,30 @@ function ke(e) {
110
123
  }), t.fields = i;
111
124
  }
112
125
  return (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? u(t, e.exportConfigState.defaultValue) : t;
113
- }, [s]), [V, x] = N(() => {
114
- var n, i, l;
115
- const { persistenceType: t, persistenceKey: o, onlineGet: c } = e.exportConfigState || {};
116
- if (o && t && typeof window < "u" && t !== "online") {
117
- const a = window[t];
118
- try {
119
- const f = a == null ? void 0 : a.getItem(o);
120
- if (f)
121
- return (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? u(JSON.parse(f), (i = e == null ? void 0 : e.exportConfigState) == null ? void 0 : i.defaultValue) : JSON.parse(f);
122
- } catch (f) {
123
- console.warn(f);
126
+ }, [s]), [V, x] = z(
127
+ () => {
128
+ var n, i, l;
129
+ const { persistenceType: t, persistenceKey: o, onlineGet: c } = e.exportConfigState || {};
130
+ if (o && t && typeof window < "u" && t !== "online") {
131
+ const a = window[t];
132
+ try {
133
+ const f = a == null ? void 0 : a.getItem(o);
134
+ if (f)
135
+ return (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? u(
136
+ JSON.parse(f),
137
+ (i = e == null ? void 0 : e.exportConfigState) == null ? void 0 : i.defaultValue
138
+ ) : JSON.parse(f);
139
+ } catch (f) {
140
+ console.warn(f);
141
+ }
124
142
  }
143
+ return e.exportConfig || ((l = e.exportConfigState) == null ? void 0 : l.value) || h;
144
+ },
145
+ {
146
+ value: ((P = e.exportConfigState) == null ? void 0 : P.value) || e.exportConfig,
147
+ onChange: ((U = e.exportConfigState) == null ? void 0 : U.onChange) || e.onExportConfigChange
125
148
  }
126
- return e.exportConfig || ((l = e.exportConfigState) == null ? void 0 : l.value) || h;
127
- }, {
128
- value: ((U = e.exportConfigState) == null ? void 0 : U.value) || e.exportConfig,
129
- onChange: ((D = e.exportConfigState) == null ? void 0 : D.onChange) || e.onExportConfigChange
130
- });
149
+ );
131
150
  y(() => {
132
151
  var n, i;
133
152
  const { persistenceType: t, persistenceKey: o, onlineGet: c } = e.exportConfigState || {};
@@ -135,14 +154,19 @@ function ke(e) {
135
154
  const l = window[t];
136
155
  try {
137
156
  const a = l == null ? void 0 : l.getItem(o);
138
- a ? (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? x(u(JSON.parse(a), (i = e == null ? void 0 : e.exportConfigState) == null ? void 0 : i.defaultValue)) : x(JSON.parse(a)) : x(h);
157
+ a ? (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? x(
158
+ u(
159
+ JSON.parse(a),
160
+ (i = e == null ? void 0 : e.exportConfigState) == null ? void 0 : i.defaultValue
161
+ )
162
+ ) : x(JSON.parse(a)) : x(h);
139
163
  } catch (a) {
140
164
  console.warn(a);
141
165
  }
142
166
  }
143
167
  }, [
144
- (G = e.exportConfigState) == null ? void 0 : G.persistenceKey,
145
- (_ = e.exportConfigState) == null ? void 0 : _.persistenceType,
168
+ (D = e.exportConfigState) == null ? void 0 : D.persistenceKey,
169
+ (G = e.exportConfigState) == null ? void 0 : G.persistenceType,
146
170
  h
147
171
  ]), y(() => {
148
172
  var c, n;
@@ -158,13 +182,13 @@ function ke(e) {
158
182
  try {
159
183
  i == null || i.setItem(o, JSON.stringify(V));
160
184
  } catch (l) {
161
- console.warn(l), M();
185
+ console.warn(l), j();
162
186
  }
163
187
  }
164
188
  }, [
165
- (F = e.exportConfigState) == null ? void 0 : F.persistenceKey,
189
+ (_ = e.exportConfigState) == null ? void 0 : _.persistenceKey,
166
190
  V,
167
- (W = e.exportConfigState) == null ? void 0 : W.persistenceType
191
+ (F = e.exportConfigState) == null ? void 0 : F.persistenceType
168
192
  ]), y(() => {
169
193
  var t, o, c;
170
194
  if ((t = e.exportConfigState) != null && t.persistenceKey && ((o = e.exportConfigState) == null ? void 0 : o.persistenceType) === "online") {
@@ -173,7 +197,9 @@ function ke(e) {
173
197
  (c = n == null ? void 0 : n(i)) == null || c.then((l) => {
174
198
  var f;
175
199
  const a = u(l ?? {}, (f = e == null ? void 0 : e.exportConfigState) == null ? void 0 : f.value);
176
- x(Object.keys(a).length ? a : h);
200
+ x(
201
+ Object.keys(a).length ? a : h
202
+ );
177
203
  });
178
204
  } catch (l) {
179
205
  console.warn(l);
@@ -186,32 +212,38 @@ function ke(e) {
186
212
  return e.columnsState.defaultValue;
187
213
  const t = s.filter((a) => a.fixed === "left").map((a, f) => ({ ...a, order: f })), o = s.filter((a) => a.fixed === "right").map((a, f) => ({ ...a, order: f })), c = s.filter((a) => !["left", "right"].includes(a.fixed)).map((a, f) => ({ ...a, order: f })), n = [...t, ...c, ...o], i = {};
188
214
  return n.forEach((a, f) => {
189
- const { order: m, width: ce, fixed: Oe, disabled: Ve } = a, z = E(a, f);
190
- z && (i[z] = {
215
+ const { order: m, width: He, fixed: Ke, disabled: Oe } = a, le = v(a, f);
216
+ le && (i[le] = {
191
217
  show: !0,
192
218
  order: m,
193
- fixed: Oe,
194
- disabled: Ve
195
- }, typeof ce == "number" && e.resizableColumns && (i[z].width = ce));
219
+ fixed: Ke,
220
+ disabled: Oe
221
+ });
196
222
  }), i;
197
- }, [s]), [we, he] = K(!1), [g, w] = N(() => {
198
- var n, i, l, a;
199
- const { persistenceType: t, persistenceKey: o, onlineGet: c } = e.columnsState || {};
200
- if (o && t && typeof window < "u" && t !== "online") {
201
- const f = window[t];
202
- try {
203
- const m = f == null ? void 0 : f.getItem(o);
204
- if (m)
205
- return (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? u(JSON.parse(m), (i = e == null ? void 0 : e.columnsState) == null ? void 0 : i.defaultValue) : JSON.parse(m);
206
- } catch (m) {
207
- console.warn(m);
223
+ }, [s]), [me, we] = K(!1), [g, w] = z(
224
+ () => {
225
+ var n, i, l, a;
226
+ const { persistenceType: t, persistenceKey: o, onlineGet: c } = e.columnsState || {};
227
+ if (o && t && typeof window < "u" && t !== "online") {
228
+ const f = window[t];
229
+ try {
230
+ const m = f == null ? void 0 : f.getItem(o);
231
+ if (m)
232
+ return (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? u(
233
+ JSON.parse(m),
234
+ (i = e == null ? void 0 : e.columnsState) == null ? void 0 : i.defaultValue
235
+ ) : JSON.parse(m);
236
+ } catch (m) {
237
+ console.warn(m);
238
+ }
208
239
  }
240
+ return e.columnsStateMap || ((l = e.columnsState) == null ? void 0 : l.value) || ((a = e.columnsState) == null ? void 0 : a.defaultValue) || {};
241
+ },
242
+ {
243
+ value: ((W = e.columnsState) == null ? void 0 : W.value) || e.columnsStateMap,
244
+ onChange: ((Z = e.columnsState) == null ? void 0 : Z.onChange) || e.onColumnsStateChange
209
245
  }
210
- return e.columnsStateMap || ((l = e.columnsState) == null ? void 0 : l.value) || ((a = e.columnsState) == null ? void 0 : a.defaultValue) || {};
211
- }, {
212
- value: ((Z = e.columnsState) == null ? void 0 : Z.value) || e.columnsStateMap,
213
- onChange: ((A = e.columnsState) == null ? void 0 : A.onChange) || e.onColumnsStateChange
214
- });
246
+ );
215
247
  y(() => {
216
248
  var n, i;
217
249
  const { persistenceType: t, persistenceKey: o, onlineGet: c } = e.columnsState || {};
@@ -219,17 +251,22 @@ function ke(e) {
219
251
  const l = window[t];
220
252
  try {
221
253
  const a = l == null ? void 0 : l.getItem(o);
222
- a ? (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? w(u(JSON.parse(a), (i = e == null ? void 0 : e.columnsState) == null ? void 0 : i.defaultValue)) : w(JSON.parse(a)) : w(C);
254
+ a ? (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? w(
255
+ u(
256
+ JSON.parse(a),
257
+ (i = e == null ? void 0 : e.columnsState) == null ? void 0 : i.defaultValue
258
+ )
259
+ ) : w(JSON.parse(a)) : w(C);
223
260
  } catch (a) {
224
261
  console.warn(a);
225
262
  }
226
263
  }
227
264
  }, [
228
- (X = e.columnsState) == null ? void 0 : X.persistenceKey,
229
- (q = e.columnsState) == null ? void 0 : q.persistenceType,
265
+ (A = e.columnsState) == null ? void 0 : A.persistenceKey,
266
+ (X = e.columnsState) == null ? void 0 : X.persistenceType,
230
267
  C
231
268
  ]);
232
- const B = v(() => {
269
+ const J = N(() => {
233
270
  const { persistenceType: t, persistenceKey: o } = e.columnsState || {};
234
271
  if (!o || !t || typeof window > "u")
235
272
  return;
@@ -239,7 +276,7 @@ function ke(e) {
239
276
  } catch (n) {
240
277
  console.warn(n);
241
278
  }
242
- }, [e.columnsState]), j = v(() => {
279
+ }, [e.columnsState]), B = N(() => {
243
280
  const { persistenceType: t, persistenceKey: o } = e.stylesConfigState || {};
244
281
  if (!o || !t || typeof window > "u")
245
282
  return;
@@ -249,7 +286,7 @@ function ke(e) {
249
286
  } catch (n) {
250
287
  console.warn(n);
251
288
  }
252
- }, [e.stylesConfigState]), M = v(() => {
289
+ }, [e.stylesConfigState]), j = N(() => {
253
290
  const { persistenceType: t, persistenceKey: o } = e.exportConfigState || {};
254
291
  if (!o || !t || typeof window > "u")
255
292
  return;
@@ -274,13 +311,13 @@ function ke(e) {
274
311
  try {
275
312
  i == null || i.setItem(o, JSON.stringify(g));
276
313
  } catch (l) {
277
- console.warn(l), B();
314
+ console.warn(l), J();
278
315
  }
279
316
  }
280
317
  }, [
281
- (Q = e.columnsState) == null ? void 0 : Q.persistenceKey,
318
+ (q = e.columnsState) == null ? void 0 : q.persistenceKey,
282
319
  g,
283
- (Y = e.columnsState) == null ? void 0 : Y.persistenceType
320
+ (Q = e.columnsState) == null ? void 0 : Q.persistenceType
284
321
  ]), y(() => {
285
322
  var t, o, c;
286
323
  if ((t = e.columnsState) != null && t.persistenceKey && ((o = e.columnsState) == null ? void 0 : o.persistenceType) === "online") {
@@ -289,7 +326,7 @@ function ke(e) {
289
326
  (c = n == null ? void 0 : n(i)) == null || c.then((l) => {
290
327
  var f;
291
328
  const a = u(l ?? {}, (f = e == null ? void 0 : e.columnsState) == null ? void 0 : f.value);
292
- w(a), he(!0);
329
+ w(a), we(!0);
293
330
  });
294
331
  } catch (l) {
295
332
  console.warn(l);
@@ -299,67 +336,67 @@ function ke(e) {
299
336
  var o, c;
300
337
  const t = s.findIndex((n) => n == null ? void 0 : n.isOperationCol);
301
338
  if (t >= 0) {
302
- const n = s[t], i = E(n, t);
339
+ const n = s[t], i = v(n, t);
303
340
  !(((o = g == null ? void 0 : g[i]) == null ? void 0 : o.fixed) === ((c = C == null ? void 0 : C[i]) == null ? void 0 : c.fixed)) && Object.keys(g ?? {}).length === 0 && w(C);
304
341
  }
305
342
  }, [C, g]);
306
- const xe = d(() => (e == null ? void 0 : e.rowHoverable) ?? (r == null ? void 0 : r.rowHoverable) ?? !0, [e == null ? void 0 : e.rowHoverable, r == null ? void 0 : r.rowHoverable]), Te = d(() => e.zebra ?? S.zebra, [e.zebra, S.zebra]), b = d(() => e.bordered ?? S.bordered, [e.bordered, S.bordered]), be = d(() => ["column", "row-column"].includes(b), [b]), Ke = d(() => {
343
+ const he = d(() => (e == null ? void 0 : e.rowHoverable) ?? (r == null ? void 0 : r.rowHoverable) ?? !0, [e == null ? void 0 : e.rowHoverable, r == null ? void 0 : r.rowHoverable]), xe = d(() => e.zebra ?? S.zebra, [e.zebra, S.zebra]), b = d(() => e.bordered ?? S.bordered, [e.bordered, S.bordered]), Te = d(() => ["column", "row-column"].includes(b), [b]), be = d(() => {
307
344
  let t = !1;
308
345
  return ["hide", "column"].includes(b) && (t = !0), t;
309
- }, [b]), k = {
346
+ }, [b]), M = {
310
347
  loading: e.loading ?? !1,
311
348
  dataSource: e.dataSource,
312
349
  pagination: e.pagination,
313
350
  total: e.total,
314
351
  uuid: T.current,
315
- fullscreen: re,
316
- setFullscreen: se,
317
- selected: ue,
318
- setSelected: de,
319
- toolbarWidth: ye,
320
- setToolbarWidth: Se,
352
+ fullscreen: fe,
353
+ setFullscreen: re,
354
+ selected: se,
355
+ setSelected: ue,
356
+ toolbarWidth: de,
357
+ setToolbarWidth: ye,
321
358
  columns: e.columns,
322
359
  baseColumns: s,
323
- persistenceType: ($ = e.columnsState) == null ? void 0 : $.persistenceType,
324
- persistenceKey: (p = e.columnsState) == null ? void 0 : p.persistenceKey,
325
- onlineChange: (ee = e.columnsState) == null ? void 0 : ee.onlineChange,
326
- finish: we,
360
+ persistenceType: (Y = e.columnsState) == null ? void 0 : Y.persistenceType,
361
+ persistenceKey: ($ = e.columnsState) == null ? void 0 : $.persistenceKey,
362
+ onlineChange: (p = e.columnsState) == null ? void 0 : p.onlineChange,
363
+ finish: me,
327
364
  columnsMap: g,
328
365
  setColumnsMap: w,
329
366
  defaultColumnKeyMap: C,
330
- clearPersistenceStorage: B,
367
+ clearPersistenceStorage: J,
331
368
  stylesConfig: S,
332
- setTableStylesConfig: J,
333
- defaultTableSize: I,
369
+ setTableStylesConfig: I,
370
+ defaultTableSize: E,
334
371
  tableSize: S.size,
335
- stylesStorageType: (te = e.stylesConfigState) == null ? void 0 : te.persistenceType,
336
- stylesStorageKey: (ne = e.stylesConfigState) == null ? void 0 : ne.persistenceKey,
337
- onlineStylesConfigChange: (ie = e.stylesConfigState) == null ? void 0 : ie.onlineChange,
338
- clearStylesConfigCache: j,
372
+ stylesStorageType: (ee = e.stylesConfigState) == null ? void 0 : ee.persistenceType,
373
+ stylesStorageKey: (te = e.stylesConfigState) == null ? void 0 : te.persistenceKey,
374
+ onlineStylesConfigChange: (ne = e.stylesConfigState) == null ? void 0 : ne.onlineChange,
375
+ clearStylesConfigCache: B,
339
376
  defaultTableStylesConfig: O,
340
377
  exportConfig: V,
341
378
  setTableExportConfig: x,
342
379
  defaultTableExportConfig: h,
343
- exportStorageType: (ae = e.exportConfigState) == null ? void 0 : ae.persistenceType,
344
- exportStorageKey: (oe = e.exportConfigState) == null ? void 0 : oe.persistenceKey,
345
- onlineExportConfigChange: (le = e.exportConfigState) == null ? void 0 : le.onlineChange,
346
- clearExportConfigCache: M,
347
- zebra: Te,
348
- rowHoverable: xe,
349
- showColumnBorder: be,
350
- hideRowBorder: Ke
380
+ exportStorageType: (ie = e.exportConfigState) == null ? void 0 : ie.persistenceType,
381
+ exportStorageKey: (ae = e.exportConfigState) == null ? void 0 : ae.persistenceKey,
382
+ onlineExportConfigChange: (oe = e.exportConfigState) == null ? void 0 : oe.onlineChange,
383
+ clearExportConfigCache: j,
384
+ zebra: xe,
385
+ rowHoverable: he,
386
+ showColumnBorder: Te,
387
+ hideRowBorder: be
351
388
  };
352
- return Object.defineProperty(k, "uuid", {
389
+ return Object.defineProperty(M, "uuid", {
353
390
  get: () => T.current
354
- }), k;
391
+ }), M;
355
392
  }
356
- const He = Ne({}), We = (e) => {
357
- const T = ke(e.initValue);
358
- return ze.jsx(He.Provider, { value: T, children: e.children });
393
+ const ke = ze({}), We = (e) => {
394
+ const T = Me(e.initValue);
395
+ return /* @__PURE__ */ Ve.jsx(ke.Provider, { value: T, children: e.children });
359
396
  };
360
397
  export {
361
- He as BitzTableContext,
362
- je as SORTER_COLUMN,
398
+ ke as BitzTableContext,
399
+ Be as SORTER_COLUMN,
363
400
  We as default,
364
- Me as toolCols
401
+ je as toolCols
365
402
  };
@@ -11,3 +11,4 @@ export declare const genColumnKey: (column: any, defaultKey?: any) => any;
11
11
  export declare const flattenColumns: (columns: any) => any[];
12
12
  export declare const columnSort: (columnsMap: Record<string, ColumnsConfigProps>) => (a: any, b: any) => number;
13
13
  export declare function updateNestedObject(obj: any, prop: any, val: any): {};
14
+ export declare const removePropertiesWithoutMutation: (obj: any, without: any) => {};
@@ -1,52 +1,62 @@
1
- const c = (e, n, i) => ((s, f) => s.map((t) => {
2
- const a = h(t, t.index), o = f[a];
3
- return o && o.show === !1 ? !1 : {
4
- ...t,
5
- ...o,
6
- ...(t == null ? void 0 : t.isOperationCol) && !i && {
7
- width: t == null ? void 0 : t.width
8
- }
1
+ const h = (e, r, i) => ((n, o) => n.map((d) => {
2
+ const a = u(d, d.index), s = o[a];
3
+ return s && s.show === !1 ? !1 : {
4
+ ...d,
5
+ ...s
6
+ // ...item?.isOperationCol && {
7
+ // width: finish ? config?.width ?? item?.width : item?.width
8
+ // },
9
9
  };
10
- }))(e, n).filter(Boolean), h = (e, n) => "key" in e && e.key !== void 0 && e.key !== null ? e.key : e.dataIndex ? Array.isArray(e.dataIndex) ? e.dataIndex.join("-") : e.dataIndex : `${n}`, u = (e) => {
11
- const n = [];
12
- function i(r) {
13
- r.children ? r.children.forEach(i) : r.dataIndex && !r.exportHidden && n.push({
14
- field: r.dataIndex,
15
- title: r.title,
10
+ }))(e, r).filter(Boolean), u = (e, r) => "key" in e && e.key !== void 0 && e.key !== null ? e.key : e.dataIndex ? Array.isArray(e.dataIndex) ? e.dataIndex.join("-") : e.dataIndex : `${r}`, k = (e) => {
11
+ const r = [];
12
+ function i(t) {
13
+ t.children ? t.children.forEach(i) : t.dataIndex && !t.exportHidden && r.push({
14
+ field: t.dataIndex,
15
+ title: t.title,
16
16
  show: !0
17
17
  });
18
18
  }
19
- return e.forEach(i), n;
20
- }, k = (e) => (n, i) => {
21
- var d, x, l, y;
22
- const { fixed: r, index: s } = n, { fixed: f, index: t } = i;
23
- if (r === "left" && f !== "left" || f === "right" && r !== "right")
19
+ return e.forEach(i), r;
20
+ }, p = (e) => (r, i) => {
21
+ var f, l, x, y;
22
+ const { fixed: t, index: n } = r, { fixed: o, index: d } = i;
23
+ if (t === "left" && o !== "left" || o === "right" && t !== "right")
24
24
  return -2;
25
- if (f === "left" && r !== "left" || r === "right" && f !== "right")
25
+ if (o === "left" && t !== "left" || t === "right" && o !== "right")
26
26
  return 2;
27
- const a = n.key || `${s}`, o = i.key || `${t}`;
28
- return (d = e[a]) != null && d.order || (x = e[o]) != null && x.order ? (((l = e[a]) == null ? void 0 : l.order) || 0) - (((y = e[o]) == null ? void 0 : y.order) || 0) : (n.index || 0) - (i.index || 0);
27
+ const a = r.key || `${n}`, s = i.key || `${d}`;
28
+ return (f = e[a]) != null && f.order || (l = e[s]) != null && l.order ? (((x = e[a]) == null ? void 0 : x.order) || 0) - (((y = e[s]) == null ? void 0 : y.order) || 0) : (r.index || 0) - (i.index || 0);
29
29
  };
30
- function I(e, n, i) {
31
- const r = {};
32
- let s = "";
33
- const f = (t, a, o) => {
34
- for (const d in t)
35
- if (t.hasOwnProperty(d) && (typeof t[d] == "object" && t[d] !== null && (s = d, r[d] = { ...t[d] }, f(t[d], a, o)), d === a)) {
36
- const x = r[s];
37
- r[s] = {
38
- ...x,
39
- [a]: o
30
+ function I(e, r, i) {
31
+ const t = {};
32
+ let n = "";
33
+ const o = (d, a, s) => {
34
+ for (const f in d)
35
+ if (d.hasOwnProperty(f) && (typeof d[f] == "object" && d[f] !== null && (n = f, t[f] = { ...d[f] }, o(d[f], a, s)), f === a)) {
36
+ const l = t[n];
37
+ t[n] = {
38
+ ...l,
39
+ [a]: s
40
40
  // [prop]: current.disabled || current.fixed ? true : val,
41
- }, s = "";
41
+ }, n = "";
42
42
  }
43
43
  };
44
- return f(e, n, i), r;
44
+ return o(e, r, i), t;
45
45
  }
46
+ const c = (e, r) => {
47
+ let i = {};
48
+ for (let t in e)
49
+ if (e.hasOwnProperty(t)) {
50
+ let n = e[t];
51
+ typeof n == "object" && n !== null && (n = c(n, r)), r.includes(t) || (i[t] = n);
52
+ }
53
+ return i;
54
+ };
46
55
  export {
47
- k as columnSort,
48
- u as flattenColumns,
49
- h as genColumnKey,
50
- c as loopFilter,
56
+ p as columnSort,
57
+ k as flattenColumns,
58
+ u as genColumnKey,
59
+ h as loopFilter,
60
+ c as removePropertiesWithoutMutation,
51
61
  I as updateNestedObject
52
62
  };