@openui5/sap.ui.fl 1.99.0 → 1.100.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/THIRDPARTY.txt +2 -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/Change.js +27 -5
- package/src/sap/ui/fl/ChangePersistence.js +85 -133
- package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
- package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +3 -4
- package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +3 -4
- package/src/sap/ui/fl/FakeLrepLocalStorage.js +4 -4
- package/src/sap/ui/fl/FlexController.js +9 -50
- 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/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 +10 -8
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Reverter.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +46 -2
- 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/FlexObject.js +452 -0
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +68 -0
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +21 -24
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +1 -3
- 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 +12 -10
- 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 -16
- 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/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/VariantModel.js +1 -1
- package/src/sap/ui/fl/variants/context/Component.js +2 -6
- package/src/sap/ui/fl/variants/context/controller/ContextVisibility.controller.js +5 -44
- package/src/sap/ui/fl/variants/context/i18n/i18n.properties +3 -7
- package/src/sap/ui/fl/variants/context/i18n/i18n_ar.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_bg.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_ca.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_cs.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_cy.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_da.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_de.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_el.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_en.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_en_GB.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_en_US_sappsd.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_en_US_saprigi.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_en_US_saptrc.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_es.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_es_MX.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_et.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_fi.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_fr.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_fr_CA.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_hi.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_hr.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_hu.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_id.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_it.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_iw.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_ja.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_kk.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_ko.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_lt.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_lv.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_ms.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_nl.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_no.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_pl.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_pt.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_pt_PT.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_ro.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_ru.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_sh.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_sk.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_sl.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_sv.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_th.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_tr.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_uk.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_vi.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_zh_CN.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_zh_TW.properties +2 -4
- package/src/sap/ui/fl/variants/context/view/ContextVisibility.view.xml +7 -6
- 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 +2 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +5 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +4 -2
- 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 +2 -2
- 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 +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 +2 -2
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +1 -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/AppVariantWriteAPI.js +13 -4
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +49 -4
package/THIRDPARTY.txt
CHANGED
|
@@ -197,7 +197,7 @@ License: BSD-3-Clause
|
|
|
197
197
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/BSD-3-Clause.txt
|
|
198
198
|
Contained in: src/sap.ui.core/src/sap/ui/thirdparty/sinon-qunit.js
|
|
199
199
|
|
|
200
|
-
Component: URI.js, version: 1.19.
|
|
200
|
+
Component: URI.js, version: 1.19.10
|
|
201
201
|
Copyright: Rodney Rehm
|
|
202
202
|
License: MIT
|
|
203
203
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
|
@@ -450,7 +450,7 @@ License: Apache-2.0
|
|
|
450
450
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
451
451
|
Contained in: lib/jsdoc/ui5/plugin.js
|
|
452
452
|
|
|
453
|
-
Component: SAP Theming Base Content, version: 11.1.
|
|
453
|
+
Component: SAP Theming Base Content, version: 11.1.36-SNAPSHOT
|
|
454
454
|
Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
|
|
455
455
|
License: Apache-2.0
|
|
456
456
|
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.100.1",
|
|
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.100.1",
|
|
18
|
+
"@openui5/sap.ui.core": "1.100.1"
|
|
19
19
|
}
|
|
20
20
|
}
|
package/src/sap/ui/fl/.library
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2022 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.100.1</version>
|
|
10
10
|
|
|
11
11
|
<documentation>SAPUI5 library with sap.ui.fl controls.</documentation>
|
|
12
12
|
|
package/src/sap/ui/fl/Cache.js
CHANGED
package/src/sap/ui/fl/Change.js
CHANGED
|
@@ -87,9 +87,11 @@ sap.ui.define([
|
|
|
87
87
|
Change.applyState = {
|
|
88
88
|
INITIAL: 0,
|
|
89
89
|
APPLYING: 1,
|
|
90
|
-
APPLY_FINISHED: 2,
|
|
90
|
+
APPLY_FINISHED: 2, // Deprecated
|
|
91
91
|
REVERTING: 3,
|
|
92
|
-
REVERT_FINISHED: 4
|
|
92
|
+
REVERT_FINISHED: 4,
|
|
93
|
+
APPLY_SUCCESSFUL: 5,
|
|
94
|
+
APPLY_FAILED: 6
|
|
93
95
|
};
|
|
94
96
|
|
|
95
97
|
Change.operations = {
|
|
@@ -154,10 +156,22 @@ sap.ui.define([
|
|
|
154
156
|
this.setApplyState(Change.applyState.APPLYING);
|
|
155
157
|
};
|
|
156
158
|
|
|
157
|
-
|
|
159
|
+
// Deprecated, use markSuccessful or markFailed instead
|
|
160
|
+
Change.prototype.markFinished = function(oResult, bApplySuccessful) {
|
|
158
161
|
this._aQueuedProcesses.pop();
|
|
159
162
|
this._resolveChangeProcessingPromiseWithError(Change.operations.APPLY, oResult);
|
|
160
|
-
|
|
163
|
+
var sNewApplyState = bApplySuccessful !== false
|
|
164
|
+
? Change.applyState.APPLY_SUCCESSFUL
|
|
165
|
+
: Change.applyState.APPLY_FAILED;
|
|
166
|
+
this.setApplyState(sNewApplyState);
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
Change.prototype.markSuccessful = function(oResult) {
|
|
170
|
+
this.markFinished(oResult, true);
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
Change.prototype.markFailed = function(oResult) {
|
|
174
|
+
this.markFinished(oResult, false);
|
|
161
175
|
};
|
|
162
176
|
|
|
163
177
|
Change.prototype.startReverting = function() {
|
|
@@ -174,8 +188,16 @@ sap.ui.define([
|
|
|
174
188
|
return this.getApplyState() === Change.applyState.APPLYING;
|
|
175
189
|
};
|
|
176
190
|
|
|
191
|
+
Change.prototype.isSuccessfullyApplied = function() {
|
|
192
|
+
return this.getApplyState() === Change.applyState.APPLY_SUCCESSFUL;
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
Change.prototype.hasApplyProcessFailed = function() {
|
|
196
|
+
return this.getApplyState() === Change.applyState.APPLY_FAILED;
|
|
197
|
+
};
|
|
198
|
+
|
|
177
199
|
Change.prototype.isApplyProcessFinished = function() {
|
|
178
|
-
return this.
|
|
200
|
+
return this.isSuccessfullyApplied() || this.hasApplyProcessFailed();
|
|
179
201
|
};
|
|
180
202
|
|
|
181
203
|
Change.prototype.hasRevertProcessStarted = function() {
|
|
@@ -5,53 +5,55 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/
|
|
9
|
-
"sap/ui/fl/initial/_internal/StorageUtils",
|
|
10
|
-
"sap/ui/fl/Change",
|
|
11
|
-
"sap/ui/fl/Layer",
|
|
12
|
-
"sap/ui/fl/Variant",
|
|
13
|
-
"sap/ui/fl/Utils",
|
|
14
|
-
"sap/ui/fl/LayerUtils",
|
|
15
|
-
"sap/ui/fl/Cache",
|
|
16
|
-
"sap/ui/fl/registry/Settings",
|
|
17
|
-
"sap/ui/fl/apply/_internal/changes/Applier",
|
|
18
|
-
"sap/ui/fl/write/_internal/Storage",
|
|
19
|
-
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
20
|
-
"sap/ui/core/Component",
|
|
21
|
-
"sap/ui/model/json/JSONModel",
|
|
22
|
-
"sap/ui/performance/Measurement",
|
|
8
|
+
"sap/base/util/restricted/_union",
|
|
23
9
|
"sap/base/util/includes",
|
|
24
10
|
"sap/base/util/merge",
|
|
25
|
-
"sap/base/util/restricted/_union",
|
|
26
11
|
"sap/base/util/UriParameters",
|
|
27
12
|
"sap/base/Log",
|
|
13
|
+
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
14
|
+
"sap/ui/core/Component",
|
|
15
|
+
"sap/ui/fl/apply/_internal/changes/Applier",
|
|
16
|
+
"sap/ui/fl/apply/_internal/changes/Utils",
|
|
17
|
+
"sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler",
|
|
28
18
|
"sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState",
|
|
29
19
|
"sap/ui/fl/apply/_internal/flexState/FlexState",
|
|
30
|
-
"sap/ui/fl/
|
|
20
|
+
"sap/ui/fl/initial/_internal/StorageUtils",
|
|
21
|
+
"sap/ui/fl/registry/Settings",
|
|
22
|
+
"sap/ui/fl/write/_internal/condenser/Condenser",
|
|
23
|
+
"sap/ui/fl/write/_internal/Storage",
|
|
24
|
+
"sap/ui/fl/Cache",
|
|
25
|
+
"sap/ui/fl/Change",
|
|
26
|
+
"sap/ui/fl/LayerUtils",
|
|
27
|
+
"sap/ui/fl/Layer",
|
|
28
|
+
"sap/ui/fl/Utils",
|
|
29
|
+
"sap/ui/fl/Variant",
|
|
30
|
+
"sap/ui/model/json/JSONModel",
|
|
31
|
+
"sap/ui/performance/Measurement"
|
|
31
32
|
], function(
|
|
32
|
-
|
|
33
|
-
StorageUtils,
|
|
34
|
-
Change,
|
|
35
|
-
Layer,
|
|
36
|
-
Variant,
|
|
37
|
-
Utils,
|
|
38
|
-
LayerUtils,
|
|
39
|
-
Cache,
|
|
40
|
-
Settings,
|
|
41
|
-
Applier,
|
|
42
|
-
Storage,
|
|
43
|
-
JsControlTreeModifier,
|
|
44
|
-
Component,
|
|
45
|
-
JSONModel,
|
|
46
|
-
Measurement,
|
|
33
|
+
union,
|
|
47
34
|
includes,
|
|
48
35
|
merge,
|
|
49
|
-
union,
|
|
50
36
|
UriParameters,
|
|
51
37
|
Log,
|
|
38
|
+
JsControlTreeModifier,
|
|
39
|
+
Component,
|
|
40
|
+
Applier,
|
|
41
|
+
ChangesUtils,
|
|
42
|
+
DependencyHandler,
|
|
52
43
|
VariantManagementState,
|
|
53
44
|
FlexState,
|
|
54
|
-
|
|
45
|
+
StorageUtils,
|
|
46
|
+
Settings,
|
|
47
|
+
Condenser,
|
|
48
|
+
Storage,
|
|
49
|
+
Cache,
|
|
50
|
+
Change,
|
|
51
|
+
LayerUtils,
|
|
52
|
+
Layer,
|
|
53
|
+
Utils,
|
|
54
|
+
Variant,
|
|
55
|
+
JSONModel,
|
|
56
|
+
Measurement
|
|
55
57
|
) {
|
|
56
58
|
"use strict";
|
|
57
59
|
|
|
@@ -60,10 +62,10 @@ sap.ui.define([
|
|
|
60
62
|
*
|
|
61
63
|
* @constructor
|
|
62
64
|
* @author SAP SE
|
|
63
|
-
* @version 1.
|
|
65
|
+
* @version 1.100.1
|
|
64
66
|
* @experimental Since 1.25.0
|
|
65
|
-
* @param {object} mComponent Component data to initiate <code>ChangePersistence</code> instance
|
|
66
|
-
* @param {string} mComponent.name Name of the component this instance is responsible for
|
|
67
|
+
* @param {object} mComponent - Component data to initiate <code>ChangePersistence</code> instance
|
|
68
|
+
* @param {string} mComponent.name - Name of the component this instance is responsible for
|
|
67
69
|
*/
|
|
68
70
|
var ChangePersistence = function(mComponent) {
|
|
69
71
|
this._mComponent = mComponent;
|
|
@@ -133,19 +135,17 @@ sap.ui.define([
|
|
|
133
135
|
* @param {object} oChangeOrChangeContent Change instance or content of the change
|
|
134
136
|
*
|
|
135
137
|
* @returns {boolean} <code>true</code> if all the preconditions are fulfilled
|
|
136
|
-
* @public
|
|
137
138
|
*/
|
|
138
|
-
|
|
139
|
+
function preconditionsFulfilled(oChangeOrChangeContent) {
|
|
139
140
|
var oChangeContent = oChangeOrChangeContent instanceof Change ? oChangeOrChangeContent.getDefinition() : oChangeOrChangeContent;
|
|
140
141
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
142
|
+
var bControlVariantChange = false;
|
|
143
|
+
if ((oChangeContent.fileType === "ctrl_variant") || (oChangeContent.fileType === "ctrl_variant_change") || (oChangeContent.fileType === "ctrl_variant_management_change")) {
|
|
144
|
+
bControlVariantChange = oChangeContent.variantManagementReference || oChangeContent.variantReference || (oChangeContent.selector && oChangeContent.selector.id);
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
return oChangeContent.fileType === "change" ||
|
|
148
|
-
}
|
|
147
|
+
return oChangeContent.fileType === "change" || bControlVariantChange;
|
|
148
|
+
}
|
|
149
149
|
|
|
150
150
|
/**
|
|
151
151
|
* Calls the back end asynchronously and fetches all changes for the component
|
|
@@ -201,7 +201,7 @@ sap.ui.define([
|
|
|
201
201
|
if (sCurrentLayer) {
|
|
202
202
|
aChanges = LayerUtils.filterChangeOrChangeDefinitionsByCurrentLayer(aChanges, sCurrentLayer);
|
|
203
203
|
} else if (LayerUtils.isLayerFilteringRequired(this._oUShellURLParsingService) && bFilterMaxLayer) {
|
|
204
|
-
fnFilter =
|
|
204
|
+
fnFilter = filterChangeForMaxLayer.bind(this);
|
|
205
205
|
//If layer filtering required, excludes changes in higher layer than the max layer
|
|
206
206
|
aChanges = aChanges.filter(fnFilter);
|
|
207
207
|
} else if (this._bHasChangesOverMaxLayer && !bFilterMaxLayer) {
|
|
@@ -222,21 +222,21 @@ sap.ui.define([
|
|
|
222
222
|
|
|
223
223
|
ChangePersistence.prototype._checkAndGetChangeInstances = function(aChanges, oChangeFileContent) {
|
|
224
224
|
return aChanges
|
|
225
|
-
.filter(
|
|
225
|
+
.filter(preconditionsFulfilled)
|
|
226
226
|
.map(getChangeInstance.bind(this, oChangeFileContent));
|
|
227
227
|
};
|
|
228
228
|
|
|
229
|
-
|
|
230
|
-
if (LayerUtils.isOverMaxLayer(
|
|
229
|
+
function filterChangeForMaxLayer(oChangeOrChangeContent) {
|
|
230
|
+
if (LayerUtils.isOverMaxLayer(getLayerFromChangeOrChangeContent(oChangeOrChangeContent), this._oUShellURLParsingService)) {
|
|
231
231
|
if (!this._bHasChangesOverMaxLayer) {
|
|
232
232
|
this._bHasChangesOverMaxLayer = true;
|
|
233
233
|
}
|
|
234
234
|
return false;
|
|
235
235
|
}
|
|
236
236
|
return true;
|
|
237
|
-
}
|
|
237
|
+
}
|
|
238
238
|
|
|
239
|
-
|
|
239
|
+
function getLayerFromChangeOrChangeContent(oChangeOrChangeContent) {
|
|
240
240
|
var sChangeLayer;
|
|
241
241
|
if (oChangeOrChangeContent instanceof Variant || oChangeOrChangeContent instanceof Change) {
|
|
242
242
|
sChangeLayer = oChangeOrChangeContent.getLayer();
|
|
@@ -244,7 +244,7 @@ sap.ui.define([
|
|
|
244
244
|
sChangeLayer = oChangeOrChangeContent.layer;
|
|
245
245
|
}
|
|
246
246
|
return sChangeLayer;
|
|
247
|
-
}
|
|
247
|
+
}
|
|
248
248
|
|
|
249
249
|
ChangePersistence.prototype._getAllCtrlVariantChanges = function(oChangeFileContent, bIncludeCtrlVariants, fnFilter) {
|
|
250
250
|
if (!bIncludeCtrlVariants) {
|
|
@@ -445,40 +445,6 @@ sap.ui.define([
|
|
|
445
445
|
return this._bChangesMapCreated;
|
|
446
446
|
};
|
|
447
447
|
|
|
448
|
-
ChangePersistence.prototype.changesHavingCorrectViewPrefix = function(mPropertyBag, oChange) {
|
|
449
|
-
var oModifier = mPropertyBag.modifier;
|
|
450
|
-
var oAppComponent = mPropertyBag.appComponent;
|
|
451
|
-
var oSelector = oChange.getSelector();
|
|
452
|
-
if (!oSelector || !mPropertyBag) {
|
|
453
|
-
return false;
|
|
454
|
-
}
|
|
455
|
-
if (oSelector.viewSelector) {
|
|
456
|
-
var sSelectorViewId = oModifier.getControlIdBySelector(oSelector.viewSelector, oAppComponent);
|
|
457
|
-
return sSelectorViewId === mPropertyBag.viewId;
|
|
458
|
-
}
|
|
459
|
-
var sSelectorId = oSelector.id;
|
|
460
|
-
if (sSelectorId) {
|
|
461
|
-
var sViewId;
|
|
462
|
-
if (oChange.getSelector().idIsLocal) {
|
|
463
|
-
if (oAppComponent) {
|
|
464
|
-
sViewId = oAppComponent.getLocalId(mPropertyBag.viewId);
|
|
465
|
-
}
|
|
466
|
-
} else {
|
|
467
|
-
sViewId = mPropertyBag.viewId;
|
|
468
|
-
}
|
|
469
|
-
var iIndex = 0;
|
|
470
|
-
var sSelectorIdViewPrefix;
|
|
471
|
-
do {
|
|
472
|
-
iIndex = sSelectorId.indexOf("--", iIndex);
|
|
473
|
-
sSelectorIdViewPrefix = sSelectorId.slice(0, iIndex);
|
|
474
|
-
iIndex++;
|
|
475
|
-
} while (sSelectorIdViewPrefix !== sViewId && iIndex > 0);
|
|
476
|
-
|
|
477
|
-
return sSelectorIdViewPrefix === sViewId;
|
|
478
|
-
}
|
|
479
|
-
return false;
|
|
480
|
-
};
|
|
481
|
-
|
|
482
448
|
/**
|
|
483
449
|
* Gets the changes for the given view id. The complete view prefix has to match.
|
|
484
450
|
*
|
|
@@ -504,8 +470,8 @@ sap.ui.define([
|
|
|
504
470
|
*/
|
|
505
471
|
ChangePersistence.prototype.getChangesForView = function(mPropertyBag) {
|
|
506
472
|
return this.getChangesForComponent(mPropertyBag).then(function(aChanges) {
|
|
507
|
-
return aChanges.filter(
|
|
508
|
-
}
|
|
473
|
+
return aChanges.filter(ChangesUtils.filterChangeByView.bind(undefined, mPropertyBag));
|
|
474
|
+
});
|
|
509
475
|
};
|
|
510
476
|
|
|
511
477
|
/**
|
|
@@ -672,8 +638,8 @@ sap.ui.define([
|
|
|
672
638
|
var aAllChanges = bIsCondensingEnabled ? aRelevantChangesForCondensing : aDirtyChanges;
|
|
673
639
|
var aChangesClone = aAllChanges.slice(0);
|
|
674
640
|
var aDirtyChangesClone = aDirtyChanges.slice(0);
|
|
675
|
-
var aRequests =
|
|
676
|
-
var aStates =
|
|
641
|
+
var aRequests = getRequests(aDirtyChanges);
|
|
642
|
+
var aStates = getStates(aDirtyChanges);
|
|
677
643
|
|
|
678
644
|
if (aStates.length === 1 && aRequests.length === 1 && aStates[0] === Change.states.NEW) {
|
|
679
645
|
var oCondensedChangesPromise = Promise.resolve(aChangesClone);
|
|
@@ -699,7 +665,7 @@ sap.ui.define([
|
|
|
699
665
|
if (aCondensedChanges.length) {
|
|
700
666
|
return Storage.write({
|
|
701
667
|
layer: sLayer,
|
|
702
|
-
flexObjects:
|
|
668
|
+
flexObjects: prepareDirtyChanges(aCondensedChanges),
|
|
703
669
|
transport: sRequest,
|
|
704
670
|
isLegacyVariant: false,
|
|
705
671
|
parentVersion: sParentVersion
|
|
@@ -739,33 +705,32 @@ sap.ui.define([
|
|
|
739
705
|
|
|
740
706
|
return aDirtyChanges.reduce(function(oPreviousPromise, oDirtyChange) {
|
|
741
707
|
return oPreviousPromise
|
|
742
|
-
.then(
|
|
708
|
+
.then(performSingleSaveAction.bind(undefined, oDirtyChange, oFirstNewChange, sParentVersion))
|
|
743
709
|
.then(this._updateCacheAndDirtyState.bind(this, oDirtyChange, bSkipUpdateCache));
|
|
744
710
|
}.bind(this), Promise.resolve());
|
|
745
711
|
};
|
|
746
712
|
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
};
|
|
713
|
+
function performSingleSaveAction(oDirtyChange, oFirstChange, sParentVersion) {
|
|
714
|
+
switch (oDirtyChange.getState()) {
|
|
715
|
+
case Change.states.NEW:
|
|
716
|
+
if (sParentVersion !== undefined) {
|
|
717
|
+
sParentVersion = oDirtyChange === oFirstChange ? sParentVersion : sap.ui.fl.Versions.Draft;
|
|
718
|
+
}
|
|
719
|
+
return Storage.write({
|
|
720
|
+
layer: oDirtyChange.getLayer(),
|
|
721
|
+
flexObjects: [oDirtyChange.getDefinition()],
|
|
722
|
+
transport: oDirtyChange.getRequest(),
|
|
723
|
+
parentVersion: sParentVersion
|
|
724
|
+
});
|
|
725
|
+
case Change.states.DELETED:
|
|
726
|
+
return Storage.remove({
|
|
727
|
+
flexObject: oDirtyChange.getDefinition(),
|
|
728
|
+
layer: oDirtyChange.getLayer(),
|
|
729
|
+
transport: oDirtyChange.getRequest()
|
|
730
|
+
});
|
|
731
|
+
default:
|
|
732
|
+
}
|
|
733
|
+
}
|
|
769
734
|
|
|
770
735
|
/**
|
|
771
736
|
* Updates the cache with the dirty change passed and removes it from the array of dirty changes if present.
|
|
@@ -813,7 +778,7 @@ sap.ui.define([
|
|
|
813
778
|
}, this);
|
|
814
779
|
};
|
|
815
780
|
|
|
816
|
-
|
|
781
|
+
function getRequests(aDirtyChanges) {
|
|
817
782
|
var aRequests = [];
|
|
818
783
|
|
|
819
784
|
aDirtyChanges.forEach(function(oChange) {
|
|
@@ -824,9 +789,9 @@ sap.ui.define([
|
|
|
824
789
|
});
|
|
825
790
|
|
|
826
791
|
return aRequests;
|
|
827
|
-
}
|
|
792
|
+
}
|
|
828
793
|
|
|
829
|
-
|
|
794
|
+
function getStates(aDirtyChanges) {
|
|
830
795
|
var aStates = [];
|
|
831
796
|
|
|
832
797
|
aDirtyChanges.forEach(function(oChange) {
|
|
@@ -837,9 +802,9 @@ sap.ui.define([
|
|
|
837
802
|
});
|
|
838
803
|
|
|
839
804
|
return aStates;
|
|
840
|
-
}
|
|
805
|
+
}
|
|
841
806
|
|
|
842
|
-
|
|
807
|
+
function prepareDirtyChanges(aDirtyChanges) {
|
|
843
808
|
var aChanges = [];
|
|
844
809
|
|
|
845
810
|
aDirtyChanges.forEach(function(oChange) {
|
|
@@ -847,7 +812,7 @@ sap.ui.define([
|
|
|
847
812
|
});
|
|
848
813
|
|
|
849
814
|
return aChanges;
|
|
850
|
-
}
|
|
815
|
+
}
|
|
851
816
|
|
|
852
817
|
ChangePersistence.prototype.getDirtyChanges = function() {
|
|
853
818
|
return this._aDirtyChanges;
|
|
@@ -1062,18 +1027,5 @@ sap.ui.define([
|
|
|
1062
1027
|
}.bind(this));
|
|
1063
1028
|
};
|
|
1064
1029
|
|
|
1065
|
-
/**
|
|
1066
|
-
* Send a flex/info request to the backend.
|
|
1067
|
-
*
|
|
1068
|
-
* @param {object} mPropertyBag Contains additional data needed for checking flex/info
|
|
1069
|
-
* @param {sap.ui.fl.Selector} mPropertyBag.selector Selector
|
|
1070
|
-
* @param {string} mPropertyBag.layer Layer on which the request is sent to the backend
|
|
1071
|
-
*
|
|
1072
|
-
* @returns {Promise<boolean>} Resolves the information if the application has content that can be reset and/or published
|
|
1073
|
-
*/
|
|
1074
|
-
ChangePersistence.prototype.getResetAndPublishInfo = function(mPropertyBag) {
|
|
1075
|
-
return Storage.getFlexInfo(mPropertyBag);
|
|
1076
|
-
};
|
|
1077
|
-
|
|
1078
1030
|
return ChangePersistence;
|
|
1079
1031
|
});
|
|
@@ -15,15 +15,14 @@ function(
|
|
|
15
15
|
"use strict";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Utility for storing changes in local storage.
|
|
19
19
|
*
|
|
20
|
-
* @
|
|
20
|
+
* @namespace
|
|
21
21
|
*
|
|
22
22
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.100.1
|
|
24
24
|
*
|
|
25
25
|
* @private
|
|
26
|
-
* @static
|
|
27
26
|
* @since 1.48
|
|
28
27
|
* @alias sap.ui.fl.FakeLrepConnectorLocalStorage
|
|
29
28
|
*/
|
|
@@ -15,15 +15,14 @@ function(
|
|
|
15
15
|
"use strict";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Utility for storing changes in session storage.
|
|
19
19
|
*
|
|
20
|
-
* @
|
|
20
|
+
* @namespace
|
|
21
21
|
*
|
|
22
22
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.100.1
|
|
24
24
|
*
|
|
25
25
|
* @private
|
|
26
|
-
* @static
|
|
27
26
|
* @since 1.58
|
|
28
27
|
* @alias sap.ui.fl.FakeLrepConnectorSessionStorage
|
|
29
28
|
*/
|
|
@@ -10,16 +10,16 @@ sap.ui.define([
|
|
|
10
10
|
FakeLrepConnectorLocalStorage
|
|
11
11
|
) {
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Utility handling the Fake Lrep storage for local storage;
|
|
14
|
+
*
|
|
14
15
|
* This class stays since some tests are still using this internal; We will remove this in the near future.
|
|
15
16
|
*
|
|
16
|
-
* @
|
|
17
|
+
* @namespace
|
|
17
18
|
*
|
|
18
19
|
* @author SAP SE
|
|
19
|
-
* @version 1.
|
|
20
|
+
* @version 1.100.1
|
|
20
21
|
*
|
|
21
22
|
* @private
|
|
22
|
-
* @static
|
|
23
23
|
* @since 1.48
|
|
24
24
|
* @alias sap.ui.fl.FakeLrepLocalStorage
|
|
25
25
|
*/
|
|
@@ -84,13 +84,13 @@ sap.ui.define([
|
|
|
84
84
|
* @alias sap.ui.fl.FlexController
|
|
85
85
|
* @experimental Since 1.27.0
|
|
86
86
|
* @author SAP SE
|
|
87
|
-
* @version 1.
|
|
87
|
+
* @version 1.100.1
|
|
88
88
|
*/
|
|
89
89
|
var FlexController = function(sComponentName) {
|
|
90
90
|
this._oChangePersistence = undefined;
|
|
91
91
|
this._sComponentName = sComponentName || "";
|
|
92
92
|
if (this._sComponentName) {
|
|
93
|
-
this.
|
|
93
|
+
this._oChangePersistence = ChangePersistenceFactory.getChangePersistenceForComponent(this.getComponentName());
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
|
|
@@ -107,7 +107,7 @@ sap.ui.define([
|
|
|
107
107
|
/**
|
|
108
108
|
* Sets the variant switch promise
|
|
109
109
|
*
|
|
110
|
-
* @param {
|
|
110
|
+
* @param {Promise} oPromise variant switch promise
|
|
111
111
|
*/
|
|
112
112
|
FlexController.prototype.setVariantSwitchPromise = function(oPromise) {
|
|
113
113
|
this._oVariantSwitchPromise = oPromise;
|
|
@@ -116,7 +116,7 @@ sap.ui.define([
|
|
|
116
116
|
/**
|
|
117
117
|
* Returns the variant switch promise. By default this is a resolved promise
|
|
118
118
|
*
|
|
119
|
-
* @returns {
|
|
119
|
+
* @returns {Promise} variant switch promise
|
|
120
120
|
*/
|
|
121
121
|
FlexController.prototype.waitForVariantSwitch = function() {
|
|
122
122
|
if (!this._oVariantSwitchPromise) {
|
|
@@ -161,7 +161,7 @@ sap.ui.define([
|
|
|
161
161
|
|
|
162
162
|
var oChange = this.createBaseChange(oChangeSpecificData, oAppComponent);
|
|
163
163
|
|
|
164
|
-
return
|
|
164
|
+
return ChangeHandlerStorage.getChangeHandler(oChange.getChangeType(), sControlType, oControl, JsControlTreeModifier, oChange.getLayer())
|
|
165
165
|
.then(function(oChangeHandler) {
|
|
166
166
|
if (oChangeHandler) {
|
|
167
167
|
return oChangeHandler.completeChangeContent(oChange, oChangeSpecificData, {
|
|
@@ -517,29 +517,13 @@ sap.ui.define([
|
|
|
517
517
|
|
|
518
518
|
return this._oChangePersistence.getChangesForView(mPropertyBag)
|
|
519
519
|
.then(Applier.applyAllChangesForXMLView.bind(Applier, mPropertyBag))
|
|
520
|
-
.catch(
|
|
520
|
+
.catch(handleXMLApplyError.bind(this, mPropertyBag.view));
|
|
521
521
|
};
|
|
522
522
|
|
|
523
|
-
|
|
523
|
+
function handleXMLApplyError(oView, oError) {
|
|
524
524
|
Log.error("Error processing view " + oError + ".");
|
|
525
525
|
return oView;
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
/**
|
|
529
|
-
* Retrieves the change handler for the given change and control
|
|
530
|
-
*
|
|
531
|
-
* @param {sap.ui.fl.Change} oChange - Change instance
|
|
532
|
-
* @param {string} sControlType - Mame of the ui5 control type i.e. sap.m.Button
|
|
533
|
-
* @param {sap.ui.core.Control} oControl - Control for which to retrieve the change handler
|
|
534
|
-
* @param {sap.ui.core.util.reflection.BaseTreeModifier} oModifier - Control tree modifier
|
|
535
|
-
* @returns {Promise} Change handler or undefined if not found, wrapped in a promise.
|
|
536
|
-
* @private
|
|
537
|
-
*/
|
|
538
|
-
FlexController.prototype._getChangeHandler = function(oChange, sControlType, oControl, oModifier) {
|
|
539
|
-
var sChangeType = oChange.getChangeType();
|
|
540
|
-
var sLayer = oChange.getLayer();
|
|
541
|
-
return ChangeHandlerStorage.getChangeHandler(sChangeType, sControlType, oControl, oModifier, sLayer);
|
|
542
|
-
};
|
|
526
|
+
}
|
|
543
527
|
|
|
544
528
|
/**
|
|
545
529
|
* Retrieves the changes for the complete UI5 component
|
|
@@ -568,17 +552,6 @@ sap.ui.define([
|
|
|
568
552
|
return this._oChangePersistence.checkForOpenDependenciesForControl(oSelector, oComponent);
|
|
569
553
|
};
|
|
570
554
|
|
|
571
|
-
/**
|
|
572
|
-
* Creates a new instance of sap.ui.fl.Persistence based on the current component and caches the instance in a private member
|
|
573
|
-
*
|
|
574
|
-
* @returns {sap.ui.fl.Persistence} persistence instance
|
|
575
|
-
* @private
|
|
576
|
-
*/
|
|
577
|
-
FlexController.prototype._createChangePersistence = function() {
|
|
578
|
-
this._oChangePersistence = ChangePersistenceFactory.getChangePersistenceForComponent(this.getComponentName());
|
|
579
|
-
return this._oChangePersistence;
|
|
580
|
-
};
|
|
581
|
-
|
|
582
555
|
/**
|
|
583
556
|
* Reset changes on the server
|
|
584
557
|
* If the reset is performed for an entire component, a browser reload is required.
|
|
@@ -653,19 +626,5 @@ sap.ui.define([
|
|
|
653
626
|
return this._oChangePersistence.saveDirtyChanges(oAppComponent, false, aDirtyChanges);
|
|
654
627
|
};
|
|
655
628
|
|
|
656
|
-
/**
|
|
657
|
-
* Send a flex/info request to the backend.
|
|
658
|
-
*
|
|
659
|
-
* @param {object} mPropertyBag Contains additional data needed for checking flex/info
|
|
660
|
-
* @param {sap.ui.fl.Selector} mPropertyBag.selector Selector
|
|
661
|
-
* @param {string} mPropertyBag.layer Layer on which the request is sent to the backend
|
|
662
|
-
*
|
|
663
|
-
* @returns {Promise<boolean>} Resolves the information if the application has content that can be reset and/or published
|
|
664
|
-
*/
|
|
665
|
-
FlexController.prototype.getResetAndPublishInfo = function(mPropertyBag) {
|
|
666
|
-
mPropertyBag.reference = this._sComponentName;
|
|
667
|
-
return this._oChangePersistence.getResetAndPublishInfo(mPropertyBag);
|
|
668
|
-
};
|
|
669
|
-
|
|
670
629
|
return FlexController;
|
|
671
|
-
}
|
|
630
|
+
});
|