swoop-common 2.0.34 → 2.0.35
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.
|
@@ -26,9 +26,11 @@ export const FORM_BUILDER_JSON_SCHEMA = {
|
|
|
26
26
|
items: {
|
|
27
27
|
allOf: [
|
|
28
28
|
{ $ref: "#/$defs/fieldDefinition" },
|
|
29
|
-
{
|
|
29
|
+
{
|
|
30
|
+
required: ["editableIn", "existsFrom"] // ✅ only required at this level
|
|
31
|
+
}
|
|
30
32
|
]
|
|
31
|
-
}
|
|
33
|
+
},
|
|
32
34
|
},
|
|
33
35
|
},
|
|
34
36
|
required: ["name", "fields"],
|
|
@@ -42,22 +44,21 @@ export const FORM_BUILDER_JSON_SCHEMA = {
|
|
|
42
44
|
minLength: 1,
|
|
43
45
|
description: "Field name (used for both label and ID generation)",
|
|
44
46
|
}, description: { type: "string" }, required: { type: "boolean", default: false }, existsFrom: {
|
|
45
|
-
type: "string",
|
|
46
|
-
oneOf: Object.keys(Stage)
|
|
47
|
-
.filter((k) => isNaN(+k))
|
|
48
|
-
.map(s => ({ title: s, const: Stage[s] + "" }))
|
|
47
|
+
"type": "string",
|
|
48
|
+
"oneOf": Object.keys(Stage).filter((k) => isNaN(+k)).map(s => ({ title: s, const: Stage[s] + "" }))
|
|
49
49
|
}, editableIn: {
|
|
50
50
|
type: "array",
|
|
51
51
|
uniqueItems: true,
|
|
52
52
|
minItems: 1,
|
|
53
53
|
items: {
|
|
54
54
|
type: "string",
|
|
55
|
-
oneOf: Object.keys(Stage)
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
oneOf: Object.keys(Stage).filter((k) => isNaN(+k)).map(s => ({
|
|
56
|
+
title: s,
|
|
57
|
+
const: Stage[s] + ""
|
|
58
|
+
}))
|
|
58
59
|
}
|
|
59
60
|
} }, fieldsToOptionsRecord),
|
|
60
|
-
required: ["fieldType", "name"],
|
|
61
|
+
required: ["fieldType", "name"],
|
|
61
62
|
dependencies: {
|
|
62
63
|
fieldType: {
|
|
63
64
|
oneOf: fieldsToTypeDef
|
|
@@ -69,7 +70,7 @@ export const FORM_BUILDER_JSON_SCHEMA = {
|
|
|
69
70
|
properties: Object.assign({ fieldType: {
|
|
70
71
|
oneOf: fieldsToConst
|
|
71
72
|
} }, fieldsToOptionsRecord),
|
|
72
|
-
required: ["fieldType"],
|
|
73
|
+
required: ["fieldType"],
|
|
73
74
|
dependencies: {
|
|
74
75
|
fieldType: {
|
|
75
76
|
oneOf: fieldsToTypeDef
|