@openui5/sap.ui.rta 1.109.0 → 1.111.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 +16 -16
- package/THIRDPARTY.txt +2 -2
- package/package.json +6 -6
- package/src/sap/ui/rta/.library +2 -2
- package/src/sap/ui/rta/Client.js +2 -2
- package/src/sap/ui/rta/RuntimeAuthoring.js +251 -151
- package/src/sap/ui/rta/Utils.js +40 -19
- package/src/sap/ui/rta/api/startAdaptation.js +1 -1
- package/src/sap/ui/rta/api/startKeyUserAdaptation.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +2 -2
- package/src/sap/ui/rta/appVariant/AppVariantOverviewDialog.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +1 -1
- package/src/sap/ui/rta/appVariant/Feature.js +2 -8
- package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +1 -1
- package/src/sap/ui/rta/appVariant/Utils.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/Component.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/index.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
- package/src/sap/ui/rta/command/AddIFrame.js +2 -2
- package/src/sap/ui/rta/command/AddProperty.js +2 -2
- package/src/sap/ui/rta/command/AddXML.js +2 -2
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +2 -2
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +2 -2
- package/src/sap/ui/rta/command/BaseCommand.js +2 -2
- package/src/sap/ui/rta/command/BindProperty.js +2 -2
- package/src/sap/ui/rta/command/Combine.js +2 -2
- package/src/sap/ui/rta/command/CommandFactory.js +2 -2
- package/src/sap/ui/rta/command/CompositeCommand.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantSave.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +15 -13
- package/src/sap/ui/rta/command/CreateContainer.js +2 -2
- package/src/sap/ui/rta/command/CustomAdd.js +2 -2
- package/src/sap/ui/rta/command/FlexCommand.js +2 -2
- package/src/sap/ui/rta/command/LREPSerializer.js +27 -12
- package/src/sap/ui/rta/command/LocalReset.js +2 -2
- package/src/sap/ui/rta/command/Move.js +2 -2
- package/src/sap/ui/rta/command/Property.js +2 -2
- package/src/sap/ui/rta/command/Remove.js +2 -2
- package/src/sap/ui/rta/command/Rename.js +2 -2
- package/src/sap/ui/rta/command/Resize.js +2 -2
- package/src/sap/ui/rta/command/Reveal.js +2 -2
- package/src/sap/ui/rta/command/Settings.js +2 -2
- package/src/sap/ui/rta/command/Split.js +2 -2
- package/src/sap/ui/rta/command/Stack.js +11 -3
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +2 -2
- package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +2 -2
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +2 -2
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +2 -2
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +2 -2
- package/src/sap/ui/rta/enablement/TestDelegate.js +1 -1
- package/src/sap/ui/rta/enablement/elementActionTest.js +2 -2
- package/src/sap/ui/rta/library.js +3 -3
- package/src/sap/ui/rta/messagebundle.properties +65 -13
- package/src/sap/ui/rta/messagebundle_ar.properties +35 -11
- package/src/sap/ui/rta/messagebundle_bg.properties +35 -11
- package/src/sap/ui/rta/messagebundle_ca.properties +35 -11
- package/src/sap/ui/rta/messagebundle_cs.properties +35 -11
- package/src/sap/ui/rta/messagebundle_cy.properties +34 -10
- package/src/sap/ui/rta/messagebundle_da.properties +34 -10
- package/src/sap/ui/rta/messagebundle_de.properties +37 -13
- package/src/sap/ui/rta/messagebundle_el.properties +34 -10
- package/src/sap/ui/rta/messagebundle_en.properties +33 -9
- package/src/sap/ui/rta/messagebundle_en_GB.properties +33 -9
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +31 -5
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +37 -5
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +31 -7
- package/src/sap/ui/rta/messagebundle_es.properties +34 -10
- package/src/sap/ui/rta/messagebundle_es_MX.properties +34 -10
- package/src/sap/ui/rta/messagebundle_et.properties +34 -10
- package/src/sap/ui/rta/messagebundle_fi.properties +34 -10
- package/src/sap/ui/rta/messagebundle_fr.properties +34 -10
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +35 -11
- package/src/sap/ui/rta/messagebundle_hi.properties +35 -11
- package/src/sap/ui/rta/messagebundle_hr.properties +35 -11
- package/src/sap/ui/rta/messagebundle_hu.properties +34 -10
- package/src/sap/ui/rta/messagebundle_id.properties +35 -11
- package/src/sap/ui/rta/messagebundle_it.properties +35 -11
- package/src/sap/ui/rta/messagebundle_iw.properties +34 -10
- package/src/sap/ui/rta/messagebundle_ja.properties +35 -11
- package/src/sap/ui/rta/messagebundle_kk.properties +34 -10
- package/src/sap/ui/rta/messagebundle_ko.properties +34 -10
- package/src/sap/ui/rta/messagebundle_lt.properties +34 -10
- package/src/sap/ui/rta/messagebundle_lv.properties +35 -11
- package/src/sap/ui/rta/messagebundle_ms.properties +35 -11
- package/src/sap/ui/rta/messagebundle_nl.properties +34 -10
- package/src/sap/ui/rta/messagebundle_no.properties +35 -11
- package/src/sap/ui/rta/messagebundle_pl.properties +35 -11
- package/src/sap/ui/rta/messagebundle_pt.properties +35 -11
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +34 -10
- package/src/sap/ui/rta/messagebundle_ro.properties +35 -11
- package/src/sap/ui/rta/messagebundle_ru.properties +35 -11
- package/src/sap/ui/rta/messagebundle_sh.properties +34 -10
- package/src/sap/ui/rta/messagebundle_sk.properties +34 -10
- package/src/sap/ui/rta/messagebundle_sl.properties +34 -10
- package/src/sap/ui/rta/messagebundle_sv.properties +35 -11
- package/src/sap/ui/rta/messagebundle_th.properties +36 -12
- package/src/sap/ui/rta/messagebundle_tr.properties +34 -10
- package/src/sap/ui/rta/messagebundle_uk.properties +34 -10
- package/src/sap/ui/rta/messagebundle_vi.properties +35 -11
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +35 -11
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +35 -11
- 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 +2 -2
- package/src/sap/ui/rta/plugin/CompVariant.js +4 -6
- package/src/sap/ui/rta/plugin/ControlVariant.js +2 -2
- package/src/sap/ui/rta/plugin/CreateContainer.js +3 -3
- package/src/sap/ui/rta/plugin/CutPaste.js +2 -2
- package/src/sap/ui/rta/plugin/DragDrop.js +4 -4
- package/src/sap/ui/rta/plugin/EasyAdd.js +30 -21
- package/src/sap/ui/rta/plugin/EasyRemove.js +13 -11
- package/src/sap/ui/rta/plugin/LocalReset.js +2 -2
- package/src/sap/ui/rta/plugin/Plugin.js +57 -13
- package/src/sap/ui/rta/plugin/RTAElementMover.js +2 -2
- package/src/sap/ui/rta/plugin/Remove.js +3 -3
- package/src/sap/ui/rta/plugin/Rename.js +2 -2
- package/src/sap/ui/rta/plugin/RenameHandler.js +30 -19
- package/src/sap/ui/rta/plugin/Resize.js +2 -2
- package/src/sap/ui/rta/plugin/Selection.js +8 -15
- 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 +17 -16
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +28 -7
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.fragment.xml +1 -0
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +2 -2
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +4 -2
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +5 -5
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +2 -2
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +2 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +2 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +7 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +2 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +4 -4
- package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +1 -1
- package/src/sap/ui/rta/service/Action.js +2 -2
- package/src/sap/ui/rta/service/ControllerExtension.js +2 -2
- package/src/sap/ui/rta/service/Outline.js +2 -2
- package/src/sap/ui/rta/service/Property.js +2 -2
- package/src/sap/ui/rta/service/Receiver.js +1 -1
- package/src/sap/ui/rta/service/Selection.js +2 -2
- package/src/sap/ui/rta/service/SupportTools.js +2 -2
- package/src/sap/ui/rta/service/index.js +1 -1
- package/src/sap/ui/rta/themes/base/AddIFrame.less +1 -1
- package/src/sap/ui/rta/themes/base/Dialogs.less +1 -1
- package/src/sap/ui/rta/themes/base/FieldRepository.less +1 -1
- package/src/sap/ui/rta/themes/base/library.source.less +1 -1
- package/src/sap/ui/rta/themes/sap_hcb/library.source.less +1 -1
- package/src/sap/ui/rta/toolbar/ActionsMenu.fragment.xml +82 -0
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +35 -79
- package/src/sap/ui/rta/toolbar/Adaptation.js +83 -25
- package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
- package/src/sap/ui/rta/toolbar/Base.js +4 -4
- package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -1
- package/src/sap/ui/rta/toolbar/Fiori.js +15 -11
- package/src/sap/ui/rta/toolbar/FioriLike.js +2 -2
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +2 -2
- package/src/sap/ui/rta/toolbar/Personalization.js +2 -2
- package/src/sap/ui/rta/toolbar/Standalone.js +2 -2
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +340 -0
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +152 -0
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +225 -0
- package/src/sap/ui/rta/toolbar/contextBased/{SaveAsContextBasedAdaptationDialog.fragment.xml → SaveAsAdaptationDialog.fragment.xml} +19 -15
- package/src/sap/ui/rta/toolbar/translation/Translation.js +2 -2
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +4 -4
- package/src/sap/ui/rta/util/Animation.js +5 -9
- package/src/sap/ui/rta/util/BindingsExtractor.js +1 -1
- package/src/sap/ui/rta/util/PluginManager.js +2 -2
- package/src/sap/ui/rta/util/PopupManager.js +2 -2
- package/src/sap/ui/rta/util/ReloadManager.js +2 -2
- package/src/sap/ui/rta/util/ServiceEventBus.js +2 -2
- package/src/sap/ui/rta/util/StylesLoader.js +1 -1
- package/src/sap/ui/rta/util/UrlParser.js +1 -1
- package/src/sap/ui/rta/util/adaptationStarter.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeCategories.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +4 -6
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorCategorySelection.fragment.xml +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +27 -3
- package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +2 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +127 -71
- 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 +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/RenameVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/getCommandVisualization.js +1 -1
- package/src/sap/ui/rta/util/hasStableId.js +1 -1
- package/src/sap/ui/rta/util/showMessageBox.js +1 -1
- package/src/sap/ui/rta/util/validateFlexEnabled.js +1 -1
- package/src/sap/ui/rta/util/validateStableIds.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsContextBasedAdaptation.js +0 -124
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -33,7 +33,7 @@ function(
|
|
|
33
33
|
* @extends sap.ui.dt.plugin.ControlDragDrop
|
|
34
34
|
*
|
|
35
35
|
* @author SAP SE
|
|
36
|
-
* @version 1.
|
|
36
|
+
* @version 1.111.0
|
|
37
37
|
*
|
|
38
38
|
* @constructor
|
|
39
39
|
* @private
|
|
@@ -121,7 +121,7 @@ function(
|
|
|
121
121
|
oOverlay.setSelected(false);
|
|
122
122
|
});
|
|
123
123
|
|
|
124
|
-
oOverlay
|
|
124
|
+
oOverlay.getDomRef().classList.add("sapUiRtaOverlayPlaceholder");
|
|
125
125
|
};
|
|
126
126
|
|
|
127
127
|
/**
|
|
@@ -138,7 +138,7 @@ function(
|
|
|
138
138
|
command: oCommand
|
|
139
139
|
});
|
|
140
140
|
|
|
141
|
-
oOverlay
|
|
141
|
+
oOverlay.getDomRef().classList.remove("sapUiRtaOverlayPlaceholder");
|
|
142
142
|
oOverlay.setSelected(true);
|
|
143
143
|
oOverlay.focus();
|
|
144
144
|
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin",
|
|
9
9
|
"sap/ui/dt/OverlayRegistry",
|
|
10
|
-
"sap/m/Button"
|
|
11
|
-
"sap/ui/thirdparty/jquery"
|
|
10
|
+
"sap/m/Button"
|
|
12
11
|
], function(
|
|
13
12
|
AdditionalElementsPlugin,
|
|
14
13
|
OverlayRegistry,
|
|
15
|
-
Button
|
|
16
|
-
jQuery
|
|
14
|
+
Button
|
|
17
15
|
) {
|
|
18
16
|
"use strict";
|
|
19
17
|
|
|
@@ -25,7 +23,7 @@ sap.ui.define([
|
|
|
25
23
|
* @class The EasyAdd Plugin adds an Icon to an Overlay, which allows to trigger add operations directly
|
|
26
24
|
* @extends sap.ui.rta.plugin.additionalElements.AdditionalElementsPlugin
|
|
27
25
|
* @author SAP SE
|
|
28
|
-
* @version 1.
|
|
26
|
+
* @version 1.111.0
|
|
29
27
|
* @constructor
|
|
30
28
|
* @private
|
|
31
29
|
* @since 1.48
|
|
@@ -54,7 +52,9 @@ sap.ui.define([
|
|
|
54
52
|
oControl.addStyleClass("sapUiRtaMarginBottom");
|
|
55
53
|
} else if (oControl.getMetadata().getName() === "sap.uxap.ObjectPageLayout" && this.hasStableId(oOverlay)) {
|
|
56
54
|
oOverlay.addStyleClass("sapUiRtaPersAddTop");
|
|
57
|
-
oControl
|
|
55
|
+
oControl.getDomRef().querySelectorAll("[id*='sectionsContainer']").forEach(function(oNode) {
|
|
56
|
+
oNode.classList.add("sapUiRtaPaddingTop");
|
|
57
|
+
});
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
var onAddPressed = function(bOverlayIsSibling, oOverlay, iIndex) {
|
|
@@ -82,14 +82,16 @@ sap.ui.define([
|
|
|
82
82
|
}.bind(this);
|
|
83
83
|
|
|
84
84
|
if (oOverlay.hasStyleClass("sapUiRtaPersAdd")) {
|
|
85
|
-
var
|
|
85
|
+
var aChildren = Array.from(oOverlay.getDomRef().querySelectorAll(":scope > .sapUiRtaPersAddIconOuter"));
|
|
86
|
+
var bAddButton = oOverlay.hasStyleClass("sapUiRtaPersAdd") && aChildren.length === 0;
|
|
86
87
|
if (bAddButton) {
|
|
87
|
-
fnAddButton(oOverlay, oOverlay
|
|
88
|
+
fnAddButton(oOverlay, oOverlay.getDomRef(), true, oOverlay.getDesignTimeMetadata().getName().singular);
|
|
88
89
|
}
|
|
89
90
|
} else if (oOverlay.hasStyleClass("sapUiRtaPersAddTop")) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
var aChildren = Array.from(oOverlay.getAggregationOverlay("sections").getDomRef().querySelectorAll(":scope > .sapUiRtaPersAddIconOuter"));
|
|
92
|
+
if (aChildren.length === 0) {
|
|
93
|
+
var oSectionsOverlayDOM = oOverlay.getAggregationOverlay("sections").getDomRef();
|
|
94
|
+
fnAddButton(oOverlay, oSectionsOverlayDOM, false, oOverlay.getDesignTimeMetadata().getAggregation("sections").childNames.singular, 0);
|
|
93
95
|
}
|
|
94
96
|
}
|
|
95
97
|
|
|
@@ -112,7 +114,9 @@ sap.ui.define([
|
|
|
112
114
|
oControl.removeStyleClass("sapUiRtaMarginBottom");
|
|
113
115
|
} else if (oControl.getMetadata().getName() === "sap.uxap.ObjectPageLayout") {
|
|
114
116
|
oOverlay.removeStyleClass("sapUiRtaPersAddTop");
|
|
115
|
-
oControl
|
|
117
|
+
oControl.getDomRef().querySelectorAll("[id*='sectionsContainer']").forEach(function(oNode) {
|
|
118
|
+
oNode.classList.remove("sapUiRtaPaddingTop");
|
|
119
|
+
});
|
|
116
120
|
}
|
|
117
121
|
|
|
118
122
|
AdditionalElementsPlugin.prototype.deregisterElementOverlay.apply(this, arguments);
|
|
@@ -133,7 +137,9 @@ sap.ui.define([
|
|
|
133
137
|
if (bIsLayout) {
|
|
134
138
|
var oLayout = oOverlay.getElement();
|
|
135
139
|
oLayout.attachEventOnce("onAfterRenderingDOMReady", function() {
|
|
136
|
-
oLayout
|
|
140
|
+
oLayout.getDomRef().querySelectorAll("[id*='sectionsContainer']").forEach(function(oNode) {
|
|
141
|
+
oNode.classList.add("sapUiRtaPaddingTop");
|
|
142
|
+
});
|
|
137
143
|
});
|
|
138
144
|
}
|
|
139
145
|
}
|
|
@@ -154,18 +160,21 @@ sap.ui.define([
|
|
|
154
160
|
var oTextResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
|
|
155
161
|
|
|
156
162
|
var sId = oOverlay.getId() + "-AddButton";
|
|
157
|
-
var oHtmlButtonOuter =
|
|
163
|
+
var oHtmlButtonOuter = document.createElement("div");
|
|
164
|
+
oHtmlButtonOuter.classList.add("sapUiRtaPersAddIconOuter");
|
|
165
|
+
oHtmlButtonOuter.setAttribute("draggable", "true");
|
|
166
|
+
oHtmlButtonOuter.setAttribute("tabindex", -1);
|
|
158
167
|
oOverlay._oAddButton = new Button(sId, {
|
|
159
168
|
text: oTextResources.getText("CTX_ADD_ELEMENTS", sControlName),
|
|
160
169
|
icon: "sap-icon://add",
|
|
161
170
|
enabled: bIsEditable
|
|
162
171
|
})
|
|
163
|
-
.placeAt(oHtmlButtonOuter
|
|
172
|
+
.placeAt(oHtmlButtonOuter)
|
|
164
173
|
.attachBrowserEvent('click', fnCallback)
|
|
165
174
|
.attachBrowserEvent('tap', fnCallback);
|
|
166
175
|
oOverlayDom.append(oHtmlButtonOuter);
|
|
167
176
|
|
|
168
|
-
oHtmlButtonOuter
|
|
177
|
+
oHtmlButtonOuter.addEventListener("mouseover", function(oEvent) {
|
|
169
178
|
oEvent.stopPropagation();
|
|
170
179
|
var oOverlay = oEvent.fromElement ? OverlayRegistry.getOverlay(oEvent.fromElement.id) : null;
|
|
171
180
|
if (oOverlay && oOverlay.getMetadata().getName() === "sap.ui.dt.ElementOverlay") {
|
|
@@ -174,7 +183,7 @@ sap.ui.define([
|
|
|
174
183
|
}
|
|
175
184
|
});
|
|
176
185
|
|
|
177
|
-
oHtmlButtonOuter
|
|
186
|
+
oHtmlButtonOuter.addEventListener("mouseleave", function(oEvent) {
|
|
178
187
|
oEvent.stopPropagation();
|
|
179
188
|
var oOverlay = oEvent.toElement ? OverlayRegistry.getOverlay(oEvent.toElement.id) : null;
|
|
180
189
|
if (oOverlay && oOverlay.getMetadata().getName() === "sap.ui.dt.ElementOverlay") {
|
|
@@ -185,16 +194,16 @@ sap.ui.define([
|
|
|
185
194
|
}
|
|
186
195
|
});
|
|
187
196
|
|
|
188
|
-
oHtmlButtonOuter
|
|
197
|
+
oHtmlButtonOuter.addEventListener("click", function(oEvent) {
|
|
189
198
|
oEvent.stopPropagation();
|
|
190
199
|
});
|
|
191
200
|
|
|
192
|
-
oHtmlButtonOuter
|
|
201
|
+
oHtmlButtonOuter.addEventListener("contextmenu", function(oEvent) {
|
|
193
202
|
oEvent.stopPropagation();
|
|
194
203
|
oEvent.preventDefault();
|
|
195
204
|
});
|
|
196
205
|
|
|
197
|
-
oHtmlButtonOuter
|
|
206
|
+
oHtmlButtonOuter.addEventListener("dragstart", function(oEvent) {
|
|
198
207
|
oEvent.stopPropagation();
|
|
199
208
|
oEvent.preventDefault();
|
|
200
209
|
});
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/rta/plugin/Remove",
|
|
9
|
-
"sap/m/Button"
|
|
10
|
-
"sap/ui/thirdparty/jquery"
|
|
9
|
+
"sap/m/Button"
|
|
11
10
|
], function(
|
|
12
11
|
Remove,
|
|
13
|
-
Button
|
|
14
|
-
jQuery
|
|
12
|
+
Button
|
|
15
13
|
) {
|
|
16
14
|
"use strict";
|
|
17
15
|
|
|
@@ -23,7 +21,7 @@ sap.ui.define([
|
|
|
23
21
|
* @class The EasyRemove Plugin adds an Icon to an Overlay, which allows to trigger remove operations directly
|
|
24
22
|
* @extends sap.ui.rta.plugin.Remove
|
|
25
23
|
* @author SAP SE
|
|
26
|
-
* @version 1.
|
|
24
|
+
* @version 1.111.0
|
|
27
25
|
* @constructor
|
|
28
26
|
* @private
|
|
29
27
|
* @since 1.48
|
|
@@ -51,6 +49,7 @@ sap.ui.define([
|
|
|
51
49
|
oOverlay.addStyleClass("sapUiRtaPersDelete");
|
|
52
50
|
}
|
|
53
51
|
|
|
52
|
+
//TODO: check this, this makes no sense; length is always 0
|
|
54
53
|
if (oOverlay.hasStyleClass("sapUiRtaPersDelete") && oOverlay.$().children(".sapUiRtaPersDeleteClick").length <= 0) {
|
|
55
54
|
var onDeletePressed = function(oOverlay) {
|
|
56
55
|
this.handler([oOverlay]);
|
|
@@ -93,18 +92,21 @@ sap.ui.define([
|
|
|
93
92
|
EasyRemove.prototype._addButton = function(oOverlay) {
|
|
94
93
|
var bEnabled = this.isEnabled([oOverlay]);
|
|
95
94
|
var sId = oOverlay.getId() + "-DeleteIcon";
|
|
96
|
-
var oHtmlIconWrapper =
|
|
97
|
-
|
|
95
|
+
var oHtmlIconWrapper = document.createElement("div");
|
|
96
|
+
oHtmlIconWrapper.classList.add("sapUiRtaPersDeleteClick");
|
|
97
|
+
oHtmlIconWrapper.setAttribute("draggable", "true");
|
|
98
|
+
var oHtmlIconOuter = document.createElement("div");
|
|
99
|
+
oHtmlIconOuter.classList.add("sapUiRtaPersDeleteIconOuter");
|
|
98
100
|
|
|
99
101
|
oOverlay._oDeleteButton = new Button(sId, {
|
|
100
102
|
icon: "sap-icon://less",
|
|
101
103
|
tooltip: sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta").getText("CTX_REMOVE"),
|
|
102
104
|
enabled: bEnabled
|
|
103
|
-
}).placeAt(oHtmlIconOuter
|
|
105
|
+
}).placeAt(oHtmlIconOuter);
|
|
104
106
|
oHtmlIconWrapper.append(oHtmlIconOuter);
|
|
105
|
-
oOverlay
|
|
107
|
+
oOverlay.getDomRef().append(oHtmlIconWrapper);
|
|
106
108
|
|
|
107
|
-
oHtmlIconWrapper
|
|
109
|
+
oHtmlIconWrapper.addEventListener("dragstart", function(oEvent) {
|
|
108
110
|
oEvent.stopPropagation();
|
|
109
111
|
oEvent.preventDefault();
|
|
110
112
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -37,7 +37,7 @@ sap.ui.define([
|
|
|
37
37
|
* @class
|
|
38
38
|
* @extends sap.ui.rta.plugin.Plugin
|
|
39
39
|
* @author SAP SE
|
|
40
|
-
* @version 1.
|
|
40
|
+
* @version 1.111.0
|
|
41
41
|
* @constructor
|
|
42
42
|
* @private
|
|
43
43
|
* @since 1.90
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
// Provides class sap.ui.rta.plugin.Plugin.
|
|
8
8
|
sap.ui.define([
|
|
9
|
+
"sap/base/util/restricted/_debounce",
|
|
9
10
|
"sap/ui/dt/Plugin",
|
|
10
11
|
"sap/ui/fl/write/api/ChangesWriteAPI",
|
|
11
12
|
"sap/ui/dt/OverlayRegistry",
|
|
12
13
|
"sap/ui/dt/OverlayUtil",
|
|
13
|
-
"sap/ui/
|
|
14
|
+
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
14
15
|
"sap/ui/rta/util/hasStableId"
|
|
15
|
-
],
|
|
16
|
-
|
|
16
|
+
], function(
|
|
17
|
+
debounce,
|
|
17
18
|
Plugin,
|
|
18
19
|
ChangesWriteAPI,
|
|
19
20
|
OverlayRegistry,
|
|
@@ -69,7 +70,7 @@ function(
|
|
|
69
70
|
* @extends sap.ui.dt.Plugin
|
|
70
71
|
*
|
|
71
72
|
* @author SAP SE
|
|
72
|
-
* @version 1.
|
|
73
|
+
* @version 1.111.0
|
|
73
74
|
*
|
|
74
75
|
* @constructor
|
|
75
76
|
* @private
|
|
@@ -125,7 +126,39 @@ function(
|
|
|
125
126
|
}
|
|
126
127
|
};
|
|
127
128
|
|
|
129
|
+
function debounceFunction(mDebounceFunctions, oOverlay, sName, fnOriginalFunction) {
|
|
130
|
+
// Create debounced function for the given parameters if it was not created before
|
|
131
|
+
var sOverlayId = oOverlay.getId();
|
|
132
|
+
if (!mDebounceFunctions[sOverlayId]) {
|
|
133
|
+
mDebounceFunctions[sOverlayId] = {};
|
|
134
|
+
}
|
|
135
|
+
if (!mDebounceFunctions[sOverlayId][sName]) {
|
|
136
|
+
// Debounce with approximately one frame to cover multiple synchronous calls
|
|
137
|
+
// without causing a huge delay
|
|
138
|
+
mDebounceFunctions[sOverlayId][sName] = debounce(fnOriginalFunction, 16);
|
|
139
|
+
}
|
|
140
|
+
// Execute the function
|
|
141
|
+
mDebounceFunctions[sOverlayId][sName]();
|
|
142
|
+
}
|
|
143
|
+
|
|
128
144
|
var _onElementModified = function (oEvent) {
|
|
145
|
+
// Initialize here because plugins may not extend the rta.Plugin and
|
|
146
|
+
// instead inherit the method via rta.Utils.extendWith
|
|
147
|
+
// Therefore the constructor/init might not be properly called
|
|
148
|
+
if (!this._mDebounceFunctions) {
|
|
149
|
+
// The _onElementModified callback might be triggered many times in a row, e.g.
|
|
150
|
+
// by SimpleForms which add all aggregation items one by one
|
|
151
|
+
// Since the resulting editable checks in the plugins can be expensive async functions
|
|
152
|
+
// the calls are debounced
|
|
153
|
+
this._mDebounceFunctions = {
|
|
154
|
+
// Make sure that all closure variables of the debounced function
|
|
155
|
+
// are part of the map key:
|
|
156
|
+
// [overlayId][oEvent.getParameters().name]: function
|
|
157
|
+
insertOrRemove: {},
|
|
158
|
+
addOrSet: {}
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
|
|
129
162
|
var oParams = oEvent.getParameters();
|
|
130
163
|
var aRelevantOverlays;
|
|
131
164
|
var oOverlay = oEvent.getSource();
|
|
@@ -150,18 +183,29 @@ function(
|
|
|
150
183
|
oParams.type === "insertAggregation"
|
|
151
184
|
|| oParams.type === "removeAggregation"
|
|
152
185
|
) {
|
|
153
|
-
|
|
154
|
-
this.evaluateEditable(aRelevantOverlays, {onRegistration: false});
|
|
155
|
-
} else if (oParams.type === "addOrSetAggregation") {
|
|
156
|
-
if (this.getDesignTime().getStatus() === "synced") {
|
|
186
|
+
debounceFunction(this._mDebounceFunctions["insertOrRemove"], oOverlay, oParams.name, function() {
|
|
157
187
|
aRelevantOverlays = this._getRelevantOverlays(oOverlay, oParams.name);
|
|
158
188
|
this.evaluateEditable(aRelevantOverlays, {onRegistration: false});
|
|
159
|
-
}
|
|
160
|
-
|
|
189
|
+
}.bind(this));
|
|
190
|
+
} else if (oParams.type === "addOrSetAggregation") {
|
|
191
|
+
debounceFunction(this._mDebounceFunctions["addOrSet"], oOverlay, oParams.name, function() {
|
|
192
|
+
// Designtime might have been destroyed while waiting for the debounce callback
|
|
193
|
+
// In this case, the updates are no longer relevant
|
|
194
|
+
var oDesignTime = this.getDesignTime();
|
|
195
|
+
if (!oDesignTime) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (oDesignTime.getStatus() === "synced") {
|
|
161
200
|
aRelevantOverlays = this._getRelevantOverlays(oOverlay, oParams.name);
|
|
162
201
|
this.evaluateEditable(aRelevantOverlays, {onRegistration: false});
|
|
163
|
-
}
|
|
164
|
-
|
|
202
|
+
} else {
|
|
203
|
+
oDesignTime.attachEventOnce("synced", function () {
|
|
204
|
+
aRelevantOverlays = this._getRelevantOverlays(oOverlay, oParams.name);
|
|
205
|
+
this.evaluateEditable(aRelevantOverlays, {onRegistration: false});
|
|
206
|
+
}, this);
|
|
207
|
+
}
|
|
208
|
+
}.bind(this));
|
|
165
209
|
}
|
|
166
210
|
};
|
|
167
211
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -35,7 +35,7 @@ function(
|
|
|
35
35
|
* The RTAElementMover is responsible for the RTA specific adaptation of element movements.
|
|
36
36
|
*
|
|
37
37
|
* @author SAP SE
|
|
38
|
-
* @version 1.
|
|
38
|
+
* @version 1.111.0
|
|
39
39
|
*
|
|
40
40
|
* @constructor
|
|
41
41
|
* @private
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -29,7 +29,7 @@ sap.ui.define([
|
|
|
29
29
|
* @class The Remove allows trigger remove operations on the overlay
|
|
30
30
|
* @extends sap.ui.rta.plugin.Plugin
|
|
31
31
|
* @author SAP SE
|
|
32
|
-
* @version 1.
|
|
32
|
+
* @version 1.111.0
|
|
33
33
|
* @constructor
|
|
34
34
|
* @private
|
|
35
35
|
* @since 1.34
|
|
@@ -174,7 +174,7 @@ sap.ui.define([
|
|
|
174
174
|
* @private
|
|
175
175
|
*/
|
|
176
176
|
Remove.prototype._onKeyDown = function(oEvent) {
|
|
177
|
-
if (oEvent.keyCode === KeyCodes.DELETE) {
|
|
177
|
+
if (oEvent.keyCode === KeyCodes.DELETE || oEvent.keyCode === KeyCodes.BACKSPACE) {
|
|
178
178
|
oEvent.stopPropagation();
|
|
179
179
|
this.removeElement();
|
|
180
180
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -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.111.0
|
|
32
32
|
*
|
|
33
33
|
* @constructor
|
|
34
34
|
* @private
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -57,7 +57,7 @@ sap.ui.define([
|
|
|
57
57
|
* Provides Rename handling functionality
|
|
58
58
|
*
|
|
59
59
|
* @author SAP SE
|
|
60
|
-
* @version 1.
|
|
60
|
+
* @version 1.111.0
|
|
61
61
|
*
|
|
62
62
|
* @constructor
|
|
63
63
|
* @private
|
|
@@ -136,7 +136,7 @@ sap.ui.define([
|
|
|
136
136
|
|
|
137
137
|
// case where the editable control has it's own overlay
|
|
138
138
|
var oOverlayForWrapper = OverlayRegistry.getOverlay(
|
|
139
|
-
vEditableControlDomRef
|
|
139
|
+
vEditableControlDomRef.jquery
|
|
140
140
|
? vEditableControlDomRef.get(0).id
|
|
141
141
|
: vEditableControlDomRef.id
|
|
142
142
|
);
|
|
@@ -145,20 +145,25 @@ sap.ui.define([
|
|
|
145
145
|
// for this purpose the width of the editable control should be adjusted
|
|
146
146
|
if (!oOverlayForWrapper) {
|
|
147
147
|
oOverlayForWrapper = this._oEditedOverlay;
|
|
148
|
-
var
|
|
149
|
-
var
|
|
150
|
-
var iControlForWrapperWidth = parseInt(
|
|
148
|
+
var _oControlForWrapperDomRef = ElementUtil.getDomRef(oElement); /* Main Control */
|
|
149
|
+
var _oEditableControlParentDomRef = this._$oEditableControlDomRef.parent().get(0); /* Text Control parent */
|
|
150
|
+
var iControlForWrapperWidth = _oControlForWrapperDomRef ? parseInt(_oControlForWrapperDomRef.offsetWidth) : "NaN"; /* Main Control Width */
|
|
151
151
|
|
|
152
152
|
if (!isNaN(iControlForWrapperWidth)) {
|
|
153
153
|
var iEditableControlWidth = parseInt(this._$oEditableControlDomRef.outerWidth());
|
|
154
|
-
var iEditableControlParentWidth = parseInt(
|
|
154
|
+
var iEditableControlParentWidth = parseInt(_oEditableControlParentDomRef.offsetWidth);
|
|
155
155
|
|
|
156
156
|
iWidthDifference = iControlForWrapperWidth - iEditableControlWidth;
|
|
157
157
|
|
|
158
|
+
var aCHildren = Array.from(_oEditableControlParentDomRef.children);
|
|
159
|
+
var aVisibleChildren = aCHildren.filter(function(oNode) {
|
|
160
|
+
return DOMUtil.isVisible(oNode);
|
|
161
|
+
});
|
|
162
|
+
|
|
158
163
|
if (iWidthDifference < 0 && iEditableControlParentWidth) {
|
|
159
|
-
if (
|
|
160
|
-
&&
|
|
161
|
-
&&
|
|
164
|
+
if (_oEditableControlParentDomRef.id !== _oControlForWrapperDomRef.id
|
|
165
|
+
&& aVisibleChildren.length === 1
|
|
166
|
+
&& aVisibleChildren[0].id === this._$oEditableControlDomRef.get(0).id
|
|
162
167
|
&& iControlForWrapperWidth > iEditableControlParentWidth) {
|
|
163
168
|
iWidthDifference = iControlForWrapperWidth - iEditableControlParentWidth;
|
|
164
169
|
} else {
|
|
@@ -168,13 +173,17 @@ sap.ui.define([
|
|
|
168
173
|
}
|
|
169
174
|
}
|
|
170
175
|
|
|
171
|
-
var
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
176
|
+
var _oWrapperDomRef = document.createElement("div");
|
|
177
|
+
_oWrapperDomRef.classList.add("sapUiRtaEditableField");
|
|
178
|
+
_oWrapperDomRef.style.whiteSpace = "nowrap";
|
|
179
|
+
_oWrapperDomRef.style.overflow = "hidden";
|
|
180
|
+
_oWrapperDomRef.style.width = "calc(100% - (" + iWidthDifference + "px))";
|
|
181
|
+
oOverlayForWrapper.getDomRef().append(_oWrapperDomRef);
|
|
182
|
+
var _oEditableFieldDomRef = document.createElement("div");
|
|
183
|
+
_oEditableFieldDomRef.setAttribute("contentEditable", "true");
|
|
184
|
+
_oWrapperDomRef.append(_oEditableFieldDomRef);
|
|
185
|
+
//TODO: replace the private jQuery variable to HTMLElement
|
|
186
|
+
this._$editableField = jQuery(_oEditableFieldDomRef);
|
|
178
187
|
|
|
179
188
|
// if label is empty, set a preliminary dummy text at the control to get an overlay
|
|
180
189
|
var sCurrentText = this._fnGetControlText();
|
|
@@ -228,7 +237,7 @@ sap.ui.define([
|
|
|
228
237
|
this._$editableField.on("mousedown", RenameHandler._stopPropagation.bind(this));
|
|
229
238
|
|
|
230
239
|
this._$oEditableControlDomRef.css("visibility", "hidden");
|
|
231
|
-
|
|
240
|
+
jQuery(_oWrapperDomRef).offset({left: this._$oEditableControlDomRef.offset().left});
|
|
232
241
|
RenameHandler._setEditableFieldPosition.apply(this);
|
|
233
242
|
this._$editableField.css("visibility", "");
|
|
234
243
|
this._$editableField.trigger("focus");
|
|
@@ -320,6 +329,7 @@ sap.ui.define([
|
|
|
320
329
|
this._fnSetControlText("");
|
|
321
330
|
}
|
|
322
331
|
|
|
332
|
+
//TODO: check why test gets red when this is replaced by vanilla JS
|
|
323
333
|
this._oEditedOverlay.$().find(".sapUiRtaEditableField").remove();
|
|
324
334
|
Overlay.getMutationObserver().ignoreOnce({
|
|
325
335
|
target: this._$oEditableControlDomRef.get(0)
|
|
@@ -439,7 +449,8 @@ sap.ui.define([
|
|
|
439
449
|
RenameHandler._preventDefault.call(this, oEvent);
|
|
440
450
|
break;
|
|
441
451
|
case KeyCodes.DELETE:
|
|
442
|
-
|
|
452
|
+
case KeyCodes.BACKSPACE:
|
|
453
|
+
//Incident IDs: #1680315103, #2380033173
|
|
443
454
|
RenameHandler._stopPropagation.call(this, oEvent);
|
|
444
455
|
break;
|
|
445
456
|
default:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -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.111.0
|
|
31
31
|
* @constructor
|
|
32
32
|
* @private
|
|
33
33
|
* @since 1.101
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -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.111.0
|
|
34
34
|
* @constructor
|
|
35
35
|
* @private
|
|
36
36
|
* @since 1.34
|
|
@@ -133,17 +133,6 @@ 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
|
-
|
|
147
136
|
/**
|
|
148
137
|
* Register an overlay
|
|
149
138
|
*
|
|
@@ -271,7 +260,7 @@ function (
|
|
|
271
260
|
}
|
|
272
261
|
return;
|
|
273
262
|
}
|
|
274
|
-
var bMultiSelection = oEvent.metaKey || oEvent.ctrlKey;
|
|
263
|
+
var bMultiSelection = oEvent.metaKey || oEvent.ctrlKey || oEvent.shiftKey;
|
|
275
264
|
var bContextMenu = oEvent.type === "contextmenu";
|
|
276
265
|
|
|
277
266
|
if (oOverlay && oOverlay.getSelectable()) {
|
|
@@ -324,7 +313,11 @@ function (
|
|
|
324
313
|
*/
|
|
325
314
|
Selection.prototype._onMouseover = function(oEvent) {
|
|
326
315
|
var oOverlay = OverlayRegistry.getOverlay(oEvent.currentTarget.id);
|
|
327
|
-
|
|
316
|
+
// due to some timing issues the mouseover event callback can be triggered during drag&drop
|
|
317
|
+
if (
|
|
318
|
+
!this.getIsActive()
|
|
319
|
+
|| (this.getDesignTime() && this.getDesignTime().getBusyPlugins().length)
|
|
320
|
+
) {
|
|
328
321
|
// Propagation should be stopped at the root overlay to prevent the selection of the underlying elements
|
|
329
322
|
if (oOverlay.isRoot()) {
|
|
330
323
|
preventEventDefaultAndPropagation(oEvent);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -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.111.0
|
|
29
29
|
* @constructor
|
|
30
30
|
* @private
|
|
31
31
|
* @since 1.44
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -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.111.0
|
|
27
27
|
* @constructor
|
|
28
28
|
* @private
|
|
29
29
|
* @since 1.46
|