@harbor-design/proform 1.4.4 → 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 ze = Object.defineProperty;
2
- var Le = (r, e, t) => e in r ? ze(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var l = (r, e, t) => (Le(r, typeof e != "symbol" ? e + "" : e, t), t);
4
- import { ref as L, readonly as Ie, nextTick as C, isRef as U, watch as E, isReactive as T, watchEffect as D, toRaw as R, reactive as W, createVNode as m, mergeProps as N, withDirectives as He, vShow as De, createTextVNode as Ge, isVNode as Be, defineComponent as Ke } from "vue";
5
- var We = typeof global == "object" && global && global.Object === Object && global, Xe = typeof self == "object" && self && self.Object === Object && self, A = We || Xe || Function("return this")(), $ = A.Symbol, Fe = Object.prototype, Ye = Fe.hasOwnProperty, Ze = Fe.toString, q = $ ? $.toStringTag : void 0;
6
- function Je(r) {
7
- var e = Ye.call(r, q), t = r[q];
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
- r[q] = void 0;
9
+ r[N] = void 0;
10
10
  var i = !0;
11
11
  } catch {
12
12
  }
13
- var s = Ze.call(r);
14
- return i && (e ? r[q] = t : delete r[q]), s;
13
+ var s = Ae.call(r);
14
+ return i && (e ? r[N] = t : delete r[N]), s;
15
15
  }
