@sap/ux-specification 1.96.88 → 1.96.90
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 +52 -1
- package/dist/documentation/runDocu-min.js +1 -1
- package/dist/documentation/runDocu-min.js.map +2 -2
- package/dist/documentation/v2/v2-AnalyticalListPage.html +2 -2
- package/dist/documentation/v2/v2-ApplicationV2.html +2 -2
- package/dist/documentation/v2/v2-ListReport.html +2 -2
- package/dist/documentation/v2/v2-ListReportNew.html +73 -0
- package/dist/documentation/v2/v2-ObjectPage.html +2 -2
- package/dist/documentation/v2/v2-OverviewPage.html +2 -2
- package/dist/documentation/v4/v4-ApplicationV4.html +2 -2
- package/dist/documentation/v4/v4-BuildingBlocks.html +2 -2
- package/dist/documentation/v4/v4-FreestylePage.html +2 -2
- package/dist/documentation/v4/v4-ListReport.html +2 -2
- package/dist/documentation/v4/v4-ObjectPage.html +2 -2
- package/dist/index-min.js +110 -110
- package/dist/index-min.js.map +4 -4
- package/dist/schemas/v2/ApplicationV2.json +2 -1
- package/dist/schemas/v2/ListReportNewConfig.json +16 -0
- package/dist/schemas/v4/ApplicationV4.json +6 -1
- package/dist/schemas/v4/ListReportConfig.json +18 -0
- package/dist/schemas/v4/ObjectPageConfig.json +27 -0
- package/dist/specification/package.json +7 -7
- package/dist/specification/scripts/documentation/components/TreeDiagram.d.ts +21 -0
- package/dist/specification/scripts/documentation/components/TreeDiagram.d.ts.map +1 -1
- package/dist/specification/scripts/documentation/components/TreeDiagram.js +21 -0
- package/dist/specification/scripts/documentation/components/TreeDiagram.js.map +1 -1
- package/dist/specification/scripts/documentation/components/filter.d.ts +7 -0
- package/dist/specification/scripts/documentation/components/filter.d.ts.map +1 -1
- package/dist/specification/scripts/documentation/components/filter.js +30 -0
- package/dist/specification/scripts/documentation/components/filter.js.map +1 -1
- package/dist/specification/scripts/documentation/components/ui/TreeUI.d.ts +70 -0
- package/dist/specification/scripts/documentation/components/ui/TreeUI.d.ts.map +1 -1
- package/dist/specification/scripts/documentation/components/ui/TreeUI.js +70 -3
- package/dist/specification/scripts/documentation/components/ui/TreeUI.js.map +1 -1
- package/dist/specification/scripts/documentation/components/ui/keyboardNavigation.d.ts +17 -0
- package/dist/specification/scripts/documentation/components/ui/keyboardNavigation.d.ts.map +1 -1
- package/dist/specification/scripts/documentation/components/ui/keyboardNavigation.js +23 -0
- package/dist/specification/scripts/documentation/components/ui/keyboardNavigation.js.map +1 -1
- package/dist/specification/scripts/documentation/components/ui/search.d.ts +12 -0
- package/dist/specification/scripts/documentation/components/ui/search.d.ts.map +1 -1
- package/dist/specification/scripts/documentation/components/ui/search.js +78 -8
- package/dist/specification/scripts/documentation/components/ui/search.js.map +1 -1
- package/dist/specification/scripts/documentation/components/ui/toggle.d.ts +21 -0
- package/dist/specification/scripts/documentation/components/ui/toggle.d.ts.map +1 -1
- package/dist/specification/scripts/documentation/components/ui/toggle.js +23 -6
- package/dist/specification/scripts/documentation/components/ui/toggle.js.map +1 -1
- package/dist/specification/scripts/documentation/components/ui/tooltip.d.ts +24 -0
- package/dist/specification/scripts/documentation/components/ui/tooltip.d.ts.map +1 -1
- package/dist/specification/scripts/documentation/components/ui/tooltip.js +24 -3
- package/dist/specification/scripts/documentation/components/ui/tooltip.js.map +1 -1
- package/dist/specification/scripts/documentation/components/ui/utils.d.ts +36 -0
- package/dist/specification/scripts/documentation/components/ui/utils.d.ts.map +1 -1
- package/dist/specification/scripts/documentation/components/ui/utils.js +36 -4
- package/dist/specification/scripts/documentation/components/ui/utils.js.map +1 -1
- package/dist/specification/scripts/extractDocu.js +49 -5
- package/dist/specification/scripts/extractDocu.js.map +1 -1
- package/dist/specification/scripts/macros/api.d.ts +4 -1
- package/dist/specification/scripts/macros/api.d.ts.map +1 -1
- package/dist/specification/scripts/macros/api.js +9 -1
- package/dist/specification/scripts/macros/api.js.map +1 -1
- package/dist/specification/scripts/macros/cmd.d.ts +1 -0
- package/dist/specification/scripts/macros/cmd.d.ts.map +1 -1
- package/dist/specification/scripts/macros/cmd.js +1 -0
- package/dist/specification/scripts/macros/cmd.js.map +1 -1
- package/dist/specification/scripts/macros/corrections.d.ts +1 -0
- package/dist/specification/scripts/macros/corrections.d.ts.map +1 -1
- package/dist/specification/scripts/macros/corrections.js +4 -0
- package/dist/specification/scripts/macros/corrections.js.map +1 -1
- package/dist/specification/scripts/macros/i18n.d.ts +1 -0
- package/dist/specification/scripts/macros/i18n.d.ts.map +1 -1
- package/dist/specification/scripts/macros/i18n.js +1 -0
- package/dist/specification/scripts/macros/i18n.js.map +1 -1
- package/dist/specification/scripts/macros/schema.d.ts +1 -0
- package/dist/specification/scripts/macros/schema.d.ts.map +1 -1
- package/dist/specification/scripts/macros/schema.js +18 -5
- package/dist/specification/scripts/macros/schema.js.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.d.ts +13 -5
- package/dist/specification/scripts/schema/to-json-schema.d.ts.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.js +57 -6
- package/dist/specification/scripts/schema/to-json-schema.js.map +1 -1
- package/dist/specification/scripts/spec.js +19 -9
- package/dist/specification/scripts/spec.js.map +1 -1
- package/dist/specification/src/api.d.ts +20 -12
- package/dist/specification/src/api.d.ts.map +1 -1
- package/dist/specification/src/api.js +24 -15
- package/dist/specification/src/api.js.map +1 -1
- package/dist/specification/src/extensionLogger.d.ts +3 -2
- package/dist/specification/src/extensionLogger.d.ts.map +1 -1
- package/dist/specification/src/extensionLogger.js +3 -2
- package/dist/specification/src/extensionLogger.js.map +1 -1
- package/dist/specification/src/i18n/i18n.d.ts +5 -0
- package/dist/specification/src/i18n/i18n.d.ts.map +1 -1
- package/dist/specification/src/i18n/i18n.js +5 -0
- package/dist/specification/src/i18n/i18n.js.map +1 -1
- package/dist/specification/src/project.d.ts +3 -1
- package/dist/specification/src/project.d.ts.map +1 -1
- package/dist/specification/src/project.js +3 -1
- package/dist/specification/src/project.js.map +1 -1
- package/dist/specification/src/specification/schemaAccess.d.ts +6 -2
- package/dist/specification/src/specification/schemaAccess.d.ts.map +1 -1
- package/dist/specification/src/specification/schemaAccess.js +10 -4
- package/dist/specification/src/specification/schemaAccess.js.map +1 -1
- package/dist/specification/src/sync/common/DataFieldStrategy.d.ts +63 -0
- package/dist/specification/src/sync/common/DataFieldStrategy.d.ts.map +1 -0
- package/dist/specification/src/sync/common/DataFieldStrategy.js +357 -0
- package/dist/specification/src/sync/common/DataFieldStrategy.js.map +1 -0
- package/dist/specification/src/sync/common/appProvider.d.ts +17 -6
- package/dist/specification/src/sync/common/appProvider.d.ts.map +1 -1
- package/dist/specification/src/sync/common/appProvider.js +33 -17
- package/dist/specification/src/sync/common/appProvider.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/control.d.ts +26 -10
- package/dist/specification/src/sync/common/decoration/control.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/control.js +32 -13
- package/dist/specification/src/sync/common/decoration/control.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.d.ts +14 -0
- package/dist/specification/src/sync/common/decoration/decorators.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.js +14 -0
- package/dist/specification/src/sync/common/decoration/decorators.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/factory.d.ts +12 -3
- package/dist/specification/src/sync/common/decoration/factory.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/factory.js +6 -3
- package/dist/specification/src/sync/common/decoration/factory.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/flex.d.ts +7 -0
- package/dist/specification/src/sync/common/decoration/flex.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/flex.js +7 -0
- package/dist/specification/src/sync/common/decoration/flex.js.map +1 -1
- package/dist/specification/src/sync/common/distTagEvaluator.d.ts +6 -3
- package/dist/specification/src/sync/common/distTagEvaluator.d.ts.map +1 -1
- package/dist/specification/src/sync/common/distTagEvaluator.js +6 -3
- package/dist/specification/src/sync/common/distTagEvaluator.js.map +1 -1
- package/dist/specification/src/sync/common/flexUtils.d.ts +11 -10
- package/dist/specification/src/sync/common/flexUtils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/flexUtils.js +11 -10
- package/dist/specification/src/sync/common/flexUtils.js.map +1 -1
- package/dist/specification/src/sync/common/generate/objectPage.d.ts +89 -19
- package/dist/specification/src/sync/common/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/common/generate/objectPage.js +223 -89
- package/dist/specification/src/sync/common/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/common/generate/utils.d.ts +81 -36
- package/dist/specification/src/sync/common/generate/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/generate/utils.js +109 -35
- package/dist/specification/src/sync/common/generate/utils.js.map +1 -1
- package/dist/specification/src/sync/common/i18n.json +2 -1
- package/dist/specification/src/sync/common/import/utils.d.ts +9 -3
- package/dist/specification/src/sync/common/import/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/import/utils.js +9 -3
- package/dist/specification/src/sync/common/import/utils.js.map +1 -1
- package/dist/specification/src/sync/common/importProject.d.ts +17 -6
- package/dist/specification/src/sync/common/importProject.d.ts.map +1 -1
- package/dist/specification/src/sync/common/importProject.js +60 -30
- package/dist/specification/src/sync/common/importProject.js.map +1 -1
- package/dist/specification/src/sync/common/index.d.ts +1 -0
- package/dist/specification/src/sync/common/index.d.ts.map +1 -1
- package/dist/specification/src/sync/common/index.js +1 -0
- package/dist/specification/src/sync/common/index.js.map +1 -1
- package/dist/specification/src/sync/common/utils.d.ts +152 -56
- package/dist/specification/src/sync/common/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/utils.js +262 -149
- package/dist/specification/src/sync/common/utils.js.map +1 -1
- package/dist/specification/src/sync/i18n.d.ts +5 -0
- package/dist/specification/src/sync/i18n.d.ts.map +1 -1
- package/dist/specification/src/sync/i18n.js +5 -0
- package/dist/specification/src/sync/i18n.js.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/Action.d.ts +3 -3
- package/dist/specification/src/sync/v2/export/controls/Action.js +15 -15
- package/dist/specification/src/sync/v2/export/controls/Card.d.ts +14 -0
- package/dist/specification/src/sync/v2/export/controls/Card.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/Card.js +20 -0
- package/dist/specification/src/sync/v2/export/controls/Card.js.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/Field.js +5 -5
- package/dist/specification/src/sync/v2/export/controls/FilterBar.d.ts +20 -0
- package/dist/specification/src/sync/v2/export/controls/FilterBar.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/FilterBar.js +28 -0
- package/dist/specification/src/sync/v2/export/controls/FilterBar.js.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/FormAction.js +4 -4
- package/dist/specification/src/sync/v2/export/controls/Fragment.d.ts +10 -5
- package/dist/specification/src/sync/v2/export/controls/Fragment.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/Fragment.js +62 -25
- package/dist/specification/src/sync/v2/export/controls/Fragment.js.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/ObjectPageFooterAction.js +6 -6
- package/dist/specification/src/sync/v2/export/controls/ObjectPageHeaderAction.js +6 -6
- package/dist/specification/src/sync/v2/export/controls/ObjectPageHeaderSection.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/ObjectPageHeaderSection.js +20 -16
- package/dist/specification/src/sync/v2/export/controls/ObjectPageHeaderSection.js.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/ObjectPageSection.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/ObjectPageSection.js.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/ObjectPageToolBarAction.js +6 -6
- package/dist/specification/src/sync/v2/export/controls/Table.d.ts +24 -0
- package/dist/specification/src/sync/v2/export/controls/Table.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/Table.js +42 -3
- package/dist/specification/src/sync/v2/export/controls/Table.js.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/TableColumn.js +10 -10
- package/dist/specification/src/sync/v2/export/export.d.ts +7 -3
- package/dist/specification/src/sync/v2/export/export.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/export.js +133 -44
- package/dist/specification/src/sync/v2/export/export.js.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPage.d.ts +28 -11
- package/dist/specification/src/sync/v2/export/exportPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPage.js +43 -22
- package/dist/specification/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts +6 -3
- package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js +27 -17
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js.map +1 -1
- package/dist/specification/src/sync/v2/export/manifest.d.ts +5 -2
- package/dist/specification/src/sync/v2/export/manifest.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/manifest.js +30 -6
- package/dist/specification/src/sync/v2/export/manifest.js.map +1 -1
- package/dist/specification/src/sync/v2/export/pages/OverviewPage.d.ts +21 -0
- package/dist/specification/src/sync/v2/export/pages/OverviewPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/pages/OverviewPage.js +36 -2
- package/dist/specification/src/sync/v2/export/pages/OverviewPage.js.map +1 -1
- package/dist/specification/src/sync/v2/export/view-controller-generator.d.ts +25 -15
- package/dist/specification/src/sync/v2/export/view-controller-generator.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/view-controller-generator.js +27 -16
- package/dist/specification/src/sync/v2/export/view-controller-generator.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/analyticalListReport.d.ts +2 -0
- package/dist/specification/src/sync/v2/generate/analyticalListReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/analyticalListReport.js +6 -0
- package/dist/specification/src/sync/v2/generate/analyticalListReport.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/generate.d.ts +5 -9
- package/dist/specification/src/sync/v2/generate/generate.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/generate.js +14 -14
- package/dist/specification/src/sync/v2/generate/generate.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/index.d.ts +1 -1
- package/dist/specification/src/sync/v2/generate/index.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/index.js +5 -2
- package/dist/specification/src/sync/v2/generate/index.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/listReport.d.ts +5 -3
- package/dist/specification/src/sync/v2/generate/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/listReport.js +25 -8
- package/dist/specification/src/sync/v2/generate/listReport.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/objectPage.d.ts +2 -2
- package/dist/specification/src/sync/v2/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/objectPage.js +75 -43
- package/dist/specification/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/overviewPage.d.ts +2 -2
- package/dist/specification/src/sync/v2/generate/overviewPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/overviewPage.js +2 -2
- package/dist/specification/src/sync/v2/generate/overviewPage.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.d.ts +5 -2
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js +4 -4
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/utils.d.ts +47 -22
- package/dist/specification/src/sync/v2/generate/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/utils.js +92 -33
- package/dist/specification/src/sync/v2/generate/utils.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.d.ts +27 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.d.ts.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.js +60 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.js.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.d.ts +84 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.d.ts.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.js +262 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.js.map +1 -0
- package/dist/specification/src/sync/v2/import/app/appProvider.d.ts +7 -0
- package/dist/specification/src/sync/v2/import/app/appProvider.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/app/appProvider.js +26 -6
- package/dist/specification/src/sync/v2/import/app/appProvider.js.map +1 -1
- package/dist/specification/src/sync/v2/import/app/ovpProvider.d.ts +4 -0
- package/dist/specification/src/sync/v2/import/app/ovpProvider.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/app/ovpProvider.js +4 -0
- package/dist/specification/src/sync/v2/import/app/ovpProvider.js.map +1 -1
- package/dist/specification/src/sync/v2/import/common/index.d.ts +28 -15
- package/dist/specification/src/sync/v2/import/common/index.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/common/index.js +91 -35
- package/dist/specification/src/sync/v2/import/common/index.js.map +1 -1
- package/dist/specification/src/sync/v2/import/controls/table.d.ts +6 -2
- package/dist/specification/src/sync/v2/import/controls/table.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/controls/table.js +6 -2
- package/dist/specification/src/sync/v2/import/controls/table.js.map +1 -1
- package/dist/specification/src/sync/v2/import/importPage.d.ts +3 -2
- package/dist/specification/src/sync/v2/import/importPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/importPage.js +4 -5
- package/dist/specification/src/sync/v2/import/importPage.js.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/analyticalListPage.d.ts +3 -3
- package/dist/specification/src/sync/v2/import/pages/analyticalListPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/analyticalListPage.js +9 -10
- package/dist/specification/src/sync/v2/import/pages/analyticalListPage.js.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/listReport.d.ts +8 -7
- package/dist/specification/src/sync/v2/import/pages/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/listReport.js +28 -24
- package/dist/specification/src/sync/v2/import/pages/listReport.js.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/objectPage.d.ts +3 -3
- package/dist/specification/src/sync/v2/import/pages/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/objectPage.js +107 -76
- package/dist/specification/src/sync/v2/import/pages/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/overviewPage.d.ts +2 -1
- package/dist/specification/src/sync/v2/import/pages/overviewPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/overviewPage.js +27 -12
- package/dist/specification/src/sync/v2/import/pages/overviewPage.js.map +1 -1
- package/dist/specification/src/sync/v2/import/utils.d.ts +18 -9
- package/dist/specification/src/sync/v2/import/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/utils.js +27 -15
- package/dist/specification/src/sync/v2/import/utils.js.map +1 -1
- package/dist/specification/src/sync/v2/utils.d.ts +27 -2
- package/dist/specification/src/sync/v2/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/utils.js +46 -0
- package/dist/specification/src/sync/v2/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/application.d.ts +7 -5
- package/dist/specification/src/sync/v4/application.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/application.js +7 -5
- package/dist/specification/src/sync/v4/application.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/FilterBar.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/FilterBar.js +8 -0
- package/dist/specification/src/sync/v4/export/controls/FilterBar.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFooter.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFooter.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.d.ts +4 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.js +4 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeader.d.ts +2 -2
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeader.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeader.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.d.ts +3 -0
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.js +4 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.d.ts +6 -0
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.js +7 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Table.d.ts +18 -10
- package/dist/specification/src/sync/v4/export/controls/Table.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Table.js +48 -18
- package/dist/specification/src/sync/v4/export/controls/Table.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/TableColumn.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/TableColumn.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBar.d.ts +2 -2
- package/dist/specification/src/sync/v4/export/controls/ToolBar.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts +6 -0
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js +7 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/export.d.ts +6 -4
- package/dist/specification/src/sync/v4/export/export.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/export.js +147 -59
- package/dist/specification/src/sync/v4/export/export.js.map +1 -1
- package/dist/specification/src/sync/v4/export/exportCustomColumn.d.ts +6 -4
- package/dist/specification/src/sync/v4/export/exportCustomColumn.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/exportCustomColumn.js +6 -4
- package/dist/specification/src/sync/v4/export/exportCustomColumn.js.map +1 -1
- package/dist/specification/src/sync/v4/export/flexibleColumnLayout.d.ts +3 -2
- package/dist/specification/src/sync/v4/export/flexibleColumnLayout.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/flexibleColumnLayout.js +13 -9
- package/dist/specification/src/sync/v4/export/flexibleColumnLayout.js.map +1 -1
- package/dist/specification/src/sync/v4/export/fpmCustomPage.d.ts +6 -4
- package/dist/specification/src/sync/v4/export/fpmCustomPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/fpmCustomPage.js +9 -4
- package/dist/specification/src/sync/v4/export/fpmCustomPage.js.map +1 -1
- package/dist/specification/src/sync/v4/export/manifest.d.ts +6 -2
- package/dist/specification/src/sync/v4/export/manifest.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/manifest.js +46 -17
- package/dist/specification/src/sync/v4/export/manifest.js.map +1 -1
- package/dist/specification/src/sync/v4/export/pages/ListReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/pages/ListReport.js +4 -3
- package/dist/specification/src/sync/v4/export/pages/ListReport.js.map +1 -1
- package/dist/specification/src/sync/v4/export/utils.d.ts +6 -4
- package/dist/specification/src/sync/v4/export/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/utils.js +6 -4
- package/dist/specification/src/sync/v4/export/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js +6 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.d.ts +5 -3
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.js +14 -5
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.d.ts +1 -0
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js +18 -0
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/pageExtensions.d.ts +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/pageExtensions.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/pageExtensions.js +2 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/pageExtensions.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.d.ts +2 -0
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js +2 -0
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/freestylePage.d.ts +2 -2
- package/dist/specification/src/sync/v4/generate/freestylePage.js +2 -2
- package/dist/specification/src/sync/v4/generate/generate.d.ts +13 -11
- package/dist/specification/src/sync/v4/generate/generate.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/generate.js +13 -11
- package/dist/specification/src/sync/v4/generate/generate.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/listReport.d.ts +10 -7
- package/dist/specification/src/sync/v4/generate/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/listReport.js +122 -73
- package/dist/specification/src/sync/v4/generate/listReport.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts +22 -1
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.js +247 -187
- package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/import/app/appProvider.d.ts +18 -4
- package/dist/specification/src/sync/v4/import/app/appProvider.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/app/appProvider.js +56 -24
- package/dist/specification/src/sync/v4/import/app/appProvider.js.map +1 -1
- package/dist/specification/src/sync/v4/import/fragment.d.ts +29 -4
- package/dist/specification/src/sync/v4/import/fragment.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/fragment.js +46 -7
- package/dist/specification/src/sync/v4/import/fragment.js.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.d.ts +3 -2
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.js +7 -2
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.js.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/listReport.d.ts +12 -10
- package/dist/specification/src/sync/v4/import/pages/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/listReport.js +82 -51
- package/dist/specification/src/sync/v4/import/pages/listReport.js.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/objectPage.d.ts +7 -6
- package/dist/specification/src/sync/v4/import/pages/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/objectPage.js +82 -71
- package/dist/specification/src/sync/v4/import/pages/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/import/utils.d.ts +4 -2
- package/dist/specification/src/sync/v4/import/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/utils.js +4 -2
- package/dist/specification/src/sync/v4/import/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/controllerExtensions.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/controllerExtensions.js +5 -2
- package/dist/specification/src/sync/v4/sync-rules/controllerExtensions.js.map +1 -1
- package/dist/specification/src/sync/v4/utils/StableIdHelper.d.ts +33 -0
- package/dist/specification/src/sync/v4/utils/StableIdHelper.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/StableIdHelper.js +42 -53
- package/dist/specification/src/sync/v4/utils/StableIdHelper.js.map +1 -1
- package/dist/specification/src/sync/v4/utils/macros.d.ts +4 -0
- package/dist/specification/src/sync/v4/utils/macros.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/macros.js +17 -1
- package/dist/specification/src/sync/v4/utils/macros.js.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.d.ts +109 -22
- package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.js +372 -159
- package/dist/specification/src/sync/v4/utils/utils.js.map +1 -1
- package/dist/types/src/common/Application.d.ts +6 -0
- package/dist/types/src/common/Application.d.ts.map +1 -1
- package/dist/types/src/common/Application.js +4 -0
- package/dist/types/src/common/Application.js.map +1 -1
- package/dist/types/src/common/types.d.ts +56 -2
- package/dist/types/src/common/types.d.ts.map +1 -1
- package/dist/types/src/common/types.js +7 -1
- package/dist/types/src/common/types.js.map +1 -1
- package/dist/types/src/common/webapp/manifest/sapUi5.d.ts +3 -2
- package/dist/types/src/common/webapp/manifest/sapUi5.d.ts.map +1 -1
- package/dist/types/src/common/webapp/manifest/sapUi5.js +3 -2
- package/dist/types/src/common/webapp/manifest/sapUi5.js.map +1 -1
- package/dist/types/src/v2/application.d.ts +1 -1
- package/dist/types/src/v2/controls/Action.d.ts +12 -0
- package/dist/types/src/v2/controls/Action.d.ts.map +1 -1
- package/dist/types/src/v2/controls/AnalyticalListPageChart.d.ts +1 -0
- package/dist/types/src/v2/controls/AnalyticalListPageChart.d.ts.map +1 -1
- package/dist/types/src/v2/controls/AnalyticalListPageKPI.d.ts +1 -0
- package/dist/types/src/v2/controls/AnalyticalListPageKPI.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Card.d.ts +13 -0
- package/dist/types/src/v2/controls/Card.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Card.js.map +1 -1
- package/dist/types/src/v2/controls/Field.d.ts +1 -0
- package/dist/types/src/v2/controls/Field.d.ts.map +1 -1
- package/dist/types/src/v2/controls/FilterBar.d.ts +6 -0
- package/dist/types/src/v2/controls/FilterBar.d.ts.map +1 -1
- package/dist/types/src/v2/controls/FilterBar.js.map +1 -1
- package/dist/types/src/v2/controls/Header.d.ts +1 -0
- package/dist/types/src/v2/controls/Header.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageChart.d.ts +1 -0
- package/dist/types/src/v2/controls/ObjectPageChart.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageFooter.d.ts +2 -0
- package/dist/types/src/v2/controls/ObjectPageFooter.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageForm.d.ts +1 -0
- package/dist/types/src/v2/controls/ObjectPageForm.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageHeader.d.ts +1 -0
- package/dist/types/src/v2/controls/ObjectPageHeader.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageHeaderSection.d.ts +3 -0
- package/dist/types/src/v2/controls/ObjectPageHeaderSection.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageLayout.d.ts +1 -0
- package/dist/types/src/v2/controls/ObjectPageLayout.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageSection.d.ts +13 -0
- package/dist/types/src/v2/controls/ObjectPageSection.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageSection.js.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageTable.d.ts +6 -0
- package/dist/types/src/v2/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageToolBar.d.ts +2 -0
- package/dist/types/src/v2/controls/ObjectPageToolBar.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Table.d.ts +28 -0
- package/dist/types/src/v2/controls/Table.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Table.js.map +1 -1
- package/dist/types/src/v2/controls/ToolBar.d.ts +1 -0
- package/dist/types/src/v2/controls/ToolBar.d.ts.map +1 -1
- package/dist/types/src/v2/pages/AnalyticalListPageConfigV2.d.ts +1 -0
- package/dist/types/src/v2/pages/AnalyticalListPageConfigV2.d.ts.map +1 -1
- package/dist/types/src/v2/pages/OverviewPageConfigV2.d.ts +4 -0
- package/dist/types/src/v2/pages/OverviewPageConfigV2.d.ts.map +1 -1
- package/dist/types/src/v4/application.d.ts +1 -1
- package/dist/types/src/v4/controls/CustomAction.d.ts +10 -0
- package/dist/types/src/v4/controls/CustomAction.d.ts.map +1 -1
- package/dist/types/src/v4/controls/FilterBar.d.ts +10 -0
- package/dist/types/src/v4/controls/FilterBar.d.ts.map +1 -1
- package/dist/types/src/v4/controls/FilterBar.js.map +1 -1
- package/dist/types/src/v4/controls/Header.d.ts +1 -0
- package/dist/types/src/v4/controls/Header.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageFooter.d.ts +1 -0
- package/dist/types/src/v4/controls/ObjectPageFooter.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageForm.d.ts +5 -1
- package/dist/types/src/v4/controls/ObjectPageForm.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageHeader.d.ts +6 -1
- package/dist/types/src/v4/controls/ObjectPageHeader.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageHeaderSection.d.ts +6 -0
- package/dist/types/src/v4/controls/ObjectPageHeaderSection.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageLayout.d.ts +1 -0
- package/dist/types/src/v4/controls/ObjectPageLayout.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageSection.d.ts +17 -0
- package/dist/types/src/v4/controls/ObjectPageSection.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageSection.js.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageTable.d.ts +5 -0
- package/dist/types/src/v4/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageTable.js.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageToolBar.d.ts +8 -1
- package/dist/types/src/v4/controls/ObjectPageToolBar.d.ts.map +1 -1
- package/dist/types/src/v4/controls/Table.d.ts +15 -0
- package/dist/types/src/v4/controls/Table.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ToolBar.d.ts +17 -2
- package/dist/types/src/v4/controls/ToolBar.d.ts.map +1 -1
- package/dist/types/src/v4/page.d.ts +4 -0
- package/dist/types/src/v4/page.d.ts.map +1 -1
- package/dist/types/src/v4/webapp/manifest/ManifestSettings.d.ts +22 -0
- package/dist/types/src/v4/webapp/manifest/ManifestSettings.d.ts.map +1 -1
- package/dist/types/src/v4/webapp/manifest/sapUi5.d.ts +3 -0
- package/dist/types/src/v4/webapp/manifest/sapUi5.d.ts.map +1 -1
- package/dist/types/src/v4/webapp/manifest/sapUi5.js.map +1 -1
- package/dist/types/src/v4/webapp/manifest/sapUiPageV4.d.ts +1 -1
- package/dist/types/src/v4/webapp/manifest/sapUiPageV4.d.ts.map +1 -1
- package/dist/types/src/v4/webapp/manifest/sapUiPageV4.js +2 -2
- package/dist/types/src/v4/webapp/manifest/sapUiPageV4.js.map +1 -1
- package/package.json +8 -8
|
@@ -3,9 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DATA_FIELD_FOR_ACTION_GROUP = void 0;
|
|
6
7
|
exports.addExtensionToArray = addExtensionToArray;
|
|
7
8
|
exports.addEnumForProperties = addEnumForProperties;
|
|
8
9
|
exports.addCustomColumnDefinition = addCustomColumnDefinition;
|
|
10
|
+
exports.addActionRecordToSchema = addActionRecordToSchema;
|
|
11
|
+
exports.addGroupActionRecordToSchema = addGroupActionRecordToSchema;
|
|
12
|
+
exports.addLineItemActionDefinition = addLineItemActionDefinition;
|
|
13
|
+
exports.addLineItemRecordToSchema = addLineItemRecordToSchema;
|
|
9
14
|
exports.appendLineItemsToSchema = appendLineItemsToSchema;
|
|
10
15
|
exports.addLineItemsTypeToSchema = addLineItemsTypeToSchema;
|
|
11
16
|
exports.addFragmentEnumForAnchor = addFragmentEnumForAnchor;
|
|
@@ -19,18 +24,29 @@ exports.getPageCustomExtensionFile = getPageCustomExtensionFile;
|
|
|
19
24
|
exports.getPageCustomViewFile = getPageCustomViewFile;
|
|
20
25
|
exports.addCustomSectionDefinition = addCustomSectionDefinition;
|
|
21
26
|
exports.addCustomFilterFieldDefinition = addCustomFilterFieldDefinition;
|
|
27
|
+
exports.importActionSettingsOfReference = importActionSettingsOfReference;
|
|
22
28
|
const utils_1 = require("../../common/utils");
|
|
23
29
|
const StableIdHelper_1 = require("./StableIdHelper");
|
|
24
30
|
const common_1 = require("../../common");
|
|
25
31
|
const i18next_1 = __importDefault(require("i18next"));
|
|
26
32
|
const __1 = require("../../..");
|
|
27
33
|
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
34
|
+
const ux_specification_types_2 = require("@sap/ux-specification-types");
|
|
28
35
|
const path_1 = require("path");
|
|
36
|
+
const DataFieldStrategy_1 = require("../../common/DataFieldStrategy");
|
|
37
|
+
const utils_2 = require("../import/utils");
|
|
38
|
+
exports.DATA_FIELD_FOR_ACTION_GROUP = 'DataFieldForActionGroup';
|
|
39
|
+
/**
|
|
40
|
+
* Returns a comparator function to sort objects by their property index.
|
|
41
|
+
*
|
|
42
|
+
* @returns A comparator function that compares two objects based on their property index.
|
|
43
|
+
*/
|
|
29
44
|
function sortByPropertyIndex() {
|
|
30
|
-
return ([_key1, value1], [_key2, value2]) => value1[
|
|
45
|
+
return ([_key1, value1], [_key2, value2]) => value1[ux_specification_types_2.SchemaTag.propertyIndex] - value2[ux_specification_types_2.SchemaTag.propertyIndex];
|
|
31
46
|
}
|
|
32
47
|
/**
|
|
33
48
|
* Sort function for properties in schema definitions.
|
|
49
|
+
*
|
|
34
50
|
* @param definition - definition which contains list of properties, unsorted
|
|
35
51
|
* @returns - list of properties, sorted by property index
|
|
36
52
|
*/
|
|
@@ -44,6 +60,7 @@ function sortPropertiesRecords(definition) {
|
|
|
44
60
|
}
|
|
45
61
|
/**
|
|
46
62
|
* Method receives extension object and returns title/text.
|
|
63
|
+
*
|
|
47
64
|
* @param extension - custom extension object from manifest.
|
|
48
65
|
* @returns Title/text of custom extension.
|
|
49
66
|
*/
|
|
@@ -69,16 +86,19 @@ function getExtensionText(extension) {
|
|
|
69
86
|
return text;
|
|
70
87
|
}
|
|
71
88
|
/**
|
|
72
|
-
* Adds a custom extension to the right position of a sorted array
|
|
89
|
+
* Adds a custom extension to the right position of a sorted array.
|
|
90
|
+
*
|
|
73
91
|
* @param extension - custom extension
|
|
74
92
|
* @param sortedExtensionsArray - array of all entries(annotation entries and extensions), to be enhanced
|
|
75
93
|
* @param targetIndex - index of the anchor entry
|
|
76
94
|
* @param extId - ID of the new custom extension
|
|
77
95
|
* @param newExtensionReference - schema reference of the new extension
|
|
96
|
+
* @param newExtensionReference.$ref - The reference to the schema definition for the new extension.
|
|
97
|
+
* @param newExtensionReference.description - A description of the new extension.
|
|
78
98
|
*/
|
|
79
99
|
function addExtensionToSortedArray(extension, sortedExtensionsArray, targetIndex, extId, newExtensionReference) {
|
|
80
|
-
const placement = extension.position?.placement ||
|
|
81
|
-
if (placement ===
|
|
100
|
+
const placement = extension.position?.placement || ux_specification_types_2.v4.Placement.After;
|
|
101
|
+
if (placement === ux_specification_types_2.v4.Placement.Before) {
|
|
82
102
|
sortedExtensionsArray.splice(targetIndex, 0, [extId, newExtensionReference]);
|
|
83
103
|
}
|
|
84
104
|
else {
|
|
@@ -86,12 +106,16 @@ function addExtensionToSortedArray(extension, sortedExtensionsArray, targetIndex
|
|
|
86
106
|
}
|
|
87
107
|
}
|
|
88
108
|
/**
|
|
89
|
-
* Adds remaining custom extensions that might self-reference and were not added in previous steps
|
|
109
|
+
* Adds remaining custom extensions that might self-reference and were not added in previous steps.
|
|
110
|
+
*
|
|
90
111
|
* @param {CustomExtensions} remainingExtensions - list of custom extensions that are left for post-processing
|
|
91
112
|
* @param {string} extId - current id of remaining extensions
|
|
92
113
|
* @param {CustomExtension} extension - current extension of remaining custom extensions
|
|
93
114
|
* @param {[string, unknown]} sortedExtArray - sorted array of annotation-based extensions, to be updated
|
|
94
|
-
* @param
|
|
115
|
+
* @param newCustomExt - description based on extension in manifest
|
|
116
|
+
* @param newCustomExt.$ref - The reference to the schema definition for the new extension.
|
|
117
|
+
* @param newCustomExt.description - A description of the new custom extension.
|
|
118
|
+
* @param newCustomExt.keys - An array of key objects, each containing a name and value for the custom extension.
|
|
95
119
|
*/
|
|
96
120
|
function addRemainingTargetByBefore(remainingExtensions, extId, extension, sortedExtArray, newCustomExt) {
|
|
97
121
|
const targetRemainingIndex = Object.entries(remainingExtensions)
|
|
@@ -103,26 +127,29 @@ function addRemainingTargetByBefore(remainingExtensions, extId, extension, sorte
|
|
|
103
127
|
}
|
|
104
128
|
}
|
|
105
129
|
/**
|
|
106
|
-
* Returns custom extension details like $ref, description, keys and action type
|
|
130
|
+
* Returns custom extension details like $ref, description, keys and action type.
|
|
131
|
+
*
|
|
107
132
|
* @param extension - custom extensions config
|
|
108
133
|
* @param extensionDefinitionName - custom extension definition name, different in LR and OP
|
|
109
134
|
* @param extId - custom extension id
|
|
110
135
|
* @param actionType - action type
|
|
136
|
+
* @returns Custom extension details
|
|
111
137
|
*/
|
|
112
138
|
function getExtensionDetails(extension, extensionDefinitionName, extId, actionType) {
|
|
113
|
-
const refDefinition = extensionDefinitionName.includes(
|
|
139
|
+
const refDefinition = extensionDefinitionName.includes(ux_specification_types_2.DefinitionName.ObjectPageCustomSectionFragment)
|
|
114
140
|
? `${extensionDefinitionName}<${extId}>`
|
|
115
141
|
: extensionDefinitionName;
|
|
116
142
|
const description = getExtensionText(extension);
|
|
117
143
|
return {
|
|
118
144
|
$ref: `${utils_1.DEFINITION_LINK_PREFIX}${refDefinition}`,
|
|
119
145
|
description,
|
|
120
|
-
keys: [{ name:
|
|
146
|
+
keys: [{ name: ux_specification_types_2.SchemaKeyName.key, value: `${extId}` }],
|
|
121
147
|
...(actionType !== undefined && { actionType })
|
|
122
148
|
};
|
|
123
149
|
}
|
|
124
150
|
/**
|
|
125
|
-
* Post-processing of custom extensions that are left after the first loop of adding extensions, i.e. custom extensions referring to other custom extensions
|
|
151
|
+
* Post-processing of custom extensions that are left after the first loop of adding extensions, i.e. custom extensions referring to other custom extensions.
|
|
152
|
+
*
|
|
126
153
|
* @param remainingExtensions - list of custom extensions that are left for post-processing
|
|
127
154
|
* @param extensionDefinitionName - custom extension definition name, different in LR and OP
|
|
128
155
|
* @param sortedExtArray - sorted array of annotation-based extensions, to be updated
|
|
@@ -147,8 +174,8 @@ function adjustCustomExtReferringToCustomExt(remainingExtensions, extensionDefin
|
|
|
147
174
|
severity: "error" /* LogSeverity.Error */,
|
|
148
175
|
message: i18next_1.default.t('INVALIDANCHOR', { id: extId, anchor: extension.position.anchor }),
|
|
149
176
|
location: {
|
|
150
|
-
path:
|
|
151
|
-
range: [
|
|
177
|
+
path: ux_specification_types_2.MANIFESTPATH,
|
|
178
|
+
range: [ux_specification_types_2.ManifestSection.ui5]
|
|
152
179
|
}
|
|
153
180
|
});
|
|
154
181
|
sortedExtArray.splice(sortedExtArray.length, 0, [extId, newCustomExt]);
|
|
@@ -175,25 +202,29 @@ function adjustCustomExtReferringToCustomExt(remainingExtensions, extensionDefin
|
|
|
175
202
|
* Returns anchor for extension. Priority:
|
|
176
203
|
* 1. 'anchor' property in extension;
|
|
177
204
|
* 2. When 'anchor' is not defined in extension and does calculation based placement and current list of extension and annotation entries.
|
|
205
|
+
*
|
|
178
206
|
* @param extension - extension in manifest
|
|
179
207
|
* @param sortedExtensionsArray - sorted array of annotation-based nodes, to be enhanced by extensions
|
|
208
|
+
* @returns Anchor for extension
|
|
180
209
|
*/
|
|
181
210
|
function getExtensionAnchor(extension, sortedExtensionsArray) {
|
|
182
211
|
// Default placement is After
|
|
183
|
-
const placement = extension.position?.placement ||
|
|
212
|
+
const placement = extension.position?.placement || ux_specification_types_2.v4.Placement.After;
|
|
184
213
|
let anchor = extension.position?.anchor;
|
|
185
214
|
if (!anchor) {
|
|
186
215
|
// Simulate runtime behavior - if there no anchor, then logic uses first or last annotation node
|
|
187
216
|
// In some cases last extension can be previously inserted extension - in such case we still need use annotation node
|
|
188
|
-
const index = placement ===
|
|
217
|
+
const index = placement === ux_specification_types_2.v4.Placement.Before ? 0 : sortedExtensionsArray.length - 1;
|
|
189
218
|
anchor = sortedExtensionsArray[index] ? sortedExtensionsArray[index][0] : undefined;
|
|
190
219
|
}
|
|
191
220
|
return anchor;
|
|
192
221
|
}
|
|
193
222
|
/**
|
|
194
|
-
* Preprocesses and returns list of local extension ids that needs to be skipped from addition
|
|
223
|
+
* Preprocesses and returns list of local extension ids that needs to be skipped from addition.
|
|
224
|
+
*
|
|
195
225
|
* @param {CustomExtensions} localExtensions - list of extensions in manifest
|
|
196
226
|
* @param {[string, unknown][]} annotationEntries - sorted array of annotation-based nodes, to be enhanced by extensions
|
|
227
|
+
* @returns List of local extensions that has no annotation based anchor
|
|
197
228
|
*/
|
|
198
229
|
function getLocalExtensionsToSkip(localExtensions, annotationEntries) {
|
|
199
230
|
// collect local extensions that has no annotation based anchor
|
|
@@ -210,14 +241,14 @@ function getLocalExtensionsToSkip(localExtensions, annotationEntries) {
|
|
|
210
241
|
/**
|
|
211
242
|
* Method returns position of passed extension using calculation for merged annotation nodes approach.
|
|
212
243
|
* Currently is used for custom subsections - annotation merges subsection if there is no any child collecation facet.
|
|
244
|
+
*
|
|
213
245
|
* @param extension - custom extension
|
|
214
246
|
* @param extensions - list of extensions in manifest
|
|
215
247
|
* @param sortedExtensionsArray - array of all entries(annotation entries and extensions), to be enhanced
|
|
216
|
-
*
|
|
217
248
|
* @returns Index of extension using merged annotation nodes approach.
|
|
218
249
|
*/
|
|
219
250
|
function getExtensionIndexByMergedApproach(extension, extensions, sortedExtensionsArray) {
|
|
220
|
-
const placement = extension.position?.placement ||
|
|
251
|
+
const placement = extension.position?.placement || ux_specification_types_2.v4.Placement.After;
|
|
221
252
|
const originalAnchor = extension.position?.anchor;
|
|
222
253
|
if (originalAnchor) {
|
|
223
254
|
// Custom extension is anchored to any extension
|
|
@@ -238,7 +269,7 @@ function getExtensionIndexByMergedApproach(extension, extensions, sortedExtensio
|
|
|
238
269
|
return index;
|
|
239
270
|
};
|
|
240
271
|
let index = 0;
|
|
241
|
-
if (placement ===
|
|
272
|
+
if (placement === ux_specification_types_2.v4.Placement.Before) {
|
|
242
273
|
// Special case when no anchor but placement is "Before" - then rendered as very first
|
|
243
274
|
// Find index before first annotation node
|
|
244
275
|
index = findNextIndex(0, (innerExtension) => !innerExtension);
|
|
@@ -247,7 +278,7 @@ function getExtensionIndexByMergedApproach(extension, extensions, sortedExtensio
|
|
|
247
278
|
// Special case when no anchor but placement is "After" - then rendered right after last annotation node
|
|
248
279
|
index = findNextIndex(-1, (innerExtension) => !!(innerExtension &&
|
|
249
280
|
// Ignore extension without anchor but with position "Before"
|
|
250
|
-
(innerExtension?.position?.anchor || innerExtension?.position?.placement !==
|
|
281
|
+
(innerExtension?.position?.anchor || innerExtension?.position?.placement !== ux_specification_types_2.v4.Placement.Before)));
|
|
251
282
|
}
|
|
252
283
|
return index > -1 ? index : 0;
|
|
253
284
|
}
|
|
@@ -258,7 +289,6 @@ function getExtensionIndexByMergedApproach(extension, extensions, sortedExtensio
|
|
|
258
289
|
* @param sortedExtensionsArray - array of all entries(annotation entries and extensions), to be enhanced
|
|
259
290
|
* @param anchor - target anchor to check
|
|
260
291
|
* @param ignoreAnnotationAnchors - calculation should ignore anchors referenced to annotation nodes. Used when annotations sections are merged
|
|
261
|
-
*
|
|
262
292
|
* @returns Index of extension using merged annotation nodes approach.
|
|
263
293
|
*/
|
|
264
294
|
function getExtensionIndex(extension, extensions, sortedExtensionsArray, anchor, ignoreAnnotationAnchors = false) {
|
|
@@ -267,11 +297,16 @@ function getExtensionIndex(extension, extensions, sortedExtensionsArray, anchor,
|
|
|
267
297
|
: getExtensionIndexByMergedApproach(extension, extensions, sortedExtensionsArray);
|
|
268
298
|
}
|
|
269
299
|
/**
|
|
270
|
-
* Error handler for invalid extensions
|
|
300
|
+
* Error handler for invalid extensions.
|
|
301
|
+
*
|
|
271
302
|
* @param logger - logger for error messages
|
|
272
303
|
* @param extensionId - ID of the extension
|
|
273
304
|
* @param sortedExtensionsArray - sorted array of annotation-based nodes, to be enhanced by extensions
|
|
274
305
|
* @param newExtensionReference - schema reference that had been prepared before
|
|
306
|
+
* @param newExtensionReference.$ref - The reference to the schema definition for the new extension.
|
|
307
|
+
* @param newExtensionReference.description - A description of the new extension.
|
|
308
|
+
* @param newExtensionReference.keys - An array of key objects, each containing a name and value for the custom extension.
|
|
309
|
+
* @param newExtensionReference.actionType - The action type associated with the new extension.
|
|
275
310
|
* @param localExtensions - list of extensions for processing
|
|
276
311
|
*/
|
|
277
312
|
function handleInvalidExtension(logger, extensionId, sortedExtensionsArray, newExtensionReference, localExtensions) {
|
|
@@ -279,19 +314,22 @@ function handleInvalidExtension(logger, extensionId, sortedExtensionsArray, newE
|
|
|
279
314
|
severity: "error" /* LogSeverity.Error */,
|
|
280
315
|
message: i18next_1.default.t('INVALIDEXTENSION', { id: extensionId }),
|
|
281
316
|
location: {
|
|
282
|
-
path:
|
|
317
|
+
path: ux_specification_types_2.MANIFESTPATH
|
|
283
318
|
}
|
|
284
319
|
});
|
|
285
320
|
sortedExtensionsArray.push([extensionId, newExtensionReference]);
|
|
286
321
|
delete localExtensions[extensionId];
|
|
287
322
|
}
|
|
288
323
|
/**
|
|
289
|
-
* Adds extension at the right position of the sorted array of annotation-based nodes
|
|
324
|
+
* Adds extension at the right position of the sorted array of annotation-based nodes.
|
|
325
|
+
*
|
|
290
326
|
* @param extensions - list of extensions in manifest
|
|
291
327
|
* @param sortedExtensionsArray - sorted array of annotation-based nodes, to be enhanced by extensions
|
|
292
328
|
* @param extensionDefinitionName - extension definition name, different in LR and OP
|
|
329
|
+
* @param templatePropertyName - The name of the property in the template to be used for processing.
|
|
293
330
|
* @param logger - logger for error messages
|
|
294
331
|
* @param ignoreAnnotationAnchors - calculation should ignore anchors referenced to annotation nodes. Used when annotations sections are merged.
|
|
332
|
+
* @returns Sorted array of annotation-based nodes, enhanced by extensions
|
|
295
333
|
*/
|
|
296
334
|
function addExtensionToArray(extensions, sortedExtensionsArray, extensionDefinitionName, templatePropertyName = 'template', logger, ignoreAnnotationAnchors = false) {
|
|
297
335
|
const annotationEntries = [...sortedExtensionsArray];
|
|
@@ -305,7 +343,7 @@ function addExtensionToArray(extensions, sortedExtensionsArray, extensionDefinit
|
|
|
305
343
|
if (localExtensionsToSkip?.includes(extensionId)) {
|
|
306
344
|
continue;
|
|
307
345
|
}
|
|
308
|
-
const newExtensionReference = getExtensionDetails(extension, extensionDefinitionName, extensionId,
|
|
346
|
+
const newExtensionReference = getExtensionDetails(extension, extensionDefinitionName, extensionId, ux_specification_types_2.ActionType.Custom);
|
|
309
347
|
if (typeof extension !== 'object') {
|
|
310
348
|
handleInvalidExtension(logger, extensionId, sortedExtensionsArray, newExtensionReference, localExtensions);
|
|
311
349
|
continue;
|
|
@@ -336,7 +374,8 @@ function addExtensionToArray(extensions, sortedExtensionsArray, extensionDefinit
|
|
|
336
374
|
return sortedExtensionsArray;
|
|
337
375
|
}
|
|
338
376
|
/**
|
|
339
|
-
* Adds enum values to the properties definition of a custom column
|
|
377
|
+
* Adds enum values to the properties definition of a custom column.
|
|
378
|
+
*
|
|
340
379
|
* @param lineItems - current lineItems definition, with all records
|
|
341
380
|
* @param customColumnDefinition - current custom column definition, in the app schema
|
|
342
381
|
*/
|
|
@@ -350,16 +389,16 @@ function addEnumForProperties(lineItems, customColumnDefinition) {
|
|
|
350
389
|
customColumnDefinition.properties.properties.items['enum'] = columnEnum;
|
|
351
390
|
}
|
|
352
391
|
/**
|
|
353
|
-
* Adds the propertyIndex to each column and adds the enum values for properties of custom columns
|
|
392
|
+
* Adds the propertyIndex to each column and adds the enum values for properties of custom columns.
|
|
393
|
+
*
|
|
354
394
|
* @param sortedColumnsArray - sorted array of all columns
|
|
355
395
|
* @param {Definition} appSchema - app specific JSON schema
|
|
356
396
|
* @param lineItems - content of the line item annotation
|
|
357
397
|
* @param {DefinitionName} customColumnDefinitionName - custom column definition name, distinguishes LR from OP
|
|
358
|
-
*
|
|
359
398
|
*/
|
|
360
|
-
function addColumnPropertyIndexAndEnum(sortedColumnsArray, appSchema, lineItems, customColumnDefinitionName =
|
|
361
|
-
if (customColumnDefinitionName ===
|
|
362
|
-
customColumnDefinitionName.indexOf(
|
|
399
|
+
function addColumnPropertyIndexAndEnum(sortedColumnsArray, appSchema, lineItems, customColumnDefinitionName = ux_specification_types_2.DefinitionName.CustomColumn) {
|
|
400
|
+
if (customColumnDefinitionName === ux_specification_types_2.DefinitionName.CustomColumn ||
|
|
401
|
+
customColumnDefinitionName.indexOf(ux_specification_types_2.DefinitionName.ViewCustomColumn) > -1) {
|
|
363
402
|
//Table custom column: Add enum for properties
|
|
364
403
|
const customColumnDefinition = appSchema.definitions[customColumnDefinitionName];
|
|
365
404
|
addEnumForProperties(lineItems, customColumnDefinition);
|
|
@@ -367,11 +406,12 @@ function addColumnPropertyIndexAndEnum(sortedColumnsArray, appSchema, lineItems,
|
|
|
367
406
|
//Add property index
|
|
368
407
|
for (let index = 0; index < sortedColumnsArray.length; index++) {
|
|
369
408
|
const column = sortedColumnsArray[index][1];
|
|
370
|
-
column[
|
|
409
|
+
column[ux_specification_types_2.SchemaTag.propertyIndex] = index;
|
|
371
410
|
}
|
|
372
411
|
}
|
|
373
412
|
/**
|
|
374
|
-
* Common function for enhancing the LineItems definition of app schema by custom columns
|
|
413
|
+
* Common function for enhancing the LineItems definition of app schema by custom columns.
|
|
414
|
+
*
|
|
375
415
|
* @param appSchema - app-specific JSON schema
|
|
376
416
|
* @param v4Page - actual page in the manifest
|
|
377
417
|
* @param logger - logger for error messages
|
|
@@ -379,8 +419,8 @@ function addColumnPropertyIndexAndEnum(sortedColumnsArray, appSchema, lineItems,
|
|
|
379
419
|
* @param sectionId - identifier of the current object page section in schema
|
|
380
420
|
* @param sectionIdInManifest - identifier of the current object page section in manifest
|
|
381
421
|
*/
|
|
382
|
-
function addCustomColumnDefinition(appSchema, v4Page, logger, customColumnDefinitionName =
|
|
383
|
-
const lineItemId = sectionId ||
|
|
422
|
+
function addCustomColumnDefinition(appSchema, v4Page, logger, customColumnDefinitionName = ux_specification_types_2.DefinitionName.CustomColumn, sectionId, sectionIdInManifest) {
|
|
423
|
+
const lineItemId = sectionId || ux_specification_types_2.DefinitionName.LineItems;
|
|
384
424
|
const lineItems = appSchema.definitions[lineItemId];
|
|
385
425
|
if (!lineItems) {
|
|
386
426
|
return;
|
|
@@ -399,113 +439,183 @@ function addCustomColumnDefinition(appSchema, v4Page, logger, customColumnDefini
|
|
|
399
439
|
appSchema.definitions[lineItemId].properties = sortedColumnsAsObject;
|
|
400
440
|
}
|
|
401
441
|
/**
|
|
402
|
-
* Determines the name
|
|
403
|
-
* @param {LineItemDataForSchema} data - data of the the LineItem
|
|
442
|
+
* Determines the appropriate action definition name based on the provided line item data and record type.
|
|
404
443
|
*
|
|
405
|
-
* @
|
|
444
|
+
* @param {LineItemDataForSchema} data - The schema data for the line item, including its identifier and metadata.
|
|
445
|
+
* @param {DataFieldAbstractTypes} lineItemRecord - The record representing a data field or action within the line item.
|
|
446
|
+
* @returns {DefinitionName} The determined action definition name based on the provided data and group type.
|
|
406
447
|
*/
|
|
407
|
-
function determineActionDefinitionName(data) {
|
|
448
|
+
function determineActionDefinitionName(data, lineItemRecord) {
|
|
449
|
+
const isGrouped = lineItemRecord.$Type === "com.sap.vocabularies.UI.v1.DataFieldForActionGroup" /* UIAnnotationTypes.DataFieldForActionGroup */;
|
|
408
450
|
let actionDefinitionName;
|
|
409
|
-
if (data.lineItemId.startsWith(
|
|
410
|
-
actionDefinitionName =
|
|
451
|
+
if (data.lineItemId.startsWith(ux_specification_types_2.DefinitionName.LineItemsOfView)) {
|
|
452
|
+
actionDefinitionName = isGrouped ? ux_specification_types_2.DefinitionName.ViewToolBarActionGroup : ux_specification_types_2.DefinitionName.ViewToolBarAction;
|
|
411
453
|
}
|
|
412
|
-
else if (data.lineItemId.startsWith(
|
|
413
|
-
actionDefinitionName =
|
|
454
|
+
else if (data.lineItemId.startsWith(ux_specification_types_2.DefinitionName.LineItems)) {
|
|
455
|
+
actionDefinitionName = isGrouped ? ux_specification_types_2.DefinitionName.ToolBarActionGroup : ux_specification_types_2.DefinitionName.ToolBarAction;
|
|
414
456
|
}
|
|
415
457
|
else {
|
|
416
|
-
actionDefinitionName =
|
|
458
|
+
actionDefinitionName = isGrouped
|
|
459
|
+
? ux_specification_types_2.DefinitionName.ObjectPageToolBarActionGroup
|
|
460
|
+
: ux_specification_types_2.DefinitionName.ObjectPageToolBarAction;
|
|
417
461
|
}
|
|
418
462
|
return actionDefinitionName;
|
|
419
463
|
}
|
|
420
464
|
/**
|
|
421
|
-
* Adds the schema tags 'keys' and 'target' to the schema definition of an action
|
|
465
|
+
* Adds the schema tags 'keys' and 'target' to the schema definition of an action.
|
|
466
|
+
*
|
|
422
467
|
* @param {SchemaDefinition} actionDefinition - current action definition in the app schema
|
|
423
468
|
* @param {DataFieldForActionAbstractTypes} lineItemRecord - actual record of the line item collection
|
|
424
469
|
* @param {string} actionId - ID of the action, according to the lineItem definition
|
|
425
470
|
*/
|
|
426
471
|
function addTargetAndKeysOfAction(actionDefinition, lineItemRecord, actionId) {
|
|
427
|
-
actionDefinition[
|
|
428
|
-
if (lineItemRecord[
|
|
429
|
-
actionDefinition[
|
|
430
|
-
name:
|
|
431
|
-
value: lineItemRecord[
|
|
472
|
+
actionDefinition[ux_specification_types_2.SchemaTag.keys] = [];
|
|
473
|
+
if (lineItemRecord[ux_specification_types_2.SchemaKeyName.semanticObject]) {
|
|
474
|
+
actionDefinition[ux_specification_types_2.SchemaTag.keys].push({
|
|
475
|
+
name: ux_specification_types_2.SchemaKeyName.semanticObject,
|
|
476
|
+
value: lineItemRecord[ux_specification_types_2.SchemaKeyName.semanticObject]
|
|
432
477
|
});
|
|
433
478
|
}
|
|
434
479
|
const { key, ns } = (0, common_1.getActionKey)(actionId, true);
|
|
435
|
-
actionDefinition[
|
|
480
|
+
actionDefinition[ux_specification_types_2.SchemaTag.keys].push({ name: ux_specification_types_2.SchemaKeyName.action, value: key });
|
|
436
481
|
if (ns) {
|
|
437
|
-
actionDefinition[
|
|
482
|
+
actionDefinition[ux_specification_types_2.SchemaTag.target] = ns;
|
|
438
483
|
}
|
|
439
484
|
}
|
|
440
485
|
/**
|
|
441
|
-
*
|
|
442
|
-
*
|
|
443
|
-
*
|
|
444
|
-
* @param {
|
|
445
|
-
* @param {
|
|
446
|
-
* @
|
|
447
|
-
* @param {boolean} createRef - defines whether the $ref attribute should be created for the action
|
|
486
|
+
* Adds an action record to a schema definition based on the provided line item definition parameters.
|
|
487
|
+
* This involves defining action-specific properties, references, and metadata, and updating the schema accordingly.
|
|
488
|
+
*
|
|
489
|
+
* @param {AddLineItemDefinitionParams} lineItemDefinitionParams - The parameters describing the line item definition, including data, actions, path, record, and index.
|
|
490
|
+
* @param {boolean} [createRef] - A flag indicating whether to create a reference for the action definition.
|
|
491
|
+
* @returns {void} This function does not return a value.
|
|
448
492
|
*/
|
|
449
|
-
function addActionRecordToSchema(
|
|
493
|
+
function addActionRecordToSchema(lineItemDefinitionParams, createRef = true) {
|
|
494
|
+
const { lineItemData: data, actions: actionsDefinition, lineItemPath, lineItemRecord, index: recordIndex } = lineItemDefinitionParams;
|
|
450
495
|
// Action but not inline action
|
|
451
496
|
if (lineItemRecord.Determining === true) {
|
|
452
497
|
return;
|
|
453
498
|
}
|
|
454
499
|
//no footer bar -> toolbar action
|
|
455
|
-
const actionDefinitionName = determineActionDefinitionName(data);
|
|
456
|
-
const description = (0,
|
|
457
|
-
const prefix = lineItemRecord.$Type.split(`${
|
|
500
|
+
const actionDefinitionName = determineActionDefinitionName(data, lineItemRecord);
|
|
501
|
+
const description = (0, common_1.getDataFieldDescription)(lineItemRecord, data.entityType);
|
|
502
|
+
const prefix = lineItemRecord.$Type.split(`${ux_specification_types_2.UIVOCABULARY}.`)[1];
|
|
458
503
|
const actionId = typeof lineItemRecord.Action === 'string' ? lineItemRecord.Action : lineItemRecord.Action['path'];
|
|
459
504
|
const propertyKey = (0, StableIdHelper_1.replaceSpecialChars)(actionId);
|
|
460
505
|
const actionDefinition = (actionsDefinition.properties[`${prefix}::${propertyKey}`] = {
|
|
461
506
|
description
|
|
462
507
|
});
|
|
463
508
|
if (createRef) {
|
|
464
|
-
actionDefinition.$ref = (0, common_1.
|
|
509
|
+
actionDefinition.$ref = (0, common_1.getUniqueFacetDefinitionLink)(actionDefinitionName, (0, common_1.prepareRef)(propertyKey), data.appSchema, lineItemPath);
|
|
465
510
|
}
|
|
466
511
|
else {
|
|
467
512
|
actionDefinition.properties = {};
|
|
468
513
|
actionDefinition.type = 'object';
|
|
469
514
|
actionDefinition.isViewNode = true;
|
|
470
515
|
}
|
|
471
|
-
actionDefinition[
|
|
472
|
-
actionDefinition[
|
|
516
|
+
actionDefinition[ux_specification_types_2.SchemaTag.propertyIndex] = recordIndex;
|
|
517
|
+
actionDefinition[ux_specification_types_2.SchemaTag.dataType] = (0, common_1.determineDataType)(lineItemRecord);
|
|
473
518
|
//keys
|
|
474
519
|
addTargetAndKeysOfAction(actionDefinition, lineItemRecord, actionId);
|
|
475
|
-
actionDefinition[
|
|
520
|
+
actionDefinition[ux_specification_types_2.SchemaTag.annotationType] = lineItemRecord.$Type;
|
|
476
521
|
if (createRef) {
|
|
477
|
-
|
|
478
|
-
|
|
522
|
+
// Using previously computed ref instead of generating new one to support action duplication
|
|
523
|
+
const previouslyComputedRef = actionDefinition.$ref.replace(utils_1.DEFINITION_LINK_PREFIX, '');
|
|
524
|
+
const action = (0, common_1.parseSchemaDefinition)(actionDefinitionName, previouslyComputedRef, data.appSchema, false);
|
|
525
|
+
action[ux_specification_types_2.SchemaTag.annotationPath] = `${lineItemPath}/${recordIndex}`;
|
|
479
526
|
}
|
|
480
527
|
else {
|
|
481
|
-
actionDefinition[
|
|
528
|
+
actionDefinition[ux_specification_types_2.SchemaTag.annotationPath] = `${lineItemPath}/${recordIndex}`;
|
|
482
529
|
}
|
|
483
530
|
}
|
|
484
531
|
/**
|
|
485
|
-
*
|
|
486
|
-
*
|
|
487
|
-
*
|
|
488
|
-
* {
|
|
489
|
-
* @param {
|
|
490
|
-
* @
|
|
491
|
-
|
|
532
|
+
* Adds a group action record to the schema based on the given parameters. This involves determining
|
|
533
|
+
* action definitions, creating or referencing schema properties, and setting metadata fields.
|
|
534
|
+
*
|
|
535
|
+
* @param {AddLineItemDefinitionParams} lineItemDefinitionParams - Parameters that define the line item, including data, record, path, index, and actions.
|
|
536
|
+
* @param {boolean} [createRef] - Indicates whether to create a reference for the action definition or to use an inline object.
|
|
537
|
+
* @returns {void} - Does not return any value.
|
|
538
|
+
*/
|
|
539
|
+
function addGroupActionRecordToSchema(lineItemDefinitionParams, createRef = true) {
|
|
540
|
+
const { lineItemData, lineItemRecord, lineItemPath, index, actions } = lineItemDefinitionParams;
|
|
541
|
+
//no footer bar -> toolbar action
|
|
542
|
+
const actionDefinitionName = determineActionDefinitionName(lineItemData, lineItemRecord);
|
|
543
|
+
const propertyKey = (0, StableIdHelper_1.getStableIdPartFromDataField)(lineItemRecord);
|
|
544
|
+
let actionDefinition = {};
|
|
545
|
+
if (createRef) {
|
|
546
|
+
actions.properties[`${propertyKey}`] = {
|
|
547
|
+
$ref: (0, common_1.getFacetDefinitionLink)(actionDefinitionName, (0, common_1.prepareRef)(propertyKey))
|
|
548
|
+
};
|
|
549
|
+
actionDefinition = (0, common_1.parseSchemaDefinition)(actionDefinitionName, (0, common_1.prepareRef)(propertyKey), lineItemData.appSchema);
|
|
550
|
+
}
|
|
551
|
+
else {
|
|
552
|
+
actions.properties[`${propertyKey}`] = actionDefinition;
|
|
553
|
+
}
|
|
554
|
+
// add a warning message for all versions that don't support action groups
|
|
555
|
+
(0, common_1.addMessageToSchema)(actionDefinition, i18next_1.default.t('ACTION_GROUPS_ARENT_SUPPORTED'));
|
|
556
|
+
actionDefinition.properties = {};
|
|
557
|
+
actionDefinition.description = (0, common_1.getDataFieldDescription)(lineItemRecord, lineItemData.entityType);
|
|
558
|
+
actionDefinition.type = 'object';
|
|
559
|
+
actionDefinition.isViewNode = true;
|
|
560
|
+
actionDefinition[ux_specification_types_2.SchemaTag.propertyIndex] = index;
|
|
561
|
+
actionDefinition[ux_specification_types_2.SchemaTag.dataType] = (0, common_1.determineDataType)(lineItemRecord);
|
|
562
|
+
actionDefinition[ux_specification_types_2.SchemaTag.annotationPath] = `${lineItemPath}/${index}`;
|
|
563
|
+
(lineItemRecord['Actions'] ?? []).forEach((action, index) => {
|
|
564
|
+
const lineItemActionDefinitionParams = {
|
|
565
|
+
...lineItemDefinitionParams,
|
|
566
|
+
lineItemRecord: action,
|
|
567
|
+
lineItemPath: `${actionDefinition[ux_specification_types_2.SchemaTag.annotationPath]}/Actions`,
|
|
568
|
+
actions: actionDefinition,
|
|
569
|
+
index
|
|
570
|
+
};
|
|
571
|
+
addActionRecordToSchema(lineItemActionDefinitionParams, createRef);
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Adds a line item action definition to the schema based on the provided parameters.
|
|
576
|
+
* Handles determining which action to take based on specific conditions of the line item record.
|
|
577
|
+
*
|
|
578
|
+
* @param {AddLineItemDefinitionParams} data - An object containing the details of the line item record and the line item definition.
|
|
579
|
+
* @param {object} data.lineItemRecord - The record of the line item to be processed, containing relevant properties.
|
|
580
|
+
* @param {boolean} data.lineItemRecord.Inline - Indicates whether the line item is inline.
|
|
581
|
+
* @param {boolean} data.lineItemRecord.Determining - Indicates if the line item is determining.
|
|
582
|
+
* @param {boolean} data.lineItemDefinition - Indicates whether the line item definition is present.
|
|
583
|
+
* @returns {void} This method does not return a value.
|
|
492
584
|
*/
|
|
493
|
-
function
|
|
494
|
-
const
|
|
495
|
-
|
|
585
|
+
function addLineItemActionDefinition(data) {
|
|
586
|
+
const { lineItemRecord, lineItemDefinition } = data;
|
|
587
|
+
if (lineItemRecord.Inline !== true || lineItemRecord.Determining === true) {
|
|
588
|
+
addActionRecordToSchema(data, !lineItemDefinition);
|
|
589
|
+
}
|
|
590
|
+
else {
|
|
591
|
+
addLineItemRecordToSchema(data);
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
/**
|
|
595
|
+
* Adds a line item record to the provided schema based on the definition parameters.
|
|
596
|
+
*
|
|
597
|
+
* @param {AddLineItemDefinitionParams} lineItemDefinitionParams - The parameters defining the line item data, schema information, and record.
|
|
598
|
+
* @returns {void} This function does not return a value.
|
|
599
|
+
*/
|
|
600
|
+
function addLineItemRecordToSchema(lineItemDefinitionParams) {
|
|
601
|
+
const { lineItemData, lineItemRecord, lineItemDefinition, lineItemPath, index, columnDefinitionName } = lineItemDefinitionParams;
|
|
602
|
+
const columnDefinition = lineItemRecord.$Type === "com.sap.vocabularies.UI.v1.DataFieldForAction" /* UIAnnotationTypes.DataFieldForAction */
|
|
603
|
+
? `${columnDefinitionName}Action`
|
|
604
|
+
: columnDefinitionName;
|
|
605
|
+
const lineItemId = lineItemData.lineItemId;
|
|
496
606
|
if (lineItemRecord['Target']?.['value']) {
|
|
497
|
-
const regex = `@${(0, utils_1.findAlias)(
|
|
607
|
+
const regex = `@${(0, utils_1.findAlias)(ux_specification_types_2.UIVOCABULARY, lineItemData.oDataServiceAVT)}.`;
|
|
498
608
|
lineItemRecord['Target']['value'] = lineItemRecord['Target']['value'].replace(regex, '@');
|
|
499
609
|
}
|
|
500
610
|
const schemaKey = (0, StableIdHelper_1.getStableIdPartFromDataField)(lineItemRecord).replace(/\//g, '::');
|
|
501
611
|
if (schemaKey) {
|
|
502
612
|
let columnsDefinition = lineItemDefinition;
|
|
503
613
|
if (!columnsDefinition) {
|
|
504
|
-
columnsDefinition =
|
|
614
|
+
columnsDefinition = lineItemData.appSchema.definitions[lineItemId];
|
|
505
615
|
}
|
|
506
616
|
const properties = columnsDefinition.properties;
|
|
507
617
|
const property = {
|
|
508
|
-
description: (0,
|
|
618
|
+
description: (0, common_1.getDataFieldDescription)(lineItemRecord, lineItemData.entityType)
|
|
509
619
|
};
|
|
510
620
|
if (lineItemDefinition) {
|
|
511
621
|
property.properties = {};
|
|
@@ -513,19 +623,20 @@ function addLineItemRecordToSchema(data, lineItem, columnDefinitionName, recordI
|
|
|
513
623
|
property.isViewNode = true;
|
|
514
624
|
}
|
|
515
625
|
else {
|
|
516
|
-
property.$ref = utils_1.DEFINITION_LINK_PREFIX +
|
|
626
|
+
property.$ref = utils_1.DEFINITION_LINK_PREFIX + columnDefinition;
|
|
517
627
|
}
|
|
518
|
-
property[
|
|
519
|
-
property[
|
|
520
|
-
property[
|
|
521
|
-
property[
|
|
628
|
+
property[ux_specification_types_2.SchemaTag.annotationType] = lineItemRecord?.$Type;
|
|
629
|
+
property[ux_specification_types_2.SchemaTag.annotationPath] = `${lineItemPath}/${index}`;
|
|
630
|
+
property[ux_specification_types_2.SchemaTag.propertyIndex] = index;
|
|
631
|
+
property[ux_specification_types_2.SchemaTag.dataType] = (0, common_1.determineDataType)(lineItemRecord);
|
|
522
632
|
properties[schemaKey] = property;
|
|
523
633
|
(0, common_1.addKeyToDefinition)(lineItemRecord, properties, schemaKey);
|
|
524
634
|
}
|
|
525
635
|
}
|
|
526
636
|
/**
|
|
527
|
-
* Appends line item columns and actions to the app schema (for the list report, custom page or an object page section comprising a table)
|
|
528
|
-
*
|
|
637
|
+
* Appends line item columns and actions to the app schema (for the list report, custom page or an object page section comprising a table).
|
|
638
|
+
*
|
|
639
|
+
* @param {LineItemDataForSchema} data structure comprising
|
|
529
640
|
* - appSchema - the app specific schema that shall get enhanced
|
|
530
641
|
* - lineItemAnnotation - the UI.LineItem annotation, comprising all records
|
|
531
642
|
* - entityType - the entity type as part of the AVT ConvertedMetadata
|
|
@@ -537,30 +648,30 @@ function addLineItemRecordToSchema(data, lineItem, columnDefinitionName, recordI
|
|
|
537
648
|
* @param {Definition | undefined} lineItemDefinition - line item definition
|
|
538
649
|
* @param {string} columnDefinitionName - line item definition name
|
|
539
650
|
*/
|
|
540
|
-
function appendLineItemsToSchema(data, actions, lineItemPath, lineItemDefinition, columnDefinitionName =
|
|
651
|
+
function appendLineItemsToSchema(data, actions, lineItemPath, lineItemDefinition, columnDefinitionName = ux_specification_types_2.DefinitionName.TableColumn) {
|
|
541
652
|
if (!data.lineItemAnnotation) {
|
|
542
653
|
return;
|
|
543
654
|
}
|
|
544
655
|
let i = 0;
|
|
545
656
|
data.lineItemAnnotation.forEach((lineItemRecord) => {
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
}
|
|
657
|
+
const addLineItemDefinitionsParams = {
|
|
658
|
+
lineItemData: data,
|
|
659
|
+
actions,
|
|
660
|
+
lineItemPath,
|
|
661
|
+
lineItemRecord: lineItemRecord,
|
|
662
|
+
index: i,
|
|
663
|
+
lineItemDefinition,
|
|
664
|
+
columnDefinitionName
|
|
665
|
+
};
|
|
666
|
+
const strategy = DataFieldStrategy_1.dataFieldStrategyContext.getStrategy(lineItemRecord.$Type);
|
|
667
|
+
strategy.addLineItemDefinition(addLineItemDefinitionsParams);
|
|
558
668
|
i++;
|
|
559
669
|
});
|
|
560
670
|
}
|
|
561
671
|
/**
|
|
562
|
-
* Adds the line item definition, columns and actions to the app schema (for the list report, custom page or an object page section comprising a table
|
|
563
|
-
*
|
|
672
|
+
* Adds the line item definition, columns and actions to the app schema (for the list report, custom page or an object page section comprising a table.
|
|
673
|
+
*
|
|
674
|
+
* @param data structure comprising
|
|
564
675
|
* - isObjectPage - indicates that the page is an object page
|
|
565
676
|
* - appSchema - the app specific schema that shall get enhanced
|
|
566
677
|
* - lineItemAnnotation - the UI.LineItem annotation, comprising all records
|
|
@@ -568,23 +679,24 @@ function appendLineItemsToSchema(data, actions, lineItemPath, lineItemDefinition
|
|
|
568
679
|
* - oDataServiceAVT - complete service information, as returned by Annotation Vocabularies Tool
|
|
569
680
|
* - lineItemId - in case of OP the parameter must be passed to distinguish the OP tables;
|
|
570
681
|
* in case of LR or ALP 'LineItems' is passed.
|
|
571
|
-
* @param
|
|
572
|
-
* @param
|
|
573
|
-
* @param
|
|
682
|
+
* @param columnDefinitionName - name of the column definition, i.e. TableColumn or ObjectPageTableColumn
|
|
683
|
+
* @param customColumnDefinitionName - name of the custom column definition
|
|
684
|
+
* @param customActionDefinitionName - name of the custom action definition
|
|
574
685
|
*/
|
|
575
|
-
function addLineItemsTypeToSchema(data, columnDefinitionName =
|
|
686
|
+
function addLineItemsTypeToSchema(data, columnDefinitionName = ux_specification_types_2.DefinitionName.TableColumn, customColumnDefinitionName = ux_specification_types_2.DefinitionName.CustomColumn, customActionDefinitionName = ux_specification_types_2.DefinitionName.CustomTableAction) {
|
|
576
687
|
const { actions, lineItemPath } = (0, common_1.addCommonLineItemDefinitions)(data.isObjectPage, data.appSchema, data.lineItemAnnotation, data.entityType, data.lineItemId, customColumnDefinitionName, customActionDefinitionName);
|
|
577
688
|
appendLineItemsToSchema(data, actions, lineItemPath, undefined, columnDefinitionName);
|
|
578
689
|
}
|
|
579
690
|
/**
|
|
580
|
-
* Adds an enum or value help to position > anchor of custom column
|
|
691
|
+
* Adds an enum or value help to position > anchor of custom column.
|
|
692
|
+
*
|
|
581
693
|
* @param appSchema - app specific JSON schema
|
|
582
694
|
* @param lineItemId - ID of the current line item in schema
|
|
583
695
|
* @param v4Page - current page in manifest
|
|
584
696
|
* @param positionName - ID of the definition of custom column position in schema
|
|
585
697
|
* @param sectionIdInManifest - identifier of the current object page section in manifest
|
|
586
698
|
*/
|
|
587
|
-
function addFragmentEnumForAnchor(appSchema, lineItemId, v4Page, positionName =
|
|
699
|
+
function addFragmentEnumForAnchor(appSchema, lineItemId, v4Page, positionName = ux_specification_types_2.DefinitionName.Position, sectionIdInManifest) {
|
|
588
700
|
const columns = appSchema.definitions[lineItemId]?.properties;
|
|
589
701
|
const enumEntries = [];
|
|
590
702
|
if (columns) {
|
|
@@ -594,7 +706,7 @@ function addFragmentEnumForAnchor(appSchema, lineItemId, v4Page, positionName =
|
|
|
594
706
|
}
|
|
595
707
|
}
|
|
596
708
|
}
|
|
597
|
-
const id = lineItemId !==
|
|
709
|
+
const id = lineItemId !== ux_specification_types_2.DefinitionName.LineItems ? sectionIdInManifest : `@${"com.sap.vocabularies.UI.v1.LineItem" /* UIAnnotationTerms.LineItem */}`;
|
|
598
710
|
const columnsInManifest = v4Page.options?.settings?.controlConfiguration?.[id]?.['columns'];
|
|
599
711
|
if (columnsInManifest) {
|
|
600
712
|
for (const key in columnsInManifest) {
|
|
@@ -609,12 +721,13 @@ function addFragmentEnumForAnchor(appSchema, lineItemId, v4Page, positionName =
|
|
|
609
721
|
}
|
|
610
722
|
}
|
|
611
723
|
/**
|
|
612
|
-
* Adds an enum or value help to position > anchor of custom column or custom action
|
|
724
|
+
* Adds an enum or value help to position > anchor of custom column or custom action.
|
|
725
|
+
*
|
|
613
726
|
* @param appSchema - app specific JSON schema
|
|
614
727
|
* @param definitionId - definition key of actions
|
|
615
728
|
* @param positionName - target definition to update
|
|
616
729
|
*/
|
|
617
|
-
function addEnumForActionAnchor(appSchema, definitionId, positionName =
|
|
730
|
+
function addEnumForActionAnchor(appSchema, definitionId, positionName = ux_specification_types_2.DefinitionName.CustomActionPosition) {
|
|
618
731
|
(0, common_1.addDescriptiveEnumDefinition)(appSchema, appSchema.definitions[definitionId], {
|
|
619
732
|
definition: positionName,
|
|
620
733
|
property: 'anchor'
|
|
@@ -623,20 +736,23 @@ function addEnumForActionAnchor(appSchema, definitionId, positionName = ux_speci
|
|
|
623
736
|
});
|
|
624
737
|
}
|
|
625
738
|
/**
|
|
626
|
-
* Find the relevant V4 page under the routing targets of manifest,json
|
|
739
|
+
* Find the relevant V4 page under the routing targets of manifest,json.
|
|
740
|
+
*
|
|
627
741
|
* @param pages - list of all pages in manifest
|
|
628
|
-
* @param
|
|
742
|
+
* @param templateName - search criterion: template name
|
|
629
743
|
* @param entitySet - search criterion: entity set object from AVT
|
|
630
744
|
* @param contextPath - search criterion: contextPath
|
|
631
745
|
* @returns the page definition in manifest (if found)
|
|
632
746
|
*/
|
|
633
|
-
function findPageV4(pages,
|
|
747
|
+
function findPageV4(pages, templateName, entitySet, contextPath) {
|
|
634
748
|
let v4Page;
|
|
635
749
|
for (const i in pages) {
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
(
|
|
639
|
-
|
|
750
|
+
const pageSettings = pages[i].options?.settings || {};
|
|
751
|
+
const isConnectionMatches = (contextPath && pageSettings.contextPath === contextPath) ||
|
|
752
|
+
(entitySet?.name && pageSettings.entitySet === entitySet.name);
|
|
753
|
+
if (isConnectionMatches &&
|
|
754
|
+
((0, common_1.compareTemplateNames)(templateName, pages[i].name) ||
|
|
755
|
+
(templateName === ux_specification_types_2.v4.FE_TEMPLATE_V4_ALP && pages[i].name === ux_specification_types_2.v4.FE_TEMPLATE_V4_LIST_REPORT))) {
|
|
640
756
|
v4Page = pages[i];
|
|
641
757
|
break;
|
|
642
758
|
}
|
|
@@ -644,35 +760,37 @@ function findPageV4(pages, pageName, entitySet, contextPath) {
|
|
|
644
760
|
return v4Page;
|
|
645
761
|
}
|
|
646
762
|
/**
|
|
647
|
-
* Depending on the template type, strip down the app schema so that only the relevant views are part of it
|
|
763
|
+
* Depending on the template type, strip down the app schema so that only the relevant views are part of it.
|
|
764
|
+
*
|
|
648
765
|
* @param {Definition} appSchema - app specific JSON schema, to be adjusted
|
|
649
766
|
* @param {GenerateAppSchemaParameters} generateParameters - object comprising all input parameters
|
|
650
767
|
* @returns the right definition name for the table in the schema
|
|
651
768
|
*/
|
|
652
769
|
function alignSchemaWithTemplateType(appSchema, generateParameters) {
|
|
653
770
|
let tableDefinitionName;
|
|
654
|
-
const tableDefinition = appSchema.properties[
|
|
655
|
-
if (generateParameters.templateType ===
|
|
656
|
-
tableDefinitionName =
|
|
771
|
+
const tableDefinition = appSchema.properties[ux_specification_types_2.PropertyName.table];
|
|
772
|
+
if (generateParameters.templateType === ux_specification_types_2.TemplateType.AnalyticalListPageV4) {
|
|
773
|
+
tableDefinitionName = ux_specification_types_2.DefinitionName.ALPTableView;
|
|
657
774
|
delete tableDefinition.anyOf;
|
|
658
|
-
tableDefinition.$ref = `${utils_1.DEFINITION_LINK_PREFIX}${
|
|
659
|
-
delete appSchema.definitions[
|
|
660
|
-
delete appSchema.definitions[
|
|
661
|
-
delete appSchema.definitions[
|
|
662
|
-
delete appSchema.definitions[
|
|
663
|
-
}
|
|
664
|
-
else if (generateParameters.templateType ===
|
|
665
|
-
tableDefinitionName =
|
|
775
|
+
tableDefinition.$ref = `${utils_1.DEFINITION_LINK_PREFIX}${ux_specification_types_2.DefinitionName.ALPTableView}`;
|
|
776
|
+
delete appSchema.definitions[ux_specification_types_2.DefinitionName.Table];
|
|
777
|
+
delete appSchema.definitions[ux_specification_types_2.DefinitionName.LRChartView];
|
|
778
|
+
delete appSchema.definitions[ux_specification_types_2.DefinitionName.LRTableView];
|
|
779
|
+
delete appSchema.definitions[ux_specification_types_2.DefinitionName.MultiTableModeV4];
|
|
780
|
+
}
|
|
781
|
+
else if (generateParameters.templateType === ux_specification_types_2.TemplateType.ListReportObjectPageV4) {
|
|
782
|
+
tableDefinitionName = ux_specification_types_2.DefinitionName.Table;
|
|
666
783
|
delete tableDefinition.anyOf;
|
|
667
|
-
tableDefinition.$ref = `${utils_1.DEFINITION_LINK_PREFIX}${
|
|
668
|
-
appSchema.definitions[tableDefinitionName].properties[
|
|
669
|
-
delete appSchema.definitions[
|
|
670
|
-
appSchema.properties[
|
|
784
|
+
tableDefinition.$ref = `${utils_1.DEFINITION_LINK_PREFIX}${ux_specification_types_2.DefinitionName.Table}`;
|
|
785
|
+
appSchema.definitions[tableDefinitionName].properties[ux_specification_types_2.PropertyName.annotationPath][ux_specification_types_2.SchemaTag.hidden] = true;
|
|
786
|
+
delete appSchema.definitions[ux_specification_types_2.DefinitionName.ALPTableView];
|
|
787
|
+
appSchema.properties[ux_specification_types_2.PropertyName.defaultPath][ux_specification_types_2.SchemaTag.hidden] = true;
|
|
671
788
|
}
|
|
672
789
|
return tableDefinitionName;
|
|
673
790
|
}
|
|
674
791
|
/**
|
|
675
|
-
* Common function for enhancing LineItems, FieldGroups and Custom Section definitions of app schema by custom action definitions
|
|
792
|
+
* Common function for enhancing LineItems, FieldGroups and Custom Section definitions of app schema by custom action definitions.
|
|
793
|
+
*
|
|
676
794
|
* @param appSchema - app-specific JSON schema
|
|
677
795
|
* @param v4Page - actual page in the manifest
|
|
678
796
|
* @param logger - logger for error messages
|
|
@@ -680,7 +798,7 @@ function alignSchemaWithTemplateType(appSchema, generateParameters) {
|
|
|
680
798
|
* @param sectionDefinitionName - identifier of the current object page section in schema
|
|
681
799
|
* @param sectionIdInManifest - identifier of the current object page section in manifest
|
|
682
800
|
*/
|
|
683
|
-
function addCustomActionDefinition(appSchema, v4Page, logger, customActionDefinitionName =
|
|
801
|
+
function addCustomActionDefinition(appSchema, v4Page, logger, customActionDefinitionName = ux_specification_types_2.DefinitionName.CustomTableAction, sectionDefinitionName = '', sectionIdInManifest = '') {
|
|
684
802
|
const definition = appSchema.definitions[sectionDefinitionName];
|
|
685
803
|
if (!definition) {
|
|
686
804
|
return;
|
|
@@ -689,7 +807,7 @@ function addCustomActionDefinition(appSchema, v4Page, logger, customActionDefini
|
|
|
689
807
|
let sortedActionsArray = sortPropertiesRecords(definition);
|
|
690
808
|
let configId;
|
|
691
809
|
if (sectionIdInManifest) {
|
|
692
|
-
if (customActionDefinitionName.indexOf(
|
|
810
|
+
if (customActionDefinitionName.indexOf(ux_specification_types_2.DefinitionName.CustomFormActionOP) !== -1) {
|
|
693
811
|
configId = sectionIdInManifest.replace(/::/g, '#');
|
|
694
812
|
}
|
|
695
813
|
else {
|
|
@@ -697,7 +815,7 @@ function addCustomActionDefinition(appSchema, v4Page, logger, customActionDefini
|
|
|
697
815
|
}
|
|
698
816
|
}
|
|
699
817
|
else {
|
|
700
|
-
if (customActionDefinitionName ===
|
|
818
|
+
if (customActionDefinitionName === ux_specification_types_2.DefinitionName.CustomFormActionOP) {
|
|
701
819
|
configId = `@${"com.sap.vocabularies.UI.v1.FieldGroup" /* UIAnnotationTerms.FieldGroup */}`;
|
|
702
820
|
}
|
|
703
821
|
else {
|
|
@@ -705,7 +823,7 @@ function addCustomActionDefinition(appSchema, v4Page, logger, customActionDefini
|
|
|
705
823
|
}
|
|
706
824
|
}
|
|
707
825
|
let actions;
|
|
708
|
-
if (sectionDefinitionName.includes(
|
|
826
|
+
if (sectionDefinitionName.includes(ux_specification_types_2.DefinitionName.ObjectPageCustomSectionActions)) {
|
|
709
827
|
actions = v4Page.options?.settings?.content?.body?.sections?.[configId]?.['actions'];
|
|
710
828
|
}
|
|
711
829
|
else {
|
|
@@ -717,7 +835,7 @@ function addCustomActionDefinition(appSchema, v4Page, logger, customActionDefini
|
|
|
717
835
|
// Adjust propertyIndex
|
|
718
836
|
if (sortedActionsArray) {
|
|
719
837
|
for (let index = 0; index < sortedActionsArray.length; index++) {
|
|
720
|
-
sortedActionsArray[index][1][
|
|
838
|
+
sortedActionsArray[index][1][ux_specification_types_2.SchemaTag.propertyIndex] = index;
|
|
721
839
|
}
|
|
722
840
|
const sortedActionsAsObject = {};
|
|
723
841
|
sortedActionsArray.forEach(([key, value]) => (sortedActionsAsObject[key] = value));
|
|
@@ -725,14 +843,15 @@ function addCustomActionDefinition(appSchema, v4Page, logger, customActionDefini
|
|
|
725
843
|
}
|
|
726
844
|
}
|
|
727
845
|
/**
|
|
728
|
-
* Common function for enhancing header and footer definitions of app schema by custom action definitions
|
|
846
|
+
* Common function for enhancing header and footer definitions of app schema by custom action definitions.
|
|
847
|
+
*
|
|
729
848
|
* @param appSchema - app-specific JSON schema
|
|
730
849
|
* @param v4Page - actual page in the manifest
|
|
731
850
|
* @param logger - logger for error messages
|
|
732
851
|
* @param customActionDefinitionName - definition name of custom action
|
|
733
852
|
* @param sectionId - identifier of the current object page section in schema
|
|
734
853
|
*/
|
|
735
|
-
function addHeaderFooterCustomActionDefinition(appSchema, v4Page, logger, customActionDefinitionName =
|
|
854
|
+
function addHeaderFooterCustomActionDefinition(appSchema, v4Page, logger, customActionDefinitionName = ux_specification_types_2.DefinitionName.CustomHeaderActionOP, sectionId = '') {
|
|
736
855
|
const definition = appSchema.definitions[sectionId];
|
|
737
856
|
if (!definition) {
|
|
738
857
|
return;
|
|
@@ -740,7 +859,7 @@ function addHeaderFooterCustomActionDefinition(appSchema, v4Page, logger, custom
|
|
|
740
859
|
// Sort existing actions
|
|
741
860
|
let sortedActionsArray = sortPropertiesRecords(definition);
|
|
742
861
|
let actions;
|
|
743
|
-
if ([
|
|
862
|
+
if ([ux_specification_types_2.DefinitionName.CustomHeaderAction, ux_specification_types_2.DefinitionName.CustomHeaderActionOP].includes(customActionDefinitionName)) {
|
|
744
863
|
actions = v4Page.options?.settings?.content?.header?.['actions'];
|
|
745
864
|
}
|
|
746
865
|
else {
|
|
@@ -753,7 +872,7 @@ function addHeaderFooterCustomActionDefinition(appSchema, v4Page, logger, custom
|
|
|
753
872
|
const sortedActionsAsObject = {};
|
|
754
873
|
if (sortedActionsArray) {
|
|
755
874
|
for (let index = 0; index < sortedActionsArray.length; index++) {
|
|
756
|
-
sortedActionsArray[index][1][
|
|
875
|
+
sortedActionsArray[index][1][ux_specification_types_2.SchemaTag.propertyIndex] = index;
|
|
757
876
|
}
|
|
758
877
|
sortedActionsArray.forEach(([key, value]) => (sortedActionsAsObject[key] = value));
|
|
759
878
|
}
|
|
@@ -761,6 +880,7 @@ function addHeaderFooterCustomActionDefinition(appSchema, v4Page, logger, custom
|
|
|
761
880
|
}
|
|
762
881
|
/**
|
|
763
882
|
* Method returns page from manifest by passed page key.
|
|
883
|
+
*
|
|
764
884
|
* @param manifest Object from manifest.json.
|
|
765
885
|
* @param pageId Page id.
|
|
766
886
|
* @param logger Logger to report error of unexisting page.
|
|
@@ -768,7 +888,7 @@ function addHeaderFooterCustomActionDefinition(appSchema, v4Page, logger, custom
|
|
|
768
888
|
*/
|
|
769
889
|
function getManifestPage(manifest, pageId, logger) {
|
|
770
890
|
const pages = (0, utils_1.getJSONPropertyByPath)(manifest, [
|
|
771
|
-
|
|
891
|
+
ux_specification_types_2.ManifestSection.ui5,
|
|
772
892
|
'routing',
|
|
773
893
|
'targets'
|
|
774
894
|
]);
|
|
@@ -777,8 +897,8 @@ function getManifestPage(manifest, pageId, logger) {
|
|
|
777
897
|
severity: "error" /* LogSeverity.Error */,
|
|
778
898
|
message: i18next_1.default.t('NOTARGETS'),
|
|
779
899
|
location: {
|
|
780
|
-
path:
|
|
781
|
-
range: [
|
|
900
|
+
path: ux_specification_types_2.MANIFESTPATH,
|
|
901
|
+
range: [ux_specification_types_2.ManifestSection.ui5, 'routing']
|
|
782
902
|
}
|
|
783
903
|
});
|
|
784
904
|
return;
|
|
@@ -789,8 +909,8 @@ function getManifestPage(manifest, pageId, logger) {
|
|
|
789
909
|
severity: "error" /* LogSeverity.Error */,
|
|
790
910
|
message: i18next_1.default.t('NOROUTINGID', { routingId: pageId }),
|
|
791
911
|
location: {
|
|
792
|
-
path:
|
|
793
|
-
range: [
|
|
912
|
+
path: ux_specification_types_2.MANIFESTPATH,
|
|
913
|
+
range: [ux_specification_types_2.ManifestSection.ui5, 'routing']
|
|
794
914
|
}
|
|
795
915
|
});
|
|
796
916
|
return;
|
|
@@ -799,8 +919,9 @@ function getManifestPage(manifest, pageId, logger) {
|
|
|
799
919
|
}
|
|
800
920
|
/**
|
|
801
921
|
* Method finds custom view/section XML file for passed page.
|
|
922
|
+
*
|
|
802
923
|
* @param files All extension files.
|
|
803
|
-
* @param
|
|
924
|
+
* @param page - the page object containing routing target options
|
|
804
925
|
* @param manifest Object from manifest.json.
|
|
805
926
|
* @param xmlType XML file type - view or fragment.
|
|
806
927
|
* @param extensionName Extension namespace or path to extension name in page object.
|
|
@@ -835,6 +956,7 @@ function getPageCustomExtensionFile(files, page, manifest, xmlType, extensionNam
|
|
|
835
956
|
}
|
|
836
957
|
/**
|
|
837
958
|
* Method finds view XML file for passed page.
|
|
959
|
+
*
|
|
838
960
|
* @param files All view files.
|
|
839
961
|
* @param pageId Page id.
|
|
840
962
|
* @param manifest Object from manifest.json.
|
|
@@ -849,7 +971,8 @@ function getPageCustomViewFile(files, pageId, manifest, logger) {
|
|
|
849
971
|
: undefined;
|
|
850
972
|
}
|
|
851
973
|
/**
|
|
852
|
-
* Adds custom section or custom sub section definitions to app schema
|
|
974
|
+
* Adds custom section or custom sub section definitions to app schema.
|
|
975
|
+
*
|
|
853
976
|
* @param appSchema - app-specific JSON schema
|
|
854
977
|
* @param definition - sections definition
|
|
855
978
|
* @param v4Page - actual page in the manifest
|
|
@@ -863,7 +986,7 @@ function addCustomSectionDefinition(appSchema, definition, v4Page, customSection
|
|
|
863
986
|
const annotationSectionsMap = new Map();
|
|
864
987
|
sortedSectionsArray = sortedSectionsArray.map((annotationSection) => {
|
|
865
988
|
const entry = (0, common_1.getEnumEntry)(appSchema, annotationSection[1], annotationSection[0], {
|
|
866
|
-
keyProperties: [
|
|
989
|
+
keyProperties: [ux_specification_types_2.SchemaKeyName.id],
|
|
867
990
|
descriptionAsFallback: true,
|
|
868
991
|
resolveDefinition: true
|
|
869
992
|
});
|
|
@@ -878,7 +1001,7 @@ function addCustomSectionDefinition(appSchema, definition, v4Page, customSection
|
|
|
878
1001
|
sortedSectionsArray = addExtensionToArray(section.subSections, sortedSectionsArray, customSectionRef, 'template', logger, isMergedSections);
|
|
879
1002
|
}
|
|
880
1003
|
}
|
|
881
|
-
else if (customSectionRef.includes(
|
|
1004
|
+
else if (customSectionRef.includes(ux_specification_types_2.DefinitionName.ObjectPageCustomHeaderSectionFragment)) {
|
|
882
1005
|
// header custom section extensions
|
|
883
1006
|
const header = v4Page.options?.settings?.content?.header;
|
|
884
1007
|
if (header && 'facets' in header) {
|
|
@@ -896,7 +1019,7 @@ function addCustomSectionDefinition(appSchema, definition, v4Page, customSection
|
|
|
896
1019
|
}
|
|
897
1020
|
// Adjust propertyIndex
|
|
898
1021
|
for (let index = 0; index < sortedSectionsArray.length; index++) {
|
|
899
|
-
sortedSectionsArray[index][1][
|
|
1022
|
+
sortedSectionsArray[index][1][ux_specification_types_2.SchemaTag.propertyIndex] = index;
|
|
900
1023
|
}
|
|
901
1024
|
const sortedActionsAsObject = {};
|
|
902
1025
|
sortedSectionsArray.forEach(([key, value]) => {
|
|
@@ -907,6 +1030,7 @@ function addCustomSectionDefinition(appSchema, definition, v4Page, customSection
|
|
|
907
1030
|
}
|
|
908
1031
|
/**
|
|
909
1032
|
* Method adds custom filter fields from manifest to schema properties.
|
|
1033
|
+
*
|
|
910
1034
|
* @param appSchema - app-specific JSON schema
|
|
911
1035
|
* @param definition - filter fields definition
|
|
912
1036
|
* @param v4Page - actual page in the manifest
|
|
@@ -916,7 +1040,7 @@ function addCustomFilterFieldDefinition(appSchema, definition, v4Page) {
|
|
|
916
1040
|
const annotationSectionsMap = new Map();
|
|
917
1041
|
sortedFilterFieldsArray = sortedFilterFieldsArray.map((annotationSection) => {
|
|
918
1042
|
const entry = (0, common_1.getEnumEntry)(appSchema, annotationSection[1], annotationSection[0], {
|
|
919
|
-
keyProperties: [
|
|
1043
|
+
keyProperties: [ux_specification_types_2.SchemaKeyName.value],
|
|
920
1044
|
descriptionAsFallback: true,
|
|
921
1045
|
resolveDefinition: true
|
|
922
1046
|
});
|
|
@@ -927,11 +1051,11 @@ function addCustomFilterFieldDefinition(appSchema, definition, v4Page) {
|
|
|
927
1051
|
const selectionFieldsEntry = v4Page.options?.settings?.controlConfiguration?.[`@${"com.sap.vocabularies.UI.v1.SelectionFields" /* UIAnnotationTerms.SelectionFields */}`];
|
|
928
1052
|
if (typeof selectionFieldsEntry === 'object' && 'filterFields' in selectionFieldsEntry) {
|
|
929
1053
|
// add extension to subsection of section
|
|
930
|
-
sortedFilterFieldsArray = addExtensionToArray(selectionFieldsEntry.filterFields, sortedFilterFieldsArray,
|
|
1054
|
+
sortedFilterFieldsArray = addExtensionToArray(selectionFieldsEntry.filterFields, sortedFilterFieldsArray, ux_specification_types_2.DefinitionName.CustomFilterField, 'template');
|
|
931
1055
|
}
|
|
932
1056
|
// Adjust propertyIndex
|
|
933
1057
|
for (let index = 0; index < sortedFilterFieldsArray.length; index++) {
|
|
934
|
-
sortedFilterFieldsArray[index][1][
|
|
1058
|
+
sortedFilterFieldsArray[index][1][ux_specification_types_2.SchemaTag.propertyIndex] = index;
|
|
935
1059
|
}
|
|
936
1060
|
const sortedFilterFieldsAsObject = {};
|
|
937
1061
|
sortedFilterFieldsArray.forEach(([key, value]) => {
|
|
@@ -940,4 +1064,93 @@ function addCustomFilterFieldDefinition(appSchema, definition, v4Page) {
|
|
|
940
1064
|
});
|
|
941
1065
|
definition.properties = sortedFilterFieldsAsObject;
|
|
942
1066
|
}
|
|
1067
|
+
/**
|
|
1068
|
+
* Imports action settings into a configuration object and applies necessary transformations based on provided parameters.
|
|
1069
|
+
*
|
|
1070
|
+
* @param {object} importActionParams - Parameters required for importing action settings, including schema, factory, and action specifications.
|
|
1071
|
+
* @param {string} key - The key used to identify the specific configuration or schema definition.
|
|
1072
|
+
* @param {boolean} [keepEmptyAction] - Determines whether to keep empty actions in the configuration object.
|
|
1073
|
+
* @returns {void} This method does not return any value.
|
|
1074
|
+
*/
|
|
1075
|
+
function importActionToConfigurationObject(importActionParams, key, keepEmptyAction = false) {
|
|
1076
|
+
const { appSchema, factory, actionsInConfig, actionKey, manifest, routingId, manifestSectionId, targetAnnotation } = importActionParams;
|
|
1077
|
+
const schemaPropertyName = (key ?? '').split('<')[0];
|
|
1078
|
+
const metaInstance = factory.createInstance(ux_specification_types_1.PageTypeV4.ObjectPage, schemaPropertyName);
|
|
1079
|
+
const breadcrumbs = [actionKey.replace('/', '??')];
|
|
1080
|
+
if (targetAnnotation) {
|
|
1081
|
+
breadcrumbs.push(targetAnnotation);
|
|
1082
|
+
}
|
|
1083
|
+
if (metaInstance) {
|
|
1084
|
+
const action = (actionsInConfig[actionKey] = metaInstance);
|
|
1085
|
+
(0, utils_2.importSettingsOfObject)(action, manifest, appSchema.definitions[key], routingId, breadcrumbs, manifestSectionId);
|
|
1086
|
+
if (!keepEmptyAction) {
|
|
1087
|
+
(0, common_1.removeEmptyStructure)(actionsInConfig, actionKey);
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
/**
|
|
1092
|
+
* Imports the settings of a single action reference into the configuration object.
|
|
1093
|
+
*
|
|
1094
|
+
* @param {ImportActionSettingsOfReferenceParams} importActionParams - The parameters required for importing action settings, including property definitions.
|
|
1095
|
+
* @param {Definition} definitionOfReference - The reference definition object used to resolve the action.
|
|
1096
|
+
* @returns {void} This function does not return a value.
|
|
1097
|
+
*/
|
|
1098
|
+
function importSingleActionSettingsOfReference(importActionParams, definitionOfReference) {
|
|
1099
|
+
const { actionPropertyDefinition } = importActionParams;
|
|
1100
|
+
const key = (0, utils_1.getDefinitionKey)(definitionOfReference.$ref || actionPropertyDefinition.$ref);
|
|
1101
|
+
importActionToConfigurationObject(importActionParams, key);
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* Imports and processes the settings for a group of actions based on a reference definition.
|
|
1105
|
+
*
|
|
1106
|
+
* @param {ImportActionSettingsOfReferenceParams} importActionParams - The parameters used for importing and configuring the action settings.
|
|
1107
|
+
* @param {Definition} definitionOfReference - The reference definition from which the action group settings are imported.
|
|
1108
|
+
* @returns {void} This function does not return a value; it modifies the configurations directly.
|
|
1109
|
+
*/
|
|
1110
|
+
function importGroupActionSettingsOfReference(importActionParams, definitionOfReference) {
|
|
1111
|
+
const { actionPropertyDefinition, appSchema, actionsInConfig, actionKey } = importActionParams;
|
|
1112
|
+
// create an instance of the action group in the configuration object
|
|
1113
|
+
const key = (0, utils_1.getDefinitionKey)(definitionOfReference.$ref ?? actionPropertyDefinition.$ref);
|
|
1114
|
+
importActionToConfigurationObject(importActionParams, key, true);
|
|
1115
|
+
// newly created action group instance is available in the actionsInConfig object
|
|
1116
|
+
const actionGroup = actionsInConfig[actionKey];
|
|
1117
|
+
// add a warning message for all versions that don't support action groups
|
|
1118
|
+
(0, common_1.addMessageToSchema)(actionGroup, i18next_1.default.t('ACTION_GROUPS_ARENT_SUPPORTED'));
|
|
1119
|
+
// fill the action group with the action settings of the group action
|
|
1120
|
+
const { properties } = definitionOfReference;
|
|
1121
|
+
for (const propertyKey in properties) {
|
|
1122
|
+
const actionInGroupProperty = properties[propertyKey];
|
|
1123
|
+
const actionInGroupPropertyKey = (0, utils_1.getDefinitionKey)(actionInGroupProperty['$ref']);
|
|
1124
|
+
const actionInGroupDefinition = appSchema.definitions[actionInGroupPropertyKey];
|
|
1125
|
+
const key = (0, utils_1.getDefinitionKey)(actionInGroupDefinition.$ref ?? actionInGroupProperty['$ref']);
|
|
1126
|
+
const importGroupedActionParams = {
|
|
1127
|
+
...importActionParams,
|
|
1128
|
+
actionsInConfig: actionGroup,
|
|
1129
|
+
actionKey: propertyKey
|
|
1130
|
+
// targetAnnotation: undefined
|
|
1131
|
+
};
|
|
1132
|
+
importActionToConfigurationObject(importGroupedActionParams, key);
|
|
1133
|
+
}
|
|
1134
|
+
(0, common_1.removeEmptyStructure)(actionsInConfig, actionKey);
|
|
1135
|
+
}
|
|
1136
|
+
/**
|
|
1137
|
+
* Imports the action settings of a specified reference based on the given parameters.
|
|
1138
|
+
*
|
|
1139
|
+
* @param {object} importActionParams - The parameters required for importing action settings.
|
|
1140
|
+
* @param {object} importActionParams.actionPropertyDefinition - The action property definition containing the $ref to the reference.
|
|
1141
|
+
* @param {object} importActionParams.appSchema - The application schema containing definitions and other related metadata.
|
|
1142
|
+
* @returns {void} This function does not return a value.
|
|
1143
|
+
*/
|
|
1144
|
+
function importActionSettingsOfReference(importActionParams) {
|
|
1145
|
+
const { actionPropertyDefinition, appSchema } = importActionParams;
|
|
1146
|
+
const definitionKey = (0, utils_1.getDefinitionKey)(actionPropertyDefinition.$ref);
|
|
1147
|
+
const definitionOfReference = appSchema.definitions[definitionKey];
|
|
1148
|
+
const actionType = definitionOfReference['dataType'];
|
|
1149
|
+
if (actionType === exports.DATA_FIELD_FOR_ACTION_GROUP) {
|
|
1150
|
+
importGroupActionSettingsOfReference(importActionParams, definitionOfReference);
|
|
1151
|
+
}
|
|
1152
|
+
else {
|
|
1153
|
+
importSingleActionSettingsOfReference(importActionParams, definitionOfReference);
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
943
1156
|
//# sourceMappingURL=utils.js.map
|