react-toolkits 0.6.4 → 0.7.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/lib/{index--jnz8Frg.chunk.js → index--bIPEDMQ.chunk.js} +64 -67
- package/lib/{index-ECP_ZutN.chunk.js → index-8MPK_thw.chunk.js} +1 -1
- package/lib/{index-S1mUa9u-.chunk.js → index-BvENvvlB.chunk.js} +2 -2
- package/lib/{index-lhYimBU3.chunk.js → index-GL1a_6NT.chunk.js} +1 -1
- package/lib/index-JEVes6q2.chunk.js +5060 -0
- package/lib/{index-C1zHJkhR.chunk.js → index-NygYoB7I.chunk.js} +49 -51
- package/lib/{index-BQWKjChr.chunk.js → index-a0qTYCgs.chunk.js} +3 -3
- package/lib/{index-88cv7ztg.chunk.js → index-tzZwFuEm.chunk.js} +25 -25
- package/lib/{index-HsF-BHyJ.chunk.js → index-v7WE9XZC.chunk.js} +64 -67
- package/lib/index.d.ts +33 -35
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/lib/index-iX5ff45w.chunk.js +0 -15902
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { c as st, g as at, u as it, j as c, Q as ut } from "./index-
|
|
1
|
+
import { c as st, g as at, u as it, j as c, Q as ut } from "./index-JEVes6q2.chunk.js";
|
|
2
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
3
|
import "react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
import "react-router-dom";
|
|
6
6
|
var X = { exports: {} };
|
|
7
7
|
(function(p, z) {
|
|
8
|
-
(function(f,
|
|
9
|
-
p.exports =
|
|
8
|
+
(function(f, D) {
|
|
9
|
+
p.exports = D();
|
|
10
10
|
})(st, function() {
|
|
11
|
-
var f = 1e3,
|
|
11
|
+
var f = 1e3, D = 6e4, L = 36e5, U = "millisecond", j = "second", O = "minute", k = "hour", x = "day", W = "week", y = "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
12
|
var r = ["th", "st", "nd", "rd"], t = s % 100;
|
|
13
13
|
return "[" + s + (r[(t - 20) % 10] || r[t] || r[0]) + "]";
|
|
14
14
|
} }, q = function(s, r, t) {
|
|
@@ -20,31 +20,31 @@ var X = { exports: {} };
|
|
|
20
20
|
}, m: function s(r, t) {
|
|
21
21
|
if (r.date() < t.date())
|
|
22
22
|
return -s(t, r);
|
|
23
|
-
var n = 12 * (t.year() - r.year()) + (t.month() - r.month()), e = r.clone().add(n,
|
|
23
|
+
var n = 12 * (t.year() - r.year()) + (t.month() - r.month()), e = r.clone().add(n, y), a = t - e < 0, i = r.clone().add(n + (a ? -1 : 1), y);
|
|
24
24
|
return +(-(n + (t - e) / (a ? e - i : i - e)) || 0);
|
|
25
25
|
}, a: function(s) {
|
|
26
26
|
return s < 0 ? Math.ceil(s) || 0 : Math.floor(s);
|
|
27
27
|
}, p: function(s) {
|
|
28
|
-
return { M:
|
|
28
|
+
return { M: y, y: M, w: W, d: x, D: _, h: k, m: O, s: j, ms: U, Q: P }[s] || String(s || "").toLowerCase().replace(/s$/, "");
|
|
29
29
|
}, u: function(s) {
|
|
30
30
|
return s === void 0;
|
|
31
|
-
} }, T = "en",
|
|
32
|
-
|
|
33
|
-
var
|
|
34
|
-
return s instanceof F || !(!s || !s[
|
|
31
|
+
} }, T = "en", w = {};
|
|
32
|
+
w[T] = rt;
|
|
33
|
+
var V = "$isDayjsObject", J = function(s) {
|
|
34
|
+
return s instanceof F || !(!s || !s[V]);
|
|
35
35
|
}, A = function s(r, t, n) {
|
|
36
36
|
var e;
|
|
37
37
|
if (!r)
|
|
38
38
|
return T;
|
|
39
39
|
if (typeof r == "string") {
|
|
40
40
|
var a = r.toLowerCase();
|
|
41
|
-
|
|
41
|
+
w[a] && (e = a), t && (w[a] = t, e = a);
|
|
42
42
|
var i = r.split("-");
|
|
43
43
|
if (!e && i.length > 1)
|
|
44
44
|
return s(i[0]);
|
|
45
45
|
} else {
|
|
46
46
|
var o = r.name;
|
|
47
|
-
|
|
47
|
+
w[o] = r, e = o;
|
|
48
48
|
}
|
|
49
49
|
return !n && e && (T = e), e || !n && T;
|
|
50
50
|
}, d = function(s, r) {
|
|
@@ -58,7 +58,7 @@ var X = { exports: {} };
|
|
|
58
58
|
};
|
|
59
59
|
var F = function() {
|
|
60
60
|
function s(t) {
|
|
61
|
-
this.$L = A(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[
|
|
61
|
+
this.$L = A(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[V] = !0;
|
|
62
62
|
}
|
|
63
63
|
var r = s.prototype;
|
|
64
64
|
return r.parse = function(t) {
|
|
@@ -105,15 +105,15 @@ var X = { exports: {} };
|
|
|
105
105
|
return a ? v : v.endOf(x);
|
|
106
106
|
}, l = function(S, $) {
|
|
107
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,
|
|
108
|
+
}, h = this.$W, m = this.$M, g = this.$D, I = "set" + (this.$u ? "UTC" : "");
|
|
109
109
|
switch (i) {
|
|
110
110
|
case M:
|
|
111
111
|
return a ? o(1, 0) : o(31, 11);
|
|
112
|
-
case
|
|
112
|
+
case y:
|
|
113
113
|
return a ? o(1, m) : o(0, m + 1);
|
|
114
114
|
case W:
|
|
115
115
|
var b = this.$locale().weekStart || 0, Y = (h < b ? h + 7 : h) - b;
|
|
116
|
-
return o(a ?
|
|
116
|
+
return o(a ? g - Y : g + (6 - Y), m);
|
|
117
117
|
case x:
|
|
118
118
|
case _:
|
|
119
119
|
return l(I + "Hours", 0);
|
|
@@ -129,8 +129,8 @@ var X = { exports: {} };
|
|
|
129
129
|
}, r.endOf = function(t) {
|
|
130
130
|
return this.startOf(t, !1);
|
|
131
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[
|
|
133
|
-
if (a ===
|
|
132
|
+
var e, a = u.p(t), i = "set" + (this.$u ? "UTC" : ""), o = (e = {}, e[x] = i + "Date", e[_] = i + "Date", e[y] = 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 === y || a === M) {
|
|
134
134
|
var h = this.clone().set(_, 1);
|
|
135
135
|
h.$d[o](l), h.init(), this.$d = h.set(_, Math.min(this.$D, h.daysInMonth())).$d;
|
|
136
136
|
} else
|
|
@@ -144,18 +144,18 @@ var X = { exports: {} };
|
|
|
144
144
|
var e, a = this;
|
|
145
145
|
t = Number(t);
|
|
146
146
|
var i = u.p(n), o = function(m) {
|
|
147
|
-
var
|
|
148
|
-
return u.w(
|
|
147
|
+
var g = d(a);
|
|
148
|
+
return u.w(g.date(g.date() + Math.round(m * t)), a);
|
|
149
149
|
};
|
|
150
|
-
if (i ===
|
|
151
|
-
return this.set(
|
|
150
|
+
if (i === y)
|
|
151
|
+
return this.set(y, this.$M + t);
|
|
152
152
|
if (i === M)
|
|
153
153
|
return this.set(M, this.$y + t);
|
|
154
154
|
if (i === x)
|
|
155
155
|
return o(1);
|
|
156
156
|
if (i === W)
|
|
157
157
|
return o(7);
|
|
158
|
-
var l = (e = {}, e[O] =
|
|
158
|
+
var l = (e = {}, e[O] = D, e[k] = L, e[j] = f, e)[i] || 1, h = this.$d.getTime() + t * l;
|
|
159
159
|
return u.w(h, this);
|
|
160
160
|
}, r.subtract = function(t, n) {
|
|
161
161
|
return this.add(-1 * t, n);
|
|
@@ -163,7 +163,7 @@ var X = { exports: {} };
|
|
|
163
163
|
var n = this, e = this.$locale();
|
|
164
164
|
if (!this.isValid())
|
|
165
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,
|
|
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, g = e.months, I = e.meridiem, b = function($, v, C, N) {
|
|
167
167
|
return $ && ($[v] || $(n, a)) || C[v].slice(0, N);
|
|
168
168
|
}, Y = function($) {
|
|
169
169
|
return u.s(o % 12 || 12, $, "0");
|
|
@@ -183,9 +183,9 @@ var X = { exports: {} };
|
|
|
183
183
|
case "MM":
|
|
184
184
|
return u.s(h + 1, 2, "0");
|
|
185
185
|
case "MMM":
|
|
186
|
-
return b(e.monthsShort, h,
|
|
186
|
+
return b(e.monthsShort, h, g, 3);
|
|
187
187
|
case "MMMM":
|
|
188
|
-
return b(
|
|
188
|
+
return b(g, h);
|
|
189
189
|
case "D":
|
|
190
190
|
return n.$D;
|
|
191
191
|
case "DD":
|
|
@@ -229,18 +229,18 @@ var X = { exports: {} };
|
|
|
229
229
|
}, r.utcOffset = function() {
|
|
230
230
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
231
231
|
}, r.diff = function(t, n, e) {
|
|
232
|
-
var a, i = this, o = u.p(n), l = d(t), h = (l.utcOffset() - this.utcOffset()) *
|
|
232
|
+
var a, i = this, o = u.p(n), l = d(t), h = (l.utcOffset() - this.utcOffset()) * D, m = this - l, g = function() {
|
|
233
233
|
return u.m(i, l);
|
|
234
234
|
};
|
|
235
235
|
switch (o) {
|
|
236
236
|
case M:
|
|
237
|
-
a =
|
|
237
|
+
a = g() / 12;
|
|
238
238
|
break;
|
|
239
|
-
case
|
|
240
|
-
a =
|
|
239
|
+
case y:
|
|
240
|
+
a = g();
|
|
241
241
|
break;
|
|
242
242
|
case P:
|
|
243
|
-
a =
|
|
243
|
+
a = g() / 3;
|
|
244
244
|
break;
|
|
245
245
|
case W:
|
|
246
246
|
a = (m - h) / 6048e5;
|
|
@@ -252,7 +252,7 @@ var X = { exports: {} };
|
|
|
252
252
|
a = m / L;
|
|
253
253
|
break;
|
|
254
254
|
case O:
|
|
255
|
-
a = m /
|
|
255
|
+
a = m / D;
|
|
256
256
|
break;
|
|
257
257
|
case j:
|
|
258
258
|
a = m / f;
|
|
@@ -262,9 +262,9 @@ var X = { exports: {} };
|
|
|
262
262
|
}
|
|
263
263
|
return e ? a : u.a(a);
|
|
264
264
|
}, r.daysInMonth = function() {
|
|
265
|
-
return this.endOf(
|
|
265
|
+
return this.endOf(y).$D;
|
|
266
266
|
}, r.$locale = function() {
|
|
267
|
-
return
|
|
267
|
+
return w[this.$L];
|
|
268
268
|
}, r.locale = function(t, n) {
|
|
269
269
|
if (!t)
|
|
270
270
|
return this.$L;
|
|
@@ -281,20 +281,20 @@ var X = { exports: {} };
|
|
|
281
281
|
}, r.toString = function() {
|
|
282
282
|
return this.$d.toUTCString();
|
|
283
283
|
}, s;
|
|
284
|
-
}(),
|
|
285
|
-
return d.prototype =
|
|
286
|
-
|
|
284
|
+
}(), G = F.prototype;
|
|
285
|
+
return d.prototype = G, [["$ms", U], ["$s", j], ["$m", O], ["$H", k], ["$W", x], ["$M", y], ["$y", M], ["$D", _]].forEach(function(s) {
|
|
286
|
+
G[s[1]] = function(r) {
|
|
287
287
|
return this.$g(r, s[0], s[1]);
|
|
288
288
|
};
|
|
289
289
|
}), d.extend = function(s, r) {
|
|
290
290
|
return s.$i || (s(r, F, d), s.$i = !0), d;
|
|
291
291
|
}, d.locale = A, d.isDayjs = J, d.unix = function(s) {
|
|
292
292
|
return d(1e3 * s);
|
|
293
|
-
}, d.en =
|
|
293
|
+
}, d.en = w[T], d.Ls = w, d.p = {}, d;
|
|
294
294
|
});
|
|
295
295
|
})(X);
|
|
296
296
|
var dt = X.exports;
|
|
297
|
-
const ht = /* @__PURE__ */ at(dt), { Option:
|
|
297
|
+
const ht = /* @__PURE__ */ at(dt), { Option: R } = K, { Paragraph: B } = lt, yt = () => {
|
|
298
298
|
const p = it(), z = [
|
|
299
299
|
{
|
|
300
300
|
key: "id",
|
|
@@ -355,26 +355,24 @@ const ht = /* @__PURE__ */ at(dt), { Option: G } = K, { Paragraph: B } = lt, gt
|
|
|
355
355
|
ut,
|
|
356
356
|
{
|
|
357
357
|
tableLayout: "fixed",
|
|
358
|
+
rowKey: "id",
|
|
359
|
+
columns: z,
|
|
360
|
+
action: "/api/usystem/log/list",
|
|
361
|
+
params: ({ page: f, size: D, arg: L }) => ({ ...L, page: f, size: D }),
|
|
362
|
+
getTotal: (f) => f.Total,
|
|
363
|
+
getDataSource: (f) => f.List,
|
|
358
364
|
renderForm: (f) => /* @__PURE__ */ c.jsx(H, { form: f, children: /* @__PURE__ */ c.jsxs(ct, { gutter: 10, children: [
|
|
359
365
|
/* @__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
366
|
/* @__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
367
|
/* @__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(
|
|
363
|
-
/* @__PURE__ */ c.jsx(
|
|
368
|
+
/* @__PURE__ */ c.jsx(R, { value: "get", children: "GET" }),
|
|
369
|
+
/* @__PURE__ */ c.jsx(R, { value: "post", children: "POST" })
|
|
364
370
|
] }) }) }),
|
|
365
371
|
/* @__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
|
-
})
|
|
372
|
+
] }) })
|
|
375
373
|
}
|
|
376
374
|
) });
|
|
377
375
|
};
|
|
378
376
|
export {
|
|
379
|
-
|
|
377
|
+
yt as default
|
|
380
378
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { u as t, j as i } from "./index-
|
|
1
|
+
import { u as t, j as i } from "./index-JEVes6q2.chunk.js";
|
|
2
2
|
import { Breadcrumb as m, Card as n, Skeleton as a, Descriptions as r } from "antd";
|
|
3
3
|
import { useParams as c, Link as p } from "react-router-dom";
|
|
4
|
-
import { P as u } from "./index-
|
|
5
|
-
import { u as x } from "./index-
|
|
4
|
+
import { P as u } from "./index-BvENvvlB.chunk.js";
|
|
5
|
+
import { u as x } from "./index-tzZwFuEm.chunk.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import "react-dom";
|
|
8
8
|
const k = () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as O, w as W, i as h, k as x, s as z, m as
|
|
2
|
-
import L, { useRef as o, useCallback as
|
|
1
|
+
import { I as O, w as W, i as h, k as x, s as z, m as w, n as V, U as R, o as U, b as G, r as n, e as K } from "./index-JEVes6q2.chunk.js";
|
|
2
|
+
import L, { useRef as o, useCallback as N, useState as $ } from "react";
|
|
3
3
|
const P = O ? (e) => {
|
|
4
4
|
e();
|
|
5
5
|
} : L.startTransition, j = (e) => {
|
|
@@ -7,12 +7,12 @@ const P = O ? (e) => {
|
|
|
7
7
|
data: !1,
|
|
8
8
|
error: !1,
|
|
9
9
|
isValidating: !1
|
|
10
|
-
}), m =
|
|
10
|
+
}), m = N((c) => {
|
|
11
11
|
let a = !1;
|
|
12
12
|
const g = i.current;
|
|
13
|
-
for (const p in
|
|
13
|
+
for (const p in c) {
|
|
14
14
|
const s = p;
|
|
15
|
-
g[s] !==
|
|
15
|
+
g[s] !== c[s] && (g[s] = c[s], d.current[s] && (a = !0));
|
|
16
16
|
}
|
|
17
17
|
a && !r.current && t({});
|
|
18
18
|
}, []);
|
|
@@ -24,32 +24,32 @@ const P = O ? (e) => {
|
|
|
24
24
|
m
|
|
25
25
|
];
|
|
26
26
|
}, q = () => (e, t, r = {}) => {
|
|
27
|
-
const { mutate: i } = x(), d = o(e), m = o(t),
|
|
28
|
-
data:
|
|
29
|
-
error:
|
|
27
|
+
const { mutate: i } = x(), d = o(e), m = o(t), c = o(r), a = o(0), [g, p, s] = j({
|
|
28
|
+
data: R,
|
|
29
|
+
error: R,
|
|
30
30
|
isMutating: !1
|
|
31
|
-
}),
|
|
31
|
+
}), b = g.current, v = N(
|
|
32
32
|
async (D, T) => {
|
|
33
|
-
const [
|
|
33
|
+
const [y, I] = z(d.current);
|
|
34
34
|
if (!m.current)
|
|
35
35
|
throw new Error("Can’t trigger the mutation: missing fetcher.");
|
|
36
|
-
if (!
|
|
36
|
+
if (!y)
|
|
37
37
|
throw new Error("Can’t trigger the mutation: missing key.");
|
|
38
|
-
const
|
|
38
|
+
const l = w(w({
|
|
39
39
|
populateCache: !1,
|
|
40
40
|
throwOnError: !0
|
|
41
|
-
},
|
|
41
|
+
}, c.current), T), S = V();
|
|
42
42
|
a.current = S, s({
|
|
43
43
|
isMutating: !0
|
|
44
44
|
});
|
|
45
45
|
try {
|
|
46
46
|
const u = await i(
|
|
47
|
-
|
|
47
|
+
y,
|
|
48
48
|
m.current(I, {
|
|
49
49
|
arg: D
|
|
50
50
|
}),
|
|
51
51
|
// We must throw the error here so we can catch and update the states.
|
|
52
|
-
|
|
52
|
+
w(l, {
|
|
53
53
|
throwOnError: !0
|
|
54
54
|
})
|
|
55
55
|
);
|
|
@@ -59,7 +59,7 @@ const P = O ? (e) => {
|
|
|
59
59
|
data: u,
|
|
60
60
|
isMutating: !1,
|
|
61
61
|
error: void 0
|
|
62
|
-
})), (M = (C =
|
|
62
|
+
})), (M = (C = l).onSuccess) == null || M.call(C, u, y, l);
|
|
63
63
|
}
|
|
64
64
|
return u;
|
|
65
65
|
} catch (u) {
|
|
@@ -68,33 +68,33 @@ const P = O ? (e) => {
|
|
|
68
68
|
if (P(() => s({
|
|
69
69
|
error: u,
|
|
70
70
|
isMutating: !1
|
|
71
|
-
})), (E = (A =
|
|
71
|
+
})), (E = (A = l).onError) == null || E.call(A, u, y, l), l.throwOnError)
|
|
72
72
|
throw u;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
77
77
|
[]
|
|
78
|
-
), k =
|
|
78
|
+
), k = N(() => {
|
|
79
79
|
a.current = V(), s({
|
|
80
|
-
data:
|
|
81
|
-
error:
|
|
80
|
+
data: R,
|
|
81
|
+
error: R,
|
|
82
82
|
isMutating: !1
|
|
83
83
|
});
|
|
84
84
|
}, []);
|
|
85
85
|
return U(() => {
|
|
86
|
-
d.current = e, m.current = t,
|
|
86
|
+
d.current = e, m.current = t, c.current = r;
|
|
87
87
|
}), {
|
|
88
88
|
trigger: v,
|
|
89
89
|
reset: k,
|
|
90
90
|
get data() {
|
|
91
|
-
return p.data = !0,
|
|
91
|
+
return p.data = !0, b.data;
|
|
92
92
|
},
|
|
93
93
|
get error() {
|
|
94
|
-
return p.error = !0,
|
|
94
|
+
return p.error = !0, b.error;
|
|
95
95
|
},
|
|
96
96
|
get isMutating() {
|
|
97
|
-
return p.isMutating = !0,
|
|
97
|
+
return p.isMutating = !0, b.isMutating;
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
100
|
}, f = W(h, q);
|
|
@@ -111,7 +111,7 @@ function H() {
|
|
|
111
111
|
);
|
|
112
112
|
}
|
|
113
113
|
function J() {
|
|
114
|
-
const { accessible: e } = K("200005",
|
|
114
|
+
const { accessible: e } = K("200005", !0);
|
|
115
115
|
return h(
|
|
116
116
|
e ? "/api/usystem/role/all" : null,
|
|
117
117
|
(t) => n(t, { isGlobalNS: !0 }).then((r) => r.data)
|
|
@@ -1,70 +1,69 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { App as
|
|
3
|
-
import { p as
|
|
4
|
-
import { Link as
|
|
5
|
-
import { f as
|
|
6
|
-
import * as
|
|
1
|
+
import { A as M, _ as N, f as b, u as U, j as e, P as h, H as z, Q as H, h as S } from "./index-JEVes6q2.chunk.js";
|
|
2
|
+
import { App as y, Row as R, Col as E, Tag as L, Space as G, Card as D, Form as c, Input as j, Select as f } from "antd";
|
|
3
|
+
import { p as I } from "./immer-BLf7GM7E.chunk.js";
|
|
4
|
+
import { Link as P } from "react-router-dom";
|
|
5
|
+
import { f as Q, g as _, h as k, i as $ } from "./index-tzZwFuEm.chunk.js";
|
|
6
|
+
import * as O from "react";
|
|
7
7
|
import "react-dom";
|
|
8
|
-
var
|
|
9
|
-
const
|
|
10
|
-
var
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
ref:
|
|
13
|
-
icon:
|
|
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
|
+
const B = q;
|
|
10
|
+
var T = function(r, i) {
|
|
11
|
+
return /* @__PURE__ */ O.createElement(M, N({}, r, {
|
|
12
|
+
ref: i,
|
|
13
|
+
icon: B
|
|
14
14
|
}));
|
|
15
15
|
};
|
|
16
|
-
process.env.NODE_ENV !== "production" && (
|
|
17
|
-
const
|
|
16
|
+
process.env.NODE_ENV !== "production" && (T.displayName = "UserAddOutlined");
|
|
17
|
+
const F = /* @__PURE__ */ O.forwardRef(T), { Option: V } = f, g = "/api/usystem/user/list";
|
|
18
18
|
function K() {
|
|
19
|
-
const { message:
|
|
20
|
-
return
|
|
21
|
-
title:
|
|
22
|
-
content: (
|
|
23
|
-
/* @__PURE__ */ e.jsx(
|
|
24
|
-
/* @__PURE__ */ e.jsx(
|
|
19
|
+
const { message: d } = y.useApp(), r = _(), { data: i, isLoading: m } = k(), { setPayload: p } = b(), l = U();
|
|
20
|
+
return S({
|
|
21
|
+
title: l("UserList.createTitle"),
|
|
22
|
+
content: (n) => /* @__PURE__ */ e.jsxs(c, { form: n, labelCol: { flex: "80px" }, children: [
|
|
23
|
+
/* @__PURE__ */ e.jsx(c.Item, { label: l("global.name"), name: "name", rules: [{ required: !0 }], children: /* @__PURE__ */ e.jsx(j, {}) }),
|
|
24
|
+
/* @__PURE__ */ e.jsx(c.Item, { label: l("global.role"), name: "roles", children: /* @__PURE__ */ e.jsx(f, { allowClear: !0, mode: "multiple", loading: m, children: (i ?? []).map((o) => /* @__PURE__ */ e.jsx(V, { value: o.name, children: o.name }, o.id)) }) })
|
|
25
25
|
] }),
|
|
26
|
-
async onConfirm(
|
|
27
|
-
await
|
|
26
|
+
async onConfirm(n) {
|
|
27
|
+
await r.trigger(n), p(g, { page: 1 }), d.success(l("UserList.createSuccessfully"));
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
function J() {
|
|
32
|
-
const { message:
|
|
33
|
-
return
|
|
34
|
-
title:
|
|
35
|
-
content: (
|
|
36
|
-
/* @__PURE__ */ e.jsx(
|
|
37
|
-
/* @__PURE__ */ e.jsx(
|
|
38
|
-
/* @__PURE__ */ e.jsx(
|
|
39
|
-
|
|
32
|
+
const { message: d } = y.useApp(), r = $(), { data: i, isLoading: m } = k(), { mutate: p } = b(), l = U();
|
|
33
|
+
return S({
|
|
34
|
+
title: l("UserList.updateTitle"),
|
|
35
|
+
content: (n) => /* @__PURE__ */ e.jsxs(c, { form: n, labelCol: { flex: "80px" }, children: [
|
|
36
|
+
/* @__PURE__ */ e.jsx(c.Item, { hidden: !0, name: "id", children: /* @__PURE__ */ e.jsx(j, {}) }),
|
|
37
|
+
/* @__PURE__ */ e.jsx(c.Item, { label: l("global.name"), name: "name", rules: [{ required: !0 }], children: /* @__PURE__ */ e.jsx(j, { readOnly: !0 }) }),
|
|
38
|
+
/* @__PURE__ */ e.jsx(c.Item, { label: l("global.role"), name: "roles", children: /* @__PURE__ */ e.jsx(
|
|
39
|
+
f,
|
|
40
40
|
{
|
|
41
41
|
allowClear: !0,
|
|
42
42
|
mode: "multiple",
|
|
43
43
|
loading: m,
|
|
44
|
-
options:
|
|
45
|
-
label:
|
|
46
|
-
value:
|
|
44
|
+
options: i == null ? void 0 : i.map((o) => ({
|
|
45
|
+
label: o.name,
|
|
46
|
+
value: o.name
|
|
47
47
|
})),
|
|
48
48
|
dropdownStyle: { zIndex: 9999 }
|
|
49
49
|
}
|
|
50
50
|
) })
|
|
51
51
|
] }),
|
|
52
|
-
async onConfirm(
|
|
53
|
-
await
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
(i) => S(i, (s) => {
|
|
52
|
+
async onConfirm(n) {
|
|
53
|
+
await r.trigger(n), p(
|
|
54
|
+
g,
|
|
55
|
+
(o) => I(o, (s) => {
|
|
57
56
|
var t;
|
|
58
|
-
const x = (t = s == null ? void 0 : s.list) == null ? void 0 : t.find((
|
|
59
|
-
x && (x.roles =
|
|
57
|
+
const x = (t = s == null ? void 0 : s.list) == null ? void 0 : t.find((a) => a.id === n.id);
|
|
58
|
+
x && (x.roles = n.roles);
|
|
60
59
|
}),
|
|
61
60
|
{ revalidate: !1 }
|
|
62
|
-
),
|
|
61
|
+
), d.success(l("UserList.updateSuccessfully"));
|
|
63
62
|
}
|
|
64
63
|
});
|
|
65
64
|
}
|
|
66
|
-
const
|
|
67
|
-
const { modal:
|
|
65
|
+
const se = () => {
|
|
66
|
+
const { modal: d, message: r } = y.useApp(), i = Q(), { mutate: m } = b(), { show: p, contextHolder: l } = K(), { show: n, contextHolder: o } = J(), s = U(), x = [
|
|
68
67
|
{
|
|
69
68
|
title: s("global.name"),
|
|
70
69
|
dataIndex: "name",
|
|
@@ -81,7 +80,7 @@ const te = () => {
|
|
|
81
80
|
key: "roles",
|
|
82
81
|
width: "40%",
|
|
83
82
|
render(t) {
|
|
84
|
-
return /* @__PURE__ */ e.jsx(
|
|
83
|
+
return /* @__PURE__ */ e.jsx(R, { gutter: [4, 4], children: (t || []).map((a) => /* @__PURE__ */ e.jsx(E, { children: a === "root" ? /* @__PURE__ */ e.jsx(L, { color: "#f50", children: a }) : /* @__PURE__ */ e.jsx(L, { color: "#ff5a00", children: /* @__PURE__ */ e.jsx(P, { to: `/permission/role/${a}`, children: a }) }) }, a)) });
|
|
85
84
|
}
|
|
86
85
|
},
|
|
87
86
|
{
|
|
@@ -95,14 +94,14 @@ const te = () => {
|
|
|
95
94
|
align: "center",
|
|
96
95
|
render: (t) => /* @__PURE__ */ e.jsxs(G, { children: [
|
|
97
96
|
/* @__PURE__ */ e.jsx(
|
|
98
|
-
|
|
97
|
+
h,
|
|
99
98
|
{
|
|
100
99
|
isGlobalNS: !0,
|
|
101
100
|
size: "small",
|
|
102
101
|
type: "link",
|
|
103
102
|
code: "100003",
|
|
104
103
|
onClick: () => {
|
|
105
|
-
|
|
104
|
+
n({
|
|
106
105
|
initialValues: {
|
|
107
106
|
id: t.id,
|
|
108
107
|
name: t.name,
|
|
@@ -114,7 +113,7 @@ const te = () => {
|
|
|
114
113
|
}
|
|
115
114
|
),
|
|
116
115
|
/* @__PURE__ */ e.jsx(
|
|
117
|
-
|
|
116
|
+
h,
|
|
118
117
|
{
|
|
119
118
|
isGlobalNS: !0,
|
|
120
119
|
danger: !0,
|
|
@@ -122,18 +121,18 @@ const te = () => {
|
|
|
122
121
|
code: "100004",
|
|
123
122
|
type: "link",
|
|
124
123
|
onClick: () => {
|
|
125
|
-
|
|
124
|
+
d.confirm({
|
|
126
125
|
title: s("UserList.deleteTitle"),
|
|
127
|
-
content: /* @__PURE__ */ e.jsx(
|
|
126
|
+
content: /* @__PURE__ */ e.jsx(z, { texts: [t.name], children: s("UserList.deleteContent", { user: t.name }) }),
|
|
128
127
|
async onOk() {
|
|
129
|
-
await
|
|
128
|
+
await i.trigger({
|
|
130
129
|
id: t.id,
|
|
131
130
|
name: t.name
|
|
132
|
-
}), m(
|
|
131
|
+
}), m(g, (a) => I(a, (u) => {
|
|
133
132
|
var w, A;
|
|
134
|
-
const C = (w =
|
|
135
|
-
C && ((A =
|
|
136
|
-
})),
|
|
133
|
+
const C = (w = u == null ? void 0 : u.list) == null ? void 0 : w.findIndex((v) => v.id === t.id);
|
|
134
|
+
C && ((A = u == null ? void 0 : u.list) == null || A.splice(C, 1));
|
|
135
|
+
})), r.success(s("UserList.deleteSuccessfully"));
|
|
137
136
|
}
|
|
138
137
|
});
|
|
139
138
|
},
|
|
@@ -144,15 +143,15 @@ const te = () => {
|
|
|
144
143
|
}
|
|
145
144
|
];
|
|
146
145
|
return /* @__PURE__ */ e.jsxs(
|
|
147
|
-
|
|
146
|
+
D,
|
|
148
147
|
{
|
|
149
148
|
title: s("global.user"),
|
|
150
149
|
extra: /* @__PURE__ */ e.jsx(
|
|
151
|
-
|
|
150
|
+
h,
|
|
152
151
|
{
|
|
153
152
|
isGlobalNS: !0,
|
|
154
153
|
type: "primary",
|
|
155
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
154
|
+
icon: /* @__PURE__ */ e.jsx(F, {}),
|
|
156
155
|
code: "100002",
|
|
157
156
|
onClick: () => {
|
|
158
157
|
p();
|
|
@@ -162,26 +161,24 @@ const te = () => {
|
|
|
162
161
|
),
|
|
163
162
|
children: [
|
|
164
163
|
/* @__PURE__ */ e.jsx(
|
|
165
|
-
|
|
164
|
+
H,
|
|
166
165
|
{
|
|
167
166
|
isGlobalNS: !0,
|
|
168
167
|
code: "100001",
|
|
169
|
-
|
|
168
|
+
action: g,
|
|
170
169
|
rowKey: "id",
|
|
171
170
|
columns: x,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
return { list: o, total: a };
|
|
175
|
-
}
|
|
171
|
+
getTotal: (t) => t.Total,
|
|
172
|
+
getDataSource: (t) => t.List
|
|
176
173
|
}
|
|
177
174
|
),
|
|
178
|
-
|
|
179
|
-
|
|
175
|
+
l,
|
|
176
|
+
o
|
|
180
177
|
]
|
|
181
178
|
}
|
|
182
179
|
);
|
|
183
180
|
};
|
|
184
181
|
export {
|
|
185
|
-
|
|
186
|
-
|
|
182
|
+
g as action,
|
|
183
|
+
se as default
|
|
187
184
|
};
|