@openui5/sap.ui.rta 1.144.0 → 1.145.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 +7 -1
- package/REUSE.toml +40 -16
- package/THIRDPARTY.txt +21 -0
- 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 +8 -6
- package/src/sap/ui/rta/Utils.js +4 -2
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +2 -2
- package/src/sap/ui/rta/appVariant/Feature.js +6 -4
- package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +6 -3
- package/src/sap/ui/rta/appVariant/Utils.js +2 -2
- 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/AnnotationCommand.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 +1 -1
- package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +2 -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/ExtendControllerCommand.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/ManifestCommand.js +1 -1
- package/src/sap/ui/rta/command/Move.js +1 -1
- package/src/sap/ui/rta/command/Property.js +1 -1
- package/src/sap/ui/rta/command/Remove.js +1 -1
- package/src/sap/ui/rta/command/Rename.js +1 -1
- package/src/sap/ui/rta/command/Resize.js +1 -1
- package/src/sap/ui/rta/command/Reveal.js +1 -1
- package/src/sap/ui/rta/command/Settings.js +1 -1
- package/src/sap/ui/rta/command/Split.js +1 -1
- package/src/sap/ui/rta/command/Stack.js +1 -1
- package/src/sap/ui/rta/command/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/command/manifest/AddLibrary.js +1 -1
- package/src/sap/ui/rta/enablement/elementActionTest.js +90 -94
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +1 -1
- package/src/sap/ui/rta/messagebundle_ar.properties +1 -1
- package/src/sap/ui/rta/messagebundle_bg.properties +1 -1
- package/src/sap/ui/rta/messagebundle_ca.properties +1 -1
- package/src/sap/ui/rta/messagebundle_cnr.properties +1 -1
- package/src/sap/ui/rta/messagebundle_cs.properties +1 -1
- package/src/sap/ui/rta/messagebundle_cy.properties +1 -1
- package/src/sap/ui/rta/messagebundle_da.properties +1 -1
- package/src/sap/ui/rta/messagebundle_de.properties +1 -1
- package/src/sap/ui/rta/messagebundle_el.properties +1 -1
- package/src/sap/ui/rta/messagebundle_en.properties +1 -1
- package/src/sap/ui/rta/messagebundle_en_GB.properties +1 -1
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +3 -3
- package/src/sap/ui/rta/messagebundle_es.properties +1 -1
- package/src/sap/ui/rta/messagebundle_es_MX.properties +1 -1
- package/src/sap/ui/rta/messagebundle_et.properties +1 -1
- package/src/sap/ui/rta/messagebundle_fi.properties +1 -1
- package/src/sap/ui/rta/messagebundle_fr.properties +1 -1
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +2 -2
- package/src/sap/ui/rta/messagebundle_hi.properties +1 -1
- package/src/sap/ui/rta/messagebundle_hr.properties +1 -1
- package/src/sap/ui/rta/messagebundle_hu.properties +1 -1
- package/src/sap/ui/rta/messagebundle_id.properties +1 -1
- package/src/sap/ui/rta/messagebundle_it.properties +1 -1
- package/src/sap/ui/rta/messagebundle_iw.properties +1 -1
- package/src/sap/ui/rta/messagebundle_ja.properties +1 -1
- package/src/sap/ui/rta/messagebundle_kk.properties +1 -1
- package/src/sap/ui/rta/messagebundle_ko.properties +1 -1
- package/src/sap/ui/rta/messagebundle_lt.properties +1 -1
- package/src/sap/ui/rta/messagebundle_lv.properties +1 -1
- package/src/sap/ui/rta/messagebundle_mk.properties +1 -1
- package/src/sap/ui/rta/messagebundle_ms.properties +1 -1
- package/src/sap/ui/rta/messagebundle_nl.properties +1 -1
- package/src/sap/ui/rta/messagebundle_no.properties +1 -1
- package/src/sap/ui/rta/messagebundle_pl.properties +1 -1
- package/src/sap/ui/rta/messagebundle_pt.properties +1 -1
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +1 -1
- package/src/sap/ui/rta/messagebundle_ro.properties +1 -1
- package/src/sap/ui/rta/messagebundle_ru.properties +1 -1
- package/src/sap/ui/rta/messagebundle_sh.properties +1 -1
- package/src/sap/ui/rta/messagebundle_sk.properties +1 -1
- package/src/sap/ui/rta/messagebundle_sl.properties +1 -1
- package/src/sap/ui/rta/messagebundle_sr.properties +1 -1
- package/src/sap/ui/rta/messagebundle_sv.properties +1 -1
- package/src/sap/ui/rta/messagebundle_th.properties +1 -1
- package/src/sap/ui/rta/messagebundle_tr.properties +1 -1
- package/src/sap/ui/rta/messagebundle_uk.properties +1 -1
- package/src/sap/ui/rta/messagebundle_vi.properties +1 -1
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +1 -1
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +1 -1
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +4 -4
- package/src/sap/ui/rta/plugin/AddXMLPlugin.js +1 -1
- package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
- package/src/sap/ui/rta/plugin/Combine.js +1 -1
- package/src/sap/ui/rta/plugin/ControlVariant.js +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/ExtendControllerPlugin.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 +13 -11
- package/src/sap/ui/rta/plugin/Resize.js +1 -1
- package/src/sap/ui/rta/plugin/Selection.js +1 -1
- package/src/sap/ui/rta/plugin/Settings.js +1 -1
- package/src/sap/ui/rta/plugin/Split.js +1 -1
- package/src/sap/ui/rta/plugin/Stretch.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.fragment.xml +3 -20
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +278 -26
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +40 -11
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +4 -3
- 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/annotations/AnnotationChangeDialog.fragment.xml +1 -1
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +29 -4
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +11 -17
- package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +8 -6
- package/src/sap/ui/rta/plugin/annotations/DocumentedAnnotationChanges.js +14 -0
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +14 -12
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +4 -4
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +8 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +31 -19
- package/src/sap/ui/rta/plugin/rename/Rename.js +1 -1
- package/src/sap/ui/rta/plugin/rename/RenameDialog.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 +14 -6
- 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 +6 -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 +1 -1
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +13 -11
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +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/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/ServiceManager.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/resolveBinding.js +1 -1
- package/src/sap/ui/rta/util/guidedTour/GuidedTour.js +1 -1
- package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +1 -1
|
@@ -15,8 +15,7 @@ sap.ui.define([
|
|
|
15
15
|
"sap/ui/layout/form/FormElement",
|
|
16
16
|
"sap/ui/model/Filter",
|
|
17
17
|
"sap/ui/model/FilterOperator",
|
|
18
|
-
"sap/ui/rta/plugin/annotations/AnnotationTypes"
|
|
19
|
-
"sap/ui/rta/Utils"
|
|
18
|
+
"sap/ui/rta/plugin/annotations/AnnotationTypes"
|
|
20
19
|
], function(
|
|
21
20
|
Input,
|
|
22
21
|
Label,
|
|
@@ -28,8 +27,7 @@ sap.ui.define([
|
|
|
28
27
|
FormElement,
|
|
29
28
|
Filter,
|
|
30
29
|
FilterOperator,
|
|
31
|
-
AnnotationTypes
|
|
32
|
-
RtaUtils
|
|
30
|
+
AnnotationTypes
|
|
33
31
|
) {
|
|
34
32
|
"use strict";
|
|
35
33
|
|
|
@@ -37,7 +35,7 @@ sap.ui.define([
|
|
|
37
35
|
* @class Controller for the AnnotationChangeDialog.
|
|
38
36
|
* @extends sap.ui.core.mvc.Controller
|
|
39
37
|
* @author SAP SE
|
|
40
|
-
* @version 1.
|
|
38
|
+
* @version 1.145.0
|
|
41
39
|
* @constructor
|
|
42
40
|
* @since 1.132
|
|
43
41
|
* @private
|
|
@@ -51,21 +49,17 @@ sap.ui.define([
|
|
|
51
49
|
});
|
|
52
50
|
};
|
|
53
51
|
|
|
54
|
-
AnnotationChangeDialogController.prototype.formatDocumentationUrl = function() {
|
|
55
|
-
const oDocumentationUrls = {
|
|
56
|
-
btpUrl: "https://help.sap.com/docs/ui5-flexibility-for-key-users/ui5-flexibility-for-key-users/making-ui-changes",
|
|
57
|
-
s4HanaCloudUrl: "https://help.sap.com/docs/SAP_S4HANA_CLOUD/4fc8d03390c342da8a60f8ee387bca1a/54270a390b194c3e97be2424592c3352.html",
|
|
58
|
-
s4HanaOnPremUrl: "https://help.sap.com/docs/ABAP_PLATFORM_NEW/a7b390faab1140c087b8926571e942b7/54270a390b194c3e97be2424592c3352.html"
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
return RtaUtils.getSystemSpecificDocumentationUrl(oDocumentationUrls);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
52
|
AnnotationChangeDialogController.prototype.filterProperties = function(sQuery, bEquals) {
|
|
65
53
|
const aFilters = [];
|
|
66
54
|
if (sQuery && sQuery.length > 0) {
|
|
67
|
-
const
|
|
68
|
-
|
|
55
|
+
const sOperator = bEquals ? FilterOperator.EQ : FilterOperator.Contains;
|
|
56
|
+
const oLabelFilter = new Filter("label", sOperator, sQuery);
|
|
57
|
+
const oValueFilter = new Filter("currentValue", sOperator, sQuery);
|
|
58
|
+
const oCombinedFilter = new Filter({
|
|
59
|
+
filters: [oLabelFilter, oValueFilter],
|
|
60
|
+
and: false
|
|
61
|
+
});
|
|
62
|
+
aFilters.push(oCombinedFilter);
|
|
69
63
|
}
|
|
70
64
|
|
|
71
65
|
const oList = Element.getElementById("sapUiRtaChangeAnnotationDialog_propertyList");
|
|
@@ -105,7 +105,7 @@ sap.ui.define([
|
|
|
105
105
|
* @class
|
|
106
106
|
* @extends sap.ui.rta.plugin.Plugin
|
|
107
107
|
* @author SAP SE
|
|
108
|
-
* @version 1.
|
|
108
|
+
* @version 1.145.0
|
|
109
109
|
* @constructor
|
|
110
110
|
* @private
|
|
111
111
|
* @since 1.132
|
|
@@ -130,7 +130,7 @@ sap.ui.define([
|
|
|
130
130
|
|
|
131
131
|
/**
|
|
132
132
|
* @param {sap.ui.dt.ElementOverlay} oElementOverlay - Overlay to be checked for editable
|
|
133
|
-
* @returns {boolean}
|
|
133
|
+
* @returns {boolean} <code>true</code> if it's editable
|
|
134
134
|
* @private
|
|
135
135
|
*/
|
|
136
136
|
AnnotationPlugin.prototype._isEditable = function(oElementOverlay) {
|
|
@@ -159,7 +159,7 @@ sap.ui.define([
|
|
|
159
159
|
* @public
|
|
160
160
|
*/
|
|
161
161
|
AnnotationPlugin.prototype.isEnabled = function(aElementOverlays) {
|
|
162
|
-
if (aElementOverlays.length !== 1) {
|
|
162
|
+
if (!this.isAvailable(aElementOverlays) || aElementOverlays.length !== 1) {
|
|
163
163
|
return false;
|
|
164
164
|
}
|
|
165
165
|
|
|
@@ -186,9 +186,10 @@ sap.ui.define([
|
|
|
186
186
|
*
|
|
187
187
|
* @param {sap.ui.dt.ElementOverlay[]} aElementOverlays - Target Overlays of the action
|
|
188
188
|
* @param {object} oAction - The action object defined in the designtime
|
|
189
|
+
* @param {string} sKey - Key of the action, used to display the specific documentation link
|
|
189
190
|
* @return {Promise} Resolves with the creation of the commands
|
|
190
191
|
*/
|
|
191
|
-
AnnotationPlugin.prototype.handler = async function(aElementOverlays, oAction) {
|
|
192
|
+
AnnotationPlugin.prototype.handler = async function(aElementOverlays, oAction, sKey) {
|
|
192
193
|
const oElementOverlay = aElementOverlays[0];
|
|
193
194
|
const oElement = oElementOverlay.getElement();
|
|
194
195
|
|
|
@@ -201,7 +202,8 @@ sap.ui.define([
|
|
|
201
202
|
annotation: oAction.annotation,
|
|
202
203
|
description: oAction.description,
|
|
203
204
|
singleRename: oAction.singleRename,
|
|
204
|
-
controlBasedRenameChangeType: oAction.controlBasedRenameChangeType
|
|
205
|
+
controlBasedRenameChangeType: oAction.controlBasedRenameChangeType,
|
|
206
|
+
featureKey: sKey
|
|
205
207
|
});
|
|
206
208
|
|
|
207
209
|
if (aAnnotationChanges.length) {
|
|
@@ -272,7 +274,7 @@ sap.ui.define([
|
|
|
272
274
|
typeof oAction.isEnabled === "function" && oAction.isEnabled(aElementOverlays[0].getElement())
|
|
273
275
|
|| (oAction.isEnabled !== false) && this.isEnabled(aElementOverlays)
|
|
274
276
|
),
|
|
275
|
-
handler: this.handler.bind(this, aElementOverlays, oAction),
|
|
277
|
+
handler: this.handler.bind(this, aElementOverlays, oAction, sKey),
|
|
276
278
|
additionalInfo: this._getAdditionalInfo(oResponsibleElementOverlay, oAction)
|
|
277
279
|
});
|
|
278
280
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
/*!
|
|
3
|
+
* OpenUI5
|
|
4
|
+
* (c) Copyright 2026 SAP SE or an SAP affiliate company.
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
6
|
+
*/
|
|
7
|
+
sap.ui.define([], function() {
|
|
8
|
+
"use strict";
|
|
9
|
+
|
|
10
|
+
return {
|
|
11
|
+
Rename: "rename",
|
|
12
|
+
TextArrangement: "textArrangement"
|
|
13
|
+
};
|
|
14
|
+
});
|
|
@@ -5,21 +5,23 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/ui/core/Lib",
|
|
9
|
-
"sap/ui/rta/plugin/BaseCreate",
|
|
10
|
-
"sap/ui/fl/Utils",
|
|
11
|
-
"sap/ui/dt/Util",
|
|
12
8
|
"sap/base/util/uid",
|
|
13
9
|
"sap/ui/core/IconPool",
|
|
14
|
-
"sap/ui/
|
|
10
|
+
"sap/ui/core/Lib",
|
|
11
|
+
"sap/ui/dt/Util",
|
|
12
|
+
"sap/ui/fl/util/CancelError",
|
|
13
|
+
"sap/ui/fl/Utils",
|
|
14
|
+
"sap/ui/rta/plugin/iframe/AddIFrameDialog",
|
|
15
|
+
"sap/ui/rta/plugin/BaseCreate"
|
|
15
16
|
], function(
|
|
16
|
-
Lib,
|
|
17
|
-
BaseCreate,
|
|
18
|
-
FlexUtils,
|
|
19
|
-
DtUtil,
|
|
20
17
|
uid,
|
|
21
18
|
IconPool,
|
|
22
|
-
|
|
19
|
+
Lib,
|
|
20
|
+
DtUtil,
|
|
21
|
+
CancelError,
|
|
22
|
+
FlexUtils,
|
|
23
|
+
AddIFrameDialog,
|
|
24
|
+
BaseCreate
|
|
23
25
|
) {
|
|
24
26
|
"use strict";
|
|
25
27
|
|
|
@@ -89,7 +91,7 @@ sap.ui.define([
|
|
|
89
91
|
})
|
|
90
92
|
.then(function(mSettings) {
|
|
91
93
|
if (!mSettings) {
|
|
92
|
-
|
|
94
|
+
throw new CancelError();
|
|
93
95
|
}
|
|
94
96
|
mSettings.index = iIndex;
|
|
95
97
|
mSettings.aggregation = oAction.aggregation;
|
|
@@ -119,7 +121,7 @@ sap.ui.define([
|
|
|
119
121
|
* @class The AddIFrame allows trigger AddIFrame operations on the overlay.
|
|
120
122
|
* @extends sap.ui.rta.plugin.BaseCreate
|
|
121
123
|
* @author SAP SE
|
|
122
|
-
* @version 1.
|
|
124
|
+
* @version 1.145.0
|
|
123
125
|
* @constructor
|
|
124
126
|
* @private
|
|
125
127
|
* @since 1.75
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
id="sapUiRtaAddIFrameDialog_PreviewButton"
|
|
194
194
|
class="sapUiRtaAddIFrameDialogPreviewButton"
|
|
195
195
|
press="onPreviewPress"
|
|
196
|
-
enabled="{= !${dialogInfo>/frameUrlError/value} && (${dialogInfo>/previousFrameUrl/value} !== ${dialogInfo>/frameUrl/value} || ${dialogInfo>/settingsUpdate/value})}"
|
|
196
|
+
enabled="{= !${dialogInfo>/frameUrlError/value} && ${dialogInfo>/frameUrl/value} !== '' && (${dialogInfo>/previousFrameUrl/value} !== ${dialogInfo>/frameUrl/value} || ${dialogInfo>/settingsUpdate/value})}"
|
|
197
197
|
icon="{=${dialogInfo>/previousFrameUrl/value} ? 'sap-icon://refresh' : null }"
|
|
198
198
|
type="{= !${dialogInfo>/frameUrlError/value} && (${dialogInfo>/previousFrameUrl/value} !== ${dialogInfo>/frameUrl/value} || ${dialogInfo>/settingsUpdate/value}) ? 'Emphasized' : 'Default' }"
|
|
199
199
|
/>
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
adjustLabelSpan="false"
|
|
259
259
|
singleContainerFullSize="false"
|
|
260
260
|
ariaLabelledBy="sapUiRtaAddIFrameDialog_WidthLabel"
|
|
261
|
-
columnsXL="2" columnsL="2" columnsM="2"
|
|
261
|
+
columnsXL="2" columnsL="2" columnsM="2"
|
|
262
262
|
labelSpanXL="2" labelSpanL="2" labelSpanM="2" labelSpanS="4"
|
|
263
263
|
emptySpanXL="2" emptySpanL="2" emptySpanM="2" emptySpanS="0"
|
|
264
264
|
>
|
|
@@ -301,7 +301,7 @@
|
|
|
301
301
|
adjustLabelSpan="false"
|
|
302
302
|
singleContainerFullSize="false"
|
|
303
303
|
ariaLabelledBy="sapUiRtaAddIFrameDialog_HeightLabel"
|
|
304
|
-
columnsXL="2" columnsL="2" columnsM="2"
|
|
304
|
+
columnsXL="2" columnsL="2" columnsM="2"
|
|
305
305
|
labelSpanXL="2" labelSpanL="2" labelSpanM="2" labelSpanS="4"
|
|
306
306
|
emptySpanXL="2" emptySpanL="2" emptySpanM="2" emptySpanS="0"
|
|
307
307
|
>
|
|
@@ -480,7 +480,7 @@
|
|
|
480
480
|
type="Emphasized"
|
|
481
481
|
text="{i18n>IFRAME_ADDIFRAME_DIALOG_BUTTON_SAVE}"
|
|
482
482
|
press="onSavePress"
|
|
483
|
-
enabled="{= !!${dialogInfo>/areAllFieldsValid}}"
|
|
483
|
+
enabled="{= !!${dialogInfo>/areAllFieldsValid} }"
|
|
484
484
|
/>
|
|
485
485
|
</beginButton>
|
|
486
486
|
<endButton>
|
|
@@ -76,16 +76,23 @@ sap.ui.define([
|
|
|
76
76
|
frameHeightUnit: {
|
|
77
77
|
value: "vh"
|
|
78
78
|
},
|
|
79
|
+
// The URL entered by the user (without resolving bindings)
|
|
79
80
|
frameUrl: {
|
|
80
81
|
value: "",
|
|
81
82
|
valueState: ValueState.None
|
|
82
83
|
},
|
|
84
|
+
// URL value when the dialog was opened (without resolving bindings), to detect changes for update
|
|
85
|
+
initialFrameUrl: {
|
|
86
|
+
value: ""
|
|
87
|
+
},
|
|
88
|
+
// URL value when the last preview was generated (with resolved bindings), to control the preview button state
|
|
83
89
|
previousFrameUrl: {
|
|
84
90
|
value: ""
|
|
85
91
|
},
|
|
86
92
|
frameUrlError: {
|
|
87
93
|
value: undefined
|
|
88
94
|
},
|
|
95
|
+
// URL used for the iframe preview (with resolved bindings)
|
|
89
96
|
previewUrl: { value: "" },
|
|
90
97
|
parameters: { value: [] },
|
|
91
98
|
unitsOfWidthMeasure: [{
|
|
@@ -132,7 +139,7 @@ sap.ui.define([
|
|
|
132
139
|
* @class Context - Dialog for IFrame settings in Runtime Authoring
|
|
133
140
|
* @extends sap.ui.base.ManagedObject
|
|
134
141
|
* @author SAP SE
|
|
135
|
-
* @version 1.
|
|
142
|
+
* @version 1.145.0
|
|
136
143
|
* @constructor
|
|
137
144
|
* @private
|
|
138
145
|
* @since 1.78
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
|
+
"sap/base/util/Deferred",
|
|
7
8
|
"sap/base/Log",
|
|
8
9
|
"sap/m/Token",
|
|
9
|
-
"sap/ui/base/BindingParser",
|
|
10
10
|
"sap/ui/core/mvc/Controller",
|
|
11
11
|
"sap/ui/core/Element",
|
|
12
12
|
"sap/ui/core/Lib",
|
|
@@ -17,9 +17,9 @@ sap.ui.define([
|
|
|
17
17
|
"sap/ui/rta/plugin/iframe/urlCleaner",
|
|
18
18
|
"sap/ui/rta/util/validateText"
|
|
19
19
|
], function(
|
|
20
|
+
Deferred,
|
|
20
21
|
Log,
|
|
21
22
|
Token,
|
|
22
|
-
BindingParser,
|
|
23
23
|
Controller,
|
|
24
24
|
Element,
|
|
25
25
|
Lib,
|
|
@@ -74,13 +74,7 @@ sap.ui.define([
|
|
|
74
74
|
},
|
|
75
75
|
|
|
76
76
|
onBeforeOpen() {
|
|
77
|
-
|
|
78
|
-
// If a URL is set initially (updateIframe), validate it
|
|
79
|
-
this.onValidateUrl();
|
|
80
|
-
} else {
|
|
81
|
-
// Disable the save button but don't show an error message
|
|
82
|
-
this._checkIfAllFieldsValid(false);
|
|
83
|
-
}
|
|
77
|
+
this._oJSONModel.setProperty("/initialFrameUrl/value", this._oJSONModel.getProperty("/frameUrl/value"));
|
|
84
78
|
// Configure the MultiInput field
|
|
85
79
|
// This syntax is the suggested way by the UI5 documentation to trigger a submit on the input field on focus loss
|
|
86
80
|
const oMultiInput = Element.getElementById("sapUiRtaAddIFrameDialog_AddAdditionalParametersInput");
|
|
@@ -88,6 +82,7 @@ sap.ui.define([
|
|
|
88
82
|
},
|
|
89
83
|
|
|
90
84
|
onSwitchChange() {
|
|
85
|
+
this._checkIfAllFieldsValid(true);
|
|
91
86
|
this._oJSONModel.setProperty("/settingsUpdate/value", true);
|
|
92
87
|
},
|
|
93
88
|
|
|
@@ -112,6 +107,7 @@ sap.ui.define([
|
|
|
112
107
|
|
|
113
108
|
this._oJSONModel.setProperty("/advancedSettings/value/additionalSandboxParameters", aSandboxParameters);
|
|
114
109
|
this._oJSONModel.setProperty("/settingsUpdate/value", true);
|
|
110
|
+
this._checkIfAllFieldsValid(true);
|
|
115
111
|
},
|
|
116
112
|
|
|
117
113
|
/**
|
|
@@ -136,8 +132,8 @@ sap.ui.define([
|
|
|
136
132
|
/**
|
|
137
133
|
* Event handler for save button
|
|
138
134
|
*/
|
|
139
|
-
onSavePress() {
|
|
140
|
-
const sUrl = this._buildPreviewURL();
|
|
135
|
+
async onSavePress() {
|
|
136
|
+
const sUrl = await this._buildPreviewURL();
|
|
141
137
|
if (isValidUrl(sUrl).result && this._areAllTextFieldsValid() && this._areAllValueStateNones()) {
|
|
142
138
|
this._close(this._buildReturnedSettings());
|
|
143
139
|
} else {
|
|
@@ -148,9 +144,9 @@ sap.ui.define([
|
|
|
148
144
|
/**
|
|
149
145
|
* Event handler for Show Preview button
|
|
150
146
|
*/
|
|
151
|
-
onPreviewPress() {
|
|
147
|
+
async onPreviewPress() {
|
|
152
148
|
const sReturnedURL = this._buildReturnedURL();
|
|
153
|
-
const sURL = this._buildPreviewURL();
|
|
149
|
+
const sURL = await this._buildPreviewURL();
|
|
154
150
|
|
|
155
151
|
if (!isValidUrl(sURL).result) {
|
|
156
152
|
return;
|
|
@@ -212,6 +208,7 @@ sap.ui.define([
|
|
|
212
208
|
// Extract "/frameWidth" or "/frameHeight" from the binding path (e.g. /frameWidth/value)
|
|
213
209
|
const sPropertyName = sPropertyPath.replace(/\/value$/, "");
|
|
214
210
|
setNewPreviewSize.call(this, sPropertyName);
|
|
211
|
+
this._checkIfAllFieldsValid(true);
|
|
215
212
|
},
|
|
216
213
|
|
|
217
214
|
/**
|
|
@@ -226,6 +223,7 @@ sap.ui.define([
|
|
|
226
223
|
// Extract "/frameWidth" or "/frameHeight" from the binding path (e.g. /frameWidthUnit/value)
|
|
227
224
|
const sPropertyName = sPropertyPath.replace(/Unit\/value$/, "");
|
|
228
225
|
setNewPreviewSize.call(this, sPropertyName);
|
|
226
|
+
this._checkIfAllFieldsValid(true);
|
|
229
227
|
},
|
|
230
228
|
|
|
231
229
|
/**
|
|
@@ -234,6 +232,7 @@ sap.ui.define([
|
|
|
234
232
|
* @private
|
|
235
233
|
*/
|
|
236
234
|
_buildPreviewURL() {
|
|
235
|
+
const oValidationPromise = new Deferred();
|
|
237
236
|
const sUrl = this._buildReturnedURL();
|
|
238
237
|
const oResolver = Element.getElementById("sapUiRtaAddIFrameDialog_PreviewLinkResolver");
|
|
239
238
|
try {
|
|
@@ -243,17 +242,24 @@ sap.ui.define([
|
|
|
243
242
|
// value is a plain string, which can then lead to problems with two-way bindings
|
|
244
243
|
// where the new plain value would leak back into the model
|
|
245
244
|
// In this case the old binding has to be cleaned up explicitly
|
|
246
|
-
|
|
247
|
-
oResolver.unbindProperty("text");
|
|
248
|
-
}
|
|
245
|
+
oResolver.unbindProperty("text");
|
|
249
246
|
|
|
250
247
|
oResolver.applySettings({
|
|
251
248
|
text: sUrl
|
|
252
249
|
});
|
|
250
|
+
const oBinding = oResolver.getBinding("text");
|
|
251
|
+
if (oBinding?.isA("sap.ui.model.odata.v4.ODataPropertyBinding")) {
|
|
252
|
+
// V4 bindings are asynchronous, so we need to wait for the change event
|
|
253
|
+
oBinding.attachEventOnce("change", () => {
|
|
254
|
+
oValidationPromise.resolve(oResolver.getText());
|
|
255
|
+
});
|
|
256
|
+
} else {
|
|
257
|
+
oValidationPromise.resolve(oResolver.getText());
|
|
258
|
+
}
|
|
253
259
|
} catch (err) {
|
|
254
260
|
return undefined;
|
|
255
261
|
}
|
|
256
|
-
return
|
|
262
|
+
return oValidationPromise.promise;
|
|
257
263
|
},
|
|
258
264
|
|
|
259
265
|
/**
|
|
@@ -293,6 +299,12 @@ sap.ui.define([
|
|
|
293
299
|
return urlCleaner(this._oJSONModel.getProperty("/frameUrl/value"));
|
|
294
300
|
},
|
|
295
301
|
|
|
302
|
+
/**
|
|
303
|
+
* Triggers the validation of all fields and updates the "areAllFieldsValid" property in the model
|
|
304
|
+
* This property is also used to enable/disable the Save button, hence the check must be called after every update on the dialog
|
|
305
|
+
*
|
|
306
|
+
* @param {boolean} bExternalValidationSuccess - Whether external validation was successful
|
|
307
|
+
*/
|
|
296
308
|
_checkIfAllFieldsValid(bExternalValidationSuccess) {
|
|
297
309
|
const bAllFieldsValid = (
|
|
298
310
|
bExternalValidationSuccess
|
|
@@ -303,8 +315,8 @@ sap.ui.define([
|
|
|
303
315
|
this._oJSONModel.setProperty("/areAllFieldsValid", bAllFieldsValid);
|
|
304
316
|
},
|
|
305
317
|
|
|
306
|
-
onValidateUrl() {
|
|
307
|
-
const sUrl = this._buildPreviewURL();
|
|
318
|
+
async onValidateUrl() {
|
|
319
|
+
const sUrl = await this._buildPreviewURL();
|
|
308
320
|
const { result: bResult, error: sError } = isValidUrl(sUrl);
|
|
309
321
|
if (bResult) {
|
|
310
322
|
this._oJSONModel.setProperty("/frameUrlError/value", "");
|
|
@@ -43,7 +43,7 @@ sap.ui.define([
|
|
|
43
43
|
* @name sap.ui.rta.service.Outline
|
|
44
44
|
* @author SAP SE
|
|
45
45
|
* @since 1.56
|
|
46
|
-
* @version 1.
|
|
46
|
+
* @version 1.145.0
|
|
47
47
|
* @private
|
|
48
48
|
* @ui5-restricted
|
|
49
49
|
*/
|
|
@@ -184,12 +184,12 @@ sap.ui.define([
|
|
|
184
184
|
};
|
|
185
185
|
};
|
|
186
186
|
|
|
187
|
-
oOutline._enrichExtensionPointData = function(oData, oOverlay) {
|
|
187
|
+
oOutline._enrichExtensionPointData = function(oData, oOverlay, bIsPartOfTemplate) {
|
|
188
188
|
var bIsDesignMode = DesignTime.isDesignModeEnabled();
|
|
189
189
|
if (!bIsDesignMode) {
|
|
190
190
|
return undefined;
|
|
191
191
|
}
|
|
192
|
-
if (oData.type === "aggregation") {
|
|
192
|
+
if (oData.type === "aggregation" && !bIsPartOfTemplate) {
|
|
193
193
|
var aExtensionPoints = this._getExtensionPoints(oData)
|
|
194
194
|
.sort(function(mExtensionPointA, mExtensionPointB) {
|
|
195
195
|
return mExtensionPointB.index - mExtensionPointA.index;
|
|
@@ -259,9 +259,10 @@ sap.ui.define([
|
|
|
259
259
|
* @param {int} [iDepth] - Level of children to traverse
|
|
260
260
|
* @param {sap.ui.dt.Overlay} [oParentOverlay] - Parent overlay (if present) for the passed overlay
|
|
261
261
|
* @param {object} [mTemplateData] - Propagates template data to the aggregation template clones
|
|
262
|
+
* @param {boolean} [bNestedInTemplate] - Whether the overlay is nested inside a template
|
|
262
263
|
* @returns {OutlineObject} Outline model data
|
|
263
264
|
*/
|
|
264
|
-
oOutline._getChildrenNodes = function(oOverlay, iDepth, oParentOverlay, mTemplateData) {
|
|
265
|
+
oOutline._getChildrenNodes = function(oOverlay, iDepth, oParentOverlay, mTemplateData, bNestedInTemplate) {
|
|
265
266
|
var bValidDepth = DtUtil.isInteger(iDepth);
|
|
266
267
|
var mAggregationTemplates = {};
|
|
267
268
|
|
|
@@ -295,11 +296,18 @@ sap.ui.define([
|
|
|
295
296
|
// decrement depth for children nodes
|
|
296
297
|
iDepth = bValidDepth ? iDepth - 1 : iDepth;
|
|
297
298
|
|
|
299
|
+
const bIsPartOfTemplate = bNestedInTemplate || oData.type === "aggregationBindingTemplate";
|
|
298
300
|
var mInnerTemplateData = {};
|
|
299
301
|
oData.elements = aChildren
|
|
300
302
|
.map(function(oChildOverlay) {
|
|
301
303
|
var mNextTemplateData = getTemplateData(oChildOverlay, mTemplateData, mInnerTemplateData);
|
|
302
|
-
|
|
304
|
+
const oNextData = this._getChildrenNodes(
|
|
305
|
+
oChildOverlay,
|
|
306
|
+
iDepth,
|
|
307
|
+
oChildOverlay.getParent(),
|
|
308
|
+
mNextTemplateData,
|
|
309
|
+
bIsPartOfTemplate
|
|
310
|
+
);
|
|
303
311
|
if (oNextData.type === "aggregationBindingTemplate") {
|
|
304
312
|
var sAggregationName = mAggregationTemplates[oChildOverlay.getId()];
|
|
305
313
|
mInnerTemplateData[sAggregationName] = merge({}, oNextData);
|
|
@@ -311,7 +319,7 @@ sap.ui.define([
|
|
|
311
319
|
});
|
|
312
320
|
|
|
313
321
|
// get extension point information if available
|
|
314
|
-
this._enrichExtensionPointData(oData, oOverlay);
|
|
322
|
+
this._enrichExtensionPointData(oData, oOverlay, bIsPartOfTemplate);
|
|
315
323
|
}
|
|
316
324
|
|
|
317
325
|
return cleanupData(oData);
|
|
@@ -16,6 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
"sap/ui/core/Popup",
|
|
17
17
|
"sap/ui/fl/apply/api/FlexRuntimeInfoAPI",
|
|
18
18
|
"sap/ui/fl/initial/api/Version",
|
|
19
|
+
"sap/ui/fl/util/CancelError",
|
|
19
20
|
"sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
|
|
20
21
|
"sap/ui/model/json/JSONModel",
|
|
21
22
|
"sap/ui/performance/Measurement",
|
|
@@ -42,6 +43,7 @@ sap.ui.define([
|
|
|
42
43
|
Popup,
|
|
43
44
|
FlexRuntimeInfoAPI,
|
|
44
45
|
Version,
|
|
46
|
+
CancelError,
|
|
45
47
|
ContextBasedAdaptationsAPI,
|
|
46
48
|
JSONModel,
|
|
47
49
|
Measurement,
|
|
@@ -67,7 +69,7 @@ sap.ui.define([
|
|
|
67
69
|
* @extends sap.ui.rta.toolbar.Base
|
|
68
70
|
*
|
|
69
71
|
* @author SAP SE
|
|
70
|
-
* @version 1.
|
|
72
|
+
* @version 1.145.0
|
|
71
73
|
*
|
|
72
74
|
* @constructor
|
|
73
75
|
* @private
|
|
@@ -473,7 +475,7 @@ sap.ui.define([
|
|
|
473
475
|
}
|
|
474
476
|
|
|
475
477
|
function handleError(oError) {
|
|
476
|
-
if (oError
|
|
478
|
+
if (!(oError instanceof CancelError)) {
|
|
477
479
|
Utils.showMessageBox("error", "MSG_LREP_TRANSFER_ERROR", { error: oError });
|
|
478
480
|
Log.error(`sap.ui.rta: ${oError.stack || oError.message || oError}`);
|
|
479
481
|
}
|
|
@@ -555,7 +557,8 @@ sap.ui.define([
|
|
|
555
557
|
};
|
|
556
558
|
const oFeedbackUrlParams = await FlexRuntimeInfoAPI.getFeedbackInformation(mPropertyBag);
|
|
557
559
|
oUrlParams.set("version", oFeedbackUrlParams.version);
|
|
558
|
-
|
|
560
|
+
const bCF = oFeedbackUrlParams.connector === "KeyUserConnector" || oFeedbackUrlParams.connector === "BtpServiceConnector";
|
|
561
|
+
oUrlParams.set("feature", bCF ? "BTP" : "ABAP");
|
|
559
562
|
oUrlParams.set("appId", oFeedbackUrlParams.appId);
|
|
560
563
|
oUrlParams.set("appVersion", oFeedbackUrlParams.appVersion);
|
|
561
564
|
// Add product filter for qualtrics colleagues
|