@openui5/sap.ui.rta 1.136.1 → 1.138.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 (177) hide show
  1. package/REUSE.toml +0 -28
  2. package/THIRDPARTY.txt +1 -25
  3. package/package.json +6 -6
  4. package/src/sap/ui/rta/.library +1 -1
  5. package/src/sap/ui/rta/Client.js +1 -1
  6. package/src/sap/ui/rta/RuntimeAuthoring.js +33 -22
  7. package/src/sap/ui/rta/Utils.js +1 -1
  8. package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
  9. package/src/sap/ui/rta/command/AddIFrame.js +1 -1
  10. package/src/sap/ui/rta/command/AddProperty.js +1 -1
  11. package/src/sap/ui/rta/command/AddXML.js +1 -1
  12. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
  13. package/src/sap/ui/rta/command/AnnotationCommand.js +1 -1
  14. package/src/sap/ui/rta/command/BaseCommand.js +1 -1
  15. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  16. package/src/sap/ui/rta/command/Combine.js +1 -1
  17. package/src/sap/ui/rta/command/CommandFactory.js +1 -1
  18. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  19. package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
  20. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  21. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
  22. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
  23. package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
  24. package/src/sap/ui/rta/command/CreateContainer.js +1 -1
  25. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  26. package/src/sap/ui/rta/command/ExtendControllerCommand.js +1 -1
  27. package/src/sap/ui/rta/command/FlexCommand.js +2 -3
  28. package/src/sap/ui/rta/command/LREPSerializer.js +2 -85
  29. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  30. package/src/sap/ui/rta/command/ManifestCommand.js +1 -1
  31. package/src/sap/ui/rta/command/Move.js +1 -1
  32. package/src/sap/ui/rta/command/Property.js +1 -1
  33. package/src/sap/ui/rta/command/Remove.js +1 -1
  34. package/src/sap/ui/rta/command/Rename.js +1 -1
  35. package/src/sap/ui/rta/command/Resize.js +1 -1
  36. package/src/sap/ui/rta/command/Reveal.js +1 -1
  37. package/src/sap/ui/rta/command/Settings.js +1 -1
  38. package/src/sap/ui/rta/command/Split.js +1 -1
  39. package/src/sap/ui/rta/command/Stack.js +115 -87
  40. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  41. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  42. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  43. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  44. package/src/sap/ui/rta/command/manifest/AddLibrary.js +1 -1
  45. package/src/sap/ui/rta/enablement/elementActionTest.js +1 -1
  46. package/src/sap/ui/rta/library.js +2 -2
  47. package/src/sap/ui/rta/messagebundle.properties +12 -60
  48. package/src/sap/ui/rta/messagebundle_ar.properties +17 -41
  49. package/src/sap/ui/rta/messagebundle_bg.properties +17 -41
  50. package/src/sap/ui/rta/messagebundle_ca.properties +17 -41
  51. package/src/sap/ui/rta/messagebundle_cnr.properties +17 -41
  52. package/src/sap/ui/rta/messagebundle_cs.properties +16 -40
  53. package/src/sap/ui/rta/messagebundle_cy.properties +17 -41
  54. package/src/sap/ui/rta/messagebundle_da.properties +17 -41
  55. package/src/sap/ui/rta/messagebundle_de.properties +15 -39
  56. package/src/sap/ui/rta/messagebundle_el.properties +17 -41
  57. package/src/sap/ui/rta/messagebundle_en.properties +18 -42
  58. package/src/sap/ui/rta/messagebundle_en_GB.properties +18 -42
  59. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +102 -35
  60. package/src/sap/ui/rta/messagebundle_es.properties +43 -67
  61. package/src/sap/ui/rta/messagebundle_es_MX.properties +17 -41
  62. package/src/sap/ui/rta/messagebundle_et.properties +18 -42
  63. package/src/sap/ui/rta/messagebundle_fi.properties +17 -41
  64. package/src/sap/ui/rta/messagebundle_fr.properties +18 -42
  65. package/src/sap/ui/rta/messagebundle_fr_CA.properties +18 -42
  66. package/src/sap/ui/rta/messagebundle_hi.properties +17 -41
  67. package/src/sap/ui/rta/messagebundle_hr.properties +18 -42
  68. package/src/sap/ui/rta/messagebundle_hu.properties +17 -41
  69. package/src/sap/ui/rta/messagebundle_id.properties +22 -46
  70. package/src/sap/ui/rta/messagebundle_it.properties +17 -41
  71. package/src/sap/ui/rta/messagebundle_iw.properties +18 -42
  72. package/src/sap/ui/rta/messagebundle_ja.properties +20 -44
  73. package/src/sap/ui/rta/messagebundle_kk.properties +23 -47
  74. package/src/sap/ui/rta/messagebundle_ko.properties +18 -42
  75. package/src/sap/ui/rta/messagebundle_lt.properties +17 -41
  76. package/src/sap/ui/rta/messagebundle_lv.properties +17 -41
  77. package/src/sap/ui/rta/messagebundle_mk.properties +19 -43
  78. package/src/sap/ui/rta/messagebundle_ms.properties +17 -41
  79. package/src/sap/ui/rta/messagebundle_nl.properties +16 -40
  80. package/src/sap/ui/rta/messagebundle_no.properties +17 -41
  81. package/src/sap/ui/rta/messagebundle_pl.properties +20 -44
  82. package/src/sap/ui/rta/messagebundle_pt.properties +17 -41
  83. package/src/sap/ui/rta/messagebundle_pt_PT.properties +18 -42
  84. package/src/sap/ui/rta/messagebundle_ro.properties +17 -41
  85. package/src/sap/ui/rta/messagebundle_ru.properties +17 -41
  86. package/src/sap/ui/rta/messagebundle_sh.properties +17 -41
  87. package/src/sap/ui/rta/messagebundle_sk.properties +13 -37
  88. package/src/sap/ui/rta/messagebundle_sl.properties +38 -62
  89. package/src/sap/ui/rta/messagebundle_sr.properties +17 -41
  90. package/src/sap/ui/rta/messagebundle_sv.properties +18 -42
  91. package/src/sap/ui/rta/messagebundle_th.properties +18 -42
  92. package/src/sap/ui/rta/messagebundle_tr.properties +17 -41
  93. package/src/sap/ui/rta/messagebundle_uk.properties +18 -42
  94. package/src/sap/ui/rta/messagebundle_vi.properties +19 -43
  95. package/src/sap/ui/rta/messagebundle_zh_CN.properties +18 -42
  96. package/src/sap/ui/rta/messagebundle_zh_TW.properties +18 -42
  97. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
  98. package/src/sap/ui/rta/plugin/AddXMLPlugin.js +1 -1
  99. package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
  100. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  101. package/src/sap/ui/rta/plugin/ControlVariant.js +1 -1
  102. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
  103. package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
  104. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  105. package/src/sap/ui/rta/plugin/ExtendControllerPlugin.js +1 -1
  106. package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
  107. package/src/sap/ui/rta/plugin/Plugin.js +1 -1
  108. package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
  109. package/src/sap/ui/rta/plugin/Remove.js +1 -1
  110. package/src/sap/ui/rta/plugin/Resize.js +1 -1
  111. package/src/sap/ui/rta/plugin/Selection.js +14 -7
  112. package/src/sap/ui/rta/plugin/Settings.js +1 -1
  113. package/src/sap/ui/rta/plugin/Split.js +1 -1
  114. package/src/sap/ui/rta/plugin/Stretch.js +1 -1
  115. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +11 -1
  116. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
  117. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +1 -1
  118. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
  119. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
  120. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.fragment.xml +16 -3
  121. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +1 -1
  122. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +1 -1
  123. package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +3 -3
  124. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
  125. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +2 -2
  126. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
  127. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +23 -6
  128. package/src/sap/ui/rta/plugin/rename/Rename.js +1 -1
  129. package/src/sap/ui/rta/plugin/rename/RenameDialog.js +1 -1
  130. package/src/sap/ui/rta/service/Action.js +1 -1
  131. package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
  132. package/src/sap/ui/rta/service/Outline.js +1 -1
  133. package/src/sap/ui/rta/service/Property.js +1 -1
  134. package/src/sap/ui/rta/service/Selection.js +1 -1
  135. package/src/sap/ui/rta/service/SupportTools.js +1 -1
  136. package/src/sap/ui/rta/toolbar/ActionsMenu.fragment.xml +4 -4
  137. package/src/sap/ui/rta/toolbar/Adaptation.js +15 -3
  138. package/src/sap/ui/rta/toolbar/Base.js +1 -1
  139. package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
  140. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  141. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  142. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  143. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +1 -1
  144. package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
  145. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
  146. package/src/sap/ui/rta/util/Animation.js +4 -6
  147. package/src/sap/ui/rta/util/BindingsExtractor.js +44 -53
  148. package/src/sap/ui/rta/util/PluginManager.js +6 -6
  149. package/src/sap/ui/rta/util/PopupManager.js +90 -109
  150. package/src/sap/ui/rta/util/ReloadManager.js +53 -98
  151. package/src/sap/ui/rta/util/ServiceEventBus.js +3 -4
  152. package/src/sap/ui/rta/util/ServiceManager.js +1 -1
  153. package/src/sap/ui/rta/util/adaptationStarter.js +59 -80
  154. package/src/sap/ui/rta/util/changeVisualization/ChangeCategories.js +3 -3
  155. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -1
  156. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
  157. package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +2 -4
  158. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +1 -1
  159. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +5 -7
  160. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +9 -9
  161. package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +5 -5
  162. package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +8 -8
  163. package/src/sap/ui/rta/util/changeVisualization/commands/RenameVisualization.js +5 -5
  164. package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +5 -5
  165. package/src/sap/ui/rta/util/changeVisualization/commands/getCommandVisualization.js +2 -2
  166. package/src/sap/ui/rta/util/guidedTour/GuidedTour.js +1 -1
  167. package/src/sap/ui/rta/util/guidedTour/content/GeneralTour.js +1 -1
  168. package/src/sap/ui/rta/util/hasStableId.js +11 -19
  169. package/src/sap/ui/rta/util/showMessageBox.js +15 -15
  170. package/src/sap/ui/rta/util/validateFlexEnabled.js +35 -34
  171. package/src/sap/ui/rta/util/validateStableIds.js +22 -31
  172. package/src/sap/ui/rta/util/validateText.js +7 -7
  173. package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +33 -7
  174. package/src/sap/ui/rta/util/whatsNew/WhatsNewOverview.js +2 -6
  175. package/src/sap/ui/rta/util/whatsNew/WhatsNewOverviewDialog.fragment.xml +1 -0
  176. package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +4 -4
  177. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/WhatsNewFeatures.js +8 -22
