|
@@ -1,5 +1,5 @@
|
|
|
-import { b6 as bn, b7 as Pe, b8 as wn, b9 as Tt, as as Ye, ba as xn, ar as qe, bb as $n, bc as It, bd as Fn, be as An, bf as jt, bg as On, bh as lt, bi as st, bj as Je, bk as Ze, bl as _t, bm as Ce, bn as Cn, bo as Mt, at as Lt, bp as Sn, bq as Rt, br as En, bs as Pn, bt as ut, bu as qn, bv as Tn, d as P, D as Ne, E as In, aL as jn, c as pe, y as _n, bw as Mn, aM as Ln, _ as W, g as Rn, m as Nn, bx as Nt, aK as Vn, r as Vt, aB as Dn, aC as Bn, az as Gn, aG as Dt, u as Bt, by as Wn, V as zn, a1 as Hn, aP as Un, bz as Kn, aR as Xn, P as de, bA as Qe, bB as Yn, bC as Gt, bD as Jn, bE as Zn, bF as Qn, i as kn, av as ue, ax as me, ay as ft, aw as ct, f as er, e as $e, bG as _e, U as tr, bH as Ve } from "./index2.js";
|
|
|
|
|
-import { cloneVNode as nr, inject as Wt, computed as F, provide as zt, createVNode as j, 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 Ht, onMounted as sr, toRaw as Be, nextTick as Ut, unref as ae } from "vue";
|
|
|
|
|
|
|
+import { a_ as bn, a$ as Pe, b0 as wn, b1 as Tt, as as Ye, b2 as xn, ar as qe, b3 as $n, b4 as It, b5 as Fn, b6 as An, b7 as _t, b8 as On, b9 as lt, ba as st, bb as Je, bc as Ze, bd as jt, be as Ce, bf as Cn, bg as Mt, at as Lt, bh as Sn, bi as Rt, bj as En, bk as Pn, bl as ut, bm as qn, bn as Tn, d as P, D as Ne, E as In, aL as _n, c as pe, y as jn, bo as Mn, aM as Ln, _ as W, g as Rn, m as Nn, bp as Nt, aK as Vn, r as Vt, aB as Dn, aC as Bn, az as Gn, aG as Dt, u as Bt, bq as Wn, V as zn, a1 as Un, br as Hn, bs as Kn, bt as Xn, P as de, bu as Qe, bv as Yn, bw as Gt, bx as Jn, by as Zn, bz as Qn, i as kn, av as ue, ax as me, ay as ft, aw as ct, f as er, e as $e, bA as je, U as tr, bB 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 { 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 "./index3.js";
|
|
import { s as gr } from "./index3.js";
|
|
@@ -99,12 +99,12 @@ function Tr(e, t) {
|
|
|
function Ir(e, t) {
|
|
function Ir(e, t) {
|
|
|
return be(e, It(e), t);
|
|
return be(e, It(e), t);
|
|
|
}
|
|
}
|
|
|
-var jr = Object.getOwnPropertySymbols, en = jr ? function(e) {
|
|
|
|
|
|
|
+var _r = Object.getOwnPropertySymbols, en = _r ? function(e) {
|
|
|
for (var t = []; e; )
|
|
for (var t = []; e; )
|
|
|
- An(t, It(e)), e = jt(e);
|
|
|
|
|
|
|
+ An(t, It(e)), e = _t(e);
|
|
|
return t;
|
|
return t;
|
|
|
} : Fn;
|
|
} : Fn;
|
|
|
-function _r(e, t) {
|
|
|
|
|
|
|
+function jr(e, t) {
|
|
|
return be(e, en(e), t);
|
|
return be(e, en(e), t);
|
|
|
}
|
|
}
|
|
|
function tn(e) {
|
|
function tn(e) {
|
|
@@ -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]", 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]";
|
|
|
|
|
|
|
+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]";
|
|
|
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 Hr:
|
|
|
|
|
- return new r();
|
|
|
|
|
case Ur:
|
|
case Ur:
|
|
|
|
|
+ return new r();
|
|
|
|
|
+ case Hr:
|
|
|
case Yr:
|
|
case Yr:
|
|
|
return new r(e);
|
|
return new r(e);
|
|
|
case Kr:
|
|
case Kr:
|
|
@@ -171,19 +171,19 @@ function si(e, t, n) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
function ui(e) {
|
|
function ui(e) {
|
|
|
- return typeof e.constructor == "function" && !Tt(e) ? yr(jt(e)) : {};
|
|
|
|
|
|
|
+ return typeof e.constructor == "function" && !Tt(e) ? yr(_t(e)) : {};
|
|
|
}
|
|
}
|
|
|
var fi = "[object Map]";
|
|
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 ? _t(bt) : ci, mi = "[object Set]";
|
|
|
|
|
|
|
+var bt = Ce && Ce.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 ? _t(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]", ji = "[object Float32Array]", _i = "[object Float64Array]", Mi = "[object Int8Array]", Li = "[object Int16Array]", Ri = "[object Int32Array]", Ni = "[object Uint8Array]", Vi = "[object Uint8ClampedArray]", Di = "[object Uint16Array]", Bi = "[object Uint32Array]", _ = {};
|
|
|
|
|
-_[nn] = _[bi] = _[Ti] = _[Ii] = _[wi] = _[xi] = _[ji] = _[_i] = _[Mi] = _[Li] = _[Ri] = _[Ai] = _[Oi] = _[an] = _[Ci] = _[Si] = _[Ei] = _[Pi] = _[Ni] = _[Vi] = _[Di] = _[Bi] = !0;
|
|
|
|
|
-_[$i] = _[rn] = _[qi] = !1;
|
|
|
|
|
|
|
+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;
|
|
|
|
|
+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;
|
|
|
if (n && (a = i ? n(e, r, i, o) : n(e)), a !== void 0)
|
|
if (n && (a = i ? n(e, r, i, o) : n(e)), a !== void 0)
|
|
@@ -200,9 +200,9 @@ function ve(e, t, n, r, i, o) {
|
|
|
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)
|
|
|
- return s ? _r(e, Pr(a, e)) : Ir(e, Er(a, e));
|
|
|
|
|
|
|
+ return s ? jr(e, Pr(a, e)) : Ir(e, Er(a, e));
|
|
|
} else {
|
|
} else {
|
|
|
- if (!_[g])
|
|
|
|
|
|
|
+ if (!j[g])
|
|
|
return i ? e : {};
|
|
return i ? e : {};
|
|
|
a = si(e, g, l);
|
|
a = si(e, g, l);
|
|
|
}
|
|
}
|
|
@@ -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, Hi = 2;
|
|
|
|
|
-function Ui(e, t, n, r) {
|
|
|
|
|
|
|
+var zi = 1, Ui = 2;
|
|
|
|
|
+function Hi(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 Ui(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 | Hi, r, f) : g))
|
|
|
|
|
|
|
+ if (!(g === void 0 ? Rt(v, s, zi | Ui, r, f) : g))
|
|
|
return !1;
|
|
return !1;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -267,7 +267,7 @@ 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 || Ui(n, e, t);
|
|
|
|
|
|
|
+ return n === e || Hi(n, e, t);
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
var Yi = 1, Ji = 2;
|
|
var Yi = 1, Ji = 2;
|
|
@@ -679,12 +679,12 @@ var fn = function(t, n, r, i, o, a) {
|
|
|
}
|
|
}
|
|
|
var a = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], l = t.type;
|
|
var a = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], l = t.type;
|
|
|
a.indexOf(l) > -1 ? ge[l](n) || i.push(J(o.messages.types[l], t.fullField, t.type)) : l && typeof n !== t.type && i.push(J(o.messages.types[l], t.fullField, t.type));
|
|
a.indexOf(l) > -1 ? ge[l](n) || i.push(J(o.messages.types[l], t.fullField, t.type)) : l && typeof n !== t.type && i.push(J(o.messages.types[l], t.fullField, t.type));
|
|
|
-}, ja = function(t, n, r, i, o) {
|
|
|
|
|
|
|
+}, _a = function(t, n, r, i, o) {
|
|
|
var a = typeof t.len == "number", l = typeof t.min == "number", s = typeof t.max == "number", v = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, f = n, g = null, h = typeof n == "number", w = typeof n == "string", $ = Array.isArray(n);
|
|
var a = typeof t.len == "number", l = typeof t.min == "number", s = typeof t.max == "number", v = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, f = n, g = null, h = typeof n == "number", w = typeof n == "string", $ = Array.isArray(n);
|
|
|
if (h ? g = "number" : w ? g = "string" : $ && (g = "array"), !g)
|
|
if (h ? g = "number" : w ? g = "string" : $ && (g = "array"), !g)
|
|
|
return !1;
|
|
return !1;
|
|
|
$ && (f = n.length), w && (f = n.replace(v, "_").length), a ? f !== t.len && i.push(J(o.messages[g].len, t.fullField, t.len)) : l && !s && f < t.min ? i.push(J(o.messages[g].min, t.fullField, t.min)) : s && !l && f > t.max ? i.push(J(o.messages[g].max, t.fullField, t.max)) : l && s && (f < t.min || f > t.max) && i.push(J(o.messages[g].range, t.fullField, t.min, t.max));
|
|
$ && (f = n.length), w && (f = n.replace(v, "_").length), a ? f !== t.len && i.push(J(o.messages[g].len, t.fullField, t.len)) : l && !s && f < t.min ? i.push(J(o.messages[g].min, t.fullField, t.min)) : s && !l && f > t.max ? i.push(J(o.messages[g].max, t.fullField, t.max)) : l && s && (f < t.min || f > t.max) && i.push(J(o.messages[g].range, t.fullField, t.min, t.max));
|
|
|
-}, fe = "enum", _a = function(t, n, r, i, o) {
|
|
|
|
|
|
|
+}, fe = "enum", ja = function(t, n, r, i, o) {
|
|
|
t[fe] = Array.isArray(t[fe]) ? t[fe] : [], t[fe].indexOf(n) === -1 && i.push(J(o.messages[fe], t.fullField, t[fe].join(", ")));
|
|
t[fe] = Array.isArray(t[fe]) ? t[fe] : [], t[fe].indexOf(n) === -1 && i.push(J(o.messages[fe], t.fullField, t[fe].join(", ")));
|
|
|
}, Ma = function(t, n, r, i, o) {
|
|
}, Ma = function(t, n, r, i, o) {
|
|
|
if (t.pattern) {
|
|
if (t.pattern) {
|
|
@@ -699,8 +699,8 @@ var fn = function(t, n, r, i, o, a) {
|
|
|
required: fn,
|
|
required: fn,
|
|
|
whitespace: qa,
|
|
whitespace: qa,
|
|
|
type: Ia,
|
|
type: Ia,
|
|
|
- range: ja,
|
|
|
|
|
- enum: _a,
|
|
|
|
|
|
|
+ range: _a,
|
|
|
|
|
+ enum: ja,
|
|
|
pattern: Ma
|
|
pattern: Ma
|
|
|
}, La = function(t, n, r, i, o) {
|
|
}, La = 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);
|
|
@@ -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);
|
|
|
-}, Ha = "enum", Ua = function(t, n, r, i, o) {
|
|
|
|
|
|
|
+}, Ua = "enum", Ha = 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[Ha](t, n, i, a, o);
|
|
|
|
|
|
|
+ E.required(t, n, i, a, o), n !== void 0 && E[Ua](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: Ua,
|
|
|
|
|
|
|
+ enum: Ha,
|
|
|
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 He() {
|
|
|
|
|
|
|
+function Ue() {
|
|
|
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 He() {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
-var Ue = He(), we = /* @__PURE__ */ function() {
|
|
|
|
|
|
|
+var He = Ue(), we = /* @__PURE__ */ function() {
|
|
|
function e(n) {
|
|
function e(n) {
|
|
|
- this.rules = null, this._messages = Ue, this.define(n);
|
|
|
|
|
|
|
+ this.rules = null, this._messages = He, 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 Ue = He(), 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(He(), r)), this._messages;
|
|
|
|
|
|
|
+ return r && (this._messages = At(Ue(), 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 Ue = He(), we = /* @__PURE__ */ function() {
|
|
|
}
|
|
}
|
|
|
if (s.messages) {
|
|
if (s.messages) {
|
|
|
var g = this.messages();
|
|
var g = this.messages();
|
|
|
- g === Ue && (g = He()), At(g, s.messages), s.messages = g;
|
|
|
|
|
|
|
+ g === He && (g = Ue()), 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);
|
|
@@ -1025,7 +1025,7 @@ we.register = function(t, n) {
|
|
|
he[t] = n;
|
|
he[t] = n;
|
|
|
};
|
|
};
|
|
|
we.warning = un;
|
|
we.warning = un;
|
|
|
-we.messages = Ue;
|
|
|
|
|
|
|
+we.messages = He;
|
|
|
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];
|
|
@@ -1135,7 +1135,7 @@ const Y = "'${name}' is not a valid ${type}", Ie = {
|
|
|
mismatch: "'${name}' does not match pattern ${pattern}"
|
|
mismatch: "'${name}' does not match pattern ${pattern}"
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
-var je = function(e, t, n, r) {
|
|
|
|
|
|
|
+var _e = function(e, t, n, r) {
|
|
|
function i(o) {
|
|
function i(o) {
|
|
|
return o instanceof n ? o : new n(function(a) {
|
|
return o instanceof n ? o : new n(function(a) {
|
|
|
a(o);
|
|
a(o);
|
|
@@ -1170,7 +1170,7 @@ function io(e, t) {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
function Xe(e, t, n, r, i) {
|
|
function Xe(e, t, n, r, i) {
|
|
|
- return je(this, void 0, void 0, function* () {
|
|
|
|
|
|
|
+ return _e(this, void 0, void 0, function* () {
|
|
|
const o = P({}, n);
|
|
const o = P({}, n);
|
|
|
delete o.ruleIndex, delete o.trigger;
|
|
delete o.ruleIndex, delete o.trigger;
|
|
|
let a = null;
|
|
let a = null;
|
|
@@ -1238,7 +1238,7 @@ function gn(e, t, n, r, i, o) {
|
|
|
});
|
|
});
|
|
|
let s;
|
|
let s;
|
|
|
if (i === !0)
|
|
if (i === !0)
|
|
|
- s = new Promise((v, f) => je(this, void 0, void 0, function* () {
|
|
|
|
|
|
|
+ s = new Promise((v, f) => _e(this, void 0, void 0, function* () {
|
|
|
for (let g = 0; g < l.length; g += 1) {
|
|
for (let g = 0; g < l.length; g += 1) {
|
|
|
const h = l[g], w = yield Xe(a, t, h, r, o);
|
|
const h = l[g], w = yield Xe(a, t, h, r, o);
|
|
|
if (w.length) {
|
|
if (w.length) {
|
|
@@ -1261,12 +1261,12 @@ function gn(e, t, n, r, i, o) {
|
|
|
return s.catch((v) => v), s;
|
|
return s.catch((v) => v), s;
|
|
|
}
|
|
}
|
|
|
function ao(e) {
|
|
function ao(e) {
|
|
|
- return je(this, void 0, void 0, function* () {
|
|
|
|
|
|
|
+ return _e(this, void 0, void 0, function* () {
|
|
|
return Promise.all(e).then((t) => [].concat(...t));
|
|
return Promise.all(e).then((t) => [].concat(...t));
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
function oo(e) {
|
|
function oo(e) {
|
|
|
- return je(this, void 0, void 0, function* () {
|
|
|
|
|
|
|
+ return _e(this, void 0, void 0, function* () {
|
|
|
let t = 0;
|
|
let t = 0;
|
|
|
return new Promise((n) => {
|
|
return new Promise((n) => {
|
|
|
e.forEach((r) => {
|
|
e.forEach((r) => {
|
|
@@ -1325,7 +1325,7 @@ const vn = Symbol("formContextKey"), hn = (e) => {
|
|
|
colon: $,
|
|
colon: $,
|
|
|
required: d,
|
|
required: d,
|
|
|
requiredMark: y
|
|
requiredMark: y
|
|
|
- } = P(P({}, e), i), [m] = jn("Form"), q = (o = e.label) !== null && o !== void 0 ? o : (a = n.label) === null || a === void 0 ? void 0 : a.call(n);
|
|
|
|
|
|
|
+ } = P(P({}, e), i), [m] = _n("Form"), q = (o = e.label) !== null && o !== void 0 ? o : (a = n.label) === null || a === void 0 ? void 0 : a.call(n);
|
|
|
if (!q) return null;
|
|
if (!q) return null;
|
|
|
const {
|
|
const {
|
|
|
vertical: u,
|
|
vertical: u,
|
|
@@ -1339,18 +1339,18 @@ const vn = Symbol("formContextKey"), hn = (e) => {
|
|
|
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;
|
|
|
if (N && !u.value && typeof q == "string" && q.trim() !== "" && (T = q.replace(/[:|:]\s*$/, "")), e.tooltip || n.tooltip) {
|
|
if (N && !u.value && typeof q == "string" && q.trim() !== "" && (T = q.replace(/[:|:]\s*$/, "")), e.tooltip || n.tooltip) {
|
|
|
- const K = j("span", {
|
|
|
|
|
|
|
+ const K = _("span", {
|
|
|
class: `${f}-item-tooltip`
|
|
class: `${f}-item-tooltip`
|
|
|
- }, [j(_n, {
|
|
|
|
|
|
|
+ }, [_(jn, {
|
|
|
title: e.tooltip
|
|
title: e.tooltip
|
|
|
}, {
|
|
}, {
|
|
|
- default: () => [j(Mn, null, null)]
|
|
|
|
|
|
|
+ default: () => [_(Mn, null, null)]
|
|
|
})]);
|
|
})]);
|
|
|
- T = j(Se, null, [T, n.tooltip ? (l = n.tooltip) === null || l === void 0 ? void 0 : l.call(n, {
|
|
|
|
|
|
|
+ T = _(Se, 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 = j(Se, null, [T, j("span", {
|
|
|
|
|
|
|
+ y === "optional" && !d && (T = _(Se, 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({
|
|
@@ -1358,10 +1358,10 @@ const vn = Symbol("formContextKey"), hn = (e) => {
|
|
|
[`${f}-item-required-mark-optional`]: y === "optional",
|
|
[`${f}-item-required-mark-optional`]: y === "optional",
|
|
|
[`${f}-item-no-colon`]: !N
|
|
[`${f}-item-no-colon`]: !N
|
|
|
});
|
|
});
|
|
|
- return j(Qt, W(W({}, O), {}, {
|
|
|
|
|
|
|
+ return _(Qt, W(W({}, O), {}, {
|
|
|
class: L
|
|
class: L
|
|
|
}), {
|
|
}), {
|
|
|
- default: () => [j("label", {
|
|
|
|
|
|
|
+ default: () => [_("label", {
|
|
|
for: g,
|
|
for: g,
|
|
|
class: Q,
|
|
class: Q,
|
|
|
title: typeof q == "string" ? q : "",
|
|
title: typeof q == "string" ? q : "",
|
|
@@ -1826,14 +1826,14 @@ const uo = (e) => {
|
|
|
}), () => {
|
|
}), () => {
|
|
|
var v, f;
|
|
var v, f;
|
|
|
const g = Dn(`${r.value}-show-help-item`), h = Bn(`${r.value}-show-help-item`, g);
|
|
const g = Dn(`${r.value}-show-help-item`), h = Bn(`${r.value}-show-help-item`, g);
|
|
|
- return h.role = "alert", h.class = [s.value, o.value, n.class, `${r.value}-show-help`], j(rr, W(W({}, Gn(`${r.value}-show-help`)), {}, {
|
|
|
|
|
|
|
+ return h.role = "alert", h.class = [s.value, o.value, n.class, `${r.value}-show-help`], _(rr, W(W({}, Gn(`${r.value}-show-help`)), {}, {
|
|
|
onAfterEnter: () => e.onErrorVisibleChanged(!0),
|
|
onAfterEnter: () => e.onErrorVisibleChanged(!0),
|
|
|
onAfterLeave: () => e.onErrorVisibleChanged(!1)
|
|
onAfterLeave: () => e.onErrorVisibleChanged(!1)
|
|
|
}), {
|
|
}), {
|
|
|
- default: () => [ir(j(ar, W(W({}, h), {}, {
|
|
|
|
|
|
|
+ default: () => [ir(_(ar, W(W({}, h), {}, {
|
|
|
tag: "div"
|
|
tag: "div"
|
|
|
}), {
|
|
}), {
|
|
|
- default: () => [(f = e.errors) === null || f === void 0 ? void 0 : f.map((w, $) => j("div", {
|
|
|
|
|
|
|
+ default: () => [(f = e.errors) === null || f === void 0 ? void 0 : f.map((w, $) => _("div", {
|
|
|
key: $,
|
|
key: $,
|
|
|
class: l.value ? `${o.value}-${l.value}` : ""
|
|
class: l.value ? `${o.value}-${l.value}` : ""
|
|
|
}, [w]))]
|
|
}, [w]))]
|
|
@@ -1871,31 +1871,31 @@ const uo = (e) => {
|
|
|
// status,
|
|
// status,
|
|
|
extra: d = (s = n.extra) === null || s === void 0 ? void 0 : s.call(n)
|
|
extra: d = (s = n.extra) === null || s === void 0 ? void 0 : s.call(n)
|
|
|
} = e, y = `${v}-item`, m = f || (i == null ? void 0 : i.value) || {}, q = pe(`${y}-control`, m.class);
|
|
} = e, y = `${v}-item`, m = f || (i == null ? void 0 : i.value) || {}, q = pe(`${y}-control`, m.class);
|
|
|
- return j(Qt, W(W({}, m), {}, {
|
|
|
|
|
|
|
+ return _(Qt, W(W({}, m), {}, {
|
|
|
class: q
|
|
class: q
|
|
|
}), {
|
|
}), {
|
|
|
default: () => {
|
|
default: () => {
|
|
|
var u;
|
|
var u;
|
|
|
- return j(Se, null, [j("div", {
|
|
|
|
|
|
|
+ return _(Se, null, [_("div", {
|
|
|
class: `${y}-control-input`
|
|
class: `${y}-control-input`
|
|
|
- }, [j("div", {
|
|
|
|
|
|
|
+ }, [_("div", {
|
|
|
class: `${y}-control-input-content`
|
|
class: `${y}-control-input-content`
|
|
|
- }, [(u = n.default) === null || u === void 0 ? void 0 : u.call(n)])]), g !== null || $.length ? j("div", {
|
|
|
|
|
|
|
+ }, [(u = n.default) === null || u === void 0 ? void 0 : u.call(n)])]), g !== null || $.length ? _("div", {
|
|
|
style: {
|
|
style: {
|
|
|
display: "flex",
|
|
display: "flex",
|
|
|
flexWrap: "nowrap"
|
|
flexWrap: "nowrap"
|
|
|
}
|
|
}
|
|
|
- }, [j(yo, {
|
|
|
|
|
|
|
+ }, [_(yo, {
|
|
|
errors: $,
|
|
errors: $,
|
|
|
help: w,
|
|
help: w,
|
|
|
class: `${y}-explain-connected`,
|
|
class: `${y}-explain-connected`,
|
|
|
onErrorVisibleChanged: h
|
|
onErrorVisibleChanged: h
|
|
|
- }, null), !!g && j("div", {
|
|
|
|
|
|
|
+ }, null), !!g && _("div", {
|
|
|
style: {
|
|
style: {
|
|
|
width: 0,
|
|
width: 0,
|
|
|
height: `${g}px`
|
|
height: `${g}px`
|
|
|
}
|
|
}
|
|
|
- }, null)]) : null, d ? j("div", {
|
|
|
|
|
|
|
+ }, null)]) : null, d ? _("div", {
|
|
|
class: `${y}-extra`
|
|
class: `${y}-extra`
|
|
|
}, [d]) : null]);
|
|
}, [d]) : null]);
|
|
|
}
|
|
}
|
|
@@ -1916,8 +1916,8 @@ Qe("success", "warning", "error", "validating", "");
|
|
|
const xo = {
|
|
const xo = {
|
|
|
success: Xn,
|
|
success: Xn,
|
|
|
warning: Kn,
|
|
warning: Kn,
|
|
|
- error: Un,
|
|
|
|
|
- validating: Hn
|
|
|
|
|
|
|
+ error: Hn,
|
|
|
|
|
+ validating: Un
|
|
|
};
|
|
};
|
|
|
function Le(e, t, n) {
|
|
function Le(e, t, n) {
|
|
|
let r = e;
|
|
let r = e;
|
|
@@ -2039,7 +2039,7 @@ 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, (H) => H.required) ? z : z.concat(D);
|
|
|
|
|
|
|
+ return oa(z, (U) => U.required) ? z : z.concat(D);
|
|
|
}), S = F(() => {
|
|
}), S = F(() => {
|
|
|
const p = b.value;
|
|
const p = b.value;
|
|
|
let I = !1;
|
|
let I = !1;
|
|
@@ -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((H) => {
|
|
|
|
|
|
|
+ if (D && (G = G.filter((U) => {
|
|
|
const {
|
|
const {
|
|
|
trigger: re
|
|
trigger: re
|
|
|
- } = H;
|
|
|
|
|
|
|
+ } = U;
|
|
|
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((H) => H).then(function() {
|
|
|
|
|
- let H = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
|
|
|
|
|
+ return A.value = "validating", h.value = [], z.catch((U) => U).then(function() {
|
|
|
|
|
+ let U = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
|
if (A.value === "validating") {
|
|
if (A.value === "validating") {
|
|
|
- const re = H.filter((ie) => ie && ie.errors.length);
|
|
|
|
|
|
|
+ const re = U.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, Ut(() => {
|
|
|
|
|
|
|
+ Array.isArray(D) ? G.o[G.k] = [].concat((p = u.value) !== null && p !== void 0 ? p : []) : G.o[G.k] = u.value, Ht(() => {
|
|
|
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 = () => {
|
|
@@ -2147,16 +2147,16 @@ const Ao = "form_item", Oo = Te({
|
|
|
[`${a.value}-item-has-error`]: C.value === "error",
|
|
[`${a.value}-item-has-error`]: C.value === "error",
|
|
|
[`${a.value}-item-is-validating`]: C.value === "validating",
|
|
[`${a.value}-item-is-validating`]: C.value === "validating",
|
|
|
[`${a.value}-item-hidden`]: e.hidden
|
|
[`${a.value}-item-hidden`]: e.hidden
|
|
|
- })), U = Ht({});
|
|
|
|
|
- zn.useProvide(U), De(() => {
|
|
|
|
|
|
|
+ })), H = Ut({});
|
|
|
|
|
+ zn.useProvide(H), De(() => {
|
|
|
let p;
|
|
let p;
|
|
|
if (e.hasFeedback) {
|
|
if (e.hasFeedback) {
|
|
|
const I = C.value && xo[C.value];
|
|
const I = C.value && xo[C.value];
|
|
|
- p = I ? j("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-${C.value}`)
|
|
|
- }, [j(I, null, null)]) : null;
|
|
|
|
|
|
|
+ }, [_(I, null, null)]) : null;
|
|
|
}
|
|
}
|
|
|
- P(U, {
|
|
|
|
|
|
|
+ P(H, {
|
|
|
status: C.value,
|
|
status: C.value,
|
|
|
hasFeedback: e.hasFeedback,
|
|
hasFeedback: e.hasFeedback,
|
|
|
feedbackIcon: p,
|
|
feedbackIcon: p,
|
|
@@ -2184,16 +2184,16 @@ const Ao = "form_item", Oo = Te({
|
|
|
var p, I;
|
|
var p, I;
|
|
|
if (e.noStyle) return (p = n.default) === null || p === void 0 ? void 0 : p.call(n);
|
|
if (e.noStyle) return (p = n.default) === null || p === void 0 ? void 0 : p.call(n);
|
|
|
const D = (I = e.help) !== null && I !== void 0 ? I : n.help ? Dt(n.help()) : null, G = !!(D != null && Array.isArray(D) && D.length || x.value.length);
|
|
const D = (I = e.help) !== null && I !== void 0 ? I : n.help ? Dt(n.help()) : null, G = !!(D != null && Array.isArray(D) && D.length || x.value.length);
|
|
|
- return te.value = G, l(j("div", {
|
|
|
|
|
|
|
+ return te.value = G, l(_("div", {
|
|
|
class: [R.value, G ? `${a.value}-item-with-help` : "", r.class],
|
|
class: [R.value, G ? `${a.value}-item-with-help` : "", r.class],
|
|
|
ref: v
|
|
ref: v
|
|
|
- }, [j(mr, W(W({}, r), {}, {
|
|
|
|
|
|
|
+ }, [_(mr, W(W({}, r), {}, {
|
|
|
class: `${a.value}-item-row`,
|
|
class: `${a.value}-item-row`,
|
|
|
key: "row"
|
|
key: "row"
|
|
|
}), {
|
|
}), {
|
|
|
default: () => {
|
|
default: () => {
|
|
|
- var z, H;
|
|
|
|
|
- return j(Se, null, [j(it, W(W({}, e), {}, {
|
|
|
|
|
|
|
+ var z, U;
|
|
|
|
|
+ return _(Se, null, [_(it, W(W({}, e), {}, {
|
|
|
htmlFor: Z.value,
|
|
htmlFor: Z.value,
|
|
|
required: S.value,
|
|
required: S.value,
|
|
|
requiredMark: f.requiredMark.value,
|
|
requiredMark: f.requiredMark.value,
|
|
@@ -2203,20 +2203,20 @@ const Ao = "form_item", Oo = Te({
|
|
|
}), {
|
|
}), {
|
|
|
label: n.label,
|
|
label: n.label,
|
|
|
tooltip: n.tooltip
|
|
tooltip: n.tooltip
|
|
|
- }), j(bo, W(W({}, e), {}, {
|
|
|
|
|
|
|
+ }), _(bo, W(W({}, e), {}, {
|
|
|
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: C.value,
|
|
|
ref: $,
|
|
ref: $,
|
|
|
help: D,
|
|
help: D,
|
|
|
- extra: (z = e.extra) !== null && z !== void 0 ? z : (H = n.extra) === null || H === void 0 ? void 0 : H.call(n),
|
|
|
|
|
|
|
+ extra: (z = e.extra) !== null && z !== void 0 ? z : (U = n.extra) === null || U === void 0 ? void 0 : U.call(n),
|
|
|
onErrorVisibleChanged: k
|
|
onErrorVisibleChanged: k
|
|
|
}), {
|
|
}), {
|
|
|
default: n.default
|
|
default: n.default
|
|
|
})]);
|
|
})]);
|
|
|
}
|
|
}
|
|
|
- }), !!X.value && j("div", {
|
|
|
|
|
|
|
+ }), !!X.value && _("div", {
|
|
|
class: `${a.value}-margin-offset`,
|
|
class: `${a.value}-margin-offset`,
|
|
|
style: {
|
|
style: {
|
|
|
marginBottom: `-${X.value}px`
|
|
marginBottom: `-${X.value}px`
|
|
@@ -2267,8 +2267,8 @@ function Re(e, t, n) {
|
|
|
}
|
|
}
|
|
|
function Co(e) {
|
|
function Co(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 = Ht({}), o = ee([]), a = (u) => {
|
|
|
|
|
- P(ae(e), P(P({}, Ae(r)), u)), Ut(() => {
|
|
|
|
|
|
|
+ const r = Ae(ae(e)), i = Ut({}), o = ee([]), a = (u) => {
|
|
|
|
|
+ P(ae(e), P(P({}, Ae(r)), u)), Ht(() => {
|
|
|
Object.keys(i).forEach((c) => {
|
|
Object.keys(i).forEach((c) => {
|
|
|
i[c] = {
|
|
i[c] = {
|
|
|
autoLink: !1,
|
|
autoLink: !1,
|
|
@@ -2487,10 +2487,10 @@ const oe = Te({
|
|
|
delete c[x];
|
|
delete c[x];
|
|
|
}, A = (x) => {
|
|
}, A = (x) => {
|
|
|
const C = !!x, R = C ? ne(x).map(Ke) : [];
|
|
const C = !!x, R = C ? ne(x).map(Ke) : [];
|
|
|
- return C ? Object.values(c).filter((U) => R.findIndex((X) => Eo(X, U.fieldName.value)) > -1) : Object.values(c);
|
|
|
|
|
|
|
+ return C ? Object.values(c).filter((H) => R.findIndex((X) => Eo(X, H.fieldName.value)) > -1) : Object.values(c);
|
|
|
}, O = (x) => {
|
|
}, O = (x) => {
|
|
|
if (!e.model) {
|
|
if (!e.model) {
|
|
|
- _e(!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) => {
|
|
A(x).forEach((C) => {
|
|
@@ -2514,7 +2514,7 @@ const oe = Te({
|
|
|
let C = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
let C = 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 U = R[0].fieldId.value, X = U ? document.getElementById(U) : null;
|
|
|
|
|
|
|
+ const H = R[0].fieldId.value, X = H ? document.getElementById(H) : null;
|
|
|
X && gr(X, P({
|
|
X && gr(X, P({
|
|
|
scrollMode: "if-needed",
|
|
scrollMode: "if-needed",
|
|
|
block: "nearest"
|
|
block: "nearest"
|
|
@@ -2526,22 +2526,22 @@ const oe = Te({
|
|
|
const C = [];
|
|
const C = [];
|
|
|
return Object.values(c).forEach((R) => {
|
|
return Object.values(c).forEach((R) => {
|
|
|
let {
|
|
let {
|
|
|
- namePath: U
|
|
|
|
|
|
|
+ namePath: H
|
|
|
} = R;
|
|
} = R;
|
|
|
- C.push(U.value);
|
|
|
|
|
|
|
+ C.push(H.value);
|
|
|
}), St(e.model, C);
|
|
}), St(e.model, C);
|
|
|
} else
|
|
} else
|
|
|
return St(e.model, x);
|
|
return St(e.model, x);
|
|
|
}, Z = (x, C) => {
|
|
}, Z = (x, C) => {
|
|
|
- if (_e(!(x instanceof Function), "Form", "validateFields/validateField/validate not support callback, please use promise instead"), !e.model)
|
|
|
|
|
- return _e(!1, "Form", "model is required for validateFields to work."), Promise.reject("Form `model` is required for validateFields to work.");
|
|
|
|
|
- const R = !!x, U = R ? ne(x).map(Ke) : [], X = [];
|
|
|
|
|
|
|
+ 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.");
|
|
|
|
|
+ const R = !!x, H = R ? ne(x).map(Ke) : [], X = [];
|
|
|
Object.values(c).forEach((k) => {
|
|
Object.values(c).forEach((k) => {
|
|
|
var p;
|
|
var p;
|
|
|
- if (R || U.push(k.namePath.value), !(!((p = k.rules) === null || p === void 0) && p.value.length))
|
|
|
|
|
|
|
+ if (R || H.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(U, I)) {
|
|
|
|
|
|
|
+ if (!R || eo(H, I)) {
|
|
|
const D = k.validateRules(P({
|
|
const D = k.validateRules(P({
|
|
|
validateMessages: d.value
|
|
validateMessages: d.value
|
|
|
}, C));
|
|
}, C));
|
|
@@ -2550,7 +2550,7 @@ const oe = Te({
|
|
|
errors: [],
|
|
errors: [],
|
|
|
warnings: []
|
|
warnings: []
|
|
|
})).catch((G) => {
|
|
})).catch((G) => {
|
|
|
- const z = [], H = [];
|
|
|
|
|
|
|
+ const z = [], U = [];
|
|
|
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 ? H.push(...ot) : z.push(...ot);
|
|
|
|
|
|
|
+ ie ? U.push(...ot) : z.push(...ot);
|
|
|
}), z.length ? Promise.reject({
|
|
}), z.length ? Promise.reject({
|
|
|
name: I,
|
|
name: I,
|
|
|
errors: z,
|
|
errors: z,
|
|
|
- warnings: H
|
|
|
|
|
|
|
+ warnings: U
|
|
|
}) : {
|
|
}) : {
|
|
|
name: I,
|
|
name: I,
|
|
|
errors: z,
|
|
errors: z,
|
|
|
- warnings: H
|
|
|
|
|
|
|
+ warnings: U
|
|
|
};
|
|
};
|
|
|
}));
|
|
}));
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
const te = yn(X);
|
|
const te = yn(X);
|
|
|
u.value = te;
|
|
u.value = te;
|
|
|
- const xe = te.then(() => u.value === te ? Promise.resolve(N(U)) : Promise.reject([])).catch((k) => {
|
|
|
|
|
|
|
+ const xe = te.then(() => u.value === te ? Promise.resolve(N(H)) : 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(U),
|
|
|
|
|
|
|
+ values: N(H),
|
|
|
errorFields: p,
|
|
errorFields: p,
|
|
|
outOfDate: u.value !== te
|
|
outOfDate: u.value !== te
|
|
|
});
|
|
});
|
|
@@ -2620,7 +2620,7 @@ const oe = Te({
|
|
|
e.validateOnRuleChange && Z();
|
|
e.validateOnRuleChange && Z();
|
|
|
}), () => {
|
|
}), () => {
|
|
|
var x;
|
|
var x;
|
|
|
- return y(j("form", W(W({}, o), {}, {
|
|
|
|
|
|
|
+ return y(_("form", W(W({}, o), {}, {
|
|
|
onSubmit: K,
|
|
onSubmit: K,
|
|
|
class: [q.value, o.class]
|
|
class: [q.value, o.class]
|
|
|
}), [(x = r.default) === null || x === void 0 ? void 0 : x.call(r)]));
|
|
}), [(x = r.default) === null || x === void 0 ? void 0 : x.call(r)]));
|