@openui5/sap.ui.rta 1.106.0 → 1.107.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/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 +641 -654
- 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 +2 -0
- 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 +6 -5
- package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
- 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 +2 -2
- package/src/sap/ui/rta/command/LREPSerializer.js +3 -2
- 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 +12 -3
- 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 +4 -4
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle_ar.properties +4 -1
- package/src/sap/ui/rta/messagebundle_bg.properties +4 -1
- package/src/sap/ui/rta/messagebundle_ca.properties +4 -1
- package/src/sap/ui/rta/messagebundle_cs.properties +4 -1
- package/src/sap/ui/rta/messagebundle_cy.properties +4 -1
- package/src/sap/ui/rta/messagebundle_da.properties +4 -1
- package/src/sap/ui/rta/messagebundle_de.properties +16 -13
- package/src/sap/ui/rta/messagebundle_el.properties +4 -1
- package/src/sap/ui/rta/messagebundle_en.properties +4 -1
- package/src/sap/ui/rta/messagebundle_en_GB.properties +4 -1
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +3 -0
- package/src/sap/ui/rta/messagebundle_es.properties +4 -1
- package/src/sap/ui/rta/messagebundle_es_MX.properties +4 -1
- package/src/sap/ui/rta/messagebundle_et.properties +4 -1
- package/src/sap/ui/rta/messagebundle_fi.properties +4 -1
- package/src/sap/ui/rta/messagebundle_fr.properties +4 -1
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +4 -1
- package/src/sap/ui/rta/messagebundle_hi.properties +4 -1
- package/src/sap/ui/rta/messagebundle_hr.properties +4 -1
- package/src/sap/ui/rta/messagebundle_hu.properties +4 -1
- package/src/sap/ui/rta/messagebundle_id.properties +4 -1
- package/src/sap/ui/rta/messagebundle_it.properties +4 -1
- package/src/sap/ui/rta/messagebundle_iw.properties +4 -1
- package/src/sap/ui/rta/messagebundle_ja.properties +4 -1
- package/src/sap/ui/rta/messagebundle_kk.properties +4 -1
- package/src/sap/ui/rta/messagebundle_ko.properties +4 -1
- package/src/sap/ui/rta/messagebundle_lt.properties +4 -1
- package/src/sap/ui/rta/messagebundle_lv.properties +4 -1
- package/src/sap/ui/rta/messagebundle_ms.properties +4 -1
- package/src/sap/ui/rta/messagebundle_nl.properties +4 -1
- package/src/sap/ui/rta/messagebundle_no.properties +4 -1
- package/src/sap/ui/rta/messagebundle_pl.properties +4 -1
- package/src/sap/ui/rta/messagebundle_pt.properties +4 -1
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +4 -1
- package/src/sap/ui/rta/messagebundle_ro.properties +4 -1
- package/src/sap/ui/rta/messagebundle_ru.properties +4 -1
- package/src/sap/ui/rta/messagebundle_sh.properties +4 -1
- package/src/sap/ui/rta/messagebundle_sk.properties +4 -1
- package/src/sap/ui/rta/messagebundle_sl.properties +4 -1
- package/src/sap/ui/rta/messagebundle_sv.properties +4 -1
- package/src/sap/ui/rta/messagebundle_th.properties +4 -1
- package/src/sap/ui/rta/messagebundle_tr.properties +4 -1
- package/src/sap/ui/rta/messagebundle_uk.properties +4 -1
- package/src/sap/ui/rta/messagebundle_vi.properties +4 -1
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +4 -1
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +4 -1
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +6 -4
- 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 +6 -4
- 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 +1 -1
- package/src/sap/ui/rta/toolbar/Adaptation.js +2 -1
- package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +3 -1
- package/src/sap/ui/rta/toolbar/Base.js +1 -1
- package/src/sap/ui/rta/toolbar/BaseRenderer.js +6 -4
- package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
- package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsContextBasedAdaptation.js +27 -34
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsContextBasedAdaptationDialog.fragment.xml +1 -1
- 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/BindingsExtractor.js +12 -3
- 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/StylesLoader.js +3 -3
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +9 -9
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +24 -17
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +6 -3
- package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +13 -12
- package/src/sap/ui/rta/util/changeVisualization/commands/RenameVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
|
@@ -148,13 +148,21 @@ function(
|
|
|
148
148
|
function getBindingsForAggregation(oElement, oModel, bTemplate, sAggregationName, oRelevantContainerElement) {
|
|
149
149
|
var aBindings = [];
|
|
150
150
|
var aElements = [];
|
|
151
|
+
var oTemplate;
|
|
151
152
|
var bIsInTemplate = bTemplate;
|
|
153
|
+
var oElementModel = oElement.getModel();
|
|
152
154
|
|
|
153
155
|
var oBinding = oElement.getBindingInfo(sAggregationName);
|
|
154
|
-
|
|
156
|
+
oTemplate = oBinding && oBinding.template;
|
|
155
157
|
|
|
156
|
-
// If a template is
|
|
157
|
-
//
|
|
158
|
+
// If a template is found for a different model, we don't look inside the template
|
|
159
|
+
// e.g. a Select control whose entries are defined in an own JSON model
|
|
160
|
+
if (oTemplate && oElementModel && oElementModel !== oModel) {
|
|
161
|
+
return [];
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// If a template is bound to the current element on the given model,
|
|
165
|
+
// we continue the evaluation on the template (as it has no direct parent)
|
|
158
166
|
if (oTemplate) {
|
|
159
167
|
bIsInTemplate = true;
|
|
160
168
|
aElements = [oTemplate];
|
|
@@ -289,6 +297,7 @@ function(
|
|
|
289
297
|
.filter(function (sPropertyName) {
|
|
290
298
|
var mBindingInfo = oTemplate.mBindingInfos[sPropertyName];
|
|
291
299
|
var sModelName = mBindingInfo && mBindingInfo.parts[0] && mBindingInfo.parts[0].model;
|
|
300
|
+
bIsSameModel = oModel === oTemplateParent.getModel(sModelName);
|
|
292
301
|
if (!sModelName) {
|
|
293
302
|
var oParentDefaultModel = oTemplateParent.getDefaultModel ? oTemplateParent.getDefaultModel() : null;
|
|
294
303
|
var oTemplateDefaultModel = oTemplate.getDefaultModel ? oTemplate.getDefaultModel() : null;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/ui/thirdparty/jquery"
|
|
9
|
-
], function(jQuery) {
|
|
8
|
+
"sap/ui/thirdparty/jquery", "sap/ui/core/Configuration"
|
|
9
|
+
], function(jQuery, Configuration) {
|
|
10
10
|
"use strict";
|
|
11
11
|
|
|
12
12
|
var module = {};
|
|
@@ -20,7 +20,7 @@ sap.ui.define([
|
|
|
20
20
|
return jQuery.get(sap.ui.require.toUrl(('sap.ui.rta.assets.' + sFileName).replace(/\./g, "/")) + '.css')
|
|
21
21
|
.then(function (sData) {
|
|
22
22
|
// TODO: check if it's possible to use UI5 standard mechanism for styles adjustments
|
|
23
|
-
if (
|
|
23
|
+
if (Configuration.getRTL()) {
|
|
24
24
|
return sData.replace(/right/g, 'left');
|
|
25
25
|
}
|
|
26
26
|
return sData;
|
|
@@ -40,7 +40,7 @@ sap.ui.define([
|
|
|
40
40
|
* @alias sap.ui.rta.util.changeVisualization.ChangeIndicator
|
|
41
41
|
* @author SAP SE
|
|
42
42
|
* @since 1.84.0
|
|
43
|
-
* @version 1.
|
|
43
|
+
* @version 1.107.0
|
|
44
44
|
* @private
|
|
45
45
|
*/
|
|
46
46
|
var ChangeIndicator = Control.extend("sap.ui.rta.util.changeVisualization.ChangeIndicator", {
|
|
@@ -162,29 +162,29 @@ sap.ui.define([
|
|
|
162
162
|
|
|
163
163
|
function getTexts(mChangeInformation, oRtaResourceBundle, sOverlayId) {
|
|
164
164
|
var oAffectedElement = Core.byId(mChangeInformation.affectedElementId);
|
|
165
|
-
var
|
|
166
|
-
var vOriginalValue = mChangeInformation.
|
|
165
|
+
var mDescriptionPayload = Object.keys(mChangeInformation.descriptionPayload || {}).reduce(function(mDescriptionPayload, sKey) {
|
|
166
|
+
var vOriginalValue = mChangeInformation.descriptionPayload[sKey];
|
|
167
167
|
var bIsBinding = FlUtils.isBinding(vOriginalValue);
|
|
168
168
|
var vValue = bIsBinding
|
|
169
169
|
? resolveBinding(vOriginalValue, oAffectedElement)
|
|
170
170
|
: vOriginalValue;
|
|
171
|
-
|
|
172
|
-
return
|
|
171
|
+
mDescriptionPayload[sKey] = vValue;
|
|
172
|
+
return mDescriptionPayload;
|
|
173
173
|
}, {});
|
|
174
174
|
|
|
175
175
|
var mPropertyBag = { appComponent: FlUtils.getAppComponentForControl(oAffectedElement) };
|
|
176
176
|
var oOverlay = Core.byId(sOverlayId);
|
|
177
177
|
var sElementLabel = oOverlay.getDesignTimeMetadata().getLabel(oAffectedElement);
|
|
178
178
|
var oCommandVisualization = getCommandVisualization(mChangeInformation);
|
|
179
|
-
var oDescription = oCommandVisualization && oCommandVisualization.getDescription(
|
|
179
|
+
var oDescription = oCommandVisualization && oCommandVisualization.getDescription(mDescriptionPayload, sElementLabel, mPropertyBag) || {};
|
|
180
180
|
var sCommandName = mChangeInformation.commandName;
|
|
181
181
|
var sDescriptionText;
|
|
182
182
|
var sDescriptionTooltip;
|
|
183
183
|
|
|
184
184
|
// 'Settings' with a custom description should overwrite the description from the CommandVisualization
|
|
185
|
-
if (sCommandName === "settings" &&
|
|
186
|
-
oDescription.descriptionText =
|
|
187
|
-
oDescription.descriptionTooltip =
|
|
185
|
+
if (sCommandName === "settings" && mDescriptionPayload.description) {
|
|
186
|
+
oDescription.descriptionText = mDescriptionPayload.description;
|
|
187
|
+
oDescription.descriptionTooltip = mDescriptionPayload.descriptionTooltip;
|
|
188
188
|
} else if (mChangeInformation.changeCategory === "other") {
|
|
189
189
|
// To retrieve the generic description for commands without visualization
|
|
190
190
|
sCommandName = "other";
|
|
@@ -14,8 +14,7 @@ sap.ui.define([
|
|
|
14
14
|
"sap/ui/dt/ElementUtil",
|
|
15
15
|
"sap/ui/fl/write/api/ChangesWriteAPI",
|
|
16
16
|
"sap/ui/fl/Utils",
|
|
17
|
-
"sap/ui/fl/changeHandler/common/ChangeCategories"
|
|
18
|
-
"sap/ui/core/Core"
|
|
17
|
+
"sap/ui/fl/changeHandler/common/ChangeCategories"
|
|
19
18
|
], function(
|
|
20
19
|
includes,
|
|
21
20
|
values,
|
|
@@ -26,8 +25,7 @@ sap.ui.define([
|
|
|
26
25
|
ElementUtil,
|
|
27
26
|
ChangesWriteAPI,
|
|
28
27
|
FlUtils,
|
|
29
|
-
ChangeCategories
|
|
30
|
-
Core
|
|
28
|
+
ChangeCategories
|
|
31
29
|
) {
|
|
32
30
|
"use strict";
|
|
33
31
|
|
|
@@ -39,7 +37,7 @@ sap.ui.define([
|
|
|
39
37
|
* @alias sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry
|
|
40
38
|
* @author SAP SE
|
|
41
39
|
* @since 1.86.0
|
|
42
|
-
* @version 1.
|
|
40
|
+
* @version 1.107.0
|
|
43
41
|
* @private
|
|
44
42
|
*/
|
|
45
43
|
var ChangeIndicatorRegistry = ManagedObject.extend("sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry", {
|
|
@@ -123,7 +121,7 @@ sap.ui.define([
|
|
|
123
121
|
id: oChangeIndicatorData.change.getId(),
|
|
124
122
|
dependent: bDependent,
|
|
125
123
|
affectedElementId: sAffectedElementId,
|
|
126
|
-
|
|
124
|
+
descriptionPayload: oChangeIndicatorData.visualizationInfo.descriptionPayload || {}
|
|
127
125
|
},
|
|
128
126
|
_omit(oChangeIndicatorData, ["visualizationInfo"])
|
|
129
127
|
));
|
|
@@ -133,16 +131,13 @@ sap.ui.define([
|
|
|
133
131
|
.forEach(function (oChangeIndicatorData) {
|
|
134
132
|
oChangeIndicatorData.visualizationInfo.displayElementIds
|
|
135
133
|
.forEach(function (sId, iIndex) {
|
|
136
|
-
// in some cases (like with simple forms) you have to pass the stable id of the child element because the parent id is unstable
|
|
137
|
-
if (oChangeIndicatorData.visualizationInfo.hasParentWithUnstableId) {
|
|
138
|
-
sId = Core.byId(sId).getParent().getId();
|
|
139
|
-
}
|
|
140
134
|
addSelector(sId, oChangeIndicatorData.visualizationInfo.affectedElementIds[iIndex], oChangeIndicatorData, false);
|
|
141
135
|
});
|
|
142
136
|
|
|
143
|
-
oChangeIndicatorData.visualizationInfo.dependentElementIds
|
|
144
|
-
|
|
145
|
-
|
|
137
|
+
oChangeIndicatorData.visualizationInfo.dependentElementIds
|
|
138
|
+
.forEach(function (sId) {
|
|
139
|
+
addSelector(sId, sId, oChangeIndicatorData, true);
|
|
140
|
+
});
|
|
146
141
|
});
|
|
147
142
|
|
|
148
143
|
return oChangeIndicators;
|
|
@@ -180,8 +175,8 @@ sap.ui.define([
|
|
|
180
175
|
var aCategories = this.getChangeCategories();
|
|
181
176
|
var sChangeCategory;
|
|
182
177
|
// For "settings", the control developer can choose one of the existing categories
|
|
183
|
-
if (sCommandName === "settings" && includes(Object.keys(aCategories), mChangeVisualizationInfo.
|
|
184
|
-
sChangeCategory = mChangeVisualizationInfo.
|
|
178
|
+
if (sCommandName === "settings" && includes(Object.keys(aCategories), mChangeVisualizationInfo.descriptionPayload.category)) {
|
|
179
|
+
sChangeCategory = mChangeVisualizationInfo.descriptionPayload.category;
|
|
185
180
|
} else {
|
|
186
181
|
sChangeCategory = Object.keys(aCategories).find(function (sChangeCategoryName) {
|
|
187
182
|
return includes(aCategories[sChangeCategoryName], sCommandName);
|
|
@@ -224,8 +219,8 @@ sap.ui.define([
|
|
|
224
219
|
affectedElementIds: aAffectedElementIds,
|
|
225
220
|
dependentElementIds: getSelectorIds(mVisualizationInfo.dependentControls) || [],
|
|
226
221
|
displayElementIds: getSelectorIds(mVisualizationInfo.displayControls) || aAffectedElementIds,
|
|
227
|
-
|
|
228
|
-
|
|
222
|
+
updateRequired: mVisualizationInfo.updateRequired,
|
|
223
|
+
descriptionPayload: mVisualizationInfo.descriptionPayload || {}
|
|
229
224
|
};
|
|
230
225
|
});
|
|
231
226
|
}
|
|
@@ -287,5 +282,17 @@ sap.ui.define([
|
|
|
287
282
|
delete this._oRegisteredChanges[sChangeId];
|
|
288
283
|
};
|
|
289
284
|
|
|
285
|
+
/**
|
|
286
|
+
* Removes changes with the updateRequired flag from the registry so the change can be re-registered and
|
|
287
|
+
* the visualizationInfo is updated => if an element has an unstable id this updates the id information in the registry (e.g simple forms)
|
|
288
|
+
*/
|
|
289
|
+
ChangeIndicatorRegistry.prototype.removeOutdatedRegisteredChanges = function () {
|
|
290
|
+
this.getAllRegisteredChanges().forEach(function(oChange) {
|
|
291
|
+
if (oChange.visualizationInfo && oChange.visualizationInfo.updateRequired) {
|
|
292
|
+
this.removeRegisteredChange(oChange.change.getId());
|
|
293
|
+
}
|
|
294
|
+
}.bind(this));
|
|
295
|
+
};
|
|
296
|
+
|
|
290
297
|
return ChangeIndicatorRegistry;
|
|
291
298
|
});
|
|
@@ -57,7 +57,7 @@ sap.ui.define([
|
|
|
57
57
|
* @alias sap.ui.rta.util.changeVisualization.ChangeVisualization
|
|
58
58
|
* @author SAP SE
|
|
59
59
|
* @since 1.84.0
|
|
60
|
-
* @version 1.
|
|
60
|
+
* @version 1.107.0
|
|
61
61
|
* @private
|
|
62
62
|
*/
|
|
63
63
|
var ChangeVisualization = Control.extend("sap.ui.rta.util.changeVisualization.ChangeVisualization", {
|
|
@@ -315,6 +315,7 @@ sap.ui.define([
|
|
|
315
315
|
|
|
316
316
|
ChangeVisualization.prototype._updateChangeRegistry = function() {
|
|
317
317
|
return this._collectChanges().then(function(aChanges) {
|
|
318
|
+
this._oChangeIndicatorRegistry.removeOutdatedRegisteredChanges();
|
|
318
319
|
var aRegisteredChangeIds = this._oChangeIndicatorRegistry.getRegisteredChangeIds();
|
|
319
320
|
var oCurrentChanges = aChanges
|
|
320
321
|
.filter(function(oChange) {
|
|
@@ -330,7 +331,7 @@ sap.ui.define([
|
|
|
330
331
|
|
|
331
332
|
// Remove registered changes which no longer exist
|
|
332
333
|
difference(aRegisteredChangeIds, aCurrentChangeIds).forEach(function(sChangeIdToRemove) {
|
|
333
|
-
this._oChangeIndicatorRegistry.
|
|
334
|
+
this._oChangeIndicatorRegistry.removeRegisteredChange(sChangeIdToRemove);
|
|
334
335
|
}.bind(this));
|
|
335
336
|
|
|
336
337
|
var aPromises = [];
|
|
@@ -353,7 +354,9 @@ sap.ui.define([
|
|
|
353
354
|
var aDependentElements = this._oChangeIndicatorRegistry.getRegisteredChange(sChangeId).visualizationInfo.dependentElementIds;
|
|
354
355
|
aDependentElements.forEach(function(sElementId) {
|
|
355
356
|
var oOverlayDomRef = OverlayRegistry.getOverlay(sElementId).getDomRef();
|
|
356
|
-
oOverlayDomRef.
|
|
357
|
+
oOverlayDomRef.scrollIntoView({
|
|
358
|
+
block: "nearest"
|
|
359
|
+
});
|
|
357
360
|
oOverlayDomRef.classList.add("sapUiRtaChangeIndicatorDependent");
|
|
358
361
|
oOverlayDomRef.addEventListener("animationend", function() {
|
|
359
362
|
oOverlayDomRef.classList.remove("sapUiRtaChangeIndicatorDependent");
|
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
* Creates a localized description for combine changes based on the provided
|
|
26
26
|
* payload containing the combined elements.
|
|
27
27
|
*
|
|
28
|
-
* @param {object} mPayload - Change visualization payload from the change handler
|
|
28
|
+
* @param {object} mPayload - Change visualization description payload from the change handler
|
|
29
29
|
* @param {array.<string>} mPayload.originalSelectors - Selectors of the elements that were combined
|
|
30
30
|
* @param {string} sLabel - Current element label
|
|
31
31
|
* @param {object} mPropertyBag - Additional properties
|
|
@@ -19,9 +19,9 @@ sap.ui.define([
|
|
|
19
19
|
* Creates a localized description and button text for move changes based on the provided
|
|
20
20
|
* current element label.
|
|
21
21
|
*
|
|
22
|
-
* @param {object} mPayload - Change visualization payload from the change handler
|
|
23
|
-
* @param {string} mPayload.
|
|
24
|
-
* @param {string} mPayload.
|
|
22
|
+
* @param {object} mPayload - Change visualization description payload from the change handler
|
|
23
|
+
* @param {string} mPayload.sourceContainer - container from where the element was moved
|
|
24
|
+
* @param {string} mPayload.targetContainer - container to where the element was moved
|
|
25
25
|
* @param {string} sLabel - Change handler label
|
|
26
26
|
* @param {object} mPropertyBag - Additional properties
|
|
27
27
|
* @returns {object} Localized description text and button text
|
|
@@ -32,19 +32,20 @@ sap.ui.define([
|
|
|
32
32
|
var sDescriptionTooltip = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_MOVE_WITHIN", sLabel);
|
|
33
33
|
var sButtonText;
|
|
34
34
|
var oAppComponent = mPropertyBag.appComponent;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
|
|
36
|
+
var sSourceId = (
|
|
37
|
+
mPayload.sourceContainer
|
|
38
|
+
&& JsControlTreeModifier.getControlIdBySelector(mPayload.sourceContainer, oAppComponent)
|
|
38
39
|
);
|
|
39
|
-
var
|
|
40
|
-
mPayload.
|
|
41
|
-
&& JsControlTreeModifier.getControlIdBySelector(mPayload.
|
|
40
|
+
var sTargetId = (
|
|
41
|
+
mPayload.targetContainer
|
|
42
|
+
&& JsControlTreeModifier.getControlIdBySelector(mPayload.targetContainer, oAppComponent)
|
|
42
43
|
);
|
|
43
44
|
|
|
44
|
-
if (
|
|
45
|
+
if (sSourceId !== sTargetId) {
|
|
45
46
|
sDescriptionText = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_MOVE", ChangeVisualizationUtils.shortenString(sLabel));
|
|
46
|
-
sDescriptionTooltip = (
|
|
47
|
-
sButtonText =
|
|
47
|
+
sDescriptionTooltip = (sSourceId && oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_MOVE", sLabel)) || "";
|
|
48
|
+
sButtonText = sSourceId && oRtaResourceBundle.getText("BTN_CHANGEVISUALIZATION_SHOW_DEPENDENT_CONTAINER_MOVE");
|
|
48
49
|
}
|
|
49
50
|
return { descriptionText: sDescriptionText, descriptionTooltip: sDescriptionTooltip, buttonText: sButtonText };
|
|
50
51
|
};
|
|
@@ -17,7 +17,7 @@ sap.ui.define([
|
|
|
17
17
|
* Creates a localized description for rename changes based on the provided
|
|
18
18
|
* change handler payload or the current element label.
|
|
19
19
|
*
|
|
20
|
-
* @param {object} mPayload - Change visualization payload from the change handler
|
|
20
|
+
* @param {object} mPayload - Change visualization description payload from the change handler
|
|
21
21
|
* @param {string} [mPayload.originalLabel] - Label before the change was applied
|
|
22
22
|
* @param {object} [mPayload.newLabel] - Label after the change was applied
|
|
23
23
|
* @param {string} sFallbackLabel - New label as a fallback if change handler provides no info
|
|
@@ -19,7 +19,7 @@ sap.ui.define([
|
|
|
19
19
|
* Creates a localized description and button text for split changes based on the provided
|
|
20
20
|
* current element label
|
|
21
21
|
*
|
|
22
|
-
* @param {object} mPayload - Change visualization payload from the change handler
|
|
22
|
+
* @param {object} mPayload - Change visualization description payload from the change handler
|
|
23
23
|
* @param {string} sLabel - Current element label
|
|
24
24
|
* @returns {object} Localized description text and button text
|
|
25
25
|
*/
|