@sap/ux-specification 1.120.35 → 1.120.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -1
- package/dist/documentation/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-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 +86 -86
- package/dist/index-min.js.map +4 -4
- package/dist/schemas/v2/ApplicationV2.json +2 -1
- package/dist/schemas/v4/ApplicationV4.json +6 -1
- 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 +51 -7
- 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 +9 -5
- package/dist/specification/scripts/schema/to-json-schema.d.ts.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.js +32 -5
- 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 +22 -14
- 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/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 +27 -18
- package/dist/specification/src/sync/common/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/common/generate/objectPage.js +54 -33
- package/dist/specification/src/sync/common/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/common/generate/utils.d.ts +65 -37
- package/dist/specification/src/sync/common/generate/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/generate/utils.js +67 -37
- package/dist/specification/src/sync/common/generate/utils.js.map +1 -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/utils.d.ts +129 -53
- package/dist/specification/src/sync/common/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/utils.js +235 -94
- 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 +18 -10
- package/dist/specification/src/sync/v2/export/exportPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPage.js +34 -20
- 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 +8 -1
- 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 +9 -12
- package/dist/specification/src/sync/v2/generate/generate.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/listReport.d.ts +4 -2
- package/dist/specification/src/sync/v2/generate/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/listReport.js +26 -8
- package/dist/specification/src/sync/v2/generate/listReport.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/manifestPropertyUtils.d.ts +118 -0
- package/dist/specification/src/sync/v2/generate/manifestPropertyUtils.d.ts.map +1 -0
- package/dist/specification/src/sync/v2/generate/manifestPropertyUtils.js +151 -0
- package/dist/specification/src/sync/v2/generate/manifestPropertyUtils.js.map +1 -0
- 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 +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js +8 -8
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/utils.d.ts +47 -36
- package/dist/specification/src/sync/v2/generate/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/utils.js +92 -71
- package/dist/specification/src/sync/v2/generate/utils.js.map +1 -1
- 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 +20 -4
- 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 +26 -1
- package/dist/specification/src/sync/v2/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/utils.js +47 -1
- 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/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/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/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 +136 -58
- 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 +4 -0
- 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 +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.js +210 -162
- 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 +70 -46
- 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 +52 -39
- 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 +12 -0
- package/dist/specification/src/sync/v4/utils/StableIdHelper.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/StableIdHelper.js +18 -0
- 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 +38 -20
- package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.js +99 -52
- package/dist/specification/src/sync/v4/utils/utils.js.map +1 -1
- package/dist/types/src/apiTypes.d.ts +13 -0
- package/dist/types/src/apiTypes.d.ts.map +1 -1
- package/dist/types/src/apiTypes.js +18 -1
- package/dist/types/src/apiTypes.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 +51 -2
- package/dist/types/src/common/types.d.ts.map +1 -1
- package/dist/types/src/common/types.js +2 -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 +1 -0
- package/dist/types/src/v4/controls/ObjectPageForm.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageHeader.d.ts +2 -0
- 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 +4 -0
- 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 +9 -0
- 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
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.addEnumForVariantPaths = addEnumForVariantPaths;
|
|
7
7
|
exports.generateListReportSchemaV2 = generateListReportSchemaV2;
|
|
8
8
|
const utils_1 = require("./utils");
|
|
9
|
+
const manifestPropertyUtils_1 = require("./manifestPropertyUtils");
|
|
9
10
|
const import_1 = require("../import");
|
|
10
11
|
const common_1 = require("../../common");
|
|
11
12
|
const i18next_1 = __importDefault(require("i18next"));
|
|
@@ -16,8 +17,9 @@ const types_2 = require("../../../../../types/src/common/types");
|
|
|
16
17
|
const ROOT_PROPERTIES_ORDER = ['filterBar', 'table', 'footer'];
|
|
17
18
|
const UIVOCABULARYDOT = ux_specification_types_1.UIVOCABULARYALPHADOT.substring(1); // reference to the ui vocabluary without leading '@' but with trailing'.'
|
|
18
19
|
/**
|
|
19
|
-
* Adds the enum types for QuickVariant and QuickVariantX, based on the entity type annotations
|
|
20
|
-
*
|
|
20
|
+
* Adds the enum types for QuickVariant and QuickVariantX, based on the entity type annotations.
|
|
21
|
+
*
|
|
22
|
+
* @param {EntityType} entityType - The entity type containing annotations to be processed
|
|
21
23
|
* @param {EntitySet} entitySet - current entity set of the page or view
|
|
22
24
|
* @param {Definition} appSchema - app specific JSON schema
|
|
23
25
|
* @param {ConvertedMetadata} oDataServiceAVT - combined service metadata, as returned by annotation vocabularies tools
|
|
@@ -28,8 +30,9 @@ function addEnumForVariantPaths(entityType, entitySet, appSchema, oDataServiceAV
|
|
|
28
30
|
(0, common_1.addEnumForVariantEntitySet)(oDataServiceAVT, appSchema, 'QuickVariantX');
|
|
29
31
|
}
|
|
30
32
|
/**
|
|
31
|
-
* Adds an enum filled with existing UI annotations for annotationPath property in FilterBar
|
|
32
|
-
*
|
|
33
|
+
* Adds an enum filled with existing UI annotations for annotationPath property in FilterBar.
|
|
34
|
+
*
|
|
35
|
+
* @param entityType - The entity type containing annotations to be processed
|
|
33
36
|
* @param appSchema - app specific JSOn schema
|
|
34
37
|
* @param definitionName - name of the definition in the app schema
|
|
35
38
|
*/
|
|
@@ -42,7 +45,14 @@ function addEnumForFilterBarAnnotationPath(entityType, appSchema, definitionName
|
|
|
42
45
|
];
|
|
43
46
|
(0, common_1.addEnumForValidAnnotations)(entityType, validAnnotations, annoPath);
|
|
44
47
|
}
|
|
45
|
-
|
|
48
|
+
/**
|
|
49
|
+
* Helper function for getLineItemAnnotation which determines the presentation variant to be used. The parameters of both functions have identical meaning.
|
|
50
|
+
*
|
|
51
|
+
* @param uIAnnotations - The UI annotations for the entity type.
|
|
52
|
+
* @param settings - Optional settings object, typically a piece of the manifest, containing an optional annotationPath property.
|
|
53
|
+
* @param logger - Optional logger instance for logging warnings or errors.
|
|
54
|
+
* @returns The determined PresentationVariant or undefined if none is found.
|
|
55
|
+
*/
|
|
46
56
|
function getPresentationVariantForLineItem(uIAnnotations, settings, logger) {
|
|
47
57
|
let presentationVariant; // the presentation variant to be used to determine the LineItem
|
|
48
58
|
const annotationPath = settings?.annotationPath;
|
|
@@ -89,12 +99,19 @@ function getPresentationVariantForLineItem(uIAnnotations, settings, logger) {
|
|
|
89
99
|
}
|
|
90
100
|
return presentationVariant;
|
|
91
101
|
}
|
|
92
|
-
|
|
93
|
-
|
|
102
|
+
/**
|
|
103
|
+
* Determine the LineItemAnnotation to be used for the LR.
|
|
104
|
+
* Reproduces logic from Fiori Elements LR implementation (function createWorkingContext in LR specific AnnotationHelper).
|
|
105
|
+
*
|
|
106
|
+
* @param uIAnnotations - The UI annotations for the entity type.
|
|
107
|
+
* @param settings - Optional settings object, typically a piece of the manifest, containing an optional annotationPath property.
|
|
108
|
+
* @param logger - Optional logger instance for logging warnings or errors.
|
|
109
|
+
* @returns The determined LineItem annotation or undefined if none is found.
|
|
110
|
+
*/
|
|
94
111
|
function getLineItemAnnotation(uIAnnotations, settings, // an object (actually a piece of the manifest) possessing an optional property annotationPath which would define the path to the PresentationVariant
|
|
95
112
|
logger // used in case an error/warning is detected while determining the result
|
|
96
113
|
) {
|
|
97
|
-
if ((0,
|
|
114
|
+
if ((0, manifestPropertyUtils_1.hasPropertyTypeError)(settings, 'annotationPath', logger)) {
|
|
98
115
|
return undefined; // return undefined in case there is an error in the settings
|
|
99
116
|
}
|
|
100
117
|
const presentationVariant = getPresentationVariantForLineItem(uIAnnotations, settings, logger); // the presentation variant to be used to determine the LineItem (if there is one)
|
|
@@ -119,6 +136,7 @@ logger // used in case an error/warning is detected while determining the result
|
|
|
119
136
|
/**
|
|
120
137
|
* Generates an app specific schema for the FE V2 Listreport from the generic schema.
|
|
121
138
|
* Generic types are replaced by information from the app specific annotations.
|
|
139
|
+
*
|
|
122
140
|
* @param {GenerateAppSchemaParameters} generateParameters - list of API input parameters
|
|
123
141
|
* @param {object} genericSchema - generic JSON schema of a list report
|
|
124
142
|
* @returns appSchema - the application specific JSON schema
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listReport.js","sourceRoot":"","sources":["../../../../../../src/sync/v2/generate/listReport.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"listReport.js","sourceRoot":"","sources":["../../../../../../src/sync/v2/generate/listReport.ts"],"names":[],"mappings":";;;;;AAuDA,wDASC;AA+HD,gEAsGC;AArSD,mCAQiB;AACjB,mEAA+D;AAC/D,sCAAiD;AACjD,yCAUsB;AACtB,sDAA8B;AAC9B,wEAOqC;AAGrC,8DAA+C;AAC/C,oCAA8C;AAQ9C,iEAAkE;AAElE,MAAM,qBAAqB,GAAuC,CAAC,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AACnG,MAAM,eAAe,GAAG,6CAAoB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,0EAA0E;AAErI;;;;;;;GAOG;AACH,SAAgB,sBAAsB,CAClC,UAAsB,EACtB,SAAoB,EACpB,SAAqB,EACrB,eAAkC;IAElC,IAAA,mCAA0B,EAAC,UAAU,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC;IAClE,IAAA,kCAAyB,EAAC,SAAS,EAAE,eAAe,EAAE,SAAS,CAAC,CAAC;IACjE,IAAA,mCAA0B,EAAC,eAAe,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;AAC5E,CAAC;AAED;;;;;;GAMG;AACH,SAAS,iCAAiC,CACtC,UAAsB,EACtB,SAAqB,EACrB,cAAsB;IAEtB,MAAM,QAAQ,GAAI,SAAS,CAAC,WAAW,CAAC,cAAc,CAAgB,CAAC,UAAU,CAAC,cAA4B,CAAC;IAC/G,MAAM,gBAAgB,GAAG;;;;KAIxB,CAAC;IACF,IAAA,mCAA0B,EAAC,UAAU,EAAE,gBAAgB,EAAE,QAAQ,CAAC,CAAC;AACvE,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,iCAAiC,CACtC,aAAuC,EACvC,QAAS,EACT,MAAwB;IAExB,IAAI,mBAAoD,CAAC,CAAC,gEAAgE;IAC1H,MAAM,cAAc,GAAG,QAAQ,EAAE,cAAoC,C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AAO,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC;IACvC,CAAC;IACD,IAAA,8BAAqB,EAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC;IACxD,OAAO,SAAS,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file This file contains helper functions for generating page specific schemas that are used in the context of manifest properties.
|
|
3
|
+
* The functionality is implicitly tested by the more complex unit-tests for generic schema generation and generic import in test-folder unit/genericSchemaHandling.
|
|
4
|
+
*/
|
|
5
|
+
import type { Definition } from 'typescript-json-schema';
|
|
6
|
+
import type { SyncRule, GenerateAppSchemaParameters, ProcessingRule, AccessorPath, SchemaHandlingParams, ReferenceAdaptationInfo } from '@sap/ux-specification-types';
|
|
7
|
+
import type { ExtensionLogger } from '../../..';
|
|
8
|
+
/**
|
|
9
|
+
* Type check for properties coming from the manifest.
|
|
10
|
+
*
|
|
11
|
+
* @param parent - the parent object in manifest which may contain the property.
|
|
12
|
+
* @param propertyName - name of the property name to be checked
|
|
13
|
+
* @param logger - a logger which may receive the error message in case a type error is detected
|
|
14
|
+
* @param expectedType - the expected type of the value of the property (if it is not undefined)
|
|
15
|
+
* @param mandatory - specifies handling of null and undefined: If parent is null this is always considered an error.
|
|
16
|
+
* undefined value for parent or its specified property is considered an error when parameter mandatory is true.
|
|
17
|
+
* null value for the specified property is considered an error when mandatory is true or the expected type is not 'object'.
|
|
18
|
+
* @returns the information whether a type error was detected.
|
|
19
|
+
*/
|
|
20
|
+
export declare function hasPropertyTypeError(parent: unknown, propertyName: string, logger?: ExtensionLogger, expectedType?: string, mandatory?: boolean): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* This symbol is used to indicate that a property is not allowed in the current context and that it should be hidden without any explanation.
|
|
23
|
+
*/
|
|
24
|
+
export declare const DISALLOWED_WITHOUT_EXPLANATION: unique symbol;
|
|
25
|
+
/**
|
|
26
|
+
* An instance of this type describes whether a property is allowed in the current context or not.
|
|
27
|
+
* A faulty instance of this type expresses that the property is allowed in the current context.
|
|
28
|
+
* A non-faulty string instance expresses that the property is not allowed in the current context.
|
|
29
|
+
* Moreover, it contains the human readable reason why the property is not allowed.
|
|
30
|
+
* The special value DISALLOWED_WITHOUT_EXPLANATION indicates that the property is not allowed in the current context
|
|
31
|
+
* and that it should be hidden without any explanation.
|
|
32
|
+
*/
|
|
33
|
+
export type DisallowedSpecification = string | typeof DISALLOWED_WITHOUT_EXPLANATION;
|
|
34
|
+
/**
|
|
35
|
+
* Helper function to be called within elementAdapters of syncRules.
|
|
36
|
+
* The function should be called when a property defined in the generic schema is not valid
|
|
37
|
+
* for the page the specific schema is currently generated for.
|
|
38
|
+
* We distinguish two cases:
|
|
39
|
+
* - The property is present in the manifest (although it should not)
|
|
40
|
+
* - The property is not present in the manifest (as expected)
|
|
41
|
+
* In the first case the corresponding property should still be present in the schema.
|
|
42
|
+
* However, a warning message is added to the schema in order to make the user aware of this inconsistency.
|
|
43
|
+
* In the second case the property should not be shown to the user. So, preferably we would
|
|
44
|
+
* remove the property from the schema.
|
|
45
|
+
* However, this is currently not possible due to a flaw in the undo/redo logic which results in schemas
|
|
46
|
+
* being used to process the export that do not exactly fit to the current state of the config.
|
|
47
|
+
* For these cases we need the manifest path which is stored with the definition of the property in the schema.
|
|
48
|
+
* Therefore, we set the hidden flag of the property to true. This will be changed as soon as the undo/redo logic has been refactored.
|
|
49
|
+
*
|
|
50
|
+
* @param disallowedReason - The truthy description how the disallowed property should be handled
|
|
51
|
+
* @param element - the element in the schema representing the property
|
|
52
|
+
* @param value - the value of the property in the manifest
|
|
53
|
+
* @param manifestPath - the path to the property in the manifest
|
|
54
|
+
* @returns the ProcessingRule for element, resp. undefined if the element should not be removed from the page specific schema.
|
|
55
|
+
* Note that the second case will only occur after the refactoring of the undo/redo logic.
|
|
56
|
+
*/
|
|
57
|
+
export declare function handleDisallowedProperty(disallowedReason: DisallowedSpecification, element: Definition, value: unknown, manifestPath: AccessorPath): ProcessingRule | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Instances of this type are used during page specific schema generation. They specify how to deal with a specific manifest property.
|
|
60
|
+
* Instances of this type should be provided by instances of type ManifestAnalyzer (passed to function getSyncRuleForManifestProperty).
|
|
61
|
+
*
|
|
62
|
+
* @property manifestPath - specifies where the content for this property should be located within the manifest
|
|
63
|
+
* @property disallowedReason - faulty when the property is valid for the page. Otherwise describes how to deal with the disallowed property if it is present in the manifest.
|
|
64
|
+
*/
|
|
65
|
+
export type ManifestRule = {
|
|
66
|
+
manifestPath: AccessorPath;
|
|
67
|
+
disallowedReason?: DisallowedSpecification;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* An instance of this type provides a possibility to obtain a ManifestRule. ManifestAnalyzers should be provided by users of function getSyncRuleForManifestProperty.
|
|
71
|
+
*
|
|
72
|
+
* @param element - the element in the schema representing the property to be analyzed
|
|
73
|
+
* @param schemaHandlingParams - information provided by the hierarchy level above of the schema generation process
|
|
74
|
+
* @param generateParameters - input parameters for the schema generation process
|
|
75
|
+
* @returns a ManifestRule which specifies how to deal with the manifest property
|
|
76
|
+
*/
|
|
77
|
+
export type ManifestAnalyzer = (element: Definition, schemaHandlingParams: SchemaHandlingParams, generateParameters: GenerateAppSchemaParameters) => ManifestRule;
|
|
78
|
+
/**
|
|
79
|
+
* An instance of this type is called within an instance of type ElementAdapter.
|
|
80
|
+
* Thereby, the schema element it is working on represents a manifest property.
|
|
81
|
+
* The function is called with the same parameters as an instance of type ElementAdapter.
|
|
82
|
+
* The only difference is that the function is called with an additional parameter 'value' which contains the value of the property in the manifest.
|
|
83
|
+
* The task of this function is to adapt the schema element for the page specific schema (if such an adaptation is necessary).
|
|
84
|
+
*
|
|
85
|
+
* @param element - same as in type ElementAdapter. It represents a manifest property.
|
|
86
|
+
* @param schemaHandlingParams - same as in type ElementAdapter
|
|
87
|
+
* @param generateParameters - same as in type ElementAdapter
|
|
88
|
+
* @param value - the value of the property in the manifest
|
|
89
|
+
* @returns a ProcessingRule which specifies how to deal with the manifest property
|
|
90
|
+
*/
|
|
91
|
+
type ElementAdapterExtended = (element: Definition, schemaHandlingParams: SchemaHandlingParams, generateParameters: GenerateAppSchemaParameters, value: unknown) => void;
|
|
92
|
+
/**
|
|
93
|
+
* An instance of this type is called within an instance of type ElementAdapter.
|
|
94
|
+
* Thereby, the schema element it is working on represents a manifest property.
|
|
95
|
+
* The function is called with the same parameters as an instance of type ElementAdapter.
|
|
96
|
+
* The only difference is that the parameter 'element' is not passed to the function.
|
|
97
|
+
* The task of this function is to provide the ReferenceAdaptationInfo which should be included
|
|
98
|
+
* in the ProcessingRule provided by the ElementAdapter (if an adaptation of the reference is necessary).
|
|
99
|
+
*
|
|
100
|
+
* @param schemaHandlingParams - same as in type ElementAdapter
|
|
101
|
+
* @param generateParameters - same as in type ElementAdapter
|
|
102
|
+
* @returns the ReferenceAdaptationInfo to be included in the ProcessingRule if necessary
|
|
103
|
+
*/
|
|
104
|
+
export type ReferenceAdaptationProvider = (schemaHandlingParams: SchemaHandlingParams, generateParameters: GenerateAppSchemaParameters) => ReferenceAdaptationInfo | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* This function can be used to generate a SyncRule for a manifest property that may be omitted in the page specific schema
|
|
107
|
+
* depending on the context of the page.
|
|
108
|
+
*
|
|
109
|
+
* @param property - the name of the property in the manifest the SyncRule should be generated for
|
|
110
|
+
* @param analyze - provides the ManifestRule for the property
|
|
111
|
+
* @param adapt - an optional function that can be used to adapt the schema element representing the manifest property
|
|
112
|
+
* @param provideReferenceAdaptation - an optional function that can be used to provide the ReferenceAdaptationInfo for the manifest property
|
|
113
|
+
* @param expectedType - the expected type of the value of the property (if it is not undefined)
|
|
114
|
+
* @returns the SyncRule for the manifest property
|
|
115
|
+
*/
|
|
116
|
+
export declare function getSyncRuleForManifestProperty(property: string, analyze: ManifestAnalyzer, adapt?: ElementAdapterExtended, provideReferenceAdaptation?: ReferenceAdaptationProvider, expectedType?: string): SyncRule;
|
|
117
|
+
export {};
|
|
118
|
+
//# sourceMappingURL=manifestPropertyUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifestPropertyUtils.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v2/generate/manifestPropertyUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EACR,QAAQ,EACR,2BAA2B,EAC3B,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,uBAAuB,EAC1B,MAAM,6BAA6B,CAAC;AAGrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAKhD;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAChC,MAAM,EAAE,OAAO,EACf,YAAY,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,eAAe,EACxB,YAAY,GAAE,MAAiB,EAC/B,SAAS,GAAE,OAAe,GAC3B,OAAO,CAqBT;AAED;;GAEG;AACH,eAAO,MAAM,8BAA8B,EAAE,OAAO,MAA6D,CAAC;AAElH;;;;;;;GAOG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,OAAO,8BAA8B,CAAC;AAErF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,wBAAwB,CACpC,gBAAgB,EAAE,uBAAuB,EACzC,OAAO,EAAE,UAAU,EACnB,KAAK,EAAE,OAAO,EACd,YAAY,EAAE,YAAY,GAC3B,cAAc,GAAG,SAAS,CAmB5B;AAED;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG;IACvB,YAAY,EAAE,YAAY,CAAC;IAC3B,gBAAgB,CAAC,EAAE,uBAAuB,CAAC;CAC9C,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAC3B,OAAO,EAAE,UAAU,EACnB,oBAAoB,EAAE,oBAAoB,EAC1C,kBAAkB,EAAE,2BAA2B,KAC9C,YAAY,CAAC;AAElB;;;;;;;;;;;;GAYG;AACH,KAAK,sBAAsB,GAAG,CAC1B,OAAO,EAAE,UAAU,EACnB,oBAAoB,EAAE,oBAAoB,EAC1C,kBAAkB,EAAE,2BAA2B,EAC/C,KAAK,EAAE,OAAO,KACb,IAAI,CAAC;AAEV;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,2BAA2B,GAAG,CACtC,oBAAoB,EAAE,oBAAoB,EAC1C,kBAAkB,EAAE,2BAA2B,KAC9C,uBAAuB,GAAG,SAAS,CAAC;AAEzC;;;;;;;;;;GAUG;AACH,wBAAgB,8BAA8B,CAC1C,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,gBAAgB,EACzB,KAAK,CAAC,EAAE,sBAAsB,EAC9B,0BAA0B,CAAC,EAAE,2BAA2B,EACxD,YAAY,CAAC,EAAE,MAAM,GACtB,QAAQ,CAwCV"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @file This file contains helper functions for generating page specific schemas that are used in the context of manifest properties.
|
|
4
|
+
* The functionality is implicitly tested by the more complex unit-tests for generic schema generation and generic import in test-folder unit/genericSchemaHandling.
|
|
5
|
+
*/
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.DISALLOWED_WITHOUT_EXPLANATION = void 0;
|
|
11
|
+
exports.hasPropertyTypeError = hasPropertyTypeError;
|
|
12
|
+
exports.handleDisallowedProperty = handleDisallowedProperty;
|
|
13
|
+
exports.getSyncRuleForManifestProperty = getSyncRuleForManifestProperty;
|
|
14
|
+
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
15
|
+
const extensionLogger_1 = require("../../../extensionLogger");
|
|
16
|
+
const i18next_1 = __importDefault(require("i18next"));
|
|
17
|
+
const utils_1 = require("../utils");
|
|
18
|
+
/**
|
|
19
|
+
* Type check for properties coming from the manifest.
|
|
20
|
+
*
|
|
21
|
+
* @param parent - the parent object in manifest which may contain the property.
|
|
22
|
+
* @param propertyName - name of the property name to be checked
|
|
23
|
+
* @param logger - a logger which may receive the error message in case a type error is detected
|
|
24
|
+
* @param expectedType - the expected type of the value of the property (if it is not undefined)
|
|
25
|
+
* @param mandatory - specifies handling of null and undefined: If parent is null this is always considered an error.
|
|
26
|
+
* undefined value for parent or its specified property is considered an error when parameter mandatory is true.
|
|
27
|
+
* null value for the specified property is considered an error when mandatory is true or the expected type is not 'object'.
|
|
28
|
+
* @returns the information whether a type error was detected.
|
|
29
|
+
*/
|
|
30
|
+
function hasPropertyTypeError(parent, propertyName, logger, expectedType = 'string', mandatory = false) {
|
|
31
|
+
let hasTypeError;
|
|
32
|
+
if (parent === undefined) {
|
|
33
|
+
hasTypeError = mandatory;
|
|
34
|
+
}
|
|
35
|
+
else if (parent === null || typeof parent !== 'object') {
|
|
36
|
+
hasTypeError = true;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
const propValue = parent[propertyName];
|
|
40
|
+
if (propValue === undefined) {
|
|
41
|
+
hasTypeError = mandatory;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
hasTypeError = typeof propValue !== expectedType || (propValue === null && mandatory);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (hasTypeError) {
|
|
48
|
+
(0, extensionLogger_1.log)(logger, {
|
|
49
|
+
severity: "error" /* LogSeverity.Error */,
|
|
50
|
+
message: i18next_1.default.t('TYPEERROR', { propertyName: propertyName, expectedType: expectedType })
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return hasTypeError;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* This symbol is used to indicate that a property is not allowed in the current context and that it should be hidden without any explanation.
|
|
57
|
+
*/
|
|
58
|
+
exports.DISALLOWED_WITHOUT_EXPLANATION = Symbol('Property is suppressed without explanation');
|
|
59
|
+
/**
|
|
60
|
+
* Helper function to be called within elementAdapters of syncRules.
|
|
61
|
+
* The function should be called when a property defined in the generic schema is not valid
|
|
62
|
+
* for the page the specific schema is currently generated for.
|
|
63
|
+
* We distinguish two cases:
|
|
64
|
+
* - The property is present in the manifest (although it should not)
|
|
65
|
+
* - The property is not present in the manifest (as expected)
|
|
66
|
+
* In the first case the corresponding property should still be present in the schema.
|
|
67
|
+
* However, a warning message is added to the schema in order to make the user aware of this inconsistency.
|
|
68
|
+
* In the second case the property should not be shown to the user. So, preferably we would
|
|
69
|
+
* remove the property from the schema.
|
|
70
|
+
* However, this is currently not possible due to a flaw in the undo/redo logic which results in schemas
|
|
71
|
+
* being used to process the export that do not exactly fit to the current state of the config.
|
|
72
|
+
* For these cases we need the manifest path which is stored with the definition of the property in the schema.
|
|
73
|
+
* Therefore, we set the hidden flag of the property to true. This will be changed as soon as the undo/redo logic has been refactored.
|
|
74
|
+
*
|
|
75
|
+
* @param disallowedReason - The truthy description how the disallowed property should be handled
|
|
76
|
+
* @param element - the element in the schema representing the property
|
|
77
|
+
* @param value - the value of the property in the manifest
|
|
78
|
+
* @param manifestPath - the path to the property in the manifest
|
|
79
|
+
* @returns the ProcessingRule for element, resp. undefined if the element should not be removed from the page specific schema.
|
|
80
|
+
* Note that the second case will only occur after the refactoring of the undo/redo logic.
|
|
81
|
+
*/
|
|
82
|
+
function handleDisallowedProperty(disallowedReason, element, value, manifestPath) {
|
|
83
|
+
delete element.$ref;
|
|
84
|
+
if (value === undefined || disallowedReason === exports.DISALLOWED_WITHOUT_EXPLANATION) {
|
|
85
|
+
element[ux_specification_types_1.SchemaTag.hidden] = true;
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
if (typeof value === 'object') {
|
|
89
|
+
element.type = 'object';
|
|
90
|
+
}
|
|
91
|
+
element[ux_specification_types_1.SchemaTag.messages] = [
|
|
92
|
+
{
|
|
93
|
+
text: disallowedReason,
|
|
94
|
+
deletable: true,
|
|
95
|
+
type: ux_specification_types_1.PropertyMessageType.Warning
|
|
96
|
+
}
|
|
97
|
+
];
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
manifestPath
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* This function can be used to generate a SyncRule for a manifest property that may be omitted in the page specific schema
|
|
105
|
+
* depending on the context of the page.
|
|
106
|
+
*
|
|
107
|
+
* @param property - the name of the property in the manifest the SyncRule should be generated for
|
|
108
|
+
* @param analyze - provides the ManifestRule for the property
|
|
109
|
+
* @param adapt - an optional function that can be used to adapt the schema element representing the manifest property
|
|
110
|
+
* @param provideReferenceAdaptation - an optional function that can be used to provide the ReferenceAdaptationInfo for the manifest property
|
|
111
|
+
* @param expectedType - the expected type of the value of the property (if it is not undefined)
|
|
112
|
+
* @returns the SyncRule for the manifest property
|
|
113
|
+
*/
|
|
114
|
+
function getSyncRuleForManifestProperty(property, analyze, adapt, provideReferenceAdaptation, expectedType) {
|
|
115
|
+
return {
|
|
116
|
+
manifest: {},
|
|
117
|
+
elementAdapter: function (element, schemaHandlingParams, generateParameters) {
|
|
118
|
+
const { manifestPath, disallowedReason } = analyze(element, schemaHandlingParams, generateParameters);
|
|
119
|
+
if (disallowedReason === exports.DISALLOWED_WITHOUT_EXPLANATION) {
|
|
120
|
+
return; // Suppress the property even if it is present in the current manifest -> no further processing needed
|
|
121
|
+
}
|
|
122
|
+
// What is the state of the property in the current manifest?
|
|
123
|
+
const { value, parent } = (0, utils_1.getManifestPropertyByPath)(generateParameters.manifest, manifestPath, property);
|
|
124
|
+
if (disallowedReason) {
|
|
125
|
+
return handleDisallowedProperty(disallowedReason, element, value, manifestPath);
|
|
126
|
+
}
|
|
127
|
+
// The property is applicable.
|
|
128
|
+
// But it can still be that its current content does not have the correct type.
|
|
129
|
+
// Type errors are logged. Note that the user can also see these errors.
|
|
130
|
+
const hasTypeErrors = expectedType
|
|
131
|
+
? hasPropertyTypeError(parent, property, generateParameters.logger, expectedType)
|
|
132
|
+
: false;
|
|
133
|
+
if (hasTypeErrors && (expectedType === 'object' || typeof value === 'object')) {
|
|
134
|
+
// either value in manifest is an object but should be scalar or it is scalar but should be an object.
|
|
135
|
+
// This inconsistency must be removed in the text file of the manifest -> do not provide this property at all
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (adapt) {
|
|
139
|
+
adapt(element, schemaHandlingParams, generateParameters, value);
|
|
140
|
+
}
|
|
141
|
+
const referenceAdaptation = provideReferenceAdaptation
|
|
142
|
+
? provideReferenceAdaptation(schemaHandlingParams, generateParameters)
|
|
143
|
+
: undefined;
|
|
144
|
+
return {
|
|
145
|
+
manifestPath,
|
|
146
|
+
referenceAdaptation
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=manifestPropertyUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifestPropertyUtils.js","sourceRoot":"","sources":["../../../../../../src/sync/v2/generate/manifestPropertyUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AA8BH,oDA2BC;AAwCD,4DAwBC;AA4ED,wEA8CC;AAxOD,wEAA0F;AAG1F,8DAA+C;AAC/C,sDAA8B;AAC9B,oCAAqD;AAErD;;;;;;;;;;;GAWG;AACH,SAAgB,oBAAoB,CAChC,MAAe,EACf,YAAoB,EACpB,MAAwB,EACxB,eAAuB,QAAQ,EAC/B,YAAqB,KAAK;IAE1B,IAAI,YAAqB,CAAC;IAC1B,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACvB,YAAY,GAAG,SAAS,CAAC;IAC7B,CAAC;SAAM,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QACvD,YAAY,GAAG,IAAI,CAAC;IACxB,CAAC;SAAM,CAAC;QACJ,MAAM,SAAS,GAAG,MAAM,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AC;gBACtE,CAAC,CAAC,SAAS,CAAC;YAChB,OAAO;gBACH,YAAY;gBACZ,mBAAmB;aACtB,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { GenerateAppSchemaParameters } from '@sap/ux-specification-types';
|
|
2
2
|
/**
|
|
3
3
|
* Generates an app specific schema out of the generic schema.
|
|
4
|
-
* @param {GenerateSchemaParameters} generateParameters - list of API input parameters
|
|
5
|
-
* @param genericSchema - generic JSON schema of an object page
|
|
6
4
|
*
|
|
5
|
+
* @param generateParameters - list of API input parameters
|
|
6
|
+
* @param genericSchema - generic JSON schema of an object page
|
|
7
7
|
* @returns the app specific JSON schema
|
|
8
8
|
*/
|
|
9
9
|
export declare function generateObjectPageSchemaV2(generateParameters: GenerateAppSchemaParameters, genericSchema: object): object;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectPage.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v2/generate/objectPage.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAKR,2BAA2B,EAE9B,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"objectPage.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v2/generate/objectPage.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAKR,2BAA2B,EAE9B,MAAM,6BAA6B,CAAC;AA22BrC;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACtC,kBAAkB,EAAE,2BAA2B,EAC/C,aAAa,EAAE,MAAM,GACtB,MAAM,CA8FR"}
|