@openui5/sap.ui.rta 1.133.1 → 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/.reuse/dep5 +0 -7
- package/THIRDPARTY.txt +2 -23
- 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 +38 -17
- package/src/sap/ui/rta/Utils.js +11 -1
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +26 -26
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +0 -4
- package/src/sap/ui/rta/appVariant/Feature.js +85 -91
- package/src/sap/ui/rta/appVariant/Utils.js +50 -56
- 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 -7
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +22 -7
- package/src/sap/ui/rta/messagebundle_ar.properties +3 -1
- package/src/sap/ui/rta/messagebundle_bg.properties +4 -2
- package/src/sap/ui/rta/messagebundle_ca.properties +3 -1
- package/src/sap/ui/rta/messagebundle_cnr.properties +4 -2
- package/src/sap/ui/rta/messagebundle_cs.properties +3 -1
- package/src/sap/ui/rta/messagebundle_cy.properties +3 -1
- package/src/sap/ui/rta/messagebundle_da.properties +4 -2
- package/src/sap/ui/rta/messagebundle_de.properties +3 -1
- package/src/sap/ui/rta/messagebundle_el.properties +3 -1
- package/src/sap/ui/rta/messagebundle_en.properties +3 -1
- package/src/sap/ui/rta/messagebundle_en_GB.properties +3 -1
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +10 -2
- package/src/sap/ui/rta/messagebundle_es.properties +3 -1
- package/src/sap/ui/rta/messagebundle_es_MX.properties +4 -2
- package/src/sap/ui/rta/messagebundle_et.properties +3 -1
- package/src/sap/ui/rta/messagebundle_fi.properties +4 -2
- package/src/sap/ui/rta/messagebundle_fr.properties +12 -10
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +7 -5
- package/src/sap/ui/rta/messagebundle_hi.properties +3 -1
- package/src/sap/ui/rta/messagebundle_hr.properties +34 -32
- package/src/sap/ui/rta/messagebundle_hu.properties +3 -1
- package/src/sap/ui/rta/messagebundle_id.properties +3 -1
- package/src/sap/ui/rta/messagebundle_it.properties +48 -46
- package/src/sap/ui/rta/messagebundle_iw.properties +3 -1
- package/src/sap/ui/rta/messagebundle_ja.properties +3 -1
- package/src/sap/ui/rta/messagebundle_kk.properties +3 -1
- package/src/sap/ui/rta/messagebundle_ko.properties +3 -1
- package/src/sap/ui/rta/messagebundle_lt.properties +3 -1
- package/src/sap/ui/rta/messagebundle_lv.properties +3 -1
- package/src/sap/ui/rta/messagebundle_mk.properties +3 -1
- package/src/sap/ui/rta/messagebundle_ms.properties +3 -1
- package/src/sap/ui/rta/messagebundle_nl.properties +3 -1
- package/src/sap/ui/rta/messagebundle_no.properties +3 -1
- package/src/sap/ui/rta/messagebundle_pl.properties +3 -1
- package/src/sap/ui/rta/messagebundle_pt.properties +3 -1
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +3 -1
- package/src/sap/ui/rta/messagebundle_ro.properties +3 -1
- package/src/sap/ui/rta/messagebundle_ru.properties +3 -1
- package/src/sap/ui/rta/messagebundle_sh.properties +4 -2
- package/src/sap/ui/rta/messagebundle_sk.properties +3 -1
- package/src/sap/ui/rta/messagebundle_sl.properties +3 -1
- package/src/sap/ui/rta/messagebundle_sr.properties +4 -2
- package/src/sap/ui/rta/messagebundle_sv.properties +3 -1
- package/src/sap/ui/rta/messagebundle_th.properties +3 -1
- package/src/sap/ui/rta/messagebundle_tr.properties +3 -1
- package/src/sap/ui/rta/messagebundle_uk.properties +3 -1
- package/src/sap/ui/rta/messagebundle_vi.properties +3 -1
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +3 -1
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +3 -1
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +41 -35
- package/src/sap/ui/rta/plugin/AddXMLPlugin.js +168 -0
- 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 +7 -4
- 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 +2 -2
- 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 +38 -51
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +85 -47
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +97 -33
- package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +72 -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/Animation.js +1 -1
- package/src/sap/ui/rta/util/BindingsExtractor.js +1 -1
- package/src/sap/ui/rta/util/PluginManager.js +5 -7
- 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/isReuseComponent.js +44 -0
- package/src/sap/ui/rta/util/validateText.js +1 -1
- package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +1 -1
- package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +12 -7
- package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +0 -5
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +0 -114
|
@@ -6,27 +6,40 @@
|
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/base/Log",
|
|
9
|
+
"sap/ui/base/DesignTime",
|
|
10
|
+
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
9
11
|
"sap/ui/dt/Util",
|
|
12
|
+
"sap/ui/fl/write/api/PersistenceWriteAPI",
|
|
13
|
+
"sap/ui/fl/Utils",
|
|
10
14
|
"sap/ui/rta/plugin/annotations/AnnotationChangeDialog",
|
|
15
|
+
"sap/ui/rta/plugin/annotations/AnnotationTypes",
|
|
11
16
|
"sap/ui/rta/plugin/Plugin"
|
|
12
17
|
], function(
|
|
13
18
|
BaseLog,
|
|
19
|
+
DesignTime,
|
|
20
|
+
JsControlTreeModifier,
|
|
14
21
|
DtUtil,
|
|
22
|
+
PersistenceWriteAPI,
|
|
23
|
+
Utils,
|
|
15
24
|
AnnotationChangeDialog,
|
|
25
|
+
AnnotationTypes,
|
|
16
26
|
Plugin
|
|
17
27
|
) {
|
|
18
28
|
"use strict";
|
|
19
29
|
|
|
20
|
-
async function handleCompositeCommand(oElement, oAction,
|
|
30
|
+
async function handleCompositeCommand(oElement, oAction, aAnnotationChanges, aLegacyRenameChanges) {
|
|
21
31
|
const oCompositeCommand = await this.getCommandFactory().getCommandFor(oElement, "composite");
|
|
22
|
-
for (const oChange of
|
|
32
|
+
for (const oChange of aAnnotationChanges) {
|
|
33
|
+
// aLegacyRenameChanges is only passed for singleRename scenarios, where there is only one annotation change to be saved
|
|
34
|
+
// so we can simply add it in the loop
|
|
23
35
|
const oAnnotationCommand = await this.getCommandFactory().getCommandFor(
|
|
24
36
|
oElement,
|
|
25
37
|
"annotation",
|
|
26
38
|
{
|
|
27
39
|
changeType: oAction.changeType,
|
|
28
40
|
serviceUrl: oChange.serviceUrl,
|
|
29
|
-
content: oChange.content
|
|
41
|
+
content: {...oChange.content, objectTemplateInfo: oAction.objectTemplateInfo},
|
|
42
|
+
changesToDelete: aLegacyRenameChanges
|
|
30
43
|
}
|
|
31
44
|
);
|
|
32
45
|
oCompositeCommand.addCommand(oAnnotationCommand);
|
|
@@ -34,8 +47,7 @@ sap.ui.define([
|
|
|
34
47
|
|
|
35
48
|
if (oCompositeCommand.getCommands().length > 0) {
|
|
36
49
|
this.fireElementModified({
|
|
37
|
-
command: oCompositeCommand
|
|
38
|
-
hasAnnotationCommand: true
|
|
50
|
+
command: oCompositeCommand
|
|
39
51
|
});
|
|
40
52
|
}
|
|
41
53
|
}
|
|
@@ -57,7 +69,7 @@ sap.ui.define([
|
|
|
57
69
|
}
|
|
58
70
|
|
|
59
71
|
function getActionIcon(oAnnotationAction) {
|
|
60
|
-
const sDefaultIcon = "sap-icon://request";
|
|
72
|
+
const sDefaultIcon = oAnnotationAction.type === AnnotationTypes.StringType ? "sap-icon://edit" : "sap-icon://request";
|
|
61
73
|
const sActionIcon = oAnnotationAction.icon;
|
|
62
74
|
if (!sActionIcon) {
|
|
63
75
|
return sDefaultIcon;
|
|
@@ -69,6 +81,14 @@ sap.ui.define([
|
|
|
69
81
|
return sActionIcon;
|
|
70
82
|
}
|
|
71
83
|
|
|
84
|
+
function checkDesigntimeActionProperties(oAction) {
|
|
85
|
+
if (oAction.singleRename && !oAction.controlBasedRenameChangeType) {
|
|
86
|
+
BaseLog.error("When using singleRename, controlBasedRenameChangeType must also be defined");
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
|
|
72
92
|
/**
|
|
73
93
|
* Constructor for a new Annotation Plugin.
|
|
74
94
|
* Multiple annotation actions can be defined for the same overlay. Each action is represented by a menu item.
|
|
@@ -80,7 +100,7 @@ sap.ui.define([
|
|
|
80
100
|
* @class
|
|
81
101
|
* @extends sap.ui.rta.plugin.Plugin
|
|
82
102
|
* @author SAP SE
|
|
83
|
-
* @version 1.
|
|
103
|
+
* @version 1.135.0
|
|
84
104
|
* @constructor
|
|
85
105
|
* @private
|
|
86
106
|
* @since 1.132
|
|
@@ -95,7 +115,8 @@ sap.ui.define([
|
|
|
95
115
|
}
|
|
96
116
|
});
|
|
97
117
|
|
|
98
|
-
const
|
|
118
|
+
const sPluginIdDefault = "CTX_ANNOTATION";
|
|
119
|
+
const sPluginIdSingleLabelChange = "CTX_ANNOTATION_CHANGE_SINGLE_LABEL";
|
|
99
120
|
|
|
100
121
|
AnnotationPlugin.prototype.init = function(...aArgs) {
|
|
101
122
|
Plugin.prototype.init.apply(this, aArgs);
|
|
@@ -108,6 +129,12 @@ sap.ui.define([
|
|
|
108
129
|
* @private
|
|
109
130
|
*/
|
|
110
131
|
AnnotationPlugin.prototype._isEditable = function(oElementOverlay) {
|
|
132
|
+
// Currently annotation changes are not supported for developers,
|
|
133
|
+
// because the changes are not guaranteed to be loaded in time to be properly applied
|
|
134
|
+
if (DesignTime.isDesignModeEnabled()) {
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
|
|
111
138
|
const oActions = this.getAction(oElementOverlay);
|
|
112
139
|
|
|
113
140
|
if (oActions) {
|
|
@@ -127,6 +154,10 @@ sap.ui.define([
|
|
|
127
154
|
* @public
|
|
128
155
|
*/
|
|
129
156
|
AnnotationPlugin.prototype.isEnabled = function(aElementOverlays) {
|
|
157
|
+
if (aElementOverlays.length !== 1) {
|
|
158
|
+
return false;
|
|
159
|
+
}
|
|
160
|
+
|
|
130
161
|
const oElementOverlay = aElementOverlays[0];
|
|
131
162
|
const oResponsibleElementOverlay = this.getResponsibleElementOverlay(oElementOverlay);
|
|
132
163
|
const oActions = this.getAction(oResponsibleElementOverlay);
|
|
@@ -157,17 +188,32 @@ sap.ui.define([
|
|
|
157
188
|
const oElement = oElementOverlay.getElement();
|
|
158
189
|
|
|
159
190
|
try {
|
|
160
|
-
const
|
|
191
|
+
const aAnnotationChanges = await this._oDialog.openDialogAndHandleChanges({
|
|
161
192
|
title: getActionText(oElementOverlay, oAction),
|
|
162
193
|
type: oAction.type,
|
|
163
194
|
control: oElement,
|
|
164
195
|
delegate: oAction.delegate,
|
|
165
196
|
annotation: oAction.annotation,
|
|
166
|
-
description: oAction.description
|
|
197
|
+
description: oAction.description,
|
|
198
|
+
singleRename: oAction.singleRename,
|
|
199
|
+
controlBasedRenameChangeType: oAction.controlBasedRenameChangeType
|
|
167
200
|
});
|
|
168
201
|
|
|
169
|
-
if (
|
|
170
|
-
|
|
202
|
+
if (aAnnotationChanges.length) {
|
|
203
|
+
const aLegacyRenameChanges = [];
|
|
204
|
+
// for single rename scenarios we are able to remove any existing control based rename change in the context of
|
|
205
|
+
// the given control and change type
|
|
206
|
+
if (oAction.singleRename) {
|
|
207
|
+
const aUIChanges = await PersistenceWriteAPI._getUIChanges({
|
|
208
|
+
selector: oElement
|
|
209
|
+
});
|
|
210
|
+
const oAppComponent = Utils.getAppComponentForControl(oElement);
|
|
211
|
+
aLegacyRenameChanges.push(...aUIChanges.filter((oChange) =>
|
|
212
|
+
oChange.getChangeType() === oAction.controlBasedRenameChangeType
|
|
213
|
+
&& JsControlTreeModifier.getControlIdBySelector(oChange.getSelector(), oAppComponent) === oElement.getId()
|
|
214
|
+
));
|
|
215
|
+
}
|
|
216
|
+
return handleCompositeCommand.call(this, oElement, oAction, aAnnotationChanges, aLegacyRenameChanges);
|
|
171
217
|
}
|
|
172
218
|
return undefined;
|
|
173
219
|
} catch (vError) {
|
|
@@ -175,7 +221,7 @@ sap.ui.define([
|
|
|
175
221
|
vError,
|
|
176
222
|
"AnnotationPlugin#handler",
|
|
177
223
|
"Error occurred during handler execution",
|
|
178
|
-
"sap.ui.rta.plugin.annotations.
|
|
224
|
+
"sap.ui.rta.plugin.annotations.AnnotationPlugin"
|
|
179
225
|
);
|
|
180
226
|
}
|
|
181
227
|
};
|
|
@@ -193,16 +239,19 @@ sap.ui.define([
|
|
|
193
239
|
|
|
194
240
|
const aMenuItems = [];
|
|
195
241
|
if (oAnnotationActionMap) {
|
|
196
|
-
const iRank = this.getRank(sPluginId);
|
|
197
|
-
|
|
198
242
|
if (this._isEditableByPlugin(oResponsibleElementOverlay) === undefined) {
|
|
199
243
|
// The responsibleElement editableByPlugin state was not evaluated yet e.g. because it
|
|
200
244
|
// has no visible geometry, thus evaluateEditable now
|
|
201
245
|
await this.evaluateEditable([oResponsibleElementOverlay], { onRegistration: false });
|
|
202
246
|
}
|
|
203
|
-
Object.
|
|
247
|
+
Object.entries(oAnnotationActionMap).forEach(function([sKey, oAction], iIndex) {
|
|
248
|
+
const sPluginId = oAction.type === AnnotationTypes.StringType && oAction.singleRename
|
|
249
|
+
? sPluginIdSingleLabelChange
|
|
250
|
+
: sPluginIdDefault;
|
|
251
|
+
const iRank = this.getRank(sPluginId);
|
|
204
252
|
if (
|
|
205
253
|
this.isAvailable([oResponsibleElementOverlay])
|
|
254
|
+
&& checkDesigntimeActionProperties(oAction)
|
|
206
255
|
) {
|
|
207
256
|
const sActionText = getActionText(oResponsibleElementOverlay, oAction);
|
|
208
257
|
if (!sActionText) {
|
|
@@ -210,7 +259,7 @@ sap.ui.define([
|
|
|
210
259
|
}
|
|
211
260
|
|
|
212
261
|
aMenuItems.push({
|
|
213
|
-
id: sPluginId
|
|
262
|
+
id: `${sPluginId}_${sKey}`,
|
|
214
263
|
rank: iRank + iIndex,
|
|
215
264
|
text: sActionText,
|
|
216
265
|
icon: getActionIcon(oAction),
|
|
@@ -235,5 +284,11 @@ sap.ui.define([
|
|
|
235
284
|
return "annotation";
|
|
236
285
|
};
|
|
237
286
|
|
|
287
|
+
AnnotationPlugin.prototype.destroy = function(...args) {
|
|
288
|
+
Plugin.prototype.destroy.apply(this, args);
|
|
289
|
+
this._oDialog.destroy();
|
|
290
|
+
delete this._oDialog;
|
|
291
|
+
};
|
|
292
|
+
|
|
238
293
|
return AnnotationPlugin;
|
|
239
294
|
});
|
|
@@ -119,7 +119,7 @@ sap.ui.define([
|
|
|
119
119
|
* @class The AddIFrame allows trigger AddIFrame operations on the overlay.
|
|
120
120
|
* @extends sap.ui.rta.plugin.BaseCreate
|
|
121
121
|
* @author SAP SE
|
|
122
|
-
* @version 1.
|
|
122
|
+
* @version 1.135.0
|
|
123
123
|
* @constructor
|
|
124
124
|
* @private
|
|
125
125
|
* @since 1.75
|
|
@@ -30,7 +30,7 @@ sap.ui.define([
|
|
|
30
30
|
* @name sap.ui.rta.service.ControllerExtension
|
|
31
31
|
* @author SAP SE
|
|
32
32
|
* @since 1.58
|
|
33
|
-
* @version 1.
|
|
33
|
+
* @version 1.135.0
|
|
34
34
|
* @private
|
|
35
35
|
* @ui5-restricted
|
|
36
36
|
*/
|
|
@@ -62,11 +62,17 @@ sap.ui.define([
|
|
|
62
62
|
add(sCodeRef, sViewId) {
|
|
63
63
|
var oFlexSettings = oRta.getFlexSettings();
|
|
64
64
|
if (!oFlexSettings.developerMode) {
|
|
65
|
-
throw DtUtil.createError(
|
|
65
|
+
throw DtUtil.createError(
|
|
66
|
+
"service.ControllerExtension#add", "code extensions can only be created in developer mode",
|
|
67
|
+
"sap.ui.rta"
|
|
68
|
+
);
|
|
66
69
|
}
|
|
67
70
|
|
|
68
71
|
if (!sCodeRef) {
|
|
69
|
-
throw DtUtil.createError(
|
|
72
|
+
throw DtUtil.createError(
|
|
73
|
+
"service.ControllerExtension#add", "can't create controller extension without codeRef",
|
|
74
|
+
"sap.ui.rta"
|
|
75
|
+
);
|
|
70
76
|
}
|
|
71
77
|
|
|
72
78
|
if (!sCodeRef.endsWith(".js")) {
|
|
@@ -75,7 +81,7 @@ sap.ui.define([
|
|
|
75
81
|
|
|
76
82
|
var oView = Element.getElementById(sViewId);
|
|
77
83
|
var oAppComponent = FlexUtils.getAppComponentForControl(oView);
|
|
78
|
-
var sControllerName = oView.
|
|
84
|
+
var sControllerName = oView.getControllerModuleName() ? `module:${oView.getControllerModuleName()}` : oView.getController()?.getMetadata().getName();
|
|
79
85
|
// Calculate moduleName for code extension
|
|
80
86
|
var sReference = FlexRuntimeInfoAPI.getFlexReference({element: oAppComponent});
|
|
81
87
|
var sModuleName = sReference.replace(/\.Component/g, "").replace(/\./g, "/");
|
|
@@ -20,14 +20,32 @@
|
|
|
20
20
|
class="sapUiRtaVersionButton"
|
|
21
21
|
icon="sap-icon://megamenu"
|
|
22
22
|
iconFirst="false"
|
|
23
|
-
visible="{= (${versions>/versioningEnabled} && ${controls>/modeSwitcher} === 'adaptation')}"
|
|
23
|
+
visible="{= (${versions>/versioningEnabled} && ${controls>/modeSwitcher} === 'adaptation' && ${controls>/changesNeedHardReload} === false)}"
|
|
24
24
|
text="{parts: [{path: 'versions>/versions'}, {path: 'versions>/displayedVersion'}], formatter: '.formatVersionButtonText'}"
|
|
25
|
-
tooltip="{
|
|
25
|
+
tooltip="{i18n>TOL_SHOW_VERSION_HISTORY}"
|
|
26
26
|
press=".showVersionHistory">
|
|
27
27
|
<layoutData>
|
|
28
28
|
<OverflowToolbarLayoutData priority="NeverOverflow"/>
|
|
29
29
|
</layoutData>
|
|
30
30
|
</Button>
|
|
31
|
+
<Button
|
|
32
|
+
id="sapUiRta_hardReloadButton"
|
|
33
|
+
type="Attention"
|
|
34
|
+
visible="{= ${controls>/changesNeedHardReload} === true}"
|
|
35
|
+
text="{i18n>SAVE_AND_RELOAD}"
|
|
36
|
+
iconFirst="true"
|
|
37
|
+
icon="sap-icon://refresh"
|
|
38
|
+
press=".saveAndReloadApp"
|
|
39
|
+
/>
|
|
40
|
+
<Button
|
|
41
|
+
id="sapUiRta_hardReloadInfoButton"
|
|
42
|
+
type="Attention"
|
|
43
|
+
visible="{= ${controls>/changesNeedHardReload} === true}"
|
|
44
|
+
press=".showHardReloadInfoPopover"
|
|
45
|
+
icon="sap-icon://question-mark"
|
|
46
|
+
class="sapUiNoMarginBeginEnd sapUiRtaHardReloadInfoButton"
|
|
47
|
+
tooltip="{i18n>TOL_SHOW_HARD_RELOAD_INFO}"
|
|
48
|
+
/>
|
|
31
49
|
<toolbar:OverflowToolbarButton
|
|
32
50
|
id="sapUiRta_activate"
|
|
33
51
|
icon="sap-icon://activate"
|
|
@@ -65,7 +83,7 @@
|
|
|
65
83
|
id="sapUiRta_modeSwitcher"
|
|
66
84
|
selectionChange=".modeChange"
|
|
67
85
|
selectedKey="{controls>/modeSwitcher}"
|
|
68
|
-
width="
|
|
86
|
+
width="100%" >
|
|
69
87
|
<items>
|
|
70
88
|
<SegmentedButtonItem
|
|
71
89
|
id="sapUiRta_adaptationSwitcherButton"
|
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"./AdaptationRenderer",
|
|
9
8
|
"sap/base/Log",
|
|
10
9
|
"sap/m/MessageBox",
|
|
10
|
+
"sap/m/MessageStrip",
|
|
11
|
+
"sap/m/Popover",
|
|
12
|
+
"sap/ui/core/message/MessageType",
|
|
11
13
|
"sap/ui/core/BusyIndicator",
|
|
12
14
|
"sap/ui/core/Element",
|
|
13
15
|
"sap/ui/core/Fragment",
|
|
@@ -18,17 +20,20 @@ sap.ui.define([
|
|
|
18
20
|
"sap/ui/model/json/JSONModel",
|
|
19
21
|
"sap/ui/performance/Measurement",
|
|
20
22
|
"sap/ui/rta/appVariant/Feature",
|
|
21
|
-
"sap/ui/rta/toolbar/Base",
|
|
22
23
|
"sap/ui/rta/toolbar/contextBased/ManageAdaptations",
|
|
23
24
|
"sap/ui/rta/toolbar/contextBased/SaveAsAdaptation",
|
|
24
25
|
"sap/ui/rta/toolbar/translation/Translation",
|
|
25
26
|
"sap/ui/rta/toolbar/versioning/Versioning",
|
|
27
|
+
"sap/ui/rta/toolbar/AdaptationRenderer",
|
|
28
|
+
"sap/ui/rta/toolbar/Base",
|
|
26
29
|
"sap/ui/rta/util/whatsNew/WhatsNewOverview",
|
|
27
30
|
"sap/ui/rta/Utils"
|
|
28
31
|
], function(
|
|
29
|
-
AdaptationRenderer,
|
|
30
32
|
Log,
|
|
31
33
|
MessageBox,
|
|
34
|
+
MessageStrip,
|
|
35
|
+
Popover,
|
|
36
|
+
MessageType,
|
|
32
37
|
BusyIndicator,
|
|
33
38
|
Element,
|
|
34
39
|
Fragment,
|
|
@@ -39,11 +44,12 @@ sap.ui.define([
|
|
|
39
44
|
JSONModel,
|
|
40
45
|
Measurement,
|
|
41
46
|
AppVariantFeature,
|
|
42
|
-
Base,
|
|
43
47
|
ManageAdaptations,
|
|
44
48
|
SaveAsAdaptation,
|
|
45
49
|
Translation,
|
|
46
50
|
Versioning,
|
|
51
|
+
AdaptationRenderer,
|
|
52
|
+
Base,
|
|
47
53
|
WhatsNewOverview,
|
|
48
54
|
Utils
|
|
49
55
|
) {
|
|
@@ -57,7 +63,7 @@ sap.ui.define([
|
|
|
57
63
|
* @extends sap.ui.rta.toolbar.Base
|
|
58
64
|
*
|
|
59
65
|
* @author SAP SE
|
|
60
|
-
* @version 1.
|
|
66
|
+
* @version 1.135.0
|
|
61
67
|
*
|
|
62
68
|
* @constructor
|
|
63
69
|
* @private
|
|
@@ -85,7 +91,8 @@ sap.ui.define([
|
|
|
85
91
|
switchVersion: {},
|
|
86
92
|
switchAdaptation: {},
|
|
87
93
|
deleteAdaptation: {},
|
|
88
|
-
openChangeCategorySelectionPopover: {}
|
|
94
|
+
openChangeCategorySelectionPopover: {},
|
|
95
|
+
saveAndReload: {}
|
|
89
96
|
}
|
|
90
97
|
}
|
|
91
98
|
});
|
|
@@ -242,6 +249,23 @@ sap.ui.define([
|
|
|
242
249
|
return this.getExtension("versioning", Versioning).openActivateVersionDialog(sDisplayedVersion);
|
|
243
250
|
};
|
|
244
251
|
|
|
252
|
+
Adaptation.prototype.showHardReloadInfoPopover = function(oEvent) {
|
|
253
|
+
this._oHardReloadInfoPopover ||= new Popover({
|
|
254
|
+
placement: "Bottom",
|
|
255
|
+
content: [
|
|
256
|
+
new MessageStrip({
|
|
257
|
+
text: this.getTextResources().getText("MSG_HARD_RELOAD_INFO"),
|
|
258
|
+
type: MessageType.Warning,
|
|
259
|
+
showIcon: true
|
|
260
|
+
})
|
|
261
|
+
],
|
|
262
|
+
showHeader: false,
|
|
263
|
+
contentWidth: "18rem"
|
|
264
|
+
});
|
|
265
|
+
this.addDependent(this._oHardReloadInfoPopover);
|
|
266
|
+
this._oHardReloadInfoPopover.openBy(oEvent.getSource());
|
|
267
|
+
};
|
|
268
|
+
|
|
245
269
|
Adaptation.prototype.showActionsMenu = function(oEvent) {
|
|
246
270
|
var oButton = oEvent.getSource();
|
|
247
271
|
if (!this._oActionsMenuFragment) {
|
|
@@ -326,7 +350,9 @@ sap.ui.define([
|
|
|
326
350
|
formatVersionButtonText: this.formatVersionButtonText.bind(this),
|
|
327
351
|
showVersionHistory: this.showVersionHistory.bind(this),
|
|
328
352
|
showActionsMenu: this.showActionsMenu.bind(this),
|
|
329
|
-
showFeedbackForm: this.showFeedbackForm.bind(this)
|
|
353
|
+
showFeedbackForm: this.showFeedbackForm.bind(this),
|
|
354
|
+
showHardReloadInfoPopover: this.showHardReloadInfoPopover.bind(this),
|
|
355
|
+
saveAndReloadApp: this.eventHandler.bind(this, "SaveAndReload")
|
|
330
356
|
}
|
|
331
357
|
});
|
|
332
358
|
};
|
|
@@ -32,7 +32,7 @@ function(
|
|
|
32
32
|
* @extends sap.ui.rta.toolbar.Adaptation
|
|
33
33
|
*
|
|
34
34
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.135.0
|
|
36
36
|
*
|
|
37
37
|
* @constructor
|
|
38
38
|
* @private
|
|
@@ -81,8 +81,9 @@ function(
|
|
|
81
81
|
this.getControl("iconBox").addItem(
|
|
82
82
|
new Image(`${this.getId()}_fragment--sapUiRta_icon`, {
|
|
83
83
|
src: sLogoPath,
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
// type check required cause of image could have zero width and height
|
|
85
|
+
width: typeof iWidth === "number" ? `${iWidth}px` : iWidth,
|
|
86
|
+
height: typeof iHeight === "number" ? `${iHeight}px` : iHeight
|
|
86
87
|
})
|
|
87
88
|
);
|
|
88
89
|
}
|
|
@@ -9,7 +9,7 @@ sap.ui.define([
|
|
|
9
9
|
"sap/ui/base/ManagedObject",
|
|
10
10
|
"sap/ui/dt/plugin/ContextMenu",
|
|
11
11
|
"sap/ui/dt/plugin/ToolHooks",
|
|
12
|
-
"sap/ui/fl/
|
|
12
|
+
"sap/ui/fl/write/api/FeaturesAPI",
|
|
13
13
|
"sap/ui/fl/Layer",
|
|
14
14
|
"sap/ui/rta/command/CommandFactory",
|
|
15
15
|
"sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin",
|
|
@@ -36,7 +36,7 @@ sap.ui.define([
|
|
|
36
36
|
ManagedObject,
|
|
37
37
|
ContextMenuPlugin,
|
|
38
38
|
ToolHooksPlugin,
|
|
39
|
-
|
|
39
|
+
FeaturesAPI,
|
|
40
40
|
Layer,
|
|
41
41
|
CommandFactory,
|
|
42
42
|
AdditionalElementsPlugin,
|
|
@@ -64,7 +64,7 @@ sap.ui.define([
|
|
|
64
64
|
* Constructor for a new sap.ui.rta.util.PluginManager
|
|
65
65
|
* @extends sap.ui.base.ManagedObject
|
|
66
66
|
* @author SAP SE
|
|
67
|
-
* @version 1.
|
|
67
|
+
* @version 1.135.0
|
|
68
68
|
* @constructor
|
|
69
69
|
* @private
|
|
70
70
|
* @since 1.86
|
|
@@ -185,8 +185,7 @@ sap.ui.define([
|
|
|
185
185
|
|
|
186
186
|
this._mDefaultPlugins.stretch = new StretchPlugin();
|
|
187
187
|
|
|
188
|
-
|
|
189
|
-
if (oSettings && oSettings.isVariantAdaptationEnabled()) {
|
|
188
|
+
if (FeaturesAPI.isVariantAdaptationEnabled()) {
|
|
190
189
|
this._mDefaultPlugins.compVariant = new CompVariantPlugin({
|
|
191
190
|
commandFactory: this._oCommandFactory
|
|
192
191
|
});
|
|
@@ -204,8 +203,7 @@ sap.ui.define([
|
|
|
204
203
|
|
|
205
204
|
if (
|
|
206
205
|
oFlexSettings.layer === Layer.CUSTOMER
|
|
207
|
-
&&
|
|
208
|
-
&& oSettings.isLocalResetEnabled()
|
|
206
|
+
&& FeaturesAPI.isLocalResetEnabled()
|
|
209
207
|
) {
|
|
210
208
|
this._mDefaultPlugins.localReset = new LocalResetPlugin({
|
|
211
209
|
commandFactory: this._oCommandFactory
|