@openui5/sap.ui.core 1.127.1 → 1.129.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +3 -1
- package/THIRDPARTY.txt +1 -1
- 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.storage.js +3 -3
- 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/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 +38 -4
- 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 +1 -1
- 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 +1 -1
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +28 -6
- package/src/sap/ui/core/ComponentContainer.js +1 -1
- 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 +28 -15
- 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 +1 -1
- 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 +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 +1 -1
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/Lib.js +1 -0
- 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 +1 -1
- 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/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 +4 -4
- package/src/sap/ui/core/XMLTemplateProcessor.js +55 -33
- package/src/sap/ui/core/boot/FieldHelpEndpoint.js +70 -0
- 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 +3 -2
- 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 +3 -3
- package/src/sap/ui/core/format/FormatUtils.js +1 -1
- package/src/sap/ui/core/format/NumberFormat.js +6 -2
- 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 +4 -4
- 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/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 +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/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 +3 -3
- 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/webc/WebComponentRenderer.js +7 -2
- 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 +3 -5
- 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/DataState.js +33 -5
- 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 +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 +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/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/ODataModel.js +185 -54
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +29 -10
- package/src/sap/ui/model/odata/v4/Context.js +65 -16
- package/src/sap/ui/model/odata/v4/ODataBinding.js +6 -0
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +113 -41
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataModel.js +42 -6
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +112 -55
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +40 -15
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +118 -80
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +10 -7
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +29 -4
- package/src/sap/ui/model/odata/v4/lib/_TreeState.js +64 -14
- 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 +2 -1
- package/src/sap/ui/test/TestUtils.js +107 -43
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader.js +38 -13
|
@@ -7,26 +7,39 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
sap.ui.define([
|
|
10
|
-
"sap/ui/base/BindingParser",
|
|
11
|
-
"./BaseTreeModifier",
|
|
12
|
-
"./XmlTreeModifier",
|
|
13
|
-
"sap/base/util/ObjectPath",
|
|
14
|
-
"sap/ui/util/XMLHelper",
|
|
15
10
|
"sap/base/util/merge",
|
|
11
|
+
"sap/base/util/ObjectPath",
|
|
12
|
+
"sap/ui/base/BindingParser",
|
|
13
|
+
"sap/ui/core/util/reflection/BaseTreeModifier",
|
|
14
|
+
"sap/ui/core/util/reflection/XmlTreeModifier",
|
|
16
15
|
"sap/ui/core/Element",
|
|
17
|
-
"sap/ui/core/Fragment"
|
|
18
|
-
|
|
16
|
+
"sap/ui/core/Fragment",
|
|
17
|
+
"sap/ui/util/XMLHelper"
|
|
18
|
+
], function(
|
|
19
|
+
merge,
|
|
20
|
+
ObjectPath,
|
|
19
21
|
BindingParser,
|
|
20
22
|
BaseTreeModifier,
|
|
21
23
|
XmlTreeModifier,
|
|
22
|
-
ObjectPath,
|
|
23
|
-
XMLHelper,
|
|
24
|
-
merge,
|
|
25
24
|
Element,
|
|
26
|
-
Fragment
|
|
25
|
+
Fragment,
|
|
26
|
+
XMLHelper
|
|
27
27
|
) {
|
|
28
28
|
|
|
29
29
|
"use strict";
|
|
30
|
+
|
|
31
|
+
function requireClass(sClassName) {
|
|
32
|
+
return new Promise(function(fnResolve, fnReject) {
|
|
33
|
+
sap.ui.require([sClassName],
|
|
34
|
+
function(oClassObject) { fnResolve(oClassObject); },
|
|
35
|
+
function() {
|
|
36
|
+
fnReject(new Error("Required control '" + sClassName
|
|
37
|
+
+ "' couldn't be created asynchronously"));
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
30
43
|
/**
|
|
31
44
|
* Static utility class to access ManagedObjects in a harmonized way with XMLNodes.
|
|
32
45
|
*
|
|
@@ -36,14 +49,13 @@ sap.ui.define([
|
|
|
36
49
|
* @ui5-restricted
|
|
37
50
|
* @since 1.56.0
|
|
38
51
|
*/
|
|
39
|
-
|
|
40
|
-
|
|
52
|
+
const JsControlTreeModifier = /** @lends sap.ui.core.util.reflection.JsControlTreeModifier */ {
|
|
41
53
|
targets: "jsControlTree",
|
|
42
54
|
|
|
43
55
|
/**
|
|
44
56
|
* @inheritDoc
|
|
45
57
|
*/
|
|
46
|
-
setVisible: function
|
|
58
|
+
setVisible: function(oControl, bVisible) {
|
|
47
59
|
if (oControl.setVisible) {
|
|
48
60
|
this.unbindProperty(oControl, "visible");
|
|
49
61
|
oControl.setVisible(bVisible);
|
|
@@ -55,7 +67,7 @@ sap.ui.define([
|
|
|
55
67
|
/**
|
|
56
68
|
* @inheritDoc
|
|
57
69
|
*/
|
|
58
|
-
getVisible: function
|
|
70
|
+
getVisible: function(oControl) {
|
|
59
71
|
if (oControl.getVisible) {
|
|
60
72
|
return Promise.resolve(oControl.getVisible());
|
|
61
73
|
} else {
|
|
@@ -66,7 +78,7 @@ sap.ui.define([
|
|
|
66
78
|
/**
|
|
67
79
|
* @inheritDoc
|
|
68
80
|
*/
|
|
69
|
-
setStashed: async function
|
|
81
|
+
setStashed: async function(oControl, bStashed) {
|
|
70
82
|
bStashed = !!bStashed;
|
|
71
83
|
if (oControl.unstash) {
|
|
72
84
|
// check if the control is stashed and should be unstashed
|
|
@@ -88,30 +100,28 @@ sap.ui.define([
|
|
|
88
100
|
/**
|
|
89
101
|
* @inheritDoc
|
|
90
102
|
*/
|
|
91
|
-
getStashed: function
|
|
103
|
+
getStashed: async function(oControl) {
|
|
92
104
|
if (oControl.isStashed) {
|
|
93
105
|
if (oControl.isStashed()) {
|
|
94
|
-
return
|
|
106
|
+
return true;
|
|
95
107
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
return !bIsVisible;
|
|
99
|
-
});
|
|
108
|
+
const bIsVisible = await this.getVisible(oControl);
|
|
109
|
+
return !bIsVisible;
|
|
100
110
|
}
|
|
101
|
-
|
|
111
|
+
throw new Error("Provided control instance has no isStashed method");
|
|
102
112
|
},
|
|
103
113
|
|
|
104
114
|
/**
|
|
105
115
|
* @inheritDoc
|
|
106
116
|
*/
|
|
107
|
-
bindProperty: function
|
|
117
|
+
bindProperty: function(oControl, sPropertyName, vBindingInfos) {
|
|
108
118
|
oControl.bindProperty(sPropertyName, vBindingInfos);
|
|
109
119
|
},
|
|
110
120
|
|
|
111
121
|
/**
|
|
112
122
|
* @inheritDoc
|
|
113
123
|
*/
|
|
114
|
-
unbindProperty: function
|
|
124
|
+
unbindProperty: function(oControl, sPropertyName) {
|
|
115
125
|
if (oControl) {
|
|
116
126
|
oControl.unbindProperty(sPropertyName, /*bSuppressReset = */true);
|
|
117
127
|
}
|
|
@@ -120,10 +130,10 @@ sap.ui.define([
|
|
|
120
130
|
/**
|
|
121
131
|
* @inheritDoc
|
|
122
132
|
*/
|
|
123
|
-
setProperty: function
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
133
|
+
setProperty: function(oControl, sPropertyName, vPropertyValue) {
|
|
134
|
+
const oMetadata = oControl.getMetadata().getPropertyLikeSetting(sPropertyName);
|
|
135
|
+
let oBindingParserResult;
|
|
136
|
+
let bError;
|
|
127
137
|
|
|
128
138
|
this.unbindProperty(oControl, sPropertyName);
|
|
129
139
|
|
|
@@ -139,7 +149,7 @@ sap.ui.define([
|
|
|
139
149
|
if (oBindingParserResult && typeof oBindingParserResult === "object" || bError) {
|
|
140
150
|
vPropertyValue = this._escapeCurlyBracketsInString(vPropertyValue);
|
|
141
151
|
}
|
|
142
|
-
|
|
152
|
+
const sPropertySetter = oMetadata._sMutator;
|
|
143
153
|
oControl[sPropertySetter](vPropertyValue);
|
|
144
154
|
} else {
|
|
145
155
|
throw new TypeError("Value cannot be stringified", "sap.ui.core.util.reflection.JsControlTreeModifier");
|
|
@@ -150,11 +160,11 @@ sap.ui.define([
|
|
|
150
160
|
/**
|
|
151
161
|
* @inheritDoc
|
|
152
162
|
*/
|
|
153
|
-
getProperty: function
|
|
154
|
-
|
|
155
|
-
|
|
163
|
+
getProperty: function(oControl, sPropertyName) {
|
|
164
|
+
const oMetadata = oControl.getMetadata().getPropertyLikeSetting(sPropertyName);
|
|
165
|
+
let oProperty;
|
|
156
166
|
if (oMetadata) {
|
|
157
|
-
|
|
167
|
+
const sPropertyGetter = oMetadata._sGetter;
|
|
158
168
|
oProperty = oControl[sPropertyGetter]();
|
|
159
169
|
}
|
|
160
170
|
return Promise.resolve(oProperty);
|
|
@@ -163,16 +173,16 @@ sap.ui.define([
|
|
|
163
173
|
/**
|
|
164
174
|
* @inheritDoc
|
|
165
175
|
*/
|
|
166
|
-
isPropertyInitial: function
|
|
176
|
+
isPropertyInitial: function(oControl, sPropertyName) {
|
|
167
177
|
return oControl.isPropertyInitial(sPropertyName);
|
|
168
178
|
},
|
|
169
179
|
|
|
170
180
|
/**
|
|
171
181
|
* @inheritDoc
|
|
172
182
|
*/
|
|
173
|
-
setPropertyBinding: function
|
|
183
|
+
setPropertyBinding: function(oControl, sPropertyName, oPropertyBinding) {
|
|
174
184
|
this.unbindProperty(oControl, sPropertyName);
|
|
175
|
-
|
|
185
|
+
const mSettings = {};
|
|
176
186
|
mSettings[sPropertyName] = oPropertyBinding;
|
|
177
187
|
return oControl.applySettings(mSettings);
|
|
178
188
|
},
|
|
@@ -180,27 +190,25 @@ sap.ui.define([
|
|
|
180
190
|
/**
|
|
181
191
|
* @inheritDoc
|
|
182
192
|
*/
|
|
183
|
-
getPropertyBinding: function
|
|
193
|
+
getPropertyBinding: function(oControl, sPropertyName) {
|
|
184
194
|
return oControl.getBindingInfo(sPropertyName);
|
|
185
195
|
},
|
|
186
196
|
|
|
187
197
|
/**
|
|
188
198
|
* @inheritDoc
|
|
189
199
|
*/
|
|
190
|
-
createAndAddCustomData: function(oControl, sCustomDataKey, sValue, oAppComponent) {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
return this.insertAggregation(oControl, "customData", oCustomData, 0);
|
|
196
|
-
}.bind(this));
|
|
200
|
+
createAndAddCustomData: async function(oControl, sCustomDataKey, sValue, oAppComponent) {
|
|
201
|
+
const oCustomData = await this.createControl("sap.ui.core.CustomData", oAppComponent);
|
|
202
|
+
this.setProperty(oCustomData, "key", sCustomDataKey);
|
|
203
|
+
this.setProperty(oCustomData, "value", sValue);
|
|
204
|
+
return this.insertAggregation(oControl, "customData", oCustomData, 0);
|
|
197
205
|
},
|
|
198
206
|
|
|
199
207
|
/**
|
|
200
208
|
* @inheritDoc
|
|
201
209
|
*/
|
|
202
210
|
getCustomDataInfo: function(oControl, sCustomDataKey) {
|
|
203
|
-
|
|
211
|
+
let oCustomData;
|
|
204
212
|
if (oControl.getCustomData) {
|
|
205
213
|
oControl.getCustomData().some(function(oCurrentCustomData) {
|
|
206
214
|
if (oCurrentCustomData.getKey() === sCustomDataKey) {
|
|
@@ -223,34 +231,16 @@ sap.ui.define([
|
|
|
223
231
|
/**
|
|
224
232
|
* @inheritDoc
|
|
225
233
|
*/
|
|
226
|
-
createControl: function
|
|
234
|
+
createControl: async function(sClassName, oAppComponent, oView, oSelector, mSettings) {
|
|
227
235
|
sClassName = sClassName.replace(/\./g,"/");
|
|
228
236
|
if (this.bySelector(oSelector, oAppComponent)) {
|
|
229
|
-
|
|
237
|
+
const sErrorMessage = "Can't create a control with duplicated ID " + (oSelector.id || oSelector);
|
|
230
238
|
return Promise.reject(sErrorMessage);
|
|
231
239
|
}
|
|
232
240
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
oPromise = Promise.resolve(oClassObject);
|
|
237
|
-
} else {
|
|
238
|
-
oPromise = new Promise(function(fnResolve, fnReject) {
|
|
239
|
-
sap.ui.require([sClassName],
|
|
240
|
-
function(oClassObject) { fnResolve(oClassObject); },
|
|
241
|
-
function() {
|
|
242
|
-
fnReject(new Error("Required control '" + sClassName
|
|
243
|
-
+ "' couldn't be created asynchronously"));
|
|
244
|
-
}
|
|
245
|
-
);
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
return oPromise
|
|
250
|
-
.then(function(ClassObject) {
|
|
251
|
-
var sId = this.getControlIdBySelector(oSelector, oAppComponent);
|
|
252
|
-
return new ClassObject(sId, mSettings);
|
|
253
|
-
}.bind(this));
|
|
241
|
+
const ClassObject = sap.ui.require(sClassName) || await requireClass(sClassName);
|
|
242
|
+
const sId = this.getControlIdBySelector(oSelector, oAppComponent);
|
|
243
|
+
return new ClassObject(sId, mSettings);
|
|
254
244
|
},
|
|
255
245
|
|
|
256
246
|
/**
|
|
@@ -263,78 +253,76 @@ sap.ui.define([
|
|
|
263
253
|
/**
|
|
264
254
|
* @inheritDoc
|
|
265
255
|
*/
|
|
266
|
-
_byId: function
|
|
256
|
+
_byId: function(sId) {
|
|
267
257
|
return Element.getElementById(sId);
|
|
268
258
|
},
|
|
269
259
|
|
|
270
260
|
/**
|
|
271
261
|
* @inheritDoc
|
|
272
262
|
*/
|
|
273
|
-
getId: function
|
|
263
|
+
getId: function(oControl) {
|
|
274
264
|
return oControl.getId();
|
|
275
265
|
},
|
|
276
266
|
|
|
277
267
|
/**
|
|
278
268
|
* @inheritDoc
|
|
279
269
|
*/
|
|
280
|
-
getParent: function
|
|
281
|
-
return oControl.getParent
|
|
270
|
+
getParent: function(oControl) {
|
|
271
|
+
return oControl.getParent?.();
|
|
282
272
|
},
|
|
283
273
|
|
|
284
274
|
/**
|
|
285
275
|
* @inheritDoc
|
|
286
276
|
*/
|
|
287
|
-
getControlMetadata: function
|
|
288
|
-
return Promise.resolve(oControl
|
|
277
|
+
getControlMetadata: function(oControl) {
|
|
278
|
+
return Promise.resolve(oControl?.getMetadata());
|
|
289
279
|
},
|
|
290
280
|
|
|
291
281
|
/**
|
|
292
282
|
* @inheritDoc
|
|
293
283
|
*/
|
|
294
|
-
getControlType: function
|
|
295
|
-
return oControl
|
|
284
|
+
getControlType: function(oControl) {
|
|
285
|
+
return oControl?.getMetadata().getName();
|
|
296
286
|
},
|
|
297
287
|
|
|
298
288
|
/**
|
|
299
289
|
* @inheritDoc
|
|
300
290
|
*/
|
|
301
|
-
setAssociation: function
|
|
302
|
-
|
|
291
|
+
setAssociation: function(vParent, sName, sId) {
|
|
292
|
+
const oMetadata = vParent.getMetadata().getAssociation(sName);
|
|
303
293
|
oMetadata.set(vParent, sId);
|
|
304
294
|
},
|
|
305
295
|
|
|
306
296
|
/**
|
|
307
297
|
* @inheritDoc
|
|
308
298
|
*/
|
|
309
|
-
getAssociation: function
|
|
310
|
-
|
|
299
|
+
getAssociation: function(vParent, sName) {
|
|
300
|
+
const oMetadata = vParent.getMetadata().getAssociation(sName);
|
|
311
301
|
return oMetadata.get(vParent);
|
|
312
302
|
},
|
|
313
303
|
|
|
314
304
|
/**
|
|
315
305
|
* @inheritDoc
|
|
316
306
|
*/
|
|
317
|
-
getAllAggregations: function
|
|
307
|
+
getAllAggregations: function(oParent) {
|
|
318
308
|
return Promise.resolve(oParent.getMetadata().getAllAggregations());
|
|
319
309
|
},
|
|
320
310
|
|
|
321
311
|
/**
|
|
322
312
|
* @inheritDoc
|
|
323
313
|
*/
|
|
324
|
-
getAggregation: function
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
return undefined;
|
|
331
|
-
});
|
|
314
|
+
getAggregation: async function(oParent, sName) {
|
|
315
|
+
const oAggregation = await this.findAggregation(oParent, sName);
|
|
316
|
+
if (oAggregation) {
|
|
317
|
+
return oParent[oAggregation._sGetter]();
|
|
318
|
+
}
|
|
319
|
+
return undefined;
|
|
332
320
|
},
|
|
333
321
|
|
|
334
322
|
/**
|
|
335
323
|
* @inheritDoc
|
|
336
324
|
*/
|
|
337
|
-
insertAggregation: async function
|
|
325
|
+
insertAggregation: async function(oParent, sName, oObject, iIndex) {
|
|
338
326
|
//special handling without invalidation for customData
|
|
339
327
|
if (sName === "customData") {
|
|
340
328
|
oParent.insertAggregation(sName, oObject, iIndex, /*bSuppressInvalidate=*/true);
|
|
@@ -354,7 +342,7 @@ sap.ui.define([
|
|
|
354
342
|
/**
|
|
355
343
|
* @inheritDoc
|
|
356
344
|
*/
|
|
357
|
-
removeAggregation: async function
|
|
345
|
+
removeAggregation: async function(oParent, sName, oObject) {
|
|
358
346
|
//special handling without invalidation for customData
|
|
359
347
|
if (sName === "customData") {
|
|
360
348
|
oParent.removeAggregation(sName, oObject, /*bSuppressInvalidate=*/true);
|
|
@@ -409,75 +397,66 @@ sap.ui.define([
|
|
|
409
397
|
/**
|
|
410
398
|
* @inheritDoc
|
|
411
399
|
*/
|
|
412
|
-
removeAllAggregation: function
|
|
400
|
+
removeAllAggregation: async function(oControl, sName) {
|
|
413
401
|
//special handling without invalidation for customData
|
|
414
402
|
if (sName === "customData") {
|
|
415
403
|
oControl.removeAllAggregation(sName, /*bSuppressInvalidate=*/true);
|
|
416
|
-
|
|
404
|
+
} else {
|
|
405
|
+
const oAggregation = await this.findAggregation(oControl, sName);
|
|
406
|
+
if (oAggregation) {
|
|
407
|
+
oControl[oAggregation._sRemoveAllMutator]();
|
|
408
|
+
}
|
|
417
409
|
}
|
|
418
|
-
return this.findAggregation(oControl, sName)
|
|
419
|
-
.then(function (oAggregation) {
|
|
420
|
-
if (oAggregation) {
|
|
421
|
-
oControl[oAggregation._sRemoveAllMutator]();
|
|
422
|
-
}
|
|
423
|
-
});
|
|
424
410
|
},
|
|
425
411
|
|
|
426
412
|
/**
|
|
427
413
|
* @inheritDoc
|
|
428
414
|
*/
|
|
429
|
-
getBindingTemplate: function
|
|
430
|
-
|
|
431
|
-
return Promise.resolve(oBinding
|
|
415
|
+
getBindingTemplate: function(oControl, sAggregationName) {
|
|
416
|
+
const oBinding = oControl.getBindingInfo(sAggregationName);
|
|
417
|
+
return Promise.resolve(oBinding?.template);
|
|
432
418
|
},
|
|
433
419
|
|
|
434
420
|
/**
|
|
435
421
|
* @inheritDoc
|
|
436
422
|
*/
|
|
437
|
-
updateAggregation: function
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
}
|
|
444
|
-
});
|
|
423
|
+
updateAggregation: async function(oControl, sAggregationName) {
|
|
424
|
+
const oAggregation = await this.findAggregation(oControl, sAggregationName);
|
|
425
|
+
if (oAggregation && oControl.getBinding(sAggregationName)) {
|
|
426
|
+
oControl[oAggregation._sDestructor]();
|
|
427
|
+
oControl.updateAggregation(sAggregationName);
|
|
428
|
+
}
|
|
445
429
|
},
|
|
446
430
|
|
|
447
431
|
/**
|
|
448
432
|
* @inheritDoc
|
|
449
433
|
*/
|
|
450
|
-
findIndexInParentAggregation: function(oControl) {
|
|
451
|
-
|
|
434
|
+
findIndexInParentAggregation: async function(oControl) {
|
|
435
|
+
const oParent = this.getParent(oControl);
|
|
452
436
|
|
|
453
437
|
if (!oParent) {
|
|
454
|
-
return
|
|
438
|
+
return -1;
|
|
455
439
|
}
|
|
456
440
|
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
// of type 0..1 and aControlsInAggregation is the oControl provided
|
|
471
|
-
// to the function initially, so its index is 0
|
|
472
|
-
return 0;
|
|
473
|
-
}
|
|
474
|
-
});
|
|
441
|
+
const sParentAggregationName = await this.getParentAggregationName(oControl);
|
|
442
|
+
// we need all controls in the aggregation
|
|
443
|
+
const aControlsInAggregation = await this.getAggregation(oParent, sParentAggregationName);
|
|
444
|
+
// if aControls is an array:
|
|
445
|
+
if (Array.isArray(aControlsInAggregation)) {
|
|
446
|
+
// then the aggregation is multiple and we can find the index of oControl in the array
|
|
447
|
+
return aControlsInAggregation.indexOf(oControl);
|
|
448
|
+
} else {
|
|
449
|
+
// if aControlsInAggregation is not an array, then the aggregation is
|
|
450
|
+
// of type 0..1 and aControlsInAggregation is the oControl provided
|
|
451
|
+
// to the function initially, so its index is 0
|
|
452
|
+
return 0;
|
|
453
|
+
}
|
|
475
454
|
},
|
|
476
455
|
|
|
477
456
|
/**
|
|
478
457
|
* @inheritDoc
|
|
479
458
|
*/
|
|
480
|
-
getParentAggregationName: function
|
|
459
|
+
getParentAggregationName: function(oControl) {
|
|
481
460
|
return Promise.resolve(oControl.sParentAggregationName);
|
|
482
461
|
},
|
|
483
462
|
|
|
@@ -485,71 +464,57 @@ sap.ui.define([
|
|
|
485
464
|
* @inheritDoc
|
|
486
465
|
*/
|
|
487
466
|
findAggregation: function(oControl, sAggregationName) {
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
resolve(oAggregations[sAggregationName]);
|
|
495
|
-
return;
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
resolve();
|
|
500
|
-
});
|
|
467
|
+
if (oControl?.getMetadata) {
|
|
468
|
+
const oMetadata = oControl.getMetadata();
|
|
469
|
+
const oAggregations = oMetadata.getAllAggregations();
|
|
470
|
+
return Promise.resolve(oAggregations[sAggregationName]);
|
|
471
|
+
}
|
|
472
|
+
return Promise.resolve(undefined);
|
|
501
473
|
},
|
|
502
474
|
|
|
503
475
|
/**
|
|
504
476
|
* @inheritDoc
|
|
505
477
|
*/
|
|
506
|
-
validateType: function(oControl, oAggregationMetadata, oParent, sFragment) {
|
|
507
|
-
|
|
478
|
+
validateType: async function(oControl, oAggregationMetadata, oParent, sFragment) {
|
|
479
|
+
const sTypeOrInterface = oAggregationMetadata.type;
|
|
508
480
|
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
return oControl.isA(sTypeOrInterface);
|
|
516
|
-
});
|
|
481
|
+
const oAggregation = await this.getAggregation(oParent, oAggregationMetadata.name);
|
|
482
|
+
// if aggregation is not multiple and already has element inside, then it is not valid for element
|
|
483
|
+
if (oAggregationMetadata.multiple === false && oAggregation && oAggregation.length > 0) {
|
|
484
|
+
return false;
|
|
485
|
+
}
|
|
486
|
+
return oControl.isA(sTypeOrInterface);
|
|
517
487
|
},
|
|
518
488
|
|
|
519
489
|
/**
|
|
520
490
|
* @inheritDoc
|
|
521
491
|
*/
|
|
522
|
-
instantiateFragment: function(sFragment, sNamespace, oView) {
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
vNewControls = [vNewControls];
|
|
535
|
-
}
|
|
536
|
-
return vNewControls || [];
|
|
537
|
-
});
|
|
492
|
+
instantiateFragment: async function(sFragment, sNamespace, oView) {
|
|
493
|
+
const oInputFragment = XMLHelper.parse(sFragment);
|
|
494
|
+
const oFragment = await this._checkAndPrefixIdsInFragment(oInputFragment, sNamespace);
|
|
495
|
+
const vNewControls = await Fragment.load({
|
|
496
|
+
definition: oFragment,
|
|
497
|
+
sId: oView && oView.getId(),
|
|
498
|
+
controller: oView.getController()
|
|
499
|
+
});
|
|
500
|
+
if (vNewControls && !Array.isArray(vNewControls)) {
|
|
501
|
+
return [vNewControls];
|
|
502
|
+
}
|
|
503
|
+
return vNewControls || [];
|
|
538
504
|
},
|
|
539
505
|
|
|
540
506
|
/**
|
|
541
507
|
* @inheritDoc
|
|
542
508
|
*/
|
|
543
|
-
templateControlFragment: function(sFragmentName, mPreprocessorSettings, oView) {
|
|
544
|
-
|
|
509
|
+
templateControlFragment: async function(sFragmentName, mPreprocessorSettings, oView) {
|
|
510
|
+
const oFragment = await BaseTreeModifier._templateFragment(
|
|
545
511
|
sFragmentName,
|
|
546
512
|
mPreprocessorSettings
|
|
547
|
-
)
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
});
|
|
513
|
+
);
|
|
514
|
+
const oController = oView?.getController();
|
|
515
|
+
return Fragment.load({
|
|
516
|
+
definition: oFragment,
|
|
517
|
+
controller: oController
|
|
553
518
|
});
|
|
554
519
|
},
|
|
555
520
|
|
|
@@ -561,7 +526,7 @@ sap.ui.define([
|
|
|
561
526
|
},
|
|
562
527
|
|
|
563
528
|
_getFlexCustomData: function(oControl, sType) {
|
|
564
|
-
|
|
529
|
+
const oCustomData = typeof oControl === "object"
|
|
565
530
|
&& typeof oControl.data === "function"
|
|
566
531
|
&& oControl.data("sap-ui-custom-settings");
|
|
567
532
|
return ObjectPath.get(["sap.ui.fl", sType], oCustomData);
|
|
@@ -570,14 +535,14 @@ sap.ui.define([
|
|
|
570
535
|
/**
|
|
571
536
|
* @inheritDoc
|
|
572
537
|
*/
|
|
573
|
-
bindAggregation: function
|
|
538
|
+
bindAggregation: function(oControl, sAggregationName, oBindingInfo) {
|
|
574
539
|
return Promise.resolve(oControl.bindAggregation(sAggregationName, oBindingInfo));
|
|
575
540
|
},
|
|
576
541
|
|
|
577
542
|
/**
|
|
578
543
|
* @inheritDoc
|
|
579
544
|
*/
|
|
580
|
-
unbindAggregation: function
|
|
545
|
+
unbindAggregation: function(oControl, sAggregationName) {
|
|
581
546
|
// bSuppressReset is not supported
|
|
582
547
|
return Promise.resolve(oControl.unbindAggregation(sAggregationName));
|
|
583
548
|
},
|
|
@@ -585,25 +550,23 @@ sap.ui.define([
|
|
|
585
550
|
/**
|
|
586
551
|
* @inheritDoc
|
|
587
552
|
*/
|
|
588
|
-
getExtensionPointInfo: function(sExtensionPointName, oView) {
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
return oExtensionPointInfo;
|
|
606
|
-
}.bind(this));
|
|
553
|
+
getExtensionPointInfo: async function(sExtensionPointName, oView) {
|
|
554
|
+
const oViewNode = (oView._xContent) ? oView._xContent : oView;
|
|
555
|
+
const oExtensionPointInfo = await XmlTreeModifier.getExtensionPointInfo(sExtensionPointName, oViewNode);
|
|
556
|
+
if (oExtensionPointInfo) {
|
|
557
|
+
// decrease the index by 1 to get the index of the extension point itself for js-case
|
|
558
|
+
oExtensionPointInfo.index--;
|
|
559
|
+
oExtensionPointInfo.parent = oExtensionPointInfo.parent && this._byId(oView.createId(oExtensionPointInfo.parent.getAttribute("id")));
|
|
560
|
+
oExtensionPointInfo.defaultContent = oExtensionPointInfo.defaultContent
|
|
561
|
+
.map((oNode) => {
|
|
562
|
+
const sId = oView.createId(oNode.getAttribute("id"));
|
|
563
|
+
return this._byId(sId);
|
|
564
|
+
})
|
|
565
|
+
.filter((oControl) => {
|
|
566
|
+
return !!oControl;
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
return oExtensionPointInfo;
|
|
607
570
|
}
|
|
608
571
|
};
|
|
609
572
|
|