@openui5/sap.ui.rta 1.134.0 → 1.135.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 +2 -2
- 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 +34 -11
- package/src/sap/ui/rta/Utils.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +25 -25
- package/src/sap/ui/rta/appVariant/Feature.js +71 -71
- package/src/sap/ui/rta/appVariant/Utils.js +21 -23
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +30 -30
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_fr_CA.properties +2 -2
- 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/AnnotationCommand.js +65 -5
- 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 +71 -47
- package/src/sap/ui/rta/command/CompositeCommand.js +12 -12
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
- 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/ExtendControllerCommand.js +92 -0
- package/src/sap/ui/rta/command/FlexCommand.js +54 -43
- package/src/sap/ui/rta/command/LREPSerializer.js +23 -23
- package/src/sap/ui/rta/command/LocalReset.js +1 -1
- package/src/sap/ui/rta/command/ManifestCommand.js +112 -0
- 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 +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/command/{appDescriptor → manifest}/AddLibrary.js +10 -10
- package/src/sap/ui/rta/enablement/elementActionTest.js +1 -1
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +16 -3
- package/src/sap/ui/rta/messagebundle_ar.properties +1 -0
- package/src/sap/ui/rta/messagebundle_bg.properties +1 -0
- package/src/sap/ui/rta/messagebundle_ca.properties +1 -0
- package/src/sap/ui/rta/messagebundle_cnr.properties +1 -0
- package/src/sap/ui/rta/messagebundle_cs.properties +1 -0
- package/src/sap/ui/rta/messagebundle_cy.properties +1 -0
- package/src/sap/ui/rta/messagebundle_da.properties +1 -0
- package/src/sap/ui/rta/messagebundle_de.properties +1 -0
- package/src/sap/ui/rta/messagebundle_el.properties +1 -0
- package/src/sap/ui/rta/messagebundle_en.properties +1 -0
- package/src/sap/ui/rta/messagebundle_en_GB.properties +1 -0
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +7 -1
- package/src/sap/ui/rta/messagebundle_es.properties +1 -0
- package/src/sap/ui/rta/messagebundle_es_MX.properties +1 -0
- package/src/sap/ui/rta/messagebundle_et.properties +1 -0
- package/src/sap/ui/rta/messagebundle_fi.properties +2 -1
- package/src/sap/ui/rta/messagebundle_fr.properties +10 -9
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +5 -4
- package/src/sap/ui/rta/messagebundle_hi.properties +1 -0
- package/src/sap/ui/rta/messagebundle_hr.properties +32 -31
- package/src/sap/ui/rta/messagebundle_hu.properties +1 -0
- package/src/sap/ui/rta/messagebundle_id.properties +1 -0
- package/src/sap/ui/rta/messagebundle_it.properties +46 -45
- package/src/sap/ui/rta/messagebundle_iw.properties +1 -0
- package/src/sap/ui/rta/messagebundle_ja.properties +1 -0
- package/src/sap/ui/rta/messagebundle_kk.properties +1 -0
- package/src/sap/ui/rta/messagebundle_ko.properties +1 -0
- package/src/sap/ui/rta/messagebundle_lt.properties +1 -0
- package/src/sap/ui/rta/messagebundle_lv.properties +1 -0
- package/src/sap/ui/rta/messagebundle_mk.properties +1 -0
- package/src/sap/ui/rta/messagebundle_ms.properties +1 -0
- package/src/sap/ui/rta/messagebundle_nl.properties +1 -0
- package/src/sap/ui/rta/messagebundle_no.properties +1 -0
- package/src/sap/ui/rta/messagebundle_pl.properties +1 -0
- package/src/sap/ui/rta/messagebundle_pt.properties +1 -0
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +1 -0
- package/src/sap/ui/rta/messagebundle_ro.properties +1 -0
- package/src/sap/ui/rta/messagebundle_ru.properties +1 -0
- package/src/sap/ui/rta/messagebundle_sh.properties +1 -0
- package/src/sap/ui/rta/messagebundle_sk.properties +1 -0
- package/src/sap/ui/rta/messagebundle_sl.properties +1 -0
- package/src/sap/ui/rta/messagebundle_sr.properties +1 -0
- package/src/sap/ui/rta/messagebundle_sv.properties +1 -0
- package/src/sap/ui/rta/messagebundle_th.properties +1 -0
- package/src/sap/ui/rta/messagebundle_tr.properties +1 -0
- package/src/sap/ui/rta/messagebundle_uk.properties +1 -0
- package/src/sap/ui/rta/messagebundle_vi.properties +1 -0
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +1 -0
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +1 -0
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +33 -33
- package/src/sap/ui/rta/plugin/AddXMLPlugin.js +1 -1
- package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
- package/src/sap/ui/rta/plugin/Combine.js +1 -1
- package/src/sap/ui/rta/plugin/ControlVariant.js +1 -1
- package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
- 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/ExtendControllerPlugin.js +161 -0
- package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
- package/src/sap/ui/rta/plugin/Plugin.js +3 -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 +1 -1
- package/src/sap/ui/rta/plugin/RenameHandler.js +1 -1
- package/src/sap/ui/rta/plugin/Resize.js +1 -1
- package/src/sap/ui/rta/plugin/Selection.js +1 -1
- package/src/sap/ui/rta/plugin/Settings.js +71 -61
- package/src/sap/ui/rta/plugin/Split.js +1 -1
- package/src/sap/ui/rta/plugin/Stretch.js +1 -1
- 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/AdditionalElementsPlugin.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.fragment.xml +9 -5
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +58 -9
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +11 -4
- package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +54 -17
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
- 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 +10 -4
- 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 +1 -1
- package/src/sap/ui/rta/themes/base/Toolbar.adaptation.less +5 -0
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +21 -3
- package/src/sap/ui/rta/toolbar/Adaptation.js +33 -7
- package/src/sap/ui/rta/toolbar/Base.js +1 -1
- package/src/sap/ui/rta/toolbar/Fiori.js +4 -3
- 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/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +1 -1
- package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
- 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 +1 -1
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/ServiceManager.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +2 -2
- package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +1 -1
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +0 -114
|
@@ -20,15 +20,15 @@ sap.ui.define([
|
|
|
20
20
|
) {
|
|
21
21
|
"use strict";
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
const Utils = {};
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
const sModulePath = `${sap.ui.require.toUrl("sap/ui/rta/appVariant/manageApps/")}webapp`;
|
|
26
|
+
const oI18n = ResourceBundle.create({
|
|
27
27
|
url: `${sModulePath}/i18n/i18n.properties`
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
Utils._checkNavigationSupported = function(oNavigationParams) {
|
|
31
|
-
|
|
31
|
+
const oUShellContainer = FlUtils.getUshellContainer();
|
|
32
32
|
return oUShellContainer.getServiceAsync("Navigation")
|
|
33
33
|
.then(function(oNavigationService) {
|
|
34
34
|
return oNavigationService.getLinks([oNavigationParams]);
|
|
@@ -52,7 +52,7 @@ sap.ui.define([
|
|
|
52
52
|
|
|
53
53
|
Utils._calculateCurrentStatus = function(sAppVariantInfoId, sAppVarStatus) {
|
|
54
54
|
// Get the id of a new created app variant
|
|
55
|
-
|
|
55
|
+
const sNewAppVariantId = AppVariantUtils.getNewAppVariantId();
|
|
56
56
|
|
|
57
57
|
if (sAppVarStatus === "R") {
|
|
58
58
|
return oI18n.getText("MAA_OPERATION_IN_PROGRESS");
|
|
@@ -65,7 +65,7 @@ sap.ui.define([
|
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
Utils._checkMenuItemOptions = function(oPreparedObject, bAdaptUIButtonEnabled) {
|
|
68
|
-
|
|
68
|
+
const oAppVarObject = {};
|
|
69
69
|
|
|
70
70
|
if (oPreparedObject.isKeyUser) {
|
|
71
71
|
if (oPreparedObject.isOriginal) {
|
|
@@ -112,21 +112,19 @@ sap.ui.define([
|
|
|
112
112
|
};
|
|
113
113
|
|
|
114
114
|
Utils._getNavigationInfo = function(oPreparedObject) {
|
|
115
|
-
|
|
115
|
+
let oNavigationObject = {};
|
|
116
116
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
const sSemanticObject = oPreparedObject.startWith.semanticObject;
|
|
118
|
+
const sAction = oPreparedObject.startWith.action;
|
|
119
|
+
const oParams = oPreparedObject.startWith.parameters;
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
const oNavigationParams = {
|
|
122
122
|
semanticObject: sSemanticObject,
|
|
123
123
|
action: sAction,
|
|
124
124
|
params: oParams
|
|
125
125
|
};
|
|
126
126
|
|
|
127
127
|
return this._checkNavigationSupported(oNavigationParams).then(function(aResult) {
|
|
128
|
-
var oDeleteButtonProperties;
|
|
129
|
-
|
|
130
128
|
if (aResult[0].length && oPreparedObject.isKeyUser) {
|
|
131
129
|
oNavigationObject.adaptUIButtonEnabled = true;
|
|
132
130
|
|
|
@@ -138,7 +136,7 @@ sap.ui.define([
|
|
|
138
136
|
oNavigationObject.adaptUIButtonEnabled = false;
|
|
139
137
|
}
|
|
140
138
|
|
|
141
|
-
oDeleteButtonProperties = this._checkMenuItemOptions(oPreparedObject, oNavigationObject.adaptUIButtonEnabled);
|
|
139
|
+
const oDeleteButtonProperties = this._checkMenuItemOptions(oPreparedObject, oNavigationObject.adaptUIButtonEnabled);
|
|
142
140
|
|
|
143
141
|
oNavigationObject.semanticObject = sSemanticObject;
|
|
144
142
|
oNavigationObject.action = sAction;
|
|
@@ -174,9 +172,9 @@ sap.ui.define([
|
|
|
174
172
|
};
|
|
175
173
|
|
|
176
174
|
Utils.getAppVariantOverviewAttributes = function(oAppVariantInfo, bKeyUser) {
|
|
177
|
-
|
|
175
|
+
let oAppVariantAttributes;
|
|
178
176
|
// Adding the tooltip to every icon which is shown on the App Variant Overview Dialog
|
|
179
|
-
|
|
177
|
+
const sIconUrl = oAppVariantInfo.iconUrl;
|
|
180
178
|
if (sIconUrl && IconPool.isIconURI(sIconUrl)) {
|
|
181
179
|
// eslint-disable-next-line prefer-destructuring
|
|
182
180
|
oAppVariantInfo.iconText = sIconUrl.split("//")[1];
|
|
@@ -197,7 +195,7 @@ sap.ui.define([
|
|
|
197
195
|
// Populate the app variant attributes with the cloud system information
|
|
198
196
|
oAppVariantAttributes.isS4HanaCloud = bIsS4HanaCloud;
|
|
199
197
|
|
|
200
|
-
|
|
198
|
+
const oPreparedObject = {
|
|
201
199
|
isKeyUser: bKeyUser,
|
|
202
200
|
isOriginal: oAppVariantInfo.isOriginal,
|
|
203
201
|
isS4HanaCloud: bIsS4HanaCloud,
|
|
@@ -213,16 +211,16 @@ sap.ui.define([
|
|
|
213
211
|
}
|
|
214
212
|
|
|
215
213
|
oAppVariantAttributes.adaptUIButtonEnabled = false;
|
|
216
|
-
|
|
214
|
+
const oDeleteButtonProperties = this._checkMenuItemOptions(oPreparedObject, false);
|
|
217
215
|
oAppVariantAttributes = { ...oAppVariantAttributes, ...oDeleteButtonProperties };
|
|
218
216
|
return Promise.resolve(oAppVariantAttributes);
|
|
219
217
|
};
|
|
220
218
|
|
|
221
219
|
Utils.getAppVariantOverview = function(sReferenceAppId, bKeyUser) {
|
|
222
220
|
// Customer* means the layer can be either CUSTOMER or CUSTOMER_BASE. This layer determination takes place in backend.
|
|
223
|
-
|
|
221
|
+
const sLayer = bKeyUser ? "CUSTOMER*" : "VENDOR";
|
|
224
222
|
|
|
225
|
-
|
|
223
|
+
const mPropertyBag = {
|
|
226
224
|
selector: {
|
|
227
225
|
appId: sReferenceAppId
|
|
228
226
|
},
|
|
@@ -230,8 +228,8 @@ sap.ui.define([
|
|
|
230
228
|
};
|
|
231
229
|
|
|
232
230
|
return AppVariantWriteAPI.listAllAppVariants(mPropertyBag).then(function(oResult) {
|
|
233
|
-
|
|
234
|
-
|
|
231
|
+
const aAppVariantOverviewInfo = [];
|
|
232
|
+
let aAppVariantInfo;
|
|
235
233
|
if (oResult.response && oResult.response.items) {
|
|
236
234
|
aAppVariantInfo = oResult.response.items;
|
|
237
235
|
} else {
|
|
@@ -250,7 +248,7 @@ sap.ui.define([
|
|
|
250
248
|
}.bind(this));
|
|
251
249
|
};
|
|
252
250
|
|
|
253
|
-
Utils.
|
|
251
|
+
Utils.getManifest = function(mPropertyBag) {
|
|
254
252
|
return AppVariantWriteAPI.getManifest(mPropertyBag).then(function(oResult) {
|
|
255
253
|
return oResult.response;
|
|
256
254
|
});
|
|
@@ -36,19 +36,19 @@ sap.ui.define([
|
|
|
36
36
|
) {
|
|
37
37
|
"use strict";
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
let _sIdRunningApp;
|
|
40
|
+
let _bKeyUser;
|
|
41
|
+
let _sLayer;
|
|
42
|
+
let _oCrossAppNavService;
|
|
43
|
+
let sModulePath;
|
|
44
|
+
let oI18n;
|
|
45
45
|
|
|
46
46
|
return Controller.extend("sap.ui.rta.appVariant.manageApps.webapp.controller.ManageApps", {
|
|
47
47
|
onInit() {
|
|
48
48
|
_sIdRunningApp = this.getOwnerComponent().getIdRunningApp();
|
|
49
49
|
_bKeyUser = this.getOwnerComponent().getIsOverviewForKeyUser();
|
|
50
50
|
_sLayer = this.getOwnerComponent().getLayer();
|
|
51
|
-
|
|
51
|
+
const oUShellContainer = FlUtils.getUshellContainer();
|
|
52
52
|
|
|
53
53
|
if (!oI18n) {
|
|
54
54
|
this._createResourceBundle();
|
|
@@ -79,7 +79,7 @@ sap.ui.define([
|
|
|
79
79
|
}.bind(this))
|
|
80
80
|
.catch(function(oError) {
|
|
81
81
|
AppVariantUtils.closeOverviewDialog();
|
|
82
|
-
|
|
82
|
+
const oErrorInfo = AppVariantUtils.buildErrorInfo("MSG_MANAGE_APPS_FAILED", oError);
|
|
83
83
|
oErrorInfo.overviewDialog = true;
|
|
84
84
|
BusyIndicator.hide();
|
|
85
85
|
return AppVariantUtils.showRelevantDialog(oErrorInfo, false);
|
|
@@ -100,15 +100,15 @@ sap.ui.define([
|
|
|
100
100
|
},
|
|
101
101
|
|
|
102
102
|
_highlightNewCreatedAppVariant(aAppVariantOverviewAttributes) {
|
|
103
|
-
|
|
103
|
+
const oTable = this.byId("Table1");
|
|
104
104
|
if (!oTable) {
|
|
105
105
|
return Promise.resolve();
|
|
106
106
|
}
|
|
107
107
|
oTable.focus();
|
|
108
108
|
|
|
109
|
-
aAppVariantOverviewAttributes.forEach(function(
|
|
110
|
-
if (
|
|
111
|
-
||
|
|
109
|
+
aAppVariantOverviewAttributes.forEach(function(oAppVariantManifest, index) {
|
|
110
|
+
if (oAppVariantManifest.currentStatus === oI18n.getText("MAA_NEW_APP_VARIANT")
|
|
111
|
+
|| oAppVariantManifest.currentStatus === oI18n.getText("MAA_OPERATION_IN_PROGRESS")
|
|
112
112
|
) {
|
|
113
113
|
if (oTable.getItems().length >= index) {
|
|
114
114
|
oTable.getItems()[index].focus();
|
|
@@ -120,11 +120,11 @@ sap.ui.define([
|
|
|
120
120
|
},
|
|
121
121
|
|
|
122
122
|
_arrangeOverviewDataAndBindToModel(aAppVariantOverviewAttributes) {
|
|
123
|
-
|
|
123
|
+
const aAdaptingAppAttributes = aAppVariantOverviewAttributes.filter(function(oAppVariantProperty) {
|
|
124
124
|
return oAppVariantProperty.appId === _sIdRunningApp;
|
|
125
125
|
});
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
const oAdaptingAppAttributes = aAdaptingAppAttributes[0];
|
|
128
128
|
if (oAdaptingAppAttributes && oAdaptingAppAttributes.appVarStatus !== "R") {
|
|
129
129
|
oAdaptingAppAttributes.currentStatus = oI18n.getText("MAA_CURRENTLY_ADAPTING");
|
|
130
130
|
}
|
|
@@ -135,11 +135,11 @@ sap.ui.define([
|
|
|
135
135
|
|
|
136
136
|
aAppVariantOverviewAttributes.unshift(oAdaptingAppAttributes);
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+
const aReferenceAppAttributes = aAppVariantOverviewAttributes.filter(function(oAppVariantProperty) {
|
|
139
139
|
return oAppVariantProperty.isOriginal;
|
|
140
140
|
});
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
const oReferenceAppAttributes = aReferenceAppAttributes[0];
|
|
143
143
|
|
|
144
144
|
aAppVariantOverviewAttributes = aAppVariantOverviewAttributes.filter(function(oAppVariantProperty) {
|
|
145
145
|
return !oAppVariantProperty.isOriginal;
|
|
@@ -149,11 +149,11 @@ sap.ui.define([
|
|
|
149
149
|
|
|
150
150
|
// Bind the app variant overview to JSON model
|
|
151
151
|
|
|
152
|
-
|
|
152
|
+
const oModelData = {
|
|
153
153
|
appVariants: aAppVariantOverviewAttributes
|
|
154
154
|
};
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
const oModel = Model.createModel(oModelData);
|
|
157
157
|
this.getView().setModel(oModel);
|
|
158
158
|
|
|
159
159
|
return Promise.resolve(aAppVariantOverviewAttributes);
|
|
@@ -216,8 +216,8 @@ sap.ui.define([
|
|
|
216
216
|
},
|
|
217
217
|
|
|
218
218
|
onMenuAction(oEvent) {
|
|
219
|
-
|
|
220
|
-
|
|
219
|
+
let oItem = oEvent.getParameter("item");
|
|
220
|
+
let sItemPath = "";
|
|
221
221
|
|
|
222
222
|
while (oItem instanceof MenuItem) {
|
|
223
223
|
sItemPath = `${oItem.getText()} > ${sItemPath}`;
|
|
@@ -242,11 +242,11 @@ sap.ui.define([
|
|
|
242
242
|
},
|
|
243
243
|
|
|
244
244
|
handleUiAdaptation(oEvent) {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
245
|
+
const sSemanticObject = this.getModelProperty("semanticObject", oEvent.getSource().getBindingContext());
|
|
246
|
+
const sAction = this.getModelProperty("action", oEvent.getSource().getBindingContext());
|
|
247
|
+
const oParams = this.getModelProperty("params", oEvent.getSource().getBindingContext());
|
|
248
248
|
|
|
249
|
-
|
|
249
|
+
let oNavigationParams;
|
|
250
250
|
if (sSemanticObject && sAction && oParams) {
|
|
251
251
|
oNavigationParams = {
|
|
252
252
|
target: {
|
|
@@ -271,23 +271,23 @@ sap.ui.define([
|
|
|
271
271
|
},
|
|
272
272
|
|
|
273
273
|
copyId(oEvent) {
|
|
274
|
-
|
|
274
|
+
const sCopiedId = this.getModelProperty("appId", oEvent.getSource().getBindingContext());
|
|
275
275
|
AppVariantUtils.copyId(sCopiedId);
|
|
276
276
|
MessageToast.show(oI18n.getText("MAA_COPY_ID_SUCCESS"));
|
|
277
277
|
},
|
|
278
278
|
|
|
279
279
|
deleteAppVariant(oEvent) {
|
|
280
|
-
|
|
280
|
+
const oInfo = {};
|
|
281
281
|
if (!oI18n) {
|
|
282
282
|
this._createResourceBundle();
|
|
283
283
|
}
|
|
284
|
-
|
|
284
|
+
const sMessage = oI18n.getText("MSG_APP_VARIANT_DELETE_CONFIRMATION");
|
|
285
285
|
oInfo.text = sMessage;
|
|
286
286
|
oInfo.deleteAppVariant = true;
|
|
287
287
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
288
|
+
const sAppVarId = this.getModelProperty("appId", oEvent.getSource().getBindingContext());
|
|
289
|
+
const sCurrentStatus = this.getModelProperty("currentStatus", oEvent.getSource().getBindingContext());
|
|
290
|
+
const bCurrentlyAdapting = sCurrentStatus === oI18n.getText("MAA_CURRENTLY_ADAPTING");
|
|
291
291
|
|
|
292
292
|
return AppVariantUtils.showRelevantDialog(oInfo)
|
|
293
293
|
.then(function() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
MAA_DIALOG_ICON=Ic\u00F4ne
|
|
3
3
|
MAA_DIALOG_DESCRIPTION=Description
|
|
4
|
-
MAA_DIALOG_COPY_ID_ACTION=Copier l'
|
|
4
|
+
MAA_DIALOG_COPY_ID_ACTION=Action Copier l'ID
|
|
5
5
|
MAA_DIALOG_ADAPT_UI_ACTION=Adapter l'action d'IU
|
|
6
|
-
MAA_DIALOG_SAVE_AS_ACTION=Enregistrer
|
|
6
|
+
MAA_DIALOG_SAVE_AS_ACTION=Action Enregistrer sous
|
|
7
7
|
MAA_DIALOG_ACTIONS=Actions
|
|
8
8
|
MAA_DIALOG_DELETE_APPVAR=Supprimer la variante d'application
|
|
9
9
|
MAA_DIALOG_ADAPT_UI=Adapter l'IU
|
|
@@ -5,10 +5,18 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/ui/fl/write/api/ChangesWriteAPI",
|
|
8
|
+
"sap/ui/fl/write/api/FeaturesAPI",
|
|
9
|
+
"sap/ui/fl/write/api/LocalResetAPI",
|
|
10
|
+
"sap/ui/fl/write/api/PersistenceWriteAPI",
|
|
11
|
+
"sap/ui/fl/LayerUtils",
|
|
8
12
|
"sap/ui/rta/command/FlexCommand",
|
|
9
13
|
"sap/ui/rta/library"
|
|
10
14
|
], function(
|
|
11
15
|
ChangesWriteAPI,
|
|
16
|
+
FeaturesAPI,
|
|
17
|
+
LocalResetAPI,
|
|
18
|
+
PersistenceWriteAPI,
|
|
19
|
+
LayerUtils,
|
|
12
20
|
FlexCommand,
|
|
13
21
|
rtaLibrary
|
|
14
22
|
) {
|
|
@@ -21,7 +29,7 @@ sap.ui.define([
|
|
|
21
29
|
* @extends sap.ui.rta.command.FlexCommand
|
|
22
30
|
*
|
|
23
31
|
* @author SAP SE
|
|
24
|
-
* @version 1.
|
|
32
|
+
* @version 1.135.0
|
|
25
33
|
*
|
|
26
34
|
* @constructor
|
|
27
35
|
* @private
|
|
@@ -40,6 +48,10 @@ sap.ui.define([
|
|
|
40
48
|
},
|
|
41
49
|
content: {
|
|
42
50
|
type: "any"
|
|
51
|
+
},
|
|
52
|
+
changesToDelete: {
|
|
53
|
+
type: "object[]",
|
|
54
|
+
defaultValue: []
|
|
43
55
|
}
|
|
44
56
|
},
|
|
45
57
|
events: {}
|
|
@@ -47,6 +59,7 @@ sap.ui.define([
|
|
|
47
59
|
});
|
|
48
60
|
|
|
49
61
|
AnnotationCommand.prototype._createChange = function(mFlexSettings, sVariantManagementReference, sCommand) {
|
|
62
|
+
this._aToBeResetChanges = [];
|
|
50
63
|
const mChangeSpecificData = {
|
|
51
64
|
...this._getChangeSpecificData(),
|
|
52
65
|
...mFlexSettings,
|
|
@@ -55,6 +68,36 @@ sap.ui.define([
|
|
|
55
68
|
jsOnly: this.getJsOnly(),
|
|
56
69
|
generator: mFlexSettings.generator || rtaLibrary.GENERATOR_NAME
|
|
57
70
|
};
|
|
71
|
+
|
|
72
|
+
if (this.getChangesToDelete().length) {
|
|
73
|
+
// If available, all changes of the current layer must be deleted via the LocalResetAPI
|
|
74
|
+
// Changes in a lower layer can't be deleted via the LocalResetAPI and must be deleted via the deactivate change
|
|
75
|
+
const aToBeDeactivatedChanges = [];
|
|
76
|
+
if (FeaturesAPI.isLocalResetEnabled()) {
|
|
77
|
+
this.getChangesToDelete().forEach((oFlexObject) => {
|
|
78
|
+
if (LayerUtils.compareAgainstCurrentLayer(oFlexObject.getLayer(), mFlexSettings.layer) === -1) {
|
|
79
|
+
aToBeDeactivatedChanges.push(oFlexObject);
|
|
80
|
+
} else {
|
|
81
|
+
this._aToBeResetChanges.push(oFlexObject);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
} else {
|
|
85
|
+
aToBeDeactivatedChanges.push(...this.getChangesToDelete());
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (aToBeDeactivatedChanges.length) {
|
|
89
|
+
this._oDeactivateChange = ChangesWriteAPI.create({
|
|
90
|
+
changeSpecificData: {
|
|
91
|
+
changeType: "deactivateChanges",
|
|
92
|
+
content: { changeIds: aToBeDeactivatedChanges.map((oFlexObject) => oFlexObject.getId()) },
|
|
93
|
+
generator: mFlexSettings.generator || rtaLibrary.GENERATOR_NAME,
|
|
94
|
+
layer: mFlexSettings.layer
|
|
95
|
+
},
|
|
96
|
+
selector: this.getAppComponent()
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
58
101
|
return ChangesWriteAPI.create({
|
|
59
102
|
changeSpecificData: mChangeSpecificData,
|
|
60
103
|
annotationChange: true,
|
|
@@ -62,12 +105,29 @@ sap.ui.define([
|
|
|
62
105
|
});
|
|
63
106
|
};
|
|
64
107
|
|
|
65
|
-
AnnotationCommand.prototype.execute = function() {
|
|
66
|
-
|
|
108
|
+
AnnotationCommand.prototype.execute = async function() {
|
|
109
|
+
// Annotation changes can only be applied during app start, so execute and undo only have to take care of reset / deactivate changes
|
|
110
|
+
if (this._aToBeResetChanges.length) {
|
|
111
|
+
await LocalResetAPI.resetChanges(this._aToBeResetChanges, this.getAppComponent(), true);
|
|
112
|
+
}
|
|
113
|
+
if (this._oDeactivateChange) {
|
|
114
|
+
PersistenceWriteAPI.add({
|
|
115
|
+
selector: this.getAppComponent(),
|
|
116
|
+
flexObjects: [this._oDeactivateChange]
|
|
117
|
+
});
|
|
118
|
+
}
|
|
67
119
|
};
|
|
68
120
|
|
|
69
|
-
AnnotationCommand.prototype.undo = function() {
|
|
70
|
-
|
|
121
|
+
AnnotationCommand.prototype.undo = async function() {
|
|
122
|
+
if (this._aToBeResetChanges.length) {
|
|
123
|
+
await LocalResetAPI.restoreChanges(this._aToBeResetChanges, this.getAppComponent(), true);
|
|
124
|
+
}
|
|
125
|
+
if (this._oDeactivateChange) {
|
|
126
|
+
PersistenceWriteAPI.remove({
|
|
127
|
+
selector: this.getAppComponent(),
|
|
128
|
+
flexObjects: [this._oDeactivateChange]
|
|
129
|
+
});
|
|
130
|
+
}
|
|
71
131
|
};
|
|
72
132
|
|
|
73
133
|
/**
|