@harbor-design/proform 1.4.3 → 1.4.5
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
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 De = Object.defineProperty;
|
|
2
|
+
var Ge = (r, e, t) => e in r ? De(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var l = (r, e, t) => (Ge(r, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
+
import { ref as H, readonly as Ee, nextTick as S, isRef as T, watch as w, isReactive as z, watchEffect as G, toRaw as $, reactive as Y, createVNode as m, mergeProps as U, withDirectives as Be, vShow as Ke, createTextVNode as We, isVNode as Xe, defineComponent as Ye } from "vue";
|
|
5
|
+
var Ze = typeof global == "object" && global && global.Object === Object && global, Je = typeof self == "object" && self && self.Object === Object && self, ee = Ze || Je || Function("return this")(), M = ee.Symbol, Re = Object.prototype, Qe = Re.hasOwnProperty, Ae = Re.toString, N = M ? M.toStringTag : void 0;
|
|
6
|
+
function ke(r) {
|
|
7
|
+
var e = Qe.call(r, N), t = r[N];
|
|
8
8
|
try {
|
|
9
9
|
r[N] = void 0;
|
|
10
10
|
var i = !0;
|
|
11
11
|
} catch {
|
|
12
12
|
}
|
|
13
|
-
var s =
|
|
13
|
+
var s = Ae.call(r);
|
|
14
14
|
return i && (e ? r[N] = t : delete r[N]), s;
|
|
15
15
|
}
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
return
|
|
16
|
+
var et = Object.prototype, tt = et.toString;
|
|
17
|
+
function rt(r) {
|
|
18
|
+
return tt.call(r);
|
|
19
19
|
}
|
|
20
|
-
var
|
|
21
|
-
function
|
|
22
|
-
return r == null ? r === void 0 ?
|
|
20
|
+
var it = "[object Null]", st = "[object Undefined]", Oe = M ? M.toStringTag : void 0;
|
|
21
|
+
function $e(r) {
|
|
22
|
+
return r == null ? r === void 0 ? st : it : Oe && Oe in Object(r) ? ke(r) : rt(r);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function nt(r) {
|
|
25
25
|
return r != null && typeof r == "object";
|
|
26
26
|
}
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
return typeof r == "symbol" ||
|
|
27
|
+
var ot = "[object Symbol]";
|
|
28
|
+
function te(r) {
|
|
29
|
+
return typeof r == "symbol" || nt(r) && $e(r) == ot;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function at(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
|
|
36
|
+
var re = Array.isArray, lt = 1 / 0, we = M ? M.prototype : void 0, Fe = we ? we.toString : void 0;
|
|
37
37
|
function Me(r) {
|
|
38
38
|
if (typeof r == "string")
|
|
39
39
|
return r;
|
|
40
|
-
if (
|
|
41
|
-
return
|
|
42
|
-
if (
|
|
43
|
-
return
|
|
40
|
+
if (re(r))
|
|
41
|
+
return at(r, Me) + "";
|
|
42
|
+
if (te(r))
|
|
43
|
+
return Fe ? Fe.call(r) : "";
|
|
44
44
|
var e = r + "";
|
|
45
|
-
return e == "0" && 1 / r == -
|
|
45
|
+
return e == "0" && 1 / r == -lt ? "-0" : e;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function B(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 ut = "[object AsyncFunction]", ft = "[object Function]", ct = "[object GeneratorFunction]", dt = "[object Proxy]";
|
|
52
|
+
function ht(r) {
|
|
53
|
+
if (!B(r))
|
|
54
54
|
return !1;
|
|
55
|
-
var e =
|
|
56
|
-
return e ==
|
|
55
|
+
var e = $e(r);
|
|
56
|
+
return e == ft || e == ct || e == ut || e == dt;
|
|
57
57
|
}
|
|
58
|
-
var
|
|
59
|
-
var r = /[^.]+$/.exec(
|
|
58
|
+
var Z = ee["__core-js_shared__"], je = function() {
|
|
59
|
+
var r = /[^.]+$/.exec(Z && Z.keys && Z.keys.IE_PROTO || "");
|
|
60
60
|
return r ? "Symbol(src)_1." + r : "";
|
|
61
61
|
}();
|
|
62
|
-
function
|
|
63
|
-
return !!
|
|
62
|
+
function pt(r) {
|
|
63
|
+
return !!je && je in r;
|
|
64
64
|
}
|
|
65
|
-
var
|
|
66
|
-
function
|
|
65
|
+
var mt = Function.prototype, gt = mt.toString;
|
|
66
|
+
function bt(r) {
|
|
67
67
|
if (r != null) {
|
|
68
68
|
try {
|
|
69
|
-
return
|
|
69
|
+
return gt.call(r);
|
|
70
70
|
} catch {
|
|
71
71
|
}
|
|
72
72
|
try {
|
|
@@ -76,121 +76,121 @@ function ht(r) {
|
|
|
76
76
|
}
|
|
77
77
|
return "";
|
|
78
78
|
}
|
|
79
|
-
var
|
|
80
|
-
"^" +
|
|
79
|
+
var vt = /[\\^$.*+?()[\]{}|]/g, yt = /^\[object .+?Constructor\]$/, _t = Function.prototype, Pt = Object.prototype, It = _t.toString, Ct = Pt.hasOwnProperty, St = RegExp(
|
|
80
|
+
"^" + It.call(Ct).replace(vt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
81
81
|
);
|
|
82
|
-
function
|
|
83
|
-
if (!
|
|
82
|
+
function Et(r) {
|
|
83
|
+
if (!B(r) || pt(r))
|
|
84
84
|
return !1;
|
|
85
|
-
var e =
|
|
86
|
-
return e.test(
|
|
85
|
+
var e = ht(r) ? St : yt;
|
|
86
|
+
return e.test(bt(r));
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Ot(r, e) {
|
|
89
89
|
return r == null ? void 0 : r[e];
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
var t =
|
|
93
|
-
return
|
|
91
|
+
function ie(r, e) {
|
|
92
|
+
var t = Ot(r, e);
|
|
93
|
+
return Et(t) ? t : void 0;
|
|
94
94
|
}
|
|
95
|
-
var
|
|
95
|
+
var xe = function() {
|
|
96
96
|
try {
|
|
97
|
-
var r =
|
|
97
|
+
var r = ie(Object, "defineProperty");
|
|
98
98
|
return r({}, "", {}), r;
|
|
99
99
|
} catch {
|
|
100
100
|
}
|
|
101
|
-
}(),
|
|
102
|
-
function
|
|
101
|
+
}(), wt = 9007199254740991, Ft = /^(?:0|[1-9]\d*)$/;
|
|
102
|
+
function jt(r, e) {
|
|
103
103
|
var t = typeof r;
|
|
104
|
-
return e = e ??
|
|
104
|
+
return e = e ?? wt, !!e && (t == "number" || t != "symbol" && Ft.test(r)) && r > -1 && r % 1 == 0 && r < e;
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
e == "__proto__" &&
|
|
106
|
+
function xt(r, e, t) {
|
|
107
|
+
e == "__proto__" && xe ? xe(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 Ve(r, e) {
|
|
115
115
|
return r === e || r !== r && e !== e;
|
|
116
116
|
}
|
|
117
|
-
var
|
|
117
|
+
var Rt = Object.prototype, $t = Rt.hasOwnProperty;
|
|
118
118
|
function Mt(r, e, t) {
|
|
119
119
|
var i = r[e];
|
|
120
|
-
(!(
|
|
120
|
+
(!($t.call(r, e) && Ve(i, t)) || t === void 0 && !(e in r)) && xt(r, e, t);
|
|
121
121
|
}
|
|
122
|
-
var
|
|
123
|
-
function
|
|
124
|
-
if (
|
|
122
|
+
var Vt = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, qt = /^\w*$/;
|
|
123
|
+
function Nt(r, e) {
|
|
124
|
+
if (re(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 || te(r) ? !0 : qt.test(r) || !Vt.test(r) || e != null && r in Object(e);
|
|
128
128
|
}
|
|
129
|
-
var
|
|
130
|
-
function
|
|
131
|
-
this.__data__ =
|
|
129
|
+
var L = ie(Object, "create");
|
|
130
|
+
function Ut() {
|
|
131
|
+
this.__data__ = L ? L(null) : {}, this.size = 0;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function Tt(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 zt = "__lodash_hash_undefined__", Lt = Object.prototype, Ht = Lt.hasOwnProperty;
|
|
138
|
+
function Dt(r) {
|
|
139
139
|
var e = this.__data__;
|
|
140
|
-
if (
|
|
140
|
+
if (L) {
|
|
141
141
|
var t = e[r];
|
|
142
|
-
return t ===
|
|
142
|
+
return t === zt ? void 0 : t;
|
|
143
143
|
}
|
|
144
|
-
return
|
|
144
|
+
return Ht.call(e, r) ? e[r] : void 0;
|
|
145
145
|
}
|
|
146
|
-
var
|
|
147
|
-
function
|
|
146
|
+
var Gt = Object.prototype, Bt = Gt.hasOwnProperty;
|
|
147
|
+
function Kt(r) {
|
|
148
148
|
var e = this.__data__;
|
|
149
|
-
return
|
|
149
|
+
return L ? e[r] !== void 0 : Bt.call(e, r);
|
|
150
150
|
}
|
|
151
|
-
var
|
|
152
|
-
function
|
|
151
|
+
var Wt = "__lodash_hash_undefined__";
|
|
152
|
+
function Xt(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] = L && e === void 0 ? Wt : e, this;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function F(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
|
+
F.prototype.clear = Ut;
|
|
164
|
+
F.prototype.delete = Tt;
|
|
165
|
+
F.prototype.get = Dt;
|
|
166
|
+
F.prototype.has = Kt;
|
|
167
|
+
F.prototype.set = Xt;
|
|
168
|
+
function Yt() {
|
|
169
169
|
this.__data__ = [], this.size = 0;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function K(r, e) {
|
|
172
172
|
for (var t = r.length; t--; )
|
|
173
|
-
if (
|
|
173
|
+
if (Ve(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 Zt = Array.prototype, Jt = Zt.splice;
|
|
178
|
+
function Qt(r) {
|
|
179
|
+
var e = this.__data__, t = K(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() : Jt.call(e, t, 1), --this.size, !0;
|
|
184
184
|
}
|
|
185
|
-
function
|
|
186
|
-
var e = this.__data__, t =
|
|
185
|
+
function At(r) {
|
|
186
|
+
var e = this.__data__, t = K(e, r);
|
|
187
187
|
return t < 0 ? void 0 : e[t][1];
|
|
188
188
|
}
|
|
189
|
-
function
|
|
190
|
-
return
|
|
189
|
+
function kt(r) {
|
|
190
|
+
return K(this.__data__, r) > -1;
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
var t = this.__data__, i =
|
|
192
|
+
function er(r, e) {
|
|
193
|
+
var t = this.__data__, i = K(t, r);
|
|
194
194
|
return i < 0 ? (++this.size, t.push([r, e])) : t[i][1] = e, this;
|
|
195
195
|
}
|
|
196
196
|
function V(r) {
|
|
@@ -200,57 +200,57 @@ function V(r) {
|
|
|
200
200
|
this.set(i[0], i[1]);
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
|
-
V.prototype.clear =
|
|
204
|
-
V.prototype.delete =
|
|
205
|
-
V.prototype.get =
|
|
206
|
-
V.prototype.has =
|
|
207
|
-
V.prototype.set =
|
|
208
|
-
var
|
|
209
|
-
function
|
|
203
|
+
V.prototype.clear = Yt;
|
|
204
|
+
V.prototype.delete = Qt;
|
|
205
|
+
V.prototype.get = At;
|
|
206
|
+
V.prototype.has = kt;
|
|
207
|
+
V.prototype.set = er;
|
|
208
|
+
var tr = ie(ee, "Map");
|
|
209
|
+
function rr() {
|
|
210
210
|
this.size = 0, this.__data__ = {
|
|
211
|
-
hash: new
|
|
212
|
-
map: new (
|
|
213
|
-
string: new
|
|
211
|
+
hash: new F(),
|
|
212
|
+
map: new (tr || V)(),
|
|
213
|
+
string: new F()
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function ir(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 W(r, e) {
|
|
221
221
|
var t = r.__data__;
|
|
222
|
-
return
|
|
222
|
+
return ir(e) ? t[typeof e == "string" ? "string" : "hash"] : t.map;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
225
|
-
var e =
|
|
224
|
+
function sr(r) {
|
|
225
|
+
var e = W(this, r).delete(r);
|
|
226
226
|
return this.size -= e ? 1 : 0, e;
|
|
227
227
|
}
|
|
228
|
-
function
|
|
229
|
-
return
|
|
228
|
+
function nr(r) {
|
|
229
|
+
return W(this, r).get(r);
|
|
230
230
|
}
|
|
231
|
-
function
|
|
232
|
-
return
|
|
231
|
+
function or(r) {
|
|
232
|
+
return W(this, r).has(r);
|
|
233
233
|
}
|
|
234
|
-
function
|
|
235
|
-
var t =
|
|
234
|
+
function ar(r, e) {
|
|
235
|
+
var t = W(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 j(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
|
+
j.prototype.clear = rr;
|
|
246
|
+
j.prototype.delete = sr;
|
|
247
|
+
j.prototype.get = nr;
|
|
248
|
+
j.prototype.has = or;
|
|
249
|
+
j.prototype.set = ar;
|
|
250
|
+
var lr = "Expected a function";
|
|
251
|
+
function se(r, e) {
|
|
252
252
|
if (typeof r != "function" || e != null && typeof e != "function")
|
|
253
|
-
throw new TypeError(
|
|
253
|
+
throw new TypeError(lr);
|
|
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 re(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 (se.Cache || j)(), t;
|
|
262
262
|
}
|
|
263
|
-
|
|
264
|
-
var
|
|
265
|
-
function
|
|
266
|
-
var e =
|
|
267
|
-
return t.size ===
|
|
263
|
+
se.Cache = j;
|
|
264
|
+
var ur = 500;
|
|
265
|
+
function fr(r) {
|
|
266
|
+
var e = se(r, function(i) {
|
|
267
|
+
return t.size === ur && t.clear(), i;
|
|
268
268
|
}), t = e.cache;
|
|
269
269
|
return e;
|
|
270
270
|
}
|
|
271
|
-
var
|
|
271
|
+
var cr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, dr = /\\(\\)?/g, hr = fr(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(cr, function(t, i, s, n) {
|
|
274
|
+
e.push(s ? n.replace(dr, "$1") : i || t);
|
|
275
275
|
}), e;
|
|
276
276
|
});
|
|
277
|
-
function
|
|
277
|
+
function pr(r) {
|
|
278
278
|
return r == null ? "" : Me(r);
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
return
|
|
280
|
+
function qe(r, e) {
|
|
281
|
+
return re(r) ? r : Nt(r, e) ? [r] : hr(pr(r));
|
|
282
282
|
}
|
|
283
|
-
var
|
|
284
|
-
function
|
|
285
|
-
if (typeof r == "string" ||
|
|
283
|
+
var mr = 1 / 0;
|
|
284
|
+
function Ne(r) {
|
|
285
|
+
if (typeof r == "string" || te(r))
|
|
286
286
|
return r;
|
|
287
287
|
var e = r + "";
|
|
288
|
-
return e == "0" && 1 / r == -
|
|
288
|
+
return e == "0" && 1 / r == -mr ? "-0" : e;
|
|
289
289
|
}
|
|
290
|
-
function
|
|
291
|
-
e =
|
|
290
|
+
function gr(r, e) {
|
|
291
|
+
e = qe(e, r);
|
|
292
292
|
for (var t = 0, i = e.length; r != null && t < i; )
|
|
293
|
-
r = r[
|
|
293
|
+
r = r[Ne(e[t++])];
|
|
294
294
|
return t && t == i ? r : void 0;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
var i = r == null ? void 0 :
|
|
296
|
+
function D(r, e, t) {
|
|
297
|
+
var i = r == null ? void 0 : gr(r, e);
|
|
298
298
|
return i === void 0 ? t : i;
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
if (!
|
|
300
|
+
function br(r, e, t, i) {
|
|
301
|
+
if (!B(r))
|
|
302
302
|
return r;
|
|
303
|
-
e =
|
|
303
|
+
e = qe(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 = Ne(e[s]), c = t;
|
|
306
306
|
if (f === "__proto__" || f === "constructor" || f === "prototype")
|
|
307
307
|
return r;
|
|
308
308
|
if (s != a) {
|
|
309
|
-
var
|
|
310
|
-
|
|
309
|
+
var h = u[f];
|
|
310
|
+
c = i ? i(h, f, u) : void 0, c === void 0 && (c = B(h) ? h : jt(e[s + 1]) ? [] : {});
|
|
311
311
|
}
|
|
312
|
-
Mt(u, f,
|
|
312
|
+
Mt(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 : br(r, e, t);
|
|
318
318
|
}
|
|
319
319
|
class o {
|
|
320
320
|
static typeChecker(e) {
|
|
@@ -341,6 +341,9 @@ class o {
|
|
|
341
341
|
static isUndefined(e) {
|
|
342
342
|
return e === void 0;
|
|
343
343
|
}
|
|
344
|
+
static isNull(e) {
|
|
345
|
+
return e === null;
|
|
346
|
+
}
|
|
344
347
|
static isArrayEmpty(e) {
|
|
345
348
|
return (e == null ? void 0 : e.length) < 1;
|
|
346
349
|
}
|
|
@@ -364,6 +367,8 @@ class o {
|
|
|
364
367
|
return !1;
|
|
365
368
|
if (this.isObjectEmpty(e))
|
|
366
369
|
return !0;
|
|
370
|
+
if (e.__proform_raw_object)
|
|
371
|
+
return !1;
|
|
367
372
|
for (const t in e) {
|
|
368
373
|
if (t === "componentProps")
|
|
369
374
|
return !1;
|
|
@@ -382,18 +387,18 @@ class o {
|
|
|
382
387
|
return !!e.__proform_raw_object;
|
|
383
388
|
}
|
|
384
389
|
}
|
|
385
|
-
function
|
|
390
|
+
function b(r, ...e) {
|
|
386
391
|
return e.forEach((t) => {
|
|
387
392
|
if (Array.isArray(t))
|
|
388
393
|
Array.isArray(r) || (r = []), t.forEach((i, s) => {
|
|
389
|
-
typeof i == "object" && i !== null ? r[s] =
|
|
394
|
+
typeof i == "object" && i !== null ? r[s] = b(Array.isArray(i) ? [] : {}, i) : r[s] = i;
|
|
390
395
|
});
|
|
391
396
|
else
|
|
392
397
|
for (const i in t)
|
|
393
|
-
t.hasOwnProperty(i) && (typeof t[i] == "object" && t[i] !== null ? r[i] =
|
|
398
|
+
t.hasOwnProperty(i) && (typeof t[i] == "object" && t[i] !== null ? r[i] = b(r[i] || {}, t[i]) : r[i] = t[i]);
|
|
394
399
|
}), r;
|
|
395
400
|
}
|
|
396
|
-
function
|
|
401
|
+
function I(r) {
|
|
397
402
|
const e = /* @__PURE__ */ new WeakMap();
|
|
398
403
|
function t(i) {
|
|
399
404
|
if (i === null || typeof i != "object")
|
|
@@ -431,13 +436,13 @@ function P(r) {
|
|
|
431
436
|
}
|
|
432
437
|
return t(r);
|
|
433
438
|
}
|
|
434
|
-
function
|
|
439
|
+
function Q(r, e) {
|
|
435
440
|
return r.replace(/undefined/g, e);
|
|
436
441
|
}
|
|
437
|
-
class
|
|
442
|
+
class vr {
|
|
438
443
|
constructor(e) {
|
|
439
444
|
l(this, "runtimeCore");
|
|
440
|
-
l(this, "readonlyReactiveModel",
|
|
445
|
+
l(this, "readonlyReactiveModel", H({}));
|
|
441
446
|
l(this, "shareHistory", /* @__PURE__ */ new Map());
|
|
442
447
|
this.formCustomization = e;
|
|
443
448
|
}
|
|
@@ -448,36 +453,36 @@ class mr {
|
|
|
448
453
|
})), e;
|
|
449
454
|
}
|
|
450
455
|
setup(e) {
|
|
451
|
-
return this.runtimeCore = e, this.readonlyReactiveModel.value =
|
|
456
|
+
return this.runtimeCore = e, this.readonlyReactiveModel.value = Ee(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;
|
|
452
457
|
}
|
|
453
458
|
submit() {
|
|
454
459
|
var i;
|
|
455
|
-
const e = (i =
|
|
460
|
+
const e = (i = d.getPreset(this.runtimeCore.ui)) == null ? void 0 : i.adapter, t = C.adapters[d.getUI(this.runtimeCore.ui)];
|
|
456
461
|
return (e == null ? void 0 : e.validateForm(this)) ?? (t == null ? void 0 : t.validateForm(this));
|
|
457
462
|
}
|
|
458
463
|
hydrate(e) {
|
|
459
|
-
|
|
464
|
+
S(() => {
|
|
460
465
|
this.runtimeCore.hydrateEffect.trackEffect(
|
|
461
466
|
() => {
|
|
462
|
-
|
|
467
|
+
T(e) ? w(
|
|
463
468
|
() => e.value,
|
|
464
469
|
() => {
|
|
465
|
-
|
|
470
|
+
b(this.runtimeCore.model.value, e.value);
|
|
466
471
|
},
|
|
467
472
|
{
|
|
468
473
|
deep: !0,
|
|
469
474
|
immediate: !0
|
|
470
475
|
}
|
|
471
|
-
) :
|
|
476
|
+
) : z(e) ? w(
|
|
472
477
|
() => e,
|
|
473
478
|
() => {
|
|
474
|
-
|
|
479
|
+
b(this.runtimeCore.model.value, e);
|
|
475
480
|
},
|
|
476
481
|
{
|
|
477
482
|
deep: !0,
|
|
478
483
|
immediate: !0
|
|
479
484
|
}
|
|
480
|
-
) :
|
|
485
|
+
) : b(this.runtimeCore.model.value, e);
|
|
481
486
|
},
|
|
482
487
|
{
|
|
483
488
|
lazy: !1
|
|
@@ -486,24 +491,24 @@ class mr {
|
|
|
486
491
|
});
|
|
487
492
|
}
|
|
488
493
|
share(e) {
|
|
489
|
-
|
|
494
|
+
S(() => {
|
|
490
495
|
Object.keys(e).forEach((t) => {
|
|
491
|
-
|
|
496
|
+
T(e[t]) ? G(() => {
|
|
492
497
|
_(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());
|
|
493
|
-
}) :
|
|
498
|
+
}) : z(e[t]) ? G(() => {
|
|
494
499
|
_(this.runtimeCore.shared, t, e[t]), this.shareHistory.get(t) !== e[t] && (this.shareHistory.set(t, e[t]), this.runtimeCore.processor.schemaEffect.triggerEffects());
|
|
495
500
|
}) : (_(this.runtimeCore.shared, t, e[t]), this.shareHistory.get(t) !== e[t] && (this.shareHistory.set(t, e[t]), this.runtimeCore.processor.schemaEffect.triggerEffects()));
|
|
496
501
|
});
|
|
497
502
|
});
|
|
498
503
|
}
|
|
499
504
|
subscribeModel(e) {
|
|
500
|
-
|
|
501
|
-
const t =
|
|
505
|
+
S(() => {
|
|
506
|
+
const t = w(
|
|
502
507
|
() => this.readonlyReactiveModel.value,
|
|
503
508
|
(i) => {
|
|
504
509
|
e(i, {
|
|
505
510
|
stopSubscribe() {
|
|
506
|
-
|
|
511
|
+
S(() => {
|
|
507
512
|
t();
|
|
508
513
|
});
|
|
509
514
|
}
|
|
@@ -518,12 +523,12 @@ class mr {
|
|
|
518
523
|
}
|
|
519
524
|
resetModel() {
|
|
520
525
|
var e;
|
|
521
|
-
(e = this.runtimeCore) != null && e.model.value && (this.runtimeCore.model.value =
|
|
526
|
+
(e = this.runtimeCore) != null && e.model.value && (this.runtimeCore.model.value = I(
|
|
522
527
|
this.runtimeCore.processor.stableModel
|
|
523
|
-
), this.readonlyReactiveModel.value =
|
|
528
|
+
), this.readonlyReactiveModel.value = Ee(this.runtimeCore.model.value), this.runtimeCore.runtimeAdapter.clearValidate(this.runtimeCore));
|
|
524
529
|
}
|
|
525
530
|
}
|
|
526
|
-
class
|
|
531
|
+
class A {
|
|
527
532
|
constructor() {
|
|
528
533
|
l(this, "effects", /* @__PURE__ */ new Set());
|
|
529
534
|
l(this, "tempClonedEffects", /* @__PURE__ */ new Set());
|
|
@@ -542,7 +547,7 @@ class J {
|
|
|
542
547
|
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);
|
|
543
548
|
}
|
|
544
549
|
}
|
|
545
|
-
class
|
|
550
|
+
class yr {
|
|
546
551
|
constructor(e) {
|
|
547
552
|
l(this, "runtimeCore");
|
|
548
553
|
l(this, "processedSchemas");
|
|
@@ -550,17 +555,18 @@ class gr {
|
|
|
550
555
|
l(this, "getRuntimeMeta");
|
|
551
556
|
l(this, "stableSchemas", []);
|
|
552
557
|
l(this, "stableModel", {});
|
|
553
|
-
l(this, "schemaPreset",
|
|
554
|
-
l(this, "componentPropsPreset",
|
|
558
|
+
l(this, "schemaPreset", C.schemaPreset);
|
|
559
|
+
l(this, "componentPropsPreset", C.componentPropsPreset);
|
|
555
560
|
l(this, "stableUpdaterProcessProgress");
|
|
556
561
|
l(this, "stableUpdaterTimes", 0);
|
|
557
|
-
l(this, "schemaEffect", new
|
|
558
|
-
l(this, "defaultValueEffect", new
|
|
562
|
+
l(this, "schemaEffect", new A());
|
|
563
|
+
l(this, "defaultValueEffect", new A());
|
|
559
564
|
l(this, "defaultValueInprogressMap", /* @__PURE__ */ new Map());
|
|
560
565
|
l(this, "baseDefaultValueFunctionsLength");
|
|
561
566
|
l(this, "isModelInitialized", !0);
|
|
562
567
|
l(this, "schemaEffectHistory", /* @__PURE__ */ new Map());
|
|
563
|
-
this
|
|
568
|
+
l(this, "stableUpdaterHistory", /* @__PURE__ */ new Map());
|
|
569
|
+
this.runtimeCore = e, this.processedSchemas = e.schemas, this.processedModel = e.model, this.getRuntimeMeta = e.getRuntimeMeta.bind(e), w(
|
|
564
570
|
() => this.processedModel.value,
|
|
565
571
|
() => {
|
|
566
572
|
this.schemaEffect.triggerEffects();
|
|
@@ -598,7 +604,7 @@ class gr {
|
|
|
598
604
|
// 派生过程,用于外部应用
|
|
599
605
|
parseSchemas(e, t) {
|
|
600
606
|
o.isArrayEmpty(this.processedSchemas.value) && (this.baseDefaultValueFunctionsLength = this.countFunctionDefaultValues(
|
|
601
|
-
|
|
607
|
+
I(e)
|
|
602
608
|
), this.processedSchemas.value = this.initSchemas(e)), this.parse(e, t);
|
|
603
609
|
}
|
|
604
610
|
parseStable(e) {
|
|
@@ -610,12 +616,17 @@ class gr {
|
|
|
610
616
|
return t;
|
|
611
617
|
}
|
|
612
618
|
// 对于稳定初始化更新的抽象
|
|
613
|
-
stableUpdater(e = []) {
|
|
619
|
+
stableUpdater(e = [], t, i, s, n) {
|
|
614
620
|
if (e.every(Boolean)) {
|
|
615
|
-
const
|
|
616
|
-
!o.isProcessInprogress(
|
|
617
|
-
|
|
618
|
-
|
|
621
|
+
const a = $(this.processedSchemas.value);
|
|
622
|
+
!o.isProcessInprogress(a) && o.isObjectEmpty(this.stableModel), !this.stableUpdaterHistory.get(
|
|
623
|
+
`${t == null ? void 0 : t.key}parentIndex:${t == null ? void 0 : t.index}childIndex:${i}${s}${n}`
|
|
624
|
+
) && (this.stableUpdaterHistory.set(
|
|
625
|
+
`${t == null ? void 0 : t.key}parentIndex:${t == null ? void 0 : t.index}childIndex:${i}${s}${n}`,
|
|
626
|
+
!0
|
|
627
|
+
), this.stableUpdaterProcessProgress || (this.stableUpdaterProcessProgress = Array.from({
|
|
628
|
+
length: a.length
|
|
629
|
+
}).fill(!1)), this.stableUpdaterProcessProgress[this.stableUpdaterTimes] = !0, this.stableUpdaterTimes++, this.modelProcessor(a));
|
|
619
630
|
}
|
|
620
631
|
}
|
|
621
632
|
// 核心单 schema 处理过程,接收一个对象键值对的数据结构
|
|
@@ -625,17 +636,29 @@ class gr {
|
|
|
625
636
|
}).fill(!1);
|
|
626
637
|
this.objectParser({ data: e, index: t, updater: a, parentMeta: i });
|
|
627
638
|
function a(u) {
|
|
628
|
-
const f = u.index,
|
|
639
|
+
const f = u.index, c = u.key, h = u.keyIndex;
|
|
629
640
|
if (o.isUndefined(u.stable))
|
|
630
641
|
return;
|
|
631
|
-
const
|
|
632
|
-
let y =
|
|
633
|
-
if (o.isProcessInprogress(y) || (n[
|
|
634
|
-
const g = s.processedSchemas.value[
|
|
635
|
-
g && o.isObject(g) &&
|
|
642
|
+
const p = s.parseStable(u.stable), v = i == null ? void 0 : i.index, E = i == null ? void 0 : i.key;
|
|
643
|
+
let y = p;
|
|
644
|
+
if (o.isProcessInprogress(y) || (n[h] = !0), i) {
|
|
645
|
+
const g = s.processedSchemas.value[v][E][f][c];
|
|
646
|
+
g && o.isObject(g) && c !== "component" && (y = b(g, y)), s.processedSchemas.value[v][E][f][c] = y, s.stableUpdater(
|
|
647
|
+
n,
|
|
648
|
+
i,
|
|
649
|
+
t,
|
|
650
|
+
c,
|
|
651
|
+
f
|
|
652
|
+
);
|
|
636
653
|
} else {
|
|
637
|
-
const g = s.processedSchemas.value[f][
|
|
638
|
-
g && o.isObject(g) &&
|
|
654
|
+
const g = s.processedSchemas.value[f][c];
|
|
655
|
+
g && o.isObject(g) && c !== "component" && (y = b(g, y)), s.processedSchemas.value[f][c] = y, s.stableUpdater(
|
|
656
|
+
n,
|
|
657
|
+
i,
|
|
658
|
+
t,
|
|
659
|
+
c,
|
|
660
|
+
f
|
|
661
|
+
);
|
|
639
662
|
}
|
|
640
663
|
}
|
|
641
664
|
}
|
|
@@ -651,19 +674,19 @@ class gr {
|
|
|
651
674
|
keyIndex: n
|
|
652
675
|
});
|
|
653
676
|
else {
|
|
654
|
-
const f = (
|
|
677
|
+
const f = (c) => {
|
|
655
678
|
e.updater({
|
|
656
679
|
...e,
|
|
657
680
|
key: s,
|
|
658
681
|
keyIndex: n,
|
|
659
|
-
stable:
|
|
682
|
+
stable: c
|
|
660
683
|
});
|
|
661
684
|
};
|
|
662
685
|
o.isFunction(t[s]) ? s !== "defaultValue" ? this.schemaEffect.trackEffect(
|
|
663
686
|
() => {
|
|
664
687
|
if (s === "component") {
|
|
665
|
-
const
|
|
666
|
-
this.promiseFieldParser(
|
|
688
|
+
const c = t[s](this.getRuntimeMeta());
|
|
689
|
+
this.promiseFieldParser(c, f, !1, {
|
|
667
690
|
rootIndex: e.index,
|
|
668
691
|
parentMeta: e.parentMeta
|
|
669
692
|
});
|
|
@@ -679,21 +702,21 @@ class gr {
|
|
|
679
702
|
}
|
|
680
703
|
) : this.defaultValueEffect.trackEffect(
|
|
681
704
|
() => {
|
|
682
|
-
const
|
|
705
|
+
const c = this.schemaEffect.trackEffect(
|
|
683
706
|
() => {
|
|
684
707
|
/\{\s*model\s*\}/.test(t[s].toString()) ? this.fieldParser(
|
|
685
708
|
t[s],
|
|
686
|
-
(
|
|
687
|
-
if (!
|
|
688
|
-
return f(
|
|
689
|
-
this.defaultValueInprogressMap.set(t[s],
|
|
709
|
+
(h) => {
|
|
710
|
+
if (!h)
|
|
711
|
+
return f(h);
|
|
712
|
+
this.defaultValueInprogressMap.set(t[s], h), !o.isProcessInprogress(h) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
|
|
690
713
|
this.defaultValueInprogressMap.values()
|
|
691
|
-
).every((
|
|
692
|
-
var
|
|
693
|
-
return !((
|
|
694
|
-
}) ? (f(
|
|
695
|
-
|
|
696
|
-
})) : f(
|
|
714
|
+
).every((p) => {
|
|
715
|
+
var v;
|
|
716
|
+
return !((v = p == null ? void 0 : p.includes) != null && v.call(p, "undefined"));
|
|
717
|
+
}) ? (f(h), this.defaultValueEffect.clearEffects(), S(() => {
|
|
718
|
+
c();
|
|
719
|
+
})) : f(h);
|
|
697
720
|
},
|
|
698
721
|
{
|
|
699
722
|
rootIndex: e.index,
|
|
@@ -701,15 +724,15 @@ class gr {
|
|
|
701
724
|
}
|
|
702
725
|
) : this.fieldParser(
|
|
703
726
|
t[s],
|
|
704
|
-
(
|
|
705
|
-
this.defaultValueInprogressMap.set(t[s],
|
|
727
|
+
(h) => {
|
|
728
|
+
this.defaultValueInprogressMap.set(t[s], h), !o.isProcessInprogress(h) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
|
|
706
729
|
this.defaultValueInprogressMap.values()
|
|
707
|
-
).every((
|
|
708
|
-
var
|
|
709
|
-
return !((
|
|
710
|
-
}) ? (f(
|
|
711
|
-
|
|
712
|
-
})) : f(
|
|
730
|
+
).every((p) => {
|
|
731
|
+
var v;
|
|
732
|
+
return !((v = p == null ? void 0 : p.includes) != null && v.call(p, "undefined"));
|
|
733
|
+
}) ? (f(h), this.defaultValueEffect.clearEffects(), S(() => {
|
|
734
|
+
c();
|
|
735
|
+
})) : f(h);
|
|
713
736
|
},
|
|
714
737
|
{
|
|
715
738
|
rootIndex: e.index,
|
|
@@ -737,13 +760,13 @@ class gr {
|
|
|
737
760
|
}
|
|
738
761
|
promiseFieldParser(e, t, i, s) {
|
|
739
762
|
o.isPromise(e) ? e.then((n) => {
|
|
740
|
-
o.isString(n) && (n =
|
|
763
|
+
o.isString(n) && (n = Q(n, "")), i && o.isObject(n) && !o.isNativeObject(n) ? this.objectParser({
|
|
741
764
|
data: n,
|
|
742
765
|
updater: t,
|
|
743
766
|
index: s.rootIndex,
|
|
744
767
|
parentMeta: s.parentMeta
|
|
745
768
|
}) : t(n);
|
|
746
|
-
}) : (o.isString(e) && (e =
|
|
769
|
+
}) : (o.isString(e) && (e = Q(e, "")), i && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
|
|
747
770
|
data: e,
|
|
748
771
|
updater: t,
|
|
749
772
|
index: s.rootIndex,
|
|
@@ -770,7 +793,7 @@ class gr {
|
|
|
770
793
|
e.name.startsWith("__proform_onetime_") && (e.__proform_cached_result = n), this.promiseFieldParser(n, t, s, i);
|
|
771
794
|
}
|
|
772
795
|
else
|
|
773
|
-
|
|
796
|
+
T(e) ? w(
|
|
774
797
|
() => e.value,
|
|
775
798
|
() => {
|
|
776
799
|
o.isUndefined(e.value) || (s && o.isObject(e.value) && !o.isNativeObject(e.value) ? this.objectParser({
|
|
@@ -784,7 +807,7 @@ class gr {
|
|
|
784
807
|
immediate: !0,
|
|
785
808
|
deep: !0
|
|
786
809
|
}
|
|
787
|
-
) :
|
|
810
|
+
) : z(e) ? w(
|
|
788
811
|
() => e,
|
|
789
812
|
() => {
|
|
790
813
|
o.isUndefined(e) || (s && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
|
|
@@ -806,14 +829,14 @@ class gr {
|
|
|
806
829
|
}) : t(e);
|
|
807
830
|
}
|
|
808
831
|
modelProcessor(e) {
|
|
809
|
-
e.map(
|
|
810
|
-
|
|
811
|
-
), o.isObjectEmpty(this.stableModel) && this.stableUpdaterProcessProgress.every(Boolean) && this.defaultValueEffect.effects.size === 0 &&
|
|
812
|
-
this.stableModel =
|
|
832
|
+
e.map((t) => {
|
|
833
|
+
this.createModel(t, this.processedModel.value);
|
|
834
|
+
}), o.isObjectEmpty(this.stableModel) && this.stableUpdaterProcessProgress.every(Boolean) && this.defaultValueEffect.effects.size === 0 && S(() => {
|
|
835
|
+
this.stableModel = I(this.processedModel.value), this.runtimeCore.hydrateEffect.triggerEffects(), this.runtimeCore.hydrateEffect.clearEffects();
|
|
813
836
|
});
|
|
814
837
|
}
|
|
815
838
|
setModel(e, t, i) {
|
|
816
|
-
o.isFunction(t) ? _(e, t(), i) :
|
|
839
|
+
o.isFunction(t) ? _(e, t(), i) : b(e, {
|
|
817
840
|
[t]: i
|
|
818
841
|
});
|
|
819
842
|
}
|
|
@@ -822,11 +845,11 @@ class gr {
|
|
|
822
845
|
this.createModel(i, t[e.field][0]);
|
|
823
846
|
})), o.isGroupSchema(e) && e.children.forEach((i) => {
|
|
824
847
|
this.createModel(i, t);
|
|
825
|
-
}), o.isItemSchema(e) &&
|
|
848
|
+
}), o.isItemSchema(e) && S(() => {
|
|
826
849
|
if ("defaultValue" in e)
|
|
827
850
|
this.setModel(t, e.field, e.defaultValue);
|
|
828
851
|
else {
|
|
829
|
-
if (o.isFunction(e.field) &&
|
|
852
|
+
if (o.isFunction(e.field) && D(t, e.field()))
|
|
830
853
|
return;
|
|
831
854
|
if (o.isString(e.field) && t[e.field])
|
|
832
855
|
return;
|
|
@@ -835,78 +858,78 @@ class gr {
|
|
|
835
858
|
});
|
|
836
859
|
}
|
|
837
860
|
}
|
|
838
|
-
class
|
|
861
|
+
class x {
|
|
839
862
|
static getFormContainer({ ui: e } = {}) {
|
|
840
|
-
return
|
|
863
|
+
return d.presets.uiPresets[e ?? d.presets.ui].container.Form;
|
|
841
864
|
}
|
|
842
865
|
static getFormItemContainer({ ui: e } = {}) {
|
|
843
|
-
return
|
|
866
|
+
return d.presets.uiPresets[e ?? d.presets.ui].container.FormItem;
|
|
844
867
|
}
|
|
845
868
|
static getItemContainer({ ui: e } = {}) {
|
|
846
|
-
return
|
|
869
|
+
return d.presets.uiPresets[e ?? d.presets.ui].container.Item;
|
|
847
870
|
}
|
|
848
871
|
static getGroupContainer({ ui: e } = {}) {
|
|
849
|
-
return
|
|
872
|
+
return d.presets.uiPresets[e ?? d.presets.ui].container.Group;
|
|
850
873
|
}
|
|
851
874
|
static getListContainer({ ui: e } = {}) {
|
|
852
|
-
return
|
|
875
|
+
return d.presets.uiPresets[e ?? d.presets.ui].container.List;
|
|
853
876
|
}
|
|
854
877
|
static getListItemContainer({ ui: e } = {}) {
|
|
855
|
-
return
|
|
878
|
+
return d.presets.uiPresets[e ?? d.presets.ui].container.ListItem;
|
|
856
879
|
}
|
|
857
880
|
}
|
|
858
|
-
class
|
|
881
|
+
class _r {
|
|
859
882
|
constructor(e) {
|
|
860
883
|
this.ui = e;
|
|
861
884
|
}
|
|
862
885
|
getRuntimeNative() {
|
|
863
886
|
var t;
|
|
864
|
-
return (t =
|
|
887
|
+
return (t = d.presets.uiPresets[this.ui]) == null ? void 0 : t.native;
|
|
865
888
|
}
|
|
866
889
|
getRuntimeField(e) {
|
|
867
890
|
var s;
|
|
868
|
-
const t = (s =
|
|
891
|
+
const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[d.getUI(this.ui)];
|
|
869
892
|
return (t == null ? void 0 : t.getRuntimeField(e)) ?? (i == null ? void 0 : i.getRuntimeField(e));
|
|
870
893
|
}
|
|
871
894
|
getRuntimeRequired(e) {
|
|
872
895
|
var s;
|
|
873
|
-
const t = (s =
|
|
896
|
+
const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[d.getUI(this.ui)];
|
|
874
897
|
return (t == null ? void 0 : t.getRuntimeRequired(e)) ?? (i == null ? void 0 : i.getRuntimeRequired(e));
|
|
875
898
|
}
|
|
876
899
|
getFormModelPropName() {
|
|
877
900
|
var i;
|
|
878
|
-
const e = (i =
|
|
901
|
+
const e = (i = d.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, t = C.adapters[d.getUI(this.ui)];
|
|
879
902
|
return (e == null ? void 0 : e.getFormModelPropName()) ?? (t == null ? void 0 : t.getFormModelPropName());
|
|
880
903
|
}
|
|
881
904
|
formComponentRenderer(e) {
|
|
882
905
|
var s;
|
|
883
|
-
const t = (s =
|
|
906
|
+
const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[d.getUI(this.ui)];
|
|
884
907
|
return (t == null ? void 0 : t.formComponentRenderer(e)) ?? (i == null ? void 0 : i.formComponentRenderer(e));
|
|
885
908
|
}
|
|
886
909
|
clearValidate(e) {
|
|
887
910
|
var s;
|
|
888
|
-
const t = (s =
|
|
911
|
+
const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[d.getUI(this.ui)];
|
|
889
912
|
return (t == null ? void 0 : t.clearValidate(e)) ?? (i == null ? void 0 : i.clearValidate(e));
|
|
890
913
|
}
|
|
891
914
|
}
|
|
892
|
-
function
|
|
893
|
-
return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !
|
|
915
|
+
function Pr(r) {
|
|
916
|
+
return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !Xe(r);
|
|
894
917
|
}
|
|
895
|
-
class
|
|
918
|
+
class Ir {
|
|
896
919
|
constructor(e) {
|
|
897
|
-
l(this, "schemas",
|
|
898
|
-
l(this, "model",
|
|
920
|
+
l(this, "schemas", H([]));
|
|
921
|
+
l(this, "model", H({}));
|
|
899
922
|
l(this, "processorBySchemaType", {
|
|
900
923
|
item: this.runtimeItemProcessor.bind(this),
|
|
901
924
|
group: this.runtimeGroupProcessor.bind(this),
|
|
902
925
|
list: this.runtimeListProcessor.bind(this)
|
|
903
926
|
});
|
|
904
|
-
l(this, "formRef",
|
|
905
|
-
l(this, "hydrateEffect", new
|
|
906
|
-
l(this, "native",
|
|
927
|
+
l(this, "formRef", H(null));
|
|
928
|
+
l(this, "hydrateEffect", new A());
|
|
929
|
+
l(this, "native", Y({}));
|
|
907
930
|
l(this, "grid", {});
|
|
908
931
|
l(this, "runtime", {});
|
|
909
|
-
l(this, "globalNativeFormOverride",
|
|
932
|
+
l(this, "globalNativeFormOverride", Y({
|
|
910
933
|
props: {
|
|
911
934
|
Form: {},
|
|
912
935
|
FormItem: {}
|
|
@@ -916,11 +939,11 @@ class yr {
|
|
|
916
939
|
FormItem: {}
|
|
917
940
|
}
|
|
918
941
|
}));
|
|
919
|
-
l(this, "shared",
|
|
942
|
+
l(this, "shared", Y({}));
|
|
920
943
|
l(this, "shareHistory", /* @__PURE__ */ new Map());
|
|
921
|
-
this.setup = e, this.processor = new
|
|
944
|
+
this.setup = e, this.processor = new yr(this);
|
|
922
945
|
const t = this.setup(this);
|
|
923
|
-
this.ui = t.ui ??
|
|
946
|
+
this.ui = t.ui ?? d.presets.ui, this.runtimeAdapter = new _r(this.ui), Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()), T(t.schemas) ? w(
|
|
924
947
|
// @ts-expect-error
|
|
925
948
|
() => t.schemas.value,
|
|
926
949
|
() => {
|
|
@@ -929,7 +952,7 @@ class yr {
|
|
|
929
952
|
{
|
|
930
953
|
deep: !0
|
|
931
954
|
}
|
|
932
|
-
) :
|
|
955
|
+
) : z(t.schemas) ? w(() => t.schemas, () => {
|
|
933
956
|
this.processor.parseSchemas(t.schemas);
|
|
934
957
|
}, {
|
|
935
958
|
deep: !0
|
|
@@ -937,16 +960,16 @@ class yr {
|
|
|
937
960
|
}
|
|
938
961
|
getRuntimeMeta() {
|
|
939
962
|
return {
|
|
940
|
-
model:
|
|
963
|
+
model: $(I(this.model.value)),
|
|
941
964
|
reactiveModel: this.model.value,
|
|
942
965
|
shared: this.shared,
|
|
943
966
|
// share 增加防抖,当开发者在过程中进行 share 时避免频繁触发爆栈
|
|
944
967
|
share: (t) => {
|
|
945
|
-
|
|
968
|
+
S(() => {
|
|
946
969
|
Object.keys(t).forEach((i) => {
|
|
947
|
-
|
|
970
|
+
T(t[i]) ? G(() => {
|
|
948
971
|
_(this.shared, i, t[i].value), this.shareHistory.get(i) !== t[i].value && (this.shareHistory.set(i, t[i].value), this.processor.schemaEffect.triggerEffects());
|
|
949
|
-
}) :
|
|
972
|
+
}) : z(t[i]) ? G(() => {
|
|
950
973
|
_(this.shared, i, t[i]), this.shareHistory.get(i) !== t[i] && (this.shareHistory.set(i, t[i]), this.processor.schemaEffect.triggerEffects());
|
|
951
974
|
}) : (_(this.shared, i, t[i]), this.shareHistory.get(i) !== t[i] && (this.shareHistory.set(i, t[i]), this.processor.schemaEffect.triggerEffects()));
|
|
952
975
|
});
|
|
@@ -955,51 +978,52 @@ class yr {
|
|
|
955
978
|
};
|
|
956
979
|
}
|
|
957
980
|
runtimeItemProcessor(e, t, i = this.model.value, s) {
|
|
958
|
-
var
|
|
959
|
-
const n =
|
|
981
|
+
var oe, ae, le, ue, fe, ce, de, he, pe, me, ge, be, ve, ye, _e, Pe, Ie, Ce;
|
|
982
|
+
const n = $(e.component);
|
|
960
983
|
if (!n)
|
|
961
984
|
return;
|
|
962
|
-
(
|
|
963
|
-
const a =
|
|
985
|
+
(ae = (oe = e.native) == null ? void 0 : oe.props) != null && ae.Form && b(this.globalNativeFormOverride.props.Form, (ue = (le = e.native) == null ? void 0 : le.props) == null ? void 0 : ue.Form), (ce = (fe = e.native) == null ? void 0 : fe.slots) != null && ce.Form && b(this.globalNativeFormOverride.slots.Form, (he = (de = e.native) == null ? void 0 : de.slots) == null ? void 0 : he.Form);
|
|
986
|
+
const a = b(I((me = (pe = this.native) == null ? void 0 : pe.slots) == null ? void 0 : me.FormItem) ?? {}, (be = (ge = e.native) == null ? void 0 : ge.slots) == null ? void 0 : be.FormItem), u = {
|
|
964
987
|
display: "grid",
|
|
965
988
|
gridColumn: "1 / -1",
|
|
966
989
|
...e.grid
|
|
967
|
-
}, f =
|
|
990
|
+
}, f = b(I((ye = (ve = this.native) == null ? void 0 : ve.props) == null ? void 0 : ye.FormItem) ?? {}, (Pe = (_e = e.native) == null ? void 0 : _e.props) == null ? void 0 : Pe.FormItem), c = this.runtimeAdapter.getRuntimeField({
|
|
968
991
|
schema: e,
|
|
969
992
|
parentSchema: s,
|
|
970
993
|
index: t
|
|
971
|
-
}),
|
|
972
|
-
let
|
|
994
|
+
}), h = n.name, p = e.componentProps ?? {}, v = C.placeholderPresetByComponentName;
|
|
995
|
+
let E = e.placeholder, y = e.show;
|
|
973
996
|
y === void 0 && (y = !0);
|
|
974
997
|
let g = e.label ?? "", O;
|
|
975
|
-
if (e.runtime ? O = e.runtime : O = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(t) && !o.isObjectEmpty(O) && (g =
|
|
998
|
+
if (e.runtime ? O = e.runtime : O = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(t) && !o.isObjectEmpty(O) && (g = Q((Ie = O == null ? void 0 : O.customizeListItemLabel) == null ? void 0 : Ie.call(O, e.label ?? "", t + 1), "")), !E) {
|
|
976
999
|
let q = "请输入";
|
|
977
|
-
o.isUndefined(
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
}),
|
|
1000
|
+
o.isUndefined(h) ? E = `${q}${g}` : /* @ts-expect-error */ v[h.toLowerCase()] ? (q = // @ts-expect-error
|
|
1001
|
+
v[h.toLowerCase()], E = `${q}${g}`) : (Object.keys(v).forEach((Se) => {
|
|
1002
|
+
h.toLowerCase().includes(Se.toLowerCase()) && (q = v[Se]);
|
|
1003
|
+
}), E = `${q}${g}`);
|
|
981
1004
|
}
|
|
982
|
-
const
|
|
1005
|
+
const Ue = this.runtimeAdapter.getRuntimeRequired({
|
|
983
1006
|
...e,
|
|
984
1007
|
label: g
|
|
985
|
-
}),
|
|
986
|
-
|
|
1008
|
+
}), Te = x.getItemContainer(this), ze = x.getFormItemContainer(this), Le = this, He = e.componentSlots, P = (Ce = d.presets.uiPresets[this.ui]) == null ? void 0 : Ce.display;
|
|
1009
|
+
let X;
|
|
1010
|
+
return !o.isUndefined(P == null ? void 0 : P.labelPrefix) && !o.isNull(P == null ? void 0 : P.labelPrefix) ? X = `${g}${P == null ? void 0 : P.labelPrefix}` : X = `${g}:`, m("div", {
|
|
987
1011
|
style: u
|
|
988
|
-
}, [m(
|
|
1012
|
+
}, [m(Te, {
|
|
989
1013
|
show: y
|
|
990
1014
|
}, {
|
|
991
1015
|
default() {
|
|
992
|
-
return y && m(
|
|
993
|
-
label: `${g ?
|
|
994
|
-
},
|
|
1016
|
+
return y && m(ze, U(f, {
|
|
1017
|
+
label: `${g ? X : ""}`
|
|
1018
|
+
}, c, Ue), {
|
|
995
1019
|
default() {
|
|
996
|
-
return
|
|
1020
|
+
return Le.runtimeAdapter.formComponentRenderer({
|
|
997
1021
|
Component: n,
|
|
998
1022
|
schema: e,
|
|
999
1023
|
baseModel: i,
|
|
1000
|
-
placeholder:
|
|
1001
|
-
componentSlots:
|
|
1002
|
-
props:
|
|
1024
|
+
placeholder: E,
|
|
1025
|
+
componentSlots: He,
|
|
1026
|
+
props: p
|
|
1003
1027
|
});
|
|
1004
1028
|
},
|
|
1005
1029
|
...a
|
|
@@ -1013,19 +1037,19 @@ class yr {
|
|
|
1013
1037
|
display: "grid",
|
|
1014
1038
|
gridColumn: "1 / -1",
|
|
1015
1039
|
...e.grid
|
|
1016
|
-
}, s =
|
|
1040
|
+
}, s = x.getGroupContainer(this);
|
|
1017
1041
|
let n = e.show;
|
|
1018
1042
|
return n === void 0 && (n = !0), m("div", {
|
|
1019
1043
|
style: i
|
|
1020
1044
|
}, [n && m(s, {
|
|
1021
1045
|
schema: e
|
|
1022
|
-
},
|
|
1046
|
+
}, Pr(t = e.children.map((a) => this.runtimeItemProcessor(a))) ? t : {
|
|
1023
1047
|
default: () => [t]
|
|
1024
1048
|
})]);
|
|
1025
1049
|
}
|
|
1026
1050
|
addListItem(e) {
|
|
1027
1051
|
var t;
|
|
1028
|
-
console.log("this", this.processor.stableModel, e.field), (t = this.processor.stableModel[e.field]) != null && t[0] && this.model.value[e.field].push(
|
|
1052
|
+
console.log("this", this.processor.stableModel, e.field), (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);
|
|
1029
1053
|
}
|
|
1030
1054
|
deleteListItem(e, t) {
|
|
1031
1055
|
this.model.value[e.field].splice(t, 1), this.runtimeAdapter.clearValidate(this);
|
|
@@ -1039,7 +1063,7 @@ class yr {
|
|
|
1039
1063
|
i.model.value[e.field] || (i.model.value[e.field] = [{}]);
|
|
1040
1064
|
let s = e.show;
|
|
1041
1065
|
s === void 0 && (s = !0);
|
|
1042
|
-
const n =
|
|
1066
|
+
const n = x.getListContainer(this), a = x.getListItemContainer(this);
|
|
1043
1067
|
return m("div", {
|
|
1044
1068
|
style: t
|
|
1045
1069
|
}, [s && m(n, {
|
|
@@ -1048,23 +1072,23 @@ class yr {
|
|
|
1048
1072
|
default() {
|
|
1049
1073
|
return i.model.value[e.field].map((u, f) => m(a, null, {
|
|
1050
1074
|
default() {
|
|
1051
|
-
return e.children.map((
|
|
1075
|
+
return e.children.map((c) => i.runtimeItemProcessor(c, f, u, e));
|
|
1052
1076
|
},
|
|
1053
1077
|
delete({
|
|
1054
|
-
container:
|
|
1078
|
+
container: c
|
|
1055
1079
|
} = {}) {
|
|
1056
|
-
var
|
|
1057
|
-
const
|
|
1058
|
-
return
|
|
1080
|
+
var p;
|
|
1081
|
+
const h = c ?? m("button", null, null);
|
|
1082
|
+
return Be(m(h, {
|
|
1059
1083
|
onClick: () => i.deleteListItem(e, f)
|
|
1060
|
-
}, null), [[
|
|
1084
|
+
}, null), [[Ke, ((p = i.model.value[e.field]) == null ? void 0 : p.length) > 1]]);
|
|
1061
1085
|
}
|
|
1062
1086
|
}));
|
|
1063
1087
|
},
|
|
1064
1088
|
add({
|
|
1065
1089
|
container: u
|
|
1066
1090
|
} = {}) {
|
|
1067
|
-
const f = u ?? m("button", null, [
|
|
1091
|
+
const f = u ?? m("button", null, [We("添加")]);
|
|
1068
1092
|
return m(f, {
|
|
1069
1093
|
onClick: () => i.addListItem(e)
|
|
1070
1094
|
}, null);
|
|
@@ -1075,14 +1099,14 @@ class yr {
|
|
|
1075
1099
|
return e.map((t) => (t.type || (t.type = "item"), this.processorBySchemaType[t.type](t)));
|
|
1076
1100
|
}
|
|
1077
1101
|
exec() {
|
|
1078
|
-
var u, f,
|
|
1102
|
+
var u, f, c, h;
|
|
1079
1103
|
const e = {
|
|
1080
1104
|
display: "grid",
|
|
1081
1105
|
gridColumn: "1 / -1",
|
|
1082
1106
|
gridAutoColumns: "1fr",
|
|
1083
1107
|
...this.grid
|
|
1084
|
-
}, t = this, i =
|
|
1085
|
-
return m(n,
|
|
1108
|
+
}, t = this, i = b(this.globalNativeFormOverride.props.Form, I((f = (u = this.native) == null ? void 0 : u.props) == null ? void 0 : f.Form) ?? {}), s = b(this.globalNativeFormOverride.slots.Form, I((h = (c = this.native) == null ? void 0 : c.slots) == null ? void 0 : h.Form) ?? {}), n = x.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
|
|
1109
|
+
return m(n, U(i, {
|
|
1086
1110
|
ref: this.formRef
|
|
1087
1111
|
}, {
|
|
1088
1112
|
[a]: this.model.value
|
|
@@ -1096,7 +1120,7 @@ class yr {
|
|
|
1096
1120
|
});
|
|
1097
1121
|
}
|
|
1098
1122
|
}
|
|
1099
|
-
class
|
|
1123
|
+
class d {
|
|
1100
1124
|
static getPreset(e) {
|
|
1101
1125
|
var t, i, s;
|
|
1102
1126
|
return (i = (t = this.presets.uiPresets) == null ? void 0 : t[e]) != null && i.extend ? this.presets.uiPresets[(s = this.presets.uiPresets[e]) == null ? void 0 : s.extend] : this.presets.uiPresets[e];
|
|
@@ -1106,18 +1130,18 @@ class c {
|
|
|
1106
1130
|
return (i = (t = this.presets.uiPresets) == null ? void 0 : t[e]) != null && i.extend ? (s = this.presets.uiPresets[e]) == null ? void 0 : s.extend : e;
|
|
1107
1131
|
}
|
|
1108
1132
|
}
|
|
1109
|
-
l(
|
|
1110
|
-
function
|
|
1133
|
+
l(d, "presets");
|
|
1134
|
+
function J({
|
|
1111
1135
|
parentSchema: r,
|
|
1112
1136
|
schema: e,
|
|
1113
1137
|
index: t
|
|
1114
1138
|
}) {
|
|
1115
1139
|
return r ? `${r.field}.${t}.${e.field}` : e.field;
|
|
1116
1140
|
}
|
|
1117
|
-
const
|
|
1141
|
+
const Cr = {
|
|
1118
1142
|
ArcoVue: {
|
|
1119
1143
|
getRuntimeField(r) {
|
|
1120
|
-
const e =
|
|
1144
|
+
const e = J(r);
|
|
1121
1145
|
return o.isFunction(e) ? {
|
|
1122
1146
|
field: e()
|
|
1123
1147
|
} : {
|
|
@@ -1161,7 +1185,7 @@ const _r = {
|
|
|
1161
1185
|
props: n
|
|
1162
1186
|
}) {
|
|
1163
1187
|
let a;
|
|
1164
|
-
return o.isFunction(t.field) ? a =
|
|
1188
|
+
return o.isFunction(t.field) ? a = D(e, t.field()) : a = e[t.field], m(r, U({
|
|
1165
1189
|
modelValue: a,
|
|
1166
1190
|
"onUpdate:modelValue": (u) => {
|
|
1167
1191
|
o.isFunction(t.field) ? _(e, t.field(), u) : e[t.field] = u;
|
|
@@ -1173,7 +1197,7 @@ const _r = {
|
|
|
1173
1197
|
},
|
|
1174
1198
|
validateForm(r) {
|
|
1175
1199
|
return new Promise((e, t) => {
|
|
1176
|
-
r.runtimeCore.formRef.value.validate((i) => i ? t(i) : e(r.cleanFallbackFields(
|
|
1200
|
+
r.runtimeCore.formRef.value.validate((i) => i ? t(i) : e(r.cleanFallbackFields($(r.runtimeCore.processor.processedModel.value))));
|
|
1177
1201
|
});
|
|
1178
1202
|
},
|
|
1179
1203
|
clearValidate(r) {
|
|
@@ -1183,7 +1207,7 @@ const _r = {
|
|
|
1183
1207
|
},
|
|
1184
1208
|
NutUI: {
|
|
1185
1209
|
getRuntimeField(r) {
|
|
1186
|
-
const e =
|
|
1210
|
+
const e = J(r);
|
|
1187
1211
|
return o.isFunction(e) ? {
|
|
1188
1212
|
prop: e()
|
|
1189
1213
|
} : {
|
|
@@ -1228,7 +1252,7 @@ const _r = {
|
|
|
1228
1252
|
props: n
|
|
1229
1253
|
}) {
|
|
1230
1254
|
let a;
|
|
1231
|
-
return o.isFunction(t.field) ? a =
|
|
1255
|
+
return o.isFunction(t.field) ? a = D(e, t.field()) : a = e[t.field], m(r, U({
|
|
1232
1256
|
modelValue: a,
|
|
1233
1257
|
"onUpdate:modelValue": (u) => {
|
|
1234
1258
|
o.isFunction(t.field) ? _(e, t.field(), u) : e[t.field] = u;
|
|
@@ -1244,7 +1268,7 @@ const _r = {
|
|
|
1244
1268
|
valid: i,
|
|
1245
1269
|
errors: s
|
|
1246
1270
|
}) => {
|
|
1247
|
-
i ? e(r.cleanFallbackFields(
|
|
1271
|
+
i ? e(r.cleanFallbackFields($(r.runtimeCore.processor.processedModel.value))) : t(s);
|
|
1248
1272
|
});
|
|
1249
1273
|
});
|
|
1250
1274
|
},
|
|
@@ -1255,7 +1279,7 @@ const _r = {
|
|
|
1255
1279
|
},
|
|
1256
1280
|
NaiveUI: {
|
|
1257
1281
|
getRuntimeField(r) {
|
|
1258
|
-
const e =
|
|
1282
|
+
const e = J(r);
|
|
1259
1283
|
return o.isFunction(e) ? {
|
|
1260
1284
|
path: e()
|
|
1261
1285
|
} : {
|
|
@@ -1302,7 +1326,7 @@ const _r = {
|
|
|
1302
1326
|
props: n
|
|
1303
1327
|
}) {
|
|
1304
1328
|
let a;
|
|
1305
|
-
return o.isFunction(t.field) ? a =
|
|
1329
|
+
return o.isFunction(t.field) ? a = D(e, t.field()) : a = e[t.field], m(r, U({
|
|
1306
1330
|
value: a,
|
|
1307
1331
|
"onUpdate:value": (u) => {
|
|
1308
1332
|
o.isFunction(t.field) ? _(e, t.field(), u) : e[t.field] = u;
|
|
@@ -1314,7 +1338,7 @@ const _r = {
|
|
|
1314
1338
|
},
|
|
1315
1339
|
validateForm(r) {
|
|
1316
1340
|
return new Promise((e, t) => {
|
|
1317
|
-
r.runtimeCore.formRef.value.validate((i) => i ? t(i) : e(r.cleanFallbackFields(
|
|
1341
|
+
r.runtimeCore.formRef.value.validate((i) => i ? t(i) : e(r.cleanFallbackFields($(r.runtimeCore.processor.processedModel.value))));
|
|
1318
1342
|
});
|
|
1319
1343
|
},
|
|
1320
1344
|
clearValidate(r) {
|
|
@@ -1322,7 +1346,7 @@ const _r = {
|
|
|
1322
1346
|
(t = (e = r.formRef.value) == null ? void 0 : e.restoreValidation) == null || t.call(e);
|
|
1323
1347
|
}
|
|
1324
1348
|
}
|
|
1325
|
-
},
|
|
1349
|
+
}, R = class R {
|
|
1326
1350
|
static getPlaceholderPrefixPresetByComponentName() {
|
|
1327
1351
|
const e = {
|
|
1328
1352
|
请选择: ["select", "tree"],
|
|
@@ -1335,7 +1359,7 @@ const _r = {
|
|
|
1335
1359
|
return t;
|
|
1336
1360
|
}
|
|
1337
1361
|
};
|
|
1338
|
-
l(
|
|
1362
|
+
l(R, "schemaPreset", {
|
|
1339
1363
|
type: {
|
|
1340
1364
|
defaultValue: "item"
|
|
1341
1365
|
},
|
|
@@ -1381,19 +1405,19 @@ l(M, "schemaPreset", {
|
|
|
1381
1405
|
runtime: {
|
|
1382
1406
|
default: void 0
|
|
1383
1407
|
}
|
|
1384
|
-
}), l(
|
|
1408
|
+
}), l(R, "componentPropsPreset", {
|
|
1385
1409
|
options: {
|
|
1386
1410
|
defaultValue: []
|
|
1387
1411
|
}
|
|
1388
1412
|
}), // 基于基本功能提出基本预设
|
|
1389
|
-
l(
|
|
1390
|
-
let
|
|
1391
|
-
const
|
|
1392
|
-
...
|
|
1413
|
+
l(R, "placeholderPresetByComponentName", R.getPlaceholderPrefixPresetByComponentName());
|
|
1414
|
+
let k = R;
|
|
1415
|
+
const C = {
|
|
1416
|
+
...k,
|
|
1393
1417
|
adapters: {
|
|
1394
|
-
...
|
|
1418
|
+
...Cr
|
|
1395
1419
|
}
|
|
1396
|
-
},
|
|
1420
|
+
}, Or = /* @__PURE__ */ Ye({
|
|
1397
1421
|
props: {
|
|
1398
1422
|
setup: {
|
|
1399
1423
|
type: Function,
|
|
@@ -1401,12 +1425,12 @@ const I = {
|
|
|
1401
1425
|
}
|
|
1402
1426
|
},
|
|
1403
1427
|
setup(r) {
|
|
1404
|
-
const e = new
|
|
1428
|
+
const e = new Ir(r.setup);
|
|
1405
1429
|
return () => e.exec();
|
|
1406
1430
|
}
|
|
1407
1431
|
});
|
|
1408
|
-
function
|
|
1409
|
-
const e = new
|
|
1432
|
+
function wr(r) {
|
|
1433
|
+
const e = new vr(r);
|
|
1410
1434
|
return [
|
|
1411
1435
|
e.setup.bind(e),
|
|
1412
1436
|
{
|
|
@@ -1418,10 +1442,10 @@ function Sr(r) {
|
|
|
1418
1442
|
}
|
|
1419
1443
|
];
|
|
1420
1444
|
}
|
|
1421
|
-
function
|
|
1422
|
-
|
|
1445
|
+
function Fr(r) {
|
|
1446
|
+
d.presets = r;
|
|
1423
1447
|
}
|
|
1424
|
-
function
|
|
1448
|
+
function ne(r, e) {
|
|
1425
1449
|
return e === "native" && Object.defineProperty(r, "name", {
|
|
1426
1450
|
value: `__proform_raw_${r.name}`,
|
|
1427
1451
|
writable: !0
|
|
@@ -1433,31 +1457,31 @@ function ie(r, e) {
|
|
|
1433
1457
|
writable: !0
|
|
1434
1458
|
}), r;
|
|
1435
1459
|
}
|
|
1436
|
-
function
|
|
1437
|
-
return
|
|
1460
|
+
function jr(r) {
|
|
1461
|
+
return ne(r, "native");
|
|
1438
1462
|
}
|
|
1439
|
-
function
|
|
1463
|
+
function xr(r) {
|
|
1440
1464
|
return r.__proform_raw_object = !0, r;
|
|
1441
1465
|
}
|
|
1442
|
-
function
|
|
1443
|
-
return
|
|
1466
|
+
function Rr(r) {
|
|
1467
|
+
return ne(r, "onetime");
|
|
1444
1468
|
}
|
|
1445
|
-
function
|
|
1469
|
+
function $r(r) {
|
|
1446
1470
|
function e() {
|
|
1447
1471
|
return r;
|
|
1448
1472
|
}
|
|
1449
|
-
return
|
|
1473
|
+
return ne(
|
|
1450
1474
|
e,
|
|
1451
1475
|
"structured_path_parsing_mark"
|
|
1452
1476
|
);
|
|
1453
1477
|
}
|
|
1454
1478
|
export {
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1479
|
+
Or as ProForm,
|
|
1480
|
+
jr as markNativeFunction,
|
|
1481
|
+
xr as markNativeObject,
|
|
1482
|
+
Rr as markOnetimeFunction,
|
|
1483
|
+
$r as markStructuredPathParsing,
|
|
1484
|
+
wr as useForm,
|
|
1485
|
+
Fr as useFormPresetConfigurer,
|
|
1486
|
+
ne as useModifiers
|
|
1463
1487
|
};
|