@openui5/sap.ui.rta 1.117.1 → 1.119.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 (177) hide show
  1. package/.eslintrc.json +25 -1
  2. package/THIRDPARTY.txt +2 -2
  3. package/package.json +6 -6
  4. package/src/sap/ui/rta/.library +1 -1
  5. package/src/sap/ui/rta/Client.js +32 -21
  6. package/src/sap/ui/rta/RuntimeAuthoring.js +107 -97
  7. package/src/sap/ui/rta/Utils.js +10 -16
  8. package/src/sap/ui/rta/api/startAdaptation.js +0 -1
  9. package/src/sap/ui/rta/api/startKeyUserAdaptation.js +0 -1
  10. package/src/sap/ui/rta/appVariant/AppVariantDialog.js +24 -26
  11. package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -3
  12. package/src/sap/ui/rta/appVariant/AppVariantOverviewDialog.js +5 -4
  13. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +21 -21
  14. package/src/sap/ui/rta/appVariant/Feature.js +20 -30
  15. package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +21 -17
  16. package/src/sap/ui/rta/appVariant/Utils.js +4 -3
  17. package/src/sap/ui/rta/appVariant/manageApps/webapp/Component.js +8 -7
  18. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +17 -17
  19. package/src/sap/ui/rta/appVariant/manageApps/webapp/manifest.json +1 -1
  20. package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
  21. package/src/sap/ui/rta/command/AddIFrame.js +10 -7
  22. package/src/sap/ui/rta/command/AddProperty.js +1 -3
  23. package/src/sap/ui/rta/command/AddXML.js +7 -7
  24. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +5 -5
  25. package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -3
  26. package/src/sap/ui/rta/command/BaseCommand.js +1 -3
  27. package/src/sap/ui/rta/command/BindProperty.js +4 -5
  28. package/src/sap/ui/rta/command/Combine.js +1 -3
  29. package/src/sap/ui/rta/command/CommandFactory.js +7 -11
  30. package/src/sap/ui/rta/command/CompositeCommand.js +2 -6
  31. package/src/sap/ui/rta/command/ControlVariantConfigure.js +2 -2
  32. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  33. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +4 -4
  34. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
  35. package/src/sap/ui/rta/command/ControlVariantSwitch.js +4 -3
  36. package/src/sap/ui/rta/command/CreateContainer.js +1 -3
  37. package/src/sap/ui/rta/command/CustomAdd.js +1 -2
  38. package/src/sap/ui/rta/command/FlexCommand.js +2 -7
  39. package/src/sap/ui/rta/command/LREPSerializer.js +1 -3
  40. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  41. package/src/sap/ui/rta/command/Move.js +1 -3
  42. package/src/sap/ui/rta/command/Property.js +1 -3
  43. package/src/sap/ui/rta/command/Remove.js +1 -3
  44. package/src/sap/ui/rta/command/Rename.js +1 -3
  45. package/src/sap/ui/rta/command/Resize.js +1 -1
  46. package/src/sap/ui/rta/command/Reveal.js +1 -3
  47. package/src/sap/ui/rta/command/Settings.js +5 -7
  48. package/src/sap/ui/rta/command/Split.js +1 -3
  49. package/src/sap/ui/rta/command/Stack.js +3 -5
  50. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -3
  51. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  52. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  53. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +4 -3
  54. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  55. package/src/sap/ui/rta/enablement/TestDelegate.js +7 -8
  56. package/src/sap/ui/rta/enablement/elementActionTest.js +25 -29
  57. package/src/sap/ui/rta/library.js +2 -3
  58. package/src/sap/ui/rta/messagebundle.properties +13 -7
  59. package/src/sap/ui/rta/messagebundle_ar.properties +8 -8
  60. package/src/sap/ui/rta/messagebundle_bg.properties +20 -20
  61. package/src/sap/ui/rta/messagebundle_ca.properties +7 -7
  62. package/src/sap/ui/rta/messagebundle_cs.properties +10 -10
  63. package/src/sap/ui/rta/messagebundle_cy.properties +8 -8
  64. package/src/sap/ui/rta/messagebundle_da.properties +7 -7
  65. package/src/sap/ui/rta/messagebundle_de.properties +9 -9
  66. package/src/sap/ui/rta/messagebundle_el.properties +7 -7
  67. package/src/sap/ui/rta/messagebundle_en.properties +11 -8
  68. package/src/sap/ui/rta/messagebundle_en_GB.properties +8 -8
  69. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +8 -8
  70. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +7 -7
  71. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +8 -8
  72. package/src/sap/ui/rta/messagebundle_es.properties +8 -8
  73. package/src/sap/ui/rta/messagebundle_es_MX.properties +13 -13
  74. package/src/sap/ui/rta/messagebundle_et.properties +6 -6
  75. package/src/sap/ui/rta/messagebundle_fi.properties +9 -9
  76. package/src/sap/ui/rta/messagebundle_fr.properties +9 -9
  77. package/src/sap/ui/rta/messagebundle_fr_CA.properties +9 -9
  78. package/src/sap/ui/rta/messagebundle_hi.properties +12 -12
  79. package/src/sap/ui/rta/messagebundle_hr.properties +9 -9
  80. package/src/sap/ui/rta/messagebundle_hu.properties +10 -10
  81. package/src/sap/ui/rta/messagebundle_id.properties +10 -10
  82. package/src/sap/ui/rta/messagebundle_it.properties +9 -9
  83. package/src/sap/ui/rta/messagebundle_iw.properties +8 -8
  84. package/src/sap/ui/rta/messagebundle_ja.properties +21 -21
  85. package/src/sap/ui/rta/messagebundle_kk.properties +9 -9
  86. package/src/sap/ui/rta/messagebundle_ko.properties +7 -7
  87. package/src/sap/ui/rta/messagebundle_lt.properties +8 -8
  88. package/src/sap/ui/rta/messagebundle_lv.properties +8 -8
  89. package/src/sap/ui/rta/messagebundle_ms.properties +11 -11
  90. package/src/sap/ui/rta/messagebundle_nl.properties +8 -8
  91. package/src/sap/ui/rta/messagebundle_no.properties +9 -9
  92. package/src/sap/ui/rta/messagebundle_pl.properties +9 -9
  93. package/src/sap/ui/rta/messagebundle_pt.properties +9 -9
  94. package/src/sap/ui/rta/messagebundle_pt_PT.properties +8 -8
  95. package/src/sap/ui/rta/messagebundle_ro.properties +9 -9
  96. package/src/sap/ui/rta/messagebundle_ru.properties +8 -8
  97. package/src/sap/ui/rta/messagebundle_sh.properties +8 -8
  98. package/src/sap/ui/rta/messagebundle_sk.properties +9 -9
  99. package/src/sap/ui/rta/messagebundle_sl.properties +9 -9
  100. package/src/sap/ui/rta/messagebundle_sv.properties +8 -8
  101. package/src/sap/ui/rta/messagebundle_th.properties +14 -14
  102. package/src/sap/ui/rta/messagebundle_tr.properties +8 -8
  103. package/src/sap/ui/rta/messagebundle_uk.properties +10 -10
  104. package/src/sap/ui/rta/messagebundle_vi.properties +8 -8
  105. package/src/sap/ui/rta/messagebundle_zh_CN.properties +9 -9
  106. package/src/sap/ui/rta/messagebundle_zh_TW.properties +8 -8
  107. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -2
  108. package/src/sap/ui/rta/plugin/BaseCreate.js +2 -3
  109. package/src/sap/ui/rta/plugin/Combine.js +1 -2
  110. package/src/sap/ui/rta/plugin/ControlVariant.js +12 -8
  111. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -2
  112. package/src/sap/ui/rta/plugin/CutPaste.js +13 -13
  113. package/src/sap/ui/rta/plugin/DragDrop.js +17 -16
  114. package/src/sap/ui/rta/plugin/EasyAdd.js +12 -10
  115. package/src/sap/ui/rta/plugin/EasyRemove.js +11 -9
  116. package/src/sap/ui/rta/plugin/LocalReset.js +4 -2
  117. package/src/sap/ui/rta/plugin/Plugin.js +6 -10
  118. package/src/sap/ui/rta/plugin/RTAElementMover.js +3 -6
  119. package/src/sap/ui/rta/plugin/Remove.js +8 -9
  120. package/src/sap/ui/rta/plugin/Rename.js +9 -9
  121. package/src/sap/ui/rta/plugin/RenameHandler.js +21 -22
  122. package/src/sap/ui/rta/plugin/Resize.js +11 -10
  123. package/src/sap/ui/rta/plugin/Selection.js +33 -14
  124. package/src/sap/ui/rta/plugin/Settings.js +11 -11
  125. package/src/sap/ui/rta/plugin/Split.js +1 -2
  126. package/src/sap/ui/rta/plugin/Stretch.js +18 -20
  127. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +4 -9
  128. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +5 -9
  129. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +4 -4
  130. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +41 -43
  131. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +2 -3
  132. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +5 -6
  133. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +9 -7
  134. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +45 -3
  135. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +22 -23
  136. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +58 -30
  137. package/src/sap/ui/rta/service/Action.js +5 -6
  138. package/src/sap/ui/rta/service/ControllerExtension.js +8 -9
  139. package/src/sap/ui/rta/service/Outline.js +13 -11
  140. package/src/sap/ui/rta/service/Property.js +3 -4
  141. package/src/sap/ui/rta/service/Receiver.js +2 -2
  142. package/src/sap/ui/rta/service/Selection.js +2 -3
  143. package/src/sap/ui/rta/service/SupportTools.js +2 -3
  144. package/src/sap/ui/rta/themes/base/AddIFrame.less +6 -1
  145. package/src/sap/ui/rta/themes/base/Toolbar.base.less +4 -0
  146. package/src/sap/ui/rta/toolbar/Adaptation.js +26 -19
  147. package/src/sap/ui/rta/toolbar/Base.js +25 -11
  148. package/src/sap/ui/rta/toolbar/BaseRenderer.js +2 -2
  149. package/src/sap/ui/rta/toolbar/FeedbackDialog.fragment.xml +4 -4
  150. package/src/sap/ui/rta/toolbar/Fiori.js +20 -20
  151. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -2
  152. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +5 -6
  153. package/src/sap/ui/rta/toolbar/Personalization.js +4 -4
  154. package/src/sap/ui/rta/toolbar/Standalone.js +1 -2
  155. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +43 -20
  156. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +16 -7
  157. package/src/sap/ui/rta/toolbar/translation/Translation.js +13 -14
  158. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +31 -28
  159. package/src/sap/ui/rta/util/Animation.js +1 -3
  160. package/src/sap/ui/rta/util/PluginManager.js +1 -3
  161. package/src/sap/ui/rta/util/PopupManager.js +23 -19
  162. package/src/sap/ui/rta/util/ReloadManager.js +4 -4
  163. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  164. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +18 -16
  165. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +6 -9
  166. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +9 -10
  167. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +1 -1
  168. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +1 -1
  169. package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +2 -2
  170. package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +4 -4
  171. package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +2 -2
  172. package/src/sap/ui/rta/util/hasStableId.js +1 -1
  173. package/src/sap/ui/rta/util/showMessageBox.js +2 -1
  174. package/src/sap/ui/rta/util/validateStableIds.js +1 -1
  175. package/src/sap/ui/rta/util/validateText.js +1 -1
  176. package/src/sap/ui/rta/util/StylesLoader.js +0 -31
  177. package/src/sap/ui/rta/util/UrlParser.js +0 -51
