@openui5/sap.ui.rta 1.112.2 → 1.114.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 (153) hide show
  1. package/THIRDPARTY.txt +1 -1
  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 +111 -21
  6. package/src/sap/ui/rta/Utils.js +1 -1
  7. package/src/sap/ui/rta/appVariant/AppVariantManager.js +6 -5
  8. package/src/sap/ui/rta/command/AddIFrame.js +1 -1
  9. package/src/sap/ui/rta/command/AddProperty.js +1 -1
  10. package/src/sap/ui/rta/command/AddXML.js +1 -1
  11. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
  12. package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
  13. package/src/sap/ui/rta/command/BaseCommand.js +1 -1
  14. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  15. package/src/sap/ui/rta/command/Combine.js +1 -1
  16. package/src/sap/ui/rta/command/CommandFactory.js +1 -1
  17. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  18. package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
  19. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  20. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
  21. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
  22. package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
  23. package/src/sap/ui/rta/command/CreateContainer.js +1 -1
  24. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  25. package/src/sap/ui/rta/command/FlexCommand.js +1 -1
  26. package/src/sap/ui/rta/command/LREPSerializer.js +1 -1
  27. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  28. package/src/sap/ui/rta/command/Move.js +1 -1
  29. package/src/sap/ui/rta/command/Property.js +1 -1
  30. package/src/sap/ui/rta/command/Remove.js +1 -1
  31. package/src/sap/ui/rta/command/Rename.js +1 -1
  32. package/src/sap/ui/rta/command/Resize.js +1 -1
  33. package/src/sap/ui/rta/command/Reveal.js +1 -1
  34. package/src/sap/ui/rta/command/Settings.js +1 -1
  35. package/src/sap/ui/rta/command/Split.js +1 -1
  36. package/src/sap/ui/rta/command/Stack.js +1 -1
  37. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
  38. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  39. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  40. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  41. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  42. package/src/sap/ui/rta/enablement/elementActionTest.js +93 -76
  43. package/src/sap/ui/rta/library.js +2 -2
  44. package/src/sap/ui/rta/messagebundle.properties +40 -4
  45. package/src/sap/ui/rta/messagebundle_ar.properties +21 -6
  46. package/src/sap/ui/rta/messagebundle_bg.properties +21 -6
  47. package/src/sap/ui/rta/messagebundle_ca.properties +21 -6
  48. package/src/sap/ui/rta/messagebundle_cs.properties +21 -6
  49. package/src/sap/ui/rta/messagebundle_cy.properties +21 -6
  50. package/src/sap/ui/rta/messagebundle_da.properties +21 -6
  51. package/src/sap/ui/rta/messagebundle_de.properties +21 -6
  52. package/src/sap/ui/rta/messagebundle_el.properties +21 -6
  53. package/src/sap/ui/rta/messagebundle_en.properties +18 -3
  54. package/src/sap/ui/rta/messagebundle_en_GB.properties +18 -3
  55. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +15 -3
  56. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +13 -3
  57. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +18 -3
  58. package/src/sap/ui/rta/messagebundle_es.properties +21 -6
  59. package/src/sap/ui/rta/messagebundle_es_MX.properties +21 -6
  60. package/src/sap/ui/rta/messagebundle_et.properties +21 -6
  61. package/src/sap/ui/rta/messagebundle_fi.properties +21 -6
  62. package/src/sap/ui/rta/messagebundle_fr.properties +21 -6
  63. package/src/sap/ui/rta/messagebundle_fr_CA.properties +21 -6
  64. package/src/sap/ui/rta/messagebundle_hi.properties +21 -6
  65. package/src/sap/ui/rta/messagebundle_hr.properties +21 -6
  66. package/src/sap/ui/rta/messagebundle_hu.properties +21 -6
  67. package/src/sap/ui/rta/messagebundle_id.properties +21 -6
  68. package/src/sap/ui/rta/messagebundle_it.properties +21 -6
  69. package/src/sap/ui/rta/messagebundle_iw.properties +21 -6
  70. package/src/sap/ui/rta/messagebundle_ja.properties +21 -6
  71. package/src/sap/ui/rta/messagebundle_kk.properties +21 -6
  72. package/src/sap/ui/rta/messagebundle_ko.properties +21 -6
  73. package/src/sap/ui/rta/messagebundle_lt.properties +21 -6
  74. package/src/sap/ui/rta/messagebundle_lv.properties +21 -6
  75. package/src/sap/ui/rta/messagebundle_ms.properties +21 -6
  76. package/src/sap/ui/rta/messagebundle_nl.properties +21 -6
  77. package/src/sap/ui/rta/messagebundle_no.properties +21 -6
  78. package/src/sap/ui/rta/messagebundle_pl.properties +21 -6
  79. package/src/sap/ui/rta/messagebundle_pt.properties +21 -6
  80. package/src/sap/ui/rta/messagebundle_pt_PT.properties +21 -6
  81. package/src/sap/ui/rta/messagebundle_ro.properties +21 -6
  82. package/src/sap/ui/rta/messagebundle_ru.properties +21 -6
  83. package/src/sap/ui/rta/messagebundle_sh.properties +21 -6
  84. package/src/sap/ui/rta/messagebundle_sk.properties +21 -6
  85. package/src/sap/ui/rta/messagebundle_sl.properties +21 -6
  86. package/src/sap/ui/rta/messagebundle_sv.properties +21 -6
  87. package/src/sap/ui/rta/messagebundle_th.properties +21 -6
  88. package/src/sap/ui/rta/messagebundle_tr.properties +21 -6
  89. package/src/sap/ui/rta/messagebundle_uk.properties +21 -6
  90. package/src/sap/ui/rta/messagebundle_vi.properties +21 -6
  91. package/src/sap/ui/rta/messagebundle_zh_CN.properties +21 -6
  92. package/src/sap/ui/rta/messagebundle_zh_TW.properties +21 -6
  93. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
  94. package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
  95. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  96. package/src/sap/ui/rta/plugin/ControlVariant.js +2 -2
  97. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
  98. package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
  99. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  100. package/src/sap/ui/rta/plugin/EasyAdd.js +1 -1
  101. package/src/sap/ui/rta/plugin/EasyRemove.js +3 -3
  102. package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
  103. package/src/sap/ui/rta/plugin/Plugin.js +1 -1
  104. package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
  105. package/src/sap/ui/rta/plugin/Remove.js +1 -1
  106. package/src/sap/ui/rta/plugin/Rename.js +1 -1
  107. package/src/sap/ui/rta/plugin/RenameHandler.js +75 -66
  108. package/src/sap/ui/rta/plugin/Resize.js +1 -1
  109. package/src/sap/ui/rta/plugin/Selection.js +1 -1
  110. package/src/sap/ui/rta/plugin/Settings.js +1 -1
  111. package/src/sap/ui/rta/plugin/Split.js +1 -1
  112. package/src/sap/ui/rta/plugin/Stretch.js +1 -1
  113. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +2 -22
  114. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
  115. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +1 -1
  116. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
  117. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
  118. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
  119. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +39 -21
  120. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +48 -19
  121. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +1 -16
  122. package/src/sap/ui/rta/service/Action.js +1 -1
  123. package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
  124. package/src/sap/ui/rta/service/Outline.js +4 -1
  125. package/src/sap/ui/rta/service/Property.js +1 -1
  126. package/src/sap/ui/rta/service/Selection.js +1 -1
  127. package/src/sap/ui/rta/service/SupportTools.js +1 -1
  128. package/src/sap/ui/rta/toolbar/ActionsMenu.fragment.xml +0 -6
  129. package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +59 -20
  130. package/src/sap/ui/rta/toolbar/Adaptation.js +95 -13
  131. package/src/sap/ui/rta/toolbar/Base.js +1 -1
  132. package/src/sap/ui/rta/toolbar/FeedbackDialog.fragment.xml +24 -0
  133. package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
  134. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  135. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  136. package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
  137. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  138. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +30 -32
  139. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +3 -15
  140. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +130 -49
  141. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptationDialog.fragment.xml +12 -10
  142. package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
  143. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
  144. package/src/sap/ui/rta/util/PluginManager.js +1 -1
  145. package/src/sap/ui/rta/util/PopupManager.js +1 -1
  146. package/src/sap/ui/rta/util/ReloadManager.js +6 -3
  147. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  148. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +18 -2
  149. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorCategorySelection.fragment.xml +1 -1
  150. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +15 -6
  151. package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +1 -1
  152. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +16 -9
  153. package/src/sap/ui/rta/util/validateStableIds.js +5 -2
