react-toolkits 0.8.21 → 0.8.23
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/CHANGELOG.md +12 -0
- package/lib/{index-MzGlzyfE.chunk.js → index-4nXVJ9ii.chunk.js} +78 -77
- package/lib/{index-EAawrEpf.chunk.js → index-AkY1QPaq.chunk.js} +1 -1
- package/lib/{index-ZQhZn-uq.chunk.js → index-FCC75JuX.chunk.js} +3 -3
- package/lib/{index-2I_COrHX.chunk.js → index-Jf-VYQNs.chunk.js} +888 -860
- package/lib/{index-_CFeMHGZ.chunk.js → index-b_N_y6ns.chunk.js} +2 -2
- package/lib/index-vgp1WaSO.chunk.js +189 -0
- package/lib/index.d.ts +29 -16
- package/lib/index.js +26 -24
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/lib/index-iAvVdN4q.chunk.js +0 -187
package/CHANGELOG.md
CHANGED
|
@@ -1,63 +1,64 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { App as
|
|
3
|
-
import { p as
|
|
1
|
+
import { A as O, _ as T, c as N, d as _, u as y, a as b, j as e, P as j, r as z, H as P, Q as $, b as S } from "./index-Jf-VYQNs.chunk.js";
|
|
2
|
+
import { App as f, Space as F, Card as G, Form as g, Input as L } from "antd";
|
|
3
|
+
import { p as A } from "./immer-BLf7GM7E.chunk.js";
|
|
4
4
|
import { Link as B } from "react-router-dom";
|
|
5
|
-
import { P as
|
|
6
|
-
import { d as E, e as V, f as q } from "./index-
|
|
7
|
-
import * as
|
|
5
|
+
import { P as k } from "./index-b_N_y6ns.chunk.js";
|
|
6
|
+
import { d as E, e as V, f as q } from "./index-AkY1QPaq.chunk.js";
|
|
7
|
+
import * as v from "react";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
var D = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M892 772h-80v-80c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v80h-80c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h80v80c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-80h80c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM373.5 498.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.8-1.7-203.2 89.2-203.2 200 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.8-1.1 6.4-4.8 5.9-8.8zM824 472c0-109.4-87.9-198.3-196.9-200C516.3 270.3 424 361.2 424 472c0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C357 742.6 326 814.8 324 891.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5C505.8 695.7 563 672 624 672c110.4 0 200-89.5 200-200zm-109.5 90.5C690.3 586.7 658.2 600 624 600s-66.3-13.3-90.5-37.5a127.26 127.26 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4-.1 34.2-13.4 66.3-37.6 90.5z" } }] }, name: "usergroup-add", theme: "outlined" };
|
|
10
|
-
const
|
|
11
|
-
var
|
|
12
|
-
return /* @__PURE__ */
|
|
10
|
+
const Q = D;
|
|
11
|
+
var I = function(o, a) {
|
|
12
|
+
return /* @__PURE__ */ v.createElement(O, T({}, o, {
|
|
13
13
|
ref: a,
|
|
14
|
-
icon:
|
|
14
|
+
icon: Q
|
|
15
15
|
}));
|
|
16
16
|
};
|
|
17
|
-
process.env.NODE_ENV !== "production" && (
|
|
18
|
-
const
|
|
19
|
-
const { message: c } =
|
|
17
|
+
process.env.NODE_ENV !== "production" && (I.displayName = "UsergroupAddOutlined");
|
|
18
|
+
const H = /* @__PURE__ */ v.forwardRef(I), h = "/api/usystem/role/list", K = () => {
|
|
19
|
+
const { message: c } = f.useApp(), { setPayload: o } = y(), a = V(), n = b(), r = async (l) => {
|
|
20
20
|
await a.trigger({
|
|
21
21
|
name: `role_${l.name}`,
|
|
22
22
|
permissions: l.permissions
|
|
23
|
-
}),
|
|
23
|
+
}), o(h, { page: 1 }), c.success(n("RoleList.createSuccessfully"));
|
|
24
24
|
};
|
|
25
|
-
return
|
|
26
|
-
title:
|
|
25
|
+
return S({
|
|
26
|
+
title: n("RoleList.createTitle"),
|
|
27
27
|
width: "50vw",
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
/* @__PURE__ */ e.jsx(
|
|
28
|
+
layout: "vertical",
|
|
29
|
+
content: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
30
|
+
/* @__PURE__ */ e.jsx(g.Item, { label: n("global.name"), name: "name", rules: [{ required: !0 }], children: /* @__PURE__ */ e.jsx(L, { addonBefore: "role_" }) }),
|
|
31
|
+
/* @__PURE__ */ e.jsx(g.Item, { name: "permissions", children: /* @__PURE__ */ e.jsx(k, {}) })
|
|
31
32
|
] }),
|
|
32
|
-
onConfirm:
|
|
33
|
+
onConfirm: r
|
|
33
34
|
});
|
|
34
35
|
}, J = () => {
|
|
35
|
-
const { message: c } =
|
|
36
|
-
return
|
|
37
|
-
title:
|
|
36
|
+
const { message: c } = f.useApp(), { mutate: o } = y(), a = q(), n = b();
|
|
37
|
+
return S({
|
|
38
|
+
title: n("RoleList.updateTitle"),
|
|
38
39
|
width: "50vw",
|
|
39
|
-
content:
|
|
40
|
-
/* @__PURE__ */ e.jsx(
|
|
41
|
-
/* @__PURE__ */ e.jsx(
|
|
40
|
+
content: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
41
|
+
/* @__PURE__ */ e.jsx(g.Item, { label: n("global.name"), name: "name", rules: [{ required: !0 }], children: /* @__PURE__ */ e.jsx(L, { readOnly: !0, addonBefore: "role_" }) }),
|
|
42
|
+
/* @__PURE__ */ e.jsx(g.Item, { name: "permissions", children: /* @__PURE__ */ e.jsx(k, {}) })
|
|
42
43
|
] }),
|
|
43
|
-
onConfirm: async (
|
|
44
|
+
onConfirm: async (r, l) => {
|
|
44
45
|
await a.trigger({
|
|
45
|
-
id:
|
|
46
|
-
name: `role_${
|
|
47
|
-
permissions:
|
|
48
|
-
}),
|
|
46
|
+
id: l.id,
|
|
47
|
+
name: `role_${r.name}`,
|
|
48
|
+
permissions: r.permissions
|
|
49
|
+
}), o(
|
|
49
50
|
h,
|
|
50
|
-
(x) =>
|
|
51
|
-
var
|
|
52
|
-
const
|
|
53
|
-
|
|
51
|
+
(x) => A(x, (m) => {
|
|
52
|
+
var p;
|
|
53
|
+
const u = (p = m == null ? void 0 : m.dataSource) == null ? void 0 : p.find((t) => t.id === l.id);
|
|
54
|
+
u && (u.permissions = r.permissions);
|
|
54
55
|
}),
|
|
55
56
|
{ revalidate: !1 }
|
|
56
|
-
), c.success(
|
|
57
|
+
), c.success(n("RoleList.updateSuccessfully"));
|
|
57
58
|
}
|
|
58
59
|
});
|
|
59
|
-
},
|
|
60
|
-
const { accessible: c } =
|
|
60
|
+
}, ie = () => {
|
|
61
|
+
const { accessible: c } = N("200005", !0), { modal: o, message: a } = f.useApp(), { usePermissionApiV2: n } = _(), r = E(), { mutate: l } = y(), { show: x, modal: m } = K(), { show: u, modal: p } = J(), t = b(), M = [
|
|
61
62
|
{
|
|
62
63
|
title: t("global.name"),
|
|
63
64
|
key: "name",
|
|
@@ -79,7 +80,7 @@ const Q = /* @__PURE__ */ I.forwardRef(U), h = "/api/usystem/role/list", K = ()
|
|
|
79
80
|
title: t("global.operation"),
|
|
80
81
|
width: 150,
|
|
81
82
|
align: "center",
|
|
82
|
-
render: (s) => /* @__PURE__ */ e.jsxs(
|
|
83
|
+
render: (s) => /* @__PURE__ */ e.jsxs(F, { size: "small", children: [
|
|
83
84
|
/* @__PURE__ */ e.jsx(
|
|
84
85
|
j,
|
|
85
86
|
{
|
|
@@ -88,17 +89,17 @@ const Q = /* @__PURE__ */ I.forwardRef(U), h = "/api/usystem/role/list", K = ()
|
|
|
88
89
|
size: "small",
|
|
89
90
|
type: "link",
|
|
90
91
|
onClick: async () => {
|
|
91
|
-
const { data:
|
|
92
|
-
`/api/usystem/role/info${
|
|
92
|
+
const { data: i } = await z(
|
|
93
|
+
`/api/usystem/role/info${n ? "V2" : ""}?name=${s.name}`,
|
|
93
94
|
{ isGlobalNS: !0 }
|
|
94
95
|
);
|
|
95
96
|
u({
|
|
96
97
|
initialValues: {
|
|
97
|
-
permissions:
|
|
98
|
-
name:
|
|
98
|
+
permissions: i == null ? void 0 : i.permissions,
|
|
99
|
+
name: i == null ? void 0 : i.name.replace(/^role_/, "")
|
|
99
100
|
},
|
|
100
101
|
extraValues: {
|
|
101
|
-
id:
|
|
102
|
+
id: i == null ? void 0 : i.id
|
|
102
103
|
}
|
|
103
104
|
});
|
|
104
105
|
},
|
|
@@ -114,17 +115,17 @@ const Q = /* @__PURE__ */ I.forwardRef(U), h = "/api/usystem/role/list", K = ()
|
|
|
114
115
|
size: "small",
|
|
115
116
|
type: "link",
|
|
116
117
|
onClick: () => {
|
|
117
|
-
|
|
118
|
+
o.confirm({
|
|
118
119
|
title: t("RoleList.deleteTitle"),
|
|
119
120
|
content: /* @__PURE__ */ e.jsx(P, { texts: [s.name], children: t("RoleList.deleteContent", { role: s.name }) }),
|
|
120
121
|
async onOk() {
|
|
121
|
-
await
|
|
122
|
+
await r.trigger({
|
|
122
123
|
id: s.id,
|
|
123
124
|
name: s.name
|
|
124
|
-
}), l(h, (
|
|
125
|
-
var R,
|
|
126
|
-
const
|
|
127
|
-
|
|
125
|
+
}), l(h, (i) => A(i, (d) => {
|
|
126
|
+
var R, C;
|
|
127
|
+
const w = (R = d == null ? void 0 : d.dataSource) == null ? void 0 : R.findIndex((U) => U.id === s.id);
|
|
128
|
+
w && ((C = d == null ? void 0 : d.dataSource) == null || C.splice(w, 1));
|
|
128
129
|
})), a.success(t("RoleList.deleteSuccessfully"));
|
|
129
130
|
}
|
|
130
131
|
});
|
|
@@ -135,42 +136,42 @@ const Q = /* @__PURE__ */ I.forwardRef(U), h = "/api/usystem/role/list", K = ()
|
|
|
135
136
|
] })
|
|
136
137
|
}
|
|
137
138
|
];
|
|
138
|
-
return /* @__PURE__ */ e.jsxs(
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
/* @__PURE__ */ e.jsx(
|
|
139
|
+
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
140
|
+
/* @__PURE__ */ e.jsx(
|
|
141
|
+
G,
|
|
142
|
+
{
|
|
143
|
+
title: t("global.role"),
|
|
144
|
+
extra: /* @__PURE__ */ e.jsx(
|
|
145
|
+
j,
|
|
146
|
+
{
|
|
147
|
+
isGlobalNS: !0,
|
|
148
|
+
type: "primary",
|
|
149
|
+
code: "200002",
|
|
150
|
+
icon: /* @__PURE__ */ e.jsx(H, {}),
|
|
151
|
+
onClick: () => {
|
|
152
|
+
x();
|
|
153
|
+
},
|
|
154
|
+
children: t("RoleList.createTitle")
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
children: /* @__PURE__ */ e.jsx(
|
|
157
158
|
$,
|
|
158
159
|
{
|
|
159
160
|
isGlobalNS: !0,
|
|
160
161
|
rowKey: "name",
|
|
161
|
-
columns:
|
|
162
|
+
columns: M,
|
|
162
163
|
code: "200001",
|
|
163
164
|
action: h,
|
|
164
165
|
getTotal: (s) => s.Total,
|
|
165
166
|
getDataSource: (s) => s.List
|
|
166
167
|
}
|
|
167
|
-
)
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
);
|
|
168
|
+
)
|
|
169
|
+
}
|
|
170
|
+
),
|
|
171
|
+
m,
|
|
172
|
+
p
|
|
173
|
+
] });
|
|
173
174
|
};
|
|
174
175
|
export {
|
|
175
|
-
|
|
176
|
+
ie as default
|
|
176
177
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as O, w as W, e as h, f as x, s as z, m as w, g as V, U as R, h as U, d as G, r as n, c as K } from "./index-
|
|
1
|
+
import { I as O, w as W, e as h, f as x, s as z, m as w, g as V, U as R, h as U, d as G, r as n, c as K } from "./index-Jf-VYQNs.chunk.js";
|
|
2
2
|
import L, { useRef as o, useCallback as N, useState as $ } from "react";
|
|
3
3
|
const P = O ? (e) => {
|
|
4
4
|
e();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as t, j as i } from "./index-
|
|
1
|
+
import { a as t, j as i } from "./index-Jf-VYQNs.chunk.js";
|
|
2
2
|
import { Breadcrumb as m, Card as n, Skeleton as a, Descriptions as l } from "antd";
|
|
3
3
|
import { useParams as c, Link as x } from "react-router-dom";
|
|
4
|
-
import { P as j } from "./index-
|
|
5
|
-
import { g as p } from "./index-
|
|
4
|
+
import { P as j } from "./index-b_N_y6ns.chunk.js";
|
|
5
|
+
import { g as p } from "./index-AkY1QPaq.chunk.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import "react-dom";
|
|
8
8
|
const k = () => {
|