@openui5/sap.ui.rta 1.134.0 → 1.136.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/REUSE.toml +649 -0
- package/THIRDPARTY.txt +23 -23
- package/package.json +6 -6
- package/src/sap/ui/rta/.library +2 -2
- package/src/sap/ui/rta/Client.js +2 -2
- package/src/sap/ui/rta/RuntimeAuthoring.js +124 -28
- package/src/sap/ui/rta/Utils.js +19 -2
- package/src/sap/ui/rta/api/startAdaptation.js +1 -1
- package/src/sap/ui/rta/api/startKeyUserAdaptation.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +26 -26
- package/src/sap/ui/rta/appVariant/AppVariantOverviewDialog.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +1 -1
- package/src/sap/ui/rta/appVariant/Feature.js +72 -72
- package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +1 -1
- package/src/sap/ui/rta/appVariant/Utils.js +27 -36
- package/src/sap/ui/rta/appVariant/manageApps/webapp/Component.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +54 -68
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_fr_CA.properties +2 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/index.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
- package/src/sap/ui/rta/command/AddIFrame.js +2 -2
- package/src/sap/ui/rta/command/AddProperty.js +2 -2
- package/src/sap/ui/rta/command/AddXML.js +2 -2
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +2 -2
- package/src/sap/ui/rta/command/AnnotationCommand.js +66 -6
- package/src/sap/ui/rta/command/BaseCommand.js +2 -2
- package/src/sap/ui/rta/command/BindProperty.js +2 -2
- package/src/sap/ui/rta/command/Combine.js +2 -2
- package/src/sap/ui/rta/command/CommandFactory.js +72 -48
- package/src/sap/ui/rta/command/CompositeCommand.js +13 -13
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantSave.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +2 -2
- package/src/sap/ui/rta/command/CreateContainer.js +2 -2
- package/src/sap/ui/rta/command/CustomAdd.js +2 -2
- package/src/sap/ui/rta/command/ExtendControllerCommand.js +93 -0
- package/src/sap/ui/rta/command/FlexCommand.js +55 -44
- package/src/sap/ui/rta/command/LREPSerializer.js +24 -24
- package/src/sap/ui/rta/command/LocalReset.js +2 -2
- package/src/sap/ui/rta/command/ManifestCommand.js +112 -0
- package/src/sap/ui/rta/command/Move.js +2 -2
- package/src/sap/ui/rta/command/Property.js +2 -2
- package/src/sap/ui/rta/command/Remove.js +2 -2
- package/src/sap/ui/rta/command/Rename.js +2 -2
- package/src/sap/ui/rta/command/Resize.js +2 -2
- package/src/sap/ui/rta/command/Reveal.js +2 -2
- package/src/sap/ui/rta/command/Settings.js +2 -2
- package/src/sap/ui/rta/command/Split.js +2 -2
- package/src/sap/ui/rta/command/Stack.js +20 -5
- package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +2 -2
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +2 -2
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +2 -2
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +2 -2
- package/src/sap/ui/rta/command/{appDescriptor → manifest}/AddLibrary.js +11 -11
- package/src/sap/ui/rta/enablement/TestDelegate.js +1 -1
- package/src/sap/ui/rta/enablement/elementActionTest.js +2 -2
- package/src/sap/ui/rta/library.js +3 -3
- package/src/sap/ui/rta/messagebundle.properties +181 -9
- package/src/sap/ui/rta/messagebundle_ar.properties +105 -6
- package/src/sap/ui/rta/messagebundle_bg.properties +105 -6
- package/src/sap/ui/rta/messagebundle_ca.properties +108 -9
- package/src/sap/ui/rta/messagebundle_cnr.properties +106 -7
- package/src/sap/ui/rta/messagebundle_cs.properties +103 -4
- package/src/sap/ui/rta/messagebundle_cy.properties +105 -6
- package/src/sap/ui/rta/messagebundle_da.properties +104 -5
- package/src/sap/ui/rta/messagebundle_de.properties +114 -15
- package/src/sap/ui/rta/messagebundle_el.properties +102 -3
- package/src/sap/ui/rta/messagebundle_en.properties +105 -6
- package/src/sap/ui/rta/messagebundle_en_GB.properties +105 -6
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +9 -1
- package/src/sap/ui/rta/messagebundle_es.properties +109 -10
- package/src/sap/ui/rta/messagebundle_es_MX.properties +113 -14
- package/src/sap/ui/rta/messagebundle_et.properties +103 -4
- package/src/sap/ui/rta/messagebundle_fi.properties +107 -8
- package/src/sap/ui/rta/messagebundle_fr.properties +123 -24
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +110 -11
- package/src/sap/ui/rta/messagebundle_hi.properties +105 -6
- package/src/sap/ui/rta/messagebundle_hr.properties +145 -46
- package/src/sap/ui/rta/messagebundle_hu.properties +104 -5
- package/src/sap/ui/rta/messagebundle_id.properties +113 -14
- package/src/sap/ui/rta/messagebundle_it.properties +146 -47
- package/src/sap/ui/rta/messagebundle_iw.properties +105 -6
- package/src/sap/ui/rta/messagebundle_ja.properties +117 -18
- package/src/sap/ui/rta/messagebundle_kk.properties +104 -5
- package/src/sap/ui/rta/messagebundle_ko.properties +105 -6
- package/src/sap/ui/rta/messagebundle_lt.properties +105 -6
- package/src/sap/ui/rta/messagebundle_lv.properties +104 -5
- package/src/sap/ui/rta/messagebundle_mk.properties +108 -9
- package/src/sap/ui/rta/messagebundle_ms.properties +115 -16
- package/src/sap/ui/rta/messagebundle_nl.properties +104 -5
- package/src/sap/ui/rta/messagebundle_no.properties +108 -9
- package/src/sap/ui/rta/messagebundle_pl.properties +104 -5
- package/src/sap/ui/rta/messagebundle_pt.properties +103 -4
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +103 -4
- package/src/sap/ui/rta/messagebundle_ro.properties +103 -4
- package/src/sap/ui/rta/messagebundle_ru.properties +107 -8
- package/src/sap/ui/rta/messagebundle_sh.properties +106 -7
- package/src/sap/ui/rta/messagebundle_sk.properties +103 -4
- package/src/sap/ui/rta/messagebundle_sl.properties +103 -4
- package/src/sap/ui/rta/messagebundle_sr.properties +106 -7
- package/src/sap/ui/rta/messagebundle_sv.properties +104 -5
- package/src/sap/ui/rta/messagebundle_th.properties +104 -5
- package/src/sap/ui/rta/messagebundle_tr.properties +103 -4
- package/src/sap/ui/rta/messagebundle_uk.properties +105 -6
- package/src/sap/ui/rta/messagebundle_vi.properties +105 -6
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +104 -5
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +105 -6
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +34 -34
- package/src/sap/ui/rta/plugin/AddXMLPlugin.js +54 -32
- package/src/sap/ui/rta/plugin/BaseCreate.js +2 -2
- package/src/sap/ui/rta/plugin/Combine.js +2 -2
- package/src/sap/ui/rta/plugin/CompVariant.js +114 -114
- package/src/sap/ui/rta/plugin/ControlVariant.js +37 -54
- package/src/sap/ui/rta/plugin/CreateContainer.js +2 -2
- package/src/sap/ui/rta/plugin/CutPaste.js +2 -2
- package/src/sap/ui/rta/plugin/DragDrop.js +2 -2
- package/src/sap/ui/rta/plugin/ExtendControllerPlugin.js +172 -0
- package/src/sap/ui/rta/plugin/LocalReset.js +4 -3
- package/src/sap/ui/rta/plugin/Plugin.js +31 -11
- package/src/sap/ui/rta/plugin/RTAElementMover.js +2 -2
- package/src/sap/ui/rta/plugin/Remove.js +2 -2
- package/src/sap/ui/rta/plugin/Resize.js +2 -2
- package/src/sap/ui/rta/plugin/Selection.js +2 -2
- package/src/sap/ui/rta/plugin/Settings.js +75 -62
- package/src/sap/ui/rta/plugin/Split.js +2 -2
- package/src/sap/ui/rta/plugin/Stretch.js +2 -2
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +2 -2
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +2 -2
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +2 -2
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +2 -2
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +2 -2
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.fragment.xml +13 -9
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +75 -13
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +38 -32
- package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +61 -21
- package/src/sap/ui/rta/plugin/annotations/AnnotationTypes.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +8 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +2 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +1 -1
- package/src/sap/ui/rta/plugin/{Rename.js → rename/Rename.js} +29 -67
- package/src/sap/ui/rta/plugin/rename/RenameDialog.fragment.xml +63 -0
- package/src/sap/ui/rta/plugin/rename/RenameDialog.js +140 -0
- package/src/sap/ui/rta/service/Action.js +2 -2
- package/src/sap/ui/rta/service/ControllerExtension.js +11 -5
- package/src/sap/ui/rta/service/Outline.js +2 -2
- package/src/sap/ui/rta/service/Property.js +2 -2
- package/src/sap/ui/rta/service/Receiver.js +1 -1
- package/src/sap/ui/rta/service/Selection.js +2 -2
- package/src/sap/ui/rta/service/SupportTools.js +2 -2
- package/src/sap/ui/rta/service/index.js +1 -1
- package/src/sap/ui/rta/themes/base/Toolbar.adaptation.less +5 -0
- package/src/sap/ui/rta/themes/base/library.source.less +1 -1
- package/src/sap/ui/rta/themes/sap_hcb/library.source.less +1 -1
- package/src/sap/ui/rta/toolbar/ActionsMenu.fragment.xml +6 -0
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +22 -9
- package/src/sap/ui/rta/toolbar/Adaptation.js +44 -9
- package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
- package/src/sap/ui/rta/toolbar/Base.js +2 -2
- package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -1
- package/src/sap/ui/rta/toolbar/Fiori.js +19 -10
- package/src/sap/ui/rta/toolbar/FioriLike.js +7 -5
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +2 -2
- package/src/sap/ui/rta/toolbar/Standalone.js +2 -2
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +2 -2
- package/src/sap/ui/rta/toolbar/translation/Translation.js +2 -2
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +2 -2
- package/src/sap/ui/rta/util/Animation.js +1 -1
- package/src/sap/ui/rta/util/BindingsExtractor.js +1 -1
- package/src/sap/ui/rta/util/PluginManager.js +8 -6
- package/src/sap/ui/rta/util/PopupManager.js +2 -2
- package/src/sap/ui/rta/util/ReloadManager.js +2 -2
- package/src/sap/ui/rta/util/ServiceEventBus.js +2 -2
- package/src/sap/ui/rta/util/ServiceManager.js +2 -2
- package/src/sap/ui/rta/util/adaptationStarter.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeCategories.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +2 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +2 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +4 -4
- 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 +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/RenameVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/getCommandVisualization.js +1 -1
- package/src/sap/ui/rta/util/guidedTour/GuidedTour.js +242 -0
- package/src/sap/ui/rta/util/guidedTour/TourMarker.fragment.xml +50 -0
- package/src/sap/ui/rta/util/guidedTour/content/GeneralTour.js +205 -0
- package/src/sap/ui/rta/util/hasStableId.js +1 -1
- package/src/sap/ui/rta/util/isReuseComponent.js +1 -1
- package/src/sap/ui/rta/util/showMessageBox.js +1 -1
- package/src/sap/ui/rta/util/validateFlexEnabled.js +1 -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/whatsNew/WhatsNew.js +8 -4
- package/src/sap/ui/rta/util/whatsNew/WhatsNewDialog.fragment.xml +1 -1
- package/src/sap/ui/rta/util/whatsNew/WhatsNewOverview.js +1 -1
- package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +1 -1
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/WhatsNewFeatures.js +85 -1
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/ChangeLabelsAction.png +0 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/DisplayBehavior.png +0 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/ExtendedActions.png +0 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/GuidedTour.png +0 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/ReloadButtonToolbar.png +0 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/RenameDialog.png +0 -0
- package/ui5.yaml +1 -1
- package/.reuse/dep5 +0 -471
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +0 -114
- package/src/sap/ui/rta/plugin/RenameHandler.js +0 -477
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright
|
|
3
|
+
* (c) Copyright 2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -33,7 +33,7 @@ function(
|
|
|
33
33
|
* @extends sap.ui.dt.plugin.ControlDragDrop
|
|
34
34
|
*
|
|
35
35
|
* @author SAP SE
|
|
36
|
-
* @version 1.
|
|
36
|
+
* @version 1.136.0
|
|
37
37
|
*
|
|
38
38
|
* @constructor
|
|
39
39
|
* @private
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2025 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/ui/core/Lib",
|
|
9
|
+
"sap/ui/dt/Util",
|
|
10
|
+
"sap/ui/rta/plugin/Plugin"
|
|
11
|
+
], function(
|
|
12
|
+
Lib,
|
|
13
|
+
DtUtil,
|
|
14
|
+
Plugin
|
|
15
|
+
) {
|
|
16
|
+
"use strict";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @typedef {function} sap.ui.rta.plugin.ExtendController.handlerFunction
|
|
21
|
+
* @since 1.134
|
|
22
|
+
* @param {sap.ui.dt.ElementOverlay} oOverlay - Target overlay for where XML will be added
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Constructor for a new ExtendController plugin.
|
|
26
|
+
* The controller handler <code>{@link sap.ui.rta.plugin.ExtendController.handlerFunction HandlerFunction}</code>
|
|
27
|
+
* is a callback function that needs to be passed on instantiation of the plugin or alternatively into the
|
|
28
|
+
* propertyBag when the handler function is called.
|
|
29
|
+
*
|
|
30
|
+
* @class
|
|
31
|
+
* @extends sap.ui.rta.plugin.Plugin
|
|
32
|
+
* @author SAP SE
|
|
33
|
+
* @version 1.136.0
|
|
34
|
+
* @constructor
|
|
35
|
+
* @private
|
|
36
|
+
* @since 1.134
|
|
37
|
+
* @alias sap.ui.rta.plugin.ExtendControllerPlugin
|
|
38
|
+
*/
|
|
39
|
+
const ExtendControllerPlugin = Plugin
|
|
40
|
+
.extend("sap.ui.rta.plugin.ExtendController", /** @lends sap.ui.rta.plugin.ExtendControllerPlugin.prototype */ {
|
|
41
|
+
metadata: {
|
|
42
|
+
library: "sap.ui.rta",
|
|
43
|
+
properties: {
|
|
44
|
+
handlerFunction: {
|
|
45
|
+
type: "function"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
associations: {},
|
|
49
|
+
events: {}
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
const FLEX_CHANGE_TYPE = "codeExt";
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Check if the given overlay should be editable.
|
|
57
|
+
*
|
|
58
|
+
* @param {sap.ui.dt.ElementOverlay} oOverlay - Overlay to be checked for editable
|
|
59
|
+
* @returns {Promise<boolean>} <code>true</code> when editable wrapped in a promise
|
|
60
|
+
* @private
|
|
61
|
+
*/
|
|
62
|
+
ExtendControllerPlugin.prototype._isEditable = function() {
|
|
63
|
+
return Promise.resolve(true);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Checks if ExtendController is enabled for the given overlays
|
|
68
|
+
* @param {sap.ui.dt.ElementOverlay[]} aElementOverlays - Target overlays
|
|
69
|
+
* @returns {boolean} <code>true</code> if enabled
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
ExtendControllerPlugin.prototype.isEnabled = function(aElementOverlays) {
|
|
73
|
+
const bEnabled = aElementOverlays.length === 1 && !this.isInReuseComponentOnS4HanaCloud(aElementOverlays[0]);
|
|
74
|
+
return bEnabled;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Redefinition of getActionText to add special texts for the context menu
|
|
79
|
+
* @param {sap.ui.dt.ElementOverlay} oOverlay Overlay containing the Designtime Metadata
|
|
80
|
+
* @param {object} mAction The action data from the Designtime Metadata
|
|
81
|
+
* @param {string} sPluginId The ID of the plugin
|
|
82
|
+
* @returns {string} Returns the text for the menu item
|
|
83
|
+
*/
|
|
84
|
+
ExtendControllerPlugin.prototype.getActionText = function(oOverlay, mAction, sPluginId) {
|
|
85
|
+
const vName = mAction.name;
|
|
86
|
+
const oElement = oOverlay.getElement();
|
|
87
|
+
let sText;
|
|
88
|
+
if (vName) {
|
|
89
|
+
if (typeof vName === "function") {
|
|
90
|
+
return vName(oElement);
|
|
91
|
+
}
|
|
92
|
+
sText = oOverlay.getDesignTimeMetadata() ? oOverlay.getDesignTimeMetadata().getLibraryText(oElement, vName) : "";
|
|
93
|
+
} else {
|
|
94
|
+
sText = Lib.getResourceBundleFor("sap.ui.rta").getText(sPluginId);
|
|
95
|
+
}
|
|
96
|
+
// The case where the control is in a reuse component on S4HanaCloud
|
|
97
|
+
// is not enabled and has a special text in parenthesis on the context menu
|
|
98
|
+
if (this.isInReuseComponentOnS4HanaCloud(oOverlay)) {
|
|
99
|
+
sText += ` (${Lib.getResourceBundleFor("sap.ui.rta").getText("CTX_DISABLED_REUSE")})`;
|
|
100
|
+
}
|
|
101
|
+
return sText;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Triggers the plugin execution.
|
|
106
|
+
* @param {sap.ui.dt.ElementOverlay[]} aElementOverlays - Target overlays
|
|
107
|
+
* @param {Object} mPropertyBag - Property bag
|
|
108
|
+
* @param {sap.ui.rta.plugin.ExtentController.handlerFunction} [mPropertyBag.handlerFunction] - Handler function for controller handling. The controller handler is a callback function that needs to be passed here into the <code>propertyBag</code> or alternatively on instantiation of the plugin.
|
|
109
|
+
* @returns {Promise} Resolves when handler is executed successfully
|
|
110
|
+
*/
|
|
111
|
+
ExtendControllerPlugin.prototype.handler = async function(aElementOverlays, mPropertyBag) {
|
|
112
|
+
try {
|
|
113
|
+
const fnControllerHandler = mPropertyBag.handlerFunction || this.getHandlerFunction();
|
|
114
|
+
if (!fnControllerHandler) {
|
|
115
|
+
throw Error("Controller handler function is not available in the handler");
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const oElementOverlay = aElementOverlays[0];
|
|
119
|
+
|
|
120
|
+
const mExtendControllerData = await fnControllerHandler(oElementOverlay);
|
|
121
|
+
|
|
122
|
+
const oExtendControllerCommand = await this.getCommandFactory().getCommandFor(
|
|
123
|
+
oElementOverlay.getElement(),
|
|
124
|
+
FLEX_CHANGE_TYPE,
|
|
125
|
+
mExtendControllerData
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
this.fireElementModified({
|
|
129
|
+
command: oExtendControllerCommand
|
|
130
|
+
});
|
|
131
|
+
} catch (vError) {
|
|
132
|
+
throw DtUtil.propagateError(
|
|
133
|
+
vError,
|
|
134
|
+
"ExtentController#handler",
|
|
135
|
+
"Error occurred in ExtentController handler function",
|
|
136
|
+
"sap.ui.rta"
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Retrieves the context menu item for the action.
|
|
143
|
+
* @param {sap.ui.dt.ElementOverlay[]} aElementOverlays - Target overlays
|
|
144
|
+
* @returns {object[]} Array of the items with required data
|
|
145
|
+
*/
|
|
146
|
+
ExtendControllerPlugin.prototype.getMenuItems = function(aElementOverlays) {
|
|
147
|
+
return this._getMenuItems(aElementOverlays, {
|
|
148
|
+
pluginId: "CTX_EXTEND_CONTROLLER",
|
|
149
|
+
icon: "sap-icon://create-form"
|
|
150
|
+
});
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Gets the name of the action related to this plugin.
|
|
155
|
+
* @returns {string} Action name
|
|
156
|
+
*/
|
|
157
|
+
ExtendControllerPlugin.prototype.getActionName = function() {
|
|
158
|
+
return "extendController";
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Returns the action information when defined in the designtime metadata or an object with only the changeType.
|
|
163
|
+
* @param {sap.ui.dt.ElementOverlay} oOverlay - Overlay containing the Designtime Metadata
|
|
164
|
+
* @returns {object} Action information
|
|
165
|
+
*/
|
|
166
|
+
ExtendControllerPlugin.prototype.getAction = function(oOverlay) {
|
|
167
|
+
const oAction = Plugin.prototype.getAction.apply(this, [oOverlay]);
|
|
168
|
+
return oAction || { changeType: FLEX_CHANGE_TYPE };
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
return ExtendControllerPlugin;
|
|
172
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright
|
|
3
|
+
* (c) Copyright 2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -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.136.0
|
|
45
45
|
* @constructor
|
|
46
46
|
* @private
|
|
47
47
|
* @since 1.90
|
|
@@ -115,7 +115,8 @@ sap.ui.define([
|
|
|
115
115
|
LocalReset.prototype.getMenuItems = function(vElementOverlays) {
|
|
116
116
|
return this._getMenuItems(vElementOverlays, {
|
|
117
117
|
pluginId: "CTX_LOCAL_RESET",
|
|
118
|
-
icon: "sap-icon://reset"
|
|
118
|
+
icon: "sap-icon://reset",
|
|
119
|
+
additionalInfoKey: "LOCALRESET_RTA_CONTEXT_MENU_INFO"
|
|
119
120
|
});
|
|
120
121
|
};
|
|
121
122
|
|
|
@@ -1,32 +1,41 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright
|
|
3
|
+
* (c) Copyright 2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
// Provides class sap.ui.rta.plugin.Plugin.
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
"sap/base/util/restricted/_debounce",
|
|
10
|
-
"sap/ui/
|
|
11
|
-
"sap/ui/fl/write/api/ChangesWriteAPI",
|
|
10
|
+
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
12
11
|
"sap/ui/dt/OverlayRegistry",
|
|
13
12
|
"sap/ui/dt/OverlayUtil",
|
|
14
|
-
"sap/ui/
|
|
15
|
-
"sap/ui/
|
|
13
|
+
"sap/ui/dt/Plugin",
|
|
14
|
+
"sap/ui/fl/write/api/ChangesWriteAPI",
|
|
15
|
+
"sap/ui/fl/Utils",
|
|
16
|
+
"sap/ui/rta/util/hasStableId",
|
|
17
|
+
"sap/ui/rta/util/isReuseComponent",
|
|
18
|
+
"sap/ui/rta/Utils"
|
|
16
19
|
], function(
|
|
17
20
|
debounce,
|
|
18
|
-
|
|
19
|
-
ChangesWriteAPI,
|
|
21
|
+
JsControlTreeModifier,
|
|
20
22
|
OverlayRegistry,
|
|
21
23
|
OverlayUtil,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
Plugin,
|
|
25
|
+
ChangesWriteAPI,
|
|
26
|
+
Utils,
|
|
27
|
+
hasStableId,
|
|
28
|
+
isReuseComponent,
|
|
29
|
+
RtaUtils
|
|
24
30
|
) {
|
|
25
31
|
"use strict";
|
|
26
32
|
|
|
27
33
|
// The ranks define the order of the plugin actions in the context menu
|
|
28
34
|
const CONTEXT_MENU_RANKS = {
|
|
35
|
+
CTX_ADDXML: 3,
|
|
36
|
+
CTX_EXTEND_CONTROLLER: 5,
|
|
29
37
|
CTX_RENAME: 10,
|
|
38
|
+
CTX_ANNOTATION_CHANGE_SINGLE_LABEL: 12,
|
|
30
39
|
CTX_ADD_ELEMENTS_AS_SIBLING: 20,
|
|
31
40
|
CTX_ADD_ELEMENTS_AS_CHILD: 25,
|
|
32
41
|
CTX_ADD_ELEMENTS_CHILD_AND_SIBLING: 30,
|
|
@@ -39,7 +48,6 @@ sap.ui.define([
|
|
|
39
48
|
CTX_GROUP_FIELDS: 90,
|
|
40
49
|
CTX_UNGROUP_FIELDS: 100,
|
|
41
50
|
CTX_ADDXML_AT_EXTENSIONPOINT: 105,
|
|
42
|
-
CTX_ADDXML: 106,
|
|
43
51
|
// Settings ranks go up 1 by 1 for each setting
|
|
44
52
|
CTX_SETTINGS: 110,
|
|
45
53
|
// IFrame ranks go up 1 by 1 for each possible child target
|
|
@@ -106,7 +114,7 @@ sap.ui.define([
|
|
|
106
114
|
* @extends sap.ui.dt.Plugin
|
|
107
115
|
*
|
|
108
116
|
* @author SAP SE
|
|
109
|
-
* @version 1.
|
|
117
|
+
* @version 1.136.0
|
|
110
118
|
*
|
|
111
119
|
* @constructor
|
|
112
120
|
* @private
|
|
@@ -506,5 +514,17 @@ sap.ui.define([
|
|
|
506
514
|
return Plugin.prototype._getMenuItems.apply(this, [aElementOverlays, mPropertyBag]);
|
|
507
515
|
};
|
|
508
516
|
|
|
517
|
+
/**
|
|
518
|
+
* Checks if the control is a reuse component on S4HanaCloud. This is used to disable
|
|
519
|
+
* certain plugins under these circumstancces, e.g. AddXMLPlugin.
|
|
520
|
+
* @param {sap.ui.dt.ElementOverlay} oOverlay Overlay for the control to be checked
|
|
521
|
+
* @return {boolean} Whether the control is in a reuse component on S4HanaCloud
|
|
522
|
+
*/
|
|
523
|
+
BasePlugin.prototype.isInReuseComponentOnS4HanaCloud = function(oOverlay) {
|
|
524
|
+
const oComponent = Utils.getComponentForControl(oOverlay.getElement());
|
|
525
|
+
const bIsS4HanaCloud = RtaUtils.isS4HanaCloud();
|
|
526
|
+
return isReuseComponent(oComponent) && bIsS4HanaCloud;
|
|
527
|
+
};
|
|
528
|
+
|
|
509
529
|
return BasePlugin;
|
|
510
530
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright
|
|
3
|
+
* (c) Copyright 2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -35,7 +35,7 @@ function(
|
|
|
35
35
|
* The RTAElementMover is responsible for the RTA specific adaptation of element movements.
|
|
36
36
|
*
|
|
37
37
|
* @author SAP SE
|
|
38
|
-
* @version 1.
|
|
38
|
+
* @version 1.136.0
|
|
39
39
|
*
|
|
40
40
|
* @constructor
|
|
41
41
|
* @private
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright
|
|
3
|
+
* (c) Copyright 2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -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.136.0
|
|
33
33
|
* @constructor
|
|
34
34
|
* @private
|
|
35
35
|
* @since 1.34
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright
|
|
3
|
+
* (c) Copyright 2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* @class
|
|
28
28
|
* @extends sap.ui.rta.plugin.Plugin
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.136.0
|
|
31
31
|
* @constructor
|
|
32
32
|
* @private
|
|
33
33
|
* @since 1.101
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright
|
|
3
|
+
* (c) Copyright 2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -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.136.0
|
|
35
35
|
* @constructor
|
|
36
36
|
* @private
|
|
37
37
|
* @since 1.34
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright
|
|
3
|
+
* (c) Copyright 2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/base/Log",
|
|
9
|
+
"sap/ui/dt/OverlayRegistry",
|
|
9
10
|
"sap/ui/dt/Util",
|
|
10
11
|
"sap/ui/fl/Utils",
|
|
11
12
|
"sap/ui/rta/plugin/Plugin",
|
|
@@ -13,6 +14,7 @@ sap.ui.define([
|
|
|
13
14
|
|
|
14
15
|
], function(
|
|
15
16
|
BaseLog,
|
|
17
|
+
OverlayRegistry,
|
|
16
18
|
DtUtil,
|
|
17
19
|
FlUtils,
|
|
18
20
|
Plugin,
|
|
@@ -28,13 +30,13 @@ sap.ui.define([
|
|
|
28
30
|
* @class The Settings allows trigger change of settings operations on the overlay
|
|
29
31
|
* @extends sap.ui.rta.plugin.Plugin
|
|
30
32
|
* @author SAP SE
|
|
31
|
-
* @version 1.
|
|
33
|
+
* @version 1.136.0
|
|
32
34
|
* @constructor
|
|
33
35
|
* @private
|
|
34
36
|
* @since 1.44
|
|
35
37
|
* @alias sap.ui.rta.plugin.Settings
|
|
36
38
|
*/
|
|
37
|
-
|
|
39
|
+
const Settings = Plugin.extend("sap.ui.rta.plugin.Settings", /** @lends sap.ui.rta.plugin.Settings.prototype */ {
|
|
38
40
|
metadata: {
|
|
39
41
|
library: "sap.ui.rta",
|
|
40
42
|
associations: {},
|
|
@@ -42,7 +44,27 @@ sap.ui.define([
|
|
|
42
44
|
}
|
|
43
45
|
});
|
|
44
46
|
|
|
45
|
-
|
|
47
|
+
const sPluginId = "CTX_SETTINGS";
|
|
48
|
+
|
|
49
|
+
function getValidActions(vSettingsAction, oOverlay) {
|
|
50
|
+
if (vSettingsAction.handler) {
|
|
51
|
+
return [vSettingsAction];
|
|
52
|
+
}
|
|
53
|
+
const aSettingsActions = [];
|
|
54
|
+
Object.keys(vSettingsAction).forEach((sSettingsAction) => {
|
|
55
|
+
let oSettingsAction = vSettingsAction[sSettingsAction];
|
|
56
|
+
if (typeof oSettingsAction === "function") {
|
|
57
|
+
oSettingsAction = oSettingsAction(oOverlay.getElement());
|
|
58
|
+
}
|
|
59
|
+
if (oSettingsAction.handler) {
|
|
60
|
+
oSettingsAction.key = sSettingsAction;
|
|
61
|
+
aSettingsActions.push(oSettingsAction);
|
|
62
|
+
} else {
|
|
63
|
+
BaseLog.warning("Handler not found for settings action");
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
return aSettingsActions;
|
|
67
|
+
}
|
|
46
68
|
|
|
47
69
|
/**
|
|
48
70
|
* @param {sap.ui.dt.ElementOverlay} oOverlay overlay to be checked for editable
|
|
@@ -50,20 +72,13 @@ sap.ui.define([
|
|
|
50
72
|
* @private
|
|
51
73
|
*/
|
|
52
74
|
Settings.prototype._isEditable = function(oOverlay) {
|
|
53
|
-
|
|
75
|
+
const vSettingsAction = this.getAction(oOverlay);
|
|
54
76
|
// If no additional actions are defined in settings, a handler must be present to make it available
|
|
55
77
|
if (vSettingsAction) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
var bHandlerAndStableIdFound = Object.keys(vSettingsAction).some(function(sSettingsAction) {
|
|
61
|
-
var oSettingsAction = vSettingsAction[sSettingsAction];
|
|
62
|
-
return oSettingsAction.handler && this._checkRelevantContainerStableID(oSettingsAction, oOverlay);
|
|
63
|
-
}.bind(this));
|
|
64
|
-
if (bHandlerAndStableIdFound) {
|
|
65
|
-
return this.hasStableId(oOverlay);
|
|
66
|
-
}
|
|
78
|
+
const aSettingsActions = getValidActions(vSettingsAction, oOverlay);
|
|
79
|
+
return aSettingsActions.some((oSettingsAction) => {
|
|
80
|
+
return this._checkRelevantContainerStableID(oSettingsAction, oOverlay);
|
|
81
|
+
});
|
|
67
82
|
}
|
|
68
83
|
|
|
69
84
|
return false;
|
|
@@ -79,24 +94,27 @@ sap.ui.define([
|
|
|
79
94
|
Settings.prototype.isEnabled = function(aElementOverlays) {
|
|
80
95
|
const oElementOverlay = aElementOverlays[0];
|
|
81
96
|
const oResponsibleElementOverlay = this.getResponsibleElementOverlay(oElementOverlay);
|
|
82
|
-
const
|
|
83
|
-
if (
|
|
84
|
-
|
|
97
|
+
const vSettingsAction = this.getAction(oResponsibleElementOverlay);
|
|
98
|
+
if (vSettingsAction) {
|
|
99
|
+
const oSettingsActions = getValidActions(vSettingsAction, oResponsibleElementOverlay);
|
|
100
|
+
return oSettingsActions.some((oSettingsAction) => {
|
|
101
|
+
if (typeof oSettingsAction.isEnabled !== "undefined") {
|
|
102
|
+
if (typeof oSettingsAction.isEnabled === "function") {
|
|
103
|
+
return oSettingsAction.isEnabled(oResponsibleElementOverlay.getElement());
|
|
104
|
+
}
|
|
105
|
+
return oSettingsAction.isEnabled;
|
|
106
|
+
}
|
|
107
|
+
return !!oSettingsAction.handler;
|
|
108
|
+
});
|
|
85
109
|
}
|
|
86
110
|
|
|
87
|
-
|
|
88
|
-
if (typeof oAction.isEnabled === "function") {
|
|
89
|
-
return oAction.isEnabled(oResponsibleElementOverlay.getElement());
|
|
90
|
-
}
|
|
91
|
-
return oAction.isEnabled;
|
|
92
|
-
}
|
|
93
|
-
return true;
|
|
111
|
+
return false;
|
|
94
112
|
};
|
|
95
113
|
|
|
96
114
|
Settings.prototype._getUnsavedChanges = function(sId, aChangeTypes) {
|
|
97
|
-
|
|
115
|
+
let sElementId;
|
|
98
116
|
|
|
99
|
-
|
|
117
|
+
const aUnsavedChanges = this.getCommandStack().getAllExecutedCommands().filter(function(oCommand) {
|
|
100
118
|
sElementId = oCommand.getElementId && oCommand.getElementId() || oCommand.getElement && oCommand.getElement().getId();
|
|
101
119
|
return sElementId === sId && aChangeTypes.indexOf(oCommand.getChangeType()) >= 0;
|
|
102
120
|
}).map(function(oCommand) {
|
|
@@ -107,12 +125,12 @@ sap.ui.define([
|
|
|
107
125
|
};
|
|
108
126
|
|
|
109
127
|
Settings.prototype._handleFlexChangeCommand = function(mChange, aSelectedOverlays, oCompositeCommand, oSettingsAction) {
|
|
110
|
-
|
|
111
|
-
|
|
128
|
+
const mChangeSpecificData = mChange.changeSpecificData;
|
|
129
|
+
let sVariantManagementReference;
|
|
112
130
|
// temporarily support both
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
131
|
+
const vSelector = mChange.selectorElement || mChange.selectorControl;
|
|
132
|
+
let sControlType;
|
|
133
|
+
let oControl;
|
|
116
134
|
|
|
117
135
|
if (vSelector.controlType) {
|
|
118
136
|
sControlType = vSelector.controlType;
|
|
@@ -134,7 +152,7 @@ sap.ui.define([
|
|
|
134
152
|
);
|
|
135
153
|
}.bind(this))
|
|
136
154
|
.then(function(oSettingsCommand) {
|
|
137
|
-
|
|
155
|
+
const bRuntimeOnly = oSettingsAction.runtimeOnly;
|
|
138
156
|
if (oSettingsCommand && bRuntimeOnly) {
|
|
139
157
|
oSettingsCommand.setRuntimeOnly(bRuntimeOnly);
|
|
140
158
|
}
|
|
@@ -142,15 +160,15 @@ sap.ui.define([
|
|
|
142
160
|
});
|
|
143
161
|
};
|
|
144
162
|
|
|
145
|
-
Settings.prototype.
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
163
|
+
Settings.prototype._handleManifestChangeCommand = function(mChange, oElement, oCompositeCommand) {
|
|
164
|
+
const mChangeSpecificData = mChange.changeSpecificData;
|
|
165
|
+
const oComponent = mChange.appComponent;
|
|
166
|
+
const mManifest = oComponent.getManifest();
|
|
167
|
+
const sReference = mManifest["sap.app"].id;
|
|
150
168
|
|
|
151
169
|
return this.getCommandFactory().getCommandFor(
|
|
152
170
|
oElement,
|
|
153
|
-
"
|
|
171
|
+
"manifest",
|
|
154
172
|
{
|
|
155
173
|
reference: sReference,
|
|
156
174
|
appComponent: oComponent,
|
|
@@ -159,13 +177,13 @@ sap.ui.define([
|
|
|
159
177
|
texts: mChangeSpecificData.content.texts
|
|
160
178
|
}
|
|
161
179
|
)
|
|
162
|
-
.then(function(
|
|
163
|
-
return oCompositeCommand.addCommand(
|
|
180
|
+
.then(function(oManifestCommand) {
|
|
181
|
+
return oCompositeCommand.addCommand(oManifestCommand);
|
|
164
182
|
});
|
|
165
183
|
};
|
|
166
184
|
|
|
167
185
|
Settings.prototype._handleCompositeCommand = function(aElementOverlays, oElement, aChanges, oSettingsAction) {
|
|
168
|
-
|
|
186
|
+
let oCompositeCommand;
|
|
169
187
|
|
|
170
188
|
return this.getCommandFactory().getCommandFor(oElement, "composite")
|
|
171
189
|
|
|
@@ -175,13 +193,13 @@ sap.ui.define([
|
|
|
175
193
|
|
|
176
194
|
.then(function() {
|
|
177
195
|
return aChanges.map(function(mChange) {
|
|
178
|
-
|
|
196
|
+
const mChangeSpecificData = mChange.changeSpecificData;
|
|
179
197
|
// Flex Change
|
|
180
198
|
if (mChangeSpecificData.changeType) {
|
|
181
199
|
return () => this._handleFlexChangeCommand(mChange, aElementOverlays, oCompositeCommand, oSettingsAction);
|
|
182
|
-
//
|
|
200
|
+
// Manifest Change
|
|
183
201
|
} else if (mChangeSpecificData.appDescriptorChangeType) {
|
|
184
|
-
return () => this.
|
|
202
|
+
return () => this._handleManifestChangeCommand(mChange, oElement, oCompositeCommand);
|
|
185
203
|
}
|
|
186
204
|
return undefined;
|
|
187
205
|
}, this);
|
|
@@ -213,8 +231,8 @@ sap.ui.define([
|
|
|
213
231
|
*/
|
|
214
232
|
Settings.prototype.handler = function(aElementOverlays, mPropertyBag, oSettingsAction) {
|
|
215
233
|
mPropertyBag ||= {};
|
|
216
|
-
|
|
217
|
-
|
|
234
|
+
const oElement = aElementOverlays[0].getElement();
|
|
235
|
+
let {fnHandler} = mPropertyBag;
|
|
218
236
|
|
|
219
237
|
fnHandler ||= aElementOverlays[0].getDesignTimeMetadata().getAction("settings").handler;
|
|
220
238
|
if (!fnHandler) {
|
|
@@ -251,34 +269,29 @@ sap.ui.define([
|
|
|
251
269
|
Settings.prototype.getMenuItems = async function(aElementOverlays) {
|
|
252
270
|
const oElementOverlay = aElementOverlays[0];
|
|
253
271
|
const oResponsibleElementOverlay = this.getResponsibleElementOverlay(oElementOverlay);
|
|
254
|
-
|
|
272
|
+
const vSettingsActions = this.getAction(oResponsibleElementOverlay);
|
|
255
273
|
|
|
256
274
|
const aMenuItems = [];
|
|
257
275
|
if (vSettingsActions) {
|
|
258
276
|
const iRank = this.getRank("CTX_SETTINGS");
|
|
259
277
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
settings: vSettingsActions
|
|
263
|
-
};
|
|
264
|
-
}
|
|
278
|
+
const aSettingsActions = getValidActions(vSettingsActions, oResponsibleElementOverlay);
|
|
279
|
+
|
|
265
280
|
if (this._isEditableByPlugin(oResponsibleElementOverlay) === undefined) {
|
|
266
281
|
// The responsibleElement editableByPlugin state was not evaluated yet e.g. because it
|
|
267
282
|
// has no visible geometry, thus evaluateEditable now
|
|
268
283
|
await this.evaluateEditable([oResponsibleElementOverlay], { onRegistration: false });
|
|
269
284
|
}
|
|
270
|
-
|
|
271
|
-
aSettingsActions.forEach(function(sSettingsAction, iIndex, aActions) {
|
|
272
|
-
const oSettingsAction = vSettingsActions[sSettingsAction];
|
|
285
|
+
aSettingsActions.forEach(function(oSettingsAction, iIndex, aActions) {
|
|
273
286
|
if (
|
|
274
|
-
oSettingsAction
|
|
275
|
-
&& this._checkRelevantContainerStableID(oSettingsAction, oResponsibleElementOverlay)
|
|
287
|
+
this._checkRelevantContainerStableID(oSettingsAction, oResponsibleElementOverlay)
|
|
276
288
|
&& this.isAvailable([oResponsibleElementOverlay])
|
|
277
289
|
) {
|
|
278
290
|
const bSingleAction = aActions.length === 1;
|
|
279
291
|
|
|
280
292
|
aMenuItems.push({
|
|
281
293
|
id: bSingleAction ? sPluginId : sPluginId + iIndex,
|
|
294
|
+
additionalInfo: this._getAdditionalInfo(oResponsibleElementOverlay, oSettingsAction),
|
|
282
295
|
rank: bSingleAction ? iRank : iRank + iIndex,
|
|
283
296
|
text: this.getActionText(oResponsibleElementOverlay, oSettingsAction, sPluginId),
|
|
284
297
|
icon: getActionIcon(oSettingsAction),
|
|
@@ -298,7 +311,7 @@ sap.ui.define([
|
|
|
298
311
|
submenu: formatSubMenuItems(oSettingsAction.submenu)
|
|
299
312
|
});
|
|
300
313
|
} else {
|
|
301
|
-
BaseLog.warning(
|
|
314
|
+
BaseLog.warning("Action is not available or relevant container has no stable id");
|
|
302
315
|
}
|
|
303
316
|
}, this);
|
|
304
317
|
}
|
|
@@ -321,8 +334,8 @@ sap.ui.define([
|
|
|
321
334
|
}
|
|
322
335
|
|
|
323
336
|
function getActionIcon(oSettingsAction) {
|
|
324
|
-
|
|
325
|
-
|
|
337
|
+
const sDefaultSettingIcon = "sap-icon://key-user-settings";
|
|
338
|
+
const sActionIcon = oSettingsAction.icon;
|
|
326
339
|
if (!sActionIcon) {
|
|
327
340
|
return sDefaultSettingIcon;
|
|
328
341
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright
|
|
3
|
+
* (c) Copyright 2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -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.136.0
|
|
27
27
|
* @constructor
|
|
28
28
|
* @private
|
|
29
29
|
* @since 1.46
|