bitz-react-admin-ui 2.5.4 → 2.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index.mjs +2 -2
- package/dist/_virtual/index2.mjs +2 -2
- package/dist/components/BitzTable/ActionBar/ActionBar.d.ts +4 -3
- package/dist/components/BitzTable/ActionBar/Button.d.ts +7 -3
- package/dist/components/BitzTable/ActionBar/Button.mjs +26 -7
- package/dist/components/BitzTable/ActionBar/index.d.ts +2 -0
- package/dist/components/BitzTable/Store/index.mjs +96 -101
- package/dist/components/BitzTable/Store/utils/index.mjs +29 -29
- package/dist/components/BitzTable/Table/ResizableTitle copy.mjs +36 -36
- package/dist/components/BitzTable/Table/index.mjs +399 -377
- package/dist/components/BitzTableSelect/Select/index.mjs +1 -1
- package/dist/components/BitzTableSelect/SelectPopup/index.mjs +90 -91
- package/dist/components/BitzTableSelect/SingleSelect/index.mjs +42 -40
- package/dist/components/BitzText/index.d.ts +9 -0
- package/dist/components/BitzText/index.less.mjs +4 -0
- package/dist/components/BitzText/index.mjs +64 -0
- package/dist/components/BitzText/utils.d.ts +4 -0
- package/dist/components/BitzText/utils.mjs +5 -0
- package/dist/components/BitzTooltip/index.d.ts +17 -0
- package/dist/components/BitzTooltip/index.mjs +96 -0
- package/dist/components/BitzTooltip/style.d.ts +5 -0
- package/dist/components/BitzTooltip/style.mjs +50 -0
- package/dist/components/BitzTooltip/utils.d.ts +2 -0
- package/dist/components/BitzTooltip/utils.mjs +4 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +42 -38
- package/dist/node_modules/.store/@ant-design_icons-svg@4.4.2/node_modules/@ant-design/icons-svg/es/asn/CopyOutlined.mjs +5 -0
- package/dist/node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/CopyOutlined.mjs +15 -0
- package/dist/node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useClickAway/index.mjs +27 -0
- package/dist/node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/utils/getDocumentOrShadow.mjs +21 -0
- package/dist/node_modules/.store/antd@5.17.3/node_modules/antd/es/typography/hooks/useCopyClick.mjs +63 -0
- package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
- package/dist/node_modules/.store/copy-to-clipboard@3.3.3/node_modules/copy-to-clipboard/index.mjs +46 -0
- package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
- package/dist/node_modules/.store/toggle-selection@1.0.6/node_modules/toggle-selection/index.mjs +25 -0
- package/dist/style.css +1 -1
- package/dist/utils/WithFluent.mjs +7 -6
- package/package.json +1 -1
package/dist/_virtual/index.mjs
CHANGED
package/dist/_virtual/index2.mjs
CHANGED
|
@@ -2,6 +2,7 @@ import { FC, MouseEventHandler, ReactNode } from 'react';
|
|
|
2
2
|
import { DropdownProps as AntDropdownProps, ButtonProps as AntButtonProps } from 'antd';
|
|
3
3
|
import { SubMenuType } from 'antd/es/menu/interface';
|
|
4
4
|
import { DensitySize } from '../Store';
|
|
5
|
+
import { BitzActionBarButtonType } from '.';
|
|
5
6
|
interface AddButtonType extends Omit<AntButtonProps, 'children' | 'onClick'> {
|
|
6
7
|
/** 按钮文字 */
|
|
7
8
|
text: string;
|
|
@@ -22,15 +23,15 @@ interface ExcelButtonType extends Omit<AntDropdownProps, 'menu' | 'children'> {
|
|
|
22
23
|
otherMenu?: SubMenuType[];
|
|
23
24
|
}
|
|
24
25
|
interface ButtonProps extends Omit<AntButtonProps, 'type' | 'children'> {
|
|
25
|
-
type:
|
|
26
|
+
type: BitzActionBarButtonType;
|
|
26
27
|
text: ReactNode;
|
|
27
28
|
}
|
|
28
29
|
interface DropdownProps extends AntDropdownProps {
|
|
29
30
|
type: 'dropdown';
|
|
30
31
|
text: ReactNode;
|
|
31
32
|
}
|
|
32
|
-
export type ActionbarBtnTypeValue =
|
|
33
|
-
export type ActionbarBtnBaseType<T extends ActionbarBtnTypeValue = 'primary'> = T extends
|
|
33
|
+
export type ActionbarBtnTypeValue = BitzActionBarButtonType | 'dropdown';
|
|
34
|
+
export type ActionbarBtnBaseType<T extends ActionbarBtnTypeValue = 'primary'> = T extends BitzActionBarButtonType ? Omit<AntButtonProps, 'type'> : DropdownProps;
|
|
34
35
|
export type ActionbarBtnType<T extends ActionbarBtnTypeValue = 'primary'> = {
|
|
35
36
|
type: T;
|
|
36
37
|
} & ActionbarBtnBaseType<T>;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { ButtonProps as AntButtonProps } from 'antd';
|
|
2
|
-
import { FC } from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { FC, ReactNode } from 'react';
|
|
3
|
+
import { BitzActionBarButtonType } from '.';
|
|
4
|
+
interface BitzActionBarButtonProps extends Omit<AntButtonProps, 'type'> {
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
type?: BitzActionBarButtonType;
|
|
7
|
+
}
|
|
8
|
+
/** SelectionBar的按钮 */
|
|
5
9
|
declare const BitzActionBarButton: FC<BitzActionBarButtonProps>;
|
|
6
10
|
export default BitzActionBarButton;
|
|
@@ -1,10 +1,29 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { j as e } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import p from "../../BitzButton/index.mjs";
|
|
3
|
+
import c from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
4
|
+
import { useMemo as s } from "react";
|
|
5
|
+
import x from "./style.mjs";
|
|
6
|
+
import B from "../../../node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/PlusCircleFilled.mjs";
|
|
7
|
+
const z = ({
|
|
8
|
+
className: o,
|
|
9
|
+
icon: n,
|
|
10
|
+
type: r,
|
|
11
|
+
...i
|
|
12
|
+
}) => {
|
|
13
|
+
const { addBtnClassName: m, btnClassName: a } = x(), u = s(() => {
|
|
14
|
+
if (n)
|
|
15
|
+
return n;
|
|
16
|
+
if (r === "primary")
|
|
17
|
+
return /* @__PURE__ */ e.jsx(B, {});
|
|
18
|
+
}, [n, r]), l = s(() => {
|
|
19
|
+
let t = a;
|
|
20
|
+
return r === "primary" && (t = m), c(t, o);
|
|
21
|
+
}, [r, o]), f = s(() => {
|
|
22
|
+
let t = "text";
|
|
23
|
+
return r === "primary" && (t = "primary"), t;
|
|
24
|
+
}, [r, o]);
|
|
25
|
+
return /* @__PURE__ */ e.jsx(p, { className: l, icon: u, type: f, ...i });
|
|
7
26
|
};
|
|
8
27
|
export {
|
|
9
|
-
|
|
28
|
+
z as default
|
|
10
29
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BitzTableActionBarProps } from './ActionBar';
|
|
3
3
|
import BitzActionBarButton from './Button';
|
|
4
|
+
type BitzActionBarButtonType = 'primary' | 'secondary';
|
|
4
5
|
type CompoundedComponent = React.ForwardRefExoticComponent<BitzTableActionBarProps> & {
|
|
5
6
|
Button: typeof BitzActionBarButton;
|
|
6
7
|
};
|
|
7
8
|
declare const BitzTableActionBar: CompoundedComponent;
|
|
9
|
+
export type { BitzActionBarButtonType };
|
|
8
10
|
export default BitzTableActionBar;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { Table as
|
|
3
|
-
import
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { genColumnKey as
|
|
6
|
-
import { getUuid as
|
|
7
|
-
import { BitzConfigContext as
|
|
1
|
+
import { j as ve } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { Table as fe } from "antd";
|
|
3
|
+
import z from "../../../hooks/useMergedState.mjs";
|
|
4
|
+
import { createContext as ze, useRef as Ne, useState as K, useContext as Ee, useEffect as d, useMemo as g, useCallback as N } from "react";
|
|
5
|
+
import { genColumnKey as E } 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 m from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
|
|
9
|
-
const
|
|
9
|
+
const Be = {
|
|
10
10
|
fixed: "left",
|
|
11
11
|
className: "sorterCol",
|
|
12
12
|
isDragSorterCol: !0,
|
|
@@ -16,18 +16,18 @@ const Je = {
|
|
|
16
16
|
onCell: () => ({
|
|
17
17
|
"data-column-name": "dragSorterCell"
|
|
18
18
|
})
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
}, je = [
|
|
20
|
+
Be,
|
|
21
|
+
fe.SELECTION_COLUMN,
|
|
22
|
+
fe.EXPAND_COLUMN
|
|
23
23
|
];
|
|
24
|
-
function
|
|
25
|
-
var
|
|
26
|
-
const T =
|
|
27
|
-
size:
|
|
28
|
-
zebra:
|
|
29
|
-
bordered:
|
|
30
|
-
}, [y,
|
|
24
|
+
function Me(e) {
|
|
25
|
+
var H, R, L, P, U, D, _, F, G, W, Z, A, X, q, Q, Y, $, p, ee, te, ne, ie, ae, oe, ce;
|
|
26
|
+
const T = Ne(Ie()), [re, se] = K(!1), [ue, de] = K(!1), [ye, Se] = K(0), s = Ee(Je).Table, Ce = s == null ? void 0 : s.defaultSize, I = e.size ?? e.defaultSize ?? Ce ?? "lg", ge = e.zebra ?? e.defaultZebra ?? (s == null ? void 0 : s.zebra) ?? !0, me = e.bordered ?? e.defaultBordered ?? (s == null ? void 0 : s.bordered) ?? "row-column", O = e.defaultStylesConfig || {
|
|
27
|
+
size: I,
|
|
28
|
+
zebra: ge,
|
|
29
|
+
bordered: me
|
|
30
|
+
}, [y, J] = z(
|
|
31
31
|
() => {
|
|
32
32
|
var n, c, l, a;
|
|
33
33
|
const { persistenceType: t, persistenceKey: i, onlineGet: o } = e.stylesConfigState || {};
|
|
@@ -47,8 +47,8 @@ function je(e) {
|
|
|
47
47
|
return e.stylesConfig || ((l = e.stylesConfigState) == null ? void 0 : l.value) || ((a = e.stylesConfigState) == null ? void 0 : a.defaultValue) || O;
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
|
-
value: ((
|
|
51
|
-
onChange: ((
|
|
50
|
+
value: ((H = e.stylesConfigState) == null ? void 0 : H.value) || e.stylesConfig,
|
|
51
|
+
onChange: ((R = e.stylesConfigState) == null ? void 0 : R.onChange) || e.onStylesConfigChange
|
|
52
52
|
}
|
|
53
53
|
);
|
|
54
54
|
d(() => {
|
|
@@ -65,13 +65,13 @@ function je(e) {
|
|
|
65
65
|
try {
|
|
66
66
|
c == null || c.setItem(i, JSON.stringify(y));
|
|
67
67
|
} catch (l) {
|
|
68
|
-
console.warn(l),
|
|
68
|
+
console.warn(l), j();
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
}, [
|
|
72
|
-
(
|
|
72
|
+
(L = e.stylesConfigState) == null ? void 0 : L.persistenceKey,
|
|
73
73
|
y,
|
|
74
|
-
(
|
|
74
|
+
(P = e.stylesConfigState) == null ? void 0 : P.persistenceType
|
|
75
75
|
]), d(() => {
|
|
76
76
|
var t, i, o;
|
|
77
77
|
if ((t = e.stylesConfigState) != null && t.persistenceKey && ((i = e.stylesConfigState) == null ? void 0 : i.persistenceType) === "online") {
|
|
@@ -80,7 +80,7 @@ function je(e) {
|
|
|
80
80
|
(o = n == null ? void 0 : n(c)) == null || o.then((l) => {
|
|
81
81
|
var f;
|
|
82
82
|
const a = m(l ?? {}, (f = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : f.value);
|
|
83
|
-
|
|
83
|
+
J(
|
|
84
84
|
Object.keys(a).length ? a : O
|
|
85
85
|
);
|
|
86
86
|
});
|
|
@@ -89,7 +89,7 @@ function je(e) {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
}, []);
|
|
92
|
-
const u = g(() => (e.columns ?? []).filter((t) => !
|
|
92
|
+
const u = g(() => (e.columns ?? []).filter((t) => !je.includes(t)), [e.columns]), h = g(() => {
|
|
93
93
|
var i;
|
|
94
94
|
if ((i = e == null ? void 0 : e.exportConfigState) != null && i.defaultValue)
|
|
95
95
|
return e.exportConfigState.defaultValue;
|
|
@@ -101,14 +101,14 @@ function je(e) {
|
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
103
|
return u.forEach((o, n) => {
|
|
104
|
-
const { title: c, isOperationCol: l } = o, a =
|
|
104
|
+
const { title: c, isOperationCol: l } = o, a = E(o, n);
|
|
105
105
|
a && !l && t.fields.push({
|
|
106
106
|
field: a,
|
|
107
107
|
title: c,
|
|
108
108
|
show: !0
|
|
109
109
|
});
|
|
110
110
|
}), t;
|
|
111
|
-
}, [u]), [V,
|
|
111
|
+
}, [u]), [V, x] = z(
|
|
112
112
|
() => {
|
|
113
113
|
var n, c, l, a;
|
|
114
114
|
const { persistenceType: t, persistenceKey: i, onlineGet: o } = e.exportConfigState || {};
|
|
@@ -125,11 +125,11 @@ function je(e) {
|
|
|
125
125
|
console.warn(r);
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
return e.exportConfig || ((l = e.exportConfigState) == null ? void 0 : l.value) || ((a = e.exportConfigState) == null ? void 0 : a.defaultValue) ||
|
|
128
|
+
return e.exportConfig || ((l = e.exportConfigState) == null ? void 0 : l.value) || ((a = e.exportConfigState) == null ? void 0 : a.defaultValue) || h;
|
|
129
129
|
},
|
|
130
130
|
{
|
|
131
|
-
value: ((
|
|
132
|
-
onChange: ((
|
|
131
|
+
value: ((U = e.exportConfigState) == null ? void 0 : U.value) || e.exportConfig,
|
|
132
|
+
onChange: ((D = e.exportConfigState) == null ? void 0 : D.onChange) || e.onExportConfigChange
|
|
133
133
|
}
|
|
134
134
|
);
|
|
135
135
|
d(() => {
|
|
@@ -139,20 +139,20 @@ function je(e) {
|
|
|
139
139
|
const l = window[t];
|
|
140
140
|
try {
|
|
141
141
|
const a = l == null ? void 0 : l.getItem(i);
|
|
142
|
-
a ? (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ?
|
|
142
|
+
a ? (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? x(
|
|
143
143
|
m(
|
|
144
144
|
JSON.parse(a),
|
|
145
145
|
(c = e == null ? void 0 : e.exportConfigState) == null ? void 0 : c.defaultValue
|
|
146
146
|
)
|
|
147
|
-
) :
|
|
147
|
+
) : x(JSON.parse(a)) : x(h);
|
|
148
148
|
} catch (a) {
|
|
149
149
|
console.warn(a);
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
}, [
|
|
153
|
-
(
|
|
154
|
-
(
|
|
155
|
-
|
|
153
|
+
(_ = e.exportConfigState) == null ? void 0 : _.persistenceKey,
|
|
154
|
+
(F = e.exportConfigState) == null ? void 0 : F.persistenceType,
|
|
155
|
+
h
|
|
156
156
|
]), d(() => {
|
|
157
157
|
var o, n;
|
|
158
158
|
if (!((o = e.exportConfigState) != null && o.persistenceKey) || !((n = e.exportConfigState) != null && n.persistenceType) || typeof window > "u")
|
|
@@ -167,13 +167,13 @@ function je(e) {
|
|
|
167
167
|
try {
|
|
168
168
|
c == null || c.setItem(i, JSON.stringify(V));
|
|
169
169
|
} catch (l) {
|
|
170
|
-
console.warn(l),
|
|
170
|
+
console.warn(l), M();
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
}, [
|
|
174
|
-
(
|
|
174
|
+
(G = e.exportConfigState) == null ? void 0 : G.persistenceKey,
|
|
175
175
|
V,
|
|
176
|
-
(
|
|
176
|
+
(W = e.exportConfigState) == null ? void 0 : W.persistenceType
|
|
177
177
|
]), d(() => {
|
|
178
178
|
var t, i, o;
|
|
179
179
|
if ((t = e.exportConfigState) != null && t.persistenceKey && ((i = e.exportConfigState) == null ? void 0 : i.persistenceType) === "online") {
|
|
@@ -182,8 +182,8 @@ function je(e) {
|
|
|
182
182
|
(o = n == null ? void 0 : n(c)) == null || o.then((l) => {
|
|
183
183
|
var f;
|
|
184
184
|
const a = m(l ?? {}, (f = e == null ? void 0 : e.exportConfigState) == null ? void 0 : f.value);
|
|
185
|
-
|
|
186
|
-
Object.keys(a).length ? a :
|
|
185
|
+
x(
|
|
186
|
+
Object.keys(a).length ? a : h
|
|
187
187
|
);
|
|
188
188
|
});
|
|
189
189
|
} catch (l) {
|
|
@@ -197,20 +197,15 @@ function je(e) {
|
|
|
197
197
|
return e.columnsState.defaultValue;
|
|
198
198
|
const t = u.filter((a) => a.fixed === "left").map((a, f) => ({ ...a, order: f })), i = u.filter((a) => a.fixed === "right").map((a, f) => ({ ...a, order: f })), o = u.filter((a) => !["left", "right"].includes(a.fixed)).map((a, f) => ({ ...a, order: f })), n = [...t, ...o, ...i], c = {};
|
|
199
199
|
return n.forEach((a, f) => {
|
|
200
|
-
const {
|
|
201
|
-
|
|
202
|
-
/*width,*/
|
|
203
|
-
fixed: Ke,
|
|
204
|
-
disabled: Oe
|
|
205
|
-
} = a, ce = N(a, f);
|
|
206
|
-
ce && (c[ce] = {
|
|
200
|
+
const { order: r, width: le, fixed: Oe, disabled: Ve } = a, v = E(a, f);
|
|
201
|
+
v && (c[v] = {
|
|
207
202
|
show: !0,
|
|
208
203
|
order: r,
|
|
209
|
-
fixed:
|
|
210
|
-
disabled:
|
|
211
|
-
});
|
|
204
|
+
fixed: Oe,
|
|
205
|
+
disabled: Ve
|
|
206
|
+
}, typeof le == "number" && (c[v].width = le));
|
|
212
207
|
}), c;
|
|
213
|
-
}, [u]), [
|
|
208
|
+
}, [u]), [we, he] = K(!1), [C, w] = z(
|
|
214
209
|
() => {
|
|
215
210
|
var n, c, l, a;
|
|
216
211
|
const { persistenceType: t, persistenceKey: i, onlineGet: o } = e.columnsState || {};
|
|
@@ -230,8 +225,8 @@ function je(e) {
|
|
|
230
225
|
return e.columnsStateMap || ((l = e.columnsState) == null ? void 0 : l.value) || ((a = e.columnsState) == null ? void 0 : a.defaultValue) || {};
|
|
231
226
|
},
|
|
232
227
|
{
|
|
233
|
-
value: ((
|
|
234
|
-
onChange: ((
|
|
228
|
+
value: ((Z = e.columnsState) == null ? void 0 : Z.value) || e.columnsStateMap,
|
|
229
|
+
onChange: ((A = e.columnsState) == null ? void 0 : A.onChange) || e.onColumnsStateChange
|
|
235
230
|
}
|
|
236
231
|
);
|
|
237
232
|
d(() => {
|
|
@@ -252,11 +247,11 @@ function je(e) {
|
|
|
252
247
|
}
|
|
253
248
|
}
|
|
254
249
|
}, [
|
|
255
|
-
(
|
|
256
|
-
(
|
|
250
|
+
(X = e.columnsState) == null ? void 0 : X.persistenceKey,
|
|
251
|
+
(q = e.columnsState) == null ? void 0 : q.persistenceType,
|
|
257
252
|
S
|
|
258
253
|
]);
|
|
259
|
-
const
|
|
254
|
+
const B = N(() => {
|
|
260
255
|
const { persistenceType: t, persistenceKey: i } = e.columnsState || {};
|
|
261
256
|
if (!i || !t || typeof window > "u")
|
|
262
257
|
return;
|
|
@@ -266,7 +261,7 @@ function je(e) {
|
|
|
266
261
|
} catch (n) {
|
|
267
262
|
console.warn(n);
|
|
268
263
|
}
|
|
269
|
-
}, [e.columnsState]),
|
|
264
|
+
}, [e.columnsState]), j = N(() => {
|
|
270
265
|
const { persistenceType: t, persistenceKey: i } = e.stylesConfigState || {};
|
|
271
266
|
if (!i || !t || typeof window > "u")
|
|
272
267
|
return;
|
|
@@ -276,7 +271,7 @@ function je(e) {
|
|
|
276
271
|
} catch (n) {
|
|
277
272
|
console.warn(n);
|
|
278
273
|
}
|
|
279
|
-
}, [e.stylesConfigState]),
|
|
274
|
+
}, [e.stylesConfigState]), M = N(() => {
|
|
280
275
|
const { persistenceType: t, persistenceKey: i } = e.exportConfigState || {};
|
|
281
276
|
if (!i || !t || typeof window > "u")
|
|
282
277
|
return;
|
|
@@ -301,13 +296,13 @@ function je(e) {
|
|
|
301
296
|
try {
|
|
302
297
|
c == null || c.setItem(i, JSON.stringify(C));
|
|
303
298
|
} catch (l) {
|
|
304
|
-
console.warn(l),
|
|
299
|
+
console.warn(l), B();
|
|
305
300
|
}
|
|
306
301
|
}
|
|
307
302
|
}, [
|
|
308
|
-
(
|
|
303
|
+
(Q = e.columnsState) == null ? void 0 : Q.persistenceKey,
|
|
309
304
|
C,
|
|
310
|
-
(
|
|
305
|
+
(Y = e.columnsState) == null ? void 0 : Y.persistenceType
|
|
311
306
|
]), d(() => {
|
|
312
307
|
var t, i, o;
|
|
313
308
|
if ((t = e.columnsState) != null && t.persistenceKey && ((i = e.columnsState) == null ? void 0 : i.persistenceType) === "online") {
|
|
@@ -316,7 +311,7 @@ function je(e) {
|
|
|
316
311
|
(o = n == null ? void 0 : n(c)) == null || o.then((l) => {
|
|
317
312
|
var f;
|
|
318
313
|
const a = m(l ?? {}, (f = e == null ? void 0 : e.columnsState) == null ? void 0 : f.value);
|
|
319
|
-
w(a),
|
|
314
|
+
w(a), he(!0);
|
|
320
315
|
});
|
|
321
316
|
} catch (l) {
|
|
322
317
|
console.warn(l);
|
|
@@ -326,64 +321,64 @@ function je(e) {
|
|
|
326
321
|
var i, o;
|
|
327
322
|
const t = u.findIndex((n) => n == null ? void 0 : n.isOperationCol);
|
|
328
323
|
if (t >= 0) {
|
|
329
|
-
const n = u[t], c =
|
|
324
|
+
const n = u[t], c = E(n, t);
|
|
330
325
|
!(((i = C == null ? void 0 : C[c]) == null ? void 0 : i.fixed) === ((o = S == null ? void 0 : S[c]) == null ? void 0 : o.fixed)) && Object.keys(C ?? {}).length === 0 && w(S);
|
|
331
326
|
}
|
|
332
327
|
}, [S, C]);
|
|
333
|
-
const xe = g(() => (e == null ? void 0 : e.rowHoverable) ?? (s == null ? void 0 : s.rowHoverable) ?? !0, [e == null ? void 0 : e.rowHoverable, s == null ? void 0 : s.rowHoverable]),
|
|
328
|
+
const xe = g(() => (e == null ? void 0 : e.rowHoverable) ?? (s == null ? void 0 : s.rowHoverable) ?? !0, [e == null ? void 0 : e.rowHoverable, s == null ? void 0 : s.rowHoverable]), Te = g(() => e.zebra ?? y.zebra, [e.zebra, y.zebra]), b = g(() => e.bordered ?? y.bordered, [e.bordered, y.bordered]), be = g(() => ["column", "row-column"].includes(b), [b]), Ke = g(() => {
|
|
334
329
|
let t = !1;
|
|
335
330
|
return ["hide", "column"].includes(b) && (t = !0), t;
|
|
336
|
-
}, [b]),
|
|
331
|
+
}, [b]), k = {
|
|
337
332
|
loading: e.loading ?? !1,
|
|
338
333
|
uuid: T.current,
|
|
339
|
-
fullscreen:
|
|
340
|
-
setFullscreen:
|
|
341
|
-
selected:
|
|
342
|
-
setSelected:
|
|
343
|
-
toolbarWidth:
|
|
344
|
-
setToolbarWidth:
|
|
334
|
+
fullscreen: re,
|
|
335
|
+
setFullscreen: se,
|
|
336
|
+
selected: ue,
|
|
337
|
+
setSelected: de,
|
|
338
|
+
toolbarWidth: ye,
|
|
339
|
+
setToolbarWidth: Se,
|
|
345
340
|
columns: e.columns,
|
|
346
341
|
baseColumns: u,
|
|
347
|
-
persistenceType: (
|
|
348
|
-
persistenceKey: (
|
|
349
|
-
onlineChange: (
|
|
350
|
-
finish:
|
|
342
|
+
persistenceType: ($ = e.columnsState) == null ? void 0 : $.persistenceType,
|
|
343
|
+
persistenceKey: (p = e.columnsState) == null ? void 0 : p.persistenceKey,
|
|
344
|
+
onlineChange: (ee = e.columnsState) == null ? void 0 : ee.onlineChange,
|
|
345
|
+
finish: we,
|
|
351
346
|
columnsMap: C,
|
|
352
347
|
setColumnsMap: w,
|
|
353
348
|
defaultColumnKeyMap: S,
|
|
354
|
-
clearPersistenceStorage:
|
|
349
|
+
clearPersistenceStorage: B,
|
|
355
350
|
stylesConfig: y,
|
|
356
|
-
setTableStylesConfig:
|
|
357
|
-
defaultTableSize:
|
|
351
|
+
setTableStylesConfig: J,
|
|
352
|
+
defaultTableSize: I,
|
|
358
353
|
tableSize: y.size,
|
|
359
|
-
stylesStorageType: (
|
|
360
|
-
stylesStorageKey: (
|
|
361
|
-
onlineStylesConfigChange: (
|
|
362
|
-
clearStylesConfigCache:
|
|
354
|
+
stylesStorageType: (te = e.stylesConfigState) == null ? void 0 : te.persistenceType,
|
|
355
|
+
stylesStorageKey: (ne = e.stylesConfigState) == null ? void 0 : ne.persistenceKey,
|
|
356
|
+
onlineStylesConfigChange: (ie = e.stylesConfigState) == null ? void 0 : ie.onlineChange,
|
|
357
|
+
clearStylesConfigCache: j,
|
|
363
358
|
defaultTableStylesConfig: O,
|
|
364
359
|
exportConfig: V,
|
|
365
|
-
setTableExportConfig:
|
|
366
|
-
defaultTableExportConfig:
|
|
367
|
-
exportStorageType: (
|
|
368
|
-
exportStorageKey: (
|
|
369
|
-
onlineExportConfigChange: (
|
|
370
|
-
clearExportConfigCache:
|
|
371
|
-
zebra:
|
|
360
|
+
setTableExportConfig: x,
|
|
361
|
+
defaultTableExportConfig: h,
|
|
362
|
+
exportStorageType: (ae = e.exportConfigState) == null ? void 0 : ae.persistenceType,
|
|
363
|
+
exportStorageKey: (oe = e.exportConfigState) == null ? void 0 : oe.persistenceKey,
|
|
364
|
+
onlineExportConfigChange: (ce = e.exportConfigState) == null ? void 0 : ce.onlineChange,
|
|
365
|
+
clearExportConfigCache: M,
|
|
366
|
+
zebra: Te,
|
|
372
367
|
rowHoverable: xe,
|
|
373
|
-
showColumnBorder:
|
|
374
|
-
hideRowBorder:
|
|
368
|
+
showColumnBorder: be,
|
|
369
|
+
hideRowBorder: Ke
|
|
375
370
|
};
|
|
376
|
-
return Object.defineProperty(
|
|
371
|
+
return Object.defineProperty(k, "uuid", {
|
|
377
372
|
get: () => T.current
|
|
378
|
-
}),
|
|
373
|
+
}), k;
|
|
379
374
|
}
|
|
380
|
-
const
|
|
381
|
-
const T =
|
|
382
|
-
return /* @__PURE__ */
|
|
375
|
+
const ke = ze({}), Ge = (e) => {
|
|
376
|
+
const T = Me(e.initValue);
|
|
377
|
+
return /* @__PURE__ */ ve.jsx(ke.Provider, { value: T, children: e.children });
|
|
383
378
|
};
|
|
384
379
|
export {
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
380
|
+
ke as BitzTableContext,
|
|
381
|
+
Be as SORTER_COLUMN,
|
|
382
|
+
Ge as default,
|
|
383
|
+
je as toolCols
|
|
389
384
|
};
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
const
|
|
2
|
-
const s =
|
|
3
|
-
return
|
|
4
|
-
...
|
|
5
|
-
...
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
const u = (r, d, x) => ((f, o) => f.map((e) => {
|
|
2
|
+
const s = l(e, e.index), i = o[s];
|
|
3
|
+
return i && i.show === !1 ? !1 : {
|
|
4
|
+
...e,
|
|
5
|
+
...i,
|
|
6
|
+
...(e == null ? void 0 : e.isOperationCol) && !x && {
|
|
7
|
+
width: e == null ? void 0 : e.width
|
|
8
|
+
}
|
|
9
9
|
};
|
|
10
|
-
}))(
|
|
11
|
-
var
|
|
12
|
-
const { fixed:
|
|
13
|
-
if (
|
|
10
|
+
}))(r, d).filter(Boolean), l = (r, d) => "key" in r && r.key !== void 0 && r.key !== null ? r.key : r.dataIndex ? Array.isArray(r.dataIndex) ? r.dataIndex.join("-") : r.dataIndex : `${d}`, h = (r) => (d, x) => {
|
|
11
|
+
var n, a, y, c;
|
|
12
|
+
const { fixed: t, index: f } = d, { fixed: o, index: e } = x;
|
|
13
|
+
if (t === "left" && o !== "left" || o === "right" && t !== "right")
|
|
14
14
|
return -2;
|
|
15
|
-
if (
|
|
15
|
+
if (o === "left" && t !== "left" || t === "right" && o !== "right")
|
|
16
16
|
return 2;
|
|
17
|
-
const s =
|
|
18
|
-
return (
|
|
17
|
+
const s = d.key || `${f}`, i = x.key || `${e}`;
|
|
18
|
+
return (n = r[s]) != null && n.order || (a = r[i]) != null && a.order ? (((y = r[s]) == null ? void 0 : y.order) || 0) - (((c = r[i]) == null ? void 0 : c.order) || 0) : (d.index || 0) - (x.index || 0);
|
|
19
19
|
};
|
|
20
|
-
function
|
|
21
|
-
const
|
|
20
|
+
function k(r, d, x) {
|
|
21
|
+
const t = {};
|
|
22
22
|
let f = "";
|
|
23
|
-
const
|
|
24
|
-
for (const
|
|
25
|
-
if (
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
...
|
|
29
|
-
[s]:
|
|
23
|
+
const o = (e, s, i) => {
|
|
24
|
+
for (const n in e)
|
|
25
|
+
if (e.hasOwnProperty(n) && (typeof e[n] == "object" && e[n] !== null && (f = n, t[n] = { ...e[n] }, o(e[n], s, i)), n === s)) {
|
|
26
|
+
const a = t[f];
|
|
27
|
+
t[f] = {
|
|
28
|
+
...a,
|
|
29
|
+
[s]: i
|
|
30
30
|
// [prop]: current.disabled || current.fixed ? true : val,
|
|
31
31
|
}, f = "";
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
-
return
|
|
34
|
+
return o(r, d, x), t;
|
|
35
35
|
}
|
|
36
36
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
h as columnSort,
|
|
38
|
+
l as genColumnKey,
|
|
39
|
+
u as loopFilter,
|
|
40
|
+
k as updateNestedObject
|
|
41
41
|
};
|