@openui5/sap.ui.rta 1.115.1 → 1.117.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 (178) hide show
  1. package/.eslintrc.json +33 -2
  2. package/.reuse/dep5 +0 -5
  3. package/THIRDPARTY.txt +1 -7
  4. package/package.json +6 -6
  5. package/src/sap/ui/rta/.library +1 -1
  6. package/src/sap/ui/rta/Client.js +60 -59
  7. package/src/sap/ui/rta/RuntimeAuthoring.js +256 -254
  8. package/src/sap/ui/rta/Utils.js +42 -42
  9. package/src/sap/ui/rta/api/startAdaptation.js +2 -2
  10. package/src/sap/ui/rta/appVariant/AppVariantDialog.js +3 -3
  11. package/src/sap/ui/rta/appVariant/AppVariantManager.js +27 -27
  12. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +100 -103
  13. package/src/sap/ui/rta/appVariant/Feature.js +75 -77
  14. package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +6 -7
  15. package/src/sap/ui/rta/appVariant/Utils.js +17 -17
  16. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +36 -36
  17. package/src/sap/ui/rta/command/AddIFrame.js +7 -7
  18. package/src/sap/ui/rta/command/AddProperty.js +7 -7
  19. package/src/sap/ui/rta/command/AddXML.js +1 -1
  20. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +7 -7
  21. package/src/sap/ui/rta/command/AppDescriptorCommand.js +18 -18
  22. package/src/sap/ui/rta/command/BaseCommand.js +1 -2
  23. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  24. package/src/sap/ui/rta/command/Combine.js +1 -1
  25. package/src/sap/ui/rta/command/CommandFactory.js +11 -11
  26. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  27. package/src/sap/ui/rta/command/ControlVariantConfigure.js +28 -3
  28. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  29. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +26 -24
  30. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +7 -7
  31. package/src/sap/ui/rta/command/ControlVariantSwitch.js +11 -11
  32. package/src/sap/ui/rta/command/CreateContainer.js +2 -2
  33. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  34. package/src/sap/ui/rta/command/FlexCommand.js +30 -30
  35. package/src/sap/ui/rta/command/LREPSerializer.js +20 -10
  36. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  37. package/src/sap/ui/rta/command/Move.js +1 -1
  38. package/src/sap/ui/rta/command/Property.js +1 -1
  39. package/src/sap/ui/rta/command/Remove.js +1 -1
  40. package/src/sap/ui/rta/command/Rename.js +1 -1
  41. package/src/sap/ui/rta/command/Resize.js +1 -1
  42. package/src/sap/ui/rta/command/Reveal.js +1 -1
  43. package/src/sap/ui/rta/command/Settings.js +1 -1
  44. package/src/sap/ui/rta/command/Split.js +1 -1
  45. package/src/sap/ui/rta/command/Stack.js +4 -4
  46. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
  47. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  48. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  49. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  50. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  51. package/src/sap/ui/rta/enablement/TestDelegate.js +92 -92
  52. package/src/sap/ui/rta/enablement/elementActionTest.js +230 -112
  53. package/src/sap/ui/rta/library.js +2 -2
  54. package/src/sap/ui/rta/messagebundle.properties +11 -1
  55. package/src/sap/ui/rta/messagebundle_ar.properties +5 -0
  56. package/src/sap/ui/rta/messagebundle_bg.properties +5 -0
  57. package/src/sap/ui/rta/messagebundle_ca.properties +5 -0
  58. package/src/sap/ui/rta/messagebundle_cs.properties +5 -0
  59. package/src/sap/ui/rta/messagebundle_cy.properties +5 -0
  60. package/src/sap/ui/rta/messagebundle_da.properties +5 -0
  61. package/src/sap/ui/rta/messagebundle_de.properties +6 -1
  62. package/src/sap/ui/rta/messagebundle_el.properties +5 -0
  63. package/src/sap/ui/rta/messagebundle_en.properties +5 -0
  64. package/src/sap/ui/rta/messagebundle_en_GB.properties +5 -0
  65. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +5 -0
  66. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +5 -0
  67. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +6 -1
  68. package/src/sap/ui/rta/messagebundle_es.properties +5 -0
  69. package/src/sap/ui/rta/messagebundle_es_MX.properties +5 -0
  70. package/src/sap/ui/rta/messagebundle_et.properties +5 -0
  71. package/src/sap/ui/rta/messagebundle_fi.properties +5 -0
  72. package/src/sap/ui/rta/messagebundle_fr.properties +5 -0
  73. package/src/sap/ui/rta/messagebundle_fr_CA.properties +5 -0
  74. package/src/sap/ui/rta/messagebundle_hi.properties +5 -0
  75. package/src/sap/ui/rta/messagebundle_hr.properties +5 -0
  76. package/src/sap/ui/rta/messagebundle_hu.properties +5 -0
  77. package/src/sap/ui/rta/messagebundle_id.properties +5 -0
  78. package/src/sap/ui/rta/messagebundle_it.properties +5 -0
  79. package/src/sap/ui/rta/messagebundle_iw.properties +5 -0
  80. package/src/sap/ui/rta/messagebundle_ja.properties +5 -0
  81. package/src/sap/ui/rta/messagebundle_kk.properties +5 -0
  82. package/src/sap/ui/rta/messagebundle_ko.properties +5 -0
  83. package/src/sap/ui/rta/messagebundle_lt.properties +5 -0
  84. package/src/sap/ui/rta/messagebundle_lv.properties +5 -0
  85. package/src/sap/ui/rta/messagebundle_ms.properties +5 -0
  86. package/src/sap/ui/rta/messagebundle_nl.properties +5 -0
  87. package/src/sap/ui/rta/messagebundle_no.properties +5 -0
  88. package/src/sap/ui/rta/messagebundle_pl.properties +5 -0
  89. package/src/sap/ui/rta/messagebundle_pt.properties +5 -0
  90. package/src/sap/ui/rta/messagebundle_pt_PT.properties +5 -0
  91. package/src/sap/ui/rta/messagebundle_ro.properties +5 -0
  92. package/src/sap/ui/rta/messagebundle_ru.properties +5 -0
  93. package/src/sap/ui/rta/messagebundle_sh.properties +5 -0
  94. package/src/sap/ui/rta/messagebundle_sk.properties +5 -0
  95. package/src/sap/ui/rta/messagebundle_sl.properties +5 -0
  96. package/src/sap/ui/rta/messagebundle_sv.properties +5 -0
  97. package/src/sap/ui/rta/messagebundle_th.properties +5 -0
  98. package/src/sap/ui/rta/messagebundle_tr.properties +5 -0
  99. package/src/sap/ui/rta/messagebundle_uk.properties +5 -0
  100. package/src/sap/ui/rta/messagebundle_vi.properties +5 -0
  101. package/src/sap/ui/rta/messagebundle_zh_CN.properties +5 -0
  102. package/src/sap/ui/rta/messagebundle_zh_TW.properties +5 -0
  103. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +44 -44
  104. package/src/sap/ui/rta/plugin/BaseCreate.js +29 -29
  105. package/src/sap/ui/rta/plugin/Combine.js +9 -9
  106. package/src/sap/ui/rta/plugin/ControlVariant.js +21 -21
  107. package/src/sap/ui/rta/plugin/CreateContainer.js +6 -6
  108. package/src/sap/ui/rta/plugin/CutPaste.js +46 -46
  109. package/src/sap/ui/rta/plugin/DragDrop.js +2 -2
  110. package/src/sap/ui/rta/plugin/EasyAdd.js +4 -4
  111. package/src/sap/ui/rta/plugin/EasyRemove.js +5 -5
  112. package/src/sap/ui/rta/plugin/LocalReset.js +25 -25
  113. package/src/sap/ui/rta/plugin/Plugin.js +20 -20
  114. package/src/sap/ui/rta/plugin/RTAElementMover.js +42 -42
  115. package/src/sap/ui/rta/plugin/Remove.js +11 -11
  116. package/src/sap/ui/rta/plugin/Rename.js +7 -7
  117. package/src/sap/ui/rta/plugin/RenameHandler.js +17 -17
  118. package/src/sap/ui/rta/plugin/Resize.js +62 -62
  119. package/src/sap/ui/rta/plugin/Selection.js +14 -14
  120. package/src/sap/ui/rta/plugin/Settings.js +20 -20
  121. package/src/sap/ui/rta/plugin/Split.js +7 -7
  122. package/src/sap/ui/rta/plugin/Stretch.js +4 -4
  123. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +94 -87
  124. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +18 -18
  125. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +98 -99
  126. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +144 -144
  127. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +3 -4
  128. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +67 -67
  129. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +38 -39
  130. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +1 -0
  131. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +29 -29
  132. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +5 -5
  133. package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +1 -1
  134. package/src/sap/ui/rta/service/Action.js +36 -37
  135. package/src/sap/ui/rta/service/ControllerExtension.js +4 -4
  136. package/src/sap/ui/rta/service/Outline.js +59 -59
  137. package/src/sap/ui/rta/service/Property.js +125 -125
  138. package/src/sap/ui/rta/service/Receiver.js +78 -77
  139. package/src/sap/ui/rta/service/Selection.js +6 -6
  140. package/src/sap/ui/rta/service/SupportTools.js +188 -37
  141. package/src/sap/ui/rta/service/index.js +1 -1
  142. package/src/sap/ui/rta/themes/base/FlexSupportExtension.less +14 -0
  143. package/src/sap/ui/rta/themes/base/library.source.less +2 -1
  144. package/src/sap/ui/rta/toolbar/Adaptation.js +81 -26
  145. package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
  146. package/src/sap/ui/rta/toolbar/Base.js +17 -15
  147. package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -2
  148. package/src/sap/ui/rta/toolbar/Fiori.js +8 -8
  149. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  150. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +4 -4
  151. package/src/sap/ui/rta/toolbar/Personalization.js +2 -2
  152. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  153. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +13 -6
  154. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +2 -8
  155. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +2 -3
  156. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptationDialog.fragment.xml +0 -2
  157. package/src/sap/ui/rta/toolbar/translation/Translation.js +41 -41
  158. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +9 -9
  159. package/src/sap/ui/rta/util/Animation.js +5 -5
  160. package/src/sap/ui/rta/util/BindingsExtractor.js +33 -33
  161. package/src/sap/ui/rta/util/PluginManager.js +25 -25
  162. package/src/sap/ui/rta/util/PopupManager.js +27 -27
  163. package/src/sap/ui/rta/util/ReloadManager.js +1 -1
  164. package/src/sap/ui/rta/util/ServiceEventBus.js +3 -4
  165. package/src/sap/ui/rta/util/StylesLoader.js +9 -9
  166. package/src/sap/ui/rta/util/UrlParser.js +19 -19
  167. package/src/sap/ui/rta/util/adaptationStarter.js +34 -31
  168. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +23 -19
  169. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +61 -61
  170. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +76 -63
  171. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +6 -6
  172. package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +1 -1
  173. package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
  174. package/src/sap/ui/rta/util/hasStableId.js +2 -2
  175. package/src/sap/ui/rta/util/showMessageBox.js +4 -5
  176. package/src/sap/ui/rta/util/validateFlexEnabled.js +5 -5
  177. package/src/sap/ui/rta/util/validateStableIds.js +8 -8
  178. package/ui5.yaml +1 -1
