@openui5/sap.ui.rta 1.115.1 → 1.116.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/.eslintrc.json +33 -2
- package/.reuse/dep5 +0 -5
- package/THIRDPARTY.txt +1 -7
- package/package.json +6 -6
- package/src/sap/ui/rta/.library +1 -1
- package/src/sap/ui/rta/Client.js +60 -59
- package/src/sap/ui/rta/RuntimeAuthoring.js +253 -248
- package/src/sap/ui/rta/Utils.js +42 -42
- package/src/sap/ui/rta/api/startAdaptation.js +2 -2
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +3 -3
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +27 -27
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +97 -97
- package/src/sap/ui/rta/appVariant/Feature.js +75 -77
- package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +6 -7
- package/src/sap/ui/rta/appVariant/Utils.js +17 -17
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +36 -36
- package/src/sap/ui/rta/command/AddIFrame.js +7 -7
- package/src/sap/ui/rta/command/AddProperty.js +7 -7
- package/src/sap/ui/rta/command/AddXML.js +1 -1
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +7 -7
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +18 -18
- package/src/sap/ui/rta/command/BaseCommand.js +1 -2
- package/src/sap/ui/rta/command/BindProperty.js +1 -1
- package/src/sap/ui/rta/command/Combine.js +1 -1
- package/src/sap/ui/rta/command/CommandFactory.js +11 -11
- package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +22 -22
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +7 -7
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +11 -11
- package/src/sap/ui/rta/command/CreateContainer.js +2 -2
- package/src/sap/ui/rta/command/CustomAdd.js +1 -1
- package/src/sap/ui/rta/command/FlexCommand.js +30 -30
- package/src/sap/ui/rta/command/LREPSerializer.js +2 -2
- package/src/sap/ui/rta/command/LocalReset.js +1 -1
- package/src/sap/ui/rta/command/Move.js +1 -1
- package/src/sap/ui/rta/command/Property.js +1 -1
- package/src/sap/ui/rta/command/Remove.js +1 -1
- package/src/sap/ui/rta/command/Rename.js +1 -1
- package/src/sap/ui/rta/command/Resize.js +1 -1
- package/src/sap/ui/rta/command/Reveal.js +1 -1
- package/src/sap/ui/rta/command/Settings.js +1 -1
- package/src/sap/ui/rta/command/Split.js +1 -1
- package/src/sap/ui/rta/command/Stack.js +4 -4
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
- package/src/sap/ui/rta/enablement/TestDelegate.js +92 -92
- package/src/sap/ui/rta/enablement/elementActionTest.js +230 -112
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +11 -1
- package/src/sap/ui/rta/messagebundle_ar.properties +5 -0
- package/src/sap/ui/rta/messagebundle_bg.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ca.properties +5 -0
- package/src/sap/ui/rta/messagebundle_cs.properties +5 -0
- package/src/sap/ui/rta/messagebundle_cy.properties +5 -0
- package/src/sap/ui/rta/messagebundle_da.properties +5 -0
- package/src/sap/ui/rta/messagebundle_de.properties +5 -0
- package/src/sap/ui/rta/messagebundle_el.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en_GB.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +6 -1
- package/src/sap/ui/rta/messagebundle_es.properties +5 -0
- package/src/sap/ui/rta/messagebundle_es_MX.properties +5 -0
- package/src/sap/ui/rta/messagebundle_et.properties +5 -0
- package/src/sap/ui/rta/messagebundle_fi.properties +5 -0
- package/src/sap/ui/rta/messagebundle_fr.properties +5 -0
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +5 -0
- package/src/sap/ui/rta/messagebundle_hi.properties +5 -0
- package/src/sap/ui/rta/messagebundle_hr.properties +5 -0
- package/src/sap/ui/rta/messagebundle_hu.properties +5 -0
- package/src/sap/ui/rta/messagebundle_id.properties +5 -0
- package/src/sap/ui/rta/messagebundle_it.properties +5 -0
- package/src/sap/ui/rta/messagebundle_iw.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ja.properties +5 -0
- package/src/sap/ui/rta/messagebundle_kk.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ko.properties +5 -0
- package/src/sap/ui/rta/messagebundle_lt.properties +5 -0
- package/src/sap/ui/rta/messagebundle_lv.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ms.properties +5 -0
- package/src/sap/ui/rta/messagebundle_nl.properties +5 -0
- package/src/sap/ui/rta/messagebundle_no.properties +5 -0
- package/src/sap/ui/rta/messagebundle_pl.properties +5 -0
- package/src/sap/ui/rta/messagebundle_pt.properties +5 -0
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ro.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ru.properties +5 -0
- package/src/sap/ui/rta/messagebundle_sh.properties +5 -0
- package/src/sap/ui/rta/messagebundle_sk.properties +5 -0
- package/src/sap/ui/rta/messagebundle_sl.properties +5 -0
- package/src/sap/ui/rta/messagebundle_sv.properties +5 -0
- package/src/sap/ui/rta/messagebundle_th.properties +5 -0
- package/src/sap/ui/rta/messagebundle_tr.properties +5 -0
- package/src/sap/ui/rta/messagebundle_uk.properties +5 -0
- package/src/sap/ui/rta/messagebundle_vi.properties +5 -0
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +5 -0
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +5 -0
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +44 -44
- package/src/sap/ui/rta/plugin/BaseCreate.js +29 -29
- package/src/sap/ui/rta/plugin/Combine.js +9 -9
- package/src/sap/ui/rta/plugin/ControlVariant.js +21 -21
- package/src/sap/ui/rta/plugin/CreateContainer.js +6 -6
- package/src/sap/ui/rta/plugin/CutPaste.js +46 -46
- package/src/sap/ui/rta/plugin/DragDrop.js +2 -2
- package/src/sap/ui/rta/plugin/EasyAdd.js +4 -4
- package/src/sap/ui/rta/plugin/EasyRemove.js +5 -5
- package/src/sap/ui/rta/plugin/LocalReset.js +25 -25
- package/src/sap/ui/rta/plugin/Plugin.js +20 -20
- package/src/sap/ui/rta/plugin/RTAElementMover.js +42 -42
- package/src/sap/ui/rta/plugin/Remove.js +11 -11
- package/src/sap/ui/rta/plugin/Rename.js +7 -7
- package/src/sap/ui/rta/plugin/RenameHandler.js +17 -17
- package/src/sap/ui/rta/plugin/Resize.js +62 -62
- package/src/sap/ui/rta/plugin/Selection.js +14 -14
- package/src/sap/ui/rta/plugin/Settings.js +20 -20
- package/src/sap/ui/rta/plugin/Split.js +7 -7
- package/src/sap/ui/rta/plugin/Stretch.js +4 -4
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +94 -87
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +18 -18
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +98 -99
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +144 -144
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +3 -4
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +67 -67
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +38 -39
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +1 -0
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +29 -29
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +5 -5
- package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +1 -1
- package/src/sap/ui/rta/service/Action.js +36 -37
- package/src/sap/ui/rta/service/ControllerExtension.js +4 -4
- package/src/sap/ui/rta/service/Outline.js +59 -59
- package/src/sap/ui/rta/service/Property.js +125 -125
- package/src/sap/ui/rta/service/Receiver.js +78 -77
- package/src/sap/ui/rta/service/Selection.js +6 -6
- package/src/sap/ui/rta/service/SupportTools.js +30 -30
- package/src/sap/ui/rta/service/index.js +1 -1
- package/src/sap/ui/rta/toolbar/Adaptation.js +74 -26
- package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
- package/src/sap/ui/rta/toolbar/Base.js +17 -15
- package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -2
- package/src/sap/ui/rta/toolbar/Fiori.js +8 -8
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +4 -4
- package/src/sap/ui/rta/toolbar/Personalization.js +2 -2
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +13 -6
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +2 -8
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +2 -3
- package/src/sap/ui/rta/toolbar/translation/Translation.js +41 -41
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +9 -9
- package/src/sap/ui/rta/util/Animation.js +5 -5
- package/src/sap/ui/rta/util/BindingsExtractor.js +33 -33
- package/src/sap/ui/rta/util/PluginManager.js +25 -25
- package/src/sap/ui/rta/util/PopupManager.js +27 -27
- package/src/sap/ui/rta/util/ReloadManager.js +1 -1
- package/src/sap/ui/rta/util/ServiceEventBus.js +3 -4
- package/src/sap/ui/rta/util/StylesLoader.js +9 -9
- package/src/sap/ui/rta/util/UrlParser.js +19 -19
- package/src/sap/ui/rta/util/adaptationStarter.js +34 -31
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +21 -19
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +61 -61
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +73 -60
- package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +6 -6
- package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
- package/src/sap/ui/rta/util/hasStableId.js +2 -2
- package/src/sap/ui/rta/util/showMessageBox.js +4 -5
- package/src/sap/ui/rta/util/validateFlexEnabled.js +5 -5
- package/src/sap/ui/rta/util/validateStableIds.js +8 -8
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
function evaluateTemplateBinding(oElementOverlay) {
|
|
28
28
|
var mBoundControl = ElementUtil.getAggregationInformation(oElementOverlay.getElement());
|
|
29
29
|
if (mBoundControl.elementId) {
|
|
30
|
-
//check for additional binding
|
|
30
|
+
// check for additional binding
|
|
31
31
|
var oBoundControlOverlay = OverlayRegistry.getOverlay(mBoundControl.elementId);
|
|
32
32
|
var oParentElementOverlay = oBoundControlOverlay.getParentElementOverlay();
|
|
33
33
|
var bAdditionalBinding = oParentElementOverlay ?
|
|
@@ -261,7 +261,7 @@ sap.ui.define([
|
|
|
261
261
|
changeOnRelevantContainer: mSettings.changeOnRelevantContainer,
|
|
262
262
|
changeType: mSettings.changeType
|
|
263
263
|
});
|
|
264
|
-
delete mSettings
|
|
264
|
+
delete mSettings.changeOnRelevantContainer; // this property is not required for a sap.ui.rta.command.CustomAdd
|
|
265
265
|
return oAction;
|
|
266
266
|
}
|
|
267
267
|
return undefined;
|
|
@@ -408,14 +408,14 @@ sap.ui.define([
|
|
|
408
408
|
return Promise.reject(DtUtil.createError("CommandFactory#getCommandFor", "Command '" + sCommand + "' doesn't exist, check typing", "sap.ui.rta"));
|
|
409
409
|
}
|
|
410
410
|
|
|
411
|
-
return new Promise(function
|
|
411
|
+
return new Promise(function(fnResolve) {
|
|
412
412
|
var sClassName = mCommand.clazz;
|
|
413
|
-
sap.ui.require([sClassName], function
|
|
413
|
+
sap.ui.require([sClassName], function(Command) {
|
|
414
414
|
fnResolve(Command);
|
|
415
415
|
});
|
|
416
416
|
})
|
|
417
417
|
|
|
418
|
-
.then(function
|
|
418
|
+
.then(function(Command) {
|
|
419
419
|
var bIsUiElement = vElement instanceof ManagedObject;
|
|
420
420
|
|
|
421
421
|
// only sap.ui.rta.command.FlexCommand requires a selector property
|
|
@@ -460,7 +460,7 @@ sap.ui.define([
|
|
|
460
460
|
|
|
461
461
|
oCommand = new Command(mSettings);
|
|
462
462
|
|
|
463
|
-
var bSuccessfullyConfigured = true; //configuration is optional
|
|
463
|
+
var bSuccessfullyConfigured = true; // configuration is optional
|
|
464
464
|
if (mCommand.configure) {
|
|
465
465
|
bSuccessfullyConfigured = configureActionCommand(oCommand, oAction);
|
|
466
466
|
}
|
|
@@ -485,7 +485,7 @@ sap.ui.define([
|
|
|
485
485
|
* @extends sap.ui.base.ManagedObject
|
|
486
486
|
*
|
|
487
487
|
* @author SAP SE
|
|
488
|
-
* @version 1.
|
|
488
|
+
* @version 1.116.0
|
|
489
489
|
*
|
|
490
490
|
* @constructor
|
|
491
491
|
* @private
|
|
@@ -505,7 +505,7 @@ sap.ui.define([
|
|
|
505
505
|
}
|
|
506
506
|
});
|
|
507
507
|
|
|
508
|
-
CommandFactory.prototype.init = function
|
|
508
|
+
CommandFactory.prototype.init = function() {
|
|
509
509
|
this.setProperty("flexSettings", {
|
|
510
510
|
layer: Layer.CUSTOMER,
|
|
511
511
|
developerMode: true
|
|
@@ -517,7 +517,7 @@ sap.ui.define([
|
|
|
517
517
|
*
|
|
518
518
|
* @param {Object} [mFlexSettings] - Property bag. See {@link sap.ui.rta.RuntimeAuthoring#setFlexSettings} method for more information
|
|
519
519
|
*/
|
|
520
|
-
CommandFactory.prototype.setFlexSettings = function
|
|
520
|
+
CommandFactory.prototype.setFlexSettings = function(mFlexSettings) {
|
|
521
521
|
this.setProperty("flexSettings", Object.assign(this.getFlexSettings(), mFlexSettings));
|
|
522
522
|
};
|
|
523
523
|
|
|
@@ -530,7 +530,7 @@ sap.ui.define([
|
|
|
530
530
|
* @param {string} sVariantManagementReference - Variant management reference
|
|
531
531
|
* @returns {Promise} A promise which will return the created command
|
|
532
532
|
*/
|
|
533
|
-
CommandFactory.prototype.getCommandFor = function
|
|
533
|
+
CommandFactory.prototype.getCommandFor = function(vElement, sCommand, mSettings, oDesignTimeMetadata, sVariantManagementReference) {
|
|
534
534
|
return getCommandFor(vElement, sCommand, mSettings, oDesignTimeMetadata, this.getFlexSettings(), sVariantManagementReference);
|
|
535
535
|
};
|
|
536
536
|
|
|
@@ -549,7 +549,7 @@ sap.ui.define([
|
|
|
549
549
|
* @param {string} [mFlexSettings.generator] - Generator of the change. Will be saved in the change
|
|
550
550
|
* @returns {Promise} A promise which will return the created command
|
|
551
551
|
*/
|
|
552
|
-
CommandFactory.getCommandFor = function
|
|
552
|
+
CommandFactory.getCommandFor = function(vElement, sCommand, mSettings, oDesignTimeMetadata, mFlexSettings) {
|
|
553
553
|
if (!mFlexSettings) {
|
|
554
554
|
mFlexSettings = {
|
|
555
555
|
layer: Layer.CUSTOMER,
|
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
* @class
|
|
25
25
|
* @extends sap.ui.rta.command.BaseCommand
|
|
26
26
|
* @author SAP SE
|
|
27
|
-
* @version 1.
|
|
27
|
+
* @version 1.116.0
|
|
28
28
|
* @constructor
|
|
29
29
|
* @private
|
|
30
30
|
* @since 1.52
|
|
@@ -94,7 +94,7 @@ sap.ui.define([
|
|
|
94
94
|
Object.keys(mChangeProperties).forEach(function(sProperty) {
|
|
95
95
|
var sOriginalProperty = "original" + sProperty.charAt(0).toUpperCase() + sProperty.substr(1);
|
|
96
96
|
if (sProperty === "visible") {
|
|
97
|
-
mPropertyBag[sProperty] = true; /*visibility of the variant always set back to true on undo*/
|
|
97
|
+
mPropertyBag[sProperty] = true; /* visibility of the variant always set back to true on undo */
|
|
98
98
|
} else if (mChangeProperties[sOriginalProperty]) {
|
|
99
99
|
mPropertyBag[sProperty] = mChangeProperties[sOriginalProperty];
|
|
100
100
|
mPropertyBag[sOriginalProperty] = mChangeProperties[sProperty];
|
|
@@ -28,7 +28,7 @@ sap.ui.define([
|
|
|
28
28
|
* @class
|
|
29
29
|
* @extends sap.ui.rta.command.BaseCommand
|
|
30
30
|
* @author SAP SE
|
|
31
|
-
* @version 1.
|
|
31
|
+
* @version 1.116.0
|
|
32
32
|
* @constructor
|
|
33
33
|
* @private
|
|
34
34
|
* @since 1.86
|
|
@@ -88,9 +88,9 @@ sap.ui.define([
|
|
|
88
88
|
this.oVariantManagementControl.openSaveAsDialogForKeyUser(rtaUtils.getRtaStyleClassName(),
|
|
89
89
|
ContextSharingAPI.createComponent(mComponentPropertyBag));
|
|
90
90
|
}.bind(this))
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
.then(function(bState) {
|
|
92
|
+
return bState;
|
|
93
|
+
});
|
|
94
94
|
};
|
|
95
95
|
|
|
96
96
|
ControlVariantSaveAs.prototype.getPreparedChange = function() {
|
|
@@ -113,17 +113,17 @@ sap.ui.define([
|
|
|
113
113
|
mParams.newVariantReference = this.sNewVariantReference;
|
|
114
114
|
mParams.generator = rtaLibrary.GENERATOR_NAME;
|
|
115
115
|
return this.oModel._handleSave(this.oVariantManagementControl, mParams)
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
116
|
+
.then(function(aDirtyChanges) {
|
|
117
|
+
this._aPreparedChanges = aDirtyChanges;
|
|
118
|
+
this._oVariantChange = aDirtyChanges[0];
|
|
119
|
+
this.sNewVariantReference = this._oVariantChange.getId();
|
|
120
|
+
this._aPreparedChanges.forEach(function(oChange) {
|
|
121
|
+
if (oChange.getFileType() === "change") {
|
|
122
|
+
oChange.setSavedToVariant(true);
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
this.getModel().invalidateMap();
|
|
126
|
+
}.bind(this));
|
|
127
127
|
};
|
|
128
128
|
|
|
129
129
|
/**
|
|
@@ -147,13 +147,13 @@ sap.ui.define([
|
|
|
147
147
|
};
|
|
148
148
|
|
|
149
149
|
return this.oModel.removeVariant(mPropertyBag, true)
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
150
|
+
.then(function() {
|
|
151
|
+
return this.oModel.addAndApplyChangesOnVariant(this._aControlChanges);
|
|
152
|
+
}.bind(this))
|
|
153
|
+
.then(function() {
|
|
154
|
+
this._aPreparedChanges = null;
|
|
155
|
+
this._oVariantChange = null;
|
|
156
|
+
}.bind(this));
|
|
157
157
|
}
|
|
158
158
|
return Promise.resolve();
|
|
159
159
|
};
|
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
* @class
|
|
25
25
|
* @extends sap.ui.rta.command.BaseCommand
|
|
26
26
|
* @author SAP SE
|
|
27
|
-
* @version 1.
|
|
27
|
+
* @version 1.116.0
|
|
28
28
|
* @constructor
|
|
29
29
|
* @private
|
|
30
30
|
* @since 1.50
|
|
@@ -88,9 +88,9 @@ sap.ui.define([
|
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
return Promise.resolve(this.oModel.addVariantChange(this.sVariantManagementReference, mPropertyBag))
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
.then(function(oChange) {
|
|
92
|
+
this._oVariantChange = oChange;
|
|
93
|
+
}.bind(this));
|
|
94
94
|
};
|
|
95
95
|
|
|
96
96
|
/**
|
|
@@ -107,9 +107,9 @@ sap.ui.define([
|
|
|
107
107
|
var oChange = this._oVariantChange;
|
|
108
108
|
|
|
109
109
|
return Promise.resolve(this.oModel.deleteVariantChange(this.sVariantManagementReference, mPropertyBag, oChange))
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
.then(function() {
|
|
111
|
+
this._oVariantChange = null;
|
|
112
|
+
}.bind(this));
|
|
113
113
|
};
|
|
114
114
|
|
|
115
115
|
return ControlVariantSetTitle;
|
|
@@ -22,7 +22,7 @@ sap.ui.define([
|
|
|
22
22
|
* @class
|
|
23
23
|
* @extends sap.ui.rta.command.BaseCommand
|
|
24
24
|
* @author SAP SE
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.116.0
|
|
26
26
|
* @constructor
|
|
27
27
|
* @private
|
|
28
28
|
* @since 1.50
|
|
@@ -53,9 +53,9 @@ sap.ui.define([
|
|
|
53
53
|
|
|
54
54
|
function discardVariantContent(sVReference) {
|
|
55
55
|
return this.oModel.eraseDirtyChangesOnVariant(this.sVariantManagementReference, sVReference)
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
.then(function(aDirtyChanges) {
|
|
57
|
+
this._aSourceVariantDirtyChanges = aDirtyChanges;
|
|
58
|
+
}.bind(this));
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
ControlVariantSwitch.prototype._getAppComponent = function() {
|
|
@@ -78,13 +78,13 @@ sap.ui.define([
|
|
|
78
78
|
this.sVariantManagementReference = JsControlTreeModifier.getSelector(oElement, oAppComponent).id;
|
|
79
79
|
|
|
80
80
|
return Promise.resolve()
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
81
|
+
.then(function() {
|
|
82
|
+
if (this.getDiscardVariantContent()) {
|
|
83
|
+
return discardVariantContent.call(this, this.getSourceVariantReference());
|
|
84
|
+
}
|
|
85
|
+
return undefined;
|
|
86
|
+
}.bind(this))
|
|
87
|
+
.then(this._updateModelVariant.bind(this, sNewVariantReference, oAppComponent));
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
/**
|
|
@@ -12,7 +12,7 @@ sap.ui.define(["sap/ui/rta/command/FlexCommand"], function(FlexCommand) {
|
|
|
12
12
|
* @class
|
|
13
13
|
* @extends sap.ui.rta.command.FlexCommand
|
|
14
14
|
* @author SAP SE
|
|
15
|
-
* @version 1.
|
|
15
|
+
* @version 1.116.0
|
|
16
16
|
* @constructor
|
|
17
17
|
* @private
|
|
18
18
|
* @since 1.34
|
|
@@ -32,7 +32,7 @@ sap.ui.define(["sap/ui/rta/command/FlexCommand"], function(FlexCommand) {
|
|
|
32
32
|
type: "string",
|
|
33
33
|
group: "content"
|
|
34
34
|
},
|
|
35
|
-
label: { //legacy property => exposed in tests
|
|
35
|
+
label: { // legacy property => exposed in tests
|
|
36
36
|
type: "string"
|
|
37
37
|
},
|
|
38
38
|
parentId: {
|
|
@@ -33,7 +33,7 @@ sap.ui.define([
|
|
|
33
33
|
* @extends sap.ui.rta.command.BaseCommand
|
|
34
34
|
*
|
|
35
35
|
* @author SAP SE
|
|
36
|
-
* @version 1.
|
|
36
|
+
* @version 1.116.0
|
|
37
37
|
*
|
|
38
38
|
* @constructor
|
|
39
39
|
* @private
|
|
@@ -121,14 +121,14 @@ sap.ui.define([
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
return this._createChange(mFlexSettings, sVariantManagementReference, sCommand)
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
124
|
+
.then(function(oChange) {
|
|
125
|
+
this._oPreparedChange = oChange;
|
|
126
|
+
return true;
|
|
127
|
+
}.bind(this))
|
|
128
|
+
.catch(function(oError) {
|
|
129
|
+
Log.error(oError.message || oError.name);
|
|
130
|
+
return false;
|
|
131
|
+
});
|
|
132
132
|
};
|
|
133
133
|
|
|
134
134
|
/**
|
|
@@ -160,12 +160,12 @@ sap.ui.define([
|
|
|
160
160
|
changeType: this.getChangeType()
|
|
161
161
|
};
|
|
162
162
|
objectValues(mProperties)
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
163
|
+
.filter(function(oProperty) {
|
|
164
|
+
return oProperty.group === "content";
|
|
165
|
+
})
|
|
166
|
+
.forEach(function(oProperty) {
|
|
167
|
+
mChangeSpecificData[oProperty.name] = oProperty.get(this);
|
|
168
|
+
}, this);
|
|
169
169
|
return mChangeSpecificData;
|
|
170
170
|
};
|
|
171
171
|
|
|
@@ -205,25 +205,26 @@ sap.ui.define([
|
|
|
205
205
|
if (sVariantReference && !this.getVariantIndependent()) {
|
|
206
206
|
var mVariantObj = {
|
|
207
207
|
variantManagementReference: sVariantManagementReference,
|
|
208
|
-
variantReference: sVariantReference
|
|
208
|
+
variantReference: sVariantReference,
|
|
209
|
+
isChangeOnStandardVariant: sVariantManagementReference === sVariantReference
|
|
209
210
|
};
|
|
210
211
|
mChangeSpecificData = Object.assign({}, mChangeSpecificData, mVariantObj);
|
|
211
212
|
}
|
|
212
213
|
mChangeSpecificData.command = sCommand;
|
|
213
214
|
mChangeSpecificData.generator = mFlexSettings.generator || rtaLibrary.GENERATOR_NAME;
|
|
214
215
|
return ChangesWriteAPI.create({changeSpecificData: mChangeSpecificData, selector: this._validateControlForChange(mFlexSettings)})
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
216
|
+
.then(function(oChange) {
|
|
217
|
+
// originalSelector is only present when making a change on/inside a template; the selector does not work with the JS propagation hook (the template has no parent),
|
|
218
|
+
// therefore the selector is changed to the parent (already the selector of the command) and the original selector saved as dependent.
|
|
219
|
+
// Also 'boundAggregation' property gets saved in the change content
|
|
220
|
+
// ATTENTION! the change gets applied as soon as the parent is available, so there might be possible side effects with lazy loading
|
|
221
|
+
if (mFlexSettings && mFlexSettings.originalSelector) {
|
|
222
|
+
oChange.addDependentControl(mFlexSettings.originalSelector, "originalSelector", {modifier: JsControlTreeModifier, appComponent: this.getAppComponent()});
|
|
223
|
+
oChange.setSelector(Object.assign(oChange.getSelector(), JsControlTreeModifier.getSelector(this.getSelector().id, this.getAppComponent())));
|
|
224
|
+
oChange.setContent(Object.assign({}, oChange.getContent(), mFlexSettings.content));
|
|
225
|
+
}
|
|
226
|
+
return oChange;
|
|
227
|
+
}.bind(this));
|
|
227
228
|
};
|
|
228
229
|
|
|
229
230
|
/**
|
|
@@ -243,13 +244,12 @@ sap.ui.define([
|
|
|
243
244
|
* @returns {Promise} Returns an empty promise
|
|
244
245
|
*/
|
|
245
246
|
FlexCommand.prototype._applyChange = function(vChange) {
|
|
246
|
-
//TODO: remove the following compatibility code when concept is implemented
|
|
247
|
+
// TODO: remove the following compatibility code when concept is implemented
|
|
247
248
|
var oChange = vChange.change || vChange;
|
|
248
249
|
|
|
249
250
|
var oAppComponent = this.getAppComponent();
|
|
250
251
|
var oSelectorElement = JsControlTreeModifier.bySelector(oChange.getSelector(), oAppComponent);
|
|
251
252
|
|
|
252
|
-
|
|
253
253
|
var mPropertyBag = {
|
|
254
254
|
modifier: JsControlTreeModifier,
|
|
255
255
|
appComponent: oAppComponent,
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* @class
|
|
28
28
|
* @extends sap.ui.base.ManagedObject
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.116.0
|
|
31
31
|
* @constructor
|
|
32
32
|
* @private
|
|
33
33
|
* @since 1.42
|
|
@@ -80,7 +80,7 @@ sap.ui.define([
|
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
LREPSerializer.prototype.handleCommandExecuted = function(oEvent) {
|
|
83
|
-
return (function
|
|
83
|
+
return (function(oEvent) {
|
|
84
84
|
var oParams = oEvent;
|
|
85
85
|
this._lastPromise = this._lastPromise.catch(function() {
|
|
86
86
|
// _lastPromise chain must not be interrupted
|
|
@@ -59,7 +59,7 @@ sap.ui.define([
|
|
|
59
59
|
* @class
|
|
60
60
|
* @extends sap.ui.base.ManagedObject
|
|
61
61
|
* @author SAP SE
|
|
62
|
-
* @version 1.
|
|
62
|
+
* @version 1.116.0
|
|
63
63
|
* @constructor
|
|
64
64
|
* @private
|
|
65
65
|
* @since 1.34
|
|
@@ -130,8 +130,8 @@ sap.ui.define([
|
|
|
130
130
|
mChanges[oChange.getId()] = oChange;
|
|
131
131
|
});
|
|
132
132
|
aFileNames
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
.reduce(toAvailableChanges.bind(null, mChanges), [])
|
|
134
|
+
.forEach(pushToStack.bind(null, oComponent, mComposite, oStack));
|
|
135
135
|
return oStack;
|
|
136
136
|
});
|
|
137
137
|
}
|
|
@@ -224,7 +224,7 @@ sap.ui.define([
|
|
|
224
224
|
|
|
225
225
|
Stack.prototype.execute = function() {
|
|
226
226
|
this._oLastCommand = this._oLastCommand.catch(function() {
|
|
227
|
-
//continue also if previous command failed
|
|
227
|
+
// continue also if previous command failed
|
|
228
228
|
}).then(function() {
|
|
229
229
|
var oCommand = this._getCommandToBeExecuted();
|
|
230
230
|
if (oCommand) {
|