@@ -35,7 +35,7 @@ function(
35
35
  * The RTAElementMover is responsible for the RTA specific adaptation of element movements.
36
36
  *
37
37
  * @author SAP SE
38
- * @version 1.112.2
38
+ * @version 1.114.0
39
39
  *
40
40
  * @constructor
41
41
  * @private
@@ -29,7 +29,7 @@ sap.ui.define([
29
29
  * @class The Remove allows trigger remove operations on the overlay
30
30
  * @extends sap.ui.rta.plugin.Plugin
31
31
  * @author SAP SE
32
- * @version 1.112.2
32
+ * @version 1.114.0
33
33
  * @constructor
34
34
  * @private
35
35
  * @since 1.34
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @extends sap.ui.rta.plugin.Plugin
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.112.2
31
+ * @version 1.114.0
32
32
  *
33
33
  * @constructor
34
34
  * @private
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  * Provides Rename handling functionality
40
40
  *
41
41
  * @author SAP SE
42
- * @version 1.112.2
42
+ * @version 1.114.0
43
43
  *
44
44
  * @constructor
45
45
  * @private
@@ -65,11 +65,11 @@ sap.ui.define([
65
65
  },
66
66
 
67
67
  _setEditableFieldPosition: function() {
68
- if (this._$editableField) {
69
- this._$editableField.offset({left: this._$oEditableControlDomRef.offset().left});
70
- this._$editableField.offset({top: this._$oEditableControlDomRef.offset().top});
68
+ if (this._oEditableField) {
69
+ jQuery(this._oEditableField).offset({left: DOMUtil.getOffset(this._oEditableControlDomRef).left});
70
+ jQuery(this._oEditableField).offset({top: DOMUtil.getOffset(this._oEditableControlDomRef).top});
71
71
  this._oEditedOverlay.setSelected(true);
72
- this._$editableField.focus();
72
+ this._oEditableField.focus();
73
73
  }
74
74
  },
75
75
 
@@ -85,22 +85,22 @@ sap.ui.define([
85
85
 
86
86
  var oDesignTimeMetadata = this._oEditedOverlay.getDesignTimeMetadata();
87
87
 
88
- var vEditableControlDomRef = oDesignTimeMetadata.getAssociatedDomRef(oElement, mPropertyBag.domRef);
88
+ var oEditableControlDomRef = oDesignTimeMetadata.getAssociatedDomRef(oElement, mPropertyBag.domRef);
89
89
 
90
90
  // if the Control is currently not visible on the screen, we have to scroll it into view
91
- if (!Utils.isElementInViewport(vEditableControlDomRef)) {
92
- vEditableControlDomRef.get(0).scrollIntoView();
91
+ if (!Utils.isElementInViewport(oEditableControlDomRef)) {
92
+ oEditableControlDomRef.get(0).scrollIntoView();
93
93
  }
94
94
 
95
- this._$oEditableControlDomRef = jQuery(vEditableControlDomRef); /* Text Control */
95
+ this._oEditableControlDomRef = oEditableControlDomRef.get(0); /* Text Control */
96
96
  var mMutators = typeof mPropertyBag.getTextMutators === "function"
97
97
  ? mPropertyBag.getTextMutators(oElement)
98
98
  : {
99
99
  getText: function () {
100
- return this._$oEditableControlDomRef.text();
100
+ return this._oEditableControlDomRef.textContent;
101
101
  }.bind(this),
102
102
  setText: function (sNewText) {
103
- this._$oEditableControlDomRef.text(sNewText);
103
+ this._oEditableControlDomRef.textContent = sNewText;
104
104
  }.bind(this)
105
105
  };
106
106
  this._fnGetControlText = mMutators.getText;
@@ -109,9 +109,9 @@ sap.ui.define([
109
109
 
110
110
  // case where the editable control has it's own overlay
111
111
  var oOverlayForWrapper = OverlayRegistry.getOverlay(
112
- vEditableControlDomRef.jquery
113
- ? vEditableControlDomRef.get(0).id
114
- : vEditableControlDomRef.id
112
+ oEditableControlDomRef.jquery
113
+ ? oEditableControlDomRef.get(0).id
114
+ : oEditableControlDomRef.id
115
115
  );
116
116
 
117
117
  // if the editable control overlay could not be found, then the passed overlay should be considered
@@ -119,11 +119,11 @@ sap.ui.define([
119
119
  if (!oOverlayForWrapper) {
120
120
  oOverlayForWrapper = this._oEditedOverlay;
121
121
  var _oControlForWrapperDomRef = ElementUtil.getDomRef(oElement); /* Main Control */
122
- var _oEditableControlParentDomRef = this._$oEditableControlDomRef.parent().get(0); /* Text Control parent */
122
+ var _oEditableControlParentDomRef = this._oEditableControlDomRef.parentNode; /* Text Control parent */
123
123
  var iControlForWrapperWidth = _oControlForWrapperDomRef ? parseInt(_oControlForWrapperDomRef.offsetWidth) : "NaN"; /* Main Control Width */
124
124
 
125
125
  if (!isNaN(iControlForWrapperWidth)) {
126
- var iEditableControlWidth = parseInt(this._$oEditableControlDomRef.outerWidth());
126
+ var iEditableControlWidth = parseInt(this._oEditableControlDomRef.offsetWidth);
127
127
  var iEditableControlParentWidth = parseInt(_oEditableControlParentDomRef.offsetWidth);
128
128
 
129
129
  iWidthDifference = iControlForWrapperWidth - iEditableControlWidth;
@@ -136,7 +136,7 @@ sap.ui.define([
136
136
  if (iWidthDifference < 0 && iEditableControlParentWidth) {
137
137
  if (_oEditableControlParentDomRef.id !== _oControlForWrapperDomRef.id
138
138
  && aVisibleChildren.length === 1
139
- && aVisibleChildren[0].id === this._$oEditableControlDomRef.get(0).id
139
+ && aVisibleChildren[0].id === this._oEditableControlDomRef.id
140
140
  && iControlForWrapperWidth > iEditableControlParentWidth) {
141
141
  iWidthDifference = iControlForWrapperWidth - iEditableControlParentWidth;
142
142
  } else {
@@ -155,65 +155,65 @@ sap.ui.define([
155
155
  var _oEditableFieldDomRef = document.createElement("div");
156
156
  _oEditableFieldDomRef.setAttribute("contentEditable", "true");
157
157
  _oWrapperDomRef.append(_oEditableFieldDomRef);
158
- //TODO: replace the private jQuery variable to HTMLElement
159
- this._$editableField = jQuery(_oEditableFieldDomRef);
158
+ this._oEditableField = _oEditableFieldDomRef;
160
159
 
161
160
  // if label is empty, set a preliminary dummy text at the control to get an overlay
162
161
  var sCurrentText = this._fnGetControlText();
163
162
  if (sCurrentText === "") {
164
163
  this._fnSetControlText("_?_");
165
- this._$editableField.text("");
164
+ this._oEditableField.textContent = "";
166
165
  } else {
167
- this._$editableField.text(sCurrentText);
166
+ this._oEditableField.textContent = sCurrentText;
168
167
  }
169
168
 
170
169
  this.setOldValue(RenameHandler._getCurrentEditableFieldText.call(this));
171
170
 
172
- DOMUtil.copyComputedStyle(this._$oEditableControlDomRef.get(0), this._$editableField.get(0));
173
- this._$editableField.children().remove();
174
- this._$editableField.css("visibility", "hidden");
175
-
176
- this._$editableField.css({
177
- "-moz-user-modify": "read-write",
178
- "-webkit-user-modify": "read-write",
179
- "-ms-user-modify": "read-write",
180
- "user-modify": "read-write",
181
- "user-select": "text",
182
- "-webkit-user-select": "text",
183
- "text-overflow": "clip",
184
- "white-space": "nowrap"
185
- });
171
+ DOMUtil.copyComputedStyle(this._oEditableControlDomRef, this._oEditableField);
172
+ while (this._oEditableField.lastElementChild) {
173
+ this._oEditableField.removeChild(this._oEditableField.lastElementChild);
174
+ }
175
+
176
+ this._oEditableField.style.visibility = "hidden";
177
+ this._oEditableField.style["-moz-user-modify"] = "read-write";
178
+ this._oEditableField.style["-webkit-user-modify"] = "read-write";
179
+ this._oEditableField.style["-ms-user-modify"] = "read-write";
180
+ this._oEditableField.style["user-modify"] = "read-write";
181
+ this._oEditableField.style.userSelect = "text";
182
+ this._oEditableField.style["-webkit-user-select"] = "text";
183
+ this._oEditableField.style.textOverflow = "clip";
184
+ this._oEditableField.style.whiteSpace = "nowrap";
186
185
 
187
186
  //only for renaming variants in edge browser [SPECIAL CASE]
188
187
  if (
189
188
  Device.browser.name === "ed"
190
189
  && oElement.getMetadata().getName() === "sap.ui.fl.variants.VariantManagement"
191
190
  ) {
192
- this._$editableField.css({
193
- "line-height": "normal"
194
- });
191
+ this._oEditableField.style.lineHeight = "normal";
195
192
  }
196
193
 
197
194
  Overlay.getMutationObserver().ignoreOnce({
198
- target: this._$oEditableControlDomRef.get(0)
195
+ target: this._oEditableControlDomRef
199
196
  });
200
197
 
201
- this._$editableField.one("focus", RenameHandler._onEditableFieldFocus.bind(this));
202
-
203
- this._$editableField.on("blur", RenameHandler._onEditableFieldBlur.bind(this));
204
- this._$editableField.on("keydown", RenameHandler._onEditableFieldKeydown.bind(this));
205
- this._$editableField.on("dragstart", RenameHandler._stopPropagation.bind(this));
206
- this._$editableField.on("drag", RenameHandler._stopPropagation.bind(this));
207
- this._$editableField.on("dragend", RenameHandler._stopPropagation.bind(this));
208
-
209
- this._$editableField.on("click", RenameHandler._stopPropagation.bind(this));
210
- this._$editableField.on("mousedown", RenameHandler._stopPropagation.bind(this));
211
-
212
- this._$oEditableControlDomRef.css("visibility", "hidden");
213
- jQuery(_oWrapperDomRef).offset({left: this._$oEditableControlDomRef.offset().left});
198
+ this._FocusHandler = RenameHandler._onEditableFieldFocus.bind(this);
199
+ this._oBlurHandler = RenameHandler._onEditableFieldBlur.bind(this);
200
+ this._oKeyDownHandler = RenameHandler._onEditableFieldKeydown.bind(this);
201
+ this._oStopPropagationHandler = RenameHandler._stopPropagation.bind(this);
202
+
203
+ this._oEditableField.addEventListener("focus", this._FocusHandler, {once: true});
204
+ this._oEditableField.addEventListener("blur", this._oBlurHandler);
205
+ this._oEditableField.addEventListener("keydown", this._oKeyDownHandler);
206
+ this._oEditableField.addEventListener("dragstart", this._oStopPropagationHandler);
207
+ this._oEditableField.addEventListener("drag", this._oStopPropagationHandler);
208
+ this._oEditableField.addEventListener("dragend", this._oStopPropagationHandler);
209
+ this._oEditableField.addEventListener("click", this._oStopPropagationHandler);
210
+ this._oEditableField.addEventListener("mousedown", this._oStopPropagationHandler);
211
+
212
+ this._oEditableControlDomRef.style.visibility = "hidden";
213
+ jQuery(_oWrapperDomRef).offset({left: DOMUtil.getOffset(this._oEditableControlDomRef).left});
214
214
  RenameHandler._setEditableFieldPosition.apply(this);
215
- this._$editableField.css("visibility", "");
216
- this._$editableField.trigger("focus");
215
+ this._oEditableField.style.visibility = "";
216
+ this._oEditableField.focus();
217
217
 
218
218
  // If scrolling happens during startEdit, the position of the editable field can be wrong
219
219
  // To avoid this, the position is recalculated after the scrollbar synchronization is ready
@@ -226,7 +226,7 @@ sap.ui.define([
226
226
  mPropertyBag.overlay.setSelected(true);
227
227
  sap.ui.getCore().getEventBus().publish("sap.ui.rta", mPropertyBag.pluginMethodName, {
228
228
  overlay: mPropertyBag.overlay,
229
- editableField: this._$editableField
229
+ editableField: this._oEditableField
230
230
  });
231
231
  },
232
232
 
@@ -296,22 +296,27 @@ sap.ui.define([
296
296
  _stopEdit: function (bRestoreFocus, sPluginMethodName) {
297
297
  var oOverlay;
298
298
  this.setBusy(false);
299
+ this._oEditableField.removeEventListener("blur", this._oBlurHandler);
300
+ this._oEditableField.removeEventListener("focus", this._FocusHandler);
301
+ this._oEditableField.removeEventListener("keydown", this._oKeyDownHandler);
302
+ this._oEditableField.removeEventListener("dragstart", this._oStopPropagationHandler);
303
+ this._oEditableField.removeEventListener("drag", this._oStopPropagationHandler);
304
+ this._oEditableField.removeEventListener("dragend", this._oStopPropagationHandler);
305
+ this._oEditableField.removeEventListener("click", this._oStopPropagationHandler);
306
+ this._oEditableField.removeEventListener("mousedown", this._oStopPropagationHandler);
299
307
 
300
308
  // exchange the dummy text at the label with the genuine empty text (see start_edit function)
301
309
  if (this._fnGetControlText() === "_?_") {
302
310
  this._fnSetControlText("");
303
311
  }
304
312
 
305
- //TODO: check why test gets red when this is replaced by vanilla JS
306
- this._oEditedOverlay.$().find(".sapUiRtaEditableField").remove();
307
313
  Overlay.getMutationObserver().ignoreOnce({
308
- target: this._$oEditableControlDomRef.get(0)
314
+ target: this._oEditableControlDomRef
309
315
  });
310
- this._$oEditableControlDomRef.css("visibility", "visible");
316
+ this._oEditableControlDomRef.style.visibility = "visible";
311
317
 
312
318
  if (bRestoreFocus) {
313
319
  oOverlay = this._oEditedOverlay;
314
-
315
320
  oOverlay.setSelected(true);
316
321
  oOverlay.focus();
317
322
  }
@@ -319,8 +324,12 @@ sap.ui.define([
319
324
  this._aOverlaysWithScrollbar.forEach(function(oOverlayWithScrollbar) {
320
325
  oOverlayWithScrollbar.detachScrollSynced(RenameHandler._setEditableFieldPosition, this);
321
326
  }.bind(this));
322
- delete this._$editableField;
323
- delete this._$oEditableControlDomRef;
327
+ delete this._oEditableField;
328
+ var oEditField = this._oEditedOverlay.getDomRef() && this._oEditedOverlay.getDomRef().querySelector(".sapUiRtaEditableField");
329
+ if (oEditField) {
330
+ oEditField.remove();
331
+ }
332
+ delete this._oEditableControlDomRef;
324
333
  delete this._oEditedOverlay;
325
334
  delete this._bBlurOrKeyDownStarted;
326
335
  delete this._fnGetControlText;
@@ -331,8 +340,8 @@ sap.ui.define([
331
340
  });
332
341
  },
333
342
 
334
- _onEditableFieldBlur: function () {
335
- return RenameHandler._handlePostRename.call(this, false);
343
+ _onEditableFieldBlur: function (oEvent) {
344
+ return RenameHandler._handlePostRename.call(this, false, oEvent);
336
345
  },
337
346
 
338
347
  _handlePostRename: function (bRestoreFocus, oEvent) {
@@ -415,7 +424,7 @@ sap.ui.define([
415
424
  _getCurrentEditableFieldText: function () {
416
425
  // Rename to empty string should not be possible
417
426
  // to prevent issues with disappearing elements
418
- var sText = this._$editableField.text().trim();
427
+ var sText = this._oEditableField ? this._oEditableField.textContent.trim() : "";
419
428
  return sText === "" ? sEmptyTextKey : sText;
420
429
  },
421
430
 
@@ -432,7 +441,7 @@ sap.ui.define([
432
441
  },
433
442
 
434
443
  _exit: function() {
435
- if (this._$oEditableControlDomRef) {
444
+ if (this._oEditableControlDomRef) {
436
445
  this.stopEdit(false);
437
446
  }
438
447
  }
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @class
28
28
  * @extends sap.ui.rta.plugin.Plugin
29
29
  * @author SAP SE
30
- * @version 1.112.2
30
+ * @version 1.114.0
31
31
  * @constructor
32
32
  * @private
33
33
  * @since 1.101
@@ -30,7 +30,7 @@ function (
30
30
  * @class The Selection plugin allows you to select or focus overlays with mouse or keyboard and navigate to others.
31
31
  * @extends sap.ui.rta.plugin.Plugin
32
32
  * @author SAP SE
33
- * @version 1.112.2
33
+ * @version 1.114.0
34
34
  * @constructor
35
35
  * @private
36
36
  * @since 1.34
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @class The Settings allows trigger change of settings operations on the overlay
26
26
  * @extends sap.ui.rta.plugin.Plugin
27
27
  * @author SAP SE
28
- * @version 1.112.2
28
+ * @version 1.114.0
29
29
  * @constructor
30
30
  * @private
31
31
  * @since 1.44
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * @class
24
24
  * @extends sap.ui.rta.plugin.Plugin
25
25
  * @author SAP SE
26
- * @version 1.112.2
26
+ * @version 1.114.0
27
27
  * @constructor
28
28
  * @private
29
29
  * @since 1.46
@@ -31,7 +31,7 @@ sap.ui.define([
31
31
  * @extends sap.ui.rta.plugin.Plugin
32
32
  *
33
33
  * @author SAP SE
34
- * @version 1.112.2
34
+ * @version 1.114.0
35
35
  *
36
36
  * @constructor
37
37
  * @private
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * handled by the AdditionalElements Plugin (Reveal, Add Via Delegate, Add Custom)
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.112.2
35
+ * @version 1.114.0
36
36
  * @private
37
37
  * @since 1.94
38
38
  * @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
@@ -79,25 +79,6 @@ sap.ui.define([
79
79
  });
80
80
  }
81
81
 
82
- function checkInvalidAddActions(bSibling, oSourceElementOverlay, oPlugin) {
83
- var mParents = AdditionalElementsUtils.getParents(bSibling, oSourceElementOverlay, oPlugin);
84
- var oDesignTimeMetadata = mParents.parentOverlay && mParents.parentOverlay.getDesignTimeMetadata();
85
- var aAddODataPropertyActions = oDesignTimeMetadata ? oDesignTimeMetadata.getActionDataFromAggregations("addODataProperty", mParents.parent) : [];
86
- if (aAddODataPropertyActions.length > 0) {
87
- Log.error("Outdated addODataProperty action in designtime metadata in "
88
- + oDesignTimeMetadata.getData().designtimeModule
89
- + " or propagated or via instance specific designtime metadata.");
90
- }
91
- var aAddActions = oDesignTimeMetadata ? oDesignTimeMetadata.getActionDataFromAggregations("add", mParents.parent) : [];
92
- aAddActions.forEach(function(mAddAction) {
93
- if (mAddAction["custom"]) {
94
- Log.error("Outdated custom add action in designtime metadata in "
95
- + oDesignTimeMetadata.getData().designtimeModule
96
- + " or propagated or via instance specific designtime metadata.");
97
- }
98
- });
99
- }
100
-
101
82
  function getInvisibleElements (oParentOverlay, sAggregationName, oPlugin) {
102
83
  var oParentElement = oParentOverlay.getElement();
103
84
  if (!oParentElement) {
@@ -337,8 +318,7 @@ sap.ui.define([
337
318
 
338
319
  return Promise.all([
339
320
  oRevealActionsPromise,
340
- oAddPropertyActionsPromise,
341
- checkInvalidAddActions(bSibling, oSourceElementOverlay, oPlugin)
321
+ oAddPropertyActionsPromise
342
322
  ]).then(function(aAllActions) {
343
323
  //join and condense all action data
344
324
  var mAllActions = merge(aAllActions[0], aAllActions[1]);
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @class Context - Dialog for available Fields in Runtime Authoring
33
33
  * @extends sap.ui.base.ManagedObject
34
34
  * @author SAP SE
35
- * @version 1.112.2
35
+ * @version 1.114.0
36
36
  * @constructor
37
37
  * @private
38
38
  * @since 1.44
@@ -75,7 +75,7 @@ sap.ui.define([
75
75
  * @class The plugin allows to add additional elements that exist either hidden in the UI or in the OData service
76
76
  * @extends sap.ui.rta.plugin.Plugin
77
77
  * @author SAP SE
78
- * @version 1.112.2
78
+ * @version 1.114.0
79
79
  * @constructor
80
80
  * @private
81
81
  * @since 1.44
@@ -15,7 +15,7 @@ sap.ui.define([
15
15
  * Helper object containing methods for the AdditionalElements plugin
16
16
  *
17
17
  * @author SAP SE
18
- * @version 1.112.2
18
+ * @version 1.114.0
19
19
  * @private
20
20
  * @since 1.94
21
21
  * @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * Helper object to build the RTA commands resulting from the AdditionalElements Plugin
26
26
  *
27
27
  * @author SAP SE
28
- * @version 1.112.2
28
+ * @version 1.114.0
29
29
  * @private
30
30
  * @since 1.94
31
31
  * @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
@@ -117,7 +117,7 @@ sap.ui.define([
117
117
  * @class The AddIFrame allows trigger AddIFrame operations on the overlay.
118
118
  * @extends sap.ui.rta.plugin.BaseCreate
119
119
  * @author SAP SE
120
- * @version 1.112.2
120
+ * @version 1.114.0
121
121
  * @constructor
122
122
  * @private
123
123
  * @since 1.75
@@ -4,17 +4,20 @@
4
4
  xmlns:form="sap.ui.layout.form"
5
5
  xmlns:util="sap.ui.fl.util"
6
6
  xmlns:layout="sap.ui.layout">
7
- <Dialog id="sapUiRtaAddIFrameDialog"
8
- title="{/text/dialogTitle}"
9
- verticalScrolling="true"
10
- resizable="false"
11
- class="sapUiRtaAddIFrameDialog"
12
- draggable="true"
13
- validationSuccess="onValidationSuccess"
14
- validationError="onValidationError"
15
- parseError="onValidationError"
16
- contentWidth="50rem"
17
- contentHeight="44rem">
7
+ <Dialog
8
+ id="sapUiRtaAddIFrameDialog"
9
+ title="{/text/dialogTitle}"
10
+ verticalScrolling="true"
11
+ resizable="false"
12
+ class="sapUiRtaAddIFrameDialog"
13
+ draggable="true"
14
+ validationSuccess="onValidationSuccess"
15
+ validationError="onValidationError"
16
+ parseError="onValidationError"
17
+ contentWidth="50rem"
18
+ contentHeight="44rem"
19
+ core:require="{ FloatType: 'sap/ui/model/type/Float' }"
20
+ >
18
21
  <content>
19
22
 
20
23
  <layout:VerticalLayout
@@ -61,12 +64,19 @@
61
64
  text="{/text/widthLabel}">
62
65
  </Label>
63
66
  <Input id="sapUiRtaAddIFrameDialog_WidthInput" class="sapUiRtaAddIFrameDialogWidthInput"
64
- value="{path: '/frameWidth/value', type: 'sap.ui.model.type.Float', constraints: {minimum: 1}}"
67
+ value="{path: '/frameWidth/value', type: 'FloatType', constraints: {minimum: 1}}"
65
68
  valueState="{/frameWidth/valueState}"/>
66
- <Select id="sapUiRtaAddIFrameDialog_WidthUnit" class="sapUiRtaAddIFrameDialogWidthUnit"
67
- ariaLabelledBy="sapUiRtaAddIFrameDialog_WidthUnitLabel" change="onSizeUnitChange"
68
- selectedKey="{/frameWidthUnit/value}" items="{/unitsOfMeasure}">
69
- <core:Item key="{name}" text="{name}" />
69
+ <Select
70
+ id="sapUiRtaAddIFrameDialog_WidthUnit"
71
+ class="sapUiRtaAddIFrameDialogWidthUnit"
72
+ ariaLabelledBy="sapUiRtaAddIFrameDialog_WidthUnitLabel"
73
+ selectedKey="{/frameWidthUnit/value}"
74
+ items="{/unitsOfWidthMeasure}"
75
+ showSecondaryValues= "true"
76
+ columnRatio="1:5"
77
+ width="auto"
78
+ maxWidth="400px">
79
+ <core:ListItem key="{unit}" text="{unit}" additionalText="{descriptionText}"/>
70
80
  </Select>
71
81
  </form:content>
72
82
  </form:SimpleForm>
@@ -80,12 +90,20 @@
80
90
  <Label id="sapUiRtaAddIFrameDialog_HeightLabel" class="sapUiRtaAddIFrameDialogHeightLabel" labelFor="sapUiRtaAddIFrameDialog_HeightInput"
81
91
  text="{/text/heightLabel}"/>
82
92
  <Input id="sapUiRtaAddIFrameDialog_HeightInput" class="sapUiRtaAddIFrameDialogHeightInput"
83
- value="{path: '/frameHeight/value', type: 'sap.ui.model.type.Float', constraints: {minimum: 1}}"
93
+ value="{path: '/frameHeight/value', type: 'FloatType', constraints: {minimum: 1}}"
84
94
  valueState="{/frameHeight/valueState}"/>
85
- <Select id="sapUiRtaAddIFrameDialog_HeightUnit" class="sapUiRtaAddIFrameDialogHeightUnit"
86
- ariaLabelledBy="sapUiRtaAddIFrameDialog_HeightUnitLabel" change="onSizeUnitChange"
87
- selectedKey="{/frameHeightUnit/value}" items="{/unitsOfMeasure}">
88
- <core:Item key="{name}" text="{name}" />
95
+ <Select
96
+ id="sapUiRtaAddIFrameDialog_HeightUnit"
97
+ class="sapUiRtaAddIFrameDialogHeightUnit"
98
+ ariaLabelledBy="sapUiRtaAddIFrameDialog_HeightUnitLabel"
99
+ selectedKey="{/frameHeightUnit/value}"
100
+ forceSelection="false"
101
+ items="{/unitsOfHeightMeasure}"
102
+ showSecondaryValues= "true"
103
+ columnRatio="1:5"
104
+ width="auto"
105
+ maxWidth="400px">
106
+ <core:ListItem key="{unit}" text="{= ${unit} === 'vh' ? '%' : ${unit}}" additionalText="{descriptionText}"/>
89
107
  </Select>
90
108
  </form:content>
91
109
  </form:SimpleForm>