@@ -197,9 +197,12 @@
197
197
  class="sapUiRtaAddIFrameDialogPreviewLinkTitle"
198
198
  text="{/text/previewUrlLabel}" />
199
199
  <ToolbarSpacer />
200
- <Button id="sapUiRtaAddIFrameDialog_PreviewButton" enabled="{=${/previewUrl/value} !== ${/frameUrl/value} }"
201
- text="{=${/previewUrl/value} === '' ? ${/text/showPreviewButton} : ${/text/updatePreviewButton} }" press="onShowPreview"
202
- class="sapUiTinyMarginTop sapUiRtaAddIFrameDialogPreviewButton" />
200
+ <Button
201
+ id="sapUiRtaAddIFrameDialog_PreviewButton"
202
+ enabled="{=${/previewUrl/value} !== ${/frameUrl/value} || ${/previewUseLegacyNavigation/value} !== ${/useLegacyNavigation/value}}"
203
+ text="{=${/previewUrl/value} === '' ? ${/text/showPreviewButton} : ${/text/updatePreviewButton} }"
204
+ press="onShowPreview"
205
+ class="sapUiTinyMarginTop sapUiRtaAddIFrameDialogPreviewButton" />
203
206
  </OverflowToolbar>
204
207
  </headerToolbar>
205
208
  <content>
