bitz-react-admin-ui 2.6.7 → 2.6.9
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/ActionCol/index.mjs +59 -55
- package/dist/components/BitzTable/Table/index.mjs +224 -220
- package/dist/components/BitzTable/index.d.ts +1 -0
- package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
- package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -2
package/dist/_virtual/index.mjs
CHANGED
package/dist/_virtual/index2.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { j as n } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
2
|
import P from "../../../node_modules/.store/ahooks@3.8.0/node_modules/ahooks/es/useSize/index.mjs";
|
|
3
3
|
import { Space as E, Skeleton as L, theme as D } from "antd";
|
|
4
|
-
import { forwardRef as F, useContext as H, useMemo as
|
|
4
|
+
import { forwardRef as F, useContext as H, useMemo as N, useState as M, Fragment as O, useRef as S } from "react";
|
|
5
5
|
import x from "../../BitzButton/index.mjs";
|
|
6
6
|
import _, { actionColBtnGap as q } from "./style.mjs";
|
|
7
7
|
import "../index.mjs";
|
|
8
8
|
import T from "../Dropdown/index.mjs";
|
|
9
9
|
import { tablePaddingInline as G } from "../../BitzConfigProvider/context.mjs";
|
|
10
10
|
import { BitzTableContext as J } from "../Store/index.mjs";
|
|
11
|
-
const
|
|
12
|
-
skeletonCls:
|
|
11
|
+
const k = ({
|
|
12
|
+
skeletonCls: p,
|
|
13
13
|
...s
|
|
14
14
|
}) => /* @__PURE__ */ n.jsxs(x, { type: "text", ...s, children: [
|
|
15
15
|
/* @__PURE__ */ n.jsx("span", { children: s.children }),
|
|
@@ -18,7 +18,7 @@ const j = ({
|
|
|
18
18
|
{
|
|
19
19
|
active: !0,
|
|
20
20
|
title: !1,
|
|
21
|
-
className:
|
|
21
|
+
className: p,
|
|
22
22
|
paragraph: {
|
|
23
23
|
rows: 1,
|
|
24
24
|
width: "100%"
|
|
@@ -26,130 +26,130 @@ const j = ({
|
|
|
26
26
|
}
|
|
27
27
|
)
|
|
28
28
|
] }), K = F(
|
|
29
|
-
({ loading:
|
|
30
|
-
const { loading:
|
|
29
|
+
({ loading: p, useMaxWidth: s, actionGroup: a, customActions: r }, b) => {
|
|
30
|
+
const { loading: C, fullscreen: y } = H(J), o = N(() => p ?? C, [p, C]), {
|
|
31
31
|
primaryBtnClassName: l,
|
|
32
|
-
dangerBtnClassName:
|
|
33
|
-
secondaryBtnClassName:
|
|
32
|
+
dangerBtnClassName: d,
|
|
33
|
+
secondaryBtnClassName: g,
|
|
34
34
|
maskClassName: z,
|
|
35
|
-
skeletonBtnClassName:
|
|
36
|
-
skeletonClassName:
|
|
37
|
-
} = _(), [
|
|
35
|
+
skeletonBtnClassName: c,
|
|
36
|
+
skeletonClassName: u
|
|
37
|
+
} = _(), [j] = M([
|
|
38
38
|
/* @__PURE__ */ n.jsx(
|
|
39
|
-
|
|
39
|
+
k,
|
|
40
40
|
{
|
|
41
|
-
className:
|
|
42
|
-
skeletonCls:
|
|
41
|
+
className: c,
|
|
42
|
+
skeletonCls: u,
|
|
43
43
|
children: "占位"
|
|
44
44
|
},
|
|
45
45
|
1
|
|
46
46
|
),
|
|
47
47
|
/* @__PURE__ */ n.jsx(
|
|
48
|
-
|
|
48
|
+
k,
|
|
49
49
|
{
|
|
50
|
-
className:
|
|
51
|
-
skeletonCls:
|
|
50
|
+
className: c,
|
|
51
|
+
skeletonCls: u,
|
|
52
52
|
children: "占位"
|
|
53
53
|
},
|
|
54
54
|
2
|
|
55
55
|
)
|
|
56
|
-
]),
|
|
56
|
+
]), B = N(() => {
|
|
57
57
|
if (o && s)
|
|
58
|
-
return
|
|
58
|
+
return j;
|
|
59
59
|
const m = a.length >= 4 ? 2 : a.length, i = a.slice(0, m), t = [];
|
|
60
|
-
if (i != null && i.length && i.forEach((e,
|
|
60
|
+
if (i != null && i.length && i.forEach((e, h) => {
|
|
61
61
|
t.push(
|
|
62
62
|
o ? /* @__PURE__ */ n.jsx(
|
|
63
|
-
|
|
63
|
+
k,
|
|
64
64
|
{
|
|
65
|
-
className:
|
|
66
|
-
skeletonCls:
|
|
65
|
+
className: c,
|
|
66
|
+
skeletonCls: u,
|
|
67
67
|
children: e == null ? void 0 : e.label
|
|
68
68
|
},
|
|
69
|
-
|
|
69
|
+
h
|
|
70
70
|
) : e.children ? /* @__PURE__ */ n.jsx(T, { menu: { items: e.children }, children: /* @__PURE__ */ n.jsx(
|
|
71
71
|
x,
|
|
72
72
|
{
|
|
73
73
|
type: "text",
|
|
74
|
-
className: e.danger ?
|
|
74
|
+
className: e.danger ? d : l,
|
|
75
75
|
children: e == null ? void 0 : e.label
|
|
76
76
|
}
|
|
77
|
-
) },
|
|
77
|
+
) }, h) : /* @__PURE__ */ n.jsx(
|
|
78
78
|
x,
|
|
79
79
|
{
|
|
80
80
|
type: "text",
|
|
81
|
-
className: e.danger ?
|
|
81
|
+
className: e.danger ? d : l,
|
|
82
82
|
onClick: e == null ? void 0 : e.onClick,
|
|
83
83
|
children: e == null ? void 0 : e.label
|
|
84
84
|
},
|
|
85
|
-
|
|
85
|
+
h
|
|
86
86
|
)
|
|
87
87
|
);
|
|
88
88
|
}), m === 2 && a.length >= 4) {
|
|
89
89
|
const e = a.slice(2, a.length);
|
|
90
90
|
t.push(
|
|
91
91
|
o ? /* @__PURE__ */ n.jsx(
|
|
92
|
-
|
|
92
|
+
k,
|
|
93
93
|
{
|
|
94
|
-
className:
|
|
95
|
-
skeletonCls:
|
|
94
|
+
className: c,
|
|
95
|
+
skeletonCls: u,
|
|
96
96
|
children: "更多"
|
|
97
97
|
},
|
|
98
98
|
5
|
|
99
|
-
) : /* @__PURE__ */ n.jsx(T, { menu: { items: e }, children: /* @__PURE__ */ n.jsx(x, { type: "text", className:
|
|
99
|
+
) : /* @__PURE__ */ n.jsx(T, { menu: { items: e }, children: /* @__PURE__ */ n.jsx(x, { type: "text", className: g, children: "更多" }) }, 5)
|
|
100
100
|
);
|
|
101
101
|
}
|
|
102
102
|
return t;
|
|
103
|
-
}, [o, s, a]),
|
|
103
|
+
}, [o, s, a]), w = N(() => {
|
|
104
104
|
if (!(r != null && r.length))
|
|
105
105
|
return;
|
|
106
106
|
if (o && s)
|
|
107
|
-
return
|
|
107
|
+
return j;
|
|
108
108
|
const m = r.map((t, e) => /* @__PURE__ */ n.jsx(
|
|
109
|
-
|
|
109
|
+
k,
|
|
110
110
|
{
|
|
111
|
-
className:
|
|
112
|
-
skeletonCls:
|
|
111
|
+
className: c,
|
|
112
|
+
skeletonCls: u,
|
|
113
113
|
children: t == null ? void 0 : t.label
|
|
114
114
|
},
|
|
115
115
|
e
|
|
116
116
|
)), i = r.map((t, e) => {
|
|
117
|
-
let
|
|
117
|
+
let h = /* @__PURE__ */ n.jsx(
|
|
118
118
|
x,
|
|
119
119
|
{
|
|
120
120
|
type: "text",
|
|
121
|
-
className: t.danger ?
|
|
121
|
+
className: t.danger ? d : l,
|
|
122
122
|
onClick: t.onClick,
|
|
123
123
|
children: t == null ? void 0 : t.label
|
|
124
124
|
},
|
|
125
125
|
e
|
|
126
126
|
);
|
|
127
|
-
t.type === "secondary" && (
|
|
127
|
+
t.type === "secondary" && (h = /* @__PURE__ */ n.jsx(
|
|
128
128
|
x,
|
|
129
129
|
{
|
|
130
130
|
type: "text",
|
|
131
|
-
className:
|
|
131
|
+
className: g,
|
|
132
132
|
onClick: t.onClick,
|
|
133
133
|
children: t == null ? void 0 : t.label
|
|
134
134
|
},
|
|
135
135
|
e
|
|
136
136
|
));
|
|
137
|
-
const
|
|
138
|
-
return
|
|
137
|
+
const f = t.render ?? ((I, R) => /* @__PURE__ */ n.jsx(O, { children: I }, R));
|
|
138
|
+
return f == null ? void 0 : f(h, e);
|
|
139
139
|
});
|
|
140
140
|
return o ? m : i;
|
|
141
141
|
}, [o, s, r]);
|
|
142
142
|
return /* @__PURE__ */ n.jsxs("div", { onClick: (m) => m.stopPropagation(), style: { overflow: "hidden" }, children: [
|
|
143
|
-
/* @__PURE__ */ n.jsx(E, { size: q, ref:
|
|
143
|
+
/* @__PURE__ */ n.jsx(E, { size: q, ref: b, className: "actionGroup", children: w ?? B }),
|
|
144
144
|
/* @__PURE__ */ n.jsx("div", { className: z })
|
|
145
145
|
] });
|
|
146
146
|
}
|
|
147
147
|
);
|
|
148
|
-
function ee(
|
|
149
|
-
var
|
|
150
|
-
const { actionGroup: s, loading: a, customActions: r, defaultWidth:
|
|
151
|
-
return
|
|
152
|
-
width: Math.floor(
|
|
148
|
+
function ee(p) {
|
|
149
|
+
var c;
|
|
150
|
+
const { actionGroup: s, loading: a, customActions: r, defaultWidth: b, ...C } = p, y = ((c = D.useToken().token.Table) == null ? void 0 : c.cellPaddingInline) ?? G, o = S(null), l = P(o), d = S(0), g = N(() => (l != null && l.width && !d.current && (d.current = l == null ? void 0 : l.width), !(l != null && l.width) && d.current ? d.current + y * 2 + 1 : l != null && l.width ? l.width + y * 2 + 1 : b ?? 141), [l, y, b]);
|
|
151
|
+
return N(() => ({
|
|
152
|
+
width: Math.floor(g),
|
|
153
153
|
mobileHide: !0,
|
|
154
154
|
isOperationCol: !0,
|
|
155
155
|
title: "操作",
|
|
@@ -158,22 +158,26 @@ function ee(h) {
|
|
|
158
158
|
dataIndex: "operationCol",
|
|
159
159
|
className: "operationCol",
|
|
160
160
|
disabled: !0,
|
|
161
|
-
render: (
|
|
161
|
+
render: (u, j, B) => {
|
|
162
162
|
var i, t;
|
|
163
|
-
const
|
|
163
|
+
const w = ((i = r == null ? void 0 : r(j, B)) == null ? void 0 : i.filter((e) => e.type != "detail")) ?? [], m = ((t = s == null ? void 0 : s(j, B)) == null ? void 0 : t.filter((e) => {
|
|
164
|
+
var f;
|
|
165
|
+
const h = typeof e.hidden == "function" ? (f = e.hidden) == null ? void 0 : f.call(e) : e.hidden;
|
|
166
|
+
return e.type != "detail" && !h;
|
|
167
|
+
})) ?? [];
|
|
164
168
|
return /* @__PURE__ */ n.jsx(
|
|
165
169
|
K,
|
|
166
170
|
{
|
|
167
171
|
actionGroup: m,
|
|
168
|
-
customActions:
|
|
172
|
+
customActions: w,
|
|
169
173
|
loading: a,
|
|
170
|
-
useMaxWidth:
|
|
174
|
+
useMaxWidth: C.useMaxWidth,
|
|
171
175
|
ref: o
|
|
172
176
|
}
|
|
173
177
|
);
|
|
174
178
|
},
|
|
175
|
-
...
|
|
176
|
-
}), [
|
|
179
|
+
...C
|
|
180
|
+
}), [g, o.current, a, s, r]);
|
|
177
181
|
}
|
|
178
182
|
export {
|
|
179
183
|
K as BitzTableAction,
|