@openui5/sap.ui.layout 1.128.0 → 1.130.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 (60) hide show
  1. package/THIRDPARTY.txt +2 -2
  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 +14 -11
  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/_SplitterRegistry.js +55 -0
  26. package/src/sap/ui/layout/changeHandler/AddFormContainer.js +1 -1
  27. package/src/sap/ui/layout/changeHandler/AddFormField.js +1 -1
  28. package/src/sap/ui/layout/changeHandler/AddSimpleFormField.js +22 -9
  29. package/src/sap/ui/layout/changeHandler/AddSimpleFormGroup.js +1 -1
  30. package/src/sap/ui/layout/changeHandler/HideSimpleForm.js +23 -6
  31. package/src/sap/ui/layout/changeHandler/MoveSimpleForm.js +149 -135
  32. package/src/sap/ui/layout/changeHandler/RenameFormContainer.js +1 -1
  33. package/src/sap/ui/layout/changeHandler/RenameSimpleForm.js +1 -1
  34. package/src/sap/ui/layout/changeHandler/UnhideSimpleForm.js +19 -3
  35. package/src/sap/ui/layout/cssgrid/CSSGrid.js +1 -1
  36. package/src/sap/ui/layout/cssgrid/GridBasicLayout.js +1 -1
  37. package/src/sap/ui/layout/cssgrid/GridBoxLayout.js +1 -1
  38. package/src/sap/ui/layout/cssgrid/GridItemLayoutData.js +1 -1
  39. package/src/sap/ui/layout/cssgrid/GridLayoutBase.js +1 -1
  40. package/src/sap/ui/layout/cssgrid/GridLayoutDelegate.js +1 -1
  41. package/src/sap/ui/layout/cssgrid/GridResponsiveLayout.js +1 -1
  42. package/src/sap/ui/layout/cssgrid/GridSettings.js +1 -1
  43. package/src/sap/ui/layout/cssgrid/ResponsiveColumnItemLayoutData.js +1 -1
  44. package/src/sap/ui/layout/cssgrid/ResponsiveColumnLayout.js +1 -1
  45. package/src/sap/ui/layout/form/ColumnContainerData.js +1 -1
  46. package/src/sap/ui/layout/form/ColumnElementData.js +1 -1
  47. package/src/sap/ui/layout/form/ColumnLayout.js +1 -1
  48. package/src/sap/ui/layout/form/Form.js +1 -1
  49. package/src/sap/ui/layout/form/FormContainer.js +1 -1
  50. package/src/sap/ui/layout/form/FormElement.js +1 -1
  51. package/src/sap/ui/layout/form/FormLayout.js +1 -1
  52. package/src/sap/ui/layout/form/GridContainerData.js +1 -1
  53. package/src/sap/ui/layout/form/GridElementData.js +1 -1
  54. package/src/sap/ui/layout/form/GridLayout.js +1 -1
  55. package/src/sap/ui/layout/form/ResponsiveGridLayout.js +1 -1
  56. package/src/sap/ui/layout/form/ResponsiveLayout.js +1 -1
  57. package/src/sap/ui/layout/form/SemanticFormElement.js +1 -1
  58. package/src/sap/ui/layout/form/SimpleForm.js +1 -1
  59. package/src/sap/ui/layout/library.js +2 -2
  60. package/src/sap/ui/layout/messagebundle_mk.properties +1 -1
package/THIRDPARTY.txt CHANGED
@@ -6,7 +6,7 @@ The full text of all referenced licenses is appended at the end of this file.
6
6
 
7
7
  Library: sap.m:
8
8
 
9
- Component: purify.js, version: 2.3.8
9
+ Component: purify.js, version: 3.1.7
10
10
  Copyright: Mario Heiderich
11
11
  License: Apache-2.0
12
12
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
@@ -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.130.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.130.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.130.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.130.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.130.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.130.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.130.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.130.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.130.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.130.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.130.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.130.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.130.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.130.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.130.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.130.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.130.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.130.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.130.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.130.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.130.0
30
30
  *
31
31
  * @constructor
32
32
  * @public
@@ -5,32 +5,34 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
+ "./_SplitterRegistry",
9
+ './SplitterRenderer',
10
+ "./SplitterLayoutData",
11
+ './library',
8
12
  "sap/base/i18n/Localization",
9
13
  'sap/ui/core/Control',
10
14
  "sap/ui/core/Core",
11
15
  'sap/ui/core/CustomData',
