@byted-apaas/server-sdk-node 1.0.17 → 1.1.0-beta.11
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/README.md +11 -0
- package/application/application.d.ts +9 -7
- package/application/function/function.d.ts +1 -1
- package/application/function/function.js +0 -1
- package/application/impl/common.d.ts +1 -1
- package/application/impl/common.js +13 -12
- package/application/impl/impl.d.ts +8 -6
- package/application/impl/impl.js +6 -4
- package/common/structs.d.ts +15 -0
- package/common/structs.js +21 -0
- package/constants/constants.js +4 -4
- package/context/context.d.ts +8 -38
- package/context/context.js +2 -2
- package/context/db/db.d.ts +11 -19
- package/context/db/impl/IObject.d.ts +41 -40
- package/context/db/impl/db.d.ts +9 -9
- package/context/db/impl/db.js +6 -6
- package/context/db/impl/object.d.ts +4 -3
- package/context/db/impl/object.js +62 -50
- package/context/db/impl/oql/oql.d.ts +1 -1
- package/context/db/impl/oql/oql.js +1 -1
- package/context/db/impl/order.js +1 -1
- package/context/db/impl/propertiesStore.js +1 -1
- package/context/db/impl/transaction/index.d.ts +1 -1
- package/context/db/impl/transaction/index.js +51 -46
- package/context/db/impl/transaction.d.ts +0 -5
- package/context/integration/IIntegration.d.ts +30 -0
- package/context/integration/IIntegration.js +4 -0
- package/context/integration/impl/integration.d.ts +16 -0
- package/context/integration/impl/integration.js +62 -0
- package/context/metadata/components/common.js +3 -3
- package/context/metadata/components/components.d.ts +4 -4
- package/context/metadata/components/desktop/list.d.ts +3 -3
- package/context/metadata/components/desktop/list.js +23 -23
- package/context/metadata/components/desktop/recordDetail.d.ts +2 -2
- package/context/metadata/components/mobile/list.d.ts +4 -4
- package/context/metadata/components/mobile/list.js +1 -1
- package/context/metadata/metadata.d.ts +5 -6
- package/context/metadata/metadata.js +5 -6
- package/context/metadata/objects/fields.d.ts +6 -6
- package/context/metadata/objects/fields.js +57 -57
- package/context/metadata/objects/fields.util.d.ts +3 -3
- package/context/metadata/objects/fields.util.js +21 -21
- package/context/metadata/objects/objects.d.ts +1 -1
- package/context/metadata/objects/objects.js +1 -1
- package/context/metadata/types/components.d.ts +5 -5
- package/context/metadata/types/objects.d.ts +88 -88
- package/context/msg/msg.d.ts +2 -2
- package/context/resources/IResources.d.ts +6 -4
- package/context/resources/impl/resources.d.ts +6 -6
- package/context/resources/impl/resources.js +5 -5
- package/context/tasks/tasks.d.ts +3 -3
- package/context/tasks/tasks.js +5 -5
- package/data/index.d.ts +2 -2
- package/global/application/flow/flow.d.ts +85 -0
- package/global/application/flow/flow.js +2 -0
- package/global/application/globalVar/globalVar.d.ts +7 -0
- package/global/application/globalVar/globalVar.js +2 -0
- package/global/global.d.ts +64 -0
- package/global/global.js +3 -0
- package/hooks/api.d.ts +12 -7
- package/hooks/api.js +28 -23
- package/hooks/hooks.js +41 -0
- package/kunlun/kunlun.d.ts +5 -5
- package/kunlun/operator/IOperator.d.ts +16 -16
- package/kunlun/operator/impl/expression.d.ts +2 -2
- package/kunlun/operator/impl/expression.js +5 -5
- package/kunlun/operator/impl/logic.js +48 -31
- package/kunlun/operator/impl/logicV2.d.ts +2 -2
- package/kunlun/operator/impl/logicV2.js +12 -13
- package/kunlun/operator/impl/operator.d.ts +17 -17
- package/kunlun/operator/impl/operator.js +38 -38
- package/kunlun/operator/impl/operatorV2.d.ts +17 -17
- package/kunlun/operator/impl/operatorV2.js +38 -38
- package/lib/core.d.ts +3 -3
- package/package.json +2 -2
- package/request/common.d.ts +1 -1
- package/request/common.js +4 -3
- package/request/constants.d.ts +1 -1
- package/request/constants.js +6 -6
- package/request/faasinfra.d.ts +1 -1
- package/request/faasinfra.js +41 -253
- package/request/innerapi.d.ts +14 -10
- package/request/innerapi.js +220 -66
- package/request/interface.d.ts +68 -54
- package/request/interface.js +8 -9
- package/request/openapi.d.ts +15 -11
- package/request/openapi.js +266 -158
|
@@ -16,8 +16,8 @@ class KText extends MetadataField {
|
|
|
16
16
|
if (!field) {
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
|
-
super(
|
|
20
|
-
this.required = field
|
|
19
|
+
super('text', field);
|
|
20
|
+
this.required = field.required;
|
|
21
21
|
this.unique = fieldsUtil.getUnique(field);
|
|
22
22
|
this.caseSensitive = fieldsUtil.getCaseSensitive(field);
|
|
23
23
|
this.multiline = fieldsUtil.getMultiline(field);
|
|
@@ -32,7 +32,7 @@ class RichText extends MetadataField {
|
|
|
32
32
|
if (!field) {
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
super(
|
|
35
|
+
super('richText', field);
|
|
36
36
|
this.maxLength = fieldsUtil.getMaxLength(field);
|
|
37
37
|
this.required = field.required;
|
|
38
38
|
}
|
|
@@ -43,7 +43,7 @@ class Multilingual extends MetadataField {
|
|
|
43
43
|
if (!field) {
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
super(
|
|
46
|
+
super('multilingual', field);
|
|
47
47
|
this.required = field.required;
|
|
48
48
|
this.unique = fieldsUtil.getUnique(field);
|
|
49
49
|
this.caseSensitive = fieldsUtil.getCaseSensitive(field);
|
|
@@ -57,7 +57,7 @@ class Number extends MetadataField {
|
|
|
57
57
|
if (!field) {
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
|
-
super(
|
|
60
|
+
super('number', field);
|
|
61
61
|
this.required = field.required;
|
|
62
62
|
this.unique = fieldsUtil.getUnique(field);
|
|
63
63
|
this.displayAsPercentage = fieldsUtil.getDisplayAsPercentage(field);
|
|
@@ -70,7 +70,7 @@ class KDate extends MetadataField {
|
|
|
70
70
|
if (!field) {
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
|
-
super(
|
|
73
|
+
super('date', field);
|
|
74
74
|
this.required = field.required;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -80,7 +80,7 @@ class DateTime extends MetadataField {
|
|
|
80
80
|
if (!field) {
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
-
super(
|
|
83
|
+
super('dateTime', field);
|
|
84
84
|
this.required = field.required;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -90,7 +90,7 @@ class Option extends MetadataField {
|
|
|
90
90
|
if (!field) {
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
93
|
-
super(
|
|
93
|
+
super('option', field);
|
|
94
94
|
this.required = field.required;
|
|
95
95
|
this.multiple = fieldsUtil.getMultiple(field);
|
|
96
96
|
this.optionSource = fieldsUtil.getOptionSource(field);
|
|
@@ -104,7 +104,7 @@ class Email extends MetadataField {
|
|
|
104
104
|
if (!field) {
|
|
105
105
|
return;
|
|
106
106
|
}
|
|
107
|
-
super(
|
|
107
|
+
super('email', field);
|
|
108
108
|
this.required = field.required;
|
|
109
109
|
this.unique = fieldsUtil.getUnique(field);
|
|
110
110
|
}
|
|
@@ -115,7 +115,7 @@ class MobileNumber extends MetadataField {
|
|
|
115
115
|
if (!field) {
|
|
116
116
|
return;
|
|
117
117
|
}
|
|
118
|
-
super(
|
|
118
|
+
super('mobileNumber', field);
|
|
119
119
|
this.required = field.required;
|
|
120
120
|
this.unique = fieldsUtil.getUnique(field);
|
|
121
121
|
}
|
|
@@ -126,7 +126,7 @@ class Boolean extends MetadataField {
|
|
|
126
126
|
if (!field) {
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
|
-
super(
|
|
129
|
+
super('boolean', field);
|
|
130
130
|
this.unique = fieldsUtil.getUnique(field);
|
|
131
131
|
this.descriptionWhenTrue = fieldsUtil.getDescriptionWhenTrue(field);
|
|
132
132
|
this.descriptionWhenFalse = fieldsUtil.getDescriptionWhenFalse(field);
|
|
@@ -139,7 +139,7 @@ class AvatarOrLogo extends MetadataField {
|
|
|
139
139
|
if (!field) {
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
142
|
-
super(
|
|
142
|
+
super('avatarOrLogo', field);
|
|
143
143
|
this.displayStyle = fieldsUtil.getDisplayStyle(field);
|
|
144
144
|
}
|
|
145
145
|
}
|
|
@@ -149,7 +149,7 @@ class Lookup extends MetadataField {
|
|
|
149
149
|
if (!field) {
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
|
-
super(
|
|
152
|
+
super('lookup', field);
|
|
153
153
|
this.required = field.required;
|
|
154
154
|
this.multiple = fieldsUtil.getMultiple(field);
|
|
155
155
|
this.objectApiName = fieldsUtil.getLookupRefObjectApiName(field);
|
|
@@ -166,7 +166,7 @@ class Formula extends MetadataField {
|
|
|
166
166
|
if (!field) {
|
|
167
167
|
return;
|
|
168
168
|
}
|
|
169
|
-
super(
|
|
169
|
+
super('formula', field);
|
|
170
170
|
this.returnType = fieldsUtil.getReturnType(field);
|
|
171
171
|
// TODO 由于下游提供仍是 api ID 版本,因此禁用
|
|
172
172
|
this.formula = null; //fieldsUtil.getFormula(field);
|
|
@@ -178,7 +178,7 @@ class AutoID extends MetadataField {
|
|
|
178
178
|
if (!field) {
|
|
179
179
|
return;
|
|
180
180
|
}
|
|
181
|
-
super(
|
|
181
|
+
super('autoId', field);
|
|
182
182
|
this.generateMethod = fieldsUtil.getGenerateMethod(field);
|
|
183
183
|
this.digitsNumber = fieldsUtil.getDigitsNumber(field);
|
|
184
184
|
this.prefix = fieldsUtil.getPrefix(field);
|
|
@@ -191,7 +191,7 @@ class ReferenceField extends MetadataField {
|
|
|
191
191
|
if (!field) {
|
|
192
192
|
return;
|
|
193
193
|
}
|
|
194
|
-
super(
|
|
194
|
+
super('referenceField', field);
|
|
195
195
|
// TODO: check objectApiName to guideFieldApiName
|
|
196
196
|
this.guideFieldApiName = fieldsUtil.getReferenceObjectApiName(field);
|
|
197
197
|
this.fieldApiName = fieldsUtil.getReferenceFieldApiName(field);
|
|
@@ -203,7 +203,7 @@ class File extends MetadataField {
|
|
|
203
203
|
if (!field) {
|
|
204
204
|
return;
|
|
205
205
|
}
|
|
206
|
-
super(
|
|
206
|
+
super('file', field);
|
|
207
207
|
this.required = field.required;
|
|
208
208
|
this.multiple = fieldsUtil.getFileMultiple(field);
|
|
209
209
|
this.fileTypes = fieldsUtil.getFileTypes(field);
|
|
@@ -217,7 +217,7 @@ class BackLookup extends MetadataField {
|
|
|
217
217
|
if (!field) {
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
|
-
super(
|
|
220
|
+
super('backLookup', field);
|
|
221
221
|
// TODO 由于下游提供仍是 api ID 版本,因此禁用
|
|
222
222
|
// this.objectApiName = fieldsUtil.getBackLookupObjectApiName(field);
|
|
223
223
|
// this.fieldApiName = fieldsUtil.getBackLookupFieldApiName(field); // TODO metadata返回值为空
|
|
@@ -229,7 +229,7 @@ class CompositeType extends MetadataField {
|
|
|
229
229
|
if (!field) {
|
|
230
230
|
return;
|
|
231
231
|
}
|
|
232
|
-
super(
|
|
232
|
+
super('compositeType', field);
|
|
233
233
|
this.required = field.required;
|
|
234
234
|
this.multiple = fieldsUtil.getSettingsMultiple(field);
|
|
235
235
|
this.compositeTypeApiName = fieldsUtil.getCompositeTypeApiName(field);
|
|
@@ -243,7 +243,7 @@ class ExtractSingleRecord extends MetadataField {
|
|
|
243
243
|
if (!field) {
|
|
244
244
|
return;
|
|
245
245
|
}
|
|
246
|
-
super(
|
|
246
|
+
super('extractSingleRecord', field);
|
|
247
247
|
this.compositeTypeApiName = fieldsUtil.getCompositeTypeApiName(field);
|
|
248
248
|
// TODO 字段类型转换
|
|
249
249
|
this.subFields = parseFields(fieldsUtil.getCompositeTypeSubFields(field));
|
|
@@ -284,7 +284,7 @@ function parseField(field) {
|
|
|
284
284
|
exports.parseField = parseField;
|
|
285
285
|
function getFieldClass(field) {
|
|
286
286
|
if (field && field.type && field.type.name) {
|
|
287
|
-
if (field.type.name ===
|
|
287
|
+
if (field.type.name === 'compositeType') {
|
|
288
288
|
return getCompositeTypeClass(field);
|
|
289
289
|
}
|
|
290
290
|
return type2fieldType[field.type.name];
|
|
@@ -293,42 +293,42 @@ function getFieldClass(field) {
|
|
|
293
293
|
}
|
|
294
294
|
exports.getFieldClass = getFieldClass;
|
|
295
295
|
const type2fieldType = {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
296
|
+
'text': KText,
|
|
297
|
+
'multilingual': Multilingual,
|
|
298
|
+
'float': Number,
|
|
299
|
+
'date': KDate,
|
|
300
|
+
'datetime': DateTime,
|
|
301
|
+
'enum': Option,
|
|
302
|
+
'email': Email,
|
|
303
|
+
'phone': MobileNumber,
|
|
304
|
+
'boolean': Boolean,
|
|
305
|
+
'avatar': AvatarOrLogo,
|
|
306
|
+
'lookup': Lookup,
|
|
307
|
+
'formula': Formula,
|
|
308
|
+
'auto_number': AutoID,
|
|
309
|
+
'reference_field': ReferenceField,
|
|
310
|
+
'attachment': File,
|
|
311
|
+
'back_lookup': BackLookup,
|
|
312
|
+
'richText': RichText,
|
|
313
313
|
};
|
|
314
314
|
const fieldTypeMap = {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
315
|
+
'text': 'text',
|
|
316
|
+
'multilingual': 'multilingual',
|
|
317
|
+
'number': 'float',
|
|
318
|
+
'date': 'date',
|
|
319
|
+
'dateTime': 'datetime',
|
|
320
|
+
'option': 'enum',
|
|
321
|
+
'email': 'email',
|
|
322
|
+
'mobileNumber': 'phone',
|
|
323
|
+
'boolean': 'boolean',
|
|
324
|
+
'avatarOrLogo': 'avatar',
|
|
325
|
+
'lookup': 'lookup',
|
|
326
|
+
'formula': 'formula',
|
|
327
|
+
'autoId': 'auto_number',
|
|
328
|
+
'referenceField': 'reference_field',
|
|
329
|
+
'file': 'attachment',
|
|
330
|
+
'backLookup': 'back_lookup',
|
|
331
|
+
'compositeType': 'compositeType',
|
|
332
|
+
'extractSingleRecord': 'compositeType',
|
|
333
|
+
'richText': 'richText',
|
|
334
334
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FieldType, FilterType, SortConditionType, SubOptionType } from
|
|
2
|
-
import { I18ns } from
|
|
1
|
+
import { FieldType, FilterType, SortConditionType, SubOptionType } from '../types/objects';
|
|
2
|
+
import { I18ns } from '../types/common';
|
|
3
3
|
declare function getUnique(field: FieldType): boolean;
|
|
4
4
|
declare function getCaseSensitive(field: FieldType): boolean;
|
|
5
5
|
declare function getMultiline(field: FieldType): boolean;
|
|
@@ -9,7 +9,7 @@ declare function getRegexpErrMsg(field: FieldType): I18ns;
|
|
|
9
9
|
declare function getDisplayAsPercentage(field: FieldType): boolean;
|
|
10
10
|
declare function getDecimalPlaces(field: FieldType): number;
|
|
11
11
|
declare function getMultiple(field: FieldType): boolean;
|
|
12
|
-
declare function getOptionSource(field: FieldType): (
|
|
12
|
+
declare function getOptionSource(field: FieldType): ('custom' | 'global');
|
|
13
13
|
declare function getGlobalOptionApiName(field: FieldType): string;
|
|
14
14
|
declare function getOptionList(field: FieldType): SubOptionType[];
|
|
15
15
|
declare function getDescriptionWhenTrue(field: FieldType): I18ns;
|
|
@@ -85,20 +85,20 @@ exports.getMultiple = getMultiple;
|
|
|
85
85
|
function getOptionSource(field) {
|
|
86
86
|
if (field && field.type && field.type.settings && !(0, common_1.isNullOrUndefined)(field.type.settings.option_type)) {
|
|
87
87
|
if (field.type.settings.option_type === 'local') {
|
|
88
|
-
return
|
|
88
|
+
return 'custom';
|
|
89
89
|
}
|
|
90
90
|
else if (field.type.settings.option_type === 'global') {
|
|
91
|
-
return
|
|
91
|
+
return 'global';
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
return
|
|
94
|
+
return 'custom';
|
|
95
95
|
}
|
|
96
96
|
exports.getOptionSource = getOptionSource;
|
|
97
97
|
function getGlobalOptionApiName(field) {
|
|
98
98
|
if (field && field.type && field.type.settings && field.type.settings.related_to_global_option && !(0, common_1.isNullOrUndefined)(field.type.settings.related_to_global_option.apiName)) {
|
|
99
99
|
return field.type.settings.related_to_global_option.apiName;
|
|
100
100
|
}
|
|
101
|
-
return
|
|
101
|
+
return '';
|
|
102
102
|
}
|
|
103
103
|
exports.getGlobalOptionApiName = getGlobalOptionApiName;
|
|
104
104
|
function getOptionList(field) {
|
|
@@ -143,14 +143,14 @@ function getDisplayStyle(field) {
|
|
|
143
143
|
if (field && field.type && field.type.settings && !(0, common_1.isNullOrUndefined)(field.type.settings.display_style)) {
|
|
144
144
|
return field.type.settings.display_style;
|
|
145
145
|
}
|
|
146
|
-
return
|
|
146
|
+
return 'square';
|
|
147
147
|
}
|
|
148
148
|
exports.getDisplayStyle = getDisplayStyle;
|
|
149
149
|
function getLookupRefObjectApiName(field) {
|
|
150
150
|
if (field && field.type && field.type.settings && !(0, common_1.isNullOrUndefined)(field.type.settings.referenced_object_api_name)) {
|
|
151
151
|
return field.type.settings.referenced_object_api_name;
|
|
152
152
|
}
|
|
153
|
-
return
|
|
153
|
+
return '';
|
|
154
154
|
}
|
|
155
155
|
exports.getLookupRefObjectApiName = getLookupRefObjectApiName;
|
|
156
156
|
function getLookupIsHierarchy(field) {
|
|
@@ -160,12 +160,12 @@ function getLookupIsHierarchy(field) {
|
|
|
160
160
|
return false;
|
|
161
161
|
}
|
|
162
162
|
exports.getLookupIsHierarchy = getLookupIsHierarchy;
|
|
163
|
-
//
|
|
163
|
+
// 'search'|'dropDown'|'tree'
|
|
164
164
|
function getLookupDisplayStyle(field) {
|
|
165
165
|
if (field && field.type && field.type.settings && !(0, common_1.isNullOrUndefined)(field.type.settings.display_style)) {
|
|
166
166
|
return field.type.settings.display_style;
|
|
167
167
|
}
|
|
168
|
-
return
|
|
168
|
+
return 'dropDown';
|
|
169
169
|
}
|
|
170
170
|
exports.getLookupDisplayStyle = getLookupDisplayStyle;
|
|
171
171
|
function getReturnType(field) {
|
|
@@ -173,7 +173,7 @@ function getReturnType(field) {
|
|
|
173
173
|
if (field && field.type && field.type.settings && !(0, common_1.isNullOrUndefined)(field.type.settings.return_type)) {
|
|
174
174
|
return field.type.settings.return_type;
|
|
175
175
|
}
|
|
176
|
-
return
|
|
176
|
+
return '';
|
|
177
177
|
}
|
|
178
178
|
exports.getReturnType = getReturnType;
|
|
179
179
|
function getFormula(field) {
|
|
@@ -183,12 +183,12 @@ function getFormula(field) {
|
|
|
183
183
|
return [];
|
|
184
184
|
}
|
|
185
185
|
exports.getFormula = getFormula;
|
|
186
|
-
//
|
|
186
|
+
// 'random'|'incremental'
|
|
187
187
|
function getGenerateMethod(field) {
|
|
188
188
|
if (field && field.type && field.type.settings && !(0, common_1.isNullOrUndefined)(field.type.settings.generation_method)) {
|
|
189
189
|
return field.type.settings.generation_method;
|
|
190
190
|
}
|
|
191
|
-
return
|
|
191
|
+
return 'random';
|
|
192
192
|
}
|
|
193
193
|
exports.getGenerateMethod = getGenerateMethod;
|
|
194
194
|
function getDigitsNumber(field) {
|
|
@@ -202,28 +202,28 @@ function getPrefix(field) {
|
|
|
202
202
|
if (field && field.type && field.type.settings && !(0, common_1.isNullOrUndefined)(field.type.settings.prefix)) {
|
|
203
203
|
return field.type.settings.prefix;
|
|
204
204
|
}
|
|
205
|
-
return
|
|
205
|
+
return '';
|
|
206
206
|
}
|
|
207
207
|
exports.getPrefix = getPrefix;
|
|
208
208
|
function getSuffix(field) {
|
|
209
209
|
if (field && field.type && field.type.settings && !(0, common_1.isNullOrUndefined)(field.type.settings.suffix)) {
|
|
210
210
|
return field.type.settings.suffix;
|
|
211
211
|
}
|
|
212
|
-
return
|
|
212
|
+
return '';
|
|
213
213
|
}
|
|
214
214
|
exports.getSuffix = getSuffix;
|
|
215
215
|
function getReferenceObjectApiName(field) {
|
|
216
216
|
if (field && field.type && field.type.settings && !(0, common_1.isNullOrUndefined)(field.type.settings.target_referenced_object_api_name)) {
|
|
217
217
|
return field.type.settings.target_referenced_object_api_name;
|
|
218
218
|
}
|
|
219
|
-
return
|
|
219
|
+
return '';
|
|
220
220
|
}
|
|
221
221
|
exports.getReferenceObjectApiName = getReferenceObjectApiName;
|
|
222
222
|
function getReferenceFieldApiName(field) {
|
|
223
223
|
if (field && field.type && field.type.settings && !(0, common_1.isNullOrUndefined)(field.type.settings.target_reference_field_api_name)) {
|
|
224
224
|
return field.type.settings.target_reference_field_api_name;
|
|
225
225
|
}
|
|
226
|
-
return
|
|
226
|
+
return '';
|
|
227
227
|
}
|
|
228
228
|
exports.getReferenceFieldApiName = getReferenceFieldApiName;
|
|
229
229
|
function getFileMultiple(field) {
|
|
@@ -244,14 +244,14 @@ function getBackLookupObjectApiName(field) {
|
|
|
244
244
|
if (field && field.type && field.type.settings && !(0, common_1.isNullOrUndefined)(field.type.settings.related_to_object_api_name)) {
|
|
245
245
|
return field.type.settings.related_to_object_api_name;
|
|
246
246
|
}
|
|
247
|
-
return
|
|
247
|
+
return '';
|
|
248
248
|
}
|
|
249
249
|
exports.getBackLookupObjectApiName = getBackLookupObjectApiName;
|
|
250
250
|
function getBackLookupFieldApiName(field) {
|
|
251
251
|
if (field && field.type && field.type.settings && !(0, common_1.isNullOrUndefined)(field.type.settings.related_to_field_api_name)) {
|
|
252
252
|
return field.type.settings.related_to_field_api_name;
|
|
253
253
|
}
|
|
254
|
-
return
|
|
254
|
+
return '';
|
|
255
255
|
}
|
|
256
256
|
exports.getBackLookupFieldApiName = getBackLookupFieldApiName;
|
|
257
257
|
function getSettingsMultiple(field) {
|
|
@@ -265,7 +265,7 @@ function getCompositeTypeApiName(field) {
|
|
|
265
265
|
if (field && field.type && field.type.settings && !(0, common_1.isNullOrUndefined)(field.type.settings.related_to_api_name)) {
|
|
266
266
|
return field.type.settings.related_to_api_name;
|
|
267
267
|
}
|
|
268
|
-
return
|
|
268
|
+
return '';
|
|
269
269
|
}
|
|
270
270
|
exports.getCompositeTypeApiName = getCompositeTypeApiName;
|
|
271
271
|
function getCompositeTypeSubFields(field) {
|
|
@@ -303,13 +303,13 @@ function getRecordPosition(field) {
|
|
|
303
303
|
if (field && field.type && field.type.settings && !(0, common_1.isNullOrUndefined)(field.type.settings.filter_record)) {
|
|
304
304
|
// first, last, specified
|
|
305
305
|
switch (field.type.settings.filter_record.type) {
|
|
306
|
-
case
|
|
306
|
+
case 'first':
|
|
307
307
|
pos = 1;
|
|
308
308
|
break;
|
|
309
|
-
case
|
|
309
|
+
case 'last':
|
|
310
310
|
pos = -1;
|
|
311
311
|
break;
|
|
312
|
-
case
|
|
312
|
+
case 'specified':
|
|
313
313
|
pos = field.type.settings.filter_record.index;
|
|
314
314
|
break;
|
|
315
315
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I18ns } from
|
|
1
|
+
import { I18ns } from './common';
|
|
2
2
|
export type SelectFieldType = {
|
|
3
3
|
fieldPath: {
|
|
4
4
|
objectApiName: string;
|
|
@@ -27,7 +27,7 @@ export type DeskListTitleField = {
|
|
|
27
27
|
fieldApiName: string;
|
|
28
28
|
};
|
|
29
29
|
export type DeskListSubtitleField = {
|
|
30
|
-
type?: (
|
|
30
|
+
type?: ('field' | 'concatText');
|
|
31
31
|
fieldApiName: string;
|
|
32
32
|
alias: I18ns;
|
|
33
33
|
concatText?: {
|
|
@@ -55,12 +55,12 @@ export type UIMetaLangType = {
|
|
|
55
55
|
text: string;
|
|
56
56
|
};
|
|
57
57
|
export type ConcatTextType = {
|
|
58
|
-
dataType:
|
|
58
|
+
dataType: 'fieldApiName' | 'text';
|
|
59
59
|
fieldApiName: string;
|
|
60
60
|
text: string;
|
|
61
61
|
};
|
|
62
62
|
export type UIMetaMobileType = {
|
|
63
|
-
pageType?: (
|
|
63
|
+
pageType?: ('app' | 'record_page');
|
|
64
64
|
pageApiName: string;
|
|
65
65
|
componentName: string;
|
|
66
66
|
titleAreaText: I18ns;
|
|
@@ -83,7 +83,7 @@ export type MobileListItem = {
|
|
|
83
83
|
}[];
|
|
84
84
|
tagFields: {
|
|
85
85
|
fieldApiName: string;
|
|
86
|
-
color:
|
|
86
|
+
color: 'grey' | 'blue' | 'cyan' | 'green' | 'yellow' | 'orange' | 'red' | 'magenta' | 'purple' | 'blueMagenta';
|
|
87
87
|
}[];
|
|
88
88
|
subtitleFields: MobileListField[];
|
|
89
89
|
detailFields: MobileListField[];
|