@openui5/sap.ui.fl 1.100.0 → 1.102.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 +5 -5
- 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 +36 -23
- 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 +4 -6
- package/src/sap/ui/fl/FlexControllerFactory.js +4 -1
- package/src/sap/ui/fl/LayerUtils.js +1 -1
- package/src/sap/ui/fl/Scenario.js +27 -0
- package/src/sap/ui/fl/Utils.js +9 -7
- 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 +46 -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/controlVariants/Utils.js +9 -5
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +8 -0
- 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/flexState/FlexState.js +8 -11
- 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 +27 -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 +4 -2
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseRename.js +6 -4
- package/src/sap/ui/fl/changeHandler/HideControl.js +4 -2
- package/src/sap/ui/fl/changeHandler/MoveControls.js +10 -3
- package/src/sap/ui/fl/changeHandler/MoveElements.js +1 -1
- package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +6 -4
- package/src/sap/ui/fl/changeHandler/PropertyChange.js +4 -2
- package/src/sap/ui/fl/changeHandler/StashControl.js +17 -4
- package/src/sap/ui/fl/changeHandler/UnhideControl.js +6 -4
- package/src/sap/ui/fl/changeHandler/UnstashControl.js +7 -3
- package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +1 -1
- package/src/sap/ui/fl/changeHandler/condenser/Classification.js +43 -0
- 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 +8 -6
- 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 +7 -2
- 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 +22 -66
- package/src/sap/ui/fl/library.support.js +1 -1
- package/src/sap/ui/fl/messagebundle_fr.properties +14 -14
- 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/themes/base/VariantManagement.less +23 -21
- 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 +2 -1
- package/src/sap/ui/fl/variants/VariantModel.js +7 -1
- package/src/sap/ui/fl/write/_internal/Storage.js +7 -1
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +85 -36
- 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 +13 -11
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +5 -3
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +2 -2
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +78 -12
- 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 +27 -6
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +98 -41
- package/src/sap/ui/fl/write/_internal/transport/TransportDialog.js +13 -2
- package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +7 -4
- package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
- package/src/sap/ui/fl/write/api/FeaturesAPI.js +2 -2
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +18 -11
- package/src/sap/ui/fl/write/api/TranslationAPI.js +54 -17
- package/src/sap/ui/fl/write/api/Version.js +22 -0
- package/src/sap/ui/fl/write/api/VersionsAPI.js +90 -74
package/THIRDPARTY.txt
CHANGED
|
@@ -400,7 +400,7 @@ Contained in: src/sap.ui.mdc/test/sap/ui/mdc/sample/field/filterfieldwithoperato
|
|
|
400
400
|
|
|
401
401
|
Library: sap.ui.webc.common:
|
|
402
402
|
|
|
403
|
-
Component: UI5 Web Components, version: 1.
|
|
403
|
+
Component: UI5 Web Components, version: 1.1.2
|
|
404
404
|
Copyright: SAP
|
|
405
405
|
License: Apache-2.0
|
|
406
406
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
@@ -411,7 +411,7 @@ Contained in: src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/base/*.*
|
|
|
411
411
|
src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons-tnt/*.*
|
|
412
412
|
src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons-business-suite/*.*
|
|
413
413
|
|
|
414
|
-
Component: lit-html, version:
|
|
414
|
+
Component: lit-html, version: 2.0.1
|
|
415
415
|
Copyright: Google LLC
|
|
416
416
|
License: BSD-3-Clause
|
|
417
417
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/BSD-3-Clause.txt
|
|
@@ -420,7 +420,7 @@ Contained in: src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/lit-html/
|
|
|
420
420
|
|
|
421
421
|
Library: sap.ui.webc.fiori:
|
|
422
422
|
|
|
423
|
-
Component: UI5 Web Components, version: 1.
|
|
423
|
+
Component: UI5 Web Components, version: 1.1.2
|
|
424
424
|
Copyright: SAP
|
|
425
425
|
License: Apache-2.0
|
|
426
426
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
@@ -429,7 +429,7 @@ Contained in: src/sap.ui.webc.fiori/src/sap/ui/webc/fiori/thirdparty/*.*
|
|
|
429
429
|
|
|
430
430
|
Library: sap.ui.webc.main:
|
|
431
431
|
|
|
432
|
-
Component: UI5 Web Components, version: 1.
|
|
432
|
+
Component: UI5 Web Components, version: 1.1.2
|
|
433
433
|
Copyright: SAP
|
|
434
434
|
License: Apache-2.0
|
|
435
435
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.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.39
|
|
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.102.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.102.1",
|
|
18
|
+
"@openui5/sap.ui.core": "1.102.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.102.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
|
@@ -21,6 +21,7 @@ sap.ui.define([
|
|
|
21
21
|
"sap/ui/fl/registry/Settings",
|
|
22
22
|
"sap/ui/fl/write/_internal/condenser/Condenser",
|
|
23
23
|
"sap/ui/fl/write/_internal/Storage",
|
|
24
|
+
"sap/ui/fl/write/api/Version",
|
|
24
25
|
"sap/ui/fl/Cache",
|
|
25
26
|
"sap/ui/fl/Change",
|
|
26
27
|
"sap/ui/fl/LayerUtils",
|
|
@@ -46,6 +47,7 @@ sap.ui.define([
|
|
|
46
47
|
Settings,
|
|
47
48
|
Condenser,
|
|
48
49
|
Storage,
|
|
50
|
+
Version,
|
|
49
51
|
Cache,
|
|
50
52
|
Change,
|
|
51
53
|
LayerUtils,
|
|
@@ -62,7 +64,7 @@ sap.ui.define([
|
|
|
62
64
|
*
|
|
63
65
|
* @constructor
|
|
64
66
|
* @author SAP SE
|
|
65
|
-
* @version 1.
|
|
67
|
+
* @version 1.102.1
|
|
66
68
|
* @experimental Since 1.25.0
|
|
67
69
|
* @param {object} mComponent - Component data to initiate <code>ChangePersistence</code> instance
|
|
68
70
|
* @param {string} mComponent.name - Name of the component this instance is responsible for
|
|
@@ -714,7 +716,7 @@ sap.ui.define([
|
|
|
714
716
|
switch (oDirtyChange.getState()) {
|
|
715
717
|
case Change.states.NEW:
|
|
716
718
|
if (sParentVersion !== undefined) {
|
|
717
|
-
sParentVersion = oDirtyChange === oFirstChange ? sParentVersion :
|
|
719
|
+
sParentVersion = oDirtyChange === oFirstChange ? sParentVersion : Version.Number.Draft;
|
|
718
720
|
}
|
|
719
721
|
return Storage.write({
|
|
720
722
|
layer: oDirtyChange.getLayer(),
|
|
@@ -726,7 +728,8 @@ sap.ui.define([
|
|
|
726
728
|
return Storage.remove({
|
|
727
729
|
flexObject: oDirtyChange.getDefinition(),
|
|
728
730
|
layer: oDirtyChange.getLayer(),
|
|
729
|
-
transport: oDirtyChange.getRequest()
|
|
731
|
+
transport: oDirtyChange.getRequest(),
|
|
732
|
+
parentVersion: sParentVersion
|
|
730
733
|
});
|
|
731
734
|
default:
|
|
732
735
|
}
|
|
@@ -739,6 +742,10 @@ sap.ui.define([
|
|
|
739
742
|
* therefore, the cache update of the current app is skipped
|
|
740
743
|
*/
|
|
741
744
|
ChangePersistence.prototype._updateCacheAndDirtyState = function(oDirtyChange, bSkipUpdateCache) {
|
|
745
|
+
this._aDirtyChanges = this._aDirtyChanges.filter(function(oExistingDirtyChange) {
|
|
746
|
+
return oDirtyChange.getId() !== oExistingDirtyChange.getId();
|
|
747
|
+
});
|
|
748
|
+
|
|
742
749
|
if (!bSkipUpdateCache) {
|
|
743
750
|
if (Utils.isChangeRelatedToVariants(oDirtyChange)) {
|
|
744
751
|
VariantManagementState.updateVariantsState({
|
|
@@ -761,10 +768,6 @@ sap.ui.define([
|
|
|
761
768
|
}
|
|
762
769
|
}
|
|
763
770
|
}
|
|
764
|
-
|
|
765
|
-
this._aDirtyChanges = this._aDirtyChanges.filter(function(oExistingDirtyChange) {
|
|
766
|
-
return oDirtyChange.getId() !== oExistingDirtyChange.getId();
|
|
767
|
-
});
|
|
768
771
|
};
|
|
769
772
|
|
|
770
773
|
/**
|
|
@@ -874,6 +877,20 @@ sap.ui.define([
|
|
|
874
877
|
return (oObject.getRequest() === "$TMP" || oObject.getRequest() === "") && oObject.getLayer() === sLayer;
|
|
875
878
|
}
|
|
876
879
|
|
|
880
|
+
function isPersistedAndInLayer(sLayer, oObject) {
|
|
881
|
+
return oObject.getState() === Change.states.PERSISTED && oObject.getLayer() === sLayer;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
function getAllCompVariantsEntities() {
|
|
885
|
+
var aCompVariantEntities = [];
|
|
886
|
+
var mCompVariantsMap = FlexState.getCompVariantsMap(this.getComponentName());
|
|
887
|
+
for (var sPersistencyKey in mCompVariantsMap) {
|
|
888
|
+
for (var sId in mCompVariantsMap[sPersistencyKey].byId) {
|
|
889
|
+
aCompVariantEntities.push(mCompVariantsMap[sPersistencyKey].byId[sId]);
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
return aCompVariantEntities;
|
|
893
|
+
}
|
|
877
894
|
/**
|
|
878
895
|
* Transports all the UI changes and app variant descriptor (if exists) to the target system
|
|
879
896
|
*
|
|
@@ -884,18 +901,8 @@ sap.ui.define([
|
|
|
884
901
|
* @returns {Promise} promise that resolves when all the artifacts are successfully transported
|
|
885
902
|
*/
|
|
886
903
|
ChangePersistence.prototype.transportAllUIChanges = function(oRootControl, sStyleClass, sLayer, aAppVariantDescriptors) {
|
|
887
|
-
return
|
|
888
|
-
|
|
889
|
-
FlexState.getCompVariantsMap(this.getComponentName())// FIXME: also transport comp changes via compState
|
|
890
|
-
]).then(function(aResponses) {
|
|
891
|
-
var aLocalChanges = aResponses[0];
|
|
892
|
-
var mCompVariantsMap = aResponses[1];
|
|
893
|
-
var aCompVariantEntities = [];
|
|
894
|
-
for (var sPersistencyKey in mCompVariantsMap) {
|
|
895
|
-
for (var sId in mCompVariantsMap[sPersistencyKey].byId) {
|
|
896
|
-
aCompVariantEntities.push(mCompVariantsMap[sPersistencyKey].byId[sId]);
|
|
897
|
-
}
|
|
898
|
-
}
|
|
904
|
+
return this.getChangesForComponent({currentLayer: sLayer, includeCtrlVariants: true}).then(function(aLocalChanges) {
|
|
905
|
+
var aCompVariantEntities = getAllCompVariantsEntities.call(this);
|
|
899
906
|
|
|
900
907
|
aLocalChanges = aLocalChanges.concat(
|
|
901
908
|
aCompVariantEntities.filter(isLocalAndInLayer.bind(this, sLayer)));
|
|
@@ -989,10 +996,16 @@ sap.ui.define([
|
|
|
989
996
|
var bSelectorIdsProvided = aSelectorIds && aSelectorIds.length > 0;
|
|
990
997
|
var bChangeTypesProvided = aChangeTypes && aChangeTypes.length > 0;
|
|
991
998
|
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
999
|
+
//In case of application reset and PUBLIC layer available, also includes comp variant entities
|
|
1000
|
+
var isPublicLayerAvailable = Settings.getInstanceOrUndef() && Settings.getInstanceOrUndef().isPublicLayerAvailable();
|
|
1001
|
+
var isApplicationReset = sGenerator === undefined && aSelectorIds === undefined && aChangeTypes === undefined;
|
|
1002
|
+
var aCompVariantsEntries = [];
|
|
1003
|
+
if (isPublicLayerAvailable && isApplicationReset) {
|
|
1004
|
+
aCompVariantsEntries = getAllCompVariantsEntities.call(this).filter(isPersistedAndInLayer.bind(this, sLayer));
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
return this.getChangesForComponent({ currentLayer: sLayer, includeCtrlVariants: true}).then(function(aChanges) {
|
|
1008
|
+
aChanges = aChanges.concat(aCompVariantsEntries);
|
|
996
1009
|
var mParams = {
|
|
997
1010
|
reference: this.getComponentName(),
|
|
998
1011
|
layer: sLayer,
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage",
|
|
9
|
+
"sap/ui/fl/write/api/Version",
|
|
9
10
|
"sap/ui/fl/Utils",
|
|
10
11
|
"sap/ui/fl/Layer",
|
|
11
12
|
"sap/ui/fl/Change",
|
|
@@ -20,6 +21,7 @@ sap.ui.define([
|
|
|
20
21
|
"sap/base/Log"
|
|
21
22
|
], function(
|
|
22
23
|
ChangeHandlerStorage,
|
|
24
|
+
Version,
|
|
23
25
|
Utils,
|
|
24
26
|
Layer,
|
|
25
27
|
Change,
|
|
@@ -84,7 +86,7 @@ sap.ui.define([
|
|
|
84
86
|
* @alias sap.ui.fl.FlexController
|
|
85
87
|
* @experimental Since 1.27.0
|
|
86
88
|
* @author SAP SE
|
|
87
|
-
* @version 1.
|
|
89
|
+
* @version 1.102.1
|
|
88
90
|
*/
|
|
89
91
|
var FlexController = function(sComponentName) {
|
|
90
92
|
this._oChangePersistence = undefined;
|
|
@@ -473,11 +475,7 @@ sap.ui.define([
|
|
|
473
475
|
layer: Layer.CUSTOMER // only the customer layer has draft active
|
|
474
476
|
});
|
|
475
477
|
sParentVersion = oVersionModel.getProperty("/persistedVersion");
|
|
476
|
-
|
|
477
|
-
if (aVersions && aVersions.length > 0) {
|
|
478
|
-
var oLatestVersion = aVersions[0];
|
|
479
|
-
aDraftFilenames = oLatestVersion.version === sap.ui.fl.Versions.Draft ? oLatestVersion.filenames : undefined;
|
|
480
|
-
}
|
|
478
|
+
aDraftFilenames = oVersionModel.getProperty("/draftFilenames");
|
|
481
479
|
}
|
|
482
480
|
return this._removeOtherLayerChanges(oAppComponent, sLayer, bRemoveOtherLayerChanges)
|
|
483
481
|
.then(this._oChangePersistence.saveDirtyChanges.bind(this._oChangePersistence, oAppComponent, bSkipUpdateCache, undefined, sParentVersion, aDraftFilenames))
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
* @alias sap.ui.fl.FlexControllerFactory
|
|
33
33
|
* @experimental Since 1.27.0
|
|
34
34
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.102.1
|
|
36
36
|
*
|
|
37
37
|
* @private
|
|
38
38
|
* @ui5-restricted sap.ui.fl
|
|
@@ -144,6 +144,9 @@ sap.ui.define([
|
|
|
144
144
|
// if component's manifest is of type 'component' then no flex controller and change persistence instances are created. The variant model is fetched from the outer app component and applied on this component type.
|
|
145
145
|
if (Utils.isApplicationComponent(oComponent)) {
|
|
146
146
|
var sComponentId = oComponent.getId();
|
|
147
|
+
// TODO: remove this line when the maps and filtered response are always up to data
|
|
148
|
+
// Currently with the variants the maps are out of sync when the app gets loaded again without complete reload
|
|
149
|
+
FlexState.clearFilteredResponse(ManifestUtils.getFlexReferenceForControl(oComponent));
|
|
147
150
|
var oReturnPromise = FlexState.initialize({
|
|
148
151
|
componentId: sComponentId,
|
|
149
152
|
asyncHints: vConfig.asyncHints
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([], function() {
|
|
8
|
+
"use strict";
|
|
9
|
+
|
|
10
|
+
// TODO: move to an api-folder for external consumption
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Available scenarios
|
|
14
|
+
*
|
|
15
|
+
* @private
|
|
16
|
+
* @ui5-restricted sap.ui.fl
|
|
17
|
+
*
|
|
18
|
+
* @enum {string}
|
|
19
|
+
*/
|
|
20
|
+
return {
|
|
21
|
+
AppVariant: "APP_VARIANT",
|
|
22
|
+
VersionedAppVariant: "VERSIONED_APP_VARIANT",
|
|
23
|
+
AdaptationProject: "ADAPTATION_PROJECT",
|
|
24
|
+
FioriElementsFromScratch: "FE_FROM_SCRATCH",
|
|
25
|
+
UiAdaptation: "UI_ADAPTATION"
|
|
26
|
+
};
|
|
27
|
+
});
|
package/src/sap/ui/fl/Utils.js
CHANGED
|
@@ -14,6 +14,7 @@ sap.ui.define([
|
|
|
14
14
|
"sap/ui/base/ManagedObject",
|
|
15
15
|
"sap/ui/core/util/reflection/BaseTreeModifier",
|
|
16
16
|
"sap/ui/core/Component",
|
|
17
|
+
"sap/ui/fl/Scenario",
|
|
17
18
|
"sap/ui/thirdparty/hasher",
|
|
18
19
|
"sap/ui/thirdparty/jquery"
|
|
19
20
|
], function(
|
|
@@ -26,6 +27,7 @@ sap.ui.define([
|
|
|
26
27
|
ManagedObject,
|
|
27
28
|
BaseTreeModifier,
|
|
28
29
|
Component,
|
|
30
|
+
Scenario,
|
|
29
31
|
hasher,
|
|
30
32
|
jQuery
|
|
31
33
|
) {
|
|
@@ -37,7 +39,7 @@ sap.ui.define([
|
|
|
37
39
|
* @namespace
|
|
38
40
|
* @alias sap.ui.fl.Utils
|
|
39
41
|
* @author SAP SE
|
|
40
|
-
* @version 1.
|
|
42
|
+
* @version 1.102.1
|
|
41
43
|
* @experimental Since 1.25.0
|
|
42
44
|
*/
|
|
43
45
|
var Utils = {
|
|
@@ -584,29 +586,29 @@ sap.ui.define([
|
|
|
584
586
|
}
|
|
585
587
|
|
|
586
588
|
switch (sScenario) {
|
|
587
|
-
case
|
|
589
|
+
case Scenario.VersionedAppVariant:
|
|
588
590
|
if (!sProjectId) {
|
|
589
591
|
oError.message += "in a versioned app variant scenario you additionally need a project ID";
|
|
590
592
|
throw oError;
|
|
591
593
|
}
|
|
592
594
|
sRootNamespace += sBaseId + "/appVariants/" + sProjectId + "/";
|
|
593
595
|
break;
|
|
594
|
-
case
|
|
596
|
+
case Scenario.AppVariant:
|
|
595
597
|
if (!sProjectId) {
|
|
596
598
|
oError.message += "in an app variant scenario you additionally need a project ID";
|
|
597
599
|
throw oError;
|
|
598
600
|
}
|
|
599
601
|
sRootNamespace += sBaseId + "/appVariants/" + sProjectId + "/";
|
|
600
602
|
break;
|
|
601
|
-
case
|
|
603
|
+
case Scenario.AdaptationProject:
|
|
602
604
|
if (!sProjectId) {
|
|
603
605
|
oError.message += "in a adaptation project scenario you additionally need a project ID";
|
|
604
606
|
throw oError;
|
|
605
607
|
}
|
|
606
608
|
sRootNamespace += sBaseId + "/adapt/" + sProjectId + "/";
|
|
607
609
|
break;
|
|
608
|
-
case
|
|
609
|
-
case
|
|
610
|
+
case Scenario.FioriElementsFromScratch:
|
|
611
|
+
case Scenario.UiAdaptation:
|
|
610
612
|
default:
|
|
611
613
|
sRootNamespace += sBaseId + "/";
|
|
612
614
|
}
|
|
@@ -758,7 +760,7 @@ sap.ui.define([
|
|
|
758
760
|
.catch(function(e) {
|
|
759
761
|
var sErrorMessage = "Error during execPromiseQueueSequentially processing occured";
|
|
760
762
|
sErrorMessage += e ? ": " + e.message : "";
|
|
761
|
-
Log.error(sErrorMessage);
|
|
763
|
+
Log.error(sErrorMessage, e);
|
|
762
764
|
|
|
763
765
|
if (bThrowError) {
|
|
764
766
|
throw new Error(sErrorMessage);
|
package/src/sap/ui/fl/Variant.js
CHANGED
|
@@ -248,6 +248,22 @@ sap.ui.define([
|
|
|
248
248
|
oChange.addDependentControl(oActualOriginalControl, "originalSelector", oPropertyBag);
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
+
function registerOnAfterXMLChangeProcessingHandler(aOnAfterXMLChangeProcessingHandlers, oChangeHandler, oControl) {
|
|
252
|
+
var iChangeHandlerIndex = aOnAfterXMLChangeProcessingHandlers.findIndex(function (mHandler) {
|
|
253
|
+
return mHandler.handler === oChangeHandler;
|
|
254
|
+
});
|
|
255
|
+
if (iChangeHandlerIndex < 0) {
|
|
256
|
+
iChangeHandlerIndex = aOnAfterXMLChangeProcessingHandlers.length;
|
|
257
|
+
aOnAfterXMLChangeProcessingHandlers.push({
|
|
258
|
+
handler: oChangeHandler,
|
|
259
|
+
controls: []
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
if (!aOnAfterXMLChangeProcessingHandlers[iChangeHandlerIndex].controls.includes(oControl)) {
|
|
263
|
+
aOnAfterXMLChangeProcessingHandlers[iChangeHandlerIndex].controls.push(oControl);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
251
267
|
var Applier = {
|
|
252
268
|
/**
|
|
253
269
|
* Sets a specific precondition, which has to be fulfilled before applying all changes on control.
|
|
@@ -274,8 +290,11 @@ sap.ui.define([
|
|
|
274
290
|
*/
|
|
275
291
|
applyChangeOnControl: function(oChange, oControl, mPropertyBag) {
|
|
276
292
|
var mControl = Utils.getControlIfTemplateAffected(oChange, oControl, mPropertyBag);
|
|
293
|
+
var pHandlerPromise = mPropertyBag.changeHandler
|
|
294
|
+
? Promise.resolve(mPropertyBag.changeHandler)
|
|
295
|
+
: Utils.getChangeHandler(oChange, mControl, mPropertyBag);
|
|
277
296
|
|
|
278
|
-
return
|
|
297
|
+
return pHandlerPromise.then(function(oChangeHandler) {
|
|
279
298
|
_checkPreconditions(oChange, mPropertyBag);
|
|
280
299
|
return oChangeHandler;
|
|
281
300
|
})
|
|
@@ -405,17 +424,31 @@ sap.ui.define([
|
|
|
405
424
|
aChanges = [];
|
|
406
425
|
}
|
|
407
426
|
|
|
427
|
+
var aOnAfterXMLChangeProcessingHandlers = [];
|
|
428
|
+
|
|
408
429
|
return aChanges.reduce(function(oPreviousPromise, oChange) {
|
|
409
430
|
var oControl;
|
|
410
431
|
return oPreviousPromise
|
|
411
432
|
.then(_checkControlAndDependentSelectorControls.bind(null, oChange, mPropertyBag))
|
|
412
433
|
.then(function (oReturnedControl) {
|
|
413
434
|
oControl = oReturnedControl;
|
|
435
|
+
var mControl = Utils.getControlIfTemplateAffected(oChange, oControl, mPropertyBag);
|
|
436
|
+
return Utils.getChangeHandler(oChange, mControl, mPropertyBag);
|
|
437
|
+
})
|
|
438
|
+
.then(function (oChangeHandler) {
|
|
439
|
+
mPropertyBag.changeHandler = oChangeHandler;
|
|
414
440
|
oChange.setQueuedForApply();
|
|
415
441
|
return _checkAndAdjustChangeStatus(oControl, oChange, undefined, undefined, mPropertyBag);
|
|
416
442
|
})
|
|
417
443
|
.then(function () {
|
|
418
444
|
if (!oChange.isApplyProcessFinished()) {
|
|
445
|
+
if (typeof mPropertyBag.changeHandler.onAfterXMLChangeProcessing === "function") {
|
|
446
|
+
registerOnAfterXMLChangeProcessingHandler(
|
|
447
|
+
aOnAfterXMLChangeProcessingHandlers,
|
|
448
|
+
mPropertyBag.changeHandler,
|
|
449
|
+
oControl
|
|
450
|
+
);
|
|
451
|
+
}
|
|
419
452
|
return Applier.applyChangeOnControl(oChange, oControl, mPropertyBag);
|
|
420
453
|
}
|
|
421
454
|
return {success: true};
|
|
@@ -430,6 +463,18 @@ sap.ui.define([
|
|
|
430
463
|
});
|
|
431
464
|
}, new FlUtils.FakePromise())
|
|
432
465
|
.then(function() {
|
|
466
|
+
// Once all changes for a control are processed, call the
|
|
467
|
+
// onAfterXMLChangeProcessing hooks of all involved change handlers
|
|
468
|
+
aOnAfterXMLChangeProcessingHandlers.forEach(function (mHandler) {
|
|
469
|
+
mHandler.controls.forEach(function (oControl) {
|
|
470
|
+
try {
|
|
471
|
+
mHandler.handler.onAfterXMLChangeProcessing(oControl, mPropertyBag);
|
|
472
|
+
} catch (oError) {
|
|
473
|
+
Log.error("Error during onAfterXMLChangeProcessing", oError);
|
|
474
|
+
}
|
|
475
|
+
});
|
|
476
|
+
});
|
|
477
|
+
|
|
433
478
|
return mPropertyBag.view;
|
|
434
479
|
});
|
|
435
480
|
}
|
|
@@ -139,7 +139,7 @@ sap.ui.define([
|
|
|
139
139
|
* @namespace sap.ui.fl.apply._internal.changes.descriptor.app.AddAnnotationsToOData
|
|
140
140
|
* @experimental
|
|
141
141
|
* @since 1.87
|
|
142
|
-
* @version 1.
|
|
142
|
+
* @version 1.102.1
|
|
143
143
|
* @private
|
|
144
144
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
145
145
|
*/
|