bitz-react-admin-ui 1.9.8 → 1.9.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/components/BitzFluentInput/index.mjs +22 -18
- package/dist/components/BitzFluentSelect/index.mjs +20 -16
- package/dist/components/BitzTable/ActionBar/style.mjs +9 -9
- package/dist/components/BitzTable/ActionCol/style.mjs +8 -8
- package/dist/components/BitzTable/Dropdown/style.mjs +7 -7
- package/dist/components/BitzTable/SelectionBar/style.mjs +5 -5
- package/dist/components/BitzTable/Store/index.d.ts +2 -2
- package/dist/components/BitzTable/Store/index.mjs +11 -11
- package/dist/components/BitzTable/Table/index.mjs +224 -210
- package/dist/components/BitzTable/Table/style.d.ts +4 -34
- package/dist/components/BitzTable/Table/style.mjs +8 -4
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnSettingModal.mjs +1 -1
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +8 -8
- package/dist/components/BitzTable/ToolBar/DensityIcon/index.mjs +36 -28
- package/dist/components/BitzTable/ToolBar/style.mjs +5 -5
- package/dist/components/BitzTable/index.d.ts +1 -1
- package/dist/components/BitzTable/index.mjs +7 -7
- package/dist/components/BitzTableSelect/Picker/index.d.ts +5 -2
- package/dist/components/BitzTableSelect/SelectPopup/getData.d.ts +1 -1
- package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +32 -34
- package/dist/components/BitzTableSelect/SelectPopup/index.mjs +108 -109
- package/dist/components/BitzTableSelect/TableCell/index.mjs +1 -1
- package/dist/components/BitzTableSelect/TextBlock/index.mjs +7 -7
- package/dist/components/BitzTableSelect/index.d.ts +2 -2
- package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/isBoolean.mjs +9 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,151 +1,153 @@
|
|
|
1
1
|
import { j as e } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { Row as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
2
|
+
import { useRef as re, useState as T, useMemo as K, useCallback as le, useEffect as oe } from "react";
|
|
3
|
+
import { Row as f, Col as a, Space as _, Form as h, Select as A, Spin as se, Typography as ce, Flex as ne, Empty as G } from "antd";
|
|
4
|
+
import ie from "../../BitzPagination/index.mjs";
|
|
5
|
+
import ae from "../../BitzTable/index.mjs";
|
|
6
|
+
import H from "../../BitzButton/index.mjs";
|
|
7
|
+
import { getColumns as pe, getExpandable as de, getLayoutConfig as ue } from "./getData.mjs";
|
|
8
|
+
import xe from "../TextBlock/index.mjs";
|
|
9
|
+
import he from "../../../node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useSize/index.mjs";
|
|
10
|
+
import me from "../../BitzTheme/index.mjs";
|
|
9
11
|
import "./index.less.mjs";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
function
|
|
12
|
+
import je from "../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/InfoCircleOutlined.mjs";
|
|
13
|
+
import Se from "../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/CloseOutlined.mjs";
|
|
14
|
+
function ke({
|
|
13
15
|
columns: P,
|
|
14
|
-
tableData:
|
|
15
|
-
total:
|
|
16
|
+
tableData: b,
|
|
17
|
+
total: L,
|
|
16
18
|
loading: m,
|
|
17
|
-
loadingFailed:
|
|
18
|
-
loadAgain:
|
|
19
|
-
page:
|
|
20
|
-
onPageChange:
|
|
21
|
-
searchInput:
|
|
19
|
+
loadingFailed: y,
|
|
20
|
+
loadAgain: O,
|
|
21
|
+
page: B,
|
|
22
|
+
onPageChange: W,
|
|
23
|
+
searchInput: $,
|
|
22
24
|
showToolTagSelect: E,
|
|
23
|
-
toolTags:
|
|
25
|
+
toolTags: q,
|
|
24
26
|
onToolTagChange: g,
|
|
25
27
|
lrLayout: w,
|
|
26
28
|
parentRender: I,
|
|
27
29
|
keys: R,
|
|
28
|
-
rows:
|
|
29
|
-
fieldNames:
|
|
30
|
-
onChange:
|
|
30
|
+
rows: z,
|
|
31
|
+
fieldNames: t,
|
|
32
|
+
onChange: u,
|
|
31
33
|
onDropdownVisibleChange: j
|
|
32
34
|
}) {
|
|
33
|
-
var F;
|
|
34
|
-
const
|
|
35
|
-
X(
|
|
35
|
+
var C, F;
|
|
36
|
+
const k = re(null), v = he(k), { token: s } = me.useToken(), M = ((C = s == null ? void 0 : s.BitzTableSelect) == null ? void 0 : C.tableSpaceBetweenPage) ?? 10, [c, J] = T([]), [r, Q] = T([]), [U, X] = T(void 0), Y = (l, o) => {
|
|
37
|
+
X(l), g == null || g(l, o), l || (j(!0), setTimeout(() => {
|
|
36
38
|
j(!1);
|
|
37
39
|
}, 0));
|
|
38
|
-
}, Z = K(() =>
|
|
40
|
+
}, Z = K(() => pe(P, b, B), [P]), D = {
|
|
39
41
|
selectedRowKeys: c,
|
|
40
|
-
onSelect: (
|
|
41
|
-
if (
|
|
42
|
-
c.push(t
|
|
42
|
+
onSelect: (l, o) => {
|
|
43
|
+
if (o)
|
|
44
|
+
c.push(l[t.value]), r.push(l), u(c, r);
|
|
43
45
|
else {
|
|
44
|
-
const p =
|
|
45
|
-
(
|
|
46
|
+
const p = r.filter(
|
|
47
|
+
(d) => d[t.value] !== l[t.value]
|
|
46
48
|
);
|
|
47
|
-
|
|
48
|
-
p.map((
|
|
49
|
+
u(
|
|
50
|
+
p.map((d) => d[t.value]),
|
|
49
51
|
p
|
|
50
52
|
);
|
|
51
53
|
}
|
|
52
54
|
},
|
|
53
|
-
onSelectAll: (
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
const i = c.concat(
|
|
57
|
-
|
|
55
|
+
onSelectAll: (l, o, p) => {
|
|
56
|
+
const d = p.map((i) => i[t.value]);
|
|
57
|
+
if (l) {
|
|
58
|
+
const i = c.concat(d), S = r.concat(p);
|
|
59
|
+
u(i, S);
|
|
58
60
|
} else {
|
|
59
|
-
const i = c == null ? void 0 : c.filter((x) => !
|
|
61
|
+
const i = c == null ? void 0 : c.filter((x) => !d.includes(x)), S = /* @__PURE__ */ new Map();
|
|
60
62
|
p.forEach((x) => {
|
|
61
|
-
S.set(x[
|
|
63
|
+
S.set(x[t.value], x);
|
|
62
64
|
});
|
|
63
|
-
const
|
|
64
|
-
(x) => !S.has(x[
|
|
65
|
+
const te = r == null ? void 0 : r.filter(
|
|
66
|
+
(x) => !S.has(x[t.value])
|
|
65
67
|
);
|
|
66
|
-
|
|
68
|
+
u(i, te);
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
|
-
}, V =
|
|
70
|
-
|
|
71
|
+
}, V = le(() => de(t.items, m), [t.items]), N = (l, o) => /* @__PURE__ */ e.jsxs("span", { style: { color: s.colorText }, children: [
|
|
72
|
+
l[0],
|
|
71
73
|
" ",
|
|
72
|
-
/* @__PURE__ */ e.jsx("span", { style: { color:
|
|
74
|
+
/* @__PURE__ */ e.jsx("span", { style: { color: s.colorPrimary, fontWeight: 600 }, children: o }),
|
|
73
75
|
" ",
|
|
74
|
-
|
|
75
|
-
] }),
|
|
76
|
-
const
|
|
77
|
-
const p =
|
|
78
|
-
(i) => i[
|
|
79
|
-
),
|
|
80
|
-
(i) => i ===
|
|
76
|
+
l[1]
|
|
77
|
+
] }), ee = () => {
|
|
78
|
+
const l = (o) => {
|
|
79
|
+
const p = r.findIndex(
|
|
80
|
+
(i) => i[t.value] === o[t.value]
|
|
81
|
+
), d = c.findIndex(
|
|
82
|
+
(i) => i === o[t.value]
|
|
81
83
|
);
|
|
82
|
-
|
|
84
|
+
r.splice(p, 1), c.splice(d, 1), u(c, r);
|
|
83
85
|
};
|
|
84
86
|
return /* @__PURE__ */ e.jsxs(
|
|
85
|
-
|
|
87
|
+
_,
|
|
86
88
|
{
|
|
87
89
|
direction: "vertical",
|
|
88
90
|
style: {
|
|
89
91
|
width: "calc(100% - 5px)",
|
|
90
92
|
paddingRight: 5,
|
|
91
|
-
maxHeight:
|
|
93
|
+
maxHeight: r.length ? 220 : "auto",
|
|
92
94
|
overflow: "hidden auto"
|
|
93
95
|
},
|
|
94
96
|
children: [
|
|
95
|
-
|
|
96
|
-
|
|
97
|
+
r.map((o) => /* @__PURE__ */ e.jsxs(
|
|
98
|
+
ne,
|
|
97
99
|
{
|
|
98
100
|
justify: "space-between",
|
|
99
101
|
style: {
|
|
100
102
|
padding: "4px 8px",
|
|
101
|
-
border: `1px solid ${
|
|
103
|
+
border: `1px solid ${s.colorBorder}`,
|
|
102
104
|
backgroundColor: "#f5f5f5",
|
|
103
|
-
borderRadius:
|
|
105
|
+
borderRadius: s.borderRadiusSM,
|
|
104
106
|
overflow: "hidden"
|
|
105
107
|
},
|
|
106
108
|
children: [
|
|
107
|
-
/* @__PURE__ */ e.jsx("div", { style: { width: "calc(100% - 15px)" }, children: /* @__PURE__ */ e.jsx(
|
|
109
|
+
/* @__PURE__ */ e.jsx("div", { style: { width: "calc(100% - 15px)" }, children: /* @__PURE__ */ e.jsx(xe, { value: o[t.label] }) }),
|
|
108
110
|
/* @__PURE__ */ e.jsx(
|
|
109
|
-
|
|
111
|
+
Se,
|
|
110
112
|
{
|
|
111
113
|
style: {
|
|
112
|
-
color:
|
|
114
|
+
color: s.colorError,
|
|
113
115
|
fontSize: 13,
|
|
114
116
|
cursor: "pointer"
|
|
115
117
|
},
|
|
116
|
-
onClick: () =>
|
|
118
|
+
onClick: () => l(o)
|
|
117
119
|
}
|
|
118
120
|
)
|
|
119
121
|
]
|
|
120
122
|
},
|
|
121
|
-
|
|
123
|
+
o[t.value]
|
|
122
124
|
)),
|
|
123
|
-
!
|
|
125
|
+
!r.length && /* @__PURE__ */ e.jsx(G, { image: G.PRESENTED_IMAGE_SIMPLE })
|
|
124
126
|
]
|
|
125
127
|
}
|
|
126
128
|
);
|
|
127
129
|
}, n = K(() => ue(w, E), [w, E]);
|
|
128
|
-
return
|
|
129
|
-
|
|
130
|
-
}, [R,
|
|
130
|
+
return oe(() => {
|
|
131
|
+
J(R ?? []), Q(z ?? []);
|
|
132
|
+
}, [R, z]), /* @__PURE__ */ e.jsxs(f, { gutter: n.gutter, children: [
|
|
131
133
|
/* @__PURE__ */ e.jsx(a, { span: n.left.span, children: w && I && I(M, v == null ? void 0 : v.height) }),
|
|
132
|
-
/* @__PURE__ */ e.jsx(a, { span: n.right.span, children: /* @__PURE__ */ e.jsxs(
|
|
133
|
-
/* @__PURE__ */ e.jsx(h, { className: "tableSelectPopupSearchForm", children: /* @__PURE__ */ e.jsx(
|
|
134
|
-
/* @__PURE__ */ e.jsx(a, { span: n.right.search, children: /* @__PURE__ */ e.jsx(h.Item, { children:
|
|
135
|
-
/* @__PURE__ */ e.jsx(a, { span: n.right.operation, children: /* @__PURE__ */ e.jsxs(
|
|
134
|
+
/* @__PURE__ */ e.jsx(a, { span: n.right.span, children: /* @__PURE__ */ e.jsxs(_, { direction: "vertical", size: M, style: { width: "100%" }, children: [
|
|
135
|
+
/* @__PURE__ */ e.jsx(h, { className: "tableSelectPopupSearchForm", children: /* @__PURE__ */ e.jsx(f, { gutter: [16, 16], children: /* @__PURE__ */ e.jsx(a, { span: 24, children: /* @__PURE__ */ e.jsxs(f, { justify: "space-between", gutter: [16, 16], children: [
|
|
136
|
+
/* @__PURE__ */ e.jsx(a, { span: n.right.search, children: /* @__PURE__ */ e.jsx(h.Item, { children: $ }) }),
|
|
137
|
+
/* @__PURE__ */ e.jsx(a, { span: n.right.operation, children: /* @__PURE__ */ e.jsxs(f, { justify: "end", gutter: 8, children: [
|
|
136
138
|
/* @__PURE__ */ e.jsx(a, { span: n.right.toolTagSelect, children: /* @__PURE__ */ e.jsx(h.Item, { children: /* @__PURE__ */ e.jsx(
|
|
137
|
-
|
|
139
|
+
A,
|
|
138
140
|
{
|
|
139
141
|
allowClear: !0,
|
|
140
142
|
className: "tableSelectPopupToolTagSelect",
|
|
141
143
|
style: {
|
|
142
144
|
width: "100%",
|
|
143
|
-
"--toolTagSelect-color": m ?
|
|
145
|
+
"--toolTagSelect-color": m ? s.colorTextDisabled : s.colorText
|
|
144
146
|
},
|
|
145
147
|
placeholder: "常用标签",
|
|
146
148
|
showSearch: !1,
|
|
147
149
|
disabled: m,
|
|
148
|
-
options:
|
|
150
|
+
options: q,
|
|
149
151
|
value: U,
|
|
150
152
|
onChange: Y,
|
|
151
153
|
onDropdownVisibleChange: j
|
|
@@ -153,40 +155,40 @@ function Ee({
|
|
|
153
155
|
) }) }),
|
|
154
156
|
/* @__PURE__ */ e.jsx(a, { span: n.right.totalSelect, children: /* @__PURE__ */ e.jsx(h.Item, { children: /* @__PURE__ */ e.jsxs("div", { className: "tableSelectPopupTotalSelect", children: [
|
|
155
157
|
/* @__PURE__ */ e.jsx(
|
|
156
|
-
|
|
158
|
+
A,
|
|
157
159
|
{
|
|
158
160
|
style: { width: "100%" },
|
|
159
161
|
mode: "multiple",
|
|
160
162
|
placeholder: "",
|
|
161
163
|
showSearch: !1,
|
|
162
|
-
options:
|
|
164
|
+
options: r,
|
|
163
165
|
value: c,
|
|
164
|
-
fieldNames:
|
|
166
|
+
fieldNames: t,
|
|
165
167
|
popupClassName: "tableSelectPopupTotalPopup",
|
|
166
|
-
dropdownRender:
|
|
168
|
+
dropdownRender: ee,
|
|
167
169
|
tagRender: () => /* @__PURE__ */ e.jsx(e.Fragment, {}),
|
|
168
170
|
onDropdownVisibleChange: j
|
|
169
171
|
}
|
|
170
172
|
),
|
|
171
|
-
/* @__PURE__ */ e.jsx("div", { className: "tableSelectPopupTotalSelectTip", children:
|
|
173
|
+
/* @__PURE__ */ e.jsx("div", { className: "tableSelectPopupTotalSelectTip", children: N(
|
|
172
174
|
["已选择", "条数据"],
|
|
173
175
|
c.length || 0
|
|
174
176
|
) })
|
|
175
177
|
] }) }) }),
|
|
176
178
|
/* @__PURE__ */ e.jsx(a, { span: n.right.button, children: /* @__PURE__ */ e.jsx(
|
|
177
|
-
|
|
179
|
+
H,
|
|
178
180
|
{
|
|
179
181
|
type: "primary",
|
|
180
182
|
danger: !0,
|
|
181
|
-
onClick: () =>
|
|
183
|
+
onClick: () => u([], [], "clear"),
|
|
182
184
|
children: "清空"
|
|
183
185
|
}
|
|
184
186
|
) }),
|
|
185
187
|
/* @__PURE__ */ e.jsx(a, { span: n.right.button, children: /* @__PURE__ */ e.jsx(
|
|
186
|
-
|
|
188
|
+
H,
|
|
187
189
|
{
|
|
188
190
|
type: "primary",
|
|
189
|
-
onClick: () =>
|
|
191
|
+
onClick: () => u([], [], "confirm"),
|
|
190
192
|
children: "确认"
|
|
191
193
|
}
|
|
192
194
|
) })
|
|
@@ -195,34 +197,34 @@ function Ee({
|
|
|
195
197
|
/* @__PURE__ */ e.jsx(
|
|
196
198
|
"div",
|
|
197
199
|
{
|
|
198
|
-
ref:
|
|
199
|
-
...
|
|
200
|
+
ref: k,
|
|
201
|
+
...y && {
|
|
200
202
|
className: "pointerMouse",
|
|
201
|
-
onClick: () =>
|
|
203
|
+
onClick: () => O()
|
|
202
204
|
},
|
|
203
205
|
children: /* @__PURE__ */ e.jsx(
|
|
204
206
|
se,
|
|
205
207
|
{
|
|
206
|
-
spinning:
|
|
207
|
-
indicator: /* @__PURE__ */ e.jsx(
|
|
208
|
-
tip: /* @__PURE__ */ e.jsx(
|
|
208
|
+
spinning: y,
|
|
209
|
+
indicator: /* @__PURE__ */ e.jsx(je, {}),
|
|
210
|
+
tip: /* @__PURE__ */ e.jsx(ce.Text, { type: "danger", children: "加载失败,点击重试" }),
|
|
209
211
|
children: /* @__PURE__ */ e.jsx(
|
|
210
|
-
|
|
212
|
+
ae,
|
|
211
213
|
{
|
|
212
|
-
rowKey:
|
|
214
|
+
rowKey: t.value,
|
|
213
215
|
loading: m,
|
|
214
216
|
bordered: !0,
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
tableLayout: "fixed",
|
|
218
|
+
scroll: { x: 1, y: 400 },
|
|
219
|
+
showPagination: !1,
|
|
220
|
+
showTableTool: !1,
|
|
219
221
|
rowSelection: D,
|
|
220
222
|
columns: Z,
|
|
221
|
-
dataSource:
|
|
222
|
-
...
|
|
223
|
+
dataSource: b,
|
|
224
|
+
...y && { className: "loadingFailedTable" },
|
|
223
225
|
...V(),
|
|
224
226
|
style: {
|
|
225
|
-
"--tableBody-bootomBorderColor": ((F =
|
|
227
|
+
"--tableBody-bootomBorderColor": ((F = s.Table) == null ? void 0 : F.borderColor) || s.colorBorderSecondary
|
|
226
228
|
}
|
|
227
229
|
}
|
|
228
230
|
)
|
|
@@ -231,24 +233,21 @@ function Ee({
|
|
|
231
233
|
}
|
|
232
234
|
),
|
|
233
235
|
/* @__PURE__ */ e.jsx(h, { children: /* @__PURE__ */ e.jsx(h.Item, { style: { marginBottom: 0 }, children: /* @__PURE__ */ e.jsx(
|
|
234
|
-
|
|
236
|
+
ie,
|
|
235
237
|
{
|
|
236
238
|
disabled: m,
|
|
237
239
|
className: "tableSelectPopupTablePagination",
|
|
238
240
|
size: "small",
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
total: O,
|
|
245
|
-
onChange: B,
|
|
246
|
-
onShowSizeChange: (t, l) => B(1, l)
|
|
241
|
+
enableControl: !0,
|
|
242
|
+
pagination: B,
|
|
243
|
+
total: L,
|
|
244
|
+
dataSource: b,
|
|
245
|
+
paginationEmit: W
|
|
247
246
|
}
|
|
248
247
|
) }) })
|
|
249
248
|
] }) })
|
|
250
249
|
] });
|
|
251
250
|
}
|
|
252
251
|
export {
|
|
253
|
-
|
|
252
|
+
ke as default
|
|
254
253
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { Input as
|
|
3
|
-
import
|
|
1
|
+
import { j as i } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { Input as l } from "antd";
|
|
3
|
+
import m from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
4
4
|
import "./index.less.mjs";
|
|
5
|
-
const { TextArea: n } =
|
|
5
|
+
const { TextArea: n } = l, u = ({
|
|
6
6
|
maxRows: t = 1,
|
|
7
7
|
minRows: o,
|
|
8
8
|
bold: e,
|
|
@@ -15,15 +15,15 @@ const { TextArea: n } = m, u = ({
|
|
|
15
15
|
fontWeight: e
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
-
return /* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ i.jsx(
|
|
19
19
|
n,
|
|
20
20
|
{
|
|
21
|
-
className:
|
|
21
|
+
className: m("textBlock", r),
|
|
22
22
|
title: s,
|
|
23
23
|
value: s,
|
|
24
24
|
readOnly: !0,
|
|
25
25
|
size: "small",
|
|
26
|
-
|
|
26
|
+
variant: "borderless",
|
|
27
27
|
autoSize: {
|
|
28
28
|
minRows: o ?? t,
|
|
29
29
|
maxRows: t
|
|
@@ -10,8 +10,8 @@ export interface FieldNames {
|
|
|
10
10
|
}
|
|
11
11
|
/** 分页属性 */
|
|
12
12
|
export interface PaginationProps {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
page: number;
|
|
14
|
+
size: number;
|
|
15
15
|
}
|
|
16
16
|
/** 分页数据change事件 */
|
|
17
17
|
export type PaginationChangeEvent = (page: number, pageSize: number) => void;
|