@sapui5/sap.fe.core 1.102.2 → 1.104.1
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/package.json +6 -6
- package/src/sap/fe/core/.library +1 -1
- package/src/sap/fe/core/AppComponent.js +73 -30
- package/src/sap/fe/core/AppComponent.ts +65 -43
- package/src/sap/fe/core/AppStateHandler.js +82 -70
- package/src/sap/fe/core/AppStateHandler.ts +32 -37
- package/src/sap/fe/core/BaseController.js +11 -9
- package/src/sap/fe/core/BaseController.ts +15 -13
- package/src/sap/fe/core/CommonUtils.js +227 -126
- package/src/sap/fe/core/CommonUtils.ts +240 -163
- package/src/sap/fe/core/ExtensionAPI.js +24 -27
- package/src/sap/fe/core/ExtensionAPI.ts +36 -38
- package/src/sap/fe/core/PageController.js +4 -4
- package/src/sap/fe/core/PageController.ts +4 -5
- package/src/sap/fe/core/TemplateComponent.js +1 -1
- package/src/sap/fe/core/TemplateComponent.ts +6 -6
- package/src/sap/fe/core/TemplateModel.js +1 -1
- package/src/sap/fe/core/TemplateModel.ts +1 -1
- package/src/sap/fe/core/buildingBlocks/AttributeModel.js +1 -1
- package/src/sap/fe/core/buildingBlocks/AttributeModel.ts +1 -1
- package/src/sap/fe/core/buildingBlocks/BuildingBlock.js +181 -43
- package/src/sap/fe/core/buildingBlocks/BuildingBlock.ts +150 -24
- package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.js +585 -210
- package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.ts +246 -96
- package/src/sap/fe/core/buildingBlocks/TraceInfo.js +30 -30
- package/src/sap/fe/core/buildingBlocks/TraceInfo.ts +32 -29
- package/src/sap/fe/core/controllerextensions/EditFlow.js +379 -330
- package/src/sap/fe/core/controllerextensions/EditFlow.ts +253 -245
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +9 -9
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.ts +10 -10
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +101 -74
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.ts +69 -79
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +67 -67
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.ts +76 -76
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +85 -77
- package/src/sap/fe/core/controllerextensions/InternalRouting.ts +103 -99
- package/src/sap/fe/core/controllerextensions/KPIManagement.js +66 -68
- package/src/sap/fe/core/controllerextensions/KPIManagement.ts +106 -123
- package/src/sap/fe/core/controllerextensions/MassEdit.js +9 -9
- package/src/sap/fe/core/controllerextensions/MassEdit.ts +20 -27
- package/src/sap/fe/core/controllerextensions/MessageHandler.js +20 -12
- package/src/sap/fe/core/controllerextensions/MessageHandler.ts +21 -14
- package/src/sap/fe/core/controllerextensions/PageReady.js +97 -25
- package/src/sap/fe/core/controllerextensions/PageReady.ts +98 -34
- package/src/sap/fe/core/controllerextensions/Paginator.js +21 -22
- package/src/sap/fe/core/controllerextensions/Paginator.ts +24 -25
- package/src/sap/fe/core/controllerextensions/Placeholder.js +4 -6
- package/src/sap/fe/core/controllerextensions/Placeholder.ts +12 -14
- package/src/sap/fe/core/controllerextensions/Routing.js +10 -11
- package/src/sap/fe/core/controllerextensions/Routing.ts +12 -13
- package/src/sap/fe/core/controllerextensions/Share.js +170 -139
- package/src/sap/fe/core/controllerextensions/Share.ts +117 -118
- package/src/sap/fe/core/controllerextensions/SideEffects.js +46 -50
- package/src/sap/fe/core/controllerextensions/SideEffects.ts +56 -60
- package/src/sap/fe/core/controllerextensions/ViewState.js +200 -131
- package/src/sap/fe/core/controllerextensions/ViewState.ts +141 -148
- package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.js +5 -5
- package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.ts +8 -7
- package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.js +11 -10
- package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.ts +17 -20
- package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.js +2 -2
- package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.ts +4 -4
- package/src/sap/fe/core/controllerextensions/collaboration/Manage.js +7 -9
- package/src/sap/fe/core/controllerextensions/collaboration/Manage.ts +18 -19
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.js +190 -141
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.ts +258 -210
- package/src/sap/fe/core/controllerextensions/editFlow/draft.js +183 -125
- package/src/sap/fe/core/controllerextensions/editFlow/draft.ts +213 -156
- package/src/sap/fe/core/controllerextensions/editFlow/operations.js +164 -140
- package/src/sap/fe/core/controllerextensions/editFlow/operations.ts +180 -150
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.js +24 -26
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.ts +35 -33
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.js +71 -41
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.ts +102 -82
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy.js +61 -71
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy.ts +56 -64
- package/src/sap/fe/core/controls/Any.js +9 -5
- package/src/sap/fe/core/controls/Any.ts +10 -4
- package/src/sap/fe/core/controls/CommandExecution.js +11 -25
- package/src/sap/fe/core/controls/CommandExecution.ts +11 -25
- package/src/sap/fe/core/controls/ConditionalWrapper.js +2 -2
- package/src/sap/fe/core/controls/ConditionalWrapper.ts +3 -3
- package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.js +22 -22
- package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.ts +25 -24
- package/src/sap/fe/core/controls/CustomQuickViewPage.js +2 -2
- package/src/sap/fe/core/controls/CustomQuickViewPage.ts +2 -2
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +3 -3
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.ts +5 -5
- package/src/sap/fe/core/controls/FieldWrapper.js +2 -2
- package/src/sap/fe/core/controls/FieldWrapper.ts +3 -3
- package/src/sap/fe/core/controls/FileWrapper.js +7 -2
- package/src/sap/fe/core/controls/FileWrapper.ts +15 -11
- package/src/sap/fe/core/controls/FilterBar.js +6 -2
- package/src/sap/fe/core/controls/FilterBar.ts +13 -9
- package/src/sap/fe/core/controls/FormElementWrapper.js +1 -1
- package/src/sap/fe/core/controls/FormElementWrapper.ts +2 -2
- package/src/sap/fe/core/controls/MassEditSelect.js +1 -1
- package/src/sap/fe/core/controls/MassEditSelect.ts +0 -4
- package/src/sap/fe/core/controls/NonComputedVisibleKeyFieldsDialog.fragment.xml +3 -3
- package/src/sap/fe/core/controls/filterbar/VisualFilter.js +16 -12
- package/src/sap/fe/core/controls/filterbar/VisualFilter.ts +20 -22
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +3 -3
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.ts +8 -8
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +49 -49
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.ts +54 -54
- package/src/sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml +8 -2
- package/src/sap/fe/core/controls/massEdit/MassEditField.fragment.xml +22 -35
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +89 -88
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.ts +107 -106
- package/src/sap/fe/core/converters/ConverterContext.js +26 -33
- package/src/sap/fe/core/converters/ConverterContext.ts +52 -61
- package/src/sap/fe/core/converters/ManifestSettings.js +1 -1
- package/src/sap/fe/core/converters/ManifestSettings.ts +17 -15
- package/src/sap/fe/core/converters/ManifestWrapper.js +59 -45
- package/src/sap/fe/core/converters/ManifestWrapper.ts +55 -45
- package/src/sap/fe/core/converters/MetaModelConverter.js +64 -35
- package/src/sap/fe/core/converters/MetaModelConverter.ts +154 -129
- package/src/sap/fe/core/converters/TemplateConverter.js +21 -20
- package/src/sap/fe/core/converters/TemplateConverter.ts +27 -24
- package/src/sap/fe/core/converters/annotations/DataField.js +58 -35
- package/src/sap/fe/core/converters/annotations/DataField.ts +102 -76
- package/src/sap/fe/core/converters/common/AnnotationConverter.js +1911 -1495
- package/src/sap/fe/core/converters/controls/Common/Action.js +50 -41
- package/src/sap/fe/core/converters/controls/Common/Action.ts +56 -46
- package/src/sap/fe/core/converters/controls/Common/Chart.js +14 -14
- package/src/sap/fe/core/converters/controls/Common/Chart.ts +26 -33
- package/src/sap/fe/core/converters/controls/Common/Criticality.js +3 -3
- package/src/sap/fe/core/converters/controls/Common/Criticality.ts +4 -4
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.js +30 -28
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.ts +60 -61
- package/src/sap/fe/core/converters/controls/Common/Form.js +27 -28
- package/src/sap/fe/core/converters/controls/Common/Form.ts +44 -57
- package/src/sap/fe/core/converters/controls/Common/KPI.js +11 -11
- package/src/sap/fe/core/converters/controls/Common/KPI.ts +49 -52
- package/src/sap/fe/core/converters/controls/Common/Table.js +181 -197
- package/src/sap/fe/core/converters/controls/Common/Table.ts +251 -280
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +119 -119
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +144 -141
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +45 -41
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +65 -59
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js +28 -26
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.ts +46 -43
- package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.js +9 -9
- package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.ts +14 -13
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.js +67 -64
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.ts +69 -66
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +77 -73
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +101 -97
- package/src/sap/fe/core/converters/helpers/Aggregation.js +2 -4
- package/src/sap/fe/core/converters/helpers/Aggregation.ts +12 -15
- package/src/sap/fe/core/converters/helpers/BindingHelper.js +31 -31
- package/src/sap/fe/core/converters/helpers/BindingHelper.ts +30 -29
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.js +4 -4
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.ts +9 -9
- package/src/sap/fe/core/converters/helpers/ID.js +48 -46
- package/src/sap/fe/core/converters/helpers/ID.ts +26 -25
- package/src/sap/fe/core/converters/helpers/Key.js +7 -7
- package/src/sap/fe/core/converters/helpers/Key.ts +7 -7
- package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.js +1 -1
- package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.ts +4 -5
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.js +6 -6
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.ts +10 -10
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +46 -62
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +54 -82
- package/src/sap/fe/core/converters/templates/ListReportConverter.js +55 -42
- package/src/sap/fe/core/converters/templates/ListReportConverter.ts +81 -66
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +39 -38
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +52 -61
- package/src/sap/fe/core/designtime/AppComponent.designtime.js +4 -4
- package/src/sap/fe/core/designtime/AppComponent.designtime.ts +4 -4
- package/src/sap/fe/core/formatters/CollaborationFormatter.js +2 -2
- package/src/sap/fe/core/formatters/CollaborationFormatter.ts +3 -3
- package/src/sap/fe/core/formatters/FPMFormatter.js +5 -5
- package/src/sap/fe/core/formatters/FPMFormatter.ts +10 -10
- package/src/sap/fe/core/formatters/KPIFormatter.js +7 -7
- package/src/sap/fe/core/formatters/KPIFormatter.ts +10 -10
- package/src/sap/fe/core/formatters/StandardFormatter.js +96 -0
- package/src/sap/fe/core/formatters/StandardFormatter.ts +70 -0
- package/src/sap/fe/core/formatters/TableFormatter.js +11 -11
- package/src/sap/fe/core/formatters/TableFormatter.ts +12 -12
- package/src/sap/fe/core/formatters/ValueFormatter.js +8 -8
- package/src/sap/fe/core/formatters/ValueFormatter.ts +9 -9
- package/src/sap/fe/core/helpers/AppStartupHelper.js +15 -15
- package/src/sap/fe/core/helpers/AppStartupHelper.ts +37 -40
- package/src/sap/fe/core/helpers/BindingToolkit.js +1832 -0
- package/src/sap/fe/core/helpers/{BindingExpression.ts → BindingToolkit.ts} +396 -269
- package/src/sap/fe/core/helpers/ClassSupport.js +49 -12
- package/src/sap/fe/core/helpers/ClassSupport.ts +37 -10
- package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.js +2 -2
- package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.ts +1 -1
- package/src/sap/fe/core/helpers/EditState.js +1 -6
- package/src/sap/fe/core/helpers/EditState.ts +5 -10
- package/src/sap/fe/core/helpers/ExcelFormatHelper.js +2 -2
- package/src/sap/fe/core/helpers/ExcelFormatHelper.ts +4 -4
- package/src/sap/fe/core/helpers/FPMHelper.js +1 -1
- package/src/sap/fe/core/helpers/FPMHelper.ts +2 -2
- package/src/sap/fe/core/helpers/KeepAliveHelper.js +31 -31
- package/src/sap/fe/core/helpers/KeepAliveHelper.ts +52 -56
- package/src/sap/fe/core/helpers/MassEditHelper.js +306 -280
- package/src/sap/fe/core/helpers/MassEditHelper.ts +380 -360
- package/src/sap/fe/core/helpers/MessageStrip.js +81 -0
- package/src/sap/fe/core/helpers/MessageStrip.ts +79 -0
- package/src/sap/fe/core/helpers/ModelHelper.js +25 -25
- package/src/sap/fe/core/helpers/ModelHelper.ts +34 -32
- package/src/sap/fe/core/helpers/PasteHelper.js +3 -10
- package/src/sap/fe/core/helpers/PasteHelper.ts +20 -25
- package/src/sap/fe/core/helpers/SemanticDateOperators.js +1 -1
- package/src/sap/fe/core/helpers/SemanticDateOperators.ts +11 -11
- package/src/sap/fe/core/helpers/SemanticKeyHelper.js +3 -3
- package/src/sap/fe/core/helpers/SemanticKeyHelper.ts +8 -8
- package/src/sap/fe/core/helpers/StableIdHelper.js +12 -12
- package/src/sap/fe/core/helpers/StableIdHelper.ts +12 -12
- package/src/sap/fe/core/helpers/ToES6Promise.js +32 -0
- package/src/sap/fe/core/helpers/ToES6Promise.ts +19 -0
- package/src/sap/fe/core/jsx-runtime/Fragment.js +16 -0
- package/src/sap/fe/core/jsx-runtime/Fragment.ts +3 -0
- package/src/sap/fe/core/jsx-runtime/jsx-control.js +99 -0
- package/src/sap/fe/core/jsx-runtime/jsx-control.ts +82 -0
- package/src/sap/fe/core/jsx-runtime/jsx-xml.js +105 -0
- package/src/sap/fe/core/jsx-runtime/jsx-xml.ts +89 -0
- package/src/sap/fe/core/jsx-runtime/jsx.js +12 -90
- package/src/sap/fe/core/jsx-runtime/jsx.ts +24 -85
- package/src/sap/fe/core/library.js +42 -3
- package/src/sap/fe/core/library.ts +38 -0
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +3 -3
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +2 -2
- package/src/sap/fe/core/messagebundle.properties +39 -63
- package/src/sap/fe/core/messagebundle_ar.properties +25 -39
- package/src/sap/fe/core/messagebundle_bg.properties +25 -39
- package/src/sap/fe/core/messagebundle_ca.properties +25 -39
- package/src/sap/fe/core/messagebundle_cs.properties +25 -39
- package/src/sap/fe/core/messagebundle_cy.properties +25 -39
- package/src/sap/fe/core/messagebundle_da.properties +25 -39
- package/src/sap/fe/core/messagebundle_de.properties +25 -39
- package/src/sap/fe/core/messagebundle_el.properties +26 -40
- package/src/sap/fe/core/messagebundle_en.properties +25 -39
- package/src/sap/fe/core/messagebundle_en_GB.properties +25 -39
- package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +25 -39
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +25 -39
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +26 -18
- package/src/sap/fe/core/messagebundle_es.properties +27 -41
- package/src/sap/fe/core/messagebundle_es_MX.properties +25 -39
- package/src/sap/fe/core/messagebundle_et.properties +25 -39
- package/src/sap/fe/core/messagebundle_fi.properties +25 -39
- package/src/sap/fe/core/messagebundle_fr.properties +26 -40
- package/src/sap/fe/core/messagebundle_fr_CA.properties +25 -39
- package/src/sap/fe/core/messagebundle_hi.properties +25 -39
- package/src/sap/fe/core/messagebundle_hr.properties +25 -39
- package/src/sap/fe/core/messagebundle_hu.properties +25 -39
- package/src/sap/fe/core/messagebundle_id.properties +25 -39
- package/src/sap/fe/core/messagebundle_it.properties +41 -55
- package/src/sap/fe/core/messagebundle_iw.properties +25 -39
- package/src/sap/fe/core/messagebundle_ja.properties +25 -39
- package/src/sap/fe/core/messagebundle_kk.properties +25 -39
- package/src/sap/fe/core/messagebundle_ko.properties +30 -44
- package/src/sap/fe/core/messagebundle_lt.properties +25 -39
- package/src/sap/fe/core/messagebundle_lv.properties +25 -39
- package/src/sap/fe/core/messagebundle_ms.properties +25 -39
- package/src/sap/fe/core/messagebundle_nl.properties +27 -41
- package/src/sap/fe/core/messagebundle_no.properties +25 -39
- package/src/sap/fe/core/messagebundle_pl.properties +26 -40
- package/src/sap/fe/core/messagebundle_pt.properties +26 -40
- package/src/sap/fe/core/messagebundle_pt_PT.properties +25 -39
- package/src/sap/fe/core/messagebundle_ro.properties +25 -39
- package/src/sap/fe/core/messagebundle_ru.properties +25 -39
- package/src/sap/fe/core/messagebundle_sh.properties +25 -39
- package/src/sap/fe/core/messagebundle_sk.properties +25 -39
- package/src/sap/fe/core/messagebundle_sl.properties +25 -39
- package/src/sap/fe/core/messagebundle_sv.properties +25 -39
- package/src/sap/fe/core/messagebundle_th.properties +25 -39
- package/src/sap/fe/core/messagebundle_tr.properties +25 -39
- package/src/sap/fe/core/messagebundle_uk.properties +25 -39
- package/src/sap/fe/core/messagebundle_vi.properties +25 -39
- package/src/sap/fe/core/messagebundle_zh_CN.properties +25 -39
- package/src/sap/fe/core/messagebundle_zh_TW.properties +25 -39
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +2 -2
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.ts +5 -5
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +97 -69
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.ts +68 -69
- package/src/sap/fe/core/services/EnvironmentServiceFactory.js +1 -1
- package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +3 -2
- package/src/sap/fe/core/services/NavigationServiceFactory.js +61 -49
- package/src/sap/fe/core/services/NavigationServiceFactory.ts +63 -52
- package/src/sap/fe/core/services/ResourceModelServiceFactory.js +2 -2
- package/src/sap/fe/core/services/ResourceModelServiceFactory.ts +4 -4
- package/src/sap/fe/core/services/RoutingServiceFactory.js +55 -55
- package/src/sap/fe/core/services/RoutingServiceFactory.ts +67 -65
- package/src/sap/fe/core/services/ShellServicesFactory.js +92 -76
- package/src/sap/fe/core/services/ShellServicesFactory.ts +95 -82
- package/src/sap/fe/core/services/SideEffectsServiceFactory.js +61 -61
- package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +102 -92
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +224 -198
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +138 -139
- package/src/sap/fe/core/support/CommonHelper.js +3 -2
- package/src/sap/fe/core/support/CommonHelper.ts +9 -13
- package/src/sap/fe/core/support/Diagnostics.js +1 -1
- package/src/sap/fe/core/support/Diagnostics.ts +5 -5
- package/src/sap/fe/core/templating/CommonFormatters.js +84 -0
- package/src/sap/fe/core/templating/CommonFormatters.ts +86 -0
- package/src/sap/fe/core/templating/CriticalityFormatters.js +31 -31
- package/src/sap/fe/core/templating/CriticalityFormatters.ts +42 -40
- package/src/sap/fe/core/templating/DataFieldFormatters.js +8 -8
- package/src/sap/fe/core/templating/DataFieldFormatters.ts +13 -10
- package/src/sap/fe/core/templating/DataModelPathHelper.js +16 -15
- package/src/sap/fe/core/templating/DataModelPathHelper.ts +42 -32
- package/src/sap/fe/core/templating/DisplayModeFormatter.js +1 -1
- package/src/sap/fe/core/templating/DisplayModeFormatter.ts +2 -3
- package/src/sap/fe/core/templating/EntitySetHelper.js +7 -7
- package/src/sap/fe/core/templating/EntitySetHelper.ts +6 -8
- package/src/sap/fe/core/templating/FieldControlHelper.js +35 -34
- package/src/sap/fe/core/templating/FieldControlHelper.ts +29 -46
- package/src/sap/fe/core/templating/FilterHelper.js +16 -15
- package/src/sap/fe/core/templating/FilterHelper.ts +18 -18
- package/src/sap/fe/core/templating/FilterTemplating.js +1 -1
- package/src/sap/fe/core/templating/FilterTemplating.ts +3 -3
- package/src/sap/fe/core/templating/PropertyFormatters.js +7 -7
- package/src/sap/fe/core/templating/PropertyFormatters.ts +21 -19
- package/src/sap/fe/core/templating/PropertyHelper.js +25 -25
- package/src/sap/fe/core/templating/PropertyHelper.ts +25 -26
- package/src/sap/fe/core/templating/UIFormatters.js +152 -95
- package/src/sap/fe/core/templating/UIFormatters.ts +202 -128
- package/src/sap/fe/core/type/Email.js +2 -2
- package/src/sap/fe/core/type/Email.ts +2 -2
- package/src/sap/fe/core/helpers/BindingExpression.js +0 -1732
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import Log from "sap/base/Log";
|
|
2
2
|
import UriParameters from "sap/base/util/UriParameters";
|
|
3
|
-
import AppComponent from "sap/fe/core/AppComponent";
|
|
4
|
-
import { CacheHandlerService } from "sap/fe/core/services/CacheHandlerServiceFactory";
|
|
3
|
+
import type AppComponent from "sap/fe/core/AppComponent";
|
|
4
|
+
import type { CacheHandlerService } from "sap/fe/core/services/CacheHandlerServiceFactory";
|
|
5
5
|
import TemplateModel from "sap/fe/core/TemplateModel";
|
|
6
|
-
import ResourceModel from "sap/fe/macros/ResourceModel";
|
|
6
|
+
import type ResourceModel from "sap/fe/macros/ResourceModel";
|
|
7
7
|
import CacheManager from "sap/ui/core/cache/CacheManager";
|
|
8
8
|
import Component from "sap/ui/core/Component";
|
|
9
9
|
import Core from "sap/ui/core/Core";
|
|
@@ -14,11 +14,11 @@ import ServiceFactoryRegistry from "sap/ui/core/service/ServiceFactoryRegistry";
|
|
|
14
14
|
import Device from "sap/ui/Device";
|
|
15
15
|
import ManagedObjectModel from "sap/ui/model/base/ManagedObjectModel";
|
|
16
16
|
import JSONModel from "sap/ui/model/json/JSONModel";
|
|
17
|
-
import Model from "sap/ui/model/Model";
|
|
17
|
+
import type Model from "sap/ui/model/Model";
|
|
18
18
|
import VersionInfo from "sap/ui/VersionInfo";
|
|
19
|
-
import { CoreEx, ServiceContext } from "types/extension_types";
|
|
19
|
+
import type { CoreEx, ServiceContext } from "types/extension_types";
|
|
20
20
|
import { resolveDynamicExpression } from "../helpers/DynamicAnnotationPathHelper";
|
|
21
|
-
import { ResourceModelService } from "./ResourceModelServiceFactory";
|
|
21
|
+
import type { ResourceModelService } from "./ResourceModelServiceFactory";
|
|
22
22
|
|
|
23
23
|
type TemplatedViewServiceSettings = {};
|
|
24
24
|
|
|
@@ -38,7 +38,7 @@ class TemplatedViewService extends Service<TemplatedViewServiceSettings> {
|
|
|
38
38
|
const oComponent = oContext.scopeObject;
|
|
39
39
|
const oAppComponent = Component.getOwnerComponentFor(oComponent) as AppComponent;
|
|
40
40
|
const oMetaModel = oAppComponent.getMetaModel();
|
|
41
|
-
const sStableId = oAppComponent.getMetadata().getComponentName()
|
|
41
|
+
const sStableId = `${oAppComponent.getMetadata().getComponentName()}::${oAppComponent.getLocalId(oComponent.getId())}`;
|
|
42
42
|
const aEnhanceI18n = oComponent.getEnhanceI18n() || [];
|
|
43
43
|
let sAppNamespace;
|
|
44
44
|
this.oFactory = oContext.factory;
|
|
@@ -53,13 +53,15 @@ class TemplatedViewService extends Service<TemplatedViewServiceSettings> {
|
|
|
53
53
|
if (oResourceModel && oResourceModel.isA("sap.ui.model.resource.ResourceModel")) {
|
|
54
54
|
aEnhanceI18n[i] = oResourceModel;
|
|
55
55
|
} else {
|
|
56
|
-
aEnhanceI18n[i] = sAppNamespace
|
|
56
|
+
aEnhanceI18n[i] = `${sAppNamespace}.${aEnhanceI18n[i].replace(".properties", "")}`;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
const sCacheIdentifier =
|
|
62
|
-
|
|
61
|
+
const sCacheIdentifier = `${oAppComponent.getMetadata().getName()}_${sStableId}_${sap.ui
|
|
62
|
+
.getCore()
|
|
63
|
+
.getConfiguration()
|
|
64
|
+
.getLanguageTag()}`;
|
|
63
65
|
aServiceDependencies.push(
|
|
64
66
|
ServiceFactoryRegistry.get("sap.fe.core.services.ResourceModelService")
|
|
65
67
|
.createInstance({
|
|
@@ -122,7 +124,7 @@ class TemplatedViewService extends Service<TemplatedViewServiceSettings> {
|
|
|
122
124
|
|
|
123
125
|
// In case there is no cache key we ignore the view cache
|
|
124
126
|
sPageModelCacheKey = sCacheKey
|
|
125
|
-
? sCacheKey
|
|
127
|
+
? `${sCacheKey}-${sVersionInfo}-${sStableId}-${oShellServices.instanceType}-pageModel`
|
|
126
128
|
: undefined;
|
|
127
129
|
return Promise.all(aDependenciesResult.concat([this._getCachedModel(sPageModelCacheKey)]));
|
|
128
130
|
})
|
|
@@ -171,7 +173,7 @@ class TemplatedViewService extends Service<TemplatedViewServiceSettings> {
|
|
|
171
173
|
* This is useful for our demokit !
|
|
172
174
|
*
|
|
173
175
|
* @param oComponent
|
|
174
|
-
* @returns
|
|
176
|
+
* @returns A promise indicating when the view is refreshed
|
|
175
177
|
* @private
|
|
176
178
|
*/
|
|
177
179
|
refreshView(oComponent: any) {
|
|
@@ -190,7 +192,7 @@ class TemplatedViewService extends Service<TemplatedViewServiceSettings> {
|
|
|
190
192
|
Log.error(oError);
|
|
191
193
|
});
|
|
192
194
|
}
|
|
193
|
-
createView(
|
|
195
|
+
async createView(
|
|
194
196
|
oResourceModel: any,
|
|
195
197
|
sStableId: any,
|
|
196
198
|
sCacheKey: any,
|
|
@@ -198,7 +200,7 @@ class TemplatedViewService extends Service<TemplatedViewServiceSettings> {
|
|
|
198
200
|
oPageModelCache: any,
|
|
199
201
|
TemplateConverter: any,
|
|
200
202
|
MetaModelConverter: any
|
|
201
|
-
) {
|
|
203
|
+
): Promise<any | void> {
|
|
202
204
|
this.resourceModel = oResourceModel;
|
|
203
205
|
this.stableId = sStableId;
|
|
204
206
|
this.TemplateConverter = TemplateConverter;
|
|
@@ -223,17 +225,17 @@ class TemplatedViewService extends Service<TemplatedViewServiceSettings> {
|
|
|
223
225
|
return sPathSoFar;
|
|
224
226
|
}
|
|
225
227
|
if (sPathSoFar === "") {
|
|
226
|
-
sPathSoFar =
|
|
228
|
+
sPathSoFar = `/${sNextPathPart}`;
|
|
227
229
|
} else {
|
|
228
|
-
const oTarget = oMetaModel.getObject(sPathSoFar
|
|
230
|
+
const oTarget = oMetaModel.getObject(`${sPathSoFar}/$NavigationPropertyBinding/${sNextPathPart}`);
|
|
229
231
|
if (oTarget && Object.keys(oTarget).length > 0) {
|
|
230
232
|
sPathSoFar += "/$NavigationPropertyBinding";
|
|
231
233
|
}
|
|
232
|
-
sPathSoFar +=
|
|
234
|
+
sPathSoFar += `/${sNextPathPart}`;
|
|
233
235
|
}
|
|
234
236
|
return sPathSoFar;
|
|
235
237
|
}, "");
|
|
236
|
-
|
|
238
|
+
return {
|
|
237
239
|
type: "XML",
|
|
238
240
|
preprocessors: {
|
|
239
241
|
xml: {
|
|
@@ -267,7 +269,6 @@ class TemplatedViewService extends Service<TemplatedViewServiceSettings> {
|
|
|
267
269
|
},
|
|
268
270
|
height: "100%"
|
|
269
271
|
};
|
|
270
|
-
return oViewSettings;
|
|
271
272
|
}
|
|
272
273
|
const createErrorPage = (reason: any) => {
|
|
273
274
|
// just replace the view name and add an additional model containing the reason, but
|
|
@@ -285,131 +286,125 @@ class TemplatedViewService extends Service<TemplatedViewServiceSettings> {
|
|
|
285
286
|
});
|
|
286
287
|
});
|
|
287
288
|
};
|
|
288
|
-
return oAppComponent
|
|
289
|
-
.getService("routingService")
|
|
290
|
-
.then((oRoutingService: any) => {
|
|
291
|
-
// Retrieve the viewLevel for the component
|
|
292
|
-
const oTargetInfo = oRoutingService.getTargetInformationFor(oComponent);
|
|
293
|
-
const mOutbounds =
|
|
294
|
-
oManifestContent["sap.app"] &&
|
|
295
|
-
oManifestContent["sap.app"].crossNavigation &&
|
|
296
|
-
oManifestContent["sap.app"].crossNavigation.outbounds;
|
|
297
|
-
const mNavigation = oComponent.getNavigation() || {};
|
|
298
|
-
Object.keys(mNavigation).forEach(function (navigationObjectKey: string) {
|
|
299
|
-
const navigationObject = mNavigation[navigationObjectKey];
|
|
300
|
-
let outboundConfig;
|
|
301
|
-
if (navigationObject.detail && navigationObject.detail.outbound && mOutbounds[navigationObject.detail.outbound]) {
|
|
302
|
-
outboundConfig = mOutbounds[navigationObject.detail.outbound];
|
|
303
|
-
navigationObject.detail.outboundDetail = {
|
|
304
|
-
semanticObject: outboundConfig.semanticObject,
|
|
305
|
-
action: outboundConfig.action,
|
|
306
|
-
parameters: outboundConfig.parameters
|
|
307
|
-
};
|
|
308
|
-
}
|
|
309
|
-
if (navigationObject.create && navigationObject.create.outbound && mOutbounds[navigationObject.create.outbound]) {
|
|
310
|
-
outboundConfig = mOutbounds[navigationObject.create.outbound];
|
|
311
|
-
navigationObject.create.outboundDetail = {
|
|
312
|
-
semanticObject: outboundConfig.semanticObject,
|
|
313
|
-
action: outboundConfig.action,
|
|
314
|
-
parameters: outboundConfig.parameters
|
|
315
|
-
};
|
|
316
|
-
}
|
|
317
|
-
});
|
|
318
|
-
mViewData = {
|
|
319
|
-
navigation: mNavigation,
|
|
320
|
-
viewLevel: oTargetInfo.viewLevel,
|
|
321
|
-
stableId: sStableId,
|
|
322
|
-
contentDensities: oManifestContent["sap.ui5"].contentDensities,
|
|
323
|
-
resourceBundle: oResourceModel.__bundle,
|
|
324
|
-
fullContextPath: sFullContextPath,
|
|
325
|
-
isDesktop: (Device as any).system.desktop,
|
|
326
|
-
isPhone: (Device as any).system.phone
|
|
327
|
-
};
|
|
328
289
|
|
|
329
|
-
|
|
330
|
-
|
|
290
|
+
try {
|
|
291
|
+
const oRoutingService = await oAppComponent.getService("routingService");
|
|
292
|
+
// Retrieve the viewLevel for the component
|
|
293
|
+
const oTargetInfo = oRoutingService.getTargetInformationFor(oComponent);
|
|
294
|
+
const mOutbounds =
|
|
295
|
+
oManifestContent["sap.app"] &&
|
|
296
|
+
oManifestContent["sap.app"].crossNavigation &&
|
|
297
|
+
oManifestContent["sap.app"].crossNavigation.outbounds;
|
|
298
|
+
const mNavigation = oComponent.getNavigation() || {};
|
|
299
|
+
Object.keys(mNavigation).forEach(function (navigationObjectKey: string) {
|
|
300
|
+
const navigationObject = mNavigation[navigationObjectKey];
|
|
301
|
+
let outboundConfig;
|
|
302
|
+
if (navigationObject.detail && navigationObject.detail.outbound && mOutbounds[navigationObject.detail.outbound]) {
|
|
303
|
+
outboundConfig = mOutbounds[navigationObject.detail.outbound];
|
|
304
|
+
navigationObject.detail.outboundDetail = {
|
|
305
|
+
semanticObject: outboundConfig.semanticObject,
|
|
306
|
+
action: outboundConfig.action,
|
|
307
|
+
parameters: outboundConfig.parameters
|
|
308
|
+
};
|
|
331
309
|
}
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
? oManifestContent["sap.fe"].form.retrieveTextFromValueList
|
|
340
|
-
: undefined;
|
|
341
|
-
// The manifest switch for the usage of the new ValueHelp should only used internally
|
|
342
|
-
mViewData._useNewValueHelp =
|
|
343
|
-
oManifestContent["sap.fe"] && oManifestContent["sap.fe"].app
|
|
344
|
-
? oManifestContent["sap.fe"].app._useNewValueHelp
|
|
345
|
-
: undefined;
|
|
346
|
-
oViewDataModel = new JSONModel(mViewData);
|
|
347
|
-
if (mViewData && mViewData.controlConfiguration) {
|
|
348
|
-
Object.keys(mViewData.controlConfiguration).forEach(function (sAnnotationPath: string) {
|
|
349
|
-
if (sAnnotationPath.indexOf("[") !== -1) {
|
|
350
|
-
const sTargetAnnotationPath = resolveDynamicExpression(sAnnotationPath, oMetaModel);
|
|
351
|
-
mViewData.controlConfiguration[sTargetAnnotationPath] = mViewData.controlConfiguration[sAnnotationPath];
|
|
352
|
-
}
|
|
353
|
-
});
|
|
310
|
+
if (navigationObject.create && navigationObject.create.outbound && mOutbounds[navigationObject.create.outbound]) {
|
|
311
|
+
outboundConfig = mOutbounds[navigationObject.create.outbound];
|
|
312
|
+
navigationObject.create.outboundDetail = {
|
|
313
|
+
semanticObject: outboundConfig.semanticObject,
|
|
314
|
+
action: outboundConfig.action,
|
|
315
|
+
parameters: outboundConfig.parameters
|
|
316
|
+
};
|
|
354
317
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
mViewData,
|
|
367
|
-
oDiagnostics,
|
|
368
|
-
sFullContextPath,
|
|
369
|
-
oAppComponent.getEnvironmentCapabilities().getCapabilities()
|
|
370
|
-
);
|
|
318
|
+
});
|
|
319
|
+
mViewData = {
|
|
320
|
+
navigation: mNavigation,
|
|
321
|
+
viewLevel: oTargetInfo.viewLevel,
|
|
322
|
+
stableId: sStableId,
|
|
323
|
+
contentDensities: oManifestContent["sap.ui5"].contentDensities,
|
|
324
|
+
resourceBundle: oResourceModel.__bundle,
|
|
325
|
+
fullContextPath: sFullContextPath,
|
|
326
|
+
isDesktop: (Device as any).system.desktop,
|
|
327
|
+
isPhone: (Device as any).system.phone
|
|
328
|
+
};
|
|
371
329
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
330
|
+
if (oComponent.getViewData) {
|
|
331
|
+
Object.assign(mViewData, oComponent.getViewData());
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
const oShellServices = oAppComponent.getShellServices();
|
|
335
|
+
mViewData.converterType = sConverterType;
|
|
336
|
+
mViewData.shellContentDensity = oShellServices.getContentDensity();
|
|
337
|
+
mViewData.useNewLazyLoading = UriParameters.fromQuery(window.location.search).get("sap-fe-xx-lazyloadingtest") === "true";
|
|
338
|
+
mViewData.retrieveTextFromValueList =
|
|
339
|
+
oManifestContent["sap.fe"] && oManifestContent["sap.fe"].form
|
|
340
|
+
? oManifestContent["sap.fe"].form.retrieveTextFromValueList
|
|
341
|
+
: undefined;
|
|
342
|
+
oViewDataModel = new JSONModel(mViewData);
|
|
343
|
+
if (mViewData && mViewData.controlConfiguration) {
|
|
344
|
+
Object.keys(mViewData.controlConfiguration).forEach(function (sAnnotationPath: string) {
|
|
345
|
+
if (sAnnotationPath.indexOf("[") !== -1) {
|
|
346
|
+
const sTargetAnnotationPath = resolveDynamicExpression(sAnnotationPath, oMetaModel);
|
|
347
|
+
mViewData.controlConfiguration[sTargetAnnotationPath] = mViewData.controlConfiguration[sAnnotationPath];
|
|
384
348
|
}
|
|
385
|
-
}
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
MetaModelConverter.convertTypes(oMetaModel, oAppComponent.getEnvironmentCapabilities().getCapabilities());
|
|
352
|
+
oPageModel = new TemplateModel(() => {
|
|
353
|
+
try {
|
|
354
|
+
if (oPageModelCache) {
|
|
355
|
+
return oPageModelCache;
|
|
356
|
+
} else {
|
|
357
|
+
const oDiagnostics = oAppComponent.getDiagnostics();
|
|
358
|
+
const iIssueCount = oDiagnostics.getIssues().length;
|
|
359
|
+
const oConverterPageModel = TemplateConverter.convertPage(
|
|
360
|
+
sConverterType,
|
|
361
|
+
oMetaModel,
|
|
362
|
+
mViewData,
|
|
363
|
+
oDiagnostics,
|
|
364
|
+
sFullContextPath,
|
|
365
|
+
oAppComponent.getEnvironmentCapabilities().getCapabilities()
|
|
366
|
+
);
|
|
386
367
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
// Fire and forget in the cache
|
|
400
|
-
if (!oPageModelCache) {
|
|
401
|
-
this._setCachedModel(sPageModelCacheKey, (oPageModel as any).getData());
|
|
402
|
-
}
|
|
403
|
-
return sCacheKey;
|
|
404
|
-
})
|
|
405
|
-
.catch((e) => Log.error(e.message, e));
|
|
406
|
-
});
|
|
368
|
+
const aIssues = oDiagnostics.getIssues();
|
|
369
|
+
const aAddedIssues = aIssues.slice(iIssueCount);
|
|
370
|
+
if (aAddedIssues.length > 0) {
|
|
371
|
+
Log.warning(
|
|
372
|
+
"Some issues have been detected in your project, please check the UI5 support assistant rule for sap.fe.core"
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
return oConverterPageModel;
|
|
376
|
+
}
|
|
377
|
+
} catch (error) {
|
|
378
|
+
Log.error(error as any, error as any);
|
|
379
|
+
return {};
|
|
407
380
|
}
|
|
408
|
-
})
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
381
|
+
}, oMetaModel);
|
|
382
|
+
|
|
383
|
+
if (!bError) {
|
|
384
|
+
oViewSettings = getViewSettings();
|
|
385
|
+
// Setting the pageModel on the component for potential reuse
|
|
386
|
+
oComponent.setModel(oPageModel, "_pageModel");
|
|
387
|
+
return oComponent.runAsOwner(() => {
|
|
388
|
+
return View.create(oViewSettings)
|
|
389
|
+
.catch(createErrorPage)
|
|
390
|
+
.then((oView: any) => {
|
|
391
|
+
this.oView = oView;
|
|
392
|
+
this.oView.setModel(new ManagedObjectModel(this.oView), "$view");
|
|
393
|
+
this.oView.setModel(oViewDataModel, "viewData");
|
|
394
|
+
oComponent.setAggregation("rootControl", this.oView);
|
|
395
|
+
// Fire and forget in the cache
|
|
396
|
+
if (!oPageModelCache) {
|
|
397
|
+
this._setCachedModel(sPageModelCacheKey, (oPageModel as any).getData());
|
|
398
|
+
}
|
|
399
|
+
return sCacheKey;
|
|
400
|
+
})
|
|
401
|
+
.catch((e) => Log.error(e.message, e));
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
} catch (error: any) {
|
|
405
|
+
Log.error(error.message, error);
|
|
406
|
+
throw new Error(`Error while creating view : ${error}`);
|
|
407
|
+
}
|
|
413
408
|
}
|
|
414
409
|
getView() {
|
|
415
410
|
return this.oView;
|
|
@@ -419,8 +414,12 @@ class TemplatedViewService extends Service<TemplatedViewServiceSettings> {
|
|
|
419
414
|
}
|
|
420
415
|
exit() {
|
|
421
416
|
// Deregister global instance
|
|
422
|
-
|
|
423
|
-
|
|
417
|
+
if (this.oResourceModelService) {
|
|
418
|
+
this.oResourceModelService.destroy();
|
|
419
|
+
}
|
|
420
|
+
if (this.oCacheHandlerService) {
|
|
421
|
+
this.oCacheHandlerService.destroy();
|
|
422
|
+
}
|
|
424
423
|
this.oFactory.removeGlobalInstance();
|
|
425
424
|
}
|
|
426
425
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
3
|
* (c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
4
|
*/
|
|
5
|
-
sap.ui.define(["sap/
|
|
5
|
+
sap.ui.define(["sap/fe/core/converters/helpers/IssueManager", "sap/ui/support/library"], function (IssueManager, SupportLib) {
|
|
6
6
|
"use strict";
|
|
7
7
|
|
|
8
8
|
var _exports = {};
|
|
@@ -33,6 +33,7 @@ sap.ui.define(["sap/ui/support/library", "sap/fe/core/converters/helpers/IssueMa
|
|
|
33
33
|
|
|
34
34
|
case IssueSeverity.Medium:
|
|
35
35
|
return Severity.Medium;
|
|
36
|
+
// no default
|
|
36
37
|
}
|
|
37
38
|
};
|
|
38
39
|
|
|
@@ -68,4 +69,4 @@ sap.ui.define(["sap/ui/support/library", "sap/fe/core/converters/helpers/IssueMa
|
|
|
68
69
|
_exports.getIssueByCategory = getIssueByCategory;
|
|
69
70
|
return _exports;
|
|
70
71
|
}, false);
|
|
71
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
72
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvbW1vbkhlbHBlci50cyJdLCJuYW1lcyI6WyJDYXRlZ29yaWVzIiwiU3VwcG9ydExpYiIsIlNldmVyaXR5IiwiQXVkaWVuY2VzIiwiZ2V0U2V2ZXJpdHkiLCJvU2V2ZXJpdHkiLCJJc3N1ZVNldmVyaXR5IiwiTG93IiwiSGlnaCIsIk1lZGl1bSIsImdldElzc3VlQnlDYXRlZ29yeSIsIm9Jc3N1ZU1hbmFnZXIiLCJvQ29yZUZhY2FkZSIsImlzc3VlQ2F0ZWdvcnlUeXBlIiwiaXNzdWVTdWJDYXRlZ29yeVR5cGUiLCJtQ29tcG9uZW50cyIsImdldENvbXBvbmVudHMiLCJvQXBwQ29tcG9uZW50IiwiT2JqZWN0Iiwia2V5cyIsImZvckVhY2giLCJzS2V5Iiwib0NvbXBvbmVudCIsImdldE1ldGFkYXRhIiwiZ2V0UGFyZW50IiwiZ2V0TmFtZSIsImFJc3N1ZXMiLCJnZXREaWFnbm9zdGljcyIsImdldElzc3Vlc0J5Q2F0ZWdvcnkiLCJJc3N1ZUNhdGVnb3J5Iiwib0VsZW1lbnQiLCJhZGRJc3N1ZSIsInNldmVyaXR5IiwiZGV0YWlscyIsImNvbnRleHQiLCJpZCIsImNhdGVnb3J5Il0sIm1hcHBpbmdzIjoiO0FBQUE7QUFDQTtBQUNBOzs7Ozs7OztBQU1PLE1BQU1BLFVBQVUsR0FBR0MsVUFBVSxDQUFDRCxVQUE5QjtBQUFBLE1BQTBD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ZW50LmRldGFpbHMsXG5cdFx0XHRcdGNvbnRleHQ6IHtcblx0XHRcdFx0XHRpZDogb0VsZW1lbnQuY2F0ZWdvcnlcblx0XHRcdFx0fVxuXHRcdFx0fSk7XG5cdFx0fSk7XG5cdH1cbn07XG4iXX0=
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Defines support rules of the ObjectPageHeader control of sap.uxap library.
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
4
|
+
import type AppComponent from "sap/fe/core/AppComponent";
|
|
5
5
|
import { IssueCategory, IssueSeverity } from "sap/fe/core/converters/helpers/IssueManager";
|
|
6
|
-
import { IssueDefinition } from "sap/fe/core/support/Diagnostics";
|
|
7
|
-
import
|
|
6
|
+
import type { IssueDefinition } from "sap/fe/core/support/Diagnostics";
|
|
7
|
+
import SupportLib from "sap/ui/support/library";
|
|
8
8
|
|
|
9
9
|
export const Categories = SupportLib.Categories, // Accessibility, Performance, Memory, ...
|
|
10
10
|
Severity = SupportLib.Severity, // Hint, Warning, Error
|
|
@@ -16,7 +16,7 @@ export const Categories = SupportLib.Categories, // Accessibility, Performance,
|
|
|
16
16
|
|
|
17
17
|
// Rule checks if objectPage componentContainer height is set
|
|
18
18
|
|
|
19
|
-
export const getSeverity = function(oSeverity: IssueSeverity) {
|
|
19
|
+
export const getSeverity = function (oSeverity: IssueSeverity) {
|
|
20
20
|
switch (oSeverity) {
|
|
21
21
|
case IssueSeverity.Low:
|
|
22
22
|
return Severity.Low;
|
|
@@ -24,10 +24,11 @@ export const getSeverity = function(oSeverity: IssueSeverity) {
|
|
|
24
24
|
return Severity.High;
|
|
25
25
|
case IssueSeverity.Medium:
|
|
26
26
|
return Severity.Medium;
|
|
27
|
+
// no default
|
|
27
28
|
}
|
|
28
29
|
};
|
|
29
30
|
|
|
30
|
-
export const getIssueByCategory = function(
|
|
31
|
+
export const getIssueByCategory = function (
|
|
31
32
|
oIssueManager: any,
|
|
32
33
|
oCoreFacade: any /*oScope: any*/,
|
|
33
34
|
issueCategoryType: IssueCategory,
|
|
@@ -35,21 +36,16 @@ export const getIssueByCategory = function(
|
|
|
35
36
|
) {
|
|
36
37
|
const mComponents = oCoreFacade.getComponents();
|
|
37
38
|
let oAppComponent!: AppComponent;
|
|
38
|
-
Object.keys(mComponents).forEach(sKey => {
|
|
39
|
+
Object.keys(mComponents).forEach((sKey) => {
|
|
39
40
|
const oComponent = mComponents[sKey];
|
|
40
|
-
if (
|
|
41
|
-
oComponent
|
|
42
|
-
?.getMetadata()
|
|
43
|
-
?.getParent()
|
|
44
|
-
?.getName() === "sap.fe.core.AppComponent"
|
|
45
|
-
) {
|
|
41
|
+
if (oComponent?.getMetadata()?.getParent()?.getName() === "sap.fe.core.AppComponent") {
|
|
46
42
|
oAppComponent = oComponent;
|
|
47
43
|
}
|
|
48
44
|
});
|
|
49
45
|
if (oAppComponent) {
|
|
50
46
|
const aIssues = oAppComponent.getDiagnostics().getIssuesByCategory(IssueCategory[issueCategoryType], issueSubCategoryType);
|
|
51
47
|
|
|
52
|
-
aIssues.forEach(function(oElement: IssueDefinition) {
|
|
48
|
+
aIssues.forEach(function (oElement: IssueDefinition) {
|
|
53
49
|
oIssueManager.addIssue({
|
|
54
50
|
severity: getSeverity(oElement.severity),
|
|
55
51
|
details: oElement.details,
|
|
@@ -58,4 +58,4 @@ sap.ui.define([], function () {
|
|
|
58
58
|
|
|
59
59
|
return Diagnostics;
|
|
60
60
|
}, false);
|
|
61
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
61
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkRpYWdub3N0aWNzLnRzIl0sIm5hbWVzIjpbIkRpYWdub3N0aWNzIiwiX2lzc3VlcyIsImFkZElzc3VlIiwiaXNzdWVDYXRlZ29yeSIsImlzc3VlU2V2ZXJpdHkiLCJkZXRhaWxzIiwiaXNzdWVDYXRlZ29yeVR5cGUiLC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e/core/converters/helpers/IssueManager";
|
|
1
|
+
import type { IssueCategory, IssueSeverity } from "sap/fe/core/converters/helpers/IssueManager";
|
|
2
2
|
|
|
3
3
|
export type IssueDefinition = {
|
|
4
4
|
category: IssueCategory;
|
|
@@ -33,9 +33,9 @@ class Diagnostics {
|
|
|
33
33
|
}
|
|
34
34
|
getIssuesByCategory(inCategory: IssueCategory, subCategory?: string): IssueDefinition[] {
|
|
35
35
|
if (subCategory) {
|
|
36
|
-
return this._issues.filter(issue => issue.category === inCategory && issue.subCategory === subCategory);
|
|
36
|
+
return this._issues.filter((issue) => issue.category === inCategory && issue.subCategory === subCategory);
|
|
37
37
|
} else {
|
|
38
|
-
return this._issues.filter(issue => issue.category === inCategory);
|
|
38
|
+
return this._issues.filter((issue) => issue.category === inCategory);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
checkIfIssueExists(
|
|
@@ -47,7 +47,7 @@ class Diagnostics {
|
|
|
47
47
|
): boolean {
|
|
48
48
|
if (issueCategoryType && issueCategoryType[inCategory] && issueSubCategory) {
|
|
49
49
|
return this._issues.some(
|
|
50
|
-
issue =>
|
|
50
|
+
(issue) =>
|
|
51
51
|
issue.category === inCategory &&
|
|
52
52
|
issue.severity === severity &&
|
|
53
53
|
issue.details.replace(/\n/g, "") === details.replace(/\n/g, "") &&
|
|
@@ -55,7 +55,7 @@ class Diagnostics {
|
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
57
|
return this._issues.some(
|
|
58
|
-
issue =>
|
|
58
|
+
(issue) =>
|
|
59
59
|
issue.category === inCategory &&
|
|
60
60
|
issue.severity === severity &&
|
|
61
61
|
issue.details.replace(/\n/g, "") === details.replace(/\n/g, "")
|