@sap/ux-specification 1.108.55 → 1.108.57
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 +116 -116
- 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 +6 -3
- package/dist/specification/src/sync/common/distTagEvaluator.d.ts.map +1 -1
- package/dist/specification/src/sync/common/distTagEvaluator.js +6 -3
- package/dist/specification/src/sync/common/distTagEvaluator.js.map +1 -1
- package/dist/specification/src/sync/common/flexUtils.d.ts +11 -10
- package/dist/specification/src/sync/common/flexUtils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/flexUtils.js +11 -10
- package/dist/specification/src/sync/common/flexUtils.js.map +1 -1
- package/dist/specification/src/sync/common/generate/objectPage.d.ts +89 -19
- package/dist/specification/src/sync/common/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/common/generate/objectPage.js +223 -89
- package/dist/specification/src/sync/common/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/common/generate/utils.d.ts +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 +264 -150
- 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 +247 -187
- package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/import/app/appProvider.d.ts +18 -4
- package/dist/specification/src/sync/v4/import/app/appProvider.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/app/appProvider.js +56 -24
- package/dist/specification/src/sync/v4/import/app/appProvider.js.map +1 -1
- package/dist/specification/src/sync/v4/import/fragment.d.ts +29 -4
- package/dist/specification/src/sync/v4/import/fragment.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/fragment.js +46 -7
- package/dist/specification/src/sync/v4/import/fragment.js.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.d.ts +3 -2
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.js +7 -2
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.js.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/listReport.d.ts +12 -10
- package/dist/specification/src/sync/v4/import/pages/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/listReport.js +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 +82 -71
- package/dist/specification/src/sync/v4/import/pages/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/import/utils.d.ts +4 -2
- package/dist/specification/src/sync/v4/import/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/utils.js +4 -2
- package/dist/specification/src/sync/v4/import/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/controllerExtensions.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/controllerExtensions.js +5 -2
- package/dist/specification/src/sync/v4/sync-rules/controllerExtensions.js.map +1 -1
- package/dist/specification/src/sync/v4/utils/StableIdHelper.d.ts +33 -0
- package/dist/specification/src/sync/v4/utils/StableIdHelper.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/StableIdHelper.js +42 -53
- package/dist/specification/src/sync/v4/utils/StableIdHelper.js.map +1 -1
- package/dist/specification/src/sync/v4/utils/macros.d.ts +4 -0
- package/dist/specification/src/sync/v4/utils/macros.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/macros.js +17 -1
- package/dist/specification/src/sync/v4/utils/macros.js.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.d.ts +109 -22
- package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.js +372 -159
- package/dist/specification/src/sync/v4/utils/utils.js.map +1 -1
- package/dist/types/src/common/Application.d.ts +6 -0
- package/dist/types/src/common/Application.d.ts.map +1 -1
- package/dist/types/src/common/Application.js +4 -0
- package/dist/types/src/common/Application.js.map +1 -1
- package/dist/types/src/common/types.d.ts +56 -2
- package/dist/types/src/common/types.d.ts.map +1 -1
- package/dist/types/src/common/types.js +7 -1
- package/dist/types/src/common/types.js.map +1 -1
- package/dist/types/src/common/webapp/manifest/sapUi5.d.ts +3 -2
- package/dist/types/src/common/webapp/manifest/sapUi5.d.ts.map +1 -1
- package/dist/types/src/common/webapp/manifest/sapUi5.js +3 -2
- package/dist/types/src/common/webapp/manifest/sapUi5.js.map +1 -1
- package/dist/types/src/v2/application.d.ts +1 -1
- package/dist/types/src/v2/controls/Action.d.ts +12 -0
- package/dist/types/src/v2/controls/Action.d.ts.map +1 -1
- package/dist/types/src/v2/controls/AnalyticalListPageChart.d.ts +1 -0
- package/dist/types/src/v2/controls/AnalyticalListPageChart.d.ts.map +1 -1
- package/dist/types/src/v2/controls/AnalyticalListPageKPI.d.ts +1 -0
- package/dist/types/src/v2/controls/AnalyticalListPageKPI.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Card.d.ts +13 -0
- package/dist/types/src/v2/controls/Card.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Card.js.map +1 -1
- package/dist/types/src/v2/controls/Field.d.ts +1 -0
- package/dist/types/src/v2/controls/Field.d.ts.map +1 -1
- package/dist/types/src/v2/controls/FilterBar.d.ts +6 -0
- package/dist/types/src/v2/controls/FilterBar.d.ts.map +1 -1
- package/dist/types/src/v2/controls/FilterBar.js.map +1 -1
- package/dist/types/src/v2/controls/Header.d.ts +1 -0
- package/dist/types/src/v2/controls/Header.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageChart.d.ts +1 -0
- package/dist/types/src/v2/controls/ObjectPageChart.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageFooter.d.ts +2 -0
- package/dist/types/src/v2/controls/ObjectPageFooter.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageForm.d.ts +1 -0
- package/dist/types/src/v2/controls/ObjectPageForm.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageHeader.d.ts +1 -0
- package/dist/types/src/v2/controls/ObjectPageHeader.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageHeaderSection.d.ts +3 -0
- package/dist/types/src/v2/controls/ObjectPageHeaderSection.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageLayout.d.ts +1 -0
- package/dist/types/src/v2/controls/ObjectPageLayout.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageSection.d.ts +13 -0
- package/dist/types/src/v2/controls/ObjectPageSection.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageSection.js.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageTable.d.ts +6 -0
- package/dist/types/src/v2/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageToolBar.d.ts +2 -0
- package/dist/types/src/v2/controls/ObjectPageToolBar.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Table.d.ts +28 -0
- package/dist/types/src/v2/controls/Table.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Table.js.map +1 -1
- package/dist/types/src/v2/controls/ToolBar.d.ts +1 -0
- package/dist/types/src/v2/controls/ToolBar.d.ts.map +1 -1
- package/dist/types/src/v2/pages/AnalyticalListPageConfigV2.d.ts +1 -0
- package/dist/types/src/v2/pages/AnalyticalListPageConfigV2.d.ts.map +1 -1
- package/dist/types/src/v2/pages/OverviewPageConfigV2.d.ts +4 -0
- package/dist/types/src/v2/pages/OverviewPageConfigV2.d.ts.map +1 -1
- package/dist/types/src/v4/application.d.ts +1 -1
- package/dist/types/src/v4/controls/CustomAction.d.ts +10 -0
- package/dist/types/src/v4/controls/CustomAction.d.ts.map +1 -1
- package/dist/types/src/v4/controls/FilterBar.d.ts +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 +5 -0
- package/dist/types/src/v4/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageTable.js.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageToolBar.d.ts +8 -1
- package/dist/types/src/v4/controls/ObjectPageToolBar.d.ts.map +1 -1
- package/dist/types/src/v4/controls/Table.d.ts +15 -0
- package/dist/types/src/v4/controls/Table.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ToolBar.d.ts +17 -2
- package/dist/types/src/v4/controls/ToolBar.d.ts.map +1 -1
- package/dist/types/src/v4/page.d.ts +4 -0
- package/dist/types/src/v4/page.d.ts.map +1 -1
- package/dist/types/src/v4/webapp/manifest/ManifestSettings.d.ts +22 -0
- package/dist/types/src/v4/webapp/manifest/ManifestSettings.d.ts.map +1 -1
- package/dist/types/src/v4/webapp/manifest/sapUi5.d.ts +3 -0
- package/dist/types/src/v4/webapp/manifest/sapUi5.d.ts.map +1 -1
- package/dist/types/src/v4/webapp/manifest/sapUi5.js.map +1 -1
- package/dist/types/src/v4/webapp/manifest/sapUiPageV4.d.ts +1 -1
- package/dist/types/src/v4/webapp/manifest/sapUiPageV4.d.ts.map +1 -1
- package/dist/types/src/v4/webapp/manifest/sapUiPageV4.js +2 -2
- package/dist/types/src/v4/webapp/manifest/sapUiPageV4.js.map +1 -1
- package/package.json +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"));
|
|
@@ -64,6 +67,7 @@ const arrayIncludes = (arr, target) => target.every((v) => arr.includes(v));
|
|
|
64
67
|
exports.arrayIncludes = arrayIncludes;
|
|
65
68
|
/**
|
|
66
69
|
* Function returns annotation path for schema based on received params.
|
|
70
|
+
*
|
|
67
71
|
* @param entityTypeName - Entity type name.
|
|
68
72
|
* @param term - Annotation term.
|
|
69
73
|
* @param qualifier - Annotation qualifier.
|
|
@@ -81,8 +85,10 @@ const createAnnotationPath = (entityTypeName, term, qualifier) => {
|
|
|
81
85
|
};
|
|
82
86
|
exports.createAnnotationPath = createAnnotationPath;
|
|
83
87
|
/**
|
|
84
|
-
* Parses, merges, and converts a list of annotation files with aid of tools from annotation-vocabularies-tools
|
|
88
|
+
* Parses, merges, and converts a list of annotation files with aid of tools from annotation-vocabularies-tools.
|
|
89
|
+
*
|
|
85
90
|
* @param annotationFiles - The list of all annotation files, in JSON format
|
|
91
|
+
* @param logger - Logger instance used for logging errors or messages during processing
|
|
86
92
|
* @returns the complete service information
|
|
87
93
|
*/
|
|
88
94
|
function parseAndMergeAndConvert(annotationFiles, logger) {
|
|
@@ -112,10 +118,12 @@ function parseAndMergeAndConvert(annotationFiles, logger) {
|
|
|
112
118
|
const getAnnotationPropertyValue = (annotationProperty) => annotationProperty?.value || annotationProperty?.path;
|
|
113
119
|
exports.getAnnotationPropertyValue = getAnnotationPropertyValue;
|
|
114
120
|
/**
|
|
115
|
-
* Checks for Common.Label and overwrites the label from it if present
|
|
121
|
+
* Checks for Common.Label and overwrites the label from it if present.
|
|
122
|
+
*
|
|
116
123
|
* @param {PropertyAnnotations} annotations - property annotations
|
|
117
124
|
* @param {EntityType} entityType - entity type
|
|
118
125
|
* @param {string} label - label, to be actualized
|
|
126
|
+
* @returns label, derived from Common.Label or from property value
|
|
119
127
|
*/
|
|
120
128
|
function evaluateCommonLabel(annotations, entityType, label) {
|
|
121
129
|
if (annotations?.Common?.Label) {
|
|
@@ -138,7 +146,8 @@ function evaluateCommonLabel(annotations, entityType, label) {
|
|
|
138
146
|
return label;
|
|
139
147
|
}
|
|
140
148
|
/**
|
|
141
|
-
* Determines the label for a property path
|
|
149
|
+
* Determines the label for a property path.
|
|
150
|
+
*
|
|
142
151
|
* @param {PropertyPath} propertyPath - property path
|
|
143
152
|
* @param {EntityType} entityType - entity type
|
|
144
153
|
* @returns label, derived from Common.Label or from property value
|
|
@@ -151,9 +160,10 @@ function getLabelForPropertyPath(propertyPath, entityType) {
|
|
|
151
160
|
return label;
|
|
152
161
|
}
|
|
153
162
|
/**
|
|
154
|
-
* Determines the label for a LineItem record
|
|
155
|
-
*
|
|
156
|
-
* @param
|
|
163
|
+
* Determines the label for a LineItem record.
|
|
164
|
+
*
|
|
165
|
+
* @param field - Line item record
|
|
166
|
+
* @param entityType - entity type
|
|
157
167
|
* @returns label, derived from Common.Label or from property value
|
|
158
168
|
*/
|
|
159
169
|
function getLabelForDataField(field, entityType) {
|
|
@@ -183,7 +193,8 @@ function getLabelForDataField(field, entityType) {
|
|
|
183
193
|
return label;
|
|
184
194
|
}
|
|
185
195
|
/**
|
|
186
|
-
* Function to resolve the dataField label
|
|
196
|
+
* Function to resolve the dataField label.
|
|
197
|
+
*
|
|
187
198
|
* @param dataFieldLabel - Given dataField label; might be of type string, or an object in case of a path reference
|
|
188
199
|
* @param entityType - the entity type as part of the AVT ConvertedMetadata
|
|
189
200
|
* @returns undefined or the right string value
|
|
@@ -209,6 +220,34 @@ function getLabel(dataFieldLabel, entityType) {
|
|
|
209
220
|
return undefined;
|
|
210
221
|
}
|
|
211
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* Generates a description for action-based data fields using the provided data field information
|
|
225
|
+
* and its corresponding label.
|
|
226
|
+
*
|
|
227
|
+
* @param {DataFieldForActionAbstractTypes} dataFieldAbstract - Abstract representation of the data field
|
|
228
|
+
* with action-based properties.
|
|
229
|
+
* @param {string} dataFieldLabel - The label associated with the data field, which may influence
|
|
230
|
+
* the generated description.
|
|
231
|
+
* @returns {string} The description derived from the data field label or action name.
|
|
232
|
+
*/
|
|
233
|
+
function getDescriptionForActionBasedDataFields(dataFieldAbstract, dataFieldLabel) {
|
|
234
|
+
const dataField = dataFieldAbstract;
|
|
235
|
+
const actionName = typeof dataField.Action === 'string' ? dataField.Action : dataField.Action?.path;
|
|
236
|
+
if (dataFieldLabel) {
|
|
237
|
+
return typeof dataFieldLabel === 'string' ? dataFieldLabel : actionName;
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
return actionName;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Retrieves the title for a given data field.
|
|
245
|
+
*
|
|
246
|
+
* @param dataField - The data field object containing metadata.
|
|
247
|
+
* @param entityType - The entity type as part of the AVT ConvertedMetadata.
|
|
248
|
+
* @param dataFieldLabel - The label associated with the data field.
|
|
249
|
+
* @returns The title for the data field as a string.
|
|
250
|
+
*/
|
|
212
251
|
function getTitleForDataField(dataField, entityType, dataFieldLabel) {
|
|
213
252
|
const propertyCommonLabel = getLabelForDataField(dataField, entityType);
|
|
214
253
|
return (dataFieldLabel ||
|
|
@@ -216,77 +255,21 @@ function getTitleForDataField(dataField, entityType, dataFieldLabel) {
|
|
|
216
255
|
(dataField.Value.$target ? dataField.Value.$target.name : dataField.Value.value || dataField.Value.path));
|
|
217
256
|
}
|
|
218
257
|
/**
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
* @param entityType - the entity type as part of the AVT ConvertedMetadata
|
|
222
|
-
*/
|
|
223
|
-
function getDataFieldDescription(dataFieldAbstract, entityType) {
|
|
224
|
-
let title = '', propertyCommonLabel, dataField, actionName = '';
|
|
225
|
-
try {
|
|
226
|
-
const dataFieldLabel = getLabel(dataFieldAbstract.Label, entityType);
|
|
227
|
-
switch (dataFieldAbstract.$Type) {
|
|
228
|
-
case "com.sap.vocabularies.UI.v1.DataField" /* UIAnnotationTypes.DataField */:
|
|
229
|
-
title = getTitleForDataField(dataFieldAbstract, entityType, dataFieldLabel);
|
|
230
|
-
break;
|
|
231
|
-
case "com.sap.vocabularies.UI.v1.DataFieldWithUrl" /* UIAnnotationTypes.DataFieldWithUrl */:
|
|
232
|
-
propertyCommonLabel = getLabelForDataField(dataFieldAbstract, entityType);
|
|
233
|
-
title =
|
|
234
|
-
dataFieldLabel ||
|
|
235
|
-
propertyCommonLabel ||
|
|
236
|
-
(typeof dataFieldAbstract.Value === 'string'
|
|
237
|
-
? dataFieldAbstract.Value
|
|
238
|
-
: dataFieldAbstract.Value.path);
|
|
239
|
-
break;
|
|
240
|
-
case "com.sap.vocabularies.UI.v1.DataFieldForAnnotation" /* UIAnnotationTypes.DataFieldForAnnotation */:
|
|
241
|
-
dataField = dataFieldAbstract;
|
|
242
|
-
propertyCommonLabel = getLabelForDataField(dataFieldAbstract, entityType);
|
|
243
|
-
title =
|
|
244
|
-
dataFieldLabel ||
|
|
245
|
-
propertyCommonLabel ||
|
|
246
|
-
dataField.Target?.$target?.Title ||
|
|
247
|
-
dataField.Target?.value.split('UI.v1.')[1];
|
|
248
|
-
break;
|
|
249
|
-
case "com.sap.vocabularies.UI.v1.DataFieldForAction" /* UIAnnotationTypes.DataFieldForAction */:
|
|
250
|
-
case "com.sap.vocabularies.UI.v1.DataFieldWithAction" /* UIAnnotationTypes.DataFieldWithAction */:
|
|
251
|
-
case "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation" /* UIAnnotationTypes.DataFieldForIntentBasedNavigation */:
|
|
252
|
-
dataField = dataFieldAbstract;
|
|
253
|
-
actionName = typeof dataFieldAbstract.Action === 'string' ? dataField.Action : dataField.Action?.path;
|
|
254
|
-
if (dataFieldLabel) {
|
|
255
|
-
title = typeof dataFieldLabel === 'string' ? dataFieldLabel : actionName;
|
|
256
|
-
}
|
|
257
|
-
else {
|
|
258
|
-
title = actionName;
|
|
259
|
-
}
|
|
260
|
-
break;
|
|
261
|
-
case "com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation" /* UIAnnotationTypes.DataFieldWithIntentBasedNavigation */:
|
|
262
|
-
propertyCommonLabel = getLabelForDataField(dataFieldAbstract, entityType);
|
|
263
|
-
title = propertyCommonLabel || dataFieldAbstract.Value.path;
|
|
264
|
-
break;
|
|
265
|
-
case "com.sap.vocabularies.UI.v1.DataFieldWithNavigationPath" /* UIAnnotationTypes.DataFieldWithNavigationPath */:
|
|
266
|
-
dataField = dataFieldAbstract;
|
|
267
|
-
title = getTitleForDataField(dataField, entityType, dataFieldLabel);
|
|
268
|
-
break;
|
|
269
|
-
default:
|
|
270
|
-
break;
|
|
271
|
-
}
|
|
272
|
-
return title;
|
|
273
|
-
}
|
|
274
|
-
catch {
|
|
275
|
-
return title;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* Prepare string for reference use in schema
|
|
258
|
+
* Prepare string for reference use in schema.
|
|
259
|
+
*
|
|
280
260
|
* @param refInput string to be character checked and replaced
|
|
281
261
|
* @returns string with replaced characters
|
|
282
262
|
*/
|
|
283
263
|
//@typescript-eslint/no-wrapper-object-types turned off tor prevent conversion String > string; String is used by AVT
|
|
264
|
+
// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types
|
|
284
265
|
function prepareRef(refInput) {
|
|
285
266
|
return refInput.replace('#', '::').replace(/\//g, ':2f');
|
|
286
267
|
}
|
|
287
268
|
/**
|
|
288
|
-
* Return the page type for a given V2 page in manifest
|
|
269
|
+
* Return the page type for a given V2 page in manifest.
|
|
270
|
+
*
|
|
289
271
|
* @param name - page component name
|
|
272
|
+
* @returns page type
|
|
290
273
|
*/
|
|
291
274
|
function getPageTypeV2(name) {
|
|
292
275
|
if (name) {
|
|
@@ -295,28 +278,34 @@ function getPageTypeV2(name) {
|
|
|
295
278
|
}
|
|
296
279
|
}
|
|
297
280
|
/**
|
|
298
|
-
* Return the page type for a given V4 page in manifest
|
|
299
|
-
*
|
|
281
|
+
* Return the page type for a given V4 page in manifest.
|
|
282
|
+
*
|
|
283
|
+
* @param v4Page - The V4 application page or routing target configuration
|
|
284
|
+
* @returns page type
|
|
300
285
|
*/
|
|
301
|
-
function getPageTypeV4(
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
return
|
|
286
|
+
function getPageTypeV4(v4Page) {
|
|
287
|
+
const pageType = 'name' in v4Page && typeof v4Page.name === 'string' ? convertTemplateNameToPageTypeV4(v4Page.name) : undefined;
|
|
288
|
+
if (pageType) {
|
|
289
|
+
return pageType;
|
|
305
290
|
}
|
|
306
|
-
|
|
307
|
-
return ux_specification_types_1.PageTypeV4.FPMCustomPage;
|
|
308
|
-
}
|
|
309
|
-
else if (v4App.viewId ||
|
|
310
|
-
v4App.viewName) {
|
|
291
|
+
if (('viewId' in v4Page && v4Page.viewId) || ('viewName' in v4Page && v4Page.viewName)) {
|
|
311
292
|
return ux_specification_types_1.PageTypeV4.CustomPage;
|
|
312
293
|
}
|
|
313
294
|
}
|
|
295
|
+
/**
|
|
296
|
+
* Retrieves the name of the target annotation based on the provided annotation object and a flag.
|
|
297
|
+
*
|
|
298
|
+
* @param targetAnnotation - The annotation object containing term and qualifier information.
|
|
299
|
+
* @param keyForRelatedFacetKeys - A flag indicating whether to construct the key for related facet keys without the '@' symbol.
|
|
300
|
+
* @returns The name of the target annotation as a string.
|
|
301
|
+
*/
|
|
314
302
|
function getTargetAnnotationName(targetAnnotation, keyForRelatedFacetKeys = false) {
|
|
315
303
|
const termWithQualifier = `${targetAnnotation.term}#${targetAnnotation.qualifier}`;
|
|
316
304
|
return `${!keyForRelatedFacetKeys ? '@' : ''}${targetAnnotation.qualifier ? termWithQualifier : targetAnnotation.term}`;
|
|
317
305
|
}
|
|
318
306
|
/**
|
|
319
|
-
* Finds the alias for a given namespace in the references' section of the converted service metadata
|
|
307
|
+
* Finds the alias for a given namespace in the references' section of the converted service metadata.
|
|
308
|
+
*
|
|
320
309
|
* @param {string} namespace - complete namespace, e.g. 'com.sap.vocabularies.UI.v1'
|
|
321
310
|
* @param {ConvertedMetadata} oDataServiceAVT - combined service metadata, as returned by annotation vocabularies tools
|
|
322
311
|
* @returns alias for the given namespace
|
|
@@ -343,6 +332,7 @@ function findAlias(namespace, oDataServiceAVT) {
|
|
|
343
332
|
}
|
|
344
333
|
/**
|
|
345
334
|
* Method returns annotation from passed meta path.
|
|
335
|
+
*
|
|
346
336
|
* @param metaPath - annotation meta path
|
|
347
337
|
* @returns annotation name
|
|
348
338
|
*/
|
|
@@ -350,7 +340,8 @@ function getAnnotationFromMetaPath(metaPath) {
|
|
|
350
340
|
return metaPath.substring(metaPath.lastIndexOf('.') + 1, metaPath.length);
|
|
351
341
|
}
|
|
352
342
|
/**
|
|
353
|
-
* Determines the target annotation
|
|
343
|
+
* Determines the target annotation.
|
|
344
|
+
*
|
|
354
345
|
* @param navigationParts - parts of the target annotation path
|
|
355
346
|
* @param entityType - entity type
|
|
356
347
|
* @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
@@ -363,10 +354,12 @@ function determineTargetAnnotation(navigationParts, entityType, oDataServiceAVT)
|
|
|
363
354
|
return entityType?.annotations?.[alias]?.[annotation];
|
|
364
355
|
}
|
|
365
356
|
/**
|
|
366
|
-
* Adjust key by considering navigation
|
|
357
|
+
* Adjust key by considering navigation.
|
|
358
|
+
*
|
|
367
359
|
* @param key - given key
|
|
368
|
-
* @param keyForRelatedFacetKeys - construct key for 'keyForRelatedFacetKeys' property(used to define custom sections) - we should not add '@' symbol there.
|
|
369
360
|
* @param navigationParts - parts of the target annotation path
|
|
361
|
+
* @param keyForRelatedFacetKeys - construct key for 'keyForRelatedFacetKeys' property(used to define custom sections) - we should not add '@' symbol there.
|
|
362
|
+
* @returns adjusted key
|
|
370
363
|
*/
|
|
371
364
|
function adjustKey(key, navigationParts, keyForRelatedFacetKeys) {
|
|
372
365
|
const uiClass = navigationParts[navigationParts.length - 1].split('#')[0];
|
|
@@ -380,6 +373,17 @@ function adjustKey(key, navigationParts, keyForRelatedFacetKeys) {
|
|
|
380
373
|
}
|
|
381
374
|
return key;
|
|
382
375
|
}
|
|
376
|
+
/**
|
|
377
|
+
* Resolves the key and entity type of a reference facet, adjusting the key based on navigation and annotations.
|
|
378
|
+
*
|
|
379
|
+
* @param oDataServiceAVT - The converted metadata of the OData service.
|
|
380
|
+
* @param key - The initial key for the facet.
|
|
381
|
+
* @param entityType - The entity type associated with the facet.
|
|
382
|
+
* @param propertyValue - The property value of the facet's target.
|
|
383
|
+
* @param oDataVersion - The version of OData (v2 or v4).
|
|
384
|
+
* @param keyForRelatedFacetKeys - A flag indicating whether to construct the key for related facet keys without the '@' symbol.
|
|
385
|
+
* @returns An object containing the adjusted key, entity type, a flag to stop processing, and the namespace.
|
|
386
|
+
*/
|
|
383
387
|
function getKeyAndEntityTypeOfReferenceFacet(oDataServiceAVT, key, entityType, propertyValue, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, keyForRelatedFacetKeys = false) {
|
|
384
388
|
let stopProcessing = false;
|
|
385
389
|
let namespace;
|
|
@@ -409,12 +413,14 @@ function getKeyAndEntityTypeOfReferenceFacet(oDataServiceAVT, key, entityType, p
|
|
|
409
413
|
}
|
|
410
414
|
/**
|
|
411
415
|
* Resolve page section(get key and label->description).
|
|
416
|
+
*
|
|
412
417
|
* @param facetDefinition - the actual annotation record
|
|
418
|
+
* @param sourceEntityType - The source entity type to be used for resolving facets
|
|
419
|
+
* @param oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
420
|
+
* @param logger - Logger class for logging messages
|
|
421
|
+
* @param oDataVersion - OData version
|
|
413
422
|
* @param keyForRelatedFacetKeys - construct key for 'keyForRelatedFacetKeys' property(used to define custom sections) - we should not add '@' symbol there.
|
|
414
|
-
* @
|
|
415
|
-
* @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
416
|
-
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
417
|
-
* @returns {FacetSection} - object comprising the relevant facet information
|
|
423
|
+
* @returns - object comprising the relevant facet information
|
|
418
424
|
*/
|
|
419
425
|
function getSectionFacet(facetDefinition, sourceEntityType, oDataServiceAVT, logger, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, keyForRelatedFacetKeys = false) {
|
|
420
426
|
//Take facet ID as fallback
|
|
@@ -455,7 +461,8 @@ function getSectionFacet(facetDefinition, sourceEntityType, oDataServiceAVT, log
|
|
|
455
461
|
}
|
|
456
462
|
}
|
|
457
463
|
/**
|
|
458
|
-
* Decodes encoded path element and returns it in form as used in manifest settings
|
|
464
|
+
* Decodes encoded path element and returns it in form as used in manifest settings.
|
|
465
|
+
*
|
|
459
466
|
* @param {string} pathElement - path of the property in the manifest
|
|
460
467
|
* @param {string} targetAnnotation - target annotation (optional)
|
|
461
468
|
* @param {string} targetAnnotationEncoded - target annotation in its encoded form, as used in manifest settings (optional)
|
|
@@ -474,6 +481,7 @@ function getDecodedPathElement(pathElement, targetAnnotation, targetAnnotationEn
|
|
|
474
481
|
/**
|
|
475
482
|
* Method prepares value as empty object or array based on passed path.
|
|
476
483
|
* For array path should end with '[]'.
|
|
484
|
+
*
|
|
477
485
|
* @param {string} path - path of the property in the manifest
|
|
478
486
|
* @returns prepared value based on passed path
|
|
479
487
|
*/
|
|
@@ -488,12 +496,13 @@ exports.prepareValueForPath = prepareValueForPath;
|
|
|
488
496
|
* Method find object by given path in format "sap.ui5/extends/extensions".
|
|
489
497
|
* An empty object is created if the path element does not exist yet.
|
|
490
498
|
* Exception: if an empty array is the next element of the 'path' definition, an empty array is created instead of an empty object.
|
|
499
|
+
*
|
|
491
500
|
* @param {object} manifest - manifest that is being modified during export
|
|
492
501
|
* @param {string} path - path of the property in the manifest
|
|
493
502
|
* @param {string} targetAnnotation - target annotation (optional)
|
|
494
503
|
* @param {string} targetAnnotationEncoded - target annotation in its encoded form, as used in manifest settings
|
|
495
504
|
* @param {boolean} value - specific value to apply for unexisting property for given path
|
|
496
|
-
* @param {boolean} [readOnly
|
|
505
|
+
* @param {boolean} [readOnly] - indicates if the function should create object/array if existing value not found by given path
|
|
497
506
|
* @returns returns section of the manifest based on path
|
|
498
507
|
*/
|
|
499
508
|
const resolveManifestPath = (manifest, path, targetAnnotation, targetAnnotationEncoded, value, readOnly = false) => {
|
|
@@ -531,11 +540,12 @@ const resolveManifestPath = (manifest, path, targetAnnotation, targetAnnotationE
|
|
|
531
540
|
* Finds the alias for a given namespace in the references' section of the converted service metadata.
|
|
532
541
|
* An empty object is created if the path element does not exist yet.
|
|
533
542
|
* Exception: if an empty array is the next element of the 'path' definition, an empty array is created instead of an empty object.
|
|
543
|
+
*
|
|
534
544
|
* @param {object} manifest - manifest that is being modified during export
|
|
535
545
|
* @param {string} path - path of the property in the manifest
|
|
536
546
|
* @param {string} targetAnnotation - target annotation (optional)
|
|
537
547
|
* @param {string} targetAnnotationEncoded - target annotation in its encoded form, as used in manifest settings
|
|
538
|
-
* @param {boolean} [readOnly
|
|
548
|
+
* @param {boolean} [readOnly] - indicates if the function should create object/array if existing value not found by given path
|
|
539
549
|
* @returns returns section of the manifest based on path, generates an empty object in case it does not exists
|
|
540
550
|
*/
|
|
541
551
|
const getManifestSectionByPathV4 = (manifest, path, targetAnnotation, targetAnnotationEncoded, readOnly = false) => {
|
|
@@ -544,6 +554,7 @@ const getManifestSectionByPathV4 = (manifest, path, targetAnnotation, targetAnno
|
|
|
544
554
|
exports.getManifestSectionByPathV4 = getManifestSectionByPathV4;
|
|
545
555
|
/**
|
|
546
556
|
* Method sets value for passed path in manifest.
|
|
557
|
+
*
|
|
547
558
|
* @param {object} manifest - manifest that is being modified during export
|
|
548
559
|
* @param {string} path - path of the property in the manifest
|
|
549
560
|
* @param {unknown} value - value to apply
|
|
@@ -554,6 +565,12 @@ const setManifestSectionByPathV4 = (manifest, path, value, targetAnnotation, tar
|
|
|
554
565
|
resolveManifestPath(manifest, path, targetAnnotation, targetAnnotationEncoded, value);
|
|
555
566
|
};
|
|
556
567
|
exports.setManifestSectionByPathV4 = setManifestSectionByPathV4;
|
|
568
|
+
/**
|
|
569
|
+
* Retrieves the schema key for a given line item record based on its type and properties.
|
|
570
|
+
*
|
|
571
|
+
* @param lineItemRecord - The line item record to process.
|
|
572
|
+
* @returns The schema key as a string, or undefined if no key is determined.
|
|
573
|
+
*/
|
|
557
574
|
function getSchemaKeyOfLineItemRecord(lineItemRecord) {
|
|
558
575
|
let schemaKey, target, value;
|
|
559
576
|
switch (lineItemRecord.$Type) {
|
|
@@ -602,7 +619,8 @@ function getSchemaKeyOfLineItemRecord(lineItemRecord) {
|
|
|
602
619
|
return schemaKey;
|
|
603
620
|
}
|
|
604
621
|
/**
|
|
605
|
-
* Determines if type of given annotation term is of UIAnnotationTerm
|
|
622
|
+
* Determines if type of given annotation term is of UIAnnotationTerm.
|
|
623
|
+
*
|
|
606
624
|
* @param {string} path path in manifest
|
|
607
625
|
* @param {string} alias for a given namespace
|
|
608
626
|
* @param {EntityType} entityType - the entity type
|
|
@@ -632,10 +650,10 @@ function getUIAnnotationTerm(path, alias, entityType) {
|
|
|
632
650
|
}
|
|
633
651
|
}
|
|
634
652
|
/**
|
|
635
|
-
* Determines if type of given annotation term is of CommunicationAnnotationTerm
|
|
653
|
+
* Determines if type of given annotation term is of CommunicationAnnotationTerm.
|
|
654
|
+
*
|
|
636
655
|
* @param {string} path path in manifest
|
|
637
656
|
* @param {string} alias for a given namespace
|
|
638
|
-
* @param {EntityType} entityType - the entity type
|
|
639
657
|
* @returns Communication annotation term type
|
|
640
658
|
*/
|
|
641
659
|
function getCommunicationAnnotationTerm(path, alias) {
|
|
@@ -650,7 +668,8 @@ function getCommunicationAnnotationTerm(path, alias) {
|
|
|
650
668
|
}
|
|
651
669
|
}
|
|
652
670
|
/**
|
|
653
|
-
* Determines the type of given annotation term
|
|
671
|
+
* Determines the type of given annotation term.
|
|
672
|
+
*
|
|
654
673
|
* @param {string} path path in manifest
|
|
655
674
|
* @param {string} alias for a given namespace
|
|
656
675
|
* @param {EntityType} entityType - the entity type
|
|
@@ -660,11 +679,13 @@ function getAnnotationTerm(path, alias, entityType) {
|
|
|
660
679
|
return getUIAnnotationTerm(path, alias, entityType) || getCommunicationAnnotationTerm(path, alias);
|
|
661
680
|
}
|
|
662
681
|
/**
|
|
663
|
-
* Evaluates the target annotation of a reference facet and actualizes the facets for the config
|
|
664
|
-
*
|
|
665
|
-
* @param
|
|
666
|
-
* @param
|
|
667
|
-
* @param
|
|
682
|
+
* Evaluates the target annotation of a reference facet and actualizes the facets for the config.
|
|
683
|
+
*
|
|
684
|
+
* @param section - The section object in the app schema to be updated with annotation information.
|
|
685
|
+
* @param annotationRecord - the actual annotation record
|
|
686
|
+
* @param facets - list of facets in config format, to be updated
|
|
687
|
+
* @param entityType - the entity type
|
|
688
|
+
* @param oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
668
689
|
*/
|
|
669
690
|
function evaluateTargetAnnotation(section, annotationRecord, facets, entityType, oDataServiceAVT) {
|
|
670
691
|
const alias = findAlias(ux_specification_types_1.UIVOCABULARY, oDataServiceAVT);
|
|
@@ -754,6 +775,7 @@ function evaluateTargetAnnotation(section, annotationRecord, facets, entityType,
|
|
|
754
775
|
}
|
|
755
776
|
/**
|
|
756
777
|
* Method returns schema annotation path for passed fullyQualifiedName.
|
|
778
|
+
*
|
|
757
779
|
* @param {EntityType} entityType entity type.
|
|
758
780
|
* @param {string} fullyQualifiedName fully qualifier name.
|
|
759
781
|
* @returns {TemplateType} Schema annotation path.
|
|
@@ -762,14 +784,15 @@ function getAnnotationPathUsingFullyQualifiedName(entityType, fullyQualifiedName
|
|
|
762
784
|
return `/${entityType.fullyQualifiedName}/${fullyQualifiedName.split(entityType.fullyQualifiedName)[1]}`;
|
|
763
785
|
}
|
|
764
786
|
/**
|
|
765
|
-
* Adds the information from facets to the config
|
|
766
|
-
*
|
|
767
|
-
* @param
|
|
768
|
-
* @param
|
|
769
|
-
* @param
|
|
770
|
-
* @param
|
|
771
|
-
* @param
|
|
772
|
-
* @param
|
|
787
|
+
* Adds the information from facets to the config.
|
|
788
|
+
*
|
|
789
|
+
* @param annotationRecord - the actual annotation record
|
|
790
|
+
* @param oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
791
|
+
* @param serviceName - name of the service of the app
|
|
792
|
+
* @param entityType - The entity type to be used for resolving facets
|
|
793
|
+
* @param facets - list of facets in config format, to be updated
|
|
794
|
+
* @param oDataVersion - OData version
|
|
795
|
+
* @param logger - Logger class for logging messages
|
|
773
796
|
*/
|
|
774
797
|
function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entityType, facets, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, logger) {
|
|
775
798
|
const section = getSectionFacet(annotationRecord, entityType, oDataServiceAVT, logger, oDataVersion, false);
|
|
@@ -804,11 +827,13 @@ function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entity
|
|
|
804
827
|
}
|
|
805
828
|
}
|
|
806
829
|
/**
|
|
807
|
-
* Retrieve header facet configurations that can be used to generate ObjectPage schemas
|
|
808
|
-
*
|
|
809
|
-
* @param
|
|
810
|
-
* @param
|
|
811
|
-
* @param
|
|
830
|
+
* Retrieve header facet configurations that can be used to generate ObjectPage schemas.
|
|
831
|
+
*
|
|
832
|
+
* @param entityType - The entity type to be used for resolving facets
|
|
833
|
+
* @param oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
834
|
+
* @param oDataVersion - OData version
|
|
835
|
+
* @param logger - Logger class for logging messages
|
|
836
|
+
* @returns - header facet configurations
|
|
812
837
|
*/
|
|
813
838
|
function getObjectPageHeaderFacets(entityType, oDataServiceAVT, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, logger) {
|
|
814
839
|
const facets = {};
|
|
@@ -828,11 +853,13 @@ function getObjectPageHeaderFacets(entityType, oDataServiceAVT, oDataVersion = u
|
|
|
828
853
|
return facets;
|
|
829
854
|
}
|
|
830
855
|
/**
|
|
831
|
-
* Retrieve facet configurations that can be used to generate ObjectPage schemas
|
|
832
|
-
*
|
|
833
|
-
* @param
|
|
856
|
+
* Retrieve facet configurations that can be used to generate ObjectPage schemas.
|
|
857
|
+
*
|
|
858
|
+
* @param entityType - The entity type to be used for resolving facets
|
|
859
|
+
* @param oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
834
860
|
* @param {FioriElementsVersion} oDataVersion - OData version
|
|
835
861
|
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
862
|
+
* @returns - facet configurations
|
|
836
863
|
*/
|
|
837
864
|
function getObjectPageFacets(entityType, oDataServiceAVT, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, logger) {
|
|
838
865
|
const facets = {};
|
|
@@ -852,7 +879,8 @@ function getObjectPageFacets(entityType, oDataServiceAVT, oDataVersion = ux_spec
|
|
|
852
879
|
return facets;
|
|
853
880
|
}
|
|
854
881
|
/**
|
|
855
|
-
* Returns the version of Fiori elements (v2/v4) from a given manifest
|
|
882
|
+
* Returns the version of Fiori elements (v2/v4) from a given manifest.
|
|
883
|
+
*
|
|
856
884
|
* @param manifest - the manifest.json file
|
|
857
885
|
* @returns FioriElementsVersion
|
|
858
886
|
*/
|
|
@@ -865,7 +893,10 @@ function getFEVersionFromManifest(manifest) {
|
|
|
865
893
|
const targets = manifest[ux_specification_types_1.ManifestSection.ui5]?.routing?.targets;
|
|
866
894
|
const libs = manifest[ux_specification_types_1.ManifestSection.ui5]?.dependencies?.libs;
|
|
867
895
|
if ((targets &&
|
|
868
|
-
Object.keys(targets).find((targetKey) =>
|
|
896
|
+
Object.keys(targets).find((targetKey) => {
|
|
897
|
+
const name = typeof targets[targetKey].name === 'string' ? targets[targetKey].name : '';
|
|
898
|
+
return exports.V4_TEMPLATES.indexOf(name) > -1 || convertTemplateNameToPageTypeV4(name);
|
|
899
|
+
})) ||
|
|
869
900
|
(libs && Object.keys(libs).find((lib) => exports.V4_LIBS.indexOf(lib) > -1))) {
|
|
870
901
|
return ux_specification_types_1.FioriElementsVersion.v4;
|
|
871
902
|
}
|
|
@@ -891,7 +922,8 @@ function getMainService(manifest) {
|
|
|
891
922
|
: undefined;
|
|
892
923
|
}
|
|
893
924
|
/**
|
|
894
|
-
* Returns the oData version of the service (if any) from a given manifest
|
|
925
|
+
* Returns the oData version of the service (if any) from a given manifest.
|
|
926
|
+
*
|
|
895
927
|
* @param manifest - the manifest.json file
|
|
896
928
|
* @returns the OData version
|
|
897
929
|
*/
|
|
@@ -904,10 +936,11 @@ function getODataVersionFromManifest(manifest) {
|
|
|
904
936
|
return dataSource?.settings?.odataVersion === '4.0' ? ux_specification_types_1.OdataVersion.v4 : ux_specification_types_1.OdataVersion.v2;
|
|
905
937
|
}
|
|
906
938
|
/**
|
|
907
|
-
* Determines the template type of a V2 app
|
|
939
|
+
* Determines the template type of a V2 app.
|
|
940
|
+
*
|
|
908
941
|
* @param manifest - the manifest.json file
|
|
909
942
|
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
910
|
-
* @returns
|
|
943
|
+
* @returns the template type
|
|
911
944
|
*/
|
|
912
945
|
function determineV2Template(manifest, logger) {
|
|
913
946
|
let templateType;
|
|
@@ -951,7 +984,8 @@ function determineV2Template(manifest, logger) {
|
|
|
951
984
|
return templateType;
|
|
952
985
|
}
|
|
953
986
|
/**
|
|
954
|
-
* Determines the template type of a single page
|
|
987
|
+
* Determines the template type of a single page.
|
|
988
|
+
*
|
|
955
989
|
* @param v4Page - single page from routing targets
|
|
956
990
|
* @returns {TemplateType | undefined} the template type
|
|
957
991
|
*/
|
|
@@ -980,7 +1014,8 @@ function determineV4PageTemplateType(v4Page) {
|
|
|
980
1014
|
return templateType;
|
|
981
1015
|
}
|
|
982
1016
|
/**
|
|
983
|
-
* Determines the template type, based on the given manifest routing target entries of the app
|
|
1017
|
+
* Determines the template type, based on the given manifest routing target entries of the app.
|
|
1018
|
+
*
|
|
984
1019
|
* @param v4Pages - pages from routing targets
|
|
985
1020
|
* @returns {TemplateType | undefined} the template type
|
|
986
1021
|
*/
|
|
@@ -996,7 +1031,8 @@ function determineV4TemplateFromPages(v4Pages) {
|
|
|
996
1031
|
return templateType;
|
|
997
1032
|
}
|
|
998
1033
|
/**
|
|
999
|
-
* Determines the template type of a V4 app
|
|
1034
|
+
* Determines the template type of a V4 app.
|
|
1035
|
+
*
|
|
1000
1036
|
* @param manifest - the manifest.json file
|
|
1001
1037
|
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
1002
1038
|
* @returns {TemplateType} the template type
|
|
@@ -1031,7 +1067,8 @@ function determineV4Template(manifest, logger) {
|
|
|
1031
1067
|
return templateType;
|
|
1032
1068
|
}
|
|
1033
1069
|
/**
|
|
1034
|
-
* Determines the template type, based on the given manifest entries of the app
|
|
1070
|
+
* Determines the template type, based on the given manifest entries of the app.
|
|
1071
|
+
*
|
|
1035
1072
|
* @param manifest - the manifest.json file
|
|
1036
1073
|
* @param {FioriElementsVersion} fioriElementsVersion - OData or FE version
|
|
1037
1074
|
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
@@ -1051,7 +1088,8 @@ function getTemplateTypeFromManifest(manifest, fioriElementsVersion, logger) {
|
|
|
1051
1088
|
return templateType;
|
|
1052
1089
|
}
|
|
1053
1090
|
/**
|
|
1054
|
-
* Adds title to a section or header section in an app schema
|
|
1091
|
+
* Adds title to a section or header section in an app schema.
|
|
1092
|
+
*
|
|
1055
1093
|
* @param facet - intermediate facet structure comprising annotation information
|
|
1056
1094
|
* @param section - section in the app schema
|
|
1057
1095
|
* @param facetKey - key of the facet
|
|
@@ -1067,7 +1105,8 @@ function addSectionTitle(facet, section, facetKey) {
|
|
|
1067
1105
|
}
|
|
1068
1106
|
}
|
|
1069
1107
|
/**
|
|
1070
|
-
* Adds description to a section or header section in an app schema
|
|
1108
|
+
* Adds description to a section or header section in an app schema.
|
|
1109
|
+
*
|
|
1071
1110
|
* @param facet - intermediate facet structure comprising annotation information
|
|
1072
1111
|
* @param section - section in the app schema
|
|
1073
1112
|
* @param facetKey - key of the facet
|
|
@@ -1084,7 +1123,8 @@ function addSectionDescription(facet, section, facetKey) {
|
|
|
1084
1123
|
}
|
|
1085
1124
|
}
|
|
1086
1125
|
/**
|
|
1087
|
-
* Adds target title or description to a section or header section in an app schema
|
|
1126
|
+
* Adds target title or description to a section or header section in an app schema.
|
|
1127
|
+
*
|
|
1088
1128
|
* @param facet - intermediate facet structure comprising annotation information
|
|
1089
1129
|
* @param section - section in the app schema
|
|
1090
1130
|
* @param facetKey - key of the facet
|
|
@@ -1106,10 +1146,10 @@ function addTargetTitleAndSectionDescription(facet, section, facetKey) {
|
|
|
1106
1146
|
}
|
|
1107
1147
|
}
|
|
1108
1148
|
/**
|
|
1109
|
-
* Adds chart (S)PV header facet ID, in case chart has no title
|
|
1149
|
+
* Adds chart (S)PV header facet ID, in case chart has no title.
|
|
1150
|
+
*
|
|
1110
1151
|
* @param facet - intermediate facet structure comprising annotation information
|
|
1111
1152
|
* @param section - section in the app schema
|
|
1112
|
-
* @param facetKey - key of the facet
|
|
1113
1153
|
*/
|
|
1114
1154
|
function addChartFacetID(facet, section) {
|
|
1115
1155
|
if (facet?.ID && section.description?.startsWith('Chart#')) {
|
|
@@ -1118,7 +1158,10 @@ function addChartFacetID(facet, section) {
|
|
|
1118
1158
|
}
|
|
1119
1159
|
/**
|
|
1120
1160
|
* Creates a default object for a new section or subsection, and adds the ID as title if present.
|
|
1121
|
-
*
|
|
1161
|
+
*
|
|
1162
|
+
* @param appSchema - The application-specific JSON schema.
|
|
1163
|
+
* @param facet - Facet configuration, to be analyzed.
|
|
1164
|
+
* @param facetKey - The key of the facet.
|
|
1122
1165
|
* @returns the new section object
|
|
1123
1166
|
*/
|
|
1124
1167
|
function createDefaultSection(appSchema, facet, facetKey) {
|
|
@@ -1134,12 +1177,13 @@ function createDefaultSection(appSchema, facet, facetKey) {
|
|
|
1134
1177
|
}
|
|
1135
1178
|
/**
|
|
1136
1179
|
* Retrieve page section data(so far id/key and label/description).
|
|
1180
|
+
*
|
|
1137
1181
|
* @param {EntityType} entityType The actual entityType
|
|
1138
1182
|
* @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
1139
1183
|
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
1140
1184
|
* @param {FioriElementsVersion} oDataVersion - OData version
|
|
1141
|
-
* @param {boolean} [checkUnresolvableFacets
|
|
1142
|
-
* @returns
|
|
1185
|
+
* @param {boolean} [checkUnresolvableFacets] - Check and avoid facets and sections without ID and Target.
|
|
1186
|
+
* @returns - Array of facets or sections
|
|
1143
1187
|
*/
|
|
1144
1188
|
function getObjectPageFacetSection(entityType, oDataServiceAVT, logger, oDataVersion = ux_specification_types_1.FioriElementsVersion.v2, checkUnresolvableFacets = false) {
|
|
1145
1189
|
const alias = findAlias(ux_specification_types_1.UIVOCABULARY, oDataServiceAVT);
|
|
@@ -1162,7 +1206,8 @@ function getObjectPageFacetSection(entityType, oDataServiceAVT, logger, oDataVer
|
|
|
1162
1206
|
}
|
|
1163
1207
|
}
|
|
1164
1208
|
/**
|
|
1165
|
-
* Cleans empty sub-structures from the export result for manifest
|
|
1209
|
+
* Cleans empty sub-structures from the export result for manifest.
|
|
1210
|
+
*
|
|
1166
1211
|
* @param {object} manifest - manifest.json part of the export result
|
|
1167
1212
|
* @param {string} path - path in the manifest
|
|
1168
1213
|
* @param {boolean} deletionRequest - if set to true, any manifest setting specified by entityPath gets deleted even if it comprises any unknown property
|
|
@@ -1208,8 +1253,9 @@ const deleteEmptyStructure = (manifest, path, deletionRequest, entityPathArray,
|
|
|
1208
1253
|
exports.deleteEmptyStructure = deleteEmptyStructure;
|
|
1209
1254
|
/**
|
|
1210
1255
|
* Method which returns generic schema file name.
|
|
1256
|
+
*
|
|
1211
1257
|
* @param {SchemaType | PageTypeV2} schemaType Schema type or Page type.
|
|
1212
|
-
* @
|
|
1258
|
+
* @returns {string} File name of generic schema.
|
|
1213
1259
|
*/
|
|
1214
1260
|
const getGenericSchemaFileName = (schemaType) => {
|
|
1215
1261
|
if (schemaType === ux_specification_types_1.SchemaType.FreestylePage) {
|
|
@@ -1223,9 +1269,11 @@ const getGenericSchemaFileName = (schemaType) => {
|
|
|
1223
1269
|
};
|
|
1224
1270
|
/**
|
|
1225
1271
|
* Method which returns schema file name and path depending on passed schema or page type.
|
|
1272
|
+
*
|
|
1226
1273
|
* @param {SchemaType | PageTypeV2} schemaType Schema type or Page type.
|
|
1227
1274
|
* @param {string} [pageId] target page id from manifest.json
|
|
1228
|
-
* @
|
|
1275
|
+
* @param viewId - The view ID for custom pages (optional).
|
|
1276
|
+
* @returns {SchemaFilePath} File path info.
|
|
1229
1277
|
*/
|
|
1230
1278
|
const getSchemaFilePath = (schemaType, pageId, viewId) => {
|
|
1231
1279
|
const schemaFile = {
|
|
@@ -1275,6 +1323,7 @@ const getSchemaFilePath = (schemaType, pageId, viewId) => {
|
|
|
1275
1323
|
exports.getSchemaFilePath = getSchemaFilePath;
|
|
1276
1324
|
/**
|
|
1277
1325
|
* Method which generates id of page according to passed parameters
|
|
1326
|
+
*
|
|
1278
1327
|
* @param appVersion - Fiori Elements version - V2 or V4
|
|
1279
1328
|
* @param pageType - Page type
|
|
1280
1329
|
* @param entitySet - Entity Set
|
|
@@ -1282,6 +1331,15 @@ exports.getSchemaFilePath = getSchemaFilePath;
|
|
|
1282
1331
|
* @param pageName - Page name in manifest. Used if entitySet is empty
|
|
1283
1332
|
* @returns {string} Generated page id
|
|
1284
1333
|
*/
|
|
1334
|
+
/**
|
|
1335
|
+
* Generates a unique page ID based on the provided parameters.
|
|
1336
|
+
*
|
|
1337
|
+
* @param pageType - The type of the page (e.g., ListReport, ObjectPage, etc.).
|
|
1338
|
+
* @param entitySet - The entity set associated with the page.
|
|
1339
|
+
* @param viewId - The view ID for custom pages (optional).
|
|
1340
|
+
* @param pageName - The name of the page in the manifest (used if entitySet is empty).
|
|
1341
|
+
* @returns The generated page ID as a string.
|
|
1342
|
+
*/
|
|
1285
1343
|
function generatePageId(pageType, entitySet, viewId, pageName) {
|
|
1286
1344
|
if (pageType === ux_specification_types_1.PageTypeV2.CustomPage) {
|
|
1287
1345
|
const names = viewId && viewId.split('.');
|
|
@@ -1299,6 +1357,7 @@ function generatePageId(pageType, entitySet, viewId, pageName) {
|
|
|
1299
1357
|
}
|
|
1300
1358
|
/**
|
|
1301
1359
|
* Method finds matching objects against passed interface of 'additionalProperties' and returns array of matching object keys.
|
|
1360
|
+
*
|
|
1302
1361
|
* @param {Definition} appSchema - App-specific JSON schema.
|
|
1303
1362
|
* @param {Definition} additionalProperties - Allowed additional properties.
|
|
1304
1363
|
* @param {object} configObject -Container object to find matching childs.
|
|
@@ -1330,6 +1389,15 @@ function findMatchingKeysByAdditionalProperties(appSchema, additionalProperties,
|
|
|
1330
1389
|
}
|
|
1331
1390
|
return result;
|
|
1332
1391
|
}
|
|
1392
|
+
/**
|
|
1393
|
+
* Populates a given array with definitions from an application's schema that match certain conditions defined by the current configuration object and element reference.
|
|
1394
|
+
*
|
|
1395
|
+
* @param element - The element containing a reference ($ref) to a specific definition within the application schema.
|
|
1396
|
+
* @param appSchema - The application's schema object containing all definitions.
|
|
1397
|
+
* @param currentConfigObject - The current configuration object which is evaluated against the schema definitions.
|
|
1398
|
+
* @param definitionArray - The array to which matching definitions are added based on the evaluation.
|
|
1399
|
+
* This function does not return any value but modifies the definitionArray parameter by adding appropriate definitions.
|
|
1400
|
+
*/
|
|
1333
1401
|
function fillArrayFromAnyOfReference(element, appSchema, currentConfigObject, definitionArray) {
|
|
1334
1402
|
const $ref = element.$ref;
|
|
1335
1403
|
if (!$ref) {
|
|
@@ -1357,7 +1425,8 @@ function fillArrayFromAnyOfReference(element, appSchema, currentConfigObject, de
|
|
|
1357
1425
|
}
|
|
1358
1426
|
}
|
|
1359
1427
|
/**
|
|
1360
|
-
* Fills an array of next definitions from given references in the JSON schema
|
|
1428
|
+
* Fills an array of next definitions from given references in the JSON schema.
|
|
1429
|
+
*
|
|
1361
1430
|
* @param propertyDefinition - Definition of the current property in schema
|
|
1362
1431
|
* @param currentConfigObject - Current object in the config JSON. Evaluated to get the right value of a controlling property,
|
|
1363
1432
|
* for making the right choice in case of multiple options (anyOf)
|
|
@@ -1383,7 +1452,8 @@ function fillArrayFromPropertyDefinition(propertyDefinition, currentConfigObject
|
|
|
1383
1452
|
}
|
|
1384
1453
|
/**
|
|
1385
1454
|
* Determines the next definition to be handled, based on the definition array.
|
|
1386
|
-
* It also creates the Metadata instance for the next definition, to subsequently access metadata like the syncRule
|
|
1455
|
+
* It also creates the Metadata instance for the next definition, to subsequently access metadata like the syncRule.
|
|
1456
|
+
*
|
|
1387
1457
|
* @param definitionArray - Array of definitions, as determined by fillArrayFromNextDefinition
|
|
1388
1458
|
* @param appSchema - app-specific JSON schema
|
|
1389
1459
|
* @param title - default title
|
|
@@ -1403,7 +1473,10 @@ function determineNextDefinitionFromDefinitionArray(definitionArray, appSchema,
|
|
|
1403
1473
|
if (definitionArray.length) {
|
|
1404
1474
|
const lastDefinition = definitionArray[definitionArray.length - 1];
|
|
1405
1475
|
nextDefinition.targetDefinition = appSchema['definitions'][lastDefinition];
|
|
1406
|
-
|
|
1476
|
+
// check for existence of nextDefinition?.targetDefinition?.['properties'] is necessary only for the action groups
|
|
1477
|
+
// as they have action definitions as a property and these definitions must be processed
|
|
1478
|
+
if ((!nextDefinition?.targetDefinition?.['properties'] && nextDefinition?.targetDefinition?.['$ref']) ||
|
|
1479
|
+
nextDefinition?.targetDefinition?.['type'] === 'array') {
|
|
1407
1480
|
nextDefinition = getNextTargetDefinition(appSchema, title, currentConfigObject, nextDefinition.targetDefinition, key, factory, pageType);
|
|
1408
1481
|
return nextDefinition;
|
|
1409
1482
|
}
|
|
@@ -1435,7 +1508,8 @@ function determineNextDefinitionFromDefinitionArray(definitionArray, appSchema,
|
|
|
1435
1508
|
return nextDefinition;
|
|
1436
1509
|
}
|
|
1437
1510
|
/**
|
|
1438
|
-
* Recursive function to determine the next config part, next definition in the app schema and the title
|
|
1511
|
+
* Recursive function to determine the next config part, next definition in the app schema and the title.
|
|
1512
|
+
*
|
|
1439
1513
|
* @param appSchema - app-specific JSON schema
|
|
1440
1514
|
* @param title - default title
|
|
1441
1515
|
* @param currentConfigObject - current part of the configuration that gets traversed
|
|
@@ -1443,6 +1517,7 @@ function determineNextDefinitionFromDefinitionArray(definitionArray, appSchema,
|
|
|
1443
1517
|
* @param key - actual key
|
|
1444
1518
|
* @param {MetadataInstanceInterface} factory - factory for creating metadata instances
|
|
1445
1519
|
* @param pageType - page type
|
|
1520
|
+
* @returns {NextDefinition} - Next target definition to process
|
|
1446
1521
|
*/
|
|
1447
1522
|
function getNextTargetDefinition(appSchema, title, currentConfigObject, propertyDefinition, key, factory, pageType) {
|
|
1448
1523
|
let nextDefinition;
|
|
@@ -1458,12 +1533,12 @@ function getNextTargetDefinition(appSchema, title, currentConfigObject, property
|
|
|
1458
1533
|
return nextDefinition;
|
|
1459
1534
|
}
|
|
1460
1535
|
/**
|
|
1461
|
-
* Custom array merge function called by deepmerge's merge function
|
|
1536
|
+
* Custom array merge function called by deepmerge's merge function.
|
|
1462
1537
|
*
|
|
1463
1538
|
* @param {*} target Target array
|
|
1464
1539
|
* @param {*} source Source array
|
|
1465
1540
|
* @param {*} options options object provided by deepmerge's merge function
|
|
1466
|
-
* @returns
|
|
1541
|
+
* @returns {string[]} Combined array with unique elements from both target and source arrays.
|
|
1467
1542
|
*/
|
|
1468
1543
|
const arrayCombineMerge = (target, source, options) => {
|
|
1469
1544
|
const destination = target.slice();
|
|
@@ -1482,7 +1557,8 @@ const arrayCombineMerge = (target, source, options) => {
|
|
|
1482
1557
|
};
|
|
1483
1558
|
exports.arrayCombineMerge = arrayCombineMerge;
|
|
1484
1559
|
/**
|
|
1485
|
-
* Converts an enum into a CSV
|
|
1560
|
+
* Converts an enum into a CSV.
|
|
1561
|
+
*
|
|
1486
1562
|
* @param {object} manifestSection - manifestSection where the key exists
|
|
1487
1563
|
* @param {object} configPart - Property as mentioned in config file
|
|
1488
1564
|
* @param {string} key - Property to be exported to manifest
|
|
@@ -1494,7 +1570,8 @@ function convertEnumToCSV(manifestSection, configPart, key) {
|
|
|
1494
1570
|
manifestSection[key] = field.join();
|
|
1495
1571
|
}
|
|
1496
1572
|
/**
|
|
1497
|
-
* Converts an action ID from the internal format (schema, config) to the stable ID representation
|
|
1573
|
+
* Converts an action ID from the internal format (schema, config) to the stable ID representation.
|
|
1574
|
+
*
|
|
1498
1575
|
* @param actionId - the (unique) internal format of the action ID
|
|
1499
1576
|
* @returns the converted action ID
|
|
1500
1577
|
*/
|
|
@@ -1505,7 +1582,8 @@ function convertActionKeyToStableId(actionId) {
|
|
|
1505
1582
|
return (actionId.indexOf('??') > -1 ? actionId.split('??')[1] : actionId).replace(/@/g, '::');
|
|
1506
1583
|
}
|
|
1507
1584
|
/**
|
|
1508
|
-
* Method returns definition key for passed '$ref' property by removing 'definition' prefix
|
|
1585
|
+
* Method returns definition key for passed '$ref' property by removing 'definition' prefix.
|
|
1586
|
+
*
|
|
1509
1587
|
* @param {string} $ref Definition reference.
|
|
1510
1588
|
* @returns Definition key.
|
|
1511
1589
|
*/
|
|
@@ -1514,6 +1592,7 @@ function getDefinitionKey($ref) {
|
|
|
1514
1592
|
}
|
|
1515
1593
|
/**
|
|
1516
1594
|
* Method returns definition $ref' property for passed definition key.
|
|
1595
|
+
*
|
|
1517
1596
|
* @param {string} key Definition key.
|
|
1518
1597
|
* @returns Definition reference.
|
|
1519
1598
|
*/
|
|
@@ -1555,6 +1634,7 @@ function updatePropertyIndices(schema, order) {
|
|
|
1555
1634
|
}
|
|
1556
1635
|
/**
|
|
1557
1636
|
* Method to get value for passed path in passed object.
|
|
1637
|
+
*
|
|
1558
1638
|
* @param obj Object to check.
|
|
1559
1639
|
* @param paths Path for searching property/value.
|
|
1560
1640
|
* @returns Found value for passed path.
|
|
@@ -1576,8 +1656,9 @@ function getJSONPropertyByPath(obj, paths) {
|
|
|
1576
1656
|
return current;
|
|
1577
1657
|
}
|
|
1578
1658
|
/**
|
|
1579
|
-
* Method to remove namespaces
|
|
1580
|
-
*
|
|
1659
|
+
* Method to remove namespaces.
|
|
1660
|
+
*
|
|
1661
|
+
* @param sId - The string identifier to process and remove namespaces from.
|
|
1581
1662
|
* @returns {string} modified string without namespace
|
|
1582
1663
|
*/
|
|
1583
1664
|
function removeNamespaces(sId) {
|
|
@@ -1586,8 +1667,9 @@ function removeNamespaces(sId) {
|
|
|
1586
1667
|
return sId;
|
|
1587
1668
|
}
|
|
1588
1669
|
/**
|
|
1589
|
-
* Method to replace namespaces with short hand form
|
|
1590
|
-
*
|
|
1670
|
+
* Method to replace namespaces with short hand form.
|
|
1671
|
+
*
|
|
1672
|
+
* @param {string } sId - The string identifier to process and replace namespaces with shorthand forms.
|
|
1591
1673
|
* @returns {string} modified string with replaced namespaces
|
|
1592
1674
|
*/
|
|
1593
1675
|
function replaceNamespaces(sId) {
|
|
@@ -1607,4 +1689,36 @@ function getRefType(element) {
|
|
|
1607
1689
|
return reference.substring(exports.DEFINITION_LINK_PREFIX.length);
|
|
1608
1690
|
}
|
|
1609
1691
|
}
|
|
1692
|
+
/**
|
|
1693
|
+
* Converts a template name string from 'manifest.json' to a corresponding `PageTypeV4` enum value.
|
|
1694
|
+
*
|
|
1695
|
+
* @param {string} templateName - The name of the template to convert.
|
|
1696
|
+
* @returns {PageTypeV4 | undefined} The corresponding `PageTypeV4` enum value, or `undefined` if no match is found.
|
|
1697
|
+
*/
|
|
1698
|
+
function convertTemplateNameToPageTypeV4(templateName) {
|
|
1699
|
+
if (templateName === ux_specification_types_1.v4.FE_TEMPLATE_V4_CUSTOM_PAGE) {
|
|
1700
|
+
return ux_specification_types_1.PageTypeV4.FPMCustomPage;
|
|
1701
|
+
}
|
|
1702
|
+
if (templateName?.startsWith(`${ux_specification_types_1.v4.FE_NAMESPACE_V4}.`)) {
|
|
1703
|
+
const parts = templateName.split('.');
|
|
1704
|
+
const pageType = parts[parts.length - 1];
|
|
1705
|
+
if (pageType in ux_specification_types_1.PageTypeV4) {
|
|
1706
|
+
return ux_specification_types_1.PageTypeV4[pageType];
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
/**
|
|
1711
|
+
* Determines whether two template names match either directly or by resolving their corresponding page types.
|
|
1712
|
+
*
|
|
1713
|
+
* @param templateName1 The first template name to compare.
|
|
1714
|
+
* @param templateName2 The second template name to compare.
|
|
1715
|
+
* @returns Returns true if the template names match directly or their page types match; otherwise, false.
|
|
1716
|
+
*/
|
|
1717
|
+
function compareTemplateNames(templateName1, templateName2) {
|
|
1718
|
+
if (templateName1 === templateName2) {
|
|
1719
|
+
return true;
|
|
1720
|
+
}
|
|
1721
|
+
const pageType1 = convertTemplateNameToPageTypeV4(templateName1);
|
|
1722
|
+
return pageType1 ? pageType1 === convertTemplateNameToPageTypeV4(templateName2) : false;
|
|
1723
|
+
}
|
|
1610
1724
|
//# sourceMappingURL=utils.js.map
|