@openui5/sap.ui.rta 1.139.0 → 1.141.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 (154) hide show
  1. package/THIRDPARTY.txt +2 -2
  2. package/package.json +6 -6
  3. package/src/sap/ui/rta/.library +1 -1
  4. package/src/sap/ui/rta/Client.js +1 -1
  5. package/src/sap/ui/rta/RuntimeAuthoring.js +1 -1
  6. package/src/sap/ui/rta/Utils.js +1 -1
  7. package/src/sap/ui/rta/appVariant/AppVariantManager.js +7 -30
  8. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +6 -41
  9. package/src/sap/ui/rta/appVariant/Feature.js +5 -4
  10. package/src/sap/ui/rta/command/AddIFrame.js +6 -8
  11. package/src/sap/ui/rta/command/AddProperty.js +2 -2
  12. package/src/sap/ui/rta/command/AddXML.js +3 -3
  13. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +17 -19
  14. package/src/sap/ui/rta/command/AnnotationCommand.js +1 -1
  15. package/src/sap/ui/rta/command/BaseCommand.js +3 -4
  16. package/src/sap/ui/rta/command/BindProperty.js +4 -4
  17. package/src/sap/ui/rta/command/Combine.js +4 -4
  18. package/src/sap/ui/rta/command/CommandFactory.js +55 -77
  19. package/src/sap/ui/rta/command/CompositeCommand.js +19 -39
  20. package/src/sap/ui/rta/command/ControlVariantConfigure.js +16 -20
  21. package/src/sap/ui/rta/command/ControlVariantSave.js +19 -28
  22. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +38 -43
  23. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +15 -26
  24. package/src/sap/ui/rta/command/ControlVariantSwitch.js +29 -50
  25. package/src/sap/ui/rta/command/CreateContainer.js +3 -3
  26. package/src/sap/ui/rta/command/CustomAdd.js +2 -2
  27. package/src/sap/ui/rta/command/ExtendControllerCommand.js +2 -4
  28. package/src/sap/ui/rta/command/FlexCommand.js +34 -44
  29. package/src/sap/ui/rta/command/LREPSerializer.js +20 -23
  30. package/src/sap/ui/rta/command/LocalReset.js +3 -3
  31. package/src/sap/ui/rta/command/ManifestCommand.js +1 -1
  32. package/src/sap/ui/rta/command/Move.js +5 -5
  33. package/src/sap/ui/rta/command/Property.js +3 -3
  34. package/src/sap/ui/rta/command/Remove.js +4 -4
  35. package/src/sap/ui/rta/command/Rename.js +3 -3
  36. package/src/sap/ui/rta/command/Resize.js +2 -2
  37. package/src/sap/ui/rta/command/Reveal.js +3 -3
  38. package/src/sap/ui/rta/command/Settings.js +2 -2
  39. package/src/sap/ui/rta/command/Split.js +3 -3
  40. package/src/sap/ui/rta/command/Stack.js +51 -55
  41. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +10 -10
  42. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +4 -4
  43. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +2 -2
  44. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +11 -11
  45. package/src/sap/ui/rta/command/manifest/AddLibrary.js +4 -8
  46. package/src/sap/ui/rta/enablement/elementActionTest.js +21 -9
  47. package/src/sap/ui/rta/library.js +2 -2
  48. package/src/sap/ui/rta/messagebundle_ar.properties +32 -17
  49. package/src/sap/ui/rta/messagebundle_bg.properties +32 -17
  50. package/src/sap/ui/rta/messagebundle_ca.properties +32 -17
  51. package/src/sap/ui/rta/messagebundle_cnr.properties +31 -16
  52. package/src/sap/ui/rta/messagebundle_cs.properties +31 -16
  53. package/src/sap/ui/rta/messagebundle_cy.properties +30 -15
  54. package/src/sap/ui/rta/messagebundle_da.properties +32 -17
  55. package/src/sap/ui/rta/messagebundle_de.properties +33 -18
  56. package/src/sap/ui/rta/messagebundle_el.properties +32 -17
  57. package/src/sap/ui/rta/messagebundle_en.properties +32 -17
  58. package/src/sap/ui/rta/messagebundle_en_GB.properties +32 -17
  59. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +11 -1
  60. package/src/sap/ui/rta/messagebundle_es.properties +32 -17
  61. package/src/sap/ui/rta/messagebundle_es_MX.properties +39 -24
  62. package/src/sap/ui/rta/messagebundle_et.properties +31 -16
  63. package/src/sap/ui/rta/messagebundle_fi.properties +30 -15
  64. package/src/sap/ui/rta/messagebundle_fr.properties +32 -17
  65. package/src/sap/ui/rta/messagebundle_fr_CA.properties +30 -15
  66. package/src/sap/ui/rta/messagebundle_hi.properties +32 -17
  67. package/src/sap/ui/rta/messagebundle_hr.properties +31 -16
  68. package/src/sap/ui/rta/messagebundle_hu.properties +31 -16
  69. package/src/sap/ui/rta/messagebundle_id.properties +32 -17
  70. package/src/sap/ui/rta/messagebundle_it.properties +31 -16
  71. package/src/sap/ui/rta/messagebundle_iw.properties +30 -15
  72. package/src/sap/ui/rta/messagebundle_ja.properties +32 -17
  73. package/src/sap/ui/rta/messagebundle_kk.properties +32 -17
  74. package/src/sap/ui/rta/messagebundle_ko.properties +30 -15
  75. package/src/sap/ui/rta/messagebundle_lt.properties +31 -16
  76. package/src/sap/ui/rta/messagebundle_lv.properties +31 -16
  77. package/src/sap/ui/rta/messagebundle_mk.properties +31 -16
  78. package/src/sap/ui/rta/messagebundle_ms.properties +32 -17
  79. package/src/sap/ui/rta/messagebundle_nl.properties +32 -17
  80. package/src/sap/ui/rta/messagebundle_no.properties +31 -16
  81. package/src/sap/ui/rta/messagebundle_pl.properties +31 -16
  82. package/src/sap/ui/rta/messagebundle_pt.properties +32 -17
  83. package/src/sap/ui/rta/messagebundle_pt_PT.properties +32 -17
  84. package/src/sap/ui/rta/messagebundle_ro.properties +31 -16
  85. package/src/sap/ui/rta/messagebundle_ru.properties +31 -16
  86. package/src/sap/ui/rta/messagebundle_sh.properties +31 -16
  87. package/src/sap/ui/rta/messagebundle_sk.properties +31 -16
  88. package/src/sap/ui/rta/messagebundle_sl.properties +31 -16
  89. package/src/sap/ui/rta/messagebundle_sr.properties +31 -16
  90. package/src/sap/ui/rta/messagebundle_sv.properties +31 -16
  91. package/src/sap/ui/rta/messagebundle_th.properties +30 -15
  92. package/src/sap/ui/rta/messagebundle_tr.properties +31 -16
  93. package/src/sap/ui/rta/messagebundle_uk.properties +31 -16
  94. package/src/sap/ui/rta/messagebundle_vi.properties +33 -18
  95. package/src/sap/ui/rta/messagebundle_zh_CN.properties +31 -16
  96. package/src/sap/ui/rta/messagebundle_zh_TW.properties +32 -17
  97. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +10 -10
  98. package/src/sap/ui/rta/plugin/AddXMLPlugin.js +1 -1
  99. package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
  100. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  101. package/src/sap/ui/rta/plugin/ControlVariant.js +65 -87
  102. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
  103. package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
  104. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  105. package/src/sap/ui/rta/plugin/ExtendControllerPlugin.js +1 -1
  106. package/src/sap/ui/rta/plugin/LocalReset.js +26 -35
  107. package/src/sap/ui/rta/plugin/Plugin.js +1 -1
  108. package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
  109. package/src/sap/ui/rta/plugin/Remove.js +1 -1
  110. package/src/sap/ui/rta/plugin/Resize.js +1 -1
  111. package/src/sap/ui/rta/plugin/Selection.js +1 -1
  112. package/src/sap/ui/rta/plugin/Settings.js +1 -1
  113. package/src/sap/ui/rta/plugin/Split.js +1 -1
  114. package/src/sap/ui/rta/plugin/Stretch.js +7 -6
  115. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +1 -1
  116. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
  117. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +17 -5
  118. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +1 -1
  119. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
  120. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
  121. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +1 -1
  122. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +1 -1
  123. package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +1 -1
  124. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
  125. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
  126. package/src/sap/ui/rta/plugin/rename/Rename.js +1 -1
  127. package/src/sap/ui/rta/plugin/rename/RenameDialog.js +2 -7
  128. package/src/sap/ui/rta/service/Action.js +1 -1
  129. package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
  130. package/src/sap/ui/rta/service/Outline.js +1 -1
  131. package/src/sap/ui/rta/service/Property.js +1 -1
  132. package/src/sap/ui/rta/service/Selection.js +1 -1
  133. package/src/sap/ui/rta/service/SupportTools.js +1 -1
  134. package/src/sap/ui/rta/toolbar/Adaptation.js +1 -1
  135. package/src/sap/ui/rta/toolbar/Base.js +7 -7
  136. package/src/sap/ui/rta/toolbar/Fiori.js +8 -8
  137. package/src/sap/ui/rta/toolbar/FioriLike.js +2 -2
  138. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  139. package/src/sap/ui/rta/toolbar/Standalone.js +3 -3
  140. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +1 -1
  141. package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
  142. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
  143. package/src/sap/ui/rta/util/PluginManager.js +1 -1
  144. package/src/sap/ui/rta/util/PopupManager.js +3 -3
  145. package/src/sap/ui/rta/util/ReloadManager.js +1 -1
  146. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  147. package/src/sap/ui/rta/util/ServiceManager.js +1 -1
  148. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +6 -6
  149. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
  150. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +1 -1
  151. package/src/sap/ui/rta/util/changeVisualization/resolveBinding.js +79 -0
  152. package/src/sap/ui/rta/util/guidedTour/GuidedTour.js +1 -1
  153. package/src/sap/ui/rta/util/guidedTour/content/GeneralTour.js +1 -1
  154. package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +1 -1
