@tempots/beatui 0.85.0 → 0.86.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/beatui.css +21 -42
- package/dist/beatui.tailwind.css +21 -42
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +1801 -1809
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +183 -196
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +93 -93
- package/dist/lexical/index.cjs.js +1 -1
- package/dist/lexical/index.es.js +1 -1
- package/dist/menu-De_-sGeb.cjs +1 -0
- package/dist/menu-Ui4lUPHM.js +373 -0
- package/dist/types/components/form/input/combobox-tags-input.d.ts +3 -3
- package/dist/{widget-customization-BngYjPvO.cjs → widget-customization-B9Oc1bG4.cjs} +1 -1
- package/dist/{widget-customization-D-Vvr4vg.js → widget-customization-Ct2eqKKR.js} +69 -73
- package/package.json +2 -2
- package/dist/menu-DMAhcoJ2.js +0 -377
- package/dist/menu-q8xJaBIb.cjs +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import { o as Ir, m as Nr, n as Rr, l as Vr } from "../widget-customization-
|
|
3
|
-
import { c as
|
|
1
|
+
import { g as je, B as mt, N as H, a as fe, b as yt, C as gt, c as ht, d as bt, e as vt, f as wt, h as St, i as At, S as jt, j as Ot, R as kt, k as Ct, E as Te, W as Pt } from "../widget-customization-Ct2eqKKR.js";
|
|
2
|
+
import { o as Ir, m as Nr, n as Rr, l as Vr } from "../widget-customization-Ct2eqKKR.js";
|
|
3
|
+
import { c as Me, m as ve, g as We, a as $e, r as Le, e as It, f as Oe, b as Nt, S as Rt, h as we, i as Vt, A as Et } from "../oneof-branch-detection-BED_n2MT.js";
|
|
4
4
|
import { n as Fr, l as Tr, k as Mr, o as Wr, p as $r, q as Lr, j as Br } from "../oneof-branch-detection-BED_n2MT.js";
|
|
5
|
-
import { attr as j, Value as O, Fragment as
|
|
5
|
+
import { attr as j, Value as O, Fragment as ce, Empty as U, WithElement as Be, Use as K, html as I, When as oe, computedOf as M, prop as X, style as De, Ensure as xe, MapSignal as re, Async as Ft, OnDispose as Tt } from "@tempots/dom";
|
|
6
6
|
import { _ as _e } from "../string-DYyMxBl-.js";
|
|
7
|
-
import { S as Mt, b as Wt, N as Ue, t as te, W as $t, c as Lt, e as Q, T as Bt, U as Dt, f as
|
|
8
|
-
import { S as
|
|
9
|
-
import { I as
|
|
7
|
+
import { S as Mt, b as Wt, N as Ue, t as te, W as $t, c as Lt, e as Q, T as Bt, U as Dt, f as pe, g as xt, M as ae, h as _t, G as Ut, L as Kt, i as qt, j as Jt } from "../deep-merge-CmQoIYPC.js";
|
|
8
|
+
import { S as _, L as ee, M as zt, i as $ } from "../stack-BJgsPJ9A.js";
|
|
9
|
+
import { I as ie, b as A, M as de, a as ke, C as Ke, f as Ht, A as Gt, g as Xt } from "../use-form-BurzbPVV.js";
|
|
10
10
|
import { r as V } from "../utils-DEbsp9Q9.js";
|
|
11
11
|
import { T as Yt } from "../text-input-CPJzUC2r.js";
|
|
12
12
|
import { P as Zt, E as Qt, N as qe } from "../notice-Dz4nX57_.js";
|
|
@@ -22,7 +22,7 @@ function tn(e, t, n, r = []) {
|
|
|
22
22
|
if (!n)
|
|
23
23
|
return null;
|
|
24
24
|
try {
|
|
25
|
-
if (
|
|
25
|
+
if (Me(n, e)(t)) {
|
|
26
26
|
const a = e.title || "disallowed schema";
|
|
27
27
|
return {
|
|
28
28
|
path: r,
|
|
@@ -59,7 +59,7 @@ function nn(e, t, n, r = []) {
|
|
|
59
59
|
for (const [f, d] of Object.entries(b))
|
|
60
60
|
Object.prototype.hasOwnProperty.call(p, f) && i.push(d);
|
|
61
61
|
}
|
|
62
|
-
const l = [e, ...i], { mergedSchema: u, conflicts: m } =
|
|
62
|
+
const l = [e, ...i], { mergedSchema: u, conflicts: m } = ve(
|
|
63
63
|
l,
|
|
64
64
|
r
|
|
65
65
|
);
|
|
@@ -72,7 +72,7 @@ function nn(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 (Me(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 L({
|
|
139
139
|
ctx: e
|
|
140
140
|
}) {
|
|
141
141
|
const { examples: t, default: n } = e;
|
|
@@ -153,7 +153,7 @@ function B({
|
|
|
153
153
|
layout: e.horizontal ? "horizontal" : "vertical"
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function ne(e, t) {
|
|
157
157
|
if (e.default != null)
|
|
158
158
|
return t(e.default);
|
|
159
159
|
if (Array.isArray(e.examples))
|
|
@@ -164,10 +164,10 @@ function re(e, t) {
|
|
|
164
164
|
function Ge(e) {
|
|
165
165
|
return e == null ? 1 : Math.round(e);
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function Se(e) {
|
|
168
168
|
return e.isWriteOnly && !e.shouldShowWriteOnly;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function Ae(e) {
|
|
171
171
|
return e.isReadOnly && !e.shouldIgnoreReadOnly || e.isDeprecated;
|
|
172
172
|
}
|
|
173
173
|
function E({
|
|
@@ -190,7 +190,7 @@ function E({
|
|
|
190
190
|
return a.factory(i);
|
|
191
191
|
}
|
|
192
192
|
if (r != null) {
|
|
193
|
-
const a =
|
|
193
|
+
const a = je.get(r);
|
|
194
194
|
if (a)
|
|
195
195
|
return a.factory(i);
|
|
196
196
|
}
|
|
@@ -199,7 +199,7 @@ function E({
|
|
|
199
199
|
if (a)
|
|
200
200
|
return a.registration.factory(i);
|
|
201
201
|
}
|
|
202
|
-
const s =
|
|
202
|
+
const s = je.findBestWidget(e);
|
|
203
203
|
return s ? s.registration.factory(i) : null;
|
|
204
204
|
}
|
|
205
205
|
function Xe(e) {
|
|
@@ -239,9 +239,9 @@ function Ye({
|
|
|
239
239
|
selector: n,
|
|
240
240
|
inner: r
|
|
241
241
|
}) {
|
|
242
|
-
return e.isRoot ? t ?
|
|
243
|
-
...
|
|
244
|
-
content: t ?
|
|
242
|
+
return e.isRoot ? t ? _(j.class("bc-stack--gap-2"), n, r) : r : ie({
|
|
243
|
+
...L({ ctx: e }),
|
|
244
|
+
content: t ? _(
|
|
245
245
|
j.class("bc-stack--gap-2 bc-stack--align-start"),
|
|
246
246
|
n,
|
|
247
247
|
r
|
|
@@ -378,10 +378,10 @@ const un = (e) => {
|
|
|
378
378
|
onChange: r != null ? (u) => r(u ?? null) : void 0,
|
|
379
379
|
onInput: i != null ? (u) => i(u ?? null) : void 0,
|
|
380
380
|
onBlur: n,
|
|
381
|
-
after: s != null ?
|
|
381
|
+
after: s != null ? ce(l, s) : l
|
|
382
382
|
});
|
|
383
383
|
};
|
|
384
|
-
function
|
|
384
|
+
function Ce({
|
|
385
385
|
ctx: e,
|
|
386
386
|
options: t,
|
|
387
387
|
controller: n
|
|
@@ -394,14 +394,14 @@ function ke({
|
|
|
394
394
|
controller: s()
|
|
395
395
|
});
|
|
396
396
|
case "date":
|
|
397
|
-
return
|
|
397
|
+
return de(wt, {
|
|
398
398
|
...t,
|
|
399
399
|
controller: s(),
|
|
400
400
|
toInput: (a) => a == null ? null : new Date(a),
|
|
401
401
|
fromInput: (a) => a?.toISOString().split("T")[0] ?? null
|
|
402
402
|
});
|
|
403
403
|
case "date-time":
|
|
404
|
-
return
|
|
404
|
+
return de(vt, {
|
|
405
405
|
...t,
|
|
406
406
|
controller: s(),
|
|
407
407
|
toInput: (a) => a == null ? null : new Date(a),
|
|
@@ -427,7 +427,7 @@ function ke({
|
|
|
427
427
|
accept: r.mediaType || "*/*",
|
|
428
428
|
maxFileSize: (typeof o?.maxBytes == "number" ? o.maxBytes : void 0) || (typeof o?.maxFileSize == "number" ? o.maxFileSize : void 0),
|
|
429
429
|
showFileList: !0
|
|
430
|
-
}) : A(
|
|
430
|
+
}) : A(fe, {
|
|
431
431
|
...t,
|
|
432
432
|
controller: s(),
|
|
433
433
|
placeholder: "Paste base64-encoded data",
|
|
@@ -466,7 +466,7 @@ function ke({
|
|
|
466
466
|
placeholder: "2001:db8::1"
|
|
467
467
|
});
|
|
468
468
|
case "regex":
|
|
469
|
-
return A(
|
|
469
|
+
return A(fe, {
|
|
470
470
|
...t,
|
|
471
471
|
controller: s(),
|
|
472
472
|
placeholder: "^[a-zA-Z0-9]+$",
|
|
@@ -474,7 +474,7 @@ function ke({
|
|
|
474
474
|
});
|
|
475
475
|
case "duration":
|
|
476
476
|
return $t(
|
|
477
|
-
({ Duration: a }) =>
|
|
477
|
+
({ Duration: a }) => de(Lt, {
|
|
478
478
|
...t,
|
|
479
479
|
controller: s(),
|
|
480
480
|
toInput: (o) => o == null ? null : a.from(o),
|
|
@@ -493,7 +493,7 @@ function ke({
|
|
|
493
493
|
controller: s()
|
|
494
494
|
});
|
|
495
495
|
case "textarea":
|
|
496
|
-
return A(
|
|
496
|
+
return A(fe, {
|
|
497
497
|
...t,
|
|
498
498
|
controller: s()
|
|
499
499
|
});
|
|
@@ -504,12 +504,12 @@ function ke({
|
|
|
504
504
|
});
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function me({
|
|
508
508
|
ctx: e,
|
|
509
509
|
controller: t
|
|
510
510
|
}) {
|
|
511
|
-
if (
|
|
512
|
-
return
|
|
511
|
+
if (Se(e))
|
|
512
|
+
return U;
|
|
513
513
|
const n = V(e.definition, e.name), r = n?.widget, i = E({
|
|
514
514
|
ctx: e,
|
|
515
515
|
controller: t,
|
|
@@ -518,12 +518,12 @@ function pe({
|
|
|
518
518
|
if (i)
|
|
519
519
|
return i;
|
|
520
520
|
const s = {
|
|
521
|
-
...
|
|
522
|
-
placeholder:
|
|
523
|
-
disabled:
|
|
521
|
+
...L({ ctx: e }),
|
|
522
|
+
placeholder: ne(e.definition, String),
|
|
523
|
+
disabled: Ae(e)
|
|
524
524
|
};
|
|
525
525
|
if ((e.isNullable || e.isOptional) && !e.shouldShowPresenceToggle)
|
|
526
|
-
return
|
|
526
|
+
return Ce({ ctx: e, options: s, controller: t });
|
|
527
527
|
if (r != null && [
|
|
528
528
|
"url",
|
|
529
529
|
"uri",
|
|
@@ -538,7 +538,7 @@ function pe({
|
|
|
538
538
|
"time",
|
|
539
539
|
"color"
|
|
540
540
|
].includes(r))
|
|
541
|
-
return
|
|
541
|
+
return Ce({ ctx: e, options: s, controller: t });
|
|
542
542
|
switch (r) {
|
|
543
543
|
case "email":
|
|
544
544
|
return A(Qt, {
|
|
@@ -585,8 +585,8 @@ function le({
|
|
|
585
585
|
ctx: e,
|
|
586
586
|
controller: t
|
|
587
587
|
}) {
|
|
588
|
-
if (
|
|
589
|
-
return
|
|
588
|
+
if (Se(e))
|
|
589
|
+
return U;
|
|
590
590
|
const n = e.definition, r = cn(e), i = V(e.definition, e.name), s = E({
|
|
591
591
|
ctx: e,
|
|
592
592
|
controller: t,
|
|
@@ -595,12 +595,12 @@ function le({
|
|
|
595
595
|
if (s)
|
|
596
596
|
return s;
|
|
597
597
|
const a = {
|
|
598
|
-
...
|
|
599
|
-
placeholder:
|
|
598
|
+
...L({ ctx: e }),
|
|
599
|
+
placeholder: ne(e.definition, String),
|
|
600
600
|
min: n.minimum,
|
|
601
601
|
max: n.maximum,
|
|
602
602
|
step: n.multipleOf,
|
|
603
|
-
disabled:
|
|
603
|
+
disabled: Ae(e)
|
|
604
604
|
}, o = (e.isNullable || e.isOptional) && !e.shouldShowPresenceToggle, l = o && !e.isNullable;
|
|
605
605
|
switch (r.widget) {
|
|
606
606
|
case "rating":
|
|
@@ -628,27 +628,27 @@ function le({
|
|
|
628
628
|
});
|
|
629
629
|
case "currency":
|
|
630
630
|
const m = typeof r.options?.currency == "string" ? r.options.currency : "USD";
|
|
631
|
-
return o ? A(
|
|
631
|
+
return o ? A(ae, {
|
|
632
632
|
...a,
|
|
633
|
-
mask:
|
|
633
|
+
mask: Pe(m),
|
|
634
634
|
controller: t
|
|
635
|
-
}) : A(
|
|
635
|
+
}) : A(ae, {
|
|
636
636
|
...a,
|
|
637
|
-
mask:
|
|
637
|
+
mask: Pe(m),
|
|
638
638
|
controller: t
|
|
639
639
|
});
|
|
640
640
|
case "percent":
|
|
641
|
-
return o ? A(
|
|
641
|
+
return o ? A(ae, {
|
|
642
642
|
...a,
|
|
643
|
-
mask:
|
|
643
|
+
mask: Ie(),
|
|
644
644
|
controller: t
|
|
645
|
-
}) : A(
|
|
645
|
+
}) : A(ae, {
|
|
646
646
|
...a,
|
|
647
|
-
mask:
|
|
647
|
+
mask: Ie(),
|
|
648
648
|
controller: t
|
|
649
649
|
});
|
|
650
650
|
default:
|
|
651
|
-
return o ? A(
|
|
651
|
+
return o ? A(pe, {
|
|
652
652
|
...a,
|
|
653
653
|
controller: l ? te(
|
|
654
654
|
t
|
|
@@ -659,10 +659,10 @@ function le({
|
|
|
659
659
|
});
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
-
function
|
|
662
|
+
function Pe(e) {
|
|
663
663
|
return `${fn(e)} 000,000.00`;
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function Ie() {
|
|
666
666
|
return "000.00%";
|
|
667
667
|
}
|
|
668
668
|
function fn(e) {
|
|
@@ -675,7 +675,7 @@ function fn(e) {
|
|
|
675
675
|
AUD: "A$"
|
|
676
676
|
}[e.toUpperCase()] || e;
|
|
677
677
|
}
|
|
678
|
-
function
|
|
678
|
+
function ye({
|
|
679
679
|
ctx: e,
|
|
680
680
|
controller: t
|
|
681
681
|
}) {
|
|
@@ -691,12 +691,12 @@ function me({
|
|
|
691
691
|
controller: t
|
|
692
692
|
});
|
|
693
693
|
}
|
|
694
|
-
function
|
|
694
|
+
function ge({
|
|
695
695
|
ctx: e,
|
|
696
696
|
controller: t
|
|
697
697
|
}) {
|
|
698
|
-
if (
|
|
699
|
-
return
|
|
698
|
+
if (Se(e))
|
|
699
|
+
return U;
|
|
700
700
|
const n = V(e.definition, e.name), r = E({
|
|
701
701
|
ctx: e,
|
|
702
702
|
controller: t,
|
|
@@ -705,16 +705,16 @@ function ye({
|
|
|
705
705
|
if (r)
|
|
706
706
|
return r;
|
|
707
707
|
const i = {
|
|
708
|
-
...
|
|
709
|
-
disabled:
|
|
710
|
-
}, s = A(
|
|
708
|
+
...L({ ctx: e }),
|
|
709
|
+
disabled: Ae(e)
|
|
710
|
+
}, s = A(ke, {
|
|
711
711
|
...i,
|
|
712
712
|
controller: t
|
|
713
713
|
});
|
|
714
714
|
if (!e.isNullable && (!e.isOptional || e.shouldShowPresenceToggle))
|
|
715
715
|
return s;
|
|
716
716
|
const a = !e.isNullable;
|
|
717
|
-
return A(
|
|
717
|
+
return A(ke, {
|
|
718
718
|
...i,
|
|
719
719
|
controller: t,
|
|
720
720
|
after: Ue(
|
|
@@ -733,14 +733,14 @@ function Ze({
|
|
|
733
733
|
controller: t,
|
|
734
734
|
resolved: n
|
|
735
735
|
});
|
|
736
|
-
return r ||
|
|
736
|
+
return r || Be(() => {
|
|
737
737
|
t.change(null);
|
|
738
738
|
});
|
|
739
739
|
}
|
|
740
740
|
function dn({
|
|
741
741
|
conflicts: e
|
|
742
742
|
}) {
|
|
743
|
-
return e.length === 0 ?
|
|
743
|
+
return e.length === 0 ? U : K(
|
|
744
744
|
q,
|
|
745
745
|
(t) => qe(
|
|
746
746
|
{
|
|
@@ -770,7 +770,7 @@ function dn({
|
|
|
770
770
|
function pn({
|
|
771
771
|
violations: e
|
|
772
772
|
}) {
|
|
773
|
-
return e.length === 0 ?
|
|
773
|
+
return e.length === 0 ? U : K(
|
|
774
774
|
q,
|
|
775
775
|
(t) => qe(
|
|
776
776
|
{
|
|
@@ -814,10 +814,10 @@ function mn({
|
|
|
814
814
|
} else
|
|
815
815
|
t.change(void 0);
|
|
816
816
|
};
|
|
817
|
-
return
|
|
817
|
+
return _(
|
|
818
818
|
I.div(
|
|
819
819
|
j.class("bc-presence-toggle"),
|
|
820
|
-
|
|
820
|
+
ie({
|
|
821
821
|
layout: "horizontal",
|
|
822
822
|
label: `Include ${i}`,
|
|
823
823
|
content: Ct({
|
|
@@ -827,13 +827,13 @@ function mn({
|
|
|
827
827
|
})
|
|
828
828
|
})
|
|
829
829
|
),
|
|
830
|
-
|
|
830
|
+
oe(r, () => n)
|
|
831
831
|
);
|
|
832
832
|
}
|
|
833
833
|
function N(e, t, n) {
|
|
834
834
|
const r = e.schemaConflicts.length > 0, i = e.notViolations.length > 0, s = e.shouldShowPresenceToggle && n != null;
|
|
835
835
|
let a = t;
|
|
836
|
-
return s && n != null && (a = mn({ ctx: e, controller: n, content: t })), !r && !i ? a :
|
|
836
|
+
return s && n != null && (a = mn({ ctx: e, controller: n, content: t })), !r && !i ? a : _(
|
|
837
837
|
j.class("bc-stack--gap-2"),
|
|
838
838
|
i ? pn({ violations: e.notViolations }) : null,
|
|
839
839
|
r ? dn({ conflicts: e.schemaConflicts }) : null,
|
|
@@ -859,7 +859,7 @@ function yn(e) {
|
|
|
859
859
|
return {
|
|
860
860
|
field: t.trim(),
|
|
861
861
|
operator: "notEquals",
|
|
862
|
-
value:
|
|
862
|
+
value: Ne(n.trim())
|
|
863
863
|
};
|
|
864
864
|
}
|
|
865
865
|
if (e.includes("=")) {
|
|
@@ -867,7 +867,7 @@ function yn(e) {
|
|
|
867
867
|
return {
|
|
868
868
|
field: t.trim(),
|
|
869
869
|
operator: "equals",
|
|
870
|
-
value:
|
|
870
|
+
value: Ne(n.trim())
|
|
871
871
|
};
|
|
872
872
|
}
|
|
873
873
|
return {
|
|
@@ -875,7 +875,7 @@ function yn(e) {
|
|
|
875
875
|
operator: "truthy"
|
|
876
876
|
};
|
|
877
877
|
}
|
|
878
|
-
function
|
|
878
|
+
function Ne(e) {
|
|
879
879
|
if (e.startsWith('"') && e.endsWith('"') || e.startsWith("'") && e.endsWith("'"))
|
|
880
880
|
return e.slice(1, -1);
|
|
881
881
|
if (e === "true") return !0;
|
|
@@ -903,7 +903,7 @@ function gn(e, t) {
|
|
|
903
903
|
}
|
|
904
904
|
return r;
|
|
905
905
|
}
|
|
906
|
-
function
|
|
906
|
+
function he(e, t) {
|
|
907
907
|
const n = gn(t, e.field);
|
|
908
908
|
switch (e.operator) {
|
|
909
909
|
case "equals":
|
|
@@ -935,7 +935,7 @@ function ge(e, t) {
|
|
|
935
935
|
}
|
|
936
936
|
}
|
|
937
937
|
function et(e, t) {
|
|
938
|
-
const n = e.conditions.map((r) => "operator" in r && ["and", "or", "not"].includes(r.operator) ? et(r, t) :
|
|
938
|
+
const n = e.conditions.map((r) => "operator" in r && ["and", "or", "not"].includes(r.operator) ? et(r, t) : he(r, t));
|
|
939
939
|
switch (e.operator) {
|
|
940
940
|
case "and":
|
|
941
941
|
return n.every(Boolean);
|
|
@@ -951,9 +951,9 @@ function hn(e, t) {
|
|
|
951
951
|
try {
|
|
952
952
|
if (typeof e == "string") {
|
|
953
953
|
const n = yn(e);
|
|
954
|
-
return
|
|
954
|
+
return he(n, t);
|
|
955
955
|
}
|
|
956
|
-
return "operator" in e && ["and", "or", "not"].includes(e.operator) ? et(e, t) :
|
|
956
|
+
return "operator" in e && ["and", "or", "not"].includes(e.operator) ? et(e, t) : he(e, t);
|
|
957
957
|
} catch (n) {
|
|
958
958
|
return console.warn("Error evaluating visibility condition:", n), !0;
|
|
959
959
|
}
|
|
@@ -963,7 +963,7 @@ function bn(e, t) {
|
|
|
963
963
|
(n) => hn(e, n)
|
|
964
964
|
);
|
|
965
965
|
}
|
|
966
|
-
const
|
|
966
|
+
const Re = {
|
|
967
967
|
behavior: "hide",
|
|
968
968
|
clearOnHide: !1
|
|
969
969
|
};
|
|
@@ -971,34 +971,20 @@ function vn({
|
|
|
971
971
|
ctx: e,
|
|
972
972
|
controller: t,
|
|
973
973
|
children: n,
|
|
974
|
-
options: r =
|
|
974
|
+
options: r = Re
|
|
975
975
|
}) {
|
|
976
976
|
const i = Qe(e.definition);
|
|
977
977
|
if (!i)
|
|
978
978
|
return n;
|
|
979
|
-
const s = { ...
|
|
979
|
+
const s = { ...Re, ...r }, a = wn(t), o = bn(i, a);
|
|
980
980
|
switch (s.clearOnHide && o.on((l) => {
|
|
981
981
|
!l && t.signal.value !== void 0 && t.change(void 0);
|
|
982
982
|
}), s.behavior) {
|
|
983
983
|
case "unmount":
|
|
984
|
-
return
|
|
985
|
-
o,
|
|
986
|
-
() => n,
|
|
987
|
-
() => W()
|
|
988
|
-
);
|
|
984
|
+
return oe(o, () => n);
|
|
989
985
|
case "hide":
|
|
990
986
|
default:
|
|
991
|
-
return
|
|
992
|
-
o,
|
|
993
|
-
() => n,
|
|
994
|
-
() => W(
|
|
995
|
-
// Keep the component in DOM but hidden
|
|
996
|
-
// This preserves form state and validation
|
|
997
|
-
n
|
|
998
|
-
// Note: In a real implementation, you'd add CSS classes
|
|
999
|
-
// to hide the element visually while keeping it in DOM
|
|
1000
|
-
)
|
|
1001
|
-
);
|
|
987
|
+
return n;
|
|
1002
988
|
}
|
|
1003
989
|
}
|
|
1004
990
|
function wn(e) {
|
|
@@ -1032,7 +1018,7 @@ function Sn({
|
|
|
1032
1018
|
t
|
|
1033
1019
|
) : t;
|
|
1034
1020
|
return _t({
|
|
1035
|
-
...
|
|
1021
|
+
...L({ ctx: e }),
|
|
1036
1022
|
options: u,
|
|
1037
1023
|
controller: m,
|
|
1038
1024
|
// Custom equality to handle null/undefined comparison
|
|
@@ -1052,8 +1038,8 @@ function An({
|
|
|
1052
1038
|
if (r)
|
|
1053
1039
|
return r;
|
|
1054
1040
|
const i = e.definition;
|
|
1055
|
-
return
|
|
1056
|
-
|
|
1041
|
+
return ce(
|
|
1042
|
+
Be(() => {
|
|
1057
1043
|
O.get(t.signal) !== i.const && t.change(i.const);
|
|
1058
1044
|
}),
|
|
1059
1045
|
Ut(zt(e.widgetLabel, ": "), ee(String(i.const)))
|
|
@@ -1120,8 +1106,8 @@ function tt(e, t, n) {
|
|
|
1120
1106
|
return I.div(
|
|
1121
1107
|
j.class("bc-object-helpers__row"),
|
|
1122
1108
|
De.gridTemplateColumns("2fr 3fr min-content"),
|
|
1123
|
-
|
|
1124
|
-
content:
|
|
1109
|
+
ie({
|
|
1110
|
+
content: Te({
|
|
1125
1111
|
value: p,
|
|
1126
1112
|
onChange: b,
|
|
1127
1113
|
disabled: M(
|
|
@@ -1140,7 +1126,7 @@ function tt(e, t, n) {
|
|
|
1140
1126
|
) : null
|
|
1141
1127
|
}),
|
|
1142
1128
|
I.div(
|
|
1143
|
-
|
|
1129
|
+
D({
|
|
1144
1130
|
ctx: i.with({ definition: h, suppressLabel: !0 }).append(e),
|
|
1145
1131
|
controller: m
|
|
1146
1132
|
})
|
|
@@ -1214,8 +1200,8 @@ function nt(e, t, n) {
|
|
|
1214
1200
|
return I.div(
|
|
1215
1201
|
j.class("bc-object-helpers__row"),
|
|
1216
1202
|
De.gridTemplateColumns("2fr 3fr min-content"),
|
|
1217
|
-
|
|
1218
|
-
content:
|
|
1203
|
+
ie({
|
|
1204
|
+
content: Te({
|
|
1219
1205
|
value: c,
|
|
1220
1206
|
onChange: f,
|
|
1221
1207
|
disabled: M(
|
|
@@ -1237,7 +1223,7 @@ function nt(e, t, n) {
|
|
|
1237
1223
|
)
|
|
1238
1224
|
}),
|
|
1239
1225
|
I.div(
|
|
1240
|
-
|
|
1226
|
+
D({
|
|
1241
1227
|
ctx: i.with({ definition: b, suppressLabel: !0 }).append(e),
|
|
1242
1228
|
controller: p
|
|
1243
1229
|
})
|
|
@@ -1302,7 +1288,7 @@ function it(e, t) {
|
|
|
1302
1288
|
function st(e) {
|
|
1303
1289
|
const { minProps: t, apSchema: n, unevaluatedProps: r } = e;
|
|
1304
1290
|
return { canRemove: (o) => o > t, makeDefaultFor: (o) => {
|
|
1305
|
-
const l =
|
|
1291
|
+
const l = ne(o, (m) => m);
|
|
1306
1292
|
if (l !== void 0) return l;
|
|
1307
1293
|
const u = o.type;
|
|
1308
1294
|
if (u === "string") return "";
|
|
@@ -1323,7 +1309,7 @@ function jn({
|
|
|
1323
1309
|
), s = i.map(([o]) => o);
|
|
1324
1310
|
return { children: i.map(([o, l]) => {
|
|
1325
1311
|
const u = o, m = t.field(u);
|
|
1326
|
-
return
|
|
1312
|
+
return D({
|
|
1327
1313
|
ctx: e.with({
|
|
1328
1314
|
definition: l,
|
|
1329
1315
|
isPropertyRequired: Array.isArray(r.required) ? r.required.includes(u) : e.hasRequiredProperty(u),
|
|
@@ -1376,8 +1362,8 @@ function at({
|
|
|
1376
1362
|
containerLayout: t,
|
|
1377
1363
|
content: n
|
|
1378
1364
|
}) {
|
|
1379
|
-
return !e.suppressLabel && e.name != null && (!t || !["fieldset", "group"].includes(t.format || "")) ?
|
|
1380
|
-
...
|
|
1365
|
+
return !e.suppressLabel && e.name != null && (!t || !["fieldset", "group"].includes(t.format || "")) ? ie({
|
|
1366
|
+
...L({ ctx: e }),
|
|
1381
1367
|
content: n
|
|
1382
1368
|
}) : n;
|
|
1383
1369
|
}
|
|
@@ -1391,10 +1377,10 @@ function kn({
|
|
|
1391
1377
|
controller: t,
|
|
1392
1378
|
config: r,
|
|
1393
1379
|
effective: n
|
|
1394
|
-
}), l =
|
|
1380
|
+
}), l = re(t.signal, (h) => {
|
|
1395
1381
|
const f = Object.keys(h ?? {}).filter((y) => !r.knownKeys.has(y));
|
|
1396
1382
|
if (f.length === 0)
|
|
1397
|
-
return
|
|
1383
|
+
return U;
|
|
1398
1384
|
const d = G(
|
|
1399
1385
|
n,
|
|
1400
1386
|
h ?? {},
|
|
@@ -1402,7 +1388,7 @@ function kn({
|
|
|
1402
1388
|
), v = f.filter((y) => !d.has(y)), g = f.filter(
|
|
1403
1389
|
(y) => d.has(y)
|
|
1404
1390
|
);
|
|
1405
|
-
return
|
|
1391
|
+
return ce(
|
|
1406
1392
|
...g.map((y) => {
|
|
1407
1393
|
const w = r.patternList.some((S) => S.test(y));
|
|
1408
1394
|
return tt(y, w, {
|
|
@@ -1434,9 +1420,9 @@ function kn({
|
|
|
1434
1420
|
config: r,
|
|
1435
1421
|
validatePropertyName: i,
|
|
1436
1422
|
helpers: s
|
|
1437
|
-
}), m =
|
|
1423
|
+
}), m = We(e), p = [...a, l, u].filter(
|
|
1438
1424
|
Boolean
|
|
1439
|
-
), c =
|
|
1425
|
+
), c = $e(
|
|
1440
1426
|
m,
|
|
1441
1427
|
e,
|
|
1442
1428
|
p,
|
|
@@ -1449,7 +1435,7 @@ function Cn({
|
|
|
1449
1435
|
controller: t,
|
|
1450
1436
|
baseDef: n
|
|
1451
1437
|
}) {
|
|
1452
|
-
return
|
|
1438
|
+
return re(t.signal, (r) => {
|
|
1453
1439
|
const { effective: i, conflicts: s } = nn(
|
|
1454
1440
|
n,
|
|
1455
1441
|
r,
|
|
@@ -1465,11 +1451,11 @@ function Cn({
|
|
|
1465
1451
|
), h = p.filter((k) => !c.has(k)), b = p.filter(
|
|
1466
1452
|
(k) => c.has(k)
|
|
1467
1453
|
), f = o.apAllowed && o.canAddUnevaluated && m.length < o.maxProps, d = (k, F) => {
|
|
1468
|
-
const P = k,
|
|
1469
|
-
if (
|
|
1470
|
-
let
|
|
1471
|
-
for (; F.has(P +
|
|
1472
|
-
return P +
|
|
1454
|
+
const P = k, x = (z) => F.has(z) ? !1 : l(z).ok;
|
|
1455
|
+
if (x(P)) return P;
|
|
1456
|
+
let B = 1;
|
|
1457
|
+
for (; F.has(P + B) || !x(P + B); ) B++;
|
|
1458
|
+
return P + B;
|
|
1473
1459
|
}, v = K(
|
|
1474
1460
|
q,
|
|
1475
1461
|
(k) => ze(
|
|
@@ -1482,17 +1468,17 @@ function Cn({
|
|
|
1482
1468
|
Object.keys(O.get(t.signal) ?? {})
|
|
1483
1469
|
), P = d("property", F);
|
|
1484
1470
|
if (!l(P).ok) return;
|
|
1485
|
-
const
|
|
1471
|
+
const B = u.getValueSchemaForNew(), z = u.makeDefaultFor(B), se = {
|
|
1486
1472
|
...O.get(t.signal) ?? {},
|
|
1487
1473
|
[P]: z
|
|
1488
1474
|
};
|
|
1489
|
-
t.change(
|
|
1475
|
+
t.change(se);
|
|
1490
1476
|
}
|
|
1491
1477
|
},
|
|
1492
1478
|
j.title(o.unevaluatedTooltip),
|
|
1493
1479
|
k.$.addLabel
|
|
1494
1480
|
)
|
|
1495
|
-
), g =
|
|
1481
|
+
), g = We(a), y = Je(o.knownProps).filter(
|
|
1496
1482
|
([, k]) => k !== !1
|
|
1497
1483
|
), S = [
|
|
1498
1484
|
...y.map(([k]) => k),
|
|
@@ -1500,15 +1486,16 @@ function Cn({
|
|
|
1500
1486
|
...h
|
|
1501
1487
|
], C = [
|
|
1502
1488
|
// Known properties
|
|
1489
|
+
// eslint-disable-next-line tempots/no-renderable-signal-map
|
|
1503
1490
|
...y.map(([k, F]) => {
|
|
1504
|
-
const P = k,
|
|
1505
|
-
return
|
|
1491
|
+
const P = k, x = t.field(P);
|
|
1492
|
+
return D({
|
|
1506
1493
|
ctx: a.with({
|
|
1507
1494
|
definition: F,
|
|
1508
1495
|
isPropertyRequired: Array.isArray(i.required) ? i.required.includes(P) : a.hasRequiredProperty(P),
|
|
1509
1496
|
suppressLabel: !1
|
|
1510
1497
|
}).append(P),
|
|
1511
|
-
controller:
|
|
1498
|
+
controller: x
|
|
1512
1499
|
});
|
|
1513
1500
|
}),
|
|
1514
1501
|
// Evaluated additional keys
|
|
@@ -1540,7 +1527,7 @@ function Cn({
|
|
|
1540
1527
|
}),
|
|
1541
1528
|
// Add affordance
|
|
1542
1529
|
o.apAllowed ? v : null
|
|
1543
|
-
].filter(Boolean), J =
|
|
1530
|
+
].filter(Boolean), J = $e(
|
|
1544
1531
|
g,
|
|
1545
1532
|
a,
|
|
1546
1533
|
C,
|
|
@@ -1598,7 +1585,7 @@ function In(e, t, n) {
|
|
|
1598
1585
|
const o = s.mapping[a];
|
|
1599
1586
|
return Nn(e, o);
|
|
1600
1587
|
}
|
|
1601
|
-
return
|
|
1588
|
+
return Ve(
|
|
1602
1589
|
e,
|
|
1603
1590
|
s.propertyName,
|
|
1604
1591
|
a
|
|
@@ -1612,7 +1599,7 @@ function In(e, t, n) {
|
|
|
1612
1599
|
const o = s.mapping[a];
|
|
1613
1600
|
return o >= 0 && o < e.length ? o : null;
|
|
1614
1601
|
}
|
|
1615
|
-
return
|
|
1602
|
+
return Ve(
|
|
1616
1603
|
e,
|
|
1617
1604
|
s.key,
|
|
1618
1605
|
a
|
|
@@ -1628,7 +1615,7 @@ function Nn(e, t) {
|
|
|
1628
1615
|
}
|
|
1629
1616
|
return null;
|
|
1630
1617
|
}
|
|
1631
|
-
function
|
|
1618
|
+
function Ve(e, t, n) {
|
|
1632
1619
|
for (let r = 0; r < e.length; r++) {
|
|
1633
1620
|
const i = e[r];
|
|
1634
1621
|
if (typeof i != "object") continue;
|
|
@@ -1682,11 +1669,11 @@ function jr({
|
|
|
1682
1669
|
});
|
|
1683
1670
|
if (r)
|
|
1684
1671
|
return r;
|
|
1685
|
-
const s = e.definition.allOf.filter((u) => typeof u == "object").map((u) =>
|
|
1672
|
+
const s = e.definition.allOf.filter((u) => typeof u == "object").map((u) => Le(u, e.schema, e.ajv)), { mergedSchema: a, conflicts: o } = ve(s, e.path), l = e.with({
|
|
1686
1673
|
definition: a,
|
|
1687
1674
|
schemaConflicts: [...e.schemaConflicts, ...o]
|
|
1688
1675
|
});
|
|
1689
|
-
return
|
|
1676
|
+
return D({
|
|
1690
1677
|
ctx: l,
|
|
1691
1678
|
controller: t
|
|
1692
1679
|
});
|
|
@@ -1711,9 +1698,9 @@ function lt({
|
|
|
1711
1698
|
if (v !== null)
|
|
1712
1699
|
return v;
|
|
1713
1700
|
}
|
|
1714
|
-
return
|
|
1701
|
+
return Oe(e, f, d);
|
|
1715
1702
|
}
|
|
1716
|
-
return
|
|
1703
|
+
return Oe(e, f, d);
|
|
1717
1704
|
}), o = O.get(a), l = X(o >= 0 ? o : 0);
|
|
1718
1705
|
t.onDispose(l.dispose);
|
|
1719
1706
|
let u = !1;
|
|
@@ -1731,7 +1718,7 @@ function lt({
|
|
|
1731
1718
|
selected: l,
|
|
1732
1719
|
onChange: c
|
|
1733
1720
|
// auto mode chooses segmented for <=3
|
|
1734
|
-
}) : "", b =
|
|
1721
|
+
}) : "", b = re(l, (f) => D({
|
|
1735
1722
|
ctx: e.with({
|
|
1736
1723
|
definition: r[O.get(f)],
|
|
1737
1724
|
// Suppress inner labels only when combinator is nested (non-root)
|
|
@@ -1746,7 +1733,7 @@ function lt({
|
|
|
1746
1733
|
inner: b
|
|
1747
1734
|
});
|
|
1748
1735
|
}
|
|
1749
|
-
function
|
|
1736
|
+
function D({
|
|
1750
1737
|
ctx: e,
|
|
1751
1738
|
controller: t
|
|
1752
1739
|
}) {
|
|
@@ -1758,8 +1745,8 @@ function x({
|
|
|
1758
1745
|
);
|
|
1759
1746
|
if (a.length > 0) {
|
|
1760
1747
|
const o = a.map(
|
|
1761
|
-
(c) =>
|
|
1762
|
-
), { mergedSchema: l, conflicts: u } =
|
|
1748
|
+
(c) => Le(c, e.schema, e.ajv)
|
|
1749
|
+
), { mergedSchema: l, conflicts: u } = ve(o, e.path), { allOf: m, ...p } = r;
|
|
1763
1750
|
r = { ...p, ...l }, i = e.with({
|
|
1764
1751
|
definition: r,
|
|
1765
1752
|
schemaConflicts: [...e.schemaConflicts, ...u]
|
|
@@ -1866,7 +1853,7 @@ function x({
|
|
|
1866
1853
|
case "integer":
|
|
1867
1854
|
return N(
|
|
1868
1855
|
i,
|
|
1869
|
-
|
|
1856
|
+
ye({
|
|
1870
1857
|
ctx: i,
|
|
1871
1858
|
controller: t
|
|
1872
1859
|
}),
|
|
@@ -1875,7 +1862,7 @@ function x({
|
|
|
1875
1862
|
case "string":
|
|
1876
1863
|
return N(
|
|
1877
1864
|
i,
|
|
1878
|
-
|
|
1865
|
+
me({
|
|
1879
1866
|
ctx: i,
|
|
1880
1867
|
controller: t
|
|
1881
1868
|
}),
|
|
@@ -1884,7 +1871,7 @@ function x({
|
|
|
1884
1871
|
case "boolean":
|
|
1885
1872
|
return N(
|
|
1886
1873
|
i,
|
|
1887
|
-
|
|
1874
|
+
ge({
|
|
1888
1875
|
ctx: i,
|
|
1889
1876
|
controller: t
|
|
1890
1877
|
}),
|
|
@@ -1924,7 +1911,7 @@ function x({
|
|
|
1924
1911
|
t,
|
|
1925
1912
|
N(
|
|
1926
1913
|
i,
|
|
1927
|
-
|
|
1914
|
+
ye({
|
|
1928
1915
|
ctx: i,
|
|
1929
1916
|
controller: t
|
|
1930
1917
|
}),
|
|
@@ -1937,7 +1924,7 @@ function x({
|
|
|
1937
1924
|
t,
|
|
1938
1925
|
N(
|
|
1939
1926
|
i,
|
|
1940
|
-
|
|
1927
|
+
me({
|
|
1941
1928
|
ctx: i,
|
|
1942
1929
|
controller: t
|
|
1943
1930
|
}),
|
|
@@ -1950,7 +1937,7 @@ function x({
|
|
|
1950
1937
|
t,
|
|
1951
1938
|
N(
|
|
1952
1939
|
i,
|
|
1953
|
-
|
|
1940
|
+
ge({
|
|
1954
1941
|
ctx: i,
|
|
1955
1942
|
controller: t
|
|
1956
1943
|
}),
|
|
@@ -2037,7 +2024,7 @@ function En({
|
|
|
2037
2024
|
validationMode: a,
|
|
2038
2025
|
submitting: o
|
|
2039
2026
|
});
|
|
2040
|
-
return e === !0 ? ue({ ctx: l, controller: t }) : e === !1 ?
|
|
2027
|
+
return e === !0 ? ue({ ctx: l, controller: t }) : e === !1 ? U : D({ ctx: l, controller: t });
|
|
2041
2028
|
}
|
|
2042
2029
|
function R(e, t, n) {
|
|
2043
2030
|
return Qe(e.definition) ? vn({
|
|
@@ -2057,19 +2044,19 @@ function Fn(e) {
|
|
|
2057
2044
|
isTuple: !0,
|
|
2058
2045
|
prefixItems: e.prefixItems,
|
|
2059
2046
|
additionalItemsSchema: Array.isArray(e.items) ? !0 : e.items ?? !0,
|
|
2060
|
-
tupleLabels:
|
|
2047
|
+
tupleLabels: Ee(e)
|
|
2061
2048
|
} : Array.isArray(e.items) ? {
|
|
2062
2049
|
isTuple: !0,
|
|
2063
2050
|
prefixItems: e.items,
|
|
2064
2051
|
additionalItemsSchema: e.additionalItems ?? !0,
|
|
2065
|
-
tupleLabels:
|
|
2052
|
+
tupleLabels: Ee(e)
|
|
2066
2053
|
} : {
|
|
2067
2054
|
isTuple: !1,
|
|
2068
2055
|
prefixItems: [],
|
|
2069
2056
|
additionalItemsSchema: e.items ?? !0
|
|
2070
2057
|
};
|
|
2071
2058
|
}
|
|
2072
|
-
function
|
|
2059
|
+
function Ee(e) {
|
|
2073
2060
|
if (typeof e == "boolean") return;
|
|
2074
2061
|
const t = e["x:ui"];
|
|
2075
2062
|
return Array.isArray(t?.tupleLabels) ? t.tupleLabels : void 0;
|
|
@@ -2145,15 +2132,15 @@ function ut({
|
|
|
2145
2132
|
}
|
|
2146
2133
|
return `Contains ${c.count} item(s) matching ${h}`;
|
|
2147
2134
|
}) : null, p = Kt({
|
|
2148
|
-
...
|
|
2135
|
+
...L({ ctx: e }),
|
|
2149
2136
|
createItem: () => {
|
|
2150
2137
|
const c = t.signal.value?.length ?? 0;
|
|
2151
2138
|
if (s.isTuple && c < s.prefixItems.length) {
|
|
2152
2139
|
const h = s.prefixItems[c];
|
|
2153
|
-
return
|
|
2140
|
+
return ne(h, () => {
|
|
2154
2141
|
});
|
|
2155
2142
|
} else
|
|
2156
|
-
return
|
|
2143
|
+
return ne(
|
|
2157
2144
|
s.additionalItemsSchema,
|
|
2158
2145
|
() => {
|
|
2159
2146
|
}
|
|
@@ -2169,21 +2156,21 @@ function ut({
|
|
|
2169
2156
|
const h = c.item, b = c.position.index;
|
|
2170
2157
|
let f, d;
|
|
2171
2158
|
s.isTuple && b < s.prefixItems.length ? (f = s.prefixItems[b], s.tupleLabels?.[b] ? d = s.tupleLabels[b] : typeof f == "object" && f.title ? d = f.title : d = `Item ${b + 1}`) : (f = s.additionalItemsSchema, s.isTuple && (d = `Additional Item ${b - s.prefixItems.length + 1}`));
|
|
2172
|
-
const v =
|
|
2159
|
+
const v = D({
|
|
2173
2160
|
ctx: e.with({ definition: f }).append(b),
|
|
2174
2161
|
controller: h
|
|
2175
2162
|
}), g = l.map((C) => C.has(b)), y = u.map(
|
|
2176
2163
|
(C) => C.matchingIndices.has(b)
|
|
2177
2164
|
);
|
|
2178
2165
|
let w = v;
|
|
2179
|
-
d && s.isTuple && (w =
|
|
2166
|
+
d && s.isTuple && (w = _(
|
|
2180
2167
|
j.class("bc-stack--gap-1"),
|
|
2181
2168
|
ee(j.class("bc-array-control__item-label"), d),
|
|
2182
2169
|
w
|
|
2183
2170
|
));
|
|
2184
2171
|
const S = [];
|
|
2185
2172
|
return i.uniqueItems && S.push(
|
|
2186
|
-
|
|
2173
|
+
oe(
|
|
2187
2174
|
g,
|
|
2188
2175
|
() => ee(
|
|
2189
2176
|
j.class(
|
|
@@ -2193,7 +2180,7 @@ function ut({
|
|
|
2193
2180
|
)
|
|
2194
2181
|
)
|
|
2195
2182
|
), i.contains && S.push(
|
|
2196
|
-
|
|
2183
|
+
oe(
|
|
2197
2184
|
y,
|
|
2198
2185
|
() => ee(
|
|
2199
2186
|
j.class(
|
|
@@ -2202,13 +2189,13 @@ function ut({
|
|
|
2202
2189
|
"✓ Matches required pattern"
|
|
2203
2190
|
)
|
|
2204
2191
|
)
|
|
2205
|
-
), S.length > 0 ?
|
|
2192
|
+
), S.length > 0 ? _(j.class("bc-stack--gap-1"), w, ...S) : w;
|
|
2206
2193
|
}
|
|
2207
2194
|
});
|
|
2208
|
-
return i.contains && m ?
|
|
2195
|
+
return i.contains && m ? _(
|
|
2209
2196
|
j.class("bc-stack--gap-2"),
|
|
2210
2197
|
p,
|
|
2211
|
-
|
|
2198
|
+
re(
|
|
2212
2199
|
M(
|
|
2213
2200
|
u,
|
|
2214
2201
|
m
|
|
@@ -2267,13 +2254,13 @@ function ct({
|
|
|
2267
2254
|
mode: a.selector ?? "auto"
|
|
2268
2255
|
}), h = (f) => {
|
|
2269
2256
|
p.switchToBranch(f, a.confirmBranchChange);
|
|
2270
|
-
}, b =
|
|
2257
|
+
}, b = re(p.activeBranch, (f) => {
|
|
2271
2258
|
const d = O.get(f), v = p.getBranchController(d);
|
|
2272
2259
|
if (u && (d === "number" || d === "integer")) {
|
|
2273
2260
|
const y = i;
|
|
2274
|
-
return A(
|
|
2261
|
+
return A(pe, {
|
|
2275
2262
|
// Suppress inner labels only when union is nested (non-root)
|
|
2276
|
-
...
|
|
2263
|
+
...L({
|
|
2277
2264
|
ctx: e.with({ suppressLabel: !e.isRoot })
|
|
2278
2265
|
}),
|
|
2279
2266
|
controller: v,
|
|
@@ -2289,7 +2276,7 @@ function ct({
|
|
|
2289
2276
|
});
|
|
2290
2277
|
switch (d) {
|
|
2291
2278
|
case "string":
|
|
2292
|
-
return
|
|
2279
|
+
return me({
|
|
2293
2280
|
ctx: g,
|
|
2294
2281
|
controller: v
|
|
2295
2282
|
});
|
|
@@ -2299,12 +2286,12 @@ function ct({
|
|
|
2299
2286
|
controller: v
|
|
2300
2287
|
});
|
|
2301
2288
|
case "integer":
|
|
2302
|
-
return
|
|
2289
|
+
return ye({
|
|
2303
2290
|
ctx: g,
|
|
2304
2291
|
controller: v
|
|
2305
2292
|
});
|
|
2306
2293
|
case "boolean":
|
|
2307
|
-
return
|
|
2294
|
+
return ge({
|
|
2308
2295
|
ctx: g,
|
|
2309
2296
|
controller: v
|
|
2310
2297
|
});
|
|
@@ -2328,8 +2315,8 @@ function ct({
|
|
|
2328
2315
|
});
|
|
2329
2316
|
}
|
|
2330
2317
|
default:
|
|
2331
|
-
return A(
|
|
2332
|
-
...
|
|
2318
|
+
return A(pe, {
|
|
2319
|
+
...L({ ctx: g }),
|
|
2333
2320
|
controller: v
|
|
2334
2321
|
});
|
|
2335
2322
|
}
|
|
@@ -2427,7 +2414,7 @@ function Wn(e, t, n = !1) {
|
|
|
2427
2414
|
message: "Cross-field validation error"
|
|
2428
2415
|
});
|
|
2429
2416
|
}
|
|
2430
|
-
return r.length > 0 ?
|
|
2417
|
+
return r.length > 0 ? we(r) : $.valid;
|
|
2431
2418
|
}
|
|
2432
2419
|
function $n(e, t) {
|
|
2433
2420
|
if (e == null || typeof e != "object")
|
|
@@ -2463,7 +2450,7 @@ function Ln(e) {
|
|
|
2463
2450
|
(i) => typeof i == "object" && i != null && typeof i.validate == "function"
|
|
2464
2451
|
)), Object.keys(n).length > 0 ? n : void 0;
|
|
2465
2452
|
}
|
|
2466
|
-
function
|
|
2453
|
+
function be(e, t) {
|
|
2467
2454
|
if (!e.startsWith("$."))
|
|
2468
2455
|
throw new Error(`Invalid JSONPath: ${e}. Must start with '$.'.`);
|
|
2469
2456
|
const n = e.slice(2).split(/[.[\]]/).filter(Boolean);
|
|
@@ -2487,14 +2474,14 @@ function Bn(e, t) {
|
|
|
2487
2474
|
try {
|
|
2488
2475
|
if (typeof e.condition == "function") {
|
|
2489
2476
|
const r = (Array.isArray(e.watch) ? e.watch : [e.watch]).map(
|
|
2490
|
-
(i) =>
|
|
2477
|
+
(i) => be(i, t)
|
|
2491
2478
|
);
|
|
2492
2479
|
return e.condition(
|
|
2493
2480
|
r.length === 1 ? r[0] : r,
|
|
2494
2481
|
t
|
|
2495
2482
|
);
|
|
2496
2483
|
}
|
|
2497
|
-
return typeof e.condition == "string" ? !!
|
|
2484
|
+
return typeof e.condition == "string" ? !!be(e.condition, t) : !1;
|
|
2498
2485
|
} catch (n) {
|
|
2499
2486
|
return console.warn("Error evaluating conditional validation:", n), !1;
|
|
2500
2487
|
}
|
|
@@ -2522,7 +2509,7 @@ function Dn(e, t, n, r) {
|
|
|
2522
2509
|
try {
|
|
2523
2510
|
const a = {};
|
|
2524
2511
|
for (const l of s.fields)
|
|
2525
|
-
a[l] =
|
|
2512
|
+
a[l] = be(`$.${l}`, t);
|
|
2526
2513
|
const o = s.validate(a, t);
|
|
2527
2514
|
if (o) {
|
|
2528
2515
|
const l = s.target || s.fields[0];
|
|
@@ -2547,7 +2534,7 @@ function Dn(e, t, n, r) {
|
|
|
2547
2534
|
i.push(...a);
|
|
2548
2535
|
}
|
|
2549
2536
|
}
|
|
2550
|
-
return i.length > 0 ?
|
|
2537
|
+
return i.length > 0 ? we(i) : $.valid;
|
|
2551
2538
|
}
|
|
2552
2539
|
function xn(e) {
|
|
2553
2540
|
if (e.type === "valid") return [];
|
|
@@ -2599,7 +2586,7 @@ class Kn {
|
|
|
2599
2586
|
t,
|
|
2600
2587
|
X({
|
|
2601
2588
|
isValidating: !1,
|
|
2602
|
-
result:
|
|
2589
|
+
result: $.valid,
|
|
2603
2590
|
lastValidatedValue: void 0,
|
|
2604
2591
|
lastValidatedAt: 0
|
|
2605
2592
|
})
|
|
@@ -2617,7 +2604,7 @@ class Kn {
|
|
|
2617
2604
|
if (t.minLength && typeof n == "string" && n.length < t.minLength) {
|
|
2618
2605
|
a.set({
|
|
2619
2606
|
...a.value,
|
|
2620
|
-
result:
|
|
2607
|
+
result: $.valid,
|
|
2621
2608
|
isValidating: !1
|
|
2622
2609
|
});
|
|
2623
2610
|
return;
|
|
@@ -2628,13 +2615,13 @@ class Kn {
|
|
|
2628
2615
|
this.abortControllers.set(s, m), a.set({
|
|
2629
2616
|
...a.value,
|
|
2630
2617
|
isValidating: !0,
|
|
2631
|
-
result: t.loadingMessage ?
|
|
2618
|
+
result: t.loadingMessage ? $.invalid({ message: t.loadingMessage }) : a.value.result
|
|
2632
2619
|
});
|
|
2633
2620
|
try {
|
|
2634
2621
|
const p = await t.validate(n, r);
|
|
2635
2622
|
if (m.signal.aborted)
|
|
2636
2623
|
return;
|
|
2637
|
-
const c = p.valid ?
|
|
2624
|
+
const c = p.valid ? $.valid : $.invalid({
|
|
2638
2625
|
message: p.message || "Async validation failed",
|
|
2639
2626
|
context: p.context
|
|
2640
2627
|
});
|
|
@@ -2650,7 +2637,7 @@ class Kn {
|
|
|
2650
2637
|
const c = p instanceof Error ? p.message : "Async validation error";
|
|
2651
2638
|
a.set({
|
|
2652
2639
|
isValidating: !1,
|
|
2653
|
-
result:
|
|
2640
|
+
result: $.invalid({ message: c }),
|
|
2654
2641
|
lastValidatedValue: n,
|
|
2655
2642
|
lastValidatedAt: Date.now()
|
|
2656
2643
|
});
|
|
@@ -2799,18 +2786,18 @@ function Yn(e) {
|
|
|
2799
2786
|
let n = e.minimum, r = e.maximum;
|
|
2800
2787
|
if (e.exclusiveMinimum !== void 0) {
|
|
2801
2788
|
const a = typeof e.exclusiveMinimum == "number" ? e.exclusiveMinimum : e.exclusiveMinimum ? n ?? 0 : void 0;
|
|
2802
|
-
a !== void 0 && (n = t ? a + 1 : a +
|
|
2789
|
+
a !== void 0 && (n = t ? a + 1 : a + Fe(e));
|
|
2803
2790
|
}
|
|
2804
2791
|
if (e.exclusiveMaximum !== void 0) {
|
|
2805
2792
|
const a = typeof e.exclusiveMaximum == "number" ? e.exclusiveMaximum : e.exclusiveMaximum ? r ?? 0 : void 0;
|
|
2806
|
-
a !== void 0 && (r = t ? a - 1 : a -
|
|
2793
|
+
a !== void 0 && (r = t ? a - 1 : a - Fe(e));
|
|
2807
2794
|
}
|
|
2808
2795
|
let i;
|
|
2809
2796
|
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;
|
|
2810
2797
|
const s = e.multipleOf;
|
|
2811
2798
|
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;
|
|
2812
2799
|
}
|
|
2813
|
-
function
|
|
2800
|
+
function Fe(e) {
|
|
2814
2801
|
return e.multipleOf !== void 0 ? e.multipleOf : 1e-3;
|
|
2815
2802
|
}
|
|
2816
2803
|
function Zn(e) {
|
|
@@ -2885,9 +2872,9 @@ function Or({
|
|
|
2885
2872
|
(b) => {
|
|
2886
2873
|
if (b.ok) {
|
|
2887
2874
|
const { ajv: f, validate: d } = b.value, v = Ln(e), g = Un(e), y = g.length > 0 ? new Kn() : null, w = s ?? "onTouched", S = (T) => {
|
|
2888
|
-
const
|
|
2875
|
+
const W = d(T);
|
|
2889
2876
|
let Z;
|
|
2890
|
-
return
|
|
2877
|
+
return W ? Z = $.valid : Z = we(
|
|
2891
2878
|
d.errors ?? []
|
|
2892
2879
|
), v ? Dn(
|
|
2893
2880
|
T,
|
|
@@ -2903,25 +2890,25 @@ function Or({
|
|
|
2903
2890
|
validate: w === "onSubmit" ? void 0 : S
|
|
2904
2891
|
}), k = v ? _n(v) : null, F = i !== !1;
|
|
2905
2892
|
let P = !1;
|
|
2906
|
-
const
|
|
2893
|
+
const x = F ? C.signal.on((T) => {
|
|
2907
2894
|
if (P) return;
|
|
2908
|
-
const
|
|
2909
|
-
d(
|
|
2895
|
+
const W = nr(T);
|
|
2896
|
+
d(W) && !rr(W, T) && (P = !0, C.change(W), P = !1);
|
|
2910
2897
|
}) : () => {
|
|
2911
|
-
},
|
|
2912
|
-
|
|
2898
|
+
}, B = k ? C.signal.on((T, W) => {
|
|
2899
|
+
W != null && JSON.stringify(T) !== JSON.stringify(W) && setTimeout(() => {
|
|
2913
2900
|
const pt = C.status.value;
|
|
2914
2901
|
J(pt);
|
|
2915
2902
|
}, 10);
|
|
2916
2903
|
}) : () => {
|
|
2917
2904
|
}, z = y && g.length > 0 ? C.signal.on((T) => {
|
|
2918
|
-
for (const
|
|
2919
|
-
y.validateField(
|
|
2905
|
+
for (const W of g)
|
|
2906
|
+
y.validateField(W, T, T);
|
|
2920
2907
|
}) : () => {
|
|
2921
|
-
},
|
|
2922
|
-
|
|
2923
|
-
}, ft = o ? ir(o) : void 0, dt =
|
|
2924
|
-
Tt(
|
|
2908
|
+
}, se = () => {
|
|
2909
|
+
x(), B(), z(), y?.dispose(), C.dispose();
|
|
2910
|
+
}, ft = o ? ir(o) : void 0, dt = ce(
|
|
2911
|
+
Tt(se),
|
|
2925
2912
|
En({
|
|
2926
2913
|
schema: e,
|
|
2927
2914
|
controller: C,
|
|
@@ -2986,27 +2973,27 @@ export {
|
|
|
2986
2973
|
ue as JSONSchemaAny,
|
|
2987
2974
|
Rn as JSONSchemaAnyOf,
|
|
2988
2975
|
ut as JSONSchemaArray,
|
|
2989
|
-
|
|
2976
|
+
ge as JSONSchemaBoolean,
|
|
2990
2977
|
An as JSONSchemaConst,
|
|
2991
2978
|
En as JSONSchemaControl,
|
|
2992
2979
|
Sn as JSONSchemaEnum,
|
|
2993
2980
|
Or as JSONSchemaForm,
|
|
2994
|
-
|
|
2995
|
-
|
|
2981
|
+
D as JSONSchemaGenericControl,
|
|
2982
|
+
ye as JSONSchemaInteger,
|
|
2996
2983
|
Ze as JSONSchemaNull,
|
|
2997
2984
|
le as JSONSchemaNumber,
|
|
2998
2985
|
ot as JSONSchemaObject,
|
|
2999
2986
|
Vn as JSONSchemaOneOf,
|
|
3000
|
-
|
|
2987
|
+
me as JSONSchemaString,
|
|
3001
2988
|
ct as JSONSchemaUnion,
|
|
3002
2989
|
Rt as SchemaContext,
|
|
3003
|
-
|
|
2990
|
+
we as ajvErrorsToControllerValidation,
|
|
3004
2991
|
Fr as ajvErrorsToDependencies,
|
|
3005
2992
|
Tr as buildMessage,
|
|
3006
2993
|
Mr as buildPath,
|
|
3007
2994
|
Wr as clearCaches,
|
|
3008
2995
|
$r as clearCachesForAjv,
|
|
3009
|
-
|
|
2996
|
+
Me as compileWithCache,
|
|
3010
2997
|
nn as composeEffectiveObjectSchema,
|
|
3011
2998
|
kr as createAJVStandardSchema,
|
|
3012
2999
|
Ir as createDiagnosticWidget,
|
|
@@ -3021,5 +3008,5 @@ export {
|
|
|
3021
3008
|
G as getEvaluatedProperties,
|
|
3022
3009
|
en as hasConditionalFeatures,
|
|
3023
3010
|
Br as jsonPointerToSegments,
|
|
3024
|
-
|
|
3011
|
+
ve as mergeAllOf
|
|
3025
3012
|
};
|