bitz-react-admin-ui 2.8.0 → 2.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/iconfont/IconChenggong.mjs +25 -4
- package/dist/assets/iconfont/IconClose.mjs +24 -3
- package/dist/assets/iconfont/IconColumnCancelFixed.mjs +23 -2
- package/dist/assets/iconfont/IconColumnFixedLeft.mjs +27 -6
- package/dist/assets/iconfont/IconColumnFixedRight.mjs +27 -6
- package/dist/assets/iconfont/IconCuowu.mjs +23 -2
- package/dist/assets/iconfont/IconDragOrder.mjs +25 -4
- package/dist/assets/iconfont/IconDuigoux.mjs +25 -4
- package/dist/assets/iconfont/IconFabu.mjs +35 -5
- package/dist/assets/iconfont/IconFanhui.mjs +25 -4
- package/dist/assets/iconfont/IconGaojisousuo.mjs +26 -5
- package/dist/assets/iconfont/IconHangfengexian.mjs +41 -3
- package/dist/assets/iconfont/IconHangliefengexian.mjs +42 -4
- package/dist/assets/iconfont/IconIcFluentHomeRegular.mjs +26 -5
- package/dist/assets/iconfont/IconIcon21.mjs +25 -4
- package/dist/assets/iconfont/IconJincoude.mjs +25 -4
- package/dist/assets/iconfont/IconJinggao.mjs +25 -4
- package/dist/assets/iconfont/IconKuansongde.mjs +26 -5
- package/dist/assets/iconfont/IconLiefengexian.mjs +41 -3
- package/dist/assets/iconfont/IconMore.mjs +41 -4
- package/dist/assets/iconfont/IconShanchu.mjs +27 -6
- package/dist/assets/iconfont/IconShanchu1.mjs +35 -5
- package/dist/assets/iconfont/IconSousuo.mjs +27 -6
- package/dist/assets/iconfont/IconTejincou.mjs +25 -4
- package/dist/assets/iconfont/IconTekuansong.mjs +26 -5
- package/dist/assets/iconfont/IconTishi1.mjs +27 -6
- package/dist/assets/iconfont/IconTuodong.mjs +28 -7
- package/dist/assets/iconfont/IconWubanmawentianchong.mjs +35 -3
- package/dist/assets/iconfont/IconWufengexian.mjs +26 -4
- package/dist/assets/iconfont/IconXinxitishi.mjs +27 -6
- package/dist/assets/iconfont/IconYoubanmawentianchong.mjs +34 -3
- package/dist/assets/iconfont/IconZhongdengde.mjs +24 -3
- package/dist/assets/iconfont/IconZhongzhi.mjs +24 -3
- package/dist/assets/iconfont/index.mjs +33 -33
- package/dist/components/BitzAddTag/index.mjs +41 -8
- package/dist/components/BitzAddressBook/index.mjs +122 -35
- package/dist/components/BitzAppPage/index.mjs +18 -4
- package/dist/components/BitzAppRefresh/index.mjs +27 -15
- package/dist/components/BitzBetterScroll/index.mjs +5 -5
- package/dist/components/BitzButton/index.mjs +23 -9
- package/dist/components/BitzCalendar/index.mjs +52 -19
- package/dist/components/BitzCascader/BitzCascaderMobile.mjs +68 -30
- package/dist/components/BitzCascader/index.mjs +6 -2
- package/dist/components/BitzCollapse/index.mjs +4 -4
- package/dist/components/BitzConfigProvider/context.mjs +3 -1
- package/dist/components/BitzConfigProvider/index.mjs +12 -8
- package/dist/components/BitzConfirmModal/index.mjs +24 -1
- package/dist/components/BitzDescriptions/index.mjs +11 -1
- package/dist/components/BitzDrawer/index.mjs +17 -2
- package/dist/components/BitzEmpty/index.mjs +6 -2
- package/dist/components/BitzException/index.mjs +6 -1
- package/dist/components/BitzFloatLayout/index.mjs +10 -1
- package/dist/components/BitzFluentDatePicker/index.mjs +1 -1
- package/dist/components/BitzFluentRangePicker/index.mjs +1 -1
- package/dist/components/BitzFluentRangeTimePicker/index.mjs +1 -1
- package/dist/components/BitzFluentTimePicker/index.mjs +6 -6
- package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +13 -16
- package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +26 -20
- package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +21 -3
- package/dist/components/BitzFuiCalendar/CalendarBody.mjs +27 -4
- package/dist/components/BitzFuiCalendar/CalendarHead.mjs +5 -2
- package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +12 -3
- package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +47 -15
- package/dist/components/BitzFuiCalendar/ColumnData.mjs +25 -9
- package/dist/components/BitzFuiCalendar/FuiCalendarItem.mjs +44 -8
- package/dist/components/BitzFuiCalendar/index.mjs +7 -1
- package/dist/components/BitzFullScreen/index.mjs +9 -6
- package/dist/components/BitzHighlight/Child.mjs +23 -9
- package/dist/components/BitzHighlight/Highlight.mjs +26 -5
- package/dist/components/BitzHighlight/chunks.mjs +20 -17
- package/dist/components/BitzHighlight/style.mjs +4 -1
- package/dist/components/BitzImage/index.mjs +1 -1
- package/dist/components/BitzImage/previewImage.mjs +12 -5
- package/dist/components/BitzLanguageTabs/index.mjs +14 -3
- package/dist/components/BitzLazyLoad/index.mjs +7 -1
- package/dist/components/BitzList/List.mjs +17 -3
- package/dist/components/BitzList/LoadMore.mjs +29 -20
- package/dist/components/BitzLoadMore/index.mjs +34 -14
- package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +24 -11
- package/dist/components/BitzMeetingTime/index.mjs +10 -6
- package/dist/components/BitzMobileLoading/index.mjs +1 -1
- package/dist/components/BitzModal/index.mjs +24 -11
- package/dist/components/BitzNoData/index.mjs +4 -1
- package/dist/components/BitzNoMore/index.mjs +1 -1
- package/dist/components/BitzOrganizationSelection/index.mjs +43 -14
- package/dist/components/BitzPageContainer/index.mjs +107 -46
- package/dist/components/BitzPageHeader/index.mjs +89 -21
- package/dist/components/BitzPagination/index.mjs +71 -22
- package/dist/components/BitzPopover/index.mjs +4 -4
- package/dist/components/BitzPullRefresh/PullRefresh.mjs +47 -18
- package/dist/components/BitzQRCode/index.mjs +6 -1
- package/dist/components/BitzQueryFilter/QueryFilterContent.mjs +35 -17
- package/dist/components/BitzQueryFilter/QueryFilterDrawer.mjs +20 -13
- package/dist/components/BitzQueryFilter/QueryFilterMobile.mjs +4 -1
- package/dist/components/BitzQueryFilter/index.mjs +69 -20
- package/dist/components/BitzRefresh/index.mjs +5 -1
- package/dist/components/BitzRemark/index.mjs +4 -4
- package/dist/components/BitzScheduleCenter/index.mjs +24 -30
- package/dist/components/BitzSearch/index.mjs +1 -1
- package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +123 -48
- package/dist/components/BitzSelect/index.mjs +1 -1
- package/dist/components/BitzSkeleton/index.mjs +31 -1
- package/dist/components/BitzSwitch/index.mjs +7 -2
- package/dist/components/BitzTabbar/BitzTabbar.mjs +25 -8
- package/dist/components/BitzTabbar/BitzTabbarItem.mjs +4 -1
- package/dist/components/BitzTable/ActionBar/ActionBar.mjs +80 -12
- package/dist/components/BitzTable/ActionBar/Button.mjs +20 -15
- package/dist/components/BitzTable/ActionBar/style.mjs +12 -9
- package/dist/components/BitzTable/ActionCol/index.mjs +182 -44
- package/dist/components/BitzTable/ActionCol/style.mjs +15 -12
- package/dist/components/BitzTable/Dropdown/index.mjs +8 -1
- package/dist/components/BitzTable/Dropdown/style.mjs +9 -6
- package/dist/components/BitzTable/SelectionBar/Button.mjs +19 -6
- package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +11 -4
- package/dist/components/BitzTable/SelectionBar/style.mjs +18 -8
- package/dist/components/BitzTable/Store/index.mjs +103 -62
- package/dist/components/BitzTable/Store/utils/index.mjs +5 -5
- package/dist/components/BitzTable/SubTable/index.mjs +122 -73
- package/dist/components/BitzTable/Table/ResizableTitle copy.mjs +43 -21
- package/dist/components/BitzTable/Table/SortTableContext.mjs +39 -17
- package/dist/components/BitzTable/Table/SortableRow.mjs +44 -20
- package/dist/components/BitzTable/Table/TdCell.mjs +16 -5
- package/dist/components/BitzTable/Table/index.mjs +494 -246
- package/dist/components/BitzTable/Table/style.mjs +10 -1
- package/dist/components/BitzTable/Table/utils.mjs +11 -4
- package/dist/components/BitzTable/TextOverflow/index.mjs +12 -3
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +105 -31
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +104 -23
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +68 -29
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +346 -159
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +50 -16
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +42 -16
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +135 -38
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +9 -2
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/ScopeSwitch.mjs +18 -5
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +121 -49
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +62 -18
- package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +59 -16
- package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +42 -14
- package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +20 -5
- package/dist/components/BitzTable/ToolBar/Modal/index.mjs +46 -14
- package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +20 -9
- package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +49 -2
- package/dist/components/BitzTable/ToolBar/style.mjs +6 -1
- package/dist/components/BitzTableOperations/index.mjs +13 -3
- package/dist/components/BitzTableSelect/Picker/index.mjs +43 -10
- package/dist/components/BitzTableSelect/Select/index.mjs +90 -21
- package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +23 -13
- package/dist/components/BitzTableSelect/SelectPopup/index.mjs +219 -69
- package/dist/components/BitzTableSelect/SingleSelect/index.mjs +87 -22
- package/dist/components/BitzTableSelect/TableCell/index.mjs +52 -11
- package/dist/components/BitzTableSelect/TextBlock/index.mjs +30 -12
- package/dist/components/BitzTableSelect/index.mjs +65 -14
- package/dist/components/BitzTableSelect/utils.mjs +3 -3
- package/dist/components/BitzTag/index.mjs +1 -1
- package/dist/components/BitzText/index.mjs +41 -14
- package/dist/components/BitzText/utils.mjs +3 -3
- package/dist/components/BitzTheme/index.mjs +6 -6
- package/dist/components/BitzTimeline/index.mjs +11 -1
- package/dist/components/BitzTimer/Form.mjs +32 -11
- package/dist/components/BitzTimer/Timer.mjs +76 -38
- package/dist/components/BitzTimer/index.mjs +66 -43
- package/dist/components/BitzToast/Toast/index.mjs +28 -10
- package/dist/components/BitzToast/index.mjs +1 -1
- package/dist/components/BitzTooltip/index.mjs +59 -20
- package/dist/components/BitzTooltip/style.mjs +9 -6
- package/dist/components/BitzTooltip/utils.mjs +2 -2
- package/dist/components/BitzTree/index.mjs +4 -1
- package/dist/components/BitzUeEditor/index.mjs +5 -5
- package/dist/components/BitzUpload/index.mjs +81 -43
- package/dist/components/BitzWebAppDrawer/index.mjs +35 -4
- package/dist/components/BitzWebAppModal/index.mjs +6 -3
- package/dist/hooks/use-event-listener.mjs +11 -2
- package/dist/hooks/use-lock-fn.mjs +13 -10
- package/dist/hooks/use-scroll-parent.mjs +16 -14
- package/dist/hooks/useEvent.mjs +7 -4
- package/dist/hooks/useMergedState.mjs +11 -11
- package/dist/style.css +1 -1
- package/dist/utils/WithFluent.mjs +9 -3
- package/dist/utils/create.mjs +7 -1
- package/package.json +1 -1
|
@@ -25,13 +25,16 @@ function _e(e) {
|
|
|
25
25
|
var k, R, L, U, A, D, G, Z, _, F, W, X, q, Q, Y, $, p, ee, te, ne, ie, ae, oe, le, ce, fe, re;
|
|
26
26
|
const K = Re(Ae()), [ye, Se] = h(!1), [ge, Ce] = h(!1), [me, we] = h(0), f = Le(De).Table, I = e.defaultSize ?? (f == null ? void 0 : f.defaultSize) ?? "lg", he = e.defaultZebra ?? (f == null ? void 0 : f.zebra) ?? !0, xe = e.defaultBordered ?? (f == null ? void 0 : f.bordered) ?? "row-column", Te = e.defaultPageSize ?? (f == null ? void 0 : f.pageSize) ?? 10, Ke = e.defaultOrderBy ?? (f == null ? void 0 : f.orderBy) ?? "desc", z = S(() => {
|
|
27
27
|
var t;
|
|
28
|
-
return u(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
return u(
|
|
29
|
+
{
|
|
30
|
+
size: I,
|
|
31
|
+
zebra: he,
|
|
32
|
+
bordered: xe,
|
|
33
|
+
pageSize: Te,
|
|
34
|
+
orderBy: Ke
|
|
35
|
+
},
|
|
36
|
+
(t = e.stylesConfigState) == null ? void 0 : t.defaultValue
|
|
37
|
+
);
|
|
35
38
|
}, [
|
|
36
39
|
e.defaultSize,
|
|
37
40
|
f == null ? void 0 : f.defaultSize,
|
|
@@ -44,24 +47,30 @@ function _e(e) {
|
|
|
44
47
|
e.defaultOrderBy,
|
|
45
48
|
f == null ? void 0 : f.orderBy,
|
|
46
49
|
(k = e.stylesConfigState) == null ? void 0 : k.defaultValue
|
|
47
|
-
]), [C, J] = N(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
]), [C, J] = N(
|
|
51
|
+
() => {
|
|
52
|
+
var i, n, l;
|
|
53
|
+
const { persistenceType: t, persistenceKey: a, onlineGet: c } = e.stylesConfigState || {};
|
|
54
|
+
if (a && t && typeof window < "u" && t !== "online") {
|
|
55
|
+
const o = window[t];
|
|
56
|
+
try {
|
|
57
|
+
const r = o == null ? void 0 : o.getItem(a);
|
|
58
|
+
if (r)
|
|
59
|
+
return (i = e == null ? void 0 : e.stylesConfigState) != null && i.defaultValue ? u(
|
|
60
|
+
JSON.parse(r),
|
|
61
|
+
(n = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : n.defaultValue
|
|
62
|
+
) : JSON.parse(r);
|
|
63
|
+
} catch (r) {
|
|
64
|
+
console.warn(r);
|
|
65
|
+
}
|
|
58
66
|
}
|
|
67
|
+
return e.stylesConfig || ((l = e.stylesConfigState) == null ? void 0 : l.value) || z;
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
value: ((R = e.stylesConfigState) == null ? void 0 : R.value) || e.stylesConfig,
|
|
71
|
+
onChange: ((L = e.stylesConfigState) == null ? void 0 : L.onChange) || e.onStylesConfigChange
|
|
59
72
|
}
|
|
60
|
-
|
|
61
|
-
}, {
|
|
62
|
-
value: ((R = e.stylesConfigState) == null ? void 0 : R.value) || e.stylesConfig,
|
|
63
|
-
onChange: ((L = e.stylesConfigState) == null ? void 0 : L.onChange) || e.onStylesConfigChange
|
|
64
|
-
});
|
|
73
|
+
);
|
|
65
74
|
g(() => {
|
|
66
75
|
var c, i;
|
|
67
76
|
if (!((c = e.stylesConfigState) != null && c.persistenceKey) || !((i = e.stylesConfigState) != null && i.persistenceType) || typeof window > "u")
|
|
@@ -91,14 +100,18 @@ function _e(e) {
|
|
|
91
100
|
(c = i == null ? void 0 : i(n)) == null || c.then((l) => {
|
|
92
101
|
var r;
|
|
93
102
|
const o = u(l ?? {}, (r = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : r.value);
|
|
94
|
-
J(
|
|
103
|
+
J(
|
|
104
|
+
Object.keys(o).length ? o : z
|
|
105
|
+
);
|
|
95
106
|
});
|
|
96
107
|
} catch (l) {
|
|
97
108
|
console.warn(l);
|
|
98
109
|
}
|
|
99
110
|
}
|
|
100
111
|
}, []);
|
|
101
|
-
const s = S(() => (e.columns ?? []).filter(
|
|
112
|
+
const s = S(() => (e.columns ?? []).filter(
|
|
113
|
+
(t) => !Ze.includes(t) && t.title
|
|
114
|
+
), [e.columns]), x = S(() => {
|
|
102
115
|
var i;
|
|
103
116
|
const t = {
|
|
104
117
|
fields: [],
|
|
@@ -124,24 +137,30 @@ function _e(e) {
|
|
|
124
137
|
}), t.fields = n;
|
|
125
138
|
}
|
|
126
139
|
return (i = e == null ? void 0 : e.exportConfigState) != null && i.defaultValue ? u(t, e.exportConfigState.defaultValue) : t;
|
|
127
|
-
}, [s]), [b, T] = N(
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
140
|
+
}, [s]), [b, T] = N(
|
|
141
|
+
() => {
|
|
142
|
+
var i, n, l;
|
|
143
|
+
const { persistenceType: t, persistenceKey: a, onlineGet: c } = e.exportConfigState || {};
|
|
144
|
+
if (a && t && typeof window < "u" && t !== "online") {
|
|
145
|
+
const o = window[t];
|
|
146
|
+
try {
|
|
147
|
+
const r = o == null ? void 0 : o.getItem(a);
|
|
148
|
+
if (r)
|
|
149
|
+
return (i = e == null ? void 0 : e.exportConfigState) != null && i.defaultValue ? u(
|
|
150
|
+
JSON.parse(r),
|
|
151
|
+
(n = e == null ? void 0 : e.exportConfigState) == null ? void 0 : n.defaultValue
|
|
152
|
+
) : JSON.parse(r);
|
|
153
|
+
} catch (r) {
|
|
154
|
+
console.warn(r);
|
|
155
|
+
}
|
|
138
156
|
}
|
|
157
|
+
return e.exportConfig || ((l = e.exportConfigState) == null ? void 0 : l.value) || x;
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
value: ((D = e.exportConfigState) == null ? void 0 : D.value) || e.exportConfig,
|
|
161
|
+
onChange: ((G = e.exportConfigState) == null ? void 0 : G.onChange) || e.onExportConfigChange
|
|
139
162
|
}
|
|
140
|
-
|
|
141
|
-
}, {
|
|
142
|
-
value: ((D = e.exportConfigState) == null ? void 0 : D.value) || e.exportConfig,
|
|
143
|
-
onChange: ((G = e.exportConfigState) == null ? void 0 : G.onChange) || e.onExportConfigChange
|
|
144
|
-
});
|
|
163
|
+
);
|
|
145
164
|
g(() => {
|
|
146
165
|
var i, n;
|
|
147
166
|
const { persistenceType: t, persistenceKey: a, onlineGet: c } = e.exportConfigState || {};
|
|
@@ -149,7 +168,12 @@ function _e(e) {
|
|
|
149
168
|
const l = window[t];
|
|
150
169
|
try {
|
|
151
170
|
const o = l == null ? void 0 : l.getItem(a);
|
|
152
|
-
o ? (i = e == null ? void 0 : e.exportConfigState) != null && i.defaultValue ? T(
|
|
171
|
+
o ? (i = e == null ? void 0 : e.exportConfigState) != null && i.defaultValue ? T(
|
|
172
|
+
u(
|
|
173
|
+
JSON.parse(o),
|
|
174
|
+
(n = e == null ? void 0 : e.exportConfigState) == null ? void 0 : n.defaultValue
|
|
175
|
+
)
|
|
176
|
+
) : T(JSON.parse(o)) : T(x);
|
|
153
177
|
} catch (o) {
|
|
154
178
|
console.warn(o);
|
|
155
179
|
}
|
|
@@ -187,7 +211,9 @@ function _e(e) {
|
|
|
187
211
|
(c = i == null ? void 0 : i(n)) == null || c.then((l) => {
|
|
188
212
|
var r;
|
|
189
213
|
const o = u(l ?? {}, (r = e == null ? void 0 : e.exportConfigState) == null ? void 0 : r.value);
|
|
190
|
-
T(
|
|
214
|
+
T(
|
|
215
|
+
Object.keys(o).length ? o : x
|
|
216
|
+
);
|
|
191
217
|
});
|
|
192
218
|
} catch (l) {
|
|
193
219
|
console.warn(l);
|
|
@@ -208,24 +234,30 @@ function _e(e) {
|
|
|
208
234
|
disabled: Pe
|
|
209
235
|
});
|
|
210
236
|
}), n;
|
|
211
|
-
}, [s]), [Oe, Ve] = h(!1), [y, m] = N(
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
237
|
+
}, [s]), [Oe, Ve] = h(!1), [y, m] = N(
|
|
238
|
+
() => {
|
|
239
|
+
var i, n, l, o;
|
|
240
|
+
const { persistenceType: t, persistenceKey: a, onlineGet: c } = e.columnsState || {};
|
|
241
|
+
if (a && t && typeof window < "u" && t !== "online") {
|
|
242
|
+
const r = window[t];
|
|
243
|
+
try {
|
|
244
|
+
const w = r == null ? void 0 : r.getItem(a);
|
|
245
|
+
if (w)
|
|
246
|
+
return (i = e == null ? void 0 : e.columnsState) != null && i.defaultValue ? u(
|
|
247
|
+
JSON.parse(w),
|
|
248
|
+
(n = e == null ? void 0 : e.columnsState) == null ? void 0 : n.defaultValue
|
|
249
|
+
) : JSON.parse(w);
|
|
250
|
+
} catch (w) {
|
|
251
|
+
console.warn(w);
|
|
252
|
+
}
|
|
222
253
|
}
|
|
254
|
+
return e.columnsStateMap || ((l = e.columnsState) == null ? void 0 : l.value) || ((o = e.columnsState) == null ? void 0 : o.defaultValue) || {};
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
value: ((X = e.columnsState) == null ? void 0 : X.value) || e.columnsStateMap,
|
|
258
|
+
onChange: ((q = e.columnsState) == null ? void 0 : q.onChange) || e.onColumnsStateChange
|
|
223
259
|
}
|
|
224
|
-
|
|
225
|
-
}, {
|
|
226
|
-
value: ((X = e.columnsState) == null ? void 0 : X.value) || e.columnsStateMap,
|
|
227
|
-
onChange: ((q = e.columnsState) == null ? void 0 : q.onChange) || e.onColumnsStateChange
|
|
228
|
-
});
|
|
260
|
+
);
|
|
229
261
|
g(() => {
|
|
230
262
|
var i, n;
|
|
231
263
|
const { persistenceType: t, persistenceKey: a, onlineGet: c } = e.columnsState || {};
|
|
@@ -233,7 +265,12 @@ function _e(e) {
|
|
|
233
265
|
const l = window[t];
|
|
234
266
|
try {
|
|
235
267
|
const o = l == null ? void 0 : l.getItem(a);
|
|
236
|
-
o ? (i = e == null ? void 0 : e.columnsState) != null && i.defaultValue ? m(
|
|
268
|
+
o ? (i = e == null ? void 0 : e.columnsState) != null && i.defaultValue ? m(
|
|
269
|
+
u(
|
|
270
|
+
JSON.parse(o),
|
|
271
|
+
(n = e == null ? void 0 : e.columnsState) == null ? void 0 : n.defaultValue
|
|
272
|
+
)
|
|
273
|
+
) : m(JSON.parse(o)) : m(d);
|
|
237
274
|
} catch (o) {
|
|
238
275
|
console.warn(o);
|
|
239
276
|
}
|
|
@@ -327,7 +364,11 @@ function _e(e) {
|
|
|
327
364
|
v(!1), V(0);
|
|
328
365
|
}, He = () => {
|
|
329
366
|
var t, a, c;
|
|
330
|
-
(c = (t = e.columnsState) == null ? void 0 : t.onlineChange) == null || c.call(
|
|
367
|
+
(c = (t = e.columnsState) == null ? void 0 : t.onlineChange) == null || c.call(
|
|
368
|
+
t,
|
|
369
|
+
(a = e.columnsState) == null ? void 0 : a.persistenceKey,
|
|
370
|
+
y
|
|
371
|
+
), v(!1), V(0);
|
|
331
372
|
}, j = {
|
|
332
373
|
loading: e.loading ?? !1,
|
|
333
374
|
dataSource: e.dataSource,
|
|
@@ -384,7 +425,7 @@ function _e(e) {
|
|
|
384
425
|
}
|
|
385
426
|
const Fe = ke({}), nt = (e) => {
|
|
386
427
|
const K = _e(e.initValue);
|
|
387
|
-
return je.jsx(Fe.Provider, { value: K, children: e.children });
|
|
428
|
+
return /* @__PURE__ */ je.jsx(Fe.Provider, { value: K, children: e.children });
|
|
388
429
|
};
|
|
389
430
|
export {
|
|
390
431
|
Fe as BitzTableContext,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const h = (e, r) => ((t, n) => t.map((d) => {
|
|
2
|
-
const o =
|
|
2
|
+
const o = u(d, d.index), s = n[o];
|
|
3
3
|
return s && s.show === !1 ? !1 : {
|
|
4
4
|
...d,
|
|
5
5
|
...s
|
|
@@ -7,7 +7,7 @@ const h = (e, r) => ((t, n) => t.map((d) => {
|
|
|
7
7
|
// width: finish ? config?.width ?? item?.width : item?.width
|
|
8
8
|
// },
|
|
9
9
|
};
|
|
10
|
-
}))(e, r).filter(Boolean),
|
|
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
11
|
const r = [];
|
|
12
12
|
function i(t) {
|
|
13
13
|
t.children ? t.children.forEach(i) : t.dataIndex && !t.exportHidden && r.push({
|
|
@@ -18,14 +18,14 @@ const h = (e, r) => ((t, n) => t.map((d) => {
|
|
|
18
18
|
}
|
|
19
19
|
return e.forEach(i), r;
|
|
20
20
|
}, p = (e) => (r, i) => {
|
|
21
|
-
var f, l, x,
|
|
21
|
+
var f, l, x, y;
|
|
22
22
|
const { fixed: t, index: n } = r, { fixed: d, index: o } = i;
|
|
23
23
|
if (t === "left" && d !== "left" || d === "right" && t !== "right")
|
|
24
24
|
return -2;
|
|
25
25
|
if (d === "left" && t !== "left" || t === "right" && d !== "right")
|
|
26
26
|
return 2;
|
|
27
27
|
const s = r.key || `${n}`, a = i.key || `${o}`;
|
|
28
|
-
return (f = e[s]) != null && f.order || (l = e[a]) != null && l.order ? (((x = e[s]) == null ? void 0 : x.order) || 0) - (((
|
|
28
|
+
return (f = e[s]) != null && f.order || (l = e[a]) != null && l.order ? (((x = e[s]) == null ? void 0 : x.order) || 0) - (((y = e[a]) == null ? void 0 : y.order) || 0) : (r.index || 0) - (i.index || 0);
|
|
29
29
|
};
|
|
30
30
|
function I(e, r, i) {
|
|
31
31
|
const t = {};
|
|
@@ -55,7 +55,7 @@ const c = (e, r) => {
|
|
|
55
55
|
export {
|
|
56
56
|
p as columnSort,
|
|
57
57
|
k as flattenColumns,
|
|
58
|
-
|
|
58
|
+
u as genColumnKey,
|
|
59
59
|
h as loopFilter,
|
|
60
60
|
c as removePropertiesWithoutMutation,
|
|
61
61
|
I as updateNestedObject
|
|
@@ -1,104 +1,134 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useContext as
|
|
3
|
-
import { Table as
|
|
4
|
-
import
|
|
5
|
-
import { BitzTableContext as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
1
|
+
import { j as y } from "../../../node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { useContext as L, useRef as tt, useMemo as s, useCallback as j } from "react";
|
|
3
|
+
import { Table as et } from "antd";
|
|
4
|
+
import nt from "../../../node_modules/classnames/index.mjs";
|
|
5
|
+
import { BitzTableContext as rt, toolCols as ot } from "../Store/index.mjs";
|
|
6
|
+
import st from "../../../node_modules/ahooks/es/useSize/index.mjs";
|
|
7
|
+
import at from "../../BitzTheme/index.mjs";
|
|
8
|
+
import it from "../../../node_modules/antd/es/table/ExpandIcon.mjs";
|
|
9
9
|
import "../../../node_modules/antd/es/config-provider/index.mjs";
|
|
10
|
-
import
|
|
11
|
-
import { getColumnsWithTool as
|
|
12
|
-
import { tablePaddingInline as
|
|
13
|
-
import { querySelectorAll as
|
|
14
|
-
import
|
|
15
|
-
import { ConfigContext as
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
import lt from "../../../node_modules/antd/locale/en_US.mjs";
|
|
11
|
+
import { getColumnsWithTool as ct, loopBuildSkeleton as ut } from "../Table/utils.mjs";
|
|
12
|
+
import { tablePaddingInline as mt } from "../../BitzConfigProvider/context.mjs";
|
|
13
|
+
import { querySelectorAll as ft } from "../../../utils/select-query.mjs";
|
|
14
|
+
import ht from "../../../node_modules/lodash-es/omit.mjs";
|
|
15
|
+
import { ConfigContext as bt } from "../../../node_modules/antd/es/config-provider/context.mjs";
|
|
16
|
+
function vt({
|
|
17
|
+
dataSource: u,
|
|
18
|
+
columns: g,
|
|
19
|
+
loading: i,
|
|
20
|
+
scroll: r,
|
|
21
|
+
components: f,
|
|
22
|
+
expandable: l,
|
|
23
|
+
rowSelection: m,
|
|
24
|
+
...a
|
|
25
|
+
}) {
|
|
26
|
+
var T, W, E;
|
|
27
|
+
const { token: x } = at.useToken(), q = ((T = x.Table) == null ? void 0 : T.cellPaddingInline) ?? mt, { showColumnBorder: K, rowHoverable: M } = L(rt), h = tt(null), C = st((W = h.current) == null ? void 0 : W.nativeElement), P = s(() => {
|
|
28
|
+
if (r != null && r.auto)
|
|
20
29
|
return {
|
|
21
|
-
...
|
|
30
|
+
...ht(r, "auto"),
|
|
22
31
|
x: void 0
|
|
23
32
|
};
|
|
24
|
-
const
|
|
25
|
-
return
|
|
26
|
-
}, [
|
|
27
|
-
var
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
const t = (r == null ? void 0 : r.x) ?? 1e3;
|
|
34
|
+
return r != null && r.x ? { x: t, y: r.y || 400 } : r != null && r.y ? { x: t, y: r.y } : { x: t, y: 400 };
|
|
35
|
+
}, [r]), A = () => {
|
|
36
|
+
var o, n;
|
|
37
|
+
const t = ft(
|
|
38
|
+
"& > .bitzTableContainerBody > .ant-table-wrapper.bitzTable > .ant-spin-nested-loading > .ant-spin-container > .ant-table > .ant-table-container > .ant-table-body > table > .ant-table-tbody > tr:not(.ant-table-measure-row, .ant-table-expanded-row)",
|
|
39
|
+
(n = (o = h.current) == null ? void 0 : o.nativeElement) == null ? void 0 : n.querySelectorAll
|
|
40
|
+
), e = [];
|
|
41
|
+
if (t == null || t.forEach((c) => {
|
|
42
|
+
var b;
|
|
43
|
+
e.push(
|
|
44
|
+
((b = c.querySelector("& > .operationCol .actionGroup")) == null ? void 0 : b.clientWidth) || 0
|
|
45
|
+
);
|
|
46
|
+
}), e.length)
|
|
47
|
+
return Math.ceil(Math.max(...e)) + q * 2;
|
|
48
|
+
}, $ = () => {
|
|
49
|
+
var b, v, I, N, D;
|
|
50
|
+
const t = (v = (b = h.current) == null ? void 0 : b.nativeElement) == null ? void 0 : v.querySelector(
|
|
51
|
+
".ant-table-body"
|
|
52
|
+
), e = t == null ? void 0 : t.clientWidth, n = ((t == null ? void 0 : t.offsetWidth) || 0) - e > 0, c = (D = (N = (I = h.current) == null ? void 0 : I.nativeElement) == null ? void 0 : N.querySelector(
|
|
53
|
+
".ant-table-cell-scrollbar"
|
|
54
|
+
)) == null ? void 0 : D.offsetWidth;
|
|
55
|
+
return { tbodyWidth: e, scrollbarSize: c, hasScrollBar: n };
|
|
38
56
|
}, { hasScrollBar: R, scrollbarSize: k } = s(() => {
|
|
39
|
-
const { hasScrollBar:
|
|
57
|
+
const { hasScrollBar: t, scrollbarSize: e } = $();
|
|
40
58
|
return {
|
|
41
|
-
hasScrollBar:
|
|
42
|
-
scrollbarSize:
|
|
59
|
+
hasScrollBar: t,
|
|
60
|
+
scrollbarSize: e
|
|
43
61
|
};
|
|
44
|
-
}, [
|
|
45
|
-
const
|
|
62
|
+
}, [C == null ? void 0 : C.height]), d = s(() => {
|
|
63
|
+
const t = g ?? [], o = t.filter((n) => !ot.includes(n)).map((n) => ({
|
|
46
64
|
...n,
|
|
47
65
|
width: n.useMaxWidth ? A() ?? n.width : n.width
|
|
48
66
|
}));
|
|
49
|
-
return
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
67
|
+
return ct(
|
|
68
|
+
t,
|
|
69
|
+
o,
|
|
70
|
+
!1,
|
|
71
|
+
!!m,
|
|
72
|
+
!!l
|
|
73
|
+
);
|
|
74
|
+
}, [g]), S = s(() => ut(d), [d]), F = s(() => i ? S : d, [i, d, S]), p = s(() => {
|
|
75
|
+
const t = (u == null ? void 0 : u.length) ?? 0, e = t > 4 ? t >= 8 ? 8 : t : 4;
|
|
76
|
+
return Array.from({ length: e }).map((n, c) => ({
|
|
77
|
+
key: `${Date.now()}${c}`
|
|
54
78
|
}));
|
|
55
|
-
}, [
|
|
79
|
+
}, [u]), G = s(() => i ? p : u, [i, u, p]), { table: w, locale: H = lt } = L(bt), _ = { ...H.Table }, J = ((E = w == null ? void 0 : w.expandable) == null ? void 0 : E.expandIcon) || (l == null ? void 0 : l.expandIcon) || it(_), z = s(() => {
|
|
56
80
|
if (l)
|
|
57
81
|
return {
|
|
58
82
|
...l,
|
|
59
|
-
expandedRowRender: () =>
|
|
60
|
-
expandIcon: (
|
|
61
|
-
const
|
|
83
|
+
expandedRowRender: () => /* @__PURE__ */ y.jsx(y.Fragment, {}),
|
|
84
|
+
expandIcon: (t) => {
|
|
85
|
+
const e = J(t);
|
|
62
86
|
return {
|
|
63
|
-
...
|
|
87
|
+
...e,
|
|
64
88
|
props: {
|
|
65
|
-
...
|
|
89
|
+
...e.props,
|
|
66
90
|
disabled: !0,
|
|
67
91
|
style: {
|
|
68
|
-
...
|
|
92
|
+
...e.props.style,
|
|
69
93
|
backgroundColor: x.colorBgContainerDisabled
|
|
70
94
|
}
|
|
71
95
|
}
|
|
72
96
|
};
|
|
73
97
|
}
|
|
74
98
|
};
|
|
75
|
-
}, [l]), O = s(() => i ?
|
|
99
|
+
}, [l]), O = s(() => i ? z : l, [i, l, z]), B = s(() => {
|
|
76
100
|
if (m)
|
|
77
101
|
return {
|
|
78
102
|
...m,
|
|
79
103
|
selectedRowKeys: [],
|
|
80
104
|
getCheckboxProps: () => ({ disabled: !0 })
|
|
81
105
|
};
|
|
82
|
-
}, [m]), Q = s(() => i ?
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
106
|
+
}, [m]), Q = s(() => i ? B : m, [i, m, B]), U = s(() => i ? void 0 : a.rowKey, [i, a.rowKey]), V = j(
|
|
107
|
+
(t, e) => {
|
|
108
|
+
var n;
|
|
109
|
+
if (!a.onRow)
|
|
110
|
+
return {};
|
|
111
|
+
const o = (n = a.onRow) == null ? void 0 : n.call(a, t, e);
|
|
112
|
+
return o.onClick && (o.className = "rowPointerCursor"), o;
|
|
113
|
+
},
|
|
114
|
+
[a.onRow]
|
|
115
|
+
), X = j(
|
|
116
|
+
(t, e, o) => {
|
|
117
|
+
const n = e % 2 === 0 ? "oddRow" : "evenRow";
|
|
118
|
+
if (a.rowClassName) {
|
|
119
|
+
const c = a.rowClassName(t, e, o);
|
|
120
|
+
return nt(n, c);
|
|
121
|
+
}
|
|
122
|
+
return n;
|
|
123
|
+
},
|
|
124
|
+
[a.rowClassName]
|
|
125
|
+
), Y = (t) => {
|
|
126
|
+
var o;
|
|
127
|
+
const e = { ...t };
|
|
128
|
+
return e.className.includes("ant-table-cell-fix-right") && !R && ((o = e.style) != null && o.right) && (e.style = {
|
|
129
|
+
...e.style,
|
|
130
|
+
right: e.style.right - (k || 0)
|
|
131
|
+
}), /* @__PURE__ */ y.jsx("th", { ...e });
|
|
102
132
|
}, Z = s(() => ({
|
|
103
133
|
...f,
|
|
104
134
|
header: {
|
|
@@ -106,8 +136,27 @@ function Ie({ dataSource: c, columns: g, loading: i, scroll: o, components: f, e
|
|
|
106
136
|
cell: Y
|
|
107
137
|
}
|
|
108
138
|
}), [f, R, k]);
|
|
109
|
-
return
|
|
139
|
+
return /* @__PURE__ */ y.jsx(
|
|
140
|
+
et,
|
|
141
|
+
{
|
|
142
|
+
...a,
|
|
143
|
+
bordered: K,
|
|
144
|
+
columns: F,
|
|
145
|
+
dataSource: G,
|
|
146
|
+
loading: !1,
|
|
147
|
+
pagination: !1,
|
|
148
|
+
scroll: P,
|
|
149
|
+
expandable: O,
|
|
150
|
+
rowSelection: Q,
|
|
151
|
+
onRow: V,
|
|
152
|
+
rowClassName: X,
|
|
153
|
+
components: Z,
|
|
154
|
+
rowKey: U,
|
|
155
|
+
rowHoverable: M,
|
|
156
|
+
ref: h
|
|
157
|
+
}
|
|
158
|
+
);
|
|
110
159
|
}
|
|
111
160
|
export {
|
|
112
|
-
|
|
161
|
+
vt as default
|
|
113
162
|
};
|
|
@@ -1,48 +1,70 @@
|
|
|
1
1
|
import { j as a } from "../../../node_modules/react/jsx-runtime.mjs";
|
|
2
2
|
import { Resizable as v } from "../../../node_modules/react-resizable/index.mjs";
|
|
3
|
-
import { useState as E, useMemo as b, useRef as
|
|
3
|
+
import { useState as E, useMemo as b, useRef as i } from "react";
|
|
4
4
|
import L from "../../../node_modules/classnames/index.mjs";
|
|
5
5
|
const d = 56, C = (p) => {
|
|
6
|
-
const { hasScrollBar: g, scrollbarSize: y, onResize: x, width: n, datagridref: S, stretchref: u, ...j } = p, [
|
|
6
|
+
const { hasScrollBar: g, scrollbarSize: y, onResize: x, width: n, datagridref: S, stretchref: u, ...j } = p, [D, m] = E(!1), R = b(() => {
|
|
7
7
|
var t, z;
|
|
8
8
|
const e = { ...j };
|
|
9
9
|
return ((t = e.className) == null ? void 0 : t.includes("ant-table-cell-fix-right")) && !g && ((z = e.style) != null && z.right) && (e.style = { ...e.style ?? {} }, e.style.right = Number(e.style.right ?? 0) - (y || 0)), e;
|
|
10
|
-
}, [p]), c =
|
|
10
|
+
}, [p]), c = i(0), f = i(0), r = i(0), l = i(0), o = i(!1), h = b(() => c.current - n + d, [c.current, n]);
|
|
11
11
|
if (!n)
|
|
12
|
-
return a.jsx("th", { ...R });
|
|
13
|
-
const
|
|
12
|
+
return /* @__PURE__ */ a.jsx("th", { ...R });
|
|
13
|
+
const N = (e) => {
|
|
14
14
|
if (r.current = e.clientX - f.current, n + r.current - c.current <= d || r.current < h) {
|
|
15
15
|
o.current = !0;
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
18
|
r.current >= h && o.current && (r.current = h, o.current = !1);
|
|
19
19
|
const t = u.current;
|
|
20
|
-
|
|
21
|
-
},
|
|
20
|
+
l.current = r.current, t.style.left = `${l.current}px`;
|
|
21
|
+
}, w = (e) => {
|
|
22
22
|
m(!0);
|
|
23
23
|
const s = u.current;
|
|
24
24
|
s.style.opacity = 1, s.style.pointerEvents = "auto", f.current = S.current.getBoundingClientRect().left;
|
|
25
25
|
const t = e.clientX - f.current;
|
|
26
|
-
|
|
26
|
+
l.current = t, s.style.left = `${t}px`, c.current = t, r.current = t;
|
|
27
27
|
}, P = (e, s) => {
|
|
28
28
|
o.current = !1, m(!1);
|
|
29
29
|
const t = u.current;
|
|
30
30
|
t.style.opacity = 0, t.style.pointerEvents = "none", setTimeout(() => {
|
|
31
31
|
t.style.left = "0px";
|
|
32
|
-
}, 200), x(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
}, 200), x(
|
|
33
|
+
e,
|
|
34
|
+
{
|
|
35
|
+
...s,
|
|
36
|
+
minWidth: d,
|
|
37
|
+
size: {
|
|
38
|
+
...s.size,
|
|
39
|
+
width: n + l.current - c.current
|
|
40
|
+
}
|
|
38
41
|
}
|
|
39
|
-
|
|
40
|
-
}, X = a.jsx(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
), l.current = 0, c.current = 0, r.current = 0;
|
|
43
|
+
}, X = /* @__PURE__ */ a.jsx(
|
|
44
|
+
"span",
|
|
45
|
+
{
|
|
46
|
+
className: "bitzResizableHandle",
|
|
47
|
+
onClick: (e) => {
|
|
48
|
+
e.stopPropagation(), e.preventDefault();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
return /* @__PURE__ */ a.jsx(
|
|
53
|
+
v,
|
|
54
|
+
{
|
|
55
|
+
width: n,
|
|
56
|
+
height: 0,
|
|
57
|
+
handle: X,
|
|
58
|
+
className: L("bitzResizable", {
|
|
59
|
+
disabledUserSelect: D
|
|
60
|
+
}),
|
|
61
|
+
onResize: N,
|
|
62
|
+
onResizeStart: w,
|
|
63
|
+
onResizeStop: P,
|
|
64
|
+
draggableOpts: { enableUserSelectHack: !1 },
|
|
65
|
+
children: /* @__PURE__ */ a.jsx("th", { ...R })
|
|
66
|
+
}
|
|
67
|
+
);
|
|
46
68
|
};
|
|
47
69
|
export {
|
|
48
70
|
C as default
|