@openui5/sap.ui.core 1.113.0 → 1.114.1

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 (375) hide show
  1. package/.dtsgenrc +86 -0
  2. package/THIRDPARTY.txt +1 -1
  3. package/package.json +1 -1
  4. package/src/jquery.sap.global.js +10 -4
  5. package/src/jquery.sap.properties.js +1 -1
  6. package/src/jquery.sap.resources.js +1 -1
  7. package/src/jquery.sap.script.js +1 -1
  8. package/src/jquery.sap.storage.js +3 -3
  9. package/src/jquery.sap.trace.js +14 -14
  10. package/src/sap/base/Log.js +92 -8
  11. package/src/sap/base/assert.js +1 -1
  12. package/src/sap/base/config/MemoryConfigurationProvider.js +22 -0
  13. package/src/sap/base/config.js +54 -0
  14. package/src/sap/base/util/Deferred.js +3 -2
  15. package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
  16. package/src/sap/base/util/restricted/_castArray.js +1 -1
  17. package/src/sap/base/util/restricted/_compact.js +1 -1
  18. package/src/sap/base/util/restricted/_curry.js +1 -1
  19. package/src/sap/base/util/restricted/_debounce.js +1 -1
  20. package/src/sap/base/util/restricted/_difference.js +1 -1
  21. package/src/sap/base/util/restricted/_differenceBy.js +1 -1
  22. package/src/sap/base/util/restricted/_differenceWith.js +1 -1
  23. package/src/sap/base/util/restricted/_flatMap.js +1 -1
  24. package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
  25. package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
  26. package/src/sap/base/util/restricted/_flatten.js +1 -1
  27. package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
  28. package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
  29. package/src/sap/base/util/restricted/_intersection.js +1 -1
  30. package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
  31. package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
  32. package/src/sap/base/util/restricted/_isEqual.js +1 -1
  33. package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
  34. package/src/sap/base/util/restricted/_isNil.js +1 -1
  35. package/src/sap/base/util/restricted/_max.js +1 -1
  36. package/src/sap/base/util/restricted/_merge.js +1 -1
  37. package/src/sap/base/util/restricted/_mergeWith.js +1 -1
  38. package/src/sap/base/util/restricted/_min.js +1 -1
  39. package/src/sap/base/util/restricted/_omit.js +1 -1
  40. package/src/sap/base/util/restricted/_pick.js +1 -1
  41. package/src/sap/base/util/restricted/_pickBy.js +1 -1
  42. package/src/sap/base/util/restricted/_throttle.js +1 -1
  43. package/src/sap/base/util/restricted/_toArray.js +1 -1
  44. package/src/sap/base/util/restricted/_union.js +1 -1
  45. package/src/sap/base/util/restricted/_unionBy.js +1 -1
  46. package/src/sap/base/util/restricted/_unionWith.js +1 -1
  47. package/src/sap/base/util/restricted/_uniq.js +1 -1
  48. package/src/sap/base/util/restricted/_uniqBy.js +1 -1
  49. package/src/sap/base/util/restricted/_uniqWith.js +1 -1
  50. package/src/sap/base/util/restricted/_without.js +1 -1
  51. package/src/sap/base/util/restricted/_xor.js +1 -1
  52. package/src/sap/base/util/restricted/_xorBy.js +1 -1
  53. package/src/sap/base/util/restricted/_xorWith.js +1 -1
  54. package/src/sap/base/util/restricted/_zipObject.js +1 -1
  55. package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
  56. package/src/sap/ui/Device.js +8 -3
  57. package/src/sap/ui/Global.js +4 -4
  58. package/src/sap/ui/base/BindingParser.js +79 -18
  59. package/src/sap/ui/base/Event.js +1 -1
  60. package/src/sap/ui/base/EventProvider.js +1 -1
  61. package/src/sap/ui/base/Interface.js +1 -1
  62. package/src/sap/ui/base/ManagedObject.js +13 -12
  63. package/src/sap/ui/base/ManagedObjectMetadata.js +26 -24
  64. package/src/sap/ui/base/Metadata.js +1 -1
  65. package/src/sap/ui/base/Object.js +1 -1
  66. package/src/sap/ui/base/ObjectPool.js +1 -1
  67. package/src/sap/ui/core/.library +1 -1
  68. package/src/sap/ui/core/BusyIndicator.js +4 -4
  69. package/src/sap/ui/core/Component.js +3 -3
  70. package/src/sap/ui/core/ComponentContainer.js +1 -1
  71. package/src/sap/ui/core/ComponentMetadata.js +3 -1
  72. package/src/sap/ui/core/ComponentSupport.js +1 -1
  73. package/src/sap/ui/core/Configuration.js +47 -37
  74. package/src/sap/ui/core/Control.js +2 -2
  75. package/src/sap/ui/core/Core.js +36 -15
  76. package/src/sap/ui/core/CustomData.js +1 -1
  77. package/src/sap/ui/core/DeclarativeSupport.js +1 -1
  78. package/src/sap/ui/core/Element.js +1 -1
  79. package/src/sap/ui/core/ElementMetadata.js +17 -3
  80. package/src/sap/ui/core/EnabledPropagator.js +1 -1
  81. package/src/sap/ui/core/EventBus.js +4 -4
  82. package/src/sap/ui/core/Fragment.js +1 -1
  83. package/src/sap/ui/core/HTML.js +1 -1
  84. package/src/sap/ui/core/History.js +1 -1
  85. package/src/sap/ui/core/Icon.js +1 -1
  86. package/src/sap/ui/core/IconPool.js +17 -2
  87. package/src/sap/ui/core/IndicationColorSupport.js +1 -1
  88. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  89. package/src/sap/ui/core/InvisibleMessage.js +1 -1
  90. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  91. package/src/sap/ui/core/InvisibleText.js +1 -1
  92. package/src/sap/ui/core/Item.js +1 -1
  93. package/src/sap/ui/core/LabelEnablement.js +1 -1
  94. package/src/sap/ui/core/LayoutData.js +1 -1
  95. package/src/sap/ui/core/Lib.js +27 -1
  96. package/src/sap/ui/core/ListItem.js +1 -1
  97. package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
  98. package/src/sap/ui/core/Locale.js +1 -1
  99. package/src/sap/ui/core/LocaleData.js +2 -2
  100. package/src/sap/ui/core/Manifest.js +2 -2
  101. package/src/sap/ui/core/Message.js +1 -1
  102. package/src/sap/ui/core/Popup.js +15 -9
  103. package/src/sap/ui/core/RenderManager.js +2 -2
  104. package/src/sap/ui/core/Renderer.js +1 -1
  105. package/src/sap/ui/core/Rendering.js +2 -3
  106. package/src/sap/ui/core/ResizeHandler.js +2 -2
  107. package/src/sap/ui/core/ScrollBar.js +1 -1
  108. package/src/sap/ui/core/SeparatorItem.js +1 -1
  109. package/src/sap/ui/core/Title.js +1 -1
  110. package/src/sap/ui/core/TooltipBase.js +1 -1
  111. package/src/sap/ui/core/UIArea.js +9 -2
  112. package/src/sap/ui/core/UIComponent.js +14 -12
  113. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  114. package/src/sap/ui/core/ValueStateSupport.js +1 -1
  115. package/src/sap/ui/core/VariantLayoutData.js +1 -1
  116. package/src/sap/ui/core/XMLComposite.js +1 -1
  117. package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
  118. package/src/sap/ui/core/XMLTemplateProcessor.js +30 -6
  119. package/src/sap/ui/core/date/UI5Date.js +14 -8
  120. package/src/sap/ui/core/date/UniversalDate.js +15 -53
  121. package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
  122. package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
  123. package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
  124. package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
  125. package/src/sap/ui/core/dnd/DragInfo.js +1 -1
  126. package/src/sap/ui/core/dnd/DropInfo.js +1 -1
  127. package/src/sap/ui/core/format/DateFormat.js +63 -29
  128. package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
  129. package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
  130. package/src/sap/ui/core/library.js +3 -3
  131. package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
  132. package/src/sap/ui/core/message/Message.js +1 -1
  133. package/src/sap/ui/core/message/MessageManager.js +1 -1
  134. package/src/sap/ui/core/message/MessageParser.js +1 -1
  135. package/src/sap/ui/core/message/MessageProcessor.js +1 -1
  136. package/src/sap/ui/core/messagebundle.properties +2 -0
  137. package/src/sap/ui/core/messagebundle_ar.properties +1 -0
  138. package/src/sap/ui/core/messagebundle_bg.properties +1 -0
  139. package/src/sap/ui/core/messagebundle_ca.properties +1 -0
  140. package/src/sap/ui/core/messagebundle_cs.properties +1 -0
  141. package/src/sap/ui/core/messagebundle_cy.properties +1 -0
  142. package/src/sap/ui/core/messagebundle_da.properties +1 -0
  143. package/src/sap/ui/core/messagebundle_de.properties +1 -0
  144. package/src/sap/ui/core/messagebundle_el.properties +1 -0
  145. package/src/sap/ui/core/messagebundle_en.properties +1 -0
  146. package/src/sap/ui/core/messagebundle_en_GB.properties +1 -0
  147. package/src/sap/ui/core/messagebundle_en_US_sappsd.properties +1 -0
  148. package/src/sap/ui/core/messagebundle_en_US_saprigi.properties +1 -0
  149. package/src/sap/ui/core/messagebundle_es.properties +1 -0
  150. package/src/sap/ui/core/messagebundle_es_MX.properties +1 -0
  151. package/src/sap/ui/core/messagebundle_et.properties +1 -0
  152. package/src/sap/ui/core/messagebundle_fi.properties +1 -0
  153. package/src/sap/ui/core/messagebundle_fr.properties +1 -0
  154. package/src/sap/ui/core/messagebundle_fr_CA.properties +1 -0
  155. package/src/sap/ui/core/messagebundle_hi.properties +1 -0
  156. package/src/sap/ui/core/messagebundle_hr.properties +1 -0
  157. package/src/sap/ui/core/messagebundle_hu.properties +1 -0
  158. package/src/sap/ui/core/messagebundle_id.properties +1 -0
  159. package/src/sap/ui/core/messagebundle_it.properties +1 -0
  160. package/src/sap/ui/core/messagebundle_iw.properties +1 -0
  161. package/src/sap/ui/core/messagebundle_ja.properties +1 -0
  162. package/src/sap/ui/core/messagebundle_kk.properties +1 -0
  163. package/src/sap/ui/core/messagebundle_ko.properties +2 -1
  164. package/src/sap/ui/core/messagebundle_lt.properties +1 -0
  165. package/src/sap/ui/core/messagebundle_lv.properties +1 -0
  166. package/src/sap/ui/core/messagebundle_ms.properties +2 -1
  167. package/src/sap/ui/core/messagebundle_nl.properties +1 -0
  168. package/src/sap/ui/core/messagebundle_no.properties +1 -0
  169. package/src/sap/ui/core/messagebundle_pl.properties +1 -0
  170. package/src/sap/ui/core/messagebundle_pt.properties +1 -0
  171. package/src/sap/ui/core/messagebundle_pt_PT.properties +1 -0
  172. package/src/sap/ui/core/messagebundle_ro.properties +1 -0
  173. package/src/sap/ui/core/messagebundle_ru.properties +2 -1
  174. package/src/sap/ui/core/messagebundle_sh.properties +1 -0
  175. package/src/sap/ui/core/messagebundle_sk.properties +1 -0
  176. package/src/sap/ui/core/messagebundle_sl.properties +1 -0
  177. package/src/sap/ui/core/messagebundle_sv.properties +1 -0
  178. package/src/sap/ui/core/messagebundle_th.properties +1 -0
  179. package/src/sap/ui/core/messagebundle_tr.properties +1 -0
  180. package/src/sap/ui/core/messagebundle_uk.properties +1 -0
  181. package/src/sap/ui/core/messagebundle_vi.properties +1 -0
  182. package/src/sap/ui/core/messagebundle_zh_CN.properties +1 -0
  183. package/src/sap/ui/core/messagebundle_zh_TW.properties +1 -0
  184. package/src/sap/ui/core/mvc/Controller.js +2 -3
  185. package/src/sap/ui/core/mvc/ControllerExtension.js +1 -1
  186. package/src/sap/ui/core/mvc/HTMLView.js +1 -1
  187. package/src/sap/ui/core/mvc/JSONView.js +1 -1
  188. package/src/sap/ui/core/mvc/JSView.js +1 -1
  189. package/src/sap/ui/core/mvc/TemplateView.js +1 -1
  190. package/src/sap/ui/core/mvc/View.js +22 -15
  191. package/src/sap/ui/core/mvc/XMLView.js +2 -2
  192. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  193. package/src/sap/ui/core/plugin/LessSupport.js +1 -1
  194. package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
  195. package/src/sap/ui/core/postmessage/Bus.js +1 -1
  196. package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
  197. package/src/sap/ui/core/routing/Route.js +30 -22
  198. package/src/sap/ui/core/routing/Router.js +5 -3
  199. package/src/sap/ui/core/routing/Target.js +169 -2
  200. package/src/sap/ui/core/routing/Targets.js +4 -213
  201. package/src/sap/ui/core/routing/Views.js +1 -1
  202. package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
  203. package/src/sap/ui/core/search/SearchProvider.js +1 -1
  204. package/src/sap/ui/core/service/Service.js +1 -1
  205. package/src/sap/ui/core/service/ServiceFactory.js +1 -1
  206. package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
  207. package/src/sap/ui/core/support/Plugin.js +1 -1
  208. package/src/sap/ui/core/support/Support.js +1 -1
  209. package/src/sap/ui/core/support/controls/InteractionTree.js +5 -3
  210. package/src/sap/ui/core/support/plugins/Breakpoint.js +2 -2
  211. package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
  212. package/src/sap/ui/core/support/plugins/Interaction.js +6 -4
  213. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  214. package/src/sap/ui/core/support/plugins/Performance.js +1 -1
  215. package/src/sap/ui/core/support/plugins/Selector.js +1 -1
  216. package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
  217. package/src/sap/ui/core/support/plugins/Trace.js +4 -3
  218. package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
  219. package/src/sap/ui/core/themes/base/base.less +1133 -90
  220. package/src/sap/ui/core/themes/base/global.less +114 -8
  221. package/src/sap/ui/core/themes/sap_hcb/global.less +114 -8
  222. package/src/sap/ui/core/theming/Parameters.js +10 -2
  223. package/src/sap/ui/core/theming/ThemeManager.js +10 -9
  224. package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
  225. package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
  226. package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
  227. package/src/sap/ui/core/tmpl/Template.js +1 -1
  228. package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
  229. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  230. package/src/sap/ui/core/util/Export.js +1 -1
  231. package/src/sap/ui/core/util/ExportCell.js +1 -1
  232. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  233. package/src/sap/ui/core/util/ExportRow.js +1 -1
  234. package/src/sap/ui/core/util/ExportType.js +1 -1
  235. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  236. package/src/sap/ui/core/util/File.js +1 -1
  237. package/src/sap/ui/core/util/LibraryInfo.js +1 -1
  238. package/src/sap/ui/core/util/MockServer.js +1 -1
  239. package/src/sap/ui/core/util/PasteHelper.js +1 -1
  240. package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +3 -1
  241. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  242. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  243. package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
  244. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  245. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  246. package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
  247. package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
  248. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  249. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  250. package/src/sap/ui/core/ws/WebSocket.js +1 -1
  251. package/src/sap/ui/debug/ControlTree.js +1 -1
  252. package/src/sap/ui/debug/DebugEnv.js +1 -1
  253. package/src/sap/ui/debug/PropertyList.js +1 -1
  254. package/src/sap/ui/dom/includeScript.js +3 -3
  255. package/src/sap/ui/dom/includeStylesheet.js +3 -3
  256. package/src/sap/ui/events/ControlEvents.js +2 -2
  257. package/src/sap/ui/events/PseudoEvents.js +4 -2
  258. package/src/sap/ui/model/ClientModel.js +1 -1
  259. package/src/sap/ui/model/CompositeDataState.js +1 -1
  260. package/src/sap/ui/model/CompositeType.js +1 -1
  261. package/src/sap/ui/model/DataState.js +1 -1
  262. package/src/sap/ui/model/ManagedObjectBindingSupport.js +19 -2
  263. package/src/sap/ui/model/MetaModel.js +1 -1
  264. package/src/sap/ui/model/Model.js +1 -1
  265. package/src/sap/ui/model/SelectionModel.js +1 -1
  266. package/src/sap/ui/model/SimpleType.js +1 -1
  267. package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
  268. package/src/sap/ui/model/Type.js +1 -1
  269. package/src/sap/ui/model/base/ManagedObjectModel.js +12 -4
  270. package/src/sap/ui/model/controlhelper/TreeBindingProxy.js +2 -0
  271. package/src/sap/ui/model/json/JSONModel.js +1 -1
  272. package/src/sap/ui/model/message/MessageModel.js +1 -1
  273. package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
  274. package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
  275. package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
  276. package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
  277. package/src/sap/ui/model/odata/ODataModel.js +1 -1
  278. package/src/sap/ui/model/odata/type/Boolean.js +1 -1
  279. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  280. package/src/sap/ui/model/odata/type/Currency.js +1 -1
  281. package/src/sap/ui/model/odata/type/Date.js +49 -21
  282. package/src/sap/ui/model/odata/type/DateTime.js +51 -8
  283. package/src/sap/ui/model/odata/type/DateTimeBase.js +20 -26
  284. package/src/sap/ui/model/odata/type/DateTimeOffset.js +42 -1
  285. package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +34 -21
  286. package/src/sap/ui/model/odata/type/Decimal.js +28 -33
  287. package/src/sap/ui/model/odata/type/Double.js +21 -26
  288. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  289. package/src/sap/ui/model/odata/type/Int.js +15 -20
  290. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  291. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  292. package/src/sap/ui/model/odata/type/Int64.js +16 -21
  293. package/src/sap/ui/model/odata/type/ODataType.js +33 -6
  294. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  295. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  296. package/src/sap/ui/model/odata/type/Single.js +20 -25
  297. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  298. package/src/sap/ui/model/odata/type/String.js +1 -1
  299. package/src/sap/ui/model/odata/type/Time.js +60 -21
  300. package/src/sap/ui/model/odata/type/TimeOfDay.js +52 -24
  301. package/src/sap/ui/model/odata/type/Unit.js +1 -1
  302. package/src/sap/ui/model/odata/v2/Context.js +1 -1
  303. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
  304. package/src/sap/ui/model/odata/v2/ODataModel.js +65 -21
  305. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
  306. package/src/sap/ui/model/odata/v4/Context.js +6 -2
  307. package/src/sap/ui/model/odata/v4/ODataBinding.js +5 -3
  308. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +7 -25
  309. package/src/sap/ui/model/odata/v4/ODataListBinding.js +90 -24
  310. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +4 -1
  311. package/src/sap/ui/model/odata/v4/ODataModel.js +1 -1
  312. package/src/sap/ui/model/odata/v4/ODataParentBinding.js +7 -3
  313. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +17 -12
  314. package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +15 -3
  315. package/src/sap/ui/model/odata/v4/lib/_Cache.js +14 -0
  316. package/src/sap/ui/model/odata/v4/lib/_Helper.js +18 -0
  317. package/src/sap/ui/model/odata/v4/lib/_Requestor.js +6 -0
  318. package/src/sap/ui/model/resource/ResourceModel.js +1 -1
  319. package/src/sap/ui/model/type/Boolean.js +1 -1
  320. package/src/sap/ui/model/type/Currency.js +1 -1
  321. package/src/sap/ui/model/type/Date.js +15 -1
  322. package/src/sap/ui/model/type/DateInterval.js +15 -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 +1 -1
  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 +1 -1
  332. package/src/sap/ui/model/xml/XMLModel.js +1 -1
  333. package/src/sap/ui/performance/Measurement.js +9 -9
  334. package/src/sap/ui/performance/trace/Interaction.js +50 -4
  335. package/src/sap/ui/performance/trace/initTraces.js +20 -14
  336. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  337. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
  338. package/src/sap/ui/test/OpaPlugin.js +19 -25
  339. package/src/sap/ui/test/PageObjectFactory.js +17 -7
  340. package/src/sap/ui/test/_ParameterValidator.js +3 -3
  341. package/src/sap/ui/test/_UsageReport.js +3 -3
  342. package/src/sap/ui/test/_ValidationParameters.js +8 -10
  343. package/src/sap/ui/test/actions/Action.js +3 -3
  344. package/src/sap/ui/test/actions/Press.js +4 -4
  345. package/src/sap/ui/test/autowaiter/WaiterBase.js +5 -3
  346. package/src/sap/ui/test/autowaiter/_autoWaiter.js +6 -3
  347. package/src/sap/ui/test/autowaiter/_cssAnimationWaiter.js +3 -3
  348. package/src/sap/ui/test/autowaiter/_cssTransitionWaiter.js +3 -3
  349. package/src/sap/ui/test/autowaiter/_fetchWaiter.js +73 -0
  350. package/src/sap/ui/test/autowaiter/_moduleWaiter.js +2 -2
  351. package/src/sap/ui/test/autowaiter/_promiseWaiter.js +4 -4
  352. package/src/sap/ui/test/autowaiter/_resourceWaiter.js +2 -2
  353. package/src/sap/ui/test/autowaiter/_timeoutWaiter.js +4 -4
  354. package/src/sap/ui/test/generic/TestBase.js +1 -1
  355. package/src/sap/ui/test/gherkin/GherkinTestGenerator.js +424 -423
  356. package/src/sap/ui/test/gherkin/StepDefinitions.js +160 -158
  357. package/src/sap/ui/test/gherkin/dataTableUtils.js +387 -385
  358. package/src/sap/ui/test/gherkin/opa5TestHarness.js +188 -189
  359. package/src/sap/ui/test/gherkin/qUnitTestHarness.js +74 -71
  360. package/src/sap/ui/test/gherkin/simpleGherkinParser.js +195 -193
  361. package/src/sap/ui/test/launchers/componentLauncher.js +11 -9
  362. package/src/sap/ui/test/launchers/iFrameLauncher.js +34 -20
  363. package/src/sap/ui/test/matchers/Descendant.js +1 -1
  364. package/src/sap/ui/test/matchers/Interactable.js +2 -2
  365. package/src/sap/ui/test/matchers/LabelFor.js +2 -2
  366. package/src/sap/ui/test/matchers/MatcherFactory.js +10 -9
  367. package/src/sap/ui/test/matchers/Properties.js +5 -4
  368. package/src/sap/ui/test/matchers/Sibling.js +1 -1
  369. package/src/sap/ui/test/matchers/matchers.js +35 -3
  370. package/src/sap/ui/test/qunitPause.js +3 -2
  371. package/src/sap/ui/test/starter/_utils.js +3 -3
  372. package/src/sap/ui/util/Mobile.js +8 -1
  373. package/src/sap/ui/util/Storage.js +1 -1
  374. package/src/ui5loader-autoconfig.js +661 -51
  375. package/src/ui5loader.js +18 -5
