@openui5/sap.ui.rta 1.115.0 → 1.116.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 (174) 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 +253 -248
  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 +97 -97
  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 +2 -2
  28. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  29. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +22 -22
  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 +2 -2
  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 +5 -0
  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 +30 -30
  141. package/src/sap/ui/rta/service/index.js +1 -1
  142. package/src/sap/ui/rta/toolbar/Adaptation.js +74 -26
  143. package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
  144. package/src/sap/ui/rta/toolbar/Base.js +17 -15
  145. package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -2
  146. package/src/sap/ui/rta/toolbar/Fiori.js +8 -8
  147. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  148. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +4 -4
  149. package/src/sap/ui/rta/toolbar/Personalization.js +2 -2
  150. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  151. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +13 -6
  152. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +2 -8
  153. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +2 -3
  154. package/src/sap/ui/rta/toolbar/translation/Translation.js +41 -41
  155. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +9 -9
  156. package/src/sap/ui/rta/util/Animation.js +5 -5
  157. package/src/sap/ui/rta/util/BindingsExtractor.js +33 -33
  158. package/src/sap/ui/rta/util/PluginManager.js +25 -25
  159. package/src/sap/ui/rta/util/PopupManager.js +27 -27
  160. package/src/sap/ui/rta/util/ReloadManager.js +1 -1
  161. package/src/sap/ui/rta/util/ServiceEventBus.js +3 -4
  162. package/src/sap/ui/rta/util/StylesLoader.js +9 -9
  163. package/src/sap/ui/rta/util/UrlParser.js +19 -19
  164. package/src/sap/ui/rta/util/adaptationStarter.js +34 -31
  165. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +21 -19
  166. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +61 -61
  167. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +73 -60
  168. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +6 -6
  169. package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +1 -1
  170. package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
  171. package/src/sap/ui/rta/util/hasStableId.js +2 -2
  172. package/src/sap/ui/rta/util/showMessageBox.js +4 -5
  173. package/src/sap/ui/rta/util/validateFlexEnabled.js +5 -5
  174. package/src/sap/ui/rta/util/validateStableIds.js +8 -8
package/.eslintrc.json CHANGED
@@ -15,10 +15,41 @@
15
15
  "no-multi-spaces": "error",
16
16
  "indent": ["error", "tab", {
17
17
  "SwitchCase": 1,
18
- "MemberExpression": "off"
18
+ "MemberExpression": 0
19
19
  }],
20
20
  "one-var": ["error", "never"],
21
21
  "no-useless-call": "error",
22
- "key-spacing": ["error", { "beforeColon": false }]
22
+ "key-spacing": ["error", { "beforeColon": false }],
23
+ "default-case": ["error", { "commentPattern": "^skip\\sdefault" }],
24
+
25
+ "comma-dangle": ["error", "never"],
26
+ "max-len": ["warn", {
27
+ "code": 140,
28
+ "ignorePattern": "@param|@returns|@description|<|QUnit.test",
29
+ "ignoreUrls": true
30
+ }],
31
+ "space-before-function-paren": ["error", {
32
+ "anonymous": "never",
33
+ "named": "never",
34
+ "asyncArrow": "always"
35
+ }],
36
+ "no-multi-assign": ["error", { "ignoreNonDeclaration": true }],
37
+ "dot-notation": ["error", { "allowKeywords": true }],
38
+ "spaced-comment": ["error", "always", {
39
+ "line": {
40
+ "exceptions": ["-"]
41
+ },
42
+ "block": {
43
+ "markers": ["!"],
44
+ "exceptions": ["*"],
45
+ "balanced": true
46
+ }
47
+
48
+ }],
49
+ "no-multiple-empty-lines": ["error", {"max": 1}],
50
+ "quotes": ["error", "double", {
51
+ "avoidEscape": true,
52
+ "allowTemplateLiterals": true
53
+ }]
23
54
  }
24
55
  }
package/.reuse/dep5 CHANGED
@@ -457,11 +457,6 @@ Comment: these files belong to: UI5 Web Components
457
457
 
