react-toolkits 0.4.4 → 0.5.0
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/README.md +2 -2
- package/lib/immer-BLf7GM7E.chunk.js +459 -0
- package/lib/index-2yXDMFsB.chunk.js +212 -0
- package/lib/index-46YNBewp.chunk.js +170 -0
- package/lib/index-GnoTyQLT.chunk.js +1448 -0
- package/lib/index-MckNf-V8.chunk.js +179 -0
- package/lib/index-SypqQFGs.chunk.js +380 -0
- package/lib/index-ZZXzToVD.chunk.js +29 -0
- package/lib/index-dETo--R9.chunk.js +39 -0
- package/lib/index-eh8cxTQW.chunk.js +187 -0
- package/lib/index-gdaNSPz6.chunk.js +15895 -0
- package/lib/{index.d.mts → index.d.ts} +407 -360
- package/lib/index.js +35 -27
- package/lib/style.css +1 -0
- package/locales/{index-Xn8Uwe6G.d.mts → en_GB.d.ts} +90 -87
- package/locales/en_GB.js +88 -5
- package/locales/ja_JP.d.ts +90 -0
- package/locales/ja_JP.js +88 -5
- package/locales/ko_KR.d.ts +90 -0
- package/locales/ko_KR.js +88 -5
- package/locales/zh_CN.d.ts +90 -0
- package/locales/zh_CN.js +88 -5
- package/package.json +25 -20
- package/lib/index.css +0 -2
- package/lib/index.css.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/logo-L6MFCL6M.png +0 -0
- package/locales/en_GB.d.mts +0 -5
- package/locales/en_GB.js.map +0 -1
- package/locales/ja_JP.d.mts +0 -5
- package/locales/ja_JP.js.map +0 -1
- package/locales/ko_KR.d.mts +0 -5
- package/locales/ko_KR.js.map +0 -1
- package/locales/zh_CN.d.mts +0 -5
- package/locales/zh_CN.js.map +0 -1
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { A as O, _, e as M, b as T, f as b, u as f, j as e, P as y, r as z, H as $, Q as G, h as A } from "./index-gdaNSPz6.chunk.js";
|
|
2
|
+
import { App as R, Space as H, Card as P, Form as m, Input as S } from "antd";
|
|
3
|
+
import { p as k } from "./immer-BLf7GM7E.chunk.js";
|
|
4
|
+
import { Link as B } from "react-router-dom";
|
|
5
|
+
import { P as v } from "./index-46YNBewp.chunk.js";
|
|
6
|
+
import { a as E, b as V, c as q } from "./index-2yXDMFsB.chunk.js";
|
|
7
|
+
import * as I from "react";
|
|
8
|
+
import "react-dom";
|
|
9
|
+
var F = { 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 Q = F;
|
|
11
|
+
var U = function(a, l) {
|
|
12
|
+
return /* @__PURE__ */ I.createElement(O, _({}, a, {
|
|
13
|
+
ref: l,
|
|
14
|
+
icon: Q
|
|
15
|
+
}));
|
|
16
|
+
};
|
|
17
|
+
process.env.NODE_ENV !== "production" && (U.displayName = "UsergroupAddOutlined");
|
|
18
|
+
const D = /* @__PURE__ */ I.forwardRef(U), h = "/api/usystem/role/list", K = () => {
|
|
19
|
+
const { message: d } = R.useApp(), { mutate: a } = b(), l = V(), o = f(), n = async (c) => {
|
|
20
|
+
await l.trigger({
|
|
21
|
+
name: `role_${c.name}`,
|
|
22
|
+
permissions: c.permissions
|
|
23
|
+
}), a(h, { page: 1 }), d.success(o("RoleList.createSuccessfully"));
|
|
24
|
+
};
|
|
25
|
+
return A({
|
|
26
|
+
title: o("RoleList.createTitle"),
|
|
27
|
+
width: "50vw",
|
|
28
|
+
content: (c) => /* @__PURE__ */ e.jsxs(m, { form: c, layout: "vertical", children: [
|
|
29
|
+
/* @__PURE__ */ e.jsx(m.Item, { label: o("global.name"), name: "name", rules: [{ required: !0 }], children: /* @__PURE__ */ e.jsx(S, { addonBefore: "role_" }) }),
|
|
30
|
+
/* @__PURE__ */ e.jsx(m.Item, { name: "permissions", children: /* @__PURE__ */ e.jsx(v, {}) })
|
|
31
|
+
] }),
|
|
32
|
+
onConfirm: n
|
|
33
|
+
});
|
|
34
|
+
}, J = () => {
|
|
35
|
+
const { message: d } = R.useApp(), { mutate: a } = b(), l = q(), o = f();
|
|
36
|
+
return A({
|
|
37
|
+
title: o("RoleList.updateTitle"),
|
|
38
|
+
width: "50vw",
|
|
39
|
+
content: (n) => /* @__PURE__ */ e.jsxs(m, { form: n, children: [
|
|
40
|
+
/* @__PURE__ */ e.jsx(m.Item, { label: o("global.name"), name: "name", rules: [{ required: !0 }], children: /* @__PURE__ */ e.jsx(S, { readOnly: !0, addonBefore: "role_" }) }),
|
|
41
|
+
/* @__PURE__ */ e.jsx(m.Item, { name: "permissions", children: /* @__PURE__ */ e.jsx(v, {}) })
|
|
42
|
+
] }),
|
|
43
|
+
onConfirm: async (n, c, p) => {
|
|
44
|
+
await l.trigger({
|
|
45
|
+
id: p.id,
|
|
46
|
+
name: `role_${n.name}`,
|
|
47
|
+
permissions: n.permissions
|
|
48
|
+
}), a(
|
|
49
|
+
h,
|
|
50
|
+
void 0,
|
|
51
|
+
(x) => k(x, (u) => {
|
|
52
|
+
var s;
|
|
53
|
+
const g = (s = u == null ? void 0 : u.list) == null ? void 0 : s.find((j) => j.id === p.id);
|
|
54
|
+
g && (g.permissions = n.permissions);
|
|
55
|
+
}),
|
|
56
|
+
{ revalidate: !1 }
|
|
57
|
+
), d.success(o("RoleList.updateSuccessfully"));
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}, ie = () => {
|
|
61
|
+
const { accessible: d } = M("200005", { isGlobalNS: !0 }), { modal: a, message: l } = R.useApp(), { usePermissionApiV2: o } = T(), n = E(), { mutate: c } = b(), { show: p, contextHolder: x } = K(), { show: u, contextHolder: g } = J(), s = f(), j = [
|
|
62
|
+
{
|
|
63
|
+
title: s("global.name"),
|
|
64
|
+
key: "name",
|
|
65
|
+
render(i) {
|
|
66
|
+
return d ? /* @__PURE__ */ e.jsx(B, { to: `${i.name}`, children: i.name }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: i.name });
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
title: "ID",
|
|
71
|
+
dataIndex: "id",
|
|
72
|
+
key: "id"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
title: s("global.creationTime"),
|
|
76
|
+
dataIndex: "ctime",
|
|
77
|
+
key: "ctime"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
title: s("global.operation"),
|
|
81
|
+
width: 150,
|
|
82
|
+
align: "center",
|
|
83
|
+
render: (i) => /* @__PURE__ */ e.jsxs(H, { size: "small", children: [
|
|
84
|
+
/* @__PURE__ */ e.jsx(
|
|
85
|
+
y,
|
|
86
|
+
{
|
|
87
|
+
isGlobalNS: !0,
|
|
88
|
+
code: "200003",
|
|
89
|
+
size: "small",
|
|
90
|
+
type: "link",
|
|
91
|
+
onClick: async () => {
|
|
92
|
+
const { data: t } = await z(
|
|
93
|
+
`/api/usystem/role/info${o ? "V2" : ""}?name=${i.name}`,
|
|
94
|
+
{ isGlobalNS: !0 }
|
|
95
|
+
);
|
|
96
|
+
u({
|
|
97
|
+
initialValues: {
|
|
98
|
+
permissions: t == null ? void 0 : t.permissions,
|
|
99
|
+
name: t == null ? void 0 : t.name.replace(/^role_/, "")
|
|
100
|
+
},
|
|
101
|
+
extraValues: {
|
|
102
|
+
id: t == null ? void 0 : t.id
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
},
|
|
106
|
+
children: s("global.edit")
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
/* @__PURE__ */ e.jsx(
|
|
110
|
+
y,
|
|
111
|
+
{
|
|
112
|
+
isGlobalNS: !0,
|
|
113
|
+
danger: !0,
|
|
114
|
+
code: "200004",
|
|
115
|
+
size: "small",
|
|
116
|
+
type: "link",
|
|
117
|
+
onClick: () => {
|
|
118
|
+
a.confirm({
|
|
119
|
+
title: s("RoleList.deleteTitle"),
|
|
120
|
+
content: /* @__PURE__ */ e.jsx($, { texts: [i.name], children: s("RoleList.deleteContent", { role: i.name }) }),
|
|
121
|
+
async onOk() {
|
|
122
|
+
await n.trigger({
|
|
123
|
+
id: i.id,
|
|
124
|
+
name: i.name
|
|
125
|
+
}), c(h, void 0, (t) => k(t, (r) => {
|
|
126
|
+
var C, L;
|
|
127
|
+
const w = (C = r == null ? void 0 : r.list) == null ? void 0 : C.findIndex((N) => N.id === i.id);
|
|
128
|
+
w && ((L = r == null ? void 0 : r.list) == null || L.splice(w, 1));
|
|
129
|
+
})), l.success(s("RoleList.deleteSuccessfully"));
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
},
|
|
133
|
+
children: s("global.delete")
|
|
134
|
+
}
|
|
135
|
+
)
|
|
136
|
+
] })
|
|
137
|
+
}
|
|
138
|
+
];
|
|
139
|
+
return /* @__PURE__ */ e.jsxs(
|
|
140
|
+
P,
|
|
141
|
+
{
|
|
142
|
+
title: s("global.role"),
|
|
143
|
+
extra: /* @__PURE__ */ e.jsx(
|
|
144
|
+
y,
|
|
145
|
+
{
|
|
146
|
+
isGlobalNS: !0,
|
|
147
|
+
type: "primary",
|
|
148
|
+
code: "200002",
|
|
149
|
+
icon: /* @__PURE__ */ e.jsx(D, {}),
|
|
150
|
+
onClick: () => {
|
|
151
|
+
p();
|
|
152
|
+
},
|
|
153
|
+
children: s("RoleList.createTitle")
|
|
154
|
+
}
|
|
155
|
+
),
|
|
156
|
+
children: [
|
|
157
|
+
/* @__PURE__ */ e.jsx(
|
|
158
|
+
G,
|
|
159
|
+
{
|
|
160
|
+
isGlobalNS: !0,
|
|
161
|
+
rowKey: "name",
|
|
162
|
+
columns: j,
|
|
163
|
+
code: "200001",
|
|
164
|
+
url: h,
|
|
165
|
+
transformResponse: (i) => {
|
|
166
|
+
const { List: t, Total: r } = i;
|
|
167
|
+
return { list: t, total: r };
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
),
|
|
171
|
+
x,
|
|
172
|
+
g
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
};
|
|
177
|
+
export {
|
|
178
|
+
ie as default
|
|
179
|
+
};
|
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
import { c as st, g as at, u as it, j as c, Q as ut } from "./index-gdaNSPz6.chunk.js";
|
|
2
|
+
import { Card as ot, Form as H, Row as ct, Col as E, Input as Z, Select as K, Typography as lt } from "antd";
|
|
3
|
+
import "react";
|
|
4
|
+
import "react-dom";
|
|
5
|
+
import "react-router-dom";
|
|
6
|
+
var X = { exports: {} };
|
|
7
|
+
(function(p, z) {
|
|
8
|
+
(function(f, w) {
|
|
9
|
+
p.exports = w();
|
|
10
|
+
})(st, function() {
|
|
11
|
+
var f = 1e3, w = 6e4, L = 36e5, U = "millisecond", j = "second", O = "minute", k = "hour", x = "day", W = "week", g = "month", P = "quarter", M = "year", _ = "date", Q = "Invalid Date", tt = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, et = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, rt = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(s) {
|
|
12
|
+
var r = ["th", "st", "nd", "rd"], t = s % 100;
|
|
13
|
+
return "[" + s + (r[(t - 20) % 10] || r[t] || r[0]) + "]";
|
|
14
|
+
} }, q = function(s, r, t) {
|
|
15
|
+
var n = String(s);
|
|
16
|
+
return !n || n.length >= r ? s : "" + Array(r + 1 - n.length).join(t) + s;
|
|
17
|
+
}, nt = { s: q, z: function(s) {
|
|
18
|
+
var r = -s.utcOffset(), t = Math.abs(r), n = Math.floor(t / 60), e = t % 60;
|
|
19
|
+
return (r <= 0 ? "+" : "-") + q(n, 2, "0") + ":" + q(e, 2, "0");
|
|
20
|
+
}, m: function s(r, t) {
|
|
21
|
+
if (r.date() < t.date())
|
|
22
|
+
return -s(t, r);
|
|
23
|
+
var n = 12 * (t.year() - r.year()) + (t.month() - r.month()), e = r.clone().add(n, g), a = t - e < 0, i = r.clone().add(n + (a ? -1 : 1), g);
|
|
24
|
+
return +(-(n + (t - e) / (a ? e - i : i - e)) || 0);
|
|
25
|
+
}, a: function(s) {
|
|
26
|
+
return s < 0 ? Math.ceil(s) || 0 : Math.floor(s);
|
|
27
|
+
}, p: function(s) {
|
|
28
|
+
return { M: g, y: M, w: W, d: x, D: _, h: k, m: O, s: j, ms: U, Q: P }[s] || String(s || "").toLowerCase().replace(/s$/, "");
|
|
29
|
+
}, u: function(s) {
|
|
30
|
+
return s === void 0;
|
|
31
|
+
} }, T = "en", D = {};
|
|
32
|
+
D[T] = rt;
|
|
33
|
+
var R = "$isDayjsObject", J = function(s) {
|
|
34
|
+
return s instanceof F || !(!s || !s[R]);
|
|
35
|
+
}, A = function s(r, t, n) {
|
|
36
|
+
var e;
|
|
37
|
+
if (!r)
|
|
38
|
+
return T;
|
|
39
|
+
if (typeof r == "string") {
|
|
40
|
+
var a = r.toLowerCase();
|
|
41
|
+
D[a] && (e = a), t && (D[a] = t, e = a);
|
|
42
|
+
var i = r.split("-");
|
|
43
|
+
if (!e && i.length > 1)
|
|
44
|
+
return s(i[0]);
|
|
45
|
+
} else {
|
|
46
|
+
var o = r.name;
|
|
47
|
+
D[o] = r, e = o;
|
|
48
|
+
}
|
|
49
|
+
return !n && e && (T = e), e || !n && T;
|
|
50
|
+
}, d = function(s, r) {
|
|
51
|
+
if (J(s))
|
|
52
|
+
return s.clone();
|
|
53
|
+
var t = typeof r == "object" ? r : {};
|
|
54
|
+
return t.date = s, t.args = arguments, new F(t);
|
|
55
|
+
}, u = nt;
|
|
56
|
+
u.l = A, u.i = J, u.w = function(s, r) {
|
|
57
|
+
return d(s, { locale: r.$L, utc: r.$u, x: r.$x, $offset: r.$offset });
|
|
58
|
+
};
|
|
59
|
+
var F = function() {
|
|
60
|
+
function s(t) {
|
|
61
|
+
this.$L = A(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[R] = !0;
|
|
62
|
+
}
|
|
63
|
+
var r = s.prototype;
|
|
64
|
+
return r.parse = function(t) {
|
|
65
|
+
this.$d = function(n) {
|
|
66
|
+
var e = n.date, a = n.utc;
|
|
67
|
+
if (e === null)
|
|
68
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
69
|
+
if (u.u(e))
|
|
70
|
+
return /* @__PURE__ */ new Date();
|
|
71
|
+
if (e instanceof Date)
|
|
72
|
+
return new Date(e);
|
|
73
|
+
if (typeof e == "string" && !/Z$/i.test(e)) {
|
|
74
|
+
var i = e.match(tt);
|
|
75
|
+
if (i) {
|
|
76
|
+
var o = i[2] - 1 || 0, l = (i[7] || "0").substring(0, 3);
|
|
77
|
+
return a ? new Date(Date.UTC(i[1], o, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, l)) : new Date(i[1], o, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, l);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return new Date(e);
|
|
81
|
+
}(t), this.init();
|
|
82
|
+
}, r.init = function() {
|
|
83
|
+
var t = this.$d;
|
|
84
|
+
this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
|
|
85
|
+
}, r.$utils = function() {
|
|
86
|
+
return u;
|
|
87
|
+
}, r.isValid = function() {
|
|
88
|
+
return this.$d.toString() !== Q;
|
|
89
|
+
}, r.isSame = function(t, n) {
|
|
90
|
+
var e = d(t);
|
|
91
|
+
return this.startOf(n) <= e && e <= this.endOf(n);
|
|
92
|
+
}, r.isAfter = function(t, n) {
|
|
93
|
+
return d(t) < this.startOf(n);
|
|
94
|
+
}, r.isBefore = function(t, n) {
|
|
95
|
+
return this.endOf(n) < d(t);
|
|
96
|
+
}, r.$g = function(t, n, e) {
|
|
97
|
+
return u.u(t) ? this[n] : this.set(e, t);
|
|
98
|
+
}, r.unix = function() {
|
|
99
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
100
|
+
}, r.valueOf = function() {
|
|
101
|
+
return this.$d.getTime();
|
|
102
|
+
}, r.startOf = function(t, n) {
|
|
103
|
+
var e = this, a = !!u.u(n) || n, i = u.p(t), o = function(S, $) {
|
|
104
|
+
var v = u.w(e.$u ? Date.UTC(e.$y, $, S) : new Date(e.$y, $, S), e);
|
|
105
|
+
return a ? v : v.endOf(x);
|
|
106
|
+
}, l = function(S, $) {
|
|
107
|
+
return u.w(e.toDate()[S].apply(e.toDate("s"), (a ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice($)), e);
|
|
108
|
+
}, h = this.$W, m = this.$M, y = this.$D, I = "set" + (this.$u ? "UTC" : "");
|
|
109
|
+
switch (i) {
|
|
110
|
+
case M:
|
|
111
|
+
return a ? o(1, 0) : o(31, 11);
|
|
112
|
+
case g:
|
|
113
|
+
return a ? o(1, m) : o(0, m + 1);
|
|
114
|
+
case W:
|
|
115
|
+
var b = this.$locale().weekStart || 0, Y = (h < b ? h + 7 : h) - b;
|
|
116
|
+
return o(a ? y - Y : y + (6 - Y), m);
|
|
117
|
+
case x:
|
|
118
|
+
case _:
|
|
119
|
+
return l(I + "Hours", 0);
|
|
120
|
+
case k:
|
|
121
|
+
return l(I + "Minutes", 1);
|
|
122
|
+
case O:
|
|
123
|
+
return l(I + "Seconds", 2);
|
|
124
|
+
case j:
|
|
125
|
+
return l(I + "Milliseconds", 3);
|
|
126
|
+
default:
|
|
127
|
+
return this.clone();
|
|
128
|
+
}
|
|
129
|
+
}, r.endOf = function(t) {
|
|
130
|
+
return this.startOf(t, !1);
|
|
131
|
+
}, r.$set = function(t, n) {
|
|
132
|
+
var e, a = u.p(t), i = "set" + (this.$u ? "UTC" : ""), o = (e = {}, e[x] = i + "Date", e[_] = i + "Date", e[g] = i + "Month", e[M] = i + "FullYear", e[k] = i + "Hours", e[O] = i + "Minutes", e[j] = i + "Seconds", e[U] = i + "Milliseconds", e)[a], l = a === x ? this.$D + (n - this.$W) : n;
|
|
133
|
+
if (a === g || a === M) {
|
|
134
|
+
var h = this.clone().set(_, 1);
|
|
135
|
+
h.$d[o](l), h.init(), this.$d = h.set(_, Math.min(this.$D, h.daysInMonth())).$d;
|
|
136
|
+
} else
|
|
137
|
+
o && this.$d[o](l);
|
|
138
|
+
return this.init(), this;
|
|
139
|
+
}, r.set = function(t, n) {
|
|
140
|
+
return this.clone().$set(t, n);
|
|
141
|
+
}, r.get = function(t) {
|
|
142
|
+
return this[u.p(t)]();
|
|
143
|
+
}, r.add = function(t, n) {
|
|
144
|
+
var e, a = this;
|
|
145
|
+
t = Number(t);
|
|
146
|
+
var i = u.p(n), o = function(m) {
|
|
147
|
+
var y = d(a);
|
|
148
|
+
return u.w(y.date(y.date() + Math.round(m * t)), a);
|
|
149
|
+
};
|
|
150
|
+
if (i === g)
|
|
151
|
+
return this.set(g, this.$M + t);
|
|
152
|
+
if (i === M)
|
|
153
|
+
return this.set(M, this.$y + t);
|
|
154
|
+
if (i === x)
|
|
155
|
+
return o(1);
|
|
156
|
+
if (i === W)
|
|
157
|
+
return o(7);
|
|
158
|
+
var l = (e = {}, e[O] = w, e[k] = L, e[j] = f, e)[i] || 1, h = this.$d.getTime() + t * l;
|
|
159
|
+
return u.w(h, this);
|
|
160
|
+
}, r.subtract = function(t, n) {
|
|
161
|
+
return this.add(-1 * t, n);
|
|
162
|
+
}, r.format = function(t) {
|
|
163
|
+
var n = this, e = this.$locale();
|
|
164
|
+
if (!this.isValid())
|
|
165
|
+
return e.invalidDate || Q;
|
|
166
|
+
var a = t || "YYYY-MM-DDTHH:mm:ssZ", i = u.z(this), o = this.$H, l = this.$m, h = this.$M, m = e.weekdays, y = e.months, I = e.meridiem, b = function($, v, C, N) {
|
|
167
|
+
return $ && ($[v] || $(n, a)) || C[v].slice(0, N);
|
|
168
|
+
}, Y = function($) {
|
|
169
|
+
return u.s(o % 12 || 12, $, "0");
|
|
170
|
+
}, S = I || function($, v, C) {
|
|
171
|
+
var N = $ < 12 ? "AM" : "PM";
|
|
172
|
+
return C ? N.toLowerCase() : N;
|
|
173
|
+
};
|
|
174
|
+
return a.replace(et, function($, v) {
|
|
175
|
+
return v || function(C) {
|
|
176
|
+
switch (C) {
|
|
177
|
+
case "YY":
|
|
178
|
+
return String(n.$y).slice(-2);
|
|
179
|
+
case "YYYY":
|
|
180
|
+
return u.s(n.$y, 4, "0");
|
|
181
|
+
case "M":
|
|
182
|
+
return h + 1;
|
|
183
|
+
case "MM":
|
|
184
|
+
return u.s(h + 1, 2, "0");
|
|
185
|
+
case "MMM":
|
|
186
|
+
return b(e.monthsShort, h, y, 3);
|
|
187
|
+
case "MMMM":
|
|
188
|
+
return b(y, h);
|
|
189
|
+
case "D":
|
|
190
|
+
return n.$D;
|
|
191
|
+
case "DD":
|
|
192
|
+
return u.s(n.$D, 2, "0");
|
|
193
|
+
case "d":
|
|
194
|
+
return String(n.$W);
|
|
195
|
+
case "dd":
|
|
196
|
+
return b(e.weekdaysMin, n.$W, m, 2);
|
|
197
|
+
case "ddd":
|
|
198
|
+
return b(e.weekdaysShort, n.$W, m, 3);
|
|
199
|
+
case "dddd":
|
|
200
|
+
return m[n.$W];
|
|
201
|
+
case "H":
|
|
202
|
+
return String(o);
|
|
203
|
+
case "HH":
|
|
204
|
+
return u.s(o, 2, "0");
|
|
205
|
+
case "h":
|
|
206
|
+
return Y(1);
|
|
207
|
+
case "hh":
|
|
208
|
+
return Y(2);
|
|
209
|
+
case "a":
|
|
210
|
+
return S(o, l, !0);
|
|
211
|
+
case "A":
|
|
212
|
+
return S(o, l, !1);
|
|
213
|
+
case "m":
|
|
214
|
+
return String(l);
|
|
215
|
+
case "mm":
|
|
216
|
+
return u.s(l, 2, "0");
|
|
217
|
+
case "s":
|
|
218
|
+
return String(n.$s);
|
|
219
|
+
case "ss":
|
|
220
|
+
return u.s(n.$s, 2, "0");
|
|
221
|
+
case "SSS":
|
|
222
|
+
return u.s(n.$ms, 3, "0");
|
|
223
|
+
case "Z":
|
|
224
|
+
return i;
|
|
225
|
+
}
|
|
226
|
+
return null;
|
|
227
|
+
}($) || i.replace(":", "");
|
|
228
|
+
});
|
|
229
|
+
}, r.utcOffset = function() {
|
|
230
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
231
|
+
}, r.diff = function(t, n, e) {
|
|
232
|
+
var a, i = this, o = u.p(n), l = d(t), h = (l.utcOffset() - this.utcOffset()) * w, m = this - l, y = function() {
|
|
233
|
+
return u.m(i, l);
|
|
234
|
+
};
|
|
235
|
+
switch (o) {
|
|
236
|
+
case M:
|
|
237
|
+
a = y() / 12;
|
|
238
|
+
break;
|
|
239
|
+
case g:
|
|
240
|
+
a = y();
|
|
241
|
+
break;
|
|
242
|
+
case P:
|
|
243
|
+
a = y() / 3;
|
|
244
|
+
break;
|
|
245
|
+
case W:
|
|
246
|
+
a = (m - h) / 6048e5;
|
|
247
|
+
break;
|
|
248
|
+
case x:
|
|
249
|
+
a = (m - h) / 864e5;
|
|
250
|
+
break;
|
|
251
|
+
case k:
|
|
252
|
+
a = m / L;
|
|
253
|
+
break;
|
|
254
|
+
case O:
|
|
255
|
+
a = m / w;
|
|
256
|
+
break;
|
|
257
|
+
case j:
|
|
258
|
+
a = m / f;
|
|
259
|
+
break;
|
|
260
|
+
default:
|
|
261
|
+
a = m;
|
|
262
|
+
}
|
|
263
|
+
return e ? a : u.a(a);
|
|
264
|
+
}, r.daysInMonth = function() {
|
|
265
|
+
return this.endOf(g).$D;
|
|
266
|
+
}, r.$locale = function() {
|
|
267
|
+
return D[this.$L];
|
|
268
|
+
}, r.locale = function(t, n) {
|
|
269
|
+
if (!t)
|
|
270
|
+
return this.$L;
|
|
271
|
+
var e = this.clone(), a = A(t, n, !0);
|
|
272
|
+
return a && (e.$L = a), e;
|
|
273
|
+
}, r.clone = function() {
|
|
274
|
+
return u.w(this.$d, this);
|
|
275
|
+
}, r.toDate = function() {
|
|
276
|
+
return new Date(this.valueOf());
|
|
277
|
+
}, r.toJSON = function() {
|
|
278
|
+
return this.isValid() ? this.toISOString() : null;
|
|
279
|
+
}, r.toISOString = function() {
|
|
280
|
+
return this.$d.toISOString();
|
|
281
|
+
}, r.toString = function() {
|
|
282
|
+
return this.$d.toUTCString();
|
|
283
|
+
}, s;
|
|
284
|
+
}(), V = F.prototype;
|
|
285
|
+
return d.prototype = V, [["$ms", U], ["$s", j], ["$m", O], ["$H", k], ["$W", x], ["$M", g], ["$y", M], ["$D", _]].forEach(function(s) {
|
|
286
|
+
V[s[1]] = function(r) {
|
|
287
|
+
return this.$g(r, s[0], s[1]);
|
|
288
|
+
};
|
|
289
|
+
}), d.extend = function(s, r) {
|
|
290
|
+
return s.$i || (s(r, F, d), s.$i = !0), d;
|
|
291
|
+
}, d.locale = A, d.isDayjs = J, d.unix = function(s) {
|
|
292
|
+
return d(1e3 * s);
|
|
293
|
+
}, d.en = D[T], d.Ls = D, d.p = {}, d;
|
|
294
|
+
});
|
|
295
|
+
})(X);
|
|
296
|
+
var dt = X.exports;
|
|
297
|
+
const ht = /* @__PURE__ */ at(dt), { Option: G } = K, { Paragraph: B } = lt, gt = () => {
|
|
298
|
+
const p = it(), z = [
|
|
299
|
+
{
|
|
300
|
+
key: "id",
|
|
301
|
+
title: "ID",
|
|
302
|
+
dataIndex: "id",
|
|
303
|
+
width: 100
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
key: "username",
|
|
307
|
+
title: p("global.username"),
|
|
308
|
+
dataIndex: "uname",
|
|
309
|
+
width: 100
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
key: "label",
|
|
313
|
+
title: p("global.label"),
|
|
314
|
+
dataIndex: "label",
|
|
315
|
+
width: 150
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
key: "method",
|
|
319
|
+
title: p("global.method"),
|
|
320
|
+
dataIndex: "method",
|
|
321
|
+
width: 100
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
key: "route",
|
|
325
|
+
title: p("global.route"),
|
|
326
|
+
dataIndex: "route"
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
key: "request",
|
|
330
|
+
title: p("global.request"),
|
|
331
|
+
dataIndex: "request",
|
|
332
|
+
render(f) {
|
|
333
|
+
return /* @__PURE__ */ c.jsx(B, { children: /* @__PURE__ */ c.jsx("pre", { className: "max-h-32 overflow-auto", children: f }) });
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
key: "response",
|
|
338
|
+
title: p("global.response"),
|
|
339
|
+
dataIndex: "response",
|
|
340
|
+
render(f) {
|
|
341
|
+
return /* @__PURE__ */ c.jsx(B, { children: /* @__PURE__ */ c.jsx("pre", { className: "max-h-32 overflow-auto", children: f }) });
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
key: "creation_time",
|
|
346
|
+
title: p("global.creationTime"),
|
|
347
|
+
dataIndex: "ctime",
|
|
348
|
+
width: 200,
|
|
349
|
+
render(f) {
|
|
350
|
+
return ht(f).format("YYYY-MM-DD HH:mm:ss");
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
];
|
|
354
|
+
return /* @__PURE__ */ c.jsx(ot, { title: "操作日志", children: /* @__PURE__ */ c.jsx(
|
|
355
|
+
ut,
|
|
356
|
+
{
|
|
357
|
+
tableLayout: "fixed",
|
|
358
|
+
renderForm: (f) => /* @__PURE__ */ c.jsx(H, { form: f, children: /* @__PURE__ */ c.jsxs(ct, { gutter: 10, children: [
|
|
359
|
+
/* @__PURE__ */ c.jsx(E, { span: 4, children: /* @__PURE__ */ c.jsx(H.Item, { label: p("global.username"), name: "uname", children: /* @__PURE__ */ c.jsx(Z, { allowClear: !0 }) }) }),
|
|
360
|
+
/* @__PURE__ */ c.jsx(E, { span: 4, children: /* @__PURE__ */ c.jsx(H.Item, { label: p("global.route"), name: "route", children: /* @__PURE__ */ c.jsx(Z, { allowClear: !0 }) }) }),
|
|
361
|
+
/* @__PURE__ */ c.jsx(E, { children: /* @__PURE__ */ c.jsx(H.Item, { label: p("global.method"), name: "method", children: /* @__PURE__ */ c.jsxs(K, { allowClear: !0, style: { width: "100px" }, children: [
|
|
362
|
+
/* @__PURE__ */ c.jsx(G, { value: "get", children: "GET" }),
|
|
363
|
+
/* @__PURE__ */ c.jsx(G, { value: "post", children: "POST" })
|
|
364
|
+
] }) }) }),
|
|
365
|
+
/* @__PURE__ */ c.jsx(E, { span: 4, children: /* @__PURE__ */ c.jsx(H.Item, { label: p("global.label"), name: "label", children: /* @__PURE__ */ c.jsx(Z, { allowClear: !0 }) }) })
|
|
366
|
+
] }) }),
|
|
367
|
+
rowKey: "id",
|
|
368
|
+
columns: z,
|
|
369
|
+
url: "/api/usystem/log/list",
|
|
370
|
+
transformArg: (f, w, L) => ({ ...L, page: f, size: w }),
|
|
371
|
+
transformResponse: (f) => ({
|
|
372
|
+
list: f.List,
|
|
373
|
+
total: f.Total
|
|
374
|
+
})
|
|
375
|
+
}
|
|
376
|
+
) });
|
|
377
|
+
};
|
|
378
|
+
export {
|
|
379
|
+
gt as default
|
|
380
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { u as o, j as t } from "./index-gdaNSPz6.chunk.js";
|
|
2
|
+
import { Result as r, Button as i } from "antd";
|
|
3
|
+
import { useNavigate as n } from "react-router-dom";
|
|
4
|
+
import "react";
|
|
5
|
+
import "react-dom";
|
|
6
|
+
const p = () => {
|
|
7
|
+
const s = n(), e = o();
|
|
8
|
+
return /* @__PURE__ */ t.jsx("div", { className: "h-screen flex justify-center items-center", children: /* @__PURE__ */ t.jsx(
|
|
9
|
+
r,
|
|
10
|
+
{
|
|
11
|
+
status: "404",
|
|
12
|
+
title: "404",
|
|
13
|
+
subTitle: e("NotFound.subTitle"),
|
|
14
|
+
extra: /* @__PURE__ */ t.jsx(
|
|
15
|
+
i,
|
|
16
|
+
{
|
|
17
|
+
type: "primary",
|
|
18
|
+
onClick: () => {
|
|
19
|
+
s("/");
|
|
20
|
+
},
|
|
21
|
+
children: e("NotFound.buttonText")
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
) });
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
p as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { u as t, j as i } from "./index-gdaNSPz6.chunk.js";
|
|
2
|
+
import { Breadcrumb as m, Card as n, Skeleton as a, Descriptions as r } from "antd";
|
|
3
|
+
import { useParams as c, Link as p } from "react-router-dom";
|
|
4
|
+
import { P as u } from "./index-46YNBewp.chunk.js";
|
|
5
|
+
import { u as x } from "./index-2yXDMFsB.chunk.js";
|
|
6
|
+
import "react";
|
|
7
|
+
import "react-dom";
|
|
8
|
+
const k = () => {
|
|
9
|
+
const l = c(), { data: e, isLoading: o } = x(l.name), s = t();
|
|
10
|
+
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
11
|
+
/* @__PURE__ */ i.jsx(
|
|
12
|
+
m,
|
|
13
|
+
{
|
|
14
|
+
style: { marginBottom: 24 },
|
|
15
|
+
items: [
|
|
16
|
+
{
|
|
17
|
+
key: "1",
|
|
18
|
+
title: /* @__PURE__ */ i.jsx(p, { to: "/permission/role", children: s("global.role") })
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
key: "2",
|
|
22
|
+
title: l.name
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
/* @__PURE__ */ i.jsx(n, { title: s("RoleDetail.title"), children: /* @__PURE__ */ i.jsxs(a, { loading: o, children: [
|
|
28
|
+
/* @__PURE__ */ i.jsxs(r, { column: 3, layout: "vertical", children: [
|
|
29
|
+
/* @__PURE__ */ i.jsx(r.Item, { label: s("global.name"), children: e == null ? void 0 : e.name }),
|
|
30
|
+
/* @__PURE__ */ i.jsx(r.Item, { label: "ID", children: e == null ? void 0 : e.id }),
|
|
31
|
+
/* @__PURE__ */ i.jsx(r.Item, { label: s("global.creationTime"), children: e == null ? void 0 : e.ctime })
|
|
32
|
+
] }),
|
|
33
|
+
/* @__PURE__ */ i.jsx(u, { readonly: !0, value: e == null ? void 0 : e.permissions })
|
|
34
|
+
] }) })
|
|
35
|
+
] });
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
k as default
|
|
39
|
+
};
|