16
- var Qe = Object.prototype, Ae = Qe.toString;
17
- function ke(r) {
18
- return Ae.call(r);
16
+ var et = Object.prototype, tt = et.toString;
17
+ function rt(r) {
18
+ return tt.call(r);
19
19
  }
20
- var et = "[object Null]", tt = "[object Undefined]", Ce = $ ? $.toStringTag : void 0;
21
- function je(r) {
22
- return r == null ? r === void 0 ? tt : et : Ce && Ce in Object(r) ? Je(r) : ke(r);
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 rt(r) {
24
+ function nt(r) {
25
25
  return r != null && typeof r == "object";
26
26
  }
27
- var it = "[object Symbol]";
28
- function k(r) {
29
- return typeof r == "symbol" || rt(r) && je(r) == it;
27
+ var ot = "[object Symbol]";
28
+ function te(r) {
29
+ return typeof r == "symbol" || nt(r) && $e(r) == ot;
30
30
  }
31
- function st(r, e) {
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 ee = Array.isArray, nt = 1 / 0, Se = $ ? $.prototype : void 0, Oe = Se ? Se.toString : void 0;
37
- function xe(r) {
36
+ var re = Array.isArray, lt = 1 / 0, we = M ? M.prototype : void 0, Fe = we ? we.toString : void 0;
37
+ function Me(r) {
38
38
  if (typeof r == "string")
39
39
  return r;
40
- if (ee(r))
41
- return st(r, xe) + "";
42
- if (k(r))
43
- return Oe ? Oe.call(r) : "";
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 == -nt ? "-0" : e;
45
+ return e == "0" && 1 / r == -lt ? "-0" : e;
46
46
  }
47
- function G(r) {
47
+ function B(r) {
48
48
  var e = typeof r;
49
49
  return r != null && (e == "object" || e == "function");
50
50
  }
51
- var ot = "[object AsyncFunction]", at = "[object Function]", lt = "[object GeneratorFunction]", ut = "[object Proxy]";
52
- function ft(r) {
53
- if (!G(r))
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 = je(r);
56
- return e == at || e == lt || e == ot || e == ut;
55
+ var e = $e(r);
56
+ return e == ft || e == ct || e == ut || e == dt;
57
57
  }
58
- var X = A["__core-js_shared__"], Ee = function() {
59
- var r = /[^.]+$/.exec(X && X.keys && X.keys.IE_PROTO || "");
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 ct(r) {
63
- return !!Ee && Ee in r;
64
- }
65
- var dt = Function.prototype, ht = dt.toString;
66
62
  function pt(r) {
63
+ return !!je && je in r;
64
+ }
65
+ var mt = Function.prototype, gt = mt.toString;
66
+ function bt(r) {
67
67
  if (r != null) {
68
68
  try {
69
- return ht.call(r);
69
+ return gt.call(r);
70
70
  } catch {
71
71
  }
72
72
  try {
@@ -76,181 +76,181 @@ function pt(r) {
76
76
  }
77
77
  return "";
78
78
  }
79
- var mt = /[\\^$.*+?()[\]{}|]/g, gt = /^\[object .+?Constructor\]$/, vt = Function.prototype, bt = Object.prototype, yt = vt.toString, _t = bt.hasOwnProperty, Pt = RegExp(
80
- "^" + yt.call(_t).replace(mt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
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 It(r) {
83
- if (!G(r) || ct(r))
82
+ function Et(r) {
83
+ if (!B(r) || pt(r))
84
84
  return !1;
85
- var e = ft(r) ? Pt : gt;
86
- return e.test(pt(r));
85
+ var e = ht(r) ? St : yt;
86
+ return e.test(bt(r));
87
87
  }
88
- function Ct(r, e) {
88
+ function Ot(r, e) {
89
89
  return r == null ? void 0 : r[e];
90
90
  }
91
- function te(r, e) {
92
- var t = Ct(r, e);
93
- return It(t) ? t : void 0;
91
+ function ie(r, e) {
92
+ var t = Ot(r, e);
93
+ return Et(t) ? t : void 0;
94
94
  }
95
- var we = function() {
95
+ var xe = function() {
96
96
  try {
97
- var r = te(Object, "defineProperty");
97
+ var r = ie(Object, "defineProperty");
98
98
  return r({}, "", {}), r;
99
99
  } catch {
100
100
  }
101
- }(), St = 9007199254740991, Ot = /^(?:0|[1-9]\d*)$/;
102
- function Et(r, e) {
101
+ }(), wt = 9007199254740991, Ft = /^(?:0|[1-9]\d*)$/;
102
+ function jt(r, e) {
103
103
  var t = typeof r;
104
- return e = e ?? St, !!e && (t == "number" || t != "symbol" && Ot.test(r)) && r > -1 && r % 1 == 0 && r < 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 wt(r, e, t) {
107
- e == "__proto__" && we ? we(r, e, {
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 Re(r, e) {
114
+ function Ve(r, e) {
115
115
  return r === e || r !== r && e !== e;
116
116
  }
117
- var Ft = Object.prototype, jt = Ft.hasOwnProperty;
118
- function xt(r, e, t) {
117
+ var Rt = Object.prototype, $t = Rt.hasOwnProperty;
118
+ function Mt(r, e, t) {
119
119
  var i = r[e];
120
- (!(jt.call(r, e) && Re(i, t)) || t === void 0 && !(e in r)) && wt(r, e, t);
120
+ (!($t.call(r, e) && Ve(i, t)) || t === void 0 && !(e in r)) && xt(r, e, t);
121
121
  }
122
- var Rt = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, $t = /^\w*$/;
123
- function Mt(r, e) {
124
- if (ee(r))
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 || k(r) ? !0 : $t.test(r) || !Rt.test(r) || e != null && r in Object(e);
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 z = te(Object, "create");
130
- function Vt() {
131
- this.__data__ = z ? z(null) : {}, this.size = 0;
129
+ var L = ie(Object, "create");
130
+ function Ut() {
131
+ this.__data__ = L ? L(null) : {}, this.size = 0;
132
132
  }
133
- function qt(r) {
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 Nt = "__lodash_hash_undefined__", Ut = Object.prototype, Tt = Ut.hasOwnProperty;
138
- function zt(r) {
137
+ var zt = "__lodash_hash_undefined__", Lt = Object.prototype, Ht = Lt.hasOwnProperty;
138
+ function Dt(r) {
139
139
  var e = this.__data__;
140
- if (z) {
140
+ if (L) {
141
141
  var t = e[r];
142
- return t === Nt ? void 0 : t;
142
+ return t === zt ? void 0 : t;
143
143
  }
144
- return Tt.call(e, r) ? e[r] : void 0;
144
+ return Ht.call(e, r) ? e[r] : void 0;
145
145
  }
146
- var Lt = Object.prototype, Ht = Lt.hasOwnProperty;
147
- function Dt(r) {
146
+ var Gt = Object.prototype, Bt = Gt.hasOwnProperty;
147
+ function Kt(r) {
148
148
  var e = this.__data__;
149
- return z ? e[r] !== void 0 : Ht.call(e, r);
149
+ return L ? e[r] !== void 0 : Bt.call(e, r);
150
150
  }
151
- var Gt = "__lodash_hash_undefined__";
152
- function Bt(r, e) {
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] = z && e === void 0 ? Gt : e, this;
154
+ return this.size += this.has(r) ? 0 : 1, t[r] = L && e === void 0 ? Wt : e, this;
155
155
  }
156
- function w(r) {
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
- w.prototype.clear = Vt;
164
- w.prototype.delete = qt;
165
- w.prototype.get = zt;
166
- w.prototype.has = Dt;
167
- w.prototype.set = Bt;
168
- function Kt() {
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 B(r, e) {
171
+ function K(r, e) {
172
172
  for (var t = r.length; t--; )
173
- if (Re(r[t][0], e))
173
+ if (Ve(r[t][0], e))
174
174
  return t;
175
175
  return -1;
176
176
  }
177
- var Wt = Array.prototype, Xt = Wt.splice;
178
- function Yt(r) {
179
- var e = this.__data__, t = B(e, r);
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() : Xt.call(e, t, 1), --this.size, !0;
183
+ return t == i ? e.pop() : Jt.call(e, t, 1), --this.size, !0;
184
184
  }
185
- function Zt(r) {
186
- var e = this.__data__, t = B(e, r);
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 Jt(r) {
190
- return B(this.__data__, r) > -1;
189
+ function kt(r) {
190
+ return K(this.__data__, r) > -1;
191
191
  }
192
- function Qt(r, e) {
193
- var t = this.__data__, i = B(t, r);
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
- function M(r) {
196
+ function V(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
- M.prototype.clear = Kt;
204
- M.prototype.delete = Yt;
205
- M.prototype.get = Zt;
206
- M.prototype.has = Jt;
207
- M.prototype.set = Qt;
208
- var At = te(A, "Map");
209
- function kt() {
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 w(),
212
- map: new (At || M)(),
213
- string: new w()
211
+ hash: new F(),
212
+ map: new (tr || V)(),
213
+ string: new F()
214
214
  };
215
215
  }
216
- function er(r) {
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 K(r, e) {
220
+ function W(r, e) {
221
221
  var t = r.__data__;
222
- return er(e) ? t[typeof e == "string" ? "string" : "hash"] : t.map;
222
+ return ir(e) ? t[typeof e == "string" ? "string" : "hash"] : t.map;
223
223
  }
224
- function tr(r) {
225
- var e = K(this, r).delete(r);
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 rr(r) {
229
- return K(this, r).get(r);
228
+ function nr(r) {
229
+ return W(this, r).get(r);
230
230
  }
231
- function ir(r) {
232
- return K(this, r).has(r);
231
+ function or(r) {
232
+ return W(this, r).has(r);
233
233
  }
234
- function sr(r, e) {
235
- var t = K(this, r), i = t.size;
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 F(r) {
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
- F.prototype.clear = kt;
246
- F.prototype.delete = tr;
247
- F.prototype.get = rr;
248
- F.prototype.has = ir;
249
- F.prototype.set = sr;
250
- var nr = "Expected a function";
251
- function re(r, e) {
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(nr);
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 (re.Cache || F)(), t;
261
+ return t.cache = new (se.Cache || j)(), t;
262
262
  }
263
- re.Cache = F;
264
- var or = 500;
265
- function ar(r) {
266
- var e = re(r, function(i) {
267
- return t.size === or && t.clear(), i;
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 lr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ur = /\\(\\)?/g, fr = ar(function(r) {
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(lr, function(t, i, s, n) {
274
- e.push(s ? n.replace(ur, "$1") : i || t);
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 cr(r) {
278
- return r == null ? "" : xe(r);
277
+ function pr(r) {
278
+ return r == null ? "" : Me(r);
279
279
  }
280
- function $e(r, e) {
281
- return ee(r) ? r : Mt(r, e) ? [r] : fr(cr(r));
280
+ function qe(r, e) {
281
+ return re(r) ? r : Nt(r, e) ? [r] : hr(pr(r));
282
282
  }
283
- var dr = 1 / 0;
284
- function Me(r) {
285
- if (typeof r == "string" || k(r))
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 == -dr ? "-0" : e;
288
+ return e == "0" && 1 / r == -mr ? "-0" : e;
289
289
  }
290
- function hr(r, e) {
291
- e = $e(e, r);
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[Me(e[t++])];
293
+ r = r[Ne(e[t++])];
294
294
  return t && t == i ? r : void 0;
295
295
  }
296
- function H(r, e, t) {
297
- var i = r == null ? void 0 : hr(r, e);
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 pr(r, e, t, i) {
301
- if (!G(r))
300
+ function br(r, e, t, i) {
301
+ if (!B(r))
302
302
  return r;
303
- e = $e(e, r);
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 = Me(e[s]), c = t;
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
309
  var h = u[f];
310
- c = i ? i(h, f, u) : void 0, c === void 0 && (c = G(h) ? h : Et(e[s + 1]) ? [] : {});
310
+ c = i ? i(h, f, u) : void 0, c === void 0 && (c = B(h) ? h : jt(e[s + 1]) ? [] : {});
311
311
  }
312
- xt(u, f, c), u = 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 : pr(r, e, t);
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
  }
@@ -384,18 +387,18 @@ class o {
384
387
  return !!e.__proform_raw_object;
385
388
  }
386
389
  }
387
- function v(r, ...e) {
390
+ function b(r, ...e) {
388
391
  return e.forEach((t) => {
389
392
  if (Array.isArray(t))
390
393
  Array.isArray(r) || (r = []), t.forEach((i, s) => {
391
- typeof i == "object" && i !== null ? r[s] = v(Array.isArray(i) ? [] : {}, i) : r[s] = i;
394
+ typeof i == "object" && i !== null ? r[s] = b(Array.isArray(i) ? [] : {}, i) : r[s] = i;
392
395
  });
393
396
  else
394
397
  for (const i in t)
395
- t.hasOwnProperty(i) && (typeof t[i] == "object" && t[i] !== null ? r[i] = v(r[i] || {}, t[i]) : r[i] = t[i]);
398
+ t.hasOwnProperty(i) && (typeof t[i] == "object" && t[i] !== null ? r[i] = b(r[i] || {}, t[i]) : r[i] = t[i]);
396
399
  }), r;
397
400
  }
398
- function P(r) {
401
+ function I(r) {
399
402
  const e = /* @__PURE__ */ new WeakMap();
400
403
  function t(i) {
401
404
  if (i === null || typeof i != "object")
@@ -433,13 +436,13 @@ function P(r) {
433
436
  }
434
437
  return t(r);
435
438
  }
436
- function Z(r, e) {
439
+ function Q(r, e) {
437
440
  return r.replace(/undefined/g, e);
438
441
  }
439
- class mr {
442
+ class vr {
440
443
  constructor(e) {
441
444
  l(this, "runtimeCore");
442
- l(this, "readonlyReactiveModel", L({}));
445
+ l(this, "readonlyReactiveModel", H({}));
443
446
  l(this, "shareHistory", /* @__PURE__ */ new Map());
444
447
  this.formCustomization = e;
445
448
  }
@@ -450,36 +453,36 @@ class mr {
450
453
  })), e;
451
454
  }
452
455
  setup(e) {
453
- return this.runtimeCore = e, this.readonlyReactiveModel.value = Ie(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;
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;
454
457
  }
455
458
  submit() {
456
459
  var i;
457
- const e = (i = d.getPreset(this.runtimeCore.ui)) == null ? void 0 : i.adapter, t = I.adapters[d.getUI(this.runtimeCore.ui)];
460
+ const e = (i = d.getPreset(this.runtimeCore.ui)) == null ? void 0 : i.adapter, t = C.adapters[d.getUI(this.runtimeCore.ui)];
458
461
  return (e == null ? void 0 : e.validateForm(this)) ?? (t == null ? void 0 : t.validateForm(this));
459
462
  }
460
463
  hydrate(e) {
461
- C(() => {
464
+ S(() => {
462
465
  this.runtimeCore.hydrateEffect.trackEffect(
463
466
  () => {
464
- U(e) ? E(
467
+ T(e) ? w(
465
468
  () => e.value,
466
469
  () => {
467
- v(this.runtimeCore.model.value, e.value);
470
+ b(this.runtimeCore.model.value, e.value);
468
471
  },
469
472
  {
470
473
  deep: !0,
471
474
  immediate: !0
472
475
  }
473
- ) : T(e) ? E(
476
+ ) : z(e) ? w(
474
477
  () => e,
475
478
  () => {
476
- v(this.runtimeCore.model.value, e);
479
+ b(this.runtimeCore.model.value, e);
477
480
  },
478
481
  {
479
482
  deep: !0,
480
483
  immediate: !0
481
484
  }
482
- ) : v(this.runtimeCore.model.value, e);
485
+ ) : b(this.runtimeCore.model.value, e);
483
486
  },
484
487
  {
485
488
  lazy: !1
@@ -488,24 +491,24 @@ class mr {
488
491
  });
489
492
  }
490
493
  share(e) {
491
- C(() => {
494
+ S(() => {
492
495
  Object.keys(e).forEach((t) => {
493
- U(e[t]) ? D(() => {
496
+ T(e[t]) ? G(() => {
494
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());
495
- }) : T(e[t]) ? D(() => {
498
+ }) : z(e[t]) ? G(() => {
496
499
  _(this.runtimeCore.shared, t, e[t]), this.shareHistory.get(t) !== e[t] && (this.shareHistory.set(t, e[t]), this.runtimeCore.processor.schemaEffect.triggerEffects());
497
500
  }) : (_(this.runtimeCore.shared, t, e[t]), this.shareHistory.get(t) !== e[t] && (this.shareHistory.set(t, e[t]), this.runtimeCore.processor.schemaEffect.triggerEffects()));
498
501
  });
499
502
  });
500
503
  }
501
504
  subscribeModel(e) {
502
- C(() => {
503
- const t = E(
505
+ S(() => {
506
+ const t = w(
504
507
  () => this.readonlyReactiveModel.value,
505
508
  (i) => {
506
509
  e(i, {
507
510
  stopSubscribe() {
508
- C(() => {
511
+ S(() => {
509
512
  t();
510
513
  });
511
514
  }
@@ -520,12 +523,12 @@ class mr {
520
523
  }
521
524
  resetModel() {
522
525
  var e;
523
- (e = this.runtimeCore) != null && e.model.value && (this.runtimeCore.model.value = P(
526
+ (e = this.runtimeCore) != null && e.model.value && (this.runtimeCore.model.value = I(
524
527
  this.runtimeCore.processor.stableModel
525
- ), this.readonlyReactiveModel.value = Ie(this.runtimeCore.model.value), this.runtimeCore.runtimeAdapter.clearValidate(this.runtimeCore));
528
+ ), this.readonlyReactiveModel.value = Ee(this.runtimeCore.model.value), this.runtimeCore.runtimeAdapter.clearValidate(this.runtimeCore));
526
529
  }
527
530
  }
528
- class J {
531
+ class A {
529
532
  constructor() {
530
533
  l(this, "effects", /* @__PURE__ */ new Set());
531
534
  l(this, "tempClonedEffects", /* @__PURE__ */ new Set());
@@ -544,7 +547,7 @@ class J {
544
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);
545
548
  }
546
549
  }
547
- class gr {
550
+ class yr {
548
551
  constructor(e) {
549
552
  l(this, "runtimeCore");
550
553
  l(this, "processedSchemas");
@@ -552,18 +555,18 @@ class gr {
552
555
  l(this, "getRuntimeMeta");
553
556
  l(this, "stableSchemas", []);
554
557
  l(this, "stableModel", {});
555
- l(this, "schemaPreset", I.schemaPreset);
556
- l(this, "componentPropsPreset", I.componentPropsPreset);
558
+ l(this, "schemaPreset", C.schemaPreset);
559
+ l(this, "componentPropsPreset", C.componentPropsPreset);
557
560
  l(this, "stableUpdaterProcessProgress");
558
561
  l(this, "stableUpdaterTimes", 0);
559
- l(this, "schemaEffect", new J());
560
- l(this, "defaultValueEffect", new J());
562
+ l(this, "schemaEffect", new A());
563
+ l(this, "defaultValueEffect", new A());
561
564
  l(this, "defaultValueInprogressMap", /* @__PURE__ */ new Map());
562
565
  l(this, "baseDefaultValueFunctionsLength");
563
566
  l(this, "isModelInitialized", !0);
564
567
  l(this, "schemaEffectHistory", /* @__PURE__ */ new Map());
565
568
  l(this, "stableUpdaterHistory", /* @__PURE__ */ new Map());
566
- this.runtimeCore = e, this.processedSchemas = e.schemas, this.processedModel = e.model, this.getRuntimeMeta = e.getRuntimeMeta.bind(e), E(
569
+ this.runtimeCore = e, this.processedSchemas = e.schemas, this.processedModel = e.model, this.getRuntimeMeta = e.getRuntimeMeta.bind(e), w(
567
570
  () => this.processedModel.value,
568
571
  () => {
569
572
  this.schemaEffect.triggerEffects();
@@ -601,7 +604,7 @@ class gr {
601
604
  // 派生过程,用于外部应用
602
605
  parseSchemas(e, t) {
603
606
  o.isArrayEmpty(this.processedSchemas.value) && (this.baseDefaultValueFunctionsLength = this.countFunctionDefaultValues(
604
- P(e)
607
+ I(e)
605
608
  ), this.processedSchemas.value = this.initSchemas(e)), this.parse(e, t);
606
609
  }
607
610
  parseStable(e) {
@@ -615,7 +618,7 @@ class gr {
615
618
  // 对于稳定初始化更新的抽象
616
619
  stableUpdater(e = [], t, i, s, n) {
617
620
  if (e.every(Boolean)) {
618
- const a = R(this.processedSchemas.value);
621
+ const a = $(this.processedSchemas.value);
619
622
  !o.isProcessInprogress(a) && o.isObjectEmpty(this.stableModel), !this.stableUpdaterHistory.get(
620
623
  `${t == null ? void 0 : t.key}parentIndex:${t == null ? void 0 : t.index}childIndex:${i}${s}${n}`
621
624
  ) && (this.stableUpdaterHistory.set(
@@ -636,11 +639,11 @@ class gr {
636
639
  const f = u.index, c = u.key, h = u.keyIndex;
637
640
  if (o.isUndefined(u.stable))
638
641
  return;
639
- const p = s.parseStable(u.stable), b = i == null ? void 0 : i.index, S = i == null ? void 0 : i.key;
642
+ const p = s.parseStable(u.stable), v = i == null ? void 0 : i.index, E = i == null ? void 0 : i.key;
640
643
  let y = p;
641
644
  if (o.isProcessInprogress(y) || (n[h] = !0), i) {
642
- const g = s.processedSchemas.value[b][S][f][c];
643
- g && o.isObject(g) && c !== "component" && (y = v(g, y)), s.processedSchemas.value[b][S][f][c] = y, s.stableUpdater(
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(
644
647
  n,
645
648
  i,
646
649
  t,
@@ -649,7 +652,7 @@ class gr {
649
652
  );
650
653
  } else {
651
654
  const g = s.processedSchemas.value[f][c];
652
- g && o.isObject(g) && c !== "component" && (y = v(g, y)), s.processedSchemas.value[f][c] = y, s.stableUpdater(
655
+ g && o.isObject(g) && c !== "component" && (y = b(g, y)), s.processedSchemas.value[f][c] = y, s.stableUpdater(
653
656
  n,
654
657
  i,
655
658
  t,
@@ -709,9 +712,9 @@ class gr {
709
712
  this.defaultValueInprogressMap.set(t[s], h), !o.isProcessInprogress(h) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
710
713
  this.defaultValueInprogressMap.values()
711
714
  ).every((p) => {
712
- var b;
713
- return !((b = p == null ? void 0 : p.includes) != null && b.call(p, "undefined"));
714
- }) ? (f(h), this.defaultValueEffect.clearEffects(), C(() => {
715
+ var v;
716
+ return !((v = p == null ? void 0 : p.includes) != null && v.call(p, "undefined"));
717
+ }) ? (f(h), this.defaultValueEffect.clearEffects(), S(() => {
715
718
  c();
716
719
  })) : f(h);
717
720
  },
@@ -725,9 +728,9 @@ class gr {
725
728
  this.defaultValueInprogressMap.set(t[s], h), !o.isProcessInprogress(h) && this.defaultValueInprogressMap.size === this.baseDefaultValueFunctionsLength && Array.from(
726
729
  this.defaultValueInprogressMap.values()
727
730
  ).every((p) => {
728
- var b;
729
- return !((b = p == null ? void 0 : p.includes) != null && b.call(p, "undefined"));
730
- }) ? (f(h), this.defaultValueEffect.clearEffects(), C(() => {
731
+ var v;
732
+ return !((v = p == null ? void 0 : p.includes) != null && v.call(p, "undefined"));
733
+ }) ? (f(h), this.defaultValueEffect.clearEffects(), S(() => {
731
734
  c();
732
735
  })) : f(h);
733
736
  },
@@ -757,13 +760,13 @@ class gr {
757
760
  }
758
761
  promiseFieldParser(e, t, i, s) {
759
762
  o.isPromise(e) ? e.then((n) => {
760
- o.isString(n) && (n = Z(n, "")), i && o.isObject(n) && !o.isNativeObject(n) ? this.objectParser({
763
+ o.isString(n) && (n = Q(n, "")), i && o.isObject(n) && !o.isNativeObject(n) ? this.objectParser({
761
764
  data: n,
762
765
  updater: t,
763
766
  index: s.rootIndex,
764
767
  parentMeta: s.parentMeta
765
768
  }) : t(n);
766
- }) : (o.isString(e) && (e = Z(e, "")), i && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
769
+ }) : (o.isString(e) && (e = Q(e, "")), i && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
767
770
  data: e,
768
771
  updater: t,
769
772
  index: s.rootIndex,
@@ -790,7 +793,7 @@ class gr {
790
793
  e.name.startsWith("__proform_onetime_") && (e.__proform_cached_result = n), this.promiseFieldParser(n, t, s, i);
791
794
  }
792
795
  else
793
- U(e) ? E(
796
+ T(e) ? w(
794
797
  () => e.value,
795
798
  () => {
796
799
  o.isUndefined(e.value) || (s && o.isObject(e.value) && !o.isNativeObject(e.value) ? this.objectParser({
@@ -804,7 +807,7 @@ class gr {
804
807
  immediate: !0,
805
808
  deep: !0
806
809
  }
807
- ) : T(e) ? E(
810
+ ) : z(e) ? w(
808
811
  () => e,
809
812
  () => {
810
813
  o.isUndefined(e) || (s && o.isObject(e) && !o.isNativeObject(e) ? this.objectParser({
@@ -828,12 +831,12 @@ class gr {
828
831
  modelProcessor(e) {
829
832
  e.map((t) => {
830
833
  this.createModel(t, this.processedModel.value);
831
- }), o.isObjectEmpty(this.stableModel) && this.stableUpdaterProcessProgress.every(Boolean) && this.defaultValueEffect.effects.size === 0 && C(() => {
832
- this.stableModel = P(this.processedModel.value), this.runtimeCore.hydrateEffect.triggerEffects(), this.runtimeCore.hydrateEffect.clearEffects();
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();
833
836
  });
834
837
  }
835
838
  setModel(e, t, i) {
836
- o.isFunction(t) ? _(e, t(), i) : v(e, {
839
+ o.isFunction(t) ? _(e, t(), i) : b(e, {
837
840
  [t]: i
838
841
  });
839
842
  }
@@ -842,11 +845,11 @@ class gr {
842
845
  this.createModel(i, t[e.field][0]);
843
846
  })), o.isGroupSchema(e) && e.children.forEach((i) => {
844
847
  this.createModel(i, t);
845
- }), o.isItemSchema(e) && C(() => {
848
+ }), o.isItemSchema(e) && S(() => {
846
849
  if ("defaultValue" in e)
847
850
  this.setModel(t, e.field, e.defaultValue);
848
851
  else {
849
- if (o.isFunction(e.field) && H(t, e.field()))
852
+ if (o.isFunction(e.field) && D(t, e.field()))
850
853
  return;
851
854
  if (o.isString(e.field) && t[e.field])
852
855
  return;
@@ -855,7 +858,7 @@ class gr {
855
858
  });
856
859
  }
857
860
  }
858
- class j {
861
+ class x {
859
862
  static getFormContainer({ ui: e } = {}) {
860
863
  return d.presets.uiPresets[e ?? d.presets.ui].container.Form;
861
864
  }
@@ -875,7 +878,7 @@ class j {
875
878
  return d.presets.uiPresets[e ?? d.presets.ui].container.ListItem;
876
879
  }
877
880
  }
878
- class vr {
881
+ class _r {
879
882
  constructor(e) {
880
883
  this.ui = e;
881
884
  }
@@ -885,48 +888,48 @@ class vr {
885
888
  }
886
889
  getRuntimeField(e) {
887
890
  var s;
888
- const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[d.getUI(this.ui)];
891
+ const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[d.getUI(this.ui)];
889
892
  return (t == null ? void 0 : t.getRuntimeField(e)) ?? (i == null ? void 0 : i.getRuntimeField(e));
890
893
  }
891
894
  getRuntimeRequired(e) {
892
895
  var s;
893
- const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[d.getUI(this.ui)];
896
+ const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[d.getUI(this.ui)];
894
897
  return (t == null ? void 0 : t.getRuntimeRequired(e)) ?? (i == null ? void 0 : i.getRuntimeRequired(e));
895
898
  }
896
899
  getFormModelPropName() {
897
900
  var i;
898
- const e = (i = d.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, t = I.adapters[d.getUI(this.ui)];
901
+ const e = (i = d.presets.uiPresets[this.ui]) == null ? void 0 : i.adapter, t = C.adapters[d.getUI(this.ui)];
899
902
  return (e == null ? void 0 : e.getFormModelPropName()) ?? (t == null ? void 0 : t.getFormModelPropName());
900
903
  }
901
904
  formComponentRenderer(e) {
902
905
  var s;
903
- const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[d.getUI(this.ui)];
906
+ const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[d.getUI(this.ui)];
904
907
  return (t == null ? void 0 : t.formComponentRenderer(e)) ?? (i == null ? void 0 : i.formComponentRenderer(e));
905
908
  }
906
909
  clearValidate(e) {
907
910
  var s;
908
- const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = I.adapters[d.getUI(this.ui)];
911
+ const t = (s = d.presets.uiPresets[this.ui]) == null ? void 0 : s.adapter, i = C.adapters[d.getUI(this.ui)];
909
912
  return (t == null ? void 0 : t.clearValidate(e)) ?? (i == null ? void 0 : i.clearValidate(e));
910
913
  }
911
914
  }
912
- function br(r) {
913
- return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !Be(r);
915
+ function Pr(r) {
916
+ return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !Xe(r);
914
917
  }
915
- class yr {
918
+ class Ir {
916
919
  constructor(e) {
917
- l(this, "schemas", L([]));
918
- l(this, "model", L({}));
920
+ l(this, "schemas", H([]));
921
+ l(this, "model", H({}));
919
922
  l(this, "processorBySchemaType", {
920
923
  item: this.runtimeItemProcessor.bind(this),
921
924
  group: this.runtimeGroupProcessor.bind(this),
922
925
  list: this.runtimeListProcessor.bind(this)
923
926
  });
924
- l(this, "formRef", L(null));
925
- l(this, "hydrateEffect", new J());
926
- l(this, "native", W({}));
927
+ l(this, "formRef", H(null));
928
+ l(this, "hydrateEffect", new A());
929
+ l(this, "native", Y({}));
927
930
  l(this, "grid", {});
928
931
  l(this, "runtime", {});
929
- l(this, "globalNativeFormOverride", W({
932
+ l(this, "globalNativeFormOverride", Y({
930
933
  props: {
931
934
  Form: {},
932
935
  FormItem: {}
@@ -936,11 +939,11 @@ class yr {
936
939
  FormItem: {}
937
940
  }
938
941
  }));
939
- l(this, "shared", W({}));
942
+ l(this, "shared", Y({}));
940
943
  l(this, "shareHistory", /* @__PURE__ */ new Map());
941
- this.setup = e, this.processor = new gr(this);
944
+ this.setup = e, this.processor = new yr(this);
942
945
  const t = this.setup(this);
943
- this.ui = t.ui ?? d.presets.ui, this.runtimeAdapter = new vr(this.ui), Object.assign(this.globalNativeFormOverride, this.runtimeAdapter.getRuntimeNative()), U(t.schemas) ? E(
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(
944
947
  // @ts-expect-error
945
948
  () => t.schemas.value,
946
949
  () => {
@@ -949,7 +952,7 @@ class yr {
949
952
  {
950
953
  deep: !0
951
954
  }
952
- ) : T(t.schemas) ? E(() => t.schemas, () => {
955
+ ) : z(t.schemas) ? w(() => t.schemas, () => {
953
956
  this.processor.parseSchemas(t.schemas);
954
957
  }, {
955
958
  deep: !0
@@ -957,16 +960,16 @@ class yr {
957
960
  }
958
961
  getRuntimeMeta() {
959
962
  return {
960
- model: R(P(this.model.value)),
963
+ model: $(I(this.model.value)),
961
964
  reactiveModel: this.model.value,
962
965
  shared: this.shared,
963
966
  // share 增加防抖,当开发者在过程中进行 share 时避免频繁触发爆栈
964
967
  share: (t) => {
965
- C(() => {
968
+ S(() => {
966
969
  Object.keys(t).forEach((i) => {
967
- U(t[i]) ? D(() => {
970
+ T(t[i]) ? G(() => {
968
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());
969
- }) : T(t[i]) ? D(() => {
972
+ }) : z(t[i]) ? G(() => {
970
973
  _(this.shared, i, t[i]), this.shareHistory.get(i) !== t[i] && (this.shareHistory.set(i, t[i]), this.processor.schemaEffect.triggerEffects());
971
974
  }) : (_(this.shared, i, t[i]), this.shareHistory.get(i) !== t[i] && (this.shareHistory.set(i, t[i]), this.processor.schemaEffect.triggerEffects()));
972
975
  });
@@ -975,50 +978,51 @@ class yr {
975
978
  };
976
979
  }
977
980
  runtimeItemProcessor(e, t, i = this.model.value, s) {
978
- var se, ne, oe, ae, le, ue, fe, ce, de, he, pe, me, ge, ve, be, ye, _e;
979
- const n = R(e.component);
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);
980
983
  if (!n)
981
984
  return;
982
- (ne = (se = e.native) == null ? void 0 : se.props) != null && ne.Form && v(this.globalNativeFormOverride.props.Form, (ae = (oe = e.native) == null ? void 0 : oe.props) == null ? void 0 : ae.Form), (ue = (le = e.native) == null ? void 0 : le.slots) != null && ue.Form && v(this.globalNativeFormOverride.slots.Form, (ce = (fe = e.native) == null ? void 0 : fe.slots) == null ? void 0 : ce.Form);
983
- const a = v(P((he = (de = this.native) == null ? void 0 : de.slots) == null ? void 0 : he.FormItem) ?? {}, (me = (pe = e.native) == null ? void 0 : pe.slots) == null ? void 0 : me.FormItem), u = {
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 = {
984
987
  display: "grid",
985
988
  gridColumn: "1 / -1",
986
989
  ...e.grid
987
- }, f = v(P((ve = (ge = this.native) == null ? void 0 : ge.props) == null ? void 0 : ve.FormItem) ?? {}, (ye = (be = e.native) == null ? void 0 : be.props) == null ? void 0 : ye.FormItem), c = this.runtimeAdapter.getRuntimeField({
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({
988
991
  schema: e,
989
992
  parentSchema: s,
990
993
  index: t
991
- }), h = n.name, p = e.componentProps ?? {}, b = I.placeholderPresetByComponentName;
992
- let S = e.placeholder, y = e.show;
994
+ }), h = n.name, p = e.componentProps ?? {}, v = C.placeholderPresetByComponentName;
995
+ let E = e.placeholder, y = e.show;
993
996
  y === void 0 && (y = !0);
994
997
  let g = e.label ?? "", O;
995
- if (e.runtime ? O = e.runtime : O = (s == null ? void 0 : s.runtime) ?? this.runtime, !o.isUndefined(t) && !o.isObjectEmpty(O) && (g = Z((_e = O == null ? void 0 : O.customizeListItemLabel) == null ? void 0 : _e.call(O, e.label ?? "", t + 1), "")), !S) {
996
- let V = "请输入";
997
- o.isUndefined(h) ? S = `${V}${g}` : /* @ts-expect-error */ b[h.toLowerCase()] ? (V = // @ts-expect-error
998
- b[h.toLowerCase()], S = `${V}${g}`) : (Object.keys(b).forEach((Pe) => {
999
- h.toLowerCase().includes(Pe.toLowerCase()) && (V = b[Pe]);
1000
- }), S = `${V}${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) {
999
+ let q = "请输入";
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}`);
1001
1004
  }
1002
- const Ve = this.runtimeAdapter.getRuntimeRequired({
1005
+ const Ue = this.runtimeAdapter.getRuntimeRequired({
1003
1006
  ...e,
1004
1007
  label: g
1005
- }), qe = j.getItemContainer(this), Ne = j.getFormItemContainer(this), Ue = this, Te = e.componentSlots;
1006
- return m("div", {
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", {
1007
1011
  style: u
1008
- }, [m(qe, {
1012
+ }, [m(Te, {
1009
1013
  show: y
1010
1014
  }, {
1011
1015
  default() {
1012
- return y && m(Ne, N(f, {
1013
- label: `${g ? `${g}:` : ""}`
1014
- }, c, Ve), {
1016
+ return y && m(ze, U(f, {
1017
+ label: `${g ? X : ""}`
1018
+ }, c, Ue), {
1015
1019
  default() {
1016
- return Ue.runtimeAdapter.formComponentRenderer({
1020
+ return Le.runtimeAdapter.formComponentRenderer({
1017
1021
  Component: n,
1018
1022
  schema: e,
1019
1023
  baseModel: i,
1020
- placeholder: S,
1021
- componentSlots: Te,
1024
+ placeholder: E,
1025
+ componentSlots: He,
1022
1026
  props: p
1023
1027
  });
1024
1028
  },
@@ -1033,19 +1037,19 @@ class yr {
1033
1037
  display: "grid",
1034
1038
  gridColumn: "1 / -1",
1035
1039
  ...e.grid
1036
- }, s = j.getGroupContainer(this);
1040
+ }, s = x.getGroupContainer(this);
1037
1041
  let n = e.show;
1038
1042
  return n === void 0 && (n = !0), m("div", {
1039
1043
  style: i
1040
1044
  }, [n && m(s, {
1041
1045
  schema: e
1042
- }, br(t = e.children.map((a) => this.runtimeItemProcessor(a))) ? t : {
1046
+ }, Pr(t = e.children.map((a) => this.runtimeItemProcessor(a))) ? t : {
1043
1047
  default: () => [t]
1044
1048
  })]);
1045
1049
  }
1046
1050
  addListItem(e) {
1047
1051
  var t;
1048
- console.log("this", this.processor.stableModel, e.field), (t = this.processor.stableModel[e.field]) != null && t[0] && this.model.value[e.field].push(P(this.processor.stableModel[e.field][0])), this.runtimeAdapter.clearValidate(this);
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);
1049
1053
  }
1050
1054
  deleteListItem(e, t) {
1051
1055
  this.model.value[e.field].splice(t, 1), this.runtimeAdapter.clearValidate(this);
@@ -1059,7 +1063,7 @@ class yr {
1059
1063
  i.model.value[e.field] || (i.model.value[e.field] = [{}]);
1060
1064
  let s = e.show;
1061
1065
  s === void 0 && (s = !0);
1062
- const n = j.getListContainer(this), a = j.getListItemContainer(this);
1066
+ const n = x.getListContainer(this), a = x.getListItemContainer(this);
1063
1067
  return m("div", {
1064
1068
  style: t
1065
1069
  }, [s && m(n, {
@@ -1075,16 +1079,16 @@ class yr {
1075
1079
  } = {}) {
1076
1080
  var p;
1077
1081
  const h = c ?? m("button", null, null);
1078
- return He(m(h, {
1082
+ return Be(m(h, {
1079
1083
  onClick: () => i.deleteListItem(e, f)
1080
- }, null), [[De, ((p = i.model.value[e.field]) == null ? void 0 : p.length) > 1]]);
1084
+ }, null), [[Ke, ((p = i.model.value[e.field]) == null ? void 0 : p.length) > 1]]);
1081
1085
  }
1082
1086
  }));
1083
1087
  },
1084
1088
  add({
1085
1089
  container: u
1086
1090
  } = {}) {
1087
- const f = u ?? m("button", null, [Ge("添加")]);
1091
+ const f = u ?? m("button", null, [We("添加")]);
1088
1092
  return m(f, {
1089
1093
  onClick: () => i.addListItem(e)
1090
1094
  }, null);
@@ -1101,8 +1105,8 @@ class yr {
1101
1105
  gridColumn: "1 / -1",
1102
1106
  gridAutoColumns: "1fr",
1103
1107
  ...this.grid
1104
- }, t = this, i = v(this.globalNativeFormOverride.props.Form, P((f = (u = this.native) == null ? void 0 : u.props) == null ? void 0 : f.Form) ?? {}), s = v(this.globalNativeFormOverride.slots.Form, P((h = (c = this.native) == null ? void 0 : c.slots) == null ? void 0 : h.Form) ?? {}), n = j.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
1105
- return m(n, N(i, {
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, {
1106
1110
  ref: this.formRef
1107
1111
  }, {
1108
1112
  [a]: this.model.value
@@ -1127,17 +1131,17 @@ class d {
1127
1131
  }
1128
1132
  }
1129
1133
  l(d, "presets");
1130
- function Y({
1134
+ function J({
1131
1135
  parentSchema: r,
1132
1136
  schema: e,
1133
1137
  index: t
1134
1138
  }) {
1135
1139
  return r ? `${r.field}.${t}.${e.field}` : e.field;
1136
1140
  }
1137
- const _r = {
1141
+ const Cr = {
1138
1142
  ArcoVue: {
1139
1143
  getRuntimeField(r) {
1140
- const e = Y(r);
1144
+ const e = J(r);
1141
1145
  return o.isFunction(e) ? {
1142
1146
  field: e()
1143
1147
  } : {
@@ -1181,7 +1185,7 @@ const _r = {
1181
1185
  props: n
1182
1186
  }) {
1183
1187
  let a;
1184
- return o.isFunction(t.field) ? a = H(e, t.field()) : a = e[t.field], m(r, N({
1188
+ return o.isFunction(t.field) ? a = D(e, t.field()) : a = e[t.field], m(r, U({
1185
1189
  modelValue: a,
1186
1190
  "onUpdate:modelValue": (u) => {
1187
1191
  o.isFunction(t.field) ? _(e, t.field(), u) : e[t.field] = u;
@@ -1193,7 +1197,7 @@ const _r = {
1193
1197
  },
1194
1198
  validateForm(r) {
1195
1199
  return new Promise((e, t) => {
1196
- r.runtimeCore.formRef.value.validate((i) => i ? t(i) : e(r.cleanFallbackFields(R(r.runtimeCore.processor.processedModel.value))));
1200
+ r.runtimeCore.formRef.value.validate((i) => i ? t(i) : e(r.cleanFallbackFields($(r.runtimeCore.processor.processedModel.value))));
1197
1201
  });
1198
1202
  },
1199
1203
  clearValidate(r) {
@@ -1203,7 +1207,7 @@ const _r = {
1203
1207
  },
1204
1208
  NutUI: {
1205
1209
  getRuntimeField(r) {
1206
- const e = Y(r);
1210
+ const e = J(r);
1207
1211
  return o.isFunction(e) ? {
1208
1212
  prop: e()
1209
1213
  } : {
@@ -1248,7 +1252,7 @@ const _r = {
1248
1252
  props: n
1249
1253
  }) {
1250
1254
  let a;
1251
- return o.isFunction(t.field) ? a = H(e, t.field()) : a = e[t.field], m(r, N({
1255
+ return o.isFunction(t.field) ? a = D(e, t.field()) : a = e[t.field], m(r, U({
1252
1256
  modelValue: a,
1253
1257
  "onUpdate:modelValue": (u) => {
1254
1258
  o.isFunction(t.field) ? _(e, t.field(), u) : e[t.field] = u;
@@ -1264,7 +1268,7 @@ const _r = {
1264
1268
  valid: i,
1265
1269
  errors: s
1266
1270
  }) => {
1267
- i ? e(r.cleanFallbackFields(R(r.runtimeCore.processor.processedModel.value))) : t(s);
1271
+ i ? e(r.cleanFallbackFields($(r.runtimeCore.processor.processedModel.value))) : t(s);
1268
1272
  });
1269
1273
  });
1270
1274
  },
@@ -1275,7 +1279,7 @@ const _r = {
1275
1279
  },
1276
1280
  NaiveUI: {
1277
1281
  getRuntimeField(r) {
1278
- const e = Y(r);
1282
+ const e = J(r);
1279
1283
  return o.isFunction(e) ? {
1280
1284
  path: e()
1281
1285
  } : {
@@ -1322,7 +1326,7 @@ const _r = {
1322
1326
  props: n
1323
1327
  }) {
1324
1328
  let a;
1325
- return o.isFunction(t.field) ? a = H(e, t.field()) : a = e[t.field], m(r, N({
1329
+ return o.isFunction(t.field) ? a = D(e, t.field()) : a = e[t.field], m(r, U({
1326
1330
  value: a,
1327
1331
  "onUpdate:value": (u) => {
1328
1332
  o.isFunction(t.field) ? _(e, t.field(), u) : e[t.field] = u;
@@ -1334,7 +1338,7 @@ const _r = {
1334
1338
  },
1335
1339
  validateForm(r) {
1336
1340
  return new Promise((e, t) => {
1337
- r.runtimeCore.formRef.value.validate((i) => i ? t(i) : e(r.cleanFallbackFields(R(r.runtimeCore.processor.processedModel.value))));
1341
+ r.runtimeCore.formRef.value.validate((i) => i ? t(i) : e(r.cleanFallbackFields($(r.runtimeCore.processor.processedModel.value))));
1338
1342
  });
1339
1343
  },
1340
1344
  clearValidate(r) {
@@ -1342,7 +1346,7 @@ const _r = {
1342
1346
  (t = (e = r.formRef.value) == null ? void 0 : e.restoreValidation) == null || t.call(e);
1343
1347
  }
1344
1348
  }
1345
- }, x = class x {
1349
+ }, R = class R {
1346
1350
  static getPlaceholderPrefixPresetByComponentName() {
1347
1351
  const e = {
1348
1352
  请选择: ["select", "tree"],
@@ -1355,7 +1359,7 @@ const _r = {
1355
1359
  return t;
1356
1360
  }
1357
1361
  };
1358
- l(x, "schemaPreset", {
1362
+ l(R, "schemaPreset", {
1359
1363
  type: {
1360
1364
  defaultValue: "item"
1361
1365
  },
@@ -1401,19 +1405,19 @@ l(x, "schemaPreset", {
1401
1405
  runtime: {
1402
1406
  default: void 0
1403
1407
  }
1404
- }), l(x, "componentPropsPreset", {
1408
+ }), l(R, "componentPropsPreset", {
1405
1409
  options: {
1406
1410
  defaultValue: []
1407
1411
  }
1408
1412
  }), // 基于基本功能提出基本预设
1409
- l(x, "placeholderPresetByComponentName", x.getPlaceholderPrefixPresetByComponentName());
1410
- let Q = x;
1411
- const I = {
1412
- ...Q,
1413
+ l(R, "placeholderPresetByComponentName", R.getPlaceholderPrefixPresetByComponentName());
1414
+ let k = R;
1415
+ const C = {
1416
+ ...k,
1413
1417
  adapters: {
1414
- ..._r
1418
+ ...Cr
1415
1419
  }
1416
- }, Cr = /* @__PURE__ */ Ke({
1420
+ }, Or = /* @__PURE__ */ Ye({
1417
1421
  props: {
1418
1422
  setup: {
1419
1423
  type: Function,
@@ -1421,12 +1425,12 @@ const I = {
1421
1425
  }
1422
1426
  },
1423
1427
  setup(r) {
1424
- const e = new yr(r.setup);
1428
+ const e = new Ir(r.setup);
1425
1429
  return () => e.exec();
1426
1430
  }
1427
1431
  });
1428
- function Sr(r) {
1429
- const e = new mr(r);
1432
+ function wr(r) {
1433
+ const e = new vr(r);
1430
1434
  return [
1431
1435
  e.setup.bind(e),
1432
1436
  {
@@ -1438,10 +1442,10 @@ function Sr(r) {
1438
1442
  }
1439
1443
  ];
1440
1444
  }
1441
- function Or(r) {
1445
+ function Fr(r) {
1442
1446
  d.presets = r;
1443
1447
  }
1444
- function ie(r, e) {
1448
+ function ne(r, e) {
1445
1449
  return e === "native" && Object.defineProperty(r, "name", {
1446
1450
  value: `__proform_raw_${r.name}`,
1447
1451
  writable: !0
@@ -1453,31 +1457,31 @@ function ie(r, e) {
1453
1457
  writable: !0
1454
1458
  }), r;
1455
1459
  }
1456
- function Er(r) {
1457
- return ie(r, "native");
1460
+ function jr(r) {
1461
+ return ne(r, "native");
1458
1462
  }
1459
- function wr(r) {
1463
+ function xr(r) {
1460
1464
  return r.__proform_raw_object = !0, r;
1461
1465
  }
1462
- function Fr(r) {
1463
- return ie(r, "onetime");
1466
+ function Rr(r) {
1467
+ return ne(r, "onetime");
1464
1468
  }
1465
- function jr(r) {
1469
+ function $r(r) {
1466
1470
  function e() {
1467
1471
  return r;
1468
1472
  }
1469
- return ie(
1473
+ return ne(
1470
1474
  e,
1471
1475
  "structured_path_parsing_mark"
1472
1476
  );
1473
1477
  }
1474
1478
  export {
1475
- Cr as ProForm,
1476
- Er as markNativeFunction,
1477
- wr as markNativeObject,
1478
- Fr as markOnetimeFunction,
1479
- jr as markStructuredPathParsing,
1480
- Sr as useForm,
1481
- Or as useFormPresetConfigurer,
1482
- ie as useModifiers
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
1483
1487
  };
@@ -1,4 +1,4 @@
1
- import { AdaptedInterface, NativeCustomizationOptions } from ".";
1
+ import { AdaptedInterface, DisplayOptions, NativeCustomizationOptions } from ".";
2
2
  import { AnyObject } from "./utilTypes";
3
3
  export type DomType = new (...args: any) => AnyObject & {
4
4
  $props: AnyObject;
@@ -15,6 +15,7 @@ export interface FormPreset {
15
15
  };
16
16
  adapter?: AdaptedInterface;
17
17
  native?: NativeCustomizationOptions;
18
+ display?: DisplayOptions;
18
19
  }
19
20
  export type UIName = "ArcoVue" | "NutUI" | "NaiveUI" | (string & {});
20
21
  export type AdaptedInterfacePreset = Record<UIName, AdaptedInterface>;
@@ -119,4 +119,7 @@ export type NativeCustomizationOptions = {
119
119
  FormItem?: AnyObject;
120
120
  };
121
121
  };
122
+ export type DisplayOptions = {
123
+ labelPrefix: string;
124
+ };
122
125
  export {};
@@ -8,6 +8,7 @@ export default class IS {
8
8
  static isObject(data: any): data is AnyObject;
9
9
  static isAsyncFunction(data: any): data is (...args: any) => Promise<any>;
10
10
  static isUndefined(data: any): data is undefined;
11
+ static isNull(data: any): data is null;
11
12
  static isArrayEmpty(data: any[]): boolean;
12
13
  static isObjectEmpty(data: Record<PropertyKey, any>): boolean;
13
14
  static isListSchema(data: any): data is ListSchema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harbor-design/proform",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",