@skedulo/mex-types 1.3.10 → 1.3.12
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/dist/common/BaseComponentModel.d.ts +3 -0
- package/dist/common/CommonTypes.d.ts +30 -0
- package/dist/common/MexDefs.d.ts +84 -5
- package/dist/common/MexDefs.js +1 -1
- package/dist/common/MexDefs.js.map +1 -1
- package/dist/page/PageComponentModel.d.ts +9 -0
- package/dist/view/FlatPageViewComponentModel.d.ts +269 -2
- package/dist/view/SearchPage.d.ts +12 -0
- package/package.json +2 -1
|
@@ -14,7 +14,13 @@ export type ImageDefinition = {
|
|
|
14
14
|
name: string;
|
|
15
15
|
};
|
|
16
16
|
export type ListPageAddNewDefaultDataType = {
|
|
17
|
+
/**
|
|
18
|
+
* @label Object name
|
|
19
|
+
*/
|
|
17
20
|
objectName: string;
|
|
21
|
+
/**
|
|
22
|
+
* @label Data
|
|
23
|
+
*/
|
|
18
24
|
data: any;
|
|
19
25
|
} & any;
|
|
20
26
|
export type RoutingType = string | RoutingPageDef;
|
|
@@ -33,8 +39,32 @@ export type Routing = {
|
|
|
33
39
|
transferData?: any;
|
|
34
40
|
};
|
|
35
41
|
export interface ButtonGroupItemComponentModel {
|
|
42
|
+
/**
|
|
43
|
+
* @label Text
|
|
44
|
+
*/
|
|
36
45
|
text: LocalizedKey;
|
|
46
|
+
/**
|
|
47
|
+
* @label Theme
|
|
48
|
+
* @typeAdhoc singleselect
|
|
49
|
+
* @options [
|
|
50
|
+
* {label: 'Success', value: 'success'},
|
|
51
|
+
* {label: 'Primary', value: 'primary'},
|
|
52
|
+
* {label: 'Default', value: 'default'}
|
|
53
|
+
* ]
|
|
54
|
+
*/
|
|
37
55
|
theme?: SkedButtonTheme;
|
|
56
|
+
/**
|
|
57
|
+
* @label Behavior
|
|
58
|
+
* @typeAdhoc singleselect
|
|
59
|
+
* @options [
|
|
60
|
+
* {label: 'Custom', value: 'custom'},
|
|
61
|
+
* {label: 'SMS', value: 'sms'},
|
|
62
|
+
* {label: 'Phone', value: 'phone'},
|
|
63
|
+
* {label: 'Open URL', value: 'openUrl'},
|
|
64
|
+
* {label: 'Email', value: 'email'},
|
|
65
|
+
* {label: 'Open Selector', value: 'openSelector'}
|
|
66
|
+
* ]
|
|
67
|
+
*/
|
|
38
68
|
behavior: ButtonBehaviorComponentModel;
|
|
39
69
|
}
|
|
40
70
|
export interface ButtonBehaviorComponentModel {
|
package/dist/common/MexDefs.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare enum DefStatus {
|
|
|
9
9
|
/**
|
|
10
10
|
* Just uploaded, not in use
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
Draft = "Draft",
|
|
13
13
|
/**
|
|
14
14
|
* Build succed
|
|
15
15
|
*/
|
|
@@ -36,10 +36,30 @@ export declare enum DefStatus {
|
|
|
36
36
|
Failed = "Failed"
|
|
37
37
|
}
|
|
38
38
|
type MexBaseMetadata = {
|
|
39
|
+
/**
|
|
40
|
+
* @label Summary
|
|
41
|
+
*/
|
|
39
42
|
summary?: string;
|
|
43
|
+
/**
|
|
44
|
+
* @label Email
|
|
45
|
+
* @hidden true
|
|
46
|
+
*/
|
|
40
47
|
email?: string;
|
|
48
|
+
/**
|
|
49
|
+
* @label Mobile display order
|
|
50
|
+
* @tooltip Please choose a number to determine the display priority of the form within the mobile app. A higher number will result in a lower display position for the form in the mobile app
|
|
51
|
+
* @hidden true
|
|
52
|
+
*/
|
|
41
53
|
displayOrder: number;
|
|
54
|
+
/**
|
|
55
|
+
* @label Attachment destination
|
|
56
|
+
* @placeholder Enter object name
|
|
57
|
+
* @tooltip Provide the name of the object where you intend to store attachments when using the Attachments component in this form
|
|
58
|
+
*/
|
|
42
59
|
hasAttachments?: string[];
|
|
60
|
+
/**
|
|
61
|
+
* @label Static resources
|
|
62
|
+
*/
|
|
43
63
|
staticResourcesId?: string;
|
|
44
64
|
[key: string]: any;
|
|
45
65
|
};
|
|
@@ -47,53 +67,105 @@ type MexBaseMetadata = {
|
|
|
47
67
|
* @area Metadata
|
|
48
68
|
*/
|
|
49
69
|
interface MexMetadataForJob extends MexBaseMetadata {
|
|
70
|
+
/**
|
|
71
|
+
* @label Form type
|
|
72
|
+
* @options [{label: 'Jobs', value: 'Jobs'}, {label: 'Global', value: 'Resources'}]
|
|
73
|
+
* @tooltip A global form will display in the user profile page
|
|
74
|
+
* @dataType singleselect
|
|
75
|
+
* @readonly true
|
|
76
|
+
*/
|
|
50
77
|
contextObject: 'Jobs';
|
|
78
|
+
/**
|
|
79
|
+
* @label ShowIf expression
|
|
80
|
+
*/
|
|
51
81
|
showIf?: string;
|
|
82
|
+
/**
|
|
83
|
+
* @label MandatoryIf
|
|
84
|
+
*/
|
|
52
85
|
mandatoryIf?: string;
|
|
86
|
+
/**
|
|
87
|
+
* @label Mandatory expression
|
|
88
|
+
*/
|
|
53
89
|
mandatoryExpression?: string;
|
|
54
90
|
}
|
|
55
91
|
/**
|
|
56
92
|
* @area Metadata
|
|
57
93
|
*/
|
|
58
94
|
interface MexMetadataForResource extends MexBaseMetadata {
|
|
95
|
+
/**
|
|
96
|
+
* @label Form type
|
|
97
|
+
* @options [{label: 'Jobs', value: 'Jobs'}, {label: 'Global', value: 'Resources'}]
|
|
98
|
+
* @tooltip A global form will display in the user profile page
|
|
99
|
+
* @dataType singleselect
|
|
100
|
+
* @readonly true
|
|
101
|
+
*/
|
|
59
102
|
contextObject: 'Resources';
|
|
60
103
|
}
|
|
61
104
|
export interface MexMetadataFormBuilder extends MexBaseMetadata {
|
|
62
105
|
/**
|
|
63
|
-
* @
|
|
106
|
+
* @label Form type
|
|
107
|
+
* @options [{label: 'Jobs', value: 'Jobs'}, {label: 'Global', value: 'Resources'}]
|
|
108
|
+
* @tooltip A global form will display in the user profile page
|
|
64
109
|
* @dataType singleselect
|
|
110
|
+
* @readonly true
|
|
65
111
|
*/
|
|
66
112
|
contextObject: 'Jobs' | 'Resources';
|
|
67
113
|
}
|
|
68
114
|
export type MexMetadataPayload = MexMetadataForJob | MexMetadataForResource;
|
|
69
115
|
/**
|
|
116
|
+
* @area area
|
|
117
|
+
* @label UID
|
|
118
|
+
* @readonly true
|
|
119
|
+
* @requried true
|
|
120
|
+
* @options [{label: 'UID', value: 'uid'}]
|
|
121
|
+
* @placeholder Please input the value
|
|
122
|
+
* @tooltip Explain more details for this field
|
|
123
|
+
* @hidden true
|
|
124
|
+
* @readonly true
|
|
125
|
+
* @min 0
|
|
126
|
+
* @max 999
|
|
127
|
+
* @minLength 0
|
|
128
|
+
* @maxLength 20
|
|
129
|
+
* @limitItems 10
|
|
130
|
+
* @typeAdhoc singleselect
|
|
131
|
+
*/
|
|
132
|
+
/**
|
|
133
|
+
* MexDef
|
|
70
134
|
* @area MexDef
|
|
71
135
|
* @outputType object
|
|
72
136
|
*/
|
|
73
137
|
export interface MexDef {
|
|
74
138
|
/**
|
|
75
139
|
* Auto generated UID
|
|
140
|
+
* @hidden true
|
|
76
141
|
*/
|
|
77
142
|
uid: string;
|
|
78
143
|
/**
|
|
79
|
-
*
|
|
144
|
+
* @hidden true
|
|
80
145
|
*/
|
|
81
146
|
tenantId: string;
|
|
82
147
|
/**
|
|
83
148
|
* Form definition name
|
|
149
|
+
* @label Form name
|
|
150
|
+
* @minLength 0
|
|
151
|
+
* @maxLength 999
|
|
84
152
|
*/
|
|
85
153
|
name: string;
|
|
86
154
|
/**
|
|
87
155
|
* The definition id, will be generated for the first time.
|
|
88
156
|
* It is used for definition update action
|
|
157
|
+
* @label Form ID
|
|
158
|
+
* @readonly true
|
|
89
159
|
*/
|
|
90
160
|
defId: string;
|
|
91
161
|
/**
|
|
92
162
|
* A long number version value, [defId - version] is unique pair
|
|
163
|
+
* @hidden true
|
|
93
164
|
*/
|
|
94
165
|
version: number;
|
|
95
166
|
/**
|
|
96
167
|
* Semver version of compatible engine version
|
|
168
|
+
* @hidden true
|
|
97
169
|
*/
|
|
98
170
|
engineVersion: string;
|
|
99
171
|
/**
|
|
@@ -107,12 +179,14 @@ export interface MexDef {
|
|
|
107
179
|
/**
|
|
108
180
|
* Similar to formdef, but it stores the formdef value after validating, for example:
|
|
109
181
|
* a customFunctionMetadata should be an aws lambda arn instead of a pure js function
|
|
182
|
+
* @hidden true
|
|
110
183
|
*/
|
|
111
184
|
internalMetadata?: InternalFormDef;
|
|
112
185
|
/**
|
|
113
186
|
* Form definition status
|
|
187
|
+
* @readonly true
|
|
114
188
|
* @options [
|
|
115
|
-
* {label: '
|
|
189
|
+
* {label: 'Draft', value: 'Draft'},
|
|
116
190
|
* {label: 'Validated', value: 'Validated'},
|
|
117
191
|
* {label: 'Installed', value: 'Installed'},
|
|
118
192
|
* {label: 'Deactivated', value: 'Deactivated'},
|
|
@@ -120,31 +194,36 @@ export interface MexDef {
|
|
|
120
194
|
* {label: 'InstallInProgress', value: 'InstallInProgress'},
|
|
121
195
|
* {label: 'Failed', value: 'Failed'}
|
|
122
196
|
* ]
|
|
123
|
-
*
|
|
197
|
+
* @label Status
|
|
124
198
|
* @dataType singleselect
|
|
125
199
|
*/
|
|
126
200
|
status: DefStatus;
|
|
127
201
|
/**
|
|
128
202
|
* Form uploaded timestamp
|
|
129
203
|
* @dataType datetime
|
|
204
|
+
* @hidden true
|
|
130
205
|
*/
|
|
131
206
|
uploadedAt: Date;
|
|
132
207
|
/**
|
|
133
208
|
* Form installed timestamp
|
|
134
209
|
* @dataType datetime
|
|
210
|
+
* @hidden true
|
|
135
211
|
*/
|
|
136
212
|
installedAt?: Date;
|
|
137
213
|
/**
|
|
138
214
|
* Form built timestamp
|
|
139
215
|
* @dataType datetime
|
|
216
|
+
* @hidden true
|
|
140
217
|
*/
|
|
141
218
|
builtAt?: Date;
|
|
142
219
|
/**
|
|
143
220
|
* This form definition has been uploaded by
|
|
221
|
+
* @hidden true
|
|
144
222
|
*/
|
|
145
223
|
uploadedBy: string;
|
|
146
224
|
/**
|
|
147
225
|
* This form definition has been installed by
|
|
226
|
+
* @hidden true
|
|
148
227
|
*/
|
|
149
228
|
installedBy?: string;
|
|
150
229
|
}
|
package/dist/common/MexDefs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MexDefs.js","sourceRoot":"","sources":["../../src/common/MexDefs.ts"],"names":[],"mappings":";AAAA,iDAAiD;;;AAIjD;;;;;GAKG;AACH,IAAY,SA6BX;AA7BD,WAAY,SAAS;IACnB;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"MexDefs.js","sourceRoot":"","sources":["../../src/common/MexDefs.ts"],"names":[],"mappings":";AAAA,iDAAiD;;;AAIjD;;;;;GAKG;AACH,IAAY,SA6BX;AA7BD,WAAY,SAAS;IACnB;;OAEG;IACH,4BAAe,CAAA;IACf;;OAEG;IACH,oCAAuB,CAAA;IACvB;;OAEG;IACH,oCAAuB,CAAA;IACvB;;OAEG;IACH,wCAA2B,CAAA;IAC3B;;OAEG;IACH,gDAAmC,CAAA;IACnC;;OAEG;IACH,oDAAuC,CAAA;IACvC;;OAEG;IACH,8BAAiB,CAAA;AACnB,CAAC,EA7BW,SAAS,yBAAT,SAAS,QA6BpB;AAgOD,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,qCAAiB,CAAA;AACnB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B"}
|
|
@@ -7,7 +7,16 @@ import { ValidatorDefinitionModel } from '../validator/ValidatorModel';
|
|
|
7
7
|
* @area formProperties
|
|
8
8
|
*/
|
|
9
9
|
export type UIDefinition = {
|
|
10
|
+
/**
|
|
11
|
+
* @label First page
|
|
12
|
+
* @placeholder Enter a page name
|
|
13
|
+
* @tooltip Enter the name of the page you want to set as the initial page for the form
|
|
14
|
+
*/
|
|
10
15
|
firstPage: string;
|
|
16
|
+
/**
|
|
17
|
+
* @label Readonly
|
|
18
|
+
* @tooltip If true, the entire form will be shown in read-only mode within the mobile app
|
|
19
|
+
*/
|
|
11
20
|
readonly?: boolean;
|
|
12
21
|
pages: AllPageComponentModel[];
|
|
13
22
|
};
|
|
@@ -3,41 +3,89 @@ import { ButtonGroupItemComponentModel, DataExpressionType, FunctionExpressionTy
|
|
|
3
3
|
import { SelectPageOnlineSource, SelectPageSearchBarConfig } from './SearchPage';
|
|
4
4
|
import { ValidatorDefinitionModel } from '../validator/ValidatorModel';
|
|
5
5
|
export interface BaseFlatPageViewComponentModel extends BaseComponentModel {
|
|
6
|
+
/**
|
|
7
|
+
* @label Show if expression
|
|
8
|
+
* @placeholder Enter expression
|
|
9
|
+
*/
|
|
6
10
|
showIfExpression: DataExpressionType;
|
|
7
11
|
}
|
|
8
12
|
export type KeyboardType = 'default' | 'email-address' | 'numeric' | 'phone-pad' | 'number-pad' | 'decimal-pad';
|
|
9
13
|
export interface CommonEditorViewComponentModel extends BaseFlatPageViewComponentModel {
|
|
14
|
+
/**
|
|
15
|
+
* @label Title
|
|
16
|
+
*/
|
|
10
17
|
title: LocalizedKey;
|
|
18
|
+
/**
|
|
19
|
+
* @label Validator
|
|
20
|
+
* @typeAdhoc BaseValidatorModel
|
|
21
|
+
*/
|
|
11
22
|
validator?: ValidatorDefinitionModel;
|
|
12
23
|
/**
|
|
13
|
-
* @
|
|
24
|
+
* @label Mandatory
|
|
25
|
+
* @typeAdhoc boolean
|
|
14
26
|
*/
|
|
15
27
|
mandatory?: boolean | DataExpressionType;
|
|
16
28
|
/**
|
|
17
|
-
* @
|
|
29
|
+
* @label Readonly
|
|
30
|
+
* @typeAdhoc boolean
|
|
18
31
|
*/
|
|
19
32
|
readonly?: boolean | DataExpressionType;
|
|
33
|
+
/**
|
|
34
|
+
* @label Editor events
|
|
35
|
+
*/
|
|
20
36
|
editorEvents?: CommonEditorEvents;
|
|
21
37
|
}
|
|
22
38
|
export interface CommonEditorEvents {
|
|
39
|
+
/**
|
|
40
|
+
* @label On value changed
|
|
41
|
+
* @placeholder Enter expression
|
|
42
|
+
*/
|
|
23
43
|
onValueChanged?: FunctionExpressionType;
|
|
24
44
|
}
|
|
25
45
|
export interface CommonEditorWithPlaceholder {
|
|
46
|
+
/**
|
|
47
|
+
* @label Placeholder
|
|
48
|
+
*/
|
|
26
49
|
placeholder: LocalizedKey;
|
|
27
50
|
}
|
|
28
51
|
/**
|
|
29
52
|
* @area Components
|
|
30
53
|
*/
|
|
31
54
|
export interface TextEditorViewComponentModel extends CommonEditorViewComponentModel, CommonEditorWithPlaceholder {
|
|
55
|
+
/**
|
|
56
|
+
* TODO: need no enhance to remove typeAdhoc
|
|
57
|
+
* @label Keyboard type
|
|
58
|
+
* @typeAdhoc singleselect
|
|
59
|
+
* @options [
|
|
60
|
+
* {label: 'Default', value: 'default'},
|
|
61
|
+
* {label: 'Email address', value: 'email-address'},
|
|
62
|
+
* {label: 'Numeric', value: 'numeric'},
|
|
63
|
+
* {label: 'Phone pad', value: 'phone-pad'},
|
|
64
|
+
* {label: 'Number pad', value: 'number-pad'},
|
|
65
|
+
* {label: 'Decimal pad', value: 'decimal-pad'}
|
|
66
|
+
* ]
|
|
67
|
+
*/
|
|
32
68
|
keyboardType?: KeyboardType;
|
|
69
|
+
/**
|
|
70
|
+
* @label Value expression
|
|
71
|
+
*/
|
|
33
72
|
valueExpression: DataExpressionType;
|
|
73
|
+
/**
|
|
74
|
+
* @label Editable
|
|
75
|
+
*/
|
|
34
76
|
editable?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* @label Multiline
|
|
79
|
+
*/
|
|
35
80
|
multiline?: boolean;
|
|
36
81
|
}
|
|
37
82
|
/**
|
|
38
83
|
* @area Components
|
|
39
84
|
*/
|
|
40
85
|
export interface ReadonlyTextViewComponentModel extends CommonEditorViewComponentModel, CommonEditorWithPlaceholder {
|
|
86
|
+
/**
|
|
87
|
+
* @label Text
|
|
88
|
+
*/
|
|
41
89
|
text: LocalizedKey;
|
|
42
90
|
}
|
|
43
91
|
export type SkedButtonTheme = 'success' | 'primary' | 'default';
|
|
@@ -51,63 +99,160 @@ export interface ButtonGroupViewComponentModel extends BaseFlatPageViewComponent
|
|
|
51
99
|
* @area Components
|
|
52
100
|
*/
|
|
53
101
|
export interface SubListEditorViewComponentModel extends CommonEditorViewComponentModel {
|
|
102
|
+
/**
|
|
103
|
+
* @label Add New button
|
|
104
|
+
*/
|
|
54
105
|
addNew: {
|
|
106
|
+
/**
|
|
107
|
+
* @label Text
|
|
108
|
+
*/
|
|
55
109
|
text: string;
|
|
110
|
+
/**
|
|
111
|
+
* @label Destination page
|
|
112
|
+
*/
|
|
56
113
|
destinationPage: string;
|
|
114
|
+
/**
|
|
115
|
+
* @label Default data
|
|
116
|
+
*/
|
|
57
117
|
defaultData: ListPageAddNewDefaultDataType;
|
|
58
118
|
};
|
|
119
|
+
/**
|
|
120
|
+
* @label Source expression
|
|
121
|
+
*/
|
|
59
122
|
sourceExpression: DataExpressionType;
|
|
123
|
+
/**
|
|
124
|
+
* @label Empty text
|
|
125
|
+
*/
|
|
60
126
|
emptyText: LocalizedKey;
|
|
127
|
+
/**
|
|
128
|
+
* @label Item layout
|
|
129
|
+
*/
|
|
61
130
|
itemLayout: BaseSublistViewComponentModel;
|
|
131
|
+
/**
|
|
132
|
+
* TODO: handle for remove typeAdhoc for union type
|
|
133
|
+
* @label Item click destination
|
|
134
|
+
* @typeAdhoc string
|
|
135
|
+
*/
|
|
62
136
|
itemClickDestination: RoutingType;
|
|
63
137
|
}
|
|
64
138
|
/**
|
|
65
139
|
* @area Components
|
|
66
140
|
*/
|
|
67
141
|
export interface AttachmentsEditorViewComponentModel extends CommonEditorViewComponentModel {
|
|
142
|
+
/**
|
|
143
|
+
* @label Source expression
|
|
144
|
+
*/
|
|
68
145
|
sourceExpression: DataExpressionType;
|
|
146
|
+
/**
|
|
147
|
+
* @label Title
|
|
148
|
+
*/
|
|
69
149
|
title: LocalizedKey;
|
|
150
|
+
/**
|
|
151
|
+
* @label Attachment category name
|
|
152
|
+
*/
|
|
70
153
|
attachmentCategoryName: string;
|
|
71
154
|
}
|
|
72
155
|
/**
|
|
73
156
|
* @area Components
|
|
74
157
|
*/
|
|
75
158
|
export interface BodyMapViewComponentModel extends CommonEditorViewComponentModel {
|
|
159
|
+
/**
|
|
160
|
+
* @label Source expression
|
|
161
|
+
*/
|
|
76
162
|
sourceExpression: DataExpressionType;
|
|
163
|
+
/**
|
|
164
|
+
* @label Attachment category name
|
|
165
|
+
*/
|
|
77
166
|
attachmentCategoryName: string;
|
|
78
167
|
}
|
|
79
168
|
/**
|
|
80
169
|
* @area Components
|
|
81
170
|
*/
|
|
82
171
|
export interface SignatureEditorViewComponentModel extends CommonEditorViewComponentModel {
|
|
172
|
+
/**
|
|
173
|
+
* @label Source expression
|
|
174
|
+
*/
|
|
83
175
|
sourceExpression: DataExpressionType;
|
|
176
|
+
/**
|
|
177
|
+
* @label Title
|
|
178
|
+
*/
|
|
84
179
|
title: LocalizedKey;
|
|
180
|
+
/**
|
|
181
|
+
* @label Attachment category name
|
|
182
|
+
*/
|
|
85
183
|
attachmentCategoryName: string;
|
|
184
|
+
/**
|
|
185
|
+
* @label Enable full name
|
|
186
|
+
*/
|
|
86
187
|
enableFullName: true;
|
|
87
188
|
}
|
|
88
189
|
/**
|
|
89
190
|
* @area Components
|
|
90
191
|
*/
|
|
91
192
|
export interface ToggleEditorViewComponentModel extends CommonEditorViewComponentModel {
|
|
193
|
+
/**
|
|
194
|
+
* @label Title
|
|
195
|
+
*/
|
|
92
196
|
title: LocalizedKey;
|
|
197
|
+
/**
|
|
198
|
+
* TODO: Remove typeAdhoc for union type, and dynamic form need to support Array of object
|
|
199
|
+
* @label Validator
|
|
200
|
+
* @typeAdhoc BaseValidatorModel
|
|
201
|
+
*/
|
|
93
202
|
validator: ValidatorDefinitionModel;
|
|
203
|
+
/**
|
|
204
|
+
* @label Items
|
|
205
|
+
*/
|
|
94
206
|
items: ToggleEditorItemModel[];
|
|
207
|
+
/**
|
|
208
|
+
* @label Mode
|
|
209
|
+
*/
|
|
95
210
|
mode: 'radio' | 'checkbox' | 'switch';
|
|
96
211
|
}
|
|
97
212
|
export interface ToggleEditorItemModel {
|
|
213
|
+
/**
|
|
214
|
+
* @label Value expression
|
|
215
|
+
*/
|
|
98
216
|
valueExpression: DataExpressionType;
|
|
217
|
+
/**
|
|
218
|
+
* @label On Value
|
|
219
|
+
*/
|
|
99
220
|
onValue: any;
|
|
221
|
+
/**
|
|
222
|
+
* @label Off Value
|
|
223
|
+
*/
|
|
100
224
|
offValue: any;
|
|
225
|
+
/**
|
|
226
|
+
* @label Text
|
|
227
|
+
*/
|
|
101
228
|
text: LocalizedKey;
|
|
102
229
|
}
|
|
103
230
|
/**
|
|
104
231
|
* @area Components
|
|
105
232
|
*/
|
|
106
233
|
export interface DateTimePickerViewComponentModel extends CommonEditorViewComponentModel, CommonEditorWithPlaceholder {
|
|
234
|
+
/**
|
|
235
|
+
* @label Mode
|
|
236
|
+
* @typeAdhoc singleselect
|
|
237
|
+
* @options [
|
|
238
|
+
* {label: 'Date and time', value: 'datetime'},
|
|
239
|
+
* {label: 'Date', value: 'date'},
|
|
240
|
+
* {label: 'Time', value: 'time'}
|
|
241
|
+
* ]
|
|
242
|
+
*/
|
|
107
243
|
mode: 'datetime' | 'date' | 'time';
|
|
244
|
+
/**
|
|
245
|
+
* @label Date time options
|
|
246
|
+
*/
|
|
108
247
|
datetimeOptions?: {
|
|
248
|
+
/**
|
|
249
|
+
* @label Timezone
|
|
250
|
+
*/
|
|
109
251
|
timezone?: TimezoneType;
|
|
110
252
|
};
|
|
253
|
+
/**
|
|
254
|
+
* @label Value expression
|
|
255
|
+
*/
|
|
111
256
|
valueExpression: DataExpressionType;
|
|
112
257
|
}
|
|
113
258
|
export interface BaseSublistViewComponentModel extends BaseComponentModel {
|
|
@@ -116,9 +261,21 @@ export interface BaseSublistViewComponentModel extends BaseComponentModel {
|
|
|
116
261
|
* @area Components
|
|
117
262
|
*/
|
|
118
263
|
export interface SectionViewComponentModel extends BaseFlatPageViewComponentModel {
|
|
264
|
+
/**
|
|
265
|
+
* @label Title
|
|
266
|
+
*/
|
|
119
267
|
title: LocalizedKey;
|
|
268
|
+
/**
|
|
269
|
+
* @label Body
|
|
270
|
+
*/
|
|
120
271
|
body: LocalizedKey;
|
|
272
|
+
/**
|
|
273
|
+
* @label Caption
|
|
274
|
+
*/
|
|
121
275
|
caption: LocalizedKey;
|
|
276
|
+
/**
|
|
277
|
+
* @label items
|
|
278
|
+
*/
|
|
122
279
|
items: BaseFlatPageViewComponentModel[];
|
|
123
280
|
}
|
|
124
281
|
/**
|
|
@@ -128,22 +285,69 @@ export interface MenuListViewComponentModel extends BaseFlatPageViewComponentMod
|
|
|
128
285
|
items: MenuListItem[];
|
|
129
286
|
}
|
|
130
287
|
export interface MenuListItem extends BaseFlatPageViewComponentModel {
|
|
288
|
+
/**
|
|
289
|
+
* @label Text
|
|
290
|
+
*/
|
|
131
291
|
text: LocalizedKey;
|
|
292
|
+
/**
|
|
293
|
+
* @label Caption
|
|
294
|
+
*/
|
|
132
295
|
caption: LocalizedKey;
|
|
296
|
+
/**
|
|
297
|
+
* TODO: Remove typeAdhoc for union type
|
|
298
|
+
* @label Item click destination
|
|
299
|
+
* @typeAdhoc string
|
|
300
|
+
*/
|
|
133
301
|
itemClickDestination: RoutingType;
|
|
302
|
+
/**
|
|
303
|
+
* @label Badge Text
|
|
304
|
+
*/
|
|
134
305
|
badgeText: LocalizedKey;
|
|
135
306
|
}
|
|
136
307
|
export interface BaseSelectEditor {
|
|
308
|
+
/**
|
|
309
|
+
* @label Structure expression
|
|
310
|
+
*/
|
|
137
311
|
structureExpression: DataExpressionType;
|
|
312
|
+
/**
|
|
313
|
+
* @label Source expression
|
|
314
|
+
*/
|
|
138
315
|
sourceExpression: DataExpressionType;
|
|
316
|
+
/**
|
|
317
|
+
* @label Display expression
|
|
318
|
+
*/
|
|
139
319
|
displayExpression: DataExpressionType;
|
|
320
|
+
/**
|
|
321
|
+
* @label Filter expression
|
|
322
|
+
*/
|
|
140
323
|
filterExpression: DataExpressionType;
|
|
324
|
+
/**
|
|
325
|
+
* @label Online source
|
|
326
|
+
*/
|
|
141
327
|
onlineSource?: SelectPageOnlineSource;
|
|
328
|
+
/**
|
|
329
|
+
* @label Select page
|
|
330
|
+
*/
|
|
142
331
|
selectPage: {
|
|
332
|
+
/**
|
|
333
|
+
* @label Item title
|
|
334
|
+
*/
|
|
143
335
|
itemTitle: LocalizedKey;
|
|
336
|
+
/**
|
|
337
|
+
* @label Item caption
|
|
338
|
+
*/
|
|
144
339
|
itemCaption: LocalizedKey;
|
|
340
|
+
/**
|
|
341
|
+
* @label Empty text
|
|
342
|
+
*/
|
|
145
343
|
emptyText: LocalizedKey;
|
|
344
|
+
/**
|
|
345
|
+
* @label Title
|
|
346
|
+
*/
|
|
146
347
|
title: LocalizedKey;
|
|
348
|
+
/**
|
|
349
|
+
* @label searchBar
|
|
350
|
+
*/
|
|
147
351
|
searchBar: SelectPageSearchBarConfig;
|
|
148
352
|
};
|
|
149
353
|
}
|
|
@@ -151,9 +355,23 @@ export interface BaseSelectEditor {
|
|
|
151
355
|
* @area Components
|
|
152
356
|
*/
|
|
153
357
|
export interface SelectEditorViewComponentModel extends CommonEditorViewComponentModel, CommonEditorWithPlaceholder, BaseSelectEditor {
|
|
358
|
+
/**
|
|
359
|
+
* @label Caption
|
|
360
|
+
*/
|
|
154
361
|
caption: LocalizedKey;
|
|
362
|
+
/**
|
|
363
|
+
* @label Value expression
|
|
364
|
+
*/
|
|
155
365
|
valueExpression: DataExpressionType;
|
|
366
|
+
/**
|
|
367
|
+
* TODO: Remove typeAdhoc for union type, and dynamic form need to support Array of object
|
|
368
|
+
* @label Validator
|
|
369
|
+
* @typeAdhoc BaseValidatorModel
|
|
370
|
+
*/
|
|
156
371
|
validator: ValidatorDefinitionModel;
|
|
372
|
+
/**
|
|
373
|
+
* @label Construct result object
|
|
374
|
+
*/
|
|
157
375
|
constructResultObject?: ConstructResultObject;
|
|
158
376
|
}
|
|
159
377
|
/**
|
|
@@ -162,34 +380,83 @@ export interface SelectEditorViewComponentModel extends CommonEditorViewComponen
|
|
|
162
380
|
export interface MultiSelectEditorViewComponentModel extends CommonEditorViewComponentModel, CommonEditorWithPlaceholder, BaseSelectEditor {
|
|
163
381
|
displayDataInSearchPageExpression: DataExpressionType;
|
|
164
382
|
constructResultObject: ConstructResultObject;
|
|
383
|
+
/**
|
|
384
|
+
* TODO: Remove typeAdhoc for union type, and dynamic form need to support Array of object
|
|
385
|
+
* @label Validator
|
|
386
|
+
* @typeAdhoc BaseValidatorModel
|
|
387
|
+
*/
|
|
165
388
|
validator: ValidatorDefinitionModel;
|
|
166
389
|
}
|
|
167
390
|
export interface ConstructResultObject {
|
|
391
|
+
/**
|
|
392
|
+
* @label Data
|
|
393
|
+
*/
|
|
168
394
|
data: OneLevelBindingObject;
|
|
395
|
+
/**
|
|
396
|
+
* @label Object name
|
|
397
|
+
*/
|
|
169
398
|
objectName: string;
|
|
399
|
+
/**
|
|
400
|
+
* @label Compare property
|
|
401
|
+
*/
|
|
170
402
|
compareProperty: string;
|
|
171
403
|
}
|
|
172
404
|
/**
|
|
173
405
|
* @area Components
|
|
174
406
|
*/
|
|
175
407
|
export interface ContactDetailsLayoutComponentModel extends BaseFlatPageViewComponentModel {
|
|
408
|
+
/**
|
|
409
|
+
* @label Title
|
|
410
|
+
*/
|
|
176
411
|
title: LocalizedKey;
|
|
412
|
+
/**
|
|
413
|
+
* @label Caption
|
|
414
|
+
*/
|
|
177
415
|
caption: LocalizedKey;
|
|
416
|
+
/**
|
|
417
|
+
* TODO: Remove typeAdhoc for union type
|
|
418
|
+
* @label Contact methods
|
|
419
|
+
* @typeAdhoc any
|
|
420
|
+
*/
|
|
178
421
|
contactMethods: [ContactPhoneMethodModel | ContactSmsMethodModel];
|
|
422
|
+
/**
|
|
423
|
+
* @label Profile image
|
|
424
|
+
*/
|
|
179
425
|
profileImage: {
|
|
426
|
+
/**
|
|
427
|
+
* @label Name expression
|
|
428
|
+
*/
|
|
180
429
|
nameExpression: DataExpressionType;
|
|
430
|
+
/**
|
|
431
|
+
* @label Url expression
|
|
432
|
+
*/
|
|
181
433
|
urlExpression: DataExpressionType;
|
|
182
434
|
};
|
|
183
435
|
}
|
|
184
436
|
export interface ContactMethodModel {
|
|
437
|
+
/**
|
|
438
|
+
* @label Type
|
|
439
|
+
*/
|
|
185
440
|
type: ContactMethodType;
|
|
186
441
|
}
|
|
187
442
|
export type ContactMethodType = 'phone' | 'sms';
|
|
188
443
|
export interface ContactPhoneMethodModel extends ContactMethodModel {
|
|
444
|
+
/**
|
|
445
|
+
* @label Type
|
|
446
|
+
*/
|
|
189
447
|
type: 'phone';
|
|
448
|
+
/**
|
|
449
|
+
* @label Phone number expression
|
|
450
|
+
*/
|
|
190
451
|
phoneNumberExpression: DataExpressionType;
|
|
191
452
|
}
|
|
192
453
|
export interface ContactSmsMethodModel extends ContactMethodModel {
|
|
454
|
+
/**
|
|
455
|
+
* @label Type
|
|
456
|
+
*/
|
|
193
457
|
type: 'sms';
|
|
458
|
+
/**
|
|
459
|
+
* @label Phone number expression
|
|
460
|
+
*/
|
|
194
461
|
phoneNumberExpression: DataExpressionType;
|
|
195
462
|
}
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { DataExpressionType, LocalizedKey, OneLevelBindingObject } from '../common/CommonTypes';
|
|
2
2
|
export type SelectPageOnlineSource = {
|
|
3
|
+
/**
|
|
4
|
+
* @label Key
|
|
5
|
+
*/
|
|
3
6
|
key: DataExpressionType;
|
|
7
|
+
/**
|
|
8
|
+
* @label Variables
|
|
9
|
+
*/
|
|
4
10
|
variables: OneLevelBindingObject;
|
|
5
11
|
};
|
|
6
12
|
export type SelectPageSearchBarConfig = {
|
|
13
|
+
/**
|
|
14
|
+
* @label Filter on properties
|
|
15
|
+
*/
|
|
7
16
|
filterOnProperties: string[];
|
|
17
|
+
/**
|
|
18
|
+
* @label Placeholder
|
|
19
|
+
*/
|
|
8
20
|
placeholder: LocalizedKey;
|
|
9
21
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skedulo/mex-types",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.12",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": "18"
|
|
6
6
|
},
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"run-parser": "ts-node-dev --transpile-only scripts/type-defs-parser.ts",
|
|
19
19
|
"run-references-resolver": "ts-node-dev scripts/references-resolver.ts",
|
|
20
20
|
"run-transform": "ts-node-dev scripts/transform.ts",
|
|
21
|
+
"build-json": "yarn run-parser && yarn run-references-resolver && yarn run-transform",
|
|
21
22
|
"get-semver": "ts-node-dev scripts/get-semver.ts",
|
|
22
23
|
"save-parser": "ts-node-dev scripts/save-parser-to-backend.ts"
|
|
23
24
|
},
|