@openui5/sap.ui.rta 1.92.0 → 1.93.3

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 (142) hide show
  1. package/{.eslintrc → .eslintrc.json} +0 -0
  2. package/.reuse/dep5 +5 -0
  3. package/THIRDPARTY.txt +10 -1
  4. package/package.json +6 -6
  5. package/src/sap/ui/rta/.library +1 -1
  6. package/src/sap/ui/rta/Client.js +1 -1
  7. package/src/sap/ui/rta/RuntimeAuthoring.js +10 -2
  8. package/src/sap/ui/rta/Utils.js +1 -1
  9. package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
  10. package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +1 -2
  11. package/src/sap/ui/rta/command/AddIFrame.js +1 -1
  12. package/src/sap/ui/rta/command/AddProperty.js +1 -1
  13. package/src/sap/ui/rta/command/AddXML.js +1 -1
  14. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
  15. package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
  16. package/src/sap/ui/rta/command/BaseCommand.js +1 -1
  17. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  18. package/src/sap/ui/rta/command/Combine.js +1 -1
  19. package/src/sap/ui/rta/command/CommandFactory.js +146 -125
  20. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  21. package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
  22. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  23. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
  24. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
  25. package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
  26. package/src/sap/ui/rta/command/CreateContainer.js +1 -1
  27. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  28. package/src/sap/ui/rta/command/FlexCommand.js +25 -14
  29. package/src/sap/ui/rta/command/LREPSerializer.js +25 -24
  30. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  31. package/src/sap/ui/rta/command/Move.js +1 -1
  32. package/src/sap/ui/rta/command/Property.js +1 -1
  33. package/src/sap/ui/rta/command/Remove.js +1 -1
  34. package/src/sap/ui/rta/command/Rename.js +1 -1
  35. package/src/sap/ui/rta/command/Reveal.js +1 -1
  36. package/src/sap/ui/rta/command/Settings.js +1 -1
  37. package/src/sap/ui/rta/command/Split.js +1 -1
  38. package/src/sap/ui/rta/command/Stack.js +2 -1
  39. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
  40. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  41. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  42. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  43. package/src/sap/ui/rta/enablement/TestDelegate.js +47 -37
  44. package/src/sap/ui/rta/enablement/elementActionTest.js +29 -33
  45. package/src/sap/ui/rta/library.js +2 -2
  46. package/src/sap/ui/rta/messagebundle.properties +18 -0
  47. package/src/sap/ui/rta/messagebundle_ar.properties +9 -0
  48. package/src/sap/ui/rta/messagebundle_bg.properties +9 -0
  49. package/src/sap/ui/rta/messagebundle_ca.properties +9 -0
  50. package/src/sap/ui/rta/messagebundle_cs.properties +9 -0
  51. package/src/sap/ui/rta/messagebundle_cy.properties +9 -0
  52. package/src/sap/ui/rta/messagebundle_da.properties +9 -0
  53. package/src/sap/ui/rta/messagebundle_de.properties +9 -0
  54. package/src/sap/ui/rta/messagebundle_el.properties +9 -0
  55. package/src/sap/ui/rta/messagebundle_en.properties +9 -0
  56. package/src/sap/ui/rta/messagebundle_en_GB.properties +9 -0
  57. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +9 -0
  58. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +9 -0
  59. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +9 -0
  60. package/src/sap/ui/rta/messagebundle_es.properties +9 -0
  61. package/src/sap/ui/rta/messagebundle_es_MX.properties +9 -0
  62. package/src/sap/ui/rta/messagebundle_et.properties +9 -0
  63. package/src/sap/ui/rta/messagebundle_fi.properties +9 -0
  64. package/src/sap/ui/rta/messagebundle_fr.properties +9 -0
  65. package/src/sap/ui/rta/messagebundle_fr_CA.properties +9 -0
  66. package/src/sap/ui/rta/messagebundle_hi.properties +9 -0
  67. package/src/sap/ui/rta/messagebundle_hr.properties +9 -0
  68. package/src/sap/ui/rta/messagebundle_hu.properties +9 -0
  69. package/src/sap/ui/rta/messagebundle_id.properties +9 -0
  70. package/src/sap/ui/rta/messagebundle_it.properties +9 -0
  71. package/src/sap/ui/rta/messagebundle_iw.properties +9 -0
  72. package/src/sap/ui/rta/messagebundle_ja.properties +9 -0
  73. package/src/sap/ui/rta/messagebundle_kk.properties +9 -0
  74. package/src/sap/ui/rta/messagebundle_ko.properties +9 -0
  75. package/src/sap/ui/rta/messagebundle_lt.properties +9 -0
  76. package/src/sap/ui/rta/messagebundle_lv.properties +9 -0
  77. package/src/sap/ui/rta/messagebundle_ms.properties +9 -0
  78. package/src/sap/ui/rta/messagebundle_nl.properties +9 -0
  79. package/src/sap/ui/rta/messagebundle_no.properties +9 -0
  80. package/src/sap/ui/rta/messagebundle_pl.properties +9 -0
  81. package/src/sap/ui/rta/messagebundle_pt.properties +9 -0
  82. package/src/sap/ui/rta/messagebundle_pt_PT.properties +9 -0
  83. package/src/sap/ui/rta/messagebundle_ro.properties +9 -0
  84. package/src/sap/ui/rta/messagebundle_ru.properties +9 -0
  85. package/src/sap/ui/rta/messagebundle_sh.properties +9 -0
  86. package/src/sap/ui/rta/messagebundle_sk.properties +9 -0
  87. package/src/sap/ui/rta/messagebundle_sl.properties +9 -0
  88. package/src/sap/ui/rta/messagebundle_sv.properties +9 -0
  89. package/src/sap/ui/rta/messagebundle_th.properties +9 -0
  90. package/src/sap/ui/rta/messagebundle_tr.properties +9 -0
  91. package/src/sap/ui/rta/messagebundle_uk.properties +9 -0
  92. package/src/sap/ui/rta/messagebundle_vi.properties +9 -0
  93. package/src/sap/ui/rta/messagebundle_zh_CN.properties +9 -0
  94. package/src/sap/ui/rta/messagebundle_zh_TW.properties +9 -0
  95. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
  96. package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
  97. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  98. package/src/sap/ui/rta/plugin/ControlVariant.js +1 -1
  99. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
  100. package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
  101. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  102. package/src/sap/ui/rta/plugin/EasyAdd.js +1 -1
  103. package/src/sap/ui/rta/plugin/EasyRemove.js +1 -1
  104. package/src/sap/ui/rta/plugin/LocalReset.js +2 -10
  105. package/src/sap/ui/rta/plugin/Plugin.js +1 -1
  106. package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
  107. package/src/sap/ui/rta/plugin/Remove.js +1 -1
  108. package/src/sap/ui/rta/plugin/Rename.js +1 -1
  109. package/src/sap/ui/rta/plugin/RenameHandler.js +1 -1
  110. package/src/sap/ui/rta/plugin/Selection.js +1 -1
  111. package/src/sap/ui/rta/plugin/Settings.js +1 -1
  112. package/src/sap/ui/rta/plugin/Split.js +1 -1
  113. package/src/sap/ui/rta/plugin/Stretch.js +2 -1
  114. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
  115. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +6 -5
  116. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +14 -5
  117. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
  118. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +1 -1
  119. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
  120. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +25 -4
  121. package/src/sap/ui/rta/service/Action.js +1 -1
  122. package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
  123. package/src/sap/ui/rta/service/Outline.js +1 -1
  124. package/src/sap/ui/rta/service/Property.js +1 -1
  125. package/src/sap/ui/rta/service/Selection.js +1 -1
  126. package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +12 -0
  127. package/src/sap/ui/rta/toolbar/Adaptation.js +10 -3
  128. package/src/sap/ui/rta/toolbar/Base.js +15 -10
  129. package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
  130. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  131. package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
  132. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  133. package/src/sap/ui/rta/toolbar/translation/DownloadTranslationDialog.fragment.xml +39 -0
  134. package/src/sap/ui/rta/toolbar/translation/Translation.js +115 -0
  135. package/src/sap/ui/rta/toolbar/translation/TranslationPopover.fragment.xml +19 -0
  136. package/src/sap/ui/rta/util/BindingsExtractor.js +14 -7
  137. package/src/sap/ui/rta/util/PluginManager.js +1 -1
  138. package/src/sap/ui/rta/util/PopupManager.js +1 -1
  139. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  140. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -1
  141. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
  142. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +3 -1
