@openui5/sap.ui.core 1.134.0 → 1.135.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/.dtsgenrc +32 -0
- package/THIRDPARTY.txt +2 -2
- 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 +1 -1
- package/src/sap/base/config.js +1 -1
- package/src/sap/base/i18n/LanguageFallback.js +344 -0
- package/src/sap/base/i18n/LanguageTag.js +1 -1
- package/src/sap/base/i18n/Localization.js +9 -4
- package/src/sap/base/i18n/ResourceBundle.js +40 -313
- package/src/sap/base/i18n/date/TimezoneUtils.js +1 -1
- 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 +3 -3
- package/src/sap/ui/Global.js +3 -3
- package/src/sap/ui/VersionInfo.js +24 -9
- 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 +108 -91
- 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 +1 -1
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +52 -6
- package/src/sap/ui/core/ComponentContainer.js +4 -2
- 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/Control.js +1 -1
- package/src/sap/ui/core/Core.js +11 -3
- package/src/sap/ui/core/CustomData.js +2 -2
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +14 -35
- package/src/sap/ui/core/ElementHooks.js +35 -0
- package/src/sap/ui/core/ElementMetadata.js +1 -1
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/Fragment.js +34 -11
- 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/IconPool.js +11 -12
- 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/Lib.js +12 -32
- 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 +67 -93
- package/src/sap/ui/core/Manifest.js +5 -3
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/RenderManager.js +1 -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/ShortcutHintsMixin.js +9 -0
- package/src/sap/ui/core/Theming.js +98 -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 +6 -3
- 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/XMLTemplateProcessor.js +5 -1
- package/src/sap/ui/core/_CommandPool.js +80 -0
- package/src/sap/ui/core/boot/KeyboardInteractionEndpoint.js +124 -0
- 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/FieldHelp.js +90 -48
- package/src/sap/ui/core/fieldhelp/FieldHelpCustomData.js +0 -4
- package/src/sap/ui/core/format/FormatUtils.js +1 -1
- 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/i18n/interaction.xml +31 -0
- package/src/sap/ui/core/interaction/KeyboardInteractionDisplay.js +332 -0
- package/src/sap/ui/core/library.js +6 -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 +1 -1
- 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.properties +14 -0
- package/src/sap/ui/core/messagebundle_ro.properties +2 -2
- package/src/sap/ui/core/messagebundle_th.properties +1 -1
- package/src/sap/ui/core/messagebundle_vi.properties +2 -2
- package/src/sap/ui/core/mvc/Controller.js +25 -11
- 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 +43 -18
- package/src/sap/ui/core/mvc/XMLView.js +20 -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/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/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/support/techinfo/moduleTreeHelper.js +12 -0
- package/src/sap/ui/core/support/usage/EventBroadcaster.js +5 -5
- package/src/sap/ui/core/themes/base/base.less +398 -23
- package/src/sap/ui/core/themes/base/global.less +7 -0
- package/src/sap/ui/core/themes/base/icons/favicon.ico +0 -0
- package/src/sap/ui/core/themes/base/skeleton.less +11 -4
- package/src/sap/ui/core/themes/sap_hcb/.theming +2 -1
- package/src/sap/ui/core/theming/ThemeHelper.js +13 -0
- package/src/sap/ui/core/theming/ThemeManager.js +1 -1
- 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/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/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/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.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 +5 -2
- 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/ODataModel.js +36 -21
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/Context.js +88 -33
- package/src/sap/ui/model/odata/v4/ODataBinding.js +15 -9
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +4 -4
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +84 -17
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +63 -4
- package/src/sap/ui/model/odata/v4/ODataModel.js +14 -2
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +5 -2
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +3 -2
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +24 -6
- package/src/sap/ui/model/odata/v4/lib/_Batch.js +5 -1
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +30 -11
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +33 -17
- 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/TestUtils.js +1 -1
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader.js +19 -3
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/ui/core/Lib"
|
|
9
|
+
], function(Library) {
|
|
10
|
+
"use strict";
|
|
11
|
+
|
|
12
|
+
// Standarized SAP commands with their respective shortcuts and descriptions.
|
|
13
|
+
const mSapCommands = {
|
|
14
|
+
"sap:share": {
|
|
15
|
+
shortcut: "Ctrl+Shift+S",
|
|
16
|
+
description: "{{SAP_SHARE}}"
|
|
17
|
+
},
|
|
18
|
+
"sap:create": {
|
|
19
|
+
shortcut: "Ctrl+Enter",
|
|
20
|
+
description: "{{SAP_CREATE}}"
|
|
21
|
+
},
|
|
22
|
+
"sap:edit": {
|
|
23
|
+
shortcut: "Ctrl+E",
|
|
24
|
+
description: "{{SAP_EDIT}}"
|
|
25
|
+
},
|
|
26
|
+
"sap:save": {
|
|
27
|
+
shortcut: "Ctrl+S",
|
|
28
|
+
description: "{{SAP_SAVE}}"
|
|
29
|
+
},
|
|
30
|
+
"sap:delete": {
|
|
31
|
+
shortcut: "Ctrl+D",
|
|
32
|
+
description: "{{SAP_DELETE}}"
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const _rManifestTemplate = /\{\{([^\}\}]+)\}\}/g;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Module for resolving command references in the manifest.
|
|
40
|
+
*
|
|
41
|
+
* The resolve function processes command references and resolves them with their predefined shortcuts
|
|
42
|
+
* if available in the SAP standard commands.
|
|
43
|
+
*
|
|
44
|
+
* @private
|
|
45
|
+
*/
|
|
46
|
+
return {
|
|
47
|
+
/**
|
|
48
|
+
* Resolves command references in the given manifest object.
|
|
49
|
+
*
|
|
50
|
+
* @param {sap.ui.core.Manifest} oManifest The manifest object containing command configurations.
|
|
51
|
+
* @throws {TypeError} Throws and error if an invalid command reference is encountered.
|
|
52
|
+
*/
|
|
53
|
+
resolve(oManifest) {
|
|
54
|
+
const mCommands = oManifest.getEntry("/sap.ui5/commands") || {};
|
|
55
|
+
|
|
56
|
+
Object.keys(mCommands).forEach((sCommand) => {
|
|
57
|
+
const oObject = mCommands[sCommand];
|
|
58
|
+
|
|
59
|
+
if (oObject.ref) {
|
|
60
|
+
if (oObject.shortcut) {
|
|
61
|
+
throw new TypeError(`If a command reference 'ref' is specified in the 'sap.ui5/commands' section of the manifest, the 'shortcut' property must be omitted.`);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const sValue = oObject.ref;
|
|
65
|
+
const oSapCommand = mSapCommands[sValue];
|
|
66
|
+
if (!oSapCommand) {
|
|
67
|
+
throw new TypeError(`The given reference '${sValue}' in the 'sap.ui5/commands' section of the manifest is not valid.`);
|
|
68
|
+
}
|
|
69
|
+
oObject.ref = undefined; // resolve with shortcut
|
|
70
|
+
oObject.shortcut = oSapCommand.shortcut;
|
|
71
|
+
|
|
72
|
+
if (!oObject.description) { // Description from manifest always wins
|
|
73
|
+
const oResourceBundle = Library.getResourceBundleFor("sap.ui.core");
|
|
74
|
+
oObject.description = oSapCommand.description.replace(_rManifestTemplate, (sMatch, sI18nKey) => oResourceBundle.getText(sI18nKey));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
});
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
sap.ui.define([
|
|
7
|
+
"sap/base/Log"
|
|
8
|
+
], function(Log) {
|
|
9
|
+
"use strict";
|
|
10
|
+
|
|
11
|
+
let pShortcutInfo;
|
|
12
|
+
|
|
13
|
+
function loadKeyboardInteractionInfo() {
|
|
14
|
+
pShortcutInfo ??= new Promise((resolve, reject) => {
|
|
15
|
+
sap.ui.require(["sap/ui/core/interaction/KeyboardInteractionDisplay"], resolve, reject);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
return pShortcutInfo;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const mRegistry = new Map(); // Store {id -> { origin, port }}
|
|
22
|
+
|
|
23
|
+
const mActions = {
|
|
24
|
+
/**
|
|
25
|
+
* Handles the request for a message port and either returns an existing port or creates a new one.
|
|
26
|
+
*
|
|
27
|
+
* @param {MessageEvent} oEvent The message event triggered when a message is received.
|
|
28
|
+
*/
|
|
29
|
+
"sap.ui.interaction.RequestMessagePort": (oEvent) => {
|
|
30
|
+
const oData = oEvent.data;
|
|
31
|
+
const sId = oData?.id;
|
|
32
|
+
|
|
33
|
+
if (!sId) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const oKnownRequestor = mRegistry.get(sId);
|
|
38
|
+
if (oKnownRequestor) {
|
|
39
|
+
oEvent.source.postMessage({ service: "sap.ui.interaction.MessagePortReady"}, oEvent.origin, [oKnownRequestor.port]);
|
|
40
|
+
} else {
|
|
41
|
+
const oChannel = new MessageChannel();
|
|
42
|
+
|
|
43
|
+
// register id with origin and port
|
|
44
|
+
mRegistry.set(sId, {
|
|
45
|
+
origin: oEvent.origin,
|
|
46
|
+
port: oChannel.port2
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// Listen for messages on port1
|
|
50
|
+
oChannel.port1.onmessage = (oEvent) => {
|
|
51
|
+
const oData = oEvent.data;
|
|
52
|
+
const sService = oData?.service;
|
|
53
|
+
const fnAction = mActions[sService];
|
|
54
|
+
|
|
55
|
+
if (fnAction) {
|
|
56
|
+
fnAction(oEvent, oChannel.port1);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// Send port2 to requestor
|
|
61
|
+
oEvent.source.postMessage({ service: "sap.ui.interaction.MessagePortReady"}, oEvent.origin, [oChannel.port2]);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Starts the display of keyboard interaction information
|
|
68
|
+
*
|
|
69
|
+
* @param {MessageEvent} _ Unused event parameter
|
|
70
|
+
* @param {MessagePort} oPort The message port to communicate with.
|
|
71
|
+
*/
|
|
72
|
+
"sap.ui.interaction.StartDisplay": async (_, oPort) => {
|
|
73
|
+
const KeyboardInteractionInfo = await loadKeyboardInteractionInfo();
|
|
74
|
+
await KeyboardInteractionInfo.activate(oPort);
|
|
75
|
+
},
|
|
76
|
+
/**
|
|
77
|
+
* Stops the display of keyboard interaction information.
|
|
78
|
+
*
|
|
79
|
+
* @param {MessageEvent} _ Unused event parameter.
|
|
80
|
+
*/
|
|
81
|
+
"sap.ui.interaction.StopDisplay": async (_) => {
|
|
82
|
+
const KeyboardInteractionInfo = await loadKeyboardInteractionInfo();
|
|
83
|
+
KeyboardInteractionInfo.deactivate();
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Listens for incoming post messages and starts the display of keyboard interaction information
|
|
89
|
+
* based on the service name received in the message.
|
|
90
|
+
*
|
|
91
|
+
* @param {MessageEvent} oEvent the message event triggered when a message is received.
|
|
92
|
+
*/
|
|
93
|
+
window.addEventListener("message", (oEvent) => {
|
|
94
|
+
const sService = oEvent?.data?.service;
|
|
95
|
+
const fnAction = mActions[sService];
|
|
96
|
+
|
|
97
|
+
// only process messages with a known name
|
|
98
|
+
if (fnAction) {
|
|
99
|
+
const sBootstrapOrigin = new URL(sap.ui.require.toUrl(""), document.baseURI)?.origin;
|
|
100
|
+
|
|
101
|
+
// TODO: This implementation currently only supports the FE scenario, see FIORITECHP1-24625
|
|
102
|
+
if (oEvent.origin !== document.location.origin &&
|
|
103
|
+
oEvent.origin !== sBootstrapOrigin) {
|
|
104
|
+
|
|
105
|
+
Log.error(`Received message from an unauthorized origin: ${oEvent.origin}.`);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
fnAction?.(oEvent);
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Initializes the module that sets up the listener for incoming postmessage events.
|
|
115
|
+
* This listener handles the activation and display of keyboard interaction information.
|
|
116
|
+
*
|
|
117
|
+
* @private
|
|
118
|
+
*/
|
|
119
|
+
return {
|
|
120
|
+
run: function() {
|
|
121
|
+
return Promise.resolve();
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
});
|
|
@@ -82,7 +82,7 @@ sap.ui.define([
|
|
|
82
82
|
* @param {Element[]} aItemDomRefs Array of DOM references representing the items for the navigation
|
|
83
83
|
* @param {boolean} [bNotInTabChain=false] Whether the selected element should be in the tab chain or not
|
|
84
84
|
*
|
|
85
|
-
* @version 1.
|
|
85
|
+
* @version 1.135.0
|
|
86
86
|
* @alias sap.ui.core.delegate.ItemNavigation
|
|
87
87
|
* @public
|
|
88
88
|
*/
|
|
@@ -61,7 +61,7 @@ sap.ui.define([
|
|
|
61
61
|
*
|
|
62
62
|
* @protected
|
|
63
63
|
* @alias sap.ui.core.delegate.ScrollEnablement
|
|
64
|
-
* @version 1.
|
|
64
|
+
* @version 1.135.0
|
|
65
65
|
* @author SAP SE
|
|
66
66
|
*/
|
|
67
67
|
var ScrollEnablement = BaseObject.extend("sap.ui.core.delegate.ScrollEnablement", /** @lends sap.ui.core.delegate.ScrollEnablement.prototype */ {
|
|
@@ -22,6 +22,27 @@ sap.ui.define([
|
|
|
22
22
|
let oFieldHelp;
|
|
23
23
|
const sURNPrefix = "urn:sap-com:documentation:key?=";
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Returns whether the two given sets are identical.
|
|
27
|
+
*
|
|
28
|
+
* @param {Set<any>} oSet0 The first set
|
|
29
|
+
* @param {Set<any>} oSet1 The second set
|
|
30
|
+
* @returns {boolean} Whether the given sets are identical
|
|
31
|
+
*/
|
|
32
|
+
function isSetIdentical(oSet0, oSet1) {
|
|
33
|
+
if (oSet0.size !== oSet1.size) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
for (const oItem of oSet0) {
|
|
38
|
+
if (!oSet1.has(oItem)) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
25
46
|
/**
|
|
26
47
|
* Replacement for <code>ManagedObject.prototype.updateFieldHelp</code> to update the field help information
|
|
27
48
|
* for the given control property name of <code>this</code> control instance, if the corresponding binding has been
|
|
@@ -92,20 +113,20 @@ sap.ui.define([
|
|
|
92
113
|
#fnUpdateHotspotsCallback = null;
|
|
93
114
|
|
|
94
115
|
/**
|
|
95
|
-
* Maps a control ID to an object mapping a control property to
|
|
116
|
+
* Maps a control ID to an object mapping a control property to an array of back-end help key URNs.
|
|
96
117
|
*
|
|
97
118
|
* @default {}
|
|
98
119
|
* @type {Object<string, Object<string, string[]>>}
|
|
99
120
|
*/
|
|
100
|
-
|
|
121
|
+
mDocuRefControlToFieldHelp = {};
|
|
101
122
|
|
|
102
123
|
/**
|
|
103
|
-
* A
|
|
124
|
+
* A boolean that is <code>true</code> as long as the hotspots are updated.
|
|
104
125
|
*
|
|
105
|
-
* @default
|
|
106
|
-
* @type {
|
|
126
|
+
* @default false
|
|
127
|
+
* @type {boolean}
|
|
107
128
|
*/
|
|
108
|
-
#
|
|
129
|
+
#bUpdateHotspotsPending = false;
|
|
109
130
|
|
|
110
131
|
/**
|
|
111
132
|
* @typedef {Map<string,Map<string,string>>} sap.ui.core.fieldhelp.Text2IdByType
|
|
@@ -464,10 +485,10 @@ sap.ui.define([
|
|
|
464
485
|
*/
|
|
465
486
|
_getFieldHelpDisplayMapping() {
|
|
466
487
|
const mControlIDToDisplayControlID = {};
|
|
467
|
-
for (const sControlID in this
|
|
488
|
+
for (const sControlID in this.mDocuRefControlToFieldHelp) {
|
|
468
489
|
const oControl = Element.getElementById(sControlID);
|
|
469
490
|
if (!oControl) { // control has been destroyed, cleanup internal data structure
|
|
470
|
-
delete this
|
|
491
|
+
delete this.mDocuRefControlToFieldHelp[sControlID];
|
|
471
492
|
continue;
|
|
472
493
|
}
|
|
473
494
|
|
|
@@ -485,29 +506,63 @@ sap.ui.define([
|
|
|
485
506
|
return mControlIDToDisplayControlID;
|
|
486
507
|
}
|
|
487
508
|
|
|
509
|
+
/**
|
|
510
|
+
* Returns the map of control ID to the corresponding set of documentation reference URNs.
|
|
511
|
+
*
|
|
512
|
+
* The method considers the following precedence for <em>explicit</em> field help set using
|
|
513
|
+
* <code>FieldHelpUtil.setDocumentationRef</code> or <code>FieldHelpCustomData</code> and <em>implicit</em>
|
|
514
|
+
* field help derived from OData bindings.
|
|
515
|
+
* 1. Explicit field help on the control itself
|
|
516
|
+
* 2. Explicit field help defined for controls pointing to the control as field help display control
|
|
517
|
+
* 3. Union of implicit field helps defined on the control itself and controls pointing to the control as field
|
|
518
|
+
* help display control
|
|
519
|
+
*
|
|
520
|
+
* @returns {Map<string, Set<string>>}
|
|
521
|
+
* The map of control ID to the corresponding set of documentation reference URNs
|
|
522
|
+
*/
|
|
523
|
+
_getDisplayControlIDToURNs() {
|
|
524
|
+
const mControlIDToDisplayControlID = this._getFieldHelpDisplayMapping();
|
|
525
|
+
const mExplicitDisplay = new Map();
|
|
526
|
+
const mExplicitSelf = new Map();
|
|
527
|
+
const mImplicit = new Map();
|
|
528
|
+
|
|
529
|
+
for (const sControlID in this.mDocuRefControlToFieldHelp) {
|
|
530
|
+
const sDisplayControlID = mControlIDToDisplayControlID[sControlID] || sControlID;
|
|
531
|
+
const aDocuRefsForControl = this.mDocuRefControlToFieldHelp[sControlID][undefined];
|
|
532
|
+
if (aDocuRefsForControl) { // explicit field help
|
|
533
|
+
const oURNSet = new Set(aDocuRefsForControl);
|
|
534
|
+
if (mControlIDToDisplayControlID[sControlID]) { // on display control
|
|
535
|
+
const oExistingURNSet = mExplicitDisplay.get(sDisplayControlID);
|
|
536
|
+
if (oExistingURNSet && !isSetIdentical(oURNSet, oExistingURNSet)) {
|
|
537
|
+
Log.error("Cannot display field help for control '" + sControlID
|
|
538
|
+
+ "': different field help already set on hotspot '" + sDisplayControlID + "'",
|
|
539
|
+
undefined, sClassName);
|
|
540
|
+
continue;
|
|
541
|
+
}
|
|
542
|
+
mExplicitDisplay.set(sDisplayControlID, oURNSet);
|
|
543
|
+
} else { // on control itself
|
|
544
|
+
mExplicitSelf.set(sDisplayControlID, oURNSet);
|
|
545
|
+
}
|
|
546
|
+
} else {
|
|
547
|
+
const aDocuRefs = Object.values(this.mDocuRefControlToFieldHelp[sControlID]).flat();
|
|
548
|
+
// add to a Set to filter duplicates
|
|
549
|
+
const oURNSet = mImplicit.get(sDisplayControlID) ?? new Set();
|
|
550
|
+
aDocuRefs.forEach(oURNSet.add.bind(oURNSet));
|
|
551
|
+
mImplicit.set(sDisplayControlID, oURNSet);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
return new Map([...mImplicit, ...mExplicitDisplay, ...mExplicitSelf]);
|
|
556
|
+
}
|
|
557
|
+
|
|
488
558
|
/**
|
|
489
559
|
* Gets an array of field help hotspots as required by the SAP Companion.
|
|
490
560
|
*
|
|
491
561
|
* @returns {module:sap/ui/core/fieldhelp/FieldHelpInfo[]} The array of field help hotspots
|
|
492
562
|
*/
|
|
493
563
|
_getFieldHelpHotspots() {
|
|
494
|
-
const mControlIDToDisplayControlID = this._getFieldHelpDisplayMapping();
|
|
495
|
-
const mDisplayControlIDToURNs = new Map();
|
|
496
564
|
const aFieldHelpHotspots = [];
|
|
497
|
-
|
|
498
|
-
const sDisplayControlID = mControlIDToDisplayControlID[sControlID] || sControlID;
|
|
499
|
-
const oURNSet = mDisplayControlIDToURNs.get(sDisplayControlID)
|
|
500
|
-
?? mDisplayControlIDToURNs.set(sDisplayControlID, new Set()).get(sDisplayControlID);
|
|
501
|
-
const aDocuRefsForControl = this.#mDocuRefControlToFieldHelp[sControlID][undefined];
|
|
502
|
-
const aDocuRefs = aDocuRefsForControl
|
|
503
|
-
? [aDocuRefsForControl]
|
|
504
|
-
: Object.values(this.#mDocuRefControlToFieldHelp[sControlID]);
|
|
505
|
-
aDocuRefs.forEach((aURNs) => {
|
|
506
|
-
aURNs.forEach(oURNSet.add.bind(oURNSet)); // add to the Set to filter duplicates
|
|
507
|
-
});
|
|
508
|
-
});
|
|
509
|
-
|
|
510
|
-
for (const [sDisplayControlID, oURNSet] of mDisplayControlIDToURNs) {
|
|
565
|
+
for (const [sDisplayControlID, oURNSet] of this._getDisplayControlIDToURNs()) {
|
|
511
566
|
const oControl = Element.getElementById(sDisplayControlID);
|
|
512
567
|
const sLabel = LabelEnablement._getLabelTexts(oControl)[0];
|
|
513
568
|
if (!sLabel) {
|
|
@@ -548,16 +603,16 @@ sap.ui.define([
|
|
|
548
603
|
*/
|
|
549
604
|
_setFieldHelpDocumentationRefs(oElement, sControlProperty, aDocumentationRefs) {
|
|
550
605
|
const sControlID = oElement.getId();
|
|
551
|
-
this
|
|
606
|
+
this.mDocuRefControlToFieldHelp[sControlID] ||= {};
|
|
552
607
|
if (aDocumentationRefs.length > 0) {
|
|
553
|
-
this
|
|
608
|
+
this.mDocuRefControlToFieldHelp[sControlID][sControlProperty] = aDocumentationRefs;
|
|
554
609
|
} else {
|
|
555
|
-
delete this
|
|
556
|
-
if (Object.keys(this
|
|
557
|
-
delete this
|
|
610
|
+
delete this.mDocuRefControlToFieldHelp[sControlID][sControlProperty];
|
|
611
|
+
if (Object.keys(this.mDocuRefControlToFieldHelp[sControlID]).length === 0) {
|
|
612
|
+
delete this.mDocuRefControlToFieldHelp[sControlID];
|
|
558
613
|
}
|
|
559
614
|
}
|
|
560
|
-
this._updateHotspots()
|
|
615
|
+
this._updateHotspots();
|
|
561
616
|
}
|
|
562
617
|
|
|
563
618
|
/**
|
|
@@ -581,34 +636,21 @@ sap.ui.define([
|
|
|
581
636
|
/**
|
|
582
637
|
* Calls the <code>fnUpdateHotspotsCallback</code> as given in {@link #activate} asynchronously with the latest
|
|
583
638
|
* field help hotspots.
|
|
584
|
-
*
|
|
585
|
-
* @returns {Promise<undefined>}
|
|
586
|
-
* A Promise that resolves when the <code>fnUpdateHotspotsCallback</code> as given in {@link #activate} has
|
|
587
|
-
* been called with the latest field help hotspots; rejects if the field help has been deactivated in between.
|
|
588
639
|
*/
|
|
589
640
|
_updateHotspots() {
|
|
590
|
-
if (this.#
|
|
591
|
-
return
|
|
641
|
+
if (this.#bUpdateHotspotsPending) {
|
|
642
|
+
return;
|
|
592
643
|
}
|
|
593
|
-
|
|
594
|
-
this.#oUpdateHotspotsPromise = new Promise((resolve, reject) => {
|
|
595
|
-
fnResolve = resolve;
|
|
596
|
-
fnReject = reject;
|
|
597
|
-
});
|
|
644
|
+
this.#bUpdateHotspotsPending = true;
|
|
598
645
|
|
|
599
646
|
// gather and send field help info in task so that e.g. field help can be displayed at a column header
|
|
600
647
|
setTimeout(() => {
|
|
601
648
|
if (this.isActive()) {
|
|
602
649
|
this.#fnUpdateHotspotsCallback(this._getFieldHelpHotspots());
|
|
603
650
|
this.#mMetaModel2TextMappingPromise.clear();
|
|
604
|
-
fnResolve();
|
|
605
|
-
} else {
|
|
606
|
-
fnReject();
|
|
607
651
|
}
|
|
608
|
-
this.#
|
|
652
|
+
this.#bUpdateHotspotsPending = false;
|
|
609
653
|
}, 0);
|
|
610
|
-
|
|
611
|
-
return this.#oUpdateHotspotsPromise;
|
|
612
654
|
}
|
|
613
655
|
|
|
614
656
|
/**
|
|
@@ -706,7 +748,7 @@ sap.ui.define([
|
|
|
706
748
|
*/
|
|
707
749
|
deactivate() {
|
|
708
750
|
this.#bActive = false;
|
|
709
|
-
this
|
|
751
|
+
this.mDocuRefControlToFieldHelp = {};
|
|
710
752
|
this.#fnUpdateHotspotsCallback = null;
|
|
711
753
|
this.#mMetaModel2TextMappingPromise.clear();
|
|
712
754
|
this.#mMetamodel2TextPropertyInfo.clear();
|
|
@@ -44,10 +44,6 @@ sap.ui.define([
|
|
|
44
44
|
if (oParent
|
|
45
45
|
&& oCustomData.getKey() === FieldHelpCustomData.DOCUMENTATION_REF_KEY
|
|
46
46
|
&& Array.isArray(oCustomData.getValue())) {
|
|
47
|
-
// For elements, for which the field help information is set manually (e.g. filter fields), the
|
|
48
|
-
// field help has to be displayed at that element, even if there are child bindings (e.g. value help)
|
|
49
|
-
// that also contribute to the field help information
|
|
50
|
-
oParent.setFieldHelpDisplay(oParent);
|
|
51
47
|
oParent.updateFieldHelp?.();
|
|
52
48
|
}
|
|
53
49
|
}
|
|
@@ -401,7 +401,7 @@ sap.ui.define([
|
|
|
401
401
|
* @see {@link topic:6322164936f047de941ec522b95d7b70 Hyphenation for Text Controls}
|
|
402
402
|
* @extends sap.ui.base.ManagedObject
|
|
403
403
|
* @author SAP SE
|
|
404
|
-
* @version 1.
|
|
404
|
+
* @version 1.135.0
|
|
405
405
|
* @hideconstructor
|
|
406
406
|
* @public
|
|
407
407
|
* @since 1.60
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<interaction-documentation
|
|
2
|
+
xmlns="http://schemas.sap.com/sapui5/extension/sap.ui.core.InteractionDocumentation/1"
|
|
3
|
+
library="sap.ui.core">
|
|
4
|
+
<control-interactions>
|
|
5
|
+
<control name="sap.ui.core.Control"></control>
|
|
6
|
+
<interaction>
|
|
7
|
+
<kbd>Tab</kbd>
|
|
8
|
+
<description>
|
|
9
|
+
<p>Moves focus to the next element in the tab chain.</p>
|
|
10
|
+
</description>
|
|
11
|
+
</interaction>
|
|
12
|
+
<interaction>
|
|
13
|
+
<kbd>Shift + Tab</kbd>
|
|
14
|
+
<description>
|
|
15
|
+
<p>Moves focus to the previous element in the tab chain.</p>
|
|
16
|
+
</description>
|
|
17
|
+
</interaction>
|
|
18
|
+
<interaction>
|
|
19
|
+
<kbd>F6</kbd>
|
|
20
|
+
<description>
|
|
21
|
+
<p>Moves focus to first element of the next UI group (F6 group) in the tab chain.</p>
|
|
22
|
+
</description>
|
|
23
|
+
</interaction>
|
|
24
|
+
<interaction>
|
|
25
|
+
<kbd>Shift + F6</kbd>
|
|
26
|
+
<description>
|
|
27
|
+
<p>Moves focus to first element of the previous UI group (F6 group) in the tab chain.</p>
|
|
28
|
+
</description>
|
|
29
|
+
</interaction>
|
|
30
|
+
</control-interactions>
|
|
31
|
+
</interaction-documentation>
|