@harbor-design/proform 1.4.6 → 1.4.8

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.
Files changed (2) hide show
  1. package/dist/index.js +50 -43
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -33,14 +33,14 @@ function at(r, e) {
33
33
  s[t] = e(r[t], t, r);
34
34
  return s;
35
35
  }
36
- var re = Array.isArray, lt = 1 / 0, we = M ? M.prototype : void 0, Fe = we ? we.toString : void 0;
36
+ var re = Array.isArray, lt = 1 / 0, we = M ? M.prototype : void 0, xe = we ? we.toString : void 0;
37
37
  function Me(r) {
38
38
  if (typeof r == "string")
39
39
  return r;
40
40
  if (re(r))
41
41
  return at(r, Me) + "";
42
42
  if (te(r))
43
- return Fe ? Fe.call(r) : "";
43
+ return xe ? xe.call(r) : "";
44
44
  var e = r + "";
45
45
  return e == "0" && 1 / r == -lt ? "-0" : e;
46
46
  }
@@ -55,12 +55,12 @@ function ht(r) {
55
55
  var e = $e(r);
56
56
  return e == ft || e == ct || e == ut || e == dt;
57
57
  }
58
- var Z = ee["__core-js_shared__"], je = function() {
58
+ var Z = ee["__core-js_shared__"], Fe = function() {
59
59
  var r = /[^.]+$/.exec(Z && Z.keys && Z.keys.IE_PROTO || "");
60
60
  return r ? "Symbol(src)_1." + r : "";
61
61
  }();
62
62
  function pt(r) {
63
- return !!je && je in r;
63
+ return !!Fe && Fe in r;
64
64
  }
65
65
  var mt = Function.prototype, gt = mt.toString;
66
66
  function bt(r) {
@@ -92,19 +92,19 @@ function ie(r, e) {
92
92
  var t = Ot(r, e);
93
93
  return Et(t) ? t : void 0;
94
94
  }
95
- var xe = function() {
95
+ var je = function() {
96
96
  try {
97
97
  var r = ie(Object, "defineProperty");
98
98
  return r({}, "", {}), r;
99
99
  } catch {
100
100
  }
101
- }(), wt = 9007199254740991, Ft = /^(?:0|[1-9]\d*)$/;
102
- function jt(r, e) {
101
+ }(), wt = 9007199254740991, xt = /^(?:0|[1-9]\d*)$/;
102
+ function Ft(r, e) {
103
103
  var t = typeof r;
104
- return e = e ?? wt, !!e && (t == "number" || t != "symbol" && Ft.test(r)) && r > -1 && r % 1 == 0 && r < e;
104
+ return e = e ?? wt, !!e && (t == "number" || t != "symbol" && xt.test(r)) && r > -1 && r % 1 == 0 && r < e;
105
105
  }
106
- function xt(r, e, t) {
107
- e == "__proto__" && xe ? xe(r, e, {
106
+ function jt(r, e, t) {
107
+ e == "__proto__" && je ? je(r, e, {
108
108
  configurable: !0,
109
109
  enumerable: !0,
110
110
  value: t,
@@ -117,7 +117,7 @@ function Ve(r, e) {
117
117
  var Rt = Object.prototype, $t = Rt.hasOwnProperty;
118
118
  function Mt(r, e, t) {
119
119
  var i = r[e];
120
- (!($t.call(r, e) && Ve(i, t)) || t === void 0 && !(e in r)) && xt(r, e, t);
120
+ (!($t.call(r, e) && Ve(i, t)) || t === void 0 && !(e in r)) && jt(r, e, t);
121
121
  }
122
122
  var Vt = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Nt = /^\w*$/;
123
123
  function qt(r, e) {
@@ -153,18 +153,18 @@ function Xt(r, e) {
153
153
  var t = this.__data__;
154
154
  return this.size += this.has(r) ? 0 : 1, t[r] = L && e === void 0 ? Wt : e, this;
155
155
  }
156
- function F(r) {
156
+ function x(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
- F.prototype.clear = Ut;
164
- F.prototype.delete = Tt;
165
- F.prototype.get = Dt;
166
- F.prototype.has = Kt;
167
- F.prototype.set = Xt;
163
+ x.prototype.clear = Ut;
164
+ x.prototype.delete = Tt;
165
+ x.prototype.get = Dt;
166
+ x.prototype.has = Kt;
167
+ x.prototype.set = Xt;
168
168
  function Yt() {
169
169
  this.__data__ = [], this.size = 0;
170
170
  }
@@ -208,9 +208,9 @@ V.prototype.set = er;
208
208
  var tr = ie(ee, "Map");
209
209
  function rr() {
210
210
  this.size = 0, this.__data__ = {
211
- hash: new F(),
211
+ hash: new x(),
212
212
  map: new (tr || V)(),
213
- string: new F()
213
+ string: new x()
214
214
  };
215
215
  }
216
216
  function ir(r) {
@@ -235,18 +235,18 @@ function ar(r, e) {
235
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 j(r) {
238
+ function F(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
- j.prototype.clear = rr;
246
- j.prototype.delete = sr;
247
- j.prototype.get = nr;
248
- j.prototype.has = or;
249
- j.prototype.set = ar;
245
+ F.prototype.clear = rr;
246
+ F.prototype.delete = sr;
247
+ F.prototype.get = nr;
248
+ F.prototype.has = or;
249
+ F.prototype.set = ar;
250
250
  var lr = "Expected a function";
251
251
  function se(r, e) {
252
252
  if (typeof r != "function" || e != null && typeof e != "function")
@@ -258,9 +258,9 @@ function se(r, e) {
258
258
  var a = r.apply(this, i);
259
259
  return t.cache = n.set(s, a) || n, a;
260
260
  };
261
- return t.cache = new (se.Cache || j)(), t;
261
+ return t.cache = new (se.Cache || F)(), t;
262
262
  }
263
- se.Cache = j;
263
+ se.Cache = F;
264
264
  var ur = 500;
265
265
  function fr(r) {
266
266
  var e = se(r, function(i) {
@@ -307,7 +307,7 @@ function br(r, e, t, i) {
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 = B(h) ? h : jt(e[s + 1]) ? [] : {});
310
+ c = i ? i(h, f, u) : void 0, c === void 0 && (c = B(h) ? h : Ft(e[s + 1]) ? [] : {});
311
311
  }
312
312
  Mt(u, f, c), u = u[f];
313
313
  }
@@ -372,8 +372,12 @@ class o {
372
372
  for (const t in e) {
373
373
  if (t === "componentProps")
374
374
  return !1;
375
- if (e.hasOwnProperty(t) && this.isProcessInprogress(e[t]))
376
- return !0;
375
+ if (e.hasOwnProperty(t)) {
376
+ if (e[t] instanceof Date)
377
+ return !1;
378
+ if (this.isProcessInprogress(e[t]))
379
+ return !0;
380
+ }
377
381
  }
378
382
  } else if (this.isArray(e)) {
379
383
  if (this.isArrayEmpty(e))
@@ -391,11 +395,14 @@ function b(r, ...e) {
391
395
  return e.forEach((t) => {
392
396
  if (Array.isArray(t))
393
397
  Array.isArray(r) || (r = []), t.forEach((i, s) => {
394
- typeof i == "object" && i !== null ? r[s] = b(Array.isArray(i) ? [] : {}, i) : r[s] = i;
398
+ typeof i == "object" && i !== null && !(i instanceof Date) ? r[s] = b(Array.isArray(i) ? [] : {}, i) : r[s] = i;
395
399
  });
396
400
  else
397
401
  for (const i in t)
398
- t.hasOwnProperty(i) && (typeof t[i] == "object" && t[i] !== null ? r[i] = b(r[i] || {}, t[i]) : r[i] = t[i]);
402
+ t.hasOwnProperty(i) && (typeof t[i] == "object" && t[i] !== null && !(t[i] instanceof Date) && !(t[i] instanceof RegExp) ? r[i] = b(
403
+ r[i] || (Array.isArray(t[i]) ? [] : {}),
404
+ t[i]
405
+ ) : r[i] = t[i]);
399
406
  }), r;
400
407
  }
401
408
  function I(r) {
@@ -858,7 +865,7 @@ class yr {
858
865
  });
859
866
  }
860
867
  }
861
- class x {
868
+ class j {
862
869
  static getFormContainer({ ui: e } = {}) {
863
870
  return d.presets.uiPresets[e ?? d.presets.ui].container.Form;
864
871
  }
@@ -1005,7 +1012,7 @@ class Ir {
1005
1012
  const Ue = this.runtimeAdapter.getRuntimeRequired({
1006
1013
  ...e,
1007
1014
  label: g
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;
1015
+ }), Te = j.getItemContainer(this), ze = j.getFormItemContainer(this), Le = this, He = e.componentSlots, P = (Ce = d.presets.uiPresets[this.ui]) == null ? void 0 : Ce.display;
1009
1016
  let X;
1010
1017
  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", {
1011
1018
  style: u
@@ -1037,7 +1044,7 @@ class Ir {
1037
1044
  display: "grid",
1038
1045
  gridColumn: "1 / -1",
1039
1046
  ...e.grid
1040
- }, s = x.getGroupContainer(this);
1047
+ }, s = j.getGroupContainer(this);
1041
1048
  let n = e.show;
1042
1049
  return n === void 0 && (n = !0), m("div", {
1043
1050
  style: i
@@ -1063,7 +1070,7 @@ class Ir {
1063
1070
  i.model.value[e.field] || (i.model.value[e.field] = [{}]);
1064
1071
  let s = e.show;
1065
1072
  s === void 0 && (s = !0);
1066
- const n = x.getListContainer(this), a = x.getListItemContainer(this);
1073
+ const n = j.getListContainer(this), a = j.getListItemContainer(this);
1067
1074
  return m("div", {
1068
1075
  style: t
1069
1076
  }, [s && m(n, {
@@ -1105,7 +1112,7 @@ class Ir {
1105
1112
  gridColumn: "1 / -1",
1106
1113
  gridAutoColumns: "1fr",
1107
1114
  ...this.grid
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();
1115
+ }, 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 = j.getFormContainer(this), a = this.runtimeAdapter.getFormModelPropName();
1109
1116
  return m(n, U(i, {
1110
1117
  ref: this.formRef
1111
1118
  }, {
@@ -1442,7 +1449,7 @@ function wr(r) {
1442
1449
  }
1443
1450
  ];
1444
1451
  }
1445
- function Fr(r) {
1452
+ function xr(r) {
1446
1453
  d.presets = r;
1447
1454
  }
1448
1455
  function ne(r, e) {
@@ -1457,10 +1464,10 @@ function ne(r, e) {
1457
1464
  writable: !0
1458
1465
  }), r;
1459
1466
  }
1460
- function jr(r) {
1467
+ function Fr(r) {
1461
1468
  return ne(r, "native");
1462
1469
  }
1463
- function xr(r) {
1470
+ function jr(r) {
1464
1471
  return r.__proform_raw_object = !0, r;
1465
1472
  }
1466
1473
  function Rr(r) {
@@ -1477,11 +1484,11 @@ function $r(r) {
1477
1484
  }
1478
1485
  export {
1479
1486
  Or as ProForm,
1480
- jr as markNativeFunction,
1481
- xr as markNativeObject,
1487
+ Fr as markNativeFunction,
1488
+ jr as markNativeObject,
1482
1489
  Rr as markOnetimeFunction,
1483
1490
  $r as markStructuredPathParsing,
1484
1491
  wr as useForm,
1485
- Fr as useFormPresetConfigurer,
1492
+ xr as useFormPresetConfigurer,
1486
1493
  ne as useModifiers
1487
1494
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harbor-design/proform",
3
- "version": "1.4.6",
3
+ "version": "1.4.8",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",