@harbor-design/proform 1.4.15 → 1.4.17
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/dist/index.js +308 -300
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var l = (r, e, t) => (
|
|
4
|
-
import { ref as
|
|
5
|
-
var
|
|
6
|
-
function
|
|
7
|
-
var e =
|
|
1
|
+
var Ae = Object.defineProperty;
|
|
2
|
+
var ke = (r, e, t) => e in r ? Ae(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var l = (r, e, t) => (ke(r, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
+
import { ref as D, readonly as Ne, nextTick as S, isRef as z, watch as O, isReactive as L, watchEffect as K, toRaw as M, reactive as J, createVNode as m, mergeProps as T, withDirectives as et, vShow as tt, createTextVNode as rt, isVNode as it, defineComponent as st } from "vue";
|
|
5
|
+
var nt = typeof global == "object" && global && global.Object === Object && global, ot = typeof self == "object" && self && self.Object === Object && self, re = nt || ot || Function("return this")(), V = re.Symbol, He = Object.prototype, at = He.hasOwnProperty, lt = He.toString, q = V ? V.toStringTag : void 0;
|
|
6
|
+
function ut(r) {
|
|
7
|
+
var e = at.call(r, q), t = r[q];
|
|
8
8
|
try {
|
|
9
|
-
r[
|
|
9
|
+
r[q] = void 0;
|
|
10
10
|
var i = !0;
|
|
11
11
|
} catch {
|
|
12
12
|
}
|
|
13
|
-
var s =
|
|
14
|
-
return i && (e ? r[
|
|
13
|
+
var s = lt.call(r);
|
|
14
|
+
return i && (e ? r[q] = t : delete r[q]), s;
|
|
15
15
|
}
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
return
|
|
16
|
+
var ft = Object.prototype, ct = ft.toString;
|
|
17
|
+
function dt(r) {
|
|
18
|
+
return ct.call(r);
|
|
19
19
|
}
|
|
20
|
-
var
|
|
21
|
-
function
|
|
22
|
-
return r == null ? r === void 0 ?
|
|
20
|
+
var ht = "[object Null]", pt = "[object Undefined]", Ue = V ? V.toStringTag : void 0;
|
|
21
|
+
function De(r) {
|
|
22
|
+
return r == null ? r === void 0 ? pt : ht : Ue && Ue in Object(r) ? ut(r) : dt(r);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function mt(r) {
|
|
25
25
|
return r != null && typeof r == "object";
|
|
26
26
|
}
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
return typeof r == "symbol" ||
|
|
27
|
+
var gt = "[object Symbol]";
|
|
28
|
+
function ie(r) {
|
|
29
|
+
return typeof r == "symbol" || mt(r) && De(r) == gt;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function vt(r, e) {
|
|
32
32
|
for (var t = -1, i = r == null ? 0 : r.length, s = Array(i); ++t < i; )
|
|
33
33
|
s[t] = e(r[t], t, r);
|
|
34
34
|
return s;
|
|
35
35
|
}
|
|
36
|
-
var
|
|
37
|
-
function
|
|
36
|
+
var se = Array.isArray, bt = 1 / 0, qe = V ? V.prototype : void 0, Te = qe ? qe.toString : void 0;
|
|
37
|
+
function Ge(r) {
|
|
38
38
|
if (typeof r == "string")
|
|
39
39
|
return r;
|
|
40
|
-
if (
|
|
41
|
-
return
|
|
42
|
-
if (
|
|
43
|
-
return
|
|
40
|
+
if (se(r))
|
|
41
|
+
return vt(r, Ge) + "";
|
|
42
|
+
if (ie(r))
|
|
43
|
+
return Te ? Te.call(r) : "";
|
|
44
44
|
var e = r + "";
|
|
45
|
-
return e == "0" && 1 / r == -
|
|
45
|
+
return e == "0" && 1 / r == -bt ? "-0" : e;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function W(r) {
|
|
48
48
|
var e = typeof r;
|
|
49
49
|
return r != null && (e == "object" || e == "function");
|
|
50
50
|
}
|
|
51
|
-
var
|
|
52
|
-
function
|
|
53
|
-
if (!
|
|
51
|
+
var yt = "[object AsyncFunction]", _t = "[object Function]", Pt = "[object GeneratorFunction]", It = "[object Proxy]";
|
|
52
|
+
function G(r) {
|
|
53
|
+
if (!W(r))
|
|
54
54
|
return !1;
|
|
55
|
-
var e =
|
|
56
|
-
return e ==
|
|
55
|
+
var e = De(r);
|
|
56
|
+
return e == _t || e == Pt || e == yt || e == It;
|
|
57
57
|
}
|
|
58
|
-
var
|
|
59
|
-
var r = /[^.]+$/.exec(
|
|
58
|
+
var Q = re["__core-js_shared__"], ze = function() {
|
|
59
|
+
var r = /[^.]+$/.exec(Q && Q.keys && Q.keys.IE_PROTO || "");
|
|
60
60
|
return r ? "Symbol(src)_1." + r : "";
|
|
61
61
|
}();
|
|
62
|
-
function
|
|
63
|
-
return !!
|
|
62
|
+
function Ct(r) {
|
|
63
|
+
return !!ze && ze in r;
|
|
64
64
|
}
|
|
65
|
-
var
|
|
66
|
-
function
|
|
65
|
+
var St = Function.prototype, Ft = St.toString;
|
|
66
|
+
function Et(r) {
|
|
67
67
|
if (r != null) {
|
|
68
68
|
try {
|
|
69
|
-
return
|
|
69
|
+
return Ft.call(r);
|
|
70
70
|
} catch {
|
|
71
71
|
}
|
|
72
72
|
try {
|
|
@@ -76,181 +76,181 @@ function bt(r) {
|
|
|
76
76
|
}
|
|
77
77
|
return "";
|
|
78
78
|
}
|
|
79
|
-
var
|
|
80
|
-
"^" +
|
|
79
|
+
var Ot = /[\\^$.*+?()[\]{}|]/g, wt = /^\[object .+?Constructor\]$/, jt = Function.prototype, xt = Object.prototype, Rt = jt.toString, $t = xt.hasOwnProperty, Mt = RegExp(
|
|
80
|
+
"^" + Rt.call($t).replace(Ot, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
81
81
|
);
|
|
82
|
-
function
|
|
83
|
-
if (!
|
|
82
|
+
function Vt(r) {
|
|
83
|
+
if (!W(r) || Ct(r))
|
|
84
84
|
return !1;
|
|
85
|
-
var e =
|
|
86
|
-
return e.test(
|
|
85
|
+
var e = G(r) ? Mt : wt;
|
|
86
|
+
return e.test(Et(r));
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Nt(r, e) {
|
|
89
89
|
return r == null ? void 0 : r[e];
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
var t =
|
|
93
|
-
return
|
|
91
|
+
function ne(r, e) {
|
|
92
|
+
var t = Nt(r, e);
|
|
93
|
+
return Vt(t) ? t : void 0;
|
|
94
94
|
}
|
|
95
|
-
var
|
|
95
|
+
var Le = function() {
|
|
96
96
|
try {
|
|
97
|
-
var r =
|
|
97
|
+
var r = ne(Object, "defineProperty");
|
|
98
98
|
return r({}, "", {}), r;
|
|
99
99
|
} catch {
|
|
100
100
|
}
|
|
101
|
-
}(),
|
|
102
|
-
function
|
|
101
|
+
}(), Ut = 9007199254740991, qt = /^(?:0|[1-9]\d*)$/;
|
|
102
|
+
function Tt(r, e) {
|
|
103
103
|
var t = typeof r;
|
|
104
|
-
return e = e ??
|
|
104
|
+
return e = e ?? Ut, !!e && (t == "number" || t != "symbol" && qt.test(r)) && r > -1 && r % 1 == 0 && r < e;
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
e == "__proto__" &&
|
|
106
|
+
function zt(r, e, t) {
|
|
107
|
+
e == "__proto__" && Le ? Le(r, e, {
|
|
108
108
|
configurable: !0,
|
|
109
109
|
enumerable: !0,
|
|
110
110
|
value: t,
|
|
111
111
|
writable: !0
|
|
112
112
|
}) : r[e] = t;
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function Be(r, e) {
|
|
115
115
|
return r === e || r !== r && e !== e;
|
|
116
116
|
}
|
|
117
|
-
var
|
|
118
|
-
function
|
|
117
|
+
var Lt = Object.prototype, Ht = Lt.hasOwnProperty;
|
|
118
|
+
function Dt(r, e, t) {
|
|
119
119
|
var i = r[e];
|
|
120
|
-
(!(
|
|
120
|
+
(!(Ht.call(r, e) && Be(i, t)) || t === void 0 && !(e in r)) && zt(r, e, t);
|
|
121
121
|
}
|
|
122
|
-
var
|
|
123
|
-
function
|
|
124
|
-
if (
|
|
122
|
+
var Gt = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Bt = /^\w*$/;
|
|
123
|
+
function Kt(r, e) {
|
|
124
|
+
if (se(r))
|
|
125
125
|
return !1;
|
|
126
126
|
var t = typeof r;
|
|
127
|
-
return t == "number" || t == "symbol" || t == "boolean" || r == null ||
|
|
127
|
+
return t == "number" || t == "symbol" || t == "boolean" || r == null || ie(r) ? !0 : Bt.test(r) || !Gt.test(r) || e != null && r in Object(e);
|
|
128
128
|
}
|
|
129
|
-
var
|
|
130
|
-
function
|
|
131
|
-
this.__data__ =
|
|
129
|
+
var H = ne(Object, "create");
|
|
130
|
+
function Wt() {
|
|
131
|
+
this.__data__ = H ? H(null) : {}, this.size = 0;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function Xt(r) {
|
|
134
134
|
var e = this.has(r) && delete this.__data__[r];
|
|
135
135
|
return this.size -= e ? 1 : 0, e;
|
|
136
136
|
}
|
|
137
|
-
var
|
|
138
|
-
function
|
|
137
|
+
var Yt = "__lodash_hash_undefined__", Zt = Object.prototype, Jt = Zt.hasOwnProperty;
|
|
138
|
+
function Qt(r) {
|
|
139
139
|
var e = this.__data__;
|
|
140
|
-
if (
|
|
140
|
+
if (H) {
|
|
141
141
|
var t = e[r];
|
|
142
|
-
return t ===
|
|
142
|
+
return t === Yt ? void 0 : t;
|
|
143
143
|
}
|
|
144
|
-
return
|
|
144
|
+
return Jt.call(e, r) ? e[r] : void 0;
|
|
145
145
|
}
|
|
146
|
-
var
|
|
147
|
-
function
|
|
146
|
+
var At = Object.prototype, kt = At.hasOwnProperty;
|
|
147
|
+
function er(r) {
|
|
148
148
|
var e = this.__data__;
|
|
149
|
-
return
|
|
149
|
+
return H ? e[r] !== void 0 : kt.call(e, r);
|
|
150
150
|
}
|
|
151
|
-
var
|
|
152
|
-
function
|
|
151
|
+
var tr = "__lodash_hash_undefined__";
|
|
152
|
+
function rr(r, e) {
|
|
153
153
|
var t = this.__data__;
|
|
154
|
-
return this.size += this.has(r) ? 0 : 1, t[r] =
|
|
154
|
+
return this.size += this.has(r) ? 0 : 1, t[r] = H && e === void 0 ? tr : e, this;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function j(r) {
|
|
157
157
|
var e = -1, t = r == null ? 0 : r.length;
|
|
158
158
|
for (this.clear(); ++e < t; ) {
|
|
159
159
|
var i = r[e];
|
|
160
160
|
this.set(i[0], i[1]);
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
function
|
|
163
|
+
j.prototype.clear = Wt;
|
|
164
|
+
j.prototype.delete = Xt;
|
|
165
|
+
j.prototype.get = Qt;
|
|
166
|
+
j.prototype.has = er;
|
|
167
|
+
j.prototype.set = rr;
|
|
168
|
+
function ir() {
|
|
169
169
|
this.__data__ = [], this.size = 0;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function X(r, e) {
|
|
172
172
|
for (var t = r.length; t--; )
|
|
173
|
-
if (
|
|
173
|
+
if (Be(r[t][0], e))
|
|
174
174
|
return t;
|
|
175
175
|
return -1;
|
|
176
176
|
}
|
|
177
|
-
var
|
|
178
|
-
function
|
|
179
|
-
var e = this.__data__, t =
|
|
177
|
+
var sr = Array.prototype, nr = sr.splice;
|
|
178
|
+
function or(r) {
|
|
179
|
+
var e = this.__data__, t = X(e, r);
|
|
180
180
|
if (t < 0)
|
|
181
181
|
return !1;
|
|
182
182
|
var i = e.length - 1;
|
|
183
|
-
return t == i ? e.pop() :
|
|
183
|
+
return t == i ? e.pop() : nr.call(e, t, 1), --this.size, !0;
|
|
184
184
|
}
|
|
185
|
-
function
|
|
186
|
-
var e = this.__data__, t =
|
|
185
|
+
function ar(r) {
|
|
186
|
+
var e = this.__data__, t = X(e, r);
|
|
187
187
|
return t < 0 ? void 0 : e[t][1];
|
|
188
188
|
}
|
|
189
|
-
function
|
|
190
|
-
return
|
|
189
|
+
function lr(r) {
|
|
190
|
+
return X(this.__data__, r) > -1;
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
var t = this.__data__, i =
|
|
192
|
+
function ur(r, e) {
|
|
193
|
+
var t = this.__data__, i = X(t, r);
|
|
194
194
|
return i < 0 ? (++this.size, t.push([r, e])) : t[i][1] = e, this;
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function N(r) {
|
|
197
197
|
var e = -1, t = r == null ? 0 : r.length;
|
|
198
198
|
for (this.clear(); ++e < t; ) {
|
|
199
199
|
var i = r[e];
|
|
200
200
|
this.set(i[0], i[1]);
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
var
|
|
209
|
-
function
|
|
203
|
+
N.prototype.clear = ir;
|
|
204
|
+
N.prototype.delete = or;
|
|
205
|
+
N.prototype.get = ar;
|
|
206
|
+
N.prototype.has = lr;
|
|
207
|
+
N.prototype.set = ur;
|
|
208
|
+
var fr = ne(re, "Map");
|
|
209
|
+
function cr() {
|
|
210
210
|
this.size = 0, this.__data__ = {
|
|
211
|
-
hash: new
|
|
212
|
-
map: new (
|
|
213
|
-
string: new
|
|
211
|
+
hash: new j(),
|
|
212
|
+
map: new (fr || N)(),
|
|
213
|
+
string: new j()
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function dr(r) {
|
|
217
217
|
var e = typeof r;
|
|
218
218
|
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? r !== "__proto__" : r === null;
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function Y(r, e) {
|
|
221
221
|
var t = r.__data__;
|
|
222
|
-
return
|
|
222
|
+
return dr(e) ? t[typeof e == "string" ? "string" : "hash"] : t.map;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
225
|
-
var e =
|
|
224
|
+
function hr(r) {
|
|
225
|
+
var e = Y(this, r).delete(r);
|
|
226
226
|
return this.size -= e ? 1 : 0, e;
|
|
227
227
|
}
|
|
228
|
-
function
|
|
229
|
-
return
|
|
228
|
+
function pr(r) {
|
|
229
|
+
return Y(this, r).get(r);
|
|
230
230
|
}
|
|
231
|
-
function
|
|
232
|
-
return
|
|
231
|
+
function mr(r) {
|
|
232
|
+
return Y(this, r).has(r);
|
|
233
233
|
}
|
|
234
|
-
function
|
|
235
|
-
var t =
|
|
234
|
+
function gr(r, e) {
|
|
235
|
+
var t = Y(this, r), i = t.size;
|
|
236
236
|
return t.set(r, e), this.size += t.size == i ? 0 : 1, this;
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function x(r) {
|
|
239
239
|
var e = -1, t = r == null ? 0 : r.length;
|
|
240
240
|
for (this.clear(); ++e < t; ) {
|
|
241
241
|
var i = r[e];
|
|
242
242
|
this.set(i[0], i[1]);
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
var
|
|
251
|
-
function
|
|
245
|
+
x.prototype.clear = cr;
|
|
246
|
+
x.prototype.delete = hr;
|
|
247
|
+
x.prototype.get = pr;
|
|
248
|
+
x.prototype.has = mr;
|
|
249
|
+
x.prototype.set = gr;
|
|
250
|
+
var vr = "Expected a function";
|
|
251
|
+
function oe(r, e) {
|
|
252
252
|
if (typeof r != "function" || e != null && typeof e != "function")
|
|
253
|
-
throw new TypeError(
|
|
253
|
+
throw new TypeError(vr);
|
|
254
254
|
var t = function() {
|
|
255
255
|
var i = arguments, s = e ? e.apply(this, i) : i[0], n = t.cache;
|
|
256
256
|
if (n.has(s))
|
|
@@ -258,63 +258,63 @@ function se(r, e) {
|
|
|
258
258
|
var a = r.apply(this, i);
|
|
259
259
|
return t.cache = n.set(s, a) || n, a;
|
|
260
260
|
};
|
|
261
|
-
return t.cache = new (
|
|
261
|
+
return t.cache = new (oe.Cache || x)(), t;
|
|
262
262
|
}
|
|
263
|
-
|
|
264
|
-
var
|
|
265
|
-
function
|
|
266
|
-
var e =
|
|
267
|
-
return t.size ===
|
|
263
|
+
oe.Cache = x;
|
|
264
|
+
var br = 500;
|
|
265
|
+
function yr(r) {
|
|
266
|
+
var e = oe(r, function(i) {
|
|
267
|
+
return t.size === br && t.clear(), i;
|
|
268
268
|
}), t = e.cache;
|
|
269
269
|
return e;
|
|
270
270
|
}
|
|
271
|
-
var
|
|
271
|
+
var _r = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Pr = /\\(\\)?/g, Ir = yr(function(r) {
|
|
272
272
|
var e = [];
|
|
273
|
-
return r.charCodeAt(0) === 46 && e.push(""), r.replace(
|
|
274
|
-
e.push(s ? n.replace(
|
|
273
|
+
return r.charCodeAt(0) === 46 && e.push(""), r.replace(_r, function(t, i, s, n) {
|
|
274
|
+
e.push(s ? n.replace(Pr, "$1") : i || t);
|
|
275
275
|
}), e;
|
|
276
276
|
});
|
|
277
|
-
function
|
|
278
|
-
return r == null ? "" :
|
|
277
|
+
function Cr(r) {
|
|
278
|
+
return r == null ? "" : Ge(r);
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
return
|
|
280
|
+
function Ke(r, e) {
|
|
281
|
+
return se(r) ? r : Kt(r, e) ? [r] : Ir(Cr(r));
|
|
282
282
|
}
|
|
283
|
-
var
|
|
284
|
-
function
|
|
285
|
-
if (typeof r == "string" ||
|
|
283
|
+
var Sr = 1 / 0;
|
|
284
|
+
function We(r) {
|
|
285
|
+
if (typeof r == "string" || ie(r))
|
|
286
286
|
return r;
|
|
287
287
|
var e = r + "";
|
|
288
|
-
return e == "0" && 1 / r == -
|
|
288
|
+
return e == "0" && 1 / r == -Sr ? "-0" : e;
|
|
289
289
|
}
|
|
290
|
-
function
|
|
291
|
-
e =
|
|
290
|
+
function Fr(r, e) {
|
|
291
|
+
e = Ke(e, r);
|
|
292
292
|
for (var t = 0, i = e.length; r != null && t < i; )
|
|
293
|
-
r = r[
|
|
293
|
+
r = r[We(e[t++])];
|
|
294
294
|
return t && t == i ? r : void 0;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
var i = r == null ? void 0 :
|
|
296
|
+
function B(r, e, t) {
|
|
297
|
+
var i = r == null ? void 0 : Fr(r, e);
|
|
298
298
|
return i === void 0 ? t : i;
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
if (!
|
|
300
|
+
function Er(r, e, t, i) {
|
|
301
|
+
if (!W(r))
|
|
302
302
|
return r;
|
|
303
|
-
e =
|
|
303
|
+
e = Ke(e, r);
|
|
304
304
|
for (var s = -1, n = e.length, a = n - 1, u = r; u != null && ++s < n; ) {
|
|
305
|
-
var f =
|
|
305
|
+
var f = We(e[s]), c = t;
|
|
306
306
|
if (f === "__proto__" || f === "constructor" || f === "prototype")
|
|
307
307
|
return r;
|
|
308
308
|
if (s != a) {
|
|
309
309
|
var h = u[f];
|
|
310
|
-
c = i ? i(h, f, u) : void 0, c === void 0 && (c =
|
|
310
|
+
c = i ? i(h, f, u) : void 0, c === void 0 && (c = W(h) ? h : Tt(e[s + 1]) ? [] : {});
|
|
311
311
|
}
|
|
312
|
-
|
|
312
|
+
Dt(u, f, c), u = u[f];
|
|
313
313
|
}
|
|
314
314
|
return r;
|
|
315
315
|
}
|
|
316
316
|
function _(r, e, t) {
|
|
317
|
-
return r == null ? r :
|
|
317
|
+
return r == null ? r : Er(r, e, t);
|
|
318
318
|
}
|
|
319
319
|
class o {
|
|
320
320
|
static typeChecker(e) {
|
|
@@ -400,7 +400,7 @@ function v(r, ...e) {
|
|
|
400
400
|
t.hasOwnProperty(i) && t[i] !== void 0 && (typeof t[i] == "object" && t[i] !== null && !(t[i] instanceof Date) && !(t[i] instanceof RegExp) ? Array.isArray(t[i]) ? r[i] = [...t[i]] : r[i] = v(r[i] || {}, t[i]) : r[i] = t[i]);
|
|
401
401
|
}), r;
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function I(r) {
|
|
404
404
|
const e = /* @__PURE__ */ new WeakMap();
|
|
405
405
|
function t(i) {
|
|
406
406
|
if (i === null || typeof i != "object")
|
|
@@ -438,13 +438,13 @@ function C(r) {
|
|
|
438
438
|
}
|
|
439
439
|
return t(r);
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function k(r, e) {
|
|
442
442
|
return r.replace(/undefined/g, e);
|
|
443
443
|
}
|
|
444
|
-
class
|
|
444
|
+
class Or {
|
|
445
445
|
constructor(e) {
|
|
446
446
|
l(this, "runtimeCore");
|
|
447
|
-
l(this, "readonlyReactiveModel",
|
|
447
|
+
l(this, "readonlyReactiveModel", D({}));
|
|
448
448
|
l(this, "shareHistory", /* @__PURE__ */ new Map());
|
|
449
449
|
this.formCustomization = e;
|
|
450
450
|
}
|
|
@@ -455,18 +455,18 @@ class vr {
|
|
|
455
455
|
})), e;
|
|
456
456
|
}
|
|
457
457
|
setup(e) {
|
|
458
|
-
return this.runtimeCore = e, this.readonlyReactiveModel.value =
|
|
458
|
+
return this.runtimeCore = e, this.readonlyReactiveModel.value = Ne(e.model.value), Object.assign(this.runtimeCore.native, this.formCustomization.native), Object.assign(this.runtimeCore.grid, this.formCustomization.grid), Object.assign(this.runtimeCore.runtime, this.formCustomization.runtime), this.formCustomization.ui && (this.runtimeCore.ui = this.formCustomization.ui), this.formCustomization;
|
|
459
459
|
}
|
|
460
460
|
submit() {
|
|
461
461
|
var i;
|
|
462
|
-
const e = (i = d.getPreset(this.runtimeCore.ui)) == null ? void 0 : i.adapter, t =
|
|
462
|
+
const e = (i = d.getPreset(this.runtimeCore.ui)) == null ? void 0 : i.adapter, t = C.adapters[d.getUI(this.runtimeCore.ui)];
|
|
463
463
|
return (e == null ? void 0 : e.validateForm(this)) ?? (t == null ? void 0 : t.validateForm(this));
|
|
464
464
|
}
|
|
465
465
|
hydrate(e) {
|
|
466
466
|
S(() => {
|
|
467
467
|
this.runtimeCore.hydrateEffect.trackEffect(
|
|
468
468
|
() => {
|
|
469
|
-
|
|
469
|
+
z(e) ? O(
|
|
470
470
|
() => e.value,
|
|
471
471
|
() => {
|
|
472
472
|
v(this.runtimeCore.model.value, e.value);
|
|
@@ -475,7 +475,7 @@ class vr {
|
|
|
475
475
|
deep: !0,
|
|
476
476
|
immediate: !0
|
|
477
477
|
}
|
|
478
|
-
) :
|
|
478
|
+
) : L(e) ? O(
|
|
479
479
|
() => e,
|
|
480
480
|
() => {
|
|
481
481
|
v(this.runtimeCore.model.value, e);
|
|
@@ -495,9 +495,9 @@ class vr {
|
|
|
495
495
|
share(e) {
|
|
496
496
|
S(() => {
|
|
497
497
|
Object.keys(e).forEach((t) => {
|
|
498
|
-
|
|
498
|
+
z(e[t]) ? K(() => {
|
|
499
499
|
_(this.runtimeCore.shared, t, e[t].value), this.shareHistory.get(t) !== e[t].value && (this.shareHistory.set(t, e[t].value), this.runtimeCore.processor.schemaEffect.triggerEffects());
|
|
500
|
-
}) :
|
|
500
|
+
}) : L(e[t]) ? K(() => {
|
|
501
501
|
_(this.runtimeCore.shared, t, e[t]), this.shareHistory.get(t) !== e[t] && (this.shareHistory.set(t, e[t]), this.runtimeCore.processor.schemaEffect.triggerEffects());
|
|
502
502
|
}) : (_(this.runtimeCore.shared, t, e[t]), this.shareHistory.get(t) !== e[t] && (this.shareHistory.set(t, e[t]), this.runtimeCore.processor.schemaEffect.triggerEffects()));
|
|
503
503
|
});
|
|
@@ -505,7 +505,7 @@ class vr {
|
|
|
505
505
|
}
|
|
506
506
|
subscribeModel(e) {
|
|
507
507
|
S(() => {
|
|
508
|
-
const t =
|
|
508
|
+
const t = O(
|
|
509
509
|
() => this.readonlyReactiveModel.value,
|
|
510
510
|
(i) => {
|
|
511
511
|
e(i, {
|
|
@@ -526,12 +526,12 @@ class vr {
|
|
|
526
526
|
}
|
|
527
527
|
resetModel() {
|
|
528
528
|
var e;
|
|
529
|
-
(e = this.runtimeCore) != null && e.model.value && (this.runtimeCore.model.value =
|
|
529
|
+
(e = this.runtimeCore) != null && e.model.value && (this.runtimeCore.model.value = I(
|
|
530
530
|
this.runtimeCore.processor.stableModel
|
|
531
|
-
), this.readonlyReactiveModel.value =
|
|
531
|
+
), this.readonlyReactiveModel.value = Ne(this.runtimeCore.model.value), this.runtimeCore.runtimeAdapter.clearValidate(this.runtimeCore));
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
|
-
class
|
|
534
|
+
class ee {
|
|
535
535
|
constructor() {
|
|
536
536
|
l(this, "effects", /* @__PURE__ */ new Set());
|
|
537
537
|
l(this, "tempClonedEffects", /* @__PURE__ */ new Set());
|
|
@@ -550,7 +550,7 @@ class A {
|
|
|
550
550
|
return t.identifier ? this.identifierMap.get(t.identifier) || (this.identifierMap.set(t.identifier, !0), !t.lazy && e(), this.effects.add(e)) : (!t.lazy && e(), this.effects.add(e)), () => this.effects.delete(e);
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
|
-
class
|
|
553
|
+
class wr {
|
|
554
554
|
constructor(e) {
|
|
555
555
|
l(this, "runtimeCore");
|
|
556
556
|
l(this, "processedSchemas");
|
|
@@ -558,18 +558,18 @@ class yr {
|
|
|
558
558
|
l(this, "getRuntimeMeta");
|
|
559
559
|
l(this, "stableSchemas", []);
|
|
560
560
|
l(this, "stableModel", {});
|
|
561
|
-
l(this, "schemaPreset",
|
|
562
|
-
l(this, "componentPropsPreset",
|
|
561
|
+
l(this, "schemaPreset", C.schemaPreset);
|
|
562
|
+
l(this, "componentPropsPreset", C.componentPropsPreset);
|
|
563
563
|
l(this, "stableUpdaterProcessProgress");
|
|
564
564
|
l(this, "stableUpdaterTimes", 0);
|
|
565
|
-
l(this, "schemaEffect", new
|
|
566
|
-
l(this, "defaultValueEffect", new
|
|
565
|
+
l(this, "schemaEffect", new ee());
|
|
566
|
+
l(this, "defaultValueEffect", new ee());
|
|
567
567
|
l(this, "defaultValueInprogressMap", /* @__PURE__ */ new Map());
|
|
568
568
|
l(this, "baseDefaultValueFunctionsLength");
|
|
569
569
|
l(this, "isModelInitialized", !0);
|
|
570
570
|
l(this, "schemaEffectHistory", /* @__PURE__ */ new Map());
|
|
571
571
|
l(this, "stableUpdaterHistory", /* @__PURE__ */ new Map());
|
|
572
|
-
this.runtimeCore = e, this.processedSchemas = e.schemas, this.processedModel = e.model, this.getRuntimeMeta = e.getRuntimeMeta.bind(e),
|
|
572
|
+
this.runtimeCore = e, this.processedSchemas = e.schemas, this.processedModel = e.model, this.getRuntimeMeta = e.getRuntimeMeta.bind(e), O(
|
|
573
573
|
() => this.processedModel.value,
|
|
574
574
|
() => {
|
|
575
575
|
this.schemaEffect.triggerEffects();
|
|
@@ -607,7 +607,7 @@ class yr {
|
|
|
607
607
|
// 派生过程,用于外部应用
|
|
608
608
|
parseSchemas(e, t) {
|
|
609
609
|
o.isArrayEmpty(this.processedSchemas.value) && (this.baseDefaultValueFunctionsLength = this.countFunctionDefaultValues(
|
|
610
|
-
|
|
610
|
+
I(e)
|
|
611
611
|
), this.processedSchemas.value = this.initSchemas(e)), this.parse(e, t);
|
|
612
612
|
}
|
|
613
613
|
parseStable(e) {
|
|
@@ -621,7 +621,7 @@ class yr {
|
|
|
621
621
|
// 对于稳定初始化更新的抽象
|
|
622
622
|
stableUpdater(e = [], t, i, s, n) {
|
|
623
623
|
if (e.every(Boolean)) {
|
|
624
|
-
const a =
|
|
624
|
+
const a = M(this.processedSchemas.value);
|
|
625
625
|
!o.isProcessInprogress(a) && o.isObjectEmpty(this.stableModel), !this.stableUpdaterHistory.get(
|
|
626
626
|
`${t == null ? void 0 : t.key}parentIndex:${t == null ? void 0 : t.index}childIndex:${i}${s}${n}`
|
|
627
627
|
) && (this.stableUpdaterHistory.set(
|
|
@@ -642,11 +642,11 @@ class yr {
|
|
|
642
642
|
const f = u.index, c = u.key, h = u.keyIndex;
|
|
643
643
|
if (o.isUndefined(u.stable) || o.isNull(u.stable))
|
|
644
644
|
return;
|
|
645
|
-
const p = s.parseStable(u.stable),
|
|
646
|
-
let
|
|
647
|
-
if (o.isProcessInprogress(
|
|
648
|
-
const
|
|
649
|
-
|
|
645
|
+
const p = s.parseStable(u.stable), y = i == null ? void 0 : i.index, w = i == null ? void 0 : i.key;
|
|
646
|
+
let g = p;
|
|
647
|
+
if (o.isProcessInprogress(g) || (n[h] = !0), i) {
|
|
648
|
+
const b = s.processedSchemas.value[y][w][f][c];
|
|
649
|
+
b && o.isObject(b) && c !== "component" && (g = v(b, g)), s.processedSchemas.value[y][w][f][c] = g, s.stableUpdater(
|
|
650
650
|
n,
|
|
651
651
|
i,
|
|
652
652
|
t,
|
|
@@ -654,8 +654,8 @@ class yr {
|
|
|
654
654
|
f
|
|
655
655
|
);
|
|
656
656
|
} else {
|
|
657
|
-
const
|
|
658
|
-
|
|
657
|
+
const b = s.processedSchemas.value[f][c];
|
|
658
|
+
b && o.isObject(b) && c !== "component" && (g = v(b, g)), s.processedSchemas.value[f][c] = g, s.stableUpdater(
|
|
659
659
|
n,
|
|
660
660
|
i,
|
|
661
661
|
t,
|
|
@@ -715,8 +715,8 @@ class yr {
|
|
|
715
715
|
this.defaultValueInprogressMap.set(t[s], h), !o.isProcessInprogress(h) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
|
|
716
716
|
this.defaultValueInprogressMap.values()
|
|
717
717
|
).every((p) => {
|
|
718
|
-
var
|
|
719
|
-
return !((
|
|
718
|
+
var y;
|
|
719
|
+
return !((y = p == null ? void 0 : p.includes) != null && y.call(p, "undefined"));
|
|
720
720
|
}) ? (f(h), this.defaultValueEffect.clearEffects(), S(() => {
|
|
721
721
|
c();
|
|
722
722
|
})) : f(h);
|
|
@@ -731,8 +731,8 @@ class yr {
|
|
|
731
731
|
this.defaultValueInprogressMap.set(t[s], h), !o.isProcessInprogress(h) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
|
|
732
732
|
this.defaultValueInprogressMap.values()
|
|
733
733
|
).every((p) => {
|
|
734
|
-
var
|
|
735
|
-
return !((
|
|
734
|
+
var y;
|
|
735
|
+
return !((y = p == null ? void 0 : p.includes) != null && y.call(p, "undefined"));
|
|
736
736
|
}) ? (f(h), this.defaultValueEffect.clearEffects(), S(() => {
|
|
737
737
|
c();
|
|
738
738
|
})) : f(h);
|
|
@@ -763,13 +763,13 @@ class yr {
|
|
|
763
763
|
}
|
|
764
764
|
promiseFieldParser(e, t, i, s) {
|
|
765
765
|
o.isPromise(e) ? e.then((n) => {
|
|
766
|
-
o.isString(n) && (n =
|
|
766
|
+
o.isString(n) && (n = k(n, "")), i && o.isObject(n) && !o.isNativeObject(n) ? this.objectParser({
|
|
767
767
|
data: n,
|
|
768
768
|
updater: t,
|
|
769
769
|
index: s.rootIndex,
|
|
770
770
|
parentMeta: s.parentMeta
|
|
771
771
|
}) : t(n);
|
|
772
|
-
}) : (o.isString(e) && (e =
|
|
772
|
+
}) : (o.isString(e) && (e = k(e, "")), i && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
|
|
773
773
|
data: e,
|
|
774
774
|
updater: t,
|
|
775
775
|
index: s.rootIndex,
|
|
@@ -796,7 +796,7 @@ class yr {
|
|
|
796
796
|
e.name.startsWith("__proform_onetime_") && (e.__proform_cached_result = n), this.promiseFieldParser(n, t, s, i);
|
|
797
797
|
}
|
|
798
798
|
else
|
|
799
|
-
|
|
799
|
+
z(e) ? O(
|
|
800
800
|
() => e.value,
|
|
801
801
|
() => {
|
|
802
802
|
o.isUndefined(e.value) || (s && o.isObject(e.value) && !o.isNativeObject(e.value) ? this.objectParser({
|
|
@@ -810,7 +810,7 @@ class yr {
|
|
|
810
810
|
immediate: !0,
|
|
811
811
|
deep: !0
|
|
812
812
|
}
|
|
813
|
-
) :
|
|
813
|
+
) : L(e) ? O(
|
|
814
814
|
() => e,
|
|
815
815
|
() => {
|
|
816
816
|
o.isUndefined(e) || (s && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
|
|
@@ -835,7 +835,7 @@ class yr {
|
|
|
835
835
|
e.map((t) => {
|
|
836
836
|
this.createModel(t, this.processedModel.value);
|
|
837
837
|
}), o.isObjectEmpty(this.stableModel) && this.stableUpdaterProcessProgress.every(Boolean) && this.defaultValueEffect.effects.size === 0 && S(() => {
|
|
838
|
-
this.stableModel =
|
|
838
|
+
this.stableModel = I(this.processedModel.value), this.runtimeCore.hydrateEffect.triggerEffects(), this.runtimeCore.hydrateEffect.clearEffects();
|
|
839
839
|
});
|
|
840
840
|
}
|
|
841
841
|
setModel(e, t, i) {
|
|
@@ -852,7 +852,7 @@ class yr {
|
|
|
852
852
|
if ("defaultValue" in e && !t[e.field])
|
|
853
853
|
this.setModel(t, e.field, e.defaultValue);
|
|
854
854
|
else {
|
|
855
|
-
if (o.isFunction(e.field) &&
|
|
855
|
+
if (o.isFunction(e.field) && B(t, e.field()))
|
|
856
856
|
return;
|
|
857
857
|
if (o.isString(e.field) && t[e.field])
|
|
858
858
|
return;
|
|
@@ -861,7 +861,7 @@ class yr {
|
|
|
861
861
|
});
|
|
862
862
|
}
|
|
863
863
|
}
|
|
864
|
-
class
|
|
864
|
+
class R {
|
|
865
865
|
static getFormContainer({ ui: e } = {}) {
|
|
866
866
|
return d.presets.uiPresets[e ?? d.presets.ui].container.Form;
|
|
867
867
|
}
|
|
@@ -881,7 +881,7 @@ class x {
|
|
|
881
881
|
return d.presets.uiPresets[e ?? d.presets.ui].container.ListItem;
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
|
-
class
|
|
884
|
+
class jr {
|
|
885
885
|
constructor(e) {
|
|
886
886
|
this.ui = e;
|
|
887
887
|
}
|
|
@@ -891,48 +891,48 @@ class _r {
|
|
|
891
891
|
}
|
|
892
892
|
getRuntimeField(e) {
|
|
893
893
|
var s;
|
|
894
|
-
const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i =
|
|
894
|
+
const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[d.getUI(this.ui)];
|
|
895
895
|
return (t == null ? void 0 : t.getRuntimeField(e)) ?? (i == null ? void 0 : i.getRuntimeField(e));
|
|
896
896
|
}
|
|
897
897
|
getRuntimeRequired(e) {
|
|
898
898
|
var s;
|
|
899
|
-
const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i =
|
|
899
|
+
const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[d.getUI(this.ui)];
|
|
900
900
|
return (t == null ? void 0 : t.getRuntimeRequired(e)) ?? (i == null ? void 0 : i.getRuntimeRequired(e));
|
|
901
901
|
}
|
|
902
902
|
getFormModelPropName() {
|
|
903
903
|
var i;
|
|
904
|
-
const e = (i = d.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, t =
|
|
904
|
+
const e = (i = d.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, t = C.adapters[d.getUI(this.ui)];
|
|
905
905
|
return (e == null ? void 0 : e.getFormModelPropName()) ?? (t == null ? void 0 : t.getFormModelPropName());
|
|
906
906
|
}
|
|
907
907
|
formComponentRenderer(e) {
|
|
908
908
|
var s;
|
|
909
|
-
const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i =
|
|
909
|
+
const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[d.getUI(this.ui)];
|
|
910
910
|
return (t == null ? void 0 : t.formComponentRenderer(e)) ?? (i == null ? void 0 : i.formComponentRenderer(e));
|
|
911
911
|
}
|
|
912
912
|
clearValidate(e) {
|
|
913
913
|
var s;
|
|
914
|
-
const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i =
|
|
914
|
+
const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[d.getUI(this.ui)];
|
|
915
915
|
return (t == null ? void 0 : t.clearValidate(e)) ?? (i == null ? void 0 : i.clearValidate(e));
|
|
916
916
|
}
|
|
917
917
|
}
|
|
918
|
-
function
|
|
919
|
-
return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !
|
|
918
|
+
function xr(r) {
|
|
919
|
+
return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !it(r);
|
|
920
920
|
}
|
|
921
|
-
class
|
|
921
|
+
class Rr {
|
|
922
922
|
constructor(e) {
|
|
923
|
-
l(this, "schemas",
|
|
924
|
-
l(this, "model",
|
|
923
|
+
l(this, "schemas", D([]));
|
|
924
|
+
l(this, "model", D({}));
|
|
925
925
|
l(this, "processorBySchemaType", {
|
|
926
926
|
item: this.runtimeItemProcessor.bind(this),
|
|
927
927
|
group: this.runtimeGroupProcessor.bind(this),
|
|
928
928
|
list: this.runtimeListProcessor.bind(this)
|
|
929
929
|
});
|
|
930
|
-
l(this, "formRef",
|
|
931
|
-
l(this, "hydrateEffect", new
|
|
932
|
-
l(this, "native",
|
|
930
|
+
l(this, "formRef", D(null));
|
|
931
|
+
l(this, "hydrateEffect", new ee());
|
|
932
|
+
l(this, "native", J({}));
|
|
933
933
|
l(this, "grid", {});
|
|
934
934
|
l(this, "runtime", {});
|
|
935
|
-
l(this, "globalNativeFormOverride",
|
|
935
|
+
l(this, "globalNativeFormOverride", J({
|
|
936
936
|
props: {
|
|
937
937
|
Form: {},
|
|
938
938
|
FormItem: {}
|
|
@@ -942,11 +942,11 @@ class Cr {
|
|
|
942
942
|
FormItem: {}
|
|
943
943
|
}
|
|
944
944
|
}));
|
|
945
|
-
l(this, "shared",
|
|
945
|
+
l(this, "shared", J({}));
|
|
946
946
|
l(this, "shareHistory", /* @__PURE__ */ new Map());
|
|
947
|
-
this.setup = e, this.processor = new
|
|
947
|
+
this.setup = e, this.processor = new wr(this);
|
|
948
948
|
const t = this.setup(this);
|
|
949
|
-
this.ui = t.ui ?? d.presets.ui, this.runtimeAdapter = new
|
|
949
|
+
this.ui = t.ui ?? d.presets.ui, this.runtimeAdapter = new jr(this.ui), Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()), z(t.schemas) ? O(
|
|
950
950
|
// @ts-expect-error
|
|
951
951
|
() => t.schemas.value,
|
|
952
952
|
() => {
|
|
@@ -955,7 +955,7 @@ class Cr {
|
|
|
955
955
|
{
|
|
956
956
|
deep: !0
|
|
957
957
|
}
|
|
958
|
-
) :
|
|
958
|
+
) : L(t.schemas) ? O(() => t.schemas, () => {
|
|
959
959
|
this.processor.parseSchemas(t.schemas);
|
|
960
960
|
}, {
|
|
961
961
|
deep: !0
|
|
@@ -963,16 +963,16 @@ class Cr {
|
|
|
963
963
|
}
|
|
964
964
|
getRuntimeMeta() {
|
|
965
965
|
return {
|
|
966
|
-
model:
|
|
966
|
+
model: M(I(this.model.value)),
|
|
967
967
|
reactiveModel: this.model.value,
|
|
968
968
|
shared: this.shared,
|
|
969
969
|
// share 增加防抖,当开发者在过程中进行 share 时避免频繁触发爆栈
|
|
970
970
|
share: (t) => {
|
|
971
971
|
S(() => {
|
|
972
972
|
Object.keys(t).forEach((i) => {
|
|
973
|
-
|
|
973
|
+
z(t[i]) ? K(() => {
|
|
974
974
|
_(this.shared, i, t[i].value), this.shareHistory.get(i) !== t[i].value && (this.shareHistory.set(i, t[i].value), this.processor.schemaEffect.triggerEffects());
|
|
975
|
-
}) :
|
|
975
|
+
}) : L(t[i]) ? K(() => {
|
|
976
976
|
_(this.shared, i, t[i]), this.shareHistory.get(i) !== t[i] && (this.shareHistory.set(i, t[i]), this.processor.schemaEffect.triggerEffects());
|
|
977
977
|
}) : (_(this.shared, i, t[i]), this.shareHistory.get(i) !== t[i] && (this.shareHistory.set(i, t[i]), this.processor.schemaEffect.triggerEffects()));
|
|
978
978
|
});
|
|
@@ -981,52 +981,60 @@ class Cr {
|
|
|
981
981
|
};
|
|
982
982
|
}
|
|
983
983
|
runtimeItemProcessor(e, t, i = this.model.value, s) {
|
|
984
|
-
var
|
|
985
|
-
const n =
|
|
984
|
+
var le, ue, fe, ce, de, he, pe, me, ge, ve, be, ye, _e, Pe, Ie, Ce, Se, Fe, Ee, Oe, we, je, xe, Re, $e, Me;
|
|
985
|
+
const n = M(e.component);
|
|
986
986
|
if (!n)
|
|
987
987
|
return;
|
|
988
|
-
(
|
|
989
|
-
const a = v(
|
|
988
|
+
(ue = (le = e.native) == null ? void 0 : le.props) != null && ue.Form && v(this.globalNativeFormOverride.props.Form, (ce = (fe = e.native) == null ? void 0 : fe.props) == null ? void 0 : ce.Form), (he = (de = e.native) == null ? void 0 : de.slots) != null && he.FormItem && v(this.globalNativeFormOverride.slots.FormItem, (me = (pe = e.native) == null ? void 0 : pe.slots) == null ? void 0 : me.FormItem);
|
|
989
|
+
const a = v(I((ve = (ge = this.native) == null ? void 0 : ge.slots) == null ? void 0 : ve.FormItem) ?? {}, (ye = (be = e.native) == null ? void 0 : be.slots) == null ? void 0 : ye.FormItem), u = {
|
|
990
990
|
display: "grid",
|
|
991
991
|
gridColumn: "1 / -1",
|
|
992
992
|
...e.grid
|
|
993
|
-
}
|
|
993
|
+
};
|
|
994
|
+
let f = {
|
|
995
|
+
...(Pe = (_e = e.native) == null ? void 0 : _e.props) == null ? void 0 : Pe.FormItem
|
|
996
|
+
};
|
|
997
|
+
G((Se = (Ce = (Ie = e.native) == null ? void 0 : Ie.props) == null ? void 0 : Ce.FormItem) == null ? void 0 : Se.tooltip) && (f = {
|
|
998
|
+
...(Ee = (Fe = e.native) == null ? void 0 : Fe.props) == null ? void 0 : Ee.FormItem,
|
|
999
|
+
tooltip: (je = (we = (Oe = e.native) == null ? void 0 : Oe.props) == null ? void 0 : we.FormItem) == null ? void 0 : je.tooltip()
|
|
1000
|
+
});
|
|
1001
|
+
const c = v(I((Re = (xe = this.native) == null ? void 0 : xe.props) == null ? void 0 : Re.FormItem) ?? {}, f), h = this.runtimeAdapter.getRuntimeField({
|
|
994
1002
|
schema: e,
|
|
995
1003
|
parentSchema: s,
|
|
996
1004
|
index: t
|
|
997
|
-
}),
|
|
998
|
-
let
|
|
999
|
-
|
|
1000
|
-
let
|
|
1001
|
-
if (e.runtime ?
|
|
1002
|
-
let
|
|
1003
|
-
o.isUndefined(
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
}),
|
|
1005
|
+
}), p = n.name, y = e.componentProps ?? {}, w = C.placeholderPresetByComponentName;
|
|
1006
|
+
let g = G(e.placeholder) ? e.placeholder() : e.placeholder, b = e.show;
|
|
1007
|
+
b === void 0 && (b = !0);
|
|
1008
|
+
let F = (G(e.label) ? e.label() : e.label) ?? "", E;
|
|
1009
|
+
if (e.runtime ? E = e.runtime : E = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(t) && !o.isObjectEmpty(E) && (F = k(($e = E == null ? void 0 : E.customizeListItemLabel) == null ? void 0 : $e.call(E, e.label ?? "", t + 1), "")), !g) {
|
|
1010
|
+
let U = "请输入";
|
|
1011
|
+
o.isUndefined(p) ? g = `${U}${F}` : /* @ts-expect-error */ w[p.toLowerCase()] ? (U = // @ts-expect-error
|
|
1012
|
+
w[p.toLowerCase()], g = `${U}${F}`) : (Object.keys(w).forEach((Ve) => {
|
|
1013
|
+
p.toLowerCase().includes(Ve.toLowerCase()) && (U = w[Ve]);
|
|
1014
|
+
}), g = `${U}${F}`);
|
|
1007
1015
|
}
|
|
1008
|
-
const
|
|
1016
|
+
const Xe = this.runtimeAdapter.getRuntimeRequired({
|
|
1009
1017
|
...e,
|
|
1010
|
-
label:
|
|
1011
|
-
}),
|
|
1012
|
-
let
|
|
1013
|
-
return !o.isUndefined(P == null ? void 0 : P.labelPrefix) && !o.isNull(P == null ? void 0 : P.labelPrefix) ?
|
|
1018
|
+
label: F
|
|
1019
|
+
}), Ye = R.getItemContainer(this), Ze = R.getFormItemContainer(this), Je = this, Qe = e.componentSlots, P = (Me = d.presets.uiPresets[this.ui]) == null ? void 0 : Me.display;
|
|
1020
|
+
let Z;
|
|
1021
|
+
return !o.isUndefined(P == null ? void 0 : P.labelPrefix) && !o.isNull(P == null ? void 0 : P.labelPrefix) ? Z = `${F}${P == null ? void 0 : P.labelPrefix}` : Z = `${F}:`, m("div", {
|
|
1014
1022
|
style: u
|
|
1015
|
-
}, [m(
|
|
1016
|
-
show:
|
|
1023
|
+
}, [m(Ye, {
|
|
1024
|
+
show: b
|
|
1017
1025
|
}, {
|
|
1018
1026
|
default() {
|
|
1019
|
-
return
|
|
1020
|
-
label: `${
|
|
1021
|
-
},
|
|
1027
|
+
return b && m(Ze, T(c, {
|
|
1028
|
+
label: `${F ? Z : ""}`
|
|
1029
|
+
}, h, Xe), {
|
|
1022
1030
|
default() {
|
|
1023
|
-
return
|
|
1031
|
+
return Je.runtimeAdapter.formComponentRenderer({
|
|
1024
1032
|
Component: n,
|
|
1025
1033
|
schema: e,
|
|
1026
1034
|
baseModel: i,
|
|
1027
|
-
placeholder:
|
|
1028
|
-
componentSlots:
|
|
1029
|
-
props:
|
|
1035
|
+
placeholder: g,
|
|
1036
|
+
componentSlots: Qe,
|
|
1037
|
+
props: y
|
|
1030
1038
|
});
|
|
1031
1039
|
},
|
|
1032
1040
|
...a
|
|
@@ -1040,19 +1048,19 @@ class Cr {
|
|
|
1040
1048
|
display: "grid",
|
|
1041
1049
|
gridColumn: "1 / -1",
|
|
1042
1050
|
...e.grid
|
|
1043
|
-
}, s =
|
|
1051
|
+
}, s = R.getGroupContainer(this);
|
|
1044
1052
|
let n = e.show;
|
|
1045
1053
|
return n === void 0 && (n = !0), m("div", {
|
|
1046
1054
|
style: i
|
|
1047
1055
|
}, [n && m(s, {
|
|
1048
1056
|
schema: e
|
|
1049
|
-
},
|
|
1057
|
+
}, xr(t = e.children.map((a) => this.runtimeItemProcessor(a))) ? t : {
|
|
1050
1058
|
default: () => [t]
|
|
1051
1059
|
})]);
|
|
1052
1060
|
}
|
|
1053
1061
|
addListItem(e) {
|
|
1054
1062
|
var t;
|
|
1055
|
-
|
|
1063
|
+
(t = this.processor.stableModel[e.field]) != null && t[0] && this.model.value[e.field].push(I(this.processor.stableModel[e.field][0])), this.runtimeAdapter.clearValidate(this);
|
|
1056
1064
|
}
|
|
1057
1065
|
deleteListItem(e, t) {
|
|
1058
1066
|
this.model.value[e.field].splice(t, 1), this.runtimeAdapter.clearValidate(this);
|
|
@@ -1066,7 +1074,7 @@ class Cr {
|
|
|
1066
1074
|
i.model.value[e.field] || (i.model.value[e.field] = [{}]);
|
|
1067
1075
|
let s = e.show;
|
|
1068
1076
|
s === void 0 && (s = !0);
|
|
1069
|
-
const n =
|
|
1077
|
+
const n = R.getListContainer(this), a = R.getListItemContainer(this);
|
|
1070
1078
|
return m("div", {
|
|
1071
1079
|
style: t
|
|
1072
1080
|
}, [s && m(n, {
|
|
@@ -1082,16 +1090,16 @@ class Cr {
|
|
|
1082
1090
|
} = {}) {
|
|
1083
1091
|
var p;
|
|
1084
1092
|
const h = c ?? m("button", null, null);
|
|
1085
|
-
return
|
|
1093
|
+
return et(m(h, {
|
|
1086
1094
|
onClick: () => i.deleteListItem(e, f)
|
|
1087
|
-
}, null), [[
|
|
1095
|
+
}, null), [[tt, ((p = i.model.value[e.field]) == null ? void 0 : p.length) > 1]]);
|
|
1088
1096
|
}
|
|
1089
1097
|
}));
|
|
1090
1098
|
},
|
|
1091
1099
|
add({
|
|
1092
1100
|
container: u
|
|
1093
1101
|
} = {}) {
|
|
1094
|
-
const f = u ?? m("button", null, [
|
|
1102
|
+
const f = u ?? m("button", null, [rt("添加")]);
|
|
1095
1103
|
return m(f, {
|
|
1096
1104
|
onClick: () => i.addListItem(e)
|
|
1097
1105
|
}, null);
|
|
@@ -1108,8 +1116,8 @@ class Cr {
|
|
|
1108
1116
|
gridColumn: "1 / -1",
|
|
1109
1117
|
gridAutoColumns: "1fr",
|
|
1110
1118
|
...this.grid
|
|
1111
|
-
}, t = this, i = v(this.globalNativeFormOverride.props.Form,
|
|
1112
|
-
return m(n,
|
|
1119
|
+
}, t = this, i = v(this.globalNativeFormOverride.props.Form, I((f = (u = this.native) == null ? void 0 : u.props) == null ? void 0 : f.Form) ?? {}), s = v(this.globalNativeFormOverride.slots.Form, I((h = (c = this.native) == null ? void 0 : c.slots) == null ? void 0 : h.Form) ?? {}), n = R.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
|
|
1120
|
+
return m(n, T(i, {
|
|
1113
1121
|
ref: this.formRef
|
|
1114
1122
|
}, {
|
|
1115
1123
|
[a]: this.model.value
|
|
@@ -1134,17 +1142,17 @@ class d {
|
|
|
1134
1142
|
}
|
|
1135
1143
|
}
|
|
1136
1144
|
l(d, "presets");
|
|
1137
|
-
function
|
|
1145
|
+
function A({
|
|
1138
1146
|
parentSchema: r,
|
|
1139
1147
|
schema: e,
|
|
1140
1148
|
index: t
|
|
1141
1149
|
}) {
|
|
1142
1150
|
return r ? `${r.field}.${t}.${e.field}` : e.field;
|
|
1143
1151
|
}
|
|
1144
|
-
const
|
|
1152
|
+
const $r = {
|
|
1145
1153
|
ArcoVue: {
|
|
1146
1154
|
getRuntimeField(r) {
|
|
1147
|
-
const e =
|
|
1155
|
+
const e = A(r);
|
|
1148
1156
|
return o.isFunction(e) ? {
|
|
1149
1157
|
field: e()
|
|
1150
1158
|
} : {
|
|
@@ -1182,7 +1190,7 @@ const Ir = {
|
|
|
1182
1190
|
props: n
|
|
1183
1191
|
}) {
|
|
1184
1192
|
let a;
|
|
1185
|
-
return o.isFunction(t.field) ? a =
|
|
1193
|
+
return o.isFunction(t.field) ? a = B(e, t.field()) : a = e[t.field], m(r, T({
|
|
1186
1194
|
modelValue: a,
|
|
1187
1195
|
"onUpdate:modelValue": (u) => {
|
|
1188
1196
|
o.isFunction(t.field) ? _(e, t.field(), u) : e[t.field] = u;
|
|
@@ -1194,7 +1202,7 @@ const Ir = {
|
|
|
1194
1202
|
},
|
|
1195
1203
|
validateForm(r) {
|
|
1196
1204
|
return new Promise((e, t) => {
|
|
1197
|
-
r.runtimeCore.formRef.value.validate((i) => i ? t(i) : e(r.cleanFallbackFields(
|
|
1205
|
+
r.runtimeCore.formRef.value.validate((i) => i ? t(i) : e(r.cleanFallbackFields(M(r.runtimeCore.processor.processedModel.value))));
|
|
1198
1206
|
});
|
|
1199
1207
|
},
|
|
1200
1208
|
clearValidate(r) {
|
|
@@ -1204,7 +1212,7 @@ const Ir = {
|
|
|
1204
1212
|
},
|
|
1205
1213
|
NutUI: {
|
|
1206
1214
|
getRuntimeField(r) {
|
|
1207
|
-
const e =
|
|
1215
|
+
const e = A(r);
|
|
1208
1216
|
return o.isFunction(e) ? {
|
|
1209
1217
|
prop: e()
|
|
1210
1218
|
} : {
|
|
@@ -1243,7 +1251,7 @@ const Ir = {
|
|
|
1243
1251
|
props: n
|
|
1244
1252
|
}) {
|
|
1245
1253
|
let a;
|
|
1246
|
-
return o.isFunction(t.field) ? a =
|
|
1254
|
+
return o.isFunction(t.field) ? a = B(e, t.field()) : a = e[t.field], m(r, T({
|
|
1247
1255
|
modelValue: a,
|
|
1248
1256
|
"onUpdate:modelValue": (u) => {
|
|
1249
1257
|
o.isFunction(t.field) ? _(e, t.field(), u) : e[t.field] = u;
|
|
@@ -1259,7 +1267,7 @@ const Ir = {
|
|
|
1259
1267
|
valid: i,
|
|
1260
1268
|
errors: s
|
|
1261
1269
|
}) => {
|
|
1262
|
-
i ? e(r.cleanFallbackFields(
|
|
1270
|
+
i ? e(r.cleanFallbackFields(M(r.runtimeCore.processor.processedModel.value))) : t(s);
|
|
1263
1271
|
});
|
|
1264
1272
|
});
|
|
1265
1273
|
},
|
|
@@ -1270,7 +1278,7 @@ const Ir = {
|
|
|
1270
1278
|
},
|
|
1271
1279
|
NaiveUI: {
|
|
1272
1280
|
getRuntimeField(r) {
|
|
1273
|
-
const e =
|
|
1281
|
+
const e = A(r);
|
|
1274
1282
|
return o.isFunction(e) ? {
|
|
1275
1283
|
path: e()
|
|
1276
1284
|
} : {
|
|
@@ -1310,7 +1318,7 @@ const Ir = {
|
|
|
1310
1318
|
props: n
|
|
1311
1319
|
}) {
|
|
1312
1320
|
let a;
|
|
1313
|
-
return o.isFunction(t.field) ? a =
|
|
1321
|
+
return o.isFunction(t.field) ? a = B(e, t.field()) : a = e[t.field], m(r, T({
|
|
1314
1322
|
value: a,
|
|
1315
1323
|
"onUpdate:value": (u) => {
|
|
1316
1324
|
o.isFunction(t.field) ? _(e, t.field(), u) : e[t.field] = u;
|
|
@@ -1322,7 +1330,7 @@ const Ir = {
|
|
|
1322
1330
|
},
|
|
1323
1331
|
validateForm(r) {
|
|
1324
1332
|
return new Promise((e, t) => {
|
|
1325
|
-
r.runtimeCore.formRef.value.validate((i) => i ? t(i) : e(r.cleanFallbackFields(
|
|
1333
|
+
r.runtimeCore.formRef.value.validate((i) => i ? t(i) : e(r.cleanFallbackFields(M(r.runtimeCore.processor.processedModel.value))));
|
|
1326
1334
|
});
|
|
1327
1335
|
},
|
|
1328
1336
|
clearValidate(r) {
|
|
@@ -1330,7 +1338,7 @@ const Ir = {
|
|
|
1330
1338
|
(t = (e = r.formRef.value) == null ? void 0 : e.restoreValidation) == null || t.call(e);
|
|
1331
1339
|
}
|
|
1332
1340
|
}
|
|
1333
|
-
},
|
|
1341
|
+
}, $ = class $ {
|
|
1334
1342
|
static getPlaceholderPrefixPresetByComponentName() {
|
|
1335
1343
|
const e = {
|
|
1336
1344
|
请选择: ["select", "tree"],
|
|
@@ -1343,7 +1351,7 @@ const Ir = {
|
|
|
1343
1351
|
return t;
|
|
1344
1352
|
}
|
|
1345
1353
|
};
|
|
1346
|
-
l(
|
|
1354
|
+
l($, "schemaPreset", {
|
|
1347
1355
|
type: {
|
|
1348
1356
|
defaultValue: "item"
|
|
1349
1357
|
},
|
|
@@ -1389,19 +1397,19 @@ l(R, "schemaPreset", {
|
|
|
1389
1397
|
runtime: {
|
|
1390
1398
|
default: void 0
|
|
1391
1399
|
}
|
|
1392
|
-
}), l(
|
|
1400
|
+
}), l($, "componentPropsPreset", {
|
|
1393
1401
|
options: {
|
|
1394
1402
|
defaultValue: []
|
|
1395
1403
|
}
|
|
1396
1404
|
}), // 基于基本功能提出基本预设
|
|
1397
|
-
l(
|
|
1398
|
-
let
|
|
1399
|
-
const
|
|
1400
|
-
...
|
|
1405
|
+
l($, "placeholderPresetByComponentName", $.getPlaceholderPrefixPresetByComponentName());
|
|
1406
|
+
let te = $;
|
|
1407
|
+
const C = {
|
|
1408
|
+
...te,
|
|
1401
1409
|
adapters: {
|
|
1402
|
-
|
|
1410
|
+
...$r
|
|
1403
1411
|
}
|
|
1404
|
-
},
|
|
1412
|
+
}, Nr = /* @__PURE__ */ st({
|
|
1405
1413
|
props: {
|
|
1406
1414
|
setup: {
|
|
1407
1415
|
type: Function,
|
|
@@ -1409,12 +1417,12 @@ const I = {
|
|
|
1409
1417
|
}
|
|
1410
1418
|
},
|
|
1411
1419
|
setup(r) {
|
|
1412
|
-
const e = new
|
|
1420
|
+
const e = new Rr(r.setup);
|
|
1413
1421
|
return () => e.exec();
|
|
1414
1422
|
}
|
|
1415
1423
|
});
|
|
1416
|
-
function
|
|
1417
|
-
const e = new
|
|
1424
|
+
function Ur(r) {
|
|
1425
|
+
const e = new Or(r);
|
|
1418
1426
|
return [
|
|
1419
1427
|
e.setup.bind(e),
|
|
1420
1428
|
{
|
|
@@ -1426,10 +1434,10 @@ function wr(r) {
|
|
|
1426
1434
|
}
|
|
1427
1435
|
];
|
|
1428
1436
|
}
|
|
1429
|
-
function
|
|
1437
|
+
function qr(r) {
|
|
1430
1438
|
d.presets = r;
|
|
1431
1439
|
}
|
|
1432
|
-
function
|
|
1440
|
+
function ae(r, e) {
|
|
1433
1441
|
return e === "native" && Object.defineProperty(r, "name", {
|
|
1434
1442
|
value: `__proform_raw_${r.name}`,
|
|
1435
1443
|
writable: !0
|
|
@@ -1441,31 +1449,31 @@ function ne(r, e) {
|
|
|
1441
1449
|
writable: !0
|
|
1442
1450
|
}), r;
|
|
1443
1451
|
}
|
|
1444
|
-
function
|
|
1445
|
-
return
|
|
1452
|
+
function Tr(r) {
|
|
1453
|
+
return ae(r, "native");
|
|
1446
1454
|
}
|
|
1447
|
-
function
|
|
1455
|
+
function zr(r) {
|
|
1448
1456
|
return r.__proform_raw_object = !0, r;
|
|
1449
1457
|
}
|
|
1450
|
-
function
|
|
1451
|
-
return
|
|
1458
|
+
function Lr(r) {
|
|
1459
|
+
return ae(r, "onetime");
|
|
1452
1460
|
}
|
|
1453
|
-
function
|
|
1461
|
+
function Hr(r) {
|
|
1454
1462
|
function e() {
|
|
1455
1463
|
return r;
|
|
1456
1464
|
}
|
|
1457
|
-
return
|
|
1465
|
+
return ae(
|
|
1458
1466
|
e,
|
|
1459
1467
|
"structured_path_parsing_mark"
|
|
1460
1468
|
);
|
|
1461
1469
|
}
|
|
1462
1470
|
export {
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
+
Nr as ProForm,
|
|
1472
|
+
Tr as markNativeFunction,
|
|
1473
|
+
zr as markNativeObject,
|
|
1474
|
+
Lr as markOnetimeFunction,
|
|
1475
|
+
Hr as markStructuredPathParsing,
|
|
1476
|
+
Ur as useForm,
|
|
1477
|
+
qr as useFormPresetConfigurer,
|
|
1478
|
+
ae as useModifiers
|
|
1471
1479
|
};
|