@@ -4,22 +4,23 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  sap.ui.define([
7
+ "sap/base/util/merge",
8
+ "sap/base/Log",
7
9
  "sap/ui/base/ManagedObject",
8
10
  "sap/ui/dt/ElementUtil",
9
11
  "sap/ui/dt/OverlayRegistry",
10
- "sap/ui/fl/Utils",
11
- "sap/ui/fl/Layer",
12
12
  "sap/ui/dt/Util",
13
- "sap/base/util/merge"
14
- ],
15
- function(
13
+ "sap/ui/fl/Utils",
14
+ "sap/ui/fl/Layer"
15
+ ], function(
16
+ merge,
17
+ Log,
16
18
  ManagedObject,
17
19
  ElementUtil,
18
20
  OverlayRegistry,
19
- FlexUtils,
20
- Layer,
21
21
  DtUtil,
22
- merge
22
+ FlexUtils,
23
+ Layer
23
24
  ) {
24
25
  "use strict";
25
26
 
@@ -71,14 +72,17 @@ function(
71
72
  }
72
73
  }
73
74
 
74
- function configureActionCommand(oElement, oCommand, vAction) {
75
+ function configureActionCommand(oCommand, vAction) {
75
76
  var sChangeType;
76
77
  var bJsOnly = false;
77
- if (typeof (vAction) === "string") {
78
+ var bVariantIndependent = false;
79
+
80
+ if (typeof vAction === "string") {
78
81
  sChangeType = vAction;
79
- } else {
80
- sChangeType = vAction && vAction.changeType;
81
- bJsOnly = vAction && vAction.jsOnly;
82
+ } else if (vAction) {
83
+ sChangeType = vAction.changeType;
84
+ bJsOnly = vAction.jsOnly === true;
85
+ bVariantIndependent = vAction.CAUTION_variantIndependent === true;
82
86
  }
83
87
 
84
88
  if (!sChangeType) {
@@ -87,6 +91,11 @@ function(
87
91
 
88
92
  oCommand.setChangeType(sChangeType);
89
93
  oCommand.setJsOnly(bJsOnly);
94
+ if (oCommand.setVariantIndependent) {
95
+ oCommand.setVariantIndependent(bVariantIndependent);
96
+ } else {
97
+ Log.error("the variant independent Flag is not available for the action used in: ", sChangeType);
98
+ }
90
99
  return true;
91
100
  }
92
101
 
@@ -95,7 +104,7 @@ function(
95
104
  changeType: mSettings.name
96
105
  };
97
106
  if (oDesignTimeMetadata) {
98
- jQuery.extend(oAction, oDesignTimeMetadata.getAction(mSettings.name, oElement));
107
+ Object.assign(oAction, oDesignTimeMetadata.getAction(mSettings.name, oElement));
99
108
  }
100
109
  return oAction;
101
110
  }
@@ -244,205 +253,219 @@ function(
244
253
  function configureCustomAddCommand(oElement, mSettings, oDesignTimeMetadata) {
245
254
  var oAddAction = oDesignTimeMetadata.getAction("add", mSettings.element);
246
255
  if (oAddAction && oAddAction.custom && typeof oAddAction.custom.getItems === "function") {
247
- var oAction = {
256
+ var oAction = Object.assign(oAddAction.custom, {
248
257
  changeOnRelevantContainer: mSettings.changeOnRelevantContainer,
249
258
  changeType: mSettings.changeType
250
- };
259
+ });
251
260
  delete mSettings["changeOnRelevantContainer"]; // this property is not required for a sap.ui.rta.command.CustomAdd
252
261
  return oAction;
253
262
  }
263
+ return undefined;
254
264
  }
255
265
 
256
- var mCommands = { // Command names camel case with first char lower case
266
+ function configureAddIFrame(oElement, mSettings, oDesignTimeMetadata) {
267
+ return oDesignTimeMetadata.getAction("addIFrame", mSettings.element) || oDesignTimeMetadata.getActionDataFromAggregations("addIFrame", mSettings.element)[0];
268
+ }
269
+
270
+ function configureBindPropertyCommand() {
271
+ return "propertyBindingChange";
272
+ }
273
+
274
+ function configurePropertyCommand() {
275
+ return "propertyChange";
276
+ }
277
+
278
+ var mCommands = { // Command names lower camel case
257
279
  composite: {
258
- clazz: "sap.ui.rta.command.CompositeCommand",
280
+ clazz: "sap/ui/rta/command/CompositeCommand",
259
281
  noSelector: true
260
282
  },
261
283
  property: {
262
- clazz: "sap.ui.rta.command.Property",
263
- adjustForBinding: adjustSelectorForCommand
284
+ clazz: "sap/ui/rta/command/Property",
285
+ adjustForBinding: adjustSelectorForCommand,
286
+ configure: configurePropertyCommand
264
287
  },
265
288
  bindProperty: {
266
- clazz: "sap.ui.rta.command.BindProperty"
289
+ clazz: "sap/ui/rta/command/BindProperty",
290
+ configure: configureBindPropertyCommand
267
291
  },
268
292
  addXML: {
269
- clazz: "sap.ui.rta.command.AddXML",
293
+ clazz: "sap/ui/rta/command/AddXML",
270
294
  configure: configureAddXmlCommand,
271
295
  adjustForBinding: adjustSelectorForCommand
272
296
  },
273
297
  addXMLAtExtensionPoint: {
274
- clazz: "sap.ui.rta.command.AddXMLAtExtensionPoint",
298
+ clazz: "sap/ui/rta/command/AddXMLAtExtensionPoint",
275
299
  configure: configureAddXmlCommand,
276
300
  adjustForBinding: adjustSelectorForCommand
277
301
  },
278
302
  createContainer: {
279
- clazz: "sap.ui.rta.command.CreateContainer",
303
+ clazz: "sap/ui/rta/command/CreateContainer",
280
304
  configure: configureCreateContainerCommand,
281
305
  adjustForBinding: adjustCreateContainerCommand
282
306
  },
283
307
  move: {
284
- clazz: "sap.ui.rta.command.Move",
308
+ clazz: "sap/ui/rta/command/Move",
285
309
  configure: configureMoveCommand,
286
310
  adjustForBinding: adjustMoveCommand
287
311
  },
288
312
  remove: {
289
- clazz: "sap.ui.rta.command.Remove",
313
+ clazz: "sap/ui/rta/command/Remove",
290
314
  configure: configureRemoveCommand,
291
315
  adjustForBinding: adjustRemoveCommand
292
316
  },
293
317
  localReset: {
294
- clazz: "sap.ui.rta.command.LocalReset",
318
+ clazz: "sap/ui/rta/command/LocalReset",
295
319
  configure: configureLocalResetCommand
296
320
  },
297
321
  rename: {
298
- clazz: "sap.ui.rta.command.Rename",
322
+ clazz: "sap/ui/rta/command/Rename",
299
323
  configure: configureRenameCommand,
300
324
  adjustForBinding: adjustRenameCommand
301
325
  },
302
326
  addDelegateProperty: {
303
- clazz: "sap.ui.rta.command.AddProperty",
327
+ clazz: "sap/ui/rta/command/AddProperty",
304
328
  configure: configureAddDelegatePropertyCommand,
305
329
  adjustForBinding: adjustAddPropertyCommand
306
330
  },
307
331
  reveal: {
308
- clazz: "sap.ui.rta.command.Reveal",
332
+ clazz: "sap/ui/rta/command/Reveal",
309
333
  configure: configureRevealCommand,
310
334
  adjustForBinding: adjustRevealCommand
311
335
  },
312
336
  customAdd: {
313
- clazz: "sap.ui.rta.command.CustomAdd",
337
+ clazz: "sap/ui/rta/command/CustomAdd",
314
338
  configure: configureCustomAddCommand
315
339
  },
316
340
  combine: {
317
- clazz: "sap.ui.rta.command.Combine",
341
+ clazz: "sap/ui/rta/command/Combine",
318
342
  configure: configureCombineCommand,
319
343
  adjustForBinding: adjustCombineCommand
320
344
  },
321
345
  split: {
322
- clazz: "sap.ui.rta.command.Split",
346
+ clazz: "sap/ui/rta/command/Split",
323
347
  configure: configureSplitCommand,
324
348
  adjustForBinding: adjustSplitCommand
325
349
  },
326
350
  "switch": {
327
- clazz: "sap.ui.rta.command.ControlVariantSwitch"
351
+ clazz: "sap/ui/rta/command/ControlVariantSwitch"
328
352
  },
329
353
  save: {
330
- clazz: "sap.ui.rta.command.ControlVariantSave"
354
+ clazz: "sap/ui/rta/command/ControlVariantSave"
331
355
  },
332
356
  saveAs: {
333
- clazz: "sap.ui.rta.command.ControlVariantSaveAs"
357
+ clazz: "sap/ui/rta/command/ControlVariantSaveAs"
334
358
  },
335
359
  setTitle: {
336
- clazz: "sap.ui.rta.command.ControlVariantSetTitle"
360
+ clazz: "sap/ui/rta/command/ControlVariantSetTitle"
337
361
  },
338
362
  configure: {
339
- clazz: "sap.ui.rta.command.ControlVariantConfigure"
363
+ clazz: "sap/ui/rta/command/ControlVariantConfigure"
340
364
  },
341
365
  settings: {
342
- clazz: "sap.ui.rta.command.Settings"
366
+ clazz: "sap/ui/rta/command/Settings"
343
367
  },
344
368
  addLibrary: {
345
- clazz: "sap.ui.rta.command.appDescriptor.AddLibrary",
369
+ clazz: "sap/ui/rta/command/appDescriptor/AddLibrary",
346
370
  noSelector: true
347
371
  },
348
372
  appDescriptor: {
349
- clazz: "sap.ui.rta.command.AppDescriptorCommand",
373
+ clazz: "sap/ui/rta/command/AppDescriptorCommand",
350
374
  noSelector: true
351
375
  },
352
376
  addIFrame: {
353
- clazz: "sap.ui.rta.command.AddIFrame"
377
+ clazz: "sap/ui/rta/command/AddIFrame",
378
+ configure: configureAddIFrame
354
379
  },
355
380
  compVariantSaveAs: {
356
- clazz: "sap.ui.rta.command.compVariant.CompVariantSaveAs"
381
+ clazz: "sap/ui/rta/command/compVariant/CompVariantSaveAs"
357
382
  },
358
383
  compVariantSwitch: {
359
- clazz: "sap.ui.rta.command.compVariant.CompVariantSwitch"
384
+ clazz: "sap/ui/rta/command/compVariant/CompVariantSwitch"
360
385
  },
361
386
  compVariantUpdate: {
362
- clazz: "sap.ui.rta.command.compVariant.CompVariantUpdate"
387
+ clazz: "sap/ui/rta/command/compVariant/CompVariantUpdate"
363
388
  }
364
389
  };
365
390
 
366
- function _getCommandFor(vElement, sCommand, mSettings, oDesignTimeMetadata, mFlexSettings, sVariantManagementReference) {
391
+ function getCommandFor(vElement, sCommand, mSettings, oDesignTimeMetadata, mFlexSettings, sVariantManagementReference) {
392
+ var oCommand;
367
393
  sCommand = sCommand[0].toLowerCase() + sCommand.slice(1); // first char of command name is lower case
368
394
  var mCommand = mCommands[sCommand];
369
395
  var mAllFlexSettings = mFlexSettings;
370
396
 
371
397
  if (!mCommand) {
372
- return Promise.reject(DtUtil.createError("CommandFactory#_getCommandFor", "Command '" + sCommand + "' doesn't exist, check typing", "sap.ui.rta"));
398
+ return Promise.reject(DtUtil.createError("CommandFactory#getCommandFor", "Command '" + sCommand + "' doesn't exist, check typing", "sap.ui.rta"));
373
399
  }
374
400
 
375
401
  return new Promise(function (fnResolve) {
376
402
  var sClassName = mCommand.clazz;
377
- sap.ui.require([sClassName.replace(/\./g, "/")], function (Command) {
403
+ sap.ui.require([sClassName], function (Command) {
378
404
  fnResolve(Command);
379
405
  });
380
406
  })
381
407
 
382
- .then(function (Command) {
383
- var bIsUiElement = vElement instanceof ManagedObject;
408
+ .then(function (Command) {
409
+ var bIsUiElement = vElement instanceof ManagedObject;
384
410
 
385
- // only sap.ui.rta.command.FlexCommand requires a selector property
386
- if (!mCommand.noSelector) {
387
- mSettings = Object.assign({}, mSettings, !bIsUiElement && {selector: vElement});
388
- }
411
+ // only sap.ui.rta.command.FlexCommand requires a selector property
412
+ if (!mCommand.noSelector) {
413
+ mSettings = Object.assign({}, mSettings, !bIsUiElement && {selector: vElement});
414
+ }
389
415
 
390
- mSettings = Object.assign({}, mSettings, {
391
- element: bIsUiElement ? vElement : undefined,
392
- name: sCommand
393
- });
416
+ mSettings = Object.assign({}, mSettings, {
417
+ element: bIsUiElement ? vElement : undefined,
418
+ name: sCommand
419
+ });
394
420
 
395
- var oAction;
396
- if (mCommand.configure) {
397
- oAction = mCommand.configure(vElement, mSettings, oDesignTimeMetadata);
398
- }
421
+ var oAction;
422
+ if (mCommand.configure) {
423
+ oAction = mCommand.configure(vElement, mSettings, oDesignTimeMetadata);
424
+ }
399
425
 
400
- var oElementOverlay;
401
- if (bIsUiElement) {
402
- oElementOverlay = OverlayRegistry.getOverlay(vElement);
403
- }
426
+ var oElementOverlay;
427
+ if (bIsUiElement) {
428
+ oElementOverlay = OverlayRegistry.getOverlay(vElement);
429
+ }
404
430
 
405
- if (oAction && oAction.changeOnRelevantContainer) {
406
- Object.assign(mSettings, {
407
- element: oElementOverlay.getRelevantContainer()
408
- });
409
- vElement = mSettings.element;
410
- oElementOverlay = OverlayRegistry.getOverlay(vElement);
411
- }
431
+ if (oAction && oAction.changeOnRelevantContainer) {
432
+ Object.assign(mSettings, {
433
+ element: oElementOverlay.getRelevantContainer()
434
+ });
435
+ vElement = mSettings.element;
436
+ oElementOverlay = OverlayRegistry.getOverlay(vElement);
437
+ }
412
438
 
413
- var mTemplateSettings;
414
- if (oElementOverlay && vElement.sParentAggregationName) {
415
- mTemplateSettings = evaluateTemplateBinding(oElementOverlay);
416
- }
439
+ var mTemplateSettings;
440
+ if (oElementOverlay && vElement.sParentAggregationName) {
441
+ mTemplateSettings = evaluateTemplateBinding(oElementOverlay);
442
+ }
417
443
 
418
- if (mTemplateSettings) {
419
- if (mCommand.adjustForBinding) {
420
- mCommand.adjustForBinding(mSettings);
421
- }
422
- mAllFlexSettings = merge(mTemplateSettings, mAllFlexSettings);
444
+ if (mTemplateSettings) {
445
+ if (mCommand.adjustForBinding) {
446
+ mCommand.adjustForBinding(mSettings);
423
447
  }
448
+ mAllFlexSettings = merge(mTemplateSettings, mAllFlexSettings);
449
+ }
424
450
 
425
- var oCommand = new Command(mSettings);
451
+ oCommand = new Command(mSettings);
426
452
 
427
- var bSuccessfullyConfigured = true; //configuration is optional
428
- if (mCommand.configure) {
429
- bSuccessfullyConfigured = configureActionCommand(vElement, oCommand, oAction);
430
- }
453
+ var bSuccessfullyConfigured = true; //configuration is optional
454
+ if (mCommand.configure) {
455
+ bSuccessfullyConfigured = configureActionCommand(oCommand, oAction);
456
+ }
431
457
 
432
- if (bSuccessfullyConfigured) {
433
- return Promise.resolve()
434
- .then(function () {
435
- return oCommand.prepare(mAllFlexSettings, sVariantManagementReference, sCommand);
436
- })
437
- .then(function (bPrepareStatus) {
438
- if (bPrepareStatus) {
439
- return oCommand;
440
- }
441
- });
442
- }
443
- oCommand.destroy();
444
- return undefined;
445
- });
458
+ if (bSuccessfullyConfigured) {
459
+ return oCommand.prepare(mAllFlexSettings, sVariantManagementReference, sCommand);
460
+ }
461
+ return undefined;
462
+ }).then(function(bPrepareStatus) {
463
+ if (bPrepareStatus) {
464
+ return oCommand;
465
+ }
466
+ oCommand.destroy();
467
+ return undefined;
468
+ });
446
469
  }
447
470
 
448
471
  /**
@@ -452,7 +475,7 @@ function(
452
475
  * @extends sap.ui.base.ManagedObject
453
476
  *
454
477
  * @author SAP SE
455
- * @version 1.92.0
478
+ * @version 1.93.3
456
479
  *
457
480
  * @constructor
458
481
  * @private
@@ -468,9 +491,7 @@ function(
468
491
  flexSettings: {
469
492
  type: "object"
470
493
  }
471
- },
472
- associations: {},
473
- events: {}
494
+ }
474
495
  }
475
496
  });
476
497
 
@@ -482,39 +503,39 @@ function(
482
503
  };
483
504
 
484
505
  /**
485
- * Setter for flexSettings
506
+ * Setter for flexSettings. Extends the current flex Settings by the passed object
486
507
  *
487
- * @param {Object} [mFlexSettings] property bag. See {@link sap.ui.rta.RuntimeAuthoring#setFlexSettings} method for more information
508
+ * @param {Object} [mFlexSettings] - Property bag. See {@link sap.ui.rta.RuntimeAuthoring#setFlexSettings} method for more information
488
509
  */
489
510
  CommandFactory.prototype.setFlexSettings = function (mFlexSettings) {
490
- this.setProperty("flexSettings", jQuery.extend(this.getFlexSettings(), mFlexSettings));
511
+ this.setProperty("flexSettings", Object.assign(this.getFlexSettings(), mFlexSettings));
491
512
  };
492
513
 
493
514
  /**
494
515
  * Instance-specific method for generating command
495
- * @param {sap.ui.core.Element|string} vElement - could be either an element or a slector for the element for which the command is to be created
496
- * @param {string} sCommand - command type
497
- * @param {object} mSettings - initial settings for the new command (command specific settings, looks diffrent for each and every command)
498
- * @param {sap.ui.dt.DesignTimeMetadata} oDesignTimeMetadata - contains the action used in the command
499
- * @param {string} sVariantManagementReference - variant management reference
516
+ * @param {sap.ui.core.Element|string} vElement - Could be either an element or a slector for the element for which the command is to be created
517
+ * @param {string} sCommand - Command type
518
+ * @param {object} mSettings - Initial settings for the new command (command specific settings, looks diffrent for each and every command)
519
+ * @param {sap.ui.dt.DesignTimeMetadata} oDesignTimeMetadata - Contains the action used in the command
520
+ * @param {string} sVariantManagementReference - Variant management reference
500
521
  * @returns {Promise} A promise which will return the created command
501
522
  */
502
523
  CommandFactory.prototype.getCommandFor = function (vElement, sCommand, mSettings, oDesignTimeMetadata, sVariantManagementReference) {
503
- return _getCommandFor(vElement, sCommand, mSettings, oDesignTimeMetadata, this.getFlexSettings(), sVariantManagementReference);
524
+ return getCommandFor(vElement, sCommand, mSettings, oDesignTimeMetadata, this.getFlexSettings(), sVariantManagementReference);
504
525
  };
505
526
 
506
527
  /**
507
528
  * Static method for generating command
508
- * @param {sap.ui.Element|string} vElement - could be either an element or a slector for the element for which the command is to be created
509
- * @param {string} sCommand - command type
510
- * @param {object} mSettings - initial settings for the new command (command specific settings, looks diffrent for each and every command)
511
- * @param {sap.ui.dt.DesignTimeMetadata} oDesignTimeMetadata - contains the action used in the command
512
- * @param {Object} [mFlexSettings] property bag
513
- * @param {String} [mFlexSettings.layer] The Layer in which RTA should be started. Default: "CUSTOMER"
514
- * @param {Boolean} [mFlexSettings.developerMode] Whether RTA is started in DeveloperMode Mode. Whether RTA is started in DeveloperMode Mode
515
- * @param {String} [mFlexSettings.baseId] base ID of the app
516
- * @param {String} [mFlexSettings.projectId] project ID
517
- * @param {String} [mFlexSettings.scenario] Key representing the current scenario
529
+ * @param {sap.ui.Element|string} vElement - Could be either an element or a slector for the element for which the command is to be created
530
+ * @param {string} sCommand - Command type
531
+ * @param {object} mSettings - Initial settings for the new command (command specific settings, looks diffrent for each and every command)
532
+ * @param {sap.ui.dt.DesignTimeMetadata} oDesignTimeMetadata - Contains the action used in the command
533
+ * @param {Object} [mFlexSettings] - Property bag
534
+ * @param {String} [mFlexSettings.layer] - The Layer in which RTA should be started. Default: "CUSTOMER"
535
+ * @param {Boolean} [mFlexSettings.developerMode] - Whether RTA is started in DeveloperMode Mode. Whether RTA is started in DeveloperMode Mode
536
+ * @param {String} [mFlexSettings.baseId] - Base ID of the app
537
+ * @param {String} [mFlexSettings.projectId] - Project ID
538
+ * @param {String} [mFlexSettings.scenario] - Key representing the current scenario
518
539
  * @returns {Promise} A promise which will return the created command
519
540
  */
520
541
  CommandFactory.getCommandFor = function (vElement, sCommand, mSettings, oDesignTimeMetadata, mFlexSettings) {
@@ -531,7 +552,7 @@ function(
531
552
  mFlexSettings.namespace = sLRepRootNamespace + "changes/";
532
553
  }
533
554
 
534
- return _getCommandFor(vElement, sCommand, mSettings, oDesignTimeMetadata, mFlexSettings);
555
+ return getCommandFor(vElement, sCommand, mSettings, oDesignTimeMetadata, mFlexSettings);
535
556
  };
536
557
 
537
558
  return CommandFactory;
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @extends sap.ui.rta.command.BaseCommand
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.92.0
22
+ * @version 1.93.3
23
23
  *
24
24
  * @constructor
25
25
  * @private
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  * @class
21
21
  * @extends sap.ui.rta.command.BaseCommand
22
22
  * @author SAP SE
23
- * @version 1.92.0
23
+ * @version 1.93.3
24
24
  * @constructor
25
25
  * @private
26
26
  * @since 1.52
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  * @class
21
21
  * @extends sap.ui.rta.command.BaseCommand
22
22
  * @author SAP SE
23
- * @version 1.92.0
23
+ * @version 1.93.3
24
24
  * @constructor
25
25
  * @private
26
26
  * @since 1.86
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  * @class
23
23
  * @extends sap.ui.rta.command.BaseCommand
24
24
  * @author SAP SE
25
- * @version 1.92.0
25
+ * @version 1.93.3
26
26
  * @constructor
27
27
  * @private
28
28
  * @since 1.86
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  * @class
17
17
  * @extends sap.ui.rta.command.BaseCommand
18
18
  * @author SAP SE
19
- * @version 1.92.0
19
+ * @version 1.93.3
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.50
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  * @class
21
21
  * @extends sap.ui.rta.command.BaseCommand
22
22
  * @author SAP SE
23
- * @version 1.92.0
23
+ * @version 1.93.3
24
24
  * @constructor
25
25
  * @private
26
26
  * @since 1.50
@@ -12,7 +12,7 @@ sap.ui.define(["sap/ui/rta/command/FlexCommand"], function(FlexCommand) {
12
12
  * @class
13
13
  * @extends sap.ui.rta.command.FlexCommand
14
14
  * @author SAP SE
15
- * @version 1.92.0
15
+ * @version 1.93.3
16
16
  * @constructor
17
17
  * @private
18
18
  * @since 1.34
@@ -12,7 +12,7 @@ sap.ui.define(["sap/ui/rta/command/FlexCommand"], function(FlexCommand) {
12
12
  * @class
13
13
  * @extends sap.ui.rta.command.FlexCommand
14
14
  * @author SAP SE
15
- * @version 1.92.0
15
+ * @version 1.93.3
16
16
  * @constructor
17
17
  * @private
18
18
  * @since 1.62