@openui5/sap.ui.rta 1.128.0 → 1.130.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 +2 -2
- 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 +36 -10
- package/src/sap/ui/rta/Utils.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +1 -1
- package/src/sap/ui/rta/appVariant/Feature.js +2 -2
- package/src/sap/ui/rta/appVariant/Utils.js +3 -3
- 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 +2 -2
- package/src/sap/ui/rta/command/Annotation.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 +10 -8
- package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +31 -14
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +14 -15
- 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 +8 -5
- 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 +6 -4
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +7 -5
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +5 -3
- package/src/sap/ui/rta/enablement/TestDelegate.js +4 -3
- package/src/sap/ui/rta/enablement/elementActionTest.js +9 -6
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +43 -1
- package/src/sap/ui/rta/messagebundle_ar.properties +21 -0
- package/src/sap/ui/rta/messagebundle_bg.properties +21 -0
- package/src/sap/ui/rta/messagebundle_ca.properties +21 -0
- package/src/sap/ui/rta/messagebundle_cnr.properties +22 -1
- package/src/sap/ui/rta/messagebundle_cs.properties +21 -0
- package/src/sap/ui/rta/messagebundle_cy.properties +21 -0
- package/src/sap/ui/rta/messagebundle_da.properties +22 -1
- package/src/sap/ui/rta/messagebundle_de.properties +21 -0
- package/src/sap/ui/rta/messagebundle_el.properties +21 -0
- package/src/sap/ui/rta/messagebundle_en.properties +21 -0
- package/src/sap/ui/rta/messagebundle_en_GB.properties +21 -0
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +14 -2
- package/src/sap/ui/rta/messagebundle_es.properties +21 -0
- package/src/sap/ui/rta/messagebundle_es_MX.properties +21 -0
- package/src/sap/ui/rta/messagebundle_et.properties +21 -0
- package/src/sap/ui/rta/messagebundle_fi.properties +21 -0
- package/src/sap/ui/rta/messagebundle_fr.properties +21 -0
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +22 -1
- package/src/sap/ui/rta/messagebundle_hi.properties +21 -0
- package/src/sap/ui/rta/messagebundle_hr.properties +21 -0
- package/src/sap/ui/rta/messagebundle_hu.properties +21 -0
- package/src/sap/ui/rta/messagebundle_id.properties +22 -1
- package/src/sap/ui/rta/messagebundle_it.properties +21 -0
- package/src/sap/ui/rta/messagebundle_iw.properties +21 -0
- package/src/sap/ui/rta/messagebundle_ja.properties +21 -0
- package/src/sap/ui/rta/messagebundle_kk.properties +21 -0
- package/src/sap/ui/rta/messagebundle_ko.properties +21 -0
- package/src/sap/ui/rta/messagebundle_lt.properties +21 -0
- package/src/sap/ui/rta/messagebundle_lv.properties +21 -0
- package/src/sap/ui/rta/messagebundle_mk.properties +23 -2
- package/src/sap/ui/rta/messagebundle_ms.properties +21 -0
- package/src/sap/ui/rta/messagebundle_nl.properties +21 -0
- package/src/sap/ui/rta/messagebundle_no.properties +21 -0
- package/src/sap/ui/rta/messagebundle_pl.properties +21 -0
- package/src/sap/ui/rta/messagebundle_pt.properties +21 -0
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +21 -0
- package/src/sap/ui/rta/messagebundle_ro.properties +22 -1
- package/src/sap/ui/rta/messagebundle_ru.properties +21 -0
- package/src/sap/ui/rta/messagebundle_sh.properties +22 -1
- package/src/sap/ui/rta/messagebundle_sk.properties +21 -0
- package/src/sap/ui/rta/messagebundle_sl.properties +21 -0
- package/src/sap/ui/rta/messagebundle_sr.properties +22 -1
- package/src/sap/ui/rta/messagebundle_sv.properties +21 -0
- package/src/sap/ui/rta/messagebundle_th.properties +21 -0
- package/src/sap/ui/rta/messagebundle_tr.properties +21 -0
- package/src/sap/ui/rta/messagebundle_uk.properties +22 -1
- package/src/sap/ui/rta/messagebundle_vi.properties +22 -1
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +21 -0
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +21 -0
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
- package/src/sap/ui/rta/plugin/Combine.js +1 -1
- package/src/sap/ui/rta/plugin/ControlVariant.js +21 -20
- package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
- package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
- package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
- package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
- package/src/sap/ui/rta/plugin/Plugin.js +2 -3
- package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
- package/src/sap/ui/rta/plugin/Remove.js +1 -1
- package/src/sap/ui/rta/plugin/Rename.js +1 -1
- 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 +1 -1
- package/src/sap/ui/rta/plugin/Settings.js +1 -1
- package/src/sap/ui/rta/plugin/Split.js +1 -1
- package/src/sap/ui/rta/plugin/Stretch.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.fragment.xml +0 -1
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +70 -69
- 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 +9 -7
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +4 -3
- package/src/sap/ui/rta/service/Action.js +4 -3
- package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
- package/src/sap/ui/rta/service/Outline.js +5 -9
- package/src/sap/ui/rta/service/Property.js +10 -11
- package/src/sap/ui/rta/service/Selection.js +1 -1
- package/src/sap/ui/rta/service/SupportTools.js +104 -45
- package/src/sap/ui/rta/themes/base/ChangeVisualization.less +2 -16
- package/src/sap/ui/rta/themes/base/WhatsNew.less +7 -0
- package/src/sap/ui/rta/themes/base/library.source.less +2 -1
- package/src/sap/ui/rta/themes/sap_hcb/ChangeVisualization.less +0 -1
- package/src/sap/ui/rta/toolbar/ActionsMenu.fragment.xml +8 -0
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +8 -1
- package/src/sap/ui/rta/toolbar/Adaptation.js +9 -2
- package/src/sap/ui/rta/toolbar/Base.js +1 -1
- package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +20 -18
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +1 -1
- package/src/sap/ui/rta/toolbar/translation/Translation.js +3 -3
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
- package/src/sap/ui/rta/util/PluginManager.js +2 -2
- package/src/sap/ui/rta/util/PopupManager.js +1 -1
- package/src/sap/ui/rta/util/ReloadManager.js +25 -2
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/ServiceManager.js +2 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -8
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorCategorySelection.fragment.xml +10 -10
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +11 -13
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +59 -25
- package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +111 -0
- package/src/sap/ui/rta/util/whatsNew/WhatsNewDialog.fragment.xml +81 -0
- package/src/sap/ui/rta/util/whatsNew/WhatsNewOverview.js +82 -0
- package/src/sap/ui/rta/util/whatsNew/WhatsNewOverviewDialog.fragment.xml +75 -0
- package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +73 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/WhatsNewFeatures.js +138 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/AdvancedSettingsImage.png +0 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/FullIframe.png +0 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/MiniMenu.png +0 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/WhatsNewOverview.png +0 -0
|
@@ -39,11 +39,11 @@ sap.ui.define([
|
|
|
39
39
|
) {
|
|
40
40
|
"use strict";
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
const SINGULAR = true;
|
|
43
|
+
const PLURAL = false;
|
|
44
44
|
|
|
45
45
|
function isThereAnAggregationActionForSameAggregation(mActions, mParents) {
|
|
46
|
-
|
|
46
|
+
const sResponsibleElementsParentAggregation = mParents.responsibleElementOverlay.getParentAggregationOverlay().getAggregationName();
|
|
47
47
|
return Object.keys(mActions).some(function(sAggregationName) {
|
|
48
48
|
return sAggregationName === sResponsibleElementsParentAggregation;
|
|
49
49
|
});
|
|
@@ -119,13 +119,13 @@ 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.130.0
|
|
123
123
|
* @constructor
|
|
124
124
|
* @private
|
|
125
125
|
* @since 1.44
|
|
126
126
|
* @alias sap.ui.rta.plugin.additionalElements.AdditionalElementsPlugin
|
|
127
127
|
*/
|
|
128
|
-
|
|
128
|
+
const AdditionalElementsPlugin = Plugin.extend("sap.ui.rta.plugin.additionalElements.AdditionalElementsPlugin", {
|
|
129
129
|
// eslint-disable-next-line object-shorthand
|
|
130
130
|
constructor: function(...aArgs) {
|
|
131
131
|
this._getMenuItemsPromise = Promise.resolve();
|
|
@@ -150,14 +150,14 @@ sap.ui.define([
|
|
|
150
150
|
|
|
151
151
|
// For add elements plugin, include other aggregations which are potentially valid targets for hidden elements
|
|
152
152
|
_getRelevantOverlays(oOverlay) {
|
|
153
|
-
|
|
153
|
+
const aRelevantOverlays = OverlayUtil.findAllOverlaysInContainer(oOverlay, /* bIncludeOtherAggregations= */true);
|
|
154
154
|
|
|
155
155
|
oOverlay.setRelevantOverlays(aRelevantOverlays);
|
|
156
156
|
return aRelevantOverlays;
|
|
157
157
|
},
|
|
158
158
|
|
|
159
159
|
getContextMenuText(bOverlayIsSibling, oOverlay, sAggregationName, bHasSubMenu) {
|
|
160
|
-
|
|
160
|
+
let oTextResources;
|
|
161
161
|
|
|
162
162
|
function getGenericText() {
|
|
163
163
|
oTextResources = Lib.getResourceBundleFor("sap.ui.rta");
|
|
@@ -175,10 +175,10 @@ sap.ui.define([
|
|
|
175
175
|
oTextResources = Lib.getResourceBundleFor("sap.ui.rta");
|
|
176
176
|
return oTextResources.getText("CTX_ADD_ELEMENTS_WITH_SUBMENU");
|
|
177
177
|
}
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
const mParents = AdditionalElementsUtils.getParents(bOverlayIsSibling, oOverlay, this);
|
|
179
|
+
const mAllActions = ActionExtractor.getActionsOrUndef(bOverlayIsSibling, oOverlay);
|
|
180
180
|
sAggregationName ||= Object.keys(mAllActions)[0];
|
|
181
|
-
|
|
181
|
+
const mActions = mAllActions[sAggregationName];
|
|
182
182
|
|
|
183
183
|
// Safeguarding
|
|
184
184
|
if (!mActions) {
|
|
@@ -203,17 +203,17 @@ sap.ui.define([
|
|
|
203
203
|
return true;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
206
|
+
const oOverlay = this.getResponsibleElementOverlay(aElementOverlays[0]);
|
|
207
|
+
let oParentOverlay;
|
|
208
|
+
let bIsEnabled = false;
|
|
209
209
|
if (bOverlayIsSibling) {
|
|
210
210
|
oParentOverlay = oOverlay.getParentElementOverlay();
|
|
211
211
|
if (oParentOverlay) {
|
|
212
212
|
bIsEnabled = true;
|
|
213
213
|
}
|
|
214
214
|
} else {
|
|
215
|
-
|
|
216
|
-
|
|
215
|
+
const mAllActions = ActionExtractor.getActionsOrUndef(bOverlayIsSibling, oOverlay);
|
|
216
|
+
const mActions = mAllActions[sAggregationName];
|
|
217
217
|
if (
|
|
218
218
|
mActions &&
|
|
219
219
|
((mActions.reveal && mActions.reveal.elements.length > 0)
|
|
@@ -223,8 +223,8 @@ sap.ui.define([
|
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
const oCachedElements = this.getCachedElements(bOverlayIsSibling);
|
|
227
|
+
const bElementsAvailable = !!(oCachedElements && oCachedElements.length > 0);
|
|
228
228
|
bIsEnabled &&= bElementsAvailable;
|
|
229
229
|
return bIsEnabled;
|
|
230
230
|
},
|
|
@@ -239,9 +239,9 @@ sap.ui.define([
|
|
|
239
239
|
*/
|
|
240
240
|
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
246
|
oMetaModel.loaded().then(function() {
|
|
247
247
|
this.evaluateEditable([oOverlay], {onRegistration: true});
|
|
@@ -273,11 +273,11 @@ sap.ui.define([
|
|
|
273
273
|
* @private
|
|
274
274
|
*/
|
|
275
275
|
showAvailableElements(bOverlayIsSibling, sAggregationName, aResponsibleElementOverlays, iIndex, sControlName, sDisplayText) {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
276
|
+
const oResponsibleElementOverlay = aResponsibleElementOverlays[0];
|
|
277
|
+
const mParents = AdditionalElementsUtils.getParents(bOverlayIsSibling, oResponsibleElementOverlay, this);
|
|
278
|
+
const vSiblingElement = bOverlayIsSibling && oResponsibleElementOverlay.getElement();
|
|
279
|
+
let mActions;
|
|
280
|
+
let aAllElements = [];
|
|
281
281
|
|
|
282
282
|
return ActionExtractor.getActions(bOverlayIsSibling, oResponsibleElementOverlay, this, undefined, this.getDesignTime())
|
|
283
283
|
.then(function(mRetrievedActions) {
|
|
@@ -291,16 +291,16 @@ sap.ui.define([
|
|
|
291
291
|
.then(function(aCollectedElements) {
|
|
292
292
|
aAllElements = aCollectedElements;
|
|
293
293
|
configureExtensibility.call(this, bOverlayIsSibling);
|
|
294
|
-
|
|
294
|
+
const oAggregationWithElements = aAllElements.filter(function(mElementsPerAggregation) {
|
|
295
295
|
return mElementsPerAggregation.aggregation === sAggregationName;
|
|
296
296
|
})[0];
|
|
297
|
-
|
|
297
|
+
const aElementsPerAggregation = oAggregationWithElements ? oAggregationWithElements.elements : [];
|
|
298
298
|
|
|
299
299
|
this.getDialog().setElements(aElementsPerAggregation);
|
|
300
300
|
if (sDisplayText) {
|
|
301
301
|
// Aggregation is part of title
|
|
302
|
-
|
|
303
|
-
|
|
302
|
+
const oTextResources = Lib.getResourceBundleFor("sap.ui.rta");
|
|
303
|
+
const sDialogTitle = oTextResources.getText("HEADER_ADDITIONAL_ELEMENTS_WITH_AGGREGATION", [sDisplayText]);
|
|
304
304
|
this.getDialog().setTitle(sDialogTitle);
|
|
305
305
|
} else if (sAggregationName || sControlName) {
|
|
306
306
|
// Only one aggregation, no aggregation in title
|
|
@@ -310,7 +310,7 @@ sap.ui.define([
|
|
|
310
310
|
return this.getDialog().open()
|
|
311
311
|
|
|
312
312
|
.then(function() {
|
|
313
|
-
|
|
313
|
+
const aSelectedElements = this.getDialog().getSelectedElements();
|
|
314
314
|
return CommandBuilder.createCommands(mParents,
|
|
315
315
|
vSiblingElement,
|
|
316
316
|
mActions,
|
|
@@ -322,7 +322,7 @@ sap.ui.define([
|
|
|
322
322
|
}.bind(this))
|
|
323
323
|
|
|
324
324
|
.then(function() {
|
|
325
|
-
|
|
325
|
+
const oOverlayToFocus = OverlayRegistry.getOverlay(vSiblingElement) || oResponsibleElementOverlay;
|
|
326
326
|
oOverlayToFocus.focus();
|
|
327
327
|
})
|
|
328
328
|
|
|
@@ -344,7 +344,7 @@ sap.ui.define([
|
|
|
344
344
|
},
|
|
345
345
|
|
|
346
346
|
_setDialogTitle(mActions, oParentElement, sControlName) {
|
|
347
|
-
|
|
347
|
+
const sDialogTitle = AdditionalElementsUtils.getText(
|
|
348
348
|
"HEADER_ADDITIONAL_ELEMENTS",
|
|
349
349
|
mActions,
|
|
350
350
|
oParentElement,
|
|
@@ -389,7 +389,7 @@ sap.ui.define([
|
|
|
389
389
|
},
|
|
390
390
|
|
|
391
391
|
async _isEditableCheck(oOverlay, bOverlayIsSibling) {
|
|
392
|
-
|
|
392
|
+
const mParents = AdditionalElementsUtils.getParents(bOverlayIsSibling, oOverlay, this);
|
|
393
393
|
|
|
394
394
|
if (!mParents.relevantContainerOverlay) {
|
|
395
395
|
return false;
|
|
@@ -400,7 +400,7 @@ sap.ui.define([
|
|
|
400
400
|
await this._getMenuItemsPromise;
|
|
401
401
|
this.clearCachedElements();
|
|
402
402
|
return Utils.doIfAllControlsAreAvailable([oOverlay, mParents.parentOverlay], function() {
|
|
403
|
-
|
|
403
|
+
let bEditable = false;
|
|
404
404
|
// For the sibling case, check if anything is available for the same aggregation
|
|
405
405
|
if (bOverlayIsSibling) {
|
|
406
406
|
bEditable = isThereAnAggregationActionForSameAggregation(mActions, mParents);
|
|
@@ -429,12 +429,12 @@ sap.ui.define([
|
|
|
429
429
|
* @protected
|
|
430
430
|
*/
|
|
431
431
|
getAllElements(bOverlayIsSibling, aElementOverlays) {
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
432
|
+
const oElementOverlay = aElementOverlays[0];
|
|
433
|
+
const mParents = AdditionalElementsUtils.getParents(bOverlayIsSibling, oElementOverlay, this);
|
|
434
|
+
let mActions;
|
|
435
|
+
const aPromises = [];
|
|
436
|
+
let bCheckExtensibility = false;
|
|
437
|
+
const aCachedElements = this.getCachedElements(bOverlayIsSibling);
|
|
438
438
|
|
|
439
439
|
if (aCachedElements) {
|
|
440
440
|
return aCachedElements;
|
|
@@ -492,8 +492,8 @@ sap.ui.define([
|
|
|
492
492
|
* @return {object[]} Array containing the items with required data
|
|
493
493
|
*/
|
|
494
494
|
getMenuItems(aElementOverlays) {
|
|
495
|
-
|
|
496
|
-
|
|
495
|
+
const aMenuItems = [];
|
|
496
|
+
let oMenuItem;
|
|
497
497
|
this.clearCachedElements();
|
|
498
498
|
// Prevents clearing of cached elements before menu items are build. This happens when evaluate editable is running in parallel
|
|
499
499
|
this._getMenuItemsPromise =
|
|
@@ -503,11 +503,11 @@ sap.ui.define([
|
|
|
503
503
|
this.getAllElements(true, aElementOverlays)
|
|
504
504
|
])
|
|
505
505
|
.then(function(aElementsWithAggregations) {
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
506
|
+
const bHasChildren = aElementsWithAggregations[0].length > 0;
|
|
507
|
+
const bHasMultipleAggregations = aElementsWithAggregations[0].length > 1;
|
|
508
|
+
const bHasSiblings = aElementsWithAggregations[1].length > 0;
|
|
509
|
+
const bIsAvailableForChildren = this.isAvailable(aElementOverlays, false);
|
|
510
|
+
const bIsAvailableForSibling = this.isAvailable(aElementOverlays, true);
|
|
511
511
|
if (
|
|
512
512
|
bIsAvailableForSibling
|
|
513
513
|
&& (!bIsAvailableForChildren || !bHasChildren)
|
|
@@ -574,19 +574,19 @@ sap.ui.define([
|
|
|
574
574
|
},
|
|
575
575
|
|
|
576
576
|
_buildMenuItem(sPluginId, bOverlayIsSibling, aElementOverlays, aElementsWithAggregations, bHasSubMenu) {
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
577
|
+
let aSubMenuItems;
|
|
578
|
+
let vHandler;
|
|
579
|
+
let sAggregationName;
|
|
580
|
+
const oSelectedOverlay = aElementOverlays[0];
|
|
581
581
|
|
|
582
582
|
if (bOverlayIsSibling) {
|
|
583
|
-
|
|
583
|
+
const mParents = AdditionalElementsUtils.getParents(bOverlayIsSibling, oSelectedOverlay, this);
|
|
584
584
|
sAggregationName = mParents.responsibleElementOverlay.getParentAggregationOverlay().getAggregationName();
|
|
585
585
|
} else {
|
|
586
586
|
// If there are no elements available but the action is still available, the dialog will open just to allow
|
|
587
587
|
// adding custom fields. When clicking on the parent, the aggregation name is irrelevant for the dialog
|
|
588
588
|
// since the field will be added to the underlying data model.
|
|
589
|
-
|
|
589
|
+
const bOnlyCustomField = aElementsWithAggregations[0].length === 0 && aElementsWithAggregations[1].length === 0;
|
|
590
590
|
sAggregationName = bOnlyCustomField ? "$$OnlyChildCustomField$$" :
|
|
591
591
|
// If only one child aggregation has invisible elements, get its aggregation name
|
|
592
592
|
aElementsWithAggregations[0] && aElementsWithAggregations[0][0] && aElementsWithAggregations[0][0].aggregation;
|
|
@@ -602,7 +602,7 @@ sap.ui.define([
|
|
|
602
602
|
return this.showAvailableElements(bOverlayIsSibling, sAggregationName, aElementOverlays);
|
|
603
603
|
}.bind(this, bOverlayIsSibling);
|
|
604
604
|
}
|
|
605
|
-
|
|
605
|
+
const oMenuItem = {
|
|
606
606
|
id: sPluginId,
|
|
607
607
|
text: this.getContextMenuText.bind(this, bOverlayIsSibling, oSelectedOverlay, sAggregationName, bHasSubMenu),
|
|
608
608
|
enabled: bHasSubMenu || function(bOverlayIsSibling, aElementOverlays) {
|
|
@@ -619,9 +619,9 @@ sap.ui.define([
|
|
|
619
619
|
},
|
|
620
620
|
|
|
621
621
|
_buildSubmenuItems(bOverlayIsSibling, aElementOverlays, aElementsWithAggregation) {
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
622
|
+
const aSubMenuItems = [];
|
|
623
|
+
const sPluginId = bOverlayIsSibling ? "CTX_ADD_ELEMENTS_AS_SIBLING" : "CTX_ADD_ELEMENTS_AS_CHILD";
|
|
624
|
+
let iPosition = 0;
|
|
625
625
|
|
|
626
626
|
// register BusinessSuite icon font
|
|
627
627
|
IconPool.registerFont({
|
|
@@ -631,16 +631,17 @@ sap.ui.define([
|
|
|
631
631
|
lazy: true
|
|
632
632
|
});
|
|
633
633
|
|
|
634
|
-
function getMenuItemText(bOverlayIsSibling, sAggregationName,
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
return mNames ? mNames.
|
|
634
|
+
function getMenuItemText(bOverlayIsSibling, sAggregationName, oElementOverlay) {
|
|
635
|
+
oElementOverlay = bOverlayIsSibling ? oElementOverlay.getParentElementOverlay() : oElementOverlay;
|
|
636
|
+
const oElementOverlayMetadata = oElementOverlay.getDesignTimeMetadata();
|
|
637
|
+
const mNames = oElementOverlayMetadata.getAggregationDisplayName(sAggregationName, oElementOverlay.getElement());
|
|
638
|
+
return mNames ? mNames.plural : sAggregationName;
|
|
639
639
|
}
|
|
640
640
|
aElementsWithAggregation.forEach(function(mElementsWithAggregation) {
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
641
|
+
const sAggregationName = mElementsWithAggregation.aggregation;
|
|
642
|
+
const oResponsibleElementOverlay = this.getResponsibleElementOverlay(aElementOverlays[0]);
|
|
643
|
+
const sDisplayText = getMenuItemText(bOverlayIsSibling, sAggregationName, oResponsibleElementOverlay);
|
|
644
|
+
const oItem = {
|
|
644
645
|
id: `${sPluginId}_${iPosition}`,
|
|
645
646
|
text: sDisplayText,
|
|
646
647
|
enabled: function(aElementOverlays) {
|
|
@@ -696,14 +697,14 @@ sap.ui.define([
|
|
|
696
697
|
// }
|
|
697
698
|
// ]
|
|
698
699
|
_combineAnalyzerResults(aAllPromises) {
|
|
699
|
-
|
|
700
|
+
const aCollectedPromises = [];
|
|
700
701
|
|
|
701
702
|
aAllPromises.forEach(function(aPromisesByAggregation) {
|
|
702
703
|
aCollectedPromises.push(
|
|
703
704
|
Promise.all(aPromisesByAggregation.elementPromises).then(function(aAnalyzerValues) {
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
705
|
+
const aRevealElements = aAnalyzerValues[0];
|
|
706
|
+
const aAddViaDelegateElements = aAnalyzerValues[1];
|
|
707
|
+
const aAllElements = aRevealElements.concat(aAddViaDelegateElements);
|
|
707
708
|
return {
|
|
708
709
|
aggregation: aPromisesByAggregation.aggregation,
|
|
709
710
|
elements: aAllElements
|
|
@@ -716,7 +717,7 @@ sap.ui.define([
|
|
|
716
717
|
.then(function(aElementsPerAggregation) {
|
|
717
718
|
// Filter out results without elements
|
|
718
719
|
return aElementsPerAggregation.filter(function(oElementsPerAggregation) {
|
|
719
|
-
|
|
720
|
+
const aElements = oElementsPerAggregation && oElementsPerAggregation.elements;
|
|
720
721
|
return aElements.length > 0;
|
|
721
722
|
});
|
|
722
723
|
});
|
|
@@ -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.130.0
|
|
123
123
|
* @constructor
|
|
124
124
|
* @private
|
|
125
125
|
* @since 1.75
|
|
@@ -184,11 +184,12 @@ sap.ui.define([
|
|
|
184
184
|
if (this.isAvailable(aElementOverlays, bIsSibling)) {
|
|
185
185
|
var oAction = this.getCreateAction(bIsSibling, aElementOverlays[0]);
|
|
186
186
|
if (oAction) {
|
|
187
|
-
var oSiblingMenuItem =
|
|
187
|
+
var oSiblingMenuItem = {
|
|
188
188
|
id: "CTX_CREATE_SIBLING_IFRAME",
|
|
189
189
|
rank: iBaseRank,
|
|
190
|
-
action: oAction
|
|
191
|
-
|
|
190
|
+
action: oAction,
|
|
191
|
+
...getCommonProperties.call(this)
|
|
192
|
+
};
|
|
192
193
|
|
|
193
194
|
aMenuItems.push(this.enhanceItemWithResponsibleElement(oSiblingMenuItem, aElementOverlays));
|
|
194
195
|
}
|
|
@@ -198,11 +199,12 @@ sap.ui.define([
|
|
|
198
199
|
if (this.isAvailable(aElementOverlays, bIsSibling)) {
|
|
199
200
|
aMenuItems = aMenuItems.concat(this.getCreateActions(bIsSibling, aElementOverlays[0])
|
|
200
201
|
.map(function(oAction) {
|
|
201
|
-
var oParentMenuItem =
|
|
202
|
+
var oParentMenuItem = {
|
|
202
203
|
action: oAction,
|
|
203
204
|
id: `CTX_CREATE_CHILD_IFRAME_${oAction.aggregation.toUpperCase()}`,
|
|
204
|
-
rank: ++iBaseRank
|
|
205
|
-
|
|
205
|
+
rank: ++iBaseRank,
|
|
206
|
+
...getCommonProperties.call(this, oAction.aggregation)
|
|
207
|
+
};
|
|
206
208
|
|
|
207
209
|
return this.enhanceItemWithResponsibleElement(oParentMenuItem, aElementOverlays);
|
|
208
210
|
}, this)
|
|
@@ -420,7 +420,7 @@
|
|
|
420
420
|
type="Emphasized"
|
|
421
421
|
text="{dialogInfo>/text/saveText}"
|
|
422
422
|
press="onSavePress"
|
|
423
|
-
enabled="{=!!${dialogInfo>/frameUrl/value} && !${dialogInfo>/frameUrlError/value}}"
|
|
423
|
+
enabled="{=!!${dialogInfo>/frameUrl/value} && !${dialogInfo>/frameUrlError/value} && ${dialogInfo>/areAllFieldsValid}}"
|
|
424
424
|
/>
|
|
425
425
|
</beginButton>
|
|
426
426
|
<endButton>
|
|
@@ -270,8 +270,8 @@ sap.ui.define([
|
|
|
270
270
|
if (sValue.trim() === "") {
|
|
271
271
|
sValueState = "Error";
|
|
272
272
|
oInput.setValueState(sValueState);
|
|
273
|
-
|
|
274
|
-
return
|
|
273
|
+
this._oJSONModel.setProperty("/areAllFieldsValid", false);
|
|
274
|
+
return true;
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
try {
|
|
@@ -281,8 +281,9 @@ sap.ui.define([
|
|
|
281
281
|
bValidationError = true;
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
+
const bAllFieldsValid = this._areAllTextFieldsValid() && this._areAllValueStateNones() && !bValidationError;
|
|
285
|
+
this._oJSONModel.setProperty("/areAllFieldsValid", bAllFieldsValid);
|
|
284
286
|
oInput.setValueState(sValueState);
|
|
285
|
-
|
|
286
287
|
return bValidationError;
|
|
287
288
|
},
|
|
288
289
|
|
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
* @name sap.ui.rta.service.Action
|
|
25
25
|
* @author SAP SE
|
|
26
26
|
* @since 1.58
|
|
27
|
-
* @version 1.
|
|
27
|
+
* @version 1.130.0
|
|
28
28
|
* @private
|
|
29
29
|
* @ui5-restricted
|
|
30
30
|
*
|
|
@@ -78,10 +78,11 @@ sap.ui.define([
|
|
|
78
78
|
: aResult;
|
|
79
79
|
}, [])
|
|
80
80
|
.map(function(mMenuItem) {
|
|
81
|
-
return
|
|
81
|
+
return {
|
|
82
|
+
...mMenuItem,
|
|
82
83
|
enabled: invoke(mMenuItem.enabled, aElementOverlays),
|
|
83
84
|
text: invoke(mMenuItem.text, aElementOverlays[0])
|
|
84
|
-
}
|
|
85
|
+
};
|
|
85
86
|
});
|
|
86
87
|
});
|
|
87
88
|
}
|
|
@@ -43,7 +43,7 @@ sap.ui.define([
|
|
|
43
43
|
* @name sap.ui.rta.service.Outline
|
|
44
44
|
* @author SAP SE
|
|
45
45
|
* @since 1.56
|
|
46
|
-
* @version 1.
|
|
46
|
+
* @version 1.130.0
|
|
47
47
|
* @private
|
|
48
48
|
* @ui5-restricted
|
|
49
49
|
*/
|
|
@@ -211,9 +211,7 @@ sap.ui.define([
|
|
|
211
211
|
var sAggregationOverlayId = oChildOverlay.getParent().getId();
|
|
212
212
|
// Aggregation with root template
|
|
213
213
|
if (mInnerTemplateData[sAggregationName]) {
|
|
214
|
-
return
|
|
215
|
-
templateFor: sAggregationOverlayId
|
|
216
|
-
}, mInnerTemplateData[sAggregationName]);
|
|
214
|
+
return { templateFor: sAggregationOverlayId, ...mInnerTemplateData[sAggregationName] };
|
|
217
215
|
}
|
|
218
216
|
return ((mTemplateData && mTemplateData.elements) || [])
|
|
219
217
|
.map(function(oElement) {
|
|
@@ -222,9 +220,7 @@ sap.ui.define([
|
|
|
222
220
|
oElement.type === "aggregationBindingTemplate"
|
|
223
221
|
|| oElement.parentAggregationName === sAggregationName
|
|
224
222
|
) {
|
|
225
|
-
return
|
|
226
|
-
templateFor: sAggregationOverlayId
|
|
227
|
-
}, oElement);
|
|
223
|
+
return { templateFor: sAggregationOverlayId, ...oElement };
|
|
228
224
|
}
|
|
229
225
|
// Regular aggregation
|
|
230
226
|
return oElement.technicalName === sAggregationName && oElement;
|
|
@@ -425,9 +421,9 @@ sap.ui.define([
|
|
|
425
421
|
var oData = getDefaultData(oElement, oDtMetadata, mTemplateData);
|
|
426
422
|
|
|
427
423
|
if (oOverlay instanceof ElementOverlay) {
|
|
428
|
-
return
|
|
424
|
+
return { ...oData, ...getElementOverlayData(oOverlay, oElement, oDtMetadata) };
|
|
429
425
|
}
|
|
430
|
-
return
|
|
426
|
+
return { ...oData, ...getAggregationOverlayData(oOverlay, oParentOverlay, oElement) };
|
|
431
427
|
};
|
|
432
428
|
|
|
433
429
|
/**
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* @name sap.ui.rta.service.Property
|
|
28
28
|
* @author SAP SE
|
|
29
29
|
* @since 1.58
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.130.0
|
|
31
31
|
* @private
|
|
32
32
|
* @ui5-restricted
|
|
33
33
|
*/
|
|
@@ -117,14 +117,13 @@ sap.ui.define([
|
|
|
117
117
|
]
|
|
118
118
|
)
|
|
119
119
|
.then(function(aPromiseResults) {
|
|
120
|
-
return
|
|
121
|
-
{},
|
|
122
|
-
|
|
123
|
-
aPromiseResults[
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
);
|
|
120
|
+
return {
|
|
121
|
+
...(aPromiseResults[0] && !isEmptyObject(aPromiseResults[0]) && {annotations: aPromiseResults[0]}),
|
|
122
|
+
...(aPromiseResults[1] && {properties: aPromiseResults[1]}),
|
|
123
|
+
...(aPromiseResults[2] && {label: validate(aPromiseResults[2])}),
|
|
124
|
+
...(oDesignTimeMetadataData.name && {name: oDesignTimeMetadata.getName(oElement)}),
|
|
125
|
+
...(!isEmptyObject(aPromiseResults[3]) && {links: aPromiseResults[3]})
|
|
126
|
+
};
|
|
128
127
|
});
|
|
129
128
|
};
|
|
130
129
|
|
|
@@ -274,7 +273,7 @@ sap.ui.define([
|
|
|
274
273
|
// to ensure ignore function is replaced by a boolean value
|
|
275
274
|
mDtObj[sKey].ignore = bIgnore;
|
|
276
275
|
if (!bIgnore) {
|
|
277
|
-
mFiltered[sKey] =
|
|
276
|
+
mFiltered[sKey] = { ...mDtObj[sKey] };
|
|
278
277
|
return oProperty._getResolvedLinks(mFiltered[sKey].links, oElement)
|
|
279
278
|
.then(function(mLinks) {
|
|
280
279
|
if (!isEmptyObject(mLinks)) {
|
|
@@ -316,7 +315,7 @@ sap.ui.define([
|
|
|
316
315
|
*/
|
|
317
316
|
oProperty._getResolvedLinks = function(mLinks, oElement) {
|
|
318
317
|
var aTextPromises = [];
|
|
319
|
-
var mResolvedLinks =
|
|
318
|
+
var mResolvedLinks = { ...mLinks };
|
|
320
319
|
|
|
321
320
|
Object.keys(mResolvedLinks).forEach(function(sLinkName) {
|
|
322
321
|
if (Array.isArray(mResolvedLinks[sLinkName])) {
|