@openui5/sap.ui.rta 1.117.1 → 1.119.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +25 -1
- package/THIRDPARTY.txt +2 -2
- package/package.json +6 -6
- package/src/sap/ui/rta/.library +1 -1
- package/src/sap/ui/rta/Client.js +32 -21
- package/src/sap/ui/rta/RuntimeAuthoring.js +107 -97
- package/src/sap/ui/rta/Utils.js +10 -16
- package/src/sap/ui/rta/api/startAdaptation.js +0 -1
- package/src/sap/ui/rta/api/startKeyUserAdaptation.js +0 -1
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +24 -26
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -3
- package/src/sap/ui/rta/appVariant/AppVariantOverviewDialog.js +5 -4
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +21 -21
- package/src/sap/ui/rta/appVariant/Feature.js +20 -30
- package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +21 -17
- package/src/sap/ui/rta/appVariant/Utils.js +4 -3
- package/src/sap/ui/rta/appVariant/manageApps/webapp/Component.js +8 -7
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +17 -17
- package/src/sap/ui/rta/appVariant/manageApps/webapp/manifest.json +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
- package/src/sap/ui/rta/command/AddIFrame.js +10 -7
- package/src/sap/ui/rta/command/AddProperty.js +1 -3
- package/src/sap/ui/rta/command/AddXML.js +7 -7
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +5 -5
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -3
- package/src/sap/ui/rta/command/BaseCommand.js +1 -3
- package/src/sap/ui/rta/command/BindProperty.js +4 -5
- package/src/sap/ui/rta/command/Combine.js +1 -3
- package/src/sap/ui/rta/command/CommandFactory.js +7 -11
- package/src/sap/ui/rta/command/CompositeCommand.js +2 -6
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +4 -4
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +4 -3
- package/src/sap/ui/rta/command/CreateContainer.js +1 -3
- package/src/sap/ui/rta/command/CustomAdd.js +1 -2
- package/src/sap/ui/rta/command/FlexCommand.js +2 -7
- package/src/sap/ui/rta/command/LREPSerializer.js +1 -3
- package/src/sap/ui/rta/command/LocalReset.js +1 -1
- package/src/sap/ui/rta/command/Move.js +1 -3
- package/src/sap/ui/rta/command/Property.js +1 -3
- package/src/sap/ui/rta/command/Remove.js +1 -3
- package/src/sap/ui/rta/command/Rename.js +1 -3
- package/src/sap/ui/rta/command/Resize.js +1 -1
- package/src/sap/ui/rta/command/Reveal.js +1 -3
- package/src/sap/ui/rta/command/Settings.js +5 -7
- package/src/sap/ui/rta/command/Split.js +1 -3
- package/src/sap/ui/rta/command/Stack.js +3 -5
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -3
- package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +4 -3
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
- package/src/sap/ui/rta/enablement/TestDelegate.js +7 -8
- package/src/sap/ui/rta/enablement/elementActionTest.js +25 -29
- package/src/sap/ui/rta/library.js +2 -3
- package/src/sap/ui/rta/messagebundle.properties +13 -7
- package/src/sap/ui/rta/messagebundle_ar.properties +8 -8
- package/src/sap/ui/rta/messagebundle_bg.properties +20 -20
- package/src/sap/ui/rta/messagebundle_ca.properties +7 -7
- package/src/sap/ui/rta/messagebundle_cs.properties +10 -10
- package/src/sap/ui/rta/messagebundle_cy.properties +8 -8
- package/src/sap/ui/rta/messagebundle_da.properties +7 -7
- package/src/sap/ui/rta/messagebundle_de.properties +9 -9
- package/src/sap/ui/rta/messagebundle_el.properties +7 -7
- package/src/sap/ui/rta/messagebundle_en.properties +11 -8
- package/src/sap/ui/rta/messagebundle_en_GB.properties +8 -8
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +8 -8
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +7 -7
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +8 -8
- package/src/sap/ui/rta/messagebundle_es.properties +8 -8
- package/src/sap/ui/rta/messagebundle_es_MX.properties +13 -13
- package/src/sap/ui/rta/messagebundle_et.properties +6 -6
- package/src/sap/ui/rta/messagebundle_fi.properties +9 -9
- package/src/sap/ui/rta/messagebundle_fr.properties +9 -9
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +9 -9
- package/src/sap/ui/rta/messagebundle_hi.properties +12 -12
- package/src/sap/ui/rta/messagebundle_hr.properties +9 -9
- package/src/sap/ui/rta/messagebundle_hu.properties +10 -10
- package/src/sap/ui/rta/messagebundle_id.properties +10 -10
- package/src/sap/ui/rta/messagebundle_it.properties +9 -9
- package/src/sap/ui/rta/messagebundle_iw.properties +8 -8
- package/src/sap/ui/rta/messagebundle_ja.properties +21 -21
- package/src/sap/ui/rta/messagebundle_kk.properties +9 -9
- package/src/sap/ui/rta/messagebundle_ko.properties +7 -7
- package/src/sap/ui/rta/messagebundle_lt.properties +8 -8
- package/src/sap/ui/rta/messagebundle_lv.properties +8 -8
- package/src/sap/ui/rta/messagebundle_ms.properties +11 -11
- package/src/sap/ui/rta/messagebundle_nl.properties +8 -8
- package/src/sap/ui/rta/messagebundle_no.properties +9 -9
- package/src/sap/ui/rta/messagebundle_pl.properties +9 -9
- package/src/sap/ui/rta/messagebundle_pt.properties +9 -9
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +8 -8
- package/src/sap/ui/rta/messagebundle_ro.properties +9 -9
- package/src/sap/ui/rta/messagebundle_ru.properties +8 -8
- package/src/sap/ui/rta/messagebundle_sh.properties +8 -8
- package/src/sap/ui/rta/messagebundle_sk.properties +9 -9
- package/src/sap/ui/rta/messagebundle_sl.properties +9 -9
- package/src/sap/ui/rta/messagebundle_sv.properties +8 -8
- package/src/sap/ui/rta/messagebundle_th.properties +14 -14
- package/src/sap/ui/rta/messagebundle_tr.properties +8 -8
- package/src/sap/ui/rta/messagebundle_uk.properties +10 -10
- package/src/sap/ui/rta/messagebundle_vi.properties +8 -8
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +9 -9
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +8 -8
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -2
- package/src/sap/ui/rta/plugin/BaseCreate.js +2 -3
- package/src/sap/ui/rta/plugin/Combine.js +1 -2
- package/src/sap/ui/rta/plugin/ControlVariant.js +12 -8
- package/src/sap/ui/rta/plugin/CreateContainer.js +1 -2
- package/src/sap/ui/rta/plugin/CutPaste.js +13 -13
- package/src/sap/ui/rta/plugin/DragDrop.js +17 -16
- package/src/sap/ui/rta/plugin/EasyAdd.js +12 -10
- package/src/sap/ui/rta/plugin/EasyRemove.js +11 -9
- package/src/sap/ui/rta/plugin/LocalReset.js +4 -2
- package/src/sap/ui/rta/plugin/Plugin.js +6 -10
- package/src/sap/ui/rta/plugin/RTAElementMover.js +3 -6
- package/src/sap/ui/rta/plugin/Remove.js +8 -9
- package/src/sap/ui/rta/plugin/Rename.js +9 -9
- package/src/sap/ui/rta/plugin/RenameHandler.js +21 -22
- package/src/sap/ui/rta/plugin/Resize.js +11 -10
- package/src/sap/ui/rta/plugin/Selection.js +33 -14
- package/src/sap/ui/rta/plugin/Settings.js +11 -11
- package/src/sap/ui/rta/plugin/Split.js +1 -2
- package/src/sap/ui/rta/plugin/Stretch.js +18 -20
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +4 -9
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +5 -9
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +4 -4
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +41 -43
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +2 -3
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +5 -6
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +9 -7
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +45 -3
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +22 -23
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +58 -30
- package/src/sap/ui/rta/service/Action.js +5 -6
- package/src/sap/ui/rta/service/ControllerExtension.js +8 -9
- package/src/sap/ui/rta/service/Outline.js +13 -11
- package/src/sap/ui/rta/service/Property.js +3 -4
- package/src/sap/ui/rta/service/Receiver.js +2 -2
- package/src/sap/ui/rta/service/Selection.js +2 -3
- package/src/sap/ui/rta/service/SupportTools.js +2 -3
- package/src/sap/ui/rta/themes/base/AddIFrame.less +6 -1
- package/src/sap/ui/rta/themes/base/Toolbar.base.less +4 -0
- package/src/sap/ui/rta/toolbar/Adaptation.js +26 -19
- package/src/sap/ui/rta/toolbar/Base.js +25 -11
- package/src/sap/ui/rta/toolbar/BaseRenderer.js +2 -2
- package/src/sap/ui/rta/toolbar/FeedbackDialog.fragment.xml +4 -4
- package/src/sap/ui/rta/toolbar/Fiori.js +20 -20
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -2
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +5 -6
- package/src/sap/ui/rta/toolbar/Personalization.js +4 -4
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -2
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +43 -20
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +16 -7
- package/src/sap/ui/rta/toolbar/translation/Translation.js +13 -14
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +31 -28
- package/src/sap/ui/rta/util/Animation.js +1 -3
- package/src/sap/ui/rta/util/PluginManager.js +1 -3
- package/src/sap/ui/rta/util/PopupManager.js +23 -19
- package/src/sap/ui/rta/util/ReloadManager.js +4 -4
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +18 -16
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +6 -9
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +9 -10
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +2 -2
- package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +4 -4
- package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +2 -2
- package/src/sap/ui/rta/util/hasStableId.js +1 -1
- package/src/sap/ui/rta/util/showMessageBox.js +2 -1
- package/src/sap/ui/rta/util/validateStableIds.js +1 -1
- package/src/sap/ui/rta/util/validateText.js +1 -1
- package/src/sap/ui/rta/util/StylesLoader.js +0 -31
- package/src/sap/ui/rta/util/UrlParser.js +0 -51
|
@@ -17,7 +17,8 @@ sap.ui.define([
|
|
|
17
17
|
"sap/ui/model/Filter",
|
|
18
18
|
"sap/ui/model/FilterOperator",
|
|
19
19
|
"sap/ui/model/json/JSONModel",
|
|
20
|
-
"sap/ui/core/date/UI5Date"
|
|
20
|
+
"sap/ui/core/date/UI5Date",
|
|
21
|
+
"sap/ui/performance/Measurement"
|
|
21
22
|
],
|
|
22
23
|
function(
|
|
23
24
|
Log,
|
|
@@ -31,20 +32,21 @@ function(
|
|
|
31
32
|
Filter,
|
|
32
33
|
FilterOperator,
|
|
33
34
|
JSONModel,
|
|
34
|
-
UI5Date
|
|
35
|
+
UI5Date,
|
|
36
|
+
Measurement
|
|
35
37
|
) {
|
|
36
38
|
"use strict";
|
|
37
39
|
|
|
38
40
|
var oRanking = {
|
|
39
41
|
Initial: 0,
|
|
40
42
|
Default: 1024,
|
|
41
|
-
Before
|
|
43
|
+
Before(iRank) {
|
|
42
44
|
return iRank + 1024;
|
|
43
45
|
},
|
|
44
|
-
Between
|
|
46
|
+
Between(iRank1, iRank2) {
|
|
45
47
|
return (iRank1 + iRank2) / 2;
|
|
46
48
|
},
|
|
47
|
-
After
|
|
49
|
+
After(iRank) {
|
|
48
50
|
return iRank + 0.5;
|
|
49
51
|
}
|
|
50
52
|
};
|
|
@@ -57,17 +59,19 @@ function(
|
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
61
|
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
// eslint-disable-next-line object-shorthand
|
|
63
|
+
constructor: function(...aArgs) {
|
|
64
|
+
ManagedObject.prototype.constructor.apply(this, aArgs);
|
|
62
65
|
this.oTextResources = this.getToolbar().getTextResources();
|
|
63
66
|
}
|
|
64
67
|
});
|
|
65
68
|
|
|
66
69
|
ManageAdaptations.prototype.openManageAdaptationDialog = function() {
|
|
70
|
+
Measurement.start("onCBAOpenManageAdaptationDialog", "Measurement of opening the manage context-based adaptation dialog");
|
|
67
71
|
if (!this._oManageAdaptationDialogPromise) {
|
|
68
72
|
this._oManageAdaptationDialogPromise = Fragment.load({
|
|
69
73
|
name: "sap.ui.rta.toolbar.contextBased.ManageAdaptationsDialog",
|
|
70
|
-
id: this.getToolbar().getId()
|
|
74
|
+
id: `${this.getToolbar().getId()}_fragment--sapUiRta_manageAdaptationDialog`,
|
|
71
75
|
controller: {
|
|
72
76
|
formatContextColumnCell: formatContextColumnCell.bind(this),
|
|
73
77
|
formatContextColumnTooltip: formatContextColumnTooltip.bind(this),
|
|
@@ -94,9 +98,15 @@ function(
|
|
|
94
98
|
return this._oManageAdaptationDialogPromise
|
|
95
99
|
.then(function() {
|
|
96
100
|
this._oRtaInformation = this.getToolbar().getRtaInformation();
|
|
97
|
-
return ContextBasedAdaptationsAPI.load({
|
|
101
|
+
return ContextBasedAdaptationsAPI.load({
|
|
102
|
+
control: this._oRtaInformation.rootControl,
|
|
103
|
+
layer: this._oRtaInformation.flexSettings.layer
|
|
104
|
+
});
|
|
98
105
|
}.bind(this)).then(function(oAdaptations) {
|
|
99
|
-
this.oAdaptationsModel = ContextBasedAdaptationsAPI.getAdaptationsModel({
|
|
106
|
+
this.oAdaptationsModel = ContextBasedAdaptationsAPI.getAdaptationsModel({
|
|
107
|
+
control: this._oRtaInformation.rootControl,
|
|
108
|
+
layer: this._oRtaInformation.flexSettings.layer
|
|
109
|
+
});
|
|
100
110
|
this.oAdaptationsModel.updateAdaptations(oAdaptations.adaptations);
|
|
101
111
|
this.oReferenceAdaptationsData = JSON.parse(JSON.stringify(this.oAdaptationsModel.getProperty("/adaptations")));
|
|
102
112
|
this._oOriginAdaptationsData = JSON.parse(JSON.stringify(this.oAdaptationsModel.getProperty("/allAdaptations")));
|
|
@@ -104,6 +114,8 @@ function(
|
|
|
104
114
|
this._oManageAdaptationDialog.setModel(this.oAdaptationsModel, "contextBased");
|
|
105
115
|
this._oManageAdaptationDialog.setModel(this._oControlConfigurationModel, "controlConfiguration");
|
|
106
116
|
getAdaptationsTable.call(this).attachSelectionChange(onSelectionChange.bind(this));
|
|
117
|
+
Measurement.end("onCBAOpenManageAdaptationDialog");
|
|
118
|
+
Measurement.getActive() && Log.info(`onCBAOpenManageAdaptationDialog: ${Measurement.getMeasurement("onCBAOpenManageAdaptationDialog").time} ms`);
|
|
107
119
|
return this._oManageAdaptationDialog.open();
|
|
108
120
|
}.bind(this)
|
|
109
121
|
).catch(function(oError) {
|
|
@@ -117,8 +129,8 @@ function(
|
|
|
117
129
|
|
|
118
130
|
// ------ formatting ------
|
|
119
131
|
function formatContextColumnCell(aRoles) {
|
|
120
|
-
return aRoles.length
|
|
121
|
-
this.oTextResources.getText("TXT_TABLE_CONTEXT_CELL_ROLES") : this.oTextResources.getText("TXT_TABLE_CONTEXT_CELL_ROLE")
|
|
132
|
+
return `${aRoles.length} ${aRoles.length > 1 ?
|
|
133
|
+
this.oTextResources.getText("TXT_TABLE_CONTEXT_CELL_ROLES") : this.oTextResources.getText("TXT_TABLE_CONTEXT_CELL_ROLE")}`;
|
|
122
134
|
}
|
|
123
135
|
|
|
124
136
|
function formatContextColumnTooltip(aRoles) {
|
|
@@ -135,7 +147,7 @@ function(
|
|
|
135
147
|
minute: "numeric"
|
|
136
148
|
};
|
|
137
149
|
var sLanguage = sap.ui.getCore().getConfiguration().getLanguage();
|
|
138
|
-
return sModifiedBy
|
|
150
|
+
return `${sModifiedBy}\n${oUi5Date.toLocaleTimeString(sLanguage, oOptions)}`;
|
|
139
151
|
}
|
|
140
152
|
|
|
141
153
|
function onSelectionChange(oEvent) {
|
|
@@ -176,7 +188,7 @@ function(
|
|
|
176
188
|
var oFilterByTitle = new Filter("title", FilterOperator.Contains, sQuery);
|
|
177
189
|
var oFilterByContextId = new Filter({
|
|
178
190
|
path: "contexts/role",
|
|
179
|
-
test
|
|
191
|
+
test(aRoles) {
|
|
180
192
|
return aRoles.some(function(sRole) {
|
|
181
193
|
return sRole.includes(sQuery.toUpperCase());
|
|
182
194
|
});
|
|
@@ -286,7 +298,10 @@ function(
|
|
|
286
298
|
// set the rank property and update the model to refresh the bindings
|
|
287
299
|
this.oAdaptationsModel.setProperty("rank", iNewRank, oDraggedItemContext);
|
|
288
300
|
sortByRank(this.oAdaptationsModel);
|
|
289
|
-
var oAllUpdatedAdaptations = Object.assign(
|
|
301
|
+
var oAllUpdatedAdaptations = Object.assign(
|
|
302
|
+
this.oAdaptationsModel.getProperty("/allAdaptations"),
|
|
303
|
+
this.oAdaptationsModel.getProperty("/adaptations")
|
|
304
|
+
);
|
|
290
305
|
this.oAdaptationsModel.updateAdaptations(oAllUpdatedAdaptations);
|
|
291
306
|
enableSaveButton.call(this, didAdaptationsPriorityChange.call(this));
|
|
292
307
|
}
|
|
@@ -309,7 +324,7 @@ function(
|
|
|
309
324
|
}
|
|
310
325
|
|
|
311
326
|
function getControlInDialog(sId) {
|
|
312
|
-
return this.getToolbar().getControl(
|
|
327
|
+
return this.getToolbar().getControl(`manageAdaptationDialog--${sId}`);
|
|
313
328
|
}
|
|
314
329
|
|
|
315
330
|
function getDefaultApplicationTable() {
|
|
@@ -350,17 +365,25 @@ function(
|
|
|
350
365
|
function onSaveReorderedAdaptations() {
|
|
351
366
|
Utils.checkDraftOverwrite(this.getToolbar().getModel("versions")).then(function() {
|
|
352
367
|
var oRtaInformation = this.getToolbar().getRtaInformation();
|
|
353
|
-
var aAdaptationPriorities = this.oAdaptationsModel.getProperty("/adaptations")
|
|
354
|
-
|
|
368
|
+
var aAdaptationPriorities = this.oAdaptationsModel.getProperty("/adaptations")
|
|
369
|
+
.map(function(oAdaptation) { return oAdaptation.id; });
|
|
370
|
+
return ContextBasedAdaptationsAPI.reorder({
|
|
371
|
+
control: oRtaInformation.rootControl,
|
|
372
|
+
layer: oRtaInformation.flexSettings.layer,
|
|
373
|
+
parameters: {priorities: aAdaptationPriorities}
|
|
374
|
+
});
|
|
355
375
|
}.bind(this)).then(function() {
|
|
356
|
-
var oAllUpdatedAdaptations = Object.assign(
|
|
376
|
+
var oAllUpdatedAdaptations = Object.assign(
|
|
377
|
+
this.oAdaptationsModel.getProperty("/allAdaptations"),
|
|
378
|
+
this.oAdaptationsModel.getProperty("/adaptations")
|
|
379
|
+
);
|
|
357
380
|
this.oAdaptationsModel.updateAdaptations(oAllUpdatedAdaptations);
|
|
358
381
|
onCloseDialog.call(this);
|
|
359
382
|
}.bind(this))
|
|
360
383
|
.catch(function(oError) {
|
|
361
384
|
if (oError !== "cancel") {
|
|
362
385
|
Utils.showMessageBox("error", "MSG_LREP_TRANSFER_ERROR", { titleKey: "BTN_MANAGE_APP_CTX", error: oError});
|
|
363
|
-
Log.error(
|
|
386
|
+
Log.error(`sap.ui.rta: ${oError.stack || oError.message || oError}`);
|
|
364
387
|
}
|
|
365
388
|
});
|
|
366
389
|
}
|
|
@@ -15,7 +15,8 @@ sap.ui.define([
|
|
|
15
15
|
"sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
|
|
16
16
|
"sap/ui/fl/write/api/ContextSharingAPI",
|
|
17
17
|
"sap/ui/rta/Utils",
|
|
18
|
-
"sap/ui/model/json/JSONModel"
|
|
18
|
+
"sap/ui/model/json/JSONModel",
|
|
19
|
+
"sap/ui/performance/Measurement"
|
|
19
20
|
], function(
|
|
20
21
|
ManagedObject,
|
|
21
22
|
Log,
|
|
@@ -27,12 +28,13 @@ sap.ui.define([
|
|
|
27
28
|
ContextBasedAdaptationsAPI,
|
|
28
29
|
ContextSharingAPI,
|
|
29
30
|
Utils,
|
|
30
|
-
JSONModel
|
|
31
|
+
JSONModel,
|
|
32
|
+
Measurement
|
|
31
33
|
) {
|
|
32
34
|
"use strict";
|
|
33
35
|
|
|
34
36
|
// shortcut for sap.ui.core.ValueState
|
|
35
|
-
var ValueState = coreLibrary
|
|
37
|
+
var {ValueState} = coreLibrary;
|
|
36
38
|
|
|
37
39
|
/**
|
|
38
40
|
* Controller for the <code>sap.ui.rta.toolbar.contextBased.SaveAsAdaptation</code> controls.
|
|
@@ -41,7 +43,7 @@ sap.ui.define([
|
|
|
41
43
|
* @class
|
|
42
44
|
*
|
|
43
45
|
* @author SAP SE
|
|
44
|
-
* @version 1.
|
|
46
|
+
* @version 1.119.0
|
|
45
47
|
*
|
|
46
48
|
* @constructor
|
|
47
49
|
* @private
|
|
@@ -56,8 +58,9 @@ sap.ui.define([
|
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
60
|
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
// eslint-disable-next-line object-shorthand
|
|
62
|
+
constructor: function(...aArgs) {
|
|
63
|
+
ManagedObject.prototype.constructor.apply(this, aArgs);
|
|
61
64
|
this.oTextResources = this.getToolbar().getTextResources();
|
|
62
65
|
}
|
|
63
66
|
});
|
|
@@ -67,7 +70,7 @@ sap.ui.define([
|
|
|
67
70
|
if (!this._oAddAdaptationDialogPromise) {
|
|
68
71
|
this._oAddAdaptationDialogPromise = Fragment.load({
|
|
69
72
|
name: "sap.ui.rta.toolbar.contextBased.SaveAsAdaptationDialog",
|
|
70
|
-
id: this.getToolbar().getId()
|
|
73
|
+
id: `${this.getToolbar().getId()}_fragment--sapUiRta_addAdaptationDialog`,
|
|
71
74
|
controller: {
|
|
72
75
|
onAdaptationTitleChange: onAdaptationTitleChange.bind(this),
|
|
73
76
|
onSaveAsAdaptation: onSaveAsAdaptation.bind(this),
|
|
@@ -165,6 +168,7 @@ sap.ui.define([
|
|
|
165
168
|
oContextBasedAdaptation.priority = getAdaptationPriority.call(this);
|
|
166
169
|
var oRtaInformation = this.getToolbar().getRtaInformation();
|
|
167
170
|
if (this._bIsEditMode) {
|
|
171
|
+
Measurement.start("onCBAUpdateAdaptation", "Measurement of updating a context-based adaptation");
|
|
168
172
|
oContextBasedAdaptation.adaptationId = this._mEditProperties.adaptationId;
|
|
169
173
|
ContextBasedAdaptationsAPI.update({
|
|
170
174
|
control: oRtaInformation.rootControl,
|
|
@@ -175,6 +179,8 @@ sap.ui.define([
|
|
|
175
179
|
.then(function(oContextBasedAdaptation, oResponse) {
|
|
176
180
|
if (oResponse.status === 200) {
|
|
177
181
|
this.oAdaptationsModel.updateAdaptationContent(oContextBasedAdaptation);
|
|
182
|
+
Measurement.end("onCBAUpdateAdaptation");
|
|
183
|
+
Measurement.getActive() && Log.info(`onCBAUpdateAdaptation: ${Measurement.getMeasurement("onCBAUpdateAdaptation").time} ms`);
|
|
178
184
|
}
|
|
179
185
|
}.bind(this, oContextBasedAdaptation))
|
|
180
186
|
.catch(function(oError) {
|
|
@@ -185,6 +191,7 @@ sap.ui.define([
|
|
|
185
191
|
Utils.showMessageBox("error", sMessage, oOptions);
|
|
186
192
|
});
|
|
187
193
|
} else {
|
|
194
|
+
Measurement.start("onCBASaveAsAdaptation", "Measurement of saving a context-based adaptation");
|
|
188
195
|
BusyIndicator.show();
|
|
189
196
|
ContextBasedAdaptationsAPI.create({
|
|
190
197
|
control: oRtaInformation.rootControl,
|
|
@@ -193,6 +200,8 @@ sap.ui.define([
|
|
|
193
200
|
}).then(function() {
|
|
194
201
|
BusyIndicator.hide();
|
|
195
202
|
this.getToolbar().fireEvent("switchAdaptation", {adaptationId: oContextBasedAdaptation.id, trigger: "SaveAs"});
|
|
203
|
+
Measurement.end("onCBASaveAsAdaptation");
|
|
204
|
+
Measurement.getActive() && Log.info(`onCBASaveAsAdaptation: ${Measurement.getMeasurement("onCBASaveAsAdaptation").time} ms`);
|
|
196
205
|
}.bind(this)).catch(function(oError) {
|
|
197
206
|
BusyIndicator.hide();
|
|
198
207
|
Log.error(oError.stack);
|
|
@@ -35,8 +35,8 @@ sap.ui.define([
|
|
|
35
35
|
var sErrorMessage = vError.userMessage || vError.stack || vError.message || vError.status || vError;
|
|
36
36
|
var oTextResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
|
|
37
37
|
Log.error(sErrorMessage);
|
|
38
|
-
var sMsg = oTextResources.getText("MSG_LREP_TRANSFER_ERROR")
|
|
39
|
-
|
|
38
|
+
var sMsg = `${oTextResources.getText("MSG_LREP_TRANSFER_ERROR")}\n${
|
|
39
|
+
oTextResources.getText("MSG_ERROR_REASON", [sErrorMessage])}`;
|
|
40
40
|
MessageBox.error(sMsg, {
|
|
41
41
|
styleClass: Utils.getRtaStyleClassName()
|
|
42
42
|
});
|
|
@@ -49,7 +49,7 @@ sap.ui.define([
|
|
|
49
49
|
* @class
|
|
50
50
|
*
|
|
51
51
|
* @author SAP SE
|
|
52
|
-
* @version 1.
|
|
52
|
+
* @version 1.119.0
|
|
53
53
|
*
|
|
54
54
|
* @constructor
|
|
55
55
|
* @private
|
|
@@ -64,8 +64,9 @@ sap.ui.define([
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
// eslint-disable-next-line object-shorthand
|
|
68
|
+
constructor: function(...aArgs) {
|
|
69
|
+
ManagedObject.prototype.constructor.apply(this, aArgs);
|
|
69
70
|
this._oTranslationModel = new JSONModel(getInitialTranslationModelData());
|
|
70
71
|
}
|
|
71
72
|
});
|
|
@@ -74,7 +75,7 @@ sap.ui.define([
|
|
|
74
75
|
var oModel = oEvent.getSource().getModel("translation");
|
|
75
76
|
var sSourceLanguage = oModel.getProperty("/sourceLanguage");
|
|
76
77
|
var sTargetLanguage = oModel.getProperty("/targetLanguage");
|
|
77
|
-
var sFileName = sSourceLanguage
|
|
78
|
+
var sFileName = `${sSourceLanguage}_${sTargetLanguage}_` + `TranslationXLIFF`;
|
|
78
79
|
|
|
79
80
|
var mPropertyBag = {
|
|
80
81
|
layer: Layer.CUSTOMER,
|
|
@@ -106,7 +107,7 @@ sap.ui.define([
|
|
|
106
107
|
Translation.prototype._createDownloadTranslationDialog = function() {
|
|
107
108
|
return Fragment.load({
|
|
108
109
|
name: "sap.ui.rta.toolbar.translation.DownloadTranslationDialog",
|
|
109
|
-
id: this.getToolbar().getId()
|
|
110
|
+
id: `${this.getToolbar().getId()}_download_translation_fragment`,
|
|
110
111
|
controller: {
|
|
111
112
|
onDownloadFile: downloadFile.bind(this),
|
|
112
113
|
onCancelDownloadDialog: function() {
|
|
@@ -122,7 +123,7 @@ sap.ui.define([
|
|
|
122
123
|
};
|
|
123
124
|
|
|
124
125
|
Translation.prototype._createUploadTranslationDialog = function() {
|
|
125
|
-
var sUploadId = this.getToolbar().getId()
|
|
126
|
+
var sUploadId = `${this.getToolbar().getId()}_upload_translation_fragment`;
|
|
126
127
|
return Fragment.load({
|
|
127
128
|
name: "sap.ui.rta.toolbar.translation.UploadTranslationDialog",
|
|
128
129
|
id: sUploadId,
|
|
@@ -130,8 +131,8 @@ sap.ui.define([
|
|
|
130
131
|
onCancelUploadDialog: function() {
|
|
131
132
|
this._oUploadDialog.close();
|
|
132
133
|
}.bind(this),
|
|
133
|
-
formatUploadEnabled
|
|
134
|
-
var oFileUploader = sap.ui.getCore().byId(sUploadId
|
|
134
|
+
formatUploadEnabled() {
|
|
135
|
+
var oFileUploader = sap.ui.getCore().byId(`${sUploadId}--fileUploader`);
|
|
135
136
|
return oFileUploader.checkFileReadable();
|
|
136
137
|
},
|
|
137
138
|
saveFiles: function(oEvent) {
|
|
@@ -148,7 +149,7 @@ sap.ui.define([
|
|
|
148
149
|
};
|
|
149
150
|
|
|
150
151
|
function handleUploadPress(sUploadId) {
|
|
151
|
-
var oFileUploader = sap.ui.getCore().byId(sUploadId
|
|
152
|
+
var oFileUploader = sap.ui.getCore().byId(`${sUploadId}--fileUploader`);
|
|
152
153
|
oFileUploader.checkFileReadable().then(function() {
|
|
153
154
|
if (this._oTranslationModel.getProperty("/file")) {
|
|
154
155
|
var mPropertyBag = {
|
|
@@ -207,9 +208,7 @@ sap.ui.define([
|
|
|
207
208
|
};
|
|
208
209
|
|
|
209
210
|
Translation.prototype.openUploadTranslationDialog = function() {
|
|
210
|
-
|
|
211
|
-
this._oUploadDialogPromise = this._createUploadTranslationDialog();
|
|
212
|
-
}
|
|
211
|
+
this._oUploadDialogPromise ||= this._createUploadTranslationDialog();
|
|
213
212
|
return this._oUploadDialogPromise.then(function(oUploadDialog) {
|
|
214
213
|
this.getToolbar().addDependent(oUploadDialog);
|
|
215
214
|
return oUploadDialog.open();
|
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
) {
|
|
26
26
|
"use strict";
|
|
27
27
|
|
|
28
|
-
var MessageType = coreLibrary
|
|
28
|
+
var {MessageType} = coreLibrary;
|
|
29
29
|
var DRAFT_ACCENT_COLOR = "sapUiRtaDraftVersionAccent";
|
|
30
30
|
var ACTIVE_ACCENT_COLOR = "sapUiRtaActiveVersionAccent";
|
|
31
31
|
|
|
@@ -36,7 +36,7 @@ sap.ui.define([
|
|
|
36
36
|
* @class
|
|
37
37
|
*
|
|
38
38
|
* @author SAP SE
|
|
39
|
-
* @version 1.
|
|
39
|
+
* @version 1.119.0
|
|
40
40
|
*
|
|
41
41
|
* @constructor
|
|
42
42
|
* @private
|
|
@@ -51,8 +51,9 @@ sap.ui.define([
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
// eslint-disable-next-line object-shorthand
|
|
55
|
+
constructor: function(...aArgs) {
|
|
56
|
+
ManagedObject.prototype.constructor.apply(this, aArgs);
|
|
56
57
|
this.oTextResources = this.getToolbar().getTextResources();
|
|
57
58
|
}
|
|
58
59
|
});
|
|
@@ -121,15 +122,19 @@ sap.ui.define([
|
|
|
121
122
|
// in case of "Original App" and "Draft" no timestamp is set
|
|
122
123
|
return "";
|
|
123
124
|
}
|
|
124
|
-
|
|
125
|
+
if (sTimeStamp.indexOf("Z") === -1) {
|
|
126
|
+
sTimeStamp = `${sTimeStamp}Z`;
|
|
127
|
+
}
|
|
125
128
|
return DateFormat.getInstance({
|
|
126
129
|
format: "yMMMdjm"
|
|
127
|
-
}).format(new Date(sTimeStamp
|
|
130
|
+
}).format(new Date(sTimeStamp));
|
|
128
131
|
}
|
|
129
132
|
|
|
130
133
|
function getGroupHeaderFactory(oGroup) {
|
|
131
134
|
return new GroupHeaderListItem({
|
|
132
|
-
title: oGroup.key
|
|
135
|
+
title: oGroup.key
|
|
136
|
+
? this.oTextResources.getText("TIT_VERSION_HISTORY_PUBLISHED")
|
|
137
|
+
: this.oTextResources.getText("TIT_VERSION_HISTORY_UNPUBLISHED"),
|
|
133
138
|
upperCase: false,
|
|
134
139
|
visible: this.getToolbar().getModel("versions").getProperty("/publishVersionVisible")
|
|
135
140
|
}).addStyleClass("sapUiRtaVersionHistoryGrouping").addStyleClass("sapUiRtaVersionHistory");
|
|
@@ -154,7 +159,7 @@ sap.ui.define([
|
|
|
154
159
|
Versioning.prototype.formatVersionButtonText = function(aVersions, sDisplayedVersion) {
|
|
155
160
|
var sText = "";
|
|
156
161
|
var sType = "Active";
|
|
157
|
-
aVersions
|
|
162
|
+
aVersions ||= [];
|
|
158
163
|
|
|
159
164
|
if (sDisplayedVersion === undefined || sDisplayedVersion === Version.Number.Original) {
|
|
160
165
|
sText = this.oTextResources.getText("TIT_ORIGINAL_APP");
|
|
@@ -191,25 +196,23 @@ sap.ui.define([
|
|
|
191
196
|
Versioning.prototype.showVersionHistory = function(oEvent) {
|
|
192
197
|
var oVersionButton = oEvent.getSource();
|
|
193
198
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}.bind(this));
|
|
212
|
-
}
|
|
199
|
+
this._oVersionHistoryDialogPromise ||= Fragment.load({
|
|
200
|
+
name: "sap.ui.rta.toolbar.versioning.VersionHistory",
|
|
201
|
+
id: `${this.getToolbar().getId()}_fragment--sapUiRta_versionHistoryDialog`,
|
|
202
|
+
controller: {
|
|
203
|
+
formatVersionTitle: formatVersionTitle.bind(this),
|
|
204
|
+
formatVersionTimeStamp,
|
|
205
|
+
formatHighlight,
|
|
206
|
+
formatHighlightText: formatHighlightText.bind(this),
|
|
207
|
+
formatOriginalAppHighlight,
|
|
208
|
+
formatOriginalAppHighlightText: formatOriginalAppHighlightText.bind(this),
|
|
209
|
+
versionSelected: versionSelected.bind(this),
|
|
210
|
+
getGroupHeaderFactory: getGroupHeaderFactory.bind(this)
|
|
211
|
+
}
|
|
212
|
+
}).then(function(oDialog) {
|
|
213
|
+
this.getToolbar().addDependent(oDialog);
|
|
214
|
+
return oDialog;
|
|
215
|
+
}.bind(this));
|
|
213
216
|
|
|
214
217
|
return this._oVersionHistoryDialogPromise.then(function(oVersionsDialog) {
|
|
215
218
|
if (!oVersionsDialog.isOpen()) {
|
|
@@ -232,7 +235,7 @@ sap.ui.define([
|
|
|
232
235
|
if (!this._oActivateVersionDialogPromise) {
|
|
233
236
|
this._oActivateVersionDialogPromise = Fragment.load({
|
|
234
237
|
name: "sap.ui.rta.toolbar.versioning.VersionTitleDialog",
|
|
235
|
-
id: this.getToolbar().getId()
|
|
238
|
+
id: `${this.getToolbar().getId()}_fragment--sapUiRta_activateVersionDialog`,
|
|
236
239
|
controller: {
|
|
237
240
|
onConfirmVersioningDialog: function() {
|
|
238
241
|
var sVersionTitle = this.getToolbar().getControl("activateVersionDialog--versionTitleInput").getValue();
|
|
@@ -28,9 +28,7 @@ function() {
|
|
|
28
28
|
// perform animation in the next animation frame, normally 16-17ms later.
|
|
29
29
|
var iTimestampInitial;
|
|
30
30
|
var fnAnimCallback = function(iTimestamp) {
|
|
31
|
-
|
|
32
|
-
iTimestampInitial = iTimestamp;
|
|
33
|
-
}
|
|
31
|
+
iTimestampInitial ||= iTimestamp;
|
|
34
32
|
if (iTimestamp !== iTimestampInitial) {
|
|
35
33
|
fnCallback();
|
|
36
34
|
} else {
|
|
@@ -68,13 +68,11 @@ sap.ui.define([
|
|
|
68
68
|
* Constructor for a new sap.ui.rta.util.PluginManager
|
|
69
69
|
* @extends sap.ui.base.ManagedObject
|
|
70
70
|
* @author SAP SE
|
|
71
|
-
* @version 1.
|
|
71
|
+
* @version 1.119.0
|
|
72
72
|
* @constructor
|
|
73
73
|
* @private
|
|
74
74
|
* @since 1.86
|
|
75
75
|
* @alias sap.ui.rta.util.PluginManager
|
|
76
|
-
* @experimental Since 1.86. This class is experimental and provides only limited functionality. Also the API might
|
|
77
|
-
* be changed in future.
|
|
78
76
|
*/
|
|
79
77
|
var PluginManager = ManagedObject.extend("sap.ui.rta.util.PluginManager", {
|
|
80
78
|
metadata: {
|
|
@@ -42,13 +42,11 @@ sap.ui.define([
|
|
|
42
42
|
* Constructor for a new sap.ui.rta.util.PopupManager
|
|
43
43
|
* @extends sap.ui.base.ManagedObject
|
|
44
44
|
* @author SAP SE
|
|
45
|
-
* @version 1.
|
|
45
|
+
* @version 1.119.0
|
|
46
46
|
* @constructor
|
|
47
47
|
* @private
|
|
48
48
|
* @since 1.48
|
|
49
49
|
* @alias sap.ui.rta.util.PopupManager
|
|
50
|
-
* @experimental Since 1.48. This class is experimental and provides only limited functionality. Also the API might
|
|
51
|
-
* be changed in future.
|
|
52
50
|
*/
|
|
53
51
|
var PopupManager = ManagedObject.extend("sap.ui.rta.util.PopupManager", {
|
|
54
52
|
metadata: {
|
|
@@ -144,7 +142,8 @@ sap.ui.define([
|
|
|
144
142
|
};
|
|
145
143
|
|
|
146
144
|
/**
|
|
147
|
-
* Filters the passed array and returns an object containing list of adaptable popups and all supported
|
|
145
|
+
* Filters the passed array and returns an object containing list of adaptable popups and all supported
|
|
146
|
+
* popup controls (also includes non-adaptable popups).
|
|
148
147
|
*
|
|
149
148
|
* @param {sap.ui.core.Popup[]} aOpenPopups Specifies open popups
|
|
150
149
|
* @returns {object} Returns an object containing all adaptation relevant popups and all supported popup controls
|
|
@@ -160,6 +159,7 @@ sap.ui.define([
|
|
|
160
159
|
// all modal type popups are supported for which modal property is later turned true, when in Adaptation mode
|
|
161
160
|
aAllSupportedPopups.push(oPopupElement);
|
|
162
161
|
}
|
|
162
|
+
return undefined;
|
|
163
163
|
}.bind(this));
|
|
164
164
|
|
|
165
165
|
return {
|
|
@@ -183,6 +183,7 @@ sap.ui.define([
|
|
|
183
183
|
if (oContent instanceof ComponentContainer) {
|
|
184
184
|
return this.oRtaRootAppComponent === this._getAppComponentForControl(Component.get(oContent.getComponent()));
|
|
185
185
|
}
|
|
186
|
+
return undefined;
|
|
186
187
|
}.bind(this))
|
|
187
188
|
: false;
|
|
188
189
|
};
|
|
@@ -250,9 +251,11 @@ sap.ui.define([
|
|
|
250
251
|
}
|
|
251
252
|
};
|
|
252
253
|
|
|
253
|
-
sNewMode === "navigation"
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
if (sNewMode === "navigation") {
|
|
255
|
+
this._applyPatchesToOpenPopups(_curry(fnApplyFocusAndSetModal)(sNewMode));
|
|
256
|
+
} else {
|
|
257
|
+
this._removePatchesToOpenPopups(_curry(fnApplyFocusAndSetModal)(sNewMode));
|
|
258
|
+
}
|
|
256
259
|
};
|
|
257
260
|
|
|
258
261
|
/**
|
|
@@ -314,8 +317,9 @@ sap.ui.define([
|
|
|
314
317
|
* @private
|
|
315
318
|
*/
|
|
316
319
|
PopupManager.prototype._overrideAddFunctions = function(fnOriginalFunction) {
|
|
317
|
-
return function(
|
|
318
|
-
|
|
320
|
+
return function(...aArgs) {
|
|
321
|
+
const [oPopupElement] = aArgs;
|
|
322
|
+
var vOriginalReturn = fnOriginalFunction.apply(InstanceManager, aArgs);
|
|
319
323
|
if (this._isSupportedPopup(oPopupElement)) {
|
|
320
324
|
if (this._isPopupAdaptable(oPopupElement)
|
|
321
325
|
&& this.getRta()._oDesignTime) {
|
|
@@ -389,7 +393,7 @@ sap.ui.define([
|
|
|
389
393
|
*/
|
|
390
394
|
PopupManager.prototype._applyPopupPatch = function(oPopupElement) {
|
|
391
395
|
var oOverlayContainer = Overlay.getOverlayContainer();
|
|
392
|
-
var oPopup = oPopupElement
|
|
396
|
+
var {oPopup} = oPopupElement;
|
|
393
397
|
var aAutoCloseAreas = [
|
|
394
398
|
oPopup.oContent.getDomRef(),
|
|
395
399
|
oOverlayContainer.get(0)
|
|
@@ -413,11 +417,9 @@ sap.ui.define([
|
|
|
413
417
|
oPopup.setExtraContent(aAutoCloseAreas);
|
|
414
418
|
|
|
415
419
|
// cases when onAfterRendering is called after this function - app inside popup
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
oPopup.onAfterRendering = function() {
|
|
420
|
-
var vOriginalReturn = this.fnOriginalPopupOnAfterRendering.apply(oPopup, arguments);
|
|
420
|
+
this.fnOriginalPopupOnAfterRendering ||= oPopup.onAfterRendering;
|
|
421
|
+
oPopup.onAfterRendering = function(...aArgs) {
|
|
422
|
+
var vOriginalReturn = this.fnOriginalPopupOnAfterRendering.apply(oPopup, aArgs);
|
|
421
423
|
oPopup[this._getFocusEventName("remove")]();
|
|
422
424
|
return vOriginalReturn;
|
|
423
425
|
}.bind(this);
|
|
@@ -451,8 +453,9 @@ sap.ui.define([
|
|
|
451
453
|
* @private
|
|
452
454
|
*/
|
|
453
455
|
PopupManager.prototype._overrideRemoveFunctions = function(fnOriginalFunction) {
|
|
454
|
-
return function(
|
|
455
|
-
|
|
456
|
+
return function(...aArgs) {
|
|
457
|
+
const [oPopupElement] = aArgs;
|
|
458
|
+
var vOriginalReturn = fnOriginalFunction.apply(InstanceManager, aArgs);
|
|
456
459
|
if (this._isSupportedPopup(oPopupElement)) {
|
|
457
460
|
if (this._isPopupAdaptable(oPopupElement)
|
|
458
461
|
&& this.getRta()._oDesignTime) {
|
|
@@ -548,7 +551,8 @@ sap.ui.define([
|
|
|
548
551
|
};
|
|
549
552
|
|
|
550
553
|
/**
|
|
551
|
-
* Restores the Instance Manager AddDialogInstance/AddPopoverInstance, RemoveDialogInstance/RemovePopoverInstance
|
|
554
|
+
* Restores the Instance Manager AddDialogInstance/AddPopoverInstance, RemoveDialogInstance/RemovePopoverInstance
|
|
555
|
+
* methods and default blur event for popups
|
|
552
556
|
*
|
|
553
557
|
* @private
|
|
554
558
|
*/
|
|
@@ -579,7 +583,7 @@ sap.ui.define([
|
|
|
579
583
|
* @private
|
|
580
584
|
*/
|
|
581
585
|
PopupManager.prototype._removePopupPatch = function(oPopupElement) {
|
|
582
|
-
var oPopup = oPopupElement
|
|
586
|
+
var {oPopup} = oPopupElement;
|
|
583
587
|
oPopup[this._getFocusEventName("add")]();
|
|
584
588
|
if (this.fnOriginalPopupOnAfterRendering) {
|
|
585
589
|
oPopup.onAfterRendering = this.fnOriginalPopupOnAfterRendering;
|
|
@@ -30,7 +30,7 @@ sap.ui.define([
|
|
|
30
30
|
* @namespace sap.ui.rta.util.ReloadManager
|
|
31
31
|
* @alias sap.ui.rta.util.ReloadManager
|
|
32
32
|
* @since 1.104
|
|
33
|
-
* @version 1.
|
|
33
|
+
* @version 1.119.0
|
|
34
34
|
* @private
|
|
35
35
|
* @ui5-restricted
|
|
36
36
|
*/
|
|
@@ -211,7 +211,7 @@ sap.ui.define([
|
|
|
211
211
|
ReloadManager.enableAutomaticStart = function(sLayer, oRootControl) {
|
|
212
212
|
var sFlexReference = FlexRuntimeInfoAPI.getFlexReference({element: oRootControl});
|
|
213
213
|
var vParameter = sFlexReference || true;
|
|
214
|
-
window.sessionStorage.setItem(
|
|
214
|
+
window.sessionStorage.setItem(`sap.ui.rta.restart.${sLayer}`, vParameter);
|
|
215
215
|
};
|
|
216
216
|
|
|
217
217
|
/**
|
|
@@ -220,7 +220,7 @@ sap.ui.define([
|
|
|
220
220
|
* @param {sap.ui.fl.Layer} sLayer - Active layer
|
|
221
221
|
*/
|
|
222
222
|
ReloadManager.disableAutomaticStart = function(sLayer) {
|
|
223
|
-
window.sessionStorage.removeItem(
|
|
223
|
+
window.sessionStorage.removeItem(`sap.ui.rta.restart.${sLayer}`);
|
|
224
224
|
};
|
|
225
225
|
|
|
226
226
|
/**
|
|
@@ -230,7 +230,7 @@ sap.ui.define([
|
|
|
230
230
|
* @returns {boolean} <code>true</code> if restart is needed
|
|
231
231
|
*/
|
|
232
232
|
ReloadManager.needsAutomaticStart = function(sLayer) {
|
|
233
|
-
return !!window.sessionStorage.getItem(
|
|
233
|
+
return !!window.sessionStorage.getItem(`sap.ui.rta.restart.${sLayer}`);
|
|
234
234
|
};
|
|
235
235
|
|
|
236
236
|
/**
|