react-toolkits 0.8.33 → 0.8.35
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-JPOeHFmn.chunk.js → index-8t6YmrpM.chunk.js} +19 -19
- package/lib/{index-sy7NzOUN.chunk.js → index-Q-wQlLor.chunk.js} +2 -2
- package/lib/{index-i4KNvJuA.chunk.js → index-ZERmkGlW.chunk.js} +1020 -1015
- package/lib/{index-DvxCSYwC.chunk.js → index-f4mPQlqW.chunk.js} +39 -39
- package/lib/{index-W8Zj5bvZ.chunk.js → index-i6_hSAif.chunk.js} +3 -3
- package/lib/{index-XX29V_Aq.chunk.js → index-s29S8miu.chunk.js} +1 -1
- package/lib/index.d.ts +7 -5
- package/lib/index.js +1 -1
- package/package.json +3 -3
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { A as T, _ as N, u as j, a as b, j as e, P as h, H as R, Q as z, b as w } from "./index-
|
|
2
|
-
import { App as U, Row as F, Col as P, Tag as A, Space as E, Card as G, Form as
|
|
1
|
+
import { A as T, _ as N, u as j, a as b, j as e, P as h, H as R, Q as z, b as w } from "./index-ZERmkGlW.chunk.js";
|
|
2
|
+
import { App as U, Row as F, Col as P, Tag as A, Space as E, Card as G, Form as x, Input as L, Select as y } from "antd";
|
|
3
3
|
import { p as I } from "./immer-BLf7GM7E.chunk.js";
|
|
4
4
|
import { Link as D } from "react-router-dom";
|
|
5
|
-
import { u as Q, a as _, b as k, c as $ } from "./index-
|
|
5
|
+
import { u as Q, a as _, b as k, c as $ } from "./index-s29S8miu.chunk.js";
|
|
6
6
|
import * as M from "react";
|
|
7
7
|
import "react-dom";
|
|
8
8
|
var q = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h.1c3 0 4.4-3.6 2.2-5.6a371.67 371.67 0 00-103.7-65.8c-.4-.2-.8-.3-1.2-.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-.4.2-.8.3-1.2.5-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00137 888.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1a8.1 8.1 0 008.1.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4A171.2 171.2 0 01340.5 349c0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4A171.2 171.2 0 01683.9 349c0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "user-add", theme: "outlined" };
|
|
9
9
|
const B = q;
|
|
10
|
-
var O = function(i,
|
|
10
|
+
var O = function(i, n) {
|
|
11
11
|
return /* @__PURE__ */ M.createElement(T, N({}, i, {
|
|
12
|
-
ref:
|
|
12
|
+
ref: n,
|
|
13
13
|
icon: B
|
|
14
14
|
}));
|
|
15
15
|
};
|
|
16
16
|
process.env.NODE_ENV !== "production" && (O.displayName = "UserAddOutlined");
|
|
17
|
-
const H = /* @__PURE__ */ M.forwardRef(O), { Option: K } = y,
|
|
17
|
+
const H = /* @__PURE__ */ M.forwardRef(O), { Option: K } = y, g = "/api/usystem/user/list";
|
|
18
18
|
function J() {
|
|
19
|
-
const { message: d } = U.useApp(), i = _(), { data:
|
|
19
|
+
const { message: d } = U.useApp(), i = _(), { data: n, isLoading: u } = k(), { setPayload: m } = j(), o = b();
|
|
20
20
|
return w({
|
|
21
|
-
title:
|
|
21
|
+
title: o("UserList.createTitle"),
|
|
22
22
|
formProps: {
|
|
23
23
|
labelCol: { flex: "80px" }
|
|
24
24
|
},
|
|
25
25
|
content: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
26
|
-
/* @__PURE__ */ e.jsx(
|
|
27
|
-
/* @__PURE__ */ e.jsx(
|
|
26
|
+
/* @__PURE__ */ e.jsx(x.Item, { label: o("global.name"), name: "name", rules: [{ required: !0 }], children: /* @__PURE__ */ e.jsx(L, {}) }),
|
|
27
|
+
/* @__PURE__ */ e.jsx(x.Item, { label: o("global.role"), name: "roles", children: /* @__PURE__ */ e.jsx(y, { allowClear: !0, mode: "multiple", loading: u, children: (n ?? []).map((t) => /* @__PURE__ */ e.jsx(K, { value: t.name, children: t.name }, t.id)) }) })
|
|
28
28
|
] }),
|
|
29
29
|
async onConfirm(t) {
|
|
30
|
-
await i.trigger(t), m(
|
|
30
|
+
await i.trigger(t), m(g, { page: 1 }), d.success(o("UserList.createSuccessfully"));
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
function W() {
|
|
35
|
-
const { message: d } = U.useApp(), i = $(), { data:
|
|
35
|
+
const { message: d } = U.useApp(), i = $(), { data: n, isLoading: u } = k(), { mutate: m } = j(), o = b();
|
|
36
36
|
return w({
|
|
37
|
-
title:
|
|
37
|
+
title: o("UserList.updateTitle"),
|
|
38
38
|
formProps: {
|
|
39
39
|
labelCol: { flex: "80px" }
|
|
40
40
|
},
|
|
41
41
|
content: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
42
|
-
/* @__PURE__ */ e.jsx(
|
|
43
|
-
/* @__PURE__ */ e.jsx(
|
|
42
|
+
/* @__PURE__ */ e.jsx(x.Item, { label: o("global.name"), name: "name", rules: [{ required: !0 }], children: /* @__PURE__ */ e.jsx(L, { readOnly: !0 }) }),
|
|
43
|
+
/* @__PURE__ */ e.jsx(x.Item, { label: o("global.role"), name: "roles", children: /* @__PURE__ */ e.jsx(
|
|
44
44
|
y,
|
|
45
45
|
{
|
|
46
46
|
allowClear: !0,
|
|
47
47
|
mode: "multiple",
|
|
48
48
|
loading: u,
|
|
49
|
-
options:
|
|
49
|
+
options: n == null ? void 0 : n.map((t) => ({
|
|
50
50
|
label: t.name,
|
|
51
51
|
value: t.name
|
|
52
52
|
}))
|
|
@@ -55,23 +55,23 @@ function W() {
|
|
|
55
55
|
] }),
|
|
56
56
|
async onConfirm(t, p) {
|
|
57
57
|
await i.trigger(t), m(
|
|
58
|
-
|
|
59
|
-
(
|
|
58
|
+
g,
|
|
59
|
+
(a) => I(a, (c) => {
|
|
60
60
|
var s;
|
|
61
61
|
if (c != null && c.dataSource) {
|
|
62
|
-
const
|
|
63
|
-
|
|
62
|
+
const l = (s = c.dataSource) == null ? void 0 : s.findIndex((r) => r.id === (p == null ? void 0 : p.id));
|
|
63
|
+
l !== -1 && (c.dataSource[l].roles = t.roles);
|
|
64
64
|
}
|
|
65
65
|
}),
|
|
66
66
|
{ revalidate: !1 }
|
|
67
|
-
), d.success(
|
|
67
|
+
), d.success(o("UserList.updateSuccessfully"));
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
const te = () => {
|
|
72
|
-
const { modal: d, message: i } = U.useApp(),
|
|
72
|
+
const { modal: d, message: i } = U.useApp(), n = Q(), { mutate: u } = j(), { show: m, modal: o } = J(), { show: t, modal: p } = W(), a = b(), c = [
|
|
73
73
|
{
|
|
74
|
-
title:
|
|
74
|
+
title: a("global.name"),
|
|
75
75
|
dataIndex: "name",
|
|
76
76
|
key: "name"
|
|
77
77
|
},
|
|
@@ -81,21 +81,21 @@ const te = () => {
|
|
|
81
81
|
key: "id"
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
|
-
title:
|
|
84
|
+
title: a("global.role"),
|
|
85
85
|
dataIndex: "roles",
|
|
86
86
|
key: "roles",
|
|
87
87
|
width: "40%",
|
|
88
88
|
render(s) {
|
|
89
|
-
return /* @__PURE__ */ e.jsx(F, { gutter: [4, 4], children: (s || []).map((
|
|
89
|
+
return /* @__PURE__ */ e.jsx(F, { gutter: [4, 4], children: (s || []).map((l) => /* @__PURE__ */ e.jsx(P, { children: l === "root" ? /* @__PURE__ */ e.jsx(A, { color: "#f50", children: l }) : /* @__PURE__ */ e.jsx(A, { color: "#ff5a00", children: /* @__PURE__ */ e.jsx(D, { to: `/permission/role/${l}`, children: l }) }) }, l)) });
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
|
-
title:
|
|
93
|
+
title: a("global.creationTime"),
|
|
94
94
|
dataIndex: "Ctime",
|
|
95
95
|
key: "ctime"
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
|
-
title:
|
|
98
|
+
title: a("global.operation"),
|
|
99
99
|
width: 150,
|
|
100
100
|
align: "center",
|
|
101
101
|
render: (s) => /* @__PURE__ */ e.jsxs(E, { children: [
|
|
@@ -117,7 +117,7 @@ const te = () => {
|
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
},
|
|
120
|
-
children:
|
|
120
|
+
children: a("global.update")
|
|
121
121
|
}
|
|
122
122
|
),
|
|
123
123
|
/* @__PURE__ */ e.jsx(
|
|
@@ -130,21 +130,21 @@ const te = () => {
|
|
|
130
130
|
type: "link",
|
|
131
131
|
onClick: () => {
|
|
132
132
|
d.confirm({
|
|
133
|
-
title:
|
|
134
|
-
content: /* @__PURE__ */ e.jsx(R, { texts: [s.name], children:
|
|
133
|
+
title: a("UserList.deleteTitle"),
|
|
134
|
+
content: /* @__PURE__ */ e.jsx(R, { texts: [s.name], children: a("UserList.deleteContent", { user: s.name }) }),
|
|
135
135
|
async onOk() {
|
|
136
|
-
await
|
|
136
|
+
await n.trigger({
|
|
137
137
|
id: s.id,
|
|
138
138
|
name: s.name
|
|
139
|
-
}), u(
|
|
139
|
+
}), u(g, (l) => I(l, (r) => {
|
|
140
140
|
var C, S;
|
|
141
141
|
const f = (C = r == null ? void 0 : r.dataSource) == null ? void 0 : C.findIndex((v) => v.id === s.id);
|
|
142
142
|
f && ((S = r == null ? void 0 : r.dataSource) == null || S.splice(f, 1));
|
|
143
|
-
})), i.success(
|
|
143
|
+
})), i.success(a("UserList.deleteSuccessfully"));
|
|
144
144
|
}
|
|
145
145
|
});
|
|
146
146
|
},
|
|
147
|
-
children:
|
|
147
|
+
children: a("global.delete")
|
|
148
148
|
}
|
|
149
149
|
)
|
|
150
150
|
] })
|
|
@@ -154,7 +154,7 @@ const te = () => {
|
|
|
154
154
|
/* @__PURE__ */ e.jsx(
|
|
155
155
|
G,
|
|
156
156
|
{
|
|
157
|
-
title:
|
|
157
|
+
title: a("global.user"),
|
|
158
158
|
extra: /* @__PURE__ */ e.jsx(
|
|
159
159
|
h,
|
|
160
160
|
{
|
|
@@ -165,7 +165,7 @@ const te = () => {
|
|
|
165
165
|
onClick: () => {
|
|
166
166
|
m();
|
|
167
167
|
},
|
|
168
|
-
children:
|
|
168
|
+
children: a("UserList.createTitle")
|
|
169
169
|
}
|
|
170
170
|
),
|
|
171
171
|
children: /* @__PURE__ */ e.jsx(
|
|
@@ -173,7 +173,7 @@ const te = () => {
|
|
|
173
173
|
{
|
|
174
174
|
isGlobalNS: !0,
|
|
175
175
|
code: "100001",
|
|
176
|
-
action:
|
|
176
|
+
action: g,
|
|
177
177
|
rowKey: "id",
|
|
178
178
|
columns: c,
|
|
179
179
|
getTotal: (s) => s.Total,
|
|
@@ -182,11 +182,11 @@ const te = () => {
|
|
|
182
182
|
)
|
|
183
183
|
}
|
|
184
184
|
),
|
|
185
|
-
|
|
185
|
+
o,
|
|
186
186
|
p
|
|
187
187
|
] });
|
|
188
188
|
};
|
|
189
189
|
export {
|
|
190
|
-
|
|
190
|
+
g as action,
|
|
191
191
|
te as default
|
|
192
192
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as t, j as i } from "./index-
|
|
1
|
+
import { a as t, j as i } from "./index-ZERmkGlW.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-Q-wQlLor.chunk.js";
|
|
5
|
+
import { g as p } from "./index-s29S8miu.chunk.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import "react-dom";
|
|
8
8
|
const k = () => {
|
|
@@ -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-ZERmkGlW.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();
|
package/lib/index.d.ts
CHANGED
|
@@ -226,10 +226,11 @@ declare type MenuItemType2 = Merge<MenuItemType, {
|
|
|
226
226
|
export declare const mixedStorage: StateStorage;
|
|
227
227
|
|
|
228
228
|
declare interface ModalState {
|
|
229
|
-
open: Map<
|
|
230
|
-
getOpen: (uuid:
|
|
231
|
-
show: (uuid:
|
|
232
|
-
hide: (uuid:
|
|
229
|
+
open: Map<number, boolean>;
|
|
230
|
+
getOpen: (uuid: number) => boolean;
|
|
231
|
+
show: (uuid: number) => void;
|
|
232
|
+
hide: (uuid: number) => void;
|
|
233
|
+
hideAll: () => void;
|
|
233
234
|
}
|
|
234
235
|
|
|
235
236
|
export declare const NavMenu: NamedExoticComponent<object>;
|
|
@@ -359,6 +360,7 @@ export declare interface TokenState {
|
|
|
359
360
|
}
|
|
360
361
|
|
|
361
362
|
export declare function useFormModal<Values, ExtraValues extends NonNullable<unknown> = NonNullable<unknown>>(props: UseFormModalProps<Values, ExtraValues>): {
|
|
363
|
+
uuid: number;
|
|
362
364
|
show: ({ initialValues, extraValues, }?: {
|
|
363
365
|
initialValues?: RecursivePartial<Values> | undefined;
|
|
364
366
|
extraValues?: ExtraValues | undefined;
|
|
@@ -387,7 +389,7 @@ export declare const useGameStore: UseBoundStore<Omit<StoreApi<GameState>, "pers
|
|
|
387
389
|
}>;
|
|
388
390
|
|
|
389
391
|
export declare function useModal(props: UseModalProps): {
|
|
390
|
-
uuid:
|
|
392
|
+
uuid: number;
|
|
391
393
|
show: () => void;
|
|
392
394
|
hide: () => void;
|
|
393
395
|
modal: JSX_2.Element;
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as r, D as u, F as n, G as m, H as d, i as l, L as p, N as L, k as S, O as g, l as y, P, n as x, Q as c, o as F, R as G, p as M, S as T, q as h, t as k, v as q, r as Q, b as R, x as v, y as B, z as C, c as N, B as f, u as w, E as D, J as E, d as H, a as I, K as O, M as W } from "./index-
|
|
1
|
+
import { C as r, D as u, F as n, G as m, H as d, i as l, L as p, N as L, k as S, O as g, l as y, P, n as x, Q as c, o as F, R as G, p as M, S as T, q as h, t as k, v as q, r as Q, b as R, x as v, y as B, z as C, c as N, B as f, u as w, E as D, J as E, d as H, a as I, K as O, M as W } from "./index-ZERmkGlW.chunk.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "antd";
|
|
4
4
|
import "react-dom";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-toolkits",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.35",
|
|
4
4
|
"packageManager": "^pnpm@8.7.5",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"**/*.css"
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
"typescript": "^5.3.3",
|
|
70
70
|
"vite": "^5.0.10",
|
|
71
71
|
"vite-plugin-dts": "^3.6.4",
|
|
72
|
-
"
|
|
72
|
+
"tsconfig": "0.0.5",
|
|
73
73
|
"tailwind-config": "0.1.1",
|
|
74
|
-
"
|
|
74
|
+
"@flow97/eslint-config-mono": "0.0.4"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"antd": "^5.12.2",
|