@tempots/beatui 0.87.3 → 0.87.4
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/{ar-DjMvIww5.js → ar-Dn7AkNO5.js} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +1 -1
- package/dist/{auth-divider-BIefTDoO.js → auth-divider-BZPM2Xd3.js} +101 -103
- package/dist/{auth-divider-V_Se6Qhe.cjs → auth-divider-Cj-xJxF_.cjs} +1 -1
- package/dist/better-auth/index.cjs.js +1 -1
- package/dist/better-auth/index.es.js +12 -12
- package/dist/{colors-BmLYKmoH.js → colors-CatA-RXf.js} +9 -9
- package/dist/{de-wChFYqM4.js → de-QYhBiWv7.js} +1 -1
- package/dist/deep-merge-BmxkFFi1.cjs +1 -0
- package/dist/{deep-merge-BRqRzEQs.js → deep-merge-D076XcC5.js} +152 -156
- package/dist/{duration-input-BDEb1Bb7.js → duration-input-6RN16H08.js} +5 -5
- package/dist/{duration-input-BtFL5Vjx.cjs → duration-input-CJU-yeKk.cjs} +1 -1
- package/dist/{editor-toolbar-group-CwCCGzEC.js → editor-toolbar-group-DRCbXeQP.js} +6 -3
- package/dist/{es-CmPF3IGl.js → es-Ba31pZAd.js} +1 -1
- package/dist/{fa-D696e75R.js → fa-DvLjl_Ha.js} +1 -1
- package/dist/{fr-B0jeX1Hx.js → fr-D64yBpAp.js} +1 -1
- package/dist/{he-SgAsIYJA.js → he-DHZGEQ7C.js} +1 -1
- package/dist/{hi-s9oiIihq.js → hi-CeAXVCvp.js} +1 -1
- package/dist/{index-CaWDj1Vg.cjs → index-BIGCKfNz.cjs} +10 -10
- package/dist/{index-DdqGL9Jk.js → index-BTITknMc.js} +701 -684
- package/dist/{index-qa82MK4Z.cjs → index-Bso_SkEn.cjs} +1 -1
- package/dist/{index-B0t-nt7i.js → index-DWDC-qRY.js} +4 -4
- package/dist/{index-D2_J_-XS.js → index-rHnH2IGb.js} +77 -77
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +1015 -1018
- package/dist/{index.esm-ChUrm4xR.js → index.esm-By0m3ki1.js} +3 -3
- package/dist/{input-container-DhUiLmXE.js → input-container-BTyCOubf.js} +1 -1
- package/dist/{it-Dc4IMciD.js → it-Im0KgKWL.js} +1 -1
- package/dist/{ja-D2t2g5xj.js → ja-lliCbC19.js} +1 -1
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +97 -103
- package/dist/json-schema-display/index.cjs.js +1 -1
- package/dist/json-schema-display/index.es.js +15 -15
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +349 -351
- package/dist/{ko-BRylA5JZ.js → ko-B9W4RBBs.js} +1 -1
- package/dist/lexical/index.cjs.js +5 -12
- package/dist/lexical/index.es.js +54 -84
- package/dist/{menu-Ui4lUPHM.js → menu-CV85y3Xf.js} +1 -1
- package/dist/{modal-Dkje8L_l.js → modal-CD3DwAlD.js} +5 -5
- package/dist/{modal-Coenk8Fy.cjs → modal-jJMS0ZlW.cjs} +1 -1
- package/dist/monaco/index.es.js +1 -1
- package/dist/{nl-Dh7LUWAn.js → nl-ba5SyHsw.js} +1 -1
- package/dist/notice-9lpZ-VDn.cjs +1 -0
- package/dist/{notice-BmkckDsD.js → notice-Cc26kgiB.js} +26 -28
- package/dist/{oneof-branch-detection-Vov_e3kI.cjs → oneof-branch-detection-BsGhMslW.cjs} +6 -6
- package/dist/{oneof-branch-detection-BED_n2MT.js → oneof-branch-detection-DiAtgGQH.js} +1740 -1734
- package/dist/{pl-XEG-p1Q9.js → pl-DCiJAZWC.js} +1 -1
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/{pt-DYsDA2sZ.js → pt-Df5bAGWA.js} +1 -1
- package/dist/{ru-BTKBykp-.js → ru-Dg-c670Y.js} +1 -1
- package/dist/stack-4VUGISn6.cjs +1 -0
- package/dist/{stack-BJgsPJ9A.js → stack-Bm-UZosx.js} +145 -139
- package/dist/tailwind/preset.es.js +2 -2
- package/dist/tailwind/vite-plugin.es.js +1 -1
- package/dist/{text-input-BZmAB3_o.js → text-input-Cux5iiUC.js} +5 -5
- package/dist/{theme-BzpMLdvH.js → theme-kQZEeusG.js} +4 -4
- package/dist/{toolbar-Pdj-F80l.js → toolbar-DYmKrtic.js} +1 -1
- package/dist/{tr-Cp8ZCUic.js → tr-Dhpiq0u_.js} +1 -1
- package/dist/{translations-BGblCUBj.js → translations-BLlzvZgw.js} +30 -30
- package/dist/{translations-jUYta1_1.js → translations-COSDzhvR.js} +1 -1
- package/dist/types/auth-i18n/translations.d.ts +2 -2
- package/dist/types/beatui-i18n/translations.d.ts +2 -2
- package/dist/types/better-auth/components/authenticated.d.ts +2 -2
- package/dist/types/better-auth/components/better-auth-container.d.ts +1 -1
- package/dist/types/better-auth/i18n/translations.d.ts +2 -2
- package/dist/types/better-auth/provider.d.ts +2 -2
- package/dist/types/components/auth/auth-container.d.ts +1 -1
- package/dist/types/components/auth/auth-email-prop.d.ts +1 -1
- package/dist/types/components/beatui.d.ts +1 -1
- package/dist/types/components/button/button.d.ts +1 -1
- package/dist/types/components/content/native-pdf-preview.d.ts +1 -1
- package/dist/types/components/content/pdfjs-preview.d.ts +1 -1
- package/dist/types/components/data/icon.d.ts +1 -1
- package/dist/types/components/data/page-drop-zone.d.ts +1 -1
- package/dist/types/components/data/unstyled-drop-zone.d.ts +1 -1
- package/dist/types/components/editor-toolbar/editor-toolbar-button.d.ts +1 -1
- package/dist/types/components/editor-toolbar/editor-toolbar-group.d.ts +1 -1
- package/dist/types/components/form/control/control.d.ts +2 -2
- package/dist/types/components/form/control/ensure-control.d.ts +1 -1
- package/dist/types/components/form/control/list-control.d.ts +1 -1
- package/dist/types/components/form/controller/color-controller.d.ts +4 -4
- package/dist/types/components/form/input/appearance-selector.d.ts +2 -2
- package/dist/types/components/form/input/base64-input.d.ts +1 -1
- package/dist/types/components/form/input/base64s-input.d.ts +1 -1
- package/dist/types/components/form/input/combobox-tags-input.d.ts +1 -1
- package/dist/types/components/form/input/email-input.d.ts +1 -1
- package/dist/types/components/form/input/file-input.d.ts +1 -1
- package/dist/types/components/form/input/files-input.d.ts +1 -1
- package/dist/types/components/form/input/input-options.d.ts +1 -1
- package/dist/types/components/form/input/list-input.d.ts +1 -1
- package/dist/types/components/form/input/nullable-base64-input.d.ts +1 -1
- package/dist/types/components/form/input/nullable-plain-date-input.d.ts +12 -12
- package/dist/types/components/form/input/nullable-plain-date-time-input.d.ts +12 -12
- package/dist/types/components/form/input/nullable-plain-time-input.d.ts +12 -12
- package/dist/types/components/form/input/nullable-plain-year-month-input.d.ts +12 -12
- package/dist/types/components/form/input/password-input.d.ts +1 -1
- package/dist/types/components/form/input/plain-date-input.d.ts +12 -12
- package/dist/types/components/form/input/plain-date-time-input.d.ts +12 -12
- package/dist/types/components/form/input/plain-time-input.d.ts +12 -12
- package/dist/types/components/form/input/plain-year-month-input.d.ts +12 -12
- package/dist/types/components/form/input/select-tags-input.d.ts +3 -3
- package/dist/types/components/form/use-form.d.ts +3 -3
- package/dist/types/components/i18n/locale-direction.d.ts +1 -1
- package/dist/types/components/i18n/locale-selector.d.ts +1 -1
- package/dist/types/components/i18n/locale.d.ts +1 -1
- package/dist/types/components/i18n/make-i18nprovider.d.ts +2 -2
- package/dist/types/components/layout/app-shell.d.ts +1 -1
- package/dist/types/components/lexical/code/language-selector.d.ts +1 -1
- package/dist/types/components/lexical/floating/block-handle.d.ts +1 -1
- package/dist/types/components/lexical/floating/floating-toolbar.d.ts +1 -1
- package/dist/types/components/lexical/floating/slash-command-palette.d.ts +1 -1
- package/dist/types/components/lexical/table/table-controls.d.ts +1 -1
- package/dist/types/components/lexical/toolbar/lexical-toolbar.d.ts +1 -1
- package/dist/types/components/lexical/toolbar/toolbar-helpers.d.ts +2 -2
- package/dist/types/components/media/pdf-page-viewer.d.ts +1 -1
- package/dist/types/components/misc/notification-provider.d.ts +2 -2
- package/dist/types/components/navigation/link/button-link.d.ts +1 -1
- package/dist/types/components/navigation/link/link.d.ts +1 -1
- package/dist/types/components/navigation/link/navigation-link.d.ts +1 -1
- package/dist/types/components/navigation/pagination.d.ts +1 -1
- package/dist/types/components/navigation/sidebar/sidebar.d.ts +2 -2
- package/dist/types/components/navigation/toolbar/toolbar.d.ts +1 -1
- package/dist/types/components/prosemirror/link-control.d.ts +1 -1
- package/dist/types/components/prosemirror/prosemirror-toolbar.d.ts +1 -1
- package/dist/types/components/prosemirror/utils.d.ts +2 -2
- package/dist/types/components/theme/theme.d.ts +2 -2
- package/dist/types/i18n/translate.d.ts +1 -1
- package/dist/types/utils/delay-signal.d.ts +1 -1
- package/dist/types/utils/use-animated-toggle.d.ts +22 -22
- package/dist/{ur-DkIYJxsF.js → ur-Lr1p8f9y.js} +1 -1
- package/dist/{use-animated-toggle-89fKlXxy.js → use-animated-toggle-C7PTmnZi.js} +7 -7
- package/dist/{use-form-BSvvERhX.js → use-form-BfzX3bwL.js} +13 -13
- package/dist/{use-form-B_mCauP0.cjs → use-form-i97PToWB.cjs} +1 -1
- package/dist/{vi-DKw6PBja.js → vi-jozfaxSj.js} +1 -1
- package/dist/widget-customization-BZqPoojo.cjs +1 -0
- package/dist/{widget-customization-DFr3ycD7.js → widget-customization-fMNSVtuP.js} +29 -29
- package/dist/{zh-CaKHseXJ.js → zh-BBYKq49d.js} +1 -1
- package/package.json +35 -31
- package/dist/deep-merge-CvN7Xvd1.cjs +0 -1
- package/dist/notice-DMK7dx9a.cjs +0 -1
- package/dist/stack-DcZ_u50f.cjs +0 -1
- package/dist/widget-customization-BASfRpF7.cjs +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { T as ct } from "../
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
function
|
|
1
|
+
import { html as p, attr as f, Empty as Z, MapSignal as B, Fragment as q, Value as x, computedOf as M, When as Ke, prop as Je, WithElement as Ze, OnDispose as He } from "@tempots/dom";
|
|
2
|
+
import { L as de, S as K, M as Xe, i as re } from "../stack-Bm-UZosx.js";
|
|
3
|
+
import { _ as H, g as Ye } from "../string-DYyMxBl-.js";
|
|
4
|
+
import { b, a as ie, I as W, d as Qe, f as se, A as G, g as et } from "../use-form-BfzX3bwL.js";
|
|
5
|
+
import { e as X, N as tt, f as fe, g as me, U as nt, c as rt, a as it, T as st, L as ye, b as ge, h as at, G as ut, i as ot, S as ct, j as lt } from "../deep-merge-D076XcC5.js";
|
|
6
|
+
import { T as pt } from "../text-input-Cux5iiUC.js";
|
|
7
|
+
import { N as dt, B as ft, D as mt, a as yt, P as gt, b as ht, c as bt, d as vt, e as xt, F as $t } from "../duration-input-6RN16H08.js";
|
|
8
|
+
import { l as It } from "../colors-CatA-RXf.js";
|
|
9
|
+
import { B as U } from "../input-container-BTyCOubf.js";
|
|
10
|
+
function Tt(e) {
|
|
11
11
|
return e === "int64" || e === "int128" || e === "uint64" || e === "uint128";
|
|
12
12
|
}
|
|
13
13
|
function P(e) {
|
|
@@ -16,25 +16,25 @@ function P(e) {
|
|
|
16
16
|
function Y(e) {
|
|
17
17
|
return e === "float" || e === "double" || e === "decimal";
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function wt(e) {
|
|
20
20
|
return P(e) || Y(e);
|
|
21
21
|
}
|
|
22
22
|
function Q(e) {
|
|
23
23
|
return e === "date" || e === "datetime" || e === "time" || e === "duration";
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return e === "string" || e === "boolean" || e === "null" ||
|
|
25
|
+
function jt(e) {
|
|
26
|
+
return e === "string" || e === "boolean" || e === "null" || wt(e) || Q(e) || e === "uuid" || e === "uri" || e === "binary";
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function er(e) {
|
|
29
29
|
return e === "object" || e === "array" || e === "set" || e === "map" || e === "tuple" || e === "choice" || e === "any";
|
|
30
30
|
}
|
|
31
31
|
function O(e) {
|
|
32
32
|
return typeof e == "object" && e !== null && "$ref" in e;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function Mt(e) {
|
|
35
35
|
return typeof e == "object" && e !== null && !("type" in e) && !("$ref" in e) && !("enum" in e) && !("const" in e);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function St(e) {
|
|
38
38
|
return typeof e == "object" && e !== null && ("type" in e || "$ref" in e || "enum" in e || "const" in e);
|
|
39
39
|
}
|
|
40
40
|
function C(e) {
|
|
@@ -55,22 +55,22 @@ function xe(e) {
|
|
|
55
55
|
function $e(e) {
|
|
56
56
|
return e.type === "choice" && "choices" in e;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function Dt(e) {
|
|
59
59
|
return "enum" in e && Array.isArray(e.enum);
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function At(e) {
|
|
62
62
|
return "const" in e;
|
|
63
63
|
}
|
|
64
64
|
function ae(e) {
|
|
65
65
|
return e === void 0 ? null : typeof e == "string" || Array.isArray(e) ? e : (O(e), null);
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function Ot(e) {
|
|
68
68
|
return e === void 0 ? !1 : e === "null" ? !0 : Array.isArray(e) ? e.includes("null") : !1;
|
|
69
69
|
}
|
|
70
70
|
function ee(e) {
|
|
71
71
|
return typeof e == "string" ? e === "null" ? [] : [e] : Array.isArray(e) ? e.filter((t) => t !== "null") : [];
|
|
72
72
|
}
|
|
73
|
-
const
|
|
73
|
+
const _ = {
|
|
74
74
|
int8: { min: -128n, max: 127n },
|
|
75
75
|
int16: { min: -32768n, max: 32767n },
|
|
76
76
|
int32: { min: -2147483648n, max: 2147483647n },
|
|
@@ -85,10 +85,10 @@ const z = {
|
|
|
85
85
|
uint64: { min: 0n, max: 18446744073709551615n },
|
|
86
86
|
uint128: { min: 0n, max: 340282366920938463463374607431768211455n }
|
|
87
87
|
};
|
|
88
|
-
function
|
|
88
|
+
function Ct(e) {
|
|
89
89
|
return e.startsWith("#/") ? e.slice(2).split("/") : e.includes("/") ? e.split("/") : ["definitions", e];
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function Nt(e, t) {
|
|
92
92
|
let n = e;
|
|
93
93
|
for (const r of t) {
|
|
94
94
|
if (n == null || typeof n != "object")
|
|
@@ -98,22 +98,22 @@ function Ct(e, t) {
|
|
|
98
98
|
return n;
|
|
99
99
|
}
|
|
100
100
|
function N(e, t) {
|
|
101
|
-
const n =
|
|
101
|
+
const n = Ct(e), r = Nt(t, n);
|
|
102
102
|
if (r == null) {
|
|
103
103
|
console.warn(`Failed to resolve $ref: ${e}`);
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
|
-
if (
|
|
106
|
+
if (St(r))
|
|
107
107
|
return r;
|
|
108
|
-
if (
|
|
108
|
+
if (Mt(r)) {
|
|
109
109
|
console.warn(`$ref "${e}" points to a namespace, not a type definition`);
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function tr(e, t) {
|
|
114
114
|
return N(e.$ref, t);
|
|
115
115
|
}
|
|
116
|
-
class
|
|
116
|
+
class Rt {
|
|
117
117
|
schema;
|
|
118
118
|
visited = /* @__PURE__ */ new Set();
|
|
119
119
|
constructor(t) {
|
|
@@ -163,7 +163,7 @@ class Nt {
|
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
function te(e) {
|
|
166
|
-
return new
|
|
166
|
+
return new Rt(e);
|
|
167
167
|
}
|
|
168
168
|
class ne {
|
|
169
169
|
schema;
|
|
@@ -242,7 +242,7 @@ class ne {
|
|
|
242
242
|
* Check if this type is nullable
|
|
243
243
|
*/
|
|
244
244
|
get isNullable() {
|
|
245
|
-
return
|
|
245
|
+
return Ot(this.definition.type);
|
|
246
246
|
}
|
|
247
247
|
/**
|
|
248
248
|
* Check if this is a required field
|
|
@@ -273,7 +273,7 @@ class ne {
|
|
|
273
273
|
*/
|
|
274
274
|
get isPrimitive() {
|
|
275
275
|
const t = this.primaryType;
|
|
276
|
-
return t != null &&
|
|
276
|
+
return t != null && jt(t);
|
|
277
277
|
}
|
|
278
278
|
/**
|
|
279
279
|
* Get the description from the definition
|
|
@@ -321,7 +321,7 @@ class ne {
|
|
|
321
321
|
if (this.definition.name)
|
|
322
322
|
return this.definition.name;
|
|
323
323
|
const t = this.name;
|
|
324
|
-
return t ?
|
|
324
|
+
return t ? H(Ye(t)) : "";
|
|
325
325
|
}
|
|
326
326
|
/**
|
|
327
327
|
* Get altnames from the definition
|
|
@@ -402,7 +402,7 @@ function Ie(e, t, n) {
|
|
|
402
402
|
path: l.join(" -> "),
|
|
403
403
|
message: "Maximum inheritance depth exceeded"
|
|
404
404
|
}), [];
|
|
405
|
-
const
|
|
405
|
+
const g = [];
|
|
406
406
|
for (const d of l) {
|
|
407
407
|
if (u.has(d)) {
|
|
408
408
|
s.push({
|
|
@@ -412,25 +412,25 @@ function Ie(e, t, n) {
|
|
|
412
412
|
continue;
|
|
413
413
|
}
|
|
414
414
|
u.add(d), r.push(d);
|
|
415
|
-
const
|
|
416
|
-
if (!
|
|
415
|
+
const h = N(d, t);
|
|
416
|
+
if (!h) {
|
|
417
417
|
s.push({
|
|
418
418
|
path: d,
|
|
419
419
|
message: `Failed to resolve base type: ${d}`
|
|
420
420
|
});
|
|
421
421
|
continue;
|
|
422
422
|
}
|
|
423
|
-
if (
|
|
424
|
-
const m = Array.isArray(
|
|
425
|
-
|
|
423
|
+
if (h.$extends) {
|
|
424
|
+
const m = Array.isArray(h.$extends) ? h.$extends : [h.$extends], $ = i(m, y + 1);
|
|
425
|
+
g.push(...$);
|
|
426
426
|
}
|
|
427
|
-
|
|
427
|
+
g.push(h), u.delete(d);
|
|
428
428
|
}
|
|
429
|
-
return
|
|
429
|
+
return g;
|
|
430
430
|
}, o = i(a);
|
|
431
|
-
return { merged:
|
|
431
|
+
return { merged: Pt(o, e), inheritanceChain: r, errors: s };
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function Pt(e, t) {
|
|
434
434
|
if (e.length === 0)
|
|
435
435
|
return t;
|
|
436
436
|
let n = { ...e[0] };
|
|
@@ -441,13 +441,13 @@ function Rt(e, t) {
|
|
|
441
441
|
return s;
|
|
442
442
|
}
|
|
443
443
|
function ue(e, t) {
|
|
444
|
-
return C(e) && C(t) ?
|
|
444
|
+
return C(e) && C(t) ? qt(e, t) : { ...e, ...t };
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function qt(e, t) {
|
|
447
447
|
const n = {
|
|
448
448
|
...e.properties ?? {},
|
|
449
449
|
...t.properties ?? {}
|
|
450
|
-
}, r = oe(e.required), s = oe(t.required), a =
|
|
450
|
+
}, r = oe(e.required), s = oe(t.required), a = Ft([...r, ...s]), u = {
|
|
451
451
|
...e,
|
|
452
452
|
...t,
|
|
453
453
|
type: "object",
|
|
@@ -458,16 +458,16 @@ function Pt(e, t) {
|
|
|
458
458
|
function oe(e) {
|
|
459
459
|
return e ? e.length === 0 ? [] : Array.isArray(e[0]) ? e.flat() : e : [];
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function Ft(e) {
|
|
462
462
|
return [...new Set(e)];
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function nr(e) {
|
|
465
465
|
const t = te(e);
|
|
466
466
|
return {
|
|
467
467
|
resolve: (n) => (t.reset(), Ie(n, e))
|
|
468
468
|
};
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function Lt() {
|
|
471
471
|
return p.span(
|
|
472
472
|
f.class("bc-json-structure-deprecated-badge"),
|
|
473
473
|
f.style(
|
|
@@ -477,9 +477,9 @@ function Ft() {
|
|
|
477
477
|
);
|
|
478
478
|
}
|
|
479
479
|
function S(e, t) {
|
|
480
|
-
return !e || !t ? e ?? "" : p.span(e,
|
|
480
|
+
return !e || !t ? e ?? "" : p.span(e, Lt());
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function Et(e) {
|
|
483
483
|
const t = e.examples?.[0] != null ? String(e.examples[0]) : void 0;
|
|
484
484
|
return {
|
|
485
485
|
label: e.suppressLabel ? void 0 : S(e.label, e.isDeprecated),
|
|
@@ -493,13 +493,13 @@ function Te({
|
|
|
493
493
|
ctx: e,
|
|
494
494
|
controller: t
|
|
495
495
|
}) {
|
|
496
|
-
const n =
|
|
497
|
-
return b(
|
|
496
|
+
const n = Et(e);
|
|
497
|
+
return b(pt, {
|
|
498
498
|
...n,
|
|
499
499
|
controller: X(t)
|
|
500
500
|
});
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function Vt(e) {
|
|
503
503
|
return {
|
|
504
504
|
label: e.suppressLabel ? void 0 : S(e.label, e.isDeprecated),
|
|
505
505
|
description: e.description,
|
|
@@ -511,22 +511,22 @@ function we({
|
|
|
511
511
|
ctx: e,
|
|
512
512
|
controller: t
|
|
513
513
|
}) {
|
|
514
|
-
const n =
|
|
514
|
+
const n = Vt(e), r = b(ie, {
|
|
515
515
|
...n,
|
|
516
516
|
controller: t
|
|
517
517
|
});
|
|
518
|
-
return e.isNullable ? b(
|
|
518
|
+
return e.isNullable ? b(ie, {
|
|
519
519
|
...n,
|
|
520
520
|
controller: t,
|
|
521
|
-
after:
|
|
521
|
+
after: tt(
|
|
522
522
|
t.signal,
|
|
523
523
|
t.disabled,
|
|
524
524
|
(s) => t.change(s)
|
|
525
525
|
)
|
|
526
526
|
}) : r;
|
|
527
527
|
}
|
|
528
|
-
function
|
|
529
|
-
const n =
|
|
528
|
+
function Ut(e, t) {
|
|
529
|
+
const n = _[t], r = je(e, n.min), s = Me(e, n.max), a = e.examples?.[0] != null ? String(e.examples[0]) : void 0;
|
|
530
530
|
return {
|
|
531
531
|
label: e.suppressLabel ? void 0 : S(e.label, e.isDeprecated),
|
|
532
532
|
description: e.description,
|
|
@@ -539,8 +539,8 @@ function Vt(e, t) {
|
|
|
539
539
|
placeholder: a
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
|
-
function
|
|
543
|
-
const n =
|
|
542
|
+
function Bt(e, t) {
|
|
543
|
+
const n = _[t], r = je(e, n.min), s = Me(e, n.max), a = e.examples?.[0] != null ? String(e.examples[0]) : void 0;
|
|
544
544
|
return {
|
|
545
545
|
label: e.suppressLabel ? void 0 : S(e.label, e.isDeprecated),
|
|
546
546
|
description: e.description,
|
|
@@ -581,29 +581,29 @@ function Se({
|
|
|
581
581
|
controller: t,
|
|
582
582
|
intType: n
|
|
583
583
|
}) {
|
|
584
|
-
if (
|
|
585
|
-
const s =
|
|
586
|
-
return e.isNullable ? b(
|
|
584
|
+
if (Tt(n)) {
|
|
585
|
+
const s = Bt(e, n);
|
|
586
|
+
return e.isNullable ? b(dt, {
|
|
587
587
|
...s,
|
|
588
588
|
controller: t
|
|
589
|
-
}) : b(
|
|
589
|
+
}) : b(ft, {
|
|
590
590
|
...s,
|
|
591
591
|
controller: t
|
|
592
592
|
});
|
|
593
593
|
}
|
|
594
|
-
const r =
|
|
595
|
-
return e.isNullable ? b(
|
|
594
|
+
const r = Ut(e, n);
|
|
595
|
+
return e.isNullable ? b(fe, {
|
|
596
596
|
...r,
|
|
597
597
|
controller: t
|
|
598
|
-
}) : b(
|
|
598
|
+
}) : b(me, {
|
|
599
599
|
...r,
|
|
600
600
|
controller: t
|
|
601
601
|
});
|
|
602
602
|
}
|
|
603
|
-
function
|
|
603
|
+
function Wt(e, t) {
|
|
604
604
|
const n = e.definition;
|
|
605
605
|
let r;
|
|
606
|
-
n.multipleOf !== void 0 ? r = n.multipleOf : t === "decimal" && n.scale !== void 0
|
|
606
|
+
n.multipleOf !== void 0 ? r = n.multipleOf : t === "decimal" && n.scale !== void 0 && (r = Math.pow(10, -n.scale));
|
|
607
607
|
const s = n.minimum !== void 0 ? typeof n.minimum == "string" ? parseFloat(n.minimum) : n.minimum : void 0, a = n.maximum !== void 0 ? typeof n.maximum == "string" ? parseFloat(n.maximum) : n.maximum : void 0, u = n.exclusiveMinimum !== void 0 ? typeof n.exclusiveMinimum == "string" ? parseFloat(n.exclusiveMinimum) : n.exclusiveMinimum : void 0, i = n.exclusiveMaximum !== void 0 ? typeof n.exclusiveMaximum == "string" ? parseFloat(n.exclusiveMaximum) : n.exclusiveMaximum : void 0;
|
|
608
608
|
let o = e.description;
|
|
609
609
|
if (u !== void 0 || i !== void 0) {
|
|
@@ -629,16 +629,16 @@ function De({
|
|
|
629
629
|
controller: t,
|
|
630
630
|
floatType: n
|
|
631
631
|
}) {
|
|
632
|
-
const r =
|
|
633
|
-
return e.isNullable ? b(
|
|
632
|
+
const r = Wt(e, n);
|
|
633
|
+
return e.isNullable ? b(fe, {
|
|
634
634
|
...r,
|
|
635
635
|
controller: t
|
|
636
|
-
}) : b(
|
|
636
|
+
}) : b(me, {
|
|
637
637
|
...r,
|
|
638
638
|
controller: t
|
|
639
639
|
});
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function _t(e) {
|
|
642
642
|
return {
|
|
643
643
|
label: e.suppressLabel ? void 0 : S(e.label, e.isDeprecated),
|
|
644
644
|
description: e.description,
|
|
@@ -651,13 +651,13 @@ function Ae({
|
|
|
651
651
|
ctx: e,
|
|
652
652
|
controller: t
|
|
653
653
|
}) {
|
|
654
|
-
const n =
|
|
655
|
-
return b(
|
|
654
|
+
const n = _t(e);
|
|
655
|
+
return b(nt, {
|
|
656
656
|
...n,
|
|
657
657
|
controller: X(t)
|
|
658
658
|
});
|
|
659
659
|
}
|
|
660
|
-
function
|
|
660
|
+
function zt(e) {
|
|
661
661
|
return {
|
|
662
662
|
label: e.suppressLabel ? void 0 : S(e.label, e.isDeprecated),
|
|
663
663
|
description: e.description,
|
|
@@ -670,45 +670,45 @@ function Oe({
|
|
|
670
670
|
controller: t,
|
|
671
671
|
temporalType: n
|
|
672
672
|
}) {
|
|
673
|
-
const r =
|
|
673
|
+
const r = zt(e);
|
|
674
674
|
switch (n) {
|
|
675
675
|
case "date":
|
|
676
|
-
return e.isNullable ? b(
|
|
676
|
+
return e.isNullable ? b(vt, {
|
|
677
677
|
...r,
|
|
678
678
|
controller: t
|
|
679
|
-
}) : b(
|
|
679
|
+
}) : b(xt, {
|
|
680
680
|
...r,
|
|
681
681
|
controller: t
|
|
682
682
|
});
|
|
683
683
|
case "datetime":
|
|
684
|
-
return e.isNullable ? b(
|
|
684
|
+
return e.isNullable ? b(ht, {
|
|
685
685
|
...r,
|
|
686
686
|
controller: t
|
|
687
|
-
}) : b(
|
|
687
|
+
}) : b(bt, {
|
|
688
688
|
...r,
|
|
689
689
|
controller: t
|
|
690
690
|
});
|
|
691
691
|
case "time":
|
|
692
|
-
return e.isNullable ? b(
|
|
692
|
+
return e.isNullable ? b(yt, {
|
|
693
693
|
...r,
|
|
694
694
|
controller: t
|
|
695
|
-
}) : b(
|
|
695
|
+
}) : b(gt, {
|
|
696
696
|
...r,
|
|
697
697
|
controller: t
|
|
698
698
|
});
|
|
699
699
|
case "duration":
|
|
700
|
-
return e.isNullable ? b(
|
|
700
|
+
return e.isNullable ? b(rt, {
|
|
701
701
|
...r,
|
|
702
702
|
controller: t
|
|
703
|
-
}) : b(
|
|
703
|
+
}) : b(mt, {
|
|
704
704
|
...r,
|
|
705
705
|
controller: t
|
|
706
706
|
});
|
|
707
707
|
default:
|
|
708
|
-
return console.warn(`Unknown temporal type: ${n}`),
|
|
708
|
+
return console.warn(`Unknown temporal type: ${n}`), Z;
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function Gt(e) {
|
|
712
712
|
return {
|
|
713
713
|
label: e.suppressLabel ? void 0 : S(e.label, e.isDeprecated),
|
|
714
714
|
description: e.description,
|
|
@@ -721,13 +721,13 @@ function Ce({
|
|
|
721
721
|
ctx: e,
|
|
722
722
|
controller: t
|
|
723
723
|
}) {
|
|
724
|
-
const n =
|
|
725
|
-
return b(
|
|
724
|
+
const n = Gt(e);
|
|
725
|
+
return b(it, {
|
|
726
726
|
...n,
|
|
727
727
|
controller: X(t)
|
|
728
728
|
});
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function Kt(e) {
|
|
731
731
|
return {
|
|
732
732
|
label: e.suppressLabel ? void 0 : S(e.label, e.isDeprecated),
|
|
733
733
|
description: e.description,
|
|
@@ -739,13 +739,13 @@ function Ne({
|
|
|
739
739
|
ctx: e,
|
|
740
740
|
controller: t
|
|
741
741
|
}) {
|
|
742
|
-
const n =
|
|
743
|
-
return b(
|
|
742
|
+
const n = Kt(e);
|
|
743
|
+
return b($t, {
|
|
744
744
|
...n,
|
|
745
745
|
controller: t
|
|
746
746
|
});
|
|
747
747
|
}
|
|
748
|
-
function
|
|
748
|
+
function Jt(e) {
|
|
749
749
|
return {
|
|
750
750
|
label: e.suppressLabel ? void 0 : S(e.label, e.isDeprecated),
|
|
751
751
|
description: e.description,
|
|
@@ -754,7 +754,7 @@ function Kt(e) {
|
|
|
754
754
|
placeholder: "Enter JSON value"
|
|
755
755
|
};
|
|
756
756
|
}
|
|
757
|
-
function
|
|
757
|
+
function Zt(e) {
|
|
758
758
|
return e.transform(
|
|
759
759
|
// To input: serialize value to JSON string
|
|
760
760
|
(t) => t === void 0 ? void 0 : JSON.stringify(t, null, 2),
|
|
@@ -773,20 +773,20 @@ function J({
|
|
|
773
773
|
ctx: e,
|
|
774
774
|
controller: t
|
|
775
775
|
}) {
|
|
776
|
-
const n =
|
|
777
|
-
return b(
|
|
776
|
+
const n = Jt(e);
|
|
777
|
+
return b(st, {
|
|
778
778
|
...n,
|
|
779
|
-
controller:
|
|
779
|
+
controller: Zt(t)
|
|
780
780
|
});
|
|
781
781
|
}
|
|
782
|
-
function
|
|
782
|
+
function F(e) {
|
|
783
783
|
return {
|
|
784
784
|
label: e.suppressLabel ? void 0 : e.label,
|
|
785
785
|
description: e.description,
|
|
786
786
|
required: e.isRequired
|
|
787
787
|
};
|
|
788
788
|
}
|
|
789
|
-
function
|
|
789
|
+
function R(e) {
|
|
790
790
|
if (e.default !== void 0)
|
|
791
791
|
return e.default;
|
|
792
792
|
if (e.examples && e.examples.length > 0)
|
|
@@ -814,27 +814,27 @@ function k(e) {
|
|
|
814
814
|
return t === "int8" || t === "int16" || t === "int32" || t === "int64" || t === "int128" || t === "uint8" || t === "uint16" || t === "uint32" || t === "uint64" || t === "uint128" || t === "float" || t === "double" || t === "decimal" ? 0 : void 0;
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function Ht(e, t) {
|
|
818
818
|
return !t || t.length === 0 ? !1 : typeof t[0] == "string" ? t.includes(e) : Array.isArray(t[0]) ? t.some((n) => n.includes(e)) : !1;
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function Xt(e, t = "property") {
|
|
821
821
|
if (!e.has(t)) return t;
|
|
822
822
|
let n = 1;
|
|
823
823
|
for (; e.has(`${t}${n}`); )
|
|
824
824
|
n++;
|
|
825
825
|
return `${t}${n}`;
|
|
826
826
|
}
|
|
827
|
-
function
|
|
827
|
+
function Re({
|
|
828
828
|
ctx: e,
|
|
829
829
|
controller: t
|
|
830
830
|
}) {
|
|
831
831
|
const n = e.definition;
|
|
832
832
|
if (n.type !== "object" || !("properties" in n))
|
|
833
833
|
return console.warn("StructureObjectControl requires an ObjectTypeDefinition"), p.div("Invalid object definition");
|
|
834
|
-
const r = n.properties, s = n.required, a = n.additionalProperties, u = a !== !1, i = typeof a == "object" && a !== null ? a : { type: "any" }, o = n.minProperties ?? 0, c = n.maxProperties ?? 1 / 0, l =
|
|
834
|
+
const r = n.properties, s = n.required, a = n.additionalProperties, u = a !== !1, i = typeof a == "object" && a !== null ? a : { type: "any" }, o = n.minProperties ?? 0, c = n.maxProperties ?? 1 / 0, l = It(r), y = new Set(
|
|
835
835
|
l.map(([v]) => v)
|
|
836
|
-
),
|
|
837
|
-
const T = v, j = t.field(T), w =
|
|
836
|
+
), g = l.map(([v, I]) => {
|
|
837
|
+
const T = v, j = t.field(T), w = Ht(T, s);
|
|
838
838
|
return D({
|
|
839
839
|
ctx: e.with({
|
|
840
840
|
definition: I,
|
|
@@ -845,23 +845,23 @@ function ke({
|
|
|
845
845
|
});
|
|
846
846
|
}), d = B(t.signal, (v) => {
|
|
847
847
|
const I = Object.keys(v ?? {}), T = I.filter((w) => !y.has(w));
|
|
848
|
-
if (T.length === 0) return
|
|
848
|
+
if (T.length === 0) return Z;
|
|
849
849
|
const j = I.length > o && !e.readOnly;
|
|
850
|
-
return
|
|
850
|
+
return q(
|
|
851
851
|
...T.map((w) => {
|
|
852
|
-
const
|
|
852
|
+
const k = t.field(w);
|
|
853
853
|
return p.div(
|
|
854
854
|
f.class("bc-json-structure-additional-property"),
|
|
855
855
|
p.div(
|
|
856
856
|
f.class("bc-json-structure-additional-property-header"),
|
|
857
857
|
p.strong(`${w}:`),
|
|
858
|
-
|
|
858
|
+
U(
|
|
859
859
|
{
|
|
860
860
|
variant: "text",
|
|
861
861
|
size: "xs",
|
|
862
862
|
onClick: () => {
|
|
863
|
-
const
|
|
864
|
-
delete
|
|
863
|
+
const E = { ...x.get(t.signal) ?? {} };
|
|
864
|
+
delete E[w], t.change(E);
|
|
865
865
|
},
|
|
866
866
|
disabled: !j
|
|
867
867
|
},
|
|
@@ -876,13 +876,13 @@ function ke({
|
|
|
876
876
|
isPropertyRequired: !1,
|
|
877
877
|
suppressLabel: !0
|
|
878
878
|
}).append(w),
|
|
879
|
-
controller:
|
|
879
|
+
controller: k
|
|
880
880
|
})
|
|
881
881
|
)
|
|
882
882
|
);
|
|
883
883
|
})
|
|
884
884
|
);
|
|
885
|
-
}),
|
|
885
|
+
}), h = u && !e.readOnly ? U(
|
|
886
886
|
{
|
|
887
887
|
variant: "outline",
|
|
888
888
|
size: "sm",
|
|
@@ -891,7 +891,7 @@ function ke({
|
|
|
891
891
|
(v) => Object.keys(v ?? {}).length >= c
|
|
892
892
|
),
|
|
893
893
|
onClick: () => {
|
|
894
|
-
const v = x.get(t.signal) ?? {}, I = new Set(Object.keys(v)), T =
|
|
894
|
+
const v = x.get(t.signal) ?? {}, I = new Set(Object.keys(v)), T = Xt(I), j = R(i);
|
|
895
895
|
t.change({
|
|
896
896
|
...v,
|
|
897
897
|
[T]: j
|
|
@@ -901,19 +901,19 @@ function ke({
|
|
|
901
901
|
"Add Property"
|
|
902
902
|
) : null, m = p.div(
|
|
903
903
|
f.class("bc-json-structure-object-fields"),
|
|
904
|
-
...
|
|
904
|
+
...g,
|
|
905
905
|
d,
|
|
906
|
-
|
|
906
|
+
h
|
|
907
907
|
), $ = p.div(
|
|
908
908
|
f.class("bc-json-structure-object"),
|
|
909
909
|
m
|
|
910
910
|
);
|
|
911
|
-
return !e.suppressLabel && e.name ?
|
|
912
|
-
...
|
|
911
|
+
return !e.suppressLabel && e.name ? W({
|
|
912
|
+
...F(e),
|
|
913
913
|
content: $
|
|
914
914
|
}) : $;
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function ke({
|
|
917
917
|
ctx: e,
|
|
918
918
|
controller: t
|
|
919
919
|
}) {
|
|
@@ -921,10 +921,10 @@ function Re({
|
|
|
921
921
|
if (n.type !== "array" || !("items" in n))
|
|
922
922
|
return console.warn("StructureArrayControl requires an ArrayTypeDefinition"), p.div("Invalid array definition");
|
|
923
923
|
const r = n.items, s = n.minItems ?? 0, a = n.maxItems ?? 1 / 0, u = M(t.signal)((o) => (o?.length ?? 0) < a), i = M(t.signal)((o) => (o?.length ?? 0) > s);
|
|
924
|
-
return
|
|
925
|
-
...
|
|
924
|
+
return ye({
|
|
925
|
+
...F(e),
|
|
926
926
|
controller: t,
|
|
927
|
-
createItem: () =>
|
|
927
|
+
createItem: () => R(r),
|
|
928
928
|
showAdd: !0,
|
|
929
929
|
addDisabled: M(u)((o) => !o || e.readOnly),
|
|
930
930
|
showRemove: !0,
|
|
@@ -951,40 +951,42 @@ function Pe({
|
|
|
951
951
|
const r = n.items, s = n.minItems ?? 0, a = n.maxItems ?? 1 / 0, u = M(t.signal)((c) => (c?.length ?? 0) < a), i = M(t.signal)((c) => (c?.length ?? 0) > s), o = M(t.signal)((c) => {
|
|
952
952
|
if (!c || c.length === 0) return /* @__PURE__ */ new Set();
|
|
953
953
|
const l = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Set();
|
|
954
|
-
for (let
|
|
955
|
-
const d = JSON.stringify(c[
|
|
956
|
-
l.has(d) ? (y.add(l.get(d)), y.add(
|
|
954
|
+
for (let g = 0; g < c.length; g++) {
|
|
955
|
+
const d = JSON.stringify(c[g]);
|
|
956
|
+
l.has(d) ? (y.add(l.get(d)), y.add(g)) : l.set(d, g);
|
|
957
957
|
}
|
|
958
958
|
return y;
|
|
959
959
|
});
|
|
960
|
-
return
|
|
961
|
-
...
|
|
960
|
+
return ye({
|
|
961
|
+
...F(e),
|
|
962
962
|
controller: t,
|
|
963
|
-
createItem: () =>
|
|
963
|
+
createItem: () => R(r),
|
|
964
964
|
showAdd: !0,
|
|
965
965
|
addDisabled: M(u)((c) => !c || e.readOnly),
|
|
966
966
|
showRemove: !0,
|
|
967
967
|
removeDisabled: M(i)((c) => !c || e.readOnly),
|
|
968
968
|
element: (c) => {
|
|
969
|
-
const l = c.position.index, y = c.item,
|
|
969
|
+
const l = c.position.index, y = c.item, g = o.map((h) => h.has(l)), d = D({
|
|
970
970
|
ctx: e.with({
|
|
971
971
|
definition: r,
|
|
972
972
|
suppressLabel: !0
|
|
973
973
|
}).append(l),
|
|
974
974
|
controller: y
|
|
975
975
|
});
|
|
976
|
-
return
|
|
977
|
-
f.class("bc-stack--gap-1"),
|
|
976
|
+
return q(
|
|
978
977
|
d,
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
978
|
+
Ke(
|
|
979
|
+
g,
|
|
980
|
+
() => de(
|
|
981
|
+
f.class("bc-json-structure-set-error"),
|
|
982
|
+
"Duplicate value - sets must contain unique items"
|
|
983
|
+
)
|
|
982
984
|
)
|
|
983
|
-
)
|
|
985
|
+
);
|
|
984
986
|
}
|
|
985
987
|
});
|
|
986
988
|
}
|
|
987
|
-
function
|
|
989
|
+
function Yt(e, t = "key") {
|
|
988
990
|
if (!e.has(t)) return t;
|
|
989
991
|
let n = 1;
|
|
990
992
|
for (; e.has(`${t}${n}`); )
|
|
@@ -1000,11 +1002,11 @@ function qe({
|
|
|
1000
1002
|
return console.warn("StructureMapControl requires a MapTypeDefinition"), p.div("Invalid map definition");
|
|
1001
1003
|
const r = n.values, s = n.minProperties ?? 0, a = n.maxProperties ?? 1 / 0, u = B(t.signal, (l) => {
|
|
1002
1004
|
const y = Object.keys(l ?? {});
|
|
1003
|
-
if (y.length === 0) return
|
|
1004
|
-
const
|
|
1005
|
-
return
|
|
1005
|
+
if (y.length === 0) return Z;
|
|
1006
|
+
const g = y.length > s && !e.readOnly;
|
|
1007
|
+
return q(
|
|
1006
1008
|
...y.map((d) => {
|
|
1007
|
-
const
|
|
1009
|
+
const h = t.field(d);
|
|
1008
1010
|
return p.div(
|
|
1009
1011
|
f.class("bc-json-structure-map-entry"),
|
|
1010
1012
|
p.div(
|
|
@@ -1013,7 +1015,7 @@ function qe({
|
|
|
1013
1015
|
f.class("bc-json-structure-map-entry-key"),
|
|
1014
1016
|
`${d}:`
|
|
1015
1017
|
),
|
|
1016
|
-
|
|
1018
|
+
U(
|
|
1017
1019
|
{
|
|
1018
1020
|
variant: "text",
|
|
1019
1021
|
size: "xs",
|
|
@@ -1021,7 +1023,7 @@ function qe({
|
|
|
1021
1023
|
const m = { ...x.get(t.signal) ?? {} };
|
|
1022
1024
|
delete m[d], t.change(m);
|
|
1023
1025
|
},
|
|
1024
|
-
disabled: !
|
|
1026
|
+
disabled: !g
|
|
1025
1027
|
},
|
|
1026
1028
|
"Remove"
|
|
1027
1029
|
)
|
|
@@ -1033,13 +1035,13 @@ function qe({
|
|
|
1033
1035
|
definition: r,
|
|
1034
1036
|
suppressLabel: !0
|
|
1035
1037
|
}).append(d),
|
|
1036
|
-
controller:
|
|
1038
|
+
controller: h
|
|
1037
1039
|
})
|
|
1038
1040
|
)
|
|
1039
1041
|
);
|
|
1040
1042
|
})
|
|
1041
1043
|
);
|
|
1042
|
-
}), i = e.readOnly ? null :
|
|
1044
|
+
}), i = e.readOnly ? null : U(
|
|
1043
1045
|
{
|
|
1044
1046
|
variant: "outline",
|
|
1045
1047
|
size: "sm",
|
|
@@ -1048,10 +1050,10 @@ function qe({
|
|
|
1048
1050
|
(l) => Object.keys(l ?? {}).length >= a
|
|
1049
1051
|
),
|
|
1050
1052
|
onClick: () => {
|
|
1051
|
-
const l = x.get(t.signal) ?? {}, y = new Set(Object.keys(l)),
|
|
1053
|
+
const l = x.get(t.signal) ?? {}, y = new Set(Object.keys(l)), g = Yt(y), d = R(r);
|
|
1052
1054
|
t.change({
|
|
1053
1055
|
...l,
|
|
1054
|
-
[
|
|
1056
|
+
[g]: d
|
|
1055
1057
|
});
|
|
1056
1058
|
}
|
|
1057
1059
|
},
|
|
@@ -1061,8 +1063,8 @@ function qe({
|
|
|
1061
1063
|
u,
|
|
1062
1064
|
i
|
|
1063
1065
|
), c = p.div(f.class("bc-json-structure-map"), o);
|
|
1064
|
-
return !e.suppressLabel && e.name ?
|
|
1065
|
-
...
|
|
1066
|
+
return !e.suppressLabel && e.name ? W({
|
|
1067
|
+
...F(e),
|
|
1066
1068
|
content: c
|
|
1067
1069
|
}) : c;
|
|
1068
1070
|
}
|
|
@@ -1077,23 +1079,23 @@ function Fe({
|
|
|
1077
1079
|
if (!Array.isArray(a) || a.length !== r.length) {
|
|
1078
1080
|
const i = r.map((o) => {
|
|
1079
1081
|
const c = s[o];
|
|
1080
|
-
return c ?
|
|
1082
|
+
return c ? R(c) : void 0;
|
|
1081
1083
|
});
|
|
1082
1084
|
t.change(i);
|
|
1083
1085
|
}
|
|
1084
|
-
const u =
|
|
1086
|
+
const u = F(e);
|
|
1085
1087
|
return p.div(
|
|
1086
1088
|
f.class("bc-json-structure-tuple"),
|
|
1087
1089
|
// Optional label and description
|
|
1088
|
-
u.label
|
|
1090
|
+
u.label ? p.label(
|
|
1089
1091
|
f.class("bc-json-structure-tuple-label"),
|
|
1090
1092
|
u.label,
|
|
1091
|
-
u.required
|
|
1092
|
-
),
|
|
1093
|
-
u.description
|
|
1093
|
+
u.required ? p.span(f.class("bc-required-indicator"), "*") : null
|
|
1094
|
+
) : null,
|
|
1095
|
+
u.description ? p.div(
|
|
1094
1096
|
f.class("bc-json-structure-tuple-description"),
|
|
1095
1097
|
u.description
|
|
1096
|
-
),
|
|
1098
|
+
) : null,
|
|
1097
1099
|
// Render tuple elements
|
|
1098
1100
|
p.div(
|
|
1099
1101
|
f.class("bc-json-structure-tuple-elements"),
|
|
@@ -1138,13 +1140,13 @@ function Fe({
|
|
|
1138
1140
|
)
|
|
1139
1141
|
);
|
|
1140
1142
|
}
|
|
1141
|
-
function
|
|
1143
|
+
function Qt({
|
|
1142
1144
|
options: e,
|
|
1143
1145
|
selected: t,
|
|
1144
1146
|
onChange: n,
|
|
1145
1147
|
disabled: r
|
|
1146
1148
|
}) {
|
|
1147
|
-
return
|
|
1149
|
+
return ge({
|
|
1148
1150
|
options: e.map((s) => ({
|
|
1149
1151
|
type: "value",
|
|
1150
1152
|
value: s.value,
|
|
@@ -1155,24 +1157,24 @@ function Yt({
|
|
|
1155
1157
|
disabled: r
|
|
1156
1158
|
});
|
|
1157
1159
|
}
|
|
1158
|
-
function
|
|
1160
|
+
function en({
|
|
1159
1161
|
ctx: e,
|
|
1160
1162
|
selector: t,
|
|
1161
1163
|
inner: n
|
|
1162
1164
|
}) {
|
|
1163
|
-
const r =
|
|
1165
|
+
const r = K(
|
|
1164
1166
|
f.class("bc-stack--gap-2 bc-stack--align-start"),
|
|
1165
1167
|
t,
|
|
1166
1168
|
n
|
|
1167
1169
|
);
|
|
1168
|
-
return e.isRoot ? r :
|
|
1170
|
+
return e.isRoot ? r : W({
|
|
1169
1171
|
label: e.suppressLabel ? void 0 : e.label,
|
|
1170
1172
|
description: e.description,
|
|
1171
1173
|
required: e.isRequired,
|
|
1172
1174
|
content: r
|
|
1173
1175
|
});
|
|
1174
1176
|
}
|
|
1175
|
-
function
|
|
1177
|
+
function tn(e, t, n) {
|
|
1176
1178
|
if (!e || typeof e != "object")
|
|
1177
1179
|
return null;
|
|
1178
1180
|
const r = e;
|
|
@@ -1189,7 +1191,7 @@ function en(e, t, n) {
|
|
|
1189
1191
|
}
|
|
1190
1192
|
return null;
|
|
1191
1193
|
}
|
|
1192
|
-
function
|
|
1194
|
+
function nn(e, t, n) {
|
|
1193
1195
|
if (!e || typeof e != "object")
|
|
1194
1196
|
return;
|
|
1195
1197
|
const r = e;
|
|
@@ -1229,26 +1231,26 @@ function Le({
|
|
|
1229
1231
|
const u = a.map((m) => {
|
|
1230
1232
|
const v = r[m].name || m;
|
|
1231
1233
|
return { value: m, label: v };
|
|
1232
|
-
}), i = M(t.signal)((m) =>
|
|
1234
|
+
}), i = M(t.signal)((m) => tn(m, r, s)), o = x.get(i) || a[0], c = Je(o);
|
|
1233
1235
|
t.onDispose(c.dispose);
|
|
1234
1236
|
let l = !1;
|
|
1235
1237
|
const y = i.on((m) => {
|
|
1236
1238
|
!l && m !== null && c.set(m);
|
|
1237
1239
|
});
|
|
1238
1240
|
t.onDispose(y);
|
|
1239
|
-
const d =
|
|
1241
|
+
const d = Qt({
|
|
1240
1242
|
options: u,
|
|
1241
1243
|
selected: c,
|
|
1242
1244
|
onChange: (m) => {
|
|
1243
1245
|
l = !0, c.set(m);
|
|
1244
1246
|
const $ = r[m];
|
|
1245
1247
|
if ($) {
|
|
1246
|
-
const v =
|
|
1248
|
+
const v = R($), I = ce(v, m, s);
|
|
1247
1249
|
t.change(I);
|
|
1248
1250
|
}
|
|
1249
1251
|
},
|
|
1250
1252
|
disabled: e.readOnly || e.isDeprecated
|
|
1251
|
-
}),
|
|
1253
|
+
}), h = B(c, (m) => {
|
|
1252
1254
|
const $ = r[x.get(m)];
|
|
1253
1255
|
if (!$)
|
|
1254
1256
|
return p.div(
|
|
@@ -1256,7 +1258,7 @@ function Le({
|
|
|
1256
1258
|
`Choice variant not found: ${x.get(m)}`
|
|
1257
1259
|
);
|
|
1258
1260
|
const v = M(t.signal)(
|
|
1259
|
-
(j) =>
|
|
1261
|
+
(j) => nn(j, x.get(m), s)
|
|
1260
1262
|
), I = (j) => {
|
|
1261
1263
|
const w = ce(
|
|
1262
1264
|
j,
|
|
@@ -1264,7 +1266,7 @@ function Le({
|
|
|
1264
1266
|
s
|
|
1265
1267
|
);
|
|
1266
1268
|
t.change(w);
|
|
1267
|
-
}, T = new
|
|
1269
|
+
}, T = new Qe(
|
|
1268
1270
|
[...t.path, x.get(m)],
|
|
1269
1271
|
I,
|
|
1270
1272
|
v,
|
|
@@ -1284,13 +1286,13 @@ function Le({
|
|
|
1284
1286
|
controller: T
|
|
1285
1287
|
});
|
|
1286
1288
|
});
|
|
1287
|
-
return
|
|
1289
|
+
return en({
|
|
1288
1290
|
ctx: e,
|
|
1289
1291
|
selector: d,
|
|
1290
|
-
inner:
|
|
1292
|
+
inner: h
|
|
1291
1293
|
});
|
|
1292
1294
|
}
|
|
1293
|
-
function
|
|
1295
|
+
function rn(e) {
|
|
1294
1296
|
return {
|
|
1295
1297
|
label: e.suppressLabel ? void 0 : S(e.label, e.isDeprecated),
|
|
1296
1298
|
description: e.description,
|
|
@@ -1302,8 +1304,8 @@ function Ee({
|
|
|
1302
1304
|
ctx: e,
|
|
1303
1305
|
controller: t
|
|
1304
1306
|
}) {
|
|
1305
|
-
const n =
|
|
1306
|
-
return
|
|
1307
|
+
const n = rn(e);
|
|
1308
|
+
return at({
|
|
1307
1309
|
...n,
|
|
1308
1310
|
options: (e.enumValues ?? []).map((r) => ({
|
|
1309
1311
|
type: "value",
|
|
@@ -1317,14 +1319,14 @@ function Ve({
|
|
|
1317
1319
|
ctx: e,
|
|
1318
1320
|
controller: t
|
|
1319
1321
|
}) {
|
|
1320
|
-
return
|
|
1322
|
+
return q(
|
|
1321
1323
|
Ze(() => {
|
|
1322
1324
|
x.get(t.signal) !== e.constValue && t.change(e.constValue);
|
|
1323
1325
|
}),
|
|
1324
|
-
|
|
1326
|
+
ut(Xe(e.label, ": "), de(String(e.constValue)))
|
|
1325
1327
|
);
|
|
1326
1328
|
}
|
|
1327
|
-
function
|
|
1329
|
+
function sn(e) {
|
|
1328
1330
|
return {
|
|
1329
1331
|
label: e.suppressLabel ? void 0 : e.label,
|
|
1330
1332
|
description: e.description,
|
|
@@ -1332,7 +1334,7 @@ function rn(e) {
|
|
|
1332
1334
|
disabled: e.readOnly || e.isDeprecated
|
|
1333
1335
|
};
|
|
1334
1336
|
}
|
|
1335
|
-
function
|
|
1337
|
+
function an(e, t) {
|
|
1336
1338
|
if (e === null) return t.includes("null") ? "null" : null;
|
|
1337
1339
|
if (e === void 0)
|
|
1338
1340
|
return t.includes("string") ? "string" : t[0] ?? null;
|
|
@@ -1362,7 +1364,7 @@ function sn(e, t) {
|
|
|
1362
1364
|
return null;
|
|
1363
1365
|
}
|
|
1364
1366
|
}
|
|
1365
|
-
function
|
|
1367
|
+
function un(e, t) {
|
|
1366
1368
|
try {
|
|
1367
1369
|
switch (t) {
|
|
1368
1370
|
case "string":
|
|
@@ -1434,7 +1436,7 @@ function an(e, t) {
|
|
|
1434
1436
|
return { ok: !1 };
|
|
1435
1437
|
}
|
|
1436
1438
|
}
|
|
1437
|
-
function
|
|
1439
|
+
function on(e) {
|
|
1438
1440
|
switch (e) {
|
|
1439
1441
|
case "null":
|
|
1440
1442
|
return null;
|
|
@@ -1451,16 +1453,16 @@ function un(e) {
|
|
|
1451
1453
|
return;
|
|
1452
1454
|
}
|
|
1453
1455
|
}
|
|
1454
|
-
function
|
|
1456
|
+
function cn(e) {
|
|
1455
1457
|
return e.map((t) => ({
|
|
1456
1458
|
key: t,
|
|
1457
|
-
label:
|
|
1458
|
-
detect: (n) =>
|
|
1459
|
-
convert: (n) =>
|
|
1460
|
-
defaultValue: () =>
|
|
1459
|
+
label: H(t),
|
|
1460
|
+
detect: (n) => an(n, [t]) === t,
|
|
1461
|
+
convert: (n) => un(n, t),
|
|
1462
|
+
defaultValue: () => on(t)
|
|
1461
1463
|
}));
|
|
1462
1464
|
}
|
|
1463
|
-
function
|
|
1465
|
+
function ln({
|
|
1464
1466
|
options: e,
|
|
1465
1467
|
selected: t,
|
|
1466
1468
|
onChange: n
|
|
@@ -1469,14 +1471,14 @@ function cn({
|
|
|
1469
1471
|
const a = Object.fromEntries(
|
|
1470
1472
|
e.map((u) => [u.value, u.label])
|
|
1471
1473
|
);
|
|
1472
|
-
return
|
|
1474
|
+
return ct({
|
|
1473
1475
|
options: a,
|
|
1474
1476
|
value: t,
|
|
1475
1477
|
onChange: (u) => n(u),
|
|
1476
1478
|
size: "sm"
|
|
1477
1479
|
});
|
|
1478
1480
|
}
|
|
1479
|
-
return
|
|
1481
|
+
return ge({
|
|
1480
1482
|
options: e.map((a) => ({
|
|
1481
1483
|
type: "value",
|
|
1482
1484
|
value: a.value,
|
|
@@ -1486,32 +1488,32 @@ function cn({
|
|
|
1486
1488
|
onChange: n
|
|
1487
1489
|
});
|
|
1488
1490
|
}
|
|
1489
|
-
function
|
|
1491
|
+
function pn({
|
|
1490
1492
|
ctx: e,
|
|
1491
1493
|
showSelector: t,
|
|
1492
1494
|
selector: n,
|
|
1493
1495
|
inner: r
|
|
1494
1496
|
}) {
|
|
1495
|
-
return e.isRoot ? t ?
|
|
1496
|
-
...
|
|
1497
|
-
content: t ?
|
|
1497
|
+
return e.isRoot ? t ? K(f.class("bc-stack--gap-2"), n, r) : r : W({
|
|
1498
|
+
...sn(e),
|
|
1499
|
+
content: t ? K(
|
|
1498
1500
|
f.class("bc-stack--gap-2 bc-stack--align-start"),
|
|
1499
1501
|
n,
|
|
1500
1502
|
r
|
|
1501
1503
|
) : r
|
|
1502
1504
|
});
|
|
1503
1505
|
}
|
|
1504
|
-
function
|
|
1506
|
+
function dn({
|
|
1505
1507
|
ctx: e,
|
|
1506
1508
|
controller: t
|
|
1507
1509
|
}) {
|
|
1508
1510
|
const n = e.definition, r = n.type;
|
|
1509
|
-
let s
|
|
1511
|
+
let s;
|
|
1510
1512
|
if (Array.isArray(r))
|
|
1511
1513
|
s = r;
|
|
1512
1514
|
else
|
|
1513
1515
|
return console.warn("StructureUnionControl called with non-array type"), D({ ctx: e, controller: t });
|
|
1514
|
-
const a = s.includes("null"), u = ee(r), i = a && u.length > 0 ? u : s, o =
|
|
1516
|
+
const a = s.includes("null"), u = ee(r), i = a && u.length > 0 ? u : s, o = cn(i), c = new ot(
|
|
1515
1517
|
t.path,
|
|
1516
1518
|
t.change,
|
|
1517
1519
|
t.signal,
|
|
@@ -1520,15 +1522,15 @@ function pn({
|
|
|
1520
1522
|
o
|
|
1521
1523
|
);
|
|
1522
1524
|
t.onDispose(() => c.dispose());
|
|
1523
|
-
const l = (d) =>
|
|
1524
|
-
options: i.map((
|
|
1525
|
+
const l = (d) => ln({
|
|
1526
|
+
options: i.map((h) => ({ value: h, label: H(h) })),
|
|
1525
1527
|
selected: c.activeBranch,
|
|
1526
1528
|
onChange: d
|
|
1527
1529
|
}), y = (d) => {
|
|
1528
1530
|
c.switchToBranch(d, !1);
|
|
1529
|
-
},
|
|
1530
|
-
const
|
|
1531
|
-
definition: { ...n, type:
|
|
1531
|
+
}, g = B(c.activeBranch, (d) => {
|
|
1532
|
+
const h = x.get(d), m = c.getBranchController(h), $ = e.with({
|
|
1533
|
+
definition: { ...n, type: h },
|
|
1532
1534
|
// Suppress inner labels only when union is nested (non-root)
|
|
1533
1535
|
suppressLabel: !e.isRoot
|
|
1534
1536
|
});
|
|
@@ -1537,11 +1539,11 @@ function pn({
|
|
|
1537
1539
|
controller: m
|
|
1538
1540
|
});
|
|
1539
1541
|
});
|
|
1540
|
-
return
|
|
1542
|
+
return pn({
|
|
1541
1543
|
ctx: e,
|
|
1542
1544
|
showSelector: i.length > 1,
|
|
1543
1545
|
selector: l(y),
|
|
1544
|
-
inner:
|
|
1546
|
+
inner: g
|
|
1545
1547
|
});
|
|
1546
1548
|
}
|
|
1547
1549
|
function D({
|
|
@@ -1570,19 +1572,19 @@ function D({
|
|
|
1570
1572
|
ctx: n
|
|
1571
1573
|
});
|
|
1572
1574
|
}
|
|
1573
|
-
if (
|
|
1575
|
+
if (Dt(n.definition))
|
|
1574
1576
|
return Ee({
|
|
1575
1577
|
ctx: n,
|
|
1576
1578
|
controller: t
|
|
1577
1579
|
});
|
|
1578
|
-
if (
|
|
1580
|
+
if (At(n.definition))
|
|
1579
1581
|
return Ve({
|
|
1580
1582
|
ctx: n,
|
|
1581
1583
|
controller: t
|
|
1582
1584
|
});
|
|
1583
1585
|
const a = n.resolvedType;
|
|
1584
1586
|
if (Array.isArray(a) && ee(a).length > 1)
|
|
1585
|
-
return
|
|
1587
|
+
return dn({
|
|
1586
1588
|
ctx: n,
|
|
1587
1589
|
controller: t
|
|
1588
1590
|
});
|
|
@@ -1593,35 +1595,35 @@ function D({
|
|
|
1593
1595
|
controller: t
|
|
1594
1596
|
});
|
|
1595
1597
|
if (C(n.definition)) {
|
|
1596
|
-
const i = t instanceof
|
|
1597
|
-
return
|
|
1598
|
+
const i = t instanceof se ? t : t.object();
|
|
1599
|
+
return Re({
|
|
1598
1600
|
ctx: n,
|
|
1599
1601
|
controller: i
|
|
1600
1602
|
});
|
|
1601
1603
|
}
|
|
1602
1604
|
if (he(n.definition)) {
|
|
1603
|
-
const i = t instanceof
|
|
1604
|
-
return
|
|
1605
|
+
const i = t instanceof G ? t : t.array();
|
|
1606
|
+
return ke({
|
|
1605
1607
|
ctx: n,
|
|
1606
1608
|
controller: i
|
|
1607
1609
|
});
|
|
1608
1610
|
}
|
|
1609
1611
|
if (be(n.definition)) {
|
|
1610
|
-
const i = t instanceof
|
|
1612
|
+
const i = t instanceof G ? t : t.array();
|
|
1611
1613
|
return Pe({
|
|
1612
1614
|
ctx: n,
|
|
1613
1615
|
controller: i
|
|
1614
1616
|
});
|
|
1615
1617
|
}
|
|
1616
1618
|
if (ve(n.definition)) {
|
|
1617
|
-
const i = t instanceof
|
|
1619
|
+
const i = t instanceof se ? t : t.object();
|
|
1618
1620
|
return qe({
|
|
1619
1621
|
ctx: n,
|
|
1620
1622
|
controller: i
|
|
1621
1623
|
});
|
|
1622
1624
|
}
|
|
1623
1625
|
if (xe(n.definition)) {
|
|
1624
|
-
const i = t instanceof
|
|
1626
|
+
const i = t instanceof G ? t : t.array();
|
|
1625
1627
|
return Fe({
|
|
1626
1628
|
ctx: n,
|
|
1627
1629
|
controller: i
|
|
@@ -1659,7 +1661,7 @@ function D({
|
|
|
1659
1661
|
controller: t
|
|
1660
1662
|
});
|
|
1661
1663
|
case "null":
|
|
1662
|
-
return
|
|
1664
|
+
return mn(n);
|
|
1663
1665
|
case "any":
|
|
1664
1666
|
return J({
|
|
1665
1667
|
ctx: n,
|
|
@@ -1678,10 +1680,10 @@ function D({
|
|
|
1678
1680
|
ctx: n,
|
|
1679
1681
|
controller: t,
|
|
1680
1682
|
temporalType: u
|
|
1681
|
-
}) : (console.warn(`Unknown type: ${u}`),
|
|
1683
|
+
}) : (console.warn(`Unknown type: ${u}`), yn(n, u));
|
|
1682
1684
|
}
|
|
1683
1685
|
}
|
|
1684
|
-
function
|
|
1686
|
+
function fn({
|
|
1685
1687
|
schema: e,
|
|
1686
1688
|
controller: t,
|
|
1687
1689
|
widgetRegistry: n,
|
|
@@ -1695,14 +1697,14 @@ function dn({
|
|
|
1695
1697
|
});
|
|
1696
1698
|
return D({ ctx: a, controller: t });
|
|
1697
1699
|
}
|
|
1698
|
-
function
|
|
1700
|
+
function mn(e) {
|
|
1699
1701
|
return p.div(
|
|
1700
1702
|
f.class("bc-json-structure-placeholder"),
|
|
1701
1703
|
p.span(`[Null: ${e.label}]`),
|
|
1702
1704
|
p.em("null")
|
|
1703
1705
|
);
|
|
1704
1706
|
}
|
|
1705
|
-
function
|
|
1707
|
+
function yn(e, t) {
|
|
1706
1708
|
return p.div(
|
|
1707
1709
|
f.class("bc-json-structure-unknown"),
|
|
1708
1710
|
p.span(`Unknown type: ${t}`),
|
|
@@ -1710,9 +1712,9 @@ function mn(e, t) {
|
|
|
1710
1712
|
);
|
|
1711
1713
|
}
|
|
1712
1714
|
function Ue(e, t) {
|
|
1713
|
-
return new
|
|
1715
|
+
return new gn(e, t);
|
|
1714
1716
|
}
|
|
1715
|
-
class
|
|
1717
|
+
class gn {
|
|
1716
1718
|
schema;
|
|
1717
1719
|
options;
|
|
1718
1720
|
constructor(t, n) {
|
|
@@ -1835,7 +1837,7 @@ class yn {
|
|
|
1835
1837
|
if (typeof t == "number" && !Number.isInteger(t))
|
|
1836
1838
|
return a.push({ path: s, type: "type", expected: n, actual: "float" }), !1;
|
|
1837
1839
|
if (P(n)) {
|
|
1838
|
-
const u =
|
|
1840
|
+
const u = _[n], i = typeof t == "bigint" ? t : BigInt(Math.round(t));
|
|
1839
1841
|
(i < u.min || i > u.max) && a.push({
|
|
1840
1842
|
path: s,
|
|
1841
1843
|
type: "integer_bounds",
|
|
@@ -2028,11 +2030,11 @@ class yn {
|
|
|
2028
2030
|
), !0;
|
|
2029
2031
|
}
|
|
2030
2032
|
}
|
|
2031
|
-
function
|
|
2033
|
+
function rr(e, t, n) {
|
|
2032
2034
|
return Ue(e, n).validate(t);
|
|
2033
2035
|
}
|
|
2034
|
-
function
|
|
2035
|
-
const n =
|
|
2036
|
+
function hn(e, t) {
|
|
2037
|
+
const n = bn(e, t);
|
|
2036
2038
|
return {
|
|
2037
2039
|
path: e.path,
|
|
2038
2040
|
message: n,
|
|
@@ -2042,14 +2044,14 @@ function gn(e, t) {
|
|
|
2042
2044
|
function Be(e, t) {
|
|
2043
2045
|
return e.map((n) => {
|
|
2044
2046
|
const r = t?.get(n.path);
|
|
2045
|
-
return
|
|
2047
|
+
return hn(n, r);
|
|
2046
2048
|
});
|
|
2047
2049
|
}
|
|
2048
|
-
function
|
|
2050
|
+
function bn(e, t) {
|
|
2049
2051
|
switch (e.type) {
|
|
2050
2052
|
// Type errors
|
|
2051
2053
|
case "type":
|
|
2052
|
-
return `Expected ${le(e.expected)}, got ${
|
|
2054
|
+
return `Expected ${le(e.expected)}, got ${vn(e.actual)}`;
|
|
2053
2055
|
case "type_mismatch":
|
|
2054
2056
|
return `Value must be of type ${le(e.expected)}`;
|
|
2055
2057
|
// String validation
|
|
@@ -2058,9 +2060,9 @@ function hn(e, t) {
|
|
|
2058
2060
|
case "maxLength":
|
|
2059
2061
|
return `Must be no more than ${e.expected} characters`;
|
|
2060
2062
|
case "pattern":
|
|
2061
|
-
return
|
|
2063
|
+
return xn(e, t);
|
|
2062
2064
|
case "format":
|
|
2063
|
-
return
|
|
2065
|
+
return $n(e);
|
|
2064
2066
|
// Numeric validation
|
|
2065
2067
|
case "minimum":
|
|
2066
2068
|
return `Must be at least ${e.expected}`;
|
|
@@ -2073,7 +2075,7 @@ function hn(e, t) {
|
|
|
2073
2075
|
case "multipleOf":
|
|
2074
2076
|
return `Must be a multiple of ${e.expected}`;
|
|
2075
2077
|
case "integer_bounds":
|
|
2076
|
-
return
|
|
2078
|
+
return In(e);
|
|
2077
2079
|
// Array/Set validation
|
|
2078
2080
|
case "minItems":
|
|
2079
2081
|
return `Must have at least ${e.expected} items`;
|
|
@@ -2097,10 +2099,10 @@ function hn(e, t) {
|
|
|
2097
2099
|
case "additionalProperties":
|
|
2098
2100
|
return `Unknown property: ${e.actual}`;
|
|
2099
2101
|
case "dependentRequired":
|
|
2100
|
-
return
|
|
2102
|
+
return Tn(e);
|
|
2101
2103
|
// Enum/Const validation
|
|
2102
2104
|
case "enum":
|
|
2103
|
-
return
|
|
2105
|
+
return wn(e);
|
|
2104
2106
|
case "const":
|
|
2105
2107
|
return `Must be exactly ${JSON.stringify(e.expected)}`;
|
|
2106
2108
|
// Reference errors
|
|
@@ -2118,7 +2120,7 @@ function hn(e, t) {
|
|
|
2118
2120
|
function le(e) {
|
|
2119
2121
|
return typeof e == "string" ? pe(e) : Array.isArray(e) ? e.map(pe).join(" or ") : String(e);
|
|
2120
2122
|
}
|
|
2121
|
-
function
|
|
2123
|
+
function vn(e) {
|
|
2122
2124
|
return e === null ? "null" : e === void 0 ? "undefined" : typeof e;
|
|
2123
2125
|
}
|
|
2124
2126
|
function pe(e) {
|
|
@@ -2155,7 +2157,7 @@ function pe(e) {
|
|
|
2155
2157
|
null: "empty"
|
|
2156
2158
|
}[e] ?? e;
|
|
2157
2159
|
}
|
|
2158
|
-
function
|
|
2160
|
+
function xn(e, t) {
|
|
2159
2161
|
const n = t?.description;
|
|
2160
2162
|
if (n && e.type === "pattern")
|
|
2161
2163
|
return `Does not match required format: ${n}`;
|
|
@@ -2174,7 +2176,7 @@ function vn(e, t) {
|
|
|
2174
2176
|
}
|
|
2175
2177
|
return "Does not match required format";
|
|
2176
2178
|
}
|
|
2177
|
-
function
|
|
2179
|
+
function $n(e) {
|
|
2178
2180
|
const t = e.expected;
|
|
2179
2181
|
return {
|
|
2180
2182
|
email: "Must be a valid email address",
|
|
@@ -2191,23 +2193,23 @@ function xn(e) {
|
|
|
2191
2193
|
"json-pointer": "Must be a valid JSON pointer"
|
|
2192
2194
|
}[t] ?? `Must be a valid ${t}`;
|
|
2193
2195
|
}
|
|
2194
|
-
function
|
|
2196
|
+
function In(e) {
|
|
2195
2197
|
const t = e.context?.type;
|
|
2196
2198
|
if (t && P(t)) {
|
|
2197
|
-
const n =
|
|
2199
|
+
const n = _[t];
|
|
2198
2200
|
return `Must be between ${n.min} and ${n.max}`;
|
|
2199
2201
|
}
|
|
2200
2202
|
return "Value is out of range for this integer type";
|
|
2201
2203
|
}
|
|
2202
|
-
function
|
|
2204
|
+
function Tn(e) {
|
|
2203
2205
|
const t = e.context?.dependent, n = e.context?.required;
|
|
2204
2206
|
return t && n?.length ? `When "${t}" is present, "${n.join('", "')}" must also be provided` : "Missing required dependent fields";
|
|
2205
2207
|
}
|
|
2206
|
-
function
|
|
2208
|
+
function wn(e) {
|
|
2207
2209
|
const t = e.expected;
|
|
2208
2210
|
return t && t.length <= 5 ? `Must be one of: ${t.map((r) => JSON.stringify(r)).join(", ")}` : "Invalid value";
|
|
2209
2211
|
}
|
|
2210
|
-
function
|
|
2212
|
+
function ir(e) {
|
|
2211
2213
|
const t = /* @__PURE__ */ new Map();
|
|
2212
2214
|
for (const n of e) {
|
|
2213
2215
|
const r = t.get(n.path) ?? [];
|
|
@@ -2215,17 +2217,17 @@ function rr(e) {
|
|
|
2215
2217
|
}
|
|
2216
2218
|
return t;
|
|
2217
2219
|
}
|
|
2218
|
-
function
|
|
2220
|
+
function sr(e, t) {
|
|
2219
2221
|
return e.filter((n) => n.path === t);
|
|
2220
2222
|
}
|
|
2221
|
-
function
|
|
2223
|
+
function ar(e, t) {
|
|
2222
2224
|
return e.some((n) => n.path === t);
|
|
2223
2225
|
}
|
|
2224
|
-
function
|
|
2226
|
+
function ur(e, t) {
|
|
2225
2227
|
const n = t === "" ? "/" : `${t}/`;
|
|
2226
2228
|
return e.filter((r) => r.path.startsWith(n));
|
|
2227
2229
|
}
|
|
2228
|
-
class
|
|
2230
|
+
class z {
|
|
2229
2231
|
registrations = /* @__PURE__ */ new Map();
|
|
2230
2232
|
parent;
|
|
2231
2233
|
constructor(t) {
|
|
@@ -2291,20 +2293,20 @@ class G {
|
|
|
2291
2293
|
return a && t.supportedFormats?.includes(a) && (r += 30), r += t.priority ?? 0, r;
|
|
2292
2294
|
}
|
|
2293
2295
|
createChild() {
|
|
2294
|
-
return new
|
|
2296
|
+
return new z(this);
|
|
2295
2297
|
}
|
|
2296
2298
|
}
|
|
2297
|
-
let
|
|
2298
|
-
function
|
|
2299
|
-
return
|
|
2300
|
-
}
|
|
2301
|
-
function ur(e) {
|
|
2302
|
-
E = e;
|
|
2299
|
+
let V = null;
|
|
2300
|
+
function L() {
|
|
2301
|
+
return V || (V = new z()), V;
|
|
2303
2302
|
}
|
|
2304
2303
|
function or(e) {
|
|
2305
|
-
|
|
2304
|
+
V = e;
|
|
2306
2305
|
}
|
|
2307
|
-
function cr(e
|
|
2306
|
+
function cr(e) {
|
|
2307
|
+
return new z(e);
|
|
2308
|
+
}
|
|
2309
|
+
function lr(e, t, n) {
|
|
2308
2310
|
return {
|
|
2309
2311
|
name: `type:${e}`,
|
|
2310
2312
|
registration: {
|
|
@@ -2317,7 +2319,7 @@ function cr(e, t, n) {
|
|
|
2317
2319
|
}
|
|
2318
2320
|
};
|
|
2319
2321
|
}
|
|
2320
|
-
function
|
|
2322
|
+
function pr(e, t, n) {
|
|
2321
2323
|
return {
|
|
2322
2324
|
name: `format:${e}`,
|
|
2323
2325
|
registration: {
|
|
@@ -2331,7 +2333,7 @@ function lr(e, t, n) {
|
|
|
2331
2333
|
}
|
|
2332
2334
|
};
|
|
2333
2335
|
}
|
|
2334
|
-
function
|
|
2336
|
+
function dr(e, t, n, r) {
|
|
2335
2337
|
return {
|
|
2336
2338
|
name: `type:${e}:format:${t}`,
|
|
2337
2339
|
registration: {
|
|
@@ -2346,7 +2348,7 @@ function pr(e, t, n, r) {
|
|
|
2346
2348
|
}
|
|
2347
2349
|
};
|
|
2348
2350
|
}
|
|
2349
|
-
function
|
|
2351
|
+
function fr(e, t, n, r) {
|
|
2350
2352
|
return {
|
|
2351
2353
|
name: e,
|
|
2352
2354
|
registration: {
|
|
@@ -2360,15 +2362,15 @@ function dr(e, t, n, r) {
|
|
|
2360
2362
|
}
|
|
2361
2363
|
};
|
|
2362
2364
|
}
|
|
2363
|
-
function
|
|
2365
|
+
function jn(e, t) {
|
|
2364
2366
|
if (t) {
|
|
2365
2367
|
const r = t.findBestWidget(e);
|
|
2366
2368
|
if (r)
|
|
2367
2369
|
return r;
|
|
2368
2370
|
}
|
|
2369
|
-
return
|
|
2371
|
+
return L().findBestWidget(e);
|
|
2370
2372
|
}
|
|
2371
|
-
function
|
|
2373
|
+
function mr(e) {
|
|
2372
2374
|
const t = e.definition, n = {};
|
|
2373
2375
|
if (typeof t == "object" && "x:ui" in t) {
|
|
2374
2376
|
const r = t["x:ui"];
|
|
@@ -2396,10 +2398,10 @@ function We(e) {
|
|
|
2396
2398
|
return n.type;
|
|
2397
2399
|
}
|
|
2398
2400
|
}
|
|
2399
|
-
function
|
|
2401
|
+
function yr(e) {
|
|
2400
2402
|
return We(e) !== void 0;
|
|
2401
2403
|
}
|
|
2402
|
-
function
|
|
2404
|
+
function gr(e, t) {
|
|
2403
2405
|
const n = We(e);
|
|
2404
2406
|
if (n) {
|
|
2405
2407
|
if (t) {
|
|
@@ -2407,7 +2409,7 @@ function yr(e, t) {
|
|
|
2407
2409
|
if (a)
|
|
2408
2410
|
return { name: n, registration: a };
|
|
2409
2411
|
}
|
|
2410
|
-
const s =
|
|
2412
|
+
const s = L().get(n);
|
|
2411
2413
|
if (s)
|
|
2412
2414
|
return { name: n, registration: s };
|
|
2413
2415
|
console.warn(
|
|
@@ -2415,16 +2417,16 @@ function yr(e, t) {
|
|
|
2415
2417
|
{ path: e.jsonPath }
|
|
2416
2418
|
);
|
|
2417
2419
|
}
|
|
2418
|
-
return
|
|
2420
|
+
return jn(e, t);
|
|
2419
2421
|
}
|
|
2420
|
-
function
|
|
2422
|
+
function hr(e, t, n) {
|
|
2421
2423
|
return {
|
|
2422
2424
|
...e,
|
|
2423
2425
|
...t,
|
|
2424
2426
|
...n
|
|
2425
2427
|
};
|
|
2426
2428
|
}
|
|
2427
|
-
function
|
|
2429
|
+
function Mn(e = L()) {
|
|
2428
2430
|
e.register("string", {
|
|
2429
2431
|
factory: ({ controller: i, ctx: o }) => Te({
|
|
2430
2432
|
ctx: o,
|
|
@@ -2540,7 +2542,7 @@ function jn(e = F()) {
|
|
|
2540
2542
|
canFallback: !0
|
|
2541
2543
|
});
|
|
2542
2544
|
e.register("object", {
|
|
2543
|
-
factory: ({ controller: i, ctx: o }) =>
|
|
2545
|
+
factory: ({ controller: i, ctx: o }) => Re({
|
|
2544
2546
|
ctx: o,
|
|
2545
2547
|
controller: i
|
|
2546
2548
|
}),
|
|
@@ -2550,7 +2552,7 @@ function jn(e = F()) {
|
|
|
2550
2552
|
priority: 0,
|
|
2551
2553
|
canFallback: !0
|
|
2552
2554
|
}), e.register("array", {
|
|
2553
|
-
factory: ({ controller: i, ctx: o }) =>
|
|
2555
|
+
factory: ({ controller: i, ctx: o }) => ke({
|
|
2554
2556
|
ctx: o,
|
|
2555
2557
|
controller: i
|
|
2556
2558
|
}),
|
|
@@ -2623,13 +2625,13 @@ function jn(e = F()) {
|
|
|
2623
2625
|
matcher: (i) => i.hasConst
|
|
2624
2626
|
});
|
|
2625
2627
|
}
|
|
2626
|
-
function
|
|
2628
|
+
function Sn(e = L()) {
|
|
2627
2629
|
return e.has("string") && e.has("object") && e.has("array");
|
|
2628
2630
|
}
|
|
2629
|
-
function
|
|
2630
|
-
|
|
2631
|
+
function br(e = L()) {
|
|
2632
|
+
Sn(e) || Mn(e);
|
|
2631
2633
|
}
|
|
2632
|
-
function
|
|
2634
|
+
function Dn(e) {
|
|
2633
2635
|
let t = e;
|
|
2634
2636
|
if (e.$root) {
|
|
2635
2637
|
const n = N(e.$root, e);
|
|
@@ -2659,38 +2661,38 @@ function A(e, t, n) {
|
|
|
2659
2661
|
n.delete(r);
|
|
2660
2662
|
}
|
|
2661
2663
|
}
|
|
2662
|
-
return e.default !== void 0 ? e.default : Array.isArray(e.examples) && e.examples.length > 0 ? e.examples[0] : "const" in e && e.const !== void 0 ? e.const : "enum" in e && Array.isArray(e.enum) && e.enum.length > 0 ? e.enum[0] :
|
|
2664
|
+
return e.default !== void 0 ? e.default : Array.isArray(e.examples) && e.examples.length > 0 ? e.examples[0] : "const" in e && e.const !== void 0 ? e.const : "enum" in e && Array.isArray(e.enum) && e.enum.length > 0 ? e.enum[0] : Vn(e) ? null : An(e, t, n);
|
|
2663
2665
|
}
|
|
2664
|
-
function
|
|
2666
|
+
function An(e, t, n) {
|
|
2665
2667
|
const r = _e(e);
|
|
2666
2668
|
if (C(e))
|
|
2667
|
-
return On(e, t, n);
|
|
2668
|
-
if (r === "choice" && "choices" in e)
|
|
2669
2669
|
return Cn(e, t, n);
|
|
2670
|
-
if (r === "
|
|
2670
|
+
if (r === "choice" && "choices" in e)
|
|
2671
2671
|
return Nn(e, t, n);
|
|
2672
|
+
if (r === "tuple" && "tuple" in e && "properties" in e)
|
|
2673
|
+
return Rn(e, t, n);
|
|
2672
2674
|
if (r === "array")
|
|
2673
2675
|
return kn(e, t, n);
|
|
2674
2676
|
if (r === "set")
|
|
2675
|
-
return
|
|
2677
|
+
return Pn(e, t, n);
|
|
2676
2678
|
if (r === "map")
|
|
2677
2679
|
return {};
|
|
2678
2680
|
if (r === "string")
|
|
2679
|
-
return Pn(e);
|
|
2680
|
-
if (Vn(r))
|
|
2681
2681
|
return qn(e);
|
|
2682
2682
|
if (Un(r))
|
|
2683
2683
|
return Fn(e);
|
|
2684
|
+
if (Bn(r))
|
|
2685
|
+
return Ln(e);
|
|
2684
2686
|
if (r === "boolean")
|
|
2685
2687
|
return !1;
|
|
2686
2688
|
if (r === "null")
|
|
2687
2689
|
return null;
|
|
2688
|
-
if (
|
|
2689
|
-
return
|
|
2690
|
+
if (Wn(r))
|
|
2691
|
+
return En(r);
|
|
2690
2692
|
if (r === "uuid" || r === "uri" || r === "uri-reference" || r === "binary" || r === "bytes")
|
|
2691
2693
|
return "";
|
|
2692
2694
|
}
|
|
2693
|
-
function
|
|
2695
|
+
function On(e) {
|
|
2694
2696
|
if (!e || e.length === 0)
|
|
2695
2697
|
return /* @__PURE__ */ new Set();
|
|
2696
2698
|
if (Array.isArray(e[0])) {
|
|
@@ -2699,10 +2701,10 @@ function An(e) {
|
|
|
2699
2701
|
}
|
|
2700
2702
|
return new Set(e);
|
|
2701
2703
|
}
|
|
2702
|
-
function
|
|
2704
|
+
function Cn(e, t, n) {
|
|
2703
2705
|
if (!C(e))
|
|
2704
2706
|
return {};
|
|
2705
|
-
const r =
|
|
2707
|
+
const r = On(e.required), s = {};
|
|
2706
2708
|
for (const [a, u] of Object.entries(e.properties))
|
|
2707
2709
|
if (r.has(a))
|
|
2708
2710
|
if (u.type && O(u.type)) {
|
|
@@ -2729,7 +2731,7 @@ function On(e, t, n) {
|
|
|
2729
2731
|
}
|
|
2730
2732
|
return s;
|
|
2731
2733
|
}
|
|
2732
|
-
function
|
|
2734
|
+
function Nn(e, t, n) {
|
|
2733
2735
|
if (!("choices" in e))
|
|
2734
2736
|
return;
|
|
2735
2737
|
const r = e.choices, s = Object.keys(r);
|
|
@@ -2748,7 +2750,7 @@ function Cn(e, t, n) {
|
|
|
2748
2750
|
const i = A(u, t, n);
|
|
2749
2751
|
return { [a]: i };
|
|
2750
2752
|
}
|
|
2751
|
-
function
|
|
2753
|
+
function Rn(e, t, n) {
|
|
2752
2754
|
if (!("tuple" in e) || !("properties" in e))
|
|
2753
2755
|
return {};
|
|
2754
2756
|
const r = e.tuple, s = e.properties, a = new Set(
|
|
@@ -2775,7 +2777,7 @@ function kn(e, t, n) {
|
|
|
2775
2777
|
const a = A(s, t, n);
|
|
2776
2778
|
return Array(r).fill(a ?? null);
|
|
2777
2779
|
}
|
|
2778
|
-
function
|
|
2780
|
+
function Pn(e, t, n) {
|
|
2779
2781
|
const r = ("minItems" in e ? e.minItems : 0) ?? 0;
|
|
2780
2782
|
if (r === 0)
|
|
2781
2783
|
return [];
|
|
@@ -2785,7 +2787,7 @@ function Rn(e, t, n) {
|
|
|
2785
2787
|
const a = A(s, t, n);
|
|
2786
2788
|
return Array(r).fill(a ?? null);
|
|
2787
2789
|
}
|
|
2788
|
-
function
|
|
2790
|
+
function qn(e) {
|
|
2789
2791
|
switch ("format" in e ? e.format : void 0) {
|
|
2790
2792
|
case "date":
|
|
2791
2793
|
return ze();
|
|
@@ -2793,15 +2795,11 @@ function Pn(e) {
|
|
|
2793
2795
|
return Ge();
|
|
2794
2796
|
case "time":
|
|
2795
2797
|
return "00:00:00";
|
|
2796
|
-
case "email":
|
|
2797
|
-
case "uri":
|
|
2798
|
-
case "uri-reference":
|
|
2799
|
-
case "uuid":
|
|
2800
2798
|
default:
|
|
2801
2799
|
return "";
|
|
2802
2800
|
}
|
|
2803
2801
|
}
|
|
2804
|
-
function
|
|
2802
|
+
function Fn(e) {
|
|
2805
2803
|
const t = _e(e), n = t === "int64" || t === "uint64" || t === "int128" || t === "uint128";
|
|
2806
2804
|
let r = "minimum" in e ? e.minimum : void 0, s = "maximum" in e ? e.maximum : void 0;
|
|
2807
2805
|
const a = "exclusiveMinimum" in e ? e.exclusiveMinimum : void 0, u = "exclusiveMaximum" in e ? e.exclusiveMaximum : void 0;
|
|
@@ -2811,7 +2809,7 @@ function qn(e) {
|
|
|
2811
2809
|
const o = "multipleOf" in e ? e.multipleOf : void 0;
|
|
2812
2810
|
return o !== void 0 && o > 0 && (i = Math.round(i / o) * o, r !== void 0 && i < r && (i = Math.ceil(r / o) * o), s !== void 0 && i > s && (i = Math.floor(s / o) * o)), n ? BigInt(Math.round(i)) : Math.round(i);
|
|
2813
2811
|
}
|
|
2814
|
-
function
|
|
2812
|
+
function Ln(e) {
|
|
2815
2813
|
let t = "minimum" in e ? e.minimum : void 0, n = "maximum" in e ? e.maximum : void 0;
|
|
2816
2814
|
const r = "exclusiveMinimum" in e ? e.exclusiveMinimum : void 0, s = "exclusiveMaximum" in e ? e.exclusiveMaximum : void 0, a = "multipleOf" in e ? e.multipleOf : 1e-3;
|
|
2817
2815
|
r !== void 0 && (t = r + a), s !== void 0 && (n = s - a);
|
|
@@ -2820,7 +2818,7 @@ function Fn(e) {
|
|
|
2820
2818
|
const i = "multipleOf" in e ? e.multipleOf : void 0;
|
|
2821
2819
|
return i !== void 0 && i > 0 && (u = Math.round(u / i) * i, t !== void 0 && u < t && (u = Math.ceil(t / i) * i), n !== void 0 && u > n && (u = Math.floor(n / i) * i)), u;
|
|
2822
2820
|
}
|
|
2823
|
-
function
|
|
2821
|
+
function En(e) {
|
|
2824
2822
|
switch (e) {
|
|
2825
2823
|
case "date":
|
|
2826
2824
|
return ze();
|
|
@@ -2834,7 +2832,7 @@ function Ln(e) {
|
|
|
2834
2832
|
return "";
|
|
2835
2833
|
}
|
|
2836
2834
|
}
|
|
2837
|
-
function
|
|
2835
|
+
function Vn(e) {
|
|
2838
2836
|
return Array.isArray(e.type) ? e.type.some(
|
|
2839
2837
|
(t) => typeof t == "string" ? t === "null" : !1
|
|
2840
2838
|
) : !1;
|
|
@@ -2849,7 +2847,7 @@ function _e(e) {
|
|
|
2849
2847
|
return n;
|
|
2850
2848
|
}
|
|
2851
2849
|
}
|
|
2852
|
-
function
|
|
2850
|
+
function Un(e) {
|
|
2853
2851
|
return e ? [
|
|
2854
2852
|
"int8",
|
|
2855
2853
|
"int16",
|
|
@@ -2863,10 +2861,10 @@ function Vn(e) {
|
|
|
2863
2861
|
"uint128"
|
|
2864
2862
|
].includes(e) : !1;
|
|
2865
2863
|
}
|
|
2866
|
-
function
|
|
2864
|
+
function Bn(e) {
|
|
2867
2865
|
return e ? ["float", "double", "decimal"].includes(e) : !1;
|
|
2868
2866
|
}
|
|
2869
|
-
function
|
|
2867
|
+
function Wn(e) {
|
|
2870
2868
|
return e ? ["date", "time", "datetime", "duration"].includes(e) : !1;
|
|
2871
2869
|
}
|
|
2872
2870
|
function ze() {
|
|
@@ -2875,9 +2873,9 @@ function ze() {
|
|
|
2875
2873
|
function Ge() {
|
|
2876
2874
|
return (/* @__PURE__ */ new Date()).toISOString();
|
|
2877
2875
|
}
|
|
2878
|
-
function
|
|
2876
|
+
function _n(e) {
|
|
2879
2877
|
if (e.isValid)
|
|
2880
|
-
return
|
|
2878
|
+
return re.valid;
|
|
2881
2879
|
const t = Be(e.errors), n = /* @__PURE__ */ new Map();
|
|
2882
2880
|
for (const u of t) {
|
|
2883
2881
|
const i = n.get(u.path) || [];
|
|
@@ -2909,9 +2907,9 @@ function Wn(e) {
|
|
|
2909
2907
|
a[c] = r(l, i);
|
|
2910
2908
|
}
|
|
2911
2909
|
}
|
|
2912
|
-
return Object.keys(a).length > 0 && (s.dependencies = a),
|
|
2910
|
+
return Object.keys(a).length > 0 && (s.dependencies = a), re.invalid(s);
|
|
2913
2911
|
}
|
|
2914
|
-
function
|
|
2912
|
+
function vr({
|
|
2915
2913
|
schema: e,
|
|
2916
2914
|
initialValue: t,
|
|
2917
2915
|
validationMode: n,
|
|
@@ -2923,30 +2921,30 @@ function br({
|
|
|
2923
2921
|
onValidate: o,
|
|
2924
2922
|
applySchemaDefaults: c = !0
|
|
2925
2923
|
}, l) {
|
|
2926
|
-
const y = t !== void 0 ? x.get(t) : void 0,
|
|
2924
|
+
const y = t !== void 0 ? x.get(t) : void 0, g = Dn(e);
|
|
2927
2925
|
let d;
|
|
2928
|
-
t === void 0 ? d =
|
|
2929
|
-
|
|
2926
|
+
t === void 0 ? d = g ?? {} : c ? d = lt(
|
|
2927
|
+
g,
|
|
2930
2928
|
y
|
|
2931
2929
|
) : d = y;
|
|
2932
|
-
const
|
|
2933
|
-
const
|
|
2934
|
-
if (o && !
|
|
2935
|
-
const
|
|
2936
|
-
o(
|
|
2930
|
+
const h = Ue(e), m = n ?? "onTouched", $ = (w) => {
|
|
2931
|
+
const k = h.validate(w);
|
|
2932
|
+
if (o && !k.isValid) {
|
|
2933
|
+
const E = Be(k.errors);
|
|
2934
|
+
o(E);
|
|
2937
2935
|
}
|
|
2938
|
-
return
|
|
2939
|
-
}, { controller: v, setStatus: I } =
|
|
2936
|
+
return _n(k);
|
|
2937
|
+
}, { controller: v, setStatus: I } = et({
|
|
2940
2938
|
initialValue: d,
|
|
2941
2939
|
validationMode: m,
|
|
2942
2940
|
validateDebounceMs: r,
|
|
2943
2941
|
validate: m === "onSubmit" ? void 0 : $,
|
|
2944
2942
|
onChange: i
|
|
2945
|
-
}), j =
|
|
2943
|
+
}), j = q(
|
|
2946
2944
|
He(() => {
|
|
2947
2945
|
v.dispose();
|
|
2948
2946
|
}),
|
|
2949
|
-
|
|
2947
|
+
fn({
|
|
2950
2948
|
schema: e,
|
|
2951
2949
|
controller: v,
|
|
2952
2950
|
widgetRegistry: s,
|
|
@@ -2957,64 +2955,64 @@ function br({
|
|
|
2957
2955
|
return l({ Form: j, controller: v, setStatus: I });
|
|
2958
2956
|
}
|
|
2959
2957
|
export {
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2958
|
+
z as DefaultWidgetRegistry,
|
|
2959
|
+
_ as INTEGER_BOUNDS,
|
|
2960
|
+
vr as JSONStructureForm,
|
|
2961
|
+
Rt as RefResolver,
|
|
2964
2962
|
ne as StructureContext,
|
|
2965
|
-
|
|
2963
|
+
fn as StructureControl,
|
|
2966
2964
|
D as StructureGenericControl,
|
|
2967
|
-
|
|
2965
|
+
nr as createExtendsResolver,
|
|
2968
2966
|
te as createRefResolver,
|
|
2969
2967
|
kt as createStructureContext,
|
|
2970
2968
|
Ue as createValidator,
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2969
|
+
cr as createWidgetRegistry,
|
|
2970
|
+
br as ensureDefaultWidgets,
|
|
2971
|
+
Dn as extractStructureDefaults,
|
|
2972
|
+
pr as forFormat,
|
|
2973
|
+
fr as forMatcher,
|
|
2974
|
+
lr as forType,
|
|
2975
|
+
dr as forTypeAndFormat,
|
|
2976
|
+
hn as formatValidationError,
|
|
2979
2977
|
Be as formatValidationErrors,
|
|
2980
|
-
|
|
2981
|
-
|
|
2978
|
+
ur as getChildErrors,
|
|
2979
|
+
sr as getErrorsForPath,
|
|
2982
2980
|
We as getExplicitWidgetName,
|
|
2983
|
-
|
|
2981
|
+
L as getGlobalWidgetRegistry,
|
|
2984
2982
|
ee as getNonNullTypes,
|
|
2985
2983
|
ae as getResolvedType,
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2984
|
+
mr as getWidgetOptions,
|
|
2985
|
+
ir as groupErrorsByPath,
|
|
2986
|
+
At as hasConstValue,
|
|
2987
|
+
yr as hasCustomWidget,
|
|
2988
|
+
Sn as hasDefaultWidgets,
|
|
2989
|
+
Dt as hasEnumValue,
|
|
2990
|
+
ar as hasErrorsAtPath,
|
|
2993
2991
|
he as isArrayTypeDefinition,
|
|
2994
|
-
|
|
2992
|
+
Tt as isBigIntType,
|
|
2995
2993
|
$e as isChoiceTypeDefinition,
|
|
2996
|
-
|
|
2994
|
+
er as isCompoundType,
|
|
2997
2995
|
Y as isFloatType,
|
|
2998
2996
|
P as isIntegerType,
|
|
2999
2997
|
ve as isMapTypeDefinition,
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
2998
|
+
Mt as isNamespace,
|
|
2999
|
+
Ot as isNullableType,
|
|
3000
|
+
wt as isNumericType,
|
|
3003
3001
|
C as isObjectTypeDefinition,
|
|
3004
|
-
|
|
3002
|
+
jt as isPrimitiveType,
|
|
3005
3003
|
be as isSetTypeDefinition,
|
|
3006
3004
|
Q as isTemporalType,
|
|
3007
3005
|
xe as isTupleTypeDefinition,
|
|
3008
|
-
|
|
3006
|
+
St as isTypeDefinition,
|
|
3009
3007
|
O as isTypeReference,
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3008
|
+
hr as mergeWidgetOptions,
|
|
3009
|
+
Ct as parseRefPath,
|
|
3010
|
+
Mn as registerDefaultWidgets,
|
|
3013
3011
|
Ie as resolveExtends,
|
|
3014
3012
|
N as resolveRef,
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3013
|
+
tr as resolveTypeReference,
|
|
3014
|
+
jn as resolveWidget,
|
|
3015
|
+
gr as resolveWidgetWithOverride,
|
|
3016
|
+
or as setGlobalWidgetRegistry,
|
|
3017
|
+
rr as validate
|
|
3020
3018
|
};
|