@openui5/sap.ui.core 1.130.0 → 1.131.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/THIRDPARTY.txt +1 -1
- package/package.json +1 -1
- package/src/jquery.sap.global.js +1 -1
- 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/sap/base/Event.js +1 -1
- package/src/sap/base/Eventing.js +3 -2
- package/src/sap/base/config.js +1 -1
- package/src/sap/base/i18n/LanguageTag.js +1 -1
- package/src/sap/base/i18n/date/CalendarType.js +3 -1
- package/src/sap/base/i18n/date/CalendarWeekNumbering.js +3 -1
- package/src/sap/base/i18n/date/TimezoneUtils.js +1 -1
- package/src/sap/base/i18n/date/_EnumHelper.js +43 -0
- package/src/sap/base/util/clamp.js +26 -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 +11 -8
- package/src/sap/ui/Global.js +3 -3
- package/src/sap/ui/base/BindingInfo.js +4 -2
- package/src/sap/ui/base/DataType.js +7 -2
- package/src/sap/ui/base/Event.js +1 -1
- package/src/sap/ui/base/EventProvider.js +1 -1
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +1 -1
- 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 +1 -1
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/core/.library +3 -3
- package/src/sap/ui/core/BlockLayerUtils.js +17 -29
- package/src/sap/ui/core/BusyIndicator.js +2 -15
- package/src/sap/ui/core/BusyIndicatorUtils.js +34 -3
- package/src/sap/ui/core/Component.js +1 -1
- package/src/sap/ui/core/ComponentContainer.js +1 -1
- package/src/sap/ui/core/ComponentMetadata.js +1 -1
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Configuration.js +1 -1
- package/src/sap/ui/core/ContextMenuSupport.js +2 -1
- package/src/sap/ui/core/Control.js +46 -10
- package/src/sap/ui/core/ControlBehavior.js +14 -18
- package/src/sap/ui/core/Core.js +2 -2
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +230 -32
- package/src/sap/ui/core/ElementMetadata.js +1 -1
- package/src/sap/ui/core/EnabledPropagator.js +4 -4
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/FocusMode.js +28 -0
- package/src/sap/ui/core/Fragment.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/src/sap/ui/core/LocaleData.js +3 -3
- package/src/sap/ui/core/Manifest.js +2 -2
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Popup.js +12 -0
- package/src/sap/ui/core/RenderManager.js +4 -1
- package/src/sap/ui/core/Renderer.js +1 -1
- package/src/sap/ui/core/ResizeHandler.js +1 -1
- package/src/sap/ui/core/ScrollBar.js +1 -1
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
- package/src/sap/ui/core/_IconRegistry.js +1 -0
- package/src/sap/ui/core/cldr/ca.json +1 -1
- package/src/sap/ui/core/cldr/cs.json +1 -1
- package/src/sap/ui/core/cldr/es.json +2 -2
- package/src/sap/ui/core/cldr/es_AR.json +2 -2
- package/src/sap/ui/core/cldr/es_BO.json +2 -2
- package/src/sap/ui/core/cldr/es_CL.json +2 -2
- package/src/sap/ui/core/cldr/es_CO.json +2 -2
- package/src/sap/ui/core/cldr/es_PE.json +2 -2
- package/src/sap/ui/core/cldr/es_UY.json +2 -2
- package/src/sap/ui/core/cldr/es_VE.json +2 -2
- package/src/sap/ui/core/cldr/fi.json +1 -1
- package/src/sap/ui/core/cldr/hu.json +1 -1
- package/src/sap/ui/core/cldr/id.json +2 -2
- package/src/sap/ui/core/cldr/mk.json +2 -2
- package/src/sap/ui/core/cldr/tr.json +1 -1
- package/src/sap/ui/core/cldr/vi.json +2 -2
- package/src/sap/ui/core/date/CalendarWeekNumbering.js +1 -1
- package/src/sap/ui/core/date/UI5Date.js +1 -1
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
- 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 +1 -1
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/fieldhelp/FieldHelpCustomData.js +5 -1
- package/src/sap/ui/core/format/FormatUtils.js +1 -1
- package/src/sap/ui/core/format/NumberFormat.js +38 -17
- package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
- package/src/sap/ui/core/getCompatibilityVersion.js +1 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +23 -19
- 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 +1 -1
- package/src/sap/ui/core/message/MessageMixin.js +5 -2
- 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_no.properties +1 -1
- package/src/sap/ui/core/mvc/HTMLView.js +1 -1
- package/src/sap/ui/core/mvc/JSONView.js +1 -1
- package/src/sap/ui/core/mvc/JSView.js +1 -1
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +1 -1
- package/src/sap/ui/core/mvc/XMLView.js +1 -1
- 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/Target.js +5 -5
- 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/Plugin.js +1 -1
- package/src/sap/ui/core/support/Support.js +1 -1
- package/src/sap/ui/core/support/bootstrapFallback.js +1 -0
- package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
- package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +1 -1
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
- package/src/sap/ui/core/support/plugins/Trace.js +1 -1
- package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
- package/src/sap/ui/core/themes/base/LocalBusyIndicator.less +1 -0
- package/src/sap/ui/core/themes/base/base.less +1353 -247
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.ttf +0 -0
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
- package/src/sap/ui/core/themes/base/global.less +32 -0
- package/src/sap/ui/core/themes/base/skeleton.less +93 -3
- package/src/sap/ui/core/theming/ThemeManager.js +2 -2
- 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 +1 -1
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- 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 +1 -1
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- 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/webc/WebComponent.js +1 -1
- package/src/sap/ui/core/webc/WebComponentMetadata.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 +1 -1
- package/src/sap/ui/debug/DebugEnv.js +1 -1
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/ClientTreeBinding.js +32 -19
- package/src/sap/ui/model/CompositeDataState.js +1 -1
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/DataState.js +1 -1
- package/src/sap/ui/model/Filter.js +2 -1
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +1 -1
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/Sorter.js +61 -31
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/TreeBinding.js +21 -17
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +13 -7
- package/src/sap/ui/model/base/ManagedObjectModel.js +1 -1
- package/src/sap/ui/model/json/JSONModel.js +1 -1
- package/src/sap/ui/model/message/MessageModel.js +1 -1
- package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
- package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/ODataMetadata.js +16 -6
- package/src/sap/ui/model/odata/ODataModel.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/DateTimeWithTimezone.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 +1 -1
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +7 -4
- package/src/sap/ui/model/odata/v2/ODataModel.js +14 -10
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/Context.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataBinding.js +1 -0
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +6 -1
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +74 -11
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +93 -19
- package/src/sap/ui/model/odata/v4/ODataModel.js +49 -8
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +3 -1
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +2 -1
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +12 -1
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +51 -30
- package/src/sap/ui/model/odata/v4/lib/_MetadataRequestor.js +49 -31
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +8 -26
- package/src/sap/ui/model/resource/ResourceModel.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +1 -1
- package/src/sap/ui/model/type/Currency.js +1 -1
- package/src/sap/ui/model/type/Date.js +1 -1
- package/src/sap/ui/model/type/DateInterval.js +1 -1
- package/src/sap/ui/model/type/DateTime.js +1 -1
- package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
- package/src/sap/ui/model/type/FileSize.js +1 -1
- package/src/sap/ui/model/type/Float.js +1 -1
- package/src/sap/ui/model/type/Integer.js +1 -1
- package/src/sap/ui/model/type/String.js +1 -1
- package/src/sap/ui/model/type/Time.js +1 -1
- package/src/sap/ui/model/type/TimeInterval.js +1 -1
- package/src/sap/ui/model/type/Unit.js +1 -1
- package/src/sap/ui/model/xml/XMLModel.js +1 -1
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
- package/src/sap/ui/test/OpaBuilder.js +1 -1
- package/src/sap/ui/test/autowaiter/_promiseWaiter.js +21 -0
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/test/starter/_utils.js +8 -1
- package/src/sap/ui/test/starter/createSuite.js +1 -1
- package/src/sap/ui/thirdparty/less.js +23 -72
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader.js +9 -4
- package/test/sap/ui/qunit/TestRunner.js +2 -0
|
@@ -42,7 +42,7 @@ sap.ui.define([
|
|
|
42
42
|
/**
|
|
43
43
|
* The theme scoping change Event.
|
|
44
44
|
*
|
|
45
|
-
* @typedef {
|
|
45
|
+
* @typedef {object} module:sap/ui/core/ControlBehavior$ChangeEvent
|
|
46
46
|
* @property {string} animationMode Whether the animation mode should be active or not.
|
|
47
47
|
* @private
|
|
48
48
|
* @ui5-restricted sap.ui.core.theming.ThemeManager
|
|
@@ -103,27 +103,23 @@ sap.ui.define([
|
|
|
103
103
|
* @since 1.120
|
|
104
104
|
*/
|
|
105
105
|
getAnimationMode: () => {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
});
|
|
112
|
-
const bAnimation = oWritableConfig.get({
|
|
106
|
+
/**
|
|
107
|
+
* "animation" option is deprecated as of 1.50
|
|
108
|
+
* @ui5-transform-hint replace-local undefined
|
|
109
|
+
*/
|
|
110
|
+
const sOldAnimationMode = oWritableConfig.get({
|
|
113
111
|
name: "sapUiAnimation",
|
|
114
112
|
type: BaseConfig.Type.Boolean,
|
|
115
|
-
defaultValue:
|
|
113
|
+
defaultValue: undefined,
|
|
114
|
+
external: true
|
|
115
|
+
}) === false ? AnimationMode.minimal : undefined;
|
|
116
|
+
|
|
117
|
+
return oWritableConfig.get({
|
|
118
|
+
name: "sapUiAnimationMode",
|
|
119
|
+
type: AnimationMode,
|
|
120
|
+
defaultValue: sOldAnimationMode ?? AnimationMode.full,
|
|
116
121
|
external: true
|
|
117
122
|
});
|
|
118
|
-
if (sAnimationMode === undefined) {
|
|
119
|
-
if (bAnimation) {
|
|
120
|
-
sAnimationMode = AnimationMode.full;
|
|
121
|
-
} else {
|
|
122
|
-
sAnimationMode = AnimationMode.minimal;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
BaseConfig._.checkEnum(AnimationMode, sAnimationMode, "animationMode");
|
|
126
|
-
return sAnimationMode;
|
|
127
123
|
},
|
|
128
124
|
|
|
129
125
|
/**
|
package/src/sap/ui/core/Core.js
CHANGED
|
@@ -118,7 +118,7 @@ sap.ui.define([
|
|
|
118
118
|
* @private
|
|
119
119
|
* @ui5-restricted sap.ui.core, sap.ui.test
|
|
120
120
|
*/
|
|
121
|
-
const sVersion = "1.
|
|
121
|
+
const sVersion = "1.131.0";
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
124
|
* The buildinfo.
|
|
@@ -443,7 +443,7 @@ sap.ui.define([
|
|
|
443
443
|
* @extends sap.ui.base.Object
|
|
444
444
|
* @final
|
|
445
445
|
* @author SAP SE
|
|
446
|
-
* @version 1.
|
|
446
|
+
* @version 1.131.0
|
|
447
447
|
* @alias sap.ui.core.Core
|
|
448
448
|
* @public
|
|
449
449
|
* @hideconstructor
|
|
@@ -10,6 +10,7 @@ sap.ui.define([
|
|
|
10
10
|
'../base/Object',
|
|
11
11
|
'../base/ManagedObject',
|
|
12
12
|
'./ElementMetadata',
|
|
13
|
+
'./FocusMode',
|
|
13
14
|
'../Device',
|
|
14
15
|
"sap/ui/dom/findTabbable",
|
|
15
16
|
"sap/ui/performance/trace/Interaction",
|
|
@@ -30,6 +31,7 @@ sap.ui.define([
|
|
|
30
31
|
BaseObject,
|
|
31
32
|
ManagedObject,
|
|
32
33
|
ElementMetadata,
|
|
34
|
+
FocusMode,
|
|
33
35
|
Device,
|
|
34
36
|
findTabbable,
|
|
35
37
|
Interaction,
|
|
@@ -138,7 +140,7 @@ sap.ui.define([
|
|
|
138
140
|
*
|
|
139
141
|
* @extends sap.ui.base.ManagedObject
|
|
140
142
|
* @author SAP SE
|
|
141
|
-
* @version 1.
|
|
143
|
+
* @version 1.131.0
|
|
142
144
|
* @public
|
|
143
145
|
* @alias sap.ui.core.Element
|
|
144
146
|
*/
|
|
@@ -559,7 +561,7 @@ sap.ui.define([
|
|
|
559
561
|
} else if (sPropertyName === "visible") {
|
|
560
562
|
ManagedObject.prototype.setProperty.apply(this, arguments);
|
|
561
563
|
if (vValue === false && this.getDomRef()?.contains(document.activeElement)) {
|
|
562
|
-
Element.fireFocusFail.call(this,
|
|
564
|
+
Element.fireFocusFail.call(this, FocusMode.RENDERING_PENDING);
|
|
563
565
|
}
|
|
564
566
|
}
|
|
565
567
|
|
|
@@ -567,6 +569,8 @@ sap.ui.define([
|
|
|
567
569
|
};
|
|
568
570
|
|
|
569
571
|
function _focusTarget(oOriginalDomRef, oFocusTarget) {
|
|
572
|
+
// In the meantime, the focus could be set somewhere else.
|
|
573
|
+
// If that element is focusable, then we don't steal the focus from it
|
|
570
574
|
if (oOriginalDomRef?.contains(document.activeElement) || !jQuery(document.activeElement).is(":sapFocusable")) {
|
|
571
575
|
oFocusTarget?.focus({
|
|
572
576
|
preventScroll: true
|
|
@@ -577,14 +581,23 @@ sap.ui.define([
|
|
|
577
581
|
/**
|
|
578
582
|
* Handles the 'focusfail' event by attempting to find and focus on a tabbable element.
|
|
579
583
|
* The 'focusfail' event is triggered when the current element, which initially holds the focus,
|
|
580
|
-
* becomes disabled or
|
|
584
|
+
* becomes disabled, invisible, or destroyed. The event is received by the parent of the element that failed
|
|
581
585
|
* to retain the focus.
|
|
582
586
|
*
|
|
583
587
|
* @param {Event} oEvent - The event object containing the source element that failed to gain focus.
|
|
584
588
|
* @protected
|
|
585
589
|
*/
|
|
586
590
|
Element.prototype.onfocusfail = function(oEvent) {
|
|
587
|
-
|
|
591
|
+
// oEvent._skipArea is set when all controls in an aggregation are
|
|
592
|
+
// removed/destroyed (via 'removeAllAggregation'). We need to skip the
|
|
593
|
+
// entire aggregation area since all controls' DOM elements will be
|
|
594
|
+
// removed and no focusable element can be found within
|
|
595
|
+
// oEvent._skipArea
|
|
596
|
+
//
|
|
597
|
+
// oEvent._skipArea is used as start point when it exists and
|
|
598
|
+
// the following 'findTabbable' call starts with its next/previous
|
|
599
|
+
// sibling
|
|
600
|
+
let oDomRef = oEvent._skipArea || oEvent.srcControl.getDomRef();
|
|
588
601
|
const oOriginalDomRef = oDomRef;
|
|
589
602
|
|
|
590
603
|
let oParent = this;
|
|
@@ -595,16 +608,15 @@ sap.ui.define([
|
|
|
595
608
|
|
|
596
609
|
do {
|
|
597
610
|
if (oParentDomRef?.contains(oDomRef)) {
|
|
598
|
-
//
|
|
611
|
+
// Search for a tabbable element forward (to the right)
|
|
599
612
|
oRes = findTabbable(oDomRef, {
|
|
600
613
|
scope: oParentDomRef,
|
|
601
614
|
forward: true,
|
|
602
615
|
skipChild: true
|
|
603
616
|
});
|
|
604
617
|
|
|
605
|
-
//
|
|
618
|
+
// If no element is found, search backward (to the left)
|
|
606
619
|
if (oRes?.startOver) {
|
|
607
|
-
// search tabbable element to the left
|
|
608
620
|
oRes = findTabbable(oDomRef, {
|
|
609
621
|
scope: oParentDomRef,
|
|
610
622
|
forward: false
|
|
@@ -613,36 +625,43 @@ sap.ui.define([
|
|
|
613
625
|
|
|
614
626
|
oFocusTarget = oRes?.element;
|
|
615
627
|
|
|
628
|
+
// Reached the parent DOM which is tabbable, stop searching
|
|
616
629
|
if (oFocusTarget === oParentDomRef) {
|
|
617
|
-
// Reached the parent DOM which is tabbable
|
|
618
630
|
break;
|
|
619
631
|
}
|
|
620
632
|
|
|
621
|
-
//
|
|
633
|
+
// Move up to the parent's siblings
|
|
622
634
|
oDomRef = oParentDomRef;
|
|
623
635
|
oParent = oParent?.getParent();
|
|
624
636
|
oParentDomRef = oParent?.getDomRef?.();
|
|
625
637
|
} else {
|
|
626
|
-
//
|
|
638
|
+
// If the lost focus element is outside the parent, look for the parent's first focusable element
|
|
627
639
|
oFocusTarget = oParentDomRef && jQuery(oParentDomRef).firstFocusableDomRef();
|
|
628
640
|
break;
|
|
629
641
|
}
|
|
630
642
|
} while ((!oRes || oRes.startOver) && oDomRef);
|
|
631
643
|
|
|
644
|
+
// Apply focus to the found target
|
|
632
645
|
if (oFocusTarget) {
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
if (oEvent._bRenderingPending) {
|
|
636
|
-
Rendering.addPrerenderingTask(() => {
|
|
646
|
+
switch (oEvent.mode) {
|
|
647
|
+
case FocusMode.SYNC:
|
|
637
648
|
_focusTarget(oOriginalDomRef, oFocusTarget);
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
649
|
+
break;
|
|
650
|
+
|
|
651
|
+
case FocusMode.RENDERING_PENDING:
|
|
652
|
+
Rendering.addPrerenderingTask(() => {
|
|
653
|
+
_focusTarget(oOriginalDomRef, oFocusTarget);
|
|
654
|
+
});
|
|
655
|
+
break;
|
|
656
|
+
|
|
657
|
+
case FocusMode.DEFAULT:
|
|
658
|
+
default:
|
|
659
|
+
Promise.resolve().then(() => {
|
|
660
|
+
_focusTarget(oOriginalDomRef, oFocusTarget);
|
|
661
|
+
});
|
|
662
|
+
break;
|
|
643
663
|
}
|
|
644
664
|
}
|
|
645
|
-
|
|
646
665
|
};
|
|
647
666
|
|
|
648
667
|
Element.prototype.insertDependent = function(oElement, iIndex) {
|
|
@@ -668,6 +687,177 @@ sap.ui.define([
|
|
|
668
687
|
return this; // explicitly return 'this' to fix controls that override destroyAggregation wrongly
|
|
669
688
|
};
|
|
670
689
|
|
|
690
|
+
/**
|
|
691
|
+
* Helper to identify the entire aggregation area that should be skipped when searchin for focusable elements.
|
|
692
|
+
* If the currently focused element is part of the aggregation being removed or destroyed,
|
|
693
|
+
* the entire aggregation area needs to be skipped sinceh its DOM element will be removed
|
|
694
|
+
* leaving no focusable element within the aggregation.
|
|
695
|
+
*
|
|
696
|
+
* @param {sap.ui.core.ManagedObject[]} aChildren The children that belong to the aggregation
|
|
697
|
+
* @returns {HTMLElement|null} Returns the DOM which needs to be skipped, or 'null' if no relevant area is found.
|
|
698
|
+
*/
|
|
699
|
+
function searchAggregationAreaToSkip(aChildren) {
|
|
700
|
+
let oSkipArea = null;
|
|
701
|
+
|
|
702
|
+
for (let i = 0; i < aChildren.length; i++) {
|
|
703
|
+
const oChild = aChildren[i];
|
|
704
|
+
const oDomRef = oChild?.getDomRef?.();
|
|
705
|
+
|
|
706
|
+
if (oDomRef) {
|
|
707
|
+
if (!oSkipArea) {
|
|
708
|
+
oSkipArea = oDomRef.parentElement;
|
|
709
|
+
} else {
|
|
710
|
+
while (oSkipArea && !oSkipArea.contains(oDomRef)) {
|
|
711
|
+
oSkipArea = oSkipArea.parentElement;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
return oSkipArea;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* Determines if the DOM removal needs to be performed synchronously.
|
|
721
|
+
*
|
|
722
|
+
* @param {boolean|string} bSuppressInvalidate - Whether invalidation is suppressed. If set to "KeepDom", the DOM is retained.
|
|
723
|
+
* @param {boolean} bHasNoParent Whether the element has no parent. If true, it suggests that the element is being removed from the DOM tree.
|
|
724
|
+
* @returns {boolean} Returns true, if synchronous DOM removal is needed; otherwise 'false'.
|
|
725
|
+
*/
|
|
726
|
+
function needSyncDomRemoval(bSuppressInvalidate, bHasNoParent) {
|
|
727
|
+
const bKeepDom = (bSuppressInvalidate === "KeepDom");
|
|
728
|
+
const oDomRef = this.getDomRef();
|
|
729
|
+
|
|
730
|
+
// Conditions that require sync DOM removal
|
|
731
|
+
return (bSuppressInvalidate === true || // Explicit supression of invalidation
|
|
732
|
+
(!bKeepDom && bHasNoParent) || // No parent and DOM should not be kept
|
|
733
|
+
this.isA("sap.ui.core.PopupInterface") || // The element is a popup
|
|
734
|
+
RenderManager.isPreservedContent(oDomRef)); // The element is part of the 'preserve' area.
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Checks for a focused child within the provided children (array or single object)
|
|
739
|
+
* and fired the focus fail event if necessary.
|
|
740
|
+
*
|
|
741
|
+
* @param {sap.ui.base.ManagedObject[]|sap.ui.base.ManagedObject} vChildren The children to check. Can be an array or a single object.
|
|
742
|
+
* @param {boolean} bSuppressInvalidate If true, this ManagedObject is not marked as changed
|
|
743
|
+
*/
|
|
744
|
+
function checkAndFireFocusFail(vChildren, bSuppressInvalidate) {
|
|
745
|
+
let oFocusedChild = null;
|
|
746
|
+
let oSkipArea = null;
|
|
747
|
+
|
|
748
|
+
if (Array.isArray(vChildren)) {
|
|
749
|
+
for (let i = 0; i < vChildren.length; i++) {
|
|
750
|
+
const oChild = vChildren[i];
|
|
751
|
+
const oDomRef = oChild.getDomRef?.();
|
|
752
|
+
|
|
753
|
+
if (oDomRef?.contains(document.activeElement)) {
|
|
754
|
+
oFocusedChild = oChild;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
if (oFocusedChild) {
|
|
758
|
+
oSkipArea = searchAggregationAreaToSkip(vChildren);
|
|
759
|
+
}
|
|
760
|
+
} else if (vChildren instanceof ManagedObject) {
|
|
761
|
+
oFocusedChild = vChildren;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
if (!oFocusedChild) {
|
|
765
|
+
return;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
const oDomRef = oFocusedChild.getDomRef?.();
|
|
769
|
+
if (oDomRef?.contains?.(document.activeElement) && !bSuppressInvalidate) {
|
|
770
|
+
// Determin if the DOM removal needs to happen sync or async
|
|
771
|
+
const bSyncRemoval = needSyncDomRemoval.call(oFocusedChild, bSuppressInvalidate, !this);
|
|
772
|
+
const sFocusMode = bSyncRemoval ? FocusMode.SYNC : FocusMode.RENDERING_PENDING;
|
|
773
|
+
|
|
774
|
+
if (!this._bIsBeingDestroyed) {
|
|
775
|
+
Element.fireFocusFail.call(oFocusedChild, sFocusMode, this, oSkipArea);
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* Sets a new object in the named 0..1 aggregation of this ManagedObject and marks this ManagedObject as changed.
|
|
782
|
+
* Manages the focus handling if the current aggregation is removed (i.e., when the object is set to <code>null</code>).
|
|
783
|
+
* If the previous object in the aggregation was focused, a "focusfail" event is triggered.
|
|
784
|
+
*
|
|
785
|
+
* @param {string}
|
|
786
|
+
* sAggregationName name of an 0..1 aggregation
|
|
787
|
+
* @param {sap.ui.base.ManagedObject}
|
|
788
|
+
* oObject the managed object that is set as aggregated object
|
|
789
|
+
* @param {boolean}
|
|
790
|
+
* [bSuppressInvalidate=true] if true, this ManagedObject is not marked as changed
|
|
791
|
+
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
792
|
+
* @throws {Error}
|
|
793
|
+
* @protected
|
|
794
|
+
*/
|
|
795
|
+
Element.prototype.setAggregation = function(sAggregationName, oObject, bSuppressInvalidate) {
|
|
796
|
+
// Get current aggregation for the specified aggregation name before aggregation change
|
|
797
|
+
const oChild = this.getAggregation(sAggregationName);
|
|
798
|
+
|
|
799
|
+
// Call parent method to perform actual aggregation change
|
|
800
|
+
const vResult = ManagedObject.prototype.setAggregation.call(this, sAggregationName, oObject, bSuppressInvalidate);
|
|
801
|
+
if (oChild && oObject == null) {
|
|
802
|
+
checkAndFireFocusFail.call(this, oChild, bSuppressInvalidate);
|
|
803
|
+
}
|
|
804
|
+
return vResult;
|
|
805
|
+
};
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* Removes an object from the aggregation named <code>sAggregationName</code> with cardinality 0..n and manages
|
|
809
|
+
* focus handling in case the removed object was focused. If the removed object held the focus, a "focusfail" event
|
|
810
|
+
* is triggered to proper focus redirection.
|
|
811
|
+
*
|
|
812
|
+
* @param {string}
|
|
813
|
+
* sAggregationName the string identifying the aggregation that the given object should be removed from
|
|
814
|
+
* @param {int | string | sap.ui.base.ManagedObject}
|
|
815
|
+
* vObject the position or ID of the ManagedObject that should be removed or that ManagedObject itself;
|
|
816
|
+
* if <code>vObject</code> is invalid, a negative value or a value greater or equal than the current size
|
|
817
|
+
* of the aggregation, nothing is removed.
|
|
818
|
+
* @param {boolean}
|
|
819
|
+
* [bSuppressInvalidate=false] if true, this ManagedObject is not marked as changed
|
|
820
|
+
* @returns {sap.ui.base.ManagedObject|null} the removed object or <code>null</code>
|
|
821
|
+
* @protected
|
|
822
|
+
*/
|
|
823
|
+
Element.prototype.removeAggregation = function(sAggregationName, vObject, bSuppressInvalidate) {
|
|
824
|
+
const vResult = ManagedObject.prototype.removeAggregation.call(this, sAggregationName, vObject, bSuppressInvalidate);
|
|
825
|
+
checkAndFireFocusFail.call(this, vResult, bSuppressInvalidate);
|
|
826
|
+
return vResult;
|
|
827
|
+
};
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* Removes all child elements of a specified aggregation and handles focus management for elements that are currently focused.
|
|
831
|
+
* If the currently focused element belongs to the aggregation being removed, a "focusfail" event is triggered to shift the
|
|
832
|
+
* focus to a relevant element.
|
|
833
|
+
*
|
|
834
|
+
* @param {string} sAggregationName The name of the aggregation
|
|
835
|
+
* @param {boolean} [bSuppressInvalidate=false] If true, this ManagedObject is not marked as changed
|
|
836
|
+
* @returns {sap.ui.base.ManagedObject[]} An array of the removed elements (might be empty)
|
|
837
|
+
* @protected
|
|
838
|
+
*/
|
|
839
|
+
Element.prototype.removeAllAggregation = function(sAggregationName, bSuppressInvalidate) {
|
|
840
|
+
const aChildren = ManagedObject.prototype.removeAllAggregation.call(this, sAggregationName, bSuppressInvalidate);
|
|
841
|
+
checkAndFireFocusFail.call(this, aChildren, bSuppressInvalidate);
|
|
842
|
+
return aChildren;
|
|
843
|
+
};
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* Destroys all child elements of a specified aggregation and handles focus management for elements that are currently focused.
|
|
847
|
+
* If the currently focused element belongs to the aggregation being destroyed, a "focusfail" event is triggered to shift the
|
|
848
|
+
* focus to a relevant element.
|
|
849
|
+
*
|
|
850
|
+
* @param {string} sAggregationName The name of the aggregation
|
|
851
|
+
* @param {boolean} [bSuppressInvalidate=false] If true, this ManagedObject is not marked as changed
|
|
852
|
+
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
853
|
+
* @protected
|
|
854
|
+
*/
|
|
855
|
+
Element.prototype.destroyAggregation = function(sAggregationName, bSuppressInvalidate) {
|
|
856
|
+
const aChildren = this.getAggregation(sAggregationName);
|
|
857
|
+
checkAndFireFocusFail.call(this, aChildren, bSuppressInvalidate);
|
|
858
|
+
return ManagedObject.prototype.destroyAggregation.call(this, sAggregationName, bSuppressInvalidate);
|
|
859
|
+
};
|
|
860
|
+
|
|
671
861
|
/**
|
|
672
862
|
* This triggers immediate rerendering of its parent and thus of itself and its children.
|
|
673
863
|
*
|
|
@@ -700,18 +890,27 @@ sap.ui.define([
|
|
|
700
890
|
};
|
|
701
891
|
|
|
702
892
|
/**
|
|
703
|
-
* Fires a "focusfail" event
|
|
704
|
-
* The event is propagated to the parent of the current element
|
|
893
|
+
* Fires a "focusfail" event to handle focus redirection when the current element loses focus due to a state change
|
|
894
|
+
* (e.g., disabled, invisible, or destroyed). The event is propagated to the parent of the current element to manage
|
|
895
|
+
* the focus shift.
|
|
705
896
|
*
|
|
706
|
-
* @
|
|
897
|
+
* @param {string} sFocusHandlingMode The mode of focus handling, determining whether the focus should be handled sync or async.
|
|
898
|
+
* @param {sap.ui.core.Element} oParent The parent element that will handle the "focusfail" event.
|
|
899
|
+
* @param {HTMLElement} [oSkipArea=null] Optional DOM area to be skipped during focus redirection.
|
|
900
|
+
*
|
|
901
|
+
* @protected
|
|
707
902
|
*/
|
|
708
|
-
Element.fireFocusFail = function(
|
|
903
|
+
Element.fireFocusFail = function(sFocusHandlingMode, oParent, oSkipArea) {
|
|
709
904
|
const oEvent = jQuery.Event("focusfail");
|
|
710
905
|
oEvent.srcControl = this;
|
|
711
|
-
oEvent.
|
|
906
|
+
oEvent.mode = sFocusHandlingMode || FocusMode.DEFAULT;
|
|
907
|
+
oEvent._skipArea = oSkipArea;
|
|
712
908
|
|
|
713
|
-
|
|
714
|
-
|
|
909
|
+
oParent ??= this.getParent();
|
|
910
|
+
|
|
911
|
+
if (oParent && !oParent._bIsBeingDestroyed) {
|
|
912
|
+
oParent._handleEvent?.(oEvent);
|
|
913
|
+
}
|
|
715
914
|
};
|
|
716
915
|
|
|
717
916
|
/**
|
|
@@ -754,13 +953,12 @@ sap.ui.define([
|
|
|
754
953
|
// If parent invalidation is not possible, either bSuppressInvalidate=true or there is no parent to invalidate then we must remove the control DOM synchronously.
|
|
755
954
|
// Controls that implement marker interface sap.ui.core.PopupInterface are by contract not rendered by their parent so we cannot keep the DOM of these controls.
|
|
756
955
|
// If the control is destroyed while its content is in the preserved area then we must remove DOM synchronously since we cannot invalidate the preserved area.
|
|
757
|
-
|
|
758
|
-
if (bSuppressInvalidate === true || (!bKeepDom && bHasNoParent) || this.isA("sap.ui.core.PopupInterface") || RenderManager.isPreservedContent(oDomRef)) {
|
|
956
|
+
if (needSyncDomRemoval.call(this, bSuppressInvalidate, bHasNoParent)) {
|
|
759
957
|
jQuery(oDomRef).remove();
|
|
760
958
|
} else {
|
|
761
959
|
// Make sure that the control DOM won't get preserved after it is destroyed (even if bSuppressInvalidate="KeepDom")
|
|
762
960
|
oDomRef.removeAttribute("data-sap-ui-preserve");
|
|
763
|
-
if (
|
|
961
|
+
if (bSuppressInvalidate !== "KeepDom") {
|
|
764
962
|
// On destroy we do not remove the control DOM synchronously and just let the invalidation happen on the parent.
|
|
765
963
|
// At the next tick of the RenderManager, control DOM nodes will be removed via rerendering of the parent anyway.
|
|
766
964
|
// To make this new behavior more compatible we are changing the id of the control's DOM and all child nodes that start with the control id.
|
|
@@ -1197,8 +1395,8 @@ sap.ui.define([
|
|
|
1197
1395
|
// should not fire 'FocusFail' even when the oFocusDomRef isn't
|
|
1198
1396
|
// focusable because not all controls defines the 'getFocusDomRef'
|
|
1199
1397
|
// method properly
|
|
1200
|
-
if (oDomRef && !oDomRef.contains(document.activeElement)
|
|
1201
|
-
Element.fireFocusFail.call(this);
|
|
1398
|
+
if (oDomRef && !oDomRef.contains(document.activeElement) ) {
|
|
1399
|
+
Element.fireFocusFail.call(this, FocusMode.DEFAULT);
|
|
1202
1400
|
}
|
|
1203
1401
|
}
|
|
1204
1402
|
};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
// Provides mixin sap.ui.core.EnabledPropagator
|
|
8
|
-
sap.ui.define([], function() {
|
|
8
|
+
sap.ui.define(["./FocusMode"], function(FocusMode) {
|
|
9
9
|
"use strict";
|
|
10
10
|
|
|
11
11
|
let Element;
|
|
@@ -43,7 +43,7 @@ sap.ui.define([], function() {
|
|
|
43
43
|
*
|
|
44
44
|
* @param {boolean} [bDefault=true] Value that should be used as default value for the enhancement of the control.
|
|
45
45
|
* @param {boolean} [bLegacy=false] Whether the introduced property should use the old name <code>Enabled</code>.
|
|
46
|
-
* @version 1.
|
|
46
|
+
* @version 1.131.0
|
|
47
47
|
* @public
|
|
48
48
|
* @class
|
|
49
49
|
* @alias sap.ui.core.EnabledPropagator
|
|
@@ -87,7 +87,7 @@ sap.ui.define([], function() {
|
|
|
87
87
|
this.setProperty("enabled", bEnabled);
|
|
88
88
|
if (!bEnabled && this.getDomRef()?.contains(document.activeElement)) {
|
|
89
89
|
Element ??= sap.ui.require("sap/ui/core/Element");
|
|
90
|
-
Element?.fireFocusFail.call(this,
|
|
90
|
+
Element?.fireFocusFail.call(this, FocusMode.RENDERING_PENDING);
|
|
91
91
|
}
|
|
92
92
|
return this;
|
|
93
93
|
};
|
|
@@ -100,7 +100,7 @@ sap.ui.define([], function() {
|
|
|
100
100
|
fnOrigSet.apply(this, arguments);
|
|
101
101
|
if (!bEnabled && this.getDomRef()?.contains(document.activeElement)) {
|
|
102
102
|
Element ??= sap.ui.require("sap/ui/core/Element");
|
|
103
|
-
Element?.fireFocusFail.call(this,
|
|
103
|
+
Element?.fireFocusFail.call(this, FocusMode.RENDERING_PENDING);
|
|
104
104
|
}
|
|
105
105
|
return this;
|
|
106
106
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
sap.ui.define([], function() {
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
// Enum to handle the focus behavior, see Element#onfocusfail
|
|
10
|
+
const FocusMode = {
|
|
11
|
+
/**
|
|
12
|
+
* Synchronous focus mode: The focus should be applied immediately.
|
|
13
|
+
*/
|
|
14
|
+
"SYNC": "sync",
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Rendering pending mode: The focus should be applied before the next rendering.
|
|
18
|
+
*/
|
|
19
|
+
"RENDERING_PENDING": "rendering_pending",
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Default focus mode: Focus is deferred. Focus should be applied asynchronously.
|
|
23
|
+
*/
|
|
24
|
+
"DEFAULT": "default"
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
return FocusMode;
|
|
28
|
+
});
|
package/src/sap/ui/core/HTML.js
CHANGED
package/src/sap/ui/core/Icon.js
CHANGED
|
@@ -12,7 +12,7 @@ sap.ui.define([], function() {
|
|
|
12
12
|
* Provides the default renderer for the controls that have set their <code>visible</code> property to <code>false</code>.
|
|
13
13
|
*
|
|
14
14
|
* @author SAP SE
|
|
15
|
-
* @version 1.
|
|
15
|
+
* @version 1.131.0
|
|
16
16
|
* @alias module:sap/ui/core/InvisibleRenderer
|
|
17
17
|
* @since 1.66.0
|
|
18
18
|
* @protected
|
package/src/sap/ui/core/Item.js
CHANGED
|
@@ -192,7 +192,7 @@ sap.ui.define(['../base/ManagedObject', "sap/base/assert"],
|
|
|
192
192
|
* @see sap.ui.core.LabelEnablement#enrich
|
|
193
193
|
*
|
|
194
194
|
* @author SAP SE
|
|
195
|
-
* @version 1.
|
|
195
|
+
* @version 1.131.0
|
|
196
196
|
* @protected
|
|
197
197
|
* @alias sap.ui.core.LabelEnablement
|
|
198
198
|
* @namespace
|