@sapui5/sap.fe.core 1.100.0 → 1.102.0
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 +4 -4
- package/src/sap/fe/core/.library +2 -3
- package/src/sap/fe/core/AppComponent.js +23 -30
- package/src/sap/fe/core/AppComponent.ts +35 -40
- package/src/sap/fe/core/AppStateHandler.js +8 -8
- package/src/sap/fe/core/AppStateHandler.ts +11 -11
- package/src/sap/fe/core/BaseController.js +9 -9
- package/src/sap/fe/core/BaseController.ts +3 -4
- package/src/sap/fe/core/CommonUtils.js +122 -101
- package/src/sap/fe/core/CommonUtils.ts +239 -193
- package/src/sap/fe/core/ExtensionAPI.js +12 -13
- package/src/sap/fe/core/ExtensionAPI.ts +21 -31
- package/src/sap/fe/core/PageController.js +19 -13
- package/src/sap/fe/core/PageController.ts +40 -34
- package/src/sap/fe/core/TemplateComponent.js +198 -123
- package/src/sap/fe/core/TemplateComponent.ts +109 -121
- package/src/sap/fe/core/TemplateModel.js +7 -9
- package/src/sap/fe/core/TemplateModel.ts +3 -3
- package/src/sap/fe/core/buildingBlocks/AttributeModel.js +60 -0
- package/src/sap/fe/core/buildingBlocks/AttributeModel.ts +37 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlock.js +165 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlock.ts +178 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.js +935 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.ts +837 -0
- package/src/sap/fe/core/buildingBlocks/TraceInfo.js +436 -0
- package/src/sap/fe/core/buildingBlocks/TraceInfo.ts +431 -0
- package/src/sap/fe/core/{BusyLocker.js → controllerextensions/BusyLocker.js} +1 -1
- package/src/sap/fe/core/{BusyLocker.ts → controllerextensions/BusyLocker.ts} +7 -7
- package/src/sap/fe/core/controllerextensions/EditFlow.js +660 -288
- package/src/sap/fe/core/controllerextensions/EditFlow.ts +513 -331
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +11 -11
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.ts +6 -7
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +43 -25
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.ts +132 -103
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +16 -16
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.ts +64 -55
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +166 -99
- package/src/sap/fe/core/controllerextensions/InternalRouting.ts +187 -149
- package/src/sap/fe/core/controllerextensions/KPIManagement.js +14 -14
- package/src/sap/fe/core/controllerextensions/KPIManagement.ts +12 -11
- package/src/sap/fe/core/controllerextensions/MassEdit.js +13 -12
- package/src/sap/fe/core/controllerextensions/MassEdit.ts +22 -22
- package/src/sap/fe/core/controllerextensions/MessageHandler.js +14 -26
- package/src/sap/fe/core/controllerextensions/MessageHandler.ts +20 -30
- package/src/sap/fe/core/controllerextensions/PageReady.js +25 -23
- package/src/sap/fe/core/controllerextensions/PageReady.ts +49 -47
- package/src/sap/fe/core/controllerextensions/Paginator.js +24 -15
- package/src/sap/fe/core/controllerextensions/Paginator.ts +35 -20
- package/src/sap/fe/core/controllerextensions/Placeholder.js +10 -10
- package/src/sap/fe/core/controllerextensions/Placeholder.ts +12 -14
- package/src/sap/fe/core/controllerextensions/Routing.js +11 -11
- package/src/sap/fe/core/controllerextensions/Routing.ts +12 -13
- package/src/sap/fe/core/controllerextensions/Share.js +34 -16
- package/src/sap/fe/core/controllerextensions/Share.ts +50 -32
- package/src/sap/fe/core/controllerextensions/SideEffects.js +15 -15
- package/src/sap/fe/core/controllerextensions/SideEffects.ts +64 -65
- package/src/sap/fe/core/controllerextensions/ViewState.js +27 -31
- package/src/sap/fe/core/controllerextensions/ViewState.ts +103 -102
- package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.js +105 -0
- package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.ts +98 -0
- package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.js +360 -0
- package/src/sap/fe/core/{actions → controllerextensions}/collaboration/ActivitySync.ts +90 -132
- package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.js +146 -0
- package/src/sap/fe/core/{actions → controllerextensions}/collaboration/CollaborationCommon.ts +18 -8
- package/src/sap/fe/core/controllerextensions/collaboration/Manage.js +264 -0
- package/src/sap/fe/core/{actions → controllerextensions}/collaboration/Manage.ts +35 -33
- package/src/sap/fe/core/controllerextensions/collaboration/ManageDialog.fragment.xml +100 -0
- package/src/sap/fe/core/{actions → controllerextensions}/collaboration/UserDetails.fragment.xml +5 -7
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.js +1584 -0
- package/src/sap/fe/core/{TransactionHelper.ts → controllerextensions/editFlow/TransactionHelper.ts} +190 -159
- package/src/sap/fe/core/controllerextensions/editFlow/draft.js +780 -0
- package/src/sap/fe/core/{actions → controllerextensions/editFlow}/draft.ts +329 -76
- package/src/sap/fe/core/controllerextensions/editFlow/operations.js +1149 -0
- package/src/sap/fe/core/{actions → controllerextensions/editFlow}/operations.ts +169 -97
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.js +190 -0
- package/src/sap/fe/core/{actions → controllerextensions/editFlow}/sticky.ts +76 -12
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.js +592 -0
- package/src/sap/fe/core/{actions → controllerextensions/messageHandler}/messageHandling.ts +83 -60
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy.js +940 -0
- package/src/sap/fe/core/{RouterProxy.ts → controllerextensions/routing/RouterProxy.ts} +52 -36
- package/src/sap/fe/core/controls/ActionParameterDialog.fragment.xml +21 -18
- package/src/sap/fe/core/controls/Any.js +28 -0
- package/src/sap/fe/core/controls/Any.ts +30 -0
- package/src/sap/fe/core/controls/CommandExecution.js +50 -16
- package/src/sap/fe/core/controls/CommandExecution.ts +31 -22
- package/src/sap/fe/core/controls/ConditionalWrapper.js +136 -65
- package/src/sap/fe/core/controls/ConditionalWrapper.ts +49 -58
- package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.js +371 -0
- package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.ts +282 -0
- package/src/sap/fe/core/controls/CustomQuickViewPage.js +74 -36
- package/src/sap/fe/core/controls/CustomQuickViewPage.ts +23 -32
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossDraft.fragment.xml +52 -5
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +127 -67
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.ts +127 -67
- package/src/sap/fe/core/controls/FieldWrapper.js +171 -87
- package/src/sap/fe/core/controls/FieldWrapper.ts +69 -80
- package/src/sap/fe/core/controls/FileWrapper.js +360 -0
- package/src/sap/fe/core/controls/FileWrapper.ts +202 -0
- package/src/sap/fe/core/controls/FilterBar.js +154 -119
- package/src/sap/fe/core/controls/FilterBar.ts +128 -123
- package/src/sap/fe/core/controls/FormElementWrapper.js +102 -37
- package/src/sap/fe/core/controls/FormElementWrapper.ts +43 -35
- package/src/sap/fe/core/controls/MassEditSelect.js +33 -0
- package/src/sap/fe/core/controls/MassEditSelect.ts +45 -0
- package/src/sap/fe/core/controls/filterbar/FilterContainer.js +111 -89
- package/src/sap/fe/core/controls/filterbar/FilterContainer.ts +86 -82
- package/src/sap/fe/core/controls/filterbar/VisualFilter.js +242 -193
- package/src/sap/fe/core/controls/filterbar/VisualFilter.ts +211 -204
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +152 -116
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.ts +105 -105
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +2 -2
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.ts +23 -28
- package/src/sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml +41 -81
- package/src/sap/fe/core/controls/massEdit/MassEditField.fragment.xml +107 -0
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +550 -35
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.ts +604 -35
- package/src/sap/fe/core/converters/ManifestSettings.js +3 -1
- package/src/sap/fe/core/converters/ManifestSettings.ts +9 -2
- package/src/sap/fe/core/converters/MetaModelConverter.js +11 -40
- package/src/sap/fe/core/converters/MetaModelConverter.ts +56 -84
- package/src/sap/fe/core/converters/annotations/DataField.js +20 -5
- package/src/sap/fe/core/converters/annotations/DataField.ts +27 -6
- package/src/sap/fe/core/converters/controls/Common/Action.js +14 -21
- package/src/sap/fe/core/converters/controls/Common/Action.ts +23 -28
- package/src/sap/fe/core/converters/controls/Common/Chart.js +17 -10
- package/src/sap/fe/core/converters/controls/Common/Chart.ts +20 -14
- package/src/sap/fe/core/converters/controls/Common/Form.js +16 -18
- package/src/sap/fe/core/converters/controls/Common/Form.ts +20 -20
- package/src/sap/fe/core/converters/controls/Common/KPI.js +1 -1
- package/src/sap/fe/core/converters/controls/Common/KPI.ts +2 -3
- package/src/sap/fe/core/converters/controls/Common/Table.js +389 -173
- package/src/sap/fe/core/converters/controls/Common/Table.ts +440 -244
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +26 -16
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +27 -19
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +78 -47
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +146 -107
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.js +6 -6
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.ts +20 -18
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +30 -25
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +39 -34
- package/src/sap/fe/core/converters/helpers/Aggregation.js +10 -2
- package/src/sap/fe/core/converters/helpers/Aggregation.ts +18 -13
- package/src/sap/fe/core/converters/helpers/BindingHelper.js +3 -2
- package/src/sap/fe/core/converters/helpers/BindingHelper.ts +6 -5
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.js +1 -1
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.ts +0 -4
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +27 -24
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +49 -40
- package/src/sap/fe/core/converters/templates/ListReportConverter.js +33 -22
- package/src/sap/fe/core/converters/templates/ListReportConverter.ts +77 -62
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +28 -28
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +38 -45
- package/src/sap/fe/core/designtime/AppComponent.designtime.js +3 -3
- package/src/sap/fe/core/designtime/AppComponent.designtime.ts +8 -6
- package/src/sap/fe/core/formatters/KPIFormatter.js +3 -12
- package/src/sap/fe/core/formatters/KPIFormatter.ts +3 -2
- package/src/sap/fe/core/formatters/TableFormatter.js +74 -13
- package/src/sap/fe/core/formatters/TableFormatter.ts +71 -16
- package/src/sap/fe/core/formatters/ValueFormatter.js +4 -4
- package/src/sap/fe/core/formatters/ValueFormatter.ts +4 -7
- package/src/sap/fe/core/fpm/Component.js +46 -17
- package/src/sap/fe/core/fpm/Component.ts +11 -16
- package/src/sap/fe/core/helpers/AppStartupHelper.js +4 -4
- package/src/sap/fe/core/helpers/AppStartupHelper.ts +3 -3
- package/src/sap/fe/core/helpers/BindingExpression.js +10 -7
- package/src/sap/fe/core/helpers/BindingExpression.ts +37 -35
- package/src/sap/fe/core/helpers/ClassSupport.js +273 -256
- package/src/sap/fe/core/helpers/ClassSupport.ts +315 -237
- package/src/sap/fe/core/helpers/FPMHelper.js +3 -2
- package/src/sap/fe/core/helpers/FPMHelper.ts +9 -8
- package/src/sap/fe/core/helpers/MassEditHelper.js +522 -147
- package/src/sap/fe/core/helpers/MassEditHelper.ts +563 -236
- package/src/sap/fe/core/helpers/ModelHelper.js +29 -1
- package/src/sap/fe/core/helpers/ModelHelper.ts +39 -26
- package/src/sap/fe/core/helpers/PasteHelper.js +4 -4
- package/src/sap/fe/core/helpers/PasteHelper.ts +4 -3
- package/src/sap/fe/core/helpers/SemanticDateOperators.js +3 -3
- package/src/sap/fe/core/helpers/SemanticDateOperators.ts +3 -1
- package/src/sap/fe/core/helpers/SemanticKeyHelper.js +1 -1
- package/src/sap/fe/core/helpers/SemanticKeyHelper.ts +1 -1
- package/src/sap/fe/core/helpers/StableIdHelper.js +5 -7
- package/src/sap/fe/core/helpers/StableIdHelper.ts +8 -8
- package/src/sap/fe/core/{Synchronization.js → helpers/Synchronization.js} +1 -1
- package/src/sap/fe/core/{Synchronization.ts → helpers/Synchronization.ts} +1 -1
- package/src/sap/fe/core/jsx-runtime/jsx.js +35 -5
- package/src/sap/fe/core/jsx-runtime/jsx.ts +22 -8
- package/src/sap/fe/core/library.js +13 -5
- package/src/sap/fe/core/library.ts +26 -17
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +1 -1
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +0 -3
- package/src/sap/fe/core/messagebundle.properties +135 -180
- package/src/sap/fe/core/messagebundle_ar.properties +31 -64
- package/src/sap/fe/core/messagebundle_bg.properties +31 -64
- package/src/sap/fe/core/messagebundle_ca.properties +31 -64
- package/src/sap/fe/core/messagebundle_cs.properties +31 -64
- package/src/sap/fe/core/messagebundle_cy.properties +32 -65
- package/src/sap/fe/core/messagebundle_da.properties +31 -64
- package/src/sap/fe/core/messagebundle_de.properties +29 -62
- package/src/sap/fe/core/messagebundle_el.properties +32 -65
- package/src/sap/fe/core/messagebundle_en.properties +32 -65
- package/src/sap/fe/core/messagebundle_en_GB.properties +29 -62
- package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +41 -74
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +32 -65
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +20 -6
- package/src/sap/fe/core/messagebundle_es.properties +31 -64
- package/src/sap/fe/core/messagebundle_es_MX.properties +31 -64
- package/src/sap/fe/core/messagebundle_et.properties +31 -64
- package/src/sap/fe/core/messagebundle_fi.properties +29 -62
- package/src/sap/fe/core/messagebundle_fr.properties +36 -69
- package/src/sap/fe/core/messagebundle_fr_CA.properties +33 -66
- package/src/sap/fe/core/messagebundle_hi.properties +29 -62
- package/src/sap/fe/core/messagebundle_hr.properties +32 -65
- package/src/sap/fe/core/messagebundle_hu.properties +30 -63
- package/src/sap/fe/core/messagebundle_id.properties +32 -65
- package/src/sap/fe/core/messagebundle_it.properties +31 -64
- package/src/sap/fe/core/messagebundle_iw.properties +31 -64
- package/src/sap/fe/core/messagebundle_ja.properties +29 -62
- package/src/sap/fe/core/messagebundle_kk.properties +31 -64
- package/src/sap/fe/core/messagebundle_ko.properties +31 -64
- package/src/sap/fe/core/messagebundle_lt.properties +31 -64
- package/src/sap/fe/core/messagebundle_lv.properties +32 -65
- package/src/sap/fe/core/messagebundle_ms.properties +31 -64
- package/src/sap/fe/core/messagebundle_nl.properties +31 -64
- package/src/sap/fe/core/messagebundle_no.properties +31 -64
- package/src/sap/fe/core/messagebundle_pl.properties +34 -67
- package/src/sap/fe/core/messagebundle_pt.properties +32 -65
- package/src/sap/fe/core/messagebundle_pt_PT.properties +31 -64
- package/src/sap/fe/core/messagebundle_ro.properties +33 -66
- package/src/sap/fe/core/messagebundle_ru.properties +33 -66
- package/src/sap/fe/core/messagebundle_sh.properties +31 -64
- package/src/sap/fe/core/messagebundle_sk.properties +31 -64
- package/src/sap/fe/core/messagebundle_sl.properties +29 -62
- package/src/sap/fe/core/messagebundle_sv.properties +30 -63
- package/src/sap/fe/core/messagebundle_th.properties +31 -64
- package/src/sap/fe/core/messagebundle_tr.properties +31 -64
- package/src/sap/fe/core/messagebundle_uk.properties +32 -65
- package/src/sap/fe/core/messagebundle_vi.properties +31 -64
- package/src/sap/fe/core/messagebundle_zh_CN.properties +32 -65
- package/src/sap/fe/core/messagebundle_zh_TW.properties +34 -67
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +4 -4
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.ts +1 -1
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +5 -5
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.ts +1 -2
- package/src/sap/fe/core/services/EnvironmentServiceFactory.js +11 -8
- package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +15 -13
- package/src/sap/fe/core/services/NavigationServiceFactory.js +5 -5
- package/src/sap/fe/core/services/NavigationServiceFactory.ts +9 -5
- package/src/sap/fe/core/services/ResourceModelServiceFactory.js +4 -4
- package/src/sap/fe/core/services/ResourceModelServiceFactory.ts +1 -1
- package/src/sap/fe/core/services/RoutingServiceFactory.js +105 -66
- package/src/sap/fe/core/services/RoutingServiceFactory.ts +59 -49
- package/src/sap/fe/core/services/ShellServicesFactory.js +104 -29
- package/src/sap/fe/core/services/ShellServicesFactory.ts +64 -30
- package/src/sap/fe/core/services/SideEffectsServiceFactory.js +4 -4
- package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +1 -1
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +11 -10
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +38 -51
- package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.js +43 -5
- package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.ts +6 -3
- package/src/sap/fe/core/support/CommonHelper.js +1 -1
- package/src/sap/fe/core/support/CommonHelper.ts +0 -3
- package/src/sap/fe/core/templating/DataModelPathHelper.js +2 -9
- package/src/sap/fe/core/templating/DataModelPathHelper.ts +32 -38
- package/src/sap/fe/core/templating/DisplayModeFormatter.js +23 -3
- package/src/sap/fe/core/templating/DisplayModeFormatter.ts +27 -6
- package/src/sap/fe/core/templating/EntitySetHelper.js +1 -9
- package/src/sap/fe/core/templating/EntitySetHelper.ts +11 -13
- package/src/sap/fe/core/templating/FilterHelper.js +4 -4
- package/src/sap/fe/core/templating/FilterHelper.ts +6 -5
- package/src/sap/fe/core/templating/PropertyHelper.js +70 -33
- package/src/sap/fe/core/templating/PropertyHelper.ts +49 -27
- package/src/sap/fe/core/templating/UIFormatters.js +133 -22
- package/src/sap/fe/core/templating/UIFormatters.ts +144 -50
- package/src/sap/fe/core/type/DateTimeWithTimezone.js +47 -0
- package/src/sap/fe/core/type/DateTimeWithTimezone.ts +23 -0
- package/src/sap/fe/core/type/Email.js +26 -8
- package/src/sap/fe/core/type/Email.ts +8 -7
- package/src/sap/fe/core/AnnotationHelper.js +0 -312
- package/src/sap/fe/core/AnnotationHelper.ts +0 -315
- package/src/sap/fe/core/RouterProxy.js +0 -926
- package/src/sap/fe/core/TransactionHelper.js +0 -1562
- package/src/sap/fe/core/actions/collaboration/ActivitySync.js +0 -392
- package/src/sap/fe/core/actions/collaboration/CollaborationCommon.js +0 -136
- package/src/sap/fe/core/actions/collaboration/Manage.js +0 -262
- package/src/sap/fe/core/actions/collaboration/ManageDialog.fragment.xml +0 -103
- package/src/sap/fe/core/actions/draft.js +0 -523
- package/src/sap/fe/core/actions/messageHandling.js +0 -567
- package/src/sap/fe/core/actions/nonDraft.js +0 -20
- package/src/sap/fe/core/actions/nonDraft.ts +0 -12
- package/src/sap/fe/core/actions/operations.js +0 -1096
- package/src/sap/fe/core/actions/sticky.js +0 -130
- package/src/sap/fe/core/controllerextensions/ControllerExtensionMetadata.js +0 -78
- package/src/sap/fe/core/controllerextensions/ControllerExtensionMetadata.ts +0 -65
- package/src/sap/fe/core/formatters/CriticalityFormatter.js +0 -77
- package/src/sap/fe/core/formatters/CriticalityFormatter.ts +0 -58
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Utils from "sap/ui/fl/Utils";
|
|
3
|
-
import { CommonHelper } from "sap/fe/macros";
|
|
1
|
+
import CommonUtils from "sap/fe/core/CommonUtils";
|
|
4
2
|
import VisualFilterUtils from "sap/fe/core/controls/filterbar/utils/VisualFilterUtils";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
3
|
+
import { defineUI5Class, event, implementInterface, property } from "sap/fe/core/helpers/ClassSupport";
|
|
4
|
+
import CommonHelper from "sap/fe/macros/CommonHelper";
|
|
5
|
+
import FilterUtils from "sap/fe/macros/filter/FilterUtils";
|
|
6
|
+
import VBox from "sap/m/VBox";
|
|
7
|
+
import Core from "sap/ui/core/Core";
|
|
8
|
+
import ElementMetadata from "sap/ui/core/ElementMetadata";
|
|
9
|
+
import { IFormContent } from "sap/ui/core/library";
|
|
10
|
+
import FilterBar from "sap/ui/mdc/FilterBar";
|
|
11
|
+
import { CoreEx } from "types/extension_types";
|
|
7
12
|
import { getFiltersConditionsFromSelectionVariant } from "../../templating/FilterHelper";
|
|
8
13
|
/**
|
|
9
14
|
* Constructor for a new filterBar/aligned/FilterItemLayout.
|
|
@@ -18,228 +23,230 @@ import { getFiltersConditionsFromSelectionVariant } from "../../templating/Filte
|
|
|
18
23
|
* @since 1.61.0
|
|
19
24
|
* @alias control sap.fe.core.controls.filterbar.VisualFilter
|
|
20
25
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
events: {
|
|
37
|
-
valueHelpRequest: {}
|
|
38
|
-
},
|
|
39
|
-
interfaces: ["sap.ui.core.IFormContent"]
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
);
|
|
43
|
-
VisualFilter.prototype.onAfterRendering = function() {
|
|
44
|
-
let sLabel;
|
|
45
|
-
const oInteractiveChart = this.getItems()[1].getItems()[0];
|
|
46
|
-
const sInternalContextPath = this.data("infoPath");
|
|
47
|
-
const oInteractiveChartListBinding =
|
|
48
|
-
oInteractiveChart.getBinding("segments") || oInteractiveChart.getBinding("bars") || oInteractiveChart.getBinding("points");
|
|
49
|
-
const oInternalModelContext = oInteractiveChart.getBindingContext("internal");
|
|
50
|
-
const oResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.fe.macros") as ResourceBundle;
|
|
51
|
-
const bShowOverLayInitially = oInteractiveChart.data("showOverlayInitially");
|
|
52
|
-
const oSelectionVariantAnnotation: any = oInteractiveChart.data("selectionVariantAnnotation")
|
|
53
|
-
? CommonHelper.parseCustomData(oInteractiveChart.data("selectionVariantAnnotation"))
|
|
54
|
-
: { SelectOptions: [] };
|
|
55
|
-
const aRequiredProperties: any[] = oInteractiveChart.data("requiredProperties")
|
|
56
|
-
? (CommonHelper.parseCustomData(oInteractiveChart.data("requiredProperties")) as any[])
|
|
57
|
-
: [];
|
|
58
|
-
const oMetaModel = oInteractiveChart.getModel().getMetaModel();
|
|
59
|
-
const sEntitySetPath = oInteractiveChartListBinding ? oInteractiveChartListBinding.getPath() : "";
|
|
60
|
-
let oFilterBar = this.getParent().getParent();
|
|
61
|
-
// TODO: Remove this part once 2170204347 is fixed
|
|
62
|
-
if (oFilterBar.getMetadata().getElementName() === "sap.ui.mdc.filterbar.p13n.AdaptationFilterBar") {
|
|
63
|
-
oFilterBar = oFilterBar.getParent().getParent();
|
|
64
|
-
}
|
|
65
|
-
let oFilterBarConditions: any = {};
|
|
66
|
-
let aPropertyInfoSet = [];
|
|
67
|
-
let sFilterEntityName;
|
|
68
|
-
if (oFilterBar.getMetadata().getElementName() === "sap.fe.core.controls.FilterBar") {
|
|
69
|
-
oFilterBarConditions = oFilterBar.getConditions();
|
|
70
|
-
aPropertyInfoSet = oFilterBar.getPropertyInfoSet();
|
|
71
|
-
sFilterEntityName = oFilterBar.data("entityType").split("/")[1];
|
|
72
|
-
}
|
|
73
|
-
const aParameters = oInteractiveChart.data("parameters") ? oInteractiveChart.data("parameters").customData : [];
|
|
74
|
-
const filterConditions = getFiltersConditionsFromSelectionVariant(
|
|
75
|
-
sEntitySetPath,
|
|
76
|
-
oMetaModel,
|
|
77
|
-
oSelectionVariantAnnotation,
|
|
78
|
-
VisualFilterUtils.getCustomConditions.bind(VisualFilterUtils)
|
|
79
|
-
);
|
|
80
|
-
const oSelectionVariantConditions = VisualFilterUtils.convertFilterCondions(filterConditions);
|
|
81
|
-
const mConditions: any = {};
|
|
26
|
+
@defineUI5Class("sap.fe.core.controls.filterbar.VisualFilter")
|
|
27
|
+
class VisualFilter extends VBox implements IFormContent {
|
|
28
|
+
@implementInterface("sap.ui.core.IFormContent")
|
|
29
|
+
__implements__sap_ui_core_IFormContent: boolean = true;
|
|
30
|
+
@property({
|
|
31
|
+
type: "boolean"
|
|
32
|
+
})
|
|
33
|
+
showValueHelp!: boolean;
|
|
34
|
+
@property({
|
|
35
|
+
type: "string"
|
|
36
|
+
})
|
|
37
|
+
valueHelpIconSrc!: string;
|
|
38
|
+
@event()
|
|
39
|
+
valueHelpRequest!: Function;
|
|
40
|
+
private _oChartBinding?: boolean;
|
|
82
41
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
42
|
+
onAfterRendering() {
|
|
43
|
+
let sLabel;
|
|
44
|
+
const oInteractiveChart = (this.getItems()[1] as any).getItems()[0];
|
|
45
|
+
const sInternalContextPath = this.data("infoPath");
|
|
46
|
+
const oInteractiveChartListBinding =
|
|
47
|
+
oInteractiveChart.getBinding("segments") || oInteractiveChart.getBinding("bars") || oInteractiveChart.getBinding("points");
|
|
48
|
+
const oInternalModelContext = oInteractiveChart.getBindingContext("internal");
|
|
49
|
+
const oResourceBundle = (Core as CoreEx).getLibraryResourceBundle("sap.fe.macros");
|
|
50
|
+
const bShowOverLayInitially = oInteractiveChart.data("showOverlayInitially");
|
|
51
|
+
const oSelectionVariantAnnotation: any = oInteractiveChart.data("selectionVariantAnnotation")
|
|
52
|
+
? CommonHelper.parseCustomData(oInteractiveChart.data("selectionVariantAnnotation"))
|
|
53
|
+
: { SelectOptions: [] };
|
|
54
|
+
const aRequiredProperties: any[] = oInteractiveChart.data("requiredProperties")
|
|
55
|
+
? (CommonHelper.parseCustomData(oInteractiveChart.data("requiredProperties")) as any[])
|
|
56
|
+
: [];
|
|
57
|
+
const oMetaModel = oInteractiveChart.getModel().getMetaModel();
|
|
58
|
+
const sEntitySetPath = oInteractiveChartListBinding ? oInteractiveChartListBinding.getPath() : "";
|
|
59
|
+
let oFilterBar = this.getParent().getParent() as FilterBar;
|
|
60
|
+
// TODO: Remove this part once 2170204347 is fixed
|
|
61
|
+
if ((oFilterBar.getMetadata() as ElementMetadata).getElementName() === "sap.ui.mdc.filterbar.p13n.AdaptationFilterBar") {
|
|
62
|
+
oFilterBar = oFilterBar.getParent().getParent() as FilterBar;
|
|
86
63
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
if (
|
|
91
|
-
|
|
64
|
+
let oFilterBarConditions: any = {};
|
|
65
|
+
let aPropertyInfoSet = [];
|
|
66
|
+
let sFilterEntityName;
|
|
67
|
+
if ((oFilterBar.getMetadata() as ElementMetadata).getElementName() === "sap.fe.core.controls.FilterBar") {
|
|
68
|
+
oFilterBarConditions = oFilterBar.getConditions();
|
|
69
|
+
aPropertyInfoSet = (oFilterBar as any).getPropertyInfoSet();
|
|
70
|
+
sFilterEntityName = oFilterBar.data("entityType").split("/")[1];
|
|
92
71
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
oInternalModelContext.setProperty(sInternalContextPath, {
|
|
107
|
-
"showError": true,
|
|
108
|
-
"errorMessageTitle": oResourceBundle.getText("M_VISUAL_FILTERS_ERROR_MESSAGE_TITLE"),
|
|
109
|
-
"errorMessage": oResourceBundle.getText("M_VISUAL_FILTERS_PROVIDE_FILTER_VAL_SINGLEVF", sLabel)
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
} else {
|
|
113
|
-
const aSelectOptions: any[] = [];
|
|
114
|
-
const aNotMatchedConditions: any[] = [];
|
|
115
|
-
if (oSelectionVariantAnnotation.SelectOptions) {
|
|
116
|
-
oSelectionVariantAnnotation.SelectOptions.forEach(function(oSelectOption: any) {
|
|
117
|
-
aSelectOptions.push(oSelectOption.PropertyName.$PropertyPath);
|
|
118
|
-
});
|
|
72
|
+
const aParameters = oInteractiveChart.data("parameters") ? oInteractiveChart.data("parameters").customData : [];
|
|
73
|
+
const filterConditions = getFiltersConditionsFromSelectionVariant(
|
|
74
|
+
sEntitySetPath,
|
|
75
|
+
oMetaModel,
|
|
76
|
+
oSelectionVariantAnnotation,
|
|
77
|
+
VisualFilterUtils.getCustomConditions.bind(VisualFilterUtils)
|
|
78
|
+
);
|
|
79
|
+
const oSelectionVariantConditions = VisualFilterUtils.convertFilterCondions(filterConditions);
|
|
80
|
+
const mConditions: any = {};
|
|
81
|
+
|
|
82
|
+
Object.keys(oFilterBarConditions).forEach(function (sKey: string) {
|
|
83
|
+
if (oFilterBarConditions[sKey].length) {
|
|
84
|
+
mConditions[sKey] = oFilterBarConditions[sKey];
|
|
119
85
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
Object.keys(oSelectionVariantConditions).forEach(function (sKey: string) {
|
|
89
|
+
if (!mConditions[sKey]) {
|
|
90
|
+
mConditions[sKey] = oSelectionVariantConditions[sKey];
|
|
124
91
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
92
|
+
});
|
|
93
|
+
if (bShowOverLayInitially === "true") {
|
|
94
|
+
if (!Object.keys(oSelectionVariantAnnotation).length) {
|
|
95
|
+
if (aRequiredProperties.length > 1) {
|
|
96
|
+
oInternalModelContext.setProperty(sInternalContextPath, {
|
|
97
|
+
"showError": true,
|
|
98
|
+
"errorMessageTitle": oResourceBundle.getText("M_VISUAL_FILTERS_ERROR_MESSAGE_TITLE"),
|
|
99
|
+
"errorMessage": oResourceBundle.getText("M_VISUAL_FILTERS_PROVIDE_FILTER_VAL_MULTIPLEVF")
|
|
100
|
+
});
|
|
101
|
+
} else {
|
|
102
|
+
sLabel =
|
|
103
|
+
oMetaModel.getObject(sEntitySetPath + "/" + aRequiredProperties[0] + "@com.sap.vocabularies.Common.v1.Label") ||
|
|
104
|
+
aRequiredProperties[0];
|
|
105
|
+
oInternalModelContext.setProperty(sInternalContextPath, {
|
|
106
|
+
"showError": true,
|
|
107
|
+
"errorMessageTitle": oResourceBundle.getText("M_VISUAL_FILTERS_ERROR_MESSAGE_TITLE"),
|
|
108
|
+
"errorMessage": oResourceBundle.getText("M_VISUAL_FILTERS_PROVIDE_FILTER_VAL_SINGLEVF", sLabel)
|
|
109
|
+
});
|
|
128
110
|
}
|
|
129
|
-
});
|
|
130
|
-
if (aNotMatchedConditions.length > 1) {
|
|
131
|
-
oInternalModelContext.setProperty(sInternalContextPath, {
|
|
132
|
-
"showError": true,
|
|
133
|
-
"errorMessageTitle": oResourceBundle.getText("M_VISUAL_FILTERS_ERROR_MESSAGE_TITLE"),
|
|
134
|
-
"errorMessage": oResourceBundle.getText("M_VISUAL_FILTERS_PROVIDE_FILTER_VAL_MULTIPLEVF")
|
|
135
|
-
});
|
|
136
111
|
} else {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
112
|
+
const aSelectOptions: any[] = [];
|
|
113
|
+
const aNotMatchedConditions: any[] = [];
|
|
114
|
+
if (oSelectionVariantAnnotation.SelectOptions) {
|
|
115
|
+
oSelectionVariantAnnotation.SelectOptions.forEach(function (oSelectOption: any) {
|
|
116
|
+
aSelectOptions.push(oSelectOption.PropertyName.$PropertyPath);
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
if (oSelectionVariantAnnotation.Parameters) {
|
|
120
|
+
oSelectionVariantAnnotation.Parameters.forEach(function (oParameter: any) {
|
|
121
|
+
aSelectOptions.push(oParameter.PropertyName.$PropertyPath);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
aRequiredProperties.forEach(function (sPath: any) {
|
|
125
|
+
if (aSelectOptions.indexOf(sPath) === -1) {
|
|
126
|
+
aNotMatchedConditions.push(sPath);
|
|
127
|
+
}
|
|
144
128
|
});
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
? oInternalModelContext.setProperty(sInternalContextPath, {
|
|
129
|
+
if (aNotMatchedConditions.length > 1) {
|
|
130
|
+
oInternalModelContext.setProperty(sInternalContextPath, {
|
|
148
131
|
"showError": true,
|
|
149
132
|
"errorMessageTitle": oResourceBundle.getText("M_VISUAL_FILTERS_ERROR_MESSAGE_TITLE"),
|
|
150
133
|
"errorMessage": oResourceBundle.getText("M_VISUAL_FILTERS_PROVIDE_FILTER_VAL_MULTIPLEVF")
|
|
151
|
-
|
|
152
|
-
|
|
134
|
+
});
|
|
135
|
+
} else {
|
|
136
|
+
sLabel =
|
|
137
|
+
oMetaModel.getObject(sEntitySetPath + "/" + aNotMatchedConditions[0] + "@com.sap.vocabularies.Common.v1.Label") ||
|
|
138
|
+
aNotMatchedConditions[0];
|
|
139
|
+
oInternalModelContext.setProperty(sInternalContextPath, {
|
|
153
140
|
"showError": true,
|
|
154
141
|
"errorMessageTitle": oResourceBundle.getText("M_VISUAL_FILTERS_ERROR_MESSAGE_TITLE"),
|
|
155
|
-
"errorMessage": oResourceBundle.getText("M_VISUAL_FILTERS_PROVIDE_FILTER_VAL_SINGLEVF",
|
|
156
|
-
|
|
142
|
+
"errorMessage": oResourceBundle.getText("M_VISUAL_FILTERS_PROVIDE_FILTER_VAL_SINGLEVF", sLabel)
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
aNotMatchedConditions.length > 1
|
|
146
|
+
? oInternalModelContext.setProperty(sInternalContextPath, {
|
|
147
|
+
"showError": true,
|
|
148
|
+
"errorMessageTitle": oResourceBundle.getText("M_VISUAL_FILTERS_ERROR_MESSAGE_TITLE"),
|
|
149
|
+
"errorMessage": oResourceBundle.getText("M_VISUAL_FILTERS_PROVIDE_FILTER_VAL_MULTIPLEVF")
|
|
150
|
+
})
|
|
151
|
+
: oInternalModelContext.setProperty(sInternalContextPath, {
|
|
152
|
+
"showError": true,
|
|
153
|
+
"errorMessageTitle": oResourceBundle.getText("M_VISUAL_FILTERS_ERROR_MESSAGE_TITLE"),
|
|
154
|
+
"errorMessage": oResourceBundle.getText(
|
|
155
|
+
"M_VISUAL_FILTERS_PROVIDE_FILTER_VAL_SINGLEVF",
|
|
156
|
+
aNotMatchedConditions[0]
|
|
157
|
+
)
|
|
158
|
+
});
|
|
159
|
+
}
|
|
157
160
|
}
|
|
158
|
-
}
|
|
159
161
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
162
|
+
if (!this._oChartBinding || this._oChartBinding !== oInteractiveChartListBinding) {
|
|
163
|
+
if (this._oChartBinding) {
|
|
164
|
+
this.detachDataReceivedHandler(this._oChartBinding);
|
|
165
|
+
}
|
|
166
|
+
this.attachDataRecivedHandler(oInteractiveChartListBinding);
|
|
167
|
+
this._oChartBinding = oInteractiveChartListBinding;
|
|
163
168
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
169
|
+
const bShowOverlay =
|
|
170
|
+
oInternalModelContext.getProperty(sInternalContextPath) && oInternalModelContext.getProperty(sInternalContextPath).showError;
|
|
171
|
+
const sChartEntityName = sEntitySetPath !== "" ? sEntitySetPath.split("/")[1].split("(")[0] : "";
|
|
172
|
+
if (aParameters && aParameters.length && sFilterEntityName === sChartEntityName) {
|
|
173
|
+
const sBindingPath = FilterUtils.getBindingPathForParameters(oFilterBar, mConditions, aPropertyInfoSet, aParameters);
|
|
174
|
+
if (sBindingPath) {
|
|
175
|
+
oInteractiveChartListBinding.sPath = sBindingPath;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
// resume binding for only those visual filters that do not have a in parameter attached.
|
|
179
|
+
// Bindings of visual filters with inParameters will be resumed later after considering in parameters.
|
|
180
|
+
if (oInteractiveChartListBinding && oInteractiveChartListBinding.isSuspended() && !bShowOverlay) {
|
|
181
|
+
oInteractiveChartListBinding.resume();
|
|
174
182
|
}
|
|
175
183
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
184
|
+
|
|
185
|
+
attachDataRecivedHandler(oInteractiveChartListBinding: any) {
|
|
186
|
+
if (oInteractiveChartListBinding) {
|
|
187
|
+
oInteractiveChartListBinding.attachEvent("dataReceived", this.onInternalDataReceived, this);
|
|
188
|
+
this._oChartBinding = oInteractiveChartListBinding;
|
|
189
|
+
}
|
|
180
190
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
191
|
+
|
|
192
|
+
detachDataReceivedHandler(oInteractiveChartListBinding: any) {
|
|
193
|
+
if (oInteractiveChartListBinding) {
|
|
194
|
+
oInteractiveChartListBinding.detachEvent("dataReceived", this.onInternalDataReceived, this);
|
|
195
|
+
this._oChartBinding = undefined;
|
|
196
|
+
}
|
|
186
197
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
198
|
+
|
|
199
|
+
setShowValueHelp(bShowValueHelp: any) {
|
|
200
|
+
if (this.getItems().length > 0) {
|
|
201
|
+
const oVisualFilterControl = (this.getItems()[0] as any).getItems()[0];
|
|
202
|
+
oVisualFilterControl.getContent().some(function (oInnerControl: any) {
|
|
203
|
+
if (oInnerControl.isA("sap.m.Button")) {
|
|
204
|
+
oInnerControl.setVisible(bShowValueHelp);
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
this.setProperty("showValueHelp", bShowValueHelp);
|
|
208
|
+
}
|
|
192
209
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
210
|
+
|
|
211
|
+
setValueHelpIconSrc(sIconSrc: any) {
|
|
212
|
+
if (this.getItems().length > 0) {
|
|
213
|
+
const oVisualFilterControl = (this.getItems()[0] as any).getItems()[0];
|
|
214
|
+
oVisualFilterControl.getContent().some(function (oInnerControl: any) {
|
|
215
|
+
if (oInnerControl.isA("sap.m.Button")) {
|
|
216
|
+
oInnerControl.setIcon(sIconSrc);
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
this.setProperty("valueHelpIconSrc", sIconSrc);
|
|
220
|
+
}
|
|
203
221
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
222
|
+
|
|
223
|
+
onInternalDataReceived(oEvent: any) {
|
|
224
|
+
const sId = this.getId();
|
|
225
|
+
const oView = CommonUtils.getTargetView(this);
|
|
226
|
+
const oInteractiveChart = (this.getItems()[1] as any).getItems()[0];
|
|
227
|
+
const sInternalContextPath = this.data("infoPath");
|
|
228
|
+
const oInternalModelContext = oInteractiveChart.getBindingContext("internal");
|
|
229
|
+
const oResourceBundle = (Core as CoreEx).getLibraryResourceBundle("sap.fe.macros");
|
|
230
|
+
const vUOM = oInteractiveChart.data("uom");
|
|
231
|
+
VisualFilterUtils.updateChartScaleFactorTitle(oInteractiveChart, oView, sId, sInternalContextPath);
|
|
232
|
+
if (oEvent.getParameter("error")) {
|
|
233
|
+
const s18nMessageTitle = oResourceBundle.getText("M_VISUAL_FILTERS_ERROR_MESSAGE_TITLE");
|
|
234
|
+
const s18nMessage = oResourceBundle.getText("M_VISUAL_FILTERS_ERROR_DATA_TEXT");
|
|
235
|
+
VisualFilterUtils.applyErrorMessageAndTitle(s18nMessageTitle, s18nMessage, sInternalContextPath, oView);
|
|
236
|
+
} else if (oEvent.getParameter("data")) {
|
|
237
|
+
const oData = oEvent.getSource().getCurrentContexts();
|
|
238
|
+
if (oData && oData.length === 0) {
|
|
239
|
+
VisualFilterUtils.setNoDataMessage(sInternalContextPath, oResourceBundle, oView);
|
|
240
|
+
} else {
|
|
241
|
+
oInternalModelContext.setProperty(sInternalContextPath, {});
|
|
211
242
|
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
const oView = Utils.getViewForControl(this);
|
|
219
|
-
const oInteractiveChart = this.getItems()[1].getItems()[0];
|
|
220
|
-
const sInternalContextPath = this.data("infoPath");
|
|
221
|
-
const oInternalModelContext = oInteractiveChart.getBindingContext("internal");
|
|
222
|
-
const oResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.fe.macros") as ResourceBundle;
|
|
223
|
-
const vUOM = oInteractiveChart.data("uom");
|
|
224
|
-
VisualFilterUtils.updateChartScaleFactorTitle(oInteractiveChart, oView, sId, sInternalContextPath);
|
|
225
|
-
if (oEvent.getParameter("error")) {
|
|
226
|
-
const s18nMessageTitle = oResourceBundle.getText("M_VISUAL_FILTERS_ERROR_MESSAGE_TITLE");
|
|
227
|
-
const s18nMessage = oResourceBundle.getText("M_VISUAL_FILTERS_ERROR_DATA_TEXT");
|
|
228
|
-
VisualFilterUtils.applyErrorMessageAndTitle(s18nMessageTitle, s18nMessage, sInternalContextPath, oView);
|
|
229
|
-
} else if (oEvent.getParameter("data")) {
|
|
230
|
-
const oData = oEvent.getSource().getCurrentContexts();
|
|
231
|
-
if (oData && oData.length === 0) {
|
|
232
|
-
VisualFilterUtils.setNoDataMessage(sInternalContextPath, oResourceBundle, oView);
|
|
233
|
-
} else {
|
|
234
|
-
oInternalModelContext.setProperty(sInternalContextPath, {});
|
|
243
|
+
VisualFilterUtils.setMultiUOMMessage(oData, oInteractiveChart, sInternalContextPath, oResourceBundle, oView);
|
|
244
|
+
}
|
|
245
|
+
if (vUOM && ((vUOM["ISOCurrency"] && vUOM["ISOCurrency"].$Path) || (vUOM["Unit"] && vUOM["Unit"].$Path))) {
|
|
246
|
+
const oContexts = oEvent.getSource().getContexts();
|
|
247
|
+
const oContextData = oContexts && oContexts[0].getObject();
|
|
248
|
+
VisualFilterUtils.applyUOMToTitle(oInteractiveChart, oContextData, oView, sInternalContextPath);
|
|
235
249
|
}
|
|
236
|
-
VisualFilterUtils.setMultiUOMMessage(oData, oInteractiveChart, sInternalContextPath, oResourceBundle, oView);
|
|
237
|
-
}
|
|
238
|
-
if (vUOM && ((vUOM["ISOCurrency"] && vUOM["ISOCurrency"].$Path) || (vUOM["Unit"] && vUOM["Unit"].$Path))) {
|
|
239
|
-
const oContexts = oEvent.getSource().getContexts();
|
|
240
|
-
const oContextData = oContexts && oContexts[0].getObject();
|
|
241
|
-
VisualFilterUtils.applyUOMToTitle(oInteractiveChart, oContextData, oView, sInternalContextPath);
|
|
242
250
|
}
|
|
243
|
-
}
|
|
244
|
-
|
|
251
|
+
}
|
|
245
252
|
export default VisualFilter;
|