@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 +17 -19
- package/dist/index.umd.js +2 -2
- package/package.json +2 -2
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 =
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
if (
|
|
5226
|
-
|
|
5227
|
-
else if (
|
|
5228
|
-
|
|
5229
|
-
else if (
|
|
5230
|
-
|
|
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
|
|
5235
|
-
for (;
|
|
5236
|
-
const
|
|
5237
|
-
|
|
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
|
|
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:
|
|
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;
|