@openui5/sap.ui.rta 1.126.0 → 1.127.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/THIRDPARTY.txt +1 -1
- 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 +2 -2
- package/src/sap/ui/rta/Utils.js +1 -1
- package/src/sap/ui/rta/api/startAdaptation.js +2 -0
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
- package/src/sap/ui/rta/command/AddIFrame.js +1 -1
- package/src/sap/ui/rta/command/AddProperty.js +1 -1
- package/src/sap/ui/rta/command/AddXML.js +1 -1
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
- package/src/sap/ui/rta/command/BaseCommand.js +1 -1
- package/src/sap/ui/rta/command/BindProperty.js +1 -1
- package/src/sap/ui/rta/command/Combine.js +1 -1
- package/src/sap/ui/rta/command/CommandFactory.js +1 -1
- package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/CreateContainer.js +1 -1
- package/src/sap/ui/rta/command/CustomAdd.js +1 -1
- package/src/sap/ui/rta/command/FlexCommand.js +1 -1
- package/src/sap/ui/rta/command/LREPSerializer.js +1 -1
- package/src/sap/ui/rta/command/LocalReset.js +1 -1
- package/src/sap/ui/rta/command/Move.js +1 -1
- package/src/sap/ui/rta/command/Property.js +1 -1
- package/src/sap/ui/rta/command/Remove.js +1 -1
- package/src/sap/ui/rta/command/Rename.js +1 -1
- package/src/sap/ui/rta/command/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/appDescriptor/AddLibrary.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +11 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
- package/src/sap/ui/rta/enablement/elementActionTest.js +1 -1
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +2 -2
- package/src/sap/ui/rta/messagebundle_ar.properties +2 -2
- package/src/sap/ui/rta/messagebundle_bg.properties +2 -2
- package/src/sap/ui/rta/messagebundle_ca.properties +2 -2
- package/src/sap/ui/rta/messagebundle_cnr.properties +2 -2
- package/src/sap/ui/rta/messagebundle_cs.properties +2 -2
- package/src/sap/ui/rta/messagebundle_cy.properties +2 -2
- package/src/sap/ui/rta/messagebundle_da.properties +2 -2
- package/src/sap/ui/rta/messagebundle_de.properties +3 -3
- package/src/sap/ui/rta/messagebundle_el.properties +2 -2
- package/src/sap/ui/rta/messagebundle_en.properties +0 -326
- package/src/sap/ui/rta/messagebundle_en_GB.properties +2 -2
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +63 -53
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +325 -315
- package/src/sap/ui/rta/messagebundle_es.properties +2 -2
- package/src/sap/ui/rta/messagebundle_es_MX.properties +2 -2
- package/src/sap/ui/rta/messagebundle_et.properties +2 -2
- package/src/sap/ui/rta/messagebundle_fi.properties +2 -2
- package/src/sap/ui/rta/messagebundle_fr.properties +2 -2
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +2 -2
- package/src/sap/ui/rta/messagebundle_hi.properties +2 -2
- package/src/sap/ui/rta/messagebundle_hr.properties +2 -2
- package/src/sap/ui/rta/messagebundle_hu.properties +2 -2
- package/src/sap/ui/rta/messagebundle_id.properties +2 -2
- package/src/sap/ui/rta/messagebundle_it.properties +3 -3
- package/src/sap/ui/rta/messagebundle_iw.properties +2 -2
- package/src/sap/ui/rta/messagebundle_ja.properties +2 -2
- package/src/sap/ui/rta/messagebundle_kk.properties +2 -2
- package/src/sap/ui/rta/messagebundle_ko.properties +2 -2
- package/src/sap/ui/rta/messagebundle_lt.properties +2 -2
- package/src/sap/ui/rta/messagebundle_lv.properties +2 -2
- package/src/sap/ui/rta/messagebundle_mk.properties +2 -2
- package/src/sap/ui/rta/messagebundle_ms.properties +2 -2
- package/src/sap/ui/rta/messagebundle_nl.properties +2 -2
- package/src/sap/ui/rta/messagebundle_no.properties +2 -2
- package/src/sap/ui/rta/messagebundle_pl.properties +2 -2
- package/src/sap/ui/rta/messagebundle_pt.properties +2 -2
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +2 -2
- package/src/sap/ui/rta/messagebundle_ro.properties +2 -2
- package/src/sap/ui/rta/messagebundle_ru.properties +2 -2
- package/src/sap/ui/rta/messagebundle_sh.properties +2 -2
- package/src/sap/ui/rta/messagebundle_sk.properties +2 -2
- package/src/sap/ui/rta/messagebundle_sl.properties +2 -2
- package/src/sap/ui/rta/messagebundle_sr.properties +2 -2
- package/src/sap/ui/rta/messagebundle_sv.properties +2 -2
- package/src/sap/ui/rta/messagebundle_th.properties +2 -2
- package/src/sap/ui/rta/messagebundle_tr.properties +2 -2
- package/src/sap/ui/rta/messagebundle_uk.properties +2 -2
- package/src/sap/ui/rta/messagebundle_vi.properties +2 -2
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +2 -2
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +2 -2
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +5 -2
- package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
- package/src/sap/ui/rta/plugin/Combine.js +1 -2
- package/src/sap/ui/rta/plugin/CompVariant.js +6 -6
- package/src/sap/ui/rta/plugin/ControlVariant.js +6 -6
- package/src/sap/ui/rta/plugin/CreateContainer.js +3 -3
- package/src/sap/ui/rta/plugin/CutPaste.js +3 -3
- package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
- package/src/sap/ui/rta/plugin/LocalReset.js +5 -2
- package/src/sap/ui/rta/plugin/Plugin.js +60 -2
- package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
- package/src/sap/ui/rta/plugin/Remove.js +2 -2
- package/src/sap/ui/rta/plugin/Rename.js +2 -2
- package/src/sap/ui/rta/plugin/RenameHandler.js +1 -1
- package/src/sap/ui/rta/plugin/Resize.js +1 -1
- package/src/sap/ui/rta/plugin/Selection.js +3 -3
- package/src/sap/ui/rta/plugin/Settings.js +2 -2
- package/src/sap/ui/rta/plugin/Split.js +2 -2
- package/src/sap/ui/rta/plugin/Stretch.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +2 -2
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +4 -5
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +41 -30
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +17 -5
- 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 +1 -1
- package/src/sap/ui/rta/service/Property.js +1 -1
- package/src/sap/ui/rta/service/Selection.js +20 -2
- package/src/sap/ui/rta/service/SupportTools.js +1 -1
- package/src/sap/ui/rta/toolbar/Adaptation.js +1 -1
- 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/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
|
@@ -365,7 +365,7 @@ sap.ui.define([
|
|
|
365
365
|
text: this.getActionText(oElementOverlay, this.getAction(oElementOverlay)),
|
|
366
366
|
handler: changeContent.bind(this),
|
|
367
367
|
enabled: true,
|
|
368
|
-
rank:
|
|
368
|
+
rank: this.getRank("CTX_COMP_VARIANT_CONTENT"),
|
|
369
369
|
icon: "sap-icon://key-user-settings"
|
|
370
370
|
});
|
|
371
371
|
} else {
|
|
@@ -382,7 +382,7 @@ sap.ui.define([
|
|
|
382
382
|
text: oLibraryBundle.getText("CTX_RENAME"),
|
|
383
383
|
handler: renameVariant.bind(this),
|
|
384
384
|
enabled: true,
|
|
385
|
-
rank:
|
|
385
|
+
rank: this.getRank("CTX_COMP_VARIANT_RENAME"),
|
|
386
386
|
icon: "sap-icon://edit"
|
|
387
387
|
});
|
|
388
388
|
}
|
|
@@ -393,7 +393,7 @@ sap.ui.define([
|
|
|
393
393
|
text: oLibraryBundle.getText("CTX_VARIANT_SAVE"),
|
|
394
394
|
handler: saveVariant.bind(this),
|
|
395
395
|
enabled: isSaveEnabled,
|
|
396
|
-
rank:
|
|
396
|
+
rank: this.getRank("CTX_COMP_VARIANT_SAVE"),
|
|
397
397
|
icon: "sap-icon://save"
|
|
398
398
|
});
|
|
399
399
|
}
|
|
@@ -403,7 +403,7 @@ sap.ui.define([
|
|
|
403
403
|
text: oLibraryBundle.getText("CTX_VARIANT_SAVEAS"),
|
|
404
404
|
handler: saveAsNewVariant.bind(this),
|
|
405
405
|
enabled: true,
|
|
406
|
-
rank:
|
|
406
|
+
rank: this.getRank("CTX_COMP_VARIANT_SAVE_AS"),
|
|
407
407
|
icon: "sap-icon://duplicate"
|
|
408
408
|
});
|
|
409
409
|
|
|
@@ -412,7 +412,7 @@ sap.ui.define([
|
|
|
412
412
|
text: oLibraryBundle.getText("CTX_VARIANT_MANAGE"),
|
|
413
413
|
handler: configureVariants.bind(this),
|
|
414
414
|
enabled: true,
|
|
415
|
-
rank:
|
|
415
|
+
rank: this.getRank("CTX_COMP_VARIANT_MANAGE"),
|
|
416
416
|
icon: "sap-icon://action-settings"
|
|
417
417
|
});
|
|
418
418
|
|
|
@@ -433,7 +433,7 @@ sap.ui.define([
|
|
|
433
433
|
handler: switchVariant.bind(this),
|
|
434
434
|
enabled: isSwitchEnabled,
|
|
435
435
|
submenu: aSubmenuItems,
|
|
436
|
-
rank:
|
|
436
|
+
rank: this.getRank("CTX_COMP_VARIANT_SWITCH"),
|
|
437
437
|
icon: "sap-icon://switch-views"
|
|
438
438
|
});
|
|
439
439
|
}
|
|
@@ -51,7 +51,7 @@ sap.ui.define([
|
|
|
51
51
|
* @class The ControlVariant allows propagation of variantManagement key
|
|
52
52
|
* @extends sap.ui.rta.plugin.Plugin
|
|
53
53
|
* @author SAP SE
|
|
54
|
-
* @version 1.
|
|
54
|
+
* @version 1.127.0
|
|
55
55
|
* @constructor
|
|
56
56
|
* @private
|
|
57
57
|
* @since 1.50
|
|
@@ -639,7 +639,7 @@ sap.ui.define([
|
|
|
639
639
|
text: Lib.getResourceBundleFor("sap.ui.rta").getText("CTX_RENAME"),
|
|
640
640
|
handler: this.renameVariant.bind(this),
|
|
641
641
|
enabled: this.isRenameEnabled.bind(this),
|
|
642
|
-
rank:
|
|
642
|
+
rank: this.getRank("CTX_VARIANT_SET_TITLE"),
|
|
643
643
|
icon: "sap-icon://edit"
|
|
644
644
|
});
|
|
645
645
|
}
|
|
@@ -650,7 +650,7 @@ sap.ui.define([
|
|
|
650
650
|
text: Lib.getResourceBundleFor("sap.ui.rta").getText("CTX_VARIANT_SAVE"),
|
|
651
651
|
handler: this.createSaveCommand.bind(this),
|
|
652
652
|
enabled: this.isVariantSaveEnabled.bind(this),
|
|
653
|
-
rank:
|
|
653
|
+
rank: this.getRank("CTX_VARIANT_SAVE"),
|
|
654
654
|
icon: "sap-icon://save"
|
|
655
655
|
});
|
|
656
656
|
}
|
|
@@ -661,7 +661,7 @@ sap.ui.define([
|
|
|
661
661
|
text: Lib.getResourceBundleFor("sap.ui.rta").getText("CTX_VARIANT_SAVEAS"),
|
|
662
662
|
handler: this.createSaveAsCommand.bind(this),
|
|
663
663
|
enabled: this.isVariantSaveAsEnabled.bind(this),
|
|
664
|
-
rank:
|
|
664
|
+
rank: this.getRank("CTX_VARIANT_SAVEAS"),
|
|
665
665
|
icon: "sap-icon://duplicate"
|
|
666
666
|
});
|
|
667
667
|
}
|
|
@@ -673,7 +673,7 @@ sap.ui.define([
|
|
|
673
673
|
handler: this.configureVariants.bind(this),
|
|
674
674
|
enabled: this.isVariantConfigureEnabled.bind(this),
|
|
675
675
|
startSection: true,
|
|
676
|
-
rank:
|
|
676
|
+
rank: this.getRank("CTX_VARIANT_MANAGE"),
|
|
677
677
|
icon: "sap-icon://action-settings"
|
|
678
678
|
});
|
|
679
679
|
}
|
|
@@ -707,7 +707,7 @@ sap.ui.define([
|
|
|
707
707
|
}.bind(this),
|
|
708
708
|
enabled: this.isVariantSwitchEnabled.bind(this),
|
|
709
709
|
submenu: aSubmenuItems,
|
|
710
|
-
rank:
|
|
710
|
+
rank: this.getRank("CTX_VARIANT_SWITCH_SUBMENU"),
|
|
711
711
|
icon: "sap-icon://switch-views"
|
|
712
712
|
});
|
|
713
713
|
}
|
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
* @class The CreateContainer allows trigger CreateContainer operations on the overlay
|
|
26
26
|
* @extends sap.ui.rta.plugin.BaseCreate
|
|
27
27
|
* @author SAP SE
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.127.0
|
|
29
29
|
* @constructor
|
|
30
30
|
* @private
|
|
31
31
|
* @since 1.34
|
|
@@ -115,7 +115,7 @@ sap.ui.define([
|
|
|
115
115
|
CreateContainer.prototype.getMenuItems = function(aElementOverlays) {
|
|
116
116
|
var bOverlayIsSibling = true;
|
|
117
117
|
var sPluginId = "CTX_CREATE_SIBLING_CONTAINER";
|
|
118
|
-
var iRank =
|
|
118
|
+
var iRank = this.getRank(sPluginId);
|
|
119
119
|
var aMenuItems = [];
|
|
120
120
|
|
|
121
121
|
var isMenuItemEnabled = function(bOverlayIsSibling, aOverlays) {
|
|
@@ -135,7 +135,7 @@ sap.ui.define([
|
|
|
135
135
|
}
|
|
136
136
|
bOverlayIsSibling = false;
|
|
137
137
|
sPluginId = "CTX_CREATE_CHILD_CONTAINER";
|
|
138
|
-
iRank =
|
|
138
|
+
iRank = this.getRank(sPluginId);
|
|
139
139
|
}
|
|
140
140
|
return aMenuItems;
|
|
141
141
|
};
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
* @extends sap.ui.dt.plugin.CutPaste
|
|
33
33
|
*
|
|
34
34
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.127.0
|
|
36
36
|
*
|
|
37
37
|
* @constructor
|
|
38
38
|
* @private
|
|
@@ -182,7 +182,7 @@ sap.ui.define([
|
|
|
182
182
|
enabled: function(aElementOverlays) {
|
|
183
183
|
return this.isElementPasteable(aElementOverlays[0]);
|
|
184
184
|
}.bind(this),
|
|
185
|
-
rank:
|
|
185
|
+
rank: this.getRank("CTX_PASTE"),
|
|
186
186
|
icon: "sap-icon://paste"
|
|
187
187
|
}, aElementOverlays, ["move"]);
|
|
188
188
|
var aResponsibleElementOverlays = oPasteMenuItem.responsible || aElementOverlays;
|
|
@@ -197,7 +197,7 @@ sap.ui.define([
|
|
|
197
197
|
enabled(aElementOverlays) {
|
|
198
198
|
return aElementOverlays.length === 1;
|
|
199
199
|
},
|
|
200
|
-
rank:
|
|
200
|
+
rank: this.getRank("CTX_CUT"),
|
|
201
201
|
icon: "sap-icon://scissors"
|
|
202
202
|
}, aElementOverlays, ["move"]);
|
|
203
203
|
aMenuItems.push(oCutMenuItem, oPasteMenuItem);
|
|
@@ -41,7 +41,7 @@ sap.ui.define([
|
|
|
41
41
|
* @class
|
|
42
42
|
* @extends sap.ui.rta.plugin.Plugin
|
|
43
43
|
* @author SAP SE
|
|
44
|
-
* @version 1.
|
|
44
|
+
* @version 1.127.0
|
|
45
45
|
* @constructor
|
|
46
46
|
* @private
|
|
47
47
|
* @since 1.90
|
|
@@ -113,7 +113,10 @@ sap.ui.define([
|
|
|
113
113
|
* @return {object[]} Array of the items with required data
|
|
114
114
|
*/
|
|
115
115
|
LocalReset.prototype.getMenuItems = function(vElementOverlays) {
|
|
116
|
-
return this._getMenuItems(vElementOverlays, {
|
|
116
|
+
return this._getMenuItems(vElementOverlays, {
|
|
117
|
+
pluginId: "CTX_LOCAL_RESET",
|
|
118
|
+
icon: "sap-icon://reset"
|
|
119
|
+
});
|
|
117
120
|
};
|
|
118
121
|
|
|
119
122
|
/**
|
|
@@ -24,6 +24,39 @@ sap.ui.define([
|
|
|
24
24
|
) {
|
|
25
25
|
"use strict";
|
|
26
26
|
|
|
27
|
+
// The ranks define the order of the plugin actions in the context menu
|
|
28
|
+
const CONTEXT_MENU_RANKS = {
|
|
29
|
+
CTX_RENAME: 10,
|
|
30
|
+
CTX_ADD_ELEMENTS_AS_SIBLING: 20,
|
|
31
|
+
CTX_ADD_ELEMENTS_AS_CHILD: 25,
|
|
32
|
+
CTX_ADD_ELEMENTS_CHILD_AND_SIBLING: 30,
|
|
33
|
+
CTX_CREATE_SIBLING_CONTAINER: 40,
|
|
34
|
+
CTX_CREATE_CHILD_CONTAINER: 50,
|
|
35
|
+
CTX_REMOVE: 60,
|
|
36
|
+
CTX_LOCAL_RESET: 65,
|
|
37
|
+
CTX_CUT: 70,
|
|
38
|
+
CTX_PASTE: 80,
|
|
39
|
+
CTX_GROUP_FIELDS: 90,
|
|
40
|
+
CTX_UNGROUP_FIELDS: 100,
|
|
41
|
+
CTX_ADDXML_AT_EXTENSIONPOINT: 105,
|
|
42
|
+
// Settings ranks go up 1 by 1 for each setting
|
|
43
|
+
CTX_SETTINGS: 110,
|
|
44
|
+
// IFrame ranks go up 1 by 1 for each possible child target
|
|
45
|
+
CTX_CREATE_SIBLING_IFRAME: 130,
|
|
46
|
+
// Variant types are mutually exclusive
|
|
47
|
+
CTX_VARIANT_SET_TITLE: 140,
|
|
48
|
+
CTX_COMP_VARIANT_RENAME: 140,
|
|
49
|
+
CTX_VARIANT_SAVE: 150,
|
|
50
|
+
CTX_COMP_VARIANT_SAVE: 150,
|
|
51
|
+
CTX_VARIANT_SAVEAS: 160,
|
|
52
|
+
CTX_COMP_VARIANT_SAVE_AS: 160,
|
|
53
|
+
CTX_VARIANT_MANAGE: 170,
|
|
54
|
+
CTX_COMP_VARIANT_MANAGE: 170,
|
|
55
|
+
CTX_VARIANT_SWITCH_SUBMENU: 180,
|
|
56
|
+
CTX_COMP_VARIANT_SWITCH: 180,
|
|
57
|
+
CTX_COMP_VARIANT_CONTENT: 190
|
|
58
|
+
};
|
|
59
|
+
|
|
27
60
|
function _handleEditableByPlugin(mPropertyBag, aPromises, oSourceElementOverlay) {
|
|
28
61
|
// when a control gets destroyed it gets deregistered before it gets removed from the parent aggregation.
|
|
29
62
|
// this means that getElementInstance is undefined when we get here via removeAggregation mutation
|
|
@@ -70,7 +103,7 @@ sap.ui.define([
|
|
|
70
103
|
* @extends sap.ui.dt.Plugin
|
|
71
104
|
*
|
|
72
105
|
* @author SAP SE
|
|
73
|
-
* @version 1.
|
|
106
|
+
* @version 1.127.0
|
|
74
107
|
*
|
|
75
108
|
* @constructor
|
|
76
109
|
* @private
|
|
@@ -438,5 +471,30 @@ sap.ui.define([
|
|
|
438
471
|
return Promise.resolve(false);
|
|
439
472
|
};
|
|
440
473
|
|
|
474
|
+
/**
|
|
475
|
+
* Returns the rank (order) of the plugin action in the context menu.
|
|
476
|
+
* @param {string} sPluginId Plugin ID
|
|
477
|
+
* @return {number} Rank of the plugin action
|
|
478
|
+
*/
|
|
479
|
+
BasePlugin.prototype.getRank = function(sPluginId) {
|
|
480
|
+
return CONTEXT_MENU_RANKS[sPluginId];
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Generic function to return the menu items for a context menu.
|
|
485
|
+
* Retrieves the rank and then calls the method from the DT Plugin.
|
|
486
|
+
* @param {sap.ui.dt.ElementOverlay[]} aElementOverlays - Target overlays
|
|
487
|
+
* @param {object} mPropertyBag Additional properties for the menu item
|
|
488
|
+
* @param {string} mPropertyBag.pluginId The ID of the plugin
|
|
489
|
+
* @param {string} mPropertyBag.icon an icon for the Button inside the context menu
|
|
490
|
+
* @param {string} mPropertyBag.group A group for buttons which should be grouped together in the MiniMenu
|
|
491
|
+
* @param {number} [mPropertyBag.rank] The rank (order) of the plugin action in the context menu
|
|
492
|
+
* @return {object[]} Returns an array with the object containing the required data for a context menu item
|
|
493
|
+
*/
|
|
494
|
+
BasePlugin.prototype._getMenuItems = function(aElementOverlays, mPropertyBag) {
|
|
495
|
+
mPropertyBag.rank ||= this.getRank(mPropertyBag.pluginId);
|
|
496
|
+
return Plugin.prototype._getMenuItems.apply(this, [aElementOverlays, mPropertyBag]);
|
|
497
|
+
};
|
|
498
|
+
|
|
441
499
|
return BasePlugin;
|
|
442
|
-
});
|
|
500
|
+
});
|
|
@@ -29,7 +29,7 @@ sap.ui.define([
|
|
|
29
29
|
* @class The Remove allows trigger remove operations on the overlay
|
|
30
30
|
* @extends sap.ui.rta.plugin.Plugin
|
|
31
31
|
* @author SAP SE
|
|
32
|
-
* @version 1.
|
|
32
|
+
* @version 1.127.0
|
|
33
33
|
* @constructor
|
|
34
34
|
* @private
|
|
35
35
|
* @since 1.34
|
|
@@ -309,7 +309,7 @@ sap.ui.define([
|
|
|
309
309
|
* @return {object[]} - array of the items with required data
|
|
310
310
|
*/
|
|
311
311
|
Remove.prototype.getMenuItems = function(aElementOverlays) {
|
|
312
|
-
return this._getMenuItems(aElementOverlays, {pluginId: "CTX_REMOVE",
|
|
312
|
+
return this._getMenuItems(aElementOverlays, {pluginId: "CTX_REMOVE", icon: "sap-icon://less"});
|
|
313
313
|
};
|
|
314
314
|
|
|
315
315
|
/**
|
|
@@ -28,7 +28,7 @@ sap.ui.define([
|
|
|
28
28
|
* @extends sap.ui.rta.plugin.Plugin
|
|
29
29
|
*
|
|
30
30
|
* @author SAP SE
|
|
31
|
-
* @version 1.
|
|
31
|
+
* @version 1.127.0
|
|
32
32
|
*
|
|
33
33
|
* @constructor
|
|
34
34
|
* @private
|
|
@@ -213,7 +213,7 @@ sap.ui.define([
|
|
|
213
213
|
* @return {object[]} - array of the items with required data
|
|
214
214
|
*/
|
|
215
215
|
Rename.prototype.getMenuItems = function(vElementOverlays) {
|
|
216
|
-
return this._getMenuItems(vElementOverlays, { pluginId: "CTX_RENAME",
|
|
216
|
+
return this._getMenuItems(vElementOverlays, { pluginId: "CTX_RENAME", icon: "sap-icon://edit" });
|
|
217
217
|
};
|
|
218
218
|
|
|
219
219
|
/**
|
|
@@ -31,7 +31,7 @@ sap.ui.define([
|
|
|
31
31
|
* @class The Selection plugin allows you to select or focus overlays with mouse or keyboard and navigate to others.
|
|
32
32
|
* @extends sap.ui.rta.plugin.Plugin
|
|
33
33
|
* @author SAP SE
|
|
34
|
-
* @version 1.
|
|
34
|
+
* @version 1.127.0
|
|
35
35
|
* @constructor
|
|
36
36
|
* @private
|
|
37
37
|
* @since 1.34
|
|
@@ -347,7 +347,7 @@ sap.ui.define([
|
|
|
347
347
|
if (oOverlay !== this._oHoverTarget) {
|
|
348
348
|
this._removePreviousHover();
|
|
349
349
|
this._oHoverTarget = oOverlay;
|
|
350
|
-
|
|
350
|
+
this.getDesignTime().getSelectionManager().addHover(oOverlay);
|
|
351
351
|
}
|
|
352
352
|
preventEventDefaultAndPropagation(oEvent);
|
|
353
353
|
}
|
|
@@ -380,7 +380,7 @@ sap.ui.define([
|
|
|
380
380
|
*/
|
|
381
381
|
Selection.prototype._removePreviousHover = function() {
|
|
382
382
|
if (this._oHoverTarget) {
|
|
383
|
-
this.
|
|
383
|
+
this.getDesignTime().getSelectionManager().removeHover(this._oHoverTarget);
|
|
384
384
|
}
|
|
385
385
|
delete this._oHoverTarget;
|
|
386
386
|
};
|
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
* @class The Settings allows trigger change of settings operations on the overlay
|
|
26
26
|
* @extends sap.ui.rta.plugin.Plugin
|
|
27
27
|
* @author SAP SE
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.127.0
|
|
29
29
|
* @constructor
|
|
30
30
|
* @private
|
|
31
31
|
* @since 1.44
|
|
@@ -255,7 +255,7 @@ sap.ui.define([
|
|
|
255
255
|
|
|
256
256
|
const aMenuItems = [];
|
|
257
257
|
if (vSettingsActions) {
|
|
258
|
-
const iRank =
|
|
258
|
+
const iRank = this.getRank("CTX_SETTINGS");
|
|
259
259
|
|
|
260
260
|
if (vSettingsActions.handler) {
|
|
261
261
|
vSettingsActions = {
|
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
* @class
|
|
24
24
|
* @extends sap.ui.rta.plugin.Plugin
|
|
25
25
|
* @author SAP SE
|
|
26
|
-
* @version 1.
|
|
26
|
+
* @version 1.127.0
|
|
27
27
|
* @constructor
|
|
28
28
|
* @private
|
|
29
29
|
* @since 1.46
|
|
@@ -154,7 +154,7 @@ sap.ui.define([
|
|
|
154
154
|
* @return {object[]} - array of the items with required data
|
|
155
155
|
*/
|
|
156
156
|
Split.prototype.getMenuItems = function(vElementOverlays) {
|
|
157
|
-
return this._getMenuItems(vElementOverlays, {pluginId: "CTX_UNGROUP_FIELDS",
|
|
157
|
+
return this._getMenuItems(vElementOverlays, {pluginId: "CTX_UNGROUP_FIELDS", icon: "sap-icon://split"});
|
|
158
158
|
};
|
|
159
159
|
|
|
160
160
|
/**
|
|
@@ -119,7 +119,7 @@ sap.ui.define([
|
|
|
119
119
|
* @class The plugin allows to add additional elements that exist either hidden in the UI or in the OData service
|
|
120
120
|
* @extends sap.ui.rta.plugin.Plugin
|
|
121
121
|
* @author SAP SE
|
|
122
|
-
* @version 1.
|
|
122
|
+
* @version 1.127.0
|
|
123
123
|
* @constructor
|
|
124
124
|
* @private
|
|
125
125
|
* @since 1.44
|
|
@@ -608,7 +608,7 @@ sap.ui.define([
|
|
|
608
608
|
enabled: bHasSubMenu || function(bOverlayIsSibling, aElementOverlays) {
|
|
609
609
|
return this.isEnabled(aElementOverlays, bOverlayIsSibling, sAggregationName);
|
|
610
610
|
}.bind(this, bOverlayIsSibling),
|
|
611
|
-
rank:
|
|
611
|
+
rank: this.getRank(sPluginId),
|
|
612
612
|
icon: "sap-icon://add",
|
|
613
613
|
handler: vHandler
|
|
614
614
|
};
|
|
@@ -119,7 +119,7 @@ sap.ui.define([
|
|
|
119
119
|
* @class The AddIFrame allows trigger AddIFrame operations on the overlay.
|
|
120
120
|
* @extends sap.ui.rta.plugin.BaseCreate
|
|
121
121
|
* @author SAP SE
|
|
122
|
-
* @version 1.
|
|
122
|
+
* @version 1.127.0
|
|
123
123
|
* @constructor
|
|
124
124
|
* @private
|
|
125
125
|
* @since 1.75
|
|
@@ -177,7 +177,7 @@ sap.ui.define([
|
|
|
177
177
|
});
|
|
178
178
|
await IconPool.fontLoaded("tnt");
|
|
179
179
|
|
|
180
|
-
var iBaseRank =
|
|
180
|
+
var iBaseRank = this.getRank("CTX_CREATE_SIBLING_IFRAME");
|
|
181
181
|
var aMenuItems = [];
|
|
182
182
|
|
|
183
183
|
var bIsSibling = true;
|
|
@@ -191,18 +191,17 @@ sap.ui.define([
|
|
|
191
191
|
}, getCommonProperties.call(this));
|
|
192
192
|
|
|
193
193
|
aMenuItems.push(this.enhanceItemWithResponsibleElement(oSiblingMenuItem, aElementOverlays));
|
|
194
|
-
iBaseRank += 10;
|
|
195
194
|
}
|
|
196
195
|
}
|
|
197
196
|
|
|
198
197
|
bIsSibling = false;
|
|
199
198
|
if (this.isAvailable(aElementOverlays, bIsSibling)) {
|
|
200
199
|
aMenuItems = aMenuItems.concat(this.getCreateActions(bIsSibling, aElementOverlays[0])
|
|
201
|
-
.map(function(oAction
|
|
200
|
+
.map(function(oAction) {
|
|
202
201
|
var oParentMenuItem = Object.assign({
|
|
203
202
|
action: oAction,
|
|
204
203
|
id: `CTX_CREATE_CHILD_IFRAME_${oAction.aggregation.toUpperCase()}`,
|
|
205
|
-
rank: iBaseRank
|
|
204
|
+
rank: ++iBaseRank
|
|
206
205
|
}, getCommonProperties.call(this, oAction.aggregation));
|
|
207
206
|
|
|
208
207
|
return this.enhanceItemWithResponsibleElement(oParentMenuItem, aElementOverlays);
|
|
@@ -158,7 +158,7 @@ sap.ui.define([
|
|
|
158
158
|
* @class Context - Dialog for IFrame settings in Runtime Authoring
|
|
159
159
|
* @extends sap.ui.base.ManagedObject
|
|
160
160
|
* @author SAP SE
|
|
161
|
-
* @version 1.
|
|
161
|
+
* @version 1.127.0
|
|
162
162
|
* @constructor
|
|
163
163
|
* @private
|
|
164
164
|
* @since 1.78
|
|
@@ -261,37 +261,48 @@ sap.ui.define([
|
|
|
261
261
|
* @param {sap.ui.base.ManagedObject} oObject - Managed object to extract the context from
|
|
262
262
|
* @return {Promise<object[]>} Resolving to parameters array for URL builder exposed by the Add IFrame dialog
|
|
263
263
|
*/
|
|
264
|
-
AddIFrameDialog.buildUrlBuilderParametersFor = function(oObject) {
|
|
265
|
-
|
|
266
|
-
.
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
264
|
+
AddIFrameDialog.buildUrlBuilderParametersFor = async function(oObject) {
|
|
265
|
+
const oUserInfo = await getContainerUserInfo();
|
|
266
|
+
const oUserParameters = Object.keys(oUserInfo)
|
|
267
|
+
.map(function(sUserSetting) {
|
|
268
|
+
return {
|
|
269
|
+
label: sUserSetting,
|
|
270
|
+
key: `{$user>/${sUserSetting}}`,
|
|
271
|
+
value: oUserInfo[sUserSetting]
|
|
272
|
+
};
|
|
273
|
+
});
|
|
274
|
+
const oBindingContext = oObject.getBindingContext();
|
|
275
|
+
let aDefaultBoundObjectParameters;
|
|
276
|
+
if (oBindingContext) {
|
|
277
|
+
const oDefaultBoundObject = oBindingContext.getObject();
|
|
278
|
+
aDefaultBoundObjectParameters = Object.keys(oDefaultBoundObject)
|
|
279
|
+
.filter(function(sProperty) {
|
|
280
|
+
return typeof oDefaultBoundObject[sProperty] !== "object";
|
|
281
|
+
})
|
|
282
|
+
.map(async function(sProperty) {
|
|
283
|
+
const oModel = oBindingContext.getModel();
|
|
284
|
+
const oReturn = {
|
|
285
|
+
label: sProperty,
|
|
286
|
+
key: `{${sProperty}}`,
|
|
287
|
+
value: oDefaultBoundObject[sProperty]
|
|
273
288
|
};
|
|
289
|
+
// V4 Models automatically adjust values for certain data types based on localization settings,
|
|
290
|
+
// which can make them different from what we display on the table of parameters. We get the data
|
|
291
|
+
// type here to add the parameter to the URL later with the same value that was displayed on the table.
|
|
292
|
+
if (oModel.isA("sap.ui.model.odata.v4.ODataModel")) {
|
|
293
|
+
const oMetaModel = oModel.getMetaModel();
|
|
294
|
+
const sMetaPath = oMetaModel.getMetaPath(oBindingContext.getPath());
|
|
295
|
+
const sType = await oMetaModel.requestObject(`${sMetaPath}/${sProperty}/$Type`);
|
|
296
|
+
if (sType) {
|
|
297
|
+
oReturn.type = sType;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
return oReturn;
|
|
274
301
|
});
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
oDefaultBoundObjectParameters = Object.keys(oDefaultBoundObject)
|
|
280
|
-
.filter(function(sProperty) {
|
|
281
|
-
return typeof oDefaultBoundObject[sProperty] !== "object";
|
|
282
|
-
})
|
|
283
|
-
.map(function(sProperty) {
|
|
284
|
-
return {
|
|
285
|
-
label: sProperty,
|
|
286
|
-
key: `{${sProperty}}`,
|
|
287
|
-
value: oDefaultBoundObject[sProperty]
|
|
288
|
-
};
|
|
289
|
-
});
|
|
290
|
-
} else {
|
|
291
|
-
oDefaultBoundObjectParameters = [];
|
|
292
|
-
}
|
|
293
|
-
return oUserParameters.concat(oDefaultBoundObjectParameters);
|
|
294
|
-
});
|
|
302
|
+
} else {
|
|
303
|
+
aDefaultBoundObjectParameters = [];
|
|
304
|
+
}
|
|
305
|
+
return oUserParameters.concat(await Promise.all(aDefaultBoundObjectParameters));
|
|
295
306
|
};
|
|
296
307
|
|
|
297
308
|
return AddIFrameDialog;
|
|
@@ -165,8 +165,8 @@ sap.ui.define([
|
|
|
165
165
|
* @param {sap.ui.base.Event} oEvent - Event
|
|
166
166
|
*/
|
|
167
167
|
onParameterPress(oEvent) {
|
|
168
|
-
const
|
|
169
|
-
this._oJSONModel.setProperty("/frameUrl/value", this._addURLParameter(
|
|
168
|
+
const oObject = oEvent.getSource().getBindingContext("dialogInfo").getObject();
|
|
169
|
+
this._oJSONModel.setProperty("/frameUrl/value", this._addURLParameter(oObject));
|
|
170
170
|
this.onValidateUrl();
|
|
171
171
|
},
|
|
172
172
|
|
|
@@ -201,16 +201,28 @@ sap.ui.define([
|
|
|
201
201
|
/**
|
|
202
202
|
* Add URL parameter
|
|
203
203
|
*
|
|
204
|
-
* @param {
|
|
204
|
+
* @param {object} oObject - Parameter object
|
|
205
205
|
* @returns {string} URL with the added parameter
|
|
206
206
|
* @private
|
|
207
207
|
*/
|
|
208
|
-
_addURLParameter(
|
|
208
|
+
_addURLParameter(oObject) {
|
|
209
|
+
const sParameterKey = oObject.key;
|
|
210
|
+
let sParameterString;
|
|
211
|
+
// If the type is available, this is an OData V4 Model and the target type must be set to 'any' when adding the parameter
|
|
212
|
+
// to the URL to prevent it from being resolved to a localized value.
|
|
213
|
+
// E.g. boolean is resolved to "yes/no" in a system with English locale - but we need to add "true/false" to the URL
|
|
214
|
+
// The only type that does not require this special handling is Edm.String
|
|
215
|
+
if (oObject.type && oObject.type !== "Edm.String") {
|
|
216
|
+
const [, sParameter] = sParameterKey.match(/\{(.+?)\}/);
|
|
217
|
+
sParameterString = `{path:'${sParameter}',targetType:'any'}`;
|
|
218
|
+
} else {
|
|
219
|
+
sParameterString = sParameterKey;
|
|
220
|
+
}
|
|
209
221
|
const oTextField = Element.getElementById("sapUiRtaAddIFrameDialog_EditUrlTA");
|
|
210
222
|
const iCurrentSelectionStart = oTextField.getFocusDomRef().selectionStart;
|
|
211
223
|
const iCurrentSelectionEnd = oTextField.getFocusDomRef().selectionEnd;
|
|
212
224
|
const sCurrentUrl = this._buildReturnedURL();
|
|
213
|
-
return `${sCurrentUrl.substring(0, iCurrentSelectionStart)}${
|
|
225
|
+
return `${sCurrentUrl.substring(0, iCurrentSelectionStart)}${sParameterString}${sCurrentUrl.substring(iCurrentSelectionEnd)}`;
|
|
214
226
|
},
|
|
215
227
|
|
|
216
228
|
/**
|