@@ -8,7 +8,6 @@
8
8
  * Code other than the OpenUI5 libraries must not introduce dependencies to this module.
9
9
  */
10
10
  (function() {
11
-
12
11
  /*
13
12
  * This module tries to detect a bootstrap script tag in the current page and
14
13
  * to derive the path for 'resources/' from it. For that purpose it checks for a
@@ -19,30 +18,629 @@
19
18
  * - ui5loader-autoconfig.js
20
19
  */
21
20
 
22
- /*global document, jQuery, sap, window */
21
+ /*global globalThis, document, jQuery, sap, window */
23
22
  "use strict";
24
23
 
25
- var ui5loader = window.sap && window.sap.ui && window.sap.ui.loader,
26
- oCfg = window['sap-ui-config'] || {},
27
- oParams = new URLSearchParams(window.location.search),
28
- sBaseUrl, bNojQuery,
24
+ /** BaseConfiguration */
25
+ var ui5loader = globalThis.sap && globalThis.sap.ui && globalThis.sap.ui.loader;
26
+ /** sap/base/strings/_camelize */
27
+ function _camelize() {
28
+ var rCamelCase = /[-\.]([a-z0-9])/ig;
29
+ var fnCamelize = function (sString) {
30
+ var sNormalizedString = sString.replace( rCamelCase, function( sMatch, sChar ) {
31
+ return sChar.toUpperCase();
32
+ });
33
+ if (/^[a-z][A-Za-z0-9]*$/.test(sNormalizedString)) {
34
+ return sNormalizedString;
35
+ }
36
+ };
37
+
38
+ ui5loader._.defineModuleSync("sap/base/strings/_camelize.js", fnCamelize);
39
+ }
40
+
41
+ /* helper for finding the bootstrap tag */
42
+ function getBootstrapTag() {
43
+ var oResult;
44
+ function check(oScript, rUrlPattern) {
45
+ var sUrl = oScript && oScript.getAttribute("src");
46
+ var oMatch = rUrlPattern.exec(sUrl);
47
+ var oTagInfo;
48
+ if (oMatch) {
49
+ oTagInfo = {
50
+ tag: oScript,
51
+ url: sUrl,
52
+ resourceRoot: oMatch[1] || ""
53
+ };
54
+ }
55
+ return oTagInfo;
56
+ }
57
+
58
+ if (globalThis.document) {
59
+ var rResources = /^((?:.*\/)?resources\/)/,
60
+ rBootScripts, aScripts, i;
61
+ // Prefer script tags which have the sap-ui-bootstrap ID
62
+ // This prevents issues when multiple script tags point to files named
63
+ // "sap-ui-core.js", for example when using the cache buster for UI5 resources
64
+ oResult = check(globalThis.document.querySelector('SCRIPT[src][id=sap-ui-bootstrap]'), rResources);
65
+ if (!oResult) {
66
+ aScripts = globalThis.document.querySelectorAll('SCRIPT[src]');
67
+ rBootScripts = /^([^?#]*\/)?(?:sap-ui-(?:core|custom|boot|merged)(?:-[^?#/]*)?|jquery.sap.global|ui5loader(?:-autoconfig)?)\.js(?:[?#]|$)/;
68
+ for (i = 0; i < aScripts.length; i++) {
69
+ oResult = check(aScripts[i], rBootScripts);
70
+ if (oResult) {
71
+ break;
72
+ }
73
+ }
74
+ }
75
+ }
76
+ return oResult || {};
77
+ }
78
+
79
+ function _createGlobalConfig() {
80
+ var sCfgFile = "sap-ui-config.json",
81
+ url = globalThis["sap-ui-config"];
82
+
83
+ if (typeof url === "string") {
84
+ if (globalThis.XMLHttpRequest) {
85
+ ui5loader._.logger.warning("Loading external bootstrap configuration from \"" + url + "\". This is a design time feature and not for productive usage!");
86
+ if (url !== sCfgFile) {
87
+ ui5loader._.logger.warning("The external bootstrap configuration file should be named \"" + sCfgFile + "\"!");
88
+ }
89
+ try {
90
+
91
+ var xhr = new XMLHttpRequest();
92
+ xhr.open("GET", url, false);
93
+ xhr.setRequestHeader("Accept", "application/json, text/javascript");
94
+
95
+ xhr.addEventListener("load", function() {
96
+ try {
97
+ if (xhr.responseType === "json") {
98
+ globalThis["sap-ui-config"] = xhr.response;
99
+ } else {
100
+ globalThis["sap-ui-config"] = JSON.parse(xhr.responseText);
101
+ }
102
+ } catch (error) {
103
+ ui5loader._.logger.error("Parsing externalized bootstrap configuration from \"" + url + "\" failed! Reason: " + error + "!");
104
+ }
105
+ });
106
+ xhr.addEventListener("error", function() {
107
+ ui5loader._.logger.error("Loading externalized bootstrap configuration from \"" + url + "\" failed! Response: " + xhr.status + "!");
108
+ });
109
+
110
+ xhr.send(null);
111
+
112
+ } catch (error) {
113
+ ui5loader._.logger.error("Loading externalized bootstrap configuration from \"" + url + "\" failed! Reason: " + error + "!");
114
+ }
115
+ }
116
+ }
117
+ var bootstrap = getBootstrapTag();
118
+ if (bootstrap.tag) {
119
+ var dataset = bootstrap.tag.dataset;
120
+ if (dataset["sapUiConfig"]) {
121
+ var sConfig = dataset["sapUiConfig"];
122
+ var oParsedConfig;
123
+ try {
124
+ oParsedConfig = JSON.parse("{" + sConfig + "}");
125
+ } catch (exc) {
126
+ ui5loader._.logger.error("JSON.parse on the data-sap-ui-config attribute failed. Please check the config for JSON syntax violations.");
127
+ /*eslint-disable no-new-func */
128
+ oParsedConfig = (new Function("return {" + sConfig + "};"))();
129
+ /*eslint-enable no-new-func */
130
+ }
131
+
132
+ if (oParsedConfig) {
133
+ if (!globalThis["sap-ui-config"]) {
134
+ globalThis["sap-ui-config"] = {};
135
+ }
136
+ Object.assign(globalThis["sap-ui-config"], oParsedConfig);
137
+ }
138
+ }
139
+ }
140
+ }
141
+
142
+ /** sap/base/config/GlobalConfigurationProvider */
143
+ function _GlobalConfigurationProvider() {
144
+ var oConfig;
145
+ var rAlias = /^(sapUiXx|sapUi|sap)((?:[A-Z0-9][a-z]*)+)$/; //for getter
146
+ var mFrozenProperties = Object.create(null);
147
+ var bFrozen = false;
148
+ var camelize = sap.ui.require("sap/base/strings/_camelize");
149
+
150
+ function createConfig() {
151
+ oConfig = Object.create(null);
152
+ var mOriginalGlobalParams = {};
153
+ var oGlobalConfig = globalThis["sap-ui-config"];
154
+ if (typeof oGlobalConfig === "object") {
155
+ for (var sKey in oGlobalConfig) {
156
+ var sNormalizedKey = camelize("sapUi-" + sKey);
157
+ var vFrozenValue = mFrozenProperties[sNormalizedKey];
158
+ if (!sNormalizedKey) {
159
+ ui5loader._.logger.error("Invalid configuration option '" + sKey + "' in global['sap-ui-config']!");
160
+ } else if (oConfig[sNormalizedKey]) {
161
+ ui5loader._.logger.error("Configuration option '" + sKey + "' was already set by '" + mOriginalGlobalParams[sNormalizedKey] + "' and will be ignored!");
162
+ } else if (vFrozenValue !== undefined && oGlobalConfig[sKey] !== vFrozenValue) {
163
+ oConfig[sNormalizedKey] = vFrozenValue;
164
+ ui5loader._.logger.error("Configuration option '" + sNormalizedKey + "' was frozen and cannot be changed to " + oGlobalConfig[sKey] + "!");
165
+ } else {
166
+ oConfig[sNormalizedKey] = oGlobalConfig[sKey];
167
+ mOriginalGlobalParams[sNormalizedKey] = sKey;
168
+ }
169
+ }
170
+ }
171
+ mOriginalGlobalParams = undefined;
172
+ }
173
+ function freeze() {
174
+ if (!bFrozen) {
175
+ createConfig();
176
+ bFrozen = true;
177
+ }
178
+ }
179
+
180
+ function get(sKey, bFreeze) {
181
+ var vValue = oConfig[sKey];
182
+ if (vValue === undefined) {
183
+ var vMatch = sKey.match(rAlias);
184
+ var sLowerCaseAlias = vMatch ? vMatch[1] + vMatch[2][0] + vMatch[2].slice(1).toLowerCase() : undefined;
185
+ if (sLowerCaseAlias) {
186
+ vValue = oConfig[sLowerCaseAlias];
187
+ }
188
+ }
189
+ if (bFreeze) {
190
+ mFrozenProperties[sKey] = vValue;
191
+ }
192
+ return vValue;
193
+ }
194
+
195
+ var GlobalConfigurationProvider = {
196
+ get: get,
197
+ freeze: freeze
198
+ };
199
+
200
+ createConfig();
201
+
202
+ ui5loader._.defineModuleSync("sap/base/config/GlobalConfigurationProvider.js", GlobalConfigurationProvider);
203
+ }
204
+
205
+ /** sap/ui/core/config/BootstrapConfigurationProvider */
206
+ function _BootstrapConfigurationProvider() {
207
+ var oConfig = Object.create(null);
208
+ var rAlias = /^(sapUiXx|sapUi|sap)((?:[A-Z0-9][a-z]*)+)$/; //for getter
209
+ var camelize = sap.ui.require("sap/base/strings/_camelize");
210
+
211
+ var bootstrap = getBootstrapTag();
212
+ if (bootstrap.tag) {
213
+ var dataset = bootstrap.tag.dataset;
214
+ if (dataset) {
215
+ for (var sKey in dataset) {
216
+ var sNormalizedKey = camelize(sKey);
217
+ if (!sNormalizedKey) {
218
+ ui5loader._.logger.error("Invalid configuration option '" + sKey + "' in bootstrap!");
219
+ } else if (oConfig[sNormalizedKey]) {
220
+ ui5loader._.logger.error("Configuration option '" + sKey + "' already exists and will be ignored!");
221
+ } else {
222
+ oConfig[sNormalizedKey] = dataset[sKey];
223
+ }
224
+ }
225
+ }
226
+ }
227
+
228
+ function get(sKey) {
229
+ var vValue = oConfig[sKey];
230
+ if (vValue === undefined) {
231
+ var vMatch = sKey.match(rAlias);
232
+ var sLowerCaseAlias = vMatch ? vMatch[1] + vMatch[2][0] + vMatch[2].slice(1).toLowerCase() : undefined;
233
+ if (sLowerCaseAlias) {
234
+ vValue = oConfig[sLowerCaseAlias];
235
+ }
236
+ }
237
+ return vValue;
238
+ }
239
+
240
+ var BootstrapConfigurationProvider = {
241
+ get: get
242
+ };
243
+
244
+ ui5loader._.defineModuleSync("sap/ui/core/config/BootstrapConfigurationProvider.js", BootstrapConfigurationProvider);
245
+ }
246
+
247
+ /** sap/ui/base/config/URLConfigurationProvider */
248
+ function _URLConfigurationProvider() {
249
+ var oConfig = Object.create(null);
250
+ var camelize = sap.ui.require("sap/base/strings/_camelize");
251
+
252
+ if (globalThis.location) {
253
+ oConfig = Object.create(null);
254
+ var mOriginalUrlParams = {};
255
+ var sLocation = globalThis.location.search;
256
+ var urlParams = new URLSearchParams(sLocation);
257
+ urlParams.forEach(function(value, key) {
258
+ var sNormalizedKey = camelize(key);
259
+ if (!sNormalizedKey) {
260
+ ui5loader._.logger.error("Invalid configuration option '" + key + "' in url!");
261
+ } else if (oConfig[sNormalizedKey]) {
262
+ ui5loader._.logger.error("Configuration option '" + key + "' was already set by '" + mOriginalUrlParams[sNormalizedKey] + "' and will be ignored!");
263
+ } else {
264
+ oConfig[sNormalizedKey] = value;
265
+ mOriginalUrlParams[sNormalizedKey] = key;
266
+ }
267
+ });
268
+ mOriginalUrlParams = undefined;
269
+ }
270
+
271
+ function get(sKey) {
272
+ return oConfig[sKey];
273
+ }
274
+
275
+ var URLConfigurationProvider = {
276
+ external: true,
277
+ get: get
278
+ };
279
+
280
+ ui5loader._.defineModuleSync("sap/ui/base/config/URLConfigurationProvider.js", URLConfigurationProvider);
281
+ }
282
+
283
+ /** sap/ui/base/config/MetaConfigurationProvider */
284
+ function _MetaConfigurationProvider() {
285
+ var oConfig = Object.create(null);
286
+ var camelize = sap.ui.require("sap/base/strings/_camelize");
287
+
288
+ if (globalThis.document) {
289
+ oConfig = Object.create(null);
290
+ var mOriginalTagNames = {};
291
+ var allMetaTags = globalThis.document.querySelectorAll("meta");
292
+ allMetaTags.forEach(function(tag) {
293
+ var sNormalizedKey = camelize(tag.name);
294
+ if (sNormalizedKey) {
295
+ if (oConfig[sNormalizedKey]) {
296
+ ui5loader._.logger.error("Configuration option '" + tag.name + "' was already set by '" + mOriginalTagNames[sNormalizedKey] + "' and will be ignored!");
297
+ } else {
298
+ oConfig[sNormalizedKey] = tag.content;
299
+ mOriginalTagNames[sNormalizedKey] = tag.name;
300
+ }
301
+ } else if (tag.name) { // tags without explicit name (tag.name === "") are ignored silently
302
+ ui5loader._.logger.error("Invalid configuration option '" + tag.name + "' in meta tag!");
303
+ }
304
+ });
305
+ mOriginalTagNames = undefined;
306
+ }
307
+
308
+ function get(sKey) {
309
+ return oConfig[sKey];
310
+ }
311
+
312
+ var MetaConfigurationProvider = {
313
+ get: get
314
+ };
315
+
316
+ ui5loader._.defineModuleSync("sap/ui/base/config/MetaConfigurationProvider.js", MetaConfigurationProvider);
317
+ }
318
+
319
+ /** sap/base/config/_Configuration */
320
+ function _Configuration() {
321
+ var aProvider = [sap.ui.require("sap/base/config/GlobalConfigurationProvider")];
322
+ var mUrlParamOptions = {
323
+ name: "sapUiIgnoreUrlParams",
324
+ type: "boolean"
325
+ };
326
+ var mInternalDefaultValues = {
327
+ "boolean": false,
328
+ "code": undefined,
329
+ "integer": 0,
330
+ "string": "",
331
+ "string[]": [],
332
+ "function[]": [],
333
+ "function": undefined,
334
+ "object": {}
335
+ };
336
+
337
+ /**
338
+ * @enum {string}
339
+ * @alias sap.base.config.Type
340
+ * @private
341
+ */
342
+ var TypeEnum = {
343
+ /**
344
+ * defaultValue: false
345
+ */
346
+ "Boolean": "boolean",
347
+ /**
348
+ * defaultValue: undefined
349
+ */
350
+ "Code": "code",
351
+ /**
352
+ * defaultValue: 0
353
+ */
354
+ "Integer": "integer",
355
+ /**
356
+ * defaultValue: ""
357
+ */
358
+ "String": "string",
359
+ /**
360
+ * defaultValue: []
361
+ */
362
+ "StringArray": "string[]",
363
+ /**
364
+ * defaultValue: []
365
+ */
366
+ "FunctionArray": "function[]",
367
+ /**
368
+ * defaultValue: undefined
369
+ */
370
+ "Function": "function",
371
+ /**
372
+ * defaultValue: {}
373
+ */
374
+ "Object": "object"
375
+ };
376
+
377
+ var bGlobalIgnoreExternal = get(mUrlParamOptions);
378
+
379
+ function deepClone(src) {
380
+ if (src == null) {
381
+ return src;
382
+ } else if (Array.isArray(src)) {
383
+ return cloneArray(src);
384
+ } else if (typeof src === "object") {
385
+ return cloneObject(src);
386
+ } else {
387
+ return src;
388
+ }
389
+ }
390
+
391
+ function cloneArray(src) {
392
+ var aClone = [];
393
+ for (var i = 0; i < src.length; i++) {
394
+ aClone.push(deepClone(src[i]));
395
+ }
396
+
397
+ return aClone;
398
+ }
399
+
400
+ function cloneObject(src) {
401
+ var oClone = {};
402
+
403
+ for (var key in src) {
404
+ if (key === "__proto__") {
405
+ continue;
406
+ }
407
+ oClone[key] = deepClone(src[key]);
408
+ }
409
+
410
+ return oClone;
411
+ }
412
+
413
+ /** Register a new Configuration provider
414
+ *
415
+ * @name module:sap/base/config.registerProvider
416
+ * @function
417
+ * @param {object} oProvider The provider instance
418
+ * @private
419
+ * @ui5-restricted sap.ui.core
420
+ */
421
+ function registerProvider(oProvider) {
422
+ if (aProvider.indexOf(oProvider) === -1) {
423
+ aProvider.push(oProvider);
424
+ bGlobalIgnoreExternal = get(mUrlParamOptions);
425
+ }
426
+ }
427
+
428
+ /**
429
+ * Converts a given value to the given type.
430
+ *
431
+ * @name module:sap/base/config.convertToType
432
+ * @function
433
+ * @param {any} vValue The value to be converted
434
+ * @param {string} vType The resulting type
435
+ * @param {string} [sName] The property name of the enumeration to check
436
+ * @returns {any} The converted value
437
+ * @throws {TypeError} Throws an TypeError if the given value could not be converted to the requested type
438
+ *
439
+ * @private
440
+ */
441
+ function convertToType(vValue, vType, sName) {
442
+ if (vValue === undefined || vValue === null) {
443
+ return vValue;
444
+ }
445
+
446
+ if (typeof vType === "string") {
447
+ switch (vType) {
448
+ case TypeEnum.Boolean:
449
+ if (typeof vValue === "string") {
450
+ return vValue.toLowerCase() === "true" || vValue.toLowerCase() === "x";
451
+ } else {
452
+ vValue = !!vValue;
453
+ }
454
+ break;
455
+ case TypeEnum.Code:
456
+ vValue = typeof vValue === "function" ? vValue : String(vValue);
457
+ break;
458
+ case TypeEnum.Integer:
459
+ if (typeof vValue === "string") {
460
+ vValue = parseInt(vValue);
461
+ }
462
+ if (typeof vValue !== 'number' && isNaN(vValue)) {
463
+ throw new TypeError("unsupported value");
464
+ }
465
+ break;
466
+ case TypeEnum.String:
467
+ vValue = '' + vValue; // enforce string
468
+ break;
469
+ case TypeEnum.StringArray:
470
+ if (Array.isArray(vValue)) {
471
+ return vValue;
472
+ } else if (typeof vValue === "string") {
473
+ // enforce array
474
+ vValue = vValue ? vValue.split(/[,;]/).map(function(s) {
475
+ return s.trim();
476
+ }) : [];
477
+ return vValue;
478
+ } else {
479
+ throw new TypeError("unsupported value");
480
+ }
481
+ case TypeEnum.FunctionArray:
482
+ vValue.forEach(function(fnFunction) {
483
+ if ( typeof fnFunction !== "function" ) {
484
+ throw new TypeError("Not a function: " + fnFunction);
485
+ }
486
+ });
487
+ break;
488
+ case TypeEnum.Function:
489
+ if (typeof vValue !== "function") {
490
+ throw new TypeError("unsupported value");
491
+ }
492
+ break;
493
+ case TypeEnum.Object:
494
+ if (typeof vValue === "string") {
495
+ vValue = JSON.parse(vValue);
496
+ }
497
+ if (typeof vValue !== "object") {
498
+ throw new TypeError("unsupported value");
499
+ }
500
+ break;
501
+ default:
502
+ throw new TypeError("unsupported type");
503
+ }
504
+ } else if (typeof vType === "object" && !Array.isArray(vType)) {
505
+ vValue = checkEnum(vType, vValue, sName);
506
+ } else if (typeof vType === "function") {
507
+ vValue = vType(vValue);
508
+ } else {
509
+ throw new TypeError("unsupported type");
510
+ }
511
+
512
+ return vValue;
513
+ }
514
+
515
+ /**
516
+ * Checks if a value exists within an enumerable list.
517
+ *
518
+ * @name module:sap/base/config._.checkEnum
519
+ * @function
520
+ * @param {object} oEnum Enumeration object with values for validation
521
+ * @param {string} sValue Value to check against enumerable list
522
+ * @param {string} sPropertyName Name of the property which is checked
523
+ * @returns {string} Value passed to the function for check
524
+ * @throws {TypeError} If the value could not be found, an TypeError is thrown
525
+ *
526
+ * @private
527
+ */
528
+ function checkEnum(oEnum, sValue, sPropertyName) {
529
+ var aValidValues = [];
530
+ for (var sKey in oEnum) {
531
+ if (oEnum.hasOwnProperty(sKey)) {
532
+ if (oEnum[sKey] === sValue) {
533
+ return sValue;
534
+ }
535
+ aValidValues.push(oEnum[sKey]);
536
+ }
537
+ }
538
+ throw new TypeError("Unsupported Enumeration value for " + sPropertyName + ", valid values are: " + aValidValues.join(", "));
539
+ }
540
+
541
+ /**
542
+ * Generic getter for configuration options that are not explicitly exposed via a dedicated own getter.
543
+ *
544
+ * @name module:sap/base/config.get
545
+ * @function
546
+ * @param {object} mOptions The options object that contains the following properties
547
+ * @param {string} mOptions.name Name of the configuration parameter. Must start with 'sapUi/sapUiXx' prefix followed by letters only. The name must be camel-case
548
+ * @param {sap.base.config.Type|object<string, string>|function} mOptions.type Type of the configuration parameter. This argument can be a <code>sap.base.config.Type</code>, object or function.
549
+ * @param {any} [mOptions.defaultValue=undefined] Default value of the configuration parameter corresponding to the given type.
550
+ * @param {boolean} [mOptions.external=false] Whether external (e.g. url-) parameters should be included or not
551
+ * @param {boolean} [mOptions.freeze=false] Freezes parameter and parameter can't be changed afterwards.
552
+ * @returns {any} Value of the configuration parameter
553
+ * @throws {TypeError} Throws an error if the given parameter name does not match the definition.
554
+ * @private
555
+ * @ui5-restricted sap.ui.core.Core, jquery.sap.global
556
+ */
557
+ function get(mOptions) {
558
+ mOptions = Object.assign({}, mOptions);
559
+ var vValue;
560
+
561
+ var rValidKey = /^[a-z][A-Za-z0-9]*$/;
562
+ var rXXAlias = /^(sapUi(?!Xx))(.*)$/; //for getter
563
+ var bIgnoreExternal = bGlobalIgnoreExternal || !mOptions.external;
564
+ var sName = mOptions.name;
565
+ var vMatch = sName.match(rXXAlias);
566
+ var vDefaultValue = mOptions.hasOwnProperty("defaultValue") ? mOptions.defaultValue : mInternalDefaultValues[mOptions.type];
567
+
568
+ if (typeof mOptions.name !== "string" || !rValidKey.test(sName)) {
569
+ throw new TypeError(
570
+ "Invalid configuration key '" + sName + "'!"
571
+ );
572
+ }
573
+
574
+ if (mOptions.provider) {
575
+ vValue = mOptions.provider.get(sName, mOptions.freeze);
576
+ }
577
+ if (vValue === undefined) {
578
+ for (var i = aProvider.length - 1; i >= 0; i--) {
579
+ if (!aProvider[i].external || !bIgnoreExternal) {
580
+ vValue = aProvider[i].get(sName, mOptions.freeze);
581
+ if (vValue !== undefined) {
582
+ break;
583
+ }
584
+ }
585
+ }
586
+ }
587
+ if (vValue !== undefined) {
588
+ vValue = convertToType(vValue, mOptions.type, mOptions.name);
589
+ } else if (vMatch && vMatch[1] === "sapUi") {
590
+ mOptions.name = vMatch[1] + "Xx" + vMatch[2];
591
+ return get(mOptions);
592
+ }
593
+ if (Array.isArray(vValue) || typeof vValue === "object") {
594
+ vValue = deepClone(vValue);
595
+ }
596
+ return vValue !== undefined ? vValue : vDefaultValue;
597
+ }
598
+
599
+ var Configuration = {
600
+ get: get,
601
+ registerProvider: registerProvider,
602
+ Type: TypeEnum
603
+ };
604
+
605
+ ui5loader._.defineModuleSync("sap/base/config/_Configuration.js", Configuration);
606
+ }
607
+
608
+ function _setupConfiguration() {
609
+ var BaseConfiguration = sap.ui.require('sap/base/config/_Configuration');
610
+ //register config provider
611
+ BaseConfiguration.registerProvider(sap.ui.require("sap/ui/core/config/BootstrapConfigurationProvider"));
612
+ BaseConfiguration.registerProvider(sap.ui.require("sap/ui/base/config/MetaConfigurationProvider"));
613
+ BaseConfiguration.registerProvider(sap.ui.require("sap/ui/base/config/URLConfigurationProvider"));
614
+ }
615
+
616
+ /** init configuration */
617
+ _camelize();
618
+ _createGlobalConfig();
619
+ _GlobalConfigurationProvider();
620
+ _BootstrapConfigurationProvider();
621
+ _MetaConfigurationProvider();
622
+ _URLConfigurationProvider();
623
+ _Configuration();
624
+ _setupConfiguration();
625
+
626
+ var BaseConfig = sap.ui.require("sap/base/config/_Configuration");
627
+
628
+ /** autoconfig */
629
+ var sBaseUrl, bNojQuery,
29
630
  aScripts, rBootScripts, i,
30
- oBootstrapScript, sBootstrapUrl, bExposeAsAMDLoader = false;
631
+ sBootstrapUrl, bExposeAsAMDLoader = false;
31
632
 
32
633
  function findBaseUrl(oScript, rUrlPattern) {
33
634
  var sUrl = oScript && oScript.getAttribute("src"),
34
635
  oMatch = rUrlPattern.exec(sUrl);
35
636
  if ( oMatch ) {
36
637
  sBaseUrl = oMatch[1] || "";
37
- oBootstrapScript = oScript;
38
638
  sBootstrapUrl = sUrl;
39
639
  bNojQuery = /sap-ui-core-nojQuery\.js(?:[?#]|$)/.test(sUrl);
40
640
  return true;
41
641
  }
42
642
  }
43
643
 
44
- var Object_hasOwn = Function.prototype.call.bind(Object.prototype.hasOwnProperty);
45
-
46
644
  function ensureSlash(path) {
47
645
  return path && path[path.length - 1] !== '/' ? path + '/' : path;
48
646
  }
@@ -67,10 +665,13 @@
67
665
  }
68
666
 
69
667
  // configuration via window['sap-ui-config'] always overrides an auto detected base URL
70
- if ( typeof oCfg === 'object'
71
- && typeof oCfg.resourceRoots === 'object'
72
- && typeof oCfg.resourceRoots[''] === 'string' ) {
73
- sBaseUrl = oCfg.resourceRoots[''];
668
+ var mResourceRoots = BaseConfig.get({
669
+ name: "sapUiResourceRoots",
670
+ type: BaseConfig.Type.Object,
671
+ freeze: true
672
+ });
673
+ if (typeof mResourceRoots[''] === 'string' ) {
674
+ sBaseUrl = mResourceRoots[''];
74
675
  }
75
676
 
76
677
  if (sBaseUrl == null) {
@@ -90,7 +691,13 @@
90
691
  * Determine whether sap-bootstrap-debug is set, run debugger statement
91
692
  * to allow early debugging in browsers with broken dev tools
92
693
  */
93
- if (/^(true|x|X)$/.test(oParams.get("sap-bootstrap-debug"))) {
694
+ var bDebugBootstrap = BaseConfig.get({
695
+ name: "sapBootstrapDebug",
696
+ type: BaseConfig.Type.Boolean,
697
+ external: true,
698
+ freeze: true
699
+ });
700
+ if (bDebugBootstrap) {
94
701
  /*eslint-disable no-debugger */
95
702
  debugger;
96
703
  /*eslint-enable no-debugger */
@@ -116,7 +723,13 @@
116
723
  */
117
724
  (function() {
118
725
  // check URI param
119
- var vDebugInfo = oParams.get("sap-ui-debug");
726
+ var vDebugInfo = BaseConfig.get({
727
+ name: "sapUiDebug",
728
+ type: BaseConfig.Type.String,
729
+ defaultValue: false,
730
+ external: true,
731
+ freeze: true
732
+ });
120
733
 
121
734
  // check local storage
122
735
  try {
@@ -125,9 +738,6 @@
125
738
  // access to localStorage might be disallowed
126
739
  }
127
740
 
128
- // check bootstrapScript attribute
129
- vDebugInfo = vDebugInfo || (oBootstrapScript && oBootstrapScript.getAttribute("data-sap-ui-debug"));
130
-
131
741
  // normalize vDebugInfo; afterwards, it either is a boolean or a string not representing a boolean
132
742
  if ( typeof vDebugInfo === 'string' ) {
133
743
  if ( /^(?:false|true|x|X)$/.test(vDebugInfo) ) {
@@ -149,7 +759,7 @@
149
759
  // check for optimized sources by testing variable names in a local function
150
760
  // (check for native API ".getAttribute" to make sure that the function's source can be retrieved)
151
761
  window["sap-ui-optimized"] = window["sap-ui-optimized"] ||
152
- (/\.getAttribute/.test(_getOption) && !/oBootstrapScript/.test(_getOption));
762
+ (/\.getAttribute/.test(findBaseUrl) && !/oScript/.test(findBaseUrl));
153
763
 
154
764
  if ( window["sap-ui-optimized"] && vDebugInfo ) {
155
765
  // if current sources are optimized and any debug sources should be used, enable the "-dbg" suffix
@@ -226,44 +836,40 @@
226
836
 
227
837
  })();
228
838
 
229
- function _getOption(name, defaultValue, pattern) {
230
- // check for an URL parameter ...
231
- var urlValue = oParams.get("sap-ui-" + name);
232
- if ( urlValue != null && (pattern == null || pattern.test(urlValue)) ) {
233
- return urlValue;
234
- }
235
- // ... or an attribute of the bootstrap tag
236
- var attrValue = oBootstrapScript && oBootstrapScript.getAttribute("data-sap-ui-" + name.toLowerCase());
237
- if ( attrValue != null && (pattern == null || pattern.test(attrValue)) ) {
238
- return attrValue;
239
- }
240
- // ... or an entry in the global config object
241
- if ( Object_hasOwn(oCfg, name) && (pattern == null || pattern.test(oCfg[name])) ) {
242
- return oCfg[name];
243
- }
244
- // compat fallback
245
- if ( name.slice(0,3) !== "xx-" ) {
246
- return _getOption("xx-" + name, defaultValue, pattern);
247
- }
248
- // if no valid config value is found, fall back to a system default value
249
- return defaultValue;
250
- }
251
-
252
- function _getBooleanOption(name, defaultValue) {
253
- return /^(?:true|x|X)$/.test( _getOption(name, defaultValue, /^(?:true|x|X|false)$/) );
254
- }
255
-
256
- if ( _getBooleanOption("async", false) ) {
839
+ if (BaseConfig.get({
840
+ name: "sapUiAsync",
841
+ type: BaseConfig.Type.Boolean,
842
+ external: true,
843
+ freeze: true
844
+ })) {
257
845
  ui5loader.config({
258
846
  async: true
259
847
  });
260
848
  }
261
849
 
262
850
  // Note: loader converts any NaN value to a default value
263
- ui5loader._.maxTaskDuration = _getOption("xx-maxLoaderTaskDuration");
851
+ ui5loader._.maxTaskDuration = BaseConfig.get({
852
+ name: "sapUiXxMaxLoaderTaskDuration",
853
+ type: BaseConfig.Type.Integer,
854
+ defaultValue: undefined,
855
+ external: true,
856
+ freeze: true
857
+ });
264
858
 
265
859
  // support legacy switch 'noLoaderConflict', but 'amdLoader' has higher precedence
266
- bExposeAsAMDLoader = _getBooleanOption("amd", !_getBooleanOption("noLoaderConflict", true));
860
+ bExposeAsAMDLoader = BaseConfig.get({
861
+ name: "sapUiAmd",
862
+ type: BaseConfig.Type.Boolean,
863
+ defaultValue: !BaseConfig.get({
864
+ name: "sapUiNoLoaderConflict",
865
+ type: BaseConfig.Type.Boolean,
866
+ defaultValue: true,
867
+ external: true,
868
+ freeze: true
869
+ }),
870
+ external: true,
871
+ freeze: true
872
+ });
267
873
 
268
874
  ui5loader.config({
269
875
  baseUrl: sBaseUrl,
@@ -505,7 +1111,11 @@
505
1111
  }
506
1112
  }
507
1113
 
508
- var sMainModule = oBootstrapScript && oBootstrapScript.getAttribute('data-sap-ui-main');
1114
+ var sMainModule = BaseConfig.get({
1115
+ name: "sapUiMain",
1116
+ type: BaseConfig.Type.String,
1117
+ freeze: true
1118
+ });
509
1119
  if ( sMainModule ) {
510
1120
  sap.ui.require(sMainModule.trim().split(/\s*,\s*/));
511
1121
  }