|
@@ -1,5 +1,5 @@
|
|
|
-import { aC as bn, aD as Pe, aE as wn, aF as Tt, aG as Ye, aH as xn, aI as qe, aJ as $n, aK as It, aL as Fn, aM as An, aN as _t, aO as On, aP as lt, aQ as st, aR as Je, aS as Ze, aT as jt, aU as Ce, aV as Cn, aW as Mt, aX as Lt, aY as Sn, aZ as Rt, a_ as En, a$ as Pn, b0 as ut, b1 as qn, b2 as Tn, d as P, D as Ne, E as In, b3 as _n, c as pe, y as jn, b4 as Mn, b5 as Ln, _ as W, g as Rn, m as Nn, b6 as Nt, b7 as Vn, r as Vt, b8 as Dn, b9 as Bn, ba as Gn, bb as Dt, u as Bt, bc as Wn, V as zn, a1 as Un, bd as Hn, be as Kn, bf as Xn, P as de, bg as Qe, bh as Yn, bi as Gt, bj as Jn, bk as Zn, bl as Qn, i as kn, bm as ue, bn as me, bo as ft, bp as ct, f as er, e as $e, bq as je, U as tr, br as Ve } from "./index2.js";
|
|
|
|
|
-import { cloneVNode as nr, inject as Wt, computed as F, provide as zt, createVNode as _, Fragment as Se, defineComponent as Te, ref as ke, watch as se, Transition as rr, withDirectives as ir, TransitionGroup as ar, vShow as or, shallowRef as ee, watchEffect as De, onBeforeUnmount as lr, reactive as Ut, onMounted as sr, toRaw as Be, nextTick as Ht, unref as ae } from "vue";
|
|
|
|
|
|
|
+import { aD as bn, aE as Pe, aF as wn, aG as Tt, aH as Ye, aI as xn, aJ as qe, aK as $n, aL as It, aM as Fn, aN as An, aO as _t, aP as On, aQ as lt, aR as st, aS as Je, aT as Ze, aU as jt, aV as Se, aW as Sn, aX as Mt, aY as Lt, aZ as Cn, a_ as Rt, a$ as En, b0 as Pn, b1 as ut, b2 as qn, b3 as Tn, d as P, D as Ne, E as In, b4 as _n, c as pe, y as jn, b5 as Mn, b6 as Ln, _ as W, g as Rn, m as Nn, b7 as Nt, b8 as Vn, r as Vt, b9 as Dn, ba as Bn, bb as Gn, bc as Dt, u as Bt, bd as Wn, W as zn, a2 as Hn, be as Un, bf as Kn, bg as Xn, P as de, bh as Qe, bi as Yn, bj as Gt, bk as Jn, bl as Zn, bm as Qn, i as kn, bn as ue, bo as me, bp as ft, bq as ct, f as er, e as $e, br as je, V as tr, bs as Ve } from "./index2.js";
|
|
|
|
|
+import { cloneVNode as nr, inject as Wt, computed as F, provide as zt, createVNode as _, Fragment as Ce, defineComponent as Te, ref as ke, watch as se, Transition as rr, withDirectives as ir, TransitionGroup as ar, vShow as or, shallowRef as ee, watchEffect as De, onBeforeUnmount as lr, reactive as Ht, onMounted as sr, toRaw as Be, nextTick as Ut, unref as ae } from "vue";
|
|
|
import { a as Kt, s as ur, o as fr, i as Xt, b as et, c as Yt, t as Ee, h as cr, d as Jt, e as Zt, f as dr } from "./hasIn.js";
|
|
import { a as Kt, s as ur, o as fr, i as Xt, b as et, c as Yt, t as Ee, h as cr, d as Jt, e as Zt, f as dr } from "./hasIn.js";
|
|
|
import { C as Qt, A as mr } from "./Col.js";
|
|
import { C as Qt, A as mr } from "./Col.js";
|
|
|
import { s as gr } from "./index4.js";
|
|
import { s as gr } from "./index4.js";
|
|
@@ -72,11 +72,11 @@ function Or(e) {
|
|
|
function tt(e) {
|
|
function tt(e) {
|
|
|
return Ye(e) ? xn(e, !0) : Or(e);
|
|
return Ye(e) ? xn(e, !0) : Or(e);
|
|
|
}
|
|
}
|
|
|
-function Cr(e, t, n) {
|
|
|
|
|
|
|
+function Sr(e, t, n) {
|
|
|
var r = e == null ? void 0 : et(e, t);
|
|
var r = e == null ? void 0 : et(e, t);
|
|
|
return r === void 0 ? n : r;
|
|
return r === void 0 ? n : r;
|
|
|
}
|
|
}
|
|
|
-function Sr(e, t, n) {
|
|
|
|
|
|
|
+function Cr(e, t, n) {
|
|
|
var r = -1, i = e.length;
|
|
var r = -1, i = e.length;
|
|
|
t < 0 && (t = -t > i ? 0 : i + t), n = n > i ? i : n, n < 0 && (n += i), i = t > n ? 0 : n - t >>> 0, t >>>= 0;
|
|
t < 0 && (t = -t > i ? 0 : i + t), n = n > i ? i : n, n < 0 && (n += i), i = t > n ? 0 : n - t >>> 0, t >>>= 0;
|
|
|
for (var o = Array(i); ++r < i; )
|
|
for (var o = Array(i); ++r < i; )
|
|
@@ -136,7 +136,7 @@ function Gr(e, t) {
|
|
|
var n = t ? nt(e.buffer) : e.buffer;
|
|
var n = t ? nt(e.buffer) : e.buffer;
|
|
|
return new e.constructor(n, e.byteOffset, e.length);
|
|
return new e.constructor(n, e.byteOffset, e.length);
|
|
|
}
|
|
}
|
|
|
-var Wr = "[object Boolean]", zr = "[object Date]", Ur = "[object Map]", Hr = "[object Number]", Kr = "[object RegExp]", Xr = "[object Set]", Yr = "[object String]", Jr = "[object Symbol]", Zr = "[object ArrayBuffer]", Qr = "[object DataView]", kr = "[object Float32Array]", ei = "[object Float64Array]", ti = "[object Int8Array]", ni = "[object Int16Array]", ri = "[object Int32Array]", ii = "[object Uint8Array]", ai = "[object Uint8ClampedArray]", oi = "[object Uint16Array]", li = "[object Uint32Array]";
|
|
|
|
|
|
|
+var Wr = "[object Boolean]", zr = "[object Date]", Hr = "[object Map]", Ur = "[object Number]", Kr = "[object RegExp]", Xr = "[object Set]", Yr = "[object String]", Jr = "[object Symbol]", Zr = "[object ArrayBuffer]", Qr = "[object DataView]", kr = "[object Float32Array]", ei = "[object Float64Array]", ti = "[object Int8Array]", ni = "[object Int16Array]", ri = "[object Int32Array]", ii = "[object Uint8Array]", ai = "[object Uint8ClampedArray]", oi = "[object Uint16Array]", li = "[object Uint32Array]";
|
|
|
function si(e, t, n) {
|
|
function si(e, t, n) {
|
|
|
var r = e.constructor;
|
|
var r = e.constructor;
|
|
|
switch (t) {
|
|
switch (t) {
|
|
@@ -157,9 +157,9 @@ function si(e, t, n) {
|
|
|
case oi:
|
|
case oi:
|
|
|
case li:
|
|
case li:
|
|
|
return Gr(e, n);
|
|
return Gr(e, n);
|
|
|
- case Ur:
|
|
|
|
|
- return new r();
|
|
|
|
|
case Hr:
|
|
case Hr:
|
|
|
|
|
+ return new r();
|
|
|
|
|
+ case Ur:
|
|
|
case Yr:
|
|
case Yr:
|
|
|
return new r(e);
|
|
return new r(e);
|
|
|
case Kr:
|
|
case Kr:
|
|
@@ -177,12 +177,12 @@ var fi = "[object Map]";
|
|
|
function ci(e) {
|
|
function ci(e) {
|
|
|
return Je(e) && Ze(e) == fi;
|
|
return Je(e) && Ze(e) == fi;
|
|
|
}
|
|
}
|
|
|
-var bt = Ce && Ce.isMap, di = bt ? jt(bt) : ci, mi = "[object Set]";
|
|
|
|
|
|
|
+var bt = Se && Se.isMap, di = bt ? jt(bt) : ci, mi = "[object Set]";
|
|
|
function gi(e) {
|
|
function gi(e) {
|
|
|
return Je(e) && Ze(e) == mi;
|
|
return Je(e) && Ze(e) == mi;
|
|
|
}
|
|
}
|
|
|
-var wt = Ce && Ce.isSet, vi = wt ? jt(wt) : gi, hi = 1, pi = 2, yi = 4, nn = "[object Arguments]", bi = "[object Array]", wi = "[object Boolean]", xi = "[object Date]", $i = "[object Error]", rn = "[object Function]", Fi = "[object GeneratorFunction]", Ai = "[object Map]", Oi = "[object Number]", an = "[object Object]", Ci = "[object RegExp]", Si = "[object Set]", Ei = "[object String]", Pi = "[object Symbol]", qi = "[object WeakMap]", Ti = "[object ArrayBuffer]", Ii = "[object DataView]", _i = "[object Float32Array]", ji = "[object Float64Array]", Mi = "[object Int8Array]", Li = "[object Int16Array]", Ri = "[object Int32Array]", Ni = "[object Uint8Array]", Vi = "[object Uint8ClampedArray]", Di = "[object Uint16Array]", Bi = "[object Uint32Array]", j = {};
|
|
|
|
|
-j[nn] = j[bi] = j[Ti] = j[Ii] = j[wi] = j[xi] = j[_i] = j[ji] = j[Mi] = j[Li] = j[Ri] = j[Ai] = j[Oi] = j[an] = j[Ci] = j[Si] = j[Ei] = j[Pi] = j[Ni] = j[Vi] = j[Di] = j[Bi] = !0;
|
|
|
|
|
|
|
+var wt = Se && Se.isSet, vi = wt ? jt(wt) : gi, hi = 1, pi = 2, yi = 4, nn = "[object Arguments]", bi = "[object Array]", wi = "[object Boolean]", xi = "[object Date]", $i = "[object Error]", rn = "[object Function]", Fi = "[object GeneratorFunction]", Ai = "[object Map]", Oi = "[object Number]", an = "[object Object]", Si = "[object RegExp]", Ci = "[object Set]", Ei = "[object String]", Pi = "[object Symbol]", qi = "[object WeakMap]", Ti = "[object ArrayBuffer]", Ii = "[object DataView]", _i = "[object Float32Array]", ji = "[object Float64Array]", Mi = "[object Int8Array]", Li = "[object Int16Array]", Ri = "[object Int32Array]", Ni = "[object Uint8Array]", Vi = "[object Uint8ClampedArray]", Di = "[object Uint16Array]", Bi = "[object Uint32Array]", j = {};
|
|
|
|
|
+j[nn] = j[bi] = j[Ti] = j[Ii] = j[wi] = j[xi] = j[_i] = j[ji] = j[Mi] = j[Li] = j[Ri] = j[Ai] = j[Oi] = j[an] = j[Si] = j[Ci] = j[Ei] = j[Pi] = j[Ni] = j[Vi] = j[Di] = j[Bi] = !0;
|
|
|
j[$i] = j[rn] = j[qi] = !1;
|
|
j[$i] = j[rn] = j[qi] = !1;
|
|
|
function ve(e, t, n, r, i, o) {
|
|
function ve(e, t, n, r, i, o) {
|
|
|
var a, l = t & hi, s = t & pi, v = t & yi;
|
|
var a, l = t & hi, s = t & pi, v = t & yi;
|
|
@@ -196,7 +196,7 @@ function ve(e, t, n, r, i, o) {
|
|
|
return br(e, a);
|
|
return br(e, a);
|
|
|
} else {
|
|
} else {
|
|
|
var g = Ze(e), h = g == rn || g == Fi;
|
|
var g = Ze(e), h = g == rn || g == Fi;
|
|
|
- if (Cn(e))
|
|
|
|
|
|
|
+ if (Sn(e))
|
|
|
return Tr(e, l);
|
|
return Tr(e, l);
|
|
|
if (g == an || g == nn || h && !i) {
|
|
if (g == an || g == nn || h && !i) {
|
|
|
if (a = s || h ? {} : ui(e), !l)
|
|
if (a = s || h ? {} : ui(e), !l)
|
|
@@ -216,7 +216,7 @@ function ve(e, t, n, r, i, o) {
|
|
|
}) : di(e) && e.forEach(function(y, m) {
|
|
}) : di(e) && e.forEach(function(y, m) {
|
|
|
a.set(m, ve(y, t, n, m, e, o));
|
|
a.set(m, ve(y, t, n, m, e, o));
|
|
|
});
|
|
});
|
|
|
- var $ = v ? s ? tn : Sn : s ? tt : qe, d = f ? void 0 : $(e);
|
|
|
|
|
|
|
+ var $ = v ? s ? tn : Cn : s ? tt : qe, d = f ? void 0 : $(e);
|
|
|
return wr(d || e, function(y, m) {
|
|
return wr(d || e, function(y, m) {
|
|
|
d && (m = y, y = e[m]), Kt(a, m, ve(y, t, n, m, e, o));
|
|
d && (m = y, y = e[m]), Kt(a, m, ve(y, t, n, m, e, o));
|
|
|
}), a;
|
|
}), a;
|
|
@@ -225,8 +225,8 @@ var Gi = 1, Wi = 4;
|
|
|
function Ae(e) {
|
|
function Ae(e) {
|
|
|
return ve(e, Gi | Wi);
|
|
return ve(e, Gi | Wi);
|
|
|
}
|
|
}
|
|
|
-var zi = 1, Ui = 2;
|
|
|
|
|
-function Hi(e, t, n, r) {
|
|
|
|
|
|
|
+var zi = 1, Hi = 2;
|
|
|
|
|
+function Ui(e, t, n, r) {
|
|
|
var i = n.length, o = i;
|
|
var i = n.length, o = i;
|
|
|
if (e == null)
|
|
if (e == null)
|
|
|
return !o;
|
|
return !o;
|
|
@@ -243,7 +243,7 @@ function Hi(e, t, n, r) {
|
|
|
return !1;
|
|
return !1;
|
|
|
} else {
|
|
} else {
|
|
|
var f = new Mt(), g;
|
|
var f = new Mt(), g;
|
|
|
- if (!(g === void 0 ? Rt(v, s, zi | Ui, r, f) : g))
|
|
|
|
|
|
|
+ if (!(g === void 0 ? Rt(v, s, zi | Hi, r, f) : g))
|
|
|
return !1;
|
|
return !1;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -267,13 +267,13 @@ function ln(e, t) {
|
|
|
function Xi(e) {
|
|
function Xi(e) {
|
|
|
var t = Ki(e);
|
|
var t = Ki(e);
|
|
|
return t.length == 1 && t[0][2] ? ln(t[0][0], t[0][1]) : function(n) {
|
|
return t.length == 1 && t[0][2] ? ln(t[0][0], t[0][1]) : function(n) {
|
|
|
- return n === e || Hi(n, e, t);
|
|
|
|
|
|
|
+ return n === e || Ui(n, e, t);
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
var Yi = 1, Ji = 2;
|
|
var Yi = 1, Ji = 2;
|
|
|
function Zi(e, t) {
|
|
function Zi(e, t) {
|
|
|
return Yt(e) && on(t) ? ln(Ee(e), t) : function(n) {
|
|
return Yt(e) && on(t) ? ln(Ee(e), t) : function(n) {
|
|
|
- var r = Cr(n, e);
|
|
|
|
|
|
|
+ var r = Sr(n, e);
|
|
|
return r === void 0 && r === t ? cr(n, e) : Rt(t, r, Yi | Ji);
|
|
return r === void 0 && r === t ? cr(n, e) : Rt(t, r, Yi | Ji);
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
@@ -351,7 +351,7 @@ var fa = xr(function(e) {
|
|
|
return t.length && t[0] === e[0] ? sa(t) : [];
|
|
return t.length && t[0] === e[0] ? sa(t) : [];
|
|
|
});
|
|
});
|
|
|
function ca(e, t) {
|
|
function ca(e, t) {
|
|
|
- return t.length < 2 ? e : et(e, Sr(t, 0, -1));
|
|
|
|
|
|
|
+ return t.length < 2 ? e : et(e, Cr(t, 0, -1));
|
|
|
}
|
|
}
|
|
|
var da = Object.prototype, ma = da.hasOwnProperty;
|
|
var da = Object.prototype, ma = da.hasOwnProperty;
|
|
|
function ga(e, t) {
|
|
function ga(e, t) {
|
|
@@ -523,7 +523,7 @@ function xt(e, t, n) {
|
|
|
}
|
|
}
|
|
|
o([]);
|
|
o([]);
|
|
|
}
|
|
}
|
|
|
-function Ca(e) {
|
|
|
|
|
|
|
+function Sa(e) {
|
|
|
var t = [];
|
|
var t = [];
|
|
|
return Object.keys(e).forEach(function(n) {
|
|
return Object.keys(e).forEach(function(n) {
|
|
|
t.push.apply(t, e[n] || []);
|
|
t.push.apply(t, e[n] || []);
|
|
@@ -537,12 +537,12 @@ var $t = /* @__PURE__ */ function(e) {
|
|
|
}
|
|
}
|
|
|
return t;
|
|
return t;
|
|
|
}(/* @__PURE__ */ We(Error));
|
|
}(/* @__PURE__ */ We(Error));
|
|
|
-function Sa(e, t, n, r, i) {
|
|
|
|
|
|
|
+function Ca(e, t, n, r, i) {
|
|
|
if (t.first) {
|
|
if (t.first) {
|
|
|
var o = new Promise(function(h, w) {
|
|
var o = new Promise(function(h, w) {
|
|
|
var $ = function(m) {
|
|
var $ = function(m) {
|
|
|
return r(m), m.length ? w(new $t(m, ze(m))) : h(i);
|
|
return r(m), m.length ? w(new $t(m, ze(m))) : h(i);
|
|
|
- }, d = Ca(e);
|
|
|
|
|
|
|
+ }, d = Sa(e);
|
|
|
xt(d, n, $);
|
|
xt(d, n, $);
|
|
|
});
|
|
});
|
|
|
return o.catch(function(h) {
|
|
return o.catch(function(h) {
|
|
@@ -774,12 +774,12 @@ var fn = function(t, n, r, i, o, a) {
|
|
|
E.required(t, n, i, a, o), n !== void 0 && E.type(t, n, i, a, o);
|
|
E.required(t, n, i, a, o), n !== void 0 && E.type(t, n, i, a, o);
|
|
|
}
|
|
}
|
|
|
r(a);
|
|
r(a);
|
|
|
-}, Ua = "enum", Ha = function(t, n, r, i, o) {
|
|
|
|
|
|
|
+}, Ha = "enum", Ua = function(t, n, r, i, o) {
|
|
|
var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
|
|
var a = [], l = t.required || !t.required && i.hasOwnProperty(t.field);
|
|
|
if (l) {
|
|
if (l) {
|
|
|
if (B(n) && !t.required)
|
|
if (B(n) && !t.required)
|
|
|
return r();
|
|
return r();
|
|
|
- E.required(t, n, i, a, o), n !== void 0 && E[Ua](t, n, i, a, o);
|
|
|
|
|
|
|
+ E.required(t, n, i, a, o), n !== void 0 && E[Ha](t, n, i, a, o);
|
|
|
}
|
|
}
|
|
|
r(a);
|
|
r(a);
|
|
|
}, Ka = function(t, n, r, i, o) {
|
|
}, Ka = function(t, n, r, i, o) {
|
|
@@ -830,7 +830,7 @@ var fn = function(t, n, r, i, o, a) {
|
|
|
float: Ga,
|
|
float: Ga,
|
|
|
array: Wa,
|
|
array: Wa,
|
|
|
object: za,
|
|
object: za,
|
|
|
- enum: Ha,
|
|
|
|
|
|
|
+ enum: Ua,
|
|
|
pattern: Ka,
|
|
pattern: Ka,
|
|
|
date: Xa,
|
|
date: Xa,
|
|
|
url: Me,
|
|
url: Me,
|
|
@@ -839,7 +839,7 @@ var fn = function(t, n, r, i, o, a) {
|
|
|
required: Ya,
|
|
required: Ya,
|
|
|
any: Ja
|
|
any: Ja
|
|
|
};
|
|
};
|
|
|
-function Ue() {
|
|
|
|
|
|
|
+function He() {
|
|
|
return {
|
|
return {
|
|
|
default: "Validation error on field %s",
|
|
default: "Validation error on field %s",
|
|
|
required: "%s is required",
|
|
required: "%s is required",
|
|
@@ -892,9 +892,9 @@ function Ue() {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
-var He = Ue(), we = /* @__PURE__ */ function() {
|
|
|
|
|
|
|
+var Ue = He(), we = /* @__PURE__ */ function() {
|
|
|
function e(n) {
|
|
function e(n) {
|
|
|
- this.rules = null, this._messages = He, this.define(n);
|
|
|
|
|
|
|
+ this.rules = null, this._messages = Ue, this.define(n);
|
|
|
}
|
|
}
|
|
|
var t = e.prototype;
|
|
var t = e.prototype;
|
|
|
return t.define = function(r) {
|
|
return t.define = function(r) {
|
|
@@ -908,7 +908,7 @@ var He = Ue(), we = /* @__PURE__ */ function() {
|
|
|
i.rules[o] = Array.isArray(a) ? a : [a];
|
|
i.rules[o] = Array.isArray(a) ? a : [a];
|
|
|
});
|
|
});
|
|
|
}, t.messages = function(r) {
|
|
}, t.messages = function(r) {
|
|
|
- return r && (this._messages = At(Ue(), r)), this._messages;
|
|
|
|
|
|
|
+ return r && (this._messages = At(He(), r)), this._messages;
|
|
|
}, t.validate = function(r, i, o) {
|
|
}, t.validate = function(r, i, o) {
|
|
|
var a = this;
|
|
var a = this;
|
|
|
i === void 0 && (i = {}), o === void 0 && (o = function() {
|
|
i === void 0 && (i = {}), o === void 0 && (o = function() {
|
|
@@ -931,7 +931,7 @@ var He = Ue(), we = /* @__PURE__ */ function() {
|
|
|
}
|
|
}
|
|
|
if (s.messages) {
|
|
if (s.messages) {
|
|
|
var g = this.messages();
|
|
var g = this.messages();
|
|
|
- g === He && (g = Ue()), At(g, s.messages), s.messages = g;
|
|
|
|
|
|
|
+ g === Ue && (g = He()), At(g, s.messages), s.messages = g;
|
|
|
} else
|
|
} else
|
|
|
s.messages = this.messages();
|
|
s.messages = this.messages();
|
|
|
var h = {}, w = s.keys || Object.keys(this.rules);
|
|
var h = {}, w = s.keys || Object.keys(this.rules);
|
|
@@ -950,18 +950,18 @@ var He = Ue(), we = /* @__PURE__ */ function() {
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
var $ = {};
|
|
var $ = {};
|
|
|
- return Sa(h, s, function(d, y) {
|
|
|
|
|
|
|
+ return Ca(h, s, function(d, y) {
|
|
|
var m = d.rule, q = (m.type === "object" || m.type === "array") && (typeof m.fields == "object" || typeof m.defaultField == "object");
|
|
var m = d.rule, q = (m.type === "object" || m.type === "array") && (typeof m.fields == "object" || typeof m.defaultField == "object");
|
|
|
q = q && (m.required || !m.required && d.value), m.field = d.field;
|
|
q = q && (m.required || !m.required && d.value), m.field = d.field;
|
|
|
- function u(S, A) {
|
|
|
|
|
|
|
+ function u(C, A) {
|
|
|
return le({}, A, {
|
|
return le({}, A, {
|
|
|
- fullField: m.fullField + "." + S,
|
|
|
|
|
- fullFields: m.fullFields ? [].concat(m.fullFields, [S]) : [S]
|
|
|
|
|
|
|
+ fullField: m.fullField + "." + C,
|
|
|
|
|
+ fullFields: m.fullFields ? [].concat(m.fullFields, [C]) : [C]
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
- function c(S) {
|
|
|
|
|
- S === void 0 && (S = []);
|
|
|
|
|
- var A = Array.isArray(S) ? S : [S];
|
|
|
|
|
|
|
+ function c(C) {
|
|
|
|
|
+ C === void 0 && (C = []);
|
|
|
|
|
+ var A = Array.isArray(C) ? C : [C];
|
|
|
!s.suppressWarning && A.length && e.warning("async-validator:", A), A.length && m.message !== void 0 && (A = [].concat(m.message));
|
|
!s.suppressWarning && A.length && e.warning("async-validator:", A), A.length && m.message !== void 0 && (A = [].concat(m.message));
|
|
|
var O = A.map(Ft(m, l));
|
|
var O = A.map(Ft(m, l));
|
|
|
if (s.first && O.length)
|
|
if (s.first && O.length)
|
|
@@ -993,17 +993,17 @@ var He = Ue(), we = /* @__PURE__ */ function() {
|
|
|
else if (m.validator) {
|
|
else if (m.validator) {
|
|
|
try {
|
|
try {
|
|
|
b = m.validator(m, d.value, c, d.source, s);
|
|
b = m.validator(m, d.value, c, d.source, s);
|
|
|
- } catch (S) {
|
|
|
|
|
- console.error == null || console.error(S), s.suppressValidatorError || setTimeout(function() {
|
|
|
|
|
- throw S;
|
|
|
|
|
- }, 0), c(S.message);
|
|
|
|
|
|
|
+ } catch (C) {
|
|
|
|
|
+ console.error == null || console.error(C), s.suppressValidatorError || setTimeout(function() {
|
|
|
|
|
+ throw C;
|
|
|
|
|
+ }, 0), c(C.message);
|
|
|
}
|
|
}
|
|
|
b === !0 ? c() : b === !1 ? c(typeof m.message == "function" ? m.message(m.fullField || m.field) : m.message || (m.fullField || m.field) + " fails") : b instanceof Array ? c(b) : b instanceof Error && c(b.message);
|
|
b === !0 ? c() : b === !1 ? c(typeof m.message == "function" ? m.message(m.fullField || m.field) : m.message || (m.fullField || m.field) + " fails") : b instanceof Array ? c(b) : b instanceof Error && c(b.message);
|
|
|
}
|
|
}
|
|
|
b && b.then && b.then(function() {
|
|
b && b.then && b.then(function() {
|
|
|
return c();
|
|
return c();
|
|
|
- }, function(S) {
|
|
|
|
|
- return c(S);
|
|
|
|
|
|
|
+ }, function(C) {
|
|
|
|
|
+ return c(C);
|
|
|
});
|
|
});
|
|
|
}, function(d) {
|
|
}, function(d) {
|
|
|
f(d);
|
|
f(d);
|
|
@@ -1025,7 +1025,7 @@ we.register = function(t, n) {
|
|
|
he[t] = n;
|
|
he[t] = n;
|
|
|
};
|
|
};
|
|
|
we.warning = un;
|
|
we.warning = un;
|
|
|
-we.messages = He;
|
|
|
|
|
|
|
+we.messages = Ue;
|
|
|
we.validators = he;
|
|
we.validators = he;
|
|
|
function ne(e) {
|
|
function ne(e) {
|
|
|
return e == null ? [] : Array.isArray(e) ? e : [e];
|
|
return e == null ? [] : Array.isArray(e) ? e : [e];
|
|
@@ -1063,13 +1063,13 @@ function ka(e, t, n) {
|
|
|
function eo(e, t) {
|
|
function eo(e, t) {
|
|
|
return e && e.some((n) => no(n, t));
|
|
return e && e.some((n) => no(n, t));
|
|
|
}
|
|
}
|
|
|
-function Ct(e) {
|
|
|
|
|
|
|
+function St(e) {
|
|
|
return typeof e == "object" && e !== null && Object.getPrototypeOf(e) === Object.prototype;
|
|
return typeof e == "object" && e !== null && Object.getPrototypeOf(e) === Object.prototype;
|
|
|
}
|
|
}
|
|
|
function mn(e, t) {
|
|
function mn(e, t) {
|
|
|
const n = Array.isArray(e) ? [...e] : P({}, e);
|
|
const n = Array.isArray(e) ? [...e] : P({}, e);
|
|
|
return t && Object.keys(t).forEach((r) => {
|
|
return t && Object.keys(t).forEach((r) => {
|
|
|
- const i = n[r], o = t[r], a = Ct(i) && Ct(o);
|
|
|
|
|
|
|
+ const i = n[r], o = t[r], a = St(i) && St(o);
|
|
|
n[r] = a ? mn(i, o || {}) : o;
|
|
n[r] = a ? mn(i, o || {}) : o;
|
|
|
}), n;
|
|
}), n;
|
|
|
}
|
|
}
|
|
@@ -1078,7 +1078,7 @@ function to(e) {
|
|
|
n[r - 1] = arguments[r];
|
|
n[r - 1] = arguments[r];
|
|
|
return n.reduce((i, o) => mn(i, o), e);
|
|
return n.reduce((i, o) => mn(i, o), e);
|
|
|
}
|
|
}
|
|
|
-function St(e, t) {
|
|
|
|
|
|
|
+function Ct(e, t) {
|
|
|
let n = {};
|
|
let n = {};
|
|
|
return t.forEach((r) => {
|
|
return t.forEach((r) => {
|
|
|
const i = Qa(e, r);
|
|
const i = Qa(e, r);
|
|
@@ -1331,10 +1331,10 @@ const vn = Symbol("formContextKey"), hn = (e) => {
|
|
|
vertical: u,
|
|
vertical: u,
|
|
|
labelAlign: c,
|
|
labelAlign: c,
|
|
|
labelCol: b,
|
|
labelCol: b,
|
|
|
- labelWrap: S,
|
|
|
|
|
|
|
+ labelWrap: C,
|
|
|
colon: A
|
|
colon: A
|
|
|
} = rt(), O = h || (b == null ? void 0 : b.value) || {}, V = w || (c == null ? void 0 : c.value), M = `${f}-item-label`, L = pe(M, V === "left" && `${M}-left`, O.class, {
|
|
} = rt(), O = h || (b == null ? void 0 : b.value) || {}, V = w || (c == null ? void 0 : c.value), M = `${f}-item-label`, L = pe(M, V === "left" && `${M}-left`, O.class, {
|
|
|
- [`${M}-wrap`]: !!S.value
|
|
|
|
|
|
|
+ [`${M}-wrap`]: !!C.value
|
|
|
});
|
|
});
|
|
|
let T = q;
|
|
let T = q;
|
|
|
const N = $ === !0 || (A == null ? void 0 : A.value) !== !1 && $ !== !1;
|
|
const N = $ === !0 || (A == null ? void 0 : A.value) !== !1 && $ !== !1;
|
|
@@ -1346,11 +1346,11 @@ const vn = Symbol("formContextKey"), hn = (e) => {
|
|
|
}, {
|
|
}, {
|
|
|
default: () => [_(Mn, null, null)]
|
|
default: () => [_(Mn, null, null)]
|
|
|
})]);
|
|
})]);
|
|
|
- T = _(Se, null, [T, n.tooltip ? (l = n.tooltip) === null || l === void 0 ? void 0 : l.call(n, {
|
|
|
|
|
|
|
+ T = _(Ce, null, [T, n.tooltip ? (l = n.tooltip) === null || l === void 0 ? void 0 : l.call(n, {
|
|
|
class: `${f}-item-tooltip`
|
|
class: `${f}-item-tooltip`
|
|
|
}) : K]);
|
|
}) : K]);
|
|
|
}
|
|
}
|
|
|
- y === "optional" && !d && (T = _(Se, null, [T, _("span", {
|
|
|
|
|
|
|
+ y === "optional" && !d && (T = _(Ce, null, [T, _("span", {
|
|
|
class: `${f}-item-optional`
|
|
class: `${f}-item-optional`
|
|
|
}, [((s = m.value) === null || s === void 0 ? void 0 : s.optional) || ((v = Ln.Form) === null || v === void 0 ? void 0 : v.optional)])]));
|
|
}, [((s = m.value) === null || s === void 0 ? void 0 : s.optional) || ((v = Ln.Form) === null || v === void 0 ? void 0 : v.optional)])]));
|
|
|
const Q = pe({
|
|
const Q = pe({
|
|
@@ -1876,7 +1876,7 @@ const uo = (e) => {
|
|
|
}), {
|
|
}), {
|
|
|
default: () => {
|
|
default: () => {
|
|
|
var u;
|
|
var u;
|
|
|
- return _(Se, null, [_("div", {
|
|
|
|
|
|
|
+ return _(Ce, null, [_("div", {
|
|
|
class: `${y}-control-input`
|
|
class: `${y}-control-input`
|
|
|
}, [_("div", {
|
|
}, [_("div", {
|
|
|
class: `${y}-control-input-content`
|
|
class: `${y}-control-input-content`
|
|
@@ -1916,8 +1916,8 @@ Qe("success", "warning", "error", "validating", "");
|
|
|
const xo = {
|
|
const xo = {
|
|
|
success: Xn,
|
|
success: Xn,
|
|
|
warning: Kn,
|
|
warning: Kn,
|
|
|
- error: Hn,
|
|
|
|
|
- validating: Un
|
|
|
|
|
|
|
+ error: Un,
|
|
|
|
|
+ validating: Hn
|
|
|
};
|
|
};
|
|
|
function Le(e, t, n) {
|
|
function Le(e, t, n) {
|
|
|
let r = e;
|
|
let r = e;
|
|
@@ -2039,8 +2039,8 @@ const Ao = "form_item", Oo = Te({
|
|
|
} : [], G = Le(p, d.value);
|
|
} : [], G = Le(p, d.value);
|
|
|
p = p ? G.o[G.k] || G.v : [];
|
|
p = p ? G.o[G.k] || G.v : [];
|
|
|
const z = [].concat(I || p || []);
|
|
const z = [].concat(I || p || []);
|
|
|
- return oa(z, (U) => U.required) ? z : z.concat(D);
|
|
|
|
|
- }), S = F(() => {
|
|
|
|
|
|
|
+ return oa(z, (H) => H.required) ? z : z.concat(D);
|
|
|
|
|
+ }), C = F(() => {
|
|
|
const p = b.value;
|
|
const p = b.value;
|
|
|
let I = !1;
|
|
let I = !1;
|
|
|
return p && p.length && p.every((D) => D.required ? (I = !0, !1) : !0), I || e.required;
|
|
return p && p.length && p.every((D) => D.required ? (I = !0, !1) : !0), I || e.required;
|
|
@@ -2060,20 +2060,20 @@ const Ao = "form_item", Oo = Te({
|
|
|
triggerName: D
|
|
triggerName: D
|
|
|
} = p || {};
|
|
} = p || {};
|
|
|
let G = b.value;
|
|
let G = b.value;
|
|
|
- if (D && (G = G.filter((U) => {
|
|
|
|
|
|
|
+ if (D && (G = G.filter((H) => {
|
|
|
const {
|
|
const {
|
|
|
trigger: re
|
|
trigger: re
|
|
|
- } = U;
|
|
|
|
|
|
|
+ } = H;
|
|
|
return !re && !c.value.length ? !0 : ne(re || c.value).includes(D);
|
|
return !re && !c.value.length ? !0 : ne(re || c.value).includes(D);
|
|
|
})), !G.length)
|
|
})), !G.length)
|
|
|
return Promise.resolve();
|
|
return Promise.resolve();
|
|
|
const z = gn(d.value, q.value, G, P({
|
|
const z = gn(d.value, q.value, G, P({
|
|
|
validateMessages: f.validateMessages.value
|
|
validateMessages: f.validateMessages.value
|
|
|
}, p), I, O.value);
|
|
}, p), I, O.value);
|
|
|
- return A.value = "validating", h.value = [], z.catch((U) => U).then(function() {
|
|
|
|
|
- let U = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
|
|
|
|
|
+ return A.value = "validating", h.value = [], z.catch((H) => H).then(function() {
|
|
|
|
|
+ let H = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
|
if (A.value === "validating") {
|
|
if (A.value === "validating") {
|
|
|
- const re = U.filter((ie) => ie && ie.errors.length);
|
|
|
|
|
|
|
+ const re = H.filter((ie) => ie && ie.errors.length);
|
|
|
A.value = re.length ? "error" : "success", h.value = re.map((ie) => ie.errors), f.onValidate(g.value, !h.value.length, h.value.length ? Be(h.value[0]) : null);
|
|
A.value = re.length ? "error" : "success", h.value = re.map((ie) => ie.errors), f.onValidate(g.value, !h.value.length, h.value.length ? Be(h.value[0]) : null);
|
|
|
}
|
|
}
|
|
|
}), z;
|
|
}), z;
|
|
@@ -2095,7 +2095,7 @@ const Ao = "form_item", Oo = Te({
|
|
|
var p;
|
|
var p;
|
|
|
A.value = e.validateStatus, w.value = !0, h.value = [];
|
|
A.value = e.validateStatus, w.value = !0, h.value = [];
|
|
|
const I = f.model.value || {}, D = q.value, G = Le(I, d.value, !0);
|
|
const I = f.model.value || {}, D = q.value, G = Le(I, d.value, !0);
|
|
|
- Array.isArray(D) ? G.o[G.k] = [].concat((p = u.value) !== null && p !== void 0 ? p : []) : G.o[G.k] = u.value, Ht(() => {
|
|
|
|
|
|
|
+ Array.isArray(D) ? G.o[G.k] = [].concat((p = u.value) !== null && p !== void 0 ? p : []) : G.o[G.k] = u.value, Ut(() => {
|
|
|
w.value = !1;
|
|
w.value = !1;
|
|
|
});
|
|
});
|
|
|
}, Z = F(() => e.htmlFor === void 0 ? y.value : e.htmlFor), Q = () => {
|
|
}, Z = F(() => e.htmlFor === void 0 ? y.value : e.htmlFor), Q = () => {
|
|
@@ -2137,27 +2137,27 @@ const Ao = "form_item", Oo = Te({
|
|
|
}), lr(() => {
|
|
}), lr(() => {
|
|
|
f.removeField(o);
|
|
f.removeField(o);
|
|
|
});
|
|
});
|
|
|
- const x = wo(h), C = F(() => e.validateStatus !== void 0 ? e.validateStatus : x.value.length ? "error" : A.value), R = F(() => ({
|
|
|
|
|
|
|
+ const x = wo(h), S = F(() => e.validateStatus !== void 0 ? e.validateStatus : x.value.length ? "error" : A.value), R = F(() => ({
|
|
|
[`${a.value}-item`]: !0,
|
|
[`${a.value}-item`]: !0,
|
|
|
[s.value]: !0,
|
|
[s.value]: !0,
|
|
|
// Status
|
|
// Status
|
|
|
- [`${a.value}-item-has-feedback`]: C.value && e.hasFeedback,
|
|
|
|
|
- [`${a.value}-item-has-success`]: C.value === "success",
|
|
|
|
|
- [`${a.value}-item-has-warning`]: C.value === "warning",
|
|
|
|
|
- [`${a.value}-item-has-error`]: C.value === "error",
|
|
|
|
|
- [`${a.value}-item-is-validating`]: C.value === "validating",
|
|
|
|
|
|
|
+ [`${a.value}-item-has-feedback`]: S.value && e.hasFeedback,
|
|
|
|
|
+ [`${a.value}-item-has-success`]: S.value === "success",
|
|
|
|
|
+ [`${a.value}-item-has-warning`]: S.value === "warning",
|
|
|
|
|
+ [`${a.value}-item-has-error`]: S.value === "error",
|
|
|
|
|
+ [`${a.value}-item-is-validating`]: S.value === "validating",
|
|
|
[`${a.value}-item-hidden`]: e.hidden
|
|
[`${a.value}-item-hidden`]: e.hidden
|
|
|
- })), H = Ut({});
|
|
|
|
|
- zn.useProvide(H), De(() => {
|
|
|
|
|
|
|
+ })), U = Ht({});
|
|
|
|
|
+ zn.useProvide(U), De(() => {
|
|
|
let p;
|
|
let p;
|
|
|
if (e.hasFeedback) {
|
|
if (e.hasFeedback) {
|
|
|
- const I = C.value && xo[C.value];
|
|
|
|
|
|
|
+ const I = S.value && xo[S.value];
|
|
|
p = I ? _("span", {
|
|
p = I ? _("span", {
|
|
|
- class: pe(`${a.value}-item-feedback-icon`, `${a.value}-item-feedback-icon-${C.value}`)
|
|
|
|
|
|
|
+ class: pe(`${a.value}-item-feedback-icon`, `${a.value}-item-feedback-icon-${S.value}`)
|
|
|
}, [_(I, null, null)]) : null;
|
|
}, [_(I, null, null)]) : null;
|
|
|
}
|
|
}
|
|
|
- P(H, {
|
|
|
|
|
- status: C.value,
|
|
|
|
|
|
|
+ P(U, {
|
|
|
|
|
+ status: S.value,
|
|
|
hasFeedback: e.hasFeedback,
|
|
hasFeedback: e.hasFeedback,
|
|
|
feedbackIcon: p,
|
|
feedbackIcon: p,
|
|
|
isFormItemInput: !0
|
|
isFormItemInput: !0
|
|
@@ -2192,10 +2192,10 @@ const Ao = "form_item", Oo = Te({
|
|
|
key: "row"
|
|
key: "row"
|
|
|
}), {
|
|
}), {
|
|
|
default: () => {
|
|
default: () => {
|
|
|
- var z, U;
|
|
|
|
|
- return _(Se, null, [_(it, W(W({}, e), {}, {
|
|
|
|
|
|
|
+ var z, H;
|
|
|
|
|
+ return _(Ce, null, [_(it, W(W({}, e), {}, {
|
|
|
htmlFor: Z.value,
|
|
htmlFor: Z.value,
|
|
|
- required: S.value,
|
|
|
|
|
|
|
+ required: C.value,
|
|
|
requiredMark: f.requiredMark.value,
|
|
requiredMark: f.requiredMark.value,
|
|
|
prefixCls: a.value,
|
|
prefixCls: a.value,
|
|
|
onClick: Q,
|
|
onClick: Q,
|
|
@@ -2207,10 +2207,10 @@ const Ao = "form_item", Oo = Te({
|
|
|
errors: D != null ? ne(D) : x.value,
|
|
errors: D != null ? ne(D) : x.value,
|
|
|
marginBottom: X.value,
|
|
marginBottom: X.value,
|
|
|
prefixCls: a.value,
|
|
prefixCls: a.value,
|
|
|
- status: C.value,
|
|
|
|
|
|
|
+ status: S.value,
|
|
|
ref: $,
|
|
ref: $,
|
|
|
help: D,
|
|
help: D,
|
|
|
- extra: (z = e.extra) !== null && z !== void 0 ? z : (U = n.extra) === null || U === void 0 ? void 0 : U.call(n),
|
|
|
|
|
|
|
+ extra: (z = e.extra) !== null && z !== void 0 ? z : (H = n.extra) === null || H === void 0 ? void 0 : H.call(n),
|
|
|
onErrorVisibleChanged: k
|
|
onErrorVisibleChanged: k
|
|
|
}), {
|
|
}), {
|
|
|
default: n.default
|
|
default: n.default
|
|
@@ -2265,10 +2265,10 @@ function Re(e, t, n) {
|
|
|
isValid: r && i[o] in r
|
|
isValid: r && i[o] in r
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
-function Co(e) {
|
|
|
|
|
|
|
+function So(e) {
|
|
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ke({}), n = arguments.length > 2 ? arguments[2] : void 0;
|
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ke({}), n = arguments.length > 2 ? arguments[2] : void 0;
|
|
|
- const r = Ae(ae(e)), i = Ut({}), o = ee([]), a = (u) => {
|
|
|
|
|
- P(ae(e), P(P({}, Ae(r)), u)), Ht(() => {
|
|
|
|
|
|
|
+ const r = Ae(ae(e)), i = Ht({}), o = ee([]), a = (u) => {
|
|
|
|
|
+ P(ae(e), P(P({}, Ae(r)), u)), Ut(() => {
|
|
|
Object.keys(i).forEach((c) => {
|
|
Object.keys(i).forEach((c) => {
|
|
|
i[c] = {
|
|
i[c] = {
|
|
|
autoLink: !1,
|
|
autoLink: !1,
|
|
@@ -2279,20 +2279,20 @@ function Co(e) {
|
|
|
}, l = function() {
|
|
}, l = function() {
|
|
|
let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], c = arguments.length > 1 ? arguments[1] : void 0;
|
|
let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], c = arguments.length > 1 ? arguments[1] : void 0;
|
|
|
return c.length ? u.filter((b) => {
|
|
return c.length ? u.filter((b) => {
|
|
|
- const S = qt(b.trigger || "change");
|
|
|
|
|
- return fa(S, c).length;
|
|
|
|
|
|
|
+ const C = qt(b.trigger || "change");
|
|
|
|
|
+ return fa(C, c).length;
|
|
|
}) : u;
|
|
}) : u;
|
|
|
};
|
|
};
|
|
|
let s = null;
|
|
let s = null;
|
|
|
const v = function(u) {
|
|
const v = function(u) {
|
|
|
let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, b = arguments.length > 2 ? arguments[2] : void 0;
|
|
let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, b = arguments.length > 2 ? arguments[2] : void 0;
|
|
|
- const S = [], A = {};
|
|
|
|
|
|
|
+ const C = [], A = {};
|
|
|
for (let M = 0; M < u.length; M++) {
|
|
for (let M = 0; M < u.length; M++) {
|
|
|
const L = u[M], T = Re(ae(e), L, b);
|
|
const L = u[M], T = Re(ae(e), L, b);
|
|
|
if (!T.isValid) continue;
|
|
if (!T.isValid) continue;
|
|
|
A[L] = T.v;
|
|
A[L] = T.v;
|
|
|
const N = l(ae(t)[L], qt(c && c.trigger));
|
|
const N = l(ae(t)[L], qt(c && c.trigger));
|
|
|
- N.length && S.push(f(L, T.v, N, c || {}).then(() => ({
|
|
|
|
|
|
|
+ N.length && C.push(f(L, T.v, N, c || {}).then(() => ({
|
|
|
name: L,
|
|
name: L,
|
|
|
errors: [],
|
|
errors: [],
|
|
|
warnings: []
|
|
warnings: []
|
|
@@ -2301,11 +2301,11 @@ function Co(e) {
|
|
|
return Z.forEach((x) => {
|
|
return Z.forEach((x) => {
|
|
|
let {
|
|
let {
|
|
|
rule: {
|
|
rule: {
|
|
|
- warningOnly: C
|
|
|
|
|
|
|
+ warningOnly: S
|
|
|
},
|
|
},
|
|
|
errors: R
|
|
errors: R
|
|
|
} = x;
|
|
} = x;
|
|
|
- C ? K.push(...R) : Q.push(...R);
|
|
|
|
|
|
|
+ S ? K.push(...R) : Q.push(...R);
|
|
|
}), Q.length ? Promise.reject({
|
|
}), Q.length ? Promise.reject({
|
|
|
name: L,
|
|
name: L,
|
|
|
errors: Q,
|
|
errors: Q,
|
|
@@ -2317,7 +2317,7 @@ function Co(e) {
|
|
|
};
|
|
};
|
|
|
}));
|
|
}));
|
|
|
}
|
|
}
|
|
|
- const O = yn(S);
|
|
|
|
|
|
|
+ const O = yn(C);
|
|
|
s = O;
|
|
s = O;
|
|
|
const V = O.then(() => s === O ? Promise.resolve(A) : Promise.reject([])).catch((M) => {
|
|
const V = O.then(() => s === O ? Promise.resolve(A) : Promise.reject([])).catch((M) => {
|
|
|
const L = M.filter((T) => T && T.errors.length);
|
|
const L = M.filter((T) => T && T.errors.length);
|
|
@@ -2329,10 +2329,10 @@ function Co(e) {
|
|
|
});
|
|
});
|
|
|
return V.catch((M) => M), V;
|
|
return V.catch((M) => M), V;
|
|
|
}, f = function(u, c, b) {
|
|
}, f = function(u, c, b) {
|
|
|
- let S = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
|
|
|
|
|
+ let C = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
|
const A = gn([u], c, b, P({
|
|
const A = gn([u], c, b, P({
|
|
|
validateMessages: Ie
|
|
validateMessages: Ie
|
|
|
- }, S), !!S.validateFirst);
|
|
|
|
|
|
|
+ }, C), !!C.validateFirst);
|
|
|
return i[u] ? (i[u].validateStatus = "validating", A.catch((O) => O).then(function() {
|
|
return i[u] ? (i[u].validateStatus = "validating", A.catch((O) => O).then(function() {
|
|
|
let O = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
let O = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
|
var V;
|
|
var V;
|
|
@@ -2342,9 +2342,9 @@ function Co(e) {
|
|
|
}
|
|
}
|
|
|
}), A) : A.catch((O) => O);
|
|
}), A) : A.catch((O) => O);
|
|
|
}, g = (u, c) => {
|
|
}, g = (u, c) => {
|
|
|
- let b = [], S = !0;
|
|
|
|
|
- u ? Array.isArray(u) ? b = u : b = [u] : (S = !1, b = o.value);
|
|
|
|
|
- const A = v(b, c || {}, S);
|
|
|
|
|
|
|
+ let b = [], C = !0;
|
|
|
|
|
+ u ? Array.isArray(u) ? b = u : b = [u] : (C = !1, b = o.value);
|
|
|
|
|
+ const A = v(b, c || {}, C);
|
|
|
return A.catch((O) => O), A;
|
|
return A.catch((O) => O), A;
|
|
|
}, h = (u) => {
|
|
}, h = (u) => {
|
|
|
let c = [];
|
|
let c = [];
|
|
@@ -2357,9 +2357,9 @@ function Co(e) {
|
|
|
}, w = (u) => {
|
|
}, w = (u) => {
|
|
|
const c = {
|
|
const c = {
|
|
|
autoLink: !1
|
|
autoLink: !1
|
|
|
- }, b = [], S = Array.isArray(u) ? u : [u];
|
|
|
|
|
- for (let A = 0; A < S.length; A++) {
|
|
|
|
|
- const O = S[A];
|
|
|
|
|
|
|
+ }, b = [], C = Array.isArray(u) ? u : [u];
|
|
|
|
|
+ for (let A = 0; A < C.length; A++) {
|
|
|
|
|
+ const O = C[A];
|
|
|
(O == null ? void 0 : O.validateStatus) === "error" && (c.validateStatus = "error", O.help && b.push(O.help)), c.required = c.required || (O == null ? void 0 : O.required);
|
|
(O == null ? void 0 : O.validateStatus) === "error" && (c.validateStatus = "error", O.help && b.push(O.help)), c.required = c.required || (O == null ? void 0 : O.required);
|
|
|
}
|
|
}
|
|
|
return c.help = b, c;
|
|
return c.help = b, c;
|
|
@@ -2368,8 +2368,8 @@ function Co(e) {
|
|
|
const y = (u) => {
|
|
const y = (u) => {
|
|
|
const c = [];
|
|
const c = [];
|
|
|
o.value.forEach((b) => {
|
|
o.value.forEach((b) => {
|
|
|
- const S = Re(u, b, !1), A = Re($, b, !1);
|
|
|
|
|
- (d && (n == null ? void 0 : n.immediate) && S.isValid || !Gt(S.v, A.v)) && c.push(b);
|
|
|
|
|
|
|
+ const C = Re(u, b, !1), A = Re($, b, !1);
|
|
|
|
|
+ (d && (n == null ? void 0 : n.immediate) && C.isValid || !Gt(C.v, A.v)) && c.push(b);
|
|
|
}), g(c, {
|
|
}), g(c, {
|
|
|
trigger: "change"
|
|
trigger: "change"
|
|
|
}), d = !1, $ = Ae(Be(u));
|
|
}), d = !1, $ = Ae(Be(u));
|
|
@@ -2408,7 +2408,7 @@ function Co(e) {
|
|
|
clearValidate: h
|
|
clearValidate: h
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
-const So = () => ({
|
|
|
|
|
|
|
+const Co = () => ({
|
|
|
layout: de.oneOf(Qe("horizontal", "inline", "vertical")),
|
|
layout: de.oneOf(Qe("horizontal", "inline", "vertical")),
|
|
|
labelCol: $e(),
|
|
labelCol: $e(),
|
|
|
wrapperCol: $e(),
|
|
wrapperCol: $e(),
|
|
@@ -2445,13 +2445,13 @@ const oe = Te({
|
|
|
},
|
|
},
|
|
|
name: "AForm",
|
|
name: "AForm",
|
|
|
inheritAttrs: !1,
|
|
inheritAttrs: !1,
|
|
|
- props: kn(So(), {
|
|
|
|
|
|
|
+ props: kn(Co(), {
|
|
|
layout: "horizontal",
|
|
layout: "horizontal",
|
|
|
hideRequiredMark: !1,
|
|
hideRequiredMark: !1,
|
|
|
colon: !0
|
|
colon: !0
|
|
|
}),
|
|
}),
|
|
|
Item: Oo,
|
|
Item: Oo,
|
|
|
- useForm: Co,
|
|
|
|
|
|
|
+ useForm: So,
|
|
|
// emits: ['finishFailed', 'submit', 'finish', 'validate'],
|
|
// emits: ['finishFailed', 'submit', 'finish', 'validate'],
|
|
|
setup(e, t) {
|
|
setup(e, t) {
|
|
|
let {
|
|
let {
|
|
@@ -2472,8 +2472,8 @@ const oe = Te({
|
|
|
});
|
|
});
|
|
|
Jn(v), Zn(f);
|
|
Jn(v), Zn(f);
|
|
|
const w = F(() => {
|
|
const w = F(() => {
|
|
|
- var x, C;
|
|
|
|
|
- return (x = e.colon) !== null && x !== void 0 ? x : (C = s.value) === null || C === void 0 ? void 0 : C.colon;
|
|
|
|
|
|
|
+ var x, S;
|
|
|
|
|
+ return (x = e.colon) !== null && x !== void 0 ? x : (S = s.value) === null || S === void 0 ? void 0 : S.colon;
|
|
|
}), {
|
|
}), {
|
|
|
validateMessages: $
|
|
validateMessages: $
|
|
|
} = Qn(), d = F(() => P(P(P({}, Ie), $.value), e.validateMessages)), [y, m] = at(a), q = F(() => pe(a.value, {
|
|
} = Qn(), d = F(() => P(P(P({}, Ie), $.value), e.validateMessages)), [y, m] = at(a), q = F(() => pe(a.value, {
|
|
@@ -2481,76 +2481,76 @@ const oe = Te({
|
|
|
[`${a.value}-hide-required-mark`]: h.value === !1,
|
|
[`${a.value}-hide-required-mark`]: h.value === !1,
|
|
|
[`${a.value}-rtl`]: l.value === "rtl",
|
|
[`${a.value}-rtl`]: l.value === "rtl",
|
|
|
[`${a.value}-${v.value}`]: v.value
|
|
[`${a.value}-${v.value}`]: v.value
|
|
|
- }, m.value)), u = ke(), c = {}, b = (x, C) => {
|
|
|
|
|
- c[x] = C;
|
|
|
|
|
- }, S = (x) => {
|
|
|
|
|
|
|
+ }, m.value)), u = ke(), c = {}, b = (x, S) => {
|
|
|
|
|
+ c[x] = S;
|
|
|
|
|
+ }, C = (x) => {
|
|
|
delete c[x];
|
|
delete c[x];
|
|
|
}, A = (x) => {
|
|
}, A = (x) => {
|
|
|
- const C = !!x, R = C ? ne(x).map(Ke) : [];
|
|
|
|
|
- return C ? Object.values(c).filter((H) => R.findIndex((X) => Eo(X, H.fieldName.value)) > -1) : Object.values(c);
|
|
|
|
|
|
|
+ const S = !!x, R = S ? ne(x).map(Ke) : [];
|
|
|
|
|
+ return S ? Object.values(c).filter((U) => R.findIndex((X) => Eo(X, U.fieldName.value)) > -1) : Object.values(c);
|
|
|
}, O = (x) => {
|
|
}, O = (x) => {
|
|
|
if (!e.model) {
|
|
if (!e.model) {
|
|
|
je(!1, "Form", "model is required for resetFields to work.");
|
|
je(!1, "Form", "model is required for resetFields to work.");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- A(x).forEach((C) => {
|
|
|
|
|
- C.resetField();
|
|
|
|
|
|
|
+ A(x).forEach((S) => {
|
|
|
|
|
+ S.resetField();
|
|
|
});
|
|
});
|
|
|
}, V = (x) => {
|
|
}, V = (x) => {
|
|
|
- A(x).forEach((C) => {
|
|
|
|
|
- C.clearValidate();
|
|
|
|
|
|
|
+ A(x).forEach((S) => {
|
|
|
|
|
+ S.clearValidate();
|
|
|
});
|
|
});
|
|
|
}, M = (x) => {
|
|
}, M = (x) => {
|
|
|
const {
|
|
const {
|
|
|
- scrollToFirstError: C
|
|
|
|
|
|
|
+ scrollToFirstError: S
|
|
|
} = e;
|
|
} = e;
|
|
|
- if (n("finishFailed", x), C && x.errorFields.length) {
|
|
|
|
|
|
|
+ if (n("finishFailed", x), S && x.errorFields.length) {
|
|
|
let R = {};
|
|
let R = {};
|
|
|
- typeof C == "object" && (R = C), T(x.errorFields[0].name, R);
|
|
|
|
|
|
|
+ typeof S == "object" && (R = S), T(x.errorFields[0].name, R);
|
|
|
}
|
|
}
|
|
|
}, L = function() {
|
|
}, L = function() {
|
|
|
return Q(...arguments);
|
|
return Q(...arguments);
|
|
|
}, T = function(x) {
|
|
}, T = function(x) {
|
|
|
- let C = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
|
|
|
|
|
+ let S = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
|
const R = A(x ? [x] : void 0);
|
|
const R = A(x ? [x] : void 0);
|
|
|
if (R.length) {
|
|
if (R.length) {
|
|
|
- const H = R[0].fieldId.value, X = H ? document.getElementById(H) : null;
|
|
|
|
|
|
|
+ const U = R[0].fieldId.value, X = U ? document.getElementById(U) : null;
|
|
|
X && gr(X, P({
|
|
X && gr(X, P({
|
|
|
scrollMode: "if-needed",
|
|
scrollMode: "if-needed",
|
|
|
block: "nearest"
|
|
block: "nearest"
|
|
|
- }, C));
|
|
|
|
|
|
|
+ }, S));
|
|
|
}
|
|
}
|
|
|
}, N = function() {
|
|
}, N = function() {
|
|
|
let x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
|
|
let x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
|
|
|
if (x === !0) {
|
|
if (x === !0) {
|
|
|
- const C = [];
|
|
|
|
|
|
|
+ const S = [];
|
|
|
return Object.values(c).forEach((R) => {
|
|
return Object.values(c).forEach((R) => {
|
|
|
let {
|
|
let {
|
|
|
- namePath: H
|
|
|
|
|
|
|
+ namePath: U
|
|
|
} = R;
|
|
} = R;
|
|
|
- C.push(H.value);
|
|
|
|
|
- }), St(e.model, C);
|
|
|
|
|
|
|
+ S.push(U.value);
|
|
|
|
|
+ }), Ct(e.model, S);
|
|
|
} else
|
|
} else
|
|
|
- return St(e.model, x);
|
|
|
|
|
- }, Z = (x, C) => {
|
|
|
|
|
|
|
+ return Ct(e.model, x);
|
|
|
|
|
+ }, Z = (x, S) => {
|
|
|
if (je(!(x instanceof Function), "Form", "validateFields/validateField/validate not support callback, please use promise instead"), !e.model)
|
|
if (je(!(x instanceof Function), "Form", "validateFields/validateField/validate not support callback, please use promise instead"), !e.model)
|
|
|
return je(!1, "Form", "model is required for validateFields to work."), Promise.reject("Form `model` is required for validateFields to work.");
|
|
return je(!1, "Form", "model is required for validateFields to work."), Promise.reject("Form `model` is required for validateFields to work.");
|
|
|
- const R = !!x, H = R ? ne(x).map(Ke) : [], X = [];
|
|
|
|
|
|
|
+ const R = !!x, U = R ? ne(x).map(Ke) : [], X = [];
|
|
|
Object.values(c).forEach((k) => {
|
|
Object.values(c).forEach((k) => {
|
|
|
var p;
|
|
var p;
|
|
|
- if (R || H.push(k.namePath.value), !(!((p = k.rules) === null || p === void 0) && p.value.length))
|
|
|
|
|
|
|
+ if (R || U.push(k.namePath.value), !(!((p = k.rules) === null || p === void 0) && p.value.length))
|
|
|
return;
|
|
return;
|
|
|
const I = k.namePath.value;
|
|
const I = k.namePath.value;
|
|
|
- if (!R || eo(H, I)) {
|
|
|
|
|
|
|
+ if (!R || eo(U, I)) {
|
|
|
const D = k.validateRules(P({
|
|
const D = k.validateRules(P({
|
|
|
validateMessages: d.value
|
|
validateMessages: d.value
|
|
|
- }, C));
|
|
|
|
|
|
|
+ }, S));
|
|
|
X.push(D.then(() => ({
|
|
X.push(D.then(() => ({
|
|
|
name: I,
|
|
name: I,
|
|
|
errors: [],
|
|
errors: [],
|
|
|
warnings: []
|
|
warnings: []
|
|
|
})).catch((G) => {
|
|
})).catch((G) => {
|
|
|
- const z = [], U = [];
|
|
|
|
|
|
|
+ const z = [], H = [];
|
|
|
return G.forEach((re) => {
|
|
return G.forEach((re) => {
|
|
|
let {
|
|
let {
|
|
|
rule: {
|
|
rule: {
|
|
@@ -2558,25 +2558,25 @@ const oe = Te({
|
|
|
},
|
|
},
|
|
|
errors: ot
|
|
errors: ot
|
|
|
} = re;
|
|
} = re;
|
|
|
- ie ? U.push(...ot) : z.push(...ot);
|
|
|
|
|
|
|
+ ie ? H.push(...ot) : z.push(...ot);
|
|
|
}), z.length ? Promise.reject({
|
|
}), z.length ? Promise.reject({
|
|
|
name: I,
|
|
name: I,
|
|
|
errors: z,
|
|
errors: z,
|
|
|
- warnings: U
|
|
|
|
|
|
|
+ warnings: H
|
|
|
}) : {
|
|
}) : {
|
|
|
name: I,
|
|
name: I,
|
|
|
errors: z,
|
|
errors: z,
|
|
|
- warnings: U
|
|
|
|
|
|
|
+ warnings: H
|
|
|
};
|
|
};
|
|
|
}));
|
|
}));
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
const te = yn(X);
|
|
const te = yn(X);
|
|
|
u.value = te;
|
|
u.value = te;
|
|
|
- const xe = te.then(() => u.value === te ? Promise.resolve(N(H)) : Promise.reject([])).catch((k) => {
|
|
|
|
|
|
|
+ const xe = te.then(() => u.value === te ? Promise.resolve(N(U)) : Promise.reject([])).catch((k) => {
|
|
|
const p = k.filter((I) => I && I.errors.length);
|
|
const p = k.filter((I) => I && I.errors.length);
|
|
|
return Promise.reject({
|
|
return Promise.reject({
|
|
|
- values: N(H),
|
|
|
|
|
|
|
+ values: N(U),
|
|
|
errorFields: p,
|
|
errorFields: p,
|
|
|
outOfDate: u.value !== te
|
|
outOfDate: u.value !== te
|
|
|
});
|
|
});
|
|
@@ -2611,9 +2611,9 @@ const oe = Te({
|
|
|
validateTrigger: F(() => e.validateTrigger),
|
|
validateTrigger: F(() => e.validateTrigger),
|
|
|
rules: F(() => e.rules),
|
|
rules: F(() => e.rules),
|
|
|
addField: b,
|
|
addField: b,
|
|
|
- removeField: S,
|
|
|
|
|
- onValidate: (x, C, R) => {
|
|
|
|
|
- n("validate", x, C, R);
|
|
|
|
|
|
|
+ removeField: C,
|
|
|
|
|
+ onValidate: (x, S, R) => {
|
|
|
|
|
+ n("validate", x, S, R);
|
|
|
},
|
|
},
|
|
|
validateMessages: d
|
|
validateMessages: d
|
|
|
}), se(() => e.rules, () => {
|
|
}), se(() => e.rules, () => {
|