@sap/ux-specification 1.142.2 → 1.142.3
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 +86 -43
- 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-ListReportNew.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 +265 -261
- package/dist/index-min.js.map +4 -4
- package/dist/schemas/v2/AnalyticalListPageConfig.json +3 -3
- package/dist/schemas/v2/ListReportConfig.json +5 -5
- package/dist/schemas/v2/ListReportNewConfig.json +1 -1
- package/dist/schemas/v2/ObjectPageConfig.json +5 -5
- package/dist/schemas/v4/ApplicationV4.json +1 -1
- package/dist/schemas/v4/BuildingBlocksConfig.json +13 -1
- package/dist/schemas/v4/ListReportConfig.json +24 -6
- package/dist/schemas/v4/ObjectPageConfig.json +32 -8
- package/dist/specification/package.json +13 -11
- package/dist/specification/scripts/extractDocu.js +18 -1
- package/dist/specification/scripts/extractDocu.js.map +1 -1
- package/dist/specification/scripts/generate-validity-report.d.ts +15 -0
- package/dist/specification/scripts/generate-validity-report.d.ts.map +1 -0
- package/dist/specification/scripts/generate-validity-report.js +367 -0
- package/dist/specification/scripts/generate-validity-report.js.map +1 -0
- package/dist/specification/scripts/macros/corrections.d.ts.map +1 -1
- package/dist/specification/scripts/macros/corrections.js +3 -0
- package/dist/specification/scripts/macros/corrections.js.map +1 -1
- package/dist/specification/src/api.js +1 -1
- package/dist/specification/src/sync/common/decoration/decorator-paths.d.ts +503 -0
- package/dist/specification/src/sync/common/decoration/decorator-paths.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/decorator-paths.js +497 -0
- package/dist/specification/src/sync/common/decoration/decorator-paths.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/decorators.d.ts +149 -23
- package/dist/specification/src/sync/common/decoration/decorators.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.js +369 -74
- package/dist/specification/src/sync/common/decoration/decorators.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/index.d.ts +1 -0
- package/dist/specification/src/sync/common/decoration/index.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/index.js +1 -0
- package/dist/specification/src/sync/common/decoration/index.js.map +1 -1
- package/dist/specification/src/sync/common/dist_tag.json +8 -3
- package/dist/specification/src/sync/common/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/common/generate/objectPage.js +3 -1
- package/dist/specification/src/sync/common/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/common/i18n.json +2 -1
- package/dist/specification/src/sync/common/utils.d.ts +22 -6
- package/dist/specification/src/sync/common/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/utils.js +122 -18
- package/dist/specification/src/sync/common/utils.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/analyticalListReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/analyticalListReport.js +2 -0
- package/dist/specification/src/sync/v2/generate/analyticalListReport.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/listReport.js +3 -1
- package/dist/specification/src/sync/v2/generate/listReport.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/objectPage.js +2 -0
- package/dist/specification/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/overviewPage.d.ts +1 -9
- package/dist/specification/src/sync/v2/generate/overviewPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/overviewPage.js +30 -1
- package/dist/specification/src/sync/v2/generate/overviewPage.js.map +1 -1
- package/dist/specification/src/sync/v2/import/app/appProvider.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/app/appProvider.js +2 -0
- package/dist/specification/src/sync/v2/import/app/appProvider.js.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/analyticalListPage.d.ts +2 -1
- package/dist/specification/src/sync/v2/import/pages/analyticalListPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/analyticalListPage.js +5 -0
- package/dist/specification/src/sync/v2/import/pages/analyticalListPage.js.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/listReport.d.ts +2 -1
- package/dist/specification/src/sync/v2/import/pages/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/listReport.js +5 -0
- package/dist/specification/src/sync/v2/import/pages/listReport.js.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/objectPage.js +2 -1
- package/dist/specification/src/sync/v2/import/pages/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v2/import/utils.d.ts +28 -1
- package/dist/specification/src/sync/v2/import/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/utils.js +37 -0
- package/dist/specification/src/sync/v2/import/utils.js.map +1 -1
- package/dist/specification/src/sync/v2/utils.d.ts +12 -2
- package/dist/specification/src/sync/v2/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/utils.js +19 -2
- package/dist/specification/src/sync/v2/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/application.d.ts +20 -2
- package/dist/specification/src/sync/v4/application.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/application.js +27 -2
- package/dist/specification/src/sync/v4/application.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/FilterBar.d.ts +2 -1
- package/dist/specification/src/sync/v4/export/controls/FilterBar.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/FilterBar.js +2 -1
- package/dist/specification/src/sync/v4/export/controls/FilterBar.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Header.d.ts +4 -3
- package/dist/specification/src/sync/v4/export/controls/Header.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Header.js +7 -3
- package/dist/specification/src/sync/v4/export/controls/Header.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.d.ts +2 -1
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.js +7 -0
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageCustomSection.d.ts +2 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageCustomSection.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageCustomSection.js +2 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageCustomSection.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.d.ts +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.js +0 -13
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Table.d.ts +24 -15
- package/dist/specification/src/sync/v4/export/controls/Table.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Table.js +40 -46
- package/dist/specification/src/sync/v4/export/controls/Table.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/TableColumn.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/TableColumn.js +2 -2
- package/dist/specification/src/sync/v4/export/controls/TableColumn.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts +2 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js +2 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/export.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/export.js +25 -3
- package/dist/specification/src/sync/v4/export/export.js.map +1 -1
- package/dist/specification/src/sync/v4/export/pages/ListReport.js +1 -1
- package/dist/specification/src/sync/v4/export/pages/ListReport.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/actions.d.ts +1 -1
- package/dist/specification/src/sync/v4/generate/actions.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js +10 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/index.d.ts +1 -1
- package/dist/specification/src/sync/v4/generate/index.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/index.js +1 -1
- package/dist/specification/src/sync/v4/generate/index.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.d.ts +73 -0
- package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.js +354 -0
- package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.js.map +1 -0
- package/dist/specification/src/sync/v4/generate/{listReport.d.ts → list-report/listReport.d.ts} +22 -15
- package/dist/specification/src/sync/v4/generate/list-report/listReport.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/generate/{listReport.js → list-report/listReport.js} +115 -69
- package/dist/specification/src/sync/v4/generate/list-report/listReport.js.map +1 -0
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.js +142 -44
- package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/listReport.js +2 -1
- package/dist/specification/src/sync/v4/import/pages/listReport.js.map +1 -1
- package/dist/specification/src/sync/v4/import/utils.js +5 -3
- package/dist/specification/src/sync/v4/import/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/App.d.ts +9 -7
- package/dist/specification/src/sync/v4/sync-rules/App.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/App.js +4 -8
- package/dist/specification/src/sync/v4/sync-rules/App.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts +2 -9
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.js +2 -11
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts +177 -46
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js +498 -152
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/Page.d.ts +17 -22
- package/dist/specification/src/sync/v4/sync-rules/Page.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/Page.js +15 -22
- package/dist/specification/src/sync/v4/sync-rules/Page.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/controllerExtensions.d.ts +1 -0
- package/dist/specification/src/sync/v4/sync-rules/controllerExtensions.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/controllerExtensions.js +17 -9
- package/dist/specification/src/sync/v4/sync-rules/controllerExtensions.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/index.d.ts +5 -0
- package/dist/specification/src/sync/v4/sync-rules/index.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/index.js +21 -0
- package/dist/specification/src/sync/v4/sync-rules/index.js.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/utils.js +4 -0
- package/dist/specification/src/sync/v4/sync-rules/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/utils/index.d.ts +2 -0
- package/dist/specification/src/sync/v4/utils/index.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/utils/index.js +18 -0
- package/dist/specification/src/sync/v4/utils/index.js.map +1 -0
- package/dist/specification/src/sync/v4/utils/utils.d.ts +9 -1
- package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.js +17 -2
- package/dist/specification/src/sync/v4/utils/utils.js.map +1 -1
- package/dist/specification/test/test-projects/v2sttaProdMan2/webapp/manifest.json +550 -0
- package/dist/specification/test/test-projects/v4new/webapp/manifest.json +147 -0
- package/dist/specification/test/test-utils/utils.d.ts +71 -0
- package/dist/specification/test/test-utils/utils.d.ts.map +1 -0
- package/dist/specification/test/test-utils/utils.js +400 -0
- package/dist/specification/test/test-utils/utils.js.map +1 -0
- package/dist/specification/test/unit/decorators/validity-test-utils.d.ts +131 -0
- package/dist/specification/test/unit/decorators/validity-test-utils.d.ts.map +1 -0
- package/dist/specification/test/unit/decorators/validity-test-utils.js +661 -0
- package/dist/specification/test/unit/decorators/validity-test-utils.js.map +1 -0
- package/dist/types/src/apiTypes.d.ts +2 -3
- package/dist/types/src/apiTypes.d.ts.map +1 -1
- package/dist/types/src/apiTypes.js.map +1 -1
- package/dist/types/src/common/types.d.ts +119 -13
- package/dist/types/src/common/types.d.ts.map +1 -1
- package/dist/types/src/common/types.js.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageTable.d.ts +1 -1
- package/dist/types/src/v2/controls/Table.d.ts +1 -1
- package/dist/types/src/v4/controls/ObjectPageTable.d.ts +1 -1
- package/dist/types/src/v4/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/types/src/v4/controls/Table.d.ts +3 -3
- package/dist/types/src/v4/controls/Table.d.ts.map +1 -1
- package/package.json +14 -12
- package/dist/specification/src/sync/v4/generate/ListReportUtils.d.ts +0 -107
- package/dist/specification/src/sync/v4/generate/ListReportUtils.d.ts.map +0 -1
- package/dist/specification/src/sync/v4/generate/ListReportUtils.js +0 -394
- package/dist/specification/src/sync/v4/generate/ListReportUtils.js.map +0 -1
- package/dist/specification/src/sync/v4/generate/listReport.d.ts.map +0 -1
- package/dist/specification/src/sync/v4/generate/listReport.js.map +0 -1
|
@@ -16,6 +16,7 @@ const StableIdHelper_1 = require("../../v4/utils/StableIdHelper");
|
|
|
16
16
|
const pageExtensions_1 = require("./fpm-custom-page/pageExtensions");
|
|
17
17
|
const utils_3 = require("../../v2/generate/utils");
|
|
18
18
|
const actions_1 = require("./actions");
|
|
19
|
+
const ObjectPageCustomSection_1 = require("../export/controls/ObjectPageCustomSection");
|
|
19
20
|
const ROOT_PROPERTIES_ORDER = ['header', 'layout', 'sections', 'footer'];
|
|
20
21
|
const CRITICAL_ACTION_TYPES = [
|
|
21
22
|
'UI.CriticalityType/Positive',
|
|
@@ -294,7 +295,7 @@ function addHeaderActionCallBackV4(entityType, appSchema, identification, header
|
|
|
294
295
|
addCopyAction(unCriticalActions, generateParameters.serviceAVT, appSchema, entityType, headerActions, nextIndex);
|
|
295
296
|
addGroupedHeaderActions(unCriticalActions, generateParameters.serviceAVT, appSchema, entityType, headerActions, ux_specification_types_1.ActionType.Annotation, nextIndex);
|
|
296
297
|
// Add custom header actions
|
|
297
|
-
addHeaderFooterCustomActionsOP(appSchema, pageInManifest, ux_specification_types_1.DefinitionName.CustomHeaderActionOP, generateParameters
|
|
298
|
+
addHeaderFooterCustomActionsOP(appSchema, pageInManifest, ux_specification_types_1.DefinitionName.CustomHeaderActionOP, generateParameters);
|
|
298
299
|
addRelatedAppsButton(headerActions);
|
|
299
300
|
(0, utils_2.addEnumForActionAnchor)(appSchema, ux_specification_types_1.DefinitionName.ObjectPageHeaderActions, ux_specification_types_1.DefinitionName.CustomHeaderActionPositionOP);
|
|
300
301
|
}
|
|
@@ -335,9 +336,9 @@ function addFooterActionCallBackV4(entityType, appSchema, footerActions, identif
|
|
|
335
336
|
* @param v4Page Current page in manifest
|
|
336
337
|
* @param lineItemId - identifier of the current table in schema
|
|
337
338
|
* @param facetIdInManifest - identifier of the current object page section in manifest
|
|
338
|
-
* @param
|
|
339
|
+
* @param {GenerateAppSchemaParameters} generateParameters - Parameters required for generating the application schema.
|
|
339
340
|
*/
|
|
340
|
-
function addCustomColumnsOP(appSchema, v4Page, lineItemId, facetIdInManifest,
|
|
341
|
+
function addCustomColumnsOP(appSchema, v4Page, lineItemId, facetIdInManifest, generateParameters) {
|
|
341
342
|
// Create type specific copy of 'TableCustomColumnOP'
|
|
342
343
|
const useDefinitionAsKey = lineItemId !== ux_specification_types_1.DefinitionName.LineItems &&
|
|
343
344
|
lineItemId !== 'LineItemsOfSPV::LineItem' &&
|
|
@@ -350,7 +351,7 @@ function addCustomColumnsOP(appSchema, v4Page, lineItemId, facetIdInManifest, lo
|
|
|
350
351
|
customColumnDefinition.description = 'Custom Column';
|
|
351
352
|
// Update definitions for type specific custom columns
|
|
352
353
|
const schemaId = `${ux_specification_types_1.DefinitionName.CustomColumnOP}<${lineItemId}>`;
|
|
353
|
-
(0, utils_2.addCustomColumnDefinition)(appSchema, v4Page, logger, schemaId, lineItemId, facetIdInManifest);
|
|
354
|
+
(0, utils_2.addCustomColumnDefinition)(appSchema, v4Page, generateParameters.logger, schemaId, lineItemId, facetIdInManifest);
|
|
354
355
|
const facetKey = useDefinitionAsKey ? lineItemId : ux_specification_types_1.DefinitionName.PositionOP;
|
|
355
356
|
(0, common_1.parseSchemaDefinition)(ux_specification_types_1.DefinitionName.PositionOP, facetKey, appSchema, useDefinitionAsKey);
|
|
356
357
|
const positionId = useDefinitionAsKey ? `${ux_specification_types_1.DefinitionName.PositionOP}<${lineItemId}>` : ux_specification_types_1.DefinitionName.PositionOP;
|
|
@@ -369,9 +370,10 @@ function addCustomColumnsOP(appSchema, v4Page, lineItemId, facetIdInManifest, lo
|
|
|
369
370
|
* @param v4Page Current page in manifest
|
|
370
371
|
* @param lineItemId - identifier of the current table in schema
|
|
371
372
|
* @param facetIdInManifest - identifier of the current object page section in manifest
|
|
372
|
-
* @param
|
|
373
|
+
* @param {GenerateAppSchemaParameters} generateParameters - Parameters required for generating the application schema.
|
|
374
|
+
* @returns Schema ID for actions definition.
|
|
373
375
|
*/
|
|
374
|
-
function addTableCustomActionsOP(appSchema, v4Page, lineItemId, facetIdInManifest,
|
|
376
|
+
function addTableCustomActionsOP(appSchema, v4Page, lineItemId, facetIdInManifest, generateParameters) {
|
|
375
377
|
// Create type specific copy of 'TableCustomActionOP'
|
|
376
378
|
const useDefinitionAsKey = lineItemId !== ux_specification_types_1.DefinitionName.LineItems &&
|
|
377
379
|
lineItemId !== 'LineItemsOfSPV::LineItem' &&
|
|
@@ -385,7 +387,7 @@ function addTableCustomActionsOP(appSchema, v4Page, lineItemId, facetIdInManifes
|
|
|
385
387
|
// Update definitions for type specific custom columns
|
|
386
388
|
const schemaId = `${ux_specification_types_1.DefinitionName.CustomTableActionOP}<${lineItemId}>`;
|
|
387
389
|
const schemaIdForActions = `${ux_specification_types_1.DefinitionName.Actions}<${(0, common_1.prepareRef)(lineItemId)}>`;
|
|
388
|
-
(0, utils_2.addCustomActionDefinition)(appSchema, v4Page, logger, schemaId, schemaIdForActions, facetIdInManifest);
|
|
390
|
+
(0, utils_2.addCustomActionDefinition)(appSchema, v4Page, generateParameters.logger, schemaId, schemaIdForActions, facetIdInManifest);
|
|
389
391
|
const facetKey = useDefinitionAsKey ? lineItemId : ux_specification_types_1.DefinitionName.CustomActionPositionOP;
|
|
390
392
|
(0, common_1.parseSchemaDefinition)(ux_specification_types_1.DefinitionName.CustomActionPositionOP, facetKey, appSchema, useDefinitionAsKey);
|
|
391
393
|
// Anchor selection
|
|
@@ -395,6 +397,7 @@ function addTableCustomActionsOP(appSchema, v4Page, lineItemId, facetIdInManifes
|
|
|
395
397
|
customActionDefinition.properties.position.$ref = `${common_1.DEFINITION_LINK_PREFIX}${positionId}`;
|
|
396
398
|
(0, utils_2.addEnumForActionAnchor)(appSchema, schemaIdForActions, positionId);
|
|
397
399
|
(0, actions_1.configureAdditionalPropertiesForCustomActionsAndMenus)(appSchema, schemaIdForActions, positionId, lineItemId, ux_specification_types_1.DefinitionName.CustomTableActionOP, customActionDefinitionKey);
|
|
400
|
+
return schemaIdForActions;
|
|
398
401
|
}
|
|
399
402
|
/**
|
|
400
403
|
* Object Page specific custom action enhancements to header and footer.
|
|
@@ -402,23 +405,23 @@ function addTableCustomActionsOP(appSchema, v4Page, lineItemId, facetIdInManifes
|
|
|
402
405
|
* @param appSchema - app schema of the object page
|
|
403
406
|
* @param v4Page - current page in manifest
|
|
404
407
|
* @param customActionDefinitionKey - custom action key used in definitions
|
|
405
|
-
* @param
|
|
408
|
+
* @param generateParameters - list of API input parameters
|
|
406
409
|
*/
|
|
407
|
-
function addHeaderFooterCustomActionsOP(appSchema, v4Page, customActionDefinitionKey,
|
|
410
|
+
function addHeaderFooterCustomActionsOP(appSchema, v4Page, customActionDefinitionKey, generateParameters) {
|
|
408
411
|
const customActionDefinition = appSchema.definitions[customActionDefinitionKey];
|
|
409
412
|
customActionDefinition[ux_specification_types_1.SchemaTag.isViewNode] = true;
|
|
410
413
|
customActionDefinition.description = CUSTOM_ACTION_DEFINITION_DESCRIPTION;
|
|
411
414
|
const schemaIdForActions = customActionDefinitionKey === ux_specification_types_1.DefinitionName.CustomHeaderActionOP
|
|
412
415
|
? ux_specification_types_1.DefinitionName.ObjectPageHeaderActions
|
|
413
416
|
: ux_specification_types_1.DefinitionName.FooterActions;
|
|
414
|
-
(0, utils_2.addHeaderFooterCustomActionDefinition)(appSchema, v4Page, logger, customActionDefinitionKey, schemaIdForActions);
|
|
417
|
+
(0, utils_2.addHeaderFooterCustomActionDefinition)(appSchema, v4Page, generateParameters.logger, customActionDefinitionKey, schemaIdForActions);
|
|
415
418
|
const facetKey = customActionDefinitionKey === ux_specification_types_1.DefinitionName.CustomHeaderActionOP
|
|
416
419
|
? ux_specification_types_1.DefinitionName.CustomHeaderActionPositionOP
|
|
417
420
|
: ux_specification_types_1.DefinitionName.CustomFooterActionPositionOP;
|
|
418
421
|
(0, common_1.parseSchemaDefinition)(facetKey, facetKey, appSchema, false);
|
|
419
422
|
// Anchor selection
|
|
420
423
|
customActionDefinition.properties.position.$ref = `${common_1.DEFINITION_LINK_PREFIX}${facetKey}`;
|
|
421
|
-
if (appSchema.definitions[schemaIdForActions]) {
|
|
424
|
+
if (appSchema.definitions[schemaIdForActions] && typeof appSchema.definitions[schemaIdForActions] === 'object') {
|
|
422
425
|
appSchema.definitions[schemaIdForActions].additionalProperties =
|
|
423
426
|
(0, actions_1.buildAdditionalPropertiesSchemaForCustomActionsAndMenus)(customActionDefinitionKey);
|
|
424
427
|
}
|
|
@@ -436,9 +439,8 @@ function addHeaderFooterCustomActionsOP(appSchema, v4Page, customActionDefinitio
|
|
|
436
439
|
* @param params.lineItemFacet - The current line item facet configuration.
|
|
437
440
|
* @param params.v4Page - The current page configuration in the manifest.
|
|
438
441
|
* @param params.isCollection - Indicates if the table is in a collection section. Defaults to false.
|
|
439
|
-
* @param params.generateParameters - Parameters required for generating the application schema..
|
|
440
442
|
*/
|
|
441
|
-
function addTableDefinition({ tableType, facetKey, facet, appSchema, lineItemId, lineItemFacet, v4Page, isCollection = false
|
|
443
|
+
function addTableDefinition({ tableType, facetKey, facet, appSchema, lineItemId, lineItemFacet, v4Page, isCollection = false }) {
|
|
442
444
|
const index = facetKey.lastIndexOf('::');
|
|
443
445
|
const annotation = index > -1 ? facetKey.substring(index + 2) : facetKey;
|
|
444
446
|
const tableDefinition = (0, common_1.parseSchemaDefinition)(tableType, facetKey, appSchema);
|
|
@@ -454,11 +456,6 @@ function addTableDefinition({ tableType, facetKey, facet, appSchema, lineItemId,
|
|
|
454
456
|
if (tableDefinition.properties.rowCountMode && !isCollection) {
|
|
455
457
|
adjustRowCountMode(v4Page, facetKey, appSchema, tableDefinition);
|
|
456
458
|
}
|
|
457
|
-
addManifestPathsToPropertiesOP(appSchema, tableType, tableDefinition, {
|
|
458
|
-
pageName: v4Page.id,
|
|
459
|
-
manifest: generateParameters.manifest,
|
|
460
|
-
sectionId: facetKey
|
|
461
|
-
});
|
|
462
459
|
}
|
|
463
460
|
/**
|
|
464
461
|
* Object Page specific enhancements to handleFormIdentification.
|
|
@@ -467,22 +464,24 @@ function addTableDefinition({ tableType, facetKey, facet, appSchema, lineItemId,
|
|
|
467
464
|
* @param v4Page - current page in manifest
|
|
468
465
|
* @param formItemId - identifier of the current form in schema
|
|
469
466
|
* @param facetIdInManifest - identifier of the current object page section in manifest
|
|
470
|
-
* @param
|
|
467
|
+
* @param {GenerateAppSchemaParameters} generateParameters - list of API input parameters
|
|
468
|
+
* @returns Schema ID for actions definition.
|
|
471
469
|
*/
|
|
472
|
-
function addFormCustomActionsOP(appSchema, v4Page, formItemId, facetIdInManifest,
|
|
470
|
+
function addFormCustomActionsOP(appSchema, v4Page, formItemId, facetIdInManifest, generateParameters) {
|
|
473
471
|
const customActionDefinitionKey = `${ux_specification_types_1.DefinitionName.CustomFormActionOP}<${formItemId}>`;
|
|
474
472
|
const customActionDefinition = appSchema.definitions[customActionDefinitionKey];
|
|
475
473
|
customActionDefinition[ux_specification_types_1.SchemaTag.isViewNode] = true;
|
|
476
474
|
customActionDefinition.description = CUSTOM_ACTION_DEFINITION_DESCRIPTION;
|
|
477
475
|
const schemaId = `${ux_specification_types_1.DefinitionName.CustomFormActionOP}<${formItemId}>`;
|
|
478
476
|
const schemaIdForActions = `${ux_specification_types_1.DefinitionName.SectionActions}<${(0, common_1.prepareRef)(formItemId)}>`;
|
|
479
|
-
(0, utils_2.addCustomActionDefinition)(appSchema, v4Page, logger, schemaId, schemaIdForActions, facetIdInManifest, formItemId);
|
|
477
|
+
(0, utils_2.addCustomActionDefinition)(appSchema, v4Page, generateParameters.logger, schemaId, schemaIdForActions, facetIdInManifest, formItemId);
|
|
480
478
|
(0, common_1.parseSchemaDefinition)(ux_specification_types_1.DefinitionName.CustomActionPositionOP, formItemId, appSchema, true);
|
|
481
479
|
// Anchor selection
|
|
482
480
|
const positionId = `${ux_specification_types_1.DefinitionName.CustomActionPositionOP}<${formItemId}>`;
|
|
483
481
|
customActionDefinition.properties.position.$ref = `${common_1.DEFINITION_LINK_PREFIX}${positionId}`;
|
|
484
482
|
(0, utils_2.addEnumForActionAnchor)(appSchema, schemaIdForActions, positionId);
|
|
485
483
|
(0, actions_1.configureAdditionalPropertiesForCustomActionsAndMenus)(appSchema, schemaIdForActions, positionId, formItemId, ux_specification_types_1.DefinitionName.CustomFormActionOP, customActionDefinitionKey);
|
|
484
|
+
return schemaIdForActions;
|
|
486
485
|
}
|
|
487
486
|
/**
|
|
488
487
|
* Adjusts the `rowCountMode` property enum and adds a warning, if `sectionLayout` is set to `Tabs` and `rowCountMode` is not set to `Auto`.
|
|
@@ -551,13 +550,25 @@ function handleLineItem(generateParameters, facet, facetKey, appSchema, lineItem
|
|
|
551
550
|
exports.OBJECT_PAGE_TABLE_DEFINITION_TYPES.forEach((type) => {
|
|
552
551
|
// add columns to a enum, in this case enableMassEdit -> visibleFields and ignoredFields
|
|
553
552
|
(0, utils_2.addEnumForEnableMassEdit)(appSchema, `${type}<${lineItemId}>`, lineItemId, lineItemFacet.entityType);
|
|
553
|
+
// add "manifestPath" to table properties for different table types
|
|
554
|
+
const tableDefinitionKey = (0, common_1.getFacetDefinitionKey)(type, facetKey);
|
|
555
|
+
const tableDefinition = appSchema.definitions?.[tableDefinitionKey];
|
|
556
|
+
if (typeof tableDefinition === 'object') {
|
|
557
|
+
addManifestPathsToPropertiesOP(appSchema, type, tableDefinition, {
|
|
558
|
+
pageName: v4Page.id,
|
|
559
|
+
manifest: generateParameters.manifest,
|
|
560
|
+
sectionId: facetKey
|
|
561
|
+
}, true);
|
|
562
|
+
}
|
|
554
563
|
});
|
|
555
564
|
// populates the set of fields and field groups for the creationFields property definition
|
|
556
565
|
CREATION_DIALOG_DEFINITION_TYPES.forEach((definitionName) => {
|
|
557
566
|
(0, utils_1.addOneOfForCreationFields)(appSchema, lineItemFacet.entityType, definitionName, lineItemId);
|
|
558
567
|
});
|
|
559
|
-
addCustomColumnsOP(appSchema, v4Page, lineItemId, facetKey,
|
|
560
|
-
|
|
568
|
+
addCustomColumnsOP(appSchema, v4Page, lineItemId, facetKey, generateParameters);
|
|
569
|
+
addManifestPathsToDefinitionPropertiesOP(appSchema, v4Page.id, lineItemId, generateParameters, facetKey);
|
|
570
|
+
const schemaIdForActions = addTableCustomActionsOP(appSchema, v4Page, lineItemId, facetKey, generateParameters);
|
|
571
|
+
addManifestPathsToDefinitionPropertiesOP(appSchema, v4Page.id, schemaIdForActions, generateParameters, facetKey);
|
|
561
572
|
}
|
|
562
573
|
/**
|
|
563
574
|
* Handles the creation and modification of a section table within the application schema.
|
|
@@ -599,9 +610,9 @@ function handleSectionTable(facet, facetKey, appSchema, lineItemFacet, generateP
|
|
|
599
610
|
* @param {object} sections - schema of current sections definition
|
|
600
611
|
* @param {object} appSchema - app specific schema of the object page that gets enhanced
|
|
601
612
|
* @param {SectionType} sectionPrefix - prefix to distinguish Section and HeaderSection
|
|
602
|
-
* @param {
|
|
613
|
+
* @param {GenerateAppSchemaParameters} generateParameters - list of API input parameters
|
|
603
614
|
*/
|
|
604
|
-
function handleFormIdentification(facet, v4Page, facetKey, sections, appSchema, sectionPrefix,
|
|
615
|
+
function handleFormIdentification(facet, v4Page, facetKey, sections, appSchema, sectionPrefix, generateParameters) {
|
|
605
616
|
let definitionType;
|
|
606
617
|
if (sectionPrefix === ux_specification_types_1.SectionType.Section) {
|
|
607
618
|
definitionType = ux_specification_types_1.DefinitionName.ObjectPageSectionForm;
|
|
@@ -625,11 +636,13 @@ function handleFormIdentification(facet, v4Page, facetKey, sections, appSchema,
|
|
|
625
636
|
const formItemId = (0, common_1.getFacetKeyInSchema)(facetKey);
|
|
626
637
|
if (facet.base === ux_specification_types_1.FacetBase.Form) {
|
|
627
638
|
(0, common_1.parseSchemaDefinition)(ux_specification_types_1.DefinitionName.CustomFormActionOP, targetId, appSchema);
|
|
628
|
-
addFormCustomActionsOP(appSchema, v4Page, targetId, formItemId,
|
|
639
|
+
const schemaIdForActions = addFormCustomActionsOP(appSchema, v4Page, targetId, formItemId, generateParameters);
|
|
640
|
+
addManifestPathsToDefinitionPropertiesOP(appSchema, v4Page.id, schemaIdForActions, generateParameters, facetKey);
|
|
629
641
|
}
|
|
630
642
|
// Add custom fields
|
|
631
643
|
(0, common_1.parseSchemaDefinition)(ux_specification_types_1.DefinitionName.CustomField, targetId, appSchema);
|
|
632
|
-
addFormCustomFieldsOP(appSchema, v4Page, sectionPrefix, targetId, formItemId,
|
|
644
|
+
const schemaIdForFields = addFormCustomFieldsOP(appSchema, v4Page, sectionPrefix, targetId, formItemId, generateParameters);
|
|
645
|
+
addManifestPathsToDefinitionPropertiesOP(appSchema, v4Page.id, schemaIdForFields, generateParameters, facetKey);
|
|
633
646
|
}
|
|
634
647
|
/**
|
|
635
648
|
* Adds definitions for header sections (DataPoint, Chart) in object page sections to the app schema.
|
|
@@ -935,6 +948,8 @@ function containsCollectionFacet(facet) {
|
|
|
935
948
|
function createCustomSubSectionReference(appSchema, id, featureToggles) {
|
|
936
949
|
const referenceId = `${ux_specification_types_1.DefinitionName.ObjectPageCustomSubSectionFragment}<${id}>`;
|
|
937
950
|
const sourceDefinition = appSchema.definitions[ux_specification_types_1.DefinitionName.ObjectPageCustomSubSectionFragment];
|
|
951
|
+
// Instantiate for @validity check
|
|
952
|
+
new ObjectPageCustomSection_1.ObjectPageCustomSubSectionFragment().init();
|
|
938
953
|
if (typeof sourceDefinition === 'object') {
|
|
939
954
|
const relatedFacetSchema = typeof sourceDefinition.properties?.relatedFacet === 'object'
|
|
940
955
|
? sourceDefinition.properties.relatedFacet
|
|
@@ -962,12 +977,12 @@ function createCustomSubSectionReference(appSchema, id, featureToggles) {
|
|
|
962
977
|
/**
|
|
963
978
|
* Method applies custom action definitions to custom sections.
|
|
964
979
|
*
|
|
965
|
-
* @param appSchema - app schema of the object page
|
|
966
|
-
* @param v4Page Current page in manifest
|
|
967
|
-
* @param customSectionRef - reference to custom section definition
|
|
968
|
-
* @param
|
|
980
|
+
* @param {Definition} appSchema - app schema of the object page
|
|
981
|
+
* @param {v4.SapUiAppPageV4} v4Page Current page in manifest
|
|
982
|
+
* @param {string} customSectionRef - reference to custom section definition
|
|
983
|
+
* @param {GenerateAppSchemaParameters} generateParameters - list of API input parameters
|
|
969
984
|
*/
|
|
970
|
-
function applyCustomActionsToCustomSections(appSchema, v4Page, customSectionRef,
|
|
985
|
+
function applyCustomActionsToCustomSections(appSchema, v4Page, customSectionRef, generateParameters) {
|
|
971
986
|
// add specific definitions for custom sections and custom actions from manifest
|
|
972
987
|
const sectionsInManifest = v4Page.options?.settings?.content?.body?.sections;
|
|
973
988
|
if (sectionsInManifest) {
|
|
@@ -995,9 +1010,10 @@ function applyCustomActionsToCustomSections(appSchema, v4Page, customSectionRef,
|
|
|
995
1010
|
// set custom action as view node
|
|
996
1011
|
customActionOPDef[ux_specification_types_1.SchemaTag.isViewNode] = true;
|
|
997
1012
|
// add custom actions definitions
|
|
998
|
-
(0, utils_2.addCustomActionDefinition)(appSchema, v4Page, logger, customActionDefinitionName, customActionsDefinitionName, sectionId);
|
|
1013
|
+
(0, utils_2.addCustomActionDefinition)(appSchema, v4Page, generateParameters.logger, customActionDefinitionName, customActionsDefinitionName, sectionId);
|
|
999
1014
|
// add anchors
|
|
1000
1015
|
(0, utils_2.addEnumForActionAnchor)(appSchema, customActionsDefinitionName, customActionPositionOPDefinitionName);
|
|
1016
|
+
addManifestPathsToDefinitionPropertiesOP(appSchema, v4Page.id, customActionsDefinitionName, generateParameters, sectionId);
|
|
1001
1017
|
}
|
|
1002
1018
|
}
|
|
1003
1019
|
}
|
|
@@ -1044,7 +1060,7 @@ function applyCustomSections(sections, appSchema, generateParameters, v4Page, cu
|
|
|
1044
1060
|
const customSectionCustomActions = appSchema.definitions[ux_specification_types_1.DefinitionName.ObjectPageCustomSectionActions];
|
|
1045
1061
|
// initially define no actions for section
|
|
1046
1062
|
customSectionCustomActions.properties = {};
|
|
1047
|
-
applyCustomActionsToCustomSections(appSchema, v4Page, customSectionRef, generateParameters
|
|
1063
|
+
applyCustomActionsToCustomSections(appSchema, v4Page, customSectionRef, generateParameters);
|
|
1048
1064
|
}
|
|
1049
1065
|
const relatedFacet = sectionDefinition.properties.relatedFacet;
|
|
1050
1066
|
if (customSectionRef?.includes(ux_specification_types_1.DefinitionName.ObjectPageCustomSubSectionFragment) &&
|
|
@@ -1137,7 +1153,7 @@ function addSection(generateParameters, facets, facetKey, sections, appSchema, s
|
|
|
1137
1153
|
}
|
|
1138
1154
|
case ux_specification_types_1.FacetBase.Form:
|
|
1139
1155
|
case ux_specification_types_1.FacetBase.Identification: {
|
|
1140
|
-
handleFormIdentification(facet, v4Page, facetKey, sections, appSchema, sectionPrefix, generateParameters
|
|
1156
|
+
handleFormIdentification(facet, v4Page, facetKey, sections, appSchema, sectionPrefix, generateParameters);
|
|
1141
1157
|
break;
|
|
1142
1158
|
}
|
|
1143
1159
|
case ux_specification_types_1.FacetBase.DataPoint: {
|
|
@@ -1183,6 +1199,7 @@ function addSections(generateParameters, appSchema, v4Page) {
|
|
|
1183
1199
|
}
|
|
1184
1200
|
// add custom sections
|
|
1185
1201
|
applyCustomSections(sections, appSchema, generateParameters, v4Page, ux_specification_types_1.DefinitionName.ObjectPageCustomSectionFragment);
|
|
1202
|
+
addManifestPathsToDefinitionPropertiesOP(appSchema, v4Page.id, ux_specification_types_1.DefinitionName.Sections, generateParameters);
|
|
1186
1203
|
}
|
|
1187
1204
|
/**
|
|
1188
1205
|
* Derives the header sections from the UI.HeaderFacets annotation and adds them to the schema.
|
|
@@ -1226,12 +1243,28 @@ function addHeader(generateParameters, appSchema, v4Page) {
|
|
|
1226
1243
|
(0, common_1.addCommonHeaderSchema)(appSchema, entityType);
|
|
1227
1244
|
// Add header actions
|
|
1228
1245
|
(0, common_1.addHeaderActions)(appSchema, entityType, generateParameters, addHeaderActionCallBackV4, v4Page);
|
|
1246
|
+
addManifestPathsToDefinitionPropertiesOP(appSchema, v4Page.id, ux_specification_types_1.DefinitionName.ObjectPageHeaderActions, generateParameters);
|
|
1229
1247
|
// Add header sections
|
|
1230
1248
|
if (entityType) {
|
|
1231
1249
|
appSchema.definitions[ux_specification_types_1.DefinitionName.HeaderSections][ux_specification_types_1.SchemaTag.annotationPath] =
|
|
1232
1250
|
`/${entityType.fullyQualifiedName}/@${"com.sap.vocabularies.UI.v1.HeaderFacets" /* UIAnnotationTerms.HeaderFacets */}`;
|
|
1233
1251
|
}
|
|
1234
1252
|
addHeaderSections(generateParameters, appSchema, entityType, v4Page);
|
|
1253
|
+
addManifestPathsToDefinitionPropertiesOP(appSchema, v4Page.id, ux_specification_types_1.DefinitionName.HeaderSections, generateParameters);
|
|
1254
|
+
}
|
|
1255
|
+
/**
|
|
1256
|
+
* Add Object Page Footer to app-specific schema.
|
|
1257
|
+
*
|
|
1258
|
+
* @param generateParameters - list of API input parameters
|
|
1259
|
+
* @param appSchema Schema of the object page
|
|
1260
|
+
* @param v4Page - current page in manifest
|
|
1261
|
+
*/
|
|
1262
|
+
function addFooter(generateParameters, appSchema, v4Page) {
|
|
1263
|
+
// Currently only actions are supported for footer
|
|
1264
|
+
(0, common_1.addFooterActions)(appSchema, generateParameters, ux_specification_types_1.FioriElementsVersion.v4, addFooterActionCallBackV4);
|
|
1265
|
+
addHeaderFooterCustomActionsOP(appSchema, v4Page, ux_specification_types_1.DefinitionName.CustomFooterActionOP, generateParameters);
|
|
1266
|
+
(0, utils_2.addEnumForActionAnchor)(appSchema, ux_specification_types_1.DefinitionName.FooterActions, ux_specification_types_1.DefinitionName.CustomFooterActionPositionOP);
|
|
1267
|
+
addManifestPathsToDefinitionPropertiesOP(appSchema, v4Page.id, ux_specification_types_1.DefinitionName.FooterActions, generateParameters);
|
|
1235
1268
|
}
|
|
1236
1269
|
/**
|
|
1237
1270
|
* Adjusts the default creation mode for tables and tree tables in the application schema
|
|
@@ -1265,14 +1298,21 @@ function adjustPageSettings(appSchema, v4Page) {
|
|
|
1265
1298
|
* @param definitionName - The name of the definition/class whose properties are being processed.
|
|
1266
1299
|
* @param definition - The definition object containing property schemas.
|
|
1267
1300
|
* @param pathParams - Additional context required to compute manifest paths.
|
|
1301
|
+
* @param handleRelative - A flag indicating whether to use relative paths for definition properties.
|
|
1268
1302
|
*/
|
|
1269
|
-
function addManifestPathsToPropertiesOP(appSchema, definitionName, definition, pathParams) {
|
|
1303
|
+
function addManifestPathsToPropertiesOP(appSchema, definitionName, definition, pathParams, handleRelative = false) {
|
|
1270
1304
|
(0, utils_1.addManifestPathsToProperties)(appSchema, definitionName, definition, {
|
|
1271
1305
|
...pathParams,
|
|
1272
1306
|
targetAnnotation: pathParams.sectionId?.replace('::', '/'),
|
|
1273
1307
|
targetAnnotationEncoded: pathParams.sectionId,
|
|
1274
|
-
pathsParts: [
|
|
1275
|
-
|
|
1308
|
+
pathsParts: [
|
|
1309
|
+
pathParams.sectionId,
|
|
1310
|
+
pathParams.columnKey,
|
|
1311
|
+
pathParams.targetAnnotation,
|
|
1312
|
+
pathParams.configObject,
|
|
1313
|
+
pathParams.originalIds
|
|
1314
|
+
]
|
|
1315
|
+
}, handleRelative);
|
|
1276
1316
|
}
|
|
1277
1317
|
/**
|
|
1278
1318
|
* Adds 'manifestPath' to static nodes in schema.
|
|
@@ -1281,6 +1321,8 @@ function addManifestPathsToPropertiesOP(appSchema, definitionName, definition, p
|
|
|
1281
1321
|
* @param pathParams - Additional context required to compute manifest paths.
|
|
1282
1322
|
*/
|
|
1283
1323
|
function addManifestPathsToStaticNodes(appSchema, pathParams) {
|
|
1324
|
+
// Add "manifestPath" for current page
|
|
1325
|
+
appSchema['manifestPath'] = (0, utils_1.getPageManifestPath)(pathParams);
|
|
1284
1326
|
// Root level - rules stored on page class level
|
|
1285
1327
|
addManifestPathsToPropertiesOP(appSchema, ux_specification_types_1.PageTypeV4.ObjectPage, appSchema, pathParams);
|
|
1286
1328
|
// Other definitions
|
|
@@ -1370,9 +1412,7 @@ function generateObjectPageSchemaV4(generateParameters, genericSchema, contextPa
|
|
|
1370
1412
|
}
|
|
1371
1413
|
addSections(generateParameters, appSchema, v4Page);
|
|
1372
1414
|
// Add Footer (actions only)
|
|
1373
|
-
(
|
|
1374
|
-
addHeaderFooterCustomActionsOP(appSchema, v4Page, ux_specification_types_1.DefinitionName.CustomFooterActionOP, generateParameters.logger);
|
|
1375
|
-
(0, utils_2.addEnumForActionAnchor)(appSchema, ux_specification_types_1.DefinitionName.FooterActions, ux_specification_types_1.DefinitionName.CustomFooterActionPositionOP);
|
|
1415
|
+
addFooter(generateParameters, appSchema, v4Page);
|
|
1376
1416
|
adjustPageSettings(appSchema, v4Page);
|
|
1377
1417
|
// Add "manifestPath" on root.page level properties
|
|
1378
1418
|
addManifestPathsToStaticNodes(appSchema, {
|
|
@@ -1414,9 +1454,10 @@ function generateObjectPageSchemaV4(generateParameters, genericSchema, contextPa
|
|
|
1414
1454
|
* @param sectionPrefix - Indicates whether the section is a header or a standard section (from `SectionType` enum).
|
|
1415
1455
|
* @param formItemId - Unique identifier of the current form within the schema.
|
|
1416
1456
|
* @param fieldGroupInManifest - Identifier of the corresponding section (facet) in the manifest.
|
|
1417
|
-
* @param
|
|
1457
|
+
* @param {GenerateAppSchemaParameters} generateParameters - list of API input parameters
|
|
1458
|
+
* @returns Schema ID for fields definition.
|
|
1418
1459
|
*/
|
|
1419
|
-
function addFormCustomFieldsOP(appSchema, v4Page, sectionPrefix, formItemId, fieldGroupInManifest,
|
|
1460
|
+
function addFormCustomFieldsOP(appSchema, v4Page, sectionPrefix, formItemId, fieldGroupInManifest, generateParameters) {
|
|
1420
1461
|
const customFieldDefinitionKey = `${ux_specification_types_1.DefinitionName.CustomField}<${formItemId}>`;
|
|
1421
1462
|
const customFieldDefinition = appSchema.definitions[customFieldDefinitionKey];
|
|
1422
1463
|
customFieldDefinition[ux_specification_types_1.SchemaTag.isViewNode] = true;
|
|
@@ -1424,7 +1465,7 @@ function addFormCustomFieldsOP(appSchema, v4Page, sectionPrefix, formItemId, fie
|
|
|
1424
1465
|
const schemaId = `${ux_specification_types_1.DefinitionName.CustomField}<${formItemId}>`;
|
|
1425
1466
|
const fieldsDefinitionKey = sectionPrefix === ux_specification_types_1.SectionType.HeaderSection ? ux_specification_types_1.DefinitionName.HeaderSectionFields : ux_specification_types_1.DefinitionName.SectionFields;
|
|
1426
1467
|
const schemaIdForFields = `${fieldsDefinitionKey}<${(0, common_1.prepareRef)(formItemId)}>`;
|
|
1427
|
-
(0, utils_1.addCustomFieldDefinition)(appSchema, v4Page, fieldGroupInManifest, logger, schemaId, schemaIdForFields);
|
|
1468
|
+
(0, utils_1.addCustomFieldDefinition)(appSchema, v4Page, fieldGroupInManifest, generateParameters.logger, schemaId, schemaIdForFields);
|
|
1428
1469
|
(0, common_1.parseSchemaDefinition)(ux_specification_types_1.DefinitionName.CustomFieldPosition, formItemId, appSchema, true);
|
|
1429
1470
|
// Anchor selection
|
|
1430
1471
|
const positionId = `${ux_specification_types_1.DefinitionName.CustomFieldPosition}<${formItemId}>`;
|
|
@@ -1441,5 +1482,62 @@ function addFormCustomFieldsOP(appSchema, v4Page, sectionPrefix, formItemId, fie
|
|
|
1441
1482
|
$ref: `${common_1.DEFINITION_LINK_PREFIX}${customFieldDefinitionKey}`
|
|
1442
1483
|
};
|
|
1443
1484
|
}
|
|
1485
|
+
return schemaIdForFields;
|
|
1486
|
+
}
|
|
1487
|
+
/**
|
|
1488
|
+
* Enhances the Object Page schema with manifest paths for definition and properties.
|
|
1489
|
+
*
|
|
1490
|
+
* This function extends the app schema (`appSchema`) by adding manifestPath to definition and properties on the Object Page.
|
|
1491
|
+
*
|
|
1492
|
+
* @param {Definition} appSchema - The application schema object representing the Object Page structure.
|
|
1493
|
+
* @param {string} pageId - Identifier of the page.
|
|
1494
|
+
* @param {string} definitionName - Identifier of the corresponding definition.
|
|
1495
|
+
* @param {GenerateAppSchemaParameters} generateParameters - list of API input parameters.
|
|
1496
|
+
* @param {string} facetKey - Identifier of the section (facet key or custom section id) in manifest in case of custom columns.
|
|
1497
|
+
*/
|
|
1498
|
+
function addManifestPathsToDefinitionPropertiesOP(appSchema, pageId, definitionName, generateParameters, facetKey) {
|
|
1499
|
+
const matchingDefinition = appSchema.definitions[definitionName];
|
|
1500
|
+
const properties = matchingDefinition?.properties ?? {};
|
|
1501
|
+
const isSections = [`${ux_specification_types_1.DefinitionName.HeaderSections}`, `${ux_specification_types_1.DefinitionName.Sections}`].includes(definitionName);
|
|
1502
|
+
for (const key in properties) {
|
|
1503
|
+
const property = matchingDefinition.properties[key];
|
|
1504
|
+
let sectionId;
|
|
1505
|
+
// Current logic checks for subsections at first level, we meed to introduce recursion? for next levels
|
|
1506
|
+
if (isSections) {
|
|
1507
|
+
const subSections = property.properties?.['subsections']?.['properties'];
|
|
1508
|
+
if (subSections) {
|
|
1509
|
+
Object.keys(subSections).forEach((subSectionId) => {
|
|
1510
|
+
// subsections requires array like paths for sync rule resolution
|
|
1511
|
+
const originalIds = ['sections', key, 'subsections', subSectionId];
|
|
1512
|
+
addManifestPathsToPropertiesOP(appSchema, undefined, subSections[subSectionId], {
|
|
1513
|
+
pageName: pageId,
|
|
1514
|
+
sectionId: key,
|
|
1515
|
+
columnKey: subSectionId,
|
|
1516
|
+
originalIds,
|
|
1517
|
+
manifest: generateParameters.manifest
|
|
1518
|
+
}, true);
|
|
1519
|
+
});
|
|
1520
|
+
}
|
|
1521
|
+
else {
|
|
1522
|
+
// Check OP facets for sectionId resolution
|
|
1523
|
+
const facets = (0, common_1.getObjectPageHeaderFacets)(generateParameters.entityType, generateParameters.serviceAVT, ux_specification_types_1.FioriElementsVersion.v4, generateParameters.logger);
|
|
1524
|
+
sectionId = facets[key]?.ID ?? key;
|
|
1525
|
+
addManifestPathsToPropertiesOP(appSchema, undefined, property, {
|
|
1526
|
+
pageName: pageId,
|
|
1527
|
+
sectionId,
|
|
1528
|
+
manifest: generateParameters.manifest
|
|
1529
|
+
}, true);
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
else {
|
|
1533
|
+
sectionId = facetKey;
|
|
1534
|
+
addManifestPathsToPropertiesOP(appSchema, undefined, property, {
|
|
1535
|
+
pageName: pageId,
|
|
1536
|
+
sectionId,
|
|
1537
|
+
columnKey: key,
|
|
1538
|
+
manifest: generateParameters.manifest
|
|
1539
|
+
}, true);
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1444
1542
|
}
|
|
1445
1543
|
//# sourceMappingURL=objectPage.js.map
|