@openui5/sap.ui.rta 1.117.1 → 1.118.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 +25 -1
- package/package.json +6 -6
- package/src/sap/ui/rta/.library +1 -1
- package/src/sap/ui/rta/Client.js +32 -21
- package/src/sap/ui/rta/RuntimeAuthoring.js +78 -45
- package/src/sap/ui/rta/Utils.js +10 -16
- package/src/sap/ui/rta/api/startAdaptation.js +0 -1
- package/src/sap/ui/rta/api/startKeyUserAdaptation.js +0 -1
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +24 -26
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -3
- package/src/sap/ui/rta/appVariant/AppVariantOverviewDialog.js +5 -4
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +21 -21
- package/src/sap/ui/rta/appVariant/Feature.js +20 -30
- package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +21 -17
- package/src/sap/ui/rta/appVariant/Utils.js +4 -3
- package/src/sap/ui/rta/appVariant/manageApps/webapp/Component.js +8 -7
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +17 -17
- package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
- package/src/sap/ui/rta/command/AddIFrame.js +5 -7
- package/src/sap/ui/rta/command/AddProperty.js +1 -3
- package/src/sap/ui/rta/command/AddXML.js +7 -7
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +5 -5
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -3
- package/src/sap/ui/rta/command/BaseCommand.js +1 -3
- package/src/sap/ui/rta/command/BindProperty.js +4 -5
- package/src/sap/ui/rta/command/Combine.js +1 -3
- package/src/sap/ui/rta/command/CommandFactory.js +7 -11
- package/src/sap/ui/rta/command/CompositeCommand.js +2 -6
- 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 +4 -4
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +4 -3
- package/src/sap/ui/rta/command/CreateContainer.js +1 -3
- package/src/sap/ui/rta/command/CustomAdd.js +1 -2
- package/src/sap/ui/rta/command/FlexCommand.js +2 -7
- package/src/sap/ui/rta/command/LREPSerializer.js +1 -3
- package/src/sap/ui/rta/command/LocalReset.js +1 -1
- package/src/sap/ui/rta/command/Move.js +1 -3
- package/src/sap/ui/rta/command/Property.js +1 -3
- package/src/sap/ui/rta/command/Remove.js +1 -3
- package/src/sap/ui/rta/command/Rename.js +1 -3
- package/src/sap/ui/rta/command/Resize.js +1 -1
- package/src/sap/ui/rta/command/Reveal.js +1 -3
- package/src/sap/ui/rta/command/Settings.js +5 -7
- package/src/sap/ui/rta/command/Split.js +1 -3
- package/src/sap/ui/rta/command/Stack.js +2 -4
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -3
- 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 +4 -3
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
- package/src/sap/ui/rta/enablement/TestDelegate.js +7 -8
- package/src/sap/ui/rta/enablement/elementActionTest.js +25 -29
- package/src/sap/ui/rta/library.js +2 -3
- package/src/sap/ui/rta/messagebundle.properties +7 -7
- package/src/sap/ui/rta/messagebundle_ar.properties +8 -8
- package/src/sap/ui/rta/messagebundle_bg.properties +7 -7
- package/src/sap/ui/rta/messagebundle_ca.properties +7 -7
- package/src/sap/ui/rta/messagebundle_cs.properties +8 -8
- package/src/sap/ui/rta/messagebundle_cy.properties +8 -8
- package/src/sap/ui/rta/messagebundle_da.properties +7 -7
- package/src/sap/ui/rta/messagebundle_de.properties +8 -8
- package/src/sap/ui/rta/messagebundle_el.properties +7 -7
- package/src/sap/ui/rta/messagebundle_en.properties +8 -8
- package/src/sap/ui/rta/messagebundle_en_GB.properties +8 -8
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +8 -8
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +7 -7
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +8 -8
- package/src/sap/ui/rta/messagebundle_es.properties +8 -8
- package/src/sap/ui/rta/messagebundle_es_MX.properties +8 -8
- package/src/sap/ui/rta/messagebundle_et.properties +6 -6
- package/src/sap/ui/rta/messagebundle_fi.properties +8 -8
- package/src/sap/ui/rta/messagebundle_fr.properties +8 -8
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +9 -9
- package/src/sap/ui/rta/messagebundle_hi.properties +7 -7
- package/src/sap/ui/rta/messagebundle_hr.properties +8 -8
- package/src/sap/ui/rta/messagebundle_hu.properties +8 -8
- package/src/sap/ui/rta/messagebundle_id.properties +8 -8
- package/src/sap/ui/rta/messagebundle_it.properties +8 -8
- package/src/sap/ui/rta/messagebundle_iw.properties +8 -8
- package/src/sap/ui/rta/messagebundle_ja.properties +8 -8
- package/src/sap/ui/rta/messagebundle_kk.properties +8 -8
- package/src/sap/ui/rta/messagebundle_ko.properties +7 -7
- package/src/sap/ui/rta/messagebundle_lt.properties +8 -8
- package/src/sap/ui/rta/messagebundle_lv.properties +8 -8
- package/src/sap/ui/rta/messagebundle_ms.properties +8 -8
- package/src/sap/ui/rta/messagebundle_nl.properties +8 -8
- package/src/sap/ui/rta/messagebundle_no.properties +8 -8
- package/src/sap/ui/rta/messagebundle_pl.properties +9 -9
- package/src/sap/ui/rta/messagebundle_pt.properties +8 -8
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +8 -8
- package/src/sap/ui/rta/messagebundle_ro.properties +8 -8
- package/src/sap/ui/rta/messagebundle_ru.properties +8 -8
- package/src/sap/ui/rta/messagebundle_sh.properties +8 -8
- package/src/sap/ui/rta/messagebundle_sk.properties +8 -8
- package/src/sap/ui/rta/messagebundle_sl.properties +8 -8
- package/src/sap/ui/rta/messagebundle_sv.properties +8 -8
- package/src/sap/ui/rta/messagebundle_th.properties +8 -8
- package/src/sap/ui/rta/messagebundle_tr.properties +8 -8
- package/src/sap/ui/rta/messagebundle_uk.properties +8 -8
- package/src/sap/ui/rta/messagebundle_vi.properties +8 -8
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +9 -9
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +8 -8
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -2
- package/src/sap/ui/rta/plugin/BaseCreate.js +2 -3
- package/src/sap/ui/rta/plugin/Combine.js +1 -2
- package/src/sap/ui/rta/plugin/ControlVariant.js +12 -8
- package/src/sap/ui/rta/plugin/CreateContainer.js +1 -2
- package/src/sap/ui/rta/plugin/CutPaste.js +13 -13
- package/src/sap/ui/rta/plugin/DragDrop.js +17 -16
- package/src/sap/ui/rta/plugin/EasyAdd.js +12 -10
- package/src/sap/ui/rta/plugin/EasyRemove.js +11 -9
- package/src/sap/ui/rta/plugin/LocalReset.js +4 -2
- package/src/sap/ui/rta/plugin/Plugin.js +6 -10
- package/src/sap/ui/rta/plugin/RTAElementMover.js +3 -6
- package/src/sap/ui/rta/plugin/Remove.js +8 -9
- package/src/sap/ui/rta/plugin/Rename.js +9 -9
- package/src/sap/ui/rta/plugin/RenameHandler.js +21 -22
- package/src/sap/ui/rta/plugin/Resize.js +11 -10
- package/src/sap/ui/rta/plugin/Selection.js +33 -14
- package/src/sap/ui/rta/plugin/Settings.js +11 -11
- package/src/sap/ui/rta/plugin/Split.js +1 -2
- package/src/sap/ui/rta/plugin/Stretch.js +18 -20
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +4 -9
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +5 -9
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +4 -4
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +41 -43
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +2 -3
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +5 -6
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +7 -6
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +5 -5
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +28 -27
- package/src/sap/ui/rta/service/Action.js +3 -4
- package/src/sap/ui/rta/service/ControllerExtension.js +8 -9
- package/src/sap/ui/rta/service/Outline.js +13 -11
- package/src/sap/ui/rta/service/Property.js +3 -4
- package/src/sap/ui/rta/service/Receiver.js +1 -1
- package/src/sap/ui/rta/service/Selection.js +2 -3
- package/src/sap/ui/rta/service/SupportTools.js +2 -3
- package/src/sap/ui/rta/themes/base/Toolbar.base.less +4 -0
- package/src/sap/ui/rta/toolbar/Adaptation.js +25 -18
- package/src/sap/ui/rta/toolbar/Base.js +25 -11
- package/src/sap/ui/rta/toolbar/BaseRenderer.js +2 -2
- package/src/sap/ui/rta/toolbar/FeedbackDialog.fragment.xml +4 -4
- package/src/sap/ui/rta/toolbar/Fiori.js +20 -20
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -2
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +5 -6
- package/src/sap/ui/rta/toolbar/Personalization.js +4 -4
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -2
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +43 -20
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +16 -7
- package/src/sap/ui/rta/toolbar/translation/Translation.js +13 -14
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +31 -28
- package/src/sap/ui/rta/util/Animation.js +1 -3
- package/src/sap/ui/rta/util/PluginManager.js +1 -3
- package/src/sap/ui/rta/util/PopupManager.js +23 -19
- package/src/sap/ui/rta/util/ReloadManager.js +4 -4
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +18 -16
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +6 -9
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +9 -10
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +2 -2
- package/src/sap/ui/rta/util/hasStableId.js +1 -1
- package/src/sap/ui/rta/util/showMessageBox.js +2 -1
- package/src/sap/ui/rta/util/validateText.js +1 -1
- package/src/sap/ui/rta/util/StylesLoader.js +0 -31
- package/src/sap/ui/rta/util/UrlParser.js +0 -51
|
@@ -56,9 +56,9 @@ function(
|
|
|
56
56
|
"use strict";
|
|
57
57
|
|
|
58
58
|
// shortcut for sap.ui.layout.form.SimpleFormLayout
|
|
59
|
-
var SimpleFormLayout = layoutLibrary.form
|
|
59
|
+
var {SimpleFormLayout} = layoutLibrary.form;
|
|
60
60
|
|
|
61
|
-
var ValueState = coreLibrary
|
|
61
|
+
var {ValueState} = coreLibrary;
|
|
62
62
|
|
|
63
63
|
var oResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
|
|
64
64
|
var oDataSet;
|
|
@@ -114,21 +114,19 @@ function(
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
function _handleSelectDialog() {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
});
|
|
131
|
-
}
|
|
117
|
+
oSelectDialog ||= new SelectDialog("selectDialog", {
|
|
118
|
+
noDataText: oResources.getText("APP_VARIANT_ICON_NO_DATA"),
|
|
119
|
+
title: oResources.getText("APP_VARIANT_ICON_SELECT_ICON"),
|
|
120
|
+
search(oEvent) {
|
|
121
|
+
_handleSearch(oEvent);
|
|
122
|
+
},
|
|
123
|
+
confirm(oEvent) {
|
|
124
|
+
_handleClose(oEvent);
|
|
125
|
+
},
|
|
126
|
+
cancel(oEvent) {
|
|
127
|
+
_handleClose(oEvent);
|
|
128
|
+
}
|
|
129
|
+
});
|
|
132
130
|
|
|
133
131
|
oSelectDialog.addStyleClass(RtaUtils.getRtaStyleClassName());
|
|
134
132
|
|
|
@@ -174,7 +172,7 @@ function(
|
|
|
174
172
|
value: "{/title}",
|
|
175
173
|
valueLiveUpdate: true,
|
|
176
174
|
placeholder: oResources.getText("SAVE_AS_DIALOG_PLACEHOLDER_TITLE_TEXT"),
|
|
177
|
-
liveChange
|
|
175
|
+
liveChange() {
|
|
178
176
|
var oSaveButton = sap.ui.getCore().byId("saveButton");
|
|
179
177
|
if (this.getValue() === "") {
|
|
180
178
|
this.setValueState(ValueState.Error); // if the field is empty after change, it will go red
|
|
@@ -212,10 +210,10 @@ function(
|
|
|
212
210
|
|
|
213
211
|
oIconInput = new Input("selectInput", {
|
|
214
212
|
showValueHelp: true,
|
|
215
|
-
liveChange
|
|
213
|
+
liveChange(oEvent) {
|
|
216
214
|
_handleSelectDialog(oEvent);
|
|
217
215
|
},
|
|
218
|
-
valueHelpRequest
|
|
216
|
+
valueHelpRequest(oEvent) {
|
|
219
217
|
_handleSelectDialog(oEvent);
|
|
220
218
|
},
|
|
221
219
|
value: "{/iconname}",
|
|
@@ -284,7 +282,7 @@ function(
|
|
|
284
282
|
cancel: {}
|
|
285
283
|
}
|
|
286
284
|
},
|
|
287
|
-
init
|
|
285
|
+
init() {
|
|
288
286
|
Dialog.prototype.init.apply(this);
|
|
289
287
|
|
|
290
288
|
// initialize dialog and create member variables.
|
|
@@ -314,12 +312,12 @@ function(
|
|
|
314
312
|
this._createButtons();
|
|
315
313
|
this.addStyleClass(RtaUtils.getRtaStyleClassName());
|
|
316
314
|
},
|
|
317
|
-
onAfterRendering
|
|
315
|
+
onAfterRendering() {
|
|
318
316
|
document.getElementById("title1").style.height = "0px";
|
|
319
317
|
document.getElementById("title2").style.height = "0px";
|
|
320
318
|
document.getElementById("tile").style.float = "left";
|
|
321
319
|
},
|
|
322
|
-
_onCreate
|
|
320
|
+
_onCreate() {
|
|
323
321
|
var sTitle = oTitleInput.getValue() || " ";
|
|
324
322
|
var sSubTitle = oSubTitleInput.getValue() || " ";
|
|
325
323
|
var sDescription = oDescriptionText.getValue() || " ";
|
|
@@ -336,7 +334,7 @@ function(
|
|
|
336
334
|
this.close();
|
|
337
335
|
this.destroy();
|
|
338
336
|
},
|
|
339
|
-
_createButtons
|
|
337
|
+
_createButtons() {
|
|
340
338
|
this.addButton(new Button("saveButton", {
|
|
341
339
|
text: oResources.getText("APP_VARIANT_DIALOG_SAVE"),
|
|
342
340
|
tooltip: oResources.getText("TOOLTIP_APP_VARIANT_DIALOG_SAVE"),
|
|
@@ -356,11 +354,11 @@ function(
|
|
|
356
354
|
}.bind(this)
|
|
357
355
|
}));
|
|
358
356
|
},
|
|
359
|
-
destroy
|
|
357
|
+
destroy(...aArgs) {
|
|
360
358
|
if (oCustomTileModel) {
|
|
361
359
|
oCustomTileModel.destroy();
|
|
362
360
|
}
|
|
363
|
-
Dialog.prototype.destroy.apply(this,
|
|
361
|
+
Dialog.prototype.destroy.apply(this, aArgs);
|
|
364
362
|
},
|
|
365
363
|
renderer: DialogRenderer
|
|
366
364
|
});
|
|
@@ -24,13 +24,11 @@ sap.ui.define([
|
|
|
24
24
|
* @class
|
|
25
25
|
* @extends sap.ui.base.ManagedObject
|
|
26
26
|
* @author SAP SE
|
|
27
|
-
* @version 1.
|
|
27
|
+
* @version 1.118.0
|
|
28
28
|
* @constructor
|
|
29
29
|
* @private
|
|
30
30
|
* @since 1.53
|
|
31
31
|
* @alias sap.ui.rta.appVariant.AppVariantManager
|
|
32
|
-
* @experimental Since 1.53. This class is experimental and provides only limited functionality. Also the API might be
|
|
33
|
-
* changed in future.
|
|
34
32
|
*/
|
|
35
33
|
var AppVariantManager = ManagedObject.extend("sap.ui.rta.appVariant.AppVariantManager", {
|
|
36
34
|
metadata: {
|
|
@@ -36,8 +36,9 @@ sap.ui.define([
|
|
|
36
36
|
cancel: {}
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
// eslint-disable-next-line object-shorthand
|
|
40
|
+
constructor: function(...aArgs) {
|
|
41
|
+
Dialog.prototype.constructor.apply(this, aArgs);
|
|
41
42
|
this._oTextResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
|
|
42
43
|
|
|
43
44
|
// Create manage apps component
|
|
@@ -63,8 +64,8 @@ sap.ui.define([
|
|
|
63
64
|
|
|
64
65
|
this.addStyleClass(RtaUtils.getRtaStyleClassName());
|
|
65
66
|
},
|
|
66
|
-
destroy
|
|
67
|
-
Dialog.prototype.destroy.apply(this,
|
|
67
|
+
destroy(...aArgs) {
|
|
68
|
+
Dialog.prototype.destroy.apply(this, aArgs);
|
|
68
69
|
},
|
|
69
70
|
renderer: DialogRenderer
|
|
70
71
|
});
|
|
@@ -67,7 +67,7 @@ sap.ui.define([
|
|
|
67
67
|
if (sTrimmedId[sTrimmedId.length - 1] === ".") {
|
|
68
68
|
sTrimmedId = sTrimmedId + sGuidString;
|
|
69
69
|
} else {
|
|
70
|
-
sTrimmedId = sTrimmedId
|
|
70
|
+
sTrimmedId = `${sTrimmedId}.${sGuidString}`;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
return this.trimIdIfRequired(sTrimmedId);
|
|
@@ -82,7 +82,7 @@ sap.ui.define([
|
|
|
82
82
|
var aIdStrings = sBaseAppID.split(".");
|
|
83
83
|
|
|
84
84
|
if (aIdStrings[0] !== "customer") {
|
|
85
|
-
aIdStrings[0] =
|
|
85
|
+
aIdStrings[0] = `customer.${aIdStrings[0]}`;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
var bRegFound = false;
|
|
@@ -98,7 +98,7 @@ sap.ui.define([
|
|
|
98
98
|
|
|
99
99
|
sChangedId = aIdStrings.join(".");
|
|
100
100
|
if (!bRegFound) {
|
|
101
|
-
sChangedId = sChangedId
|
|
101
|
+
sChangedId = `${sChangedId}.${uid().replace(/-/g, "_")}`;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
sChangedId = this.trimIdIfRequired(sChangedId);
|
|
@@ -124,7 +124,7 @@ sap.ui.define([
|
|
|
124
124
|
};
|
|
125
125
|
|
|
126
126
|
AppVariantUtils.prepareTextsChange = function(sPropertyName, sPropertyValue) {
|
|
127
|
-
var sComment =
|
|
127
|
+
var sComment = `New ${sPropertyName} entered by a key user via RTA tool`;
|
|
128
128
|
return this.getInlineChangeInput(sPropertyValue, sComment);
|
|
129
129
|
};
|
|
130
130
|
|
|
@@ -180,7 +180,7 @@ sap.ui.define([
|
|
|
180
180
|
oInboundInfo.addNewInboundRequired = true;
|
|
181
181
|
break;
|
|
182
182
|
case 1:
|
|
183
|
-
oInboundInfo.currentRunningInbound = aInboundsFound
|
|
183
|
+
[oInboundInfo.currentRunningInbound] = aInboundsFound;
|
|
184
184
|
oInboundInfo.addNewInboundRequired = false;
|
|
185
185
|
break;
|
|
186
186
|
default:
|
|
@@ -194,7 +194,7 @@ sap.ui.define([
|
|
|
194
194
|
};
|
|
195
195
|
|
|
196
196
|
AppVariantUtils.getInboundPropertiesKey = function(sAppVariantId, sCurrentRunningInboundId, sPropertyName) {
|
|
197
|
-
return sAppVariantId
|
|
197
|
+
return `${sAppVariantId}_sap.app.crossNavigation.inbounds.${sCurrentRunningInboundId}.${sPropertyName}`;
|
|
198
198
|
};
|
|
199
199
|
|
|
200
200
|
AppVariantUtils.getInlineChangeForInboundPropertySaveAs = function(sCurrentRunningInboundId, sAppVariantId) {
|
|
@@ -245,8 +245,8 @@ sap.ui.define([
|
|
|
245
245
|
oProperty.content.inbound[sCurrentRunningInboundId] = {
|
|
246
246
|
semanticObject: oParsedHash.semanticObject,
|
|
247
247
|
action: oParsedHash.action,
|
|
248
|
-
title:
|
|
249
|
-
subTitle:
|
|
248
|
+
title: `{{${sInboundTitleKey}}}`,
|
|
249
|
+
subTitle: `{{${sInboundSubTitleKey}}}`,
|
|
250
250
|
icon: oAppVariantSpecificData.icon,
|
|
251
251
|
signature: {
|
|
252
252
|
parameters: {
|
|
@@ -301,11 +301,11 @@ sap.ui.define([
|
|
|
301
301
|
}, {
|
|
302
302
|
propertyPath: "title",
|
|
303
303
|
operation: "UPSERT",
|
|
304
|
-
propertyValue:
|
|
304
|
+
propertyValue: `{{${sInboundTitleKey}}}`
|
|
305
305
|
}, {
|
|
306
306
|
propertyPath: "subTitle",
|
|
307
307
|
operation: "UPSERT",
|
|
308
|
-
propertyValue:
|
|
308
|
+
propertyValue: `{{${sInboundSubTitleKey}}}`
|
|
309
309
|
}, {
|
|
310
310
|
propertyPath: "icon",
|
|
311
311
|
operation: "UPSERT",
|
|
@@ -343,16 +343,16 @@ sap.ui.define([
|
|
|
343
343
|
|
|
344
344
|
AppVariantUtils.getTransportInput = function(sPackageName, sNameSpace, sName, sType) {
|
|
345
345
|
return {
|
|
346
|
-
getPackage
|
|
346
|
+
getPackage() {
|
|
347
347
|
return sPackageName;
|
|
348
348
|
},
|
|
349
|
-
getNamespace
|
|
349
|
+
getNamespace() {
|
|
350
350
|
return sNameSpace;
|
|
351
351
|
},
|
|
352
|
-
getId
|
|
352
|
+
getId() {
|
|
353
353
|
return sName;
|
|
354
354
|
},
|
|
355
|
-
getDefinition
|
|
355
|
+
getDefinition() {
|
|
356
356
|
return {
|
|
357
357
|
fileType: sType
|
|
358
358
|
};
|
|
@@ -403,7 +403,7 @@ sap.ui.define([
|
|
|
403
403
|
|
|
404
404
|
AppVariantUtils.getText = function(sMessageKey, sText) {
|
|
405
405
|
var oTextResources = this.getTextResources();
|
|
406
|
-
return sText ? oTextResources.getText(sMessageKey, sText) : oTextResources.getText(sMessageKey);
|
|
406
|
+
return sText ? oTextResources.getText(sMessageKey, [sText]) : oTextResources.getText(sMessageKey);
|
|
407
407
|
};
|
|
408
408
|
|
|
409
409
|
AppVariantUtils._getErrorMessageText = function(oError) {
|
|
@@ -416,7 +416,7 @@ sap.ui.define([
|
|
|
416
416
|
} else if (oError.userMessage) {
|
|
417
417
|
sErrorMessage = oError.userMessage;
|
|
418
418
|
} else if (oError.iamAppId) {
|
|
419
|
-
sErrorMessage =
|
|
419
|
+
sErrorMessage = `IAM App Id: ${oError.iamAppId}`;
|
|
420
420
|
} else {
|
|
421
421
|
sErrorMessage = oError.stack || oError.message || oError.status || oError;
|
|
422
422
|
}
|
|
@@ -426,10 +426,10 @@ sap.ui.define([
|
|
|
426
426
|
|
|
427
427
|
AppVariantUtils.buildErrorInfo = function(sMessageKey, oError, sAppVariantId) {
|
|
428
428
|
var sErrorMessage = this._getErrorMessageText(oError);
|
|
429
|
-
var sMessage = AppVariantUtils.getText(sMessageKey)
|
|
429
|
+
var sMessage = `${AppVariantUtils.getText(sMessageKey)}\n\n`;
|
|
430
430
|
|
|
431
431
|
if (sAppVariantId) {
|
|
432
|
-
sMessage += AppVariantUtils.getText("MSG_APP_VARIANT_ID", sAppVariantId)
|
|
432
|
+
sMessage += `${AppVariantUtils.getText("MSG_APP_VARIANT_ID", sAppVariantId)}\n`;
|
|
433
433
|
}
|
|
434
434
|
|
|
435
435
|
sMessage += AppVariantUtils.getText("MSG_TECHNICAL_ERROR", sErrorMessage);
|
|
@@ -451,8 +451,8 @@ sap.ui.define([
|
|
|
451
451
|
var sOverviewList = bSaveAsTriggeredFromRtaToolbar ? "" : "_OVERVIEW_LIST";
|
|
452
452
|
var sText = bIsS4HanaCloud ? undefined : sAppVariantId;
|
|
453
453
|
|
|
454
|
-
var sMessage = AppVariantUtils.getText("SAVE_APP_VARIANT_SUCCESS_MESSAGE")
|
|
455
|
-
sMessage += AppVariantUtils.getText(
|
|
454
|
+
var sMessage = `${AppVariantUtils.getText("SAVE_APP_VARIANT_SUCCESS_MESSAGE")}\n\n`;
|
|
455
|
+
sMessage += AppVariantUtils.getText(`SAVE_APP_VARIANT_SUCCESS_S4HANA_${sSystemTag}_MESSAGE${sOverviewList}`, sText);
|
|
456
456
|
|
|
457
457
|
return {
|
|
458
458
|
text: sMessage,
|
|
@@ -563,7 +563,7 @@ sap.ui.define([
|
|
|
563
563
|
}
|
|
564
564
|
})
|
|
565
565
|
.catch(function(vError) {
|
|
566
|
-
throw new Error(
|
|
566
|
+
throw new Error(`Error navigating to FLP Homepage: ${vError}`);
|
|
567
567
|
});
|
|
568
568
|
}
|
|
569
569
|
return Promise.resolve();
|
|
@@ -99,7 +99,7 @@ sap.ui.define([
|
|
|
99
99
|
|
|
100
100
|
return {
|
|
101
101
|
// To see the overview of app variants, a key user has created from an app
|
|
102
|
-
onGetOverview
|
|
102
|
+
onGetOverview(bAsKeyUser, sLayer) {
|
|
103
103
|
var oDescriptor = fnGetDescriptor();
|
|
104
104
|
|
|
105
105
|
return new Promise(function(resolve) {
|
|
@@ -115,9 +115,7 @@ sap.ui.define([
|
|
|
115
115
|
};
|
|
116
116
|
|
|
117
117
|
sap.ui.require([sOverviewPath], function(AppVariantOverviewDialog) {
|
|
118
|
-
|
|
119
|
-
oAppVariantOverviewDialog = new AppVariantOverviewDialog(oProperties);
|
|
120
|
-
}
|
|
118
|
+
oAppVariantOverviewDialog ||= new AppVariantOverviewDialog(oProperties);
|
|
121
119
|
|
|
122
120
|
oAppVariantOverviewDialog.attachCancel(fnCancel);
|
|
123
121
|
|
|
@@ -137,7 +135,7 @@ sap.ui.define([
|
|
|
137
135
|
* When this method returns <code>true</code> then a drop down menu button on the UI is shown where a user can choose app variant overview for either a key user or SAP developer.
|
|
138
136
|
* When this method returns <code>false</code>, an app variant overview is shown only for a key user.
|
|
139
137
|
*/
|
|
140
|
-
isOverviewExtended
|
|
138
|
+
isOverviewExtended() {
|
|
141
139
|
var oUriParams = UriParameters.fromQuery(window.location.search);
|
|
142
140
|
var sMode = oUriParams.get("sap-ui-xx-app-variant-overview-extended");
|
|
143
141
|
if (!sMode) {
|
|
@@ -146,7 +144,7 @@ sap.ui.define([
|
|
|
146
144
|
|
|
147
145
|
return sMode.toLowerCase() === "true";
|
|
148
146
|
},
|
|
149
|
-
isManifestSupported
|
|
147
|
+
isManifestSupported() {
|
|
150
148
|
var oDescriptor = fnGetDescriptor();
|
|
151
149
|
return AppVariantUtils.getManifirstSupport(oDescriptor["sap.app"].id);
|
|
152
150
|
},
|
|
@@ -156,7 +154,7 @@ sap.ui.define([
|
|
|
156
154
|
* @param {object} oLrepSerializer - Layered repository serializer
|
|
157
155
|
* @returns {boolean} Boolean value
|
|
158
156
|
*/
|
|
159
|
-
isSaveAsAvailable
|
|
157
|
+
isSaveAsAvailable(oRootControl, sCurrentLayer, oLrepSerializer) {
|
|
160
158
|
oRootControlRunningApp = oRootControl;
|
|
161
159
|
oCommandSerializer = oLrepSerializer;
|
|
162
160
|
|
|
@@ -182,7 +180,7 @@ sap.ui.define([
|
|
|
182
180
|
* @returns {Promise} Resolved promise with an app variant descriptor
|
|
183
181
|
* @description Getting here an app variant descriptor from the layered repository.
|
|
184
182
|
*/
|
|
185
|
-
getAppVariantDescriptor
|
|
183
|
+
getAppVariantDescriptor(oRootControl) {
|
|
186
184
|
oRootControlRunningApp = oRootControl;
|
|
187
185
|
var oDescriptor = fnGetDescriptor();
|
|
188
186
|
if (oDescriptor["sap.app"] && oDescriptor["sap.app"].id) {
|
|
@@ -192,7 +190,7 @@ sap.ui.define([
|
|
|
192
190
|
}
|
|
193
191
|
return Promise.resolve(false);
|
|
194
192
|
},
|
|
195
|
-
_determineSelector
|
|
193
|
+
_determineSelector(bIsRunningApp, oDescriptor) {
|
|
196
194
|
return bIsRunningApp ? oRootControlRunningApp : {
|
|
197
195
|
appId: oDescriptor["sap.app"].id,
|
|
198
196
|
appVersion: oDescriptor["sap.app"].applicationVersion.version
|
|
@@ -208,7 +206,7 @@ sap.ui.define([
|
|
|
208
206
|
* When 'Save As' triggered from the UI adaptation header bar, we set both flags <code>bSaveAsFromRta</code> and <code>bCopyUnsavedChanges</code> equal to <code>true</code>.
|
|
209
207
|
* The flag <code>bCopyUnsavedChanges</code> is <code>true</code> if a key user presses 'Save As' from the running app entry in the app variant overview dialog.
|
|
210
208
|
*/
|
|
211
|
-
onSaveAs
|
|
209
|
+
onSaveAs(bSaveAsFromRta, bCopyUnsavedChanges, sCurrentLayer, oSelectedAppVariant) {
|
|
212
210
|
var bIsS4HanaCloud;
|
|
213
211
|
var oAppVariantSaveClosure;
|
|
214
212
|
var oDescriptor = fnGetDescriptor();
|
|
@@ -254,9 +252,7 @@ sap.ui.define([
|
|
|
254
252
|
return oAppVariantManager.createAppVariant(sAppVariantId, vSelector)
|
|
255
253
|
.catch(function(oError) {
|
|
256
254
|
var sMessageKey = oError.messageKey;
|
|
257
|
-
|
|
258
|
-
sMessageKey = "MSG_SAVE_APP_VARIANT_FAILED";
|
|
259
|
-
}
|
|
255
|
+
sMessageKey ||= "MSG_SAVE_APP_VARIANT_FAILED";
|
|
260
256
|
|
|
261
257
|
return AppVariantUtils.catchErrorDialog(oError, sMessageKey, sAppVariantId);
|
|
262
258
|
});
|
|
@@ -321,12 +317,10 @@ sap.ui.define([
|
|
|
321
317
|
};
|
|
322
318
|
|
|
323
319
|
sap.ui.require(["sap/ui/rta/appVariant/AppVariantManager"], function(AppVariantManager) {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
});
|
|
329
|
-
}
|
|
320
|
+
oAppVariantManager ||= new AppVariantManager({
|
|
321
|
+
commandSerializer: oCommandSerializer,
|
|
322
|
+
layer: sCurrentLayer
|
|
323
|
+
});
|
|
330
324
|
|
|
331
325
|
return fnProcessSaveAsDialog()
|
|
332
326
|
.then(fnCreateInlineChanges) // Create the inline changes for application variant
|
|
@@ -355,17 +349,15 @@ sap.ui.define([
|
|
|
355
349
|
* @returns {Promise} Resolved promise
|
|
356
350
|
* @description Triggers a delete operation of the app variant.
|
|
357
351
|
*/
|
|
358
|
-
onDeleteFromOverviewDialog
|
|
352
|
+
onDeleteFromOverviewDialog(sAppVariantId, bCurrentlyAdapting, sCurrentLayer) {
|
|
359
353
|
var bIsS4HanaCloud;
|
|
360
354
|
return new Promise(function(resolve) {
|
|
361
355
|
sap.ui.require(["sap/ui/rta/appVariant/AppVariantManager"], function(AppVariantManager) {
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
});
|
|
368
|
-
}
|
|
356
|
+
oAppVariantManager ||= new AppVariantManager({
|
|
357
|
+
rootControl: oRootControlRunningApp,
|
|
358
|
+
commandSerializer: oCommandSerializer,
|
|
359
|
+
layer: sCurrentLayer
|
|
360
|
+
});
|
|
369
361
|
|
|
370
362
|
var fnDeleteAppVariant = function() {
|
|
371
363
|
return oAppVariantManager.deleteAppVariant(sAppVariantId)
|
|
@@ -374,9 +366,7 @@ sap.ui.define([
|
|
|
374
366
|
return Promise.reject("cancel");
|
|
375
367
|
}
|
|
376
368
|
var sMessageKey = oError.messageKey;
|
|
377
|
-
|
|
378
|
-
sMessageKey = "MSG_DELETE_APP_VARIANT_FAILED";
|
|
379
|
-
}
|
|
369
|
+
sMessageKey ||= "MSG_DELETE_APP_VARIANT_FAILED";
|
|
380
370
|
return AppVariantUtils.catchErrorDialog(oError, sMessageKey, sAppVariantId);
|
|
381
371
|
});
|
|
382
372
|
};
|
|
@@ -22,8 +22,9 @@ sap.ui.define([
|
|
|
22
22
|
metadata: {
|
|
23
23
|
library: "sap.ui.rta"
|
|
24
24
|
},
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
// eslint-disable-next-line object-shorthand
|
|
26
|
+
constructor: function(...aArgs) {
|
|
27
|
+
ManagedObject.apply(this, aArgs);
|
|
27
28
|
}
|
|
28
29
|
});
|
|
29
30
|
|
|
@@ -38,7 +39,12 @@ sap.ui.define([
|
|
|
38
39
|
* or rejects if the required ODATA service /sap/opu/odata/sap/APS_IAM_APP_SRV is not there
|
|
39
40
|
* @async
|
|
40
41
|
*/
|
|
41
|
-
S4HanaCloudBackend.prototype.notifyFlpCustomizingIsReady = function(
|
|
42
|
+
S4HanaCloudBackend.prototype.notifyFlpCustomizingIsReady = function(
|
|
43
|
+
sIamAppId,
|
|
44
|
+
bAppVarCreation,
|
|
45
|
+
iCheckIntervallMsec,
|
|
46
|
+
iMaxNumberOfChecks
|
|
47
|
+
) {
|
|
42
48
|
var that = this;
|
|
43
49
|
return new Promise(function(resolve, reject) {
|
|
44
50
|
// Check inputs and determine defaults
|
|
@@ -66,7 +72,7 @@ sap.ui.define([
|
|
|
66
72
|
// ... Reject if publishing return an error or is locked
|
|
67
73
|
}).catch(function(oError) {
|
|
68
74
|
var sText = bAppVarCreation ? "creation" : "deletion";
|
|
69
|
-
Log.error(
|
|
75
|
+
Log.error(`Catalog publishing failed for app variant ${sText}. AppVarStatus is ${oError.message}`);
|
|
70
76
|
reject({ iamAppId: sIamAppId, error: oError.message});
|
|
71
77
|
});
|
|
72
78
|
}
|
|
@@ -79,7 +85,7 @@ sap.ui.define([
|
|
|
79
85
|
S4HanaCloudBackend._isAppReady = function(oAppStatusResponse, bAppVarCreation) {
|
|
80
86
|
var aCatalogList = oAppStatusResponse.data.results;
|
|
81
87
|
if (!Array.isArray(aCatalogList)) {
|
|
82
|
-
throw new Error(oAppStatusResponse.requestUri
|
|
88
|
+
throw new Error(`${oAppStatusResponse.requestUri} returned unexpected result: ${oAppStatusResponse}`);
|
|
83
89
|
}
|
|
84
90
|
|
|
85
91
|
var bIsUnpublished = aCatalogList.every(function(oCatalog) {
|
|
@@ -111,18 +117,16 @@ sap.ui.define([
|
|
|
111
117
|
};
|
|
112
118
|
|
|
113
119
|
S4HanaCloudBackend._getODataModel = function() {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
oModelPromise = null;
|
|
120
|
-
});
|
|
121
|
-
oModel.metadataLoaded().then(function() {
|
|
122
|
-
resolve(oModel);
|
|
123
|
-
});
|
|
120
|
+
oModelPromise ||= new Promise(function(resolve, reject) {
|
|
121
|
+
var oModel = new ODataModel("/sap/opu/odata/sap/APS_IAM_APP_SRV");
|
|
122
|
+
oModel.attachMetadataFailed(function(oError) {
|
|
123
|
+
reject(oError);
|
|
124
|
+
oModelPromise = null;
|
|
124
125
|
});
|
|
125
|
-
|
|
126
|
+
oModel.metadataLoaded().then(function() {
|
|
127
|
+
resolve(oModel);
|
|
128
|
+
});
|
|
129
|
+
});
|
|
126
130
|
return oModelPromise;
|
|
127
131
|
};
|
|
128
132
|
|
|
@@ -135,7 +139,7 @@ sap.ui.define([
|
|
|
135
139
|
reject(oError);
|
|
136
140
|
};
|
|
137
141
|
|
|
138
|
-
oModel.read(
|
|
142
|
+
oModel.read(`/aps_iam_app_ddl('${sIamAppId}')/to_BusinessCatalogAssignment`, {success: fnSuccess, error: fnFailure});
|
|
139
143
|
});
|
|
140
144
|
};
|
|
141
145
|
|
|
@@ -23,9 +23,9 @@ function(
|
|
|
23
23
|
|
|
24
24
|
var Utils = {};
|
|
25
25
|
|
|
26
|
-
var sModulePath = sap.ui.require.toUrl("sap/ui/rta/appVariant/manageApps/")
|
|
26
|
+
var sModulePath = `${sap.ui.require.toUrl("sap/ui/rta/appVariant/manageApps/")}webapp`;
|
|
27
27
|
var oI18n = ResourceBundle.create({
|
|
28
|
-
url: sModulePath
|
|
28
|
+
url: `${sModulePath}/i18n/i18n.properties`
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
Utils._checkNavigationSupported = function(oNavigationParams) {
|
|
@@ -35,7 +35,7 @@ function(
|
|
|
35
35
|
return oNavigationService.getLinks(oNavigationParams);
|
|
36
36
|
})
|
|
37
37
|
.catch(function(vError) {
|
|
38
|
-
throw new Error(
|
|
38
|
+
throw new Error(`Error retrieving ushell service CrossApplicationNavigation: ${vError}`);
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
41
|
|
|
@@ -179,6 +179,7 @@ function(
|
|
|
179
179
|
// Adding the tooltip to every icon which is shown on the App Variant Overview Dialog
|
|
180
180
|
var sIconUrl = oAppVariantInfo.iconUrl;
|
|
181
181
|
if (sIconUrl && IconPool.isIconURI(sIconUrl)) {
|
|
182
|
+
// eslint-disable-next-line prefer-destructuring
|
|
182
183
|
oAppVariantInfo.iconText = sIconUrl.split("//")[1];
|
|
183
184
|
}
|
|
184
185
|
|
|
@@ -27,11 +27,12 @@ sap.ui.define([
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
// eslint-disable-next-line object-shorthand
|
|
31
|
+
constructor: function(...aArgs) {
|
|
32
|
+
_sIdRunningApp = aArgs[1].idRunningApp;
|
|
33
|
+
_bKeyUser = aArgs[1].isOverviewForKeyUser;
|
|
34
|
+
_sLayer = aArgs[1].layer;
|
|
35
|
+
UIComponent.prototype.constructor.apply(this, aArgs);
|
|
35
36
|
},
|
|
36
37
|
|
|
37
38
|
/**
|
|
@@ -39,12 +40,12 @@ sap.ui.define([
|
|
|
39
40
|
* @public
|
|
40
41
|
* @override
|
|
41
42
|
*/
|
|
42
|
-
init
|
|
43
|
+
init(...aArgs) {
|
|
43
44
|
this.setIdRunningApp(_sIdRunningApp);
|
|
44
45
|
this.setIsOverviewForKeyUser(_bKeyUser);
|
|
45
46
|
this.setLayer(_sLayer);
|
|
46
47
|
// call the base component's init function
|
|
47
|
-
UIComponent.prototype.init.apply(this,
|
|
48
|
+
UIComponent.prototype.init.apply(this, aArgs);
|
|
48
49
|
}
|
|
49
50
|
});
|
|
50
51
|
});
|