swoop-common 2.0.47 → 2.0.49

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.
@@ -52,6 +52,6 @@ const FormRendererTemplatePicker = ({ data, handleChange, path, label, enabled }
52
52
  });
53
53
  load();
54
54
  }, []);
55
- return (React.createElement(FormTemplatePicker, { templates: templates, selectedTemplates: data || [], onChange: (ids) => handleChange(path, ids), getError: getError, label: label, enabled: enabled }));
55
+ return (React.createElement(FormTemplatePicker, { templates: templates, selectedTemplates: data || [], onChange: (ids) => handleChange(path, { templateIds: ids }), getError: getError, label: label, enabled: enabled }));
56
56
  };
57
57
  registerComponent("componentOptions", FormRendererTemplatePicker, ComponentPool.FORM);
@@ -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
- required?: string[] | undefined;
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
- required?: string[] | undefined;
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
- required?: string[] | undefined;
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
- "x-type": f.name,
6
- properties: Object.assign({ fieldType: { const: f.name }, [f.name + "Options"]: { type: "object" } }, f.optionsRequired && { required: [f.name + "Options"] }),
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)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swoop-common",
3
- "version": "2.0.47",
3
+ "version": "2.0.49",
4
4
  "main": "dist/api/index.js",
5
5
  "types": "dist/api/index.d.ts",
6
6
  "exports": {