@openui5/sap.ui.rta 1.103.1 → 1.106.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 +35 -15
- package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +5 -0
- package/THIRDPARTY.txt +64 -21
- 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 +107 -418
- package/src/sap/ui/rta/Utils.js +2 -2
- package/src/sap/ui/rta/api/startAdaptation.js +2 -2
- package/src/sap/ui/rta/api/startKeyUserAdaptation.js +2 -2
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +6 -22
- package/src/sap/ui/rta/appVariant/Feature.js +4 -12
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +5 -3
- package/src/sap/ui/rta/command/AddIFrame.js +1 -1
- package/src/sap/ui/rta/command/AddProperty.js +1 -1
- package/src/sap/ui/rta/command/AddXML.js +1 -1
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +8 -3
- package/src/sap/ui/rta/command/BaseCommand.js +1 -1
- package/src/sap/ui/rta/command/BindProperty.js +1 -1
- package/src/sap/ui/rta/command/Combine.js +1 -1
- package/src/sap/ui/rta/command/CommandFactory.js +1 -1
- package/src/sap/ui/rta/command/CompositeCommand.js +7 -5
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +4 -2
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +5 -3
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +5 -4
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/CreateContainer.js +1 -1
- package/src/sap/ui/rta/command/CustomAdd.js +1 -1
- package/src/sap/ui/rta/command/FlexCommand.js +5 -3
- package/src/sap/ui/rta/command/LREPSerializer.js +11 -8
- 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 +17 -7
- 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 +6 -4
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +6 -4
- package/src/sap/ui/rta/enablement/elementActionTest.js +89 -15
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +46 -11
- package/src/sap/ui/rta/messagebundle_ar.properties +24 -8
- package/src/sap/ui/rta/messagebundle_bg.properties +25 -9
- package/src/sap/ui/rta/messagebundle_ca.properties +25 -9
- package/src/sap/ui/rta/messagebundle_cs.properties +24 -8
- package/src/sap/ui/rta/messagebundle_cy.properties +22 -6
- package/src/sap/ui/rta/messagebundle_da.properties +26 -10
- package/src/sap/ui/rta/messagebundle_de.properties +27 -11
- package/src/sap/ui/rta/messagebundle_el.properties +25 -9
- package/src/sap/ui/rta/messagebundle_en.properties +26 -10
- package/src/sap/ui/rta/messagebundle_en_GB.properties +26 -10
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +30 -11
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +18 -1
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +27 -11
- package/src/sap/ui/rta/messagebundle_es.properties +22 -6
- package/src/sap/ui/rta/messagebundle_es_MX.properties +20 -4
- package/src/sap/ui/rta/messagebundle_et.properties +22 -6
- package/src/sap/ui/rta/messagebundle_fi.properties +26 -10
- package/src/sap/ui/rta/messagebundle_fr.properties +23 -7
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +25 -9
- package/src/sap/ui/rta/messagebundle_hi.properties +25 -9
- package/src/sap/ui/rta/messagebundle_hr.properties +25 -9
- package/src/sap/ui/rta/messagebundle_hu.properties +18 -2
- package/src/sap/ui/rta/messagebundle_id.properties +24 -8
- package/src/sap/ui/rta/messagebundle_it.properties +25 -9
- package/src/sap/ui/rta/messagebundle_iw.properties +25 -9
- package/src/sap/ui/rta/messagebundle_ja.properties +25 -9
- package/src/sap/ui/rta/messagebundle_kk.properties +25 -9
- package/src/sap/ui/rta/messagebundle_ko.properties +25 -9
- package/src/sap/ui/rta/messagebundle_lt.properties +24 -8
- package/src/sap/ui/rta/messagebundle_lv.properties +22 -6
- package/src/sap/ui/rta/messagebundle_ms.properties +26 -10
- package/src/sap/ui/rta/messagebundle_nl.properties +26 -10
- package/src/sap/ui/rta/messagebundle_no.properties +25 -9
- package/src/sap/ui/rta/messagebundle_pl.properties +24 -8
- package/src/sap/ui/rta/messagebundle_pt.properties +25 -9
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +24 -8
- package/src/sap/ui/rta/messagebundle_ro.properties +24 -8
- package/src/sap/ui/rta/messagebundle_ru.properties +25 -9
- package/src/sap/ui/rta/messagebundle_sh.properties +26 -10
- package/src/sap/ui/rta/messagebundle_sk.properties +24 -8
- package/src/sap/ui/rta/messagebundle_sl.properties +22 -6
- package/src/sap/ui/rta/messagebundle_sv.properties +26 -10
- package/src/sap/ui/rta/messagebundle_th.properties +28 -12
- package/src/sap/ui/rta/messagebundle_tr.properties +25 -9
- package/src/sap/ui/rta/messagebundle_uk.properties +26 -10
- package/src/sap/ui/rta/messagebundle_vi.properties +25 -9
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +25 -9
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +24 -8
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +2 -2
- package/src/sap/ui/rta/plugin/BaseCreate.js +2 -2
- package/src/sap/ui/rta/plugin/Combine.js +1 -1
- package/src/sap/ui/rta/plugin/CompVariant.js +10 -8
- package/src/sap/ui/rta/plugin/ControlVariant.js +21 -15
- package/src/sap/ui/rta/plugin/CreateContainer.js +9 -4
- package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
- package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
- package/src/sap/ui/rta/plugin/EasyAdd.js +3 -1
- package/src/sap/ui/rta/plugin/EasyRemove.js +3 -1
- package/src/sap/ui/rta/plugin/LocalReset.js +2 -2
- package/src/sap/ui/rta/plugin/Plugin.js +1 -1
- package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
- package/src/sap/ui/rta/plugin/Remove.js +1 -1
- package/src/sap/ui/rta/plugin/Rename.js +3 -3
- package/src/sap/ui/rta/plugin/RenameHandler.js +23 -5
- package/src/sap/ui/rta/plugin/Resize.js +3 -3
- package/src/sap/ui/rta/plugin/Selection.js +12 -1
- package/src/sap/ui/rta/plugin/Settings.js +2 -2
- package/src/sap/ui/rta/plugin/Split.js +2 -2
- package/src/sap/ui/rta/plugin/Stretch.js +7 -3
- 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/AdditionalElementsAnalyzer.js +14 -11
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +9 -9
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +2 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +3 -3
- 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 +8 -9
- 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 +189 -0
- package/src/sap/ui/rta/service/index.js +7 -6
- package/src/sap/ui/rta/themes/base/Toolbar.adaptation.less +19 -4
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +11 -1
- package/src/sap/ui/rta/toolbar/Adaptation.js +13 -4
- package/src/sap/ui/rta/toolbar/Base.js +8 -4
- package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
- package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsContextBasedAdaptation.js +132 -0
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsContextBasedAdaptationDialog.fragment.xml +79 -0
- package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -5
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
- package/src/sap/ui/rta/util/BindingsExtractor.js +89 -42
- package/src/sap/ui/rta/util/PluginManager.js +1 -1
- package/src/sap/ui/rta/util/PopupManager.js +1 -1
- package/src/sap/ui/rta/util/ReloadManager.js +331 -0
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/adaptationStarter.js +27 -12
- package/src/sap/ui/rta/util/changeVisualization/ChangeCategories.js +50 -0
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +115 -63
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorCategorySelection.fragment.xml +2 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorPopover.fragment.xml +2 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +143 -79
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +86 -180
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +2 -2
- package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +87 -0
- package/src/sap/ui/rta/util/changeVisualization/{categories → commands}/MoveVisualization.js +6 -4
- package/src/sap/ui/rta/util/changeVisualization/{categories → commands}/RenameVisualization.js +2 -2
- package/src/sap/ui/rta/util/changeVisualization/{categories → commands}/SplitVisualization.js +6 -4
- package/src/sap/ui/rta/util/changeVisualization/commands/getCommandVisualization.js +37 -0
- package/src/sap/ui/rta/util/changeVisualization/categories/getVisualizationCategory.js +0 -27
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
3
|
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
@@ -167,12 +167,14 @@ sap.ui.define([
|
|
|
167
167
|
function changeContent(aOverlays) {
|
|
168
168
|
var oControl = aOverlays[0].getElementInstance();
|
|
169
169
|
var oAction = this.getAction(aOverlays[0]);
|
|
170
|
-
oAction.handler(oControl, {styleClass: Utils.getRtaStyleClassName()}).then(function(aData) {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
170
|
+
return oAction.handler(oControl, {styleClass: Utils.getRtaStyleClassName()}).then(function(aData) {
|
|
171
|
+
if (aData && aData.length) {
|
|
172
|
+
createCommandAndFireEvent.call(this, aOverlays[0], "compVariantContent", {
|
|
173
|
+
variantId: aData[0].changeSpecificData.content.key,
|
|
174
|
+
newContent: aData[0].changeSpecificData.content.content,
|
|
175
|
+
persistencyKey: aData[0].changeSpecificData.content.persistencyKey
|
|
176
|
+
}, oControl.getVariantManagement());
|
|
177
|
+
}
|
|
176
178
|
}.bind(this));
|
|
177
179
|
}
|
|
178
180
|
|
|
@@ -43,7 +43,7 @@ sap.ui.define([
|
|
|
43
43
|
* @class The ControlVariant allows propagation of variantManagement key
|
|
44
44
|
* @extends sap.ui.rta.plugin.Plugin
|
|
45
45
|
* @author SAP SE
|
|
46
|
-
* @version 1.
|
|
46
|
+
* @version 1.106.0
|
|
47
47
|
* @constructor
|
|
48
48
|
* @private
|
|
49
49
|
* @since 1.50
|
|
@@ -484,6 +484,7 @@ sap.ui.define([
|
|
|
484
484
|
/**
|
|
485
485
|
* Opens a dialog for Variant configuration.
|
|
486
486
|
* @param {sap.ui.dt.ElementOverlay[]} aElementOverlays - Target overlays
|
|
487
|
+
* @returns {Promise} Resolving when the dialog is closed and the command is created
|
|
487
488
|
* @public
|
|
488
489
|
*/
|
|
489
490
|
ControlVariant.prototype.configureVariants = function (aElementOverlays) {
|
|
@@ -494,7 +495,7 @@ sap.ui.define([
|
|
|
494
495
|
var oDesignTimeMetadata = oElementOverlay.getDesignTimeMetadata();
|
|
495
496
|
var mFlexSettings = this.getCommandFactory().getFlexSettings();
|
|
496
497
|
|
|
497
|
-
oModel.manageVariants(
|
|
498
|
+
return oModel.manageVariants(
|
|
498
499
|
oVariantManagementControl,
|
|
499
500
|
sVariantManagementReference,
|
|
500
501
|
mFlexSettings.layer,
|
|
@@ -502,22 +503,27 @@ sap.ui.define([
|
|
|
502
503
|
ContextSharingAPI.createComponent(mFlexSettings)
|
|
503
504
|
)
|
|
504
505
|
.then(function(aConfiguredChanges) {
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
506
|
+
if (aConfiguredChanges.length > 0) {
|
|
507
|
+
return this.getCommandFactory().getCommandFor(
|
|
508
|
+
oVariantManagementControl,
|
|
509
|
+
"configure",
|
|
510
|
+
{
|
|
511
|
+
control: oVariantManagementControl,
|
|
512
|
+
changes: aConfiguredChanges
|
|
513
|
+
},
|
|
514
|
+
oDesignTimeMetadata,
|
|
515
|
+
sVariantManagementReference
|
|
516
|
+
);
|
|
517
|
+
}
|
|
518
|
+
return undefined;
|
|
515
519
|
}.bind(this))
|
|
516
520
|
|
|
517
521
|
.then(function(oConfigureCommand) {
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
522
|
+
if (oConfigureCommand) {
|
|
523
|
+
this.fireElementModified({
|
|
524
|
+
command: oConfigureCommand
|
|
525
|
+
});
|
|
526
|
+
}
|
|
521
527
|
}.bind(this))
|
|
522
528
|
|
|
523
529
|
.catch(function(oMessage) {
|
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
* @class The CreateContainer allows trigger CreateContainer operations on the overlay
|
|
26
26
|
* @extends sap.ui.rta.plugin.BaseCreate
|
|
27
27
|
* @author SAP SE
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.106.0
|
|
29
29
|
* @constructor
|
|
30
30
|
* @private
|
|
31
31
|
* @since 1.34
|
|
@@ -48,7 +48,7 @@ sap.ui.define([
|
|
|
48
48
|
* @return {boolean} Indicates if action is enabled
|
|
49
49
|
* @override
|
|
50
50
|
*/
|
|
51
|
-
CreateContainer.prototype.isEnabled = function(
|
|
51
|
+
CreateContainer.prototype.isEnabled = function(aElementOverlays, bSibling) {
|
|
52
52
|
var oElementOverlay = aElementOverlays[0];
|
|
53
53
|
var oAction = this.getCreateAction(bSibling, oElementOverlay);
|
|
54
54
|
return this.isActionEnabled(oAction, bSibling, oElementOverlay);
|
|
@@ -118,13 +118,18 @@ sap.ui.define([
|
|
|
118
118
|
var sPluginId = "CTX_CREATE_SIBLING_CONTAINER";
|
|
119
119
|
var iRank = 40;
|
|
120
120
|
var aMenuItems = [];
|
|
121
|
+
|
|
122
|
+
var isMenuItemEnabled = function (bOverlayIsSibling, aOverlays) {
|
|
123
|
+
return this.isEnabled(aOverlays, bOverlayIsSibling);
|
|
124
|
+
}.bind(this);
|
|
125
|
+
|
|
121
126
|
for (var i = 0; i < 2; i++) {
|
|
122
|
-
if (this.isAvailable(
|
|
127
|
+
if (this.isAvailable(aElementOverlays, bOverlayIsSibling)) {
|
|
123
128
|
aMenuItems.push({
|
|
124
129
|
id: sPluginId,
|
|
125
130
|
text: this.getCreateContainerText.bind(this, bOverlayIsSibling),
|
|
126
131
|
handler: this.handleCreate.bind(this, bOverlayIsSibling, aElementOverlays[0]),
|
|
127
|
-
enabled:
|
|
132
|
+
enabled: isMenuItemEnabled.bind(this, bOverlayIsSibling),
|
|
128
133
|
icon: "sap-icon://add-folder",
|
|
129
134
|
rank: iRank
|
|
130
135
|
});
|
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
* @class The EasyAdd Plugin adds an Icon to an Overlay, which allows to trigger add operations directly
|
|
26
26
|
* @extends sap.ui.rta.plugin.additionalElements.AdditionalElementsPlugin
|
|
27
27
|
* @author SAP SE
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.106.0
|
|
29
29
|
* @constructor
|
|
30
30
|
* @private
|
|
31
31
|
* @since 1.48
|
|
@@ -114,6 +114,8 @@ sap.ui.define([
|
|
|
114
114
|
oOverlay.removeStyleClass("sapUiRtaPersAddTop");
|
|
115
115
|
oControl.$("sectionsContainer").removeClass("sapUiRtaPaddingTop");
|
|
116
116
|
}
|
|
117
|
+
|
|
118
|
+
AdditionalElementsPlugin.prototype.deregisterElementOverlay.apply(this, arguments);
|
|
117
119
|
};
|
|
118
120
|
|
|
119
121
|
/**
|
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
* @class The EasyRemove Plugin adds an Icon to an Overlay, which allows to trigger remove operations directly
|
|
24
24
|
* @extends sap.ui.rta.plugin.Remove
|
|
25
25
|
* @author SAP SE
|
|
26
|
-
* @version 1.
|
|
26
|
+
* @version 1.106.0
|
|
27
27
|
* @constructor
|
|
28
28
|
* @private
|
|
29
29
|
* @since 1.48
|
|
@@ -125,6 +125,8 @@ sap.ui.define([
|
|
|
125
125
|
oOverlay._oDeleteButton.destroy();
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
+
|
|
129
|
+
Remove.prototype.deregisterElementOverlay.apply(this, arguments);
|
|
128
130
|
};
|
|
129
131
|
|
|
130
132
|
return EasyRemove;
|
|
@@ -35,7 +35,7 @@ sap.ui.define([
|
|
|
35
35
|
* @class
|
|
36
36
|
* @extends sap.ui.rta.plugin.Plugin
|
|
37
37
|
* @author SAP SE
|
|
38
|
-
* @version 1.
|
|
38
|
+
* @version 1.106.0
|
|
39
39
|
* @constructor
|
|
40
40
|
* @private
|
|
41
41
|
* @since 1.90
|
|
@@ -170,7 +170,7 @@ sap.ui.define([
|
|
|
170
170
|
throw DtUtil.propagateError(
|
|
171
171
|
vError,
|
|
172
172
|
"LocalReset#handler",
|
|
173
|
-
"Error
|
|
173
|
+
"Error occurred during handler execution",
|
|
174
174
|
"sap.ui.rta.plugin"
|
|
175
175
|
);
|
|
176
176
|
});
|
|
@@ -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.106.0
|
|
32
32
|
*
|
|
33
33
|
* @constructor
|
|
34
34
|
* @private
|
|
@@ -172,7 +172,7 @@ sap.ui.define([
|
|
|
172
172
|
oOverlay.detachEvent("editableChange", RenameHandler._manageClickEvent, this);
|
|
173
173
|
oOverlay.detachBrowserEvent("click", RenameHandler._onClick, this);
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
Plugin.prototype.deregisterElementOverlay.apply(this, arguments);
|
|
176
176
|
};
|
|
177
177
|
|
|
178
178
|
/**
|
|
@@ -200,7 +200,7 @@ sap.ui.define([
|
|
|
200
200
|
}.bind(this))
|
|
201
201
|
|
|
202
202
|
.catch(function(oError) {
|
|
203
|
-
Log.error("Error during rename
|
|
203
|
+
Log.error("Error during rename: ", oError);
|
|
204
204
|
});
|
|
205
205
|
};
|
|
206
206
|
|
|
@@ -15,7 +15,8 @@ sap.ui.define([
|
|
|
15
15
|
"sap/ui/dt/OverlayRegistry",
|
|
16
16
|
"sap/ui/rta/Utils",
|
|
17
17
|
"sap/ui/dt/DOMUtil",
|
|
18
|
-
"sap/ui/events/KeyCodes"
|
|
18
|
+
"sap/ui/events/KeyCodes",
|
|
19
|
+
"sap/ui/dt/OverlayUtil"
|
|
19
20
|
], function(
|
|
20
21
|
BindingParser,
|
|
21
22
|
jQuery,
|
|
@@ -26,7 +27,8 @@ sap.ui.define([
|
|
|
26
27
|
OverlayRegistry,
|
|
27
28
|
Utils,
|
|
28
29
|
DOMUtil,
|
|
29
|
-
KeyCodes
|
|
30
|
+
KeyCodes,
|
|
31
|
+
OverlayUtil
|
|
30
32
|
) {
|
|
31
33
|
"use strict";
|
|
32
34
|
|
|
@@ -55,7 +57,7 @@ sap.ui.define([
|
|
|
55
57
|
* Provides Rename handling functionality
|
|
56
58
|
*
|
|
57
59
|
* @author SAP SE
|
|
58
|
-
* @version 1.
|
|
60
|
+
* @version 1.106.0
|
|
59
61
|
*
|
|
60
62
|
* @constructor
|
|
61
63
|
* @private
|
|
@@ -89,6 +91,13 @@ sap.ui.define([
|
|
|
89
91
|
}
|
|
90
92
|
},
|
|
91
93
|
|
|
94
|
+
_setEditableFieldPosition: function() {
|
|
95
|
+
if (this._$editableField) {
|
|
96
|
+
this._$editableField.offset({left: this._$oEditableControlDomRef.offset().left});
|
|
97
|
+
this._$editableField.offset({top: this._$oEditableControlDomRef.offset().top});
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
|
|
92
101
|
/**
|
|
93
102
|
* @param {map} mPropertyBag - (required) contains required properties
|
|
94
103
|
* @public
|
|
@@ -218,11 +227,17 @@ sap.ui.define([
|
|
|
218
227
|
|
|
219
228
|
this._$oEditableControlDomRef.css("visibility", "hidden");
|
|
220
229
|
_$oWrapper.offset({left: this._$oEditableControlDomRef.offset().left});
|
|
221
|
-
|
|
222
|
-
this._$editableField.offset({top: this._$oEditableControlDomRef.offset().top});
|
|
230
|
+
RenameHandler._setEditableFieldPosition.apply(this);
|
|
223
231
|
this._$editableField.css("visibility", "");
|
|
224
232
|
this._$editableField.trigger("focus");
|
|
225
233
|
|
|
234
|
+
// If scrolling happens during startEdit, the position of the editable field can be wrong
|
|
235
|
+
// To avoid this, the position is recalculated after the scrollbar synchronization is ready
|
|
236
|
+
this._aOverlaysWithScrollbar = OverlayUtil.findParentOverlaysWithScrollbar(oOverlayForWrapper);
|
|
237
|
+
this._aOverlaysWithScrollbar.forEach(function(oOverlayWithScrollbar) {
|
|
238
|
+
oOverlayWithScrollbar.attachScrollSynced(RenameHandler._setEditableFieldPosition, this);
|
|
239
|
+
}.bind(this));
|
|
240
|
+
|
|
226
241
|
// keep Overlay selected while renaming
|
|
227
242
|
mPropertyBag.overlay.setSelected(true);
|
|
228
243
|
sap.ui.getCore().getEventBus().publish("sap.ui.rta", mPropertyBag.pluginMethodName, {
|
|
@@ -316,6 +331,9 @@ sap.ui.define([
|
|
|
316
331
|
oOverlay.focus();
|
|
317
332
|
}
|
|
318
333
|
|
|
334
|
+
this._aOverlaysWithScrollbar.forEach(function(oOverlayWithScrollbar) {
|
|
335
|
+
oOverlayWithScrollbar.detachScrollSynced(RenameHandler._setEditableFieldPosition, this);
|
|
336
|
+
}.bind(this));
|
|
319
337
|
delete this._$editableField;
|
|
320
338
|
delete this._$oEditableControlDomRef;
|
|
321
339
|
delete this._oEditedOverlay;
|
|
@@ -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.106.0
|
|
31
31
|
* @constructor
|
|
32
32
|
* @private
|
|
33
33
|
* @since 1.101
|
|
@@ -143,7 +143,7 @@ sap.ui.define([
|
|
|
143
143
|
throw DtUtil.propagateError(
|
|
144
144
|
vError,
|
|
145
145
|
"Resize#handler",
|
|
146
|
-
"Error
|
|
146
|
+
"Error occurred during handler execution",
|
|
147
147
|
"sap.ui.rta.plugin"
|
|
148
148
|
);
|
|
149
149
|
});
|
|
@@ -265,7 +265,7 @@ sap.ui.define([
|
|
|
265
265
|
throw DtUtil.propagateError(
|
|
266
266
|
vError,
|
|
267
267
|
"Resize",
|
|
268
|
-
"Error
|
|
268
|
+
"Error occurred during resize command creation",
|
|
269
269
|
"sap.ui.rta.plugin"
|
|
270
270
|
);
|
|
271
271
|
}.bind(this));
|
|
@@ -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.106.0
|
|
34
34
|
* @constructor
|
|
35
35
|
* @private
|
|
36
36
|
* @since 1.34
|
|
@@ -133,6 +133,17 @@ function (
|
|
|
133
133
|
}
|
|
134
134
|
};
|
|
135
135
|
|
|
136
|
+
/**
|
|
137
|
+
* Gets the value of the isActive property.
|
|
138
|
+
* When set to <code>true</code>, then additional check for busy plugnis is triggered.
|
|
139
|
+
* @return {boolean} bValue - <code>false</code> if inactive or some busy plugins available.
|
|
140
|
+
*/
|
|
141
|
+
Selection.prototype.getIsActive = function() {
|
|
142
|
+
return this.getProperty("isActive")
|
|
143
|
+
&& this.getDesignTime()
|
|
144
|
+
&& !this.getDesignTime().getBusyPlugins().length;
|
|
145
|
+
};
|
|
146
|
+
|
|
136
147
|
/**
|
|
137
148
|
* Register an overlay
|
|
138
149
|
*
|
|
@@ -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.106.0
|
|
29
29
|
* @constructor
|
|
30
30
|
* @private
|
|
31
31
|
* @since 1.44
|
|
@@ -236,7 +236,7 @@ sap.ui.define([
|
|
|
236
236
|
throw DtUtil.propagateError(
|
|
237
237
|
vError,
|
|
238
238
|
"Settings#handler",
|
|
239
|
-
"Error
|
|
239
|
+
"Error occurred during handler execution",
|
|
240
240
|
"sap.ui.rta.plugin"
|
|
241
241
|
);
|
|
242
242
|
});
|
|
@@ -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.106.0
|
|
27
27
|
* @constructor
|
|
28
28
|
* @private
|
|
29
29
|
* @since 1.46
|
|
@@ -143,7 +143,7 @@ sap.ui.define([
|
|
|
143
143
|
throw DtUtil.propagateError(
|
|
144
144
|
vError,
|
|
145
145
|
"Split#handleSplit",
|
|
146
|
-
"Error
|
|
146
|
+
"Error occurred during handleSplit execution",
|
|
147
147
|
"sap.ui.rta.plugin"
|
|
148
148
|
);
|
|
149
149
|
});
|
|
@@ -10,13 +10,15 @@ sap.ui.define([
|
|
|
10
10
|
"sap/ui/dt/OverlayRegistry",
|
|
11
11
|
"sap/ui/dt/OverlayUtil",
|
|
12
12
|
"sap/base/util/includes",
|
|
13
|
-
"sap/base/util/restricted/_debounce"
|
|
13
|
+
"sap/base/util/restricted/_debounce",
|
|
14
|
+
"sap/ui/thirdparty/jquery"
|
|
14
15
|
], function(
|
|
15
16
|
Plugin,
|
|
16
17
|
OverlayRegistry,
|
|
17
18
|
OverlayUtil,
|
|
18
19
|
includes,
|
|
19
|
-
_debounce
|
|
20
|
+
_debounce,
|
|
21
|
+
jQuery
|
|
20
22
|
) {
|
|
21
23
|
"use strict";
|
|
22
24
|
|
|
@@ -31,7 +33,7 @@ sap.ui.define([
|
|
|
31
33
|
* @extends sap.ui.rta.plugin.Plugin
|
|
32
34
|
*
|
|
33
35
|
* @author SAP SE
|
|
34
|
-
* @version 1.
|
|
36
|
+
* @version 1.106.0
|
|
35
37
|
*
|
|
36
38
|
* @constructor
|
|
37
39
|
* @private
|
|
@@ -211,6 +213,8 @@ sap.ui.define([
|
|
|
211
213
|
*/
|
|
212
214
|
Stretch.prototype.deregisterElementOverlay = function(oOverlay) {
|
|
213
215
|
toggleStyleClass(oOverlay, false);
|
|
216
|
+
|
|
217
|
+
Plugin.prototype.deregisterElementOverlay.apply(this, arguments);
|
|
214
218
|
};
|
|
215
219
|
|
|
216
220
|
/**
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
* handled by the AdditionalElements Plugin (Reveal, Add Via Delegate, Add Custom)
|
|
33
33
|
*
|
|
34
34
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.106.0
|
|
36
36
|
* @private
|
|
37
37
|
* @since 1.94
|
|
38
38
|
* @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
@@ -5,21 +5,19 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
+
"sap/base/util/isPlainObject",
|
|
8
9
|
"sap/base/util/ObjectPath",
|
|
9
|
-
"sap/base/Log",
|
|
10
10
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
11
11
|
"sap/ui/dt/ElementUtil",
|
|
12
12
|
"sap/ui/fl/apply/api/DelegateMediatorAPI",
|
|
13
|
-
"sap/ui/rta/util/BindingsExtractor"
|
|
14
|
-
"sap/ui/thirdparty/jquery"
|
|
13
|
+
"sap/ui/rta/util/BindingsExtractor"
|
|
15
14
|
], function(
|
|
15
|
+
isPlainObject,
|
|
16
16
|
ObjectPath,
|
|
17
|
-
Log,
|
|
18
17
|
JsControlTreeModifier,
|
|
19
18
|
ElementUtil,
|
|
20
19
|
DelegateMediatorAPI,
|
|
21
|
-
BindingsExtractor
|
|
22
|
-
jQuery
|
|
20
|
+
BindingsExtractor
|
|
23
21
|
) {
|
|
24
22
|
"use strict";
|
|
25
23
|
|
|
@@ -252,7 +250,7 @@ sap.ui.define([
|
|
|
252
250
|
|
|
253
251
|
function _vBindingToPath(vBinding) {
|
|
254
252
|
return (
|
|
255
|
-
|
|
253
|
+
isPlainObject(vBinding)
|
|
256
254
|
? vBinding.parts[0].path //TODO what about complex bindings with multiple paths, this was not covered so far?
|
|
257
255
|
: !!vBinding.getPath && vBinding.getPath()
|
|
258
256
|
);
|
|
@@ -264,9 +262,11 @@ sap.ui.define([
|
|
|
264
262
|
var aBindingPaths = [];
|
|
265
263
|
|
|
266
264
|
aRelevantElements.forEach(function(oElement) {
|
|
267
|
-
aBindingPaths = aBindingPaths.concat(BindingsExtractor.getBindings(
|
|
268
|
-
|
|
269
|
-
|
|
265
|
+
aBindingPaths = aBindingPaths.concat(BindingsExtractor.getBindings({
|
|
266
|
+
element: oElement,
|
|
267
|
+
model: oModel,
|
|
268
|
+
parent: oElement.getParent()
|
|
269
|
+
}).map(_vBindingToPath));
|
|
270
270
|
});
|
|
271
271
|
return aBindingPaths;
|
|
272
272
|
}
|
|
@@ -399,7 +399,10 @@ sap.ui.define([
|
|
|
399
399
|
// BCP: 1880498671
|
|
400
400
|
} else if (_getBindingContextPath(oElement, sAggregationName, sModelName) === _getBindingContextPath(oInvisibleElement, sAggregationName, sModelName)) {
|
|
401
401
|
aBindingPaths = BindingsExtractor.collectBindingPaths(oInvisibleElement, oModel).bindingPaths;
|
|
402
|
-
} else if (mAddViaDelegate && BindingsExtractor.getBindings(
|
|
402
|
+
} else if (mAddViaDelegate && BindingsExtractor.getBindings({
|
|
403
|
+
element: oInvisibleElement,
|
|
404
|
+
model: oModel
|
|
405
|
+
}).length > 0) {
|
|
403
406
|
bIncludeElement = false;
|
|
404
407
|
}
|
|
405
408
|
|
|
@@ -75,7 +75,7 @@ sap.ui.define([
|
|
|
75
75
|
* @class The plugin allows to add additional elements that exist either hidden in the UI or in the OData service
|
|
76
76
|
* @extends sap.ui.rta.plugin.Plugin
|
|
77
77
|
* @author SAP SE
|
|
78
|
-
* @version 1.
|
|
78
|
+
* @version 1.106.0
|
|
79
79
|
* @constructor
|
|
80
80
|
* @private
|
|
81
81
|
* @since 1.44
|
|
@@ -144,13 +144,13 @@ sap.ui.define([
|
|
|
144
144
|
return AdditionalElementsUtils.getText("CTX_ADD_ELEMENTS", mActions, mParents.parent, SINGULAR);
|
|
145
145
|
},
|
|
146
146
|
|
|
147
|
-
isAvailable: function
|
|
147
|
+
isAvailable: function(aElementOverlays, bOverlayIsSibling) {
|
|
148
148
|
return aElementOverlays.every(function (oElementOverlay) {
|
|
149
149
|
return this._isEditableByPlugin(oElementOverlay, bOverlayIsSibling);
|
|
150
150
|
}, this);
|
|
151
151
|
},
|
|
152
152
|
|
|
153
|
-
isEnabled: function(
|
|
153
|
+
isEnabled: function(aElementOverlays, bOverlayIsSibling, sAggregationName) {
|
|
154
154
|
if (aElementOverlays.length > 1) {
|
|
155
155
|
return false;
|
|
156
156
|
}
|
|
@@ -452,8 +452,8 @@ sap.ui.define([
|
|
|
452
452
|
var bHasChildren = aElementsWithAggregations[0].length > 0;
|
|
453
453
|
var bHasMultipleAggregations = aElementsWithAggregations[0].length > 1;
|
|
454
454
|
var bHasSiblings = aElementsWithAggregations[1].length > 0;
|
|
455
|
-
var bIsAvailableForChildren = this.isAvailable(
|
|
456
|
-
var bIsAvailableForSibling = this.isAvailable(
|
|
455
|
+
var bIsAvailableForChildren = this.isAvailable(aElementOverlays, false);
|
|
456
|
+
var bIsAvailableForSibling = this.isAvailable(aElementOverlays, true);
|
|
457
457
|
if (bIsAvailableForSibling && (!bIsAvailableForChildren || !bHasChildren)) {
|
|
458
458
|
// Case 1: Only siblings -> No submenu required
|
|
459
459
|
oMenuItem = this._buildMenuItem("CTX_ADD_ELEMENTS_AS_SIBLING", true, aElementOverlays, aElementsWithAggregations, false);
|
|
@@ -507,7 +507,7 @@ sap.ui.define([
|
|
|
507
507
|
id: sPluginId,
|
|
508
508
|
text: this.getContextMenuText.bind(this, bOverlayIsSibling, oSelectedOverlay, sAggregationName, bHasSubMenu),
|
|
509
509
|
enabled: bHasSubMenu || function(bOverlayIsSibling, aElementOverlays) {
|
|
510
|
-
return this.isEnabled(
|
|
510
|
+
return this.isEnabled(aElementOverlays, bOverlayIsSibling, sAggregationName);
|
|
511
511
|
}.bind(this, bOverlayIsSibling),
|
|
512
512
|
rank: 20,
|
|
513
513
|
icon: "sap-icon://add",
|
|
@@ -544,9 +544,9 @@ sap.ui.define([
|
|
|
544
544
|
var oItem = {
|
|
545
545
|
id: sPluginId + '_' + iPosition,
|
|
546
546
|
text: sDisplayText,
|
|
547
|
-
enabled: function(
|
|
548
|
-
return this.isEnabled(
|
|
549
|
-
}.bind(this
|
|
547
|
+
enabled: function(aElementOverlays) {
|
|
548
|
+
return this.isEnabled(aElementOverlays, bOverlayIsSibling, sAggregationName);
|
|
549
|
+
}.bind(this),
|
|
550
550
|
handler: function (bOverlayIsSibling, aElementOverlays) {
|
|
551
551
|
// showAvailableElements has optional parameters
|
|
552
552
|
return this.showAvailableElements(bOverlayIsSibling, sAggregationName, aElementOverlays, undefined, undefined, sDisplayText);
|
|
@@ -15,7 +15,7 @@ sap.ui.define([
|
|
|
15
15
|
* Helper object containing methods for the AdditionalElements plugin
|
|
16
16
|
*
|
|
17
17
|
* @author SAP SE
|
|
18
|
-
* @version 1.
|
|
18
|
+
* @version 1.106.0
|
|
19
19
|
* @private
|
|
20
20
|
* @since 1.94
|
|
21
21
|
* @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
* Helper object to build the RTA commands resulting from the AdditionalElements Plugin
|
|
26
26
|
*
|
|
27
27
|
* @author SAP SE
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.106.0
|
|
29
29
|
* @private
|
|
30
30
|
* @since 1.94
|
|
31
31
|
* @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
@@ -295,7 +295,7 @@ sap.ui.define([
|
|
|
295
295
|
throw DtUtils.propagateError(
|
|
296
296
|
vMessage,
|
|
297
297
|
"AdditionalElementsPlugin#_createCommands",
|
|
298
|
-
"Error
|
|
298
|
+
"Error occurred during _createCommands execution",
|
|
299
299
|
"sap.ui.rta.plugin"
|
|
300
300
|
);
|
|
301
301
|
});
|
|
@@ -110,7 +110,7 @@ sap.ui.define([
|
|
|
110
110
|
* @class The AddIFrame allows trigger AddIFrame operations on the overlay.
|
|
111
111
|
* @extends sap.ui.rta.plugin.BaseCreate
|
|
112
112
|
* @author SAP SE
|
|
113
|
-
* @version 1.
|
|
113
|
+
* @version 1.106.0
|
|
114
114
|
* @constructor
|
|
115
115
|
* @private
|
|
116
116
|
* @since 1.75
|
|
@@ -172,7 +172,7 @@ sap.ui.define([
|
|
|
172
172
|
var aMenuItems = [];
|
|
173
173
|
|
|
174
174
|
var bIsSibling = true;
|
|
175
|
-
if (this.isAvailable(
|
|
175
|
+
if (this.isAvailable(aElementOverlays, bIsSibling)) {
|
|
176
176
|
var oAction = this.getCreateAction(bIsSibling, aElementOverlays[0]);
|
|
177
177
|
if (oAction) {
|
|
178
178
|
var oSiblingMenuItem = Object.assign({
|
|
@@ -187,7 +187,7 @@ sap.ui.define([
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
bIsSibling = false;
|
|
190
|
-
if (this.isAvailable(
|
|
190
|
+
if (this.isAvailable(aElementOverlays, bIsSibling)) {
|
|
191
191
|
aMenuItems = aMenuItems.concat(this.getCreateActions(bIsSibling, aElementOverlays[0])
|
|
192
192
|
.map(function(oAction, iIndex) {
|
|
193
193
|
var oParentMenuItem = Object.assign({
|