@openui5/sap.ui.fl 1.121.1 → 1.122.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/THIRDPARTY.txt +1 -1
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/ChangePersistence.js +1 -49
- 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 +23 -21
- package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
- package/src/sap/ui/fl/LayerUtils.js +1 -1
- package/src/sap/ui/fl/Utils.js +2 -2
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +224 -204
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +2 -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/AddNewInbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +1 -1
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +16 -17
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Registry.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +61 -48
- 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 +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.js +35 -5
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/Utils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +11 -30
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +6 -4
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +1 -8
- package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +38 -7
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
- package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +0 -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/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/FlexConfiguration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/BtpServiceConnector.js +2 -2
- package/src/sap/ui/fl/initial/_internal/connectors/KeyUserConnector.js +2 -2
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +18 -5
- package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +1 -1
- package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +1 -1
- package/src/sap/ui/fl/interfaces/Delegate.js +1 -1
- package/src/sap/ui/fl/library.js +43 -43
- package/src/sap/ui/fl/messagebundle_ar.properties +2 -0
- package/src/sap/ui/fl/messagebundle_bg.properties +2 -0
- package/src/sap/ui/fl/messagebundle_ca.properties +2 -0
- package/src/sap/ui/fl/messagebundle_cnr.properties +2 -0
- package/src/sap/ui/fl/messagebundle_cs.properties +2 -0
- package/src/sap/ui/fl/messagebundle_cy.properties +2 -0
- package/src/sap/ui/fl/messagebundle_da.properties +2 -0
- package/src/sap/ui/fl/messagebundle_de.properties +2 -0
- package/src/sap/ui/fl/messagebundle_el.properties +2 -0
- package/src/sap/ui/fl/messagebundle_en.properties +2 -0
- package/src/sap/ui/fl/messagebundle_en_GB.properties +2 -0
- package/src/sap/ui/fl/messagebundle_en_US_saprigi.properties +2 -0
- package/src/sap/ui/fl/messagebundle_es.properties +2 -0
- package/src/sap/ui/fl/messagebundle_es_MX.properties +2 -0
- package/src/sap/ui/fl/messagebundle_et.properties +2 -0
- package/src/sap/ui/fl/messagebundle_fi.properties +2 -0
- package/src/sap/ui/fl/messagebundle_fr.properties +2 -0
- package/src/sap/ui/fl/messagebundle_fr_CA.properties +2 -0
- package/src/sap/ui/fl/messagebundle_hi.properties +2 -0
- package/src/sap/ui/fl/messagebundle_hr.properties +2 -0
- package/src/sap/ui/fl/messagebundle_hu.properties +2 -0
- package/src/sap/ui/fl/messagebundle_id.properties +2 -0
- package/src/sap/ui/fl/messagebundle_it.properties +2 -0
- package/src/sap/ui/fl/messagebundle_iw.properties +2 -0
- package/src/sap/ui/fl/messagebundle_ja.properties +2 -0
- package/src/sap/ui/fl/messagebundle_kk.properties +3 -1
- package/src/sap/ui/fl/messagebundle_ko.properties +2 -0
- package/src/sap/ui/fl/messagebundle_lt.properties +2 -0
- package/src/sap/ui/fl/messagebundle_lv.properties +2 -0
- package/src/sap/ui/fl/messagebundle_mk.properties +3 -1
- package/src/sap/ui/fl/messagebundle_ms.properties +2 -0
- package/src/sap/ui/fl/messagebundle_nl.properties +2 -0
- package/src/sap/ui/fl/messagebundle_no.properties +2 -0
- package/src/sap/ui/fl/messagebundle_pl.properties +2 -0
- package/src/sap/ui/fl/messagebundle_pt.properties +2 -0
- package/src/sap/ui/fl/messagebundle_pt_PT.properties +2 -0
- package/src/sap/ui/fl/messagebundle_ro.properties +2 -0
- package/src/sap/ui/fl/messagebundle_ru.properties +2 -0
- package/src/sap/ui/fl/messagebundle_sh.properties +2 -0
- package/src/sap/ui/fl/messagebundle_sk.properties +2 -0
- package/src/sap/ui/fl/messagebundle_sl.properties +2 -0
- package/src/sap/ui/fl/messagebundle_sr.properties +2 -0
- package/src/sap/ui/fl/messagebundle_sv.properties +2 -0
- package/src/sap/ui/fl/messagebundle_th.properties +2 -0
- package/src/sap/ui/fl/messagebundle_tr.properties +2 -0
- package/src/sap/ui/fl/messagebundle_uk.properties +3 -1
- package/src/sap/ui/fl/messagebundle_vi.properties +2 -0
- package/src/sap/ui/fl/messagebundle_zh_CN.properties +2 -0
- package/src/sap/ui/fl/messagebundle_zh_TW.properties +2 -0
- package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +1 -1
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +1 -1
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +1 -1
- package/src/sap/ui/fl/support/api/SupportAPI.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
- package/src/sap/ui/fl/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/controller/ContextVisibility.controller.js +3 -2
- package/src/sap/ui/fl/write/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BtpServiceConnector.js +9 -9
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +19 -20
- 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/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 +5 -18
- package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +5 -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/ChangesWriteAPI.js +6 -4
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +8 -13
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/UI2PersonalizationWriteAPI.js +0 -6
- package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +17 -2
- package/src/sap/ui/fl/apply/_internal/preprocessors/EventHistory.js +0 -91
|
@@ -28,6 +28,9 @@ sap.ui.define([
|
|
|
28
28
|
"use strict";
|
|
29
29
|
|
|
30
30
|
var oLastPromise = (FlUtils.FakePromise ? new FlUtils.FakePromise() : Promise.resolve());
|
|
31
|
+
const oPendingProcessesOnControl = {};
|
|
32
|
+
|
|
33
|
+
var Applier = {};
|
|
31
34
|
|
|
32
35
|
/**
|
|
33
36
|
* Formats the log message by replacing placeholders with values and logging the message.
|
|
@@ -264,227 +267,244 @@ sap.ui.define([
|
|
|
264
267
|
}
|
|
265
268
|
}
|
|
266
269
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
*/
|
|
273
|
-
addPreConditionForInitialChangeApplying(oPromise) {
|
|
274
|
-
oLastPromise = oLastPromise.then(function() {
|
|
275
|
-
return oPromise;
|
|
276
|
-
});
|
|
277
|
-
},
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* Applying a specific change on the passed control, if it is not already applied.
|
|
281
|
-
*
|
|
282
|
-
* @param {sap.ui.fl.apply._internal.flexObjects.FlexObject} oChange - Change object which should be applied on the passed control
|
|
283
|
-
* @param {sap.ui.core.Control} oControl - Control which is the target of the passed change
|
|
284
|
-
* @param {object} mPropertyBag - Object with parameters as properties
|
|
285
|
-
* @param {object} mPropertyBag.view - View to process
|
|
286
|
-
* @param {object} mPropertyBag.modifier - Polymorph reuse operations handling the changes on the given view type
|
|
287
|
-
* @param {object} mPropertyBag.appDescriptor - App descriptor containing the metadata of the current application
|
|
288
|
-
* @param {object} mPropertyBag.appComponent - Component instance that is currently loading
|
|
289
|
-
* @returns {Promise|sap.ui.fl.Utils.FakePromise} Promise that is resolved after all changes were reverted in asynchronous case or FakePromise for the synchronous processing scenario
|
|
290
|
-
*/
|
|
291
|
-
applyChangeOnControl(oChange, oControl, mPropertyBag) {
|
|
292
|
-
var mControl = Utils.getControlIfTemplateAffected(oChange, oControl, mPropertyBag);
|
|
293
|
-
var pHandlerPromise = mPropertyBag.changeHandler
|
|
294
|
-
? Promise.resolve(mPropertyBag.changeHandler)
|
|
295
|
-
: Utils.getChangeHandler(oChange, mControl, mPropertyBag);
|
|
296
|
-
|
|
297
|
-
return pHandlerPromise.then(function(oChangeHandler) {
|
|
298
|
-
checkPreconditions(oChange, mPropertyBag);
|
|
299
|
-
return oChangeHandler;
|
|
300
|
-
})
|
|
270
|
+
function processControl(oControl, mPropertyBag, oDependencyMap, oAppComponent) {
|
|
271
|
+
const aPromiseStack = [];
|
|
272
|
+
const sControlId = oControl.getId();
|
|
273
|
+
const aChangesForControl = oDependencyMap.mChanges[sControlId] || [];
|
|
274
|
+
let bControlWithDependencies;
|
|
301
275
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
276
|
+
if (oDependencyMap.mControlsWithDependencies[sControlId]) {
|
|
277
|
+
DependencyHandler.removeControlsDependencies(oDependencyMap, sControlId);
|
|
278
|
+
bControlWithDependencies = true;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
aChangesForControl.forEach(function(oChange) {
|
|
282
|
+
// in the ExtensionPoint scenario changes can get cloned,
|
|
283
|
+
// in case of a template change the original selector has to be adjusted
|
|
284
|
+
if (oChange.originalSelectorToBeAdjusted) {
|
|
285
|
+
adjustOriginalSelector(oChange, oControl, oAppComponent);
|
|
286
|
+
delete oChange.originalSelectorToBeAdjusted;
|
|
287
|
+
}
|
|
288
|
+
if (oChange._ignoreOnce) {
|
|
289
|
+
delete oChange._ignoreOnce;
|
|
290
|
+
} else if (oChange.isApplyProcessFinished()) {
|
|
291
|
+
DependencyHandler.resolveDependenciesForChange(oDependencyMap, oChange.getId(), sControlId);
|
|
292
|
+
} else if (!oDependencyMap.mDependencies[oChange.getId()]) {
|
|
293
|
+
aPromiseStack.push(function() {
|
|
294
|
+
return Applier.applyChangeOnControl(oChange, oControl, mPropertyBag).then(function() {
|
|
295
|
+
DependencyHandler.resolveDependenciesForChange(oDependencyMap, oChange.getId(), sControlId);
|
|
319
296
|
});
|
|
320
|
-
}
|
|
297
|
+
});
|
|
298
|
+
} else {
|
|
299
|
+
const fnCallback = Applier.applyChangeOnControl.bind(Applier, oChange, oControl, mPropertyBag);
|
|
300
|
+
DependencyHandler.addChangeApplyCallbackToDependency(oDependencyMap, oChange.getId(), fnCallback);
|
|
301
|
+
}
|
|
302
|
+
});
|
|
321
303
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
return
|
|
304
|
+
if (aChangesForControl.length || bControlWithDependencies) {
|
|
305
|
+
return FlUtils.execPromiseQueueSequentially(aPromiseStack)
|
|
306
|
+
.then(function() {
|
|
307
|
+
return DependencyHandler.processDependentQueue(oDependencyMap, oAppComponent, sControlId);
|
|
326
308
|
})
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
return {
|
|
330
|
-
success: false,
|
|
331
|
-
error: oError
|
|
332
|
-
};
|
|
333
|
-
});
|
|
334
|
-
},
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* Gets the dependency map and gets all changes for that control from the map, then, depending on
|
|
338
|
-
* dependencies, directly applies the change or saves the callback to apply in the dependency.
|
|
339
|
-
*
|
|
340
|
-
* @param {object} oAppComponent - Component instance that is currently loading
|
|
341
|
-
* @param {string} sReference - Flex reference
|
|
342
|
-
* @param {sap.ui.core.Control} oControl Instance of the control to which changes should be applied
|
|
343
|
-
* @returns {Promise|sap.ui.fl.Utils.FakePromise} Resolves as soon as all changes for the control are applied
|
|
344
|
-
*/
|
|
345
|
-
applyAllChangesForControl(oAppComponent, sReference, oControl) {
|
|
346
|
-
// the changes have to be queued synchronously
|
|
347
|
-
const oDependencyMap = UIChangesState.getLiveDependencyMap(sReference);
|
|
348
|
-
var sControlId = oControl.getId();
|
|
349
|
-
var aChangesForControl = oDependencyMap.mChanges[sControlId] || [];
|
|
350
|
-
var mPropertyBag = {
|
|
351
|
-
modifier: JsControlTreeModifier,
|
|
352
|
-
appComponent: oAppComponent,
|
|
353
|
-
view: FlUtils.getViewForControl(oControl)
|
|
354
|
-
};
|
|
355
|
-
|
|
356
|
-
aChangesForControl.forEach(function(oChange) {
|
|
357
|
-
checkAndAdjustChangeStatus(oControl, oChange, mPropertyBag);
|
|
358
|
-
if (!oChange.isApplyProcessFinished() && !oChange._ignoreOnce) {
|
|
359
|
-
oChange.setQueuedForApply();
|
|
360
|
-
}
|
|
309
|
+
.then(function() {
|
|
310
|
+
oPendingProcessesOnControl[sControlId].shift().resolveFunction();
|
|
361
311
|
});
|
|
312
|
+
}
|
|
313
|
+
oPendingProcessesOnControl[sControlId].shift().resolveFunction();
|
|
314
|
+
}
|
|
362
315
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
316
|
+
/**
|
|
317
|
+
* Sets a specific precondition, which has to be fulfilled before applying all changes on control.
|
|
318
|
+
*
|
|
319
|
+
* @param {Promise} oPromise - Promise which is resolved when precondition fulfilled
|
|
320
|
+
*/
|
|
321
|
+
Applier.addPreConditionForInitialChangeApplying = function(oPromise) {
|
|
322
|
+
oLastPromise = oLastPromise.then(function() {
|
|
323
|
+
return oPromise;
|
|
324
|
+
});
|
|
325
|
+
};
|
|
369
326
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
327
|
+
/**
|
|
328
|
+
* Applies a specific change on the passed control, if it is not already applied.
|
|
329
|
+
*
|
|
330
|
+
* @param {sap.ui.fl.apply._internal.flexObjects.FlexObject} oChange - Change object which should be applied on the passed control
|
|
331
|
+
* @param {sap.ui.core.Control} oControl - Control which is the target of the passed change
|
|
332
|
+
* @param {object} mPropertyBag - Object with parameters as properties
|
|
333
|
+
* @param {object} mPropertyBag.view - View to process
|
|
334
|
+
* @param {object} mPropertyBag.modifier - Polymorph reuse operations handling the changes on the given view type
|
|
335
|
+
* @param {object} mPropertyBag.appDescriptor - App descriptor containing the metadata of the current application
|
|
336
|
+
* @param {object} mPropertyBag.appComponent - Component instance that is currently loading
|
|
337
|
+
* @returns {Promise|sap.ui.fl.Utils.FakePromise} Promise that is resolved after all changes were reverted in asynchronous case or FakePromise for the synchronous processing scenario
|
|
338
|
+
*/
|
|
339
|
+
Applier.applyChangeOnControl = function(oChange, oControl, mPropertyBag) {
|
|
340
|
+
var mControl = Utils.getControlIfTemplateAffected(oChange, oControl, mPropertyBag);
|
|
341
|
+
var pHandlerPromise = mPropertyBag.changeHandler
|
|
342
|
+
? Promise.resolve(mPropertyBag.changeHandler)
|
|
343
|
+
: Utils.getChangeHandler(oChange, mControl, mPropertyBag);
|
|
344
|
+
|
|
345
|
+
return pHandlerPromise.then(function(oChangeHandler) {
|
|
346
|
+
checkPreconditions(oChange, mPropertyBag);
|
|
347
|
+
return oChangeHandler;
|
|
348
|
+
})
|
|
374
349
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
} else {
|
|
393
|
-
var fnCallback = Applier.applyChangeOnControl.bind(Applier, oChange, oControl, mPropertyBag);
|
|
394
|
-
DependencyHandler.addChangeApplyCallbackToDependency(oDependencyMap, oChange.getId(), fnCallback);
|
|
395
|
-
}
|
|
350
|
+
.then(function(oChangeHandler) {
|
|
351
|
+
if (oChange.hasApplyProcessStarted()) {
|
|
352
|
+
// wait for the change to be finished and then clean up the status and queue
|
|
353
|
+
return oChange.addPromiseForApplyProcessing().then(function(oResult) {
|
|
354
|
+
oChange.markSuccessful();
|
|
355
|
+
return oResult;
|
|
356
|
+
});
|
|
357
|
+
} else if (!oChange.isApplyProcessFinished()) {
|
|
358
|
+
return (FlUtils.FakePromise ? new FlUtils.FakePromise() : Promise.resolve()).then(function() {
|
|
359
|
+
oChange.startApplying();
|
|
360
|
+
return oChangeHandler.applyChange(oChange, mControl.control, mPropertyBag);
|
|
361
|
+
})
|
|
362
|
+
.then(function(oInitializedControl) {
|
|
363
|
+
return handleAfterApply(oChange, mControl, oInitializedControl, mPropertyBag);
|
|
364
|
+
})
|
|
365
|
+
.catch(function(oError) {
|
|
366
|
+
return handleAfterApplyError(oError, oChange, mControl, mPropertyBag);
|
|
396
367
|
});
|
|
368
|
+
}
|
|
397
369
|
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
370
|
+
// make sure that everything that goes with finishing the apply process is done, even though the change was already applied
|
|
371
|
+
var oResult = {success: true};
|
|
372
|
+
oChange.markSuccessful(oResult);
|
|
373
|
+
return oResult;
|
|
374
|
+
})
|
|
375
|
+
|
|
376
|
+
.catch(function(oError) {
|
|
377
|
+
return {
|
|
378
|
+
success: false,
|
|
379
|
+
error: oError
|
|
380
|
+
};
|
|
381
|
+
});
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Gets the dependency map and gets all changes for that control from the map, then, depending on
|
|
386
|
+
* dependencies, directly applies the change or saves the callback to apply in the dependency.
|
|
387
|
+
*
|
|
388
|
+
* @param {object} oAppComponent - Component instance that is currently loading
|
|
389
|
+
* @param {string} sReference - Flex reference
|
|
390
|
+
* @param {sap.ui.core.Control} oControl Instance of the control to which changes should be applied
|
|
391
|
+
* @returns {Promise|sap.ui.fl.Utils.FakePromise} Resolves as soon as all changes for the control are applied
|
|
392
|
+
*/
|
|
393
|
+
Applier.applyAllChangesForControl = async function(oAppComponent, sReference, oControl) {
|
|
394
|
+
// the changes have to be queued synchronously
|
|
395
|
+
// scenario 1: n controls get created, for all this function is called synchronously. Changes have to be queued synchronously
|
|
396
|
+
// scenario 2: control gets recreated, the changes for the new control have to be queued after the processing of the old control
|
|
397
|
+
const oDependencyMap = UIChangesState.getLiveDependencyMap(sReference);
|
|
398
|
+
var sControlId = oControl.getId();
|
|
399
|
+
var aChangesForControl = oDependencyMap.mChanges[sControlId] || [];
|
|
400
|
+
var mPropertyBag = {
|
|
401
|
+
modifier: JsControlTreeModifier,
|
|
402
|
+
appComponent: oAppComponent,
|
|
403
|
+
view: FlUtils.getViewForControl(oControl)
|
|
404
|
+
};
|
|
405
|
+
|
|
406
|
+
// if there are still changes being processed for the current control, wait for the last of them to be finished
|
|
407
|
+
if (oPendingProcessesOnControl[sControlId]?.length) {
|
|
408
|
+
await oPendingProcessesOnControl[sControlId][oPendingProcessesOnControl[sControlId].length - 1].promise;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
aChangesForControl.forEach(function(oChange) {
|
|
412
|
+
checkAndAdjustChangeStatus(oControl, oChange, mPropertyBag);
|
|
413
|
+
if (!oChange.isApplyProcessFinished() && !oChange._ignoreOnce) {
|
|
414
|
+
oChange.setQueuedForApply();
|
|
425
415
|
}
|
|
416
|
+
});
|
|
426
417
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
418
|
+
oPendingProcessesOnControl[sControlId] ||= [];
|
|
419
|
+
const oNewPromise = {};
|
|
420
|
+
oNewPromise.promise = new Promise(function(resolve) {
|
|
421
|
+
oNewPromise.resolveFunction = resolve;
|
|
422
|
+
});
|
|
423
|
+
oPendingProcessesOnControl[sControlId].push(oNewPromise);
|
|
424
|
+
|
|
425
|
+
// make sure that the current control waits for the previous control to be processed
|
|
426
|
+
oLastPromise = oLastPromise.then(processControl.bind(undefined, oControl, mPropertyBag, oDependencyMap, oAppComponent));
|
|
427
|
+
return oLastPromise;
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Loops over all retrieved flexibility changes and applies them onto the targeted control within the view.
|
|
432
|
+
*
|
|
433
|
+
* @param {object} mPropertyBag - Collection of cross-functional attributes
|
|
434
|
+
* @param {object} mPropertyBag.view - View to process
|
|
435
|
+
* @param {string} mPropertyBag.viewId - ID of the processed view
|
|
436
|
+
* @param {string} mPropertyBag.appComponent - Application component instance responsible for the view
|
|
437
|
+
* @param {object} mPropertyBag.modifier - Polymorph reuse operations handling the changes on the given view type
|
|
438
|
+
* @param {sap.ui.fl.apply._internal.flexObjects.FlexObject[]} aChanges List of flexibility changes on controls for the current processed view
|
|
439
|
+
* @returns {Promise|sap.ui.fl.Utils.FakePromise} Promise that is resolved after all changes were reverted in asynchronous case or FakePromise for the synchronous processing scenario including view object in both cases
|
|
440
|
+
*/
|
|
441
|
+
Applier.applyAllChangesForXMLView = function(mPropertyBag, aChanges) {
|
|
442
|
+
if (!Array.isArray(aChanges)) {
|
|
443
|
+
var sErrorMessage = `No list of changes was passed for processing the flexibility on view: ${mPropertyBag.view}.`;
|
|
444
|
+
Log.error(sErrorMessage, undefined, "sap.ui.fl.apply._internal.changes.Applier");
|
|
445
|
+
aChanges = [];
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
var aOnAfterXMLChangeProcessingHandlers = [];
|
|
449
|
+
mPropertyBag.failedSelectors = [];
|
|
450
|
+
|
|
451
|
+
return aChanges.reduce(function(oPreviousPromise, oChange) {
|
|
452
|
+
var oControl;
|
|
453
|
+
return oPreviousPromise
|
|
454
|
+
.then(checkControlAndDependentSelectorControls.bind(null, oChange, mPropertyBag))
|
|
455
|
+
.then(function(oReturnedControl) {
|
|
456
|
+
oControl = oReturnedControl;
|
|
457
|
+
var mControl = Utils.getControlIfTemplateAffected(oChange, oControl, mPropertyBag);
|
|
458
|
+
return Utils.getChangeHandler(oChange, mControl, mPropertyBag);
|
|
459
|
+
})
|
|
460
|
+
.then(function(oChangeHandler) {
|
|
461
|
+
mPropertyBag.changeHandler = oChangeHandler;
|
|
462
|
+
oChange.setQueuedForApply();
|
|
463
|
+
checkAndAdjustChangeStatus(oControl, oChange, mPropertyBag);
|
|
464
|
+
|
|
465
|
+
if (!oChange.isApplyProcessFinished()) {
|
|
466
|
+
if (typeof mPropertyBag.changeHandler.onAfterXMLChangeProcessing === "function") {
|
|
467
|
+
registerOnAfterXMLChangeProcessingHandler(
|
|
468
|
+
aOnAfterXMLChangeProcessingHandlers,
|
|
469
|
+
mPropertyBag.changeHandler,
|
|
470
|
+
oControl
|
|
471
|
+
);
|
|
453
472
|
}
|
|
454
|
-
return
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
473
|
+
return Applier.applyChangeOnControl(oChange, oControl, mPropertyBag);
|
|
474
|
+
}
|
|
475
|
+
return {success: true};
|
|
476
|
+
})
|
|
477
|
+
.then(function(oReturn) {
|
|
478
|
+
if (!oReturn.success) {
|
|
479
|
+
throw Error(oReturn.error);
|
|
480
|
+
}
|
|
481
|
+
})
|
|
482
|
+
.catch(function(oError) {
|
|
483
|
+
oChange.getDependentSelectorList().forEach(function(oDependentControlSelector) {
|
|
484
|
+
if (FlUtils.indexOfObject(mPropertyBag.failedSelectors, oDependentControlSelector) === -1) {
|
|
485
|
+
mPropertyBag.failedSelectors.push(oDependentControlSelector);
|
|
459
486
|
}
|
|
460
|
-
})
|
|
461
|
-
.catch(function(oError) {
|
|
462
|
-
oChange.getDependentSelectorList().forEach(function(oDependentControlSelector) {
|
|
463
|
-
if (FlUtils.indexOfObject(mPropertyBag.failedSelectors, oDependentControlSelector) === -1) {
|
|
464
|
-
mPropertyBag.failedSelectors.push(oDependentControlSelector);
|
|
465
|
-
}
|
|
466
|
-
});
|
|
467
|
-
logApplyChangeError(oError, oChange);
|
|
468
487
|
});
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
488
|
+
logApplyChangeError(oError, oChange);
|
|
489
|
+
});
|
|
490
|
+
}, (FlUtils.FakePromise ? new FlUtils.FakePromise() : Promise.resolve()))
|
|
491
|
+
.then(function() {
|
|
492
|
+
delete mPropertyBag.failedSelectors;
|
|
493
|
+
|
|
494
|
+
// Once all changes for a control are processed, call the
|
|
495
|
+
// onAfterXMLChangeProcessing hooks of all involved change handlers
|
|
496
|
+
aOnAfterXMLChangeProcessingHandlers.forEach(function(mHandler) {
|
|
497
|
+
mHandler.controls.forEach(function(oControl) {
|
|
498
|
+
try {
|
|
499
|
+
mHandler.handler.onAfterXMLChangeProcessing(oControl, mPropertyBag);
|
|
500
|
+
} catch (oError) {
|
|
501
|
+
Log.error("Error during onAfterXMLChangeProcessing", oError);
|
|
502
|
+
}
|
|
483
503
|
});
|
|
484
|
-
|
|
485
|
-
return mPropertyBag.view;
|
|
486
504
|
});
|
|
487
|
-
|
|
505
|
+
|
|
506
|
+
return mPropertyBag.view;
|
|
507
|
+
});
|
|
488
508
|
};
|
|
489
509
|
return Applier;
|
|
490
510
|
});
|
|
@@ -22,7 +22,7 @@ sap.ui.define([
|
|
|
22
22
|
*
|
|
23
23
|
* @namespace sap.ui.fl.apply._internal.changes.Utils
|
|
24
24
|
* @since 1.70
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.122.0
|
|
26
26
|
* @private
|
|
27
27
|
* @ui5-restricted sap.ui.fl.apply._internal, sap.ui.fl.write._internal
|
|
28
28
|
*/
|
|
@@ -124,7 +124,7 @@ sap.ui.define([
|
|
|
124
124
|
* @param {sap.ui.fl.apply._internal.flexObjects.FlexObject} oChange - Change instance to check
|
|
125
125
|
* @returns {boolean} <code>true</code> if the change belongs to the given view
|
|
126
126
|
*/
|
|
127
|
-
|
|
127
|
+
isChangeInView(mPropertyBag, oChange) {
|
|
128
128
|
var oModifier = mPropertyBag.modifier;
|
|
129
129
|
var oAppComponent = mPropertyBag.appComponent;
|
|
130
130
|
var oSelector = oChange.getSelector();
|
|
@@ -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.122.0
|
|
23
23
|
* @private
|
|
24
24
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
25
25
|
*/
|
|
@@ -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.122.0
|
|
22
22
|
* @private
|
|
23
23
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
24
24
|
*/
|