@openui5/sap.ui.core 1.93.3 → 1.96.2
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/.eslintrc.json +13 -2
- package/.reuse/dep5 +6 -11
- package/THIRDPARTY.txt +10 -16
- package/package.json +1 -1
- package/src/jquery.sap.global.js +5 -2
- package/src/jquery.sap.properties.js +1 -1
- package/src/jquery.sap.resources.js +1 -1
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +3 -3
- package/src/jquery.sap.stubs.js +2 -1
- package/src/jquery.sap.trace.js +2 -1
- package/src/sap/base/i18n/ResourceBundle.js +6 -2
- package/src/sap/base/strings/whitespaceReplacer.js +52 -0
- package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
- package/src/sap/base/util/restricted/_castArray.js +1 -1
- package/src/sap/base/util/restricted/_compact.js +1 -1
- package/src/sap/base/util/restricted/_curry.js +1 -1
- package/src/sap/base/util/restricted/_debounce.js +1 -1
- package/src/sap/base/util/restricted/_difference.js +1 -1
- package/src/sap/base/util/restricted/_differenceBy.js +1 -1
- package/src/sap/base/util/restricted/_differenceWith.js +1 -1
- package/src/sap/base/util/restricted/_flatMap.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
- package/src/sap/base/util/restricted/_flatten.js +1 -1
- package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
- package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
- package/src/sap/base/util/restricted/_intersection.js +1 -1
- package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
- package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
- package/src/sap/base/util/restricted/_isEqual.js +1 -1
- package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
- package/src/sap/base/util/restricted/_isNil.js +1 -1
- package/src/sap/base/util/restricted/_max.js +1 -1
- package/src/sap/base/util/restricted/_merge.js +1 -1
- package/src/sap/base/util/restricted/_mergeWith.js +1 -1
- package/src/sap/base/util/restricted/_min.js +1 -1
- package/src/sap/base/util/restricted/_omit.js +1 -1
- package/src/sap/base/util/restricted/_pick.js +1 -1
- package/src/sap/base/util/restricted/_pickBy.js +1 -1
- package/src/sap/base/util/restricted/_throttle.js +1 -1
- package/src/sap/base/util/restricted/_toArray.js +1 -1
- package/src/sap/base/util/restricted/_union.js +1 -1
- package/src/sap/base/util/restricted/_unionBy.js +1 -1
- package/src/sap/base/util/restricted/_unionWith.js +1 -1
- package/src/sap/base/util/restricted/_uniq.js +1 -1
- package/src/sap/base/util/restricted/_uniqBy.js +1 -1
- package/src/sap/base/util/restricted/_uniqWith.js +1 -1
- package/src/sap/base/util/restricted/_without.js +1 -1
- package/src/sap/base/util/restricted/_xor.js +1 -1
- package/src/sap/base/util/restricted/_xorBy.js +1 -1
- package/src/sap/base/util/restricted/_xorWith.js +1 -1
- package/src/sap/base/util/restricted/_zipObject.js +1 -1
- package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
- package/src/sap/ui/Device.js +37 -42
- package/src/sap/ui/Global.js +8 -7
- package/src/sap/ui/base/DataType.js +14 -8
- package/src/sap/ui/base/Event.js +1 -1
- package/src/sap/ui/base/EventProvider.js +1 -1
- package/src/sap/ui/base/ExpressionParser.js +9 -6
- package/src/sap/ui/base/Interface.js +3 -49
- package/src/sap/ui/base/ManagedObject.js +12 -7
- package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
- package/src/sap/ui/base/Metadata.js +1 -1
- package/src/sap/ui/base/Object.js +49 -4
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/base/syncXHRFix.js +2 -1
- package/src/sap/ui/core/.library +5 -5
- package/src/sap/ui/core/AppCacheBuster.js +4 -4
- package/src/sap/ui/core/BusyIndicator.js +1 -11
- package/src/sap/ui/core/Component.js +300 -140
- package/src/sap/ui/core/ComponentContainer.js +24 -8
- package/src/sap/ui/core/ComponentMetadata.js +14 -3
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Configuration.js +67 -31
- package/src/sap/ui/core/Control.js +1 -1
- package/src/sap/ui/core/Core.js +103 -25
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/CustomizingConfiguration.js +35 -260
- package/src/sap/ui/core/DeclarativeSupport.js +3 -2
- package/src/sap/ui/core/Element.js +1 -1
- package/src/sap/ui/core/ElementMetadata.js +4 -2
- package/src/sap/ui/core/EnabledPropagator.js +91 -73
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/ExtensionPoint.js +7 -14
- package/src/sap/ui/core/Fragment.js +30 -32
- package/src/sap/ui/core/HTML.js +1 -1
- package/src/sap/ui/core/History.js +1 -1
- package/src/sap/ui/core/Icon.js +7 -8
- package/src/sap/ui/core/IconPool.js +26 -1097
- package/src/sap/ui/core/IconRenderer.js +6 -6
- package/src/sap/ui/core/IndicationColorSupport.js +1 -1
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +1 -1
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +1 -1
- package/src/sap/ui/core/Item.js +1 -1
- package/src/sap/ui/core/LabelEnablement.js +1 -1
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/ListItem.js +1 -1
- package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
- package/src/sap/ui/core/Locale.js +26 -4
- package/src/sap/ui/core/LocaleData.js +1 -1
- package/src/sap/ui/core/Manifest.js +4 -61
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Patcher.js +27 -3
- package/src/sap/ui/core/Placeholder.js +28 -15
- package/src/sap/ui/core/RenderManager.js +36 -6
- package/src/sap/ui/core/Renderer.js +13 -3
- package/src/sap/ui/core/ResizeHandler.js +1 -1
- package/src/sap/ui/core/ScrollBar.js +2 -2
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/ShortcutHintsMixin.js +14 -7
- package/src/sap/ui/core/Title.js +1 -1
- package/src/sap/ui/core/TooltipBase.js +1 -1
- package/src/sap/ui/core/UIArea.js +1 -1
- package/src/sap/ui/core/UIComponent.js +42 -16
- package/src/sap/ui/core/UIComponentMetadata.js +1 -1
- package/src/sap/ui/core/ValueStateSupport.js +1 -1
- package/src/sap/ui/core/VariantLayoutData.js +1 -1
- package/src/sap/ui/core/XMLComposite.js +2 -2
- package/src/sap/ui/core/XMLCompositeMetadata.js +2 -2
- package/src/sap/ui/core/XMLTemplateProcessor.js +116 -41
- package/src/sap/ui/core/_IconRegistry.js +1148 -0
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +6 -3
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
- package/src/sap/ui/core/dnd/DragInfo.js +2 -2
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/format/NumberFormat.js +16 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +73 -221
- package/src/sap/ui/core/hyphenation/HyphenationTestingWords.js +11 -10
- package/src/sap/ui/core/library.js +3 -3
- package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
- package/src/sap/ui/core/message/Message.js +1 -1
- package/src/sap/ui/core/message/MessageManager.js +13 -15
- package/src/sap/ui/core/message/MessageParser.js +1 -1
- package/src/sap/ui/core/message/MessageProcessor.js +1 -1
- package/src/sap/ui/core/messagebundle_de.properties +1 -1
- package/src/sap/ui/core/messagebundle_fr.properties +1 -1
- package/src/sap/ui/core/messagebundle_it.properties +1 -1
- package/src/sap/ui/core/messagebundle_pl.properties +1 -1
- package/src/sap/ui/core/messagebundle_th.properties +2 -2
- package/src/sap/ui/core/mvc/Controller.js +38 -19
- package/src/sap/ui/core/mvc/ControllerExtensionProvider.js +30 -32
- package/src/sap/ui/core/mvc/ControllerMetadata.js +18 -18
- package/src/sap/ui/core/mvc/HTMLView.js +2 -2
- package/src/sap/ui/core/mvc/JSONView.js +2 -2
- package/src/sap/ui/core/mvc/JSView.js +2 -2
- package/src/sap/ui/core/mvc/TemplateView.js +2 -2
- package/src/sap/ui/core/mvc/View.js +58 -85
- package/src/sap/ui/core/mvc/XMLView.js +2 -2
- package/src/sap/ui/core/mvc/XMLViewRenderer.js +17 -20
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/plugin/LessSupport.js +1 -1
- package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
- package/src/sap/ui/core/postmessage/Bus.js +1 -1
- package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
- package/src/sap/ui/core/routing/History.js +10 -2
- package/src/sap/ui/core/routing/Router.js +8 -1
- package/src/sap/ui/core/routing/Target.js +13 -0
- package/src/sap/ui/core/routing/Targets.js +13 -2
- package/src/sap/ui/core/routing/async/Route.js +1 -1
- package/src/sap/ui/core/routing/async/Target.js +353 -259
- package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
- package/src/sap/ui/core/search/SearchProvider.js +1 -1
- package/src/sap/ui/core/service/Service.js +1 -1
- package/src/sap/ui/core/service/ServiceFactory.js +1 -1
- package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
- package/src/sap/ui/core/support/BootSupportTool.js +11 -0
- package/src/sap/ui/core/support/InteractionTree.css +4 -0
- package/src/sap/ui/core/support/Plugin.js +1 -1
- package/src/sap/ui/core/support/Support.js +1 -1
- package/src/sap/ui/core/support/ViewInfo.css +599 -0
- package/src/sap/ui/core/support/controls/InteractionTree.js +352 -222
- package/src/sap/ui/core/support/controls/ObjectViewer.js +3 -41
- package/src/sap/ui/core/support/controls/TimelineOverview.js +49 -24
- package/src/sap/ui/core/support/controls/TreeViewer.js +12 -58
- package/src/sap/ui/core/support/plugins/ControlTree.js +59 -68
- package/src/sap/ui/core/support/plugins/Debugging.js +9 -11
- package/src/sap/ui/core/support/plugins/Interaction.js +2 -2
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +147 -75
- package/src/sap/ui/core/support/plugins/Selector.js +19 -24
- package/src/sap/ui/core/support/plugins/TechInfo.js +5 -5
- package/src/sap/ui/core/support/plugins/Trace.js +95 -32
- package/src/sap/ui/core/support/plugins/ViewInfo.js +9 -73
- package/src/sap/ui/core/support/support.css +109 -14
- package/src/sap/ui/core/support/support.html +6 -2
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.fragment.xml +1 -0
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +149 -72
- package/src/sap/ui/core/themes/base/Icon.less +9 -0
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
- package/src/sap/ui/core/theming/Parameters.js +6 -4
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
- package/src/sap/ui/core/tmpl/Template.js +10 -28
- package/src/sap/ui/core/tmpl/TemplateControl.js +4 -4
- package/src/sap/ui/core/tmpl/_parsePath.js +35 -0
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/DraftEnabledMockServer.js +9 -4
- package/src/sap/ui/core/util/Export.js +1 -1
- package/src/sap/ui/core/util/ExportCell.js +1 -1
- package/src/sap/ui/core/util/ExportColumn.js +1 -1
- package/src/sap/ui/core/util/ExportRow.js +1 -1
- package/src/sap/ui/core/util/ExportType.js +1 -1
- package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
- package/src/sap/ui/core/util/File.js +1 -1
- package/src/sap/ui/core/util/LibraryInfo.js +1 -1
- package/src/sap/ui/core/util/MockServer.js +5 -5
- package/src/sap/ui/core/util/MockServerAnnotationsHandler.js +3 -2
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/XMLPreprocessor.js +11 -12
- package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +136 -63
- package/src/sap/ui/core/util/reflection/JsControlTreeModifier.js +170 -153
- package/src/sap/ui/core/util/reflection/XmlTreeModifier.js +424 -293
- package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
- package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
- package/src/sap/ui/core/ws/ReadyState.js +1 -1
- package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
- package/src/sap/ui/core/ws/WebSocket.js +1 -1
- package/src/sap/ui/debug/ControlTree.js +10 -4
- package/src/sap/ui/debug/DebugEnv.js +3 -4
- package/src/sap/ui/debug/Highlighter.js +8 -2
- package/src/sap/ui/debug/PropertyList.css +55 -0
- package/src/sap/ui/debug/PropertyList.js +111 -182
- package/src/sap/ui/model/Binding.js +174 -118
- package/src/sap/ui/model/ClientContextBinding.js +1 -1
- package/src/sap/ui/model/ClientListBinding.js +1 -3
- package/src/sap/ui/model/ClientModel.js +4 -4
- package/src/sap/ui/model/ClientPropertyBinding.js +4 -2
- package/src/sap/ui/model/ClientTreeBinding.js +15 -9
- package/src/sap/ui/model/ClientTreeBindingAdapter.js +28 -23
- package/src/sap/ui/model/CompositeBinding.js +98 -77
- package/src/sap/ui/model/CompositeDataState.js +2 -2
- package/src/sap/ui/model/CompositeType.js +2 -2
- package/src/sap/ui/model/Context.js +4 -2
- package/src/sap/ui/model/ContextBinding.js +6 -14
- package/src/sap/ui/model/DataState.js +2 -2
- package/src/sap/ui/model/Filter.js +255 -53
- package/src/sap/ui/model/FilterOperator.js +1 -1
- package/src/sap/ui/model/FilterProcessor.js +27 -17
- package/src/sap/ui/model/FilterType.js +1 -1
- package/src/sap/ui/model/ListBinding.js +180 -117
- package/src/sap/ui/model/MetaModel.js +4 -9
- package/src/sap/ui/model/Model.js +345 -294
- package/src/sap/ui/model/PropertyBinding.js +92 -58
- package/src/sap/ui/model/SelectionModel.js +2 -2
- package/src/sap/ui/model/SimpleType.js +2 -2
- package/src/sap/ui/model/Sorter.js +1 -1
- package/src/sap/ui/model/SorterProcessor.js +1 -1
- package/src/sap/ui/model/StaticBinding.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +2 -2
- package/src/sap/ui/model/TreeBinding.js +1 -1
- package/src/sap/ui/model/TreeBindingAdapter.js +251 -100
- package/src/sap/ui/model/TreeBindingCompatibilityAdapter.js +16 -9
- package/src/sap/ui/model/TreeBindingUtils.js +1 -0
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +8 -4
- package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalVersionInfo.js +1 -1
- package/src/sap/ui/model/analytics/BatchResponseCollector.js +1 -1
- package/src/sap/ui/model/analytics/ODataModelAdapter.js +1 -1
- package/src/sap/ui/model/analytics/odata4analytics.js +34 -25
- package/src/sap/ui/model/base/ManagedObjectModel.js +4 -0
- package/src/sap/ui/model/json/JSONListBinding.js +8 -5
- package/src/sap/ui/model/json/JSONModel.js +24 -15
- package/src/sap/ui/model/json/JSONPropertyBinding.js +4 -3
- package/src/sap/ui/model/json/JSONTreeBinding.js +1 -1
- package/src/sap/ui/model/message/MessageListBinding.js +6 -3
- package/src/sap/ui/model/message/MessageModel.js +23 -15
- package/src/sap/ui/model/message/MessagePropertyBinding.js +2 -2
- package/src/sap/ui/model/odata/AnnotationHelper.js +1 -1
- package/src/sap/ui/model/odata/AnnotationParser.js +1 -1
- package/src/sap/ui/model/odata/CountMode.js +1 -1
- package/src/sap/ui/model/odata/Filter.js +1 -1
- package/src/sap/ui/model/odata/ODataAnnotations.js +2 -2
- package/src/sap/ui/model/odata/ODataContextBinding.js +1 -1
- package/src/sap/ui/model/odata/ODataListBinding.js +1 -1
- package/src/sap/ui/model/odata/ODataMessageParser.js +2 -2
- package/src/sap/ui/model/odata/ODataMetaModel.js +5 -3
- package/src/sap/ui/model/odata/ODataMetadata.js +2 -2
- package/src/sap/ui/model/odata/ODataModel.js +8 -7
- package/src/sap/ui/model/odata/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/ODataTreeBinding.js +65 -33
- package/src/sap/ui/model/odata/ODataTreeBindingAdapter.js +1 -1
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +2 -2
- package/src/sap/ui/model/odata/ODataUtils.js +13 -11
- package/src/sap/ui/model/odata/OperationMode.js +1 -1
- package/src/sap/ui/model/odata/_AnnotationHelperExpression.js +1 -1
- package/src/sap/ui/model/odata/type/Boolean.js +1 -1
- package/src/sap/ui/model/odata/type/Byte.js +1 -1
- package/src/sap/ui/model/odata/type/Currency.js +1 -1
- package/src/sap/ui/model/odata/type/Date.js +1 -1
- package/src/sap/ui/model/odata/type/DateTime.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
- package/src/sap/ui/model/odata/type/Decimal.js +1 -1
- package/src/sap/ui/model/odata/type/Double.js +1 -1
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +1 -1
- package/src/sap/ui/model/odata/type/Int16.js +1 -1
- package/src/sap/ui/model/odata/type/Int32.js +1 -1
- package/src/sap/ui/model/odata/type/Int64.js +1 -1
- package/src/sap/ui/model/odata/type/ODataType.js +1 -1
- package/src/sap/ui/model/odata/type/Raw.js +1 -1
- package/src/sap/ui/model/odata/type/SByte.js +1 -1
- package/src/sap/ui/model/odata/type/Single.js +1 -1
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +1 -1
- package/src/sap/ui/model/odata/type/Time.js +1 -1
- package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/v2/Context.js +81 -9
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +3 -3
- package/src/sap/ui/model/odata/v2/ODataContextBinding.js +39 -49
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +236 -73
- package/src/sap/ui/model/odata/v2/ODataModel.js +314 -164
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +110 -97
- package/src/sap/ui/model/odata/v2/_CreatedContextsCache.js +129 -0
- package/src/sap/ui/model/odata/v4/Context.js +6 -3
- package/src/sap/ui/model/odata/v4/ODataBinding.js +5 -6
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +117 -40
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +95 -15
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +44 -31
- package/src/sap/ui/model/odata/v4/ODataModel.js +86 -78
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +47 -28
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +11 -7
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +10 -3
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +8 -1
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +24 -16
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +32 -30
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +52 -17
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +2 -2
- package/src/sap/ui/model/resource/ResourceModel.js +6 -2
- package/src/sap/ui/model/resource/ResourcePropertyBinding.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +2 -2
- package/src/sap/ui/model/type/Currency.js +2 -2
- package/src/sap/ui/model/type/Date.js +9 -3
- package/src/sap/ui/model/type/DateInterval.js +4 -2
- package/src/sap/ui/model/type/DateTime.js +2 -2
- package/src/sap/ui/model/type/DateTimeInterval.js +2 -2
- package/src/sap/ui/model/type/FileSize.js +4 -2
- package/src/sap/ui/model/type/Float.js +4 -2
- package/src/sap/ui/model/type/Integer.js +4 -2
- package/src/sap/ui/model/type/String.js +2 -2
- package/src/sap/ui/model/type/Time.js +2 -2
- package/src/sap/ui/model/type/TimeInterval.js +2 -2
- package/src/sap/ui/model/type/Unit.js +14 -7
- package/src/sap/ui/model/xml/XMLListBinding.js +15 -9
- package/src/sap/ui/model/xml/XMLModel.js +70 -41
- package/src/sap/ui/model/xml/XMLPropertyBinding.js +4 -4
- package/src/sap/ui/model/xml/XMLTreeBinding.js +5 -4
- package/src/sap/ui/performance/trace/Interaction.js +30 -15
- package/src/sap/ui/performance/trace/initTraces.js +1 -1
- package/src/sap/ui/qunit/QUnitUtils.js +3 -2
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +9 -11
- package/src/sap/ui/test/TestUtils.js +11 -4
- package/src/sap/ui/test/actions/Drag.js +6 -2
- package/src/sap/ui/test/actions/Drop.js +6 -2
- package/src/sap/ui/test/actions/EnterText.js +6 -0
- package/src/sap/ui/test/actions/Press.js +6 -0
- package/src/sap/ui/test/actions/Scroll.js +6 -0
- package/src/sap/ui/test/autowaiter/_resourceWaiter.js +4 -4
- package/src/sap/ui/test/launchers/componentLauncher.js +0 -4
- package/src/sap/ui/test/matchers/I18NText.js +29 -11
- package/src/sap/ui/test/opaQunit.js +5 -0
- package/src/sap/ui/thirdparty/crossroads.js +6 -4
- package/src/sap/ui/thirdparty/hyphenopoly/Hyphenopoly.js +1196 -0
- package/src/sap/ui/thirdparty/hyphenopoly/Hyphenopoly_Loader.js +797 -0
- package/src/sap/ui/thirdparty/hyphenopoly/hyphenEngine.asm.js +108 -127
- package/src/sap/ui/thirdparty/hyphenopoly/hyphenEngine.wasm +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/bg.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/ca.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/da.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/de.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/el-monoton.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/en-us.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/es.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/et.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/fi.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/fr.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/hi.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/hr.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/hu.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/it.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/lt.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/nb-no.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/nl.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/pt.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/ru.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/sl.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/sv.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/th.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/tr.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/uk.hpb +0 -0
- package/src/sap/ui/thirdparty/jquery.js +9 -1
- package/src/sap/ui/thirdparty/qunit-2.js +1 -1
- package/src/sap/ui/thirdparty/qunit.js +1 -1
- package/src/sap/ui/util/Mobile.js +2 -20
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/sap/ui/util/isCrossOriginURL.js +16 -6
- package/src/sap-ui-core-nojQuery.js +1 -1
- package/src/sap-ui-core.js +1 -1
- package/src/sap-ui-debug.js +3 -17
- package/ui5.yaml +5 -2
- package/src/sap/ui/core/support/plugins/MessageTest.js +0 -96
- package/src/sap/ui/thirdparty/hyphenopoly/hyphenopoly.bundle.js +0 -860
|
@@ -4,268 +4,43 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
sap.ui.define([
|
|
8
|
-
'./Component',
|
|
9
|
-
'sap/base/Log',
|
|
10
|
-
'sap/base/util/extend',
|
|
11
|
-
'sap/base/util/ObjectPath',
|
|
12
|
-
"sap/base/util/isEmptyObject",
|
|
13
|
-
'./Core' // provides sap.ui.getCore()
|
|
14
|
-
],
|
|
15
|
-
function(Component, Log, extend, ObjectPath, isEmptyObject /*, Core */) {
|
|
7
|
+
sap.ui.define(['sap/base/Log'], function(Log) {
|
|
16
8
|
"use strict";
|
|
17
9
|
|
|
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
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return false;
|
|
53
|
-
} else {
|
|
54
|
-
oConfig = mComponentConfigs[sComponentName];
|
|
55
|
-
if (oConfig && oConfig[sType] && fnCheck(oConfig[sType])) {
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
} else {
|
|
60
|
-
// TODO: checking order of components?
|
|
61
|
-
for (sComponentName in mComponentConfigs) {
|
|
62
|
-
oConfig = mComponentConfigs[sComponentName];
|
|
63
|
-
if (oConfig && oConfig[sType] && fnCheck(oConfig[sType])) {
|
|
64
|
-
break;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* The static object <code>CustomizingConfiguration</code> contains configuration
|
|
72
|
-
* for view replacements, view extensions and custom properties. The configuration
|
|
73
|
-
* will be added from component metadata objects once the component gets activated.
|
|
74
|
-
* By deactivating the component the customizing configuration of the component
|
|
75
|
-
* gets removed again.
|
|
76
|
-
*
|
|
77
|
-
* @author SAP SE
|
|
78
|
-
* @version 1.93.3
|
|
79
|
-
* @constructor
|
|
80
|
-
* @private
|
|
81
|
-
* @since 1.15.1
|
|
82
|
-
* @alias sap.ui.core.CustomizingConfiguration
|
|
83
|
-
*/
|
|
84
|
-
var CustomizingConfiguration = {
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* logging of customizing configuration
|
|
88
|
-
* @private
|
|
89
|
-
*/
|
|
90
|
-
log: function() {
|
|
91
|
-
if (window.console) {
|
|
92
|
-
window.console.log(mComponentConfigs);
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Activates the Customizing of a component by registering the component
|
|
98
|
-
* configuration in the central customizing configuration.
|
|
99
|
-
* @param {string} sComponentName the name of the component
|
|
100
|
-
* @private
|
|
101
|
-
*/
|
|
102
|
-
activateForComponent: function(sComponentName) {
|
|
103
|
-
Log.info("CustomizingConfiguration: activateForComponent('" + sComponentName + "')");
|
|
104
|
-
var sFullComponentName = sComponentName + ".Component";
|
|
105
|
-
sap.ui.requireSync(sFullComponentName.replace(/\./g, "/"));
|
|
106
|
-
var oCustomizingConfig = ObjectPath.get(sFullComponentName).getMetadata().getCustomizing();
|
|
107
|
-
mComponentConfigs[sComponentName] = oCustomizingConfig;
|
|
108
|
-
|
|
109
|
-
Log.debug("CustomizingConfiguration: customizing configuration for component '" + sComponentName + "' loaded: " + JSON.stringify(oCustomizingConfig));
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Deactivates the Customizing of a component by removing the component
|
|
114
|
-
* configuration in the central Customizing configuration.
|
|
115
|
-
* @param {string} sComponentName Name of the component
|
|
116
|
-
* @private
|
|
117
|
-
*/
|
|
118
|
-
deactivateForComponent: function(sComponentName) {
|
|
119
|
-
if (mComponentConfigs[sComponentName]) {
|
|
120
|
-
Log.info("CustomizingConfiguration: deactivateForComponent('" + sComponentName + "')");
|
|
121
|
-
delete mComponentConfigs[sComponentName];
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Activates the Customizing of a component instance by registering the component
|
|
127
|
-
* configuration in the central Customizing configuration.
|
|
128
|
-
* @param {sap.ui.core.Component} oComponent the component instance
|
|
129
|
-
* @private
|
|
130
|
-
*/
|
|
131
|
-
activateForComponentInstance: function(oComponent) {
|
|
132
|
-
Log.info("CustomizingConfiguration: activateForComponentInstance('" + oComponent.getId() + "')");
|
|
133
|
-
var sComponentName = oComponent.getMetadata().getComponentName(),
|
|
134
|
-
sKey = sComponentName + "::" + oComponent.getId(),
|
|
135
|
-
oCustomizingConfig = oComponent.getManifest()["sap.ui5"] && oComponent.getManifest()["sap.ui5"]["extends"] && oComponent.getManifest()["sap.ui5"]["extends"]["extensions"];
|
|
136
|
-
mComponentConfigs[sKey] = oCustomizingConfig;
|
|
137
|
-
|
|
138
|
-
Log.debug("CustomizingConfiguration: customizing configuration for component '" + sKey + "' loaded: " + JSON.stringify(oCustomizingConfig));
|
|
139
|
-
},
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Deactivates the Customizing of a component instance by removing the component
|
|
143
|
-
* configuration in the central Customizing configuration.
|
|
144
|
-
* @param {sap.ui.core.Component} oComponent the component instance
|
|
145
|
-
* @private
|
|
146
|
-
*/
|
|
147
|
-
deactivateForComponentInstance: function(oComponent) {
|
|
148
|
-
var sComponentName = oComponent.getMetadata().getComponentName(),
|
|
149
|
-
sKey = sComponentName + "::" + oComponent.getId();
|
|
150
|
-
if (mComponentConfigs[sKey]) {
|
|
151
|
-
Log.info("CustomizingConfiguration: deactivateForComponent('" + sKey + "')");
|
|
152
|
-
delete mComponentConfigs[sKey];
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* returns the configuration of the replacement View or undefined
|
|
158
|
-
* @private
|
|
159
|
-
*/
|
|
160
|
-
getViewReplacement: function(sViewName, vObject) {
|
|
161
|
-
var oResultConfig;
|
|
162
|
-
// TODO: checking order of components?
|
|
163
|
-
findConfig(CONFIG_VIEW_REPLACEMENTS, vObject, function(oConfig) {
|
|
164
|
-
oResultConfig = oConfig[sViewName];
|
|
165
|
-
return !!oResultConfig;
|
|
166
|
-
});
|
|
167
|
-
return oResultConfig;
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* returns the configuration of the given extension point or undefined
|
|
172
|
-
* @private
|
|
173
|
-
*/
|
|
174
|
-
getViewExtension: function(sViewName, sExtensionPointName, vObject) { // FIXME: currently ONE extension wins, but they should be somehow merged - but how to define the order?
|
|
175
|
-
var oResultConfig;
|
|
176
|
-
// TODO: checking order of components?
|
|
177
|
-
findConfig(CONFIG_VIEW_EXTENSIONS, vObject, function(oConfig) {
|
|
178
|
-
oResultConfig = oConfig[sViewName] && oConfig[sViewName][sExtensionPointName];
|
|
179
|
-
return !!oResultConfig;
|
|
180
|
-
});
|
|
181
|
-
return oResultConfig;
|
|
182
|
-
},
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* returns the configuration of the controller extensions for the given
|
|
186
|
-
* controller name
|
|
187
|
-
* @private
|
|
188
|
-
*/
|
|
189
|
-
getControllerExtension: function(sControllerName, vObject) {
|
|
190
|
-
var oResultConfig;
|
|
191
|
-
findConfig(CONFIG_CONTROLLER_EXTENSIONS, vObject, function(oConfig) {
|
|
192
|
-
oResultConfig = oConfig[sControllerName];
|
|
193
|
-
return !!oResultConfig;
|
|
194
|
-
});
|
|
195
|
-
return oResultConfig;
|
|
196
|
-
},
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* returns the configuration of the controller replacement for the given
|
|
200
|
-
* controller name
|
|
201
|
-
* @private
|
|
202
|
-
*/
|
|
203
|
-
getControllerReplacement: function(sControllerName, vObject) {
|
|
204
|
-
var oResultConfig;
|
|
205
|
-
findConfig(CONFIG_CONTROLLER_REPLACEMENTS, vObject, function(oConfig) {
|
|
206
|
-
oResultConfig = oConfig[sControllerName];
|
|
207
|
-
return !!oResultConfig;
|
|
208
|
-
});
|
|
209
|
-
return oResultConfig;
|
|
210
|
-
},
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* currently returns an object (or undefined) because we assume there is
|
|
214
|
-
* only one property modified and only once
|
|
215
|
-
* @private
|
|
216
|
-
*/
|
|
217
|
-
getCustomProperties: function(sViewName, sControlId, vObject) { // TODO: Fragments and Views are mixed here
|
|
218
|
-
var mSettings;
|
|
219
|
-
// TODO: checking order of components?
|
|
220
|
-
findConfig(CONFIG_VIEW_MODIFICATIONS, vObject, function(oConfig) {
|
|
221
|
-
var oSettings = oConfig[sViewName] && oConfig[sViewName][sControlId];
|
|
222
|
-
var oUsedSettings = {};
|
|
223
|
-
var bValidConfigFound = false;
|
|
224
|
-
var vValue, sName;
|
|
225
|
-
if (oSettings) {
|
|
226
|
-
for (sName in oSettings) {
|
|
227
|
-
vValue = oSettings[sName];
|
|
228
|
-
if (sName === "visible") {
|
|
229
|
-
bValidConfigFound = true;
|
|
230
|
-
oUsedSettings[sName] = vValue;
|
|
231
|
-
Log.info("Customizing: custom value for property '" + sName + "' of control '" + sControlId + "' in View '" + sViewName + "' applied: " + vValue);
|
|
232
|
-
} else {
|
|
233
|
-
Log.warning("Customizing: custom value for property '" + sName + "' of control '" + sControlId + "' in View '" + sViewName + "' ignored: only the 'visible' property can be customized.");
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
if (bValidConfigFound) { // initialize only when there is actually something to add
|
|
237
|
-
mSettings = mSettings || {}; // merge with any previous calls to findConfig in case of multiple definition sections
|
|
238
|
-
extend(mSettings, oUsedSettings); // FIXME: this currently overrides customizations from different components in random order
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
return mSettings;
|
|
243
|
-
},
|
|
244
|
-
|
|
245
|
-
hasCustomProperties: function(sViewName, vObject) {
|
|
246
|
-
var mSettings = {};
|
|
247
|
-
findConfig(CONFIG_VIEW_MODIFICATIONS, vObject, function(oConfig) {
|
|
248
|
-
if (oConfig[sViewName]) {
|
|
249
|
-
mSettings = oConfig[sViewName];
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
return !isEmptyObject(mSettings);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
// when the customizing is disabled all the functions will be noop
|
|
258
|
-
if (sap.ui.getCore().getConfiguration().getDisableCustomizing()) {
|
|
259
|
-
Log.info("CustomizingConfiguration: disabling Customizing now");
|
|
260
|
-
for (var sName in CustomizingConfiguration) {
|
|
261
|
-
if (typeof CustomizingConfiguration[sName] === "function") {
|
|
262
|
-
CustomizingConfiguration[sName] = function() {};
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
10
|
+
Log.error(
|
|
11
|
+
"Since UI5 version 1.95, the private module 'sap/ui/core/CustomizingConfiguration' is functionally inactive. " +
|
|
12
|
+
"Please be aware that this module has always been a private API and any monkey patching on this module will have no further effect. " +
|
|
13
|
+
"You must remove the dependency to this file as this module will be removed in one of the following versions of UI5."
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* For now this module only exists for compatibility reasons.
|
|
18
|
+
*
|
|
19
|
+
* Since UI5 version 1.92 the majority of the CustomizingConfiguration
|
|
20
|
+
* has been replaced with direct look-ups into the respective Components' manifests.
|
|
21
|
+
* The last usages for "sap.ui.viewExtensions" have been removed with 1.95.
|
|
22
|
+
*
|
|
23
|
+
* Any existing monkey patches of the internal functions have no further effect.
|
|
24
|
+
*
|
|
25
|
+
* While this module has always been private, some applications have modeled a dependency nonetheless.
|
|
26
|
+
* For now, we have decided not to forcefully break these dependencies, but to keep this
|
|
27
|
+
* as an empty module with the above error logging.
|
|
28
|
+
*
|
|
29
|
+
* This empty module will be removed in future versions.
|
|
30
|
+
*/
|
|
31
|
+
var CustomizingConfiguration = {
|
|
32
|
+
log: function() {},
|
|
33
|
+
activateForComponent: function() {},
|
|
34
|
+
deactivateForComponent: function() {},
|
|
35
|
+
activateForComponentInstance: function() {},
|
|
36
|
+
deactivateForComponentInstance: function() {},
|
|
37
|
+
getViewReplacement: function() {},
|
|
38
|
+
getViewExtension: function() {},
|
|
39
|
+
getControllerExtension: function() {},
|
|
40
|
+
getControllerReplacement: function() {},
|
|
41
|
+
getCustomProperties: function() {},
|
|
42
|
+
hasCustomProperties: function() {}
|
|
43
|
+
};
|
|
269
44
|
|
|
270
45
|
return CustomizingConfiguration;
|
|
271
46
|
|
|
@@ -40,7 +40,7 @@ sap.ui.define([
|
|
|
40
40
|
* @class Static class for enabling declarative UI support.
|
|
41
41
|
*
|
|
42
42
|
* @author Peter Muessig, Tino Butz
|
|
43
|
-
* @version 1.
|
|
43
|
+
* @version 1.96.2
|
|
44
44
|
* @since 1.7.0
|
|
45
45
|
* @public
|
|
46
46
|
* @alias sap.ui.core.DeclarativeSupport
|
|
@@ -187,7 +187,8 @@ sap.ui.define([
|
|
|
187
187
|
|
|
188
188
|
var sType = $element.attr("data-sap-ui-type");
|
|
189
189
|
if (sType) {
|
|
190
|
-
|
|
190
|
+
// make sure fnClass.getMatadata() is available
|
|
191
|
+
var fnClass = sap.ui.requireSync(sType.replace(/\./g, "/")); // legacy-relevant
|
|
191
192
|
fnClass = fnClass || ObjectPath.get(sType);
|
|
192
193
|
assert(typeof fnClass !== "undefined", "Class not found: " + sType);
|
|
193
194
|
|
|
@@ -126,7 +126,7 @@ sap.ui.define([
|
|
|
126
126
|
*
|
|
127
127
|
* @extends sap.ui.base.ManagedObject
|
|
128
128
|
* @author SAP SE
|
|
129
|
-
* @version 1.
|
|
129
|
+
* @version 1.96.2
|
|
130
130
|
* @public
|
|
131
131
|
* @alias sap.ui.core.Element
|
|
132
132
|
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
*
|
|
24
24
|
* @class
|
|
25
25
|
* @author SAP SE
|
|
26
|
-
* @version 1.
|
|
26
|
+
* @version 1.96.2
|
|
27
27
|
* @since 0.8.6
|
|
28
28
|
* @alias sap.ui.core.ElementMetadata
|
|
29
29
|
* @extends sap.ui.base.ManagedObjectMetadata
|
|
@@ -99,8 +99,10 @@ sap.ui.define([
|
|
|
99
99
|
name: sRendererName
|
|
100
100
|
};
|
|
101
101
|
});
|
|
102
|
+
|
|
103
|
+
// Relevant for all controls that don't maintain the renderer module in their dependencies
|
|
102
104
|
this._oRenderer =
|
|
103
|
-
sap.ui.requireSync(sRendererName.replace(/\./g, "/"))
|
|
105
|
+
sap.ui.requireSync(sRendererName.replace(/\./g, "/")) // legacy-relevant
|
|
104
106
|
|| ObjectPath.get(sRendererName);
|
|
105
107
|
|
|
106
108
|
return this._oRenderer;
|
|
@@ -4,102 +4,78 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
// Provides
|
|
8
|
-
sap.ui.define([
|
|
9
|
-
function(Control) {
|
|
7
|
+
// Provides mixin sap.ui.core.EnabledPropagator
|
|
8
|
+
sap.ui.define([], function() {
|
|
10
9
|
"use strict";
|
|
11
10
|
|
|
12
|
-
|
|
13
11
|
/**
|
|
14
|
-
*
|
|
12
|
+
* Mixin for enhancement of a control prototype with propagation of the <code>enabled</code> property.
|
|
13
|
+
*
|
|
14
|
+
* Controls that apply this mixin calculate their effective <code>enabled</code> state on read access
|
|
15
|
+
* as the logical OR of their own <code>enabled</code> property and the <code>enabled</code> state
|
|
16
|
+
* of the nearest ancestor control which has either an <code>enabled</code> property or a
|
|
17
|
+
* <code>getEnabled</code> method.
|
|
18
|
+
*
|
|
19
|
+
* Applying this mixin adds the <code>enabled</code> property, if it not already exists, to the control
|
|
20
|
+
* metadata.
|
|
21
|
+
*
|
|
22
|
+
* Also adds the <code>useEnabledPropagator(boolean)</code> helper method to the prototype of the given control.
|
|
23
|
+
* <code>myControlInstance.useEnabledPropagator(false)</code> can be used to prevent a single instance from using
|
|
24
|
+
* <code>EnabledPropagator</code>. In this case, the effective <code>enabled</code> state does not take any
|
|
25
|
+
* ancestors <code>enabled</code> state into account, only the control's own <code>enabled</code> property.
|
|
15
26
|
*
|
|
16
|
-
* Example
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
27
|
+
* @example <caption>Usage Example:</caption>
|
|
28
|
+
* sap.ui.define(["sap/ui/core/Control", "sap/ui/core/EnabledPropagator"], function(Control, EnabledPropagator) {
|
|
29
|
+
* "use strict";
|
|
30
|
+
* var MyControl = Control.extend("my.MyControl", {
|
|
31
|
+
* metadata : {
|
|
32
|
+
* //...
|
|
33
|
+
* }
|
|
34
|
+
* //...
|
|
35
|
+
* });
|
|
24
36
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
37
|
+
* EnabledPropagator.apply(MyControl.prototype);
|
|
38
|
+
*
|
|
39
|
+
* return MyControl;
|
|
40
|
+
* });
|
|
41
|
+
*
|
|
42
|
+
* @param {boolean} [bDefault=true] Value that should be used as default value for the enhancement of the control.
|
|
43
|
+
* @param {boolean} [bLegacy=false] Whether the introduced property should use the old name <code>Enabled</code>.
|
|
44
|
+
* @version 1.96.2
|
|
30
45
|
* @public
|
|
46
|
+
* @class
|
|
31
47
|
* @alias sap.ui.core.EnabledPropagator
|
|
32
48
|
*/
|
|
33
49
|
var EnabledPropagator = function(bDefault, bLegacy) {
|
|
34
50
|
// Ensure only Controls are enhanced
|
|
35
|
-
if (!
|
|
36
|
-
throw new Error("EnabledPropagator only supports subclasses of Control");
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// default for the default
|
|
40
|
-
if ( bDefault === undefined ) {
|
|
41
|
-
bDefault = true;
|
|
51
|
+
if (!this.isA || !this.isA("sap.ui.core.Control")) {
|
|
52
|
+
throw new Error("EnabledPropagator only supports subclasses of Control");
|
|
42
53
|
}
|
|
43
54
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
*
|
|
47
|
-
* @param {sap.ui.core.Control} oControl the control itself
|
|
48
|
-
* @return {sap.ui.core.Control} The nearest parent control that has getEnabled() method implemented
|
|
49
|
-
* @private
|
|
50
|
-
*/
|
|
51
|
-
function findParentWithEnabled(oControl) {
|
|
52
|
-
var oParent = oControl.getParent();
|
|
53
|
-
while (oParent && !oParent.getEnabled && oParent.getParent) {
|
|
54
|
-
oParent = oParent.getParent();
|
|
55
|
-
}
|
|
56
|
-
return oParent;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Moves the focus to the nearest parent that is focusable when the control that is going to be disabled
|
|
61
|
-
* (bEnabled === false) currently has the focus. This is done to prevent the focus from being set to the body
|
|
62
|
-
* tag
|
|
63
|
-
*
|
|
64
|
-
* @param {sap.ui.core.Control} oControl the control that is going to be enabled/disalbed
|
|
65
|
-
* @param {boolean} bEnabled whether the control is going to be enabled
|
|
66
|
-
* @private
|
|
67
|
-
*/
|
|
68
|
-
function checkAndMoveFocus(oControl, bEnabled) {
|
|
69
|
-
var oDomRef = oControl.getDomRef(),
|
|
70
|
-
oFocusableParent;
|
|
71
|
-
|
|
72
|
-
if (!bEnabled && oDomRef && oDomRef.contains(document.activeElement)) {
|
|
73
|
-
oFocusableParent = oControl.$().parent().closest(":focusable")[0];
|
|
74
|
-
|
|
75
|
-
if (oFocusableParent) {
|
|
76
|
-
oFocusableParent.focus({
|
|
77
|
-
preventScroll: true
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
55
|
+
// Marker for the EnabledPropagator
|
|
56
|
+
this._bUseEnabledPropagator = true;
|
|
82
57
|
|
|
83
58
|
// Ensure not to overwrite existing implementations.
|
|
84
|
-
|
|
59
|
+
var fnOrigGet = this.getEnabled;
|
|
60
|
+
if (fnOrigGet === undefined) {
|
|
85
61
|
// set some default
|
|
86
62
|
this.getEnabled = function() {
|
|
87
|
-
|
|
88
|
-
return (oParent && oParent.getEnabled && !oParent.getEnabled()) ? false : this.getProperty("enabled");
|
|
63
|
+
return (this._bUseEnabledPropagator && hasDisabledAncestor(this)) ? false : this.getProperty("enabled");
|
|
89
64
|
};
|
|
90
65
|
|
|
66
|
+
// Default for the bDefault
|
|
67
|
+
bDefault = (bDefault === undefined) ? true : Boolean(bDefault);
|
|
68
|
+
|
|
91
69
|
if ( bLegacy ) {
|
|
92
70
|
// add Enabled with old spelling for compatibility reasons. Shares the getter and setter with new spelling.
|
|
93
|
-
this.getMetadata().addProperty("Enabled", {type : "boolean", group : "Behavior", defaultValue :
|
|
71
|
+
this.getMetadata().addProperty("Enabled", {type : "boolean", group : "Behavior", defaultValue : bDefault});
|
|
94
72
|
}
|
|
95
|
-
this.getMetadata().addProperty("enabled", {type : "boolean", group : "Behavior", defaultValue :
|
|
96
|
-
this.getMetadata().addPublicMethods(
|
|
73
|
+
this.getMetadata().addProperty("enabled", {type : "boolean", group : "Behavior", defaultValue : bDefault});
|
|
74
|
+
this.getMetadata().addPublicMethods("getEnabled");
|
|
97
75
|
|
|
98
76
|
} else {
|
|
99
|
-
var fnOrigGet = this.getEnabled;
|
|
100
77
|
this.getEnabled = function() {
|
|
101
|
-
|
|
102
|
-
return (oParent && oParent.getEnabled && !oParent.getEnabled()) ? false : fnOrigGet.apply(this);
|
|
78
|
+
return (this._bUseEnabledPropagator && hasDisabledAncestor(this)) ? false : fnOrigGet.apply(this, arguments);
|
|
103
79
|
};
|
|
104
80
|
}
|
|
105
81
|
|
|
@@ -109,7 +85,7 @@ sap.ui.define(['./Control'],
|
|
|
109
85
|
return this.setProperty("enabled", bEnabled);
|
|
110
86
|
};
|
|
111
87
|
|
|
112
|
-
this.getMetadata().addPublicMethods(
|
|
88
|
+
this.getMetadata().addPublicMethods("setEnabled");
|
|
113
89
|
} else {
|
|
114
90
|
var fnOrigSet = this.setEnabled;
|
|
115
91
|
|
|
@@ -118,8 +94,50 @@ sap.ui.define(['./Control'],
|
|
|
118
94
|
return fnOrigSet.apply(this, arguments);
|
|
119
95
|
};
|
|
120
96
|
}
|
|
97
|
+
|
|
98
|
+
// enhance with the helper method to exclude a single instance from being use of EnabledPropagator
|
|
99
|
+
this.useEnabledPropagator = function(bUseEnabledPropagator) {
|
|
100
|
+
this._bUseEnabledPropagator = bUseEnabledPropagator;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
this.getMetadata().addPublicMethods("useEnabledPropagator");
|
|
121
104
|
};
|
|
122
105
|
|
|
106
|
+
/**
|
|
107
|
+
* Determines whether an ancestor of the provided control implements getEnabled method and that returns false
|
|
108
|
+
*
|
|
109
|
+
* @param {sap.ui.core.Control} oControl A control instance
|
|
110
|
+
* @returns {boolean} Whether any control implements getEnabled method and that returns false
|
|
111
|
+
* @private
|
|
112
|
+
*/
|
|
113
|
+
function hasDisabledAncestor(oControl) {
|
|
114
|
+
for (var oParent = oControl.getParent(); oParent && !oParent.getEnabled && oParent.getParent; oParent = oParent.getParent()) {/* empty */}
|
|
115
|
+
return oParent && oParent.getEnabled && !oParent.getEnabled();
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Moves the focus to the nearest ancestor that is focusable when the control that is going to be disabled
|
|
120
|
+
* (bEnabled === false) currently has the focus. This is done to prevent the focus from being set to the body
|
|
121
|
+
* tag
|
|
122
|
+
*
|
|
123
|
+
* @param {sap.ui.core.Control} oControl the control that is going to be enabled/disalbed
|
|
124
|
+
* @param {boolean} bEnabled whether the control is going to be enabled
|
|
125
|
+
* @private
|
|
126
|
+
*/
|
|
127
|
+
function checkAndMoveFocus(oControl, bEnabled) {
|
|
128
|
+
var oDomRef = oControl.getDomRef();
|
|
129
|
+
|
|
130
|
+
if (!bEnabled && oDomRef && oDomRef.contains(document.activeElement)) {
|
|
131
|
+
var oFocusableAncestor = oControl.$().parent().closest(":focusable")[0];
|
|
132
|
+
|
|
133
|
+
if (oFocusableAncestor) {
|
|
134
|
+
oFocusableAncestor.focus({
|
|
135
|
+
preventScroll: true
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
123
141
|
return EnabledPropagator;
|
|
124
142
|
|
|
125
143
|
}, /* bExport= */ true);
|
|
@@ -70,7 +70,7 @@ sap.ui.define(["sap/base/Log", "sap/base/util/ObjectPath", "sap/ui/core/mvc/View
|
|
|
70
70
|
* @private
|
|
71
71
|
*/
|
|
72
72
|
ExtensionPoint._factory = function(oContainer, sExtName, fnCreateDefaultContent, oTargetControl, sAggregationName, bAsync) {
|
|
73
|
-
var oExtensionConfig, oView, vResult, sViewOrFragmentName
|
|
73
|
+
var oExtensionConfig, oView, vResult, sViewOrFragmentName;
|
|
74
74
|
|
|
75
75
|
// do we have a view to check or do we need to check for configuration for a fragment?
|
|
76
76
|
if (oContainer) {
|
|
@@ -83,18 +83,11 @@ sap.ui.define(["sap/base/Log", "sap/base/util/ObjectPath", "sap/ui/core/mvc/View
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
// if customizing is enabled we read the extension-point from the merged manifests of the owner component
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
if (!oOwnerComponent) {
|
|
92
|
-
throw new Error("getExtensionComponent() must return an instance.");
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
oExtensionConfig = oOwnerComponent._getManifestEntry("/sap.ui5/extends/extensions/sap.ui.viewExtensions/" + sViewOrFragmentName + "/" + sExtName, true);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
86
|
+
oExtensionConfig = Component.getCustomizing(oContainer, {
|
|
87
|
+
type: "sap.ui.viewExtensions",
|
|
88
|
+
name: sViewOrFragmentName,
|
|
89
|
+
extensionName: sExtName
|
|
90
|
+
});
|
|
98
91
|
}
|
|
99
92
|
|
|
100
93
|
// Extension Point - is something configured?
|
|
@@ -137,7 +130,7 @@ sap.ui.define(["sap/base/Log", "sap/base/util/ObjectPath", "sap/ui/core/mvc/View
|
|
|
137
130
|
});
|
|
138
131
|
}
|
|
139
132
|
} else {
|
|
140
|
-
Fragment = Fragment || sap.ui.requireSync("sap/ui/core/Fragment");
|
|
133
|
+
Fragment = Fragment || sap.ui.requireSync("sap/ui/core/Fragment"); // legacy-relevant: Sync path
|
|
141
134
|
var oFragment = new Fragment(oFactoryConfig);
|
|
142
135
|
// make sure vResult is at least an empty array, if a Fragment is configured, the default content is not added
|
|
143
136
|
vResult = (Array.isArray(oFragment) ? oFragment : [oFragment]);
|