12
- './library',
13
16
  'sap/ui/core/library',
14
17
  'sap/ui/core/ResizeHandler',
15
18
  'sap/ui/core/RenderManager',
16
- './SplitterRenderer',
17
19
  "sap/base/Log",
18
- "sap/ui/thirdparty/jquery",
19
- "sap/ui/layout/SplitterLayoutData"
20
+ "sap/ui/thirdparty/jquery"
20
21
  ],
21
22
  function(
23
+ _SplitterRegistry,
24
+ SplitterRenderer,
25
+ SplitterLayoutData,
26
+ library,
22
27
  Localization,
23
28
  Control,
24
29
  Core,
25
30
  CustomData,
26
- library,
27
31
  coreLibrary,
28
32
  ResizeHandler,
29
33
  RenderManager,
30
- SplitterRenderer,
31
34
  Log,
32
- jQuery,
33
- SplitterLayoutData
35
+ jQuery
34
36
  ) {
35
37
  "use strict";
36
38
 
@@ -72,7 +74,7 @@ sap.ui.define([
72
74
  * @extends sap.ui.core.Control
73
75
  *
74
76
  * @author SAP SE
75
- * @version 1.128.0
77
+ * @version 1.130.0
76
78
  *
77
79
  * @constructor
78
80
  * @public
@@ -182,6 +184,7 @@ sap.ui.define([
182
184
  };
183
185
 
184
186
  Splitter.prototype.exit = function() {
187
+ _SplitterRegistry.removeInstance(this);
185
188
  this._disableAutoResize();
186
189
  delete this._resizeCallback;
187
190
 
@@ -193,10 +196,12 @@ sap.ui.define([
193
196
  };
194
197
 
195
198
  Splitter.prototype.onBeforeRendering = function() {
199
+ _SplitterRegistry.removeInstance(this);
196
200
  this._initOrientationProperties();
197
201
  };
198
202
 
199
203
  Splitter.prototype.onAfterRendering = function() {
204
+ _SplitterRegistry.addInstance(this);
200
205
  this._$SplitterOverlay = this.$("overlay");
201
206
  this._$SplitterOverlayBar = this.$("overlayBar");
202
207
 
@@ -1132,8 +1137,6 @@ sap.ui.define([
1132
1137
  this._keyboardEnabled = false;
1133
1138
  };
1134
1139
 
1135
- ///////////////////////////////////////// Hidden Functions /////////////////////////////////////////
1136
-
1137
1140
  /**
1138
1141
  * Returns the bar for the given target. If there isn't such, null is returned
1139
1142
  * @param {HTMLElement} oTarget The target
@@ -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.130.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.130.0
31
31
  *
32
32
  * @constructor
33
33
  * @public
@@ -0,0 +1,55 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define([
8
+ "sap/ui/Device"
9
+ ], (Device) => {
10
+ "use strict";
11
+
12
+ const mInstances = new Set();
13
+ const fnGlobalTouchStart = (e) => {
14
+ if (isSplitterBar(e.target)) {
15
+ e.preventDefault();
16
+ }
17
+ };
18
+
19
+ let bGlobalTouchStartListenerAdded = false;
20
+
21
+ function isSplitterBar(oElement) {
22
+ return !!oElement.closest(".sapUiLoSplitterBar");
23
+ }
24
+
25
+ function addGlobalTouchStartListener () {
26
+ document.addEventListener("touchstart", fnGlobalTouchStart, { passive: false });
27
+ }
28
+
29
+ function removeGlobalTouchStartListener() {
30
+ document.removeEventListener("touchstart", fnGlobalTouchStart);
31
+ }
32
+
33
+ function addInstance(oInstance) {
34
+ mInstances.add(oInstance);
35
+
36
+ if (Device.support.touch && !bGlobalTouchStartListenerAdded) {
37
+ addGlobalTouchStartListener();
38
+ bGlobalTouchStartListenerAdded = true;
39
+ }
40
+ }
41
+
42
+ function removeInstance(oInstance) {
43
+ mInstances.delete(oInstance);
44
+
45
+ if (mInstances.size === 0) {
46
+ removeGlobalTouchStartListener();
47
+ bGlobalTouchStartListenerAdded = false;
48
+ }
49
+ }
50
+
51
+ return {
52
+ addInstance,
53
+ removeInstance
54
+ };
55
+ });
@@ -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.130.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.130.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.130.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.130.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.130.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
  };