@openui5/sap.ui.core 1.105.1 → 1.107.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.
Files changed (351) hide show
  1. package/.reuse/dep5 +20 -17
  2. package/THIRDPARTY.txt +31 -21
  3. package/package.json +1 -1
  4. package/src/jquery.sap.dom.js +10 -10
  5. package/src/jquery.sap.global.js +24 -216
  6. package/src/jquery.sap.history.js +1 -1
  7. package/src/jquery.sap.properties.js +2 -2
  8. package/src/jquery.sap.resources.js +1 -1
  9. package/src/jquery.sap.script.js +1 -1
  10. package/src/jquery.sap.storage.js +4 -4
  11. package/src/jquery.sap.ui.js +5 -7
  12. package/src/sap/base/i18n/ResourceBundle.js +7 -11
  13. package/src/sap/base/util/LoaderExtensions.js +6 -6
  14. package/src/sap/base/util/ObjectPath.js +1 -1
  15. package/src/sap/base/util/Properties.js +1 -1
  16. package/src/sap/base/util/fetch.js +8 -10
  17. package/src/sap/base/util/mixedFetch.js +1 -1
  18. package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
  19. package/src/sap/base/util/restricted/_castArray.js +1 -1
  20. package/src/sap/base/util/restricted/_compact.js +1 -1
  21. package/src/sap/base/util/restricted/_curry.js +1 -1
  22. package/src/sap/base/util/restricted/_debounce.js +1 -1
  23. package/src/sap/base/util/restricted/_difference.js +1 -1
  24. package/src/sap/base/util/restricted/_differenceBy.js +1 -1
  25. package/src/sap/base/util/restricted/_differenceWith.js +1 -1
  26. package/src/sap/base/util/restricted/_flatMap.js +1 -1
  27. package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
  28. package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
  29. package/src/sap/base/util/restricted/_flatten.js +1 -1
  30. package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
  31. package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
  32. package/src/sap/base/util/restricted/_intersection.js +1 -1
  33. package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
  34. package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
  35. package/src/sap/base/util/restricted/_isEqual.js +1 -1
  36. package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
  37. package/src/sap/base/util/restricted/_isNil.js +1 -1
  38. package/src/sap/base/util/restricted/_max.js +1 -1
  39. package/src/sap/base/util/restricted/_merge.js +1 -1
  40. package/src/sap/base/util/restricted/_mergeWith.js +1 -1
  41. package/src/sap/base/util/restricted/_min.js +1 -1
  42. package/src/sap/base/util/restricted/_omit.js +1 -1
  43. package/src/sap/base/util/restricted/_pick.js +1 -1
  44. package/src/sap/base/util/restricted/_pickBy.js +1 -1
  45. package/src/sap/base/util/restricted/_throttle.js +1 -1
  46. package/src/sap/base/util/restricted/_toArray.js +1 -1
  47. package/src/sap/base/util/restricted/_union.js +1 -1
  48. package/src/sap/base/util/restricted/_unionBy.js +1 -1
  49. package/src/sap/base/util/restricted/_unionWith.js +1 -1
  50. package/src/sap/base/util/restricted/_uniq.js +1 -1
  51. package/src/sap/base/util/restricted/_uniqBy.js +1 -1
  52. package/src/sap/base/util/restricted/_uniqWith.js +1 -1
  53. package/src/sap/base/util/restricted/_without.js +1 -1
  54. package/src/sap/base/util/restricted/_xor.js +1 -1
  55. package/src/sap/base/util/restricted/_xorBy.js +1 -1
  56. package/src/sap/base/util/restricted/_xorWith.js +1 -1
  57. package/src/sap/base/util/restricted/_zipObject.js +1 -1
  58. package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
  59. package/src/sap/base/util/syncFetch.js +9 -16
  60. package/src/sap/ui/Device.js +3 -3
  61. package/src/sap/ui/Global.js +7 -14
  62. package/src/sap/ui/VersionInfo.js +57 -54
  63. package/src/sap/ui/base/BindingInfo.js +198 -0
  64. package/src/sap/ui/base/DataType.js +5 -5
  65. package/src/sap/ui/base/Event.js +2 -2
  66. package/src/sap/ui/base/EventProvider.js +2 -2
  67. package/src/sap/ui/base/Interface.js +1 -1
  68. package/src/sap/ui/base/ManagedObject.js +209 -979
  69. package/src/sap/ui/base/ManagedObjectMetadata.js +6 -6
  70. package/src/sap/ui/base/ManagedObjectRegistry.js +4 -3
  71. package/src/sap/ui/base/Metadata.js +1 -1
  72. package/src/sap/ui/base/Object.js +1 -1
  73. package/src/sap/ui/base/ObjectPool.js +1 -1
  74. package/src/sap/ui/core/.library +13 -9
  75. package/src/sap/ui/core/AppCacheBuster.js +3 -4
  76. package/src/sap/ui/core/BusyIndicator.js +1 -1
  77. package/src/sap/ui/core/BusyIndicatorUtils.js +5 -6
  78. package/src/sap/ui/core/CalendarType.js +0 -1
  79. package/src/sap/ui/core/Component.js +16 -14
  80. package/src/sap/ui/core/ComponentContainer.js +6 -5
  81. package/src/sap/ui/core/ComponentMetadata.js +5 -12
  82. package/src/sap/ui/core/ComponentSupport.js +1 -1
  83. package/src/sap/ui/core/Configuration.js +525 -336
  84. package/src/sap/ui/core/Control.js +7 -7
  85. package/src/sap/ui/core/Core.js +102 -422
  86. package/src/sap/ui/core/CustomData.js +1 -1
  87. package/src/sap/ui/core/DeclarativeSupport.js +1 -1
  88. package/src/sap/ui/core/Element.js +65 -9
  89. package/src/sap/ui/core/ElementMetadata.js +1 -1
  90. package/src/sap/ui/core/EnabledPropagator.js +1 -1
  91. package/src/sap/ui/core/EventBus.js +1 -1
  92. package/src/sap/ui/core/FocusHandler.js +79 -9
  93. package/src/sap/ui/core/Fragment.js +1 -1
  94. package/src/sap/ui/core/HTML.js +1 -2
  95. package/src/sap/ui/core/History.js +1 -1
  96. package/src/sap/ui/core/Icon.js +1 -2
  97. package/src/sap/ui/core/IconPool.js +8 -8
  98. package/src/sap/ui/core/IndicationColorSupport.js +2 -2
  99. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  100. package/src/sap/ui/core/InvisibleMessage.js +1 -2
  101. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  102. package/src/sap/ui/core/InvisibleText.js +5 -5
  103. package/src/sap/ui/core/Item.js +1 -2
  104. package/src/sap/ui/core/LabelEnablement.js +1 -1
  105. package/src/sap/ui/core/LayoutData.js +1 -2
  106. package/src/sap/ui/core/ListItem.js +1 -2
  107. package/src/sap/ui/core/LocalBusyIndicator.js +1 -2
  108. package/src/sap/ui/core/Locale.js +1 -1
  109. package/src/sap/ui/core/LocaleData.js +15 -13
  110. package/src/sap/ui/core/Manifest.js +8 -6
  111. package/src/sap/ui/core/Message.js +4 -6
  112. package/src/sap/ui/core/Popup.js +63 -6
  113. package/src/sap/ui/core/RenderManager.js +13 -5
  114. package/src/sap/ui/core/Renderer.js +5 -4
  115. package/src/sap/ui/core/Rendering.js +251 -0
  116. package/src/sap/ui/core/ResizeHandler.js +7 -7
  117. package/src/sap/ui/core/ScrollBar.js +6 -9
  118. package/src/sap/ui/core/ScrollBarRenderer.js +3 -3
  119. package/src/sap/ui/core/SeparatorItem.js +1 -2
  120. package/src/sap/ui/core/Title.js +1 -2
  121. package/src/sap/ui/core/TooltipBase.js +12 -14
  122. package/src/sap/ui/core/UIArea.js +396 -129
  123. package/src/sap/ui/core/UIComponent.js +3 -4
  124. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  125. package/src/sap/ui/core/ValueStateSupport.js +2 -2
  126. package/src/sap/ui/core/VariantLayoutData.js +1 -2
  127. package/src/sap/ui/core/XMLComposite.js +2 -2
  128. package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
  129. package/src/sap/ui/core/XMLTemplateProcessor.js +12 -10
  130. package/src/sap/ui/core/_ConfigurationProvider.js +187 -0
  131. package/src/sap/ui/core/cache/CacheManager.js +9 -8
  132. package/src/sap/ui/core/cache/LRUPersistentCache.js +4 -4
  133. package/src/sap/ui/core/cldr/es_BO.json +3 -3
  134. package/src/sap/ui/core/cldr/es_CL.json +3 -3
  135. package/src/sap/ui/core/cldr/es_MX.json +3 -3
  136. package/src/sap/ui/core/cldr/es_PE.json +3 -3
  137. package/src/sap/ui/core/cldr/es_UY.json +3 -3
  138. package/src/sap/ui/core/cldr/es_VE.json +2 -2
  139. package/src/sap/ui/core/date/Islamic.js +4 -4
  140. package/src/sap/ui/core/date/UniversalDate.js +8 -8
  141. package/src/sap/ui/core/date/UniversalDateUtils.js +3 -3
  142. package/src/sap/ui/core/delegate/ItemNavigation.js +5 -5
  143. package/src/sap/ui/core/delegate/ScrollEnablement.js +7 -6
  144. package/src/sap/ui/core/dnd/DragAndDrop.js +14 -9
  145. package/src/sap/ui/core/dnd/DragDropBase.js +1 -2
  146. package/src/sap/ui/core/dnd/DragDropInfo.js +1 -2
  147. package/src/sap/ui/core/dnd/DragInfo.js +1 -2
  148. package/src/sap/ui/core/dnd/DropInfo.js +1 -2
  149. package/src/sap/ui/core/format/DateFormat.js +14 -7
  150. package/src/sap/ui/core/format/DateFormatTimezoneDisplay.js +0 -1
  151. package/src/sap/ui/core/format/FileSizeFormat.js +4 -3
  152. package/src/sap/ui/core/format/ListFormat.js +4 -3
  153. package/src/sap/ui/core/format/NumberFormat.js +7 -6
  154. package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
  155. package/src/sap/ui/core/hyphenation/Hyphenation.js +7 -6
  156. package/src/sap/ui/core/library.js +3 -55
  157. package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
  158. package/src/sap/ui/core/message/Message.js +1 -1
  159. package/src/sap/ui/core/message/MessageManager.js +13 -23
  160. package/src/sap/ui/core/message/MessageParser.js +1 -1
  161. package/src/sap/ui/core/message/MessageProcessor.js +1 -1
  162. package/src/sap/ui/core/messagebundle_fr.properties +1 -1
  163. package/src/sap/ui/core/mvc/Controller.js +8 -3
  164. package/src/sap/ui/core/mvc/EventHandlerResolver.js +5 -3
  165. package/src/sap/ui/core/mvc/HTMLView.js +1 -2
  166. package/src/sap/ui/core/mvc/JSONView.js +1 -2
  167. package/src/sap/ui/core/mvc/JSView.js +2 -3
  168. package/src/sap/ui/core/mvc/TemplateView.js +1 -2
  169. package/src/sap/ui/core/mvc/View.js +21 -20
  170. package/src/sap/ui/core/mvc/ViewType.js +0 -1
  171. package/src/sap/ui/core/mvc/XMLView.js +18 -18
  172. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  173. package/src/sap/ui/core/plugin/LessSupport.js +1 -1
  174. package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
  175. package/src/sap/ui/core/postmessage/Bus.js +1 -1
  176. package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
  177. package/src/sap/ui/core/routing/Router.js +1 -1
  178. package/src/sap/ui/core/routing/async/Target.js +4 -3
  179. package/src/sap/ui/core/rules/App.support.js +11 -13
  180. package/src/sap/ui/core/rules/Config.support.js +19 -17
  181. package/src/sap/ui/core/rules/CoreHelper.support.js +4 -4
  182. package/src/sap/ui/core/rules/Model.support.js +8 -8
  183. package/src/sap/ui/core/rules/Rendering.support.js +1 -1
  184. package/src/sap/ui/core/rules/Theming.support.js +8 -8
  185. package/src/sap/ui/core/rules/View.support.js +9 -9
  186. package/src/sap/ui/core/search/OpenSearchProvider.js +1 -2
  187. package/src/sap/ui/core/search/SearchProvider.js +1 -3
  188. package/src/sap/ui/core/service/Service.js +1 -1
  189. package/src/sap/ui/core/service/ServiceFactory.js +1 -1
  190. package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
  191. package/src/sap/ui/core/support/Hotkeys.js +2 -3
  192. package/src/sap/ui/core/support/Plugin.js +1 -1
  193. package/src/sap/ui/core/support/Support.js +1 -1
  194. package/src/sap/ui/core/support/ToolsAPI.js +11 -13
  195. package/src/sap/ui/core/support/plugins/ControlTree.js +4 -4
  196. package/src/sap/ui/core/support/plugins/Debugging.js +3 -3
  197. package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
  198. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  199. package/src/sap/ui/core/support/plugins/Performance.js +1 -1
  200. package/src/sap/ui/core/support/plugins/Selector.js +1 -1
  201. package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
  202. package/src/sap/ui/core/support/plugins/Trace.js +1 -1
  203. package/src/sap/ui/core/support/plugins/ViewInfo.js +2 -2
  204. package/src/sap/ui/core/support/support.html +1 -1
  205. package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +10 -8
  206. package/src/sap/ui/core/theming/Parameters.js +8 -15
  207. package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -2
  208. package/src/sap/ui/core/tmpl/DOMElement.js +1 -4
  209. package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
  210. package/src/sap/ui/core/tmpl/Template.js +6 -5
  211. package/src/sap/ui/core/tmpl/TemplateControl.js +1 -2
  212. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  213. package/src/sap/ui/core/util/Export.js +1 -1
  214. package/src/sap/ui/core/util/ExportCell.js +1 -1
  215. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  216. package/src/sap/ui/core/util/ExportRow.js +1 -1
  217. package/src/sap/ui/core/util/ExportType.js +1 -1
  218. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  219. package/src/sap/ui/core/util/File.js +1 -1
  220. package/src/sap/ui/core/util/LibraryInfo.js +1 -1
  221. package/src/sap/ui/core/util/MockServer.js +48 -72
  222. package/src/sap/ui/core/util/PasteHelper.js +1 -1
  223. package/src/sap/ui/core/util/ResponsivePaddingsEnablement.js +4 -3
  224. package/src/sap/ui/core/util/XMLPreprocessor.js +2 -2
  225. package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +1 -1
  226. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  227. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  228. package/src/sap/ui/core/util/serializer/ViewSerializer.js +4 -4
  229. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  230. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  231. package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
  232. package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
  233. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  234. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  235. package/src/sap/ui/core/ws/WebSocket.js +1 -1
  236. package/src/sap/ui/debug/ControlTree.js +3 -3
  237. package/src/sap/ui/debug/DebugEnv.js +4 -4
  238. package/src/sap/ui/debug/PropertyList.css +1 -31
  239. package/src/sap/ui/debug/PropertyList.js +6 -250
  240. package/src/sap/ui/dom/getScrollbarSize.js +1 -1
  241. package/src/sap/ui/dom/jquery/control.js +1 -0
  242. package/src/sap/ui/events/jquery/EventSimulation.js +4 -4
  243. package/src/sap/ui/model/ClientModel.js +1 -1
  244. package/src/sap/ui/model/ClientTreeBinding.js +3 -1
  245. package/src/sap/ui/model/CompositeDataState.js +1 -1
  246. package/src/sap/ui/model/CompositeType.js +1 -1
  247. package/src/sap/ui/model/Context.js +3 -0
  248. package/src/sap/ui/model/ContextBinding.js +1 -1
  249. package/src/sap/ui/model/DataState.js +2 -2
  250. package/src/sap/ui/model/ListBinding.js +2 -2
  251. package/src/sap/ui/model/ManagedObjectBindingSupport.js +871 -0
  252. package/src/sap/ui/model/MetaModel.js +1 -1
  253. package/src/sap/ui/model/Model.js +16 -5
  254. package/src/sap/ui/model/SelectionModel.js +1 -1
  255. package/src/sap/ui/model/SimpleType.js +2 -2
  256. package/src/sap/ui/model/Sorter.js +24 -19
  257. package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
  258. package/src/sap/ui/model/TreeBindingAdapter.js +3 -7
  259. package/src/sap/ui/model/Type.js +1 -1
  260. package/src/sap/ui/model/analytics/AnalyticalBinding.js +2 -0
  261. package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +5 -7
  262. package/src/sap/ui/model/json/JSONModel.js +9 -7
  263. package/src/sap/ui/model/message/MessageModel.js +1 -1
  264. package/src/sap/ui/model/odata/AnnotationHelper.js +4 -4
  265. package/src/sap/ui/model/odata/ODataAnnotations.js +5 -3
  266. package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
  267. package/src/sap/ui/model/odata/ODataMetaModel.js +10 -10
  268. package/src/sap/ui/model/odata/ODataMetadata.js +5 -4
  269. package/src/sap/ui/model/odata/ODataModel.js +6 -5
  270. package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +0 -1
  271. package/src/sap/ui/model/odata/type/Boolean.js +1 -1
  272. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  273. package/src/sap/ui/model/odata/type/Currency.js +1 -1
  274. package/src/sap/ui/model/odata/type/Date.js +1 -1
  275. package/src/sap/ui/model/odata/type/DateTime.js +1 -1
  276. package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
  277. package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
  278. package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +1 -1
  279. package/src/sap/ui/model/odata/type/Decimal.js +1 -1
  280. package/src/sap/ui/model/odata/type/Double.js +1 -1
  281. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  282. package/src/sap/ui/model/odata/type/Int.js +1 -1
  283. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  284. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  285. package/src/sap/ui/model/odata/type/Int64.js +1 -1
  286. package/src/sap/ui/model/odata/type/ODataType.js +1 -1
  287. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  288. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  289. package/src/sap/ui/model/odata/type/Single.js +1 -1
  290. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  291. package/src/sap/ui/model/odata/type/String.js +1 -1
  292. package/src/sap/ui/model/odata/type/Time.js +1 -1
  293. package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
  294. package/src/sap/ui/model/odata/type/Unit.js +1 -1
  295. package/src/sap/ui/model/odata/v2/Context.js +5 -5
  296. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +4 -3
  297. package/src/sap/ui/model/odata/v2/ODataContextBinding.js +25 -16
  298. package/src/sap/ui/model/odata/v2/ODataListBinding.js +46 -28
  299. package/src/sap/ui/model/odata/v2/ODataModel.js +97 -39
  300. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +5 -5
  301. package/src/sap/ui/model/odata/v4/AnnotationHelper.js +3 -3
  302. package/src/sap/ui/model/odata/v4/Context.js +109 -71
  303. package/src/sap/ui/model/odata/v4/ODataBinding.js +50 -7
  304. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +88 -68
  305. package/src/sap/ui/model/odata/v4/ODataListBinding.js +116 -81
  306. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +23 -20
  307. package/src/sap/ui/model/odata/v4/ODataModel.js +350 -88
  308. package/src/sap/ui/model/odata/v4/ODataParentBinding.js +35 -9
  309. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +15 -9
  310. package/src/sap/ui/model/odata/v4/ODataUtils.js +8 -5
  311. package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +45 -33
  312. package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +40 -6
  313. package/src/sap/ui/model/odata/v4/lib/_Cache.js +135 -81
  314. package/src/sap/ui/model/odata/v4/lib/_ConcatHelper.js +2 -3
  315. package/src/sap/ui/model/odata/v4/lib/_Helper.js +179 -36
  316. package/src/sap/ui/model/odata/v4/lib/_MinMaxHelper.js +2 -3
  317. package/src/sap/ui/model/odata/v4/lib/_Requestor.js +26 -7
  318. package/src/sap/ui/model/resource/ResourceModel.js +8 -7
  319. package/src/sap/ui/model/type/Boolean.js +1 -1
  320. package/src/sap/ui/model/type/Currency.js +2 -2
  321. package/src/sap/ui/model/type/Date.js +1 -1
  322. package/src/sap/ui/model/type/DateInterval.js +1 -1
  323. package/src/sap/ui/model/type/DateTime.js +1 -1
  324. package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
  325. package/src/sap/ui/model/type/FileSize.js +1 -1
  326. package/src/sap/ui/model/type/Float.js +1 -1
  327. package/src/sap/ui/model/type/Integer.js +1 -1
  328. package/src/sap/ui/model/type/String.js +2 -2
  329. package/src/sap/ui/model/type/Time.js +1 -1
  330. package/src/sap/ui/model/type/TimeInterval.js +1 -1
  331. package/src/sap/ui/model/type/Unit.js +5 -4
  332. package/src/sap/ui/model/xml/XMLModel.js +8 -6
  333. package/src/sap/ui/performance/trace/Interaction.js +1 -1
  334. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  335. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
  336. package/src/sap/ui/test/Opa.js +7 -5
  337. package/src/sap/ui/test/Opa5.js +9 -15
  338. package/src/sap/ui/test/OpaBuilder.js +1 -1
  339. package/src/sap/ui/test/RecorderHotkeyListener.js +1 -1
  340. package/src/sap/ui/test/TestUtils.js +83 -1
  341. package/src/sap/ui/test/autowaiter/_autoWaiter.js +9 -0
  342. package/src/sap/ui/test/autowaiter/_cssAnimationWaiter.js +114 -0
  343. package/src/sap/ui/test/autowaiter/_cssTransitionWaiter.js +99 -0
  344. package/src/sap/ui/test/autowaiter/_jsAnimationWaiter.js +70 -0
  345. package/src/sap/ui/test/autowaiter/_resourceWaiter.js +3 -12
  346. package/src/sap/ui/test/autowaiter/_utils.js +13 -1
  347. package/src/sap/ui/test/generic/TestBase.js +1 -1
  348. package/src/sap/ui/test/matchers/Ancestor.js +1 -0
  349. package/src/sap/ui/test/matchers/Descendant.js +1 -0
  350. package/src/sap/ui/test/matchers/Sibling.js +1 -0
  351. package/src/sap/ui/util/Storage.js +1 -1
