@openui5/sap.ui.layout 1.103.1 → 1.106.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.
- package/.eslintrc.json +2 -3
- package/.reuse/dep5 +35 -15
- package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +5 -0
- package/THIRDPARTY.txt +64 -21
- package/package.json +2 -2
- package/src/sap/ui/layout/.library +1 -1
- package/src/sap/ui/layout/AlignedFlowLayout.js +1 -1
- package/src/sap/ui/layout/AssociativeSplitter.js +3 -4
- package/src/sap/ui/layout/BlockLayout.js +1 -1
- package/src/sap/ui/layout/BlockLayoutCell.js +2 -3
- package/src/sap/ui/layout/BlockLayoutCellData.js +1 -1
- package/src/sap/ui/layout/BlockLayoutRow.js +1 -1
- package/src/sap/ui/layout/DynamicSideContent.js +1 -1
- package/src/sap/ui/layout/FixFlex.js +1 -1
- package/src/sap/ui/layout/Grid.js +1 -1
- package/src/sap/ui/layout/GridData.js +1 -1
- package/src/sap/ui/layout/GridRenderer.js +1 -1
- package/src/sap/ui/layout/HorizontalLayout.js +1 -1
- package/src/sap/ui/layout/PaneContainer.js +1 -1
- package/src/sap/ui/layout/ResponsiveFlowLayout.js +1 -1
- package/src/sap/ui/layout/ResponsiveFlowLayoutData.js +1 -1
- package/src/sap/ui/layout/ResponsiveSplitter.js +1 -1
- package/src/sap/ui/layout/ResponsiveSplitterPage.js +1 -1
- package/src/sap/ui/layout/SplitPane.js +1 -1
- package/src/sap/ui/layout/Splitter.js +1 -1
- package/src/sap/ui/layout/SplitterLayoutData.js +1 -1
- package/src/sap/ui/layout/VerticalLayout.js +1 -1
- package/src/sap/ui/layout/changeHandler/AddFormContainer.js +24 -34
- package/src/sap/ui/layout/changeHandler/AddFormField.js +1 -1
- package/src/sap/ui/layout/changeHandler/AddSimpleFormField.js +5 -3
- package/src/sap/ui/layout/changeHandler/AddSimpleFormGroup.js +32 -36
- package/src/sap/ui/layout/changeHandler/HideSimpleForm.js +22 -13
- package/src/sap/ui/layout/changeHandler/MoveSimpleForm.js +16 -19
- package/src/sap/ui/layout/changeHandler/RenameFormContainer.js +8 -19
- package/src/sap/ui/layout/changeHandler/RenameSimpleForm.js +18 -20
- package/src/sap/ui/layout/changeHandler/UnhideSimpleForm.js +13 -13
- package/src/sap/ui/layout/cssgrid/CSSGrid.js +1 -1
- package/src/sap/ui/layout/cssgrid/GridBasicLayout.js +1 -1
- package/src/sap/ui/layout/cssgrid/GridBoxLayout.js +1 -1
- package/src/sap/ui/layout/cssgrid/GridItemLayoutData.js +1 -1
- package/src/sap/ui/layout/cssgrid/GridLayoutBase.js +1 -1
- package/src/sap/ui/layout/cssgrid/GridLayoutDelegate.js +1 -1
- package/src/sap/ui/layout/cssgrid/GridResponsiveLayout.js +1 -1
- package/src/sap/ui/layout/cssgrid/GridSettings.js +1 -1
- package/src/sap/ui/layout/cssgrid/ResponsiveColumnItemLayoutData.js +1 -1
- package/src/sap/ui/layout/cssgrid/ResponsiveColumnLayout.js +1 -1
- package/src/sap/ui/layout/designtime/form/Form.designtime.js +3 -0
- package/src/sap/ui/layout/designtime/form/FormContainer.designtime.js +4 -1
- package/src/sap/ui/layout/designtime/form/SimpleForm.designtime.js +4 -1
- package/src/sap/ui/layout/form/ColumnContainerData.js +1 -1
- package/src/sap/ui/layout/form/ColumnElementData.js +1 -1
- package/src/sap/ui/layout/form/ColumnLayout.js +1 -1
- package/src/sap/ui/layout/form/Form.js +1 -1
- package/src/sap/ui/layout/form/FormContainer.js +1 -1
- package/src/sap/ui/layout/form/FormElement.js +1 -1
- package/src/sap/ui/layout/form/FormLayout.js +1 -1
- package/src/sap/ui/layout/form/GridContainerData.js +1 -1
- package/src/sap/ui/layout/form/GridElementData.js +1 -1
- package/src/sap/ui/layout/form/GridLayout.js +1 -1
- package/src/sap/ui/layout/form/ResponsiveGridLayout.js +1 -1
- package/src/sap/ui/layout/form/ResponsiveLayout.js +1 -1
- package/src/sap/ui/layout/form/SemanticFormElement.js +1 -1
- package/src/sap/ui/layout/form/SimpleForm.js +1 -1
- package/src/sap/ui/layout/library.js +2 -2
- package/src/sap/ui/layout/rules/Form.support.js +32 -32
|
@@ -5,11 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/ui/fl/changeHandler/Base",
|
|
9
8
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
10
9
|
"sap/base/Log"
|
|
11
10
|
], function(
|
|
12
|
-
BaseChangeHandler,
|
|
13
11
|
JsControlTreeModifier,
|
|
14
12
|
Log
|
|
15
13
|
) {
|
|
@@ -20,7 +18,7 @@ sap.ui.define([
|
|
|
20
18
|
*
|
|
21
19
|
* @alias sap.ui.layout.changeHandler.RenameForm
|
|
22
20
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
21
|
+
* @version 1.106.0
|
|
24
22
|
* @since 1.40
|
|
25
23
|
* @private
|
|
26
24
|
* @experimental Since 1.40. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
@@ -42,25 +40,23 @@ sap.ui.define([
|
|
|
42
40
|
var oView = mPropertyBag.view;
|
|
43
41
|
var oAppComponent = mPropertyBag.appComponent;
|
|
44
42
|
|
|
45
|
-
var
|
|
46
|
-
|
|
43
|
+
var oTexts = oChangeWrapper.getTexts();
|
|
44
|
+
var oContent = oChangeWrapper.getContent();
|
|
47
45
|
// !important : sRenameId was used in 1.40, do not remove for compatibility!
|
|
48
|
-
var vSelector =
|
|
46
|
+
var vSelector = oContent.elementSelector || oContent.sRenameId;
|
|
49
47
|
var oRenamedElement = oModifier.bySelector(vSelector, oAppComponent, oView);
|
|
50
48
|
|
|
51
|
-
if (
|
|
49
|
+
if (oTexts && oTexts.formText && this._isProvided(oTexts.formText.value)) {
|
|
52
50
|
if (!oControl) {
|
|
53
51
|
return Promise.reject(new Error("no Control provided for renaming"));
|
|
54
52
|
}
|
|
55
53
|
|
|
56
54
|
return oModifier.getProperty(oRenamedElement, "text").then(function(sProperty) {
|
|
57
55
|
oChangeWrapper.setRevertData(sProperty);
|
|
58
|
-
var sValue =
|
|
56
|
+
var sValue = oTexts.formText.value;
|
|
59
57
|
oModifier.setProperty(oRenamedElement, "text", sValue);
|
|
60
58
|
});
|
|
61
59
|
} else {
|
|
62
|
-
Log.error("Change does not contain sufficient information to be applied: [" + oChangeDefinition.layer + "]" + oChangeDefinition.namespace + "/" + oChangeDefinition.fileName + "." + oChangeDefinition.fileType);
|
|
63
|
-
//however subsequent changes should be applied
|
|
64
60
|
return Promise.resolve();
|
|
65
61
|
}
|
|
66
62
|
};
|
|
@@ -77,12 +73,12 @@ sap.ui.define([
|
|
|
77
73
|
RenameForm.revertChange = function(oChangeWrapper, oControl, mPropertyBag) {
|
|
78
74
|
var sOldText = oChangeWrapper.getRevertData();
|
|
79
75
|
var oAppComponent = mPropertyBag.appComponent;
|
|
80
|
-
var
|
|
76
|
+
var oChangeContent = oChangeWrapper.getContent();
|
|
81
77
|
var oView = mPropertyBag.view;
|
|
82
78
|
var oModifier = mPropertyBag.modifier;
|
|
83
79
|
|
|
84
80
|
// !important : sRenameId was used in 1.40, do not remove for compatibility!
|
|
85
|
-
var vSelector =
|
|
81
|
+
var vSelector = oChangeContent.elementSelector || oChangeContent.sRenameId;
|
|
86
82
|
var oRenamedElement = oModifier.bySelector(vSelector, oAppComponent, oView);
|
|
87
83
|
|
|
88
84
|
if (sOldText || sOldText === "") {
|
|
@@ -98,13 +94,13 @@ sap.ui.define([
|
|
|
98
94
|
/**
|
|
99
95
|
* Completes the change by adding change handler specific content
|
|
100
96
|
*
|
|
101
|
-
* @param {sap.ui.fl.Change}
|
|
97
|
+
* @param {sap.ui.fl.Change} oChange - change wrapper object to be completed
|
|
102
98
|
* @param {object} oSpecificChangeInfo - with attribute fieldLabel, the new field label to be included in the change
|
|
103
99
|
* @param {object} mPropertyBag - map containing the application component
|
|
104
100
|
* @private
|
|
105
101
|
*/
|
|
106
|
-
RenameForm.completeChangeContent = function(
|
|
107
|
-
var
|
|
102
|
+
RenameForm.completeChangeContent = function(oChange, oSpecificChangeInfo, mPropertyBag) {
|
|
103
|
+
var oContent = {};
|
|
108
104
|
|
|
109
105
|
if (!oSpecificChangeInfo.changeType) {
|
|
110
106
|
throw new Error("oSpecificChangeInfo.changeType attribute required");
|
|
@@ -118,17 +114,19 @@ sap.ui.define([
|
|
|
118
114
|
} else if (oSpecificChangeInfo.changeType === "renameTitle") {
|
|
119
115
|
oStableRenamedElement = oRenamedElement.getTitle();
|
|
120
116
|
}
|
|
121
|
-
|
|
122
|
-
|
|
117
|
+
oContent.elementSelector = JsControlTreeModifier.getSelector(oStableRenamedElement, mPropertyBag.appComponent);
|
|
118
|
+
oChange.addDependentControl(oStableRenamedElement, "elementSelector", mPropertyBag);
|
|
123
119
|
} else {
|
|
124
120
|
throw new Error("oSpecificChangeInfo.renamedElement attribute required");
|
|
125
121
|
}
|
|
126
122
|
|
|
127
123
|
if (this._isProvided(oSpecificChangeInfo.value)) {
|
|
128
|
-
|
|
124
|
+
oChange.setText("formText", oSpecificChangeInfo.value, "XFLD");
|
|
129
125
|
} else {
|
|
130
126
|
throw new Error("oSpecificChangeInfo.value attribute required");
|
|
131
127
|
}
|
|
128
|
+
|
|
129
|
+
oChange.setContent(oContent);
|
|
132
130
|
};
|
|
133
131
|
|
|
134
132
|
RenameForm._isProvided = function(sString){
|
|
@@ -136,13 +134,13 @@ sap.ui.define([
|
|
|
136
134
|
};
|
|
137
135
|
|
|
138
136
|
RenameForm.getChangeVisualizationInfo = function(oChange, oAppComponent) {
|
|
139
|
-
var oElementSelector = oChange.
|
|
137
|
+
var oElementSelector = oChange.getContent().elementSelector;
|
|
140
138
|
var oAffectedControlSelector = JsControlTreeModifier.bySelector(oElementSelector, oAppComponent).getParent().getId();
|
|
141
139
|
return {
|
|
142
140
|
affectedControls: [oAffectedControlSelector],
|
|
143
141
|
payload: {
|
|
144
142
|
originalLabel: oChange.getRevertData(),
|
|
145
|
-
newLabel: oChange.
|
|
143
|
+
newLabel: oChange.getTexts().formText.value
|
|
146
144
|
}
|
|
147
145
|
};
|
|
148
146
|
};
|
|
@@ -13,7 +13,7 @@ sap.ui.define([
|
|
|
13
13
|
* Change handler for hiding of a control.
|
|
14
14
|
* @alias sap.ui.fl.changeHandler.HideControl
|
|
15
15
|
* @author SAP SE
|
|
16
|
-
* @version 1.
|
|
16
|
+
* @version 1.106.0
|
|
17
17
|
* @experimental Since 1.27.0
|
|
18
18
|
*/
|
|
19
19
|
var UnhideForm = { };
|
|
@@ -37,16 +37,15 @@ sap.ui.define([
|
|
|
37
37
|
var oView = mPropertyBag.view;
|
|
38
38
|
var oAppComponent = mPropertyBag.appComponent;
|
|
39
39
|
|
|
40
|
-
var
|
|
41
|
-
|
|
40
|
+
var oContent = oChangeWrapper.getContent();
|
|
42
41
|
// in case of custom fields the application needs to be on JS.
|
|
43
|
-
// In the other case the
|
|
42
|
+
// In the other case the visibility of the control will be overridden by the custom field binding afterwards
|
|
44
43
|
if (_isXmlModifier(mPropertyBag)) {
|
|
45
44
|
return Promise.reject(Error("Change cannot be applied in XML. Retrying in JS."));
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
// !important : sUnhideId was used in 1.40, do not remove for compatibility reasons!
|
|
49
|
-
var oControlToUnhide = oModifier.bySelector(
|
|
48
|
+
var oControlToUnhide = oModifier.bySelector(oContent.elementSelector || oContent.sUnhideId, oAppComponent, oView);
|
|
50
49
|
return Promise.resolve()
|
|
51
50
|
.then(function() {
|
|
52
51
|
return oModifier.getAggregation(oControl, "content");
|
|
@@ -54,7 +53,7 @@ sap.ui.define([
|
|
|
54
53
|
.then(function(aContent) {
|
|
55
54
|
var iStart = -1;
|
|
56
55
|
|
|
57
|
-
if (
|
|
56
|
+
if (oChangeWrapper.getChangeType() === "unhideSimpleFormField") {
|
|
58
57
|
oChangeWrapper.setRevertData(true);
|
|
59
58
|
aContent.some(function (oField, index) {
|
|
60
59
|
if (oField === oControlToUnhide) {
|
|
@@ -86,21 +85,22 @@ sap.ui.define([
|
|
|
86
85
|
* @public
|
|
87
86
|
*/
|
|
88
87
|
UnhideForm.completeChangeContent = function(oChangeWrapper, oSpecificChangeInfo, mPropertyBag) {
|
|
89
|
-
var oChangeDefinition = oChangeWrapper.getDefinition();
|
|
90
88
|
//TODO remove sUnhideId when rta is switched to new logic to create reveal changes
|
|
89
|
+
var oContent = {};
|
|
91
90
|
if (oSpecificChangeInfo.sUnhideId) {
|
|
92
91
|
var oUnhideElement = sap.ui.getCore().byId(oSpecificChangeInfo.sUnhideId);
|
|
93
|
-
|
|
92
|
+
oContent.elementSelector = JsControlTreeModifier.getSelector(oUnhideElement, mPropertyBag.appComponent);
|
|
94
93
|
oChangeWrapper.addDependentControl(oUnhideElement, "elementSelector", mPropertyBag);
|
|
95
94
|
} else if (oSpecificChangeInfo.revealedElementId ) {
|
|
96
95
|
//translate from FormElement (unstable id) to the label control (stable id and in public aggregation)
|
|
97
96
|
var oFormElement = sap.ui.getCore().byId(oSpecificChangeInfo.revealedElementId || oSpecificChangeInfo.sUnhideId);
|
|
98
97
|
var oLabel = oFormElement.getLabel();
|
|
99
|
-
|
|
98
|
+
oContent.elementSelector = JsControlTreeModifier.getSelector(oLabel, mPropertyBag.appComponent);
|
|
100
99
|
oChangeWrapper.addDependentControl(oLabel, "elementSelector", mPropertyBag);
|
|
101
100
|
} else {
|
|
102
101
|
throw new Error("oSpecificChangeInfo.revealedElementId attribute required");
|
|
103
102
|
}
|
|
103
|
+
oChangeWrapper.setContent(oContent);
|
|
104
104
|
};
|
|
105
105
|
|
|
106
106
|
/**
|
|
@@ -120,10 +120,10 @@ sap.ui.define([
|
|
|
120
120
|
var oView = mPropertyBag.view;
|
|
121
121
|
var oAppComponent = mPropertyBag.appComponent;
|
|
122
122
|
|
|
123
|
-
var
|
|
123
|
+
var oChangeContent = oChangeWrapper.getContent();
|
|
124
124
|
|
|
125
125
|
// !important : sUnhideId was used in 1.40, do not remove for compatibility reasons!
|
|
126
|
-
var oControlToRevertUnhide = oModifier.bySelector(
|
|
126
|
+
var oControlToRevertUnhide = oModifier.bySelector(oChangeContent.elementSelector || oChangeContent.sUnhideId, oAppComponent, oView);
|
|
127
127
|
return Promise.resolve()
|
|
128
128
|
.then(function() {
|
|
129
129
|
return oModifier.getAggregation(oControl, "content");
|
|
@@ -131,7 +131,7 @@ sap.ui.define([
|
|
|
131
131
|
.then(function(aContent) {
|
|
132
132
|
var iStart = -1;
|
|
133
133
|
|
|
134
|
-
if (
|
|
134
|
+
if (oChangeWrapper.getChangeType() === "unhideSimpleFormField") {
|
|
135
135
|
aContent.some(function (oField, index) {
|
|
136
136
|
if (oField === oControlToRevertUnhide) {
|
|
137
137
|
iStart = index;
|
|
@@ -157,7 +157,7 @@ sap.ui.define([
|
|
|
157
157
|
|
|
158
158
|
UnhideForm.getChangeVisualizationInfo = function(oChange, oAppComponent) {
|
|
159
159
|
return {
|
|
160
|
-
affectedControls: [JsControlTreeModifier.bySelector(oChange.
|
|
160
|
+
affectedControls: [JsControlTreeModifier.bySelector(oChange.getContent().elementSelector, oAppComponent).getParent().getId()]
|
|
161
161
|
};
|
|
162
162
|
};
|
|
163
163
|
|
|
@@ -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.
|
|
99
|
+
* @version 1.106.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
|
* Have to possibility to hold multiple sap.ui.layout.cssgrid.GridSettings and apply the currently active GridSettings.
|
|
22
22
|
*
|
|
23
23
|
* @author SAP SE
|
|
24
|
-
* @version 1.
|
|
24
|
+
* @version 1.106.0
|
|
25
25
|
*
|
|
26
26
|
* @extends sap.ui.layout.cssgrid.GridLayoutBase
|
|
27
27
|
*
|
|
@@ -111,6 +111,9 @@ sap.ui.define([
|
|
|
111
111
|
return null;
|
|
112
112
|
}
|
|
113
113
|
},
|
|
114
|
+
remove : {
|
|
115
|
+
removeLastElement: true
|
|
116
|
+
},
|
|
114
117
|
add: {
|
|
115
118
|
delegate: function (oFormContainer) {
|
|
116
119
|
if (fnIsLayoutSupported(oFormContainer)) {
|
|
@@ -139,4 +142,4 @@ sap.ui.define([
|
|
|
139
142
|
}
|
|
140
143
|
};
|
|
141
144
|
|
|
142
|
-
});
|
|
145
|
+
});
|
|
@@ -101,6 +101,9 @@ sap.ui.define([
|
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
|
+
remove : {
|
|
105
|
+
removeLastElement: true
|
|
106
|
+
},
|
|
104
107
|
createContainer: {
|
|
105
108
|
changeType: "addSimpleFormGroup",
|
|
106
109
|
changeOnRelevantContainer: true,
|
|
@@ -293,4 +296,4 @@ sap.ui.define([
|
|
|
293
296
|
}
|
|
294
297
|
};
|
|
295
298
|
|
|
296
|
-
});
|
|
299
|
+
});
|
|
@@ -60,7 +60,7 @@ sap.ui.define([
|
|
|
60
60
|
* This control cannot be used stand-alone, it just renders a <code>Form</code> control,
|
|
61
61
|
* so it must be assigned to a <code>Form</code> control using the <code>layout</code> aggregation.
|
|
62
62
|
* @extends sap.ui.layout.form.FormLayout
|
|
63
|
-
* @version 1.
|
|
63
|
+
* @version 1.106.0
|
|
64
64
|
*
|
|
65
65
|
* @constructor
|
|
66
66
|
* @public
|
|
@@ -53,7 +53,7 @@ sap.ui.define([
|
|
|
53
53
|
*
|
|
54
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.
|
|
55
55
|
* @extends sap.ui.layout.form.FormLayout
|
|
56
|
-
* @version 1.
|
|
56
|
+
* @version 1.106.0
|
|
57
57
|
*
|
|
58
58
|
* @constructor
|
|
59
59
|
* @public
|
|
@@ -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.
|
|
70
|
+
* @version 1.106.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.
|
|
23
|
+
* @version 1.106.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.
|
|
29
|
+
version: "1.106.0",
|
|
30
30
|
dependencies: ["sap.ui.core"],
|
|
31
31
|
designtime: "sap/ui/layout/designtime/library.designtime",
|
|
32
32
|
types: [
|