@openui5/sap.ui.rta 1.97.1 → 1.98.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.reuse/dep5 +25 -30
- package/THIRDPARTY.txt +13 -20
- 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 +184 -134
- package/src/sap/ui/rta/Utils.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +3 -4
- package/src/sap/ui/rta/appVariant/Feature.js +6 -5
- package/src/sap/ui/rta/command/AddIFrame.js +1 -1
- package/src/sap/ui/rta/command/AddProperty.js +1 -1
- package/src/sap/ui/rta/command/AddXML.js +1 -1
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
- package/src/sap/ui/rta/command/BaseCommand.js +1 -1
- package/src/sap/ui/rta/command/BindProperty.js +1 -1
- package/src/sap/ui/rta/command/Combine.js +1 -1
- package/src/sap/ui/rta/command/CommandFactory.js +1 -1
- package/src/sap/ui/rta/command/CompositeCommand.js +5 -5
- 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/FlexCommand.js +1 -1
- package/src/sap/ui/rta/command/LREPSerializer.js +11 -3
- package/src/sap/ui/rta/command/LocalReset.js +1 -1
- package/src/sap/ui/rta/command/Move.js +1 -1
- package/src/sap/ui/rta/command/Property.js +1 -1
- package/src/sap/ui/rta/command/Remove.js +1 -1
- package/src/sap/ui/rta/command/Rename.js +1 -1
- package/src/sap/ui/rta/command/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 +15 -21
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
- package/src/sap/ui/rta/enablement/elementActionTest.js +2 -2
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +30 -13
- package/src/sap/ui/rta/messagebundle_ar.properties +15 -6
- package/src/sap/ui/rta/messagebundle_bg.properties +15 -6
- package/src/sap/ui/rta/messagebundle_ca.properties +15 -6
- package/src/sap/ui/rta/messagebundle_cs.properties +15 -6
- package/src/sap/ui/rta/messagebundle_cy.properties +15 -6
- package/src/sap/ui/rta/messagebundle_da.properties +15 -6
- package/src/sap/ui/rta/messagebundle_de.properties +15 -6
- package/src/sap/ui/rta/messagebundle_el.properties +15 -6
- package/src/sap/ui/rta/messagebundle_en.properties +15 -6
- package/src/sap/ui/rta/messagebundle_en_GB.properties +15 -6
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +15 -6
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +17 -8
- package/src/sap/ui/rta/messagebundle_es.properties +15 -6
- package/src/sap/ui/rta/messagebundle_es_MX.properties +18 -9
- package/src/sap/ui/rta/messagebundle_et.properties +16 -7
- package/src/sap/ui/rta/messagebundle_fi.properties +15 -6
- package/src/sap/ui/rta/messagebundle_fr.properties +15 -6
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +15 -6
- package/src/sap/ui/rta/messagebundle_hi.properties +15 -6
- package/src/sap/ui/rta/messagebundle_hr.properties +15 -6
- package/src/sap/ui/rta/messagebundle_hu.properties +15 -6
- package/src/sap/ui/rta/messagebundle_id.properties +18 -9
- package/src/sap/ui/rta/messagebundle_it.properties +16 -7
- package/src/sap/ui/rta/messagebundle_iw.properties +15 -6
- package/src/sap/ui/rta/messagebundle_ja.properties +15 -6
- package/src/sap/ui/rta/messagebundle_kk.properties +15 -6
- package/src/sap/ui/rta/messagebundle_ko.properties +16 -7
- package/src/sap/ui/rta/messagebundle_lt.properties +15 -6
- package/src/sap/ui/rta/messagebundle_lv.properties +15 -6
- package/src/sap/ui/rta/messagebundle_ms.properties +15 -6
- package/src/sap/ui/rta/messagebundle_nl.properties +15 -6
- package/src/sap/ui/rta/messagebundle_no.properties +15 -6
- package/src/sap/ui/rta/messagebundle_pl.properties +15 -6
- package/src/sap/ui/rta/messagebundle_pt.properties +15 -6
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +15 -6
- package/src/sap/ui/rta/messagebundle_ro.properties +15 -6
- package/src/sap/ui/rta/messagebundle_ru.properties +15 -6
- package/src/sap/ui/rta/messagebundle_sh.properties +15 -6
- package/src/sap/ui/rta/messagebundle_sk.properties +15 -6
- package/src/sap/ui/rta/messagebundle_sl.properties +15 -6
- package/src/sap/ui/rta/messagebundle_sv.properties +15 -6
- package/src/sap/ui/rta/messagebundle_th.properties +15 -6
- package/src/sap/ui/rta/messagebundle_tr.properties +15 -6
- package/src/sap/ui/rta/messagebundle_uk.properties +17 -8
- package/src/sap/ui/rta/messagebundle_vi.properties +15 -6
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +15 -6
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +15 -6
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.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 +3 -4
- 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/EasyAdd.js +1 -1
- package/src/sap/ui/rta/plugin/EasyRemove.js +1 -1
- package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
- package/src/sap/ui/rta/plugin/Plugin.js +1 -1
- package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
- package/src/sap/ui/rta/plugin/Remove.js +1 -1
- package/src/sap/ui/rta/plugin/Rename.js +1 -1
- package/src/sap/ui/rta/plugin/RenameHandler.js +1 -1
- package/src/sap/ui/rta/plugin/Selection.js +15 -26
- package/src/sap/ui/rta/plugin/Settings.js +1 -1
- 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 +15 -84
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +0 -67
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +9 -10
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +3 -4
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +17 -47
- 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 +5 -6
- package/src/sap/ui/rta/service/Outline.js +6 -3
- 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/toolbar/Adaptation.fragment.xml +1 -0
- package/src/sap/ui/rta/toolbar/Adaptation.js +12 -12
- package/src/sap/ui/rta/toolbar/Base.js +3 -3
- package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +2 -2
- package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/translation/DownloadTranslationDialog.fragment.xml +19 -10
- package/src/sap/ui/rta/toolbar/translation/Translation.js +114 -45
- package/src/sap/ui/rta/toolbar/translation/TranslationPopover.fragment.xml +8 -13
- package/src/sap/ui/rta/toolbar/translation/UploadTranslationDialog.fragment.xml +41 -0
- package/src/sap/ui/rta/util/PluginManager.js +1 -1
- package/src/sap/ui/rta/util/PopupManager.js +5 -2
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/adaptationStarter.js +40 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +7 -3
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +26 -44
- package/src/sap/ui/rta/util/showMessageBox.js +4 -3
- package/src/sap/ui/rta/util/validateFlexEnabled.js +2 -1
|
@@ -6,87 +6,93 @@
|
|
|
6
6
|
|
|
7
7
|
// Provides class sap.ui.rta.RuntimeAuthoring.
|
|
8
8
|
sap.ui.define([
|
|
9
|
+
"sap/base/strings/capitalize",
|
|
10
|
+
"sap/base/util/UriParameters",
|
|
11
|
+
"sap/base/Log",
|
|
12
|
+
"sap/m/MessageBox",
|
|
13
|
+
"sap/m/MessageToast",
|
|
9
14
|
"sap/ui/thirdparty/jquery",
|
|
10
15
|
"sap/ui/base/ManagedObject",
|
|
11
|
-
"sap/ui/
|
|
12
|
-
"sap/ui/rta/toolbar/Standalone",
|
|
13
|
-
"sap/ui/rta/toolbar/Personalization",
|
|
14
|
-
"sap/ui/rta/toolbar/FioriLike",
|
|
16
|
+
"sap/ui/core/BusyIndicator",
|
|
15
17
|
"sap/ui/dt/DesignTime",
|
|
18
|
+
"sap/ui/dt/DOMUtil",
|
|
19
|
+
"sap/ui/dt/ElementUtil",
|
|
16
20
|
"sap/ui/dt/Overlay",
|
|
17
|
-
"sap/ui/
|
|
18
|
-
"sap/ui/rta/command/LREPSerializer",
|
|
19
|
-
"sap/ui/rta/Utils",
|
|
21
|
+
"sap/ui/dt/OverlayRegistry",
|
|
20
22
|
"sap/ui/dt/Util",
|
|
21
|
-
"sap/ui/
|
|
22
|
-
"sap/ui/fl/
|
|
23
|
-
"sap/ui/fl/
|
|
24
|
-
"sap/ui/fl/LayerUtils",
|
|
25
|
-
"sap/ui/fl/Layer",
|
|
26
|
-
"sap/ui/fl/write/api/ReloadInfoAPI",
|
|
23
|
+
"sap/ui/events/KeyCodes",
|
|
24
|
+
"sap/ui/fl/apply/api/FlexRuntimeInfoAPI",
|
|
25
|
+
"sap/ui/fl/apply/api/SmartVariantManagementApplyAPI",
|
|
27
26
|
"sap/ui/fl/write/api/FeaturesAPI",
|
|
28
|
-
"sap/ui/fl/write/api/VersionsAPI",
|
|
29
27
|
"sap/ui/fl/write/api/PersistenceWriteAPI",
|
|
30
|
-
"sap/
|
|
31
|
-
"sap/
|
|
32
|
-
"sap/ui/
|
|
33
|
-
"sap/ui/
|
|
34
|
-
"sap/ui/
|
|
35
|
-
"sap/ui/
|
|
28
|
+
"sap/ui/fl/write/api/ReloadInfoAPI",
|
|
29
|
+
"sap/ui/fl/write/api/VersionsAPI",
|
|
30
|
+
"sap/ui/fl/Layer",
|
|
31
|
+
"sap/ui/fl/LayerUtils",
|
|
32
|
+
"sap/ui/fl/library",
|
|
33
|
+
"sap/ui/fl/Utils",
|
|
34
|
+
"sap/ui/model/json/JSONModel",
|
|
35
|
+
"sap/ui/performance/Measurement",
|
|
36
36
|
"sap/ui/rta/appVariant/Feature",
|
|
37
|
-
"sap/ui/
|
|
37
|
+
"sap/ui/rta/command/BaseCommand",
|
|
38
|
+
"sap/ui/rta/command/LREPSerializer",
|
|
39
|
+
"sap/ui/rta/command/Stack",
|
|
38
40
|
"sap/ui/rta/service/index",
|
|
41
|
+
"sap/ui/rta/toolbar/Fiori",
|
|
42
|
+
"sap/ui/rta/toolbar/FioriLike",
|
|
43
|
+
"sap/ui/rta/toolbar/Personalization",
|
|
44
|
+
"sap/ui/rta/toolbar/Standalone",
|
|
45
|
+
"sap/ui/rta/util/changeVisualization/ChangeVisualization",
|
|
46
|
+
"sap/ui/rta/util/PluginManager",
|
|
47
|
+
"sap/ui/rta/util/PopupManager",
|
|
39
48
|
"sap/ui/rta/util/ServiceEventBus",
|
|
40
|
-
"sap/ui/dt/OverlayRegistry",
|
|
41
|
-
"sap/base/strings/capitalize",
|
|
42
|
-
"sap/base/util/UriParameters",
|
|
43
|
-
"sap/ui/performance/Measurement",
|
|
44
|
-
"sap/base/Log",
|
|
45
|
-
"sap/ui/events/KeyCodes",
|
|
46
|
-
"sap/ui/model/json/JSONModel",
|
|
47
49
|
"sap/ui/rta/util/validateFlexEnabled",
|
|
48
|
-
"sap/ui/rta/
|
|
50
|
+
"sap/ui/rta/Utils",
|
|
51
|
+
"sap/ui/Device"
|
|
49
52
|
], function(
|
|
53
|
+
capitalize,
|
|
54
|
+
UriParameters,
|
|
55
|
+
Log,
|
|
56
|
+
MessageBox,
|
|
57
|
+
MessageToast,
|
|
50
58
|
jQuery,
|
|
51
59
|
ManagedObject,
|
|
52
|
-
|
|
53
|
-
StandaloneToolbar,
|
|
54
|
-
PersonalizationToolbar,
|
|
55
|
-
FioriLikeToolbar,
|
|
60
|
+
BusyIndicator,
|
|
56
61
|
DesignTime,
|
|
62
|
+
DOMUtil,
|
|
63
|
+
ElementUtil,
|
|
57
64
|
Overlay,
|
|
58
|
-
|
|
59
|
-
LREPSerializer,
|
|
60
|
-
Utils,
|
|
65
|
+
OverlayRegistry,
|
|
61
66
|
DtUtil,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
LayerUtils,
|
|
66
|
-
Layer,
|
|
67
|
-
ReloadInfoAPI,
|
|
67
|
+
KeyCodes,
|
|
68
|
+
FlexRuntimeInfoAPI,
|
|
69
|
+
SmartVariantManagementApplyAPI,
|
|
68
70
|
FeaturesAPI,
|
|
69
|
-
VersionsAPI,
|
|
70
71
|
PersistenceWriteAPI,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
ReloadInfoAPI,
|
|
73
|
+
VersionsAPI,
|
|
74
|
+
Layer,
|
|
75
|
+
LayerUtils,
|
|
76
|
+
flexLibrary,
|
|
77
|
+
FlexUtils,
|
|
78
|
+
JSONModel,
|
|
79
|
+
Measurement,
|
|
77
80
|
RtaAppVariantFeature,
|
|
78
|
-
|
|
81
|
+
BaseCommand,
|
|
82
|
+
LREPSerializer,
|
|
83
|
+
CommandStack,
|
|
79
84
|
ServicesIndex,
|
|
85
|
+
FioriToolbar,
|
|
86
|
+
FioriLikeToolbar,
|
|
87
|
+
PersonalizationToolbar,
|
|
88
|
+
StandaloneToolbar,
|
|
89
|
+
ChangeVisualization,
|
|
90
|
+
PluginManager,
|
|
91
|
+
PopupManager,
|
|
80
92
|
ServiceEventBus,
|
|
81
|
-
OverlayRegistry,
|
|
82
|
-
capitalize,
|
|
83
|
-
UriParameters,
|
|
84
|
-
Measurement,
|
|
85
|
-
Log,
|
|
86
|
-
KeyCodes,
|
|
87
|
-
JSONModel,
|
|
88
93
|
validateFlexEnabled,
|
|
89
|
-
|
|
94
|
+
Utils,
|
|
95
|
+
Device
|
|
90
96
|
) {
|
|
91
97
|
"use strict";
|
|
92
98
|
|
|
@@ -104,7 +110,7 @@ sap.ui.define([
|
|
|
104
110
|
* @class The runtime authoring allows to adapt the fields of a running application.
|
|
105
111
|
* @extends sap.ui.base.ManagedObject
|
|
106
112
|
* @author SAP SE
|
|
107
|
-
* @version 1.
|
|
113
|
+
* @version 1.98.0
|
|
108
114
|
* @constructor
|
|
109
115
|
* @private
|
|
110
116
|
* @since 1.30
|
|
@@ -215,6 +221,7 @@ sap.ui.define([
|
|
|
215
221
|
_sAppTitle: null,
|
|
216
222
|
_dependents: null,
|
|
217
223
|
_sStatus: STOPPED,
|
|
224
|
+
_bHasSwitchedToNavigationMode: false,
|
|
218
225
|
constructor: function() {
|
|
219
226
|
// call parent constructor
|
|
220
227
|
ManagedObject.apply(this, arguments);
|
|
@@ -223,6 +230,7 @@ sap.ui.define([
|
|
|
223
230
|
this._mServices = {};
|
|
224
231
|
this._mCustomServicesDictinary = {};
|
|
225
232
|
this._mUShellServices = {};
|
|
233
|
+
this._pElementModified = Promise.resolve();
|
|
226
234
|
|
|
227
235
|
this.addDependent(new PluginManager(), "pluginManager");
|
|
228
236
|
this.addDependent(new PopupManager(), "popupManager");
|
|
@@ -470,6 +478,9 @@ sap.ui.define([
|
|
|
470
478
|
scope: this.getMetadataScope(),
|
|
471
479
|
plugins: aPlugins
|
|
472
480
|
});
|
|
481
|
+
|
|
482
|
+
addOrRemoveStyleClass(this.getRootControlInstance(), true);
|
|
483
|
+
|
|
473
484
|
//add root control is triggering overlay creation, so we need to wait for the scope to be set.
|
|
474
485
|
this._oDesignTime.addRootElement(this._oRootControl);
|
|
475
486
|
|
|
@@ -497,6 +508,7 @@ sap.ui.define([
|
|
|
497
508
|
// Register function for checking unsaved before leaving RTA
|
|
498
509
|
this._oldUnloadHandler = window.onbeforeunload;
|
|
499
510
|
window.onbeforeunload = this._onUnload.bind(this);
|
|
511
|
+
return undefined;
|
|
500
512
|
}.bind(this))
|
|
501
513
|
.then(function () {
|
|
502
514
|
if (this.getShowToolbars()) {
|
|
@@ -504,6 +516,7 @@ sap.ui.define([
|
|
|
504
516
|
return this._getToolbarButtonsVisibility()
|
|
505
517
|
.then(this._createToolsMenu.bind(this));
|
|
506
518
|
}
|
|
519
|
+
return undefined;
|
|
507
520
|
}.bind(this))
|
|
508
521
|
// this is needed to initially check if undo is available, e.g. when the stack gets initialized with changes
|
|
509
522
|
.then(this._onStackModified.bind(this))
|
|
@@ -522,6 +535,7 @@ sap.ui.define([
|
|
|
522
535
|
// the show() method of the toolbar relies on this RTA instance being set on the PopupManager
|
|
523
536
|
return this.getToolbar().show();
|
|
524
537
|
}
|
|
538
|
+
return undefined;
|
|
525
539
|
}.bind(this))
|
|
526
540
|
.then(function () {
|
|
527
541
|
if (Device.browser.name === "ff") {
|
|
@@ -533,8 +547,6 @@ sap.ui.define([
|
|
|
533
547
|
.then(function() {
|
|
534
548
|
this.fnKeyDown = this._onKeyDown.bind(this);
|
|
535
549
|
jQuery(document).on("keydown", this.fnKeyDown);
|
|
536
|
-
|
|
537
|
-
addOrRemoveStyleClass(this.getRootControlInstance(), true);
|
|
538
550
|
}.bind(this))
|
|
539
551
|
.then(function () {
|
|
540
552
|
this._sStatus = STARTED;
|
|
@@ -552,8 +564,10 @@ sap.ui.define([
|
|
|
552
564
|
this.destroy();
|
|
553
565
|
return Promise.reject(vError);
|
|
554
566
|
}
|
|
567
|
+
return undefined;
|
|
555
568
|
}.bind(this));
|
|
556
569
|
}
|
|
570
|
+
return undefined;
|
|
557
571
|
};
|
|
558
572
|
|
|
559
573
|
function _ffContextMenuHandler() {
|
|
@@ -709,6 +723,7 @@ sap.ui.define([
|
|
|
709
723
|
if (this.getShowToolbars() && this.getToolbar && this.getToolbar()) {
|
|
710
724
|
return this.getToolbar()[sName](vValue);
|
|
711
725
|
}
|
|
726
|
+
return undefined;
|
|
712
727
|
};
|
|
713
728
|
|
|
714
729
|
/**
|
|
@@ -723,17 +738,25 @@ sap.ui.define([
|
|
|
723
738
|
return [];
|
|
724
739
|
};
|
|
725
740
|
|
|
741
|
+
function waitForPendingActions() {
|
|
742
|
+
return Promise.resolve(this._oDesignTime && this._oDesignTime.waitForBusyPlugins())
|
|
743
|
+
.then(function() {
|
|
744
|
+
return this._pElementModified;
|
|
745
|
+
}.bind(this));
|
|
746
|
+
}
|
|
747
|
+
|
|
726
748
|
/**
|
|
727
|
-
*
|
|
749
|
+
* Stops Runtime Authoring
|
|
728
750
|
*
|
|
729
751
|
* @public
|
|
730
|
-
* @param {boolean} bDontSaveChanges -
|
|
731
|
-
* @param {boolean} bSkipRestart -
|
|
732
|
-
* @returns {Promise}
|
|
752
|
+
* @param {boolean} bDontSaveChanges - Stop RTA with or w/o saving changes
|
|
753
|
+
* @param {boolean} bSkipRestart - Stop RTA with or w/o checking if a reload is needed to apply e.g. personalization/app descriptor changes
|
|
754
|
+
* @returns {Promise} Resolves with undefined
|
|
733
755
|
*/
|
|
734
756
|
RuntimeAuthoring.prototype.stop = function(bDontSaveChanges, bSkipRestart) {
|
|
735
757
|
this._checkToolbarAndExecuteFunction("setBusy", true);
|
|
736
|
-
return
|
|
758
|
+
return waitForPendingActions.call(this)
|
|
759
|
+
.then(this._handleReloadOnExit.bind(this, bSkipRestart))
|
|
737
760
|
.then(function(oReloadInfo) {
|
|
738
761
|
return ((bDontSaveChanges) ? Promise.resolve() : this._serializeToLrep(this))
|
|
739
762
|
.then(this._checkToolbarAndExecuteFunction.bind(this, "hide", bDontSaveChanges))
|
|
@@ -745,6 +768,7 @@ sap.ui.define([
|
|
|
745
768
|
oReloadInfo.triggerHardReload = (oReloadInfo.reloadMethod === this._RELOAD.RELOAD_PAGE); // StandAlone or AppDescriptorChanges case
|
|
746
769
|
return this._handleUrlParameterOnExit(oReloadInfo);
|
|
747
770
|
}
|
|
771
|
+
return undefined;
|
|
748
772
|
}.bind(this));
|
|
749
773
|
}.bind(this))
|
|
750
774
|
.catch(fnShowTechnicalError)
|
|
@@ -837,10 +861,12 @@ sap.ui.define([
|
|
|
837
861
|
return this._getTextResources().getText("MSG_UNSAVED_CHANGES");
|
|
838
862
|
}
|
|
839
863
|
window.onbeforeunload = this._oldUnloadHandler;
|
|
864
|
+
return undefined;
|
|
840
865
|
};
|
|
841
866
|
|
|
842
867
|
RuntimeAuthoring.prototype._serializeAndSave = function() {
|
|
843
|
-
|
|
868
|
+
// Save changes on the current layer and discard dirty changes on other layers
|
|
869
|
+
return this._oSerializer.saveCommands(this._oVersionsModel.getProperty("/versioningEnabled"), this.getLayer(), true);
|
|
844
870
|
};
|
|
845
871
|
|
|
846
872
|
RuntimeAuthoring.prototype._serializeToLrep = function() {
|
|
@@ -935,16 +961,16 @@ sap.ui.define([
|
|
|
935
961
|
};
|
|
936
962
|
|
|
937
963
|
RuntimeAuthoring.prototype._onSwitchVersion = function (oEvent) {
|
|
938
|
-
var
|
|
939
|
-
var
|
|
964
|
+
var sVersion = oEvent.getParameter("version");
|
|
965
|
+
var sDisplayedVersion = this._oVersionsModel.getProperty("/displayedVersion");
|
|
940
966
|
|
|
941
|
-
if (
|
|
967
|
+
if (sVersion === sDisplayedVersion) {
|
|
942
968
|
// already displayed version needs no switch
|
|
943
969
|
return;
|
|
944
970
|
}
|
|
945
971
|
|
|
946
972
|
if (this.canUndo()) {
|
|
947
|
-
this.
|
|
973
|
+
this._sSwitchToVersion = sVersion;
|
|
948
974
|
Utils.showMessageBox("warning", "MSG_SWITCH_VERSION_DIALOG", {
|
|
949
975
|
titleKey: "TIT_SWITCH_VERSION_DIALOG",
|
|
950
976
|
actions: [MessageBox.Action.YES, MessageBox.Action.NO, MessageBox.Action.CANCEL],
|
|
@@ -952,22 +978,20 @@ sap.ui.define([
|
|
|
952
978
|
}).then(function (sAction) {
|
|
953
979
|
if (sAction === MessageBox.Action.YES) {
|
|
954
980
|
this._serializeToLrep(this)
|
|
955
|
-
.then(this._switchVersion.bind(this, this.
|
|
981
|
+
.then(this._switchVersion.bind(this, this._sSwitchToVersion));
|
|
956
982
|
} else if (sAction === MessageBox.Action.NO) {
|
|
957
983
|
// avoids the data loss popup; a reload is triggered later and will destroy RTA & the command stack
|
|
958
984
|
this.getCommandStack().removeAllCommands(true);
|
|
959
|
-
this._switchVersion(this.
|
|
985
|
+
this._switchVersion(this._sSwitchToVersion);
|
|
960
986
|
}
|
|
961
987
|
return undefined;
|
|
962
988
|
}.bind(this));
|
|
963
989
|
return;
|
|
964
990
|
}
|
|
965
|
-
this._switchVersion(
|
|
991
|
+
this._switchVersion(sVersion);
|
|
966
992
|
};
|
|
967
993
|
|
|
968
|
-
RuntimeAuthoring.prototype._switchVersion = function (
|
|
969
|
-
var sVersion = nVersion.toString();
|
|
970
|
-
|
|
994
|
+
RuntimeAuthoring.prototype._switchVersion = function (sVersion) {
|
|
971
995
|
RuntimeAuthoring.enableRestart(this.getLayer(), this.getRootControlInstance());
|
|
972
996
|
|
|
973
997
|
if (!FlexUtils.getUshellContainer()) {
|
|
@@ -984,7 +1008,7 @@ sap.ui.define([
|
|
|
984
1008
|
VersionsAPI.loadVersionForApplication({
|
|
985
1009
|
selector: this.getRootControlInstance(),
|
|
986
1010
|
layer: this.getLayer(),
|
|
987
|
-
version:
|
|
1011
|
+
version: sVersion
|
|
988
1012
|
});
|
|
989
1013
|
var aVersionsParameter = mParsedHash.params[sap.ui.fl.Versions.UrlParameter];
|
|
990
1014
|
if (
|
|
@@ -1047,6 +1071,14 @@ sap.ui.define([
|
|
|
1047
1071
|
return oToolbar.onFragmentLoaded().then(function() {
|
|
1048
1072
|
var bSaveAsAvailable = aButtonsVisibility.saveAsAvailable;
|
|
1049
1073
|
var bExtendedOverview = bSaveAsAvailable && RtaAppVariantFeature.isOverviewExtended();
|
|
1074
|
+
var oUriParameters = UriParameters.fromURL(window.location.href);
|
|
1075
|
+
// the "Visualization" tab should not be visible if the "fiori-tools-rta-mode" URL-parameter is set to any value but "false"
|
|
1076
|
+
var bVisualizationButtonVisible;
|
|
1077
|
+
if (oUriParameters.has("fiori-tools-rta-mode") && oUriParameters.get("fiori-tools-rta-mode") !== "false") {
|
|
1078
|
+
bVisualizationButtonVisible = false;
|
|
1079
|
+
} else {
|
|
1080
|
+
bVisualizationButtonVisible = true;
|
|
1081
|
+
}
|
|
1050
1082
|
|
|
1051
1083
|
this._oToolbarControlsModel = new JSONModel({
|
|
1052
1084
|
undoEnabled: false,
|
|
@@ -1062,7 +1094,8 @@ sap.ui.define([
|
|
|
1062
1094
|
saveAsEnabled: false,
|
|
1063
1095
|
manageAppsVisible: bSaveAsAvailable && !bExtendedOverview,
|
|
1064
1096
|
manageAppsEnabled: bSaveAsAvailable && !bExtendedOverview,
|
|
1065
|
-
modeSwitcher: this.getMode()
|
|
1097
|
+
modeSwitcher: this.getMode(),
|
|
1098
|
+
visualizationButtonVisible: bVisualizationButtonVisible
|
|
1066
1099
|
});
|
|
1067
1100
|
|
|
1068
1101
|
if (bSaveAsAvailable) {
|
|
@@ -1073,12 +1106,13 @@ sap.ui.define([
|
|
|
1073
1106
|
}.bind(this));
|
|
1074
1107
|
}
|
|
1075
1108
|
|
|
1076
|
-
/*
|
|
1077
|
-
FeaturesAPI.isKeyUserTranslationEnabled(this.getLayer()).then(function(
|
|
1078
|
-
this._oToolbarControlsModel.setProperty("/translationVisible",
|
|
1109
|
+
/*
|
|
1110
|
+
FeaturesAPI.isKeyUserTranslationEnabled(this.getLayer()).then(function() {
|
|
1111
|
+
this._oToolbarControlsModel.setProperty("/translationVisible", true);
|
|
1079
1112
|
}.bind(this));
|
|
1080
1113
|
*/
|
|
1081
1114
|
|
|
1115
|
+
|
|
1082
1116
|
this.getToolbar().setModel(this._oVersionsModel, "versions");
|
|
1083
1117
|
this.getToolbar().setModel(this._oToolbarControlsModel, "controls");
|
|
1084
1118
|
}.bind(this));
|
|
@@ -1141,8 +1175,9 @@ sap.ui.define([
|
|
|
1141
1175
|
BusyIndicator.show(500);
|
|
1142
1176
|
return this._serializeToLrep().then(function () {
|
|
1143
1177
|
BusyIndicator.hide();
|
|
1144
|
-
var
|
|
1145
|
-
|
|
1178
|
+
var bVariantByStartupParameter = FlexUtils.isVariantByStartupParameter(this._oRootControl);
|
|
1179
|
+
var bAppVariantRunning = SmartVariantManagementApplyAPI.isApplicationVariant({control: this._oRootControl}) && !bVariantByStartupParameter;
|
|
1180
|
+
return (bAppVariantRunning ? RtaAppVariantFeature.getAppVariantDescriptor(this._oRootControl) : Promise.resolve())
|
|
1146
1181
|
.then(function(oAppVariantDescriptor) {
|
|
1147
1182
|
var aAppVariantDescriptor = [];
|
|
1148
1183
|
if (oAppVariantDescriptor) {
|
|
@@ -1214,13 +1249,14 @@ sap.ui.define([
|
|
|
1214
1249
|
|
|
1215
1250
|
/**
|
|
1216
1251
|
* Shows a message toast.
|
|
1217
|
-
* @param {string} sMessageKey The text key for the message
|
|
1252
|
+
* @param {string} sMessageKey - The text key for the message
|
|
1253
|
+
* @param {object} mOptions - Options for message toast
|
|
1218
1254
|
* @private
|
|
1219
1255
|
*/
|
|
1220
|
-
RuntimeAuthoring.prototype._showMessageToast = function(sMessageKey) {
|
|
1256
|
+
RuntimeAuthoring.prototype._showMessageToast = function(sMessageKey, mOptions) {
|
|
1221
1257
|
var sMessage = this._getTextResources().getText(sMessageKey);
|
|
1222
1258
|
|
|
1223
|
-
MessageToast.show(sMessage);
|
|
1259
|
+
MessageToast.show(sMessage, mOptions || {});
|
|
1224
1260
|
};
|
|
1225
1261
|
|
|
1226
1262
|
/**
|
|
@@ -1228,7 +1264,7 @@ sap.ui.define([
|
|
|
1228
1264
|
*
|
|
1229
1265
|
* @public
|
|
1230
1266
|
* @static
|
|
1231
|
-
* @param {
|
|
1267
|
+
* @param {sap.ui.fl.Layer} sLayer - Active layer
|
|
1232
1268
|
* @returns {boolean} Returns true if restart is needed
|
|
1233
1269
|
*/
|
|
1234
1270
|
RuntimeAuthoring.needsRestart = function(sLayer) {
|
|
@@ -1241,11 +1277,11 @@ sap.ui.define([
|
|
|
1241
1277
|
*
|
|
1242
1278
|
* @public
|
|
1243
1279
|
* @static
|
|
1244
|
-
* @param {
|
|
1245
|
-
* @param {sap.ui.core.Control} oRootControl -
|
|
1280
|
+
* @param {sap.ui.fl.Layer} sLayer - Active layer
|
|
1281
|
+
* @param {sap.ui.core.Control} oRootControl - Root control for which RTA was started
|
|
1246
1282
|
*/
|
|
1247
1283
|
RuntimeAuthoring.enableRestart = function(sLayer, oRootControl) {
|
|
1248
|
-
var sFlexReference =
|
|
1284
|
+
var sFlexReference = FlexRuntimeInfoAPI.getFlexReference({element: oRootControl});
|
|
1249
1285
|
var vParameter = sFlexReference || true;
|
|
1250
1286
|
window.sessionStorage.setItem("sap.ui.rta.restart." + sLayer, vParameter);
|
|
1251
1287
|
};
|
|
@@ -1255,7 +1291,7 @@ sap.ui.define([
|
|
|
1255
1291
|
*
|
|
1256
1292
|
* @public
|
|
1257
1293
|
* @static
|
|
1258
|
-
* @param {
|
|
1294
|
+
* @param {sap.ui.fl.Layer} sLayer - Active layer
|
|
1259
1295
|
*/
|
|
1260
1296
|
RuntimeAuthoring.disableRestart = function(sLayer) {
|
|
1261
1297
|
window.sessionStorage.removeItem("sap.ui.rta.restart." + sLayer);
|
|
@@ -1381,35 +1417,38 @@ sap.ui.define([
|
|
|
1381
1417
|
* @private
|
|
1382
1418
|
*/
|
|
1383
1419
|
RuntimeAuthoring.prototype._handleElementModified = function(oEvent) {
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
var vAction = oEvent.getParameter("action");
|
|
1420
|
+
// events are synchronously reset after the handlers are called
|
|
1421
|
+
var oCommand = oEvent.getParameter("command");
|
|
1387
1422
|
var sNewControlID = oEvent.getParameter("newControlId");
|
|
1423
|
+
var vAction = oEvent.getParameter("action");
|
|
1388
1424
|
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
fnSelect
|
|
1425
|
+
this._pElementModified = this._pElementModified.then(function() {
|
|
1426
|
+
this.getPluginManager().handleStopCutPaste();
|
|
1427
|
+
|
|
1428
|
+
if (oCommand instanceof BaseCommand) {
|
|
1429
|
+
if (sNewControlID) {
|
|
1430
|
+
this._scheduleOnCreated(sNewControlID, function (oElementOverlay) {
|
|
1431
|
+
var oDesignTimeMetadata = oElementOverlay.getDesignTimeMetadata();
|
|
1432
|
+
var fnSelect = oDesignTimeMetadata.getData().select;
|
|
1433
|
+
if (typeof fnSelect === "function") {
|
|
1434
|
+
fnSelect(oElementOverlay.getElement());
|
|
1435
|
+
}
|
|
1436
|
+
});
|
|
1437
|
+
if (vAction) {
|
|
1438
|
+
this._scheduleRenameOnCreatedContainer(vAction, sNewControlID);
|
|
1397
1439
|
}
|
|
1398
|
-
});
|
|
1399
|
-
if (vAction) {
|
|
1400
|
-
this._scheduleRenameOnCreatedContainer(vAction, sNewControlID);
|
|
1401
1440
|
}
|
|
1441
|
+
return this.getCommandStack().pushAndExecute(oCommand)
|
|
1442
|
+
// Error handling when a command fails is done in the Stack
|
|
1443
|
+
.catch(function(oError) {
|
|
1444
|
+
if (oError && oError.message && oError.message.indexOf("The following Change cannot be applied because of a dependency") > -1) {
|
|
1445
|
+
Utils.showMessageBox("error", "MSG_DEPENDENCY_ERROR", {error: oError});
|
|
1446
|
+
}
|
|
1447
|
+
Log.error("sap.ui.rta: " + oError.message);
|
|
1448
|
+
});
|
|
1402
1449
|
}
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
.catch(function(oError) {
|
|
1406
|
-
if (oError && oError.message && oError.message.indexOf("The following Change cannot be applied because of a dependency") > -1) {
|
|
1407
|
-
Utils.showMessageBox("error", "MSG_DEPENDENCY_ERROR", {error: oError});
|
|
1408
|
-
}
|
|
1409
|
-
Log.error("sap.ui.rta: " + oError.message);
|
|
1410
|
-
});
|
|
1411
|
-
}
|
|
1412
|
-
return Promise.resolve();
|
|
1450
|
+
}.bind(this));
|
|
1451
|
+
return this._pElementModified;
|
|
1413
1452
|
};
|
|
1414
1453
|
|
|
1415
1454
|
/**
|
|
@@ -1509,6 +1548,7 @@ sap.ui.define([
|
|
|
1509
1548
|
if (oReloadInfo.triggerHardReload) {
|
|
1510
1549
|
this._reloadPage();
|
|
1511
1550
|
}
|
|
1551
|
+
return undefined;
|
|
1512
1552
|
};
|
|
1513
1553
|
|
|
1514
1554
|
/**
|
|
@@ -1584,6 +1624,7 @@ sap.ui.define([
|
|
|
1584
1624
|
if (oReloadInfo.allContexts) {
|
|
1585
1625
|
return "MSG_RELOAD_WITHOUT_ALL_CONTEXT";
|
|
1586
1626
|
}
|
|
1627
|
+
return undefined;
|
|
1587
1628
|
};
|
|
1588
1629
|
|
|
1589
1630
|
/**
|
|
@@ -1624,24 +1665,25 @@ sap.ui.define([
|
|
|
1624
1665
|
if (!sReason) {
|
|
1625
1666
|
return Promise.resolve();
|
|
1626
1667
|
}
|
|
1627
|
-
|
|
1628
|
-
.
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1668
|
+
// showing messages in visual editor is leading to blocked screen. In this case we should reload without message
|
|
1669
|
+
return (this.getFlexSettings().developerMode ? Promise.resolve() : Utils.showMessageBox("information", sReason))
|
|
1670
|
+
.then(function() {
|
|
1671
|
+
RuntimeAuthoring.enableRestart(oReloadInfo.layer, this.getRootControlInstance());
|
|
1672
|
+
// allContexts do not change the url parameter to trigger a reload
|
|
1673
|
+
if (
|
|
1674
|
+
oReloadInfo.allContexts &&
|
|
1675
|
+
!oReloadInfo.hasHigherLayerChanges &&
|
|
1676
|
+
this._getUShellService("AppLifeCycle")
|
|
1677
|
+
) {
|
|
1678
|
+
this._getUShellService("AppLifeCycle").reloadCurrentApp();
|
|
1679
|
+
}
|
|
1680
|
+
if (FlexUtils.getUshellContainer()) {
|
|
1681
|
+
// clears FlexState and triggers reloading of the flex data without blocking
|
|
1682
|
+
var oParsedHash = ReloadInfoAPI.handleParametersOnStart(oReloadInfo);
|
|
1683
|
+
return this._triggerCrossAppNavigation(oParsedHash);
|
|
1684
|
+
}
|
|
1685
|
+
return this._triggerHardReload(oReloadInfo);
|
|
1686
|
+
}.bind(this));
|
|
1645
1687
|
};
|
|
1646
1688
|
|
|
1647
1689
|
/**
|
|
@@ -1746,6 +1788,13 @@ sap.ui.define([
|
|
|
1746
1788
|
oTabHandlingPlugin[(sNewMode === "navigation") ? "restoreTabIndex" : "removeTabIndex"]();
|
|
1747
1789
|
}
|
|
1748
1790
|
|
|
1791
|
+
if (sNewMode === "navigation" && !this._bHasSwitchedToNavigationMode) {
|
|
1792
|
+
this._showMessageToast("MSG_NAVIGATION_MODE_CHANGES_WARNING", {
|
|
1793
|
+
duration: 5000
|
|
1794
|
+
});
|
|
1795
|
+
this._bHasSwitchedToNavigationMode = true;
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1749
1798
|
oTabHandlingPlugin[(sNewMode === "adaptation") ? "restoreOverlayTabIndex" : "removeOverlayTabIndex"]();
|
|
1750
1799
|
oSelectionPlugin.setIsActive(!(sNewMode === "visualization"));
|
|
1751
1800
|
|
|
@@ -1781,6 +1830,7 @@ sap.ui.define([
|
|
|
1781
1830
|
if (ServicesIndex.hasOwnProperty(sName)) {
|
|
1782
1831
|
return ServicesIndex[sName].replace(/\./g, "/");
|
|
1783
1832
|
}
|
|
1833
|
+
return undefined;
|
|
1784
1834
|
}
|
|
1785
1835
|
|
|
1786
1836
|
/**
|
package/src/sap/ui/rta/Utils.js
CHANGED
|
@@ -45,10 +45,9 @@ sap.ui.define([
|
|
|
45
45
|
if (xhr.status >= 200 && xhr.status < 400) {
|
|
46
46
|
resolve(xhr.response);
|
|
47
47
|
} else {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
});
|
|
48
|
+
var oError = new Error(xhr.statusText);
|
|
49
|
+
oError.status = xhr.status;
|
|
50
|
+
reject(oError);
|
|
52
51
|
}
|
|
53
52
|
};
|
|
54
53
|
});
|
|
@@ -12,7 +12,8 @@ sap.ui.define([
|
|
|
12
12
|
"sap/ui/fl/registry/Settings",
|
|
13
13
|
"sap/ui/fl/write/_internal/appVariant/AppVariantFactory",
|
|
14
14
|
"sap/ui/fl/write/api/FeaturesAPI",
|
|
15
|
-
"sap/base/util/merge"
|
|
15
|
+
"sap/base/util/merge",
|
|
16
|
+
"sap/base/Log"
|
|
16
17
|
], function(
|
|
17
18
|
FlexUtils,
|
|
18
19
|
AppVariantUtils,
|
|
@@ -21,7 +22,8 @@ sap.ui.define([
|
|
|
21
22
|
Settings,
|
|
22
23
|
AppVariantFactory,
|
|
23
24
|
FeaturesAPI,
|
|
24
|
-
merge
|
|
25
|
+
merge,
|
|
26
|
+
Log
|
|
25
27
|
) {
|
|
26
28
|
"use strict";
|
|
27
29
|
|
|
@@ -148,9 +150,8 @@ sap.ui.define([
|
|
|
148
150
|
return AppVariantUtils.getManifirstSupport(oDescriptor["sap.app"].id).then(function(oResult) {
|
|
149
151
|
return oResult.response;
|
|
150
152
|
}).catch(function(oError) {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
return AppVariantUtils.showRelevantDialog(oErrorInfo, false);
|
|
153
|
+
Log.error("Response status code is: " + oError.status, "Stacktrace: " + oError.stack);
|
|
154
|
+
return false;
|
|
154
155
|
});
|
|
155
156
|
},
|
|
156
157
|
/**
|