@sap/ux-specification 1.96.53 → 1.96.55
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/CHANGELOG.md +74 -0
- package/dist/documentation/runDocu-min.js +4 -4
- package/dist/documentation/runDocu-min.js.map +3 -3
- package/dist/documentation/styleDocu.css +4 -0
- package/dist/documentation/v2/v2-AnalyticalListPage.html +2 -2
- package/dist/documentation/v2/v2-ApplicationV2.html +2 -2
- package/dist/documentation/v2/v2-ListReport.html +2 -2
- package/dist/documentation/v2/v2-ObjectPage.html +2 -2
- package/dist/documentation/v2/v2-OverviewPage.html +2 -2
- package/dist/documentation/v4/v4-ApplicationV4.html +2 -2
- package/dist/documentation/v4/v4-BuildingBlocks.html +2 -2
- package/dist/documentation/v4/v4-FreestylePage.html +2 -2
- package/dist/documentation/v4/v4-ListReport.html +2 -2
- package/dist/documentation/v4/v4-ObjectPage.html +2 -2
- package/dist/index-min.js +166 -169
- package/dist/index-min.js.map +4 -4
- package/dist/package.json +8 -9
- package/dist/schemas/v2/ObjectPageConfig.json +229 -163
- package/dist/schemas/v2/OverviewPageConfig.json +516 -472
- package/dist/schemas/v4/ListReportConfig.json +2 -0
- package/dist/src/api.js +2 -2
- package/dist/src/api.js.map +1 -1
- package/dist/src/sync/common/decoration/control.d.ts +4 -0
- package/dist/src/sync/common/decoration/control.d.ts.map +1 -1
- package/dist/src/sync/common/decoration/control.js +8 -1
- package/dist/src/sync/common/decoration/control.js.map +1 -1
- package/dist/src/sync/common/generate/objectPage.d.ts +5 -5
- package/dist/src/sync/common/generate/objectPage.d.ts.map +1 -1
- package/dist/src/sync/common/generate/objectPage.js +14 -12
- package/dist/src/sync/common/generate/objectPage.js.map +1 -1
- package/dist/src/sync/common/generate/utils.d.ts.map +1 -1
- package/dist/src/sync/common/generate/utils.js +56 -47
- package/dist/src/sync/common/generate/utils.js.map +1 -1
- package/dist/src/sync/common/i18n.json +1 -0
- package/dist/src/sync/common/importProject.d.ts.map +1 -1
- package/dist/src/sync/common/importProject.js +14 -6
- package/dist/src/sync/common/importProject.js.map +1 -1
- package/dist/src/sync/common/utils.d.ts.map +1 -1
- package/dist/src/sync/common/utils.js +53 -46
- package/dist/src/sync/common/utils.js.map +1 -1
- package/dist/src/sync/v2/application.d.ts +2 -1
- package/dist/src/sync/v2/application.d.ts.map +1 -1
- package/dist/src/sync/v2/application.js +8 -3
- package/dist/src/sync/v2/application.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Card.d.ts +71 -76
- package/dist/src/sync/v2/export/controls/Card.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/Card.js +103 -246
- package/dist/src/sync/v2/export/controls/Card.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageTable.d.ts +17 -6
- package/dist/src/sync/v2/export/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageTable.js +109 -19
- package/dist/src/sync/v2/export/controls/ObjectPageTable.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Table.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/Table.js +0 -1
- package/dist/src/sync/v2/export/controls/Table.js.map +1 -1
- package/dist/src/sync/v2/export/export.d.ts +2 -1
- package/dist/src/sync/v2/export/export.d.ts.map +1 -1
- package/dist/src/sync/v2/export/export.js +37 -61
- package/dist/src/sync/v2/export/export.js.map +1 -1
- package/dist/src/sync/v2/export/exportPage.d.ts.map +1 -1
- package/dist/src/sync/v2/export/exportPage.js +0 -14
- package/dist/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/src/sync/v2/export/pages/ObjectPage.d.ts +1 -0
- package/dist/src/sync/v2/export/pages/ObjectPage.d.ts.map +1 -1
- package/dist/src/sync/v2/export/pages/ObjectPage.js +18 -0
- package/dist/src/sync/v2/export/pages/ObjectPage.js.map +1 -1
- package/dist/src/sync/v2/export/pages/OverviewPage.d.ts +12 -5
- package/dist/src/sync/v2/export/pages/OverviewPage.d.ts.map +1 -1
- package/dist/src/sync/v2/export/pages/OverviewPage.js +39 -21
- package/dist/src/sync/v2/export/pages/OverviewPage.js.map +1 -1
- package/dist/src/sync/v2/generate/analyticalListReport.d.ts.map +1 -1
- package/dist/src/sync/v2/generate/analyticalListReport.js +55 -4
- package/dist/src/sync/v2/generate/analyticalListReport.js.map +1 -1
- package/dist/src/sync/v2/generate/objectPage.d.ts.map +1 -1
- package/dist/src/sync/v2/generate/objectPage.js +51 -51
- package/dist/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v2/generate/utils.d.ts +23 -5
- package/dist/src/sync/v2/generate/utils.d.ts.map +1 -1
- package/dist/src/sync/v2/generate/utils.js +35 -7
- package/dist/src/sync/v2/generate/utils.js.map +1 -1
- package/dist/src/sync/v2/import/pages/objectPage.d.ts.map +1 -1
- package/dist/src/sync/v2/import/pages/objectPage.js +7 -1
- package/dist/src/sync/v2/import/pages/objectPage.js.map +1 -1
- package/dist/src/sync/v2/import/pages/overviewPage.d.ts.map +1 -1
- package/dist/src/sync/v2/import/pages/overviewPage.js +63 -60
- package/dist/src/sync/v2/import/pages/overviewPage.js.map +1 -1
- package/dist/src/sync/v4/export/controls/Table.d.ts +1 -1
- package/dist/src/sync/v4/export/controls/Table.d.ts.map +1 -1
- package/dist/src/sync/v4/export/controls/Table.js +5 -11
- package/dist/src/sync/v4/export/controls/Table.js.map +1 -1
- package/dist/src/sync/v4/generate/fpm-custom-page/generator.d.ts.map +1 -1
- package/dist/src/sync/v4/generate/fpm-custom-page/generator.js +8 -1
- package/dist/src/sync/v4/generate/fpm-custom-page/generator.js.map +1 -1
- package/dist/src/sync/v4/generate/listReport.d.ts +3 -2
- package/dist/src/sync/v4/generate/listReport.d.ts.map +1 -1
- package/dist/src/sync/v4/generate/listReport.js +14 -6
- package/dist/src/sync/v4/generate/listReport.js.map +1 -1
- package/dist/src/sync/v4/generate/objectPage.d.ts +2 -2
- package/dist/src/sync/v4/generate/objectPage.d.ts.map +1 -1
- package/dist/src/sync/v4/generate/objectPage.js +269 -91
- package/dist/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v4/import/pages/objectPage.d.ts.map +1 -1
- package/dist/src/sync/v4/import/pages/objectPage.js +27 -11
- package/dist/src/sync/v4/import/pages/objectPage.js.map +1 -1
- package/package.json +8 -9
|
@@ -12,83 +12,261 @@ const utils_1 = require("../utils/utils");
|
|
|
12
12
|
const utils_2 = require("../utils/utils");
|
|
13
13
|
const StableIdHelper_1 = require("../../v4/utils/StableIdHelper");
|
|
14
14
|
const pageExtensions_1 = require("./fpm-custom-page/pageExtensions");
|
|
15
|
+
const utils_3 = require("../../v2/generate/utils");
|
|
15
16
|
const ROOT_PROPERTIES_ORDER = ['header', 'layout', 'sections', 'footer'];
|
|
17
|
+
const CRITICAL_ACTION_TYPES = [
|
|
18
|
+
'UI.CriticalityType/Positive',
|
|
19
|
+
'UI.CriticalityType/VeryPositive',
|
|
20
|
+
'UI.CriticalityType/Negative',
|
|
21
|
+
'UI.CriticalityType/VeryNegative'
|
|
22
|
+
];
|
|
16
23
|
const CUSTOM_ACTION_DEFINITION_DESCRIPTION = 'Custom Action';
|
|
17
24
|
/**
|
|
18
|
-
*
|
|
19
|
-
* @param {
|
|
25
|
+
* V4 callback - adds a single header action to schema
|
|
26
|
+
* @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
27
|
+
* @param {ActionListType} action - item of the Ui.Identification collection and its original index
|
|
28
|
+
* @param {ActionType} actionType - action classification for grouping
|
|
20
29
|
* @param {Definition} appSchema Schema of the app
|
|
21
|
-
* @param
|
|
30
|
+
* @param {EntityType} entityType - current entity type
|
|
22
31
|
* @param {Definition} headerActions - list of header actions, to be enhanced
|
|
23
|
-
* @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
24
32
|
*/
|
|
25
|
-
function
|
|
26
|
-
|
|
33
|
+
function addSingleHeaderActionV4(oDataServiceAVT, action, actionType, appSchema, entityType, headerActions, index) {
|
|
34
|
+
const { actionName, namespace } = (0, common_1.getActionNameAndId)(action.item, oDataServiceAVT);
|
|
35
|
+
const stableId = (0, StableIdHelper_1.getStableIdPartFromDataField)(action.item);
|
|
36
|
+
//stableId is used as key in V4, as the DataFieldForAction:: prefix shall be present in manifest settings
|
|
37
|
+
const convertedIdentification = action.item['fullyQualifiedName'].replace(`@${"com.sap.vocabularies.UI.v1.Identification" /* UIAnnotationTerms.Identification */}`, `/@${"com.sap.vocabularies.UI.v1.Identification" /* UIAnnotationTerms.Identification */}`);
|
|
38
|
+
const actionDefinitionKey = `ObjectPageHeaderAction<${(0, common_1.prepareRef)(stableId)}>`;
|
|
39
|
+
const headerAction = (appSchema.definitions[actionDefinitionKey] = {
|
|
40
|
+
type: 'object',
|
|
41
|
+
$ref: `${common_1.DEFINITION_LINK_PREFIX}${ux_specification_types_1.DefinitionName.ObjectPageHeaderAction}`,
|
|
42
|
+
description: (0, common_1.getDataFieldDescription)(action.item, entityType)
|
|
43
|
+
});
|
|
44
|
+
headerAction[ux_specification_types_1.SchemaTag.isViewNode] = true;
|
|
45
|
+
headerAction[ux_specification_types_1.SchemaTag.dataType] = (0, common_1.determineDataType)(action.item);
|
|
46
|
+
headerAction[ux_specification_types_1.SchemaTag.propertyIndex] = index;
|
|
47
|
+
//keys
|
|
48
|
+
headerAction[ux_specification_types_1.SchemaTag.keys] = [];
|
|
49
|
+
if (action.item[ux_specification_types_1.SchemaKeyName.semanticObject]) {
|
|
50
|
+
headerAction[ux_specification_types_1.SchemaTag.keys].push({
|
|
51
|
+
name: ux_specification_types_1.SchemaKeyName.semanticObject,
|
|
52
|
+
value: action.item[ux_specification_types_1.SchemaKeyName.semanticObject]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
headerAction[ux_specification_types_1.SchemaTag.keys].push({ name: ux_specification_types_1.SchemaKeyName.action, value: actionName });
|
|
56
|
+
if (namespace) {
|
|
57
|
+
appSchema.definitions[actionDefinitionKey][ux_specification_types_1.SchemaTag.target] = namespace;
|
|
58
|
+
}
|
|
59
|
+
headerAction[ux_specification_types_1.SchemaTag.actionType] = actionType;
|
|
60
|
+
headerAction[ux_specification_types_1.SchemaTag.annotationPath] = `/${convertedIdentification}`;
|
|
61
|
+
headerActions.properties[stableId] = {
|
|
62
|
+
$ref: `${common_1.DEFINITION_LINK_PREFIX}${actionDefinitionKey}`
|
|
63
|
+
};
|
|
64
|
+
// add propertyIndexes
|
|
65
|
+
headerActions.properties[stableId][ux_specification_types_1.SchemaTag.propertyIndex] = index;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Adds a given standard action to the app schema of the object page
|
|
69
|
+
* @param {string} actionName - name of the action
|
|
70
|
+
* @param {Definition} appSchema - schema of the object page
|
|
71
|
+
* @param {Definition} headerActions - list of header actions, to be enhanced
|
|
72
|
+
* @param {number} index - index for propertyIndex
|
|
73
|
+
*
|
|
74
|
+
* @returns the new header action definition
|
|
75
|
+
*/
|
|
76
|
+
function addStandardHeaderAction(actionName, appSchema, headerActions, index) {
|
|
77
|
+
const referenceKey = `${actionName}Action`;
|
|
78
|
+
const actionDefinitionKey = `ObjectPageHeaderAction<${referenceKey}>`;
|
|
79
|
+
const headerAction = (appSchema.definitions[actionDefinitionKey] = {
|
|
80
|
+
type: 'object',
|
|
81
|
+
description: `${actionName}`,
|
|
82
|
+
additionalProperties: true
|
|
83
|
+
});
|
|
84
|
+
headerAction[ux_specification_types_1.SchemaTag.isViewNode] = true;
|
|
85
|
+
headerAction[ux_specification_types_1.SchemaTag.propertyIndex] = index;
|
|
86
|
+
//keys
|
|
87
|
+
headerAction[ux_specification_types_1.SchemaTag.keys] = [];
|
|
88
|
+
headerAction[ux_specification_types_1.SchemaTag.keys].push({ name: ux_specification_types_1.SchemaKeyName.action, value: actionName });
|
|
89
|
+
headerAction[ux_specification_types_1.SchemaTag.actionType] = ux_specification_types_1.ActionType.Standard;
|
|
90
|
+
headerActions.properties[referenceKey] = {
|
|
91
|
+
$ref: `${common_1.DEFINITION_LINK_PREFIX}${actionDefinitionKey}`
|
|
92
|
+
};
|
|
93
|
+
// add propertyIndexes
|
|
94
|
+
headerActions.properties[referenceKey][ux_specification_types_1.SchemaTag.propertyIndex] = index;
|
|
95
|
+
return headerAction;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* V4 callback - adds a single footer action to schema
|
|
99
|
+
* @param {ActionListType} action - item of the Ui.Identification collection and its original index
|
|
100
|
+
* @param {ActionType} actionType - action classification for grouping
|
|
101
|
+
* @param {EntityType} entityType - current entity type
|
|
102
|
+
* @param {Definition} appSchema - schema of the object page
|
|
103
|
+
* @param {Definition} footerActions - list of footer actions, to be enhanced
|
|
104
|
+
*/
|
|
105
|
+
function addSingleFooterAction(action, actionType, entityType, appSchema, footerActions, index) {
|
|
106
|
+
const actionId = (0, StableIdHelper_1.getStableIdPartFromDataField)(action.item);
|
|
107
|
+
const description = (0, common_1.getDataFieldDescription)(action.item, entityType);
|
|
108
|
+
const actionDefinitionKey = (0, common_1.prepareRef)(`${ux_specification_types_1.DefinitionName.ObjectPageFooterAction}<${actionId}>`);
|
|
109
|
+
const convertedIdentification = action.item['fullyQualifiedName'].replace(`@${"com.sap.vocabularies.UI.v1.Identification" /* UIAnnotationTerms.Identification */}`, `/@${"com.sap.vocabularies.UI.v1.Identification" /* UIAnnotationTerms.Identification */}`);
|
|
110
|
+
const footerAction = (appSchema.definitions[actionDefinitionKey] = {
|
|
111
|
+
type: 'object',
|
|
112
|
+
$ref: `${common_1.DEFINITION_LINK_PREFIX}${ux_specification_types_1.DefinitionName.FooterActionV4}`,
|
|
113
|
+
description: description
|
|
114
|
+
});
|
|
115
|
+
footerAction[ux_specification_types_1.SchemaTag.isViewNode] = true;
|
|
116
|
+
footerAction[ux_specification_types_1.SchemaTag.actionType] = actionType;
|
|
117
|
+
footerAction[ux_specification_types_1.SchemaTag.propertyIndex] = index;
|
|
118
|
+
footerAction[ux_specification_types_1.SchemaTag.annotationPath] = `/${convertedIdentification}`;
|
|
119
|
+
footerActions.properties[actionId] = {
|
|
120
|
+
$ref: `${common_1.DEFINITION_LINK_PREFIX}${actionDefinitionKey}`
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Distiguishes critical actions and others and returns two separate groups
|
|
125
|
+
* @param {any} identification - UI.Identification annotation as present in AVT ConvertedMetadata
|
|
126
|
+
* @returns two separate groups of items
|
|
127
|
+
*/
|
|
128
|
+
function groupByCriticality(identification) {
|
|
129
|
+
const criticalActions = [];
|
|
130
|
+
const unCriticalActions = [];
|
|
131
|
+
identification.forEach((item, index) => {
|
|
27
132
|
if ((!item['Determining'] && item.$Type === "com.sap.vocabularies.UI.v1.DataFieldForAction" /* UIAnnotationTypes.DataFieldForAction */) ||
|
|
28
133
|
item.$Type === "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation" /* UIAnnotationTypes.DataFieldForIntentBasedNavigation */) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
const stableId = (0, StableIdHelper_1.getStableIdPartFromDataField)(item);
|
|
34
|
-
//stableId is used as key in V4, as the DataFieldForAction:: prefix shall be present in manifest settings
|
|
35
|
-
const convertedIdentification = actionAnnotation.fullyQualifiedName.replace(`@${"com.sap.vocabularies.UI.v1.Identification" /* UIAnnotationTerms.Identification */}`, `/@${"com.sap.vocabularies.UI.v1.Identification" /* UIAnnotationTerms.Identification */}`);
|
|
36
|
-
const actionDefinitionKey = `ObjectPageHeaderAction<${(0, common_1.prepareRef)(stableId)}>`;
|
|
37
|
-
const headerAction = (appSchema.definitions[actionDefinitionKey] = {
|
|
38
|
-
type: 'object',
|
|
39
|
-
$ref: `${common_1.DEFINITION_LINK_PREFIX}${ux_specification_types_1.DefinitionName.ObjectPageHeaderAction}`,
|
|
40
|
-
description: (0, common_1.getDataFieldDescription)(item, entityType)
|
|
41
|
-
});
|
|
42
|
-
headerAction[ux_specification_types_1.SchemaTag.isViewNode] = true;
|
|
43
|
-
headerAction[ux_specification_types_1.SchemaTag.dataType] = (0, common_1.determineDataType)(item);
|
|
44
|
-
//keys
|
|
45
|
-
headerAction[ux_specification_types_1.SchemaTag.keys] = [];
|
|
46
|
-
if (item[ux_specification_types_1.SchemaKeyName.semanticObject]) {
|
|
47
|
-
headerAction[ux_specification_types_1.SchemaTag.keys].push({
|
|
48
|
-
name: ux_specification_types_1.SchemaKeyName.semanticObject,
|
|
49
|
-
value: item[ux_specification_types_1.SchemaKeyName.semanticObject]
|
|
50
|
-
});
|
|
134
|
+
if (CRITICAL_ACTION_TYPES.includes(item['Criticality'])) {
|
|
135
|
+
criticalActions.push({ index, item });
|
|
51
136
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
appSchema.definitions[actionDefinitionKey][ux_specification_types_1.SchemaTag.target] = namespace;
|
|
137
|
+
else {
|
|
138
|
+
unCriticalActions.push({ index, item });
|
|
55
139
|
}
|
|
56
|
-
headerAction[ux_specification_types_1.SchemaTag.annotationPath] = `/${convertedIdentification}/${index}`;
|
|
57
|
-
headerActions.properties[stableId] = {
|
|
58
|
-
$ref: `${common_1.DEFINITION_LINK_PREFIX}${actionDefinitionKey}`
|
|
59
|
-
};
|
|
60
140
|
}
|
|
61
|
-
};
|
|
141
|
+
});
|
|
142
|
+
return { criticalActions, unCriticalActions };
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Adds the critical header actions to schema
|
|
146
|
+
* @param {ActionListType[]} criticalActions - list of critical actions
|
|
147
|
+
* @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
148
|
+
* @param {Definition} appSchema - schema of the object page
|
|
149
|
+
* @param {EntityType} entityType - current entity type
|
|
150
|
+
* @param {Definition} headerActions - list of all header actions
|
|
151
|
+
*/
|
|
152
|
+
function addCriticalActions(criticalActions, oDataServiceAVT, appSchema, entityType, headerActions) {
|
|
153
|
+
for (let index = 0; index < criticalActions.length; index++) {
|
|
154
|
+
addSingleHeaderActionV4(oDataServiceAVT, criticalActions[index], ux_specification_types_1.ActionType.Criticality, appSchema, entityType, headerActions, index);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Checks if one of the uncritical actions is marked by isCopyAction.
|
|
159
|
+
* If so, adds this first to the schema and deletes it from the list.
|
|
160
|
+
* @param {ActionListType[]} unCriticalActions - list of uncritical actions
|
|
161
|
+
* @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
162
|
+
* @param {Definition} appSchema - schema of the object page
|
|
163
|
+
* @param {EntityType} entityType - current entity type
|
|
164
|
+
* @param {Definition} headerActions - list of all header actions
|
|
165
|
+
* @param {number} nextIndex - index for propertyIndex
|
|
166
|
+
*/
|
|
167
|
+
function addCopyAction(unCriticalActions, oDataServiceAVT, appSchema, entityType, headerActions, nextIndex) {
|
|
168
|
+
const copyActionIndex = unCriticalActions.findIndex((action) => {
|
|
169
|
+
return action.item['annotations']?.UI?.IsCopyAction !== undefined;
|
|
170
|
+
});
|
|
171
|
+
if (copyActionIndex > -1) {
|
|
172
|
+
addSingleHeaderActionV4(oDataServiceAVT, unCriticalActions[copyActionIndex], ux_specification_types_1.ActionType.Copy, appSchema, entityType, headerActions, nextIndex);
|
|
173
|
+
nextIndex++;
|
|
174
|
+
unCriticalActions.splice(copyActionIndex, 1);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Adds the critical header actions to schema
|
|
179
|
+
* @param {ActionListType[]} unCriticalActions - list of uncritical actions
|
|
180
|
+
* @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
181
|
+
* @param {Definition} appSchema - schema of the object page
|
|
182
|
+
* @param {EntityType} entityType - current entity type
|
|
183
|
+
* @param {Definition} headerActions - list of all header actions
|
|
184
|
+
* @param {number} nextIndex - index for propertyIndex
|
|
185
|
+
*/
|
|
186
|
+
function addUncriticalActions(unCriticalActions, oDataServiceAVT, appSchema, entityType, headerActions, nextIndex) {
|
|
187
|
+
for (const action of unCriticalActions) {
|
|
188
|
+
addSingleHeaderActionV4(oDataServiceAVT, action, ux_specification_types_1.ActionType.Annotation, appSchema, entityType, headerActions, nextIndex);
|
|
189
|
+
nextIndex++;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Fills the annotationPath of the given schema definition, by checking first the EntitySet annotation, then the EntityType annotation.
|
|
194
|
+
* @param {Definition} schemaDefinition - current definition in the schema
|
|
195
|
+
* @param {EntitySet} entitySet - current entity set
|
|
196
|
+
* @param {EntityType} entityType - current entity type
|
|
197
|
+
* @param {string} annotationName - name of the annotation term to be checked
|
|
198
|
+
*/
|
|
199
|
+
function setAnnotationPathFromEntitySetOrEntityType(schemaDefinition, entitySet, entityType, annotationName) {
|
|
200
|
+
if (entitySet?.annotations?.UI?.[annotationName] || !entityType?.annotations?.UI?.[annotationName]) {
|
|
201
|
+
schemaDefinition[ux_specification_types_1.SchemaTag.annotationPath] = `/${entitySet.fullyQualifiedName}/${ux_specification_types_1.UIVOCABULARYALPHADOT}${annotationName}`;
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
schemaDefinition[ux_specification_types_1.SchemaTag.annotationPath] = `/${entityType.fullyQualifiedName}/${ux_specification_types_1.UIVOCABULARYALPHADOT}${annotationName}`;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Callback for adding a single action to headerActions of V4
|
|
209
|
+
* @param {EntityType} entityType - current entity type
|
|
210
|
+
* @param {Definition} appSchema - schema of the object page
|
|
211
|
+
* @param {any} identification - UI.Identification annotation as present in AVT ConvertedMetadata
|
|
212
|
+
* @param {Definition} headerActions - list of header actions, to be enhanced
|
|
213
|
+
* @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
214
|
+
* @param {EntitySet} entitySet - current entity set
|
|
215
|
+
*/
|
|
216
|
+
function addHeaderActionCallBackV4(entityType, appSchema, identification, headerActions, oDataServiceAVT, entitySet) {
|
|
217
|
+
//Build groups of action types
|
|
218
|
+
const { criticalActions = [], unCriticalActions = [] } = identification ? groupByCriticality(identification) : {};
|
|
219
|
+
addCriticalActions(criticalActions, oDataServiceAVT, appSchema, entityType, headerActions);
|
|
220
|
+
const isDeletable = (0, utils_3.isEntityDeletable)(entitySet);
|
|
221
|
+
const isUpdatable = (0, utils_3.isEntityUpdatable)(entitySet);
|
|
222
|
+
// Add standard header actions
|
|
223
|
+
// If ReadOnly, and all capabilities restrictions are set to true or When nothing exists i.e. no capabilities annotation and no draft root, show only Delete button
|
|
224
|
+
// If DraftRoot + DraftNode and dynamic value for restriction - show Edit and Delete, if bool == false then hide the button
|
|
225
|
+
if ((0, utils_3.isDraftEnabled)(entitySet) && isUpdatable) {
|
|
226
|
+
const editAction = addStandardHeaderAction('Edit', appSchema, headerActions, criticalActions.length);
|
|
227
|
+
setAnnotationPathFromEntitySetOrEntityType(editAction, entitySet, entityType, 'UpdateHidden');
|
|
228
|
+
}
|
|
229
|
+
if (isDeletable) {
|
|
230
|
+
const deleteAction = addStandardHeaderAction('Delete', appSchema, headerActions, criticalActions.length + 1);
|
|
231
|
+
setAnnotationPathFromEntitySetOrEntityType(deleteAction, entitySet, entityType, 'DeleteHidden');
|
|
232
|
+
}
|
|
233
|
+
const nextIndex = criticalActions.length + 2;
|
|
234
|
+
//Check if isCopyAction is defined, this gets rendered first after delete
|
|
235
|
+
addCopyAction(unCriticalActions, oDataServiceAVT, appSchema, entityType, headerActions, nextIndex);
|
|
236
|
+
addUncriticalActions(unCriticalActions, oDataServiceAVT, appSchema, entityType, headerActions, nextIndex);
|
|
62
237
|
}
|
|
63
238
|
/**
|
|
64
239
|
* Callback for adding a single action to footerActions of V4
|
|
65
240
|
* @param {EntityType} entityType - current entity type
|
|
66
|
-
* @param {Definition} appSchema
|
|
241
|
+
* @param {Definition} appSchema - schema of the object page
|
|
67
242
|
* @param {Definition} footerActions - list of footer actions, to be enhanced
|
|
68
|
-
* @param {
|
|
243
|
+
* @param {any} identification - UI.Identification annotation as present in AVT ConvertedMetadata
|
|
69
244
|
*/
|
|
70
|
-
function addFooterActionCallBackV4(entityType, appSchema, footerActions,
|
|
71
|
-
|
|
245
|
+
function addFooterActionCallBackV4(entityType, appSchema, footerActions, identification) {
|
|
246
|
+
const criticalActions = [];
|
|
247
|
+
const unCriticalActions = [];
|
|
248
|
+
identification.forEach((item, index) => {
|
|
72
249
|
if (item['Determining'] && item.$Type === "com.sap.vocabularies.UI.v1.DataFieldForAction" /* UIAnnotationTypes.DataFieldForAction */) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
description: description
|
|
80
|
-
};
|
|
81
|
-
appSchema.definitions[actionDefinitionKey][ux_specification_types_1.SchemaTag.isViewNode] = true;
|
|
82
|
-
appSchema.definitions[actionDefinitionKey][ux_specification_types_1.SchemaTag.annotationPath] = `/${convertedIdentification}/${index}`;
|
|
83
|
-
footerActions.properties[actionId] = {
|
|
84
|
-
$ref: `${common_1.DEFINITION_LINK_PREFIX}${actionDefinitionKey}`
|
|
85
|
-
};
|
|
250
|
+
if (item['Criticality']) {
|
|
251
|
+
criticalActions.push({ index, item });
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
unCriticalActions.push({ index, item });
|
|
255
|
+
}
|
|
86
256
|
}
|
|
87
|
-
};
|
|
257
|
+
});
|
|
258
|
+
for (let index = 0; index < criticalActions.length; index++) {
|
|
259
|
+
const action = criticalActions[index];
|
|
260
|
+
addSingleFooterAction(action, ux_specification_types_1.ActionType.Criticality, entityType, appSchema, footerActions, index);
|
|
261
|
+
}
|
|
262
|
+
for (let index = 0; index < unCriticalActions.length; index++) {
|
|
263
|
+
const action = unCriticalActions[index];
|
|
264
|
+
addSingleFooterAction(action, ux_specification_types_1.ActionType.Annotation, entityType, appSchema, footerActions, criticalActions.length + index);
|
|
265
|
+
}
|
|
88
266
|
}
|
|
89
267
|
/**
|
|
90
268
|
* Object Page specific enhancements to addCustomColumnDefinition
|
|
91
|
-
* @param {object} appSchema
|
|
269
|
+
* @param {object} appSchema - app schema of the object page
|
|
92
270
|
* @param {SapUiAppPageV4} v4Page Current page in manifest
|
|
93
271
|
* @param {string} lineItemId - identifier of the current table in schema
|
|
94
272
|
* @param {string} facetIdInManifest - identifier of the current object page section in manifest
|
|
@@ -116,7 +294,7 @@ function addCustomColumnsOP(appSchema, v4Page, lineItemId, facetIdInManifest, lo
|
|
|
116
294
|
}
|
|
117
295
|
/**
|
|
118
296
|
* Object Page specific enhancements to addCustomColumnDefinition
|
|
119
|
-
* @param {object} appSchema
|
|
297
|
+
* @param {object} appSchema - app schema of the object page
|
|
120
298
|
* @param {SapUiAppPageV4} v4Page Current page in manifest
|
|
121
299
|
* @param {string} lineItemId - identifier of the current table in schema
|
|
122
300
|
* @param {string} facetIdInManifest - identifier of the current object page section in manifest
|
|
@@ -148,9 +326,9 @@ function addTableCustomActionsOP(appSchema, v4Page, lineItemId, facetIdInManifes
|
|
|
148
326
|
}
|
|
149
327
|
/**
|
|
150
328
|
* Object Page specific custom action enhancements to header and footer
|
|
151
|
-
* @param {object} appSchema
|
|
152
|
-
* @param {SapUiAppPageV4} v4Page
|
|
153
|
-
* @param {DefinitionName} customActionDefinitionKey custom action key used in definitions
|
|
329
|
+
* @param {object} appSchema - app schema of the object page
|
|
330
|
+
* @param {SapUiAppPageV4} v4Page - current page in manifest
|
|
331
|
+
* @param {DefinitionName} customActionDefinitionKey - custom action key used in definitions
|
|
154
332
|
* @param {ExtensionLogger} logger - logger for exceptions
|
|
155
333
|
*/
|
|
156
334
|
function addHeaderFooterCustomActionsOP(appSchema, v4Page, customActionDefinitionKey, logger) {
|
|
@@ -176,8 +354,8 @@ function addHeaderFooterCustomActionsOP(appSchema, v4Page, customActionDefinitio
|
|
|
176
354
|
}
|
|
177
355
|
/**
|
|
178
356
|
* Object Page specific enhancements to handleFormIdentification
|
|
179
|
-
* @param {object} appSchema
|
|
180
|
-
* @param {SapUiAppPageV4} v4Page
|
|
357
|
+
* @param {object} appSchema - app schema of the object page
|
|
358
|
+
* @param {SapUiAppPageV4} v4Page - current page in manifest
|
|
181
359
|
* @param {string} formItemId - identifier of the current form in schema
|
|
182
360
|
* @param {string} facetIdInManifest - identifier of the current object page section in manifest
|
|
183
361
|
* @param {ExtensionLogger} logger - logger for exceptions
|
|
@@ -205,7 +383,7 @@ function addFormCustomActionsOP(appSchema, v4Page, formItemId, facetIdInManifest
|
|
|
205
383
|
* Adds definitions for line items in object page sections to the app schema
|
|
206
384
|
* @param {FacetConfig} facet - the given facet from the UI annotations
|
|
207
385
|
* @param {string} facetKey - key of the facet, as used in annotation
|
|
208
|
-
* @param {Definition} appSchema - app schema
|
|
386
|
+
* @param {Definition} appSchema - app schema of the object page
|
|
209
387
|
* @param {object} lineItemFacet - current lineItem facet
|
|
210
388
|
* @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
211
389
|
* @param {SapUiAppPageV4} v4Page Current page in manifest
|
|
@@ -243,9 +421,9 @@ function handleLineItem(facet, facetKey, appSchema, lineItemFacet, oDataServiceA
|
|
|
243
421
|
}
|
|
244
422
|
/**
|
|
245
423
|
* Adds definitions for table section in object page sections to the app schema
|
|
246
|
-
* @param {FacetConfig} facet - current facet
|
|
247
|
-
* @param {string} facetKey - facet key
|
|
248
|
-
* @param {Definition} appSchema - app specific schema that
|
|
424
|
+
* @param {FacetConfig} facet - current facet
|
|
425
|
+
* @param {string} facetKey - facet key
|
|
426
|
+
* @param {Definition} appSchema - app specific schema of the object page that gets enhanced
|
|
249
427
|
* @param {object} lineItemFacet - current lineItem facet
|
|
250
428
|
* @param {GenerateSchemaParameters} generateParameters - list of API input parameters
|
|
251
429
|
* @param {SapUiAppPageV4} v4Page Current page in manifest
|
|
@@ -272,7 +450,7 @@ function handleSectionTable(facet, facetKey, appSchema, lineItemFacet, generateP
|
|
|
272
450
|
* @param {v4.SapUiAppPageV4} v4Page Current page in manifest
|
|
273
451
|
* @param {string} facetKey - facet key
|
|
274
452
|
* @param {object} sections - schema of current sections definition
|
|
275
|
-
* @param {object} appSchema - app specific schema that
|
|
453
|
+
* @param {object} appSchema - app specific schema of the object page that gets enhanced
|
|
276
454
|
* @param {SectionType} sectionPrefix - prefix to distinguish Section and HeaderSection
|
|
277
455
|
* @param {ExtensionLogger} logger - logger for exceptions
|
|
278
456
|
*/
|
|
@@ -304,10 +482,10 @@ function handleFormIdentification(facet, v4Page, facetKey, sections, appSchema,
|
|
|
304
482
|
}
|
|
305
483
|
/**
|
|
306
484
|
* Adds definitions for header sections (DataPoint, Chart) in object page sections to the app schema
|
|
307
|
-
* @param {FacetConfig} facet - current facet
|
|
308
|
-
* @param {string} facetKey - facet key
|
|
309
|
-
* @param {object} sections - schema of current sections definition
|
|
310
|
-
* @param {object} appSchema - app specific schema that
|
|
485
|
+
* @param {FacetConfig} facet - current facet
|
|
486
|
+
* @param {string} facetKey - facet key
|
|
487
|
+
* @param {object} sections - schema of current sections definition
|
|
488
|
+
* @param {object} appSchema - app specific schema of the object page that gets enhanced
|
|
311
489
|
* @param {SectionType} facetDefinitionKey - key to identify new definition
|
|
312
490
|
*/
|
|
313
491
|
function handleHeaderFacet(facet, facetKey, sections, appSchema, facetDefinitionKey) {
|
|
@@ -325,7 +503,7 @@ function handleHeaderFacet(facet, facetKey, sections, appSchema, facetDefinition
|
|
|
325
503
|
* Adds definitions for Chart items in object page sections to the app schema
|
|
326
504
|
* @param {FacetConfig | Chart | object} facet - current facet.
|
|
327
505
|
* @param {string} facetKey - facet key.
|
|
328
|
-
* @param {object} appSchema - app specific schema that
|
|
506
|
+
* @param {object} appSchema - app specific schema of the object page that gets enhanced.
|
|
329
507
|
* @param {EntityType} entityType - current entity type
|
|
330
508
|
*/
|
|
331
509
|
function handleChartActions(facet, facetKey, appSchema, entityType) {
|
|
@@ -357,7 +535,7 @@ function handleChartActions(facet, facetKey, appSchema, entityType) {
|
|
|
357
535
|
* Adds definitions for Chart items in object page sections to the app schema
|
|
358
536
|
* @param {FacetConfig | Chart | object} facet - current facet.
|
|
359
537
|
* @param {string} facetKey - facet key.
|
|
360
|
-
* @param {object} appSchema - app specific schema that
|
|
538
|
+
* @param {object} appSchema - app specific schema of the object page that gets enhanced.
|
|
361
539
|
* @param {EntityType} entityType - current entity type
|
|
362
540
|
*/
|
|
363
541
|
function handleChart(facet, facetKey, appSchema, entityType) {
|
|
@@ -378,7 +556,7 @@ function handleChart(facet, facetKey, appSchema, entityType) {
|
|
|
378
556
|
* Adds definitions for Chart section in object page sections to the app schema
|
|
379
557
|
* @param {FacetConfig} facet - current facet.
|
|
380
558
|
* @param {string} facetKey - facet key.
|
|
381
|
-
* @param {object} appSchema - app specific schema that
|
|
559
|
+
* @param {object} appSchema - app specific schema of the object page that gets enhanced.
|
|
382
560
|
* @param {object} sections - schema of current sections definition.
|
|
383
561
|
* @param {EntityType} entityType - current entity type
|
|
384
562
|
*/
|
|
@@ -399,7 +577,7 @@ function handleSectionChart(facet, facetKey, appSchema, sections, entityType = f
|
|
|
399
577
|
* Adds definitions for presentation variants in object page sections to the app schema
|
|
400
578
|
* @param {FacetConfig} facet - the given facet from the UI annotations
|
|
401
579
|
* @param {string} facetKey - key of the facet, as used in annotation
|
|
402
|
-
* @param {Definition} appSchema - app schema
|
|
580
|
+
* @param {Definition} appSchema - app schema of the object page
|
|
403
581
|
* @param {object} sections - schema of current sections definition.
|
|
404
582
|
* @param {GenerateSchemaParameters} generateParameters - list of API input parameters
|
|
405
583
|
* @param {SapUiAppPageV4} v4Page Current page in manifest
|
|
@@ -463,8 +641,8 @@ function handleSectionPresentationVariant(facet, facetKey, appSchema, sections,
|
|
|
463
641
|
}
|
|
464
642
|
/**
|
|
465
643
|
* Method checks if passed facet contains any collection facet.
|
|
466
|
-
* @param {FacetConfig} facet - facet to check
|
|
467
|
-
* @returns {boolean} Passed facet contains at least one collection facet
|
|
644
|
+
* @param {FacetConfig} facet - facet to check
|
|
645
|
+
* @returns {boolean} Passed facet contains at least one collection facet
|
|
468
646
|
*/
|
|
469
647
|
function containsCollectionFacet(facet) {
|
|
470
648
|
const childFacets = facet.facets || {};
|
|
@@ -478,10 +656,10 @@ function containsCollectionFacet(facet) {
|
|
|
478
656
|
}
|
|
479
657
|
/**
|
|
480
658
|
* Object Page specific enhancements to addCustomColumnDefinition
|
|
481
|
-
* @param {object} appSchema - app schema
|
|
659
|
+
* @param {object} appSchema - app schema of the object page
|
|
482
660
|
* @param {string} id - identifier of the current section facet
|
|
483
661
|
* @param {string[]} featureToggles - supported features
|
|
484
|
-
* @returns {string} Custom sub section reference id
|
|
662
|
+
* @returns {string} Custom sub section reference id
|
|
485
663
|
*/
|
|
486
664
|
function createCustomSubSectionReference(appSchema, id, featureToggles) {
|
|
487
665
|
const referenceId = `${ux_specification_types_1.DefinitionName.ObjectPageCustomSubSectionFragment}<${id}>`;
|
|
@@ -513,7 +691,7 @@ function createCustomSubSectionReference(appSchema, id, featureToggles) {
|
|
|
513
691
|
/**
|
|
514
692
|
* Common method updates schema for custom header sections or custom subsections.
|
|
515
693
|
* @param {Definition} sections - sections definition
|
|
516
|
-
* @param {Definition} appSchema - app schema
|
|
694
|
+
* @param {Definition} appSchema - app schema of the object page
|
|
517
695
|
* @param {GenerateSchemaParameters} generateParameters - list of API input parameters
|
|
518
696
|
* @param {SapUiAppPageV4} v4Page Current page in manifest
|
|
519
697
|
* @param {FacetConfig} facet - the given facet from the UI annotations
|
|
@@ -565,7 +743,7 @@ function applyCustomSections(sections, appSchema, generateParameters, v4Page, fa
|
|
|
565
743
|
* Adds definitions for collections in object page sections to the app schema
|
|
566
744
|
* @param {FacetConfig} facet - the given facet from the UI annotations
|
|
567
745
|
* @param {string} facetKey - key of the facet, as used in annotation
|
|
568
|
-
* @param {Definition} appSchema - app schema
|
|
746
|
+
* @param {Definition} appSchema - app schema of the object page
|
|
569
747
|
* @param {Definition} sections - schema of current sections definition.
|
|
570
748
|
* @param {SectionType} sectionPrefix - prefix to distinguish Section and HeaderSection
|
|
571
749
|
* @param {GenerateSchemaParameters} generateParameters - list of API input parameters
|
|
@@ -605,10 +783,10 @@ function handleCollection(facet, facetKey, appSchema, sections, sectionPrefix, g
|
|
|
605
783
|
/**
|
|
606
784
|
* Creates a section definition in app schema.
|
|
607
785
|
* @param {GenerateSchemaParameters} generateParameters - list of API input parameters
|
|
608
|
-
* @param {FacetConfigs} facets - list of all facets
|
|
609
|
-
* @param {string} facetKey - facet key
|
|
610
|
-
* @param {object} sections - schema of current sections definition
|
|
611
|
-
* @param {object} appSchema - app specific schema that
|
|
786
|
+
* @param {FacetConfigs} facets - list of all facets
|
|
787
|
+
* @param {string} facetKey - facet key
|
|
788
|
+
* @param {object} sections - schema of current sections definition
|
|
789
|
+
* @param {object} appSchema - app specific schema of the object page that gets enhanced.
|
|
612
790
|
* @param {SectionType} sectionPrefix - prefix to distinguish Section and HeaderSection
|
|
613
791
|
* @param {SapUiAppPageV4} v4Page Current page in manifest
|
|
614
792
|
* @param {number} [level=0] Section level in tree
|
|
@@ -663,7 +841,7 @@ function addSection(generateParameters, facets, facetKey, sections, appSchema, s
|
|
|
663
841
|
/**
|
|
664
842
|
* Derives the sections from the UI.Facets annotation and adds them to the schema
|
|
665
843
|
* @param {GenerateAppSchemaParameters} generateParameters - list of API input parameters
|
|
666
|
-
* @param {object} appSchema - application specific JSON schema
|
|
844
|
+
* @param {object} appSchema - application specific JSON schema of the object page
|
|
667
845
|
* @param {SapUiAppPageV4} v4Page - current page
|
|
668
846
|
*/
|
|
669
847
|
function addSections(generateParameters, appSchema, v4Page) {
|
|
@@ -688,7 +866,7 @@ function addSections(generateParameters, appSchema, v4Page) {
|
|
|
688
866
|
/**
|
|
689
867
|
* Derives the header sections from the UI.HeaderFacets annotation and adds them to the schema
|
|
690
868
|
* @param {GenerateAppSchemaParameters} generateParameters - list of API input parameters
|
|
691
|
-
* @param {object} appSchema - application specific JSON schema
|
|
869
|
+
* @param {object} appSchema - application specific JSON schema of the object page
|
|
692
870
|
* @param {EntityType} entityType - current entity type
|
|
693
871
|
* @param {SapUiAppPageV4} v4Page - current page in manifest
|
|
694
872
|
*/
|
|
@@ -717,7 +895,7 @@ function addHeaderSections(generateParameters, appSchema, entityType, v4Page) {
|
|
|
717
895
|
/**
|
|
718
896
|
* Adds the related facets keys 'enum' to the app schema
|
|
719
897
|
* @param {GenerateAppSchemaParameters} generateParameters - list of API input parameters
|
|
720
|
-
* @param {object} schema - app specific schema that
|
|
898
|
+
* @param {object} schema - app specific schema of the object page that gets enhanced
|
|
721
899
|
* @param {SapUiAppPageV4[]} pages - list of all pages
|
|
722
900
|
* @param {string} contextPath - contextPath of the actual (object) page
|
|
723
901
|
*/
|
|
@@ -758,14 +936,14 @@ function addRelatedFacetKeysType(generateParameters, schema, pages, contextPath)
|
|
|
758
936
|
/**
|
|
759
937
|
* Add Object Page Header to app-specific schema
|
|
760
938
|
* @param {GenerateAppSchemaParameters} generateParameters - list of API input parameters
|
|
761
|
-
* @param {Definition} appSchema Schema of the
|
|
939
|
+
* @param {Definition} appSchema Schema of the object page
|
|
762
940
|
* @param {SapUiAppPageV4} v4Page - current page in manifest
|
|
763
941
|
*/
|
|
764
942
|
function addHeader(generateParameters, appSchema, v4Page) {
|
|
765
943
|
const entityType = generateParameters.entityType;
|
|
766
944
|
(0, common_1.addCommonHeaderSchema)(appSchema, entityType);
|
|
767
945
|
// Add header actions
|
|
768
|
-
(0, common_1.addHeaderActions)(appSchema, entityType, generateParameters.serviceAVT, addHeaderActionCallBackV4);
|
|
946
|
+
(0, common_1.addHeaderActions)(appSchema, entityType, generateParameters.entitySet, generateParameters.serviceAVT, addHeaderActionCallBackV4);
|
|
769
947
|
// Add custom header actions
|
|
770
948
|
addHeaderFooterCustomActionsOP(appSchema, v4Page, ux_specification_types_1.DefinitionName.CustomHeaderActionOP, generateParameters.logger);
|
|
771
949
|
// Add header sections
|
|
@@ -778,8 +956,8 @@ function addHeader(generateParameters, appSchema, v4Page) {
|
|
|
778
956
|
* Generates an app specific schema out of the generic schema.
|
|
779
957
|
* Generic types are replaced by information from the app specific annotations.
|
|
780
958
|
* @param {GenerateAppSchemaParameters} generateParameters - list of API input parameters
|
|
781
|
-
* @param genericSchema - generic JSON schema of an object page
|
|
782
|
-
* @param contextPath - contextPath of the given page
|
|
959
|
+
* @param {object} genericSchema - generic JSON schema of an object page
|
|
960
|
+
* @param {string} contextPath - contextPath of the given page
|
|
783
961
|
* @param {object} genericMacrosSchema - generic JSON schema of custom page
|
|
784
962
|
*
|
|
785
963
|
* @returns the app specific JSON schema
|