@openui5/sap.ui.layout 1.119.1 → 1.120.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 (66) hide show
  1. package/THIRDPARTY.txt +6 -6
  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 +2 -132
  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 +11 -6
  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 +103 -18
  23. package/src/sap/ui/layout/SplitterLayoutData.js +21 -8
  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 +1 -1
  28. package/src/sap/ui/layout/changeHandler/AddSimpleFormGroup.js +1 -1
  29. package/src/sap/ui/layout/changeHandler/HideSimpleForm.js +1 -1
  30. package/src/sap/ui/layout/changeHandler/MoveSimpleForm.js +1 -1
  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 +1 -1
  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/designtime/messagebundle_mk.properties +19 -0
  45. package/src/sap/ui/layout/designtime/messagebundle_sh.properties +1 -1
  46. package/src/sap/ui/layout/form/ColumnContainerData.js +1 -1
  47. package/src/sap/ui/layout/form/ColumnElementData.js +1 -1
  48. package/src/sap/ui/layout/form/ColumnLayout.js +23 -23
  49. package/src/sap/ui/layout/form/Form.js +19 -7
  50. package/src/sap/ui/layout/form/FormContainer.js +22 -11
  51. package/src/sap/ui/layout/form/FormElement.js +6 -6
  52. package/src/sap/ui/layout/form/FormHelper.js +176 -0
  53. package/src/sap/ui/layout/form/FormLayout.js +14 -11
  54. package/src/sap/ui/layout/form/FormLayoutRenderer.js +3 -2
  55. package/src/sap/ui/layout/form/FormRenderer.js +5 -5
  56. package/src/sap/ui/layout/form/GridContainerData.js +4 -1
  57. package/src/sap/ui/layout/form/GridElementData.js +4 -1
  58. package/src/sap/ui/layout/form/GridLayout.js +1 -1
  59. package/src/sap/ui/layout/form/ResponsiveGridLayout.js +20 -20
  60. package/src/sap/ui/layout/form/ResponsiveLayout.js +1 -1
  61. package/src/sap/ui/layout/form/SemanticFormElement.js +8 -8
  62. package/src/sap/ui/layout/form/SimpleForm.js +1 -1
  63. package/src/sap/ui/layout/library.js +8 -21
  64. package/src/sap/ui/layout/messagebundle_mk.properties +17 -0
  65. package/src/sap/ui/layout/themes/base/ResponsiveGridLayout.less +1 -1
  66. package/ui5.yaml +4 -4
