@openui5/sap.ui.rta 1.128.0 → 1.130.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/THIRDPARTY.txt +2 -2
- 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 +36 -10
- 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 +1 -1
- package/src/sap/ui/rta/appVariant/Feature.js +2 -2
- package/src/sap/ui/rta/appVariant/Utils.js +3 -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 +2 -2
- package/src/sap/ui/rta/command/Annotation.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 +10 -8
- package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +31 -14
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +14 -15
- 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 +8 -5
- package/src/sap/ui/rta/command/LREPSerializer.js +1 -1
- 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 +6 -4
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +7 -5
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +5 -3
- package/src/sap/ui/rta/enablement/TestDelegate.js +4 -3
- package/src/sap/ui/rta/enablement/elementActionTest.js +9 -6
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +43 -1
- package/src/sap/ui/rta/messagebundle_ar.properties +21 -0
- package/src/sap/ui/rta/messagebundle_bg.properties +21 -0
- package/src/sap/ui/rta/messagebundle_ca.properties +21 -0
- package/src/sap/ui/rta/messagebundle_cnr.properties +22 -1
- package/src/sap/ui/rta/messagebundle_cs.properties +21 -0
- package/src/sap/ui/rta/messagebundle_cy.properties +21 -0
- package/src/sap/ui/rta/messagebundle_da.properties +22 -1
- package/src/sap/ui/rta/messagebundle_de.properties +21 -0
- package/src/sap/ui/rta/messagebundle_el.properties +21 -0
- package/src/sap/ui/rta/messagebundle_en.properties +21 -0
- package/src/sap/ui/rta/messagebundle_en_GB.properties +21 -0
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +14 -2
- package/src/sap/ui/rta/messagebundle_es.properties +21 -0
- package/src/sap/ui/rta/messagebundle_es_MX.properties +21 -0
- package/src/sap/ui/rta/messagebundle_et.properties +21 -0
- package/src/sap/ui/rta/messagebundle_fi.properties +21 -0
- package/src/sap/ui/rta/messagebundle_fr.properties +21 -0
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +22 -1
- package/src/sap/ui/rta/messagebundle_hi.properties +21 -0
- package/src/sap/ui/rta/messagebundle_hr.properties +21 -0
- package/src/sap/ui/rta/messagebundle_hu.properties +21 -0
- package/src/sap/ui/rta/messagebundle_id.properties +22 -1
- package/src/sap/ui/rta/messagebundle_it.properties +21 -0
- package/src/sap/ui/rta/messagebundle_iw.properties +21 -0
- package/src/sap/ui/rta/messagebundle_ja.properties +21 -0
- package/src/sap/ui/rta/messagebundle_kk.properties +21 -0
- package/src/sap/ui/rta/messagebundle_ko.properties +21 -0
- package/src/sap/ui/rta/messagebundle_lt.properties +21 -0
- package/src/sap/ui/rta/messagebundle_lv.properties +21 -0
- package/src/sap/ui/rta/messagebundle_mk.properties +23 -2
- package/src/sap/ui/rta/messagebundle_ms.properties +21 -0
- package/src/sap/ui/rta/messagebundle_nl.properties +21 -0
- package/src/sap/ui/rta/messagebundle_no.properties +21 -0
- package/src/sap/ui/rta/messagebundle_pl.properties +21 -0
- package/src/sap/ui/rta/messagebundle_pt.properties +21 -0
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +21 -0
- package/src/sap/ui/rta/messagebundle_ro.properties +22 -1
- package/src/sap/ui/rta/messagebundle_ru.properties +21 -0
- package/src/sap/ui/rta/messagebundle_sh.properties +22 -1
- package/src/sap/ui/rta/messagebundle_sk.properties +21 -0
- package/src/sap/ui/rta/messagebundle_sl.properties +21 -0
- package/src/sap/ui/rta/messagebundle_sr.properties +22 -1
- package/src/sap/ui/rta/messagebundle_sv.properties +21 -0
- package/src/sap/ui/rta/messagebundle_th.properties +21 -0
- package/src/sap/ui/rta/messagebundle_tr.properties +21 -0
- package/src/sap/ui/rta/messagebundle_uk.properties +22 -1
- package/src/sap/ui/rta/messagebundle_vi.properties +22 -1
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +21 -0
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +21 -0
- 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 +21 -20
- 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/LocalReset.js +1 -1
- package/src/sap/ui/rta/plugin/Plugin.js +2 -3
- 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.fragment.xml +0 -1
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +70 -69
- 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 +9 -7
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +4 -3
- package/src/sap/ui/rta/service/Action.js +4 -3
- package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
- package/src/sap/ui/rta/service/Outline.js +5 -9
- package/src/sap/ui/rta/service/Property.js +10 -11
- package/src/sap/ui/rta/service/Selection.js +1 -1
- package/src/sap/ui/rta/service/SupportTools.js +104 -45
- package/src/sap/ui/rta/themes/base/ChangeVisualization.less +2 -16
- package/src/sap/ui/rta/themes/base/WhatsNew.less +7 -0
- package/src/sap/ui/rta/themes/base/library.source.less +2 -1
- package/src/sap/ui/rta/themes/sap_hcb/ChangeVisualization.less +0 -1
- package/src/sap/ui/rta/toolbar/ActionsMenu.fragment.xml +8 -0
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +8 -1
- package/src/sap/ui/rta/toolbar/Adaptation.js +9 -2
- 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/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +20 -18
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +1 -1
- package/src/sap/ui/rta/toolbar/translation/Translation.js +3 -3
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
- package/src/sap/ui/rta/util/PluginManager.js +2 -2
- package/src/sap/ui/rta/util/PopupManager.js +1 -1
- package/src/sap/ui/rta/util/ReloadManager.js +25 -2
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/ServiceManager.js +2 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -8
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorCategorySelection.fragment.xml +10 -10
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +11 -13
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +59 -25
- package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +111 -0
- package/src/sap/ui/rta/util/whatsNew/WhatsNewDialog.fragment.xml +81 -0
- package/src/sap/ui/rta/util/whatsNew/WhatsNewOverview.js +82 -0
- package/src/sap/ui/rta/util/whatsNew/WhatsNewOverviewDialog.fragment.xml +75 -0
- package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +73 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/WhatsNewFeatures.js +138 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/AdvancedSettingsImage.png +0 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/FullIframe.png +0 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/MiniMenu.png +0 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/WhatsNewOverview.png +0 -0
|
@@ -5,11 +5,13 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
+
"sap/base/Log",
|
|
8
9
|
"sap/ui/core/Element",
|
|
9
10
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
10
11
|
"sap/ui/dt/OverlayRegistry",
|
|
11
12
|
"sap/ui/fl/write/api/ChangesWriteAPI"
|
|
12
13
|
], function(
|
|
14
|
+
Log,
|
|
13
15
|
Element,
|
|
14
16
|
JsControlTreeModifier,
|
|
15
17
|
OverlayRegistry,
|
|
@@ -28,17 +30,33 @@ sap.ui.define([
|
|
|
28
30
|
* @name sap.ui.rta.service.SupportTools
|
|
29
31
|
* @author SAP SE
|
|
30
32
|
* @since 1.106
|
|
31
|
-
* @version 1.
|
|
33
|
+
* @version 1.130.0
|
|
32
34
|
* @private
|
|
33
35
|
* @ui5-restricted
|
|
34
36
|
*/
|
|
35
37
|
|
|
36
|
-
|
|
38
|
+
const sHighlightClass = "sapUiFlexibilitySupportExtension_Selected";
|
|
39
|
+
const sGlobalVariableName = "ui5flex$temp";
|
|
40
|
+
window[sGlobalVariableName] = {}; // Container for all temp. variables
|
|
41
|
+
const aTempVariables = window[sGlobalVariableName];
|
|
42
|
+
let nTempVarCount = 0;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Logs a message to the console
|
|
46
|
+
* @param {string} sMessage - Message to be logged
|
|
47
|
+
* @param {object} oVariable - Variable containing Object to be logged
|
|
48
|
+
*/
|
|
49
|
+
function logToConsole(sMessage, oVariable) {
|
|
50
|
+
console.log(`Flextention: ${sMessage}`); // eslint-disable-line no-console
|
|
51
|
+
if (oVariable) {
|
|
52
|
+
console.log(oVariable); // eslint-disable-line no-console
|
|
53
|
+
}
|
|
54
|
+
}
|
|
37
55
|
|
|
38
56
|
function getPluginChangeHandler(oPlugin, oElementOverlay, oRta) {
|
|
39
|
-
|
|
57
|
+
const oAction = oPlugin.getAction(oElementOverlay);
|
|
40
58
|
if (oAction && oAction.changeType) {
|
|
41
|
-
|
|
59
|
+
const oElement = oAction.changeOnRelevantContainer
|
|
42
60
|
? oElementOverlay.getRelevantContainer()
|
|
43
61
|
: oElementOverlay.getElement();
|
|
44
62
|
return ChangesWriteAPI.getChangeHandler({
|
|
@@ -68,10 +86,10 @@ sap.ui.define([
|
|
|
68
86
|
}
|
|
69
87
|
|
|
70
88
|
function getPluginByName(oRta, sPluginName) {
|
|
71
|
-
|
|
72
|
-
|
|
89
|
+
const bIsSibling = isPluginForSibling(sPluginName);
|
|
90
|
+
const oAllPlugins = oRta.getPlugins();
|
|
73
91
|
return Object.values(oAllPlugins).find(function(oPlugin) {
|
|
74
|
-
|
|
92
|
+
const sName = oPlugin._retrievePluginName
|
|
75
93
|
? oPlugin._retrievePluginName(bIsSibling)
|
|
76
94
|
: oPlugin.getMetadata().getName();
|
|
77
95
|
return sName === sPluginName;
|
|
@@ -82,10 +100,10 @@ sap.ui.define([
|
|
|
82
100
|
* Removes the highlighting of a non-selectable overlay
|
|
83
101
|
*/
|
|
84
102
|
function removeSelectionHighlight() {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
103
|
+
const aHighlightedDom = document.getElementsByClassName(sHighlightClass);
|
|
104
|
+
if (aHighlightedDom.length > 0) {
|
|
105
|
+
aHighlightedDom[0].classList.remove(sHighlightClass);
|
|
106
|
+
}
|
|
89
107
|
}
|
|
90
108
|
|
|
91
109
|
/*
|
|
@@ -102,11 +120,11 @@ sap.ui.define([
|
|
|
102
120
|
* @returns {Promise<object|null>} Resolves with the overlay info
|
|
103
121
|
*/
|
|
104
122
|
async function getOverlayInfo(oRta, mPayload) {
|
|
105
|
-
|
|
123
|
+
const oOverlay = Element.getElementById(mPayload.overlayId);
|
|
106
124
|
if (!oOverlay) {
|
|
107
125
|
return null;
|
|
108
126
|
}
|
|
109
|
-
|
|
127
|
+
const oElement = oOverlay.getElement();
|
|
110
128
|
|
|
111
129
|
// remove previous selection highlighting on clicking in the app
|
|
112
130
|
if (oOverlay.getSelectable()) {
|
|
@@ -120,8 +138,8 @@ sap.ui.define([
|
|
|
120
138
|
});
|
|
121
139
|
|
|
122
140
|
const aPlugins = await Promise.all(aEditableByPlugins.map(async function(sPluginName) {
|
|
123
|
-
|
|
124
|
-
|
|
141
|
+
const oInstance = getPluginByName(oRta, sPluginName);
|
|
142
|
+
const bIsSibling = isPluginForSibling(sPluginName);
|
|
125
143
|
|
|
126
144
|
const oChangeHandler = await getPluginChangeHandler(oInstance, oOverlay, oRta);
|
|
127
145
|
return {
|
|
@@ -139,19 +157,36 @@ sap.ui.define([
|
|
|
139
157
|
};
|
|
140
158
|
}
|
|
141
159
|
|
|
142
|
-
|
|
160
|
+
/**
|
|
143
161
|
* Prints the change handler to the console
|
|
144
|
-
*
|
|
145
162
|
* @param {sap.ui.rta.RuntimeAuthoring} oRta - Instance of the RuntimeAuthoring class
|
|
146
163
|
* @param {object} mPayload - Property Bag
|
|
147
|
-
* @param {string} mPayload.overlayId
|
|
148
|
-
* @param {string} mPayload.pluginName
|
|
164
|
+
* @param {string} mPayload.overlayId - ID of the Overlay
|
|
165
|
+
* @param {string} mPayload.pluginName - Name of the Plugin
|
|
149
166
|
*/
|
|
150
|
-
function printChangeHandler(oRta, mPayload) {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
getPluginChangeHandler(oPlugin, oOverlay, oRta)
|
|
154
|
-
|
|
167
|
+
async function printChangeHandler(oRta, mPayload) {
|
|
168
|
+
const oOverlay = Element.getElementById(mPayload.overlayId);
|
|
169
|
+
const oPlugin = getPluginByName(oRta, mPayload.pluginName);
|
|
170
|
+
const oChangeHandler = await getPluginChangeHandler(oPlugin, oOverlay, oRta);
|
|
171
|
+
if (oPlugin) {
|
|
172
|
+
try {
|
|
173
|
+
const sPluginId = oPlugin.getId();
|
|
174
|
+
const sTempVariableName = aTempVariables[sPluginId] && aTempVariables[sPluginId].savedAs || `ui5flex$${nTempVarCount++}`;
|
|
175
|
+
aTempVariables[sPluginId] = {
|
|
176
|
+
description: `ChangeHandler for Plugin: ${sPluginId} - ${mPayload.pluginName}`,
|
|
177
|
+
changeHandler: oChangeHandler,
|
|
178
|
+
savedAs: sTempVariableName
|
|
179
|
+
};
|
|
180
|
+
const oVariable = aTempVariables[sPluginId];
|
|
181
|
+
window[sTempVariableName] = aTempVariables[sPluginId];
|
|
182
|
+
const sMessage = `ChangeHandler copied to global var ${sTempVariableName}, all vars are collected in global var ${sGlobalVariableName}`;
|
|
183
|
+
logToConsole(sMessage, oVariable);
|
|
184
|
+
} catch (oError) {
|
|
185
|
+
// Ignore errors
|
|
186
|
+
}
|
|
187
|
+
} else {
|
|
188
|
+
logToConsole("ChangeHandler could not be logged", undefined);
|
|
189
|
+
}
|
|
155
190
|
}
|
|
156
191
|
|
|
157
192
|
/*
|
|
@@ -163,7 +198,7 @@ sap.ui.define([
|
|
|
163
198
|
*/
|
|
164
199
|
function closeContextMenu(oRta) {
|
|
165
200
|
if (document.getElementsByClassName("sapUiDtContextMenu").length > 0) {
|
|
166
|
-
|
|
201
|
+
const oContextMenu = oRta.getPlugins().contextMenu;
|
|
167
202
|
oContextMenu.oContextMenuControl.close();
|
|
168
203
|
}
|
|
169
204
|
}
|
|
@@ -179,7 +214,7 @@ sap.ui.define([
|
|
|
179
214
|
*/
|
|
180
215
|
function changeOverlaySelection(oRta, mPayload) {
|
|
181
216
|
// set new focus and enforce collecting overlay info data
|
|
182
|
-
|
|
217
|
+
const oOverlay = Element.getElementById(mPayload.overlayId);
|
|
183
218
|
oOverlay.focus();
|
|
184
219
|
window.postMessage({
|
|
185
220
|
type: "getOverlayInfo",
|
|
@@ -194,19 +229,18 @@ sap.ui.define([
|
|
|
194
229
|
// close the contextmenu in UI-Adaptation
|
|
195
230
|
closeContextMenu(oRta);
|
|
196
231
|
|
|
232
|
+
// remove current selection(s)
|
|
233
|
+
const aSelection = oRta.getSelection();
|
|
234
|
+
aSelection.forEach(function(oSelectedOverlay) {
|
|
235
|
+
oSelectedOverlay.setSelected(false);
|
|
236
|
+
});
|
|
237
|
+
|
|
197
238
|
// set new selection (selectable overlays)
|
|
198
239
|
if (oOverlay.getSelectable()) {
|
|
199
240
|
oOverlay.setSelected(true);
|
|
200
|
-
} else {
|
|
201
|
-
// remove current selection(s)
|
|
202
|
-
var aSelection = oRta.getSelection();
|
|
203
|
-
aSelection.forEach(function(oSelectedOverlay) {
|
|
204
|
-
oSelectedOverlay.setSelected(false);
|
|
205
|
-
});
|
|
241
|
+
} else if (oOverlay.getDomRef()) {
|
|
206
242
|
// highlight unselectable overlay
|
|
207
|
-
|
|
208
|
-
oOverlay.getDomRef().classList.add("sapUiFlexibilitySupportExtension_Selected");
|
|
209
|
-
}
|
|
243
|
+
oOverlay.getDomRef().classList.add("sapUiFlexibilitySupportExtension_Selected");
|
|
210
244
|
}
|
|
211
245
|
}
|
|
212
246
|
|
|
@@ -218,12 +252,12 @@ sap.ui.define([
|
|
|
218
252
|
*/
|
|
219
253
|
function collectOverlayTableData() {
|
|
220
254
|
// create an array with all relevant overlays (no aggregation overlays)
|
|
221
|
-
|
|
222
|
-
|
|
255
|
+
const aAllOverlays = OverlayRegistry.getOverlays();
|
|
256
|
+
const aRelevantOverlayList = [];
|
|
223
257
|
aAllOverlays.forEach(function(oOverlay) {
|
|
224
258
|
if (!oOverlay.isA("sap.ui.dt.AggregationOverlay")) {
|
|
225
|
-
|
|
226
|
-
|
|
259
|
+
const sParentId = oOverlay.getParentElementOverlay()?.getId();
|
|
260
|
+
const aChildren = oOverlay.getChildren().map(function(oChild) {
|
|
227
261
|
return oChild.getId();
|
|
228
262
|
});
|
|
229
263
|
aRelevantOverlayList.push({
|
|
@@ -240,13 +274,38 @@ sap.ui.define([
|
|
|
240
274
|
return aRelevantOverlayList;
|
|
241
275
|
}
|
|
242
276
|
|
|
277
|
+
/**
|
|
278
|
+
* Prints the design time metadata to the console
|
|
279
|
+
* @param {sap.ui.rta.RuntimeAuthoring} oRta - Instance of the RuntimeAuthoring class
|
|
280
|
+
* @param {object} mPayload - Property Bag
|
|
281
|
+
* @param {string} mPayload.overlayId - ID of the Overlay
|
|
282
|
+
*/
|
|
243
283
|
function printDesignTimeMetadata(oRta, mPayload) {
|
|
244
|
-
|
|
245
|
-
|
|
284
|
+
const oOverlay = Element.getElementById(mPayload.overlayId);
|
|
285
|
+
const oMetaData = oOverlay.getDesignTimeMetadata().getData();
|
|
286
|
+
if (oMetaData) {
|
|
287
|
+
try {
|
|
288
|
+
const sMetaDataId = oOverlay.getDesignTimeMetadata().getId();
|
|
289
|
+
const sTempVariableName = aTempVariables[sMetaDataId] && aTempVariables[sMetaDataId].savedAs || `ui5flex$${nTempVarCount++}`;
|
|
290
|
+
aTempVariables[sMetaDataId] = {
|
|
291
|
+
description: `DesignTimeMetaData: ${sMetaDataId} for Overlay: ${mPayload.overlayId}`,
|
|
292
|
+
metaData: oMetaData,
|
|
293
|
+
savedAs: sTempVariableName
|
|
294
|
+
};
|
|
295
|
+
const oVariable = aTempVariables[sMetaDataId];
|
|
296
|
+
window[sTempVariableName] = aTempVariables[sMetaDataId];
|
|
297
|
+
const sMessage = `MetaData copied to global var ${sTempVariableName}, all vars are collected in global var ${sGlobalVariableName}`;
|
|
298
|
+
logToConsole(sMessage, oVariable);
|
|
299
|
+
} catch (oError) {
|
|
300
|
+
// Ignore errors
|
|
301
|
+
}
|
|
302
|
+
} else {
|
|
303
|
+
logToConsole("DesignTimeMetaData could not be logged", undefined);
|
|
304
|
+
}
|
|
246
305
|
}
|
|
247
306
|
|
|
248
307
|
// List of supported handlers
|
|
249
|
-
|
|
308
|
+
const mHandlers = {
|
|
250
309
|
getOverlayInfo: {
|
|
251
310
|
handler: getOverlayInfo,
|
|
252
311
|
returnMessageType: "overlayInfo",
|
|
@@ -316,13 +375,13 @@ sap.ui.define([
|
|
|
316
375
|
return;
|
|
317
376
|
}
|
|
318
377
|
|
|
319
|
-
|
|
378
|
+
const aHandler = Object.entries(mHandlers).find(function(aEntry) {
|
|
320
379
|
return (
|
|
321
380
|
aEntry[0] === oEvent.data.type
|
|
322
381
|
&& aEntry[1].id === oEvent.data.id
|
|
323
382
|
);
|
|
324
383
|
});
|
|
325
|
-
|
|
384
|
+
const mHandler = aHandler && aHandler[1];
|
|
326
385
|
|
|
327
386
|
if (mHandler) {
|
|
328
387
|
Promise.resolve(mHandler.handler(oRta, oEvent.data.content))
|
|
@@ -339,7 +398,7 @@ sap.ui.define([
|
|
|
339
398
|
}
|
|
340
399
|
|
|
341
400
|
return function(oRta) {
|
|
342
|
-
|
|
401
|
+
const fnOnMessageReceivedBound = onMessageReceived.bind(null, oRta);
|
|
343
402
|
window.addEventListener("message", fnOnMessageReceivedBound);
|
|
344
403
|
oRta.attachEventOnce("stop", onRtaStop);
|
|
345
404
|
onRtaStart();
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/******************************************************************
|
|
2
2
|
Style of the RTA Change Visualization - base theme
|
|
3
3
|
*******************************************************************/
|
|
4
|
-
@_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorLight: @sapUiChartPaletteSequentialHue1Light1; //#4880cb
|
|
5
4
|
@_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorMedium: @sapUiChartPaletteSequentialHue1Dark1; //#1b57a7
|
|
6
5
|
@_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorDark: @sapUiChartPaletteSequentialHue11Dark2; //#0e4186
|
|
7
6
|
@_sap_ui_rta_ChangeVisualization_OverlayBoxShadow: @sapUiUx3ToolPopupShadow; //0px 6px 12px 0px fade(black, 30);
|
|
@@ -16,21 +15,8 @@
|
|
|
16
15
|
margin-left: 0.25rem;
|
|
17
16
|
transition: width 0.3s, height 0.3s, box-shadow 0.3s;
|
|
18
17
|
cursor: pointer;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
background-color: @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorLight;
|
|
22
|
-
opacity: 0.6;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&.sapUiRtaChangeIndicatorColorMedium {
|
|
26
|
-
background-color: @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorMedium;
|
|
27
|
-
opacity: 0.75;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&.sapUiRtaChangeIndicatorColorDark {
|
|
31
|
-
background-color: @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorDark;
|
|
32
|
-
opacity: 0.75;
|
|
33
|
-
}
|
|
18
|
+
background-color: @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorMedium;
|
|
19
|
+
opacity: 0.75;
|
|
34
20
|
|
|
35
21
|
&.sapUiRtaChangeIndicatorVerticallyCentered {
|
|
36
22
|
top: 50%;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/******************************************************************
|
|
2
2
|
Style of the RTA Change Visualization - HCB theme
|
|
3
3
|
*******************************************************************/
|
|
4
|
-
@_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorLight: lighten(@sapUiPositiveText, 10%); //#bbddbb
|
|
5
4
|
@_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorMedium: @sapUiCriticalText; //#ffab1d
|
|
6
5
|
@_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorDark: lighten(@sapUiChart8, 20%); //#dd8ec9
|
|
7
6
|
@_sap_ui_rta_ChangeVisualization_OverlayOutline: @sapUiContentHelpColor; // #03b803
|
|
@@ -72,5 +72,13 @@
|
|
|
72
72
|
visible="{= (${controls>/restore/visible} && ((${controls>/modeSwitcher} === 'visualization') || (${controls>/modeSwitcher} === 'adaptation')))}"
|
|
73
73
|
press=".restore"
|
|
74
74
|
text="{i18n>BTN_RESTORE}" />
|
|
75
|
+
<MenuItem
|
|
76
|
+
id="sapUiRta_newFeaturesOverview"
|
|
77
|
+
icon="sap-icon://newspaper"
|
|
78
|
+
enabled="{controls>/newFeaturesOverview/enabled}"
|
|
79
|
+
visible="{controls>/newFeaturesOverview/visible}"
|
|
80
|
+
text="{i18n>BTN_WHATS_NEW_DIALOG_OVERVIEW}"
|
|
81
|
+
press=".openWhatsNewOverviewDialog"
|
|
82
|
+
ariaHasPopup="Dialog"/>
|
|
75
83
|
</Menu>
|
|
76
84
|
</core:FragmentDefinition>
|
|
@@ -109,7 +109,14 @@
|
|
|
109
109
|
<Button
|
|
110
110
|
id="sapUiRta_actionsMenu"
|
|
111
111
|
icon="sap-icon://menu2"
|
|
112
|
-
visible="{=
|
|
112
|
+
visible="{=
|
|
113
|
+
${controls>/modeSwitcher} === 'adaptation'
|
|
114
|
+
&& (
|
|
115
|
+
${controls>/translation/visible}
|
|
116
|
+
|| ${controls>/appVariantMenu/visible}
|
|
117
|
+
|| ${controls>/restore/visible}
|
|
118
|
+
|| ${controls>/newFeaturesOverview/visible}
|
|
119
|
+
)}"
|
|
113
120
|
enabled="{controls>/actionsMenuButton/enabled}"
|
|
114
121
|
type="Transparent"
|
|
115
122
|
tooltip="{i18n>BTN_MENU}"
|
|
@@ -23,6 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
"sap/ui/rta/toolbar/contextBased/SaveAsAdaptation",
|
|
24
24
|
"sap/ui/rta/toolbar/translation/Translation",
|
|
25
25
|
"sap/ui/rta/toolbar/versioning/Versioning",
|
|
26
|
+
"sap/ui/rta/util/whatsNew/WhatsNewOverview",
|
|
26
27
|
"sap/ui/rta/Utils"
|
|
27
28
|
], function(
|
|
28
29
|
AdaptationRenderer,
|
|
@@ -43,6 +44,7 @@ sap.ui.define([
|
|
|
43
44
|
SaveAsAdaptation,
|
|
44
45
|
Translation,
|
|
45
46
|
Versioning,
|
|
47
|
+
WhatsNewOverview,
|
|
46
48
|
Utils
|
|
47
49
|
) {
|
|
48
50
|
"use strict";
|
|
@@ -55,7 +57,7 @@ sap.ui.define([
|
|
|
55
57
|
* @extends sap.ui.rta.toolbar.Base
|
|
56
58
|
*
|
|
57
59
|
* @author SAP SE
|
|
58
|
-
* @version 1.
|
|
60
|
+
* @version 1.130.0
|
|
59
61
|
*
|
|
60
62
|
* @constructor
|
|
61
63
|
* @private
|
|
@@ -254,7 +256,8 @@ sap.ui.define([
|
|
|
254
256
|
overviewForDeveloper: onOverviewForDeveloperPressed.bind(this),
|
|
255
257
|
restore: this.eventHandler.bind(this, "Restore"),
|
|
256
258
|
formatSaveAsEnabled,
|
|
257
|
-
saveAs: onSaveAsPressed.bind(this)
|
|
259
|
+
saveAs: onSaveAsPressed.bind(this),
|
|
260
|
+
openWhatsNewOverviewDialog
|
|
258
261
|
}
|
|
259
262
|
}).then(function(oMenu) {
|
|
260
263
|
oMenu.addStyleClass(Utils.getRtaStyleClassName());
|
|
@@ -472,6 +475,10 @@ sap.ui.define([
|
|
|
472
475
|
AppVariantFeature.onGetOverview(true, this.getRtaInformation().flexSettings.layer);
|
|
473
476
|
}
|
|
474
477
|
|
|
478
|
+
function openWhatsNewOverviewDialog() {
|
|
479
|
+
WhatsNewOverview.openWhatsNewOverviewDialog();
|
|
480
|
+
}
|
|
481
|
+
|
|
475
482
|
Adaptation.prototype.getControl = function(sName) {
|
|
476
483
|
var oControl = Element.getElementById(`${this.getId()}_fragment--sapUiRta_${sName}`);
|
|
477
484
|
// Control is inside the ActionsMenu
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
"sap/base/i18n/Localization",
|
|
10
10
|
"sap/base/util/restricted/_isEqual",
|
|
11
|
+
"sap/base/util/restricted/_union",
|
|
11
12
|
"sap/base/Log",
|
|
12
13
|
"sap/ui/base/ManagedObject",
|
|
13
14
|
"sap/ui/core/Fragment",
|
|
@@ -22,6 +23,7 @@ sap.ui.define([
|
|
|
22
23
|
], function(
|
|
23
24
|
Localization,
|
|
24
25
|
_isEqual,
|
|
26
|
+
_union,
|
|
25
27
|
Log,
|
|
26
28
|
ManagedObject,
|
|
27
29
|
Fragment,
|
|
@@ -263,43 +265,43 @@ sap.ui.define([
|
|
|
263
265
|
}
|
|
264
266
|
|
|
265
267
|
function onDropSelectedAdaptation(oEvent) {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
+
const oDraggedItem = oEvent.getParameter("draggedControl");
|
|
269
|
+
const oDraggedItemContext = oDraggedItem.getBindingContext("contextBased");
|
|
268
270
|
if (!oDraggedItemContext) {
|
|
269
271
|
return;
|
|
270
272
|
}
|
|
271
273
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
+
let iNewRank = oRanking.Default;
|
|
275
|
+
const oDroppedItem = oEvent.getParameter("droppedControl");
|
|
274
276
|
|
|
275
277
|
if (oDroppedItem instanceof ColumnListItem) {
|
|
276
278
|
// get the dropped row data
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
const sDropPosition = oEvent.getParameter("dropPosition");
|
|
280
|
+
const oDroppedItemContext = oDroppedItem.getBindingContext("contextBased");
|
|
281
|
+
const iDroppedItemRank = oDroppedItemContext.getProperty("rank");
|
|
282
|
+
const oDroppedTable = oDroppedItem.getParent();
|
|
283
|
+
const iDroppedItemIndex = oDroppedTable.indexOfItem(oDroppedItem);
|
|
282
284
|
if (oDroppedItemContext === oDraggedItemContext) {
|
|
283
285
|
return;
|
|
284
286
|
}
|
|
285
287
|
// find the new index of the dragged row depending on the drop position
|
|
286
|
-
|
|
287
|
-
|
|
288
|
+
const iNewItemIndex = iDroppedItemIndex + (sDropPosition === "After" ? 1 : -1);
|
|
289
|
+
const oNewItem = oDroppedTable.getItems()[iNewItemIndex];
|
|
288
290
|
if (!oNewItem || iNewItemIndex === -1) {
|
|
289
291
|
// dropped before the first row or after the last row
|
|
290
292
|
iNewRank = iNewItemIndex === -1 ? 0.5 : oRanking[sDropPosition](iDroppedItemRank);
|
|
291
293
|
} else {
|
|
292
294
|
// dropped between first and the last row
|
|
293
|
-
|
|
295
|
+
const oNewItemContext = oNewItem.getBindingContext("contextBased");
|
|
294
296
|
iNewRank = oRanking.Between(iDroppedItemRank, oNewItemContext.getProperty("rank"));
|
|
295
297
|
}
|
|
296
298
|
}
|
|
297
299
|
// set the rank property and update the model to refresh the bindings
|
|
298
300
|
this.oAdaptationsModel.setProperty("rank", iNewRank, oDraggedItemContext);
|
|
299
301
|
sortByRank(this.oAdaptationsModel);
|
|
300
|
-
|
|
301
|
-
this.oAdaptationsModel.getProperty("/
|
|
302
|
-
this.oAdaptationsModel.getProperty("/
|
|
302
|
+
const oAllUpdatedAdaptations = _union(
|
|
303
|
+
this.oAdaptationsModel.getProperty("/adaptations"),
|
|
304
|
+
this.oAdaptationsModel.getProperty("/allAdaptations")
|
|
303
305
|
);
|
|
304
306
|
this.oAdaptationsModel.updateAdaptations(oAllUpdatedAdaptations);
|
|
305
307
|
enableSaveButton.call(this, didAdaptationsPriorityChange.call(this));
|
|
@@ -372,9 +374,9 @@ sap.ui.define([
|
|
|
372
374
|
parameters: {priorities: aAdaptationPriorities}
|
|
373
375
|
});
|
|
374
376
|
}.bind(this)).then(function() {
|
|
375
|
-
|
|
376
|
-
this.oAdaptationsModel.getProperty("/
|
|
377
|
-
this.oAdaptationsModel.getProperty("/
|
|
377
|
+
const oAllUpdatedAdaptations = _union(
|
|
378
|
+
this.oAdaptationsModel.getProperty("/adaptations"),
|
|
379
|
+
this.oAdaptationsModel.getProperty("/allAdaptations")
|
|
378
380
|
);
|
|
379
381
|
this.oAdaptationsModel.updateAdaptations(oAllUpdatedAdaptations);
|
|
380
382
|
onCloseDialog.call(this);
|
|
@@ -53,7 +53,7 @@ sap.ui.define([
|
|
|
53
53
|
* @class
|
|
54
54
|
*
|
|
55
55
|
* @author SAP SE
|
|
56
|
-
* @version 1.
|
|
56
|
+
* @version 1.130.0
|
|
57
57
|
*
|
|
58
58
|
* @constructor
|
|
59
59
|
* @private
|
|
@@ -176,12 +176,12 @@ sap.ui.define([
|
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
function getInitialTranslationModelData() {
|
|
179
|
-
return
|
|
179
|
+
return {
|
|
180
180
|
sourceLanguage: "",
|
|
181
181
|
sourceLanguages: [],
|
|
182
182
|
downloadChangedTexts: false,
|
|
183
183
|
file: undefined
|
|
184
|
-
}
|
|
184
|
+
};
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
Translation.prototype.openDownloadTranslationDialog = function(mPropertyBag) {
|
|
@@ -62,7 +62,7 @@ sap.ui.define([
|
|
|
62
62
|
* Constructor for a new sap.ui.rta.util.PluginManager
|
|
63
63
|
* @extends sap.ui.base.ManagedObject
|
|
64
64
|
* @author SAP SE
|
|
65
|
-
* @version 1.
|
|
65
|
+
* @version 1.130.0
|
|
66
66
|
* @constructor
|
|
67
67
|
* @private
|
|
68
68
|
* @since 1.86
|
|
@@ -211,7 +211,7 @@ sap.ui.define([
|
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
return
|
|
214
|
+
return { ...this._mDefaultPlugins };
|
|
215
215
|
};
|
|
216
216
|
|
|
217
217
|
/**
|