@sap/ux-specification 1.84.32 → 1.84.37
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 +81 -16
- 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-ListReport.html +1 -1
- package/dist/documentation/v4/v4-ObjectPage.html +1 -1
- package/dist/index-min.js +1 -1
- package/dist/schemas/v2/AnalyticalListPageConfig.json +9 -5
- package/dist/schemas/v2/ApplicationV2.json +11 -11
- package/dist/schemas/v2/ListReportConfig.json +11 -7
- package/dist/schemas/v2/ObjectPageConfig.json +11 -7
- package/dist/schemas/v4/ApplicationV4.json +9 -5
- package/dist/schemas/v4/ListReportConfig.json +590 -165
- package/dist/schemas/v4/ObjectPageConfig.json +36 -0
- package/dist/scripts/extractDocu.js.map +1 -1
- package/dist/scripts/runDocu.js +10 -40
- package/dist/scripts/runDocu.js.map +1 -1
- package/dist/scripts/spec.js.map +1 -1
- package/dist/scripts/to-json-schema.js.map +1 -1
- package/dist/specification/v2/index-min.js +1 -1
- package/dist/specification/v4/index-min.js +1 -1
- package/dist/src/api.d.ts +2 -2
- package/dist/src/api.js +11 -11
- package/dist/src/api.js.map +1 -1
- package/dist/src/apiTypes.d.ts +16 -19
- package/dist/src/apiTypes.js +0 -2
- package/dist/src/apiTypes.js.map +1 -1
- package/dist/src/extensionLogger.d.ts +1 -1
- package/dist/src/project.d.ts +1 -1
- package/dist/src/project.js +11 -3
- package/dist/src/project.js.map +1 -1
- package/dist/src/specification/common/Application.d.ts +24 -4
- package/dist/src/specification/common/page.d.ts +1 -1
- package/dist/src/specification/common/webapp/manifest/Manifest.d.ts +6 -6
- package/dist/src/specification/common/webapp/manifest/sapUi5.d.ts +1 -1
- package/dist/src/specification/schemaAccess.d.ts +1 -1
- package/dist/src/specification/schemaAccess.js +1 -2
- package/dist/src/specification/schemaAccess.js.map +1 -1
- package/dist/src/specification/v2/ApplicationV2.d.ts +3 -17
- package/dist/src/specification/v2/controls/Facets.d.ts +1 -1
- package/dist/src/specification/v2/controls/Footer.d.ts +2 -2
- package/dist/src/specification/v2/controls/ObjectPageForm.d.ts +1 -1
- package/dist/src/specification/v2/controls/ObjectPageHeader.d.ts +1 -1
- package/dist/src/specification/v2/controls/ObjectPageSection.d.ts +2 -2
- package/dist/src/specification/v2/controls/ObjectPageTable.d.ts +3 -4
- package/dist/src/specification/v2/controls/ObjectPageToolBar.d.ts +1 -1
- package/dist/src/specification/v2/controls/Table.d.ts +8 -5
- package/dist/src/specification/v2/controls/Table.js +5 -0
- package/dist/src/specification/v2/controls/Table.js.map +1 -1
- package/dist/src/specification/v2/controls/ToolBar.d.ts +1 -1
- package/dist/src/specification/v2/page.d.ts +1 -1
- package/dist/src/specification/v2/pages/AnalyticalListPageConfig.d.ts +4 -4
- package/dist/src/specification/v2/pages/ListReportConfig.d.ts +2 -2
- package/dist/src/specification/v2/pages/ObjectPageConfig.d.ts +3 -3
- package/dist/src/specification/v2/pages/OverviewPageConfig.d.ts +3 -3
- package/dist/src/specification/v2/webapp/manifest/sapUi5.d.ts +2 -2
- package/dist/src/specification/v2/webapp/manifest/sapUi5.js +0 -1
- package/dist/src/specification/v2/webapp/manifest/sapUi5.js.map +1 -1
- package/dist/src/specification/v2/webapp/manifest/sapUiPageV2.d.ts +2 -2
- package/dist/src/specification/v4/ApplicationV4.d.ts +4 -14
- package/dist/src/specification/v4/controls/ObjectPageHeader.d.ts +1 -1
- package/dist/src/specification/v4/controls/ObjectPageSection.d.ts +24 -3
- package/dist/src/specification/v4/controls/ObjectPageSection.js.map +1 -1
- package/dist/src/specification/v4/controls/ObjectPageTable.d.ts +3 -17
- package/dist/src/specification/v4/controls/ObjectPageToolBar.d.ts +1 -1
- package/dist/src/specification/v4/controls/Table.d.ts +148 -33
- package/dist/src/specification/v4/controls/Table.js +6 -0
- package/dist/src/specification/v4/controls/Table.js.map +1 -1
- package/dist/src/specification/v4/controls/ToolBar.d.ts +26 -1
- package/dist/src/specification/v4/page.d.ts +2 -2
- package/dist/src/specification/v4/pages/ListReportConfig.d.ts +22 -3
- package/dist/src/specification/v4/pages/ObjectPageConfig.d.ts +2 -2
- package/dist/src/specification/v4/pages/ObjectPageConfig.js.map +1 -1
- package/dist/src/specification/v4/pages/index.d.ts +0 -1
- package/dist/src/specification/v4/webapp/manifest/ManifestSettings.d.ts +77 -0
- package/dist/src/specification/v4/webapp/manifest/ManifestSettings.js.map +1 -1
- package/dist/src/specification/v4/webapp/manifest/sapUi5.d.ts +12 -3
- package/dist/src/specification/v4/webapp/manifest/sapUi5.js.map +1 -1
- package/dist/src/specification/v4/webapp/manifest/sapUiPageV4.d.ts +21 -1
- package/dist/src/specification/v4/webapp/manifest/sapUiPageV4.js.map +1 -1
- package/dist/src/sync/common/appProvider.d.ts +6 -5
- package/dist/src/sync/common/appProvider.js.map +1 -1
- package/dist/src/sync/common/decoration/control.d.ts +1 -1
- package/dist/src/sync/common/decoration/control.js +27 -22
- package/dist/src/sync/common/decoration/control.js.map +1 -1
- package/dist/src/sync/common/decoration/decorators.d.ts +1 -1
- package/dist/src/sync/common/decoration/decorators.js.map +1 -1
- package/dist/src/sync/common/decoration/factory.d.ts +3 -3
- package/dist/src/sync/common/decoration/flex.d.ts +3 -3
- package/dist/src/sync/common/flexUtils.d.ts +4 -4
- package/dist/src/sync/common/flexUtils.js.map +1 -1
- package/dist/src/sync/common/generate/objectPage.d.ts +9 -7
- package/dist/src/sync/common/generate/objectPage.js +69 -73
- package/dist/src/sync/common/generate/objectPage.js.map +1 -1
- package/dist/src/sync/common/generate/utils.d.ts +51 -18
- package/dist/src/sync/common/generate/utils.js +126 -68
- package/dist/src/sync/common/generate/utils.js.map +1 -1
- package/dist/src/sync/common/import/utils.d.ts +4 -3
- package/dist/src/sync/common/import/utils.js +3 -2
- package/dist/src/sync/common/import/utils.js.map +1 -1
- package/dist/src/sync/common/importProject.d.ts +4 -4
- package/dist/src/sync/common/importProject.js +33 -41
- package/dist/src/sync/common/importProject.js.map +1 -1
- package/dist/src/sync/common/types.d.ts +110 -13
- package/dist/src/sync/common/types.js +107 -7
- package/dist/src/sync/common/types.js.map +1 -1
- package/dist/src/sync/common/utils.d.ts +23 -15
- package/dist/src/sync/common/utils.js +138 -72
- package/dist/src/sync/common/utils.js.map +1 -1
- package/dist/src/sync/i18n.d.ts +1 -1
- package/dist/src/sync/v2/application.d.ts +2 -2
- package/dist/src/sync/v2/application.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Action.d.ts +1 -1
- package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.d.ts +1 -1
- package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.js +1 -1
- package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.js.map +1 -1
- package/dist/src/sync/v2/export/controls/AnalyticalListPageKPI.d.ts +1 -1
- package/dist/src/sync/v2/export/controls/Card.d.ts +1 -1
- package/dist/src/sync/v2/export/controls/Field.d.ts +1 -1
- package/dist/src/sync/v2/export/controls/FilterBar.d.ts +2 -1
- package/dist/src/sync/v2/export/controls/FormAction.d.ts +1 -1
- package/dist/src/sync/v2/export/controls/FormAction.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Fragment.d.ts +5 -11
- package/dist/src/sync/v2/export/controls/Fragment.js +110 -34
- package/dist/src/sync/v2/export/controls/Fragment.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageChart.d.ts +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageCustomSection.d.ts +3 -3
- package/dist/src/sync/v2/export/controls/ObjectPageCustomSection.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.d.ts +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageHeader.d.ts +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.d.ts +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageLayout.d.ts +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.d.ts +2 -2
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageTable.d.ts +4 -5
- package/dist/src/sync/v2/export/controls/ObjectPageTable.js +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageTable.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageToolBarAction.d.ts +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageToolBarAction.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Table.d.ts +5 -4
- package/dist/src/sync/v2/export/controls/Table.js +89 -47
- package/dist/src/sync/v2/export/controls/Table.js.map +1 -1
- package/dist/src/sync/v2/export/controls/TableColumn.d.ts +2 -2
- package/dist/src/sync/v2/export/controls/TableColumn.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ToolBar.d.ts +1 -1
- package/dist/src/sync/v2/export/export.d.ts +3 -4
- package/dist/src/sync/v2/export/export.js +222 -160
- package/dist/src/sync/v2/export/export.js.map +1 -1
- package/dist/src/sync/v2/export/exportPage.d.ts +2 -2
- package/dist/src/sync/v2/export/exportPage.js +4 -11
- package/dist/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/src/sync/v2/export/factory.d.ts +2 -1
- package/dist/src/sync/v2/export/factory.js.map +1 -1
- package/dist/src/sync/v2/export/manifest.d.ts +23 -1
- package/dist/src/sync/v2/export/manifest.js +77 -35
- package/dist/src/sync/v2/export/manifest.js.map +1 -1
- package/dist/src/sync/v2/export/pages/AnalyticalListPage.d.ts +4 -4
- package/dist/src/sync/v2/export/pages/AnalyticalListPage.js.map +1 -1
- package/dist/src/sync/v2/export/pages/ListReport.d.ts +2 -2
- package/dist/src/sync/v2/export/pages/ListReport.js.map +1 -1
- package/dist/src/sync/v2/export/pages/ObjectPage.d.ts +3 -3
- package/dist/src/sync/v2/export/pages/OverviewPage.d.ts +3 -3
- package/dist/src/sync/v2/export/pages/OverviewPage.js +20 -15
- package/dist/src/sync/v2/export/pages/OverviewPage.js.map +1 -1
- package/dist/src/sync/v2/export/view-controller-generator.d.ts +2 -2
- package/dist/src/sync/v2/export/view-controller-generator.js.map +1 -1
- package/dist/src/sync/v2/generate/analyticalListReport.d.ts +1 -1
- package/dist/src/sync/v2/generate/analyticalListReport.js +27 -36
- package/dist/src/sync/v2/generate/analyticalListReport.js.map +1 -1
- package/dist/src/sync/v2/generate/generate.d.ts +2 -2
- package/dist/src/sync/v2/generate/generate.js +3 -0
- package/dist/src/sync/v2/generate/generate.js.map +1 -1
- package/dist/src/sync/v2/generate/listReport.d.ts +7 -4
- package/dist/src/sync/v2/generate/listReport.js +38 -36
- package/dist/src/sync/v2/generate/listReport.js.map +1 -1
- package/dist/src/sync/v2/generate/objectPage.d.ts +1 -1
- package/dist/src/sync/v2/generate/objectPage.js +98 -96
- package/dist/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v2/generate/overviewPage.d.ts +1 -1
- package/dist/src/sync/v2/generate/overviewPage.js.map +1 -1
- package/dist/src/sync/v2/generate/utils.d.ts +8 -7
- package/dist/src/sync/v2/generate/utils.js +73 -69
- package/dist/src/sync/v2/generate/utils.js.map +1 -1
- package/dist/src/sync/v2/import/app/appProvider.d.ts +13 -4
- package/dist/src/sync/v2/import/app/appProvider.js +36 -13
- package/dist/src/sync/v2/import/app/appProvider.js.map +1 -1
- package/dist/src/sync/v2/import/app/ovpProvider.d.ts +3 -3
- package/dist/src/sync/v2/import/app/ovpProvider.js +1 -1
- package/dist/src/sync/v2/import/app/ovpProvider.js.map +1 -1
- package/dist/src/sync/v2/import/common/index.d.ts +6 -5
- package/dist/src/sync/v2/import/common/index.js +9 -22
- package/dist/src/sync/v2/import/common/index.js.map +1 -1
- package/dist/src/sync/v2/import/controls/table.d.ts +1 -1
- package/dist/src/sync/v2/import/controls/table.js +1 -1
- package/dist/src/sync/v2/import/controls/table.js.map +1 -1
- package/dist/src/sync/v2/import/pages/analyticalListPage.d.ts +2 -2
- package/dist/src/sync/v2/import/pages/analyticalListPage.js +1 -9
- package/dist/src/sync/v2/import/pages/analyticalListPage.js.map +1 -1
- package/dist/src/sync/v2/import/pages/listReport.d.ts +2 -2
- package/dist/src/sync/v2/import/pages/objectPage.d.ts +1 -1
- package/dist/src/sync/v2/import/pages/objectPage.js +36 -44
- package/dist/src/sync/v2/import/pages/objectPage.js.map +1 -1
- package/dist/src/sync/v2/import/pages/overviewPage.d.ts +2 -2
- package/dist/src/sync/v2/import/pages/overviewPage.js +1 -1
- package/dist/src/sync/v2/import/pages/overviewPage.js.map +1 -1
- package/dist/src/sync/v2/import/utils.d.ts +3 -2
- package/dist/src/sync/v2/import/utils.js +16 -2
- package/dist/src/sync/v2/import/utils.js.map +1 -1
- package/dist/src/sync/v2/types.d.ts +7 -7
- package/dist/src/sync/v4/application.d.ts +28 -12
- package/dist/src/sync/v4/application.js +85 -15
- package/dist/src/sync/v4/application.js.map +1 -1
- package/dist/src/sync/v4/export/controls/FilterBar.d.ts +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageCustomSection.d.ts +2 -1
- package/dist/src/sync/v4/export/controls/ObjectPageCustomSection.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageHeader.d.ts +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageHeaderSection.d.ts +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageHeaderSection.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageLayout.d.ts +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageTable.d.ts +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageTableColumn.d.ts +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageToolBarAction.d.ts +1 -1
- package/dist/src/sync/v4/export/controls/Table.d.ts +109 -8
- package/dist/src/sync/v4/export/controls/Table.js +406 -44
- package/dist/src/sync/v4/export/controls/Table.js.map +1 -1
- package/dist/src/sync/v4/export/controls/TableColumn.d.ts +52 -1
- package/dist/src/sync/v4/export/controls/TableColumn.js +248 -2
- package/dist/src/sync/v4/export/controls/TableColumn.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ToolBar.d.ts +1 -1
- package/dist/src/sync/v4/export/controls/ToolBarAction.d.ts +4 -1
- package/dist/src/sync/v4/export/controls/ToolBarAction.js +10 -0
- package/dist/src/sync/v4/export/controls/ToolBarAction.js.map +1 -1
- package/dist/src/sync/v4/export/export.d.ts +2 -2
- package/dist/src/sync/v4/export/export.js +465 -96
- package/dist/src/sync/v4/export/export.js.map +1 -1
- package/dist/src/sync/v4/export/factory.d.ts +2 -1
- package/dist/src/sync/v4/export/factory.js.map +1 -1
- package/dist/src/sync/v4/export/flexibleColumnLayout.d.ts +1 -1
- package/dist/src/sync/v4/export/flexibleColumnLayout.js.map +1 -1
- package/dist/src/sync/v4/export/manifest.d.ts +1 -1
- package/dist/src/sync/v4/export/manifest.js.map +1 -1
- package/dist/src/sync/v4/export/pages/ListReport.d.ts +9 -3
- package/dist/src/sync/v4/export/pages/ListReport.js +49 -0
- package/dist/src/sync/v4/export/pages/ListReport.js.map +1 -1
- package/dist/src/sync/v4/export/pages/ObjectPage.d.ts +2 -2
- package/dist/src/sync/v4/export/pages/ObjectPage.js +3 -2
- package/dist/src/sync/v4/export/pages/ObjectPage.js.map +1 -1
- package/dist/src/sync/v4/export/pages/index.d.ts +0 -1
- package/dist/src/sync/v4/export/pages/index.js +0 -1
- package/dist/src/sync/v4/export/pages/index.js.map +1 -1
- package/dist/src/sync/v4/export/types.d.ts +8 -6
- package/dist/src/sync/v4/export/utils.d.ts +1 -1
- package/dist/src/sync/v4/generate/generate.d.ts +5 -4
- package/dist/src/sync/v4/generate/generate.js +6 -3
- package/dist/src/sync/v4/generate/generate.js.map +1 -1
- package/dist/src/sync/v4/generate/listReport.d.ts +2 -4
- package/dist/src/sync/v4/generate/listReport.js +450 -36
- package/dist/src/sync/v4/generate/listReport.js.map +1 -1
- package/dist/src/sync/v4/generate/objectPage.d.ts +1 -1
- package/dist/src/sync/v4/generate/objectPage.js +302 -146
- package/dist/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v4/import/app/appProvider.d.ts +6 -5
- package/dist/src/sync/v4/import/app/appProvider.js +38 -32
- package/dist/src/sync/v4/import/app/appProvider.js.map +1 -1
- package/dist/src/sync/v4/import/fragment.d.ts +2 -2
- package/dist/src/sync/v4/import/fragment.js.map +1 -1
- package/dist/src/sync/v4/import/index.d.ts +0 -1
- package/dist/src/sync/v4/import/index.js +0 -1
- package/dist/src/sync/v4/import/index.js.map +1 -1
- package/dist/src/sync/v4/import/pages/listReport.d.ts +8 -7
- package/dist/src/sync/v4/import/pages/listReport.js +120 -29
- package/dist/src/sync/v4/import/pages/listReport.js.map +1 -1
- package/dist/src/sync/v4/import/pages/objectPage.d.ts +15 -2
- package/dist/src/sync/v4/import/pages/objectPage.js +69 -40
- package/dist/src/sync/v4/import/pages/objectPage.js.map +1 -1
- package/dist/src/sync/v4/import/utils.d.ts +4 -3
- package/dist/src/sync/v4/import/utils.js +2 -2
- package/dist/src/sync/v4/import/utils.js.map +1 -1
- package/dist/src/sync/v4/types.d.ts +4 -2
- package/dist/src/sync/v4/utils/StableIdHelper.js +13 -10
- package/dist/src/sync/v4/utils/StableIdHelper.js.map +1 -1
- package/dist/src/sync/v4/utils/utils.d.ts +18 -12
- package/dist/src/sync/v4/utils/utils.js +77 -30
- package/dist/src/sync/v4/utils/utils.js.map +1 -1
- package/dist/test/test-data/flexChange/v2/stta.prod.man/index.d.ts +1 -1
- package/dist/test/test-projects/index.d.ts +1 -1
- package/dist/test/test-utils/utils.d.ts +5 -4
- package/dist/test/unit/export/manifest.test.d.ts +1 -0
- package/package.json +17 -14
- package/dist/documentation/v4/v4-AnalyticalListPage.html +0 -49
- package/dist/schemas/v4/AnalyticalListPageConfig.json +0 -362
- package/dist/src/specification/v4/pages/AnalyticalListPageConfig.d.ts +0 -13
- package/dist/src/specification/v4/pages/AnalyticalListPageConfig.js +0 -3
- package/dist/src/specification/v4/pages/AnalyticalListPageConfig.js.map +0 -1
- package/dist/src/sync/v4/export/pages/AnalyticalListPage.d.ts +0 -8
- package/dist/src/sync/v4/export/pages/AnalyticalListPage.js +0 -38
- package/dist/src/sync/v4/export/pages/AnalyticalListPage.js.map +0 -1
- package/dist/src/sync/v4/import/pages/analyticalListPage.d.ts +0 -11
- package/dist/src/sync/v4/import/pages/analyticalListPage.js +0 -60
- package/dist/src/sync/v4/import/pages/analyticalListPage.js.map +0 -1
|
@@ -3,18 +3,18 @@ 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
|
+
const i18next_1 = __importDefault(require("i18next"));
|
|
7
|
+
const extensionLogger_1 = require("../../../extensionLogger");
|
|
6
8
|
const common_1 = require("../../../specification/common");
|
|
7
9
|
const v4_1 = require("../../../v4");
|
|
8
10
|
const common_2 = require("../../common");
|
|
9
11
|
const utils_1 = require("../utils/utils");
|
|
10
|
-
const i18next_1 = __importDefault(require("i18next"));
|
|
11
|
-
const extensionLogger_1 = require("../../../extensionLogger");
|
|
12
12
|
/**
|
|
13
13
|
* Callback for adding a single action to headerActions of V4
|
|
14
14
|
* @param {EntityType} entityType - current entity type
|
|
15
|
-
* @param {
|
|
15
|
+
* @param {Definition} appSchema Schema of the app
|
|
16
16
|
* @param actionAnnotation - annotation as present in AVT ConverterOutput
|
|
17
|
-
* @param headerActions - list of header actions, to be enhanced
|
|
17
|
+
* @param {Definition} headerActions - list of header actions, to be enhanced
|
|
18
18
|
* @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
19
19
|
*/
|
|
20
20
|
function addHeaderActionCallBackV4(entityType, appSchema, actionAnnotation, headerActions, oDataServiceAVT) {
|
|
@@ -23,124 +23,274 @@ function addHeaderActionCallBackV4(entityType, appSchema, actionAnnotation, head
|
|
|
23
23
|
item.$Type === "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation" /* DataFieldForIntentBasedNavigation */) {
|
|
24
24
|
const action = common_2.replaceAlias(item.Action, oDataServiceAVT);
|
|
25
25
|
const { actionName, actionId } = common_2.getActionNameAndId(action, entityType);
|
|
26
|
-
const description = item.Label || actionName;
|
|
27
|
-
const actionDefinitionKey = `HeaderAction<${common_2.prepareRef(actionId)}>`;
|
|
28
26
|
const convertedIdentification = actionAnnotation.fullyQualifiedName.replace(`@${"com.sap.vocabularies.UI.v1.Identification" /* Identification */}`, `/@${"com.sap.vocabularies.UI.v1.Identification" /* Identification */}`);
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
const actionDefinitionKey = `HeaderAction<${common_2.prepareRef(actionId)}>`;
|
|
28
|
+
const headerAction = (appSchema.definitions[actionDefinitionKey] = {
|
|
31
29
|
type: 'object',
|
|
32
30
|
properties: {},
|
|
33
|
-
description:
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
description: item.Label || actionName
|
|
32
|
+
});
|
|
33
|
+
headerAction[v4_1.SchemaTag.isViewNode] = true;
|
|
34
|
+
headerAction[v4_1.SchemaTag.annotationPath] = `/${convertedIdentification}/${index}`;
|
|
36
35
|
headerActions.properties[actionId] = {
|
|
37
36
|
$ref: `${common_2.DEFINITION_LINK_PREFIX}${actionDefinitionKey}`
|
|
38
37
|
};
|
|
39
38
|
}
|
|
40
39
|
};
|
|
41
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Adds definitions for collections in object page sections to the app schema
|
|
43
|
+
* @param {FacetConfig} facet - the given facet from the UI annotations
|
|
44
|
+
* @param {string} facetKey - key of the facet, as used in annotation
|
|
45
|
+
* @param {Definition} appSchema - app schema in general
|
|
46
|
+
* @param {Definition} sections - schema of current sections definition.
|
|
47
|
+
* @param {SectionType} sectionPrefix - prefix to distinguish Section and HeaderSection
|
|
48
|
+
* @param {GenerateSchemaParameters} generateParameters - list of API input parameters
|
|
49
|
+
* @param {SapUiAppPageV4} v4Page Current page in manifest
|
|
50
|
+
*/
|
|
51
|
+
function handleCollection(facet, facetKey, appSchema, sections, sectionPrefix, generateParameters, v4Page) {
|
|
52
|
+
const collectionFacet = (sections['properties'][facetKey] = common_2.createSectionWithoutProperties(facet, facetKey));
|
|
53
|
+
collectionFacet.properties = {
|
|
54
|
+
subsections: {
|
|
55
|
+
additionalProperties: false,
|
|
56
|
+
type: 'object',
|
|
57
|
+
properties: {},
|
|
58
|
+
description: 'Subsections'
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const subSections = collectionFacet.properties.subsections;
|
|
62
|
+
subSections[v4_1.SchemaTag.annotationPath] = facet.annotationPath;
|
|
63
|
+
subSections[v4_1.SchemaTag.isViewNode] = true;
|
|
64
|
+
for (const key in facet['facets']) {
|
|
65
|
+
addSection(generateParameters, facet['facets'], key, subSections, appSchema, sectionPrefix, v4Page);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
42
68
|
/**
|
|
43
69
|
* Adds definitions for line items in object page sections to the app schema
|
|
44
|
-
* @param facet - the given facet from the UI annotations
|
|
45
|
-
* @param
|
|
46
|
-
* @param
|
|
47
|
-
* @param
|
|
48
|
-
* @param appSchema - app schema in general
|
|
70
|
+
* @param {FacetConfig} facet - the given facet from the UI annotations
|
|
71
|
+
* @param {string} facetKey - key of the facet, as used in annotation
|
|
72
|
+
* @param {Definition} appSchema - app schema in general
|
|
73
|
+
* @param {object} lineItemFacet - current lineItem facet
|
|
49
74
|
* @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
50
|
-
* @param {SapUiAppPageV4} v4Page Current page in manifest
|
|
51
|
-
* @param {ExtensionLogger} logger - logger for exceptions
|
|
52
75
|
*/
|
|
53
|
-
function handleLineItem(facet,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
appSchema['definitions'][schemaIdForOpSection] = JSON.parse(JSON.stringify(appSchema['definitions']['ObjectPageSectionTableV4']));
|
|
58
|
-
const schemaIdForTable = `ObjectPageTable<${facetIdInSchema}>`;
|
|
59
|
-
appSchema['definitions'][schemaIdForOpSection].properties.table.$ref = `${common_2.DEFINITION_LINK_PREFIX}${schemaIdForTable}`;
|
|
60
|
-
appSchema['definitions'][schemaIdForTable] = JSON.parse(JSON.stringify(appSchema['definitions'][v4_1.DefinitionName.ObjectPageTable]));
|
|
61
|
-
appSchema['definitions'][schemaIdForOpSection].annotationPath = facet.annotationPath;
|
|
62
|
-
common_2.addSectionTitleAndDescription(facet, appSchema['definitions'][schemaIdForOpSection], facetIdInSchema);
|
|
63
|
-
appSchema['definitions'][schemaIdForOpSection].properties.table.$ref = `${common_2.DEFINITION_LINK_PREFIX}ObjectPageTable<${facetIdInSchema}>`;
|
|
64
|
-
const idForTable = `ObjectPageTable<${facetIdInSchema}>`;
|
|
65
|
-
appSchema['definitions'][idForTable] = JSON.parse(JSON.stringify(appSchema['definitions'][v4_1.DefinitionName.ObjectPageTable]));
|
|
76
|
+
function handleLineItem(facet, facetKey, appSchema, lineItemFacet, oDataServiceAVT) {
|
|
77
|
+
const lineItemId = common_2.getFacetKeyInSchema(facetKey);
|
|
78
|
+
const annotation = lineItemId.split('::')[1];
|
|
79
|
+
const tableDefinition = common_2.parseSchemaDefinition(v4_1.DefinitionName.ObjectPageTable, facetKey, appSchema);
|
|
66
80
|
if (facet.entityType && annotation) {
|
|
67
|
-
|
|
81
|
+
tableDefinition[v4_1.SchemaTag.annotationPath] = `/${facet.entityType.fullyQualifiedName}/${annotation}`;
|
|
68
82
|
}
|
|
69
|
-
|
|
70
|
-
$ref: common_2.DEFINITION_LINK_PREFIX
|
|
83
|
+
tableDefinition.properties.columns = {
|
|
84
|
+
$ref: `${common_2.DEFINITION_LINK_PREFIX}${lineItemId}`
|
|
71
85
|
};
|
|
72
|
-
|
|
86
|
+
tableDefinition.properties.toolBar.$ref = common_2.getFacetDefinitionLink(v4_1.DefinitionName.ObjectPageToolBar, facetKey);
|
|
73
87
|
//adjust quickVariantSelection
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
common_2.addEnumForSingleTabVariant(facet.entityType, appSchema,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
88
|
+
tableDefinition.properties.quickVariantSelection.$ref = common_2.getFacetDefinitionLink(v4_1.DefinitionName.QuickVariantSelectionV4OP, facetKey);
|
|
89
|
+
const tableQVS = common_2.parseSchemaDefinition(v4_1.DefinitionName.QuickVariantSelectionV4OP, facetKey, appSchema);
|
|
90
|
+
tableQVS.properties.paths['items'].$ref = common_2.getFacetDefinitionLink(v4_1.DefinitionName.AnnotationPathAsObject, facetKey);
|
|
91
|
+
common_2.parseSchemaDefinition(v4_1.DefinitionName.AnnotationPathAsObject, facetKey, appSchema);
|
|
92
|
+
common_2.addEnumForSingleTabVariant(facet.entityType, appSchema, `${v4_1.DefinitionName.AnnotationPathAsObject}<${lineItemId}>`);
|
|
93
|
+
utils_1.addLineItemsType(appSchema, lineItemFacet['target'], lineItemFacet['entityType'], oDataServiceAVT, lineItemId, v4_1.DefinitionName.ObjectPageTableColumn);
|
|
94
|
+
return tableDefinition;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Adds definitions for table section in object page sections to the app schema
|
|
98
|
+
* @param {FacetConfig} facet - current facet.
|
|
99
|
+
* @param {string} facetKey - facet key.
|
|
100
|
+
* @param {Definition} appSchema - app specific schema that potentially gets enhanced.
|
|
101
|
+
* @param {object} lineItemFacet - current lineItem facet
|
|
102
|
+
* @param {GenerateSchemaParameters} generateParameters - list of API input parameters
|
|
103
|
+
* @param {SapUiAppPageV4} v4Page Current page in manifest
|
|
104
|
+
* @param {Definition} sections - schema of current sections definition.
|
|
105
|
+
* @returns {object} sectionTable - section of app schema containing added table section
|
|
106
|
+
*/
|
|
107
|
+
function handleSectionTable(facet, facetKey, appSchema, lineItemFacet, generateParameters, sections) {
|
|
108
|
+
if (sections) {
|
|
109
|
+
sections.properties[facetKey] = {
|
|
110
|
+
$ref: common_2.getFacetDefinitionLink(v4_1.DefinitionName.ObjectPageSectionTableV4, facetKey)
|
|
111
|
+
};
|
|
83
112
|
}
|
|
113
|
+
const sectionTable = common_2.parseSchemaDefinition(v4_1.DefinitionName.ObjectPageSectionTableV4, facetKey, appSchema);
|
|
114
|
+
common_2.addSectionTitleAndDescription(facet, sectionTable, common_2.getFacetKeyInSchema(facetKey));
|
|
115
|
+
sectionTable[v4_1.SchemaTag.annotationPath] = facet.annotationPath;
|
|
116
|
+
sectionTable.properties.table['$ref'] = common_2.getFacetDefinitionLink(v4_1.DefinitionName.ObjectPageTable, facetKey);
|
|
117
|
+
const table = handleLineItem(facet, facetKey, appSchema, lineItemFacet, generateParameters.serviceAVT);
|
|
118
|
+
return { sectionTable, table };
|
|
84
119
|
}
|
|
85
120
|
/**
|
|
86
121
|
* Adds definitions for Identification and Form facet items in object page sections to the app schema
|
|
87
|
-
* @param {
|
|
122
|
+
* @param {FacetConfig} facet - current facet.
|
|
88
123
|
* @param {string} facetKey - facet key.
|
|
89
124
|
* @param {object} sections - schema of current sections definition.
|
|
90
125
|
* @param {object} appSchema - app specific schema that potentially gets enhanced.
|
|
91
126
|
* @param {SectionType} sectionPrefix - prefix to distinguish Section and HeaderSection
|
|
92
|
-
* @param {SectionType} formDefinitionKey - key to identify new definition
|
|
93
127
|
*/
|
|
94
|
-
function handleFormIdentification(facet, facetKey, sections, appSchema, sectionPrefix
|
|
128
|
+
function handleFormIdentification(facet, facetKey, sections, appSchema, sectionPrefix) {
|
|
129
|
+
let definitionType;
|
|
130
|
+
if (sectionPrefix === v4_1.SectionType.Section) {
|
|
131
|
+
definitionType = v4_1.DefinitionName.ObjectPageSectionForm;
|
|
132
|
+
}
|
|
133
|
+
else if (sectionPrefix === v4_1.SectionType.HeaderSection) {
|
|
134
|
+
definitionType = v4_1.DefinitionName.ObjectPageHeaderSectionForm;
|
|
135
|
+
}
|
|
95
136
|
sections['properties'][facetKey] = {
|
|
96
|
-
$ref:
|
|
137
|
+
$ref: common_2.getFacetDefinitionLink(definitionType, facetKey)
|
|
97
138
|
};
|
|
98
|
-
|
|
139
|
+
const formSection = common_2.parseSchemaDefinition(definitionType, facetKey, appSchema);
|
|
99
140
|
if (!facet.ID) {
|
|
100
|
-
|
|
141
|
+
formSection.properties = {};
|
|
101
142
|
}
|
|
102
|
-
common_2.addSectionTitleAndDescription(facet,
|
|
103
|
-
|
|
104
|
-
|
|
143
|
+
common_2.addSectionTitleAndDescription(facet, formSection, facetKey);
|
|
144
|
+
formSection[v4_1.SchemaTag.annotationPath] = facet.annotationPath;
|
|
145
|
+
formSection[v4_1.SchemaTag.isViewNode] = true;
|
|
105
146
|
const withActions = facet.base === common_2.FacetBase.Identification && facetKey.indexOf('#') < 0 ? false : true;
|
|
106
|
-
common_2.handleForm(sectionPrefix, facet,
|
|
147
|
+
common_2.handleForm(sectionPrefix, facet, formSection, appSchema, common_1.FioriElementsVersion.v4, withActions);
|
|
107
148
|
}
|
|
108
149
|
/**
|
|
109
|
-
* Adds definitions for DataPoint
|
|
110
|
-
* @param {
|
|
150
|
+
* Adds definitions for header sections (DataPoint, Chart) in object page sections to the app schema
|
|
151
|
+
* @param {FacetConfig} facet - current facet.
|
|
111
152
|
* @param {string} facetKey - facet key.
|
|
112
153
|
* @param {object} sections - schema of current sections definition.
|
|
113
154
|
* @param {object} appSchema - app specific schema that potentially gets enhanced.
|
|
114
|
-
* @param {SectionType} sectionPrefix - prefix to distinguish Section and HeaderSection
|
|
115
155
|
* @param {SectionType} facetDefinitionKey - key to identify new definition
|
|
116
156
|
*/
|
|
117
|
-
function
|
|
157
|
+
function handleHeaderFacet(facet, facetKey, sections, appSchema, facetDefinitionKey) {
|
|
118
158
|
sections['properties'][facetKey] = {
|
|
119
159
|
$ref: `${common_2.DEFINITION_LINK_PREFIX}${facetDefinitionKey}`
|
|
120
160
|
};
|
|
121
|
-
|
|
122
|
-
common_2.addTargetTitleAndSectionDescription(facet,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
161
|
+
const sectionFacet = common_2.parseSchemaDefinition(v4_1.DefinitionName.CommonHeaderFacetSettings, facetDefinitionKey, appSchema, false);
|
|
162
|
+
common_2.addTargetTitleAndSectionDescription(facet, sectionFacet, facetKey);
|
|
163
|
+
sectionFacet[v4_1.SchemaTag.annotationPath] = facet.annotationPath;
|
|
164
|
+
sectionFacet[v4_1.SchemaTag.dataType] = common_2.determineDataTypeOfTarget(facet === null || facet === void 0 ? void 0 : facet.target);
|
|
165
|
+
sectionFacet[v4_1.SchemaTag.isViewNode] = true;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Adds definitions for Chart items in object page sections to the app schema
|
|
169
|
+
* @param {FacetConfig | Chart | object} facet - current facet.
|
|
170
|
+
* @param {string} facetKey - facet key.
|
|
171
|
+
* @param {object} appSchema - app specific schema that potentially gets enhanced.
|
|
172
|
+
* @param {EntityType} entityType - current entity type
|
|
173
|
+
*/
|
|
174
|
+
function handleChartActions(facet, facetKey, appSchema, entityType) {
|
|
175
|
+
const actions = common_2.parseSchemaDefinition(v4_1.DefinitionName.ObjectPageToolBarActions, facetKey, appSchema);
|
|
176
|
+
actions.additionalProperties = false;
|
|
177
|
+
actions.properties = {};
|
|
178
|
+
if (facet.Actions) {
|
|
179
|
+
let i = 0;
|
|
180
|
+
facet.Actions.forEach((actionRecord) => {
|
|
181
|
+
const description = common_2.getDataFieldDescription(actionRecord, entityType);
|
|
182
|
+
const prefix = actionRecord.$Type.split(v4_1.UIVOCABULARYDOT)[1];
|
|
183
|
+
const actionId = actionRecord.Action.replace('/', '??');
|
|
184
|
+
const toolBarActionsProperty = (actions.properties[`${prefix}::${actionRecord.Action}`] = {
|
|
185
|
+
$ref: common_2.getFacetDefinitionLink(v4_1.DefinitionName.ObjectPageToolBarAction, actionId),
|
|
186
|
+
description
|
|
187
|
+
});
|
|
188
|
+
toolBarActionsProperty[v4_1.SchemaTag.propertyIndex] = i;
|
|
189
|
+
toolBarActionsProperty[v4_1.SchemaTag.annotationType] = actionRecord.$Type;
|
|
190
|
+
const toolBarAction = common_2.parseSchemaDefinition(v4_1.DefinitionName.ObjectPageToolBarAction, common_2.prepareRef(actionId), appSchema);
|
|
191
|
+
toolBarAction[v4_1.SchemaTag.annotationPath] = common_2.getFacetAnnotationPath(actionRecord);
|
|
192
|
+
toolBarAction[v4_1.SchemaTag.dataType] = common_2.determineDataType(actionRecord);
|
|
193
|
+
toolBarAction.properties = {};
|
|
194
|
+
i++;
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
return actions;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Adds definitions for Chart items in object page sections to the app schema
|
|
201
|
+
* @param {FacetConfig | Chart | object} facet - current facet.
|
|
202
|
+
* @param {string} facetKey - facet key.
|
|
203
|
+
* @param {object} appSchema - app specific schema that potentially gets enhanced.
|
|
204
|
+
* @param {EntityType} entityType - current entity type
|
|
205
|
+
*/
|
|
206
|
+
function handleChart(facet, facetKey, appSchema, entityType) {
|
|
207
|
+
const chart = common_2.parseSchemaDefinition(v4_1.DefinitionName.ObjectPageChart, facetKey, appSchema);
|
|
208
|
+
chart[v4_1.SchemaTag.annotationPath] = common_2.getFacetAnnotationPath(facet);
|
|
209
|
+
chart[v4_1.SchemaTag.dataType] = common_2.determineDataTypeOfTarget(facet.target || facet);
|
|
210
|
+
chart[v4_1.SchemaTag.isViewNode] = true;
|
|
211
|
+
chart.properties.toolBar['$ref'] = common_2.getFacetDefinitionLink(v4_1.DefinitionName.ObjectPageToolBar, facetKey);
|
|
212
|
+
const chartToolBar = common_2.parseSchemaDefinition(v4_1.DefinitionName.ObjectPageToolBar, facetKey, appSchema);
|
|
213
|
+
chartToolBar.properties.actions['$ref'] = common_2.getFacetDefinitionLink(v4_1.DefinitionName.ObjectPageToolBarActions, facetKey);
|
|
214
|
+
const chartActions = handleChartActions(facet, facetKey, appSchema, entityType);
|
|
215
|
+
return { chart, chartActions };
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Adds definitions for Chart section in object page sections to the app schema
|
|
219
|
+
* @param {FacetConfig} facet - current facet.
|
|
220
|
+
* @param {string} facetKey - facet key.
|
|
221
|
+
* @param {object} appSchema - app specific schema that potentially gets enhanced.
|
|
222
|
+
* @param {object} sections - schema of current sections definition.
|
|
223
|
+
* @param {EntityType} entityType - current entity type
|
|
224
|
+
*/
|
|
225
|
+
function handleSectionChart(facet, facetKey, appSchema, sections, entityType = facet.entityType) {
|
|
226
|
+
if (sections) {
|
|
227
|
+
sections.properties[facetKey] = {
|
|
228
|
+
$ref: common_2.getFacetDefinitionLink(v4_1.DefinitionName.ObjectPageSectionChart, facetKey)
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
const sectionChart = common_2.parseSchemaDefinition(v4_1.DefinitionName.ObjectPageSectionChart, facetKey, appSchema);
|
|
232
|
+
sectionChart[v4_1.SchemaTag.annotationPath] = common_2.getFacetAnnotationPath(facet);
|
|
233
|
+
sectionChart.properties.chart['$ref'] = common_2.getFacetDefinitionLink(v4_1.DefinitionName.ObjectPageChart, facetKey);
|
|
234
|
+
const { chart, chartActions } = handleChart(facet.target || facet, facetKey, appSchema, entityType);
|
|
235
|
+
return { sectionChart, chart, chartActions };
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Adds definitions for presentation variants in object page sections to the app schema
|
|
239
|
+
* @param {FacetConfig} facet - the given facet from the UI annotations
|
|
240
|
+
* @param {string} facetKey - key of the facet, as used in annotation
|
|
241
|
+
* @param {Definition} appSchema - app schema in general
|
|
242
|
+
* @param {object} sections - schema of current sections definition.
|
|
243
|
+
* @param {GenerateSchemaParameters} generateParameters - list of API input parameters
|
|
244
|
+
* @param {SapUiAppPageV4} v4Page Current page in manifest
|
|
245
|
+
*/
|
|
246
|
+
function handleSectionPresentationVariant(facet, facetKey, appSchema, sections, generateParameters) {
|
|
247
|
+
var _a;
|
|
248
|
+
const facetTarget = facet.target.Visualizations
|
|
249
|
+
? (_a = facet.target.Visualizations[0]) === null || _a === void 0 ? void 0 : _a.$target : undefined;
|
|
250
|
+
if (facetTarget) {
|
|
251
|
+
const [namespace, target] = facet.target[v4_1.SchemaTag.fullyQualifiedName].split('@');
|
|
252
|
+
const visualizationKey = `@${facetTarget.fullyQualifiedName.split('@')[1]}`;
|
|
253
|
+
sections.properties[`${facetKey}<${visualizationKey}>`] = {
|
|
254
|
+
$ref: common_2.getFacetDefinitionLink(v4_1.DefinitionName.ObjectPageSectionPresentationVariant, visualizationKey)
|
|
255
|
+
};
|
|
256
|
+
const sectionDefinition = common_2.parseSchemaDefinition(v4_1.DefinitionName.ObjectPageSectionPresentationVariant, visualizationKey, appSchema);
|
|
257
|
+
delete sectionDefinition.additionalProperties;
|
|
258
|
+
common_2.addTargetTitleAndSectionDescription(facet, sectionDefinition, facetKey);
|
|
259
|
+
sectionDefinition[v4_1.SchemaTag.annotationPath] = facet.annotationPath;
|
|
260
|
+
sectionDefinition[v4_1.SchemaTag.isViewNode] = true;
|
|
261
|
+
const annotationPath = `/${namespace}/@${target}`;
|
|
262
|
+
const visualizationType = visualizationKey.split(v4_1.UIVOCABULARYDOT)[1];
|
|
263
|
+
if (visualizationType.startsWith('Chart')) {
|
|
264
|
+
sectionDefinition.$ref = common_2.getFacetDefinitionLink(v4_1.DefinitionName.ObjectPageSectionChart, visualizationKey);
|
|
265
|
+
const { sectionChart, chart } = handleSectionChart(facetTarget, visualizationKey, appSchema, undefined, facet.entityType);
|
|
266
|
+
sectionChart[v4_1.SchemaTag.annotationPath] = annotationPath;
|
|
267
|
+
chart[v4_1.SchemaTag.annotationPath] = `/${namespace}/${visualizationKey}`;
|
|
268
|
+
}
|
|
269
|
+
else if (visualizationType.startsWith('LineItem')) {
|
|
270
|
+
sectionDefinition.$ref = common_2.getFacetDefinitionLink(v4_1.DefinitionName.ObjectPageSectionTableV4, visualizationKey);
|
|
271
|
+
const { sectionTable, table } = handleSectionTable(facet, visualizationKey, appSchema, { target: facetTarget, entityType: facet.entityType }, generateParameters);
|
|
272
|
+
sectionTable[v4_1.SchemaTag.annotationPath] = annotationPath;
|
|
273
|
+
table[v4_1.SchemaTag.annotationPath] = `/${namespace}/${visualizationKey}`;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
126
276
|
}
|
|
127
277
|
/**
|
|
128
278
|
* Adds definitions for Address and Contact items in object page sections to the app schema
|
|
129
|
-
* @param {
|
|
279
|
+
* @param {FacetConfig} facet - current facet.
|
|
130
280
|
* @param {string} facetKey - facet key.
|
|
131
281
|
* @param {object} sections - schema of current sections definition.
|
|
132
282
|
* @param {object} appSchema - app specific schema that potentially gets enhanced.
|
|
133
283
|
* @param {SectionType} sectionPrefix - prefix to distinguish Section and HeaderSection
|
|
134
|
-
* @param {SectionType} facetDefinitionKey - key to identify new definition
|
|
135
284
|
*/
|
|
136
|
-
function handleAddressContact(facet, facetKey, sections, appSchema, sectionPrefix
|
|
137
|
-
|
|
138
|
-
|
|
285
|
+
function handleAddressContact(facet, facetKey, sections, appSchema, sectionPrefix) {
|
|
286
|
+
const definitionName = `ObjectPage${sectionPrefix}${facet.base}`;
|
|
287
|
+
sections.properties[facetKey] = {
|
|
288
|
+
$ref: common_2.getFacetDefinitionLink(definitionName, facetKey)
|
|
139
289
|
};
|
|
140
|
-
|
|
141
|
-
common_2.addSectionTitleAndDescription(facet,
|
|
142
|
-
|
|
143
|
-
|
|
290
|
+
const definition = common_2.parseSchemaDefinition(definitionName, facetKey, appSchema);
|
|
291
|
+
common_2.addSectionTitleAndDescription(facet, definition, facetKey);
|
|
292
|
+
definition[v4_1.SchemaTag.annotationPath] = facet.annotationPath;
|
|
293
|
+
definition[v4_1.SchemaTag.isViewNode] = true;
|
|
144
294
|
}
|
|
145
295
|
/**
|
|
146
296
|
* Creates a section definition in app schema.
|
|
@@ -149,54 +299,56 @@ function handleAddressContact(facet, facetKey, sections, appSchema, sectionPrefi
|
|
|
149
299
|
* @param {string} facetKey - facet key.
|
|
150
300
|
* @param {object} sections - schema of current sections definition.
|
|
151
301
|
* @param {object} appSchema - app specific schema that potentially gets enhanced.
|
|
152
|
-
* @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
153
302
|
* @param {SectionType} sectionPrefix - prefix to distinguish Section and HeaderSection
|
|
154
303
|
* @param {SapUiAppPageV4} v4Page Current page in manifest
|
|
155
304
|
*/
|
|
156
305
|
function addSection(generateParameters, facets, facetKey, sections, appSchema, sectionPrefix, v4Page) {
|
|
157
306
|
const facet = facets[facetKey];
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
307
|
+
const facetDefinitionKey = `ObjectPage${sectionPrefix}${facet.base}<${common_2.getFacetKeyInSchema(facetKey)}>`;
|
|
308
|
+
switch (facet.base) {
|
|
309
|
+
case common_2.FacetBase.PresentationVariant: {
|
|
310
|
+
handleSectionPresentationVariant(facet, facetKey, appSchema, sections, generateParameters);
|
|
311
|
+
break;
|
|
312
|
+
}
|
|
313
|
+
case common_2.FacetBase.CollectionFacet: {
|
|
314
|
+
handleCollection(facet, facetKey, appSchema, sections, sectionPrefix, generateParameters, v4Page);
|
|
315
|
+
break;
|
|
316
|
+
}
|
|
317
|
+
case common_2.FacetBase.LineItem: {
|
|
318
|
+
if (sectionPrefix === v4_1.SectionType.Section) {
|
|
319
|
+
const lineItemFacet = facets[facetKey];
|
|
320
|
+
handleSectionTable(facet, facetKey, appSchema, lineItemFacet, generateParameters, sections);
|
|
321
|
+
break;
|
|
170
322
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
323
|
+
/* tslint:disable:no-fallthrough */
|
|
324
|
+
// fall through
|
|
325
|
+
}
|
|
326
|
+
case common_2.FacetBase.Form:
|
|
327
|
+
case common_2.FacetBase.Identification: {
|
|
328
|
+
handleFormIdentification(facet, facetKey, sections, appSchema, sectionPrefix);
|
|
329
|
+
break;
|
|
330
|
+
}
|
|
331
|
+
case common_2.FacetBase.DataPoint: {
|
|
332
|
+
handleHeaderFacet(facet, facetKey, sections, appSchema, facetDefinitionKey);
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
case common_2.FacetBase.Chart: {
|
|
336
|
+
if (sectionPrefix === v4_1.SectionType.HeaderSection) {
|
|
337
|
+
handleHeaderFacet(facet, facetKey, sections, appSchema, facetDefinitionKey);
|
|
338
|
+
}
|
|
339
|
+
else if (sectionPrefix === v4_1.SectionType.Section) {
|
|
340
|
+
handleSectionChart(facet, facetKey, appSchema, sections);
|
|
341
|
+
}
|
|
342
|
+
break;
|
|
343
|
+
}
|
|
344
|
+
case common_2.FacetBase.Address:
|
|
345
|
+
case common_2.FacetBase.Contact: {
|
|
346
|
+
handleAddressContact(facet, facetKey, sections, appSchema, sectionPrefix);
|
|
347
|
+
break;
|
|
348
|
+
}
|
|
349
|
+
default: {
|
|
350
|
+
sections['properties'][facetKey] = common_2.createSectionWithoutProperties(facet, facetKey);
|
|
175
351
|
}
|
|
176
|
-
}
|
|
177
|
-
else if (facet.base === 'LineItem' && sectionPrefix === v4_1.SectionType.Section) {
|
|
178
|
-
const tableDefinitionKey = `ObjectPage${sectionPrefix}TableV4<${facetKeyInSchema}>`;
|
|
179
|
-
//handle reference facet (if comprising line item)
|
|
180
|
-
sections['properties'][facetKey] = {
|
|
181
|
-
$ref: `${common_2.DEFINITION_LINK_PREFIX}${tableDefinitionKey}`
|
|
182
|
-
};
|
|
183
|
-
handleLineItem(facet, facetKey, facetKeyInSchema, facets, appSchema, generateParameters.serviceAVT, v4Page, generateParameters.logger);
|
|
184
|
-
}
|
|
185
|
-
else if (facet.base === common_2.FacetBase.Form || facet.base === common_2.FacetBase.Identification) {
|
|
186
|
-
const formDefinitionKey = `ObjectPage${sectionPrefix}Form<${facetKeyInSchema}>`;
|
|
187
|
-
handleFormIdentification(facet, facetKey, sections, appSchema, sectionPrefix, formDefinitionKey);
|
|
188
|
-
}
|
|
189
|
-
else if (facet.base === common_2.FacetBase.DataPoint ||
|
|
190
|
-
(facet.base === common_2.FacetBase.Chart && sectionPrefix === v4_1.SectionType.HeaderSection)) {
|
|
191
|
-
const facetDefinitionKey = `ObjectPage${sectionPrefix}${facet.base}<${facetKeyInSchema}>`;
|
|
192
|
-
handleChartAndDataPoint(facet, facetKey, sections, appSchema, facetDefinitionKey);
|
|
193
|
-
}
|
|
194
|
-
else if (facet.base === common_2.FacetBase.Address || facet.base === common_2.FacetBase.Contact) {
|
|
195
|
-
const facetDefinitionKey = `ObjectPage${sectionPrefix}${facet.base}<${facetKeyInSchema}>`;
|
|
196
|
-
handleAddressContact(facet, facetKey, sections, appSchema, sectionPrefix, facetDefinitionKey);
|
|
197
|
-
}
|
|
198
|
-
else {
|
|
199
|
-
sections['properties'][facetKey] = common_2.createSectionWithoutProperties(facet, facetKey);
|
|
200
352
|
}
|
|
201
353
|
}
|
|
202
354
|
/**
|
|
@@ -210,16 +362,16 @@ function addSections(generateParameters, appSchema, entityType, v4Page) {
|
|
|
210
362
|
// Get facet annotations
|
|
211
363
|
const facets = common_2.getObjectPageFacets(entityType, generateParameters === null || generateParameters === void 0 ? void 0 : generateParameters.serviceAVT, common_1.FioriElementsVersion.v4, generateParameters.logger);
|
|
212
364
|
if (!facets) {
|
|
213
|
-
delete appSchema
|
|
365
|
+
delete appSchema.definitions[v4_1.DefinitionName.ObjectPageSubSections];
|
|
214
366
|
return;
|
|
215
367
|
}
|
|
216
|
-
const sections = appSchema
|
|
368
|
+
const sections = appSchema.definitions[v4_1.DefinitionName.Sections];
|
|
217
369
|
for (const facetKey in facets) {
|
|
218
370
|
addSection(generateParameters, facets, facetKey, sections, appSchema, v4_1.SectionType.Section, v4Page);
|
|
219
371
|
}
|
|
220
372
|
// Custom sections as part of sections
|
|
221
|
-
if (appSchema
|
|
222
|
-
sections.properties = Object.assign(Object.assign({}, sections.properties), appSchema
|
|
373
|
+
if (appSchema.definitions[v4_1.DefinitionName.CustomSections]) {
|
|
374
|
+
sections.properties = Object.assign(Object.assign({}, sections.properties), appSchema.definitions[v4_1.DefinitionName.CustomSections].properties);
|
|
223
375
|
}
|
|
224
376
|
}
|
|
225
377
|
/**
|
|
@@ -232,7 +384,7 @@ function addSections(generateParameters, appSchema, entityType, v4Page) {
|
|
|
232
384
|
function addHeaderSections(generateParameters, appSchema, entityType, v4Page) {
|
|
233
385
|
// Get facet annotations
|
|
234
386
|
const facets = common_2.getObjectPageHeaderFacets(entityType, generateParameters === null || generateParameters === void 0 ? void 0 : generateParameters.serviceAVT, common_1.FioriElementsVersion.v4, generateParameters.logger);
|
|
235
|
-
const sections = appSchema
|
|
387
|
+
const sections = appSchema.definitions[v4_1.DefinitionName.HeaderSections];
|
|
236
388
|
sections.properties = {};
|
|
237
389
|
sections.additionalProperties = false;
|
|
238
390
|
if (!facets) {
|
|
@@ -242,11 +394,11 @@ function addHeaderSections(generateParameters, appSchema, entityType, v4Page) {
|
|
|
242
394
|
addSection(generateParameters, facets, facetKey, sections, appSchema, v4_1.SectionType.HeaderSection, v4Page);
|
|
243
395
|
}
|
|
244
396
|
//delete generic definitions
|
|
245
|
-
delete appSchema
|
|
246
|
-
delete appSchema
|
|
247
|
-
delete appSchema
|
|
248
|
-
delete appSchema
|
|
249
|
-
delete appSchema
|
|
397
|
+
delete appSchema.definitions[v4_1.DefinitionName.ObjectPageHeaderSectionForm];
|
|
398
|
+
delete appSchema.definitions[v4_1.DefinitionName.ObjectPageHeaderSectionChart];
|
|
399
|
+
delete appSchema.definitions[v4_1.DefinitionName.ObjectPageHeaderSectionDataPoint];
|
|
400
|
+
delete appSchema.definitions[v4_1.DefinitionName.ObjectPageHeaderSectionContact];
|
|
401
|
+
delete appSchema.definitions[v4_1.DefinitionName.ObjectPageHeaderSectionAddress];
|
|
250
402
|
}
|
|
251
403
|
/**
|
|
252
404
|
* Adds the related facets keys 'enum' to the app schema
|
|
@@ -282,7 +434,7 @@ function addRelatedFacetKeysType(generateParameters, schema, entityType, entityS
|
|
|
282
434
|
});
|
|
283
435
|
}
|
|
284
436
|
// Update schema definition
|
|
285
|
-
common_2.addDefinitionForRelatedFacetKeys(schema, [
|
|
437
|
+
common_2.addDefinitionForRelatedFacetKeys(schema, [v4_1.DefinitionName.ObjectPageCustomSectionFragment], facetSections, [
|
|
286
438
|
'ID',
|
|
287
439
|
'label',
|
|
288
440
|
'key'
|
|
@@ -302,7 +454,7 @@ function addHeader(generateParameters, appSchema, entityType, v4Page) {
|
|
|
302
454
|
// Add header actions
|
|
303
455
|
common_2.addHeaderActions(appSchema, entityType, generateParameters === null || generateParameters === void 0 ? void 0 : generateParameters.serviceAVT, addHeaderActionCallBackV4);
|
|
304
456
|
// Add header sections
|
|
305
|
-
appSchema
|
|
457
|
+
appSchema.definitions[v4_1.DefinitionName.HeaderSections][v4_1.SchemaTag.annotationPath] = `/${entityType.fullyQualifiedName}/@${"com.sap.vocabularies.UI.v1.HeaderFacets" /* HeaderFacets */}`;
|
|
306
458
|
addHeaderSections(generateParameters, appSchema, entityType, v4Page);
|
|
307
459
|
}
|
|
308
460
|
/**
|
|
@@ -318,8 +470,8 @@ function generateObjectPageSchemaV4(generateParameters, genericSchema, entityTyp
|
|
|
318
470
|
var _a, _b;
|
|
319
471
|
const appSchema = JSON.parse(JSON.stringify(genericSchema));
|
|
320
472
|
// Change reference to generated sections
|
|
321
|
-
appSchema
|
|
322
|
-
$ref: common_2.DEFINITION_LINK_PREFIX
|
|
473
|
+
appSchema.properties.sections = {
|
|
474
|
+
$ref: `${common_2.DEFINITION_LINK_PREFIX}${v4_1.DefinitionName.Sections}`
|
|
323
475
|
};
|
|
324
476
|
const entitySet = (_b = (_a = generateParameters === null || generateParameters === void 0 ? void 0 : generateParameters.serviceAVT) === null || _a === void 0 ? void 0 : _a.entitySets) === null || _b === void 0 ? void 0 : _b.find((es) => es.entityType.name === entityTypeName);
|
|
325
477
|
if (!entitySet) {
|
|
@@ -344,13 +496,13 @@ function generateObjectPageSchemaV4(generateParameters, genericSchema, entityTyp
|
|
|
344
496
|
return appSchema;
|
|
345
497
|
}
|
|
346
498
|
//initialize sections
|
|
347
|
-
appSchema
|
|
499
|
+
const sections = (appSchema.definitions[v4_1.DefinitionName.Sections] = {
|
|
348
500
|
type: 'object',
|
|
349
501
|
properties: {},
|
|
350
502
|
additionalProperties: false,
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
503
|
+
description: v4_1.DefinitionName.Sections
|
|
504
|
+
});
|
|
505
|
+
sections[v4_1.SchemaTag.isViewNode] = true;
|
|
354
506
|
if (entitySet) {
|
|
355
507
|
const pages = generateParameters.manifest[common_1.ManifestSection.ui5].routing.targets;
|
|
356
508
|
if (!pages) {
|
|
@@ -371,7 +523,8 @@ function generateObjectPageSchemaV4(generateParameters, genericSchema, entityTyp
|
|
|
371
523
|
// Add Header
|
|
372
524
|
addHeader(generateParameters, appSchema, entityType, v4Page);
|
|
373
525
|
// Add sections
|
|
374
|
-
|
|
526
|
+
sections[v4_1.SchemaTag.isViewNode] = true;
|
|
527
|
+
sections[v4_1.SchemaTag.annotationPath] = `/${entitySet.entityType.fullyQualifiedName}/@${"com.sap.vocabularies.UI.v1.Facets" /* Facets */}`;
|
|
375
528
|
addSections(generateParameters, appSchema, entityType, v4Page);
|
|
376
529
|
// Custom Section facets
|
|
377
530
|
addRelatedFacetKeysType(generateParameters, appSchema, entityType, entitySet.name, pages);
|
|
@@ -379,20 +532,23 @@ function generateObjectPageSchemaV4(generateParameters, genericSchema, entityTyp
|
|
|
379
532
|
common_2.addFooterActions(appSchema, entityType, generateParameters === null || generateParameters === void 0 ? void 0 : generateParameters.serviceAVT);
|
|
380
533
|
}
|
|
381
534
|
// Delete generic definitions from schema
|
|
382
|
-
delete appSchema
|
|
383
|
-
delete appSchema
|
|
384
|
-
delete appSchema
|
|
385
|
-
delete appSchema
|
|
386
|
-
delete appSchema
|
|
387
|
-
delete appSchema
|
|
388
|
-
delete appSchema
|
|
389
|
-
delete appSchema
|
|
390
|
-
delete appSchema
|
|
391
|
-
delete appSchema
|
|
392
|
-
delete appSchema
|
|
393
|
-
delete appSchema
|
|
394
|
-
delete appSchema
|
|
395
|
-
delete appSchema
|
|
535
|
+
delete appSchema.definitions[v4_1.DefinitionName.CommonHeaderFacetSettings];
|
|
536
|
+
delete appSchema.definitions[v4_1.DefinitionName.GenericColumnsOP];
|
|
537
|
+
delete appSchema.definitions[v4_1.DefinitionName.GenericSections];
|
|
538
|
+
delete appSchema.definitions[v4_1.DefinitionName.ObjectPageChart];
|
|
539
|
+
delete appSchema.definitions[v4_1.DefinitionName.ObjectPageSectionAddress];
|
|
540
|
+
delete appSchema.definitions[v4_1.DefinitionName.ObjectPageSectionChart];
|
|
541
|
+
delete appSchema.definitions[v4_1.DefinitionName.ObjectPageSectionContact];
|
|
542
|
+
delete appSchema.definitions[v4_1.DefinitionName.ObjectPageSectionDataPoint];
|
|
543
|
+
delete appSchema.definitions[v4_1.DefinitionName.ObjectPageSectionForm];
|
|
544
|
+
delete appSchema.definitions[v4_1.DefinitionName.ObjectPageSectionTableV4];
|
|
545
|
+
delete appSchema.definitions[v4_1.DefinitionName.ObjectPageSectionPresentationVariant];
|
|
546
|
+
delete appSchema.definitions[v4_1.DefinitionName.ObjectPageSubSections];
|
|
547
|
+
delete appSchema.definitions[v4_1.DefinitionName.ObjectPageTable];
|
|
548
|
+
delete appSchema.definitions[v4_1.DefinitionName.ObjectPageToolBar];
|
|
549
|
+
delete appSchema.definitions[v4_1.DefinitionName.ObjectPageToolBarAction];
|
|
550
|
+
delete appSchema.definitions[v4_1.DefinitionName.ObjectPageToolBarActions];
|
|
551
|
+
delete appSchema.definitions[v4_1.DefinitionName.QuickVariantSelectionV4OP];
|
|
396
552
|
return appSchema;
|
|
397
553
|
}
|
|
398
554
|
exports.generateObjectPageSchemaV4 = generateObjectPageSchemaV4;
|