@openui5/sap.ui.rta 1.96.2 → 1.98.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.
Files changed (179) hide show
  1. package/.reuse/dep5 +26 -31
  2. package/THIRDPARTY.txt +15 -21
  3. package/package.json +6 -6
  4. package/src/sap/ui/rta/.library +2 -2
  5. package/src/sap/ui/rta/Client.js +2 -2
  6. package/src/sap/ui/rta/RuntimeAuthoring.js +187 -139
  7. package/src/sap/ui/rta/Utils.js +2 -2
  8. package/src/sap/ui/rta/api/startAdaptation.js +2 -3
  9. package/src/sap/ui/rta/api/startKeyUserAdaptation.js +3 -3
  10. package/src/sap/ui/rta/appVariant/AppVariantDialog.js +6 -4
  11. package/src/sap/ui/rta/appVariant/AppVariantManager.js +5 -7
  12. package/src/sap/ui/rta/appVariant/AppVariantOverviewDialog.js +1 -1
  13. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +5 -12
  14. package/src/sap/ui/rta/appVariant/Feature.js +7 -6
  15. package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +3 -2
  16. package/src/sap/ui/rta/appVariant/Utils.js +1 -1
  17. package/src/sap/ui/rta/appVariant/manageApps/webapp/Component.js +1 -1
  18. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +1 -1
  19. package/src/sap/ui/rta/appVariant/manageApps/webapp/index.js +1 -1
  20. package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
  21. package/src/sap/ui/rta/command/AddIFrame.js +2 -2
  22. package/src/sap/ui/rta/command/AddProperty.js +2 -2
  23. package/src/sap/ui/rta/command/AddXML.js +2 -2
  24. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +2 -2
  25. package/src/sap/ui/rta/command/AppDescriptorCommand.js +5 -4
  26. package/src/sap/ui/rta/command/BaseCommand.js +2 -2
  27. package/src/sap/ui/rta/command/BindProperty.js +2 -2
  28. package/src/sap/ui/rta/command/Combine.js +2 -2
  29. package/src/sap/ui/rta/command/CommandFactory.js +2 -2
  30. package/src/sap/ui/rta/command/CompositeCommand.js +6 -6
  31. package/src/sap/ui/rta/command/ControlVariantConfigure.js +2 -2
  32. package/src/sap/ui/rta/command/ControlVariantSave.js +2 -2
  33. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +2 -2
  34. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +2 -2
  35. package/src/sap/ui/rta/command/ControlVariantSwitch.js +2 -7
  36. package/src/sap/ui/rta/command/CreateContainer.js +2 -2
  37. package/src/sap/ui/rta/command/CustomAdd.js +2 -2
  38. package/src/sap/ui/rta/command/FlexCommand.js +2 -2
  39. package/src/sap/ui/rta/command/LREPSerializer.js +12 -4
  40. package/src/sap/ui/rta/command/LocalReset.js +2 -2
  41. package/src/sap/ui/rta/command/Move.js +2 -2
  42. package/src/sap/ui/rta/command/Property.js +2 -2
  43. package/src/sap/ui/rta/command/Remove.js +2 -2
  44. package/src/sap/ui/rta/command/Rename.js +2 -2
  45. package/src/sap/ui/rta/command/Reveal.js +2 -2
  46. package/src/sap/ui/rta/command/Settings.js +2 -2
  47. package/src/sap/ui/rta/command/Split.js +2 -2
  48. package/src/sap/ui/rta/command/Stack.js +16 -22
  49. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +2 -2
  50. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +2 -2
  51. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +2 -2
  52. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +2 -2
  53. package/src/sap/ui/rta/enablement/TestDelegate.js +1 -1
  54. package/src/sap/ui/rta/enablement/elementActionTest.js +3 -3
  55. package/src/sap/ui/rta/library.js +3 -3
  56. package/src/sap/ui/rta/messagebundle.properties +38 -19
  57. package/src/sap/ui/rta/messagebundle_ar.properties +20 -10
  58. package/src/sap/ui/rta/messagebundle_bg.properties +20 -10
  59. package/src/sap/ui/rta/messagebundle_ca.properties +19 -9
  60. package/src/sap/ui/rta/messagebundle_cs.properties +20 -10
  61. package/src/sap/ui/rta/messagebundle_cy.properties +20 -10
  62. package/src/sap/ui/rta/messagebundle_da.properties +20 -10
  63. package/src/sap/ui/rta/messagebundle_de.properties +19 -9
  64. package/src/sap/ui/rta/messagebundle_el.properties +20 -10
  65. package/src/sap/ui/rta/messagebundle_en.properties +20 -10
  66. package/src/sap/ui/rta/messagebundle_en_GB.properties +20 -10
  67. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +20 -10
  68. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +7 -14
  69. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +22 -12
  70. package/src/sap/ui/rta/messagebundle_es.properties +20 -10
  71. package/src/sap/ui/rta/messagebundle_es_MX.properties +23 -13
  72. package/src/sap/ui/rta/messagebundle_et.properties +21 -11
  73. package/src/sap/ui/rta/messagebundle_fi.properties +19 -9
  74. package/src/sap/ui/rta/messagebundle_fr.properties +20 -10
  75. package/src/sap/ui/rta/messagebundle_fr_CA.properties +20 -10
  76. package/src/sap/ui/rta/messagebundle_hi.properties +20 -10
  77. package/src/sap/ui/rta/messagebundle_hr.properties +20 -10
  78. package/src/sap/ui/rta/messagebundle_hu.properties +19 -9
  79. package/src/sap/ui/rta/messagebundle_id.properties +24 -14
  80. package/src/sap/ui/rta/messagebundle_it.properties +21 -11
  81. package/src/sap/ui/rta/messagebundle_iw.properties +20 -10
  82. package/src/sap/ui/rta/messagebundle_ja.properties +20 -10
  83. package/src/sap/ui/rta/messagebundle_kk.properties +20 -10
  84. package/src/sap/ui/rta/messagebundle_ko.properties +21 -11
  85. package/src/sap/ui/rta/messagebundle_lt.properties +20 -10
  86. package/src/sap/ui/rta/messagebundle_lv.properties +20 -10
  87. package/src/sap/ui/rta/messagebundle_ms.properties +20 -10
  88. package/src/sap/ui/rta/messagebundle_nl.properties +20 -10
  89. package/src/sap/ui/rta/messagebundle_no.properties +20 -10
  90. package/src/sap/ui/rta/messagebundle_pl.properties +20 -10
  91. package/src/sap/ui/rta/messagebundle_pt.properties +19 -9
  92. package/src/sap/ui/rta/messagebundle_pt_PT.properties +19 -9
  93. package/src/sap/ui/rta/messagebundle_ro.properties +20 -10
  94. package/src/sap/ui/rta/messagebundle_ru.properties +19 -9
  95. package/src/sap/ui/rta/messagebundle_sh.properties +20 -10
  96. package/src/sap/ui/rta/messagebundle_sk.properties +20 -10
  97. package/src/sap/ui/rta/messagebundle_sl.properties +20 -10
  98. package/src/sap/ui/rta/messagebundle_sv.properties +20 -10
  99. package/src/sap/ui/rta/messagebundle_th.properties +25 -15
  100. package/src/sap/ui/rta/messagebundle_tr.properties +20 -10
  101. package/src/sap/ui/rta/messagebundle_uk.properties +23 -13
  102. package/src/sap/ui/rta/messagebundle_vi.properties +20 -10
  103. package/src/sap/ui/rta/messagebundle_zh_CN.properties +20 -10
  104. package/src/sap/ui/rta/messagebundle_zh_TW.properties +20 -10
  105. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +2 -2
  106. package/src/sap/ui/rta/plugin/BaseCreate.js +3 -3
  107. package/src/sap/ui/rta/plugin/Combine.js +2 -2
  108. package/src/sap/ui/rta/plugin/CompVariant.js +1 -1
  109. package/src/sap/ui/rta/plugin/ControlVariant.js +4 -5
  110. package/src/sap/ui/rta/plugin/CreateContainer.js +2 -2
  111. package/src/sap/ui/rta/plugin/CutPaste.js +2 -2
  112. package/src/sap/ui/rta/plugin/DragDrop.js +2 -2
  113. package/src/sap/ui/rta/plugin/EasyAdd.js +2 -2
  114. package/src/sap/ui/rta/plugin/EasyRemove.js +2 -2
  115. package/src/sap/ui/rta/plugin/LocalReset.js +2 -2
  116. package/src/sap/ui/rta/plugin/Plugin.js +2 -2
  117. package/src/sap/ui/rta/plugin/RTAElementMover.js +2 -2
  118. package/src/sap/ui/rta/plugin/Remove.js +2 -2
  119. package/src/sap/ui/rta/plugin/Rename.js +2 -2
  120. package/src/sap/ui/rta/plugin/RenameHandler.js +2 -15
  121. package/src/sap/ui/rta/plugin/Selection.js +16 -27
  122. package/src/sap/ui/rta/plugin/Settings.js +2 -2
  123. package/src/sap/ui/rta/plugin/Split.js +3 -2
  124. package/src/sap/ui/rta/plugin/Stretch.js +2 -2
  125. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +16 -85
  126. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +2 -2
  127. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +1 -68
  128. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +10 -11
  129. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +4 -5
  130. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +18 -48
  131. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +2 -2
  132. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +2 -2
  133. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +2 -17
  134. package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +2 -2
  135. package/src/sap/ui/rta/service/Action.js +2 -2
  136. package/src/sap/ui/rta/service/ControllerExtension.js +6 -7
  137. package/src/sap/ui/rta/service/Outline.js +84 -31
  138. package/src/sap/ui/rta/service/Property.js +2 -4
  139. package/src/sap/ui/rta/service/Receiver.js +1 -1
  140. package/src/sap/ui/rta/service/Selection.js +3 -2
  141. package/src/sap/ui/rta/service/index.js +1 -1
  142. package/src/sap/ui/rta/themes/base/ChangeVisualization.less +23 -30
  143. package/src/sap/ui/rta/themes/base/OverlayWithScrollbar.less +54 -35
  144. package/src/sap/ui/rta/themes/base/library.source.less +1 -1
  145. package/src/sap/ui/rta/themes/sap_hcb/library.source.less +1 -1
  146. package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +1 -0
  147. package/src/sap/ui/rta/toolbar/Adaptation.js +13 -13
  148. package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
  149. package/src/sap/ui/rta/toolbar/Base.js +4 -4
  150. package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -1
  151. package/src/sap/ui/rta/toolbar/Fiori.js +2 -2
  152. package/src/sap/ui/rta/toolbar/FioriLike.js +2 -2
  153. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +5 -5
  154. package/src/sap/ui/rta/toolbar/Personalization.js +2 -2
  155. package/src/sap/ui/rta/toolbar/Standalone.js +2 -2
  156. package/src/sap/ui/rta/toolbar/translation/DownloadTranslationDialog.fragment.xml +19 -10
  157. package/src/sap/ui/rta/toolbar/translation/Translation.js +115 -46
  158. package/src/sap/ui/rta/toolbar/translation/TranslationPopover.fragment.xml +8 -13
  159. package/src/sap/ui/rta/toolbar/translation/UploadTranslationDialog.fragment.xml +41 -0
  160. package/src/sap/ui/rta/util/Animation.js +1 -1
  161. package/src/sap/ui/rta/util/BindingsExtractor.js +1 -1
  162. package/src/sap/ui/rta/util/PluginManager.js +2 -2
  163. package/src/sap/ui/rta/util/PopupManager.js +8 -13
  164. package/src/sap/ui/rta/util/ServiceEventBus.js +2 -2
  165. package/src/sap/ui/rta/util/StylesLoader.js +1 -1
  166. package/src/sap/ui/rta/util/UrlParser.js +1 -1
  167. package/src/sap/ui/rta/util/adaptationStarter.js +42 -4
  168. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +23 -81
  169. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorPopover.fragment.xml +15 -37
  170. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +2 -3
  171. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +54 -67
  172. package/src/sap/ui/rta/util/changeVisualization/categories/MoveVisualization.js +30 -0
  173. package/src/sap/ui/rta/util/changeVisualization/categories/RenameVisualization.js +4 -3
  174. package/src/sap/ui/rta/util/changeVisualization/categories/SplitVisualization.js +30 -0
  175. package/src/sap/ui/rta/util/changeVisualization/categories/getVisualizationCategory.js +10 -4
  176. package/src/sap/ui/rta/util/hasStableId.js +1 -1
  177. package/src/sap/ui/rta/util/showMessageBox.js +5 -4
  178. package/src/sap/ui/rta/util/validateFlexEnabled.js +7 -6
  179. package/src/sap/ui/rta/util/validateStableIds.js +1 -1
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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.96.2
38
+ * @version 1.98.0
39
39
  *
