@openui5/sap.ui.fl 1.103.1 → 1.104.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/.reuse/dep5 +17 -0
- package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +5 -0
- package/THIRDPARTY.txt +35 -2
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/Cache.js +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 +1 -1
- package/src/sap/ui/fl/Utils.js +2 -6
- package/src/sap/ui/fl/Variant.js +1 -1
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +1 -1
- 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/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/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/CompVariant.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/Variant.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +1 -1
- 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/controlVariants/Switcher.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +1 -1
- 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 +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 +1 -1
- package/src/sap/ui/fl/codeExt/CodeExtManager.js +1 -1
- 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/variants/VariantManagement.designtime.js +3 -0
- package/src/sap/ui/fl/initial/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeRegistryItem.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 +9 -9
- package/src/sap/ui/fl/support/Flexibility.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/diagnostics/Flexibility.controller.js +1 -1
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/IFrame.js +1 -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 +577 -2098
- package/src/sap/ui/fl/variants/VariantModel.js +1 -1
- 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 +11 -5
- 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 +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +9 -2
- 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 +10 -10
- 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/ReloadInfoAPI.js +101 -69
- package/src/sap/ui/fl/write/api/VersionsAPI.js +3 -1
|
@@ -26,6 +26,33 @@ sap.ui.define([
|
|
|
26
26
|
) {
|
|
27
27
|
"use strict";
|
|
28
28
|
|
|
29
|
+
var oMutators = {
|
|
30
|
+
flp: {
|
|
31
|
+
set: function(vParams, sKey, sValue) {
|
|
32
|
+
vParams[sKey] = [sValue];
|
|
33
|
+
return vParams;
|
|
34
|
+
},
|
|
35
|
+
get: function(vParams, sKey) {
|
|
36
|
+
return vParams[sKey] && vParams[sKey][0];
|
|
37
|
+
},
|
|
38
|
+
remove: function(vParams, sKey) {
|
|
39
|
+
delete vParams[sKey];
|
|
40
|
+
return vParams;
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
standalone: {
|
|
44
|
+
set: function(vParams, sKey, sValue) {
|
|
45
|
+
return Utils.handleUrlParameters(vParams, sKey, sValue);
|
|
46
|
+
},
|
|
47
|
+
get: function(vParams, sKey) {
|
|
48
|
+
return Utils.getParameter(sKey);
|
|
49
|
+
},
|
|
50
|
+
remove: function(vParams, sKey, sValue) {
|
|
51
|
+
return Utils.handleUrlParameters(vParams, sKey, sValue);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
29
56
|
function isDraftAvailable(oReloadInfo) {
|
|
30
57
|
var bUrlHasVersionParameter = !!Utils.getParameter(Version.UrlParameter, oReloadInfo.URLParsingService);
|
|
31
58
|
if (bUrlHasVersionParameter) {
|
|
@@ -98,11 +125,11 @@ sap.ui.define([
|
|
|
98
125
|
/**
|
|
99
126
|
* Checks if all contexts, personalization or drafts changes exist for controls.
|
|
100
127
|
*
|
|
101
|
-
* @param
|
|
102
|
-
* @param
|
|
103
|
-
* @param
|
|
104
|
-
* @param
|
|
105
|
-
* @param
|
|
128
|
+
* @param {object} oReloadInfo - Contains the information needed to find a reason to reload
|
|
129
|
+
* @param {sap.ui.fl.Layer} oReloadInfo.layer - Current layer
|
|
130
|
+
* @param {sap.ui.core.Control} oReloadInfo.selector - Root control instance
|
|
131
|
+
* @param {boolean} [oReloadInfo.ignoreMaxLayerParameter] - Indicates that personalization is to be checked without max layer filtering
|
|
132
|
+
* @param {object} oReloadInfo.parsedHash - Parsed URL hash
|
|
106
133
|
*
|
|
107
134
|
* @returns {Promise<object>} Promise resolving to an object with the reload reasons
|
|
108
135
|
*/
|
|
@@ -122,7 +149,7 @@ sap.ui.define([
|
|
|
122
149
|
/**
|
|
123
150
|
* Remove flex info form session storage.
|
|
124
151
|
*
|
|
125
|
-
* @param
|
|
152
|
+
* @param {object} oControl - Root control instance
|
|
126
153
|
*/
|
|
127
154
|
removeInfoSessionStorage: function(oControl) {
|
|
128
155
|
var sFlexReference = ManifestUtils.getFlexReferenceForControl(oControl);
|
|
@@ -133,9 +160,9 @@ sap.ui.define([
|
|
|
133
160
|
/**
|
|
134
161
|
* Checks if the the <code>sap-ui-fl-version</code> parameter name with the given value is contained in the URL.
|
|
135
162
|
*
|
|
136
|
-
* @param
|
|
137
|
-
* @param
|
|
138
|
-
* @param
|
|
163
|
+
* @param {object} oParameter - Object containing the parameter value to be checked
|
|
164
|
+
* @param {string} oParameter.value - Parameter value to be checked
|
|
165
|
+
* @param {sap.ushell.services.URLParsing} oURLParsingService - Unified Shell's internal URL parsing service
|
|
139
166
|
* @returns {boolean} True if the parameter with the given value is in the URL
|
|
140
167
|
*/
|
|
141
168
|
hasVersionParameterWithValue: function(oParameter, oURLParsingService) {
|
|
@@ -145,9 +172,9 @@ sap.ui.define([
|
|
|
145
172
|
/**
|
|
146
173
|
* Checks if the the <code>sap-ui-fl-max-layer</code> parameter name with the given value is contained in the URL.
|
|
147
174
|
*
|
|
148
|
-
* @param
|
|
149
|
-
* @param
|
|
150
|
-
* @param
|
|
175
|
+
* @param {object} oParameter - Object containing the parameter value to be checked
|
|
176
|
+
* @param {string} oParameter.value - Parameter value to be checked
|
|
177
|
+
* @param {sap.ushell.services.URLParsing} oURLParsingService - Unified Shell's internal URL parsing service
|
|
151
178
|
*
|
|
152
179
|
* @returns {boolean} <code>true</code> if the parameter with the given value is in the URL
|
|
153
180
|
*/
|
|
@@ -159,77 +186,77 @@ sap.ui.define([
|
|
|
159
186
|
/**
|
|
160
187
|
* Standalone: Adds the <code>sap-ui-fl-version</code> parameter to the URL or removes it.
|
|
161
188
|
*
|
|
162
|
-
* @param
|
|
163
|
-
* @param
|
|
164
|
-
* @param
|
|
165
|
-
* @param
|
|
166
|
-
* @param
|
|
167
|
-
* @param
|
|
168
|
-
* @param
|
|
169
|
-
* @param
|
|
170
|
-
* @param
|
|
189
|
+
* @param {object} oReloadInfo - Contains the information needed to add the correct URL parameters
|
|
190
|
+
* @param {sap.ui.fl.Layer} oReloadInfo.layer - Current layer
|
|
191
|
+
* @param {boolean} oReloadInfo.hasHigherLayerChanges - Indicates if higher layer changes exist
|
|
192
|
+
* @param {boolean} oReloadInfo.ignoreMaxLayerParameter - Indicates if the max layer parameter should be ignored
|
|
193
|
+
* @param {string|object} oReloadInfo.parameters - The URL parameters to be modified
|
|
194
|
+
* @param {string} oReloadInfo.versionSwitch - Indicates if we are in a version switch scenario
|
|
195
|
+
* @param {string} oReloadInfo.version - Version we want to switch to
|
|
196
|
+
* @param {string} oReloadInfo.removeVersionParameter - Indicates if the version parameter should be removed
|
|
197
|
+
* @param {string} oReloadInfo.removeDraft - Indicates if the draft parameter should be removed
|
|
198
|
+
* @param {string} sScenario - Current scenario. Can be 'flp' or 'standalone'
|
|
171
199
|
*
|
|
172
|
-
* @returns {
|
|
200
|
+
* @returns {boolean} Indicates if the parameters have changed
|
|
173
201
|
*/
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
202
|
+
handleUrlParameters: function(oReloadInfo, sScenario) {
|
|
203
|
+
var bParametersChanged = false;
|
|
204
|
+
if (!oReloadInfo.ignoreMaxLayerParameter && oReloadInfo.hasHigherLayerChanges) {
|
|
205
|
+
oReloadInfo.parameters = oMutators[sScenario].remove(oReloadInfo.parameters, LayerUtils.FL_MAX_LAYER_PARAM, oReloadInfo.layer);
|
|
206
|
+
bParametersChanged = true;
|
|
177
207
|
}
|
|
178
208
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
if (oReloadInfo.isDraftAvailable && !oReloadInfo.onExit) {
|
|
185
|
-
oReloadInfo.parameters = Utils.handleUrlParameters(oReloadInfo.parameters, Version.UrlParameter, Version.Number.Draft, oReloadInfo.URLParsingService);
|
|
209
|
+
var sCurrentVersionParameter = oMutators[sScenario].get(oReloadInfo.parameters, Version.UrlParameter);
|
|
210
|
+
if (oReloadInfo.versionSwitch && sCurrentVersionParameter !== oReloadInfo.version) {
|
|
211
|
+
oReloadInfo.parameters = oMutators[sScenario].remove(oReloadInfo.parameters, Version.UrlParameter, sCurrentVersionParameter);
|
|
212
|
+
oReloadInfo.parameters = oMutators[sScenario].set(oReloadInfo.parameters, Version.UrlParameter, oReloadInfo.version);
|
|
213
|
+
bParametersChanged = true;
|
|
186
214
|
}
|
|
187
215
|
|
|
188
|
-
if (
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
oReloadInfo.parameters = "";
|
|
216
|
+
if (
|
|
217
|
+
sCurrentVersionParameter && oReloadInfo.removeVersionParameter
|
|
218
|
+
|| sCurrentVersionParameter === Version.Number.Draft && oReloadInfo.removeDraft
|
|
219
|
+
) {
|
|
220
|
+
oReloadInfo.parameters = oMutators[sScenario].remove(oReloadInfo.parameters, Version.UrlParameter, sCurrentVersionParameter);
|
|
221
|
+
bParametersChanged = true;
|
|
195
222
|
}
|
|
196
223
|
|
|
197
|
-
return
|
|
224
|
+
return bParametersChanged;
|
|
198
225
|
},
|
|
199
226
|
|
|
200
227
|
/**
|
|
201
228
|
* Adds parameters to the parsed hash to skip personalization changes and/or apply draft changes.
|
|
202
229
|
*
|
|
203
|
-
* @param
|
|
204
|
-
* @param
|
|
205
|
-
* @param
|
|
206
|
-
* @param
|
|
207
|
-
* @param
|
|
208
|
-
* @param {sap.ushell.services.URLParsing} oReloadInfo.URLParsingService - The Unified Shell's internal URL parsing service
|
|
230
|
+
* @param {object} oReloadInfo - Contains the information needed to add the correct URL parameters
|
|
231
|
+
* @param {boolean} oReloadInfo.hasHigherLayerChanges - Indicates if higher layer changes exist
|
|
232
|
+
* @param {boolean} oReloadInfo.isDraftAvailable - Indicates if a draft is available
|
|
233
|
+
* @param {sap.ui.fl.Layer} oReloadInfo.layer - Current layer
|
|
234
|
+
* @param {string} sScenario - Current scenario. Can be 'flp' or 'standalone'
|
|
209
235
|
*
|
|
210
|
-
* @returns {
|
|
236
|
+
* @returns {boolean} <code>true</code> to indicate that the URL has been changed
|
|
211
237
|
*/
|
|
212
|
-
handleParametersOnStart: function(oReloadInfo) {
|
|
213
|
-
var
|
|
214
|
-
mParsedHash.params = mParsedHash.params || {};
|
|
215
|
-
|
|
238
|
+
handleParametersOnStart: function(oReloadInfo, sScenario) {
|
|
239
|
+
var bParametersChanged = false;
|
|
216
240
|
if (oReloadInfo.hasHigherLayerChanges) {
|
|
217
|
-
|
|
241
|
+
oReloadInfo.parameters = oMutators[sScenario].set(oReloadInfo.parameters, LayerUtils.FL_MAX_LAYER_PARAM, oReloadInfo.layer);
|
|
242
|
+
bParametersChanged = true;
|
|
218
243
|
}
|
|
244
|
+
|
|
219
245
|
if (oReloadInfo.isDraftAvailable) {
|
|
220
|
-
|
|
246
|
+
oReloadInfo.parameters = oMutators[sScenario].set(oReloadInfo.parameters, Version.UrlParameter, Version.Number.Draft);
|
|
247
|
+
bParametersChanged = true;
|
|
221
248
|
}
|
|
222
|
-
return
|
|
249
|
+
return bParametersChanged;
|
|
223
250
|
},
|
|
224
251
|
|
|
225
252
|
/**
|
|
226
253
|
* Checks if an initially available draft got activated during the current UI adaptation session.
|
|
227
254
|
*
|
|
228
|
-
* @param
|
|
229
|
-
* @param
|
|
230
|
-
* @param
|
|
231
|
-
* @param
|
|
232
|
-
* @param
|
|
255
|
+
* @param {object} oReloadInfo - Contains the information needed to check if the initial draft got activated
|
|
256
|
+
* @param {sap.ui.fl.Layer} oReloadInfo.layer - Current layer
|
|
257
|
+
* @param {sap.ui.fl.Selector} oReloadInfo.selector - Root control instance
|
|
258
|
+
* @param {boolean} oReloadInfo.versioningEnabled - Indicates if versioning is enabled by the back end
|
|
259
|
+
* @param {sap.ushell.services.URLParsing} oReloadInfo.URLParsingService - Unified Shell's internal URL parsing service
|
|
233
260
|
* @returns {boolean} <code>true</code> if a draft got activated and had a draft initially when entering UI adaptation
|
|
234
261
|
*/
|
|
235
262
|
initialDraftGotActivated: function(oReloadInfo) {
|
|
@@ -246,14 +273,14 @@ sap.ui.define([
|
|
|
246
273
|
/**
|
|
247
274
|
* Determines if a reload on exit is needed and if yes - it returns what kind of reload should happen (CrossAppNavigation or hard reload).
|
|
248
275
|
*
|
|
249
|
-
* @param
|
|
250
|
-
* @param
|
|
251
|
-
* @param
|
|
252
|
-
* @param
|
|
253
|
-
* @param
|
|
254
|
-
* @param
|
|
255
|
-
* @param
|
|
256
|
-
* @param
|
|
276
|
+
* @param {object} oReloadInfo - Contains the information needed to check if a reload on exit should happen
|
|
277
|
+
* @param {sap.ui.fl.Layer} oReloadInfo.layer - Current layer
|
|
278
|
+
* @param {boolean} oReloadInfo.isDraftAvailable - Indicates if a draft is available
|
|
279
|
+
* @param {boolean} oReloadInfo.hasHigherLayerChanges - Indicates if higher layer changes exist
|
|
280
|
+
* @param {boolean} oReloadInfo.changesNeedReload - Indicates if changes (e.g. app descriptor changes) need a hard reload
|
|
281
|
+
* @param {boolean} oReloadInfo.initialDraftGotActivated - Indicates if a draft got activated and had a draft initially when the key user entered UI adaptation
|
|
282
|
+
* @param {boolean} oReloadInfo.activeVersion - Indicates the current active version
|
|
283
|
+
* @param {sap.ushell.services.URLParsing} oReloadInfo.URLParsingService - Unified Shell's internal URL parsing service
|
|
257
284
|
*
|
|
258
285
|
* @returns {boolean} <code>true</code> if a draft got activated and had a draft initially when entering UI adaptation
|
|
259
286
|
*/
|
|
@@ -271,9 +298,14 @@ sap.ui.define([
|
|
|
271
298
|
|
|
272
299
|
oReloadInfo.hasVersionUrlParameter = !!Utils.getParameter(Version.UrlParameter, oReloadInfo.URLParsingService);
|
|
273
300
|
|
|
274
|
-
if (
|
|
275
|
-
oReloadInfo.
|
|
301
|
+
if (
|
|
302
|
+
oReloadInfo.activeVersion
|
|
303
|
+
&& oReloadInfo.activeVersion !== Version.Number.Original
|
|
304
|
+
&& oReloadInfo.hasVersionUrlParameter
|
|
305
|
+
) {
|
|
306
|
+
oReloadInfo.activeVersionNotSelected = !ReloadInfoAPI.hasVersionParameterWithValue({value: oReloadInfo.activeVersion}, oReloadInfo.URLParsingService);
|
|
276
307
|
}
|
|
308
|
+
|
|
277
309
|
oReloadInfo.hasHigherLayerChanges = ReloadInfoAPI.hasMaxLayerParameterWithValue({value: oReloadInfo.layer}, oReloadInfo.URLParsingService);
|
|
278
310
|
oReloadInfo.initialDraftGotActivated = ReloadInfoAPI.initialDraftGotActivated(oReloadInfo);
|
|
279
311
|
if (oReloadInfo.initialDraftGotActivated) {
|
|
@@ -181,6 +181,7 @@ sap.ui.define([
|
|
|
181
181
|
* @param {sap.ui.core.Control} mPropertyBag.control - Control for which the request is done
|
|
182
182
|
* @param {string} mPropertyBag.layer - Layer for which the versions should be retrieved
|
|
183
183
|
* @param {string} mPropertyBag.title - Title of the to be activated version
|
|
184
|
+
* @param {string} mPropertyBag.displayedVersion - Id of the displayed version
|
|
184
185
|
*
|
|
185
186
|
* @ui5-restricted sap.ui.rta
|
|
186
187
|
*
|
|
@@ -207,7 +208,8 @@ sap.ui.define([
|
|
|
207
208
|
reference: Utils.normalizeReference(sReference),
|
|
208
209
|
layer: mPropertyBag.layer,
|
|
209
210
|
title: mPropertyBag.title,
|
|
210
|
-
appComponent: Utils.getAppComponentForControl(mPropertyBag.control)
|
|
211
|
+
appComponent: Utils.getAppComponentForControl(mPropertyBag.control),
|
|
212
|
+
displayedVersion: mPropertyBag.displayedVersion
|
|
211
213
|
});
|
|
212
214
|
};
|
|
213
215
|
|