458
458
  # Outside of Libraries:
459
459
 
460
- Files: src/testsuite-utils/src/main/resources/META-INF/less/less.js
461
- Copyright: 2009-2014, Alexis Sellier <self@cloudhead.net>
462
- License: Apache-2.0
463
- Comment: these files belong to: LESS
464
-
465
460
  Files: lib/jsdoc/ui5/plugin.js
466
461
  Copyright:
467
462
  2009-2023 SAP SE or an SAP affiliate company and OpenUI5 contributors
package/THIRDPARTY.txt CHANGED
@@ -460,19 +460,13 @@ Contained in: src/sap.ui.webc.main/src/sap/ui/webc/main/thirdparty/*.*
460
460
 
461
461
  Outside of Libraries:
462
462
 
463
- Component: LESS, version: 1.6.3
464
- Copyright: 2009-2014, Alexis Sellier <self@cloudhead.net>
465
- License: Apache-2.0
466
- License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
467
- Contained in: src/testsuite-utils/src/main/resources/META-INF/less/less.js
468
-
469
463
  Component: JSDoc 3, version: 3.6.7
470
464
  Copyright: 2011-present Michael Mathews micmath@gmail.com and the contributors to JSDoc
471
465
  License: Apache-2.0
472
466
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
473
467
  Contained in: lib/jsdoc/ui5/plugin.js
474
468
 
475
- Component: SAP Theming Base Content, version: 11.3.0
469
+ Component: SAP Theming Base Content, version: 11.4.2
476
470
  Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
477
471
  License: Apache-2.0
478
472
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.rta",
3
- "version": "1.115.0",
3
+ "version": "1.116.0",
4
4
  "description": "OpenUI5 UI Library sap.ui.rta",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -14,10 +14,10 @@
14
14
  "url": "https://github.com/SAP/openui5.git"
15
15
  },
16
16
  "dependencies": {
17
- "@openui5/sap.m": "1.115.0",
18
- "@openui5/sap.ui.core": "1.115.0",
19
- "@openui5/sap.ui.dt": "1.115.0",
20
- "@openui5/sap.ui.fl": "1.115.0",
21
- "@openui5/sap.ui.layout": "1.115.0"
17
+ "@openui5/sap.m": "1.116.0",
18
+ "@openui5/sap.ui.core": "1.116.0",
19
+ "@openui5/sap.ui.dt": "1.116.0",
20
+ "@openui5/sap.ui.fl": "1.116.0",
21
+ "@openui5/sap.ui.layout": "1.116.0"
22
22
  }
23
23
  }
@@ -6,7 +6,7 @@
6
6
  <copyright>OpenUI5
7
7
  * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.115.0</version>
9
+ <version>1.116.0</version>
10
10
 
11
11
  <documentation>SAPUI5 library with RTA controls.</documentation>
12
12
 
@@ -11,7 +11,7 @@ sap.ui.define([
11
11
  "sap/base/util/merge",
12
12
  "sap/ui/rta/util/ServiceEventBus",
13
13
  "sap/ui/thirdparty/URI"
14
- ], function (
14
+ ], function(
15
15
  ManagedObject,
16
16
  PostMessageBus,
17
17
  uid,
@@ -21,10 +21,10 @@ sap.ui.define([
21
21
  ) {
22
22
  "use strict";
23
23
 
24
- var CHANNEL_ID = 'sap.ui.rta.service.receiver';
25
- var STATUS_PENDING = 'pending';
26
- var STATUS_ACCEPTED = 'accepted';
27
- var STATUS_DECLINED = 'declined';
24
+ var CHANNEL_ID = "sap.ui.rta.service.receiver";
25
+ var STATUS_PENDING = "pending";
26
+ var STATUS_ACCEPTED = "accepted";
27
+ var STATUS_DECLINED = "declined";
28
28
 
29
29
  /**
30
30
  * @class
@@ -57,7 +57,7 @@ sap.ui.define([
57
57
  * @alias sap.ui.rta.Client
58
58
  * @author SAP SE
59
59
  * @since 1.56.0
60
- * @version 1.115.0
60
+ * @version 1.116.0
61
61
  * @private
62
62
  * @ui5-restricted
63
63
  */
