@openui5/sap.ui.rta 1.94.0 → 1.97.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.reuse/dep5 +12 -12
- package/THIRDPARTY.txt +21 -17
- 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 +108 -73
- package/src/sap/ui/rta/Utils.js +73 -1
- package/src/sap/ui/rta/api/startAdaptation.js +1 -2
- package/src/sap/ui/rta/api/startKeyUserAdaptation.js +2 -2
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +8 -5
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +27 -22
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +108 -85
- package/src/sap/ui/rta/appVariant/Feature.js +5 -12
- package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +2 -1
- package/src/sap/ui/rta/appVariant/Utils.js +10 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +35 -20
- 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 +4 -3
- 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 +4 -4
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +7 -4
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +7 -7
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -6
- 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 +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/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/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 +14 -12
- package/src/sap/ui/rta/messagebundle_ar.properties +11 -10
- package/src/sap/ui/rta/messagebundle_bg.properties +11 -10
- package/src/sap/ui/rta/messagebundle_ca.properties +10 -9
- package/src/sap/ui/rta/messagebundle_cs.properties +11 -10
- package/src/sap/ui/rta/messagebundle_cy.properties +11 -10
- package/src/sap/ui/rta/messagebundle_da.properties +11 -10
- package/src/sap/ui/rta/messagebundle_de.properties +14 -13
- package/src/sap/ui/rta/messagebundle_el.properties +11 -10
- package/src/sap/ui/rta/messagebundle_en.properties +11 -10
- package/src/sap/ui/rta/messagebundle_en_GB.properties +11 -10
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +11 -10
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +11 -10
- package/src/sap/ui/rta/messagebundle_es.properties +11 -10
- package/src/sap/ui/rta/messagebundle_es_MX.properties +11 -10
- package/src/sap/ui/rta/messagebundle_et.properties +11 -10
- package/src/sap/ui/rta/messagebundle_fi.properties +10 -9
- package/src/sap/ui/rta/messagebundle_fr.properties +11 -10
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +11 -10
- package/src/sap/ui/rta/messagebundle_hi.properties +11 -10
- package/src/sap/ui/rta/messagebundle_hr.properties +11 -10
- package/src/sap/ui/rta/messagebundle_hu.properties +10 -9
- package/src/sap/ui/rta/messagebundle_id.properties +11 -10
- package/src/sap/ui/rta/messagebundle_it.properties +11 -10
- package/src/sap/ui/rta/messagebundle_iw.properties +11 -10
- package/src/sap/ui/rta/messagebundle_ja.properties +11 -10
- package/src/sap/ui/rta/messagebundle_kk.properties +11 -10
- package/src/sap/ui/rta/messagebundle_ko.properties +11 -10
- package/src/sap/ui/rta/messagebundle_lt.properties +11 -10
- package/src/sap/ui/rta/messagebundle_lv.properties +11 -10
- package/src/sap/ui/rta/messagebundle_ms.properties +11 -10
- package/src/sap/ui/rta/messagebundle_nl.properties +11 -10
- package/src/sap/ui/rta/messagebundle_no.properties +11 -10
- package/src/sap/ui/rta/messagebundle_pl.properties +11 -10
- package/src/sap/ui/rta/messagebundle_pt.properties +10 -9
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +10 -9
- package/src/sap/ui/rta/messagebundle_ro.properties +11 -10
- package/src/sap/ui/rta/messagebundle_ru.properties +10 -9
- package/src/sap/ui/rta/messagebundle_sh.properties +11 -10
- package/src/sap/ui/rta/messagebundle_sk.properties +11 -10
- package/src/sap/ui/rta/messagebundle_sl.properties +11 -10
- package/src/sap/ui/rta/messagebundle_sv.properties +11 -10
- package/src/sap/ui/rta/messagebundle_th.properties +16 -15
- package/src/sap/ui/rta/messagebundle_tr.properties +11 -10
- package/src/sap/ui/rta/messagebundle_uk.properties +12 -11
- package/src/sap/ui/rta/messagebundle_vi.properties +11 -10
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +11 -10
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +11 -10
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/plugin/BaseCreate.js +2 -2
- package/src/sap/ui/rta/plugin/Combine.js +1 -1
- package/src/sap/ui/rta/plugin/CompVariant.js +1 -2
- package/src/sap/ui/rta/plugin/ControlVariant.js +10 -5
- 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 +52 -2
- 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 +14 -62
- 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 +4 -14
- package/src/sap/ui/rta/plugin/Selection.js +1 -1
- package/src/sap/ui/rta/plugin/Settings.js +15 -14
- package/src/sap/ui/rta/plugin/Split.js +2 -1
- package/src/sap/ui/rta/plugin/Stretch.js +133 -138
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +6 -6
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.fragment.xml +74 -0
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +97 -260
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +31 -18
- 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 +8 -5
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +31 -29
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +1 -16
- package/src/sap/ui/rta/plugin/iframe/urlCleaner.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 +164 -67
- package/src/sap/ui/rta/service/Property.js +1 -3
- package/src/sap/ui/rta/service/Selection.js +2 -1
- package/src/sap/ui/rta/themes/base/ChangeVisualization.less +23 -30
- package/src/sap/ui/rta/themes/base/OverlayWithScrollbar.less +55 -0
- package/src/sap/ui/rta/themes/base/Toolbar.base.less +12 -1
- package/src/sap/ui/rta/themes/base/library.source.less +3 -1
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +26 -14
- package/src/sap/ui/rta/toolbar/Adaptation.js +3 -3
- 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 +3 -3
- 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/translation/Translation.js +1 -1
- package/src/sap/ui/rta/util/BindingsExtractor.js +13 -7
- package/src/sap/ui/rta/util/PluginManager.js +2 -4
- package/src/sap/ui/rta/util/PopupManager.js +3 -11
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/adaptationStarter.js +4 -4
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +16 -78
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorPopover.fragment.xml +15 -37
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +85 -107
- package/src/sap/ui/rta/util/changeVisualization/categories/MoveVisualization.js +30 -0
- package/src/sap/ui/rta/util/changeVisualization/categories/RenameVisualization.js +3 -2
- package/src/sap/ui/rta/util/changeVisualization/categories/SplitVisualization.js +30 -0
- package/src/sap/ui/rta/util/changeVisualization/categories/getVisualizationCategory.js +9 -3
- package/src/sap/ui/rta/util/validateFlexEnabled.js +4 -4
- package/ui5.yaml +4 -1
- package/src/sap/ui/rta/assets/InPageStyles.css +0 -34
- package/src/sap/ui/rta/util/changeVisualization/ChangesListPopover.fragment.xml +0 -23
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/base/util/restricted/_difference",
|
|
9
9
|
"sap/base/util/deepEqual",
|
|
10
|
+
"sap/base/Log",
|
|
10
11
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
11
12
|
"sap/ui/core/Control",
|
|
12
|
-
"sap/ui/core/Fragment",
|
|
13
13
|
"sap/ui/dt/OverlayRegistry",
|
|
14
14
|
"sap/ui/dt/ElementUtil",
|
|
15
15
|
"sap/ui/events/KeyCodes",
|
|
@@ -25,9 +25,9 @@ sap.ui.define([
|
|
|
25
25
|
], function(
|
|
26
26
|
difference,
|
|
27
27
|
deepEqual,
|
|
28
|
+
Log,
|
|
28
29
|
JsControlTreeModifier,
|
|
29
30
|
Control,
|
|
30
|
-
Fragment,
|
|
31
31
|
OverlayRegistry,
|
|
32
32
|
ElementUtil,
|
|
33
33
|
KeyCodes,
|
|
@@ -66,6 +66,15 @@ sap.ui.define([
|
|
|
66
66
|
};
|
|
67
67
|
var CATEGORY_ALL = "all";
|
|
68
68
|
|
|
69
|
+
var CATEGORY_ICONS = {
|
|
70
|
+
all: "sap-icon://show",
|
|
71
|
+
add: "sap-icon://add",
|
|
72
|
+
move: "sap-icon://move",
|
|
73
|
+
rename: "sap-icon://edit",
|
|
74
|
+
combinesplit: "sap-icon://combine",
|
|
75
|
+
remove: "sap-icon://less"
|
|
76
|
+
};
|
|
77
|
+
|
|
69
78
|
/**
|
|
70
79
|
* @class
|
|
71
80
|
* Root control for RTA change visualization.
|
|
@@ -74,9 +83,8 @@ sap.ui.define([
|
|
|
74
83
|
* @alias sap.ui.rta.util.changeVisualization.ChangeVisualization
|
|
75
84
|
* @author SAP SE
|
|
76
85
|
* @since 1.84.0
|
|
77
|
-
* @version 1.
|
|
86
|
+
* @version 1.97.0
|
|
78
87
|
* @private
|
|
79
|
-
* @ui5-restricted
|
|
80
88
|
*/
|
|
81
89
|
var ChangeVisualization = Control.extend("sap.ui.rta.util.changeVisualization.ChangeVisualization", {
|
|
82
90
|
metadata: {
|
|
@@ -95,12 +103,6 @@ sap.ui.define([
|
|
|
95
103
|
type: "boolean",
|
|
96
104
|
defaultValue: false
|
|
97
105
|
}
|
|
98
|
-
},
|
|
99
|
-
aggregations: {
|
|
100
|
-
popover: {
|
|
101
|
-
type: "sap.m.Popover",
|
|
102
|
-
multiple: false
|
|
103
|
-
}
|
|
104
106
|
}
|
|
105
107
|
},
|
|
106
108
|
constructor: function () {
|
|
@@ -114,13 +116,10 @@ sap.ui.define([
|
|
|
114
116
|
bundle: this._oTextBundle
|
|
115
117
|
}), "i18n");
|
|
116
118
|
|
|
117
|
-
this.
|
|
118
|
-
this._oPopoverModel.setDefaultBindingMode("OneWay");
|
|
119
|
-
|
|
120
|
-
this._oChangeIndicatorModel = new JSONModel({
|
|
119
|
+
this._oChangeVisualizationModel = new JSONModel({
|
|
121
120
|
active: this.getIsActive()
|
|
122
121
|
});
|
|
123
|
-
this.
|
|
122
|
+
this._oChangeVisualizationModel.setDefaultBindingMode("OneWay");
|
|
124
123
|
this._sSelectedCommandCategory = "all";
|
|
125
124
|
this._bSetModeChanged = false;
|
|
126
125
|
}
|
|
@@ -143,8 +142,8 @@ sap.ui.define([
|
|
|
143
142
|
}
|
|
144
143
|
this.setProperty("isActive", bActiveState);
|
|
145
144
|
|
|
146
|
-
if (this.
|
|
147
|
-
this.
|
|
145
|
+
if (this._oChangeVisualizationModel) {
|
|
146
|
+
this._updateVisualizationModel({
|
|
148
147
|
active: bActiveState
|
|
149
148
|
});
|
|
150
149
|
}
|
|
@@ -152,28 +151,37 @@ sap.ui.define([
|
|
|
152
151
|
|
|
153
152
|
ChangeVisualization.prototype.exit = function () {
|
|
154
153
|
this._oChangeIndicatorRegistry.destroy();
|
|
154
|
+
if (this.oRootOverlay) {
|
|
155
|
+
this.oRootOverlay.getDomRef().removeEventListener("click", onClick.bind(null, this.oMenuButton), {capture: true});
|
|
156
|
+
}
|
|
155
157
|
};
|
|
156
158
|
|
|
157
159
|
ChangeVisualization.prototype._reset = function () {
|
|
158
160
|
this._oChangeIndicatorRegistry.reset();
|
|
159
161
|
};
|
|
160
162
|
|
|
161
|
-
ChangeVisualization.prototype.
|
|
163
|
+
ChangeVisualization.prototype._updateVisualizationModelMenuData = function () {
|
|
162
164
|
var aCommandData = Object.keys(VALID_COMMANDS).map(function (sCommandCategoryName) {
|
|
165
|
+
var sTitle = this._getCommandCategoryLabel(sCommandCategoryName,
|
|
166
|
+
this._getChangesForCommandCategory(sCommandCategoryName).length);
|
|
163
167
|
return {
|
|
164
168
|
key: sCommandCategoryName,
|
|
165
169
|
count: this._getChangesForCommandCategory(sCommandCategoryName).length,
|
|
166
|
-
title:
|
|
170
|
+
title: sTitle,
|
|
171
|
+
icon: CATEGORY_ICONS[sCommandCategoryName]
|
|
167
172
|
};
|
|
168
173
|
}.bind(this));
|
|
169
174
|
|
|
170
175
|
aCommandData.unshift({
|
|
171
176
|
key: CATEGORY_ALL,
|
|
172
177
|
count: this._getChangesForCommandCategory(CATEGORY_ALL).length,
|
|
173
|
-
title: this._getCommandCategoryLabel(CATEGORY_ALL)
|
|
178
|
+
title: this._getCommandCategoryLabel(CATEGORY_ALL, this._getChangesForCommandCategory(CATEGORY_ALL).length),
|
|
179
|
+
icon: CATEGORY_ICONS[CATEGORY_ALL]
|
|
174
180
|
});
|
|
175
181
|
|
|
176
|
-
this.
|
|
182
|
+
this._updateVisualizationModel({
|
|
183
|
+
commandCategories: aCommandData
|
|
184
|
+
});
|
|
177
185
|
};
|
|
178
186
|
|
|
179
187
|
ChangeVisualization.prototype._getChangesForCommandCategory = function (sCommandCategory) {
|
|
@@ -185,73 +193,36 @@ sap.ui.define([
|
|
|
185
193
|
});
|
|
186
194
|
};
|
|
187
195
|
|
|
188
|
-
ChangeVisualization.prototype._getCommandCategoryLabel = function (sCommandCategoryName) {
|
|
196
|
+
ChangeVisualization.prototype._getCommandCategoryLabel = function (sCommandCategoryName, iChangesCount) {
|
|
189
197
|
var sLabelKey = "TXT_CHANGEVISUALIZATION_OVERVIEW_" + sCommandCategoryName.toUpperCase();
|
|
190
|
-
return this._oTextBundle.getText(sLabelKey);
|
|
198
|
+
return this._oTextBundle.getText(sLabelKey, [iChangesCount]);
|
|
191
199
|
};
|
|
192
200
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
* @param {event} oEvent - Event
|
|
197
|
-
*/
|
|
198
|
-
ChangeVisualization.prototype.togglePopover = function (oEvent) {
|
|
199
|
-
if (!this._oToolbarButton) {
|
|
200
|
-
// Event bubbled through the toolbar, get original source
|
|
201
|
-
this._oToolbarButton = sap.ui.getCore().byId(oEvent.getParameter("id"));
|
|
202
|
-
}
|
|
203
|
-
var oPopover = this.getPopover();
|
|
204
|
-
if (!(oPopover && oPopover.isOpen())) {
|
|
205
|
-
this._updateChangeRegistry().then(this._updatePopoverModel.bind(this));
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
if (!oPopover) {
|
|
209
|
-
Fragment.load({
|
|
210
|
-
name: "sap.ui.rta.util.changeVisualization.ChangesListPopover",
|
|
211
|
-
id: this._getComponent().createId("changeVisualization_changesListPopover"),
|
|
212
|
-
controller: this
|
|
213
|
-
})
|
|
214
|
-
.then(function(oPopover) {
|
|
215
|
-
this._oToolbarButton.addDependent(oPopover);
|
|
216
|
-
oPopover.setModel(this._oPopoverModel, "commandModel");
|
|
217
|
-
oPopover.openBy(this._oToolbarButton);
|
|
218
|
-
this.setPopover(oPopover);
|
|
219
|
-
}.bind(this));
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
if (oPopover.isOpen()) {
|
|
224
|
-
oPopover.close();
|
|
225
|
-
} else {
|
|
226
|
-
oPopover.openBy(this._oToolbarButton);
|
|
227
|
-
}
|
|
201
|
+
ChangeVisualization.prototype._getCommandCategoryButton = function (sCommandCategoryName) {
|
|
202
|
+
var sButtonKey = "BTN_CHANGEVISUALIZATION_OVERVIEW_" + sCommandCategoryName.toUpperCase();
|
|
203
|
+
return this._oTextBundle.getText(sButtonKey);
|
|
228
204
|
};
|
|
229
205
|
|
|
230
206
|
/**
|
|
231
207
|
* Sets the selected command category and visualizes all changes for the given category
|
|
232
208
|
*
|
|
233
209
|
* @param {event} oEvent - Event
|
|
210
|
+
* @returns {promise} - Promise of category change
|
|
234
211
|
*/
|
|
235
212
|
ChangeVisualization.prototype.onCommandCategorySelection = function (oEvent) {
|
|
236
|
-
var sSelectedCommandCategory = oEvent.
|
|
237
|
-
|
|
238
|
-
var sTextkey = "BTN_CHANGEVISUALIZATION_OVERVIEW_" + sSelectedCommandCategory.toUpperCase();
|
|
239
|
-
this._oToolbarButton.setText(this._oTextBundle.getText(sTextkey));
|
|
240
|
-
this._selectCommandCategory(sSelectedCommandCategory);
|
|
213
|
+
var sSelectedCommandCategory = oEvent.getParameter("item").getKey();
|
|
214
|
+
return this._selectCommandCategory(sSelectedCommandCategory);
|
|
241
215
|
};
|
|
242
216
|
|
|
243
217
|
ChangeVisualization.prototype._selectCommandCategory = function (sSelectedCommandCategory) {
|
|
244
218
|
this._sSelectedCommandCategory = sSelectedCommandCategory;
|
|
245
|
-
var oPopover = this.getPopover();
|
|
246
|
-
if (oPopover && oPopover.isOpen()) {
|
|
247
|
-
oPopover.close();
|
|
248
|
-
}
|
|
249
219
|
|
|
250
220
|
var aRelevantChanges = this._getChangesForCommandCategory(sSelectedCommandCategory);
|
|
221
|
+
var sCommandCategoryText = this._getCommandCategoryButton(sSelectedCommandCategory);
|
|
251
222
|
|
|
252
|
-
this.
|
|
253
|
-
|
|
254
|
-
|
|
223
|
+
this._updateVisualizationModel({
|
|
224
|
+
commandCategory: sSelectedCommandCategory,
|
|
225
|
+
commandCategoryText: sCommandCategoryText
|
|
255
226
|
});
|
|
256
227
|
|
|
257
228
|
return Promise.all(aRelevantChanges.map(function (oChange) {
|
|
@@ -366,6 +337,10 @@ sap.ui.define([
|
|
|
366
337
|
return oChangeHandler.getChangeVisualizationInfo(oChange, oAppComponent);
|
|
367
338
|
}
|
|
368
339
|
return undefined;
|
|
340
|
+
})
|
|
341
|
+
.catch(function(vErr) {
|
|
342
|
+
Log.error(vErr);
|
|
343
|
+
return undefined;
|
|
369
344
|
});
|
|
370
345
|
}
|
|
371
346
|
|
|
@@ -414,16 +389,21 @@ sap.ui.define([
|
|
|
414
389
|
};
|
|
415
390
|
|
|
416
391
|
ChangeVisualization.prototype._selectChange = function (sChangeId) {
|
|
417
|
-
this.
|
|
418
|
-
|
|
392
|
+
var aDependentElements = this._oChangeIndicatorRegistry.getChange(sChangeId).visualizationInfo.dependentElementIds;
|
|
393
|
+
aDependentElements.forEach(function(sElementId) {
|
|
394
|
+
var oOverlayDomRef = OverlayRegistry.getOverlay(sElementId).getDomRef();
|
|
395
|
+
oOverlayDomRef.scrollIntoViewIfNeeded();
|
|
396
|
+
oOverlayDomRef.classList.add("sapUiRtaChangeIndicatorDependent");
|
|
397
|
+
oOverlayDomRef.addEventListener("animationend", function () {
|
|
398
|
+
oOverlayDomRef.classList.remove("sapUiRtaChangeIndicatorDependent");
|
|
399
|
+
}, {once: true});
|
|
419
400
|
});
|
|
420
|
-
this._updateChangeIndicators();
|
|
421
401
|
};
|
|
422
402
|
|
|
423
|
-
ChangeVisualization.prototype.
|
|
424
|
-
this.
|
|
403
|
+
ChangeVisualization.prototype._updateVisualizationModel = function (oData) {
|
|
404
|
+
this._oChangeVisualizationModel.setData(Object.assign(
|
|
425
405
|
{},
|
|
426
|
-
this.
|
|
406
|
+
this._oChangeVisualizationModel.getData(),
|
|
427
407
|
oData
|
|
428
408
|
));
|
|
429
409
|
};
|
|
@@ -456,10 +436,10 @@ sap.ui.define([
|
|
|
456
436
|
if (
|
|
457
437
|
!deepEqual(
|
|
458
438
|
oIndicators,
|
|
459
|
-
this.
|
|
439
|
+
this._oChangeVisualizationModel.getData().content
|
|
460
440
|
)
|
|
461
441
|
) {
|
|
462
|
-
this.
|
|
442
|
+
this._updateVisualizationModel({
|
|
463
443
|
content: oIndicators
|
|
464
444
|
});
|
|
465
445
|
}
|
|
@@ -469,23 +449,14 @@ sap.ui.define([
|
|
|
469
449
|
if (!Array.isArray(aChanges)) {
|
|
470
450
|
return aChanges;
|
|
471
451
|
}
|
|
472
|
-
var oRootData = this.
|
|
452
|
+
var oRootData = this._oChangeVisualizationModel.getData();
|
|
473
453
|
|
|
474
454
|
return aChanges.filter(function (oChange) {
|
|
475
455
|
return (
|
|
476
|
-
|
|
477
|
-
(
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
&& (
|
|
481
|
-
oRootData.commandCategory === 'all'
|
|
482
|
-
|| oRootData.commandCategory === oChange.commandCategory
|
|
483
|
-
)
|
|
484
|
-
)
|
|
485
|
-
// Dependent change for currently selected or currently selected
|
|
486
|
-
|| (
|
|
487
|
-
!!oRootData.selectedChange
|
|
488
|
-
&& oChange.id === oRootData.selectedChange
|
|
456
|
+
!oChange.dependent
|
|
457
|
+
&& (
|
|
458
|
+
oRootData.commandCategory === 'all'
|
|
459
|
+
|| oRootData.commandCategory === oChange.commandCategory
|
|
489
460
|
)
|
|
490
461
|
);
|
|
491
462
|
});
|
|
@@ -494,15 +465,6 @@ sap.ui.define([
|
|
|
494
465
|
ChangeVisualization.prototype._createChangeIndicator = function (oOverlay, sSelectorId) {
|
|
495
466
|
var oChangeIndicator = new ChangeIndicator({
|
|
496
467
|
changes: "{changes}",
|
|
497
|
-
mode: {
|
|
498
|
-
path: "changes",
|
|
499
|
-
formatter: function (aChanges) {
|
|
500
|
-
var sSelectedChange = this.getModel().getData().selectedChange;
|
|
501
|
-
return (sSelectedChange && (aChanges || []).some(function (oChange) {
|
|
502
|
-
return oChange.dependent;
|
|
503
|
-
})) ? "dependent" : "change";
|
|
504
|
-
}
|
|
505
|
-
},
|
|
506
468
|
posX: "{posX}",
|
|
507
469
|
posY: "{posY}",
|
|
508
470
|
visible: "{= ${/active} && (${changes} || []).length > 0}",
|
|
@@ -511,15 +473,13 @@ sap.ui.define([
|
|
|
511
473
|
selectChange: this.selectChange.bind(this),
|
|
512
474
|
keyPress: this._onIndicatorKeyPress.bind(this)
|
|
513
475
|
});
|
|
514
|
-
|
|
515
|
-
oChangeIndicator.setModel(this._oChangeIndicatorModel);
|
|
476
|
+
oChangeIndicator.setModel(this._oChangeVisualizationModel);
|
|
516
477
|
oChangeIndicator.bindElement("/content/" + sSelectorId);
|
|
517
478
|
oChangeIndicator.setModel(this.getModel("i18n"), "i18n");
|
|
518
479
|
|
|
519
480
|
// Temporarily place the indicator in the static area
|
|
520
481
|
// It will move itself to the correct overlay after rendering
|
|
521
482
|
oChangeIndicator.placeAt(sap.ui.getCore().getStaticAreaRef());
|
|
522
|
-
|
|
523
483
|
this._oChangeIndicatorRegistry.registerChangeIndicator(sSelectorId, oChangeIndicator);
|
|
524
484
|
};
|
|
525
485
|
|
|
@@ -574,23 +534,41 @@ sap.ui.define([
|
|
|
574
534
|
aVisibleIndicators[iIndexToSelect].focus();
|
|
575
535
|
};
|
|
576
536
|
|
|
537
|
+
function onClick(oMenuButton) {
|
|
538
|
+
oMenuButton.getMenu().close();
|
|
539
|
+
}
|
|
540
|
+
|
|
577
541
|
/**
|
|
578
542
|
* Triggers the mode switch (on/off).
|
|
579
543
|
*
|
|
580
544
|
* @param {sap.ui.base.ManagedObject} oRootControl - Root control of the overlays
|
|
581
|
-
* @
|
|
545
|
+
* @param {sap.ui.triggerModeChange.Toolbar} oToolbar - Toolbar of RTA
|
|
582
546
|
*/
|
|
583
|
-
ChangeVisualization.prototype.triggerModeChange = function(oRootControl) {
|
|
547
|
+
ChangeVisualization.prototype.triggerModeChange = function(oRootControl, oToolbar) {
|
|
548
|
+
this.oMenuButton = oToolbar.getControl("toggleChangeVisualizationMenuButton");
|
|
549
|
+
this.oRootOverlay = OverlayRegistry.getOverlay(oRootControl);
|
|
550
|
+
|
|
584
551
|
if (this.getIsActive()) {
|
|
585
552
|
this.setIsActive(false);
|
|
553
|
+
if (this.oRootOverlay) {
|
|
554
|
+
this.oRootOverlay.getDomRef().removeEventListener("click", onClick.bind(null, this.oMenuButton), {capture: true});
|
|
555
|
+
}
|
|
586
556
|
return;
|
|
587
557
|
}
|
|
558
|
+
if (this.oRootOverlay) {
|
|
559
|
+
this.oRootOverlay.getDomRef().addEventListener("click", onClick.bind(null, this.oMenuButton), {capture: true});
|
|
560
|
+
}
|
|
588
561
|
if (!this.getRootControlId()) {
|
|
589
562
|
this.setRootControlId(oRootControl);
|
|
590
563
|
}
|
|
591
564
|
this.setIsActive(true);
|
|
592
565
|
// show all change visualizations at startup
|
|
593
|
-
this._updateChangeRegistry()
|
|
566
|
+
this._updateChangeRegistry()
|
|
567
|
+
.then(this._selectCommandCategory.bind(this, this._sSelectedCommandCategory))
|
|
568
|
+
.then(function() {
|
|
569
|
+
this._updateVisualizationModelMenuData();
|
|
570
|
+
oToolbar.setModel(this._oChangeVisualizationModel, "visualizationModel");
|
|
571
|
+
}.bind(this));
|
|
594
572
|
};
|
|
595
573
|
|
|
596
574
|
return ChangeVisualization;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ! OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
], function(
|
|
9
|
+
) {
|
|
10
|
+
"use strict";
|
|
11
|
+
|
|
12
|
+
var MoveVisualization = {};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Creates a localized description and button text for move changes based on the provided
|
|
16
|
+
* current element label.
|
|
17
|
+
*
|
|
18
|
+
* @param {object} mPayload - Change visualization payload from the change handler
|
|
19
|
+
* @param {string} sLabel - Change handler label
|
|
20
|
+
* @returns {object} Localized description text and button text
|
|
21
|
+
*/
|
|
22
|
+
MoveVisualization.getDescription = function (mPayload, sLabel) {
|
|
23
|
+
var oRtaResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
|
|
24
|
+
var sDescriptionText = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_MOVE", sLabel);
|
|
25
|
+
var sButtonText = oRtaResourceBundle.getText("BTN_CHANGEVISUALIZATION_SHOW_DEPENDENT_CONTAINER_MOVE");
|
|
26
|
+
return { descriptionText: sDescriptionText, buttonText: sButtonText};
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
return MoveVisualization;
|
|
30
|
+
});
|
|
@@ -19,20 +19,21 @@ sap.ui.define([
|
|
|
19
19
|
* @param {string} [mPayload.originalLabel] - Label before the change was applied
|
|
20
20
|
* @param {object} [mPayload.newLabel] - Label after the change was applied
|
|
21
21
|
* @param {string} sFallbackLabel - New label as a fallback if change handler provides no info
|
|
22
|
-
* @returns {
|
|
22
|
+
* @returns {object} Localized description
|
|
23
23
|
*/
|
|
24
24
|
RenameVisualization.getDescription = function (mPayload, sFallbackLabel) {
|
|
25
25
|
var oRtaResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
|
|
26
26
|
var sKey = mPayload.originalLabel
|
|
27
27
|
? "TXT_CHANGEVISUALIZATION_CHANGE_RENAME_FROM_TO"
|
|
28
28
|
: "TXT_CHANGEVISUALIZATION_CHANGE_RENAME_TO";
|
|
29
|
-
|
|
29
|
+
var sDescriptionText = oRtaResourceBundle.getText(
|
|
30
30
|
sKey,
|
|
31
31
|
[
|
|
32
32
|
mPayload.newLabel || sFallbackLabel,
|
|
33
33
|
mPayload.originalLabel
|
|
34
34
|
]
|
|
35
35
|
);
|
|
36
|
+
return {descriptionText: sDescriptionText};
|
|
36
37
|
};
|
|
37
38
|
|
|
38
39
|
return RenameVisualization;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ! OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
], function(
|
|
9
|
+
) {
|
|
10
|
+
"use strict";
|
|
11
|
+
|
|
12
|
+
var SplitVisualization = {};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Creates a localized description and button text for split changes based on the provided
|
|
16
|
+
* current element label
|
|
17
|
+
*
|
|
18
|
+
* @param {object} mPayload - Change visualization payload from the change handler
|
|
19
|
+
* @param {string} sLabel - Change handler label
|
|
20
|
+
* @returns {object} Localized description text and button text
|
|
21
|
+
*/
|
|
22
|
+
SplitVisualization.getDescription = function (mPayload, sLabel) {
|
|
23
|
+
var oRtaResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
|
|
24
|
+
var sDescriptionText = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_SPLIT", sLabel);
|
|
25
|
+
var sButtonText = oRtaResourceBundle.getText("BTN_CHANGEVISUALIZATION_SHOW_DEPENDENT_CONTAINER_SPLIT");
|
|
26
|
+
return { descriptionText: sDescriptionText, buttonText: sButtonText};
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
return SplitVisualization;
|
|
30
|
+
});
|
|
@@ -5,14 +5,20 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/ui/rta/util/changeVisualization/categories/RenameVisualization"
|
|
8
|
+
"sap/ui/rta/util/changeVisualization/categories/RenameVisualization",
|
|
9
|
+
"sap/ui/rta/util/changeVisualization/categories/MoveVisualization",
|
|
10
|
+
"sap/ui/rta/util/changeVisualization/categories/SplitVisualization"
|
|
9
11
|
], function(
|
|
10
|
-
RenameVisualization
|
|
12
|
+
RenameVisualization,
|
|
13
|
+
MoveVisualization,
|
|
14
|
+
SplitVisualization
|
|
11
15
|
) {
|
|
12
16
|
"use strict";
|
|
13
17
|
|
|
14
18
|
var mCategories = {
|
|
15
|
-
rename: RenameVisualization
|
|
19
|
+
rename: RenameVisualization,
|
|
20
|
+
move: MoveVisualization,
|
|
21
|
+
split: SplitVisualization
|
|
16
22
|
};
|
|
17
23
|
|
|
18
24
|
return function(sCategoryName) {
|
|
@@ -25,6 +25,10 @@ sap.ui.define([
|
|
|
25
25
|
) {
|
|
26
26
|
"use strict";
|
|
27
27
|
return function (oRta) {
|
|
28
|
+
var mMessageBoxShow = {};
|
|
29
|
+
var aPendingOverlaysToValidate = [];
|
|
30
|
+
var oComponent = FlUtils.getAppComponentForControl(oRta.getRootControlInstance());
|
|
31
|
+
|
|
28
32
|
function _displayMessage(oRta, oComponent, sText, sIconType, sTitle) {
|
|
29
33
|
var sComponentId = oComponent.getId();
|
|
30
34
|
if (!mMessageBoxShow[sComponentId]) {
|
|
@@ -104,10 +108,6 @@ sap.ui.define([
|
|
|
104
108
|
}
|
|
105
109
|
}
|
|
106
110
|
|
|
107
|
-
var mMessageBoxShow = {};
|
|
108
|
-
var aPendingOverlaysToValidate = [];
|
|
109
|
-
var oComponent = FlUtils.getAppComponentForControl(oRta.getRootControlInstance());
|
|
110
|
-
|
|
111
111
|
oRta.attachEventOnce("stop", function () {
|
|
112
112
|
_setMessageBoxShow(oComponent.getId(), false);
|
|
113
113
|
});
|
package/ui5.yaml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
specVersion: "
|
|
2
|
+
specVersion: "2.0"
|
|
3
3
|
type: library
|
|
4
4
|
metadata:
|
|
5
5
|
name: sap.ui.rta
|
|
@@ -7,3 +7,6 @@ metadata:
|
|
|
7
7
|
OpenUI5
|
|
8
8
|
* (c) Copyright 2009-${currentYear} SAP SE or an SAP affiliate company.
|
|
9
9
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
10
|
+
resources:
|
|
11
|
+
configuration:
|
|
12
|
+
propertiesFileSourceEncoding: ISO-8859-1
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
Content of this file inserts automatically into the page when RTA starts
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
.sapUiRta .sapUiDtOverlaySelected.sapUiDtOverlayWithScrollBar.sapUiDtOverlayWithScrollBarVertical:after {
|
|
6
|
-
right: %scrollWidth%;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.sapUiRta .sapUiDtOverlaySelected.sapUiDtOverlayWithScrollBar.sapUiDtOverlayWithScrollBarHorizontal:after {
|
|
10
|
-
bottom: %scrollWidth%;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.sapUiRta .sapUiDtOverlaySelected.sapUiDtOverlayFocusable.sapUiDtOverlayWithScrollBar.sapUiDtOverlayWithScrollBarVertical:focus:before {
|
|
14
|
-
right: calc(%scrollWidth% + 2px);
|
|
15
|
-
}
|
|
16
|
-
.sapUiRta .sapUiDtOverlaySelected.sapUiDtOverlayFocusable.sapUiDtOverlayWithScrollBar.sapUiDtOverlayWithScrollBarHorizontal:focus:before {
|
|
17
|
-
bottom: calc(%scrollWidth% + 2px);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.sapUiRta .sapUiDtOverlaySelected.sapUiDtOverlayFocusable.sapUiDtOverlayWithScrollBar.sapUiDtOverlayWithScrollBarVertical:focus:before {
|
|
21
|
-
right: calc(%scrollWidth% + 2px);
|
|
22
|
-
}
|
|
23
|
-
.sapUiRta .sapUiDtOverlaySelected.sapUiDtOverlayFocusable.sapUiDtOverlayWithScrollBar.sapUiDtOverlayWithScrollBarHorizontal:focus:before {
|
|
24
|
-
bottom: calc(%scrollWidth% + 2px);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.sapUiRta .sapUiDtOverlayFocusable.sapUiDtOverlayWithScrollBar.sapUiDtOverlayWithScrollBarHorizontal:focus:before,
|
|
28
|
-
.sapUiRta .sapUiRtaOverlayHover.sapUiDtOverlayWithScrollBar.sapUiDtOverlayWithScrollBarHorizontal:after {
|
|
29
|
-
bottom: %scrollWidth%;
|
|
30
|
-
}
|
|
31
|
-
.sapUiRta .sapUiDtOverlayFocusable.sapUiDtOverlayWithScrollBar.sapUiDtOverlayWithScrollBarVertical:focus:before,
|
|
32
|
-
.sapUiRta .sapUiRtaOverlayHover.sapUiDtOverlayWithScrollBar.sapUiDtOverlayWithScrollBarVertical:after {
|
|
33
|
-
right: %scrollWidth%;
|
|
34
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<core:FragmentDefinition
|
|
2
|
-
xmlns="sap.m"
|
|
3
|
-
xmlns:core="sap.ui.core"
|
|
4
|
-
>
|
|
5
|
-
<Popover
|
|
6
|
-
title="{i18n>TIT_CHANGEVISUALIZATION_CHANGES}"
|
|
7
|
-
placement="Bottom"
|
|
8
|
-
class="sapUiRtaPopover"
|
|
9
|
-
>
|
|
10
|
-
<List
|
|
11
|
-
id="sapUiRta_changesList"
|
|
12
|
-
items="{commandModel>/}"
|
|
13
|
-
class="sapUiRtaChangesList"
|
|
14
|
-
>
|
|
15
|
-
<StandardListItem
|
|
16
|
-
title="{commandModel>title}"
|
|
17
|
-
counter="{commandModel>count}"
|
|
18
|
-
type="{= ${commandModel>count} > 0 ? 'Active' : 'Inactive'}"
|
|
19
|
-
press=".onCommandCategorySelection"
|
|
20
|
-
/>
|
|
21
|
-
</List>
|
|
22
|
-
</Popover>
|
|
23
|
-
</core:FragmentDefinition>
|