@react-typed-forms/schemas 1.0.0-dev.5 → 1.0.0-dev.7
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/.rush/temp/package-deps_build.json +2 -2
- package/lib/types.d.ts +24 -5
- package/package.json +1 -1
- package/schemas.build.log +2 -0
- package/src/types.ts +34 -10
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
3
|
"packages/schemas/.rush/temp/shrinkwrap-deps.json": "5ce6417fae765db5c61e400f851ecafe0ce756f0",
|
|
4
|
-
"packages/schemas/package.json": "
|
|
4
|
+
"packages/schemas/package.json": "7595c5bd42419b3008de9228110d51b3cae25f4f",
|
|
5
5
|
"packages/schemas/src/controlRender.tsx": "3a1df1f3ade46594dbc15bca1228dc0d57e55da0",
|
|
6
6
|
"packages/schemas/src/hooks.ts": "4eb4946f7b1c685e0b51cd011b4d39a1fdd6aa2e",
|
|
7
7
|
"packages/schemas/src/index.ts": "67f656f1d7f717bce7e933b9f4d7dc5dc50274dc",
|
|
8
8
|
"packages/schemas/src/schemaBuilder.ts": "bfe74d3fb1cc2a4d5226051a58e025e107c32b11",
|
|
9
|
-
"packages/schemas/src/types.ts": "
|
|
9
|
+
"packages/schemas/src/types.ts": "d6dc6911839086b61763702c0be77c457b486bb5",
|
|
10
10
|
"packages/schemas/tsconfig.json": "52e4f044fa580f4e0ad5830f3cfca574e2788372"
|
|
11
11
|
},
|
|
12
12
|
"arguments": "rimraf ./lib/ && tsc "
|
package/lib/types.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ export declare enum ControlDefinitionType {
|
|
|
59
59
|
Action = "Action"
|
|
60
60
|
}
|
|
61
61
|
export interface DynamicProperty {
|
|
62
|
-
type:
|
|
62
|
+
type: string;
|
|
63
63
|
expr: EntityExpression;
|
|
64
64
|
}
|
|
65
65
|
export declare enum DynamicPropertyType {
|
|
@@ -67,7 +67,7 @@ export declare enum DynamicPropertyType {
|
|
|
67
67
|
DefaultValue = "DefaultValue"
|
|
68
68
|
}
|
|
69
69
|
export interface EntityExpression {
|
|
70
|
-
type:
|
|
70
|
+
type: string;
|
|
71
71
|
}
|
|
72
72
|
export declare enum ExpressionType {
|
|
73
73
|
Jsonata = "Jsonata",
|
|
@@ -75,26 +75,31 @@ export declare enum ExpressionType {
|
|
|
75
75
|
UserMatch = "UserMatch"
|
|
76
76
|
}
|
|
77
77
|
export interface JsonataExpression extends EntityExpression {
|
|
78
|
+
type: ExpressionType.Jsonata;
|
|
78
79
|
expression: string;
|
|
79
80
|
}
|
|
80
81
|
export interface FieldValueExpression extends EntityExpression {
|
|
82
|
+
type: ExpressionType.FieldValue;
|
|
81
83
|
field: string;
|
|
82
84
|
value: any;
|
|
83
85
|
}
|
|
84
86
|
export interface UserMatchExpression extends EntityExpression {
|
|
87
|
+
type: ExpressionType.UserMatch;
|
|
85
88
|
userMatch: string;
|
|
86
89
|
}
|
|
87
90
|
export interface ControlAdornment {
|
|
88
|
-
type:
|
|
91
|
+
type: string;
|
|
89
92
|
}
|
|
90
93
|
export declare enum ControlAdornmentType {
|
|
91
94
|
Tooltip = "Tooltip",
|
|
92
95
|
Accordion = "Accordion"
|
|
93
96
|
}
|
|
94
97
|
export interface TooltipAdornment extends ControlAdornment {
|
|
98
|
+
type: ControlAdornmentType.Tooltip;
|
|
95
99
|
tooltip: string;
|
|
96
100
|
}
|
|
97
101
|
export interface AccordionAdornment extends ControlAdornment {
|
|
102
|
+
type: ControlAdornmentType.Accordion;
|
|
98
103
|
title: string;
|
|
99
104
|
defaultExpanded: boolean;
|
|
100
105
|
}
|
|
@@ -121,16 +126,21 @@ export declare enum DataRenderType {
|
|
|
121
126
|
DateTime = "DateTime"
|
|
122
127
|
}
|
|
123
128
|
export interface RadioButtonRenderOptions extends RenderOptions {
|
|
129
|
+
type: DataRenderType.Radio;
|
|
124
130
|
}
|
|
125
131
|
export interface StandardRenderer extends RenderOptions {
|
|
132
|
+
type: DataRenderType.Standard;
|
|
126
133
|
}
|
|
127
134
|
export interface HtmlEditorRenderOptions extends RenderOptions {
|
|
135
|
+
type: DataRenderType.HtmlEditor;
|
|
128
136
|
allowImages: boolean;
|
|
129
137
|
}
|
|
130
138
|
export interface DateTimeRenderOptions extends RenderOptions {
|
|
139
|
+
type: DataRenderType.DateTime;
|
|
131
140
|
format?: string | null;
|
|
132
141
|
}
|
|
133
142
|
export interface IconListRenderOptions extends RenderOptions {
|
|
143
|
+
type: DataRenderType.IconList;
|
|
134
144
|
iconMappings: IconMapping[];
|
|
135
145
|
}
|
|
136
146
|
export interface IconMapping {
|
|
@@ -138,8 +148,10 @@ export interface IconMapping {
|
|
|
138
148
|
materialIcon?: string | null;
|
|
139
149
|
}
|
|
140
150
|
export interface CheckListRenderOptions extends RenderOptions {
|
|
151
|
+
type: DataRenderType.CheckList;
|
|
141
152
|
}
|
|
142
153
|
export interface SynchronisedRenderOptions extends RenderOptions {
|
|
154
|
+
type: DataRenderType.Synchronised;
|
|
143
155
|
fieldToSync: string;
|
|
144
156
|
syncType: SyncTextType;
|
|
145
157
|
}
|
|
@@ -149,10 +161,12 @@ export declare enum SyncTextType {
|
|
|
149
161
|
Pascal = "Pascal"
|
|
150
162
|
}
|
|
151
163
|
export interface UserSelectionRenderOptions extends RenderOptions {
|
|
164
|
+
type: DataRenderType.UserSelection;
|
|
152
165
|
noGroups: boolean;
|
|
153
166
|
noUsers: boolean;
|
|
154
167
|
}
|
|
155
168
|
export interface IconSelectionRenderOptions extends RenderOptions {
|
|
169
|
+
type: DataRenderType.IconSelector;
|
|
156
170
|
}
|
|
157
171
|
export interface GroupedControlsDefinition extends ControlDefinition {
|
|
158
172
|
type: ControlDefinitionType.Group;
|
|
@@ -161,7 +175,7 @@ export interface GroupedControlsDefinition extends ControlDefinition {
|
|
|
161
175
|
groupOptions: GroupRenderOptions;
|
|
162
176
|
}
|
|
163
177
|
export interface GroupRenderOptions {
|
|
164
|
-
type:
|
|
178
|
+
type: string;
|
|
165
179
|
hideTitle?: boolean | null;
|
|
166
180
|
}
|
|
167
181
|
export declare enum GroupRenderType {
|
|
@@ -170,11 +184,14 @@ export declare enum GroupRenderType {
|
|
|
170
184
|
GroupElement = "GroupElement"
|
|
171
185
|
}
|
|
172
186
|
export interface StandardGroupRenderer extends GroupRenderOptions {
|
|
187
|
+
type: GroupRenderType.Standard;
|
|
173
188
|
}
|
|
174
189
|
export interface GroupElementRenderer extends GroupRenderOptions {
|
|
190
|
+
type: GroupRenderType.GroupElement;
|
|
175
191
|
value: any;
|
|
176
192
|
}
|
|
177
193
|
export interface GridRenderer extends GroupRenderOptions {
|
|
194
|
+
type: GroupRenderType.Grid;
|
|
178
195
|
columns?: number | null;
|
|
179
196
|
}
|
|
180
197
|
export interface DisplayControlDefinition extends ControlDefinition {
|
|
@@ -182,16 +199,18 @@ export interface DisplayControlDefinition extends ControlDefinition {
|
|
|
182
199
|
displayData: DisplayData;
|
|
183
200
|
}
|
|
184
201
|
export interface DisplayData {
|
|
185
|
-
type:
|
|
202
|
+
type: string;
|
|
186
203
|
}
|
|
187
204
|
export declare enum DisplayDataType {
|
|
188
205
|
Text = "Text",
|
|
189
206
|
Html = "Html"
|
|
190
207
|
}
|
|
191
208
|
export interface TextDisplay extends DisplayData {
|
|
209
|
+
type: DisplayDataType.Text;
|
|
192
210
|
text: string;
|
|
193
211
|
}
|
|
194
212
|
export interface HtmlDisplay extends DisplayData {
|
|
213
|
+
type: DisplayDataType.Html;
|
|
195
214
|
html: string;
|
|
196
215
|
}
|
|
197
216
|
export interface ActionControlDefinition extends ControlDefinition {
|
package/package.json
CHANGED
package/schemas.build.log
CHANGED
package/src/types.ts
CHANGED
|
@@ -74,7 +74,7 @@ export enum ControlDefinitionType {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
export interface DynamicProperty {
|
|
77
|
-
type:
|
|
77
|
+
type: string;
|
|
78
78
|
expr: EntityExpression;
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -84,7 +84,7 @@ export enum DynamicPropertyType {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
export interface EntityExpression {
|
|
87
|
-
type:
|
|
87
|
+
type: string;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
export enum ExpressionType {
|
|
@@ -94,20 +94,23 @@ export enum ExpressionType {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
export interface JsonataExpression extends EntityExpression {
|
|
97
|
+
type: ExpressionType.Jsonata;
|
|
97
98
|
expression: string;
|
|
98
99
|
}
|
|
99
100
|
|
|
100
101
|
export interface FieldValueExpression extends EntityExpression {
|
|
102
|
+
type: ExpressionType.FieldValue;
|
|
101
103
|
field: string;
|
|
102
104
|
value: any;
|
|
103
105
|
}
|
|
104
106
|
|
|
105
107
|
export interface UserMatchExpression extends EntityExpression {
|
|
108
|
+
type: ExpressionType.UserMatch;
|
|
106
109
|
userMatch: string;
|
|
107
110
|
}
|
|
108
111
|
|
|
109
112
|
export interface ControlAdornment {
|
|
110
|
-
type:
|
|
113
|
+
type: string;
|
|
111
114
|
}
|
|
112
115
|
|
|
113
116
|
export enum ControlAdornmentType {
|
|
@@ -116,10 +119,12 @@ export enum ControlAdornmentType {
|
|
|
116
119
|
}
|
|
117
120
|
|
|
118
121
|
export interface TooltipAdornment extends ControlAdornment {
|
|
122
|
+
type: ControlAdornmentType.Tooltip;
|
|
119
123
|
tooltip: string;
|
|
120
124
|
}
|
|
121
125
|
|
|
122
126
|
export interface AccordionAdornment extends ControlAdornment {
|
|
127
|
+
type: ControlAdornmentType.Accordion;
|
|
123
128
|
title: string;
|
|
124
129
|
defaultExpanded: boolean;
|
|
125
130
|
}
|
|
@@ -149,19 +154,26 @@ export enum DataRenderType {
|
|
|
149
154
|
DateTime = "DateTime",
|
|
150
155
|
}
|
|
151
156
|
|
|
152
|
-
export interface RadioButtonRenderOptions extends RenderOptions {
|
|
157
|
+
export interface RadioButtonRenderOptions extends RenderOptions {
|
|
158
|
+
type: DataRenderType.Radio;
|
|
159
|
+
}
|
|
153
160
|
|
|
154
|
-
export interface StandardRenderer extends RenderOptions {
|
|
161
|
+
export interface StandardRenderer extends RenderOptions {
|
|
162
|
+
type: DataRenderType.Standard;
|
|
163
|
+
}
|
|
155
164
|
|
|
156
165
|
export interface HtmlEditorRenderOptions extends RenderOptions {
|
|
166
|
+
type: DataRenderType.HtmlEditor;
|
|
157
167
|
allowImages: boolean;
|
|
158
168
|
}
|
|
159
169
|
|
|
160
170
|
export interface DateTimeRenderOptions extends RenderOptions {
|
|
171
|
+
type: DataRenderType.DateTime;
|
|
161
172
|
format?: string | null;
|
|
162
173
|
}
|
|
163
174
|
|
|
164
175
|
export interface IconListRenderOptions extends RenderOptions {
|
|
176
|
+
type: DataRenderType.IconList;
|
|
165
177
|
iconMappings: IconMapping[];
|
|
166
178
|
}
|
|
167
179
|
|
|
@@ -170,9 +182,12 @@ export interface IconMapping {
|
|
|
170
182
|
materialIcon?: string | null;
|
|
171
183
|
}
|
|
172
184
|
|
|
173
|
-
export interface CheckListRenderOptions extends RenderOptions {
|
|
185
|
+
export interface CheckListRenderOptions extends RenderOptions {
|
|
186
|
+
type: DataRenderType.CheckList;
|
|
187
|
+
}
|
|
174
188
|
|
|
175
189
|
export interface SynchronisedRenderOptions extends RenderOptions {
|
|
190
|
+
type: DataRenderType.Synchronised;
|
|
176
191
|
fieldToSync: string;
|
|
177
192
|
syncType: SyncTextType;
|
|
178
193
|
}
|
|
@@ -184,11 +199,14 @@ export enum SyncTextType {
|
|
|
184
199
|
}
|
|
185
200
|
|
|
186
201
|
export interface UserSelectionRenderOptions extends RenderOptions {
|
|
202
|
+
type: DataRenderType.UserSelection;
|
|
187
203
|
noGroups: boolean;
|
|
188
204
|
noUsers: boolean;
|
|
189
205
|
}
|
|
190
206
|
|
|
191
|
-
export interface IconSelectionRenderOptions extends RenderOptions {
|
|
207
|
+
export interface IconSelectionRenderOptions extends RenderOptions {
|
|
208
|
+
type: DataRenderType.IconSelector;
|
|
209
|
+
}
|
|
192
210
|
|
|
193
211
|
export interface GroupedControlsDefinition extends ControlDefinition {
|
|
194
212
|
type: ControlDefinitionType.Group;
|
|
@@ -198,7 +216,7 @@ export interface GroupedControlsDefinition extends ControlDefinition {
|
|
|
198
216
|
}
|
|
199
217
|
|
|
200
218
|
export interface GroupRenderOptions {
|
|
201
|
-
type:
|
|
219
|
+
type: string;
|
|
202
220
|
hideTitle?: boolean | null;
|
|
203
221
|
}
|
|
204
222
|
|
|
@@ -208,13 +226,17 @@ export enum GroupRenderType {
|
|
|
208
226
|
GroupElement = "GroupElement",
|
|
209
227
|
}
|
|
210
228
|
|
|
211
|
-
export interface StandardGroupRenderer extends GroupRenderOptions {
|
|
229
|
+
export interface StandardGroupRenderer extends GroupRenderOptions {
|
|
230
|
+
type: GroupRenderType.Standard;
|
|
231
|
+
}
|
|
212
232
|
|
|
213
233
|
export interface GroupElementRenderer extends GroupRenderOptions {
|
|
234
|
+
type: GroupRenderType.GroupElement;
|
|
214
235
|
value: any;
|
|
215
236
|
}
|
|
216
237
|
|
|
217
238
|
export interface GridRenderer extends GroupRenderOptions {
|
|
239
|
+
type: GroupRenderType.Grid;
|
|
218
240
|
columns?: number | null;
|
|
219
241
|
}
|
|
220
242
|
|
|
@@ -224,7 +246,7 @@ export interface DisplayControlDefinition extends ControlDefinition {
|
|
|
224
246
|
}
|
|
225
247
|
|
|
226
248
|
export interface DisplayData {
|
|
227
|
-
type:
|
|
249
|
+
type: string;
|
|
228
250
|
}
|
|
229
251
|
|
|
230
252
|
export enum DisplayDataType {
|
|
@@ -233,10 +255,12 @@ export enum DisplayDataType {
|
|
|
233
255
|
}
|
|
234
256
|
|
|
235
257
|
export interface TextDisplay extends DisplayData {
|
|
258
|
+
type: DisplayDataType.Text;
|
|
236
259
|
text: string;
|
|
237
260
|
}
|
|
238
261
|
|
|
239
262
|
export interface HtmlDisplay extends DisplayData {
|
|
263
|
+
type: DisplayDataType.Html;
|
|
240
264
|
html: string;
|
|
241
265
|
}
|
|
242
266
|
|