@gravitee/graphene-core 2.48.1 → 2.49.0-json-schema-form-context.fc0a461
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/__stories__/fixtures/json-schema-form/disableIf.fixture.d.ts.map +1 -1
- package/dist/__stories__/fixtures/json-schema-form/displayIf.fixture.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/JsonSchemaForm.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/conditional/ConditionalGate.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/conditional/concretizeCondition.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/conditional/evalCondition.d.ts +6 -6
- package/dist/composed/JsonSchemaForm/conditional/evalCondition.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/fields/__test-utils__/setupJsonSchemaForm.d.ts +1 -0
- package/dist/composed/JsonSchemaForm/fields/__test-utils__/setupJsonSchemaForm.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/form-bindings/resolveAt.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/schema/buildIndex.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/schema/types.d.ts +3 -1
- package/dist/composed/JsonSchemaForm/schema/types.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/utils/readPath.d.ts +12 -0
- package/dist/composed/JsonSchemaForm/utils/readPath.d.ts.map +1 -0
- package/dist/index.js +477 -460
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -29635,46 +29635,57 @@ function xJ() {
|
|
|
29635
29635
|
return e;
|
|
29636
29636
|
}
|
|
29637
29637
|
//#endregion
|
|
29638
|
-
//#region src/composed/JsonSchemaForm/
|
|
29638
|
+
//#region src/composed/JsonSchemaForm/utils/readPath.ts
|
|
29639
29639
|
function SJ(e, t) {
|
|
29640
|
-
if (
|
|
29641
|
-
|
|
29642
|
-
|
|
29643
|
-
if (
|
|
29640
|
+
if (t === "") return e;
|
|
29641
|
+
let n = e;
|
|
29642
|
+
for (let e of t.split(".")) {
|
|
29643
|
+
if (typeof n != "object" || !n) return;
|
|
29644
|
+
n = n[e];
|
|
29645
|
+
}
|
|
29646
|
+
return n;
|
|
29647
|
+
}
|
|
29648
|
+
//#endregion
|
|
29649
|
+
//#region src/composed/JsonSchemaForm/conditional/evalCondition.ts
|
|
29650
|
+
function CJ(e, t, n) {
|
|
29651
|
+
for (let [n, r] of e.$eq) if (!wJ(t.get(n), r)) return !1;
|
|
29652
|
+
if (e.$eqContext) {
|
|
29653
|
+
for (let [t, r] of e.$eqContext) if (!wJ(SJ(n, t), r)) return !1;
|
|
29644
29654
|
}
|
|
29645
29655
|
return !0;
|
|
29646
29656
|
}
|
|
29657
|
+
function wJ(e, t) {
|
|
29658
|
+
return (Array.isArray(t) ? t : [t]).includes(e);
|
|
29659
|
+
}
|
|
29647
29660
|
//#endregion
|
|
29648
29661
|
//#region src/composed/JsonSchemaForm/conditional/ConditionalGate.tsx
|
|
29649
|
-
function
|
|
29650
|
-
let { control: r } = xJ(),
|
|
29662
|
+
function TJ({ condition: e, unregisterOnHide: t, children: n }) {
|
|
29663
|
+
let { control: r, externalContext: i } = xJ(), a = B(() => Array.from(e.$eq.keys()), [e]), o = Iq({
|
|
29651
29664
|
control: r,
|
|
29652
|
-
name:
|
|
29653
|
-
}),
|
|
29654
|
-
let e = /* @__PURE__ */ new Map();
|
|
29655
|
-
|
|
29656
|
-
|
|
29657
|
-
return i.forEach((n, r) => e.set(n, t[r])), e;
|
|
29658
|
-
}, [i, a]));
|
|
29665
|
+
name: a
|
|
29666
|
+
}), s = CJ(e, B(() => {
|
|
29667
|
+
let e = /* @__PURE__ */ new Map(), t = Array.isArray(o) ? o : [o];
|
|
29668
|
+
return a.forEach((n, r) => e.set(n, t[r])), e;
|
|
29669
|
+
}, [a, o]), i);
|
|
29659
29670
|
return z(() => {
|
|
29660
|
-
if (!
|
|
29671
|
+
if (!s && !(!t || t.length === 0)) for (let e of t) r.unregister(e);
|
|
29661
29672
|
}, [
|
|
29662
|
-
|
|
29673
|
+
s,
|
|
29663
29674
|
t,
|
|
29664
29675
|
r
|
|
29665
|
-
]),
|
|
29676
|
+
]), s ? /* @__PURE__ */ U(ce, { children: n }) : null;
|
|
29666
29677
|
}
|
|
29667
29678
|
//#endregion
|
|
29668
29679
|
//#region src/composed/JsonSchemaForm/conditional/DisabledGate.tsx
|
|
29669
|
-
function
|
|
29680
|
+
function EJ({ condition: e, children: t }) {
|
|
29670
29681
|
let n = xJ(), r = B(() => Array.from(e.$eq.keys()), [e]), i = Iq({
|
|
29671
29682
|
control: n.control,
|
|
29672
29683
|
name: r
|
|
29673
29684
|
});
|
|
29674
|
-
return
|
|
29685
|
+
return CJ(e, B(() => {
|
|
29675
29686
|
let e = /* @__PURE__ */ new Map(), t = Array.isArray(i) ? i : [i];
|
|
29676
29687
|
return r.forEach((n, r) => e.set(n, t[r])), e;
|
|
29677
|
-
}, [r, i])) ? /* @__PURE__ */ U(bJ.Provider, {
|
|
29688
|
+
}, [r, i]), n.externalContext) ? /* @__PURE__ */ U(bJ.Provider, {
|
|
29678
29689
|
value: {
|
|
29679
29690
|
...n,
|
|
29680
29691
|
disabled: !0
|
|
@@ -29684,7 +29695,7 @@ function wJ({ condition: e, children: t }) {
|
|
|
29684
29695
|
}
|
|
29685
29696
|
//#endregion
|
|
29686
29697
|
//#region src/composed/JsonSchemaForm/conditional/concretizePath.ts
|
|
29687
|
-
function
|
|
29698
|
+
function DJ(e, t) {
|
|
29688
29699
|
return e.split(".").map((e, n) => {
|
|
29689
29700
|
let r = t[n];
|
|
29690
29701
|
return e === "*" && r !== void 0 && /^\d+$/.test(r) ? r : e;
|
|
@@ -29692,13 +29703,16 @@ function TJ(e, t) {
|
|
|
29692
29703
|
}
|
|
29693
29704
|
//#endregion
|
|
29694
29705
|
//#region src/composed/JsonSchemaForm/conditional/concretizeCondition.ts
|
|
29695
|
-
function
|
|
29696
|
-
let n = t === "" ? [] : t.split(".");
|
|
29697
|
-
return
|
|
29706
|
+
function OJ(e, t) {
|
|
29707
|
+
let n = t === "" ? [] : t.split("."), r = new Map([...e.$eq].map(([e, t]) => [DJ(e, n), t]));
|
|
29708
|
+
return e.$eqContext ? {
|
|
29709
|
+
$eq: r,
|
|
29710
|
+
$eqContext: e.$eqContext
|
|
29711
|
+
} : { $eq: r };
|
|
29698
29712
|
}
|
|
29699
29713
|
//#endregion
|
|
29700
29714
|
//#region src/composed/JsonSchemaForm/schema/preprocess/walkDependencies.ts
|
|
29701
|
-
function
|
|
29715
|
+
function kJ(e, t) {
|
|
29702
29716
|
if (!e) return e;
|
|
29703
29717
|
let n = {};
|
|
29704
29718
|
for (let [r, i] of Object.entries(e)) n[r] = Array.isArray(i) ? i : t(i);
|
|
@@ -29706,17 +29720,17 @@ function DJ(e, t) {
|
|
|
29706
29720
|
}
|
|
29707
29721
|
//#endregion
|
|
29708
29722
|
//#region src/composed/JsonSchemaForm/schema/preprocess/mergeAllOf.ts
|
|
29709
|
-
function
|
|
29710
|
-
return
|
|
29723
|
+
function AJ(e) {
|
|
29724
|
+
return jJ(e);
|
|
29711
29725
|
}
|
|
29712
|
-
function
|
|
29713
|
-
return
|
|
29726
|
+
function jJ(e) {
|
|
29727
|
+
return NJ(MJ({ ...e }));
|
|
29714
29728
|
}
|
|
29715
|
-
function
|
|
29729
|
+
function MJ(e) {
|
|
29716
29730
|
if (!Array.isArray(e.allOf) || e.allOf.length === 0) return e;
|
|
29717
29731
|
let t = { ...e.properties ?? {} }, n = new Set(e.required ?? []), r = e.gioConfig ? { ...e.gioConfig } : void 0, i = { ...e.dependencies ?? {} };
|
|
29718
29732
|
for (let a of e.allOf) {
|
|
29719
|
-
let e =
|
|
29733
|
+
let e = jJ(a);
|
|
29720
29734
|
Object.assign(t, e.properties ?? {}), e.required?.forEach((e) => n.add(e)), e.gioConfig && (r = {
|
|
29721
29735
|
...r,
|
|
29722
29736
|
...e.gioConfig
|
|
@@ -29725,33 +29739,33 @@ function AJ(e) {
|
|
|
29725
29739
|
let a = { ...e };
|
|
29726
29740
|
return Object.keys(t).length > 0 && (a.properties = t), n.size > 0 && (a.required = Array.from(n)), r !== void 0 && (a.gioConfig = r), Object.keys(i).length > 0 && (a.dependencies = i), delete a.allOf, a;
|
|
29727
29741
|
}
|
|
29728
|
-
function
|
|
29729
|
-
return e.properties &&=
|
|
29742
|
+
function NJ(e) {
|
|
29743
|
+
return e.properties &&= PJ(e.properties, jJ), e.items &&= Array.isArray(e.items) ? e.items.map(jJ) : jJ(e.items), e.oneOf &&= e.oneOf.map(jJ), e.anyOf &&= e.anyOf.map(jJ), e.dependencies &&= kJ(e.dependencies, jJ), e;
|
|
29730
29744
|
}
|
|
29731
|
-
function
|
|
29745
|
+
function PJ(e, t) {
|
|
29732
29746
|
let n = {};
|
|
29733
29747
|
for (let [r, i] of Object.entries(e)) n[r] = t(i);
|
|
29734
29748
|
return n;
|
|
29735
29749
|
}
|
|
29736
29750
|
//#endregion
|
|
29737
29751
|
//#region src/composed/JsonSchemaForm/utils/jsonPointer.ts
|
|
29738
|
-
function
|
|
29752
|
+
function FJ(e) {
|
|
29739
29753
|
return e.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
29740
29754
|
}
|
|
29741
|
-
function
|
|
29755
|
+
function IJ(e) {
|
|
29742
29756
|
return e.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
29743
29757
|
}
|
|
29744
29758
|
//#endregion
|
|
29745
29759
|
//#region src/composed/JsonSchemaForm/schema/preprocess/resolveRefs.ts
|
|
29746
|
-
function
|
|
29747
|
-
return
|
|
29760
|
+
function LJ(e) {
|
|
29761
|
+
return RJ(e, e, []);
|
|
29748
29762
|
}
|
|
29749
|
-
function
|
|
29763
|
+
function RJ(e, t, n) {
|
|
29750
29764
|
if (typeof e.$ref == "string") {
|
|
29751
29765
|
if (n.includes(e.$ref)) throw Error(`Cyclic $ref: ${[...n, e.$ref].join(" → ")}`);
|
|
29752
|
-
let r =
|
|
29766
|
+
let r = zJ(t, e.$ref);
|
|
29753
29767
|
if (r === void 0) throw Error(`Unresolved $ref: ${e.$ref}`);
|
|
29754
|
-
let i =
|
|
29768
|
+
let i = RJ(r, t, [...n, e.$ref]), { $ref: a, gioConfig: o, ...s } = e, c = {
|
|
29755
29769
|
...i,
|
|
29756
29770
|
...s
|
|
29757
29771
|
};
|
|
@@ -29763,25 +29777,25 @@ function IJ(e, t, n) {
|
|
|
29763
29777
|
let r = { ...e };
|
|
29764
29778
|
if (r.properties) {
|
|
29765
29779
|
let e = {};
|
|
29766
|
-
for (let [i, a] of Object.entries(r.properties)) e[i] =
|
|
29780
|
+
for (let [i, a] of Object.entries(r.properties)) e[i] = RJ(a, t, n);
|
|
29767
29781
|
r.properties = e;
|
|
29768
29782
|
}
|
|
29769
|
-
if (r.items &&= Array.isArray(r.items) ? r.items.map((e) =>
|
|
29783
|
+
if (r.items &&= Array.isArray(r.items) ? r.items.map((e) => RJ(e, t, n)) : RJ(r.items, t, n), r.oneOf &&= r.oneOf.map((e) => RJ(e, t, n)), r.anyOf &&= r.anyOf.map((e) => RJ(e, t, n)), r.allOf &&= r.allOf.map((e) => RJ(e, t, n)), r.dependencies &&= kJ(r.dependencies, (e) => RJ(e, t, n)), r.definitions) {
|
|
29770
29784
|
let e = {};
|
|
29771
|
-
for (let [i, a] of Object.entries(r.definitions)) e[i] =
|
|
29785
|
+
for (let [i, a] of Object.entries(r.definitions)) e[i] = RJ(a, t, n);
|
|
29772
29786
|
r.definitions = e;
|
|
29773
29787
|
}
|
|
29774
29788
|
if (r.$defs) {
|
|
29775
29789
|
let e = {};
|
|
29776
|
-
for (let [i, a] of Object.entries(r.$defs)) e[i] =
|
|
29790
|
+
for (let [i, a] of Object.entries(r.$defs)) e[i] = RJ(a, t, n);
|
|
29777
29791
|
r.$defs = e;
|
|
29778
29792
|
}
|
|
29779
29793
|
return r;
|
|
29780
29794
|
}
|
|
29781
|
-
function
|
|
29795
|
+
function zJ(e, t) {
|
|
29782
29796
|
if (t === "#") return e;
|
|
29783
29797
|
if (!t.startsWith("#/")) throw Error(`Unsupported $ref format (only local JSON Pointers are supported): ${t}`);
|
|
29784
|
-
let n = t.slice(2).split("/").map(
|
|
29798
|
+
let n = t.slice(2).split("/").map(IJ), r = e;
|
|
29785
29799
|
for (let e of n) {
|
|
29786
29800
|
if (typeof r != "object" || !r) return;
|
|
29787
29801
|
r = r[e];
|
|
@@ -29790,28 +29804,28 @@ function LJ(e, t) {
|
|
|
29790
29804
|
}
|
|
29791
29805
|
//#endregion
|
|
29792
29806
|
//#region src/composed/JsonSchemaForm/form-bindings/extractDefaults.ts
|
|
29793
|
-
function
|
|
29807
|
+
function BJ(e) {
|
|
29794
29808
|
let t;
|
|
29795
29809
|
try {
|
|
29796
|
-
t =
|
|
29810
|
+
t = AJ(LJ(e));
|
|
29797
29811
|
} catch {
|
|
29798
29812
|
return;
|
|
29799
29813
|
}
|
|
29800
|
-
return
|
|
29814
|
+
return VJ(t);
|
|
29801
29815
|
}
|
|
29802
|
-
function
|
|
29816
|
+
function VJ(e) {
|
|
29803
29817
|
if (e.deprecated === !0) return;
|
|
29804
29818
|
if (Object.prototype.hasOwnProperty.call(e, "default")) return e.default;
|
|
29805
29819
|
let t = {};
|
|
29806
29820
|
if (e.properties) for (let [n, r] of Object.entries(e.properties)) {
|
|
29807
|
-
let e =
|
|
29821
|
+
let e = VJ(r);
|
|
29808
29822
|
e !== void 0 && (t[n] = e);
|
|
29809
29823
|
}
|
|
29810
29824
|
let n = (e.oneOf ?? e.anyOf)?.find((e) => e.deprecated !== !0);
|
|
29811
29825
|
if (n?.properties) {
|
|
29812
29826
|
for (let [e, r] of Object.entries(n.properties)) if (r.const !== void 0) t[e] = r.const;
|
|
29813
29827
|
else if (!(e in t)) {
|
|
29814
|
-
let n =
|
|
29828
|
+
let n = VJ(r);
|
|
29815
29829
|
n !== void 0 && (t[e] = n);
|
|
29816
29830
|
}
|
|
29817
29831
|
}
|
|
@@ -29819,23 +29833,23 @@ function zJ(e) {
|
|
|
29819
29833
|
}
|
|
29820
29834
|
//#endregion
|
|
29821
29835
|
//#region src/composed/JsonSchemaForm/utils/fieldErrors.ts
|
|
29822
|
-
function
|
|
29836
|
+
function HJ(e) {
|
|
29823
29837
|
return e ? e.types ? Object.values(e.types).flat().filter((e) => typeof e == "string").map((e) => ({ message: e })) : [{ message: e.message }] : [];
|
|
29824
29838
|
}
|
|
29825
29839
|
//#endregion
|
|
29826
29840
|
//#region src/composed/JsonSchemaForm/utils/labelOf.ts
|
|
29827
|
-
function
|
|
29841
|
+
function UJ(e) {
|
|
29828
29842
|
return e ? e.charAt(0).toUpperCase() + e.slice(1) : "Field";
|
|
29829
29843
|
}
|
|
29830
|
-
function
|
|
29831
|
-
return
|
|
29844
|
+
function WJ(e) {
|
|
29845
|
+
return UJ(e.split(".").pop());
|
|
29832
29846
|
}
|
|
29833
|
-
function
|
|
29834
|
-
return typeof e.title == "string" && e.title.length > 0 ? e.title :
|
|
29847
|
+
function GJ(e, t) {
|
|
29848
|
+
return typeof e.title == "string" && e.title.length > 0 ? e.title : UJ(t);
|
|
29835
29849
|
}
|
|
29836
29850
|
//#endregion
|
|
29837
29851
|
//#region src/composed/JsonSchemaForm/fields/banner/SchemaBanner.tsx
|
|
29838
|
-
function
|
|
29852
|
+
function KJ({ banner: e }) {
|
|
29839
29853
|
let t = "title" in e ? e.title : void 0;
|
|
29840
29854
|
return /* @__PURE__ */ W(xv, {
|
|
29841
29855
|
role: "note",
|
|
@@ -29855,7 +29869,7 @@ function WJ({ banner: e }) {
|
|
|
29855
29869
|
}
|
|
29856
29870
|
//#endregion
|
|
29857
29871
|
//#region src/composed/JsonSchemaForm/fields/array/buildDefaultForType.ts
|
|
29858
|
-
function
|
|
29872
|
+
function qJ(e) {
|
|
29859
29873
|
if (e.default !== void 0) return e.default;
|
|
29860
29874
|
switch (e.type) {
|
|
29861
29875
|
case "string": return "";
|
|
@@ -29870,7 +29884,7 @@ function GJ(e) {
|
|
|
29870
29884
|
}
|
|
29871
29885
|
//#endregion
|
|
29872
29886
|
//#region src/composed/JsonSchemaForm/fields/array/use-array-field.ts
|
|
29873
|
-
function
|
|
29887
|
+
function JJ(e, t) {
|
|
29874
29888
|
let n = xJ(), r = t ? n.basePath ? `${n.basePath}.${t}` : t : n.basePath, { fields: i, append: a, remove: o } = yJ({
|
|
29875
29889
|
control: n.control,
|
|
29876
29890
|
name: r
|
|
@@ -29892,10 +29906,10 @@ function KJ(e, t) {
|
|
|
29892
29906
|
}
|
|
29893
29907
|
//#endregion
|
|
29894
29908
|
//#region src/composed/JsonSchemaForm/fields/array/ArrayField.tsx
|
|
29895
|
-
function
|
|
29896
|
-
let { schema: r } = e, { ctx: i, path: a, fields: o, append: s, remove: c, fieldState: l, isDisabled: u, atMin: d, atMax: f } =
|
|
29909
|
+
function YJ({ node: e, name: t, depth: n }) {
|
|
29910
|
+
let { schema: r } = e, { ctx: i, path: a, fields: o, append: s, remove: c, fieldState: l, isDisabled: u, atMin: d, atMax: f } = JJ(r, t), p = r.items, m = e.items, h = GJ(r, t), g = r.gioConfig?.uiBorder === "full";
|
|
29897
29911
|
function _() {
|
|
29898
|
-
s(
|
|
29912
|
+
s(ZJ(p), { shouldFocus: !1 });
|
|
29899
29913
|
}
|
|
29900
29914
|
return /* @__PURE__ */ W(TI, {
|
|
29901
29915
|
"aria-required": r.isRequired || void 0,
|
|
@@ -29907,10 +29921,10 @@ function qJ({ node: e, name: t, depth: n }) {
|
|
|
29907
29921
|
children: h
|
|
29908
29922
|
}),
|
|
29909
29923
|
r.description && /* @__PURE__ */ U(NI, { children: r.description }),
|
|
29910
|
-
r.gioConfig?.banner && /* @__PURE__ */ U(
|
|
29924
|
+
r.gioConfig?.banner && /* @__PURE__ */ U(KJ, { banner: r.gioConfig.banner }),
|
|
29911
29925
|
/* @__PURE__ */ U("div", {
|
|
29912
29926
|
className: "flex flex-col",
|
|
29913
|
-
children: o.map((e, t) => /* @__PURE__ */ U(
|
|
29927
|
+
children: o.map((e, t) => /* @__PURE__ */ U(XJ, {
|
|
29914
29928
|
index: t,
|
|
29915
29929
|
path: a,
|
|
29916
29930
|
itemsNode: m,
|
|
@@ -29932,11 +29946,11 @@ function qJ({ node: e, name: t, depth: n }) {
|
|
|
29932
29946
|
children: [/* @__PURE__ */ U(k, { "aria-hidden": "true" }), "Add"]
|
|
29933
29947
|
})
|
|
29934
29948
|
}),
|
|
29935
|
-
/* @__PURE__ */ U(FI, { errors:
|
|
29949
|
+
/* @__PURE__ */ U(FI, { errors: HJ(l.error) })
|
|
29936
29950
|
]
|
|
29937
29951
|
});
|
|
29938
29952
|
}
|
|
29939
|
-
function
|
|
29953
|
+
function XJ({ index: e, path: t, itemsNode: n, depth: r, disabled: i, canRemove: a, onRemove: o, ctx: s }) {
|
|
29940
29954
|
let c = `${t}.${e}`;
|
|
29941
29955
|
return /* @__PURE__ */ W(hC, {
|
|
29942
29956
|
defaultOpen: !0,
|
|
@@ -29971,7 +29985,7 @@ function JJ({ index: e, path: t, itemsNode: n, depth: r, disabled: i, canRemove:
|
|
|
29971
29985
|
basePath: c,
|
|
29972
29986
|
disabled: i
|
|
29973
29987
|
},
|
|
29974
|
-
children: /* @__PURE__ */ U(
|
|
29988
|
+
children: /* @__PURE__ */ U(OY, {
|
|
29975
29989
|
node: n,
|
|
29976
29990
|
name: "",
|
|
29977
29991
|
depth: r + 1
|
|
@@ -29980,17 +29994,17 @@ function JJ({ index: e, path: t, itemsNode: n, depth: r, disabled: i, canRemove:
|
|
|
29980
29994
|
}) })]
|
|
29981
29995
|
});
|
|
29982
29996
|
}
|
|
29983
|
-
function
|
|
29984
|
-
let t =
|
|
29985
|
-
return t === void 0 ?
|
|
29997
|
+
function ZJ(e) {
|
|
29998
|
+
let t = BJ(e);
|
|
29999
|
+
return t === void 0 ? qJ(e) : t;
|
|
29986
30000
|
}
|
|
29987
30001
|
//#endregion
|
|
29988
30002
|
//#region src/composed/JsonSchemaForm/fields/array/HeadersArrayField.tsx
|
|
29989
|
-
function
|
|
29990
|
-
let { schema: n } = e, { path: r, fields: i, append: a, remove: o, fieldState: s, isDisabled: c, atMin: l, atMax: u } =
|
|
30003
|
+
function QJ({ node: e, name: t }) {
|
|
30004
|
+
let { schema: n } = e, { path: r, fields: i, append: a, remove: o, fieldState: s, isDisabled: c, atMin: l, atMax: u } = JJ(n, t), d = n.items, f = d && !Array.isArray(d) ? d.properties ?? {} : {}, p = Object.keys(f), m = GJ(n, t);
|
|
29991
30005
|
function h() {
|
|
29992
30006
|
let e = {};
|
|
29993
|
-
for (let t of p) e[t] =
|
|
30007
|
+
for (let t of p) e[t] = qJ(f[t]);
|
|
29994
30008
|
a(e, { shouldFocus: !1 });
|
|
29995
30009
|
}
|
|
29996
30010
|
return /* @__PURE__ */ W(TI, {
|
|
@@ -30002,16 +30016,16 @@ function XJ({ node: e, name: t }) {
|
|
|
30002
30016
|
children: m
|
|
30003
30017
|
}),
|
|
30004
30018
|
n.description && /* @__PURE__ */ U(NI, { children: n.description }),
|
|
30005
|
-
n.gioConfig?.banner && /* @__PURE__ */ U(
|
|
30019
|
+
n.gioConfig?.banner && /* @__PURE__ */ U(KJ, { banner: n.gioConfig.banner }),
|
|
30006
30020
|
/* @__PURE__ */ U("div", {
|
|
30007
30021
|
className: "overflow-hidden rounded-lg border",
|
|
30008
30022
|
children: /* @__PURE__ */ W($H, { children: [/* @__PURE__ */ U(eU, { children: /* @__PURE__ */ W(rU, { children: [p.map((e) => /* @__PURE__ */ U(iU, {
|
|
30009
30023
|
scope: "col",
|
|
30010
|
-
children:
|
|
30024
|
+
children: tY(f[e], e)
|
|
30011
30025
|
}, e)), /* @__PURE__ */ U(iU, {
|
|
30012
30026
|
"aria-hidden": "true",
|
|
30013
30027
|
className: "w-px"
|
|
30014
|
-
})] }) }), /* @__PURE__ */ U(tU, { children: i.map((e, t) => /* @__PURE__ */ U(
|
|
30028
|
+
})] }) }), /* @__PURE__ */ U(tU, { children: i.map((e, t) => /* @__PURE__ */ U($J, {
|
|
30015
30029
|
rowIndex: t,
|
|
30016
30030
|
rowPath: `${r}.${t}`,
|
|
30017
30031
|
columnKeys: p,
|
|
@@ -30029,12 +30043,12 @@ function XJ({ node: e, name: t }) {
|
|
|
30029
30043
|
onClick: h,
|
|
30030
30044
|
children: [/* @__PURE__ */ U(k, { "aria-hidden": "true" }), "Add"]
|
|
30031
30045
|
}) }),
|
|
30032
|
-
/* @__PURE__ */ U(FI, { errors:
|
|
30046
|
+
/* @__PURE__ */ U(FI, { errors: HJ(s.error) })
|
|
30033
30047
|
]
|
|
30034
30048
|
});
|
|
30035
30049
|
}
|
|
30036
|
-
function
|
|
30037
|
-
return /* @__PURE__ */ W(rU, { children: [n.map((n) => /* @__PURE__ */ U(
|
|
30050
|
+
function $J({ rowIndex: e, rowPath: t, columnKeys: n, itemProperties: r, disabled: i, canRemove: a, onRemove: o }) {
|
|
30051
|
+
return /* @__PURE__ */ W(rU, { children: [n.map((n) => /* @__PURE__ */ U(eY, {
|
|
30038
30052
|
columnKey: n,
|
|
30039
30053
|
cellPath: `${t}.${n}`,
|
|
30040
30054
|
propSchema: r[n],
|
|
@@ -30053,7 +30067,7 @@ function ZJ({ rowIndex: e, rowPath: t, columnKeys: n, itemProperties: r, disable
|
|
|
30053
30067
|
})
|
|
30054
30068
|
})] });
|
|
30055
30069
|
}
|
|
30056
|
-
function
|
|
30070
|
+
function eY({ columnKey: e, cellPath: t, propSchema: n, rowIndex: r, disabled: i }) {
|
|
30057
30071
|
let { control: a } = xJ(), { field: o, fieldState: s } = Lq({
|
|
30058
30072
|
control: a,
|
|
30059
30073
|
name: t
|
|
@@ -30066,21 +30080,21 @@ function QJ({ columnKey: e, cellPath: t, propSchema: n, rowIndex: r, disabled: i
|
|
|
30066
30080
|
onBlur: l,
|
|
30067
30081
|
disabled: i,
|
|
30068
30082
|
"aria-invalid": s.invalid,
|
|
30069
|
-
"aria-label": `${
|
|
30083
|
+
"aria-label": `${tY(n, e)} for row ${r + 1}`,
|
|
30070
30084
|
placeholder: typeof n.title == "string" ? n.title : void 0
|
|
30071
30085
|
}) });
|
|
30072
30086
|
}
|
|
30073
|
-
function
|
|
30087
|
+
function tY(e, t) {
|
|
30074
30088
|
return typeof e.title == "string" ? e.title : t.charAt(0).toUpperCase() + t.slice(1);
|
|
30075
30089
|
}
|
|
30076
30090
|
//#endregion
|
|
30077
30091
|
//#region src/composed/JsonSchemaForm/fields/boolean/BooleanField.tsx
|
|
30078
|
-
function
|
|
30092
|
+
function nY({ node: e, name: t }) {
|
|
30079
30093
|
let { control: n, basePath: r, disabled: i } = xJ(), { schema: a } = e, o = t ? r ? `${r}.${t}` : t : r, { field: s, fieldState: c } = Lq({
|
|
30080
30094
|
control: n,
|
|
30081
30095
|
name: o,
|
|
30082
30096
|
defaultValue: typeof a.default == "boolean" ? a.default : !1
|
|
30083
|
-
}), l =
|
|
30097
|
+
}), l = GJ(a, t), u = i || a.readOnly === !0;
|
|
30084
30098
|
return /* @__PURE__ */ W(kI, {
|
|
30085
30099
|
orientation: "horizontal",
|
|
30086
30100
|
"data-invalid": c.invalid,
|
|
@@ -30096,43 +30110,43 @@ function eY({ node: e, name: t }) {
|
|
|
30096
30110
|
htmlFor: o,
|
|
30097
30111
|
children: l
|
|
30098
30112
|
}),
|
|
30099
|
-
a.gioConfig?.banner && /* @__PURE__ */ U(
|
|
30113
|
+
a.gioConfig?.banner && /* @__PURE__ */ U(KJ, { banner: a.gioConfig.banner }),
|
|
30100
30114
|
a.description && /* @__PURE__ */ U(NI, { children: a.description }),
|
|
30101
|
-
/* @__PURE__ */ U(FI, { errors:
|
|
30115
|
+
/* @__PURE__ */ U(FI, { errors: HJ(c.error) })
|
|
30102
30116
|
] })]
|
|
30103
30117
|
});
|
|
30104
30118
|
}
|
|
30105
30119
|
//#endregion
|
|
30106
30120
|
//#region src/composed/JsonSchemaForm/utils/schemaShape.ts
|
|
30107
|
-
function
|
|
30121
|
+
function rY(e) {
|
|
30108
30122
|
return Array.isArray(e.oneOf) && e.oneOf.length > 0 && e.oneOf.every((e) => e.const !== void 0);
|
|
30109
30123
|
}
|
|
30110
|
-
function
|
|
30124
|
+
function iY(e) {
|
|
30111
30125
|
return e.type !== "array" || e.uniqueItems !== !0 || !e.items || Array.isArray(e.items) ? !1 : Array.isArray(e.items.enum) && e.items.enum.length > 0;
|
|
30112
30126
|
}
|
|
30113
|
-
function
|
|
30127
|
+
function aY(e) {
|
|
30114
30128
|
return e.type === "array" && e.gioConfig?.uiType === "gio-headers-array";
|
|
30115
30129
|
}
|
|
30116
|
-
function
|
|
30117
|
-
return Array.isArray(e.oneOf) && e.oneOf.length > 0 && e.oneOf.some((e) => e.properties !== void 0) && !
|
|
30130
|
+
function oY(e) {
|
|
30131
|
+
return Array.isArray(e.oneOf) && e.oneOf.length > 0 && e.oneOf.some((e) => e.properties !== void 0) && !rY(e);
|
|
30118
30132
|
}
|
|
30119
|
-
function
|
|
30133
|
+
function sY(e) {
|
|
30120
30134
|
return Array.isArray(e.anyOf) && e.anyOf.length > 0 && e.anyOf.some((e) => e.properties !== void 0);
|
|
30121
30135
|
}
|
|
30122
30136
|
//#endregion
|
|
30123
30137
|
//#region src/composed/JsonSchemaForm/fields/enum/enumOptions.ts
|
|
30124
|
-
function
|
|
30138
|
+
function cY(e, t) {
|
|
30125
30139
|
let n = t?.[String(e)];
|
|
30126
30140
|
return n === void 0 ? e === null ? "—" : String(e) : n;
|
|
30127
30141
|
}
|
|
30128
|
-
function
|
|
30142
|
+
function lY(e, t) {
|
|
30129
30143
|
return e.map((e, n) => ({
|
|
30130
30144
|
raw: e,
|
|
30131
30145
|
key: String(n),
|
|
30132
|
-
label:
|
|
30146
|
+
label: cY(e, t)
|
|
30133
30147
|
}));
|
|
30134
30148
|
}
|
|
30135
|
-
function
|
|
30149
|
+
function uY(e) {
|
|
30136
30150
|
return e.map((e, t) => ({
|
|
30137
30151
|
raw: e.const,
|
|
30138
30152
|
key: String(t),
|
|
@@ -30141,12 +30155,12 @@ function cY(e) {
|
|
|
30141
30155
|
}
|
|
30142
30156
|
//#endregion
|
|
30143
30157
|
//#region src/composed/JsonSchemaForm/fields/enum/EnumField.tsx
|
|
30144
|
-
function
|
|
30158
|
+
function dY({ node: e, name: t }) {
|
|
30145
30159
|
let { control: n, basePath: r, disabled: i } = xJ(), { schema: a } = e, o = t ? r ? `${r}.${t}` : t : r, { field: s, fieldState: c } = Lq({
|
|
30146
30160
|
control: n,
|
|
30147
30161
|
name: o,
|
|
30148
30162
|
defaultValue: a.default
|
|
30149
|
-
}), { ref: l, onBlur: u } = s, d =
|
|
30163
|
+
}), { ref: l, onBlur: u } = s, d = GJ(a, t), f = i || a.readOnly === !0, p = fY(a), m = p.find((e) => Object.is(e.raw, s.value))?.key ?? "", h = (e) => p.find((t) => t.key === e)?.raw;
|
|
30150
30164
|
return /* @__PURE__ */ W(kI, {
|
|
30151
30165
|
"data-invalid": c.invalid,
|
|
30152
30166
|
children: [
|
|
@@ -30155,7 +30169,7 @@ function lY({ node: e, name: t }) {
|
|
|
30155
30169
|
required: a.isRequired,
|
|
30156
30170
|
children: d
|
|
30157
30171
|
}),
|
|
30158
|
-
a.gioConfig?.banner && /* @__PURE__ */ U(
|
|
30172
|
+
a.gioConfig?.banner && /* @__PURE__ */ U(KJ, { banner: a.gioConfig.banner }),
|
|
30159
30173
|
/* @__PURE__ */ W(pV, {
|
|
30160
30174
|
value: m,
|
|
30161
30175
|
onValueChange: (e) => s.onChange(h(e)),
|
|
@@ -30173,22 +30187,22 @@ function lY({ node: e, name: t }) {
|
|
|
30173
30187
|
}, e.key)) })]
|
|
30174
30188
|
}),
|
|
30175
30189
|
a.description && /* @__PURE__ */ U(NI, { children: a.description }),
|
|
30176
|
-
/* @__PURE__ */ U(FI, { errors:
|
|
30190
|
+
/* @__PURE__ */ U(FI, { errors: HJ(c.error) })
|
|
30177
30191
|
]
|
|
30178
30192
|
});
|
|
30179
30193
|
}
|
|
30180
|
-
function
|
|
30181
|
-
return
|
|
30194
|
+
function fY(e) {
|
|
30195
|
+
return rY(e) ? uY(e.oneOf ?? []) : lY(e.enum ?? [], e.gioConfig?.enumLabelMap);
|
|
30182
30196
|
}
|
|
30183
30197
|
//#endregion
|
|
30184
30198
|
//#region src/composed/JsonSchemaForm/fields/enum/MultiSelectField.tsx
|
|
30185
|
-
function
|
|
30199
|
+
function pY({ node: e, name: t }) {
|
|
30186
30200
|
let { control: n, basePath: r, disabled: i } = xJ(), { schema: a } = e, o = t ? r ? `${r}.${t}` : t : r, { field: s, fieldState: c } = Lq({
|
|
30187
30201
|
control: n,
|
|
30188
30202
|
name: o,
|
|
30189
30203
|
defaultValue: Array.isArray(a.default) ? a.default : []
|
|
30190
|
-
}), { ref: l, onBlur: u, onChange: d, value: f } = s, p = QA(), m =
|
|
30191
|
-
return
|
|
30204
|
+
}), { ref: l, onBlur: u, onChange: d, value: f } = s, p = QA(), m = GJ(a, t), h = i || a.readOnly === !0, g = a.items, _ = lY(g.enum ?? [], g.gioConfig?.enumLabelMap), v = _.map((e) => e.label), y = (e) => _.find((t) => t.label === e)?.raw, b = (e) => _.find((t) => Object.is(t.raw, e))?.label, x = (Array.isArray(s.value) ? s.value : []).map((e) => b(e)).filter((e) => e !== void 0);
|
|
30205
|
+
return mY({
|
|
30192
30206
|
schema: a,
|
|
30193
30207
|
options: _,
|
|
30194
30208
|
value: f,
|
|
@@ -30201,7 +30215,7 @@ function dY({ node: e, name: t }) {
|
|
|
30201
30215
|
required: a.isRequired,
|
|
30202
30216
|
children: m
|
|
30203
30217
|
}),
|
|
30204
|
-
a.gioConfig?.banner && /* @__PURE__ */ U(
|
|
30218
|
+
a.gioConfig?.banner && /* @__PURE__ */ U(KJ, { banner: a.gioConfig.banner }),
|
|
30205
30219
|
/* @__PURE__ */ W(IA, {
|
|
30206
30220
|
multiple: !0,
|
|
30207
30221
|
autoHighlight: !0,
|
|
@@ -30234,27 +30248,27 @@ function dY({ node: e, name: t }) {
|
|
|
30234
30248
|
})]
|
|
30235
30249
|
}),
|
|
30236
30250
|
a.description && /* @__PURE__ */ U(NI, { children: a.description }),
|
|
30237
|
-
/* @__PURE__ */ U(FI, { errors:
|
|
30251
|
+
/* @__PURE__ */ U(FI, { errors: HJ(c.error) })
|
|
30238
30252
|
]
|
|
30239
30253
|
});
|
|
30240
30254
|
}
|
|
30241
|
-
function
|
|
30255
|
+
function mY({ schema: e, options: t, value: n, onReset: r }) {
|
|
30242
30256
|
z(() => {
|
|
30243
30257
|
(Array.isArray(n) ? n : []).every((e) => t.some((t) => Object.is(t.raw, e))) || r(Array.isArray(e.default) ? e.default : []);
|
|
30244
30258
|
}, [e]);
|
|
30245
30259
|
}
|
|
30246
30260
|
//#endregion
|
|
30247
30261
|
//#region src/composed/JsonSchemaForm/fields/null/NullField.tsx
|
|
30248
|
-
function
|
|
30262
|
+
function hY() {
|
|
30249
30263
|
return null;
|
|
30250
30264
|
}
|
|
30251
30265
|
//#endregion
|
|
30252
30266
|
//#region src/composed/JsonSchemaForm/fields/number/NumberField.tsx
|
|
30253
|
-
function
|
|
30267
|
+
function gY({ node: e, name: t }) {
|
|
30254
30268
|
let { control: n, basePath: r, disabled: i } = xJ(), { schema: a } = e, o = t ? r ? `${r}.${t}` : t : r, { field: s, fieldState: c } = Lq({
|
|
30255
30269
|
control: n,
|
|
30256
30270
|
name: o
|
|
30257
|
-
}), l =
|
|
30271
|
+
}), l = GJ(a, t), u = i || a.readOnly === !0, d = (e) => {
|
|
30258
30272
|
let t = e.target.value;
|
|
30259
30273
|
if (t === "") {
|
|
30260
30274
|
s.onChange(null);
|
|
@@ -30271,7 +30285,7 @@ function mY({ node: e, name: t }) {
|
|
|
30271
30285
|
required: a.isRequired,
|
|
30272
30286
|
children: l
|
|
30273
30287
|
}),
|
|
30274
|
-
a.gioConfig?.banner && /* @__PURE__ */ U(
|
|
30288
|
+
a.gioConfig?.banner && /* @__PURE__ */ U(KJ, { banner: a.gioConfig.banner }),
|
|
30275
30289
|
/* @__PURE__ */ U(EA, {
|
|
30276
30290
|
id: o,
|
|
30277
30291
|
type: "number",
|
|
@@ -30287,21 +30301,21 @@ function mY({ node: e, name: t }) {
|
|
|
30287
30301
|
placeholder: (Array.isArray(a.examples) && a.examples[0] !== void 0 && a.examples[0] !== null ? String(a.examples[0]) : void 0) ?? (a.default !== void 0 && a.default !== null ? String(a.default) : void 0)
|
|
30288
30302
|
}),
|
|
30289
30303
|
a.description && /* @__PURE__ */ U(NI, { children: a.description }),
|
|
30290
|
-
/* @__PURE__ */ U(FI, { errors:
|
|
30304
|
+
/* @__PURE__ */ U(FI, { errors: HJ(c.error) })
|
|
30291
30305
|
]
|
|
30292
30306
|
});
|
|
30293
30307
|
}
|
|
30294
30308
|
//#endregion
|
|
30295
30309
|
//#region src/composed/JsonSchemaForm/utils/pickActiveVariant.ts
|
|
30296
|
-
function
|
|
30310
|
+
function _Y(e, t, n, r) {
|
|
30297
30311
|
if (e.length === 0) return -1;
|
|
30298
30312
|
let i = n?.get(t);
|
|
30299
|
-
return
|
|
30313
|
+
return vY(i, e) && yY(e[i], r) ? i : bY(e, r);
|
|
30300
30314
|
}
|
|
30301
|
-
function
|
|
30315
|
+
function vY(e, t) {
|
|
30302
30316
|
return typeof e == "number" && Number.isInteger(e) && t[e] !== void 0;
|
|
30303
30317
|
}
|
|
30304
|
-
function
|
|
30318
|
+
function yY(e, t) {
|
|
30305
30319
|
return Object.entries(e.properties ?? {}).every(([e, n]) => {
|
|
30306
30320
|
if (n.const !== void 0) return t(e) === n.const;
|
|
30307
30321
|
if (typeof n.pattern == "string") {
|
|
@@ -30311,18 +30325,18 @@ function _Y(e, t) {
|
|
|
30311
30325
|
return !0;
|
|
30312
30326
|
});
|
|
30313
30327
|
}
|
|
30314
|
-
function
|
|
30328
|
+
function bY(e, t) {
|
|
30315
30329
|
let n = 0, r = {
|
|
30316
30330
|
viable: !1,
|
|
30317
30331
|
matches: -1
|
|
30318
30332
|
};
|
|
30319
30333
|
return e.forEach((e, i) => {
|
|
30320
|
-
let a =
|
|
30321
|
-
|
|
30334
|
+
let a = xY(e, t);
|
|
30335
|
+
SY(a, r) > 0 && (n = i, r = a);
|
|
30322
30336
|
}), n;
|
|
30323
30337
|
}
|
|
30324
|
-
function
|
|
30325
|
-
return
|
|
30338
|
+
function xY(e, t) {
|
|
30339
|
+
return yY(e, t) ? {
|
|
30326
30340
|
viable: (e.required ?? []).every((e) => t(e) !== void 0),
|
|
30327
30341
|
matches: Object.keys(e.properties ?? {}).filter((e) => t(e) !== void 0).length
|
|
30328
30342
|
} : {
|
|
@@ -30330,13 +30344,13 @@ function yY(e, t) {
|
|
|
30330
30344
|
matches: -1
|
|
30331
30345
|
};
|
|
30332
30346
|
}
|
|
30333
|
-
function
|
|
30347
|
+
function SY(e, t) {
|
|
30334
30348
|
return e.viable === t.viable ? e.matches - t.matches : e.viable ? 1 : -1;
|
|
30335
30349
|
}
|
|
30336
30350
|
//#endregion
|
|
30337
30351
|
//#region src/composed/JsonSchemaForm/fields/oneOf/OneOfField.tsx
|
|
30338
|
-
function
|
|
30339
|
-
let n = xJ(), { control: r, index: i, basePath: a } = n, { schema: o } = e, s = i.variantIndices, c = B(() => e.variants ?? [], [e.variants]), [l, u] = oe(() =>
|
|
30352
|
+
function CY({ node: e, depth: t }) {
|
|
30353
|
+
let n = xJ(), { control: r, index: i, basePath: a } = n, { schema: o } = e, s = i.variantIndices, c = B(() => e.variants ?? [], [e.variants]), [l, u] = oe(() => _Y(c.map((e) => e.raw), a, s, (e) => r._getWatch(a ? `${a}.${e}` : e))), d = B(() => c.map((e) => (e.dependencyBranches ?? []).map((e) => Array.from(e.properties.keys()).map((e) => a ? `${a}.${e}` : e))), [c, a]);
|
|
30340
30354
|
if (c.length === 0) return null;
|
|
30341
30355
|
let f = c[l] ?? c[0], p = f.dependencyBranches ?? [], m = n.disabled || o.readOnly === !0, h = `${a || "root"}-variant`, g = (e) => {
|
|
30342
30356
|
if (e === l) return;
|
|
@@ -30367,21 +30381,21 @@ function xY({ node: e, depth: t }) {
|
|
|
30367
30381
|
}, t)) })]
|
|
30368
30382
|
}),
|
|
30369
30383
|
t === 0 && o.description && /* @__PURE__ */ U(NI, { children: o.description }),
|
|
30370
|
-
o.gioConfig?.banner && /* @__PURE__ */ U(
|
|
30384
|
+
o.gioConfig?.banner && /* @__PURE__ */ U(KJ, { banner: o.gioConfig.banner })
|
|
30371
30385
|
] }),
|
|
30372
|
-
f.consts.map(({ key: e, value: t }) => /* @__PURE__ */ U(
|
|
30386
|
+
f.consts.map(({ key: e, value: t }) => /* @__PURE__ */ U(wY, {
|
|
30373
30387
|
path: a ? `${a}.${e}` : e,
|
|
30374
30388
|
value: t
|
|
30375
30389
|
}, e)),
|
|
30376
|
-
Array.from(f.properties).filter(([, e]) => e.schema.const === void 0).map(([e, n]) => /* @__PURE__ */ U(
|
|
30390
|
+
Array.from(f.properties).filter(([, e]) => e.schema.const === void 0).map(([e, n]) => /* @__PURE__ */ U(OY, {
|
|
30377
30391
|
node: n,
|
|
30378
30392
|
name: e,
|
|
30379
30393
|
depth: t + 1
|
|
30380
30394
|
}, `${l}-${e}`)),
|
|
30381
|
-
p.map((e, n) => /* @__PURE__ */ U(
|
|
30382
|
-
condition:
|
|
30395
|
+
p.map((e, n) => /* @__PURE__ */ U(TJ, {
|
|
30396
|
+
condition: OJ(e.showIf, a),
|
|
30383
30397
|
unregisterOnHide: d[l]?.[n],
|
|
30384
|
-
children: Array.from(e.properties).map(([e, n]) => /* @__PURE__ */ U(
|
|
30398
|
+
children: Array.from(e.properties).map(([e, n]) => /* @__PURE__ */ U(OY, {
|
|
30385
30399
|
node: n,
|
|
30386
30400
|
name: e,
|
|
30387
30401
|
depth: t + 1
|
|
@@ -30389,7 +30403,7 @@ function xY({ node: e, depth: t }) {
|
|
|
30389
30403
|
}, `${l}-var-dep-${n}`))
|
|
30390
30404
|
] });
|
|
30391
30405
|
}
|
|
30392
|
-
function
|
|
30406
|
+
function wY({ path: e, value: t }) {
|
|
30393
30407
|
let { control: n } = xJ(), { field: r } = Lq({
|
|
30394
30408
|
control: n,
|
|
30395
30409
|
name: e
|
|
@@ -30400,28 +30414,28 @@ function SY({ path: e, value: t }) {
|
|
|
30400
30414
|
}
|
|
30401
30415
|
//#endregion
|
|
30402
30416
|
//#region src/composed/JsonSchemaForm/fields/object/ObjectField.tsx
|
|
30403
|
-
function
|
|
30404
|
-
let r = xJ(), { schema: i } = e, a = t ? r.basePath ? `${r.basePath}.${t}` : t : r.basePath, o =
|
|
30417
|
+
function TY({ node: e, name: t, depth: n }) {
|
|
30418
|
+
let r = xJ(), { schema: i } = e, a = t ? r.basePath ? `${r.basePath}.${t}` : t : r.basePath, o = oY(i) || sY(i), s = B(() => e.dependencyBranches ?? [], [e.dependencyBranches]), c = s.length > 0, l = B(() => s.map((e) => Array.from(e.properties.keys()).map((e) => a ? `${a}.${e}` : e)), [s, a]), u = (e.properties || o || c) && /* @__PURE__ */ U(bJ.Provider, {
|
|
30405
30419
|
value: {
|
|
30406
30420
|
...r,
|
|
30407
30421
|
basePath: a
|
|
30408
30422
|
},
|
|
30409
30423
|
children: /* @__PURE__ */ W(DI, { children: [
|
|
30410
|
-
e.properties && Array.from(e.properties).map(([e, t]) => /* @__PURE__ */ U(
|
|
30424
|
+
e.properties && Array.from(e.properties).map(([e, t]) => /* @__PURE__ */ U(OY, {
|
|
30411
30425
|
node: t,
|
|
30412
30426
|
name: e,
|
|
30413
30427
|
depth: n + 1
|
|
30414
30428
|
}, e)),
|
|
30415
|
-
s.map((e, t) => /* @__PURE__ */ U(
|
|
30416
|
-
condition:
|
|
30429
|
+
s.map((e, t) => /* @__PURE__ */ U(TJ, {
|
|
30430
|
+
condition: OJ(e.showIf, a),
|
|
30417
30431
|
unregisterOnHide: l[t],
|
|
30418
|
-
children: Array.from(e.properties).map(([e, t]) => /* @__PURE__ */ U(
|
|
30432
|
+
children: Array.from(e.properties).map(([e, t]) => /* @__PURE__ */ U(OY, {
|
|
30419
30433
|
node: t,
|
|
30420
30434
|
name: e,
|
|
30421
30435
|
depth: n + 1
|
|
30422
30436
|
}, e))
|
|
30423
30437
|
}, `dep-${t}`)),
|
|
30424
|
-
o && /* @__PURE__ */ U(
|
|
30438
|
+
o && /* @__PURE__ */ U(CY, {
|
|
30425
30439
|
node: e,
|
|
30426
30440
|
depth: n
|
|
30427
30441
|
})
|
|
@@ -30433,17 +30447,17 @@ function CY({ node: e, name: t, depth: n }) {
|
|
|
30433
30447
|
/* @__PURE__ */ U(EI, {
|
|
30434
30448
|
className: f ? "px-2 text-base font-semibold" : "text-base font-semibold",
|
|
30435
30449
|
required: i.isRequired,
|
|
30436
|
-
children:
|
|
30450
|
+
children: GJ(i, t)
|
|
30437
30451
|
}),
|
|
30438
30452
|
i.description && /* @__PURE__ */ U(NI, { children: i.description }),
|
|
30439
|
-
i.gioConfig?.banner && /* @__PURE__ */ U(
|
|
30453
|
+
i.gioConfig?.banner && /* @__PURE__ */ U(KJ, { banner: i.gioConfig.banner }),
|
|
30440
30454
|
u
|
|
30441
30455
|
]
|
|
30442
30456
|
});
|
|
30443
30457
|
}
|
|
30444
30458
|
//#endregion
|
|
30445
30459
|
//#region src/composed/PasswordInput/PasswordInput.tsx
|
|
30446
|
-
function
|
|
30460
|
+
function EY({ groupClassName: e, showLabel: t = "Show password", hideLabel: n = "Hide password", hideToggle: r = !1, className: i, disabled: a, ...o }) {
|
|
30447
30461
|
let [s, c] = oe(!1);
|
|
30448
30462
|
return /* @__PURE__ */ W(OA, {
|
|
30449
30463
|
className: e,
|
|
@@ -30469,14 +30483,14 @@ function wY({ groupClassName: e, showLabel: t = "Show password", hideLabel: n =
|
|
|
30469
30483
|
})]
|
|
30470
30484
|
});
|
|
30471
30485
|
}
|
|
30472
|
-
|
|
30486
|
+
EY.displayName = "PasswordInput";
|
|
30473
30487
|
//#endregion
|
|
30474
30488
|
//#region src/composed/JsonSchemaForm/fields/string/StringField.tsx
|
|
30475
|
-
function
|
|
30489
|
+
function DY({ node: e, name: t }) {
|
|
30476
30490
|
let { control: n, basePath: r, disabled: i } = xJ(), { schema: a } = e, o = t ? r ? `${r}.${t}` : t : r, { field: s, fieldState: c } = Lq({
|
|
30477
30491
|
control: n,
|
|
30478
30492
|
name: o
|
|
30479
|
-
}), l =
|
|
30493
|
+
}), l = GJ(a, t), u = i || a.readOnly === !0, d = c.invalid, f = typeof s.value == "string" ? s.value : "", p = (Array.isArray(a.examples) && a.examples[0] !== void 0 && a.examples[0] !== null ? String(a.examples[0]) : void 0) ?? (a.default !== void 0 && a.default !== null ? String(a.default) : void 0), m = {
|
|
30480
30494
|
id: o,
|
|
30481
30495
|
value: f,
|
|
30482
30496
|
onChange: s.onChange,
|
|
@@ -30496,8 +30510,8 @@ function TY({ node: e, name: t }) {
|
|
|
30496
30510
|
required: a.isRequired,
|
|
30497
30511
|
children: l
|
|
30498
30512
|
}),
|
|
30499
|
-
a.gioConfig?.banner && /* @__PURE__ */ U(
|
|
30500
|
-
a.format === "text" ? /* @__PURE__ */ U(DA, { ...m }) : a.format === "password" ? /* @__PURE__ */ U(
|
|
30513
|
+
a.gioConfig?.banner && /* @__PURE__ */ U(KJ, { banner: a.gioConfig.banner }),
|
|
30514
|
+
a.format === "text" ? /* @__PURE__ */ U(DA, { ...m }) : a.format === "password" ? /* @__PURE__ */ U(EY, {
|
|
30501
30515
|
...m,
|
|
30502
30516
|
pattern: a.pattern
|
|
30503
30517
|
}) : /* @__PURE__ */ U(EA, {
|
|
@@ -30506,144 +30520,144 @@ function TY({ node: e, name: t }) {
|
|
|
30506
30520
|
pattern: a.pattern
|
|
30507
30521
|
}),
|
|
30508
30522
|
a.description && /* @__PURE__ */ U(NI, { children: a.description }),
|
|
30509
|
-
/* @__PURE__ */ U(FI, { errors:
|
|
30523
|
+
/* @__PURE__ */ U(FI, { errors: HJ(c.error) })
|
|
30510
30524
|
]
|
|
30511
30525
|
});
|
|
30512
30526
|
}
|
|
30513
30527
|
//#endregion
|
|
30514
30528
|
//#region src/composed/JsonSchemaForm/SchemaField.tsx
|
|
30515
|
-
function
|
|
30516
|
-
let { basePath: r } = xJ(), { schema: i } = e, a = t ?? "", o = t ? r ? `${r}.${t}` : t : r, s = B(() => [o], [o]), c = B(() => e.displayIf ?
|
|
30529
|
+
function OY({ node: e, name: t, depth: n = 0 }) {
|
|
30530
|
+
let { basePath: r } = xJ(), { schema: i } = e, a = t ?? "", o = t ? r ? `${r}.${t}` : t : r, s = B(() => [o], [o]), c = B(() => e.displayIf ? OJ(e.displayIf, r) : void 0, [e.displayIf, r]), l = B(() => e.disableIf ? OJ(e.disableIf, r) : void 0, [e.disableIf, r]);
|
|
30517
30531
|
if (i.deprecated === !0) return null;
|
|
30518
|
-
let u =
|
|
30519
|
-
return u === null ? null : (l && (u = /* @__PURE__ */ U(
|
|
30532
|
+
let u = kY(e, a, t, n);
|
|
30533
|
+
return u === null ? null : (l && (u = /* @__PURE__ */ U(EJ, {
|
|
30520
30534
|
condition: l,
|
|
30521
30535
|
children: u
|
|
30522
|
-
})), c ? /* @__PURE__ */ U(
|
|
30536
|
+
})), c ? /* @__PURE__ */ U(TJ, {
|
|
30523
30537
|
condition: c,
|
|
30524
30538
|
unregisterOnHide: s,
|
|
30525
30539
|
children: u
|
|
30526
30540
|
}) : u);
|
|
30527
30541
|
}
|
|
30528
|
-
function
|
|
30529
|
-
let { schema: i } = e, a =
|
|
30530
|
-
return Array.isArray(i.enum) && i.enum.length > 0 ||
|
|
30542
|
+
function kY(e, t, n, r) {
|
|
30543
|
+
let { schema: i } = e, a = AY(i.type);
|
|
30544
|
+
return Array.isArray(i.enum) && i.enum.length > 0 || rY(i) ? /* @__PURE__ */ U(dY, {
|
|
30531
30545
|
node: e,
|
|
30532
30546
|
name: t
|
|
30533
|
-
}) :
|
|
30547
|
+
}) : iY(i) ? /* @__PURE__ */ U(pY, {
|
|
30534
30548
|
node: e,
|
|
30535
30549
|
name: t
|
|
30536
|
-
}) :
|
|
30550
|
+
}) : aY(i) ? /* @__PURE__ */ U(QJ, {
|
|
30537
30551
|
node: e,
|
|
30538
30552
|
name: t
|
|
30539
|
-
}) : a === "null" ? /* @__PURE__ */ U(
|
|
30553
|
+
}) : a === "null" ? /* @__PURE__ */ U(hY, {}) : a === "boolean" ? /* @__PURE__ */ U(nY, {
|
|
30540
30554
|
node: e,
|
|
30541
30555
|
name: t
|
|
30542
|
-
}) : a === "integer" || a === "number" ? /* @__PURE__ */ U(
|
|
30556
|
+
}) : a === "integer" || a === "number" ? /* @__PURE__ */ U(gY, {
|
|
30543
30557
|
node: e,
|
|
30544
30558
|
name: t
|
|
30545
|
-
}) : a === "string" ? /* @__PURE__ */ U(
|
|
30559
|
+
}) : a === "string" ? /* @__PURE__ */ U(DY, {
|
|
30546
30560
|
node: e,
|
|
30547
30561
|
name: t
|
|
30548
|
-
}) : i.properties || a === "object" ||
|
|
30562
|
+
}) : i.properties || a === "object" || oY(i) || sY(i) ? /* @__PURE__ */ U(TY, {
|
|
30549
30563
|
node: e,
|
|
30550
30564
|
name: n,
|
|
30551
30565
|
depth: r
|
|
30552
|
-
}) : a === "array" && i.items && !Array.isArray(i.items) ? /* @__PURE__ */ U(
|
|
30566
|
+
}) : a === "array" && i.items && !Array.isArray(i.items) ? /* @__PURE__ */ U(YJ, {
|
|
30553
30567
|
node: e,
|
|
30554
30568
|
name: n,
|
|
30555
30569
|
depth: r
|
|
30556
|
-
}) : (console.warn(`[JsonSchemaForm] No renderer for schema at "${n ?? "root"}" (${
|
|
30570
|
+
}) : (console.warn(`[JsonSchemaForm] No renderer for schema at "${n ?? "root"}" (${jY(i)}). Field is omitted.`), null);
|
|
30557
30571
|
}
|
|
30558
|
-
function
|
|
30572
|
+
function AY(e) {
|
|
30559
30573
|
return Array.isArray(e) ? e.find((e) => e !== "null") ?? e[0] : e;
|
|
30560
30574
|
}
|
|
30561
|
-
function
|
|
30575
|
+
function jY(e) {
|
|
30562
30576
|
return e.type ? Array.isArray(e.type) ? e.type.join("|") : e.type : e.oneOf ? "oneOf" : e.anyOf ? "anyOf" : e.allOf ? "allOf" : e.const === void 0 ? "unknown" : "const";
|
|
30563
30577
|
}
|
|
30564
30578
|
//#endregion
|
|
30565
30579
|
//#region src/composed/JsonSchemaForm/schema/preprocess/liftRequired.ts
|
|
30566
|
-
function
|
|
30567
|
-
return
|
|
30580
|
+
function MY(e) {
|
|
30581
|
+
return NY(e);
|
|
30568
30582
|
}
|
|
30569
|
-
function
|
|
30583
|
+
function NY(e) {
|
|
30570
30584
|
let t = { ...e };
|
|
30571
30585
|
if (t.properties) {
|
|
30572
30586
|
let e = new Set(t.required ?? []), n = {};
|
|
30573
30587
|
for (let [r, i] of Object.entries(t.properties)) {
|
|
30574
|
-
let t =
|
|
30588
|
+
let t = NY(i);
|
|
30575
30589
|
e.has(r) && (t.isRequired = !0, t.type === "string" && t.minLength === void 0 && t.const === void 0 && !Array.isArray(t.enum) && !Array.isArray(t.oneOf) && !Array.isArray(t.anyOf) && (t.minLength = 1), t.type === "array" && t.minItems === void 0 && t.const === void 0 && !Array.isArray(t.enum) && (t.minItems = 1)), n[r] = t;
|
|
30576
30590
|
}
|
|
30577
30591
|
t.properties = n;
|
|
30578
30592
|
}
|
|
30579
|
-
return t.items &&= Array.isArray(t.items) ? t.items.map(
|
|
30593
|
+
return t.items &&= Array.isArray(t.items) ? t.items.map(NY) : NY(t.items), t.oneOf &&= t.oneOf.map(NY), t.anyOf &&= t.anyOf.map(NY), t.allOf &&= t.allOf.map(NY), t.dependencies &&= kJ(t.dependencies, NY), t;
|
|
30580
30594
|
}
|
|
30581
30595
|
//#endregion
|
|
30582
30596
|
//#region src/composed/JsonSchemaForm/schema/preprocess/relaxDeprecated.ts
|
|
30583
|
-
function
|
|
30597
|
+
function PY(e) {
|
|
30584
30598
|
if (e.deprecated === !0) return { deprecated: !0 };
|
|
30585
30599
|
let t = { ...e };
|
|
30586
30600
|
if (e.properties) {
|
|
30587
30601
|
let n = [];
|
|
30588
30602
|
t.properties = {};
|
|
30589
|
-
for (let [r, i] of Object.entries(e.properties)) i.deprecated === !0 && n.push(r), t.properties[r] =
|
|
30603
|
+
for (let [r, i] of Object.entries(e.properties)) i.deprecated === !0 && n.push(r), t.properties[r] = PY(i);
|
|
30590
30604
|
n.length > 0 && e.required && (t.required = e.required.filter((e) => !n.includes(e)));
|
|
30591
30605
|
}
|
|
30592
|
-
return e.items && !Array.isArray(e.items) && (t.items =
|
|
30606
|
+
return e.items && !Array.isArray(e.items) && (t.items = PY(e.items)), e.oneOf && (t.oneOf = e.oneOf.filter((e) => e.deprecated !== !0).map(PY)), e.anyOf && (t.anyOf = e.anyOf.filter((e) => e.deprecated !== !0).map(PY)), e.dependencies && (t.dependencies = kJ(e.dependencies, PY)), t;
|
|
30593
30607
|
}
|
|
30594
30608
|
//#endregion
|
|
30595
30609
|
//#region src/composed/JsonSchemaForm/schema/buildIndex.ts
|
|
30596
|
-
function
|
|
30597
|
-
let n =
|
|
30610
|
+
function FY(e, t = "") {
|
|
30611
|
+
let n = MY(PY(AJ(LJ(e)))), r = /* @__PURE__ */ new Map();
|
|
30598
30612
|
return {
|
|
30599
|
-
root:
|
|
30613
|
+
root: IY(n, "", !1, r, "", t),
|
|
30600
30614
|
nodeByPath: r,
|
|
30601
30615
|
variantIndices: /* @__PURE__ */ new Map()
|
|
30602
30616
|
};
|
|
30603
30617
|
}
|
|
30604
|
-
function
|
|
30618
|
+
function IY(e, t, n, r, i = "", a = "") {
|
|
30605
30619
|
let o = {
|
|
30606
30620
|
rhfPath: t,
|
|
30607
30621
|
schema: e,
|
|
30608
30622
|
isRequired: n
|
|
30609
30623
|
};
|
|
30610
|
-
if (e.gioConfig?.displayIf && (o.displayIf =
|
|
30624
|
+
if (e.gioConfig?.displayIf && (o.displayIf = VY(e.gioConfig.displayIf, i, a)), e.gioConfig?.disableIf && (o.disableIf = VY(e.gioConfig.disableIf, i, a)), e.properties) {
|
|
30611
30625
|
let n = new Set(e.required ?? []), i = /* @__PURE__ */ new Map();
|
|
30612
30626
|
for (let [o, s] of Object.entries(e.properties)) {
|
|
30613
30627
|
let e = t ? `${t}.${o}` : o;
|
|
30614
|
-
i.set(o,
|
|
30628
|
+
i.set(o, IY(s, e, n.has(o), r, t, a));
|
|
30615
30629
|
}
|
|
30616
30630
|
o.properties = i;
|
|
30617
30631
|
}
|
|
30618
30632
|
if (e.items && !Array.isArray(e.items)) {
|
|
30619
30633
|
let n = t ? `${t}.*` : "*";
|
|
30620
|
-
o.items =
|
|
30634
|
+
o.items = IY(e.items, n, !1, r, t, a);
|
|
30621
30635
|
}
|
|
30622
30636
|
let s = e.oneOf ?? e.anyOf;
|
|
30623
|
-
if (Array.isArray(s) && s.length > 0 && (o.variants =
|
|
30624
|
-
let n =
|
|
30637
|
+
if (Array.isArray(s) && s.length > 0 && (o.variants = LY(s).map((e) => RY(e, t, a))), e.dependencies) {
|
|
30638
|
+
let n = UY(e.dependencies, t, a);
|
|
30625
30639
|
n.length > 0 && (o.dependencyBranches = n);
|
|
30626
30640
|
}
|
|
30627
30641
|
return r.set(t, o), o;
|
|
30628
30642
|
}
|
|
30629
|
-
function
|
|
30643
|
+
function LY(e) {
|
|
30630
30644
|
let t = /* @__PURE__ */ new Set();
|
|
30631
30645
|
return e.filter((e) => typeof e.title == "string" ? t.has(e.title) ? !1 : (t.add(e.title), !0) : !0);
|
|
30632
30646
|
}
|
|
30633
|
-
function
|
|
30647
|
+
function RY(e, t, n) {
|
|
30634
30648
|
let r = new Set(e.required ?? []), i = /* @__PURE__ */ new Map(), a = [];
|
|
30635
30649
|
for (let [o, s] of Object.entries(e.properties ?? {})) {
|
|
30636
|
-
let e =
|
|
30650
|
+
let e = zY(s);
|
|
30637
30651
|
e && a.push({
|
|
30638
30652
|
key: o,
|
|
30639
30653
|
value: e.value
|
|
30640
30654
|
});
|
|
30641
30655
|
let c = t ? `${t}.${o}` : o;
|
|
30642
|
-
i.set(o,
|
|
30656
|
+
i.set(o, BY(s, c, r.has(o), t, n));
|
|
30643
30657
|
}
|
|
30644
30658
|
let o;
|
|
30645
30659
|
if (e.dependencies) {
|
|
30646
|
-
let r =
|
|
30660
|
+
let r = UY(e.dependencies, t, n);
|
|
30647
30661
|
r.length > 0 && (o = r);
|
|
30648
30662
|
}
|
|
30649
30663
|
return {
|
|
@@ -30654,26 +30668,33 @@ function IY(e, t, n) {
|
|
|
30654
30668
|
raw: e
|
|
30655
30669
|
};
|
|
30656
30670
|
}
|
|
30657
|
-
function
|
|
30671
|
+
function zY(e) {
|
|
30658
30672
|
if (e.const !== void 0) return { value: e.const };
|
|
30659
30673
|
if (Array.isArray(e.enum) && e.enum.length === 1) return { value: e.enum[0] };
|
|
30660
30674
|
}
|
|
30661
|
-
function
|
|
30662
|
-
return
|
|
30675
|
+
function BY(e, t, n, r, i) {
|
|
30676
|
+
return IY(e, t, n, /* @__PURE__ */ new Map(), r, i);
|
|
30663
30677
|
}
|
|
30664
|
-
function
|
|
30665
|
-
let r = /* @__PURE__ */ new Map();
|
|
30666
|
-
for (let [
|
|
30667
|
-
|
|
30678
|
+
function VY(e, t, n) {
|
|
30679
|
+
let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
30680
|
+
for (let [a, o] of Object.entries(e.$eq)) {
|
|
30681
|
+
if (a.startsWith("context.")) {
|
|
30682
|
+
i.set(a.slice(8), o);
|
|
30683
|
+
continue;
|
|
30684
|
+
}
|
|
30685
|
+
let e = HY(a, t, n);
|
|
30668
30686
|
if (e === null) {
|
|
30669
|
-
console.warn(`[JsonSchemaForm] gioConfig path "${
|
|
30687
|
+
console.warn(`[JsonSchemaForm] gioConfig path "${a}" is unsupported (expected value.X / ./X / ../X / context.X).`);
|
|
30670
30688
|
continue;
|
|
30671
30689
|
}
|
|
30672
|
-
r.set(e,
|
|
30690
|
+
r.set(e, o);
|
|
30673
30691
|
}
|
|
30674
|
-
return
|
|
30692
|
+
return i.size > 0 ? {
|
|
30693
|
+
$eq: r,
|
|
30694
|
+
$eqContext: i
|
|
30695
|
+
} : { $eq: r };
|
|
30675
30696
|
}
|
|
30676
|
-
function
|
|
30697
|
+
function HY(e, t, n) {
|
|
30677
30698
|
let r = null;
|
|
30678
30699
|
if (e.startsWith("value.")) r = e.slice(6);
|
|
30679
30700
|
else if (e.startsWith("./")) {
|
|
@@ -30687,24 +30708,24 @@ function BY(e, t, n) {
|
|
|
30687
30708
|
}
|
|
30688
30709
|
return r === null ? null : n ? `${n}.${r}` : r;
|
|
30689
30710
|
}
|
|
30690
|
-
function
|
|
30711
|
+
function UY(e, t, n) {
|
|
30691
30712
|
return Object.entries(e).flatMap(([e, r]) => {
|
|
30692
|
-
let i =
|
|
30713
|
+
let i = WY(e, r);
|
|
30693
30714
|
if (!i) return [];
|
|
30694
30715
|
let a = t ? `${t}.${e}` : e;
|
|
30695
|
-
return i.map((r) =>
|
|
30716
|
+
return i.map((r) => GY(r, e, a, t, n));
|
|
30696
30717
|
});
|
|
30697
30718
|
}
|
|
30698
|
-
function
|
|
30719
|
+
function WY(e, t) {
|
|
30699
30720
|
let n = typeof t == "object" && t && !Array.isArray(t) ? t : null;
|
|
30700
|
-
return n?.oneOf?.length ? n.oneOf.every((t) => t.properties?.[e] !== void 0 &&
|
|
30721
|
+
return n?.oneOf?.length ? n.oneOf.every((t) => t.properties?.[e] !== void 0 && zY(t.properties[e]) !== void 0) ? n.oneOf : (console.warn(`[JsonSchemaForm] dependencies."${e}".oneOf has at least one variant missing a \`const\` (or single-value \`enum\`) discriminator on "${e}". Skipping the whole dependency (no partial unfold).`), null) : (console.warn(`[JsonSchemaForm] dependencies."${e}" is not a discriminator-oneOf shape (only \`{ oneOf: [...] }\` with const discriminators is supported). Skipping.`), null);
|
|
30701
30722
|
}
|
|
30702
|
-
function
|
|
30703
|
-
let a =
|
|
30723
|
+
function GY(e, t, n, r, i) {
|
|
30724
|
+
let a = zY(e.properties[t]).value, o = new Set((e.required ?? []).filter((e) => e !== t)), s = /* @__PURE__ */ new Map();
|
|
30704
30725
|
for (let [n, a] of Object.entries(e.properties ?? {})) {
|
|
30705
30726
|
if (n === t) continue;
|
|
30706
30727
|
let e = r ? `${r}.${n}` : n;
|
|
30707
|
-
s.set(n,
|
|
30728
|
+
s.set(n, BY(a, e, o.has(n), r, i));
|
|
30708
30729
|
}
|
|
30709
30730
|
let c = i ? `${i}.${n}` : n;
|
|
30710
30731
|
return {
|
|
@@ -30715,20 +30736,12 @@ function UY(e, t, n, r, i) {
|
|
|
30715
30736
|
}
|
|
30716
30737
|
//#endregion
|
|
30717
30738
|
//#region src/composed/JsonSchemaForm/JsonSchemaForm.tsx
|
|
30718
|
-
function
|
|
30739
|
+
function KY({ schema: e, control: t, name: n = "", disabled: r = !1, context: i }) {
|
|
30719
30740
|
let a = B(() => {
|
|
30720
30741
|
try {
|
|
30721
|
-
let a = NY(e, n);
|
|
30722
30742
|
return {
|
|
30723
30743
|
ok: !0,
|
|
30724
|
-
|
|
30725
|
-
control: t,
|
|
30726
|
-
basePath: n,
|
|
30727
|
-
disabled: r,
|
|
30728
|
-
externalContext: i,
|
|
30729
|
-
index: a
|
|
30730
|
-
},
|
|
30731
|
-
root: a.root
|
|
30744
|
+
value: FY(e, n)
|
|
30732
30745
|
};
|
|
30733
30746
|
} catch (e) {
|
|
30734
30747
|
return {
|
|
@@ -30736,25 +30749,37 @@ function WY({ schema: e, control: t, name: n = "", disabled: r = !1, context: i
|
|
|
30736
30749
|
error: e instanceof Error ? e.message : "Unknown schema error"
|
|
30737
30750
|
};
|
|
30738
30751
|
}
|
|
30752
|
+
}, [e, n]), o = B(() => a.ok ? {
|
|
30753
|
+
ok: !0,
|
|
30754
|
+
contextValue: {
|
|
30755
|
+
control: t,
|
|
30756
|
+
basePath: n,
|
|
30757
|
+
disabled: r,
|
|
30758
|
+
externalContext: i,
|
|
30759
|
+
index: a.value
|
|
30760
|
+
}
|
|
30761
|
+
} : {
|
|
30762
|
+
ok: !1,
|
|
30763
|
+
error: a.error
|
|
30739
30764
|
}, [
|
|
30740
|
-
|
|
30765
|
+
a,
|
|
30741
30766
|
t,
|
|
30742
30767
|
n,
|
|
30743
30768
|
r,
|
|
30744
30769
|
i
|
|
30745
30770
|
]);
|
|
30746
|
-
return
|
|
30747
|
-
value:
|
|
30748
|
-
children: /* @__PURE__ */ U(
|
|
30771
|
+
return o.ok ? /* @__PURE__ */ U(bJ.Provider, {
|
|
30772
|
+
value: o.contextValue,
|
|
30773
|
+
children: /* @__PURE__ */ U(OY, { node: o.contextValue.index.root })
|
|
30749
30774
|
}) : /* @__PURE__ */ W("p", {
|
|
30750
30775
|
role: "alert",
|
|
30751
30776
|
className: "text-sm text-destructive",
|
|
30752
|
-
children: ["Schema error: ",
|
|
30777
|
+
children: ["Schema error: ", o.error]
|
|
30753
30778
|
});
|
|
30754
30779
|
}
|
|
30755
30780
|
//#endregion
|
|
30756
30781
|
//#region src/composed/JsonSchemaForm/form-bindings/composeResolvers.ts
|
|
30757
|
-
function
|
|
30782
|
+
function qY(...e) {
|
|
30758
30783
|
return async (t, n, r) => {
|
|
30759
30784
|
let i = await Promise.all(e.map((e) => e(t, n, r))), a = {};
|
|
30760
30785
|
for (let e of i) Object.assign(a, e.errors);
|
|
@@ -30769,7 +30794,7 @@ function GY(...e) {
|
|
|
30769
30794
|
}
|
|
30770
30795
|
//#endregion
|
|
30771
30796
|
//#region ../../node_modules/ajv/dist/compile/codegen/code.js
|
|
30772
|
-
var
|
|
30797
|
+
var JY = /* @__PURE__ */ G(((e) => {
|
|
30773
30798
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.regexpCode = e.getEsmExportName = e.getProperty = e.safeStringify = e.stringify = e.strConcat = e.addCodeArg = e.str = e._ = e.nil = e._Code = e.Name = e.IDENTIFIER = e._CodeOrName = void 0;
|
|
30774
30799
|
var t = class {};
|
|
30775
30800
|
e._CodeOrName = t, e.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
|
@@ -30874,9 +30899,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
30874
30899
|
return new r(e.toString());
|
|
30875
30900
|
}
|
|
30876
30901
|
e.regexpCode = g;
|
|
30877
|
-
})),
|
|
30902
|
+
})), YY = /* @__PURE__ */ G(((e) => {
|
|
30878
30903
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.ValueScope = e.ValueScopeName = e.Scope = e.varKinds = e.UsedValueState = void 0;
|
|
30879
|
-
var t =
|
|
30904
|
+
var t = JY(), n = class extends Error {
|
|
30880
30905
|
constructor(e) {
|
|
30881
30906
|
super(`CodeGen: "code" for ${e} not defined`), this.value = e.value;
|
|
30882
30907
|
}
|
|
@@ -30985,9 +31010,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
30985
31010
|
return c;
|
|
30986
31011
|
}
|
|
30987
31012
|
};
|
|
30988
|
-
})),
|
|
31013
|
+
})), XY = /* @__PURE__ */ G(((e) => {
|
|
30989
31014
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.or = e.and = e.not = e.CodeGen = e.operators = e.varKinds = e.ValueScopeName = e.ValueScope = e.Scope = e.Name = e.regexpCode = e.stringify = e.getProperty = e.nil = e.strConcat = e.str = e._ = void 0;
|
|
30990
|
-
var t =
|
|
31015
|
+
var t = JY(), n = YY(), r = JY();
|
|
30991
31016
|
Object.defineProperty(e, "_", {
|
|
30992
31017
|
enumerable: !0,
|
|
30993
31018
|
get: function() {
|
|
@@ -31029,7 +31054,7 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
31029
31054
|
return r.Name;
|
|
31030
31055
|
}
|
|
31031
31056
|
});
|
|
31032
|
-
var i =
|
|
31057
|
+
var i = YY();
|
|
31033
31058
|
Object.defineProperty(e, "Scope", {
|
|
31034
31059
|
enumerable: !0,
|
|
31035
31060
|
get: function() {
|
|
@@ -31500,9 +31525,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
31500
31525
|
function L(e) {
|
|
31501
31526
|
return e instanceof t.Name ? e : (0, t._)`(${e})`;
|
|
31502
31527
|
}
|
|
31503
|
-
})),
|
|
31528
|
+
})), ZY = /* @__PURE__ */ G(((e) => {
|
|
31504
31529
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.checkStrictMode = e.getErrorPath = e.Type = e.useFunc = e.setEvaluated = e.evaluatedPropsToName = e.mergeEvaluated = e.eachItem = e.unescapeJsonPointer = e.escapeJsonPointer = e.escapeFragment = e.unescapeFragment = e.schemaRefOrVal = e.schemaHasRulesButRef = e.schemaHasRules = e.checkUnknownRules = e.alwaysValidSchema = e.toHash = void 0;
|
|
31505
|
-
var t =
|
|
31530
|
+
var t = XY(), n = JY();
|
|
31506
31531
|
function r(e) {
|
|
31507
31532
|
let t = {};
|
|
31508
31533
|
for (let n of e) t[n] = !0;
|
|
@@ -31625,9 +31650,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
31625
31650
|
}
|
|
31626
31651
|
}
|
|
31627
31652
|
e.checkStrictMode = x;
|
|
31628
|
-
})),
|
|
31653
|
+
})), QY = /* @__PURE__ */ G(((e) => {
|
|
31629
31654
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
31630
|
-
var t =
|
|
31655
|
+
var t = XY();
|
|
31631
31656
|
e.default = {
|
|
31632
31657
|
data: new t.Name("data"),
|
|
31633
31658
|
valCxt: new t.Name("valCxt"),
|
|
@@ -31646,9 +31671,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
31646
31671
|
jsonLen: new t.Name("jsonLen"),
|
|
31647
31672
|
jsonPart: new t.Name("jsonPart")
|
|
31648
31673
|
};
|
|
31649
|
-
})),
|
|
31674
|
+
})), $Y = /* @__PURE__ */ G(((e) => {
|
|
31650
31675
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.extendErrors = e.resetErrorsCount = e.reportExtraError = e.reportError = e.keyword$DataError = e.keywordError = void 0;
|
|
31651
|
-
var t =
|
|
31676
|
+
var t = XY(), n = ZY(), r = QY();
|
|
31652
31677
|
e.keywordError = { message: ({ keyword: e }) => (0, t.str)`must pass "${e}" keyword validation` }, e.keyword$DataError = { message: ({ keyword: e, schemaType: n }) => n ? (0, t.str)`"${e}" keyword must be ${n} ($data)` : (0, t.str)`"${e}" keyword is invalid ($data)` };
|
|
31653
31678
|
function i(n, r = e.keywordError, i, a) {
|
|
31654
31679
|
let { it: o } = n, { gen: s, compositeRule: u, allErrors: f } = o, p = d(n, r, i);
|
|
@@ -31710,9 +31735,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
31710
31735
|
let { keyword: o, data: s, schemaValue: c, it: l } = e, { opts: d, propertyName: f, topSchemaRef: p, schemaPath: m } = l;
|
|
31711
31736
|
a.push([u.keyword, o], [u.params, typeof n == "function" ? n(e) : n || (0, t._)`{}`]), d.messages && a.push([u.message, typeof i == "function" ? i(e) : i]), d.verbose && a.push([u.schema, c], [u.parentSchema, (0, t._)`${p}${m}`], [r.default.data, s]), f && a.push([u.propertyName, f]);
|
|
31712
31737
|
}
|
|
31713
|
-
})),
|
|
31738
|
+
})), eX = /* @__PURE__ */ G(((e) => {
|
|
31714
31739
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.boolOrEmptySchema = e.topBoolOrEmptySchema = void 0;
|
|
31715
|
-
var t =
|
|
31740
|
+
var t = $Y(), n = XY(), r = QY(), i = { message: "boolean schema is false" };
|
|
31716
31741
|
function a(e) {
|
|
31717
31742
|
let { gen: t, schema: i, validateName: a } = e;
|
|
31718
31743
|
i === !1 ? s(e, !1) : typeof i == "object" && i.$async === !0 ? t.return(r.default.data) : (t.assign((0, n._)`${a}.errors`, null), t.return(!0));
|
|
@@ -31736,7 +31761,7 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
31736
31761
|
};
|
|
31737
31762
|
(0, t.reportError)(o, i, void 0, n);
|
|
31738
31763
|
}
|
|
31739
|
-
})),
|
|
31764
|
+
})), tX = /* @__PURE__ */ G(((e) => {
|
|
31740
31765
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getRules = e.isJSONType = void 0;
|
|
31741
31766
|
var t = new Set([
|
|
31742
31767
|
"string",
|
|
@@ -31790,7 +31815,7 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
31790
31815
|
};
|
|
31791
31816
|
}
|
|
31792
31817
|
e.getRules = r;
|
|
31793
|
-
})),
|
|
31818
|
+
})), nX = /* @__PURE__ */ G(((e) => {
|
|
31794
31819
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.shouldUseRule = e.shouldUseGroup = e.schemaHasRulesForType = void 0;
|
|
31795
31820
|
function t({ schema: e, self: t }, r) {
|
|
31796
31821
|
let i = t.RULES.types[r];
|
|
@@ -31805,9 +31830,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
31805
31830
|
return e[t.keyword] !== void 0 || t.definition.implements?.some((t) => e[t] !== void 0);
|
|
31806
31831
|
}
|
|
31807
31832
|
e.shouldUseRule = r;
|
|
31808
|
-
})),
|
|
31833
|
+
})), rX = /* @__PURE__ */ G(((e) => {
|
|
31809
31834
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.reportTypeError = e.checkDataTypes = e.checkDataType = e.coerceAndCheckDataType = e.getJSONTypes = e.getSchemaTypes = e.DataType = void 0;
|
|
31810
|
-
var t =
|
|
31835
|
+
var t = tX(), n = nX(), r = $Y(), i = XY(), a = ZY(), o;
|
|
31811
31836
|
(function(e) {
|
|
31812
31837
|
e[e.Correct = 0] = "Correct", e[e.Wrong = 1] = "Wrong";
|
|
31813
31838
|
})(o || (e.DataType = o = {}));
|
|
@@ -31942,9 +31967,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
31942
31967
|
it: e
|
|
31943
31968
|
};
|
|
31944
31969
|
}
|
|
31945
|
-
})),
|
|
31970
|
+
})), iX = /* @__PURE__ */ G(((e) => {
|
|
31946
31971
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.assignDefaults = void 0;
|
|
31947
|
-
var t =
|
|
31972
|
+
var t = XY(), n = ZY();
|
|
31948
31973
|
function r(e, t) {
|
|
31949
31974
|
let { properties: n, items: r } = e.schema;
|
|
31950
31975
|
if (t === "object" && n) for (let t in n) i(e, t, n[t].default);
|
|
@@ -31962,9 +31987,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
31962
31987
|
let u = (0, t._)`${l} === undefined`;
|
|
31963
31988
|
c.useDefaults === "empty" && (u = (0, t._)`${u} || ${l} === null || ${l} === ""`), a.if(u, (0, t._)`${l} = ${(0, t.stringify)(i)}`);
|
|
31964
31989
|
}
|
|
31965
|
-
})),
|
|
31990
|
+
})), aX = /* @__PURE__ */ G(((e) => {
|
|
31966
31991
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateUnion = e.validateArray = e.usePattern = e.callValidateCode = e.schemaProperties = e.allSchemaProperties = e.noPropertyInData = e.propertyInData = e.isOwnProperty = e.hasPropFunc = e.reportMissingProp = e.checkMissingProp = e.checkReportMissingProp = void 0;
|
|
31967
|
-
var t =
|
|
31992
|
+
var t = XY(), n = ZY(), r = QY(), i = ZY();
|
|
31968
31993
|
function a(e, n) {
|
|
31969
31994
|
let { gen: r, data: i, it: a } = e;
|
|
31970
31995
|
r.if(d(r, i, n, a.opts.ownProperties), () => {
|
|
@@ -32066,9 +32091,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
32066
32091
|
})), e.result(s, () => e.reset(), () => e.error(!0));
|
|
32067
32092
|
}
|
|
32068
32093
|
e.validateUnion = v;
|
|
32069
|
-
})),
|
|
32094
|
+
})), oX = /* @__PURE__ */ G(((e) => {
|
|
32070
32095
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateKeywordUsage = e.validSchemaType = e.funcKeywordCode = e.macroKeywordCode = void 0;
|
|
32071
|
-
var t =
|
|
32096
|
+
var t = XY(), n = QY(), r = aX(), i = $Y();
|
|
32072
32097
|
function a(e, n) {
|
|
32073
32098
|
let { gen: r, keyword: i, schema: a, parentSchema: o, it: s } = e, c = n.macro.call(s.self, a, o, s), l = u(r, i, c);
|
|
32074
32099
|
s.opts.validateSchema !== !1 && s.self.validateSchema(c, !0);
|
|
@@ -32147,9 +32172,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
32147
32172
|
}
|
|
32148
32173
|
}
|
|
32149
32174
|
e.validateKeywordUsage = f;
|
|
32150
|
-
})),
|
|
32175
|
+
})), sX = /* @__PURE__ */ G(((e) => {
|
|
32151
32176
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.extendSubschemaMode = e.extendSubschemaData = e.getSubschema = void 0;
|
|
32152
|
-
var t =
|
|
32177
|
+
var t = XY(), n = ZY();
|
|
32153
32178
|
function r(e, { keyword: r, schemaProp: i, schema: a, schemaPath: o, errSchemaPath: s, topSchemaRef: c }) {
|
|
32154
32179
|
if (r !== void 0 && a !== void 0) throw Error("both \"keyword\" and \"schema\" passed, only one allowed");
|
|
32155
32180
|
if (r !== void 0) {
|
|
@@ -32193,7 +32218,7 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
32193
32218
|
r !== void 0 && (e.compositeRule = r), i !== void 0 && (e.createErrors = i), a !== void 0 && (e.allErrors = a), e.jtdDiscriminator = t, e.jtdMetadata = n;
|
|
32194
32219
|
}
|
|
32195
32220
|
e.extendSubschemaMode = a;
|
|
32196
|
-
})),
|
|
32221
|
+
})), cX = /* @__PURE__ */ G(((e, t) => {
|
|
32197
32222
|
t.exports = function e(t, n) {
|
|
32198
32223
|
if (t === n) return !0;
|
|
32199
32224
|
if (t && n && typeof t == "object" && typeof n == "object") {
|
|
@@ -32217,7 +32242,7 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
32217
32242
|
}
|
|
32218
32243
|
return t !== t && n !== n;
|
|
32219
32244
|
};
|
|
32220
|
-
})),
|
|
32245
|
+
})), lX = /* @__PURE__ */ G(((e, t) => {
|
|
32221
32246
|
var n = t.exports = function(e, t, n) {
|
|
32222
32247
|
typeof t == "function" && (n = t, t = {}), n = t.cb || n;
|
|
32223
32248
|
var i = typeof n == "function" ? n : n.pre || function() {}, a = n.post || function() {};
|
|
@@ -32280,9 +32305,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
32280
32305
|
function i(e) {
|
|
32281
32306
|
return e.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
32282
32307
|
}
|
|
32283
|
-
})),
|
|
32308
|
+
})), uX = /* @__PURE__ */ G(((e) => {
|
|
32284
32309
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getSchemaRefs = e.resolveUrl = e.normalizeId = e._getFullPath = e.getFullPath = e.inlineRef = void 0;
|
|
32285
|
-
var t =
|
|
32310
|
+
var t = ZY(), n = cX(), r = lX(), i = new Set([
|
|
32286
32311
|
"type",
|
|
32287
32312
|
"format",
|
|
32288
32313
|
"pattern",
|
|
@@ -32371,9 +32396,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
32371
32396
|
}
|
|
32372
32397
|
}
|
|
32373
32398
|
e.getSchemaRefs = h;
|
|
32374
|
-
})),
|
|
32399
|
+
})), dX = /* @__PURE__ */ G(((e) => {
|
|
32375
32400
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getData = e.KeywordCxt = e.validateFunctionCode = void 0;
|
|
32376
|
-
var t =
|
|
32401
|
+
var t = eX(), n = rX(), r = nX(), i = rX(), a = iX(), o = oX(), s = sX(), c = XY(), l = QY(), u = uX(), d = ZY(), f = $Y();
|
|
32377
32402
|
function p(e) {
|
|
32378
32403
|
if (S(e) && (w(e), x(e))) {
|
|
32379
32404
|
_(e);
|
|
@@ -32663,23 +32688,23 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
32663
32688
|
}
|
|
32664
32689
|
}
|
|
32665
32690
|
e.getData = V;
|
|
32666
|
-
})),
|
|
32691
|
+
})), fX = /* @__PURE__ */ G(((e) => {
|
|
32667
32692
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = class extends Error {
|
|
32668
32693
|
constructor(e) {
|
|
32669
32694
|
super("validation failed"), this.errors = e, this.ajv = this.validation = !0;
|
|
32670
32695
|
}
|
|
32671
32696
|
};
|
|
32672
|
-
})),
|
|
32697
|
+
})), pX = /* @__PURE__ */ G(((e) => {
|
|
32673
32698
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
32674
|
-
var t =
|
|
32699
|
+
var t = uX();
|
|
32675
32700
|
e.default = class extends Error {
|
|
32676
32701
|
constructor(e, n, r, i) {
|
|
32677
32702
|
super(i || `can't resolve reference ${r} from id ${n}`), this.missingRef = (0, t.resolveUrl)(e, n, r), this.missingSchema = (0, t.normalizeId)((0, t.getFullPath)(e, this.missingRef));
|
|
32678
32703
|
}
|
|
32679
32704
|
};
|
|
32680
|
-
})),
|
|
32705
|
+
})), mX = /* @__PURE__ */ G(((e) => {
|
|
32681
32706
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.resolveSchema = e.getCompilingSchema = e.resolveRef = e.compileSchema = e.SchemaEnv = void 0;
|
|
32682
|
-
var t =
|
|
32707
|
+
var t = XY(), n = fX(), r = QY(), i = uX(), a = ZY(), o = dX(), s = class {
|
|
32683
32708
|
constructor(e) {
|
|
32684
32709
|
this.refs = {}, this.dynamicAnchors = {};
|
|
32685
32710
|
let t;
|
|
@@ -32838,27 +32863,27 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
32838
32863
|
baseId: t
|
|
32839
32864
|
}), o.schema !== o.root.schema) return o;
|
|
32840
32865
|
}
|
|
32841
|
-
})),
|
|
32842
|
-
$id: () =>
|
|
32866
|
+
})), hX = /* @__PURE__ */ Ce({
|
|
32867
|
+
$id: () => gX,
|
|
32843
32868
|
additionalProperties: () => !1,
|
|
32844
|
-
default: () =>
|
|
32845
|
-
description: () =>
|
|
32846
|
-
properties: () =>
|
|
32847
|
-
required: () =>
|
|
32848
|
-
type: () =>
|
|
32849
|
-
}),
|
|
32850
|
-
|
|
32869
|
+
default: () => xX,
|
|
32870
|
+
description: () => _X,
|
|
32871
|
+
properties: () => bX,
|
|
32872
|
+
required: () => yX,
|
|
32873
|
+
type: () => vX
|
|
32874
|
+
}), gX, _X, vX, yX, bX, xX, SX = Se((() => {
|
|
32875
|
+
gX = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", _X = "Meta-schema for $data reference (JSON AnySchema extension proposal)", vX = "object", yX = ["$data"], bX = { $data: {
|
|
32851
32876
|
type: "string",
|
|
32852
32877
|
anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }]
|
|
32853
|
-
} },
|
|
32854
|
-
$id:
|
|
32855
|
-
description:
|
|
32856
|
-
type:
|
|
32857
|
-
required:
|
|
32858
|
-
properties:
|
|
32878
|
+
} }, xX = {
|
|
32879
|
+
$id: gX,
|
|
32880
|
+
description: _X,
|
|
32881
|
+
type: vX,
|
|
32882
|
+
required: yX,
|
|
32883
|
+
properties: bX,
|
|
32859
32884
|
additionalProperties: !1
|
|
32860
32885
|
};
|
|
32861
|
-
})),
|
|
32886
|
+
})), CX = /* @__PURE__ */ G(((e, t) => {
|
|
32862
32887
|
var n = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu), r = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u), i = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu), a = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu), o = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
|
|
32863
32888
|
function s(e) {
|
|
32864
32889
|
let t = "", n = 0, r = 0;
|
|
@@ -33070,8 +33095,8 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
33070
33095
|
normalizeIPv6: f,
|
|
33071
33096
|
stringArrayToHexStripped: s
|
|
33072
33097
|
};
|
|
33073
|
-
})),
|
|
33074
|
-
var { isUUID: n } =
|
|
33098
|
+
})), wX = /* @__PURE__ */ G(((e, t) => {
|
|
33099
|
+
var { isUUID: n } = CX(), r = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu, i = [
|
|
33075
33100
|
"http",
|
|
33076
33101
|
"https",
|
|
33077
33102
|
"ws",
|
|
@@ -33176,8 +33201,8 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
33176
33201
|
isValidSchemeName: a,
|
|
33177
33202
|
getSchemeHandler: y
|
|
33178
33203
|
};
|
|
33179
|
-
})),
|
|
33180
|
-
var { normalizeIPv6: n, removeDotSegments: r, recomposeAuthority: i, normalizePercentEncoding: a, normalizePathEncoding: o, escapePreservingEscapes: s, reescapeHostDelimiters: c, isIPv4: l, nonSimpleDomain: u } =
|
|
33204
|
+
})), TX = /* @__PURE__ */ G(((e, t) => {
|
|
33205
|
+
var { normalizeIPv6: n, removeDotSegments: r, recomposeAuthority: i, normalizePercentEncoding: a, normalizePathEncoding: o, escapePreservingEscapes: s, reescapeHostDelimiters: c, isIPv4: l, nonSimpleDomain: u } = CX(), { SCHEMES: d, getSchemeHandler: f } = wX();
|
|
33181
33206
|
function p(e, t) {
|
|
33182
33207
|
return typeof e == "string" ? e = S(e, t) : typeof e == "object" && (e = x(_(e, t), t)), e;
|
|
33183
33208
|
}
|
|
@@ -33291,20 +33316,20 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
33291
33316
|
parse: x
|
|
33292
33317
|
};
|
|
33293
33318
|
t.exports = T, t.exports.default = T, t.exports.fastUri = T;
|
|
33294
|
-
})),
|
|
33319
|
+
})), EX = /* @__PURE__ */ G(((e) => {
|
|
33295
33320
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
33296
|
-
var t =
|
|
33321
|
+
var t = TX();
|
|
33297
33322
|
t.code = "require(\"ajv/dist/runtime/uri\").default", e.default = t;
|
|
33298
|
-
})),
|
|
33323
|
+
})), DX = /* @__PURE__ */ G(((e) => {
|
|
33299
33324
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.CodeGen = e.Name = e.nil = e.stringify = e.str = e._ = e.KeywordCxt = void 0;
|
|
33300
|
-
var t =
|
|
33325
|
+
var t = dX();
|
|
33301
33326
|
Object.defineProperty(e, "KeywordCxt", {
|
|
33302
33327
|
enumerable: !0,
|
|
33303
33328
|
get: function() {
|
|
33304
33329
|
return t.KeywordCxt;
|
|
33305
33330
|
}
|
|
33306
33331
|
});
|
|
33307
|
-
var n =
|
|
33332
|
+
var n = XY();
|
|
33308
33333
|
Object.defineProperty(e, "_", {
|
|
33309
33334
|
enumerable: !0,
|
|
33310
33335
|
get: function() {
|
|
@@ -33336,7 +33361,7 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
33336
33361
|
return n.CodeGen;
|
|
33337
33362
|
}
|
|
33338
33363
|
});
|
|
33339
|
-
var r =
|
|
33364
|
+
var r = fX(), i = pX(), a = tX(), o = mX(), s = XY(), c = uX(), l = rX(), u = ZY(), d = (SX(), Ee(hX).default), f = EX(), p = (e, t) => new RegExp(e, t);
|
|
33340
33365
|
p.code = "new RegExp";
|
|
33341
33366
|
var m = [
|
|
33342
33367
|
"removeAdditional",
|
|
@@ -33722,16 +33747,16 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
33722
33747
|
function F(e) {
|
|
33723
33748
|
return { anyOf: [e, P] };
|
|
33724
33749
|
}
|
|
33725
|
-
})),
|
|
33750
|
+
})), OX = /* @__PURE__ */ G(((e) => {
|
|
33726
33751
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = {
|
|
33727
33752
|
keyword: "id",
|
|
33728
33753
|
code() {
|
|
33729
33754
|
throw Error("NOT SUPPORTED: keyword \"id\", use \"$id\" for schema ID");
|
|
33730
33755
|
}
|
|
33731
33756
|
};
|
|
33732
|
-
})),
|
|
33757
|
+
})), kX = /* @__PURE__ */ G(((e) => {
|
|
33733
33758
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.callRef = e.getValidate = void 0;
|
|
33734
|
-
var t =
|
|
33759
|
+
var t = pX(), n = aX(), r = XY(), i = QY(), a = mX(), o = ZY(), s = {
|
|
33735
33760
|
keyword: "$ref",
|
|
33736
33761
|
schemaType: "string",
|
|
33737
33762
|
code(e) {
|
|
@@ -33804,9 +33829,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
33804
33829
|
}
|
|
33805
33830
|
}
|
|
33806
33831
|
e.callRef = l, e.default = s;
|
|
33807
|
-
})),
|
|
33832
|
+
})), AX = /* @__PURE__ */ G(((e) => {
|
|
33808
33833
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
33809
|
-
var t =
|
|
33834
|
+
var t = OX(), n = kX();
|
|
33810
33835
|
e.default = [
|
|
33811
33836
|
"$schema",
|
|
33812
33837
|
"$id",
|
|
@@ -33817,9 +33842,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
33817
33842
|
t.default,
|
|
33818
33843
|
n.default
|
|
33819
33844
|
];
|
|
33820
|
-
})),
|
|
33845
|
+
})), jX = /* @__PURE__ */ G(((e) => {
|
|
33821
33846
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
33822
|
-
var t =
|
|
33847
|
+
var t = XY(), n = t.operators, r = {
|
|
33823
33848
|
maximum: {
|
|
33824
33849
|
okStr: "<=",
|
|
33825
33850
|
ok: n.LTE,
|
|
@@ -33855,9 +33880,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
33855
33880
|
e.fail$data((0, t._)`${i} ${r[n].fail} ${a} || isNaN(${i})`);
|
|
33856
33881
|
}
|
|
33857
33882
|
};
|
|
33858
|
-
})),
|
|
33883
|
+
})), MX = /* @__PURE__ */ G(((e) => {
|
|
33859
33884
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
33860
|
-
var t =
|
|
33885
|
+
var t = XY();
|
|
33861
33886
|
e.default = {
|
|
33862
33887
|
keyword: "multipleOf",
|
|
33863
33888
|
type: "number",
|
|
@@ -33872,7 +33897,7 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
33872
33897
|
e.fail$data((0, t._)`(${i} === 0 || (${s} = ${r}/${i}, ${c}))`);
|
|
33873
33898
|
}
|
|
33874
33899
|
};
|
|
33875
|
-
})),
|
|
33900
|
+
})), NX = /* @__PURE__ */ G(((e) => {
|
|
33876
33901
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
33877
33902
|
function t(e) {
|
|
33878
33903
|
let t = e.length, n = 0, r = 0, i;
|
|
@@ -33880,9 +33905,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
33880
33905
|
return n;
|
|
33881
33906
|
}
|
|
33882
33907
|
e.default = t, t.code = "require(\"ajv/dist/runtime/ucs2length\").default";
|
|
33883
|
-
})),
|
|
33908
|
+
})), PX = /* @__PURE__ */ G(((e) => {
|
|
33884
33909
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
33885
|
-
var t =
|
|
33910
|
+
var t = XY(), n = ZY(), r = NX();
|
|
33886
33911
|
e.default = {
|
|
33887
33912
|
keyword: ["maxLength", "minLength"],
|
|
33888
33913
|
type: "string",
|
|
@@ -33900,9 +33925,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
33900
33925
|
e.fail$data((0, t._)`${l} ${c} ${o}`);
|
|
33901
33926
|
}
|
|
33902
33927
|
};
|
|
33903
|
-
})),
|
|
33928
|
+
})), FX = /* @__PURE__ */ G(((e) => {
|
|
33904
33929
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
33905
|
-
var t =
|
|
33930
|
+
var t = aX(), n = ZY(), r = XY();
|
|
33906
33931
|
e.default = {
|
|
33907
33932
|
keyword: "pattern",
|
|
33908
33933
|
type: "string",
|
|
@@ -33923,9 +33948,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
33923
33948
|
}
|
|
33924
33949
|
}
|
|
33925
33950
|
};
|
|
33926
|
-
})),
|
|
33951
|
+
})), IX = /* @__PURE__ */ G(((e) => {
|
|
33927
33952
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
33928
|
-
var t =
|
|
33953
|
+
var t = XY();
|
|
33929
33954
|
e.default = {
|
|
33930
33955
|
keyword: ["maxProperties", "minProperties"],
|
|
33931
33956
|
type: "object",
|
|
@@ -33943,9 +33968,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
33943
33968
|
e.fail$data((0, t._)`Object.keys(${r}).length ${a} ${i}`);
|
|
33944
33969
|
}
|
|
33945
33970
|
};
|
|
33946
|
-
})),
|
|
33971
|
+
})), LX = /* @__PURE__ */ G(((e) => {
|
|
33947
33972
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
33948
|
-
var t =
|
|
33973
|
+
var t = aX(), n = XY(), r = ZY();
|
|
33949
33974
|
e.default = {
|
|
33950
33975
|
keyword: "required",
|
|
33951
33976
|
type: "object",
|
|
@@ -33991,9 +34016,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
33991
34016
|
}
|
|
33992
34017
|
}
|
|
33993
34018
|
};
|
|
33994
|
-
})),
|
|
34019
|
+
})), RX = /* @__PURE__ */ G(((e) => {
|
|
33995
34020
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
33996
|
-
var t =
|
|
34021
|
+
var t = XY();
|
|
33997
34022
|
e.default = {
|
|
33998
34023
|
keyword: ["maxItems", "minItems"],
|
|
33999
34024
|
type: "array",
|
|
@@ -34011,13 +34036,13 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34011
34036
|
e.fail$data((0, t._)`${r}.length ${a} ${i}`);
|
|
34012
34037
|
}
|
|
34013
34038
|
};
|
|
34014
|
-
})),
|
|
34039
|
+
})), zX = /* @__PURE__ */ G(((e) => {
|
|
34015
34040
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34016
|
-
var t =
|
|
34041
|
+
var t = cX();
|
|
34017
34042
|
t.code = "require(\"ajv/dist/runtime/equal\").default", e.default = t;
|
|
34018
|
-
})),
|
|
34043
|
+
})), BX = /* @__PURE__ */ G(((e) => {
|
|
34019
34044
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34020
|
-
var t =
|
|
34045
|
+
var t = rX(), n = XY(), r = ZY(), i = zX();
|
|
34021
34046
|
e.default = {
|
|
34022
34047
|
keyword: "uniqueItems",
|
|
34023
34048
|
type: "array",
|
|
@@ -34058,9 +34083,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34058
34083
|
}
|
|
34059
34084
|
}
|
|
34060
34085
|
};
|
|
34061
|
-
})),
|
|
34086
|
+
})), VX = /* @__PURE__ */ G(((e) => {
|
|
34062
34087
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34063
|
-
var t =
|
|
34088
|
+
var t = XY(), n = ZY(), r = zX();
|
|
34064
34089
|
e.default = {
|
|
34065
34090
|
keyword: "const",
|
|
34066
34091
|
$data: !0,
|
|
@@ -34073,9 +34098,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34073
34098
|
o || c && typeof c == "object" ? e.fail$data((0, t._)`!${(0, n.useFunc)(i, r.default)}(${a}, ${s})`) : e.fail((0, t._)`${c} !== ${a}`);
|
|
34074
34099
|
}
|
|
34075
34100
|
};
|
|
34076
|
-
})),
|
|
34101
|
+
})), HX = /* @__PURE__ */ G(((e) => {
|
|
34077
34102
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34078
|
-
var t =
|
|
34103
|
+
var t = XY(), n = ZY(), r = zX();
|
|
34079
34104
|
e.default = {
|
|
34080
34105
|
keyword: "enum",
|
|
34081
34106
|
schemaType: "array",
|
|
@@ -34105,9 +34130,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34105
34130
|
}
|
|
34106
34131
|
}
|
|
34107
34132
|
};
|
|
34108
|
-
})),
|
|
34133
|
+
})), UX = /* @__PURE__ */ G(((e) => {
|
|
34109
34134
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34110
|
-
var t =
|
|
34135
|
+
var t = jX(), n = MX(), r = PX(), i = FX(), a = IX(), o = LX(), s = RX(), c = BX(), l = VX(), u = HX();
|
|
34111
34136
|
e.default = [
|
|
34112
34137
|
t.default,
|
|
34113
34138
|
n.default,
|
|
@@ -34128,9 +34153,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34128
34153
|
l.default,
|
|
34129
34154
|
u.default
|
|
34130
34155
|
];
|
|
34131
|
-
})),
|
|
34156
|
+
})), WX = /* @__PURE__ */ G(((e) => {
|
|
34132
34157
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateAdditionalItems = void 0;
|
|
34133
|
-
var t =
|
|
34158
|
+
var t = XY(), n = ZY(), r = {
|
|
34134
34159
|
keyword: "additionalItems",
|
|
34135
34160
|
type: "array",
|
|
34136
34161
|
schemaType: ["boolean", "object"],
|
|
@@ -34168,9 +34193,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34168
34193
|
}
|
|
34169
34194
|
}
|
|
34170
34195
|
e.validateAdditionalItems = i, e.default = r;
|
|
34171
|
-
})),
|
|
34196
|
+
})), GX = /* @__PURE__ */ G(((e) => {
|
|
34172
34197
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateTuple = void 0;
|
|
34173
|
-
var t =
|
|
34198
|
+
var t = XY(), n = ZY(), r = aX(), i = {
|
|
34174
34199
|
keyword: "items",
|
|
34175
34200
|
type: "array",
|
|
34176
34201
|
schemaType: [
|
|
@@ -34205,9 +34230,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34205
34230
|
}
|
|
34206
34231
|
}
|
|
34207
34232
|
e.validateTuple = a, e.default = i;
|
|
34208
|
-
})),
|
|
34233
|
+
})), KX = /* @__PURE__ */ G(((e) => {
|
|
34209
34234
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34210
|
-
var t =
|
|
34235
|
+
var t = GX();
|
|
34211
34236
|
e.default = {
|
|
34212
34237
|
keyword: "prefixItems",
|
|
34213
34238
|
type: "array",
|
|
@@ -34215,9 +34240,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34215
34240
|
before: "uniqueItems",
|
|
34216
34241
|
code: (e) => (0, t.validateTuple)(e, "items")
|
|
34217
34242
|
};
|
|
34218
|
-
})),
|
|
34243
|
+
})), qX = /* @__PURE__ */ G(((e) => {
|
|
34219
34244
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34220
|
-
var t =
|
|
34245
|
+
var t = XY(), n = ZY(), r = aX(), i = WX();
|
|
34221
34246
|
e.default = {
|
|
34222
34247
|
keyword: "items",
|
|
34223
34248
|
type: "array",
|
|
@@ -34232,9 +34257,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34232
34257
|
o.items = !0, !(0, n.alwaysValidSchema)(o, t) && (s ? (0, i.validateAdditionalItems)(e, s) : e.ok((0, r.validateArray)(e)));
|
|
34233
34258
|
}
|
|
34234
34259
|
};
|
|
34235
|
-
})),
|
|
34260
|
+
})), JX = /* @__PURE__ */ G(((e) => {
|
|
34236
34261
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34237
|
-
var t =
|
|
34262
|
+
var t = XY(), n = ZY();
|
|
34238
34263
|
e.default = {
|
|
34239
34264
|
keyword: "contains",
|
|
34240
34265
|
type: "array",
|
|
@@ -34287,9 +34312,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34287
34312
|
}
|
|
34288
34313
|
}
|
|
34289
34314
|
};
|
|
34290
|
-
})),
|
|
34315
|
+
})), YX = /* @__PURE__ */ G(((e) => {
|
|
34291
34316
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateSchemaDeps = e.validatePropertyDeps = e.error = void 0;
|
|
34292
|
-
var t =
|
|
34317
|
+
var t = XY(), n = ZY(), r = aX();
|
|
34293
34318
|
e.error = {
|
|
34294
34319
|
message: ({ params: { property: e, depsCount: n, deps: r } }) => {
|
|
34295
34320
|
let i = n === 1 ? "property" : "properties";
|
|
@@ -34348,9 +34373,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34348
34373
|
}, () => i.var(c, !0)), e.ok(c));
|
|
34349
34374
|
}
|
|
34350
34375
|
e.validateSchemaDeps = s, e.default = i;
|
|
34351
|
-
})),
|
|
34376
|
+
})), XX = /* @__PURE__ */ G(((e) => {
|
|
34352
34377
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34353
|
-
var t =
|
|
34378
|
+
var t = XY(), n = ZY();
|
|
34354
34379
|
e.default = {
|
|
34355
34380
|
keyword: "propertyNames",
|
|
34356
34381
|
type: "object",
|
|
@@ -34376,9 +34401,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34376
34401
|
}), e.ok(s);
|
|
34377
34402
|
}
|
|
34378
34403
|
};
|
|
34379
|
-
})),
|
|
34404
|
+
})), ZX = /* @__PURE__ */ G(((e) => {
|
|
34380
34405
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34381
|
-
var t =
|
|
34406
|
+
var t = aX(), n = XY(), r = QY(), i = ZY();
|
|
34382
34407
|
e.default = {
|
|
34383
34408
|
keyword: "additionalProperties",
|
|
34384
34409
|
type: ["object"],
|
|
@@ -34443,9 +34468,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34443
34468
|
}
|
|
34444
34469
|
}
|
|
34445
34470
|
};
|
|
34446
|
-
})),
|
|
34471
|
+
})), QX = /* @__PURE__ */ G(((e) => {
|
|
34447
34472
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34448
|
-
var t =
|
|
34473
|
+
var t = dX(), n = aX(), r = ZY(), i = ZX();
|
|
34449
34474
|
e.default = {
|
|
34450
34475
|
keyword: "properties",
|
|
34451
34476
|
type: "object",
|
|
@@ -34472,9 +34497,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34472
34497
|
}
|
|
34473
34498
|
}
|
|
34474
34499
|
};
|
|
34475
|
-
})),
|
|
34500
|
+
})), $X = /* @__PURE__ */ G(((e) => {
|
|
34476
34501
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34477
|
-
var t =
|
|
34502
|
+
var t = aX(), n = XY(), r = ZY(), i = ZY();
|
|
34478
34503
|
e.default = {
|
|
34479
34504
|
keyword: "patternProperties",
|
|
34480
34505
|
type: "object",
|
|
@@ -34507,9 +34532,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34507
34532
|
}
|
|
34508
34533
|
}
|
|
34509
34534
|
};
|
|
34510
|
-
})),
|
|
34535
|
+
})), eZ = /* @__PURE__ */ G(((e) => {
|
|
34511
34536
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34512
|
-
var t =
|
|
34537
|
+
var t = ZY();
|
|
34513
34538
|
e.default = {
|
|
34514
34539
|
keyword: "not",
|
|
34515
34540
|
schemaType: ["object", "boolean"],
|
|
@@ -34530,17 +34555,17 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34530
34555
|
},
|
|
34531
34556
|
error: { message: "must NOT be valid" }
|
|
34532
34557
|
};
|
|
34533
|
-
})),
|
|
34558
|
+
})), tZ = /* @__PURE__ */ G(((e) => {
|
|
34534
34559
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = {
|
|
34535
34560
|
keyword: "anyOf",
|
|
34536
34561
|
schemaType: "array",
|
|
34537
34562
|
trackErrors: !0,
|
|
34538
|
-
code:
|
|
34563
|
+
code: aX().validateUnion,
|
|
34539
34564
|
error: { message: "must match a schema in anyOf" }
|
|
34540
34565
|
};
|
|
34541
|
-
})),
|
|
34566
|
+
})), nZ = /* @__PURE__ */ G(((e) => {
|
|
34542
34567
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34543
|
-
var t =
|
|
34568
|
+
var t = XY(), n = ZY();
|
|
34544
34569
|
e.default = {
|
|
34545
34570
|
keyword: "oneOf",
|
|
34546
34571
|
schemaType: "array",
|
|
@@ -34570,9 +34595,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34570
34595
|
}
|
|
34571
34596
|
}
|
|
34572
34597
|
};
|
|
34573
|
-
})),
|
|
34598
|
+
})), rZ = /* @__PURE__ */ G(((e) => {
|
|
34574
34599
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34575
|
-
var t =
|
|
34600
|
+
var t = ZY();
|
|
34576
34601
|
e.default = {
|
|
34577
34602
|
keyword: "allOf",
|
|
34578
34603
|
schemaType: "array",
|
|
@@ -34591,9 +34616,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34591
34616
|
});
|
|
34592
34617
|
}
|
|
34593
34618
|
};
|
|
34594
|
-
})),
|
|
34619
|
+
})), iZ = /* @__PURE__ */ G(((e) => {
|
|
34595
34620
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34596
|
-
var t =
|
|
34621
|
+
var t = XY(), n = ZY(), r = {
|
|
34597
34622
|
keyword: "if",
|
|
34598
34623
|
schemaType: ["object", "boolean"],
|
|
34599
34624
|
trackErrors: !0,
|
|
@@ -34634,9 +34659,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34634
34659
|
return r !== void 0 && !(0, n.alwaysValidSchema)(e, r);
|
|
34635
34660
|
}
|
|
34636
34661
|
e.default = r;
|
|
34637
|
-
})),
|
|
34662
|
+
})), aZ = /* @__PURE__ */ G(((e) => {
|
|
34638
34663
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34639
|
-
var t =
|
|
34664
|
+
var t = ZY();
|
|
34640
34665
|
e.default = {
|
|
34641
34666
|
keyword: ["then", "else"],
|
|
34642
34667
|
schemaType: ["object", "boolean"],
|
|
@@ -34644,9 +34669,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34644
34669
|
n.if === void 0 && (0, t.checkStrictMode)(r, `"${e}" without "if" is ignored`);
|
|
34645
34670
|
}
|
|
34646
34671
|
};
|
|
34647
|
-
})),
|
|
34672
|
+
})), oZ = /* @__PURE__ */ G(((e) => {
|
|
34648
34673
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34649
|
-
var t =
|
|
34674
|
+
var t = WX(), n = KX(), r = GX(), i = qX(), a = JX(), o = YX(), s = XX(), c = ZX(), l = QX(), u = $X(), d = eZ(), f = tZ(), p = nZ(), m = rZ(), h = iZ(), g = aZ();
|
|
34650
34675
|
function _(e = !1) {
|
|
34651
34676
|
let _ = [
|
|
34652
34677
|
d.default,
|
|
@@ -34664,9 +34689,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34664
34689
|
return e ? _.push(n.default, i.default) : _.push(t.default, r.default), _.push(a.default), _;
|
|
34665
34690
|
}
|
|
34666
34691
|
e.default = _;
|
|
34667
|
-
})),
|
|
34692
|
+
})), sZ = /* @__PURE__ */ G(((e) => {
|
|
34668
34693
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34669
|
-
var t =
|
|
34694
|
+
var t = XY();
|
|
34670
34695
|
e.default = {
|
|
34671
34696
|
keyword: "format",
|
|
34672
34697
|
type: ["number", "string"],
|
|
@@ -34739,9 +34764,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34739
34764
|
}
|
|
34740
34765
|
}
|
|
34741
34766
|
};
|
|
34742
|
-
})),
|
|
34743
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = [
|
|
34744
|
-
})),
|
|
34767
|
+
})), cZ = /* @__PURE__ */ G(((e) => {
|
|
34768
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = [sZ().default];
|
|
34769
|
+
})), lZ = /* @__PURE__ */ G(((e) => {
|
|
34745
34770
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.contentVocabulary = e.metadataVocabulary = void 0, e.metadataVocabulary = [
|
|
34746
34771
|
"title",
|
|
34747
34772
|
"description",
|
|
@@ -34755,9 +34780,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34755
34780
|
"contentEncoding",
|
|
34756
34781
|
"contentSchema"
|
|
34757
34782
|
];
|
|
34758
|
-
})),
|
|
34783
|
+
})), uZ = /* @__PURE__ */ G(((e) => {
|
|
34759
34784
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34760
|
-
var t =
|
|
34785
|
+
var t = AX(), n = UX(), r = oZ(), i = cZ(), a = lZ();
|
|
34761
34786
|
e.default = [
|
|
34762
34787
|
t.default,
|
|
34763
34788
|
n.default,
|
|
@@ -34766,15 +34791,15 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34766
34791
|
a.metadataVocabulary,
|
|
34767
34792
|
a.contentVocabulary
|
|
34768
34793
|
];
|
|
34769
|
-
})),
|
|
34794
|
+
})), dZ = /* @__PURE__ */ G(((e) => {
|
|
34770
34795
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.DiscrError = void 0;
|
|
34771
34796
|
var t;
|
|
34772
34797
|
(function(e) {
|
|
34773
34798
|
e.Tag = "tag", e.Mapping = "mapping";
|
|
34774
34799
|
})(t || (e.DiscrError = t = {}));
|
|
34775
|
-
})),
|
|
34800
|
+
})), fZ = /* @__PURE__ */ G(((e) => {
|
|
34776
34801
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34777
|
-
var t =
|
|
34802
|
+
var t = XY(), n = dZ(), r = mX(), i = pX(), a = ZY();
|
|
34778
34803
|
e.default = {
|
|
34779
34804
|
keyword: "discriminator",
|
|
34780
34805
|
type: "object",
|
|
@@ -34842,16 +34867,16 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34842
34867
|
}
|
|
34843
34868
|
}
|
|
34844
34869
|
};
|
|
34845
|
-
})),
|
|
34846
|
-
$id: () =>
|
|
34847
|
-
$schema: () =>
|
|
34848
|
-
default: () =>
|
|
34849
|
-
definitions: () =>
|
|
34850
|
-
properties: () =>
|
|
34851
|
-
title: () =>
|
|
34852
|
-
type: () =>
|
|
34853
|
-
}),
|
|
34854
|
-
|
|
34870
|
+
})), pZ = /* @__PURE__ */ Ce({
|
|
34871
|
+
$id: () => hZ,
|
|
34872
|
+
$schema: () => mZ,
|
|
34873
|
+
default: () => bZ,
|
|
34874
|
+
definitions: () => _Z,
|
|
34875
|
+
properties: () => yZ,
|
|
34876
|
+
title: () => gZ,
|
|
34877
|
+
type: () => vZ
|
|
34878
|
+
}), mZ, hZ, gZ, _Z, vZ, yZ, bZ, xZ = Se((() => {
|
|
34879
|
+
mZ = "http://json-schema.org/draft-07/schema#", hZ = "http://json-schema.org/draft-07/schema#", gZ = "Core schema meta-schema", _Z = {
|
|
34855
34880
|
schemaArray: {
|
|
34856
34881
|
type: "array",
|
|
34857
34882
|
minItems: 1,
|
|
@@ -34877,7 +34902,7 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34877
34902
|
uniqueItems: !0,
|
|
34878
34903
|
default: []
|
|
34879
34904
|
}
|
|
34880
|
-
},
|
|
34905
|
+
}, vZ = ["object", "boolean"], yZ = {
|
|
34881
34906
|
$id: {
|
|
34882
34907
|
type: "string",
|
|
34883
34908
|
format: "uri-reference"
|
|
@@ -34976,18 +35001,18 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
34976
35001
|
anyOf: { $ref: "#/definitions/schemaArray" },
|
|
34977
35002
|
oneOf: { $ref: "#/definitions/schemaArray" },
|
|
34978
35003
|
not: { $ref: "#" }
|
|
34979
|
-
},
|
|
34980
|
-
$schema:
|
|
34981
|
-
$id:
|
|
34982
|
-
title:
|
|
34983
|
-
definitions:
|
|
34984
|
-
type:
|
|
34985
|
-
properties:
|
|
35004
|
+
}, bZ = {
|
|
35005
|
+
$schema: mZ,
|
|
35006
|
+
$id: hZ,
|
|
35007
|
+
title: gZ,
|
|
35008
|
+
definitions: _Z,
|
|
35009
|
+
type: vZ,
|
|
35010
|
+
properties: yZ,
|
|
34986
35011
|
default: !0
|
|
34987
35012
|
};
|
|
34988
|
-
})),
|
|
35013
|
+
})), SZ = /* @__PURE__ */ G(((e, t) => {
|
|
34989
35014
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.MissingRefError = e.ValidationError = e.CodeGen = e.Name = e.nil = e.stringify = e.str = e._ = e.KeywordCxt = e.Ajv = void 0;
|
|
34990
|
-
var n =
|
|
35015
|
+
var n = DX(), r = uZ(), i = fZ(), a = (xZ(), Ee(pZ).default), o = ["/properties"], s = "http://json-schema.org/draft-07/schema", c = class extends n.default {
|
|
34991
35016
|
_addVocabularies() {
|
|
34992
35017
|
super._addVocabularies(), r.default.forEach((e) => this.addVocabulary(e)), this.opts.discriminator && this.addKeyword(i.default);
|
|
34993
35018
|
}
|
|
@@ -35001,14 +35026,14 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
35001
35026
|
}
|
|
35002
35027
|
};
|
|
35003
35028
|
e.Ajv = c, t.exports = e = c, t.exports.Ajv = c, Object.defineProperty(e, "__esModule", { value: !0 }), e.default = c;
|
|
35004
|
-
var l =
|
|
35029
|
+
var l = dX();
|
|
35005
35030
|
Object.defineProperty(e, "KeywordCxt", {
|
|
35006
35031
|
enumerable: !0,
|
|
35007
35032
|
get: function() {
|
|
35008
35033
|
return l.KeywordCxt;
|
|
35009
35034
|
}
|
|
35010
35035
|
});
|
|
35011
|
-
var u =
|
|
35036
|
+
var u = XY();
|
|
35012
35037
|
Object.defineProperty(e, "_", {
|
|
35013
35038
|
enumerable: !0,
|
|
35014
35039
|
get: function() {
|
|
@@ -35040,21 +35065,21 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
35040
35065
|
return u.CodeGen;
|
|
35041
35066
|
}
|
|
35042
35067
|
});
|
|
35043
|
-
var d =
|
|
35068
|
+
var d = fX();
|
|
35044
35069
|
Object.defineProperty(e, "ValidationError", {
|
|
35045
35070
|
enumerable: !0,
|
|
35046
35071
|
get: function() {
|
|
35047
35072
|
return d.default;
|
|
35048
35073
|
}
|
|
35049
35074
|
});
|
|
35050
|
-
var f =
|
|
35075
|
+
var f = pX();
|
|
35051
35076
|
Object.defineProperty(e, "MissingRefError", {
|
|
35052
35077
|
enumerable: !0,
|
|
35053
35078
|
get: function() {
|
|
35054
35079
|
return f.default;
|
|
35055
35080
|
}
|
|
35056
35081
|
});
|
|
35057
|
-
})),
|
|
35082
|
+
})), CZ = /* @__PURE__ */ G(((e) => {
|
|
35058
35083
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.formatNames = e.fastFormats = e.fullFormats = void 0;
|
|
35059
35084
|
function t(e, t) {
|
|
35060
35085
|
return {
|
|
@@ -35206,9 +35231,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
35206
35231
|
return !1;
|
|
35207
35232
|
}
|
|
35208
35233
|
}
|
|
35209
|
-
})),
|
|
35234
|
+
})), wZ = /* @__PURE__ */ G(((e) => {
|
|
35210
35235
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.formatLimitDefinition = void 0;
|
|
35211
|
-
var t =
|
|
35236
|
+
var t = SZ(), n = XY(), r = n.operators, i = {
|
|
35212
35237
|
formatMaximum: {
|
|
35213
35238
|
okStr: "<=",
|
|
35214
35239
|
ok: r.LTE,
|
|
@@ -35268,9 +35293,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
35268
35293
|
},
|
|
35269
35294
|
dependencies: ["format"]
|
|
35270
35295
|
}, e.default = (t) => (t.addKeyword(e.formatLimitDefinition), t);
|
|
35271
|
-
})),
|
|
35296
|
+
})), TZ = /* @__PURE__ */ G(((e, t) => {
|
|
35272
35297
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
35273
|
-
var n =
|
|
35298
|
+
var n = CZ(), r = wZ(), i = XY(), a = new i.Name("fullFormats"), o = new i.Name("fastFormats"), s = (e, t = { keywords: !0 }) => {
|
|
35274
35299
|
if (Array.isArray(t)) return c(e, t, n.fullFormats, a), e;
|
|
35275
35300
|
let [i, s] = t.mode === "fast" ? [n.fastFormats, o] : [n.fullFormats, a];
|
|
35276
35301
|
return c(e, t.formats || n.formatNames, i, s), t.keywords && (0, r.default)(e), e;
|
|
@@ -35286,9 +35311,9 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
35286
35311
|
for (let r of t) e.addFormat(r, n[r]);
|
|
35287
35312
|
}
|
|
35288
35313
|
t.exports = e = s, Object.defineProperty(e, "__esModule", { value: !0 }), e.default = s;
|
|
35289
|
-
})),
|
|
35314
|
+
})), EZ = /* @__PURE__ */ Te(SZ(), 1), DZ = /* @__PURE__ */ Te(TZ(), 1), OZ = {
|
|
35290
35315
|
required: () => "This field is required",
|
|
35291
|
-
type: (e) => `Should be "${
|
|
35316
|
+
type: (e) => `Should be "${AZ(e)}".`,
|
|
35292
35317
|
minLength: (e) => e.params.limit === 1 ? "This field must not be empty" : `Should NOT be shorter than ${e.params.limit} characters`,
|
|
35293
35318
|
maxLength: (e) => `Should NOT be longer than ${e.params.limit} characters`,
|
|
35294
35319
|
minimum: (e) => `Should be >= ${e.params.limit}`,
|
|
@@ -35300,89 +35325,81 @@ var KY = /* @__PURE__ */ G(((e) => {
|
|
|
35300
35325
|
maxItems: (e) => `Should NOT have more than ${e.params.limit} items`,
|
|
35301
35326
|
uniqueItems: () => "Should NOT have duplicate items",
|
|
35302
35327
|
const: (e) => `Should be equal to constant "${e.params.allowedValue}"`,
|
|
35303
|
-
pattern: (e, t) => `${
|
|
35328
|
+
pattern: (e, t) => `${WJ(t)} value does not respect the pattern: ${e.params.pattern}`,
|
|
35304
35329
|
format: (e) => `Should be a valid ${e.params.format}`,
|
|
35305
35330
|
uniqueItemProperties: (e) => `${e.params.propertyName ?? "This field"} must be unique`
|
|
35306
35331
|
};
|
|
35307
|
-
function
|
|
35308
|
-
let n =
|
|
35332
|
+
function kZ(e, t) {
|
|
35333
|
+
let n = OZ[e.keyword];
|
|
35309
35334
|
return n ? n(e, t) : e.message ?? "Invalid value";
|
|
35310
35335
|
}
|
|
35311
|
-
function
|
|
35336
|
+
function AZ(e) {
|
|
35312
35337
|
let t = e.params.type;
|
|
35313
35338
|
return String(Array.isArray(t) ? t[0] : t);
|
|
35314
35339
|
}
|
|
35315
35340
|
//#endregion
|
|
35316
35341
|
//#region src/composed/JsonSchemaForm/form-bindings/resolveAt.ts
|
|
35317
|
-
function
|
|
35342
|
+
function jZ(e, t, n) {
|
|
35318
35343
|
let r = t === "" ? [] : t.split("."), i = e.root, a = n, o = [];
|
|
35319
35344
|
for (let e of r) {
|
|
35320
35345
|
if (!i) return {
|
|
35321
35346
|
node: void 0,
|
|
35322
35347
|
value: void 0
|
|
35323
35348
|
};
|
|
35324
|
-
i =
|
|
35349
|
+
i = MZ(i, a, n, o), /^\d+$/.test(e) ? (i = i.items, a = Array.isArray(a) ? a[Number(e)] : void 0) : (i = i.properties?.get(e), a = a && typeof a == "object" ? a[e] : void 0), o.push(e);
|
|
35325
35350
|
}
|
|
35326
35351
|
return i ? {
|
|
35327
|
-
node:
|
|
35352
|
+
node: NZ(MZ(i, a, n, r), r),
|
|
35328
35353
|
value: a
|
|
35329
35354
|
} : {
|
|
35330
35355
|
node: void 0,
|
|
35331
35356
|
value: a
|
|
35332
35357
|
};
|
|
35333
35358
|
}
|
|
35334
|
-
function
|
|
35335
|
-
let i = new Map(e.properties), a = e.variants ?
|
|
35359
|
+
function MZ(e, t, n, r) {
|
|
35360
|
+
let i = new Map(e.properties), a = e.variants ? FZ(e.variants, t) : void 0;
|
|
35336
35361
|
if (a) for (let [e, t] of a.properties) i.set(e, t);
|
|
35337
35362
|
let o = [...e.dependencyBranches ?? [], ...a?.dependencyBranches ?? []];
|
|
35338
35363
|
if (o.length > 0) {
|
|
35339
|
-
for (let e of o) if (
|
|
35364
|
+
for (let e of o) if (PZ(e.showIf.$eq, n, r)) for (let [t, n] of e.properties) i.set(t, n);
|
|
35340
35365
|
}
|
|
35341
35366
|
return i.size > (e.properties?.size ?? 0) ? {
|
|
35342
35367
|
...e,
|
|
35343
35368
|
properties: i
|
|
35344
35369
|
} : e;
|
|
35345
35370
|
}
|
|
35346
|
-
function
|
|
35371
|
+
function NZ(e, t) {
|
|
35347
35372
|
return e.displayIf ? {
|
|
35348
35373
|
...e,
|
|
35349
|
-
displayIf:
|
|
35374
|
+
displayIf: OJ(e.displayIf, t.join("."))
|
|
35350
35375
|
} : e;
|
|
35351
35376
|
}
|
|
35352
|
-
function
|
|
35377
|
+
function PZ(e, t, n) {
|
|
35353
35378
|
for (let [r, i] of e) {
|
|
35354
|
-
let e =
|
|
35379
|
+
let e = SJ(t, DJ(r, n));
|
|
35355
35380
|
if (!(Array.isArray(i) ? i : [i]).includes(e)) return !1;
|
|
35356
35381
|
}
|
|
35357
35382
|
return !0;
|
|
35358
35383
|
}
|
|
35359
|
-
function
|
|
35360
|
-
let n = e;
|
|
35361
|
-
for (let e of t) {
|
|
35362
|
-
if (typeof n != "object" || !n) return;
|
|
35363
|
-
n = n[e];
|
|
35364
|
-
}
|
|
35365
|
-
return n;
|
|
35366
|
-
}
|
|
35367
|
-
function PZ(e, t) {
|
|
35384
|
+
function FZ(e, t) {
|
|
35368
35385
|
if (typeof t != "object" || !t) return;
|
|
35369
35386
|
let n = t;
|
|
35370
35387
|
return e.find((e) => e.consts.length > 0 && e.consts.every((e) => Object.is(n[e.key], e.value)));
|
|
35371
35388
|
}
|
|
35372
35389
|
//#endregion
|
|
35373
35390
|
//#region src/composed/JsonSchemaForm/form-bindings/jsonSchemaResolver.ts
|
|
35374
|
-
var
|
|
35391
|
+
var IZ = new EZ.default({
|
|
35375
35392
|
strict: !1,
|
|
35376
35393
|
allErrors: !0
|
|
35377
35394
|
});
|
|
35378
|
-
(0,
|
|
35395
|
+
(0, DZ.default)(IZ), IZ.removeKeyword("id"), IZ.addKeyword({
|
|
35379
35396
|
keyword: "id",
|
|
35380
35397
|
validate: () => !0
|
|
35381
35398
|
});
|
|
35382
|
-
function
|
|
35399
|
+
function LZ(e, t = {}) {
|
|
35383
35400
|
let n;
|
|
35384
35401
|
try {
|
|
35385
|
-
n =
|
|
35402
|
+
n = FY(e);
|
|
35386
35403
|
} catch (e) {
|
|
35387
35404
|
let t = e instanceof Error ? e.message : "Invalid JSON Schema";
|
|
35388
35405
|
return () => ({
|
|
@@ -35395,7 +35412,7 @@ function IZ(e, t = {}) {
|
|
|
35395
35412
|
}
|
|
35396
35413
|
let r = n.root.schema, i = n.variantIndices, a;
|
|
35397
35414
|
try {
|
|
35398
|
-
a =
|
|
35415
|
+
a = IZ.compile(r);
|
|
35399
35416
|
} catch (e) {
|
|
35400
35417
|
let t = e instanceof Error ? e.message : "Invalid JSON Schema";
|
|
35401
35418
|
return () => ({
|
|
@@ -35406,15 +35423,15 @@ function IZ(e, t = {}) {
|
|
|
35406
35423
|
} }
|
|
35407
35424
|
});
|
|
35408
35425
|
}
|
|
35409
|
-
|
|
35426
|
+
IZ.removeSchema(r);
|
|
35410
35427
|
let o = async (e, t, r) => {
|
|
35411
|
-
let o = a(e) ? [] : a.errors ?? [], s =
|
|
35428
|
+
let o = a(e) ? [] : a.errors ?? [], s = WZ(n.root, e, "", i), c = [...o, ...s];
|
|
35412
35429
|
return c.length === 0 ? {
|
|
35413
35430
|
values: e,
|
|
35414
35431
|
errors: {}
|
|
35415
35432
|
} : {
|
|
35416
35433
|
values: {},
|
|
35417
|
-
errors: BZ(
|
|
35434
|
+
errors: VZ(BZ(c.filter((t) => !RZ(t, n, e))), r.criteriaMode ?? "firstError")
|
|
35418
35435
|
};
|
|
35419
35436
|
};
|
|
35420
35437
|
if (!t.basePath) return o;
|
|
@@ -35430,12 +35447,12 @@ function IZ(e, t = {}) {
|
|
|
35430
35447
|
};
|
|
35431
35448
|
};
|
|
35432
35449
|
}
|
|
35433
|
-
function
|
|
35434
|
-
let { node: r, value: i } =
|
|
35450
|
+
function RZ(e, t, n) {
|
|
35451
|
+
let { node: r, value: i } = jZ(t, (e.instancePath ? e.instancePath.slice(1).split("/").map(IJ) : []).join("."), n);
|
|
35435
35452
|
if (!r) return !1;
|
|
35436
35453
|
switch (e.keyword) {
|
|
35437
35454
|
case "const":
|
|
35438
|
-
case "enum": return
|
|
35455
|
+
case "enum": return zZ(r.schema, i);
|
|
35439
35456
|
case "required": {
|
|
35440
35457
|
let t = e.params.missingProperty;
|
|
35441
35458
|
return typeof t == "string" && !!r.properties && !r.properties.has(t);
|
|
@@ -35443,46 +35460,46 @@ function LZ(e, t, n) {
|
|
|
35443
35460
|
default: return !1;
|
|
35444
35461
|
}
|
|
35445
35462
|
}
|
|
35446
|
-
function
|
|
35463
|
+
function zZ(e, t) {
|
|
35447
35464
|
return e.const === void 0 ? Array.isArray(e.enum) ? e.enum.includes(t) : !1 : Object.is(e.const, t);
|
|
35448
35465
|
}
|
|
35449
|
-
function
|
|
35466
|
+
function BZ(e) {
|
|
35450
35467
|
return e.filter((t) => {
|
|
35451
35468
|
if (t.keyword !== "oneOf" && t.keyword !== "anyOf") return !0;
|
|
35452
|
-
let n =
|
|
35469
|
+
let n = HZ(t), r = n === "" ? "" : `${n}.`;
|
|
35453
35470
|
return !e.some((e) => {
|
|
35454
35471
|
if (e === t) return !1;
|
|
35455
|
-
let i =
|
|
35472
|
+
let i = HZ(e);
|
|
35456
35473
|
return n === "" ? i !== "" : i.startsWith(r);
|
|
35457
35474
|
});
|
|
35458
35475
|
});
|
|
35459
35476
|
}
|
|
35460
|
-
function
|
|
35477
|
+
function VZ(e, t) {
|
|
35461
35478
|
let n = /* @__PURE__ */ new Map();
|
|
35462
35479
|
for (let t of e) {
|
|
35463
|
-
let e =
|
|
35480
|
+
let e = HZ(t), r = n.get(e) ?? [];
|
|
35464
35481
|
r.push(t), n.set(e, r);
|
|
35465
35482
|
}
|
|
35466
35483
|
let r = {};
|
|
35467
35484
|
for (let [e, i] of n) {
|
|
35468
35485
|
let n = {
|
|
35469
35486
|
type: i[0].keyword,
|
|
35470
|
-
message:
|
|
35487
|
+
message: kZ(i[0], e)
|
|
35471
35488
|
};
|
|
35472
35489
|
if (t === "all" && i.length > 0) {
|
|
35473
35490
|
let t = {};
|
|
35474
|
-
for (let n of i) t[n.keyword] =
|
|
35491
|
+
for (let n of i) t[n.keyword] = kZ(n, e);
|
|
35475
35492
|
n.types = t;
|
|
35476
35493
|
}
|
|
35477
|
-
|
|
35494
|
+
UZ(r, e === "" ? "root" : e, n);
|
|
35478
35495
|
}
|
|
35479
35496
|
return r;
|
|
35480
35497
|
}
|
|
35481
|
-
function
|
|
35482
|
-
let t = e.instancePath ? e.instancePath.slice(1).split("/").map(
|
|
35498
|
+
function HZ(e) {
|
|
35499
|
+
let t = e.instancePath ? e.instancePath.slice(1).split("/").map(IJ) : [];
|
|
35483
35500
|
return e.keyword === "required" && typeof e.params.missingProperty == "string" && t.push(e.params.missingProperty), t.join(".");
|
|
35484
35501
|
}
|
|
35485
|
-
function
|
|
35502
|
+
function UZ(e, t, n) {
|
|
35486
35503
|
let r = t.split("."), i = e;
|
|
35487
35504
|
for (let e = 0; e < r.length - 1; e++) {
|
|
35488
35505
|
let t = r[e];
|
|
@@ -35490,7 +35507,7 @@ function HZ(e, t, n) {
|
|
|
35490
35507
|
}
|
|
35491
35508
|
i[r[r.length - 1]] = n;
|
|
35492
35509
|
}
|
|
35493
|
-
function
|
|
35510
|
+
function WZ(e, t, n, r) {
|
|
35494
35511
|
if (!e) return [];
|
|
35495
35512
|
let i = [];
|
|
35496
35513
|
if (e.schema.gioConfig?.uniqueItemProperties && Array.isArray(t)) for (let r of e.schema.gioConfig.uniqueItemProperties) {
|
|
@@ -35507,18 +35524,18 @@ function UZ(e, t, n, r) {
|
|
|
35507
35524
|
}
|
|
35508
35525
|
}
|
|
35509
35526
|
let a = typeof t == "object" && !!t && !Array.isArray(t);
|
|
35510
|
-
if (e.properties && a) for (let [a, o] of e.properties) i.push(...
|
|
35527
|
+
if (e.properties && a) for (let [a, o] of e.properties) i.push(...WZ(o, t[a], `${n}/${FJ(a)}`, r));
|
|
35511
35528
|
if (e.variants && e.variants.length > 0 && a) {
|
|
35512
|
-
let a = t, o =
|
|
35513
|
-
if (s) for (let [e, t] of s.properties) i.push(...
|
|
35529
|
+
let a = t, o = _Y(e.variants.map((e) => e.raw), e.rhfPath, r, (e) => a[e]), s = e.variants[o];
|
|
35530
|
+
if (s) for (let [e, t] of s.properties) i.push(...WZ(t, a[e], `${n}/${FJ(e)}`, r));
|
|
35514
35531
|
}
|
|
35515
35532
|
return e.items && Array.isArray(t) && t.forEach((t, a) => {
|
|
35516
|
-
i.push(...
|
|
35533
|
+
i.push(...WZ(e.items, t, `${n}/${a}`, r));
|
|
35517
35534
|
}), i;
|
|
35518
35535
|
}
|
|
35519
35536
|
//#endregion
|
|
35520
35537
|
//#region src/composed/LayoutSlots/LayoutSlotsContext.tsx
|
|
35521
|
-
var
|
|
35538
|
+
var GZ = {
|
|
35522
35539
|
navigation: null,
|
|
35523
35540
|
contextSidebar: null,
|
|
35524
35541
|
breadcrumbs: [],
|
|
@@ -35526,9 +35543,9 @@ var WZ = {
|
|
|
35526
35543
|
viewMode: "global",
|
|
35527
35544
|
contextExpanded: !0,
|
|
35528
35545
|
contentVariant: "default"
|
|
35529
|
-
},
|
|
35530
|
-
function
|
|
35531
|
-
let [t, n] = oe(
|
|
35546
|
+
}, KZ = F(null);
|
|
35547
|
+
function qZ({ children: e }) {
|
|
35548
|
+
let [t, n] = oe(GZ), r = R((e, t) => {
|
|
35532
35549
|
n((n) => ({
|
|
35533
35550
|
...n,
|
|
35534
35551
|
[e]: t
|
|
@@ -35540,7 +35557,7 @@ function KZ({ children: e }) {
|
|
|
35540
35557
|
}));
|
|
35541
35558
|
}, []), a = R((e) => {
|
|
35542
35559
|
n((t) => {
|
|
35543
|
-
let n = Object.fromEntries(e.map((e) => [e,
|
|
35560
|
+
let n = Object.fromEntries(e.map((e) => [e, GZ[e]]));
|
|
35544
35561
|
return {
|
|
35545
35562
|
...t,
|
|
35546
35563
|
...n
|
|
@@ -35557,20 +35574,20 @@ function KZ({ children: e }) {
|
|
|
35557
35574
|
i,
|
|
35558
35575
|
a
|
|
35559
35576
|
]);
|
|
35560
|
-
return /* @__PURE__ */ U(
|
|
35577
|
+
return /* @__PURE__ */ U(KZ.Provider, {
|
|
35561
35578
|
value: o,
|
|
35562
35579
|
children: e
|
|
35563
35580
|
});
|
|
35564
35581
|
}
|
|
35565
|
-
function
|
|
35566
|
-
let e = ee(
|
|
35582
|
+
function JZ() {
|
|
35583
|
+
let e = ee(KZ);
|
|
35567
35584
|
if (!e) throw Error("useLayoutSlots must be used within a LayoutSlotsProvider.");
|
|
35568
35585
|
return e;
|
|
35569
35586
|
}
|
|
35570
35587
|
//#endregion
|
|
35571
35588
|
//#region src/composed/LayoutSlots/use-layout-config.ts
|
|
35572
|
-
function
|
|
35573
|
-
let { setSlots: n, resetSlots: r } =
|
|
35589
|
+
function YZ(e, t = []) {
|
|
35590
|
+
let { setSlots: n, resetSlots: r } = JZ();
|
|
35574
35591
|
z(() => {
|
|
35575
35592
|
n(e);
|
|
35576
35593
|
let t = Object.keys(e);
|
|
@@ -35585,7 +35602,7 @@ function JZ(e, t = []) {
|
|
|
35585
35602
|
}
|
|
35586
35603
|
//#endregion
|
|
35587
35604
|
//#region src/composed/TopNavUser/TopNavUser.tsx
|
|
35588
|
-
var
|
|
35605
|
+
var XZ = [
|
|
35589
35606
|
{
|
|
35590
35607
|
value: "light",
|
|
35591
35608
|
label: "Light"
|
|
@@ -35599,7 +35616,7 @@ var YZ = [
|
|
|
35599
35616
|
label: "System"
|
|
35600
35617
|
}
|
|
35601
35618
|
];
|
|
35602
|
-
function
|
|
35619
|
+
function ZZ({ name: t, email: n, avatarUrl: r, initials: i, className: a, onSignOut: o }) {
|
|
35603
35620
|
let s = i ?? t.slice(0, 2).toUpperCase(), { mode: c, setMode: l } = A();
|
|
35604
35621
|
return /* @__PURE__ */ W(nI, { children: [/* @__PURE__ */ U(iI, {
|
|
35605
35622
|
asChild: !0,
|
|
@@ -35628,7 +35645,7 @@ function XZ({ name: t, email: n, avatarUrl: r, initials: i, className: a, onSign
|
|
|
35628
35645
|
/* @__PURE__ */ U(lI, {
|
|
35629
35646
|
value: c,
|
|
35630
35647
|
onValueChange: (e) => l(e),
|
|
35631
|
-
children:
|
|
35648
|
+
children: XZ.map((e) => /* @__PURE__ */ U(uI, {
|
|
35632
35649
|
value: e.value,
|
|
35633
35650
|
children: e.label
|
|
35634
35651
|
}, e.value))
|
|
@@ -35641,6 +35658,6 @@ function XZ({ name: t, email: n, avatarUrl: r, initials: i, className: a, onSign
|
|
|
35641
35658
|
]
|
|
35642
35659
|
})] });
|
|
35643
35660
|
}
|
|
35644
|
-
|
|
35661
|
+
ZZ.displayName = "TopNavUser";
|
|
35645
35662
|
//#endregion
|
|
35646
|
-
export { pv as Accordion, gv as AccordionContent, mv as AccordionItem, hv as AccordionTrigger, xv as Alert, wv as AlertAction, Cv as AlertDescription, Sv as AlertTitle, bU as AppContextBar, AU as AppLayout, PU as AppSidebar, _U as AppSwitcher, Tv as Avatar, Ov as AvatarBadge, Dv as AvatarFallback, kv as AvatarGroup, Av as AvatarGroupCount, Ev as AvatarImage, Mv as Badge, jG as BadgeCell, Nv as Breadcrumb, zv as BreadcrumbEllipsis, Fv as BreadcrumbItem, Iv as BreadcrumbLink, Pv as BreadcrumbList, Lv as BreadcrumbPage, Rv as BreadcrumbSeparator, Vv as Button, Wv as ButtonGroup, Kv as ButtonGroupSeparator, Gv as ButtonGroupText, aC as Calendar, oC as CalendarDayButton, sC as Card, dC as CardAction, fC as CardContent, uC as CardDescription, pC as CardFooter, cC as CardHeader, lC as CardTitle, mC as Checkbox, hC as Collapsible, _C as CollapsibleContent, gC as CollapsibleTrigger, IA as Combobox, XA as ComboboxChip, YA as ComboboxChips, ZA as ComboboxChipsInput, KA as ComboboxCollection, VA as ComboboxContent, qA as ComboboxEmpty, WA as ComboboxGroup, BA as ComboboxInput, UA as ComboboxItem, GA as ComboboxLabel, HA as ComboboxList, JA as ComboboxSeparator, RA as ComboboxTrigger, LA as ComboboxValue, _P as Command, vP as CommandDialog, xP as CommandEmpty, SP as CommandGroup, yP as CommandInput, wP as CommandItem, bP as CommandList, CP as CommandSeparator, TP as CommandShortcut, zU as ContentHeader, EP as ContextMenu, IP as ContextMenuCheckboxItem, MP as ContextMenuContent, OP as ContextMenuGroup, NP as ContextMenuItem, RP as ContextMenuLabel, kP as ContextMenuPortal, jP as ContextMenuRadioGroup, LP as ContextMenuRadioItem, zP as ContextMenuSeparator, BP as ContextMenuShortcut, AP as ContextMenuSub, FP as ContextMenuSubContent, PP as ContextMenuSubTrigger, DP as ContextMenuTrigger, IU as ContextSidebar, LU as ContextToggleButton, NG as CopyableCell, BU as CopyableText,
|
|
35663
|
+
export { pv as Accordion, gv as AccordionContent, mv as AccordionItem, hv as AccordionTrigger, xv as Alert, wv as AlertAction, Cv as AlertDescription, Sv as AlertTitle, bU as AppContextBar, AU as AppLayout, PU as AppSidebar, _U as AppSwitcher, Tv as Avatar, Ov as AvatarBadge, Dv as AvatarFallback, kv as AvatarGroup, Av as AvatarGroupCount, Ev as AvatarImage, Mv as Badge, jG as BadgeCell, Nv as Breadcrumb, zv as BreadcrumbEllipsis, Fv as BreadcrumbItem, Iv as BreadcrumbLink, Pv as BreadcrumbList, Lv as BreadcrumbPage, Rv as BreadcrumbSeparator, Vv as Button, Wv as ButtonGroup, Kv as ButtonGroupSeparator, Gv as ButtonGroupText, aC as Calendar, oC as CalendarDayButton, sC as Card, dC as CardAction, fC as CardContent, uC as CardDescription, pC as CardFooter, cC as CardHeader, lC as CardTitle, mC as Checkbox, hC as Collapsible, _C as CollapsibleContent, gC as CollapsibleTrigger, IA as Combobox, XA as ComboboxChip, YA as ComboboxChips, ZA as ComboboxChipsInput, KA as ComboboxCollection, VA as ComboboxContent, qA as ComboboxEmpty, WA as ComboboxGroup, BA as ComboboxInput, UA as ComboboxItem, GA as ComboboxLabel, HA as ComboboxList, JA as ComboboxSeparator, RA as ComboboxTrigger, LA as ComboboxValue, _P as Command, vP as CommandDialog, xP as CommandEmpty, SP as CommandGroup, yP as CommandInput, wP as CommandItem, bP as CommandList, CP as CommandSeparator, TP as CommandShortcut, zU as ContentHeader, EP as ContextMenu, IP as ContextMenuCheckboxItem, MP as ContextMenuContent, OP as ContextMenuGroup, NP as ContextMenuItem, RP as ContextMenuLabel, kP as ContextMenuPortal, jP as ContextMenuRadioGroup, LP as ContextMenuRadioItem, zP as ContextMenuSeparator, BP as ContextMenuShortcut, AP as ContextMenuSub, FP as ContextMenuSubContent, PP as ContextMenuSubTrigger, DP as ContextMenuTrigger, IU as ContextSidebar, LU as ContextToggleButton, NG as CopyableCell, BU as CopyableText, GZ as DEFAULT_SLOTS, SG as DataTable, CG as DataTableColumnHeader, FG as DataTableEmptyState, hG as DataTablePagination, gG as DataTableViewOptions, AG as DateCell, WK as DatePicker, GK as DateRangePicker, JK as DateTimePicker, ZK as DateTimeRangePicker, sP as Dialog, uP as DialogClose, fP as DialogContent, gP as DialogDescription, mP as DialogFooter, pP as DialogHeader, dP as DialogOverlay, lP as DialogPortal, hP as DialogTitle, cP as DialogTrigger, KF as Drawer, YF as DrawerClose, ZF as DrawerContent, tI as DrawerDescription, $F as DrawerFooter, QF as DrawerHeader, XF as DrawerOverlay, JF as DrawerPortal, eI as DrawerTitle, qF as DrawerTrigger, nI as DropdownMenu, cI as DropdownMenuCheckboxItem, aI as DropdownMenuContent, oI as DropdownMenuGroup, sI as DropdownMenuItem, dI as DropdownMenuLabel, rI as DropdownMenuPortal, lI as DropdownMenuRadioGroup, uI as DropdownMenuRadioItem, fI as DropdownMenuSeparator, pI as DropdownMenuShortcut, mI as DropdownMenuSub, gI as DropdownMenuSubContent, hI as DropdownMenuSubTrigger, iI as DropdownMenuTrigger, _I as Empty, CI as EmptyContent, SI as EmptyDescription, vI as EmptyHeader, bI as EmptyMedia, xI as EmptyTitle, QK as FacetedFilter, kI as Field, AI as FieldContent, NI as FieldDescription, FI as FieldError, DI as FieldGroup, jI as FieldLabel, EI as FieldLegend, PI as FieldSeparator, TI as FieldSet, MI as FieldTitle, rq as FileUpload, kR as FileUploadInput, nq as FileUploadItem, AR as HoverCard, MR as HoverCardContent, FR as HoverCardDescription, NR as HoverCardHeader, PR as HoverCardTitle, jR as HoverCardTrigger, EA as Input, OA as InputGroup, AA as InputGroupAddon, MA as InputGroupButton, PA as InputGroupInput, NA as InputGroupText, FA as InputGroupTextarea, zR as Item, GR as ItemActions, HR as ItemContent, WR as ItemDescription, qR as ItemFooter, IR as ItemGroup, KR as ItemHeader, VR as ItemMedia, LR as ItemSeparator, UR as ItemTitle, KY as JsonSchemaForm, JR as Kbd, YR as KbdGroup, wI as Label, qZ as LayoutSlotsProvider, MG as MonoCell, XR as Pagination, ZR as PaginationContent, nz as PaginationEllipsis, QR as PaginationItem, $R as PaginationLink, tz as PaginationNext, ez as PaginationPrevious, EY as PasswordInput, rz as Popover, oz as PopoverAnchor, az as PopoverContent, lz as PopoverDescription, sz as PopoverHeader, cz as PopoverTitle, iz as PopoverTrigger, Oe as PortalContainerProvider, uz as Progress, fz as Prose, pz as RadioGroup, mz as RadioGroupItem, uV as ResizableHandle, lV as ResizablePanel, cV as ResizablePanelGroup, dV as ScrollArea, fV as ScrollBar, pV as Select, _V as SelectContent, mV as SelectGroup, yV as SelectItem, vV as SelectLabel, SV as SelectScrollDownButton, xV as SelectScrollUpButton, bV as SelectSeparator, gV as SelectTrigger, hV as SelectValue, vU as SelectorDropdown, yU as SelectorTriggerButton, Hv as Separator, CV as Sheet, TV as SheetClose, OV as SheetContent, MV as SheetDescription, AV as SheetFooter, kV as SheetHeader, jV as SheetTitle, wV as SheetTrigger, ZV as Sidebar, aH as SidebarContent, rH as SidebarFooter, oH as SidebarGroup, cH as SidebarGroupAction, lH as SidebarGroupContent, sH as SidebarGroupLabel, nH as SidebarHeader, tH as SidebarInput, eH as SidebarInset, uH as SidebarMenu, mH as SidebarMenuAction, hH as SidebarMenuBadge, pH as SidebarMenuButton, dH as SidebarMenuItem, gH as SidebarMenuSkeleton, _H as SidebarMenuSub, yH as SidebarMenuSubButton, vH as SidebarMenuSubItem, OU as SidebarModeControl, EU as SidebarModeProvider, FU as SidebarNavigation, XV as SidebarProvider, $V as SidebarRail, iH as SidebarSeparator, QV as SidebarTrigger, n as Skeleton, ZH as Spinner, QH as Switch, $H as Table, tU as TableBody, oU as TableCaption, aU as TableCell, nU as TableFooter, iU as TableHead, eU as TableHeader, rU as TableRow, sU as Tabs, dU as TabsContent, lU as TabsList, uU as TabsTrigger, DA as Textarea, j as ThemeProvider, XH as Toaster, pU as Toggle, hU as ToggleGroup, gU as ToggleGroupItem, PV as Tooltip, IV as TooltipContent, NV as TooltipProvider, FV as TooltipTrigger, ZZ as TopNavUser, PG as TruncatedCell, bv as alertVariants, jv as badgeVariants, VU as buildLinearBreadcrumbs, Uv as buttonGroupVariants, Bv as buttonVariants, e as cn, qY as composeResolvers, BJ as extractDefaults, LZ as jsonSchemaResolver, cU as tabsListVariants, PH as toast, fU as toggleVariants, QA as useComboboxAnchor, YZ as useLayoutConfig, JZ as useLayoutSlots, ke as usePortalContainer, YV as useSidebar, CU as useSidebarMode, A as useTheme };
|