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