@openui5/sap.ui.fl 1.123.1 → 1.124.1
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/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/ChangePersistence.js +39 -48
- 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 +3 -34
- package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
- package/src/sap/ui/fl/LayerUtils.js +1 -1
- package/src/sap/ui/fl/Utils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +113 -270
- package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +2 -1
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +36 -3
- 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/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 +49 -5
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/controlVariants/URLHandler.js +28 -27
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Registry.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 +1 -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/flexObjects/getVariantAuthor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +75 -41
- 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 +30 -11
- package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +67 -70
- package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.js +14 -6
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/Utils.js +4 -0
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +8 -7
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +108 -41
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +8 -15
- package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +7 -12
- package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +15 -19
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
- package/src/sap/ui/fl/apply/api/DelegateMediatorAPI.js +13 -86
- package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +14 -11
- 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 +14 -29
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseRename.js +1 -1
- package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/MoveControls.js +1 -1
- package/src/sap/ui/fl/changeHandler/MoveElements.js +1 -1
- 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 +1 -1
- package/src/sap/ui/fl/changeHandler/UnhideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/UnstashControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +2 -2
- package/src/sap/ui/fl/changeHandler/common/createIFrame.js +5 -2
- package/src/sap/ui/fl/descriptorRelated/Utils.js +16 -7
- 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 +26 -0
- package/src/sap/ui/fl/designtime/util/editIFrame.js +8 -5
- package/src/sap/ui/fl/initial/_internal/FlexConfiguration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/Storage.js +5 -2
- package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +1 -1
- 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/KeyUserConnector.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_sh.properties +9 -9
- package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +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/support/apps/contentbrowser/view/ContentDetails.view.xml +0 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/view/ContentDetailsEdit.view.xml +0 -1
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/IFrame.js +51 -64
- package/src/sap/ui/fl/util/IFrameRenderer.js +15 -9
- 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/VariantModel.js +5 -5
- package/src/sap/ui/fl/write/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +1 -1
- 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 +2 -2
- 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/BtpServiceConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +1 -1
- 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/delegates/ODataV2ReadDelegate.js +5 -5
- package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.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 +12 -23
- 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 +63 -95
- package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +2 -1
- 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/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/LocalResetAPI.js +9 -8
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +3 -7
- package/src/sap/ui/fl/write/api/SACIntegrationUpdateVariant.js +78 -0
- package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +9 -1
- package/src/sap/ui/fl/apply/_internal/DelegateMediatorNew.js +0 -193
- package/src/sap/ui/fl/apply/_internal/flexState/appDescriptorChanges/prepareAppDescriptorMap.js +0 -39
|
@@ -18,7 +18,7 @@ sap.ui.define([
|
|
|
18
18
|
* Available for both runtime and build {@link sap.ui.fl.apply._internal.changes.descriptor.Registration}.
|
|
19
19
|
*
|
|
20
20
|
* @namespace sap.ui.fl.apply._internal.changes.descriptor.ovp.DeleteCard
|
|
21
|
-
* @version 1.
|
|
21
|
+
* @version 1.124.1
|
|
22
22
|
* @private
|
|
23
23
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
24
24
|
*/
|
|
@@ -21,7 +21,7 @@ sap.ui.define([
|
|
|
21
21
|
*
|
|
22
22
|
* @namespace
|
|
23
23
|
* @alias sap.ui.fl.apply._internal.changes.descriptor.ui5.SetMinUI5Version
|
|
24
|
-
* @version 1.
|
|
24
|
+
* @version 1.124.1
|
|
25
25
|
* @private
|
|
26
26
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
27
27
|
*/
|
|
@@ -40,11 +40,55 @@ sap.ui.define([
|
|
|
40
40
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
41
41
|
*/
|
|
42
42
|
applyChange(oManifest, oChange) {
|
|
43
|
-
//
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
// General Rules:
|
|
44
|
+
// Compare major versions with each other and set always highest version.
|
|
45
|
+
// Major version which is only included in one (base app or change) will be dropped.
|
|
46
|
+
// If no major version remains throw exception.
|
|
47
|
+
// If change has more than one entry: Additionally check that for version major 1.x.x that minimum version is 1.120.0.
|
|
48
|
+
// If result has only one value then reduce to type string.
|
|
49
|
+
|
|
50
|
+
var aChangeMinUI5Version = oChange.getContent().minUI5Version;
|
|
51
|
+
if (!aChangeMinUI5Version) {
|
|
52
|
+
throw new Error("No minUI5Version in change content provided");
|
|
53
|
+
}
|
|
54
|
+
if (typeof aChangeMinUI5Version === "string") {
|
|
55
|
+
aChangeMinUI5Version = [aChangeMinUI5Version];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const mChangeMinUi5Version = {};
|
|
59
|
+
aChangeMinUI5Version.forEach(function(changeMinUI5Version) {
|
|
60
|
+
const oVersion = new Version(changeMinUI5Version);
|
|
61
|
+
if (mChangeMinUi5Version[oVersion.getMajor()]) {
|
|
62
|
+
throw new Error("Each major version can only be provided once in minUI5Version of change content");
|
|
63
|
+
}
|
|
64
|
+
mChangeMinUi5Version[oVersion.getMajor()] = [changeMinUI5Version, oVersion];
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
var {minUI5Version: aMinUI5Version} = oManifest["sap.ui5"].dependencies;
|
|
68
|
+
if (!aMinUI5Version) {
|
|
69
|
+
throw new Error("sap.ui5/dependencies/minUI5Version missing in base manifest");
|
|
70
|
+
}
|
|
71
|
+
if (typeof aMinUI5Version === "string") {
|
|
72
|
+
aMinUI5Version = [aMinUI5Version];
|
|
47
73
|
}
|
|
74
|
+
|
|
75
|
+
aMinUI5Version = aMinUI5Version.map(function(sCurrMinUI5Version) {
|
|
76
|
+
const oCurrMinUI5Version = new Version(sCurrMinUI5Version);
|
|
77
|
+
const aChangeVersionForMajor = mChangeMinUi5Version[oCurrMinUI5Version.getMajor()];
|
|
78
|
+
if (!aChangeVersionForMajor) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
const [sChangeMinUI5VersionForMajor, oChangeMinUI5VersionForMajor] = aChangeVersionForMajor;
|
|
82
|
+
|
|
83
|
+
return (oCurrMinUI5Version.compareTo(oChangeMinUI5VersionForMajor) <= 0) ?
|
|
84
|
+
sChangeMinUI5VersionForMajor : sCurrMinUI5Version;
|
|
85
|
+
}).filter((sMinVersion) => sMinVersion);
|
|
86
|
+
|
|
87
|
+
if (aMinUI5Version.length === 0) {
|
|
88
|
+
throw new Error("Upgrade/Downgrade for different major version not possible");
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
oManifest["sap.ui5"].dependencies.minUI5Version = aMinUI5Version.length === 1 ? aMinUI5Version[0] : aMinUI5Version;
|
|
48
92
|
return oManifest;
|
|
49
93
|
}
|
|
50
94
|
|
|
@@ -96,59 +96,59 @@ sap.ui.define([
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
|
-
* Navigation filter attached to the ushell
|
|
99
|
+
* Navigation filter attached to the ushell ShellNavigationInternal service.
|
|
100
100
|
* Each time a shell navigation occurs this function is called.
|
|
101
101
|
*
|
|
102
102
|
* @param {sap.ui.fl.variants.VariantModel} oModel - Variant Model
|
|
103
103
|
* @param {string} sNewHash - New hash
|
|
104
104
|
*
|
|
105
|
-
* @returns {string} Value that signifies "Continue" navigation in the "
|
|
106
|
-
* (see {@link sap.ushell.services.
|
|
105
|
+
* @returns {string} Value that signifies "Continue" navigation in the "ShellNavigationInternal" service of ushell
|
|
106
|
+
* (see {@link sap.ushell.services.ShellNavigationInternal})
|
|
107
107
|
*
|
|
108
108
|
* @private
|
|
109
109
|
*/
|
|
110
110
|
function _handleVariantIdChangeInURL(oModel, sNewHash) {
|
|
111
111
|
try {
|
|
112
|
-
|
|
112
|
+
const oURLParsingService = oModel.getUShellService("URLParsing");
|
|
113
113
|
if (oURLParsingService) {
|
|
114
|
-
|
|
114
|
+
const oNewParsedHash = oURLParsingService.parseShellHash(sNewHash);
|
|
115
115
|
_checkAndUpdateURLParameters(oNewParsedHash, oModel);
|
|
116
116
|
}
|
|
117
117
|
} catch (oError) {
|
|
118
118
|
Log.error(oError.message);
|
|
119
119
|
}
|
|
120
|
-
|
|
121
|
-
return
|
|
120
|
+
const oShellNavigationInternalService = oModel.getUShellService("ShellNavigationInternal");
|
|
121
|
+
return oShellNavigationInternalService && oShellNavigationInternalService.NavigationFilterStatus.Continue;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
|
-
* Registers navigation filter function for the ushell
|
|
125
|
+
* Registers navigation filter function for the ushell ShellNavigationInternal service.
|
|
126
126
|
*
|
|
127
127
|
* @param {sap.ui.fl.variants.VariantModel} oModel - Variant Model
|
|
128
128
|
*
|
|
129
129
|
* @private
|
|
130
130
|
*/
|
|
131
131
|
function _registerNavigationFilter(oModel) {
|
|
132
|
-
|
|
132
|
+
const oShellNavigationInternalService = oModel.getUShellService("ShellNavigationInternal");
|
|
133
133
|
if (!_mVariantIdChangeHandlers[oModel.sFlexReference]) {
|
|
134
134
|
_mVariantIdChangeHandlers[oModel.sFlexReference] = _handleVariantIdChangeInURL.bind(null, oModel);
|
|
135
|
-
if (
|
|
136
|
-
|
|
135
|
+
if (oShellNavigationInternalService) {
|
|
136
|
+
oShellNavigationInternalService.registerNavigationFilter(_mVariantIdChangeHandlers[oModel.sFlexReference]);
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
/**
|
|
142
|
-
* De-registers navigation filter function for the ushell
|
|
142
|
+
* De-registers navigation filter function for the ushell ShellNavigationInternal service.
|
|
143
143
|
*
|
|
144
144
|
* @param {sap.ui.fl.variants.VariantModel} oModel - Variant Model
|
|
145
145
|
*
|
|
146
146
|
* @private
|
|
147
147
|
*/
|
|
148
148
|
function _deRegisterNavigationFilter(oModel) {
|
|
149
|
-
|
|
150
|
-
if (
|
|
151
|
-
|
|
149
|
+
const oShellNavigationInternalService = oModel.getUShellService("ShellNavigationInternal");
|
|
150
|
+
if (oShellNavigationInternalService) {
|
|
151
|
+
oShellNavigationInternalService.unregisterNavigationFilter(_mVariantIdChangeHandlers[oModel.sFlexReference]);
|
|
152
152
|
delete _mVariantIdChangeHandlers[oModel.sFlexReference];
|
|
153
153
|
}
|
|
154
154
|
}
|
|
@@ -166,17 +166,14 @@ sap.ui.define([
|
|
|
166
166
|
* @private
|
|
167
167
|
*/
|
|
168
168
|
function setTechnicalURLParameterValues(mPropertyBag) {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
const oModel = mPropertyBag.model;
|
|
170
|
+
const oURLParsingService = oModel.getUShellService("URLParsing");
|
|
171
|
+
const oNavigationService = oModel.getUShellService("Navigation");
|
|
172
|
+
const oParsedHash = oURLParsingService && oURLParsingService.parseShellHash(hasher.getHash());
|
|
173
173
|
|
|
174
174
|
if (oParsedHash && oParsedHash.params) {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
&& oModel.oAppComponent.getComponentData
|
|
178
|
-
&& oModel.oAppComponent.getComponentData()
|
|
179
|
-
&& oModel.oAppComponent.getComponentData().technicalParameters;
|
|
175
|
+
const mOldHashParams = Object.assign({}, oParsedHash.params);
|
|
176
|
+
const mTechnicalParameters = oModel.oAppComponent?.getComponentData?.()?.technicalParameters;
|
|
180
177
|
// if mTechnicalParameters are not available we write a warning and continue updating the hash
|
|
181
178
|
if (!mTechnicalParameters) {
|
|
182
179
|
Log.warning(
|
|
@@ -186,11 +183,15 @@ sap.ui.define([
|
|
|
186
183
|
if (mPropertyBag.parameters.length === 0) {
|
|
187
184
|
delete oParsedHash.params[VariantUtil.VARIANT_TECHNICAL_PARAMETER];
|
|
188
185
|
// Case when ControlVariantsAPI.clearVariantParameterInURL is called with a parameter
|
|
189
|
-
mTechnicalParameters
|
|
186
|
+
if (mTechnicalParameters) {
|
|
187
|
+
delete mTechnicalParameters[VariantUtil.VARIANT_TECHNICAL_PARAMETER];
|
|
188
|
+
}
|
|
190
189
|
} else {
|
|
191
190
|
oParsedHash.params[VariantUtil.VARIANT_TECHNICAL_PARAMETER] = mPropertyBag.parameters;
|
|
192
191
|
// Technical parameters need to be in sync with the URL hash
|
|
193
|
-
|
|
192
|
+
if (mTechnicalParameters) {
|
|
193
|
+
mTechnicalParameters[VariantUtil.VARIANT_TECHNICAL_PARAMETER] = mPropertyBag.parameters;
|
|
194
|
+
}
|
|
194
195
|
}
|
|
195
196
|
|
|
196
197
|
if (mPropertyBag.silent) {
|
|
@@ -198,7 +199,7 @@ sap.ui.define([
|
|
|
198
199
|
hasher.replaceHash(oURLParsingService.constructShellHash(oParsedHash));
|
|
199
200
|
hasher.changed.active = true; // re-enable changed signal
|
|
200
201
|
} else if (!deepEqual(mOldHashParams, oParsedHash.params)) {
|
|
201
|
-
|
|
202
|
+
oNavigationService.navigate({
|
|
202
203
|
target: {
|
|
203
204
|
semanticObject: oParsedHash.semanticObject,
|
|
204
205
|
action: oParsedHash.action,
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
* @extends sap.ui.fl.apply._internal.flexObjects.Variant
|
|
33
33
|
* @alias sap.ui.fl.apply._internal.flexObjects.CompVariant
|
|
34
34
|
* @since 1.103
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.124.1
|
|
36
36
|
* @private
|
|
37
37
|
* @ui5-restricted sap.ui.fl, sap.ui.comp
|
|
38
38
|
*/
|
|
@@ -20,7 +20,7 @@ sap.ui.define([
|
|
|
20
20
|
* @extends sap.ui.fl.apply._internal.flexObjects.FlexObject
|
|
21
21
|
* @alias sap.ui.fl.apply._internal.flexObjects.ControllerExtensionChange
|
|
22
22
|
* @since 1.105
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.124.1
|
|
24
24
|
* @private
|
|
25
25
|
* @ui5-restricted sap.ui.fl
|
|
26
26
|
*/
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/base/util/restricted/_omit",
|
|
9
|
+
"sap/base/util/Deferred",
|
|
9
10
|
"sap/base/util/each",
|
|
10
11
|
"sap/base/util/merge",
|
|
11
12
|
"sap/base/util/ObjectPath",
|
|
@@ -13,7 +14,6 @@ sap.ui.define([
|
|
|
13
14
|
"sap/ui/core/Component",
|
|
14
15
|
"sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory",
|
|
15
16
|
"sap/ui/fl/apply/_internal/flexObjects/States",
|
|
16
|
-
"sap/ui/fl/apply/_internal/flexState/appDescriptorChanges/prepareAppDescriptorMap",
|
|
17
17
|
"sap/ui/fl/apply/_internal/flexState/compVariants/prepareCompVariantsMap",
|
|
18
18
|
"sap/ui/fl/apply/_internal/flexState/DataSelector",
|
|
19
19
|
"sap/ui/fl/apply/_internal/flexState/InitialPrepareFunctions",
|
|
@@ -25,6 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
"sap/ui/fl/requireAsync"
|
|
26
26
|
], function(
|
|
27
27
|
_omit,
|
|
28
|
+
Deferred,
|
|
28
29
|
each,
|
|
29
30
|
merge,
|
|
30
31
|
ObjectPath,
|
|
@@ -32,7 +33,6 @@ sap.ui.define([
|
|
|
32
33
|
Component,
|
|
33
34
|
FlexObjectFactory,
|
|
34
35
|
States,
|
|
35
|
-
prepareAppDescriptorMap,
|
|
36
36
|
prepareCompVariantsMap,
|
|
37
37
|
DataSelector,
|
|
38
38
|
InitialPrepareFunctions,
|
|
@@ -45,13 +45,14 @@ sap.ui.define([
|
|
|
45
45
|
) {
|
|
46
46
|
"use strict";
|
|
47
47
|
|
|
48
|
+
const sAppDescriptorNamespace = "sap.ui.fl.apply._internal.flexObjects.AppDescriptorChange";
|
|
49
|
+
|
|
48
50
|
/**
|
|
49
51
|
* Flex state class to persist maps and raw state (cache) for a given component reference.
|
|
50
52
|
* The persistence happens inside an object mapped to the component reference, with the following properties:
|
|
51
53
|
*
|
|
52
54
|
* {
|
|
53
55
|
* preparedMaps: {
|
|
54
|
-
* appDescriptorMap: {},
|
|
55
56
|
* compVariantsMap: {},
|
|
56
57
|
* },
|
|
57
58
|
* storageResponse: {
|
|
@@ -87,7 +88,7 @@ sap.ui.define([
|
|
|
87
88
|
*
|
|
88
89
|
* @namespace sap.ui.fl.apply._internal.flexState.FlexState
|
|
89
90
|
* @since 1.73
|
|
90
|
-
* @version 1.
|
|
91
|
+
* @version 1.124.1
|
|
91
92
|
* @private
|
|
92
93
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
93
94
|
*/
|
|
@@ -98,7 +99,6 @@ sap.ui.define([
|
|
|
98
99
|
var _oChangePersistenceFactory;
|
|
99
100
|
var _mFlexObjectInfo = {
|
|
100
101
|
appDescriptorChanges: {
|
|
101
|
-
prepareFunction: prepareAppDescriptorMap,
|
|
102
102
|
pathInResponse: []
|
|
103
103
|
},
|
|
104
104
|
changes: {
|
|
@@ -211,6 +211,20 @@ sap.ui.define([
|
|
|
211
211
|
}
|
|
212
212
|
});
|
|
213
213
|
|
|
214
|
+
const oAppDescriptorChangesDataSelector = new DataSelector({
|
|
215
|
+
id: "appDescriptorChanges",
|
|
216
|
+
parentDataSelector: oFlexObjectsDataSelector,
|
|
217
|
+
executeFunction(aFlexObjects) {
|
|
218
|
+
return aFlexObjects.filter((oFlexObject) => {
|
|
219
|
+
return oFlexObject.isA(sAppDescriptorNamespace);
|
|
220
|
+
});
|
|
221
|
+
},
|
|
222
|
+
checkInvalidation(mParameters, oUpdateInfo) {
|
|
223
|
+
const bRelevantType = ["addFlexObject", "removeFlexObject"].includes(oUpdateInfo.type);
|
|
224
|
+
return bRelevantType && oUpdateInfo.updatedObject?.isA(sAppDescriptorNamespace);
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
|
|
214
228
|
function getInstanceEntryOrThrowError(sReference, sMapName) {
|
|
215
229
|
if (!_mInstances[sReference]) {
|
|
216
230
|
initializeEmptyState(sReference);
|
|
@@ -237,10 +251,6 @@ sap.ui.define([
|
|
|
237
251
|
oFlexObjectsDataSelector.checkUpdate({ reference: sReference });
|
|
238
252
|
}
|
|
239
253
|
|
|
240
|
-
function getAppDescriptorMap(sReference) {
|
|
241
|
-
return getInstanceEntryOrThrowError(sReference, "appDescriptorChanges");
|
|
242
|
-
}
|
|
243
|
-
|
|
244
254
|
function getCompVariantsMap(sReference) {
|
|
245
255
|
return getInstanceEntryOrThrowError(sReference, "compVariants");
|
|
246
256
|
}
|
|
@@ -361,32 +371,28 @@ sap.ui.define([
|
|
|
361
371
|
return mFilteredReturn;
|
|
362
372
|
}
|
|
363
373
|
|
|
364
|
-
function loadFlexData(mPropertyBag) {
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
allContextsProvided: mPropertyBag.allContextsProvided
|
|
379
|
-
});
|
|
380
|
-
|
|
381
|
-
storeInfoInSession(mPropertyBag.reference, mResponse);
|
|
382
|
-
|
|
383
|
-
// no further changes to storageResponse properties allowed
|
|
384
|
-
Object.freeze(_mInstances[mPropertyBag.reference].storageResponse);
|
|
385
|
-
Object.freeze(_mInstances[mPropertyBag.reference].unfilteredStorageResponse);
|
|
386
|
-
return mResponse;
|
|
374
|
+
async function loadFlexData(mPropertyBag) {
|
|
375
|
+
const mResponse = await Loader.loadFlexData(mPropertyBag);
|
|
376
|
+
if (!mPropertyBag.partialFlexState) {
|
|
377
|
+
mResponse.authors = await Loader.loadVariantsAuthors(mPropertyBag.reference);
|
|
378
|
+
}
|
|
379
|
+
// The following line is used by the Flex Support Tool to set breakpoints - please adjust the tool if you change it!
|
|
380
|
+
_mInstances[mPropertyBag.reference] = merge({}, {
|
|
381
|
+
unfilteredStorageResponse: mResponse,
|
|
382
|
+
preparedMaps: {},
|
|
383
|
+
componentId: mPropertyBag.componentId,
|
|
384
|
+
componentData: mPropertyBag.componentData,
|
|
385
|
+
partialFlexState: mPropertyBag.partialFlexState,
|
|
386
|
+
version: mPropertyBag.version,
|
|
387
|
+
allContextsProvided: mPropertyBag.allContextsProvided
|
|
387
388
|
});
|
|
388
389
|
|
|
389
|
-
|
|
390
|
+
storeInfoInSession(mPropertyBag.reference, mResponse);
|
|
391
|
+
|
|
392
|
+
// no further changes to storageResponse properties allowed
|
|
393
|
+
Object.freeze(_mInstances[mPropertyBag.reference].storageResponse);
|
|
394
|
+
Object.freeze(_mInstances[mPropertyBag.reference].unfilteredStorageResponse);
|
|
395
|
+
return mResponse;
|
|
390
396
|
}
|
|
391
397
|
|
|
392
398
|
function storeInfoInSession(sReference, mResponse) {
|
|
@@ -454,7 +460,9 @@ sap.ui.define([
|
|
|
454
460
|
reInitialize: true,
|
|
455
461
|
componentId: ""
|
|
456
462
|
};
|
|
457
|
-
|
|
463
|
+
const oNewInitPromise = new Deferred();
|
|
464
|
+
_mInitPromises[sReference] = oNewInitPromise;
|
|
465
|
+
oNewInitPromise.resolve();
|
|
458
466
|
initializeNewInstance({ reference: sReference });
|
|
459
467
|
}
|
|
460
468
|
|
|
@@ -482,13 +490,18 @@ sap.ui.define([
|
|
|
482
490
|
* @returns {Promise<undefined>} Resolves a promise as soon as FlexState is initialized
|
|
483
491
|
*/
|
|
484
492
|
FlexState.initialize = async function(mPropertyBag) {
|
|
485
|
-
await lazyLoadModules();
|
|
486
493
|
const mProperties = merge({}, mPropertyBag);
|
|
487
494
|
enhancePropertyBag(mProperties);
|
|
488
|
-
|
|
495
|
+
const sFlexReference = mProperties.reference;
|
|
496
|
+
|
|
497
|
+
const oOldInitPromise = _mInitPromises[sFlexReference];
|
|
498
|
+
// TODO: Switch to native promises once lazyLoadModules is removed, todos#2
|
|
499
|
+
const oNewInitPromise = new Deferred();
|
|
500
|
+
_mInitPromises[sFlexReference] = oNewInitPromise;
|
|
501
|
+
await lazyLoadModules();
|
|
489
502
|
|
|
490
|
-
if (
|
|
491
|
-
await
|
|
503
|
+
if (oOldInitPromise) {
|
|
504
|
+
await oOldInitPromise.promise;
|
|
492
505
|
checkPartialFlexState(mProperties);
|
|
493
506
|
checkComponentId(mProperties);
|
|
494
507
|
checkVersionAndAllContexts(mProperties);
|
|
@@ -502,6 +515,24 @@ sap.ui.define([
|
|
|
502
515
|
}
|
|
503
516
|
|
|
504
517
|
initializeNewInstance(mProperties);
|
|
518
|
+
oNewInitPromise.resolve();
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Waits until the FlexState is initialized
|
|
523
|
+
* This is only necessary if <code>FlexState.initialize</code> cannot be called directly
|
|
524
|
+
* due to missing information for the backend request (e.g. asyncHints)
|
|
525
|
+
*
|
|
526
|
+
* @param {string} sFlexReference - Flex reference of the app
|
|
527
|
+
* @returns {Promise<undefined>} Promise that resolves as soon as FlexState is initialized
|
|
528
|
+
*/
|
|
529
|
+
FlexState.waitForInitialization = function(sFlexReference) {
|
|
530
|
+
const oInitPromise = _mInitPromises[sFlexReference]?.promise;
|
|
531
|
+
if (!oInitPromise) {
|
|
532
|
+
Log.error("FlexState.waitForInitialization was called before FlexState.initialize");
|
|
533
|
+
return Promise.resolve();
|
|
534
|
+
}
|
|
535
|
+
return oInitPromise;
|
|
505
536
|
};
|
|
506
537
|
|
|
507
538
|
/**
|
|
@@ -543,7 +574,9 @@ sap.ui.define([
|
|
|
543
574
|
_oChangePersistenceFactory._instanceCache[sReference].removeDirtyChanges();
|
|
544
575
|
}
|
|
545
576
|
|
|
546
|
-
await _mInitPromises[sReference];
|
|
577
|
+
await _mInitPromises[sReference].promise;
|
|
578
|
+
const oNewInitPromise = new Deferred();
|
|
579
|
+
_mInitPromises[sReference] = oNewInitPromise;
|
|
547
580
|
await loadFlexData(mPropertyBag);
|
|
548
581
|
_mInstances[sReference].storageResponse = filterByMaxLayer(sReference, _mInstances[sReference].unfilteredStorageResponse);
|
|
549
582
|
_mInstances[sReference].maxLayer = FlexInfoSession.getByReference(sReference).maxLayer;
|
|
@@ -555,6 +588,7 @@ sap.ui.define([
|
|
|
555
588
|
if (bUpdated) {
|
|
556
589
|
oFlexObjectsDataSelector.checkUpdate({ reference: sReference });
|
|
557
590
|
}
|
|
591
|
+
oNewInitPromise.resolve();
|
|
558
592
|
};
|
|
559
593
|
|
|
560
594
|
function getChangeCategory(oChangeDefinition) {
|
|
@@ -835,7 +869,7 @@ sap.ui.define([
|
|
|
835
869
|
};
|
|
836
870
|
|
|
837
871
|
FlexState.getAppDescriptorChanges = function(sReference) {
|
|
838
|
-
return
|
|
872
|
+
return oAppDescriptorChangesDataSelector.get({ reference: sReference });
|
|
839
873
|
};
|
|
840
874
|
|
|
841
875
|
FlexState.getUI2Personalization = function(sReference) {
|
|
@@ -854,7 +888,7 @@ sap.ui.define([
|
|
|
854
888
|
// TODO: also used by the CompVariantState to mutate the storage response, this has to be changed
|
|
855
889
|
FlexState.getStorageResponse = function(sReference) {
|
|
856
890
|
if (_mInitPromises[sReference]) {
|
|
857
|
-
return _mInitPromises[sReference].then(function() {
|
|
891
|
+
return _mInitPromises[sReference].promise.then(function() {
|
|
858
892
|
return _mInstances[sReference].unfilteredStorageResponse;
|
|
859
893
|
});
|
|
860
894
|
}
|