@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
@@ -40,12 +40,12 @@ sap.ui.define([
40
40
  var vBinding;
41
41
  if (bAbsoluteAggregationBinding) {
42
42
  vBinding = oElement.getBindingInfo(sAggregationName, sModelName);
43
- //check to be model binding otherwise return undefined
43
+ // check to be model binding otherwise return undefined
44
44
  if (typeof vBinding.model === "string" && vBinding.model !== sModelName) {
45
45
  vBinding = undefined;
46
46
  }
47
47
  } else {
48
- //here we explicitly request the models binding context
48
+ // here we explicitly request the models binding context
49
49
  vBinding = oElement.getBindingContext(sModelName);
50
50
  }
51
51
  return vBinding;
@@ -61,8 +61,8 @@ sap.ui.define([
61
61
  function _flattenProperties(aProperties) {
62
62
  var aFlattenedProperties = aProperties.reduce(function(aFlattened, oProperty) {
63
63
  if (Array.isArray(oProperty.properties)) {
64
- //currently only one level supported by our dialogs, etc. => TODO make deep types possible
65
- //Only take the leaves, but attach the parent property name/label to it
64
+ // currently only one level supported by our dialogs, etc. => TODO make deep types possible
65
+ // Only take the leaves, but attach the parent property name/label to it
66
66
  aFlattened = aFlattened.concat(oProperty.properties.map(function(mInnerProp) {
67
67
  mInnerProp.parentPropertyName = oProperty.label || oProperty.name;
68
68
  return mInnerProp;
@@ -83,7 +83,7 @@ sap.ui.define([
83
83
  payload: mAction.delegateInfo.payload || {}
84
84
  };
85
85
  return mAction.delegateInfo.delegate.getPropertyInfo(mPropertyBag)
86
- .then(_flattenProperties.bind(null));
86
+ .then(_flattenProperties.bind(null));
87
87
  }
88
88
 
89
89
  function getAllPropertiesFromDelegate(oElement, sAggregationName) {
@@ -111,20 +111,20 @@ sap.ui.define([
111
111
  } else {
112
112
  fnGetAllProperties = getAllPropertiesFromDelegate.bind(null, oElement, sAggregationName);
113
113
  }
114
- return fnGetAllProperties() //arguments bound before
115
- .then(function(aProperties) {
116
- return _checkForDuplicateProperties(aProperties);
117
- });
114
+ return fnGetAllProperties() // arguments bound before
115
+ .then(function(aProperties) {
116
+ return _checkForDuplicateProperties(aProperties);
117
+ });
118
118
  }
119
119
 
120
120
  function _filterUnsupportedProperties(aProperties) {
121
121
  return aProperties.filter(function(mProperty) {
122
- //see _enrichProperty
122
+ // see _enrichProperty
123
123
  return !(mProperty.unsupported || mProperty.hideFromReveal);
124
124
  });
125
125
  }
126
126
 
127
- function _oPropertyToAdditionalElementInfo (oProperty) {
127
+ function _oPropertyToAdditionalElementInfo(oProperty) {
128
128
  return {
129
129
  selected: false,
130
130
  label: oProperty.label || oProperty.name,
@@ -132,7 +132,7 @@ sap.ui.define([
132
132
  duplicateName: oProperty.duplicateName ? oProperty.duplicateName : false,
133
133
  tooltip: oProperty.tooltip || oProperty.label,
134
134
  originalLabel: "",
135
- //command relevant data
135
+ // command relevant data
136
136
  type: "delegate",
137
137
  entityType: oProperty.entityType,
138
138
  name: oProperty.name,
@@ -140,7 +140,7 @@ sap.ui.define([
140
140
  };
141
141
  }
142
142
 
143
- function _elementToAdditionalElementInfo (mData) {
143
+ function _elementToAdditionalElementInfo(mData) {
144
144
  var oElement = mData.element;
145
145
  var mAction = mData.action;
146
146
  return {
@@ -150,8 +150,8 @@ sap.ui.define([
150
150
  parentPropertyName: oElement.__parentPropertyName ? oElement.__parentPropertyName : "",
151
151
  duplicateName: oElement.__duplicateName ? oElement.__duplicateName : false,
152
152
  originalLabel: oElement.__renamedLabel && oElement.__label !== oElement.__originalLabel ? oElement.__originalLabel : "",
153
- bindingPath: oElement.__bindingPath, //used for OPA tests and debugging
154
- //command relevant data
153
+ bindingPath: oElement.__bindingPath, // used for OPA tests and debugging
154
+ // command relevant data
155
155
  type: "invisible",
156
156
  elementId: oElement.getId(),
157
157
  sourceAggregation: mData.sourceAggregation
@@ -175,22 +175,22 @@ sap.ui.define([
175
175
  var sRelevantContainerBindingContext = _getBindingContextPath(oElement, sAggregationName, sModelName);
176
176
 
177
177
  return ElementUtil
178
- .findAllSiblingsInContainer(oElement, oRelevantContainer)
179
- // We accept only siblings that are bound on the same model
180
- .filter(function (oSiblingElement) {
181
- return sRelevantContainerBindingContext === _getBindingContextPath(oSiblingElement, sAggregationName, sModelName);
182
- });
178
+ .findAllSiblingsInContainer(oElement, oRelevantContainer)
179
+ // We accept only siblings that are bound on the same model
180
+ .filter(function(oSiblingElement) {
181
+ return sRelevantContainerBindingContext === _getBindingContextPath(oSiblingElement, sAggregationName, sModelName);
182
+ });
183
183
  }
184
184
  return [oElement];
185
185
  }
186
186
 
187
187
  function _checkForDuplicateProperties(aProperties) {
188
188
  aProperties.forEach(function(oModelProperty, index, aProperties) {
189
- if (oModelProperty["duplicateName"] !== true) {
189
+ if (oModelProperty.duplicateName !== true) {
190
190
  for (var j = index + 1; j < aProperties.length - 1; j++) {
191
191
  if (oModelProperty.label === aProperties[j].label) {
192
- oModelProperty["duplicateName"] = true;
193
- aProperties[j]["duplicateName"] = true;
192
+ oModelProperty.duplicateName = true;
193
+ aProperties[j].duplicateName = true;
194
194
  }
195
195
  }
196
196
  }
@@ -198,7 +198,7 @@ sap.ui.define([
198
198
  return aProperties;
199
199
  }
200
200
 
201
- //check for duplicate labels to later add the parent property name/label if available
201
+ // check for duplicate labels to later add the parent property name/label if available
202
202
  function _checkForDuplicateLabels(oInvisibleElement, aProperties) {
203
203
  return aProperties.some(function(oModelProperty) {
204
204
  return oModelProperty.label === oInvisibleElement.__label;
@@ -227,31 +227,31 @@ sap.ui.define([
227
227
  */
228
228
  function _findModelProperty(aControlsBindingPaths, aProperties) {
229
229
  return aProperties
230
- .sort(function (oProperty1, oProperty2) {
231
- // Temporary fix to avoid evaluating technical properties like RAP feature
232
- // control flags, might lead to problems if multiple value bindings exist
233
- // on a hidden control
234
- return !!oProperty2.hideFromReveal - !!oProperty1.hideFromReveal;
235
- })
236
- .filter(function (oModelProperty) {
237
- return aControlsBindingPaths.some(function(sBindingPath) {
238
- //there might be some deeper binding paths available on controls,
239
- //than returned by the model evaluation (e.g. navigation property paths)
240
- //in this case we only check if the navigation path is valid
241
- //unsupported: check existence of the property also in the navigation target
242
- return (
243
- sBindingPath === oModelProperty.bindingPath
244
- || sBindingPath.startsWith(oModelProperty.bindingPath + '/')
245
- );
246
- });
247
- })
248
- .pop();
230
+ .sort(function(oProperty1, oProperty2) {
231
+ // Temporary fix to avoid evaluating technical properties like RAP feature
232
+ // control flags, might lead to problems if multiple value bindings exist
233
+ // on a hidden control
234
+ return !!oProperty2.hideFromReveal - !!oProperty1.hideFromReveal;
235
+ })
236
+ .filter(function(oModelProperty) {
237
+ return aControlsBindingPaths.some(function(sBindingPath) {
238
+ // there might be some deeper binding paths available on controls,
239
+ // than returned by the model evaluation (e.g. navigation property paths)
240
+ // in this case we only check if the navigation path is valid
241
+ // unsupported: check existence of the property also in the navigation target
242
+ return (
243
+ sBindingPath === oModelProperty.bindingPath
244
+ || sBindingPath.startsWith(oModelProperty.bindingPath + "/")
245
+ );
246
+ });
247
+ })
248
+ .pop();
249
249
  }
250
250
 
251
251
  function _vBindingToPath(vBinding) {
252
252
  return (
253
253
  isPlainObject(vBinding)
254
- ? vBinding.parts[0].path //TODO what about complex bindings with multiple paths, this was not covered so far?
254
+ ? vBinding.parts[0].path // TODO what about complex bindings with multiple paths, this was not covered so far?
255
255
  : !!vBinding.getPath && vBinding.getPath()
256
256
  );
257
257
  }
@@ -284,7 +284,7 @@ sap.ui.define([
284
284
  return _getRepresentedPropertiesFromDelegate(mAction, sAggregationName)
285
285
  .then(function(aRepresentedProperties) {
286
286
  if (aRepresentedProperties === undefined) {
287
- //delegate skipped taking over => evaluate binding
287
+ // delegate skipped taking over => evaluate binding
288
288
  return _getRepresentedBindingPathsFromBinding(oElement, mAction, sModelName, sAggregationName);
289
289
  }
290
290
  var aBindingPaths = [];
@@ -295,7 +295,6 @@ sap.ui.define([
295
295
  });
296
296
  }
297
297
 
298
-
299
298
  function _getRepresentedBindingPaths(oElement, mAction, sModelName, sAggregationName) {
300
299
  return Promise.resolve().then(function() {
301
300
  var bHasDelegateAndGetRepresentedProperties = !!ObjectPath.get("delegateInfo.delegate.getRepresentedProperties", mAction);
@@ -320,7 +319,7 @@ sap.ui.define([
320
319
 
321
320
  oInvisibleElement.__tooltip = mSomeItem.tooltip;
322
321
 
323
- //found element
322
+ // found element
324
323
  oInvisibleElement.__bindingPath = mSomeItem.name;
325
324
 
326
325
  // oInvisibleElement.__label has the current label retrieved before in the analysis
@@ -345,7 +344,7 @@ sap.ui.define([
345
344
  aRepresentedProperties.some(function(oProperty) {
346
345
  if (oProperty.id === oInvisibleElement.getId()) {
347
346
  oRepresentedProperty = oProperty;
348
- return true; //skip processing
347
+ return true; // skip processing
349
348
  }
350
349
  });
351
350
  return oRepresentedProperty.bindingPaths || [];
@@ -416,8 +415,8 @@ sap.ui.define([
416
415
  }
417
416
 
418
417
  function _getModelName(mAddViaDelegate) {
419
- //ManagedObject jsdoc tells to use undefined for default model, therefore it
420
- //is necessary to return undefined if modelName or whole delegateInfo is missing
418
+ // ManagedObject jsdoc tells to use undefined for default model, therefore it
419
+ // is necessary to return undefined if modelName or whole delegateInfo is missing
421
420
  return ObjectPath.get("delegateInfo.payload.modelName", mAddViaDelegate);
422
421
  }
423
422
 
@@ -442,33 +441,33 @@ sap.ui.define([
442
441
  _getAllPropertiesFromModels(oElement, sAggregationName, mActions),
443
442
  _getRepresentedBindingPathsFromDelegateIfAvailable(mAddViaDelegate, sAggregationName)
444
443
  ])
445
- .then(function(args) {
446
- var aProperties = args[0];
447
- var aRepresentedProperties = args[1];
448
- var aAllElementData = [];
449
- var aInvisibleElements = mRevealData.elements || [];
450
-
451
- aInvisibleElements.forEach(function(mInvisibleElement) {
452
- var oInvisibleElement = mInvisibleElement.element;
453
- var mRevealAction = mInvisibleElement.action;
454
-
455
- oInvisibleElement.__label = ElementUtil.getLabelForElement(oInvisibleElement, mRevealAction.getLabel);
456
-
457
- var bIncludeElement = _enhanceByMetadata(oElement, sAggregationName, oInvisibleElement, mActions, aRepresentedProperties, aProperties);
458
-
459
- if (bIncludeElement) {
460
- aAllElementData.push({
461
- element: oInvisibleElement,
462
- action: mRevealAction,
463
- sourceAggregation: mInvisibleElement.sourceAggregation
464
- });
465
- }
466
- });
467
- return aAllElementData;
468
- })
469
- .then(function(aAllElementData) {
470
- return aAllElementData.map(_elementToAdditionalElementInfo);
444
+ .then(function(args) {
445
+ var aProperties = args[0];
446
+ var aRepresentedProperties = args[1];
447
+ var aAllElementData = [];
448
+ var aInvisibleElements = mRevealData.elements || [];
449
+
450
+ aInvisibleElements.forEach(function(mInvisibleElement) {
451
+ var oInvisibleElement = mInvisibleElement.element;
452
+ var mRevealAction = mInvisibleElement.action;
453
+
454
+ oInvisibleElement.__label = ElementUtil.getLabelForElement(oInvisibleElement, mRevealAction.getLabel);
455
+
456
+ var bIncludeElement = _enhanceByMetadata(oElement, sAggregationName, oInvisibleElement, mActions, aRepresentedProperties, aProperties);
457
+
458
+ if (bIncludeElement) {
459
+ aAllElementData.push({
460
+ element: oInvisibleElement,
461
+ action: mRevealAction,
462
+ sourceAggregation: mInvisibleElement.sourceAggregation
463
+ });
464
+ }
471
465
  });
466
+ return aAllElementData;
467
+ })
468
+ .then(function(aAllElementData) {
469
+ return aAllElementData.map(_elementToAdditionalElementInfo);
470
+ });
472
471
  },
473
472
 
474
473
  /**
@@ -479,7 +478,7 @@ sap.ui.define([
479
478
  *
480
479
  * @return {Promise} - returns a Promise which resolves with a list of available to display delegate properties
481
480
  */
482
- getUnrepresentedDelegateProperties: function (oElement, mAction) {
481
+ getUnrepresentedDelegateProperties: function(oElement, mAction) {
483
482
  var sModelName = _getModelName(mAction);
484
483
  var oDefaultAggregation = oElement.getMetadata().getAggregation();
485
484
  var sAggregationName = oDefaultAggregation ? oDefaultAggregation.name : mAction.action.aggregation;
@@ -487,29 +486,29 @@ sap.ui.define([
487
486
  _getAllPropertiesFromAddViaDelegateAction(oElement, sAggregationName, mAction),
488
487
  _getRepresentedBindingPaths(oElement, mAction, sModelName, sAggregationName)
489
488
  ])
490
- .then(function(args) {
491
- var aAllProperties = args[0];
492
- var aRepresentedBindingPaths = args[1];
493
-
494
- var fnFilter = mAction.action.filter ? mAction.action.filter : function() {return true;};
495
-
496
- var aUnrepresentedProperties = _filterUnsupportedProperties(aAllProperties);
497
- aUnrepresentedProperties = aUnrepresentedProperties.filter(function(oModelProperty) {
498
- var bIsRepresented = false;
499
- if (aRepresentedBindingPaths) {
500
- bIsRepresented = aRepresentedBindingPaths.some(function(sBindingPath) {
501
- return sBindingPath === oModelProperty.bindingPath;
502
- });
503
- }
504
- return !bIsRepresented && fnFilter(mAction.relevantContainer, oModelProperty);
505
- });
506
-
507
- aUnrepresentedProperties = _checkForDuplicateProperties(aUnrepresentedProperties);
508
-
509
- return aUnrepresentedProperties;
510
- }).then(function(aUnrepresentedProperties) {
511
- return aUnrepresentedProperties.map(_oPropertyToAdditionalElementInfo);
489
+ .then(function(args) {
490
+ var aAllProperties = args[0];
491
+ var aRepresentedBindingPaths = args[1];
492
+
493
+ var fnFilter = mAction.action.filter ? mAction.action.filter : function() {return true;};
494
+
495
+ var aUnrepresentedProperties = _filterUnsupportedProperties(aAllProperties);
496
+ aUnrepresentedProperties = aUnrepresentedProperties.filter(function(oModelProperty) {
497
+ var bIsRepresented = false;
498
+ if (aRepresentedBindingPaths) {
499
+ bIsRepresented = aRepresentedBindingPaths.some(function(sBindingPath) {
500
+ return sBindingPath === oModelProperty.bindingPath;
501
+ });
502
+ }
503
+ return !bIsRepresented && fnFilter(mAction.relevantContainer, oModelProperty);
512
504
  });
505
+
506
+ aUnrepresentedProperties = _checkForDuplicateProperties(aUnrepresentedProperties);
507
+
508
+ return aUnrepresentedProperties;
509
+ }).then(function(aUnrepresentedProperties) {
510
+ return aUnrepresentedProperties.map(_oPropertyToAdditionalElementInfo);
511
+ });
513
512
  }
514
513
  };
515
514
  return oAnalyzer;