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
|
@@ -29,7 +29,7 @@ function Z({
|
|
|
29
29
|
const [S, q] = o([]), [u, c] = o([]), [i, m] = o(!1), [z, G] = o(!1), H = () => {
|
|
30
30
|
c([]), e == null || e([], []);
|
|
31
31
|
}, I = (t, s, L) => {
|
|
32
|
-
L === "confirm"
|
|
32
|
+
L === "confirm" && (c([...s]), e == null || e([...t], [...s]), m(!1));
|
|
33
33
|
}, J = (t, s) => {
|
|
34
34
|
c(s), e == null || e(t, s);
|
|
35
35
|
}, K = (t) => {
|
|
@@ -1,112 +1,109 @@
|
|
|
1
1
|
import { j as e } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { useRef as re, useContext as
|
|
3
|
-
import { Row as y, Col as p, Space as
|
|
2
|
+
import { useRef as re, useContext as ne, useState as C, useCallback as ce, useMemo as F, useEffect as ie } from "react";
|
|
3
|
+
import { Row as y, Col as p, Space as H, Form as S, Select as O, Spin as ae, Typography as pe, Flex as ue, Empty as G } from "antd";
|
|
4
4
|
import de from "../../BitzPagination/index.mjs";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { getColumns as
|
|
5
|
+
import he from "../../BitzTable/index.mjs";
|
|
6
|
+
import q from "../../BitzButton/index.mjs";
|
|
7
|
+
import { getColumns as xe, getExpandable as me, getLayoutConfig as je } from "./getData.mjs";
|
|
8
8
|
import Se from "../TextBlock/index.mjs";
|
|
9
9
|
import fe from "../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
|
|
10
10
|
import be from "../../BitzTheme/index.mjs";
|
|
11
|
-
import
|
|
12
|
-
import { BitzConfigContext as
|
|
11
|
+
import ge from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
12
|
+
import { BitzConfigContext as ye } from "../../BitzConfigProvider/context.mjs";
|
|
13
13
|
import we from "../../BitzHighlight/index.mjs";
|
|
14
14
|
import "./index.less.mjs";
|
|
15
15
|
import Te from "../../../node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/InfoCircleOutlined.mjs";
|
|
16
16
|
import ve from "../../../node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/CloseOutlined.mjs";
|
|
17
17
|
function Ge({
|
|
18
|
-
columns:
|
|
19
|
-
tableData:
|
|
20
|
-
total:
|
|
18
|
+
columns: J,
|
|
19
|
+
tableData: w,
|
|
20
|
+
total: L,
|
|
21
21
|
loading: u,
|
|
22
|
-
loadingFailed:
|
|
23
|
-
loadAgain:
|
|
22
|
+
loadingFailed: b,
|
|
23
|
+
loadAgain: Q,
|
|
24
24
|
page: z,
|
|
25
|
-
onPageChange:
|
|
26
|
-
searchInput:
|
|
25
|
+
onPageChange: U,
|
|
26
|
+
searchInput: W,
|
|
27
27
|
showToolTagSelect: P,
|
|
28
|
-
toolTags:
|
|
29
|
-
onToolTagChange:
|
|
30
|
-
lrLayout:
|
|
28
|
+
toolTags: X,
|
|
29
|
+
onToolTagChange: T,
|
|
30
|
+
lrLayout: v,
|
|
31
31
|
parentRender: E,
|
|
32
32
|
keys: R,
|
|
33
33
|
rows: I,
|
|
34
34
|
fieldNames: t,
|
|
35
35
|
mode: k,
|
|
36
|
-
onChange:
|
|
37
|
-
onDropdownVisibleChange:
|
|
36
|
+
onChange: Y,
|
|
37
|
+
onDropdownVisibleChange: g
|
|
38
38
|
}) {
|
|
39
|
-
var
|
|
40
|
-
const
|
|
41
|
-
V(o),
|
|
42
|
-
|
|
39
|
+
var _, $, A;
|
|
40
|
+
const M = re(null), B = fe(M), { token: i } = be.useToken(), K = ((_ = i == null ? void 0 : i.BitzTableSelect) == null ? void 0 : _.tableSpaceBetweenPage) ?? 10, Z = (($ = ne(ye).TableSelect) == null ? void 0 : $.defaultSize) ?? "md", [c, d] = C([]), [l, h] = C([]), [D, V] = C(void 0), N = (o, s) => {
|
|
41
|
+
V(o), T == null || T(o, s), o || (g(!0), setTimeout(() => {
|
|
42
|
+
g(!1);
|
|
43
43
|
}, 0));
|
|
44
|
-
}, ee =
|
|
44
|
+
}, ee = xe(J, w, z), te = {
|
|
45
45
|
type: k === "single" ? "radio" : "checkbox",
|
|
46
|
-
selectedRowKeys:
|
|
46
|
+
selectedRowKeys: c,
|
|
47
47
|
...k === "single" ? {
|
|
48
48
|
onChange(o, s) {
|
|
49
|
-
d(o, s);
|
|
49
|
+
d(o), h(s);
|
|
50
50
|
}
|
|
51
51
|
} : {
|
|
52
52
|
onSelect: (o, s) => {
|
|
53
53
|
if (s) {
|
|
54
|
-
const
|
|
55
|
-
d(
|
|
54
|
+
const r = c.concat([o[t.value]]), n = l.concat([o]);
|
|
55
|
+
d(r), h(n);
|
|
56
56
|
} else {
|
|
57
|
-
const
|
|
58
|
-
(
|
|
59
|
-
);
|
|
60
|
-
d(
|
|
61
|
-
l.map((r) => r[t.value]),
|
|
62
|
-
l
|
|
57
|
+
const r = l.filter(
|
|
58
|
+
(n) => n[t.value] !== o[t.value]
|
|
63
59
|
);
|
|
60
|
+
d(r.map((n) => n[t.value])), h(r);
|
|
64
61
|
}
|
|
65
62
|
},
|
|
66
|
-
onSelectAll: (o, s,
|
|
67
|
-
const
|
|
63
|
+
onSelectAll: (o, s, r) => {
|
|
64
|
+
const n = r.map((x) => x[t.value]);
|
|
68
65
|
if (o) {
|
|
69
|
-
const x =
|
|
70
|
-
d(x, m);
|
|
66
|
+
const x = c.concat(n), m = l.concat(r);
|
|
67
|
+
d(x), h(m);
|
|
71
68
|
} else {
|
|
72
|
-
const x =
|
|
73
|
-
|
|
74
|
-
m.set(
|
|
69
|
+
const x = c == null ? void 0 : c.filter((j) => !n.includes(j)), m = /* @__PURE__ */ new Map();
|
|
70
|
+
r.forEach((j) => {
|
|
71
|
+
m.set(j[t.value], j);
|
|
75
72
|
});
|
|
76
|
-
const
|
|
77
|
-
(
|
|
73
|
+
const f = l == null ? void 0 : l.filter(
|
|
74
|
+
(j) => !m.has(j[t.value])
|
|
78
75
|
);
|
|
79
|
-
d(x,
|
|
76
|
+
d(x), h(f);
|
|
80
77
|
}
|
|
81
78
|
}
|
|
82
79
|
}
|
|
83
|
-
}, oe =
|
|
80
|
+
}, oe = ce(() => me(t.items, u), [t.items, u]), se = () => {
|
|
84
81
|
const o = (s) => {
|
|
85
|
-
const
|
|
86
|
-
(
|
|
82
|
+
const r = [...c], n = [...l], x = r.findIndex((f) => f === s[t.value]), m = n.findIndex(
|
|
83
|
+
(f) => f[t.value] === s[t.value]
|
|
87
84
|
);
|
|
88
|
-
|
|
85
|
+
n.splice(m, 1), r.splice(x, 1), d(r), h(n);
|
|
89
86
|
};
|
|
90
87
|
return /* @__PURE__ */ e.jsxs(
|
|
91
|
-
|
|
88
|
+
H,
|
|
92
89
|
{
|
|
93
90
|
direction: "vertical",
|
|
94
91
|
style: {
|
|
95
92
|
width: "calc(100% - 5px)",
|
|
96
93
|
paddingRight: 5,
|
|
97
|
-
maxHeight:
|
|
94
|
+
maxHeight: l.length ? 220 : "auto",
|
|
98
95
|
overflow: "hidden auto"
|
|
99
96
|
},
|
|
100
97
|
children: [
|
|
101
|
-
|
|
98
|
+
l.map((s) => /* @__PURE__ */ e.jsxs(
|
|
102
99
|
ue,
|
|
103
100
|
{
|
|
104
101
|
justify: "space-between",
|
|
105
102
|
style: {
|
|
106
103
|
padding: "4px 8px",
|
|
107
|
-
border: `1px solid ${
|
|
104
|
+
border: `1px solid ${i.colorBorder}`,
|
|
108
105
|
backgroundColor: "#f5f5f5",
|
|
109
|
-
borderRadius:
|
|
106
|
+
borderRadius: i.borderRadiusSM,
|
|
110
107
|
overflow: "hidden"
|
|
111
108
|
},
|
|
112
109
|
children: [
|
|
@@ -115,7 +112,7 @@ function Ge({
|
|
|
115
112
|
ve,
|
|
116
113
|
{
|
|
117
114
|
style: {
|
|
118
|
-
color:
|
|
115
|
+
color: i.colorError,
|
|
119
116
|
fontSize: 13,
|
|
120
117
|
cursor: "pointer"
|
|
121
118
|
},
|
|
@@ -126,81 +123,83 @@ function Ge({
|
|
|
126
123
|
},
|
|
127
124
|
s[t.value]
|
|
128
125
|
)),
|
|
129
|
-
!
|
|
126
|
+
!l.length && /* @__PURE__ */ e.jsx(G, { image: G.PRESENTED_IMAGE_SIMPLE })
|
|
130
127
|
]
|
|
131
128
|
}
|
|
132
129
|
);
|
|
133
|
-
}, a =
|
|
130
|
+
}, a = F(() => je(v, P), [v, P]), le = F(() => ge(
|
|
134
131
|
{ loadingTable: u },
|
|
135
|
-
{ loadingFailedTable:
|
|
132
|
+
{ loadingFailedTable: b },
|
|
136
133
|
"bitzSelectTable"
|
|
137
|
-
), [
|
|
134
|
+
), [b, u]);
|
|
138
135
|
return ie(() => {
|
|
139
|
-
|
|
136
|
+
d(R ?? []), h(I ?? []);
|
|
140
137
|
}, [R, I]), /* @__PURE__ */ e.jsxs(y, { gutter: a.gutter, children: [
|
|
141
|
-
/* @__PURE__ */ e.jsx(p, { span: a.left.span, children:
|
|
142
|
-
/* @__PURE__ */ e.jsx(p, { span: a.right.span, children: /* @__PURE__ */ e.jsxs(
|
|
143
|
-
/* @__PURE__ */ e.jsx(
|
|
144
|
-
/* @__PURE__ */ e.jsx(p, { span: a.right.search, children: /* @__PURE__ */ e.jsx(
|
|
138
|
+
/* @__PURE__ */ e.jsx(p, { span: a.left.span, children: v && E && E(K, B == null ? void 0 : B.height) }),
|
|
139
|
+
/* @__PURE__ */ e.jsx(p, { span: a.right.span, children: /* @__PURE__ */ e.jsxs(H, { direction: "vertical", size: K, style: { width: "100%" }, children: [
|
|
140
|
+
/* @__PURE__ */ e.jsx(S, { className: "tableSelectPopupSearchForm", children: /* @__PURE__ */ e.jsx(y, { gutter: [16, 16], children: /* @__PURE__ */ e.jsx(p, { span: 24, children: /* @__PURE__ */ e.jsxs(y, { justify: "space-between", gutter: [16, 16], children: [
|
|
141
|
+
/* @__PURE__ */ e.jsx(p, { span: a.right.search, children: /* @__PURE__ */ e.jsx(S.Item, { children: W }) }),
|
|
145
142
|
/* @__PURE__ */ e.jsx(p, { span: a.right.operation, children: /* @__PURE__ */ e.jsxs(y, { justify: "end", gutter: 8, children: [
|
|
146
|
-
/* @__PURE__ */ e.jsx(p, { span: a.right.toolTagSelect, children: /* @__PURE__ */ e.jsx(
|
|
147
|
-
|
|
143
|
+
/* @__PURE__ */ e.jsx(p, { span: a.right.toolTagSelect, children: /* @__PURE__ */ e.jsx(S.Item, { children: /* @__PURE__ */ e.jsx(
|
|
144
|
+
O,
|
|
148
145
|
{
|
|
149
146
|
allowClear: !0,
|
|
150
147
|
className: "tableSelectPopupToolTagSelect",
|
|
151
148
|
style: {
|
|
152
149
|
width: "100%",
|
|
153
|
-
"--toolTagSelect-color": u ?
|
|
150
|
+
"--toolTagSelect-color": u ? i.colorTextDisabled : i.colorText
|
|
154
151
|
},
|
|
155
152
|
placeholder: "常用标签",
|
|
156
153
|
showSearch: !1,
|
|
157
154
|
disabled: u,
|
|
158
|
-
options:
|
|
155
|
+
options: X,
|
|
159
156
|
value: D,
|
|
160
157
|
onChange: N,
|
|
161
|
-
onDropdownVisibleChange:
|
|
158
|
+
onDropdownVisibleChange: g
|
|
162
159
|
}
|
|
163
160
|
) }) }),
|
|
164
|
-
/* @__PURE__ */ e.jsx(p, { span: a.right.totalSelect, children: /* @__PURE__ */ e.jsx(
|
|
161
|
+
/* @__PURE__ */ e.jsx(p, { span: a.right.totalSelect, children: /* @__PURE__ */ e.jsx(S.Item, { children: /* @__PURE__ */ e.jsxs("div", { className: "tableSelectPopupTotalSelect", children: [
|
|
165
162
|
/* @__PURE__ */ e.jsx(
|
|
166
|
-
|
|
163
|
+
O,
|
|
167
164
|
{
|
|
168
165
|
style: { width: "100%" },
|
|
169
166
|
mode: "multiple",
|
|
170
167
|
placeholder: "",
|
|
171
168
|
showSearch: !1,
|
|
172
|
-
options:
|
|
173
|
-
value:
|
|
169
|
+
options: l,
|
|
170
|
+
value: c,
|
|
174
171
|
fieldNames: t,
|
|
175
172
|
popupClassName: "tableSelectPopupTotalPopup",
|
|
176
173
|
dropdownRender: se,
|
|
177
174
|
tagRender: () => /* @__PURE__ */ e.jsx(e.Fragment, {}),
|
|
178
|
-
onDropdownVisibleChange:
|
|
175
|
+
onDropdownVisibleChange: g
|
|
179
176
|
}
|
|
180
177
|
),
|
|
181
178
|
/* @__PURE__ */ e.jsx("div", { className: "tableSelectPopupTotalSelectTip", children: /* @__PURE__ */ e.jsx(
|
|
182
179
|
we,
|
|
183
180
|
{
|
|
184
181
|
highlightTag: "strong",
|
|
185
|
-
sourceString: `已选择 ${
|
|
186
|
-
keywords: `${
|
|
182
|
+
sourceString: `已选择 ${c.length || 0} 条数据`,
|
|
183
|
+
keywords: `${c.length || 0}`
|
|
187
184
|
}
|
|
188
185
|
) })
|
|
189
186
|
] }) }) }),
|
|
190
187
|
/* @__PURE__ */ e.jsx(p, { span: a.right.button, children: /* @__PURE__ */ e.jsx(
|
|
191
|
-
|
|
188
|
+
q,
|
|
192
189
|
{
|
|
193
190
|
type: "primary",
|
|
194
191
|
danger: !0,
|
|
195
|
-
onClick: () =>
|
|
192
|
+
onClick: () => {
|
|
193
|
+
d([]), h([]);
|
|
194
|
+
},
|
|
196
195
|
children: "清空"
|
|
197
196
|
}
|
|
198
197
|
) }),
|
|
199
198
|
/* @__PURE__ */ e.jsx(p, { span: a.right.button, children: /* @__PURE__ */ e.jsx(
|
|
200
|
-
|
|
199
|
+
q,
|
|
201
200
|
{
|
|
202
201
|
type: "primary",
|
|
203
|
-
onClick: () =>
|
|
202
|
+
onClick: () => Y(c, l, "confirm"),
|
|
204
203
|
children: "确认"
|
|
205
204
|
}
|
|
206
205
|
) })
|
|
@@ -209,21 +208,21 @@ function Ge({
|
|
|
209
208
|
/* @__PURE__ */ e.jsx(
|
|
210
209
|
"div",
|
|
211
210
|
{
|
|
212
|
-
ref:
|
|
213
|
-
...
|
|
211
|
+
ref: M,
|
|
212
|
+
...b && {
|
|
214
213
|
className: "pointerMouse",
|
|
215
|
-
onClick: () =>
|
|
214
|
+
onClick: () => Q()
|
|
216
215
|
},
|
|
217
216
|
children: /* @__PURE__ */ e.jsx(
|
|
218
217
|
ae,
|
|
219
218
|
{
|
|
220
|
-
spinning:
|
|
219
|
+
spinning: b,
|
|
221
220
|
indicator: /* @__PURE__ */ e.jsx(Te, {}),
|
|
222
221
|
tip: /* @__PURE__ */ e.jsx(pe.Text, { type: "danger", children: "加载失败,点击重试" }),
|
|
223
222
|
children: /* @__PURE__ */ e.jsx(
|
|
224
|
-
|
|
223
|
+
he,
|
|
225
224
|
{
|
|
226
|
-
size:
|
|
225
|
+
size: Z,
|
|
227
226
|
rowKey: t.value,
|
|
228
227
|
loading: u,
|
|
229
228
|
bordered: "row-column",
|
|
@@ -232,11 +231,11 @@ function Ge({
|
|
|
232
231
|
showTableTool: !1,
|
|
233
232
|
rowSelection: te,
|
|
234
233
|
columns: ee,
|
|
235
|
-
dataSource:
|
|
234
|
+
dataSource: w,
|
|
236
235
|
className: le,
|
|
237
236
|
...oe(),
|
|
238
237
|
style: {
|
|
239
|
-
"--tableBody-bootomBorderColor": ((
|
|
238
|
+
"--tableBody-bootomBorderColor": ((A = i.Table) == null ? void 0 : A.borderColor) || i.colorBorderSecondary
|
|
240
239
|
}
|
|
241
240
|
}
|
|
242
241
|
)
|
|
@@ -244,7 +243,7 @@ function Ge({
|
|
|
244
243
|
)
|
|
245
244
|
}
|
|
246
245
|
),
|
|
247
|
-
/* @__PURE__ */ e.jsx(
|
|
246
|
+
/* @__PURE__ */ e.jsx(S, { children: /* @__PURE__ */ e.jsx(S.Item, { style: { marginBottom: 0 }, children: /* @__PURE__ */ e.jsx(
|
|
248
247
|
de,
|
|
249
248
|
{
|
|
250
249
|
disabled: u,
|
|
@@ -252,9 +251,9 @@ function Ge({
|
|
|
252
251
|
size: "small",
|
|
253
252
|
enableControl: !0,
|
|
254
253
|
pagination: z,
|
|
255
|
-
total:
|
|
256
|
-
dataSource:
|
|
257
|
-
paginationEmit:
|
|
254
|
+
total: L,
|
|
255
|
+
dataSource: w,
|
|
256
|
+
paginationEmit: U
|
|
258
257
|
}
|
|
259
258
|
) }) })
|
|
260
259
|
] }) })
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { j as x } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Select as
|
|
4
|
-
import
|
|
5
|
-
import { isNotFalsy as
|
|
6
|
-
function
|
|
2
|
+
import { useState as o, useEffect as b, useMemo as W } from "react";
|
|
3
|
+
import { Select as X } from "antd";
|
|
4
|
+
import Y from "../SelectPopup/index.mjs";
|
|
5
|
+
import { isNotFalsy as Z } from "../utils.mjs";
|
|
6
|
+
function R({
|
|
7
7
|
value: S,
|
|
8
8
|
options: s,
|
|
9
9
|
columns: j,
|
|
@@ -17,43 +17,45 @@ function P({
|
|
|
17
17
|
searchInput: N,
|
|
18
18
|
showToolTagSelect: T,
|
|
19
19
|
toolTags: F,
|
|
20
|
-
onToolTagChange:
|
|
21
|
-
lrLayout:
|
|
22
|
-
parentRender:
|
|
23
|
-
mode:
|
|
24
|
-
placeholder:
|
|
20
|
+
onToolTagChange: M,
|
|
21
|
+
lrLayout: O,
|
|
22
|
+
parentRender: V,
|
|
23
|
+
mode: a = "single",
|
|
24
|
+
placeholder: q = "请选择",
|
|
25
25
|
fieldNames: p,
|
|
26
|
-
onChange:
|
|
26
|
+
onChange: t,
|
|
27
27
|
onPopupVisibleChange: f,
|
|
28
|
-
...
|
|
28
|
+
...z
|
|
29
29
|
}) {
|
|
30
|
-
const [
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
!i &&
|
|
30
|
+
const [r, A] = o(), [u, c] = o(), [i, m] = o(!1), [G, H] = o(!1), I = () => {
|
|
31
|
+
c([]), t == null || t([], []);
|
|
32
|
+
}, J = (e, l, U) => {
|
|
33
|
+
U === "confirm" && (c(l), t == null || t(e, l), m(!1));
|
|
34
|
+
}, K = (e, l) => {
|
|
35
|
+
c(l), t == null || t(e, l);
|
|
36
|
+
}, L = (e) => {
|
|
37
|
+
!i && e && m(!0), !G && !e && i && m(!1), f == null || f(e);
|
|
38
38
|
};
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
b(() => {
|
|
40
|
+
A(S);
|
|
41
41
|
}, [S]), b(() => {
|
|
42
|
-
s != null && s.length &&
|
|
43
|
-
}, [s])
|
|
44
|
-
|
|
42
|
+
s != null && s.length && c(s);
|
|
43
|
+
}, [s]);
|
|
44
|
+
const Q = W(() => Z(r) ? [r] : [], [r]);
|
|
45
|
+
return /* @__PURE__ */ x.jsx(
|
|
46
|
+
X,
|
|
45
47
|
{
|
|
46
48
|
allowClear: !0,
|
|
47
49
|
className: "tableSelectBlock",
|
|
48
|
-
value:
|
|
50
|
+
value: r,
|
|
49
51
|
options: u,
|
|
50
52
|
fieldNames: p,
|
|
51
53
|
showSearch: !1,
|
|
52
54
|
open: i,
|
|
53
|
-
placeholder:
|
|
55
|
+
placeholder: q,
|
|
54
56
|
popupClassName: "tableSelectPopupBlock",
|
|
55
57
|
dropdownRender: () => /* @__PURE__ */ x.jsx(
|
|
56
|
-
|
|
58
|
+
Y,
|
|
57
59
|
{
|
|
58
60
|
columns: j,
|
|
59
61
|
tableData: k,
|
|
@@ -64,26 +66,26 @@ function P({
|
|
|
64
66
|
loading: w,
|
|
65
67
|
loadingFailed: y,
|
|
66
68
|
loadAgain: B,
|
|
67
|
-
keys:
|
|
69
|
+
keys: Q,
|
|
68
70
|
rows: u,
|
|
69
71
|
fieldNames: p,
|
|
70
|
-
onChange:
|
|
71
|
-
onDropdownVisibleChange:
|
|
72
|
+
onChange: J,
|
|
73
|
+
onDropdownVisibleChange: H,
|
|
72
74
|
showToolTagSelect: T,
|
|
73
75
|
toolTags: F,
|
|
74
|
-
onToolTagChange:
|
|
75
|
-
lrLayout:
|
|
76
|
-
parentRender:
|
|
77
|
-
mode:
|
|
76
|
+
onToolTagChange: M,
|
|
77
|
+
lrLayout: O,
|
|
78
|
+
parentRender: V,
|
|
79
|
+
mode: a
|
|
78
80
|
}
|
|
79
81
|
),
|
|
80
|
-
onClear:
|
|
81
|
-
onDropdownVisibleChange:
|
|
82
|
-
onChange:
|
|
83
|
-
...
|
|
82
|
+
onClear: I,
|
|
83
|
+
onDropdownVisibleChange: L,
|
|
84
|
+
onChange: K,
|
|
85
|
+
...z
|
|
84
86
|
}
|
|
85
87
|
);
|
|
86
88
|
}
|
|
87
89
|
export {
|
|
88
|
-
|
|
90
|
+
R as default
|
|
89
91
|
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { j as t } from "../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import z from "../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
3
|
+
import k from "../../node_modules/.store/antd@5.17.3/node_modules/antd/es/typography/hooks/useCopyClick.mjs";
|
|
4
|
+
import { useRef as r, useState as N, useMemo as T } from "react";
|
|
5
|
+
import { theme as v } from "antd";
|
|
6
|
+
import { isNotFalsly as m, defaultValue as O } from "./utils.mjs";
|
|
7
|
+
import R from "../BitzTooltip/index.mjs";
|
|
8
|
+
import "./index.less.mjs";
|
|
9
|
+
import W from "../../node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/CopyOutlined.mjs";
|
|
10
|
+
import b from "../../node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/CheckOutlined.mjs";
|
|
11
|
+
const q = ({ text: e, className: p, style: d }) => {
|
|
12
|
+
const { token: s } = v.useToken(), i = r(null), n = r(null), l = r(null), [h, c] = N(!1), f = (j) => {
|
|
13
|
+
var a, u;
|
|
14
|
+
if (m(e))
|
|
15
|
+
if (j) {
|
|
16
|
+
const C = (a = n.current) == null ? void 0 : a.offsetWidth;
|
|
17
|
+
((u = l.current) == null ? void 0 : u.offsetWidth) > C && c(!0);
|
|
18
|
+
} else
|
|
19
|
+
c(!1);
|
|
20
|
+
}, { copied: x, onClick: y } = k({
|
|
21
|
+
copyConfig: { text: e }
|
|
22
|
+
}), o = T(() => m(e), [e]);
|
|
23
|
+
return /* @__PURE__ */ t.jsx(R, { open: h, wrapper: i.current, tip: e, children: /* @__PURE__ */ t.jsxs(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
ref: i,
|
|
27
|
+
onMouseOver: () => f(!0),
|
|
28
|
+
onMouseOut: () => f(!1),
|
|
29
|
+
style: { width: "100%", position: "relative", ...d },
|
|
30
|
+
className: z("bitzTextBlock", p),
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ t.jsx("span", { ref: n, className: "bitzTextContent", children: o ? e : O }),
|
|
33
|
+
o && /* @__PURE__ */ t.jsx(
|
|
34
|
+
"span",
|
|
35
|
+
{
|
|
36
|
+
ref: l,
|
|
37
|
+
tabIndex: -1,
|
|
38
|
+
"aria-hidden": "true",
|
|
39
|
+
className: "bitzMeasureContent",
|
|
40
|
+
children: e
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
o && /* @__PURE__ */ t.jsx("div", { className: "copyIcon", style: { color: s.colorPrimary }, children: x ? /* @__PURE__ */ t.jsx(
|
|
44
|
+
b,
|
|
45
|
+
{
|
|
46
|
+
style: {
|
|
47
|
+
fontSize: "inherit",
|
|
48
|
+
color: s.colorSuccess
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
) : /* @__PURE__ */ t.jsx(
|
|
52
|
+
W,
|
|
53
|
+
{
|
|
54
|
+
onClick: y,
|
|
55
|
+
style: { fontSize: "inherit" }
|
|
56
|
+
}
|
|
57
|
+
) })
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
) });
|
|
61
|
+
};
|
|
62
|
+
export {
|
|
63
|
+
q as default
|
|
64
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CSSProperties, FC, ReactNode } from 'react';
|
|
2
|
+
type PlacementType = 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
|
|
3
|
+
type TriggerType = 'hover' | 'click' | 'focus';
|
|
4
|
+
interface BitzTooltiplProps {
|
|
5
|
+
tip?: ReactNode;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
wrapper?: HTMLDivElement | null;
|
|
8
|
+
defaultOpen?: boolean;
|
|
9
|
+
open?: boolean;
|
|
10
|
+
placement?: PlacementType;
|
|
11
|
+
trigger?: TriggerType;
|
|
12
|
+
overlayClassName?: string;
|
|
13
|
+
overlayStyle?: CSSProperties;
|
|
14
|
+
getContainer?: (node: HTMLElement) => HTMLElement;
|
|
15
|
+
}
|
|
16
|
+
declare const BitzTooltip: FC<BitzTooltiplProps>;
|
|
17
|
+
export default BitzTooltip;
|