@@ -139,13 +139,13 @@ sap.ui.define([
139
139
  this._mEventHandlerIds = {};
140
140
 
141
141
  // Await READY event from RTA instance
142
- this._oPostMessageBus.subscribeOnce(CHANNEL_ID, PostMessageBus.event.READY, function (oEvent) {
142
+ this._oPostMessageBus.subscribeOnce(CHANNEL_ID, PostMessageBus.event.READY, function(oEvent) {
143
143
  if (!this._isValidMessage(oEvent)) {
144
144
  return;
145
145
  }
146
146
 
147
147
  // ACCEPTED
148
- this._oPostMessageBus.subscribeOnce(CHANNEL_ID, PostMessageBus.event.ACCEPTED, function (oEvent) {
148
+ this._oPostMessageBus.subscribeOnce(CHANNEL_ID, PostMessageBus.event.ACCEPTED, function(oEvent) {
149
149
  if (!this._isValidMessage(oEvent)) {
150
150
  return;
151
151
  }
@@ -157,15 +157,15 @@ sap.ui.define([
157
157
  this._aRequestQueue = [];
158
158
  aRequests.forEach(this._sendRequest, this);
159
159
 
160
- this._oPostMessageBus.subscribe(CHANNEL_ID, 'getService', this._receiverMethods, this);
161
- this._oPostMessageBus.subscribe(CHANNEL_ID, 'callMethod', this._receiverMethods, this);
162
- this._oPostMessageBus.subscribe(CHANNEL_ID, 'subscribe', this._receiverMethods, this);
163
- this._oPostMessageBus.subscribe(CHANNEL_ID, 'unsubscribe', this._receiverMethods, this);
164
- this._oPostMessageBus.subscribe(CHANNEL_ID, 'event', this._receiverEvents, this);
160
+ this._oPostMessageBus.subscribe(CHANNEL_ID, "getService", this._receiverMethods, this);
161
+ this._oPostMessageBus.subscribe(CHANNEL_ID, "callMethod", this._receiverMethods, this);
162
+ this._oPostMessageBus.subscribe(CHANNEL_ID, "subscribe", this._receiverMethods, this);
163
+ this._oPostMessageBus.subscribe(CHANNEL_ID, "unsubscribe", this._receiverMethods, this);
164
+ this._oPostMessageBus.subscribe(CHANNEL_ID, "event", this._receiverEvents, this);
165
165
  }, this);
166
166
 
167
167
  // DECLINED
168
- this._oPostMessageBus.subscribeOnce(CHANNEL_ID, PostMessageBus.event.DECLINED, function (oEvent) {
168
+ this._oPostMessageBus.subscribeOnce(CHANNEL_ID, PostMessageBus.event.DECLINED, function(oEvent) {
169
169
  if (!this._isValidMessage(oEvent)) {
170
170
  return;
171
171
  }
@@ -175,8 +175,8 @@ sap.ui.define([
175
175
  // Rejecting queued requests
176
176
  var aRequests = this._aRequestQueue.slice();
177
177
  this._aRequestQueue = [];
178
- aRequests.forEach(function (mRequest) {
179
- mRequest.reject(new Error('sap.ui.rta.Client.getService(): connection to RuntimeAuthoring instance has been refused'));
178
+ aRequests.forEach(function(mRequest) {
179
+ mRequest.reject(new Error("sap.ui.rta.Client.getService(): connection to RuntimeAuthoring instance has been refused"));
180
180
  });
181
181
  }, this);
182
182
 
@@ -199,12 +199,12 @@ sap.ui.define([
199
199
  * After an object has been destroyed, it can no longer be used.
200
200
  * @public
201
201
  */
202
- Client.prototype.destroy = function () {
203
- this._oPostMessageBus.unsubscribe(CHANNEL_ID, 'getService', this._receiverMethods, this);
204
- this._oPostMessageBus.unsubscribe(CHANNEL_ID, 'callMethod', this._receiverMethods, this);
205
- this._oPostMessageBus.unsubscribe(CHANNEL_ID, 'subscribe', this._receiverMethods, this);
206
- this._oPostMessageBus.unsubscribe(CHANNEL_ID, 'unsubscribe', this._receiverMethods, this);
207
- this._oPostMessageBus.unsubscribe(CHANNEL_ID, 'event', this._receiverEvents, this);
202
+ Client.prototype.destroy = function() {
203
+ this._oPostMessageBus.unsubscribe(CHANNEL_ID, "getService", this._receiverMethods, this);
204
+ this._oPostMessageBus.unsubscribe(CHANNEL_ID, "callMethod", this._receiverMethods, this);
205
+ this._oPostMessageBus.unsubscribe(CHANNEL_ID, "subscribe", this._receiverMethods, this);
206
+ this._oPostMessageBus.unsubscribe(CHANNEL_ID, "unsubscribe", this._receiverMethods, this);
207
+ this._oPostMessageBus.unsubscribe(CHANNEL_ID, "event", this._receiverEvents, this);
208
208
 
209
209
  ManagedObject.prototype.destroy.apply(this, arguments);
210
210
  };
@@ -214,23 +214,23 @@ sap.ui.define([
214
214
  * @param {string} sServiceName - RTA service name to be requested
215
215
  * @returns {Promise} - resolves with a service object
216
216
  */
217
- Client.prototype.getService = function (sServiceName) {
217
+ Client.prototype.getService = function(sServiceName) {
218
218
  if (typeof sServiceName !== "string") {
219
- throw new TypeError('sap.ui.rta.Client.getService(): invalid service name specified');
219
+ throw new TypeError("sap.ui.rta.Client.getService(): invalid service name specified");
220
220
  }
221
221
 
222
222
  return this._sendRequest(this._createRequest({
223
223
  target: this.getWindow(),
224
224
  origin: this.getOrigin(),
225
225
  channelId: CHANNEL_ID,
226
- eventId: 'getService',
226
+ eventId: "getService",
227
227
  data: {
228
228
  arguments: [sServiceName]
229
229
  }
230
230
  }));
231
231
  };
232
232
 
233
- Client.prototype._createRequest = function (mParameters) {
233
+ Client.prototype._createRequest = function(mParameters) {
234
234
  var sRequestId = uid();
235
235
 
236
236
  var mRequest = {
@@ -242,13 +242,13 @@ sap.ui.define([
242
242
  eventId: mParameters.eventId,
243
243
  data: {
244
244
  id: sRequestId,
245
- type: 'request',
245
+ type: "request",
246
246
  body: mParameters.data
247
247
  }
248
248
  }
249
249
  };
250
250
 
251
- mRequest.promise = new Promise(function (fnResolve, fnReject) {
251
+ mRequest.promise = new Promise(function(fnResolve, fnReject) {
252
252
  mRequest.resolve = fnResolve;
253
253
  mRequest.reject = fnReject;
254
254
  });
@@ -256,7 +256,7 @@ sap.ui.define([
256
256
  return mRequest;
257
257
  };
258
258
 
259
- Client.prototype._sendRequest = function (mRequest) {
259
+ Client.prototype._sendRequest = function(mRequest) {
260
260
  switch (this._sStatus) {
261
261
  case STATUS_ACCEPTED:
262
262
  this._mPendingRequests[mRequest.id] = mRequest;
@@ -266,46 +266,46 @@ sap.ui.define([
266
266
  this._aRequestQueue.push(mRequest);
267
267
  break;
268
268
  case STATUS_DECLINED:
269
- mRequest.reject(new Error('sap.ui.rta.Client.getService(): connection to RuntimeAuthoring instance has been refused'));
269
+ mRequest.reject(new Error("sap.ui.rta.Client.getService(): connection to RuntimeAuthoring instance has been refused"));
270
270
  break;
271
- // no default
271
+ default:
272
+ // no default
272
273
  }
273
274
 
274
275
  return mRequest.promise;
275
276
  };
276
277
 
277
- Client.prototype._isValidMessage = function (oEvent) {
278
+ Client.prototype._isValidMessage = function(oEvent) {
278
279
  return this.getWindow() === oEvent.source && this.getOrigin() === oEvent.origin;
279
280
  };
280
281
 
281
-
282
- Client.prototype._receiverMethods = function (oEvent) {
282
+ Client.prototype._receiverMethods = function(oEvent) {
283
283
  if (!this._isValidMessage(oEvent)) {
284
284
  return;
285
285
  }
286
286
 
287
287
  var mData = oEvent.data;
288
288
 
289
- if (mData.type !== 'response') {
289
+ if (mData.type !== "response") {
290
290
  return;
291
291
  }
292
292
 
293
293
  var mRequest = this._mPendingRequests[mData.id];
294
294
 
295
295
  switch (oEvent.eventId) {
296
- case 'getService':
296
+ case "getService":
297
297
  var sServiceName = mRequest.request.data.body.arguments[0];
298
298
  var aMethods = mData.body.methods || [];
299
299
  var aEvents = mData.body.events;
300
300
  var mService = merge(
301
301
  // Create placeholders for methods
302
- aMethods.reduce(function (mResult, sMethodName) {
303
- mResult[sMethodName] = function () {
302
+ aMethods.reduce(function(mResult, sMethodName) {
303
+ mResult[sMethodName] = function() {
304
304
  return this._sendRequest(this._createRequest({
305
305
  target: oEvent.source,
306
306
  origin: oEvent.origin,
307
307
  channelId: CHANNEL_ID,
308
- eventId: 'callMethod',
308
+ eventId: "callMethod",
309
309
  data: {
310
310
  service: sServiceName,
311
311
  method: sMethodName,
@@ -324,7 +324,7 @@ sap.ui.define([
324
324
  this._oServiceEventBus = new ServiceEventBus();
325
325
  }
326
326
  merge(mService, {
327
- attachEvent: function (sEventName, fnCallback, oContext) {
327
+ attachEvent: function(sEventName, fnCallback, oContext) {
328
328
  if (typeof (sEventName) !== "string" || !sEventName) {
329
329
  throw new TypeError("sap.ui.rta.Client: sEventName must be a non-empty string when calling attachEvent() for a service");
330
330
  }
@@ -345,20 +345,20 @@ sap.ui.define([
345
345
  target: oEvent.source,
346
346
  origin: oEvent.origin,
347
347
  channelId: CHANNEL_ID,
348
- eventId: 'subscribe',
348
+ eventId: "subscribe",
349
349
  data: {
350
350
  service: sServiceName,
351
351
  event: sEventName
352
352
  }
353
- })).then(function (mResponse) {
354
- this._mEventHandlerIds[sServiceName + ',' + sEventName] = mResponse.id;
353
+ })).then(function(mResponse) {
354
+ this._mEventHandlerIds[sServiceName + "," + sEventName] = mResponse.id;
355
355
 
356
356
  // Use case when detach happens before we received response from RTA instance
357
357
  this._checkIfEventAlive(sServiceName, sEventName);
358
358
  }.bind(this));
359
359
  }
360
360
  }.bind(this),
361
- detachEvent: function (sEventName, fnCallback, oContext) {
361
+ detachEvent: function(sEventName, fnCallback, oContext) {
362
362
  if (typeof (sEventName) !== "string" || !sEventName) {
363
363
  throw new TypeError("sap.ui.rta.Client: sEventName must be a non-empty string when calling detachEvent() for a service");
364
364
  }
@@ -372,7 +372,7 @@ sap.ui.define([
372
372
  // 2. Check and notify RTA instance if we don't want more events
373
373
  this._checkIfEventAlive(sServiceName, sEventName);
374
374
  }.bind(this),
375
- attachEventOnce: function (sEventName, fnCallback, oContext) {
375
+ attachEventOnce: function(sEventName, fnCallback, oContext) {
376
376
  function fnOnce() {
377
377
  mService.detachEvent(sEventName, fnOnce);
378
378
  fnCallback.apply(oContext, arguments);
@@ -385,26 +385,27 @@ sap.ui.define([
385
385
  mRequest.resolve(mService);
386
386
  delete this._mPendingRequests[mData.id];
387
387
  break;
388
- case 'callMethod':
389
- if (mData.status === 'success') {
388
+ case "callMethod":
389
+ if (mData.status === "success") {
390
390
  mRequest.resolve(mData.body);
391
391
  } else {
392
392
  mRequest.reject(mData.body);
393
393
  }
394
394
  delete this._mPendingRequests[mData.id];
395
395
  break;
396
- case 'subscribe':
397
- case 'unsubscribe':
396
+ case "subscribe":
397
+ case "unsubscribe":
398
398
  mRequest.resolve(mData.body);
399
399
  delete this._mPendingRequests[mData.id];
400
400
  break;
401
- // no default
401
+ default:
402
+ // no default
402
403
  }
403
404
  };
404
405
 
405
- Client.prototype._checkIfEventAlive = function (sServiceName, sEventName) {
406
+ Client.prototype._checkIfEventAlive = function(sServiceName, sEventName) {
406
407
  var oEventProvider = this._oServiceEventBus.getChannel(sServiceName);
407
- var sEventHandlerId = this._mEventHandlerIds[sServiceName + ',' + sEventName];
408
+ var sEventHandlerId = this._mEventHandlerIds[sServiceName + "," + sEventName];
408
409
 
409
410
  if (
410
411
  (!oEventProvider || !oEventProvider.hasListeners(sEventName))
@@ -414,7 +415,7 @@ sap.ui.define([
414
415
  target: this.getWindow(),
415
416
  origin: this.getOrigin(),
416
417
  channelId: CHANNEL_ID,
417
- eventId: 'unsubscribe',
418
+ eventId: "unsubscribe",
418
419
  data: {
419
420
  service: sServiceName,
420
421
  event: sEventName,
@@ -424,7 +425,7 @@ sap.ui.define([
424
425
  }
425
426
  };
426
427
 
427
- Client.prototype._receiverEvents = function (oEvent) {
428
+ Client.prototype._receiverEvents = function(oEvent) {
428
429
  if (!this._isValidMessage(oEvent)) {
429
430
  return;
430
431
  }
@@ -438,7 +439,7 @@ sap.ui.define([
438
439
  );
439
440
  };
440
441
 
441
- Client.prototype.setWindow = function (vValue) {
442
+ Client.prototype.setWindow = function(vValue) {
442
443
  if (this._bInit) {
443
444
  throw new TypeError("sap.ui.rta.Client: Window parameter cannot be changed at runtime; recreate instance of the Client.");
444
445
  }
@@ -451,12 +452,12 @@ sap.ui.define([
451
452
  throw new TypeError("sap.ui.rta.Client: Window object has to be different from the one where Client is running");
452
453
  }
453
454
 
454
- this.setProperty('window', vValue);
455
+ this.setProperty("window", vValue);
455
456
 
456
457
  return this;
457
458
  };
458
459
 
459
- Client.prototype.setOrigin = function (vValue) {
460
+ Client.prototype.setOrigin = function(vValue) {
460
461
  if (this._bInit) {
461
462
  throw new TypeError("sap.ui.rta.Client: Cannot change origin parameter at runtime; recreate instance of the Client.");
462
463
  }
@@ -465,7 +466,7 @@ sap.ui.define([
465
466
  throw new TypeError("sap.ui.rta.Client: Origin parameter is required");
466
467
  }
467
468
 
468
- if (typeof vValue !== 'string') {
469
+ if (typeof vValue !== "string") {
469
470
  throw new TypeError("sap.ui.rta.Client: Origin parameter has to be a string");
470
471
  }
471
472
 
@@ -473,7 +474,7 @@ sap.ui.define([
473
474
  throw new TypeError("sap.ui.rta.Client: Origin string is invalid");
474
475
  }
475
476
 
476
- this.setProperty('origin', vValue);
477
+ this.setProperty("origin", vValue);
477
478
 
478
479
  return this;
479
480
  };