@openui5/sap.ui.fl 1.120.6 → 1.121.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 +23 -21
- package/THIRDPARTY.txt +6 -43
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/ChangePersistence.js +38 -133
- 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 +28 -15
- package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
- package/src/sap/ui/fl/LayerUtils.js +5 -5
- package/src/sap/ui/fl/Utils.js +15 -18
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +19 -20
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +6 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +9 -3
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +2 -2
- 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/URLHandler.js +17 -11
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +7 -19
- package/src/sap/ui/fl/{write → apply}/_internal/extensionPoint/Registry.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +1 -3
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +13 -7
- package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +3 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +8 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor.js +47 -0
- package/src/sap/ui/fl/apply/_internal/flexState/DataSelector.js +124 -34
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +118 -45
- package/src/sap/ui/fl/apply/_internal/flexState/InitialPrepareFunctions.js +25 -9
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +17 -3
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +21 -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 +108 -104
- package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +93 -34
- package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.js +195 -0
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +7 -6
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/Utils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/prepareCompVariantsMap.js +6 -6
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +89 -11
- package/src/sap/ui/fl/apply/_internal/preprocessors/ComponentLifecycleHooks.js +20 -28
- 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/{write → apply}/api/ExtensionPointRegistryAPI.js +3 -3
- package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +49 -8
- package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.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 +7 -6
- 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 +2 -2
- package/src/sap/ui/fl/changeHandler/UnhideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/UnstashControl.js +4 -4
- package/src/sap/ui/fl/changeHandler/UpdateIFrame.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/util/IFrame.designtime.js +3 -91
- package/src/sap/ui/fl/designtime/util/editIFrame.js +94 -0
- package/src/sap/ui/fl/initial/_internal/FlexConfiguration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/FlexInfoSession.js +2 -23
- package/src/sap/ui/fl/initial/_internal/Storage.js +106 -39
- package/src/sap/ui/fl/{write → initial}/_internal/StorageFeaturesMerger.js +10 -7
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +14 -8
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/BackendConnector.js +26 -4
- package/src/sap/ui/fl/initial/_internal/connectors/BtpServiceConnector.js +44 -0
- package/src/sap/ui/fl/initial/_internal/connectors/KeyUserConnector.js +8 -1
- package/src/sap/ui/fl/initial/_internal/connectors/LrepConnector.js +48 -2
- package/src/sap/ui/fl/initial/_internal/connectors/NeoLrepConnector.js +25 -4
- package/src/sap/ui/fl/initial/_internal/connectors/PersonalizationConnector.js +12 -1
- package/src/sap/ui/fl/initial/_internal/connectors/StaticFileConnector.js +14 -4
- 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/initial/api/Version.js +0 -1
- package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +22 -1
- package/src/sap/ui/fl/interfaces/Delegate.js +1 -1
- package/src/sap/ui/fl/library.js +48 -43
- package/src/sap/ui/fl/messagebundle.properties +3 -0
- package/src/sap/ui/fl/messagebundle_bg.properties +1 -1
- package/src/sap/ui/fl/messagebundle_en_US_saprigi.properties +39 -39
- package/src/sap/ui/fl/messagebundle_hu.properties +1 -1
- package/src/sap/ui/fl/messagebundle_it.properties +1 -1
- package/src/sap/ui/fl/messagebundle_lv.properties +1 -1
- package/src/sap/ui/fl/messagebundle_mk.properties +2 -2
- package/src/sap/ui/fl/messagebundle_no.properties +1 -1
- package/src/sap/ui/fl/registry/Settings.js +12 -1
- package/src/sap/ui/fl/support/_internal/extractChangeDependencies.js +40 -20
- package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +93 -0
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +4 -4
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +1 -1
- package/src/sap/ui/fl/support/api/SupportAPI.js +5 -2
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/DescriptorChangeCheck.js +34 -19
- package/src/sap/ui/fl/util/IFrame.js +67 -20
- 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 +88 -49
- package/src/sap/ui/fl/variants/VariantModel.js +19 -6
- package/src/sap/ui/fl/write/_internal/Storage.js +5 -34
- package/src/sap/ui/fl/write/_internal/Versions.js +62 -63
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +2 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +2 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +2 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +2 -2
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -16
- package/src/sap/ui/fl/write/_internal/connectors/BtpServiceConnector.js +55 -0
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +3 -9
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +1 -26
- package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +3 -20
- package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +5 -1
- package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -15
- package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
- package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +11 -4
- 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 +7 -7
- 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 +22 -3
- package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +36 -4
- 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/ChangesWriteAPI.js +1 -3
- package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +1 -1
- package/src/sap/ui/fl/write/api/FeaturesAPI.js +2 -2
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +2 -2
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +36 -7
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +88 -105
- package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +25 -2
- package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +1 -0
- package/src/sap/ui/fl/write/api/VersionsAPI.js +0 -1
- package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +241 -28
- package/src/sap/ui/fl/write/connectors/BaseConnector.js +2 -10
- package/ui5.yaml +37 -76
- package/LICENSES/BSD-2-Clause.txt +0 -22
- package/src/sap/ui/fl/apply/_internal/flexState/changes/prepareChangesMap.js +0 -26
- /package/src/sap/ui/fl/descriptorRelated/{internal/Utils.js → Utils.js} +0 -0
|
@@ -13,6 +13,7 @@ sap.ui.define([
|
|
|
13
13
|
"sap/ui/fl/apply/_internal/changes/Reverter",
|
|
14
14
|
"sap/ui/fl/apply/_internal/controlVariants/URLHandler",
|
|
15
15
|
"sap/ui/fl/apply/_internal/flexObjects/States",
|
|
16
|
+
"sap/ui/fl/apply/_internal/flexState/FlexState",
|
|
16
17
|
"sap/ui/fl/apply/api/ControlVariantApplyAPI",
|
|
17
18
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
18
19
|
"sap/ui/core/Element",
|
|
@@ -26,6 +27,7 @@ sap.ui.define([
|
|
|
26
27
|
Reverter,
|
|
27
28
|
URLHandler,
|
|
28
29
|
States,
|
|
30
|
+
FlexState,
|
|
29
31
|
ControlVariantApplyAPI,
|
|
30
32
|
JsControlTreeModifier,
|
|
31
33
|
Element,
|
|
@@ -77,7 +79,7 @@ sap.ui.define([
|
|
|
77
79
|
* @since 1.27.0
|
|
78
80
|
* @private
|
|
79
81
|
* @author SAP SE
|
|
80
|
-
* @version 1.
|
|
82
|
+
* @version 1.121.0
|
|
81
83
|
*/
|
|
82
84
|
var FlexController = function(sComponentName) {
|
|
83
85
|
this._oChangePersistence = undefined;
|
|
@@ -162,15 +164,20 @@ sap.ui.define([
|
|
|
162
164
|
* @param {string[]} mPropertyBag.changeTypes - An array containing the change types that should be considered
|
|
163
165
|
* @returns {Promise} Resolves when all changes on the control have been processed
|
|
164
166
|
*/
|
|
165
|
-
FlexController.prototype._waitForChangesToBeApplied = function(mPropertyBag) {
|
|
167
|
+
FlexController.prototype._waitForChangesToBeApplied = async function(mPropertyBag) {
|
|
166
168
|
function filterChanges(oChange) {
|
|
167
169
|
return !oChange.isCurrentProcessFinished()
|
|
168
170
|
&& (mPropertyBag.changeTypes.length === 0 || mPropertyBag.changeTypes.includes(oChange.getChangeType()));
|
|
169
171
|
}
|
|
170
172
|
|
|
173
|
+
const oControl = mPropertyBag.selector.id && Element.getElementById(mPropertyBag.selector.id) || mPropertyBag.selector;
|
|
174
|
+
const oAppComponent = mPropertyBag.selector.appComponent || Utils.getAppComponentForControl(oControl);
|
|
175
|
+
await FlexState.initialize({
|
|
176
|
+
componentId: oAppComponent.getId()
|
|
177
|
+
});
|
|
178
|
+
|
|
171
179
|
mPropertyBag.changeTypes ||= [];
|
|
172
|
-
var
|
|
173
|
-
var mChangesMap = this._oChangePersistence.getChangesMapForComponent();
|
|
180
|
+
var mChangesMap = this._oChangePersistence.getDependencyMapForComponent();
|
|
174
181
|
var aPromises = [];
|
|
175
182
|
var mDependencies = Object.assign({}, mChangesMap.mDependencies);
|
|
176
183
|
var {mChanges} = mChangesMap;
|
|
@@ -179,7 +186,6 @@ sap.ui.define([
|
|
|
179
186
|
// filter out already applied changes and, if given, filter by change type
|
|
180
187
|
var aNotYetProcessedChanges = aChangesForControl.filter(filterChanges);
|
|
181
188
|
|
|
182
|
-
var oAppComponent = mPropertyBag.selector.appComponent || Utils.getAppComponentForControl(oControl);
|
|
183
189
|
var aRelevantChanges = [];
|
|
184
190
|
aNotYetProcessedChanges.forEach(function(oChange) {
|
|
185
191
|
var aChanges = checkDependencies(oChange, mDependencies, mChangesMap.mChanges, oAppComponent, []);
|
|
@@ -324,7 +330,7 @@ sap.ui.define([
|
|
|
324
330
|
modifier: JsControlTreeModifier,
|
|
325
331
|
appComponent: oAppComponent
|
|
326
332
|
};
|
|
327
|
-
this._oChangePersistence.
|
|
333
|
+
this._oChangePersistence._addRunTimeCreatedChangeToDependencyMap(oAppComponent, oChange);
|
|
328
334
|
oControl = mPropertyBag.modifier.bySelector(oChange.getSelector(), oAppComponent);
|
|
329
335
|
if (oControl) {
|
|
330
336
|
return Applier.applyChangeOnControl(oChange, oControl, mPropertyBag);
|
|
@@ -339,19 +345,26 @@ sap.ui.define([
|
|
|
339
345
|
* Saves changes sequentially on the associated change persistence instance;
|
|
340
346
|
* This API must be only used in scenarios without draft (like personalization).
|
|
341
347
|
*
|
|
342
|
-
* @param {sap.ui.fl.apply._internal.flexObjects.FlexObject[]} aDirtyChanges
|
|
348
|
+
* @param {sap.ui.fl.apply._internal.flexObjects.FlexObject[]} [aDirtyChanges] - Dirty changes to be saved
|
|
343
349
|
* @param {sap.ui.core.UIComponent} [oAppComponent] - AppComponent instance
|
|
344
|
-
* @returns {Promise}
|
|
350
|
+
* @returns {Promise<object>} Resolves when all changes have been saved with the backend response
|
|
345
351
|
* @public
|
|
346
352
|
*/
|
|
347
|
-
FlexController.prototype.saveSequenceOfDirtyChanges = function(aDirtyChanges, oAppComponent) {
|
|
348
|
-
|
|
349
|
-
.
|
|
350
|
-
|
|
351
|
-
|
|
353
|
+
FlexController.prototype.saveSequenceOfDirtyChanges = async function(aDirtyChanges, oAppComponent) {
|
|
354
|
+
// the same fallback is used in the ChangePersistence, but to update the state we need the changes also here
|
|
355
|
+
const aChanges = aDirtyChanges || this._oChangePersistence.getDirtyChanges();
|
|
356
|
+
const oResponse = await this._oChangePersistence.saveDirtyChanges(oAppComponent, false, aChanges);
|
|
357
|
+
|
|
358
|
+
if (oResponse?.response?.length) {
|
|
359
|
+
var aFilenames = oResponse.response.map((oChangeJson) => oChangeJson.fileName);
|
|
360
|
+
aChanges.forEach(function(oDirtyChange) {
|
|
361
|
+
if (aFilenames.includes(oDirtyChange.getId())) {
|
|
362
|
+
oDirtyChange.setState(States.LifecycleState.PERSISTED);
|
|
363
|
+
}
|
|
352
364
|
});
|
|
353
|
-
|
|
354
|
-
}
|
|
365
|
+
FlexState.getFlexObjectsDataSelector().checkUpdate({reference: this._sComponentName});
|
|
366
|
+
}
|
|
367
|
+
return oResponse;
|
|
355
368
|
};
|
|
356
369
|
|
|
357
370
|
return FlexController;
|
|
@@ -41,7 +41,7 @@ sap.ui.define([
|
|
|
41
41
|
*
|
|
42
42
|
* @namespace sap.ui.fl.LayerUtils
|
|
43
43
|
* @author SAP SE
|
|
44
|
-
* @version 1.
|
|
44
|
+
* @version 1.121.0
|
|
45
45
|
*/
|
|
46
46
|
var LayerUtils = {
|
|
47
47
|
_mLayersIndex: mLayersIndex,
|
|
@@ -72,10 +72,10 @@ sap.ui.define([
|
|
|
72
72
|
},
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
|
-
* Returns whether provided layer is a customer
|
|
75
|
+
* Returns whether provided layer is a customer-dependent layer.
|
|
76
76
|
*
|
|
77
|
-
* @param {string} sLayerName
|
|
78
|
-
* @returns {boolean} true if provided layer is customer
|
|
77
|
+
* @param {string} sLayerName - Layer name
|
|
78
|
+
* @returns {boolean} true if provided layer is customer-dependent layer else false
|
|
79
79
|
* @public
|
|
80
80
|
*/
|
|
81
81
|
isCustomerDependentLayer(sLayerName) {
|
|
@@ -183,7 +183,7 @@ sap.ui.define([
|
|
|
183
183
|
*/
|
|
184
184
|
isLayerFilteringRequired(sReference) {
|
|
185
185
|
var oFlexInfoSession = FlexInfoSession.getByReference(sReference);
|
|
186
|
-
var sMaxLayer = oFlexInfoSession
|
|
186
|
+
var sMaxLayer = oFlexInfoSession.maxLayer ? oFlexInfoSession.maxLayer : LayerUtils._sTopLayer;
|
|
187
187
|
return this._sTopLayer !== sMaxLayer;
|
|
188
188
|
},
|
|
189
189
|
|
package/src/sap/ui/fl/Utils.js
CHANGED
|
@@ -56,17 +56,16 @@ sap.ui.define([
|
|
|
56
56
|
if (oComponentData?.startupParameters && sParameterName && Array.isArray(oComponentData.startupParameters[sParameterName])) {
|
|
57
57
|
return oComponentData.startupParameters[sParameterName][0];
|
|
58
58
|
}
|
|
59
|
+
return undefined;
|
|
59
60
|
}
|
|
60
61
|
|
|
61
|
-
let _isUshellContainerInitialized = false;
|
|
62
|
-
|
|
63
62
|
/**
|
|
64
63
|
* Provides utility functions for the SAPUI5 flexibility library
|
|
65
64
|
*
|
|
66
65
|
* @namespace
|
|
67
66
|
* @alias sap.ui.fl.Utils
|
|
68
67
|
* @author SAP SE
|
|
69
|
-
* @version 1.
|
|
68
|
+
* @version 1.121.0
|
|
70
69
|
*
|
|
71
70
|
* @private
|
|
72
71
|
* @ui5-restricted sap.ui.fl, sap.ui.rta
|
|
@@ -127,8 +126,8 @@ sap.ui.define([
|
|
|
127
126
|
},
|
|
128
127
|
|
|
129
128
|
/**
|
|
130
|
-
* Returns the Component that belongs to
|
|
131
|
-
* control having one.
|
|
129
|
+
* Returns the Component that belongs to the passed control. If the control has no component,
|
|
130
|
+
* it walks up the control tree in order to find a control having one.
|
|
132
131
|
*
|
|
133
132
|
* @param {sap.ui.core.Control} oControl - SAPUI5 control
|
|
134
133
|
* @returns {sap.ui.core.Component} found component
|
|
@@ -156,6 +155,7 @@ sap.ui.define([
|
|
|
156
155
|
return Component.getComponentById(sComponentId);
|
|
157
156
|
}
|
|
158
157
|
}
|
|
158
|
+
return undefined;
|
|
159
159
|
},
|
|
160
160
|
|
|
161
161
|
/**
|
|
@@ -211,8 +211,8 @@ sap.ui.define([
|
|
|
211
211
|
},
|
|
212
212
|
|
|
213
213
|
/**
|
|
214
|
-
* Returns the parent view of the control. If there are nested views, only the one closest to the control will be returned.
|
|
215
|
-
* found,
|
|
214
|
+
* Returns the parent view of the control. If there are nested views, only the one closest to the control will be returned.
|
|
215
|
+
* If no view can be found, undefined will be returned.
|
|
216
216
|
*
|
|
217
217
|
* @param {sap.ui.core.Control} oControl - SAPUI5 control
|
|
218
218
|
* @returns {sap.ui.core.mvc.View} The view
|
|
@@ -230,6 +230,7 @@ sap.ui.define([
|
|
|
230
230
|
oControl = oControl.getParent();
|
|
231
231
|
return Utils.getViewForControl(oControl);
|
|
232
232
|
}
|
|
233
|
+
return undefined;
|
|
233
234
|
},
|
|
234
235
|
|
|
235
236
|
/**
|
|
@@ -289,7 +290,11 @@ sap.ui.define([
|
|
|
289
290
|
},
|
|
290
291
|
|
|
291
292
|
/**
|
|
292
|
-
*
|
|
293
|
+
* Checks if the control ID is generated or maintained by the application.
|
|
294
|
+
*
|
|
295
|
+
* @param {sap.ui.core.Control|string} vControl - Control instance or ID
|
|
296
|
+
* @param {sap.ui.core.Component} oAppComponent - <code>oAppComponent</code> application component, needed only if vControl is a string (ID)
|
|
297
|
+
* @returns {boolean} <code>true</code> if the ID is maintained by the application
|
|
293
298
|
*/
|
|
294
299
|
checkControlId(vControl, oAppComponent) {
|
|
295
300
|
if (!oAppComponent) {
|
|
@@ -332,16 +337,7 @@ sap.ui.define([
|
|
|
332
337
|
*/
|
|
333
338
|
getUshellContainer() {
|
|
334
339
|
const oContainer = sap.ui.require("sap/ushell/Container");
|
|
335
|
-
|
|
336
|
-
if (oContainer && !_isUshellContainerInitialized) {
|
|
337
|
-
try {
|
|
338
|
-
oContainer.getLogonSystem();
|
|
339
|
-
_isUshellContainerInitialized = true;
|
|
340
|
-
} catch (oError) {
|
|
341
|
-
return undefined;
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
return oContainer;
|
|
340
|
+
return oContainer?.isInitialized() ? oContainer : undefined;
|
|
345
341
|
},
|
|
346
342
|
|
|
347
343
|
createDefaultFileName(sNameAddition) {
|
|
@@ -576,6 +572,7 @@ sap.ui.define([
|
|
|
576
572
|
this.vValue instanceof Utils.FakePromise) {
|
|
577
573
|
return this.vValue;
|
|
578
574
|
}
|
|
575
|
+
return undefined;
|
|
579
576
|
},
|
|
580
577
|
|
|
581
578
|
/**
|
|
@@ -12,6 +12,7 @@ sap.ui.define([
|
|
|
12
12
|
"sap/ui/fl/apply/_internal/changes/FlexCustomData",
|
|
13
13
|
"sap/ui/fl/apply/_internal/changes/Utils",
|
|
14
14
|
"sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler",
|
|
15
|
+
"sap/ui/fl/apply/_internal/flexState/changes/UIChangesState",
|
|
15
16
|
"sap/ui/fl/Utils"
|
|
16
17
|
], function(
|
|
17
18
|
Log,
|
|
@@ -21,6 +22,7 @@ sap.ui.define([
|
|
|
21
22
|
FlexCustomData,
|
|
22
23
|
Utils,
|
|
23
24
|
DependencyHandler,
|
|
25
|
+
UIChangesState,
|
|
24
26
|
FlUtils
|
|
25
27
|
) {
|
|
26
28
|
"use strict";
|
|
@@ -80,7 +82,7 @@ sap.ui.define([
|
|
|
80
82
|
return mPropertyBag.modifier.targets === "xmlTree";
|
|
81
83
|
}
|
|
82
84
|
|
|
83
|
-
function checkAndAdjustChangeStatus(oControl, oChange,
|
|
85
|
+
function checkAndAdjustChangeStatus(oControl, oChange, mPropertyBag) {
|
|
84
86
|
// in case of changes in templates, the original control is not always available at this point
|
|
85
87
|
// example: rename on a control created by a change inside a template
|
|
86
88
|
var oOriginalControl = Utils.getControlIfTemplateAffected(oChange, oControl, mPropertyBag).control;
|
|
@@ -90,13 +92,11 @@ sap.ui.define([
|
|
|
90
92
|
var bIsCurrentlyAppliedOnControl = oOriginalControl
|
|
91
93
|
&& FlexCustomData.hasChangeApplyFinishedCustomData(oOriginalControl, oChange, oModifier);
|
|
92
94
|
var bChangeStatusAppliedFinished = oChange.isApplyProcessFinished();
|
|
93
|
-
var oAppComponent = mPropertyBag.appComponent;
|
|
94
95
|
if (bChangeStatusAppliedFinished && !bIsCurrentlyAppliedOnControl) {
|
|
95
96
|
// if a change was already processed and is not applied anymore, then the control was destroyed and recreated.
|
|
96
97
|
// In this case we need to recreate/copy the dependencies if we are applying in JS
|
|
97
98
|
if (!isXmlModifier(mPropertyBag)) {
|
|
98
|
-
|
|
99
|
-
oFlexController._oChangePersistence.copyDependenciesFromInitialChangesMap(oChange, fnCheckFunction, oAppComponent);
|
|
99
|
+
UIChangesState.copyDependenciesFromCompleteDependencyMap(oChange, mPropertyBag.appComponent);
|
|
100
100
|
}
|
|
101
101
|
oChange.setInitialApplyState();
|
|
102
102
|
} else if (!bChangeStatusAppliedFinished && bIsCurrentlyAppliedOnControl) {
|
|
@@ -334,20 +334,19 @@ sap.ui.define([
|
|
|
334
334
|
},
|
|
335
335
|
|
|
336
336
|
/**
|
|
337
|
-
* Gets the
|
|
337
|
+
* Gets the dependency map and gets all changes for that control from the map, then, depending on
|
|
338
338
|
* dependencies, directly applies the change or saves the callback to apply in the dependency.
|
|
339
339
|
*
|
|
340
|
-
* @param {function} fnGetChangesMap - Function which resolves with the changes map
|
|
341
340
|
* @param {object} oAppComponent - Component instance that is currently loading
|
|
342
|
-
* @param {
|
|
341
|
+
* @param {string} sReference - Flex reference
|
|
343
342
|
* @param {sap.ui.core.Control} oControl Instance of the control to which changes should be applied
|
|
344
343
|
* @returns {Promise|sap.ui.fl.Utils.FakePromise} Resolves as soon as all changes for the control are applied
|
|
345
344
|
*/
|
|
346
|
-
applyAllChangesForControl(
|
|
345
|
+
applyAllChangesForControl(oAppComponent, sReference, oControl) {
|
|
347
346
|
// the changes have to be queued synchronously
|
|
348
|
-
|
|
347
|
+
const oDependencyMap = UIChangesState.getLiveDependencyMap(sReference);
|
|
349
348
|
var sControlId = oControl.getId();
|
|
350
|
-
var aChangesForControl =
|
|
349
|
+
var aChangesForControl = oDependencyMap.mChanges[sControlId] || [];
|
|
351
350
|
var mPropertyBag = {
|
|
352
351
|
modifier: JsControlTreeModifier,
|
|
353
352
|
appComponent: oAppComponent,
|
|
@@ -355,7 +354,7 @@ sap.ui.define([
|
|
|
355
354
|
};
|
|
356
355
|
|
|
357
356
|
aChangesForControl.forEach(function(oChange) {
|
|
358
|
-
checkAndAdjustChangeStatus(oControl, oChange,
|
|
357
|
+
checkAndAdjustChangeStatus(oControl, oChange, mPropertyBag);
|
|
359
358
|
if (!oChange.isApplyProcessFinished() && !oChange._ignoreOnce) {
|
|
360
359
|
oChange.setQueuedForApply();
|
|
361
360
|
}
|
|
@@ -365,11 +364,11 @@ sap.ui.define([
|
|
|
365
364
|
oLastPromise = oLastPromise.then(function(oControl, mPropertyBag) {
|
|
366
365
|
var aPromiseStack = [];
|
|
367
366
|
var sControlId = oControl.getId();
|
|
368
|
-
var aChangesForControl =
|
|
367
|
+
var aChangesForControl = oDependencyMap.mChanges[sControlId] || [];
|
|
369
368
|
var bControlWithDependencies;
|
|
370
369
|
|
|
371
|
-
if (
|
|
372
|
-
DependencyHandler.removeControlsDependencies(
|
|
370
|
+
if (oDependencyMap.mControlsWithDependencies[sControlId]) {
|
|
371
|
+
DependencyHandler.removeControlsDependencies(oDependencyMap, sControlId);
|
|
373
372
|
bControlWithDependencies = true;
|
|
374
373
|
}
|
|
375
374
|
|
|
@@ -383,22 +382,22 @@ sap.ui.define([
|
|
|
383
382
|
if (oChange._ignoreOnce) {
|
|
384
383
|
delete oChange._ignoreOnce;
|
|
385
384
|
} else if (oChange.isApplyProcessFinished()) {
|
|
386
|
-
DependencyHandler.resolveDependenciesForChange(
|
|
387
|
-
} else if (!
|
|
385
|
+
DependencyHandler.resolveDependenciesForChange(oDependencyMap, oChange.getId(), sControlId);
|
|
386
|
+
} else if (!oDependencyMap.mDependencies[oChange.getId()]) {
|
|
388
387
|
aPromiseStack.push(function() {
|
|
389
388
|
return Applier.applyChangeOnControl(oChange, oControl, mPropertyBag).then(function() {
|
|
390
|
-
DependencyHandler.resolveDependenciesForChange(
|
|
389
|
+
DependencyHandler.resolveDependenciesForChange(oDependencyMap, oChange.getId(), sControlId);
|
|
391
390
|
});
|
|
392
391
|
});
|
|
393
392
|
} else {
|
|
394
393
|
var fnCallback = Applier.applyChangeOnControl.bind(Applier, oChange, oControl, mPropertyBag);
|
|
395
|
-
DependencyHandler.addChangeApplyCallbackToDependency(
|
|
394
|
+
DependencyHandler.addChangeApplyCallbackToDependency(oDependencyMap, oChange.getId(), fnCallback);
|
|
396
395
|
}
|
|
397
396
|
});
|
|
398
397
|
|
|
399
398
|
if (aChangesForControl.length || bControlWithDependencies) {
|
|
400
399
|
return FlUtils.execPromiseQueueSequentially(aPromiseStack).then(function() {
|
|
401
|
-
return DependencyHandler.processDependentQueue(
|
|
400
|
+
return DependencyHandler.processDependentQueue(oDependencyMap, oAppComponent, sControlId);
|
|
402
401
|
});
|
|
403
402
|
}
|
|
404
403
|
return undefined;
|
|
@@ -440,7 +439,7 @@ sap.ui.define([
|
|
|
440
439
|
.then(function(oChangeHandler) {
|
|
441
440
|
mPropertyBag.changeHandler = oChangeHandler;
|
|
442
441
|
oChange.setQueuedForApply();
|
|
443
|
-
checkAndAdjustChangeStatus(oControl, oChange,
|
|
442
|
+
checkAndAdjustChangeStatus(oControl, oChange, mPropertyBag);
|
|
444
443
|
|
|
445
444
|
if (!oChange.isApplyProcessFinished()) {
|
|
446
445
|
if (typeof mPropertyBag.changeHandler.onAfterXMLChangeProcessing === "function") {
|
|
@@ -17,6 +17,10 @@ sap.ui.define([
|
|
|
17
17
|
var SUPPORTED_OPERATIONS = ["UPDATE", "UPSERT"];
|
|
18
18
|
var SUPPORTED_PROPERTIES = ["uri", "settings/maxAge"];
|
|
19
19
|
|
|
20
|
+
// Only list properties with limitation
|
|
21
|
+
var PROPERTIES_PATTERNS = {
|
|
22
|
+
};
|
|
23
|
+
|
|
20
24
|
/**
|
|
21
25
|
* Descriptor change merger for change type <code>appdescr_app_changeDataSource</code>.
|
|
22
26
|
* Changes a property of a specific <code>sap.app/dataSource</code> node in the manifest.
|
|
@@ -26,7 +30,7 @@ sap.ui.define([
|
|
|
26
30
|
*
|
|
27
31
|
* @namespace
|
|
28
32
|
* @alias sap.ui.fl.apply._internal.changes.descriptor.app.ChangeDataSource
|
|
29
|
-
* @version 1.
|
|
33
|
+
* @version 1.121.0
|
|
30
34
|
* @private
|
|
31
35
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
32
36
|
*/
|
|
@@ -51,7 +55,7 @@ sap.ui.define([
|
|
|
51
55
|
applyChange(oManifest, oChange) {
|
|
52
56
|
var oDataSources = oManifest["sap.app"].dataSources;
|
|
53
57
|
var oChangeContent = oChange.getContent();
|
|
54
|
-
DescriptorChangeCheck.checkEntityPropertyChange(oChangeContent, SUPPORTED_PROPERTIES, SUPPORTED_OPERATIONS);
|
|
58
|
+
DescriptorChangeCheck.checkEntityPropertyChange(oChangeContent, SUPPORTED_PROPERTIES, SUPPORTED_OPERATIONS, PROPERTIES_PATTERNS);
|
|
55
59
|
if (oDataSources) {
|
|
56
60
|
var oDataSource = oDataSources[oChangeContent.dataSourceId];
|
|
57
61
|
if (oDataSource) {
|
|
@@ -15,7 +15,13 @@ sap.ui.define([
|
|
|
15
15
|
"use strict";
|
|
16
16
|
|
|
17
17
|
var SUPPORTED_OPERATIONS = ["UPDATE", "UPSERT"];
|
|
18
|
-
var SUPPORTED_PROPERTIES = ["title", "subTitle", "icon", "signature/parameters/*"];
|
|
18
|
+
var SUPPORTED_PROPERTIES = ["semanticObject", "action", "title", "subTitle", "icon", "signature/parameters/*"];
|
|
19
|
+
|
|
20
|
+
// Only list properties with limitation
|
|
21
|
+
var PROPERTIES_PATTERNS = {
|
|
22
|
+
semanticObject: "^[\\w\\*]{0,30}$",
|
|
23
|
+
action: "^[\\w\\*]{0,60}$"
|
|
24
|
+
};
|
|
19
25
|
|
|
20
26
|
/**
|
|
21
27
|
* Descriptor change merger for change type <code>appdescr_app_changeInbound</code>.
|
|
@@ -25,7 +31,7 @@ sap.ui.define([
|
|
|
25
31
|
*
|
|
26
32
|
* @namespace
|
|
27
33
|
* @alias sap.ui.fl.apply._internal.changes.descriptor.app.ChangeInbound
|
|
28
|
-
* @version 1.
|
|
34
|
+
* @version 1.121.0
|
|
29
35
|
* @private
|
|
30
36
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
31
37
|
*/
|
|
@@ -50,7 +56,7 @@ sap.ui.define([
|
|
|
50
56
|
applyChange(oManifest, oChange) {
|
|
51
57
|
var oCrossNavigation = oManifest["sap.app"].crossNavigation;
|
|
52
58
|
var oChangeContent = oChange.getContent();
|
|
53
|
-
DescriptorChangeCheck.checkEntityPropertyChange(oChangeContent, SUPPORTED_PROPERTIES, SUPPORTED_OPERATIONS);
|
|
59
|
+
DescriptorChangeCheck.checkEntityPropertyChange(oChangeContent, SUPPORTED_PROPERTIES, SUPPORTED_OPERATIONS, PROPERTIES_PATTERNS);
|
|
54
60
|
if (oCrossNavigation && oCrossNavigation.inbounds) {
|
|
55
61
|
var oInbound = oCrossNavigation.inbounds[oChangeContent.inboundId];
|
|
56
62
|
if (oInbound) {
|
|
@@ -19,7 +19,7 @@ sap.ui.define([
|
|
|
19
19
|
* Available for both runtime and build {@link sap.ui.fl.apply._internal.changes.descriptor.Registration}.
|
|
20
20
|
*
|
|
21
21
|
* @namespace sap.ui.fl.apply._internal.changes.descriptor.app.SetTitle
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.121.0
|
|
23
23
|
* @private
|
|
24
24
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
25
25
|
*/
|
|
@@ -19,7 +19,7 @@ sap.ui.define([
|
|
|
19
19
|
*
|
|
20
20
|
* @namespace
|
|
21
21
|
* @alias sap.ui.fl.apply._internal.changes.descriptor.ovp.ChangeCard
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.121.0
|
|
23
23
|
* @private
|
|
24
24
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
25
25
|
*/
|
|
@@ -31,7 +31,7 @@ sap.ui.define([
|
|
|
31
31
|
* @param {sap.ui.fl.apply._internal.flexObjects.AppDescriptorChange} oChange - Change made by key user
|
|
32
32
|
* @param {object} oChange.content - Details of the change
|
|
33
33
|
* @param {string} oChange.content.cardId - ID of card being changed
|
|
34
|
-
* @param {
|
|
34
|
+
* @param {object} oChange.content.entityPropertyChange - Change content
|
|
35
35
|
* @param {string} oChange.content.entityPropertyChange.propertyPath - Path to the property which should be changed
|
|
36
36
|
* @param {string} oChange.content.entityPropertyChange.operation - Operation that is performed on property defined under propertyPath. Possible value: <code>UPSERT</code>
|
|
37
37
|
* @param {object} oChange.content.entityPropertyChange.propertyValue - New value of <code>dataSource</code> property defined under propertyPath
|
|
@@ -18,7 +18,7 @@ sap.ui.define([
|
|
|
18
18
|
* Available for both runtime and build {@link sap.ui.fl.apply._internal.changes.descriptor.Registration}.
|
|
19
19
|
*
|
|
20
20
|
* @namespace sap.ui.fl.apply._internal.changes.descriptor.ovp.DeleteCard
|
|
21
|
-
* @version 1.
|
|
21
|
+
* @version 1.121.0
|
|
22
22
|
* @private
|
|
23
23
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
24
24
|
*/
|