@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
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @author SAP SE
29
29
  * @experimental Since 1.58
30
30
  * @since 1.58
31
- * @version 1.115.1
31
+ * @version 1.117.0
32
32
  * @private
33
33
  * @ui5-restricted
34
34
  */
@@ -92,7 +92,7 @@ sap.ui.define([
92
92
  * @return {object} Object containing properties, annotations, label and name
93
93
  * @private
94
94
  */
95
- oProperty._getDesignTimeProperties = function (sControlId) {
95
+ oProperty._getDesignTimeProperties = function(sControlId) {
96
96
  var oOverlay = OverlayRegistry.getOverlay(sControlId);
97
97
  // if overlay could not be found
98
98
  if (!oOverlay) {
@@ -117,16 +117,16 @@ sap.ui.define([
117
117
  oProperty._getResolvedLinks(oDesignTimeMetadataData.links, oElement)
118
118
  ]
119
119
  )
120
- .then(function (aPromiseResults) {
121
- return Object.assign(
122
- {},
123
- aPromiseResults[0] && !isEmptyObject(aPromiseResults[0]) && {annotations: aPromiseResults[0]},
124
- aPromiseResults[1] && {properties: aPromiseResults[1]},
125
- aPromiseResults[2] && {label: validate(aPromiseResults[2])},
126
- oDesignTimeMetadataData.name && {name: oDesignTimeMetadata.getName(oElement)},
127
- !isEmptyObject(aPromiseResults[3]) && {links: aPromiseResults[3]}
128
- );
129
- });
120
+ .then(function(aPromiseResults) {
121
+ return Object.assign(
122
+ {},
123
+ aPromiseResults[0] && !isEmptyObject(aPromiseResults[0]) && {annotations: aPromiseResults[0]},
124
+ aPromiseResults[1] && {properties: aPromiseResults[1]},
125
+ aPromiseResults[2] && {label: validate(aPromiseResults[2])},
126
+ oDesignTimeMetadataData.name && {name: oDesignTimeMetadata.getName(oElement)},
127
+ !isEmptyObject(aPromiseResults[3]) && {links: aPromiseResults[3]}
128
+ );
129
+ });
130
130
  };
131
131
 
132
132
  /**
@@ -140,75 +140,75 @@ sap.ui.define([
140
140
  * @return {object} Promise resolving to an object containing all properties consolidated
141
141
  * @private
142
142
  */
143
- oProperty._getConsolidatedProperties = function (vDtProperties, mMetadataObj, oElement) {
143
+ oProperty._getConsolidatedProperties = function(vDtProperties, mMetadataObj, oElement) {
144
144
  var mFilteredMetadataObject = Object.keys(mMetadataObj)
145
- .reduce(function (mFiltered, sKey) {
146
- mFiltered[sKey] = {
147
- value: validate(oElement.getProperty(sKey)),
148
- virtual: false,
149
- type: mMetadataObj[sKey].type,
150
- name: mMetadataObj[sKey].name,
151
- ignore: false, // default value, might be overwritten below if required by designtime metadata
152
- group: mMetadataObj[sKey].group,
153
- deprecated: mMetadataObj[sKey].deprecated,
154
- defaultValue: mMetadataObj[sKey].defaultValue,
155
- visibility: mMetadataObj[sKey].visibility
156
- };
157
- var mBindingInfo = oProperty._getBindingInfo(sKey, oElement);
158
- Object.assign(
159
- mFiltered[sKey],
160
- mBindingInfo && {binding: mBindingInfo}
161
- );
162
- return mFiltered;
163
- }, {});
145
+ .reduce(function(mFiltered, sKey) {
146
+ mFiltered[sKey] = {
147
+ value: validate(oElement.getProperty(sKey)),
148
+ virtual: false,
149
+ type: mMetadataObj[sKey].type,
150
+ name: mMetadataObj[sKey].name,
151
+ ignore: false, // default value, might be overwritten below if required by designtime metadata
152
+ group: mMetadataObj[sKey].group,
153
+ deprecated: mMetadataObj[sKey].deprecated,
154
+ defaultValue: mMetadataObj[sKey].defaultValue,
155
+ visibility: mMetadataObj[sKey].visibility
156
+ };
157
+ var mBindingInfo = oProperty._getBindingInfo(sKey, oElement);
158
+ Object.assign(
159
+ mFiltered[sKey],
160
+ mBindingInfo && {binding: mBindingInfo}
161
+ );
162
+ return mFiltered;
163
+ }, {});
164
164
 
165
165
  return oProperty._getResolvedFunction(vDtProperties, oElement)
166
- .then(function(mDtObj) {
167
- return Promise.all(
168
- // for each property in the mDtObj.properties a promise is returned
169
- Object.keys(mDtObj)
170
- .map(function (sKey) {
171
- return oProperty._getResolvedFunction(mDtObj[sKey].ignore, oElement)
172
- .then(function (bIgnore) {
173
- if (typeof bIgnore !== "boolean") {
174
- throw DtUtil.createError(
175
- "services.Property#get",
176
- "Invalid ignore property value found in designtime for element with id " + oElement.getId() + " .", "sap.ui.rta"
177
- );
178
- }
166
+ .then(function(mDtObj) {
167
+ return Promise.all(
168
+ // for each property in the mDtObj.properties a promise is returned
169
+ Object.keys(mDtObj)
170
+ .map(function(sKey) {
171
+ return oProperty._getResolvedFunction(mDtObj[sKey].ignore, oElement)
172
+ .then(function(bIgnore) {
173
+ if (typeof bIgnore !== "boolean") {
174
+ throw DtUtil.createError(
175
+ "services.Property#get",
176
+ "Invalid ignore property value found in designtime for element with id " + oElement.getId() + " .", "sap.ui.rta"
177
+ );
178
+ }
179
179
 
180
- var mResult = {};
180
+ var mResult = {};
181
181
 
182
- // ensure ignore function is replaced by a boolean value
183
- if (!mFilteredMetadataObject[sKey]) {
184
- // if not available in control metadata
185
- if (mDtObj[sKey].virtual === true) {
186
- // virtual properties
187
- mResult = oProperty._getEvaluatedVirtualProperty(mDtObj, sKey, oElement, bIgnore);
188
- } else {
189
- // dt-metadata properties
190
- mResult[sKey] = {
191
- value: validate(_omit(mDtObj[sKey], "ignore")),
192
- virtual: false,
193
- ignore: bIgnore
194
- };
195
- }
196
- } else {
197
- mResult[sKey] = {
198
- ignore: bIgnore
199
- };
200
- }
182
+ // ensure ignore function is replaced by a boolean value
183
+ if (!mFilteredMetadataObject[sKey]) {
184
+ // if not available in control metadata
185
+ if (mDtObj[sKey].virtual === true) {
186
+ // virtual properties
187
+ mResult = oProperty._getEvaluatedVirtualProperty(mDtObj, sKey, oElement, bIgnore);
188
+ } else {
189
+ // dt-metadata properties
190
+ mResult[sKey] = {
191
+ value: validate(_omit(mDtObj[sKey], "ignore")),
192
+ virtual: false,
193
+ ignore: bIgnore
194
+ };
195
+ }
196
+ } else {
197
+ mResult[sKey] = {
198
+ ignore: bIgnore
199
+ };
200
+ }
201
201
 
202
- return mResult;
203
- });
204
- })
205
- );
206
- })
207
- .then(function (aFilteredResults) {
208
- return aFilteredResults.reduce(function (mConsolidatedObject, oFilteredResult) {
209
- return merge(mConsolidatedObject, oFilteredResult);
210
- }, mFilteredMetadataObject);
211
- });
202
+ return mResult;
203
+ });
204
+ })
205
+ );
206
+ })
207
+ .then(function(aFilteredResults) {
208
+ return aFilteredResults.reduce(function(mConsolidatedObject, oFilteredResult) {
209
+ return merge(mConsolidatedObject, oFilteredResult);
210
+ }, mFilteredMetadataObject);
211
+ });
212
212
  };
213
213
 
214
214
  /**
@@ -237,16 +237,16 @@ sap.ui.define([
237
237
 
238
238
  // evaluate possibleValues
239
239
  return oProperty._getResolvedFunction(mDtObj[sPropertyName].possibleValues, oElement)
240
- .then(function(vPossibleValues) {
241
- Object.assign(
242
- mEvaluatedProperty[sPropertyName],
243
- mBindingInfo && {binding: mBindingInfo},
244
- vPossibleValues && {possibleValues: validate(vPossibleValues)},
245
- typeof mDtObj[sPropertyName].nullable === "boolean" && {nullable: mDtObj[sPropertyName].nullable} // nullable property
246
- );
240
+ .then(function(vPossibleValues) {
241
+ Object.assign(
242
+ mEvaluatedProperty[sPropertyName],
243
+ mBindingInfo && {binding: mBindingInfo},
244
+ vPossibleValues && {possibleValues: validate(vPossibleValues)},
245
+ typeof mDtObj[sPropertyName].nullable === "boolean" && {nullable: mDtObj[sPropertyName].nullable} // nullable property
246
+ );
247
247
 
248
- return mEvaluatedProperty;
249
- });
248
+ return mEvaluatedProperty;
249
+ });
250
250
  };
251
251
 
252
252
  /**
@@ -259,39 +259,39 @@ sap.ui.define([
259
259
  * @return {Promise} Promise resolving to an object containing all annotations consolidated
260
260
  * @private
261
261
  */
262
- oProperty._getConsolidatedAnnotations = function (mDtObj, oElement) {
262
+ oProperty._getConsolidatedAnnotations = function(mDtObj, oElement) {
263
263
  return Promise.all(
264
264
  Object.keys(mDtObj)
265
- .map(function (sKey) {
266
- return oProperty._getResolvedFunction(mDtObj[sKey].ignore, oElement)
267
- .then(function (bIgnore) {
268
- var mFiltered = {};
269
- if (typeof bIgnore !== "boolean" && typeof bIgnore !== "undefined") {
270
- throw DtUtil.createError(
271
- "services.Property#get",
272
- "Invalid ignore property value found in designtime for element with id " + oElement.getId() + " .", "sap.ui.rta"
273
- );
274
- }
275
- // to ensure ignore function is replaced by a boolean value
276
- mDtObj[sKey].ignore = bIgnore;
277
- if (!bIgnore) {
278
- mFiltered[sKey] = Object.assign({}, mDtObj[sKey]);
279
- return oProperty._getResolvedLinks(mFiltered[sKey].links, oElement)
280
- .then(function (mLinks) {
281
- if (!isEmptyObject(mLinks)) {
282
- mFiltered[sKey].links = mLinks;
283
- }
284
- return mFiltered;
285
- });
265
+ .map(function(sKey) {
266
+ return oProperty._getResolvedFunction(mDtObj[sKey].ignore, oElement)
267
+ .then(function(bIgnore) {
268
+ var mFiltered = {};
269
+ if (typeof bIgnore !== "boolean" && typeof bIgnore !== "undefined") {
270
+ throw DtUtil.createError(
271
+ "services.Property#get",
272
+ "Invalid ignore property value found in designtime for element with id " + oElement.getId() + " .", "sap.ui.rta"
273
+ );
274
+ }
275
+ // to ensure ignore function is replaced by a boolean value
276
+ mDtObj[sKey].ignore = bIgnore;
277
+ if (!bIgnore) {
278
+ mFiltered[sKey] = Object.assign({}, mDtObj[sKey]);
279
+ return oProperty._getResolvedLinks(mFiltered[sKey].links, oElement)
280
+ .then(function(mLinks) {
281
+ if (!isEmptyObject(mLinks)) {
282
+ mFiltered[sKey].links = mLinks;
286
283
  }
284
+ return mFiltered;
287
285
  });
288
- })
286
+ }
287
+ });
288
+ })
289
289
  )
290
- .then(function (aFilteredResults) {
291
- return aFilteredResults.reduce(function (mConsolidatedObject, oFilteredResult) {
292
- return Object.assign(mConsolidatedObject, oFilteredResult);
293
- }, {});
294
- });
290
+ .then(function(aFilteredResults) {
291
+ return aFilteredResults.reduce(function(mConsolidatedObject, oFilteredResult) {
292
+ return Object.assign(mConsolidatedObject, oFilteredResult);
293
+ }, {});
294
+ });
295
295
  };
296
296
 
297
297
  /**
@@ -315,30 +315,30 @@ sap.ui.define([
315
315
  * @return {Promise} Promise resolving to links map
316
316
  * @private
317
317
  */
318
- oProperty._getResolvedLinks = function (mLinks, oElement) {
318
+ oProperty._getResolvedLinks = function(mLinks, oElement) {
319
319
  var aTextPromises = [];
320
320
  var mResolvedLinks = Object.assign({}, mLinks);
321
321
 
322
- Object.keys(mResolvedLinks).forEach(function (sLinkName) {
322
+ Object.keys(mResolvedLinks).forEach(function(sLinkName) {
323
323
  if (Array.isArray(mResolvedLinks[sLinkName])) {
324
- mResolvedLinks[sLinkName].forEach(function (oLink) {
324
+ mResolvedLinks[sLinkName].forEach(function(oLink) {
325
325
  aTextPromises.push(
326
- DtUtil.wrapIntoPromise(function () {
326
+ DtUtil.wrapIntoPromise(function() {
327
327
  if (typeof oLink.text === "function") {
328
328
  return oLink.text(oElement);
329
329
  }
330
330
  })(oLink)
331
- .then(function (sLinkText) {
332
- oLink.text = validate(sLinkText || oLink.text);
333
- })
331
+ .then(function(sLinkText) {
332
+ oLink.text = validate(sLinkText || oLink.text);
333
+ })
334
334
  );
335
335
  });
336
336
  }
337
337
  });
338
338
  return Promise.all(aTextPromises)
339
- .then(function () {
340
- return mResolvedLinks;
341
- });
339
+ .then(function() {
340
+ return mResolvedLinks;
341
+ });
342
342
  };
343
343
 
344
344
  /**
@@ -350,7 +350,7 @@ sap.ui.define([
350
350
  * @return {object} Object containing the binding information
351
351
  * @private
352
352
  */
353
- oProperty._getBindingInfo = function (sKey, oElement) {
353
+ oProperty._getBindingInfo = function(sKey, oElement) {
354
354
  var mPropertyBindingInfo = oElement.getBindingInfo(sKey);
355
355
  if (!mPropertyBindingInfo) {
356
356
  return;
@@ -395,8 +395,8 @@ sap.ui.define([
395
395
  * @return {Promise} Promise resolving to the property value
396
396
  * @private
397
397
  */
398
- oProperty._getResolvedFunction = function (vProperty, oElement) {
399
- return DtUtil.wrapIntoPromise(function () {
398
+ oProperty._getResolvedFunction = function(vProperty, oElement) {
399
+ return DtUtil.wrapIntoPromise(function() {
400
400
  return typeof vProperty === "function"
401
401
  ? (vProperty(oElement) || false) // could return a promise
402
402
  : (vProperty || false);
@@ -8,32 +8,32 @@ sap.ui.define([
8
8
  "sap/ui/core/postmessage/Bus",
9
9
  "sap/ui/dt/Util",
10
10
  "sap/base/util/uid"
11
- ], function (
11
+ ], function(
12
12
  PostMessageBus,
13
13
  DtUtil,
14
14
  uid
15
15
  ) {
16
16
  "use strict";
17
17
 
18
- var CHANNEL_ID = 'sap.ui.rta.service.receiver';
18
+ var CHANNEL_ID = "sap.ui.rta.service.receiver";
19
19
  var oPostMessageBus;
20
20
 
21
- return function (oRta) {
21
+ return function(oRta) {
22
22
  var mEventHandlers = {};
23
23
 
24
- var fnReceiver = function (oEvent) {
24
+ var fnReceiver = function(oEvent) {
25
25
  var mData = oEvent.data;
26
26
  var mRequestBody = mData.body;
27
27
 
28
28
  switch (oEvent.eventId) {
29
29
  case "getService":
30
30
  var sServiceName = mRequestBody.arguments[0];
31
- oRta.getService(sServiceName).then(function (oService) {
31
+ oRta.getService(sServiceName).then(function(oService) {
32
32
  var mProperties = {};
33
33
  var aMethods = [];
34
34
 
35
- Object.keys(oService).forEach(function (sKey) {
36
- if (typeof oService[sKey] === 'function') {
35
+ Object.keys(oService).forEach(function(sKey) {
36
+ if (typeof oService[sKey] === "function") {
37
37
  if (!/^(at|de)tach/.test(sKey)) { // ignore system methods
38
38
  aMethods.push(sKey);
39
39
  }
@@ -59,33 +59,11 @@ sap.ui.define([
59
59
  });
60
60
  });
61
61
  break;
62
- case 'callMethod':
62
+ case "callMethod":
63
63
  oRta.getService(mRequestBody.service)
64
- .then(function (oService) {
65
- oService[mRequestBody.method].apply(null, mRequestBody.arguments)
66
- .then(function (vResult) {
67
- oPostMessageBus.publish({
68
- target: oEvent.source,
69
- origin: oEvent.origin,
70
- channelId: CHANNEL_ID,
71
- eventId: 'callMethod',
72
- data: {
73
- type: 'response',
74
- status: 'success',
75
- id: mData.id,
76
- body: vResult
77
- }
78
- });
79
- });
80
- })
81
- .catch(function (vError) {
82
- var oError = DtUtil.propagateError(
83
- vError,
84
- "service.Receiver",
85
- DtUtil.printf("Can't execute method {0} of service {1} due unexpected error.", mRequestBody.method, mRequestBody.service),
86
- "sap.ui.rta"
87
- );
88
-
64
+ .then(function(oService) {
65
+ oService[mRequestBody.method].apply(null, mRequestBody.arguments)
66
+ .then(function(vResult) {
89
67
  oPostMessageBus.publish({
90
68
  target: oEvent.source,
91
69
  origin: oEvent.origin,
@@ -93,69 +71,92 @@ sap.ui.define([
93
71
  eventId: "callMethod",
94
72
  data: {
95
73
  type: "response",
96
- status: "error",
74
+ status: "success",
97
75
  id: mData.id,
98
- body: oError.toString()
76
+ body: vResult
99
77
  }
100
78
  });
101
79
  });
80
+ })
81
+ .catch(function(vError) {
82
+ var oError = DtUtil.propagateError(
83
+ vError,
84
+ "service.Receiver",
85
+ DtUtil.printf("Can't execute method {0} of service {1} due unexpected error.", mRequestBody.method, mRequestBody.service),
86
+ "sap.ui.rta"
87
+ );
88
+
89
+ oPostMessageBus.publish({
90
+ target: oEvent.source,
91
+ origin: oEvent.origin,
92
+ channelId: CHANNEL_ID,
93
+ eventId: "callMethod",
94
+ data: {
95
+ type: "response",
96
+ status: "error",
97
+ id: mData.id,
98
+ body: oError.toString()
99
+ }
100
+ });
101
+ });
102
102
  break;
103
- case 'subscribe':
103
+ case "subscribe":
104
104
  oRta.getService(mRequestBody.service)
105
- .then(function (oService) {
106
- var fnHandler = function (vData) {
107
- oPostMessageBus.publish({
108
- target: oEvent.source,
109
- origin: oEvent.origin,
110
- channelId: CHANNEL_ID,
111
- eventId: 'event',
112
- data: {
113
- body: {
114
- service: mRequestBody.service,
115
- event: mRequestBody.event,
116
- data: vData
117
- }
118
- }
119
- });
120
- };
121
- var sHandlerId = uid();
122
- mEventHandlers[sHandlerId] = fnHandler;
123
- oService.attachEvent(mRequestBody.event, fnHandler);
105
+ .then(function(oService) {
106
+ var fnHandler = function(vData) {
124
107
  oPostMessageBus.publish({
125
108
  target: oEvent.source,
126
109
  origin: oEvent.origin,
127
110
  channelId: CHANNEL_ID,
128
- eventId: 'subscribe',
111
+ eventId: "event",
129
112
  data: {
130
- type: 'response',
131
- status: 'success',
132
- id: mData.id,
133
113
  body: {
134
- id: sHandlerId
114
+ service: mRequestBody.service,
115
+ event: mRequestBody.event,
116
+ data: vData
135
117
  }
136
118
  }
137
119
  });
120
+ };
121
+ var sHandlerId = uid();
122
+ mEventHandlers[sHandlerId] = fnHandler;
123
+ oService.attachEvent(mRequestBody.event, fnHandler);
124
+ oPostMessageBus.publish({
125
+ target: oEvent.source,
126
+ origin: oEvent.origin,
127
+ channelId: CHANNEL_ID,
128
+ eventId: "subscribe",
129
+ data: {
130
+ type: "response",
131
+ status: "success",
132
+ id: mData.id,
133
+ body: {
134
+ id: sHandlerId
135
+ }
136
+ }
138
137
  });
138
+ });
139
139
  break;
140
- case 'unsubscribe':
140
+ case "unsubscribe":
141
141
  oRta.getService(mRequestBody.service)
142
- .then(function (oService) {
143
- oService.detachEvent(mRequestBody.event, mEventHandlers[mRequestBody.id]);
144
- delete mEventHandlers[mRequestBody.id];
145
- oPostMessageBus.publish({
146
- target: oEvent.source,
147
- origin: oEvent.origin,
148
- channelId: CHANNEL_ID,
149
- eventId: 'unsubscribe',
150
- data: {
151
- type: 'response',
152
- status: 'success',
153
- id: mData.id
154
- }
155
- });
142
+ .then(function(oService) {
143
+ oService.detachEvent(mRequestBody.event, mEventHandlers[mRequestBody.id]);
144
+ delete mEventHandlers[mRequestBody.id];
145
+ oPostMessageBus.publish({
146
+ target: oEvent.source,
147
+ origin: oEvent.origin,
148
+ channelId: CHANNEL_ID,
149
+ eventId: "unsubscribe",
150
+ data: {
151
+ type: "response",
152
+ status: "success",
153
+ id: mData.id
154
+ }
156
155
  });
156
+ });
157
157
  break;
158
- // no default
158
+ default:
159
+ // no default
159
160
  }
160
161
  };
161
162
 
@@ -171,7 +172,7 @@ sap.ui.define([
171
172
  oPostMessageBus.subscribe(CHANNEL_ID, "unsubscribe", fnReceiver);
172
173
 
173
174
  return {
174
- destroy: function () {
175
+ destroy: function() {
175
176
  if (oPostMessageBus) {
176
177
  oPostMessageBus.unsubscribe(CHANNEL_ID, "getService", fnReceiver);
177
178
  oPostMessageBus.unsubscribe(CHANNEL_ID, "callMethod", fnReceiver);
@@ -4,7 +4,7 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
7
- sap.ui.define(function () {
7
+ sap.ui.define(function() {
8
8
  "use strict";
9
9
 
10
10
  /**
@@ -15,21 +15,21 @@ sap.ui.define(function () {
15
15
  * @author SAP SE
16
16
  * @experimental Since 1.58
17
17
  * @since 1.58
18
- * @version 1.115.1
18
+ * @version 1.117.0
19
19
  * @private
20
20
  * @ui5-restricted
21
21
  */
22
22
 
23
- return function (oRta, fnPublish) {
23
+ return function(oRta, fnPublish) {
24
24
  var oSelectionManager = oRta._oDesignTime.getSelectionManager();
25
25
 
26
26
  function getControlIds(aElementOverlays) {
27
- return aElementOverlays.map(function (oElementOverlay) {
27
+ return aElementOverlays.map(function(oElementOverlay) {
28
28
  return oElementOverlay.getElement().getId();
29
29
  });
30
30
  }
31
31
 
32
- oSelectionManager.attachEvent("change", function (oEvent) {
32
+ oSelectionManager.attachEvent("change", function(oEvent) {
33
33
  fnPublish("change", getControlIds(oEvent.getParameter("selection")));
34
34
  });
35
35
 
@@ -48,7 +48,7 @@ sap.ui.define(function () {
48
48
  * @return {string[]} Selected control IDs
49
49
  * @public
50
50
  */
51
- get: function () {
51
+ get: function() {
52
52
  return getControlIds(oSelectionManager.get());
53
53
  },
54
54