@openui5/sap.ui.rta 1.115.1 → 1.117.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 +33 -2
- package/.reuse/dep5 +0 -5
- package/THIRDPARTY.txt +1 -7
- package/package.json +6 -6
- package/src/sap/ui/rta/.library +1 -1
- package/src/sap/ui/rta/Client.js +60 -59
- package/src/sap/ui/rta/RuntimeAuthoring.js +256 -254
- package/src/sap/ui/rta/Utils.js +42 -42
- package/src/sap/ui/rta/api/startAdaptation.js +2 -2
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +3 -3
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +27 -27
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +100 -103
- package/src/sap/ui/rta/appVariant/Feature.js +75 -77
- package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +6 -7
- package/src/sap/ui/rta/appVariant/Utils.js +17 -17
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +36 -36
- package/src/sap/ui/rta/command/AddIFrame.js +7 -7
- package/src/sap/ui/rta/command/AddProperty.js +7 -7
- package/src/sap/ui/rta/command/AddXML.js +1 -1
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +7 -7
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +18 -18
- package/src/sap/ui/rta/command/BaseCommand.js +1 -2
- 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 +11 -11
- package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +28 -3
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +26 -24
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +7 -7
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +11 -11
- package/src/sap/ui/rta/command/CreateContainer.js +2 -2
- package/src/sap/ui/rta/command/CustomAdd.js +1 -1
- package/src/sap/ui/rta/command/FlexCommand.js +30 -30
- package/src/sap/ui/rta/command/LREPSerializer.js +20 -10
- 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/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 +4 -4
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.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/enablement/TestDelegate.js +92 -92
- package/src/sap/ui/rta/enablement/elementActionTest.js +230 -112
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +11 -1
- package/src/sap/ui/rta/messagebundle_ar.properties +5 -0
- package/src/sap/ui/rta/messagebundle_bg.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ca.properties +5 -0
- package/src/sap/ui/rta/messagebundle_cs.properties +5 -0
- package/src/sap/ui/rta/messagebundle_cy.properties +5 -0
- package/src/sap/ui/rta/messagebundle_da.properties +5 -0
- package/src/sap/ui/rta/messagebundle_de.properties +6 -1
- package/src/sap/ui/rta/messagebundle_el.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en_GB.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +6 -1
- package/src/sap/ui/rta/messagebundle_es.properties +5 -0
- package/src/sap/ui/rta/messagebundle_es_MX.properties +5 -0
- package/src/sap/ui/rta/messagebundle_et.properties +5 -0
- package/src/sap/ui/rta/messagebundle_fi.properties +5 -0
- package/src/sap/ui/rta/messagebundle_fr.properties +5 -0
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +5 -0
- package/src/sap/ui/rta/messagebundle_hi.properties +5 -0
- package/src/sap/ui/rta/messagebundle_hr.properties +5 -0
- package/src/sap/ui/rta/messagebundle_hu.properties +5 -0
- package/src/sap/ui/rta/messagebundle_id.properties +5 -0
- package/src/sap/ui/rta/messagebundle_it.properties +5 -0
- package/src/sap/ui/rta/messagebundle_iw.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ja.properties +5 -0
- package/src/sap/ui/rta/messagebundle_kk.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ko.properties +5 -0
- package/src/sap/ui/rta/messagebundle_lt.properties +5 -0
- package/src/sap/ui/rta/messagebundle_lv.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ms.properties +5 -0
- package/src/sap/ui/rta/messagebundle_nl.properties +5 -0
- package/src/sap/ui/rta/messagebundle_no.properties +5 -0
- package/src/sap/ui/rta/messagebundle_pl.properties +5 -0
- package/src/sap/ui/rta/messagebundle_pt.properties +5 -0
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ro.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ru.properties +5 -0
- package/src/sap/ui/rta/messagebundle_sh.properties +5 -0
- package/src/sap/ui/rta/messagebundle_sk.properties +5 -0
- package/src/sap/ui/rta/messagebundle_sl.properties +5 -0
- package/src/sap/ui/rta/messagebundle_sv.properties +5 -0
- package/src/sap/ui/rta/messagebundle_th.properties +5 -0
- package/src/sap/ui/rta/messagebundle_tr.properties +5 -0
- package/src/sap/ui/rta/messagebundle_uk.properties +5 -0
- package/src/sap/ui/rta/messagebundle_vi.properties +5 -0
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +5 -0
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +5 -0
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +44 -44
- package/src/sap/ui/rta/plugin/BaseCreate.js +29 -29
- package/src/sap/ui/rta/plugin/Combine.js +9 -9
- package/src/sap/ui/rta/plugin/ControlVariant.js +21 -21
- package/src/sap/ui/rta/plugin/CreateContainer.js +6 -6
- package/src/sap/ui/rta/plugin/CutPaste.js +46 -46
- package/src/sap/ui/rta/plugin/DragDrop.js +2 -2
- package/src/sap/ui/rta/plugin/EasyAdd.js +4 -4
- package/src/sap/ui/rta/plugin/EasyRemove.js +5 -5
- package/src/sap/ui/rta/plugin/LocalReset.js +25 -25
- package/src/sap/ui/rta/plugin/Plugin.js +20 -20
- package/src/sap/ui/rta/plugin/RTAElementMover.js +42 -42
- package/src/sap/ui/rta/plugin/Remove.js +11 -11
- package/src/sap/ui/rta/plugin/Rename.js +7 -7
- package/src/sap/ui/rta/plugin/RenameHandler.js +17 -17
- package/src/sap/ui/rta/plugin/Resize.js +62 -62
- package/src/sap/ui/rta/plugin/Selection.js +14 -14
- package/src/sap/ui/rta/plugin/Settings.js +20 -20
- package/src/sap/ui/rta/plugin/Split.js +7 -7
- package/src/sap/ui/rta/plugin/Stretch.js +4 -4
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +94 -87
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +18 -18
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +98 -99
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +144 -144
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +3 -4
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +67 -67
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +38 -39
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +1 -0
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +29 -29
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +5 -5
- package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +1 -1
- package/src/sap/ui/rta/service/Action.js +36 -37
- package/src/sap/ui/rta/service/ControllerExtension.js +4 -4
- package/src/sap/ui/rta/service/Outline.js +59 -59
- package/src/sap/ui/rta/service/Property.js +125 -125
- package/src/sap/ui/rta/service/Receiver.js +78 -77
- package/src/sap/ui/rta/service/Selection.js +6 -6
- package/src/sap/ui/rta/service/SupportTools.js +188 -37
- package/src/sap/ui/rta/service/index.js +1 -1
- package/src/sap/ui/rta/themes/base/FlexSupportExtension.less +14 -0
- package/src/sap/ui/rta/themes/base/library.source.less +2 -1
- package/src/sap/ui/rta/toolbar/Adaptation.js +81 -26
- package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
- package/src/sap/ui/rta/toolbar/Base.js +17 -15
- package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -2
- package/src/sap/ui/rta/toolbar/Fiori.js +8 -8
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +4 -4
- package/src/sap/ui/rta/toolbar/Personalization.js +2 -2
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +13 -6
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +2 -8
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +2 -3
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptationDialog.fragment.xml +0 -2
- package/src/sap/ui/rta/toolbar/translation/Translation.js +41 -41
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +9 -9
- package/src/sap/ui/rta/util/Animation.js +5 -5
- package/src/sap/ui/rta/util/BindingsExtractor.js +33 -33
- package/src/sap/ui/rta/util/PluginManager.js +25 -25
- package/src/sap/ui/rta/util/PopupManager.js +27 -27
- package/src/sap/ui/rta/util/ReloadManager.js +1 -1
- package/src/sap/ui/rta/util/ServiceEventBus.js +3 -4
- package/src/sap/ui/rta/util/StylesLoader.js +9 -9
- package/src/sap/ui/rta/util/UrlParser.js +19 -19
- package/src/sap/ui/rta/util/adaptationStarter.js +34 -31
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +23 -19
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +61 -61
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +76 -63
- package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +6 -6
- package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
- package/src/sap/ui/rta/util/hasStableId.js +2 -2
- package/src/sap/ui/rta/util/showMessageBox.js +4 -5
- package/src/sap/ui/rta/util/validateFlexEnabled.js +5 -5
- package/src/sap/ui/rta/util/validateStableIds.js +8 -8
- package/ui5.yaml +1 -1
|
@@ -28,7 +28,7 @@ sap.ui.define([
|
|
|
28
28
|
* @extends sap.ui.rta.plugin.Plugin
|
|
29
29
|
*
|
|
30
30
|
* @author SAP SE
|
|
31
|
-
* @version 1.
|
|
31
|
+
* @version 1.117.0
|
|
32
32
|
*
|
|
33
33
|
* @constructor
|
|
34
34
|
* @private
|
|
@@ -75,7 +75,7 @@ sap.ui.define([
|
|
|
75
75
|
RenameHandler._setDesignTime.call(this, oDesignTime);
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
Rename.prototype.startEdit = function
|
|
78
|
+
Rename.prototype.startEdit = function(oOverlay) {
|
|
79
79
|
var vDomRef = this.getAction(oOverlay).domRef;
|
|
80
80
|
var fnGetTextMutators = this.getAction(oOverlay).getTextMutators;
|
|
81
81
|
RenameHandler.startEdit.call(this, {
|
|
@@ -86,11 +86,11 @@ sap.ui.define([
|
|
|
86
86
|
});
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
-
Rename.prototype.stopEdit = function
|
|
89
|
+
Rename.prototype.stopEdit = function(bRestoreFocus) {
|
|
90
90
|
RenameHandler._stopEdit.call(this, bRestoreFocus, "plugin.Rename.stopEdit");
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
-
Rename.prototype.handler = function
|
|
93
|
+
Rename.prototype.handler = function(aElementOverlays) {
|
|
94
94
|
aElementOverlays = this.getSelectedOverlays() || aElementOverlays;
|
|
95
95
|
this.startEdit(aElementOverlays[0]);
|
|
96
96
|
};
|
|
@@ -106,7 +106,7 @@ sap.ui.define([
|
|
|
106
106
|
return this._isEditableByPlugin(oOverlay);
|
|
107
107
|
};
|
|
108
108
|
|
|
109
|
-
Rename.prototype.isRenameEnabled = function
|
|
109
|
+
Rename.prototype.isRenameEnabled = function(aOverlays) {
|
|
110
110
|
return this.isEnabled(aOverlays);
|
|
111
111
|
};
|
|
112
112
|
|
|
@@ -116,7 +116,7 @@ sap.ui.define([
|
|
|
116
116
|
* @returns {boolean} true if it's enabled
|
|
117
117
|
* @public
|
|
118
118
|
*/
|
|
119
|
-
Rename.prototype.isEnabled = function
|
|
119
|
+
Rename.prototype.isEnabled = function(aElementOverlays) {
|
|
120
120
|
if (aElementOverlays.length > 1) {
|
|
121
121
|
return false;
|
|
122
122
|
}
|
|
@@ -213,7 +213,7 @@ sap.ui.define([
|
|
|
213
213
|
* @param {sap.ui.dt.ElementOverlay|sap.ui.dt.ElementOverlay[]} vElementOverlays - Target overlay(s)
|
|
214
214
|
* @return {object[]} - array of the items with required data
|
|
215
215
|
*/
|
|
216
|
-
Rename.prototype.getMenuItems = function
|
|
216
|
+
Rename.prototype.getMenuItems = function(vElementOverlays) {
|
|
217
217
|
return this._getMenuItems(vElementOverlays, { pluginId: "CTX_RENAME", rank: 10, icon: "sap-icon://edit" });
|
|
218
218
|
};
|
|
219
219
|
|
|
@@ -39,7 +39,7 @@ sap.ui.define([
|
|
|
39
39
|
* Provides Rename handling functionality
|
|
40
40
|
*
|
|
41
41
|
* @author SAP SE
|
|
42
|
-
* @version 1.
|
|
42
|
+
* @version 1.117.0
|
|
43
43
|
*
|
|
44
44
|
* @constructor
|
|
45
45
|
* @private
|
|
@@ -55,7 +55,7 @@ sap.ui.define([
|
|
|
55
55
|
/**
|
|
56
56
|
* @override
|
|
57
57
|
*/
|
|
58
|
-
_manageClickEvent: function
|
|
58
|
+
_manageClickEvent: function(vEventOrElement) {
|
|
59
59
|
var oOverlay = vEventOrElement.getSource ? vEventOrElement.getSource() : vEventOrElement;
|
|
60
60
|
if (oOverlay.isSelected() && this.isRenameAvailable(oOverlay) && this.isRenameEnabled([oOverlay])) {
|
|
61
61
|
oOverlay.attachBrowserEvent("click", RenameHandler._onClick, this);
|
|
@@ -77,7 +77,7 @@ sap.ui.define([
|
|
|
77
77
|
* @param {map} mPropertyBag - (required) contains required properties
|
|
78
78
|
* @public
|
|
79
79
|
*/
|
|
80
|
-
startEdit: function
|
|
80
|
+
startEdit: function(mPropertyBag) {
|
|
81
81
|
this.setBusy(true);
|
|
82
82
|
this._oEditedOverlay = mPropertyBag.overlay;
|
|
83
83
|
|
|
@@ -96,10 +96,10 @@ sap.ui.define([
|
|
|
96
96
|
var mMutators = typeof mPropertyBag.getTextMutators === "function"
|
|
97
97
|
? mPropertyBag.getTextMutators(oElement)
|
|
98
98
|
: {
|
|
99
|
-
getText: function
|
|
99
|
+
getText: function() {
|
|
100
100
|
return this._oEditableControlDomRef.textContent;
|
|
101
101
|
}.bind(this),
|
|
102
|
-
setText: function
|
|
102
|
+
setText: function(sNewText) {
|
|
103
103
|
this._oEditableControlDomRef.textContent = sNewText;
|
|
104
104
|
}.bind(this)
|
|
105
105
|
};
|
|
@@ -183,7 +183,7 @@ sap.ui.define([
|
|
|
183
183
|
this._oEditableField.style.textOverflow = "clip";
|
|
184
184
|
this._oEditableField.style.whiteSpace = "nowrap";
|
|
185
185
|
|
|
186
|
-
//only for renaming variants in edge browser [SPECIAL CASE]
|
|
186
|
+
// only for renaming variants in edge browser [SPECIAL CASE]
|
|
187
187
|
if (
|
|
188
188
|
Device.browser.name === "ed"
|
|
189
189
|
&& oElement.getMetadata().getName() === "sap.ui.fl.variants.VariantManagement"
|
|
@@ -230,7 +230,7 @@ sap.ui.define([
|
|
|
230
230
|
});
|
|
231
231
|
},
|
|
232
232
|
|
|
233
|
-
_setDesignTime: function
|
|
233
|
+
_setDesignTime: function(oDesignTime) {
|
|
234
234
|
this._aSelection = [];
|
|
235
235
|
var oOldDesignTime = this.getDesignTime();
|
|
236
236
|
|
|
@@ -263,7 +263,7 @@ sap.ui.define([
|
|
|
263
263
|
* @param {sap.ui.base.Event} oEvent - event object
|
|
264
264
|
* @private
|
|
265
265
|
*/
|
|
266
|
-
_stopPropagation: function
|
|
266
|
+
_stopPropagation: function(oEvent) {
|
|
267
267
|
oEvent.stopPropagation();
|
|
268
268
|
},
|
|
269
269
|
|
|
@@ -271,7 +271,7 @@ sap.ui.define([
|
|
|
271
271
|
* @param {sap.ui.base.Event} oEvent - event object
|
|
272
272
|
* @private
|
|
273
273
|
*/
|
|
274
|
-
_preventDefault: function
|
|
274
|
+
_preventDefault: function(oEvent) {
|
|
275
275
|
oEvent.preventDefault();
|
|
276
276
|
},
|
|
277
277
|
|
|
@@ -279,7 +279,7 @@ sap.ui.define([
|
|
|
279
279
|
* @param {sap.ui.base.Event} oEvent - event object
|
|
280
280
|
* @private
|
|
281
281
|
*/
|
|
282
|
-
_onEditableFieldFocus: function
|
|
282
|
+
_onEditableFieldFocus: function(oEvent) {
|
|
283
283
|
var el = oEvent.target;
|
|
284
284
|
var range = document.createRange();
|
|
285
285
|
range.selectNodeContents(el);
|
|
@@ -293,7 +293,7 @@ sap.ui.define([
|
|
|
293
293
|
* @param {string} sPluginMethodName - method name of the plugin
|
|
294
294
|
* @private
|
|
295
295
|
*/
|
|
296
|
-
_stopEdit: function
|
|
296
|
+
_stopEdit: function(bRestoreFocus, sPluginMethodName) {
|
|
297
297
|
var oOverlay;
|
|
298
298
|
this.setBusy(false);
|
|
299
299
|
this._oEditableField.removeEventListener("blur", this._oBlurHandler);
|
|
@@ -340,11 +340,11 @@ sap.ui.define([
|
|
|
340
340
|
});
|
|
341
341
|
},
|
|
342
342
|
|
|
343
|
-
_onEditableFieldBlur: function
|
|
343
|
+
_onEditableFieldBlur: function(oEvent) {
|
|
344
344
|
return RenameHandler._handlePostRename.call(this, false, oEvent);
|
|
345
345
|
},
|
|
346
346
|
|
|
347
|
-
_handlePostRename: function
|
|
347
|
+
_handlePostRename: function(bRestoreFocus, oEvent) {
|
|
348
348
|
if (!this._bBlurOrKeyDownStarted) {
|
|
349
349
|
this._oEditedOverlay.removeStyleClass(RenameHandler.errorStyleClass);
|
|
350
350
|
this._bBlurOrKeyDownStarted = true;
|
|
@@ -361,7 +361,7 @@ sap.ui.define([
|
|
|
361
361
|
}
|
|
362
362
|
throw oError;
|
|
363
363
|
})
|
|
364
|
-
.then(function
|
|
364
|
+
.then(function(fnErrorHandler) {
|
|
365
365
|
this.stopEdit(bRestoreFocus);
|
|
366
366
|
// ControlVariant rename handles the validation itself
|
|
367
367
|
if (typeof fnErrorHandler === "function") {
|
|
@@ -396,7 +396,7 @@ sap.ui.define([
|
|
|
396
396
|
validateText(sNewText, this.getOldValue(), oRenameAction);
|
|
397
397
|
},
|
|
398
398
|
|
|
399
|
-
_onEditableFieldKeydown: function
|
|
399
|
+
_onEditableFieldKeydown: function(oEvent) {
|
|
400
400
|
switch (oEvent.keyCode) {
|
|
401
401
|
case KeyCodes.ENTER:
|
|
402
402
|
// to prevent context menu from opening when rename is finished
|
|
@@ -409,7 +409,7 @@ sap.ui.define([
|
|
|
409
409
|
break;
|
|
410
410
|
case KeyCodes.DELETE:
|
|
411
411
|
case KeyCodes.BACKSPACE:
|
|
412
|
-
//Incident IDs: #1680315103, #2380033173
|
|
412
|
+
// Incident IDs: #1680315103, #2380033173
|
|
413
413
|
RenameHandler._stopPropagation.call(this, oEvent);
|
|
414
414
|
break;
|
|
415
415
|
default:
|
|
@@ -421,7 +421,7 @@ sap.ui.define([
|
|
|
421
421
|
* @returns {string} current editable field text
|
|
422
422
|
* @private
|
|
423
423
|
*/
|
|
424
|
-
_getCurrentEditableFieldText: function
|
|
424
|
+
_getCurrentEditableFieldText: function() {
|
|
425
425
|
// Rename to empty string should not be possible
|
|
426
426
|
// to prevent issues with disappearing elements
|
|
427
427
|
var sText = this._oEditableField ? this._oEditableField.textContent.trim() : "";
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* @class
|
|
28
28
|
* @extends sap.ui.rta.plugin.Plugin
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.117.0
|
|
31
31
|
* @constructor
|
|
32
32
|
* @private
|
|
33
33
|
* @since 1.101
|
|
@@ -101,24 +101,24 @@ sap.ui.define([
|
|
|
101
101
|
undefined,
|
|
102
102
|
sVariantManagementReference
|
|
103
103
|
)
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
.then(function(oResizeCommand) {
|
|
105
|
+
return oCompositeCommand.addCommand(oResizeCommand);
|
|
106
|
+
});
|
|
107
107
|
};
|
|
108
108
|
|
|
109
109
|
Resize.prototype._createCompositeCommand = function(oOverlay, oElement, aChanges) {
|
|
110
110
|
var oCompositeCommand;
|
|
111
111
|
|
|
112
112
|
return this.getCommandFactory().getCommandFor(oElement, "composite")
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
113
|
+
.then(function(_oCompositeCommand) {
|
|
114
|
+
oCompositeCommand = _oCompositeCommand;
|
|
115
|
+
return aChanges.reduce(function(oPreviousPromise, mChange) {
|
|
116
|
+
return oPreviousPromise.then(this._createResizeCommand.bind(this, oOverlay, mChange, oCompositeCommand));
|
|
117
|
+
}.bind(this), Promise.resolve());
|
|
118
|
+
}.bind(this))
|
|
119
|
+
.then(function() {
|
|
120
|
+
return oCompositeCommand;
|
|
121
|
+
});
|
|
122
122
|
};
|
|
123
123
|
|
|
124
124
|
Resize.prototype._createCommand = function(oOverlay, iNewWidth) {
|
|
@@ -127,46 +127,46 @@ sap.ui.define([
|
|
|
127
127
|
var fnHandler = oAction.handler;
|
|
128
128
|
|
|
129
129
|
return Promise.resolve()
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
.then(function() {
|
|
131
|
+
if (fnHandler) {
|
|
132
|
+
var mPropertyBag = {
|
|
133
|
+
newWidth: iNewWidth
|
|
134
|
+
};
|
|
135
|
+
return fnHandler(oElement, mPropertyBag)
|
|
136
|
+
.then(function(aChanges) {
|
|
137
|
+
if (aChanges.length > 0) {
|
|
138
|
+
return this._createCompositeCommand(oOverlay, oElement, aChanges);
|
|
139
|
+
}
|
|
140
|
+
return undefined;
|
|
141
|
+
}.bind(this))
|
|
142
|
+
.catch(function(vError) {
|
|
143
|
+
throw DtUtil.propagateError(
|
|
144
|
+
vError,
|
|
145
|
+
"Resize#handler",
|
|
146
|
+
"Error occurred during handler execution",
|
|
147
|
+
"sap.ui.rta.plugin"
|
|
148
|
+
);
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
// Case without handler - single command (= one change)
|
|
152
|
+
return this._createCompositeCommand(oOverlay, oElement, [{
|
|
153
|
+
changeSpecificData: {
|
|
154
|
+
changeType: oAction.changeType,
|
|
155
|
+
content: {
|
|
156
|
+
resizedElementId: oElement.getId(),
|
|
133
157
|
newWidth: iNewWidth
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
"Error occurred during handler execution",
|
|
147
|
-
"sap.ui.rta.plugin"
|
|
148
|
-
);
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
// Case without handler - single command (= one change)
|
|
152
|
-
return this._createCompositeCommand(oOverlay, oElement, [{
|
|
153
|
-
changeSpecificData: {
|
|
154
|
-
changeType: oAction.changeType,
|
|
155
|
-
content: {
|
|
156
|
-
resizedElementId: oElement.getId(),
|
|
157
|
-
newWidth: iNewWidth
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
selectorElement: oElement
|
|
161
|
-
}]);
|
|
162
|
-
}.bind(this))
|
|
163
|
-
.then(function(oCompositeCommand) {
|
|
164
|
-
if (oCompositeCommand && oCompositeCommand.getCommands().length > 0) {
|
|
165
|
-
this.fireElementModified({
|
|
166
|
-
command: oCompositeCommand
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
}.bind(this));
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
selectorElement: oElement
|
|
161
|
+
}]);
|
|
162
|
+
}.bind(this))
|
|
163
|
+
.then(function(oCompositeCommand) {
|
|
164
|
+
if (oCompositeCommand && oCompositeCommand.getCommands().length > 0) {
|
|
165
|
+
this.fireElementModified({
|
|
166
|
+
command: oCompositeCommand
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
}.bind(this));
|
|
170
170
|
};
|
|
171
171
|
|
|
172
172
|
Resize.prototype._onHandleMouseDown = function(oOverlay, oEvent) {
|
|
@@ -202,7 +202,7 @@ sap.ui.define([
|
|
|
202
202
|
var iHandleExtensionHeight = oAction.getHandleExtensionHeight(oElement);
|
|
203
203
|
oExtension = document.createElement("div");
|
|
204
204
|
oExtension.className = HANDLE_EXTENSION_CLASS_NAME;
|
|
205
|
-
oExtension.style
|
|
205
|
+
oExtension.style.height = iHandleExtensionHeight + "px";
|
|
206
206
|
oExtension.style["pointer-events"] = "none";
|
|
207
207
|
}
|
|
208
208
|
|
|
@@ -260,15 +260,15 @@ sap.ui.define([
|
|
|
260
260
|
oOverlay.setSelected(false);
|
|
261
261
|
|
|
262
262
|
return this._createCommand(oOverlay, iNewWidth)
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
263
|
+
.catch(function(vError) {
|
|
264
|
+
fnRestoreEventHandler.call(this);
|
|
265
|
+
throw DtUtil.propagateError(
|
|
266
|
+
vError,
|
|
267
|
+
"Resize",
|
|
268
|
+
"Error occurred during resize command creation",
|
|
269
|
+
"sap.ui.rta.plugin"
|
|
270
|
+
);
|
|
271
|
+
}.bind(this));
|
|
272
272
|
};
|
|
273
273
|
|
|
274
274
|
Resize.prototype._limitNewWidth = function(oOverlay, iNewWidth) {
|
|
@@ -12,7 +12,7 @@ sap.ui.define([
|
|
|
12
12
|
"sap/base/util/restricted/_intersection",
|
|
13
13
|
"sap/m/InstanceManager"
|
|
14
14
|
],
|
|
15
|
-
function
|
|
15
|
+
function(
|
|
16
16
|
Plugin,
|
|
17
17
|
Utils,
|
|
18
18
|
OverlayRegistry,
|
|
@@ -30,7 +30,7 @@ function (
|
|
|
30
30
|
* @class The Selection plugin allows you to select or focus overlays with mouse or keyboard and navigate to others.
|
|
31
31
|
* @extends sap.ui.rta.plugin.Plugin
|
|
32
32
|
* @author SAP SE
|
|
33
|
-
* @version 1.
|
|
33
|
+
* @version 1.117.0
|
|
34
34
|
* @constructor
|
|
35
35
|
* @private
|
|
36
36
|
* @since 1.34
|
|
@@ -70,7 +70,7 @@ function (
|
|
|
70
70
|
function hasSharedMultiSelectionPlugins(aElementOverlays, aMultiSelectionRequiredPlugins) {
|
|
71
71
|
var aSharedMultiSelectionPlugins = aMultiSelectionRequiredPlugins.slice();
|
|
72
72
|
|
|
73
|
-
aElementOverlays.forEach(function
|
|
73
|
+
aElementOverlays.forEach(function(oElementOverlay) {
|
|
74
74
|
aSharedMultiSelectionPlugins = _intersection(aSharedMultiSelectionPlugins, oElementOverlay.getEditableByPlugins());
|
|
75
75
|
});
|
|
76
76
|
|
|
@@ -78,7 +78,7 @@ function (
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
function hasSharedRelevantContainer(aElementOverlays) {
|
|
81
|
-
return aElementOverlays.every(function
|
|
81
|
+
return aElementOverlays.every(function(oElementOverlay) {
|
|
82
82
|
return oElementOverlay.getRelevantContainer() === aElementOverlays[0].getRelevantContainer();
|
|
83
83
|
});
|
|
84
84
|
}
|
|
@@ -90,12 +90,12 @@ function (
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
function isOfSameType(aElementOverlays) {
|
|
93
|
-
return aElementOverlays.every(function
|
|
93
|
+
return aElementOverlays.every(function(oElementOverlay) {
|
|
94
94
|
return oElementOverlay.getElement().getMetadata().getName() === aElementOverlays[0].getElement().getMetadata().getName();
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
Selection.prototype.init = function
|
|
98
|
+
Selection.prototype.init = function() {
|
|
99
99
|
this._multiSelectionValidator = this._multiSelectionValidator.bind(this);
|
|
100
100
|
Plugin.prototype.init.apply(this, arguments);
|
|
101
101
|
};
|
|
@@ -106,7 +106,7 @@ function (
|
|
|
106
106
|
* @returns {boolean} true if it's in developer mode
|
|
107
107
|
* @private
|
|
108
108
|
*/
|
|
109
|
-
Selection.prototype._checkDeveloperMode = function
|
|
109
|
+
Selection.prototype._checkDeveloperMode = function(oOverlay, oDesignTimeMetadata) {
|
|
110
110
|
if (oDesignTimeMetadata) {
|
|
111
111
|
var bDeveloperMode = this.getCommandFactory().getFlexSettings().developerMode;
|
|
112
112
|
if (bDeveloperMode && this.hasStableId(oOverlay)) {
|
|
@@ -139,7 +139,7 @@ function (
|
|
|
139
139
|
* @param {sap.ui.dt.Overlay} oOverlay - Overlay object
|
|
140
140
|
* @override
|
|
141
141
|
*/
|
|
142
|
-
Selection.prototype.registerElementOverlay = function
|
|
142
|
+
Selection.prototype.registerElementOverlay = function(oOverlay) {
|
|
143
143
|
var oDesignTimeMetadata = oOverlay.getDesignTimeMetadata();
|
|
144
144
|
if (
|
|
145
145
|
!oDesignTimeMetadata.markedAsNotAdaptable() &&
|
|
@@ -247,11 +247,11 @@ function (
|
|
|
247
247
|
*
|
|
248
248
|
* @private
|
|
249
249
|
*/
|
|
250
|
-
Selection.prototype._deselectOverlays = function
|
|
250
|
+
Selection.prototype._deselectOverlays = function() {
|
|
251
251
|
this.getDesignTime().getSelectionManager().reset();
|
|
252
252
|
};
|
|
253
253
|
|
|
254
|
-
Selection.prototype._selectOverlay = function
|
|
254
|
+
Selection.prototype._selectOverlay = function(oEvent) {
|
|
255
255
|
var oOverlay = OverlayRegistry.getOverlay(oEvent.currentTarget.id);
|
|
256
256
|
if (!this.getIsActive()) {
|
|
257
257
|
// Propagation should be stopped at the root overlay to prevent the selection of the underlying elements
|
|
@@ -369,21 +369,21 @@ function (
|
|
|
369
369
|
* @override
|
|
370
370
|
*/
|
|
371
371
|
Selection.prototype.setDesignTime = function() {
|
|
372
|
-
//detach from listener from old DesignTime instance
|
|
372
|
+
// detach from listener from old DesignTime instance
|
|
373
373
|
if (this.getDesignTime()) {
|
|
374
374
|
this.getDesignTime().getSelectionManager().removeValidator(this._multiSelectionValidator);
|
|
375
375
|
}
|
|
376
376
|
|
|
377
|
-
//set new DesignTime instance in parent class
|
|
377
|
+
// set new DesignTime instance in parent class
|
|
378
378
|
Plugin.prototype.setDesignTime.apply(this, arguments);
|
|
379
379
|
|
|
380
|
-
//attach listener back to the new DesignTime instance
|
|
380
|
+
// attach listener back to the new DesignTime instance
|
|
381
381
|
if (this.getDesignTime()) {
|
|
382
382
|
this.getDesignTime().getSelectionManager().addValidator(this._multiSelectionValidator);
|
|
383
383
|
}
|
|
384
384
|
};
|
|
385
385
|
|
|
386
|
-
Selection.prototype._multiSelectionValidator = function
|
|
386
|
+
Selection.prototype._multiSelectionValidator = function(aElementOverlays) {
|
|
387
387
|
return (
|
|
388
388
|
aElementOverlays.length === 1
|
|
389
389
|
|| (
|
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
* @class The Settings allows trigger change of settings operations on the overlay
|
|
26
26
|
* @extends sap.ui.rta.plugin.Plugin
|
|
27
27
|
* @author SAP SE
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.117.0
|
|
29
29
|
* @constructor
|
|
30
30
|
* @private
|
|
31
31
|
* @since 1.44
|
|
@@ -123,25 +123,25 @@ sap.ui.define([
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
return this.hasChangeHandler(mChangeSpecificData.changeType, oControl, sControlType)
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
126
|
+
.then(function(bHasChangeHandler) {
|
|
127
|
+
if (aSelectedOverlays[0].getVariantManagement && bHasChangeHandler && !oSettingsAction.CAUTION_variantIndependent) {
|
|
128
|
+
sVariantManagementReference = aSelectedOverlays[0].getVariantManagement();
|
|
129
|
+
}
|
|
130
|
+
return this.getCommandFactory().getCommandFor(
|
|
131
|
+
vSelector,
|
|
132
|
+
"settings",
|
|
133
|
+
mChangeSpecificData,
|
|
134
|
+
undefined,
|
|
135
|
+
sVariantManagementReference
|
|
136
|
+
);
|
|
137
|
+
}.bind(this))
|
|
138
|
+
.then(function(oSettingsCommand) {
|
|
139
|
+
var bRuntimeOnly = oSettingsAction.runtimeOnly;
|
|
140
|
+
if (oSettingsCommand && bRuntimeOnly) {
|
|
141
|
+
oSettingsCommand.setRuntimeOnly(bRuntimeOnly);
|
|
142
|
+
}
|
|
143
|
+
return oCompositeCommand.addCommand(oSettingsCommand);
|
|
144
|
+
});
|
|
145
145
|
};
|
|
146
146
|
|
|
147
147
|
Settings.prototype._handleAppDescriptorChangeCommand = function(mChange, oElement, oCompositeCommand) {
|
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
* @class
|
|
24
24
|
* @extends sap.ui.rta.plugin.Plugin
|
|
25
25
|
* @author SAP SE
|
|
26
|
-
* @version 1.
|
|
26
|
+
* @version 1.117.0
|
|
27
27
|
* @constructor
|
|
28
28
|
* @private
|
|
29
29
|
* @since 1.46
|
|
@@ -44,7 +44,7 @@ sap.ui.define([
|
|
|
44
44
|
* @return {Promise.<boolean>} <code>true</code> if it's editable wrapped in a promise.
|
|
45
45
|
* @private
|
|
46
46
|
*/
|
|
47
|
-
Split.prototype._isEditable = function
|
|
47
|
+
Split.prototype._isEditable = function(oOverlay) {
|
|
48
48
|
var oSplitAction = this.getAction(oOverlay);
|
|
49
49
|
if (oSplitAction && oSplitAction.changeOnRelevantContainer) {
|
|
50
50
|
return this._checkChangeHandlerAndStableId(oOverlay);
|
|
@@ -59,7 +59,7 @@ sap.ui.define([
|
|
|
59
59
|
* @return {boolean} true if available
|
|
60
60
|
* @public
|
|
61
61
|
*/
|
|
62
|
-
Split.prototype.isAvailable = function
|
|
62
|
+
Split.prototype.isAvailable = function(aElementOverlays) {
|
|
63
63
|
if (aElementOverlays.length !== 1) {
|
|
64
64
|
return false;
|
|
65
65
|
}
|
|
@@ -86,7 +86,7 @@ sap.ui.define([
|
|
|
86
86
|
* @return {boolean} true if enabled
|
|
87
87
|
* @public
|
|
88
88
|
*/
|
|
89
|
-
Split.prototype.isEnabled = function
|
|
89
|
+
Split.prototype.isEnabled = function(aElementOverlays) {
|
|
90
90
|
var oElementOverlay = aElementOverlays[0];
|
|
91
91
|
|
|
92
92
|
// check that each selected element has an enabled action
|
|
@@ -111,7 +111,7 @@ sap.ui.define([
|
|
|
111
111
|
* @param {sap.ui.dt.ElementOverlay} oElementOverlay - element overlay to split
|
|
112
112
|
* @returns {Promise<sap.ui.rta.command.Split>} Resolves with a split command
|
|
113
113
|
*/
|
|
114
|
-
Split.prototype.handleSplit = function
|
|
114
|
+
Split.prototype.handleSplit = function(oElementOverlay) {
|
|
115
115
|
var oSplitElement = oElementOverlay.getElement();
|
|
116
116
|
var oParent = oSplitElement.getParent();
|
|
117
117
|
var oDesignTimeMetadata = oElementOverlay.getDesignTimeMetadata();
|
|
@@ -154,7 +154,7 @@ sap.ui.define([
|
|
|
154
154
|
* @param {sap.ui.dt.ElementOverlay|sap.ui.dt.ElementOverlay[]} vElementOverlays - overlays for which actions are requested
|
|
155
155
|
* @return {object[]} - array of the items with required data
|
|
156
156
|
*/
|
|
157
|
-
Split.prototype.getMenuItems = function
|
|
157
|
+
Split.prototype.getMenuItems = function(vElementOverlays) {
|
|
158
158
|
return this._getMenuItems(vElementOverlays, {pluginId: "CTX_UNGROUP_FIELDS", rank: 100, icon: "sap-icon://split"});
|
|
159
159
|
};
|
|
160
160
|
|
|
@@ -170,7 +170,7 @@ sap.ui.define([
|
|
|
170
170
|
* Trigger the plugin execution.
|
|
171
171
|
* @param {sap.ui.dt.ElementOverlay[]} aElementOverlays - Target overlays
|
|
172
172
|
*/
|
|
173
|
-
Split.prototype.handler = function
|
|
173
|
+
Split.prototype.handler = function(aElementOverlays) {
|
|
174
174
|
this.handleSplit(aElementOverlays[0]);
|
|
175
175
|
};
|
|
176
176
|
|
|
@@ -31,7 +31,7 @@ sap.ui.define([
|
|
|
31
31
|
* @extends sap.ui.rta.plugin.Plugin
|
|
32
32
|
*
|
|
33
33
|
* @author SAP SE
|
|
34
|
-
* @version 1.
|
|
34
|
+
* @version 1.117.0
|
|
35
35
|
*
|
|
36
36
|
* @constructor
|
|
37
37
|
* @private
|
|
@@ -75,7 +75,7 @@ sap.ui.define([
|
|
|
75
75
|
oElement.removeStyleClass(Stretch.STRETCHSTYLECLASS);
|
|
76
76
|
}
|
|
77
77
|
} else {
|
|
78
|
-
//TODO: replace when Overlay.getAssociatedDomRef() does not return jQuery any more
|
|
78
|
+
// TODO: replace when Overlay.getAssociatedDomRef() does not return jQuery any more
|
|
79
79
|
var oElementDomRef = oOverlay.getAssociatedDomRef() && oOverlay.getAssociatedDomRef().get(0);
|
|
80
80
|
if (oElementDomRef) {
|
|
81
81
|
if (bAddClass) {
|
|
@@ -381,7 +381,7 @@ sap.ui.define([
|
|
|
381
381
|
|
|
382
382
|
Stretch.prototype._reevaluateStretching = function(oOverlay) {
|
|
383
383
|
if (!oOverlay.bIsDestroyed) {
|
|
384
|
-
//TODO: replace when getAssociatedDomRef does not return jQuery any more
|
|
384
|
+
// TODO: replace when getAssociatedDomRef does not return jQuery any more
|
|
385
385
|
var oElementDomRef = oOverlay.getAssociatedDomRef() && oOverlay.getAssociatedDomRef().get(0);
|
|
386
386
|
if (oElementDomRef) {
|
|
387
387
|
var bIsStretched = oElementDomRef.classList.contains(Stretch.STRETCHSTYLECLASS);
|
|
@@ -398,7 +398,7 @@ sap.ui.define([
|
|
|
398
398
|
|
|
399
399
|
Stretch.prototype._checkParentAndAddToStretchCandidates = function(oOverlay) {
|
|
400
400
|
var oParentOverlay = oOverlay.getParentElementOverlay();
|
|
401
|
-
//TODO: replace when getAssociatedDomRef does not return jQuery any more
|
|
401
|
+
// TODO: replace when getAssociatedDomRef does not return jQuery any more
|
|
402
402
|
var oParentElementDOM = oParentOverlay && oParentOverlay.getAssociatedDomRef() && oParentOverlay.getAssociatedDomRef().get(0);
|
|
403
403
|
if (oParentElementDOM) {
|
|
404
404
|
if (startAtSamePosition(oParentOverlay, oOverlay)) {
|