@@ -33,14 +33,14 @@ sap.ui.define([
33
33
  function checkKeyUser(sLayer) {
34
34
  if (Layer.CUSTOMER === sLayer) {
35
35
  return FeaturesAPI.isKeyUser()
36
- .then(function(bIsKeyUser) {
37
- if (!bIsKeyUser) {
38
- var oRtaResourceBundle = Core.getLibraryResourceBundle("sap.ui.rta");
39
- var oError = new Error(oRtaResourceBundle.getText("MSG_NO_KEY_USER_RIGHTS_ERROR_MESSAGE"));
40
- oError.reason = "isKeyUser";
41
- throw oError;
42
- }
43
- });
36
+ .then(function(bIsKeyUser) {
37
+ if (!bIsKeyUser) {
38
+ var oRtaResourceBundle = Core.getLibraryResourceBundle("sap.ui.rta");
39
+ var oError = new Error(oRtaResourceBundle.getText("MSG_NO_KEY_USER_RIGHTS_ERROR_MESSAGE"));
40
+ oError.reason = "isKeyUser";
41
+ throw oError;
42
+ }
43
+ });
44
44
  }
45
45
  return Promise.resolve();
46
46
  }
@@ -123,36 +123,39 @@ sap.ui.define([
123
123
  };
124
124
 
125
125
  PersistenceWriteAPI.getChangesWarning(mPropertyBag)
126
- .then(function(oWarningMessage) {
127
- if (oWarningMessage.showWarning) {
128
- var oRtaResourceBundle = Core.getLibraryResourceBundle("sap.ui.rta");
129
- var oMessageProps = oWarningMessage.warningType === "mixedChangesWarning"
130
- ? {
131
- text: "MSG_ADAPTATION_STARTER_MIXED_CHANGES_WARNING",
132
- title: "TIT_ADAPTATION_STARTER_MIXED_CHANGES_TITLE"
133
- }
134
- : {
135
- text: "MSG_ADAPTATION_STARTER_NO_CHANGES_IN_P_WARNING",
136
- title: "TIT_ADAPTATION_STARTER_NO_CHANGES_IN_P_TITLE"
137
- };
126
+ .then(function(oWarningMessage) {
127
+ if (oWarningMessage.showWarning) {
128
+ var oRtaResourceBundle = Core.getLibraryResourceBundle("sap.ui.rta");
129
+ var oMessageProps = oWarningMessage.warningType === "mixedChangesWarning"
130
+ ? {
131
+ text: "MSG_ADAPTATION_STARTER_MIXED_CHANGES_WARNING",
132
+ title: "TIT_ADAPTATION_STARTER_MIXED_CHANGES_TITLE"
133
+ }
134
+ : {
135
+ text: "MSG_ADAPTATION_STARTER_NO_CHANGES_IN_P_WARNING",
136
+ title: "TIT_ADAPTATION_STARTER_NO_CHANGES_IN_P_TITLE"
137
+ };
138
138
 
139
- showMessageBox(
140
- oRtaResourceBundle.getText(oMessageProps.text),
141
- {
142
- title: oRtaResourceBundle.getText(oMessageProps.title)
143
- },
144
- "warning"
145
- );
146
- }
147
- });
139
+ showMessageBox(
140
+ oRtaResourceBundle.getText(oMessageProps.text),
141
+ {
142
+ title: oRtaResourceBundle.getText(oMessageProps.title)
143
+ },
144
+ "warning"
145
+ );
146
+ }
147
+ });
148
148
  }
149
149
  return oRta;
150
150
  })
