@sap/ux-specification 1.90.21 → 1.90.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/CHANGELOG.md +44 -1
- 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/ApplicationV2.json +11 -11
- package/dist/schemas/v4/ApplicationV4.json +9 -5
- package/dist/schemas/v4/ListReportConfig.json +590 -174
- 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 +14 -18
- 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/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 +2 -2
- package/dist/src/specification/v2/controls/ObjectPageToolBar.d.ts +1 -1
- package/dist/src/specification/v2/controls/Table.d.ts +3 -3
- 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 +2 -2
- package/dist/src/specification/v4/controls/ObjectPageTable.d.ts +3 -3
- package/dist/src/specification/v4/controls/ObjectPageToolBar.d.ts +1 -1
- package/dist/src/specification/v4/controls/Table.d.ts +162 -25
- 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 +17 -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 +20 -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.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 +4 -3
- package/dist/src/sync/common/generate/objectPage.js +2 -7
- package/dist/src/sync/common/generate/objectPage.js.map +1 -1
- package/dist/src/sync/common/generate/utils.d.ts +11 -9
- package/dist/src/sync/common/generate/utils.js +18 -32
- 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 +13 -22
- package/dist/src/sync/common/importProject.js.map +1 -1
- package/dist/src/sync/common/types.d.ts +28 -6
- package/dist/src/sync/common/types.js +24 -0
- package/dist/src/sync/common/types.js.map +1 -1
- package/dist/src/sync/common/utils.d.ts +11 -8
- package/dist/src/sync/common/utils.js +51 -20
- 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.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 +108 -32
- 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 +3 -3
- 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/Table.d.ts +3 -2
- package/dist/src/sync/v2/export/controls/Table.js +26 -25
- 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/ToolBar.d.ts +1 -1
- package/dist/src/sync/v2/export/export.d.ts +3 -3
- 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 +1 -9
- 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 +1 -1
- package/dist/src/sync/v2/export/manifest.js +2 -1
- 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 +2 -2
- package/dist/src/sync/v2/export/pages/OverviewPage.js +6 -3
- 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 +26 -35
- 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 +37 -35
- 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 +77 -76
- 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 +5 -5
- package/dist/src/sync/v2/generate/utils.js.map +1 -1
- package/dist/src/sync/v2/import/app/appProvider.d.ts +4 -4
- 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.map +1 -1
- package/dist/src/sync/v2/import/common/index.d.ts +6 -5
- package/dist/src/sync/v2/import/common/index.js +3 -16
- 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 +1 -4
- 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.map +1 -1
- package/dist/src/sync/v2/import/utils.d.ts +3 -2
- package/dist/src/sync/v2/import/utils.js +15 -1
- 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 +8 -4
- package/dist/src/sync/v4/application.js +22 -1
- 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 +125 -9
- package/dist/src/sync/v4/export/controls/Table.js +431 -48
- 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 +246 -0
- 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 +293 -59
- 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 +8 -3
- package/dist/src/sync/v4/export/pages/ListReport.js +42 -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/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 +7 -5
- 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 +331 -31
- 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 +1 -1
- 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 +55 -43
- 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 +103 -20
- package/dist/src/sync/v4/import/pages/listReport.js.map +1 -1
- package/dist/src/sync/v4/import/pages/objectPage.d.ts +2 -2
- package/dist/src/sync/v4/import/pages/objectPage.js +19 -19
- package/dist/src/sync/v4/import/pages/objectPage.js.map +1 -1
- package/dist/src/sync/v4/import/utils.d.ts +2 -2
- 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 +2 -2
- package/dist/src/sync/v4/utils/StableIdHelper.js.map +1 -1
- package/dist/src/sync/v4/utils/utils.d.ts +13 -7
- package/dist/src/sync/v4/utils/utils.js +45 -8
- 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/package.json +12 -9
- package/dist/documentation/v4/v4-AnalyticalListPage.html +0 -49
- package/dist/schemas/v4/AnalyticalListPageConfig.json +0 -392
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../../../src/sync/v4/export/manifest.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../../../src/sync/v4/export/manifest.ts"],"names":[],"mappings":";;AAU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12 @@
|
|
|
1
|
-
import { ListReportConfig as ListReportConfigV4, VariantManagementTypeListReport } from '../../../../specification/v4';
|
|
2
|
-
import { Table, FilterBar } from '../controls';
|
|
1
|
+
import type { ALPTableView, ALPChartView, DefaultPathType, ListReportConfig as ListReportConfigV4, VariantManagementTypeListReport } from '../../../../specification/v4';
|
|
2
|
+
import type { Table, FilterBar } from '../controls';
|
|
3
|
+
/**
|
|
4
|
+
* Sync class for import and export of V4 list report
|
|
5
|
+
*/
|
|
3
6
|
export declare class ListReport implements ListReportConfigV4 {
|
|
4
|
-
|
|
7
|
+
chart?: ALPChartView;
|
|
8
|
+
table?: ALPTableView | Table;
|
|
5
9
|
variantManagement?: VariantManagementTypeListReport;
|
|
10
|
+
defaultPath?: DefaultPathType;
|
|
6
11
|
filterbar?: FilterBar;
|
|
7
12
|
}
|
|
@@ -8,8 +8,43 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
const decorators_1 = require("../../../common/decoration/decorators");
|
|
10
10
|
const application_1 = require("../../application");
|
|
11
|
+
/**
|
|
12
|
+
* sync rule deleting all views if the chart view gets deleted
|
|
13
|
+
* @param manifestSection - manifest section of the given view
|
|
14
|
+
*/
|
|
15
|
+
function deleteAllALPViews(manifestSection) {
|
|
16
|
+
var _a, _b, _c, _d;
|
|
17
|
+
if (((_b = (_a = manifestSection['paths']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.primary) || ((_d = (_c = manifestSection['paths']) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.secondary)) {
|
|
18
|
+
Object.keys(manifestSection).forEach((key) => delete manifestSection[key]);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* sync rule for preventing the export of a property
|
|
23
|
+
*/
|
|
24
|
+
function doNotExport() {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* sync rule for preventing the import of a property
|
|
29
|
+
*/
|
|
30
|
+
function doNotImport() {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Sync class for import and export of V4 list report
|
|
35
|
+
*/
|
|
11
36
|
let ListReport = class ListReport {
|
|
12
37
|
};
|
|
38
|
+
__decorate([
|
|
39
|
+
decorators_1.syncRule({
|
|
40
|
+
manifest: {
|
|
41
|
+
path: (entitySet) => application_1.getSettingsPathForPage(entitySet) + '/views',
|
|
42
|
+
import: doNotImport,
|
|
43
|
+
export: doNotExport,
|
|
44
|
+
delete: deleteAllALPViews
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
], ListReport.prototype, "chart", void 0);
|
|
13
48
|
__decorate([
|
|
14
49
|
decorators_1.syncRule({
|
|
15
50
|
manifest: {
|
|
@@ -20,6 +55,13 @@ __decorate([
|
|
|
20
55
|
since: '1.84.0'
|
|
21
56
|
})
|
|
22
57
|
], ListReport.prototype, "variantManagement", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
decorators_1.syncRule({
|
|
60
|
+
manifest: {
|
|
61
|
+
path: (entitySet) => application_1.getSettingsPathForPage(entitySet) + '/views/paths/[]/0'
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
], ListReport.prototype, "defaultPath", void 0);
|
|
23
65
|
__decorate([
|
|
24
66
|
decorators_1.childId('fe::FilterBar')
|
|
25
67
|
], ListReport.prototype, "filterbar", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListReport.js","sourceRoot":"","sources":["../../../../../../src/sync/v4/export/pages/ListReport.ts"],"names":[],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"ListReport.js","sourceRoot":"","sources":["../../../../../../src/sync/v4/export/pages/ListReport.ts"],"names":[],"mappings":";;;;;;;;AAQA,sEAA2G;AAC3G,mDAA2D;AAE3D;;;GAGG;AACH,SAAS,iBAAiB,CAAC,eA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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ObjectPageHeader, ObjectPageLayout } from '../controls';
|
|
2
|
-
import { ObjectPageConfig as ObjectPageConfigV4, GenericSections, VariantManagementTypeObjectPage, CustomSections } from '../../../../specification/v4';
|
|
1
|
+
import type { ObjectPageHeader, ObjectPageLayout } from '../controls';
|
|
2
|
+
import type { ObjectPageConfig as ObjectPageConfigV4, GenericSections, VariantManagementTypeObjectPage, CustomSections } from '../../../../specification/v4';
|
|
3
3
|
export declare class ObjectPage implements ObjectPageConfigV4 {
|
|
4
4
|
header?: ObjectPageHeader;
|
|
5
5
|
layout?: ObjectPageLayout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/sync/v4/export/pages/index.ts"],"names":[],"mappings":";;;;;AAAA,kCAA6B;AAC7B,kCAA6B
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/sync/v4/export/pages/index.ts"],"names":[],"mappings":";;;;;AAAA,kCAA6B;AAC7B,kCAA6B"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ExtensionLogger } from '../../..';
|
|
2
|
-
import { PageType } from '../../../specification/common';
|
|
3
|
-
import { UI5Version } from '../../../v2';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import type { ExtensionLogger } from '../../..';
|
|
2
|
+
import type { PageType } from '../../../specification/common';
|
|
3
|
+
import type { UI5Version } from '../../../v2';
|
|
4
|
+
import type { TemplateType } from '../../common';
|
|
5
|
+
import type { MetadataFactory } from '../../common/decoration/factory';
|
|
6
|
+
import type { ExportResults, FlexAdapter } from '../../common/types';
|
|
6
7
|
export declare type ManifestPathSection = (path: string, targetAnnotationPath: string) => string;
|
|
7
8
|
export interface ManifestConverter4Section {
|
|
8
9
|
path: ManifestPathSection;
|
|
@@ -23,4 +24,5 @@ export declare type TransferParameterTypeV4 = {
|
|
|
23
24
|
title: string;
|
|
24
25
|
appRootPath?: string;
|
|
25
26
|
logger?: ExtensionLogger;
|
|
27
|
+
templateType: TemplateType;
|
|
26
28
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { FileData } from '../../common/types';
|
|
2
|
-
import {
|
|
1
|
+
import type { FileData } from '../../common/types';
|
|
2
|
+
import { TemplateType } from '../../common/utils';
|
|
3
|
+
import type { ExtensionLogger } from '../../../apiTypes';
|
|
3
4
|
/**
|
|
4
5
|
* Generates the app specific schema of an object page out of the generic schema for the same page.
|
|
5
6
|
* Generic types are replaced by information from the app specific annotations.
|
|
@@ -17,7 +18,7 @@ export declare function generateObjectPageInterfaceV4(genericSchema: object, ent
|
|
|
17
18
|
/**
|
|
18
19
|
* Generates the app specific schema of a list report out of the generic schema.
|
|
19
20
|
* Generic types are replaced by information from the app specific annotations.
|
|
20
|
-
*
|
|
21
|
+
* @param {TemplateType} templateType - the template type allows distinguishing LR and ALP
|
|
21
22
|
* @param genericSchema - generic JSON schema of a list report
|
|
22
23
|
* @param entitySetName - the base entity set of the given page
|
|
23
24
|
* @param annotations - list of all annotation files (file content plus URI as identifier)
|
|
@@ -26,4 +27,4 @@ export declare function generateObjectPageInterfaceV4(genericSchema: object, ent
|
|
|
26
27
|
*
|
|
27
28
|
* @returns the app specific JSON schema
|
|
28
29
|
*/
|
|
29
|
-
export declare function generateListReportInterfaceV4(genericSchema: object, entitySetName: string, annotations: FileData[], logger?: ExtensionLogger, manifest?: object): object;
|
|
30
|
+
export declare function generateListReportInterfaceV4(templateType: TemplateType, genericSchema: object, entitySetName: string, annotations: FileData[], logger?: ExtensionLogger, manifest?: object): object;
|
|
@@ -20,6 +20,7 @@ const v4_1 = require("../../../v4");
|
|
|
20
20
|
function generateObjectPageInterfaceV4(genericSchema, entitySet, annotations, manifest, logger, fragments) {
|
|
21
21
|
const serviceAVT = utils_1.parseAndMergeAndConvert(annotations, logger);
|
|
22
22
|
const generateParameters = {
|
|
23
|
+
templateType: utils_1.TemplateType.ListReportObjectPageV4,
|
|
23
24
|
fioriElementsVersion: __1.FioriElementsVersion.v4,
|
|
24
25
|
manifest,
|
|
25
26
|
fragments,
|
|
@@ -32,7 +33,7 @@ exports.generateObjectPageInterfaceV4 = generateObjectPageInterfaceV4;
|
|
|
32
33
|
/**
|
|
33
34
|
* Generates the app specific schema of a list report out of the generic schema.
|
|
34
35
|
* Generic types are replaced by information from the app specific annotations.
|
|
35
|
-
*
|
|
36
|
+
* @param {TemplateType} templateType - the template type allows distinguishing LR and ALP
|
|
36
37
|
* @param genericSchema - generic JSON schema of a list report
|
|
37
38
|
* @param entitySetName - the base entity set of the given page
|
|
38
39
|
* @param annotations - list of all annotation files (file content plus URI as identifier)
|
|
@@ -41,16 +42,18 @@ exports.generateObjectPageInterfaceV4 = generateObjectPageInterfaceV4;
|
|
|
41
42
|
*
|
|
42
43
|
* @returns the app specific JSON schema
|
|
43
44
|
*/
|
|
44
|
-
function generateListReportInterfaceV4(genericSchema, entitySetName, annotations, logger, manifest) {
|
|
45
|
+
function generateListReportInterfaceV4(templateType, genericSchema, entitySetName, annotations, logger, manifest) {
|
|
45
46
|
const serviceAVT = utils_1.parseAndMergeAndConvert(annotations, logger);
|
|
46
47
|
const entitySet = serviceAVT.entitySets.find((es) => es.name === entitySetName);
|
|
47
48
|
const generateParameters = {
|
|
49
|
+
templateType,
|
|
48
50
|
fioriElementsVersion: __1.FioriElementsVersion.v4,
|
|
49
51
|
manifest,
|
|
50
52
|
serviceAVT,
|
|
51
53
|
logger
|
|
52
54
|
};
|
|
53
|
-
|
|
55
|
+
const templateName = templateType === utils_1.TemplateType.ListReportObjectPageV4 ? v4_1.FE_TEMPLATE_V4_LIST_REPORT : v4_1.FE_TEMPLATE_V4_ALP;
|
|
56
|
+
return _1.generateListReportSchemaV4(generateParameters, genericSchema, entitySet, templateName);
|
|
54
57
|
}
|
|
55
58
|
exports.generateListReportInterfaceV4 = generateListReportInterfaceV4;
|
|
56
59
|
//# sourceMappingURL=generate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../../src/sync/v4/generate/generate.ts"],"names":[],"mappings":";;AACA,
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../../src/sync/v4/generate/generate.ts"],"names":[],"mappings":";;AACA,8CAA2E;AAC3E,wBAA2E;AAE3E,gCAAgD;AAChD,oCAA6E;AAE7E;;;;;;;;;;;;GAYG;AACH,SAAgB,6BAA6B,CACzC,aAAqB,EACrB,SAAiB,EACjB,WAAuB,EACvB,QAAgB,EAChB,MAAwB,EACxB,SAAsB;IAEtB,MAAM,UAAU,GAAG,+BAAuB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAChE,MAAM,kBAAkB,GAAgC;QACpD,YAAY,EAAE,oBAAY,CAAC,sBAAsB;QACjD,oBAAoB,EAAE,wBAAoB,CAAC,EAAE;QAC7C,QAAQ;QACR,SAAS;QACT,UAAU;QACV,MAAM;KACT,CAAC;IACF,OAAO,6BAA0B,CAAC,kBAAkB,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC;AACpF,CAAC;AAlBD,sEAkBC;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,6BAA6B,CACzC,YAA0B,EAC1B,aAAqB,EACrB,aAAqB,EACrB,WAAuB,EACvB,MAAwB,EACxB,QAAiB;IAEjB,MAAM,UAAU,GAAG,+BAAuB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAChE,MAAM,SAAS,GAAG,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC;IAChF,MAAM,kBAAkB,GAAgC;QACpD,YAAY;QACZ,oBAAoB,EAAE,wBAAoB,CAAC,EAAE;QAC7C,QAAQ;QACR,UAAU;QACV,MAAM;KACT,CAAC;IAEF,MAAM,YAAY,GACd,YAAY,KAAK,oBAAY,CAAC,sBAAsB,CAAC,CAAC,CAAC,+BAA0B,CAAC,CAAC,CAAC,uBAAkB,CAAC;IAC3G,OAAO,6BAA0B,CAAC,kBAAkB,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;AAClG,CAAC;AArBD,sEAqBC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { GenerateAppSchemaParameters } from '../../../apiTypes';
|
|
2
|
-
import { EntitySet } from '@sap-ux/annotation-converter';
|
|
3
|
-
import { ConverterOutput, EntityType } from '@sap-ux/vocabularies-types';
|
|
4
|
-
export declare function addEnumForVariantPaths(entityType: EntityType, appSchema: object, oDataServiceAVT: ConverterOutput): void;
|
|
1
|
+
import type { GenerateAppSchemaParameters } from '../../../apiTypes';
|
|
2
|
+
import type { EntitySet } from '@sap-ux/annotation-converter';
|
|
5
3
|
/**
|
|
6
4
|
* Generates an app specific schema for the FE V4 Listreport from the generic schema.
|
|
7
5
|
* Generic types are replaced by information from the app specific annotations.
|
|
@@ -39,12 +39,321 @@ function addSelectionFields(entityType, appSchema, selectionFieldsAnnotation) {
|
|
|
39
39
|
i++;
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
function convertVisualization(visualization, alias) {
|
|
43
|
+
if (!visualization) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (visualization.startsWith(`@${common_1.UIVOCABULARY}`)) {
|
|
47
|
+
visualization = visualization.replace(common_1.UIVOCABULARY, '@UI');
|
|
48
|
+
}
|
|
49
|
+
else if (!visualization.startsWith(`@${alias}`)) {
|
|
50
|
+
visualization = visualization.replace(visualization.split('.')[0], '@UI');
|
|
51
|
+
}
|
|
52
|
+
return visualization;
|
|
53
|
+
}
|
|
54
|
+
function defineActions(appSchema, schemaIdForActions, annotations, targetAnnotation, entityType) {
|
|
55
|
+
const actions = (appSchema.definitions[schemaIdForActions] = JSON.parse(JSON.stringify(appSchema.definitions['Actions'])));
|
|
56
|
+
actions.properties = {};
|
|
57
|
+
actions.additionalProperties = false;
|
|
58
|
+
const chartAnnotation = annotations[targetAnnotation === null || targetAnnotation === void 0 ? void 0 : targetAnnotation.split(`${common_1.UIVOCABULARY}.`)[1]];
|
|
59
|
+
if (chartAnnotation && chartAnnotation.Actions) {
|
|
60
|
+
let i = 0;
|
|
61
|
+
chartAnnotation.Actions.forEach((actionRecord) => {
|
|
62
|
+
const actionDefinition = common_1.prepareRef(`${v4_1.DefinitionName.ChartToolBarAction}<${actionRecord.Action}>`);
|
|
63
|
+
const description = common_1.getDatafieldDescription(actionRecord, entityType);
|
|
64
|
+
const prefix = actionRecord.$Type.split(`${common_1.UIVOCABULARY}.`)[1];
|
|
65
|
+
actions['properties'][`${prefix}::${actionRecord.Action}`] = {
|
|
66
|
+
$ref: common_1.DEFINITION_LINK_PREFIX + actionDefinition,
|
|
67
|
+
description,
|
|
68
|
+
propertyIndex: i,
|
|
69
|
+
annotationType: actionRecord.$Type,
|
|
70
|
+
annotationPath: `/${actionRecord.fullyQualifiedName}`
|
|
71
|
+
};
|
|
72
|
+
//as ChartToolBarAction is an empty objec, copy ViewToolBarAction and remove properties
|
|
73
|
+
appSchema['definitions'][actionDefinition] = JSON.parse(JSON.stringify(appSchema['definitions'][v4_1.DefinitionName.ViewToolBarAction]));
|
|
74
|
+
appSchema['definitions'][actionDefinition]['properties'] = {};
|
|
75
|
+
appSchema['definitions'][actionDefinition]['annotationPath'] = actionRecord.fullyQualifiedName;
|
|
76
|
+
i++;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Finds the right visualization for the given view
|
|
82
|
+
* @param viewKey - view key (primary, secondary, or anything else)
|
|
83
|
+
* @param allVisualizations - list of visualizations for the given (S)PV
|
|
84
|
+
* @param alias - alias definition for the relevant namespace
|
|
85
|
+
* @param namespace - namespace for the UI annotations
|
|
86
|
+
* @returns the value of the first fitting visualization
|
|
87
|
+
*/
|
|
88
|
+
function findTheRightVisualization(viewKey, allVisualizations, alias, namespace) {
|
|
89
|
+
var _a;
|
|
90
|
+
let visualization, visualizationObject, targetAnnotation;
|
|
91
|
+
if (allVisualizations) {
|
|
92
|
+
if (viewKey === 'primary') {
|
|
93
|
+
visualizationObject = allVisualizations.find((vis) => {
|
|
94
|
+
return vis['value'].indexOf('Chart') > -1;
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
else if (viewKey === 'secondary') {
|
|
98
|
+
visualizationObject = allVisualizations.find((vis) => {
|
|
99
|
+
return vis['value'].indexOf('LineItem') > -1;
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
visualizationObject = allVisualizations[0];
|
|
104
|
+
}
|
|
105
|
+
visualization = convertVisualization(visualizationObject === null || visualizationObject === void 0 ? void 0 : visualizationObject['value'], alias);
|
|
106
|
+
if ((_a = visualizationObject === null || visualizationObject === void 0 ? void 0 : visualizationObject['$target']) === null || _a === void 0 ? void 0 : _a.fullyQualifiedName) {
|
|
107
|
+
targetAnnotation = `/${namespace}/${visualizationObject['$target'].fullyQualifiedName.split(namespace)[1]}`;
|
|
108
|
+
}
|
|
109
|
+
else if (visualization) {
|
|
110
|
+
targetAnnotation = `/${namespace}/` + visualization.replace(`UI`, common_1.UIVOCABULARY);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return { visualization, targetAnnotation };
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* The view annotationPath must be analyzed, to find the right target annotation and visualization
|
|
117
|
+
* @param view - given view entry in manifest
|
|
118
|
+
* @param uIAnnotations - annotations of UI namespace of the given entityType
|
|
119
|
+
* @param viewKey - allows to distinguish the different view or visualization types
|
|
120
|
+
* @returns { visualization: string describing the visualization of the annotation,
|
|
121
|
+
* targetAnnotation: the target annotation behind the visualization }
|
|
122
|
+
*/
|
|
123
|
+
function analyzeViewAnnotation(view, uIAnnotations, generateParameters, viewKey) {
|
|
124
|
+
var _a;
|
|
125
|
+
let namespace = undefined;
|
|
126
|
+
const annotationInManifest = (_a = view === null || view === void 0 ? void 0 : view['annotationPath']) === null || _a === void 0 ? void 0 : _a.split(`${common_1.UIVOCABULARY}.`)[1];
|
|
127
|
+
const annotationAVT = uIAnnotations[annotationInManifest];
|
|
128
|
+
if (!annotationAVT) {
|
|
129
|
+
return { visualization: undefined, targetAnnotation: undefined, namespace };
|
|
130
|
+
}
|
|
131
|
+
namespace = annotationAVT.fullyQualifiedName.split('@com.sap.vocabularies.UI.v1.')[0];
|
|
132
|
+
const alias = common_1.findAlias(common_1.UIVOCABULARY, generateParameters.serviceAVT);
|
|
133
|
+
if (annotationInManifest.startsWith('PresentationVariant')) {
|
|
134
|
+
const { visualization, targetAnnotation } = findTheRightVisualization(viewKey, annotationAVT.Visualizations, alias, namespace);
|
|
135
|
+
return { visualization, targetAnnotation, namespace };
|
|
136
|
+
}
|
|
137
|
+
else if (annotationInManifest.startsWith('SelectionPresentationVariant')) {
|
|
138
|
+
const { visualization, targetAnnotation } = findTheRightVisualization(viewKey, annotationAVT.PresentationVariant.Visualizations, alias, namespace);
|
|
139
|
+
return { visualization, targetAnnotation, namespace };
|
|
140
|
+
}
|
|
141
|
+
else if (annotationInManifest.startsWith('LineItem')) {
|
|
142
|
+
const visualization = '@UI.LineItem';
|
|
143
|
+
const targetAnnotation = `/${namespace}/@${view['annotationPath']}`;
|
|
144
|
+
return { visualization, targetAnnotation, namespace };
|
|
145
|
+
}
|
|
146
|
+
else if (annotationInManifest.startsWith('Chart')) {
|
|
147
|
+
const visualization = '@UI.Chart';
|
|
148
|
+
const targetAnnotation = `/${namespace}/@${view['annotationPath']}`;
|
|
149
|
+
return { visualization, targetAnnotation, namespace };
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Add ALP views to the app-specific schema
|
|
154
|
+
* @param {Definition} appSchema - app-specific JSON schema
|
|
155
|
+
* @param {Array<Object>} viewsPaths - views' paths' section in the manifest
|
|
156
|
+
* @param {EntityType} entityType - actual entity type of the page's entitySet
|
|
157
|
+
* @param {GenerateAppSchemaParameters} generateParameters - list of API input parameters
|
|
158
|
+
*/
|
|
159
|
+
function addALPViews(appSchema, viewsPaths, entityType, generateParameters) {
|
|
160
|
+
var _a, _b, _c, _d;
|
|
161
|
+
const annotations = entityType.annotations.UI;
|
|
162
|
+
//1. Chart View
|
|
163
|
+
const { visualization, targetAnnotation } = analyzeViewAnnotation((_b = (_a = viewsPaths === null || viewsPaths === void 0 ? void 0 : viewsPaths[0]) === null || _a === void 0 ? void 0 : _a['primary']) === null || _b === void 0 ? void 0 : _b[0], annotations, generateParameters, 'primary');
|
|
164
|
+
if (visualization && visualization.indexOf('Chart') > -1) {
|
|
165
|
+
const chartView = appSchema.definitions[v4_1.DefinitionName.ALPChartView];
|
|
166
|
+
appSchema.definitions[v4_1.DefinitionName.ALPChart] = JSON.parse(JSON.stringify(chartView));
|
|
167
|
+
delete appSchema.definitions[v4_1.DefinitionName.ALPChart]['isViewNode'];
|
|
168
|
+
appSchema.definitions[v4_1.DefinitionName.ALPChart]['annotationPath'] = targetAnnotation;
|
|
169
|
+
appSchema.definitions[v4_1.DefinitionName.ALPChart].properties.annotationPath['hidden'] = true;
|
|
170
|
+
delete chartView.properties;
|
|
171
|
+
chartView.additionalProperties = false;
|
|
172
|
+
chartView.description = `Chart (key: primary)`;
|
|
173
|
+
chartView.title = `Chart`;
|
|
174
|
+
chartView.$ref = `${common_1.DEFINITION_LINK_PREFIX}${v4_1.DefinitionName.ALPChart}`;
|
|
175
|
+
const viewAnnotation = viewsPaths[0]['primary'][0].annotationPath.split('com.sap.vocabularies.UI.v1.')[1];
|
|
176
|
+
const pathParts = annotations[viewAnnotation].fullyQualifiedName.split('@');
|
|
177
|
+
chartView['annotationPath'] = `/${pathParts[0]}/@${pathParts[1]}`;
|
|
178
|
+
chartView['artifactType'] = common_1.ArtifactType.Manifest;
|
|
179
|
+
chartView['key'] = 'primary';
|
|
180
|
+
}
|
|
181
|
+
// Copy toolbar
|
|
182
|
+
const schemaIdForActions = `Actions<ALPChart>`;
|
|
183
|
+
appSchema.definitions[v4_1.DefinitionName.ViewChartToolBar].properties.actions['$ref'] =
|
|
184
|
+
common_1.DEFINITION_LINK_PREFIX + schemaIdForActions;
|
|
185
|
+
defineActions(appSchema, schemaIdForActions, annotations, targetAnnotation, entityType);
|
|
186
|
+
//2. Table View
|
|
187
|
+
const { visualization: tableVisualization, targetAnnotation: target } = analyzeViewAnnotation((_d = (_c = viewsPaths === null || viewsPaths === void 0 ? void 0 : viewsPaths[0]) === null || _c === void 0 ? void 0 : _c['secondary']) === null || _d === void 0 ? void 0 : _d[0], annotations, generateParameters, 'secondary');
|
|
188
|
+
const tableDefinitionName = utils_1.alignSchemaWithTemplateType(appSchema, generateParameters);
|
|
189
|
+
const tableDefinition = appSchema.definitions[tableDefinitionName];
|
|
190
|
+
if (tableVisualization) {
|
|
191
|
+
tableDefinition.properties.toolBar['$ref'] = `${common_1.DEFINITION_LINK_PREFIX}${v4_1.DefinitionName.ToolBarLR}`;
|
|
192
|
+
// Switch from generic column to specific definition
|
|
193
|
+
tableDefinition.properties['columns'] = {
|
|
194
|
+
$ref: common_1.DEFINITION_LINK_PREFIX + 'LineItems'
|
|
195
|
+
};
|
|
196
|
+
tableDefinition.properties.annotationPath['hidden'] = true;
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
tableDefinition.properties = {};
|
|
200
|
+
}
|
|
201
|
+
const tableView = appSchema.definitions[v4_1.DefinitionName.ALPTableView];
|
|
202
|
+
appSchema.definitions[v4_1.DefinitionName.ALPTable] = JSON.parse(JSON.stringify(tableView));
|
|
203
|
+
delete appSchema.definitions[v4_1.DefinitionName.ALPTable]['isViewNode'];
|
|
204
|
+
tableView.additionalProperties = false;
|
|
205
|
+
tableView.description = `Table (key: secondary)`;
|
|
206
|
+
tableView.title = `Table`;
|
|
207
|
+
if (tableVisualization) {
|
|
208
|
+
delete tableView.properties;
|
|
209
|
+
tableView.$ref = `${common_1.DEFINITION_LINK_PREFIX}${v4_1.DefinitionName.ALPTable}`;
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
tableView.properties = {};
|
|
213
|
+
}
|
|
214
|
+
tableView['artifactType'] = common_1.ArtifactType.Manifest;
|
|
215
|
+
if (tableVisualization && tableVisualization.indexOf('LineItem') > -1) {
|
|
216
|
+
const annotationTerm = tableVisualization.split('.')[1];
|
|
217
|
+
utils_1.addLineItemsType(appSchema, entityType.annotations.UI[annotationTerm], entityType, generateParameters.serviceAVT);
|
|
218
|
+
appSchema.definitions[v4_1.DefinitionName.ALPTable]['annotationPath'] = target;
|
|
219
|
+
const viewAnnotation = viewsPaths[0]['secondary'][0].annotationPath.split('com.sap.vocabularies.UI.v1.')[1];
|
|
220
|
+
const pathParts = annotations[viewAnnotation].fullyQualifiedName.split('@');
|
|
221
|
+
tableView['annotationPath'] = `/${pathParts[0]}/@${pathParts[1]}`;
|
|
222
|
+
tableView['key'] = 'secondary';
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
function copyTableDefinitions(viewKey, appSchema, targetAnnotation, navPropName) {
|
|
226
|
+
const idForTable = `${v4_1.DefinitionName.LRTableView}<${viewKey}>`;
|
|
227
|
+
appSchema.definitions[idForTable] = JSON.parse(JSON.stringify(appSchema.definitions[v4_1.DefinitionName.LRTableView]));
|
|
228
|
+
delete appSchema.definitions[idForTable]['isViewNode'];
|
|
229
|
+
appSchema.definitions[idForTable]['annotationPath'] = targetAnnotation;
|
|
230
|
+
if (navPropName) {
|
|
231
|
+
appSchema.definitions[idForTable]['navigationProperty'] = navPropName;
|
|
232
|
+
}
|
|
233
|
+
//Copy toolbar
|
|
234
|
+
//const idForToolbar = `${DefinitionName.ToolBar}<${viewKey}>`;
|
|
235
|
+
//appSchema.definitions[idForToolbar] = JSON.parse(JSON.stringify(appSchema.definitions[DefinitionName.ToolBar]));
|
|
236
|
+
appSchema.definitions[idForTable]['properties'].toolBar.$ref = `${common_1.DEFINITION_LINK_PREFIX}${v4_1.DefinitionName.ToolBar}<LineItemsOfView::${viewKey}>`;
|
|
237
|
+
return idForTable;
|
|
238
|
+
}
|
|
239
|
+
function copyChartDefinitions(viewKey, appSchema, targetAnnotation, navPropName, annotations, entityType) {
|
|
240
|
+
const idForChart = `${v4_1.DefinitionName.LRChartView}<${viewKey}>`;
|
|
241
|
+
appSchema.definitions[idForChart] = JSON.parse(JSON.stringify(appSchema.definitions[v4_1.DefinitionName.LRChartView]));
|
|
242
|
+
delete appSchema.definitions[idForChart]['isViewNode'];
|
|
243
|
+
appSchema.definitions[idForChart]['annotationPath'] = targetAnnotation;
|
|
244
|
+
if (navPropName) {
|
|
245
|
+
appSchema.definitions[idForChart]['navigationProperty'] = navPropName;
|
|
246
|
+
}
|
|
247
|
+
//Copy toolbar
|
|
248
|
+
const idForToolbar = `${v4_1.DefinitionName.ViewChartToolBar}<${viewKey}>`;
|
|
249
|
+
appSchema.definitions[idForToolbar] = JSON.parse(JSON.stringify(appSchema.definitions[v4_1.DefinitionName.ViewChartToolBar]));
|
|
250
|
+
appSchema.definitions[idForChart]['properties'].toolBar.$ref = `${common_1.DEFINITION_LINK_PREFIX}${idForToolbar}`;
|
|
251
|
+
//Copy actions
|
|
252
|
+
const schemaIdForActions = `${v4_1.DefinitionName.Actions}<${viewKey}>`;
|
|
253
|
+
defineActions(appSchema, schemaIdForActions, annotations, targetAnnotation, entityType);
|
|
254
|
+
appSchema.definitions[idForToolbar]['properties']['actions']['$ref'] = `${common_1.DEFINITION_LINK_PREFIX}${schemaIdForActions}`;
|
|
255
|
+
return idForChart;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Add list report views to the app-specific schema
|
|
259
|
+
* @param {Definition} appSchema - app-specific JSON schema
|
|
260
|
+
* @param {Array<Object>} viewsPaths - views' paths' section in the manifest
|
|
261
|
+
* @param {EntityType} entityType - actual entity type of the page's entitySet
|
|
262
|
+
* @param {EntitySet} entitySet - actual entity set (AVT information)
|
|
263
|
+
* @param {GenerateAppSchemaParameters} generateParameters - list of API input parameters
|
|
264
|
+
*/
|
|
265
|
+
function addLRViews(appSchema, viewsPaths, entityType, entitySet, generateParameters) {
|
|
266
|
+
var _a;
|
|
267
|
+
if (!viewsPaths) {
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
const viewsDefinition = appSchema.definitions.MultiTableModeV4;
|
|
271
|
+
for (let index = 0; index < viewsPaths.length; index++) {
|
|
272
|
+
const view = viewsPaths[index];
|
|
273
|
+
if (!view['key']) {
|
|
274
|
+
continue;
|
|
275
|
+
}
|
|
276
|
+
const viewKey = view['key'].replace('#', '::');
|
|
277
|
+
let targetEntityType = entityType;
|
|
278
|
+
let viewEntitySet = entitySet;
|
|
279
|
+
let navPropName = undefined;
|
|
280
|
+
if (view['entitySet'] && view['entitySet'] !== entitySet.name) {
|
|
281
|
+
viewEntitySet = generateParameters.serviceAVT.entitySets.find((es) => {
|
|
282
|
+
return es.name === view['entitySet'];
|
|
283
|
+
});
|
|
284
|
+
targetEntityType = viewEntitySet.entityType;
|
|
285
|
+
}
|
|
286
|
+
const annotations = targetEntityType.annotations.UI;
|
|
287
|
+
const { visualization, targetAnnotation, namespace } = analyzeViewAnnotation(view, annotations, generateParameters, view['key']);
|
|
288
|
+
if (view['entitySet']) {
|
|
289
|
+
navPropName = (_a = entityType.navigationProperties.find((np) => {
|
|
290
|
+
return np.targetTypeName === namespace;
|
|
291
|
+
})) === null || _a === void 0 ? void 0 : _a.name;
|
|
292
|
+
}
|
|
293
|
+
//Add Line item view
|
|
294
|
+
if (visualization && visualization.indexOf('LineItem') > -1) {
|
|
295
|
+
//Copy table
|
|
296
|
+
const idForTable = copyTableDefinitions(viewKey, appSchema, targetAnnotation, navPropName);
|
|
297
|
+
viewsDefinition.properties[viewKey] = {
|
|
298
|
+
$ref: `${common_1.DEFINITION_LINK_PREFIX}${idForTable}`,
|
|
299
|
+
description: `Table View (key: ${viewKey})`,
|
|
300
|
+
title: `Table View (${viewKey})`
|
|
301
|
+
};
|
|
302
|
+
appSchema['definitions'][idForTable].properties.columns = {
|
|
303
|
+
$ref: `${common_1.DEFINITION_LINK_PREFIX}LineItemsOfView::${viewKey}`
|
|
304
|
+
};
|
|
305
|
+
appSchema['definitions'][idForTable].properties.annotationPath['hidden'] = true;
|
|
306
|
+
appSchema['definitions'][idForTable].properties.entitySet['hidden'] = true;
|
|
307
|
+
const annotationTerm = visualization.split('.')[1];
|
|
308
|
+
utils_1.addLineItemsType(appSchema, targetEntityType.annotations.UI[annotationTerm], targetEntityType, generateParameters.serviceAVT, v4_1.DefinitionName.ViewTableColumn, `LineItemsOfView::${viewKey}`);
|
|
309
|
+
}
|
|
310
|
+
else if (visualization && visualization.indexOf('Chart') > -1) {
|
|
311
|
+
//Add Chart view
|
|
312
|
+
const idForChart = copyChartDefinitions(viewKey, appSchema, targetAnnotation, navPropName, annotations, targetEntityType);
|
|
313
|
+
appSchema['definitions'][idForChart].properties.annotationPath['hidden'] = true;
|
|
314
|
+
appSchema['definitions'][idForChart].properties.entitySet['hidden'] = true;
|
|
315
|
+
viewsDefinition.properties[viewKey] = {
|
|
316
|
+
$ref: `${common_1.DEFINITION_LINK_PREFIX}${idForChart}`,
|
|
317
|
+
description: `Chart View (key: ${viewKey})`,
|
|
318
|
+
title: `Chart View (${viewKey})`
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
else {
|
|
322
|
+
viewsDefinition.properties[viewKey] = {
|
|
323
|
+
description: `View (key: ${viewKey})`,
|
|
324
|
+
title: `View (${viewKey})`,
|
|
325
|
+
properties: {},
|
|
326
|
+
additionalProperties: false
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
viewsDefinition.properties[viewKey]['isViewNode'] = true;
|
|
330
|
+
viewsDefinition.properties[viewKey]['propertyIndex'] = index;
|
|
331
|
+
viewsDefinition.properties[viewKey]['annotationPath'] = namespace
|
|
332
|
+
? `/${namespace}/@${view['annotationPath']}`
|
|
333
|
+
: undefined;
|
|
334
|
+
viewsDefinition.properties[viewKey]['artifactType'] = common_1.ArtifactType.Manifest;
|
|
335
|
+
viewsDefinition.properties[viewKey]['key'] = viewKey;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Add views to schema (LR or ALP)
|
|
340
|
+
* @param {Definition} appSchema - app-specific JSON schema
|
|
341
|
+
* @param {SapUiAppPageV4} v4Page - actual page in the manifest
|
|
342
|
+
* @param {EntityType} entityType - actual entity type (AVT information)
|
|
343
|
+
* @param {EntitySet} entitySet - actual entity set (AVT information)
|
|
344
|
+
* @param {GenerateAppSchemaParameters} generateParameters - list of API input parameters
|
|
345
|
+
*/
|
|
346
|
+
function addViews(appSchema, v4Page, entityType, entitySet, generateParameters) {
|
|
347
|
+
var _a, _b, _c;
|
|
348
|
+
const viewsPaths = (_c = (_b = (_a = v4Page.options) === null || _a === void 0 ? void 0 : _a.settings) === null || _b === void 0 ? void 0 : _b.views) === null || _c === void 0 ? void 0 : _c.paths;
|
|
349
|
+
if (generateParameters.templateType === common_1.TemplateType.ListReportObjectPageV4) {
|
|
350
|
+
addLRViews(appSchema, viewsPaths, entityType, entitySet, generateParameters);
|
|
351
|
+
appSchema.properties['chart']['hidden'] = true;
|
|
352
|
+
}
|
|
353
|
+
else if (generateParameters.templateType === common_1.TemplateType.AnalyticalListPageV4) {
|
|
354
|
+
addALPViews(appSchema, viewsPaths, entityType, generateParameters);
|
|
355
|
+
}
|
|
46
356
|
}
|
|
47
|
-
exports.addEnumForVariantPaths = addEnumForVariantPaths;
|
|
48
357
|
/**
|
|
49
358
|
* Generates an app specific schema for the FE V4 Listreport from the generic schema.
|
|
50
359
|
* Generic types are replaced by information from the app specific annotations.
|
|
@@ -59,34 +368,21 @@ function generateListReportSchemaV4(generateParameters, genericSchema, entitySet
|
|
|
59
368
|
var _a, _b, _c, _d;
|
|
60
369
|
const appSchema = JSON.parse(JSON.stringify(genericSchema));
|
|
61
370
|
const entityType = entitySet === null || entitySet === void 0 ? void 0 : entitySet.entityType;
|
|
62
|
-
if (!entityType) {
|
|
63
|
-
extensionLogger_1.log(generateParameters.logger, {
|
|
64
|
-
severity: "error" /* Error */,
|
|
65
|
-
message: i18next_1.default.t('NOENTITYTYPE'),
|
|
66
|
-
location: {
|
|
67
|
-
path: common_1.METADATAPATH
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
return appSchema;
|
|
71
|
-
}
|
|
72
|
-
if (!(generateParameters === null || generateParameters === void 0 ? void 0 : generateParameters.serviceAVT)) {
|
|
73
|
-
return appSchema;
|
|
74
|
-
}
|
|
75
371
|
const alias = common_1.findAlias(common_1.UIVOCABULARY, generateParameters.serviceAVT);
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
utils_1.addLineItemsType(appSchema, lineItemAnnotation, entityType, generateParameters.serviceAVT);
|
|
79
|
-
addEnumForVariantPaths(entityType, appSchema, generateParameters.serviceAVT);
|
|
80
|
-
const selectionFieldAnnotation = (_d = (_c = entityType === null || entityType === void 0 ? void 0 : entityType.annotations) === null || _c === void 0 ? void 0 : _c[alias]) === null || _d === void 0 ? void 0 : _d.SelectionFields;
|
|
372
|
+
//Add selection fields
|
|
373
|
+
const selectionFieldAnnotation = (_b = (_a = entityType === null || entityType === void 0 ? void 0 : entityType.annotations) === null || _a === void 0 ? void 0 : _a[alias]) === null || _b === void 0 ? void 0 : _b.SelectionFields;
|
|
81
374
|
addSelectionFields(entityType, appSchema, selectionFieldAnnotation);
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
375
|
+
common_1.addEnumForSingleTabVariant(entityType, appSchema, v4_1.DefinitionName.AnnotationPathAsObject);
|
|
376
|
+
if (generateParameters.templateType === common_1.TemplateType.ListReportObjectPageV4) {
|
|
377
|
+
utils_1.addLineItemsType(appSchema, (_d = (_c = entityType === null || entityType === void 0 ? void 0 : entityType.annotations) === null || _c === void 0 ? void 0 : _c[alias]) === null || _d === void 0 ? void 0 : _d.LineItem, entityType, generateParameters.serviceAVT);
|
|
378
|
+
const tableDefinitionName = utils_1.alignSchemaWithTemplateType(appSchema, generateParameters);
|
|
379
|
+
const tableDefinition = appSchema.definitions[tableDefinitionName];
|
|
380
|
+
tableDefinition.properties.toolBar['$ref'] = `${common_1.DEFINITION_LINK_PREFIX}${v4_1.DefinitionName.ToolBarLR}`;
|
|
381
|
+
// Switch from generic column to specific definition
|
|
382
|
+
tableDefinition.properties['columns'] = {
|
|
383
|
+
$ref: common_1.DEFINITION_LINK_PREFIX + 'LineItems'
|
|
384
|
+
};
|
|
385
|
+
}
|
|
90
386
|
if (generateParameters.manifest) {
|
|
91
387
|
//Find page in targets
|
|
92
388
|
const pages = generateParameters.manifest[__1.ManifestSection.ui5].routing.targets;
|
|
@@ -105,7 +401,11 @@ function generateListReportSchemaV4(generateParameters, genericSchema, entitySet
|
|
|
105
401
|
if (!v4Page) {
|
|
106
402
|
return appSchema;
|
|
107
403
|
}
|
|
404
|
+
// Handle LR & ALP views
|
|
405
|
+
addViews(appSchema, v4Page, entityType, entitySet, generateParameters);
|
|
108
406
|
}
|
|
407
|
+
delete appSchema.definitions['GenericColumns'];
|
|
408
|
+
delete appSchema.definitions['Action'];
|
|
109
409
|
return appSchema;
|
|
110
410
|
}
|
|
111
411
|
exports.generateListReportSchemaV4 = generateListReportSchemaV4;
|