@openui5/sap.ui.core 1.115.1 → 1.116.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/.dtsgenrc +18 -0
- package/.eslintrc.json +11 -0
- package/.reuse/dep5 +0 -5
- package/THIRDPARTY.txt +1 -7
- package/package.json +1 -1
- package/src/jquery.sap.global.js +1 -1
- 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.sjax.js +2 -2
- package/src/jquery.sap.storage.js +3 -3
- package/src/sap/base/Event.js +106 -0
- package/src/sap/base/Eventing.js +320 -0
- package/src/sap/base/config.js +1 -1
- package/src/sap/base/i18n/Formatting.js +991 -0
- package/src/sap/base/i18n/LanguageTag.js +189 -0
- package/src/sap/base/i18n/Localization.js +711 -0
- package/src/sap/base/i18n/ResourceBundle.js +5 -20
- package/src/sap/base/i18n/date/CalendarType.js +54 -0
- package/src/sap/base/i18n/date/CalendarWeekNumbering.js +105 -0
- package/src/sap/base/i18n/date/TimezoneUtils.js +287 -0
- 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 +4 -4
- package/src/sap/ui/base/Event.js +1 -1
- package/src/sap/ui/base/EventProvider.js +4 -12
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +8 -12
- package/src/sap/ui/base/ManagedObjectMetadata.js +30 -7
- 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/base/SyncPromise.js +10 -5
- package/src/sap/ui/core/.library +2 -2
- package/src/sap/ui/core/AccessKeysEnablement.js +10 -5
- package/src/sap/ui/core/AnimationMode.js +49 -0
- package/src/sap/ui/core/BusyIndicator.js +33 -42
- package/src/sap/ui/core/CalendarType.js +11 -37
- package/src/sap/ui/core/Component.js +4 -5
- package/src/sap/ui/core/ComponentContainer.js +1 -1
- package/src/sap/ui/core/ComponentMetadata.js +2 -2
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Configuration.js +409 -1270
- package/src/sap/ui/core/Control.js +4 -12
- package/src/sap/ui/core/ControlBehavior.js +157 -0
- package/src/sap/ui/core/Core.js +124 -132
- 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 +14 -3
- 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 +1 -1
- 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 +1 -1
- 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 +5 -7
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +12 -12
- package/src/sap/ui/core/Item.js +1 -1
- package/src/sap/ui/core/LabelEnablement.js +1 -1
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/Lib.js +109 -22
- 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 +151 -430
- package/src/sap/ui/core/LocaleData.js +39 -11
- package/src/sap/ui/core/Manifest.js +1 -1
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/RenderManager.js +1 -1
- 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 +31 -17
- package/src/sap/ui/core/Theming.js +451 -0
- 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 +1 -1
- 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 +1 -1
- package/src/sap/ui/core/XMLTemplateProcessor.js +1 -0
- package/src/sap/ui/core/_IconRegistry.js +7 -1
- package/src/sap/ui/core/date/CalendarWeekNumbering.js +12 -83
- package/src/sap/ui/core/date/UI5Date.js +2 -2
- package/src/sap/ui/core/delegate/ItemNavigation.js +8 -10
- package/src/sap/ui/core/delegate/ScrollEnablement.js +5 -5
- 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/format/DateFormat.js +20 -15
- package/src/sap/ui/core/format/TimezoneUtil.js +15 -273
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +3 -3
- 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_cs.properties +1 -1
- package/src/sap/ui/core/messagebundle_cy.properties +1 -1
- package/src/sap/ui/core/messagebundle_da.properties +1 -1
- package/src/sap/ui/core/messagebundle_de.properties +1 -1
- package/src/sap/ui/core/messagebundle_el.properties +1 -1
- package/src/sap/ui/core/messagebundle_en.properties +1 -1
- package/src/sap/ui/core/messagebundle_en_GB.properties +1 -1
- package/src/sap/ui/core/messagebundle_es.properties +1 -1
- package/src/sap/ui/core/messagebundle_es_MX.properties +1 -1
- package/src/sap/ui/core/messagebundle_et.properties +1 -1
- package/src/sap/ui/core/messagebundle_id.properties +1 -1
- package/src/sap/ui/core/messagebundle_it.properties +49 -49
- package/src/sap/ui/core/messagebundle_iw.properties +1 -1
- package/src/sap/ui/core/messagebundle_kk.properties +1 -1
- package/src/sap/ui/core/messagebundle_ko.properties +1 -1
- package/src/sap/ui/core/messagebundle_lt.properties +1 -1
- package/src/sap/ui/core/messagebundle_lv.properties +1 -1
- package/src/sap/ui/core/messagebundle_ms.properties +8 -8
- package/src/sap/ui/core/messagebundle_nl.properties +1 -1
- package/src/sap/ui/core/messagebundle_no.properties +1 -1
- package/src/sap/ui/core/messagebundle_pl.properties +1 -1
- package/src/sap/ui/core/messagebundle_pt.properties +1 -1
- package/src/sap/ui/core/messagebundle_pt_PT.properties +1 -1
- package/src/sap/ui/core/messagebundle_ro.properties +1 -1
- package/src/sap/ui/core/messagebundle_sh.properties +1 -1
- package/src/sap/ui/core/messagebundle_sv.properties +1 -1
- package/src/sap/ui/core/messagebundle_th.properties +1 -1
- package/src/sap/ui/core/messagebundle_uk.properties +21 -21
- package/src/sap/ui/core/messagebundle_vi.properties +1 -1
- 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 +1 -1
- package/src/sap/ui/core/mvc/XMLView.js +1 -1
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/plugin/LessSupport.js +14 -16
- 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/HashChanger.js +1 -0
- package/src/sap/ui/core/routing/Route.js +1 -0
- package/src/sap/ui/core/routing/Router.js +3 -1
- package/src/sap/ui/core/rules/Config.support.js +2 -2
- package/src/sap/ui/core/rules/Model.support.js +3 -1
- 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/controls/TimelineOverview.js +1 -1
- package/src/sap/ui/core/support/plugins/ControlTree.js +2 -2
- 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/LocalBusyIndicator.less +4 -4
- package/src/sap/ui/core/themes/base/base.less +41 -20
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.ttf +0 -0
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
- package/src/sap/ui/core/theming/Parameters.js +6 -5
- package/src/sap/ui/core/theming/ThemeManager.js +310 -447
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +5 -10
- 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 +3 -1
- 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/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/events/PseudoEvents.js +17 -9
- package/src/sap/ui/model/Binding.js +19 -15
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/CompositeBinding.js +57 -19
- package/src/sap/ui/model/CompositeDataState.js +1 -1
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/DataState.js +1 -1
- package/src/sap/ui/model/ListBinding.js +42 -1
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +5 -4
- package/src/sap/ui/model/PropertyBinding.js +10 -0
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +4 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/base/ManagedObjectModel.js +1 -1
- package/src/sap/ui/model/json/JSONModel.js +1 -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 +1 -1
- 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/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 +8 -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 +3 -3
- 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/v2/Context.js +3 -2
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +14 -3
- package/src/sap/ui/model/odata/v2/ODataModel.js +45 -31
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/Context.js +7 -3
- package/src/sap/ui/model/odata/v4/ODataBinding.js +68 -39
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +12 -8
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +30 -8
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +11 -9
- package/src/sap/ui/model/odata/v4/ODataModel.js +10 -14
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +64 -31
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +21 -16
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +2 -0
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +37 -14
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +11 -1
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +7 -4
- package/src/sap/ui/model/odata/v4/lib/_V2MetadataConverter.js +4 -4
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +1 -1
- 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 +1 -1
- package/src/sap/ui/model/type/DateInterval.js +1 -1
- 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/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
- package/src/sap/ui/test/Opa5.js +1 -1
- package/src/sap/ui/test/autowaiter/_autoWaiter.js +1 -1
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/test/gherkin/simpleGherkinParser.js +10 -5
- package/src/sap/ui/test/matchers/LabelFor.js +1 -0
- package/src/sap/ui/thirdparty/caja-html-sanitizer.js +111 -96
- package/src/sap/ui/util/ActivityDetection.js +7 -1
- package/src/sap/ui/util/Mobile.js +11 -8
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader-autoconfig.js +5 -2
- package/src/ui5loader.js +169 -185
- package/test/sap/ui/core/FormatHelper.js +3 -2
- package/test/sap/ui/core/demokit/docuindex.json +6 -0
- package/test/sap/ui/core/demokit/sample/OpaBusyIndicator/OpaBusyIndicator.js +1 -1
- package/test/sap/ui/core/demokit/sample/OpaMatchers/OpaMatchers.js +2 -2
- package/test/sap/ui/core/demokit/sample/ViewTemplate/types/MIT.ODataTypes.html +9 -14
- package/test/sap/ui/core/demokit/sample/ViewTemplate/types/Opa.qunit.js +7 -0
- package/test/sap/ui/core/demokit/sample/common/pages/Any.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/DataAggregation/tests/filter.js +2 -2
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Component.js +27 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/ListReport.controller.js +43 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/ListReport.view.xml +47 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Main.controller.js +27 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Main.view.xml +7 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/NotFound.view.xml +8 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/ObjectPage.controller.js +123 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/ObjectPage.view.xml +92 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Opa.qunit.html +27 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Opa.qunit.js +69 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/README.html +55 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/SandboxModel.js +56 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/POST-SalesOrderList.json +66 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList('0500000000')-SO_2_SOITEM.json +57 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList('0500000000').json +20 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList('0500000001').json +9 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList('0500000007')-SO_2_BP.json +12 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList.json +62 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/VH_CurrencyCode.json +85 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/VH_CurrencyCode.xml +185 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/VH_ProductID.json +93 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/VH_ProductID.xml +262 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/metadata.xml +1779 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/manifest.json +134 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/pages/Main.js +119 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/pages/Main.js +0 -41
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrderTP100_V2/manifest.json +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrderTP100_V4/manifest.json +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/Main.controller.js +5 -17
- package/test/sap/ui/core/demokit/sample/odata/v4/ServerDrivenPaging/Main.view.xml +3 -3
- package/test/sap/ui/core/demokit/tutorial/odatav4/08/webapp/test/integration/arrangements/Startup.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/11/webapp/test/integration/arrangements/Startup.js +1 -1
- package/test/sap/ui/core/qunit/CompositeBinding.qunit.js +25 -7
- package/test/sap/ui/core/qunit/ControlRenderer.qunit.js +86 -2
- package/test/sap/ui/core/qunit/DataState.qunit.js +2 -7
- package/test/sap/ui/core/qunit/HTML.qunit.js +31 -31
- package/test/sap/ui/core/qunit/Lib.qunit.js +55 -2
- package/test/sap/ui/core/qunit/LocalBusyIndicator.qunit.js +22 -15
- package/test/sap/ui/core/qunit/ManagedObject.qunit.js +5 -3
- package/test/sap/ui/core/qunit/Object.qunit.js +4 -1
- package/test/sap/ui/core/qunit/ThemeManager.qunit.js +2 -2
- package/test/sap/ui/core/qunit/ThemeParameters.qunit.js +9 -3
- package/test/sap/ui/core/qunit/Theming.beforeBootstrap.qunit.js +13 -0
- package/test/sap/ui/core/qunit/Theming.qunit.js +229 -0
- package/test/sap/ui/core/qunit/analytics/AnalyticalTreeBindingAdapter.qunit.js +2 -7
- package/test/sap/ui/core/qunit/analytics/ODataModelAdapter.qunit.js +2 -7
- package/test/sap/ui/core/qunit/app/MessageListBinding.qunit.js +2 -7
- package/test/sap/ui/core/qunit/base/i18n/Formatting.qunit.html +24 -0
- package/test/sap/ui/core/qunit/base/i18n/Formatting.qunit.js +275 -0
- package/test/sap/ui/core/qunit/base/i18n/Localization.qunit.js +259 -0
- package/test/sap/ui/core/qunit/base/i18n/ResourceBundle.qunit.js +5 -6
- package/test/sap/ui/core/qunit/base/security/sanitizeHTML.qunit.js +17 -0
- package/test/sap/ui/core/qunit/bootstrap/BootstrapPreload.qunit.js +1 -2
- package/test/sap/ui/core/qunit/bootstrap/BootstrapWithCustomBootTask.beforeBootstrap.qunit.js +13 -12
- package/test/sap/ui/core/qunit/bootstrap/Configuration.qunit.js +388 -254
- package/test/sap/ui/core/qunit/bootstrap/ThemeVersion.qunit.js +19 -30
- package/test/sap/ui/core/qunit/component/Models.qunit.js +7 -28
- package/test/sap/ui/core/qunit/component/Models_unavoidablySync.qunit.js +8 -26
- package/test/sap/ui/core/qunit/component/testdata/async/lib2/library-preload.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/lib2/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/component/testdata/async/lib2/library.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/lib3/library-preload.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/lib3/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/component/testdata/async/lib3/library.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/lib4/library-preload.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/lib4/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/component/testdata/async/lib4/library.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/manifestcomp/Component-preload.js +1 -1
- package/test/sap/ui/core/qunit/component/testdata/async/manifestcomp/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/mycomp/Component-preload.js +1 -1
- package/test/sap/ui/core/qunit/component/testdata/async/mycomp/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/mysubcomp/Component-preload.js +1 -1
- package/test/sap/ui/core/qunit/component/testdata/async/mysubcomp/Component.js +2 -3
- package/test/sap/ui/core/qunit/component/testdata/customizing/customer/ext/Component.js +0 -4
- package/test/sap/ui/core/qunit/component/testdata/customizing/customer/ext/sync/Component.js +2 -6
- package/test/sap/ui/core/qunit/component/testdata/customizing/customersub/Component.js +0 -4
- package/test/sap/ui/core/qunit/component/testdata/inherit/Component.js +2 -7
- package/test/sap/ui/core/qunit/component/testdata/inherit/parent/Component.js +2 -7
- package/test/sap/ui/core/qunit/component/testdata/inheritAsync/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/inheritAsync/parentA/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/inheritAsync/parentB/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/inheritAsyncError/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/inheritAsyncError/parentA/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/inheritAsyncError/parentB/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/other/Component.js +2 -7
- package/test/sap/ui/core/qunit/component/testdata/terminologies/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/terminologies/component1/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/terminologies/component2/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/terminologies/component3/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/terminologies/component5/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/terminologies/reuse/Component.js +2 -3
- package/test/sap/ui/core/qunit/component/testdata/v1/Component.js +2 -7
- package/test/sap/ui/core/qunit/component/testdata/v1empty/Component.js +2 -7
- package/test/sap/ui/core/qunit/component/testdata/v1inline/Component.js +2 -5
- package/test/sap/ui/core/qunit/component/testdata/v1missing/Component.js +2 -7
- package/test/sap/ui/core/qunit/component/testdata/v2/Component.js +2 -5
- package/test/sap/ui/core/qunit/component/testdata/v2asyncRootView/Component.js +2 -5
- package/test/sap/ui/core/qunit/component/testdata/v2empty/Component.js +2 -9
- package/test/sap/ui/core/qunit/component/testdata/v2inline/Component.js +2 -5
- package/test/sap/ui/core/qunit/component/testdata/v2missing/Component.js +2 -9
- package/test/sap/ui/core/qunit/component/testdata/v2version/Component.js +2 -2
- package/test/sap/ui/core/qunit/dnd/DragDropInfo.qunit.js +1 -2
- package/test/sap/ui/core/qunit/generic/legacy/ControlMemoryLeaks.qunit.js +2 -0
- package/test/sap/ui/core/qunit/generic/legacy/DuplicateIdCheck.qunit.js +2 -0
- package/test/sap/ui/core/qunit/gherkin/dataTableUtils.qunit.js +2 -2
- package/test/sap/ui/core/qunit/i18n/Locale.qunit.js +0 -52
- package/test/sap/ui/core/qunit/i18n/LocaleData.qunit.js +1 -1
- package/test/sap/ui/core/qunit/i18n/UniversalDate.qunit.js +14 -24
- package/test/sap/ui/core/qunit/i18n/testsuite.i18n.qunit.js +18 -0
- package/test/sap/ui/core/qunit/internal/1RingModels.qunit.js +1 -0
- package/test/sap/ui/core/qunit/json/JSONListBinding.qunit.js +2 -7
- package/test/sap/ui/core/qunit/json/JSONPropertyBinding.qunit.js +7 -12
- package/test/sap/ui/core/qunit/json/JSONTwoWay.qunit.js +3 -8
- package/test/sap/ui/core/qunit/loader/fixture/amd-with-export-true/module1.js +2 -2
- package/test/sap/ui/core/qunit/messages/MessageMixin.qunit.js +2 -7
- package/test/sap/ui/core/qunit/messages/messagesUsage.qunit.js +1 -1
- package/test/sap/ui/core/qunit/model/Binding.qunit.js +36 -11
- package/test/sap/ui/core/qunit/model/ClientListBinding.qunit.js +2 -7
- package/test/sap/ui/core/qunit/model/ClientTreeBinding.qunit.js +2 -7
- package/test/sap/ui/core/qunit/model/CompositeDataState.qunit.js +2 -7
- package/test/sap/ui/core/qunit/model/Context.qunit.js +2 -7
- package/test/sap/ui/core/qunit/model/ContextBinding.qunit.js +2 -7
- package/test/sap/ui/core/qunit/model/ListBinding.qunit.js +63 -6
- package/test/sap/ui/core/qunit/model/Model.qunit.js +2 -7
- package/test/sap/ui/core/qunit/model/PropertyBinding.qunit.js +40 -0
- package/test/sap/ui/core/qunit/model/TreeBinding.qunit.js +2 -7
- package/test/sap/ui/core/qunit/model/TreeBindingAdapter.qunit.js +2 -7
- package/test/sap/ui/core/qunit/mvc/XMLView.qunit.js +9 -8
- package/test/sap/ui/core/qunit/mvc/extensions/Controllerextensions.qunit.js +4 -4
- package/test/sap/ui/core/qunit/mvc/extensions/Controllerextensions_legacy.qunit.js +4 -4
- package/test/sap/ui/core/qunit/odata/AnnotationParserNoFakeService.qunit.js +2 -7
- package/test/sap/ui/core/qunit/odata/ODataMessageParser.qunit.js +1 -1
- package/test/sap/ui/core/qunit/odata/ODataMessageParserNoFakeService.qunit.js +2 -8
- package/test/sap/ui/core/qunit/odata/ODataMetadataNoFakeService.qunit.js +1 -6
- package/test/sap/ui/core/qunit/odata/type/DateTimeBase.qunit.js +24 -0
- package/test/sap/ui/core/qunit/odata/v2/Context.qunit.js +2 -7
- package/test/sap/ui/core/qunit/odata/v2/ODataContextBindingNoFakeService.qunit.js +2 -7
- package/test/sap/ui/core/qunit/odata/v2/ODataListBindingNoFakeService.qunit.js +31 -17
- package/test/sap/ui/core/qunit/odata/v2/ODataModel.integration.qunit.js +28 -19
- package/test/sap/ui/core/qunit/odata/v2/ODataModelNoFakeService.qunit.js +70 -15
- package/test/sap/ui/core/qunit/odata/v2/ODataPropertyBindingNoFakeService.qunit.js +2 -7
- package/test/sap/ui/core/qunit/odata/v2/ODataTreeBindingFlatNoFakeService.qunit.js +4 -9
- package/test/sap/ui/core/qunit/odata/v2/ODataTreeBindingNoFakeService.qunit.js +2 -7
- package/test/sap/ui/core/qunit/odata/v2/_CreatedContextsCache.qunit.js +2 -7
- package/test/sap/ui/core/qunit/odata/v4/AnnotationHelper.qunit.js +1 -1
- package/test/sap/ui/core/qunit/odata/v4/Context.qunit.js +45 -17
- package/test/sap/ui/core/qunit/odata/v4/ODataBinding.qunit.js +152 -151
- package/test/sap/ui/core/qunit/odata/v4/ODataContextBinding.qunit.js +55 -27
- package/test/sap/ui/core/qunit/odata/v4/ODataListBinding.qunit.js +119 -4
- package/test/sap/ui/core/qunit/odata/v4/ODataMetaModel.qunit.js +3 -3
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.integration.qunit.js +754 -195
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.qunit.js +42 -53
- package/test/sap/ui/core/qunit/odata/v4/ODataParentBinding.qunit.js +283 -170
- package/test/sap/ui/core/qunit/odata/v4/ODataPropertyBinding.qunit.js +103 -78
- package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationCache.qunit.js +3 -0
- package/test/sap/ui/core/qunit/odata/v4/lib/_Cache.qunit.js +87 -58
- package/test/sap/ui/core/qunit/odata/v4/lib/_Helper.qunit.js +3 -1
- package/test/sap/ui/core/qunit/odata/v4/lib/_Requestor.qunit.js +124 -22
- package/test/sap/ui/core/qunit/odata/v4/testsuite.odatav4.qunit.js +4 -0
- package/test/sap/ui/core/qunit/opa/_LogCollector.qunit.js +1 -1
- package/test/sap/ui/core/qunit/performance/trace/FESR.qunit.js +5 -0
- package/test/sap/ui/core/qunit/resource/ResourceModel.qunit.js +17 -37
- package/test/sap/ui/core/qunit/routing/HashChanger.qunit.js +1 -6
- package/test/sap/ui/core/qunit/routing/RouterHashChanger.qunit.js +1 -10
- package/test/sap/ui/core/qunit/routing/async/Router.qunit.js +1 -22
- package/test/sap/ui/core/qunit/routing/async/Target.qunit.js +1 -4
- package/test/sap/ui/core/qunit/rule/model/modelSupport.qunit.js +34 -1
- package/test/sap/ui/core/qunit/testdata/fastnavigation/view/FastNavigation.view.xml +2 -2
- package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib1/i18n.properties +1 -0
- package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib1/library.js +10 -0
- package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib1/manifest.json +10 -0
- package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib2/library.js +10 -0
- package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib2/messagebundle.properties +1 -0
- package/test/sap/ui/core/qunit/testsuites/testsuite.databinding.qunit.js +3 -0
- package/test/sap/ui/core/qunit/testsuites/testsuite.theming.qunit.js +29 -0
- package/test/sap/ui/core/qunit/types/DateFormatTimezones.qunit.js +397 -607
- package/test/sap/ui/core/qunit/types/SimpleType.qunit.js +16 -2
- package/test/sap/ui/core/qunit/types/Types.qunit.js +2 -37
- package/test/sap/ui/core/qunit/types/testsuite.types.qunit.js +1 -1
- package/test/sap/ui/core/qunit/util/SyncPromise.qunit.js +4 -1
- package/test/sap/ui/core/qunit/util/jQuery.sap.measure.qunit.js +16 -11
- package/test/sap/ui/core/qunit/xml/XMLListBinding.qunit.js +1 -3
- package/test/sap/ui/core/qunit/xml/XMLModel.qunit.js +4 -14
- package/test/sap/ui/core/qunit/xml/XMLPropertyBinding.qunit.js +7 -11
- package/test/sap/ui/core/qunit/xml/XMLTreeBinding.qunit.js +1 -1
- package/test/sap/ui/core/qunit/xml/XMLTwoWay.qunit.js +3 -7
- package/test/sap/ui/core/relnotes/changes-1.115.json +1 -37
- package/test/sap/ui/core/relnotes/changes-1.116.json +82 -0
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/firstItem-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/initial.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/lastItem-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/leftDownBtn-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/myButtonSample-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/rightDownBtn-contextMenu.ref.lnk +1 -1
- package/test/testsuite/js/samples.js +2 -0
- package/ui5.yaml +1 -1
|
@@ -310,12 +310,13 @@ sap.ui.define([
|
|
|
310
310
|
setActive : function () {}
|
|
311
311
|
},
|
|
312
312
|
oCacheMock = this.mock(_Cache),
|
|
313
|
-
oInitialContext = createContext(oFixture.sInit, "/EMPLOYEES(ID='1')"),
|
|
313
|
+
oInitialContext = createContext(oFixture.sInit, "/EMPLOYEES(ID='1')", true),
|
|
314
|
+
sInitialReducedPath = oInitialContext ? "/EMPLOYEES(ID='1')/Name" : undefined,
|
|
314
315
|
oTargetContext = createContext(oFixture.sTarget, "/EMPLOYEES(ID='2')");
|
|
315
316
|
|
|
316
|
-
function createContext(sType, sPath) {
|
|
317
|
+
function createContext(sType, sPath, bFetchCache) {
|
|
317
318
|
if (sType === "base") {
|
|
318
|
-
oCacheMock.expects("createProperty")
|
|
319
|
+
oCacheMock.expects("createProperty").exactly(bFetchCache ? 1 : 0)
|
|
319
320
|
.withExactArgs(sinon.match.same(oModel.oRequestor),
|
|
320
321
|
sPath.slice(1) + "/Name", {"sap-client" : "111"})
|
|
321
322
|
.returns(oCache);
|
|
@@ -330,24 +331,24 @@ sap.ui.define([
|
|
|
330
331
|
|
|
331
332
|
//Create Initial Binding
|
|
332
333
|
oBinding = oModel.bindProperty("Name", oInitialContext);
|
|
333
|
-
|
|
334
|
+
assert.strictEqual(oBinding.sReducedPath, sInitialReducedPath);
|
|
334
335
|
if (oFixture.sInit === "base") {
|
|
335
336
|
assert.strictEqual(oBinding.oCachePromise.getResult(), oCache);
|
|
336
337
|
} else {
|
|
337
338
|
assert.strictEqual(oBinding.oCachePromise.getResult(), null);
|
|
338
339
|
}
|
|
339
|
-
if (oFixture.sTarget) {
|
|
340
|
-
this.mock(oBinding).expects("checkUpdateInternal")
|
|
341
|
-
.withExactArgs(/*bInitial*/true, "context").returns(SyncPromise.resolve());
|
|
342
|
-
}
|
|
343
|
-
this.mock(oBinding).expects("deregisterChangeListener").withExactArgs();
|
|
344
340
|
this.mock(oBinding).expects("checkSuspended").withExactArgs(true);
|
|
341
|
+
this.mock(oBinding).expects("deregisterChangeListener").withExactArgs();
|
|
342
|
+
this.mock(oBinding).expects("fetchCache")
|
|
343
|
+
.withExactArgs(sinon.match.same(oTargetContext));
|
|
344
|
+
this.mock(oBinding).expects("checkUpdateInternal")
|
|
345
|
+
.withExactArgs(/*bInitial*/true, "context").returns(SyncPromise.resolve());
|
|
345
346
|
|
|
346
347
|
//code under test
|
|
347
348
|
oBinding.setContext(oTargetContext);
|
|
348
349
|
|
|
349
|
-
assert.strictEqual(oBinding.
|
|
350
|
-
|
|
350
|
+
assert.strictEqual(oBinding.sReducedPath,
|
|
351
|
+
oTargetContext ? undefined : sInitialReducedPath);
|
|
351
352
|
|
|
352
353
|
// code under test
|
|
353
354
|
// #deregisterChangeListener is not called again if #setContext is called with the same
|
|
@@ -357,6 +358,43 @@ sap.ui.define([
|
|
|
357
358
|
});
|
|
358
359
|
//TODO cache promise is NOT always fulfilled
|
|
359
360
|
|
|
361
|
+
//*********************************************************************************************
|
|
362
|
+
["A", "B"].forEach(function (sResolvedMetaPath) {
|
|
363
|
+
[false, true].forEach(function (bHasDeclaredType) {
|
|
364
|
+
var sTitle = "setContext: reset type, " + sResolvedMetaPath
|
|
365
|
+
+ ", bHasDeclaredType=" + bHasDeclaredType;
|
|
366
|
+
|
|
367
|
+
QUnit.test(sTitle, function (assert) {
|
|
368
|
+
var oInitialContext = Context.create(this.oModel, null/*oBinding*/, "/EMPLOYEES('1')"),
|
|
369
|
+
oBinding = this.oModel.bindProperty("Name", oInitialContext),
|
|
370
|
+
oHelperMock = this.mock(_Helper),
|
|
371
|
+
oType = new TypeString();
|
|
372
|
+
|
|
373
|
+
oBinding.sReducedPath = "~reduced~";
|
|
374
|
+
oBinding.setType(oType);
|
|
375
|
+
oBinding.bHasDeclaredType = bHasDeclaredType;
|
|
376
|
+
this.mock(oBinding).expects("checkSuspended").withExactArgs(true);
|
|
377
|
+
this.mock(oBinding).expects("deregisterChangeListener").withExactArgs();
|
|
378
|
+
this.mock(this.oModel).expects("resolve").exactly(bHasDeclaredType ? 0 : 1)
|
|
379
|
+
.withExactArgs("Name", "~oTargetContext~").returns("/TEAMS('1')");
|
|
380
|
+
oHelperMock.expects("getMetaPath").exactly(bHasDeclaredType ? 0 : 1)
|
|
381
|
+
.withExactArgs("/TEAMS('1')").returns(sResolvedMetaPath);
|
|
382
|
+
oHelperMock.expects("getMetaPath").exactly(bHasDeclaredType ? 0 : 1)
|
|
383
|
+
.withExactArgs("~reduced~").returns("A");
|
|
384
|
+
this.mock(oBinding).expects("fetchCache").withExactArgs("~oTargetContext~");
|
|
385
|
+
this.mock(oBinding).expects("checkUpdateInternal")
|
|
386
|
+
.withExactArgs(/*bInitial*/true, "context").returns(SyncPromise.resolve());
|
|
387
|
+
|
|
388
|
+
// code under test
|
|
389
|
+
oBinding.setContext("~oTargetContext~");
|
|
390
|
+
|
|
391
|
+
assert.strictEqual(oBinding.getType(),
|
|
392
|
+
bHasDeclaredType || sResolvedMetaPath === "A" ? oType : undefined);
|
|
393
|
+
assert.strictEqual(oBinding.sReducedPath, undefined);
|
|
394
|
+
});
|
|
395
|
+
});
|
|
396
|
+
});
|
|
397
|
+
|
|
360
398
|
//*********************************************************************************************
|
|
361
399
|
[false, true].forEach(function (bHasMessages) {
|
|
362
400
|
var sTitle = "checkUpdateInternal(undefined) consider data state control messages"
|
|
@@ -420,21 +458,13 @@ sap.ui.define([
|
|
|
420
458
|
|
|
421
459
|
//*********************************************************************************************
|
|
422
460
|
QUnit.test("checkUpdateInternal(true): no change event for virtual context", function (assert) {
|
|
423
|
-
var
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
this.mock(ODataPropertyBinding.prototype).expects("fetchCache")
|
|
428
|
-
.withExactArgs(sinon.match.same(oVirtualContext))
|
|
429
|
-
.callsFake(function () {
|
|
430
|
-
this.sReducedPath = "~reduced~";
|
|
431
|
-
});
|
|
432
|
-
oBinding = this.oModel.bindProperty("relative", oVirtualContext);
|
|
461
|
+
var oVirtualContext = Context.create(this.oModel, {/*list binding*/},
|
|
462
|
+
"/.../" + Context.VIRTUAL, Context.VIRTUAL),
|
|
463
|
+
oBinding = this.oModel.bindProperty("relative", oVirtualContext);
|
|
433
464
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
.returns(SyncPromise.resolve());
|
|
465
|
+
oBinding.sReducedPath = "~reduced~";
|
|
466
|
+
// Note: automatic type determination not yet needed
|
|
467
|
+
this.mock(this.oModel.getMetaModel()).expects("fetchUI5Type").never();
|
|
438
468
|
oBinding.attachChange(function () {
|
|
439
469
|
assert.ok(false, "no change event for virtual context");
|
|
440
470
|
});
|
|
@@ -451,9 +481,8 @@ sap.ui.define([
|
|
|
451
481
|
oBinding = this.oModel.bindProperty("relative", oVirtualContext),
|
|
452
482
|
sResolvedPath = "/EMPLOYEES/" + Context.VIRTUAL + "/EMPLOYEE_2_MANAGER/relative";
|
|
453
483
|
|
|
454
|
-
// Note:
|
|
455
|
-
this.mock(this.oModel.getMetaModel()).expects("fetchUI5Type").
|
|
456
|
-
.returns(SyncPromise.resolve());
|
|
484
|
+
// Note: automatic type determination not yet needed
|
|
485
|
+
this.mock(this.oModel.getMetaModel()).expects("fetchUI5Type").never();
|
|
457
486
|
// The parent virtual context ensures that there is no cache access
|
|
458
487
|
this.mock(oVirtualContext).expects("fetchValue").withExactArgs(sResolvedPath, oBinding)
|
|
459
488
|
.returns(SyncPromise.resolve());
|
|
@@ -465,37 +494,6 @@ sap.ui.define([
|
|
|
465
494
|
return oBinding.checkUpdateInternal(true);
|
|
466
495
|
});
|
|
467
496
|
|
|
468
|
-
//*********************************************************************************************
|
|
469
|
-
// If the initialization is deferred, e.g. because the V2 adapter waits for the metadata, it
|
|
470
|
-
// happens that the binding already has a context, but sReducedPath is still unset. So we must
|
|
471
|
-
// check this before the context access, too.
|
|
472
|
-
// See $count in the OPA for Sales Order TP100 V2.
|
|
473
|
-
QUnit.test("checkUpdateInternal: deferred initialization", function () {
|
|
474
|
-
var oBinding,
|
|
475
|
-
oBindingMock = this.mock(ODataPropertyBinding.prototype),
|
|
476
|
-
oContext = Context.create(this.oModel, {/*list binding*/}, "/...", 0),
|
|
477
|
-
oPromise = SyncPromise.resolve(Promise.resolve()),
|
|
478
|
-
oType = {getName : function () {}};
|
|
479
|
-
|
|
480
|
-
oBindingMock.expects("fetchCache").withExactArgs(undefined).returns(oPromise);
|
|
481
|
-
this.mock(this.oModel.getMetaModel()).expects("fetchUI5Type")
|
|
482
|
-
.withExactArgs("/.../relative")
|
|
483
|
-
.returns(SyncPromise.resolve(oType));
|
|
484
|
-
this.mock(oContext).expects("fetchValue").never();
|
|
485
|
-
|
|
486
|
-
// code under test
|
|
487
|
-
oBinding = this.oModel.bindProperty("relative");
|
|
488
|
-
|
|
489
|
-
this.mock(oBinding).expects("deregisterChangeListener");
|
|
490
|
-
oBindingMock.expects("fetchCache").withExactArgs(sinon.match.same(oContext))
|
|
491
|
-
.returns(oPromise); // this would actually set sReducedPath later
|
|
492
|
-
|
|
493
|
-
// code under test
|
|
494
|
-
oBinding.setContext(oContext);
|
|
495
|
-
|
|
496
|
-
return oPromise;
|
|
497
|
-
});
|
|
498
|
-
|
|
499
497
|
//*********************************************************************************************
|
|
500
498
|
QUnit.test("checkUpdateInternal(true): provide value synchronously", function (assert) {
|
|
501
499
|
var oContext = Context.create(this.oModel, {/*list binding*/}, "/...", 0),
|
|
@@ -511,6 +509,7 @@ sap.ui.define([
|
|
|
511
509
|
this.mock(this.oModel.getMetaModel()).expects("fetchUI5Type").withExactArgs("/.../relative")
|
|
512
510
|
.returns(SyncPromise.resolve(oType));
|
|
513
511
|
this.mock(oType).expects("formatValue").withExactArgs("foo", undefined).returns("*foo*");
|
|
512
|
+
this.mock(oBinding).expects("setType").never();
|
|
514
513
|
|
|
515
514
|
// code under test
|
|
516
515
|
oPromise = oBinding.checkUpdateInternal(true);
|
|
@@ -548,6 +547,7 @@ sap.ui.define([
|
|
|
548
547
|
vValue = {/* non-primitive */},
|
|
549
548
|
vValueClone = {};
|
|
550
549
|
|
|
550
|
+
oBinding.sReducedPath = "~reduced~";
|
|
551
551
|
oBinding.setBindingMode(BindingMode.OneTime);
|
|
552
552
|
oBinding.setType(null, "any");
|
|
553
553
|
this.mock(oContext).expects("fetchValue")
|
|
@@ -572,6 +572,7 @@ sap.ui.define([
|
|
|
572
572
|
vValue = {/* non-primitive */},
|
|
573
573
|
vValueClone = {};
|
|
574
574
|
|
|
575
|
+
oBinding.sReducedPath = "~reduced~";
|
|
575
576
|
// Note: we do not require BindingMode.OneTime for action advertisements
|
|
576
577
|
oBinding.setType(null, "any");
|
|
577
578
|
this.mock(oContext).expects("fetchValue")
|
|
@@ -621,6 +622,7 @@ sap.ui.define([
|
|
|
621
622
|
vValue = {/* non-primitive */},
|
|
622
623
|
that = this;
|
|
623
624
|
|
|
625
|
+
oBinding.sReducedPath = "~reduced~";
|
|
624
626
|
oBinding.setBindingMode(oFixture.mode);
|
|
625
627
|
oBinding.setType(null, oFixture.internalType);
|
|
626
628
|
if (bAbsolute) {
|
|
@@ -648,7 +650,7 @@ sap.ui.define([
|
|
|
648
650
|
}
|
|
649
651
|
this.mock(this.oModel.getMetaModel()).expects("fetchUI5Type")
|
|
650
652
|
.exactly(oFixture.internalType !== "any" ? 1 : 0)
|
|
651
|
-
.withExactArgs(
|
|
653
|
+
.withExactArgs("~reduced~")
|
|
652
654
|
.returns(SyncPromise.resolve());
|
|
653
655
|
this.oLogMock.expects("error")
|
|
654
656
|
.withExactArgs("Accessed value is not primitive",
|
|
@@ -670,6 +672,7 @@ sap.ui.define([
|
|
|
670
672
|
sPath = "primitive",
|
|
671
673
|
oBinding = this.oModel.bindProperty(sPath, oContext);
|
|
672
674
|
|
|
675
|
+
oBinding.sReducedPath = "~reduced~";
|
|
673
676
|
oBinding.setType(null, "any");
|
|
674
677
|
this.mock(oContext).expects("fetchValue")
|
|
675
678
|
.withExactArgs(oBinding.sReducedPath, sinon.match.same(oBinding))
|
|
@@ -728,13 +731,16 @@ sap.ui.define([
|
|
|
728
731
|
that = this;
|
|
729
732
|
|
|
730
733
|
this.createTextBinding(assert).then(function (oBinding) {
|
|
734
|
+
that.mock(oBinding).expects("checkSuspended").withExactArgs(true);
|
|
731
735
|
that.mock(oBinding).expects("deregisterChangeListener").withExactArgs();
|
|
736
|
+
that.mock(oBinding).expects("fetchCache").withExactArgs(undefined);
|
|
732
737
|
that.mock(oBinding).expects("checkUpdateInternal")
|
|
733
738
|
.withExactArgs(undefined, ChangeReason.Context)
|
|
734
739
|
.callThrough();
|
|
735
740
|
assert.strictEqual(oBinding.getValue(), "value", "value before context reset");
|
|
736
741
|
oBinding.attachChange(fnChangeHandler, oBinding);
|
|
737
|
-
|
|
742
|
+
|
|
743
|
+
// code under test
|
|
738
744
|
oBinding.setContext(); // reset context triggers checkUpdate
|
|
739
745
|
});
|
|
740
746
|
});
|
|
@@ -833,7 +839,10 @@ sap.ui.define([
|
|
|
833
839
|
var oContext = Context.create(this.oModel, {/*oParentBinding*/}, "/Me"),
|
|
834
840
|
oBinding = this.oModel.bindProperty("property", oContext);
|
|
835
841
|
|
|
836
|
-
oBinding.
|
|
842
|
+
oBinding.sReducedPath = "~reduced~";
|
|
843
|
+
this.mock(this.oModel.getMetaModel()).expects("fetchUI5Type")
|
|
844
|
+
.withExactArgs("~reduced~")
|
|
845
|
+
.returns(SyncPromise.resolve("~oType~"));
|
|
837
846
|
this.mock(oContext).expects("fetchValue")
|
|
838
847
|
.withExactArgs(oBinding.sReducedPath, oBinding)
|
|
839
848
|
.returns(SyncPromise.resolve());
|
|
@@ -876,6 +885,7 @@ sap.ui.define([
|
|
|
876
885
|
var oContext = Context.create(this.oModel, {}, "/EntitySet('foo')"),
|
|
877
886
|
oBinding = this.oModel.bindProperty("property/path", oContext);
|
|
878
887
|
|
|
888
|
+
oBinding.sReducedPath = "~reduced~";
|
|
879
889
|
oBinding.setType(null, "any");
|
|
880
890
|
oBinding.vValue = ""; // simulate a read
|
|
881
891
|
this.mock(oContext).expects("fetchValue")
|
|
@@ -1064,6 +1074,7 @@ sap.ui.define([
|
|
|
1064
1074
|
oContext = {};
|
|
1065
1075
|
|
|
1066
1076
|
oBinding.sResumeChangeReason = ChangeReason.Change; // simulate initially suspended binding
|
|
1077
|
+
this.mock(oBinding).expects("checkSuspended").never();
|
|
1067
1078
|
this.mock(oBinding).expects("deregisterChangeListener").never();
|
|
1068
1079
|
this.mock(oBinding).expects("fetchCache").never();
|
|
1069
1080
|
this.mock(oBinding).expects("checkUpdateInternal").never();
|
|
@@ -1373,7 +1384,7 @@ sap.ui.define([
|
|
|
1373
1384
|
|
|
1374
1385
|
//*********************************************************************************************
|
|
1375
1386
|
[false, true].forEach(function (bForceUpdate) {
|
|
1376
|
-
QUnit.test("automaticTypes:
|
|
1387
|
+
QUnit.test("automaticTypes: bForceUpdate = " + bForceUpdate,
|
|
1377
1388
|
function (assert) {
|
|
1378
1389
|
var oBinding,
|
|
1379
1390
|
done = assert.async(),
|
|
@@ -1394,15 +1405,14 @@ sap.ui.define([
|
|
|
1394
1405
|
sinon.match.object)
|
|
1395
1406
|
.returns(SyncPromise.resolve("update")); // 2nd read gets an update
|
|
1396
1407
|
|
|
1397
|
-
this.mock(this.oModel.getMetaModel()).expects("fetchUI5Type")
|
|
1398
|
-
.withExactArgs(sPath)
|
|
1408
|
+
this.mock(this.oModel.getMetaModel()).expects("fetchUI5Type")
|
|
1409
|
+
.withExactArgs(sPath)
|
|
1399
1410
|
.returns(SyncPromise.resolve(oRawType));
|
|
1400
1411
|
|
|
1401
1412
|
function onChange() {
|
|
1402
1413
|
oBinding.detachChange(onChange);
|
|
1403
1414
|
oBinding.attachChange(done);
|
|
1404
1415
|
setTimeout(function () {
|
|
1405
|
-
// only with force update, failed type is requested again
|
|
1406
1416
|
oBinding.checkUpdateInternal(bForceUpdate);
|
|
1407
1417
|
//TODO return promise from above?!
|
|
1408
1418
|
}, 0);
|
|
@@ -1460,18 +1470,18 @@ sap.ui.define([
|
|
|
1460
1470
|
QUnit.test("dataRequested/dataReceived: success=" + bSuccess, function (assert) {
|
|
1461
1471
|
var oBinding = this.oModel.bindProperty("/EntitySet('foo')/Name");
|
|
1462
1472
|
|
|
1463
|
-
|
|
1464
|
-
this.mock(
|
|
1473
|
+
oBinding.sReducedPath = "~reduced~";
|
|
1474
|
+
this.mock(oBinding).expects("getResolvedPath").withExactArgs().returns("n/a");
|
|
1475
|
+
this.mock(this.oModel.oMetaModel).expects("fetchUI5Type").withExactArgs("~reduced~")
|
|
1465
1476
|
.resolves("~type~");
|
|
1466
1477
|
this.mock(oBinding).expects("lockGroup").withExactArgs("groupId").returns("~oGroupLock~");
|
|
1467
1478
|
this.mock(oBinding).expects("fireDataRequested").withExactArgs("~bPreventBubbling~");
|
|
1468
1479
|
this.mock(oBinding.oCache).expects("fetchValue")
|
|
1469
1480
|
.withExactArgs("~oGroupLock~", undefined, sinon.match.func, sinon.match.same(oBinding))
|
|
1470
1481
|
.callsFake(function () {
|
|
1471
|
-
arguments[2]();
|
|
1482
|
+
arguments[2](); // code under test
|
|
1472
1483
|
return bSuccess ? Promise.resolve("~vValue~") : Promise.reject("~oError~");
|
|
1473
1484
|
});
|
|
1474
|
-
this.mock(oBinding).expects("setType").withExactArgs("~type~", undefined);
|
|
1475
1485
|
this.mock(this.oModel).expects("reportError").exactly(bSuccess ? 0 : 1);
|
|
1476
1486
|
this.mock(oBinding).expects("_fireChange").exactly(bSuccess ? 1 : 0)
|
|
1477
1487
|
.withExactArgs({reason : "~reason~"});
|
|
@@ -1488,8 +1498,10 @@ sap.ui.define([
|
|
|
1488
1498
|
return oBinding.checkUpdateInternal(false, "~reason~", "groupId", "~bPreventBubbling~")
|
|
1489
1499
|
.then(function () {
|
|
1490
1500
|
assert.strictEqual(oBinding.getValue(), "~vValue~");
|
|
1501
|
+
assert.strictEqual(oBinding.getType(), "~type~");
|
|
1491
1502
|
}, function (oError) {
|
|
1492
1503
|
assert.strictEqual(oError, "~oError~");
|
|
1504
|
+
assert.strictEqual(oBinding.getType(), "~type~");
|
|
1493
1505
|
});
|
|
1494
1506
|
});
|
|
1495
1507
|
});
|
|
@@ -2041,7 +2053,7 @@ sap.ui.define([
|
|
|
2041
2053
|
});
|
|
2042
2054
|
|
|
2043
2055
|
//*********************************************************************************************
|
|
2044
|
-
QUnit.test("setType: calls setV4 automatically", function () {
|
|
2056
|
+
QUnit.test("setType: calls setV4 automatically", function (assert) {
|
|
2045
2057
|
var oDateTimeOffset = {
|
|
2046
2058
|
getName : function () { return "sap.ui.model.odata.type.DateTimeOffset"; },
|
|
2047
2059
|
setV4 : function () {}
|
|
@@ -2052,13 +2064,29 @@ sap.ui.define([
|
|
|
2052
2064
|
},
|
|
2053
2065
|
oPropertyBinding = this.oModel.bindProperty("/absolute");
|
|
2054
2066
|
|
|
2067
|
+
assert.strictEqual(oPropertyBinding.bHasDeclaredType, undefined);
|
|
2055
2068
|
this.mock(oDateTimeOffset).expects("setV4");
|
|
2056
2069
|
this.mock(oSomeType).expects("setV4").never();
|
|
2057
2070
|
|
|
2058
2071
|
// code under test
|
|
2059
2072
|
oPropertyBinding.setType(null);
|
|
2073
|
+
|
|
2074
|
+
assert.strictEqual(oPropertyBinding.bHasDeclaredType, false);
|
|
2075
|
+
|
|
2076
|
+
// code under test
|
|
2060
2077
|
oPropertyBinding.setType(oDateTimeOffset);
|
|
2078
|
+
|
|
2079
|
+
assert.strictEqual(oPropertyBinding.bHasDeclaredType, true);
|
|
2080
|
+
|
|
2081
|
+
// code under test
|
|
2061
2082
|
oPropertyBinding.setType(oSomeType);
|
|
2083
|
+
|
|
2084
|
+
assert.strictEqual(oPropertyBinding.bHasDeclaredType, true);
|
|
2085
|
+
|
|
2086
|
+
// code under test
|
|
2087
|
+
oPropertyBinding.setType(null);
|
|
2088
|
+
|
|
2089
|
+
assert.strictEqual(oPropertyBinding.bHasDeclaredType, false);
|
|
2062
2090
|
});
|
|
2063
2091
|
|
|
2064
2092
|
//*********************************************************************************************
|
|
@@ -2217,22 +2245,19 @@ sap.ui.define([
|
|
|
2217
2245
|
});
|
|
2218
2246
|
|
|
2219
2247
|
//*********************************************************************************************
|
|
2220
|
-
QUnit.test("
|
|
2221
|
-
var oBinding = this.oModel.bindProperty("path", undefined, {custom : "foo"})
|
|
2222
|
-
oPromise;
|
|
2248
|
+
QUnit.test("doFetchOrGetQueryOptions", function (assert) {
|
|
2249
|
+
var oBinding = this.oModel.bindProperty("path", undefined, {custom : "foo"});
|
|
2223
2250
|
|
|
2224
2251
|
this.mock(oBinding).expects("isRoot").withExactArgs().returns(true);
|
|
2225
2252
|
|
|
2226
2253
|
// code under test
|
|
2227
|
-
assert.deepEqual(oBinding.
|
|
2254
|
+
assert.deepEqual(oBinding.doFetchOrGetQueryOptions(), {custom : "foo"});
|
|
2228
2255
|
|
|
2229
2256
|
oBinding = this.oModel.bindProperty("path", undefined, {custom : "foo"});
|
|
2230
2257
|
this.mock(oBinding).expects("isRoot").withExactArgs().returns(false);
|
|
2231
2258
|
|
|
2232
2259
|
// code under test
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
assert.deepEqual(oPromise.getResult(), {});
|
|
2260
|
+
assert.deepEqual(oBinding.doFetchOrGetQueryOptions(), undefined);
|
|
2236
2261
|
});
|
|
2237
2262
|
|
|
2238
2263
|
//*********************************************************************************************
|
|
@@ -313,6 +313,7 @@ sap.ui.define([
|
|
|
313
313
|
oEnhanceCacheWithGrandTotalExpectation,
|
|
314
314
|
oFirstLevelCache = {
|
|
315
315
|
addKeptElement : "~addKeptElement~",
|
|
316
|
+
removeKeptElement : "~removeKeptElement~",
|
|
316
317
|
requestSideEffects : "~requestSideEffects~"
|
|
317
318
|
},
|
|
318
319
|
oGetDownloadUrlExpectation,
|
|
@@ -391,6 +392,8 @@ sap.ui.define([
|
|
|
391
392
|
assert.strictEqual(oCache.aElements.$created, 0);
|
|
392
393
|
assert.strictEqual(oCache.oFirstLevel, oFirstLevelCache);
|
|
393
394
|
assert.strictEqual(oCache.addKeptElement, oFirstLevelCache.addKeptElement, "@borrows ...");
|
|
395
|
+
assert.strictEqual(oCache.removeKeptElement, oFirstLevelCache.removeKeptElement,
|
|
396
|
+
"@borrows ...");
|
|
394
397
|
assert.strictEqual(oCache.requestSideEffects, oFirstLevelCache.requestSideEffects,
|
|
395
398
|
"@borrows ...");
|
|
396
399
|
if (bCountLeaves) {
|