@openui5/sap.ui.rta 1.131.1 → 1.132.1
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 +1 -2
- package/THIRDPARTY.txt +1 -1
- 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 +26 -10
- package/src/sap/ui/rta/Utils.js +2 -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 +2 -2
- 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 +1 -1
- package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +1 -1
- package/src/sap/ui/rta/appVariant/Utils.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/Component.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_en_US_saptrc.properties +27 -27
- package/src/sap/ui/rta/appVariant/manageApps/webapp/index.html +3 -3
- 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 +79 -0
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +2 -2
- package/src/sap/ui/rta/command/BaseCommand.js +2 -2
- package/src/sap/ui/rta/command/BindProperty.js +6 -8
- package/src/sap/ui/rta/command/Combine.js +2 -2
- package/src/sap/ui/rta/command/CommandFactory.js +3 -3
- package/src/sap/ui/rta/command/CompositeCommand.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +9 -5
- package/src/sap/ui/rta/command/ControlVariantSave.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +8 -6
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +14 -11
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +6 -4
- 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/FlexCommand.js +2 -2
- package/src/sap/ui/rta/command/LREPSerializer.js +2 -2
- package/src/sap/ui/rta/command/LocalReset.js +2 -2
- 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 +2 -2
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +2 -2
- 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 +14 -2
- package/src/sap/ui/rta/enablement/TestDelegate.js +1 -1
- package/src/sap/ui/rta/enablement/elementActionTest.js +15 -16
- package/src/sap/ui/rta/library.js +3 -3
- package/src/sap/ui/rta/messagebundle.properties +18 -0
- package/src/sap/ui/rta/messagebundle_ar.properties +10 -0
- package/src/sap/ui/rta/messagebundle_bg.properties +13 -3
- package/src/sap/ui/rta/messagebundle_ca.properties +10 -0
- package/src/sap/ui/rta/messagebundle_cnr.properties +10 -0
- package/src/sap/ui/rta/messagebundle_cs.properties +10 -0
- package/src/sap/ui/rta/messagebundle_cy.properties +10 -0
- package/src/sap/ui/rta/messagebundle_da.properties +10 -0
- package/src/sap/ui/rta/messagebundle_de.properties +10 -0
- package/src/sap/ui/rta/messagebundle_el.properties +10 -0
- package/src/sap/ui/rta/messagebundle_en.properties +10 -0
- package/src/sap/ui/rta/messagebundle_en_GB.properties +10 -0
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +10 -0
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +347 -325
- package/src/sap/ui/rta/messagebundle_es.properties +10 -0
- package/src/sap/ui/rta/messagebundle_es_MX.properties +18 -8
- package/src/sap/ui/rta/messagebundle_et.properties +10 -0
- package/src/sap/ui/rta/messagebundle_fi.properties +10 -0
- package/src/sap/ui/rta/messagebundle_fr.properties +10 -0
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +10 -0
- package/src/sap/ui/rta/messagebundle_hi.properties +10 -0
- package/src/sap/ui/rta/messagebundle_hr.properties +10 -0
- package/src/sap/ui/rta/messagebundle_hu.properties +10 -0
- package/src/sap/ui/rta/messagebundle_id.properties +10 -0
- package/src/sap/ui/rta/messagebundle_it.properties +10 -0
- package/src/sap/ui/rta/messagebundle_iw.properties +10 -0
- package/src/sap/ui/rta/messagebundle_ja.properties +10 -0
- package/src/sap/ui/rta/messagebundle_kk.properties +10 -0
- package/src/sap/ui/rta/messagebundle_ko.properties +10 -0
- package/src/sap/ui/rta/messagebundle_lt.properties +10 -0
- package/src/sap/ui/rta/messagebundle_lv.properties +10 -0
- package/src/sap/ui/rta/messagebundle_mk.properties +10 -0
- package/src/sap/ui/rta/messagebundle_ms.properties +14 -4
- package/src/sap/ui/rta/messagebundle_nl.properties +10 -0
- package/src/sap/ui/rta/messagebundle_no.properties +10 -0
- package/src/sap/ui/rta/messagebundle_pl.properties +10 -0
- package/src/sap/ui/rta/messagebundle_pt.properties +10 -0
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +10 -0
- package/src/sap/ui/rta/messagebundle_ro.properties +10 -0
- package/src/sap/ui/rta/messagebundle_ru.properties +10 -0
- package/src/sap/ui/rta/messagebundle_sh.properties +10 -0
- package/src/sap/ui/rta/messagebundle_sk.properties +10 -0
- package/src/sap/ui/rta/messagebundle_sl.properties +10 -0
- package/src/sap/ui/rta/messagebundle_sr.properties +10 -0
- package/src/sap/ui/rta/messagebundle_sv.properties +10 -0
- package/src/sap/ui/rta/messagebundle_th.properties +10 -0
- package/src/sap/ui/rta/messagebundle_tr.properties +10 -0
- package/src/sap/ui/rta/messagebundle_uk.properties +11 -1
- package/src/sap/ui/rta/messagebundle_vi.properties +10 -0
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +10 -0
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +10 -0
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +2 -2
- 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 +4 -2
- package/src/sap/ui/rta/plugin/ControlVariant.js +5 -23
- 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/LocalReset.js +2 -2
- package/src/sap/ui/rta/plugin/Plugin.js +15 -13
- 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/Rename.js +3 -3
- package/src/sap/ui/rta/plugin/RenameHandler.js +5 -9
- package/src/sap/ui/rta/plugin/Resize.js +3 -3
- package/src/sap/ui/rta/plugin/Selection.js +2 -2
- package/src/sap/ui/rta/plugin/Settings.js +2 -21
- package/src/sap/ui/rta/plugin/Split.js +2 -2
- package/src/sap/ui/rta/plugin/Stretch.js +7 -5
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +94 -126
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +28 -31
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +141 -172
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +108 -137
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +2 -2
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +96 -141
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.fragment.xml +112 -0
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +183 -0
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +109 -0
- package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +239 -0
- package/src/sap/ui/rta/plugin/annotations/AnnotationTypes.js +15 -0
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +2 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +3 -3
- 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/service/Action.js +2 -2
- package/src/sap/ui/rta/service/ControllerExtension.js +2 -2
- 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/WhatsNew.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/Adaptation.js +2 -2
- 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 +3 -4
- package/src/sap/ui/rta/toolbar/FioriLike.js +2 -2
- 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 +3 -3
- 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 +16 -10
- package/src/sap/ui/rta/util/PopupManager.js +3 -3
- package/src/sap/ui/rta/util/ReloadManager.js +9 -9
- 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 +17 -2
- 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 +5 -3
- 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/hasStableId.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 +2 -2
- package/src/sap/ui/rta/util/whatsNew/WhatsNewDialog.fragment.xml +5 -4
- package/src/sap/ui/rta/util/whatsNew/WhatsNewOverview.js +1 -1
- package/src/sap/ui/rta/util/whatsNew/WhatsNewOverviewDialog.fragment.xml +8 -2
- package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +1 -1
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/WhatsNewFeatures.js +1 -1
- package/src/sap/ui/rta/command/Annotation.js +0 -45
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-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
|
|
|
@@ -53,7 +53,7 @@ sap.ui.define([
|
|
|
53
53
|
* Utility function to check if the OData service is updated in the meantime
|
|
54
54
|
*
|
|
55
55
|
* @param {sap.ui.core.Control} oControl - Control to be checked
|
|
56
|
-
* @returns {Promise}
|
|
56
|
+
* @returns {Promise} Resolves if service is up to date, rejects otherwise
|
|
57
57
|
*/
|
|
58
58
|
async function isServiceUpToDate(oControl) {
|
|
59
59
|
const oModel = oControl.getModel();
|
|
@@ -114,12 +114,12 @@ sap.ui.define([
|
|
|
114
114
|
* The AdditionalElementsPlugin should handle the orchestration
|
|
115
115
|
* of the AdditionalElementsAnalyzer, the dialog and the command creation
|
|
116
116
|
*
|
|
117
|
-
* @param {string} [sId]
|
|
118
|
-
* @param {object} [mSettings]
|
|
117
|
+
* @param {string} [sId] - Id for the new object, generated automatically if no id is given
|
|
118
|
+
* @param {object} [mSettings] - Initial settings for the new object
|
|
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.132.1
|
|
123
123
|
* @constructor
|
|
124
124
|
* @private
|
|
125
125
|
* @since 1.44
|
|
@@ -234,18 +234,17 @@ sap.ui.define([
|
|
|
234
234
|
* If the MetaModel was not loaded yet when evaluating addViaDelegate, the
|
|
235
235
|
* plugin returns editable = false. Therefore we must make an extra check after
|
|
236
236
|
* the MetaModel is loaded.
|
|
237
|
-
* @param
|
|
237
|
+
* @param {sap.ui.dt.Overlay} oOverlay - Overlay object
|
|
238
238
|
* @override
|
|
239
239
|
*/
|
|
240
|
-
registerElementOverlay(...aArgs) {
|
|
240
|
+
async registerElementOverlay(...aArgs) {
|
|
241
241
|
const [oOverlay] = aArgs;
|
|
242
242
|
const oModel = oOverlay.getElement().getModel();
|
|
243
243
|
if (oModel) {
|
|
244
244
|
const oMetaModel = oModel.getMetaModel();
|
|
245
245
|
if (oMetaModel && oMetaModel.loaded) {
|
|
246
|
-
oMetaModel.loaded()
|
|
247
|
-
|
|
248
|
-
}.bind(this));
|
|
246
|
+
await oMetaModel.loaded();
|
|
247
|
+
this.evaluateEditable([oOverlay], {onRegistration: true});
|
|
249
248
|
}
|
|
250
249
|
}
|
|
251
250
|
Plugin.prototype.registerElementOverlay.apply(this, aArgs);
|
|
@@ -262,85 +261,74 @@ sap.ui.define([
|
|
|
262
261
|
|
|
263
262
|
/**
|
|
264
263
|
* Opens a dialog containing all the elements that can be added for a control and aggregation
|
|
265
|
-
* @param {boolean} bOverlayIsSibling Indicates if the elements should be added as sibling (true) or child (false) to the overlay
|
|
266
|
-
* @param {string} sAggregationName The name of the aggregation to where the elements can be added
|
|
267
|
-
* @param {Array<sap.ui.dt.ElementOverlay>} aResponsibleElementOverlays Array containing the overlay of the control
|
|
268
|
-
* @param {number} [iIndex] The position where the element will be added
|
|
269
|
-
* @param {string} [sControlName] The name of the control
|
|
270
|
-
* @param {sDisplayText} [sDisplayText] The display text of the control for the dialog
|
|
264
|
+
* @param {boolean} bOverlayIsSibling - Indicates if the elements should be added as sibling (true) or child (false) to the overlay
|
|
265
|
+
* @param {string} sAggregationName - The name of the aggregation to where the elements can be added
|
|
266
|
+
* @param {Array<sap.ui.dt.ElementOverlay>} aResponsibleElementOverlays - Array containing the overlay of the control
|
|
267
|
+
* @param {number} [iIndex] - The position where the element will be added
|
|
268
|
+
* @param {string} [sControlName] - The name of the control
|
|
269
|
+
* @param {sDisplayText} [sDisplayText] - The display text of the control for the dialog
|
|
271
270
|
*
|
|
272
|
-
* @
|
|
273
|
-
* @private
|
|
271
|
+
* @returns {Promise} Resolves when the dialog closes
|
|
274
272
|
*/
|
|
275
|
-
showAvailableElements(bOverlayIsSibling, sAggregationName, aResponsibleElementOverlays, iIndex, sControlName, sDisplayText) {
|
|
273
|
+
async showAvailableElements(bOverlayIsSibling, sAggregationName, aResponsibleElementOverlays, iIndex, sControlName, sDisplayText) {
|
|
276
274
|
const oResponsibleElementOverlay = aResponsibleElementOverlays[0];
|
|
277
275
|
const mParents = AdditionalElementsUtils.getParents(bOverlayIsSibling, oResponsibleElementOverlay, this);
|
|
278
276
|
const vSiblingElement = bOverlayIsSibling && oResponsibleElementOverlay.getElement();
|
|
279
|
-
let mActions;
|
|
280
|
-
let aAllElements = [];
|
|
281
|
-
|
|
282
|
-
return ActionExtractor.getActions(bOverlayIsSibling, oResponsibleElementOverlay, this, undefined, this.getDesignTime())
|
|
283
|
-
.then(function(mRetrievedActions) {
|
|
284
|
-
if (sAggregationName === "$$OnlyChildCustomField$$") {
|
|
285
|
-
return [];
|
|
286
|
-
}
|
|
287
|
-
mActions = mRetrievedActions[sAggregationName];
|
|
288
|
-
return this.getAllElements(bOverlayIsSibling, [mParents.responsibleElementOverlay], sControlName, sDisplayText);
|
|
289
|
-
}.bind(this))
|
|
290
|
-
|
|
291
|
-
.then(function(aCollectedElements) {
|
|
292
|
-
aAllElements = aCollectedElements;
|
|
293
|
-
configureExtensibility.call(this, bOverlayIsSibling);
|
|
294
|
-
const oAggregationWithElements = aAllElements.filter(function(mElementsPerAggregation) {
|
|
295
|
-
return mElementsPerAggregation.aggregation === sAggregationName;
|
|
296
|
-
})[0];
|
|
297
|
-
const aElementsPerAggregation = oAggregationWithElements ? oAggregationWithElements.elements : [];
|
|
298
|
-
|
|
299
|
-
this.getDialog().setElements(aElementsPerAggregation);
|
|
300
|
-
if (sDisplayText) {
|
|
301
|
-
// Aggregation is part of title
|
|
302
|
-
const oTextResources = Lib.getResourceBundleFor("sap.ui.rta");
|
|
303
|
-
const sDialogTitle = oTextResources.getText("HEADER_ADDITIONAL_ELEMENTS_WITH_AGGREGATION", [sDisplayText]);
|
|
304
|
-
this.getDialog().setTitle(sDialogTitle);
|
|
305
|
-
} else if (sAggregationName || sControlName) {
|
|
306
|
-
// Only one aggregation, no aggregation in title
|
|
307
|
-
this._setDialogTitle(mActions || {}, mParents.parent, sControlName);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
return this.getDialog().open()
|
|
311
|
-
|
|
312
|
-
.then(function() {
|
|
313
|
-
const aSelectedElements = this.getDialog().getSelectedElements();
|
|
314
|
-
return CommandBuilder.createCommands(mParents,
|
|
315
|
-
vSiblingElement,
|
|
316
|
-
mActions,
|
|
317
|
-
iIndex,
|
|
318
|
-
aSelectedElements,
|
|
319
|
-
sAggregationName,
|
|
320
|
-
this
|
|
321
|
-
);
|
|
322
|
-
}.bind(this))
|
|
323
|
-
|
|
324
|
-
.then(function() {
|
|
325
|
-
const oOverlayToFocus = OverlayRegistry.getOverlay(vSiblingElement) || oResponsibleElementOverlay;
|
|
326
|
-
oOverlayToFocus.focus();
|
|
327
|
-
})
|
|
328
277
|
|
|
329
|
-
|
|
330
|
-
|
|
278
|
+
const mRetrievedActions = await ActionExtractor.getActions(bOverlayIsSibling, oResponsibleElementOverlay, this, undefined, this.getDesignTime());
|
|
279
|
+
let aCollectedElements = [];
|
|
280
|
+
const mActions = mRetrievedActions[sAggregationName];
|
|
281
|
+
if (sAggregationName !== "$$OnlyChildCustomField$$") {
|
|
282
|
+
try {
|
|
283
|
+
aCollectedElements = await this.getAllElements(bOverlayIsSibling, [mParents.responsibleElementOverlay], sControlName, sDisplayText);
|
|
284
|
+
} catch (oError) {
|
|
331
285
|
if (oError instanceof Error) {
|
|
332
286
|
throw oError;
|
|
287
|
+
} else {
|
|
288
|
+
Log.info("Service not up to date, skipping add dialog", "sap.ui.rta");
|
|
289
|
+
return;
|
|
333
290
|
}
|
|
334
|
-
}
|
|
335
|
-
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
configureExtensibility.call(this, bOverlayIsSibling);
|
|
295
|
+
const oAggregationWithElements = aCollectedElements.filter(function(mElementsPerAggregation) {
|
|
296
|
+
return mElementsPerAggregation.aggregation === sAggregationName;
|
|
297
|
+
})[0];
|
|
298
|
+
const aElementsPerAggregation = oAggregationWithElements ? oAggregationWithElements.elements : [];
|
|
299
|
+
|
|
300
|
+
this.getDialog().setElements(aElementsPerAggregation);
|
|
301
|
+
if (sDisplayText) {
|
|
302
|
+
// Aggregation is part of title
|
|
303
|
+
const oTextResources = Lib.getResourceBundleFor("sap.ui.rta");
|
|
304
|
+
const sDialogTitle = oTextResources.getText("HEADER_ADDITIONAL_ELEMENTS_WITH_AGGREGATION", [sDisplayText]);
|
|
305
|
+
this.getDialog().setTitle(sDialogTitle);
|
|
306
|
+
} else if (sAggregationName || sControlName) {
|
|
307
|
+
// Only one aggregation, no aggregation in title
|
|
308
|
+
this._setDialogTitle(mActions || {}, mParents.parent, sControlName);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
try {
|
|
312
|
+
await this.getDialog().open();
|
|
313
|
+
|
|
314
|
+
const aSelectedElements = this.getDialog().getSelectedElements();
|
|
315
|
+
await CommandBuilder.createCommands(mParents,
|
|
316
|
+
vSiblingElement,
|
|
317
|
+
mActions,
|
|
318
|
+
iIndex,
|
|
319
|
+
aSelectedElements,
|
|
320
|
+
sAggregationName,
|
|
321
|
+
this
|
|
322
|
+
);
|
|
336
323
|
|
|
337
|
-
|
|
324
|
+
const oOverlayToFocus = OverlayRegistry.getOverlay(vSiblingElement) || oResponsibleElementOverlay;
|
|
325
|
+
oOverlayToFocus.focus();
|
|
326
|
+
} catch (oError) {
|
|
327
|
+
// no error means canceled dialog
|
|
338
328
|
if (oError instanceof Error) {
|
|
339
329
|
throw oError;
|
|
340
|
-
} else {
|
|
341
|
-
Log.info("Service not up to date, skipping add dialog", "sap.ui.rta");
|
|
342
330
|
}
|
|
343
|
-
}
|
|
331
|
+
}
|
|
344
332
|
},
|
|
345
333
|
|
|
346
334
|
_setDialogTitle(mActions, oParentElement, sControlName) {
|
|
@@ -370,22 +358,21 @@ sap.ui.define([
|
|
|
370
358
|
* @param {sap.ui.dt.Overlay} oOverlay - Overlay to be checked
|
|
371
359
|
* @param {object} mPropertyBag - Additional data for the check
|
|
372
360
|
* @returns {object} Returns object with editable boolean values for "asChild" and "asSibling"
|
|
373
|
-
* @
|
|
361
|
+
* @override
|
|
374
362
|
*/
|
|
375
|
-
_isEditable(oOverlay, mPropertyBag) {
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
363
|
+
async _isEditable(oOverlay, mPropertyBag) {
|
|
364
|
+
try {
|
|
365
|
+
const [bAsSibling, bAsChild] = await Promise.all([
|
|
366
|
+
this._isEditableCheck(mPropertyBag.sourceElementOverlay, true),
|
|
367
|
+
this._isEditableCheck(mPropertyBag.sourceElementOverlay, false)
|
|
368
|
+
]);
|
|
381
369
|
return {
|
|
382
|
-
asSibling:
|
|
383
|
-
asChild:
|
|
370
|
+
asSibling: bAsSibling,
|
|
371
|
+
asChild: bAsChild
|
|
384
372
|
};
|
|
385
|
-
})
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
});
|
|
373
|
+
} catch (oError) {
|
|
374
|
+
Log.error(oError);
|
|
375
|
+
}
|
|
389
376
|
},
|
|
390
377
|
|
|
391
378
|
async _isEditableCheck(oOverlay, bOverlayIsSibling) {
|
|
@@ -428,7 +415,7 @@ sap.ui.define([
|
|
|
428
415
|
* @returns {Array} An array with all elements
|
|
429
416
|
* @protected
|
|
430
417
|
*/
|
|
431
|
-
getAllElements(bOverlayIsSibling, aElementOverlays) {
|
|
418
|
+
async getAllElements(bOverlayIsSibling, aElementOverlays) {
|
|
432
419
|
const oElementOverlay = aElementOverlays[0];
|
|
433
420
|
const mParents = AdditionalElementsUtils.getParents(bOverlayIsSibling, oElementOverlay, this);
|
|
434
421
|
let mActions;
|
|
@@ -442,54 +429,40 @@ sap.ui.define([
|
|
|
442
429
|
|
|
443
430
|
this.clearExtensibilityInfo(bOverlayIsSibling);
|
|
444
431
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
bCheckExtensibility = true;
|
|
452
|
-
}
|
|
453
|
-
aPromises.push({
|
|
454
|
-
aggregation: sAggregationName,
|
|
455
|
-
elementPromises: [
|
|
456
|
-
mActions.reveal
|
|
457
|
-
? AdditionalElementsAnalyzer.enhanceInvisibleElements(mParents.parent, mActions)
|
|
458
|
-
: Promise.resolve([]),
|
|
459
|
-
mActions.addViaDelegate
|
|
460
|
-
? AdditionalElementsAnalyzer.getUnrepresentedDelegateProperties(mParents.parent, mActions.addViaDelegate)
|
|
461
|
-
: Promise.resolve([])
|
|
462
|
-
]
|
|
463
|
-
});
|
|
464
|
-
});
|
|
465
|
-
if (bCheckExtensibility) {
|
|
466
|
-
return loadExtensibilityInfo(mParents.parent);
|
|
432
|
+
const mAllActions = await ActionExtractor.getActions(bOverlayIsSibling, oElementOverlay, this, undefined, this.getDesignTime());
|
|
433
|
+
each(mAllActions, function(sAggregationName) {
|
|
434
|
+
mActions = mAllActions[sAggregationName];
|
|
435
|
+
mActions.aggregation = sAggregationName;
|
|
436
|
+
if (mActions.addViaDelegate) {
|
|
437
|
+
bCheckExtensibility = true;
|
|
467
438
|
}
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
439
|
+
aPromises.push({
|
|
440
|
+
aggregation: sAggregationName,
|
|
441
|
+
elementPromises: [
|
|
442
|
+
mActions.reveal
|
|
443
|
+
? AdditionalElementsAnalyzer.enhanceInvisibleElements(mParents.parent, mActions)
|
|
444
|
+
: Promise.resolve([]),
|
|
445
|
+
mActions.addViaDelegate
|
|
446
|
+
? AdditionalElementsAnalyzer.getUnrepresentedDelegateProperties(mParents.parent, mActions.addViaDelegate)
|
|
447
|
+
: Promise.resolve([])
|
|
448
|
+
]
|
|
449
|
+
});
|
|
450
|
+
});
|
|
451
|
+
const oExtensibilityInfo = bCheckExtensibility && await loadExtensibilityInfo(mParents.parent);
|
|
476
452
|
|
|
477
|
-
.
|
|
478
|
-
|
|
479
|
-
return aAllElements;
|
|
480
|
-
}.bind(this))
|
|
453
|
+
this.setExtensibilityInfo(bOverlayIsSibling, oExtensibilityInfo);
|
|
454
|
+
const aAllElements = await this._combineAnalyzerResults(aPromises);
|
|
481
455
|
|
|
482
|
-
.
|
|
483
|
-
|
|
484
|
-
});
|
|
456
|
+
this.setCachedElements(aAllElements, bOverlayIsSibling);
|
|
457
|
+
return aAllElements;
|
|
485
458
|
},
|
|
486
459
|
|
|
487
460
|
/**
|
|
488
461
|
* Retrieves the context menu item for the actions
|
|
489
462
|
* Two items are returned here: one for when the overlay is sibling and one for when it is child. In case of multiple
|
|
490
463
|
* aggregations for child elements, a submenu is built containing all aggregations and the sibling.
|
|
491
|
-
* @param
|
|
492
|
-
* @
|
|
464
|
+
* @param {sap.ui.dt.ElementOverlay} aElementOverlays - List of overlays for which the context menu was opened
|
|
465
|
+
* @returns {object[]} Array containing the items with required data
|
|
493
466
|
*/
|
|
494
467
|
getMenuItems(aElementOverlays) {
|
|
495
468
|
const aMenuItems = [];
|
|
@@ -696,7 +669,7 @@ sap.ui.define([
|
|
|
696
669
|
// elements: [...]
|
|
697
670
|
// }
|
|
698
671
|
// ]
|
|
699
|
-
_combineAnalyzerResults(aAllPromises) {
|
|
672
|
+
async _combineAnalyzerResults(aAllPromises) {
|
|
700
673
|
const aCollectedPromises = [];
|
|
701
674
|
|
|
702
675
|
aAllPromises.forEach(function(aPromisesByAggregation) {
|
|
@@ -713,13 +686,11 @@ sap.ui.define([
|
|
|
713
686
|
);
|
|
714
687
|
});
|
|
715
688
|
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
return aElements.length > 0;
|
|
722
|
-
});
|
|
689
|
+
const aElementsPerAggregation = await Promise.all(aCollectedPromises);
|
|
690
|
+
// Filter out results without elements
|
|
691
|
+
return aElementsPerAggregation.filter(function(oElementsPerAggregation) {
|
|
692
|
+
const aElements = oElementsPerAggregation && oElementsPerAggregation.elements;
|
|
693
|
+
return aElements.length > 0;
|
|
723
694
|
});
|
|
724
695
|
},
|
|
725
696
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-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
|
|
|
@@ -17,7 +17,7 @@ sap.ui.define([
|
|
|
17
17
|
* Helper object containing methods for the AdditionalElements plugin
|
|
18
18
|
*
|
|
19
19
|
* @author SAP SE
|
|
20
|
-
* @version 1.
|
|
20
|
+
* @version 1.132.1
|
|
21
21
|
* @private
|
|
22
22
|
* @since 1.94
|
|
23
23
|
*/
|