@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
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * handled by the AdditionalElements Plugin (Reveal, Add Via Delegate, Add Custom)
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.115.1
35
+ * @version 1.117.0
36
36
  * @private
37
37
  * @since 1.94
38
38
  * @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
@@ -44,14 +44,14 @@ sap.ui.define([
44
44
  var aRequiredLibraries = DelegateMediatorAPI.getKnownDefaultDelegateLibraries();
45
45
  aRequiredLibraries.forEach(function(sLibrary) {
46
46
  var oLoadLibraryPromise = sap.ui.getCore().loadLibrary(sLibrary, { async: true })
47
- .then(function() {
48
- return Promise.resolve(sLibrary);
49
- })
50
- .catch(function(vError) {
51
- Log.warning("Required library not available: ", vError);
52
- // Ignore the error here as the default delegate might not be required
53
- return Promise.resolve();
54
- });
47
+ .then(function() {
48
+ return Promise.resolve(sLibrary);
49
+ })
50
+ .catch(function(vError) {
51
+ Log.warning("Required library not available: ", vError);
52
+ // Ignore the error here as the default delegate might not be required
53
+ return Promise.resolve();
54
+ });
55
55
  aLoadLibraryPromises.push(oLoadLibraryPromise);
56
56
  });
57
57
  return Promise.all(aLoadLibraryPromises);
@@ -59,27 +59,28 @@ sap.ui.define([
59
59
 
60
60
  function getAddViaDelegateActionData(mAction, oDesignTimeMetadata, oPlugin) {
61
61
  return oPlugin.hasChangeHandler(mAction.changeType, mAction.element)
62
- .then(function (bHasChangeHandler) {
63
- if (bHasChangeHandler) {
64
- return {
65
- aggregationName: mAction.aggregation,
66
- addPropertyActionData: {
67
- designTimeMetadata: oDesignTimeMetadata,
68
- action: mAction,
69
- delegateInfo: {
70
- payload: mAction.delegateInfo.payload || {},
71
- delegate: mAction.delegateInfo.instance,
72
- modelType: mAction.delegateInfo.modelType,
73
- requiredLibraries: mAction.delegateInfo.requiredLibraries
74
- }
62
+ .then(function(bHasChangeHandler) {
63
+ if (bHasChangeHandler) {
64
+ return {
65
+ aggregationName: mAction.aggregation,
66
+ addPropertyActionData: {
67
+ designTimeMetadata: oDesignTimeMetadata,
68
+ action: mAction,
69
+ delegateInfo: {
70
+ payload: mAction.delegateInfo.payload || {},
71
+ delegate: mAction.delegateInfo.instance,
72
+ modelType: mAction.delegateInfo.modelType,
73
+ requiredLibraries: mAction.delegateInfo.requiredLibraries,
74
+ delegateType: mAction.delegateInfo.delegateType
75
75
  }
76
- };
77
- }
78
- return undefined;
79
- });
76
+ }
77
+ };
78
+ }
79
+ return undefined;
80
+ });
80
81
  }
81
82
 
82
- function getInvisibleElements (oParentOverlay, sAggregationName, oPlugin) {
83
+ function getInvisibleElements(oParentOverlay, sAggregationName, oPlugin) {
83
84
  var oParentElement = oParentOverlay.getElement();
84
85
  if (!oParentElement) {
85
86
  return [];
@@ -132,7 +133,7 @@ sap.ui.define([
132
133
  function isValidAction(oCheckElementOverlay, mParents, mAction, oPlugin) {
133
134
  var bValidAction = mAction.changeType && oPlugin.hasStableId(oCheckElementOverlay);
134
135
  if (bValidAction && oCheckElementOverlay !== mParents.relevantContainerOverlay) {
135
- //relevant container is needed for some changes, so it must have a stable ID
136
+ // relevant container is needed for some changes, so it must have a stable ID
136
137
  bValidAction = oPlugin.hasStableId(mParents.relevantContainerOverlay);
137
138
  }
138
139
  return bValidAction;
@@ -146,39 +147,45 @@ sap.ui.define([
146
147
  if (bValidAction) {
147
148
  mAction.element = oCheckElement;
148
149
  return DelegateMediatorAPI.getDelegateForControl({
149
- control: mParents.relevantContainer, //delegate will always be added on the relevant container
150
+ control: mParents.relevantContainer, // delegate will always be added on the relevant container
150
151
  modifier: JsControlTreeModifier,
151
152
  supportsDefault: mAction.supportsDefaultDelegate
152
153
  })
153
- .then(function(mDelegateInfo) {
154
- if (mDelegateInfo && mDelegateInfo.names && mDelegateInfo.names.length) {
155
- var aRequiredLibraries = DelegateMediatorAPI.getRequiredLibrariesForDefaultDelegate({
156
- delegateName: mDelegateInfo.names,
157
- control: mParents.relevantContainer
158
- });
159
-
160
- // Check if all required libraries were successfully loaded
161
- if (
162
- difference(
163
- aRequiredLibraries,
164
- aDefaultDelegateLibraries.filter(Boolean)
165
- ).length === 0
166
- ) {
167
- mAction.delegateInfo = mDelegateInfo;
168
- aFilteredActions.push(mAction);
169
- }
154
+ .then(function(mDelegateInfo) {
155
+ // Only complete delegators can be used for additional elements
156
+ if (
157
+ mDelegateInfo &&
158
+ mDelegateInfo.names &&
159
+ mDelegateInfo.names.length &&
160
+ mDelegateInfo.delegateType === DelegateMediatorAPI.types.COMPLETE
161
+ ) {
162
+ var aRequiredLibraries = DelegateMediatorAPI.getRequiredLibrariesForDefaultDelegate({
163
+ delegateName: mDelegateInfo.names,
164
+ control: mParents.relevantContainer
165
+ });
166
+
167
+ // Check if all required libraries were successfully loaded
168
+ if (
169
+ difference(
170
+ aRequiredLibraries,
171
+ aDefaultDelegateLibraries.filter(Boolean)
172
+ ).length === 0
173
+ ) {
174
+ mAction.delegateInfo = mDelegateInfo;
175
+ aFilteredActions.push(mAction);
170
176
  }
171
- return aFilteredActions;
172
- });
177
+ }
178
+ return aFilteredActions;
179
+ });
173
180
  }
174
181
  return aFilteredActions;
175
182
  }
176
183
 
177
- return aActions.reduce(function (oPreviousActionsPromise, mAction) {
184
+ return aActions.reduce(function(oPreviousActionsPromise, mAction) {
178
185
  return oPreviousActionsPromise
179
- .then(function(aFilteredActions) {
180
- return fnFilterActions(aFilteredActions, mAction);
181
- });
186
+ .then(function(aFilteredActions) {
187
+ return fnFilterActions(aFilteredActions, mAction);
188
+ });
182
189
  }, Promise.resolve([]));
183
190
  }
184
191
 
@@ -237,7 +244,7 @@ sap.ui.define([
237
244
  var mParents = AdditionalElementsUtils.getParents(true, oOverlay, oPlugin);
238
245
  if (bHasChangeHandler) {
239
246
  if (mRevealAction.changeOnRelevantContainer) {
240
- //we have the child overlay, so we need the parents
247
+ // we have the child overlay, so we need the parents
241
248
  bRevealEnabled = oPlugin.hasStableId(mParents.relevantContainerOverlay)
242
249
  && oPlugin.hasStableId(mParents.parentOverlay);
243
250
  } else {
@@ -320,7 +327,7 @@ sap.ui.define([
320
327
  oRevealActionsPromise,
321
328
  oAddPropertyActionsPromise
322
329
  ]).then(function(aAllActions) {
323
- //join and condense all action data
330
+ // join and condense all action data
324
331
  var mAllActions = merge(aAllActions[0], aAllActions[1]);
325
332
  oSourceElementOverlay._mAddActions = oSourceElementOverlay._mAddActions || {asSibling: {}, asChild: {}};
326
333
  oSourceElementOverlay._mAddActions[sSiblingOrChild] = mAllActions;
@@ -364,7 +371,7 @@ sap.ui.define([
364
371
  if (mParents.relevantContainer !== mParents.parent) {
365
372
  aParents = ElementUtil.findAllSiblingsInContainer(mParents.parent, mParents.relevantContainer).map(function(oParent) {
366
373
  return OverlayRegistry.getOverlay(oParent);
367
- }).filter(function (oOverlay) {
374
+ }).filter(function(oOverlay) {
368
375
  return oOverlay;
369
376
  });
370
377
  }
@@ -384,12 +391,12 @@ sap.ui.define([
384
391
  return getRevealActionFromAggregations(aParents, mReveal, sAggregationName, aAggregationNames, oPlugin);
385
392
  });
386
393
  }, Promise.resolve({}))
387
- .then(function(mAggregatedReveal) {
388
- if (bSibling) {
389
- mRevealCache[mParents.parentOverlay.getId()] = mAggregatedReveal;
390
- }
391
- return mAggregatedReveal;
392
- });
394
+ .then(function(mAggregatedReveal) {
395
+ if (bSibling) {
396
+ mRevealCache[mParents.parentOverlay.getId()] = mAggregatedReveal;
397
+ }
398
+ return mAggregatedReveal;
399
+ });
393
400
  }
394
401
  return Promise.resolve({});
395
402
  };
@@ -406,32 +413,32 @@ sap.ui.define([
406
413
  var mParents = AdditionalElementsUtils.getParents(bSibling, oSourceElementOverlay, oPlugin);
407
414
  var oDesignTimeMetadata = mParents.parentOverlay && mParents.parentOverlay.getDesignTimeMetadata();
408
415
  return Promise.resolve()
409
- .then(function() {
410
- var aActions = oDesignTimeMetadata ? oDesignTimeMetadata.getActionDataFromAggregations("add", mParents.parent, undefined, "delegate") : [];
411
- if (aActions.length) {
412
- return loadKnownDefaultDelegateLibraries()
413
- .then(filterValidAddPropertyActions.bind(this, aActions, mParents, oPlugin));
414
- }
415
- return [];
416
- }.bind(this))
417
- .then(function(aActions) {
418
- return aActions.reduce(function (oPreviousPromise, oAction) {
419
- return oPreviousPromise
420
- .then(function (oReturn) {
421
- return getAddViaDelegateActionData.call(this, oAction, oDesignTimeMetadata, oPlugin)
422
- .then(function (mAction) {
423
- if (mAction) {
424
- mAction.addPropertyActionData.relevantContainer = mParents.relevantContainer;
425
- if (!oReturn[mAction.aggregationName]) {
426
- oReturn[mAction.aggregationName] = {};
427
- }
428
- oReturn[mAction.aggregationName].addViaDelegate = mAction.addPropertyActionData;
429
- }
430
- return oReturn;
431
- });
432
- }.bind(this));
433
- }.bind(this), Promise.resolve({}));
434
- }.bind(this));
416
+ .then(function() {
417
+ var aActions = oDesignTimeMetadata ? oDesignTimeMetadata.getActionDataFromAggregations("add", mParents.parent, undefined, "delegate") : [];
418
+ if (aActions.length) {
419
+ return loadKnownDefaultDelegateLibraries()
420
+ .then(filterValidAddPropertyActions.bind(this, aActions, mParents, oPlugin));
421
+ }
422
+ return [];
423
+ }.bind(this))
424
+ .then(function(aActions) {
425
+ return aActions.reduce(function(oPreviousPromise, oAction) {
426
+ return oPreviousPromise
427
+ .then(function(oReturn) {
428
+ return getAddViaDelegateActionData.call(this, oAction, oDesignTimeMetadata, oPlugin)
429
+ .then(function(mAction) {
430
+ if (mAction) {
431
+ mAction.addPropertyActionData.relevantContainer = mParents.relevantContainer;
432
+ if (!oReturn[mAction.aggregationName]) {
433
+ oReturn[mAction.aggregationName] = {};
434
+ }
435
+ oReturn[mAction.aggregationName].addViaDelegate = mAction.addPropertyActionData;
436
+ }
437
+ return oReturn;
438
+ });
439
+ }.bind(this));
440
+ }.bind(this), Promise.resolve({}));
441
+ }.bind(this));
435
442
  };
436
443
 
437
444
  return ActionExtractor;
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @class Context - Dialog for available Fields in Runtime Authoring
33
33
  * @extends sap.ui.base.ManagedObject
34
34
  * @author SAP SE
35
- * @version 1.115.1
35
+ * @version 1.117.0
36
36
  * @constructor
37
37
  * @private
38
38
  * @since 1.44
@@ -83,10 +83,10 @@ sap.ui.define([
83
83
  customFieldVisible: false,
84
84
  businessContextVisible: false,
85
85
  customFieldButtonTooltip: "",
86
- businessContextTexts: [{text: ""}] //empty element in first place, to be replaced by the headerText (see: addExtensionData)
86
+ businessContextTexts: [{text: ""}] // empty element in first place, to be replaced by the headerText (see: addExtensionData)
87
87
  });
88
88
 
89
- this._oDialogPromise.then(function (oDialog) {
89
+ this._oDialogPromise.then(function(oDialog) {
90
90
  oDialog.setModel(this._oDialogModel);
91
91
  if (!oRTAResourceModel) {
92
92
  oRTAResourceModel = new ResourceModel({bundleName: "sap.ui.rta.messagebundle"});
@@ -97,8 +97,8 @@ sap.ui.define([
97
97
 
98
98
  this._oDialogModel.setProperty("/listNoDataText", oRTAResourceModel.getProperty("MSG_NO_FIELDS").toLowerCase());
99
99
 
100
- //retrieve List to set the sorting for the 'items' aggregation, since sap.ui.model.Sorter
101
- //does not support binding to a model property...
100
+ // retrieve List to set the sorting for the 'items' aggregation, since sap.ui.model.Sorter
101
+ // does not support binding to a model property...
102
102
  this._oList = sap.ui.getCore().byId(this.getId() + "--rta_addElementsDialogList");
103
103
  this._bDescendingSortOrder = false;
104
104
  }.bind(this));
@@ -127,21 +127,21 @@ sap.ui.define([
127
127
  oDialog.close();
128
128
  this._fnResolveOnDialogConfirm();
129
129
  }.bind(this));
130
- //indicate that the dialog has been closed and the selected fields (if any) are to be added to the UI
130
+ // indicate that the dialog has been closed and the selected fields (if any) are to be added to the UI
131
131
  };
132
132
 
133
133
  /**
134
134
  * Close dialog. All sections will be reverted
135
135
  */
136
136
  AddElementsDialog.prototype._cancelDialog = function() {
137
- //clear all selections
137
+ // clear all selections
138
138
  this._oDialogModel.getObject("/elements").forEach(function(oElem) {
139
139
  oElem.selected = false;
140
140
  });
141
141
  this._oDialogPromise.then(function(oDialog) {
142
142
  oDialog.close();
143
143
  });
144
- //indicate that the dialog has been closed without choosing to add any fields (canceled)
144
+ // indicate that the dialog has been closed without choosing to add any fields (canceled)
145
145
  this._fnRejectOnDialogCancel();
146
146
  };
147
147
 
@@ -184,7 +184,7 @@ sap.ui.define([
184
184
  *
185
185
  * @private
186
186
  */
187
- AddElementsDialog.prototype._resortList = function () {
187
+ AddElementsDialog.prototype._resortList = function() {
188
188
  this._bDescendingSortOrder = !this._bDescendingSortOrder;
189
189
  var oBinding = this._oList.getBinding("items");
190
190
  var aSorter = [];
@@ -219,7 +219,7 @@ sap.ui.define([
219
219
  *
220
220
  * @private
221
221
  */
222
- AddElementsDialog.prototype._redirectToCustomFieldCreation = function () {
222
+ AddElementsDialog.prototype._redirectToCustomFieldCreation = function() {
223
223
  this.fireOpenCustomField();
224
224
  this._oDialogPromise.then(function(oDialog) {
225
225
  oDialog.close();
@@ -261,31 +261,31 @@ sap.ui.define([
261
261
  * @returns {Promise<undefined>} A promise resolving to undefined
262
262
  * @public
263
263
  */
264
- AddElementsDialog.prototype.addExtensionData = function (aExtensionData) {
265
- //clear old values from last run
264
+ AddElementsDialog.prototype.addExtensionData = function(aExtensionData) {
265
+ // clear old values from last run
266
266
  this._removeExtensionDataTexts();
267
267
 
268
268
  var aBusinessContextTexts = this._oDialogModel.getObject("/businessContextTexts");
269
269
  if (aExtensionData && aExtensionData.length > 0) {
270
- aExtensionData.forEach(function (oContext) {
270
+ aExtensionData.forEach(function(oContext) {
271
271
  aBusinessContextTexts.push({
272
272
  text: oContext.description
273
273
  });
274
274
  }, this);
275
275
  } else {
276
- //Message "none" when no extension data is available
276
+ // Message "none" when no extension data is available
277
277
  aBusinessContextTexts.push({
278
278
  text: oRTAResourceModel.getProperty("MSG_NO_BUSINESS_CONTEXTS")
279
279
  });
280
280
  }
281
- //set the container visible
281
+ // set the container visible
282
282
  this._setBusinessContextVisible(true);
283
283
 
284
284
  return FieldExtensibility.getTexts().then(function(oFieldExtensibilityTexts) {
285
285
  if (oFieldExtensibilityTexts) {
286
286
  this._oDialogModel.setProperty("/customFieldButtonTooltip", oFieldExtensibilityTexts.tooltip);
287
- //the first entry is always the "header" to be set by the implementation of FieldExtensibility
288
- //it is set during the instantiation of the model, in the 'init' function
287
+ // the first entry is always the "header" to be set by the implementation of FieldExtensibility
288
+ // it is set during the instantiation of the model, in the 'init' function
289
289
  this._oDialogModel.setProperty("/businessContextTexts/0/text", oFieldExtensibilityTexts.headerText);
290
290
  }
291
291
  }.bind(this));
@@ -296,7 +296,7 @@ sap.ui.define([
296
296
  * (except for the title)
297
297
  * @private
298
298
  */
299
- AddElementsDialog.prototype._removeExtensionDataTexts = function () {
299
+ AddElementsDialog.prototype._removeExtensionDataTexts = function() {
300
300
  var aBusinessContextTexts = this._oDialogModel.getObject("/businessContextTexts");
301
301
  aBusinessContextTexts.splice(1);
302
302
  };