@sap/ux-specification 1.96.21 → 1.96.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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/documentation/v4/v4-ApplicationV4.html +1 -1
- package/dist/documentation/v4/v4-FreestylePage.html +1 -1
- package/dist/documentation/v4/v4-ListReport.html +1 -1
- package/dist/documentation/v4/v4-ObjectPage.html +1 -1
- package/dist/index-min.js +35 -35
- package/dist/index-min.js.map +3 -3
- package/dist/schemas/v4/ApplicationV4.json +26 -0
- package/dist/schemas/v4/ListReportConfig.json +20 -20
- package/dist/scripts/extractDocu.js +15 -3
- package/dist/scripts/extractDocu.js.map +1 -1
- package/dist/scripts/spec.js +1 -2
- package/dist/scripts/spec.js.map +1 -1
- package/dist/scripts/to-json-schema.js +17 -3
- package/dist/scripts/to-json-schema.js.map +1 -1
- package/dist/src/api.js +4 -3
- package/dist/src/api.js.map +1 -1
- package/dist/src/apiTypes.d.ts +4 -3
- package/dist/src/apiTypes.d.ts.map +1 -1
- package/dist/src/apiTypes.js +5 -2
- package/dist/src/apiTypes.js.map +1 -1
- package/dist/src/extensionLogger.d.ts +1 -1
- package/dist/src/extensionLogger.d.ts.map +1 -1
- package/dist/src/extensionLogger.js +3 -1
- package/dist/src/extensionLogger.js.map +1 -1
- package/dist/src/i18n/i18n.js +1 -0
- package/dist/src/i18n/i18n.js.map +1 -1
- package/dist/src/index.js +17 -10
- package/dist/src/index.js.map +1 -1
- package/dist/src/project.d.ts.map +1 -1
- package/dist/src/project.js +14 -10
- package/dist/src/project.js.map +1 -1
- package/dist/src/specification/schemaAccess.d.ts +1 -1
- package/dist/src/specification/schemaAccess.d.ts.map +1 -1
- package/dist/src/specification/schemaAccess.js +5 -2
- package/dist/src/specification/schemaAccess.js.map +1 -1
- package/dist/src/sync/common/appProvider.d.ts +2 -2
- package/dist/src/sync/common/appProvider.d.ts.map +1 -1
- package/dist/src/sync/common/appProvider.js +18 -27
- package/dist/src/sync/common/appProvider.js.map +1 -1
- package/dist/src/sync/common/decoration/control.d.ts +2 -2
- package/dist/src/sync/common/decoration/control.d.ts.map +1 -1
- package/dist/src/sync/common/decoration/control.js +15 -7
- package/dist/src/sync/common/decoration/control.js.map +1 -1
- package/dist/src/sync/common/decoration/decorators.d.ts.map +1 -1
- package/dist/src/sync/common/decoration/decorators.js +13 -6
- package/dist/src/sync/common/decoration/decorators.js.map +1 -1
- package/dist/src/sync/common/decoration/factory.js +1 -0
- package/dist/src/sync/common/decoration/factory.js.map +1 -1
- package/dist/src/sync/common/decoration/flex.js +1 -0
- package/dist/src/sync/common/decoration/flex.js.map +1 -1
- package/dist/src/sync/common/decoration/index.js +13 -6
- package/dist/src/sync/common/decoration/index.js.map +1 -1
- package/dist/src/sync/common/flexUtils.js +15 -2
- package/dist/src/sync/common/flexUtils.js.map +1 -1
- package/dist/src/sync/common/generate/index.js +12 -5
- package/dist/src/sync/common/generate/index.js.map +1 -1
- package/dist/src/sync/common/generate/objectPage.js +9 -7
- package/dist/src/sync/common/generate/objectPage.js.map +1 -1
- package/dist/src/sync/common/generate/utils.js +15 -12
- package/dist/src/sync/common/generate/utils.js.map +1 -1
- package/dist/src/sync/common/import/utils.js +1 -0
- package/dist/src/sync/common/import/utils.js.map +1 -1
- package/dist/src/sync/common/importProject.d.ts.map +1 -1
- package/dist/src/sync/common/importProject.js +21 -24
- package/dist/src/sync/common/importProject.js.map +1 -1
- package/dist/src/sync/common/index.js +19 -11
- package/dist/src/sync/common/index.js.map +1 -1
- package/dist/src/sync/common/types.d.ts +1 -1
- package/dist/src/sync/common/types.d.ts.map +1 -1
- package/dist/src/sync/common/types.js +1 -0
- package/dist/src/sync/common/types.js.map +1 -1
- package/dist/src/sync/common/utils.d.ts +3 -3
- package/dist/src/sync/common/utils.d.ts.map +1 -1
- package/dist/src/sync/common/utils.js +97 -78
- package/dist/src/sync/common/utils.js.map +1 -1
- package/dist/src/sync/i18n.js +15 -2
- package/dist/src/sync/i18n.js.map +1 -1
- package/dist/src/sync/v2/application.d.ts.map +1 -1
- package/dist/src/sync/v2/application.js +33 -16
- package/dist/src/sync/v2/application.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Action.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/Action.js +3 -1
- package/dist/src/sync/v2/export/controls/Action.js.map +1 -1
- package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.js +3 -1
- package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.js.map +1 -1
- package/dist/src/sync/v2/export/controls/AnalyticalListPageKPI.js +1 -0
- package/dist/src/sync/v2/export/controls/AnalyticalListPageKPI.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Card.js +1 -0
- package/dist/src/sync/v2/export/controls/Card.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Field.js +1 -0
- package/dist/src/sync/v2/export/controls/Field.js.map +1 -1
- package/dist/src/sync/v2/export/controls/FilterBar.js +8 -2
- package/dist/src/sync/v2/export/controls/FilterBar.js.map +1 -1
- package/dist/src/sync/v2/export/controls/FormAction.js +1 -0
- package/dist/src/sync/v2/export/controls/FormAction.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Fragment.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/Fragment.js +8 -8
- package/dist/src/sync/v2/export/controls/Fragment.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageChart.js +1 -0
- package/dist/src/sync/v2/export/controls/ObjectPageChart.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageCustomSection.js +1 -0
- package/dist/src/sync/v2/export/controls/ObjectPageCustomSection.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.js +1 -0
- package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageHeader.js +1 -0
- package/dist/src/sync/v2/export/controls/ObjectPageHeader.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.js +1 -0
- package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageLayout.js +1 -0
- package/dist/src/sync/v2/export/controls/ObjectPageLayout.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js +11 -5
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageTable.js +1 -0
- package/dist/src/sync/v2/export/controls/ObjectPageTable.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageToolBarAction.js +1 -0
- package/dist/src/sync/v2/export/controls/ObjectPageToolBarAction.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Table.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/Table.js +9 -9
- package/dist/src/sync/v2/export/controls/Table.js.map +1 -1
- package/dist/src/sync/v2/export/controls/TableColumn.js +9 -2
- package/dist/src/sync/v2/export/controls/TableColumn.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ToolBar.js +1 -0
- package/dist/src/sync/v2/export/controls/ToolBar.js.map +1 -1
- package/dist/src/sync/v2/export/controls/index.js +30 -23
- package/dist/src/sync/v2/export/controls/index.js.map +1 -1
- package/dist/src/sync/v2/export/export.js +13 -16
- package/dist/src/sync/v2/export/export.js.map +1 -1
- package/dist/src/sync/v2/export/exportPage.js +3 -3
- package/dist/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/src/sync/v2/export/factory.js +15 -2
- package/dist/src/sync/v2/export/factory.js.map +1 -1
- package/dist/src/sync/v2/export/manifest.d.ts +1 -1
- package/dist/src/sync/v2/export/manifest.d.ts.map +1 -1
- package/dist/src/sync/v2/export/manifest.js +7 -3
- package/dist/src/sync/v2/export/manifest.js.map +1 -1
- package/dist/src/sync/v2/export/pages/AnalyticalListPage.js +1 -0
- package/dist/src/sync/v2/export/pages/AnalyticalListPage.js.map +1 -1
- package/dist/src/sync/v2/export/pages/ListReport.js +1 -0
- package/dist/src/sync/v2/export/pages/ListReport.js.map +1 -1
- package/dist/src/sync/v2/export/pages/ObjectPage.js +1 -0
- package/dist/src/sync/v2/export/pages/ObjectPage.js.map +1 -1
- package/dist/src/sync/v2/export/pages/OverviewPage.js +1 -0
- package/dist/src/sync/v2/export/pages/OverviewPage.js.map +1 -1
- package/dist/src/sync/v2/export/pages/index.js +14 -7
- package/dist/src/sync/v2/export/pages/index.js.map +1 -1
- package/dist/src/sync/v2/export/view-controller-generator.d.ts.map +1 -1
- package/dist/src/sync/v2/export/view-controller-generator.js +17 -8
- package/dist/src/sync/v2/export/view-controller-generator.js.map +1 -1
- package/dist/src/sync/v2/generate/analyticalListReport.js +5 -5
- package/dist/src/sync/v2/generate/analyticalListReport.js.map +1 -1
- package/dist/src/sync/v2/generate/generate.js +1 -0
- package/dist/src/sync/v2/generate/generate.js.map +1 -1
- package/dist/src/sync/v2/generate/index.js +8 -7
- package/dist/src/sync/v2/generate/index.js.map +1 -1
- package/dist/src/sync/v2/generate/listReport.d.ts +1 -1
- package/dist/src/sync/v2/generate/listReport.d.ts.map +1 -1
- package/dist/src/sync/v2/generate/listReport.js +29 -32
- package/dist/src/sync/v2/generate/listReport.js.map +1 -1
- package/dist/src/sync/v2/generate/objectPage.js +8 -6
- package/dist/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v2/generate/overviewPage.js +1 -0
- package/dist/src/sync/v2/generate/overviewPage.js.map +1 -1
- package/dist/src/sync/v2/generate/utils.js +17 -8
- package/dist/src/sync/v2/generate/utils.js.map +1 -1
- package/dist/src/sync/v2/import/app/appProvider.js +7 -1
- package/dist/src/sync/v2/import/app/appProvider.js.map +1 -1
- package/dist/src/sync/v2/import/app/ovpProvider.js +1 -0
- package/dist/src/sync/v2/import/app/ovpProvider.js.map +1 -1
- package/dist/src/sync/v2/import/common/index.js +24 -17
- package/dist/src/sync/v2/import/common/index.js.map +1 -1
- package/dist/src/sync/v2/import/controls/table.js +2 -1
- package/dist/src/sync/v2/import/controls/table.js.map +1 -1
- package/dist/src/sync/v2/import/index.js +15 -8
- package/dist/src/sync/v2/import/index.js.map +1 -1
- package/dist/src/sync/v2/import/pages/analyticalListPage.js +1 -0
- package/dist/src/sync/v2/import/pages/analyticalListPage.js.map +1 -1
- package/dist/src/sync/v2/import/pages/listReport.js +5 -1
- package/dist/src/sync/v2/import/pages/listReport.js.map +1 -1
- package/dist/src/sync/v2/import/pages/objectPage.js +36 -36
- package/dist/src/sync/v2/import/pages/objectPage.js.map +1 -1
- package/dist/src/sync/v2/import/pages/overviewPage.js +2 -1
- package/dist/src/sync/v2/import/pages/overviewPage.js.map +1 -1
- package/dist/src/sync/v2/import/utils.js +5 -7
- package/dist/src/sync/v2/import/utils.js.map +1 -1
- package/dist/src/sync/v2/types.js +1 -0
- package/dist/src/sync/v2/types.js.map +1 -1
- package/dist/src/sync/v4/application.d.ts +2 -2
- package/dist/src/sync/v4/application.d.ts.map +1 -1
- package/dist/src/sync/v4/application.js +44 -37
- package/dist/src/sync/v4/application.js.map +1 -1
- package/dist/src/sync/v4/export/controls/FilterBar.js +1 -0
- package/dist/src/sync/v4/export/controls/FilterBar.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageCustomSection.js +1 -0
- package/dist/src/sync/v4/export/controls/ObjectPageCustomSection.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageHeader.js +1 -0
- package/dist/src/sync/v4/export/controls/ObjectPageHeader.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageHeaderSection.js +1 -0
- package/dist/src/sync/v4/export/controls/ObjectPageHeaderSection.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageLayout.js +1 -0
- package/dist/src/sync/v4/export/controls/ObjectPageLayout.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageTable.js +1 -0
- package/dist/src/sync/v4/export/controls/ObjectPageTable.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageTableColumn.js +1 -0
- package/dist/src/sync/v4/export/controls/ObjectPageTableColumn.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageToolBarAction.js +1 -0
- package/dist/src/sync/v4/export/controls/ObjectPageToolBarAction.js.map +1 -1
- package/dist/src/sync/v4/export/controls/Table.d.ts +25 -10
- package/dist/src/sync/v4/export/controls/Table.d.ts.map +1 -1
- package/dist/src/sync/v4/export/controls/Table.js +132 -69
- package/dist/src/sync/v4/export/controls/Table.js.map +1 -1
- package/dist/src/sync/v4/export/controls/TableColumn.js +1 -0
- package/dist/src/sync/v4/export/controls/TableColumn.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ToolBar.js +1 -0
- package/dist/src/sync/v4/export/controls/ToolBar.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ToolBarAction.js +1 -0
- package/dist/src/sync/v4/export/controls/ToolBarAction.js.map +1 -1
- package/dist/src/sync/v4/export/controls/index.js +22 -15
- package/dist/src/sync/v4/export/controls/index.js.map +1 -1
- package/dist/src/sync/v4/export/export.d.ts +3 -2
- package/dist/src/sync/v4/export/export.d.ts.map +1 -1
- package/dist/src/sync/v4/export/export.js +45 -37
- package/dist/src/sync/v4/export/export.js.map +1 -1
- package/dist/src/sync/v4/export/exportCustomColumn.js +11 -1
- package/dist/src/sync/v4/export/exportCustomColumn.js.map +1 -1
- package/dist/src/sync/v4/export/factory.js +15 -2
- package/dist/src/sync/v4/export/factory.js.map +1 -1
- package/dist/src/sync/v4/export/flexibleColumnLayout.d.ts.map +1 -1
- package/dist/src/sync/v4/export/flexibleColumnLayout.js +8 -7
- package/dist/src/sync/v4/export/flexibleColumnLayout.js.map +1 -1
- package/dist/src/sync/v4/export/manifest.d.ts.map +1 -1
- package/dist/src/sync/v4/export/manifest.js +89 -44
- package/dist/src/sync/v4/export/manifest.js.map +1 -1
- package/dist/src/sync/v4/export/pages/FreestylePage.js +1 -0
- package/dist/src/sync/v4/export/pages/FreestylePage.js.map +1 -1
- package/dist/src/sync/v4/export/pages/ListReport.js +2 -2
- package/dist/src/sync/v4/export/pages/ListReport.js.map +1 -1
- package/dist/src/sync/v4/export/pages/ObjectPage.js +1 -0
- package/dist/src/sync/v4/export/pages/ObjectPage.js.map +1 -1
- package/dist/src/sync/v4/export/pages/index.js +13 -6
- package/dist/src/sync/v4/export/pages/index.js.map +1 -1
- package/dist/src/sync/v4/export/utils.js +1 -0
- package/dist/src/sync/v4/export/utils.js.map +1 -1
- package/dist/src/sync/v4/generate/freestylePage.js +1 -0
- package/dist/src/sync/v4/generate/freestylePage.js.map +1 -1
- package/dist/src/sync/v4/generate/generate.js +1 -0
- package/dist/src/sync/v4/generate/generate.js.map +1 -1
- package/dist/src/sync/v4/generate/index.js +7 -6
- package/dist/src/sync/v4/generate/index.js.map +1 -1
- package/dist/src/sync/v4/generate/listReport.d.ts.map +1 -1
- package/dist/src/sync/v4/generate/listReport.js +65 -33
- package/dist/src/sync/v4/generate/listReport.js.map +1 -1
- package/dist/src/sync/v4/generate/objectPage.d.ts.map +1 -1
- package/dist/src/sync/v4/generate/objectPage.js +20 -10
- package/dist/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v4/import/app/appProvider.js +1 -0
- package/dist/src/sync/v4/import/app/appProvider.js.map +1 -1
- package/dist/src/sync/v4/import/app/baseAppProvider.d.ts +1 -1
- package/dist/src/sync/v4/import/app/baseAppProvider.d.ts.map +1 -1
- package/dist/src/sync/v4/import/app/baseAppProvider.js +51 -23
- package/dist/src/sync/v4/import/app/baseAppProvider.js.map +1 -1
- package/dist/src/sync/v4/import/app/freestyleProvider.js +1 -0
- package/dist/src/sync/v4/import/app/freestyleProvider.js.map +1 -1
- package/dist/src/sync/v4/import/app/index.js +7 -6
- package/dist/src/sync/v4/import/app/index.js.map +1 -1
- package/dist/src/sync/v4/import/fragment.js +8 -10
- package/dist/src/sync/v4/import/fragment.js.map +1 -1
- package/dist/src/sync/v4/import/index.js +12 -5
- package/dist/src/sync/v4/import/index.js.map +1 -1
- package/dist/src/sync/v4/import/pages/listReport.js +5 -5
- package/dist/src/sync/v4/import/pages/listReport.js.map +1 -1
- package/dist/src/sync/v4/import/pages/objectPage.js +9 -11
- package/dist/src/sync/v4/import/pages/objectPage.js.map +1 -1
- package/dist/src/sync/v4/import/utils.js +3 -2
- package/dist/src/sync/v4/import/utils.js.map +1 -1
- package/dist/src/sync/v4/sync-rules/controllerExtensions.d.ts +9 -0
- package/dist/src/sync/v4/sync-rules/controllerExtensions.d.ts.map +1 -0
- package/dist/src/sync/v4/sync-rules/controllerExtensions.js +104 -0
- package/dist/src/sync/v4/sync-rules/controllerExtensions.js.map +1 -0
- package/dist/src/sync/v4/utils/StableIdHelper.d.ts +1 -1
- package/dist/src/sync/v4/utils/StableIdHelper.d.ts.map +1 -1
- package/dist/src/sync/v4/utils/StableIdHelper.js +13 -24
- package/dist/src/sync/v4/utils/StableIdHelper.js.map +1 -1
- package/dist/src/sync/v4/utils/utils.d.ts +16 -18
- package/dist/src/sync/v4/utils/utils.d.ts.map +1 -1
- package/dist/src/sync/v4/utils/utils.js +41 -51
- package/dist/src/sync/v4/utils/utils.js.map +1 -1
- package/package.json +8 -8
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getDefinitionKey = exports.convertActionKeyToStableId = exports.convertEnumToCSV = exports.arrayCombineMerge = exports.getNextTargetDefinition = exports.generatePageId = exports.getSchemaFilePath = exports.deleteEmptyStructure = exports.getObjectPageFacetSection = exports.createDefaultSection = exports.addTargetTitleAndSectionDescription = exports.addSectionTitleAndDescription = exports.getTemplateTypeFromManifest = exports.determineV4Template = exports.determineV2Template = exports.getVersionFromManifest = exports.getObjectPageFacets = exports.getObjectPageHeaderFacets = exports.getSchemaKeyOfLineItemRecord = exports.getManifestSectionByPathV4 = exports.getSectionFacet = exports.findAlias = exports.getPageTypeV4 = exports.getPageTypeV2 = exports.prepareRef = exports.getDataFieldDescription = exports.getLabelForDataField = exports.getLabelForPropertyPath = exports.evaluateCommonLabel = exports.getAnnotationPropertyValue = exports.parseAndMergeAndConvert = exports.createAnnotationPath = exports.DEFINITION_LINK_PREFIX = exports.TemplateType = void 0;
|
|
6
7
|
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
7
8
|
const i18next_1 = __importDefault(require("i18next"));
|
|
8
9
|
const deepmerge_1 = __importDefault(require("deepmerge"));
|
|
@@ -27,13 +28,14 @@ exports.DEFINITION_LINK_PREFIX = '#/definitions/';
|
|
|
27
28
|
* @param qualifier - Annotation qualifier.
|
|
28
29
|
* @returns Annotation path based on received params
|
|
29
30
|
*/
|
|
30
|
-
|
|
31
|
+
const createAnnotationPath = (entityTypeName, term, qualifier) => {
|
|
31
32
|
let annotationPath = `/${entityTypeName}/@${term}`;
|
|
32
33
|
if (qualifier) {
|
|
33
34
|
annotationPath += `#${qualifier}`;
|
|
34
35
|
}
|
|
35
36
|
return annotationPath;
|
|
36
37
|
};
|
|
38
|
+
exports.createAnnotationPath = createAnnotationPath;
|
|
37
39
|
/**
|
|
38
40
|
* Parses, merges, and converts a list of annotation files with aid of tools from annotation-vocabularies-tools
|
|
39
41
|
* @param annotationFiles - The list of all annotation files, in JSON format
|
|
@@ -51,14 +53,6 @@ function parseAndMergeAndConvert(annotationFiles, logger) {
|
|
|
51
53
|
if (parseResult.length > 0) {
|
|
52
54
|
converterOutput = annotation_converter_1.convert(edmx_parser_1.merge(...parseResult));
|
|
53
55
|
}
|
|
54
|
-
if (logger && (converterOutput === null || converterOutput === void 0 ? void 0 : converterOutput.diagnostics)) {
|
|
55
|
-
for (const converterMessage of converterOutput.diagnostics) {
|
|
56
|
-
extensionLogger_1.log(logger, {
|
|
57
|
-
severity: "error" /* Error */,
|
|
58
|
-
message: converterMessage.message
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
56
|
}
|
|
63
57
|
catch (error) {
|
|
64
58
|
extensionLogger_1.log(logger, {
|
|
@@ -69,7 +63,8 @@ function parseAndMergeAndConvert(annotationFiles, logger) {
|
|
|
69
63
|
return converterOutput;
|
|
70
64
|
}
|
|
71
65
|
exports.parseAndMergeAndConvert = parseAndMergeAndConvert;
|
|
72
|
-
|
|
66
|
+
const getAnnotationPropertyValue = (annotationProperty) => annotationProperty?.value || annotationProperty?.path;
|
|
67
|
+
exports.getAnnotationPropertyValue = getAnnotationPropertyValue;
|
|
73
68
|
/**
|
|
74
69
|
* Checks for Common.Label and overwrites the label from it if present
|
|
75
70
|
* @param {PropertyAnnotations} annotations - property annotations
|
|
@@ -77,8 +72,7 @@ exports.getAnnotationPropertyValue = (annotationProperty) => (annotationProperty
|
|
|
77
72
|
* @param {string} label - label, to be actualized
|
|
78
73
|
*/
|
|
79
74
|
function evaluateCommonLabel(annotations, entityType, label) {
|
|
80
|
-
|
|
81
|
-
if ((_a = annotations === null || annotations === void 0 ? void 0 : annotations.Common) === null || _a === void 0 ? void 0 : _a.Label) {
|
|
75
|
+
if (annotations?.Common?.Label) {
|
|
82
76
|
if (typeof annotations.Common.Label === 'string') {
|
|
83
77
|
label = annotations.Common.Label;
|
|
84
78
|
}
|
|
@@ -87,11 +81,11 @@ function evaluateCommonLabel(annotations, entityType, label) {
|
|
|
87
81
|
if (targetProperty.value) {
|
|
88
82
|
label = targetProperty.value;
|
|
89
83
|
}
|
|
90
|
-
else if (typeof
|
|
84
|
+
else if (typeof targetProperty.Common?.Label === 'string') {
|
|
91
85
|
label = targetProperty.annotations.Common.Label;
|
|
92
86
|
}
|
|
93
87
|
}
|
|
94
|
-
else if (typeof
|
|
88
|
+
else if (typeof annotations.Common?.Label?.toString() === 'string') {
|
|
95
89
|
label = annotations.Common.Label.toString();
|
|
96
90
|
}
|
|
97
91
|
}
|
|
@@ -119,7 +113,6 @@ exports.getLabelForPropertyPath = getLabelForPropertyPath;
|
|
|
119
113
|
* @returns label, derived from Common.Label or from property value
|
|
120
114
|
*/
|
|
121
115
|
function getLabelForDataField(field, entityType) {
|
|
122
|
-
var _a, _b;
|
|
123
116
|
let label, property;
|
|
124
117
|
if (field['Value']) {
|
|
125
118
|
if (typeof field['Value'] === 'string') {
|
|
@@ -135,7 +128,7 @@ function getLabelForDataField(field, entityType) {
|
|
|
135
128
|
else if (field['Target'] && field['Target'].$target && field['Target'].$target.Value) {
|
|
136
129
|
property = field['Target'].$target.Value.$target;
|
|
137
130
|
}
|
|
138
|
-
if (
|
|
131
|
+
if (property?.annotations?.Common?.Label) {
|
|
139
132
|
label = evaluateCommonLabel(property.annotations, entityType, label);
|
|
140
133
|
}
|
|
141
134
|
return label;
|
|
@@ -148,7 +141,6 @@ exports.getLabelForDataField = getLabelForDataField;
|
|
|
148
141
|
* @returns undefined or the right string value
|
|
149
142
|
*/
|
|
150
143
|
function getLabel(dataFieldLabel, entityType) {
|
|
151
|
-
var _a, _b;
|
|
152
144
|
if (typeof dataFieldLabel === 'string') {
|
|
153
145
|
return dataFieldLabel;
|
|
154
146
|
}
|
|
@@ -159,7 +151,7 @@ function getLabel(dataFieldLabel, entityType) {
|
|
|
159
151
|
}
|
|
160
152
|
else {
|
|
161
153
|
const singleProperty = property[0];
|
|
162
|
-
if (
|
|
154
|
+
if (singleProperty?.annotations?.Common?.Label) {
|
|
163
155
|
const label = dataFieldLabel;
|
|
164
156
|
return evaluateCommonLabel(singleProperty.annotations, entityType, label);
|
|
165
157
|
}
|
|
@@ -202,6 +194,7 @@ function getDataFieldDescription(dataFieldAbstract, entityType) {
|
|
|
202
194
|
title = dataFieldLabel || propertyCommonLabel || dataField.Target.$target.Title || dataField.Target.value;
|
|
203
195
|
break;
|
|
204
196
|
case "com.sap.vocabularies.UI.v1.DataFieldForAction" /* DataFieldForAction */:
|
|
197
|
+
case "com.sap.vocabularies.UI.v1.DataFieldWithAction" /* DataFieldWithAction */:
|
|
205
198
|
case "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation" /* DataFieldForIntentBasedNavigation */:
|
|
206
199
|
dataField = dataFieldAbstract;
|
|
207
200
|
if (dataFieldLabel) {
|
|
@@ -251,13 +244,14 @@ exports.getPageTypeV2 = getPageTypeV2;
|
|
|
251
244
|
* @param name - page component name
|
|
252
245
|
*/
|
|
253
246
|
function getPageTypeV4(v4App) {
|
|
254
|
-
var _a;
|
|
255
247
|
if (v4App.name && v4App.name !== ux_specification_types_1.v4.FE_TEMPLATE_V4_CUSTOM_PAGE) {
|
|
256
248
|
const templatePart = `${ux_specification_types_1.v4.FE_TEMPLATE_V4}.`;
|
|
257
249
|
return v4App.name.split(templatePart)[1];
|
|
258
250
|
}
|
|
259
|
-
else if (
|
|
260
|
-
|
|
251
|
+
else if (v4App?.name === ux_specification_types_1.v4.FE_TEMPLATE_V4_CUSTOM_PAGE) {
|
|
252
|
+
return ux_specification_types_1.PageTypeV4.FPMCustomPage;
|
|
253
|
+
}
|
|
254
|
+
else if (v4App.viewId ||
|
|
261
255
|
v4App.viewName) {
|
|
262
256
|
return ux_specification_types_1.PageTypeV4.CustomPage;
|
|
263
257
|
}
|
|
@@ -274,7 +268,7 @@ function getTargetAnnotationName(targetAnnotation, keyForRelatedFacetKeys = fals
|
|
|
274
268
|
* @returns alias for the given namespace
|
|
275
269
|
*/
|
|
276
270
|
function findAlias(namespace, oDataServiceAVT) {
|
|
277
|
-
let aliasReference = oDataServiceAVT
|
|
271
|
+
let aliasReference = oDataServiceAVT.references.find((reference) => {
|
|
278
272
|
return reference.namespace === namespace;
|
|
279
273
|
});
|
|
280
274
|
if (!aliasReference) {
|
|
@@ -288,7 +282,7 @@ function findAlias(namespace, oDataServiceAVT) {
|
|
|
288
282
|
namespace.split('SAP__')[namespace.split('SAP__').length - 1].toUpperCase());
|
|
289
283
|
});
|
|
290
284
|
}
|
|
291
|
-
return aliasReference
|
|
285
|
+
return aliasReference?.alias;
|
|
292
286
|
}
|
|
293
287
|
exports.findAlias = findAlias;
|
|
294
288
|
/**
|
|
@@ -299,11 +293,10 @@ exports.findAlias = findAlias;
|
|
|
299
293
|
* @returns the target annotation
|
|
300
294
|
*/
|
|
301
295
|
function determineTargetAnnotation(navigationParts, entityType, oDataServiceAVT) {
|
|
302
|
-
var _a;
|
|
303
296
|
const lastNavigationPart = navigationParts[navigationParts.length - 1];
|
|
304
297
|
const annotation = lastNavigationPart.substring(lastNavigationPart.lastIndexOf('.') + 1, lastNavigationPart.length);
|
|
305
298
|
const alias = findAlias(lastNavigationPart.substring(0, lastNavigationPart.lastIndexOf('.')).replace('@', ''), oDataServiceAVT);
|
|
306
|
-
return
|
|
299
|
+
return entityType?.annotations[alias]?.[annotation];
|
|
307
300
|
}
|
|
308
301
|
/**
|
|
309
302
|
* Adjust key by considering navigation
|
|
@@ -324,12 +317,11 @@ function adjustKey(key, navigationParts, keyForRelatedFacetKeys) {
|
|
|
324
317
|
return key;
|
|
325
318
|
}
|
|
326
319
|
function getKeyAndEntityTypeOfReferenceFacet(oDataServiceAVT, key, entityType, propertyValue, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, keyForRelatedFacetKeys = false) {
|
|
327
|
-
var _a;
|
|
328
320
|
let stopProcessing = false;
|
|
329
321
|
const navigationParts = propertyValue.split('/');
|
|
330
322
|
const navigation = navigationParts.length > 1;
|
|
331
323
|
if (navigation) {
|
|
332
|
-
entityType =
|
|
324
|
+
entityType = entityType.resolvePath(propertyValue.substring(0, propertyValue.lastIndexOf('/')))?.targetType;
|
|
333
325
|
}
|
|
334
326
|
key = adjustKey(key, navigationParts, keyForRelatedFacetKeys);
|
|
335
327
|
const targetAnnotation = determineTargetAnnotation(navigationParts, entityType, oDataServiceAVT);
|
|
@@ -382,7 +374,13 @@ function getSectionFacet(facetDefinition, sourceEntityType, oDataServiceAVT, log
|
|
|
382
374
|
}
|
|
383
375
|
key = key.replace(/\//gi, '::');
|
|
384
376
|
return key
|
|
385
|
-
?
|
|
377
|
+
? {
|
|
378
|
+
key,
|
|
379
|
+
...(facetDefinition.Label && { label: facetDefinition.Label.toString() }),
|
|
380
|
+
...(facetDefinition.ID && { ID: facetDefinition.ID.toString() }),
|
|
381
|
+
entityType
|
|
382
|
+
}
|
|
383
|
+
: undefined;
|
|
386
384
|
}
|
|
387
385
|
exports.getSectionFacet = getSectionFacet;
|
|
388
386
|
/**
|
|
@@ -396,7 +394,7 @@ exports.getSectionFacet = getSectionFacet;
|
|
|
396
394
|
* @param {boolean} importScenario - indicates if the function is called for the import, else it is the export
|
|
397
395
|
* @returns returns section of the manifest based on path, generates an empty object in case it does not exists
|
|
398
396
|
*/
|
|
399
|
-
|
|
397
|
+
const getManifestSectionByPathV4 = (manifest, path, targetAnnotation, targetAnnotationEncoded) => {
|
|
400
398
|
if (!path) {
|
|
401
399
|
return undefined;
|
|
402
400
|
}
|
|
@@ -423,6 +421,7 @@ exports.getManifestSectionByPathV4 = (manifest, path, targetAnnotation, targetAn
|
|
|
423
421
|
}
|
|
424
422
|
return manifestSection;
|
|
425
423
|
};
|
|
424
|
+
exports.getManifestSectionByPathV4 = getManifestSectionByPathV4;
|
|
426
425
|
function getSchemaKeyOfLineItemRecord(lineItemRecord) {
|
|
427
426
|
let schemaKey, target, value;
|
|
428
427
|
switch (lineItemRecord.$Type) {
|
|
@@ -539,7 +538,6 @@ function getAnnotationTerm(path, alias, entityType) {
|
|
|
539
538
|
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
540
539
|
*/
|
|
541
540
|
function evaluateTargetAnnotation(section, annotationRecord, facets, entityType, oDataServiceAVT, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, logger) {
|
|
542
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
543
541
|
const alias = findAlias(types_1.UIVOCABULARY, oDataServiceAVT);
|
|
544
542
|
let path = section ? section.key : '';
|
|
545
543
|
const targetEntityType = section.entityType;
|
|
@@ -548,7 +546,7 @@ function evaluateTargetAnnotation(section, annotationRecord, facets, entityType,
|
|
|
548
546
|
switch (annotationTerm) {
|
|
549
547
|
case "com.sap.vocabularies.UI.v1.Chart" /* Chart */: {
|
|
550
548
|
facets[path] = { base: types_1.FacetBase.Chart };
|
|
551
|
-
facets[path].target =
|
|
549
|
+
facets[path].target = annotationRecord?.Target?.$target;
|
|
552
550
|
facets[path].entityType = targetEntityType;
|
|
553
551
|
break;
|
|
554
552
|
}
|
|
@@ -567,38 +565,38 @@ function evaluateTargetAnnotation(section, annotationRecord, facets, entityType,
|
|
|
567
565
|
path = pathParts.join('::');
|
|
568
566
|
}
|
|
569
567
|
facets[path] = { base: types_1.FacetBase.LineItem };
|
|
570
|
-
facets[path].target =
|
|
568
|
+
facets[path].target = annotationRecord?.Target?.$target;
|
|
571
569
|
facets[path].entityType = targetEntityType;
|
|
572
570
|
break;
|
|
573
571
|
}
|
|
574
572
|
case "com.sap.vocabularies.UI.v1.FieldGroup" /* FieldGroup */: {
|
|
575
573
|
facets[path] = { base: types_1.FacetBase.Form };
|
|
576
|
-
facets[path].target =
|
|
574
|
+
facets[path].target = annotationRecord?.Target?.$target;
|
|
577
575
|
facets[path].entityType = targetEntityType;
|
|
578
576
|
break;
|
|
579
577
|
}
|
|
580
578
|
case "com.sap.vocabularies.UI.v1.DataPoint" /* DataPoint */: {
|
|
581
579
|
facets[path] = { base: types_1.FacetBase.DataPoint };
|
|
582
|
-
facets[path].target =
|
|
580
|
+
facets[path].target = annotationRecord?.Target?.$target;
|
|
583
581
|
facets[path].entityType = targetEntityType;
|
|
584
|
-
facets[path].Label =
|
|
582
|
+
facets[path].Label = annotationRecord?.Target?.$target['Title'];
|
|
585
583
|
break;
|
|
586
584
|
}
|
|
587
585
|
case "com.sap.vocabularies.UI.v1.PresentationVariant" /* PresentationVariant */: {
|
|
588
586
|
facets[path] = { base: types_1.FacetBase.PresentationVariant };
|
|
589
|
-
facets[path].target =
|
|
587
|
+
facets[path].target = annotationRecord?.Target?.$target;
|
|
590
588
|
facets[path].entityType = targetEntityType;
|
|
591
589
|
break;
|
|
592
590
|
}
|
|
593
591
|
case "com.sap.vocabularies.Communication.v1.Contact" /* Contact */: {
|
|
594
592
|
facets[path] = { base: types_1.FacetBase.Contact };
|
|
595
|
-
facets[path].target =
|
|
593
|
+
facets[path].target = annotationRecord?.Target?.$target;
|
|
596
594
|
facets[path].entityType = targetEntityType;
|
|
597
595
|
break;
|
|
598
596
|
}
|
|
599
597
|
case "com.sap.vocabularies.Communication.v1.Address" /* Address */: {
|
|
600
598
|
facets[path] = { base: types_1.FacetBase.Address };
|
|
601
|
-
facets[path].target =
|
|
599
|
+
facets[path].target = annotationRecord?.Target?.$target;
|
|
602
600
|
facets[path].entityType = targetEntityType;
|
|
603
601
|
break;
|
|
604
602
|
}
|
|
@@ -637,7 +635,6 @@ function evaluateTargetAnnotation(section, annotationRecord, facets, entityType,
|
|
|
637
635
|
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
638
636
|
*/
|
|
639
637
|
function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entityType, facets, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, logger) {
|
|
640
|
-
var _a;
|
|
641
638
|
const section = getSectionFacet(annotationRecord, entityType, oDataServiceAVT, logger, oDataVersion, false);
|
|
642
639
|
if (section) {
|
|
643
640
|
switch (annotationRecord.$Type) {
|
|
@@ -654,7 +651,7 @@ function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entity
|
|
|
654
651
|
annotationPath: annotationPath,
|
|
655
652
|
Label: section.label
|
|
656
653
|
});
|
|
657
|
-
|
|
654
|
+
annotationRecord.Facets?.forEach((collectionItem) => {
|
|
658
655
|
addFacetToConfig(collectionItem, oDataServiceAVT, serviceName, entityType, facet.facets, oDataVersion, logger);
|
|
659
656
|
});
|
|
660
657
|
break;
|
|
@@ -774,27 +771,12 @@ function determineV2Template(manifest, logger) {
|
|
|
774
771
|
}
|
|
775
772
|
exports.determineV2Template = determineV2Template;
|
|
776
773
|
/**
|
|
777
|
-
* Determines the template type of
|
|
778
|
-
* @param
|
|
779
|
-
* @
|
|
780
|
-
* @returns {TemplateType} the template type
|
|
774
|
+
* Determines the template type, based on the given manifest routing target entries of the app
|
|
775
|
+
* @param v4Pages - pages from routing targets
|
|
776
|
+
* @returns {TemplateType | undefined} the template type
|
|
781
777
|
*/
|
|
782
|
-
function
|
|
783
|
-
var _a, _b, _c, _d;
|
|
778
|
+
function determineV4TemplateFromPages(v4Pages) {
|
|
784
779
|
let templateType;
|
|
785
|
-
const v4Pages = manifest[ux_specification_types_1.ManifestSection.ui5].routing &&
|
|
786
|
-
manifest[ux_specification_types_1.ManifestSection.ui5].routing.targets;
|
|
787
|
-
if (!v4Pages) {
|
|
788
|
-
extensionLogger_1.log(logger, {
|
|
789
|
-
severity: "error" /* Error */,
|
|
790
|
-
message: i18next_1.default.t('NOPAGES', { appId: manifest['sap.app']['id'] }),
|
|
791
|
-
location: {
|
|
792
|
-
path: types_1.MANIFESTPATH,
|
|
793
|
-
range: [ux_specification_types_1.ManifestSection.ui5, 'routing']
|
|
794
|
-
}
|
|
795
|
-
});
|
|
796
|
-
return;
|
|
797
|
-
}
|
|
798
780
|
for (const pageKey in v4Pages) {
|
|
799
781
|
const v4Page = v4Pages[pageKey];
|
|
800
782
|
const pageType = getPageTypeV4(v4Page);
|
|
@@ -803,7 +785,7 @@ function determineV4Template(manifest, logger) {
|
|
|
803
785
|
break;
|
|
804
786
|
}
|
|
805
787
|
else if (pageType === ux_specification_types_1.PageTypeV4.ListReport) {
|
|
806
|
-
const viewPath =
|
|
788
|
+
const viewPath = v4Page.options?.settings?.views?.paths?.[0];
|
|
807
789
|
if (viewPath && (viewPath[ux_specification_types_1.ALPViewType.Primary] || viewPath[ux_specification_types_1.ALPViewType.Secondary])) {
|
|
808
790
|
templateType = TemplateType.AnalyticalListPageV4;
|
|
809
791
|
}
|
|
@@ -816,11 +798,36 @@ function determineV4Template(manifest, logger) {
|
|
|
816
798
|
templateType = TemplateType.ListReportObjectPageV4;
|
|
817
799
|
//fixed now for FEOP scenario, bit continue to check if LR/ALP exists
|
|
818
800
|
}
|
|
819
|
-
else if (
|
|
801
|
+
else if ([ux_specification_types_1.PageTypeV4.CustomPage, ux_specification_types_1.PageTypeV4.FPMCustomPage].includes(pageType)) {
|
|
820
802
|
templateType = TemplateType.FreestylePageV4;
|
|
821
803
|
break;
|
|
822
804
|
}
|
|
823
805
|
}
|
|
806
|
+
return templateType;
|
|
807
|
+
}
|
|
808
|
+
/**
|
|
809
|
+
* Determines the template type of a V4 app
|
|
810
|
+
* @param manifest - the manifest.json file
|
|
811
|
+
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
812
|
+
* @returns {TemplateType} the template type
|
|
813
|
+
*/
|
|
814
|
+
function determineV4Template(manifest, logger) {
|
|
815
|
+
const v4Pages = manifest[ux_specification_types_1.ManifestSection.ui5].routing &&
|
|
816
|
+
manifest[ux_specification_types_1.ManifestSection.ui5].routing.targets;
|
|
817
|
+
// if there are no pages in routing targets, we use LROPV4 as default template type
|
|
818
|
+
if (!v4Pages || Object.keys(v4Pages).length === 0) {
|
|
819
|
+
extensionLogger_1.log(logger, {
|
|
820
|
+
severity: "info" /* Info */,
|
|
821
|
+
message: i18next_1.default.t('NOPAGES', { appId: manifest['sap.app']['id'] }),
|
|
822
|
+
location: {
|
|
823
|
+
path: types_1.MANIFESTPATH,
|
|
824
|
+
range: [ux_specification_types_1.ManifestSection.ui5, 'routing']
|
|
825
|
+
}
|
|
826
|
+
});
|
|
827
|
+
return TemplateType.ListReportObjectPageV4;
|
|
828
|
+
}
|
|
829
|
+
// else try to determine template type from routing targets
|
|
830
|
+
const templateType = determineV4TemplateFromPages(v4Pages);
|
|
824
831
|
if (!templateType) {
|
|
825
832
|
extensionLogger_1.log(logger, {
|
|
826
833
|
severity: "error" /* Error */,
|
|
@@ -873,17 +880,17 @@ exports.getTemplateTypeFromManifest = getTemplateTypeFromManifest;
|
|
|
873
880
|
* @param facetKey - key of the facet
|
|
874
881
|
*/
|
|
875
882
|
function addSectionTitleAndDescription(facet, section, facetKey) {
|
|
876
|
-
if (facet
|
|
883
|
+
if (facet?.ID) {
|
|
877
884
|
section.title = types_1.FacetTitlePrefix + facet.ID;
|
|
878
885
|
}
|
|
879
886
|
else {
|
|
880
887
|
section.title = facetKey.replace(/@com.sap/g, 'com.sap');
|
|
881
888
|
}
|
|
882
889
|
// Description
|
|
883
|
-
if (facet
|
|
890
|
+
if (facet?.Label) {
|
|
884
891
|
section.description = facet.Label;
|
|
885
892
|
}
|
|
886
|
-
else if (facet
|
|
893
|
+
else if (facet?.ID) {
|
|
887
894
|
section.description = facet.ID;
|
|
888
895
|
}
|
|
889
896
|
else {
|
|
@@ -898,15 +905,14 @@ exports.addSectionTitleAndDescription = addSectionTitleAndDescription;
|
|
|
898
905
|
* @param facetKey - key of the facet
|
|
899
906
|
*/
|
|
900
907
|
function addTargetTitleAndSectionDescription(facet, section, facetKey) {
|
|
901
|
-
var _a;
|
|
902
908
|
addSectionTitleAndDescription(facet, section, facetKey);
|
|
903
|
-
if (facet
|
|
904
|
-
section.description = facet
|
|
909
|
+
if (facet?.Label) {
|
|
910
|
+
section.description = facet?.Label;
|
|
905
911
|
}
|
|
906
|
-
else if (facet
|
|
912
|
+
else if (facet?.['Title']) {
|
|
907
913
|
section.description = facet['Title'];
|
|
908
914
|
}
|
|
909
|
-
else if (
|
|
915
|
+
else if (facet?.target?.['Title']) {
|
|
910
916
|
section.description = facet.target['Title'];
|
|
911
917
|
}
|
|
912
918
|
}
|
|
@@ -975,7 +981,7 @@ exports.getObjectPageFacetSection = getObjectPageFacetSection;
|
|
|
975
981
|
* @param targetAnnotation - target annotation (optional, in case of sections, subsections)
|
|
976
982
|
* @param targetAnnotationEncoded - encoded version of the target annotation, as represented in the manifest
|
|
977
983
|
*/
|
|
978
|
-
|
|
984
|
+
const deleteEmptyStructure = (manifest, path, targetAnnotation, targetAnnotationEncoded) => {
|
|
979
985
|
if (!path) {
|
|
980
986
|
return;
|
|
981
987
|
}
|
|
@@ -1002,6 +1008,7 @@ exports.deleteEmptyStructure = (manifest, path, targetAnnotation, targetAnnotati
|
|
|
1002
1008
|
manifestSection = manifestSection && manifestSection[decodedElement];
|
|
1003
1009
|
});
|
|
1004
1010
|
};
|
|
1011
|
+
exports.deleteEmptyStructure = deleteEmptyStructure;
|
|
1005
1012
|
/**
|
|
1006
1013
|
* Method which returns generic schema file name.
|
|
1007
1014
|
* @param {SchemaType | PageType} schemaType Schema type or Page type.
|
|
@@ -1019,7 +1026,7 @@ const getGenericSchemaFileName = (schemaType) => {
|
|
|
1019
1026
|
* @param {string} [entitySet] Entity set string.
|
|
1020
1027
|
* @return {SchemaFilePath} File path info.
|
|
1021
1028
|
*/
|
|
1022
|
-
|
|
1029
|
+
const getSchemaFilePath = (schemaType, entitySet) => {
|
|
1023
1030
|
const schemaFile = {
|
|
1024
1031
|
filename: '',
|
|
1025
1032
|
path: ''
|
|
@@ -1042,6 +1049,13 @@ exports.getSchemaFilePath = (schemaType, entitySet) => {
|
|
|
1042
1049
|
schemaFile.path = `../${types_1.DirName.Schemas}/${schemaFile.filename}`;
|
|
1043
1050
|
break;
|
|
1044
1051
|
}
|
|
1052
|
+
case ux_specification_types_1.PageTypeV4.FPMCustomPage: {
|
|
1053
|
+
// File name
|
|
1054
|
+
schemaFile.filename = getGenericSchemaFileName(ux_specification_types_1.PageTypeV4.CustomPage);
|
|
1055
|
+
// Full path
|
|
1056
|
+
schemaFile.path = `../${types_1.DirName.Schemas}/${schemaFile.filename}`;
|
|
1057
|
+
break;
|
|
1058
|
+
}
|
|
1045
1059
|
// Other page configs
|
|
1046
1060
|
default: {
|
|
1047
1061
|
// File name
|
|
@@ -1054,6 +1068,7 @@ exports.getSchemaFilePath = (schemaType, entitySet) => {
|
|
|
1054
1068
|
schemaFile.path += '.json';
|
|
1055
1069
|
return schemaFile;
|
|
1056
1070
|
};
|
|
1071
|
+
exports.getSchemaFilePath = getSchemaFilePath;
|
|
1057
1072
|
/**
|
|
1058
1073
|
* Method which generates id of page according to passed parameters.
|
|
1059
1074
|
* @param appVersion - Fiori Elements version - V2 or V4.
|
|
@@ -1126,7 +1141,6 @@ function fillArrayFromPropertyDefinition(propertyDefinition, currentConfigObject
|
|
|
1126
1141
|
* @returns {NextDefinition} - Next target definition to process
|
|
1127
1142
|
*/
|
|
1128
1143
|
function determineNextDefinitionFromDefinitionArray(definitionArray, appSchema, title, currentConfigObject, key, factory, pageType, propertyDefinition) {
|
|
1129
|
-
var _a, _b, _c, _d;
|
|
1130
1144
|
let nextDefinition = {
|
|
1131
1145
|
configObject: undefined,
|
|
1132
1146
|
targetDefinition: {},
|
|
@@ -1135,7 +1149,7 @@ function determineNextDefinitionFromDefinitionArray(definitionArray, appSchema,
|
|
|
1135
1149
|
if (definitionArray.length) {
|
|
1136
1150
|
const lastDefinition = definitionArray[definitionArray.length - 1];
|
|
1137
1151
|
nextDefinition.targetDefinition = appSchema['definitions'][lastDefinition];
|
|
1138
|
-
if (
|
|
1152
|
+
if (nextDefinition?.targetDefinition?.['$ref'] || nextDefinition?.targetDefinition?.['type'] === 'array') {
|
|
1139
1153
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
1140
1154
|
nextDefinition = getNextTargetDefinition(appSchema, title, currentConfigObject, nextDefinition.targetDefinition, key, factory, pageType);
|
|
1141
1155
|
return nextDefinition;
|
|
@@ -1143,15 +1157,19 @@ function determineNextDefinitionFromDefinitionArray(definitionArray, appSchema,
|
|
|
1143
1157
|
if (definitionArray.length > 1) {
|
|
1144
1158
|
definitionArray.forEach((element) => {
|
|
1145
1159
|
if (element !== '') {
|
|
1146
|
-
nextDefinition.targetDefinition['properties'] =
|
|
1160
|
+
nextDefinition.targetDefinition['properties'] = {
|
|
1161
|
+
...nextDefinition.targetDefinition['properties'],
|
|
1162
|
+
...appSchema['definitions'][element]['properties']
|
|
1163
|
+
};
|
|
1147
1164
|
}
|
|
1148
1165
|
});
|
|
1149
1166
|
}
|
|
1150
|
-
nextDefinition.title =
|
|
1167
|
+
nextDefinition.title = nextDefinition?.targetDefinition?.['title']
|
|
1168
|
+
? nextDefinition.targetDefinition['title']
|
|
1151
1169
|
: title;
|
|
1152
|
-
const factoryKey = lastDefinition
|
|
1170
|
+
const factoryKey = lastDefinition?.split('<')[0];
|
|
1153
1171
|
const targetObject = currentConfigObject ? currentConfigObject : {};
|
|
1154
|
-
nextDefinition.configObject = factory.createInstance(pageType, factoryKey, targetObject,
|
|
1172
|
+
nextDefinition.configObject = factory.createInstance(pageType, factoryKey, targetObject, nextDefinition?.targetDefinition?.['controlProperty']);
|
|
1155
1173
|
}
|
|
1156
1174
|
else {
|
|
1157
1175
|
//e.g. sections ==> loop over all properties = subsections or other
|
|
@@ -1195,7 +1213,7 @@ exports.getNextTargetDefinition = getNextTargetDefinition;
|
|
|
1195
1213
|
* @param {*} options options object provided by deepmerge's merge function
|
|
1196
1214
|
* @returns
|
|
1197
1215
|
*/
|
|
1198
|
-
|
|
1216
|
+
const arrayCombineMerge = (target, source, options) => {
|
|
1199
1217
|
const destination = target.slice();
|
|
1200
1218
|
source.forEach((item, index) => {
|
|
1201
1219
|
if (typeof destination[index] === 'undefined') {
|
|
@@ -1210,6 +1228,7 @@ exports.arrayCombineMerge = (target, source, options) => {
|
|
|
1210
1228
|
});
|
|
1211
1229
|
return destination;
|
|
1212
1230
|
};
|
|
1231
|
+
exports.arrayCombineMerge = arrayCombineMerge;
|
|
1213
1232
|
/**
|
|
1214
1233
|
* Converts an enum into a CSV
|
|
1215
1234
|
* @param {object} manifestSection - manifestSection where the key exists
|