@pdfme/ui 5.4.6-dev.26 → 5.4.6-dev.29

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.es.js CHANGED
@@ -5217,28 +5217,26 @@ function flattenError(a, s = (c) => c.message) {
5217
5217
  d.path.length > 0 ? (c[d.path[0]] = c[d.path[0]] || [], c[d.path[0]].push(s(d))) : u.push(s(d));
5218
5218
  return { formErrors: u, fieldErrors: c };
5219
5219
  }
5220
- function formatError(a, s) {
5221
- const c = s || function(p) {
5222
- return p.message;
5223
- }, u = { _errors: [] }, d = (p) => {
5224
- for (const v of p.issues)
5225
- if (v.code === "invalid_union" && v.errors.length)
5226
- v.errors.map((A) => d({ issues: A }));
5227
- else if (v.code === "invalid_key")
5228
- d({ issues: v.issues });
5229
- else if (v.code === "invalid_element")
5230
- d({ issues: v.issues });
5231
- else if (v.path.length === 0)
5232
- u._errors.push(c(v));
5220
+ function formatError(a, s = (c) => c.message) {
5221
+ const c = { _errors: [] }, u = (d) => {
5222
+ for (const p of d.issues)
5223
+ if (p.code === "invalid_union" && p.errors.length)
5224
+ p.errors.map((v) => u({ issues: v }));
5225
+ else if (p.code === "invalid_key")
5226
+ u({ issues: p.issues });
5227
+ else if (p.code === "invalid_element")
5228
+ u({ issues: p.issues });
5229
+ else if (p.path.length === 0)
5230
+ c._errors.push(s(p));
5233
5231
  else {
5234
- let A = u, x = 0;
5235
- for (; x < v.path.length; ) {
5236
- const g = v.path[x];
5237
- x === v.path.length - 1 ? (A[g] = A[g] || { _errors: [] }, A[g]._errors.push(c(v))) : A[g] = A[g] || { _errors: [] }, A = A[g], x++;
5232
+ let v = c, A = 0;
5233
+ for (; A < p.path.length; ) {
5234
+ const x = p.path[A];
5235
+ A === p.path.length - 1 ? (v[x] = v[x] || { _errors: [] }, v[x]._errors.push(s(p))) : v[x] = v[x] || { _errors: [] }, v = v[x], A++;
5238
5236
  }
5239
5237
  }
5240
5238
  };
5241
- return d(a), u;
5239
+ return u(a), c;
5242
5240
  }
5243
5241
  const _parse = (a) => (s, c, u, d) => {
5244
5242
  const p = u ? Object.assign(u, { async: !1 }) : { async: !1 }, v = s._zod.run({ value: c, issues: [] }, p);
@@ -5603,7 +5601,7 @@ class Doc {
5603
5601
  const version$3 = {
5604
5602
  major: 4,
5605
5603
  minor: 1,
5606
- patch: 11
5604
+ patch: 12
5607
5605
  }, $ZodType = /* @__PURE__ */ $constructor("$ZodType", (a, s) => {
5608
5606
  var c;
5609
5607
  a ?? (a = {}), a._zod.def = s, a._zod.bag = a._zod.bag || {}, a._zod.version = version$3;