@tempots/beatui 1.4.0 → 1.5.0
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/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +1 -1
- package/dist/{auth-divider-D_3gKZ6g.js → auth-divider-BIATan1F.js} +3 -3
- package/dist/{auth-divider-itm5-j5G.cjs → auth-divider-CVKfA8Cp.cjs} +1 -1
- package/dist/beatui.css +393 -36
- package/dist/beatui.tailwind.css +393 -36
- package/dist/better-auth/index.cjs.js +1 -1
- package/dist/better-auth/index.es.js +2 -2
- package/dist/deep-merge-B33Qtlmw.cjs +1 -0
- package/dist/{deep-merge-CzZVsVF-.js → deep-merge-BUsrE2v4.js} +130 -130
- package/dist/{duration-input-BrYLC1js.cjs → duration-input-C5il_E0F.cjs} +1 -1
- package/dist/{duration-input-CFu6vq-y.js → duration-input-DoCCrqOG.js} +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +5609 -5130
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +107 -107
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +3 -3
- package/dist/{modal-YKqlh4Dk.js → modal-BHlp4QeT.js} +1 -1
- package/dist/{modal-DCxNGrzk.cjs → modal-BmpfNL48.cjs} +1 -1
- package/dist/{notice-Q0A1gIho.cjs → notice-BBnSXYUc.cjs} +1 -1
- package/dist/{notice-Du3tWJTW.js → notice-BXKtBEiC.js} +1 -1
- package/dist/types/components/data/data-table-context.d.ts +9 -1
- package/dist/types/components/data/data-table-row-details.d.ts +21 -0
- package/dist/types/components/data/data-table-types.d.ts +23 -0
- package/dist/types/components/data/index.d.ts +1 -0
- package/dist/types/components/form/control/control.d.ts +5 -5
- package/dist/types/components/form/control/list-control.d.ts +11 -11
- package/dist/types/components/form/fieldset/fieldset.d.ts +60 -0
- package/dist/types/components/form/fieldset/index.d.ts +1 -0
- package/dist/types/components/form/index.d.ts +1 -0
- package/dist/types/components/form/input/combobox-input.d.ts +2 -2
- package/dist/types/components/form/input/combobox-tags-input.d.ts +1 -1
- package/dist/types/components/form/input/date-time-input.d.ts +1 -1
- package/dist/types/components/form/input/dropdown-input.d.ts +2 -2
- package/dist/types/components/form/input/field-layout.d.ts +64 -0
- package/dist/types/components/form/input/{input-wrapper.d.ts → field.d.ts} +23 -14
- package/dist/types/components/form/input/index.d.ts +2 -1
- package/dist/types/components/form/input/multi-select.d.ts +2 -2
- package/dist/types/components/form/input/native-select.d.ts +1 -1
- package/dist/types/components/form/input/range-slider.d.ts +19 -2
- package/dist/types/components/form/input/select-tags-input.d.ts +1 -1
- package/dist/types/components/format/format-bigint.d.ts +64 -0
- package/dist/types/components/format/format-date-time.d.ts +54 -0
- package/dist/types/components/format/format-date.d.ts +82 -0
- package/dist/types/components/format/format-display-name.d.ts +70 -0
- package/dist/types/components/format/format-file-size.d.ts +30 -0
- package/dist/types/components/format/format-list.d.ts +61 -0
- package/dist/types/components/format/format-number.d.ts +88 -0
- package/dist/types/components/format/format-plural.d.ts +96 -0
- package/dist/types/components/format/format-relative-time.d.ts +62 -0
- package/dist/types/components/format/format-time.d.ts +66 -0
- package/dist/types/components/format/index.d.ts +11 -0
- package/dist/types/components/i18n/locale-selector.d.ts +1 -1
- package/dist/types/components/json-schema/controls/composition-shared.d.ts +1 -1
- package/dist/types/components/json-schema/controls/shared-utils.d.ts +3 -3
- package/dist/types/components/json-schema/widgets/string-controls.d.ts +2 -2
- package/dist/types/components/json-schema-display/display-wrapper.d.ts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/use-form-CP6nftVl.cjs +2 -0
- package/dist/{use-form-D_TJyZhP.js → use-form-CmQdxpOi.js} +474 -434
- package/dist/{widget-customization-DELy3SMQ.cjs → widget-customization-B0y-eesp.cjs} +1 -1
- package/dist/{widget-customization-BAchyOUo.js → widget-customization-CKbR4Dsg.js} +2 -2
- package/package.json +1 -1
- package/dist/deep-merge-Bydz6jLt.cjs +0 -1
- package/dist/use-form-BvBkVEKi.cjs +0 -2
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { attr as O, Value as j, Fragment as ce, Empty as U, WithElement as Te, Use as K, html as I, When as oe, computedOf as M, prop as X, style as Me, Ensure as
|
|
2
|
-
import { m as ve, c as
|
|
3
|
-
import { j as Nr, k as Rr, l as
|
|
1
|
+
import { attr as O, Value as j, Fragment as ce, Empty as U, WithElement as Te, Use as K, html as I, When as oe, computedOf as M, prop as X, style as Me, Ensure as $e, MapSignal as re, Async as mt, OnDispose as yt } from "@tempots/dom";
|
|
2
|
+
import { m as ve, c as Le, g as We, a as Be, r as De, e as gt, f as Oe, S as ht, b as bt, h as we, i as vt } from "../oneof-branch-detection-DSzC0PkO.js";
|
|
3
|
+
import { j as Nr, k as Rr, l as Fr, n as Vr, o as Er, p as Tr, q as Mr } from "../oneof-branch-detection-DSzC0PkO.js";
|
|
4
4
|
import { B as q } from "../translations-DT5QQ4WO.js";
|
|
5
|
-
import { P as wt, E as St, N as xe } from "../notice-
|
|
6
|
-
import { g as je, B as At, N as H, a as fe, b as Ot, C as jt, c as kt, d as Ct, e as Pt, f as It, h as Nt, i as Rt, S as
|
|
7
|
-
import { l as
|
|
8
|
-
import { S as _, L as ee, M as
|
|
9
|
-
import {
|
|
10
|
-
import { objectEntries as Ke, upperCaseFirst as qe, Validation as
|
|
11
|
-
import { S as Dt, b as xt, N as Je, W as _t, c as Ut, t as te, e as Q, T as Kt, U as qt, f as pe, g as Jt, M as ae, G as zt, h as Ht, L as Gt, i as Xt, j as Yt } from "../deep-merge-
|
|
12
|
-
import { r as
|
|
5
|
+
import { P as wt, E as St, N as xe } from "../notice-BXKtBEiC.js";
|
|
6
|
+
import { g as je, B as At, N as H, a as fe, b as Ot, C as jt, c as kt, d as Ct, e as Pt, f as It, h as Nt, i as Rt, S as Ft, j as Vt, R as Et, k as Tt, E as _e, W as Mt } from "../widget-customization-CKbR4Dsg.js";
|
|
7
|
+
import { l as Lr, m as Wr, n as Br, o as Dr } from "../widget-customization-CKbR4Dsg.js";
|
|
8
|
+
import { S as _, L as ee, M as $t } from "../stack-BLMteGTn.js";
|
|
9
|
+
import { F as ie, b as A, M as de, a as ke, C as Ue, O as Lt, A as Wt, f as Bt } from "../use-form-CmQdxpOi.js";
|
|
10
|
+
import { objectEntries as Ke, upperCaseFirst as qe, Validation as L } from "@tempots/std";
|
|
11
|
+
import { S as Dt, b as xt, N as Je, W as _t, c as Ut, t as te, e as Q, T as Kt, U as qt, f as pe, g as Jt, M as ae, G as zt, h as Ht, L as Gt, i as Xt, j as Yt } from "../deep-merge-BUsrE2v4.js";
|
|
12
|
+
import { r as F } from "../utils-vUtP6iPG.js";
|
|
13
13
|
import { m as Zt, T as Qt } from "../text-input-BAn02BzO.js";
|
|
14
14
|
import { B as ze } from "../input-container-CO3DNqpp.js";
|
|
15
15
|
import en from "ajv";
|
|
@@ -22,7 +22,7 @@ function nn(e, t, n, r = []) {
|
|
|
22
22
|
if (!n)
|
|
23
23
|
return null;
|
|
24
24
|
try {
|
|
25
|
-
if (
|
|
25
|
+
if (Le(n, e)(t)) {
|
|
26
26
|
const a = e.title || "disallowed schema";
|
|
27
27
|
return {
|
|
28
28
|
path: r,
|
|
@@ -72,7 +72,7 @@ function rn(e, t, n, r = []) {
|
|
|
72
72
|
function He(e, t, n) {
|
|
73
73
|
if (!n || !e.if || typeof e.if != "object") return null;
|
|
74
74
|
try {
|
|
75
|
-
if (
|
|
75
|
+
if (Le(n, e.if)(t)) {
|
|
76
76
|
const s = e.then;
|
|
77
77
|
if (s && typeof s == "object")
|
|
78
78
|
return s;
|
|
@@ -135,7 +135,7 @@ function G(e, t, n) {
|
|
|
135
135
|
}
|
|
136
136
|
}), r;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function W({
|
|
139
139
|
ctx: e
|
|
140
140
|
}) {
|
|
141
141
|
const { examples: t, default: n } = e;
|
|
@@ -170,7 +170,7 @@ function Se(e) {
|
|
|
170
170
|
function Ae(e) {
|
|
171
171
|
return e.isReadOnly && !e.shouldIgnoreReadOnly || e.isDeprecated;
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function V({
|
|
174
174
|
ctx: e,
|
|
175
175
|
controller: t,
|
|
176
176
|
resolved: n
|
|
@@ -240,7 +240,7 @@ function Ye({
|
|
|
240
240
|
inner: r
|
|
241
241
|
}) {
|
|
242
242
|
return e.isRoot ? t ? _(O.class("bc-stack--gap-2"), n, r) : r : ie({
|
|
243
|
-
...
|
|
243
|
+
...W({ ctx: e }),
|
|
244
244
|
content: t ? _(
|
|
245
245
|
O.class("bc-stack--gap-2 bc-stack--align-start"),
|
|
246
246
|
n,
|
|
@@ -329,7 +329,7 @@ function un(e) {
|
|
|
329
329
|
pattern: t.pattern,
|
|
330
330
|
minLength: t.minLength,
|
|
331
331
|
maxLength: t.maxLength
|
|
332
|
-
}, r =
|
|
332
|
+
}, r = F(t, e.name), i = r?.widget;
|
|
333
333
|
if (i != null)
|
|
334
334
|
switch (i) {
|
|
335
335
|
case "binary":
|
|
@@ -514,7 +514,7 @@ function me({
|
|
|
514
514
|
}) {
|
|
515
515
|
if (Se(e))
|
|
516
516
|
return U;
|
|
517
|
-
const n =
|
|
517
|
+
const n = F(e.definition, e.name), r = n?.widget, i = V({
|
|
518
518
|
ctx: e,
|
|
519
519
|
controller: t,
|
|
520
520
|
resolved: n
|
|
@@ -522,7 +522,7 @@ function me({
|
|
|
522
522
|
if (i)
|
|
523
523
|
return i;
|
|
524
524
|
const s = {
|
|
525
|
-
...
|
|
525
|
+
...W({ ctx: e }),
|
|
526
526
|
placeholder: ne(e.definition, String),
|
|
527
527
|
disabled: Ae(e)
|
|
528
528
|
};
|
|
@@ -572,7 +572,7 @@ function me({
|
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
574
|
function fn(e) {
|
|
575
|
-
const t =
|
|
575
|
+
const t = F(e.definition, e.name);
|
|
576
576
|
if (t?.widget === "slider")
|
|
577
577
|
return { widget: "slider", options: t.options };
|
|
578
578
|
if (t?.widget === "rating")
|
|
@@ -591,7 +591,7 @@ function le({
|
|
|
591
591
|
}) {
|
|
592
592
|
if (Se(e))
|
|
593
593
|
return U;
|
|
594
|
-
const n = e.definition, r = fn(e), i =
|
|
594
|
+
const n = e.definition, r = fn(e), i = F(e.definition, e.name), s = V({
|
|
595
595
|
ctx: e,
|
|
596
596
|
controller: t,
|
|
597
597
|
resolved: i
|
|
@@ -599,7 +599,7 @@ function le({
|
|
|
599
599
|
if (s)
|
|
600
600
|
return s;
|
|
601
601
|
const a = {
|
|
602
|
-
...
|
|
602
|
+
...W({ ctx: e }),
|
|
603
603
|
placeholder: ne(e.definition, String),
|
|
604
604
|
min: n.minimum,
|
|
605
605
|
max: n.maximum,
|
|
@@ -609,13 +609,13 @@ function le({
|
|
|
609
609
|
switch (r.widget) {
|
|
610
610
|
case "rating":
|
|
611
611
|
const u = (typeof r.options?.max == "number" ? r.options.max : n.maximum) || 5;
|
|
612
|
-
return o ? A(
|
|
612
|
+
return o ? A(Vt, {
|
|
613
613
|
...a,
|
|
614
614
|
max: u,
|
|
615
615
|
controller: l ? te(
|
|
616
616
|
t
|
|
617
617
|
) : t
|
|
618
|
-
}) : A(
|
|
618
|
+
}) : A(Et, {
|
|
619
619
|
...a,
|
|
620
620
|
max: u,
|
|
621
621
|
controller: t
|
|
@@ -626,7 +626,7 @@ function le({
|
|
|
626
626
|
controller: l ? te(
|
|
627
627
|
t
|
|
628
628
|
) : t
|
|
629
|
-
}) : A(
|
|
629
|
+
}) : A(Ft, {
|
|
630
630
|
...a,
|
|
631
631
|
controller: t
|
|
632
632
|
});
|
|
@@ -701,7 +701,7 @@ function ge({
|
|
|
701
701
|
}) {
|
|
702
702
|
if (Se(e))
|
|
703
703
|
return U;
|
|
704
|
-
const n =
|
|
704
|
+
const n = F(e.definition, e.name), r = V({
|
|
705
705
|
ctx: e,
|
|
706
706
|
controller: t,
|
|
707
707
|
resolved: n
|
|
@@ -709,7 +709,7 @@ function ge({
|
|
|
709
709
|
if (r)
|
|
710
710
|
return r;
|
|
711
711
|
const i = {
|
|
712
|
-
...
|
|
712
|
+
...W({ ctx: e }),
|
|
713
713
|
disabled: Ae(e)
|
|
714
714
|
}, s = A(ke, {
|
|
715
715
|
...i,
|
|
@@ -732,7 +732,7 @@ function Ze({
|
|
|
732
732
|
ctx: e,
|
|
733
733
|
controller: t
|
|
734
734
|
}) {
|
|
735
|
-
const n =
|
|
735
|
+
const n = F(e.definition, e.name), r = V({
|
|
736
736
|
ctx: e,
|
|
737
737
|
controller: t,
|
|
738
738
|
resolved: n
|
|
@@ -992,7 +992,7 @@ function An({
|
|
|
992
992
|
ctx: e,
|
|
993
993
|
controller: t
|
|
994
994
|
}) {
|
|
995
|
-
const n =
|
|
995
|
+
const n = F(e.definition, e.name), r = V({
|
|
996
996
|
ctx: e,
|
|
997
997
|
controller: t,
|
|
998
998
|
resolved: n
|
|
@@ -1016,7 +1016,7 @@ function An({
|
|
|
1016
1016
|
t
|
|
1017
1017
|
) : t;
|
|
1018
1018
|
return Ht({
|
|
1019
|
-
...
|
|
1019
|
+
...W({ ctx: e }),
|
|
1020
1020
|
options: u,
|
|
1021
1021
|
controller: m,
|
|
1022
1022
|
// Custom equality to handle null/undefined comparison
|
|
@@ -1028,7 +1028,7 @@ function On({
|
|
|
1028
1028
|
ctx: e,
|
|
1029
1029
|
controller: t
|
|
1030
1030
|
}) {
|
|
1031
|
-
const n =
|
|
1031
|
+
const n = F(e.definition, e.name), r = V({
|
|
1032
1032
|
ctx: e,
|
|
1033
1033
|
controller: t,
|
|
1034
1034
|
resolved: n
|
|
@@ -1040,7 +1040,7 @@ function On({
|
|
|
1040
1040
|
Te(() => {
|
|
1041
1041
|
j.get(t.signal) !== i.const && t.change(i.const);
|
|
1042
1042
|
}),
|
|
1043
|
-
zt(
|
|
1043
|
+
zt($t(e.widgetLabel, ": "), ee(String(i.const)))
|
|
1044
1044
|
);
|
|
1045
1045
|
}
|
|
1046
1046
|
function tt(e, t, n) {
|
|
@@ -1113,7 +1113,7 @@ function tt(e, t, n) {
|
|
|
1113
1113
|
d
|
|
1114
1114
|
)((v, g) => v || g)
|
|
1115
1115
|
}),
|
|
1116
|
-
error:
|
|
1116
|
+
error: $e(
|
|
1117
1117
|
c,
|
|
1118
1118
|
(v) => I.div(O.class("bc-object-helpers__error"), v)
|
|
1119
1119
|
),
|
|
@@ -1207,7 +1207,7 @@ function nt(e, t, n) {
|
|
|
1207
1207
|
v
|
|
1208
1208
|
)((g, y) => g || y)
|
|
1209
1209
|
}),
|
|
1210
|
-
error:
|
|
1210
|
+
error: $e(
|
|
1211
1211
|
h,
|
|
1212
1212
|
(g) => I.div(O.class("bc-object-helpers__error"), g)
|
|
1213
1213
|
),
|
|
@@ -1361,7 +1361,7 @@ function at({
|
|
|
1361
1361
|
content: n
|
|
1362
1362
|
}) {
|
|
1363
1363
|
return !e.suppressLabel && e.name != null && (!t || !["fieldset", "group"].includes(t.format || "")) ? ie({
|
|
1364
|
-
...
|
|
1364
|
+
...W({ ctx: e }),
|
|
1365
1365
|
content: n
|
|
1366
1366
|
}) : n;
|
|
1367
1367
|
}
|
|
@@ -1418,7 +1418,7 @@ function Cn({
|
|
|
1418
1418
|
config: r,
|
|
1419
1419
|
validatePropertyName: i,
|
|
1420
1420
|
helpers: s
|
|
1421
|
-
}), m =
|
|
1421
|
+
}), m = We(e), p = [...a, l, u].filter(
|
|
1422
1422
|
Boolean
|
|
1423
1423
|
), c = Be(
|
|
1424
1424
|
m,
|
|
@@ -1448,11 +1448,11 @@ function Pn({
|
|
|
1448
1448
|
e.ajv
|
|
1449
1449
|
), h = p.filter((k) => !c.has(k)), b = p.filter(
|
|
1450
1450
|
(k) => c.has(k)
|
|
1451
|
-
), f = o.apAllowed && o.canAddUnevaluated && m.length < o.maxProps, d = (k,
|
|
1452
|
-
const P = k, x = (z) =>
|
|
1451
|
+
), f = o.apAllowed && o.canAddUnevaluated && m.length < o.maxProps, d = (k, E) => {
|
|
1452
|
+
const P = k, x = (z) => E.has(z) ? !1 : l(z).ok;
|
|
1453
1453
|
if (x(P)) return P;
|
|
1454
1454
|
let B = 1;
|
|
1455
|
-
for (;
|
|
1455
|
+
for (; E.has(P + B) || !x(P + B); ) B++;
|
|
1456
1456
|
return P + B;
|
|
1457
1457
|
}, v = K(
|
|
1458
1458
|
q,
|
|
@@ -1462,9 +1462,9 @@ function Pn({
|
|
|
1462
1462
|
disabled: !f,
|
|
1463
1463
|
onClick: () => {
|
|
1464
1464
|
if (!f) return;
|
|
1465
|
-
const
|
|
1465
|
+
const E = new Set(
|
|
1466
1466
|
Object.keys(j.get(t.signal) ?? {})
|
|
1467
|
-
), P = d("property",
|
|
1467
|
+
), P = d("property", E);
|
|
1468
1468
|
if (!l(P).ok) return;
|
|
1469
1469
|
const B = u.getValueSchemaForNew(), z = u.makeDefaultFor(B), se = {
|
|
1470
1470
|
...j.get(t.signal) ?? {},
|
|
@@ -1476,7 +1476,7 @@ function Pn({
|
|
|
1476
1476
|
O.title(o.unevaluatedTooltip),
|
|
1477
1477
|
k.$.addLabel
|
|
1478
1478
|
)
|
|
1479
|
-
), g =
|
|
1479
|
+
), g = We(a), y = Ke(o.knownProps).filter(
|
|
1480
1480
|
([, k]) => k !== !1
|
|
1481
1481
|
), S = [
|
|
1482
1482
|
...y.map(([k]) => k),
|
|
@@ -1484,11 +1484,11 @@ function Pn({
|
|
|
1484
1484
|
...h
|
|
1485
1485
|
], C = [
|
|
1486
1486
|
// Known properties
|
|
1487
|
-
...y.map(([k,
|
|
1487
|
+
...y.map(([k, E]) => {
|
|
1488
1488
|
const P = k, x = t.field(P);
|
|
1489
1489
|
return D({
|
|
1490
1490
|
ctx: a.with({
|
|
1491
|
-
definition:
|
|
1491
|
+
definition: E,
|
|
1492
1492
|
isPropertyRequired: Array.isArray(i.required) ? i.required.includes(P) : a.hasRequiredProperty(P),
|
|
1493
1493
|
suppressLabel: !1
|
|
1494
1494
|
}).append(P),
|
|
@@ -1497,8 +1497,8 @@ function Pn({
|
|
|
1497
1497
|
}),
|
|
1498
1498
|
// Evaluated additional keys
|
|
1499
1499
|
...b.map((k) => {
|
|
1500
|
-
const
|
|
1501
|
-
return tt(k,
|
|
1500
|
+
const E = o.patternList.some((P) => P.test(k));
|
|
1501
|
+
return tt(k, E, {
|
|
1502
1502
|
controller: t,
|
|
1503
1503
|
effCtx: a,
|
|
1504
1504
|
patternProps: o.patternProps,
|
|
@@ -1510,8 +1510,8 @@ function Pn({
|
|
|
1510
1510
|
}),
|
|
1511
1511
|
// Unevaluated keys
|
|
1512
1512
|
...h.map((k) => {
|
|
1513
|
-
const
|
|
1514
|
-
return nt(k,
|
|
1513
|
+
const E = o.patternList.some((P) => P.test(k));
|
|
1514
|
+
return nt(k, E, {
|
|
1515
1515
|
controller: t,
|
|
1516
1516
|
effCtx: a,
|
|
1517
1517
|
patternProps: o.patternProps,
|
|
@@ -1537,7 +1537,7 @@ function ot({
|
|
|
1537
1537
|
ctx: e,
|
|
1538
1538
|
controller: t
|
|
1539
1539
|
}) {
|
|
1540
|
-
const n =
|
|
1540
|
+
const n = F(e.definition, e.name), r = V({
|
|
1541
1541
|
ctx: e,
|
|
1542
1542
|
controller: t,
|
|
1543
1543
|
resolved: n
|
|
@@ -1582,7 +1582,7 @@ function Nn(e, t, n) {
|
|
|
1582
1582
|
const o = s.mapping[a];
|
|
1583
1583
|
return Rn(e, o);
|
|
1584
1584
|
}
|
|
1585
|
-
return
|
|
1585
|
+
return Fe(
|
|
1586
1586
|
e,
|
|
1587
1587
|
s.propertyName,
|
|
1588
1588
|
a
|
|
@@ -1596,7 +1596,7 @@ function Nn(e, t, n) {
|
|
|
1596
1596
|
const o = s.mapping[a];
|
|
1597
1597
|
return o >= 0 && o < e.length ? o : null;
|
|
1598
1598
|
}
|
|
1599
|
-
return
|
|
1599
|
+
return Fe(
|
|
1600
1600
|
e,
|
|
1601
1601
|
s.key,
|
|
1602
1602
|
a
|
|
@@ -1612,7 +1612,7 @@ function Rn(e, t) {
|
|
|
1612
1612
|
}
|
|
1613
1613
|
return null;
|
|
1614
1614
|
}
|
|
1615
|
-
function
|
|
1615
|
+
function Fe(e, t, n) {
|
|
1616
1616
|
for (let r = 0; r < e.length; r++) {
|
|
1617
1617
|
const i = e[r];
|
|
1618
1618
|
if (typeof i != "object") continue;
|
|
@@ -1627,11 +1627,11 @@ function Ve(e, t, n) {
|
|
|
1627
1627
|
}
|
|
1628
1628
|
return null;
|
|
1629
1629
|
}
|
|
1630
|
-
function
|
|
1630
|
+
function Fn({
|
|
1631
1631
|
ctx: e,
|
|
1632
1632
|
controller: t
|
|
1633
1633
|
}) {
|
|
1634
|
-
const n =
|
|
1634
|
+
const n = F(e.definition, e.name), r = V({
|
|
1635
1635
|
ctx: e,
|
|
1636
1636
|
controller: t,
|
|
1637
1637
|
resolved: n
|
|
@@ -1641,11 +1641,11 @@ function Vn({
|
|
|
1641
1641
|
const i = e.definition.anyOf;
|
|
1642
1642
|
return lt({ ctx: e, controller: t, kind: "anyOf", variants: i });
|
|
1643
1643
|
}
|
|
1644
|
-
function
|
|
1644
|
+
function Vn({
|
|
1645
1645
|
ctx: e,
|
|
1646
1646
|
controller: t
|
|
1647
1647
|
}) {
|
|
1648
|
-
const n =
|
|
1648
|
+
const n = F(e.definition, e.name), r = V({
|
|
1649
1649
|
ctx: e,
|
|
1650
1650
|
controller: t,
|
|
1651
1651
|
resolved: n
|
|
@@ -1659,7 +1659,7 @@ function jr({
|
|
|
1659
1659
|
ctx: e,
|
|
1660
1660
|
controller: t
|
|
1661
1661
|
}) {
|
|
1662
|
-
const n =
|
|
1662
|
+
const n = F(e.definition, e.name), r = V({
|
|
1663
1663
|
ctx: e,
|
|
1664
1664
|
controller: t,
|
|
1665
1665
|
resolved: n
|
|
@@ -1805,7 +1805,7 @@ function D({
|
|
|
1805
1805
|
t,
|
|
1806
1806
|
N(
|
|
1807
1807
|
i,
|
|
1808
|
-
|
|
1808
|
+
Fn({
|
|
1809
1809
|
ctx: i,
|
|
1810
1810
|
controller: t
|
|
1811
1811
|
}),
|
|
@@ -1818,7 +1818,7 @@ function D({
|
|
|
1818
1818
|
t,
|
|
1819
1819
|
N(
|
|
1820
1820
|
i,
|
|
1821
|
-
|
|
1821
|
+
Vn({
|
|
1822
1822
|
ctx: i,
|
|
1823
1823
|
controller: t
|
|
1824
1824
|
}),
|
|
@@ -1949,7 +1949,7 @@ function D({
|
|
|
1949
1949
|
i,
|
|
1950
1950
|
ut({
|
|
1951
1951
|
ctx: i,
|
|
1952
|
-
controller: t instanceof
|
|
1952
|
+
controller: t instanceof Wt ? t : t.array()
|
|
1953
1953
|
}),
|
|
1954
1954
|
t
|
|
1955
1955
|
)
|
|
@@ -1957,7 +1957,7 @@ function D({
|
|
|
1957
1957
|
case "object": {
|
|
1958
1958
|
const a = ot({
|
|
1959
1959
|
ctx: i,
|
|
1960
|
-
controller: t instanceof
|
|
1960
|
+
controller: t instanceof Lt ? t : t.object()
|
|
1961
1961
|
});
|
|
1962
1962
|
return i.isRoot ? R(
|
|
1963
1963
|
i,
|
|
@@ -1998,7 +1998,7 @@ function D({
|
|
|
1998
1998
|
);
|
|
1999
1999
|
}
|
|
2000
2000
|
}
|
|
2001
|
-
function
|
|
2001
|
+
function En({
|
|
2002
2002
|
schema: e,
|
|
2003
2003
|
controller: t,
|
|
2004
2004
|
ajv: n,
|
|
@@ -2041,19 +2041,19 @@ function Tn(e) {
|
|
|
2041
2041
|
isTuple: !0,
|
|
2042
2042
|
prefixItems: e.prefixItems,
|
|
2043
2043
|
additionalItemsSchema: Array.isArray(e.items) ? !0 : e.items ?? !0,
|
|
2044
|
-
tupleLabels:
|
|
2044
|
+
tupleLabels: Ve(e)
|
|
2045
2045
|
} : Array.isArray(e.items) ? {
|
|
2046
2046
|
isTuple: !0,
|
|
2047
2047
|
prefixItems: e.items,
|
|
2048
2048
|
additionalItemsSchema: e.additionalItems ?? !0,
|
|
2049
|
-
tupleLabels:
|
|
2049
|
+
tupleLabels: Ve(e)
|
|
2050
2050
|
} : {
|
|
2051
2051
|
isTuple: !1,
|
|
2052
2052
|
prefixItems: [],
|
|
2053
2053
|
additionalItemsSchema: e.items ?? !0
|
|
2054
2054
|
};
|
|
2055
2055
|
}
|
|
2056
|
-
function
|
|
2056
|
+
function Ve(e) {
|
|
2057
2057
|
if (typeof e == "boolean") return;
|
|
2058
2058
|
const t = e["x:ui"];
|
|
2059
2059
|
return Array.isArray(t?.tupleLabels) ? t.tupleLabels : void 0;
|
|
@@ -2062,7 +2062,7 @@ function ut({
|
|
|
2062
2062
|
ctx: e,
|
|
2063
2063
|
controller: t
|
|
2064
2064
|
}) {
|
|
2065
|
-
const n =
|
|
2065
|
+
const n = F(e.definition, e.name), r = V({
|
|
2066
2066
|
ctx: e,
|
|
2067
2067
|
controller: t,
|
|
2068
2068
|
resolved: n
|
|
@@ -2129,7 +2129,7 @@ function ut({
|
|
|
2129
2129
|
}
|
|
2130
2130
|
return `Contains ${c.count} item(s) matching ${h}`;
|
|
2131
2131
|
}) : null, p = Gt({
|
|
2132
|
-
...
|
|
2132
|
+
...W({ ctx: e }),
|
|
2133
2133
|
createItem: () => {
|
|
2134
2134
|
const c = t.signal.value?.length ?? 0;
|
|
2135
2135
|
if (s.isTuple && c < s.prefixItems.length) {
|
|
@@ -2222,7 +2222,7 @@ function ct({
|
|
|
2222
2222
|
ctx: e,
|
|
2223
2223
|
controller: t
|
|
2224
2224
|
}) {
|
|
2225
|
-
const n =
|
|
2225
|
+
const n = F(e.definition, e.name), r = V({
|
|
2226
2226
|
ctx: e,
|
|
2227
2227
|
controller: t,
|
|
2228
2228
|
resolved: n
|
|
@@ -2257,7 +2257,7 @@ function ct({
|
|
|
2257
2257
|
const y = i;
|
|
2258
2258
|
return A(pe, {
|
|
2259
2259
|
// Suppress inner labels only when union is nested (non-root)
|
|
2260
|
-
...
|
|
2260
|
+
...W({
|
|
2261
2261
|
ctx: e.with({ suppressLabel: !e.isRoot })
|
|
2262
2262
|
}),
|
|
2263
2263
|
controller: v,
|
|
@@ -2313,7 +2313,7 @@ function ct({
|
|
|
2313
2313
|
}
|
|
2314
2314
|
default:
|
|
2315
2315
|
return A(pe, {
|
|
2316
|
-
...
|
|
2316
|
+
...W({ ctx: g }),
|
|
2317
2317
|
controller: v
|
|
2318
2318
|
});
|
|
2319
2319
|
}
|
|
@@ -2329,7 +2329,7 @@ function ue({
|
|
|
2329
2329
|
ctx: e,
|
|
2330
2330
|
controller: t
|
|
2331
2331
|
}) {
|
|
2332
|
-
const n =
|
|
2332
|
+
const n = F(e.definition, e.name), r = V({
|
|
2333
2333
|
ctx: e,
|
|
2334
2334
|
controller: t,
|
|
2335
2335
|
resolved: n
|
|
@@ -2351,14 +2351,14 @@ function ue({
|
|
|
2351
2351
|
controller: t
|
|
2352
2352
|
}));
|
|
2353
2353
|
}
|
|
2354
|
-
function
|
|
2354
|
+
function $n(e) {
|
|
2355
2355
|
if (typeof e == "boolean") return [];
|
|
2356
2356
|
const t = e["x:ui"];
|
|
2357
2357
|
return !t || !Array.isArray(t.crossField) ? [] : t.crossField.filter(
|
|
2358
2358
|
(n) => typeof n == "object" && n != null && typeof n.id == "string" && Array.isArray(n.fields) && typeof n.validate == "function"
|
|
2359
2359
|
);
|
|
2360
2360
|
}
|
|
2361
|
-
function
|
|
2361
|
+
function Ln(e, t, n = !1) {
|
|
2362
2362
|
const r = [], i = [...t].sort(
|
|
2363
2363
|
(s, a) => (a.priority || 0) - (s.priority || 0)
|
|
2364
2364
|
);
|
|
@@ -2367,7 +2367,7 @@ function $n(e, t, n = !1) {
|
|
|
2367
2367
|
try {
|
|
2368
2368
|
const a = {};
|
|
2369
2369
|
for (const l of s.fields)
|
|
2370
|
-
a[l] =
|
|
2370
|
+
a[l] = Wn(e, l);
|
|
2371
2371
|
const o = s.validate(a, e);
|
|
2372
2372
|
if (!o.valid) {
|
|
2373
2373
|
const l = s.targets || s.fields;
|
|
@@ -2411,9 +2411,9 @@ function $n(e, t, n = !1) {
|
|
|
2411
2411
|
message: "Cross-field validation error"
|
|
2412
2412
|
});
|
|
2413
2413
|
}
|
|
2414
|
-
return r.length > 0 ? we(r) :
|
|
2414
|
+
return r.length > 0 ? we(r) : L.valid;
|
|
2415
2415
|
}
|
|
2416
|
-
function
|
|
2416
|
+
function Wn(e, t) {
|
|
2417
2417
|
if (e == null || typeof e != "object")
|
|
2418
2418
|
return;
|
|
2419
2419
|
const n = t.split(".");
|
|
@@ -2442,7 +2442,7 @@ function Bn(e) {
|
|
|
2442
2442
|
)), Array.isArray(t.crossField) && (n.crossField = t.crossField.filter(
|
|
2443
2443
|
(i) => typeof i == "object" && i != null && Array.isArray(i.fields) && typeof i.validate == "function"
|
|
2444
2444
|
));
|
|
2445
|
-
const r =
|
|
2445
|
+
const r = $n(e);
|
|
2446
2446
|
return r.length > 0 && (n.crossFieldRules = r), Array.isArray(t.async) && (n.async = t.async.filter(
|
|
2447
2447
|
(i) => typeof i == "object" && i != null && typeof i.validate == "function"
|
|
2448
2448
|
)), Object.keys(n).length > 0 ? n : void 0;
|
|
@@ -2522,7 +2522,7 @@ function xn(e, t, n, r) {
|
|
|
2522
2522
|
console.warn("Error in cross-field validation:", a);
|
|
2523
2523
|
}
|
|
2524
2524
|
if (n.crossFieldRules && n.crossFieldRules.length > 0) {
|
|
2525
|
-
const s =
|
|
2525
|
+
const s = Ln(
|
|
2526
2526
|
t,
|
|
2527
2527
|
n.crossFieldRules
|
|
2528
2528
|
);
|
|
@@ -2531,7 +2531,7 @@ function xn(e, t, n, r) {
|
|
|
2531
2531
|
i.push(...a);
|
|
2532
2532
|
}
|
|
2533
2533
|
}
|
|
2534
|
-
return i.length > 0 ? we(i) :
|
|
2534
|
+
return i.length > 0 ? we(i) : L.valid;
|
|
2535
2535
|
}
|
|
2536
2536
|
function _n(e) {
|
|
2537
2537
|
if (e.type === "valid") return [];
|
|
@@ -2583,7 +2583,7 @@ class qn {
|
|
|
2583
2583
|
t,
|
|
2584
2584
|
X({
|
|
2585
2585
|
isValidating: !1,
|
|
2586
|
-
result:
|
|
2586
|
+
result: L.valid,
|
|
2587
2587
|
lastValidatedValue: void 0,
|
|
2588
2588
|
lastValidatedAt: 0
|
|
2589
2589
|
})
|
|
@@ -2601,7 +2601,7 @@ class qn {
|
|
|
2601
2601
|
if (t.minLength && typeof n == "string" && n.length < t.minLength) {
|
|
2602
2602
|
a.set({
|
|
2603
2603
|
...a.value,
|
|
2604
|
-
result:
|
|
2604
|
+
result: L.valid,
|
|
2605
2605
|
isValidating: !1
|
|
2606
2606
|
});
|
|
2607
2607
|
return;
|
|
@@ -2612,13 +2612,13 @@ class qn {
|
|
|
2612
2612
|
this.abortControllers.set(s, m), a.set({
|
|
2613
2613
|
...a.value,
|
|
2614
2614
|
isValidating: !0,
|
|
2615
|
-
result: t.loadingMessage ?
|
|
2615
|
+
result: t.loadingMessage ? L.invalid({ message: t.loadingMessage }) : a.value.result
|
|
2616
2616
|
});
|
|
2617
2617
|
try {
|
|
2618
2618
|
const p = await t.validate(n, r);
|
|
2619
2619
|
if (m.signal.aborted)
|
|
2620
2620
|
return;
|
|
2621
|
-
const c = p.valid ?
|
|
2621
|
+
const c = p.valid ? L.valid : L.invalid({
|
|
2622
2622
|
message: p.message || "Async validation failed",
|
|
2623
2623
|
context: p.context
|
|
2624
2624
|
});
|
|
@@ -2634,7 +2634,7 @@ class qn {
|
|
|
2634
2634
|
const c = p instanceof Error ? p.message : "Async validation error";
|
|
2635
2635
|
a.set({
|
|
2636
2636
|
isValidating: !1,
|
|
2637
|
-
result:
|
|
2637
|
+
result: L.invalid({ message: c }),
|
|
2638
2638
|
lastValidatedValue: n,
|
|
2639
2639
|
lastValidatedAt: Date.now()
|
|
2640
2640
|
});
|
|
@@ -2783,18 +2783,18 @@ function Zn(e) {
|
|
|
2783
2783
|
let n = e.minimum, r = e.maximum;
|
|
2784
2784
|
if (e.exclusiveMinimum !== void 0) {
|
|
2785
2785
|
const a = typeof e.exclusiveMinimum == "number" ? e.exclusiveMinimum : e.exclusiveMinimum ? n ?? 0 : void 0;
|
|
2786
|
-
a !== void 0 && (n = t ? a + 1 : a +
|
|
2786
|
+
a !== void 0 && (n = t ? a + 1 : a + Ee(e));
|
|
2787
2787
|
}
|
|
2788
2788
|
if (e.exclusiveMaximum !== void 0) {
|
|
2789
2789
|
const a = typeof e.exclusiveMaximum == "number" ? e.exclusiveMaximum : e.exclusiveMaximum ? r ?? 0 : void 0;
|
|
2790
|
-
a !== void 0 && (r = t ? a - 1 : a -
|
|
2790
|
+
a !== void 0 && (r = t ? a - 1 : a - Ee(e));
|
|
2791
2791
|
}
|
|
2792
2792
|
let i;
|
|
2793
2793
|
n !== void 0 && r !== void 0 ? i = (n + r) / 2 : n !== void 0 ? i = n : r !== void 0 ? i = 0 <= r ? 0 : r : i = 0;
|
|
2794
2794
|
const s = e.multipleOf;
|
|
2795
2795
|
return s !== void 0 && s > 0 && (i = Math.round(i / s) * s, n !== void 0 && i < n && (i = Math.ceil(n / s) * s), r !== void 0 && i > r && (i = Math.floor(r / s) * s)), t && (i = Math.round(i)), i;
|
|
2796
2796
|
}
|
|
2797
|
-
function
|
|
2797
|
+
function Ee(e) {
|
|
2798
2798
|
return e.multipleOf !== void 0 ? e.multipleOf : 1e-3;
|
|
2799
2799
|
}
|
|
2800
2800
|
function Qn(e) {
|
|
@@ -2869,9 +2869,9 @@ function kr({
|
|
|
2869
2869
|
(b) => {
|
|
2870
2870
|
if (b.ok) {
|
|
2871
2871
|
const { ajv: f, validate: d } = b.value, v = Bn(e), g = Kn(e), y = g.length > 0 ? new qn() : null, w = s ?? "onTouched", S = (T) => {
|
|
2872
|
-
const
|
|
2872
|
+
const $ = d(T);
|
|
2873
2873
|
let Z;
|
|
2874
|
-
return
|
|
2874
|
+
return $ ? Z = L.valid : Z = we(
|
|
2875
2875
|
d.errors ?? []
|
|
2876
2876
|
), v ? xn(
|
|
2877
2877
|
T,
|
|
@@ -2885,28 +2885,28 @@ function kr({
|
|
|
2885
2885
|
validationMode: w,
|
|
2886
2886
|
validateDebounceMs: a,
|
|
2887
2887
|
validate: w === "onSubmit" ? void 0 : S
|
|
2888
|
-
}), k = v ? Un(v) : null,
|
|
2888
|
+
}), k = v ? Un(v) : null, E = i !== !1;
|
|
2889
2889
|
let P = !1;
|
|
2890
|
-
const x =
|
|
2890
|
+
const x = E ? C.signal.on((T) => {
|
|
2891
2891
|
if (P) return;
|
|
2892
|
-
const
|
|
2893
|
-
d(
|
|
2892
|
+
const $ = rr(T);
|
|
2893
|
+
d($) && !ir($, T) && (P = !0, C.change($), P = !1);
|
|
2894
2894
|
}) : () => {
|
|
2895
|
-
}, B = k ? C.signal.on((T,
|
|
2896
|
-
|
|
2895
|
+
}, B = k ? C.signal.on((T, $) => {
|
|
2896
|
+
$ != null && JSON.stringify(T) !== JSON.stringify($) && setTimeout(() => {
|
|
2897
2897
|
const pt = C.status.value;
|
|
2898
2898
|
J(pt);
|
|
2899
2899
|
}, 10);
|
|
2900
2900
|
}) : () => {
|
|
2901
2901
|
}, z = y && g.length > 0 ? C.signal.on((T) => {
|
|
2902
|
-
for (const
|
|
2903
|
-
y.validateField(
|
|
2902
|
+
for (const $ of g)
|
|
2903
|
+
y.validateField($, T, T);
|
|
2904
2904
|
}) : () => {
|
|
2905
2905
|
}, se = () => {
|
|
2906
2906
|
x(), B(), z(), y?.dispose(), C.dispose();
|
|
2907
2907
|
}, ft = o ? sr(o) : void 0, dt = ce(
|
|
2908
2908
|
yt(se),
|
|
2909
|
-
|
|
2909
|
+
En({
|
|
2910
2910
|
schema: e,
|
|
2911
2911
|
controller: C,
|
|
2912
2912
|
ajv: f,
|
|
@@ -2968,11 +2968,11 @@ function cr(e) {
|
|
|
2968
2968
|
export {
|
|
2969
2969
|
jr as JSONSchemaAllOf,
|
|
2970
2970
|
ue as JSONSchemaAny,
|
|
2971
|
-
|
|
2971
|
+
Fn as JSONSchemaAnyOf,
|
|
2972
2972
|
ut as JSONSchemaArray,
|
|
2973
2973
|
ge as JSONSchemaBoolean,
|
|
2974
2974
|
On as JSONSchemaConst,
|
|
2975
|
-
|
|
2975
|
+
En as JSONSchemaControl,
|
|
2976
2976
|
An as JSONSchemaEnum,
|
|
2977
2977
|
kr as JSONSchemaForm,
|
|
2978
2978
|
D as JSONSchemaGenericControl,
|
|
@@ -2980,24 +2980,24 @@ export {
|
|
|
2980
2980
|
Ze as JSONSchemaNull,
|
|
2981
2981
|
le as JSONSchemaNumber,
|
|
2982
2982
|
ot as JSONSchemaObject,
|
|
2983
|
-
|
|
2983
|
+
Vn as JSONSchemaOneOf,
|
|
2984
2984
|
me as JSONSchemaString,
|
|
2985
2985
|
ct as JSONSchemaUnion,
|
|
2986
2986
|
ht as SchemaContext,
|
|
2987
2987
|
we as ajvErrorsToControllerValidation,
|
|
2988
2988
|
Nr as ajvErrorsToDependencies,
|
|
2989
2989
|
Rr as buildMessage,
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2990
|
+
Fr as buildPath,
|
|
2991
|
+
Vr as clearCaches,
|
|
2992
|
+
Er as clearCachesForAjv,
|
|
2993
|
+
Le as compileWithCache,
|
|
2994
2994
|
rn as composeEffectiveObjectSchema,
|
|
2995
2995
|
Cr as createAJVStandardSchema,
|
|
2996
|
-
|
|
2996
|
+
Lr as createDiagnosticWidget,
|
|
2997
2997
|
He as evaluateIfThenElseOverlay,
|
|
2998
2998
|
nn as evaluateNotViolation,
|
|
2999
2999
|
Y as extractSchemaDefaults,
|
|
3000
|
-
|
|
3000
|
+
Wr as forFormat,
|
|
3001
3001
|
Br as forTypeAndFormat,
|
|
3002
3002
|
Dr as forXUI,
|
|
3003
3003
|
vt as getAjvForSchema,
|