n-design-readonly-plugin 1.0.10 → 1.0.12
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 +6 -0
- package/dist/index.cjs.js +4 -4
- package/dist/index.d.ts +26 -3
- package/dist/index.es.js +380 -358
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { nextTick as
|
|
2
|
-
import { message as
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
var r =
|
|
1
|
+
import { nextTick as We, h as T, createVNode as ae, defineComponent as Ge, inject as ue, ref as B, computed as R, provide as se, useAttrs as qe } from "vue";
|
|
2
|
+
import { message as z, Form as de, Checkbox as pe, Radio as be, TimePicker as ye, DatePicker as ge, Select as me, Switch as Ke, Cascader as Ve, TreeSelect as Ye, Textarea as Je, InputNumber as Ze, Input as Qe } from "n-designv3";
|
|
3
|
+
function w(e, t) {
|
|
4
|
+
Xe(e) && (e = "100%");
|
|
5
|
+
var r = er(e);
|
|
6
6
|
return e = t === 360 ? e : Math.min(t, Math.max(0, parseFloat(e))), r && (e = parseInt(String(e * t), 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : (t === 360 ? e = (e < 0 ? e % t + t : e % t) / parseFloat(String(t)) : e = e % t / parseFloat(String(t)), e);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function Xe(e) {
|
|
9
9
|
return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function er(e) {
|
|
12
12
|
return typeof e == "string" && e.indexOf("%") !== -1;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function rr(e) {
|
|
15
15
|
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function U(e) {
|
|
18
18
|
return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function Z(e) {
|
|
21
21
|
return e.length === 1 ? "0" + e : String(e);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function tr(e, t, r) {
|
|
24
24
|
return {
|
|
25
|
-
r:
|
|
26
|
-
g:
|
|
27
|
-
b:
|
|
25
|
+
r: w(e, 255) * 255,
|
|
26
|
+
g: w(t, 255) * 255,
|
|
27
|
+
b: w(r, 255) * 255
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function Q(e, t, r) {
|
|
31
31
|
return r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? e + (t - e) * (6 * r) : r < 1 / 2 ? t : r < 2 / 3 ? e + (t - e) * (2 / 3 - r) * 6 : e;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function nr(e, t, r) {
|
|
34
34
|
var n, a, o;
|
|
35
|
-
if (e =
|
|
35
|
+
if (e = w(e, 360), t = w(t, 100), r = w(r, 100), t === 0)
|
|
36
36
|
a = r, o = r, n = r;
|
|
37
37
|
else {
|
|
38
38
|
var i = r < 0.5 ? r * (1 + t) : r + t - r * t, l = 2 * r - i;
|
|
39
|
-
n =
|
|
39
|
+
n = Q(l, i, e + 1 / 3), a = Q(l, i, e), o = Q(l, i, e - 1 / 3);
|
|
40
40
|
}
|
|
41
41
|
return { r: n * 255, g: a * 255, b: o * 255 };
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
e =
|
|
45
|
-
var n = Math.max(e, t, r), a = Math.min(e, t, r), o = 0, i = n, l = n - a,
|
|
43
|
+
function ar(e, t, r) {
|
|
44
|
+
e = w(e, 255), t = w(t, 255), r = w(r, 255);
|
|
45
|
+
var n = Math.max(e, t, r), a = Math.min(e, t, r), o = 0, i = n, l = n - a, c = n === 0 ? 0 : l / n;
|
|
46
46
|
if (n === a)
|
|
47
47
|
o = 0;
|
|
48
48
|
else {
|
|
@@ -59,28 +59,28 @@ function nr(e, t, r) {
|
|
|
59
59
|
}
|
|
60
60
|
o /= 6;
|
|
61
61
|
}
|
|
62
|
-
return { h: o, s:
|
|
62
|
+
return { h: o, s: c, v: i };
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
e =
|
|
66
|
-
var n = Math.floor(e), a = e - n, o = r * (1 - t), i = r * (1 - a * t), l = r * (1 - (1 - a) * t),
|
|
67
|
-
return { r:
|
|
64
|
+
function or(e, t, r) {
|
|
65
|
+
e = w(e, 360) * 6, t = w(t, 100), r = w(r, 100);
|
|
66
|
+
var n = Math.floor(e), a = e - n, o = r * (1 - t), i = r * (1 - a * t), l = r * (1 - (1 - a) * t), c = n % 6, f = [r, i, o, o, l, r][c], s = [l, r, r, i, o, o][c], S = [o, o, l, r, r, i][c];
|
|
67
|
+
return { r: f * 255, g: s * 255, b: S * 255 };
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function ir(e, t, r, n) {
|
|
70
70
|
var a = [
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
Z(Math.round(e).toString(16)),
|
|
72
|
+
Z(Math.round(t).toString(16)),
|
|
73
|
+
Z(Math.round(r).toString(16))
|
|
74
74
|
];
|
|
75
75
|
return a.join("");
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
return
|
|
77
|
+
function he(e) {
|
|
78
|
+
return k(e) / 255;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function k(e) {
|
|
81
81
|
return parseInt(e, 16);
|
|
82
82
|
}
|
|
83
|
-
var
|
|
83
|
+
var ve = {
|
|
84
84
|
aliceblue: "#f0f8ff",
|
|
85
85
|
antiquewhite: "#faebd7",
|
|
86
86
|
aqua: "#00ffff",
|
|
@@ -230,9 +230,9 @@ var ge = {
|
|
|
230
230
|
yellow: "#ffff00",
|
|
231
231
|
yellowgreen: "#9acd32"
|
|
232
232
|
};
|
|
233
|
-
function
|
|
233
|
+
function M(e) {
|
|
234
234
|
var t = { r: 0, g: 0, b: 0 }, r = 1, n = null, a = null, o = null, i = !1, l = !1;
|
|
235
|
-
return typeof e == "string" && (e = fr(e)), typeof e == "object" && (O(e.r) && O(e.g) && O(e.b) ? (t =
|
|
235
|
+
return typeof e == "string" && (e = fr(e)), typeof e == "object" && (O(e.r) && O(e.g) && O(e.b) ? (t = tr(e.r, e.g, e.b), i = !0, l = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : O(e.h) && O(e.s) && O(e.v) ? (n = U(e.s), a = U(e.v), t = or(e.h, n, a), i = !0, l = "hsv") : O(e.h) && O(e.s) && O(e.l) && (n = U(e.s), o = U(e.l), t = nr(e.h, n, o), i = !0, l = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (r = e.a)), r = rr(r), {
|
|
236
236
|
ok: i,
|
|
237
237
|
format: e.format || l,
|
|
238
238
|
r: Math.min(255, Math.max(t.r, 0)),
|
|
@@ -241,14 +241,14 @@ function $(e) {
|
|
|
241
241
|
a: r
|
|
242
242
|
};
|
|
243
243
|
}
|
|
244
|
-
var
|
|
245
|
-
CSS_UNIT: new RegExp(
|
|
246
|
-
rgb: new RegExp("rgb" +
|
|
247
|
-
rgba: new RegExp("rgba" +
|
|
248
|
-
hsl: new RegExp("hsl" +
|
|
249
|
-
hsla: new RegExp("hsla" +
|
|
250
|
-
hsv: new RegExp("hsv" +
|
|
251
|
-
hsva: new RegExp("hsva" +
|
|
244
|
+
var lr = "[-\\+]?\\d+%?", cr = "[-\\+]?\\d*\\.\\d+%?", N = "(?:".concat(cr, ")|(?:").concat(lr, ")"), X = "[\\s|\\(]+(".concat(N, ")[,|\\s]+(").concat(N, ")[,|\\s]+(").concat(N, ")\\s*\\)?"), ee = "[\\s|\\(]+(".concat(N, ")[,|\\s]+(").concat(N, ")[,|\\s]+(").concat(N, ")[,|\\s]+(").concat(N, ")\\s*\\)?"), x = {
|
|
245
|
+
CSS_UNIT: new RegExp(N),
|
|
246
|
+
rgb: new RegExp("rgb" + X),
|
|
247
|
+
rgba: new RegExp("rgba" + ee),
|
|
248
|
+
hsl: new RegExp("hsl" + X),
|
|
249
|
+
hsla: new RegExp("hsla" + ee),
|
|
250
|
+
hsv: new RegExp("hsv" + X),
|
|
251
|
+
hsva: new RegExp("hsva" + ee),
|
|
252
252
|
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
253
253
|
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
254
254
|
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
@@ -258,39 +258,39 @@ function fr(e) {
|
|
|
258
258
|
if (e = e.trim().toLowerCase(), e.length === 0)
|
|
259
259
|
return !1;
|
|
260
260
|
var t = !1;
|
|
261
|
-
if (
|
|
262
|
-
e =
|
|
261
|
+
if (ve[e])
|
|
262
|
+
e = ve[e], t = !0;
|
|
263
263
|
else if (e === "transparent")
|
|
264
264
|
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
|
265
265
|
var r = x.rgb.exec(e);
|
|
266
266
|
return r ? { r: r[1], g: r[2], b: r[3] } : (r = x.rgba.exec(e), r ? { r: r[1], g: r[2], b: r[3], a: r[4] } : (r = x.hsl.exec(e), r ? { h: r[1], s: r[2], l: r[3] } : (r = x.hsla.exec(e), r ? { h: r[1], s: r[2], l: r[3], a: r[4] } : (r = x.hsv.exec(e), r ? { h: r[1], s: r[2], v: r[3] } : (r = x.hsva.exec(e), r ? { h: r[1], s: r[2], v: r[3], a: r[4] } : (r = x.hex8.exec(e), r ? {
|
|
267
|
-
r:
|
|
268
|
-
g:
|
|
269
|
-
b:
|
|
270
|
-
a:
|
|
267
|
+
r: k(r[1]),
|
|
268
|
+
g: k(r[2]),
|
|
269
|
+
b: k(r[3]),
|
|
270
|
+
a: he(r[4]),
|
|
271
271
|
format: t ? "name" : "hex8"
|
|
272
272
|
} : (r = x.hex6.exec(e), r ? {
|
|
273
|
-
r:
|
|
274
|
-
g:
|
|
275
|
-
b:
|
|
273
|
+
r: k(r[1]),
|
|
274
|
+
g: k(r[2]),
|
|
275
|
+
b: k(r[3]),
|
|
276
276
|
format: t ? "name" : "hex"
|
|
277
277
|
} : (r = x.hex4.exec(e), r ? {
|
|
278
|
-
r:
|
|
279
|
-
g:
|
|
280
|
-
b:
|
|
281
|
-
a:
|
|
278
|
+
r: k(r[1] + r[1]),
|
|
279
|
+
g: k(r[2] + r[2]),
|
|
280
|
+
b: k(r[3] + r[3]),
|
|
281
|
+
a: he(r[4] + r[4]),
|
|
282
282
|
format: t ? "name" : "hex8"
|
|
283
283
|
} : (r = x.hex3.exec(e), r ? {
|
|
284
|
-
r:
|
|
285
|
-
g:
|
|
286
|
-
b:
|
|
284
|
+
r: k(r[1] + r[1]),
|
|
285
|
+
g: k(r[2] + r[2]),
|
|
286
|
+
b: k(r[3] + r[3]),
|
|
287
287
|
format: t ? "name" : "hex"
|
|
288
288
|
} : !1)))))))));
|
|
289
289
|
}
|
|
290
290
|
function O(e) {
|
|
291
291
|
return !!x.CSS_UNIT.exec(String(e));
|
|
292
292
|
}
|
|
293
|
-
var
|
|
293
|
+
var W = 2, ke = 0.16, ur = 0.05, sr = 0.05, dr = 0.15, Fe = 5, Re = 4, pr = [{
|
|
294
294
|
index: 7,
|
|
295
295
|
opacity: 0.15
|
|
296
296
|
}, {
|
|
@@ -321,19 +321,19 @@ var U = 2, me = 0.16, cr = 0.05, ur = 0.05, sr = 0.15, Ee = 5, Fe = 4, dr = [{
|
|
|
321
321
|
index: 1,
|
|
322
322
|
opacity: 0.98
|
|
323
323
|
}];
|
|
324
|
-
function
|
|
325
|
-
var t = e.r, r = e.g, n = e.b, a =
|
|
324
|
+
function Ce(e) {
|
|
325
|
+
var t = e.r, r = e.g, n = e.b, a = ar(t, r, n);
|
|
326
326
|
return {
|
|
327
327
|
h: a.h * 360,
|
|
328
328
|
s: a.s,
|
|
329
329
|
v: a.v
|
|
330
330
|
};
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function G(e) {
|
|
333
333
|
var t = e.r, r = e.g, n = e.b;
|
|
334
|
-
return "#".concat(
|
|
334
|
+
return "#".concat(ir(t, r, n));
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function br(e, t, r) {
|
|
337
337
|
var n = r / 100, a = {
|
|
338
338
|
r: (t.r - e.r) * n + e.r,
|
|
339
339
|
g: (t.g - e.g) * n + e.g,
|
|
@@ -341,44 +341,44 @@ function pr(e, t, r) {
|
|
|
341
341
|
};
|
|
342
342
|
return a;
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function we(e, t, r) {
|
|
345
345
|
var n;
|
|
346
|
-
return Math.round(e.h) >= 60 && Math.round(e.h) <= 240 ? n = r ? Math.round(e.h) -
|
|
346
|
+
return Math.round(e.h) >= 60 && Math.round(e.h) <= 240 ? n = r ? Math.round(e.h) - W * t : Math.round(e.h) + W * t : n = r ? Math.round(e.h) + W * t : Math.round(e.h) - W * t, n < 0 ? n += 360 : n >= 360 && (n -= 360), n;
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function Se(e, t, r) {
|
|
349
349
|
if (e.h === 0 && e.s === 0)
|
|
350
350
|
return e.s;
|
|
351
351
|
var n;
|
|
352
|
-
return r ? n = e.s -
|
|
352
|
+
return r ? n = e.s - ke * t : t === Re ? n = e.s + ke : n = e.s + ur * t, n > 1 && (n = 1), r && t === Fe && n > 0.1 && (n = 0.1), n < 0.06 && (n = 0.06), Number(n.toFixed(2));
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function xe(e, t, r) {
|
|
355
355
|
var n;
|
|
356
|
-
return r ? n = e.v +
|
|
357
|
-
}
|
|
358
|
-
function
|
|
359
|
-
for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = [], n =
|
|
360
|
-
var o =
|
|
361
|
-
h:
|
|
362
|
-
s:
|
|
363
|
-
v:
|
|
356
|
+
return r ? n = e.v + sr * t : n = e.v - dr * t, n > 1 && (n = 1), Number(n.toFixed(2));
|
|
357
|
+
}
|
|
358
|
+
function oe(e) {
|
|
359
|
+
for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = [], n = M(e), a = Fe; a > 0; a -= 1) {
|
|
360
|
+
var o = Ce(n), i = G(M({
|
|
361
|
+
h: we(o, a, !0),
|
|
362
|
+
s: Se(o, a, !0),
|
|
363
|
+
v: xe(o, a, !0)
|
|
364
364
|
}));
|
|
365
365
|
r.push(i);
|
|
366
366
|
}
|
|
367
|
-
r.push(
|
|
368
|
-
for (var l = 1; l <=
|
|
369
|
-
var
|
|
370
|
-
h:
|
|
371
|
-
s:
|
|
372
|
-
v:
|
|
367
|
+
r.push(G(n));
|
|
368
|
+
for (var l = 1; l <= Re; l += 1) {
|
|
369
|
+
var c = Ce(n), f = G(M({
|
|
370
|
+
h: we(c, l),
|
|
371
|
+
s: Se(c, l),
|
|
372
|
+
v: xe(c, l)
|
|
373
373
|
}));
|
|
374
|
-
r.push(
|
|
374
|
+
r.push(f);
|
|
375
375
|
}
|
|
376
|
-
return t.theme === "dark" ?
|
|
377
|
-
var S = s.index,
|
|
378
|
-
return
|
|
376
|
+
return t.theme === "dark" ? pr.map(function(s) {
|
|
377
|
+
var S = s.index, m = s.opacity, P = G(br(M(t.backgroundColor || "#141414"), M(r[S]), m * 100));
|
|
378
|
+
return P;
|
|
379
379
|
}) : r;
|
|
380
380
|
}
|
|
381
|
-
var
|
|
381
|
+
var re = {
|
|
382
382
|
red: "#F5222D",
|
|
383
383
|
volcano: "#FA541C",
|
|
384
384
|
orange: "#FA8C16",
|
|
@@ -392,45 +392,45 @@ var ee = {
|
|
|
392
392
|
purple: "#722ED1",
|
|
393
393
|
magenta: "#EB2F96",
|
|
394
394
|
grey: "#666666"
|
|
395
|
-
},
|
|
396
|
-
Object.keys(
|
|
397
|
-
|
|
395
|
+
}, te = {}, ne = {};
|
|
396
|
+
Object.keys(re).forEach(function(e) {
|
|
397
|
+
te[e] = oe(re[e]), te[e].primary = te[e][5], ne[e] = oe(re[e], {
|
|
398
398
|
theme: "dark",
|
|
399
399
|
backgroundColor: "#141414"
|
|
400
|
-
}),
|
|
400
|
+
}), ne[e].primary = ne[e][5];
|
|
401
401
|
});
|
|
402
|
-
var
|
|
403
|
-
function
|
|
402
|
+
var Oe = [], $ = [], yr = "insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";
|
|
403
|
+
function gr() {
|
|
404
404
|
var e = document.createElement("style");
|
|
405
405
|
return e.setAttribute("type", "text/css"), e;
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function mr(e, t) {
|
|
408
408
|
if (t = t || {}, e === void 0)
|
|
409
|
-
throw new Error(
|
|
410
|
-
var r = t.prepend === !0 ? "prepend" : "append", n = t.container !== void 0 ? t.container : document.querySelector("head"), a =
|
|
411
|
-
a === -1 && (a =
|
|
409
|
+
throw new Error(yr);
|
|
410
|
+
var r = t.prepend === !0 ? "prepend" : "append", n = t.container !== void 0 ? t.container : document.querySelector("head"), a = Oe.indexOf(n);
|
|
411
|
+
a === -1 && (a = Oe.push(n) - 1, $[a] = {});
|
|
412
412
|
var o;
|
|
413
|
-
return
|
|
413
|
+
return $[a] !== void 0 && $[a][r] !== void 0 ? o = $[a][r] : (o = $[a][r] = gr(), r === "prepend" ? n.insertBefore(o, n.childNodes[0]) : n.appendChild(o)), e.charCodeAt(0) === 65279 && (e = e.substr(1, e.length)), o.styleSheet ? o.styleSheet.cssText += e : o.textContent += e, o;
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function Te(e) {
|
|
416
416
|
for (var t = 1; t < arguments.length; t++) {
|
|
417
417
|
var r = arguments[t] != null ? Object(arguments[t]) : {}, n = Object.keys(r);
|
|
418
418
|
typeof Object.getOwnPropertySymbols == "function" && n.push.apply(n, Object.getOwnPropertySymbols(r).filter(function(a) {
|
|
419
419
|
return Object.getOwnPropertyDescriptor(r, a).enumerable;
|
|
420
420
|
})), n.forEach(function(a) {
|
|
421
|
-
|
|
421
|
+
hr(e, a, r[a]);
|
|
422
422
|
});
|
|
423
423
|
}
|
|
424
424
|
return e;
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function hr(e, t, r) {
|
|
427
427
|
return t = vr(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
428
428
|
}
|
|
429
429
|
function vr(e) {
|
|
430
|
-
var t =
|
|
430
|
+
var t = kr(e, "string");
|
|
431
431
|
return typeof t == "symbol" ? t : String(t);
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function kr(e, t) {
|
|
434
434
|
if (typeof e != "object" || e === null) return e;
|
|
435
435
|
var r = e[Symbol.toPrimitive];
|
|
436
436
|
if (r !== void 0) {
|
|
@@ -440,30 +440,30 @@ function hr(e, t) {
|
|
|
440
440
|
}
|
|
441
441
|
return (t === "string" ? String : Number)(e);
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function Cr(e, t) {
|
|
444
444
|
process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error("Warning: ".concat(t));
|
|
445
445
|
}
|
|
446
|
-
function
|
|
447
|
-
|
|
446
|
+
function wr(e, t) {
|
|
447
|
+
Cr(e, "[@nancal-icon/icons-vue] ".concat(t));
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function Pe(e) {
|
|
450
450
|
return typeof e == "object" && typeof e.name == "string" && typeof e.theme == "string" && (typeof e.icon == "object" || typeof e.icon == "function");
|
|
451
451
|
}
|
|
452
|
-
function
|
|
453
|
-
return r ?
|
|
452
|
+
function ie(e, t, r) {
|
|
453
|
+
return r ? T(e.tag, Te({
|
|
454
454
|
key: t
|
|
455
455
|
}, r, e.attrs), (e.children || []).map(function(n, a) {
|
|
456
|
-
return
|
|
457
|
-
})) :
|
|
456
|
+
return ie(n, "".concat(t, "-").concat(e.tag, "-").concat(a));
|
|
457
|
+
})) : T(e.tag, Te({
|
|
458
458
|
key: t
|
|
459
459
|
}, e.attrs), (e.children || []).map(function(n, a) {
|
|
460
|
-
return
|
|
460
|
+
return ie(n, "".concat(t, "-").concat(e.tag, "-").concat(a));
|
|
461
461
|
}));
|
|
462
462
|
}
|
|
463
|
-
function Ie(e) {
|
|
464
|
-
return ae(e)[0];
|
|
465
|
-
}
|
|
466
463
|
function Me(e) {
|
|
464
|
+
return oe(e)[0];
|
|
465
|
+
}
|
|
466
|
+
function $e(e) {
|
|
467
467
|
return e ? Array.isArray(e) ? e : [e] : [];
|
|
468
468
|
}
|
|
469
469
|
var Sr = `
|
|
@@ -520,17 +520,17 @@ var Sr = `
|
|
|
520
520
|
transform: rotate(360deg);
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
`,
|
|
523
|
+
`, Ae = !1, xr = function() {
|
|
524
524
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Sr;
|
|
525
|
-
|
|
526
|
-
|
|
525
|
+
We(function() {
|
|
526
|
+
Ae || (typeof window < "u" && window.document && window.document.documentElement && mr(t, {
|
|
527
527
|
prepend: !0
|
|
528
|
-
}),
|
|
528
|
+
}), Ae = !0);
|
|
529
529
|
});
|
|
530
530
|
}, Or = ["icon", "primaryColor", "secondaryColor"];
|
|
531
|
-
function
|
|
531
|
+
function Tr(e, t) {
|
|
532
532
|
if (e == null) return {};
|
|
533
|
-
var r =
|
|
533
|
+
var r = Pr(e, t), n, a;
|
|
534
534
|
if (Object.getOwnPropertySymbols) {
|
|
535
535
|
var o = Object.getOwnPropertySymbols(e);
|
|
536
536
|
for (a = 0; a < o.length; a++)
|
|
@@ -538,14 +538,14 @@ function kr(e, t) {
|
|
|
538
538
|
}
|
|
539
539
|
return r;
|
|
540
540
|
}
|
|
541
|
-
function
|
|
541
|
+
function Pr(e, t) {
|
|
542
542
|
if (e == null) return {};
|
|
543
543
|
var r = {}, n = Object.keys(e), a, o;
|
|
544
544
|
for (o = 0; o < n.length; o++)
|
|
545
545
|
a = n[o], !(t.indexOf(a) >= 0) && (r[a] = e[a]);
|
|
546
546
|
return r;
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function q(e) {
|
|
549
549
|
for (var t = 1; t < arguments.length; t++) {
|
|
550
550
|
var r = arguments[t] != null ? Object(arguments[t]) : {}, n = Object.keys(r);
|
|
551
551
|
typeof Object.getOwnPropertySymbols == "function" && n.push.apply(n, Object.getOwnPropertySymbols(r).filter(function(a) {
|
|
@@ -560,10 +560,10 @@ function Ar(e, t, r) {
|
|
|
560
560
|
return t = jr(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
561
561
|
}
|
|
562
562
|
function jr(e) {
|
|
563
|
-
var t =
|
|
563
|
+
var t = Nr(e, "string");
|
|
564
564
|
return typeof t == "symbol" ? t : String(t);
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function Nr(e, t) {
|
|
567
567
|
if (typeof e != "object" || e === null) return e;
|
|
568
568
|
var r = e[Symbol.toPrimitive];
|
|
569
569
|
if (r !== void 0) {
|
|
@@ -573,159 +573,159 @@ function Pr(e, t) {
|
|
|
573
573
|
}
|
|
574
574
|
return (t === "string" ? String : Number)(e);
|
|
575
575
|
}
|
|
576
|
-
var
|
|
576
|
+
var _ = {
|
|
577
577
|
primaryColor: "#333",
|
|
578
578
|
secondaryColor: "#E6E6E6",
|
|
579
579
|
calculated: !1
|
|
580
580
|
};
|
|
581
|
-
function
|
|
581
|
+
function Ir(e) {
|
|
582
582
|
var t = e.primaryColor, r = e.secondaryColor;
|
|
583
|
-
|
|
583
|
+
_.primaryColor = t, _.secondaryColor = r || Me(t), _.calculated = !!r;
|
|
584
584
|
}
|
|
585
|
-
function
|
|
586
|
-
return
|
|
585
|
+
function Er() {
|
|
586
|
+
return q({}, _);
|
|
587
587
|
}
|
|
588
|
-
var
|
|
589
|
-
var n =
|
|
590
|
-
if (o && (
|
|
588
|
+
var I = function(t, r) {
|
|
589
|
+
var n = q({}, t, r.attrs), a = n.icon, o = n.primaryColor, i = n.secondaryColor, l = Tr(n, Or), c = _;
|
|
590
|
+
if (o && (c = {
|
|
591
591
|
primaryColor: o,
|
|
592
|
-
secondaryColor: i ||
|
|
593
|
-
}), xr(),
|
|
592
|
+
secondaryColor: i || Me(o)
|
|
593
|
+
}), xr(), wr(Pe(a), "icon should be icon definiton, but got ".concat(a)), !Pe(a))
|
|
594
594
|
return null;
|
|
595
|
-
var
|
|
596
|
-
return
|
|
597
|
-
icon:
|
|
598
|
-
})),
|
|
599
|
-
"data-icon":
|
|
595
|
+
var f = a;
|
|
596
|
+
return f && typeof f.icon == "function" && (f = q({}, f, {
|
|
597
|
+
icon: f.icon(c.primaryColor, c.secondaryColor)
|
|
598
|
+
})), ie(f.icon, "svg-".concat(f.name), q({}, l, {
|
|
599
|
+
"data-icon": f.name,
|
|
600
600
|
width: "1em",
|
|
601
601
|
height: "1em",
|
|
602
602
|
fill: "currentColor",
|
|
603
603
|
"aria-hidden": "true"
|
|
604
604
|
}));
|
|
605
605
|
};
|
|
606
|
-
|
|
606
|
+
I.props = {
|
|
607
607
|
icon: Object,
|
|
608
608
|
primaryColor: String,
|
|
609
609
|
secondaryColor: String,
|
|
610
610
|
focusable: String
|
|
611
611
|
};
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
function
|
|
617
|
-
return
|
|
618
|
-
}
|
|
619
|
-
function
|
|
612
|
+
I.inheritAttrs = !1;
|
|
613
|
+
I.displayName = "IconBase";
|
|
614
|
+
I.getTwoToneColors = Er;
|
|
615
|
+
I.setTwoToneColors = Ir;
|
|
616
|
+
function Fr(e, t) {
|
|
617
|
+
return _r(e) || $r(e, t) || Mr(e, t) || Rr();
|
|
618
|
+
}
|
|
619
|
+
function Rr() {
|
|
620
620
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
621
621
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function Mr(e, t) {
|
|
624
624
|
if (e) {
|
|
625
|
-
if (typeof e == "string") return
|
|
625
|
+
if (typeof e == "string") return je(e, t);
|
|
626
626
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
627
627
|
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
|
|
628
|
-
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return
|
|
628
|
+
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return je(e, t);
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function je(e, t) {
|
|
632
632
|
(t == null || t > e.length) && (t = e.length);
|
|
633
633
|
for (var r = 0, n = new Array(t); r < t; r++) n[r] = e[r];
|
|
634
634
|
return n;
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function $r(e, t) {
|
|
637
637
|
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
638
638
|
if (r != null) {
|
|
639
|
-
var n, a, o, i, l = [],
|
|
639
|
+
var n, a, o, i, l = [], c = !0, f = !1;
|
|
640
640
|
try {
|
|
641
|
-
if (o = (r = r.call(e)).next, t !== 0) for (; !(
|
|
641
|
+
if (o = (r = r.call(e)).next, t !== 0) for (; !(c = (n = o.call(r)).done) && (l.push(n.value), l.length !== t); c = !0) ;
|
|
642
642
|
} catch (s) {
|
|
643
|
-
|
|
643
|
+
f = !0, a = s;
|
|
644
644
|
} finally {
|
|
645
645
|
try {
|
|
646
|
-
if (!
|
|
646
|
+
if (!c && r.return != null && (i = r.return(), Object(i) !== i)) return;
|
|
647
647
|
} finally {
|
|
648
|
-
if (
|
|
648
|
+
if (f) throw a;
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
651
|
return l;
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
|
-
function
|
|
654
|
+
function _r(e) {
|
|
655
655
|
if (Array.isArray(e)) return e;
|
|
656
656
|
}
|
|
657
|
-
function
|
|
658
|
-
var t =
|
|
659
|
-
return
|
|
657
|
+
function _e(e) {
|
|
658
|
+
var t = $e(e), r = Fr(t, 2), n = r[0], a = r[1];
|
|
659
|
+
return I.setTwoToneColors({
|
|
660
660
|
primaryColor: n,
|
|
661
661
|
secondaryColor: a
|
|
662
662
|
});
|
|
663
663
|
}
|
|
664
|
-
function
|
|
665
|
-
var e =
|
|
664
|
+
function Dr() {
|
|
665
|
+
var e = I.getTwoToneColors();
|
|
666
666
|
return e.calculated ? [e.primaryColor, e.secondaryColor] : e.primaryColor;
|
|
667
667
|
}
|
|
668
668
|
var Lr = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
|
|
669
|
-
function
|
|
670
|
-
return
|
|
669
|
+
function Hr(e, t) {
|
|
670
|
+
return Wr(e) || Ur(e, t) || zr(e, t) || Br();
|
|
671
671
|
}
|
|
672
|
-
function
|
|
672
|
+
function Br() {
|
|
673
673
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
674
674
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
675
675
|
}
|
|
676
|
-
function
|
|
676
|
+
function zr(e, t) {
|
|
677
677
|
if (e) {
|
|
678
|
-
if (typeof e == "string") return
|
|
678
|
+
if (typeof e == "string") return Ne(e, t);
|
|
679
679
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
680
680
|
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
|
|
681
|
-
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return
|
|
681
|
+
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Ne(e, t);
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function Ne(e, t) {
|
|
685
685
|
(t == null || t > e.length) && (t = e.length);
|
|
686
686
|
for (var r = 0, n = new Array(t); r < t; r++) n[r] = e[r];
|
|
687
687
|
return n;
|
|
688
688
|
}
|
|
689
|
-
function
|
|
689
|
+
function Ur(e, t) {
|
|
690
690
|
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
691
691
|
if (r != null) {
|
|
692
|
-
var n, a, o, i, l = [],
|
|
692
|
+
var n, a, o, i, l = [], c = !0, f = !1;
|
|
693
693
|
try {
|
|
694
|
-
if (o = (r = r.call(e)).next, t !== 0) for (; !(
|
|
694
|
+
if (o = (r = r.call(e)).next, t !== 0) for (; !(c = (n = o.call(r)).done) && (l.push(n.value), l.length !== t); c = !0) ;
|
|
695
695
|
} catch (s) {
|
|
696
|
-
|
|
696
|
+
f = !0, a = s;
|
|
697
697
|
} finally {
|
|
698
698
|
try {
|
|
699
|
-
if (!
|
|
699
|
+
if (!c && r.return != null && (i = r.return(), Object(i) !== i)) return;
|
|
700
700
|
} finally {
|
|
701
|
-
if (
|
|
701
|
+
if (f) throw a;
|
|
702
702
|
}
|
|
703
703
|
}
|
|
704
704
|
return l;
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
|
-
function
|
|
707
|
+
function Wr(e) {
|
|
708
708
|
if (Array.isArray(e)) return e;
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function Ie(e) {
|
|
711
711
|
for (var t = 1; t < arguments.length; t++) {
|
|
712
712
|
var r = arguments[t] != null ? Object(arguments[t]) : {}, n = Object.keys(r);
|
|
713
713
|
typeof Object.getOwnPropertySymbols == "function" && n.push.apply(n, Object.getOwnPropertySymbols(r).filter(function(a) {
|
|
714
714
|
return Object.getOwnPropertyDescriptor(r, a).enumerable;
|
|
715
715
|
})), n.forEach(function(a) {
|
|
716
|
-
|
|
716
|
+
le(e, a, r[a]);
|
|
717
717
|
});
|
|
718
718
|
}
|
|
719
719
|
return e;
|
|
720
720
|
}
|
|
721
|
-
function
|
|
722
|
-
return t =
|
|
721
|
+
function le(e, t, r) {
|
|
722
|
+
return t = Gr(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
723
723
|
}
|
|
724
|
-
function
|
|
725
|
-
var t =
|
|
724
|
+
function Gr(e) {
|
|
725
|
+
var t = qr(e, "string");
|
|
726
726
|
return typeof t == "symbol" ? t : String(t);
|
|
727
727
|
}
|
|
728
|
-
function
|
|
728
|
+
function qr(e, t) {
|
|
729
729
|
if (typeof e != "object" || e === null) return e;
|
|
730
730
|
var r = e[Symbol.toPrimitive];
|
|
731
731
|
if (r !== void 0) {
|
|
@@ -735,9 +735,9 @@ function Gr(e, t) {
|
|
|
735
735
|
}
|
|
736
736
|
return (t === "string" ? String : Number)(e);
|
|
737
737
|
}
|
|
738
|
-
function
|
|
738
|
+
function Kr(e, t) {
|
|
739
739
|
if (e == null) return {};
|
|
740
|
-
var r =
|
|
740
|
+
var r = Vr(e, t), n, a;
|
|
741
741
|
if (Object.getOwnPropertySymbols) {
|
|
742
742
|
var o = Object.getOwnPropertySymbols(e);
|
|
743
743
|
for (a = 0; a < o.length; a++)
|
|
@@ -745,67 +745,67 @@ function qr(e, t) {
|
|
|
745
745
|
}
|
|
746
746
|
return r;
|
|
747
747
|
}
|
|
748
|
-
function
|
|
748
|
+
function Vr(e, t) {
|
|
749
749
|
if (e == null) return {};
|
|
750
750
|
var r = {}, n = Object.keys(e), a, o;
|
|
751
751
|
for (o = 0; o < n.length; o++)
|
|
752
752
|
a = n[o], !(t.indexOf(a) >= 0) && (r[a] = e[a]);
|
|
753
753
|
return r;
|
|
754
754
|
}
|
|
755
|
-
|
|
756
|
-
var
|
|
757
|
-
var n, a =
|
|
755
|
+
_e("#1890ff");
|
|
756
|
+
var F = function(t, r) {
|
|
757
|
+
var n, a = Ie({}, t, r.attrs), o = a.class, i = a.icon, l = a.spin, c = a.rotate, f = a.tabindex, s = a.twoToneColor, S = a.onClick, m = Kr(a, Lr), P = (n = {
|
|
758
758
|
anticon: !0
|
|
759
|
-
},
|
|
760
|
-
|
|
761
|
-
var u =
|
|
762
|
-
msTransform: "rotate(".concat(
|
|
763
|
-
transform: "rotate(".concat(
|
|
764
|
-
} : void 0,
|
|
765
|
-
return
|
|
759
|
+
}, le(n, "anticon-".concat(i.name), !!i.name), le(n, o, o), n), b = l === "" || l || i.name === "loading" ? "anticon-spin" : "", y = f;
|
|
760
|
+
y === void 0 && S && (y = -1, m.tabindex = y);
|
|
761
|
+
var u = c ? {
|
|
762
|
+
msTransform: "rotate(".concat(c, "deg)"),
|
|
763
|
+
transform: "rotate(".concat(c, "deg)")
|
|
764
|
+
} : void 0, g = $e(s), h = Hr(g, 2), v = h[0], A = h[1];
|
|
765
|
+
return ae("span", Ie({
|
|
766
766
|
role: "img",
|
|
767
767
|
"aria-label": i.name
|
|
768
|
-
},
|
|
768
|
+
}, m, {
|
|
769
769
|
onClick: S,
|
|
770
|
-
class:
|
|
771
|
-
}), [
|
|
772
|
-
class:
|
|
770
|
+
class: P
|
|
771
|
+
}), [ae(I, {
|
|
772
|
+
class: b,
|
|
773
773
|
icon: i,
|
|
774
774
|
primaryColor: v,
|
|
775
775
|
secondaryColor: A,
|
|
776
776
|
style: u
|
|
777
777
|
}, null)]);
|
|
778
778
|
};
|
|
779
|
-
|
|
779
|
+
F.props = {
|
|
780
780
|
spin: Boolean,
|
|
781
781
|
rotate: Number,
|
|
782
782
|
icon: Object,
|
|
783
783
|
twoToneColor: String
|
|
784
784
|
};
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
var
|
|
790
|
-
function
|
|
785
|
+
F.displayName = "AntdIcon";
|
|
786
|
+
F.inheritAttrs = !1;
|
|
787
|
+
F.getTwoToneColor = Dr;
|
|
788
|
+
F.setTwoToneColor = _e;
|
|
789
|
+
var Yr = { icon: { tag: "svg", attrs: { viewBox: "32 32 960 960", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M384 32a96 96 0 00-96 96v96a32 32 0 0064 0v-96a32 32 0 0132-32h512a32 32 0 0132 32v512a32 32 0 01-32 32h-96a32 32 0 000 64h96a96 96 0 0096-96V128a96 96 0 00-96-96H384z" } }, { tag: "path", attrs: { d: "M128 288a96 96 0 00-96 96v512a96 96 0 0096 96h512a96 96 0 0096-96V384a96 96 0 00-96-96H128zm-32 96a32 32 0 0132-32h512a32 32 0 0132 32v512a32 32 0 01-32 32H128a32 32 0 01-32-32V384z" } }] }, name: "copy", theme: "outlined" };
|
|
790
|
+
function Ee(e) {
|
|
791
791
|
for (var t = 1; t < arguments.length; t++) {
|
|
792
792
|
var r = arguments[t] != null ? Object(arguments[t]) : {}, n = Object.keys(r);
|
|
793
793
|
typeof Object.getOwnPropertySymbols == "function" && n.push.apply(n, Object.getOwnPropertySymbols(r).filter(function(a) {
|
|
794
794
|
return Object.getOwnPropertyDescriptor(r, a).enumerable;
|
|
795
795
|
})), n.forEach(function(a) {
|
|
796
|
-
|
|
796
|
+
Jr(e, a, r[a]);
|
|
797
797
|
});
|
|
798
798
|
}
|
|
799
799
|
return e;
|
|
800
800
|
}
|
|
801
|
-
function
|
|
802
|
-
return t =
|
|
801
|
+
function Jr(e, t, r) {
|
|
802
|
+
return t = Zr(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
803
803
|
}
|
|
804
|
-
function
|
|
805
|
-
var t =
|
|
804
|
+
function Zr(e) {
|
|
805
|
+
var t = Qr(e, "string");
|
|
806
806
|
return typeof t == "symbol" ? t : String(t);
|
|
807
807
|
}
|
|
808
|
-
function
|
|
808
|
+
function Qr(e, t) {
|
|
809
809
|
if (typeof e != "object" || e === null) return e;
|
|
810
810
|
var r = e[Symbol.toPrimitive];
|
|
811
811
|
if (r !== void 0) {
|
|
@@ -815,31 +815,31 @@ function Zr(e, t) {
|
|
|
815
815
|
}
|
|
816
816
|
return (t === "string" ? String : Number)(e);
|
|
817
817
|
}
|
|
818
|
-
var
|
|
819
|
-
var n =
|
|
820
|
-
return
|
|
821
|
-
icon:
|
|
818
|
+
var ce = function(t, r) {
|
|
819
|
+
var n = Ee({}, t, r.attrs);
|
|
820
|
+
return ae(F, Ee({}, n, {
|
|
821
|
+
icon: Yr
|
|
822
822
|
}), null);
|
|
823
823
|
};
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
function
|
|
824
|
+
ce.displayName = "CopyOutlined";
|
|
825
|
+
ce.inheritAttrs = !1;
|
|
826
|
+
function D(e) {
|
|
827
827
|
if (e == null) return "";
|
|
828
828
|
if (typeof e == "string") return e;
|
|
829
|
-
if (Array.isArray(e)) return e.map(
|
|
829
|
+
if (Array.isArray(e)) return e.map(D).join("");
|
|
830
830
|
if (typeof e == "object") {
|
|
831
831
|
if (typeof e.children == "string")
|
|
832
832
|
return e.children;
|
|
833
833
|
if (e?.default && typeof e.default == "function") {
|
|
834
834
|
const t = e.default();
|
|
835
835
|
if (Array.isArray(t))
|
|
836
|
-
return
|
|
836
|
+
return D(t);
|
|
837
837
|
}
|
|
838
|
-
e.children &&
|
|
838
|
+
e.children && D(e.children);
|
|
839
839
|
}
|
|
840
840
|
return "";
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function De(e, t = {}) {
|
|
843
843
|
const r = /* @__PURE__ */ new Map(), { value: n = "value", label: a = "label" } = t;
|
|
844
844
|
if (!e) return r;
|
|
845
845
|
const o = Array.isArray(e) ? e : [e];
|
|
@@ -848,42 +848,42 @@ function Re(e, t = {}) {
|
|
|
848
848
|
if (i.type && (typeof i.type == "object" || typeof i.type == "function")) {
|
|
849
849
|
let l = i.type.name?.toLowerCase() || "";
|
|
850
850
|
if (typeof i.type == "function" ? l = i.type.displayName?.toLowerCase() || "" : typeof i.type == "string" && (l = i.type?.toLowerCase() || ""), /option|radio|checkbox/i.test(l)) {
|
|
851
|
-
const
|
|
852
|
-
if (
|
|
853
|
-
const S =
|
|
854
|
-
r.set(
|
|
851
|
+
const c = i.props || {}, f = c[n] ?? c.value, s = c[a] ?? c.label;
|
|
852
|
+
if (f != null) {
|
|
853
|
+
const S = D(i.children) || s || String(f);
|
|
854
|
+
r.set(f, S);
|
|
855
855
|
}
|
|
856
856
|
}
|
|
857
857
|
}
|
|
858
|
-
i.children &&
|
|
859
|
-
r.has(
|
|
858
|
+
i.children && De(i.children, t).forEach((c, f) => {
|
|
859
|
+
r.has(f) || r.set(f, c);
|
|
860
860
|
});
|
|
861
861
|
}
|
|
862
862
|
return r;
|
|
863
863
|
}
|
|
864
|
-
function
|
|
864
|
+
function Xr(e, t, r) {
|
|
865
865
|
const { value: n = "value", label: a = "label", children: o = "children" } = r, i = [];
|
|
866
866
|
let l = e;
|
|
867
|
-
for (const
|
|
868
|
-
const
|
|
869
|
-
if (
|
|
870
|
-
i.push(
|
|
867
|
+
for (const c of t) {
|
|
868
|
+
const f = l.find((s) => s[n] === c);
|
|
869
|
+
if (f)
|
|
870
|
+
i.push(f[a] || f[n] || String(c)), l = f[o] || [];
|
|
871
871
|
else {
|
|
872
|
-
i.push(String(
|
|
872
|
+
i.push(String(c));
|
|
873
873
|
break;
|
|
874
874
|
}
|
|
875
875
|
}
|
|
876
876
|
return i;
|
|
877
877
|
}
|
|
878
|
-
function
|
|
878
|
+
function et(e, t, r) {
|
|
879
879
|
const { value: n = "value", label: a = "title", children: o = "children" } = r, i = [], l = new Set(Array.isArray(t) ? t : [t]);
|
|
880
|
-
function f
|
|
881
|
-
for (const s of
|
|
882
|
-
l.has(s[n]) && i.push(s[a] || s[n]), s[o] &&
|
|
880
|
+
function c(f) {
|
|
881
|
+
for (const s of f)
|
|
882
|
+
l.has(s[n]) && i.push(s[a] || s[n]), s[o] && c(s[o]);
|
|
883
883
|
}
|
|
884
|
-
return
|
|
884
|
+
return c(e), i;
|
|
885
885
|
}
|
|
886
|
-
function
|
|
886
|
+
function rt({
|
|
887
887
|
modelValue: e,
|
|
888
888
|
options: t,
|
|
889
889
|
treeData: r,
|
|
@@ -892,96 +892,96 @@ function et({
|
|
|
892
892
|
slots: o,
|
|
893
893
|
isSelect: i,
|
|
894
894
|
isRadioGroup: l,
|
|
895
|
-
isCheckboxGroup:
|
|
896
|
-
isCheckbox:
|
|
895
|
+
isCheckboxGroup: c,
|
|
896
|
+
isCheckbox: f,
|
|
897
897
|
isRadio: s,
|
|
898
898
|
isCascader: S,
|
|
899
|
-
isTreeSelect:
|
|
900
|
-
isSwitch:
|
|
901
|
-
attrs:
|
|
902
|
-
emptyText:
|
|
899
|
+
isTreeSelect: m,
|
|
900
|
+
isSwitch: P,
|
|
901
|
+
attrs: b,
|
|
902
|
+
emptyText: y
|
|
903
903
|
}) {
|
|
904
904
|
if (n)
|
|
905
905
|
try {
|
|
906
|
-
return n(e) ||
|
|
906
|
+
return n(e) || y;
|
|
907
907
|
} catch (u) {
|
|
908
908
|
console.warn("[ReadonlyHOC] valueToLabel error", u);
|
|
909
909
|
}
|
|
910
|
-
if (
|
|
911
|
-
const u =
|
|
912
|
-
return e === u ?
|
|
910
|
+
if (P) {
|
|
911
|
+
const u = b.checkedValue ?? b["checked-value"] ?? !0, g = b.uncheckedValue ?? b["un-checked-value"] ?? !1;
|
|
912
|
+
return e === u ? b.checkedChildren ?? b["checked-children"] ?? "开启" : e === g ? b.uncheckedChildren ?? b["un-checked-children"] ?? "关闭" : String(e || y);
|
|
913
913
|
}
|
|
914
914
|
if (S && Array.isArray(e) && t?.length)
|
|
915
|
-
return
|
|
916
|
-
if (
|
|
917
|
-
return
|
|
915
|
+
return Xr(t, e, a).join(" / ") || y;
|
|
916
|
+
if (m && r?.length)
|
|
917
|
+
return et(r, e, a).join(", ") || y;
|
|
918
918
|
if (t?.length) {
|
|
919
|
-
const u = a.value || "value",
|
|
920
|
-
const A = t.find((
|
|
921
|
-
return A ? A[
|
|
919
|
+
const u = a.value || "value", g = a.label || "label", h = (v) => {
|
|
920
|
+
const A = t.find((K) => K[u] === v);
|
|
921
|
+
return A ? A[g] || A[u] : v == null ? "" : String(v);
|
|
922
922
|
};
|
|
923
|
-
return Array.isArray(e) ? e.map(
|
|
924
|
-
} else if ((i || l ||
|
|
923
|
+
return Array.isArray(e) ? e.map(h).join(", ") || y : h(e) || y;
|
|
924
|
+
} else if ((i || l || c) && o?.default)
|
|
925
925
|
try {
|
|
926
|
-
const u = o.default(),
|
|
927
|
-
if (
|
|
928
|
-
const
|
|
929
|
-
return Array.isArray(e) ? e.map(
|
|
926
|
+
const u = o.default(), g = De(u, a);
|
|
927
|
+
if (g.size > 0) {
|
|
928
|
+
const h = (v) => v == null ? "" : g.get(v) || String(v);
|
|
929
|
+
return Array.isArray(e) ? e.map(h).join(", ") || y : h(e) || y;
|
|
930
930
|
}
|
|
931
931
|
} catch (u) {
|
|
932
932
|
console.warn("[ReadonlyHOC] Failed to parse slot options", u);
|
|
933
933
|
}
|
|
934
|
-
else if (o?.default && (
|
|
934
|
+
else if (o?.default && (f || s) && typeof e == "boolean")
|
|
935
935
|
try {
|
|
936
|
-
const u = o.default(),
|
|
937
|
-
if (
|
|
936
|
+
const u = o.default(), g = D(u);
|
|
937
|
+
if (g) return g;
|
|
938
938
|
} catch {
|
|
939
939
|
}
|
|
940
|
-
return e == null || e === "" ?
|
|
940
|
+
return e == null || e === "" ? y : Array.isArray(e) ? e.join(", ") : String(e);
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function tt(e) {
|
|
943
943
|
if (typeof e == "function")
|
|
944
944
|
return e;
|
|
945
|
-
const t = e.name || "", r = t.toLowerCase(), n = /select/i.test(r) && !/tree|cascader/i.test(r), a = /radio/i.test(r) && !/group/i.test(r), o = /radio.*group/i.test(r), i = /checkbox/i.test(r) && !/group/i.test(r), l = /checkbox.*group/i.test(r),
|
|
946
|
-
return
|
|
945
|
+
const t = e.name || "", r = t.toLowerCase(), n = /select/i.test(r) && !/tree|cascader/i.test(r), a = /radio/i.test(r) && !/group/i.test(r), o = /radio.*group/i.test(r), i = /checkbox/i.test(r) && !/group/i.test(r), l = /checkbox.*group/i.test(r), c = /switch/i.test(r), f = /cascader/i.test(r), s = /tree.*select/i.test(r), m = i || c || a ? "checked" : "value", P = `update:${m}`, b = /form$/i.test(r), y = /form.*item/i.test(r);
|
|
946
|
+
return Ge({
|
|
947
947
|
name: t,
|
|
948
948
|
inheritAttrs: !1,
|
|
949
949
|
props: {
|
|
950
950
|
modelValue: { type: [String, Number, Boolean, Array, Object], default: void 0 },
|
|
951
|
-
[
|
|
951
|
+
[m]: { type: [String, Number, Boolean, Array, Object], default: void 0 },
|
|
952
952
|
readonly: { type: Boolean, default: void 0 },
|
|
953
953
|
emptyText: { type: String, default: "--" },
|
|
954
954
|
valueToLabel: { type: Function, default: null },
|
|
955
955
|
copyable: { type: Boolean, default: void 0 }
|
|
956
956
|
},
|
|
957
|
-
emits: ["update:modelValue",
|
|
958
|
-
setup(u, { emit:
|
|
959
|
-
const A =
|
|
960
|
-
|
|
961
|
-
const fe =
|
|
962
|
-
|
|
963
|
-
},
|
|
957
|
+
emits: ["update:modelValue", P],
|
|
958
|
+
setup(u, { emit: g, slots: h, expose: v }) {
|
|
959
|
+
const A = ue("nkReadonly", B(!1)), K = ue("copyable", B(!0)), j = R(() => u.readonly ?? A.value), V = R(() => u.readonly ?? A.value), Y = R(() => u.copyable ?? K.value ?? !0), L = B(!1);
|
|
960
|
+
b && (se("nkReadonly", V), se("copyable", Y));
|
|
961
|
+
const fe = R(() => u[m] !== void 0 ? u[m] : u.modelValue), Le = (d) => {
|
|
962
|
+
g("update:modelValue", d), g(P, d);
|
|
963
|
+
}, C = qe(), H = R(() => {
|
|
964
964
|
if (!j.value) return "";
|
|
965
|
-
const d =
|
|
966
|
-
return
|
|
965
|
+
const d = C.fieldNames ?? C["field-names"] ?? {}, J = C.options, Ue = C.treeData ?? C["tree-data"];
|
|
966
|
+
return rt({
|
|
967
967
|
modelValue: fe.value,
|
|
968
|
-
options:
|
|
969
|
-
treeData:
|
|
968
|
+
options: J,
|
|
969
|
+
treeData: Ue,
|
|
970
970
|
valueToLabel: u.valueToLabel,
|
|
971
971
|
fieldNames: d,
|
|
972
|
-
slots:
|
|
972
|
+
slots: h,
|
|
973
973
|
isSelect: n,
|
|
974
974
|
isRadioGroup: o,
|
|
975
975
|
isCheckboxGroup: l,
|
|
976
976
|
isCheckbox: i,
|
|
977
977
|
isRadio: a,
|
|
978
|
-
isCascader:
|
|
978
|
+
isCascader: f,
|
|
979
979
|
isTreeSelect: s,
|
|
980
|
-
isSwitch:
|
|
981
|
-
attrs:
|
|
980
|
+
isSwitch: c,
|
|
981
|
+
attrs: C,
|
|
982
982
|
emptyText: u.emptyText
|
|
983
983
|
});
|
|
984
|
-
}),
|
|
984
|
+
}), He = {
|
|
985
985
|
lineHeight: "32px",
|
|
986
986
|
padding: "0 6px",
|
|
987
987
|
display: "inline-block",
|
|
@@ -994,49 +994,49 @@ function rt(e) {
|
|
|
994
994
|
border: "none",
|
|
995
995
|
backgroundColor: "none",
|
|
996
996
|
whiteSpace: "pre-wrap"
|
|
997
|
-
},
|
|
998
|
-
|
|
999
|
-
validate: () => j.value ? Promise.resolve({}) :
|
|
1000
|
-
validateFields: (d) => j.value ? Promise.resolve({}) :
|
|
1001
|
-
resetFields: (d) => !j.value &&
|
|
1002
|
-
clearValidate: (d) => !j.value &&
|
|
1003
|
-
scrollToField: (d) => !j.value &&
|
|
997
|
+
}, E = B();
|
|
998
|
+
b && v({
|
|
999
|
+
validate: () => j.value ? Promise.resolve({}) : E.value?.validate?.(),
|
|
1000
|
+
validateFields: (d) => j.value ? Promise.resolve({}) : E.value?.validateFields?.(d),
|
|
1001
|
+
resetFields: (d) => !j.value && E.value?.resetFields?.(d),
|
|
1002
|
+
clearValidate: (d) => !j.value && E.value?.clearValidate?.(d),
|
|
1003
|
+
scrollToField: (d) => !j.value && E.value?.scrollToField?.(d)
|
|
1004
1004
|
});
|
|
1005
|
-
const
|
|
1005
|
+
const Be = () => {
|
|
1006
1006
|
L.value = !0;
|
|
1007
|
-
},
|
|
1007
|
+
}, ze = () => {
|
|
1008
1008
|
L.value = !1;
|
|
1009
1009
|
};
|
|
1010
|
-
return () =>
|
|
1010
|
+
return () => y ? T(
|
|
1011
1011
|
e,
|
|
1012
1012
|
{
|
|
1013
|
-
...
|
|
1014
|
-
style: { ...
|
|
1013
|
+
...C,
|
|
1014
|
+
style: { ...C.style || {}, marginBottom: j.value ? "10px" : void 0 }
|
|
1015
1015
|
},
|
|
1016
|
-
|
|
1017
|
-
) :
|
|
1016
|
+
h
|
|
1017
|
+
) : b ? T(
|
|
1018
1018
|
e,
|
|
1019
1019
|
{
|
|
1020
|
-
...
|
|
1021
|
-
rules:
|
|
1022
|
-
disabled:
|
|
1023
|
-
ref:
|
|
1020
|
+
...C,
|
|
1021
|
+
rules: V.value ? null : C.rules,
|
|
1022
|
+
disabled: V.value ? !0 : C.disabled,
|
|
1023
|
+
ref: E
|
|
1024
1024
|
},
|
|
1025
|
-
|
|
1026
|
-
) : j.value ?
|
|
1025
|
+
h
|
|
1026
|
+
) : j.value ? T(
|
|
1027
1027
|
"span",
|
|
1028
1028
|
{
|
|
1029
|
-
onMouseenter:
|
|
1030
|
-
onMouseleave:
|
|
1029
|
+
onMouseenter: Be,
|
|
1030
|
+
onMouseleave: ze,
|
|
1031
1031
|
class: "nk-readonly-wrapper",
|
|
1032
1032
|
style: {
|
|
1033
|
-
...
|
|
1034
|
-
color:
|
|
1033
|
+
...He,
|
|
1034
|
+
color: Y.value && L.value ? "#6e9eff" : "rgba(0, 0, 0, 0.65)"
|
|
1035
1035
|
}
|
|
1036
1036
|
},
|
|
1037
1037
|
[
|
|
1038
|
-
|
|
1039
|
-
|
|
1038
|
+
T("span", { style: { marginRight: "8px" } }, H.value),
|
|
1039
|
+
Y.value && H.value !== u.emptyText ? T(
|
|
1040
1040
|
"span",
|
|
1041
1041
|
{
|
|
1042
1042
|
class: "copy-icon",
|
|
@@ -1046,23 +1046,23 @@ function rt(e) {
|
|
|
1046
1046
|
}
|
|
1047
1047
|
},
|
|
1048
1048
|
[
|
|
1049
|
-
|
|
1050
|
-
|
|
1049
|
+
T(
|
|
1050
|
+
ce,
|
|
1051
1051
|
{
|
|
1052
1052
|
onClick: async () => {
|
|
1053
1053
|
try {
|
|
1054
1054
|
if (window.__POWERED_BY_WUJIE__) {
|
|
1055
|
-
if (await window.gvUtil?.clipboard(null,
|
|
1056
|
-
|
|
1055
|
+
if (await window.gvUtil?.clipboard(null, H.value) === !1) {
|
|
1056
|
+
z.error("您的浏览器不支持自动复制,请手动复制");
|
|
1057
1057
|
return;
|
|
1058
1058
|
}
|
|
1059
|
-
|
|
1059
|
+
z.success("复制成功");
|
|
1060
1060
|
} else {
|
|
1061
|
-
const d = new Blob([
|
|
1062
|
-
await navigator.clipboard.write([
|
|
1061
|
+
const d = new Blob([H.value], { type: "text/plain" }), J = new ClipboardItem({ "text/plain": d });
|
|
1062
|
+
await navigator.clipboard.write([J]), z.success("复制成功");
|
|
1063
1063
|
}
|
|
1064
1064
|
} catch {
|
|
1065
|
-
|
|
1065
|
+
z.error("您的浏览器不支持自动复制,请手动复制");
|
|
1066
1066
|
}
|
|
1067
1067
|
},
|
|
1068
1068
|
style: {
|
|
@@ -1078,46 +1078,68 @@ function rt(e) {
|
|
|
1078
1078
|
]
|
|
1079
1079
|
) : null
|
|
1080
1080
|
]
|
|
1081
|
-
) :
|
|
1081
|
+
) : T(
|
|
1082
1082
|
e,
|
|
1083
1083
|
{
|
|
1084
|
-
...
|
|
1085
|
-
[
|
|
1086
|
-
[`onUpdate:${
|
|
1087
|
-
ref:
|
|
1084
|
+
...C,
|
|
1085
|
+
[m]: fe.value,
|
|
1086
|
+
[`onUpdate:${m}`]: Le,
|
|
1087
|
+
ref: b ? E : void 0
|
|
1088
1088
|
},
|
|
1089
|
-
|
|
1089
|
+
h
|
|
1090
1090
|
);
|
|
1091
1091
|
}
|
|
1092
1092
|
});
|
|
1093
1093
|
}
|
|
1094
|
-
const
|
|
1095
|
-
Input:
|
|
1096
|
-
InputNumber:
|
|
1097
|
-
Textarea:
|
|
1098
|
-
Select:
|
|
1099
|
-
SelectOption:
|
|
1100
|
-
TreeSelect:
|
|
1101
|
-
Cascader:
|
|
1102
|
-
DatePicker:
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1094
|
+
const nt = {
|
|
1095
|
+
Input: Qe,
|
|
1096
|
+
InputNumber: Ze,
|
|
1097
|
+
Textarea: Je,
|
|
1098
|
+
Select: me,
|
|
1099
|
+
SelectOption: me.Option,
|
|
1100
|
+
TreeSelect: Ye,
|
|
1101
|
+
Cascader: Ve,
|
|
1102
|
+
DatePicker: ge,
|
|
1103
|
+
RangePicker: ge.RangePicker,
|
|
1104
|
+
TimePicker: ye,
|
|
1105
|
+
TimeRangePicker: ye.TimeRangePicker,
|
|
1106
|
+
Radio: be,
|
|
1107
|
+
Checkbox: pe,
|
|
1108
|
+
RadioGroup: be.Group,
|
|
1109
|
+
CheckboxGroup: pe.Group,
|
|
1110
|
+
Switch: Ke,
|
|
1111
|
+
Form: de,
|
|
1112
|
+
FormItem: de.Item
|
|
1113
|
+
}, p = {};
|
|
1114
|
+
for (const [e, t] of Object.entries(nt))
|
|
1115
|
+
if (t) {
|
|
1116
|
+
const r = tt(t);
|
|
1117
|
+
p[`Nk${e}`] = r;
|
|
1118
|
+
}
|
|
1119
|
+
const it = {
|
|
1112
1120
|
install(e) {
|
|
1113
|
-
for (const [t, r] of Object.entries(
|
|
1121
|
+
for (const [t, r] of Object.entries(p))
|
|
1114
1122
|
if (r) {
|
|
1115
|
-
const n =
|
|
1116
|
-
e.component(
|
|
1123
|
+
const n = r;
|
|
1124
|
+
e.component(t, n);
|
|
1117
1125
|
}
|
|
1118
1126
|
}
|
|
1119
|
-
};
|
|
1127
|
+
}, lt = p.NkInput, ct = p.NkInputNumber, ft = p.NkSelect, ut = p.NkCascader, st = p.NkTreeSelect, dt = p.NkDatePicker, pt = p.NkRangePicker, bt = p.NkTimePicker, yt = p.NkTimeRangePicker, gt = p.NkCheckbox, mt = p.NkRadio, ht = p.NkSwitch, vt = p.NkForm, kt = p.NkFormItem;
|
|
1120
1128
|
export {
|
|
1121
|
-
|
|
1122
|
-
|
|
1129
|
+
ut as NkCascader,
|
|
1130
|
+
gt as NkCheckbox,
|
|
1131
|
+
dt as NkDatePicker,
|
|
1132
|
+
vt as NkForm,
|
|
1133
|
+
kt as NkFormItem,
|
|
1134
|
+
lt as NkInput,
|
|
1135
|
+
ct as NkInputNumber,
|
|
1136
|
+
mt as NkRadio,
|
|
1137
|
+
pt as NkRangePicker,
|
|
1138
|
+
ft as NkSelect,
|
|
1139
|
+
ht as NkSwitch,
|
|
1140
|
+
bt as NkTimePicker,
|
|
1141
|
+
yt as NkTimeRangePicker,
|
|
1142
|
+
st as NkTreeSelect,
|
|
1143
|
+
it as default,
|
|
1144
|
+
tt as withReadonly
|
|
1123
1145
|
};
|