@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
package/THIRDPARTY.txt
CHANGED
|
@@ -6,7 +6,7 @@ The full text of all referenced licenses is appended at the end of this file.
|
|
|
6
6
|
|
|
7
7
|
Library: sap.m:
|
|
8
8
|
|
|
9
|
-
Component: purify.js, version: 3.
|
|
9
|
+
Component: purify.js, version: 3.2.4
|
|
10
10
|
Copyright: Mario Heiderich
|
|
11
11
|
License: Apache-2.0
|
|
12
12
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
@@ -462,7 +462,7 @@ License: Apache-2.0
|
|
|
462
462
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
463
463
|
Contained in: lib/jsdoc/ui5/plugin.js
|
|
464
464
|
|
|
465
|
-
Component: SAP Theming Base Content, version: 11.
|
|
465
|
+
Component: SAP Theming Base Content, version: 11.28.2
|
|
466
466
|
Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
|
|
467
467
|
License: Apache-2.0
|
|
468
468
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.rta",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.135.0",
|
|
4
4
|
"description": "OpenUI5 UI Library sap.ui.rta",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"url": "https://github.com/SAP/openui5.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@openui5/sap.m": "1.
|
|
18
|
-
"@openui5/sap.ui.core": "1.
|
|
19
|
-
"@openui5/sap.ui.dt": "1.
|
|
20
|
-
"@openui5/sap.ui.fl": "1.
|
|
21
|
-
"@openui5/sap.ui.layout": "1.
|
|
17
|
+
"@openui5/sap.m": "1.135.0",
|
|
18
|
+
"@openui5/sap.ui.core": "1.135.0",
|
|
19
|
+
"@openui5/sap.ui.dt": "1.135.0",
|
|
20
|
+
"@openui5/sap.ui.fl": "1.135.0",
|
|
21
|
+
"@openui5/sap.ui.layout": "1.135.0"
|
|
22
22
|
}
|
|
23
23
|
}
|
package/src/sap/ui/rta/.library
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
8
8
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
9
|
-
<version>1.
|
|
9
|
+
<version>1.135.0</version>
|
|
10
10
|
|
|
11
11
|
<documentation>SAPUI5 library with RTA controls.</documentation>
|
|
12
12
|
|
package/src/sap/ui/rta/Client.js
CHANGED
|
@@ -109,7 +109,7 @@ sap.ui.define([
|
|
|
109
109
|
* @class The runtime authoring allows to adapt the fields of a running application.
|
|
110
110
|
* @extends sap.ui.base.ManagedObject
|
|
111
111
|
* @author SAP SE
|
|
112
|
-
* @version 1.
|
|
112
|
+
* @version 1.135.0
|
|
113
113
|
* @constructor
|
|
114
114
|
* @private
|
|
115
115
|
* @since 1.30
|
|
@@ -557,7 +557,7 @@ sap.ui.define([
|
|
|
557
557
|
*
|
|
558
558
|
* @public
|
|
559
559
|
* @param {boolean} bSkipSave - Stop RTA with or w/o saving changes
|
|
560
|
-
* @param {boolean} bSkipRestart - Stop RTA with or w/o checking if a reload is needed to apply e.g. personalization/
|
|
560
|
+
* @param {boolean} bSkipRestart - Stop RTA with or w/o checking if a reload is needed to apply e.g. personalization/manifest changes
|
|
561
561
|
* @param {boolean} bSkipUnsavedChangesPrompt - Stop RTA without showing the "save changes" prompt to the user (e.g. closing of annotation dialog)
|
|
562
562
|
* @returns {Promise} Resolves with undefined
|
|
563
563
|
*/
|
|
@@ -1055,6 +1055,8 @@ sap.ui.define([
|
|
|
1055
1055
|
"/translation/enabled",
|
|
1056
1056
|
this.bPersistedDataTranslatable || bTranslationRelevantDirtyChange
|
|
1057
1057
|
);
|
|
1058
|
+
const bChangesNeedHardReload = this._bSavedChangesNeedReload || await this._oSerializer.needsReload();
|
|
1059
|
+
this._oToolbarControlsModel.setProperty("/changesNeedHardReload", bChangesNeedHardReload);
|
|
1058
1060
|
}
|
|
1059
1061
|
this.fireUndoRedoStackModified();
|
|
1060
1062
|
} catch (e) {
|
|
@@ -1117,6 +1119,28 @@ sap.ui.define([
|
|
|
1117
1119
|
}
|
|
1118
1120
|
}
|
|
1119
1121
|
|
|
1122
|
+
async function saveAndReload() {
|
|
1123
|
+
if (this.canSave()) {
|
|
1124
|
+
const sAction = await Utils.showMessageBox("warning", "MSG_SAVE_AND_RELOAD_DIALOG", {
|
|
1125
|
+
actions: [MessageBox.Action.OK, MessageBox.Action.CANCEL],
|
|
1126
|
+
emphasizedAction: MessageBox.Action.OK
|
|
1127
|
+
});
|
|
1128
|
+
if (sAction === MessageBox.Action.CANCEL) {
|
|
1129
|
+
return;
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
await this.save();
|
|
1133
|
+
if (this._oVersionsModel.getProperty("/versioningEnabled")) {
|
|
1134
|
+
await VersionsAPI.loadDraftForApplication({
|
|
1135
|
+
control: this.getRootControlInstance(),
|
|
1136
|
+
layer: this.getLayer()
|
|
1137
|
+
});
|
|
1138
|
+
}
|
|
1139
|
+
RuntimeAuthoring.enableRestart(this.getLayer(), this.getRootControlInstance());
|
|
1140
|
+
await this.stop(true, true, true);
|
|
1141
|
+
ReloadManager.reloadPage();
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1120
1144
|
function saveOnly(oEvent) {
|
|
1121
1145
|
const fnCallback = oEvent.getParameter("callback") || function() {};
|
|
1122
1146
|
const bVersionsEnabled = this._oVersionsModel.getProperty("/versioningEnabled");
|
|
@@ -1197,6 +1221,10 @@ sap.ui.define([
|
|
|
1197
1221
|
title: sVersionTitle,
|
|
1198
1222
|
displayedVersion: sDisplayedVersion
|
|
1199
1223
|
});
|
|
1224
|
+
await PersistenceWriteAPI.updateResetAndPublishInfo({
|
|
1225
|
+
selector: oSelector,
|
|
1226
|
+
layer: sLayer
|
|
1227
|
+
});
|
|
1200
1228
|
showMessageToast.call(this, "MSG_DRAFT_ACTIVATION_SUCCESS");
|
|
1201
1229
|
this.getPluginManager().getPlugin("toolHooks").setVersionWasActivated(true);
|
|
1202
1230
|
this.bInitialResetEnabled = true;
|
|
@@ -1460,6 +1488,7 @@ sap.ui.define([
|
|
|
1460
1488
|
? this.getChangeVisualization().openChangeCategorySelectionPopover.bind(this.getChangeVisualization())
|
|
1461
1489
|
: function() {};
|
|
1462
1490
|
oProperties.save = saveOnly.bind(this);
|
|
1491
|
+
oProperties.saveAndReload = saveAndReload.bind(this);
|
|
1463
1492
|
|
|
1464
1493
|
let oToolbar;
|
|
1465
1494
|
if (Utils.isOriginalFioriToolbarAccessible()) {
|
|
@@ -1485,7 +1514,9 @@ sap.ui.define([
|
|
|
1485
1514
|
});
|
|
1486
1515
|
this.bPersistedDataTranslatable = false;
|
|
1487
1516
|
|
|
1517
|
+
const bChangesNeedHardReload = this._bSavedChangesNeedReload || await this._oSerializer.needsReload();
|
|
1488
1518
|
this._oToolbarControlsModel = new JSONModel({
|
|
1519
|
+
changesNeedHardReload: bChangesNeedHardReload,
|
|
1489
1520
|
modeSwitcher: this.getMode(),
|
|
1490
1521
|
undo: {
|
|
1491
1522
|
enabled: false
|
|
@@ -1565,7 +1596,7 @@ sap.ui.define([
|
|
|
1565
1596
|
|
|
1566
1597
|
/**
|
|
1567
1598
|
* Delete all changes for current layer and root control's component.
|
|
1568
|
-
* In case of Base Applications (no App Variants) the
|
|
1599
|
+
* In case of Base Applications (no App Variants) the manifest Changes and UI Changes are saved
|
|
1569
1600
|
* in different Flex Persistence instances, the changes for both places will be deleted. For App Variants
|
|
1570
1601
|
* all the changes are saved in one place.
|
|
1571
1602
|
*
|
|
@@ -1700,14 +1731,6 @@ sap.ui.define([
|
|
|
1700
1731
|
this._pElementModified = this._pElementModified.then(function() {
|
|
1701
1732
|
this.getPluginManager().handleStopCutPaste();
|
|
1702
1733
|
|
|
1703
|
-
// Executed annotation commands will stop RTA and trigger a save + reload in RTA mode
|
|
1704
|
-
if (oEvent.getParameter("hasAnnotationCommand")) {
|
|
1705
|
-
this._pElementModified = Promise.resolve();
|
|
1706
|
-
RuntimeAuthoring.enableRestart(this.getLayer(), this.getRootControlInstance());
|
|
1707
|
-
return this.getCommandStack().pushAndExecute(oCommand)
|
|
1708
|
-
.then(this.stop.bind(this, false, false, /* bSkipUnsavedChangesPrompt = */true));
|
|
1709
|
-
}
|
|
1710
|
-
|
|
1711
1734
|
if (oCommand instanceof BaseCommand) {
|
|
1712
1735
|
if (sNewControlID) {
|
|
1713
1736
|
scheduleOnCreated.call(this, sNewControlID, function(oElementOverlay) {
|
package/src/sap/ui/rta/Utils.js
CHANGED
|
@@ -24,13 +24,13 @@ sap.ui.define([
|
|
|
24
24
|
* @class
|
|
25
25
|
* @extends sap.ui.base.ManagedObject
|
|
26
26
|
* @author SAP SE
|
|
27
|
-
* @version 1.
|
|
27
|
+
* @version 1.135.0
|
|
28
28
|
* @constructor
|
|
29
29
|
* @private
|
|
30
30
|
* @since 1.53
|
|
31
31
|
* @alias sap.ui.rta.appVariant.AppVariantManager
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
const AppVariantManager = ManagedObject.extend("sap.ui.rta.appVariant.AppVariantManager", {
|
|
34
34
|
metadata: {
|
|
35
35
|
library: "sap.ui.rta",
|
|
36
36
|
properties: {
|
|
@@ -45,7 +45,7 @@ sap.ui.define([
|
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
AppVariantManager.prototype._openDialog = function(fnCreate, fnCancel) {
|
|
48
|
-
|
|
48
|
+
const oDialog = new AppVariantDialog("appVariantDialog");
|
|
49
49
|
|
|
50
50
|
oDialog.attachCreate(fnCreate);
|
|
51
51
|
oDialog.attachCancel(fnCancel);
|
|
@@ -63,14 +63,14 @@ sap.ui.define([
|
|
|
63
63
|
* Returns the info required to create the app variant
|
|
64
64
|
* @private
|
|
65
65
|
*/
|
|
66
|
-
AppVariantManager.prototype._prepareAppVariantData = function(
|
|
66
|
+
AppVariantManager.prototype._prepareAppVariantData = function(oManifest, mParameters) {
|
|
67
67
|
return {
|
|
68
|
-
referenceAppId:
|
|
68
|
+
referenceAppId: oManifest["sap.app"].id,
|
|
69
69
|
title: mParameters.title,
|
|
70
70
|
subTitle: mParameters.subTitle,
|
|
71
71
|
description: mParameters.description,
|
|
72
72
|
icon: mParameters.icon,
|
|
73
|
-
inbounds:
|
|
73
|
+
inbounds: oManifest["sap.app"].crossNavigation && oManifest["sap.app"].crossNavigation.inbounds ? oManifest["sap.app"].crossNavigation.inbounds : null
|
|
74
74
|
};
|
|
75
75
|
};
|
|
76
76
|
|
|
@@ -78,13 +78,13 @@ sap.ui.define([
|
|
|
78
78
|
*
|
|
79
79
|
* @param {Object} oAppVariantSpecificData - Contains the specific info needed to create the inline changes for the app variant
|
|
80
80
|
* @param {sap.ui.fl.Selector} vSelector - Managed object or selector object
|
|
81
|
-
* @returns {Promise[]} returns all the
|
|
82
|
-
* @description Creates all the
|
|
81
|
+
* @returns {Promise[]} returns all the manifest inline changes
|
|
82
|
+
* @description Creates all the manifest inline changes for different change types.
|
|
83
83
|
*/
|
|
84
84
|
AppVariantManager.prototype.createAllInlineChanges = function(oAppVariantSpecificData, vSelector) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
const sAppVariantId = AppVariantUtils.getId(oAppVariantSpecificData.referenceAppId);
|
|
86
|
+
const aAllInlineChangeOperations = [];
|
|
87
|
+
let oPropertyChange = {};
|
|
88
88
|
|
|
89
89
|
// create a inline change using a change type 'appdescr_app_setTitle'
|
|
90
90
|
oPropertyChange.content = AppVariantUtils.prepareTextsChange("title", oAppVariantSpecificData.title);
|
|
@@ -105,12 +105,12 @@ sap.ui.define([
|
|
|
105
105
|
/** *********************************************************Inbounds handling******************************************************************/
|
|
106
106
|
return AppVariantUtils.getInboundInfo(oAppVariantSpecificData.inbounds)
|
|
107
107
|
.then(function(oInboundInfo) {
|
|
108
|
-
|
|
108
|
+
const sCurrentRunningInboundId = oInboundInfo.currentRunningInbound;
|
|
109
109
|
|
|
110
110
|
// If there is no inbound, create a new inbound
|
|
111
111
|
if (oInboundInfo.addNewInboundRequired) {
|
|
112
112
|
// create a inline change using a change type 'appdescr_app_addNewInbound'
|
|
113
|
-
|
|
113
|
+
const oInlineChangePromise = AppVariantUtils.prepareAddNewInboundChange(sCurrentRunningInboundId, sAppVariantId, oAppVariantSpecificData)
|
|
114
114
|
.then(function(oPropertyChange) {
|
|
115
115
|
return AppVariantUtils.createInlineChange(oPropertyChange, "appdescr_app_addNewInbound", vSelector);
|
|
116
116
|
});
|
|
@@ -138,7 +138,7 @@ sap.ui.define([
|
|
|
138
138
|
* @description Creates the app variant with all inline changes in backend.
|
|
139
139
|
*/
|
|
140
140
|
AppVariantManager.prototype.createAppVariant = function(sAppVariantId, vSelector) {
|
|
141
|
-
|
|
141
|
+
const mPropertyBag = {
|
|
142
142
|
id: sAppVariantId,
|
|
143
143
|
layer: this.getLayer()
|
|
144
144
|
};
|
|
@@ -158,21 +158,21 @@ sap.ui.define([
|
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
160
|
*
|
|
161
|
-
* @param {Object}
|
|
161
|
+
* @param {Object} oManifest - Contains the app variant manifest information
|
|
162
162
|
* @param {boolean} bSaveAsTriggeredFromRtaToolbar - Boolean value which tells if 'Save As' is triggered from the UI adaptation header bar
|
|
163
163
|
* @returns {Object} Contains the information to create the app variant
|
|
164
164
|
* @description Processes the Save As Dialog and consolidates the input parameters from the 'Save As' dialog as an object.
|
|
165
165
|
*/
|
|
166
|
-
AppVariantManager.prototype.processSaveAsDialog = function(
|
|
166
|
+
AppVariantManager.prototype.processSaveAsDialog = function(oManifest, bSaveAsTriggeredFromRtaToolbar) {
|
|
167
167
|
return new Promise(function(resolve, reject) {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
const fnCreate = function(oResult) {
|
|
169
|
+
const mParameters = oResult.getParameters();
|
|
170
|
+
const oAppVariantData = this._prepareAppVariantData(oManifest, mParameters);
|
|
171
171
|
|
|
172
172
|
resolve(oAppVariantData);
|
|
173
173
|
}.bind(this);
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
const fnCancel = function() {
|
|
176
176
|
if (!bSaveAsTriggeredFromRtaToolbar) {
|
|
177
177
|
return RtaAppVariantFeature.onGetOverview(true, this.getLayer());
|
|
178
178
|
}
|
|
@@ -199,7 +199,7 @@ sap.ui.define([
|
|
|
199
199
|
* @description Clears the RTA command stack
|
|
200
200
|
*/
|
|
201
201
|
AppVariantManager.prototype.clearRTACommandStack = function(bCopyUnsavedChanges) {
|
|
202
|
-
|
|
202
|
+
const oCommandStack = this.getCommandSerializer().getCommandStack();
|
|
203
203
|
if (bCopyUnsavedChanges && oCommandStack.getAllExecutedCommands().length) {
|
|
204
204
|
return this._clearRTACommandStack();
|
|
205
205
|
}
|
|
@@ -217,10 +217,10 @@ sap.ui.define([
|
|
|
217
217
|
* In 'Deletion' scenario: The app variant is unassigned from all catalogs.
|
|
218
218
|
*/
|
|
219
219
|
AppVariantManager.prototype.triggerCatalogPublishing = function(sAppVariantId, sReferenceAppId, bSaveAs) {
|
|
220
|
-
|
|
220
|
+
const fnTriggerCatalogOperation = bSaveAs ? AppVariantUtils.triggerCatalogAssignment : AppVariantUtils.triggerCatalogUnAssignment;
|
|
221
221
|
return fnTriggerCatalogOperation(sAppVariantId, this.getLayer(), sReferenceAppId)
|
|
222
222
|
.catch(function(oError) {
|
|
223
|
-
|
|
223
|
+
const sMessageKey = bSaveAs ? "MSG_CATALOG_ASSIGNMENT_FAILED" : "MSG_DELETE_APP_VARIANT_FAILED";
|
|
224
224
|
return AppVariantUtils.catchErrorDialog(oError, sMessageKey, sAppVariantId);
|
|
225
225
|
});
|
|
226
226
|
};
|
|
@@ -236,9 +236,9 @@ sap.ui.define([
|
|
|
236
236
|
* In case of deletion: It checks whether the catalogs bound to the app variant have been unpublished and the deletion can be started.
|
|
237
237
|
*/
|
|
238
238
|
AppVariantManager.prototype.notifyKeyUserWhenPublishingIsReady = function(sIamId, sAppVarId, bCreation) {
|
|
239
|
-
|
|
239
|
+
const oS4HanaCloudBackend = new S4HanaCloudBackend();
|
|
240
240
|
return oS4HanaCloudBackend.notifyFlpCustomizingIsReady(sIamId, bCreation).catch(function(oError) {
|
|
241
|
-
|
|
241
|
+
let sMessageKey = bCreation ? "MSG_TILE_CREATION_FAILED" : "MSG_DELETE_APP_VARIANT_FAILED";
|
|
242
242
|
if (!bCreation && oError.error === "locked") {
|
|
243
243
|
sMessageKey = "MSG_CATALOGS_LOCKED";
|
|
244
244
|
}
|
|
@@ -27,36 +27,36 @@ sap.ui.define([
|
|
|
27
27
|
) {
|
|
28
28
|
"use strict";
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
let oAppVariantOverviewDialog;
|
|
31
|
+
let oAppVariantManager;
|
|
32
|
+
let oRootControlRunningApp;
|
|
33
|
+
let oCommandSerializer;
|
|
34
|
+
let _oldUnloadHandler;
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
const fnGetManifest = function() {
|
|
37
37
|
return FlexUtils.getAppDescriptor(oRootControlRunningApp);
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
const fnS4HanaRemoveBrowserCloseWarning = function() {
|
|
41
41
|
window.onbeforeunload = _oldUnloadHandler;
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
const fnS4HanaAddBrowserCloseWarning = function(bCurrentlyAdapting) {
|
|
45
|
+
const sMessageKey = bCurrentlyAdapting ? "MSG_DO_NOT_CLOSE_BROWSER_CURRENTLY_ADAPTING" : "MSG_DO_NOT_CLOSE_BROWSER";
|
|
46
46
|
_oldUnloadHandler = window.onbeforeunload;
|
|
47
47
|
window.onbeforeunload = AppVariantUtils.handleBeforeUnloadEvent;
|
|
48
48
|
return AppVariantUtils.showMessage(sMessageKey);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
const fnTriggerCatalogAssignment = function(sAppVariantId, sReferenceAppId) {
|
|
52
52
|
return oAppVariantManager.triggerCatalogPublishing(sAppVariantId, sReferenceAppId, true);
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
const fnTriggerCatalogUnAssignment = function(sAppVariantId) {
|
|
56
56
|
return oAppVariantManager.triggerCatalogPublishing(sAppVariantId, null, false);
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
const fnReloadOverviewDialog = function(bIsReloadNeeded, sCurrentLayer) {
|
|
60
60
|
if (oAppVariantOverviewDialog) {
|
|
61
61
|
// in case of S/4HANA Cloud when customer did not close overview
|
|
62
62
|
AppVariantUtils.closeOverviewDialog();
|
|
@@ -68,11 +68,11 @@ sap.ui.define([
|
|
|
68
68
|
return Promise.resolve();
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
const fnTriggerActionFlow = function(bSaveAsTriggeredFromRtaToolbar, bIsS4HanaCloud, sCurrentLayer) {
|
|
72
72
|
return bSaveAsTriggeredFromRtaToolbar ? AppVariantUtils.navigateToFLPHomepage() : fnReloadOverviewDialog.call(this, !bIsS4HanaCloud, sCurrentLayer);
|
|
73
73
|
};
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
const fnTriggerPollingTileCreation = function(oResult, sAppVariantId) {
|
|
76
76
|
// In case of S/4HANA Cloud, oResult is filled from catalog assignment call
|
|
77
77
|
if (oResult && oResult.response && oResult.response.IAMId) {
|
|
78
78
|
if (!Array.isArray(oResult.response.CatalogIds) || oResult.response.CatalogIds.length === 0) {
|
|
@@ -86,7 +86,7 @@ sap.ui.define([
|
|
|
86
86
|
return Promise.resolve();
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
const fnTriggerPollingTileDeletion = function(oResult, sAppVariantId) {
|
|
90
90
|
// In case of S/4HANA Cloud, oResult is filled from catalog unassignment call, do polling only if inProgress === true
|
|
91
91
|
if (oResult && oResult.response && oResult.response.IAMId && oResult.response.inProgress) {
|
|
92
92
|
return oAppVariantManager.notifyKeyUserWhenPublishingIsReady(oResult.response.IAMId, sAppVariantId, false);
|
|
@@ -104,16 +104,16 @@ sap.ui.define([
|
|
|
104
104
|
return {
|
|
105
105
|
// To see the overview of app variants, a key user has created from an app
|
|
106
106
|
onGetOverview(bAsKeyUser, sLayer) {
|
|
107
|
-
|
|
107
|
+
const oManifest = fnGetManifest();
|
|
108
108
|
|
|
109
109
|
return new Promise(function(resolve) {
|
|
110
|
-
|
|
110
|
+
const fnCancel = function() {
|
|
111
111
|
AppVariantUtils.closeOverviewDialog();
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
idRunningApp:
|
|
114
|
+
const sOverviewPath = "sap/ui/rta/appVariant/AppVariantOverviewDialog";
|
|
115
|
+
const oProperties = {
|
|
116
|
+
idRunningApp: oManifest["sap.app"].id,
|
|
117
117
|
isOverviewForKeyUser: bAsKeyUser,
|
|
118
118
|
layer: sLayer
|
|
119
119
|
};
|
|
@@ -140,8 +140,8 @@ sap.ui.define([
|
|
|
140
140
|
* When this method returns <code>false</code>, an app variant overview is shown only for a key user.
|
|
141
141
|
*/
|
|
142
142
|
isOverviewExtended() {
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
const oUriParams = new URLSearchParams(window.location.search);
|
|
144
|
+
const sMode = oUriParams.get("sap-ui-xx-app-variant-overview-extended");
|
|
145
145
|
if (!sMode) {
|
|
146
146
|
return false;
|
|
147
147
|
}
|
|
@@ -149,8 +149,8 @@ sap.ui.define([
|
|
|
149
149
|
return sMode.toLowerCase() === "true";
|
|
150
150
|
},
|
|
151
151
|
isManifestSupported() {
|
|
152
|
-
|
|
153
|
-
return AppVariantUtils.getManifirstSupport(
|
|
152
|
+
const oManifest = fnGetManifest();
|
|
153
|
+
return AppVariantUtils.getManifirstSupport(oManifest["sap.app"].id);
|
|
154
154
|
},
|
|
155
155
|
/**
|
|
156
156
|
* @param {object} oRootControl - Root control of an app (variant)
|
|
@@ -162,13 +162,13 @@ sap.ui.define([
|
|
|
162
162
|
oRootControlRunningApp = oRootControl;
|
|
163
163
|
oCommandSerializer = oLrepSerializer;
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
const oManifest = fnGetManifest();
|
|
166
166
|
|
|
167
|
-
if (
|
|
167
|
+
if (oManifest["sap.app"] && oManifest["sap.app"].id) {
|
|
168
168
|
return FeaturesAPI.isSaveAsAvailable(sCurrentLayer).then(function(bIsSaveAsAvailable) {
|
|
169
169
|
if (bIsSaveAsAvailable) {
|
|
170
|
-
if (
|
|
171
|
-
return AppVariantUtils.getInboundInfo(
|
|
170
|
+
if (oManifest["sap.app"].crossNavigation && oManifest["sap.app"].crossNavigation.inbounds) {
|
|
171
|
+
return AppVariantUtils.getInboundInfo(oManifest["sap.app"].crossNavigation.inbounds);
|
|
172
172
|
}
|
|
173
173
|
return AppVariantUtils.getInboundInfo();
|
|
174
174
|
}
|
|
@@ -181,23 +181,23 @@ sap.ui.define([
|
|
|
181
181
|
},
|
|
182
182
|
/**
|
|
183
183
|
* @param {object} oRootControl - Root control of an app (variant)
|
|
184
|
-
* @returns {Promise} Resolved promise with an app variant
|
|
185
|
-
* @description Getting here an app variant
|
|
184
|
+
* @returns {Promise} Resolved promise with an app variant manifest
|
|
185
|
+
* @description Getting here an app variant manifest from the layered repository.
|
|
186
186
|
*/
|
|
187
|
-
|
|
187
|
+
getAppVariantManifest(oRootControl) {
|
|
188
188
|
oRootControlRunningApp = oRootControl;
|
|
189
|
-
|
|
190
|
-
if (
|
|
189
|
+
const oManifest = fnGetManifest();
|
|
190
|
+
if (oManifest["sap.app"] && oManifest["sap.app"].id) {
|
|
191
191
|
return AppVariantFactory.load({
|
|
192
|
-
id:
|
|
192
|
+
id: oManifest["sap.app"].id
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
195
|
return Promise.resolve(false);
|
|
196
196
|
},
|
|
197
|
-
_determineSelector(bIsRunningApp,
|
|
197
|
+
_determineSelector(bIsRunningApp, oManifest) {
|
|
198
198
|
return bIsRunningApp ? oRootControlRunningApp : {
|
|
199
|
-
appId:
|
|
200
|
-
appVersion:
|
|
199
|
+
appId: oManifest["sap.app"].id,
|
|
200
|
+
appVersion: oManifest["sap.app"].applicationVersion.version
|
|
201
201
|
};
|
|
202
202
|
},
|
|
203
203
|
/**
|
|
@@ -211,58 +211,58 @@ sap.ui.define([
|
|
|
211
211
|
* 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.
|
|
212
212
|
*/
|
|
213
213
|
onSaveAs(bSaveAsFromRta, bCopyUnsavedChanges, sCurrentLayer, oSelectedAppVariant) {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
214
|
+
let bIsS4HanaCloud;
|
|
215
|
+
let oAppVariantSaveClosure;
|
|
216
|
+
let oManifest = fnGetManifest();
|
|
217
|
+
let bIsRunningApp = true;
|
|
218
218
|
|
|
219
219
|
if (
|
|
220
220
|
oSelectedAppVariant
|
|
221
|
-
&& oSelectedAppVariant["sap.app"].id ===
|
|
221
|
+
&& oSelectedAppVariant["sap.app"].id === oManifest["sap.app"].id
|
|
222
222
|
) {
|
|
223
223
|
// When an app variant is created on top of base app/app variant from the app variant overview dialog and root control is from the latter
|
|
224
224
|
bCopyUnsavedChanges = true;
|
|
225
|
-
|
|
225
|
+
oManifest = merge({}, oSelectedAppVariant);
|
|
226
226
|
oSelectedAppVariant = null;
|
|
227
227
|
} else if (oSelectedAppVariant) {
|
|
228
228
|
// When an app variant is created on top of app variant from the app variant overview dialog and root control is from base application
|
|
229
229
|
bIsRunningApp = false;
|
|
230
|
-
|
|
230
|
+
oManifest = merge({}, oSelectedAppVariant);
|
|
231
231
|
oSelectedAppVariant = null;
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
// Determine the selector
|
|
235
|
-
|
|
235
|
+
const vSelector = this._determineSelector(bIsRunningApp, oManifest);
|
|
236
236
|
|
|
237
237
|
return new Promise(function(resolve) {
|
|
238
|
-
|
|
239
|
-
return oAppVariantManager.processSaveAsDialog(
|
|
238
|
+
const fnProcessSaveAsDialog = function() {
|
|
239
|
+
return oAppVariantManager.processSaveAsDialog(oManifest, bSaveAsFromRta);
|
|
240
240
|
};
|
|
241
241
|
|
|
242
|
-
|
|
242
|
+
const fnCreateInlineChanges = function(oAppVariantSpecificData) {
|
|
243
243
|
BusyIndicator.show();
|
|
244
244
|
return oAppVariantManager.createAllInlineChanges(oAppVariantSpecificData, vSelector);
|
|
245
245
|
};
|
|
246
246
|
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
const fnAddChangesToPersistence = function(aChanges) {
|
|
248
|
+
const aAllInlineChanges = aChanges.slice();
|
|
249
249
|
return AppVariantUtils.addChangesToPersistence(aAllInlineChanges, vSelector);
|
|
250
250
|
};
|
|
251
251
|
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
const fnCreateAppVariant = function() {
|
|
253
|
+
const sAppVariantId = AppVariantUtils.getNewAppVariantId();
|
|
254
254
|
|
|
255
|
-
// Based on the key user provided info, app variant
|
|
255
|
+
// Based on the key user provided info, app variant manifest is created
|
|
256
256
|
return oAppVariantManager.createAppVariant(sAppVariantId, vSelector)
|
|
257
257
|
.catch(function(oError) {
|
|
258
|
-
|
|
258
|
+
let sMessageKey = oError.messageKey;
|
|
259
259
|
sMessageKey ||= "MSG_SAVE_APP_VARIANT_FAILED";
|
|
260
260
|
|
|
261
261
|
return AppVariantUtils.catchErrorDialog(oError, sMessageKey, sAppVariantId);
|
|
262
262
|
});
|
|
263
263
|
};
|
|
264
264
|
|
|
265
|
-
|
|
265
|
+
const fnClearRTACommandStack = function(oResult) {
|
|
266
266
|
oAppVariantSaveClosure = null;
|
|
267
267
|
oAppVariantSaveClosure = merge({}, oResult.response);
|
|
268
268
|
|
|
@@ -270,8 +270,8 @@ sap.ui.define([
|
|
|
270
270
|
return oAppVariantManager.clearRTACommandStack(bCopyUnsavedChanges);
|
|
271
271
|
};
|
|
272
272
|
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
const fnResetDirtyFlag = function() {
|
|
274
|
+
const oUshellContainer = FlexUtils.getUshellContainer();
|
|
275
275
|
if (oUshellContainer && bCopyUnsavedChanges) {
|
|
276
276
|
// Tell FLP that no UI change is booked for the currently adapting app
|
|
277
277
|
oUshellContainer.setDirtyFlag(false);
|
|
@@ -283,19 +283,19 @@ sap.ui.define([
|
|
|
283
283
|
bIsS4HanaCloud = FlexRuntimeInfoAPI.isAtoEnabled();
|
|
284
284
|
// Shows the success message and closes the current app (if 'Save As' triggered from UI adaptation toolbar)
|
|
285
285
|
// or opens the app variant overview list (if 'Save As' triggered from App variant overview List)
|
|
286
|
-
|
|
286
|
+
const oSuccessInfo = AppVariantUtils.buildSuccessInfo(oAppVariantSaveClosure.id, bSaveAsFromRta, bIsS4HanaCloud);
|
|
287
287
|
return oAppVariantManager.showSuccessMessage(oSuccessInfo);
|
|
288
288
|
};
|
|
289
289
|
|
|
290
|
-
|
|
291
|
-
|
|
290
|
+
const fnShowCatalogAssignmentSuccessMessage = function() {
|
|
291
|
+
const oSuccessInfo = AppVariantUtils.buildFinalSuccessInfoS4HANACloud();
|
|
292
292
|
return oAppVariantManager.showSuccessMessage(oSuccessInfo);
|
|
293
293
|
};
|
|
294
294
|
|
|
295
|
-
|
|
295
|
+
const fnTriggerPlatformDependentFlow = function() {
|
|
296
296
|
BusyIndicator.show();
|
|
297
297
|
if (bIsS4HanaCloud) {
|
|
298
|
-
|
|
298
|
+
let oIAMResponse;
|
|
299
299
|
return fnS4HanaAddBrowserCloseWarning()
|
|
300
300
|
.then(function() {
|
|
301
301
|
return fnTriggerCatalogAssignment(oAppVariantSaveClosure.id, oAppVariantSaveClosure.reference);
|
|
@@ -328,7 +328,7 @@ sap.ui.define([
|
|
|
328
328
|
|
|
329
329
|
return fnProcessSaveAsDialog()
|
|
330
330
|
.then(fnCreateInlineChanges) // Create the inline changes for application variant
|
|
331
|
-
.then(fnAddChangesToPersistence) // Adds the
|
|
331
|
+
.then(fnAddChangesToPersistence) // Adds the manifest inline changes to the persistence
|
|
332
332
|
.then(fnCreateAppVariant) // Creates the application variant and saves it to the layered repository
|
|
333
333
|
.then(fnClearRTACommandStack)
|
|
334
334
|
.then(fnTriggerSuccessMessage)
|
|
@@ -353,7 +353,7 @@ sap.ui.define([
|
|
|
353
353
|
* @description Triggers a delete operation of the app variant.
|
|
354
354
|
*/
|
|
355
355
|
onDeleteFromOverviewDialog(sAppVariantId, bCurrentlyAdapting, sCurrentLayer) {
|
|
356
|
-
|
|
356
|
+
let bIsS4HanaCloud;
|
|
357
357
|
return new Promise(function(resolve) {
|
|
358
358
|
sap.ui.require(["sap/ui/rta/appVariant/AppVariantManager"], function(AppVariantManager) {
|
|
359
359
|
oAppVariantManager ||= new AppVariantManager({
|
|
@@ -362,28 +362,28 @@ sap.ui.define([
|
|
|
362
362
|
layer: sCurrentLayer
|
|
363
363
|
});
|
|
364
364
|
|
|
365
|
-
|
|
365
|
+
const fnDeleteAppVariant = function() {
|
|
366
366
|
return oAppVariantManager.deleteAppVariant(sAppVariantId)
|
|
367
367
|
.catch(function(oError) {
|
|
368
368
|
if (oError === "cancel") {
|
|
369
369
|
return Promise.reject("cancel");
|
|
370
370
|
}
|
|
371
|
-
|
|
371
|
+
let sMessageKey = oError.messageKey;
|
|
372
372
|
sMessageKey ||= "MSG_DELETE_APP_VARIANT_FAILED";
|
|
373
373
|
return AppVariantUtils.catchErrorDialog(oError, sMessageKey, sAppVariantId);
|
|
374
374
|
});
|
|
375
375
|
};
|
|
376
376
|
|
|
377
|
-
|
|
377
|
+
const fnDeleteSuccessMessage = function() {
|
|
378
378
|
AppVariantUtils.closeOverviewDialog();
|
|
379
|
-
|
|
379
|
+
const oSuccessInfo = AppVariantUtils.buildDeleteSuccessMessage(sAppVariantId, bIsS4HanaCloud);
|
|
380
380
|
return oAppVariantManager.showSuccessMessage(oSuccessInfo);
|
|
381
381
|
};
|
|
382
382
|
|
|
383
|
-
|
|
383
|
+
const fnTriggerS4HanaPolling = function() {
|
|
384
384
|
bIsS4HanaCloud = FlexRuntimeInfoAPI.isAtoEnabled();
|
|
385
385
|
if (bIsS4HanaCloud) {
|
|
386
|
-
|
|
386
|
+
let oIAMResponse;
|
|
387
387
|
return fnS4HanaAddBrowserCloseWarning(bCurrentlyAdapting)
|
|
388
388
|
.then(function() {
|
|
389
389
|
return fnTriggerCatalogUnAssignment(sAppVariantId);
|
|
@@ -400,7 +400,7 @@ sap.ui.define([
|
|
|
400
400
|
return Promise.resolve();
|
|
401
401
|
};
|
|
402
402
|
|
|
403
|
-
|
|
403
|
+
const fnTriggerS4HanaRefresh = function() {
|
|
404
404
|
if (bIsS4HanaCloud) {
|
|
405
405
|
fnS4HanaRemoveBrowserCloseWarning();
|
|
406
406
|
}
|