package/THIRDPARTY.txt CHANGED
@@ -379,7 +379,7 @@ License: MIT
379
379
  License Text: https://github.com/UI5/openui5/blob/master/LICENSES/MIT.txt
380
380
  Contained in: src/sap.ui.integration/src/sap/ui/integration/thirdparty/adaptive-expressions.js
381
381
 
382
- Component: Markdown-it, version: 12.3.2
382
+ Component: Markdown-it, version: 14.1.0
383
383
  Copyright: 2014 Vitaly Puzrin, Alex Kocharin
384
384
  License: MIT
385
385
  License Text: https://github.com/UI5/openui5/blob/master/LICENSES/MIT.txt
@@ -444,7 +444,7 @@ License: Apache-2.0
444
444
  License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
445
445
  Contained in: lib/jsdoc/ui5/plugin.js
446
446
 
447
- Component: SAP Theming Base Content, version: 11.30.0
447
+ Component: SAP Theming Base Content, version: 11.32.2-20250827135846+79bb30d311678435d61b21db26ecbe07d6b05079
448
448
  Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
449
449
  License: Apache-2.0
450
450
  License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.rta",
3
- "version": "1.139.0",
3
+ "version": "1.141.0",
4
4
  "description": "OpenUI5 UI Library sap.ui.rta",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -14,10 +14,10 @@
