swoop-common 2.0.13 → 2.0.15

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.
@@ -1,4 +1,3 @@
1
- import { CONSTRAINT_DEFINITIONS } from "../template/constraint";
2
1
  import { getAllTypes } from "../../registry/fields";
3
2
  import { Stage } from "../formSchemaTypes";
4
3
  const fields = getAllTypes();
@@ -22,128 +21,10 @@ export const FORM_BUILDER_JSON_SCHEMA = {
22
21
  minLength: 1,
23
22
  description: "Name of your template",
24
23
  },
25
- formFields: {
24
+ fields: {
26
25
  type: "array",
27
26
  items: { $ref: "#/$defs/fieldDefinition" },
28
27
  },
29
- ibFormFields: {
30
- type: "array",
31
- items: { $ref: "#/$defs/fieldDefinition" },
32
- },
33
- constraints: {
34
- type: "array",
35
- items: {
36
- type: "object",
37
- properties: {
38
- type: {
39
- type: "string",
40
- enum: Object.keys(CONSTRAINT_DEFINITIONS),
41
- title: "Constraint Type",
42
- },
43
- mustHaveOneOfOptions: {
44
- type: "object",
45
- title: "Must Have One Of Options",
46
- properties: {
47
- templateIds: {
48
- type: "array",
49
- title: "Select Templates",
50
- items: {
51
- type: "string",
52
- },
53
- minItems: 1,
54
- options: {
55
- custom: {
56
- renderer: "template-picker",
57
- },
58
- },
59
- },
60
- },
61
- required: ["templateIds"],
62
- },
63
- mustHaveAllOfOptions: {
64
- type: "object",
65
- title: "Must Have All Of Options",
66
- properties: {
67
- templateIds: {
68
- type: "array",
69
- title: "Select Templates",
70
- items: {
71
- type: "string",
72
- },
73
- minItems: 1,
74
- },
75
- },
76
- required: ["templateIds"],
77
- },
78
- mustNotHaveOptions: {
79
- type: "object",
80
- title: "Must Not Have Options",
81
- properties: {
82
- templateIds: {
83
- type: "array",
84
- title: "Select Templates",
85
- items: {
86
- type: "string",
87
- },
88
- minItems: 1,
89
- },
90
- },
91
- required: ["templateIds"],
92
- },
93
- customOptions: {
94
- type: "object",
95
- title: "Custom Options",
96
- properties: {
97
- name: {
98
- type: "string",
99
- title: "Constraint Name",
100
- },
101
- customParameters: {
102
- type: "object",
103
- title: "Custom Parameters",
104
- properties: {},
105
- },
106
- },
107
- required: ["name"],
108
- },
109
- },
110
- required: ["type"],
111
- dependencies: {
112
- type: {
113
- oneOf: [
114
- {
115
- properties: {
116
- type: { const: "MustHaveOneOf" },
117
- mustHaveOneOfOptions: { type: "object" },
118
- },
119
- required: ["mustHaveOneOfOptions"],
120
- },
121
- {
122
- properties: {
123
- type: { const: "MustHaveAllOf" },
124
- mustHaveAllOfOptions: { type: "object" },
125
- },
126
- required: ["mustHaveAllOfOptions"],
127
- },
128
- {
129
- properties: {
130
- type: { const: "MustNotHave" },
131
- mustNotHaveOptions: { type: "object" },
132
- },
133
- required: ["mustNotHaveOptions"],
134
- },
135
- {
136
- properties: {
137
- type: { const: "Custom" },
138
- customOptions: { type: "object" },
139
- },
140
- required: ["customOptions"],
141
- },
142
- ],
143
- },
144
- },
145
- },
146
- },
147
28
  },
148
29
  required: ["name", "formFields"],
149
30
  $defs: {
@@ -190,7 +190,7 @@ export const FORM_BUILDER_UI_SCHEMA = {
190
190
  elements: [
191
191
  {
192
192
  type: "Control",
193
- scope: "#/properties/formFields",
193
+ scope: "#/properties/fields",
194
194
  options: { detail: fieldDetailLayout },
195
195
  },
196
196
  ],
@@ -3,9 +3,7 @@ export interface FormBuilderSchema {
3
3
  type: "object";
4
4
  properties: {
5
5
  name: SchemaStringProperty;
6
- formFields: RefArrayProperty;
7
- ibFormFields: RefArrayProperty;
8
- constraints: ConstraintArrayProperty;
6
+ fields: RefArrayProperty;
9
7
  };
10
8
  required: string[];
11
9
  $defs: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swoop-common",
3
- "version": "2.0.13",
3
+ "version": "2.0.15",
4
4
  "main": "dist/api/index.js",
5
5
  "types": "dist/api/index.d.ts",
6
6
  "exports": {