@openui5/sap.ui.rta 1.115.1 → 1.117.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +33 -2
- package/.reuse/dep5 +0 -5
- package/THIRDPARTY.txt +1 -7
- package/package.json +6 -6
- package/src/sap/ui/rta/.library +1 -1
- package/src/sap/ui/rta/Client.js +60 -59
- package/src/sap/ui/rta/RuntimeAuthoring.js +256 -254
- package/src/sap/ui/rta/Utils.js +42 -42
- package/src/sap/ui/rta/api/startAdaptation.js +2 -2
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +3 -3
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +27 -27
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +100 -103
- package/src/sap/ui/rta/appVariant/Feature.js +75 -77
- package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +6 -7
- package/src/sap/ui/rta/appVariant/Utils.js +17 -17
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +36 -36
- package/src/sap/ui/rta/command/AddIFrame.js +7 -7
- package/src/sap/ui/rta/command/AddProperty.js +7 -7
- package/src/sap/ui/rta/command/AddXML.js +1 -1
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +7 -7
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +18 -18
- package/src/sap/ui/rta/command/BaseCommand.js +1 -2
- package/src/sap/ui/rta/command/BindProperty.js +1 -1
- package/src/sap/ui/rta/command/Combine.js +1 -1
- package/src/sap/ui/rta/command/CommandFactory.js +11 -11
- package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +28 -3
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +26 -24
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +7 -7
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +11 -11
- package/src/sap/ui/rta/command/CreateContainer.js +2 -2
- package/src/sap/ui/rta/command/CustomAdd.js +1 -1
- package/src/sap/ui/rta/command/FlexCommand.js +30 -30
- package/src/sap/ui/rta/command/LREPSerializer.js +20 -10
- package/src/sap/ui/rta/command/LocalReset.js +1 -1
- package/src/sap/ui/rta/command/Move.js +1 -1
- package/src/sap/ui/rta/command/Property.js +1 -1
- package/src/sap/ui/rta/command/Remove.js +1 -1
- package/src/sap/ui/rta/command/Rename.js +1 -1
- package/src/sap/ui/rta/command/Resize.js +1 -1
- package/src/sap/ui/rta/command/Reveal.js +1 -1
- package/src/sap/ui/rta/command/Settings.js +1 -1
- package/src/sap/ui/rta/command/Split.js +1 -1
- package/src/sap/ui/rta/command/Stack.js +4 -4
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
- package/src/sap/ui/rta/enablement/TestDelegate.js +92 -92
- package/src/sap/ui/rta/enablement/elementActionTest.js +230 -112
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +11 -1
- package/src/sap/ui/rta/messagebundle_ar.properties +5 -0
- package/src/sap/ui/rta/messagebundle_bg.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ca.properties +5 -0
- package/src/sap/ui/rta/messagebundle_cs.properties +5 -0
- package/src/sap/ui/rta/messagebundle_cy.properties +5 -0
- package/src/sap/ui/rta/messagebundle_da.properties +5 -0
- package/src/sap/ui/rta/messagebundle_de.properties +6 -1
- package/src/sap/ui/rta/messagebundle_el.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en_GB.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +6 -1
- package/src/sap/ui/rta/messagebundle_es.properties +5 -0
- package/src/sap/ui/rta/messagebundle_es_MX.properties +5 -0
- package/src/sap/ui/rta/messagebundle_et.properties +5 -0
- package/src/sap/ui/rta/messagebundle_fi.properties +5 -0
- package/src/sap/ui/rta/messagebundle_fr.properties +5 -0
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +5 -0
- package/src/sap/ui/rta/messagebundle_hi.properties +5 -0
- package/src/sap/ui/rta/messagebundle_hr.properties +5 -0
- package/src/sap/ui/rta/messagebundle_hu.properties +5 -0
- package/src/sap/ui/rta/messagebundle_id.properties +5 -0
- package/src/sap/ui/rta/messagebundle_it.properties +5 -0
- package/src/sap/ui/rta/messagebundle_iw.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ja.properties +5 -0
- package/src/sap/ui/rta/messagebundle_kk.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ko.properties +5 -0
- package/src/sap/ui/rta/messagebundle_lt.properties +5 -0
- package/src/sap/ui/rta/messagebundle_lv.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ms.properties +5 -0
- package/src/sap/ui/rta/messagebundle_nl.properties +5 -0
- package/src/sap/ui/rta/messagebundle_no.properties +5 -0
- package/src/sap/ui/rta/messagebundle_pl.properties +5 -0
- package/src/sap/ui/rta/messagebundle_pt.properties +5 -0
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ro.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ru.properties +5 -0
- package/src/sap/ui/rta/messagebundle_sh.properties +5 -0
- package/src/sap/ui/rta/messagebundle_sk.properties +5 -0
- package/src/sap/ui/rta/messagebundle_sl.properties +5 -0
- package/src/sap/ui/rta/messagebundle_sv.properties +5 -0
- package/src/sap/ui/rta/messagebundle_th.properties +5 -0
- package/src/sap/ui/rta/messagebundle_tr.properties +5 -0
- package/src/sap/ui/rta/messagebundle_uk.properties +5 -0
- package/src/sap/ui/rta/messagebundle_vi.properties +5 -0
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +5 -0
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +5 -0
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +44 -44
- package/src/sap/ui/rta/plugin/BaseCreate.js +29 -29
- package/src/sap/ui/rta/plugin/Combine.js +9 -9
- package/src/sap/ui/rta/plugin/ControlVariant.js +21 -21
- package/src/sap/ui/rta/plugin/CreateContainer.js +6 -6
- package/src/sap/ui/rta/plugin/CutPaste.js +46 -46
- package/src/sap/ui/rta/plugin/DragDrop.js +2 -2
- package/src/sap/ui/rta/plugin/EasyAdd.js +4 -4
- package/src/sap/ui/rta/plugin/EasyRemove.js +5 -5
- package/src/sap/ui/rta/plugin/LocalReset.js +25 -25
- package/src/sap/ui/rta/plugin/Plugin.js +20 -20
- package/src/sap/ui/rta/plugin/RTAElementMover.js +42 -42
- package/src/sap/ui/rta/plugin/Remove.js +11 -11
- package/src/sap/ui/rta/plugin/Rename.js +7 -7
- package/src/sap/ui/rta/plugin/RenameHandler.js +17 -17
- package/src/sap/ui/rta/plugin/Resize.js +62 -62
- package/src/sap/ui/rta/plugin/Selection.js +14 -14
- package/src/sap/ui/rta/plugin/Settings.js +20 -20
- package/src/sap/ui/rta/plugin/Split.js +7 -7
- package/src/sap/ui/rta/plugin/Stretch.js +4 -4
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +94 -87
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +18 -18
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +98 -99
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +144 -144
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +3 -4
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +67 -67
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +38 -39
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +1 -0
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +29 -29
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +5 -5
- package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +1 -1
- package/src/sap/ui/rta/service/Action.js +36 -37
- package/src/sap/ui/rta/service/ControllerExtension.js +4 -4
- package/src/sap/ui/rta/service/Outline.js +59 -59
- package/src/sap/ui/rta/service/Property.js +125 -125
- package/src/sap/ui/rta/service/Receiver.js +78 -77
- package/src/sap/ui/rta/service/Selection.js +6 -6
- package/src/sap/ui/rta/service/SupportTools.js +188 -37
- package/src/sap/ui/rta/service/index.js +1 -1
- package/src/sap/ui/rta/themes/base/FlexSupportExtension.less +14 -0
- package/src/sap/ui/rta/themes/base/library.source.less +2 -1
- package/src/sap/ui/rta/toolbar/Adaptation.js +81 -26
- package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
- package/src/sap/ui/rta/toolbar/Base.js +17 -15
- package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -2
- package/src/sap/ui/rta/toolbar/Fiori.js +8 -8
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +4 -4
- package/src/sap/ui/rta/toolbar/Personalization.js +2 -2
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +13 -6
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +2 -8
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +2 -3
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptationDialog.fragment.xml +0 -2
- package/src/sap/ui/rta/toolbar/translation/Translation.js +41 -41
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +9 -9
- package/src/sap/ui/rta/util/Animation.js +5 -5
- package/src/sap/ui/rta/util/BindingsExtractor.js +33 -33
- package/src/sap/ui/rta/util/PluginManager.js +25 -25
- package/src/sap/ui/rta/util/PopupManager.js +27 -27
- package/src/sap/ui/rta/util/ReloadManager.js +1 -1
- package/src/sap/ui/rta/util/ServiceEventBus.js +3 -4
- package/src/sap/ui/rta/util/StylesLoader.js +9 -9
- package/src/sap/ui/rta/util/UrlParser.js +19 -19
- package/src/sap/ui/rta/util/adaptationStarter.js +34 -31
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +23 -19
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +61 -61
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +76 -63
- package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +6 -6
- package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
- package/src/sap/ui/rta/util/hasStableId.js +2 -2
- package/src/sap/ui/rta/util/showMessageBox.js +4 -5
- package/src/sap/ui/rta/util/validateFlexEnabled.js +5 -5
- package/src/sap/ui/rta/util/validateStableIds.js +8 -8
- package/ui5.yaml +1 -1
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/core/Core",
|
|
9
9
|
"sap/ui/core/Fragment",
|
|
10
|
+
"sap/base/util/isEmptyObject",
|
|
10
11
|
"sap/base/util/restricted/_difference",
|
|
11
12
|
"sap/base/util/deepEqual",
|
|
12
13
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
13
14
|
"sap/ui/core/Control",
|
|
14
15
|
"sap/ui/dt/OverlayRegistry",
|
|
15
|
-
"sap/ui/dt/OverlayUtil",
|
|
16
16
|
"sap/ui/dt/ElementUtil",
|
|
17
17
|
"sap/ui/fl/write/api/PersistenceWriteAPI",
|
|
18
18
|
"sap/ui/fl/Layer",
|
|
@@ -26,12 +26,12 @@ sap.ui.define([
|
|
|
26
26
|
], function(
|
|
27
27
|
Core,
|
|
28
28
|
Fragment,
|
|
29
|
+
isEmptyObject,
|
|
29
30
|
difference,
|
|
30
31
|
deepEqual,
|
|
31
32
|
JsControlTreeModifier,
|
|
32
33
|
Control,
|
|
33
34
|
OverlayRegistry,
|
|
34
|
-
OverlayUtil,
|
|
35
35
|
ElementUtil,
|
|
36
36
|
PersistenceWriteAPI,
|
|
37
37
|
Layer,
|
|
@@ -59,6 +59,21 @@ sap.ui.define([
|
|
|
59
59
|
return !oOverlay || !oOverlay.getDomRef() || !oOverlay.isVisible();
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
function _determineElementOverlay(oElementId, oAffectedElementId) {
|
|
63
|
+
var oOverlay = OverlayRegistry.getOverlay(oElementId);
|
|
64
|
+
if (!oOverlay) {
|
|
65
|
+
// When the element has no Overlay, check if there is a relevant container Overlay
|
|
66
|
+
// e.g. change on a SmartForm group (Element: parent Form; Relevant Container: SmartForm)
|
|
67
|
+
var oElementOverlay = OverlayRegistry.getOverlay(oAffectedElementId);
|
|
68
|
+
var oRelevantContainer = oElementOverlay && oElementOverlay.getRelevantContainer();
|
|
69
|
+
if (oRelevantContainer) {
|
|
70
|
+
oOverlay = OverlayRegistry.getOverlay(oRelevantContainer);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return oOverlay;
|
|
75
|
+
}
|
|
76
|
+
|
|
62
77
|
/**
|
|
63
78
|
* @class
|
|
64
79
|
* Root control for RTA change visualization.
|
|
@@ -67,7 +82,7 @@ sap.ui.define([
|
|
|
67
82
|
* @alias sap.ui.rta.util.changeVisualization.ChangeVisualization
|
|
68
83
|
* @author SAP SE
|
|
69
84
|
* @since 1.84.0
|
|
70
|
-
* @version 1.
|
|
85
|
+
* @version 1.117.0
|
|
71
86
|
* @private
|
|
72
87
|
*/
|
|
73
88
|
var ChangeVisualization = Control.extend("sap.ui.rta.util.changeVisualization.ChangeVisualization", {
|
|
@@ -163,12 +178,12 @@ sap.ui.define([
|
|
|
163
178
|
if (this.getProperty("rootControlId")) {
|
|
164
179
|
this._oChangeIndicatorRegistry.reset();
|
|
165
180
|
this._updateChangeRegistry()
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
181
|
+
.then(function() {
|
|
182
|
+
this._selectChangeCategory(this._sSelectedChangeCategory);
|
|
183
|
+
this._selectChangeState(ChangeStates.ALL);
|
|
184
|
+
this._updateVisualizationModelMenuData();
|
|
185
|
+
oToolbar.setModel(this._oChangeVisualizationModel, "visualizationModel");
|
|
186
|
+
}.bind(this));
|
|
172
187
|
}
|
|
173
188
|
};
|
|
174
189
|
|
|
@@ -176,7 +191,11 @@ sap.ui.define([
|
|
|
176
191
|
this._oChangeIndicatorRegistry.reset();
|
|
177
192
|
};
|
|
178
193
|
|
|
179
|
-
ChangeVisualization.prototype._determineChangeVisibility = function(
|
|
194
|
+
ChangeVisualization.prototype._determineChangeVisibility = function(
|
|
195
|
+
aRegisteredIndependentChanges,
|
|
196
|
+
aAllRelevantChanges,
|
|
197
|
+
sVisualizedChangeState
|
|
198
|
+
) {
|
|
180
199
|
function filterRelevantChanges(aChanges) {
|
|
181
200
|
return aChanges.filter(function(oChange) {
|
|
182
201
|
if (
|
|
@@ -201,7 +220,7 @@ sap.ui.define([
|
|
|
201
220
|
return oChange.id;
|
|
202
221
|
});
|
|
203
222
|
|
|
204
|
-
aRegisteredIndependentChanges.forEach(function
|
|
223
|
+
aRegisteredIndependentChanges.forEach(function(oChange) {
|
|
205
224
|
if (oChange.changeStates.includes(ChangeStates.DIRTY)) {
|
|
206
225
|
bHasDraftChanges = true;
|
|
207
226
|
bHasDirtyChanges = true;
|
|
@@ -209,7 +228,10 @@ sap.ui.define([
|
|
|
209
228
|
bHasDraftChanges = true;
|
|
210
229
|
}
|
|
211
230
|
|
|
212
|
-
var oOverlay =
|
|
231
|
+
var oOverlay = _determineElementOverlay(
|
|
232
|
+
oChange.visualizationInfo.displayElementIds[0],
|
|
233
|
+
oChange.visualizationInfo.affectedElementIds[0]
|
|
234
|
+
);
|
|
213
235
|
|
|
214
236
|
if (!aAllRelevantChangeIds.includes(oChange.change.getId())) {
|
|
215
237
|
aHiddenChanges.push(oChange);
|
|
@@ -266,7 +288,10 @@ sap.ui.define([
|
|
|
266
288
|
aCommandData.unshift({
|
|
267
289
|
key: ChangeCategories.ALL,
|
|
268
290
|
count: this._getChangesForChangeCategory(ChangeCategories.ALL, oSortedChanges.relevantVisualizedChanges).length,
|
|
269
|
-
title: this._getChangeCategoryLabel(ChangeCategories.ALL, this._getChangesForChangeCategory(
|
|
291
|
+
title: this._getChangeCategoryLabel(ChangeCategories.ALL, this._getChangesForChangeCategory(
|
|
292
|
+
ChangeCategories.ALL,
|
|
293
|
+
oSortedChanges.relevantVisualizedChanges
|
|
294
|
+
).length),
|
|
270
295
|
icon: ChangeCategories.getIconForCategory(ChangeCategories.ALL)
|
|
271
296
|
});
|
|
272
297
|
|
|
@@ -313,18 +338,18 @@ sap.ui.define([
|
|
|
313
338
|
id: this._getComponent().createId("changeVisualization_changesList"),
|
|
314
339
|
controller: this
|
|
315
340
|
})
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
341
|
+
.then(function(oPopover) {
|
|
342
|
+
this._oToolbarButton.addDependent(oPopover);
|
|
343
|
+
oPopover.setModel(this._oChangeVisualizationModel, "visualizationModel");
|
|
344
|
+
oPopover.openBy(this._oToolbarButton);
|
|
345
|
+
this.setPopover(oPopover);
|
|
346
|
+
// Currently required because of an binding issue from the control
|
|
347
|
+
// At the first opening of the popover the controls don't get updated when the bound
|
|
348
|
+
// model changes. With the reopening this Problem gets fixed
|
|
349
|
+
// TODO Remove once control owners have fixed the issue
|
|
350
|
+
oPopover.close();
|
|
351
|
+
oPopover.openBy(this._oToolbarButton);
|
|
352
|
+
}.bind(this));
|
|
328
353
|
return;
|
|
329
354
|
}
|
|
330
355
|
|
|
@@ -381,7 +406,7 @@ sap.ui.define([
|
|
|
381
406
|
return sCommand;
|
|
382
407
|
}
|
|
383
408
|
|
|
384
|
-
if (!oChange.getSelector || !oChange.getSelector()) {
|
|
409
|
+
if (!oChange.getSelector || !oChange.getSelector() || isEmptyObject(oChange.getSelector())) {
|
|
385
410
|
return false;
|
|
386
411
|
}
|
|
387
412
|
|
|
@@ -448,10 +473,10 @@ sap.ui.define([
|
|
|
448
473
|
}
|
|
449
474
|
var aRegisteredChangeIds = this._oChangeIndicatorRegistry.getRegisteredChangeIds();
|
|
450
475
|
var oCurrentChanges = aChanges
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
476
|
+
.reduce(function(oChanges, oChange) {
|
|
477
|
+
oChanges[oChange.getId()] = oChange;
|
|
478
|
+
return oChanges;
|
|
479
|
+
}, {});
|
|
455
480
|
var aCurrentChangeIds = Object.keys(oCurrentChanges);
|
|
456
481
|
|
|
457
482
|
// Remove registered changes which no longer exist
|
|
@@ -503,20 +528,8 @@ sap.ui.define([
|
|
|
503
528
|
Object.keys(oSelectors).forEach(function(sSelectorId) {
|
|
504
529
|
var aChangesOnIndicator = oSelectors[sSelectorId];
|
|
505
530
|
var aRelevantChanges = this._filterRelevantChanges(oSelectors[sSelectorId]);
|
|
506
|
-
var oOverlay =
|
|
507
|
-
|
|
508
|
-
// When the selector has no Overlay, check if there is a relevant container Overlay
|
|
509
|
-
// e.g. change on a SmartForm group (Selector: parent Form; Relevant Container: SmartForm)
|
|
510
|
-
aChangesOnIndicator.some(function(oChange) {
|
|
511
|
-
var oElementOverlay = OverlayRegistry.getOverlay(oChange.affectedElementId);
|
|
512
|
-
var oRelevantContainer = oElementOverlay && oElementOverlay.getRelevantContainer();
|
|
513
|
-
if (oRelevantContainer) {
|
|
514
|
-
oOverlay = OverlayRegistry.getOverlay(oRelevantContainer);
|
|
515
|
-
return true;
|
|
516
|
-
}
|
|
517
|
-
return false;
|
|
518
|
-
});
|
|
519
|
-
}
|
|
531
|
+
var oOverlay = _determineElementOverlay(sSelectorId, aChangesOnIndicator[0].affectedElementId);
|
|
532
|
+
|
|
520
533
|
if (_isOverlayInvisible(oOverlay)) {
|
|
521
534
|
// Change is not visible
|
|
522
535
|
return undefined;
|
|
@@ -647,15 +660,15 @@ sap.ui.define([
|
|
|
647
660
|
Core.applyChanges();
|
|
648
661
|
|
|
649
662
|
var aVisibleIndicators = this._oChangeIndicatorRegistry.getChangeIndicators()
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
663
|
+
.filter(function(oIndicator) {
|
|
664
|
+
return oIndicator.getVisible();
|
|
665
|
+
})
|
|
666
|
+
.sort(function(oIndicator1, oIndicator2) {
|
|
667
|
+
var iDeltaY = oIndicator1.getPosY() - oIndicator2.getPosY();
|
|
668
|
+
var iDeltaX = oIndicator1.getPosX() - oIndicator2.getPosX();
|
|
669
|
+
// Only consider x value if y is the same
|
|
670
|
+
return iDeltaY || iDeltaX;
|
|
671
|
+
});
|
|
659
672
|
|
|
660
673
|
if (aVisibleIndicators.length === 0) {
|
|
661
674
|
return;
|
|
@@ -678,7 +691,7 @@ sap.ui.define([
|
|
|
678
691
|
}
|
|
679
692
|
};
|
|
680
693
|
|
|
681
|
-
ChangeVisualization.prototype._toggleRootOverlayClickHandler = function
|
|
694
|
+
ChangeVisualization.prototype._toggleRootOverlayClickHandler = function(bEnable) {
|
|
682
695
|
var oRootOverlayDomRef = this.oRootOverlay && this.oRootOverlay.getDomRef();
|
|
683
696
|
if (oRootOverlayDomRef) {
|
|
684
697
|
if (bEnable) {
|
|
@@ -732,15 +745,15 @@ sap.ui.define([
|
|
|
732
745
|
this.setIsActive(true);
|
|
733
746
|
// show all change visualizations at startup
|
|
734
747
|
this._updateChangeRegistry()
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
748
|
+
.then(function() {
|
|
749
|
+
this._selectChangeCategory(this._sSelectedChangeCategory);
|
|
750
|
+
// This is required to avoid flickering of the toolbar when switching
|
|
751
|
+
// to visualization mode when the mode switcher is displayed as icons
|
|
752
|
+
oToolbar.adjustToolbarSectionWidths();
|
|
753
|
+
|
|
754
|
+
this._updateVisualizationModelMenuData();
|
|
755
|
+
oToolbar.setModel(this._oChangeVisualizationModel, "visualizationModel");
|
|
756
|
+
}.bind(this));
|
|
744
757
|
};
|
|
745
758
|
|
|
746
759
|
return ChangeVisualization;
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
* @param {sap.ui.core.Component} mPropertyBag.appComponent - Application component
|
|
33
33
|
* @returns {object} Map containing localized description text and tooltip
|
|
34
34
|
*/
|
|
35
|
-
CombineVisualization.getDescription = function
|
|
35
|
+
CombineVisualization.getDescription = function(mPayload, sLabel, mPropertyBag) {
|
|
36
36
|
var iOriginalSelectorCount = (mPayload.originalSelectors || []).length;
|
|
37
37
|
if (iOriginalSelectorCount < 2) {
|
|
38
38
|
// Fallback if no payload was provided
|
|
@@ -50,7 +50,7 @@ sap.ui.define([
|
|
|
50
50
|
|
|
51
51
|
var oAppComponent = mPropertyBag.appComponent;
|
|
52
52
|
var aOriginalSelectors = mPayload.originalSelectors;
|
|
53
|
-
var aLabels = aOriginalSelectors.map(function
|
|
53
|
+
var aLabels = aOriginalSelectors.map(function(oSelector) {
|
|
54
54
|
var sId = JsControlTreeModifier.getControlIdBySelector(oSelector, oAppComponent);
|
|
55
55
|
var oControl = Core.byId(sId);
|
|
56
56
|
return oControl ? ElementUtil.getLabelForElement(oControl) : sId;
|
|
@@ -76,10 +76,10 @@ sap.ui.define([
|
|
|
76
76
|
[aLabels.length]
|
|
77
77
|
),
|
|
78
78
|
descriptionTooltip: aLabels
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
.map(function(sLabel) {
|
|
80
|
+
return "\"" + sLabel + "\"";
|
|
81
|
+
})
|
|
82
|
+
.join(",\n")
|
|
83
83
|
};
|
|
84
84
|
};
|
|
85
85
|
|
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
* @param {string} sLabel - Current element label
|
|
25
25
|
* @returns {object} Map containing localized description text and tooltip
|
|
26
26
|
*/
|
|
27
|
-
CreateContainerVisualization.getDescription = function
|
|
27
|
+
CreateContainerVisualization.getDescription = function(mPayload, sLabel) {
|
|
28
28
|
var oRtaResourceBundle = Core.getLibraryResourceBundle("sap.ui.rta");
|
|
29
29
|
var sElementLabel = mPayload.originalLabel || sLabel;
|
|
30
30
|
var sShortenedElementLabel = ChangeVisualizationUtils.shortenString(sElementLabel);
|
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
* @param {string} sLabel - Current element label
|
|
24
24
|
* @returns {object} Localized description text and button text
|
|
25
25
|
*/
|
|
26
|
-
SplitVisualization.getDescription = function
|
|
26
|
+
SplitVisualization.getDescription = function(mPayload, sLabel) {
|
|
27
27
|
var oRtaResourceBundle = Core.getLibraryResourceBundle("sap.ui.rta");
|
|
28
28
|
var sDescriptionText = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_SPLIT", ChangeVisualizationUtils.shortenString(sLabel));
|
|
29
29
|
var sDescriptionTooltip = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_SPLIT", sLabel);
|
|
@@ -8,7 +8,7 @@ sap.ui.define([
|
|
|
8
8
|
"sap/ui/fl/Utils",
|
|
9
9
|
"sap/ui/dt/ElementUtil",
|
|
10
10
|
"sap/base/util/isPlainObject"
|
|
11
|
-
], function
|
|
11
|
+
], function(
|
|
12
12
|
FlUtils,
|
|
13
13
|
ElementUtil,
|
|
14
14
|
isPlainObject
|
|
@@ -52,7 +52,7 @@ sap.ui.define([
|
|
|
52
52
|
|
|
53
53
|
if (aStableElements.length > 0) {
|
|
54
54
|
if (isCloneFromAggregationBinding(oElementOverlay.getElement())) {
|
|
55
|
-
bUnstable = aStableElements.some(function
|
|
55
|
+
bUnstable = aStableElements.some(function(vStableElement) {
|
|
56
56
|
var vControl;
|
|
57
57
|
var oAppComponent;
|
|
58
58
|
var bUnstable = false;
|
|
@@ -9,7 +9,7 @@ sap.ui.define([
|
|
|
9
9
|
"sap/ui/layout/HorizontalLayout",
|
|
10
10
|
"sap/m/Link",
|
|
11
11
|
"sap/m/Text"
|
|
12
|
-
], function
|
|
12
|
+
], function(
|
|
13
13
|
MessageBox,
|
|
14
14
|
HorizontalLayout,
|
|
15
15
|
Link,
|
|
@@ -45,7 +45,7 @@ sap.ui.define([
|
|
|
45
45
|
function convertIntoControls(aSymbols) {
|
|
46
46
|
var oLayout = new HorizontalLayout({
|
|
47
47
|
allowWrapping: true,
|
|
48
|
-
content: aSymbols.map(function
|
|
48
|
+
content: aSymbols.map(function(sSymbol) {
|
|
49
49
|
if (isLink(sSymbol)) {
|
|
50
50
|
var mLink = extractLink(sSymbol);
|
|
51
51
|
return new Link({
|
|
@@ -72,7 +72,7 @@ sap.ui.define([
|
|
|
72
72
|
var aSymbols = [sMessage];
|
|
73
73
|
var aLinks = getLinks(sMessage);
|
|
74
74
|
|
|
75
|
-
aLinks.forEach(function
|
|
75
|
+
aLinks.forEach(function(sLink) {
|
|
76
76
|
var i = 0;
|
|
77
77
|
while (i < aSymbols.length) {
|
|
78
78
|
var sSymbol = aSymbols[i];
|
|
@@ -83,7 +83,7 @@ sap.ui.define([
|
|
|
83
83
|
var aParts = sSymbol.split(sLink);
|
|
84
84
|
var aInsert = [];
|
|
85
85
|
|
|
86
|
-
aParts.forEach(function
|
|
86
|
+
aParts.forEach(function(sPart, iIndex, aOriginal) { // eslint-disable-line no-loop-func
|
|
87
87
|
aInsert.push(sPart);
|
|
88
88
|
if (iIndex !== aOriginal.length - 1) {
|
|
89
89
|
aInsert.push(sLink);
|
|
@@ -99,7 +99,6 @@ sap.ui.define([
|
|
|
99
99
|
return aSymbols;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
|
|
103
102
|
/**
|
|
104
103
|
* Displays sap.m.MessageBox and interprets markdown links in the messages.
|
|
105
104
|
*
|
|
@@ -13,7 +13,7 @@ sap.ui.define([
|
|
|
13
13
|
"sap/base/Log",
|
|
14
14
|
"sap/ui/rta/Utils",
|
|
15
15
|
"sap/ui/dt/Util"
|
|
16
|
-
], function
|
|
16
|
+
], function(
|
|
17
17
|
FlUtils,
|
|
18
18
|
MessageBox,
|
|
19
19
|
ObjectPath,
|
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
DtUtil
|
|
25
25
|
) {
|
|
26
26
|
"use strict";
|
|
27
|
-
return function
|
|
27
|
+
return function(oRta) {
|
|
28
28
|
var mMessageBoxShow = {};
|
|
29
29
|
var aPendingOverlaysToValidate = [];
|
|
30
30
|
var oComponent = FlUtils.getAppComponentForControl(oRta.getRootControlInstance());
|
|
@@ -88,7 +88,7 @@ sap.ui.define([
|
|
|
88
88
|
var oElementOverlayCreated = oEvent.getParameters().elementOverlay;
|
|
89
89
|
if (oRta.getMode() === "adaptation") {
|
|
90
90
|
var oComponent = FlUtils.getAppComponentForControl(oRta.getRootControlInstance());
|
|
91
|
-
DtUtil.waitForSynced(oRta._oDesignTime, function
|
|
91
|
+
DtUtil.waitForSynced(oRta._oDesignTime, function(oOverlay) {
|
|
92
92
|
if (_isControlAvailable(oOverlay)) {
|
|
93
93
|
_handleUnstableIds(oRta, oComponent, [oOverlay]);
|
|
94
94
|
}
|
|
@@ -102,14 +102,14 @@ sap.ui.define([
|
|
|
102
102
|
var aUnstableOverlays = validateStableIds(aElementOverlays, oComponent);
|
|
103
103
|
|
|
104
104
|
if (aUnstableOverlays.length) {
|
|
105
|
-
aUnstableOverlays.forEach(function
|
|
105
|
+
aUnstableOverlays.forEach(function(oElementOverlay) {
|
|
106
106
|
Log.error("Control ID was generated dynamically by SAPUI5. To support SAPUI5 flexibility, a stable control ID is needed to assign the changes to.", oElementOverlay.getElement().getId());
|
|
107
107
|
});
|
|
108
108
|
_displayMessage(oRta, oComponent, "MSG_UNSTABLE_ID_FOUND", "ERROR", "HEADER_ERROR");
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
oRta.attachEventOnce("stop", function
|
|
112
|
+
oRta.attachEventOnce("stop", function() {
|
|
113
113
|
_setMessageBoxShow(oComponent.getId(), false);
|
|
114
114
|
});
|
|
115
115
|
|
|
@@ -11,7 +11,7 @@ sap.ui.define([
|
|
|
11
11
|
"sap/ui/core/Fragment",
|
|
12
12
|
"sap/ui/dt/OverlayUtil",
|
|
13
13
|
"sap/base/util/isPlainObject"
|
|
14
|
-
], function
|
|
14
|
+
], function(
|
|
15
15
|
ObjectPath,
|
|
16
16
|
hasStableId,
|
|
17
17
|
View,
|
|
@@ -38,11 +38,11 @@ sap.ui.define([
|
|
|
38
38
|
var aViewExtensions = [];
|
|
39
39
|
|
|
40
40
|
if (isPlainObject(mViewExtensions)) {
|
|
41
|
-
Object.keys(mViewExtensions).forEach(function
|
|
41
|
+
Object.keys(mViewExtensions).forEach(function(sViewExtensionGroupName) {
|
|
42
42
|
if (sViewExtensionGroupName.startsWith("sap.suite.ui.generic.template")) {
|
|
43
43
|
var mViewExtensionGroup = mViewExtensions[sViewExtensionGroupName];
|
|
44
44
|
|
|
45
|
-
Object.keys(mViewExtensionGroup).forEach(function
|
|
45
|
+
Object.keys(mViewExtensionGroup).forEach(function(sViewExtensionName) {
|
|
46
46
|
aViewExtensions.push(mViewExtensionGroup[sViewExtensionName]);
|
|
47
47
|
});
|
|
48
48
|
}
|
|
@@ -58,7 +58,7 @@ sap.ui.define([
|
|
|
58
58
|
for (var i = 0, l = aElementOverlays.length; i < l; i++) {
|
|
59
59
|
var oElementOverlay = aElementOverlays[i];
|
|
60
60
|
var oElement = oElementOverlay.getElement();
|
|
61
|
-
var bIsExtensionOverlay = aExtensionList.some(function
|
|
61
|
+
var bIsExtensionOverlay = aExtensionList.some(function(mViewExtension) { // eslint-disable-line no-loop-func
|
|
62
62
|
var ClassDeclaration = ObjectPath.get(mViewExtension.className);
|
|
63
63
|
var sExtensionName;
|
|
64
64
|
var sElementName;
|
|
@@ -91,8 +91,8 @@ sap.ui.define([
|
|
|
91
91
|
|
|
92
92
|
var aRelevantOverlays = [];
|
|
93
93
|
|
|
94
|
-
aExtensionOverlays.forEach(function
|
|
95
|
-
OverlayUtil.iterateOverlayElementTree(oElementOverlay, function
|
|
94
|
+
aExtensionOverlays.forEach(function(oElementOverlay) {
|
|
95
|
+
OverlayUtil.iterateOverlayElementTree(oElementOverlay, function(oElementOverlay) {
|
|
96
96
|
aRelevantOverlays.push(oElementOverlay);
|
|
97
97
|
});
|
|
98
98
|
});
|
|
@@ -100,7 +100,7 @@ sap.ui.define([
|
|
|
100
100
|
return aRelevantOverlays;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
return function
|
|
103
|
+
return function(aElementOverlays, oComponent) {
|
|
104
104
|
var aResult = [];
|
|
105
105
|
|
|
106
106
|
var aRelevantOverlays = aElementOverlays.slice(0);
|
|
@@ -115,7 +115,7 @@ sap.ui.define([
|
|
|
115
115
|
);
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
aResult = aRelevantOverlays.filter(function
|
|
118
|
+
aResult = aRelevantOverlays.filter(function(oElementOverlay) {
|
|
119
119
|
return (
|
|
120
120
|
!oElementOverlay.getDesignTimeMetadata().markedAsNotAdaptable()
|
|
121
121
|
&& !hasStableId(oElementOverlay)
|
package/ui5.yaml
CHANGED