@openui5/sap.ui.layout 1.128.0 → 1.129.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 (58) hide show
  1. package/THIRDPARTY.txt +1 -1
  2. package/package.json +2 -2
  3. package/src/sap/ui/layout/.library +1 -1
  4. package/src/sap/ui/layout/AlignedFlowLayout.js +1 -1
  5. package/src/sap/ui/layout/AssociativeSplitter.js +1 -1
  6. package/src/sap/ui/layout/BlockLayout.js +1 -1
  7. package/src/sap/ui/layout/BlockLayoutCell.js +1 -1
  8. package/src/sap/ui/layout/BlockLayoutCellData.js +1 -1
  9. package/src/sap/ui/layout/BlockLayoutRow.js +1 -1
  10. package/src/sap/ui/layout/DynamicSideContent.js +1 -1
  11. package/src/sap/ui/layout/FixFlex.js +1 -1
  12. package/src/sap/ui/layout/Grid.js +1 -1
  13. package/src/sap/ui/layout/GridData.js +1 -1
  14. package/src/sap/ui/layout/GridRenderer.js +1 -1
  15. package/src/sap/ui/layout/HorizontalLayout.js +1 -1
  16. package/src/sap/ui/layout/PaneContainer.js +1 -1
  17. package/src/sap/ui/layout/ResponsiveFlowLayout.js +1 -1
  18. package/src/sap/ui/layout/ResponsiveFlowLayoutData.js +1 -1
  19. package/src/sap/ui/layout/ResponsiveSplitter.js +1 -1
  20. package/src/sap/ui/layout/ResponsiveSplitterPage.js +1 -1
  21. package/src/sap/ui/layout/SplitPane.js +1 -1
  22. package/src/sap/ui/layout/Splitter.js +1 -1
  23. package/src/sap/ui/layout/SplitterLayoutData.js +1 -1
  24. package/src/sap/ui/layout/VerticalLayout.js +1 -1
  25. package/src/sap/ui/layout/changeHandler/AddFormContainer.js +1 -1
  26. package/src/sap/ui/layout/changeHandler/AddFormField.js +1 -1
  27. package/src/sap/ui/layout/changeHandler/AddSimpleFormField.js +22 -9
  28. package/src/sap/ui/layout/changeHandler/AddSimpleFormGroup.js +1 -1
  29. package/src/sap/ui/layout/changeHandler/HideSimpleForm.js +23 -6
  30. package/src/sap/ui/layout/changeHandler/MoveSimpleForm.js +149 -135
  31. package/src/sap/ui/layout/changeHandler/RenameFormContainer.js +1 -1
  32. package/src/sap/ui/layout/changeHandler/RenameSimpleForm.js +1 -1
  33. package/src/sap/ui/layout/changeHandler/UnhideSimpleForm.js +19 -3
  34. package/src/sap/ui/layout/cssgrid/CSSGrid.js +1 -1
  35. package/src/sap/ui/layout/cssgrid/GridBasicLayout.js +1 -1
  36. package/src/sap/ui/layout/cssgrid/GridBoxLayout.js +1 -1
  37. package/src/sap/ui/layout/cssgrid/GridItemLayoutData.js +1 -1
  38. package/src/sap/ui/layout/cssgrid/GridLayoutBase.js +1 -1
  39. package/src/sap/ui/layout/cssgrid/GridLayoutDelegate.js +1 -1
  40. package/src/sap/ui/layout/cssgrid/GridResponsiveLayout.js +1 -1
  41. package/src/sap/ui/layout/cssgrid/GridSettings.js +1 -1
  42. package/src/sap/ui/layout/cssgrid/ResponsiveColumnItemLayoutData.js +1 -1
  43. package/src/sap/ui/layout/cssgrid/ResponsiveColumnLayout.js +1 -1
  44. package/src/sap/ui/layout/form/ColumnContainerData.js +1 -1
  45. package/src/sap/ui/layout/form/ColumnElementData.js +1 -1
  46. package/src/sap/ui/layout/form/ColumnLayout.js +1 -1
  47. package/src/sap/ui/layout/form/Form.js +1 -1
  48. package/src/sap/ui/layout/form/FormContainer.js +1 -1
  49. package/src/sap/ui/layout/form/FormElement.js +1 -1
  50. package/src/sap/ui/layout/form/FormLayout.js +1 -1
  51. package/src/sap/ui/layout/form/GridContainerData.js +1 -1
  52. package/src/sap/ui/layout/form/GridElementData.js +1 -1
  53. package/src/sap/ui/layout/form/GridLayout.js +1 -1
  54. package/src/sap/ui/layout/form/ResponsiveGridLayout.js +1 -1
  55. package/src/sap/ui/layout/form/ResponsiveLayout.js +1 -1
  56. package/src/sap/ui/layout/form/SemanticFormElement.js +1 -1
  57. package/src/sap/ui/layout/form/SimpleForm.js +1 -1
  58. package/src/sap/ui/layout/library.js +2 -2
package/THIRDPARTY.txt CHANGED
@@ -468,7 +468,7 @@ License: Apache-2.0
468
468
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
469
469
  Contained in: lib/jsdoc/ui5/plugin.js
470
470
 
471
- Component: SAP Theming Base Content, version: 11.16.1
471
+ Component: SAP Theming Base Content, version: 11.18.0
472
472
  Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
473
473
  License: Apache-2.0
474
474
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.layout",
3
- "version": "1.128.0",
3
+ "version": "1.129.0",
4
4
  "description": "OpenUI5 UI Library sap.ui.layout",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -14,6 +14,6 @@
14
14
  "url": "https://github.com/SAP/openui5.git"
15
15
  },
16
16
  "dependencies": {
17
- "@openui5/sap.ui.core": "1.128.0"
17
+ "@openui5/sap.ui.core": "1.129.0"
18
18
  }
19
19
  }
@@ -6,7 +6,7 @@
6
6
  <copyright>OpenUI5
7
7
  * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.128.0</version>
9
+ <version>1.129.0</version>
10
10
 
11
11
  <documentation>SAPUI5 library with layout controls.</documentation>
12
12
 
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  * @extends sap.ui.core.Control
41
41
  *
42
42
  * @author SAP SE
43
- * @version 1.128.0
43
+ * @version 1.129.0
44
44
  *
45
45
  * @constructor
46
46
  * @private
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @extends sap.ui.layout.Splitter
26
26
  *
27
27
  * @author SAP SE
28
- * @version 1.128.0
28
+ * @version 1.129.0
29
29
  *
30
30
  * @constructor
31
31
  * @private
