@evoke-platform/context 1.3.0-testing.3 → 1.3.0-testing.5

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.
@@ -29,20 +29,20 @@ type ViewLayoutEntity = {
29
29
  export type TableViewLayoutEntity = ViewLayoutEntity & TableViewLayout;
30
30
  export type DropdownViewLayoutEntity = ViewLayoutEntity & DropdownViewLayout;
31
31
  export type ViewLayout = {
32
- table?: TableViewLayout;
33
- dropdown?: DropdownViewLayout;
32
+ table?: TableViewLayout | null;
33
+ dropdown?: DropdownViewLayout | null;
34
34
  };
35
35
  export type DropdownViewLayoutSort = {
36
36
  propertyId: string;
37
- direction?: 'asc' | 'desc';
37
+ direction?: 'asc' | 'desc' | null;
38
38
  };
39
39
  export type DropdownViewLayout = {
40
40
  secondaryTextExpression: string;
41
- sort?: DropdownViewLayoutSort;
41
+ sort?: DropdownViewLayoutSort | null;
42
42
  };
43
43
  export type TableViewLayout = {
44
44
  properties: PropertyReference[];
45
- sort?: Sort;
45
+ sort?: Sort | null;
46
46
  };
47
47
  export type PropertyReference = {
48
48
  id: string;
@@ -50,93 +50,94 @@ export type PropertyReference = {
50
50
  };
51
51
  export type Sort = {
52
52
  colId: string;
53
- sort?: 'asc' | 'desc';
53
+ sort?: 'asc' | 'desc' | null;
54
54
  };
55
55
  export type Obj = {
56
56
  id: string;
57
57
  name: string;
58
- typeDiscriminatorProperty?: string;
59
- viewLayout?: ViewLayout;
60
- baseObject?: BaseObjReference;
61
- properties?: Property[];
62
- actions?: Action[];
63
- formId?: string;
58
+ typeDiscriminatorProperty?: string | null;
59
+ viewLayout?: ViewLayout | null;
60
+ baseObject?: BaseObjReference | null;
61
+ properties?: Property[] | null;
62
+ actions?: Action[] | null;
63
+ formId?: string | null;
64
64
  };
65
65
  export type ObjWithRoot = Obj & {
66
66
  rootObjectId: string;
67
67
  };
68
68
  export type PropertyType = 'address' | 'array' | 'boolean' | 'collection' | 'criteria' | 'date' | 'date-time' | 'document' | 'image' | 'integer' | 'number' | 'object' | 'richText' | 'string' | 'time' | 'user';
69
69
  export type NumericValidation = {
70
- errorMessage?: string;
71
- minimum?: number;
72
- maximum?: number;
70
+ errorMessage?: string | null;
71
+ minimum?: number | null;
72
+ maximum?: number | null;
73
73
  };
74
74
  export type DateValidation = {
75
- errorMessage?: string;
76
- to?: string;
77
- from?: string;
75
+ errorMessage?: string | null;
76
+ to?: string | null;
77
+ from?: string | null;
78
78
  };
79
79
  export type CriteriaValidation = {
80
- criteria?: Record<string, unknown>;
80
+ criteria?: Record<string, unknown> | null;
81
81
  };
82
82
  export type StringValidation = {
83
83
  operator: 'any' | 'all';
84
- rules?: RegexValidation[];
84
+ rules?: RegexValidation[] | null;
85
85
  };
86
86
  export type DocumentValidation = {
87
- errorMessage?: string;
88
- maxDocuments?: number;
89
- minDocuments?: number;
87
+ errorMessage?: string | null;
88
+ maxDocuments?: number | null;
89
+ minDocuments?: number | null;
90
90
  };
91
91
  export type PropertyValidation = StringValidation | NumericValidation | DateValidation | CriteriaValidation | DocumentValidation;
92
92
  export type Property = {
93
93
  id: string;
94
94
  name: string;
95
95
  type: PropertyType;
96
- enum?: string[];
97
- strictlyTrue?: boolean;
98
- nonStrictEnum?: boolean;
99
- objectId?: string;
100
- relatedPropertyId?: string;
101
- required?: boolean;
102
- searchable?: boolean;
103
- formula?: string;
104
- formulaType?: 'aggregate' | 'custom' | 'arithmetic';
105
- mask?: string;
106
- validation?: PropertyValidation;
107
- manyToManyPropertyId?: string;
108
- textTransform?: 'titleCase' | 'upperCase' | 'lowerCase' | 'sentenceCase';
96
+ enum?: string[] | null;
97
+ strictlyTrue?: boolean | null;
98
+ nonStrictEnum?: boolean | null;
99
+ objectId?: string | null;
100
+ relatedPropertyId?: string | null;
101
+ required?: boolean | null;
102
+ searchable?: boolean | null;
103
+ formula?: string | null;
104
+ formulaType?: 'aggregate' | 'custom' | 'arithmetic' | null;
105
+ mask?: string | null;
106
+ validation?: PropertyValidation | null;
107
+ manyToManyPropertyId?: string | null;
108
+ textTransform?: 'titleCase' | 'upperCase' | 'lowerCase' | 'sentenceCase' | null;
109
109
  };
110
110
  export type ActionType = 'create' | 'update' | 'delete';
111
111
  export type InputStringValidation = StringValidation & {
112
- minLength?: number;
113
- maxLength?: number;
114
- mask?: string;
112
+ minLength?: number | null;
113
+ maxLength?: number | null;
114
+ mask?: string | null;
115
115
  };
116
116
  export type BasicInputParameter = Omit<InputParameter, 'name' | 'required'>;
117
117
  export type InputParameter = {
118
118
  id: string;
119
- name?: string;
119
+ name?: string | null;
120
120
  type: PropertyType;
121
- required?: boolean;
122
- enum?: string[];
123
- strictlyTrue?: boolean;
124
- nonStrictEnum?: boolean;
125
- validation?: PropertyValidation | InputStringValidation;
126
- objectId?: string;
127
- relatedPropertyId?: string;
128
- manyToManyPropertyId?: string;
121
+ required?: boolean | null;
122
+ enum?: string[] | null;
123
+ strictlyTrue?: boolean | null;
124
+ nonStrictEnum?: boolean | null;
125
+ validation?: PropertyValidation | InputStringValidation | null;
126
+ objectId?: string | null;
127
+ relatedPropertyId?: string | null;
128
+ manyToManyPropertyId?: string | null;
129
129
  };
130
130
  export type Action = {
131
131
  id: string;
132
132
  name: string;
133
133
  type: ActionType;
134
134
  outputEvent: string;
135
- inputProperties?: ActionInput[];
136
- parameters?: InputParameter[];
137
- form?: Form;
138
- customCode?: string;
139
- preconditions?: object;
135
+ inputProperties?: ActionInput[] | null;
136
+ parameters?: InputParameter[] | null;
137
+ form?: Form | null;
138
+ defaultFormId?: string | null;
139
+ customCode?: string | null;
140
+ preconditions?: object | null;
140
141
  };
141
142
  export type ObjectInstance = {
142
143
  id: string;
@@ -146,7 +147,7 @@ export type ObjectInstance = {
146
147
  };
147
148
  export type RegexValidation = {
148
149
  regex: string;
149
- errorMessage?: string;
150
+ errorMessage?: string | null;
150
151
  };
151
152
  export type SelectOption = {
152
153
  label: string;
@@ -156,170 +157,170 @@ export type VisibilityCondition = {
156
157
  property: string;
157
158
  operator: 'eq' | 'ne';
158
159
  value: string | number | boolean;
159
- isInstanceProperty?: boolean;
160
+ isInstanceProperty?: boolean | null;
160
161
  };
161
162
  export type VisibilityConfiguration = {
162
- operator?: 'any' | 'all';
163
- conditions?: VisibilityCondition[];
163
+ operator?: 'any' | 'all' | null;
164
+ conditions?: VisibilityCondition[] | null;
164
165
  };
165
166
  export type RelatedObjectDefaultValue = {
166
167
  criteria: Record<string, unknown>;
167
- sortBy?: string;
168
- orderBy?: 'asc' | 'desc' | 'ASC' | 'DESC';
168
+ sortBy?: string | null;
169
+ orderBy?: 'asc' | 'desc' | 'ASC' | 'DESC' | null;
169
170
  };
170
171
  export type CriteriaDefaultValue = Record<string, unknown>;
171
172
  export type JsonLogic = Record<string, unknown> | boolean | number | string | null;
172
173
  export type DisplayConfiguration = {
173
- label?: string;
174
- placeholder?: string;
175
- required?: boolean;
176
- description?: string;
177
- defaultValue?: string | boolean | number | string[] | RelatedObjectDefaultValue | CriteriaDefaultValue;
178
- readOnly?: boolean;
179
- tooltip?: string;
180
- prefix?: string;
181
- suffix?: string;
182
- placeholderChar?: string;
183
- rowCount?: number;
184
- charCount?: boolean;
185
- mode?: 'default' | 'existingOnly';
186
- relatedObjectDisplay?: 'dropdown' | 'dialogBox';
187
- visibility?: VisibilityConfiguration | JsonLogic;
188
- viewLayout?: ViewLayoutEntityReference;
174
+ label?: string | null;
175
+ placeholder?: string | null;
176
+ required?: boolean | null;
177
+ description?: string | null;
178
+ defaultValue?: string | boolean | number | string[] | RelatedObjectDefaultValue | CriteriaDefaultValue | null;
179
+ readOnly?: boolean | null;
180
+ tooltip?: string | null;
181
+ prefix?: string | null;
182
+ suffix?: string | null;
183
+ placeholderChar?: string | null;
184
+ rowCount?: number | null;
185
+ charCount?: boolean | null;
186
+ mode?: 'default' | 'existingOnly' | null;
187
+ relatedObjectDisplay?: 'dropdown' | 'dialogBox' | null;
188
+ visibility?: VisibilityConfiguration | JsonLogic | null;
189
+ viewLayout?: ViewLayoutEntityReference | null;
189
190
  choicesDisplay?: {
190
191
  type: 'dropdown' | 'radioButton';
191
- sortBy?: 'ASC' | 'DESC' | 'NONE';
192
- };
193
- booleanDisplay?: 'checkbox' | 'switch';
192
+ sortBy?: 'ASC' | 'DESC' | 'NONE' | null;
193
+ } | null;
194
+ booleanDisplay?: 'checkbox' | 'switch' | null;
194
195
  };
195
196
  export type InputParameterReference = {
196
197
  type: 'input';
197
198
  parameterId: string;
198
- display?: DisplayConfiguration;
199
- enumWithLabels?: SelectOption[];
200
- documentMetadata?: Record<string, string>;
199
+ display?: DisplayConfiguration | null;
200
+ enumWithLabels?: SelectOption[] | null;
201
+ documentMetadata?: Record<string, string> | null;
201
202
  };
202
203
  export type Content = {
203
204
  type: 'content';
204
205
  html: string;
205
- visibility?: VisibilityConfiguration | JsonLogic;
206
+ visibility?: VisibilityConfiguration | JsonLogic | null;
206
207
  };
207
208
  export type Column = {
208
209
  width: number;
209
- entries?: FormEntry[];
210
+ entries?: FormEntry[] | null;
210
211
  };
211
212
  export type Columns = {
212
213
  type: 'columns';
213
214
  columns: Column[];
214
- visibility?: VisibilityConfiguration | JsonLogic;
215
+ visibility?: VisibilityConfiguration | JsonLogic | null;
215
216
  };
216
217
  export type Section = {
217
218
  label: string;
218
- entries?: FormEntry[];
219
+ entries?: FormEntry[] | null;
219
220
  };
220
221
  export type Sections = {
221
222
  type: 'sections';
222
- label?: string;
223
+ label?: string | null;
223
224
  sections: Section[];
224
- visibility?: VisibilityConfiguration | JsonLogic;
225
+ visibility?: VisibilityConfiguration | JsonLogic | null;
225
226
  };
226
227
  export type ReadonlyField = {
227
228
  type: 'readonlyField';
228
229
  propertyId: string;
229
- display?: DisplayConfiguration;
230
+ display?: DisplayConfiguration | null;
230
231
  };
231
232
  export type InputField = {
232
233
  type: 'inputField';
233
234
  input: BasicInputParameter;
234
- display?: DisplayConfiguration;
235
- documentMetadata?: Record<string, string>;
235
+ display?: DisplayConfiguration | null;
236
+ documentMetadata?: Record<string, string> | null;
236
237
  };
237
238
  export type FormEntry = InputField | InputParameterReference | ReadonlyField | Sections | Columns | Content;
238
239
  export type Form = {
239
- entries?: FormEntry[];
240
+ entries?: FormEntry[] | null;
240
241
  };
241
242
  export type ActionInputType = 'button' | 'Boolean' | 'Columns' | 'Content' | 'Criteria' | 'Date' | 'DateTime' | 'Decimal' | 'Document' | 'Image' | 'Integer' | 'ManyToManyRepeatableField' | 'MultiSelect' | 'Object' | 'RepeatableField' | 'RichText' | 'Section' | 'Select' | 'TextField' | 'Time' | 'User';
242
243
  /**
243
244
  * Represents an object action inputProperty object.
244
245
  */
245
246
  export type ActionInput = {
246
- id?: string;
247
- label?: string;
248
- type?: ActionInputType;
249
- key?: string;
250
- initialValue?: boolean | string | string[] | number | RelatedObjectDefaultValue | SelectOption[] | SelectOption;
251
- defaultToCurrentDate?: boolean;
252
- defaultToCurrentTime?: boolean;
253
- defaultValueCriteria?: object;
254
- sortBy?: string;
255
- orderBy?: 'asc' | 'desc' | 'ASC' | 'DESC';
256
- html?: string;
257
- labelPosition?: string;
258
- placeholder?: string;
259
- description?: string;
260
- tooltip?: string;
261
- prefix?: string;
262
- suffix?: string;
247
+ id?: string | null;
248
+ label?: string | null;
249
+ type?: ActionInputType | null;
250
+ key?: string | null;
251
+ initialValue?: boolean | string | string[] | number | RelatedObjectDefaultValue | SelectOption[] | SelectOption | null;
252
+ defaultToCurrentDate?: boolean | null;
253
+ defaultToCurrentTime?: boolean | null;
254
+ defaultValueCriteria?: object | null;
255
+ sortBy?: string | null;
256
+ orderBy?: 'asc' | 'desc' | 'ASC' | 'DESC' | null;
257
+ html?: string | null;
258
+ labelPosition?: string | null;
259
+ placeholder?: string | null;
260
+ description?: string | null;
261
+ tooltip?: string | null;
262
+ prefix?: string | null;
263
+ suffix?: string | null;
263
264
  data?: {
264
265
  /**
265
266
  * An array of values required for select options.
266
267
  */
267
- values?: SelectOption[];
268
- };
269
- inputMask?: string;
270
- inputMaskPlaceholderChar?: string;
271
- tableView?: boolean;
272
- mode?: 'default' | 'existingOnly';
273
- displayOption?: 'dropdown' | 'dialogBox' | 'radioButton' | 'checkbox' | 'switch';
274
- rows?: number;
275
- showCharCount?: boolean;
276
- readOnly?: boolean;
277
- isMultiLineText?: boolean;
278
- verticalLayout?: boolean;
279
- input?: boolean;
280
- widget?: string;
268
+ values?: SelectOption[] | null;
269
+ } | null;
270
+ inputMask?: string | null;
271
+ inputMaskPlaceholderChar?: string | null;
272
+ tableView?: boolean | null;
273
+ mode?: 'default' | 'existingOnly' | null;
274
+ displayOption?: 'dropdown' | 'dialogBox' | 'radioButton' | 'checkbox' | 'switch' | null;
275
+ rows?: number | null;
276
+ showCharCount?: boolean | null;
277
+ readOnly?: boolean | null;
278
+ isMultiLineText?: boolean | null;
279
+ verticalLayout?: boolean | null;
280
+ input?: boolean | null;
281
+ widget?: string | null;
281
282
  conditional?: {
282
- json?: JsonLogic;
283
- show?: boolean;
284
- when?: string;
285
- eq?: string | number | boolean;
286
- };
287
- property?: InputParameter;
288
- viewLayout?: ViewLayoutEntityReference;
289
- documentMetadata?: Record<string, string>;
283
+ json?: JsonLogic | null;
284
+ show?: boolean | null;
285
+ when?: string | null;
286
+ eq?: string | number | boolean | null;
287
+ } | null;
288
+ property?: InputParameter | null;
289
+ viewLayout?: ViewLayoutEntityReference | null;
290
+ documentMetadata?: Record<string, string> | null;
290
291
  validate?: {
291
- required?: boolean;
292
- criteria?: object;
293
- operator?: 'any' | 'all';
294
- regexes?: RegexValidation[];
295
- minLength?: number;
296
- maxLength?: number;
297
- minDate?: string;
298
- maxDate?: string;
299
- minTime?: string;
300
- maxTime?: string;
301
- min?: number;
302
- max?: number;
303
- minDocuments?: number;
304
- maxDocuments?: number;
305
- customMessage?: string;
292
+ required?: boolean | null;
293
+ criteria?: object | null;
294
+ operator?: 'any' | 'all' | null;
295
+ regexes?: RegexValidation[] | null;
296
+ minLength?: number | null;
297
+ maxLength?: number | null;
298
+ minDate?: string | null;
299
+ maxDate?: string | null;
300
+ minTime?: string | null;
301
+ maxTime?: string | null;
302
+ min?: number | null;
303
+ max?: number | null;
304
+ minDocuments?: number | null;
305
+ maxDocuments?: number | null;
306
+ customMessage?: string | null;
306
307
  };
307
308
  /**
308
309
  * An array of sub-components to be rendered inside sections.
309
310
  */
310
311
  components?: {
311
312
  key: string;
312
- label?: string;
313
+ label?: string | null;
313
314
  components: ActionInput[];
314
- }[];
315
+ }[] | null;
315
316
  /**
316
317
  * An array of sub-components to be rendered inside columns.
317
318
  */
318
319
  columns?: {
319
320
  width: number;
320
- currentWidth?: number;
321
+ currentWidth?: number | null;
321
322
  components: ActionInput[];
322
- }[];
323
+ }[] | null;
323
324
  };
324
325
  export type ActionRequest = {
325
326
  actionId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evoke-platform/context",
3
- "version": "1.3.0-testing.3",
3
+ "version": "1.3.0-testing.5",
4
4
  "description": "Utilities that provide context to Evoke platform widgets",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",