@@ -231,11 +234,50 @@
231
234
  id="sapUiRtaAddIFrameDialog_PreviewFrame"
232
235
  height="100%"
233
236
  title="{/text/previewFrameLabel}"
237
+ useLegacyNavigation="{/previewUseLegacyNavigation/value/}"
234
238
  class="sapUiRtaAddIFrameDialogPreviewFrame"
235
239
  visible="{= !!${/previewUrl/value} }"/>
236
240
  </items>
237
241
  </VBox>
238
242
  </layout:Grid>
243
+ <layout:Grid
244
+ class="sapUiRtaAddIFrameDialogPreviewLinkGrid"
245
+ containerQuery="true"
246
+ defaultSpan="XL12 L12 M12 S12">
247
+ <Panel
248
+ expandable="true"
249
+ width="auto"
250
+ expanded="false"
251
+ class="sapUiResponsiveMargin sapUiRtaAddIFrameDialogPreviewLinkPanel">
252
+ <headerToolbar>
253
+ <OverflowToolbar
254
+ class="sapUiRtaAddIFrameDialogPreviewLinkToolbar" height="3rem" style="Clear">
255
+ <Title
256
+ class="sapUiRtaAddIFrameDialogPreviewLinkTitle"
257
+ text="{/text/advancedSettingsTitle}" />
258
+ <ToolbarSpacer />
259
+ </OverflowToolbar>
260
+ </headerToolbar>
261
+ <content>
262
+ <HBox
263
+ alignItems="Center"
264
+ class="sapUiRtaAddIFrameDialogLegacyNavigationContainer">
265
+ <Switch
266
+ id="sapUiRtaAddIFrameDialog_UseLegacyNavigationToggle"
267
+ customTextOn=" "
268
+ customTextOff=" "
269
+ state="{/useLegacyNavigation/value}" />
270
+ <Label
271
+ text="{/text/useLegacyNavigationLabel}" />
272
+ <Button
273
+ icon="sap-icon://hint"
274
+ type="Transparent"
275
+ press="onLegacyNavigationInfoPress"
276
+ ariaHasPopup="Dialog" />
277
+ </HBox>
278
+ </content>
279
+ </Panel>
280
+ </layout:Grid>
239
281
  </layout:VerticalLayout>
240
282
 
241
283
  <!-- Invisible Texts for ARIA -->
