@sap/ux-specification 1.71.46 → 1.71.50
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 +89 -6
- package/dist/documentation/runDocu-min.js +1 -1
- package/dist/documentation/styleDocu.css +4 -5
- package/dist/documentation/v2/v2-AnalyticalListPage.html +1 -1
- package/dist/documentation/v2/v2-ApplicationV2.html +1 -1
- package/dist/documentation/v2/v2-ListReport.html +1 -1
- package/dist/documentation/v2/v2-ObjectPage.html +1 -1
- package/dist/documentation/v2/v2-OverviewPage.html +1 -1
- package/dist/index-min.js +1 -1
- package/dist/schemas/v2/AnalyticalListPageConfig.json +107 -40
- package/dist/schemas/v2/ListReportConfig.json +110 -32
- package/dist/schemas/v2/ObjectPageConfig.json +245 -56
- package/dist/schemas/v2/OverviewPageConfig.json +236 -190
- package/dist/scripts/extractDocu.js +18 -8
- package/dist/scripts/extractDocu.js.map +1 -1
- package/dist/scripts/runDocu.js +105 -89
- package/dist/scripts/runDocu.js.map +1 -1
- package/dist/scripts/to-json-schema.js +27 -32
- package/dist/scripts/to-json-schema.js.map +1 -1
- package/dist/specification/v2/index-min.js +1 -1
- package/dist/src/api.js +3 -3
- package/dist/src/api.js.map +1 -1
- package/dist/src/apiTypes.d.ts +1 -2
- package/dist/src/specification/common/types.d.ts +4 -0
- package/dist/src/specification/common/types.js +5 -0
- package/dist/src/specification/common/types.js.map +1 -1
- package/dist/src/specification/schemaAccess.js +1 -3
- package/dist/src/specification/schemaAccess.js.map +1 -1
- package/dist/src/specification/v2/controls/Action.d.ts +82 -0
- package/dist/src/specification/v2/controls/{FormAction.js → Action.js} +1 -1
- package/dist/src/specification/v2/controls/Action.js.map +1 -0
- package/dist/src/specification/v2/controls/Card.d.ts +20 -72
- package/dist/src/specification/v2/controls/Card.js.map +1 -1
- package/dist/src/specification/v2/controls/FilterBar.d.ts +6 -2
- package/dist/src/specification/v2/controls/Footer.d.ts +20 -0
- package/dist/src/specification/v2/controls/{ObjectPageFooter.js → Footer.js} +1 -1
- package/dist/src/specification/v2/controls/Footer.js.map +1 -0
- package/dist/src/specification/v2/controls/ObjectPageForm.d.ts +1 -2
- package/dist/src/specification/v2/controls/ObjectPageHeader.d.ts +1 -1
- package/dist/src/specification/v2/controls/ObjectPageTable.d.ts +5 -0
- package/dist/src/specification/v2/controls/ObjectPageTable.js.map +1 -1
- package/dist/src/specification/v2/controls/ObjectPageToolBar.d.ts +1 -5
- package/dist/src/specification/v2/controls/Table.d.ts +14 -10
- package/dist/src/specification/v2/controls/Table.js.map +1 -1
- package/dist/src/specification/v2/controls/ToolBar.d.ts +1 -8
- package/dist/src/specification/v2/controls/index.d.ts +8 -10
- package/dist/src/specification/v2/controls/index.js +3 -3
- package/dist/src/specification/v2/controls/index.js.map +1 -1
- package/dist/src/specification/v2/pages/AnalyticalListPageConfig.d.ts +2 -1
- package/dist/src/specification/v2/pages/ListReportConfig.d.ts +3 -2
- package/dist/src/sync/common/appProvider.js.map +1 -1
- package/dist/src/sync/common/decoration/control.d.ts +11 -1
- package/dist/src/sync/common/decoration/control.js +29 -3
- package/dist/src/sync/common/decoration/control.js.map +1 -1
- package/dist/src/sync/common/decoration/factory.js +2 -4
- package/dist/src/sync/common/decoration/factory.js.map +1 -1
- package/dist/src/sync/common/generate/index.d.ts +1 -0
- package/dist/src/sync/common/generate/index.js +1 -0
- package/dist/src/sync/common/generate/index.js.map +1 -1
- package/dist/src/sync/common/generate/objectPage.d.ts +8 -0
- package/dist/src/sync/common/generate/objectPage.js +28 -12
- package/dist/src/sync/common/generate/objectPage.js.map +1 -1
- package/dist/src/sync/common/generate/utils.d.ts +60 -0
- package/dist/src/sync/common/generate/utils.js +208 -0
- package/dist/src/sync/common/generate/utils.js.map +1 -0
- package/dist/src/sync/common/i18n.json +2 -0
- package/dist/src/sync/common/import/utils.d.ts +8 -1
- package/dist/src/sync/common/import/utils.js +14 -3
- package/dist/src/sync/common/import/utils.js.map +1 -1
- package/dist/src/sync/common/importProject.js +13 -20
- package/dist/src/sync/common/importProject.js.map +1 -1
- package/dist/src/sync/common/types.d.ts +29 -15
- package/dist/src/sync/common/types.js +25 -1
- package/dist/src/sync/common/types.js.map +1 -1
- package/dist/src/sync/common/utils.d.ts +12 -24
- package/dist/src/sync/common/utils.js +31 -97
- package/dist/src/sync/common/utils.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Action.d.ts +28 -0
- package/dist/src/sync/v2/export/controls/Action.js +127 -0
- package/dist/src/sync/v2/export/controls/Action.js.map +1 -0
- package/dist/src/sync/v2/export/controls/Card.d.ts +3 -7
- package/dist/src/sync/v2/export/controls/Card.js +15 -43
- package/dist/src/sync/v2/export/controls/Card.js.map +1 -1
- package/dist/src/sync/v2/export/controls/FilterBar.d.ts +4 -3
- package/dist/src/sync/v2/export/controls/FilterBar.js +25 -15
- package/dist/src/sync/v2/export/controls/FilterBar.js.map +1 -1
- package/dist/src/sync/v2/export/controls/FormAction.js +3 -2
- package/dist/src/sync/v2/export/controls/FormAction.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Fragment.d.ts +1 -1
- package/dist/src/sync/v2/export/controls/Fragment.js +244 -168
- package/dist/src/sync/v2/export/controls/Fragment.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.d.ts +8 -0
- package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.js +62 -0
- package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.js.map +1 -0
- package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.js +11 -29
- package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.d.ts +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js +2 -2
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageTable.d.ts +5 -1
- package/dist/src/sync/v2/export/controls/ObjectPageTable.js +25 -0
- package/dist/src/sync/v2/export/controls/ObjectPageTable.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageToolBarAction.d.ts +8 -0
- package/dist/src/sync/v2/export/controls/ObjectPageToolBarAction.js +61 -0
- package/dist/src/sync/v2/export/controls/ObjectPageToolBarAction.js.map +1 -0
- package/dist/src/sync/v2/export/controls/Table.d.ts +5 -4
- package/dist/src/sync/v2/export/controls/Table.js +16 -21
- package/dist/src/sync/v2/export/controls/Table.js.map +1 -1
- package/dist/src/sync/v2/export/controls/TableColumn.d.ts +18 -2
- package/dist/src/sync/v2/export/controls/TableColumn.js +126 -1
- package/dist/src/sync/v2/export/controls/TableColumn.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ToolBar.d.ts +4 -0
- package/dist/src/sync/v2/export/controls/ToolBar.js +6 -0
- package/dist/src/sync/v2/export/controls/ToolBar.js.map +1 -0
- package/dist/src/sync/v2/export/controls/index.d.ts +11 -7
- package/dist/src/sync/v2/export/controls/index.js +11 -7
- package/dist/src/sync/v2/export/controls/index.js.map +1 -1
- package/dist/src/sync/v2/export/export.js +134 -111
- package/dist/src/sync/v2/export/export.js.map +1 -1
- package/dist/src/sync/v2/export/exportPage.js +3 -2
- package/dist/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/src/sync/v2/export/manifest.js +2 -5
- package/dist/src/sync/v2/export/manifest.js.map +1 -1
- package/dist/src/sync/v2/export/pages/AnalyticalListPage.d.ts +2 -1
- package/dist/src/sync/v2/export/pages/AnalyticalListPage.js +3 -0
- package/dist/src/sync/v2/export/pages/AnalyticalListPage.js.map +1 -1
- package/dist/src/sync/v2/export/pages/ListReport.d.ts +3 -2
- package/dist/src/sync/v2/export/pages/ListReport.js +3 -0
- package/dist/src/sync/v2/export/pages/ListReport.js.map +1 -1
- package/dist/src/sync/v2/export/view-controller-generator.d.ts +16 -21
- package/dist/src/sync/v2/export/view-controller-generator.js +20 -36
- package/dist/src/sync/v2/export/view-controller-generator.js.map +1 -1
- package/dist/src/sync/v2/generate/analyticalListReport.js +16 -8
- package/dist/src/sync/v2/generate/analyticalListReport.js.map +1 -1
- package/dist/src/sync/v2/generate/listReport.d.ts +8 -0
- package/dist/src/sync/v2/generate/listReport.js +26 -7
- package/dist/src/sync/v2/generate/listReport.js.map +1 -1
- package/dist/src/sync/v2/generate/objectPage.d.ts +1 -6
- package/dist/src/sync/v2/generate/objectPage.js +203 -110
- package/dist/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v2/generate/utils.d.ts +16 -12
- package/dist/src/sync/v2/generate/utils.js +235 -98
- package/dist/src/sync/v2/generate/utils.js.map +1 -1
- package/dist/src/sync/v2/import/common/index.d.ts +29 -4
- package/dist/src/sync/v2/import/common/index.js +329 -45
- package/dist/src/sync/v2/import/common/index.js.map +1 -1
- package/dist/src/sync/v2/import/controls/table.js +3 -2
- package/dist/src/sync/v2/import/controls/table.js.map +1 -1
- package/dist/src/sync/v2/import/pages/analyticalListPage.js +27 -5
- package/dist/src/sync/v2/import/pages/analyticalListPage.js.map +1 -1
- package/dist/src/sync/v2/import/pages/listReport.d.ts +0 -5
- package/dist/src/sync/v2/import/pages/listReport.js +21 -100
- package/dist/src/sync/v2/import/pages/listReport.js.map +1 -1
- package/dist/src/sync/v2/import/pages/objectPage.d.ts +1 -1
- package/dist/src/sync/v2/import/pages/objectPage.js +440 -298
- package/dist/src/sync/v2/import/pages/objectPage.js.map +1 -1
- package/dist/src/sync/v2/import/utils.d.ts +4 -6
- package/dist/src/sync/v2/import/utils.js +32 -11
- package/dist/src/sync/v2/import/utils.js.map +1 -1
- package/dist/src/sync/v2/types.d.ts +28 -2
- package/dist/src/sync/v2/types.js +14 -0
- package/dist/src/sync/v2/types.js.map +1 -1
- package/dist/test/unit/utils.test.d.ts +1 -1
- package/package.json +12 -11
- package/dist/src/specification/v2/controls/FormAction.d.ts +0 -38
- package/dist/src/specification/v2/controls/FormAction.js.map +0 -1
- package/dist/src/specification/v2/controls/ObjectPageFooter.d.ts +0 -11
- package/dist/src/specification/v2/controls/ObjectPageFooter.js.map +0 -1
- package/dist/src/specification/v2/controls/ObjectPageHeaderAction.d.ts +0 -27
- package/dist/src/specification/v2/controls/ObjectPageHeaderAction.js +0 -3
- package/dist/src/specification/v2/controls/ObjectPageHeaderAction.js.map +0 -1
- package/dist/test/test-utils/metadataParser.d.ts +0 -19
|
@@ -13,9 +13,71 @@ const sapUiPageV2_1 = require("../.../../../../../specification/v2/webapp/manife
|
|
|
13
13
|
const i18next_1 = __importDefault(require("i18next"));
|
|
14
14
|
const i18n_1 = require("../../../../i18n/i18n");
|
|
15
15
|
const common_2 = require("../../../../specification/common");
|
|
16
|
-
const listReport_1 = require("../pages/listReport");
|
|
17
16
|
const factory_1 = require("../../export/factory");
|
|
18
17
|
const types_1 = require("../../types");
|
|
18
|
+
const common_3 = require("../common");
|
|
19
|
+
/**
|
|
20
|
+
* Determines Facet ID from single string selector Id
|
|
21
|
+
* @param {string} selectorId Selector ID
|
|
22
|
+
* @returns {string} FacetID
|
|
23
|
+
*/
|
|
24
|
+
function getSingleSelectorIdPart(selectorIdParts, facetID) {
|
|
25
|
+
const lastIdParts = selectorIdParts[0].split('-');
|
|
26
|
+
const id = lastIdParts[lastIdParts.length - 1];
|
|
27
|
+
if (selectorIdParts[0].indexOf('::action::') >= 0 || selectorIdParts[0].startsWith('action::')) {
|
|
28
|
+
// Object Page ToolBar Actions
|
|
29
|
+
facetID =
|
|
30
|
+
lastIdParts[0].split('::action::')[0] ||
|
|
31
|
+
lastIdParts[0].split(`${"com.sap.vocabularies.UI.v1.LineItem" /* LineItem */}::`)[1].split('::')[0];
|
|
32
|
+
facetID = `Action ID: ${facetID}`;
|
|
33
|
+
}
|
|
34
|
+
else if (selectorIdParts[0].indexOf("com.sap.vocabularies.UI.v1.LineItem" /* LineItem */) >= 0 ||
|
|
35
|
+
selectorIdParts[0].indexOf('UI.LineItem') >= 0 ||
|
|
36
|
+
selectorIdParts[0].indexOf('::Table') >= 0) {
|
|
37
|
+
facetID = lastIdParts[0]
|
|
38
|
+
.split('::Table')[0]
|
|
39
|
+
.split('::responsiveTable')[0]
|
|
40
|
+
.replace(/::/g, '/@');
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
const idParts = id.split('::');
|
|
44
|
+
if (idParts.length > 1) {
|
|
45
|
+
facetID = idParts[0];
|
|
46
|
+
}
|
|
47
|
+
else if (lastIdParts[0].indexOf('::') > -1) {
|
|
48
|
+
facetID = lastIdParts[0].split('::')[0];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return facetID;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Determines Facet ID of flex change
|
|
55
|
+
* @param {string} selectorId Control ID of flex change
|
|
56
|
+
* @returns {string} FacetID
|
|
57
|
+
*/
|
|
58
|
+
function getFacetID(selectorId) {
|
|
59
|
+
let facetID;
|
|
60
|
+
const selectorIdParts = selectorId.split(':::');
|
|
61
|
+
if (selectorIdParts.length === 1) {
|
|
62
|
+
facetID = getSingleSelectorIdPart(selectorIdParts, facetID);
|
|
63
|
+
}
|
|
64
|
+
else if (selectorId.indexOf('sSmartTableId') >= 0) {
|
|
65
|
+
for (const element of selectorIdParts) {
|
|
66
|
+
if (element.startsWith('sSmartTableId')) {
|
|
67
|
+
facetID = element
|
|
68
|
+
.split('sSmartTableId::')[1]
|
|
69
|
+
.split('::Table')[0]
|
|
70
|
+
.split('/responsiveTable')[0]
|
|
71
|
+
.replace(`::${"com.sap.vocabularies.UI.v1.LineItem" /* LineItem */}`, `/@${"com.sap.vocabularies.UI.v1.LineItem" /* LineItem */}`);
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
facetID = selectorIdParts[0];
|
|
78
|
+
}
|
|
79
|
+
return facetID;
|
|
80
|
+
}
|
|
19
81
|
/**
|
|
20
82
|
* Prepares the list of flex changes
|
|
21
83
|
* @param change - the flex change (UI Adaptation)
|
|
@@ -31,52 +93,12 @@ function prepareFlexChanges(changes, entitySet, logger) {
|
|
|
31
93
|
const change = common_1.parseChangeString(changeString);
|
|
32
94
|
if (change && ((_a = change.controlId) === null || _a === void 0 ? void 0 : _a.includes(sapUiPageV2_1.FE_TEMPLATE_V2_OBJECT_PAGE)) && ((_b = change.controlId) === null || _b === void 0 ? void 0 : _b.includes(entitySet))) {
|
|
33
95
|
let selectorId = change.controlId.split('--')[1].replace(/:3a:3a/g, '::');
|
|
34
|
-
const complexIdMatch =
|
|
96
|
+
const complexIdMatch = /.+DataField.+:::sSmartTableId::.+/;
|
|
35
97
|
if (complexIdMatch.exec(selectorId) !== null) {
|
|
36
98
|
selectorId = selectorId.split('template:::TableColumn:::')[1];
|
|
37
99
|
}
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
if (selectorIdParts.length === 1) {
|
|
41
|
-
const lastIdParts = selectorIdParts[0].split('-');
|
|
42
|
-
id = lastIdParts[lastIdParts.length - 1];
|
|
43
|
-
if (selectorIdParts[0].indexOf("com.sap.vocabularies.UI.v1.LineItem" /* LineItem */) >= 0 ||
|
|
44
|
-
selectorIdParts[0].indexOf('UI.LineItem') >= 0 ||
|
|
45
|
-
selectorIdParts[0].indexOf('::Table') >= 0) {
|
|
46
|
-
facetID = lastIdParts[0]
|
|
47
|
-
.split('::Table')[0]
|
|
48
|
-
.split('::responsiveTable')[0]
|
|
49
|
-
.replace(/::/g, '/@');
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
const idParts = id.split('::');
|
|
53
|
-
if (idParts.length > 1) {
|
|
54
|
-
facetID = idParts[0];
|
|
55
|
-
}
|
|
56
|
-
else if (lastIdParts[0].indexOf('::') > -1) {
|
|
57
|
-
facetID = lastIdParts[0].split('::')[0];
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
else if (selectorId.indexOf('sSmartTableId') >= 0) {
|
|
62
|
-
for (const element of selectorIdParts) {
|
|
63
|
-
if (element.startsWith('sSmartTableId')) {
|
|
64
|
-
facetID = element
|
|
65
|
-
.split('sSmartTableId::')[1]
|
|
66
|
-
.split('::Table')[0]
|
|
67
|
-
.split('/responsiveTable')[0]
|
|
68
|
-
.replace(`::${"com.sap.vocabularies.UI.v1.LineItem" /* LineItem */}`, `/@${"com.sap.vocabularies.UI.v1.LineItem" /* LineItem */}`);
|
|
69
|
-
break;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
facetID = selectorIdParts[0];
|
|
75
|
-
}
|
|
76
|
-
selectorId = selectorId
|
|
77
|
-
.replace(/:2f/g, '/')
|
|
78
|
-
.replace(/:40/g, '@')
|
|
79
|
-
.replace(/:23/g, '#')
|
|
100
|
+
const facetID = getFacetID(selectorId);
|
|
101
|
+
selectorId = common_3.convertSelector(selectorId)
|
|
80
102
|
.replace(/:3a:3a/g, '::')
|
|
81
103
|
.replace(/\/@com.sap.vocabularies/g, '::com.sap.vocabularies');
|
|
82
104
|
if (result[selectorId] && result[selectorId].propertyId !== change.content.property) {
|
|
@@ -101,24 +123,152 @@ function prepareFlexChanges(changes, entitySet, logger) {
|
|
|
101
123
|
});
|
|
102
124
|
return result;
|
|
103
125
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
126
|
+
/**
|
|
127
|
+
* Returns the type of a given section
|
|
128
|
+
* @param schemaSection - current section
|
|
129
|
+
* @returns {SectionTypeV2} - type of section, differentiated by level (Sub/Section)
|
|
130
|
+
*/
|
|
107
131
|
const getSectionType = (schemaSection) => {
|
|
132
|
+
var _a, _b, _c;
|
|
108
133
|
let reference;
|
|
109
134
|
if (schemaSection['$ref']) {
|
|
110
135
|
reference = schemaSection['$ref'].includes('<') ? schemaSection['$ref'].split('<')[0] : schemaSection['$ref'];
|
|
111
136
|
return reference.replace(common_1.DEFINITION_LINK_PREFIX, '');
|
|
112
137
|
}
|
|
113
|
-
else if (schemaSection['properties']['subsections']['$ref']) {
|
|
138
|
+
else if ((_b = (_a = schemaSection['properties']) === null || _a === void 0 ? void 0 : _a['subsections']) === null || _b === void 0 ? void 0 : _b['$ref']) {
|
|
114
139
|
reference = schemaSection['properties']['subsections']['$ref'];
|
|
115
140
|
reference = reference.includes('<') ? reference.split('<')[0] : reference;
|
|
116
141
|
return reference.replace(common_1.DEFINITION_LINK_PREFIX, '');
|
|
117
142
|
}
|
|
118
|
-
else if (schemaSection['properties']['subsections']) {
|
|
143
|
+
else if ((_c = schemaSection['properties']) === null || _c === void 0 ? void 0 : _c['subsections']) {
|
|
119
144
|
return types_1.SectionTypeV2.SubSection;
|
|
120
145
|
}
|
|
121
146
|
};
|
|
147
|
+
/**
|
|
148
|
+
* Import of flex changes of a table to the config JSON of OP
|
|
149
|
+
* @param flexChanges - list of flex changes (pre-processed by prepareFlexChanges)
|
|
150
|
+
* @param propertyKey - key of the current property in the app schema
|
|
151
|
+
* @param configPart - part of the configuration to be filled
|
|
152
|
+
* @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
|
|
153
|
+
* @param sectionTitle - title of the section (optional)
|
|
154
|
+
* @param sectionId - ID of the given section (optional)
|
|
155
|
+
*/
|
|
156
|
+
function importFlexChangesOfTable(flexChanges, propertyKey, configPart, importParameters, sectionTitle, sectionId) {
|
|
157
|
+
const unescapedId = sectionId === null || sectionId === void 0 ? void 0 : sectionId.replace(/::@com.sap.vocabularies/g, v2_1.VOCWITHSLASH);
|
|
158
|
+
for (const selector in flexChanges) {
|
|
159
|
+
const flexChange = flexChanges[selector];
|
|
160
|
+
const propertyIdMatch = flexChange.propertyId === propertyKey;
|
|
161
|
+
const isTableColumn = propertyKey === 'columns' && flexChange.controlType === common_1.ControlType.TableColumn;
|
|
162
|
+
let facetIds;
|
|
163
|
+
if (sectionTitle) {
|
|
164
|
+
facetIds = [sectionTitle];
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
facetIds = [sectionId, unescapedId];
|
|
168
|
+
}
|
|
169
|
+
if ((propertyIdMatch || isTableColumn) && facetIds.indexOf(flexChange === null || flexChange === void 0 ? void 0 : flexChange.facetId) > -1) {
|
|
170
|
+
table_1.addFlexForTable(configPart, flexChanges[selector], importParameters.jsonSchema);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Import of (regular) flex changes to the config JSON of OP
|
|
176
|
+
* @param schemaDefinition - current section of the app specific schema
|
|
177
|
+
* @param configPart - part of the configuration to be filled
|
|
178
|
+
* @param flexChanges - list of flex changes (pre-processed by prepareFlexChanges)
|
|
179
|
+
* @param propertyKey - key of the current property in the app schema
|
|
180
|
+
* @param sectionTitle - title of the section (optional)
|
|
181
|
+
* @param actionId - ID of the given action (optional)
|
|
182
|
+
*/
|
|
183
|
+
function importFlexChanges(schemaDefinition, configPart, flexChanges, propertyKey, sectionTitle, actionId) {
|
|
184
|
+
var _a, _b;
|
|
185
|
+
for (const selector in flexChanges) {
|
|
186
|
+
const flexChange = flexChanges[selector];
|
|
187
|
+
const actionIdMatch = !actionId || new RegExp(`.*${actionId}\\d?$`).test(selector);
|
|
188
|
+
const propertyIdMatch = flexChange.propertyId === propertyKey;
|
|
189
|
+
const schemaControlType = (_a = schemaDefinition['properties'][flexChange.propertyId]) === null || _a === void 0 ? void 0 : _a.controlType;
|
|
190
|
+
const controlTypeMatch = flexChange.controlType === schemaControlType;
|
|
191
|
+
if (
|
|
192
|
+
// Actions
|
|
193
|
+
(((_b = flexChange === null || flexChange === void 0 ? void 0 : flexChange.facetId) === null || _b === void 0 ? void 0 : _b.includes(common_1.ActionTitlePrefix)) && !sectionTitle && actionIdMatch && propertyIdMatch) ||
|
|
194
|
+
(!sectionTitle && actionIdMatch && propertyIdMatch && controlTypeMatch) ||
|
|
195
|
+
// Sections
|
|
196
|
+
(selector.includes(sectionTitle) && actionIdMatch && propertyIdMatch && controlTypeMatch)) {
|
|
197
|
+
configPart[propertyKey] = flexChange.newValue;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Checks for deprecated properties and writes them to the log
|
|
203
|
+
* @param manifestSection - given section in the manifest
|
|
204
|
+
* @param deprecatedProperties - list of deperecated properties
|
|
205
|
+
* @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
|
|
206
|
+
* @param manifestPath - manifest path, as calcualted by the sync rule
|
|
207
|
+
*/
|
|
208
|
+
function checkDeprecatedProperties(manifestSection, deprecatedProperties, importParameters, manifestPath) {
|
|
209
|
+
if (manifestSection && deprecatedProperties) {
|
|
210
|
+
for (const key in manifestSection) {
|
|
211
|
+
const deprecated = deprecatedProperties[key];
|
|
212
|
+
if (deprecated) {
|
|
213
|
+
extensionLogger_1.log(importParameters.logger, {
|
|
214
|
+
severity: "warning" /* Warning */,
|
|
215
|
+
message: common_1.getTextForDeprecated(key, deprecated),
|
|
216
|
+
location: {
|
|
217
|
+
path: 'webapp/manifest.json/',
|
|
218
|
+
range: manifestPath.split('/')
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
delete deprecatedProperties[key];
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Imports manifest settings to the object page config
|
|
228
|
+
* @param syncRule - sync rule for accessing the reflect-metadata
|
|
229
|
+
* @param pageKeys - list of page keys (comprises the one entry describing the given page)
|
|
230
|
+
* @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
|
|
231
|
+
* @param configPart - part of the configuration to be filled
|
|
232
|
+
* @param propertyKey - key of the current property of the schema definition
|
|
233
|
+
* @param deprecatedProperties - list od deperecated properties
|
|
234
|
+
* @param sectionId - ID of the given section (optional)
|
|
235
|
+
* @param sectionTitle - title of the section (optional)
|
|
236
|
+
*/
|
|
237
|
+
function importManifestSetting(syncRule, pageKeys, importParameters, configPart, propertyKey, deprecatedProperties, sectionId, sectionTitle) {
|
|
238
|
+
const sectionIdInManifest = sectionId ? sectionId.replace(/\/@/g, '::').replace(/@com.sap/g, 'com.sap') : undefined;
|
|
239
|
+
let manifestPath;
|
|
240
|
+
let manifestSection;
|
|
241
|
+
if (sectionTitle) {
|
|
242
|
+
manifestPath = syncRule.manifest.path(pageKeys, {}, sectionTitle);
|
|
243
|
+
if (Object.values(manifest_1.getManifestSectionByPathV2(importParameters.manifest, manifestPath)).length !== 0) {
|
|
244
|
+
manifestSection = manifest_1.getManifestSectionByPathV2(importParameters.manifest, manifestPath);
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
manifestPath = syncRule.manifest.path(pageKeys, {}, sectionIdInManifest);
|
|
248
|
+
manifestSection = manifest_1.getManifestSectionByPathV2(importParameters.manifest, manifestPath);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
manifestPath = syncRule.manifest.path(pageKeys, {}, sectionIdInManifest);
|
|
253
|
+
manifestSection = manifest_1.getManifestSectionByPathV2(importParameters.manifest, manifestPath);
|
|
254
|
+
}
|
|
255
|
+
const importHandler = syncRule.manifest.import;
|
|
256
|
+
if (importHandler && typeof importHandler === 'function') {
|
|
257
|
+
const value = importHandler(manifestSection, sectionId);
|
|
258
|
+
if (value !== undefined) {
|
|
259
|
+
configPart[propertyKey] = value;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
const manifestKey = syncRule.manifest.key || propertyKey;
|
|
264
|
+
if (manifestKey in manifestSection) {
|
|
265
|
+
configPart[propertyKey] = manifestSection[manifestKey];
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
// Check for deprecated properties.
|
|
269
|
+
checkDeprecatedProperties(manifestSection, deprecatedProperties, importParameters, manifestPath);
|
|
270
|
+
return manifestSection;
|
|
271
|
+
}
|
|
122
272
|
/**
|
|
123
273
|
* Transfers settings from manifest and flexChanges to object page config
|
|
124
274
|
* @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
|
|
@@ -127,129 +277,102 @@ const getSectionType = (schemaSection) => {
|
|
|
127
277
|
* @param pageKeys - list of page keys (comprises the one entry describing the given page)
|
|
128
278
|
* @param flexChanges - list of flex changes (pre-processed by prepareFlexChanges)
|
|
129
279
|
* @param sectionId - ID of the given section (optional)
|
|
130
|
-
* @param sectionTitle -
|
|
280
|
+
* @param sectionTitle - Facet ID of the given section mentioned in annotations (optional)
|
|
131
281
|
* @param actionId - ID of the given action (optional)
|
|
132
282
|
*/
|
|
133
283
|
function transferSettingsAndFlexChanges(importParameters, configPart, schemaDefinition, pageKeys, flexChanges, sectionId, sectionTitle, actionId) {
|
|
134
|
-
var _a;
|
|
135
284
|
if (!schemaDefinition) {
|
|
136
285
|
return;
|
|
137
286
|
}
|
|
138
|
-
let deprecatedProperties =
|
|
139
|
-
let manifestSection = {};
|
|
287
|
+
let deprecatedProperties = {};
|
|
140
288
|
if (configPart === null || configPart === void 0 ? void 0 : configPart.getDeprecated) {
|
|
141
289
|
deprecatedProperties = configPart.getDeprecated();
|
|
142
290
|
}
|
|
143
|
-
const unescapedId = sectionId && sectionId.replace(/::@com.sap.vocabularies/g, v2_1.VOCWITHSLASH);
|
|
144
291
|
for (const propertyKey in schemaDefinition['properties'] || schemaDefinition) {
|
|
145
292
|
const syncRule = common_1.getReflectMetadata(configPart, propertyKey);
|
|
146
293
|
if (syncRule || propertyKey === 'columns') {
|
|
147
|
-
if (propertyKey === 'columns' || (syncRule
|
|
294
|
+
if (propertyKey === 'columns' || (syncRule === null || syncRule === void 0 ? void 0 : syncRule.flex)) {
|
|
148
295
|
if (sectionId) {
|
|
149
|
-
|
|
150
|
-
const flexChange = flexChanges[selector];
|
|
151
|
-
const propertyIdMatch = flexChange.propertyId === propertyKey;
|
|
152
|
-
const isTableColumn = propertyKey === 'columns' && flexChange.controlType === common_1.ControlType.TableColumn;
|
|
153
|
-
const facetIds = [sectionId, unescapedId, sectionTitle];
|
|
154
|
-
if ((propertyIdMatch || isTableColumn) && facetIds.indexOf(flexChange === null || flexChange === void 0 ? void 0 : flexChange.facetId) > -1) {
|
|
155
|
-
table_1.addFlexForTable(configPart, flexChanges[selector], importParameters.jsonSchema);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
296
|
+
importFlexChangesOfTable(flexChanges, propertyKey, configPart, importParameters, sectionTitle, sectionId);
|
|
158
297
|
}
|
|
159
298
|
else {
|
|
160
|
-
|
|
161
|
-
const flexChange = flexChanges[selector];
|
|
162
|
-
const actionIdMatch = !actionId || new RegExp(`.*${actionId}\\d?$`).test(selector);
|
|
163
|
-
const propertyIdMatch = flexChange.propertyId === propertyKey;
|
|
164
|
-
const schemaControlType = (_a = schemaDefinition['properties'][flexChange.propertyId]) === null || _a === void 0 ? void 0 : _a.controlType;
|
|
165
|
-
const controlTypeMatch = flexChange.controlType === schemaControlType;
|
|
166
|
-
if (!flexChange.facetId && actionIdMatch && propertyIdMatch) {
|
|
167
|
-
addFlexToConfig(configPart, propertyKey, flexChange.newValue);
|
|
168
|
-
break;
|
|
169
|
-
}
|
|
170
|
-
else if (flexChange.facetId === 'action' &&
|
|
171
|
-
!sectionTitle &&
|
|
172
|
-
actionIdMatch &&
|
|
173
|
-
propertyIdMatch) {
|
|
174
|
-
// Actions
|
|
175
|
-
addFlexToConfig(configPart, propertyKey, flexChange.newValue);
|
|
176
|
-
break;
|
|
177
|
-
}
|
|
178
|
-
else if (!sectionTitle && actionIdMatch && propertyIdMatch && controlTypeMatch) {
|
|
179
|
-
addFlexToConfig(configPart, propertyKey, flexChange.newValue);
|
|
180
|
-
break;
|
|
181
|
-
}
|
|
182
|
-
else if (selector.includes(sectionTitle) &&
|
|
183
|
-
actionIdMatch &&
|
|
184
|
-
propertyIdMatch &&
|
|
185
|
-
controlTypeMatch) {
|
|
186
|
-
// Sections
|
|
187
|
-
addFlexToConfig(configPart, propertyKey, flexChange.newValue);
|
|
188
|
-
break;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
299
|
+
importFlexChanges(schemaDefinition, configPart, flexChanges, propertyKey, sectionTitle, actionId);
|
|
191
300
|
}
|
|
192
301
|
}
|
|
193
302
|
else if (syncRule.manifest) {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
303
|
+
importManifestSetting(syncRule, pageKeys, importParameters, configPart, propertyKey, deprecatedProperties, sectionId, sectionTitle);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
*
|
|
310
|
+
* @param actionType - type of action
|
|
311
|
+
* @param configActionId - id of action in config
|
|
312
|
+
* @param {ActionTypeV2|string} importTypeId - type of action that was be initiated
|
|
313
|
+
* @returns {string} actionId - to be used for import of flex changes
|
|
314
|
+
*/
|
|
315
|
+
function getActionId(actionType, configActionId, importTypeId, facetId) {
|
|
316
|
+
if (actionType === types_1.ActionTypeV2.Form) {
|
|
317
|
+
return `${configActionId}::${facetId}::${importTypeId}`;
|
|
318
|
+
}
|
|
319
|
+
else if (actionType === types_1.ActionTypeV2.OPFooter) {
|
|
320
|
+
return `${configActionId}::Determining`;
|
|
321
|
+
}
|
|
322
|
+
else if (actionType === types_1.ActionTypeV2.OPToolBar) {
|
|
323
|
+
return configActionId.includes('sAction::')
|
|
324
|
+
? configActionId.split('sAction::')[1]
|
|
325
|
+
: configActionId.replace(':2f', '::');
|
|
326
|
+
}
|
|
327
|
+
else {
|
|
328
|
+
return configActionId;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Fills the action of the configuration
|
|
333
|
+
* @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
|
|
334
|
+
* @param {object} actionProperties - current properties' list (of action)
|
|
335
|
+
* @param {object} configPart - the given part of the object page config
|
|
336
|
+
* @param {ObjectPageV2ConfigParameters} configParameters - container for factory, pageKeys, flexChanges, v2Page, ObjectPageConfig
|
|
337
|
+
* @param {ActionTypeV2|string} importTypeId - type of action that should be initiated
|
|
338
|
+
*/
|
|
339
|
+
function fillActions(importParameters, actionProperties, configPart, configParameters, importTypeId, facetId) {
|
|
340
|
+
configPart['actions'] = {};
|
|
341
|
+
const actionType = importTypeId.split('::').pop();
|
|
342
|
+
if (configParameters.flexChanges.constructor === Object && Object.keys(configParameters.flexChanges).length !== 0) {
|
|
343
|
+
for (const actionProperty in actionProperties) {
|
|
344
|
+
const configActionId = actionProperty.replace(/@/g, '::');
|
|
345
|
+
const actionId = getActionId(actionType, configActionId, importTypeId, facetId);
|
|
346
|
+
configPart['actions'][configActionId] = configParameters.factory.createInstance(common_2.PageType.ObjectPage, actionType);
|
|
347
|
+
if (actionId) {
|
|
348
|
+
transferSettingsAndFlexChanges(importParameters, configPart['actions'][configActionId], importParameters.jsonSchema['definitions'][actionType], configParameters.pageKeys, configParameters.flexChanges, undefined, undefined, actionId);
|
|
349
|
+
}
|
|
350
|
+
if (Object.keys(configPart['actions'][configActionId]).length === 0) {
|
|
351
|
+
delete configPart['actions'][configActionId];
|
|
229
352
|
}
|
|
230
353
|
}
|
|
231
354
|
}
|
|
355
|
+
if (Object.keys(configPart['actions']).length === 0) {
|
|
356
|
+
delete configPart['actions'];
|
|
357
|
+
}
|
|
232
358
|
}
|
|
233
359
|
/**
|
|
234
360
|
* Fills the fields of an object page form
|
|
361
|
+
* @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
|
|
235
362
|
* @param escapedId - current Id for config part
|
|
236
363
|
* @param fieldProperties - current properties' list (of fields)
|
|
237
364
|
* @param configPart - the given part of the object page config
|
|
238
|
-
* @param
|
|
239
|
-
* @param jsonSchema - app specific schema
|
|
240
|
-
* @param {MetadataInstanceInterface} factory - factory, for generating the access to reflect-metadata
|
|
241
|
-
* @param pageKeys - list of page keys (comprises the one entry describing the given page)
|
|
242
|
-
* @param flexChanges - list of flex changes (pre-processed by prepareFlexChanges)
|
|
365
|
+
* @param {ObjectPageV2ConfigParameters} configParameters - container for factory, pageKeys, flexChanges, v2Page, ObjectPageConfig
|
|
243
366
|
*/
|
|
244
|
-
function fillFields(importParameters, escapedId, fieldProperties, configPart,
|
|
367
|
+
function fillFields(importParameters, escapedId, fieldProperties, configPart, configParameters) {
|
|
245
368
|
let fieldId;
|
|
246
369
|
configPart[escapedId]['form']['fields'] = {};
|
|
247
370
|
for (const fieldProperty in fieldProperties) {
|
|
248
371
|
fieldId = fieldProperty.includes('::')
|
|
249
372
|
? fieldProperty.split('::')[1] + '::GroupElement'
|
|
250
373
|
: fieldProperty + '::GroupElement';
|
|
251
|
-
configPart[escapedId]['form']['fields'][fieldProperty] = factory.createInstance(common_2.PageType.ObjectPage, 'Field');
|
|
252
|
-
transferSettingsAndFlexChanges(importParameters, configPart[escapedId]['form']['fields'][fieldProperty], importParameters.jsonSchema['definitions']['Field'], pageKeys, flexChanges, undefined, undefined, fieldId);
|
|
374
|
+
configPart[escapedId]['form']['fields'][fieldProperty] = configParameters.factory.createInstance(common_2.PageType.ObjectPage, 'Field');
|
|
375
|
+
transferSettingsAndFlexChanges(importParameters, configPart[escapedId]['form']['fields'][fieldProperty], importParameters.jsonSchema['definitions']['Field'], configParameters.pageKeys, configParameters.flexChanges, undefined, undefined, fieldId);
|
|
253
376
|
if (Object.keys(configPart[escapedId]['form']['fields'][fieldProperty]).length === 0) {
|
|
254
377
|
delete configPart[escapedId]['form']['fields'][fieldProperty];
|
|
255
378
|
}
|
|
@@ -259,189 +382,203 @@ function fillFields(importParameters, escapedId, fieldProperties, configPart, fa
|
|
|
259
382
|
}
|
|
260
383
|
}
|
|
261
384
|
/**
|
|
262
|
-
*
|
|
263
|
-
* @param {ImportObjectPageV2Parameters} importParameters
|
|
264
|
-
* @param
|
|
265
|
-
* @param
|
|
266
|
-
* @param {
|
|
267
|
-
* @param
|
|
268
|
-
* @param manifest - manifest.json of the app
|
|
269
|
-
* @param pageKeys - list of page keys (comprises the one entry describing the given page)
|
|
270
|
-
* @param logger - Logger class for logging messages
|
|
271
|
-
* @param sectionId - ID of the current section
|
|
272
|
-
* @param sectionType - Section type (Sub/Section Table)
|
|
385
|
+
* Fills the table section of the object page config
|
|
386
|
+
* @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
|
|
387
|
+
* @param {SectionPartProperties} sectionPart - current properties' list
|
|
388
|
+
* @param {Settings} manifestSettings - object page settings section of the manifest
|
|
389
|
+
* @param {object} configPart - the given part of the object page config
|
|
390
|
+
* @param {ObjectPageV2ConfigParameters} configParameters - container for factory, pageKeys, flexChanges, v2Page, ObjectPageConfig
|
|
273
391
|
*/
|
|
274
|
-
function fillTableInConfig(importParameters,
|
|
275
|
-
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
const manifestKey =
|
|
392
|
+
function fillTableInConfig(importParameters, sectionPart, manifestSettings, configPart, configParameters) {
|
|
393
|
+
var _a, _b;
|
|
394
|
+
const sectionTitle = ((_a = sectionPart.schema['title']) === null || _a === void 0 ? void 0 : _a.startsWith(v2_1.FacetTitlePrefix)) ? sectionPart.schema['title'].split(v2_1.FacetTitlePrefix)[1]
|
|
395
|
+
: undefined;
|
|
396
|
+
const manifestKey = sectionTitle || sectionPart.id.replace('@com.sap', 'com.sap');
|
|
279
397
|
const manifestSection = manifestSettings && manifestSettings.sections && manifestSettings.sections[manifestKey];
|
|
280
|
-
if (manifestSection || flexChanges) {
|
|
281
|
-
const tableType = manifestSection
|
|
282
|
-
? manifestSection.tableSettings
|
|
283
|
-
? manifestSection.tableSettings.type
|
|
284
|
-
? manifestSection.tableSettings.type
|
|
285
|
-
: 'ResponsiveTable'
|
|
286
|
-
: 'ResponsiveTable'
|
|
287
|
-
: 'ResponsiveTable';
|
|
398
|
+
if (manifestSection || configParameters.flexChanges) {
|
|
399
|
+
const tableType = ((_b = manifestSection === null || manifestSection === void 0 ? void 0 : manifestSection.tableSettings) === null || _b === void 0 ? void 0 : _b.type) || 'ResponsiveTable';
|
|
288
400
|
//Instantiate metadata
|
|
289
|
-
const OPtable = factory.createInstance(common_2.PageType.ObjectPage, `ObjectPage${tableType}
|
|
290
|
-
|
|
291
|
-
|
|
401
|
+
const OPtable = configParameters.factory.createInstance(common_2.PageType.ObjectPage, `ObjectPage${tableType}`, {
|
|
402
|
+
toolBar: {}
|
|
403
|
+
});
|
|
404
|
+
configPart[sectionPart.id] = configParameters.factory.createInstance(common_2.PageType.ObjectPage, sectionPart.type, {
|
|
405
|
+
table: {}
|
|
406
|
+
});
|
|
407
|
+
configPart[sectionPart.id]['table'] = OPtable;
|
|
292
408
|
let localJsonSchema;
|
|
293
409
|
const schemaDefinitions = importParameters.jsonSchema['definitions'];
|
|
294
410
|
if (tableType) {
|
|
295
|
-
localJsonSchema = schemaDefinitions['ObjectPage' + tableType + '<' +
|
|
411
|
+
localJsonSchema = schemaDefinitions['ObjectPage' + tableType + '<' + sectionPart.id + '>'];
|
|
296
412
|
}
|
|
297
413
|
else {
|
|
298
|
-
localJsonSchema = schemaDefinitions['ObjectPageResponsiveTable<' +
|
|
414
|
+
localJsonSchema = schemaDefinitions['ObjectPageResponsiveTable<' + sectionPart.id + '>'];
|
|
415
|
+
}
|
|
416
|
+
transferSettingsAndFlexChanges(importParameters, configPart[sectionPart.id], sectionPart.schema, configParameters.pageKeys, configParameters.flexChanges, undefined, sectionTitle);
|
|
417
|
+
transferSettingsAndFlexChanges(importParameters, configPart[sectionPart.id]['table'], localJsonSchema, configParameters.pageKeys, configParameters.flexChanges, sectionPart.id, sectionTitle);
|
|
418
|
+
const toolBarActions = JSON.parse(JSON.stringify(schemaDefinitions))[`Actions<${sectionPart.id}>`];
|
|
419
|
+
if (toolBarActions === null || toolBarActions === void 0 ? void 0 : toolBarActions['properties']) {
|
|
420
|
+
fillActions(importParameters, toolBarActions.properties, configPart[sectionPart.id]['table']['toolBar'], configParameters, types_1.ActionTypeV2.OPToolBar);
|
|
421
|
+
}
|
|
422
|
+
if (Object.keys(configPart[sectionPart.id]['table']['toolBar']).length === 0) {
|
|
423
|
+
delete configPart[sectionPart.id]['table']['toolBar'];
|
|
299
424
|
}
|
|
300
|
-
transferSettingsAndFlexChanges(importParameters, configPart[escapedSectionId], schemaSection, pageKeys, flexChanges, undefined, sectionTitle);
|
|
301
|
-
transferSettingsAndFlexChanges(importParameters, configPart[escapedSectionId]['table'], localJsonSchema, pageKeys, flexChanges, sectionId, sectionTitle);
|
|
302
425
|
}
|
|
303
426
|
}
|
|
304
427
|
/**
|
|
305
428
|
* Fills custom columns in a V2 object page config JSON
|
|
306
|
-
* @param
|
|
307
|
-
* @param escapedSectionId - escaped version of the section ID
|
|
308
|
-
* @param sectionTitle - section
|
|
309
|
-
* @param configPart - the given part of the object page config
|
|
310
|
-
* @param manifest - manifest.json of the app
|
|
429
|
+
* @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
|
|
430
|
+
* @param {string} escapedSectionId - escaped version of the section ID
|
|
431
|
+
* @param {string} sectionTitle - title of current section, if available
|
|
432
|
+
* @param {object} configPart - the given part of the object page config
|
|
311
433
|
* @param {SapUiAppPageV2} v2Page - v2 page from manifest.
|
|
312
|
-
* @param {FileData[]} fragments - Array with XML fragments.
|
|
313
434
|
*/
|
|
314
|
-
function fillCustomColumnsInConfig(importParameters, escapedSectionId,
|
|
435
|
+
function fillCustomColumnsInConfig(importParameters, escapedSectionId, configPart, v2Page) {
|
|
315
436
|
const customColumnSchemaProp = importParameters.jsonSchema['definitions'][escapedSectionId].properties.custom;
|
|
316
437
|
const customColumnTarget = customColumnSchemaProp
|
|
317
|
-
?
|
|
438
|
+
? common_1.getTargetFromCustomColumnRef(customColumnSchemaProp.$ref)
|
|
318
439
|
: undefined;
|
|
319
440
|
if (customColumnTarget) {
|
|
320
441
|
const objectPageSectionData = {
|
|
321
|
-
key:
|
|
442
|
+
key: escapedSectionId.replace('@', ''),
|
|
322
443
|
target: customColumnTarget
|
|
323
444
|
};
|
|
324
|
-
|
|
445
|
+
common_3.addFragments(configPart[escapedSectionId], importParameters.manifest, v2Page, common_2.PageType.ObjectPage, importParameters.fragments, objectPageSectionData);
|
|
325
446
|
}
|
|
326
447
|
}
|
|
327
448
|
/**
|
|
328
|
-
* Fills the
|
|
449
|
+
* Fills the sections and subsections of the object page config (recursive function)
|
|
329
450
|
* @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
|
|
330
|
-
* @param
|
|
331
|
-
* @param
|
|
332
|
-
* @param
|
|
333
|
-
* @param {
|
|
334
|
-
* @param pageKeys - list of page keys (comprises the one entry describing the given page)
|
|
335
|
-
* @param flexChanges - list of flex changes (pre-processed by prepareFlexChanges)
|
|
451
|
+
* @param {sectionPartProperties} sectionPart - current properties' list of chart section
|
|
452
|
+
* @param {Settings} manifestSettings - object page settings section of the manifest
|
|
453
|
+
* @param {object} configPart - the given part of the object page config
|
|
454
|
+
* @param {ObjectPageV2ConfigParameters} configParameters - container for factory, pageKeys, flexChanges, v2Page, ObjectPageConfig
|
|
336
455
|
*/
|
|
337
|
-
function
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
const
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
delete configPart['actions'][configActionId];
|
|
349
|
-
}
|
|
350
|
-
}
|
|
456
|
+
function fillChartSection(importParameters, sectionPart, manifestSettings, configPart, configParameters) {
|
|
457
|
+
const sectionTitle = common_1.getSectionTitle(sectionPart.schema, importParameters.jsonSchema);
|
|
458
|
+
const manifestKey = sectionPart.id.replace('@com.sap', 'com.sap');
|
|
459
|
+
const manifestSection = manifestSettings && manifestSettings.sections && manifestSettings.sections[manifestKey];
|
|
460
|
+
configPart[sectionPart.id] = configParameters.factory.createInstance(common_2.PageType.ObjectPage, sectionPart.type, {
|
|
461
|
+
chart: {}
|
|
462
|
+
});
|
|
463
|
+
configPart[sectionPart.id]['chart'] = configParameters.factory.createInstance(common_2.PageType.ObjectPage, 'ObjectPageChart');
|
|
464
|
+
if (manifestSection || configParameters.flexChanges) {
|
|
465
|
+
transferSettingsAndFlexChanges(importParameters, configPart[sectionPart.id], sectionPart.schema, configParameters.pageKeys, configParameters.flexChanges, undefined, sectionTitle);
|
|
466
|
+
transferSettingsAndFlexChanges(importParameters, configPart[sectionPart.id]['chart'], importParameters.jsonSchema['definitions']['ObjectPageChart'], configParameters.pageKeys, configParameters.flexChanges, sectionPart.id, sectionTitle);
|
|
351
467
|
}
|
|
352
|
-
|
|
353
|
-
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* Fills the form section of the object page config
|
|
471
|
+
* @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
|
|
472
|
+
* @param {sectionPartProperties} sectionPart - current properties' list of form section
|
|
473
|
+
* @param {object} configPart - the given part of the object page config
|
|
474
|
+
* @param {ObjectPageV2ConfigParameters} configParameters - container for factory, pageKeys, flexChanges, v2Page, ObjectPageConfig
|
|
475
|
+
*/
|
|
476
|
+
function fillFormSection(importParameters, sectionPart, configPart, configParameters) {
|
|
477
|
+
const sectionTitle = common_1.getSectionTitle(sectionPart.schema, importParameters.jsonSchema);
|
|
478
|
+
const formId = sectionPart.schema['properties']['form']['$ref'].split('SectionForm')[1];
|
|
479
|
+
configPart[sectionPart.id] = configParameters.factory.createInstance(common_2.PageType.ObjectPage, sectionPart.type, {
|
|
480
|
+
form: {}
|
|
481
|
+
});
|
|
482
|
+
if (configParameters.flexChanges) {
|
|
483
|
+
transferSettingsAndFlexChanges(importParameters, configPart[sectionPart.id], sectionPart.schema, configParameters.pageKeys, configParameters.flexChanges, undefined, sectionTitle);
|
|
484
|
+
}
|
|
485
|
+
const formActions = importParameters.jsonSchema['definitions'][`SectionActions${formId}`];
|
|
486
|
+
const formFacetId = sectionTitle || sectionPart.id.replace(/@/g, '::').replace(/::com/g, 'com');
|
|
487
|
+
if (formActions && formActions['properties']) {
|
|
488
|
+
fillActions(importParameters, formActions.properties, configPart[sectionPart.id]['form'], configParameters, types_1.ActionTypeV2.Form, formFacetId);
|
|
489
|
+
}
|
|
490
|
+
const formFields = importParameters.jsonSchema['definitions'][`SectionFields${formId}`];
|
|
491
|
+
if (formFields['properties']) {
|
|
492
|
+
fillFields(importParameters, sectionPart.id, formFields.properties, configPart, configParameters);
|
|
493
|
+
}
|
|
494
|
+
if (Object.keys(configPart[sectionPart.id]['form']).length === 0) {
|
|
495
|
+
delete configPart[sectionPart.id]['form'];
|
|
496
|
+
}
|
|
497
|
+
if (Object.keys(configPart[sectionPart.id]).length === 0) {
|
|
498
|
+
delete configPart[sectionPart.id];
|
|
354
499
|
}
|
|
355
500
|
}
|
|
356
501
|
/**
|
|
357
|
-
* Fills the
|
|
358
|
-
* @param {ImportObjectPageV2Parameters} importParameters
|
|
359
|
-
* @param
|
|
360
|
-
* @param manifestSettings - object page settings section of the manifest
|
|
361
|
-
* @param configPart - the given part of the object page config
|
|
362
|
-
* @param
|
|
363
|
-
* @param flexChanges - list of flex changes (pre-processed by prepareFlexChanges)
|
|
364
|
-
* @param {SapUiAppPageV2} v2Page - v2 page from manifest.
|
|
365
|
-
* @param {ObjectPageConfig} objectPageConfig - page config object.
|
|
502
|
+
* Fills the subsection of the object page config
|
|
503
|
+
* @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
|
|
504
|
+
* @param {sectionPartProperties} sectionPart - current properties' list of subsection
|
|
505
|
+
* @param {Settings} manifestSettings - object page settings section of the manifest
|
|
506
|
+
* @param {object} configPart - the given part of the object page config
|
|
507
|
+
* @param {ObjectPageV2ConfigParameters} configParameters - container for factory, pageKeys, flexChanges, v2Page, ObjectPageConfig
|
|
366
508
|
*/
|
|
367
|
-
function
|
|
509
|
+
function fillSubSection(importParameters, sectionPart, manifestSettings, configPart, configParameters) {
|
|
368
510
|
var _a, _b;
|
|
369
|
-
|
|
511
|
+
const sectionTitle = common_1.getSectionTitle(sectionPart.schema, importParameters.jsonSchema);
|
|
512
|
+
configPart[sectionPart.id] = configParameters.factory.createInstance(common_2.PageType.ObjectPage, sectionPart.type, {
|
|
513
|
+
subsections: {}
|
|
514
|
+
});
|
|
515
|
+
if (configParameters.flexChanges) {
|
|
516
|
+
transferSettingsAndFlexChanges(importParameters, configPart[sectionPart.id], sectionPart.schema, configParameters.pageKeys, configParameters.flexChanges, undefined, sectionTitle);
|
|
517
|
+
}
|
|
518
|
+
let currentSchemaSection;
|
|
519
|
+
if ((_b = (_a = sectionPart.schema['properties']) === null || _a === void 0 ? void 0 : _a['subsections']) === null || _b === void 0 ? void 0 : _b['properties']) {
|
|
520
|
+
currentSchemaSection = sectionPart.schema['properties']['subsections']['properties'];
|
|
521
|
+
}
|
|
522
|
+
else {
|
|
523
|
+
currentSchemaSection = sectionPart.schema['properties'];
|
|
524
|
+
}
|
|
525
|
+
fillSectionsInConfig(importParameters, currentSchemaSection, manifestSettings, configPart[sectionPart.id]['subsections'], configParameters);
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Fills the sections and subsections of the object page config (recursive function)
|
|
529
|
+
* @param {ImportObjectPageV2Parameters} importParameters - object comprising all input data
|
|
530
|
+
* @param {object} sectionProperties - current properties' list (of sections or subsections)
|
|
531
|
+
* @param {Settings} manifestSettings - object page settings section of the manifest
|
|
532
|
+
* @param {object} configPart - the given part of the object page config
|
|
533
|
+
* @param {ObjectPageV2ConfigParameters} configParameters - container for factory, pageKeys, flexChanges, v2Page, ObjectPageConfig.
|
|
534
|
+
*/
|
|
535
|
+
function fillSectionsInConfig(importParameters, sectionProperties, manifestSettings, configPart, configParameters) {
|
|
370
536
|
for (const sectionId in sectionProperties) {
|
|
371
537
|
const escapedSectionId = sectionId.replace(/\/@/g, '::');
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
}
|
|
412
|
-
const formFields = importParameters.jsonSchema['definitions'][`SectionFields${formId}`];
|
|
413
|
-
if (formFields['properties']) {
|
|
414
|
-
fillFields(importParameters, escapedSectionId, formFields.properties, configPart, factory, pageKeys, flexChanges);
|
|
415
|
-
}
|
|
416
|
-
if (Object.keys(configPart[escapedSectionId]['form']).length === 0) {
|
|
417
|
-
delete configPart[escapedSectionId]['form'];
|
|
418
|
-
}
|
|
419
|
-
if (Object.keys(configPart[escapedSectionId]).length === 0) {
|
|
420
|
-
delete configPart[escapedSectionId];
|
|
538
|
+
const sectionPart = {
|
|
539
|
+
id: escapedSectionId,
|
|
540
|
+
type: getSectionType(sectionProperties[sectionId]),
|
|
541
|
+
schema: sectionProperties[sectionId]
|
|
542
|
+
};
|
|
543
|
+
if (sectionPart.schema['$ref'] && sectionPart.type) {
|
|
544
|
+
switch (sectionPart.type) {
|
|
545
|
+
case types_1.SectionTypeV2.SectionTable:
|
|
546
|
+
case types_1.SectionTypeV2.SubSectionTable: {
|
|
547
|
+
sectionPart.schema =
|
|
548
|
+
importParameters.jsonSchema['definitions'][`${sectionPart.type}<${sectionId}>`];
|
|
549
|
+
fillTableInConfig(importParameters, sectionPart, manifestSettings, configPart, configParameters);
|
|
550
|
+
// Custom column ref
|
|
551
|
+
fillCustomColumnsInConfig(importParameters, escapedSectionId, configPart, configParameters.v2Page);
|
|
552
|
+
break;
|
|
553
|
+
}
|
|
554
|
+
case types_1.SectionTypeV2.SectionChart:
|
|
555
|
+
case types_1.SectionTypeV2.SubSectionChart: {
|
|
556
|
+
// Section without subsections
|
|
557
|
+
sectionPart.schema =
|
|
558
|
+
importParameters.jsonSchema['definitions'][`${sectionPart.type}<${sectionId}>`];
|
|
559
|
+
fillChartSection(importParameters, sectionPart, manifestSettings, configPart, configParameters);
|
|
560
|
+
break;
|
|
561
|
+
}
|
|
562
|
+
case types_1.SectionTypeV2.SectionForm:
|
|
563
|
+
case types_1.SectionTypeV2.SubSectionForm: {
|
|
564
|
+
sectionPart.schema =
|
|
565
|
+
importParameters.jsonSchema['definitions'][`${sectionPart.type}<${sectionId}>`];
|
|
566
|
+
fillFormSection(importParameters, sectionPart, configPart, configParameters);
|
|
567
|
+
break;
|
|
568
|
+
}
|
|
569
|
+
case types_1.SectionTypeV2.Section:
|
|
570
|
+
case types_1.SectionTypeV2.SubSection: {
|
|
571
|
+
// Section with subsections
|
|
572
|
+
sectionPart.schema =
|
|
573
|
+
importParameters.jsonSchema['definitions'][`${sectionPart.type}<${sectionId}>`];
|
|
574
|
+
fillSubSection(importParameters, sectionPart, manifestSettings, configPart, configParameters);
|
|
575
|
+
break;
|
|
576
|
+
}
|
|
421
577
|
}
|
|
422
578
|
}
|
|
423
|
-
else if (
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
getSectionType(schemaSection) === types_1.SectionTypeV2.SubSection))) {
|
|
427
|
-
// Section with subsections
|
|
428
|
-
const sectionType = getSectionType(schemaSection);
|
|
429
|
-
schemaSection = importParameters.jsonSchema['definitions'][`${sectionType}<${sectionId}>`];
|
|
430
|
-
const sectionTitle = common_1.getSectionTitle(schemaSection, importParameters.jsonSchema);
|
|
431
|
-
configPart[escapedSectionId] = factory.createInstance(common_2.PageType.ObjectPage, sectionType, {
|
|
432
|
-
subsections: {}
|
|
433
|
-
});
|
|
434
|
-
if (flexChanges) {
|
|
435
|
-
transferSettingsAndFlexChanges(importParameters, configPart[escapedSectionId], schemaSection, pageKeys, flexChanges, undefined, sectionTitle);
|
|
436
|
-
}
|
|
437
|
-
let currentSchemaSection;
|
|
438
|
-
if ((_b = (_a = schemaSection['properties']) === null || _a === void 0 ? void 0 : _a['subsections']) === null || _b === void 0 ? void 0 : _b['properties']) {
|
|
439
|
-
currentSchemaSection = schemaSection['properties']['subsections']['properties'];
|
|
440
|
-
}
|
|
441
|
-
else {
|
|
442
|
-
currentSchemaSection = schemaSection['properties'];
|
|
443
|
-
}
|
|
444
|
-
fillSectionsInConfig(importParameters, currentSchemaSection, manifestSettings, configPart[escapedSectionId]['subsections'], factory, pageKeys, flexChanges, v2Page, objectPageConfig);
|
|
579
|
+
else if (sectionPart.schema['properties'] && sectionPart.schema['properties']['subsections']) {
|
|
580
|
+
sectionPart.schema = importParameters.jsonSchema['definitions'][`${sectionPart.type}<${sectionId}>`];
|
|
581
|
+
fillSubSection(importParameters, sectionPart, manifestSettings, configPart, configParameters);
|
|
445
582
|
}
|
|
446
583
|
}
|
|
447
584
|
}
|
|
@@ -454,23 +591,28 @@ function fillSectionsInConfig(importParameters, sectionProperties, manifestSetti
|
|
|
454
591
|
* @param {MetadataInstanceInterface} factory - factory, for generating the access to reflect-metadata
|
|
455
592
|
* @returns {ObjectPageConfig} - the object page configuration (JSON)
|
|
456
593
|
*/
|
|
457
|
-
function fillConfig(importParameters,
|
|
458
|
-
const objectPageConfig = factory.createPageInstance(common_2.PageType.ObjectPage);
|
|
459
|
-
const manifestSettings = v2Page.component.settings;
|
|
594
|
+
function fillConfig(importParameters, configParameters) {
|
|
595
|
+
const objectPageConfig = configParameters.factory.createPageInstance(common_2.PageType.ObjectPage);
|
|
596
|
+
const manifestSettings = configParameters.v2Page.component.settings;
|
|
460
597
|
// Transfer page information
|
|
461
|
-
transferSettingsAndFlexChanges(importParameters, objectPageConfig, importParameters.jsonSchema['properties'], pageKeys,
|
|
598
|
+
transferSettingsAndFlexChanges(importParameters, objectPageConfig, importParameters.jsonSchema['properties'], configParameters.pageKeys, configParameters.flexChanges);
|
|
462
599
|
// Transfer header information
|
|
463
|
-
objectPageConfig.header = factory.createInstance(common_2.PageType.ObjectPage, 'ObjectPageHeader');
|
|
600
|
+
objectPageConfig.header = configParameters.factory.createInstance(common_2.PageType.ObjectPage, 'ObjectPageHeader');
|
|
464
601
|
transferSettingsAndFlexChanges(importParameters, objectPageConfig.header, importParameters.jsonSchema['definitions']['ObjectPageHeader']
|
|
465
602
|
? importParameters.jsonSchema['definitions']['ObjectPageHeader']
|
|
466
|
-
: importParameters.jsonSchema['definitions']['ObjectPageHeader<GenericActions>'], pageKeys,
|
|
603
|
+
: importParameters.jsonSchema['definitions']['ObjectPageHeader<GenericActions>'], configParameters.pageKeys, configParameters.flexChanges);
|
|
467
604
|
const headerAction = importParameters.jsonSchema['definitions']['HeaderActions'];
|
|
468
605
|
if (headerAction) {
|
|
469
|
-
fillActions(importParameters, headerAction.properties, objectPageConfig.header,
|
|
606
|
+
fillActions(importParameters, headerAction.properties, objectPageConfig.header, configParameters, types_1.ActionTypeV2.Header);
|
|
607
|
+
}
|
|
608
|
+
objectPageConfig.footer = {};
|
|
609
|
+
const footerAction = importParameters.jsonSchema['definitions']['FooterActions'];
|
|
610
|
+
if (footerAction) {
|
|
611
|
+
fillActions(importParameters, footerAction.properties, objectPageConfig.footer, configParameters, types_1.ActionTypeV2.OPFooter);
|
|
470
612
|
}
|
|
471
613
|
// Transfer Layout information
|
|
472
|
-
objectPageConfig.layout = factory.createInstance(common_2.PageType.ObjectPage, 'ObjectPageLayout');
|
|
473
|
-
transferSettingsAndFlexChanges(importParameters, objectPageConfig.layout, importParameters.jsonSchema['definitions']['ObjectPageLayout'], pageKeys,
|
|
614
|
+
objectPageConfig.layout = configParameters.factory.createInstance(common_2.PageType.ObjectPage, 'ObjectPageLayout');
|
|
615
|
+
transferSettingsAndFlexChanges(importParameters, objectPageConfig.layout, importParameters.jsonSchema['definitions']['ObjectPageLayout'], configParameters.pageKeys, configParameters.flexChanges);
|
|
474
616
|
if (Object.keys(objectPageConfig.layout).length === 0) {
|
|
475
617
|
delete objectPageConfig.layout;
|
|
476
618
|
}
|
|
@@ -478,7 +620,7 @@ function fillConfig(importParameters, pageKeys, flexChangesForTransfer, v2Page,
|
|
|
478
620
|
objectPageConfig.sections = {};
|
|
479
621
|
const sections = importParameters.jsonSchema['definitions']['Sections'];
|
|
480
622
|
if (sections) {
|
|
481
|
-
fillSectionsInConfig(importParameters, sections.properties, manifestSettings, objectPageConfig.sections,
|
|
623
|
+
fillSectionsInConfig(importParameters, sections.properties, manifestSettings, objectPageConfig.sections, configParameters);
|
|
482
624
|
}
|
|
483
625
|
// Find custom sections
|
|
484
626
|
const customSections = utils_1.findCustomSectionExtensions(importParameters.manifest, importParameters.entitySet);
|
|
@@ -486,11 +628,11 @@ function fillConfig(importParameters, pageKeys, flexChangesForTransfer, v2Page,
|
|
|
486
628
|
objectPageConfig.sections.custom = [];
|
|
487
629
|
for (const sectionId in customSections) {
|
|
488
630
|
const customSection = 'fragmentName' in customSections[sectionId]
|
|
489
|
-
? factory.createInstance(common_2.PageType.ObjectPage, 'ObjectPageCustomSectionFragment')
|
|
490
|
-
: factory.createInstance(common_2.PageType.ObjectPage, 'ObjectPageCustomSectionView');
|
|
631
|
+
? configParameters.factory.createInstance(common_2.PageType.ObjectPage, 'ObjectPageCustomSectionFragment')
|
|
632
|
+
: configParameters.factory.createInstance(common_2.PageType.ObjectPage, 'ObjectPageCustomSectionView');
|
|
491
633
|
transferSettingsAndFlexChanges(importParameters, customSection, importParameters.jsonSchema['definitions']['fragmentName' in customSections[sectionId]
|
|
492
634
|
? 'ObjectPageCustomSectionFragment'
|
|
493
|
-
: 'ObjectPageCustomSectionView'], pageKeys,
|
|
635
|
+
: 'ObjectPageCustomSectionView'], configParameters.pageKeys, configParameters.flexChanges, sectionId);
|
|
494
636
|
objectPageConfig.sections.custom.push(customSection);
|
|
495
637
|
}
|
|
496
638
|
}
|
|
@@ -545,7 +687,7 @@ function createObjectPageConfigV2(importParameters) {
|
|
|
545
687
|
const flexChangesForTransfer = prepareFlexChanges(importParameters.flex, entitySet);
|
|
546
688
|
const factory = new factory_1.MetadataInstanceFactoryV2();
|
|
547
689
|
//Fill config.json with manifest settings and flex changes
|
|
548
|
-
return fillConfig(importParameters, pageKeys, flexChangesForTransfer, v2Page, factory);
|
|
690
|
+
return fillConfig(importParameters, { pageKeys, flexChanges: flexChangesForTransfer, v2Page, factory });
|
|
549
691
|
}
|
|
550
692
|
exports.createObjectPageConfigV2 = createObjectPageConfigV2;
|
|
551
693
|
//# sourceMappingURL=objectPage.js.map
|