@@ -10,8 +10,7 @@ sap.ui.define([
10
10
  "sap/base/util/isPlainObject",
11
11
  "sap/base/util/restricted/_uniqWith",
12
12
  "sap/base/util/deepEqual"
13
- ],
14
- function(
13
+ ], function(
15
14
  ElementUtil,
16
15
  OverlayRegistry,
17
16
  isPlainObject,
@@ -20,7 +19,7 @@ function(
20
19
  ) {
21
20
  "use strict";
22
21
 
23
- var BindingsExtractor = {};
22
+ const BindingsExtractor = {};
24
23
 
25
24
  /**
26
25
  * Get all relevant binding paths and binding context paths for the element (from all properties)
@@ -34,13 +33,13 @@ function(
34
33
  * @private
35
34
  */
36
35
  BindingsExtractor.collectBindingPaths = function(oElement, oModel, oRelevantContainerElement, iDepth) {
37
- var mBindingsCollection = {
36
+ const mBindingsCollection = {
38
37
  bindingPaths: [],
39
38
  bindingContextPaths: []
40
39
  };
41
- var sAggregationName = oElement.sParentAggregationName;
42
- var oParent = oElement.getParent();
43
- var aBindings = BindingsExtractor.getBindings({
40
+ const sAggregationName = oElement.sParentAggregationName;
41
+ const oParent = oElement.getParent();
42
+ let aBindings = BindingsExtractor.getBindings({
44
43
  element: oElement,
45
44
  model: oModel,
46
45
  relevantContainerElement: oRelevantContainerElement,
@@ -49,20 +48,20 @@ function(
49
48
  });
50
49
 
51
50
  if (oParent) {
52
- var oDefaultAggregation = oParent.getMetadata().getAggregation();
51
+ const oDefaultAggregation = oParent.getMetadata().getAggregation();
53
52
 
54
53
  if (oDefaultAggregation) {
55
- var iPositionOfInvisibleElement = ElementUtil.getAggregation(oParent, sAggregationName).indexOf(oElement);
56
- var sParentDefaultAggregationName = oDefaultAggregation.name;
57
- var oBinding = oParent.getBindingInfo(sParentDefaultAggregationName);
58
- var oTemplate = oBinding && oBinding.template;
54
+ const iPositionOfInvisibleElement = ElementUtil.getAggregation(oParent, sAggregationName).indexOf(oElement);
55
+ const sParentDefaultAggregationName = oDefaultAggregation.name;
56
+ const oBinding = oParent.getBindingInfo(sParentDefaultAggregationName);
57
+ const oTemplate = oBinding && oBinding.template;
59
58
 
60
59
  if (oTemplate) {
61
- var oTemplateDefaultAggregation = oTemplate.getMetadata().getAggregation();
60
+ const oTemplateDefaultAggregation = oTemplate.getMetadata().getAggregation();
62
61
 
63
62
  if (oTemplateDefaultAggregation) {
64
- var sTemplateDefaultAggregationName = oTemplateDefaultAggregation.name;
65
- var oTemplateElement = ElementUtil.getAggregation(
63
+ const sTemplateDefaultAggregationName = oTemplateDefaultAggregation.name;
64
+ const oTemplateElement = ElementUtil.getAggregation(
66
65
  oTemplate, sTemplateDefaultAggregationName
67
66
  )[iPositionOfInvisibleElement];
68
67
  aBindings = aBindings.concat(BindingsExtractor.getBindings({
@@ -78,21 +77,21 @@ function(
78
77
  }
79
78
  }
80
79
 
81
- for (var i = 0, l = aBindings.length; i < l; i++) {
80
+ for (let i = 0, l = aBindings.length; i < l; i++) {
82
81
  if (aBindings[i].getPath) {
83
- var sBindingPath = aBindings[i].getPath();
82
+ const sBindingPath = aBindings[i].getPath();
84
83
  if (sBindingPath && mBindingsCollection.bindingPaths.indexOf(sBindingPath) === -1) {
85
84
  mBindingsCollection.bindingPaths.push(sBindingPath);
86
85
  }
87
86
  }
88
87
  if (aBindings[i].getContext && aBindings[i].getContext() && aBindings[i].getContext().getPath) {
89
- var sBindingContextPath = aBindings[i].getContext().getPath();
88
+ const sBindingContextPath = aBindings[i].getContext().getPath();
90
89
  if (sBindingContextPath && mBindingsCollection.bindingContextPaths.indexOf(sBindingContextPath) === -1) {
91
90
  mBindingsCollection.bindingContextPaths.push(sBindingContextPath);
92
91
  }
93
92
  }
94
93
  if (isPlainObject(aBindings[i])) {
95
- var sCurrentPath = aBindings[i].parts[0] && aBindings[i].parts[0].path;
94
+ const sCurrentPath = aBindings[i].parts[0] && aBindings[i].parts[0].path;
96
95
  // Sometimes the binding does not contain a path
97
96
  if (sCurrentPath && mBindingsCollection.bindingPaths.indexOf(sCurrentPath) === -1) {
98
97
  mBindingsCollection.bindingPaths.push(sCurrentPath);
@@ -104,8 +103,8 @@ function(
104
103
 
105
104
  function isElementRelatedToRelevantContainer(oElement, oRelevantContainerElement) {
106
105
  if (oRelevantContainerElement && oElement !== oRelevantContainerElement) {
107
- var oOverlay = OverlayRegistry.getOverlay(oElement);
108
- var oRelevantContainer = oOverlay && (oOverlay.getRelevantContainer() || oOverlay.getElement());
106
+ const oOverlay = OverlayRegistry.getOverlay(oElement);
107
+ const oRelevantContainer = oOverlay && (oOverlay.getRelevantContainer() || oOverlay.getElement());
109
108
  return oRelevantContainer ? oRelevantContainer.getId() === oRelevantContainerElement.getId() : true;
110
109
  }
111
110
  return true;
@@ -127,12 +126,12 @@ function(
127
126
  * @private
128
127
  */
129
128
  BindingsExtractor.getBindings = function(mPropertyBag) {
130
- var oElement = mPropertyBag.element;
131
- var oModel = mPropertyBag.model;
132
- var oParent = mPropertyBag.parent;
133
- var sAggregationName = mPropertyBag.aggregationName;
134
- var oRelevantContainerElement = mPropertyBag.relevantContainerElement;
135
- var aBindings = [];
129
+ const oElement = mPropertyBag.element;
130
+ const oModel = mPropertyBag.model;
131
+ const oParent = mPropertyBag.parent;
132
+ const sAggregationName = mPropertyBag.aggregationName;
133
+ const oRelevantContainerElement = mPropertyBag.relevantContainerElement;
134
+ let aBindings = [];
136
135
  if (isElementRelatedToRelevantContainer(oElement, oRelevantContainerElement)) {
137
136
  aBindings = (
138
137
  mPropertyBag.template
@@ -140,7 +139,7 @@ function(
140
139
  : BindingsExtractor.getBindingsFromProperties(oElement, oModel)
141
140
  );
142
141
  }
143
- var aAggregationNames = sAggregationName ? [sAggregationName] : Object.keys(oElement.getMetadata().getAllAggregations());
142
+ const aAggregationNames = sAggregationName ? [sAggregationName] : Object.keys(oElement.getMetadata().getAllAggregations());
144
143
 
145
144
  if (!Number.isInteger(mPropertyBag.depth) || mPropertyBag.depth > 0) {
146
145
  aAggregationNames.forEach(function(sAggregationNameInLoop) {
@@ -160,14 +159,10 @@ function(
160
159
  };
161
160
 
162
161
  function getBindingsForAggregation(oElement, oModel, bTemplate, sAggregationName, oRelevantContainerElement, iDepth) {
163
- var aBindings = [];
164
- var aElements = [];
165
- var oTemplate;
166
- var bIsInTemplate = bTemplate;
167
- var oElementModel = oElement.getModel();
162
+ const oElementModel = oElement.getModel();
168
163
 
169
- var oBinding = oElement.getBindingInfo(sAggregationName);
170
- oTemplate = oBinding && oBinding.template;
164
+ const oBinding = oElement.getBindingInfo(sAggregationName);
165
+ const oTemplate = oBinding && oBinding.template;
171
166
 
172
167
  // If a template is found for a different model, we don't look inside the template
173
168
  // e.g. a Select control whose entries are defined in an own JSON model
@@ -177,13 +172,10 @@ function(
177
172
 
178
173
  // If a template is bound to the current element on the given model,
179
174
  // we continue the evaluation on the template (as it has no direct parent)
180
- if (oTemplate) {
181
- bIsInTemplate = true;
182
- aElements = [oTemplate];
183
- } else {
184
- aElements = ElementUtil.getAggregation(oElement, sAggregationName);
185
- }
175
+ const bIsInTemplate = oTemplate ? true : bTemplate;
176
+ const aElements = oTemplate ? [oTemplate] : ElementUtil.getAggregation(oElement, sAggregationName);
186
177
 
178
+ let aBindings = [];
187
179
  // Getting children of the current aggregation and iterating through all of them
188
180
  aElements.forEach(function(oChildElement) {
189
181
  if (oChildElement.getMetadata) {
@@ -220,8 +212,8 @@ function(
220
212
  * @private
221
213
  */
222
214
  BindingsExtractor.filterAndFlattenBindings = function(oBinding, oParentDefaultModel) {
223
- var aBindings = [];
224
- var sModelName = oBinding.getMetadata().getName();
215
+ let aBindings = [];
216
+ const sModelName = oBinding.getMetadata().getName();
225
217
 
226
218
  if (sModelName === "sap.ui.model.CompositeBinding") {
227
219
  oBinding.getBindings().forEach(function(oBinding) {
@@ -255,8 +247,8 @@ function(
255
247
  * @private
256
248
  */
257
249
  function flattenBindingsFromTemplate(mBinding) {
258
- var aBindings = [];
259
- var aParts = mBinding.parts;
250
+ const aBindings = [];
251
+ const aParts = mBinding.parts;
260
252
 
261
253
  // TODO: check if we need to filter bindings by modelName, relative indicator ("/")
262
254
  aParts.forEach(function(mPart) {
@@ -279,7 +271,7 @@ function(
279
271
  * @private
280
272
  */
281
273
  BindingsExtractor.getBindingsFromProperties = function(oElement, oModel) {
282
- var aPropertiesKeys = Object.keys(oElement.getMetadata().getAllProperties());
274
+ const aPropertiesKeys = Object.keys(oElement.getMetadata().getAllProperties());
283
275
 
284
276
  return aPropertiesKeys
285
277
  // filter properties which are not bound
@@ -305,17 +297,16 @@ function(
305
297
  * @private
306
298
  */
307
299
  function getBindingsFromTemplateProperties(oTemplate, oTemplateParent, oModel) {
308
- var aPropertiesKeys = Object.keys(oTemplate.getMetadata().getAllProperties());
309
- var bIsSameModel;
300
+ const aPropertiesKeys = Object.keys(oTemplate.getMetadata().getAllProperties());
310
301
 
311
302
  return aPropertiesKeys
312
303
  .filter(function(sPropertyName) {
313
- var mBindingInfo = oTemplate.mBindingInfos[sPropertyName];
314
- var sModelName = mBindingInfo && mBindingInfo.parts[0] && mBindingInfo.parts[0].model;
315
- bIsSameModel = oModel === oTemplateParent.getModel(sModelName);
304
+ const mBindingInfo = oTemplate.mBindingInfos[sPropertyName];
305
+ const sModelName = mBindingInfo && mBindingInfo.parts[0] && mBindingInfo.parts[0].model;
306
+ let bIsSameModel = oModel === oTemplateParent.getModel(sModelName);
316
307
  if (!sModelName) {
317
- var oParentDefaultModel = oTemplateParent.getDefaultModel ? oTemplateParent.getDefaultModel() : null;
318
- var oTemplateDefaultModel = oTemplate.getDefaultModel ? oTemplate.getDefaultModel() : null;
308
+ const oParentDefaultModel = oTemplateParent.getDefaultModel ? oTemplateParent.getDefaultModel() : null;
309
+ const oTemplateDefaultModel = oTemplate.getDefaultModel ? oTemplate.getDefaultModel() : null;
319
310
  bIsSameModel = oParentDefaultModel === oTemplateDefaultModel;
320
311
  } else {
321
312
  bIsSameModel = oModel === oTemplateParent.getModel(sModelName);
@@ -64,13 +64,13 @@ sap.ui.define([
64
64
  * Constructor for a new sap.ui.rta.util.PluginManager
65
65
  * @extends sap.ui.base.ManagedObject
66
66
  * @author SAP SE
67
- * @version 1.136.1
67
+ * @version 1.138.0
68
68
  * @constructor
69
69
  * @private
70
70
  * @since 1.86
71
71
  * @alias sap.ui.rta.util.PluginManager
72
72
  */
73
- var PluginManager = ManagedObject.extend("sap.ui.rta.util.PluginManager", {
73
+ const PluginManager = ManagedObject.extend("sap.ui.rta.util.PluginManager", {
74
74
  metadata: {
75
75
  properties: {
76
76
  /**
@@ -280,7 +280,7 @@ sap.ui.define([
280
280
  * @private
281
281
  */
282
282
  PluginManager.prototype.onElementEditableChange = function(oEvent) {
283
- var bEditable = oEvent.getParameter("editable");
283
+ const bEditable = oEvent.getParameter("editable");
284
284
  if (bEditable) {
285
285
  this.iEditableOverlaysCount += 1;
286
286
  } else {
@@ -292,15 +292,15 @@ sap.ui.define([
292
292
  * Handler for the stop cut and paste function.
293
293
  */
294
294
  PluginManager.prototype.handleStopCutPaste = function() {
295
- var oCutPastePlugin = this.getPlugin("cutPaste");
295
+ const oCutPastePlugin = this.getPlugin("cutPaste");
296
296
  if (oCutPastePlugin) {
297
297
  oCutPastePlugin.stopCutAndPaste();
298
298
  }
299
299
  };
300
300
 
301
301
  PluginManager.prototype._destroyDefaultPlugins = function(mPluginsToKeep) {
302
- for (var sDefaultPluginName in this._mDefaultPlugins) {
303
- var oDefaultPlugin = this._mDefaultPlugins[sDefaultPluginName];
302
+ for (const sDefaultPluginName in this._mDefaultPlugins) {
303
+ const oDefaultPlugin = this._mDefaultPlugins[sDefaultPluginName];
304
304
 
305
305
  if (oDefaultPlugin && !oDefaultPlugin.bIsDestroyed) {
306
306
  if (!mPluginsToKeep || mPluginsToKeep[sDefaultPluginName] !== oDefaultPlugin) {
@@ -5,50 +5,83 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
- "sap/ui/base/ManagedObject",
8
+ "sap/base/util/restricted/_curry",
9
9
  "sap/m/InstanceManager",
10
- "sap/ui/dt/Overlay",
11
- "sap/ui/dt/OverlayRegistry",
12
- "sap/ui/fl/Utils",
10
+ "sap/ui/base/ManagedObject",
13
11
  "sap/ui/core/Component",
14
- "sap/ui/core/ComponentContainer",
15
- "sap/ui/core/Element",
16
12
  "sap/ui/dt/util/ZIndexManager",
17
- "sap/m/Dialog",
18
- "sap/m/Popover",
19
- "sap/base/util/restricted/_curry"
13
+ "sap/ui/dt/Overlay",
14
+ "sap/ui/dt/OverlayRegistry",
15
+ "sap/ui/fl/Utils"
20
16
  ], function(
21
- ManagedObject,
17
+ _curry,
22
18
  InstanceManager,
23
- Overlay,
24
- OverlayRegistry,
25
- flUtils,
19
+ ManagedObject,
26
20
  Component,
27
- ComponentContainer,
28
- Element,
29
21
  ZIndexManager,
30
- Dialog,
31
- Popover,
32
- _curry
22
+ Overlay,
23
+ OverlayRegistry,
24
+ FlUtils
33
25
  ) {
34
26
  "use strict";
35
27
 
36
- var FOCUS_EVENT_NAMES = {
28
+ const FOCUS_EVENT_NAMES = {
37
29
  add: "_activateFocusHandle",
38
30
  remove: "_deactivateFocusHandle"
39
31
  };
40
32
 
33
+ // TODO harmonize with FlUtils.getAppComponentForControl, todos#9
34
+ function getAppComponentForControl(oControl) {
35
+ let oComponent;
36
+ let oAppComponent;
37
+
38
+ if (oControl.isA("sap.ui.core.Component")) {
39
+ oComponent = oControl;
40
+ } else {
41
+ oComponent = getComponentForControl(oControl);
42
+ }
43
+
44
+ if (oComponent) {
45
+ oAppComponent = FlUtils.getAppComponentForControl(oComponent);
46
+ }
47
+ return oAppComponent;
48
+ }
49
+
50
+ function getComponentForControl(oControl) {
51
+ let oComponent;
52
+ let oRootComponent;
53
+ let oParentControl;
54
+ if (oControl) {
55
+ oComponent = Component.getOwnerComponentFor(oControl);
56
+ if (
57
+ !oComponent
58
+ && typeof oControl.getParent === "function"
59
+ && oControl.getParent()?.isA("sap.ui.core.Element")
60
+ ) {
61
+ oParentControl = oControl.getParent();
62
+ } else if (oComponent) {
63
+ oParentControl = oComponent;
64
+ }
65
+
66
+ if (oParentControl) {
67
+ oRootComponent = getComponentForControl(oParentControl);
68
+ }
69
+ }
70
+
71
+ return oRootComponent || oComponent;
72
+ }
73
+
41
74
  /**
42
75
  * Constructor for a new sap.ui.rta.util.PopupManager
43
76
  * @extends sap.ui.base.ManagedObject
44
77
  * @author SAP SE
45
- * @version 1.136.1
78
+ * @version 1.138.0
46
79
  * @constructor
47
80
  * @private
48
81
  * @since 1.48
49
82
  * @alias sap.ui.rta.util.PopupManager
50
83
  */
51
- var PopupManager = ManagedObject.extend("sap.ui.rta.util.PopupManager", {
84
+ const PopupManager = ManagedObject.extend("sap.ui.rta.util.PopupManager", {
52
85
  metadata: {
53
86
  properties: {
54
87
  rta: "any"
@@ -120,20 +153,17 @@ sap.ui.define([
120
153
  * @public
121
154
  */
122
155
  PopupManager.prototype.getCategorizedOpenPopups = function() {
123
- var aOpenDialogs;
124
- var aOpenPopovers;
125
-
126
156
  // check if dialogs are already open when RTA is started
127
- aOpenDialogs = InstanceManager.getOpenDialogs();
157
+ const aOpenDialogs = InstanceManager.getOpenDialogs();
128
158
  // separate adaptable dialogs from all supported dialogs
129
- var oCategorizedDialogs = this._getValidatedPopups(aOpenDialogs);
159
+ const oCategorizedDialogs = this._getValidatedPopups(aOpenDialogs);
130
160
 
131
161
  // check if popovers are already open when RTA is started
132
- aOpenPopovers = InstanceManager.getOpenPopovers();
162
+ const aOpenPopovers = InstanceManager.getOpenPopovers();
133
163
  // separate adaptable popovers from all supported popovers
134
- var oCategorizedPopovers = this._getValidatedPopups(aOpenPopovers);
164
+ const oCategorizedPopovers = this._getValidatedPopups(aOpenPopovers);
135
165
 
136
- var oOpenPopups = {
166
+ const oOpenPopups = {
137
167
  aDialogs: oCategorizedDialogs.relevant,
138
168
  aPopovers: oCategorizedPopovers.relevant,
139
169
  aAllSupportedPopups: oCategorizedDialogs.allSupported.concat(oCategorizedPopovers.allSupported)
@@ -150,12 +180,12 @@ sap.ui.define([
150
180
  * @private
151
181
  */
152
182
  PopupManager.prototype._getValidatedPopups = function(aOpenPopups) {
153
- var aAllSupportedPopups = [];
183
+ const aAllSupportedPopups = [];
154
184
  aOpenPopups = aOpenPopups.filter(function(oPopupElement) {
155
185
  if (this._isPopupAdaptable(oPopupElement)) {
156
186
  aAllSupportedPopups.push(oPopupElement);
157
187
  return true;
158
- } else if (oPopupElement instanceof Dialog) {
188
+ } else if (oPopupElement.isA("sap.m.Dialog")) {
159
189
  // all modal type popups are supported for which modal property is later turned true, when in Adaptation mode
160
190
  aAllSupportedPopups.push(oPopupElement);
161
191
  }
@@ -180,8 +210,8 @@ sap.ui.define([
180
210
  return Array.isArray(oPopup.getContent())
181
211
  ? oPopup.getContent().some(
182
212
  function(oContent) {
183
- if (oContent instanceof ComponentContainer) {
184
- return this.oRtaRootAppComponent === this._getAppComponentForControl(Component.getComponentById(oContent.getComponent()));
213
+ if (oContent.isA("sap.ui.core.ComponentContainer")) {
214
+ return this.oRtaRootAppComponent === getAppComponentForControl(Component.getComponentById(oContent.getComponent()));
185
215
  }
186
216
  return undefined;
187
217
  }.bind(this))
@@ -196,7 +226,7 @@ sap.ui.define([
196
226
  * @private
197
227
  */
198
228
  PopupManager.prototype._isSupportedPopup = function(oPopup) {
199
- return (oPopup instanceof Dialog || oPopup instanceof Popover);
229
+ return (oPopup.isA("sap.m.Dialog") || oPopup.isA("sap.m.Popover"));
200
230
  };
201
231
 
202
232
  /**
@@ -208,10 +238,10 @@ sap.ui.define([
208
238
  PopupManager.prototype.setRta = function(oRta) {
209
239
  if (oRta && oRta._oDesignTime) {
210
240
  this.setProperty("rta", oRta);
211
- var oRootControl = oRta.getRootControlInstance();
212
- this.oRtaRootAppComponent = this._getAppComponentForControl(oRootControl);
241
+ const oRootControl = oRta.getRootControlInstance();
242
+ this.oRtaRootAppComponent = getAppComponentForControl(oRootControl);
213
243
  // listener for RTA mode change
214
- var fnModeChange = this._onModeChange.bind(this);
244
+ const fnModeChange = this._onModeChange.bind(this);
215
245
  oRta.attachModeChanged(fnModeChange);
216
246
  this._overrideInstanceFunctions();
217
247
  }
@@ -236,8 +266,8 @@ sap.ui.define([
236
266
  * @param {sap.ui.base.Event} oEvent The Event triggered by the mode change
237
267
  */
238
268
  PopupManager.prototype._onModeChange = function(oEvent) {
239
- var sNewMode = oEvent.getParameters().mode;
240
- var fnApplyFocusAndSetModal = function(sMode, oPopover) {
269
+ const sNewMode = oEvent.getParameters().mode;
270
+ const fnApplyFocusAndSetModal = function(sMode, oPopover) {
241
271
  if (sMode === "navigation") {
242
272
  // add focus handlers
243
273
  oPopover.oPopup[this._getFocusEventName("add")]();
@@ -319,7 +349,7 @@ sap.ui.define([
319
349
  PopupManager.prototype._overrideAddFunctions = function(fnOriginalFunction) {
320
350
  return function(...aArgs) {
321
351
  const [oPopupElement] = aArgs;
322
- var vOriginalReturn = fnOriginalFunction.apply(InstanceManager, aArgs);
352
+ const vOriginalReturn = fnOriginalFunction.apply(InstanceManager, aArgs);
323
353
  if (this._isSupportedPopup(oPopupElement)) {
324
354
  if (this._isPopupAdaptable(oPopupElement)
325
355
  && this.getRta()._oDesignTime) {
@@ -327,7 +357,7 @@ sap.ui.define([
327
357
  // PopupManager internal method
328
358
  oPopupElement.attachEventOnce("afterOpen", this.fireOpen, this);
329
359
  this._setModal(true, oPopupElement);
330
- } else if (!(oPopupElement instanceof Popover)) {
360
+ } else if (!(oPopupElement.isA("sap.m.Popover"))) {
331
361
  // for all popups which are non-adaptable and non-popovers
332
362
  this._setModal(true, oPopupElement);
333
363
  }
@@ -345,7 +375,7 @@ sap.ui.define([
345
375
  * @private
346
376
  */
347
377
  PopupManager.prototype._setModal = function(bSetModal, oPopupElement) {
348
- var bOriginalModalState = this._oModalState.get(oPopupElement.oPopup);
378
+ const bOriginalModalState = this._oModalState.get(oPopupElement.oPopup);
349
379
  if (typeof bOriginalModalState !== "boolean" && bSetModal && this.getRta().getMode() !== "navigation") {
350
380
  this._oModalState.set(oPopupElement.oPopup, oPopupElement.oPopup.getModal());
351
381
  if (this._isPopupAdaptable(oPopupElement)) {
@@ -363,7 +393,7 @@ sap.ui.define([
363
393
 
364
394
  PopupManager.prototype._applyPopupAttributes = function(mPropertyBag) {
365
395
  // check if popups are open
366
- var oRelevantPopups = this.getCategorizedOpenPopups();
396
+ const oRelevantPopups = this.getCategorizedOpenPopups();
367
397
 
368
398
  ["aDialogs", "aPopovers"].forEach(function(sKey) {
369
399
  if (oRelevantPopups[sKey].length > 0) {
@@ -392,9 +422,9 @@ sap.ui.define([
392
422
  * @private
393
423
  */
394
424
  PopupManager.prototype._applyPopupPatch = function(oPopupElement) {
395
- var oOverlayContainer = Overlay.getOverlayContainer();
396
- var {oPopup} = oPopupElement;
397
- var aAutoCloseAreas = [
425
+ const oOverlayContainer = Overlay.getOverlayContainer();
426
+ const {oPopup} = oPopupElement;
427
+ const aAutoCloseAreas = [
398
428
  oPopup.oContent.getDomRef(),
399
429
  oOverlayContainer
400
430
  ].concat(
@@ -402,8 +432,8 @@ sap.ui.define([
402
432
  );
403
433
 
404
434
  if (this.getRta().getShowToolbars()) {
405
- var oRtaToolbar = this.getRta().getToolbar();
406
- var bVisible = !!oRtaToolbar.getVisible();
435
+ const oRtaToolbar = this.getRta().getToolbar();
436
+ const bVisible = !!oRtaToolbar.getVisible();
407
437
  // Check if RTA is not started -> toolbar is not visible
408
438
  if (!bVisible) {
409
439
  this.getRta().attachEventOnce("start", function() {
@@ -419,7 +449,7 @@ sap.ui.define([
419
449
  // cases when onAfterRendering is called after this function - app inside popup
420
450
  this.fnOriginalPopupOnAfterRendering ||= oPopup.onAfterRendering;
421
451
  oPopup.onAfterRendering = function(...aArgs) {
422
- var vOriginalReturn = this.fnOriginalPopupOnAfterRendering.apply(oPopup, aArgs);
452
+ const vOriginalReturn = this.fnOriginalPopupOnAfterRendering.apply(oPopup, aArgs);
423
453
  oPopup[this._getFocusEventName("remove")]();
424
454
  return vOriginalReturn;
425
455
  }.bind(this);
@@ -455,7 +485,7 @@ sap.ui.define([
455
485
  PopupManager.prototype._overrideRemoveFunctions = function(fnOriginalFunction) {
456
486
  return function(...aArgs) {
457
487
  const [oPopupElement] = aArgs;
458
- var vOriginalReturn = fnOriginalFunction.apply(InstanceManager, aArgs);
488
+ const vOriginalReturn = fnOriginalFunction.apply(InstanceManager, aArgs);
459
489
  if (this._isSupportedPopup(oPopupElement)) {
460
490
  if (this._isPopupAdaptable(oPopupElement)
461
491
  && this.getRta()._oDesignTime) {
@@ -470,60 +500,6 @@ sap.ui.define([
470
500
  }.bind(this);
471
501
  };
472
502
 
473
- /**
474
- * Returns the app component of the passed control is exists
475
- *
476
- * @param {sap.ui.core.Control} oControl Control object
477
- * @returns {object|undefined} component object if exists
478
- * @private
479
- */
480
- PopupManager.prototype._getAppComponentForControl = function(oControl) {
481
- var oComponent;
482
- var oAppComponent;
483
-
484
- if (oControl instanceof Component) {
485
- oComponent = oControl;
486
- } else {
487
- oComponent = this._getComponentForControl(oControl);
488
- }
489
-
490
- if (oComponent) {
491
- oAppComponent = flUtils.getAppComponentForControl(oComponent);
492
- }
493
- return oAppComponent;
494
- };
495
-
496
- /**
497
- * Returns the component of the passed control, navigating through control tree, except if parent is sap.ui.core.UIArea
498
- *
499
- * @param {sap.ui.core.Control} oControl Control object
500
- * @returns {object|undefined} component object if exists
501
- * @private
502
- */
503
- PopupManager.prototype._getComponentForControl = function(oControl) {
504
- var oComponent;
505
- var oRootComponent;
506
- var oParentControl;
507
- if (oControl) {
508
- oComponent = Component.getOwnerComponentFor(oControl);
509
- if (
510
- !oComponent
511
- && typeof oControl.getParent === "function"
512
- && oControl.getParent() instanceof Element
513
- ) {
514
- oParentControl = oControl.getParent();
515
- } else if (oComponent) {
516
- oParentControl = oComponent;
517
- }
518
-
519
- if (oParentControl) {
520
- oRootComponent = this._getComponentForControl(oParentControl);
521
- }
522
- }
523
-
524
- return oRootComponent || oComponent;
525
- };
526
-
527
503
  /**
528
504
  * Create popup overlays
529
505
  *
@@ -534,7 +510,7 @@ sap.ui.define([
534
510
  if (!oEvent) {
535
511
  return;
536
512
  }
537
- var oPopupElement = (oEvent instanceof Element) ? oEvent : oEvent.getSource();
513
+ const oPopupElement = oEvent.isA("sap.ui.base.Event") ? oEvent.getSource() : oEvent;
538
514
 
539
515
  // when application is opened in a popup, rootElement should not be added more than once
540
516
  if (
@@ -583,7 +559,7 @@ sap.ui.define([
583
559
  * @private
584
560
  */
585
561
  PopupManager.prototype._removePopupPatch = function(oPopupElement) {
586
- var {oPopup} = oPopupElement;
562
+ const {oPopup} = oPopupElement;
587
563
  oPopup[this._getFocusEventName("add")]();
588
564
  if (this.fnOriginalPopupOnAfterRendering) {
589
565
  oPopup.onAfterRendering = this.fnOriginalPopupOnAfterRendering;
@@ -591,7 +567,7 @@ sap.ui.define([
591
567
  };
592
568
 
593
569
  function checkPopupAncestorsAdaptation(oPopupElement) {
594
- if (!oPopupElement || oPopupElement instanceof Component) {
570
+ if (!oPopupElement || oPopupElement.isA("sap.ui.core.Component")) {
595
571
  return true;
596
572
  }
597
573
  if (!oPopupElement.isPopupAdaptationAllowed || oPopupElement.isPopupAdaptationAllowed()) {
@@ -601,10 +577,15 @@ sap.ui.define([
601
577
  }
602
578
 
603
579
  PopupManager.prototype._isPopupAdaptable = function(oPopupElement) {
604
- if (oPopupElement.isPopupAdaptationAllowed && !oPopupElement.isPopupAdaptationAllowed()) {
580
+ if (oPopupElement.isPopupAdaptationAllowed) {
581
+ return oPopupElement.isPopupAdaptationAllowed();
582
+ }
583
+ // the event is needed for the RTA integration
584
+ if (!oPopupElement.getMetadata().getEvents().afterOpen) {
605
585
  return false;
606
586
  }
607
- var oPopupAppComponent = this._getAppComponentForControl(oPopupElement);
587
+
588
+ const oPopupAppComponent = getAppComponentForControl(oPopupElement);
608
589
  if (
609
590
  (oPopupAppComponent && this.oRtaRootAppComponent === oPopupAppComponent)
610
591
  || this._isComponentInsidePopup(oPopupElement)