@@ -63,7 +63,7 @@ sap.ui.define([
63
63
  * @extends sap.ui.core.Control
64
64
  *
65
65
  * @author SAP SE
66
- * @version 1.128.0
66
+ * @version 1.129.0
67
67
  *
68
68
  * @constructor
69
69
  * @public
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @extends sap.ui.core.Control
27
27
  *
28
28
  * @author SAP SE
29
- * @version 1.128.0
29
+ * @version 1.129.0
30
30
  *
31
31
  * @constructor
32
32
  * @public
@@ -18,7 +18,7 @@ sap.ui.define(['sap/ui/core/LayoutData', './library'],
18
18
  * @class
19
19
  * Holds layout data for the BlockLayoutCells contents.
20
20
  * @extends sap.ui.core.LayoutData
21
- * @version 1.128.0
21
+ * @version 1.129.0
22
22
  * @constructor
23
23
  * @public
24
24
  * @since 1.50.0
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @extends sap.ui.core.Control
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.128.0
35
+ * @version 1.129.0
36
36
  *
37
37
  * @constructor
38
38
  * @public
@@ -97,7 +97,7 @@ sap.ui.define([
97
97
  * @extends sap.ui.core.Control
98
98
  *
99
99
  * @author SAP SE
100
- * @version 1.128.0
100
+ * @version 1.129.0
101
101
  *
102
102
  * @constructor
103
103
  * @public
@@ -53,7 +53,7 @@ sap.ui.define([
53
53
  * @extends sap.ui.core.Control
54
54
  *
55
55
  * @author SAP SE
56
- * @version 1.128.0
56
+ * @version 1.129.0
57
57
  *
58
58
  * @constructor
59
59
  * @public
@@ -59,7 +59,7 @@ sap.ui.define([
59
59
  * @extends sap.ui.core.Control
60
60
  *
61
61
  * @author SAP SE
62
- * @version 1.128.0
62
+ * @version 1.129.0
63
63
  *
64
64
  * @constructor
65
65
  * @public
@@ -28,7 +28,7 @@ sap.ui.define(['sap/ui/core/LayoutData', './library', "sap/base/Log"],
28
28
  * @extends sap.ui.core.LayoutData
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.128.0
31
+ * @version 1.129.0
32
32
  *
33
33
  * @constructor
34
34
  * @public
@@ -15,7 +15,7 @@ sap.ui.define(["sap/ui/Device", "sap/ui/layout/library"],
15
15
  /**
16
16
  * @author SAP SE
17
17
  * @version
18
- * 1.128.0
18
+ * 1.129.0
19
19
  * @namespace
20
20
  */
21
21
  var GridRenderer = {
@@ -22,7 +22,7 @@ sap.ui.define(['sap/ui/core/Control', './library', "./HorizontalLayoutRenderer"]
22
22
  * @extends sap.ui.core.Control
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.128.0
25
+ * @version 1.129.0
26
26
  *
27
27
  * @constructor
28
28
  * @public
@@ -24,7 +24,7 @@ sap.ui.define(['./library', 'sap/ui/core/Element', './AssociativeSplitter', 'sap
24
24
  * @extends sap.ui.core.Element
25
25
  *
26
26
  * @author SAP SE
27
- * @version 1.128.0
27
+ * @version 1.129.0
28
28
  *
29
29
  * @constructor
30
30
  * @public
@@ -42,7 +42,7 @@ sap.ui.define([
42
42
  * @extends sap.ui.core.Control
43
43
  *
44
44
  * @author SAP SE
45
- * @version 1.128.0
45
+ * @version 1.129.0
46
46
  *
47
47
  * @constructor
48
48
  * @public
@@ -22,7 +22,7 @@ sap.ui.define(['sap/ui/core/LayoutData', './library', "sap/base/Log"],
22
22
  * @extends sap.ui.core.LayoutData
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.128.0
25
+ * @version 1.129.0
26
26
  *
27
27
  * @constructor
28
28
  * @public
@@ -72,7 +72,7 @@ sap.ui.define([
72
72
  * @extends sap.ui.core.Control
73
73
  *
74
74
  * @author SAP SE
75
- * @version 1.128.0
75
+ * @version 1.129.0
76
76
  *
77
77
  * @constructor
78
78
  * @public
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @extends sap.ui.core.Control
25
25
  *
26
26
  * @author SAP SE
27
- * @version 1.128.0
27
+ * @version 1.129.0
28
28
  *
29
29
  * @constructor
30
30
  * @private
@@ -26,7 +26,7 @@ sap.ui.define(['./library', 'sap/ui/core/Element'],
26
26
  * @extends sap.ui.core.Element
27
27
  *
28
28
  * @author SAP SE
29
- * @version 1.128.0
29
+ * @version 1.129.0
30
30
  *
31
31
  * @constructor
32
32
  * @public
@@ -72,7 +72,7 @@ sap.ui.define([
72
72
  * @extends sap.ui.core.Control
73
73
  *
74
74
  * @author SAP SE
75
- * @version 1.128.0
75
+ * @version 1.129.0
76
76
  *
77
77
  * @constructor
78
78
  * @public
@@ -21,7 +21,7 @@ sap.ui.define(['sap/ui/core/LayoutData', './library'],
21
21
  * Holds layout data for the splitter contents.
22
22
 
23
23
  * @extends sap.ui.core.LayoutData
24
- * @version 1.128.0
24
+ * @version 1.129.0
25
25
  *
26
26
  * @constructor
27
27
  * @public
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @extends sap.ui.core.Control
28
28
  *
29
29
  * @author SAP SE
30
- * @version 1.128.0
30
+ * @version 1.129.0
31
31
  *
32
32
  * @constructor
33
33
  * @public
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * Change handler for adding a form group.
18
18
  * @alias sap.ui.layout.changeHandler.AddFormContainer
19
19
  * @author SAP SE
20
- * @version 1.128.0
20
+ * @version 1.129.0
21
21
  * @experimental Since 1.48.0
22
22
  */
23
23
  var AddGroup = { };
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  *
20
20
  * @author SAP SE
21
21
  *
22
- * @version 1.128.0
22
+ * @version 1.129.0
23
23
  *
24
24
  * @experimental Since 1.50.0 This class is experimental and provides only limited functionality. Also the API might be
25
25
  * changed in future.
@@ -77,7 +77,7 @@ sap.ui.define([
77
77
  *
78
78
  * @author SAP SE
79
79
  *
80
- * @version 1.128.0
80
+ * @version 1.129.0
81
81
  *
82
82
  * @experimental Since 1.49.0 This class is experimental and provides only limited functionality. Also the API might be
83
83
  * changed in future.
@@ -155,17 +155,30 @@ sap.ui.define([
155
155
  });
156
156
 
157
157
  AddSimpleFormField.getChangeVisualizationInfo = function(oChange, oAppComponent) {
158
- var oRevertData = oChange.getRevertData();
158
+ const oFormSelector = oChange.getSelector();
159
+ const oForm = JsControlTreeModifier.bySelector(oFormSelector, oAppComponent);
160
+ const oRevertData = oChange.getRevertData();
161
+ const oReturn = {
162
+ updateRequired: true
163
+ };
159
164
 
160
165
  if (oRevertData && oRevertData.labelSelector) {
161
- return {
162
- affectedControls: [JsControlTreeModifier.bySelector(oRevertData.labelSelector, oAppComponent).getParent().getId()],
163
- updateRequired: true
164
- };
166
+ const oLabel = JsControlTreeModifier.bySelector(oRevertData.labelSelector, oAppComponent);
167
+ oReturn.affectedControls = [oLabel.getParent().getId()];
168
+ // If the label is currently invisible, the indicator should be on the form (it can't be the group because it could have been headerless)
169
+ if (!oLabel.getVisible()) {
170
+ oReturn.displayControls = [oForm];
171
+ }
172
+ } else {
173
+ const oElement = JsControlTreeModifier.bySelector(oChange.getContent().elementSelector, oAppComponent);
174
+ oReturn.affectedControls = [oChange.getContent().newFieldSelector];
175
+ // If the element is currently invisible, the indicator should be on on the form (it can't be the group because it could have been headerless)
176
+ if (!oElement.getVisible()) {
177
+ oReturn.displayControls = [oForm];
178
+ }
165
179
  }
166
- return {
167
- affectedControls: [oChange.getContent().newFieldSelector]
168
- };
180
+
181
+ return oReturn;
169
182
  };
170
183
 
171
184
  AddSimpleFormField.getCondenserInfo = function() {
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * Change handler for adding a simple form group.
18
18
  * @alias sap.ui.layout.changeHandler.AddSimpleFormGroup
19
19
  * @author SAP SE
20
- * @version 1.128.0
20
+ * @version 1.129.0
21
21
  * @experimental Since 1.27.0
22
22
  */
23
23
  var AddSimpleFormGroup = {};
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * Change handler for hiding of a control.
20
20
  * @alias sap.ui.fl.changeHandler.HideControl
21
21
  * @author SAP SE
22
- * @version 1.128.0
22
+ * @version 1.129.0
23
23
  * @experimental Since 1.27.0
24
24
  */
25
25
  var HideForm = { };
@@ -276,12 +276,29 @@ sap.ui.define([
276
276
  });
277
277
  };
278
278
 
279
- HideForm.getChangeVisualizationInfo = function(oChange) {
280
- var oSelector = oChange.getContent().elementSelector;
281
- var oDisplaySelector = oChange.getSelector();
279
+ HideForm.getChangeVisualizationInfo = function(oChange, oAppComponent) {
280
+ const oElementSelector = oChange.getContent().elementSelector;
281
+ const oFormSelector = oChange.getSelector();
282
+ const oForm = JsControlTreeModifier.bySelector(oFormSelector, oAppComponent);
283
+ const oElement = JsControlTreeModifier.bySelector(oElementSelector, oAppComponent);
284
+ const oElementParent = oElement.getParent();
285
+
286
+ // If a Group is being hidden, always show on the form since groups can't be revealed
287
+ let sDisplayElementId = oForm.getId();
288
+
289
+ // FormElement is being hidden
290
+ if (oElementParent.isA("sap.ui.layout.form.FormElement")) {
291
+ // If the Label is currently visible, the indicator should be on the form element (e.g. after the element is revealed)
292
+ // Otherwise we show it on the form, since the group element could have been in a group that got removed, leading to
293
+ // inconsistencies in the visualization
294
+ if (oElement.getVisible()) {
295
+ sDisplayElementId = oElementParent.getId();
296
+ }
297
+ }
298
+
282
299
  return {
283
- affectedControls: [oSelector],
284
- displayControls: [oDisplaySelector],
300
+ affectedControls: [oElement.getId()],
301
+ displayControls: [sDisplayElementId],
285
302
  updateRequired: true
286
303
  };
287
304
  };
@@ -22,20 +22,21 @@ sap.ui.define([
22
22
  *
23
23
  * @alias sap.ui.layout.changeHandler.MoveSimpleForm
24
24
  * @author SAP SE
25
- * @version 1.128.0
25
+ * @version 1.129.0
26
26
  * @experimental Since 1.34.0
27
27
  */
28
- var MoveSimpleForm = {};
29
-
30
- MoveSimpleForm.CHANGE_TYPE_MOVE_FIELD = "moveSimpleFormField";
31
- MoveSimpleForm.CHANGE_TYPE_MOVE_GROUP = "moveSimpleFormGroup";
32
- MoveSimpleForm.sTypeTitle = "sap.ui.core.Title";
33
- MoveSimpleForm.sTypeMTitle = "sap.m.Title";
34
- MoveSimpleForm.sTypeToolBar = "sap.m.Toolbar";
35
- MoveSimpleForm.sTypeOverflowToolBar = "sap.m.OverflowToolbar";
36
- MoveSimpleForm.sTypeLabel = "sap.m.Label";
37
- MoveSimpleForm.sTypeSmartLabel = "sap.ui.comp.smartfield.SmartLabel";
38
- MoveSimpleForm.CONTENT_AGGREGATION = "content";
28
+ const MoveSimpleForm = {};
29
+
30
+ const CHANGE_TYPE_MOVE_FIELD = "moveSimpleFormField";
31
+ const CHANGE_TYPE_MOVE_GROUP = "moveSimpleFormGroup";
32
+ const TITLE_TYPE = "sap.ui.core.Title";
33
+ const MTITLE_TYPE = "sap.m.Title";
34
+ const TOOLBAR_TYPE = "sap.m.Toolbar";
35
+ const OVERFLOW_TOOLBAR_TYPE = "sap.m.OverflowToolbar";
36
+ const LABEL_TYPE = "sap.m.Label";
37
+ const SMARTLABEL_TYPE = "sap.ui.comp.smartfield.SmartLabel";
38
+ const CONTENT_AGGREGATION = "content";
39
+ const FORM_CONTAINER = "sap.ui.layout.form.FormContainer";
39
40
 
40
41
  function firstGroupWithoutTitle(oModifier, aStopToken, aContent) {
41
42
  return aContent.reduce(function(oPreviousPromise, oContent){
@@ -44,7 +45,7 @@ sap.ui.define([
44
45
  if (bReturnValue !== undefined) {
45
46
  return bReturnValue;
46
47
  }
47
- var sType = oModifier.getControlType(oContent);
48
+ const sType = oModifier.getControlType(oContent);
48
49
  if (aStopToken.indexOf(sType) === -1) {
49
50
  return Promise.resolve()
50
51
  .then(oModifier.getVisible.bind(oModifier, oContent))
@@ -62,18 +63,18 @@ sap.ui.define([
62
63
  return firstGroupWithoutTitle(oModifier, aStopToken, aContent)
63
64
  .then(function(bFirstGroupWithoutName){
64
65
  if (bFirstGroupWithoutName) {
65
- var oView = mPropertyBag.view;
66
- var oAppComponent = mPropertyBag.appComponent;
67
- var oTitle;
66
+ const oView = mPropertyBag.view;
67
+ const oAppComponent = mPropertyBag.appComponent;
68
+ let oTitle;
68
69
  return Promise.resolve()
69
- .then(oModifier.createControl.bind(oModifier, "sap.ui.core.Title", oAppComponent, oView, oGroupSelector))
70
+ .then(oModifier.createControl.bind(oModifier, TITLE_TYPE, oAppComponent, oView, oGroupSelector))
70
71
  .then(function(oCreatedTitle){
71
72
  oTitle = oCreatedTitle;
72
73
  oModifier.setProperty(oTitle, "text", "");
73
- return oModifier.insertAggregation(oSimpleForm, "content", oTitle, 0, oView);
74
+ return oModifier.insertAggregation(oSimpleForm, CONTENT_AGGREGATION, oTitle, 0, oView);
74
75
  })
75
76
  .then(function() {
76
- var oNewRevertData = oChange.getRevertData();
77
+ const oNewRevertData = oChange.getRevertData();
77
78
  oNewRevertData.createdTitleSelector = mPropertyBag.modifier.getSelector(oTitle, mPropertyBag.appComponent);
78
79
  oChange.setRevertData(oNewRevertData);
79
80
  });
@@ -81,21 +82,21 @@ sap.ui.define([
81
82
  return Promise.resolve();
82
83
  })
83
84
  .then(function(){
84
- return oModifier.getAggregation(oSimpleForm, "content");
85
+ return oModifier.getAggregation(oSimpleForm, CONTENT_AGGREGATION);
85
86
  });
86
87
  }
87
88
 
88
89
  function mapGroupIndexToContentAggregationIndex(oModifier, aStopToken, aContent, iGroupIndex) {
89
- var oResult;
90
- var iCurrentGroupIndex = -1;
90
+ let oResult;
91
+ let iCurrentGroupIndex = -1;
91
92
 
92
93
  return firstGroupWithoutTitle(oModifier, aStopToken, aContent)
93
94
  .then(function(bFirstGroupWithoutName){
94
95
  if (bFirstGroupWithoutName) {
95
96
  iCurrentGroupIndex++;
96
97
  }
97
- for (var i = 0; i < aContent.length; i++) {
98
- var sType = oModifier.getControlType(aContent[i]);
98
+ for (let i = 0; i < aContent.length; i++) {
99
+ const sType = oModifier.getControlType(aContent[i]);
99
100
  if (aStopToken.indexOf(sType) > -1) {
100
101
  iCurrentGroupIndex++;
101
102
  if (iCurrentGroupIndex === iGroupIndex) {
@@ -112,19 +113,19 @@ sap.ui.define([
112
113
  if (iIndex >= aElements.length || iIndex === -1) {
113
114
  return true;
114
115
  }
115
- var sType = oModifier.getControlType(aElements[iIndex]);
116
+ const sType = oModifier.getControlType(aElements[iIndex]);
116
117
  return (
117
- MoveSimpleForm.sTypeTitle === sType
118
- || MoveSimpleForm.sTypeToolBar === sType
119
- || MoveSimpleForm.sTypeMTitle === sType
120
- || MoveSimpleForm.sTypeOverflowToolBar === sType
118
+ TITLE_TYPE === sType
119
+ || TOOLBAR_TYPE === sType
120
+ || MTITLE_TYPE === sType
121
+ || OVERFLOW_TOOLBAR_TYPE === sType
121
122
  );
122
123
  }
123
124
 
124
125
  function measureLengthOfSequenceUntilStopToken(oModifier, iMovedElementIndex, aContent, aStopToken) {
125
- var i = 0;
126
+ let i = 0;
126
127
  for (i = iMovedElementIndex + 1; i < aContent.length; ++i) {
127
- var sType = oModifier.getControlType(aContent[i]);
128
+ const sType = oModifier.getControlType(aContent[i]);
128
129
  if (aStopToken.indexOf(sType) > -1) {
129
130
  break;
130
131
  }
@@ -135,12 +136,12 @@ sap.ui.define([
135
136
  function getFieldLength(oModifier, aElements, iIndex) {
136
137
  return measureLengthOfSequenceUntilStopToken(oModifier, iIndex, aElements,
137
138
  [
138
- MoveSimpleForm.sTypeTitle,
139
- MoveSimpleForm.sTypeMTitle,
140
- MoveSimpleForm.sTypeToolBar,
141
- MoveSimpleForm.sTypeOverflowToolBar,
142
- MoveSimpleForm.sTypeLabel,
143
- MoveSimpleForm.sTypeSmartLabel
139
+ TITLE_TYPE,
140
+ MTITLE_TYPE,
141
+ TOOLBAR_TYPE,
142
+ OVERFLOW_TOOLBAR_TYPE,
143
+ LABEL_TYPE,
144
+ SMARTLABEL_TYPE
144
145
  ]
145
146
  );
146
147
  }
@@ -148,11 +149,12 @@ sap.ui.define([
148
149
  function mapFieldIndexToContentAggregationIndex(oModifier, aContent, iGroupStart, iFieldIndex, bUp) {
149
150
  if (!isTitleOrToolbar(aContent, iGroupStart, oModifier)) {
150
151
  Log.error("Illegal argument. iIndex has to point to a Label.");
152
+ return -1;
151
153
  } else {
152
154
  iFieldIndex = bUp ? iFieldIndex + 1 : iFieldIndex;
153
- var iCurrentRelativeFieldIndex = 0;
154
- var iAbsolutIndex = iGroupStart;
155
- var iActLength;
155
+ let iCurrentRelativeFieldIndex = 0;
156
+ let iAbsolutIndex = iGroupStart;
157
+ let iActLength;
156
158
  while (iAbsolutIndex < aContent.length && iCurrentRelativeFieldIndex < iFieldIndex) {
157
159
  ++iCurrentRelativeFieldIndex;
158
160
  iActLength = getFieldLength(oModifier, aContent, iAbsolutIndex);
@@ -163,8 +165,8 @@ sap.ui.define([
163
165
  }
164
166
 
165
167
  function arrayRangeCopy(aSource, iSourceIndex, aTarget, iTargetIndex, iMovedLength) {
166
- var aResult = aTarget;
167
- for (var i = 0; i < iMovedLength; i++) {
168
+ const aResult = aTarget;
169
+ for (let i = 0; i < iMovedLength; i++) {
168
170
  aResult.splice(iTargetIndex + i, 0, aSource[iSourceIndex + i]);
169
171
  }
170
172
  return aResult;
@@ -175,9 +177,9 @@ sap.ui.define([
175
177
  }
176
178
 
177
179
  function moveFormContainer(oSimpleForm, mMovedElement, mPropertyBag) {
178
- var oMovedGroupTitle = getGroupHeader(mMovedElement.element);
179
- var oSimpleFormSelector = mPropertyBag.modifier.getSelector(oSimpleForm, mPropertyBag.appComponent);
180
- var mMovedSimpleFormElement = {
180
+ const oMovedGroupTitle = getGroupHeader(mMovedElement.element);
181
+ const oSimpleFormSelector = mPropertyBag.modifier.getSelector(oSimpleForm, mPropertyBag.appComponent);
182
+ const mMovedSimpleFormElement = {
181
183
  elementSelector: mPropertyBag.modifier.getSelector(oMovedGroupTitle, mPropertyBag.appComponent),
182
184
  source: {
183
185
  groupIndex: mMovedElement.sourceIndex
@@ -188,7 +190,7 @@ sap.ui.define([
188
190
  };
189
191
 
190
192
  return {
191
- changeType: MoveSimpleForm.CHANGE_TYPE_MOVE_GROUP,
193
+ changeType: CHANGE_TYPE_MOVE_GROUP,
192
194
  targetSelector: oSimpleFormSelector,
193
195
  movedControl: oMovedGroupTitle,
194
196
  movedElements: [mMovedSimpleFormElement]
@@ -196,28 +198,36 @@ sap.ui.define([
196
198
  }
197
199
 
198
200
  function moveFormElement(oSimpleForm, mMovedElement, oSource, oTarget, mPropertyBag) {
199
- var oSimpleFormSelector = mPropertyBag.modifier.getSelector(oSimpleForm, mPropertyBag.appComponent);
200
- var oLabel = mMovedElement.element.getLabel();
201
- var oLabelSelector = mPropertyBag.modifier.getSelector(oLabel, mPropertyBag.appComponent);
202
- var oTargetGroupHeader = getGroupHeader(oTarget.parent);
203
- var oSourceGroupHeader = getGroupHeader(oSource.parent);
204
- var oTargetGroupSelector = mPropertyBag.modifier.getSelector(oTargetGroupHeader, mPropertyBag.appComponent);
205
- var oSourceGroupSelector = mPropertyBag.modifier.getSelector(oSourceGroupHeader, mPropertyBag.appComponent);
206
-
207
- var oMovedElement = {
201
+ const oSimpleFormSelector = mPropertyBag.modifier.getSelector(oSimpleForm, mPropertyBag.appComponent);
202
+ const oLabel = mMovedElement.element.getLabel();
203
+ const oLabelSelector = mPropertyBag.modifier.getSelector(oLabel, mPropertyBag.appComponent);
204
+ const oTargetGroupHeader = getGroupHeader(oTarget.parent);
205
+ const oSourceGroupHeader = getGroupHeader(oSource.parent);
206
+ const oTargetSelector = mPropertyBag.modifier.getSelector(oTargetGroupHeader, mPropertyBag.appComponent);
207
+ const oSourceSelector = mPropertyBag.modifier.getSelector(oSourceGroupHeader, mPropertyBag.appComponent);
208
+
209
+ // When moving a field from/to a headerless group, save the parent id instead of the header id
210
+ if (!oSourceSelector.id) {
211
+ oSourceSelector.id = oSource.parent.getId();
212
+ }
213
+ if (!oTargetSelector.id) {
214
+ oTargetSelector.id = oTarget.parent.getId();
215
+ }
216
+
217
+ const oMovedElement = {
208
218
  elementSelector: oLabelSelector,
209
219
  source: {
210
- groupSelector: oSourceGroupSelector,
220
+ groupSelector: oSourceSelector,
211
221
  fieldIndex: mMovedElement.sourceIndex
212
222
  },
213
223
  target: {
214
- groupSelector: oTargetGroupSelector,
224
+ groupSelector: oTargetSelector,
215
225
  fieldIndex: mMovedElement.targetIndex
216
226
  }
217
227
  };
218
228
 
219
229
  return {
220
- changeType: MoveSimpleForm.CHANGE_TYPE_MOVE_FIELD,
230
+ changeType: CHANGE_TYPE_MOVE_FIELD,
221
231
  targetSelector: oSimpleFormSelector,
222
232
  target: oTargetGroupHeader,
223
233
  source: oSourceGroupHeader,
@@ -241,7 +251,7 @@ sap.ui.define([
241
251
  return oPreviousPromise
242
252
  .then(oModifier.insertAggregation.bind(oModifier,
243
253
  oSimpleForm,
244
- MoveSimpleForm.CONTENT_AGGREGATION,
254
+ CONTENT_AGGREGATION,
245
255
  oContentClone,
246
256
  iIndex,
247
257
  oView));
@@ -264,49 +274,49 @@ sap.ui.define([
264
274
  * @public
265
275
  */
266
276
  MoveSimpleForm.applyChange = function(oChange, oSimpleForm, mPropertyBag) {
267
- var oModifier = mPropertyBag.modifier;
268
- var oView = mPropertyBag.view;
269
- var oAppComponent = mPropertyBag.appComponent;
270
- var oTargetGroup;
271
- var aContentClone;
272
- var iMovedGroupIndex;
273
-
274
- var oContent = oChange.getContent();
275
- var mMovedElement = oContent.movedElements[0];
277
+ const oModifier = mPropertyBag.modifier;
278
+ const oView = mPropertyBag.view;
279
+ const oAppComponent = mPropertyBag.appComponent;
280
+ let oTargetGroup;
281
+ let aContentClone;
282
+ let iMovedGroupIndex;
283
+
284
+ const oContent = oChange.getContent();
285
+ const mMovedElement = oContent.movedElements[0];
276
286
  return Promise.resolve()
277
287
  .then(function(){
278
- return oModifier.getAggregation(oSimpleForm, MoveSimpleForm.CONTENT_AGGREGATION);
288
+ return oModifier.getAggregation(oSimpleForm, CONTENT_AGGREGATION);
279
289
  })
280
290
  .then(function(aContent){
281
- var aContentSelectors = aContent.map(function(oContentControl) {
291
+ const aContentSelectors = aContent.map(function(oContentControl) {
282
292
  return oModifier.getSelector(oContentControl, oAppComponent);
283
293
  });
284
- var mState = {content: aContentSelectors};
294
+ const mState = {content: aContentSelectors};
285
295
  oChange.setRevertData(mState);
286
296
 
287
- if (oChange.getChangeType() === MoveSimpleForm.CHANGE_TYPE_MOVE_FIELD) {
297
+ if (oChange.getChangeType() === CHANGE_TYPE_MOVE_FIELD) {
288
298
  // !important: element was used in 1.40, do not remove for compatibility!
289
- var oSourceField = oModifier.bySelector(mMovedElement.elementSelector || mMovedElement.element, oAppComponent, oView);
290
- var iSourceFieldIndex = aContent.indexOf(oSourceField);
291
- var iSourceFieldLength = getFieldLength(oModifier, aContent, iSourceFieldIndex);
299
+ const oSourceField = oModifier.bySelector(mMovedElement.elementSelector || mMovedElement.element, oAppComponent, oView);
300
+ const iSourceFieldIndex = aContent.indexOf(oSourceField);
301
+ const iSourceFieldLength = getFieldLength(oModifier, aContent, iSourceFieldIndex);
292
302
 
293
303
  // Compute the fields target index
294
304
  // !important: groupId was used in 1.40, do not remove for compatibility!
305
+ const oSourceGroup = oModifier.bySelector(mMovedElement.source.groupSelector || mMovedElement.source.groupId, oAppComponent, oView);
295
306
  oTargetGroup = oModifier.bySelector(mMovedElement.target.groupSelector || mMovedElement.target.groupId, oAppComponent, oView);
296
- var iTargetGroupIndex = aContent.indexOf(oTargetGroup);
297
- // !important: groupId was used in 1.40, do not remove for compatibility!
298
- var oSourceGroup = oModifier.bySelector(mMovedElement.source.groupSelector || mMovedElement.source.groupId, oAppComponent, oView);
299
- var iSourceGroupIndex = aContent.indexOf(oSourceGroup);
300
307
 
301
- var iTargetFieldIndex = mapFieldIndexToContentAggregationIndex(oModifier, aContent, iTargetGroupIndex,
308
+ // If the source/target groups are FormContainers, they are not part of aContent and get ignored in the following logic
309
+ const iSourceGroupIndex = aContent.indexOf(oSourceGroup);
310
+ const iTargetGroupIndex = aContent.indexOf(oTargetGroup);
311
+ const iTargetFieldIndex = mapFieldIndexToContentAggregationIndex(oModifier, aContent, iTargetGroupIndex,
302
312
  mMovedElement.target.fieldIndex, (iSourceGroupIndex === iTargetGroupIndex)
303
313
  && (mMovedElement.source.fieldIndex < mMovedElement.target.fieldIndex));
304
- var iTargetFieldLength = getFieldLength(oModifier, aContent, iTargetFieldIndex);
314
+ const iTargetFieldLength = getFieldLength(oModifier, aContent, iTargetFieldIndex);
305
315
 
306
316
  aContentClone = aContent.slice();
307
- var aFieldElements = aContentClone.slice(iSourceFieldIndex, iSourceFieldIndex + iSourceFieldLength);
317
+ const aFieldElements = aContentClone.slice(iSourceFieldIndex, iSourceFieldIndex + iSourceFieldLength);
308
318
 
309
- var aSegmentBeforeSource, aSegmentBeforeTarget, aSegmentBetweenSourceAndTarget, aSegmentTillEnd;
319
+ let aSegmentBeforeSource, aSegmentBeforeTarget, aSegmentBetweenSourceAndTarget, aSegmentTillEnd;
310
320
  if (iSourceFieldIndex < iTargetFieldIndex) {
311
321
  aSegmentBeforeSource = aContentClone.slice(0, iSourceFieldIndex);
312
322
  aSegmentBetweenSourceAndTarget = aContentClone.slice(iSourceFieldIndex + iSourceFieldLength, iTargetFieldIndex
@@ -324,15 +334,13 @@ sap.ui.define([
324
334
  return removeAndInsertAggregation(oModifier, oSimpleForm, MoveSimpleForm, aContentClone, aContent, oView);
325
335
  }
326
336
 
327
- } else if (oChange.getChangeType() === MoveSimpleForm.CHANGE_TYPE_MOVE_GROUP) {
328
-
329
- var aStopGroupToken = [MoveSimpleForm.sTypeTitle,
330
- MoveSimpleForm.sTypeToolBar,
331
- MoveSimpleForm.sTypeMTitle,
332
- MoveSimpleForm.sTypeOverflowToolBar];
337
+ } else if (oChange.getChangeType() === CHANGE_TYPE_MOVE_GROUP) {
338
+ const aStopGroupToken = [TITLE_TYPE,
339
+ TOOLBAR_TYPE,
340
+ MTITLE_TYPE,
341
+ OVERFLOW_TOOLBAR_TYPE];
333
342
  // !important: element was used in 1.40, do not remove for compatibility!
334
- var oMovedGroup = oModifier.bySelector(mMovedElement.elementSelector || mMovedElement.element, oAppComponent, oView);
335
-
343
+ const oMovedGroup = oModifier.bySelector(mMovedElement.elementSelector || mMovedElement.element, oAppComponent, oView);
336
344
  return Promise.resolve()
337
345
  .then(function(){
338
346
  // If needed, insert a Title for the first group.
@@ -350,9 +358,9 @@ sap.ui.define([
350
358
  })
351
359
  .then(function(iTargetIndex){
352
360
  oTargetGroup = aContent[iTargetIndex];
353
- var iTargetLength = measureLengthOfSequenceUntilStopToken(oModifier, iTargetIndex, aContent, aStopGroupToken);
361
+ const iTargetLength = measureLengthOfSequenceUntilStopToken(oModifier, iTargetIndex, aContent, aStopGroupToken);
354
362
 
355
- var iMovedLength = measureLengthOfSequenceUntilStopToken(oModifier, iMovedGroupIndex, aContent,
363
+ const iMovedLength = measureLengthOfSequenceUntilStopToken(oModifier, iMovedGroupIndex, aContent,
356
364
  aStopGroupToken);
357
365
  aContentClone = aContent.slice();
358
366
  // Cut the moved group from the result array...
@@ -360,7 +368,7 @@ sap.ui.define([
360
368
 
361
369
  iTargetIndex = aContentClone.indexOf(oTargetGroup);
362
370
 
363
- var iOffset = mMovedElement.source.groupIndex < mMovedElement.target.groupIndex ? iTargetLength : 0;
371
+ const iOffset = mMovedElement.source.groupIndex < mMovedElement.target.groupIndex ? iTargetLength : 0;
364
372
  // and insert it at the target index
365
373
  aContentClone = arrayRangeCopy(aContent, iMovedGroupIndex, aContentClone, iTargetIndex + iOffset, iMovedLength);
366
374
 
@@ -384,21 +392,21 @@ sap.ui.define([
384
392
  * @public
385
393
  */
386
394
  MoveSimpleForm.completeChangeContent = function(oChange, mSpecificChangeInfo, mPropertyBag) {
387
- var mStableChangeInfo;
395
+ let mStableChangeInfo;
388
396
 
389
- var oModifier = mPropertyBag.modifier;
390
- var oView = mPropertyBag.view;
391
- var oAppComponent = mPropertyBag.appComponent;
397
+ const oModifier = mPropertyBag.modifier;
398
+ const oView = mPropertyBag.view;
399
+ const oAppComponent = mPropertyBag.appComponent;
392
400
 
393
- var oSimpleForm = oModifier.bySelector(mSpecificChangeInfo.selector, oAppComponent, oView);
394
- var aMovedElements = mSpecificChangeInfo.movedElements;
401
+ const oSimpleForm = oModifier.bySelector(mSpecificChangeInfo.selector, oAppComponent, oView);
402
+ const aMovedElements = mSpecificChangeInfo.movedElements;
395
403
  if (aMovedElements.length > 1) {
396
404
  Log.warning("Moving more than 1 Formelement is not yet supported.");
397
405
  }
398
- var mMovedElement = aMovedElements[0];
406
+ const mMovedElement = aMovedElements[0];
399
407
  mMovedElement.element = Element.getElementById(mMovedElement.id);
400
- var oSource = Object.assign({}, mSpecificChangeInfo.source);
401
- var oTarget = Object.assign({}, mSpecificChangeInfo.target);
408
+ const oSource = Object.assign({}, mSpecificChangeInfo.source);
409
+ const oTarget = Object.assign({}, mSpecificChangeInfo.target);
402
410
  if (!oTarget.parent) {
403
411
  oTarget.parent = Element.getElementById(oTarget.id);
404
412
  }
@@ -415,7 +423,7 @@ sap.ui.define([
415
423
  Log.error("Element not found. This may be caused by an unstable id!");
416
424
  }
417
425
 
418
- var oContent = {
426
+ const oContent = {
419
427
  targetSelector: mStableChangeInfo.targetSelector,
420
428
  movedElements: mStableChangeInfo.movedElements,
421
429
  // legacy changes had only a string with <appComponentId>---<uid>
@@ -449,21 +457,21 @@ sap.ui.define([
449
457
  * @public
450
458
  */
451
459
  MoveSimpleForm.revertChange = function(oChange, oSimpleForm, mPropertyBag) {
452
- var oModifier = mPropertyBag.modifier;
453
- var oAppComponent = mPropertyBag.appComponent;
454
- var oView = mPropertyBag.view;
455
- var oRevertData = oChange.getRevertData();
456
- var aContentSelectors = oRevertData.content;
457
- return oModifier.getAggregation(oSimpleForm, MoveSimpleForm.CONTENT_AGGREGATION)
460
+ const oModifier = mPropertyBag.modifier;
461
+ const oAppComponent = mPropertyBag.appComponent;
462
+ const oView = mPropertyBag.view;
463
+ const oRevertData = oChange.getRevertData();
464
+ const aContentSelectors = oRevertData.content;
465
+ return oModifier.getAggregation(oSimpleForm, CONTENT_AGGREGATION)
458
466
  .then(function(aCurrentContent) {
459
- var aContent = aContentSelectors.map(function(oSelector) {
467
+ const aContent = aContentSelectors.map(function(oSelector) {
460
468
  return oModifier.bySelector(oSelector, oAppComponent, oView);
461
469
  });
462
470
  return removeAndInsertAggregation(oModifier, oSimpleForm, MoveSimpleForm, aContent, aCurrentContent, oView)
463
471
  .then(function(){
464
472
  // destroy implicitly created title
465
- var oCreatedTitleSelector = oRevertData.createdTitleSelector;
466
- var oCreatedTitle = mPropertyBag.modifier.bySelector(oCreatedTitleSelector, mPropertyBag.appComponent);
473
+ const oCreatedTitleSelector = oRevertData.createdTitleSelector;
474
+ const oCreatedTitle = mPropertyBag.modifier.bySelector(oCreatedTitleSelector, mPropertyBag.appComponent);
467
475
  if (oCreatedTitle) {
468
476
  oCreatedTitle.destroy();
469
477
  }
@@ -476,45 +484,51 @@ sap.ui.define([
476
484
  };
477
485
 
478
486
  MoveSimpleForm.getChangeVisualizationInfo = function(oChange, oAppComponent) {
479
- var oSourceContainer;
480
- var oTargetContainer;
481
- var oMovedElementInstance;
482
- var oMovedElement = oChange.getContent().movedElements[0];
487
+ let oMovedElementInstance;
488
+ const oMovedElement = oChange.getContent().movedElements[0];
483
489
  if (oMovedElement.elementSelector.id) {
484
490
  oMovedElementInstance = JsControlTreeModifier.bySelector(oMovedElement.elementSelector, oAppComponent);
485
491
  } else if (oChange.getContent().newControlId) {
486
492
  // New group header is created (e.g. move headerless group)
487
493
  oMovedElementInstance = JsControlTreeModifier.bySelector(oChange.getContent().newControlId, oAppComponent);
488
494
  }
489
- var oGroupSelector = oMovedElement.source.groupSelector;
490
- if (oChange.getChangeType() === MoveSimpleForm.CHANGE_TYPE_MOVE_FIELD) {
491
- var oSourceTitleElement = JsControlTreeModifier.bySelector(oMovedElement.source.groupSelector, oAppComponent);
492
- var oTargetTitleElement = JsControlTreeModifier.bySelector(oMovedElement.target.groupSelector, oAppComponent);
493
- oSourceContainer = oSourceTitleElement ? oSourceTitleElement.getParent().getId() : null;
494
- oTargetContainer = oTargetTitleElement ? oTargetTitleElement.getParent().getId() : null;
495
- oGroupSelector = {
496
- id: oSourceContainer
497
- };
498
- } else if (!oGroupSelector && isTitleOrToolbar([oMovedElementInstance], 0, JsControlTreeModifier)) {
495
+ let oSourceSelector = oMovedElement.source.groupSelector ? {...oMovedElement.source.groupSelector} : {};
496
+ const oTargetSelector = oMovedElement.target.groupSelector ? {...oMovedElement.target.groupSelector} : {};
497
+ if (oChange.getChangeType() === CHANGE_TYPE_MOVE_FIELD) {
498
+ const oSourceGroupOrTitleElement = JsControlTreeModifier.bySelector(oSourceSelector, oAppComponent);
499
+ const oTargetGroupOrTitleElement = JsControlTreeModifier.bySelector(oMovedElement.target.groupSelector, oAppComponent);
500
+
501
+ if (oSourceGroupOrTitleElement && oSourceGroupOrTitleElement.isA(FORM_CONTAINER)) {
502
+ oSourceSelector.id = oSourceGroupOrTitleElement.getId();
503
+ } else {
504
+ oSourceSelector.id = oSourceGroupOrTitleElement ? oSourceGroupOrTitleElement.getParent().getId() : null;
505
+ }
506
+
507
+ if (oTargetGroupOrTitleElement && oTargetGroupOrTitleElement.isA(FORM_CONTAINER)) {
508
+ oTargetSelector.id = oTargetGroupOrTitleElement.getId();
509
+ } else {
510
+ oTargetSelector.id = oTargetGroupOrTitleElement ? oTargetGroupOrTitleElement.getParent().getId() : null;
511
+ }
512
+ } else if (!oSourceSelector && isTitleOrToolbar([oMovedElementInstance], 0, JsControlTreeModifier)) {
499
513
  // Move headerless group
500
- var oGroup = oMovedElementInstance.getParent();
501
- oGroupSelector = {
514
+ const oGroup = oMovedElementInstance.getParent();
515
+ oSourceSelector = {
502
516
  id: oGroup.getId()
503
517
  };
504
518
  }
505
519
 
506
- var oAffectedControlSelector = oMovedElementInstance.getParent().getId();
520
+ const oAffectedControlId = oMovedElementInstance.getParent().getId();
507
521
  return {
508
- affectedControls: [oAffectedControlSelector],
522
+ affectedControls: [oAffectedControlId],
509
523
  dependentControls: [
510
- oGroupSelector && oGroupSelector.id
511
- ? oGroupSelector
524
+ oSourceSelector && oSourceSelector.id
525
+ ? oSourceSelector
512
526
  : oChange.getContent().targetSelector
513
527
  ],
514
528
  updateRequired: true,
515
529
  descriptionPayload: {
516
- sourceContainer: oSourceContainer,
517
- targetContainer: oTargetContainer
530
+ sourceContainer: oSourceSelector.id,
531
+ targetContainer: oTargetSelector.id
518
532
  }
519
533
  };
520
534
  };
@@ -14,7 +14,7 @@ sap.ui.define([
14
14
  *
15
15
  * @alias sap.ui.layout.changeHandler.RenameFormContainer
16
16
  * @author SAP SE
17
- * @version 1.128.0
17
+ * @version 1.129.0
18
18
  * @since 1.48
19
19
  * @private
20
20
  * @experimental Since 1.48. This class is experimental and provides only limited functionality. Also the API might be changed in future.
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  *
21
21
  * @alias sap.ui.layout.changeHandler.RenameForm
22
22
  * @author SAP SE
23
- * @version 1.128.0
23
+ * @version 1.129.0
24
24
  * @since 1.40
25
25
  * @private
26
26
  * @experimental Since 1.40. This class is experimental and provides only limited functionality. Also the API might be changed in future.
@@ -14,7 +14,7 @@ sap.ui.define([
14
14
  * Change handler for hiding of a control.
15
15
  * @alias sap.ui.fl.changeHandler.HideControl
16
16
  * @author SAP SE
17
- * @version 1.128.0
17
+ * @version 1.129.0
18
18
  * @experimental Since 1.27.0
19
19
  */
20
20
  var UnhideForm = { };
@@ -158,10 +158,26 @@ sap.ui.define([
158
158
  };
159
159
 
160
160
  UnhideForm.getChangeVisualizationInfo = function(oChange, oAppComponent) {
161
- return {
162
- affectedControls: [JsControlTreeModifier.bySelector(oChange.getContent().elementSelector, oAppComponent).getParent().getId()],
161
+ // Groups cannot be revealed, so we just need to handle the FormElement case
162
+ const oElementSelector = oChange.getContent().elementSelector;
163
+ const oFormSelector = oChange.getSelector();
164
+ const oLabel = JsControlTreeModifier.bySelector(oElementSelector, oAppComponent);
165
+ const oFormElement = oLabel.getParent();
166
+ const oForm = JsControlTreeModifier.bySelector(oFormSelector, oAppComponent);
167
+
168
+ const oReturn = {
169
+ affectedControls: [oFormElement.getId()],
163
170
  updateRequired: true
164
171
  };
172
+
173
+ // If the form element is currently invisible (defined by the Label), the indicator is on the form
174
+ // We don't show it on the group because the group could have been removed before, leading to the
175
+ // element to be implicitly moved to another group, leading to inconsistent results in visualization
176
+ if (!oLabel.getVisible()) {
177
+ oReturn.displayControls = [oForm.getId()];
178
+ }
179
+
180
+ return oReturn;
165
181
  };
166
182
 
167
183
  return UnhideForm;
@@ -96,7 +96,7 @@ sap.ui.define([
96
96
  * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout MDN web docs: CSS Grid Layout}
97
97
  *
98
98
  * @author SAP SE
99
- * @version 1.128.0
99
+ * @version 1.129.0
100
100
  *
101
101
  * @extends sap.ui.core.Control
102
102
  * @implements sap.ui.layout.cssgrid.IGridConfigurable
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * Applies a sap.ui.layout.cssgrid.GridSettings to a provided DOM element or Control.
22
22
  *
23
23
  * @author SAP SE
24
- * @version 1.128.0
24
+ * @version 1.129.0
25
25
  *
26
26
  * @extends sap.ui.layout.cssgrid.GridLayoutBase
27
27
  *
@@ -50,7 +50,7 @@ sap.ui.define([
50
50
  * Applies a sap.ui.layout.cssgrid.GridSettings to a provided DOM element or Control.
51
51
  *
52
52
  * @author SAP SE
53
- * @version 1.128.0
53
+ * @version 1.129.0
54
54
  *
55
55
  * @extends sap.ui.layout.cssgrid.GridLayoutBase
56
56
  *
@@ -29,7 +29,7 @@ sap.ui.define([
29
29
  * Holds layout data for a grid item.
30
30
  *
31
31
  * @extends sap.ui.core.LayoutData
32
- * @version 1.128.0
32
+ * @version 1.129.0
33
33
  *
34
34
  * @constructor
35
35
  * @public
@@ -36,7 +36,7 @@ sap.ui.define([
36
36
  * Applies a sap.ui.layout.cssgrid.GridSettings to a provided DOM element or Control.
37
37
  *
38
38
  * @author SAP SE
39
- * @version 1.128.0
39
+ * @version 1.129.0
40
40
  *
41
41
  * @extends sap.ui.base.ManagedObject
42
42
  *
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  *
21
21
  * @extends sap.ui.base.Object
22
22
  *
23
- * @version 1.128.0
23
+ * @version 1.129.0
24
24
  * @alias sap.ui.layout.cssgrid.GridLayoutDelegate
25
25
  * @public
26
26
  */
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  * Have to possibility to hold multiple sap.ui.layout.cssgrid.GridSettings and apply the currently active GridSettings.
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.128.0
25
+ * @version 1.129.0
26
26
  *
27
27
  * @extends sap.ui.layout.cssgrid.GridLayoutBase
28
28
  *
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  * Holds a set of CSS display:grid properties
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.128.0
23
+ * @version 1.129.0
24
24
  *
25
25
  * @extends sap.ui.base.ManagedObject
26
26
  *
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  * Holds layout data for an item inside a responsive column layout.
21
21
  *
22
22
  * @extends sap.ui.core.LayoutData
23
- * @version 1.128.0
23
+ * @version 1.129.0
24
24
  *
25
25
  * @since 1.72
26
26
  * @constructor
@@ -44,7 +44,7 @@ sap.ui.define([
44
44
  * </ul>
45
45
  *
46
46
  * @author SAP SE
47
- * @version 1.128.0
47
+ * @version 1.129.0
48
48
  *
49
49
  * @extends sap.ui.layout.cssgrid.GridLayoutBase
50
50
  *
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @extends sap.ui.core.LayoutData
27
27
  *
28
28
  * @author SAP SE
29
- * @version 1.128.0
29
+ * @version 1.129.0
30
30
  *
31
31
  * @constructor
32
32
  * @public
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @extends sap.ui.core.LayoutData
27
27
  *
28
28
  * @author SAP SE
29
- * @version 1.128.0
29
+ * @version 1.129.0
30
30
  *
31
31
  * @constructor
32
32
  * @public
@@ -60,7 +60,7 @@ sap.ui.define([
60
60
  * This control cannot be used stand-alone, it just renders a {@link sap.ui.layout.form.Form Form} control,
61
61
  * so it must be assigned to a {@link sap.ui.layout.form.Form Form} control using the <code>layout</code> aggregation.
62
62
  * @extends sap.ui.layout.form.FormLayout
63
- * @version 1.128.0
63
+ * @version 1.129.0
64
64
  *
65
65
  * @constructor
66
66
  * @public
@@ -44,7 +44,7 @@ sap.ui.define([
44
44
  * @extends sap.ui.core.Control
45
45
  *
46
46
  * @author SAP SE
47
- * @version 1.128.0
47
+ * @version 1.129.0
48
48
  *
49
49
  * @constructor
50
50
  * @public
@@ -29,7 +29,7 @@ sap.ui.define([
29
29
  * @extends sap.ui.core.Element
30
30
  *
31
31
  * @author SAP SE
32
- * @version 1.128.0
32
+ * @version 1.129.0
33
33
  *
34
34
  * @constructor
35
35
  * @public
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @extends sap.ui.core.Element
27
27
  *
28
28
  * @author SAP SE
29
- * @version 1.128.0
29
+ * @version 1.129.0
30
30
  *
31
31
  * @constructor
32
32
  * @public
@@ -37,7 +37,7 @@ sap.ui.define([
37
37
  * @extends sap.ui.core.Control
38
38
  *
39
39
  * @author SAP SE
40
- * @version 1.128.0
40
+ * @version 1.129.0
41
41
  *
42
42
  * @constructor
43
43
  * @public
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  * @extends sap.ui.core.LayoutData
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.128.0
25
+ * @version 1.129.0
26
26
  *
27
27
  * @constructor
28
28
  * @public
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  * @extends sap.ui.core.LayoutData
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.128.0
25
+ * @version 1.129.0
26
26
  *
27
27
  * @constructor
28
28
  * @public
@@ -28,7 +28,7 @@ sap.ui.define(['sap/ui/layout/library', './FormLayout', './GridLayoutRenderer'],
28
28
  * @extends sap.ui.layout.form.FormLayout
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.128.0
31
+ * @version 1.129.0
32
32
  *
33
33
  * @constructor
34
34
  * @public
@@ -55,7 +55,7 @@ sap.ui.define([
55
55
  *
56
56
  * This control cannot be used stand-alone, it just renders a {@link sap.ui.layout.form.Form Form}, so it must be assigned to a {@link sap.ui.layout.form.Form Form} using the <code>layout</code> aggregation.
57
57
  * @extends sap.ui.layout.form.FormLayout
58
- * @version 1.128.0
58
+ * @version 1.129.0
59
59
  *
60
60
  * @constructor
61
61
  * @public
@@ -52,7 +52,7 @@ sap.ui.define([
52
52
  * @extends sap.ui.layout.form.FormLayout
53
53
  *
54
54
  * @author SAP SE
55
- * @version 1.128.0
55
+ * @version 1.129.0
56
56
  *
57
57
  * @constructor
58
58
  * @public
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  * @extends sap.ui.layout.form.FormElement
31
31
  *
32
32
  * @author SAP SE
33
- * @version 1.128.0
33
+ * @version 1.129.0
34
34
  *
35
35
  * @constructor
36
36
  * @public
@@ -69,7 +69,7 @@ sap.ui.define([
69
69
  * <b>Note:</b> If a more complex form is needed, use the <code>{@link sap.ui.layout.form.Form Form}</code> control instead.
70
70
  *
71
71
  * @extends sap.ui.core.Control
72
- * @version 1.128.0
72
+ * @version 1.129.0
73
73
  *
74
74
  * @constructor
75
75
  * @public
@@ -21,14 +21,14 @@ sap.ui.define([
21
21
  * @namespace
22
22
  * @alias sap.ui.layout
23
23
  * @author SAP SE
24
- * @version 1.128.0
24
+ * @version 1.129.0
25
25
  * @since 1.15
26
26
  * @public
27
27
  */
28
28
  var thisLib = Library.init({
29
29
  apiVersion: 2,
30
30
  name : "sap.ui.layout",
31
- version: "1.128.0",
31
+ version: "1.129.0",
32
32
  dependencies: ["sap.ui.core"],
33
33
  designtime: "sap/ui/layout/designtime/library.designtime",
34
34
  types: [