@sap/ux-specification 1.120.36 → 1.120.38
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 +112 -112
- 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 +6 -6
- 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 +5 -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 +13 -3
- package/dist/specification/src/sync/common/distTagEvaluator.d.ts.map +1 -1
- package/dist/specification/src/sync/common/distTagEvaluator.js +13 -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 +84 -38
- package/dist/specification/src/sync/common/generate/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/generate/utils.js +112 -37
- 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 +260 -155
- 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 +13 -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 +21 -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 +48 -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 +14 -9
- package/dist/specification/src/sync/v4/export/controls/Table.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Table.js +44 -17
- 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 +124 -78
- 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 +251 -195
- 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 +83 -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 +85 -74
- 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 +11 -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 +9 -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 +16 -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 +7 -7
|
@@ -8,7 +8,9 @@ exports.parseAndMergeAndConvert = parseAndMergeAndConvert;
|
|
|
8
8
|
exports.evaluateCommonLabel = evaluateCommonLabel;
|
|
9
9
|
exports.getLabelForPropertyPath = getLabelForPropertyPath;
|
|
10
10
|
exports.getLabelForDataField = getLabelForDataField;
|
|
11
|
-
exports.
|
|
11
|
+
exports.getLabel = getLabel;
|
|
12
|
+
exports.getDescriptionForActionBasedDataFields = getDescriptionForActionBasedDataFields;
|
|
13
|
+
exports.getTitleForDataField = getTitleForDataField;
|
|
12
14
|
exports.prepareRef = prepareRef;
|
|
13
15
|
exports.getPageTypeV2 = getPageTypeV2;
|
|
14
16
|
exports.getPageTypeV4 = getPageTypeV4;
|
|
@@ -46,6 +48,7 @@ exports.getJSONPropertyByPath = getJSONPropertyByPath;
|
|
|
46
48
|
exports.removeNamespaces = removeNamespaces;
|
|
47
49
|
exports.replaceNamespaces = replaceNamespaces;
|
|
48
50
|
exports.getRefType = getRefType;
|
|
51
|
+
exports.compareTemplateNames = compareTemplateNames;
|
|
49
52
|
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
50
53
|
const i18next_1 = __importDefault(require("i18next"));
|
|
51
54
|
const deepmerge_1 = __importDefault(require("deepmerge"));
|
|
@@ -66,6 +69,7 @@ const arrayIncludes = (arr, target) => target.every((v) => arr.includes(v));
|
|
|
66
69
|
exports.arrayIncludes = arrayIncludes;
|
|
67
70
|
/**
|
|
68
71
|
* Function returns annotation path for schema based on received params.
|
|
72
|
+
*
|
|
69
73
|
* @param entityTypeName - Entity type name.
|
|
70
74
|
* @param term - Annotation term.
|
|
71
75
|
* @param qualifier - Annotation qualifier.
|
|
@@ -83,8 +87,10 @@ const createAnnotationPath = (entityTypeName, term, qualifier) => {
|
|
|
83
87
|
};
|
|
84
88
|
exports.createAnnotationPath = createAnnotationPath;
|
|
85
89
|
/**
|
|
86
|
-
* Parses, merges, and converts a list of annotation files with aid of tools from annotation-vocabularies-tools
|
|
90
|
+
* Parses, merges, and converts a list of annotation files with aid of tools from annotation-vocabularies-tools.
|
|
91
|
+
*
|
|
87
92
|
* @param annotationFiles - The list of all annotation files, in JSON format
|
|
93
|
+
* @param logger - Logger instance used for logging errors or messages during processing
|
|
88
94
|
* @returns the complete service information
|
|
89
95
|
*/
|
|
90
96
|
function parseAndMergeAndConvert(annotationFiles, logger) {
|
|
@@ -114,10 +120,12 @@ function parseAndMergeAndConvert(annotationFiles, logger) {
|
|
|
114
120
|
const getAnnotationPropertyValue = (annotationProperty) => annotationProperty?.value || annotationProperty?.path;
|
|
115
121
|
exports.getAnnotationPropertyValue = getAnnotationPropertyValue;
|
|
116
122
|
/**
|
|
117
|
-
* Checks for Common.Label and overwrites the label from it if present
|
|
123
|
+
* Checks for Common.Label and overwrites the label from it if present.
|
|
124
|
+
*
|
|
118
125
|
* @param {PropertyAnnotations} annotations - property annotations
|
|
119
126
|
* @param {EntityType} entityType - entity type
|
|
120
127
|
* @param {string} label - label, to be actualized
|
|
128
|
+
* @returns label, derived from Common.Label or from property value
|
|
121
129
|
*/
|
|
122
130
|
function evaluateCommonLabel(annotations, entityType, label) {
|
|
123
131
|
if (annotations?.Common?.Label) {
|
|
@@ -140,7 +148,8 @@ function evaluateCommonLabel(annotations, entityType, label) {
|
|
|
140
148
|
return label;
|
|
141
149
|
}
|
|
142
150
|
/**
|
|
143
|
-
* Determines the label for a property path
|
|
151
|
+
* Determines the label for a property path.
|
|
152
|
+
*
|
|
144
153
|
* @param {PropertyPath} propertyPath - property path
|
|
145
154
|
* @param {EntityType} entityType - entity type
|
|
146
155
|
* @returns label, derived from Common.Label or from property value
|
|
@@ -153,9 +162,10 @@ function getLabelForPropertyPath(propertyPath, entityType) {
|
|
|
153
162
|
return label;
|
|
154
163
|
}
|
|
155
164
|
/**
|
|
156
|
-
* Determines the label for a LineItem record
|
|
157
|
-
*
|
|
158
|
-
* @param
|
|
165
|
+
* Determines the label for a LineItem record.
|
|
166
|
+
*
|
|
167
|
+
* @param field - Line item record
|
|
168
|
+
* @param entityType - entity type
|
|
159
169
|
* @returns label, derived from Common.Label or from property value
|
|
160
170
|
*/
|
|
161
171
|
function getLabelForDataField(field, entityType) {
|
|
@@ -185,7 +195,8 @@ function getLabelForDataField(field, entityType) {
|
|
|
185
195
|
return label;
|
|
186
196
|
}
|
|
187
197
|
/**
|
|
188
|
-
* Function to resolve the dataField label
|
|
198
|
+
* Function to resolve the dataField label.
|
|
199
|
+
*
|
|
189
200
|
* @param dataFieldLabel - Given dataField label; might be of type string, or an object in case of a path reference
|
|
190
201
|
* @param entityType - the entity type as part of the AVT ConvertedMetadata
|
|
191
202
|
* @returns undefined or the right string value
|
|
@@ -211,6 +222,34 @@ function getLabel(dataFieldLabel, entityType) {
|
|
|
211
222
|
return undefined;
|
|
212
223
|
}
|
|
213
224
|
}
|
|
225
|
+
/**
|
|
226
|
+
* Generates a description for action-based data fields using the provided data field information
|
|
227
|
+
* and its corresponding label.
|
|
228
|
+
*
|
|
229
|
+
* @param {DataFieldForActionAbstractTypes} dataFieldAbstract - Abstract representation of the data field
|
|
230
|
+
* with action-based properties.
|
|
231
|
+
* @param {string} dataFieldLabel - The label associated with the data field, which may influence
|
|
232
|
+
* the generated description.
|
|
233
|
+
* @returns {string} The description derived from the data field label or action name.
|
|
234
|
+
*/
|
|
235
|
+
function getDescriptionForActionBasedDataFields(dataFieldAbstract, dataFieldLabel) {
|
|
236
|
+
const dataField = dataFieldAbstract;
|
|
237
|
+
const actionName = typeof dataField.Action === 'string' ? dataField.Action : dataField.Action?.path;
|
|
238
|
+
if (dataFieldLabel) {
|
|
239
|
+
return typeof dataFieldLabel === 'string' ? dataFieldLabel : actionName;
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
return actionName;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Retrieves the title for a given data field.
|
|
247
|
+
*
|
|
248
|
+
* @param dataField - The data field object containing metadata.
|
|
249
|
+
* @param entityType - The entity type as part of the AVT ConvertedMetadata.
|
|
250
|
+
* @param dataFieldLabel - The label associated with the data field.
|
|
251
|
+
* @returns The title for the data field as a string.
|
|
252
|
+
*/
|
|
214
253
|
function getTitleForDataField(dataField, entityType, dataFieldLabel) {
|
|
215
254
|
const propertyCommonLabel = getLabelForDataField(dataField, entityType);
|
|
216
255
|
return (dataFieldLabel ||
|
|
@@ -218,77 +257,21 @@ function getTitleForDataField(dataField, entityType, dataFieldLabel) {
|
|
|
218
257
|
(dataField.Value.$target ? dataField.Value.$target.name : dataField.Value.value || dataField.Value.path));
|
|
219
258
|
}
|
|
220
259
|
/**
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
* @param entityType - the entity type as part of the AVT ConvertedMetadata
|
|
224
|
-
*/
|
|
225
|
-
function getDataFieldDescription(dataFieldAbstract, entityType) {
|
|
226
|
-
let title = '', propertyCommonLabel, dataField, actionName = '';
|
|
227
|
-
try {
|
|
228
|
-
const dataFieldLabel = getLabel(dataFieldAbstract.Label, entityType);
|
|
229
|
-
switch (dataFieldAbstract.$Type) {
|
|
230
|
-
case "com.sap.vocabularies.UI.v1.DataField" /* UIAnnotationTypes.DataField */:
|
|
231
|
-
title = getTitleForDataField(dataFieldAbstract, entityType, dataFieldLabel);
|
|
232
|
-
break;
|
|
233
|
-
case "com.sap.vocabularies.UI.v1.DataFieldWithUrl" /* UIAnnotationTypes.DataFieldWithUrl */:
|
|
234
|
-
propertyCommonLabel = getLabelForDataField(dataFieldAbstract, entityType);
|
|
235
|
-
title =
|
|
236
|
-
dataFieldLabel ||
|
|
237
|
-
propertyCommonLabel ||
|
|
238
|
-
(typeof dataFieldAbstract.Value === 'string'
|
|
239
|
-
? dataFieldAbstract.Value
|
|
240
|
-
: dataFieldAbstract.Value.path);
|
|
241
|
-
break;
|
|
242
|
-
case "com.sap.vocabularies.UI.v1.DataFieldForAnnotation" /* UIAnnotationTypes.DataFieldForAnnotation */:
|
|
243
|
-
dataField = dataFieldAbstract;
|
|
244
|
-
propertyCommonLabel = getLabelForDataField(dataFieldAbstract, entityType);
|
|
245
|
-
title =
|
|
246
|
-
dataFieldLabel ||
|
|
247
|
-
propertyCommonLabel ||
|
|
248
|
-
dataField.Target?.$target?.Title ||
|
|
249
|
-
dataField.Target?.value.split('UI.v1.')[1];
|
|
250
|
-
break;
|
|
251
|
-
case "com.sap.vocabularies.UI.v1.DataFieldForAction" /* UIAnnotationTypes.DataFieldForAction */:
|
|
252
|
-
case "com.sap.vocabularies.UI.v1.DataFieldWithAction" /* UIAnnotationTypes.DataFieldWithAction */:
|
|
253
|
-
case "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation" /* UIAnnotationTypes.DataFieldForIntentBasedNavigation */:
|
|
254
|
-
dataField = dataFieldAbstract;
|
|
255
|
-
actionName = typeof dataFieldAbstract.Action === 'string' ? dataField.Action : dataField.Action?.path;
|
|
256
|
-
if (dataFieldLabel) {
|
|
257
|
-
title = typeof dataFieldLabel === 'string' ? dataFieldLabel : actionName;
|
|
258
|
-
}
|
|
259
|
-
else {
|
|
260
|
-
title = actionName;
|
|
261
|
-
}
|
|
262
|
-
break;
|
|
263
|
-
case "com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation" /* UIAnnotationTypes.DataFieldWithIntentBasedNavigation */:
|
|
264
|
-
propertyCommonLabel = getLabelForDataField(dataFieldAbstract, entityType);
|
|
265
|
-
title = propertyCommonLabel || dataFieldAbstract.Value.path;
|
|
266
|
-
break;
|
|
267
|
-
case "com.sap.vocabularies.UI.v1.DataFieldWithNavigationPath" /* UIAnnotationTypes.DataFieldWithNavigationPath */:
|
|
268
|
-
dataField = dataFieldAbstract;
|
|
269
|
-
title = getTitleForDataField(dataField, entityType, dataFieldLabel);
|
|
270
|
-
break;
|
|
271
|
-
default:
|
|
272
|
-
break;
|
|
273
|
-
}
|
|
274
|
-
return title;
|
|
275
|
-
}
|
|
276
|
-
catch {
|
|
277
|
-
return title;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* Prepare string for reference use in schema
|
|
260
|
+
* Prepare string for reference use in schema.
|
|
261
|
+
*
|
|
282
262
|
* @param refInput string to be character checked and replaced
|
|
283
263
|
* @returns string with replaced characters
|
|
284
264
|
*/
|
|
285
265
|
//@typescript-eslint/no-wrapper-object-types turned off tor prevent conversion String > string; String is used by AVT
|
|
266
|
+
// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types
|
|
286
267
|
function prepareRef(refInput) {
|
|
287
268
|
return refInput.replace('#', '::').replace(/\//g, ':2f');
|
|
288
269
|
}
|
|
289
270
|
/**
|
|
290
|
-
* Return the page type for a given V2 page in manifest
|
|
271
|
+
* Return the page type for a given V2 page in manifest.
|
|
272
|
+
*
|
|
291
273
|
* @param name - page component name
|
|
274
|
+
* @returns page type
|
|
292
275
|
*/
|
|
293
276
|
function getPageTypeV2(name) {
|
|
294
277
|
if (name) {
|
|
@@ -297,28 +280,34 @@ function getPageTypeV2(name) {
|
|
|
297
280
|
}
|
|
298
281
|
}
|
|
299
282
|
/**
|
|
300
|
-
* Return the page type for a given V4 page in manifest
|
|
301
|
-
*
|
|
283
|
+
* Return the page type for a given V4 page in manifest.
|
|
284
|
+
*
|
|
285
|
+
* @param v4Page - The V4 application page or routing target configuration
|
|
286
|
+
* @returns page type
|
|
302
287
|
*/
|
|
303
|
-
function getPageTypeV4(
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
return
|
|
307
|
-
}
|
|
308
|
-
else if (v4App?.name === ux_specification_types_1.v4.FE_TEMPLATE_V4_CUSTOM_PAGE) {
|
|
309
|
-
return ux_specification_types_1.PageTypeV4.FPMCustomPage;
|
|
288
|
+
function getPageTypeV4(v4Page) {
|
|
289
|
+
const pageType = 'name' in v4Page && typeof v4Page.name === 'string' ? convertTemplateNameToPageTypeV4(v4Page.name) : undefined;
|
|
290
|
+
if (pageType) {
|
|
291
|
+
return pageType;
|
|
310
292
|
}
|
|
311
|
-
|
|
312
|
-
v4App.viewName) {
|
|
293
|
+
if (('viewId' in v4Page && v4Page.viewId) || ('viewName' in v4Page && v4Page.viewName)) {
|
|
313
294
|
return ux_specification_types_1.PageTypeV4.CustomPage;
|
|
314
295
|
}
|
|
315
296
|
}
|
|
297
|
+
/**
|
|
298
|
+
* Retrieves the name of the target annotation based on the provided annotation object and a flag.
|
|
299
|
+
*
|
|
300
|
+
* @param targetAnnotation - The annotation object containing term and qualifier information.
|
|
301
|
+
* @param keyForRelatedFacetKeys - A flag indicating whether to construct the key for related facet keys without the '@' symbol.
|
|
302
|
+
* @returns The name of the target annotation as a string.
|
|
303
|
+
*/
|
|
316
304
|
function getTargetAnnotationName(targetAnnotation, keyForRelatedFacetKeys = false) {
|
|
317
305
|
const termWithQualifier = `${targetAnnotation.term}#${targetAnnotation.qualifier}`;
|
|
318
306
|
return `${!keyForRelatedFacetKeys ? '@' : ''}${targetAnnotation.qualifier ? termWithQualifier : targetAnnotation.term}`;
|
|
319
307
|
}
|
|
320
308
|
/**
|
|
321
|
-
* Finds the alias for a given namespace in the references' section of the converted service metadata
|
|
309
|
+
* Finds the alias for a given namespace in the references' section of the converted service metadata.
|
|
310
|
+
*
|
|
322
311
|
* @param {string} namespace - complete namespace, e.g. 'com.sap.vocabularies.UI.v1'
|
|
323
312
|
* @param {ConvertedMetadata} oDataServiceAVT - combined service metadata, as returned by annotation vocabularies tools
|
|
324
313
|
* @returns alias for the given namespace
|
|
@@ -345,6 +334,7 @@ function findAlias(namespace, oDataServiceAVT) {
|
|
|
345
334
|
}
|
|
346
335
|
/**
|
|
347
336
|
* Method returns annotation from passed meta path.
|
|
337
|
+
*
|
|
348
338
|
* @param metaPath - annotation meta path
|
|
349
339
|
* @returns annotation name
|
|
350
340
|
*/
|
|
@@ -352,7 +342,8 @@ function getAnnotationFromMetaPath(metaPath) {
|
|
|
352
342
|
return metaPath.substring(metaPath.lastIndexOf('.') + 1, metaPath.length);
|
|
353
343
|
}
|
|
354
344
|
/**
|
|
355
|
-
* Determines the target annotation
|
|
345
|
+
* Determines the target annotation.
|
|
346
|
+
*
|
|
356
347
|
* @param navigationParts - parts of the target annotation path
|
|
357
348
|
* @param entityType - entity type
|
|
358
349
|
* @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
@@ -365,10 +356,12 @@ function determineTargetAnnotation(navigationParts, entityType, oDataServiceAVT)
|
|
|
365
356
|
return entityType?.annotations?.[alias]?.[annotation];
|
|
366
357
|
}
|
|
367
358
|
/**
|
|
368
|
-
* Adjust key by considering navigation
|
|
359
|
+
* Adjust key by considering navigation.
|
|
360
|
+
*
|
|
369
361
|
* @param key - given key
|
|
370
|
-
* @param keyForRelatedFacetKeys - construct key for 'keyForRelatedFacetKeys' property(used to define custom sections) - we should not add '@' symbol there.
|
|
371
362
|
* @param navigationParts - parts of the target annotation path
|
|
363
|
+
* @param keyForRelatedFacetKeys - construct key for 'keyForRelatedFacetKeys' property(used to define custom sections) - we should not add '@' symbol there.
|
|
364
|
+
* @returns adjusted key
|
|
372
365
|
*/
|
|
373
366
|
function adjustKey(key, navigationParts, keyForRelatedFacetKeys) {
|
|
374
367
|
const uiClass = navigationParts[navigationParts.length - 1].split('#')[0];
|
|
@@ -382,6 +375,17 @@ function adjustKey(key, navigationParts, keyForRelatedFacetKeys) {
|
|
|
382
375
|
}
|
|
383
376
|
return key;
|
|
384
377
|
}
|
|
378
|
+
/**
|
|
379
|
+
* Resolves the key and entity type of a reference facet, adjusting the key based on navigation and annotations.
|
|
380
|
+
*
|
|
381
|
+
* @param oDataServiceAVT - The converted metadata of the OData service.
|
|
382
|
+
* @param key - The initial key for the facet.
|
|
383
|
+
* @param entityType - The entity type associated with the facet.
|
|
384
|
+
* @param propertyValue - The property value of the facet's target.
|
|
385
|
+
* @param oDataVersion - The version of OData (v2 or v4).
|
|
386
|
+
* @param keyForRelatedFacetKeys - A flag indicating whether to construct the key for related facet keys without the '@' symbol.
|
|
387
|
+
* @returns An object containing the adjusted key, entity type, a flag to stop processing, and the namespace.
|
|
388
|
+
*/
|
|
385
389
|
function getKeyAndEntityTypeOfReferenceFacet(oDataServiceAVT, key, entityType, propertyValue, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, keyForRelatedFacetKeys = false) {
|
|
386
390
|
let stopProcessing = false;
|
|
387
391
|
let namespace;
|
|
@@ -411,12 +415,14 @@ function getKeyAndEntityTypeOfReferenceFacet(oDataServiceAVT, key, entityType, p
|
|
|
411
415
|
}
|
|
412
416
|
/**
|
|
413
417
|
* Resolve page section(get key and label->description).
|
|
418
|
+
*
|
|
414
419
|
* @param facetDefinition - the actual annotation record
|
|
420
|
+
* @param sourceEntityType - The source entity type to be used for resolving facets
|
|
421
|
+
* @param oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
422
|
+
* @param logger - Logger class for logging messages
|
|
423
|
+
* @param oDataVersion - OData version
|
|
415
424
|
* @param keyForRelatedFacetKeys - construct key for 'keyForRelatedFacetKeys' property(used to define custom sections) - we should not add '@' symbol there.
|
|
416
|
-
* @
|
|
417
|
-
* @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
418
|
-
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
419
|
-
* @returns {FacetSection} - object comprising the relevant facet information
|
|
425
|
+
* @returns - object comprising the relevant facet information
|
|
420
426
|
*/
|
|
421
427
|
function getSectionFacet(facetDefinition, sourceEntityType, oDataServiceAVT, logger, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, keyForRelatedFacetKeys = false) {
|
|
422
428
|
//Take facet ID as fallback
|
|
@@ -457,7 +463,8 @@ function getSectionFacet(facetDefinition, sourceEntityType, oDataServiceAVT, log
|
|
|
457
463
|
}
|
|
458
464
|
}
|
|
459
465
|
/**
|
|
460
|
-
* Decodes encoded path element and returns it in form as used in manifest settings
|
|
466
|
+
* Decodes encoded path element and returns it in form as used in manifest settings.
|
|
467
|
+
*
|
|
461
468
|
* @param {string} pathElement - path of the property in the manifest
|
|
462
469
|
* @param {string} targetAnnotation - target annotation (optional)
|
|
463
470
|
* @param {string} targetAnnotationEncoded - target annotation in its encoded form, as used in manifest settings (optional)
|
|
@@ -476,6 +483,7 @@ function getDecodedPathElement(pathElement, targetAnnotation, targetAnnotationEn
|
|
|
476
483
|
/**
|
|
477
484
|
* Method prepares value as empty object or array based on passed path.
|
|
478
485
|
* For array path should end with '[]'.
|
|
486
|
+
*
|
|
479
487
|
* @param {string} path - path of the property in the manifest
|
|
480
488
|
* @returns prepared value based on passed path
|
|
481
489
|
*/
|
|
@@ -490,12 +498,13 @@ exports.prepareValueForPath = prepareValueForPath;
|
|
|
490
498
|
* Method find object by given path in format "sap.ui5/extends/extensions".
|
|
491
499
|
* An empty object is created if the path element does not exist yet.
|
|
492
500
|
* Exception: if an empty array is the next element of the 'path' definition, an empty array is created instead of an empty object.
|
|
501
|
+
*
|
|
493
502
|
* @param {object} manifest - manifest that is being modified during export
|
|
494
503
|
* @param {string} path - path of the property in the manifest
|
|
495
504
|
* @param {string} targetAnnotation - target annotation (optional)
|
|
496
505
|
* @param {string} targetAnnotationEncoded - target annotation in its encoded form, as used in manifest settings
|
|
497
506
|
* @param {boolean} value - specific value to apply for unexisting property for given path
|
|
498
|
-
* @param {boolean} [readOnly
|
|
507
|
+
* @param {boolean} [readOnly] - indicates if the function should create object/array if existing value not found by given path
|
|
499
508
|
* @returns returns section of the manifest based on path
|
|
500
509
|
*/
|
|
501
510
|
const resolveManifestPath = (manifest, path, targetAnnotation, targetAnnotationEncoded, value, readOnly = false) => {
|
|
@@ -533,11 +542,12 @@ const resolveManifestPath = (manifest, path, targetAnnotation, targetAnnotationE
|
|
|
533
542
|
* Finds the alias for a given namespace in the references' section of the converted service metadata.
|
|
534
543
|
* An empty object is created if the path element does not exist yet.
|
|
535
544
|
* Exception: if an empty array is the next element of the 'path' definition, an empty array is created instead of an empty object.
|
|
545
|
+
*
|
|
536
546
|
* @param {object} manifest - manifest that is being modified during export
|
|
537
547
|
* @param {string} path - path of the property in the manifest
|
|
538
548
|
* @param {string} targetAnnotation - target annotation (optional)
|
|
539
549
|
* @param {string} targetAnnotationEncoded - target annotation in its encoded form, as used in manifest settings
|
|
540
|
-
* @param {boolean} [readOnly
|
|
550
|
+
* @param {boolean} [readOnly] - indicates if the function should create object/array if existing value not found by given path
|
|
541
551
|
* @returns returns section of the manifest based on path, generates an empty object in case it does not exists
|
|
542
552
|
*/
|
|
543
553
|
const getManifestSectionByPathV4 = (manifest, path, targetAnnotation, targetAnnotationEncoded, readOnly = false) => {
|
|
@@ -546,6 +556,7 @@ const getManifestSectionByPathV4 = (manifest, path, targetAnnotation, targetAnno
|
|
|
546
556
|
exports.getManifestSectionByPathV4 = getManifestSectionByPathV4;
|
|
547
557
|
/**
|
|
548
558
|
* Method sets value for passed path in manifest.
|
|
559
|
+
*
|
|
549
560
|
* @param {object} manifest - manifest that is being modified during export
|
|
550
561
|
* @param {string} path - path of the property in the manifest
|
|
551
562
|
* @param {unknown} value - value to apply
|
|
@@ -556,6 +567,12 @@ const setManifestSectionByPathV4 = (manifest, path, value, targetAnnotation, tar
|
|
|
556
567
|
resolveManifestPath(manifest, path, targetAnnotation, targetAnnotationEncoded, value);
|
|
557
568
|
};
|
|
558
569
|
exports.setManifestSectionByPathV4 = setManifestSectionByPathV4;
|
|
570
|
+
/**
|
|
571
|
+
* Retrieves the schema key for a given line item record based on its type and properties.
|
|
572
|
+
*
|
|
573
|
+
* @param lineItemRecord - The line item record to process.
|
|
574
|
+
* @returns The schema key as a string, or undefined if no key is determined.
|
|
575
|
+
*/
|
|
559
576
|
function getSchemaKeyOfLineItemRecord(lineItemRecord) {
|
|
560
577
|
let schemaKey, target, value;
|
|
561
578
|
switch (lineItemRecord.$Type) {
|
|
@@ -604,7 +621,8 @@ function getSchemaKeyOfLineItemRecord(lineItemRecord) {
|
|
|
604
621
|
return schemaKey;
|
|
605
622
|
}
|
|
606
623
|
/**
|
|
607
|
-
* Determines if type of given annotation term is of UIAnnotationTerm
|
|
624
|
+
* Determines if type of given annotation term is of UIAnnotationTerm.
|
|
625
|
+
*
|
|
608
626
|
* @param {string} path path in manifest
|
|
609
627
|
* @param {string} alias for a given namespace
|
|
610
628
|
* @param {EntityType} entityType - the entity type
|
|
@@ -638,10 +656,10 @@ function getUIAnnotationTerm(path, alias, entityType) {
|
|
|
638
656
|
}
|
|
639
657
|
}
|
|
640
658
|
/**
|
|
641
|
-
* Determines if type of given annotation term is of CommunicationAnnotationTerm
|
|
659
|
+
* Determines if type of given annotation term is of CommunicationAnnotationTerm.
|
|
660
|
+
*
|
|
642
661
|
* @param {string} path path in manifest
|
|
643
662
|
* @param {string} alias for a given namespace
|
|
644
|
-
* @param {EntityType} entityType - the entity type
|
|
645
663
|
* @returns Communication annotation term type
|
|
646
664
|
*/
|
|
647
665
|
function getCommunicationAnnotationTerm(path, alias) {
|
|
@@ -656,7 +674,8 @@ function getCommunicationAnnotationTerm(path, alias) {
|
|
|
656
674
|
}
|
|
657
675
|
}
|
|
658
676
|
/**
|
|
659
|
-
* Determines the type of given annotation term
|
|
677
|
+
* Determines the type of given annotation term.
|
|
678
|
+
*
|
|
660
679
|
* @param {string} path path in manifest
|
|
661
680
|
* @param {string} alias for a given namespace
|
|
662
681
|
* @param {EntityType} entityType - the entity type
|
|
@@ -666,11 +685,13 @@ function getAnnotationTerm(path, alias, entityType) {
|
|
|
666
685
|
return getUIAnnotationTerm(path, alias, entityType) || getCommunicationAnnotationTerm(path, alias);
|
|
667
686
|
}
|
|
668
687
|
/**
|
|
669
|
-
* Evaluates the target annotation of a reference facet and actualizes the facets for the config
|
|
670
|
-
*
|
|
671
|
-
* @param
|
|
672
|
-
* @param
|
|
673
|
-
* @param
|
|
688
|
+
* Evaluates the target annotation of a reference facet and actualizes the facets for the config.
|
|
689
|
+
*
|
|
690
|
+
* @param section - The section object in the app schema to be updated with annotation information.
|
|
691
|
+
* @param annotationRecord - the actual annotation record
|
|
692
|
+
* @param facets - list of facets in config format, to be updated
|
|
693
|
+
* @param entityType - the entity type
|
|
694
|
+
* @param oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
674
695
|
*/
|
|
675
696
|
function evaluateTargetAnnotation(section, annotationRecord, facets, entityType, oDataServiceAVT) {
|
|
676
697
|
const alias = findAlias(ux_specification_types_1.UIVOCABULARY, oDataServiceAVT);
|
|
@@ -767,6 +788,7 @@ function evaluateTargetAnnotation(section, annotationRecord, facets, entityType,
|
|
|
767
788
|
}
|
|
768
789
|
/**
|
|
769
790
|
* Method returns schema annotation path for passed fullyQualifiedName.
|
|
791
|
+
*
|
|
770
792
|
* @param {EntityType} entityType entity type.
|
|
771
793
|
* @param {string} fullyQualifiedName fully qualifier name.
|
|
772
794
|
* @returns {TemplateType} Schema annotation path.
|
|
@@ -775,14 +797,15 @@ function getAnnotationPathUsingFullyQualifiedName(entityType, fullyQualifiedName
|
|
|
775
797
|
return `/${entityType.fullyQualifiedName}/${fullyQualifiedName.split(entityType.fullyQualifiedName)[1]}`;
|
|
776
798
|
}
|
|
777
799
|
/**
|
|
778
|
-
* Adds the information from facets to the config
|
|
779
|
-
*
|
|
780
|
-
* @param
|
|
781
|
-
* @param
|
|
782
|
-
* @param
|
|
783
|
-
* @param
|
|
784
|
-
* @param
|
|
785
|
-
* @param
|
|
800
|
+
* Adds the information from facets to the config.
|
|
801
|
+
*
|
|
802
|
+
* @param annotationRecord - the actual annotation record
|
|
803
|
+
* @param oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
804
|
+
* @param serviceName - name of the service of the app
|
|
805
|
+
* @param entityType - The entity type to be used for resolving facets
|
|
806
|
+
* @param facets - list of facets in config format, to be updated
|
|
807
|
+
* @param oDataVersion - OData version
|
|
808
|
+
* @param logger - Logger class for logging messages
|
|
786
809
|
*/
|
|
787
810
|
function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entityType, facets, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, logger) {
|
|
788
811
|
const section = getSectionFacet(annotationRecord, entityType, oDataServiceAVT, logger, oDataVersion, false);
|
|
@@ -817,11 +840,13 @@ function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entity
|
|
|
817
840
|
}
|
|
818
841
|
}
|
|
819
842
|
/**
|
|
820
|
-
* Retrieve header facet configurations that can be used to generate ObjectPage schemas
|
|
821
|
-
*
|
|
822
|
-
* @param
|
|
823
|
-
* @param
|
|
824
|
-
* @param
|
|
843
|
+
* Retrieve header facet configurations that can be used to generate ObjectPage schemas.
|
|
844
|
+
*
|
|
845
|
+
* @param entityType - The entity type to be used for resolving facets
|
|
846
|
+
* @param oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
847
|
+
* @param oDataVersion - OData version
|
|
848
|
+
* @param logger - Logger class for logging messages
|
|
849
|
+
* @returns - header facet configurations
|
|
825
850
|
*/
|
|
826
851
|
function getObjectPageHeaderFacets(entityType, oDataServiceAVT, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, logger) {
|
|
827
852
|
const facets = {};
|
|
@@ -841,11 +866,13 @@ function getObjectPageHeaderFacets(entityType, oDataServiceAVT, oDataVersion = u
|
|
|
841
866
|
return facets;
|
|
842
867
|
}
|
|
843
868
|
/**
|
|
844
|
-
* Retrieve facet configurations that can be used to generate ObjectPage schemas
|
|
845
|
-
*
|
|
846
|
-
* @param
|
|
869
|
+
* Retrieve facet configurations that can be used to generate ObjectPage schemas.
|
|
870
|
+
*
|
|
871
|
+
* @param entityType - The entity type to be used for resolving facets
|
|
872
|
+
* @param oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
847
873
|
* @param {FioriElementsVersion} oDataVersion - OData version
|
|
848
874
|
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
875
|
+
* @returns - facet configurations
|
|
849
876
|
*/
|
|
850
877
|
function getObjectPageFacets(entityType, oDataServiceAVT, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, logger) {
|
|
851
878
|
const facets = {};
|
|
@@ -865,7 +892,8 @@ function getObjectPageFacets(entityType, oDataServiceAVT, oDataVersion = ux_spec
|
|
|
865
892
|
return facets;
|
|
866
893
|
}
|
|
867
894
|
/**
|
|
868
|
-
* Returns the version of Fiori elements (v2/v4) from a given manifest
|
|
895
|
+
* Returns the version of Fiori elements (v2/v4) from a given manifest.
|
|
896
|
+
*
|
|
869
897
|
* @param manifest - the manifest.json file
|
|
870
898
|
* @returns FioriElementsVersion
|
|
871
899
|
*/
|
|
@@ -878,7 +906,10 @@ function getFEVersionFromManifest(manifest) {
|
|
|
878
906
|
const targets = manifest[ux_specification_types_1.ManifestSection.ui5]?.routing?.targets;
|
|
879
907
|
const libs = manifest[ux_specification_types_1.ManifestSection.ui5]?.dependencies?.libs;
|
|
880
908
|
if ((targets &&
|
|
881
|
-
Object.keys(targets).find((targetKey) =>
|
|
909
|
+
Object.keys(targets).find((targetKey) => {
|
|
910
|
+
const name = typeof targets[targetKey].name === 'string' ? targets[targetKey].name : '';
|
|
911
|
+
return exports.V4_TEMPLATES.indexOf(name) > -1 || convertTemplateNameToPageTypeV4(name);
|
|
912
|
+
})) ||
|
|
882
913
|
(libs && Object.keys(libs).find((lib) => exports.V4_LIBS.indexOf(lib) > -1))) {
|
|
883
914
|
return ux_specification_types_1.FioriElementsVersion.v4;
|
|
884
915
|
}
|
|
@@ -904,7 +935,8 @@ function getMainService(manifest) {
|
|
|
904
935
|
: undefined;
|
|
905
936
|
}
|
|
906
937
|
/**
|
|
907
|
-
* Returns the oData version of the service (if any) from a given manifest
|
|
938
|
+
* Returns the oData version of the service (if any) from a given manifest.
|
|
939
|
+
*
|
|
908
940
|
* @param manifest - the manifest.json file
|
|
909
941
|
* @returns the OData version
|
|
910
942
|
*/
|
|
@@ -917,10 +949,11 @@ function getODataVersionFromManifest(manifest) {
|
|
|
917
949
|
return dataSource?.settings?.odataVersion === '4.0' ? ux_specification_types_1.OdataVersion.v4 : ux_specification_types_1.OdataVersion.v2;
|
|
918
950
|
}
|
|
919
951
|
/**
|
|
920
|
-
* Determines the template type of a V2 app
|
|
952
|
+
* Determines the template type of a V2 app.
|
|
953
|
+
*
|
|
921
954
|
* @param manifest - the manifest.json file
|
|
922
955
|
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
923
|
-
* @returns
|
|
956
|
+
* @returns the template type
|
|
924
957
|
*/
|
|
925
958
|
function determineV2Template(manifest, logger) {
|
|
926
959
|
let templateType;
|
|
@@ -964,7 +997,8 @@ function determineV2Template(manifest, logger) {
|
|
|
964
997
|
return templateType;
|
|
965
998
|
}
|
|
966
999
|
/**
|
|
967
|
-
* Determines the template type of a single page
|
|
1000
|
+
* Determines the template type of a single page.
|
|
1001
|
+
*
|
|
968
1002
|
* @param v4Page - single page from routing targets
|
|
969
1003
|
* @returns {TemplateType | undefined} the template type
|
|
970
1004
|
*/
|
|
@@ -993,7 +1027,8 @@ function determineV4PageTemplateType(v4Page) {
|
|
|
993
1027
|
return templateType;
|
|
994
1028
|
}
|
|
995
1029
|
/**
|
|
996
|
-
* Determines the template type, based on the given manifest routing target entries of the app
|
|
1030
|
+
* Determines the template type, based on the given manifest routing target entries of the app.
|
|
1031
|
+
*
|
|
997
1032
|
* @param v4Pages - pages from routing targets
|
|
998
1033
|
* @returns {TemplateType | undefined} the template type
|
|
999
1034
|
*/
|
|
@@ -1009,7 +1044,8 @@ function determineV4TemplateFromPages(v4Pages) {
|
|
|
1009
1044
|
return templateType;
|
|
1010
1045
|
}
|
|
1011
1046
|
/**
|
|
1012
|
-
* Determines the template type of a V4 app
|
|
1047
|
+
* Determines the template type of a V4 app.
|
|
1048
|
+
*
|
|
1013
1049
|
* @param manifest - the manifest.json file
|
|
1014
1050
|
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
1015
1051
|
* @returns {TemplateType} the template type
|
|
@@ -1044,7 +1080,8 @@ function determineV4Template(manifest, logger) {
|
|
|
1044
1080
|
return templateType;
|
|
1045
1081
|
}
|
|
1046
1082
|
/**
|
|
1047
|
-
* Determines the template type, based on the given manifest entries of the app
|
|
1083
|
+
* Determines the template type, based on the given manifest entries of the app.
|
|
1084
|
+
*
|
|
1048
1085
|
* @param manifest - the manifest.json file
|
|
1049
1086
|
* @param {FioriElementsVersion} fioriElementsVersion - OData or FE version
|
|
1050
1087
|
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
@@ -1064,7 +1101,8 @@ function getTemplateTypeFromManifest(manifest, fioriElementsVersion, logger) {
|
|
|
1064
1101
|
return templateType;
|
|
1065
1102
|
}
|
|
1066
1103
|
/**
|
|
1067
|
-
* Adds title to a section or header section in an app schema
|
|
1104
|
+
* Adds title to a section or header section in an app schema.
|
|
1105
|
+
*
|
|
1068
1106
|
* @param facet - intermediate facet structure comprising annotation information
|
|
1069
1107
|
* @param section - section in the app schema
|
|
1070
1108
|
* @param facetKey - key of the facet
|
|
@@ -1080,7 +1118,8 @@ function addSectionTitle(facet, section, facetKey) {
|
|
|
1080
1118
|
}
|
|
1081
1119
|
}
|
|
1082
1120
|
/**
|
|
1083
|
-
* Adds description to a section or header section in an app schema
|
|
1121
|
+
* Adds description to a section or header section in an app schema.
|
|
1122
|
+
*
|
|
1084
1123
|
* @param facet - intermediate facet structure comprising annotation information
|
|
1085
1124
|
* @param section - section in the app schema
|
|
1086
1125
|
* @param facetKey - key of the facet
|
|
@@ -1097,7 +1136,8 @@ function addSectionDescription(facet, section, facetKey) {
|
|
|
1097
1136
|
}
|
|
1098
1137
|
}
|
|
1099
1138
|
/**
|
|
1100
|
-
* Adds target title or description to a section or header section in an app schema
|
|
1139
|
+
* Adds target title or description to a section or header section in an app schema.
|
|
1140
|
+
*
|
|
1101
1141
|
* @param facet - intermediate facet structure comprising annotation information
|
|
1102
1142
|
* @param section - section in the app schema
|
|
1103
1143
|
* @param facetKey - key of the facet
|
|
@@ -1119,10 +1159,10 @@ function addTargetTitleAndSectionDescription(facet, section, facetKey) {
|
|
|
1119
1159
|
}
|
|
1120
1160
|
}
|
|
1121
1161
|
/**
|
|
1122
|
-
* Adds chart (S)PV header facet ID, in case chart has no title
|
|
1162
|
+
* Adds chart (S)PV header facet ID, in case chart has no title.
|
|
1163
|
+
*
|
|
1123
1164
|
* @param facet - intermediate facet structure comprising annotation information
|
|
1124
1165
|
* @param section - section in the app schema
|
|
1125
|
-
* @param facetKey - key of the facet
|
|
1126
1166
|
*/
|
|
1127
1167
|
function addChartFacetID(facet, section) {
|
|
1128
1168
|
if (facet?.ID && section.description?.startsWith('Chart#')) {
|
|
@@ -1131,7 +1171,10 @@ function addChartFacetID(facet, section) {
|
|
|
1131
1171
|
}
|
|
1132
1172
|
/**
|
|
1133
1173
|
* Creates a default object for a new section or subsection, and adds the ID as title if present.
|
|
1134
|
-
*
|
|
1174
|
+
*
|
|
1175
|
+
* @param appSchema - The application-specific JSON schema.
|
|
1176
|
+
* @param facet - Facet configuration, to be analyzed.
|
|
1177
|
+
* @param facetKey - The key of the facet.
|
|
1135
1178
|
* @returns the new section object
|
|
1136
1179
|
*/
|
|
1137
1180
|
function createDefaultSection(appSchema, facet, facetKey) {
|
|
@@ -1147,12 +1190,13 @@ function createDefaultSection(appSchema, facet, facetKey) {
|
|
|
1147
1190
|
}
|
|
1148
1191
|
/**
|
|
1149
1192
|
* Retrieve page section data(so far id/key and label/description).
|
|
1193
|
+
*
|
|
1150
1194
|
* @param {EntityType} entityType The actual entityType
|
|
1151
1195
|
* @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
1152
1196
|
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
1153
1197
|
* @param {FioriElementsVersion} oDataVersion - OData version
|
|
1154
|
-
* @param {boolean} [checkUnresolvableFacets
|
|
1155
|
-
* @returns
|
|
1198
|
+
* @param {boolean} [checkUnresolvableFacets] - Check and avoid facets and sections without ID and Target.
|
|
1199
|
+
* @returns - Array of facets or sections
|
|
1156
1200
|
*/
|
|
1157
1201
|
function getObjectPageFacetSection(entityType, oDataServiceAVT, logger, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, checkUnresolvableFacets = false) {
|
|
1158
1202
|
const alias = findAlias(ux_specification_types_1.UIVOCABULARY, oDataServiceAVT);
|
|
@@ -1175,7 +1219,8 @@ function getObjectPageFacetSection(entityType, oDataServiceAVT, logger, oDataVer
|
|
|
1175
1219
|
}
|
|
1176
1220
|
}
|
|
1177
1221
|
/**
|
|
1178
|
-
* Cleans empty sub-structures from the export result for manifest
|
|
1222
|
+
* Cleans empty sub-structures from the export result for manifest.
|
|
1223
|
+
*
|
|
1179
1224
|
* @param {object} manifest - manifest.json part of the export result
|
|
1180
1225
|
* @param {string} path - path in the manifest
|
|
1181
1226
|
* @param {boolean} deletionRequest - if set to true, any manifest setting specified by entityPath gets deleted even if it comprises any unknown property
|
|
@@ -1221,8 +1266,9 @@ const deleteEmptyStructure = (manifest, path, deletionRequest, entityPathArray,
|
|
|
1221
1266
|
exports.deleteEmptyStructure = deleteEmptyStructure;
|
|
1222
1267
|
/**
|
|
1223
1268
|
* Method which returns generic schema file name.
|
|
1269
|
+
*
|
|
1224
1270
|
* @param {SchemaType | PageTypeV2} schemaType Schema type or Page type.
|
|
1225
|
-
* @
|
|
1271
|
+
* @returns {string} File name of generic schema.
|
|
1226
1272
|
*/
|
|
1227
1273
|
const getGenericSchemaFileName = (schemaType) => {
|
|
1228
1274
|
if (schemaType === ux_specification_types_1.SchemaType.FreestylePage) {
|
|
@@ -1236,9 +1282,11 @@ const getGenericSchemaFileName = (schemaType) => {
|
|
|
1236
1282
|
};
|
|
1237
1283
|
/**
|
|
1238
1284
|
* Method which returns schema file name and path depending on passed schema or page type.
|
|
1285
|
+
*
|
|
1239
1286
|
* @param {SchemaType | PageTypeV2} schemaType Schema type or Page type.
|
|
1240
1287
|
* @param {string} [pageId] target page id from manifest.json
|
|
1241
|
-
* @
|
|
1288
|
+
* @param viewId - The view ID for custom pages (optional).
|
|
1289
|
+
* @returns {SchemaFilePath} File path info.
|
|
1242
1290
|
*/
|
|
1243
1291
|
const getSchemaFilePath = (schemaType, pageId, viewId) => {
|
|
1244
1292
|
const schemaFile = {
|
|
@@ -1288,6 +1336,7 @@ const getSchemaFilePath = (schemaType, pageId, viewId) => {
|
|
|
1288
1336
|
exports.getSchemaFilePath = getSchemaFilePath;
|
|
1289
1337
|
/**
|
|
1290
1338
|
* Method which generates id of page according to passed parameters
|
|
1339
|
+
*
|
|
1291
1340
|
* @param appVersion - Fiori Elements version - V2 or V4
|
|
1292
1341
|
* @param pageType - Page type
|
|
1293
1342
|
* @param entitySet - Entity Set
|
|
@@ -1295,6 +1344,15 @@ exports.getSchemaFilePath = getSchemaFilePath;
|
|
|
1295
1344
|
* @param pageName - Page name in manifest. Used if entitySet is empty
|
|
1296
1345
|
* @returns {string} Generated page id
|
|
1297
1346
|
*/
|
|
1347
|
+
/**
|
|
1348
|
+
* Generates a unique page ID based on the provided parameters.
|
|
1349
|
+
*
|
|
1350
|
+
* @param pageType - The type of the page (e.g., ListReport, ObjectPage, etc.).
|
|
1351
|
+
* @param entitySet - The entity set associated with the page.
|
|
1352
|
+
* @param viewId - The view ID for custom pages (optional).
|
|
1353
|
+
* @param pageName - The name of the page in the manifest (used if entitySet is empty).
|
|
1354
|
+
* @returns The generated page ID as a string.
|
|
1355
|
+
*/
|
|
1298
1356
|
function generatePageId(pageType, entitySet, viewId, pageName) {
|
|
1299
1357
|
if (pageType === ux_specification_types_1.PageTypeV2.CustomPage) {
|
|
1300
1358
|
const names = viewId && viewId.split('.');
|
|
@@ -1312,6 +1370,7 @@ function generatePageId(pageType, entitySet, viewId, pageName) {
|
|
|
1312
1370
|
}
|
|
1313
1371
|
/**
|
|
1314
1372
|
* Method finds matching objects against passed interface of 'additionalProperties' and returns array of matching object keys.
|
|
1373
|
+
*
|
|
1315
1374
|
* @param {Definition} appSchema - App-specific JSON schema.
|
|
1316
1375
|
* @param {Definition} additionalProperties - Allowed additional properties.
|
|
1317
1376
|
* @param {object} configObject -Container object to find matching childs.
|
|
@@ -1346,11 +1405,11 @@ function findMatchingKeysByAdditionalProperties(appSchema, additionalProperties,
|
|
|
1346
1405
|
/**
|
|
1347
1406
|
* Populates a given array with definitions from an application's schema that match certain conditions defined by the current configuration object and element reference.
|
|
1348
1407
|
*
|
|
1349
|
-
* @param
|
|
1350
|
-
* @param
|
|
1351
|
-
* @param
|
|
1352
|
-
* @param
|
|
1353
|
-
*
|
|
1408
|
+
* @param element - The element containing a reference ($ref) to a specific definition within the application schema.
|
|
1409
|
+
* @param appSchema - The application's schema object containing all definitions.
|
|
1410
|
+
* @param currentConfigObject - The current configuration object which is evaluated against the schema definitions.
|
|
1411
|
+
* @param definitionArray - The array to which matching definitions are added based on the evaluation.
|
|
1412
|
+
* This function does not return any value but modifies the definitionArray parameter by adding appropriate definitions.
|
|
1354
1413
|
*/
|
|
1355
1414
|
function fillArrayFromAnyOfReference(element, appSchema, currentConfigObject, definitionArray) {
|
|
1356
1415
|
const $ref = element.$ref;
|
|
@@ -1382,7 +1441,8 @@ function fillArrayFromAnyOfReference(element, appSchema, currentConfigObject, de
|
|
|
1382
1441
|
}
|
|
1383
1442
|
}
|
|
1384
1443
|
/**
|
|
1385
|
-
* Fills an array of next definitions from given references in the JSON schema
|
|
1444
|
+
* Fills an array of next definitions from given references in the JSON schema.
|
|
1445
|
+
*
|
|
1386
1446
|
* @param propertyDefinition - Definition of the current property in schema
|
|
1387
1447
|
* @param currentConfigObject - Current object in the config JSON. Evaluated to get the right value of a controlling property,
|
|
1388
1448
|
* for making the right choice in case of multiple options (anyOf)
|
|
@@ -1408,7 +1468,8 @@ function fillArrayFromPropertyDefinition(propertyDefinition, currentConfigObject
|
|
|
1408
1468
|
}
|
|
1409
1469
|
/**
|
|
1410
1470
|
* Determines the next definition to be handled, based on the definition array.
|
|
1411
|
-
* It also creates the Metadata instance for the next definition, to subsequently access metadata like the syncRule
|
|
1471
|
+
* It also creates the Metadata instance for the next definition, to subsequently access metadata like the syncRule.
|
|
1472
|
+
*
|
|
1412
1473
|
* @param definitionArray - Array of definitions, as determined by fillArrayFromNextDefinition
|
|
1413
1474
|
* @param appSchema - app-specific JSON schema
|
|
1414
1475
|
* @param title - default title
|
|
@@ -1428,7 +1489,10 @@ function determineNextDefinitionFromDefinitionArray(definitionArray, appSchema,
|
|
|
1428
1489
|
if (definitionArray.length) {
|
|
1429
1490
|
const lastDefinition = definitionArray[definitionArray.length - 1];
|
|
1430
1491
|
nextDefinition.targetDefinition = appSchema['definitions'][lastDefinition];
|
|
1431
|
-
|
|
1492
|
+
// check for existence of nextDefinition?.targetDefinition?.['properties'] is necessary only for the action groups
|
|
1493
|
+
// as they have action definitions as a property and these definitions must be processed
|
|
1494
|
+
if ((!nextDefinition?.targetDefinition?.['properties'] && nextDefinition?.targetDefinition?.['$ref']) ||
|
|
1495
|
+
nextDefinition?.targetDefinition?.['type'] === 'array') {
|
|
1432
1496
|
nextDefinition = getNextTargetDefinition(appSchema, title, currentConfigObject, nextDefinition.targetDefinition, key, factory, pageType);
|
|
1433
1497
|
return nextDefinition;
|
|
1434
1498
|
}
|
|
@@ -1460,7 +1524,8 @@ function determineNextDefinitionFromDefinitionArray(definitionArray, appSchema,
|
|
|
1460
1524
|
return nextDefinition;
|
|
1461
1525
|
}
|
|
1462
1526
|
/**
|
|
1463
|
-
* Recursive function to determine the next config part, next definition in the app schema and the title
|
|
1527
|
+
* Recursive function to determine the next config part, next definition in the app schema and the title.
|
|
1528
|
+
*
|
|
1464
1529
|
* @param appSchema - app-specific JSON schema
|
|
1465
1530
|
* @param title - default title
|
|
1466
1531
|
* @param currentConfigObject - current part of the configuration that gets traversed
|
|
@@ -1468,6 +1533,7 @@ function determineNextDefinitionFromDefinitionArray(definitionArray, appSchema,
|
|
|
1468
1533
|
* @param key - actual key
|
|
1469
1534
|
* @param {MetadataInstanceInterface} factory - factory for creating metadata instances
|
|
1470
1535
|
* @param pageType - page type
|
|
1536
|
+
* @returns {NextDefinition} - Next target definition to process
|
|
1471
1537
|
*/
|
|
1472
1538
|
function getNextTargetDefinition(appSchema, title, currentConfigObject, propertyDefinition, key, factory, pageType) {
|
|
1473
1539
|
let nextDefinition;
|
|
@@ -1483,12 +1549,12 @@ function getNextTargetDefinition(appSchema, title, currentConfigObject, property
|
|
|
1483
1549
|
return nextDefinition;
|
|
1484
1550
|
}
|
|
1485
1551
|
/**
|
|
1486
|
-
* Custom array merge function called by deepmerge's merge function
|
|
1552
|
+
* Custom array merge function called by deepmerge's merge function.
|
|
1487
1553
|
*
|
|
1488
1554
|
* @param {*} target Target array
|
|
1489
1555
|
* @param {*} source Source array
|
|
1490
1556
|
* @param {*} options options object provided by deepmerge's merge function
|
|
1491
|
-
* @returns
|
|
1557
|
+
* @returns {string[]} Combined array with unique elements from both target and source arrays.
|
|
1492
1558
|
*/
|
|
1493
1559
|
const arrayCombineMerge = (target, source, options) => {
|
|
1494
1560
|
const destination = target.slice();
|
|
@@ -1507,7 +1573,8 @@ const arrayCombineMerge = (target, source, options) => {
|
|
|
1507
1573
|
};
|
|
1508
1574
|
exports.arrayCombineMerge = arrayCombineMerge;
|
|
1509
1575
|
/**
|
|
1510
|
-
* Converts an enum into a CSV
|
|
1576
|
+
* Converts an enum into a CSV.
|
|
1577
|
+
*
|
|
1511
1578
|
* @param {object} manifestSection - manifestSection where the key exists
|
|
1512
1579
|
* @param {object} configPart - Property as mentioned in config file
|
|
1513
1580
|
* @param {string} key - Property to be exported to manifest
|
|
@@ -1519,7 +1586,8 @@ function convertEnumToCSV(manifestSection, configPart, key) {
|
|
|
1519
1586
|
manifestSection[key] = field.join();
|
|
1520
1587
|
}
|
|
1521
1588
|
/**
|
|
1522
|
-
* Converts an action ID from the internal format (schema, config) to the stable ID representation
|
|
1589
|
+
* Converts an action ID from the internal format (schema, config) to the stable ID representation.
|
|
1590
|
+
*
|
|
1523
1591
|
* @param actionId - the (unique) internal format of the action ID
|
|
1524
1592
|
* @returns the converted action ID
|
|
1525
1593
|
*/
|
|
@@ -1530,7 +1598,8 @@ function convertActionKeyToStableId(actionId) {
|
|
|
1530
1598
|
return (actionId.indexOf('??') > -1 ? actionId.split('??')[1] : actionId).replace(/@/g, '::');
|
|
1531
1599
|
}
|
|
1532
1600
|
/**
|
|
1533
|
-
* Method returns definition key for passed '$ref' property by removing 'definition' prefix
|
|
1601
|
+
* Method returns definition key for passed '$ref' property by removing 'definition' prefix.
|
|
1602
|
+
*
|
|
1534
1603
|
* @param {string} $ref Definition reference.
|
|
1535
1604
|
* @returns Definition key.
|
|
1536
1605
|
*/
|
|
@@ -1539,6 +1608,7 @@ function getDefinitionKey($ref) {
|
|
|
1539
1608
|
}
|
|
1540
1609
|
/**
|
|
1541
1610
|
* Method returns definition $ref' property for passed definition key.
|
|
1611
|
+
*
|
|
1542
1612
|
* @param {string} key Definition key.
|
|
1543
1613
|
* @returns Definition reference.
|
|
1544
1614
|
*/
|
|
@@ -1580,6 +1650,7 @@ function updatePropertyIndices(schema, order) {
|
|
|
1580
1650
|
}
|
|
1581
1651
|
/**
|
|
1582
1652
|
* Method to get value for passed path in passed object.
|
|
1653
|
+
*
|
|
1583
1654
|
* @param obj Object to check.
|
|
1584
1655
|
* @param paths Path for searching property/value.
|
|
1585
1656
|
* @returns Found value for passed path.
|
|
@@ -1601,8 +1672,9 @@ function getJSONPropertyByPath(obj, paths) {
|
|
|
1601
1672
|
return current;
|
|
1602
1673
|
}
|
|
1603
1674
|
/**
|
|
1604
|
-
* Method to remove namespaces
|
|
1605
|
-
*
|
|
1675
|
+
* Method to remove namespaces.
|
|
1676
|
+
*
|
|
1677
|
+
* @param sId - The string identifier to process and remove namespaces from.
|
|
1606
1678
|
* @returns {string} modified string without namespace
|
|
1607
1679
|
*/
|
|
1608
1680
|
function removeNamespaces(sId) {
|
|
@@ -1611,8 +1683,9 @@ function removeNamespaces(sId) {
|
|
|
1611
1683
|
return sId;
|
|
1612
1684
|
}
|
|
1613
1685
|
/**
|
|
1614
|
-
* Method to replace namespaces with short hand form
|
|
1615
|
-
*
|
|
1686
|
+
* Method to replace namespaces with short hand form.
|
|
1687
|
+
*
|
|
1688
|
+
* @param {string } sId - The string identifier to process and replace namespaces with shorthand forms.
|
|
1616
1689
|
* @returns {string} modified string with replaced namespaces
|
|
1617
1690
|
*/
|
|
1618
1691
|
function replaceNamespaces(sId) {
|
|
@@ -1632,4 +1705,36 @@ function getRefType(element) {
|
|
|
1632
1705
|
return reference.substring(exports.DEFINITION_LINK_PREFIX.length);
|
|
1633
1706
|
}
|
|
1634
1707
|
}
|
|
1708
|
+
/**
|
|
1709
|
+
* Converts a template name string from 'manifest.json' to a corresponding `PageTypeV4` enum value.
|
|
1710
|
+
*
|
|
1711
|
+
* @param {string} templateName - The name of the template to convert.
|
|
1712
|
+
* @returns {PageTypeV4 | undefined} The corresponding `PageTypeV4` enum value, or `undefined` if no match is found.
|
|
1713
|
+
*/
|
|
1714
|
+
function convertTemplateNameToPageTypeV4(templateName) {
|
|
1715
|
+
if (templateName === ux_specification_types_1.v4.FE_TEMPLATE_V4_CUSTOM_PAGE) {
|
|
1716
|
+
return ux_specification_types_1.PageTypeV4.FPMCustomPage;
|
|
1717
|
+
}
|
|
1718
|
+
if (templateName?.startsWith(`${ux_specification_types_1.v4.FE_NAMESPACE_V4}.`)) {
|
|
1719
|
+
const parts = templateName.split('.');
|
|
1720
|
+
const pageType = parts[parts.length - 1];
|
|
1721
|
+
if (pageType in ux_specification_types_1.PageTypeV4) {
|
|
1722
|
+
return ux_specification_types_1.PageTypeV4[pageType];
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
/**
|
|
1727
|
+
* Determines whether two template names match either directly or by resolving their corresponding page types.
|
|
1728
|
+
*
|
|
1729
|
+
* @param templateName1 The first template name to compare.
|
|
1730
|
+
* @param templateName2 The second template name to compare.
|
|
1731
|
+
* @returns Returns true if the template names match directly or their page types match; otherwise, false.
|
|
1732
|
+
*/
|
|
1733
|
+
function compareTemplateNames(templateName1, templateName2) {
|
|
1734
|
+
if (templateName1 === templateName2) {
|
|
1735
|
+
return true;
|
|
1736
|
+
}
|
|
1737
|
+
const pageType1 = convertTemplateNameToPageTypeV4(templateName1);
|
|
1738
|
+
return pageType1 ? pageType1 === convertTemplateNameToPageTypeV4(templateName2) : false;
|
|
1739
|
+
}
|
|
1635
1740
|
//# sourceMappingURL=utils.js.map
|