@@ -0,0 +1,176 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2023 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/core/Lib",
9
+ "sap/ui/core/library",
10
+ "sap/base/util/merge"
11
+ ], function(
12
+ Library,
13
+ CoreLibrary,
14
+ merge
15
+ ) {
16
+ "use strict";
17
+
18
+ const _MHelper = {
19
+ Label: undefined,
20
+ Button: undefined,
21
+ Text: undefined,
22
+ Library: undefined,
23
+ init: function() {
24
+ // normally this basic controls should be always loaded
25
+ this.Label = sap.ui.require("sap/m/Label");
26
+ this.Text = sap.ui.require("sap/m/Text");
27
+ this.Button = sap.ui.require("sap/m/Button");
28
+ this.Library = sap.ui.require("sap/m/library");
29
+
30
+ if (!this.Label || !this.Text || !this.Button || !this.Library) {
31
+ if (!this.oInitPromise) {
32
+ this.oInitPromise = new Promise(function(fResolve, fReject) {
33
+ sap.ui.require(["sap/m/Label", "sap/m/Text", "sap/m/Button", "sap/m/library"], function(Label, Text, Button, Library) {
34
+ this.Label = Label;
35
+ this.Text = Text;
36
+ this.Button = Button;
37
+ this.Library = Library;
38
+ fResolve(true);
39
+ }.bind(this));
40
+ }.bind(this));
41
+ }
42
+ return this.oInitPromise;
43
+ } else if (this.oInitPromise) {
44
+ delete this.oInitPromise; // not longer needed
45
+ }
46
+ return null;
47
+ },
48
+ createLabel: function(sText, sId){
49
+ return new this.Label(sId, {text: sText});
50
+ },
51
+ createButton: function(sId, fnPressFunction, oListener){
52
+ const oButton = new this.Button(sId, {type: this.Library.ButtonType.Transparent});
53
+ oButton.attachEvent("press", fnPressFunction, oListener); // attach event this way to have the right this-reference in handler
54
+ return oButton;
55
+ },
56
+ setButtonContent: function(oButton, sText, sTooltip, sIcon, sIconHovered){
57
+ oButton.setText(sText);
58
+ oButton.setTooltip(sTooltip);
59
+ oButton.setIcon(sIcon);
60
+ oButton.setActiveIcon(sIconHovered);
61
+ },
62
+ addFormClass: function(){ return "sapUiFormM"; },
63
+ setToolbar: function(oToolbar, oOldToolbar){
64
+ if (oOldToolbar && oOldToolbar.setDesign) {
65
+ // check for setDesign because we don't know what kind of custom toolbars might be used.
66
+ oOldToolbar.setDesign(oOldToolbar.getDesign(), true);
67
+ }
68
+ if (oToolbar && oToolbar.setDesign) {
69
+ const oProperty = oToolbar.getMetadata().getManagedProperty("design");
70
+ if (oProperty && oProperty.type === "sap.m.ToolbarDesign") { // as custom toolbar could have different types
71
+ oToolbar.setDesign(this.Library.ToolbarDesign.Transparent, true);
72
+ }
73
+ }
74
+ return oToolbar;
75
+ },
76
+ getToolbarTitle: function(oToolbar) {
77
+ // determine Title to point aria-label on this. As Fallback use the whole Toolbar
78
+ if (oToolbar) {
79
+ const aContent = oToolbar.getContent ? oToolbar.getContent() : []; // check for getContent because we don't know what kind of custom toolbars might be used.
80
+ for (let i = 0; i < aContent.length; i++) {
81
+ const oContent = aContent[i];
82
+ if (oContent.isA("sap.m.Title")) {
83
+ return oContent.getId();
84
+ }
85
+ }
86
+ return oToolbar.getId(); // fallback
87
+ }
88
+ },
89
+ createDelimiter: function(sDelimiter, sId){
90
+ return new this.Text(sId, {text: sDelimiter, textAlign: CoreLibrary.TextAlign.Center});
91
+ },
92
+ createSemanticDisplayControl: function(sText, sId){
93
+ return new this.Text(sId, {text: sText});
94
+ },
95
+ updateDelimiter: function(oText, sDelimiter){
96
+ oText.setText(sDelimiter);
97
+ },
98
+ updateSemanticDisplayControl: function(oText, sText){
99
+ oText.setText(sText);
100
+ },
101
+ isArrowKeySupported: function() {
102
+ return false; /* disables the keyboard support for arrow keys */
103
+ }
104
+ };
105
+
106
+ /**
107
+ * @deprecated as of version 1.38 sap.ui.commons is deprecated, so test should only be executed if still available
108
+ */
109
+ const _CommonsHelper = {
110
+ init: function() {
111
+ return null;
112
+ },
113
+ createLabel: function(sText, sId){
114
+ return new sap.ui.commons.Label(sId, {text: sText});
115
+ },
116
+ createButton: function(sId, fPressFunction, oListener){
117
+ const oButton = new sap.ui.commons.Button(sId, {lite: true});
118
+ oButton.attachEvent('press', fPressFunction, oListener); // attach event this way to have the right this-reference in handler
119
+ return oButton;
120
+ },
121
+ setButtonContent: function(oButton, sText, sTooltip, sIcon, sIconHovered){
122
+ oButton.setText(sText);
123
+ oButton.setTooltip(sTooltip);
124
+ oButton.setIcon(sIcon);
125
+ oButton.setIconHovered(sIconHovered);
126
+ },
127
+ getToolbarTitle: function(oToolbar) {
128
+ // as no Title control as ToolbarItem exust just use Toolbar ID. (Let application point to the wanted control.)
129
+ return oToolbar && oToolbar.getId();
130
+ }
131
+ };
132
+
133
+ /**
134
+ * Provides helper functions to create library dependen controls, like label, button, toolbar,
135
+ * used in {@link sap.ui.layout.form.Form Form}, {@link sap.ui.layout.form.FormContainer FormContainer}, {@link sap.ui.layout.form.FormElement FormElement},
136
+ * and {@link sap.ui.layout.form.SemanticFormElement SemanticFormElement}.
137
+ *
138
+ * @enum {string}
139
+ * @private
140
+ * @since 1.119
141
+ * @alias sap.ui.layout.form.FormHelper
142
+ */
143
+ const FormHelper = {
144
+ init: function() { /* must return a Promise if modules still needs to be loaded. The promise must be fulfilled if everything is loaded. */
145
+ // initially check the library. If found, overwrite functions
146
+ if (Library.isLoaded("sap.m")) {
147
+ merge(FormHelper, _MHelper);
148
+ return this.init();
149
+ }
150
+
151
+ /**
152
+ * @deprecated as of version 1.38 sap.ui.commons is deprecated, so test should only be executed if still available
153
+ */
154
+ if (Library.isLoaded("sap.ui.commons") && !Library.isLoaded("sap.m")) {
155
+ merge(FormHelper, _CommonsHelper);
156
+ return this.init();
157
+ }
158
+
159
+ return null;
160
+ },
161
+ createLabel: function(sText){ throw new Error("no Label control available!"); }, /* must return a Label control */
162
+ createButton: function(sId, fPressFunction, oListener){ throw new Error("no Button control available!"); }, /* must return a button control */
163
+ setButtonContent: function(oButton, sText, sTooltip, sIcon, sIconHovered){ throw new Error("no Button control available!"); },
164
+ addFormClass: function(){ return null; },
165
+ setToolbar: function(oToolbar, oOldToolbar){ return oToolbar; }, /* allow to overwrite toolbar settings */
166
+ getToolbarTitle: function(oToolbar) { return oToolbar && oToolbar.getId(); }, /* To determine title ID in toolbar for aria-label */
167
+ createDelimiter: function(sDelimiter, sId){ throw new Error("no delimiter control available!"); }, /* must return a kind of text control */
168
+ createSemanticDisplayControl: function(sText, sId){ throw new Error("no display control available!"); }, /* must return a kind of text control */
169
+ updateDelimiter: function(oDelimiter, sDelimiter){ throw new Error("no delimiter control available!"); },
170
+ updateSemanticDisplayControl: function(oControl, sText){ throw new Error("no display control available!"); },
171
+ isArrowKeySupported: function() { return true; } /* enables the keyboard support for arrow keys */
172
+ };
173
+
174
+ return FormHelper;
175
+
176
+ }, /* bExport= */ false);
@@ -10,12 +10,13 @@ sap.ui.define([
10
10
  'sap/ui/core/Element',
11
11
  'sap/ui/layout/library',
12
12
  './FormLayoutRenderer',
13
+ './FormHelper',
13
14
  'sap/ui/core/theming/Parameters',
14
15
  'sap/ui/thirdparty/jquery',
15
16
  "sap/ui/core/Configuration",
16
17
  // jQuery custom selectors ":sapFocusable"
17
18
  'sap/ui/dom/jquery/Selectors'
18
- ], function(Control, Element, library, FormLayoutRenderer, Parameters, jQuery, Configuration) {
19
+ ], function(Control, Element, library, FormLayoutRenderer, FormHelper, Parameters, jQuery, Configuration) {
19
20
  "use strict";
20
21
 
21
22
  // shortcut for sap.ui.layout.BackgroundDesign
@@ -36,7 +37,7 @@ sap.ui.define([
36
37
  * @extends sap.ui.core.Control
37
38
  *
38
39
  * @author SAP SE
39
- * @version 1.119.1
40
+ * @version 1.120.0
40
41
  *
41
42
  * @constructor
42
43
  * @public
@@ -66,6 +67,8 @@ sap.ui.define([
66
67
 
67
68
  FormLayout.prototype.init = function(){
68
69
 
70
+ this._oInitPromise = FormHelper.init();
71
+
69
72
  this._sFormTitleSize = "H4"; // to have default as Theme parameter could be loaded async.
70
73
  this._sFormSubTitleSize = "H5";
71
74
 
@@ -80,7 +83,7 @@ sap.ui.define([
80
83
 
81
84
  FormLayout.prototype.contentOnAfterRendering = function(oFormElement, oControl){
82
85
 
83
- if (library.form.FormHelper.bArrowKeySupport) {
86
+ if (FormHelper.isArrowKeySupported()) { // no async call needed here
84
87
  jQuery(oControl.getFocusDomRef()).data("sap.InNavArea", true);
85
88
  }
86
89
 
@@ -149,7 +152,7 @@ sap.ui.define([
149
152
 
150
153
  FormLayout.prototype.onsapright = function(oEvent){
151
154
 
152
- if (library.form.FormHelper.bArrowKeySupport) {
155
+ if (FormHelper.isArrowKeySupported()) { // no async call needed here
153
156
  var bRtl = Configuration.getRTL();
154
157
 
155
158
  if (!bRtl) {
@@ -163,7 +166,7 @@ sap.ui.define([
163
166
 
164
167
  FormLayout.prototype.onsapleft = function(oEvent){
165
168
 
166
- if (library.form.FormHelper.bArrowKeySupport) {
169
+ if (FormHelper.isArrowKeySupported()) { // no async call needed here
167
170
  var bRtl = Configuration.getRTL();
168
171
 
169
172
  if (!bRtl) {
@@ -177,7 +180,7 @@ sap.ui.define([
177
180
 
178
181
  FormLayout.prototype.onsapdown = function(oEvent){
179
182
 
180
- if (library.form.FormHelper.bArrowKeySupport) {
183
+ if (FormHelper.isArrowKeySupported()) { // no async call needed here
181
184
  var oControl = oEvent.srcControl;
182
185
  var oNewDomRef;
183
186
  var oRoot = this.findElement(oControl);
@@ -200,7 +203,7 @@ sap.ui.define([
200
203
 
201
204
  FormLayout.prototype.onsapup = function(oEvent){
202
205
 
203
- if (library.form.FormHelper.bArrowKeySupport) {
206
+ if (FormHelper.isArrowKeySupported()) { // no async call needed here
204
207
  var oControl = oEvent.srcControl;
205
208
  var iCurrentIndex = 0;
206
209
  var oNewDomRef;
@@ -226,7 +229,7 @@ sap.ui.define([
226
229
 
227
230
  FormLayout.prototype.onsaphome = function(oEvent){
228
231
 
229
- if (library.form.FormHelper.bArrowKeySupport) {
232
+ if (FormHelper.isArrowKeySupported()) { // no async call needed here
230
233
  var oControl = oEvent.srcControl;
231
234
  var iCurrentIndex = 0;
232
235
  var oNewDomRef;
@@ -249,7 +252,7 @@ sap.ui.define([
249
252
 
250
253
  FormLayout.prototype.onsaptop = function(oEvent){
251
254
 
252
- if (library.form.FormHelper.bArrowKeySupport) {
255
+ if (FormHelper.isArrowKeySupported()) { // no async call needed here
253
256
  var oControl = oEvent.srcControl;
254
257
  var oRoot = this.findElement(oControl);
255
258
  var oElement = oRoot.element;
@@ -276,7 +279,7 @@ sap.ui.define([
276
279
 
277
280
  FormLayout.prototype.onsapend = function(oEvent){
278
281
 
279
- if (library.form.FormHelper.bArrowKeySupport) {
282
+ if (FormHelper.isArrowKeySupported()) { // no async call needed here
280
283
  var oControl = oEvent.srcControl;
281
284
  var iCurrentIndex = 0;
282
285
  var oNewDomRef;
@@ -298,7 +301,7 @@ sap.ui.define([
298
301
 
299
302
  FormLayout.prototype.onsapbottom = function(oEvent){
300
303
 
301
- if (library.form.FormHelper.bArrowKeySupport) {
304
+ if (FormHelper.isArrowKeySupported()) { // no async call needed here
302
305
  var oControl = oEvent.srcControl;
303
306
  var oRoot = this.findElement(oControl);
304
307
  var oElement = oRoot.element;
@@ -8,8 +8,9 @@ sap.ui.define([
8
8
  'sap/ui/core/library',
9
9
  'sap/ui/layout/library',
10
10
  'sap/ui/layout/form/Form',
11
+ './FormHelper',
11
12
  'sap/ui/core/IconPool' // as RenderManager.icon needs it
12
- ], function(coreLibrary, library, Form) {
13
+ ], function(coreLibrary, library, Form, FormHelper, IconPool) {
13
14
  "use strict";
14
15
 
15
16
  // shortcut for sap.ui.core.TitleLevel
@@ -288,7 +289,7 @@ sap.ui.define([
288
289
  if (oToolbar) {
289
290
  if (!oContainer.getAriaLabelledBy() || oContainer.getAriaLabelledBy().length == 0) {
290
291
  // no aria-label -> use Title of Toolbar
291
- var sToolbarTitleID = library.form.FormHelper.getToolbarTitle(oToolbar);
292
+ var sToolbarTitleID = FormHelper.getToolbarTitle(oToolbar); // FormHelper must already be initialized by FormLayout
292
293
  mAriaProps["labelledby"] = {value: sToolbarTitleID, append: true};
293
294
  }
294
295
  } else if (oTitle) {
@@ -5,9 +5,9 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
- 'sap/ui/layout/library',
9
- "sap/base/Log"
10
- ], function(library, Log) {
8
+ './FormHelper',
9
+ 'sap/base/Log'
10
+ ], function(FormHelper, Log) {
11
11
  "use strict";
12
12
 
13
13
 
@@ -35,7 +35,7 @@ sap.ui.define([
35
35
  .class("sapUiFormLblColon") // to always have the ":" at the Labels
36
36
  .attr("data-sap-ui-customfastnavgroup", "true");
37
37
 
38
- var sClass = library.form.FormHelper.addFormClass();
38
+ var sClass = FormHelper.addFormClass(); // FormHelper must already be initialized by Form
39
39
  if (sClass) {
40
40
  rm.class(sClass);
41
41
  }
@@ -59,7 +59,7 @@ sap.ui.define([
59
59
  if (oToolbar) {
60
60
  if (!oForm.getAriaLabelledBy() || oForm.getAriaLabelledBy().length == 0) {
61
61
  // no aria-label -> use Title of Toolbar
62
- var sToolbarTitleID = library.form.FormHelper.getToolbarTitle(oToolbar);
62
+ var sToolbarTitleID = FormHelper.getToolbarTitle(oToolbar); // FormHelper must already be initialized by Form
63
63
  mAriaProps["labelledby"] = sToolbarTitleID;
64
64
  }
65
65
  } else if (oTitle) {
@@ -22,12 +22,15 @@ sap.ui.define([
22
22
  * @extends sap.ui.core.LayoutData
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.119.1
25
+ * @version 1.120.0
26
26
  *
27
27
  * @constructor
28
28
  * @public
29
29
  * @since 1.16.0
30
30
  * @alias sap.ui.layout.form.GridContainerData
31
+ * @deprecated Since version 1.67.0.
32
+ * as <code>sap.ui.commons</code> library is deprecated and the <code>GridLayout</code> must not be used in responsive applications.
33
+ * Please use <code>ResponsiveGridLayout</code> or <code>ColumnLayout</code> instead.
31
34
  */
32
35
  var GridContainerData = LayoutData.extend("sap.ui.layout.form.GridContainerData", /** @lends sap.ui.layout.form.GridContainerData.prototype */ { metadata : {
33
36
 
@@ -22,12 +22,15 @@ sap.ui.define([
22
22
  * @extends sap.ui.core.LayoutData
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.119.1
25
+ * @version 1.120.0
26
26
  *
27
27
  * @constructor
28
28
  * @public
29
29
  * @since 1.16.0
30
30
  * @alias sap.ui.layout.form.GridElementData
31
+ * @deprecated Since version 1.67.0.
32
+ * as <code>sap.ui.commons</code> library is deprecated and the <code>GridLayout</code> must not be used in responsive applications.
33
+ * Please use <code>ResponsiveGridLayout</code> or <code>ColumnLayout</code> instead.
31
34
  */
32
35
  var GridElementData = LayoutData.extend("sap.ui.layout.form.GridElementData", /** @lends sap.ui.layout.form.GridElementData.prototype */ { metadata : {
33
36
 
@@ -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.119.1
31
+ * @version 1.120.0
32
32
  *
33
33
  * @constructor
34
34
  * @public
@@ -39,21 +39,21 @@ sap.ui.define([
39
39
  * @param {object} [mSettings] Initial settings for the new control
40
40
  *
41
41
  * @class
42
- * The <code>ResponsiveGridLayout</code> control renders a <code>Form</code> using a responsive grid. Internally the <code>Grid</code> control is used for rendering.
43
- * Using this layout, the <code>Form</code> is rendered in a responsive way.
44
- * Depending on the available space, the <code>FormContainers</code> are rendered in one or different columns and the labels are rendered in the same row as the fields or above the fields.
42
+ * The <code>ResponsiveGridLayout</code> control renders a {@link sap.ui.layout.form.Form Form} using a responsive grid. Internally the {@link sap.ui.layout.Grid Grid} control is used for rendering.
43
+ * Using this layout, the {@link sap.ui.layout.form.Form Form} is rendered in a responsive way.
44
+ * Depending on the available space, the {@link sap.ui.layout.form.FormContainer FormContainers} are rendered in one or different columns and the labels are rendered in the same row as the fields or above the fields.
45
45
  * This behavior can be influenced by the properties of this layout control.
46
46
  *
47
- * On the <code>FormContainers</code>, labels and content fields, <code>GridData</code> can be used to change the default rendering.
48
- * <code>GridData</code> is not supported for <code>FormElements</code>.
47
+ * On the {@link sap.ui.layout.form.FormContainer FormContainers}, labels and content fields, {@link sap.ui.layout.GridGata GridData} can be used to change the default rendering.
48
+ * {@link sap.ui.layout.GridGata GridData} is not supported for {@link sap.ui.layout.form.FormElement FormElements}.
49
49
  *
50
- * <b>Note:</b> If <code>GridData</code> is used, this may result in a much more complex layout than the default one.
50
+ * <b>Note:</b> If {@link sap.ui.layout.GridGata GridData} is used, this may result in a much more complex layout than the default one.
51
51
  * This means that in some cases, the calculation for the other content may not bring the expected result.
52
- * In such cases, <code>GridData</code> should be used for all content controls to disable the default behavior.
52
+ * In such cases, {@link sap.ui.layout.GridGata GridData} should be used for all content controls to disable the default behavior.
53
53
  *
54
- * This control cannot be used stand-alone, it just renders a <code>Form</code>, so it must be assigned to a <code>Form</code> using the <code>layout</code> aggregation.
54
+ * 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.
55
55
  * @extends sap.ui.layout.form.FormLayout
56
- * @version 1.119.1
56
+ * @version 1.120.0
57
57
  *
58
58
  * @constructor
59
59
  * @public
@@ -77,7 +77,7 @@ sap.ui.define([
77
77
  /**
78
78
  * Default span for labels in large size.
79
79
  *
80
- * <b>Note:</b> If <code>adjustLabelSpan</code> is set, this property is only used if more than 1 <code>FormContainer</code> is in one line. If only 1 <code>FormContainer</code> is in the line, then the <code>labelSpanM</code> value is used.
80
+ * <b>Note:</b> If <code>adjustLabelSpan</code> is set, this property is only used if more than 1 {@link sap.ui.layout.form.FormContainer FormContainer} is in one line. If only 1 {@link sap.ui.layout.form.FormContainer FormContainer} is in the line, then the <code>labelSpanM</code> value is used.
81
81
  * @since 1.16.3
82
82
  */
83
83
  labelSpanL : {type : "int", group : "Misc", defaultValue : 4},
@@ -85,7 +85,7 @@ sap.ui.define([
85
85
  /**
86
86
  * Default span for labels in medium size.
87
87
  *
88
- * <b>Note:</b> If <code>adjustLabelSpan</code> is set this property is used for full-size <code>FormContainers</code>. If more than one <code>FormContainer</code> is in one line, <code>labelSpanL</code> is used.
88
+ * <b>Note:</b> If <code>adjustLabelSpan</code> is set this property is used for full-size {@link sap.ui.layout.form.FormContainer FormContainers}. If more than one {@link sap.ui.layout.form.FormContainer FormContainer} is in one line, <code>labelSpanL</code> is used.
89
89
  * @since 1.16.3
90
90
  */
91
91
  labelSpanM : {type : "int", group : "Misc", defaultValue : 2},
@@ -97,14 +97,14 @@ sap.ui.define([
97
97
  labelSpanS : {type : "int", group : "Misc", defaultValue : 12},
98
98
 
99
99
  /**
100
- * If set, the usage of <code>labelSpanL</code> and <code>labelSpanM</code> are dependent on the number of <code>FormContainers</code> in one row.
101
- * If only one <code>FormContainer</code> is displayed in one row, <code>labelSpanM</code> is used to define the size of the label.
100
+ * If set, the usage of <code>labelSpanL</code> and <code>labelSpanM</code> are dependent on the number of {@link sap.ui.layout.form.FormContainer FormContainers} in one row.
101
+ * If only one {@link sap.ui.layout.form.FormContainer FormContainer} is displayed in one row, <code>labelSpanM</code> is used to define the size of the label.
102
102
  * This is the same for medium and large <code>Forms</code>.
103
- * This is done to align the labels on forms where full-size <code>FormContainers</code> and multiple-column rows are used in the same <code>Form</code>
104
- * (because every <code>FormContainer</code> has its own <code>Grid</code> inside).
103
+ * This is done to align the labels on forms where full-size {@link sap.ui.layout.form.FormContainer FormContainers} and multiple-column rows are used in the same {@link sap.ui.layout.form.Form Form}
104
+ * (because every {@link sap.ui.layout.form.FormContainer FormContainer} has its own {@link sap.ui.layout.Grid Grid} inside).
105
105
  *
106
- * If not set, the usage of <code>labelSpanL</code> and <code>labelSpanM</code> are dependent on the <code>Form</code> size.
107
- * The number of <code>FormContainers</code> doesn't matter in this case.
106
+ * If not set, the usage of <code>labelSpanL</code> and <code>labelSpanM</code> are dependent on the {@link sap.ui.layout.form.Form Form} size.
107
+ * The number of {@link sap.ui.layout.form.FormContainer FormContainers} doesn't matter in this case.
108
108
  * @since 1.34.0
109
109
  */
110
110
  adjustLabelSpan : {type : "boolean", group : "Misc", defaultValue : true},
@@ -159,11 +159,11 @@ sap.ui.define([
159
159
  columnsM : {type : "int", group : "Misc", defaultValue : 1},
160
160
 
161
161
  /**
162
- * If the <code>Form</code> contains only one single <code>FormContainer</code> and this property is set,
163
- * the <code>FormContainer</code> is displayed using the full size of the <code>Form</code>.
162
+ * If the {@link sap.ui.layout.form.Form Form} contains only one single {@link sap.ui.layout.form.FormContainer FormContainer} and this property is set,
163
+ * the {@link sap.ui.layout.form.FormContainer FormContainer} is displayed using the full size of the {@link sap.ui.layout.form.Form Form}.
164
164
  * In this case the properties <code>columnsXL</code>, <code>columnsL</code> and <code>columnsM</code> are ignored.
165
165
  *
166
- * In all other cases the <code>FormContainer</code> is displayed in the size of one column.
166
+ * In all other cases the {@link sap.ui.layout.form.FormContainer FormContainer} is displayed in the size of one column.
167
167
  * @since 1.34.0
168
168
  */
169
169
  singleContainerFullSize : {type : "boolean", group : "Misc", defaultValue : true},
@@ -50,7 +50,7 @@ sap.ui.define([
50
50
  * @extends sap.ui.layout.form.FormLayout
51
51
  *
52
52
  * @author SAP SE
53
- * @version 1.119.1
53
+ * @version 1.120.0
54
54
  *
55
55
  * @constructor
56
56
  * @public
@@ -7,10 +7,10 @@
7
7
  // Provides control sap.ui.layout.form.FormElement.
8
8
  sap.ui.define([
9
9
  './FormElement',
10
- 'sap/ui/layout/library'
10
+ './FormHelper'
11
11
  ], function(
12
12
  FormElement,
13
- library
13
+ FormHelper
14
14
  ) {
15
15
  "use strict";
16
16
 
@@ -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.119.1
33
+ * @version 1.120.0
34
34
  *
35
35
  * @constructor
36
36
  * @public
@@ -398,9 +398,9 @@ sap.ui.define([
398
398
  for (i = 0; i < aFields.length; i++) {
399
399
  if (i < aFields.length - 1) {
400
400
  if (aDelimiters.length > i) {
401
- library.form.FormHelper.updateDelimiter(aDelimiters[i], sDelimiter);
401
+ FormHelper.updateDelimiter(aDelimiters[i], sDelimiter);
402
402
  } else {
403
- var oDelimiter = library.form.FormHelper.createDelimiter(sDelimiter, sId + i);
403
+ var oDelimiter = FormHelper.createDelimiter(sDelimiter, sId + i);
404
404
  oDelimiter.addStyleClass("sapUiFormDelimiter");
405
405
  this.addAggregation("_delimiters", oDelimiter);
406
406
  }
@@ -443,7 +443,7 @@ sap.ui.define([
443
443
  _updateDisplayText.call(this, false); // if already rendered update text
444
444
  } else {
445
445
  var sId = this.getId() + "-display";
446
- oDisplay = library.form.FormHelper.createSemanticDisplayControl("", sId);
446
+ oDisplay = FormHelper.createSemanticDisplayControl("", sId);
447
447
  oDisplay.addDelegate(oRenderingDelegate, true, this);
448
448
  this.setAggregation("_displayField", oDisplay);
449
449
  }
@@ -492,11 +492,11 @@ sap.ui.define([
492
492
  var oDisplay = this.getAggregation("_displayField");
493
493
  var sText = _concatenateTexts.call(this, aTexts);
494
494
  oDisplay._bNoForceUpdate = true; // prevent double update, as setText might trigger re-rendering (again as a re-rendeing could happen until promise resolved)
495
- library.form.FormHelper.updateSemanticDisplayControl(oDisplay, sText);
495
+ FormHelper.updateSemanticDisplayControl(oDisplay, sText);
496
496
  }.bind(this));
497
497
  } else {
498
498
  var sText = _concatenateTexts.call(this, aTexts);
499
- library.form.FormHelper.updateSemanticDisplayControl(oDisplay, sText);
499
+ FormHelper.updateSemanticDisplayControl(oDisplay, sText);
500
500
  }
501
501
  } else if (oDisplay && oDisplay._bNoForceUpdate) { // execute update on next rendering
502
502
  oDisplay._bNoForceUpdate = false;
@@ -67,7 +67,7 @@ sap.ui.define([
67
67
  * <b>Note:</b> If a more complex form is needed, use the <code>{@link sap.ui.layout.form.Form Form}</code> control instead.
68
68
  *
69
69
  * @extends sap.ui.core.Control
70
- * @version 1.119.1
70
+ * @version 1.120.0
71
71
  *
72
72
  * @constructor
73
73
  * @public
@@ -20,13 +20,13 @@ sap.ui.define([
20
20
  * @namespace
21
21
  * @alias sap.ui.layout
22
22
  * @author SAP SE
23
- * @version 1.119.1
23
+ * @version 1.120.0
24
24
  * @since 1.15
25
25
  * @public
26
26
  */
27
27
  var thisLib = sap.ui.getCore().initLibrary({
28
28
  name : "sap.ui.layout",
29
- version: "1.119.1",
29
+ version: "1.120.0",
30
30
  dependencies: ["sap.ui.core"],
31
31
  designtime: "sap/ui/layout/designtime/library.designtime",
32
32
  types: [
@@ -509,6 +509,9 @@ sap.ui.define([
509
509
  *
510
510
  * @namespace
511
511
  * @public
512
+ * @deprecated Since version 1.67.0.
513
+ * as <code>sap.ui.commons</code> library is deprecated and the <code>GridLayout</code> must not be used in responsive applications.
514
+ * Please use <code>ResponsiveGridLayout</code> or <code>ColumnLayout</code> instead.
512
515
  */
513
516
  thisLib.form.GridElementCells = DataType.createType('sap.ui.layout.form.GridElementCells', {
514
517
  isValid : function(vValue) {
@@ -770,25 +773,9 @@ sap.ui.define([
770
773
  DataType.getType('int')
771
774
  );
772
775
 
773
- // factory for Form to create labels and buttons to be overwritten by commons and mobile library
774
- if (!thisLib.form.FormHelper) {
775
- thisLib.form.FormHelper = {
776
- init: function() {return null;}, /* must return a Promise if modules still needs to be loaded. The promise must be fulfilled if everything is loaded. */
777
- createLabel: function(sText){ throw new Error("no Label control available!"); }, /* must return a Label control */
778
- createButton: function(sId, fPressFunction, oListener){ throw new Error("no Button control available!"); }, /* must return a button control */
779
- setButtonContent: function(oButton, sText, sTooltip, sIcon, sIconHovered){ throw new Error("no Button control available!"); },
780
- addFormClass: function(){ return null; },
781
- setToolbar: function(oToolbar){ return oToolbar; }, /* allow to overwrite toolbar settings */
782
- getToolbarTitle: function(oToolbar) { return oToolbar && oToolbar.getId(); }, /* To determine title ID in toolbar for aria-label */
783
- createDelimiter: function(sDelimiter, sId){ throw new Error("no delimiter control available!"); }, /* must return a kind of text control */
784
- createSemanticDisplayControl: function(sText, sId){ throw new Error("no display control available!"); }, /* must return a kind of text control */
785
- updateDelimiter: function(oDelimiter, sDelimiter){ throw new Error("no delimiter control available!"); },
786
- updateSemanticDisplayControl: function(oControl, sText){ throw new Error("no display control available!"); },
787
- bArrowKeySupport: true, /* enables the keyboard support for arrow keys */
788
- bFinal: false /* if true, the helper must not be overwritten by an other library */
789
- };
790
- }
791
-
776
+ /**
777
+ * @deprecated As of version 1.120
778
+ */
792
779
  if (!thisLib.GridHelper) {
793
780
  thisLib.GridHelper = {
794
781
  getLibrarySpecificClass: function () {
@@ -0,0 +1,17 @@
1
+
2
+ FORM_EXPAND=\u041F\u0440\u043E\u0448\u0438\u0440\u0438
3
+ FORM_COLLAPSE=\u0421\u043A\u0440\u0438\u0458
4
+
5
+ SPLITTER_MOVE=\u041A\u043E\u0440\u0438\u0441\u0442\u0435\u0442\u0435 \u0433\u0438 \u0441\u0442\u0440\u0435\u043B\u043A\u0438\u0442\u0435 \u0437\u0430 \u0434\u0432\u0438\u0436\u0435\u045A\u0435
6
+
7
+ SIDE_CONTENT_LABEL=\u0421\u043F\u043E\u0440\u0435\u0434\u043D\u0430 \u0441\u043E\u0434\u0440\u0436\u0438\u043D\u0430
8
+
9
+ RESPONSIVE_SPLITTER_RESIZE=\u041F\u0440\u043E\u043C\u0435\u043D\u0438 \u0458\u0430 \u0433\u043E\u043B\u0435\u043C\u0438\u043D\u0430\u0442\u0430 \u043F\u043E\u043C\u0435\u0453\u0443 \u043E\u043A\u043D\u043E {0} \u0438 \u043E\u043A\u043D\u043E {1}
10
+
11
+ RESPONSIVE_SPLITTER_HOME=\u041E\u0434\u0438 \u043D\u0430 \u043F\u043E\u0434\u0435\u043B\u0435\u043D \u0435\u043A\u0440\u0430\u043D
12
+
13
+ RESPONSIVE_SPLITTER_AND=\u0438
14
+
15
+ RESPONSIVE_SPLITTER_GOTO=\u041E\u0434\u0438 \u043D\u0430 \u0435\u043A\u0440\u0430\u043D\u043E\u0442
16
+
17
+ RESPONSIVE_SPLITTER_ARIA_PAGINATOR_LABEL=\u041C\u0435\u043D\u0443\u0432\u0430\u0447 \u043D\u0430 \u043E\u043A\u043D\u0430
@@ -24,7 +24,7 @@
24
24
  .sapUiFormResGrid.sapUiFormToolbar > div:first-child {
25
25
  height: 3rem; /* to have in compact mode and in commons always 3rem on Form header */
26
26
  line-height: 3rem;
27
- padding: 0 0.75rem;
27
+ padding: 0 0.75rem 0 1rem;
28
28
  }
29
29
 
30
30
  /* Grid */
package/ui5.yaml CHANGED
@@ -20,10 +20,10 @@ builder:
20
20
  filters:
21
21
  - sap/ui/layout/
22
22
  - sap/ui/layout/manifest.json
23
- - '!sap/ui/layout/*-preload.js'
24
- - '!sap/ui/layout/**/*.designtime.js'
25
- - '!sap/ui/layout/**/designtime/'
26
- - '!sap/ui/layout/**/*.support.js'
23
+ - "!sap/ui/layout/*-preload.js"
24
+ - "!sap/ui/layout/**/*.designtime.js"
25
+ - "!sap/ui/layout/**/designtime/"
26
+ - "!sap/ui/layout/**/*.support.js"
27
27
  resolve: false
28
28
  bundleOptions:
29
29
  optimize: true