@@ -7,38 +7,286 @@
7
7
  //Provides class sap.ui.core.Configuration
8
8
  sap.ui.define([
9
9
  '../Device',
10
- '../Global',
11
10
  '../base/Object',
12
11
  './CalendarType',
13
12
  './Locale',
14
13
  "./format/TimezoneUtil",
15
14
  'sap/ui/thirdparty/URI',
15
+ "sap/ui/core/_ConfigurationProvider",
16
16
  "sap/base/util/UriParameters",
17
17
  "sap/base/util/deepEqual",
18
18
  "sap/base/util/Version",
19
19
  "sap/base/Log",
20
20
  "sap/base/assert",
21
+ "sap/base/util/deepClone",
21
22
  "sap/base/util/extend",
22
23
  "sap/base/util/isEmptyObject"
23
24
  ],
24
25
  function(
25
26
  Device,
26
- Global,
27
27
  BaseObject,
28
28
  CalendarType,
29
29
  Locale,
30
30
  TimezoneUtil,
31
31
  URI,
32
+ _ConfigurationProvider,
32
33
  UriParameters,
33
34
  deepEqual,
34
35
  Version,
35
36
  Log,
36
37
  assert,
38
+ deepClone,
37
39
  extend,
38
40
  isEmptyObject
39
41
  ) {
40
42
  "use strict";
41
43
 
44
+ // Singleton instance for configuration
45
+ var oConfiguration;
46
+ var M_SETTINGS;
47
+ var VERSION = "1.107.0";
48
+
49
+ // Helper Functions
50
+ function detectLanguage() {
51
+
52
+ function navigatorLanguage() {
53
+ if ( Device.os.android ) {
54
+ // on Android, navigator.language is hardcoded to 'en', so check UserAgent string instead
55
+ var match = navigator.userAgent.match(/\s([a-z]{2}-[a-z]{2})[;)]/i);
56
+ if ( match ) {
57
+ return match[1];
58
+ }
59
+ // okay, we couldn't find a language setting. It might be better to fallback to 'en' instead of having no language
60
+ }
61
+ return navigator.language;
62
+ }
63
+
64
+ return convertToLocaleOrNull( (navigator.languages && navigator.languages[0]) || navigatorLanguage() || navigator.userLanguage || navigator.browserLanguage ) || new Locale("en");
65
+ }
66
+
67
+ function setValue(sName, vValue, config) {
68
+ if ( vValue == null ) {
69
+ return;
70
+ }
71
+ config[sName] = convertToType(sName, vValue);
72
+ }
73
+
74
+ function convertToType(sName, vValue) {
75
+ if ( vValue == null ) {
76
+ return;
77
+ }
78
+ switch (M_SETTINGS[sName].type) {
79
+ case "boolean":
80
+ if ( typeof vValue === "string" ) {
81
+ if (M_SETTINGS[sName].defaultValue) {
82
+ return vValue.toLowerCase() != "false";
83
+ } else {
84
+ return vValue.toLowerCase() === "true" || vValue.toLowerCase() === "x";
85
+ }
86
+ } else {
87
+ // boolean etc.
88
+ return !!vValue;
89
+ }
90
+ case "string":
91
+ return "" + vValue; // enforce string
92
+ case "code":
93
+ return typeof vValue === "function" ? vValue : String(vValue);
94
+ case "function":
95
+ if ( typeof vValue !== "function" ) {
96
+ throw new Error("unsupported value");
97
+ }
98
+ return vValue;
99
+ case "function[]":
100
+ vValue.forEach(function(fnFunction) {
101
+ if ( typeof fnFunction !== "function" ) {
102
+ throw new Error("Not a function: " + fnFunction);
103
+ }
104
+ });
105
+ return vValue.slice();
106
+ case "string[]":
107
+ if ( Array.isArray(vValue) ) {
108
+ return vValue;
109
+ } else if ( typeof vValue === "string" ) {
110
+ return vValue.split(/[ ,;]/).map(function(s) {
111
+ return s.trim();
112
+ });
113
+ } else {
114
+ throw new Error("unsupported value");
115
+ }
116
+ case "object":
117
+ if ( typeof vValue !== "object" ) {
118
+ throw new Error("unsupported value");
119
+ }
120
+ return vValue;
121
+ case "Locale":
122
+ var oLocale = convertToLocaleOrNull(vValue);
123
+ if ( oLocale || M_SETTINGS[sName].defaultValue == null ) {
124
+ return oLocale;
125
+ } else {
126
+ throw new Error("unsupported value");
127
+ }
128
+ default:
129
+ // When the type is none of the above types, check if an object as enum is provided to validate the value.
130
+ var vType = M_SETTINGS[sName].type;
131
+ if (typeof vType === "object") {
132
+ checkEnum(vType, vValue, sName);
133
+ return vValue;
134
+ } else {
135
+ throw new Error("illegal state");
136
+ }
137
+ }
138
+ }
139
+
140
+ function getMetaTagValue(sName) {
141
+ var oMetaTag = document.querySelector("META[name='" + sName + "']"),
142
+ sMetaContent = oMetaTag && oMetaTag.getAttribute("content");
143
+ if (sMetaContent) {
144
+ return sMetaContent;
145
+ }
146
+ }
147
+
148
+ function validateThemeOrigin(sOrigin) {
149
+ var sAllowedOrigins = getMetaTagValue("sap-allowedThemeOrigins");
150
+ return !!sAllowedOrigins && sAllowedOrigins.split(",").some(function(sAllowedOrigin) {
151
+ return sAllowedOrigin === "*" || sOrigin === sAllowedOrigin.trim();
152
+ });
153
+ }
154
+
155
+ function validateThemeRoot(sThemeRoot) {
156
+ var oThemeRoot,
157
+ sPath;
158
+
159
+ try {
160
+ // Remove search query as they are not supported for themeRoots/resourceRoots
161
+ oThemeRoot = new URI(sThemeRoot).search("");
162
+
163
+ // If the URL is absolute, validate the origin
164
+ var sOrigin = oThemeRoot.origin();
165
+ if (sOrigin && validateThemeOrigin(sOrigin)) {
166
+ sPath = oThemeRoot.toString();
167
+ } else {
168
+ // For relative URLs or not allowed origins
169
+ // ensure same origin and resolve relative paths based on href
170
+ sPath = oThemeRoot.absoluteTo(window.location.href).origin(window.location.origin).normalize().toString();
171
+ }
172
+ return sPath + (sPath.endsWith('/') ? '' : '/') + "UI5/";
173
+ } catch (e) {
174
+ // malformed URL are also not accepted
175
+ }
176
+ }
177
+
178
+ var M_ANIMATION_MODE = {
179
+ /**
180
+ * <code>full</code> represents a mode with unrestricted animation capabilities.
181
+ * @public
182
+ */
183
+ full : "full",
184
+
185
+ /**
186
+ * <code>basic</code> can be used for a reduced, more light-weight set of animations.
187
+ * @public
188
+ */
189
+ basic : "basic",
190
+
191
+ /**
192
+ * <code>minimal</code> includes animations of fundamental functionality.
193
+ * @public
194
+ */
195
+ minimal : "minimal",
196
+
197
+ /**
198
+ * <code>none</code> deactivates the animation completely.
199
+ * @public
200
+ */
201
+ none : "none"
202
+ };
203
+
204
+ // Definition of supported settings
205
+ // Valid property types are: string, boolean, string[], code, object, function, function[].
206
+ // Objects as an enumeration list of valid values can also be provided (e.g. Configuration.AnimationMode).
207
+ var M_SETTINGS = {
208
+ "theme" : { type : "string", defaultValue : "base" },
209
+ "language" : { type : "Locale", defaultValue : detectLanguage() },
210
+ "timezone" : { type : "string", defaultValue : TimezoneUtil.getLocalTimezone() },
211
+ "formatLocale" : { type : "Locale", defaultValue : null },
212
+ "calendarType" : { type : "string", defaultValue : null },
213
+ "trailingCurrencyCode" : { type : "boolean", defaultValue : true },
214
+ "accessibility" : { type : "boolean", defaultValue : true },
215
+ "autoAriaBodyRole" : { type : "boolean", defaultValue : false, noUrl:true }, //whether the framework automatically adds the ARIA role 'application' to the html body
216
+ "animation" : { type : "boolean", defaultValue : true }, // deprecated, please use animationMode
217
+ "animationMode" : { type : M_ANIMATION_MODE, defaultValue : undefined }, // If no value is provided, animationMode will be set on instantiation depending on the animation setting.
218
+ "rtl" : { type : "boolean", defaultValue : null },
219
+ "debug" : { type : "boolean", defaultValue : false },
220
+ "inspect" : { type : "boolean", defaultValue : false },
221
+ "originInfo" : { type : "boolean", defaultValue : false },
222
+ "noConflict" : { type : "boolean", defaultValue : false, noUrl:true },
223
+ "noDuplicateIds" : { type : "boolean", defaultValue : true },
224
+ "trace" : { type : "boolean", defaultValue : false, noUrl:true },
225
+ "modules" : { type : "string[]", defaultValue : [], noUrl:true },
226
+ "areas" : { type : "string[]", defaultValue : null, noUrl:true },
227
+ "onInit" : { type : "code", defaultValue : undefined, noUrl:true }, // could be either a reference to a JavaScript function, the name of a global function (string value) or the name of a module (indicated with prefix "module:")
228
+ "uidPrefix" : { type : "string", defaultValue : "__", noUrl:true },
229
+ "ignoreUrlParams" : { type : "boolean", defaultValue : false, noUrl:true },
230
+ "preload" : { type : "string", defaultValue : "auto" },
231
+ "rootComponent" : { type : "string", defaultValue : "", noUrl:true },
232
+ "preloadLibCss" : { type : "string[]", defaultValue : [] },
233
+ "application" : { type : "string", defaultValue : "" },
234
+ "appCacheBuster" : { type : "string[]", defaultValue : [] },
235
+ "bindingSyntax" : { type : "string", defaultValue : "default", noUrl:true }, // default|simple|complex
236
+ "versionedLibCss" : { type : "boolean", defaultValue : false },
237
+ "manifestFirst" : { type : "boolean", defaultValue : false },
238
+ "flexibilityServices" : { type : "string", defaultValue : "/sap/bc/lrep"},
239
+ "whitelistService" : { type : "string", defaultValue : null, noUrl:true }, // deprecated, use allowlistService instead
240
+ "allowlistService" : { type : "string", defaultValue : null, noUrl:true }, // url/to/service
241
+ "frameOptions" : { type : "string", defaultValue : "default", noUrl:true }, // default/allow/deny/trusted (default => allow)
242
+ "frameOptionsConfig" : { type : "object", defaultValue : undefined, noUrl:true }, // advanced frame options configuration
243
+ "support" : { type : "string[]", defaultValue : null },
244
+ "testRecorder" : { type : "string[]", defaultValue : null },
245
+ "activeTerminologies" : { type : "string[]", defaultValue : undefined},
246
+ "fileShareSupport" : { type : "string", defaultValue : undefined, noUrl:true }, // Module name (AMD syntax)
247
+ "securityTokenHandlers" : { type : "function[]", defaultValue: [], noUrl:true },
248
+ "productive" : { type : "boolean", defaultValue: false, noUrl:true },
249
+ "themeRoots" : { type : "object", defaultValue: {}, noUrl:true },
250
+ "xx-placeholder" : { type : "boolean", defaultValue : true },
251
+ "xx-rootComponentNode" : { type : "string", defaultValue : "", noUrl:true },
252
+ "xx-appCacheBusterMode" : { type : "string", defaultValue : "sync" },
253
+ "xx-appCacheBusterHooks": { type : "object", defaultValue : undefined, noUrl:true }, // e.g.: { handleURL: fn, onIndexLoad: fn, onIndexLoaded: fn }
254
+ "xx-disableCustomizing" : { type : "boolean", defaultValue : false, noUrl:true },
255
+ "xx-viewCache" : { type : "boolean", defaultValue : true },
256
+ "xx-depCache" : { type : "boolean", defaultValue : false },
257
+ "xx-libraryPreloadFiles": { type : "string[]", defaultValue : [] },
258
+ "xx-componentPreload" : { type : "string", defaultValue : "" },
259
+ "xx-designMode" : { type : "boolean", defaultValue : false },
260
+ "xx-supportedLanguages" : { type : "string[]", defaultValue : [] }, // *=any, sapui5 or list of locales
261
+ "xx-bootTask" : { type : "function", defaultValue : undefined, noUrl:true },
262
+ "xx-suppressDeactivationOfControllerCode" : { type : "boolean", defaultValue : false }, //temporarily to suppress the deactivation of controller code in design mode
263
+ "xx-lesssupport" : { type : "boolean", defaultValue : false },
264
+ "xx-handleValidation" : { type : "boolean", defaultValue : false },
265
+ "xx-fiori2Adaptation" : { type : "string[]", defaultValue : [] },
266
+ "xx-cache-use" : { type : "boolean", defaultValue : true},
267
+ "xx-cache-excludedKeys" : { type : "string[]", defaultValue : []},
268
+ "xx-cache-serialization": { type : "boolean", defaultValue : false},
269
+ "xx-nosync" : { type : "string", defaultValue : "" },
270
+ "xx-waitForTheme" : { type : "string", defaultValue : ""}, // rendering|init
271
+ "xx-hyphenation" : { type : "string", defaultValue : ""}, // (empty string)|native|thirdparty|disable
272
+ "xx-flexBundleRequestForced" : { type : "boolean", defaultValue : false },
273
+ "xx-cssVariables" : { type : "string", defaultValue : "false" }, // false|true|additional (additional just includes the css_variables.css in addition)
274
+ "xx-debugModuleLoading" : { type : "boolean", defaultValue: false },
275
+ "statistics" : { type : "boolean", defaultValue : false },
276
+ "xx-acc-keys" : { type : "boolean", defaultValue : false }
277
+ };
278
+
279
+ var M_COMPAT_FEATURES = {
280
+ "xx-test" : "1.15", //for testing purposes only
281
+ "flexBoxPolyfill" : "1.14",
282
+ "sapMeTabContainer" : "1.14",
283
+ "sapMeProgessIndicator" : "1.14",
284
+ "sapMGrowingList" : "1.14",
285
+ "sapMListAsTable" : "1.14",
286
+ "sapMDialogWithPadding" : "1.14",
287
+ "sapCoreBindingSyntax" : "1.24"
288
+ };
289
+
42
290
  /**
43
291
  * Creates a new Configuration object.
44
292
  *
@@ -70,6 +318,7 @@ sap.ui.define([
70
318
  *
71
319
  * Values of boolean parameters are case insensitive where "true" and "x" are interpreted as true.
72
320
  *
321
+ * @hideconstructor
73
322
  * @extends sap.ui.base.Object
74
323
  * @author Frank Weigel (Martin Schaus)
75
324
  * @public
@@ -77,242 +326,35 @@ sap.ui.define([
77
326
  */
78
327
  var Configuration = BaseObject.extend("sap.ui.core.Configuration", /** @lends sap.ui.core.Configuration.prototype */ {
79
328
 
80
- constructor : function(oCore) {
81
- this._oCore = oCore;
82
-
83
- function detectLanguage() {
329
+ constructor : function() {
330
+ if (oConfiguration) {
331
+ Log.error(
332
+ "Configuration is designed as a singleton and should not be created manually! " +
333
+ "Please require 'sap/ui/core/Configuration' instead and use the module export directly without using 'new'."
334
+ );
84
335
 
85
- function navigatorLanguage() {
86
- if ( Device.os.android ) {
87
- // on Android, navigator.language is hardcoded to 'en', so check UserAgent string instead
88
- var match = navigator.userAgent.match(/\s([a-z]{2}-[a-z]{2})[;)]/i);
89
- if ( match ) {
90
- return match[1];
91
- }
92
- // okay, we couldn't find a language setting. It might be better to fallback to 'en' instead of having no language
93
- }
94
- return navigator.language;
95
- }
96
-
97
- return convertToLocaleOrNull( (navigator.languages && navigator.languages[0]) || navigatorLanguage() || navigator.userLanguage || navigator.browserLanguage ) || new Locale("en");
336
+ return oConfiguration;
98
337
  }
338
+ },
99
339
 
100
- // Definition of supported settings
101
- // Valid property types are: string, boolean, string[], code, object, function, function[].
102
- // Objects as an enumeration list of valid values can also be provided (e.g. Configuration.AnimationMode).
103
- var M_SETTINGS = {
104
- "theme" : { type : "string", defaultValue : "base" },
105
- "language" : { type : "Locale", defaultValue : detectLanguage() },
106
- "timezone" : { type : "string", defaultValue : TimezoneUtil.getLocalTimezone() },
107
- "formatLocale" : { type : "Locale", defaultValue : null },
108
- "calendarType" : { type : "string", defaultValue : null },
109
- "trailingCurrencyCode" : { type : "boolean", defaultValue : true },
110
- "accessibility" : { type : "boolean", defaultValue : true },
111
- "autoAriaBodyRole" : { type : "boolean", defaultValue : false, noUrl:true }, //whether the framework automatically adds the ARIA role 'application' to the html body
112
- "animation" : { type : "boolean", defaultValue : true }, // deprecated, please use animationMode
113
- "animationMode" : { type : Configuration.AnimationMode, defaultValue : undefined }, // If no value is provided, animationMode will be set on instantiation depending on the animation setting.
114
- "rtl" : { type : "boolean", defaultValue : null },
115
- "debug" : { type : "boolean", defaultValue : false },
116
- "inspect" : { type : "boolean", defaultValue : false },
117
- "originInfo" : { type : "boolean", defaultValue : false },
118
- "noConflict" : { type : "boolean", defaultValue : false, noUrl:true },
119
- "noDuplicateIds" : { type : "boolean", defaultValue : true },
120
- "trace" : { type : "boolean", defaultValue : false, noUrl:true },
121
- "modules" : { type : "string[]", defaultValue : [], noUrl:true },
122
- "areas" : { type : "string[]", defaultValue : null, noUrl:true },
123
- // "libs" : { type : "string[]", defaultValue : [], noUrl:true }, handled below
124
- "onInit" : { type : "code", defaultValue : undefined, noUrl:true }, // could be either a reference to a JavaScript function, the name of a global function (string value) or the name of a module (indicated with prefix "module:")
125
- "uidPrefix" : { type : "string", defaultValue : "__", noUrl:true },
126
- "ignoreUrlParams" : { type : "boolean", defaultValue : false, noUrl:true },
127
- "preload" : { type : "string", defaultValue : "auto" },
128
- "rootComponent" : { type : "string", defaultValue : "", noUrl:true },
129
- "preloadLibCss" : { type : "string[]", defaultValue : [] },
130
- "application" : { type : "string", defaultValue : "" },
131
- "appCacheBuster" : { type : "string[]", defaultValue : [] },
132
- "bindingSyntax" : { type : "string", defaultValue : "default", noUrl:true }, // default|simple|complex
133
- "versionedLibCss" : { type : "boolean", defaultValue : false },
134
- "manifestFirst" : { type : "boolean", defaultValue : false },
135
- "flexibilityServices" : { type : "string", defaultValue : "/sap/bc/lrep"},
136
- "whitelistService" : { type : "string", defaultValue : null, noUrl:true }, // deprecated, use allowlistService instead
137
- "allowlistService" : { type : "string", defaultValue : null, noUrl:true }, // url/to/service
138
- "frameOptions" : { type : "string", defaultValue : "default", noUrl:true }, // default/allow/deny/trusted (default => allow)
139
- "frameOptionsConfig" : { type : "object", defaultValue : undefined, noUrl:true }, // advanced frame options configuration
140
- "support" : { type : "string[]", defaultValue : null },
141
- "testRecorder" : { type : "string[]", defaultValue : null },
142
- "activeTerminologies" : { type : "string[]", defaultValue : undefined},
143
- "fileShareSupport" : { type : "string", defaultValue : undefined, noUrl:true }, // Module name (AMD syntax)
144
- "securityTokenHandlers" : { type : "function[]", defaultValue: [], noUrl:true },
145
- "xx-placeholder" : { type : "boolean", defaultValue : true },
146
- "xx-rootComponentNode" : { type : "string", defaultValue : "", noUrl:true },
147
- "xx-appCacheBusterMode" : { type : "string", defaultValue : "sync" },
148
- "xx-appCacheBusterHooks": { type : "object", defaultValue : undefined, noUrl:true }, // e.g.: { handleURL: fn, onIndexLoad: fn, onIndexLoaded: fn }
149
- "xx-disableCustomizing" : { type : "boolean", defaultValue : false, noUrl:true },
150
- "xx-viewCache" : { type : "boolean", defaultValue : true },
151
- "xx-depCache" : { type : "boolean", defaultValue : false },
152
- "xx-libraryPreloadFiles": { type : "string[]", defaultValue : [] },
153
- "xx-componentPreload" : { type : "string", defaultValue : "" },
154
- "xx-designMode" : { type : "boolean", defaultValue : false },
155
- "xx-supportedLanguages" : { type : "string[]", defaultValue : [] }, // *=any, sapui5 or list of locales
156
- "xx-bootTask" : { type : "function", defaultValue : undefined, noUrl:true },
157
- "xx-suppressDeactivationOfControllerCode" : { type : "boolean", defaultValue : false }, //temporarily to suppress the deactivation of controller code in design mode
158
- "xx-lesssupport" : { type : "boolean", defaultValue : false },
159
- "xx-handleValidation" : { type : "boolean", defaultValue : false },
160
- "xx-fiori2Adaptation" : { type : "string[]", defaultValue : [] },
161
- "xx-cache-use" : { type : "boolean", defaultValue : true},
162
- "xx-cache-excludedKeys" : { type : "string[]", defaultValue : []},
163
- "xx-cache-serialization": { type : "boolean", defaultValue : false},
164
- "xx-nosync" : { type : "string", defaultValue : "" },
165
- "xx-waitForTheme" : { type : "string", defaultValue : ""}, // rendering|init
166
- "xx-hyphenation" : { type : "string", defaultValue : ""}, // (empty string)|native|thirdparty|disable
167
- "xx-flexBundleRequestForced" : { type : "boolean", defaultValue : false },
168
- "xx-cssVariables" : { type : "string", defaultValue : "false" }, // false|true|additional (additional just includes the css_variables.css in addition)
169
- "statistics" : { type : "boolean", defaultValue : false },
170
- "xx-acc-keys" : { type : "boolean", defaultValue : false }
171
- };
172
-
173
- var M_COMPAT_FEATURES = {
174
- "xx-test" : "1.15", //for testing purposes only
175
- "flexBoxPolyfill" : "1.14",
176
- "sapMeTabContainer" : "1.14",
177
- "sapMeProgessIndicator" : "1.14",
178
- "sapMGrowingList" : "1.14",
179
- "sapMListAsTable" : "1.14",
180
- "sapMDialogWithPadding" : "1.14",
181
- "sapCoreBindingSyntax" : "1.24"
182
- };
340
+ init: function() {
341
+ this.bInitialized = true;
183
342
 
184
343
  this.oFormatSettings = new Configuration.FormatSettings(this);
185
344
 
186
345
  /* Object that carries the real configuration data */
187
- /*eslint-disable consistent-this */
188
- var config = this;
189
- /*eslint-enable consistent-this */
190
-
191
- function setValue(sName, vValue) {
192
- if ( typeof vValue === "undefined" || vValue === null ) {
193
- return;
194
- }
195
- switch (M_SETTINGS[sName].type) {
196
- case "boolean":
197
- if ( typeof vValue === "string" ) {
198
- if (M_SETTINGS[sName].defaultValue) {
199
- config[sName] = vValue.toLowerCase() != "false";
200
- } else {
201
- config[sName] = vValue.toLowerCase() === "true" || vValue.toLowerCase() === "x";
202
- }
203
- } else {
204
- // boolean etc.
205
- config[sName] = !!vValue;
206
- }
207
- break;
208
- case "string":
209
- config[sName] = "" + vValue; // enforce string
210
- break;
211
- case "code":
212
- config[sName] = typeof vValue === "function" ? vValue : String(vValue);
213
- break;
214
- case "function":
215
- if ( typeof vValue !== "function" ) {
216
- throw new Error("unsupported value");
217
- }
218
- config[sName] = vValue;
219
- break;
220
- case "function[]":
221
- vValue.forEach(function(fnFunction) {
222
- if ( typeof fnFunction !== "function" ) {
223
- throw new Error("Not a function: " + fnFunction);
224
- }
225
- });
226
- config[sName] = vValue.slice();
227
- break;
228
- case "string[]":
229
- if ( Array.isArray(vValue) ) {
230
- config[sName] = vValue;
231
- } else if ( typeof vValue === "string" ) {
232
- config[sName] = vValue.split(/[ ,;]/).map(function(s) {
233
- return s.trim();
234
- });
235
- } else {
236
- throw new Error("unsupported value");
237
- }
238
- break;
239
- case "object":
240
- if ( typeof vValue !== "object" ) {
241
- throw new Error("unsupported value");
242
- }
243
- config[sName] = vValue;
244
- break;
245
- case "Locale":
246
- var oLocale = convertToLocaleOrNull(vValue);
247
- if ( oLocale || M_SETTINGS[sName].defaultValue == null ) {
248
- config[sName] = oLocale;
249
- } else {
250
- throw new Error("unsupported value");
251
- }
252
- break;
253
- default:
254
- // When the type is none of the above types, check if an object as enum is provided to validate the value.
255
- var vType = M_SETTINGS[sName].type;
256
- if (typeof vType === "object") {
257
- checkEnum(vType, vValue, sName);
258
- config[sName] = vValue;
259
- } else {
260
- throw new Error("illegal state");
261
- }
262
- }
263
- }
264
-
265
- function getMetaTagValue(sName) {
266
- var oMetaTag = document.querySelector("META[name='" + sName + "']"),
267
- sMetaContent = oMetaTag && oMetaTag.getAttribute("content");
268
- if (sMetaContent) {
269
- return sMetaContent;
270
- }
271
- }
272
-
273
- function validateThemeOrigin(sOrigin) {
274
- var sAllowedOrigins = getMetaTagValue("sap-allowedThemeOrigins");
275
- return !!sAllowedOrigins && sAllowedOrigins.split(",").some(function(sAllowedOrigin) {
276
- return sAllowedOrigin === "*" || sOrigin === sAllowedOrigin.trim();
277
- });
278
- }
279
-
280
- function validateThemeRoot(sThemeRoot) {
281
- var oThemeRoot,
282
- sPath;
283
-
284
- try {
285
- // Remove search query as they are not supported for themeRoots/resourceRoots
286
- oThemeRoot = new URI(sThemeRoot).search("");
287
-
288
- // If the URL is absolute, validate the origin
289
- var sOrigin = oThemeRoot.origin();
290
- if (sOrigin && validateThemeOrigin(sOrigin)) {
291
- sPath = oThemeRoot.toString();
292
- } else {
293
- // For relative URLs or not allowed origins
294
- // ensure same origin and resolve relative paths based on href
295
- sPath = oThemeRoot.absoluteTo(window.location.href).origin(window.location.origin).normalize().toString();
296
- }
297
- return sPath + (sPath.endsWith('/') ? '' : '/') + "UI5/";
298
- } catch (e) {
299
- // malformed URL are also not accepted
300
- }
301
- }
302
-
303
- // collect the defaults
304
- for ( var n in M_SETTINGS ) {
305
- config[n] = M_SETTINGS[n].defaultValue;
306
- }
346
+ var config = this; // eslint-disable-line consistent-this
307
347
 
308
348
  // apply settings from global config object (already merged with script tag attributes)
309
349
  var oCfg = window["sap-ui-config"] || {};
310
350
  oCfg.oninit = oCfg.oninit || oCfg["evt-oninit"];
311
351
  for (var n in M_SETTINGS) {
352
+ // collect the defaults
353
+ config[n] = Array.isArray(M_SETTINGS[n].defaultValue) ? [] : M_SETTINGS[n].defaultValue;
312
354
  if ( oCfg.hasOwnProperty(n.toLowerCase()) ) {
313
- setValue(n, oCfg[n.toLowerCase()]);
355
+ setValue(n, oCfg[n.toLowerCase()], this);
314
356
  } else if ( !/^xx-/.test(n) && oCfg.hasOwnProperty("xx-" + n.toLowerCase()) ) {
315
- setValue(n, oCfg["xx-" + n.toLowerCase()]);
357
+ setValue(n, oCfg["xx-" + n.toLowerCase()], this);
316
358
  }
317
359
  }
318
360
 
@@ -331,7 +373,7 @@ sap.ui.define([
331
373
  function _getCVers(key){
332
374
  var v = !key ? DEFAULT_CVERS || BASE_CVERS.toString()
333
375
  : oCfg[PARAM_CVERS + "-" + key.toLowerCase()] || DEFAULT_CVERS || M_COMPAT_FEATURES[key] || BASE_CVERS.toString();
334
- v = Version(v.toLowerCase() === "edge" ? Global.version : v);
376
+ v = Version(v.toLowerCase() === "edge" ? VERSION : v);
335
377
  //Only major and minor version are relevant
336
378
  return Version(v.getMajor(), v.getMinor());
337
379
  }
@@ -362,16 +404,16 @@ sap.ui.define([
362
404
 
363
405
  // Check sap-locale after sap-language to ensure compatibility if both parameters are provided (e.g. portal iView).
364
406
  if ( oUriParams.has('sap-locale') ) {
365
- setValue("language", oUriParams.get('sap-locale'));
407
+ setValue("language", oUriParams.get('sap-locale'), this);
366
408
  }
367
409
 
368
410
  if (oUriParams.has('sap-rtl')) {
369
411
  // "" = false, "X", "x" = true
370
412
  var sValue = oUriParams.get('sap-rtl');
371
413
  if (sValue === "X" || sValue === "x") {
372
- setValue('rtl', true);
414
+ setValue('rtl', true, this);
373
415
  } else {
374
- setValue('rtl', false);
416
+ setValue('rtl', false, this);
375
417
  }
376
418
  }
377
419
 
@@ -394,13 +436,13 @@ sap.ui.define([
394
436
  // empty URL parameters set the parameter back to its system default
395
437
  config['theme'] = M_SETTINGS['theme'].defaultValue;
396
438
  } else {
397
- setValue('theme', sValue);
439
+ setValue('theme', sValue, this);
398
440
  }
399
441
  }
400
442
 
401
443
  if (oUriParams.has('sap-statistics')) {
402
444
  var sValue = oUriParams.get('sap-statistics');
403
- setValue('statistics', sValue);
445
+ setValue('statistics', sValue, this);
404
446
  }
405
447
 
406
448
  // now analyze sap-ui parameters
@@ -417,7 +459,7 @@ sap.ui.define([
417
459
  config[n] = M_SETTINGS[n].defaultValue;
418
460
  } else {
419
461
  //sets the value (null or empty value ignored)
420
- setValue(n, sValue);
462
+ setValue(n, sValue, this);
421
463
  }
422
464
  }
423
465
  // handle legacy URL params through format settings
@@ -459,6 +501,7 @@ sap.ui.define([
459
501
  if ( sThemeRoot ) {
460
502
  config.theme = sTheme.slice(0, iIndex);
461
503
  config.themeRoot = sThemeRoot;
504
+ config.themeRoots[config.theme] = sThemeRoot;
462
505
  } else {
463
506
  // fallback to non-URL parameter (if not equal to sTheme)
464
507
  config.theme = (oCfg.theme && oCfg.theme !== sTheme) ? oCfg.theme : "base";
@@ -466,7 +509,7 @@ sap.ui.define([
466
509
  }
467
510
  }
468
511
 
469
- config.theme = this._normalizeTheme(config.theme, sThemeRoot);
512
+ config.theme = this.normalizeTheme(config.theme, sThemeRoot);
470
513
 
471
514
  var aCoreLangs = config['languagesDeliveredWithCore'] = Locale._coreI18nLocales;
472
515
  var aLangs = config['xx-supportedLanguages'];
@@ -532,8 +575,8 @@ sap.ui.define([
532
575
  var aCSSLibs = config['preloadLibCss'];
533
576
  if ( aCSSLibs.length > 0 ) {
534
577
  // a leading "!" denotes that the application has loaded the file already
535
- aCSSLibs.appManaged = aCSSLibs[0].slice(0,1) === "!";
536
- if ( aCSSLibs.appManaged ) {
578
+ config.cssAppManaged = aCSSLibs[0].slice(0,1) === "!";
579
+ if ( config.cssAppManaged ) {
537
580
  aCSSLibs[0] = aCSSLibs[0].slice(1); // also affect same array in "config"!
538
581
  }
539
582
  if ( aCSSLibs[0] === "*" ) {
@@ -577,6 +620,22 @@ sap.ui.define([
577
620
  // Validate and set the provided value for the animation mode
578
621
  this.setAnimationMode(this.getAnimationMode());
579
622
  }
623
+
624
+ // The following code can't be done in the _ConfigurationProvider
625
+ // because of cyclic dependency
626
+ var syncCallBehavior = this.getSyncCallBehavior();
627
+ sap.ui.loader.config({
628
+ reportSyncCalls: syncCallBehavior
629
+ });
630
+
631
+ if ( syncCallBehavior && oCfg.__loaded ) {
632
+ var sMessage = "[nosync]: configuration loaded via sync XHR";
633
+ if (syncCallBehavior === 1) {
634
+ Log.warning(sMessage);
635
+ } else {
636
+ Log.error(sMessage);
637
+ }
638
+ }
580
639
  },
581
640
 
582
641
  /**
@@ -592,7 +651,7 @@ sap.ui.define([
592
651
  return this._version;
593
652
  }
594
653
 
595
- this._version = new Version(Global.version);
654
+ this._version = new Version(VERSION);
596
655
  return this._version;
597
656
  },
598
657
 
@@ -617,11 +676,24 @@ sap.ui.define([
617
676
  * @public
618
677
  */
619
678
  getTheme : function () {
620
- return this.theme;
679
+ return this.getValue("theme");
621
680
  },
622
681
 
682
+ /**
683
+ * Get themeRoot for configured theme
684
+ * @returns {string|object} Returns themeRoot for configured theme
685
+ * @private
686
+ */
687
+ getThemeRoot : function () {
688
+ return this.themeRoot;
689
+ },
690
+
691
+ /**
692
+ * Returns whether placeholders are active or not
693
+ * @returns {boolean} Whether placeholders are active or not
694
+ */
623
695
  getPlaceholder : function() {
624
- return this["xx-placeholder"];
696
+ return this.getValue("xx-placeholder");
625
697
  },
626
698
 
627
699
  /**
@@ -630,16 +702,19 @@ sap.ui.define([
630
702
  * @return {this} <code>this</code> to allow method chaining
631
703
  * @private
632
704
  */
633
- _setTheme : function (sTheme) {
705
+ setTheme : function (sTheme) {
634
706
  this.theme = sTheme;
635
707
  return this;
636
708
  },
637
709
 
638
710
  /**
639
711
  * Normalize the given theme, resolve known aliases
712
+ * @param {string} sTheme The theme name
713
+ * @param {string} sThemeBaseUrl The theme's base url
714
+ * @returns {string} The normalized theme name
640
715
  * @private
641
716
  */
642
- _normalizeTheme : function (sTheme, sThemeBaseUrl) {
717
+ normalizeTheme : function (sTheme, sThemeBaseUrl) {
643
718
  if ( sTheme && sThemeBaseUrl == null && sTheme.match(/^sap_corbu$/i) ) {
644
719
  return "sap_fiori_3";
645
720
  }
@@ -678,7 +753,7 @@ sap.ui.define([
678
753
  * @public
679
754
  */
680
755
  getLanguage : function () {
681
- return this.language.sLocaleId;
756
+ return this.getValue("language").sLocaleId;
682
757
  },
683
758
 
684
759
  /**
@@ -693,7 +768,7 @@ sap.ui.define([
693
768
  * @public
694
769
  */
695
770
  getLanguageTag : function () {
696
- return this.language.toLanguageTag();
771
+ return this.getValue("language").toLanguageTag();
697
772
  },
698
773
 
699
774
  /**
@@ -706,7 +781,7 @@ sap.ui.define([
706
781
  * @public
707
782
  */
708
783
  getSAPLogonLanguage : function () {
709
- return (this.sapLogonLanguage && this.sapLogonLanguage.toUpperCase()) || this.language._getSAPLogonLanguage();
784
+ return (this.sapLogonLanguage && this.sapLogonLanguage.toUpperCase()) || this.getValue("language")._getSAPLogonLanguage();
710
785
  },
711
786
 
712
787
  /**
@@ -721,7 +796,7 @@ sap.ui.define([
721
796
  */
722
797
  getTimezone : function () {
723
798
  // TODO Timezone Configuration: re-activate following line when re-enabling Configuration#setTimezone
724
- // return this.timezone;
799
+ // return this.getValue("timezone");
725
800
  return TimezoneUtil.getLocalTimezone();
726
801
  },
727
802
 
@@ -856,7 +931,7 @@ sap.ui.define([
856
931
  * @public
857
932
  */
858
933
  getLocale : function () {
859
- return this.language;
934
+ return this.getValue("language");
860
935
  },
861
936
 
862
937
  /**
@@ -878,7 +953,7 @@ sap.ui.define([
878
953
  * @returns {boolean}
879
954
  */
880
955
  isUI5CacheOn: function () {
881
- return this["xx-cache-use"];
956
+ return this.getValue("xx-cache-use");
882
957
  },
883
958
 
884
959
  /**
@@ -900,7 +975,7 @@ sap.ui.define([
900
975
  * @returns {boolean}
901
976
  */
902
977
  isUI5CacheSerializationSupportOn: function () {
903
- return this["xx-cache-serialization"];
978
+ return this.getValue("xx-cache-serialization");
904
979
  },
905
980
 
906
981
  /**
@@ -923,7 +998,7 @@ sap.ui.define([
923
998
  * @see sap.ui.core.cache.LRUPersistentCache#keyMatchesExclusionStrings
924
999
  */
925
1000
  getUI5CacheExcludedKeys: function () {
926
- return this["xx-cache-excludedKeys"];
1001
+ return this.getValue("xx-cache-excludedKeys");
927
1002
  },
928
1003
 
929
1004
  /**
@@ -936,16 +1011,17 @@ sap.ui.define([
936
1011
  * @since 1.28.6
937
1012
  */
938
1013
  getCalendarType: function() {
939
- var sName;
1014
+ var sName,
1015
+ sCalendarType = this.getValue("calendarType");
940
1016
 
941
- if (this.calendarType) {
1017
+ if (sCalendarType) {
942
1018
  for (sName in CalendarType) {
943
- if (sName.toLowerCase() === this.calendarType.toLowerCase()) {
1019
+ if (sName.toLowerCase() === sCalendarType.toLowerCase()) {
944
1020
  this.calendarType = sName;
945
1021
  return this.calendarType;
946
1022
  }
947
1023
  }
948
- Log.warning("Parameter 'calendarType' is set to " + this.calendarType + " which isn't a valid value and therefore ignored. The calendar type is determined from format setting and current locale");
1024
+ Log.warning("Parameter 'calendarType' is set to " + sCalendarType + " which isn't a valid value and therefore ignored. The calendar type is determined from format setting and current locale");
949
1025
  }
950
1026
 
951
1027
  var sLegacyDateFormat = this.oFormatSettings.getLegacyDateFormat();
@@ -1001,7 +1077,7 @@ sap.ui.define([
1001
1077
  * @public
1002
1078
  */
1003
1079
  getFormatLocale : function () {
1004
- return (this.formatLocale || this.language).toString();
1080
+ return (this.getValue("formatLocale") || this.getValue("language")).toString();
1005
1081
  },
1006
1082
 
1007
1083
  /**
@@ -1037,7 +1113,7 @@ sap.ui.define([
1037
1113
 
1038
1114
  check(sFormatLocale == null || typeof sFormatLocale === "string" && oFormatLocale, "sFormatLocale must be a BCP47 language tag or Java Locale id or null");
1039
1115
 
1040
- if ( toLanguageTag(oFormatLocale) !== toLanguageTag(this.formatLocale) ) {
1116
+ if ( toLanguageTag(oFormatLocale) !== toLanguageTag(this.getValue("formatLocale")) ) {
1041
1117
  this.formatLocale = oFormatLocale;
1042
1118
  mChanges = this._collect();
1043
1119
  mChanges.formatLocale = toLanguageTag(oFormatLocale);
@@ -1061,7 +1137,7 @@ sap.ui.define([
1061
1137
  * @experimental
1062
1138
  */
1063
1139
  getSupportedLanguages : function() {
1064
- return this["xx-supportedLanguages"];
1140
+ return this.getValue("xx-supportedLanguages");
1065
1141
  },
1066
1142
 
1067
1143
  /**
@@ -1070,7 +1146,7 @@ sap.ui.define([
1070
1146
  * @public
1071
1147
  */
1072
1148
  getAccessibility : function () {
1073
- return this.accessibility;
1149
+ return this.getValue("accessibility");
1074
1150
  },
1075
1151
 
1076
1152
  /**
@@ -1081,7 +1157,7 @@ sap.ui.define([
1081
1157
  * @public
1082
1158
  */
1083
1159
  getAutoAriaBodyRole : function () {
1084
- return this.autoAriaBodyRole;
1160
+ return this.getValue("autoAriaBodyRole");
1085
1161
  },
1086
1162
 
1087
1163
  /**
@@ -1091,7 +1167,7 @@ sap.ui.define([
1091
1167
  * @deprecated As of version 1.50.0, replaced by {@link sap.ui.core.Configuration#getAnimationMode}
1092
1168
  */
1093
1169
  getAnimation : function () {
1094
- return this.animation;
1170
+ return this.getValue("animation");
1095
1171
  },
1096
1172
 
1097
1173
  /**
@@ -1102,7 +1178,7 @@ sap.ui.define([
1102
1178
  * @public
1103
1179
  */
1104
1180
  getAnimationMode : function () {
1105
- return this.animationMode;
1181
+ return this.getValue("animationMode");
1106
1182
  },
1107
1183
 
1108
1184
  /**
@@ -1143,7 +1219,7 @@ sap.ui.define([
1143
1219
  */
1144
1220
  getRTL : function () {
1145
1221
  // if rtl has not been set (still null), return the rtl mode derived from the language
1146
- return this.rtl === null ? this.derivedRTL : this.rtl;
1222
+ return this.getValue("rtl") === null ? this.derivedRTL : this.getValue("rtl");
1147
1223
  },
1148
1224
 
1149
1225
  /**
@@ -1153,7 +1229,7 @@ sap.ui.define([
1153
1229
  * @public
1154
1230
  */
1155
1231
  getFiori2Adaptation : function () {
1156
- return this["xx-fiori2Adaptation"];
1232
+ return this.getValue("xx-fiori2Adaptation");
1157
1233
  },
1158
1234
 
1159
1235
  /**
@@ -1189,22 +1265,26 @@ sap.ui.define([
1189
1265
  },
1190
1266
 
1191
1267
  /**
1192
- * Returns whether the page runs in debug mode.
1193
- * @return {boolean} whether the page runs in debug mode
1268
+ * Returns whether the page runs in full debug mode.
1269
+ * @returns {boolean} Whether the page runs in full debug mode
1194
1270
  * @public
1195
1271
  */
1196
1272
  getDebug : function () {
1197
- return this.debug;
1273
+ // Configuration only maintains a flag for the full debug mode.
1274
+ // ui5loader-autoconfig calculates detailed information also for the partial debug
1275
+ // mode and writes it to window["sap-ui-debug"].
1276
+ // Only a value of true must be reflected by this getter
1277
+ return window["sap-ui-debug"] === true || this.getValue("debug");
1198
1278
  },
1199
1279
 
1200
1280
  /**
1201
- * Returns whether the UI5 control inspector is displayed.
1281
+ * Returns whether the UI5 control inspe ctor is displayed.
1202
1282
  * Has only an effect when the sap-ui-debug module has been loaded
1203
1283
  * @return {boolean} whether the UI5 control inspector is displayed
1204
1284
  * @public
1205
1285
  */
1206
1286
  getInspect : function () {
1207
- return this.inspect;
1287
+ return this.getValue("inspect");
1208
1288
  },
1209
1289
 
1210
1290
  /**
@@ -1213,7 +1293,7 @@ sap.ui.define([
1213
1293
  * @public
1214
1294
  */
1215
1295
  getOriginInfo : function () {
1216
- return this.originInfo;
1296
+ return this.getValue("originInfo");
1217
1297
  },
1218
1298
 
1219
1299
  /**
@@ -1222,7 +1302,7 @@ sap.ui.define([
1222
1302
  * @public
1223
1303
  */
1224
1304
  getNoDuplicateIds : function () {
1225
- return this.noDuplicateIds;
1305
+ return this.getValue("noDuplicateIds");
1226
1306
  },
1227
1307
 
1228
1308
  /**
@@ -1233,7 +1313,7 @@ sap.ui.define([
1233
1313
  * @return {boolean} whether a trace view should be shown
1234
1314
  */
1235
1315
  getTrace : function () {
1236
- return this.trace;
1316
+ return this.getValue("trace");
1237
1317
  },
1238
1318
 
1239
1319
  /**
@@ -1244,7 +1324,7 @@ sap.ui.define([
1244
1324
  * @public
1245
1325
  */
1246
1326
  getUIDPrefix : function() {
1247
- return this.uidPrefix;
1327
+ return this.getValue("uidPrefix");
1248
1328
  },
1249
1329
 
1250
1330
 
@@ -1254,10 +1334,10 @@ sap.ui.define([
1254
1334
  * @returns {boolean} whether the design mode is active or not.
1255
1335
  * @since 1.13.2
1256
1336
  * @private
1257
- * @ui5-restricted sap.watt, com.sap.webide, sap.ui.fl, sap.ui.rta, sap.ui.comp, SAP Business Application Studio
1337
+ * @ui5-restricted sap.ui.core.Core, sap.watt, com.sap.webide, sap.ui.fl, sap.ui.rta, sap.ui.comp, SAP Business Application Studio
1258
1338
  */
1259
1339
  getDesignMode : function() {
1260
- return this["xx-designMode"];
1340
+ return this.getValue("xx-designMode");
1261
1341
  },
1262
1342
 
1263
1343
  /**
@@ -1269,7 +1349,7 @@ sap.ui.define([
1269
1349
  * @ui5-restricted sap.watt, com.sap.webide
1270
1350
  */
1271
1351
  getSuppressDeactivationOfControllerCode : function() {
1272
- return this["xx-suppressDeactivationOfControllerCode"];
1352
+ return this.getValue("xx-suppressDeactivationOfControllerCode");
1273
1353
  },
1274
1354
 
1275
1355
  /**
@@ -1292,7 +1372,7 @@ sap.ui.define([
1292
1372
  * @deprecated Since 1.15.1. Please use {@link module:sap/ui/core/ComponentSupport} instead. See also {@link topic:82a0fcecc3cb427c91469bc537ebdddf Declarative API for Initial Components}.
1293
1373
  */
1294
1374
  getApplication : function() {
1295
- return this.application;
1375
+ return this.getValue("application");
1296
1376
  },
1297
1377
 
1298
1378
  /**
@@ -1303,7 +1383,7 @@ sap.ui.define([
1303
1383
  * @deprecated Since 1.95. Please use {@link module:sap/ui/core/ComponentSupport} instead. See also {@link topic:82a0fcecc3cb427c91469bc537ebdddf Declarative API for Initial Components}.
1304
1384
  */
1305
1385
  getRootComponent : function() {
1306
- return this.rootComponent;
1386
+ return this.getValue("rootComponent");
1307
1387
  },
1308
1388
 
1309
1389
  /**
@@ -1313,7 +1393,7 @@ sap.ui.define([
1313
1393
  * @public
1314
1394
  */
1315
1395
  getAppCacheBuster : function() {
1316
- return this.appCacheBuster;
1396
+ return this.getValue("appCacheBuster");
1317
1397
  },
1318
1398
 
1319
1399
  /**
@@ -1323,7 +1403,7 @@ sap.ui.define([
1323
1403
  * @public
1324
1404
  */
1325
1405
  getAppCacheBusterMode : function() {
1326
- return this["xx-appCacheBusterMode"];
1406
+ return this.getValue("xx-appCacheBusterMode");
1327
1407
  },
1328
1408
 
1329
1409
  /**
@@ -1335,7 +1415,7 @@ sap.ui.define([
1335
1415
  * @ui5-restricted
1336
1416
  */
1337
1417
  getAppCacheBusterHooks : function() {
1338
- return this["xx-appCacheBusterHooks"];
1418
+ return this.getValue("xx-appCacheBusterHooks");
1339
1419
  },
1340
1420
 
1341
1421
  /**
@@ -1346,7 +1426,7 @@ sap.ui.define([
1346
1426
  * @ui5-restricted
1347
1427
  */
1348
1428
  getDisableCustomizing : function() {
1349
- return this["xx-disableCustomizing"];
1429
+ return this.getValue("xx-disableCustomizing");
1350
1430
  },
1351
1431
 
1352
1432
  /**
@@ -1358,7 +1438,7 @@ sap.ui.define([
1358
1438
  * @experimental Since 1.44
1359
1439
  */
1360
1440
  getViewCache : function() {
1361
- return this["xx-viewCache"];
1441
+ return this.getValue("xx-viewCache");
1362
1442
  },
1363
1443
 
1364
1444
  /**
@@ -1366,10 +1446,45 @@ sap.ui.define([
1366
1446
  *
1367
1447
  * @returns {string} preload mode
1368
1448
  * @private
1449
+ * @ui5-restricted sap.ui.core.Core
1369
1450
  * @since 1.16.3
1370
1451
  */
1371
1452
  getPreload : function() {
1372
- return this.preload;
1453
+ // determine preload mode (e.g. resolve default or auto)
1454
+ var sPreloadMode = this.getValue("preload");
1455
+ // if debug sources are requested, then the preload feature must be deactivated
1456
+ if ( this.getDebug() === true ) {
1457
+ sPreloadMode = "";
1458
+ }
1459
+ // when the preload mode is 'auto', it will be set to 'async' or 'sync' for optimized sources
1460
+ // depending on whether the ui5loader is configured async
1461
+ if ( sPreloadMode === "auto" ) {
1462
+ if (window["sap-ui-optimized"]) {
1463
+ sPreloadMode = sap.ui.loader.config().async ? "async" : "sync";
1464
+ } else {
1465
+ sPreloadMode = "";
1466
+ }
1467
+ }
1468
+ return sPreloadMode;
1469
+ },
1470
+
1471
+ /**
1472
+ * Currently active syncCallBehavior
1473
+ *
1474
+ * @returns {int} syncCallBehavior
1475
+ * @private
1476
+ * @ui5-restricted sap.ui.core
1477
+ * @since 1.106.0
1478
+ */
1479
+ getSyncCallBehavior : function() {
1480
+ var syncCallBehavior = 0; // ignore
1481
+ if ( this.getValue('xx-nosync') === 'warn' || /(?:\?|&)sap-ui-xx-nosync=(?:warn)/.exec(window.location.search) ) {
1482
+ syncCallBehavior = 1;
1483
+ }
1484
+ if ( this.getValue('xx-nosync') === true || this.getValue('xx-nosync') === 'true' || /(?:\?|&)sap-ui-xx-nosync=(?:x|X|true)/.exec(window.location.search) ) {
1485
+ syncCallBehavior = 2;
1486
+ }
1487
+ return syncCallBehavior;
1373
1488
  },
1374
1489
 
1375
1490
  /**
@@ -1379,7 +1494,7 @@ sap.ui.define([
1379
1494
  * @private
1380
1495
  */
1381
1496
  getDepCache : function() {
1382
- return this["xx-depCache"];
1497
+ return this.getValue("xx-depCache");
1383
1498
  },
1384
1499
 
1385
1500
  /**
@@ -1390,33 +1505,32 @@ sap.ui.define([
1390
1505
  * @since 1.33.0
1391
1506
  */
1392
1507
  getManifestFirst : function() {
1393
- return this.manifestFirst;
1508
+ return this.getValue("manifestFirst");
1394
1509
  },
1395
1510
 
1396
1511
  /**
1397
1512
  * Returns the URL from where the UI5 flexibility services are called;
1398
1513
  * if empty, the flexibility services are not called.
1399
1514
  *
1400
- * @returns {string} URL from where the flexibility services are requested
1515
+ * @returns {object[]} Flexibility services configuration
1401
1516
  * @public
1402
1517
  * @since 1.60.0
1403
1518
  */
1404
1519
  getFlexibilityServices : function() {
1405
- if (!this.flexibilityServices) {
1406
- this.flexibilityServices = [];
1407
- }
1520
+ var vFlexibilityServices = this.getValue("flexibilityServices") || [];
1408
1521
 
1409
- if (typeof this.flexibilityServices === 'string') {
1410
- if (this.flexibilityServices[0] === "/") {
1411
- this.flexibilityServices = [{
1412
- url : this.flexibilityServices,
1522
+ if (typeof vFlexibilityServices === 'string') {
1523
+ if (vFlexibilityServices[0] === "/") {
1524
+ vFlexibilityServices = [{
1525
+ url : vFlexibilityServices,
1413
1526
  layers : ["ALL"],
1414
1527
  connector : "LrepConnector"
1415
1528
  }];
1416
1529
  } else {
1417
- this.flexibilityServices = JSON.parse(this.flexibilityServices);
1530
+ vFlexibilityServices = JSON.parse(vFlexibilityServices);
1418
1531
  }
1419
1532
  }
1533
+ this.flexibilityServices = vFlexibilityServices;
1420
1534
 
1421
1535
  return this.flexibilityServices;
1422
1536
  },
@@ -1437,7 +1551,7 @@ sap.ui.define([
1437
1551
  * @since 1.73.0
1438
1552
  */
1439
1553
  setFlexibilityServices: function (aFlexibilityServices) {
1440
- this.flexibilityServices = aFlexibilityServices;
1554
+ this.flexibilityServices = aFlexibilityServices.slice();
1441
1555
  },
1442
1556
 
1443
1557
  /**
@@ -1448,7 +1562,7 @@ sap.ui.define([
1448
1562
  * @experimental Since 1.16.3, might change completely.
1449
1563
  */
1450
1564
  getComponentPreload : function() {
1451
- return this['xx-componentPreload'] || this.preload;
1565
+ return this.getValue("xx-componentPreload") || this.getPreload();
1452
1566
  },
1453
1567
 
1454
1568
  /**
@@ -1468,7 +1582,7 @@ sap.ui.define([
1468
1582
  * @public
1469
1583
  */
1470
1584
  getFrameOptions : function() {
1471
- return this.frameOptions;
1585
+ return this.getValue("frameOptions");
1472
1586
  },
1473
1587
 
1474
1588
  /**
@@ -1491,7 +1605,7 @@ sap.ui.define([
1491
1605
  * @public
1492
1606
  */
1493
1607
  getAllowlistService : function() {
1494
- return this.allowlistService;
1608
+ return this.getValue("allowlistService");
1495
1609
  },
1496
1610
 
1497
1611
  /**
@@ -1506,7 +1620,7 @@ sap.ui.define([
1506
1620
  * @since 1.102
1507
1621
  */
1508
1622
  getFileShareSupport : function() {
1509
- return this.fileShareSupport || undefined;
1623
+ return this.getValue("fileShareSupport") || undefined;
1510
1624
  },
1511
1625
 
1512
1626
  /**
@@ -1516,7 +1630,7 @@ sap.ui.define([
1516
1630
  * @experimental
1517
1631
  */
1518
1632
  getSupportMode : function() {
1519
- return this.support;
1633
+ return this.getValue("support");
1520
1634
  },
1521
1635
 
1522
1636
  /**
@@ -1526,7 +1640,7 @@ sap.ui.define([
1526
1640
  * @experimental
1527
1641
  */
1528
1642
  getTestRecorderMode : function() {
1529
- return this["testRecorder"];
1643
+ return this.getValue("testRecorder");
1530
1644
  },
1531
1645
 
1532
1646
  _collect : function() {
@@ -1552,10 +1666,25 @@ sap.ui.define([
1552
1666
  *
1553
1667
  * @returns {boolean} statistics flag
1554
1668
  * @private
1669
+ * @deprecated since 1.106.0. Renamed for clarity, use {@link sap.ui.core.Configuration#getStatisticsEnabled} instead
1555
1670
  * @since 1.20.0
1556
1671
  */
1557
1672
  getStatistics : function() {
1558
- var result = this.statistics;
1673
+ return this.getStatisticsEnabled();
1674
+ },
1675
+
1676
+ /**
1677
+ * Flag if statistics are requested.
1678
+ *
1679
+ * Flag set by TechnicalInfo Popup will also be checked.
1680
+ * So its active if set by URL parameter or manually via TechnicalInfo.
1681
+ *
1682
+ * @returns {boolean} Whether statistics are enabled
1683
+ * @public
1684
+ * @since 1.106.0
1685
+ */
1686
+ getStatisticsEnabled : function() {
1687
+ var result = this.getValue("statistics");
1559
1688
  try {
1560
1689
  result = result || window.localStorage.getItem("sap-ui-statistics") == "X";
1561
1690
  } catch (e) {
@@ -1584,7 +1713,7 @@ sap.ui.define([
1584
1713
  * @private
1585
1714
  */
1586
1715
  getHandleValidation : function() {
1587
- return this["xx-handleValidation"];
1716
+ return this.getValue("xx-handleValidation");
1588
1717
  },
1589
1718
 
1590
1719
  /**
@@ -1594,7 +1723,7 @@ sap.ui.define([
1594
1723
  * @private
1595
1724
  */
1596
1725
  getHyphenation : function() {
1597
- return this["xx-hyphenation"];
1726
+ return this.getValue("xx-hyphenation");
1598
1727
  },
1599
1728
 
1600
1729
  /**
@@ -1605,18 +1734,18 @@ sap.ui.define([
1605
1734
  * @experimental
1606
1735
  */
1607
1736
  getAccKeys: function () {
1608
- return this["xx-acc-keys"];
1737
+ return this.getValue("xx-acc-keys");
1609
1738
  },
1610
1739
 
1611
1740
  /**
1612
1741
  * Returns the list of active terminologies defined via the Configuration.
1613
1742
  *
1614
- * @returns {string[]} if no active terminologies are set, the default value <code>undefined</code> is returned.
1743
+ * @returns {string[]|undefined} if no active terminologies are set, the default value <code>undefined</code> is returned.
1615
1744
  * @since 1.77.0
1616
1745
  * @public
1617
1746
  */
1618
1747
  getActiveTerminologies : function() {
1619
- return this["activeTerminologies"];
1748
+ return this.getValue("activeTerminologies");
1620
1749
  },
1621
1750
 
1622
1751
  /**
@@ -1628,7 +1757,7 @@ sap.ui.define([
1628
1757
  * @see #setSecurityTokenHandlers
1629
1758
  */
1630
1759
  getSecurityTokenHandlers : function () {
1631
- return this.securityTokenHandlers.slice();
1760
+ return this.getValue("securityTokenHandlers").slice();
1632
1761
  },
1633
1762
 
1634
1763
  /**
@@ -1648,6 +1777,18 @@ sap.ui.define([
1648
1777
  this.securityTokenHandlers = aSecurityTokenHandlers.slice();
1649
1778
  },
1650
1779
 
1780
+ /**
1781
+ * Returns whether preload lib CSS is app managed or not
1782
+ *
1783
+ * @returns {boolean} whether preload lib CSS is app managed or not
1784
+ * @private
1785
+ * @ui5-restricted sap.ui.core.Core
1786
+ * @since 1.106.0
1787
+ */
1788
+ getCssAppManaged: function () {
1789
+ return !!this.cssAppManaged;
1790
+ },
1791
+
1651
1792
  /**
1652
1793
  * Applies multiple changes to the configuration at once.
1653
1794
  *
@@ -1704,8 +1845,74 @@ sap.ui.define([
1704
1845
  this._endCollect(); // might fire localizationChanged
1705
1846
 
1706
1847
  return this;
1707
- }
1848
+ },
1849
+
1850
+ /**
1851
+ * Function to pass core instance to configuration. Should be only used by core constructor.
1852
+ *
1853
+ * @param {sap.ui.core.Core} oCore Instance of 'real' core
1854
+ *
1855
+ * @private
1856
+ * @ui5-restricted sap.ui.core.Core
1857
+ */
1858
+ setCore: function (oCore) {
1859
+ // Setting the core needs to happen before init
1860
+ // because getValue relies on _oCore and is used in init
1861
+ this._oCore = oCore;
1862
+ this.init();
1863
+ },
1864
+
1865
+ /**
1866
+ * Generic getter for configuration options that are not explicitly exposed via a dedicated own getter.
1867
+ *
1868
+ * For now, this getter only supports configuration options that are known to Configuration.js
1869
+ * (as maintained in the M_SETTINGS, see code).
1870
+ *
1871
+ * @param {string} sName Name of the configuration parameter, must be a key of M_SETTINGS
1872
+ * @returns {any} Value of the configuration parameter, will be of the type specified in M_SETTINGS
1873
+ *
1874
+ * @private
1875
+ * @ui5-restricted sap.ui.core.Core jquery.sap.global
1876
+ * @since 1.106
1877
+ */
1878
+ getValue: function(sName) {
1879
+ var vValue;
1880
+ if (typeof sName !== "string" || !Object.prototype.hasOwnProperty.call(M_SETTINGS, sName)) {
1881
+ throw new TypeError(
1882
+ "Parameter 'sName' must be the name of a valid configuration option (one of "
1883
+ + Object.keys(M_SETTINGS).map(function(key) {
1884
+ return "'" + key + "'";
1885
+ }).sort().join(", ")
1886
+ + ")"
1887
+ );
1888
+ }
1708
1889
 
1890
+ // Until the Configuration is initialized we return the configuration value either from the instance
1891
+ // (if a setter was called), from URL or window["sap-ui-config"].
1892
+ // In case there is no value or the type conversion fails we return the defaultValue.
1893
+ // After the Configuration is initialized we only return the value of the configuration.
1894
+ if (this.bInitialized || this.hasOwnProperty(sName)) {
1895
+ vValue = this[sName];
1896
+ } else {
1897
+ if (!this.ignoreUrlParams && !M_SETTINGS[sName].noUrl) {
1898
+ var oUriParams = UriParameters.fromQuery(window.location.search);
1899
+ vValue = oUriParams.get("sap-ui-" + sName) || oUriParams.get("sap-" + sName);
1900
+ }
1901
+ vValue = vValue ? vValue : window["sap-ui-config"][sName] || window["sap-ui-config"][sName.toLowerCase()];
1902
+ try {
1903
+ vValue = vValue === undefined ? M_SETTINGS[sName].defaultValue : convertToType(sName, vValue);
1904
+ } catch (error) {
1905
+ // If type conversion fails return defaultValue
1906
+ vValue = M_SETTINGS[sName].defaultValue;
1907
+ }
1908
+ }
1909
+ // Return copy of array or object instead of reference
1910
+ if (typeof M_SETTINGS[sName].type === "string" &&
1911
+ (M_SETTINGS[sName].type.endsWith("[]") || M_SETTINGS[sName].type === "object")) {
1912
+ vValue = deepClone(vValue);
1913
+ }
1914
+ return vValue;
1915
+ }
1709
1916
  });
1710
1917
 
1711
1918
  /**
@@ -1718,31 +1925,7 @@ sap.ui.define([
1718
1925
  * @since 1.50.0
1719
1926
  * @public
1720
1927
  */
1721
- Configuration.AnimationMode = {
1722
- /**
1723
- * <code>full</code> represents a mode with unrestricted animation capabilities.
1724
- * @public
1725
- */
1726
- full : "full",
1727
-
1728
- /**
1729
- * <code>basic</code> can be used for a reduced, more light-weight set of animations.
1730
- * @public
1731
- */
1732
- basic : "basic",
1733
-
1734
- /**
1735
- * <code>minimal</code> includes animations of fundamental functionality.
1736
- * @public
1737
- */
1738
- minimal : "minimal",
1739
-
1740
- /**
1741
- * <code>none</code> deactivates the animation completely.
1742
- * @public
1743
- */
1744
- none : "none"
1745
- };
1928
+ Configuration.AnimationMode = M_ANIMATION_MODE;
1746
1929
 
1747
1930
  /*
1748
1931
  * Helper that creates a Locale object from the given language
@@ -1877,7 +2060,7 @@ sap.ui.define([
1877
2060
  */
1878
2061
  getFormatLocale : function() {
1879
2062
  function fallback(that) {
1880
- var oLocale = that.oConfiguration.language;
2063
+ var oLocale = that.oConfiguration.getValue("language");
1881
2064
  // if any user settings have been defined, add the private use subtag "sapufmt"
1882
2065
  if ( !isEmptyObject(that.mSettings) ) {
1883
2066
  // TODO move to Locale/LocaleData
@@ -1891,7 +2074,7 @@ sap.ui.define([
1891
2074
  }
1892
2075
  return oLocale;
1893
2076
  }
1894
- return this.oConfiguration.formatLocale || fallback(this);
2077
+ return this.oConfiguration.getValue("formatLocale") || fallback(this);
1895
2078
  },
1896
2079
 
1897
2080
  _set : function(sKey, oValue) {
@@ -2391,7 +2574,7 @@ sap.ui.define([
2391
2574
  check(Array.isArray(aMappings), "aMappings must be an Array");
2392
2575
 
2393
2576
  var mChanges = this.oConfiguration._collect();
2394
- this.aLegacyDateCalendarCustomizing = mChanges.legacyDateCalendarCustomizing = aMappings;
2577
+ this.aLegacyDateCalendarCustomizing = mChanges.legacyDateCalendarCustomizing = aMappings.slice();
2395
2578
  this.oConfiguration._endCollect();
2396
2579
  return this;
2397
2580
  },
@@ -2403,7 +2586,11 @@ sap.ui.define([
2403
2586
  * @public
2404
2587
  */
2405
2588
  getLegacyDateCalendarCustomizing : function() {
2406
- return this.aLegacyDateCalendarCustomizing;
2589
+ var aLegacyDateCalendarCustomizing = this.aLegacyDateCalendarCustomizing;
2590
+ if (aLegacyDateCalendarCustomizing) {
2591
+ aLegacyDateCalendarCustomizing = aLegacyDateCalendarCustomizing.slice();
2592
+ }
2593
+ return aLegacyDateCalendarCustomizing;
2407
2594
  },
2408
2595
 
2409
2596
  /**
@@ -2436,7 +2623,7 @@ sap.ui.define([
2436
2623
  * @public
2437
2624
  */
2438
2625
  getTrailingCurrencyCode : function() {
2439
- return this.oConfiguration.trailingCurrencyCode;
2626
+ return this.oConfiguration.getValue("trailingCurrencyCode");
2440
2627
  },
2441
2628
 
2442
2629
  /*
@@ -2449,6 +2636,8 @@ sap.ui.define([
2449
2636
  }
2450
2637
  });
2451
2638
 
2639
+ oConfiguration = new Configuration();
2640
+ Object.assign(Configuration, oConfiguration.getInterface());
2452
2641
  return Configuration;
2453
2642
 
2454
2643
  });