@openui5/sap.ui.core 1.109.0 → 1.110.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +7 -25
- package/.reuse/dep5 +16 -16
- package/THIRDPARTY.txt +2 -2
- package/package.json +1 -1
- package/src/jquery.sap.act.js +1 -1
- package/src/jquery.sap.dom.js +1 -1
- package/src/jquery.sap.encoder.js +1 -1
- package/src/jquery.sap.events.js +1 -1
- package/src/jquery.sap.global.js +2 -2
- package/src/jquery.sap.history.js +1 -1
- package/src/jquery.sap.keycodes.js +1 -1
- package/src/jquery.sap.mobile.js +1 -1
- package/src/jquery.sap.promise.js +1 -1
- package/src/jquery.sap.properties.js +2 -2
- package/src/jquery.sap.resources.js +2 -2
- package/src/jquery.sap.script.js +2 -2
- package/src/jquery.sap.sjax.js +1 -1
- package/src/jquery.sap.storage.js +4 -4
- package/src/jquery.sap.strings.js +1 -1
- package/src/jquery.sap.stubs.js +1 -1
- package/src/jquery.sap.trace.js +1 -1
- package/src/jquery.sap.ui.js +1 -1
- package/src/jquery.sap.xml.js +1 -1
- package/src/sap/base/Log.js +1 -1
- package/src/sap/base/assert.js +1 -1
- package/src/sap/base/i18n/ResourceBundle.js +1 -1
- package/src/sap/base/security/URLListValidator.js +1 -1
- package/src/sap/base/security/URLWhitelist.js +1 -1
- package/src/sap/base/security/encodeCSS.js +1 -1
- package/src/sap/base/security/encodeJS.js +1 -1
- package/src/sap/base/security/encodeURL.js +1 -1
- package/src/sap/base/security/encodeURLParameters.js +1 -1
- package/src/sap/base/security/encodeXML.js +1 -1
- package/src/sap/base/security/sanitizeHTML.js +1 -1
- package/src/sap/base/strings/camelize.js +1 -1
- package/src/sap/base/strings/capitalize.js +1 -1
- package/src/sap/base/strings/escapeRegExp.js +1 -1
- package/src/sap/base/strings/formatMessage.js +1 -1
- package/src/sap/base/strings/hash.js +1 -1
- package/src/sap/base/strings/hyphenate.js +1 -1
- package/src/sap/base/strings/toHex.js +1 -1
- package/src/sap/base/strings/whitespaceReplacer.js +1 -1
- package/src/sap/base/util/Deferred.js +1 -1
- package/src/sap/base/util/JSTokenizer.js +1 -1
- package/src/sap/base/util/LoaderExtensions.js +1 -1
- package/src/sap/base/util/ObjectPath.js +1 -1
- package/src/sap/base/util/Properties.js +1 -1
- package/src/sap/base/util/UriParameters.js +1 -1
- package/src/sap/base/util/Version.js +1 -1
- package/src/sap/base/util/_merge.js +1 -1
- package/src/sap/base/util/array/diff.js +1 -1
- package/src/sap/base/util/array/uniqueSort.js +1 -1
- package/src/sap/base/util/deepClone.js +1 -1
- package/src/sap/base/util/deepEqual.js +1 -1
- package/src/sap/base/util/deepExtend.js +1 -1
- package/src/sap/base/util/defineCoupledProperty.js +1 -1
- package/src/sap/base/util/defineLazyProperty.js +1 -1
- package/src/sap/base/util/each.js +1 -1
- package/src/sap/base/util/extend.js +1 -1
- package/src/sap/base/util/fetch.js +4 -4
- package/src/sap/base/util/includes.js +1 -1
- package/src/sap/base/util/isEmptyObject.js +1 -1
- package/src/sap/base/util/isPlainObject.js +1 -1
- package/src/sap/base/util/merge.js +1 -1
- package/src/sap/base/util/mixedFetch.js +1 -1
- package/src/sap/base/util/now.js +1 -1
- package/src/sap/base/util/resolveReference.js +1 -1
- package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
- package/src/sap/base/util/restricted/_castArray.js +2 -2
- package/src/sap/base/util/restricted/_compact.js +2 -2
- package/src/sap/base/util/restricted/_curry.js +2 -2
- package/src/sap/base/util/restricted/_debounce.js +2 -2
- package/src/sap/base/util/restricted/_difference.js +2 -2
- package/src/sap/base/util/restricted/_differenceBy.js +2 -2
- package/src/sap/base/util/restricted/_differenceWith.js +2 -2
- package/src/sap/base/util/restricted/_flatMap.js +2 -2
- package/src/sap/base/util/restricted/_flatMapDeep.js +2 -2
- package/src/sap/base/util/restricted/_flatMapDepth.js +2 -2
- package/src/sap/base/util/restricted/_flatten.js +2 -2
- package/src/sap/base/util/restricted/_flattenDeep.js +2 -2
- package/src/sap/base/util/restricted/_flattenDepth.js +2 -2
- package/src/sap/base/util/restricted/_intersection.js +2 -2
- package/src/sap/base/util/restricted/_intersectionBy.js +2 -2
- package/src/sap/base/util/restricted/_intersectionWith.js +2 -2
- package/src/sap/base/util/restricted/_isEqual.js +2 -2
- package/src/sap/base/util/restricted/_isEqualWith.js +2 -2
- package/src/sap/base/util/restricted/_isNil.js +2 -2
- package/src/sap/base/util/restricted/_max.js +2 -2
- package/src/sap/base/util/restricted/_merge.js +2 -2
- package/src/sap/base/util/restricted/_mergeWith.js +2 -2
- package/src/sap/base/util/restricted/_min.js +2 -2
- package/src/sap/base/util/restricted/_omit.js +2 -2
- package/src/sap/base/util/restricted/_pick.js +2 -2
- package/src/sap/base/util/restricted/_pickBy.js +2 -2
- package/src/sap/base/util/restricted/_throttle.js +2 -2
- package/src/sap/base/util/restricted/_toArray.js +2 -2
- package/src/sap/base/util/restricted/_union.js +2 -2
- package/src/sap/base/util/restricted/_unionBy.js +2 -2
- package/src/sap/base/util/restricted/_unionWith.js +2 -2
- package/src/sap/base/util/restricted/_uniq.js +2 -2
- package/src/sap/base/util/restricted/_uniqBy.js +2 -2
- package/src/sap/base/util/restricted/_uniqWith.js +2 -2
- package/src/sap/base/util/restricted/_without.js +2 -2
- package/src/sap/base/util/restricted/_xor.js +2 -2
- package/src/sap/base/util/restricted/_xorBy.js +2 -2
- package/src/sap/base/util/restricted/_xorWith.js +2 -2
- package/src/sap/base/util/restricted/_zipObject.js +2 -2
- package/src/sap/base/util/restricted/_zipObjectDeep.js +2 -2
- package/src/sap/base/util/syncFetch.js +2 -2
- package/src/sap/base/util/uid.js +1 -1
- package/src/sap/base/util/values.js +1 -1
- package/src/sap/ui/Device.js +4 -4
- package/src/sap/ui/Global.js +5 -5
- package/src/sap/ui/VersionInfo.js +1 -1
- package/src/sap/ui/base/BindingInfo.js +1 -1
- package/src/sap/ui/base/BindingParser.js +1 -1
- package/src/sap/ui/base/DataType.js +1 -1
- package/src/sap/ui/base/Event.js +2 -2
- package/src/sap/ui/base/EventProvider.js +2 -2
- package/src/sap/ui/base/Exception.js +1 -1
- package/src/sap/ui/base/ExpressionParser.js +1 -1
- package/src/sap/ui/base/Interface.js +2 -2
- package/src/sap/ui/base/ManagedObject.js +337 -233
- package/src/sap/ui/base/ManagedObjectMetadata.js +8 -6
- package/src/sap/ui/base/ManagedObjectObserver.js +1 -1
- package/src/sap/ui/base/ManagedObjectRegistry.js +1 -1
- package/src/sap/ui/base/Metadata.js +2 -2
- package/src/sap/ui/base/Object.js +21 -12
- package/src/sap/ui/base/ObjectPool.js +2 -2
- package/src/sap/ui/base/SyncPromise.js +1 -1
- package/src/sap/ui/base/syncXHRFix.js +1 -1
- package/src/sap/ui/core/.library +3 -3
- package/src/sap/ui/core/AccessKeysEnablement.js +1 -1
- package/src/sap/ui/core/AppCacheBuster.js +1 -1
- package/src/sap/ui/core/BlockLayerUtils.js +11 -4
- package/src/sap/ui/core/BusyIndicator.js +7 -5
- package/src/sap/ui/core/BusyIndicatorUtils.js +1 -1
- package/src/sap/ui/core/CalendarType.js +1 -1
- package/src/sap/ui/core/CommandExecution.js +1 -1
- package/src/sap/ui/core/Component.js +48 -34
- package/src/sap/ui/core/ComponentContainer.js +3 -3
- package/src/sap/ui/core/ComponentContainerRenderer.js +1 -1
- package/src/sap/ui/core/ComponentMetadata.js +2 -2
- package/src/sap/ui/core/ComponentSupport.js +2 -2
- package/src/sap/ui/core/Configuration.js +10 -7
- package/src/sap/ui/core/ContextMenuSupport.js +1 -1
- package/src/sap/ui/core/Control.js +11 -21
- package/src/sap/ui/core/Core.js +63 -981
- package/src/sap/ui/core/CustomData.js +2 -2
- package/src/sap/ui/core/CustomStyleClassSupport.js +1 -1
- package/src/sap/ui/core/DeclarativeSupport.js +2 -2
- package/src/sap/ui/core/Element.js +109 -28
- package/src/sap/ui/core/ElementMetadata.js +2 -2
- package/src/sap/ui/core/EnabledPropagator.js +2 -2
- package/src/sap/ui/core/EventBus.js +2 -2
- package/src/sap/ui/core/ExtensionPoint.js +1 -1
- package/src/sap/ui/core/FocusHandler.js +1 -1
- package/src/sap/ui/core/Fragment.js +2 -2
- package/src/sap/ui/core/HTML.js +2 -2
- package/src/sap/ui/core/HTMLRenderer.js +1 -1
- package/src/sap/ui/core/History.js +2 -2
- package/src/sap/ui/core/Icon.js +5 -3
- package/src/sap/ui/core/IconPool.js +1 -1
- package/src/sap/ui/core/IconRenderer.js +1 -1
- package/src/sap/ui/core/IndicationColorSupport.js +6 -6
- package/src/sap/ui/core/IntervalTrigger.js +2 -2
- package/src/sap/ui/core/InvisibleMessage.js +2 -2
- package/src/sap/ui/core/InvisibleRenderer.js +2 -2
- package/src/sap/ui/core/InvisibleText.js +11 -7
- package/src/sap/ui/core/Item.js +2 -2
- package/src/sap/ui/core/LabelEnablement.js +2 -2
- package/src/sap/ui/core/LayoutData.js +2 -2
- package/src/sap/ui/core/Lib.js +1595 -0
- package/src/sap/ui/core/ListItem.js +2 -2
- package/src/sap/ui/core/LocalBusyIndicator.js +2 -2
- package/src/sap/ui/core/LocalBusyIndicatorRenderer.js +1 -1
- package/src/sap/ui/core/LocalBusyIndicatorSupport.js +1 -1
- package/src/sap/ui/core/Locale.js +2 -2
- package/src/sap/ui/core/LocaleData.js +122 -26
- package/src/sap/ui/core/Manifest.js +5 -3
- package/src/sap/ui/core/Message.js +2 -2
- package/src/sap/ui/core/Patcher.js +1 -1
- package/src/sap/ui/core/Placeholder.js +3 -3
- package/src/sap/ui/core/Popup.js +1 -1
- package/src/sap/ui/core/RenderManager.js +2 -2
- package/src/sap/ui/core/Renderer.js +2 -2
- package/src/sap/ui/core/Rendering.js +1 -1
- package/src/sap/ui/core/ResizeHandler.js +61 -21
- package/src/sap/ui/core/ScrollBar.js +2 -2
- package/src/sap/ui/core/ScrollBarRenderer.js +1 -1
- package/src/sap/ui/core/SeparatorItem.js +2 -2
- package/src/sap/ui/core/Shortcut.js +1 -1
- package/src/sap/ui/core/ShortcutHint.js +5 -5
- package/src/sap/ui/core/ShortcutHintsMixin.js +1 -1
- package/src/sap/ui/core/StashedControlSupport.js +1 -1
- package/src/sap/ui/core/Title.js +2 -2
- package/src/sap/ui/core/TooltipBase.js +2 -2
- package/src/sap/ui/core/UIArea.js +4 -4
- package/src/sap/ui/core/UIComponent.js +9 -7
- package/src/sap/ui/core/UIComponentMetadata.js +2 -2
- package/src/sap/ui/core/ValueStateSupport.js +6 -6
- package/src/sap/ui/core/VariantLayoutData.js +2 -2
- package/src/sap/ui/core/XMLComposite.js +2 -2
- package/src/sap/ui/core/XMLCompositeMetadata.js +2 -2
- package/src/sap/ui/core/XMLTemplateProcessor.js +6 -4
- package/src/sap/ui/core/_ConfigurationProvider.js +1 -1
- package/src/sap/ui/core/_IconRegistry.js +5 -4
- package/src/sap/ui/core/_UrlResolver.js +1 -1
- package/src/sap/ui/core/cache/CacheManager.js +1 -1
- package/src/sap/ui/core/cache/CacheManagerNOP.js +1 -1
- package/src/sap/ui/core/cache/LRUPersistentCache.js +1 -1
- package/src/sap/ui/core/cldr/ar.json +818 -444
- package/src/sap/ui/core/cldr/ar_EG.json +818 -444
- package/src/sap/ui/core/cldr/ar_SA.json +913 -540
- package/src/sap/ui/core/cldr/bg.json +520 -284
- package/src/sap/ui/core/cldr/ca.json +341 -101
- package/src/sap/ui/core/cldr/cs.json +361 -60
- package/src/sap/ui/core/cldr/cy.json +454 -325
- package/src/sap/ui/core/cldr/da.json +519 -305
- package/src/sap/ui/core/cldr/de.json +350 -115
- package/src/sap/ui/core/cldr/de_AT.json +340 -105
- package/src/sap/ui/core/cldr/de_CH.json +352 -117
- package/src/sap/ui/core/cldr/el.json +395 -148
- package/src/sap/ui/core/cldr/el_CY.json +395 -148
- package/src/sap/ui/core/cldr/en.json +306 -34
- package/src/sap/ui/core/cldr/en_AU.json +493 -210
- package/src/sap/ui/core/cldr/en_GB.json +465 -181
- package/src/sap/ui/core/cldr/en_HK.json +507 -221
- package/src/sap/ui/core/cldr/en_IE.json +506 -223
- package/src/sap/ui/core/cldr/en_IN.json +510 -223
- package/src/sap/ui/core/cldr/en_NZ.json +505 -222
- package/src/sap/ui/core/cldr/en_PG.json +506 -223
- package/src/sap/ui/core/cldr/en_SG.json +495 -209
- package/src/sap/ui/core/cldr/en_ZA.json +503 -220
- package/src/sap/ui/core/cldr/es.json +623 -385
- package/src/sap/ui/core/cldr/es_AR.json +530 -291
- package/src/sap/ui/core/cldr/es_BO.json +539 -300
- package/src/sap/ui/core/cldr/es_CL.json +497 -258
- package/src/sap/ui/core/cldr/es_CO.json +498 -259
- package/src/sap/ui/core/cldr/es_MX.json +684 -445
- package/src/sap/ui/core/cldr/es_PE.json +464 -225
- package/src/sap/ui/core/cldr/es_UY.json +468 -229
- package/src/sap/ui/core/cldr/es_VE.json +467 -228
- package/src/sap/ui/core/cldr/et.json +469 -232
- package/src/sap/ui/core/cldr/fa.json +684 -421
- package/src/sap/ui/core/cldr/fi.json +427 -125
- package/src/sap/ui/core/cldr/fr.json +312 -65
- package/src/sap/ui/core/cldr/fr_BE.json +309 -62
- package/src/sap/ui/core/cldr/fr_CA.json +328 -81
- package/src/sap/ui/core/cldr/fr_CH.json +309 -62
- package/src/sap/ui/core/cldr/fr_LU.json +312 -65
- package/src/sap/ui/core/cldr/he.json +768 -538
- package/src/sap/ui/core/cldr/hi.json +369 -100
- package/src/sap/ui/core/cldr/hr.json +539 -80
- package/src/sap/ui/core/cldr/hu.json +308 -82
- package/src/sap/ui/core/cldr/id.json +392 -174
- package/src/sap/ui/core/cldr/it.json +302 -86
- package/src/sap/ui/core/cldr/it_CH.json +302 -86
- package/src/sap/ui/core/cldr/ja.json +264 -41
- package/src/sap/ui/core/cldr/kk.json +320 -69
- package/src/sap/ui/core/cldr/ko.json +345 -120
- package/src/sap/ui/core/cldr/lt.json +328 -87
- package/src/sap/ui/core/cldr/lv.json +452 -207
- package/src/sap/ui/core/cldr/ms.json +469 -250
- package/src/sap/ui/core/cldr/nb.json +354 -123
- package/src/sap/ui/core/cldr/nl.json +381 -63
- package/src/sap/ui/core/cldr/nl_BE.json +381 -63
- package/src/sap/ui/core/cldr/pl.json +493 -168
- package/src/sap/ui/core/cldr/pt.json +568 -350
- package/src/sap/ui/core/cldr/pt_PT.json +566 -346
- package/src/sap/ui/core/cldr/ro.json +374 -123
- package/src/sap/ui/core/cldr/ru.json +509 -213
- package/src/sap/ui/core/cldr/ru_UA.json +508 -212
- package/src/sap/ui/core/cldr/sk.json +346 -48
- package/src/sap/ui/core/cldr/sl.json +593 -295
- package/src/sap/ui/core/cldr/sr.json +404 -177
- package/src/sap/ui/core/cldr/sr_Latn.json +393 -178
- package/src/sap/ui/core/cldr/sv.json +475 -250
- package/src/sap/ui/core/cldr/th.json +384 -162
- package/src/sap/ui/core/cldr/tr.json +326 -98
- package/src/sap/ui/core/cldr/uk.json +647 -338
- package/src/sap/ui/core/cldr/vi.json +288 -70
- package/src/sap/ui/core/cldr/zh_CN.json +560 -333
- package/src/sap/ui/core/cldr/zh_HK.json +531 -304
- package/src/sap/ui/core/cldr/zh_SG.json +536 -309
- package/src/sap/ui/core/cldr/zh_TW.json +418 -177
- package/src/sap/ui/core/date/Buddhist.js +1 -1
- package/src/sap/ui/core/date/CalendarUtils.js +1 -1
- package/src/sap/ui/core/date/CalendarWeekNumbering.js +1 -1
- package/src/sap/ui/core/date/Gregorian.js +1 -1
- package/src/sap/ui/core/date/Islamic.js +1 -1
- package/src/sap/ui/core/date/Japanese.js +1 -1
- package/src/sap/ui/core/date/Persian.js +1 -1
- package/src/sap/ui/core/date/UniversalDate.js +1 -1
- package/src/sap/ui/core/date/UniversalDateUtils.js +1 -1
- package/src/sap/ui/core/date/_Calendars.js +1 -1
- package/src/sap/ui/core/delegate/ItemNavigation.js +18 -14
- package/src/sap/ui/core/delegate/ScrollEnablement.js +40 -3
- package/src/sap/ui/core/designtime/ComponentContainer.designtime.js +1 -1
- package/src/sap/ui/core/designtime/CustomData.designtime.js +1 -1
- package/src/sap/ui/core/designtime/Icon.designtime.js +1 -1
- package/src/sap/ui/core/designtime/UIComponent.designtime.js +1 -1
- package/src/sap/ui/core/designtime/library.designtime.js +1 -1
- package/src/sap/ui/core/designtime/mvc/ControllerExtensionTemplate.js +1 -1
- package/src/sap/ui/core/designtime/mvc/View.designtime.js +1 -1
- package/src/sap/ui/core/designtime/mvc/XMLView.designtime.js +1 -1
- package/src/sap/ui/core/dnd/DragAndDrop.js +1 -1
- package/src/sap/ui/core/dnd/DragDropBase.js +2 -2
- package/src/sap/ui/core/dnd/DragDropInfo.js +2 -2
- package/src/sap/ui/core/dnd/DragInfo.js +2 -2
- package/src/sap/ui/core/dnd/DropInfo.js +2 -2
- package/src/sap/ui/core/format/DateFormat.js +430 -295
- package/src/sap/ui/core/format/DateFormatTimezoneDisplay.js +1 -1
- package/src/sap/ui/core/format/FileSizeFormat.js +15 -5
- package/src/sap/ui/core/format/ListFormat.js +1 -1
- package/src/sap/ui/core/format/NumberFormat.js +44 -91
- package/src/sap/ui/core/format/TimezoneUtil.js +2 -2
- package/src/sap/ui/core/hyphenation/Hyphenation.js +2 -2
- package/src/sap/ui/core/hyphenation/HyphenationTestingWords.js +1 -1
- package/src/sap/ui/core/library.js +41 -13
- package/src/sap/ui/core/library.support.js +1 -1
- package/src/sap/ui/core/message/ControlMessageProcessor.js +2 -2
- package/src/sap/ui/core/message/Message.js +2 -2
- package/src/sap/ui/core/message/MessageManager.js +2 -2
- package/src/sap/ui/core/message/MessageMixin.js +1 -1
- package/src/sap/ui/core/message/MessageParser.js +2 -2
- package/src/sap/ui/core/message/MessageProcessor.js +2 -2
- package/src/sap/ui/core/messagebundle_bg.properties +1 -1
- package/src/sap/ui/core/messagebundle_fr.properties +1 -1
- package/src/sap/ui/core/messagebundle_hr.properties +2 -2
- package/src/sap/ui/core/messagebundle_nl.properties +1 -1
- package/src/sap/ui/core/messagebundle_th.properties +1 -1
- package/src/sap/ui/core/mvc/Controller.js +1 -1
- package/src/sap/ui/core/mvc/ControllerExtension.js +1 -1
- package/src/sap/ui/core/mvc/ControllerExtensionProvider.js +1 -1
- package/src/sap/ui/core/mvc/ControllerMetadata.js +1 -1
- package/src/sap/ui/core/mvc/EventHandlerResolver.js +1 -1
- package/src/sap/ui/core/mvc/HTMLView.js +2 -2
- package/src/sap/ui/core/mvc/HTMLViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/JSONView.js +2 -2
- package/src/sap/ui/core/mvc/JSONViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/JSView.js +2 -2
- package/src/sap/ui/core/mvc/JSViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/OverrideExecution.js +1 -1
- package/src/sap/ui/core/mvc/TemplateView.js +2 -2
- package/src/sap/ui/core/mvc/TemplateViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/View.js +2 -7
- package/src/sap/ui/core/mvc/ViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/ViewType.js +1 -1
- package/src/sap/ui/core/mvc/XMLProcessingMode.js +1 -1
- package/src/sap/ui/core/mvc/XMLView.js +2 -2
- package/src/sap/ui/core/mvc/XMLViewRenderer.js +1 -1
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +2 -2
- package/src/sap/ui/core/plugin/LessSupport.js +3 -3
- package/src/sap/ui/core/plugin/TemplatingSupport.js +2 -2
- package/src/sap/ui/core/postmessage/Bus.js +2 -2
- package/src/sap/ui/core/postmessage/confirmationDialog.js +2 -2
- package/src/sap/ui/core/routing/HashChanger.js +1 -1
- package/src/sap/ui/core/routing/HashChangerBase.js +1 -1
- package/src/sap/ui/core/routing/History.js +1 -1
- package/src/sap/ui/core/routing/Route.js +1 -1
- package/src/sap/ui/core/routing/Router.js +1 -1
- package/src/sap/ui/core/routing/RouterHashChanger.js +1 -1
- package/src/sap/ui/core/routing/Target.js +19 -3
- package/src/sap/ui/core/routing/TargetCache.js +1 -1
- package/src/sap/ui/core/routing/Targets.js +7 -15
- package/src/sap/ui/core/routing/Views.js +1 -1
- package/src/sap/ui/core/routing/async/Route.js +1 -1
- package/src/sap/ui/core/routing/async/Target.js +15 -23
- package/src/sap/ui/core/routing/async/TargetCache.js +1 -3
- package/src/sap/ui/core/routing/async/Targets.js +1 -1
- package/src/sap/ui/core/routing/sync/Route.js +1 -1
- package/src/sap/ui/core/routing/sync/Target.js +1 -2
- package/src/sap/ui/core/routing/sync/TargetCache.js +1 -1
- package/src/sap/ui/core/routing/sync/Targets.js +1 -1
- package/src/sap/ui/core/rules/App.support.js +1 -1
- package/src/sap/ui/core/rules/Config.support.js +1 -1
- package/src/sap/ui/core/rules/CoreHelper.support.js +1 -1
- package/src/sap/ui/core/rules/Misc.support.js +1 -1
- package/src/sap/ui/core/rules/Model.support.js +1 -1
- package/src/sap/ui/core/rules/Rendering.support.js +1 -1
- package/src/sap/ui/core/rules/Theming.support.js +1 -1
- package/src/sap/ui/core/rules/View.support.js +1 -1
- package/src/sap/ui/core/search/OpenSearchProvider.js +2 -2
- package/src/sap/ui/core/search/SearchProvider.js +2 -2
- package/src/sap/ui/core/service/Service.js +2 -2
- package/src/sap/ui/core/service/ServiceFactory.js +2 -2
- package/src/sap/ui/core/service/ServiceFactoryRegistry.js +2 -2
- package/src/sap/ui/core/support/BootSupportTool.js +1 -1
- package/src/sap/ui/core/support/Hotkeys.js +1 -1
- package/src/sap/ui/core/support/Plugin.js +2 -2
- package/src/sap/ui/core/support/RuleEngineOpaExtension.js +9 -8
- package/src/sap/ui/core/support/Support.js +20 -12
- package/src/sap/ui/core/support/ToolsAPI.js +1 -1
- package/src/sap/ui/core/support/bootstrapFallback.js +1 -1
- package/src/sap/ui/core/support/controls/InteractionSlider.js +1 -1
- package/src/sap/ui/core/support/controls/InteractionTree.js +1 -1
- package/src/sap/ui/core/support/controls/ObjectViewer.js +1 -1
- package/src/sap/ui/core/support/controls/TimelineOverview.js +1 -1
- package/src/sap/ui/core/support/controls/TreeViewer.js +1 -1
- package/src/sap/ui/core/support/debugReboot.js +1 -1
- package/src/sap/ui/core/support/plugins/Breakpoint.js +1 -1
- package/src/sap/ui/core/support/plugins/ControlTree.js +2 -2
- package/src/sap/ui/core/support/plugins/Debugging.js +1 -1
- package/src/sap/ui/core/support/plugins/Interaction.js +2 -2
- package/src/sap/ui/core/support/plugins/LocalStorage.js +2 -2
- package/src/sap/ui/core/support/plugins/Performance.js +2 -2
- package/src/sap/ui/core/support/plugins/Selector.js +2 -2
- package/src/sap/ui/core/support/plugins/TechInfo.js +2 -2
- package/src/sap/ui/core/support/plugins/Trace.js +2 -2
- package/src/sap/ui/core/support/plugins/ViewInfo.js +2 -2
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.fragment.xml +2 -1
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +8 -6
- package/src/sap/ui/core/support/techinfo/TechnicalInfoDebugDialog.fragment.xml +1 -0
- package/src/sap/ui/core/support/techinfo/moduleTreeHelper.js +1 -1
- package/src/sap/ui/core/support/trace/E2eTraceLib.js +1 -1
- package/src/sap/ui/core/support/trace/EppLib.js +1 -1
- package/src/sap/ui/core/support/usage/EventBroadcaster.js +1 -1
- package/src/sap/ui/core/syncStyleClass.js +1 -1
- package/src/sap/ui/core/themes/base/base.less +14 -9
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.ttf +0 -0
- package/src/sap/ui/core/themes/base/library.source.less +1 -1
- package/src/sap/ui/core/themes/sap_hcb/library.source.less +1 -1
- package/src/sap/ui/core/theming/Parameters.js +15 -14
- package/src/sap/ui/core/theming/ThemeHelper.js +48 -26
- package/src/sap/ui/core/theming/ThemeManager.js +7 -23
- package/src/sap/ui/core/tmpl/DOMAttribute.js +2 -2
- package/src/sap/ui/core/tmpl/DOMElement.js +2 -2
- package/src/sap/ui/core/tmpl/DOMElementRenderer.js +1 -1
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +2 -2
- package/src/sap/ui/core/tmpl/Template.js +2 -2
- package/src/sap/ui/core/tmpl/TemplateControl.js +2 -2
- package/src/sap/ui/core/tmpl/TemplateControlRenderer.js +1 -1
- package/src/sap/ui/core/tmpl/_parsePath.js +1 -1
- package/src/sap/ui/core/util/AsyncHintsHelper.js +2 -2
- package/src/sap/ui/core/util/DraftEnabledMockServer.js +1 -1
- package/src/sap/ui/core/util/Export.js +2 -2
- package/src/sap/ui/core/util/ExportCell.js +2 -2
- package/src/sap/ui/core/util/ExportColumn.js +2 -2
- package/src/sap/ui/core/util/ExportRow.js +2 -2
- package/src/sap/ui/core/util/ExportType.js +2 -2
- package/src/sap/ui/core/util/ExportTypeCSV.js +2 -2
- package/src/sap/ui/core/util/File.js +2 -2
- package/src/sap/ui/core/util/LibraryInfo.js +2 -2
- package/src/sap/ui/core/util/MockServer.js +2 -2
- package/src/sap/ui/core/util/MockServerAnnotationsHandler.js +1 -1
- package/src/sap/ui/core/util/PasteHelper.js +2 -2
- package/src/sap/ui/core/util/ResponsivePaddingsEnablement.js +1 -1
- package/src/sap/ui/core/util/ShortcutHelper.js +1 -1
- package/src/sap/ui/core/util/XMLPreprocessor.js +1 -1
- package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +13 -1
- package/src/sap/ui/core/util/reflection/JsControlTreeModifier.js +28 -4
- package/src/sap/ui/core/util/reflection/XmlTreeModifier.js +16 -1
- package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +2 -2
- package/src/sap/ui/core/util/serializer/Serializer.js +2 -2
- package/src/sap/ui/core/util/serializer/ViewSerializer.js +2 -2
- package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +2 -2
- package/src/sap/ui/core/util/serializer/delegate/Delegate.js +2 -2
- package/src/sap/ui/core/util/serializer/delegate/HTML.js +2 -2
- package/src/sap/ui/core/util/serializer/delegate/XML.js +2 -2
- package/src/sap/ui/core/ws/ReadyState.js +2 -2
- package/src/sap/ui/core/ws/SapPcpWebSocket.js +2 -2
- package/src/sap/ui/core/ws/WebSocket.js +2 -2
- package/src/sap/ui/debug/ControlTree.js +2 -2
- package/src/sap/ui/debug/DebugEnv.js +2 -2
- package/src/sap/ui/debug/Highlighter.js +1 -1
- package/src/sap/ui/debug/LogViewer.js +1 -1
- package/src/sap/ui/debug/PropertyList.js +2 -2
- package/src/sap/ui/dom/_ready.js +1 -1
- package/src/sap/ui/dom/containsOrEquals.js +1 -1
- package/src/sap/ui/dom/denormalizeScrollBeginRTL.js +1 -1
- package/src/sap/ui/dom/denormalizeScrollLeftRTL.js +1 -1
- package/src/sap/ui/dom/getComputedStyleFix.js +1 -1
- package/src/sap/ui/dom/getFirstEditableInput.js +1 -1
- package/src/sap/ui/dom/getOwnerWindow.js +1 -1
- package/src/sap/ui/dom/getScrollbarSize.js +1 -1
- package/src/sap/ui/dom/includeScript.js +1 -1
- package/src/sap/ui/dom/includeStylesheet.js +1 -1
- package/src/sap/ui/dom/isBehindOtherElement.js +53 -0
- package/src/sap/ui/dom/isHidden.js +1 -1
- package/src/sap/ui/dom/jquery/Aria.js +1 -1
- package/src/sap/ui/dom/jquery/Focusable.js +1 -1
- package/src/sap/ui/dom/jquery/Selection.js +1 -1
- package/src/sap/ui/dom/jquery/Selectors.js +1 -1
- package/src/sap/ui/dom/jquery/control.js +1 -1
- package/src/sap/ui/dom/jquery/cursorPos.js +1 -1
- package/src/sap/ui/dom/jquery/getSelectedText.js +1 -1
- package/src/sap/ui/dom/jquery/hasTabIndex.js +1 -1
- package/src/sap/ui/dom/jquery/parentByAttribute.js +1 -1
- package/src/sap/ui/dom/jquery/rect.js +1 -1
- package/src/sap/ui/dom/jquery/rectContains.js +1 -1
- package/src/sap/ui/dom/jquery/scrollLeftRTL.js +1 -1
- package/src/sap/ui/dom/jquery/scrollRightRTL.js +1 -1
- package/src/sap/ui/dom/jquery/selectText.js +1 -1
- package/src/sap/ui/dom/jquery/zIndex.js +1 -1
- package/src/sap/ui/dom/units/Rem.js +1 -1
- package/src/sap/ui/events/ControlEvents.js +1 -1
- package/src/sap/ui/events/F6Navigation.js +230 -164
- package/src/sap/ui/events/KeyCodes.js +1 -1
- package/src/sap/ui/events/PasteEventFix.js +1 -1
- package/src/sap/ui/events/PseudoEvents.js +1 -1
- package/src/sap/ui/events/TouchToMouseMapping.js +1 -1
- package/src/sap/ui/events/checkMouseEnterOrLeave.js +1 -1
- package/src/sap/ui/events/isMouseEventDelayed.js +1 -1
- package/src/sap/ui/events/isSpecialKey.js +1 -1
- package/src/sap/ui/events/jquery/EventExtension.js +1 -1
- package/src/sap/ui/events/jquery/EventSimulation.js +1 -1
- package/src/sap/ui/events/jquery/EventTriggerHook.js +1 -1
- package/src/sap/ui/model/Binding.js +1 -1
- package/src/sap/ui/model/BindingMode.js +1 -1
- package/src/sap/ui/model/ChangeReason.js +1 -1
- package/src/sap/ui/model/ClientContextBinding.js +1 -1
- package/src/sap/ui/model/ClientListBinding.js +1 -1
- package/src/sap/ui/model/ClientModel.js +2 -2
- package/src/sap/ui/model/ClientPropertyBinding.js +1 -1
- package/src/sap/ui/model/ClientTreeBinding.js +1 -1
- package/src/sap/ui/model/ClientTreeBindingAdapter.js +1 -1
- package/src/sap/ui/model/CompositeBinding.js +1 -1
- package/src/sap/ui/model/CompositeDataState.js +2 -2
- package/src/sap/ui/model/CompositeType.js +2 -2
- package/src/sap/ui/model/Context.js +1 -1
- package/src/sap/ui/model/ContextBinding.js +1 -1
- package/src/sap/ui/model/DataState.js +2 -2
- package/src/sap/ui/model/Filter.js +1 -1
- package/src/sap/ui/model/FilterOperator.js +1 -1
- package/src/sap/ui/model/FilterProcessor.js +1 -1
- package/src/sap/ui/model/FilterType.js +1 -1
- package/src/sap/ui/model/FormatException.js +1 -1
- package/src/sap/ui/model/ListBinding.js +1 -1
- package/src/sap/ui/model/ManagedObjectBindingSupport.js +4 -10
- package/src/sap/ui/model/MetaModel.js +2 -2
- package/src/sap/ui/model/Model.js +3 -3
- package/src/sap/ui/model/ParseException.js +1 -1
- package/src/sap/ui/model/PropertyBinding.js +1 -1
- package/src/sap/ui/model/SelectionModel.js +2 -2
- package/src/sap/ui/model/SimpleType.js +2 -2
- package/src/sap/ui/model/Sorter.js +1 -1
- package/src/sap/ui/model/SorterProcessor.js +1 -1
- package/src/sap/ui/model/StaticBinding.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +2 -2
- package/src/sap/ui/model/TreeBinding.js +1 -1
- package/src/sap/ui/model/TreeBindingAdapter.js +1 -1
- package/src/sap/ui/model/TreeBindingCompatibilityAdapter.js +1 -1
- package/src/sap/ui/model/TreeBindingUtils.js +1 -1
- package/src/sap/ui/model/Type.js +2 -2
- package/src/sap/ui/model/ValidateException.js +1 -1
- package/src/sap/ui/model/_Helper.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +17 -7
- package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalVersionInfo.js +1 -1
- package/src/sap/ui/model/analytics/BatchResponseCollector.js +1 -1
- package/src/sap/ui/model/analytics/ODataModelAdapter.js +1 -1
- package/src/sap/ui/model/analytics/odata4analytics.js +7 -3
- package/src/sap/ui/model/base/ManagedObjectModel.js +1 -1
- package/src/sap/ui/model/controlhelper/TreeBindingProxy.js +44 -26
- package/src/sap/ui/model/json/JSONListBinding.js +1 -1
- package/src/sap/ui/model/json/JSONModel.js +2 -2
- package/src/sap/ui/model/json/JSONPropertyBinding.js +1 -1
- package/src/sap/ui/model/json/JSONTreeBinding.js +1 -1
- package/src/sap/ui/model/message/MessageListBinding.js +1 -1
- package/src/sap/ui/model/message/MessageModel.js +2 -2
- package/src/sap/ui/model/message/MessagePropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/AnnotationHelper.js +1 -1
- package/src/sap/ui/model/odata/AnnotationParser.js +1 -1
- package/src/sap/ui/model/odata/CountMode.js +1 -1
- package/src/sap/ui/model/odata/Filter.js +1 -1
- package/src/sap/ui/model/odata/MessageScope.js +1 -1
- package/src/sap/ui/model/odata/ODataAnnotations.js +13 -5
- package/src/sap/ui/model/odata/ODataContextBinding.js +1 -1
- package/src/sap/ui/model/odata/ODataListBinding.js +1 -1
- package/src/sap/ui/model/odata/ODataMessageParser.js +2 -2
- package/src/sap/ui/model/odata/ODataMetaModel.js +28 -22
- package/src/sap/ui/model/odata/ODataMetadata.js +2 -2
- package/src/sap/ui/model/odata/ODataModel.js +2 -2
- package/src/sap/ui/model/odata/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/ODataTreeBindingAdapter.js +1 -1
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +1 -1
- package/src/sap/ui/model/odata/ODataUtils.js +1 -1
- package/src/sap/ui/model/odata/OperationMode.js +1 -1
- package/src/sap/ui/model/odata/UpdateMethod.js +1 -1
- package/src/sap/ui/model/odata/_AnnotationHelperBasics.js +1 -1
- package/src/sap/ui/model/odata/_AnnotationHelperExpression.js +1 -1
- package/src/sap/ui/model/odata/_ODataMetaModelUtils.js +1 -1
- package/src/sap/ui/model/odata/type/Boolean.js +2 -2
- package/src/sap/ui/model/odata/type/Byte.js +3 -3
- package/src/sap/ui/model/odata/type/Currency.js +9 -5
- package/src/sap/ui/model/odata/type/Date.js +3 -3
- package/src/sap/ui/model/odata/type/DateTime.js +2 -2
- package/src/sap/ui/model/odata/type/DateTimeBase.js +2 -2
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +3 -3
- package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +2 -2
- package/src/sap/ui/model/odata/type/Decimal.js +4 -4
- package/src/sap/ui/model/odata/type/Double.js +4 -4
- package/src/sap/ui/model/odata/type/Guid.js +2 -2
- package/src/sap/ui/model/odata/type/Int.js +2 -2
- package/src/sap/ui/model/odata/type/Int16.js +4 -4
- package/src/sap/ui/model/odata/type/Int32.js +4 -4
- package/src/sap/ui/model/odata/type/Int64.js +4 -4
- package/src/sap/ui/model/odata/type/ODataType.js +2 -2
- package/src/sap/ui/model/odata/type/Raw.js +2 -2
- package/src/sap/ui/model/odata/type/SByte.js +3 -3
- package/src/sap/ui/model/odata/type/Single.js +4 -4
- package/src/sap/ui/model/odata/type/Stream.js +2 -2
- package/src/sap/ui/model/odata/type/String.js +2 -2
- package/src/sap/ui/model/odata/type/Time.js +3 -3
- package/src/sap/ui/model/odata/type/TimeOfDay.js +3 -3
- package/src/sap/ui/model/odata/type/Unit.js +8 -5
- package/src/sap/ui/model/odata/type/UnitMixin.js +1 -1
- package/src/sap/ui/model/odata/v2/BatchMode.js +1 -1
- package/src/sap/ui/model/odata/v2/Context.js +2 -2
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +3 -5
- package/src/sap/ui/model/odata/v2/ODataContextBinding.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataModel.js +2 -2
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +2 -2
- package/src/sap/ui/model/odata/v2/_CreatedContextsCache.js +1 -1
- package/src/sap/ui/model/odata/v4/AnnotationHelper.js +1 -1
- package/src/sap/ui/model/odata/v4/Context.js +162 -112
- package/src/sap/ui/model/odata/v4/ODataBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +118 -85
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +183 -163
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +3 -4
- package/src/sap/ui/model/odata/v4/ODataModel.js +67 -13
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +47 -13
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +19 -5
- package/src/sap/ui/model/odata/v4/ODataUtils.js +7 -7
- package/src/sap/ui/model/odata/v4/SubmitMode.js +1 -1
- package/src/sap/ui/model/odata/v4/ValueListType.js +1 -1
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +122 -54
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +13 -6
- package/src/sap/ui/model/odata/v4/lib/_Batch.js +20 -13
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +217 -165
- package/src/sap/ui/model/odata/v4/lib/_ConcatHelper.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_GroupLock.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +112 -23
- package/src/sap/ui/model/odata/v4/lib/_MetadataConverter.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_MetadataRequestor.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_MinMaxHelper.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Parser.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +29 -14
- package/src/sap/ui/model/odata/v4/lib/_V2MetadataConverter.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_V4MetadataConverter.js +1 -1
- package/src/sap/ui/model/resource/ResourceModel.js +2 -2
- package/src/sap/ui/model/resource/ResourcePropertyBinding.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +2 -2
- package/src/sap/ui/model/type/Currency.js +2 -2
- package/src/sap/ui/model/type/Date.js +2 -2
- package/src/sap/ui/model/type/DateInterval.js +2 -2
- package/src/sap/ui/model/type/DateTime.js +2 -2
- package/src/sap/ui/model/type/DateTimeInterval.js +2 -2
- package/src/sap/ui/model/type/FileSize.js +4 -3
- package/src/sap/ui/model/type/Float.js +4 -3
- package/src/sap/ui/model/type/Integer.js +4 -3
- package/src/sap/ui/model/type/String.js +2 -2
- package/src/sap/ui/model/type/Time.js +2 -2
- package/src/sap/ui/model/type/TimeInterval.js +2 -2
- package/src/sap/ui/model/type/Unit.js +2 -2
- package/src/sap/ui/model/xml/XMLListBinding.js +1 -1
- package/src/sap/ui/model/xml/XMLModel.js +2 -2
- package/src/sap/ui/model/xml/XMLPropertyBinding.js +1 -1
- package/src/sap/ui/model/xml/XMLTreeBinding.js +1 -1
- package/src/sap/ui/performance/BeaconRequest.js +1 -1
- package/src/sap/ui/performance/Measurement.js +1 -1
- package/src/sap/ui/performance/XHRInterceptor.js +1 -1
- package/src/sap/ui/performance/trace/FESR.js +1 -1
- package/src/sap/ui/performance/trace/FESRHelper.js +1 -1
- package/src/sap/ui/performance/trace/Interaction.js +24 -10
- package/src/sap/ui/performance/trace/Passport.js +1 -1
- package/src/sap/ui/performance/trace/initTraces.js +10 -6
- package/src/sap/ui/qunit/QUnitUtils.js +2 -2
- package/src/sap/ui/qunit/qunit-2-css.js +1 -1
- package/src/sap/ui/qunit/qunit-coverage.js +1 -1
- package/src/sap/ui/qunit/qunit-css.js +1 -1
- package/src/sap/ui/qunit/qunit-junit.js +1 -1
- package/src/sap/ui/qunit/qunit-redirect.js +1 -1
- package/src/sap/ui/qunit/sinon-qunit-bridge.js +1 -1
- package/src/sap/ui/qunit/utils/ControlIterator.js +2 -2
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +2 -2
- package/src/sap/ui/qunit/utils/createAndAppendDiv.js +1 -1
- package/src/sap/ui/qunit/utils/waitForThemeApplied.js +1 -1
- package/src/sap/ui/security/FrameOptions.js +1 -1
- package/src/sap/ui/test/BlanketReporter.js +1 -1
- package/src/sap/ui/test/BlanketReporterUI.view.xml +2 -5
- package/src/sap/ui/test/BranchTracking.js +1 -1
- package/src/sap/ui/test/Opa.js +1 -1
- package/src/sap/ui/test/Opa5.js +1 -1
- package/src/sap/ui/test/OpaBuilder.js +2 -2
- package/src/sap/ui/test/OpaExtension.js +1 -1
- package/src/sap/ui/test/OpaPlugin.js +22 -3
- package/src/sap/ui/test/PageObjectFactory.js +1 -1
- package/src/sap/ui/test/RecordReplay.js +1 -1
- package/src/sap/ui/test/RecorderHotkeyListener.js +1 -1
- package/src/sap/ui/test/TestUtils.js +78 -92
- package/src/sap/ui/test/_BrowserLogCollector.js +1 -1
- package/src/sap/ui/test/_ControlFinder.js +254 -238
- package/src/sap/ui/test/_FocusListener.js +49 -0
- package/src/sap/ui/test/_LogCollector.js +1 -1
- package/src/sap/ui/test/_OpaLogger.js +1 -1
- package/src/sap/ui/test/_OpaUriParameterParser.js +1 -1
- package/src/sap/ui/test/_ParameterValidator.js +1 -1
- package/src/sap/ui/test/_UsageReport.js +1 -1
- package/src/sap/ui/test/_ValidationParameters.js +1 -1
- package/src/sap/ui/test/actions/Action.js +17 -3
- package/src/sap/ui/test/actions/Drag.js +1 -1
- package/src/sap/ui/test/actions/Drop.js +1 -1
- package/src/sap/ui/test/actions/EnterText.js +37 -5
- package/src/sap/ui/test/actions/Press.js +1 -1
- package/src/sap/ui/test/actions/Scroll.js +1 -1
- package/src/sap/ui/test/autowaiter/WaiterBase.js +1 -1
- package/src/sap/ui/test/autowaiter/_UIUpdatesWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_XHRWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_autoWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_autoWaiterAsync.js +1 -1
- package/src/sap/ui/test/autowaiter/_cssAnimationWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_cssTransitionWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_jsAnimationWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_moduleWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_navigationContainerWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_promiseWaiter.js +2 -2
- package/src/sap/ui/test/autowaiter/_resourceWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_timeoutWaiter.js +1 -1
- package/src/sap/ui/test/autowaiter/_utils.js +1 -1
- package/src/sap/ui/test/generic/GenericTestCollection.js +22 -11
- package/src/sap/ui/test/generic/TestBase.js +2 -2
- package/src/sap/ui/test/generic/Utils.js +2 -2
- package/src/sap/ui/test/generic/_EnforceSemanticRendering.js +5 -5
- package/src/sap/ui/test/gherkin/GherkinTestGenerator.js +1 -1
- package/src/sap/ui/test/gherkin/StepDefinitions.js +1 -1
- package/src/sap/ui/test/gherkin/dataTableUtils.js +1 -1
- package/src/sap/ui/test/gherkin/opa5TestHarness.js +1 -1
- package/src/sap/ui/test/gherkin/qUnitTestHarness.js +1 -1
- package/src/sap/ui/test/gherkin/simpleGherkinParser.js +1 -1
- package/src/sap/ui/test/launchers/componentLauncher.js +1 -1
- package/src/sap/ui/test/launchers/iFrameLauncher.js +1 -1
- package/src/sap/ui/test/matchers/AggregationContainsPropertyEqual.js +1 -1
- package/src/sap/ui/test/matchers/AggregationEmpty.js +1 -1
- package/src/sap/ui/test/matchers/AggregationFilled.js +1 -1
- package/src/sap/ui/test/matchers/AggregationLengthEquals.js +1 -1
- package/src/sap/ui/test/matchers/Ancestor.js +1 -1
- package/src/sap/ui/test/matchers/BindingPath.js +1 -1
- package/src/sap/ui/test/matchers/Descendant.js +1 -1
- package/src/sap/ui/test/matchers/I18NText.js +1 -1
- package/src/sap/ui/test/matchers/Interactable.js +1 -1
- package/src/sap/ui/test/matchers/LabelFor.js +1 -1
- package/src/sap/ui/test/matchers/Matcher.js +1 -1
- package/src/sap/ui/test/matchers/MatcherFactory.js +1 -1
- package/src/sap/ui/test/matchers/Properties.js +1 -1
- package/src/sap/ui/test/matchers/PropertyStrictEquals.js +1 -1
- package/src/sap/ui/test/matchers/Sibling.js +1 -1
- package/src/sap/ui/test/matchers/Visible.js +1 -1
- package/src/sap/ui/test/matchers/_Busy.js +1 -1
- package/src/sap/ui/test/matchers/_Editable.js +1 -1
- package/src/sap/ui/test/matchers/_Enabled.js +1 -1
- package/src/sap/ui/test/matchers/_Visitor.js +1 -1
- package/src/sap/ui/test/matchers/matchers.js +1 -1
- package/src/sap/ui/test/opaQunit.js +1 -1
- package/src/sap/ui/test/pipelines/ActionPipeline.js +1 -1
- package/src/sap/ui/test/pipelines/MatcherPipeline.js +1 -1
- package/src/sap/ui/test/pipelines/PipelineFactory.js +1 -1
- package/src/sap/ui/test/qunitPause.js +1 -1
- package/src/sap/ui/test/selectors/_BindingPath.js +1 -1
- package/src/sap/ui/test/selectors/_ControlSelectorGenerator.js +1 -1
- package/src/sap/ui/test/selectors/_ControlSelectorValidator.js +1 -1
- package/src/sap/ui/test/selectors/_ControlType.js +1 -1
- package/src/sap/ui/test/selectors/_DropdownItem.js +1 -1
- package/src/sap/ui/test/selectors/_GlobalID.js +1 -1
- package/src/sap/ui/test/selectors/_LabelFor.js +1 -1
- package/src/sap/ui/test/selectors/_Properties.js +1 -1
- package/src/sap/ui/test/selectors/_Selector.js +2 -1
- package/src/sap/ui/test/selectors/_TableRowItem.js +1 -1
- package/src/sap/ui/test/selectors/_ViewID.js +1 -1
- package/src/sap/ui/test/selectors/_selectors.js +1 -1
- package/src/sap/ui/test/starter/_configureLoader.js +1 -1
- package/src/sap/ui/test/starter/_setupAndStart.js +1 -1
- package/src/sap/ui/test/starter/_utils.js +1 -1
- package/src/sap/ui/test/starter/createSuite.js +1 -1
- package/src/sap/ui/test/starter/runTest.js +1 -1
- package/src/sap/ui/thirdparty/RequestRecorder.js +1 -1
- package/src/sap/ui/thirdparty/caja-html-sanitizer.js +1 -1
- package/src/sap/ui/util/ActivityDetection.js +1 -1
- package/src/sap/ui/util/Mobile.js +1 -1
- package/src/sap/ui/util/Storage.js +2 -2
- package/src/sap/ui/util/XMLHelper.js +1 -1
- package/src/sap/ui/util/_FeatureDetection.js +1 -1
- package/src/sap/ui/util/defaultLinkTypes.js +1 -1
- package/src/sap/ui/util/isCrossOriginURL.js +1 -1
- package/src/sap/ui/util/openWindow.js +1 -1
- package/src/sap-ui-boot.js +1 -1
- package/src/sap-ui-core-nojQuery.js +1 -1
- package/src/sap-ui-core.js +1 -1
- package/src/sap-ui-debug.js +1 -1
- package/src/ui5loader-autoconfig.js +1 -1
- package/src/ui5loader.js +1 -1
package/src/sap/ui/core/Core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
'jquery.sap.global',
|
|
10
10
|
'sap/ui/Device',
|
|
11
|
-
'sap/ui/Global',
|
|
12
|
-
'sap/ui/base/DataType',
|
|
13
11
|
'sap/ui/base/EventProvider',
|
|
14
12
|
'sap/ui/base/Interface',
|
|
15
13
|
'sap/ui/base/Object',
|
|
@@ -18,34 +16,25 @@ sap.ui.define([
|
|
|
18
16
|
'./Configuration',
|
|
19
17
|
'./Element',
|
|
20
18
|
'./ElementMetadata',
|
|
19
|
+
'./Lib',
|
|
21
20
|
'./Rendering',
|
|
22
21
|
'./RenderManager',
|
|
23
22
|
'./UIArea',
|
|
24
23
|
'./message/MessageManager',
|
|
25
|
-
"sap/base/i18n/ResourceBundle",
|
|
26
24
|
"sap/base/Log",
|
|
27
25
|
"sap/ui/performance/Measurement",
|
|
28
26
|
"sap/ui/security/FrameOptions",
|
|
29
27
|
"sap/base/assert",
|
|
30
28
|
"sap/base/util/ObjectPath",
|
|
31
|
-
"sap/base/util/Version",
|
|
32
|
-
"sap/base/util/array/uniqueSort",
|
|
33
29
|
'sap/ui/performance/trace/initTraces',
|
|
34
|
-
'sap/base/util/LoaderExtensions',
|
|
35
30
|
'sap/base/util/isEmptyObject',
|
|
36
|
-
'sap/base/util/deepExtend',
|
|
37
31
|
'sap/base/util/each',
|
|
38
|
-
'sap/base/util/mixedFetch',
|
|
39
|
-
'./_UrlResolver',
|
|
40
32
|
'sap/ui/VersionInfo',
|
|
41
|
-
'sap/ui/thirdparty/URI',
|
|
42
33
|
'sap/ui/events/jquery/EventSimulation'
|
|
43
34
|
],
|
|
44
35
|
function(
|
|
45
36
|
jQuery,
|
|
46
37
|
Device,
|
|
47
|
-
Global,
|
|
48
|
-
DataType,
|
|
49
38
|
EventProvider,
|
|
50
39
|
Interface,
|
|
51
40
|
BaseObject,
|
|
@@ -54,27 +43,20 @@ sap.ui.define([
|
|
|
54
43
|
Configuration,
|
|
55
44
|
Element,
|
|
56
45
|
ElementMetadata,
|
|
46
|
+
Library,
|
|
57
47
|
Rendering,
|
|
58
48
|
RenderManager,
|
|
59
49
|
UIArea,
|
|
60
50
|
MessageManager,
|
|
61
|
-
ResourceBundle,
|
|
62
51
|
Log,
|
|
63
52
|
Measurement,
|
|
64
53
|
FrameOptions,
|
|
65
54
|
assert,
|
|
66
55
|
ObjectPath,
|
|
67
|
-
Version,
|
|
68
|
-
uniqueSort,
|
|
69
56
|
initTraces,
|
|
70
|
-
LoaderExtensions,
|
|
71
57
|
isEmptyObject,
|
|
72
|
-
deepExtend,
|
|
73
58
|
each,
|
|
74
|
-
|
|
75
|
-
_UrlResolver,
|
|
76
|
-
VersionInfo,
|
|
77
|
-
URI
|
|
59
|
+
VersionInfo
|
|
78
60
|
/* ,EventSimulation */
|
|
79
61
|
) {
|
|
80
62
|
|
|
@@ -98,44 +80,6 @@ sap.ui.define([
|
|
|
98
80
|
// Initialize SAP Passport or FESR
|
|
99
81
|
initTraces();
|
|
100
82
|
|
|
101
|
-
/**
|
|
102
|
-
* Set of libraries that have been loaded and initialized already.
|
|
103
|
-
* This is maintained separately from Core.mLibraries to protect it against
|
|
104
|
-
* modification from the outside (objects in mLibraries are currently exposed
|
|
105
|
-
* by getLoadedLibraries())
|
|
106
|
-
*/
|
|
107
|
-
var mLoadedLibraries = {};
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Bookkeeping for the guessing of library names.
|
|
111
|
-
*
|
|
112
|
-
* Set of bundleUrls from which a library name has been derived or not, see #getLibraryNameForBundle
|
|
113
|
-
* If no library name can be derived, the result will also be tracked with 'false' as value.
|
|
114
|
-
*
|
|
115
|
-
* Example:
|
|
116
|
-
* mGuessedLibraries = {
|
|
117
|
-
* "my/simple/library/i18n/i18n.properties": "my.simple.library",
|
|
118
|
-
* "no/library/i18n/i18n.properties": false
|
|
119
|
-
* }
|
|
120
|
-
*/
|
|
121
|
-
var mGuessedLibraries = {};
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Sequence of libraries which require CSS.
|
|
125
|
-
*/
|
|
126
|
-
var aAllLibrariesRequiringCss = [];
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Bookkeeping for the preloading of libraries.
|
|
130
|
-
*
|
|
131
|
-
* Might contain an object for each library (keyed by the library name).
|
|
132
|
-
* While the preload is pending for a library, the object has a property preload = true.
|
|
133
|
-
* In any case, the object contains a promise that fulfills / rejects when the preload
|
|
134
|
-
* fulfills / rejects.
|
|
135
|
-
* @private
|
|
136
|
-
*/
|
|
137
|
-
var mLibraryPreloadBundles = {};
|
|
138
|
-
|
|
139
83
|
/**
|
|
140
84
|
* EventProvider instance, EventProvider is no longer extended
|
|
141
85
|
* @private
|
|
@@ -226,7 +170,7 @@ sap.ui.define([
|
|
|
226
170
|
* @extends sap.ui.base.Object
|
|
227
171
|
* @final
|
|
228
172
|
* @author SAP SE
|
|
229
|
-
* @version 1.
|
|
173
|
+
* @version 1.110.0
|
|
230
174
|
* @alias sap.ui.core.Core
|
|
231
175
|
* @public
|
|
232
176
|
* @hideconstructor
|
|
@@ -271,19 +215,6 @@ sap.ui.define([
|
|
|
271
215
|
*/
|
|
272
216
|
this.aPlugins = [];
|
|
273
217
|
|
|
274
|
-
/**
|
|
275
|
-
* Collection of loaded or adhoc created libraries, keyed by their name.
|
|
276
|
-
* @private
|
|
277
|
-
*/
|
|
278
|
-
this.mLibraries = {};
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* Already loaded resource bundles keyed by library and locale.
|
|
282
|
-
* @private
|
|
283
|
-
* @see sap.ui.core.Core.getLibraryResourceBundle
|
|
284
|
-
*/
|
|
285
|
-
this.mResourceBundles = {};
|
|
286
|
-
|
|
287
218
|
/**
|
|
288
219
|
* Default model used for databinding
|
|
289
220
|
* @private
|
|
@@ -382,20 +313,6 @@ sap.ui.define([
|
|
|
382
313
|
// where no preload is used at all.
|
|
383
314
|
var bAsync = sPreloadMode === "async" || sap.ui.loader.config().async;
|
|
384
315
|
|
|
385
|
-
// evaluate configuration for library preload file types
|
|
386
|
-
Configuration.getValue("xx-libraryPreloadFiles").forEach(function(v){
|
|
387
|
-
var fields = String(v).trim().split(/\s*:\s*/),
|
|
388
|
-
name = fields[0],
|
|
389
|
-
fileType = fields[1];
|
|
390
|
-
if ( fields.length === 1 ) {
|
|
391
|
-
fileType = name;
|
|
392
|
-
name = '';
|
|
393
|
-
}
|
|
394
|
-
if ( /^(?:none|js|json|both)$/.test(fileType) ) {
|
|
395
|
-
mLibraryPreloadFileTypes[name] = fileType;
|
|
396
|
-
}
|
|
397
|
-
});
|
|
398
|
-
|
|
399
316
|
// adding the following classList is done here for compatibility reasons
|
|
400
317
|
document.documentElement.classList.add("sapUiTheme-" + Configuration.getTheme());
|
|
401
318
|
Log.info("Declared theme " + Configuration.getTheme(), null, METHOD);
|
|
@@ -478,7 +395,7 @@ sap.ui.define([
|
|
|
478
395
|
oSyncPoint2.finishTask(iVersionInfoTask);
|
|
479
396
|
});
|
|
480
397
|
} else {
|
|
481
|
-
fnCallback(sap.ui.getVersionInfo({ async: bAsync, failOnError: false }));
|
|
398
|
+
fnCallback(sap.ui.getVersionInfo({ async: bAsync, failOnError: false })); // legacy-relevant: sync path
|
|
482
399
|
}
|
|
483
400
|
}
|
|
484
401
|
|
|
@@ -515,13 +432,14 @@ sap.ui.define([
|
|
|
515
432
|
return aResult;
|
|
516
433
|
}, []);
|
|
517
434
|
|
|
518
|
-
var
|
|
519
|
-
|
|
435
|
+
var pLibraryPreloaded = Library._load(aLibs, {
|
|
436
|
+
sync: !bAsync,
|
|
520
437
|
preloadOnly: true
|
|
521
438
|
});
|
|
439
|
+
|
|
522
440
|
if ( bAsync ) {
|
|
523
441
|
var iPreloadLibrariesTask = oSyncPoint2.startTask("preload bootstrap libraries");
|
|
524
|
-
|
|
442
|
+
pLibraryPreloaded.then(function() {
|
|
525
443
|
oSyncPoint2.finishTask(iPreloadLibrariesTask);
|
|
526
444
|
}, function() {
|
|
527
445
|
oSyncPoint2.finishTask(iPreloadLibrariesTask, false);
|
|
@@ -623,7 +541,6 @@ sap.ui.define([
|
|
|
623
541
|
"applyTheme","setThemeRoot","attachThemeChanged","detachThemeChanged",
|
|
624
542
|
"isThemeApplied",
|
|
625
543
|
"notifyContentDensityChanged",
|
|
626
|
-
"getAllLibrariesRequiringCss",
|
|
627
544
|
// - Control & App dev.
|
|
628
545
|
"getCurrentFocusedControlId",
|
|
629
546
|
"isMobile",
|
|
@@ -694,11 +611,9 @@ sap.ui.define([
|
|
|
694
611
|
* @private
|
|
695
612
|
*/
|
|
696
613
|
Core.prototype._grantFriendAccess = function() {
|
|
697
|
-
var that = this;
|
|
698
|
-
|
|
699
614
|
// grant ElementMetadata "friend" access to Core for registration
|
|
700
615
|
ElementMetadata.prototype.register = function(oMetadata) {
|
|
701
|
-
|
|
616
|
+
Library._registerElement(oMetadata);
|
|
702
617
|
};
|
|
703
618
|
};
|
|
704
619
|
|
|
@@ -845,18 +760,19 @@ sap.ui.define([
|
|
|
845
760
|
this.aModules.forEach( function(mod) {
|
|
846
761
|
var m = mod.match(/^(.*)\.library$/);
|
|
847
762
|
if ( m ) {
|
|
848
|
-
|
|
763
|
+
Library._load(m[1], {
|
|
764
|
+
sync: true
|
|
765
|
+
});
|
|
849
766
|
} else {
|
|
850
767
|
// data-sap-ui-modules might contain legacy jquery.sap.* modules
|
|
851
768
|
sap.ui.requireSync( /^jquery\.sap\./.test(mod) ? mod : mod.replace(/\./g, "/")); // legacy-relevant: Sync loading of modules and libraries
|
|
852
769
|
}
|
|
853
|
-
}
|
|
770
|
+
});
|
|
854
771
|
|
|
855
772
|
fnCallback();
|
|
856
773
|
};
|
|
857
774
|
|
|
858
775
|
Core.prototype._requireModulesAsync = function() {
|
|
859
|
-
|
|
860
776
|
var aLibs = [],
|
|
861
777
|
aModules = [];
|
|
862
778
|
|
|
@@ -872,14 +788,13 @@ sap.ui.define([
|
|
|
872
788
|
|
|
873
789
|
// TODO: require libs and modules in parallel or define a sequence?
|
|
874
790
|
return Promise.all([
|
|
875
|
-
|
|
791
|
+
Library._load(aLibs),
|
|
876
792
|
new Promise(function(resolve) {
|
|
877
793
|
sap.ui.require(aModules, function() {
|
|
878
794
|
resolve(Array.prototype.slice.call(arguments));
|
|
879
795
|
});
|
|
880
796
|
})
|
|
881
797
|
]);
|
|
882
|
-
|
|
883
798
|
};
|
|
884
799
|
|
|
885
800
|
/**
|
|
@@ -1196,6 +1111,7 @@ sap.ui.define([
|
|
|
1196
1111
|
|
|
1197
1112
|
Core.prototype._getThemeManager = function (bClear) {
|
|
1198
1113
|
ThemeManager = ThemeManager || sap.ui.require("sap/ui/core/theming/ThemeManager");
|
|
1114
|
+
|
|
1199
1115
|
if (!this.pThemeManager) {
|
|
1200
1116
|
if (!ThemeManager) {
|
|
1201
1117
|
this.pThemeManager = new Promise(function (resolve, reject) {
|
|
@@ -1343,427 +1259,6 @@ sap.ui.define([
|
|
|
1343
1259
|
return FocusHandler ? FocusHandler.getCurrentFocusedControlId() : null;
|
|
1344
1260
|
};
|
|
1345
1261
|
|
|
1346
|
-
/**
|
|
1347
|
-
* Configured type of preload file per library.
|
|
1348
|
-
* The empty name represents the default for all libraries not explicitly listed.
|
|
1349
|
-
*
|
|
1350
|
-
* A type can be one of
|
|
1351
|
-
* - 'none' (do not preload),
|
|
1352
|
-
* - 'js' (preload JS file),
|
|
1353
|
-
* - 'json' (preload a json file)
|
|
1354
|
-
* or 'both (try js first, then 'json')
|
|
1355
|
-
*
|
|
1356
|
-
* @private
|
|
1357
|
-
*/
|
|
1358
|
-
var mLibraryPreloadFileTypes = {};
|
|
1359
|
-
|
|
1360
|
-
function evalLibConfig(lib) {
|
|
1361
|
-
|
|
1362
|
-
assert(
|
|
1363
|
-
typeof lib === 'string' && lib ||
|
|
1364
|
-
typeof lib === 'object' && typeof lib.name === 'string' && lib.name && (lib.json == null || typeof lib.json === 'boolean'),
|
|
1365
|
-
"lib must be a non-empty string or an object with at least a non-empty 'name' property and an optional (boolean) property 'json'" );
|
|
1366
|
-
|
|
1367
|
-
var fileTypeSupportedByLib = 'both';
|
|
1368
|
-
var lazy = false;
|
|
1369
|
-
if ( typeof lib === 'object' ) {
|
|
1370
|
-
if ( lib.json === true ) {
|
|
1371
|
-
fileTypeSupportedByLib = 'json';
|
|
1372
|
-
} else if ( lib.json === false ) {
|
|
1373
|
-
fileTypeSupportedByLib = 'js';
|
|
1374
|
-
}
|
|
1375
|
-
lazy = !!lib.lazy;
|
|
1376
|
-
lib = lib.name;
|
|
1377
|
-
}
|
|
1378
|
-
|
|
1379
|
-
// decide between supported and configured preload file types
|
|
1380
|
-
var fileType = mLibraryPreloadFileTypes[lib] || mLibraryPreloadFileTypes[''] || 'both';
|
|
1381
|
-
if ( fileType === 'both' ) {
|
|
1382
|
-
// if the configured file type is 'both', the supported type always wins
|
|
1383
|
-
fileType = fileTypeSupportedByLib;
|
|
1384
|
-
} else if ( fileType !== fileTypeSupportedByLib && fileTypeSupportedByLib !== 'both' ) {
|
|
1385
|
-
// if the configured and the supported file type are not equal and the library doesn't support 'both',
|
|
1386
|
-
// then there is no compromise -> 'none'
|
|
1387
|
-
fileType = 'none';
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
return {
|
|
1391
|
-
name: lib,
|
|
1392
|
-
fileType: fileType,
|
|
1393
|
-
lazy: lazy
|
|
1394
|
-
};
|
|
1395
|
-
|
|
1396
|
-
}
|
|
1397
|
-
|
|
1398
|
-
/**
|
|
1399
|
-
* Preloads a library asynchronously.
|
|
1400
|
-
*
|
|
1401
|
-
* @param {string|object} libConfig Name of the library to preload or settings object describing library
|
|
1402
|
-
* @param {string} [libConfig.name] Name of the library to preload
|
|
1403
|
-
* @param {boolean|undefined} [libConfig.json] Whether library supports only JSON (<code>true</code>) or only JS (<code>false</code>)
|
|
1404
|
-
* or whether both should be tried (undefined)
|
|
1405
|
-
* @returns {Promise} A promise to be fulfilled when the library has been preloaded
|
|
1406
|
-
* @private
|
|
1407
|
-
*/
|
|
1408
|
-
function preloadLibraryAsync(libConfig) {
|
|
1409
|
-
|
|
1410
|
-
var that = this;
|
|
1411
|
-
|
|
1412
|
-
libConfig = evalLibConfig(libConfig);
|
|
1413
|
-
|
|
1414
|
-
var lib = libConfig.name,
|
|
1415
|
-
fileType = libConfig.fileType,
|
|
1416
|
-
libPackage = lib.replace(/\./g, '/'),
|
|
1417
|
-
http2 = Configuration.getDepCache();
|
|
1418
|
-
|
|
1419
|
-
if ( fileType === 'none' || sap.ui.loader._.getModuleState(libPackage + '/library.js') ) {
|
|
1420
|
-
return Promise.resolve(true);
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
var libInfo = mLibraryPreloadBundles[lib] || (mLibraryPreloadBundles[lib] = { });
|
|
1424
|
-
|
|
1425
|
-
// return any existing promise (either lib is currently loading or has been loaded)
|
|
1426
|
-
if ( libInfo.promise ) {
|
|
1427
|
-
return libInfo.promise;
|
|
1428
|
-
}
|
|
1429
|
-
|
|
1430
|
-
if ( libConfig.lazy ) {
|
|
1431
|
-
// For selected lazy dependencies, we load a library-preload-lazy module.
|
|
1432
|
-
// Errors are ignored and the promise is not added to the library bookkeeping
|
|
1433
|
-
// (but the loader avoids double loading).
|
|
1434
|
-
Log.debug("Lazy dependency to '" + lib + "' encountered, loading library-preload-lazy.js");
|
|
1435
|
-
return sap.ui.loader._.loadJSResourceAsync(
|
|
1436
|
-
libPackage + '/library-preload-lazy.js', /* ignoreErrors = */ true);
|
|
1437
|
-
}
|
|
1438
|
-
|
|
1439
|
-
// otherwise mark as pending
|
|
1440
|
-
libInfo.pending = true;
|
|
1441
|
-
libInfo.async = true;
|
|
1442
|
-
|
|
1443
|
-
// first preload code, resolves with list of dependencies (or undefined)
|
|
1444
|
-
var p;
|
|
1445
|
-
if ( fileType !== 'json' /* 'js' or 'both', not forced to JSON */ ) {
|
|
1446
|
-
var sPreloadModule = libPackage + (http2 ? '/library-h2-preload.js' : '/library-preload.js');
|
|
1447
|
-
p = sap.ui.loader._.loadJSResourceAsync(sPreloadModule).then(
|
|
1448
|
-
function() {
|
|
1449
|
-
return dependenciesFromManifest(lib);
|
|
1450
|
-
},
|
|
1451
|
-
function(e) {
|
|
1452
|
-
// loading library-preload.js failed, might be an old style lib with a library-preload.json only.
|
|
1453
|
-
// with json === false, this fallback can be suppressed
|
|
1454
|
-
if ( fileType !== 'js' /* 'both' */ ) {
|
|
1455
|
-
Log.error("failed to load '" + sPreloadModule + "' (" + (e && e.message || e) + "), falling back to library-preload.json");
|
|
1456
|
-
return loadJSONAsync(lib);
|
|
1457
|
-
}
|
|
1458
|
-
// ignore other errors
|
|
1459
|
-
}
|
|
1460
|
-
);
|
|
1461
|
-
} else {
|
|
1462
|
-
p = loadJSONAsync(lib);
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
// load dependencies, if there are any
|
|
1466
|
-
libInfo.promise = p.then(function(dependencies) {
|
|
1467
|
-
var aPromises = [],
|
|
1468
|
-
oManifest = getManifest(lib);
|
|
1469
|
-
|
|
1470
|
-
if ( dependencies && dependencies.length ) {
|
|
1471
|
-
var eagerDependencies = dependencies.filter(function(dep) {
|
|
1472
|
-
return typeof dep === "string";
|
|
1473
|
-
});
|
|
1474
|
-
var lazyDependencies = dependencies.filter(function(dep) {
|
|
1475
|
-
return typeof dep !== "string";
|
|
1476
|
-
});
|
|
1477
|
-
eagerDependencies = VersionInfo._getTransitiveDependencyForLibraries(eagerDependencies);
|
|
1478
|
-
|
|
1479
|
-
// combine transitive closure of eager dependencies and direct lazy dependencies,
|
|
1480
|
-
// the latter might be redundant
|
|
1481
|
-
dependencies = eagerDependencies.concat(lazyDependencies);
|
|
1482
|
-
|
|
1483
|
-
aPromises = dependencies.map(preloadLibraryAsync.bind(that));
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
if (oManifest && Version(oManifest._version).compareTo("1.9.0") >= 0) {
|
|
1487
|
-
aPromises.push(that.getLibraryResourceBundle(lib, true));
|
|
1488
|
-
}
|
|
1489
|
-
|
|
1490
|
-
return Promise.all(aPromises).then(function() {
|
|
1491
|
-
libInfo.pending = false;
|
|
1492
|
-
});
|
|
1493
|
-
});
|
|
1494
|
-
|
|
1495
|
-
// return resulting promise
|
|
1496
|
-
return libInfo.promise;
|
|
1497
|
-
|
|
1498
|
-
}
|
|
1499
|
-
|
|
1500
|
-
/**
|
|
1501
|
-
* Map of library manifests keyed by library names.
|
|
1502
|
-
*
|
|
1503
|
-
* If the manifest was loaded but could not be parsed, <code>null</code> will be stored.
|
|
1504
|
-
* @type {Map<string,object>}
|
|
1505
|
-
* @private
|
|
1506
|
-
*/
|
|
1507
|
-
var mLibraryManifests = new Map();
|
|
1508
|
-
|
|
1509
|
-
function getManifest(lib) {
|
|
1510
|
-
if ( mLibraryManifests.has(lib) ) {
|
|
1511
|
-
return mLibraryManifests.get(lib);
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
var manifestModule = lib.replace(/\./g, '/') + '/manifest.json';
|
|
1515
|
-
|
|
1516
|
-
if ( sap.ui.loader._.getModuleState(manifestModule) ) {
|
|
1517
|
-
|
|
1518
|
-
var oManifest = LoaderExtensions.loadResource(manifestModule, {
|
|
1519
|
-
dataType: 'json',
|
|
1520
|
-
async: false, // always sync as we are sure to load from preload cache
|
|
1521
|
-
failOnError: false
|
|
1522
|
-
});
|
|
1523
|
-
|
|
1524
|
-
mLibraryManifests.set(lib, oManifest);
|
|
1525
|
-
|
|
1526
|
-
return oManifest;
|
|
1527
|
-
}
|
|
1528
|
-
}
|
|
1529
|
-
|
|
1530
|
-
/**
|
|
1531
|
-
* Set of libraries that provide a bundle info file (library-preload-lazy.js).
|
|
1532
|
-
*
|
|
1533
|
-
* The file will be loaded, when a lazy dependency to the library is encountered.
|
|
1534
|
-
* @private
|
|
1535
|
-
*/
|
|
1536
|
-
var oLibraryWithBundleInfo = new Set([
|
|
1537
|
-
"sap.suite.ui.generic.template",
|
|
1538
|
-
"sap.ui.comp",
|
|
1539
|
-
"sap.ui.layout",
|
|
1540
|
-
"sap.ui.unified"
|
|
1541
|
-
]);
|
|
1542
|
-
|
|
1543
|
-
function dependenciesFromManifest(lib) {
|
|
1544
|
-
|
|
1545
|
-
var manifest = getManifest(lib);
|
|
1546
|
-
|
|
1547
|
-
var libs = manifest && manifest["sap.ui5"] && manifest["sap.ui5"].dependencies && manifest["sap.ui5"].dependencies.libs;
|
|
1548
|
-
if ( libs ) {
|
|
1549
|
-
// convert manifest map to array, inject name
|
|
1550
|
-
return Object.keys(libs).reduce(function(result, dep) {
|
|
1551
|
-
if ( !libs[dep].lazy ) {
|
|
1552
|
-
result.push(dep);
|
|
1553
|
-
} else if (oLibraryWithBundleInfo.has(dep)) {
|
|
1554
|
-
result.push({
|
|
1555
|
-
name: dep,
|
|
1556
|
-
lazy: true
|
|
1557
|
-
});
|
|
1558
|
-
}
|
|
1559
|
-
return result;
|
|
1560
|
-
}, []);
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
|
-
// return undefined
|
|
1564
|
-
}
|
|
1565
|
-
|
|
1566
|
-
/**
|
|
1567
|
-
* Adds all resources from a preload bundle to the preload cache.
|
|
1568
|
-
*
|
|
1569
|
-
* When a resource exists already in the cache, the new content is ignored.
|
|
1570
|
-
*
|
|
1571
|
-
* @param {object} oData Preload bundle
|
|
1572
|
-
* @param {string} [oData.url] URL from which the bundle has been loaded
|
|
1573
|
-
* @param {string} [oData.name] Unique name of the bundle
|
|
1574
|
-
* @param {string} [oData.version='1.0'] Format version of the preload bundle
|
|
1575
|
-
* @param {object} oData.modules Map of resources keyed by their resource name; each resource must be a string or a function
|
|
1576
|
-
*
|
|
1577
|
-
* @private
|
|
1578
|
-
*/
|
|
1579
|
-
function registerPreloadedModules(oData, sURL) {
|
|
1580
|
-
var modules = oData.modules,
|
|
1581
|
-
fnUI5ToRJS = function(sName) {
|
|
1582
|
-
return /^jquery\.sap\./.test(sName) ? sName : sName.replace(/\./g, "/");
|
|
1583
|
-
};
|
|
1584
|
-
if ( Version(oData.version || "1.0").compareTo("2.0") < 0 ) {
|
|
1585
|
-
modules = {};
|
|
1586
|
-
for ( var sName in oData.modules ) {
|
|
1587
|
-
modules[fnUI5ToRJS(sName) + ".js"] = oData.modules[sName];
|
|
1588
|
-
}
|
|
1589
|
-
}
|
|
1590
|
-
sap.ui.require.preload(modules, oData.name, sURL);
|
|
1591
|
-
}
|
|
1592
|
-
|
|
1593
|
-
/**
|
|
1594
|
-
* Preprocess the given dependencies.
|
|
1595
|
-
*
|
|
1596
|
-
* @param {object} dependencies - Dependencies to preprocess
|
|
1597
|
-
* @returns {object} Preprocessed dependencies
|
|
1598
|
-
*/
|
|
1599
|
-
function preprocessDependencies(dependencies) {
|
|
1600
|
-
if (Array.isArray(dependencies)) {
|
|
1601
|
-
// remove .library-preload suffix from dependencies
|
|
1602
|
-
return dependencies.map(function (dep) {
|
|
1603
|
-
return dep.replace(/\.library-preload$/, '');
|
|
1604
|
-
});
|
|
1605
|
-
}
|
|
1606
|
-
return dependencies;
|
|
1607
|
-
}
|
|
1608
|
-
|
|
1609
|
-
function loadJSONAsync(lib) {
|
|
1610
|
-
var sURL = getModulePath(lib, "/library-preload.json");
|
|
1611
|
-
return mixedFetch(sURL, {
|
|
1612
|
-
headers: {
|
|
1613
|
-
Accept: mixedFetch.ContentTypes.JSON
|
|
1614
|
-
}
|
|
1615
|
-
}).then(function(response) {
|
|
1616
|
-
if (response.ok) {
|
|
1617
|
-
return response.json().then(function(data) {
|
|
1618
|
-
if (data) {
|
|
1619
|
-
registerPreloadedModules(data, sURL);
|
|
1620
|
-
return preprocessDependencies(data.dependencies);
|
|
1621
|
-
}
|
|
1622
|
-
});
|
|
1623
|
-
} else {
|
|
1624
|
-
throw new Error(response.statusText || response.status);
|
|
1625
|
-
}
|
|
1626
|
-
}).catch(function(oError) {
|
|
1627
|
-
Log.error("failed to load '" + sURL + "': " + oError.message);
|
|
1628
|
-
});
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
/**
|
|
1632
|
-
* Preloads a library synchronously.
|
|
1633
|
-
*
|
|
1634
|
-
* @param {string|object} libConfig Name of the library to preload or settings object describing library.
|
|
1635
|
-
* @param {string} [libConfig.name] Name of the library to preload
|
|
1636
|
-
* @param {boolean|undefined} [libConfig.json] Whether library supports only JSON (<code>true</code>) or only JS (<code>false</code>)
|
|
1637
|
-
* or whether both should be tried (undefined)
|
|
1638
|
-
* @private
|
|
1639
|
-
*/
|
|
1640
|
-
function preloadLibrarySync(libConfig) {
|
|
1641
|
-
|
|
1642
|
-
libConfig = evalLibConfig(libConfig);
|
|
1643
|
-
|
|
1644
|
-
var lib = libConfig.name,
|
|
1645
|
-
fileType = libConfig.fileType,
|
|
1646
|
-
libPackage = lib.replace(/\./g, '/'),
|
|
1647
|
-
libLoaded = !!sap.ui.loader._.getModuleState(libPackage + '/library.js');
|
|
1648
|
-
|
|
1649
|
-
if ( fileType === 'none' || libLoaded ) {
|
|
1650
|
-
return;
|
|
1651
|
-
}
|
|
1652
|
-
|
|
1653
|
-
var libInfo = mLibraryPreloadBundles[lib] || (mLibraryPreloadBundles[lib] = { });
|
|
1654
|
-
|
|
1655
|
-
// already preloaded?
|
|
1656
|
-
if ( libInfo.pending === false ) {
|
|
1657
|
-
return;
|
|
1658
|
-
}
|
|
1659
|
-
|
|
1660
|
-
if ( libInfo.pending ) {
|
|
1661
|
-
if ( libConfig.lazy ) {
|
|
1662
|
-
// ignore a lazy request when an eager request is already pending
|
|
1663
|
-
return;
|
|
1664
|
-
} else if ( libInfo.async ) {
|
|
1665
|
-
Log.warning("request to load " + lib + " synchronously while async loading is pending; this causes a duplicate request and should be avoided by caller");
|
|
1666
|
-
// fall through and preload synchronously
|
|
1667
|
-
} else {
|
|
1668
|
-
// sync cycle -> ignore nested call (would nevertheless be a dependency cycle)
|
|
1669
|
-
Log.warning("request to load " + lib + " synchronously while sync loading is pending (cycle, ignored)");
|
|
1670
|
-
return;
|
|
1671
|
-
}
|
|
1672
|
-
}
|
|
1673
|
-
|
|
1674
|
-
if ( libConfig.lazy ) {
|
|
1675
|
-
// For selected lazy dependencies, we load a library-preload-lazy module.
|
|
1676
|
-
// Errors are ignored and the library is not marked as pending in the bookkeeping
|
|
1677
|
-
// (but the loader avoids double loading).
|
|
1678
|
-
Log.debug("Lazy dependency to '" + lib + "' encountered, loading library-preload-lazy.js");
|
|
1679
|
-
try {
|
|
1680
|
-
sap.ui.requireSync(libPackage + '/library-preload-lazy');
|
|
1681
|
-
} catch (e) {
|
|
1682
|
-
Log.error("failed to load '" + libPackage + "/library-preload-lazy.js" + "' synchronously (" + (e && e.message || e) + ")");
|
|
1683
|
-
}
|
|
1684
|
-
return;
|
|
1685
|
-
}
|
|
1686
|
-
|
|
1687
|
-
libInfo.pending = true;
|
|
1688
|
-
libInfo.async = false;
|
|
1689
|
-
|
|
1690
|
-
var resolve;
|
|
1691
|
-
libInfo.promise = new Promise(function(_resolve, _reject) {
|
|
1692
|
-
resolve = _resolve;
|
|
1693
|
-
});
|
|
1694
|
-
|
|
1695
|
-
var dependencies;
|
|
1696
|
-
if ( fileType !== 'json' /* 'js' or 'both', not forced to JSON */ ) {
|
|
1697
|
-
var sPreloadModule = libPackage + '/library-preload';
|
|
1698
|
-
try {
|
|
1699
|
-
sap.ui.requireSync(sPreloadModule); // legacy-relevant: Synchronous preloading
|
|
1700
|
-
dependencies = dependenciesFromManifest(lib);
|
|
1701
|
-
} catch (e) {
|
|
1702
|
-
Log.error("failed to load '" + sPreloadModule + "' (" + (e && e.message || e) + ")");
|
|
1703
|
-
// fall back to JSON, but only if the root cause was an XHRLoadError
|
|
1704
|
-
var root = e;
|
|
1705
|
-
while ( root && root.cause ) {
|
|
1706
|
-
root = root.cause;
|
|
1707
|
-
}
|
|
1708
|
-
if ( root && root.name === "XHRLoadError" && fileType !== 'js' ) {
|
|
1709
|
-
dependencies = loadJSONSync(lib);
|
|
1710
|
-
} // ignore other errors (preload shouldn't fail)
|
|
1711
|
-
}
|
|
1712
|
-
} else {
|
|
1713
|
-
dependencies = loadJSONSync(lib);
|
|
1714
|
-
}
|
|
1715
|
-
|
|
1716
|
-
if ( dependencies && dependencies.length ) {
|
|
1717
|
-
dependencies.forEach(preloadLibrarySync);
|
|
1718
|
-
}
|
|
1719
|
-
|
|
1720
|
-
libInfo.pending = false;
|
|
1721
|
-
resolve();
|
|
1722
|
-
|
|
1723
|
-
}
|
|
1724
|
-
|
|
1725
|
-
function loadJSONSync(lib) {
|
|
1726
|
-
var sURL = getModulePath(lib, "/library-preload.json");
|
|
1727
|
-
var dependencies;
|
|
1728
|
-
|
|
1729
|
-
return mixedFetch(sURL, {
|
|
1730
|
-
headers: {
|
|
1731
|
-
Accept: mixedFetch.ContentTypes.JSON
|
|
1732
|
-
}
|
|
1733
|
-
}, true).then(function(response) {
|
|
1734
|
-
if (response.ok) {
|
|
1735
|
-
return response.json().then(function(data) {
|
|
1736
|
-
if (data) {
|
|
1737
|
-
registerPreloadedModules(data, sURL);
|
|
1738
|
-
dependencies = data.dependencies;
|
|
1739
|
-
}
|
|
1740
|
-
return preprocessDependencies(dependencies);
|
|
1741
|
-
});
|
|
1742
|
-
} else {
|
|
1743
|
-
throw Error(response.statusText || response.status);
|
|
1744
|
-
}
|
|
1745
|
-
}).catch(function(oError) {
|
|
1746
|
-
Log.error("failed to load '" + sURL + "': " + oError.message);
|
|
1747
|
-
}).unwrap();
|
|
1748
|
-
}
|
|
1749
|
-
|
|
1750
|
-
/**
|
|
1751
|
-
* Retrieves the module path.
|
|
1752
|
-
* @param {string} sModuleName module name.
|
|
1753
|
-
* @param {string} sSuffix is used untouched (dots are not replaced with slashes).
|
|
1754
|
-
* @returns {string} module path.
|
|
1755
|
-
*/
|
|
1756
|
-
function getModulePath(sModuleName, sSuffix){
|
|
1757
|
-
return sap.ui.require.toUrl(sModuleName.replace(/\./g, "/") + sSuffix);
|
|
1758
|
-
}
|
|
1759
|
-
|
|
1760
|
-
/*
|
|
1761
|
-
* Registers a URL prefix for a module name prefix
|
|
1762
|
-
*/
|
|
1763
|
-
function registerModulePath(sModuleNamePrefix, sUrlPrefix) {
|
|
1764
|
-
LoaderExtensions.registerResourcePath(sModuleNamePrefix.replace(/\./g, "/"), sUrlPrefix);
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
1262
|
/**
|
|
1768
1263
|
* Loads the given library and its dependencies and makes its content available to the application.
|
|
1769
1264
|
*
|
|
@@ -1837,55 +1332,32 @@ sap.ui.define([
|
|
|
1837
1332
|
* @public
|
|
1838
1333
|
*/
|
|
1839
1334
|
Core.prototype.loadLibrary = function(sLibrary, vUrl) {
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
typeof vUrl === 'string' ||
|
|
1844
|
-
typeof vUrl === 'object' && (vUrl.url == null || typeof vUrl.url === 'string') && (vUrl.async == null || typeof vUrl.async === 'boolean'),
|
|
1845
|
-
"vUrl must be empty or a string or an object with an optional property 'url' of type string and an optional boolean property 'async'");
|
|
1846
|
-
|
|
1847
|
-
if ( typeof vUrl === 'boolean' ) {
|
|
1848
|
-
vUrl = { async: vUrl };
|
|
1849
|
-
}
|
|
1850
|
-
if ( typeof vUrl === 'object' ) {
|
|
1851
|
-
if ( vUrl.async ) {
|
|
1852
|
-
if ( vUrl.url && mLibraryPreloadBundles[sLibrary] == null ) { // only if lib has not been loaded yet
|
|
1853
|
-
registerModulePath(sLibrary, vUrl.url);
|
|
1854
|
-
}
|
|
1855
|
-
return this.loadLibraries([sLibrary]).then(function() {
|
|
1856
|
-
return this.mLibraries[sLibrary];
|
|
1857
|
-
}.bind(this));
|
|
1858
|
-
}
|
|
1859
|
-
vUrl = vUrl.url;
|
|
1860
|
-
}
|
|
1861
|
-
|
|
1862
|
-
// load libraries only once
|
|
1863
|
-
if ( !mLoadedLibraries[sLibrary] ) {
|
|
1864
|
-
|
|
1865
|
-
var sModule = sLibrary + ".library";
|
|
1866
|
-
|
|
1867
|
-
// if a sUrl is given, redirect access to it
|
|
1868
|
-
if ( vUrl ) {
|
|
1869
|
-
registerModulePath(sLibrary, vUrl);
|
|
1870
|
-
}
|
|
1335
|
+
var mLibConfig = {
|
|
1336
|
+
name: sLibrary
|
|
1337
|
+
};
|
|
1871
1338
|
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1339
|
+
var mOptions = {
|
|
1340
|
+
sync: true
|
|
1341
|
+
};
|
|
1875
1342
|
|
|
1876
|
-
|
|
1877
|
-
|
|
1343
|
+
if (typeof vUrl === "boolean") {
|
|
1344
|
+
mOptions.sync = !vUrl;
|
|
1345
|
+
} else if (typeof vUrl === "string") {
|
|
1346
|
+
mLibConfig.url = vUrl;
|
|
1347
|
+
} else if (typeof vUrl === "object") {
|
|
1348
|
+
mOptions.sync = !vUrl.async;
|
|
1349
|
+
mLibConfig.url = vUrl.url;
|
|
1350
|
+
}
|
|
1878
1351
|
|
|
1879
|
-
|
|
1880
|
-
if ( !mLoadedLibraries[sLibrary] ) {
|
|
1881
|
-
Log.warning("library " + sLibrary + " didn't initialize itself");
|
|
1882
|
-
this.initLibrary(sLibrary); // TODO redundant to generated initLibrary call....
|
|
1883
|
-
}
|
|
1352
|
+
var vLoaded = Library._load(mLibConfig, mOptions);
|
|
1884
1353
|
|
|
1354
|
+
if (!mOptions.sync) {
|
|
1355
|
+
return vLoaded.then(function(aLibs) {
|
|
1356
|
+
return aLibs[0];
|
|
1357
|
+
});
|
|
1358
|
+
} else {
|
|
1359
|
+
return vLoaded[0];
|
|
1885
1360
|
}
|
|
1886
|
-
|
|
1887
|
-
// Note: return parameter is undocumented by intention! Structure of lib info might change
|
|
1888
|
-
return this.mLibraries[sLibrary];
|
|
1889
1361
|
};
|
|
1890
1362
|
|
|
1891
1363
|
/**
|
|
@@ -1911,61 +1383,19 @@ sap.ui.define([
|
|
|
1911
1383
|
* @ui5-restricted sap.ui.core,sap.ushell
|
|
1912
1384
|
*/
|
|
1913
1385
|
Core.prototype.loadLibraries = function(aLibraries, mOptions) {
|
|
1386
|
+
mOptions = Object.assign({
|
|
1387
|
+
async: true
|
|
1388
|
+
}, mOptions);
|
|
1914
1389
|
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
// default values for options
|
|
1918
|
-
mOptions = Object.assign({ async : true, preloadOnly : false }, mOptions);
|
|
1919
|
-
|
|
1920
|
-
var bPreload = Configuration.getPreload() === 'sync' || Configuration.getPreload() === 'async',
|
|
1921
|
-
bAsync = mOptions.async,
|
|
1922
|
-
bRequire = !mOptions.preloadOnly;
|
|
1390
|
+
mOptions.sync = !mOptions.async;
|
|
1923
1391
|
|
|
1924
|
-
|
|
1925
|
-
return aLibraries.map(function(vLibraryName) {
|
|
1926
|
-
if ( typeof vLibraryName === 'object' ) {
|
|
1927
|
-
vLibraryName = vLibraryName.name;
|
|
1928
|
-
}
|
|
1929
|
-
return vLibraryName.replace(/\./g, "/") + "/library";
|
|
1930
|
-
});
|
|
1931
|
-
}
|
|
1932
|
-
|
|
1933
|
-
function requireLibsAsync() {
|
|
1934
|
-
return new Promise(function(resolve, reject) {
|
|
1935
|
-
sap.ui.require(
|
|
1936
|
-
getLibraryModuleNames(),
|
|
1937
|
-
function () {
|
|
1938
|
-
// Wrapper function is needed to omit parameters for resolve()
|
|
1939
|
-
// which is always one library (first from the list), not an array of libraries.
|
|
1940
|
-
resolve();
|
|
1941
|
-
},
|
|
1942
|
-
reject
|
|
1943
|
-
);
|
|
1944
|
-
});
|
|
1945
|
-
}
|
|
1946
|
-
|
|
1947
|
-
function requireLibsSync() {
|
|
1948
|
-
getLibraryModuleNames().forEach(sap.ui.requireSync); // legacy-relevant: Sync path
|
|
1949
|
-
}
|
|
1950
|
-
|
|
1951
|
-
if ( bAsync ) {
|
|
1952
|
-
|
|
1953
|
-
aLibraries = VersionInfo._getTransitiveDependencyForLibraries(aLibraries);
|
|
1954
|
-
|
|
1955
|
-
var preloaded = bPreload ? Promise.all(aLibraries.map(preloadLibraryAsync.bind(this))) : Promise.resolve(true);
|
|
1956
|
-
return bRequire ? preloaded.then(requireLibsAsync) : preloaded;
|
|
1392
|
+
var pLoaded = Library._load(aLibraries, mOptions);
|
|
1957
1393
|
|
|
1394
|
+
if (!mOptions.sync) {
|
|
1395
|
+
return pLoaded;
|
|
1958
1396
|
} else {
|
|
1959
|
-
|
|
1960
|
-
if ( bPreload ) {
|
|
1961
|
-
aLibraries.forEach(preloadLibrarySync);
|
|
1962
|
-
}
|
|
1963
|
-
if ( bRequire ) {
|
|
1964
|
-
requireLibsSync();
|
|
1965
|
-
}
|
|
1966
|
-
|
|
1397
|
+
return undefined;
|
|
1967
1398
|
}
|
|
1968
|
-
|
|
1969
1399
|
};
|
|
1970
1400
|
|
|
1971
1401
|
/**
|
|
@@ -2133,112 +1563,15 @@ sap.ui.define([
|
|
|
2133
1563
|
if (!sLibName) {
|
|
2134
1564
|
Log.error("A library name must be provided.", null, METHOD);
|
|
2135
1565
|
return;
|
|
2136
|
-
|
|
2137
|
-
} else if (mLoadedLibraries[sLibName]) {
|
|
2138
|
-
return ObjectPath.get(sLibName);
|
|
2139
1566
|
}
|
|
2140
1567
|
|
|
2141
|
-
|
|
1568
|
+
var oLib = Library.get(sLibName);
|
|
2142
1569
|
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
function extend(oLibrary, oInfo) {
|
|
2147
|
-
|
|
2148
|
-
var sKey, vValue;
|
|
2149
|
-
|
|
2150
|
-
for ( sKey in oInfo ) {
|
|
2151
|
-
vValue = oInfo[sKey];
|
|
2152
|
-
|
|
2153
|
-
// don't copy undefined values
|
|
2154
|
-
if ( vValue !== undefined ) {
|
|
2155
|
-
|
|
2156
|
-
if ( Array.isArray(oLibrary[sKey]) ) {
|
|
2157
|
-
// concat array typed values
|
|
2158
|
-
if ( oLibrary[sKey].length === 0 ) {
|
|
2159
|
-
oLibrary[sKey] = vValue;
|
|
2160
|
-
} else {
|
|
2161
|
-
oLibrary[sKey] = uniqueSort(oLibrary[sKey].concat(vValue));
|
|
2162
|
-
}
|
|
2163
|
-
} else if ( oLibrary[sKey] === undefined ) {
|
|
2164
|
-
// only set values for properties that are still undefined
|
|
2165
|
-
oLibrary[sKey] = vValue;
|
|
2166
|
-
} else if ( sKey != "name" ) {
|
|
2167
|
-
// ignore other values (silently ignore "name")
|
|
2168
|
-
Log.warning("library info setting ignored: " + sKey + "=" + vValue);
|
|
2169
|
-
}
|
|
2170
|
-
}
|
|
2171
|
-
}
|
|
2172
|
-
|
|
2173
|
-
return oLibrary;
|
|
2174
|
-
}
|
|
2175
|
-
|
|
2176
|
-
// ensure namespace
|
|
2177
|
-
var oLib = ObjectPath.create(sLibName);
|
|
2178
|
-
|
|
2179
|
-
// Create lib info object or merge with existing 'adhoc' library
|
|
2180
|
-
this.mLibraries[sLibName] = oLibInfo = extend(this.mLibraries[sLibName] || {
|
|
2181
|
-
name : sLibName,
|
|
2182
|
-
dependencies : [],
|
|
2183
|
-
types : [],
|
|
2184
|
-
interfaces : [],
|
|
2185
|
-
controls: [],
|
|
2186
|
-
elements : []
|
|
2187
|
-
}, oLibInfo);
|
|
2188
|
-
|
|
2189
|
-
// resolve dependencies
|
|
2190
|
-
for (var i = 0; i < oLibInfo.dependencies.length; i++) {
|
|
2191
|
-
var sDepLib = oLibInfo.dependencies[i];
|
|
2192
|
-
Log.debug("resolve Dependencies to " + sDepLib, null, METHOD);
|
|
2193
|
-
if ( mLoadedLibraries[sDepLib] !== true ) {
|
|
2194
|
-
Log.warning("Dependency from " + sLibName + " to " + sDepLib + " has not been resolved by library itself", null, METHOD);
|
|
2195
|
-
this.loadLibrary(sDepLib); // legacy-relevant: Sync fallback for missing manifest/AMD dependencies
|
|
2196
|
-
}
|
|
2197
|
-
}
|
|
2198
|
-
|
|
2199
|
-
// register interface types
|
|
2200
|
-
DataType.registerInterfaceTypes(oLibInfo.interfaces);
|
|
2201
|
-
|
|
2202
|
-
// Declare a module for each (non-builtin) simple type
|
|
2203
|
-
// Only needed for backward compatibility: some code 'requires' such types although they never have been modules on their own
|
|
2204
|
-
for (var i = 0; i < oLibInfo.types.length; i++) {
|
|
2205
|
-
if ( !/^(any|boolean|float|int|string|object|void)$/.test(oLibInfo.types[i]) ) {
|
|
2206
|
-
sap.ui.loader._.declareModule(oLibInfo.types[i].replace(/\./g, "/") + ".js");
|
|
2207
|
-
|
|
2208
|
-
// ensure parent namespace of the type
|
|
2209
|
-
var sNamespacePrefix = oLibInfo.types[i].substring(0, oLibInfo.types[i].lastIndexOf("."));
|
|
2210
|
-
if (ObjectPath.get(sNamespacePrefix) === undefined) {
|
|
2211
|
-
// parent type namespace does not exists, so we create its
|
|
2212
|
-
ObjectPath.create(sNamespacePrefix);
|
|
2213
|
-
}
|
|
2214
|
-
}
|
|
2215
|
-
}
|
|
2216
|
-
|
|
2217
|
-
// create lazy loading stubs for all controls and elements
|
|
2218
|
-
var aElements = oLibInfo.controls.concat(oLibInfo.elements);
|
|
2219
|
-
for (var i = 0; i < aElements.length; i++) {
|
|
2220
|
-
sap.ui.lazyRequire(aElements[i], "new extend getMetadata"); // TODO don't create an 'extend' stub for final classes
|
|
2221
|
-
}
|
|
2222
|
-
|
|
2223
|
-
// include the library theme, but only if it has not been suppressed in library metadata or by configuration
|
|
2224
|
-
if ( !oLibInfo.noLibraryCSS) {
|
|
2225
|
-
var oLibThemingInfo = {
|
|
2226
|
-
name: oLibInfo.name,
|
|
2227
|
-
version: oLibInfo.version
|
|
2228
|
-
};
|
|
2229
|
-
aAllLibrariesRequiringCss.push(oLibThemingInfo);
|
|
2230
|
-
this._getThemeManager(true).then(function(ThemeManager) {
|
|
2231
|
-
ThemeManager._includeLibraryThemeAndEnsureThemeRoot(oLibThemingInfo);
|
|
2232
|
-
});
|
|
1570
|
+
if (oLib && oLib.isSettingsEnhanced()) {
|
|
1571
|
+
return ObjectPath.get(sLibName);
|
|
2233
1572
|
}
|
|
2234
1573
|
|
|
2235
|
-
|
|
2236
|
-
oLibInfo.sName = oLibInfo.name;
|
|
2237
|
-
oLibInfo.aControls = oLibInfo.controls;
|
|
2238
|
-
|
|
2239
|
-
this.fireLibraryChanged({name : sLibName, stereotype : "library", operation: "add", metadata : oLibInfo});
|
|
2240
|
-
|
|
2241
|
-
return oLib;
|
|
1574
|
+
return Library.init(oLibInfo);
|
|
2242
1575
|
};
|
|
2243
1576
|
|
|
2244
1577
|
/**
|
|
@@ -2250,15 +1583,8 @@ sap.ui.define([
|
|
|
2250
1583
|
* @public
|
|
2251
1584
|
*/
|
|
2252
1585
|
Core.prototype.includeLibraryTheme = function(sLibName, sVariant, sQuery) {
|
|
2253
|
-
var
|
|
2254
|
-
|
|
2255
|
-
name: sLibName,
|
|
2256
|
-
version: oLibInfo && oLibInfo.version,
|
|
2257
|
-
variant: sVariant
|
|
2258
|
-
});
|
|
2259
|
-
this._getThemeManager().then(function(ThemeManager) {
|
|
2260
|
-
ThemeManager.includeLibraryTheme(sLibName, sVariant, sQuery);
|
|
2261
|
-
});
|
|
1586
|
+
var oLib = Library._get(sLibName, true /* bCreate */);
|
|
1587
|
+
oLib._includeTheme(sVariant, sQuery);
|
|
2262
1588
|
};
|
|
2263
1589
|
|
|
2264
1590
|
/**
|
|
@@ -2279,66 +1605,9 @@ sap.ui.define([
|
|
|
2279
1605
|
* @public
|
|
2280
1606
|
*/
|
|
2281
1607
|
Core.prototype.getLoadedLibraries = function() {
|
|
2282
|
-
return
|
|
1608
|
+
return Library.all();
|
|
2283
1609
|
};
|
|
2284
1610
|
|
|
2285
|
-
/**
|
|
2286
|
-
* Returns an array containing all libraries which require loading of CSS
|
|
2287
|
-
*
|
|
2288
|
-
* @returns {Array} Array containing all libraries which require loading of CSS
|
|
2289
|
-
* @private
|
|
2290
|
-
* @ui5-restricted sap.ui.core.theming.Parameters
|
|
2291
|
-
*/
|
|
2292
|
-
Core.prototype.getAllLibrariesRequiringCss = function() {
|
|
2293
|
-
return aAllLibrariesRequiringCss.slice();
|
|
2294
|
-
};
|
|
2295
|
-
|
|
2296
|
-
/**
|
|
2297
|
-
*
|
|
2298
|
-
* @param {any} vInfo bundle information. Can be:
|
|
2299
|
-
* <ul>
|
|
2300
|
-
* <li>false - library has no resource bundle</li>
|
|
2301
|
-
* <li>true|null|undefined - use default settings: bundle is 'messageBundle.properties',
|
|
2302
|
-
* fallback and supported locales are not defined (defaulted by ResourceBundle)</li>
|
|
2303
|
-
* <li>typeof string - string is the url of the bundle,
|
|
2304
|
-
* fallback and supported locales are not defined (defaulted by ResourceBundle)</li>
|
|
2305
|
-
* <li>typeof object - object can contain bundleUrl, supportedLocales, fallbackLocale</li>
|
|
2306
|
-
* </ul>
|
|
2307
|
-
* @returns {Object|undefined} either normalized bundle information or undefined;
|
|
2308
|
-
* The normalized bundle information is either the object defined in the library manifest.json,
|
|
2309
|
-
* or an object with a 'bundleUrl' property holding the default bundle url.
|
|
2310
|
-
* If undefined is returned, the library does not no have resource bundle (vInfo == false).
|
|
2311
|
-
*/
|
|
2312
|
-
function normalizeBundleInfo(vInfo) {
|
|
2313
|
-
if ( vInfo == null || vInfo === true ) {
|
|
2314
|
-
return {
|
|
2315
|
-
bundleUrl: "messagebundle.properties"
|
|
2316
|
-
};
|
|
2317
|
-
}
|
|
2318
|
-
if ( typeof vInfo === "string" ) {
|
|
2319
|
-
return {
|
|
2320
|
-
bundleUrl: vInfo
|
|
2321
|
-
};
|
|
2322
|
-
}
|
|
2323
|
-
if ( typeof vInfo === "object" ) {
|
|
2324
|
-
return deepExtend({}, vInfo);
|
|
2325
|
-
}
|
|
2326
|
-
// return undefined
|
|
2327
|
-
}
|
|
2328
|
-
|
|
2329
|
-
function getLibraryI18n(sLibrary) {
|
|
2330
|
-
var vI18n;
|
|
2331
|
-
var oManifest = getManifest(sLibrary);
|
|
2332
|
-
|
|
2333
|
-
if (oManifest && Version(oManifest._version).compareTo("1.9.0") >= 0) {
|
|
2334
|
-
vI18n = oManifest["sap.ui5"] && oManifest["sap.ui5"].library && oManifest["sap.ui5"].library.i18n;
|
|
2335
|
-
} // else vI18n = undefined
|
|
2336
|
-
|
|
2337
|
-
vI18n = normalizeBundleInfo(vI18n);
|
|
2338
|
-
|
|
2339
|
-
return vI18n;
|
|
2340
|
-
}
|
|
2341
|
-
|
|
2342
1611
|
/**
|
|
2343
1612
|
* Retrieves a resource bundle for the given library and locale.
|
|
2344
1613
|
*
|
|
@@ -2383,11 +1652,6 @@ sap.ui.define([
|
|
|
2383
1652
|
* @public
|
|
2384
1653
|
*/
|
|
2385
1654
|
Core.prototype.getLibraryResourceBundle = function(sLibraryName, sLocale, bAsync) {
|
|
2386
|
-
var sKey,
|
|
2387
|
-
vResult,
|
|
2388
|
-
vI18n,
|
|
2389
|
-
bLibraryManifestIsAvailable;
|
|
2390
|
-
|
|
2391
1655
|
if (typeof sLibraryName === "boolean") {
|
|
2392
1656
|
bAsync = sLibraryName;
|
|
2393
1657
|
sLibraryName = undefined;
|
|
@@ -2403,60 +1667,8 @@ sap.ui.define([
|
|
|
2403
1667
|
assert(sLocale === undefined || typeof sLocale === "string", "sLocale must be a string or omitted");
|
|
2404
1668
|
|
|
2405
1669
|
sLibraryName = sLibraryName || "sap.ui.core";
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
// A library ResourceBundle can be requested before its owning library is preloaded.
|
|
2410
|
-
// In this case we do not have the library's manifest yet and the default bundle (messagebundle.properties) is requested.
|
|
2411
|
-
// We still cache this default bundle for as long as the library remains "not-preloaded".
|
|
2412
|
-
// When the library is preloaded later on, a new ResourceBundle needs to be requested, since we need to take the
|
|
2413
|
-
// "sap.ui5/library/i18n" section of the library's manifest into account.
|
|
2414
|
-
bLibraryManifestIsAvailable = mLibraryManifests.has(sLibraryName);
|
|
2415
|
-
var sNotLoadedCacheKey = sKey + "/manifest-not-available";
|
|
2416
|
-
|
|
2417
|
-
// If the library was loaded in the meantime (or the first time around), we can delete the old ResourceBundle
|
|
2418
|
-
if (bLibraryManifestIsAvailable) {
|
|
2419
|
-
delete this.mResourceBundles[sNotLoadedCacheKey];
|
|
2420
|
-
} else {
|
|
2421
|
-
// otherwise we use the temporary cache-key
|
|
2422
|
-
sKey = sNotLoadedCacheKey;
|
|
2423
|
-
}
|
|
2424
|
-
|
|
2425
|
-
vResult = this.mResourceBundles[sKey];
|
|
2426
|
-
if (!vResult || (!bAsync && vResult instanceof Promise)) {
|
|
2427
|
-
vI18n = getLibraryI18n(sLibraryName);
|
|
2428
|
-
|
|
2429
|
-
if (vI18n) {
|
|
2430
|
-
var sBundleUrl = getModulePath(sLibraryName + "/", vI18n.bundleUrl);
|
|
2431
|
-
|
|
2432
|
-
// add known library name to cache to avoid later guessing
|
|
2433
|
-
mGuessedLibraries[sBundleUrl] = sLibraryName;
|
|
2434
|
-
|
|
2435
|
-
vResult = ResourceBundle.create({
|
|
2436
|
-
bundleUrl: sBundleUrl,
|
|
2437
|
-
supportedLocales: vI18n.supportedLocales,
|
|
2438
|
-
fallbackLocale: vI18n.fallbackLocale,
|
|
2439
|
-
locale: sLocale,
|
|
2440
|
-
async: bAsync,
|
|
2441
|
-
activeTerminologies: this.getConfiguration().getActiveTerminologies()
|
|
2442
|
-
});
|
|
2443
|
-
|
|
2444
|
-
if (vResult instanceof Promise) {
|
|
2445
|
-
vResult = vResult.then(function(oBundle) {
|
|
2446
|
-
this.mResourceBundles[sKey] = oBundle;
|
|
2447
|
-
return oBundle;
|
|
2448
|
-
}.bind(this));
|
|
2449
|
-
}
|
|
2450
|
-
|
|
2451
|
-
// Save the result directly under the map
|
|
2452
|
-
// the real bundle will replace the promise after it's loaded in async case
|
|
2453
|
-
this.mResourceBundles[sKey] = vResult;
|
|
2454
|
-
|
|
2455
|
-
}
|
|
2456
|
-
}
|
|
2457
|
-
|
|
2458
|
-
// if the bundle is loaded, return a promise which resolved with the bundle
|
|
2459
|
-
return bAsync ? Promise.resolve(vResult) : vResult;
|
|
1670
|
+
var oLib = Library._get(sLibraryName || "sap.ui.core", true /* bCreate */);
|
|
1671
|
+
return oLib._loadResourceBundle(sLocale, !bAsync);
|
|
2460
1672
|
};
|
|
2461
1673
|
|
|
2462
1674
|
// ---- UIArea and Rendering -------------------------------------------------------------------------------------
|
|
@@ -2470,56 +1682,6 @@ sap.ui.define([
|
|
|
2470
1682
|
}
|
|
2471
1683
|
}
|
|
2472
1684
|
|
|
2473
|
-
/**
|
|
2474
|
-
* Implementation of the ResourceBundle._enrichBundleConfig hook.
|
|
2475
|
-
* Guesses if the given bundleUrl is pointing to a library's ResourceBundle and adapts the given bundle definition accordingly
|
|
2476
|
-
* based on the infered library's manifest.
|
|
2477
|
-
*
|
|
2478
|
-
* @param {module:sap/base/i18n/ResourceBundle.Configuration} mParams Map containing the arguments of the sap.base.i18n.ResourceBundle.create call
|
|
2479
|
-
* @returns {module:sap/base/i18n/ResourceBundle.Configuration} mParams The enriched config object
|
|
2480
|
-
* @private
|
|
2481
|
-
*/
|
|
2482
|
-
ResourceBundle._enrichBundleConfig = function (mParams) {
|
|
2483
|
-
if (!mParams.terminologies || !mParams.enhanceWith) {
|
|
2484
|
-
|
|
2485
|
-
var sLibraryName;
|
|
2486
|
-
if (mGuessedLibraries.hasOwnProperty(mParams.url)) {
|
|
2487
|
-
sLibraryName = mGuessedLibraries[mParams.url];
|
|
2488
|
-
} else {
|
|
2489
|
-
sLibraryName = getLibraryNameForBundle(mParams.url);
|
|
2490
|
-
}
|
|
2491
|
-
|
|
2492
|
-
if (sLibraryName) {
|
|
2493
|
-
// look up i18n information in library manifest
|
|
2494
|
-
// (can be undefined if the lib defines "sap.ui5/library/i18n" with <false>)
|
|
2495
|
-
var vI18n = getLibraryI18n(sLibraryName);
|
|
2496
|
-
|
|
2497
|
-
// enrich i18n information
|
|
2498
|
-
if (vI18n) {
|
|
2499
|
-
// resolve bundleUrls relative to library path
|
|
2500
|
-
var sLibraryPath = sLibraryName.replace(/\./g, "/");
|
|
2501
|
-
sLibraryPath = sLibraryPath.endsWith("/") ? sLibraryPath : sLibraryPath + "/"; // add trailing slash if missing
|
|
2502
|
-
sLibraryPath = sap.ui.require.toUrl(sLibraryPath);
|
|
2503
|
-
|
|
2504
|
-
_UrlResolver._processResourceConfiguration(vI18n, {
|
|
2505
|
-
alreadyResolvedOnRoot: true,
|
|
2506
|
-
relativeTo: sLibraryPath
|
|
2507
|
-
});
|
|
2508
|
-
|
|
2509
|
-
// basic i18n information
|
|
2510
|
-
mParams.fallbackLocale = mParams.fallbackLocale || vI18n.fallbackLocale;
|
|
2511
|
-
mParams.supportedLocales = mParams.supportedLocales || vI18n.supportedLocales;
|
|
2512
|
-
|
|
2513
|
-
// text verticalization information
|
|
2514
|
-
mParams.terminologies = mParams.terminologies || vI18n.terminologies;
|
|
2515
|
-
mParams.enhanceWith = mParams.enhanceWith || vI18n.enhanceWith;
|
|
2516
|
-
mParams.activeTerminologies = mParams.activeTerminologies || Configuration.getActiveTerminologies();
|
|
2517
|
-
}
|
|
2518
|
-
}
|
|
2519
|
-
}
|
|
2520
|
-
return mParams;
|
|
2521
|
-
};
|
|
2522
|
-
|
|
2523
1685
|
/**
|
|
2524
1686
|
* Implicitly creates a new <code>UIArea</code> (or reuses an exiting one) for the given DOM reference and
|
|
2525
1687
|
* adds the given control reference to the UIAreas content (existing content will be removed).
|
|
@@ -2654,6 +1816,9 @@ sap.ui.define([
|
|
|
2654
1816
|
* @public
|
|
2655
1817
|
*/
|
|
2656
1818
|
Core.prototype.attachThemeChanged = function(fnFunction, oListener) {
|
|
1819
|
+
// preparation for letting the "themeChanged" event be forwarded from the ThemeManager to the Core
|
|
1820
|
+
this._getThemeManager();
|
|
1821
|
+
|
|
2657
1822
|
_oEventProvider.attachEvent(Core.M_EVENTS.ThemeChanged, fnFunction, oListener);
|
|
2658
1823
|
};
|
|
2659
1824
|
|
|
@@ -2878,13 +2043,10 @@ sap.ui.define([
|
|
|
2878
2043
|
_oEventProvider.detachEvent(Core.M_EVENTS.LibraryChanged, fnFunction, oListener);
|
|
2879
2044
|
};
|
|
2880
2045
|
|
|
2881
|
-
|
|
2882
|
-
* @private
|
|
2883
|
-
*/
|
|
2884
|
-
Core.prototype.fireLibraryChanged = function(oParams) {
|
|
2046
|
+
Library.attachLibraryChanged(function(oEvent) {
|
|
2885
2047
|
// notify registered Core listeners
|
|
2886
|
-
_oEventProvider.fireEvent(Core.M_EVENTS.LibraryChanged,
|
|
2887
|
-
};
|
|
2048
|
+
_oEventProvider.fireEvent(Core.M_EVENTS.LibraryChanged, oEvent.getParameters());
|
|
2049
|
+
});
|
|
2888
2050
|
|
|
2889
2051
|
/**
|
|
2890
2052
|
* Enforces an immediate update of the visible UI (aka "rendering").
|
|
@@ -2897,42 +2059,6 @@ sap.ui.define([
|
|
|
2897
2059
|
Rendering.renderPendingUIUpdates("forced by applyChanges");
|
|
2898
2060
|
};
|
|
2899
2061
|
|
|
2900
|
-
/**
|
|
2901
|
-
* @private
|
|
2902
|
-
*/
|
|
2903
|
-
Core.prototype.registerElementClass = function(oMetadata) {
|
|
2904
|
-
var sName = oMetadata.getName(),
|
|
2905
|
-
sLibraryName = oMetadata.getLibraryName() || "",
|
|
2906
|
-
oLibrary = this.mLibraries[sLibraryName],
|
|
2907
|
-
sCategory = oMetadata.isA("sap.ui.core.Control") ? 'controls' : 'elements';
|
|
2908
|
-
|
|
2909
|
-
// if library has not been loaded yet, create empty 'adhoc' library
|
|
2910
|
-
// don't set 'loaded' marker, so it might be loaded later
|
|
2911
|
-
if ( !oLibrary ) {
|
|
2912
|
-
|
|
2913
|
-
// ensure namespace
|
|
2914
|
-
ObjectPath.create(sLibraryName);
|
|
2915
|
-
|
|
2916
|
-
oLibrary = this.mLibraries[sLibraryName] = {
|
|
2917
|
-
name: sLibraryName,
|
|
2918
|
-
dependencies : [],
|
|
2919
|
-
types : [],
|
|
2920
|
-
interfaces : [],
|
|
2921
|
-
controls: [],
|
|
2922
|
-
elements : []
|
|
2923
|
-
};
|
|
2924
|
-
}
|
|
2925
|
-
|
|
2926
|
-
if ( oLibrary[sCategory].indexOf(sName) < 0 ) {
|
|
2927
|
-
|
|
2928
|
-
// add class to corresponding category in library ('elements' or 'controls')
|
|
2929
|
-
oLibrary[sCategory].push(sName);
|
|
2930
|
-
|
|
2931
|
-
Log.debug("Class " + oMetadata.getName() + " registered for library " + oMetadata.getLibraryName());
|
|
2932
|
-
this.fireLibraryChanged({name : oMetadata.getName(), stereotype : oMetadata.getStereotype(), operation: "add", metadata : oMetadata});
|
|
2933
|
-
}
|
|
2934
|
-
};
|
|
2935
|
-
|
|
2936
2062
|
/**
|
|
2937
2063
|
* Registers the given object. Must be called once during construction.
|
|
2938
2064
|
* @param {sap.ui.base.ManagedObject} oObject the object instance
|
|
@@ -3831,7 +2957,7 @@ sap.ui.define([
|
|
|
3831
2957
|
* @private
|
|
3832
2958
|
* @ui5-restricted sap.ui.model.odata.v4
|
|
3833
2959
|
*/
|
|
3834
|
-
|
|
2960
|
+
Core.prototype.addPrerenderingTask = function (fnPrerenderingTask, bFirst) {
|
|
3835
2961
|
Rendering.addPrerenderingTask(fnPrerenderingTask, bFirst);
|
|
3836
2962
|
};
|
|
3837
2963
|
|
|
@@ -3841,50 +2967,6 @@ sap.ui.define([
|
|
|
3841
2967
|
BaseObject.prototype.destroy.call(this);
|
|
3842
2968
|
};
|
|
3843
2969
|
|
|
3844
|
-
/**
|
|
3845
|
-
* Tries to derive a library name from a bundle URL by guessing the resource name first,
|
|
3846
|
-
* then trying to match with the (known) loaded libraries.
|
|
3847
|
-
*
|
|
3848
|
-
* @param {string} sBundleUrl The bundleURL from which the library name needs to be derived.
|
|
3849
|
-
* @returns {string|undefined} Returns the corresponding library name if found or 'undefined'.
|
|
3850
|
-
*/
|
|
3851
|
-
function getLibraryNameForBundle(sBundleUrl) {
|
|
3852
|
-
if (sBundleUrl) {
|
|
3853
|
-
// [1] Guess ResourceName
|
|
3854
|
-
var sBundleName = sap.ui.loader._.guessResourceName(sBundleUrl);
|
|
3855
|
-
if (sBundleName) {
|
|
3856
|
-
|
|
3857
|
-
// [2] Guess library name
|
|
3858
|
-
for (var sLibrary in mLoadedLibraries) {
|
|
3859
|
-
var sLibraryName = sLibrary.replace(/\./g, "/");
|
|
3860
|
-
if (sLibraryName !== "" && sBundleName.startsWith(sLibraryName + "/")) {
|
|
3861
|
-
var sBundlePath = sBundleName.replace(sLibraryName + "/", "");
|
|
3862
|
-
|
|
3863
|
-
// [3] Retrieve i18n from manifest for looking up the base bundle
|
|
3864
|
-
// (can be undefined if the lib defines "sap.ui5/library/i18n" with <false>)
|
|
3865
|
-
var vI18n = getLibraryI18n(sLibraryName);
|
|
3866
|
-
|
|
3867
|
-
if (vI18n) {
|
|
3868
|
-
// Resolve bundle paths relative to library before comparing
|
|
3869
|
-
var sManifestBaseBundlePath = getModulePath(sLibraryName, "/" + vI18n.bundleUrl);
|
|
3870
|
-
sBundlePath = getModulePath(sLibraryName, "/" + sBundlePath);
|
|
3871
|
-
|
|
3872
|
-
// the input bundle-path and the derived library bundle-path must match,
|
|
3873
|
-
// otherwise we would enhance the wrong bundle with terminologies etc.
|
|
3874
|
-
if (sBundlePath === sManifestBaseBundlePath) {
|
|
3875
|
-
// [4.1] Cache matching result
|
|
3876
|
-
mGuessedLibraries[sBundleUrl] = sLibrary;
|
|
3877
|
-
return sLibrary;
|
|
3878
|
-
}
|
|
3879
|
-
// [4.2] Cache none-matching result
|
|
3880
|
-
mGuessedLibraries[sBundleUrl] = false;
|
|
3881
|
-
}
|
|
3882
|
-
}
|
|
3883
|
-
}
|
|
3884
|
-
}
|
|
3885
|
-
}
|
|
3886
|
-
}
|
|
3887
|
-
|
|
3888
2970
|
/**
|
|
3889
2971
|
* @name sap.ui.core.CorePlugin
|
|
3890
2972
|
* @interface Contract for plugins that want to extend the core runtime
|
|
@@ -3959,4 +3041,4 @@ sap.ui.define([
|
|
|
3959
3041
|
*/
|
|
3960
3042
|
return new Core().getInterface();
|
|
3961
3043
|
|
|
3962
|
-
});
|
|
3044
|
+
});
|