@openui5/sap.ui.rta 1.103.1 → 1.106.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 +35 -15
- package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +5 -0
- package/THIRDPARTY.txt +64 -21
- package/package.json +6 -6
- package/src/sap/ui/rta/.library +1 -1
- package/src/sap/ui/rta/Client.js +1 -1
- package/src/sap/ui/rta/RuntimeAuthoring.js +107 -418
- package/src/sap/ui/rta/Utils.js +2 -2
- package/src/sap/ui/rta/api/startAdaptation.js +2 -2
- package/src/sap/ui/rta/api/startKeyUserAdaptation.js +2 -2
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +6 -22
- package/src/sap/ui/rta/appVariant/Feature.js +4 -12
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +5 -3
- package/src/sap/ui/rta/command/AddIFrame.js +1 -1
- package/src/sap/ui/rta/command/AddProperty.js +1 -1
- package/src/sap/ui/rta/command/AddXML.js +1 -1
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +8 -3
- package/src/sap/ui/rta/command/BaseCommand.js +1 -1
- 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 +1 -1
- package/src/sap/ui/rta/command/CompositeCommand.js +7 -5
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +4 -2
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +5 -3
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +5 -4
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/CreateContainer.js +1 -1
- package/src/sap/ui/rta/command/CustomAdd.js +1 -1
- package/src/sap/ui/rta/command/FlexCommand.js +5 -3
- package/src/sap/ui/rta/command/LREPSerializer.js +11 -8
- 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 +17 -7
- 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 +6 -4
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +6 -4
- package/src/sap/ui/rta/enablement/elementActionTest.js +89 -15
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +46 -11
- package/src/sap/ui/rta/messagebundle_ar.properties +24 -8
- package/src/sap/ui/rta/messagebundle_bg.properties +25 -9
- package/src/sap/ui/rta/messagebundle_ca.properties +25 -9
- package/src/sap/ui/rta/messagebundle_cs.properties +24 -8
- package/src/sap/ui/rta/messagebundle_cy.properties +22 -6
- package/src/sap/ui/rta/messagebundle_da.properties +26 -10
- package/src/sap/ui/rta/messagebundle_de.properties +27 -11
- package/src/sap/ui/rta/messagebundle_el.properties +25 -9
- package/src/sap/ui/rta/messagebundle_en.properties +26 -10
- package/src/sap/ui/rta/messagebundle_en_GB.properties +26 -10
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +30 -11
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +18 -1
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +27 -11
- package/src/sap/ui/rta/messagebundle_es.properties +22 -6
- package/src/sap/ui/rta/messagebundle_es_MX.properties +20 -4
- package/src/sap/ui/rta/messagebundle_et.properties +22 -6
- package/src/sap/ui/rta/messagebundle_fi.properties +26 -10
- package/src/sap/ui/rta/messagebundle_fr.properties +23 -7
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +25 -9
- package/src/sap/ui/rta/messagebundle_hi.properties +25 -9
- package/src/sap/ui/rta/messagebundle_hr.properties +25 -9
- package/src/sap/ui/rta/messagebundle_hu.properties +18 -2
- package/src/sap/ui/rta/messagebundle_id.properties +24 -8
- package/src/sap/ui/rta/messagebundle_it.properties +25 -9
- package/src/sap/ui/rta/messagebundle_iw.properties +25 -9
- package/src/sap/ui/rta/messagebundle_ja.properties +25 -9
- package/src/sap/ui/rta/messagebundle_kk.properties +25 -9
- package/src/sap/ui/rta/messagebundle_ko.properties +25 -9
- package/src/sap/ui/rta/messagebundle_lt.properties +24 -8
- package/src/sap/ui/rta/messagebundle_lv.properties +22 -6
- package/src/sap/ui/rta/messagebundle_ms.properties +26 -10
- package/src/sap/ui/rta/messagebundle_nl.properties +26 -10
- package/src/sap/ui/rta/messagebundle_no.properties +25 -9
- package/src/sap/ui/rta/messagebundle_pl.properties +24 -8
- package/src/sap/ui/rta/messagebundle_pt.properties +25 -9
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +24 -8
- package/src/sap/ui/rta/messagebundle_ro.properties +24 -8
- package/src/sap/ui/rta/messagebundle_ru.properties +25 -9
- package/src/sap/ui/rta/messagebundle_sh.properties +26 -10
- package/src/sap/ui/rta/messagebundle_sk.properties +24 -8
- package/src/sap/ui/rta/messagebundle_sl.properties +22 -6
- package/src/sap/ui/rta/messagebundle_sv.properties +26 -10
- package/src/sap/ui/rta/messagebundle_th.properties +28 -12
- package/src/sap/ui/rta/messagebundle_tr.properties +25 -9
- package/src/sap/ui/rta/messagebundle_uk.properties +26 -10
- package/src/sap/ui/rta/messagebundle_vi.properties +25 -9
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +25 -9
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +24 -8
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +2 -2
- package/src/sap/ui/rta/plugin/BaseCreate.js +2 -2
- package/src/sap/ui/rta/plugin/Combine.js +1 -1
- package/src/sap/ui/rta/plugin/CompVariant.js +10 -8
- package/src/sap/ui/rta/plugin/ControlVariant.js +21 -15
- package/src/sap/ui/rta/plugin/CreateContainer.js +9 -4
- package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
- package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
- package/src/sap/ui/rta/plugin/EasyAdd.js +3 -1
- package/src/sap/ui/rta/plugin/EasyRemove.js +3 -1
- package/src/sap/ui/rta/plugin/LocalReset.js +2 -2
- package/src/sap/ui/rta/plugin/Plugin.js +1 -1
- package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
- package/src/sap/ui/rta/plugin/Remove.js +1 -1
- package/src/sap/ui/rta/plugin/Rename.js +3 -3
- package/src/sap/ui/rta/plugin/RenameHandler.js +23 -5
- package/src/sap/ui/rta/plugin/Resize.js +3 -3
- package/src/sap/ui/rta/plugin/Selection.js +12 -1
- package/src/sap/ui/rta/plugin/Settings.js +2 -2
- package/src/sap/ui/rta/plugin/Split.js +2 -2
- package/src/sap/ui/rta/plugin/Stretch.js +7 -3
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +14 -11
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +9 -9
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +2 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +3 -3
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
- package/src/sap/ui/rta/service/Action.js +1 -1
- package/src/sap/ui/rta/service/ControllerExtension.js +8 -9
- package/src/sap/ui/rta/service/Outline.js +1 -1
- package/src/sap/ui/rta/service/Property.js +1 -1
- package/src/sap/ui/rta/service/Selection.js +1 -1
- package/src/sap/ui/rta/service/SupportTools.js +189 -0
- package/src/sap/ui/rta/service/index.js +7 -6
- package/src/sap/ui/rta/themes/base/Toolbar.adaptation.less +19 -4
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +11 -1
- package/src/sap/ui/rta/toolbar/Adaptation.js +13 -4
- package/src/sap/ui/rta/toolbar/Base.js +8 -4
- package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
- package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsContextBasedAdaptation.js +132 -0
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsContextBasedAdaptationDialog.fragment.xml +79 -0
- package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -5
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
- package/src/sap/ui/rta/util/BindingsExtractor.js +89 -42
- package/src/sap/ui/rta/util/PluginManager.js +1 -1
- package/src/sap/ui/rta/util/PopupManager.js +1 -1
- package/src/sap/ui/rta/util/ReloadManager.js +331 -0
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/adaptationStarter.js +27 -12
- package/src/sap/ui/rta/util/changeVisualization/ChangeCategories.js +50 -0
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +115 -63
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorCategorySelection.fragment.xml +2 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorPopover.fragment.xml +2 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +143 -79
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +86 -180
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +2 -2
- package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +87 -0
- package/src/sap/ui/rta/util/changeVisualization/{categories → commands}/MoveVisualization.js +6 -4
- package/src/sap/ui/rta/util/changeVisualization/{categories → commands}/RenameVisualization.js +2 -2
- package/src/sap/ui/rta/util/changeVisualization/{categories → commands}/SplitVisualization.js +6 -4
- package/src/sap/ui/rta/util/changeVisualization/commands/getCommandVisualization.js +37 -0
- package/src/sap/ui/rta/util/changeVisualization/categories/getVisualizationCategory.js +0 -27
package/src/sap/ui/rta/Utils.js
CHANGED
|
@@ -45,7 +45,7 @@ function(
|
|
|
45
45
|
*
|
|
46
46
|
* @namespace
|
|
47
47
|
* @author SAP SE
|
|
48
|
-
* @version 1.
|
|
48
|
+
* @version 1.106.0
|
|
49
49
|
*
|
|
50
50
|
* @private
|
|
51
51
|
* @since 1.30
|
|
@@ -221,7 +221,7 @@ function(
|
|
|
221
221
|
Utils.getFocusedOverlay = function() {
|
|
222
222
|
if (document.activeElement) {
|
|
223
223
|
var oElement = sap.ui.getCore().byId(document.activeElement.id);
|
|
224
|
-
if (oElement
|
|
224
|
+
if (oElement && oElement.isA("sap.ui.dt.ElementOverlay")) {
|
|
225
225
|
return oElement;
|
|
226
226
|
}
|
|
227
227
|
}
|
|
@@ -13,7 +13,8 @@ sap.ui.define([
|
|
|
13
13
|
"sap/base/Log",
|
|
14
14
|
"sap/ui/fl/write/api/PersistenceWriteAPI",
|
|
15
15
|
"sap/ui/fl/write/api/AppVariantWriteAPI",
|
|
16
|
-
"sap/ui/fl/write/api/ChangesWriteAPI"
|
|
16
|
+
"sap/ui/fl/write/api/ChangesWriteAPI",
|
|
17
|
+
"sap/ui/fl/write/_internal/connectors/LrepConnector"
|
|
17
18
|
], function(
|
|
18
19
|
FlexUtils,
|
|
19
20
|
MessageBox,
|
|
@@ -23,7 +24,8 @@ sap.ui.define([
|
|
|
23
24
|
Log,
|
|
24
25
|
PersistenceWriteAPI,
|
|
25
26
|
AppVariantWriteAPI,
|
|
26
|
-
ChangesWriteAPI
|
|
27
|
+
ChangesWriteAPI,
|
|
28
|
+
LrepConnector
|
|
27
29
|
) {
|
|
28
30
|
"use strict";
|
|
29
31
|
var AppVariantUtils = {};
|
|
@@ -34,23 +36,7 @@ sap.ui.define([
|
|
|
34
36
|
AppVariantUtils._newAppVariantId = null;
|
|
35
37
|
|
|
36
38
|
AppVariantUtils.getManifirstSupport = function(sRunningAppId) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return new Promise(function (resolve, reject) {
|
|
40
|
-
var xhr = new XMLHttpRequest();
|
|
41
|
-
xhr.open("GET", sManifirstUrl);
|
|
42
|
-
xhr.send();
|
|
43
|
-
|
|
44
|
-
xhr.onload = function() {
|
|
45
|
-
if (xhr.status >= 200 && xhr.status < 400) {
|
|
46
|
-
resolve(xhr.response);
|
|
47
|
-
} else {
|
|
48
|
-
var oError = new Error(xhr.statusText);
|
|
49
|
-
oError.status = xhr.status;
|
|
50
|
-
reject(oError);
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
});
|
|
39
|
+
return LrepConnector.appVariant.getManifirstSupport({appId: sRunningAppId});
|
|
54
40
|
};
|
|
55
41
|
|
|
56
42
|
AppVariantUtils.getNewAppVariantId = function() {
|
|
@@ -593,9 +579,7 @@ sap.ui.define([
|
|
|
593
579
|
};
|
|
594
580
|
|
|
595
581
|
AppVariantUtils.handleBeforeUnloadEvent = function () {
|
|
596
|
-
|
|
597
|
-
var sMessage = AppVariantUtils.getText("MSG_DO_NOT_CLOSE_BROWSER");
|
|
598
|
-
return sMessage;
|
|
582
|
+
return AppVariantUtils.getText("MSG_DO_NOT_CLOSE_BROWSER");
|
|
599
583
|
};
|
|
600
584
|
|
|
601
585
|
AppVariantUtils.showMessage = function(sMessageKey) {
|
|
@@ -12,8 +12,7 @@ sap.ui.define([
|
|
|
12
12
|
"sap/ui/fl/registry/Settings",
|
|
13
13
|
"sap/ui/fl/write/_internal/appVariant/AppVariantFactory",
|
|
14
14
|
"sap/ui/fl/write/api/FeaturesAPI",
|
|
15
|
-
"sap/base/util/merge"
|
|
16
|
-
"sap/base/Log"
|
|
15
|
+
"sap/base/util/merge"
|
|
17
16
|
], function(
|
|
18
17
|
FlexUtils,
|
|
19
18
|
AppVariantUtils,
|
|
@@ -22,8 +21,7 @@ sap.ui.define([
|
|
|
22
21
|
Settings,
|
|
23
22
|
AppVariantFactory,
|
|
24
23
|
FeaturesAPI,
|
|
25
|
-
merge
|
|
26
|
-
Log
|
|
24
|
+
merge
|
|
27
25
|
) {
|
|
28
26
|
"use strict";
|
|
29
27
|
|
|
@@ -109,7 +107,7 @@ sap.ui.define([
|
|
|
109
107
|
AppVariantUtils.closeOverviewDialog();
|
|
110
108
|
};
|
|
111
109
|
|
|
112
|
-
var oUriParameters =
|
|
110
|
+
var oUriParameters = UriParameters.fromQuery(window.location.search);
|
|
113
111
|
var sAppContextsEnabled = oUriParameters.get("sap-ui-xx-rta-adaptations");
|
|
114
112
|
|
|
115
113
|
var sOverviewPath = "sap/ui/rta/appVariant/AppVariantOverviewDialog";
|
|
@@ -156,13 +154,7 @@ sap.ui.define([
|
|
|
156
154
|
},
|
|
157
155
|
isManifestSupported: function() {
|
|
158
156
|
var oDescriptor = fnGetDescriptor();
|
|
159
|
-
|
|
160
|
-
return AppVariantUtils.getManifirstSupport(oDescriptor["sap.app"].id).then(function(oResult) {
|
|
161
|
-
return oResult.response;
|
|
162
|
-
}).catch(function(oError) {
|
|
163
|
-
Log.error("Response status code is: " + oError.status, "Stacktrace: " + oError.stack);
|
|
164
|
-
return false;
|
|
165
|
-
});
|
|
157
|
+
return AppVariantUtils.getManifirstSupport(oDescriptor["sap.app"].id);
|
|
166
158
|
},
|
|
167
159
|
/**
|
|
168
160
|
* @param {object} oRootControl - Root control of an app (variant)
|
|
@@ -16,7 +16,8 @@ sap.ui.define([
|
|
|
16
16
|
"sap/ui/rta/RuntimeAuthoring",
|
|
17
17
|
"sap/ui/core/BusyIndicator",
|
|
18
18
|
"sap/base/i18n/ResourceBundle",
|
|
19
|
-
"sap/m/MessageToast"
|
|
19
|
+
"sap/m/MessageToast",
|
|
20
|
+
"sap/m/MenuItem"
|
|
20
21
|
], function(
|
|
21
22
|
Controller,
|
|
22
23
|
Layer,
|
|
@@ -30,7 +31,8 @@ sap.ui.define([
|
|
|
30
31
|
RuntimeAuthoring,
|
|
31
32
|
BusyIndicator,
|
|
32
33
|
ResourceBundle,
|
|
33
|
-
MessageToast
|
|
34
|
+
MessageToast,
|
|
35
|
+
MenuItem
|
|
34
36
|
) {
|
|
35
37
|
"use strict";
|
|
36
38
|
|
|
@@ -212,7 +214,7 @@ sap.ui.define([
|
|
|
212
214
|
var oItem = oEvent.getParameter("item");
|
|
213
215
|
var sItemPath = "";
|
|
214
216
|
|
|
215
|
-
while (oItem instanceof
|
|
217
|
+
while (oItem instanceof MenuItem) {
|
|
216
218
|
sItemPath = oItem.getText() + " > " + sItemPath;
|
|
217
219
|
oItem = oItem.getParent();
|
|
218
220
|
}
|
|
@@ -21,7 +21,7 @@ sap.ui.define([
|
|
|
21
21
|
* @extends sap.ui.rta.command.BaseCommand
|
|
22
22
|
*
|
|
23
23
|
* @author SAP SE
|
|
24
|
-
* @version 1.
|
|
24
|
+
* @version 1.106.0
|
|
25
25
|
*
|
|
26
26
|
* @constructor
|
|
27
27
|
* @private
|
|
@@ -99,8 +99,13 @@ sap.ui.define([
|
|
|
99
99
|
}
|
|
100
100
|
})
|
|
101
101
|
.then(function(oAppDescriptorChangeContent) {
|
|
102
|
-
return new DescriptorChangeFactory().createNew(
|
|
103
|
-
|
|
102
|
+
return new DescriptorChangeFactory().createNew(
|
|
103
|
+
this.getReference(),
|
|
104
|
+
oAppDescriptorChangeContent,
|
|
105
|
+
this.getLayer(),
|
|
106
|
+
this.getAppComponent(),
|
|
107
|
+
"sap.ui.rta.AppDescriptorCommand"
|
|
108
|
+
);
|
|
104
109
|
}.bind(this))
|
|
105
110
|
.then(function(oAppDescriptorChange) {
|
|
106
111
|
var oChange = oAppDescriptorChange.store();
|
|
@@ -21,7 +21,7 @@ sap.ui.define([
|
|
|
21
21
|
* @extends sap.ui.rta.command.BaseCommand
|
|
22
22
|
*
|
|
23
23
|
* @author SAP SE
|
|
24
|
-
* @version 1.
|
|
24
|
+
* @version 1.106.0
|
|
25
25
|
*
|
|
26
26
|
* @constructor
|
|
27
27
|
* @private
|
|
@@ -96,10 +96,12 @@ sap.ui.define([
|
|
|
96
96
|
if (!this._sCompositeId) {
|
|
97
97
|
this._sCompositeId = FlUtils.createDefaultFileName("composite");
|
|
98
98
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
var oPreparedChange = oCommand.getPreparedChange && oCommand.getPreparedChange();
|
|
100
|
+
if (oPreparedChange) {
|
|
101
|
+
var oChangeSupportInformation = oPreparedChange.getSupportInformation();
|
|
102
|
+
if (!oChangeSupportInformation.compositeCommand) {
|
|
103
|
+
oChangeSupportInformation.compositeCommand = this._sCompositeId;
|
|
104
|
+
oPreparedChange.setSupportInformation(oChangeSupportInformation);
|
|
103
105
|
}
|
|
104
106
|
} else if (oCommand.setCompositeId) {
|
|
105
107
|
// relevant for app descriptor commands
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/ui/rta/command/BaseCommand",
|
|
8
|
+
"sap/ui/rta/library",
|
|
8
9
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
9
10
|
"sap/ui/fl/Utils"
|
|
10
11
|
], function(
|
|
11
12
|
BaseCommand,
|
|
13
|
+
rtaLibrary,
|
|
12
14
|
JsControlTreeModifier,
|
|
13
15
|
flUtils
|
|
14
16
|
) {
|
|
@@ -20,7 +22,7 @@ sap.ui.define([
|
|
|
20
22
|
* @class
|
|
21
23
|
* @extends sap.ui.rta.command.BaseCommand
|
|
22
24
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
25
|
+
* @version 1.106.0
|
|
24
26
|
* @constructor
|
|
25
27
|
* @private
|
|
26
28
|
* @since 1.52
|
|
@@ -71,7 +73,7 @@ sap.ui.define([
|
|
|
71
73
|
this._aPreparedChanges = [];
|
|
72
74
|
this.getChanges().forEach(function(mChangeProperties) {
|
|
73
75
|
mChangeProperties.appComponent = this.oAppComponent;
|
|
74
|
-
mChangeProperties.generator =
|
|
76
|
+
mChangeProperties.generator = rtaLibrary.GENERATOR_NAME;
|
|
75
77
|
this._aPreparedChanges.push(this.oModel.addVariantChange(this.sVariantManagementReference, mChangeProperties));
|
|
76
78
|
}.bind(this));
|
|
77
79
|
|
|
@@ -5,12 +5,14 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/ui/rta/command/BaseCommand",
|
|
8
|
+
"sap/ui/rta/library",
|
|
8
9
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
9
10
|
"sap/ui/rta/Utils",
|
|
10
11
|
"sap/ui/fl/Utils",
|
|
11
12
|
"sap/ui/fl/write/api/ContextSharingAPI"
|
|
12
13
|
], function(
|
|
13
14
|
BaseCommand,
|
|
15
|
+
rtaLibrary,
|
|
14
16
|
JsControlTreeModifier,
|
|
15
17
|
rtaUtils,
|
|
16
18
|
flUtils,
|
|
@@ -24,7 +26,7 @@ sap.ui.define([
|
|
|
24
26
|
* @class
|
|
25
27
|
* @extends sap.ui.rta.command.BaseCommand
|
|
26
28
|
* @author SAP SE
|
|
27
|
-
* @version 1.
|
|
29
|
+
* @version 1.106.0
|
|
28
30
|
* @constructor
|
|
29
31
|
* @private
|
|
30
32
|
* @since 1.86
|
|
@@ -105,12 +107,12 @@ sap.ui.define([
|
|
|
105
107
|
var mParams = this.getNewVariantParameters();
|
|
106
108
|
mParams.layer = this.sLayer;
|
|
107
109
|
mParams.newVariantReference = this.sNewVariantReference;
|
|
108
|
-
mParams.generator =
|
|
110
|
+
mParams.generator = rtaLibrary.GENERATOR_NAME;
|
|
109
111
|
return this.oModel._handleSave(this.oVariantManagementControl, mParams)
|
|
110
112
|
.then(function(aDirtyChanges) {
|
|
111
113
|
this._aPreparedChanges = aDirtyChanges;
|
|
112
114
|
this._oVariantChange = aDirtyChanges[0];
|
|
113
|
-
this.sNewVariantReference = this._oVariantChange.
|
|
115
|
+
this.sNewVariantReference = this._oVariantChange.getId();
|
|
114
116
|
this._aPreparedChanges.forEach(function(oChange) {
|
|
115
117
|
if (oChange.getFileType() === "change") {
|
|
116
118
|
oChange.assignedToVariant = true;
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/ui/rta/command/BaseCommand",
|
|
8
|
+
"sap/ui/rta/library",
|
|
8
9
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
9
10
|
"sap/ui/fl/Utils"
|
|
10
|
-
], function(BaseCommand, JsControlTreeModifier, flUtils) {
|
|
11
|
+
], function(BaseCommand, rtaLibrary, JsControlTreeModifier, flUtils) {
|
|
11
12
|
"use strict";
|
|
12
13
|
|
|
13
14
|
/**
|
|
@@ -16,7 +17,7 @@ sap.ui.define([
|
|
|
16
17
|
* @class
|
|
17
18
|
* @extends sap.ui.rta.command.BaseCommand
|
|
18
19
|
* @author SAP SE
|
|
19
|
-
* @version 1.
|
|
20
|
+
* @version 1.106.0
|
|
20
21
|
* @constructor
|
|
21
22
|
* @private
|
|
22
23
|
* @since 1.50
|
|
@@ -68,7 +69,7 @@ sap.ui.define([
|
|
|
68
69
|
this.sVariantManagementReference = JsControlTreeModifier.getSelector(oVariantManagementControl, this.oAppComponent).id;
|
|
69
70
|
this.sCurrentVariant = this.oModel.getCurrentVariantReference(this.sVariantManagementReference);
|
|
70
71
|
|
|
71
|
-
var sCurrentTitle = this.oModel.
|
|
72
|
+
var sCurrentTitle = this.oModel.getVariantTitle(this.sCurrentVariant, this.sVariantManagementReference);
|
|
72
73
|
this.setOldText(sCurrentTitle);
|
|
73
74
|
|
|
74
75
|
var mPropertyBag = {
|
|
@@ -77,7 +78,7 @@ sap.ui.define([
|
|
|
77
78
|
changeType: "setTitle",
|
|
78
79
|
title: this.getNewText(),
|
|
79
80
|
layer: this.sLayer,
|
|
80
|
-
generator:
|
|
81
|
+
generator: rtaLibrary.GENERATOR_NAME
|
|
81
82
|
};
|
|
82
83
|
|
|
83
84
|
return Promise.resolve(this.oModel.addVariantChange(this.sVariantManagementReference, mPropertyBag))
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/ui/rta/command/BaseCommand",
|
|
8
|
+
"sap/ui/rta/library",
|
|
8
9
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
9
10
|
"sap/ui/fl/Utils",
|
|
10
11
|
"sap/base/Log",
|
|
@@ -13,6 +14,7 @@ sap.ui.define([
|
|
|
13
14
|
"sap/base/util/values"
|
|
14
15
|
], function(
|
|
15
16
|
BaseCommand,
|
|
17
|
+
rtaLibrary,
|
|
16
18
|
JsControlTreeModifier,
|
|
17
19
|
FlUtils,
|
|
18
20
|
Log,
|
|
@@ -29,7 +31,7 @@ sap.ui.define([
|
|
|
29
31
|
* @extends sap.ui.rta.command.BaseCommand
|
|
30
32
|
*
|
|
31
33
|
* @author SAP SE
|
|
32
|
-
* @version 1.
|
|
34
|
+
* @version 1.106.0
|
|
33
35
|
*
|
|
34
36
|
* @constructor
|
|
35
37
|
* @private
|
|
@@ -206,7 +208,7 @@ sap.ui.define([
|
|
|
206
208
|
mChangeSpecificData = Object.assign({}, mChangeSpecificData, mVariantObj);
|
|
207
209
|
}
|
|
208
210
|
mChangeSpecificData.command = sCommand;
|
|
209
|
-
mChangeSpecificData.generator =
|
|
211
|
+
mChangeSpecificData.generator = rtaLibrary.GENERATOR_NAME;
|
|
210
212
|
return ChangesWriteAPI.create({changeSpecificData: mChangeSpecificData, selector: this._validateControlForChange(mFlexSettings)})
|
|
211
213
|
.then(function(oChange) {
|
|
212
214
|
// 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),
|
|
@@ -215,7 +217,7 @@ sap.ui.define([
|
|
|
215
217
|
// ATTENTION! the change gets applied as soon as the parent is available, so there might be possible side effects with lazy loading
|
|
216
218
|
if (mFlexSettings && mFlexSettings.originalSelector) {
|
|
217
219
|
oChange.addDependentControl(mFlexSettings.originalSelector, "originalSelector", {modifier: JsControlTreeModifier, appComponent: this.getAppComponent()});
|
|
218
|
-
oChange.
|
|
220
|
+
oChange.setSelector(Object.assign(oChange.getSelector(), JsControlTreeModifier.getSelector(this.getSelector().id, this.getAppComponent())));
|
|
219
221
|
oChange.setContent(Object.assign({}, oChange.getContent(), mFlexSettings.content));
|
|
220
222
|
}
|
|
221
223
|
return oChange;
|
|
@@ -29,7 +29,7 @@ sap.ui.define([
|
|
|
29
29
|
* @class
|
|
30
30
|
* @extends sap.ui.base.ManagedObject
|
|
31
31
|
* @author SAP SE
|
|
32
|
-
* @version 1.
|
|
32
|
+
* @version 1.106.0
|
|
33
33
|
* @constructor
|
|
34
34
|
* @private
|
|
35
35
|
* @since 1.42
|
|
@@ -153,13 +153,15 @@ sap.ui.define([
|
|
|
153
153
|
* Serializes and saves all changes to LREP
|
|
154
154
|
* In case of Base Applications (no App Variants) the App Descriptor Changes and UI Changes are saved in different Flex Persistence instances,
|
|
155
155
|
* so we have to call save twice. For App Variants all the changes are saved in one place.
|
|
156
|
-
* @param {
|
|
157
|
-
* @param {
|
|
158
|
-
* @param {
|
|
156
|
+
* @param {object} mPropertyBag - Property bag
|
|
157
|
+
* @param {boolean} mPropertyBag.saveAsDraft - save the changes as a draft
|
|
158
|
+
* @param {string} [mPropertyBag.layer] - Layer for which the changes should be saved
|
|
159
|
+
* @param {boolean} [mPropertyBag.removeOtherLayerChanges=false] - Whether to remove changes on other layers before saving
|
|
160
|
+
* @param {string} [mPropertyBag.version] - Layer for which the changes should be saved
|
|
159
161
|
* @returns {Promise} return empty promise
|
|
160
162
|
* @public
|
|
161
163
|
*/
|
|
162
|
-
LREPSerializer.prototype.saveCommands = function(
|
|
164
|
+
LREPSerializer.prototype.saveCommands = function(mPropertyBag) {
|
|
163
165
|
this._lastPromise = this._lastPromise.catch(function(oError) {
|
|
164
166
|
Log.error(oError);
|
|
165
167
|
// _lastPromise chain must not be interrupted
|
|
@@ -171,9 +173,10 @@ sap.ui.define([
|
|
|
171
173
|
return PersistenceWriteAPI.save({
|
|
172
174
|
selector: oRootControl,
|
|
173
175
|
skipUpdateCache: false,
|
|
174
|
-
draft: !!
|
|
175
|
-
layer:
|
|
176
|
-
removeOtherLayerChanges: !!
|
|
176
|
+
draft: !!mPropertyBag.saveAsDraft,
|
|
177
|
+
layer: mPropertyBag.layer,
|
|
178
|
+
removeOtherLayerChanges: !!mPropertyBag.removeOtherLayerChanges,
|
|
179
|
+
version: mPropertyBag.version
|
|
177
180
|
});
|
|
178
181
|
}.bind(this))
|
|
179
182
|
.then(function() {
|