@openui5/sap.ui.core 1.128.0 → 1.130.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/THIRDPARTY.txt +2 -2
- package/package.json +1 -1
- package/src/jquery.sap.global.js +7 -7
- package/src/jquery.sap.properties.js +1 -1
- package/src/jquery.sap.resources.js +1 -1
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +3 -3
- package/src/jquery.sap.trace.js +18 -18
- package/src/sap/base/Event.js +1 -1
- package/src/sap/base/Eventing.js +1 -1
- package/src/sap/base/config.js +1 -1
- package/src/sap/base/future.js +10 -2
- package/src/sap/base/i18n/LanguageTag.js +1 -1
- package/src/sap/base/i18n/date/TimezoneUtils.js +1 -1
- package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
- package/src/sap/base/util/restricted/_castArray.js +1 -1
- package/src/sap/base/util/restricted/_compact.js +1 -1
- package/src/sap/base/util/restricted/_curry.js +1 -1
- package/src/sap/base/util/restricted/_debounce.js +1 -1
- package/src/sap/base/util/restricted/_difference.js +1 -1
- package/src/sap/base/util/restricted/_differenceBy.js +1 -1
- package/src/sap/base/util/restricted/_differenceWith.js +1 -1
- package/src/sap/base/util/restricted/_flatMap.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
- package/src/sap/base/util/restricted/_flatten.js +1 -1
- package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
- package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
- package/src/sap/base/util/restricted/_intersection.js +1 -1
- package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
- package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
- package/src/sap/base/util/restricted/_isEqual.js +1 -1
- package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
- package/src/sap/base/util/restricted/_isNil.js +1 -1
- package/src/sap/base/util/restricted/_max.js +1 -1
- package/src/sap/base/util/restricted/_merge.js +1 -1
- package/src/sap/base/util/restricted/_mergeWith.js +1 -1
- package/src/sap/base/util/restricted/_min.js +1 -1
- package/src/sap/base/util/restricted/_omit.js +1 -1
- package/src/sap/base/util/restricted/_pick.js +1 -1
- package/src/sap/base/util/restricted/_pickBy.js +1 -1
- package/src/sap/base/util/restricted/_throttle.js +1 -1
- package/src/sap/base/util/restricted/_toArray.js +1 -1
- package/src/sap/base/util/restricted/_union.js +1 -1
- package/src/sap/base/util/restricted/_unionBy.js +1 -1
- package/src/sap/base/util/restricted/_unionWith.js +1 -1
- package/src/sap/base/util/restricted/_uniq.js +1 -1
- package/src/sap/base/util/restricted/_uniqBy.js +1 -1
- package/src/sap/base/util/restricted/_uniqWith.js +1 -1
- package/src/sap/base/util/restricted/_without.js +1 -1
- package/src/sap/base/util/restricted/_xor.js +1 -1
- package/src/sap/base/util/restricted/_xorBy.js +1 -1
- package/src/sap/base/util/restricted/_xorWith.js +1 -1
- package/src/sap/base/util/restricted/_zipObject.js +1 -1
- package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
- package/src/sap/ui/Device.js +3 -3
- package/src/sap/ui/Global.js +3 -3
- package/src/sap/ui/base/BindingParser.js +1 -3
- package/src/sap/ui/base/Event.js +1 -1
- package/src/sap/ui/base/EventProvider.js +1 -1
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +4 -9
- package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
- package/src/sap/ui/base/Metadata.js +1 -1
- package/src/sap/ui/base/Object.js +1 -1
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/core/.library +2 -2
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +46 -122
- package/src/sap/ui/core/ComponentContainer.js +2 -2
- package/src/sap/ui/core/ComponentHooks.js +174 -0
- package/src/sap/ui/core/ComponentMetadata.js +1 -1
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Configuration.js +1 -1
- package/src/sap/ui/core/Control.js +1 -1
- package/src/sap/ui/core/Core.js +8 -3
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +6 -2
- package/src/sap/ui/core/ElementMetadata.js +1 -1
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/Fragment.js +6 -5
- package/src/sap/ui/core/HTML.js +1 -1
- package/src/sap/ui/core/History.js +1 -1
- package/src/sap/ui/core/Icon.js +2 -2
- package/src/sap/ui/core/IndicationColorSupport.js +1 -1
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +1 -1
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +1 -1
- package/src/sap/ui/core/Item.js +1 -1
- package/src/sap/ui/core/LabelEnablement.js +2 -15
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/ListItem.js +1 -1
- package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
- package/src/sap/ui/core/Locale.js +1 -1
- package/src/sap/ui/core/LocaleData.js +43 -37
- package/src/sap/ui/core/Manifest.js +2 -2
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/RenderManager.js +41 -32
- package/src/sap/ui/core/Renderer.js +1 -1
- package/src/sap/ui/core/ResizeHandler.js +1 -1
- package/src/sap/ui/core/ScrollBar.js +1 -1
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/StaticArea.js +0 -1
- package/src/sap/ui/core/Title.js +1 -1
- package/src/sap/ui/core/TooltipBase.js +1 -1
- package/src/sap/ui/core/UIArea.js +1 -1
- package/src/sap/ui/core/UIComponent.js +3 -3
- package/src/sap/ui/core/UIComponentMetadata.js +1 -1
- package/src/sap/ui/core/ValueStateSupport.js +1 -1
- package/src/sap/ui/core/VariantLayoutData.js +1 -1
- package/src/sap/ui/core/XMLComposite.js +1 -1
- package/src/sap/ui/core/XMLCompositeMetadata.js +4 -4
- package/src/sap/ui/core/XMLTemplateProcessor.js +3 -3
- package/src/sap/ui/core/_IconRegistry.js +1 -1
- package/src/sap/ui/core/cldr/ar.json +5 -1
- package/src/sap/ui/core/cldr/ar_EG.json +5 -1
- package/src/sap/ui/core/cldr/ar_SA.json +5 -1
- package/src/sap/ui/core/cldr/bg.json +4 -0
- package/src/sap/ui/core/cldr/ca.json +4 -0
- package/src/sap/ui/core/cldr/cnr.json +4 -0
- package/src/sap/ui/core/cldr/cs.json +4 -0
- package/src/sap/ui/core/cldr/cy.json +4 -0
- package/src/sap/ui/core/cldr/da.json +4 -0
- package/src/sap/ui/core/cldr/de.json +4 -0
- package/src/sap/ui/core/cldr/de_AT.json +4 -0
- package/src/sap/ui/core/cldr/de_CH.json +4 -0
- package/src/sap/ui/core/cldr/el.json +4 -0
- package/src/sap/ui/core/cldr/el_CY.json +4 -0
- package/src/sap/ui/core/cldr/en.json +4 -0
- package/src/sap/ui/core/cldr/en_AU.json +4 -0
- package/src/sap/ui/core/cldr/en_GB.json +4 -0
- package/src/sap/ui/core/cldr/en_HK.json +5 -1
- package/src/sap/ui/core/cldr/en_IE.json +4 -0
- package/src/sap/ui/core/cldr/en_IN.json +5 -1
- package/src/sap/ui/core/cldr/en_NZ.json +4 -0
- package/src/sap/ui/core/cldr/en_PG.json +4 -0
- package/src/sap/ui/core/cldr/en_SG.json +5 -1
- package/src/sap/ui/core/cldr/en_ZA.json +4 -0
- package/src/sap/ui/core/cldr/es.json +4 -0
- package/src/sap/ui/core/cldr/es_AR.json +4 -0
- package/src/sap/ui/core/cldr/es_BO.json +4 -0
- package/src/sap/ui/core/cldr/es_CL.json +4 -0
- package/src/sap/ui/core/cldr/es_CO.json +4 -0
- package/src/sap/ui/core/cldr/es_MX.json +4 -0
- package/src/sap/ui/core/cldr/es_PE.json +4 -0
- package/src/sap/ui/core/cldr/es_UY.json +4 -0
- package/src/sap/ui/core/cldr/es_VE.json +4 -0
- package/src/sap/ui/core/cldr/et.json +4 -0
- package/src/sap/ui/core/cldr/fa.json +6 -3
- package/src/sap/ui/core/cldr/fi.json +4 -0
- package/src/sap/ui/core/cldr/fr.json +4 -0
- package/src/sap/ui/core/cldr/fr_BE.json +4 -0
- package/src/sap/ui/core/cldr/fr_CA.json +4 -0
- package/src/sap/ui/core/cldr/fr_CH.json +4 -0
- package/src/sap/ui/core/cldr/fr_LU.json +4 -0
- package/src/sap/ui/core/cldr/he.json +6 -3
- package/src/sap/ui/core/cldr/hi.json +5 -1
- package/src/sap/ui/core/cldr/hr.json +4 -0
- package/src/sap/ui/core/cldr/hu.json +4 -0
- package/src/sap/ui/core/cldr/id.json +5 -1
- package/src/sap/ui/core/cldr/it.json +4 -0
- package/src/sap/ui/core/cldr/it_CH.json +4 -0
- package/src/sap/ui/core/cldr/ja.json +5 -1
- package/src/sap/ui/core/cldr/kk.json +4 -0
- package/src/sap/ui/core/cldr/ko.json +5 -1
- package/src/sap/ui/core/cldr/lt.json +4 -0
- package/src/sap/ui/core/cldr/lv.json +4 -0
- package/src/sap/ui/core/cldr/mk.json +4 -0
- package/src/sap/ui/core/cldr/ms.json +5 -1
- package/src/sap/ui/core/cldr/nb.json +5 -2
- package/src/sap/ui/core/cldr/nl.json +4 -0
- package/src/sap/ui/core/cldr/nl_BE.json +4 -0
- package/src/sap/ui/core/cldr/pl.json +4 -0
- package/src/sap/ui/core/cldr/pt.json +4 -0
- package/src/sap/ui/core/cldr/pt_PT.json +4 -0
- package/src/sap/ui/core/cldr/ro.json +4 -0
- package/src/sap/ui/core/cldr/ru.json +4 -0
- package/src/sap/ui/core/cldr/ru_UA.json +4 -0
- package/src/sap/ui/core/cldr/sk.json +4 -0
- package/src/sap/ui/core/cldr/sl.json +4 -0
- package/src/sap/ui/core/cldr/sr.json +4 -0
- package/src/sap/ui/core/cldr/sr_Latn.json +6 -2
- package/src/sap/ui/core/cldr/sv.json +4 -0
- package/src/sap/ui/core/cldr/th.json +5 -1
- package/src/sap/ui/core/cldr/tr.json +5 -1
- package/src/sap/ui/core/cldr/uk.json +4 -0
- package/src/sap/ui/core/cldr/vi.json +4 -0
- package/src/sap/ui/core/cldr/zh_CN.json +5 -1
- package/src/sap/ui/core/cldr/zh_HK.json +6 -3
- package/src/sap/ui/core/cldr/zh_SG.json +6 -3
- package/src/sap/ui/core/cldr/zh_TW.json +5 -1
- package/src/sap/ui/core/date/UI5Date.js +1 -1
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
- package/src/sap/ui/core/dnd/DragInfo.js +1 -1
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/fieldhelp/FieldHelp.js +8 -10
- package/src/sap/ui/core/fieldhelp/FieldHelpCustomData.js +88 -0
- package/src/sap/ui/core/fieldhelp/FieldHelpUtil.js +22 -26
- package/src/sap/ui/core/format/FormatUtils.js +1 -1
- package/src/sap/ui/core/format/NumberFormat.js +17 -24
- package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
- package/src/sap/ui/core/getCompatibilityVersion.js +1 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +5 -7
- package/src/sap/ui/core/library.support.js +10 -1
- package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
- package/src/sap/ui/core/message/Message.js +1 -1
- package/src/sap/ui/core/message/MessageManager.js +1 -1
- package/src/sap/ui/core/message/MessageParser.js +1 -1
- package/src/sap/ui/core/message/MessageProcessor.js +1 -1
- package/src/sap/ui/core/messagebundle.properties +6 -12
- package/src/sap/ui/core/messagebundle_ar.properties +3 -6
- package/src/sap/ui/core/messagebundle_bg.properties +3 -6
- package/src/sap/ui/core/messagebundle_ca.properties +3 -6
- package/src/sap/ui/core/messagebundle_cnr.properties +3 -6
- package/src/sap/ui/core/messagebundle_cs.properties +3 -6
- package/src/sap/ui/core/messagebundle_cy.properties +3 -6
- package/src/sap/ui/core/messagebundle_da.properties +3 -6
- package/src/sap/ui/core/messagebundle_de.properties +3 -6
- package/src/sap/ui/core/messagebundle_el.properties +3 -6
- package/src/sap/ui/core/messagebundle_en.properties +3 -6
- package/src/sap/ui/core/messagebundle_en_GB.properties +3 -6
- package/src/sap/ui/core/messagebundle_en_US_saprigi.properties +3 -6
- package/src/sap/ui/core/messagebundle_es.properties +3 -6
- package/src/sap/ui/core/messagebundle_es_MX.properties +3 -6
- package/src/sap/ui/core/messagebundle_et.properties +3 -6
- package/src/sap/ui/core/messagebundle_fi.properties +3 -6
- package/src/sap/ui/core/messagebundle_fr.properties +3 -6
- package/src/sap/ui/core/messagebundle_fr_CA.properties +3 -6
- package/src/sap/ui/core/messagebundle_hi.properties +3 -6
- package/src/sap/ui/core/messagebundle_hr.properties +3 -6
- package/src/sap/ui/core/messagebundle_hu.properties +3 -6
- package/src/sap/ui/core/messagebundle_id.properties +3 -6
- package/src/sap/ui/core/messagebundle_it.properties +53 -56
- package/src/sap/ui/core/messagebundle_iw.properties +3 -6
- package/src/sap/ui/core/messagebundle_ja.properties +3 -6
- package/src/sap/ui/core/messagebundle_kk.properties +3 -6
- package/src/sap/ui/core/messagebundle_ko.properties +3 -6
- package/src/sap/ui/core/messagebundle_lt.properties +3 -6
- package/src/sap/ui/core/messagebundle_lv.properties +3 -6
- package/src/sap/ui/core/messagebundle_mk.properties +3 -6
- package/src/sap/ui/core/messagebundle_ms.properties +3 -6
- package/src/sap/ui/core/messagebundle_nl.properties +3 -6
- package/src/sap/ui/core/messagebundle_no.properties +4 -7
- package/src/sap/ui/core/messagebundle_pl.properties +3 -6
- package/src/sap/ui/core/messagebundle_pt.properties +3 -6
- package/src/sap/ui/core/messagebundle_pt_PT.properties +3 -6
- package/src/sap/ui/core/messagebundle_ro.properties +3 -6
- package/src/sap/ui/core/messagebundle_ru.properties +3 -6
- package/src/sap/ui/core/messagebundle_sh.properties +3 -6
- package/src/sap/ui/core/messagebundle_sk.properties +3 -6
- package/src/sap/ui/core/messagebundle_sl.properties +3 -6
- package/src/sap/ui/core/messagebundle_sr.properties +3 -6
- package/src/sap/ui/core/messagebundle_sv.properties +3 -6
- package/src/sap/ui/core/messagebundle_th.properties +3 -6
- package/src/sap/ui/core/messagebundle_tr.properties +3 -6
- package/src/sap/ui/core/messagebundle_uk.properties +3 -6
- package/src/sap/ui/core/messagebundle_vi.properties +3 -6
- package/src/sap/ui/core/messagebundle_zh_CN.properties +3 -6
- package/src/sap/ui/core/messagebundle_zh_TW.properties +3 -6
- package/src/sap/ui/core/mvc/Controller.js +2 -2
- package/src/sap/ui/core/mvc/HTMLView.js +1 -1
- package/src/sap/ui/core/mvc/JSONView.js +1 -1
- package/src/sap/ui/core/mvc/JSView.js +1 -1
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +3 -3
- package/src/sap/ui/core/mvc/XMLView.js +2 -2
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/plugin/LessSupport.js +1 -1
- package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
- package/src/sap/ui/core/postmessage/Bus.js +1 -1
- package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
- package/src/sap/ui/core/routing/Route.js +4 -4
- package/src/sap/ui/core/routing/Router.js +5 -5
- package/src/sap/ui/core/routing/Targets.js +3 -3
- package/src/sap/ui/core/routing/async/Target.js +1 -1
- package/src/sap/ui/core/routing/async/Targets.js +2 -2
- package/src/sap/ui/core/rules/App.support.js +13 -2
- package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
- package/src/sap/ui/core/search/SearchProvider.js +1 -1
- package/src/sap/ui/core/service/Service.js +1 -1
- package/src/sap/ui/core/service/ServiceFactory.js +1 -1
- package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
- package/src/sap/ui/core/support/Plugin.js +1 -1
- package/src/sap/ui/core/support/Support.js +1 -1
- package/src/sap/ui/core/support/ToolsAPI.js +4 -2
- package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
- package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +1 -1
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
- package/src/sap/ui/core/support/plugins/Trace.js +1 -1
- package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
- package/src/sap/ui/core/themes/base/base.less +4238 -122
- package/src/sap/ui/core/themes/base/global.less +460 -7
- package/src/sap/ui/core/themes/base/skeleton.less +454 -3
- package/src/sap/ui/core/themes/sap_hcb/global.less +493 -40
- package/src/sap/ui/core/theming/Parameters.js +6 -6
- package/src/sap/ui/core/theming/ThemeHelper.js +16 -13
- package/src/sap/ui/core/theming/ThemeManager.js +1 -1
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
- package/src/sap/ui/core/tmpl/Template.js +1 -1
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/Export.js +1 -1
- package/src/sap/ui/core/util/ExportCell.js +1 -1
- package/src/sap/ui/core/util/ExportColumn.js +1 -1
- package/src/sap/ui/core/util/ExportRow.js +1 -1
- package/src/sap/ui/core/util/ExportType.js +1 -1
- package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
- package/src/sap/ui/core/util/File.js +1 -1
- package/src/sap/ui/core/util/LibraryInfo.js +1 -1
- package/src/sap/ui/core/util/MockServer.js +1 -1
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +134 -148
- package/src/sap/ui/core/util/reflection/JsControlTreeModifier.js +165 -202
- package/src/sap/ui/core/util/reflection/XmlTreeModifier.js +365 -468
- package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
- package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
- package/src/sap/ui/core/webc/WebComponent.js +1 -1
- package/src/sap/ui/core/webc/WebComponentMetadata.js +1 -1
- package/src/sap/ui/core/ws/ReadyState.js +1 -1
- package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
- package/src/sap/ui/core/ws/WebSocket.js +1 -1
- package/src/sap/ui/debug/ControlTree.js +1 -1
- package/src/sap/ui/debug/DebugEnv.js +1 -1
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/dom/findTabbable.js +13 -6
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/CompositeDataState.js +11 -12
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/Context.js +0 -2
- package/src/sap/ui/model/DataState.js +33 -5
- package/src/sap/ui/model/ListBinding.js +19 -0
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +1 -1
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/_Helper.js +3 -1
- package/src/sap/ui/model/json/JSONModel.js +12 -1
- package/src/sap/ui/model/message/MessageModel.js +1 -1
- package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
- package/src/sap/ui/model/odata/ODataMetaModel.js +116 -35
- package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
- package/src/sap/ui/model/odata/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +106 -19
- package/src/sap/ui/model/odata/type/Boolean.js +1 -1
- package/src/sap/ui/model/odata/type/Byte.js +1 -1
- package/src/sap/ui/model/odata/type/Currency.js +1 -1
- package/src/sap/ui/model/odata/type/Date.js +1 -1
- package/src/sap/ui/model/odata/type/DateTime.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +1 -1
- package/src/sap/ui/model/odata/type/Decimal.js +1 -1
- package/src/sap/ui/model/odata/type/Double.js +1 -1
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +1 -1
- package/src/sap/ui/model/odata/type/Int16.js +1 -1
- package/src/sap/ui/model/odata/type/Int32.js +1 -1
- package/src/sap/ui/model/odata/type/Int64.js +1 -1
- package/src/sap/ui/model/odata/type/ODataType.js +1 -1
- package/src/sap/ui/model/odata/type/Raw.js +1 -1
- package/src/sap/ui/model/odata/type/SByte.js +1 -1
- package/src/sap/ui/model/odata/type/Single.js +1 -1
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +1 -1
- package/src/sap/ui/model/odata/type/Time.js +1 -1
- package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/type/UnitMixin.js +14 -9
- package/src/sap/ui/model/odata/v2/Context.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +21 -6
- package/src/sap/ui/model/odata/v2/ODataModel.js +109 -8
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/Context.js +63 -14
- package/src/sap/ui/model/odata/v4/ODataBinding.js +10 -0
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +135 -98
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +20 -10
- package/src/sap/ui/model/odata/v4/ODataModel.js +62 -4
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +141 -51
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +53 -19
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +152 -37
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +70 -9
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +44 -7
- package/src/sap/ui/model/odata/v4/lib/_TreeState.js +57 -40
- package/src/sap/ui/model/resource/ResourceModel.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +1 -1
- package/src/sap/ui/model/type/Currency.js +1 -1
- package/src/sap/ui/model/type/Date.js +3 -2
- package/src/sap/ui/model/type/DateInterval.js +3 -2
- package/src/sap/ui/model/type/DateTime.js +1 -1
- package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
- package/src/sap/ui/model/type/FileSize.js +1 -1
- package/src/sap/ui/model/type/Float.js +1 -1
- package/src/sap/ui/model/type/Integer.js +1 -1
- package/src/sap/ui/model/type/String.js +1 -1
- package/src/sap/ui/model/type/Time.js +1 -1
- package/src/sap/ui/model/type/TimeInterval.js +1 -1
- package/src/sap/ui/model/type/Unit.js +1 -1
- package/src/sap/ui/model/xml/XMLModel.js +1 -1
- package/src/sap/ui/performance/trace/FESR.js +19 -10
- package/src/sap/ui/performance/trace/Interaction.js +45 -659
- package/src/sap/ui/performance/trace/_InteractionImpl.js +705 -0
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
- package/src/sap/ui/test/TestUtils.js +51 -24
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/test/gherkin/opa5TestHarness.js +6 -2
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/sap/ui/util/_enforceNoReturnValue.js +1 -1
- package/src/ui5loader.js +1 -1
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
// Provides base class sap.ui.core.Component for all components
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
'./Manifest',
|
|
10
|
+
'./ComponentHooks',
|
|
10
11
|
'./ComponentMetadata',
|
|
11
12
|
'./ElementRegistry',
|
|
12
13
|
'sap/base/config',
|
|
@@ -35,6 +36,7 @@ sap.ui.define([
|
|
|
35
36
|
'sap/ui/core/util/_LocalizationHelper'
|
|
36
37
|
], function(
|
|
37
38
|
Manifest,
|
|
39
|
+
ComponentHooks,
|
|
38
40
|
ComponentMetadata,
|
|
39
41
|
ElementRegistry,
|
|
40
42
|
BaseConfig,
|
|
@@ -256,7 +258,7 @@ sap.ui.define([
|
|
|
256
258
|
* @extends sap.ui.base.ManagedObject
|
|
257
259
|
* @abstract
|
|
258
260
|
* @author SAP SE
|
|
259
|
-
* @version 1.
|
|
261
|
+
* @version 1.130.0
|
|
260
262
|
* @alias sap.ui.core.Component
|
|
261
263
|
* @since 1.9.2
|
|
262
264
|
*/
|
|
@@ -316,6 +318,11 @@ sap.ui.define([
|
|
|
316
318
|
delete mSettings._activeTerminologies;
|
|
317
319
|
}
|
|
318
320
|
|
|
321
|
+
// component factory config
|
|
322
|
+
if (mSettings && typeof mSettings._componentConfig === "object") {
|
|
323
|
+
this._componentConfig = mSettings._componentConfig;
|
|
324
|
+
delete mSettings._componentConfig;
|
|
325
|
+
}
|
|
319
326
|
/**
|
|
320
327
|
* whether the component was created synchronously (e.g. via legacy-factory or constructor call)
|
|
321
328
|
* @deprecated since 1.120
|
|
@@ -889,7 +896,7 @@ sap.ui.define([
|
|
|
889
896
|
*/
|
|
890
897
|
Component.prototype._getDestroyables = function() {
|
|
891
898
|
if (!this._aDestroyables) {
|
|
892
|
-
future.errorThrows(
|
|
899
|
+
future.errorThrows(`${this.getManifestObject().getComponentName()}: A sub-class of sap.ui.core.Component which overrides the constructor must apply the super constructor as well.`,
|
|
893
900
|
null,
|
|
894
901
|
"sap.ui.support",
|
|
895
902
|
function() {
|
|
@@ -1129,7 +1136,7 @@ sap.ui.define([
|
|
|
1129
1136
|
}
|
|
1130
1137
|
|
|
1131
1138
|
// create all models which are not created, yet.
|
|
1132
|
-
var mCreatedModels = Component._createManifestModels(mModelConfigurations,
|
|
1139
|
+
var mCreatedModels = Component._createManifestModels(mModelConfigurations, this._componentConfig);
|
|
1133
1140
|
for (sModelName in mCreatedModels) {
|
|
1134
1141
|
// keep the model instance to be able to destroy the created models on component destroy
|
|
1135
1142
|
this._mManifestModels[sModelName] = mCreatedModels[sModelName];
|
|
@@ -1689,10 +1696,8 @@ sap.ui.define([
|
|
|
1689
1696
|
// 2.0 is the default in case no version is provided
|
|
1690
1697
|
oModelConfig.type = 'sap.ui.model.odata.v2.ODataModel';
|
|
1691
1698
|
} else {
|
|
1692
|
-
future.errorThrows(
|
|
1693
|
-
|
|
1694
|
-
{ suffix: 'Falling back to default model type "sap.ui.model.odata.v2.ODataModel".' },
|
|
1695
|
-
'["sap.app"]["dataSources"]["' + oModelConfig.dataSource + '"]', sLogComponentName);
|
|
1699
|
+
future.errorThrows(`${sLogComponentName}: Component Manifest: Provided OData version "${sODataVersion}" in dataSource "${oModelConfig.dataSource}" for model "${sModelName}" is unknown. ["sap.app"]["dataSources"]["${oModelConfig.dataSource}"].`,
|
|
1700
|
+
{ suffix: 'Falling back to default model type "sap.ui.model.odata.v2.ODataModel".' });
|
|
1696
1701
|
oModelConfig.type = 'sap.ui.model.odata.v2.ODataModel';
|
|
1697
1702
|
}
|
|
1698
1703
|
break;
|
|
@@ -1711,7 +1716,7 @@ sap.ui.define([
|
|
|
1711
1716
|
|
|
1712
1717
|
// model type is required!
|
|
1713
1718
|
if (!oModelConfig.type) {
|
|
1714
|
-
future.errorThrows(
|
|
1719
|
+
future.errorThrows(`${sLogComponentName}: Component Manifest: Missing "type" for model "${sModelName}". ["sap.ui5"]["models"]["${sModelName}"].`);
|
|
1715
1720
|
continue;
|
|
1716
1721
|
}
|
|
1717
1722
|
|
|
@@ -1795,7 +1800,7 @@ sap.ui.define([
|
|
|
1795
1800
|
// class could not be loaded by _loadManifestModelClasses, or module export is not
|
|
1796
1801
|
// a valid UI5 class (no metadata available) -> a legacy testcases exist for this scenario!
|
|
1797
1802
|
if (!fnClass?.getMetadata) {
|
|
1798
|
-
future.errorThrows(
|
|
1803
|
+
future.errorThrows(`${sLogComponentName}: Component Manifest: Class "${oModelConfig.type}" for model "${sModelName}" could not be found. ["sap.ui5"]["models"]["${sModelName}"].`);
|
|
1799
1804
|
continue;
|
|
1800
1805
|
}
|
|
1801
1806
|
var oClassMetadata = fnClass.getMetadata();
|
|
@@ -1863,19 +1868,19 @@ sap.ui.define([
|
|
|
1863
1868
|
|
|
1864
1869
|
// dataSource entry should be defined!
|
|
1865
1870
|
if (!oAnnotation) {
|
|
1866
|
-
future.errorThrows(
|
|
1871
|
+
future.errorThrows(`${sLogComponentName}: Component Manifest: ODataAnnotation "${sAnnotation}" for dataSource "${oModelConfig.dataSource}" could not be found in manifest. ["sap.app"]["dataSources"]["${sAnnotation}"].`);
|
|
1867
1872
|
continue;
|
|
1868
1873
|
}
|
|
1869
1874
|
|
|
1870
1875
|
// type should be ODataAnnotation!
|
|
1871
1876
|
if (oAnnotation.type !== 'ODataAnnotation') {
|
|
1872
|
-
future.errorThrows(
|
|
1877
|
+
future.errorThrows(`${sLogComponentName}: Component Manifest: dataSource "${sAnnotation}" was expected to have type "ODataAnnotation" but was "${oAnnotation.type}". ["sap.app"]["dataSources"]["${sAnnotation}"].`);
|
|
1873
1878
|
continue;
|
|
1874
1879
|
}
|
|
1875
1880
|
|
|
1876
1881
|
// uri is required!
|
|
1877
1882
|
if (!oAnnotation.uri) {
|
|
1878
|
-
future.errorThrows(
|
|
1883
|
+
future.errorThrows(`${sLogComponentName}: Component Manifest: Missing "uri" for ODataAnnotation "${sAnnotation}". ["sap.app"]["dataSources"]["${sAnnotation}"].`);
|
|
1879
1884
|
continue;
|
|
1880
1885
|
}
|
|
1881
1886
|
|
|
@@ -1914,7 +1919,7 @@ sap.ui.define([
|
|
|
1914
1919
|
}
|
|
1915
1920
|
|
|
1916
1921
|
} else {
|
|
1917
|
-
future.errorThrows(
|
|
1922
|
+
future.errorThrows(`${sLogComponentName}: Component Manifest: dataSource "${oModelConfig.dataSource}" for model "${sModelName}" not found or invalid. ["sap.app"]["dataSources"]["${oModelConfig.dataSource}"].`);
|
|
1918
1923
|
continue;
|
|
1919
1924
|
}
|
|
1920
1925
|
}
|
|
@@ -2121,7 +2126,7 @@ sap.ui.define([
|
|
|
2121
2126
|
const aLoadPromises = [];
|
|
2122
2127
|
|
|
2123
2128
|
function logLoadingError(sModelClassName, sModelName, oError) {
|
|
2124
|
-
future.errorThrows(
|
|
2129
|
+
future.errorThrows(`${sLogComponentName}: Component Manifest: Class "${sModelClassName}" for model "${sModelName}" could not be loaded. ["sap.ui5"]["models"]["${sModelName}"].`, { cause: oError });
|
|
2125
2130
|
}
|
|
2126
2131
|
|
|
2127
2132
|
for (const sModelName in mModelConfigurations) {
|
|
@@ -2152,11 +2157,11 @@ sap.ui.define([
|
|
|
2152
2157
|
* Creates model instances using a configuration provided by {@link sap.ui.core.Component._createManifestModelConfigurations}.
|
|
2153
2158
|
*
|
|
2154
2159
|
* @param {object} mModelConfigurations key-value configuration object created via {@link sap.ui.core.Component._createManifestModelConfigurations}
|
|
2155
|
-
* @param {
|
|
2160
|
+
* @param {object} oConfig see <code>sap.ui.component</code> / <code>sap.ui.component.load</code>
|
|
2156
2161
|
* @returns {object} key-value map with model name as key and model instance as value
|
|
2157
2162
|
* @private
|
|
2158
2163
|
*/
|
|
2159
|
-
Component._createManifestModels = function(mModelConfigurations,
|
|
2164
|
+
Component._createManifestModels = function(mModelConfigurations, oConfig) {
|
|
2160
2165
|
var mModels = {};
|
|
2161
2166
|
for (var sModelName in mModelConfigurations) {
|
|
2162
2167
|
var oModelConfig = mModelConfigurations[sModelName];
|
|
@@ -2182,6 +2187,11 @@ sap.ui.define([
|
|
|
2182
2187
|
// the factory will create the model with the arguments above
|
|
2183
2188
|
var oModel = new fnFactory();
|
|
2184
2189
|
|
|
2190
|
+
// Call hook and provide model instance, manifest model ID to UI5 flex lib
|
|
2191
|
+
if (oModel.isA("sap.ui.model.odata.v2.ODataModel") || oModel.isA("sap.ui.model.odata.v4.ODataModel")) {
|
|
2192
|
+
ComponentHooks.onModelCreated.execute(oModel, sModelName, oConfig);
|
|
2193
|
+
}
|
|
2194
|
+
|
|
2185
2195
|
// add model instance to the result map
|
|
2186
2196
|
mModels[sModelName] = oModel;
|
|
2187
2197
|
}
|
|
@@ -2344,89 +2354,6 @@ sap.ui.define([
|
|
|
2344
2354
|
return Promise.all(aManifestsToLoad);
|
|
2345
2355
|
}
|
|
2346
2356
|
|
|
2347
|
-
/**
|
|
2348
|
-
* Callback handler which will be executed once the component is loaded. A copy of the
|
|
2349
|
-
* configuration object together with a copy of the manifest object will be passed into
|
|
2350
|
-
* the registered function.
|
|
2351
|
-
* Also a return value is not expected from the callback handler.
|
|
2352
|
-
* It will only be called for asynchronous manifest first scenarios.
|
|
2353
|
-
* <p>
|
|
2354
|
-
* Example usage:
|
|
2355
|
-
* <pre>
|
|
2356
|
-
* sap.ui.require(['sap/ui/core/Component'], function(Component) {
|
|
2357
|
-
* Component._fnLoadComponentCallback = function(oConfig, oManifest) {
|
|
2358
|
-
* // do some logic with the config
|
|
2359
|
-
* };
|
|
2360
|
-
* });
|
|
2361
|
-
* </pre>
|
|
2362
|
-
* <p>
|
|
2363
|
-
* <b>ATTENTION:</b> This hook must only be used by UI flexibility (library:
|
|
2364
|
-
* sap.ui.fl) and will be replaced with a more generic solution!
|
|
2365
|
-
*
|
|
2366
|
-
* @private
|
|
2367
|
-
* @ui5-restricted sap.ui.fl
|
|
2368
|
-
* @since 1.37.0
|
|
2369
|
-
*/
|
|
2370
|
-
Component._fnLoadComponentCallback = null;
|
|
2371
|
-
|
|
2372
|
-
/**
|
|
2373
|
-
* Callback handler which will be executed once a component instance has
|
|
2374
|
-
* been created by {#link sap.ui.component}. The component instance and the
|
|
2375
|
-
* configuration object will be passed into the registered function.
|
|
2376
|
-
* For async scenarios (<code>vConfig.async = true</code>) a Promise can be provided as
|
|
2377
|
-
* return value from the callback handler to delay resolving the Promise
|
|
2378
|
-
* returned by {@link sap.ui.component}.
|
|
2379
|
-
* In synchronous scenarios the return value will be ignored.
|
|
2380
|
-
*
|
|
2381
|
-
* Example usage:
|
|
2382
|
-
* <pre>
|
|
2383
|
-
* sap.ui.require(['sap/ui/core/Component'], function(Component) {
|
|
2384
|
-
* Component._fnOnInstanceCreated = function(oComponent, oConfig) {
|
|
2385
|
-
* // do some logic with the config
|
|
2386
|
-
*
|
|
2387
|
-
* // optionally return a Promise
|
|
2388
|
-
* return doAsyncStuff();
|
|
2389
|
-
* };
|
|
2390
|
-
* });
|
|
2391
|
-
* </pre>
|
|
2392
|
-
* <b>ATTENTION:</b> This hook must only be used by UI flexibility (sap.ui.fl)
|
|
2393
|
-
* or the sap.ui.integration library.
|
|
2394
|
-
*
|
|
2395
|
-
* @private
|
|
2396
|
-
* @ui5-restricted sap.ui.fl,sap.ui.integration
|
|
2397
|
-
* @since 1.43.0
|
|
2398
|
-
*/
|
|
2399
|
-
var _aInstanceCreatedListeners = [];
|
|
2400
|
-
|
|
2401
|
-
// [Compatibility]: We need to accept multiple onInstanceCreated listeners,
|
|
2402
|
-
// but still want to support the definition via assignment
|
|
2403
|
-
Object.defineProperty(Component, "_fnOnInstanceCreated", {
|
|
2404
|
-
get : function () { return _aInstanceCreatedListeners[0]; },
|
|
2405
|
-
set : function (fn) {
|
|
2406
|
-
if (typeof fn === "function") {
|
|
2407
|
-
_aInstanceCreatedListeners.push(fn);
|
|
2408
|
-
} else {
|
|
2409
|
-
// falsy values clear the list of listeners (a null assignment is used in different unit-tests)
|
|
2410
|
-
_aInstanceCreatedListeners = [];
|
|
2411
|
-
}
|
|
2412
|
-
}
|
|
2413
|
-
});
|
|
2414
|
-
|
|
2415
|
-
/**
|
|
2416
|
-
* Callback handler which will be executed once the manifest.json was
|
|
2417
|
-
* loaded for a component, but before the manifest is interpreted.
|
|
2418
|
-
* The loaded manifest will be passed into the registered function.
|
|
2419
|
-
*
|
|
2420
|
-
* The callback may modify the parsed manifest object and must return a Promise which
|
|
2421
|
-
* resolves with the manifest object. If the Promise is rejected, the component creation
|
|
2422
|
-
* fails with the rejection reason.
|
|
2423
|
-
*
|
|
2424
|
-
* @private
|
|
2425
|
-
* @ui5-restricted sap.ui.fl
|
|
2426
|
-
* @since 1.70.0
|
|
2427
|
-
*/
|
|
2428
|
-
Component._fnPreprocessManifest = null;
|
|
2429
|
-
|
|
2430
2357
|
/**
|
|
2431
2358
|
* Asynchronously creates a new component instance from the given configuration.
|
|
2432
2359
|
*
|
|
@@ -2639,8 +2566,7 @@ sap.ui.define([
|
|
|
2639
2566
|
const def = new Deferred();
|
|
2640
2567
|
|
|
2641
2568
|
sap.ui.require([sModuleName], def.resolve, (err) => {
|
|
2642
|
-
future.warningRejects(def.resolve, def.reject, `Cannot load module '${sModuleName}'
|
|
2643
|
-
sComponentName, "sap.ui.core.Component");
|
|
2569
|
+
future.warningRejects(def.resolve, def.reject, `sap.ui.core.Component: Cannot load module '${sModuleName}' during creation of component: "${sComponentName}".`);
|
|
2644
2570
|
Log.warning(err);
|
|
2645
2571
|
});
|
|
2646
2572
|
|
|
@@ -2679,26 +2605,19 @@ sap.ui.define([
|
|
|
2679
2605
|
}
|
|
2680
2606
|
}
|
|
2681
2607
|
|
|
2682
|
-
// collect instance-created listeners
|
|
2683
|
-
function callInstanceCreatedListeners(oInstance, vConfig) {
|
|
2684
|
-
return _aInstanceCreatedListeners.map(function(fn) {
|
|
2685
|
-
return fn(oInstance, vConfig);
|
|
2686
|
-
});
|
|
2687
|
-
}
|
|
2688
|
-
|
|
2689
2608
|
function notifyOnInstanceCreated(oInstance, vConfig) {
|
|
2690
2609
|
if (vConfig.async) {
|
|
2691
2610
|
var pRootControlReady = oInstance.rootControlLoaded ? oInstance.rootControlLoaded() : Promise.resolve();
|
|
2692
2611
|
|
|
2693
2612
|
// collect instance-created listeners
|
|
2694
|
-
var aOnInstanceCreatedPromises =
|
|
2613
|
+
var aOnInstanceCreatedPromises = ComponentHooks.onInstanceCreated.execute(oInstance, vConfig) || [];
|
|
2695
2614
|
|
|
2696
2615
|
// root control loaded promise
|
|
2697
2616
|
aOnInstanceCreatedPromises.push(pRootControlReady);
|
|
2698
2617
|
|
|
2699
2618
|
return Promise.all(aOnInstanceCreatedPromises);
|
|
2700
2619
|
} else {
|
|
2701
|
-
|
|
2620
|
+
ComponentHooks.onInstanceCreated.execute(oInstance, vConfig);
|
|
2702
2621
|
}
|
|
2703
2622
|
return oInstance;
|
|
2704
2623
|
}
|
|
@@ -2722,6 +2641,7 @@ sap.ui.define([
|
|
|
2722
2641
|
componentData: oComponentData,
|
|
2723
2642
|
_cacheTokens: vConfig.asyncHints && vConfig.asyncHints.cacheTokens,
|
|
2724
2643
|
_activeTerminologies: aActiveTerminologies,
|
|
2644
|
+
_componentConfig: vConfig,
|
|
2725
2645
|
/**
|
|
2726
2646
|
* @deprecated since 1.120
|
|
2727
2647
|
*/
|
|
@@ -3019,10 +2939,13 @@ sap.ui.define([
|
|
|
3019
2939
|
};
|
|
3020
2940
|
|
|
3021
2941
|
/**
|
|
3022
|
-
* Internal loading method
|
|
2942
|
+
* Internal loading method used by the factory methods.
|
|
3023
2943
|
*
|
|
3024
|
-
* @param {object} oConfig
|
|
3025
|
-
*
|
|
2944
|
+
* @param {object} oConfig
|
|
2945
|
+
* Configuration options as provided to the calling factory, see e.g. {@link sap.ui.core.Component.create}
|
|
2946
|
+
* @param {object} [oConfig.async]
|
|
2947
|
+
* Whether the Component loading should be done asynchronously
|
|
2948
|
+
* @param {object} mOptions Additional, internal loading configuration
|
|
3026
2949
|
* @param {string[]} mOptions.activeTerminologies list of active terminologies.
|
|
3027
2950
|
* See the public API documentation for more detail: {@link sap.ui.core.Component.create Component.create}
|
|
3028
2951
|
* @param {boolean} mOptions.failOnError see <code>sap.ui.component.load</code>
|
|
@@ -3033,7 +2956,8 @@ sap.ui.define([
|
|
|
3033
2956
|
* @return {function|Promise<function>} the constructor of the Component class or a Promise that will be fulfilled with the same
|
|
3034
2957
|
*
|
|
3035
2958
|
* @private
|
|
3036
|
-
|
|
2959
|
+
* @ui5-transform-hint replace-param oConfig.async true
|
|
2960
|
+
*/
|
|
3037
2961
|
function loadComponent(oConfig, mOptions) {
|
|
3038
2962
|
var aActiveTerminologies = mOptions.activeTerminologies,
|
|
3039
2963
|
sName = oConfig.name,
|
|
@@ -3062,11 +2986,11 @@ sap.ui.define([
|
|
|
3062
2986
|
|
|
3063
2987
|
function preprocessManifestJSON(oRawJson) {
|
|
3064
2988
|
// the preprocessing flex-hook is only called if a manifest.json was loaded or an object was given via config
|
|
3065
|
-
if (
|
|
2989
|
+
if (ComponentHooks.onPreprocessManifest.isRegistered() && oRawJson != null) {
|
|
3066
2990
|
try {
|
|
3067
2991
|
// secure configuration from manipulation
|
|
3068
2992
|
var oConfigCopy = deepExtend({}, oConfig);
|
|
3069
|
-
return
|
|
2993
|
+
return ComponentHooks.onPreprocessManifest.execute(oRawJson, oConfigCopy);
|
|
3070
2994
|
} catch (oError) {
|
|
3071
2995
|
// in case the hook itself crashes without 'safely' rejecting, we log the error and reject directly
|
|
3072
2996
|
Log.error("Failed to execute flexibility hook for manifest preprocessing.", oError);
|
|
@@ -3502,7 +3426,7 @@ sap.ui.define([
|
|
|
3502
3426
|
activeTerminologies: aActiveTerminologies
|
|
3503
3427
|
});
|
|
3504
3428
|
|
|
3505
|
-
mModels = Component._createManifestModels(mAllModelConfigurations,
|
|
3429
|
+
mModels = Component._createManifestModels(mAllModelConfigurations, oConfig);
|
|
3506
3430
|
}
|
|
3507
3431
|
|
|
3508
3432
|
return oManifest;
|
|
@@ -3612,7 +3536,7 @@ sap.ui.define([
|
|
|
3612
3536
|
// Load all ResourceBundles for all models in parallel
|
|
3613
3537
|
return Promise.all(aResourceModelNames.map(loadResourceBundle)).then(function() {
|
|
3614
3538
|
if (Object.keys(mAfterPreloadModelConfigurations).length > 0) {
|
|
3615
|
-
var mResourceModels = Component._createManifestModels(mAfterPreloadModelConfigurations
|
|
3539
|
+
var mResourceModels = Component._createManifestModels(mAfterPreloadModelConfigurations);
|
|
3616
3540
|
if (!mModels) {
|
|
3617
3541
|
mModels = {};
|
|
3618
3542
|
}
|
|
@@ -3627,16 +3551,16 @@ sap.ui.define([
|
|
|
3627
3551
|
|
|
3628
3552
|
fnCallLoadComponentCallback = function(oLoadedManifest) {
|
|
3629
3553
|
// if a callback is registered to the component load, call it with the configuration
|
|
3630
|
-
if (
|
|
3554
|
+
if (ComponentHooks.onComponentLoaded.isRegistered()) {
|
|
3631
3555
|
// secure configuration from manipulation, manifest can be adjusted by late changes
|
|
3632
3556
|
var oConfigCopy = deepExtend({}, oConfig);
|
|
3633
3557
|
// trigger the callback with a copy of its required data
|
|
3634
3558
|
// do not await any result from the callback nor stop component loading on an occurring error
|
|
3635
3559
|
try {
|
|
3636
|
-
return
|
|
3560
|
+
return ComponentHooks.onComponentLoaded.execute(oConfigCopy, oLoadedManifest);
|
|
3637
3561
|
} catch (oError) {
|
|
3638
|
-
future.errorThrows("Callback for loading the component \"" + oLoadedManifest.getComponentName() +
|
|
3639
|
-
"\" run into an error.", { cause: oError , suffix: "The callback was skipped and the component loading resumed." }
|
|
3562
|
+
future.errorThrows("sap.ui.core.Component: Callback for loading the component \"" + oLoadedManifest.getComponentName() +
|
|
3563
|
+
"\" run into an error.", { cause: oError , suffix: "The callback was skipped and the component loading resumed." });
|
|
3640
3564
|
}
|
|
3641
3565
|
}
|
|
3642
3566
|
};
|
|
@@ -58,7 +58,7 @@ sap.ui.define([
|
|
|
58
58
|
* See also {@link module:sap/ui/core/ComponentSupport}.
|
|
59
59
|
*
|
|
60
60
|
* @extends sap.ui.core.Control
|
|
61
|
-
* @version 1.
|
|
61
|
+
* @version 1.130.0
|
|
62
62
|
*
|
|
63
63
|
* @public
|
|
64
64
|
* @alias sap.ui.core.ComponentContainer
|
|
@@ -454,7 +454,7 @@ sap.ui.define([
|
|
|
454
454
|
delete this._oComponentPromise;
|
|
455
455
|
// listeners can prevent the default log entry
|
|
456
456
|
if ( this.fireComponentFailed({ reason: oReason }) ) {
|
|
457
|
-
future.errorThrows("Failed to load component for container " + this.getId(), oReason);
|
|
457
|
+
future.errorThrows("Failed to load component for container " + this.getId(), { cause: oReason});
|
|
458
458
|
}
|
|
459
459
|
}.bind(this));
|
|
460
460
|
} else if (oComponent) {
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
sap.ui.define([], function() {
|
|
7
|
+
"use strict";
|
|
8
|
+
|
|
9
|
+
class Hook {
|
|
10
|
+
#allowMultiple;
|
|
11
|
+
#callbacks;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @constructor
|
|
15
|
+
* @param {boolean} bAllowMultiple Set to 'true' if the hook should allow multiple callbacks, 'false' otherwise.
|
|
16
|
+
*/
|
|
17
|
+
constructor(bAllowMultiple) {
|
|
18
|
+
this.#allowMultiple = bAllowMultiple;
|
|
19
|
+
this.#callbacks = bAllowMultiple ? [] : null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Registers a callback function for this hook.
|
|
24
|
+
* @param {Function} fnCallback The callback to register.
|
|
25
|
+
* @throws {Error} Throws an error if the callback is not a function.
|
|
26
|
+
* @throws {Error} Throws an error if the callback is already registered for this hook.
|
|
27
|
+
*/
|
|
28
|
+
register(fnCallback) {
|
|
29
|
+
if (typeof fnCallback !== "function") {
|
|
30
|
+
throw new Error('Registered callback must be a function.');
|
|
31
|
+
}
|
|
32
|
+
if (this.#allowMultiple) {
|
|
33
|
+
this.#callbacks.push(fnCallback);
|
|
34
|
+
} else {
|
|
35
|
+
if (this.#callbacks) {
|
|
36
|
+
throw new Error(`Callback is already registered. The hooks are restricted to the 'sap.ui.fl' library only.`);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
this.#callbacks = fnCallback;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Checks if callback function is registered for this hook.
|
|
45
|
+
* @returns {boolean} Returns 'true' if registered, else 'false'.
|
|
46
|
+
*/
|
|
47
|
+
isRegistered() {
|
|
48
|
+
return this.#allowMultiple ? this.#callbacks.length > 0 : !!this.#callbacks;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Deregisters the callback(s) from this hook.
|
|
53
|
+
*/
|
|
54
|
+
deregister() {
|
|
55
|
+
this.#callbacks = this.#allowMultiple ? [] : null;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Executes the registered callback for this hook.
|
|
60
|
+
*
|
|
61
|
+
* @param {any} args Arguments to pass to the callback function(s).
|
|
62
|
+
* @returns {any|any[]} Returns the result of the callback(s). If multiple callbacks
|
|
63
|
+
* are registered, returns an array of results will be returned.
|
|
64
|
+
* If a single callback is registered, it will return the result directly.
|
|
65
|
+
* If no callback is registered, the function returns 'undefined'.
|
|
66
|
+
*/
|
|
67
|
+
execute(...args) {
|
|
68
|
+
return this.#allowMultiple ?
|
|
69
|
+
this.#callbacks.map((callback) => callback(...args)) :
|
|
70
|
+
this.#callbacks?.(...args);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* A registry of all <code>sap.ui.core.Component</code> hooks that can be used to register, deregister, and execute callback functions.
|
|
76
|
+
*
|
|
77
|
+
* @alias module:sap/ui/core/ComponentHooks
|
|
78
|
+
* @namespace
|
|
79
|
+
* @private
|
|
80
|
+
* @ui5-restricted sap.ui.fl,sap.ui.integration
|
|
81
|
+
*
|
|
82
|
+
*/
|
|
83
|
+
const ComponentHooks = {
|
|
84
|
+
/**
|
|
85
|
+
* Callback handler that executes when a manifest model (ODataModel v2 and v4) is created.
|
|
86
|
+
* The model instance, the manifest model ID, and the configuration object will be passed into the registered function.
|
|
87
|
+
*
|
|
88
|
+
* Example usage:
|
|
89
|
+
* <pre>
|
|
90
|
+
* sap.ui.require(['sap/ui/core/ComponentHooks'], function(ComponentHooks) {
|
|
91
|
+
* ComponentHooks.onModelCreated.register(function(oModel, sModelID, oConfig) {
|
|
92
|
+
* // do some logic
|
|
93
|
+
* });
|
|
94
|
+
* });
|
|
95
|
+
* </pre>
|
|
96
|
+
*
|
|
97
|
+
* @private
|
|
98
|
+
* @ui5-restricted sap.ui.fl
|
|
99
|
+
* @since 1.130
|
|
100
|
+
*/
|
|
101
|
+
onModelCreated: new Hook(false),
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Callback handler which will be executed once a component instance has
|
|
105
|
+
* been created by {#link sap.ui.component}. The component instance and the
|
|
106
|
+
* configuration object will be passed into the registered function.
|
|
107
|
+
* For async scenarios (<code>vConfig.async = true</code>) a Promise can be provided as
|
|
108
|
+
* return value from the callback handler to delay resolving the Promise
|
|
109
|
+
* returned by {@link sap.ui.component}.
|
|
110
|
+
* In synchronous scenarios the return value will be ignored.
|
|
111
|
+
*
|
|
112
|
+
* Example usage:
|
|
113
|
+
* <pre>
|
|
114
|
+
* sap.ui.require(['sap/ui/core/ComponentHooks'], function(ComponentHooks) {
|
|
115
|
+
* ComponentHooks.onInstanceCreated.register(function(oComponent, oConfig) {
|
|
116
|
+
* // do some logic with the config
|
|
117
|
+
*
|
|
118
|
+
* // optionally return a Promise
|
|
119
|
+
* return doAsyncStuff();
|
|
120
|
+
* });
|
|
121
|
+
* });
|
|
122
|
+
* </pre>
|
|
123
|
+
* <b>ATTENTION:</b> This hook must only be used by UI flexibility (sap.ui.fl)
|
|
124
|
+
* or the sap.ui.integration library.
|
|
125
|
+
*
|
|
126
|
+
* @private
|
|
127
|
+
* @ui5-restricted sap.ui.fl,sap.ui.integration
|
|
128
|
+
* @since 1.43.0
|
|
129
|
+
*/
|
|
130
|
+
onInstanceCreated: new Hook(true),
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Callback handler which will be executed once the manifest.json was
|
|
134
|
+
* loaded for a component, but before the manifest is interpreted.
|
|
135
|
+
* The loaded manifest will be passed into the registered function.
|
|
136
|
+
*
|
|
137
|
+
* The callback may modify the parsed manifest object and must return a Promise which
|
|
138
|
+
* resolves with the manifest object. If the Promise is rejected, the component creation
|
|
139
|
+
* fails with the rejection reason.
|
|
140
|
+
*
|
|
141
|
+
* @private
|
|
142
|
+
* @ui5-restricted sap.ui.fl
|
|
143
|
+
* @since 1.70.0
|
|
144
|
+
*/
|
|
145
|
+
onPreprocessManifest: new Hook(false),
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Callback handler which will be executed once the component is loaded. A copy of the
|
|
149
|
+
* configuration object together with a copy of the manifest object will be passed into
|
|
150
|
+
* the registered function.
|
|
151
|
+
* Also a return value is not expected from the callback handler.
|
|
152
|
+
* It will only be called for asynchronous manifest first scenarios.
|
|
153
|
+
* <p>
|
|
154
|
+
* Example usage:
|
|
155
|
+
* <pre>
|
|
156
|
+
* sap.ui.require(['sap/ui/core/ComponentHooks'], function(ComponentHooks) {
|
|
157
|
+
* ComponentHooks.onComponentLoaded.register(function(oConfig, oManifest) {
|
|
158
|
+
* // do some logic with the config
|
|
159
|
+
* });
|
|
160
|
+
* });
|
|
161
|
+
* </pre>
|
|
162
|
+
* <p>
|
|
163
|
+
* <b>ATTENTION:</b> This hook must only be used by UI flexibility (library:
|
|
164
|
+
* sap.ui.fl) and will be replaced with a more generic solution!
|
|
165
|
+
*
|
|
166
|
+
* @private
|
|
167
|
+
* @ui5-restricted sap.ui.fl
|
|
168
|
+
* @since 1.37.0
|
|
169
|
+
*/
|
|
170
|
+
onComponentLoaded: new Hook(false)
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
return ComponentHooks;
|
|
174
|
+
});
|
|
@@ -84,7 +84,7 @@ sap.ui.define([
|
|
|
84
84
|
* @extends sap.ui.core.Element
|
|
85
85
|
* @abstract
|
|
86
86
|
* @author SAP SE
|
|
87
|
-
* @version 1.
|
|
87
|
+
* @version 1.130.0
|
|
88
88
|
* @alias sap.ui.core.Control
|
|
89
89
|
*/
|
|
90
90
|
var Control = Element.extend("sap.ui.core.Control", /** @lends sap.ui.core.Control.prototype */ {
|
package/src/sap/ui/core/Core.js
CHANGED
|
@@ -13,6 +13,7 @@ sap.ui.define([
|
|
|
13
13
|
"./Element",
|
|
14
14
|
"./ElementRegistry",
|
|
15
15
|
"./Lib",
|
|
16
|
+
"./LocaleData",
|
|
16
17
|
"./Rendering",
|
|
17
18
|
"./RenderManager",
|
|
18
19
|
"./UIArea",
|
|
@@ -25,6 +26,7 @@ sap.ui.define([
|
|
|
25
26
|
"sap/base/Event",
|
|
26
27
|
"sap/base/Log",
|
|
27
28
|
"sap/base/i18n/Formatting",
|
|
29
|
+
"sap/base/i18n/Localization",
|
|
28
30
|
"sap/base/util/Deferred",
|
|
29
31
|
"sap/base/util/isEmptyObject",
|
|
30
32
|
"sap/base/util/ObjectPath",
|
|
@@ -64,6 +66,7 @@ sap.ui.define([
|
|
|
64
66
|
Element,
|
|
65
67
|
ElementRegistry,
|
|
66
68
|
Library,
|
|
69
|
+
LocaleData,
|
|
67
70
|
Rendering,
|
|
68
71
|
RenderManager,
|
|
69
72
|
UIArea,
|
|
@@ -76,6 +79,7 @@ sap.ui.define([
|
|
|
76
79
|
BaseEvent,
|
|
77
80
|
Log,
|
|
78
81
|
Formatting,
|
|
82
|
+
Localization,
|
|
79
83
|
Deferred,
|
|
80
84
|
isEmptyObject,
|
|
81
85
|
ObjectPath,
|
|
@@ -114,7 +118,7 @@ sap.ui.define([
|
|
|
114
118
|
* @private
|
|
115
119
|
* @ui5-restricted sap.ui.core, sap.ui.test
|
|
116
120
|
*/
|
|
117
|
-
const sVersion = "1.
|
|
121
|
+
const sVersion = "1.130.0";
|
|
118
122
|
|
|
119
123
|
/**
|
|
120
124
|
* The buildinfo.
|
|
@@ -439,7 +443,7 @@ sap.ui.define([
|
|
|
439
443
|
* @extends sap.ui.base.Object
|
|
440
444
|
* @final
|
|
441
445
|
* @author SAP SE
|
|
442
|
-
* @version 1.
|
|
446
|
+
* @version 1.130.0
|
|
443
447
|
* @alias sap.ui.core.Core
|
|
444
448
|
* @public
|
|
445
449
|
* @hideconstructor
|
|
@@ -1177,7 +1181,8 @@ sap.ui.define([
|
|
|
1177
1181
|
sap.ui.require(aModules, function() {
|
|
1178
1182
|
resolve(Array.prototype.slice.call(arguments));
|
|
1179
1183
|
});
|
|
1180
|
-
})
|
|
1184
|
+
}),
|
|
1185
|
+
LocaleData.requestInstance(Localization.getLanguageTag())
|
|
1181
1186
|
]);
|
|
1182
1187
|
};
|
|
1183
1188
|
|