@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
package/.dtsgenrc
CHANGED
|
@@ -151,6 +151,27 @@
|
|
|
151
151
|
}
|
|
152
152
|
]
|
|
153
153
|
},
|
|
154
|
+
{
|
|
155
|
+
"kind": "typedef",
|
|
156
|
+
"name": "sap.ui.core.mvc.ControllerExtension.Overrides",
|
|
157
|
+
"basename": "Overrides",
|
|
158
|
+
"resource": "sap/ui/core/mvc/ControllerExtension.js",
|
|
159
|
+
"module": "sap/ui/core/mvc/ControllerExtension",
|
|
160
|
+
"export": "Overrides",
|
|
161
|
+
"visibility": "public",
|
|
162
|
+
"type": {
|
|
163
|
+
"kind": "NativeTSTypeExpression",
|
|
164
|
+
"type": "{[key: string]: any} & Partial<Pick<(typeof Controller)[\"prototype\"], \"onAfterRendering\" | \"onBeforeRendering\" | \"onExit\" | \"onInit\">>"
|
|
165
|
+
},
|
|
166
|
+
"description": "The type of the `overrides` property"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"esmOnly": true,
|
|
170
|
+
"name": "sap.ui.core.mvc.ControllerExtension.Overrides",
|
|
171
|
+
"type": {
|
|
172
|
+
"type": "{[key: string]: any} & Partial<Pick<(typeof import(\"sap/ui/core/mvc/Controller\").default)[\"prototype\"], \"onAfterRendering\" | \"onBeforeRendering\" | \"onExit\" | \"onInit\">>"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
154
175
|
{
|
|
155
176
|
"name": "sap.ui.core.mvc.ControllerExtension",
|
|
156
177
|
"methods": [
|
|
@@ -225,6 +246,17 @@
|
|
|
225
246
|
"description": "An instance of the given <code>ControllerExtension</code>. <b>NOTE:</b> this is only a dummy return type for proper usage in TypeScript. This method does not actually return an instance of <code>ControllerExtension</code>, but only throws an error at runtime. The sole purpose of this method is to mimic the actual runtime behavior where a *class* is given when a controller is defined, but an *instance* is present in each controller instance."
|
|
226
247
|
}
|
|
227
248
|
}
|
|
249
|
+
],
|
|
250
|
+
"properties": [
|
|
251
|
+
{
|
|
252
|
+
"name": "overrides",
|
|
253
|
+
"static": true,
|
|
254
|
+
"visibility": "public",
|
|
255
|
+
"optional": true,
|
|
256
|
+
"readonly": true,
|
|
257
|
+
"type": "sap.ui.core.mvc.ControllerExtension.Overrides",
|
|
258
|
+
"description": "The <code>overrides</code> definition object, which is used to specify methods of the base class to override. The names of this object's properties are method names like <code>onInit</code> and the values are the respective implementation."
|
|
259
|
+
}
|
|
228
260
|
]
|
|
229
261
|
},
|
|
230
262
|
{
|
package/THIRDPARTY.txt
CHANGED
|
@@ -6,7 +6,7 @@ The full text of all referenced licenses is appended at the end of this file.
|
|
|
6
6
|
|
|
7
7
|
Library: sap.m:
|
|
8
8
|
|
|
9
|
-
Component: purify.js, version: 3.
|
|
9
|
+
Component: purify.js, version: 3.2.4
|
|
10
10
|
Copyright: Mario Heiderich
|
|
11
11
|
License: Apache-2.0
|
|
12
12
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
@@ -462,7 +462,7 @@ License: Apache-2.0
|
|
|
462
462
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
463
463
|
Contained in: lib/jsdoc/ui5/plugin.js
|
|
464
464
|
|
|
465
|
-
Component: SAP Theming Base Content, version: 11.
|
|
465
|
+
Component: SAP Theming Base Content, version: 11.28.2
|
|
466
466
|
Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
|
|
467
467
|
License: Apache-2.0
|
|
468
468
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
package/package.json
CHANGED
package/src/jquery.sap.global.js
CHANGED
|
@@ -73,7 +73,7 @@ sap.ui.define(['jquery.sap.global', 'sap/base/util/Properties'],
|
|
|
73
73
|
* {@link #setProperty} to store or change a value for a key and {@link #getKeys}
|
|
74
74
|
* can be used to retrieve an array of all keys that are currently stored in the collection.
|
|
75
75
|
*
|
|
76
|
-
* @version 1.
|
|
76
|
+
* @version 1.135.0
|
|
77
77
|
* @since 0.9.0
|
|
78
78
|
* @name jQuery.sap.util.Properties
|
|
79
79
|
* @public
|
package/src/jquery.sap.script.js
CHANGED
|
@@ -267,7 +267,7 @@ sap.ui.define([
|
|
|
267
267
|
* Use {@link jQuery.sap.getUriParameters} to create an instance of jQuery.sap.util.UriParameters.
|
|
268
268
|
*
|
|
269
269
|
* @author SAP SE
|
|
270
|
-
* @version 1.
|
|
270
|
+
* @version 1.135.0
|
|
271
271
|
* @since 0.9.0
|
|
272
272
|
* @name jQuery.sap.util.UriParameters
|
|
273
273
|
* @public
|
|
@@ -37,7 +37,7 @@ sap.ui.define([
|
|
|
37
37
|
* @param {string} [sIdPrefix] Prefix used for the Ids. If not set a default prefix is used.
|
|
38
38
|
* @returns {jQuery.sap.storage.Storage}
|
|
39
39
|
*
|
|
40
|
-
* @version 1.
|
|
40
|
+
* @version 1.135.0
|
|
41
41
|
* @since 0.11.0
|
|
42
42
|
* @namespace
|
|
43
43
|
* @public
|
|
@@ -98,7 +98,7 @@ sap.ui.define([
|
|
|
98
98
|
* should be deleted the method {@link #removeAll} should be used.
|
|
99
99
|
*
|
|
100
100
|
* @author SAP SE
|
|
101
|
-
* @version 1.
|
|
101
|
+
* @version 1.135.0
|
|
102
102
|
* @since 0.11.0
|
|
103
103
|
* @public
|
|
104
104
|
* @name jQuery.sap.storage.Storage
|
|
@@ -203,7 +203,7 @@ sap.ui.define([
|
|
|
203
203
|
* Enumeration of the storage types supported by {@link jQuery.sap.storage.Storage}
|
|
204
204
|
* @enum {string}
|
|
205
205
|
* @public
|
|
206
|
-
* @version 1.
|
|
206
|
+
* @version 1.135.0
|
|
207
207
|
* @since 0.11.0
|
|
208
208
|
* @deprecated as of version 1.120. Use {@link module:sap/ui/util/Storage.Type sap/ui/util/Storage.Type} instead.
|
|
209
209
|
*/
|
package/src/sap/base/Event.js
CHANGED
package/src/sap/base/Eventing.js
CHANGED
package/src/sap/base/config.js
CHANGED
|
@@ -0,0 +1,344 @@
|
|
|
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
|
+
|
|
10
|
+
"use strict";
|
|
11
|
+
|
|
12
|
+
const rSAPSupportabilityLocales = /(?:^|-)(saptrc|sappsd|saprigi)(?:-|$)/i;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A regular expression that describes language tags according to BCP-47.
|
|
16
|
+
* @see BCP47 "Tags for Identifying Languages" (http://www.ietf.org/rfc/bcp/bcp47.txt)
|
|
17
|
+
*
|
|
18
|
+
* The matching groups are
|
|
19
|
+
* 0=all
|
|
20
|
+
* 1=language (shortest ISO639 code + ext. language sub tags | 4digits (reserved) | registered language sub tags)
|
|
21
|
+
* 2=script (4 letters)
|
|
22
|
+
* 3=region (2letter language or 3 digits)
|
|
23
|
+
* 4=variants (separated by '-', Note: capturing group contains leading '-' to shorten the regex!)
|
|
24
|
+
* 5=extensions (including leading singleton, multiple extensions separated by '-')
|
|
25
|
+
* 6=private use section (including leading 'x', multiple sections separated by '-')
|
|
26
|
+
*
|
|
27
|
+
* [-------------------- language ----------------------][--- script ---][------- region --------][------------- variants --------------][----------- extensions ------------][------ private use -------]
|
|
28
|
+
*/
|
|
29
|
+
const rLocale = /^((?:[A-Z]{2,3}(?:-[A-Z]{3}){0,3})|[A-Z]{4}|[A-Z]{5,8})(?:-([A-Z]{4}))?(?:-([A-Z]{2}|[0-9]{3}))?((?:-[0-9A-Z]{5,8}|-[0-9][0-9A-Z]{3})*)((?:-[0-9A-WYZ](?:-[0-9A-Z]{2,8})+)*)(?:-(X(?:-[0-9A-Z]{1,8})+))?$/i;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Resource bundles are stored according to the Java Development Kit conventions.
|
|
33
|
+
* JDK uses old language names for a few ISO639 codes ("iw" for "he", "ji" for "yi" and "no" for "nb").
|
|
34
|
+
* This mapping determines the appropriate language suffix for SAP translations when resolving a locale in a ResourceBundle.
|
|
35
|
+
* @private
|
|
36
|
+
*/
|
|
37
|
+
const M_LOCALE_TO_SAP_LANG = {
|
|
38
|
+
"he" : "iw",
|
|
39
|
+
"yi" : "ji",
|
|
40
|
+
"nb" : "no"
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* This mapping converts the old ISO639 codes into the corresponding language code used by ABAP systems,
|
|
45
|
+
* particularly for processing the Accept-Language header
|
|
46
|
+
* @private
|
|
47
|
+
*/
|
|
48
|
+
const M_ISO639_OLD_TO_NEW = {
|
|
49
|
+
"iw" : "he",
|
|
50
|
+
"ji" : "yi"
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Helper to normalize the given locale (in BCP-47 syntax) to the java.util.Locale format.
|
|
55
|
+
*
|
|
56
|
+
* @param {string} sLocale Locale to normalize
|
|
57
|
+
* @param {boolean} [bPreserveLanguage=false] Whether to keep the language untouched, otherwise
|
|
58
|
+
* the language is mapped from modern to legacy ISO639 codes, e.g. "he" to "iw"
|
|
59
|
+
* @returns {string|undefined} Normalized locale or <code>undefined</code> if the locale can't be normalized
|
|
60
|
+
* @private
|
|
61
|
+
*/
|
|
62
|
+
const normalize = function(sLocale, bPreserveLanguage) {
|
|
63
|
+
|
|
64
|
+
var m;
|
|
65
|
+
if ( typeof sLocale === 'string' && (m = rLocale.exec(sLocale.replace(/_/g, '-'))) ) {
|
|
66
|
+
var sLanguage = m[1].toLowerCase();
|
|
67
|
+
if (!bPreserveLanguage) {
|
|
68
|
+
sLanguage = M_LOCALE_TO_SAP_LANG[sLanguage] || sLanguage;
|
|
69
|
+
}
|
|
70
|
+
var sScript = m[2] ? m[2].toLowerCase() : undefined;
|
|
71
|
+
var sRegion = m[3] ? m[3].toUpperCase() : undefined;
|
|
72
|
+
var sVariants = m[4] ? m[4].slice(1) : undefined;
|
|
73
|
+
var sPrivate = m[6];
|
|
74
|
+
// recognize and convert special SAP supportability locales (overwrites m[]!)
|
|
75
|
+
if ( (sPrivate && (m = rSAPSupportabilityLocales.exec(sPrivate)))
|
|
76
|
+
|| (sVariants && (m = rSAPSupportabilityLocales.exec(sVariants))) ) {
|
|
77
|
+
return "en_US_" + m[1].toLowerCase(); // for now enforce en_US (agreed with SAP SLS)
|
|
78
|
+
}
|
|
79
|
+
// Chinese: when no region but a script is specified, use default region for each script
|
|
80
|
+
if ( sLanguage === "zh" && !sRegion ) {
|
|
81
|
+
if ( sScript === "hans" ) {
|
|
82
|
+
sRegion = "CN";
|
|
83
|
+
} else if ( sScript === "hant" ) {
|
|
84
|
+
sRegion = "TW";
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
if (sLanguage === "sr" && sScript === "latn") {
|
|
88
|
+
if (bPreserveLanguage) {
|
|
89
|
+
sLanguage = "sr_Latn";
|
|
90
|
+
} else {
|
|
91
|
+
sLanguage = "sh";
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return sLanguage + (sRegion ? "_" + sRegion + (sVariants ? "_" + sVariants.replace("-","_") : "") : "");
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Normalizes the given locale, unless it is an empty string (<code>""</code>).
|
|
100
|
+
*
|
|
101
|
+
* When locale is an empty string (<code>""</code>), it is returned without normalization.
|
|
102
|
+
* @see normalize
|
|
103
|
+
* @param {string} sLocale locale (aka 'language tag') to be normalized.
|
|
104
|
+
* Can either be a BCP47 language tag or a JDK compatible locale string (e.g. "en-GB", "en_GB" or "fr");
|
|
105
|
+
* @param {boolean} [bPreserveLanguage=false] whether to keep the language untouched, otherwise
|
|
106
|
+
* the language is mapped from modern to legacy ISO639 codes, e.g. "he" to "iw"
|
|
107
|
+
* @returns {string} normalized locale
|
|
108
|
+
* @throws {TypeError} Will throw an error if the locale is not a valid BCP47 language tag.
|
|
109
|
+
* @private
|
|
110
|
+
*/
|
|
111
|
+
const normalizePreserveEmpty = function(sLocale, bPreserveLanguage) {
|
|
112
|
+
// empty string is valid and should not be normalized
|
|
113
|
+
if (sLocale === "") {
|
|
114
|
+
return sLocale;
|
|
115
|
+
}
|
|
116
|
+
var sNormalizedLocale = normalize(sLocale, bPreserveLanguage);
|
|
117
|
+
if (sNormalizedLocale === undefined) {
|
|
118
|
+
throw new TypeError("Locale '" + sLocale + "' is not a valid BCP47 language tag");
|
|
119
|
+
}
|
|
120
|
+
return sNormalizedLocale;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Helper to normalize the given locale (java.util.Locale format) to the BCP-47 syntax.
|
|
125
|
+
*
|
|
126
|
+
* @param {string} sLocale locale to convert
|
|
127
|
+
* @param {boolean} bConvertToModern whether to convert to modern language
|
|
128
|
+
* @returns {string|undefined} Normalized locale or <code>undefined</code> if the locale can't be normalized
|
|
129
|
+
*/
|
|
130
|
+
const convertLocaleToBCP47 = function(sLocale, bConvertToModern) {
|
|
131
|
+
var m;
|
|
132
|
+
if ( typeof sLocale === 'string' && (m = rLocale.exec(sLocale.replace(/_/g, '-'))) ) {
|
|
133
|
+
var sLanguage = m[1].toLowerCase();
|
|
134
|
+
var sScript = m[2] ? m[2].toLowerCase() : undefined;
|
|
135
|
+
// special case for "sr_Latn" language: "sh" should then be used
|
|
136
|
+
if (bConvertToModern && sLanguage === "sh" && !sScript) {
|
|
137
|
+
sLanguage = "sr_Latn";
|
|
138
|
+
} else if (!bConvertToModern && sLanguage === "sr" && sScript === "latn") {
|
|
139
|
+
sLanguage = "sh";
|
|
140
|
+
}
|
|
141
|
+
sLanguage = M_ISO639_OLD_TO_NEW[sLanguage] || sLanguage;
|
|
142
|
+
return sLanguage + (m[3] ? "-" + m[3].toUpperCase() + (m[4] ? "-" + m[4].slice(1).replace("_","-") : "") : "");
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Check if the given locale is contained in the given list of supported locales.
|
|
148
|
+
*
|
|
149
|
+
* If no list is given or if it is empty, any locale is assumed to be supported and
|
|
150
|
+
* the given locale is returned without modification.
|
|
151
|
+
*
|
|
152
|
+
* When the list contains the given locale, the locale is also returned without modification.
|
|
153
|
+
*
|
|
154
|
+
* If an alternative code for the language code part of the locale exists (e.g a modern code
|
|
155
|
+
* if the language is a legacy code, or a legacy code if the language is a modern code), then
|
|
156
|
+
* the language code is replaced by the alternative code. If the resulting alternative locale
|
|
157
|
+
* is contained in the list, the alternative locale is returned.
|
|
158
|
+
*
|
|
159
|
+
* If there is no match, <code>undefined</code> is returned.
|
|
160
|
+
* @param {string} sLocale Locale, using legacy ISO639 language code, e.g. iw_IL
|
|
161
|
+
* @param {string[]} aSupportedLocales List of supported locales, e.g. ["he_IL"]
|
|
162
|
+
* @returns {string} The match in the supportedLocales (using either modern or legacy ISO639 language codes),
|
|
163
|
+
* e.g. "he_IL"; <code>undefined</code> if not matched
|
|
164
|
+
*/
|
|
165
|
+
const findSupportedLocale = function(sLocale, aSupportedLocales) {
|
|
166
|
+
|
|
167
|
+
// if supportedLocales array is empty or undefined or if it contains the given locale,
|
|
168
|
+
// return that locale (with a legacy ISO639 language code)
|
|
169
|
+
if (!aSupportedLocales || aSupportedLocales.length === 0 || aSupportedLocales.includes(sLocale)) {
|
|
170
|
+
return sLocale;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// determine an alternative locale, using a modern ISO639 language code
|
|
174
|
+
// (converts "iw_IL" to "he-IL")
|
|
175
|
+
sLocale = convertLocaleToBCP47(sLocale, true);
|
|
176
|
+
if (sLocale) {
|
|
177
|
+
// normalize it to JDK syntax for easier comparison
|
|
178
|
+
// (converts "he-IL" to "he_IL" - using an underscore ("_") between the segments)
|
|
179
|
+
sLocale = normalize(sLocale, true);
|
|
180
|
+
}
|
|
181
|
+
if (aSupportedLocales.includes(sLocale)) {
|
|
182
|
+
// return the alternative locale (with a modern ISO639 language code)
|
|
183
|
+
return sLocale;
|
|
184
|
+
}
|
|
185
|
+
return undefined;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Determines the sequence of fallback locales, starting from the given locale.
|
|
190
|
+
*
|
|
191
|
+
* The fallback chain starts with the given <code>sLocale</code> itself. If this locale
|
|
192
|
+
* has multiple segments (region, variant), further entries are added to the fallback
|
|
193
|
+
* chain, each one omitting the last (rightmost) segment of its predecessor, making the
|
|
194
|
+
* new locale entry less specific than the previous one (e.g. "de" after "de_CH").
|
|
195
|
+
*
|
|
196
|
+
* If <code>sFallbackLocale</code> is given, it will be added to the fallback chain next.
|
|
197
|
+
* If it consists of multiple segments, multiple locales will be added, each less specific
|
|
198
|
+
* than the previous one. If <code>sFallbackLocale</code> is omitted or <code>undefined</code>,
|
|
199
|
+
* "en" (English) will be added instead. If <code>sFallbackLocale</code> is the empty string
|
|
200
|
+
* (""), no generic fallback will be added.
|
|
201
|
+
*
|
|
202
|
+
* Last but not least, the 'raw' locale will be added, represented by the empty string ("").
|
|
203
|
+
*
|
|
204
|
+
* The returned list will contain no duplicates and all entries will be in normalized JDK file suffix
|
|
205
|
+
* format (using an underscore ("_") as separator, a lowercase language and an uppercase region
|
|
206
|
+
* (if any)).
|
|
207
|
+
*
|
|
208
|
+
* If <code>aSupportedLocales</code> is provided and not empty, only locales contained
|
|
209
|
+
* in that array will be added to the result. This allows to limit the backend requests
|
|
210
|
+
* to a certain set of files (e.g. those that are known to exist).
|
|
211
|
+
*
|
|
212
|
+
* @param {string} sLocale Locale to start the fallback sequence with, must be normalized already
|
|
213
|
+
* @param {string[]} [aSupportedLocales] List of supported locales (either BCP47 or JDK legacy syntax, e.g. zh_CN, iw)
|
|
214
|
+
* @param {string} [sFallbackLocale="en"] Last fallback locale; is ignored when <code>bSkipFallbackLocaleAndRaw</code> is <code>true</code>
|
|
215
|
+
* @param {string} [sContextInfo] Describes the context in which this function is called, only used for logging
|
|
216
|
+
* @param {boolean} [bSkipFallbackLocaleAndRaw=false] Whether to skip fallbackLocale and raw bundle
|
|
217
|
+
* @returns {string[]} Sequence of fallback locales in JDK legacy syntax, decreasing priority
|
|
218
|
+
*
|
|
219
|
+
* @private
|
|
220
|
+
*/
|
|
221
|
+
const calculateFallbackChain = function(sLocale, aSupportedLocales, sFallbackLocale, sContextInfo, bSkipFallbackLocaleAndRaw) {
|
|
222
|
+
// Defines which locales are supported (BCP47 language tags or JDK locale format using underscores).
|
|
223
|
+
// Normalization of the case and of the separator char simplifies later comparison, but the language
|
|
224
|
+
// part is not converted to a legacy ISO639 code, in order to enable the support of modern codes as well.
|
|
225
|
+
aSupportedLocales = aSupportedLocales && aSupportedLocales.map(function (sSupportedLocale) {
|
|
226
|
+
return normalizePreserveEmpty(sSupportedLocale, true);
|
|
227
|
+
});
|
|
228
|
+
if (!bSkipFallbackLocaleAndRaw) {
|
|
229
|
+
// normalize the fallback locale for sanitizing it and converting the language part to legacy ISO639
|
|
230
|
+
// because it is like the locale part of the fallback chain
|
|
231
|
+
var bFallbackLocaleDefined = sFallbackLocale !== undefined;
|
|
232
|
+
sFallbackLocale = bFallbackLocaleDefined ? sFallbackLocale : "en";
|
|
233
|
+
sFallbackLocale = normalizePreserveEmpty(sFallbackLocale);
|
|
234
|
+
|
|
235
|
+
// An empty fallback locale ("") is valid and means that a generic fallback should not be loaded.
|
|
236
|
+
// The supportedLocales must contain the fallbackLocale, or else it will be ignored.
|
|
237
|
+
if (sFallbackLocale !== "" && !findSupportedLocale(sFallbackLocale, aSupportedLocales)) {
|
|
238
|
+
var sMessage = "The fallback locale '" + sFallbackLocale + "' is not contained in the list of supported locales ['"
|
|
239
|
+
+ aSupportedLocales.join("', '") + "']" + sContextInfo + " and will be ignored.";
|
|
240
|
+
// configuration error should be thrown if an invalid configuration has been provided
|
|
241
|
+
if (bFallbackLocaleDefined) {
|
|
242
|
+
throw new Error(sMessage);
|
|
243
|
+
}
|
|
244
|
+
Log.error(sMessage);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// Calculate the list of fallback locales, starting with the given locale.
|
|
249
|
+
//
|
|
250
|
+
// Note: always keep this in sync with the fallback mechanism in Java, ABAP (MIME & BSP)
|
|
251
|
+
// resource handler (Java: Peter M., MIME: Sebastian A., BSP: Silke A.)
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
// fallback logic:
|
|
255
|
+
// locale with region -> locale language -> fallback with region -> fallback language -> raw
|
|
256
|
+
// note: if no region is present, it is skipped
|
|
257
|
+
|
|
258
|
+
// Sample fallback chains:
|
|
259
|
+
// "de_CH" -> "de" -> "en_US" -> "en" -> "" // locale 'de_CH', fallbackLocale 'en_US'
|
|
260
|
+
// "de_CH" -> "de" -> "de_DE" -> "de" -> "" // locale 'de_CH', fallbackLocale 'de_DE'
|
|
261
|
+
// "en_GB" -> "en" -> "" // locale 'en_GB', fallbackLocale 'en'
|
|
262
|
+
|
|
263
|
+
// note: the resulting list does neither contain any duplicates nor unsupported locales
|
|
264
|
+
|
|
265
|
+
// fallback calculation
|
|
266
|
+
var aLocales = [],
|
|
267
|
+
sSupportedLocale;
|
|
268
|
+
|
|
269
|
+
while ( sLocale != null ) {
|
|
270
|
+
|
|
271
|
+
// check whether sLocale is supported, potentially using an alternative language code
|
|
272
|
+
sSupportedLocale = findSupportedLocale(sLocale, aSupportedLocales);
|
|
273
|
+
|
|
274
|
+
// only push if it is supported and is not already contained (avoid duplicates)
|
|
275
|
+
if ( sSupportedLocale !== undefined && aLocales.indexOf(sSupportedLocale) === -1) {
|
|
276
|
+
aLocales.push(sSupportedLocale);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// calculate next one
|
|
280
|
+
if (!sLocale) {
|
|
281
|
+
// there is no fallback for the 'raw' locale or for null/undefined
|
|
282
|
+
sLocale = null;
|
|
283
|
+
} else if (sLocale === "zh_HK") {
|
|
284
|
+
// special (legacy) handling for zh_HK:
|
|
285
|
+
// try zh_TW (for "Traditional Chinese") first before falling back to 'zh'
|
|
286
|
+
sLocale = "zh_TW";
|
|
287
|
+
} else if (sLocale.lastIndexOf('_') >= 0) {
|
|
288
|
+
// if sLocale contains more than one segment (region, variant), remove the last one
|
|
289
|
+
sLocale = sLocale.slice(0, sLocale.lastIndexOf('_'));
|
|
290
|
+
} else if (bSkipFallbackLocaleAndRaw) {
|
|
291
|
+
// skip fallbackLocale and raw bundle
|
|
292
|
+
sLocale = null;
|
|
293
|
+
} else if (sFallbackLocale) {
|
|
294
|
+
// if there's a fallbackLocale, add it first before the 'raw' locale
|
|
295
|
+
sLocale = sFallbackLocale;
|
|
296
|
+
sFallbackLocale = null; // no more fallback in the next round
|
|
297
|
+
} else {
|
|
298
|
+
// last fallback to raw bundle
|
|
299
|
+
sLocale = "";
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
return aLocales;
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Determine sequence of fallback locales, starting from the given locale and
|
|
309
|
+
* optionally taking the list of supported locales into account.
|
|
310
|
+
*
|
|
311
|
+
* Callers can use the result to limit requests to a set of existing locales.
|
|
312
|
+
*
|
|
313
|
+
* @param {string} sLocale Locale to start the fallback sequence with, should be a BCP47 language tag
|
|
314
|
+
* @param {string[]} [aSupportedLocales] List of supported locales (in JDK legacy syntax, e.g. zh_CN, iw)
|
|
315
|
+
* @param {string} [sFallbackLocale] Last fallback locale, defaults to "en"
|
|
316
|
+
* @returns {string[]} Sequence of fallback locales in JDK legacy syntax, decreasing priority
|
|
317
|
+
*
|
|
318
|
+
* @private
|
|
319
|
+
* @ui5-restricted sap.fiori, sap.support launchpad
|
|
320
|
+
*/
|
|
321
|
+
const getFallbackLocales = function(sLocale, aSupportedLocales, sFallbackLocale) {
|
|
322
|
+
return calculateFallbackChain(
|
|
323
|
+
normalize(sLocale),
|
|
324
|
+
aSupportedLocales,
|
|
325
|
+
sFallbackLocale,
|
|
326
|
+
/* no context info */ ""
|
|
327
|
+
);
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Helper module for locale-related functions, including normalization, conversion, and fallback calculations.
|
|
332
|
+
*
|
|
333
|
+
* @returns {Object} An object containing the helper functions
|
|
334
|
+
*
|
|
335
|
+
* @private
|
|
336
|
+
* @ui5-restricted sap.ui.core, sap.fiori, sap.support launchpad
|
|
337
|
+
*/
|
|
338
|
+
return {
|
|
339
|
+
convertLocaleToBCP47: convertLocaleToBCP47,
|
|
340
|
+
calculate: calculateFallbackChain,
|
|
341
|
+
getFallbackLocales: getFallbackLocales,
|
|
342
|
+
normalize: normalize
|
|
343
|
+
};
|
|
344
|
+
});
|
|
@@ -52,6 +52,11 @@ sap.ui.define([
|
|
|
52
52
|
"3Q" : "en-US-x-saprigi"
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
+
/**
|
|
56
|
+
* This mapping converts the old ISO639 codes into the corresponding language code used by ABAP systems,
|
|
57
|
+
* particularly for processing the Accept-Language header
|
|
58
|
+
* @private
|
|
59
|
+
*/
|
|
55
60
|
const M_ISO639_OLD_TO_NEW = {
|
|
56
61
|
"iw" : "he",
|
|
57
62
|
"ji" : "yi"
|
|
@@ -107,12 +112,12 @@ sap.ui.define([
|
|
|
107
112
|
/**
|
|
108
113
|
* A list of locales for which the CLDR specifies "right-to-left"
|
|
109
114
|
* as the character orientation.
|
|
115
|
+
* The value of this constant must only be updated by the CLDR generator;
|
|
116
|
+
* do not modify it manually.
|
|
110
117
|
*
|
|
111
|
-
*
|
|
112
|
-
* The value is determined from the CLDR JSON files which are
|
|
113
|
-
* bundled with the UI5 runtime.
|
|
118
|
+
* @private
|
|
114
119
|
*/
|
|
115
|
-
const A_RTL_LOCALES =
|
|
120
|
+
const A_RTL_LOCALES = ["ar","ar_EG","ar_SA","fa","he"];
|
|
116
121
|
|
|
117
122
|
/**
|
|
118
123
|
* List of locales for which translated texts have been bundled with the UI5 runtime.
|