151
151
  .catch(function(vError) {
152
- if (vError !== "Reload triggered") {
152
+ if (
153
+ vError !== "Reload triggered"
154
+ && !(FlexUtils.getUshellContainer() && vError.reason === "flexEnabled") // FLP Plugin already handles this error
155
+ ) {
153
156
  var oRtaResourceBundle = Core.getLibraryResourceBundle("sap.ui.rta");
154
157
  showMessageBox(
155
- oRtaResourceBundle.getText("MSG_GENERIC_ERROR_MESSAGE", vError.message),
158
+ oRtaResourceBundle.getText("MSG_GENERIC_ERROR_MESSAGE", [vError.message]),
156
159
  {title: oRtaResourceBundle.getText("MSG_ADAPTATION_COULD_NOT_START")},
157
160
  "error"
158
161
  );
@@ -5,29 +5,31 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
- "sap/ui/core/Fragment",
9
- "sap/ui/model/json/JSONModel",
10
- "sap/ui/core/Control",
11
8
  "sap/ui/core/format/DateFormat",
9
+ "sap/ui/core/Control",
10
+ "sap/ui/core/Core",
11
+ "sap/ui/core/Fragment",
12
+ "sap/ui/core/StaticArea",
12
13
  "sap/ui/events/KeyCodes",
13
- "sap/ui/rta/util/changeVisualization/commands/getCommandVisualization",
14
- "sap/ui/fl/Utils",
15
14
  "sap/ui/fl/util/resolveBinding",
16
- "sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils",
17
- "sap/ui/core/Core",
18
- "sap/ui/rta/util/changeVisualization/ChangeCategories"
15
+ "sap/ui/fl/Utils",
16
+ "sap/ui/model/json/JSONModel",
17
+ "sap/ui/rta/util/changeVisualization/commands/getCommandVisualization",
18
+ "sap/ui/rta/util/changeVisualization/ChangeCategories",
19
+ "sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils"
19
20
  ], function(
20
- Fragment,
21
- JSONModel,
22
- Control,
23
21
  DateFormat,
22
+ Control,
23
+ Core,
24
+ Fragment,
25
+ StaticArea,
24
26
  KeyCodes,
25
- getCommandVisualization,
26
- FlUtils,
27
27
  resolveBinding,
28
- ChangeVisualizationUtils,
29
- Core,
30
- ChangeCategories
28
+ FlUtils,
29
+ JSONModel,
30
+ getCommandVisualization,
31
+ ChangeCategories,
32
+ ChangeVisualizationUtils
31
33
  ) {
32
34
  "use strict";
33
35
 
@@ -40,7 +42,7 @@ sap.ui.define([
40
42
  * @alias sap.ui.rta.util.changeVisualization.ChangeIndicator
41
43
  * @author SAP SE
42
44
  * @since 1.84.0
43
- * @version 1.115.1
45
+ * @version 1.117.0
44
46
  * @private
45
47
  */
46
48
  var ChangeIndicator = Control.extend("sap.ui.rta.util.changeVisualization.ChangeIndicator", {
@@ -173,6 +175,8 @@ sap.ui.define([
173
175
  // the indicator should be centered only if the element has a small enough height to improve the design and visibility
174
176
  if (iOverlayHeight < iIndicatorHeight * 5) {
175
177
  oIndicator.addStyleClass("sapUiRtaChangeIndicatorVerticallyCentered");
178
+ } else {
179
+ oIndicator.removeStyleClass("sapUiRtaChangeIndicatorVerticallyCentered");
176
180
  }
177
181
  }
178
182
 
@@ -308,7 +312,7 @@ sap.ui.define([
308
312
  if (oDomRef) {
309
313
  oDomRef.parentNode.removeChild(oDomRef);
310
314
  }
311
- this.placeAt(Core.getStaticAreaRef());
315
+ this.placeAt(StaticArea.getDomRef());
312
316
 
313
317
  this.setProperty("overlayId", sOverlayId);
314
318
  return this;
@@ -397,7 +401,7 @@ sap.ui.define([
397
401
 
398
402
  ChangeIndicator.prototype._toggleDetailPopover = function() {
399
403
  if (!this.getAggregation("_popover")) {
400
- //store the tabindex (tabindex will be removed on opening the popover)
404
+ // store the tabindex (tabindex will be removed on opening the popover)
401
405
  this._iOldTabIndex = this.getDomRef().getAttribute("tabindex");
402
406
  Fragment.load({
403
407
  name: "sap.ui.rta.util.changeVisualization.ChangeIndicatorPopover",
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  * @alias sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry
40
40
  * @author SAP SE
41
41
  * @since 1.86.0
42
- * @version 1.115.1
42
+ * @version 1.117.0
43
43
  * @private
44
44
  */
45
45
  var ChangeIndicatorRegistry = ManagedObject.extend("sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry", {
@@ -60,7 +60,7 @@ sap.ui.define([
60
60
  }
61
61
  }
62
62
  },
63
- constructor: function () {
63
+ constructor: function() {
64
64
  ManagedObject.prototype.constructor.apply(this, arguments);
65
65
 
66
66
  // List of entries with indicator data, grouped by Change ID
@@ -71,7 +71,7 @@ sap.ui.define([
71
71
  }
72
72
  });
73
73
 
74
- ChangeIndicatorRegistry.prototype.exit = function () {
74
+ ChangeIndicatorRegistry.prototype.exit = function() {
75
75
  this.reset();
76
76
  };
77
77
 
@@ -80,8 +80,8 @@ sap.ui.define([
80
80
  *
81
81
  * @returns {object[]} Change indicator data for all registered changes
82
82
  */
83
- ChangeIndicatorRegistry.prototype.getAllRegisteredChanges = function () {
84
- return values(this._oRegisteredChanges || {}).map(function (oChange) {
83
+ ChangeIndicatorRegistry.prototype.getAllRegisteredChanges = function() {
84
+ return values(this._oRegisteredChanges || {}).map(function(oChange) {
85
85
  return Object.assign({}, oChange);
86
86
  });
87
87
  };
@@ -91,7 +91,7 @@ sap.ui.define([
91
91
  *
92
92
  * @returns {string[]} Array with both design time and runtime registered changes
93
93
  */
94
- ChangeIndicatorRegistry.prototype.getRegisteredChangeIds = function () {
94
+ ChangeIndicatorRegistry.prototype.getRegisteredChangeIds = function() {
95
95
  return Object.keys(this._oRegisteredChanges || {});
96
96
  };
97
97
 
@@ -101,7 +101,7 @@ sap.ui.define([
101
101
  * @param {string} sChangeId - ID of the registered change
102
102
  * @returns {object} Registered change
103
103
  */
104
- ChangeIndicatorRegistry.prototype.getRegisteredChange = function (sChangeId) {
104
+ ChangeIndicatorRegistry.prototype.getRegisteredChange = function(sChangeId) {
105
105
  return this._oRegisteredChanges[sChangeId] && Object.assign({}, this._oRegisteredChanges[sChangeId]);
106
106
  };
107
107
 
@@ -111,11 +111,11 @@ sap.ui.define([
111
111
  *
112
112
  * @returns {object} List of selectors with change indicator data.
113
113
  */
114
- ChangeIndicatorRegistry.prototype.getSelectorsWithRegisteredChanges = function () {
114
+ ChangeIndicatorRegistry.prototype.getSelectorsWithRegisteredChanges = function() {
115
115
  var oChangeIndicators = {};
116
116
  var sPreviousAffectedElementId;
117
117
 
118
- function addSelector (sSelectorId, sAffectedElementId, oChangeIndicatorData, bDependent) {
118
+ function addSelector(sSelectorId, sAffectedElementId, oChangeIndicatorData, bDependent) {
119
119
  if (oChangeIndicators[sSelectorId] === undefined) {
120
120
  oChangeIndicators[sSelectorId] = [];
121
121
  }
@@ -133,21 +133,21 @@ sap.ui.define([
133
133
  }
134
134
 
135
135
  values(this._oRegisteredChanges)
136
- .forEach(function (oChangeIndicatorData) {
137
- oChangeIndicatorData.visualizationInfo.displayElementIds
138
- .forEach(function (sId, iIndex) {
139
- addSelector(sId, oChangeIndicatorData.visualizationInfo.affectedElementIds[iIndex], oChangeIndicatorData, false);
140
- });
136
+ .forEach(function(oChangeIndicatorData) {
137
+ oChangeIndicatorData.visualizationInfo.displayElementIds
138
+ .forEach(function(sId, iIndex) {
139
+ addSelector(sId, oChangeIndicatorData.visualizationInfo.affectedElementIds[iIndex], oChangeIndicatorData, false);
141
140
  });
141
+ });
142
142
 
143
143
  return oChangeIndicators;
144
144
  };
145
145
 
146
- ChangeIndicatorRegistry.prototype.getRelevantChangesWithSelector = function () {
146
+ ChangeIndicatorRegistry.prototype.getRelevantChangesWithSelector = function() {
147
147
  var oSelectors = this.getSelectorsWithRegisteredChanges();
148
148
  var aRelevantChanges = [];
149
149
  Object.keys(oSelectors).forEach(function(sSelectorId) {
150
- var aRelevantChangesForSelector = oSelectors[sSelectorId].filter(function (oChange) {
150
+ var aRelevantChangesForSelector = oSelectors[sSelectorId].filter(function(oChange) {
151
151
  return !oChange.dependent;
152
152
  });
153
153
  aRelevantChanges = aRelevantChanges.concat(aRelevantChangesForSelector);
@@ -161,7 +161,7 @@ sap.ui.define([
161
161
  * @param {string} sSelectorId - ID of the indicator
162
162
  * @returns {object} Registered change indicator
163
163
  */
164
- ChangeIndicatorRegistry.prototype.getChangeIndicator = function (sSelectorId) {
164
+ ChangeIndicatorRegistry.prototype.getChangeIndicator = function(sSelectorId) {
165
165
  return this._oChangeIndicators[sSelectorId];
166
166
  };
167
167
 
@@ -170,7 +170,7 @@ sap.ui.define([
170
170
  *
171
171
  * @returns {object[]} Registered change indicators
172
172
  */
173
- ChangeIndicatorRegistry.prototype.getChangeIndicators = function () {
173
+ ChangeIndicatorRegistry.prototype.getChangeIndicators = function() {
174
174
  return values(this._oChangeIndicators || {});
175
175
  };
176
176
 
@@ -191,7 +191,7 @@ sap.ui.define([
191
191
  if (sCommandName === "settings" && includes(Object.keys(aCategories), mChangeVisualizationInfo.descriptionPayload.category)) {
192
192
  sChangeCategory = mChangeVisualizationInfo.descriptionPayload.category;
193
193
  } else {
194
- sChangeCategory = Object.keys(aCategories).find(function (sChangeCategoryName) {
194
+ sChangeCategory = Object.keys(aCategories).find(function(sChangeCategoryName) {
195
195
  return includes(aCategories[sChangeCategoryName], sCommandName);
196
196
  });
197
197
  if (!sChangeCategory) {
@@ -228,33 +228,33 @@ sap.ui.define([
228
228
  return undefined;
229
229
  }
230
230
  return aSelectorList
231
- .map(function(vSelector) {
232
- var oElement = typeof vSelector.getId === "function"
233
- ? vSelector
234
- : JsControlTreeModifier.bySelector(vSelector, oAppComponent);
235
- return oElement && oElement.getId();
236
- })
237
- .filter(Boolean);
231
+ .map(function(vSelector) {
232
+ var oElement = typeof vSelector.getId === "function"
233
+ ? vSelector
234
+ : JsControlTreeModifier.bySelector(vSelector, oAppComponent);
235
+ return oElement && oElement.getId();
236
+ })
237
+ .filter(Boolean);
238
238
  }
239
239
 
240
240
  return getInfoFromChangeHandler(oAppComponent, oChange)
241
- .then(function(oInfoFromChangeHandler) {
242
- var mVisualizationInfo = oInfoFromChangeHandler || {};
243
- var aChangeSelectors = oChange.getSelector && oChange.getSelector() && [oChange.getSelector()];
244
- var aAffectedElementSelectors = mVisualizationInfo.affectedControls || aChangeSelectors || [];
245
- // If there is an original selector (e.g. control is inside a template),
246
- // the indicator should be displayed on the host control (change selector)
247
- var oChangeOriginalSelector = oChange.getOriginalSelector && oChange.getOriginalSelector();
248
- var aDisplayElementSelectors = oChangeOriginalSelector ? aChangeSelectors : aAffectedElementSelectors;
241
+ .then(function(oInfoFromChangeHandler) {
242
+ var mVisualizationInfo = oInfoFromChangeHandler || {};
243
+ var aChangeSelectors = oChange.getSelector && oChange.getSelector() && [oChange.getSelector()];
244
+ var aAffectedElementSelectors = mVisualizationInfo.affectedControls || aChangeSelectors || [];
245
+ // If there is an original selector (e.g. control is inside a template),
246
+ // the indicator should be displayed on the host control (change selector)
247
+ var oChangeOriginalSelector = oChange.getOriginalSelector && oChange.getOriginalSelector();
248
+ var aDisplayElementSelectors = oChangeOriginalSelector ? aChangeSelectors : aAffectedElementSelectors;
249
249
 
250
- return {
251
- affectedElementIds: getSelectorIds(aAffectedElementSelectors),
252
- dependentElementIds: getSelectorIds(mVisualizationInfo.dependentControls) || [],
253
- displayElementIds: getSelectorIds(mVisualizationInfo.displayControls || getSelectorIds(aDisplayElementSelectors)),
254
- updateRequired: mVisualizationInfo.updateRequired,
255
- descriptionPayload: mVisualizationInfo.descriptionPayload || {}
256
- };
257
- });
250
+ return {
251
+ affectedElementIds: getSelectorIds(aAffectedElementSelectors),
252
+ dependentElementIds: getSelectorIds(mVisualizationInfo.dependentControls) || [],
253
+ displayElementIds: getSelectorIds(mVisualizationInfo.displayControls || getSelectorIds(aDisplayElementSelectors)),
254
+ updateRequired: mVisualizationInfo.updateRequired,
255
+ descriptionPayload: mVisualizationInfo.descriptionPayload || {}
256
+ };
257
+ });
258
258
  }
259
259
 
260
260
  function getInfoFromChangeHandler(oAppComponent, oChange) {
@@ -270,19 +270,19 @@ sap.ui.define([
270
270
  modifier: JsControlTreeModifier,
271
271
  layer: oChange.getLayer()
272
272
  })
273
- .then(function(oChangeHandler) {
274
- if (
275
- oChangeHandler && typeof oChangeHandler.getChangeVisualizationInfo === "function"
273
+ .then(function(oChangeHandler) {
274
+ if (
275
+ oChangeHandler && typeof oChangeHandler.getChangeVisualizationInfo === "function"
276
276
  && oChange.isSuccessfullyApplied && oChange.isSuccessfullyApplied()
277
- ) {
278
- return oChangeHandler.getChangeVisualizationInfo(oChange, oAppComponent);
279
- }
280
- return undefined;
281
- })
282
- .catch(function(vErr) {
283
- Log.error(vErr);
284
- return undefined;
285
- });
277
+ ) {
278
+ return oChangeHandler.getChangeVisualizationInfo(oChange, oAppComponent);
279
+ }
280
+ return undefined;
281
+ })
282
+ .catch(function(vErr) {
283
+ Log.error(vErr);
284
+ return undefined;
285
+ });
286
286
  }
287
287
 
288
288
  return Promise.resolve();
@@ -294,19 +294,19 @@ sap.ui.define([
294
294
  * @param {string} sSelectorId - The ID of the selector for which the change indicator is registered
295
295
  * @param {object} oChangeIndicator - The change indicator to register
296
296
  */
297
- ChangeIndicatorRegistry.prototype.registerChangeIndicator = function (sSelectorId, oChangeIndicator) {
297
+ ChangeIndicatorRegistry.prototype.registerChangeIndicator = function(sSelectorId, oChangeIndicator) {
298
298
  this._oChangeIndicators[sSelectorId] = oChangeIndicator;
299
299
  };
300
300
 
301
301
  /**
302
302
  * Resets the change and change indicator registries.
303
303
  */
304
- ChangeIndicatorRegistry.prototype.reset = function () {
305
- Object.keys(this._oRegisteredChanges).forEach(function (sKeyToRemove) {
304
+ ChangeIndicatorRegistry.prototype.reset = function() {
305
+ Object.keys(this._oRegisteredChanges).forEach(function(sKeyToRemove) {
306
306
  this.removeRegisteredChange(sKeyToRemove);
307
307
  }.bind(this));
308
308
 
309
- values(this._oChangeIndicators).forEach(function (oIndicator) {
309
+ values(this._oChangeIndicators).forEach(function(oIndicator) {
310
310
  oIndicator.destroy();
311
311
  });
312
312
  this._oChangeIndicators = {};
@@ -317,7 +317,7 @@ sap.ui.define([
317
317
  *
318
318
  * @param {string} sChangeId - ID of the registered change
319
319
  */
320
- ChangeIndicatorRegistry.prototype.removeRegisteredChange = function (sChangeId) {
320
+ ChangeIndicatorRegistry.prototype.removeRegisteredChange = function(sChangeId) {
321
321
  delete this._oRegisteredChanges[sChangeId];
322
322
  };
323
323
 
@@ -325,7 +325,7 @@ sap.ui.define([
325
325
  * Removes changes with the updateRequired flag from the registry so the change can be re-registered and
326
326
  * the visualizationInfo is updated => if an element has an unstable id this updates the id information in the registry (e.g simple forms)
327
327
  */
328
- ChangeIndicatorRegistry.prototype.removeOutdatedRegisteredChanges = function () {
328
+ ChangeIndicatorRegistry.prototype.removeOutdatedRegisteredChanges = function() {
329
329
  this.getAllRegisteredChanges().forEach(function(oChange) {
330
330
  if (oChange.visualizationInfo && oChange.visualizationInfo.updateRequired) {
331
331
  this.removeRegisteredChange(oChange.change.getId());
@@ -337,7 +337,7 @@ sap.ui.define([
337
337
  * Removes changes without any displayElementIds from the registry so the change can be re-registered and
338
338
  * the visualizationInfo is updated => if an element is inside a dialog which hasn't been opened yet
339
339
  */
340
- ChangeIndicatorRegistry.prototype.removeRegisteredChangesWithoutVizInfo = function () {
340
+ ChangeIndicatorRegistry.prototype.removeRegisteredChangesWithoutVizInfo = function() {
341
341
  this.getAllRegisteredChanges().forEach(function(oChange) {
342
342
  if (oChange.visualizationInfo && oChange.visualizationInfo.displayElementIds.length === 0) {
343
343
  this.removeRegisteredChange(oChange.change.getId());