40
40
  * @constructor
41
41
  * @private
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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.96.2
32
+ * @version 1.98.0
33
33
  * @constructor
34
34
  * @private
35
35
  * @since 1.34
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @extends sap.ui.rta.plugin.Plugin
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.96.2
31
+ * @version 1.98.0
32
32
  *
33
33
  * @constructor
34
34
  * @private
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -55,7 +55,7 @@ sap.ui.define([
55
55
  * Provides Rename handling functionality
56
56
  *
57
57
  * @author SAP SE
58
- * @version 1.96.2
58
+ * @version 1.98.0
59
59
  *
60
60
  * @constructor
61
61
  * @private
@@ -311,19 +311,10 @@ sap.ui.define([
311
311
  });
312
312
  },
313
313
 
314
- /**
315
- * @param {sap.ui.base.Event} oEvent - event object
316
- * @private
317
- */
318
314
  _onEditableFieldBlur: function () {
319
315
  return RenameHandler._handlePostRename.call(this, false);
320
316
  },
321
317
 
322
- /**
323
- * Handles events after rename has been performed
324
- * @param {boolean} bRestoreFocus - to restore focus to overlay after rename completes
325
- * @private
326
- */
327
318
  _handlePostRename: function (bRestoreFocus, oEvent) {
328
319
  if (!this._bBlurOrKeyDownStarted) {
329
320
  this._oEditedOverlay.removeStyleClass(RenameHandler.errorStyleClass);
@@ -399,10 +390,6 @@ sap.ui.define([
399
390
  }
400
391
  },
401
392
 
402
- /**
403
- * @param {sap.ui.base.Event} oEvent - event object
404
- * @private
405
- */
406
393
  _onEditableFieldKeydown: function (oEvent) {
407
394
  switch (oEvent.keyCode) {
408
395
  case KeyCodes.ENTER:
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -9,20 +9,16 @@ sap.ui.define([
9
9
  "sap/ui/rta/Utils",
10
10
  "sap/ui/dt/OverlayRegistry",
11
11
  "sap/ui/events/KeyCodes",
12
- "sap/ui/dt/Overlay",
13
12
  "sap/base/util/restricted/_intersection",
14
- "sap/m/InstanceManager",
15
- "sap/ui/Device"
13
+ "sap/m/InstanceManager"
16
14
  ],
17
15
  function (
18
16
  Plugin,
19
17
  Utils,
20
18
  OverlayRegistry,
21
19
  KeyCodes,
22
- Overlay,
23
20
  _intersection,
24
- InstanceManager,
25
- Device
21
+ InstanceManager
26
22
  ) {
27
23
  "use strict";
28
24
 
@@ -34,7 +30,7 @@ function (
34
30
  * @class The Selection plugin allows you to select or focus overlays with mouse or keyboard and navigate to others.
35
31
  * @extends sap.ui.rta.plugin.Plugin
36
32
  * @author SAP SE
37
- * @version 1.96.2
33
+ * @version 1.98.0
38
34
  * @constructor
39
35
  * @private
40
36
  * @since 1.34
@@ -125,6 +121,18 @@ function (
125
121
  return false;
126
122
  };
127
123
 
124
+ /**
125
+ * Sets the value of the isActive property.
126
+ * When set to false, de-select all overlays.
127
+ * @param {boolean} bValue - Value to be set
128
+ */
129
+ Selection.prototype.setIsActive = function(bValue) {
130
+ this.setProperty("isActive", bValue);
131
+ if (bValue === false) {
132
+ this._deselectOverlays();
133
+ }
134
+ };
135
+
128
136
  /**
129
137
  * Register an overlay
130
138
  *
@@ -289,25 +297,6 @@ function (
289
297
  });
290
298
  return;
291
299
  }
292
- // set focus after clicking, needed only for internet explorer
293
- if (Device.browser.name === "ie") {
294
- // when the EasyAdd Button is clicked, we don't want to focus/stopPropagation.
295
- // but when the OverlayScrollContainer is the target, we want it to behave like a click on an overlay
296
- var oTarget = OverlayRegistry.getOverlay(oEvent.target.id);
297
- var bTargetIsScrollContainer = jQuery(oEvent.target).hasClass("sapUiDtOverlayScrollContainer");
298
- var oOverlay = OverlayRegistry.getOverlay(oEvent.currentTarget.id);
299
- if (
300
- oOverlay
301
- && (bTargetIsScrollContainer || oTarget instanceof Overlay)
302
- ) {
303
- if (oOverlay.getSelectable()) {
304
- oOverlay.focus();
305
- oEvent.stopPropagation();
306
- } else {
307
- oOverlay.getDomRef().blur();
308
- }
309
- }
310
- }
311
300
  };
312
301
 
313
302
  /**
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @class The Settings allows trigger change of settings operations on the overlay
26
26
  * @extends sap.ui.rta.plugin.Plugin
27
27
  * @author SAP SE
28
- * @version 1.96.2
28
+ * @version 1.98.0
29
29
  * @constructor
30
30
  * @private
31
31
  * @since 1.44
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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.96.2
26
+ * @version 1.98.0
27
27
  * @constructor
28
28
  * @private
29
29
  * @since 1.46
@@ -115,6 +115,7 @@ sap.ui.define([
115
115
 
116
116
  /**
117
117
  * @param {sap.ui.dt.ElementOverlay} oElementOverlay - element overlay to split
118
+ * @returns {Promise<sap.ui.rta.command.Split>} Resolves with a split command
118
119
  */
119
120
  Split.prototype.handleSplit = function (oElementOverlay) {
120
121
  var oSplitElement = oElementOverlay.getElement();
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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
  * @extends sap.ui.rta.plugin.Plugin
32
32
  *
33
33
  * @author SAP SE
34
- * @version 1.96.2
34
+ * @version 1.98.0
35
35
  *
36
36
  * @constructor
37
37
  * @private
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * handled by the AdditionalElements Plugin (Reveal, Add Via Delegate, Add Custom)
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.96.2
35
+ * @version 1.98.0
36
36
  * @private
37
37
  * @since 1.94
38
38
  * @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
@@ -82,12 +82,20 @@ sap.ui.define([
82
82
  function checkInvalidAddActions(bSibling, oSourceElementOverlay, oPlugin) {
83
83
  var mParents = AdditionalElementsUtils.getParents(bSibling, oSourceElementOverlay, oPlugin);
84
84
  var oDesignTimeMetadata = mParents.parentOverlay && mParents.parentOverlay.getDesignTimeMetadata();
85
- var aActions = oDesignTimeMetadata ? oDesignTimeMetadata.getActionDataFromAggregations("addODataProperty", mParents.parent) : [];
86
- if (aActions.length > 0) {
85
+ var aAddODataPropertyActions = oDesignTimeMetadata ? oDesignTimeMetadata.getActionDataFromAggregations("addODataProperty", mParents.parent) : [];
86
+ if (aAddODataPropertyActions.length > 0) {
87
87
  Log.error("Outdated addODataProperty action in designtime metadata in "
88
88
  + oDesignTimeMetadata.getData().designtimeModule
89
89
  + " or propagated or via instance specific designtime metadata.");
90
90
  }
91
+ var aAddActions = oDesignTimeMetadata ? oDesignTimeMetadata.getActionDataFromAggregations("add", mParents.parent) : [];
92
+ aAddActions.forEach(function(mAddAction) {
93
+ if (mAddAction["custom"]) {
94
+ Log.error("Outdated custom add action in designtime metadata in "
95
+ + oDesignTimeMetadata.getData().designtimeModule
96
+ + " or propagated or via instance specific designtime metadata.");
97
+ }
98
+ });
91
99
  }
92
100
 
93
101
  function getInvisibleElements (oParentOverlay, sAggregationName, oPlugin) {
@@ -288,7 +296,7 @@ sap.ui.define([
288
296
  }
289
297
 
290
298
  /**
291
- * Calculate a structure with all "add/reveal/custom" action relevant data collected per aggregation:
299
+ * Calculate a structure with all "add/reveal" action relevant data collected per aggregation:
292
300
  * <pre>
293
301
  * {
294
302
  * <aggregationName> : {
@@ -304,11 +312,6 @@ sap.ui.define([
304
312
  * sourceAggregation: <aggregation where this element is currently located>
305
313
  * }],
306
314
  * controlTypeNames : string[] <all controlTypeNames collected via designTimeMetadata>
307
- * },
308
- * addViaCustom : {
309
- * designTimeMetadata : <sap.ui.dt.ElementDesignTimeMetadata of parent>,
310
- * action : <add.custom action section from designTimeMetadata>
311
- * items : <add.custom action's array of items from the getItems() function>
312
315
  * }
313
316
  * },
314
317
  * <aggregationName2> : ...
@@ -320,7 +323,7 @@ sap.ui.define([
320
323
  * @param {sap.ui.rta.plugin.additionalElements.AdditionalElementsPlugin} oPlugin - Instance of the AdditionalElementsPlugin
321
324
  * @param {boolean} [bInvalidate] - Option to prevent cached actions to be returned
322
325
  *
323
- * @return {Promise} Resolving to a structure with all "add/reveal/custom" action relevant data collected
326
+ * @return {Promise} Resolving to a structure with all "add/reveal" action relevant data collected
324
327
  */
325
328
  ActionExtractor.getActions = function(bSibling, oSourceElementOverlay, oPlugin, bInvalidate) {
326
329
  var sSiblingOrChild = bSibling ? "asSibling" : "asChild";
@@ -330,16 +333,14 @@ sap.ui.define([
330
333
 
331
334
  var oRevealActionsPromise = this._getRevealActions(bSibling, oSourceElementOverlay, oPlugin);
332
335
  var oAddPropertyActionsPromise = this._getAddViaDelegateActions(bSibling, oSourceElementOverlay, oPlugin);
333
- var oCustomAddActionsPromise = this._getCustomAddActions(bSibling, oSourceElementOverlay, oPlugin);
334
336
 
335
337
  return Promise.all([
336
338
  oRevealActionsPromise,
337
339
  oAddPropertyActionsPromise,
338
- oCustomAddActionsPromise,
339
340
  checkInvalidAddActions(bSibling, oSourceElementOverlay, oPlugin)
340
341
  ]).then(function(aAllActions) {
341
342
  //join and condense all action data
342
- var mAllActions = merge(aAllActions[0], aAllActions[1], aAllActions[2]);
343
+ var mAllActions = merge(aAllActions[0], aAllActions[1]);
343
344
  oSourceElementOverlay._mAddActions = oSourceElementOverlay._mAddActions || {asSibling: {}, asChild: {}};
344
345
  oSourceElementOverlay._mAddActions[sSiblingOrChild] = mAllActions;
345
346
  return mAllActions;
@@ -350,7 +351,7 @@ sap.ui.define([
350
351
  * Returns the already calculated actions of an Overlay, or undefined if no actions available
351
352
  * @param {boolean} bSibling - Indicates if the elements should be added as sibling (true) or child (false) to the overlay
352
353
  * @param {sap.ui.dt.ElementOverlay} oOverlay - Elements will be added in relation (sibling/parent) to this overlay
353
- * @returns {object/undefined} - Object with all "add/reveal/custom" action relevant data collected or undefined if no actions available
354
+ * @returns {object/undefined} - Object with all "add/reveal" action relevant data collected or undefined if no actions available
354
355
  */
355
356
  ActionExtractor.getActionsOrUndef = function(bSibling, oOverlay) {
356
357
  var sSiblingOrChild = bSibling ? "asSibling" : "asChild";
@@ -431,75 +432,5 @@ sap.ui.define([
431
432
  }.bind(this));
432
433
  };
433
434
 
434
- /**
435
- * Return the CustomAdd action data (parameters + elements) for an Overlay.
436
- * @param {boolean} bSibling - If source element overlay should be sibling or parent to the newly added fields
437
- * @param {sap.ui.dt.ElementOverlay} oOverlay - Overlay where the action is triggered
438
- * @param {sap.ui.rta.plugin.additionalElements.AdditionalElementsPlugin} oPlugin - Instance of the AdditionalElementsPlugin
439
- *
440
- * @returns {Promise<object>} CustomAdd action data
441
- */
442
- ActionExtractor._getCustomAddActions = function(bSibling, oOverlay, oPlugin) {
443
- var mParents = AdditionalElementsUtils.getParents(bSibling, oOverlay, oPlugin);
444
- var oDesignTimeMetadata = mParents.parentOverlay && mParents.parentOverlay.getDesignTimeMetadata();
445
- var aActions = oDesignTimeMetadata && oDesignTimeMetadata.getActionDataFromAggregations("add", mParents.parent, undefined, "custom") || [];
446
-
447
- function getAction(mAction, oCheckElement) {
448
- var aItems = [];
449
- return Promise.resolve()
450
- .then(function () {
451
- if (mAction && typeof mAction.getItems === "function") {
452
- var oCheckElementOverlay = OverlayRegistry.getOverlay(oCheckElement);
453
- if (oPlugin.hasStableId(oCheckElementOverlay)) {
454
- return mAction.getItems(oCheckElement);
455
- }
456
- }
457
- return aItems;
458
- })
459
- .then(function (aItemsFromAction) {
460
- aItems = aItemsFromAction || [];
461
- var aChangeHandlerPromises = aItems.reduce(function (aPromises, oItem) {
462
- // adjust relevant container
463
- if (oItem.changeSpecificData.changeOnRelevantContainer) {
464
- oCheckElement = mParents.relevantContainer;
465
- }
466
- if (oItem.changeSpecificData.changeType) {
467
- aPromises.push(oPlugin.hasChangeHandler(oItem.changeSpecificData.changeType, oCheckElement));
468
- }
469
- return aPromises;
470
- }, []);
471
-
472
- return Promise.all(aChangeHandlerPromises);
473
- })
474
- .then(function (aHasChangeHandlerForCustomItems) {
475
- if (aHasChangeHandlerForCustomItems.indexOf(false) === -1) {
476
- return {
477
- aggregationName: mAction.aggregation,
478
- addViaCustom: {
479
- designTimeMetadata: oDesignTimeMetadata,
480
- action: mAction,
481
- items: aItems
482
- }
483
- };
484
- }
485
- return undefined;
486
- });
487
- }
488
-
489
- var oCheckElement = mParents.parent;
490
- return aActions.reduce(function(oPreviousPromise, oAction) {
491
- return oPreviousPromise.then(function(oReturn) {
492
- return getAction.call(this, oAction, oCheckElement).then(function(mAction) {
493
- if (mAction) {
494
- oReturn[mAction.aggregationName] = {
495
- addViaCustom: mAction.addViaCustom
496
- };
497
- }
498
- return oReturn;
499
- });
500
- }.bind(this));
501
- }.bind(this), Promise.resolve({}));
502
- };
503
-
504
435
  return ActionExtractor;
505
436
  });
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  sap.ui.define([
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @class Context - Dialog for available Fields in Runtime Authoring
33
33
  * @extends sap.ui.base.ManagedObject
34
34
  * @author SAP SE
35
- * @version 1.96.2
35
+ * @version 1.98.0
36
36
  * @constructor
37
37
  * @private
38
38
  * @since 1.44
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -126,15 +126,6 @@ sap.ui.define([
126
126
  });
127
127
  }
128
128
 
129
- function _assignCustomItemIds(sParentId, oCustomItem) {
130
- oCustomItem.type = "custom";
131
- if (oCustomItem.id) {
132
- oCustomItem.itemId = sParentId + "-" + oCustomItem.id;
133
- oCustomItem.key = oCustomItem.itemId;
134
- }
135
- return oCustomItem;
136
- }
137
-
138
129
  function _oPropertyToAdditionalElementInfo (oProperty) {
139
130
  return {
140
131
  selected: false,
@@ -409,18 +400,6 @@ sap.ui.define([
409
400
  return bIncludeElement;
410
401
  }
411
402
 
412
- function _enhanceByCustomItems(oInvisibleElement, mActions, bIncludeElement, oElement) {
413
- var mCustom = mActions.addViaCustom;
414
- if (mCustom && bIncludeElement) {
415
- mCustom.items.forEach(function(oCustomItem) {
416
- _assignCustomItemIds(oElement.getParent().getId(), oCustomItem);
417
- if (oCustomItem.itemId === oInvisibleElement.getId()) {
418
- _enhanceInvisibleElement(oInvisibleElement, oCustomItem);
419
- }
420
- });
421
- }
422
- }
423
-
424
403
  function _getModelName(mAddViaDelegate) {
425
404
  //ManagedObject jsdoc tells to use undefined for default model, therefore it
426
405
  //is necessary to return undefined if modelName or whole delegateInfo is missing
@@ -462,8 +441,6 @@ sap.ui.define([
462
441
 
463
442
  var bIncludeElement = _enhanceByMetadata(oElement, sAggregationName, oInvisibleElement, mActions, aRepresentedProperties, aProperties);
464
443
 
465
- _enhanceByCustomItems(oInvisibleElement, mActions, bIncludeElement, oElement);
466
-
467
444
  if (bIncludeElement) {
468
445
  aAllElementData.push({
469
446
  element: oInvisibleElement,
@@ -518,50 +495,6 @@ sap.ui.define([
518
495
  }).then(function(aUnrepresentedProperties) {
519
496
  return aUnrepresentedProperties.map(_oPropertyToAdditionalElementInfo);
520
497
  });
521
- },
522
-
523
- getCustomAddItems: function(oElement, mAction) {
524
- return new Promise(function(fnResolve) {
525
- if (Array.isArray(mAction.items)) {
526
- // remove items already rendered
527
- fnResolve(
528
- mAction.items
529
- .map(_assignCustomItemIds.bind(null, oElement.getParent().getId()))
530
- .filter(function(oCustomItem) {
531
- if (!oCustomItem.id) {
532
- Log.error("CustomAdd item with label " + oCustomItem.label + " does not contain an 'id' property", "sap.ui.rta.plugin.AdditionalElementsAnalyzer#showAvailableElements");
533
- return false;
534
- }
535
- return !ElementUtil.getElementInstance(oCustomItem.itemId);
536
- })
537
- );
538
- } else {
539
- fnResolve();
540
- }
541
- });
542
- },
543
-
544
- getFilteredItemsList: function(aAnalyzerValues) {
545
- // promise index 0: invisible, 1: addViaOData/addViaDelegate, 2: custom
546
- var aInvisibleElements = aAnalyzerValues[0];
547
- var iCustomItemsIndex = 2;
548
- var aCustomItems = aAnalyzerValues[iCustomItemsIndex];
549
- if (aCustomItems) {
550
- var aInvisibleElementIds = aInvisibleElements.map(
551
- function (oInvisibleItem) {
552
- return oInvisibleItem.elementId;
553
- }
554
- );
555
- // filter for hidden custom items in the array
556
- aAnalyzerValues[iCustomItemsIndex] = aCustomItems
557
- .filter(function(oCustomItem) {
558
- return !oCustomItem.itemId || aInvisibleElementIds.indexOf(oCustomItem.itemId) === -1;
559
- });
560
- }
561
- return aAnalyzerValues
562
- .reduce(function (aAllElements, aAnalyzerValue) {
563
- return aAllElements.concat(aAnalyzerValue);
564
- }, []);
565
498
  }
566
499
  };
567
500
  return oAnalyzer;
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -75,7 +75,7 @@ sap.ui.define([
75
75
  * @class The plugin allows to add additional elements that exist either hidden in the UI or in the OData service
76
76
  * @extends sap.ui.rta.plugin.Plugin
77
77
  * @author SAP SE
78
- * @version 1.96.2
78
+ * @version 1.98.0
79
79
  * @constructor
80
80
  * @private
81
81
  * @since 1.44
@@ -173,7 +173,6 @@ sap.ui.define([
173
173
  if (
174
174
  mActions &&
175
175
  ((mActions.reveal && mActions.reveal.elements.length > 0)
176
- || mActions.addViaCustom
177
176
  || mActions.addViaDelegate)
178
177
  ) {
179
178
  bIsEnabled = true;
@@ -357,7 +356,7 @@ sap.ui.define([
357
356
  if (mActions[sAggregationName].addViaDelegate) {
358
357
  bEditable = this.checkAggregationsOnSelf(mParents.parentOverlay, "add", undefined, "delegate");
359
358
  }
360
- if (!bEditable && (mActions[sAggregationName].reveal || mActions[sAggregationName].addViaCustom)) {
359
+ if (!bEditable && mActions[sAggregationName].reveal) {
361
360
  return true;
362
361
  }
363
362
  return bEditable;
@@ -410,8 +409,7 @@ sap.ui.define([
410
409
  aggregation: sAggregationName,
411
410
  elementPromises: [
412
411
  mActions.reveal ? AdditionalElementsAnalyzer.enhanceInvisibleElements(mParents.parent, mActions) : Promise.resolve([]),
413
- mActions.addViaDelegate ? AdditionalElementsAnalyzer.getUnrepresentedDelegateProperties(mParents.parent, mActions.addViaDelegate) : Promise.resolve([]),
414
- mActions.addViaCustom ? AdditionalElementsAnalyzer.getCustomAddItems(mParents.parent, mActions.addViaCustom, mActions.aggregation) : Promise.resolve([])
412
+ mActions.addViaDelegate ? AdditionalElementsAnalyzer.getUnrepresentedDelegateProperties(mParents.parent, mActions.addViaDelegate) : Promise.resolve([])
415
413
  ]
416
414
  });
417
415
  });
@@ -567,16 +565,14 @@ sap.ui.define([
567
565
  // aggregation: "aggregation1",
568
566
  // elementPromises: [
569
567
  // revealPromise,
570
- // addViaDelegatePromise,
571
- // addViaCustomPromise
568
+ // addViaDelegatePromise
572
569
  // ]
573
570
  // },
574
571
  // {
575
572
  // aggregation: "aggregation2",
576
573
  // elementPromises: [
577
574
  // revealPromise,
578
- // addViaDelegatePromise,
579
- // addViaCustomPromise
575
+ // addViaDelegatePromise
580
576
  // ]
581
577
  // }
582
578
  // ...
@@ -599,9 +595,12 @@ sap.ui.define([
599
595
  aAllPromises.forEach(function(aPromisesByAggregation) {
600
596
  aCollectedPromises.push(
601
597
  Promise.all(aPromisesByAggregation.elementPromises).then(function(aAnalyzerValues) {
598
+ var aRevealElements = aAnalyzerValues[0];
599
+ var aAddViaDelegateElements = aAnalyzerValues[1];
600
+ var aAllElements = aRevealElements.concat(aAddViaDelegateElements);
602
601
  return {
603
602
  aggregation: aPromisesByAggregation.aggregation,
604
- elements: AdditionalElementsAnalyzer.getFilteredItemsList(aAnalyzerValues)
603
+ elements: aAllElements
605
604
  };
606
605
  })
607
606
  );
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -15,7 +15,7 @@ sap.ui.define([
15
15
  * Helper object containing methods for the AdditionalElements plugin
16
16
  *
17
17
  * @author SAP SE
18
- * @version 1.96.2
18
+ * @version 1.98.0
19
19
  * @private
20
20
  * @since 1.94
21
21
  * @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
@@ -28,8 +28,7 @@ sap.ui.define([
28
28
  * @returns {sap.ui.dt.ElementDesignTimeMetadata} Design time metadata
29
29
  */
30
30
  function getDTMetadataFromActions(mActions) {
31
- return (mActions["addViaDelegate"] && mActions["addViaDelegate"].designTimeMetadata)
32
- || (mActions["addViaCustom"] && mActions["addViaCustom"].designTimeMetadata);
31
+ return mActions["addViaDelegate"] && mActions["addViaDelegate"].designTimeMetadata;
33
32
  }
34
33
 
35
34
  /**
@@ -42,7 +41,7 @@ sap.ui.define([
42
41
  AdditionalElementsUtils.getParents = function(bSibling, oOverlay, oPlugin) {
43
42
  var oParentOverlay;
44
43
  var oResponsibleElementOverlay = oOverlay;
45
- var bResponsibleElementAvailable = ["add.delegate", "reveal", "add.custom"].some(function(vActionName) {
44
+ var bResponsibleElementAvailable = ["add.delegate", "reveal"].some(function(vActionName) {
46
45
  return oPlugin.isResponsibleElementActionAvailable(oOverlay, vActionName);
47
46
  });
48
47
  if (bResponsibleElementAvailable) {