14
14
  "url": "https://github.com/UI5/openui5.git"
15
15
  },
16
16
  "dependencies": {
17
- "@openui5/sap.m": "1.139.0",
18
- "@openui5/sap.ui.core": "1.139.0",
19
- "@openui5/sap.ui.dt": "1.139.0",
20
- "@openui5/sap.ui.fl": "1.139.0",
21
- "@openui5/sap.ui.layout": "1.139.0"
17
+ "@openui5/sap.m": "1.141.0",
18
+ "@openui5/sap.ui.core": "1.141.0",
19
+ "@openui5/sap.ui.dt": "1.141.0",
20
+ "@openui5/sap.ui.fl": "1.141.0",
21
+ "@openui5/sap.ui.layout": "1.141.0"
22
22
  }
23
23
  }
@@ -6,7 +6,7 @@
6
6
  <copyright>OpenUI5
7
7
  * (c) Copyright 2025 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.139.0</version>
9
+ <version>1.141.0</version>
10
10
 
11
11
  <documentation>SAPUI5 library with RTA controls.</documentation>
12
12
 
@@ -59,7 +59,7 @@ sap.ui.define([
59
59
  * @alias sap.ui.rta.Client
60
60
  * @author SAP SE
61
61
  * @since 1.56.0
62
- * @version 1.139.0
62
+ * @version 1.141.0
63
63
  * @private
64
64
  * @ui5-restricted
65
65
  */
@@ -114,7 +114,7 @@ sap.ui.define([
114
114
  * @class The runtime authoring allows to adapt the fields of a running application.
115
115
  * @extends sap.ui.base.ManagedObject
116
116
  * @author SAP SE
117
- * @version 1.139.0
117
+ * @version 1.141.0
118
118
  * @constructor
119
119
  * @private
120
120
  * @since 1.30
@@ -46,7 +46,7 @@ sap.ui.define([
46
46
  *
47
47
  * @namespace
48
48
  * @author SAP SE
49
- * @version 1.139.0
49
+ * @version 1.141.0
50
50
  *
51
51
  * @private
52
52
  * @since 1.30
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @class
25
25
  * @extends sap.ui.base.ManagedObject
26
26
  * @author SAP SE
27
- * @version 1.139.0
27
+ * @version 1.141.0
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.53
@@ -82,7 +82,8 @@ sap.ui.define([
82
82
  * @description Creates all the manifest inline changes for different change types.
83
83
  */
84
84
  AppVariantManager.prototype.createAllInlineChanges = function(oAppVariantSpecificData, vSelector) {
85
- const sAppVariantId = AppVariantUtils.getId(oAppVariantSpecificData.referenceAppId);
85
+ // TODO Refactor, this sets a global as side effect
86
+ AppVariantUtils.getId(oAppVariantSpecificData.referenceAppId);
86
87
  const aAllInlineChangeOperations = [];
87
88
  let oPropertyChange = {};
88
89
 
@@ -102,44 +103,20 @@ sap.ui.define([
102
103
  oPropertyChange = AppVariantUtils.getInlineChangeInputIcon(oAppVariantSpecificData.icon);
103
104
  aAllInlineChangeOperations.push(AppVariantUtils.createInlineChange(oPropertyChange, "appdescr_ui_setIcon", vSelector));
104
105
 
105
- /** *********************************************************Inbounds handling******************************************************************/
106
- return AppVariantUtils.getInboundInfo(oAppVariantSpecificData.inbounds)
107
- .then(function(oInboundInfo) {
108
- const sCurrentRunningInboundId = oInboundInfo.currentRunningInbound;
109
-
110
- // If there is no inbound, create a new inbound
111
- if (oInboundInfo.addNewInboundRequired) {
112
- // create a inline change using a change type 'appdescr_app_addNewInbound'
113
- const oInlineChangePromise = AppVariantUtils.prepareAddNewInboundChange(sCurrentRunningInboundId, sAppVariantId, oAppVariantSpecificData)
114
- .then(function(oPropertyChange) {
115
- return AppVariantUtils.createInlineChange(oPropertyChange, "appdescr_app_addNewInbound", vSelector);
116
- });
117
-
118
- aAllInlineChangeOperations.push(oInlineChangePromise);
119
- } else {
120
- // create a inline change using a change type 'appdescr_app_changeInbound'
121
- oPropertyChange = AppVariantUtils.prepareChangeInboundChange(sCurrentRunningInboundId, sAppVariantId, oAppVariantSpecificData);
122
- aAllInlineChangeOperations.push(AppVariantUtils.createInlineChange(oPropertyChange, "appdescr_app_changeInbound", vSelector));
123
- }
124
-
125
- // remove all other inbounds except appVariant inbound
126
- // create a inline change using a change type 'appdescr_app_removeAllInboundsExceptOne'
127
- oPropertyChange = AppVariantUtils.prepareRemoveAllInboundsExceptOneChange(sCurrentRunningInboundId);
128
- aAllInlineChangeOperations.push(AppVariantUtils.createInlineChange(oPropertyChange, "appdescr_app_removeAllInboundsExceptOne", vSelector));
129
-
130
- return Promise.all(aAllInlineChangeOperations);
131
- });
106
+ return Promise.all(aAllInlineChangeOperations);
132
107
  };
133
108
 
134
109
  /**
135
110
  * @param {string} sAppVariantId - Application variant ID
111
+ * @param {object} oParsedHash - Parsed Hash containing semantic object, action and parameters for inbound
136
112
  * @param {sap.ui.fl.Selector} vSelector - Selector
137
113
  * @returns {Promise} Resolved promise
138
114
  * @description Creates the app variant with all inline changes in backend.
139
115
  */
140
- AppVariantManager.prototype.createAppVariant = function(sAppVariantId, vSelector) {
116
+ AppVariantManager.prototype.createAppVariant = function(sAppVariantId, oParsedHash, vSelector) {
141
117
  const mPropertyBag = {
142
118
  id: sAppVariantId,
119
+ parsedHash: oParsedHash,
143
120
  layer: this.getLayer()
144
121
  };
145
122
  return AppVariantUtils.createAppVariant(vSelector, mPropertyBag);
@@ -148,52 +148,17 @@ sap.ui.define([
148
148
  };
149
149
  };
150
150
 
151
- AppVariantUtils.getInboundInfo = function(oInbounds) {
152
- var oInboundInfo = {};
153
- if (!oInbounds) {
154
- oInboundInfo.currentRunningInbound = "customer.savedAsAppVariant";
155
- oInboundInfo.addNewInboundRequired = true;
156
- return Promise.resolve(oInboundInfo);
157
- }
158
-
151
+ AppVariantUtils.getParsedHash = function() {
159
152
  return FlexUtils.getUShellService("URLParsing")
160
153
  .then(function(oURLParsingService) {
161
154
  return FlexUtils.getParsedURLHash(oURLParsingService);
162
155
  })
163
156
  .then(function(oParsedHash) {
164
- var aInbounds = Object.keys(oInbounds);
165
- var aInboundsFound = [];
166
-
167
- // This will only happen if app variants are created on top of app variants
168
- if (aInbounds.length === 1 && aInbounds[0] === "customer.savedAsAppVariant") {
169
- return {
170
- currentRunningInbound: "customer.savedAsAppVariant",
171
- addNewInboundRequired: false
172
- };
173
- }
174
-
175
- aInbounds.forEach(function(sInboundId) {
176
- if ((oInbounds[sInboundId].action === oParsedHash.action) && (oInbounds[sInboundId].semanticObject === oParsedHash.semanticObject)) {
177
- aInboundsFound.push(sInboundId);
178
- }
179
- });
180
-
181
- switch (aInboundsFound.length) {
182
- case 0:
183
- oInboundInfo.currentRunningInbound = "customer.savedAsAppVariant";
184
- oInboundInfo.addNewInboundRequired = true;
185
- break;
186
- case 1:
187
- [oInboundInfo.currentRunningInbound] = aInboundsFound;
188
- oInboundInfo.addNewInboundRequired = false;
189
- break;
190
- default:
191
- oInboundInfo.currentRunningInbound = "customer.savedAsAppVariant";
192
- oInboundInfo.addNewInboundRequired = true;
193
- break;
194
- }
195
-
196
- return oInboundInfo;
157
+ return {
158
+ action: oParsedHash.action,
159
+ semanticObject: oParsedHash.semanticObject,
160
+ params: oParsedHash.params
161
+ };
197
162
  });
198
163
  };
199
164
 
@@ -168,9 +168,9 @@ sap.ui.define([
168
168
  return FeaturesAPI.isSaveAsAvailable(sCurrentLayer).then(function(bIsSaveAsAvailable) {
169
169
  if (bIsSaveAsAvailable) {
170
170
  if (oManifest["sap.app"].crossNavigation && oManifest["sap.app"].crossNavigation.inbounds) {
171
- return AppVariantUtils.getInboundInfo(oManifest["sap.app"].crossNavigation.inbounds);
171
+ return AppVariantUtils.getParsedHash(oManifest["sap.app"].crossNavigation.inbounds);
172
172
  }
173
- return AppVariantUtils.getInboundInfo();
173
+ return AppVariantUtils.getParsedHash();
174
174
  }
175
175
  return undefined;
176
176
  }).then(function(oInboundInfo) {
@@ -249,11 +249,12 @@ sap.ui.define([
249
249
  return AppVariantUtils.addChangesToPersistence(aAllInlineChanges, vSelector);
250
250
  };
251
251
 
252
- const fnCreateAppVariant = function() {
252
+ const fnCreateAppVariant = async function() {
253
253
  const sAppVariantId = AppVariantUtils.getNewAppVariantId();
254
+ const oParsedHash = await AppVariantUtils.getParsedHash();
254
255
 
255
256
  // Based on the key user provided info, app variant manifest is created
256
- return oAppVariantManager.createAppVariant(sAppVariantId, vSelector)
257
+ return oAppVariantManager.createAppVariant(sAppVariantId, oParsedHash, vSelector)
257
258
  .catch(function(oError) {
258
259
  let sMessageKey = oError.messageKey;
259
260
  sMessageKey ||= "MSG_SAVE_APP_VARIANT_FAILED";
@@ -16,13 +16,13 @@ sap.ui.define([
16
16
  * @class
17
17
  * @extends sap.ui.rta.command.FlexCommand
18
18
  * @author SAP SE
19
- * @version 1.139.0
19
+ * @version 1.141.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.75
23
23
  * @alias sap.ui.rta.command.AddIFrame
24
24
  */
25
- var AddIFrame = FlexCommand.extend("sap.ui.rta.command.AddIFrame", {
25
+ const AddIFrame = FlexCommand.extend("sap.ui.rta.command.AddIFrame", {
26
26
  metadata: {
27
27
  library: "sap.ui.rta",
28
28
  properties: {
@@ -72,12 +72,10 @@ sap.ui.define([
72
72
  // Override to avoid url to be 'bound'
73
73
  AddIFrame.prototype.applySettings = function(...aArgs) {
74
74
  const mSettings = aArgs[0];
75
- var mSettingsWithoutUrl = {};
75
+ const mSettingsWithoutUrl = {};
76
76
  Object.keys(mSettings)
77
- .filter(function(sSettingName) {
78
- return sSettingName !== "url";
79
- })
80
- .forEach(function(sSettingName) {
77
+ .filter((sSettingName) => sSettingName !== "url")
78
+ .forEach((sSettingName) => {
81
79
  mSettingsWithoutUrl[sSettingName] = mSettings[sSettingName];
82
80
  });
83
81
  aArgs[0] = mSettingsWithoutUrl;
@@ -86,7 +84,7 @@ sap.ui.define([
86
84
  };
87
85
 
88
86
  AddIFrame.prototype._getChangeSpecificData = function() {
89
- var mChangeSpecificData = FlexCommand.prototype._getChangeSpecificData.call(this);
87
+ const mChangeSpecificData = FlexCommand.prototype._getChangeSpecificData.call(this);
90
88
  const { title: sTitle, ...oContent } = mChangeSpecificData.content;
91
89
  return {
92
90
  changeType: mChangeSpecificData.changeType,
@@ -14,13 +14,13 @@ sap.ui.define([
14
14
  * @class
15
15
  * @extends sap.ui.rta.command.FlexCommand
16
16
  * @author SAP SE
17
- * @version 1.139.0
17
+ * @version 1.141.0
18
18
  * @constructor
19
19
  * @private
20
20
  * @since 1.78
21
21
  * @alias sap.ui.rta.command.AddProperty
22
22
  */
23
- var AddProperty = FlexCommand.extend("sap.ui.rta.command.AddProperty", {
23
+ const AddProperty = FlexCommand.extend("sap.ui.rta.command.AddProperty", {
24
24
  metadata: {
25
25
  library: "sap.ui.rta",
26
26
  properties: {
@@ -16,13 +16,13 @@ sap.ui.define([
16
16
  * @class
17
17
  * @extends sap.ui.rta.command.FlexCommand
18
18
  * @author SAP SE
19
- * @version 1.139.0
19
+ * @version 1.141.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.54
23
23
  * @alias sap.ui.rta.command.AddXML
24
24
  */
25
- var AddXML = FlexCommand.extend("sap.ui.rta.command.AddXML", {
25
+ const AddXML = FlexCommand.extend("sap.ui.rta.command.AddXML", {
26
26
  metadata: {
27
27
  library: "sap.ui.rta",
28
28
  properties: {
@@ -72,7 +72,7 @@ sap.ui.define([
72
72
  AddXML.prototype._applyChange = function(...aArgs) {
73
73
  const vChange = aArgs[0];
74
74
  // preload the module to be applicable in this session
75
- var mModulePreloads = {};
75
+ const mModulePreloads = {};
76
76
  mModulePreloads[vChange.getFlexObjectMetadata().moduleName] = this.getFragment();
77
77
  sap.ui.require.preload(mModulePreloads);
78
78
 
@@ -24,13 +24,13 @@ sap.ui.define([
24
24
  * @class
25
25
  * @extends sap.ui.rta.command.FlexCommand
26
26
  * @author SAP SE
27
- * @version 1.139.0
27
+ * @version 1.141.0
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.76
31
31
  * @alias sap.ui.rta.command.AddXMLAtExtensionPoint
32
32
  */
33
- var AddXMLAtExtensionPoint = FlexCommand.extend("sap.ui.rta.command.AddXMLAtExtensionPoint", {
33
+ const AddXMLAtExtensionPoint = FlexCommand.extend("sap.ui.rta.command.AddXMLAtExtensionPoint", {
34
34
  metadata: {
35
35
  library: "sap.ui.rta",
36
36
  properties: {
@@ -65,7 +65,7 @@ sap.ui.define([
65
65
  };
66
66
 
67
67
  AddXMLAtExtensionPoint.prototype.getAppComponent = function() {
68
- var oView = this.getSelector().view;
68
+ const oView = this.getSelector().view;
69
69
  return Utils.getAppComponentForControl(oView);
70
70
  };
71
71
 
@@ -74,35 +74,33 @@ sap.ui.define([
74
74
  * When first applying a change we need to do the same.
75
75
  * @override
76
76
  */
77
- AddXMLAtExtensionPoint.prototype._applyChange = function(vChange) {
77
+ AddXMLAtExtensionPoint.prototype._applyChange = async function(vChange) {
78
78
  // preload the module to be applicable in this session
79
- var mModulePreloads = {};
79
+ const mModulePreloads = {};
80
80
  mModulePreloads[vChange.getFlexObjectMetadata().moduleName] = this.getFragment();
81
81
  sap.ui.require.preload(mModulePreloads);
82
82
 
83
- var oChange = vChange.change || vChange;
84
- var oAppComponent = this.getAppComponent();
85
- var oSelector = oChange.getSelector();
86
- var oView = JsControlTreeModifier.bySelector(oSelector.viewSelector, oAppComponent);
87
- var oExtensionPointInfo = ExtensionPointRegistryAPI.getExtensionPointInfo({
83
+ const oChange = vChange.change || vChange;
84
+ const oAppComponent = this.getAppComponent();
85
+ const oSelector = oChange.getSelector();
86
+ const oView = JsControlTreeModifier.bySelector(oSelector.viewSelector, oAppComponent);
87
+ const oExtensionPointInfo = ExtensionPointRegistryAPI.getExtensionPointInfo({
88
88
  name: oSelector.name,
89
89
  view: oView
90
90
  });
91
- var oSelectorElement = oExtensionPointInfo.targetControl;
91
+ const oSelectorElement = oExtensionPointInfo.targetControl;
92
92
  oChange.setExtensionPointInfo(oExtensionPointInfo);
93
93
 
94
- var mPropertyBag = {
94
+ const mPropertyBag = {
95
95
  modifier: JsControlTreeModifier,
96
96
  appComponent: oAppComponent,
97
97
  view: oView
98
98
  };
99
- return ChangesWriteAPI.apply({ change: oChange, element: oSelectorElement, ...mPropertyBag })
100
- .then(function(oResult) {
101
- if (!oResult.success) {
102
- return Promise.reject(oResult.error);
103
- }
104
- return undefined;
105
- });
99
+ const oResult = await ChangesWriteAPI.apply({ change: oChange, element: oSelectorElement, ...mPropertyBag });
100
+ if (!oResult.success) {
101
+ throw Error(oResult.error);
102
+ }
103
+ return oResult;
106
104
  };
107
105
 
108
106
  return AddXMLAtExtensionPoint;
@@ -29,7 +29,7 @@ sap.ui.define([
29
29
  * @extends sap.ui.rta.command.FlexCommand
30
30
  *
31
31
  * @author SAP SE
32
- * @version 1.139.0
32
+ * @version 1.141.0
33
33
  *
34
34
  * @constructor
35
35
  * @private
@@ -16,14 +16,14 @@ sap.ui.define([
16
16
  * @extends sap.ui.base.ManagedObject
17
17
  *
18
18
  * @author SAP SE
19
- * @version 1.139.0
19
+ * @version 1.141.0
20
20
  *
21
21
  * @constructor
22
22
  * @private
23
23
  * @since 1.34
24
24
  * @alias sap.ui.rta.command.BaseCommand
25
25
  */
26
- var BaseCommand = ManagedObject.extend("sap.ui.rta.command.BaseCommand", {
26
+ const BaseCommand = ManagedObject.extend("sap.ui.rta.command.BaseCommand", {
27
27
  metadata: {
28
28
  library: "sap.ui.rta",
29
29
  properties: {
@@ -56,8 +56,7 @@ sap.ui.define([
56
56
  * @override
57
57
  */
58
58
  BaseCommand.prototype.getElement = function() {
59
- var sId = this.getAssociation("element");
60
- return Element.getElementById(sId);
59
+ return Element.getElementById(this.getAssociation("element"));
61
60
  };
62
61
 
63
62
  /**
@@ -26,13 +26,13 @@ sap.ui.define([
26
26
  * @class
27
27
  * @extends sap.ui.rta.command.FlexCommand
28
28
  * @author SAP SE
29
- * @version 1.139.0
29
+ * @version 1.141.0
30
30
  * @constructor
31
31
  * @private
32
32
  * @since 1.38
33
33
  * @alias sap.ui.rta.command.BindProperty
34
34
  */
35
- var BindProperty = FlexCommand.extend("sap.ui.rta.command.BindProperty", {
35
+ const BindProperty = FlexCommand.extend("sap.ui.rta.command.BindProperty", {
36
36
  metadata: {
37
37
  library: "sap.ui.rta",
38
38
  properties: {
@@ -65,9 +65,9 @@ sap.ui.define([
65
65
  };
66
66
 
67
67
  BindProperty.prototype._getChangeSpecificData = function() {
68
- var oElement = this.getElement();
68
+ const oElement = this.getElement();
69
69
  // general format
70
- var mSpecificChangeInfo = {
70
+ const mSpecificChangeInfo = {
71
71
  changeType: this.getChangeType(),
72
72
  selector: {
73
73
  id: oElement.getId(),
@@ -16,13 +16,13 @@ sap.ui.define([
16
16
  * @class
17
17
  * @extends sap.ui.rta.command.FlexCommand
18
18
  * @author SAP SE
19
- * @version 1.139.0
19
+ * @version 1.141.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.46
23
23
  * @alias sap.ui.rta.command.Combine
24
24
  */
25
- var Combine = FlexCommand.extend("sap.ui.rta.command.Combine", {
25
+ const Combine = FlexCommand.extend("sap.ui.rta.command.Combine", {
26
26
  metadata: {
27
27
  library: "sap.ui.rta",
28
28
  properties: {
@@ -48,11 +48,11 @@ sap.ui.define([
48
48
  * @override
49
49
  */
50
50
  Combine.prototype._getChangeSpecificData = function() {
51
- var aFieldIds = [];
51
+ const aFieldIds = [];
52
52
  this.getCombineElements().forEach(function(oField) {
53
53
  aFieldIds.push(oField.getId());
54
54
  });
55
- var mSpecificInfo = {
55
+ const mSpecificInfo = {
56
56
  changeType: this.getChangeType(),
57
57
  content: {
58
58
  newElementId: this.getNewElementId(),