@@ -27,10 +27,10 @@ sap.ui.define([
27
27
  "use strict";
28
28
 
29
29
  // shortcut for sap.ui.core.ValueState
30
- var ValueState = coreLibrary.ValueState;
30
+ var {ValueState} = coreLibrary;
31
31
  var _oTextResources = Core.getLibraryResourceBundle("sap.ui.rta");
32
32
  var _sDocumentationURL = "https://help.sap.com/docs/search?q=Embedding%20Content%20%28Object%20Pages%29";
33
- var _sDocumentationHTML = _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_URL_WARNING_TEXT") + " (" + "<a href=" + _sDocumentationURL + ">" + _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_URL_WARNING_LINKTEXT") + "</a>" + ")";
33
+ var _sDocumentationHTML = `${_oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_URL_WARNING_TEXT")} (` + `<a href=${_sDocumentationURL}>${_oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_URL_WARNING_LINKTEXT")}</a>` + `)`;
34
34
  var _mText = {
35
35
  dialogTitle: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_TITLE"),
36
36
  dialogCreateTitle: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_TITLE"),
@@ -59,10 +59,13 @@ sap.ui.define([
59
59
  selectAdditionalTextPercentHeader: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_SELECT_ADDITIONAL_TEXT_PERCENT_HEADER"),
60
60
  selectAdditionalTextVh: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_SELECT_ADDITIONAL_TEXT_VH"),
61
61
  selectAdditionalTextPx: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_SELECT_ADDITIONAL_TEXT_PX"),
62
- selectAdditionalTextRem: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_SELECT_ADDITIONAL_TEXT_REM")
62
+ selectAdditionalTextRem: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_SELECT_ADDITIONAL_TEXT_REM"),
63
+ advancedSettingsTitle: _oTextResources.getText("IFRAME_ADDIFRAME_ADVANCED_SETTINGS"),
64
+ useLegacyNavigationLabel: _oTextResources.getText("IFRAME_ADDIFRAME_USE_LEGACY_NAVIGATION"),
65
+ useLegacyNavigationInfo: _oTextResources.getText("IFRAME_ADDIFRAME_USE_LEGACY_NAVIGATION_INFO")
63
66
  };
64
67
 
65
- function createJSONModel(bSetUpdateTitle, bAsContainer, sFrameWidthValue, sFrameHeightValue) {
68
+ function createJSONModel(bSetUpdateTitle, bAsContainer, sFrameWidthValue, sFrameHeightValue, bUseLegacyNavigation) {
66
69
  _mText.dialogTitle = bSetUpdateTitle ? _mText.dialogUpdateTitle : _mText.dialogCreateTitle;
67
70
 
68
71
  var sSelectAdditionalTextPercent = bAsContainer
@@ -123,7 +126,13 @@ sap.ui.define([
123
126
  }, {
124
127
  unit: "rem",
125
128
  descriptionText: _mText.selectAdditionalTextRem
126
- }]
129
+ }],
130
+ useLegacyNavigation: {
131
+ value: !!bUseLegacyNavigation
132
+ },
133
+ previewUseLegacyNavigation: {
134
+ value: !!bUseLegacyNavigation
135
+ }
127
136
  });
128
137
  }
129
138
 
@@ -133,7 +142,7 @@ sap.ui.define([
133
142
  * @class Context - Dialog for IFrame settings in Runtime Authoring
134
143
  * @extends sap.ui.base.ManagedObject
135
144
  * @author SAP SE
136
- * @version 1.117.1
145
+ * @version 1.119.0
137
146
  * @constructor
138
147
  * @private
139
148
  * @since 1.78
@@ -169,22 +178,12 @@ sap.ui.define([
169
178
  * @private
170
179
  */
171
180
  AddIFrameDialog.prototype._createDialog = function(mSettings) {
172
- // set the correct title
173
- var bSetUpdateTitle;
174
- var bAsContainer;
175
- var sFrameWidth;
176
- var sFrameHeight;
177
- if (mSettings) {
178
- bSetUpdateTitle = !!mSettings.updateMode;
179
- bAsContainer = !!mSettings.asContainer;
180
- sFrameWidth = mSettings.frameWidth;
181
- sFrameHeight = mSettings.frameHeight;
182
- }
183
181
  this._oJSONModel = createJSONModel(
184
- bSetUpdateTitle,
185
- bAsContainer,
186
- sFrameWidth,
187
- sFrameHeight
182
+ !!mSettings?.updateMode,
183
+ !!mSettings?.asContainer,
184
+ mSettings?.frameWidth,
185
+ mSettings?.frameHeight,
186
+ mSettings?.useLegacyNavigation
188
187
  );
189
188
  this._oController = new AddIFrameDialogController(this._oJSONModel, mSettings);
190
189
  Fragment.load({
@@ -246,7 +245,7 @@ sap.ui.define([
246
245
  .map(function(sUserSetting) {
247
246
  return {
248
247
  label: sUserSetting,
249
- key: "{$user>/" + sUserSetting + "}",
248
+ key: `{$user>/${sUserSetting}}`,
250
249
  value: oUserInfo[sUserSetting]
251
250
  };
252
251
  });
@@ -261,7 +260,7 @@ sap.ui.define([
261
260
  .map(function(sProperty) {
262
261
  return {
263
262
  label: sProperty,
264
- key: "{" + sProperty + "}",
263
+ key: `{${sProperty}}`,
265
264
  value: oDefaultBoundObject[sProperty]
266
265
  };
267
266
  });
@@ -5,6 +5,8 @@
5
5
  */
6
6
  sap.ui.define([
7
7
  "sap/base/Log",
8
+ "sap/m/Popover",
9
+ "sap/m/Text",
8
10
  "sap/ui/core/mvc/Controller",
9
11
  "sap/ui/core/library",
10
12
  "sap/ui/rta/util/validateText",
@@ -15,6 +17,8 @@ sap.ui.define([
15
17
  "sap/ui/rta/plugin/iframe/urlCleaner"
16
18
  ], function(
17
19
  Log,
20
+ Popover,
21
+ Text,
18
22
  Controller,
19
23
  coreLibrary,
20
24
  validateText,
@@ -27,17 +31,18 @@ sap.ui.define([
27
31
  "use strict";
28
32
 
29
33
  // shortcut for sap.ui.core.ValueState
30
- var ValueState = coreLibrary.ValueState;
34
+ var {ValueState} = coreLibrary;
31
35
 
32
36
  var _aTextInputFields = ["frameUrl", "title"];
33
37
  var _aNumericInputFields = ["frameWidth", "frameHeight"];
34
- var _aSelectInputFields = ["frameWidthUnit", "frameHeightUnit"];
38
+ var _aOtherInputFields = ["frameWidthUnit", "frameHeightUnit", "useLegacyNavigation"];
35
39
 
36
40
  function isValidUrl(sUrl) {
37
41
  return IFrame.isValidUrl(encodeURI(sUrl));
38
42
  }
39
43
 
40
44
  return Controller.extend("sap.ui.rta.plugin.iframe.AddIFrameDialogController", {
45
+ // eslint-disable-next-line object-shorthand
41
46
  constructor: function(oJSONModel, mSettings) {
42
47
  this._oJSONModel = oJSONModel;
43
48
  this._importSettings(mSettings);
@@ -48,7 +53,7 @@ sap.ui.define([
48
53
  * Event handler for validation success
49
54
  * @param {sap.ui.base.Event} oEvent - Event
50
55
  */
51
- onValidationSuccess: function(oEvent) {
56
+ onValidationSuccess(oEvent) {
52
57
  oEvent.getSource().setValueState(ValueState.None);
53
58
  this._oJSONModel.setProperty("/areAllFieldsValid",
54
59
  this._areAllTextFieldsValid() && this._areAllValueStateNones());
@@ -58,7 +63,7 @@ sap.ui.define([
58
63
  * Event handler for validation error
59
64
  * @param {sap.ui.base.Event} oEvent - Event
60
65
  */
61
- onValidationError: function(oEvent) {
66
+ onValidationError(oEvent) {
62
67
  oEvent.getSource().setValueState(ValueState.Error);
63
68
  this._oJSONModel.setProperty("/areAllFieldsValid", false);
64
69
  this._setFocusOnInvalidInput();
@@ -67,7 +72,7 @@ sap.ui.define([
67
72
  /**
68
73
  * Event handler for save button
69
74
  */
70
- onSavePress: function() {
75
+ onSavePress() {
71
76
  var sUrl = this._buildPreviewURL(this._buildReturnedURL());
72
77
  if (isValidUrl(sUrl) && this._areAllTextFieldsValid() && this._areAllValueStateNones()) {
73
78
  this._close(this._buildReturnedSettings());
@@ -80,13 +85,12 @@ sap.ui.define([
80
85
  * Event handler for Show Preview button
81
86
  * @param {sap.ui.base.Event} oEvent - Event
82
87
  */
83
- onShowPreview: function() {
88
+ onShowPreview() {
84
89
  var sURL = this._buildPreviewURL(this._buildReturnedURL());
85
90
  if (!isValidUrl(sURL)) {
86
91
  return;
87
92
  }
88
93
  var oIFrame = sap.ui.getCore().byId("sapUiRtaAddIFrameDialog_PreviewFrame");
89
- oIFrame.setUrl(""); // Resets the preview first
90
94
  // enable/disable expanding the Panel
91
95
  var oPanel = sap.ui.getCore().byId("sapUiRtaAddIFrameDialog_PreviewLinkPanel");
92
96
  var oPanelButton = oPanel.getDependents()[0];
@@ -98,6 +102,10 @@ sap.ui.define([
98
102
  }
99
103
  try {
100
104
  this._oJSONModel.setProperty("/previewUrl/value", sURL);
105
+ this._oJSONModel.setProperty(
106
+ "/previewUseLegacyNavigation/value",
107
+ this._oJSONModel.getProperty("/useLegacyNavigation/value")
108
+ );
101
109
  oIFrame.setUrl(sURL);
102
110
  } catch (oError) {
103
111
  Log.error("Error previewing the URL: ", oError);
@@ -108,7 +116,7 @@ sap.ui.define([
108
116
  * Event handler for pressing a parameter
109
117
  * @param {sap.ui.base.Event} oEvent - Event
110
118
  */
111
- onParameterPress: function(oEvent) {
119
+ onParameterPress(oEvent) {
112
120
  var sKey = oEvent.getSource().getBindingContext().getObject().key;
113
121
  this._oJSONModel.setProperty("/frameUrl/value", this._addURLParameter(sKey));
114
122
  this.onUrlChange();
@@ -118,12 +126,32 @@ sap.ui.define([
118
126
  * Event handler for live change on the parameter search field
119
127
  * @param {sap.ui.base.Event} oEvent - Event
120
128
  */
121
- onLiveChange: function(oEvent) {
129
+ onLiveChange(oEvent) {
122
130
  var oFilter = new Filter("label", FilterOperator.Contains, oEvent.getParameter("newValue"));
123
131
  var oBinding = sap.ui.getCore().byId("sapUiRtaAddIFrameDialog_ParameterTable").getBinding("items");
124
132
  oBinding.filter([oFilter]);
125
133
  },
126
134
 
135
+ onLegacyNavigationInfoPress(oEvent) {
136
+ const oButton = oEvent.getSource();
137
+ if (!this._oPopover) {
138
+ this._oPopover = new Popover(
139
+ `${oButton.getId()}-popover`,
140
+ {
141
+ showHeader: false,
142
+ contentWidth: "400px",
143
+ content: [
144
+ new Text({
145
+ text: "{/text/useLegacyNavigationInfo}"
146
+ }).addStyleClass("sapUiSmallMargin")
147
+ ]
148
+ }
149
+ );
150
+ oButton.addDependent(this._oPopover);
151
+ }
152
+ this._oPopover.openBy(oButton);
153
+ },
154
+
127
155
  /**
128
156
  * Build preview URL
129
157
  *
@@ -131,7 +159,7 @@ sap.ui.define([
131
159
  * @returns {string} URL with parameters and values
132
160
  * @private
133
161
  */
134
- _buildPreviewURL: function(sEditURL) {
162
+ _buildPreviewURL(sEditURL) {
135
163
  return sEditURL.replace(/{(.*?)}/g, function(sMatch) {
136
164
  return this._mParameterHashMap[sMatch];
137
165
  }.bind(this));
@@ -144,7 +172,7 @@ sap.ui.define([
144
172
  * @returns {string} URL with the added parameter
145
173
  * @private
146
174
  */
147
- _addURLParameter: function(sParameter) {
175
+ _addURLParameter(sParameter) {
148
176
  return this._buildReturnedURL() + sParameter;
149
177
  },
150
178
 
@@ -154,11 +182,11 @@ sap.ui.define([
154
182
  * @returns {string} URL to be returned
155
183
  * @private
156
184
  */
157
- _buildReturnedURL: function() {
185
+ _buildReturnedURL() {
158
186
  return urlCleaner(this._oJSONModel.getProperty("/frameUrl/value"));
159
187
  },
160
188
 
161
- onUrlChange: function() {
189
+ onUrlChange() {
162
190
  var sUrl = this._buildPreviewURL(this._buildReturnedURL());
163
191
  var oUrlInput = sap.ui.getCore().byId("sapUiRtaAddIFrameDialog_EditUrlTA");
164
192
  if (isValidUrl(sUrl)) {
@@ -175,7 +203,7 @@ sap.ui.define([
175
203
  * @returns {object} Parameter hashmap
176
204
  * @private
177
205
  */
178
- _buildParameterHashMap: function(mParameters) {
206
+ _buildParameterHashMap(mParameters) {
179
207
  if (mParameters && mParameters.parameters) {
180
208
  return Utils.buildHashMapFromArray(mParameters.parameters, "key", "value");
181
209
  }
@@ -185,11 +213,11 @@ sap.ui.define([
185
213
  /**
186
214
  * Event handler for Cancel button
187
215
  */
188
- onCancelPress: function() {
216
+ onCancelPress() {
189
217
  this._close();
190
218
  },
191
219
 
192
- onContainerTitleChange: function(oEvent) {
220
+ onContainerTitleChange(oEvent) {
193
221
  var oInput = oEvent.getSource();
194
222
  var sValueState = "None";
195
223
  var bValidationError = false;
@@ -220,7 +248,7 @@ sap.ui.define([
220
248
  * @param {object|undefined} mSettings - IFrame settings to be returned
221
249
  * @private
222
250
  */
223
- _close: function(mSettings) {
251
+ _close(mSettings) {
224
252
  var oAddIFrameDialog = sap.ui.getCore().byId("sapUiRtaAddIFrameDialog");
225
253
  this._mSettings = mSettings;
226
254
  oAddIFrameDialog.close();
@@ -232,18 +260,18 @@ sap.ui.define([
232
260
  * @returns {object|undefined} IFrame settings
233
261
  * @public
234
262
  */
235
- getSettings: function() {
263
+ getSettings() {
236
264
  return this._mSettings;
237
265
  },
238
266
 
239
- _areAllValueStateNones: function() {
267
+ _areAllValueStateNones() {
240
268
  var oData = this._oJSONModel.getData();
241
269
  return _aTextInputFields.concat(_aNumericInputFields).every(function(sFieldName) {
242
270
  return oData[sFieldName].valueState === ValueState.None;
243
271
  }, this);
244
272
  },
245
273
 
246
- _areAllTextFieldsValid: function() {
274
+ _areAllTextFieldsValid() {
247
275
  var oJSONModel = this._oJSONModel;
248
276
  var bAsContainer = this._oJSONModel.getProperty("asContainer/value");
249
277
  return _aTextInputFields.reduce(function(bAllValid, sFieldName) {
@@ -251,22 +279,22 @@ sap.ui.define([
251
279
  if (sFieldName === "title" && !bAsContainer) {
252
280
  return true;
253
281
  }
254
- var sValuePath = "/" + sFieldName + "/value";
282
+ var sValuePath = `/${sFieldName}/value`;
255
283
  var sValueState;
256
284
  if (oJSONModel.getProperty(sValuePath).trim() === "") {
257
285
  sValueState = ValueState.Error;
258
286
  } else {
259
287
  sValueState = ValueState.None;
260
288
  }
261
- oJSONModel.setProperty(sValuePath + "State", sValueState);
289
+ oJSONModel.setProperty(`${sValuePath}State`, sValueState);
262
290
  return bAllValid && sValueState === ValueState.None;
263
291
  }, true);
264
292
  },
265
293
 
266
- _buildReturnedSettings: function() {
294
+ _buildReturnedSettings() {
267
295
  var mSettings = {};
268
296
  var oData = this._oJSONModel.getData();
269
- _aTextInputFields.concat(_aNumericInputFields, _aSelectInputFields).forEach(function(sFieldName) {
297
+ _aTextInputFields.concat(_aNumericInputFields, _aOtherInputFields).forEach(function(sFieldName) {
270
298
  var sValue = oData[sFieldName].value;
271
299
  if (sFieldName === "frameUrl") {
272
300
  sValue = urlCleaner(sValue);
@@ -282,13 +310,13 @@ sap.ui.define([
282
310
  * @param {object|undefined} mSettings - Existing IFrame settings
283
311
  * @private
284
312
  */
285
- _importSettings: function(mSettings) {
313
+ _importSettings(mSettings) {
286
314
  if (mSettings) {
287
315
  Object.keys(mSettings).forEach(function(sFieldName) {
288
316
  if (sFieldName === "frameWidth" || sFieldName === "frameHeight") {
289
317
  this._importIFrameSize(sFieldName, mSettings[sFieldName]);
290
318
  } else {
291
- this._oJSONModel.setProperty("/" + sFieldName + "/value", mSettings[sFieldName]);
319
+ this._oJSONModel.setProperty(`/${sFieldName}/value`, mSettings[sFieldName]);
292
320
  }
293
321
  }, this);
294
322
  }
@@ -300,11 +328,11 @@ sap.ui.define([
300
328
  * @param {string} sFieldName - Field name
301
329
  * @param {string} sSize - Size to import
302
330
  */
303
- _importIFrameSize: function(sFieldName, sSize) {
331
+ _importIFrameSize(sFieldName, sSize) {
304
332
  var aResults = sSize.split(/(px|rem|%|vh)/);
305
333
  if (aResults.length >= 2) {
306
- this._oJSONModel.setProperty("/" + sFieldName + "/value", parseFloat(aResults[0]));
307
- this._oJSONModel.setProperty("/" + sFieldName + "Unit/value", aResults[1]);
334
+ this._oJSONModel.setProperty(`/${sFieldName}/value`, parseFloat(aResults[0]));
335
+ this._oJSONModel.setProperty(`/${sFieldName}Unit/value`, aResults[1]);
308
336
  }
309
337
  },
310
338
 
@@ -315,7 +343,7 @@ sap.ui.define([
315
343
  * An empty URL field disables the Save button and does not need to be checked
316
344
  *
317
345
  */
318
- _setFocusOnInvalidInput: function() {
346
+ _setFocusOnInvalidInput() {
319
347
  var oData = this._oJSONModel.getData();
320
348
  _aNumericInputFields.some(function(sFieldName) {
321
349
  if (oData[sFieldName].valueState === ValueState.Error) {
@@ -23,9 +23,8 @@ sap.ui.define([
23
23
  * @namespace
24
24
  * @name sap.ui.rta.service.Action
25
25
  * @author SAP SE
26
- * @experimental Since 1.58
27
26
  * @since 1.58
28
- * @version 1.117.1
27
+ * @version 1.119.0
29
28
  * @private
30
29
  * @ui5-restricted
31
30
  *
@@ -93,7 +92,7 @@ sap.ui.define([
93
92
  var oElementOverlay = OverlayRegistry.getOverlay(sControlId);
94
93
 
95
94
  if (!oElementOverlay) {
96
- throw new Error(DtUtil.printf('Control with id="{0}" is not under the one of root elements or ignored.', sControlId));
95
+ throw new Error(`Control with id="${sControlId}" is not under a root element or ignored.'`);
97
96
  }
98
97
 
99
98
  return oElementOverlay;
@@ -113,7 +112,7 @@ sap.ui.define([
113
112
  var oElementOverlay = OverlayRegistry.getOverlay(sControlId);
114
113
 
115
114
  if (!oElementOverlay) {
116
- throw new Error(DtUtil.printf('Control with id="{0}" is not under the one of root elements or ignored.', sControlId));
115
+ throw new Error(`Control with id="${sControlId}" is not under a root element or ignored.`);
117
116
  }
118
117
 
119
118
  return oElementOverlay;
@@ -187,7 +186,7 @@ sap.ui.define([
187
186
  * @public
188
187
  * @function
189
188
  */
190
- get: get,
189
+ get,
191
190
 
192
191
  /**
193
192
  * Returns a list of available actions for the specified control(s).
@@ -199,7 +198,7 @@ sap.ui.define([
199
198
  * @public
200
199
  * @function
201
200
  */
202
- execute: execute
201
+ execute
203
202
  }
204
203
  };
205
204
  };
@@ -29,9 +29,8 @@ sap.ui.define([
29
29
  * @namespace
30
30
  * @name sap.ui.rta.service.ControllerExtension
31
31
  * @author SAP SE
32
- * @experimental Since 1.58
33
32
  * @since 1.58
34
- * @version 1.117.1
33
+ * @version 1.119.0
35
34
  * @private
36
35
  * @ui5-restricted
37
36
  */
@@ -41,13 +40,13 @@ sap.ui.define([
41
40
  return new Promise(function(resolve, reject) {
42
41
  var sUrl;
43
42
  jQuery.ajax({
44
- url: sUrl = sap.ui.require.toUrl(sPath) + ".js",
43
+ url: sUrl = `${sap.ui.require.toUrl(sPath)}.js`,
45
44
  async: true,
46
- success: function(data) {
45
+ success(data) {
47
46
  resolve(data);
48
47
  },
49
- error: function(xhr, textStatus, error) {
50
- var oError = new Error("resource " + sPath + " could not be loaded from " + sUrl + ". Check for 'file not found' or parse errors. Reason: " + error);
48
+ error(xhr, textStatus, error) {
49
+ var oError = new Error(`resource ${sPath} could not be loaded from ${sUrl}. Check for 'file not found' or parse errors. Reason: ${error}`);
51
50
  oError.status = textStatus;
52
51
  oError.error = error;
53
52
  oError.statusCode = xhr.status;
@@ -73,7 +72,7 @@ sap.ui.define([
73
72
  * @return {object} Definition of the newly created change
74
73
  * @public
75
74
  */
76
- add: function(sCodeRef, sViewId) {
75
+ add(sCodeRef, sViewId) {
77
76
  var oFlexSettings = oRta.getFlexSettings();
78
77
  if (!oFlexSettings.developerMode) {
79
78
  throw DtUtil.createError("service.ControllerExtension#add", "code extensions can only be created in developer mode", "sap.ui.rta");
@@ -120,14 +119,14 @@ sap.ui.define([
120
119
  * @return {Promise<string>} Promise that resolves with the template as string or rejects when the file was not found
121
120
  * @public
122
121
  */
123
- getTemplate: function(sViewId) {
122
+ getTemplate(sViewId) {
124
123
  var oViewOverlay = OverlayRegistry.getOverlay(sViewId);
125
124
  if (!oViewOverlay) {
126
125
  throw DtUtil.createError("service.ControllerExtension#getTemplate", "no overlay found for the given view ID", "sap.ui.rta");
127
126
  }
128
127
 
129
128
  var sControllerExtensionTemplatePath = oViewOverlay.getDesignTimeMetadata().getControllerExtensionTemplate();
130
- return makeAjaxCall(sControllerExtensionTemplatePath + "-dbg")
129
+ return makeAjaxCall(`${sControllerExtensionTemplatePath}-dbg`)
131
130
  .catch(function() {
132
131
  return makeAjaxCall(sControllerExtensionTemplatePath);
133
132
  });
@@ -42,9 +42,8 @@ sap.ui.define([
42
42
  * @namespace
43
43
  * @name sap.ui.rta.service.Outline
44
44
  * @author SAP SE
45
- * @experimental Since 1.56
46
45
  * @since 1.56
47
- * @version 1.117.1
46
+ * @version 1.119.0
48
47
  * @private
49
48
  * @ui5-restricted
50
49
  */
@@ -57,6 +56,7 @@ sap.ui.define([
57
56
  * @private
58
57
  * @ui5-restricted
59
58
  * @property {string[]} defaultContent - List of control IDs that belong to the default content of an extension point
59
+ * @property {string[]} createdControls - List of control IDs that were created in an extension point
60
60
  */
61
61
 
62
62
  /**
@@ -145,7 +145,7 @@ sap.ui.define([
145
145
  if (!oPassedOverlay) {
146
146
  throw DtUtil.createError(
147
147
  "services.Outline#get",
148
- "Cannot find element with id= " + sId + ". A valid or empty value for the initial element id should be provided.", "sap.ui.rta"
148
+ `Cannot find element with id= ${sId}. A valid or empty value for the initial element id should be provided.`, "sap.ui.rta"
149
149
  );
150
150
  }
151
151
  aInitialOverlays.push(oPassedOverlay);
@@ -163,8 +163,8 @@ sap.ui.define([
163
163
  var sParentId = oData.id;
164
164
  var sAggregationName = oData.technicalName;
165
165
  return ExtensionPointRegistryAPI.getExtensionPointInfoByParentId({parentId: sParentId})
166
- .filter(function(mExtenstionPoint) {
167
- return mExtenstionPoint.aggregationName === sAggregationName;
166
+ .filter(function(mExtensionPoint) {
167
+ return mExtensionPoint.aggregationName === sAggregationName;
168
168
  });
169
169
  };
170
170
 
@@ -178,7 +178,8 @@ sap.ui.define([
178
178
  extensionPointInfo: {
179
179
  defaultContent: mExtensionPoint.defaultContent.map(function(oControl) {
180
180
  return oControl.getId();
181
- })
181
+ }),
182
+ createdControls: mExtensionPoint.createdControls || []
182
183
  }
183
184
  };
184
185
  };
@@ -462,7 +463,7 @@ sap.ui.define([
462
463
  // Only send new root overlays as updates; children elements are part of their outlines already
463
464
  if (mParams.elementOverlay.isRoot()) {
464
465
  var sRootElementId = mParams.elementOverlay.getElement().getId();
465
- oResponse.element = oOutline._getOutline(sRootElementId)[0];
466
+ [oResponse.element] = oOutline._getOutline(sRootElementId);
466
467
  oResponse.type = "new";
467
468
  break;
468
469
  }
@@ -470,13 +471,13 @@ sap.ui.define([
470
471
 
471
472
  case "elementOverlayAdded":
472
473
  // Overlays added to existing aggregations
473
- oResponse.element = oOutline._getOutline(sElementId)[0];
474
+ [oResponse.element] = oOutline._getOutline(sElementId);
474
475
  oResponse.targetId = sTargetId;
475
476
  oResponse.type = "new";
476
477
  break;
477
478
 
478
479
  case "elementOverlayMoved":
479
- oResponse.element = oOutline._getOutline(sElementId, 0)[0];
480
+ [oResponse.element] = oOutline._getOutline(sElementId, 0);
480
481
  oResponse.targetId = sTargetId;
481
482
  oResponse.type = "move";
482
483
  break;
@@ -497,7 +498,8 @@ sap.ui.define([
497
498
  oResponse.element.id =
498
499
  oResponse.elementOverlay.getElement()
499
500
  ? oResponse.elementOverlay.getElement().getId()
500
- : oResponse.elementOverlay.getAssociation("element"); // Triggered via DesignTime elementOverlayDestroyed event
501
+ // Triggered via DesignTime elementOverlayDestroyed event
502
+ : oResponse.elementOverlay.getAssociation("element");
501
503
  oResponse.type = "destroy";
502
504
  break;
503
505
  }
@@ -514,7 +516,7 @@ sap.ui.define([
514
516
 
515
517
  case "elementPropertyChanged":
516
518
  // Trigger origin is ManagedObjectObserver
517
- oResponse.element = oOutline._getOutline(sElementId, 0)[0];
519
+ [oResponse.element] = oOutline._getOutline(sElementId, 0);
518
520
  oResponse.type = "elementPropertyChange";
519
521
  break;
520
522
 
@@ -26,9 +26,8 @@ sap.ui.define([
26
26
  * @namespace
27
27
  * @name sap.ui.rta.service.Property
28
28
  * @author SAP SE
29
- * @experimental Since 1.58
30
29
  * @since 1.58
31
- * @version 1.117.1
30
+ * @version 1.119.0
32
31
  * @private
33
32
  * @ui5-restricted
34
33
  */
@@ -173,7 +172,7 @@ sap.ui.define([
173
172
  if (typeof bIgnore !== "boolean") {
174
173
  throw DtUtil.createError(
175
174
  "services.Property#get",
176
- "Invalid ignore property value found in designtime for element with id " + oElement.getId() + " .", "sap.ui.rta"
175
+ `Invalid ignore property value found in designtime for element with id ${oElement.getId()} .`, "sap.ui.rta"
177
176
  );
178
177
  }
179
178
 
@@ -269,7 +268,7 @@ sap.ui.define([
269
268
  if (typeof bIgnore !== "boolean" && typeof bIgnore !== "undefined") {
270
269
  throw DtUtil.createError(
271
270
  "services.Property#get",
272
- "Invalid ignore property value found in designtime for element with id " + oElement.getId() + " .", "sap.ui.rta"
271
+ `Invalid ignore property value found in designtime for element with id ${oElement.getId()} .`, "sap.ui.rta"
273
272
  );
274
273
  }
275
274
  // to ensure ignore function is replaced by a boolean value