swoop-common 2.0.47 → 2.0.48
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.
|
@@ -70,9 +70,16 @@ export declare const FORM_BUILDER_JSON_SCHEMA: {
|
|
|
70
70
|
dependencies: {
|
|
71
71
|
fieldType: {
|
|
72
72
|
oneOf: {
|
|
73
|
+
required?: string[] | undefined;
|
|
73
74
|
"x-type": string;
|
|
74
75
|
properties: {
|
|
75
|
-
|
|
76
|
+
[x: string]: {
|
|
77
|
+
const: string;
|
|
78
|
+
type?: undefined;
|
|
79
|
+
} | {
|
|
80
|
+
type: string;
|
|
81
|
+
const?: undefined;
|
|
82
|
+
};
|
|
76
83
|
fieldType: {
|
|
77
84
|
const: string;
|
|
78
85
|
};
|
|
@@ -125,9 +132,16 @@ export declare const FORM_BUILDER_JSON_SCHEMA: {
|
|
|
125
132
|
dependencies: {
|
|
126
133
|
fieldType: {
|
|
127
134
|
oneOf: {
|
|
135
|
+
required?: string[] | undefined;
|
|
128
136
|
"x-type": string;
|
|
129
137
|
properties: {
|
|
130
|
-
|
|
138
|
+
[x: string]: {
|
|
139
|
+
const: string;
|
|
140
|
+
type?: undefined;
|
|
141
|
+
} | {
|
|
142
|
+
type: string;
|
|
143
|
+
const?: undefined;
|
|
144
|
+
};
|
|
131
145
|
fieldType: {
|
|
132
146
|
const: string;
|
|
133
147
|
};
|
|
@@ -150,9 +164,16 @@ export declare const FORM_BUILDER_JSON_SCHEMA: {
|
|
|
150
164
|
dependencies: {
|
|
151
165
|
fieldType: {
|
|
152
166
|
oneOf: {
|
|
167
|
+
required?: string[] | undefined;
|
|
153
168
|
"x-type": string;
|
|
154
169
|
properties: {
|
|
155
|
-
|
|
170
|
+
[x: string]: {
|
|
171
|
+
const: string;
|
|
172
|
+
type?: undefined;
|
|
173
|
+
} | {
|
|
174
|
+
type: string;
|
|
175
|
+
const?: undefined;
|
|
176
|
+
};
|
|
156
177
|
fieldType: {
|
|
157
178
|
const: string;
|
|
158
179
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { getAllTypes } from "../../registry/fields";
|
|
2
2
|
import { Stage } from "../formSchemaTypes";
|
|
3
3
|
const fields = getAllTypes();
|
|
4
|
-
const fieldsToTypeDef = fields.map(f => ({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}));
|
|
4
|
+
const fieldsToTypeDef = fields.map(f => (Object.assign({ "x-type": f.name, properties: {
|
|
5
|
+
fieldType: { const: f.name },
|
|
6
|
+
[f.name + "Options"]: { type: "object" },
|
|
7
|
+
} }, f.optionsRequired && { required: [f.name + "Options"] })));
|
|
8
8
|
const fieldsToConst = fields.map(f => ({ const: f.name, title: f.title }));
|
|
9
9
|
const fieldsToOptionsRecord = fields.reduce((prev, curr) => {
|
|
10
10
|
if (!curr.options)
|