@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
|
@@ -758,6 +758,16 @@ sap.ui.define([
|
|
|
758
758
|
}
|
|
759
759
|
}
|
|
760
760
|
|
|
761
|
+
const aSeparateRequestRanges = that.mSeparateProperty2ReadRequest?.[sSegment];
|
|
762
|
+
if (aSeparateRequestRanges) {
|
|
763
|
+
// separate properties always operate on entities of that.aElements
|
|
764
|
+
const iIndex = that.aElements.indexOf(oValue);
|
|
765
|
+
if (aSeparateRequestRanges.some(
|
|
766
|
+
(oRange) => iIndex >= oRange.start && iIndex < oRange.end)) {
|
|
767
|
+
return undefined; // separate property request still pending
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
|
|
761
771
|
vPermissions = oValue[_Helper.getAnnotationKey(oValue, ".Permissions", sSegment)];
|
|
762
772
|
if (vPermissions === 0 || vPermissions === "None") {
|
|
763
773
|
return undefined;
|
|
@@ -783,6 +793,9 @@ sap.ui.define([
|
|
|
783
793
|
+ that.sResourcePath, sPropertyPath);
|
|
784
794
|
}
|
|
785
795
|
}
|
|
796
|
+
if (!bAgain && oValue[sSegment + "@$ui5.noData"]) {
|
|
797
|
+
return undefined; // Note: do not use null here!
|
|
798
|
+
}
|
|
786
799
|
if (!bTransient) {
|
|
787
800
|
// If there is no entity with a key predicate, try it with the cache root
|
|
788
801
|
// object (in case of SimpleCache, the root object of CollectionCache is an
|
|
@@ -1128,32 +1141,6 @@ sap.ui.define([
|
|
|
1128
1141
|
* @public
|
|
1129
1142
|
*/
|
|
1130
1143
|
|
|
1131
|
-
/**
|
|
1132
|
-
* Returns an array containing all current elements of a collection or single cache for the
|
|
1133
|
-
* given relative path; the array is annotated with the collection's $count. If there are
|
|
1134
|
-
* pending requests, the corresponding promises will be ignored and set to
|
|
1135
|
-
* <code>undefined</code>.
|
|
1136
|
-
*
|
|
1137
|
-
* @param {string} [sPath]
|
|
1138
|
-
* Relative path to drill-down into, may be empty (only for collection cache)
|
|
1139
|
-
* @returns {object[]} The cache elements
|
|
1140
|
-
*
|
|
1141
|
-
* @public
|
|
1142
|
-
*/
|
|
1143
|
-
_Cache.prototype.getAllElements = function (sPath) {
|
|
1144
|
-
var aAllElements;
|
|
1145
|
-
|
|
1146
|
-
if (sPath) {
|
|
1147
|
-
return this.getValue(sPath);
|
|
1148
|
-
}
|
|
1149
|
-
aAllElements = this.aElements.map(function (oElement) {
|
|
1150
|
-
return oElement instanceof SyncPromise ? undefined : oElement;
|
|
1151
|
-
});
|
|
1152
|
-
aAllElements.$count = this.aElements.$count;
|
|
1153
|
-
|
|
1154
|
-
return aAllElements;
|
|
1155
|
-
};
|
|
1156
|
-
|
|
1157
1144
|
/**
|
|
1158
1145
|
* Returns the collection at the given path and removes it from the cache if it is marked as
|
|
1159
1146
|
* transferable.
|
|
@@ -1242,6 +1229,34 @@ sap.ui.define([
|
|
|
1242
1229
|
this.getDownloadQueryOptions(mQueryOptions), false, true);
|
|
1243
1230
|
};
|
|
1244
1231
|
|
|
1232
|
+
/**
|
|
1233
|
+
* Returns an array containing elements of a collection or single cache for the given relative
|
|
1234
|
+
* path; the array is annotated with the collection's $count. If no range is given, all elements
|
|
1235
|
+
* are returned. If there are pending requests, the corresponding promises will be ignored and
|
|
1236
|
+
* set to <code>undefined</code>.
|
|
1237
|
+
*
|
|
1238
|
+
* @param {string} [sPath]
|
|
1239
|
+
* Relative path to drill-down into, may be empty (only for collection cache)
|
|
1240
|
+
* @param {number} [iStart]
|
|
1241
|
+
* The start index of the range (inclusive)
|
|
1242
|
+
* @param {number} [iEnd]
|
|
1243
|
+
* The end index of the range (exclusive)
|
|
1244
|
+
* @returns {object[]|undefined} The cache elements
|
|
1245
|
+
*
|
|
1246
|
+
* @public
|
|
1247
|
+
*/
|
|
1248
|
+
_Cache.prototype.getElements = function (sPath, iStart, iEnd) {
|
|
1249
|
+
const aElements = this.getValue(sPath);
|
|
1250
|
+
if (!aElements) {
|
|
1251
|
+
return undefined;
|
|
1252
|
+
}
|
|
1253
|
+
const aFilteredElements = aElements.slice(iStart, iEnd)
|
|
1254
|
+
.map((oElement) => (oElement instanceof SyncPromise ? undefined : oElement));
|
|
1255
|
+
aFilteredElements.$count = aElements.$count;
|
|
1256
|
+
|
|
1257
|
+
return aFilteredElements;
|
|
1258
|
+
};
|
|
1259
|
+
|
|
1245
1260
|
/**
|
|
1246
1261
|
* Returns the query options for late properties.
|
|
1247
1262
|
*
|
|
@@ -2549,12 +2564,14 @@ sap.ui.define([
|
|
|
2549
2564
|
* The deep resource path to be used to build the target path for bound messages
|
|
2550
2565
|
* @param {boolean} [bSharedRequest]
|
|
2551
2566
|
* If this parameter is set, the cache is read-only and modifying calls lead to an error.
|
|
2567
|
+
* @param {string[]} [aSeparateProperties]
|
|
2568
|
+
* An array of properties which are requested separately
|
|
2552
2569
|
*
|
|
2553
2570
|
* @alias sap.ui.model.odata.v4.lib._CollectionCache
|
|
2554
2571
|
* @constructor
|
|
2555
2572
|
*/
|
|
2556
2573
|
function _CollectionCache(oRequestor, sResourcePath, mQueryOptions, bSortExpandSelect,
|
|
2557
|
-
sDeepResourcePath, bSharedRequest) {
|
|
2574
|
+
sDeepResourcePath, bSharedRequest, aSeparateProperties) {
|
|
2558
2575
|
_Cache.call(this, oRequestor, sResourcePath, mQueryOptions, bSortExpandSelect,
|
|
2559
2576
|
sDeepResourcePath, bSharedRequest);
|
|
2560
2577
|
|
|
@@ -2578,6 +2595,12 @@ sap.ui.define([
|
|
|
2578
2595
|
// - iStart: the start (inclusive)
|
|
2579
2596
|
// - iEnd: the end (exclusive)
|
|
2580
2597
|
this.aReadRequests = [];
|
|
2598
|
+
this.aSeparateProperties = aSeparateProperties ?? []; // properties to be loaded separately
|
|
2599
|
+
// maps separate property to an array of requested $skip/$top ranges (see aReadRequests)
|
|
2600
|
+
this.mSeparateProperty2ReadRequest = {};
|
|
2601
|
+
this.aSeparateProperties.forEach((sProperty) => {
|
|
2602
|
+
this.mSeparateProperty2ReadRequest[sProperty] = [];
|
|
2603
|
+
});
|
|
2581
2604
|
this.bServerDrivenPaging = false;
|
|
2582
2605
|
this.oSyncPromiseAll = undefined;
|
|
2583
2606
|
}
|
|
@@ -2718,6 +2741,8 @@ sap.ui.define([
|
|
|
2718
2741
|
that = this;
|
|
2719
2742
|
|
|
2720
2743
|
oGroupLock.unlock();
|
|
2744
|
+
that.registerChangeListener(sPath, oListener);
|
|
2745
|
+
|
|
2721
2746
|
if (this.aElements.$byPredicate[sFirstSegment]) {
|
|
2722
2747
|
oSyncPromise = SyncPromise.resolve(); // sync access possible
|
|
2723
2748
|
} else if ((oGroupLock === _GroupLock.$cached || sFirstSegment !== "$count")
|
|
@@ -2737,9 +2762,6 @@ sap.ui.define([
|
|
|
2737
2762
|
}
|
|
2738
2763
|
|
|
2739
2764
|
return oSyncPromise.then(function () {
|
|
2740
|
-
// register afterwards to avoid that updateExisting fires updates before the first
|
|
2741
|
-
// response
|
|
2742
|
-
that.registerChangeListener(sPath, oListener);
|
|
2743
2765
|
return that.drillDown(that.aElements, sPath, oGroupLock, bCreateOnDemand);
|
|
2744
2766
|
});
|
|
2745
2767
|
};
|
|
@@ -2823,17 +2845,41 @@ sap.ui.define([
|
|
|
2823
2845
|
* Returns the query string with $filter adjusted as needed to exclude non-transient created
|
|
2824
2846
|
* elements (which have all key properties available).
|
|
2825
2847
|
*
|
|
2848
|
+
* @param {string} [sSeparateProperty]
|
|
2849
|
+
* If set, only expand the given property; types must already be available (see #getTypes) to
|
|
2850
|
+
* determine the origin's key properties
|
|
2826
2851
|
* @returns {string}
|
|
2827
2852
|
* The query string; it is empty if there are no options; it starts with "?" otherwise
|
|
2828
2853
|
*
|
|
2829
2854
|
* @private
|
|
2830
2855
|
*/
|
|
2831
|
-
_CollectionCache.prototype.getQueryString = function () {
|
|
2856
|
+
_CollectionCache.prototype.getQueryString = function (sSeparateProperty) {
|
|
2832
2857
|
var sExclusiveFilter = this.getExclusiveFilter(),
|
|
2833
2858
|
mQueryOptions = Object.assign({}, this.mQueryOptions),
|
|
2834
2859
|
sFilterOptions = mQueryOptions.$filter,
|
|
2835
2860
|
sQueryString = this.sQueryString;
|
|
2836
2861
|
|
|
2862
|
+
if (this.aSeparateProperties.length) {
|
|
2863
|
+
if (sSeparateProperty) {
|
|
2864
|
+
delete mQueryOptions.$count;
|
|
2865
|
+
mQueryOptions.$expand = {
|
|
2866
|
+
[sSeparateProperty] : mQueryOptions.$expand[sSeparateProperty]
|
|
2867
|
+
};
|
|
2868
|
+
mQueryOptions.$select = [];
|
|
2869
|
+
_Helper.selectKeyProperties(mQueryOptions, this.getTypes()[this.sMetaPath]);
|
|
2870
|
+
} else {
|
|
2871
|
+
mQueryOptions.$expand = {...mQueryOptions.$expand};
|
|
2872
|
+
this.aSeparateProperties.forEach((sProperty) => {
|
|
2873
|
+
delete mQueryOptions.$expand[sProperty];
|
|
2874
|
+
});
|
|
2875
|
+
if (_Helper.isEmptyObject(mQueryOptions.$expand)) {
|
|
2876
|
+
delete mQueryOptions.$expand;
|
|
2877
|
+
}
|
|
2878
|
+
}
|
|
2879
|
+
sQueryString = this.oRequestor.buildQueryString(this.sMetaPath, mQueryOptions, false,
|
|
2880
|
+
this.bSortExpandSelect, true);
|
|
2881
|
+
}
|
|
2882
|
+
|
|
2837
2883
|
if (sExclusiveFilter) {
|
|
2838
2884
|
if (sFilterOptions) {
|
|
2839
2885
|
mQueryOptions.$filter = "(" + sFilterOptions + ") and " + sExclusiveFilter;
|
|
@@ -2855,6 +2901,9 @@ sap.ui.define([
|
|
|
2855
2901
|
* The start index of the range
|
|
2856
2902
|
* @param {number} iEnd
|
|
2857
2903
|
* The index after the last element
|
|
2904
|
+
* @param {string} [sSeparateProperty]
|
|
2905
|
+
* If set, only expand the given property; types must already be available (see #getTypes) to
|
|
2906
|
+
* determine the origin's key properties
|
|
2858
2907
|
* @returns {string}
|
|
2859
2908
|
* The resource path including the query string
|
|
2860
2909
|
* @throws {Error}
|
|
@@ -2862,9 +2911,10 @@ sap.ui.define([
|
|
|
2862
2911
|
*
|
|
2863
2912
|
* @private
|
|
2864
2913
|
*/
|
|
2865
|
-
_CollectionCache.prototype.getResourcePathWithQuery = function (iStart, iEnd
|
|
2914
|
+
_CollectionCache.prototype.getResourcePathWithQuery = function (iStart, iEnd,
|
|
2915
|
+
sSeparateProperty) {
|
|
2866
2916
|
var iCreated = this.aElements.$created,
|
|
2867
|
-
sQueryString = this.getQueryString(),
|
|
2917
|
+
sQueryString = this.getQueryString(sSeparateProperty),
|
|
2868
2918
|
sDelimiter = sQueryString ? "&" : "?",
|
|
2869
2919
|
iExpectedLength = iEnd - iStart,
|
|
2870
2920
|
sResourcePath = this.sResourcePath + sQueryString;
|
|
@@ -3029,6 +3079,11 @@ sap.ui.define([
|
|
|
3029
3079
|
throw new Error("Modified on client and on server: "
|
|
3030
3080
|
+ this.sResourcePath + sPredicate);
|
|
3031
3081
|
} // else: ETag changed, ignore kept element!
|
|
3082
|
+
|
|
3083
|
+
const iIndex = aElements.indexOf(oKeptElement);
|
|
3084
|
+
if (iIndex >= 0 && iIndex !== iStart + i - iOffset) {
|
|
3085
|
+
throw new Error("Duplicate predicate: " + sPredicate);
|
|
3086
|
+
}
|
|
3032
3087
|
}
|
|
3033
3088
|
aElements.$byPredicate[sPredicate] = oElement;
|
|
3034
3089
|
}
|
|
@@ -3489,12 +3544,66 @@ sap.ui.define([
|
|
|
3489
3544
|
that.aReadRequests.splice(that.aReadRequests.indexOf(oReadRequest), 1);
|
|
3490
3545
|
});
|
|
3491
3546
|
|
|
3547
|
+
this.requestSeparateProperties(iStart, iEnd, oPromise);
|
|
3548
|
+
|
|
3492
3549
|
// Note: oPromise MUST be a SyncPromise for performance reasons, see SyncPromise#all
|
|
3493
3550
|
this.fill(oPromise, iStart, iEnd);
|
|
3494
3551
|
|
|
3495
3552
|
return oPromise;
|
|
3496
3553
|
};
|
|
3497
3554
|
|
|
3555
|
+
/**
|
|
3556
|
+
* Requests the separate properties for the given range and merges them into the aElements list.
|
|
3557
|
+
*
|
|
3558
|
+
* @param {number} iStart
|
|
3559
|
+
* The start index of the range
|
|
3560
|
+
* @param {number} iEnd
|
|
3561
|
+
* The index after the last element
|
|
3562
|
+
* @param {sap.ui.base.SyncPromise} oMainPromise
|
|
3563
|
+
* A promise which is resolved when the main request is finished
|
|
3564
|
+
* @returns {Promise<void>}
|
|
3565
|
+
* A promise which is resolved without a defined result at no defined point in time
|
|
3566
|
+
*
|
|
3567
|
+
* @private
|
|
3568
|
+
*/
|
|
3569
|
+
_CollectionCache.prototype.requestSeparateProperties = async function (iStart, iEnd,
|
|
3570
|
+
oMainPromise) {
|
|
3571
|
+
if (!this.aSeparateProperties.length) {
|
|
3572
|
+
return;
|
|
3573
|
+
}
|
|
3574
|
+
|
|
3575
|
+
// types are needed for selecting the key properties, see #getQueryString called by
|
|
3576
|
+
// #getResourcePathWithQuery
|
|
3577
|
+
const oTypes = await this.fetchTypes();
|
|
3578
|
+
const oReadRange = {start : iStart, end : iEnd};
|
|
3579
|
+
const aRequestPromises = this.aSeparateProperties.map((sProperty) => {
|
|
3580
|
+
this.mSeparateProperty2ReadRequest[sProperty].push(oReadRange);
|
|
3581
|
+
return this.oRequestor.request("GET",
|
|
3582
|
+
this.getResourcePathWithQuery(iStart, iEnd, sProperty),
|
|
3583
|
+
this.oRequestor.lockGroup("$single", this));
|
|
3584
|
+
});
|
|
3585
|
+
|
|
3586
|
+
await oMainPromise;
|
|
3587
|
+
aRequestPromises.forEach(async (oRequestPromise, i) => {
|
|
3588
|
+
const oResult = await oRequestPromise;
|
|
3589
|
+
const sProperty = this.aSeparateProperties[i];
|
|
3590
|
+
const iRangeIndex = this.mSeparateProperty2ReadRequest[sProperty].indexOf(oReadRange);
|
|
3591
|
+
if (iRangeIndex < 0) { // stop import after #reset
|
|
3592
|
+
return;
|
|
3593
|
+
}
|
|
3594
|
+
this.mSeparateProperty2ReadRequest[sProperty].splice(iRangeIndex, 1);
|
|
3595
|
+
this.visitResponse(oResult, oTypes, undefined, undefined, iStart);
|
|
3596
|
+
for (const oSeparateData of oResult.value) {
|
|
3597
|
+
const sPredicate = _Helper.getPrivateAnnotation(oSeparateData, "predicate");
|
|
3598
|
+
const oElement = this.aElements.$byPredicate[sPredicate];
|
|
3599
|
+
if (oElement) {
|
|
3600
|
+
_Helper.updateSelected(this.mChangeListeners, sPredicate, oElement,
|
|
3601
|
+
oSeparateData, [sProperty]);
|
|
3602
|
+
}
|
|
3603
|
+
}
|
|
3604
|
+
});
|
|
3605
|
+
};
|
|
3606
|
+
|
|
3498
3607
|
/**
|
|
3499
3608
|
* Returns a promise to be resolved when the side effects have been applied to the elements
|
|
3500
3609
|
* with the given key predicates. All other elements from the back end are discarded!
|
|
@@ -3711,6 +3820,9 @@ sap.ui.define([
|
|
|
3711
3820
|
this.aReadRequests?.forEach((oReadRequest) => {
|
|
3712
3821
|
oReadRequest.bObsolete = true;
|
|
3713
3822
|
});
|
|
3823
|
+
for (const sProperty in this.mSeparateProperty2ReadRequest) {
|
|
3824
|
+
this.mSeparateProperty2ReadRequest[sProperty] = [];
|
|
3825
|
+
}
|
|
3714
3826
|
if (mChangeListeners[""]) {
|
|
3715
3827
|
this.mChangeListeners[""] = mChangeListeners[""];
|
|
3716
3828
|
_Helper.fireChange(this.mChangeListeners, "");
|
|
@@ -3881,8 +3993,9 @@ sap.ui.define([
|
|
|
3881
3993
|
this.sResourcePath + this.sQueryString, oGroupLock, undefined, undefined,
|
|
3882
3994
|
fnDataRequested, undefined, this.sMetaPath));
|
|
3883
3995
|
}
|
|
3996
|
+
that.registerChangeListener("", oListener);
|
|
3997
|
+
|
|
3884
3998
|
return this.oPromise.then(function (oResult) {
|
|
3885
|
-
that.registerChangeListener("", oListener);
|
|
3886
3999
|
// Note: For a null value, null is returned due to "204 No Content". For $count,
|
|
3887
4000
|
// "a simple primitive integer value with media type text/plain" is returned.
|
|
3888
4001
|
return oResult && typeof oResult === "object" ? oResult.value : oResult;
|
|
@@ -3924,7 +4037,7 @@ sap.ui.define([
|
|
|
3924
4037
|
* @param {boolean} [bPost]
|
|
3925
4038
|
* Whether the cache uses POST requests. If <code>true</code>, the initial request must be
|
|
3926
4039
|
* done via {@link #post}. {@link #fetchValue} expects to have cache data, but may initiate
|
|
3927
|
-
* requests for late properties. If <code>false
|
|
4040
|
+
* requests for late properties. If <code>false</code>, {@link #post} throws an error.
|
|
3928
4041
|
* @param {string} [sMetaPath]
|
|
3929
4042
|
* Optional meta path in case it cannot be derived from the given resource path
|
|
3930
4043
|
* @param {boolean} [bEmpty]
|
|
@@ -4426,13 +4539,15 @@ sap.ui.define([
|
|
|
4426
4539
|
* If this parameter is set, multiple requests for a cache using the same resource path will
|
|
4427
4540
|
* always return the same, shared cache. This cache is read-only, modifying calls lead to an
|
|
4428
4541
|
* error.
|
|
4542
|
+
* @param {string[]} [aSeparateProperties]
|
|
4543
|
+
* An array of properties which are requested separately
|
|
4429
4544
|
* @returns {sap.ui.model.odata.v4.lib._Cache}
|
|
4430
4545
|
* The cache
|
|
4431
4546
|
*
|
|
4432
4547
|
* @public
|
|
4433
4548
|
*/
|
|
4434
4549
|
_Cache.create = function (oRequestor, sResourcePath, mQueryOptions, bSortExpandSelect,
|
|
4435
|
-
sDeepResourcePath, bSharedRequest) {
|
|
4550
|
+
sDeepResourcePath, bSharedRequest, aSeparateProperties) {
|
|
4436
4551
|
var iCount, aKeys, sPath, oSharedCollectionCache, mSharedCollectionCacheByPath;
|
|
4437
4552
|
|
|
4438
4553
|
if (bSharedRequest) {
|
|
@@ -4469,7 +4584,7 @@ sap.ui.define([
|
|
|
4469
4584
|
}
|
|
4470
4585
|
|
|
4471
4586
|
return new _CollectionCache(oRequestor, sResourcePath, mQueryOptions, bSortExpandSelect,
|
|
4472
|
-
sDeepResourcePath);
|
|
4587
|
+
sDeepResourcePath, bSharedRequest, aSeparateProperties);
|
|
4473
4588
|
};
|
|
4474
4589
|
|
|
4475
4590
|
/**
|
|
@@ -6,14 +6,18 @@
|
|
|
6
6
|
|
|
7
7
|
//Provides class sap.ui.model.odata.v4.lib._Helper
|
|
8
8
|
sap.ui.define([
|
|
9
|
+
"./_Parser",
|
|
9
10
|
"sap/base/Log",
|
|
10
11
|
"sap/base/util/deepEqual",
|
|
11
12
|
"sap/base/util/isEmptyObject",
|
|
12
13
|
"sap/base/util/merge",
|
|
13
14
|
"sap/base/util/uid",
|
|
14
15
|
"sap/ui/base/SyncPromise",
|
|
16
|
+
"sap/ui/model/Filter",
|
|
17
|
+
"sap/ui/model/FilterOperator",
|
|
15
18
|
"sap/ui/thirdparty/URI"
|
|
16
|
-
], function (Log, deepEqual, isEmptyObject, merge, uid, SyncPromise,
|
|
19
|
+
], function (_Parser, Log, deepEqual, isEmptyObject, merge, uid, SyncPromise, Filter,
|
|
20
|
+
FilterOperator, URI) {
|
|
17
21
|
"use strict";
|
|
18
22
|
|
|
19
23
|
var rAmpersand = /&/g,
|
|
@@ -691,7 +695,7 @@ sap.ui.define([
|
|
|
691
695
|
|
|
692
696
|
/**
|
|
693
697
|
* Drills down into the given object according to the given path, creating missing objects
|
|
694
|
-
* along the way, and setting a
|
|
698
|
+
* along the way, and setting a "...@$ui5.noData" annotation at the end in case the final
|
|
695
699
|
* property is missing.
|
|
696
700
|
*
|
|
697
701
|
* @param {object} oObject
|
|
@@ -707,7 +711,12 @@ sap.ui.define([
|
|
|
707
711
|
createMissing : function (oObject, aSegments) {
|
|
708
712
|
aSegments.reduce(function (oCurrent, sSegment, i) {
|
|
709
713
|
if (!(sSegment in oCurrent)) { // Note: TypeError if !oCurrent
|
|
710
|
-
|
|
714
|
+
if (i + 1 < aSegments.length) {
|
|
715
|
+
oCurrent[sSegment] = {};
|
|
716
|
+
} else {
|
|
717
|
+
oCurrent[sSegment] = undefined;
|
|
718
|
+
oCurrent[sSegment + "@$ui5.noData"] = true;
|
|
719
|
+
}
|
|
711
720
|
}
|
|
712
721
|
return oCurrent[sSegment];
|
|
713
722
|
}, oObject);
|
|
@@ -1404,6 +1413,52 @@ sap.ui.define([
|
|
|
1404
1413
|
return _Helper.getAnnotation(oMessage, ".ContentID");
|
|
1405
1414
|
},
|
|
1406
1415
|
|
|
1416
|
+
/**
|
|
1417
|
+
* Calculates the filter for the given key predicate.
|
|
1418
|
+
*
|
|
1419
|
+
* @param {string} sPredicate - The key predicate (for example, of a message target)
|
|
1420
|
+
* @param {object} oEntityType - The metadata for the entity type
|
|
1421
|
+
* @param {sap.ui.model.odata.v4.ODataMetaModel} oMetaModel - The meta model
|
|
1422
|
+
* @param {string} sMetaPath - The meta path to the entity type
|
|
1423
|
+
* @param {boolean} [bIgnore$Key]
|
|
1424
|
+
* Whether to ignore the entity type's $Key, except to resolve an unnamed key like ('42');
|
|
1425
|
+
* this allows for fake predicates with non-key properties as used for data aggregation
|
|
1426
|
+
* @returns {sap.ui.model.Filter} A filter for the given key predicate
|
|
1427
|
+
*
|
|
1428
|
+
* @public
|
|
1429
|
+
*/
|
|
1430
|
+
getFilterForPredicate : function (sPredicate, oEntityType, oMetaModel,
|
|
1431
|
+
sMetaPath, bIgnore$Key) {
|
|
1432
|
+
var aFilters,
|
|
1433
|
+
mValueByKeyOrAlias = _Parser.parseKeyPredicate(sPredicate);
|
|
1434
|
+
|
|
1435
|
+
if ("" in mValueByKeyOrAlias) {
|
|
1436
|
+
// unnamed key e.g. {"" : ('42')} => replace it by the name of the only key property
|
|
1437
|
+
mValueByKeyOrAlias[oEntityType.$Key[0]] = mValueByKeyOrAlias[""];
|
|
1438
|
+
delete mValueByKeyOrAlias[""];
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
aFilters = (bIgnore$Key ? Object.keys(mValueByKeyOrAlias) : oEntityType.$Key)
|
|
1442
|
+
.map(function (vKey) {
|
|
1443
|
+
var sKeyOrAlias, sKeyPath;
|
|
1444
|
+
|
|
1445
|
+
if (typeof vKey === "string") {
|
|
1446
|
+
sKeyPath = sKeyOrAlias = vKey;
|
|
1447
|
+
} else {
|
|
1448
|
+
sKeyOrAlias = Object.keys(vKey)[0]; // alias
|
|
1449
|
+
sKeyPath = vKey[sKeyOrAlias];
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
return new Filter(sKeyPath, FilterOperator.EQ,
|
|
1453
|
+
_Helper.parseLiteral(decodeURIComponent(mValueByKeyOrAlias[sKeyOrAlias]),
|
|
1454
|
+
oMetaModel.getObject(sMetaPath + "/" + sKeyPath + "/$Type"), sKeyPath));
|
|
1455
|
+
});
|
|
1456
|
+
|
|
1457
|
+
return aFilters.length === 1
|
|
1458
|
+
? aFilters[0]
|
|
1459
|
+
: new Filter({and : true, filters : aFilters});
|
|
1460
|
+
},
|
|
1461
|
+
|
|
1407
1462
|
/**
|
|
1408
1463
|
* Returns a filter identifying the given instance via its key properties.
|
|
1409
1464
|
*
|
|
@@ -1824,7 +1879,7 @@ sap.ui.define([
|
|
|
1824
1879
|
/**
|
|
1825
1880
|
* Inherits a property value according to the given path from the given source object to the
|
|
1826
1881
|
* given target. That is, the value is copied unless the target already has a value. Creates
|
|
1827
|
-
* missing objects along the way.
|
|
1882
|
+
* missing objects along the way. Copies a "...@$ui5.noData" annotation at the property.
|
|
1828
1883
|
*
|
|
1829
1884
|
* Like the following, but for paths ;-)
|
|
1830
1885
|
* if (!(sProperty in oTarget)) {
|
|
@@ -1858,6 +1913,9 @@ sap.ui.define([
|
|
|
1858
1913
|
oSource = oSource[sSegment];
|
|
1859
1914
|
oTarget = oTarget[sSegment];
|
|
1860
1915
|
} else if (bMissing) {
|
|
1916
|
+
if (oSource[sSegment + "@$ui5.noData"]) {
|
|
1917
|
+
oTarget[sSegment + "@$ui5.noData"] = true;
|
|
1918
|
+
}
|
|
1861
1919
|
oTarget[sSegment] = oSource[sSegment];
|
|
1862
1920
|
}
|
|
1863
1921
|
});
|
|
@@ -2230,9 +2288,11 @@ sap.ui.define([
|
|
|
2230
2288
|
* @param {string} [sOrderby]
|
|
2231
2289
|
* The new value for the query option "$orderby"
|
|
2232
2290
|
* @param {string[]} [aFilters]
|
|
2233
|
-
* An array that consists of
|
|
2234
|
-
*
|
|
2235
|
-
*
|
|
2291
|
+
* An array that consists of three filters where each can be <code>undefined</code>. The
|
|
2292
|
+
* first one ("$filter") has to be applied after data aggregation. The second one
|
|
2293
|
+
* ("$$filterBeforeAggregate") can be applied before data aggregation. The third one
|
|
2294
|
+
* ("$$filterOnAggregate") has to be applied before data aggregation and already contains
|
|
2295
|
+
* the special syntax "$these/aggregate(...)" because it relates to aggregates.
|
|
2236
2296
|
* @returns {object}
|
|
2237
2297
|
* The merged map of query options
|
|
2238
2298
|
*
|
|
@@ -2242,8 +2302,8 @@ sap.ui.define([
|
|
|
2242
2302
|
var mResult;
|
|
2243
2303
|
|
|
2244
2304
|
function set(sProperty, sValue) {
|
|
2245
|
-
if (sValue &&
|
|
2246
|
-
mResult ??= mQueryOptions
|
|
2305
|
+
if (sValue && mQueryOptions?.[sProperty] !== sValue) {
|
|
2306
|
+
mResult ??= {...mQueryOptions};
|
|
2247
2307
|
mResult[sProperty] = sValue;
|
|
2248
2308
|
}
|
|
2249
2309
|
}
|
|
@@ -2252,6 +2312,7 @@ sap.ui.define([
|
|
|
2252
2312
|
if (aFilters) {
|
|
2253
2313
|
set("$filter", aFilters[0]);
|
|
2254
2314
|
set("$$filterBeforeAggregate", aFilters[1]);
|
|
2315
|
+
set("$$filterOnAggregate", aFilters[2]);
|
|
2255
2316
|
}
|
|
2256
2317
|
return mResult || mQueryOptions;
|
|
2257
2318
|
},
|
|
@@ -91,6 +91,7 @@ sap.ui.define([
|
|
|
91
91
|
this.oModelInterface = oModelInterface;
|
|
92
92
|
this.oOptimisticBatch = null; // optimistic batch processing off
|
|
93
93
|
this.sQueryParams = _Helper.buildQuery(mQueryParams); // Used for $batch and CSRF token only
|
|
94
|
+
this.oRetryAfterPromise = null;
|
|
94
95
|
this.mRunningChangeRequests = {}; // map from group ID to a SyncPromise[]
|
|
95
96
|
this.iSessionTimer = 0;
|
|
96
97
|
this.iSerialNumber = 0;
|
|
@@ -1396,7 +1397,7 @@ sap.ui.define([
|
|
|
1396
1397
|
// methods it must be possible to insert the ETag from the header
|
|
1397
1398
|
oResponse = vRequest.method === "GET" ? null : {};
|
|
1398
1399
|
}
|
|
1399
|
-
that.reportHeaderMessages(vRequest
|
|
1400
|
+
that.reportHeaderMessages(vRequest.$resourcePath,
|
|
1400
1401
|
getResponseHeader.call(vResponse, "sap-messages"));
|
|
1401
1402
|
sETag = getResponseHeader.call(vResponse, "ETag");
|
|
1402
1403
|
if (sETag) {
|
|
@@ -1425,6 +1426,7 @@ sap.ui.define([
|
|
|
1425
1426
|
"HTTP request was not processed because $batch failed");
|
|
1426
1427
|
|
|
1427
1428
|
oRequestError.cause = oError;
|
|
1429
|
+
oRequestError.$reported = true; // do not create a message for this error
|
|
1428
1430
|
reject(oRequestError, aRequests);
|
|
1429
1431
|
throw oError;
|
|
1430
1432
|
}).finally(function () {
|
|
@@ -1568,7 +1570,9 @@ sap.ui.define([
|
|
|
1568
1570
|
/**
|
|
1569
1571
|
* Returns a promise that will be resolved once the CSRF token has been refreshed, or rejected
|
|
1570
1572
|
* if that fails. Makes sure that only one HEAD request is underway at any given time and
|
|
1571
|
-
* shares the promise accordingly.
|
|
1573
|
+
* shares the promise accordingly. If the HEAD request fails with a 503 HTTP status code and
|
|
1574
|
+
* a "Retry-After" response header, the promise is also resolved because the next request (in
|
|
1575
|
+
* {@link #sendRequest}) will also fail with 503 and is handled there.
|
|
1572
1576
|
*
|
|
1573
1577
|
* @param {string} [sOldSecurityToken]
|
|
1574
1578
|
* Security token that caused a 403. A new token is only fetched if the old one is still
|
|
@@ -1611,7 +1615,12 @@ sap.ui.define([
|
|
|
1611
1615
|
fnResolve();
|
|
1612
1616
|
}, function (jqXHR) {
|
|
1613
1617
|
that.oSecurityTokenPromise = null;
|
|
1614
|
-
|
|
1618
|
+
if (jqXHR.status === 503 && jqXHR.getResponseHeader("Retry-After")) {
|
|
1619
|
+
fnResolve();
|
|
1620
|
+
} else {
|
|
1621
|
+
fnReject(
|
|
1622
|
+
_Helper.createError(jqXHR, "Could not refresh security token"));
|
|
1623
|
+
}
|
|
1615
1624
|
});
|
|
1616
1625
|
});
|
|
1617
1626
|
}
|
|
@@ -1891,7 +1900,7 @@ sap.ui.define([
|
|
|
1891
1900
|
aRequests[iChangeSetNo].push(oRequest);
|
|
1892
1901
|
}
|
|
1893
1902
|
if (sGroupId === "$single") {
|
|
1894
|
-
that.submitBatch("$single");
|
|
1903
|
+
that.submitBatch("$single").catch(that.oModelInterface.getReporter());
|
|
1895
1904
|
}
|
|
1896
1905
|
});
|
|
1897
1906
|
oRequest.$promise = oPromise;
|
|
@@ -1913,7 +1922,7 @@ sap.ui.define([
|
|
|
1913
1922
|
sMethod === "GET" ? {"sap-cancel-on-close" : "true"} : undefined),
|
|
1914
1923
|
JSON.stringify(oPayload), sOriginalResourcePath
|
|
1915
1924
|
).then(function (oResponse) {
|
|
1916
|
-
that.reportHeaderMessages(
|
|
1925
|
+
that.reportHeaderMessages(sOriginalResourcePath, oResponse.messages);
|
|
1917
1926
|
return that.doConvertResponse(
|
|
1918
1927
|
// Note: "text/plain" used for $count
|
|
1919
1928
|
typeof oResponse.body === "string" ? JSON.parse(oResponse.body) : oResponse.body,
|
|
@@ -2025,7 +2034,7 @@ sap.ui.define([
|
|
|
2025
2034
|
if (that.bWithCredentials) {
|
|
2026
2035
|
oAjaxSettings.xhrFields = {withCredentials : true};
|
|
2027
2036
|
}
|
|
2028
|
-
|
|
2037
|
+
jQuery.ajax(sRequestUrl, oAjaxSettings)
|
|
2029
2038
|
.then(function (/*{object|string}*/vResponse, _sTextStatus, jqXHR) {
|
|
2030
2039
|
var sETag = jqXHR.getResponseHeader("ETag"),
|
|
2031
2040
|
sCsrfToken = jqXHR.getResponseHeader("X-CSRF-Token");
|
|
@@ -2072,6 +2081,27 @@ sap.ui.define([
|
|
|
2072
2081
|
that.refreshSecurityToken(sOldCsrfToken).then(function () {
|
|
2073
2082
|
send(true);
|
|
2074
2083
|
}, fnReject);
|
|
2084
|
+
} else if (jqXHR.status === 503 && jqXHR.getResponseHeader("Retry-After")
|
|
2085
|
+
&& (that.oRetryAfterPromise
|
|
2086
|
+
|| that.oModelInterface.getRetryAfterHandler())) {
|
|
2087
|
+
if (!that.oRetryAfterPromise) {
|
|
2088
|
+
const oRetryAfterError = _Helper.createError(jqXHR, "");
|
|
2089
|
+
that.oRetryAfterPromise = that.oModelInterface.getRetryAfterHandler()(
|
|
2090
|
+
oRetryAfterError);
|
|
2091
|
+
that.oRetryAfterPromise.finally(() => {
|
|
2092
|
+
that.oRetryAfterPromise = null;
|
|
2093
|
+
}).catch(() => { /* catch is only needed due to finally */ });
|
|
2094
|
+
that.oRetryAfterPromise.catch((oError) => {
|
|
2095
|
+
// own error reason is not reported to the message model
|
|
2096
|
+
if (oError === oRetryAfterError) {
|
|
2097
|
+
that.oModelInterface
|
|
2098
|
+
.reportError(oError.message, sClassName, oError);
|
|
2099
|
+
} else {
|
|
2100
|
+
oError.$reported = true;
|
|
2101
|
+
}
|
|
2102
|
+
});
|
|
2103
|
+
}
|
|
2104
|
+
that.oRetryAfterPromise.then(send, fnReject);
|
|
2075
2105
|
} else {
|
|
2076
2106
|
sMessage = "Communication error";
|
|
2077
2107
|
if (sContextId) {
|
|
@@ -2091,7 +2121,9 @@ sap.ui.define([
|
|
|
2091
2121
|
});
|
|
2092
2122
|
}
|
|
2093
2123
|
|
|
2094
|
-
if (that.
|
|
2124
|
+
if (that.oRetryAfterPromise) {
|
|
2125
|
+
that.oRetryAfterPromise.then(send, fnReject);
|
|
2126
|
+
} else if (that.oSecurityTokenPromise && sMethod !== "GET") {
|
|
2095
2127
|
that.oSecurityTokenPromise.then(send);
|
|
2096
2128
|
} else {
|
|
2097
2129
|
send();
|
|
@@ -2309,11 +2341,16 @@ sap.ui.define([
|
|
|
2309
2341
|
* A catch handler function expecting an <code>Error</code> instance. This function will call
|
|
2310
2342
|
* {@link sap.ui.model.odata.v4.ODataModel#reportError} if the error has not been reported
|
|
2311
2343
|
* yet
|
|
2344
|
+
* @param {function} oModelInterface.getRetryAfterHandler
|
|
2345
|
+
* A function that returns the "Retry-After" handler,
|
|
2346
|
+
* see also {@link sap.ui.model.odata.v4.ODataModel#setRetryAfterHandler}
|
|
2312
2347
|
* @param {function():boolean} oModelInterface.isIgnoreETag
|
|
2313
2348
|
* Tells whether an entity's ETag should be actively ignored (If-Match:*) for PATCH requests.
|
|
2314
2349
|
* @param {function} oModelInterface.onCreateGroup
|
|
2315
2350
|
* A callback function that is called with the group name as parameter when the first
|
|
2316
2351
|
* request is added to a group
|
|
2352
|
+
* @param {function} oModelInterface.reportError
|
|
2353
|
+
* A function to report OData errors
|
|
2317
2354
|
* @param {function} oModelInterface.reportStateMessages
|
|
2318
2355
|
* A function to report OData state messages
|
|
2319
2356
|
* @param {function} oModelInterface.reportTransitionMessages
|