@openui5/sap.ui.fl 1.118.0 → 1.119.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRDPARTY.txt +2 -2
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/ChangePersistence.js +1 -1
- package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
- package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +1 -1
- package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +1 -1
- package/src/sap/ui/fl/FakeLrepLocalStorage.js +1 -1
- package/src/sap/ui/fl/FlexController.js +1 -1
- package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
- package/src/sap/ui/fl/LayerUtils.js +14 -7
- package/src/sap/ui/fl/Utils.js +72 -172
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +8 -4
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ApplyStrategyFactory.js +28 -8
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +1 -1
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +5 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +17 -88
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/Utils.js +6 -1
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +96 -77
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/EventHistory.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +1 -1
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/fl/changeHandler/Base.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseRename.js +45 -59
- package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/MoveControls.js +168 -260
- package/src/sap/ui/fl/changeHandler/MoveElements.js +33 -87
- package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +1 -1
- package/src/sap/ui/fl/changeHandler/PropertyChange.js +1 -1
- package/src/sap/ui/fl/changeHandler/StashControl.js +31 -53
- package/src/sap/ui/fl/changeHandler/UnhideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/UnstashControl.js +24 -26
- package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +3 -5
- package/src/sap/ui/fl/changeHandler/common/createIFrame.js +2 -0
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +4 -4
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
- package/src/sap/ui/fl/designtime/util/IFrame.designtime.js +5 -0
- package/src/sap/ui/fl/{write → initial}/_internal/FlexInfoSession.js +11 -3
- package/src/sap/ui/fl/initial/_internal/Storage.js +5 -5
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +1 -1
- package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +1 -1
- package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +1 -1
- package/src/sap/ui/fl/interfaces/Delegate.js +1 -1
- package/src/sap/ui/fl/library.js +43 -43
- package/src/sap/ui/fl/messagebundle_bg.properties +2 -2
- package/src/sap/ui/fl/messagebundle_en.properties +2 -2
- package/src/sap/ui/fl/messagebundle_ja.properties +6 -6
- package/src/sap/ui/fl/messagebundle_sl.properties +2 -2
- package/src/sap/ui/fl/messagebundle_uk.properties +1 -1
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +1 -1
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +1 -1
- package/src/sap/ui/fl/support/api/SupportAPI.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/IFrame.js +60 -27
- package/src/sap/ui/fl/util/IFrameRenderer.js +9 -1
- package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
- package/src/sap/ui/fl/util/resolveBinding.js +1 -1
- package/src/sap/ui/fl/variants/VariantManagement.js +17 -18
- package/src/sap/ui/fl/variants/VariantModel.js +2 -1
- package/src/sap/ui/fl/variants/context/manifest.json +2 -2
- package/src/sap/ui/fl/write/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +3 -3
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +2 -2
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
- package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/write/_internal/extensionPoint/Registry.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +63 -43
- package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
- package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +1 -1
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +1 -1
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +12 -2
- package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +14 -11
package/THIRDPARTY.txt
CHANGED
|
@@ -401,7 +401,7 @@ License: MIT
|
|
|
401
401
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
|
402
402
|
Contained in: src/sap.ui.integration/src/sap/ui/integration/thirdparty/adaptive-expressions.js
|
|
403
403
|
|
|
404
|
-
Component: Markdown-it, version: 12.2
|
|
404
|
+
Component: Markdown-it, version: 12.3.2
|
|
405
405
|
Copyright: 2014 Vitaly Puzrin, Alex Kocharin
|
|
406
406
|
License: MIT
|
|
407
407
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
|
@@ -466,7 +466,7 @@ License: Apache-2.0
|
|
|
466
466
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
467
467
|
Contained in: lib/jsdoc/ui5/plugin.js
|
|
468
468
|
|
|
469
|
-
Component: SAP Theming Base Content, version: 11.
|
|
469
|
+
Component: SAP Theming Base Content, version: 11.6.8
|
|
470
470
|
Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
|
|
471
471
|
License: Apache-2.0
|
|
472
472
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.fl",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.119.0",
|
|
4
4
|
"description": "OpenUI5 UI Library sap.ui.fl",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"url": "https://github.com/SAP/openui5.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@openui5/sap.m": "1.
|
|
18
|
-
"@openui5/sap.ui.core": "1.
|
|
17
|
+
"@openui5/sap.m": "1.119.0",
|
|
18
|
+
"@openui5/sap.ui.core": "1.119.0"
|
|
19
19
|
}
|
|
20
20
|
}
|
package/src/sap/ui/fl/.library
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
8
8
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
9
|
-
<version>1.
|
|
9
|
+
<version>1.119.0</version>
|
|
10
10
|
|
|
11
11
|
<documentation>SAPUI5 library with sap.ui.fl controls.</documentation>
|
|
12
12
|
|
|
@@ -7,11 +7,13 @@
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/base/util/UriParameters",
|
|
9
9
|
"sap/ui/thirdparty/hasher",
|
|
10
|
-
"sap/ui/fl/Layer"
|
|
10
|
+
"sap/ui/fl/Layer",
|
|
11
|
+
"sap/ui/fl/initial/_internal/FlexInfoSession"
|
|
11
12
|
], function(
|
|
12
13
|
UriParameters,
|
|
13
14
|
hasher,
|
|
14
|
-
Layer
|
|
15
|
+
Layer,
|
|
16
|
+
FlexInfoSession
|
|
15
17
|
) {
|
|
16
18
|
"use strict";
|
|
17
19
|
|
|
@@ -41,7 +43,7 @@ sap.ui.define([
|
|
|
41
43
|
*
|
|
42
44
|
* @namespace sap.ui.fl.LayerUtils
|
|
43
45
|
* @author SAP SE
|
|
44
|
-
* @version 1.
|
|
46
|
+
* @version 1.119.0
|
|
45
47
|
*/
|
|
46
48
|
var LayerUtils = {
|
|
47
49
|
_mLayersIndex: mLayersIndex,
|
|
@@ -113,6 +115,7 @@ sap.ui.define([
|
|
|
113
115
|
* @ui5-restricted sap.ui.fl.apply._internal.Connector
|
|
114
116
|
* @param {sap.ui.core.service.Service} oURLParsingService Unified Shell URL Parsing Service
|
|
115
117
|
* @return {string} maxLayer
|
|
118
|
+
* @deprecated Since version 1.118
|
|
116
119
|
*/
|
|
117
120
|
getMaxLayer(oURLParsingService) {
|
|
118
121
|
var sParseMaxLayer = LayerUtils.getMaxLayerTechnicalParameter(hasher.getHash(), oURLParsingService);
|
|
@@ -135,7 +138,7 @@ sap.ui.define([
|
|
|
135
138
|
* @param {string} sLayer Layer name to be evaluated
|
|
136
139
|
* @param {sap.ui.core.service.Service} oURLParsingService Unified Shell URL Parsing Service
|
|
137
140
|
* @returns {boolean} <code>true</code> if input layer is higher than max layer, otherwise <code>false</code>
|
|
138
|
-
* @
|
|
141
|
+
* @deprecated Since version 1.118
|
|
139
142
|
*/
|
|
140
143
|
isOverMaxLayer(sLayer, oURLParsingService) {
|
|
141
144
|
return this.isOverLayer(sLayer, this.getMaxLayer(oURLParsingService));
|
|
@@ -177,11 +180,13 @@ sap.ui.define([
|
|
|
177
180
|
* Determines if filtering of changes based on layer is required.
|
|
178
181
|
*
|
|
179
182
|
* @returns {boolean} <code>true</code> if the top layer is also the max layer, otherwise <code>false</code>
|
|
180
|
-
* @param {
|
|
183
|
+
* @param {string} sReference - Reference of the application
|
|
181
184
|
* @public
|
|
182
185
|
*/
|
|
183
|
-
isLayerFilteringRequired(
|
|
184
|
-
|
|
186
|
+
isLayerFilteringRequired(sReference) {
|
|
187
|
+
var oFlexInfoSession = FlexInfoSession.getByReference(sReference);
|
|
188
|
+
var sMaxLayer = oFlexInfoSession && oFlexInfoSession.maxLayer ? oFlexInfoSession.maxLayer : LayerUtils._sTopLayer;
|
|
189
|
+
return this._sTopLayer !== sMaxLayer;
|
|
185
190
|
},
|
|
186
191
|
|
|
187
192
|
/**
|
|
@@ -211,6 +216,7 @@ sap.ui.define([
|
|
|
211
216
|
* @param {object[]} aChangeDefinitions - Array of change definitions
|
|
212
217
|
* @param {sap.ui.core.service.Service} oURLParsingService Unified Shell URL Parsing Service
|
|
213
218
|
* @returns {object[]} Array of filtered change definitions
|
|
219
|
+
* @deprecated Since version 1.118
|
|
214
220
|
*/
|
|
215
221
|
filterChangeDefinitionsByMaxLayer(aChangeDefinitions, oURLParsingService) {
|
|
216
222
|
return aChangeDefinitions.filter(function(oChangeDefinition) {
|
|
@@ -242,6 +248,7 @@ sap.ui.define([
|
|
|
242
248
|
* @param {string} sHash Hash value
|
|
243
249
|
* @param {sap.ui.core.service.Service} oURLParsingService Unified Shell URL Parsing Service
|
|
244
250
|
* @returns {string|undefined} Max layer parameter value, if available
|
|
251
|
+
* @deprecated Since version 1.118
|
|
245
252
|
*/
|
|
246
253
|
getMaxLayerTechnicalParameter(sHash, oURLParsingService) {
|
|
247
254
|
if (oURLParsingService) {
|
package/src/sap/ui/fl/Utils.js
CHANGED
|
@@ -9,6 +9,7 @@ sap.ui.define([
|
|
|
9
9
|
"sap/base/util/isPlainObject",
|
|
10
10
|
"sap/base/util/uid",
|
|
11
11
|
"sap/base/util/UriParameters",
|
|
12
|
+
"sap/base/util/restricted/_isEqual",
|
|
12
13
|
"sap/base/Log",
|
|
13
14
|
"sap/ui/base/SyncPromise",
|
|
14
15
|
"sap/ui/base/ManagedObject",
|
|
@@ -23,6 +24,7 @@ sap.ui.define([
|
|
|
23
24
|
isPlainObject,
|
|
24
25
|
uid,
|
|
25
26
|
UriParameters,
|
|
27
|
+
isEqual,
|
|
26
28
|
Log,
|
|
27
29
|
SyncPromise,
|
|
28
30
|
ManagedObject,
|
|
@@ -42,19 +44,17 @@ sap.ui.define([
|
|
|
42
44
|
*/
|
|
43
45
|
function getComponentType(oManifest) {
|
|
44
46
|
// manifest instance
|
|
45
|
-
if (oManifest
|
|
46
|
-
return oManifest.getEntry("sap.app")
|
|
47
|
+
if (oManifest?.getEntry) {
|
|
48
|
+
return oManifest.getEntry?.("sap.app")?.type;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
// raw manifest
|
|
50
|
-
return oManifest
|
|
52
|
+
return oManifest?.["sap.app"]?.type;
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
function getStartUpParameter(oComponentData, sParameterName) {
|
|
54
|
-
if (oComponentData && oComponentData.startupParameters
|
|
55
|
-
|
|
56
|
-
return oComponentData.startupParameters[sParameterName][0];
|
|
57
|
-
}
|
|
56
|
+
if (oComponentData?.startupParameters && sParameterName && Array.isArray(oComponentData.startupParameters[sParameterName])) {
|
|
57
|
+
return oComponentData.startupParameters[sParameterName][0];
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -64,21 +64,18 @@ sap.ui.define([
|
|
|
64
64
|
* @namespace
|
|
65
65
|
* @alias sap.ui.fl.Utils
|
|
66
66
|
* @author SAP SE
|
|
67
|
-
* @version 1.
|
|
67
|
+
* @version 1.119.0
|
|
68
68
|
*
|
|
69
69
|
* @private
|
|
70
70
|
* @ui5-restricted sap.ui.fl, sap.ui.rta
|
|
71
71
|
*/
|
|
72
|
-
|
|
72
|
+
const Utils = {
|
|
73
73
|
isVariantByStartupParameter(oControl) {
|
|
74
74
|
// determine UI5 component out of given control
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
return !!getStartUpParameter(oAppComponent.getComponentData(), "sap-app-id");
|
|
79
|
-
}
|
|
75
|
+
const oAppComponent = this.getAppComponentForControl(oControl);
|
|
76
|
+
if (oAppComponent?.getComponentData) {
|
|
77
|
+
return !!getStartUpParameter(oAppComponent.getComponentData(), "sap-app-id");
|
|
80
78
|
}
|
|
81
|
-
|
|
82
79
|
return false;
|
|
83
80
|
},
|
|
84
81
|
|
|
@@ -94,18 +91,7 @@ sap.ui.define([
|
|
|
94
91
|
* @ui5-restricted sap.ui.fl, sap.ui.rta
|
|
95
92
|
*/
|
|
96
93
|
getAppDescriptor(oControl) {
|
|
97
|
-
|
|
98
|
-
if (oControl) {
|
|
99
|
-
var oComponent = this.getAppComponentForControl(oControl);
|
|
100
|
-
|
|
101
|
-
// determine manifest out of found component
|
|
102
|
-
if (oComponent && oComponent.getMetadata) {
|
|
103
|
-
var oComponentMetaData = oComponent.getMetadata();
|
|
104
|
-
if (oComponentMetaData && oComponentMetaData.getManifestObject) {
|
|
105
|
-
return oComponentMetaData.getManifestObject().getJson();
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
94
|
+
return this.getAppComponentForControl(oControl)?.getMetadata?.()?.getManifestObject?.().getJson();
|
|
109
95
|
},
|
|
110
96
|
|
|
111
97
|
/**
|
|
@@ -149,10 +135,10 @@ sap.ui.define([
|
|
|
149
135
|
*/
|
|
150
136
|
getComponentForControl(oControl) {
|
|
151
137
|
function getComponentIdForControl(oControl) {
|
|
152
|
-
|
|
138
|
+
const sComponentId = Component.getOwnerIdFor(oControl);
|
|
153
139
|
if (!sComponentId) {
|
|
154
|
-
if (
|
|
155
|
-
|
|
140
|
+
if (typeof oControl?.getParent === "function") {
|
|
141
|
+
const oParent = oControl.getParent();
|
|
156
142
|
if (oParent) {
|
|
157
143
|
return getComponentIdForControl(oParent);
|
|
158
144
|
}
|
|
@@ -163,7 +149,7 @@ sap.ui.define([
|
|
|
163
149
|
|
|
164
150
|
// determine UI5 component out of given control
|
|
165
151
|
if (oControl) {
|
|
166
|
-
|
|
152
|
+
const sComponentId = getComponentIdForControl(oControl);
|
|
167
153
|
if (sComponentId) {
|
|
168
154
|
return Component.get(sComponentId);
|
|
169
155
|
}
|
|
@@ -180,22 +166,22 @@ sap.ui.define([
|
|
|
180
166
|
* @ui5-restricted sap.ui.fl
|
|
181
167
|
*/
|
|
182
168
|
getAppComponentForControl(oControl) {
|
|
183
|
-
|
|
169
|
+
let oComponent = oControl instanceof Component ? oControl : Utils.getComponentForControl(oControl);
|
|
184
170
|
|
|
185
171
|
// special case for Fiori Elements to reach the real appComponent
|
|
186
|
-
if (oComponent
|
|
172
|
+
if (oComponent?.getAppComponent?.() instanceof Component) {
|
|
187
173
|
return oComponent.getAppComponent();
|
|
188
174
|
}
|
|
189
175
|
|
|
190
176
|
// special case for OVP
|
|
191
|
-
if (oComponent
|
|
177
|
+
if (oComponent?.oComponentData?.appComponent) {
|
|
192
178
|
return oComponent.oComponentData.appComponent;
|
|
193
179
|
}
|
|
194
180
|
|
|
195
|
-
if (oComponent
|
|
181
|
+
if (oComponent?.getManifestEntry) {
|
|
196
182
|
var oSapApp = oComponent.getManifestEntry("sap.app");
|
|
197
183
|
|
|
198
|
-
if (oSapApp
|
|
184
|
+
if (oSapApp?.type && oSapApp.type !== "application") {
|
|
199
185
|
if (oComponent instanceof Component) {
|
|
200
186
|
// we need to call this method only when the component is an instance of Component in order to walk up the tree
|
|
201
187
|
// returns owner app component
|
|
@@ -238,7 +224,7 @@ sap.ui.define([
|
|
|
238
224
|
return oControl;
|
|
239
225
|
}
|
|
240
226
|
|
|
241
|
-
if (
|
|
227
|
+
if (typeof oControl?.getParent === "function") {
|
|
242
228
|
oControl = oControl.getParent();
|
|
243
229
|
return Utils.getViewForControl(oControl);
|
|
244
230
|
}
|
|
@@ -255,20 +241,13 @@ sap.ui.define([
|
|
|
255
241
|
* @ui5-restricted sap.ui.fl.write._internal.transport.Transport
|
|
256
242
|
*/
|
|
257
243
|
getClient() {
|
|
258
|
-
|
|
259
|
-
var sClient;
|
|
260
|
-
oUriParams = UriParameters.fromQuery(window.location.search);
|
|
261
|
-
sClient = oUriParams.get("sap-client");
|
|
262
|
-
return sClient || undefined;
|
|
244
|
+
return UriParameters.fromQuery(window.location.search).get("sap-client");
|
|
263
245
|
},
|
|
264
246
|
|
|
265
247
|
getLrepUrl() {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
});
|
|
270
|
-
|
|
271
|
-
return oLrepConfiguration ? oLrepConfiguration.url : "";
|
|
248
|
+
const aFlexibilityServices = Configuration.getFlexibilityServices();
|
|
249
|
+
const oLrepConfiguration = aFlexibilityServices.find((oServiceConfig) => oServiceConfig.connector === "LrepConnector");
|
|
250
|
+
return oLrepConfiguration?.url || "";
|
|
272
251
|
},
|
|
273
252
|
|
|
274
253
|
/**
|
|
@@ -280,12 +259,12 @@ sap.ui.define([
|
|
|
280
259
|
* @ui5-restricted sap.ui.fl
|
|
281
260
|
*/
|
|
282
261
|
getCurrentLanguage() {
|
|
283
|
-
|
|
284
|
-
if (
|
|
262
|
+
const sLanguage = Configuration.getLanguage();
|
|
263
|
+
if (typeof sLanguage !== "string") {
|
|
285
264
|
return "";
|
|
286
265
|
}
|
|
287
266
|
|
|
288
|
-
|
|
267
|
+
const nIndex = sLanguage.indexOf("-");
|
|
289
268
|
if ((nIndex < 0) && (sLanguage.length <= 2)) {
|
|
290
269
|
return sLanguage.toUpperCase();
|
|
291
270
|
}
|
|
@@ -304,13 +283,7 @@ sap.ui.define([
|
|
|
304
283
|
* @private
|
|
305
284
|
*/
|
|
306
285
|
getControlType(oControl) {
|
|
307
|
-
|
|
308
|
-
if (oControl && typeof oControl.getMetadata === "function") {
|
|
309
|
-
oMetadata = oControl.getMetadata();
|
|
310
|
-
if (oMetadata && typeof oMetadata.getElementName === "function") {
|
|
311
|
-
return oMetadata.getElementName();
|
|
312
|
-
}
|
|
313
|
-
}
|
|
286
|
+
return oControl?.getMetadata?.()?.getElementName?.();
|
|
314
287
|
},
|
|
315
288
|
|
|
316
289
|
/**
|
|
@@ -336,10 +309,7 @@ sap.ui.define([
|
|
|
336
309
|
* @returns {object} Returns the parsed URL hash object or an empty object if ushell container is not available
|
|
337
310
|
*/
|
|
338
311
|
getParsedURLHash(oURLParsingService) {
|
|
339
|
-
|
|
340
|
-
return oURLParsingService.parseShellHash(hasher.getHash()) || {};
|
|
341
|
-
}
|
|
342
|
-
return {};
|
|
312
|
+
return oURLParsingService?.parseShellHash(hasher.getHash()) || {};
|
|
343
313
|
},
|
|
344
314
|
|
|
345
315
|
/**
|
|
@@ -364,21 +334,14 @@ sap.ui.define([
|
|
|
364
334
|
},
|
|
365
335
|
|
|
366
336
|
createDefaultFileName(sNameAddition) {
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
sFileName += `_${sNameAddition}`;
|
|
370
|
-
}
|
|
371
|
-
return sFileName;
|
|
337
|
+
const sFileName = uid().replace(/-/g, "_");
|
|
338
|
+
return sNameAddition ? `${sFileName}_${sNameAddition}` : sFileName;
|
|
372
339
|
},
|
|
373
340
|
|
|
374
341
|
createNamespace(oPropertyBag, sFileType) {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
}
|
|
379
|
-
var sReferenceName = oPropertyBag.reference.replace(".Component", "");
|
|
380
|
-
var sNamespace = `apps/${sReferenceName}/${sSubfolder}/`;
|
|
381
|
-
return sNamespace;
|
|
342
|
+
const sSubfolder = sFileType === "ctrl_variant" ? "variants" : "changes";
|
|
343
|
+
const sReferenceName = oPropertyBag.reference.replace(".Component", "");
|
|
344
|
+
return `apps/${sReferenceName}/${sSubfolder}/`;
|
|
382
345
|
},
|
|
383
346
|
|
|
384
347
|
/**
|
|
@@ -391,42 +354,30 @@ sap.ui.define([
|
|
|
391
354
|
* @returns {string} Returns the root LRep namespace
|
|
392
355
|
*/
|
|
393
356
|
buildLrepRootNamespace(sBaseId, sScenario, sProjectId) {
|
|
394
|
-
|
|
395
|
-
|
|
357
|
+
const sRootNamespace = "apps";
|
|
358
|
+
const sBaseErrorMessage = "Error in sap.ui.fl.Utils#buildLrepRootNamespace:";
|
|
359
|
+
|
|
396
360
|
if (!sBaseId) {
|
|
397
|
-
|
|
398
|
-
throw oError;
|
|
361
|
+
throw new Error(`${sBaseErrorMessage} for every scenario you need a base ID`);
|
|
399
362
|
}
|
|
400
363
|
|
|
401
364
|
switch (sScenario) {
|
|
402
365
|
case Scenario.VersionedAppVariant:
|
|
403
|
-
if (!sProjectId) {
|
|
404
|
-
oError.message += "in a versioned app variant scenario you additionally need a project ID";
|
|
405
|
-
throw oError;
|
|
406
|
-
}
|
|
407
|
-
sRootNamespace += `${sBaseId}/appVariants/${sProjectId}/`;
|
|
408
|
-
break;
|
|
409
366
|
case Scenario.AppVariant:
|
|
410
367
|
if (!sProjectId) {
|
|
411
|
-
|
|
412
|
-
throw oError;
|
|
368
|
+
throw new Error(`${sBaseErrorMessage} in the ${sScenario} scenario you additionally need a project ID`);
|
|
413
369
|
}
|
|
414
|
-
|
|
415
|
-
break;
|
|
370
|
+
return `${sRootNamespace}/${sBaseId}/appVariants/${sProjectId}/`;
|
|
416
371
|
case Scenario.AdaptationProject:
|
|
417
372
|
if (!sProjectId) {
|
|
418
|
-
|
|
419
|
-
throw oError;
|
|
373
|
+
throw new Error(`${sBaseErrorMessage} in the ${sScenario} scenario you additionally need a project ID`);
|
|
420
374
|
}
|
|
421
|
-
|
|
422
|
-
break;
|
|
375
|
+
return `${sRootNamespace}/${sBaseId}/adapt/${sProjectId}/`;
|
|
423
376
|
case Scenario.FioriElementsFromScratch:
|
|
424
377
|
case Scenario.UiAdaptation:
|
|
425
378
|
default:
|
|
426
|
-
|
|
379
|
+
return `${sRootNamespace}/${sBaseId}/`;
|
|
427
380
|
}
|
|
428
|
-
|
|
429
|
-
return sRootNamespace;
|
|
430
381
|
},
|
|
431
382
|
|
|
432
383
|
/** Returns <code>true</code> if the passed manifest object is of type "application".
|
|
@@ -437,8 +388,7 @@ sap.ui.define([
|
|
|
437
388
|
* @ui5-restricted sap.ui.fl
|
|
438
389
|
*/
|
|
439
390
|
isApplication(oManifest) {
|
|
440
|
-
|
|
441
|
-
return sComponentType === "application";
|
|
391
|
+
return getComponentType(oManifest) === "application";
|
|
442
392
|
},
|
|
443
393
|
|
|
444
394
|
/** Returns <code>true</code> if the passed component is an application component.
|
|
@@ -460,7 +410,7 @@ sap.ui.define([
|
|
|
460
410
|
* @ui5-restricted sap.ui.fl
|
|
461
411
|
*/
|
|
462
412
|
isEmbeddedComponent(oComponent) {
|
|
463
|
-
|
|
413
|
+
const oAppComponent = Utils.getAppComponentForControl(oComponent);
|
|
464
414
|
return !!(
|
|
465
415
|
oComponent instanceof Component
|
|
466
416
|
&& getComponentType(oComponent.getManifestObject()) === "component"
|
|
@@ -482,33 +432,9 @@ sap.ui.define([
|
|
|
482
432
|
* @ui5-restricted sap.ui.fl
|
|
483
433
|
*/
|
|
484
434
|
indexOfObject(aArray, oObject) {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
var aKeysArray;
|
|
488
|
-
var aKeysObject;
|
|
489
|
-
if (!oArrayObject) {
|
|
490
|
-
aKeysArray = [];
|
|
491
|
-
} else {
|
|
492
|
-
aKeysArray = Object.keys(oArrayObject);
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
if (!oObject) {
|
|
496
|
-
aKeysObject = [];
|
|
497
|
-
} else {
|
|
498
|
-
aKeysObject = Object.keys(oObject);
|
|
499
|
-
}
|
|
500
|
-
var bSameNumberOfAttributes = aKeysArray.length === aKeysObject.length;
|
|
501
|
-
var bContains = bSameNumberOfAttributes && !aKeysArray.some(function(sKey) {
|
|
502
|
-
return oArrayObject[sKey] !== oObject[sKey];
|
|
503
|
-
});
|
|
504
|
-
|
|
505
|
-
if (bContains) {
|
|
506
|
-
iObjectIndex = iIndex;
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
return bContains;
|
|
435
|
+
return aArray.findIndex((oArrayObject) => {
|
|
436
|
+
return isEqual(oArrayObject, oObject);
|
|
510
437
|
});
|
|
511
|
-
return iObjectIndex;
|
|
512
438
|
},
|
|
513
439
|
|
|
514
440
|
/**
|
|
@@ -649,16 +575,13 @@ sap.ui.define([
|
|
|
649
575
|
* @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject | undefined} Returns the change if it is in the map, otherwise undefined
|
|
650
576
|
*/
|
|
651
577
|
getChangeFromChangesMap(mChanges, sChangeId) {
|
|
652
|
-
|
|
653
|
-
Object.
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
oResult = oChange;
|
|
657
|
-
return true;
|
|
658
|
-
}
|
|
659
|
-
});
|
|
578
|
+
let oMatch;
|
|
579
|
+
Object.values(mChanges).some((aControlChanges) => {
|
|
580
|
+
oMatch = aControlChanges.find((oChange) => oChange.getId() === sChangeId);
|
|
581
|
+
return oMatch;
|
|
660
582
|
});
|
|
661
|
-
|
|
583
|
+
|
|
584
|
+
return oMatch;
|
|
662
585
|
},
|
|
663
586
|
|
|
664
587
|
/**
|
|
@@ -671,11 +594,11 @@ sap.ui.define([
|
|
|
671
594
|
* @returns {string} The modified URL
|
|
672
595
|
*/
|
|
673
596
|
handleUrlParameters(sParameters, sParameterName, sParameterValue, oURLParsingService) {
|
|
674
|
-
if (
|
|
597
|
+
if (Utils.hasParameterAndValue(sParameterName, sParameterValue, oURLParsingService)) {
|
|
675
598
|
if (sParameters.startsWith("?")) {
|
|
676
599
|
sParameters = sParameters.substr(1, sParameters.length);
|
|
677
600
|
}
|
|
678
|
-
|
|
601
|
+
const aFilterUrl = sParameters.split("&").filter((sParameter) => {
|
|
679
602
|
return sParameter !== `${sParameterName}=${sParameterValue}`;
|
|
680
603
|
});
|
|
681
604
|
sParameters = "";
|
|
@@ -697,7 +620,7 @@ sap.ui.define([
|
|
|
697
620
|
* @returns {boolean} <code>true</code> if the parameter and the given value are in the URL
|
|
698
621
|
*/
|
|
699
622
|
hasParameterAndValue(sParameterName, sParameterValue, oURLParsingService) {
|
|
700
|
-
return
|
|
623
|
+
return Utils.getParameter(sParameterName, oURLParsingService) === sParameterValue;
|
|
701
624
|
},
|
|
702
625
|
|
|
703
626
|
/**
|
|
@@ -708,13 +631,7 @@ sap.ui.define([
|
|
|
708
631
|
* @returns {string} The value of the given parameter or undefined
|
|
709
632
|
*/
|
|
710
633
|
getParameter(sParameterName, oURLParsingService) {
|
|
711
|
-
|
|
712
|
-
var mParsedHash = Utils.getParsedURLHash(oURLParsingService);
|
|
713
|
-
return mParsedHash.params &&
|
|
714
|
-
mParsedHash.params[sParameterName] &&
|
|
715
|
-
mParsedHash.params[sParameterName][0];
|
|
716
|
-
}
|
|
717
|
-
return Utils.getUrlParameter(sParameterName);
|
|
634
|
+
return Utils.getParsedURLHash(oURLParsingService)?.params?.[sParameterName]?.[0] || Utils.getUrlParameter(sParameterName);
|
|
718
635
|
},
|
|
719
636
|
|
|
720
637
|
/**
|
|
@@ -724,16 +641,7 @@ sap.ui.define([
|
|
|
724
641
|
* @returns {object} Aggregation metadata
|
|
725
642
|
*/
|
|
726
643
|
findAggregation(oControl, sAggregationName) {
|
|
727
|
-
|
|
728
|
-
if (oControl.getMetadata) {
|
|
729
|
-
var oMetadata = oControl.getMetadata();
|
|
730
|
-
var oAggregations = oMetadata.getAllAggregations();
|
|
731
|
-
if (oAggregations) {
|
|
732
|
-
return oAggregations[sAggregationName];
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
return undefined;
|
|
644
|
+
return oControl?.getMetadata?.()?.getAllAggregations?.()?.[sAggregationName];
|
|
737
645
|
},
|
|
738
646
|
|
|
739
647
|
/**
|
|
@@ -743,7 +651,7 @@ sap.ui.define([
|
|
|
743
651
|
* @returns {sap.ui.base.ManagedObject[]|Element[]} Aggregation content
|
|
744
652
|
*/
|
|
745
653
|
getAggregation(oParent, sAggregationName) {
|
|
746
|
-
|
|
654
|
+
const oAggregation = Utils.findAggregation(oParent, sAggregationName);
|
|
747
655
|
if (oAggregation) {
|
|
748
656
|
return oParent[oAggregation._sGetter]();
|
|
749
657
|
}
|
|
@@ -757,12 +665,8 @@ sap.ui.define([
|
|
|
757
665
|
* @returns {any} Value of the property
|
|
758
666
|
*/
|
|
759
667
|
getProperty(oControl, sPropertyName) {
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
var sPropertyGetter = oMetadata._sGetter;
|
|
763
|
-
return oControl[sPropertyGetter]();
|
|
764
|
-
}
|
|
765
|
-
return undefined;
|
|
668
|
+
const sPropertyGetter = oControl.getMetadata().getPropertyLikeSetting(sPropertyName)?._sGetter;
|
|
669
|
+
return oControl[sPropertyGetter]();
|
|
766
670
|
},
|
|
767
671
|
|
|
768
672
|
/**
|
|
@@ -773,7 +677,7 @@ sap.ui.define([
|
|
|
773
677
|
*/
|
|
774
678
|
getUShellService(sServiceName) {
|
|
775
679
|
if (sServiceName) {
|
|
776
|
-
|
|
680
|
+
const oUShellContainer = this.getUshellContainer();
|
|
777
681
|
if (oUShellContainer) {
|
|
778
682
|
return oUShellContainer.getServiceAsync(sServiceName);
|
|
779
683
|
}
|
|
@@ -786,18 +690,14 @@ sap.ui.define([
|
|
|
786
690
|
* @param {array} aServiceNames - List of service names
|
|
787
691
|
* @returns {Promise<object>} Resolves to an object with the requested ushell services
|
|
788
692
|
*/
|
|
789
|
-
getUShellServices(aServiceNames) {
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
mServices[sService] = aServices && aServices[iIndex];
|
|
796
|
-
return mServices;
|
|
797
|
-
}, {});
|
|
798
|
-
});
|
|
693
|
+
async getUShellServices(aServiceNames) {
|
|
694
|
+
const mServices = {};
|
|
695
|
+
for (const sServiceName of aServiceNames) {
|
|
696
|
+
mServices[sServiceName] = await this.getUShellService(sServiceName);
|
|
697
|
+
}
|
|
698
|
+
return mServices;
|
|
799
699
|
}
|
|
800
700
|
|
|
801
701
|
};
|
|
802
702
|
return Utils;
|
|
803
|
-
}
|
|
703
|
+
});
|