@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
|
@@ -2,49 +2,81 @@
|
|
|
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/ui/core/Control"], function (Control) {
|
|
5
|
+
sap.ui.define(["sap/ui/core/Control", "sap/fe/core/helpers/ClassSupport"], function (Control, ClassSupport) {
|
|
6
6
|
"use strict";
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
8
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;
|
|
9
|
+
|
|
10
|
+
var property = ClassSupport.property;
|
|
11
|
+
var implementInterface = ClassSupport.implementInterface;
|
|
12
|
+
var defineUI5Class = ClassSupport.defineUI5Class;
|
|
13
|
+
var association = ClassSupport.association;
|
|
14
|
+
var aggregation = ClassSupport.aggregation;
|
|
15
|
+
|
|
16
|
+
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
17
|
+
|
|
18
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
19
|
+
|
|
20
|
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
21
|
+
|
|
22
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
23
|
+
|
|
24
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
25
|
+
|
|
26
|
+
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }
|
|
27
|
+
|
|
28
|
+
var ConditionalWrapper = (_dec = defineUI5Class("sap.fe.core.controls.ConditionalWrapper"), _dec2 = implementInterface("sap.ui.core.IFormContent"), _dec3 = property({
|
|
29
|
+
type: "sap.ui.core.CSSSize",
|
|
30
|
+
defaultValue: null
|
|
31
|
+
}), _dec4 = property({
|
|
32
|
+
type: "boolean",
|
|
33
|
+
defaultValue: false
|
|
34
|
+
}), _dec5 = property({
|
|
35
|
+
type: "boolean",
|
|
36
|
+
defaultValue: false
|
|
37
|
+
}), _dec6 = association({
|
|
38
|
+
type: "sap.ui.core.Control",
|
|
39
|
+
multiple: true,
|
|
40
|
+
singularName: "ariaLabelledBy"
|
|
41
|
+
}), _dec7 = aggregation({
|
|
42
|
+
type: "sap.ui.core.Control",
|
|
43
|
+
multiple: false,
|
|
44
|
+
isDefault: true
|
|
45
|
+
}), _dec8 = aggregation({
|
|
46
|
+
type: "sap.ui.core.Control",
|
|
47
|
+
multiple: false
|
|
48
|
+
}), _dec(_class = (_class2 = /*#__PURE__*/function (_Control) {
|
|
49
|
+
_inheritsLoose(ConditionalWrapper, _Control);
|
|
50
|
+
|
|
51
|
+
function ConditionalWrapper() {
|
|
52
|
+
var _this;
|
|
53
|
+
|
|
54
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
55
|
+
args[_key] = arguments[_key];
|
|
45
56
|
}
|
|
46
|
-
|
|
47
|
-
|
|
57
|
+
|
|
58
|
+
_this = _Control.call.apply(_Control, [this].concat(args)) || this;
|
|
59
|
+
|
|
60
|
+
_initializerDefineProperty(_this, "__implements__sap_ui_core_IFormContent", _descriptor, _assertThisInitialized(_this));
|
|
61
|
+
|
|
62
|
+
_initializerDefineProperty(_this, "width", _descriptor2, _assertThisInitialized(_this));
|
|
63
|
+
|
|
64
|
+
_initializerDefineProperty(_this, "formDoNotAdjustWidth", _descriptor3, _assertThisInitialized(_this));
|
|
65
|
+
|
|
66
|
+
_initializerDefineProperty(_this, "condition", _descriptor4, _assertThisInitialized(_this));
|
|
67
|
+
|
|
68
|
+
_initializerDefineProperty(_this, "ariaLabelledBy", _descriptor5, _assertThisInitialized(_this));
|
|
69
|
+
|
|
70
|
+
_initializerDefineProperty(_this, "contentTrue", _descriptor6, _assertThisInitialized(_this));
|
|
71
|
+
|
|
72
|
+
_initializerDefineProperty(_this, "contentFalse", _descriptor7, _assertThisInitialized(_this));
|
|
73
|
+
|
|
74
|
+
return _this;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
var _proto = ConditionalWrapper.prototype;
|
|
78
|
+
|
|
79
|
+
_proto.enhanceAccessibilityState = function enhanceAccessibilityState(oElement, mAriaProps) {
|
|
48
80
|
var oParent = this.getParent();
|
|
49
81
|
|
|
50
82
|
if (oParent && oParent.enhanceAccessibilityState) {
|
|
@@ -52,10 +84,11 @@ sap.ui.define(["sap/ui/core/Control"], function (Control) {
|
|
|
52
84
|
}
|
|
53
85
|
|
|
54
86
|
return mAriaProps;
|
|
55
|
-
}
|
|
56
|
-
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
_proto._setAriaLabelledBy = function _setAriaLabelledBy(oContent) {
|
|
57
90
|
if (oContent && oContent.addAriaLabelledBy) {
|
|
58
|
-
var aAriaLabelledBy = this.
|
|
91
|
+
var aAriaLabelledBy = this.ariaLabelledBy;
|
|
59
92
|
|
|
60
93
|
for (var i = 0; i < aAriaLabelledBy.length; i++) {
|
|
61
94
|
var sId = aAriaLabelledBy[i];
|
|
@@ -66,32 +99,70 @@ sap.ui.define(["sap/ui/core/Control"], function (Control) {
|
|
|
66
99
|
}
|
|
67
100
|
}
|
|
68
101
|
}
|
|
69
|
-
}
|
|
70
|
-
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
_proto.onBeforeRendering = function onBeforeRendering() {
|
|
71
105
|
// before calling the renderer of the ConditionalWrapper parent control may have set ariaLabelledBy
|
|
72
106
|
// we ensure it is passed to its inner controls
|
|
73
|
-
this._setAriaLabelledBy(this.
|
|
74
|
-
|
|
75
|
-
this._setAriaLabelledBy(this.getContentFalse());
|
|
76
|
-
},
|
|
77
|
-
renderer: {
|
|
78
|
-
apiVersion: 2,
|
|
79
|
-
render: function (oRm, oControl) {
|
|
80
|
-
oRm.openStart("div", oControl);
|
|
81
|
-
oRm.style("width", oControl.getWidth());
|
|
82
|
-
oRm.style("display", "inline-block");
|
|
83
|
-
oRm.openEnd();
|
|
84
|
-
|
|
85
|
-
if (oControl.getCondition()) {
|
|
86
|
-
oRm.renderControl(oControl.getContentTrue());
|
|
87
|
-
} else {
|
|
88
|
-
oRm.renderControl(oControl.getContentFalse());
|
|
89
|
-
}
|
|
107
|
+
this._setAriaLabelledBy(this.contentTrue);
|
|
90
108
|
|
|
91
|
-
|
|
109
|
+
this._setAriaLabelledBy(this.contentFalse);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
ConditionalWrapper.render = function render(oRm, oControl) {
|
|
113
|
+
oRm.openStart("div", oControl);
|
|
114
|
+
oRm.style("width", oControl.width);
|
|
115
|
+
oRm.style("display", "inline-block");
|
|
116
|
+
oRm.openEnd();
|
|
117
|
+
|
|
118
|
+
if (oControl.condition) {
|
|
119
|
+
oRm.renderControl(oControl.contentTrue);
|
|
120
|
+
} else {
|
|
121
|
+
oRm.renderControl(oControl.contentFalse);
|
|
92
122
|
}
|
|
123
|
+
|
|
124
|
+
oRm.close("div"); // end of the complete Control
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
return ConditionalWrapper;
|
|
128
|
+
}(Control), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "__implements__sap_ui_core_IFormContent", [_dec2], {
|
|
129
|
+
configurable: true,
|
|
130
|
+
enumerable: true,
|
|
131
|
+
writable: true,
|
|
132
|
+
initializer: function () {
|
|
133
|
+
return true;
|
|
93
134
|
}
|
|
94
|
-
})
|
|
135
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "width", [_dec3], {
|
|
136
|
+
configurable: true,
|
|
137
|
+
enumerable: true,
|
|
138
|
+
writable: true,
|
|
139
|
+
initializer: null
|
|
140
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "formDoNotAdjustWidth", [_dec4], {
|
|
141
|
+
configurable: true,
|
|
142
|
+
enumerable: true,
|
|
143
|
+
writable: true,
|
|
144
|
+
initializer: null
|
|
145
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "condition", [_dec5], {
|
|
146
|
+
configurable: true,
|
|
147
|
+
enumerable: true,
|
|
148
|
+
writable: true,
|
|
149
|
+
initializer: null
|
|
150
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "ariaLabelledBy", [_dec6], {
|
|
151
|
+
configurable: true,
|
|
152
|
+
enumerable: true,
|
|
153
|
+
writable: true,
|
|
154
|
+
initializer: null
|
|
155
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "contentTrue", [_dec7], {
|
|
156
|
+
configurable: true,
|
|
157
|
+
enumerable: true,
|
|
158
|
+
writable: true,
|
|
159
|
+
initializer: null
|
|
160
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "contentFalse", [_dec8], {
|
|
161
|
+
configurable: true,
|
|
162
|
+
enumerable: true,
|
|
163
|
+
writable: true,
|
|
164
|
+
initializer: null
|
|
165
|
+
})), _class2)) || _class);
|
|
95
166
|
return ConditionalWrapper;
|
|
96
167
|
}, false);
|
|
97
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
168
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvbmRpdGlvbmFsV3JhcHBlci50cyJdLCJuYW1lcyI6WyJDb25kaXRpb25hbFdyYXBwZXIiLCJkZWZpbmVVSTVDbGFzcyIsImltcGxlbWVudEludGVyZmFjZSIsInByb3BlcnR5IiwidHlwZSIsImRlZmF1bHRWYWx1ZSIsImFzc29jaWF0aW9uIiwibXVsdGlwbGUiLCJzaW5ndWxhck5hbWUiLCJhZ2dyZWdhdGlvbiIsImlzRGVmYXVsdCIsImVuaGFuY2VBY2Nlc3NpYmlsaXR5U3RhdGUiLCJvRWxlbWVudCIsIm1BcmlhUHJvcHMiLCJvUGFyZW50IiwiZ2V0UGFyZW50IiwiX3NldEFyaWFMYWJlbGxlZEJ5Iiwib0NvbnRlbnQiLCJhZGRBcmlhTGFiZWxsZWRCeSIsImFBcmlhTGFiZWxsZWRCeSIsImFyaWFMYWJlbGxlZEJ5IiwiaSIsImxlbmd0aCIsInNJZCIsImFBcmlhTGFiZWxsZWRCeXMiLCJnZXRBcmlhTGFiZWxsZWRCeSIsImluZGV4T2YiLCJvbkJlZm9yZVJlbmRlcmluZyIsImNvbnRlbnRUcnVlIiwiY29udGVudEZhbHNlIiwicmVuZGVyIiwib1JtIiwib0NvbnRyb2wiLCJvcGVuU3RhcnQiLCJzdHlsZSIsIndpZHRoIiwib3BlbkVuZCIsImNvbmRpdGlvbiIsInJlbmRlckNvbnRyb2wiLCJjbG9zZSIsIkNvbnRyb2wiXSwibWFwcGluZ3Mi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
import Control from "sap/ui/core/Control";
|
|
2
|
+
import { aggregation, association, defineUI5Class, implementInterface, property } from "sap/fe/core/helpers/ClassSupport";
|
|
3
|
+
import { CSSSize, IFormContent } from "sap/ui/core/library";
|
|
4
|
+
import RenderManager from "sap/ui/core/RenderManager";
|
|
2
5
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
ariaLabelledBy: { type: "sap.ui.core.Control", multiple: true, singularName: "ariaLabelledBy" }
|
|
31
|
-
},
|
|
32
|
-
defaultAggregation: "contentTrue",
|
|
33
|
-
aggregations: {
|
|
34
|
-
contentTrue: { type: "sap.ui.core.Control", multiple: false },
|
|
35
|
-
contentFalse: { type: "sap.ui.core.Control", multiple: false }
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
enhanceAccessibilityState: function(oElement: any, mAriaProps: any) {
|
|
6
|
+
@defineUI5Class("sap.fe.core.controls.ConditionalWrapper")
|
|
7
|
+
class ConditionalWrapper extends Control implements IFormContent {
|
|
8
|
+
@implementInterface("sap.ui.core.IFormContent")
|
|
9
|
+
__implements__sap_ui_core_IFormContent: boolean = true;
|
|
10
|
+
|
|
11
|
+
@property({ type: "sap.ui.core.CSSSize", defaultValue: null })
|
|
12
|
+
width!: CSSSize;
|
|
13
|
+
|
|
14
|
+
@property({ type: "boolean", defaultValue: false })
|
|
15
|
+
formDoNotAdjustWidth!: boolean;
|
|
16
|
+
|
|
17
|
+
@property({ type: "boolean", defaultValue: false })
|
|
18
|
+
condition!: boolean;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Association to controls / IDs that label this control (see WAI-ARIA attribute aria-labelledby).
|
|
22
|
+
*/
|
|
23
|
+
@association({ type: "sap.ui.core.Control", multiple: true, singularName: "ariaLabelledBy" })
|
|
24
|
+
ariaLabelledBy!: Control[];
|
|
25
|
+
|
|
26
|
+
@aggregation({ type: "sap.ui.core.Control", multiple: false, isDefault: true })
|
|
27
|
+
contentTrue!: Control;
|
|
28
|
+
|
|
29
|
+
@aggregation({ type: "sap.ui.core.Control", multiple: false })
|
|
30
|
+
contentFalse!: Control;
|
|
31
|
+
|
|
32
|
+
enhanceAccessibilityState(oElement: any, mAriaProps: any) {
|
|
39
33
|
const oParent = this.getParent() as any;
|
|
40
34
|
|
|
41
35
|
if (oParent && oParent.enhanceAccessibilityState) {
|
|
@@ -43,10 +37,10 @@ const ConditionalWrapper = Control.extend("sap.fe.core.controls.ConditionalWrapp
|
|
|
43
37
|
}
|
|
44
38
|
|
|
45
39
|
return mAriaProps;
|
|
46
|
-
}
|
|
47
|
-
_setAriaLabelledBy
|
|
40
|
+
}
|
|
41
|
+
_setAriaLabelledBy(oContent: any) {
|
|
48
42
|
if (oContent && oContent.addAriaLabelledBy) {
|
|
49
|
-
const aAriaLabelledBy = this.
|
|
43
|
+
const aAriaLabelledBy = this.ariaLabelledBy;
|
|
50
44
|
|
|
51
45
|
for (let i = 0; i < aAriaLabelledBy.length; i++) {
|
|
52
46
|
const sId = aAriaLabelledBy[i];
|
|
@@ -56,28 +50,25 @@ const ConditionalWrapper = Control.extend("sap.fe.core.controls.ConditionalWrapp
|
|
|
56
50
|
}
|
|
57
51
|
}
|
|
58
52
|
}
|
|
59
|
-
}
|
|
60
|
-
onBeforeRendering
|
|
53
|
+
}
|
|
54
|
+
onBeforeRendering() {
|
|
61
55
|
// before calling the renderer of the ConditionalWrapper parent control may have set ariaLabelledBy
|
|
62
56
|
// we ensure it is passed to its inner controls
|
|
63
|
-
this._setAriaLabelledBy(this.
|
|
64
|
-
this._setAriaLabelledBy(this.
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
oRm.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
} else {
|
|
76
|
-
oRm.renderControl(oControl.getContentFalse());
|
|
77
|
-
}
|
|
78
|
-
oRm.close("div"); // end of the complete Control
|
|
57
|
+
this._setAriaLabelledBy(this.contentTrue);
|
|
58
|
+
this._setAriaLabelledBy(this.contentFalse);
|
|
59
|
+
}
|
|
60
|
+
static render(oRm: RenderManager, oControl: ConditionalWrapper) {
|
|
61
|
+
oRm.openStart("div", oControl);
|
|
62
|
+
oRm.style("width", oControl.width);
|
|
63
|
+
oRm.style("display", "inline-block");
|
|
64
|
+
oRm.openEnd();
|
|
65
|
+
if (oControl.condition) {
|
|
66
|
+
oRm.renderControl(oControl.contentTrue);
|
|
67
|
+
} else {
|
|
68
|
+
oRm.renderControl(oControl.contentFalse);
|
|
79
69
|
}
|
|
70
|
+
oRm.close("div"); // end of the complete Control
|
|
80
71
|
}
|
|
81
|
-
}
|
|
72
|
+
}
|
|
82
73
|
|
|
83
74
|
export default ConditionalWrapper;
|