@openui5/sap.ui.rta 1.116.0 → 1.117.1
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/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 +4 -7
- package/src/sap/ui/rta/Utils.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +3 -6
- 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 +1 -1
- 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 +1 -1
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +27 -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 +1 -1
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/CreateContainer.js +1 -1
- package/src/sap/ui/rta/command/CustomAdd.js +1 -1
- package/src/sap/ui/rta/command/FlexCommand.js +1 -1
- package/src/sap/ui/rta/command/LREPSerializer.js +19 -9
- 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 +1 -1
- 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/elementActionTest.js +1 -1
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +1 -1
- package/src/sap/ui/rta/messagebundle_de.properties +1 -1
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +1 -1
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
- package/src/sap/ui/rta/plugin/Combine.js +1 -1
- package/src/sap/ui/rta/plugin/ControlVariant.js +1 -1
- package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
- package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
- package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
- package/src/sap/ui/rta/plugin/EasyAdd.js +1 -1
- package/src/sap/ui/rta/plugin/EasyRemove.js +1 -1
- package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
- 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 +1 -1
- package/src/sap/ui/rta/plugin/RenameHandler.js +1 -1
- package/src/sap/ui/rta/plugin/Resize.js +1 -1
- package/src/sap/ui/rta/plugin/Selection.js +1 -1
- package/src/sap/ui/rta/plugin/Settings.js +1 -1
- package/src/sap/ui/rta/plugin/Split.js +1 -1
- package/src/sap/ui/rta/plugin/Stretch.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
- package/src/sap/ui/rta/service/Action.js +1 -1
- package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
- 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 +159 -8
- 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 +36 -29
- package/src/sap/ui/rta/toolbar/Base.js +1 -1
- 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/SaveAsAdaptation.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptationDialog.fragment.xml +0 -2
- package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
- package/src/sap/ui/rta/util/PluginManager.js +1 -1
- package/src/sap/ui/rta/util/PopupManager.js +1 -1
- package/src/sap/ui/rta/util/ReloadManager.js +1 -1
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +3 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +4 -4
- package/ui5.yaml +1 -1
|
@@ -290,7 +290,7 @@ DAC_DIALOG_DESCRIPTION=\u206A\u206A\u206A\u200D\u200D\u200C\u200C\u200C\u200D\u2
|
|
|
290
290
|
DAC_DATA_LOSS_DIALOG_DESCRIPTION=\u206A\u206A\u206A\u200D\u200D\u200C\u200B\u200D\u200B\u200B\u200C\u200C\u200C\u200B\u200C\u200D\u200C\u200D\u200C\u200C\u200D\u200C\u200B\u200B\u200C\u200D\u200C\u200B\u200D\u200D\u200D\u200C\u200D\u200C\u200B\u200C\u200D\u200D\u200D\u200D\u200C\u200D\u200B\u206AYou have unsaved UI changes. Deleting this adaptation will also delete the UI changes. Do you really want to delete this adaptation?\u206A\u206A
|
|
291
291
|
DAC_DIALOG_MIGRATION_HEADER=\u206A\u206A\u206A\u200C\u200B\u200C\u200C\u200D\u200D\u200D\u200C\u200D\u200C\u200B\u200C\u200D\u200B\u200D\u200B\u200D\u200C\u200C\u200B\u200C\u200B\u200B\u200D\u200C\u200C\u200C\u200D\u200B\u200C\u200D\u200D\u200B\u200C\u200C\u200B\u200B\u200C\u200B\u200D\u200C\u206AMigrate Views\u206A\u206A
|
|
292
292
|
DAC_DIALOG_MIGRATION_DESCRIPTION=\u206A\u206A\u206A\u200C\u200B\u200C\u200B\u200B\u200B\u200C\u200B\u200C\u200C\u200C\u200B\u200C\u200D\u200B\u200B\u200B\u200D\u200C\u200B\u200D\u200D\u200D\u200C\u200D\u200D\u200B\u200C\u200D\u200C\u200B\u200D\u200D\u200C\u200C\u200C\u200C\u200C\u200C\u206AWe noticed that youve already assigned roles to views in this application. If you want to create an adaptation, you need to migrate these views to adaptations.\n After the migration, every view that was assigned to a role will be included in an adaptation. \u206A\u206A
|
|
293
|
-
DAC_DIALOG_MIGRATION_DIRTY_DESCRIPTION=\u206A\u206A\u206A\u200C\u200D\u200B\u200C\u200B\u200B\u200D\u200D\u200D\u200B\u200D\u200D\u200B\u200C\u200D\u200D\u200C\u200C\u200B\u200D\u200D\u200D\u200B\u200B\u200D\u200D\u200C\u200B\u200B\u200B\u200D\u200D\u200C\u200C\u200D\u200C\u200B\u200B\u200B\u200C\u206AWe noticed that youve already assigned roles to views in this application. If you want to create an adaptation, you need to migrate these views to adaptations.\n After the migration, every view that was assigned to a role will be included in an adaptation.\n\n You have unsaved UI changes. These
|
|
293
|
+
DAC_DIALOG_MIGRATION_DIRTY_DESCRIPTION=\u206A\u206A\u206A\u200C\u200D\u200B\u200C\u200B\u200B\u200D\u200D\u200D\u200B\u200D\u200D\u200B\u200C\u200D\u200D\u200C\u200C\u200B\u200D\u200D\u200D\u200B\u200B\u200D\u200D\u200C\u200B\u200B\u200B\u200D\u200D\u200C\u200C\u200D\u200C\u200B\u200B\u200B\u200C\u206AWe noticed that youve already assigned roles to views in this application. If you want to create an adaptation, you need to migrate these views to adaptations.\n After the migration, every view that was assigned to a role will be included in an adaptation.\n\n You have unsaved UI changes. These are saved before migration.\u206A\u206A
|
|
294
294
|
DAC_DIALOG_MIGRATION_SUCCESSFULL_DESCRIPTION=\u206A\u206A\u206A\u200D\u200D\u200C\u200C\u200D\u200C\u200C\u200C\u200D\u200D\u200B\u200B\u200D\u200B\u200C\u200D\u200C\u200D\u200B\u200C\u200B\u200C\u200B\u200D\u200D\u200D\u200D\u200C\u200D\u200C\u200B\u200B\u200D\u200B\u200C\u200C\u200B\u200C\u200D\u200C\u206AViews have been successfully migrated.\n You can now switch to the created adaptations and verify them.\u206A\u206A
|
|
295
295
|
DAC_DIALOG_MIGRATION_ERROR_DESCRIPTION=\u206A\u206A\u206A\u200C\u200B\u200D\u200C\u200B\u200C\u200B\u200C\u200C\u200D\u200B\u200B\u200B\u200B\u200B\u200C\u200B\u200C\u200D\u200B\u200C\u200C\u200D\u200B\u200D\u200C\u200C\u200D\u200B\u200C\u200C\u200D\u200B\u200D\u200B\u200B\u200D\u200C\u200D\u200C\u200D\u206AAn Error occurred during the migration. Please try again later or contact your administrator.\u206A\u206A
|
|
296
296
|
MANAGE_ADAPTATIONS_DIALOG_HEADER=\u206A\u206A\u206A\u200C\u200C\u200D\u200D\u200B\u200D\u200C\u200C\u200C\u200B\u200D\u200B\u200B\u200B\u200D\u200B\u200D\u200B\u200D\u200C\u200B\u200C\u200D\u200D\u200C\u200B\u200C\u200B\u200C\u200B\u200C\u200B\u200D\u200C\u200B\u200B\u200D\u200B\u200C\u200B\u206AManage Adaptations\u206A\u206A
|
|
@@ -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.117.1
|
|
29
29
|
* @constructor
|
|
30
30
|
* @private
|
|
31
31
|
* @since 1.34
|
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
* @class The EasyAdd Plugin adds an Icon to an Overlay, which allows to trigger add operations directly
|
|
24
24
|
* @extends sap.ui.rta.plugin.additionalElements.AdditionalElementsPlugin
|
|
25
25
|
* @author SAP SE
|
|
26
|
-
* @version 1.
|
|
26
|
+
* @version 1.117.1
|
|
27
27
|
* @constructor
|
|
28
28
|
* @private
|
|
29
29
|
* @since 1.48
|
|
@@ -21,7 +21,7 @@ sap.ui.define([
|
|
|
21
21
|
* @class The EasyRemove Plugin adds an Icon to an Overlay, which allows to trigger remove operations directly
|
|
22
22
|
* @extends sap.ui.rta.plugin.Remove
|
|
23
23
|
* @author SAP SE
|
|
24
|
-
* @version 1.
|
|
24
|
+
* @version 1.117.1
|
|
25
25
|
* @constructor
|
|
26
26
|
* @private
|
|
27
27
|
* @since 1.48
|
|
@@ -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.1
|
|
34
34
|
* @constructor
|
|
35
35
|
* @private
|
|
36
36
|
* @since 1.34
|
|
@@ -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.117.1
|
|
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.
|
|
@@ -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.117.1
|
|
79
79
|
* @constructor
|
|
80
80
|
* @private
|
|
81
81
|
* @since 1.44
|
|
@@ -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.117.1
|
|
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.117.1
|
|
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.
|
|
@@ -116,7 +116,7 @@ sap.ui.define([
|
|
|
116
116
|
* @class The AddIFrame allows trigger AddIFrame operations on the overlay.
|
|
117
117
|
* @extends sap.ui.rta.plugin.BaseCreate
|
|
118
118
|
* @author SAP SE
|
|
119
|
-
* @version 1.
|
|
119
|
+
* @version 1.117.1
|
|
120
120
|
* @constructor
|
|
121
121
|
* @private
|
|
122
122
|
* @since 1.75
|
|
@@ -7,10 +7,12 @@
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/core/Core",
|
|
9
9
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
10
|
+
"sap/ui/dt/OverlayRegistry",
|
|
10
11
|
"sap/ui/fl/write/api/ChangesWriteAPI"
|
|
11
12
|
], function(
|
|
12
13
|
Core,
|
|
13
14
|
JsControlTreeModifier,
|
|
15
|
+
OverlayRegistry,
|
|
14
16
|
ChangesWriteAPI
|
|
15
17
|
) {
|
|
16
18
|
"use strict";
|
|
@@ -27,11 +29,13 @@ sap.ui.define([
|
|
|
27
29
|
* @author SAP SE
|
|
28
30
|
* @experimental Since 1.106
|
|
29
31
|
* @since 1.106
|
|
30
|
-
* @version 1.
|
|
32
|
+
* @version 1.117.1
|
|
31
33
|
* @private
|
|
32
34
|
* @ui5-restricted
|
|
33
35
|
*/
|
|
34
36
|
|
|
37
|
+
var sHighlightClass = "sapUiFlexibilitySupportExtension_Selected";
|
|
38
|
+
|
|
35
39
|
function getPluginChangeHandler(oPlugin, oElementOverlay, oRta) {
|
|
36
40
|
var oAction = oPlugin.getAction(oElementOverlay);
|
|
37
41
|
if (oAction && oAction.changeType) {
|
|
@@ -75,23 +79,40 @@ sap.ui.define([
|
|
|
75
79
|
});
|
|
76
80
|
}
|
|
77
81
|
|
|
82
|
+
/*
|
|
83
|
+
* Removes the highlighting of a non-selectable overlay
|
|
84
|
+
*/
|
|
85
|
+
function removeSelectionHighlight() {
|
|
86
|
+
var aHighlightedDom = document.getElementsByClassName(sHighlightClass);
|
|
87
|
+
if (aHighlightedDom.length > 0) {
|
|
88
|
+
aHighlightedDom[0].classList.remove(sHighlightClass);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
78
92
|
/*
|
|
79
93
|
* Returns information about an overlay, namely:
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
94
|
+
* For every plugin that is part of the "editableByPlugins"
|
|
95
|
+
* aggregation, we return the plugin name and the result for
|
|
96
|
+
* isAvailable(). If the change handler can be determined, we
|
|
97
|
+
* return this information, which enables a button allowing the
|
|
98
|
+
* key user to print the change handler to the console.
|
|
85
99
|
*
|
|
86
|
-
* @method sap.ui.rta.service.SupportTools.getOverlayInfo
|
|
87
100
|
* @param {sap.ui.rta.RuntimeAuthoring} oRta - Instance of the RuntimeAuthoring class
|
|
88
101
|
* @param {object} mPayload - Property Bag
|
|
89
102
|
* @param {string} mPayload.overlayId
|
|
90
103
|
*/
|
|
91
104
|
function getOverlayInfo(oRta, mPayload) {
|
|
92
105
|
var oOverlay = Core.byId(mPayload.overlayId);
|
|
106
|
+
if (!oOverlay) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
93
109
|
var oElement = oOverlay.getElement();
|
|
94
110
|
|
|
111
|
+
// remove previous selection highlighting on clicking in the app
|
|
112
|
+
if (oOverlay.getSelectable()) {
|
|
113
|
+
removeSelectionHighlight();
|
|
114
|
+
}
|
|
115
|
+
|
|
95
116
|
return Promise.all(oOverlay.getEditableByPlugins().map(function(sPluginName) {
|
|
96
117
|
var oInstance = getPluginByName(oRta, sPluginName);
|
|
97
118
|
var bIsSibling = isPluginForSibling(sPluginName);
|
|
@@ -115,6 +136,14 @@ sap.ui.define([
|
|
|
115
136
|
});
|
|
116
137
|
}
|
|
117
138
|
|
|
139
|
+
/*
|
|
140
|
+
* Prints the change handler to the console
|
|
141
|
+
*
|
|
142
|
+
* @param {sap.ui.rta.RuntimeAuthoring} oRta - Instance of the RuntimeAuthoring class
|
|
143
|
+
* @param {object} mPayload - Property Bag
|
|
144
|
+
* @param {string} mPayload.overlayId
|
|
145
|
+
* @param {string} mPayload.pluginName
|
|
146
|
+
*/
|
|
118
147
|
function printChangeHandler(oRta, mPayload) {
|
|
119
148
|
var oOverlay = Core.byId(mPayload.overlayId);
|
|
120
149
|
var oPlugin = getPluginByName(oRta, mPayload.pluginName);
|
|
@@ -122,6 +151,92 @@ sap.ui.define([
|
|
|
122
151
|
.then(console.log); // eslint-disable-line no-console
|
|
123
152
|
}
|
|
124
153
|
|
|
154
|
+
/*
|
|
155
|
+
* Closes the ContextMenu of the UI-Adaptation (if open)
|
|
156
|
+
* This method is called when user selects a non-selectable
|
|
157
|
+
* Overlay in Flex Support web extension (Overlay section)
|
|
158
|
+
*
|
|
159
|
+
* @param {sap.ui.rta.RuntimeAuthoring} oRta - Instance of the RuntimeAuthoring class
|
|
160
|
+
*/
|
|
161
|
+
function closeContextMenu(oRta) {
|
|
162
|
+
if (document.getElementsByClassName("sapUiDtContextMenu").length > 0) {
|
|
163
|
+
var oContextMenu = oRta.getPlugins().contextMenu;
|
|
164
|
+
oContextMenu.oContextMenuControl.close();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/*
|
|
169
|
+
* Changes the focus/selection in UI-Adaptation
|
|
170
|
+
* This method is called when user selects an entry in
|
|
171
|
+
* the overlay table of the Flex Support web extension (Overlay Info Section)
|
|
172
|
+
*
|
|
173
|
+
* @param {sap.ui.rta.RuntimeAuthoring} oRta - Instance of the RuntimeAuthoring class
|
|
174
|
+
* @param {object} mPayload - Property Bag
|
|
175
|
+
* @param {string} mPayload.overlayId - ID of the Overlay
|
|
176
|
+
*/
|
|
177
|
+
function changeOverlaySelection(oRta, mPayload) {
|
|
178
|
+
// set new focus and enforce collecting overlay info data
|
|
179
|
+
var oOverlay = Core.byId(mPayload.overlayId);
|
|
180
|
+
oOverlay.focus();
|
|
181
|
+
window.postMessage({
|
|
182
|
+
type: "getOverlayInfo",
|
|
183
|
+
id: "ui5FlexibilitySupport.submodules.overlayInfo",
|
|
184
|
+
content: {
|
|
185
|
+
overlayId: oOverlay.getId()
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
// remove previous selection highlighting
|
|
190
|
+
removeSelectionHighlight();
|
|
191
|
+
// close the contextmenu in UI-Adaptation
|
|
192
|
+
closeContextMenu(oRta);
|
|
193
|
+
|
|
194
|
+
// set new selection (selectable overlays)
|
|
195
|
+
if (oOverlay.getSelectable()) {
|
|
196
|
+
oOverlay.setSelected(true);
|
|
197
|
+
} else {
|
|
198
|
+
// remove current selection(s)
|
|
199
|
+
var aSelection = oRta.getSelection();
|
|
200
|
+
aSelection.forEach(function(oSelectedOverlay) {
|
|
201
|
+
oSelectedOverlay.setSelected(false);
|
|
202
|
+
});
|
|
203
|
+
// highlight unselectable overlay
|
|
204
|
+
if (oOverlay.getDomRef()) {
|
|
205
|
+
oOverlay.getDomRef().classList.add("sapUiFlexibilitySupportExtension_Selected");
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/*
|
|
211
|
+
* Collects all relevant data for the overlay table in
|
|
212
|
+
* Flex Support web extension (Overlay section)
|
|
213
|
+
* This method is called during initialization of the
|
|
214
|
+
* Overlay section and on pressing the "Reload" button
|
|
215
|
+
*/
|
|
216
|
+
function collectOverlayTableData() {
|
|
217
|
+
// create an array with all relevant overlays (no aggregation overlays)
|
|
218
|
+
var aAllOverlays = OverlayRegistry.getOverlays();
|
|
219
|
+
var aRelevantOverlayList = [];
|
|
220
|
+
aAllOverlays.forEach(function(oOverlay) {
|
|
221
|
+
if (!oOverlay.isA("sap.ui.dt.AggregationOverlay")) {
|
|
222
|
+
var sParentId = oOverlay.getParentElementOverlay()?.getId();
|
|
223
|
+
var aChildren = oOverlay.getChildren().map(function(oChild) {
|
|
224
|
+
return oChild.getId();
|
|
225
|
+
});
|
|
226
|
+
aRelevantOverlayList.push({
|
|
227
|
+
id: oOverlay.getId(),
|
|
228
|
+
parentId: sParentId,
|
|
229
|
+
elementId: oOverlay.getElement().getId(),
|
|
230
|
+
visible: oOverlay.getSelectable() && oOverlay.isVisible(),
|
|
231
|
+
idNum: parseInt(oOverlay.getId().replace("__overlay", "")),
|
|
232
|
+
children: aChildren,
|
|
233
|
+
hasParent: sParentId !== undefined
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
return aRelevantOverlayList;
|
|
238
|
+
}
|
|
239
|
+
|
|
125
240
|
function printDesignTimeMetadata(oRta, mPayload) {
|
|
126
241
|
var oOverlay = Core.byId(mPayload.overlayId);
|
|
127
242
|
console.log(oOverlay.getDesignTimeMetadata().getData()); // eslint-disable-line no-console
|
|
@@ -141,9 +256,44 @@ sap.ui.define([
|
|
|
141
256
|
printDesignTimeMetadata: {
|
|
142
257
|
handler: printDesignTimeMetadata,
|
|
143
258
|
id: "ui5FlexibilitySupport.submodules.overlayInfo"
|
|
259
|
+
},
|
|
260
|
+
changeOverlaySelection: {
|
|
261
|
+
handler: changeOverlaySelection,
|
|
262
|
+
id: "ui5FlexibilitySupport.submodules.overlayInfo"
|
|
263
|
+
},
|
|
264
|
+
collectOverlayTableData: {
|
|
265
|
+
handler: collectOverlayTableData,
|
|
266
|
+
returnMessageType: "overlayInfoTableData",
|
|
267
|
+
id: "ui5FlexibilitySupport.submodules.overlayInfo"
|
|
144
268
|
}
|
|
145
269
|
};
|
|
146
270
|
|
|
271
|
+
/*
|
|
272
|
+
* Handler method for the Rta event "stop"
|
|
273
|
+
* sends a corresponding message to the
|
|
274
|
+
* Flex Support web extension (Overlay section)
|
|
275
|
+
*/
|
|
276
|
+
function onRtaStop() {
|
|
277
|
+
window.postMessage({
|
|
278
|
+
type: "rtaStopped",
|
|
279
|
+
id: "ui5FlexibilitySupport.submodules.overlayInfo",
|
|
280
|
+
content: {}
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/*
|
|
285
|
+
* Sends a message to the Flex Support
|
|
286
|
+
* web extension (Overlay section) that
|
|
287
|
+
* UI Adaption has started
|
|
288
|
+
*/
|
|
289
|
+
function onRtaStart() {
|
|
290
|
+
window.postMessage({
|
|
291
|
+
type: "rtaStarted",
|
|
292
|
+
id: "ui5FlexibilitySupport.submodules.overlayInfo",
|
|
293
|
+
content: {}
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
|
|
147
297
|
/*
|
|
148
298
|
* Event handler for the messages sent by the support extension.
|
|
149
299
|
*
|
|
@@ -155,7 +305,6 @@ sap.ui.define([
|
|
|
155
305
|
* - printDesignTimeMetadata (the calculated designtime metadata of the overlay is to be printed to the console)
|
|
156
306
|
* - content: type-specific information, e.g. for getOverlayInfo, an 'overlayId' is provided
|
|
157
307
|
*
|
|
158
|
-
* @method sap.ui.rta.service.SupportTools.onMessageReceived
|
|
159
308
|
* @param {sap.ui.rta.RuntimeAuthoring} oRta - Instance of the RuntimeAuthoring class
|
|
160
309
|
* @param {object} oEvent - Event thrown by the browser on received message
|
|
161
310
|
*/
|
|
@@ -189,6 +338,8 @@ sap.ui.define([
|
|
|
189
338
|
return function(oRta) {
|
|
190
339
|
var fnOnMessageReceivedBound = onMessageReceived.bind(null, oRta);
|
|
191
340
|
window.addEventListener("message", fnOnMessageReceivedBound);
|
|
341
|
+
oRta.attachEventOnce("stop", onRtaStop);
|
|
342
|
+
onRtaStart();
|
|
192
343
|
|
|
193
344
|
return {
|
|
194
345
|
destroy: function() {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/******************************************************************
|
|
2
|
+
Style used by flex support chrome extension - base Theme
|
|
3
|
+
*******************************************************************/
|
|
4
|
+
.sapUiFlexibilitySupportExtension_Selected {
|
|
5
|
+
box-shadow: @sapUiUx3ToolPopupShadow;
|
|
6
|
+
&:after {
|
|
7
|
+
content: " ";
|
|
8
|
+
background: @sapUiMessageSuccessBorderColor;
|
|
9
|
+
opacity: 0.40;
|
|
10
|
+
border-radius: @sapUiButtonBorderCornerRadius;
|
|
11
|
+
outline: 0.125rem solid @sapUiSelected; //1px
|
|
12
|
+
outline-offset: -0.125rem; //1px
|
|
13
|
+
}
|
|
14
|
+
}
|