@openui5/sap.ui.rta 1.117.1 → 1.118.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 +25 -1
- package/package.json +6 -6
- package/src/sap/ui/rta/.library +1 -1
- package/src/sap/ui/rta/Client.js +32 -21
- package/src/sap/ui/rta/RuntimeAuthoring.js +78 -45
- package/src/sap/ui/rta/Utils.js +10 -16
- package/src/sap/ui/rta/api/startAdaptation.js +0 -1
- package/src/sap/ui/rta/api/startKeyUserAdaptation.js +0 -1
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +24 -26
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -3
- package/src/sap/ui/rta/appVariant/AppVariantOverviewDialog.js +5 -4
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +21 -21
- package/src/sap/ui/rta/appVariant/Feature.js +20 -30
- package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +21 -17
- package/src/sap/ui/rta/appVariant/Utils.js +4 -3
- package/src/sap/ui/rta/appVariant/manageApps/webapp/Component.js +8 -7
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +17 -17
- package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
- package/src/sap/ui/rta/command/AddIFrame.js +5 -7
- package/src/sap/ui/rta/command/AddProperty.js +1 -3
- package/src/sap/ui/rta/command/AddXML.js +7 -7
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +5 -5
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -3
- package/src/sap/ui/rta/command/BaseCommand.js +1 -3
- package/src/sap/ui/rta/command/BindProperty.js +4 -5
- package/src/sap/ui/rta/command/Combine.js +1 -3
- package/src/sap/ui/rta/command/CommandFactory.js +7 -11
- package/src/sap/ui/rta/command/CompositeCommand.js +2 -6
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +4 -4
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +4 -3
- package/src/sap/ui/rta/command/CreateContainer.js +1 -3
- package/src/sap/ui/rta/command/CustomAdd.js +1 -2
- package/src/sap/ui/rta/command/FlexCommand.js +2 -7
- package/src/sap/ui/rta/command/LREPSerializer.js +1 -3
- package/src/sap/ui/rta/command/LocalReset.js +1 -1
- package/src/sap/ui/rta/command/Move.js +1 -3
- package/src/sap/ui/rta/command/Property.js +1 -3
- package/src/sap/ui/rta/command/Remove.js +1 -3
- package/src/sap/ui/rta/command/Rename.js +1 -3
- package/src/sap/ui/rta/command/Resize.js +1 -1
- package/src/sap/ui/rta/command/Reveal.js +1 -3
- package/src/sap/ui/rta/command/Settings.js +5 -7
- package/src/sap/ui/rta/command/Split.js +1 -3
- package/src/sap/ui/rta/command/Stack.js +2 -4
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -3
- 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 +4 -3
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
- package/src/sap/ui/rta/enablement/TestDelegate.js +7 -8
- package/src/sap/ui/rta/enablement/elementActionTest.js +25 -29
- package/src/sap/ui/rta/library.js +2 -3
- package/src/sap/ui/rta/messagebundle.properties +7 -7
- package/src/sap/ui/rta/messagebundle_ar.properties +8 -8
- package/src/sap/ui/rta/messagebundle_bg.properties +7 -7
- package/src/sap/ui/rta/messagebundle_ca.properties +7 -7
- package/src/sap/ui/rta/messagebundle_cs.properties +8 -8
- package/src/sap/ui/rta/messagebundle_cy.properties +8 -8
- package/src/sap/ui/rta/messagebundle_da.properties +7 -7
- package/src/sap/ui/rta/messagebundle_de.properties +8 -8
- package/src/sap/ui/rta/messagebundle_el.properties +7 -7
- package/src/sap/ui/rta/messagebundle_en.properties +8 -8
- package/src/sap/ui/rta/messagebundle_en_GB.properties +8 -8
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +8 -8
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +7 -7
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +8 -8
- package/src/sap/ui/rta/messagebundle_es.properties +8 -8
- package/src/sap/ui/rta/messagebundle_es_MX.properties +8 -8
- package/src/sap/ui/rta/messagebundle_et.properties +6 -6
- package/src/sap/ui/rta/messagebundle_fi.properties +8 -8
- package/src/sap/ui/rta/messagebundle_fr.properties +8 -8
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +9 -9
- package/src/sap/ui/rta/messagebundle_hi.properties +7 -7
- package/src/sap/ui/rta/messagebundle_hr.properties +8 -8
- package/src/sap/ui/rta/messagebundle_hu.properties +8 -8
- package/src/sap/ui/rta/messagebundle_id.properties +8 -8
- package/src/sap/ui/rta/messagebundle_it.properties +8 -8
- package/src/sap/ui/rta/messagebundle_iw.properties +8 -8
- package/src/sap/ui/rta/messagebundle_ja.properties +8 -8
- package/src/sap/ui/rta/messagebundle_kk.properties +8 -8
- package/src/sap/ui/rta/messagebundle_ko.properties +7 -7
- package/src/sap/ui/rta/messagebundle_lt.properties +8 -8
- package/src/sap/ui/rta/messagebundle_lv.properties +8 -8
- package/src/sap/ui/rta/messagebundle_ms.properties +8 -8
- package/src/sap/ui/rta/messagebundle_nl.properties +8 -8
- package/src/sap/ui/rta/messagebundle_no.properties +8 -8
- package/src/sap/ui/rta/messagebundle_pl.properties +9 -9
- package/src/sap/ui/rta/messagebundle_pt.properties +8 -8
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +8 -8
- package/src/sap/ui/rta/messagebundle_ro.properties +8 -8
- package/src/sap/ui/rta/messagebundle_ru.properties +8 -8
- package/src/sap/ui/rta/messagebundle_sh.properties +8 -8
- package/src/sap/ui/rta/messagebundle_sk.properties +8 -8
- package/src/sap/ui/rta/messagebundle_sl.properties +8 -8
- package/src/sap/ui/rta/messagebundle_sv.properties +8 -8
- package/src/sap/ui/rta/messagebundle_th.properties +8 -8
- package/src/sap/ui/rta/messagebundle_tr.properties +8 -8
- package/src/sap/ui/rta/messagebundle_uk.properties +8 -8
- package/src/sap/ui/rta/messagebundle_vi.properties +8 -8
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +9 -9
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +8 -8
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -2
- package/src/sap/ui/rta/plugin/BaseCreate.js +2 -3
- package/src/sap/ui/rta/plugin/Combine.js +1 -2
- package/src/sap/ui/rta/plugin/ControlVariant.js +12 -8
- package/src/sap/ui/rta/plugin/CreateContainer.js +1 -2
- package/src/sap/ui/rta/plugin/CutPaste.js +13 -13
- package/src/sap/ui/rta/plugin/DragDrop.js +17 -16
- package/src/sap/ui/rta/plugin/EasyAdd.js +12 -10
- package/src/sap/ui/rta/plugin/EasyRemove.js +11 -9
- package/src/sap/ui/rta/plugin/LocalReset.js +4 -2
- package/src/sap/ui/rta/plugin/Plugin.js +6 -10
- package/src/sap/ui/rta/plugin/RTAElementMover.js +3 -6
- package/src/sap/ui/rta/plugin/Remove.js +8 -9
- package/src/sap/ui/rta/plugin/Rename.js +9 -9
- package/src/sap/ui/rta/plugin/RenameHandler.js +21 -22
- package/src/sap/ui/rta/plugin/Resize.js +11 -10
- package/src/sap/ui/rta/plugin/Selection.js +33 -14
- package/src/sap/ui/rta/plugin/Settings.js +11 -11
- package/src/sap/ui/rta/plugin/Split.js +1 -2
- package/src/sap/ui/rta/plugin/Stretch.js +18 -20
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +4 -9
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +5 -9
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +4 -4
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +41 -43
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +2 -3
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +5 -6
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +7 -6
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +5 -5
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +28 -27
- package/src/sap/ui/rta/service/Action.js +3 -4
- package/src/sap/ui/rta/service/ControllerExtension.js +8 -9
- package/src/sap/ui/rta/service/Outline.js +13 -11
- package/src/sap/ui/rta/service/Property.js +3 -4
- package/src/sap/ui/rta/service/Receiver.js +1 -1
- package/src/sap/ui/rta/service/Selection.js +2 -3
- package/src/sap/ui/rta/service/SupportTools.js +2 -3
- package/src/sap/ui/rta/themes/base/Toolbar.base.less +4 -0
- package/src/sap/ui/rta/toolbar/Adaptation.js +25 -18
- package/src/sap/ui/rta/toolbar/Base.js +25 -11
- package/src/sap/ui/rta/toolbar/BaseRenderer.js +2 -2
- package/src/sap/ui/rta/toolbar/FeedbackDialog.fragment.xml +4 -4
- package/src/sap/ui/rta/toolbar/Fiori.js +20 -20
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -2
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +5 -6
- package/src/sap/ui/rta/toolbar/Personalization.js +4 -4
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -2
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +43 -20
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +16 -7
- package/src/sap/ui/rta/toolbar/translation/Translation.js +13 -14
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +31 -28
- package/src/sap/ui/rta/util/Animation.js +1 -3
- package/src/sap/ui/rta/util/PluginManager.js +1 -3
- package/src/sap/ui/rta/util/PopupManager.js +23 -19
- package/src/sap/ui/rta/util/ReloadManager.js +4 -4
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +18 -16
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +6 -9
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +9 -10
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +2 -2
- package/src/sap/ui/rta/util/hasStableId.js +1 -1
- package/src/sap/ui/rta/util/showMessageBox.js +2 -1
- package/src/sap/ui/rta/util/validateText.js +1 -1
- package/src/sap/ui/rta/util/StylesLoader.js +0 -31
- package/src/sap/ui/rta/util/UrlParser.js +0 -51
package/.eslintrc.json
CHANGED
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"max-len": ["warn", {
|
|
27
27
|
"code": 140,
|
|
28
28
|
"ignorePattern": "@param|@returns|@description|<|QUnit.test",
|
|
29
|
+
"ignoreTemplateLiterals": true,
|
|
29
30
|
"ignoreUrls": true
|
|
30
31
|
}],
|
|
31
32
|
"space-before-function-paren": ["error", {
|
|
@@ -50,6 +51,29 @@
|
|
|
50
51
|
"quotes": ["error", "double", {
|
|
51
52
|
"avoidEscape": true,
|
|
52
53
|
"allowTemplateLiterals": true
|
|
53
|
-
}]
|
|
54
|
+
}],
|
|
55
|
+
"no-unsafe-optional-chaining": "error",
|
|
56
|
+
"prefer-const": ["error", { "ignoreReadBeforeAssign": true }],
|
|
57
|
+
"prefer-template": "error",
|
|
58
|
+
"rest-spread-spacing": ["error", "never"],
|
|
59
|
+
"template-curly-spacing": "error",
|
|
60
|
+
"object-shorthand": ["error", "always", { "ignoreConstructors": false, "avoidQuotes": true }],
|
|
61
|
+
"prefer-destructuring": ["error", {
|
|
62
|
+
"VariableDeclarator": {
|
|
63
|
+
"array": false,
|
|
64
|
+
"object": true
|
|
65
|
+
},
|
|
66
|
+
"AssignmentExpression": {
|
|
67
|
+
"array": true,
|
|
68
|
+
"object": false
|
|
69
|
+
}
|
|
70
|
+
}, {
|
|
71
|
+
"enforceForRenamedProperties": false
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"prefer-rest-params": "error",
|
|
75
|
+
"prefer-spread": "error",
|
|
76
|
+
"logical-assignment-operators":["error", "always", { "enforceForIfStatements": true } ],
|
|
77
|
+
"require-await": "error"
|
|
54
78
|
}
|
|
55
79
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.rta",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.118.0",
|
|
4
4
|
"description": "OpenUI5 UI Library sap.ui.rta",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"url": "https://github.com/SAP/openui5.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@openui5/sap.m": "1.
|
|
18
|
-
"@openui5/sap.ui.core": "1.
|
|
19
|
-
"@openui5/sap.ui.dt": "1.
|
|
20
|
-
"@openui5/sap.ui.fl": "1.
|
|
21
|
-
"@openui5/sap.ui.layout": "1.
|
|
17
|
+
"@openui5/sap.m": "1.118.0",
|
|
18
|
+
"@openui5/sap.ui.core": "1.118.0",
|
|
19
|
+
"@openui5/sap.ui.dt": "1.118.0",
|
|
20
|
+
"@openui5/sap.ui.fl": "1.118.0",
|
|
21
|
+
"@openui5/sap.ui.layout": "1.118.0"
|
|
22
22
|
}
|
|
23
23
|
}
|
package/src/sap/ui/rta/.library
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
8
8
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
9
|
-
<version>1.
|
|
9
|
+
<version>1.118.0</version>
|
|
10
10
|
|
|
11
11
|
<documentation>SAPUI5 library with RTA controls.</documentation>
|
|
12
12
|
|
package/src/sap/ui/rta/Client.js
CHANGED
|
@@ -57,7 +57,7 @@ sap.ui.define([
|
|
|
57
57
|
* @alias sap.ui.rta.Client
|
|
58
58
|
* @author SAP SE
|
|
59
59
|
* @since 1.56.0
|
|
60
|
-
* @version 1.
|
|
60
|
+
* @version 1.118.0
|
|
61
61
|
* @private
|
|
62
62
|
* @ui5-restricted
|
|
63
63
|
*/
|
|
@@ -84,8 +84,9 @@ sap.ui.define([
|
|
|
84
84
|
*/
|
|
85
85
|
_bInit: false,
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
// eslint-disable-next-line object-shorthand
|
|
88
|
+
constructor: function(...aArgs) {
|
|
89
|
+
ManagedObject.apply(this, aArgs);
|
|
89
90
|
|
|
90
91
|
if (!this.getWindow()) {
|
|
91
92
|
throw new TypeError("sap.ui.rta.Client: window parameter is required");
|
|
@@ -175,8 +176,11 @@ sap.ui.define([
|
|
|
175
176
|
// Rejecting queued requests
|
|
176
177
|
var aRequests = this._aRequestQueue.slice();
|
|
177
178
|
this._aRequestQueue = [];
|
|
179
|
+
// eslint-disable-next-line max-nested-callbacks
|
|
178
180
|
aRequests.forEach(function(mRequest) {
|
|
179
|
-
mRequest.reject(
|
|
181
|
+
mRequest.reject(
|
|
182
|
+
new Error("sap.ui.rta.Client.getService(): connection to RuntimeAuthoring instance has been refused")
|
|
183
|
+
);
|
|
180
184
|
});
|
|
181
185
|
}, this);
|
|
182
186
|
|
|
@@ -199,14 +203,14 @@ sap.ui.define([
|
|
|
199
203
|
* After an object has been destroyed, it can no longer be used.
|
|
200
204
|
* @public
|
|
201
205
|
*/
|
|
202
|
-
Client.prototype.destroy = function() {
|
|
206
|
+
Client.prototype.destroy = function(...aArgs) {
|
|
203
207
|
this._oPostMessageBus.unsubscribe(CHANNEL_ID, "getService", this._receiverMethods, this);
|
|
204
208
|
this._oPostMessageBus.unsubscribe(CHANNEL_ID, "callMethod", this._receiverMethods, this);
|
|
205
209
|
this._oPostMessageBus.unsubscribe(CHANNEL_ID, "subscribe", this._receiverMethods, this);
|
|
206
210
|
this._oPostMessageBus.unsubscribe(CHANNEL_ID, "unsubscribe", this._receiverMethods, this);
|
|
207
211
|
this._oPostMessageBus.unsubscribe(CHANNEL_ID, "event", this._receiverEvents, this);
|
|
208
212
|
|
|
209
|
-
ManagedObject.prototype.destroy.apply(this,
|
|
213
|
+
ManagedObject.prototype.destroy.apply(this, aArgs);
|
|
210
214
|
};
|
|
211
215
|
|
|
212
216
|
/**
|
|
@@ -300,7 +304,7 @@ sap.ui.define([
|
|
|
300
304
|
var mService = merge(
|
|
301
305
|
// Create placeholders for methods
|
|
302
306
|
aMethods.reduce(function(mResult, sMethodName) {
|
|
303
|
-
mResult[sMethodName] = function() {
|
|
307
|
+
mResult[sMethodName] = function(...aArgs) {
|
|
304
308
|
return this._sendRequest(this._createRequest({
|
|
305
309
|
target: oEvent.source,
|
|
306
310
|
origin: oEvent.origin,
|
|
@@ -309,7 +313,7 @@ sap.ui.define([
|
|
|
309
313
|
data: {
|
|
310
314
|
service: sServiceName,
|
|
311
315
|
method: sMethodName,
|
|
312
|
-
arguments:
|
|
316
|
+
arguments: aArgs
|
|
313
317
|
}
|
|
314
318
|
}));
|
|
315
319
|
}.bind(this);
|
|
@@ -320,19 +324,22 @@ sap.ui.define([
|
|
|
320
324
|
);
|
|
321
325
|
|
|
322
326
|
if (Array.isArray(aEvents) && aEvents.length > 0) {
|
|
323
|
-
|
|
324
|
-
this._oServiceEventBus = new ServiceEventBus();
|
|
325
|
-
}
|
|
327
|
+
this._oServiceEventBus ||= new ServiceEventBus();
|
|
326
328
|
merge(mService, {
|
|
327
329
|
attachEvent: function(sEventName, fnCallback, oContext) {
|
|
328
330
|
if (typeof (sEventName) !== "string" || !sEventName) {
|
|
329
|
-
throw new TypeError(
|
|
331
|
+
throw new TypeError(
|
|
332
|
+
"sap.ui.rta.Client: sEventName must be a non-empty string when calling attachEvent() for a service"
|
|
333
|
+
);
|
|
330
334
|
}
|
|
331
335
|
if (typeof fnCallback !== "function") {
|
|
332
|
-
throw new TypeError(
|
|
336
|
+
throw new TypeError(
|
|
337
|
+
"sap.ui.rta.Client: fnFunction must be a function when calling attachEvent() for a service"
|
|
338
|
+
);
|
|
333
339
|
}
|
|
334
340
|
|
|
335
|
-
// 1. Check whether there are other subscribers for same event, if so,
|
|
341
|
+
// 1. Check whether there are other subscribers for same event, if so,
|
|
342
|
+
// then receiver doesn't need second notification
|
|
336
343
|
var oEventProvider = this._oServiceEventBus.getChannel(sServiceName);
|
|
337
344
|
var bShouldNotifyReceiver = !oEventProvider || !oEventProvider.hasListeners(sEventName);
|
|
338
345
|
|
|
@@ -351,7 +358,7 @@ sap.ui.define([
|
|
|
351
358
|
event: sEventName
|
|
352
359
|
}
|
|
353
360
|
})).then(function(mResponse) {
|
|
354
|
-
this._mEventHandlerIds[sServiceName
|
|
361
|
+
this._mEventHandlerIds[`${sServiceName},${sEventName}`] = mResponse.id;
|
|
355
362
|
|
|
356
363
|
// Use case when detach happens before we received response from RTA instance
|
|
357
364
|
this._checkIfEventAlive(sServiceName, sEventName);
|
|
@@ -360,10 +367,14 @@ sap.ui.define([
|
|
|
360
367
|
}.bind(this),
|
|
361
368
|
detachEvent: function(sEventName, fnCallback, oContext) {
|
|
362
369
|
if (typeof (sEventName) !== "string" || !sEventName) {
|
|
363
|
-
throw new TypeError(
|
|
370
|
+
throw new TypeError(
|
|
371
|
+
"sap.ui.rta.Client: sEventName must be a non-empty string when calling detachEvent() for a service"
|
|
372
|
+
);
|
|
364
373
|
}
|
|
365
374
|
if (typeof fnCallback !== "function") {
|
|
366
|
-
throw new TypeError(
|
|
375
|
+
throw new TypeError(
|
|
376
|
+
"sap.ui.rta.Client: fnFunction must be a function when calling detachEvent() for a service"
|
|
377
|
+
);
|
|
367
378
|
}
|
|
368
379
|
|
|
369
380
|
// 1. Unsubscribe from local EventBus
|
|
@@ -372,10 +383,10 @@ sap.ui.define([
|
|
|
372
383
|
// 2. Check and notify RTA instance if we don't want more events
|
|
373
384
|
this._checkIfEventAlive(sServiceName, sEventName);
|
|
374
385
|
}.bind(this),
|
|
375
|
-
attachEventOnce
|
|
376
|
-
function fnOnce() {
|
|
386
|
+
attachEventOnce(sEventName, fnCallback, oContext) {
|
|
387
|
+
function fnOnce(...aArgs) {
|
|
377
388
|
mService.detachEvent(sEventName, fnOnce);
|
|
378
|
-
fnCallback.apply(oContext,
|
|
389
|
+
fnCallback.apply(oContext, aArgs);
|
|
379
390
|
}
|
|
380
391
|
mService.attachEvent(sEventName, fnOnce);
|
|
381
392
|
}
|
|
@@ -405,7 +416,7 @@ sap.ui.define([
|
|
|
405
416
|
|
|
406
417
|
Client.prototype._checkIfEventAlive = function(sServiceName, sEventName) {
|
|
407
418
|
var oEventProvider = this._oServiceEventBus.getChannel(sServiceName);
|
|
408
|
-
var sEventHandlerId = this._mEventHandlerIds[sServiceName
|
|
419
|
+
var sEventHandlerId = this._mEventHandlerIds[`${sServiceName},${sEventName}`];
|
|
409
420
|
|
|
410
421
|
if (
|
|
411
422
|
(!oEventProvider || !oEventProvider.hasListeners(sEventName))
|
|
@@ -120,19 +120,19 @@ sap.ui.define([
|
|
|
120
120
|
* @class The runtime authoring allows to adapt the fields of a running application.
|
|
121
121
|
* @extends sap.ui.base.ManagedObject
|
|
122
122
|
* @author SAP SE
|
|
123
|
-
* @version 1.
|
|
123
|
+
* @version 1.118.0
|
|
124
124
|
* @constructor
|
|
125
125
|
* @private
|
|
126
126
|
* @since 1.30
|
|
127
127
|
* @alias sap.ui.rta.RuntimeAuthoring
|
|
128
|
-
* @experimental This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
129
128
|
*/
|
|
130
129
|
var RuntimeAuthoring = ManagedObject.extend("sap.ui.rta.RuntimeAuthoring", {
|
|
131
130
|
metadata: {
|
|
132
131
|
// ---- control specific ----
|
|
133
132
|
library: "sap.ui.rta",
|
|
134
133
|
associations: {
|
|
135
|
-
/** The root control which the runtime authoring should handle.
|
|
134
|
+
/** The root control which the runtime authoring should handle.
|
|
135
|
+
* Can only be sap.ui.core.Control or sap.ui.core.UIComponent */
|
|
136
136
|
rootControl: {
|
|
137
137
|
type: "sap.ui.base.ManagedObject"
|
|
138
138
|
}
|
|
@@ -163,7 +163,6 @@ sap.ui.define([
|
|
|
163
163
|
|
|
164
164
|
/**
|
|
165
165
|
* Map with flex-related settings
|
|
166
|
-
* @experimental
|
|
167
166
|
*/
|
|
168
167
|
flexSettings: {
|
|
169
168
|
type: "object",
|
|
@@ -232,9 +231,10 @@ sap.ui.define([
|
|
|
232
231
|
_dependents: null,
|
|
233
232
|
_sStatus: STOPPED,
|
|
234
233
|
_bNavigationModeWarningShown: false,
|
|
235
|
-
|
|
234
|
+
// eslint-disable-next-line object-shorthand
|
|
235
|
+
constructor: function(...aArgs) {
|
|
236
236
|
// call parent constructor
|
|
237
|
-
ManagedObject.apply(this,
|
|
237
|
+
ManagedObject.apply(this, aArgs);
|
|
238
238
|
|
|
239
239
|
this._dependents = {};
|
|
240
240
|
this._mServices = {};
|
|
@@ -318,7 +318,7 @@ sap.ui.define([
|
|
|
318
318
|
bCreateGetter = typeof bCreateGetter === "undefined" ? true : !!bCreateGetter;
|
|
319
319
|
if (!(sName in this._dependents)) {
|
|
320
320
|
if (sName && bCreateGetter) {
|
|
321
|
-
this[
|
|
321
|
+
this[`get${capitalize(sName, 0)}`] = this.getDependent.bind(this, sName);
|
|
322
322
|
}
|
|
323
323
|
this._dependents[sName || oObject.getId()] = oObject;
|
|
324
324
|
} else {
|
|
@@ -402,11 +402,16 @@ sap.ui.define([
|
|
|
402
402
|
mFlexSettings.layer = sUriLayer.toUpperCase();
|
|
403
403
|
}
|
|
404
404
|
|
|
405
|
-
// TODO: this will lead to incorrect information if this function is first called
|
|
405
|
+
// TODO: this will lead to incorrect information if this function is first called
|
|
406
|
+
// with scenario or baseId and then called again without.
|
|
406
407
|
if (mFlexSettings.scenario || mFlexSettings.baseId) {
|
|
407
|
-
var sLRepRootNamespace = FlexUtils.buildLrepRootNamespace(
|
|
408
|
+
var sLRepRootNamespace = FlexUtils.buildLrepRootNamespace(
|
|
409
|
+
mFlexSettings.baseId,
|
|
410
|
+
mFlexSettings.scenario,
|
|
411
|
+
mFlexSettings.projectId
|
|
412
|
+
);
|
|
408
413
|
mFlexSettings.rootNamespace = sLRepRootNamespace;
|
|
409
|
-
mFlexSettings.namespace = sLRepRootNamespace
|
|
414
|
+
mFlexSettings.namespace = `${sLRepRootNamespace}changes/`;
|
|
410
415
|
}
|
|
411
416
|
|
|
412
417
|
Utils.setRtaStyleClassName(mFlexSettings.layer);
|
|
@@ -414,7 +419,8 @@ sap.ui.define([
|
|
|
414
419
|
};
|
|
415
420
|
|
|
416
421
|
/**
|
|
417
|
-
* Checks the uri parameters for "sap-ui-layer" and returns either the current layer
|
|
422
|
+
* Checks the uri parameters for "sap-ui-layer" and returns either the current layer
|
|
423
|
+
* or the layer from the uri parameter, if there is one
|
|
418
424
|
*
|
|
419
425
|
* @returns {string} The layer after checking the uri parameters
|
|
420
426
|
* @private
|
|
@@ -424,9 +430,7 @@ sap.ui.define([
|
|
|
424
430
|
};
|
|
425
431
|
|
|
426
432
|
RuntimeAuthoring.prototype.getRootControlInstance = function() {
|
|
427
|
-
|
|
428
|
-
this._oRootControl = ElementUtil.getElementInstance(this.getRootControl());
|
|
429
|
-
}
|
|
433
|
+
this._oRootControl ||= ElementUtil.getElementInstance(this.getRootControl());
|
|
430
434
|
return this._oRootControl;
|
|
431
435
|
};
|
|
432
436
|
|
|
@@ -539,8 +543,14 @@ sap.ui.define([
|
|
|
539
543
|
.then(onStackModified.bind(this))
|
|
540
544
|
.then(function() {
|
|
541
545
|
// Resolve the CSS variable set in themes/base/OverlayWithScrollbar.css
|
|
542
|
-
Overlay.getOverlayContainer().get(0).style.setProperty(
|
|
543
|
-
|
|
546
|
+
Overlay.getOverlayContainer().get(0).style.setProperty(
|
|
547
|
+
"--sap-ui-rta-scrollbar-scrollWidth",
|
|
548
|
+
`${DOMUtil.getScrollbarWidth()}px`
|
|
549
|
+
);
|
|
550
|
+
Overlay.getOverlayContainer().get(0).style.setProperty(
|
|
551
|
+
"--sap-ui-rta-scrollbar-scrollWidthPlusTwo",
|
|
552
|
+
`${DOMUtil.getScrollbarWidth() + 2}px`
|
|
553
|
+
);
|
|
544
554
|
return oDesignTimePromise;
|
|
545
555
|
})
|
|
546
556
|
.then(function() {
|
|
@@ -792,7 +802,7 @@ sap.ui.define([
|
|
|
792
802
|
*
|
|
793
803
|
* @protected
|
|
794
804
|
*/
|
|
795
|
-
RuntimeAuthoring.prototype.destroy = function() {
|
|
805
|
+
RuntimeAuthoring.prototype.destroy = function(...aArgs) {
|
|
796
806
|
var aDependentKeys = Object.keys(this._dependents);
|
|
797
807
|
aDependentKeys.forEach(function(sDependentKey) {
|
|
798
808
|
// Destroy should be called with suppress invalidate = true here to prevent static UI Area invalidation
|
|
@@ -835,7 +845,7 @@ sap.ui.define([
|
|
|
835
845
|
|
|
836
846
|
window.onbeforeunload = this._oldUnloadHandler;
|
|
837
847
|
|
|
838
|
-
ManagedObject.prototype.destroy.apply(this,
|
|
848
|
+
ManagedObject.prototype.destroy.apply(this, aArgs);
|
|
839
849
|
};
|
|
840
850
|
|
|
841
851
|
// ---- API ----
|
|
@@ -934,9 +944,10 @@ sap.ui.define([
|
|
|
934
944
|
* @private
|
|
935
945
|
* @ui5-restricted Visual Editor
|
|
936
946
|
*/
|
|
937
|
-
RuntimeAuthoring.prototype.condenseAndSaveChanges = function(/* aChanges */) {
|
|
938
|
-
// for now there is no functionality to only consider passed changes during condensing,
|
|
939
|
-
|
|
947
|
+
RuntimeAuthoring.prototype.condenseAndSaveChanges = function(...aArgs/* aChanges */) {
|
|
948
|
+
// for now there is no functionality to only consider passed changes during condensing,
|
|
949
|
+
// so the standard save functionality is triggered
|
|
950
|
+
return this._serializeToLrep(...aArgs);
|
|
940
951
|
};
|
|
941
952
|
|
|
942
953
|
/**
|
|
@@ -1008,9 +1019,11 @@ sap.ui.define([
|
|
|
1008
1019
|
}
|
|
1009
1020
|
|
|
1010
1021
|
/**
|
|
1011
|
-
* Checks the publish button, draft buttons(activate and delete) and app variant support (i.e.
|
|
1012
|
-
*
|
|
1013
|
-
*
|
|
1022
|
+
* Checks the publish button, draft buttons(activate and delete) and app variant support (i.e.
|
|
1023
|
+
* Save As and Overview of App Variants) availability. The publish button shall not be available
|
|
1024
|
+
* if the system is productive and if a merge error occurred during merging changes into the view on startup
|
|
1025
|
+
* The app variant support shall not be available if the system is productive and if the platform is not enabled
|
|
1026
|
+
* (See Feature.js) to show the app variant tooling.
|
|
1014
1027
|
* The app variant support shall also not be available if the current app is a home page
|
|
1015
1028
|
* isProductiveSystem should only return true if it is a test or development system with the provision of custom catalog extensions
|
|
1016
1029
|
*
|
|
@@ -1052,8 +1065,8 @@ sap.ui.define([
|
|
|
1052
1065
|
var sErrorMessage = vError.userMessage || vError.stack || vError.message || vError.status || vError;
|
|
1053
1066
|
var oTextResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
|
|
1054
1067
|
Log.error("Failed to transfer changes", sErrorMessage);
|
|
1055
|
-
var sMsg = oTextResources.getText("MSG_LREP_TRANSFER_ERROR")
|
|
1056
|
-
|
|
1068
|
+
var sMsg = `${oTextResources.getText("MSG_LREP_TRANSFER_ERROR")}
|
|
1069
|
+
${oTextResources.getText("MSG_ERROR_REASON", sErrorMessage)}`;
|
|
1057
1070
|
MessageBox.error(sMsg, {
|
|
1058
1071
|
styleClass: Utils.getRtaStyleClassName()
|
|
1059
1072
|
});
|
|
@@ -1061,8 +1074,6 @@ sap.ui.define([
|
|
|
1061
1074
|
|
|
1062
1075
|
/**
|
|
1063
1076
|
* Adapt the enablement of undo/redo/reset button
|
|
1064
|
-
*
|
|
1065
|
-
* @returns {Promise} Resolves as soon as the MessageBox is closed
|
|
1066
1077
|
*/
|
|
1067
1078
|
function onStackModified() {
|
|
1068
1079
|
var oCommandStack = this.getCommandStack();
|
|
@@ -1108,7 +1119,10 @@ sap.ui.define([
|
|
|
1108
1119
|
this._oToolbarControlsModel.setProperty("/redo/enabled", bCanRedo);
|
|
1109
1120
|
this._oToolbarControlsModel.setProperty("/save/enabled", bCanSave);
|
|
1110
1121
|
this._oToolbarControlsModel.setProperty("/restore/enabled", this.bInitialResetEnabled || bCanSave || bWasSaved);
|
|
1111
|
-
this._oToolbarControlsModel.setProperty(
|
|
1122
|
+
this._oToolbarControlsModel.setProperty(
|
|
1123
|
+
"/translation/enabled",
|
|
1124
|
+
this.bPersistedDataTranslatable || bTranslationRelevantDirtyChange
|
|
1125
|
+
);
|
|
1112
1126
|
}
|
|
1113
1127
|
this.fireUndoRedoStackModified();
|
|
1114
1128
|
}
|
|
@@ -1202,9 +1216,7 @@ sap.ui.define([
|
|
|
1202
1216
|
var sVersion = bActivateVersion ? this._oVersionsModel.getProperty("/displayedVersion") : undefined;
|
|
1203
1217
|
|
|
1204
1218
|
// If a draft is being processed, saving without exiting must retrieve the updated state of the draft version
|
|
1205
|
-
|
|
1206
|
-
sVersion = bIsExit ? undefined : Version.Number.Draft;
|
|
1207
|
-
}
|
|
1219
|
+
sVersion ||= bIsExit ? undefined : Version.Number.Draft;
|
|
1208
1220
|
mPropertyBag.version = sVersion;
|
|
1209
1221
|
|
|
1210
1222
|
// Save changes on the current layer and discard dirty changes on other layers
|
|
@@ -1321,6 +1333,7 @@ sap.ui.define([
|
|
|
1321
1333
|
}
|
|
1322
1334
|
|
|
1323
1335
|
function deleteAdaptation() {
|
|
1336
|
+
Measurement.start("onCBADeleteAdaptation", "Measurement of deleting a context-based adaptation");
|
|
1324
1337
|
ContextBasedAdaptationsAPI.remove({
|
|
1325
1338
|
control: this.getRootControlInstance(),
|
|
1326
1339
|
layer: this.getLayer(),
|
|
@@ -1329,6 +1342,10 @@ sap.ui.define([
|
|
|
1329
1342
|
BusyIndicator.hide();
|
|
1330
1343
|
var sAdaptationId = this._oContextBasedAdaptationsModel.deleteAdaptation();
|
|
1331
1344
|
switchAdaptation.call(this, sAdaptationId);
|
|
1345
|
+
Measurement.end("onCBADeleteAdaptation");
|
|
1346
|
+
if (Measurement.getActive()) {
|
|
1347
|
+
Log.info(`onCBADeleteAdaptation: ${Measurement.getMeasurement("onCBADeleteAdaptation").time} ms`);
|
|
1348
|
+
}
|
|
1332
1349
|
}.bind(this)).catch(function(oError) {
|
|
1333
1350
|
BusyIndicator.hide();
|
|
1334
1351
|
Log.error(oError.stack);
|
|
@@ -1362,6 +1379,7 @@ sap.ui.define([
|
|
|
1362
1379
|
}
|
|
1363
1380
|
|
|
1364
1381
|
function onSwitchAdaptation(oEvent) {
|
|
1382
|
+
Measurement.start("onCBASwitchAdaptation", "Measurement of switching a context-based adaptation");
|
|
1365
1383
|
var fnCallback = oEvent.getParameter("callback") || function() {};
|
|
1366
1384
|
if (oEvent.getParameter("trigger") === "SaveAs") {
|
|
1367
1385
|
// remove all changes from command stack when triggered from saveAs dialog as they are already saved in a new adaptation
|
|
@@ -1371,10 +1389,16 @@ sap.ui.define([
|
|
|
1371
1389
|
this._sSwitchToAdaptationId = sAdaptationId;
|
|
1372
1390
|
return handleDataLoss.call(this, "MSG_SWITCH_VERSION_DIALOG", "BTN_SWITCH_ADAPTATIONS",
|
|
1373
1391
|
switchAdaptation.bind(this, this._sSwitchToAdaptationId))
|
|
1374
|
-
.then(
|
|
1392
|
+
.then(function() {
|
|
1393
|
+
fnCallback();
|
|
1394
|
+
Measurement.end("onCBASwitchAdaptation");
|
|
1395
|
+
if (Measurement.getActive()) {
|
|
1396
|
+
Log.info(`onCBASwitchAdaptation: ${Measurement.getMeasurement("onCBASwitchAdaptation").time} ms`);
|
|
1397
|
+
}
|
|
1398
|
+
})
|
|
1375
1399
|
.catch(function(oError) {
|
|
1376
1400
|
Utils.showMessageBox("error", "MSG_SWITCH_ADAPTATION_FAILED", {error: oError});
|
|
1377
|
-
Log.error(
|
|
1401
|
+
Log.error(`sap.ui.rta: ${oError.stack || oError.message || oError}`);
|
|
1378
1402
|
});
|
|
1379
1403
|
}
|
|
1380
1404
|
|
|
@@ -1399,7 +1423,7 @@ sap.ui.define([
|
|
|
1399
1423
|
.then(fnCallback)
|
|
1400
1424
|
.catch(function(oError) {
|
|
1401
1425
|
Utils.showMessageBox("error", "MSG_SWITCH_VERSION_FAILED", {error: oError});
|
|
1402
|
-
Log.error(
|
|
1426
|
+
Log.error(`sap.ui.rta: ${oError.stack || oError.message || oError}`);
|
|
1403
1427
|
});
|
|
1404
1428
|
}
|
|
1405
1429
|
|
|
@@ -1530,8 +1554,11 @@ sap.ui.define([
|
|
|
1530
1554
|
var oUriParameters = UriParameters.fromURL(window.location.href);
|
|
1531
1555
|
// the "Visualization" tab should not be visible if the "fiori-tools-rta-mode" URL-parameter is set to any value but "false"
|
|
1532
1556
|
var bVisualizationButtonVisible;
|
|
1533
|
-
bVisualizationButtonVisible = !oUriParameters.has("fiori-tools-rta-mode")
|
|
1534
|
-
|
|
1557
|
+
bVisualizationButtonVisible = !oUriParameters.has("fiori-tools-rta-mode")
|
|
1558
|
+
|| oUriParameters.get("fiori-tools-rta-mode") === "false";
|
|
1559
|
+
var bFeedbackButtonVisible = Core.getConfiguration().getFlexibilityServices().some(function(oFlexibilityService) {
|
|
1560
|
+
return oFlexibilityService.connector !== "LocalStorageConnector";
|
|
1561
|
+
});
|
|
1535
1562
|
this.bPersistedDataTranslatable = false;
|
|
1536
1563
|
|
|
1537
1564
|
this._oToolbarControlsModel = new JSONModel({
|
|
@@ -1628,8 +1655,9 @@ sap.ui.define([
|
|
|
1628
1655
|
|
|
1629
1656
|
/**
|
|
1630
1657
|
* Delete all changes for current layer and root control's component.
|
|
1631
|
-
* In case of Base Applications (no App Variants) the App Descriptor Changes and UI Changes are saved
|
|
1632
|
-
* the changes for both places will be deleted. For App Variants
|
|
1658
|
+
* In case of Base Applications (no App Variants) the App Descriptor Changes and UI Changes are saved
|
|
1659
|
+
* in different Flex Persistence instances, the changes for both places will be deleted. For App Variants
|
|
1660
|
+
* all the changes are saved in one place.
|
|
1633
1661
|
*
|
|
1634
1662
|
* @returns {Promise} Resolves when change persistence is reset
|
|
1635
1663
|
*/
|
|
@@ -1727,7 +1755,10 @@ sap.ui.define([
|
|
|
1727
1755
|
|
|
1728
1756
|
scheduleOnCreatedAndVisible.call(this, sNewControlID, function(oElementOverlay) {
|
|
1729
1757
|
// get container of the new control for rename
|
|
1730
|
-
var sNewContainerID = this.getPluginManager().getPlugin("createContainer").getCreatedContainerId(
|
|
1758
|
+
var sNewContainerID = this.getPluginManager().getPlugin("createContainer").getCreatedContainerId(
|
|
1759
|
+
vAction,
|
|
1760
|
+
oElementOverlay.getElement().getId()
|
|
1761
|
+
);
|
|
1731
1762
|
var oContainerElementOverlay = OverlayRegistry.getOverlay(sNewContainerID);
|
|
1732
1763
|
if (oContainerElementOverlay) {
|
|
1733
1764
|
if (sNewContainerName) {
|
|
@@ -1777,7 +1808,7 @@ sap.ui.define([
|
|
|
1777
1808
|
return this.getCommandStack().pushAndExecute(oCommand)
|
|
1778
1809
|
// Error handling when a command fails is done in the Stack
|
|
1779
1810
|
.catch(function(oError) {
|
|
1780
|
-
if (oError
|
|
1811
|
+
if (oError?.message?.indexOf?.("The following Change cannot be applied because of a dependency") > -1) {
|
|
1781
1812
|
Utils.showMessageBox("error", "MSG_DEPENDENCY_ERROR", {error: oError});
|
|
1782
1813
|
}
|
|
1783
1814
|
Log.error("sap.ui.rta:", oError.message, oError.stack);
|
|
@@ -1871,9 +1902,7 @@ sap.ui.define([
|
|
|
1871
1902
|
function(fnServiceFactory) {
|
|
1872
1903
|
mService.factory = fnServiceFactory;
|
|
1873
1904
|
|
|
1874
|
-
|
|
1875
|
-
this._oServiceEventBus = new ServiceEventBus();
|
|
1876
|
-
}
|
|
1905
|
+
this._oServiceEventBus ||= new ServiceEventBus();
|
|
1877
1906
|
|
|
1878
1907
|
DtUtil.wrapIntoPromise(fnServiceFactory)(
|
|
1879
1908
|
this,
|
|
@@ -1890,7 +1919,11 @@ sap.ui.define([
|
|
|
1890
1919
|
if (!isPlainObject(oService)) {
|
|
1891
1920
|
throw DtUtil.createError(
|
|
1892
1921
|
"RuntimeAuthoring#startService",
|
|
1893
|
-
DtUtil.printf(
|
|
1922
|
+
DtUtil.printf(
|
|
1923
|
+
"Invalid service format. "
|
|
1924
|
+
+ "Service should return simple javascript object after initialization. Service name = '{0}'",
|
|
1925
|
+
sName
|
|
1926
|
+
),
|
|
1894
1927
|
"sap.ui.rta"
|
|
1895
1928
|
);
|
|
1896
1929
|
}
|
package/src/sap/ui/rta/Utils.js
CHANGED
|
@@ -47,13 +47,11 @@ function(
|
|
|
47
47
|
*
|
|
48
48
|
* @namespace
|
|
49
49
|
* @author SAP SE
|
|
50
|
-
* @version 1.
|
|
50
|
+
* @version 1.118.0
|
|
51
51
|
*
|
|
52
52
|
* @private
|
|
53
53
|
* @since 1.30
|
|
54
54
|
* @alias sap.ui.rta.Utils
|
|
55
|
-
* @experimental Since 1.30. This class is experimental and provides only limited functionality.
|
|
56
|
-
* API of this class might be changed in the future.
|
|
57
55
|
*/
|
|
58
56
|
|
|
59
57
|
var Utils = {};
|
|
@@ -146,11 +144,11 @@ function(
|
|
|
146
144
|
|
|
147
145
|
// create a controller for the action in the Dialog
|
|
148
146
|
var oFragmentController = {
|
|
149
|
-
removeField
|
|
147
|
+
removeField() {
|
|
150
148
|
fnCleanUp();
|
|
151
149
|
resolve(true);
|
|
152
150
|
},
|
|
153
|
-
closeDialog
|
|
151
|
+
closeDialog() {
|
|
154
152
|
fnCleanUp();
|
|
155
153
|
resolve(false);
|
|
156
154
|
}
|
|
@@ -287,9 +285,7 @@ function(
|
|
|
287
285
|
while (oNextFocusableSiblingOverlay && !this.isOverlaySelectable(oNextFocusableSiblingOverlay)) {
|
|
288
286
|
oNextFocusableSiblingOverlay = OverlayUtil.getNextSiblingOverlay(oNextFocusableSiblingOverlay);
|
|
289
287
|
}
|
|
290
|
-
|
|
291
|
-
oNextFocusableSiblingOverlay = this._findSiblingOverlay(oOverlay, NEXT);
|
|
292
|
-
}
|
|
288
|
+
oNextFocusableSiblingOverlay ||= this._findSiblingOverlay(oOverlay, NEXT);
|
|
293
289
|
return oNextFocusableSiblingOverlay;
|
|
294
290
|
};
|
|
295
291
|
|
|
@@ -308,9 +304,7 @@ function(
|
|
|
308
304
|
oPreviousFocusableSiblingOverlay = OverlayUtil
|
|
309
305
|
.getPreviousSiblingOverlay(oPreviousFocusableSiblingOverlay);
|
|
310
306
|
}
|
|
311
|
-
|
|
312
|
-
oPreviousFocusableSiblingOverlay = this._findSiblingOverlay(oOverlay, PREVIOUS);
|
|
313
|
-
}
|
|
307
|
+
oPreviousFocusableSiblingOverlay ||= this._findSiblingOverlay(oOverlay, PREVIOUS);
|
|
314
308
|
return oPreviousFocusableSiblingOverlay;
|
|
315
309
|
};
|
|
316
310
|
|
|
@@ -379,7 +373,7 @@ function(
|
|
|
379
373
|
* @private
|
|
380
374
|
*/
|
|
381
375
|
Utils.createFieldLabelId = function(oParentControl, sEntityType, sBindingPath) {
|
|
382
|
-
return (oParentControl.getId()
|
|
376
|
+
return (`${oParentControl.getId()}_${sEntityType}_${sBindingPath}`).replace("/", "_");
|
|
383
377
|
};
|
|
384
378
|
|
|
385
379
|
/**
|
|
@@ -491,7 +485,7 @@ function(
|
|
|
491
485
|
Utils.showMessageBox = function(sMessageType, sMessageKey, mPropertyBag) {
|
|
492
486
|
return Core.getLibraryResourceBundle("sap.ui.rta", true)
|
|
493
487
|
.then(function(oResourceBundle) {
|
|
494
|
-
mPropertyBag
|
|
488
|
+
mPropertyBag ||= {};
|
|
495
489
|
var sMessage = oResourceBundle.getText(sMessageKey, mPropertyBag.error ? [mPropertyBag.error.userMessage || mPropertyBag.error.message || mPropertyBag.error] : undefined);
|
|
496
490
|
var sTitle = mPropertyBag.titleKey && oResourceBundle.getText(mPropertyBag.titleKey);
|
|
497
491
|
var vActionTexts =
|
|
@@ -505,7 +499,7 @@ function(
|
|
|
505
499
|
var mOptions = _omit(mPropertyBag, ["titleKey", "error", "actionKeys", "emphasizedAction", "emphasizedActionKey", "showCancel"]);
|
|
506
500
|
mOptions.title = sTitle;
|
|
507
501
|
mOptions.styleClass = Utils.getRtaStyleClassName();
|
|
508
|
-
mOptions.actions
|
|
502
|
+
mOptions.actions ||= vActionTexts;
|
|
509
503
|
mOptions.emphasizedAction = sEmphasizedAction || mPropertyBag.emphasizedAction;
|
|
510
504
|
if (bShowCancel) {
|
|
511
505
|
mOptions.actions.push(MessageBox.Action.CANCEL);
|
|
@@ -531,7 +525,7 @@ function(
|
|
|
531
525
|
* @returns{boolean} <code>true</code> when the controls have compatible bindings.
|
|
532
526
|
*/
|
|
533
527
|
Utils.checkSourceTargetBindingCompatibility = function(oSource, oTarget, oModel) {
|
|
534
|
-
oModel
|
|
528
|
+
oModel ||= oSource.getModel();
|
|
535
529
|
var mSourceBindings = BindingsExtractor.collectBindingPaths(oSource, oModel);
|
|
536
530
|
var sSourceContextBindingPath;
|
|
537
531
|
var sTargetContextBindingPath;
|
|
@@ -620,7 +614,7 @@ function(
|
|
|
620
614
|
|
|
621
615
|
// determine target relevantContainer
|
|
622
616
|
var vTargetRelevantContainerAfterMove = MetadataPropagationUtil.getRelevantContainerForPropagation(oAggregationDtMetadata.getData(), oMovedElement);
|
|
623
|
-
vTargetRelevantContainerAfterMove
|
|
617
|
+
vTargetRelevantContainerAfterMove ||= oTargetElement;
|
|
624
618
|
|
|
625
619
|
// check for same relevantContainer
|
|
626
620
|
if (
|
|
@@ -27,7 +27,6 @@ sap.ui.define([
|
|
|
27
27
|
* With this API you are also able to modify the UI adaptation plugins list and or add some event handler functions to be called on start, failed and stop events.
|
|
28
28
|
*
|
|
29
29
|
* @function
|
|
30
|
-
* @experimental since 1.83
|
|
31
30
|
* @since 1.83
|
|
32
31
|
* @alias module:sap/ui/rta/api/startAdaptation
|
|
33
32
|
*
|