@openui5/sap.ui.rta 1.117.1 → 1.119.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/THIRDPARTY.txt +2 -2
- 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 +107 -97
- 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/manifest.json +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
- package/src/sap/ui/rta/command/AddIFrame.js +10 -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 +3 -5
- 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 +13 -7
- package/src/sap/ui/rta/messagebundle_ar.properties +8 -8
- package/src/sap/ui/rta/messagebundle_bg.properties +20 -20
- package/src/sap/ui/rta/messagebundle_ca.properties +7 -7
- package/src/sap/ui/rta/messagebundle_cs.properties +10 -10
- 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 +9 -9
- package/src/sap/ui/rta/messagebundle_el.properties +7 -7
- package/src/sap/ui/rta/messagebundle_en.properties +11 -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 +13 -13
- package/src/sap/ui/rta/messagebundle_et.properties +6 -6
- package/src/sap/ui/rta/messagebundle_fi.properties +9 -9
- package/src/sap/ui/rta/messagebundle_fr.properties +9 -9
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +9 -9
- package/src/sap/ui/rta/messagebundle_hi.properties +12 -12
- package/src/sap/ui/rta/messagebundle_hr.properties +9 -9
- package/src/sap/ui/rta/messagebundle_hu.properties +10 -10
- package/src/sap/ui/rta/messagebundle_id.properties +10 -10
- package/src/sap/ui/rta/messagebundle_it.properties +9 -9
- package/src/sap/ui/rta/messagebundle_iw.properties +8 -8
- package/src/sap/ui/rta/messagebundle_ja.properties +21 -21
- package/src/sap/ui/rta/messagebundle_kk.properties +9 -9
- 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 +11 -11
- package/src/sap/ui/rta/messagebundle_nl.properties +8 -8
- package/src/sap/ui/rta/messagebundle_no.properties +9 -9
- package/src/sap/ui/rta/messagebundle_pl.properties +9 -9
- package/src/sap/ui/rta/messagebundle_pt.properties +9 -9
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +8 -8
- package/src/sap/ui/rta/messagebundle_ro.properties +9 -9
- 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 +9 -9
- package/src/sap/ui/rta/messagebundle_sl.properties +9 -9
- package/src/sap/ui/rta/messagebundle_sv.properties +8 -8
- package/src/sap/ui/rta/messagebundle_th.properties +14 -14
- package/src/sap/ui/rta/messagebundle_tr.properties +8 -8
- package/src/sap/ui/rta/messagebundle_uk.properties +10 -10
- 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 +9 -7
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +45 -3
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +22 -23
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +58 -30
- package/src/sap/ui/rta/service/Action.js +5 -6
- 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 +2 -2
- 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/AddIFrame.less +6 -1
- package/src/sap/ui/rta/themes/base/Toolbar.base.less +4 -0
- package/src/sap/ui/rta/toolbar/Adaptation.js +26 -19
- 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/changeVisualization/commands/MoveVisualization.js +4 -4
- package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.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/validateStableIds.js +1 -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
|
@@ -31,13 +31,12 @@ sap.ui.define([
|
|
|
31
31
|
* @extends sap.ui.rta.plugin.Plugin
|
|
32
32
|
*
|
|
33
33
|
* @author SAP SE
|
|
34
|
-
* @version 1.
|
|
34
|
+
* @version 1.119.0
|
|
35
35
|
*
|
|
36
36
|
* @constructor
|
|
37
37
|
* @private
|
|
38
38
|
* @since 1.60
|
|
39
39
|
* @alias sap.ui.rta.plugin.Stretch
|
|
40
|
-
* @experimental Since 1.60. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
41
40
|
*/
|
|
42
41
|
var Stretch = Plugin.extend("sap.ui.rta.plugin.Stretch", /** @lends sap.ui.rta.plugin.Stretch.prototype */ {
|
|
43
42
|
metadata: {
|
|
@@ -111,7 +110,7 @@ sap.ui.define([
|
|
|
111
110
|
iHeight -= parseInt(window.getComputedStyle(oParentGeometry.domRef, null).getPropertyValue("padding-top"));
|
|
112
111
|
}
|
|
113
112
|
var iParentSize = Math.round(oParentGeometry.size.width) * Math.round(iHeight);
|
|
114
|
-
aChildOverlays
|
|
113
|
+
aChildOverlays ||= OverlayUtil.getAllChildOverlays(oReferenceOverlay);
|
|
115
114
|
|
|
116
115
|
var aChildrenGeometry = aChildOverlays.map(function(oChildOverlay) {
|
|
117
116
|
return oChildOverlay.getGeometry();
|
|
@@ -164,8 +163,9 @@ sap.ui.define([
|
|
|
164
163
|
* @param {sap.ui.dt.DesignTime} oDesignTime DesignTime object
|
|
165
164
|
* @override
|
|
166
165
|
*/
|
|
167
|
-
Stretch.prototype.setDesignTime = function(
|
|
168
|
-
|
|
166
|
+
Stretch.prototype.setDesignTime = function(...aArgs) {
|
|
167
|
+
const [oDesignTime] = aArgs;
|
|
168
|
+
Plugin.prototype.setDesignTime.apply(this, aArgs);
|
|
169
169
|
|
|
170
170
|
if (oDesignTime) {
|
|
171
171
|
oDesignTime.attachEventOnce("synced", this._onDTSynced, this);
|
|
@@ -197,12 +197,13 @@ sap.ui.define([
|
|
|
197
197
|
/**
|
|
198
198
|
* @override
|
|
199
199
|
*/
|
|
200
|
-
Stretch.prototype.registerElementOverlay = function(
|
|
200
|
+
Stretch.prototype.registerElementOverlay = function(...aArgs) {
|
|
201
|
+
const [oOverlay] = aArgs;
|
|
201
202
|
this._checkParentAndAddToStretchCandidates(oOverlay);
|
|
202
203
|
|
|
203
204
|
oOverlay.attachElementModified(this._onElementModified, this);
|
|
204
205
|
|
|
205
|
-
Plugin.prototype.registerElementOverlay.apply(this,
|
|
206
|
+
Plugin.prototype.registerElementOverlay.apply(this, aArgs);
|
|
206
207
|
};
|
|
207
208
|
|
|
208
209
|
/**
|
|
@@ -210,10 +211,11 @@ sap.ui.define([
|
|
|
210
211
|
* @param {sap.ui.dt.ElementOverlay} oOverlay overlay object
|
|
211
212
|
* @override
|
|
212
213
|
*/
|
|
213
|
-
Stretch.prototype.deregisterElementOverlay = function(
|
|
214
|
+
Stretch.prototype.deregisterElementOverlay = function(...aArgs) {
|
|
215
|
+
const [oOverlay] = aArgs;
|
|
214
216
|
toggleStyleClass(oOverlay, false);
|
|
215
217
|
|
|
216
|
-
Plugin.prototype.deregisterElementOverlay.apply(this,
|
|
218
|
+
Plugin.prototype.deregisterElementOverlay.apply(this, aArgs);
|
|
217
219
|
};
|
|
218
220
|
|
|
219
221
|
/**
|
|
@@ -242,18 +244,14 @@ sap.ui.define([
|
|
|
242
244
|
var oParams = oEvent.getParameters();
|
|
243
245
|
var oOverlay = oEvent.getSource();
|
|
244
246
|
if (oParams.type === "afterRendering") {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
this.
|
|
248
|
-
this._setStyleClassForAllStretchCandidates(this._getNewStretchCandidates(this._aOverlaysCollected));
|
|
249
|
-
this._aOverlaysCollected = [];
|
|
250
|
-
this.fnDebounced = undefined;
|
|
251
|
-
}.bind(this), 16);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
if (!this._aOverlaysCollected) {
|
|
247
|
+
// the timeout should be changed to 0 as soon as DT refactoring is done
|
|
248
|
+
this.fnDebounced ||= _debounce(function() {
|
|
249
|
+
this._setStyleClassForAllStretchCandidates(this._getNewStretchCandidates(this._aOverlaysCollected));
|
|
255
250
|
this._aOverlaysCollected = [];
|
|
256
|
-
|
|
251
|
+
this.fnDebounced = undefined;
|
|
252
|
+
}.bind(this), 16);
|
|
253
|
+
|
|
254
|
+
this._aOverlaysCollected ||= [];
|
|
257
255
|
|
|
258
256
|
if (!includes(this._aOverlaysCollected, oOverlay)) {
|
|
259
257
|
this._aOverlaysCollected.push(oOverlay);
|
|
@@ -32,10 +32,9 @@ sap.ui.define([
|
|
|
32
32
|
* handled by the AdditionalElements Plugin (Reveal, Add Via Delegate, Add Custom)
|
|
33
33
|
*
|
|
34
34
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.119.0
|
|
36
36
|
* @private
|
|
37
37
|
* @since 1.94
|
|
38
|
-
* @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
39
38
|
*/
|
|
40
39
|
var ActionExtractor = {};
|
|
41
40
|
|
|
@@ -250,9 +249,7 @@ sap.ui.define([
|
|
|
250
249
|
} else {
|
|
251
250
|
bRevealEnabled = true;
|
|
252
251
|
}
|
|
253
|
-
|
|
254
|
-
mRevealAction.getAggregationName = defaultGetAggregationName;
|
|
255
|
-
}
|
|
252
|
+
mRevealAction.getAggregationName ||= defaultGetAggregationName;
|
|
256
253
|
|
|
257
254
|
// Check if the invisible element can be moved to the target aggregation
|
|
258
255
|
if (bRevealEnabled && (sSourceAggregation !== sTargetAggregation)) {
|
|
@@ -329,7 +326,7 @@ sap.ui.define([
|
|
|
329
326
|
]).then(function(aAllActions) {
|
|
330
327
|
// join and condense all action data
|
|
331
328
|
var mAllActions = merge(aAllActions[0], aAllActions[1]);
|
|
332
|
-
oSourceElementOverlay._mAddActions
|
|
329
|
+
oSourceElementOverlay._mAddActions ||= {asSibling: {}, asChild: {}};
|
|
333
330
|
oSourceElementOverlay._mAddActions[sSiblingOrChild] = mAllActions;
|
|
334
331
|
return mAllActions;
|
|
335
332
|
});
|
|
@@ -429,9 +426,7 @@ sap.ui.define([
|
|
|
429
426
|
.then(function(mAction) {
|
|
430
427
|
if (mAction) {
|
|
431
428
|
mAction.addPropertyActionData.relevantContainer = mParents.relevantContainer;
|
|
432
|
-
|
|
433
|
-
oReturn[mAction.aggregationName] = {};
|
|
434
|
-
}
|
|
429
|
+
oReturn[mAction.aggregationName] ||= {};
|
|
435
430
|
oReturn[mAction.aggregationName].addViaDelegate = mAction.addPropertyActionData;
|
|
436
431
|
}
|
|
437
432
|
return oReturn;
|
|
@@ -32,13 +32,11 @@ sap.ui.define([
|
|
|
32
32
|
* @class Context - Dialog for available Fields in Runtime Authoring
|
|
33
33
|
* @extends sap.ui.base.ManagedObject
|
|
34
34
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.119.0
|
|
36
36
|
* @constructor
|
|
37
37
|
* @private
|
|
38
38
|
* @since 1.44
|
|
39
39
|
* @alias sap.ui.rta.plugin.additionalElements.AddElementsDialog
|
|
40
|
-
* @experimental Since 1.44. This class is experimental and provides only limited functionality. Also the API might be
|
|
41
|
-
* changed in future.
|
|
42
40
|
*/
|
|
43
41
|
var AddElementsDialog = ManagedObject.extend("sap.ui.rta.plugin.additionalElements.AddElementsDialog", {
|
|
44
42
|
metadata: {
|
|
@@ -88,9 +86,7 @@ sap.ui.define([
|
|
|
88
86
|
|
|
89
87
|
this._oDialogPromise.then(function(oDialog) {
|
|
90
88
|
oDialog.setModel(this._oDialogModel);
|
|
91
|
-
|
|
92
|
-
oRTAResourceModel = new ResourceModel({bundleName: "sap.ui.rta.messagebundle"});
|
|
93
|
-
}
|
|
89
|
+
oRTAResourceModel ||= new ResourceModel({bundleName: "sap.ui.rta.messagebundle"});
|
|
94
90
|
oDialog.setModel(oRTAResourceModel, "i18n");
|
|
95
91
|
|
|
96
92
|
oDialog.addStyleClass(Utils.getRtaStyleClassName());
|
|
@@ -99,18 +95,18 @@ sap.ui.define([
|
|
|
99
95
|
|
|
100
96
|
// retrieve List to set the sorting for the 'items' aggregation, since sap.ui.model.Sorter
|
|
101
97
|
// does not support binding to a model property...
|
|
102
|
-
this._oList = sap.ui.getCore().byId(this.getId()
|
|
98
|
+
this._oList = sap.ui.getCore().byId(`${this.getId()}--rta_addElementsDialogList`);
|
|
103
99
|
this._bDescendingSortOrder = false;
|
|
104
100
|
}.bind(this));
|
|
105
101
|
};
|
|
106
102
|
|
|
107
|
-
AddElementsDialog.prototype.exit = function() {
|
|
103
|
+
AddElementsDialog.prototype.exit = function(...aArgs) {
|
|
108
104
|
this._oDialogPromise.then(function(oDialog) {
|
|
109
105
|
oDialog.destroy();
|
|
110
106
|
});
|
|
111
107
|
|
|
112
108
|
if (ManagedObject.prototype.exit) {
|
|
113
|
-
ManagedObject.prototype.exit.apply(this,
|
|
109
|
+
ManagedObject.prototype.exit.apply(this, aArgs);
|
|
114
110
|
}
|
|
115
111
|
};
|
|
116
112
|
|
|
@@ -61,7 +61,7 @@ sap.ui.define([
|
|
|
61
61
|
function _flattenProperties(aProperties) {
|
|
62
62
|
var aFlattenedProperties = aProperties.reduce(function(aFlattened, oProperty) {
|
|
63
63
|
if (Array.isArray(oProperty.properties)) {
|
|
64
|
-
//
|
|
64
|
+
// only one level supported by our dialogs
|
|
65
65
|
// Only take the leaves, but attach the parent property name/label to it
|
|
66
66
|
aFlattened = aFlattened.concat(oProperty.properties.map(function(mInnerProp) {
|
|
67
67
|
mInnerProp.parentPropertyName = oProperty.label || oProperty.name;
|
|
@@ -241,7 +241,7 @@ sap.ui.define([
|
|
|
241
241
|
// unsupported: check existence of the property also in the navigation target
|
|
242
242
|
return (
|
|
243
243
|
sBindingPath === oModelProperty.bindingPath
|
|
244
|
-
|| sBindingPath.startsWith(oModelProperty.bindingPath
|
|
244
|
+
|| sBindingPath.startsWith(`${oModelProperty.bindingPath}/`)
|
|
245
245
|
);
|
|
246
246
|
});
|
|
247
247
|
})
|
|
@@ -430,7 +430,7 @@ sap.ui.define([
|
|
|
430
430
|
*
|
|
431
431
|
* @return {Promise} - returns a Promise which resolves with a list of hidden controls are available to display
|
|
432
432
|
*/
|
|
433
|
-
enhanceInvisibleElements
|
|
433
|
+
enhanceInvisibleElements(oElement, mActions) {
|
|
434
434
|
var mRevealData = mActions.reveal;
|
|
435
435
|
var mAddViaDelegate = mActions.addViaDelegate;
|
|
436
436
|
|
|
@@ -478,7 +478,7 @@ sap.ui.define([
|
|
|
478
478
|
*
|
|
479
479
|
* @return {Promise} - returns a Promise which resolves with a list of available to display delegate properties
|
|
480
480
|
*/
|
|
481
|
-
getUnrepresentedDelegateProperties
|
|
481
|
+
getUnrepresentedDelegateProperties(oElement, mAction) {
|
|
482
482
|
var sModelName = _getModelName(mAction);
|
|
483
483
|
var oDefaultAggregation = oElement.getMetadata().getAggregation();
|
|
484
484
|
var sAggregationName = oDefaultAggregation ? oDefaultAggregation.name : mAction.action.aggregation;
|
|
@@ -75,17 +75,18 @@ sap.ui.define([
|
|
|
75
75
|
* @class The plugin allows to add additional elements that exist either hidden in the UI or in the OData service
|
|
76
76
|
* @extends sap.ui.rta.plugin.Plugin
|
|
77
77
|
* @author SAP SE
|
|
78
|
-
* @version 1.
|
|
78
|
+
* @version 1.119.0
|
|
79
79
|
* @constructor
|
|
80
80
|
* @private
|
|
81
81
|
* @since 1.44
|
|
82
82
|
* @alias sap.ui.rta.plugin.additionalElements.AdditionalElementsPlugin
|
|
83
|
-
* @experimental Since 1.44. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
84
83
|
*/
|
|
85
84
|
var AdditionalElementsPlugin = Plugin.extend("sap.ui.rta.plugin.additionalElements.AdditionalElementsPlugin", {
|
|
86
|
-
|
|
85
|
+
// eslint-disable-next-line object-shorthand
|
|
86
|
+
constructor: function(...aArgs) {
|
|
87
|
+
const [oPropertyBag] = aArgs;
|
|
87
88
|
oPropertyBag.dialog = new AddElementsDialog();
|
|
88
|
-
Plugin.apply(this,
|
|
89
|
+
Plugin.apply(this, aArgs);
|
|
89
90
|
},
|
|
90
91
|
metadata: {
|
|
91
92
|
// ---- object ----
|
|
@@ -103,19 +104,19 @@ sap.ui.define([
|
|
|
103
104
|
},
|
|
104
105
|
|
|
105
106
|
// For add elements plugin, include other aggregations which are potentially valid targets for hidden elements
|
|
106
|
-
_getRelevantOverlays
|
|
107
|
+
_getRelevantOverlays(oOverlay) {
|
|
107
108
|
var aRelevantOverlays = OverlayUtil.findAllOverlaysInContainer(oOverlay, /* bIncludeOtherAggregations= */true);
|
|
108
109
|
|
|
109
110
|
oOverlay.setRelevantOverlays(aRelevantOverlays);
|
|
110
111
|
return aRelevantOverlays;
|
|
111
112
|
},
|
|
112
113
|
|
|
113
|
-
getContextMenuText
|
|
114
|
+
getContextMenuText(bOverlayIsSibling, oOverlay, sAggregationName, bHasSubMenu) {
|
|
114
115
|
var oTextResources;
|
|
115
116
|
|
|
116
117
|
function getGenericText() {
|
|
117
118
|
oTextResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
|
|
118
|
-
return oTextResources.getText("CTX_ADD_ELEMENTS", oTextResources.getText("MULTIPLE_CONTROL_NAME"));
|
|
119
|
+
return oTextResources.getText("CTX_ADD_ELEMENTS", [oTextResources.getText("MULTIPLE_CONTROL_NAME")]);
|
|
119
120
|
}
|
|
120
121
|
|
|
121
122
|
// When adding custom fields to a parent we don't know which control type will be added,
|
|
@@ -131,9 +132,7 @@ sap.ui.define([
|
|
|
131
132
|
}
|
|
132
133
|
var mParents = AdditionalElementsUtils.getParents(bOverlayIsSibling, oOverlay, this);
|
|
133
134
|
var mAllActions = ActionExtractor.getActionsOrUndef(bOverlayIsSibling, oOverlay);
|
|
134
|
-
|
|
135
|
-
sAggregationName = Object.keys(mAllActions)[0];
|
|
136
|
-
}
|
|
135
|
+
sAggregationName ||= Object.keys(mAllActions)[0];
|
|
137
136
|
var mActions = mAllActions[sAggregationName];
|
|
138
137
|
|
|
139
138
|
// Safeguarding
|
|
@@ -144,13 +143,13 @@ sap.ui.define([
|
|
|
144
143
|
return AdditionalElementsUtils.getText("CTX_ADD_ELEMENTS", mActions, mParents.parent, SINGULAR);
|
|
145
144
|
},
|
|
146
145
|
|
|
147
|
-
isAvailable
|
|
146
|
+
isAvailable(aElementOverlays, bOverlayIsSibling) {
|
|
148
147
|
return aElementOverlays.every(function(oElementOverlay) {
|
|
149
148
|
return this._isEditableByPlugin(oElementOverlay, bOverlayIsSibling);
|
|
150
149
|
}, this);
|
|
151
150
|
},
|
|
152
151
|
|
|
153
|
-
isEnabled
|
|
152
|
+
isEnabled(aElementOverlays, bOverlayIsSibling, sAggregationName) {
|
|
154
153
|
if (aElementOverlays.length > 1) {
|
|
155
154
|
return false;
|
|
156
155
|
}
|
|
@@ -181,7 +180,7 @@ sap.ui.define([
|
|
|
181
180
|
|
|
182
181
|
var oCachedElements = this.getCachedElements(bOverlayIsSibling);
|
|
183
182
|
var bElementsAvailable = !!(oCachedElements && oCachedElements.length > 0);
|
|
184
|
-
bIsEnabled
|
|
183
|
+
bIsEnabled &&= bElementsAvailable;
|
|
185
184
|
return bIsEnabled;
|
|
186
185
|
},
|
|
187
186
|
|
|
@@ -193,7 +192,8 @@ sap.ui.define([
|
|
|
193
192
|
* @param {sap.ui.dt.Overlay} oOverlay Overlay object
|
|
194
193
|
* @override
|
|
195
194
|
*/
|
|
196
|
-
registerElementOverlay
|
|
195
|
+
registerElementOverlay(...aArgs) {
|
|
196
|
+
const [oOverlay] = aArgs;
|
|
197
197
|
var oModel = oOverlay.getElement().getModel();
|
|
198
198
|
if (oModel) {
|
|
199
199
|
var oMetaModel = oModel.getMetaModel();
|
|
@@ -203,10 +203,10 @@ sap.ui.define([
|
|
|
203
203
|
}.bind(this));
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
Plugin.prototype.registerElementOverlay.apply(this,
|
|
206
|
+
Plugin.prototype.registerElementOverlay.apply(this, aArgs);
|
|
207
207
|
},
|
|
208
208
|
|
|
209
|
-
_checkIfCreateFunctionIsAvailable
|
|
209
|
+
_checkIfCreateFunctionIsAvailable(mChangeHandlerSettings) {
|
|
210
210
|
return !mChangeHandlerSettings ||
|
|
211
211
|
(
|
|
212
212
|
mChangeHandlerSettings &&
|
|
@@ -227,7 +227,7 @@ sap.ui.define([
|
|
|
227
227
|
* @return {Promise} Returns a promise that resolves when the dialog closes
|
|
228
228
|
* @private
|
|
229
229
|
*/
|
|
230
|
-
showAvailableElements
|
|
230
|
+
showAvailableElements(bOverlayIsSibling, sAggregationName, aResponsibleElementOverlays, iIndex, sControlName, sDisplayText) {
|
|
231
231
|
var oResponsibleElementOverlay = aResponsibleElementOverlays[0];
|
|
232
232
|
var mParents = AdditionalElementsUtils.getParents(bOverlayIsSibling, oResponsibleElementOverlay, this);
|
|
233
233
|
var vSiblingElement = bOverlayIsSibling && oResponsibleElementOverlay.getElement();
|
|
@@ -267,7 +267,7 @@ sap.ui.define([
|
|
|
267
267
|
if (sDisplayText) {
|
|
268
268
|
// Aggregation is part of title
|
|
269
269
|
var oTextResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
|
|
270
|
-
var sDialogTitle = oTextResources.getText("HEADER_ADDITIONAL_ELEMENTS_WITH_AGGREGATION", sDisplayText);
|
|
270
|
+
var sDialogTitle = oTextResources.getText("HEADER_ADDITIONAL_ELEMENTS_WITH_AGGREGATION", [sDisplayText]);
|
|
271
271
|
this.getDialog().setTitle(sDialogTitle);
|
|
272
272
|
} else if (sAggregationName || sControlName) {
|
|
273
273
|
// Only one aggregation, no aggregation in title
|
|
@@ -303,13 +303,13 @@ sap.ui.define([
|
|
|
303
303
|
});
|
|
304
304
|
},
|
|
305
305
|
|
|
306
|
-
_setDialogTitle
|
|
306
|
+
_setDialogTitle(mActions, oParentElement, sControlName) {
|
|
307
307
|
var sDialogTitle = AdditionalElementsUtils.getText("HEADER_ADDITIONAL_ELEMENTS", mActions, oParentElement, PLURAL, sControlName);
|
|
308
308
|
this.getDialog().setTitle(sDialogTitle);
|
|
309
309
|
},
|
|
310
310
|
|
|
311
311
|
// Function called when custom field button was pressed
|
|
312
|
-
_onOpenCustomField
|
|
312
|
+
_onOpenCustomField(oEvent, bOverlayIsSibling) {
|
|
313
313
|
var sRtaStyleClassName = Utils.getRtaStyleClassName();
|
|
314
314
|
return FieldExtensibility.onTriggerCreateExtensionData(this.getExtensibilityInfo(bOverlayIsSibling), sRtaStyleClassName);
|
|
315
315
|
},
|
|
@@ -321,7 +321,7 @@ sap.ui.define([
|
|
|
321
321
|
* @returns {object} Returns object with editable boolean values for "asChild" and "asSibling"
|
|
322
322
|
* @protected
|
|
323
323
|
*/
|
|
324
|
-
_isEditable
|
|
324
|
+
_isEditable(oOverlay, mPropertyBag) {
|
|
325
325
|
return Promise.all([this._isEditableCheck(mPropertyBag.sourceElementOverlay, true), this._isEditableCheck(mPropertyBag.sourceElementOverlay, false)])
|
|
326
326
|
.then(function(aPromiseValues) {
|
|
327
327
|
return {
|
|
@@ -334,7 +334,7 @@ sap.ui.define([
|
|
|
334
334
|
});
|
|
335
335
|
},
|
|
336
336
|
|
|
337
|
-
_isEditableCheck
|
|
337
|
+
_isEditableCheck(oOverlay, bOverlayIsSibling) {
|
|
338
338
|
return Promise.resolve()
|
|
339
339
|
.then(function() {
|
|
340
340
|
var mParents = AdditionalElementsUtils.getParents(bOverlayIsSibling, oOverlay, this);
|
|
@@ -366,11 +366,9 @@ sap.ui.define([
|
|
|
366
366
|
}.bind(this));
|
|
367
367
|
}.bind(this))
|
|
368
368
|
.then(function(bEditable) {
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
&& this.hasStableId(mParents.parentOverlay);
|
|
373
|
-
}
|
|
369
|
+
bEditable &&=
|
|
370
|
+
this.hasStableId(oOverlay) // don't confuse the user/Web IDE by an editable overlay without stable ID
|
|
371
|
+
&& this.hasStableId(mParents.parentOverlay);
|
|
374
372
|
return bEditable;
|
|
375
373
|
}.bind(this));
|
|
376
374
|
}.bind(this));
|
|
@@ -383,7 +381,7 @@ sap.ui.define([
|
|
|
383
381
|
* @returns {Array} An array with all elements
|
|
384
382
|
* @protected
|
|
385
383
|
*/
|
|
386
|
-
getAllElements
|
|
384
|
+
getAllElements(bOverlayIsSibling, aElementOverlays) {
|
|
387
385
|
var oElementOverlay = aElementOverlays[0];
|
|
388
386
|
var mParents = AdditionalElementsUtils.getParents(bOverlayIsSibling, oElementOverlay, this);
|
|
389
387
|
var mActions;
|
|
@@ -442,7 +440,7 @@ sap.ui.define([
|
|
|
442
440
|
* @param {sap.ui.dt.ElementOverlay} aElementOverlays - List of overlays for which the context menu was opened
|
|
443
441
|
* @return {object[]} Array containing the items with required data
|
|
444
442
|
*/
|
|
445
|
-
getMenuItems
|
|
443
|
+
getMenuItems(aElementOverlays) {
|
|
446
444
|
var aMenuItems = [];
|
|
447
445
|
var oMenuItem;
|
|
448
446
|
this.clearCachedElements();
|
|
@@ -474,7 +472,7 @@ sap.ui.define([
|
|
|
474
472
|
}.bind(this));
|
|
475
473
|
},
|
|
476
474
|
|
|
477
|
-
_buildMenuItem
|
|
475
|
+
_buildMenuItem(sPluginId, bOverlayIsSibling, aElementOverlays, aElementsWithAggregations, bHasSubMenu) {
|
|
478
476
|
var aSubMenuItems;
|
|
479
477
|
var vHandler;
|
|
480
478
|
var sAggregationName;
|
|
@@ -519,7 +517,7 @@ sap.ui.define([
|
|
|
519
517
|
return oMenuItem;
|
|
520
518
|
},
|
|
521
519
|
|
|
522
|
-
_buildSubmenuItems
|
|
520
|
+
_buildSubmenuItems(bOverlayIsSibling, aElementOverlays, aElementsWithAggregation) {
|
|
523
521
|
var aSubMenuItems = [];
|
|
524
522
|
var sPluginId = bOverlayIsSibling ? "CTX_ADD_ELEMENTS_AS_SIBLING" : "CTX_ADD_ELEMENTS_AS_CHILD";
|
|
525
523
|
var iPosition = 0;
|
|
@@ -542,7 +540,7 @@ sap.ui.define([
|
|
|
542
540
|
var sAggregationName = mElementsWithAggregation.aggregation;
|
|
543
541
|
var sDisplayText = getMenuItemText(bOverlayIsSibling, sAggregationName, aElementOverlays);
|
|
544
542
|
var oItem = {
|
|
545
|
-
id: sPluginId
|
|
543
|
+
id: `${sPluginId}_${iPosition}`,
|
|
546
544
|
text: sDisplayText,
|
|
547
545
|
enabled: function(aElementOverlays) {
|
|
548
546
|
return this.isEnabled(aElementOverlays, bOverlayIsSibling, sAggregationName);
|
|
@@ -589,7 +587,7 @@ sap.ui.define([
|
|
|
589
587
|
// elements: [...]
|
|
590
588
|
// }
|
|
591
589
|
// ]
|
|
592
|
-
_combineAnalyzerResults
|
|
590
|
+
_combineAnalyzerResults(aAllPromises) {
|
|
593
591
|
var aCollectedPromises = [];
|
|
594
592
|
|
|
595
593
|
aAllPromises.forEach(function(aPromisesByAggregation) {
|
|
@@ -616,44 +614,44 @@ sap.ui.define([
|
|
|
616
614
|
});
|
|
617
615
|
},
|
|
618
616
|
|
|
619
|
-
clearCachedElements
|
|
617
|
+
clearCachedElements() {
|
|
620
618
|
this._oCachedElements = undefined;
|
|
621
619
|
},
|
|
622
620
|
|
|
623
|
-
setCachedElements
|
|
624
|
-
this._oCachedElements
|
|
621
|
+
setCachedElements(aElements, bOverlayIsSibling) {
|
|
622
|
+
this._oCachedElements ||= {};
|
|
625
623
|
this._oCachedElements[bOverlayIsSibling ? "asSibling" : "asChild"] = aElements;
|
|
626
624
|
},
|
|
627
625
|
|
|
628
|
-
getCachedElements
|
|
626
|
+
getCachedElements(bOverlayIsSibling) {
|
|
629
627
|
if (this._oCachedElements) {
|
|
630
628
|
return this._oCachedElements[bOverlayIsSibling ? "asSibling" : "asChild"];
|
|
631
629
|
}
|
|
632
630
|
return undefined;
|
|
633
631
|
},
|
|
634
632
|
|
|
635
|
-
clearExtensibilityInfo
|
|
633
|
+
clearExtensibilityInfo(bOverlayIsSibling) {
|
|
636
634
|
if (this._oExtensibilityInfo) {
|
|
637
635
|
this._oExtensibilityInfo[bOverlayIsSibling ? "asSibling" : "asChild"] = undefined;
|
|
638
636
|
}
|
|
639
637
|
},
|
|
640
638
|
|
|
641
|
-
setExtensibilityInfo
|
|
642
|
-
this._oExtensibilityInfo
|
|
639
|
+
setExtensibilityInfo(bOverlayIsSibling, oExtensibilityInfo) {
|
|
640
|
+
this._oExtensibilityInfo ||= {};
|
|
643
641
|
this._oExtensibilityInfo[bOverlayIsSibling ? "asSibling" : "asChild"] = oExtensibilityInfo;
|
|
644
642
|
},
|
|
645
643
|
|
|
646
|
-
getExtensibilityInfo
|
|
644
|
+
getExtensibilityInfo(bOverlayIsSibling) {
|
|
647
645
|
if (this._oExtensibilityInfo) {
|
|
648
646
|
return this._oExtensibilityInfo[bOverlayIsSibling ? "asSibling" : "asChild"];
|
|
649
647
|
}
|
|
650
648
|
return undefined;
|
|
651
649
|
},
|
|
652
650
|
|
|
653
|
-
exit
|
|
651
|
+
exit(...aArgs) {
|
|
654
652
|
this.getDialog().destroy();
|
|
655
653
|
if (Plugin.prototype.exit) {
|
|
656
|
-
Plugin.prototype.exit.apply(this,
|
|
654
|
+
Plugin.prototype.exit.apply(this, aArgs);
|
|
657
655
|
}
|
|
658
656
|
}
|
|
659
657
|
|
|
@@ -15,10 +15,9 @@ sap.ui.define([
|
|
|
15
15
|
* Helper object containing methods for the AdditionalElements plugin
|
|
16
16
|
*
|
|
17
17
|
* @author SAP SE
|
|
18
|
-
* @version 1.
|
|
18
|
+
* @version 1.119.0
|
|
19
19
|
* @private
|
|
20
20
|
* @since 1.94
|
|
21
|
-
* @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
22
21
|
*/
|
|
23
22
|
var AdditionalElementsUtils = {};
|
|
24
23
|
|
|
@@ -102,7 +101,7 @@ sap.ui.define([
|
|
|
102
101
|
var oTextResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
|
|
103
102
|
|
|
104
103
|
if (aNonDuplicateNames.length === 1) {
|
|
105
|
-
sControlType = aNonDuplicateNames
|
|
104
|
+
[sControlType] = aNonDuplicateNames;
|
|
106
105
|
} else if (sControlName) {
|
|
107
106
|
sControlType = sControlName;
|
|
108
107
|
} else {
|
|
@@ -25,10 +25,9 @@ sap.ui.define([
|
|
|
25
25
|
* Helper object to build the RTA commands resulting from the AdditionalElements Plugin
|
|
26
26
|
*
|
|
27
27
|
* @author SAP SE
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.119.0
|
|
29
29
|
* @private
|
|
30
30
|
* @since 1.94
|
|
31
|
-
* @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
32
31
|
*/
|
|
33
32
|
var CommandBuilder = {};
|
|
34
33
|
|
|
@@ -63,9 +62,9 @@ sap.ui.define([
|
|
|
63
62
|
if (oMoveCommandForInvisible) {
|
|
64
63
|
oCompositeCommand.addCommand(oMoveCommandForInvisible);
|
|
65
64
|
} else {
|
|
66
|
-
Log.warning(
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
Log.warning(`No move action configured for ${
|
|
66
|
+
mParents.parent.getMetadata().getName()
|
|
67
|
+
}, aggregation: ${oSelectedElement.aggregation}`, "sap.ui.rta");
|
|
69
68
|
}
|
|
70
69
|
return oCompositeCommand;
|
|
71
70
|
});
|
|
@@ -279,7 +278,7 @@ sap.ui.define([
|
|
|
279
278
|
createCommandsForAddViaDelegate.bind(this, mPropertyBag));
|
|
280
279
|
break;
|
|
281
280
|
default:
|
|
282
|
-
Log.error(
|
|
281
|
+
Log.error(`Can't create command for untreated element.type ${oSelectedElement.type}`);
|
|
283
282
|
}
|
|
284
283
|
}, this);
|
|
285
284
|
return oPromise.then(function() { return oCompositeCommand; });
|
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
function getCreateMenuItemText(sAggregationName, sTextKey, oTextResources, oOverlay) {
|
|
25
25
|
var bSibling = !sAggregationName;
|
|
26
26
|
var oAction = this.getCreateAction(bSibling, oOverlay, sAggregationName);
|
|
27
|
-
return oTextResources.getText(sTextKey, oAction.text);
|
|
27
|
+
return oTextResources.getText(sTextKey, [oAction.text]);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
function getAddIFrameCommand(oModifiedElement, mSettings, oDesignTimeMetadata, sVariantManagementKey) {
|
|
@@ -49,7 +49,8 @@ sap.ui.define([
|
|
|
49
49
|
url: mSettings.frameUrl,
|
|
50
50
|
width: sWidth,
|
|
51
51
|
height: sHeight,
|
|
52
|
-
title: mSettings.title
|
|
52
|
+
title: mSettings.title,
|
|
53
|
+
useLegacyNavigation: mSettings.useLegacyNavigation
|
|
53
54
|
}, oDesignTimeMetadata, sVariantManagementKey);
|
|
54
55
|
}
|
|
55
56
|
|
|
@@ -116,12 +117,12 @@ sap.ui.define([
|
|
|
116
117
|
* @class The AddIFrame allows trigger AddIFrame operations on the overlay.
|
|
117
118
|
* @extends sap.ui.rta.plugin.BaseCreate
|
|
118
119
|
* @author SAP SE
|
|
119
|
-
* @version 1.
|
|
120
|
+
* @version 1.119.0
|
|
120
121
|
* @constructor
|
|
121
122
|
* @private
|
|
122
123
|
* @since 1.75
|
|
123
124
|
* @alias sap.ui.rta.plugin.AddIFrame
|
|
124
|
-
*
|
|
125
|
+
* Since 1.75. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
125
126
|
*/
|
|
126
127
|
var AddIFrame = BaseCreate.extend("sap.ui.rta.plugin.AddIFrame", /** @lends sap.ui.rta.plugin.AddIFrame.prototype */{
|
|
127
128
|
metadata: {
|
|
@@ -152,7 +153,7 @@ sap.ui.define([
|
|
|
152
153
|
* @return {array} Array of context menu items
|
|
153
154
|
* @override
|
|
154
155
|
*/
|
|
155
|
-
AddIFrame.prototype.getMenuItems = function(aElementOverlays) {
|
|
156
|
+
AddIFrame.prototype.getMenuItems = async function(aElementOverlays) {
|
|
156
157
|
function getCommonProperties(sAggregationName) {
|
|
157
158
|
var oTextResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
|
|
158
159
|
var sIFrameGroupText = oTextResources.getText("CTX_ADDIFRAME_GROUP");
|
|
@@ -171,8 +172,9 @@ sap.ui.define([
|
|
|
171
172
|
collectionName: "tnt",
|
|
172
173
|
fontFamily: "SAP-icons-TNT",
|
|
173
174
|
fontURI: sap.ui.require.toUrl("sap/tnt/themes/base/fonts"),
|
|
174
|
-
lazy:
|
|
175
|
+
lazy: false
|
|
175
176
|
});
|
|
177
|
+
await IconPool.fontLoaded("tnt");
|
|
176
178
|
|
|
177
179
|
var iBaseRank = 140;
|
|
178
180
|
var aMenuItems = [];
|
|
@@ -198,7 +200,7 @@ sap.ui.define([
|
|
|
198
200
|
.map(function(oAction, iIndex) {
|
|
199
201
|
var oParentMenuItem = Object.assign({
|
|
200
202
|
action: oAction,
|
|
201
|
-
id:
|
|
203
|
+
id: `CTX_CREATE_CHILD_IFRAME_${oAction.aggregation.toUpperCase()}`,
|
|
202
204
|
rank: iBaseRank + 10 * iIndex
|
|
203
205
|
}, getCommonProperties.call(this, oAction.aggregation));
|
|
204
206
|
|