@sapui5/sap.suite.ui.generic.template 1.96.11 → 1.96.12
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/package.json +1 -1
- package/src/sap/suite/ui/generic/template/.library +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +1 -0
- package/src/sap/suite/ui/generic/template/changeHandler/AddFilterItem.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/AddFooterActionButton.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/AddGroup.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/AddGroupElement.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/AddHeaderActionButton.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/AddHeaderFacet.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/AddSection.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/AddSubSection.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/AddTableColumn.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/AddToolbarActionButton.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/MoveFilterItems.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/MoveGroup.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/MoveGroupElement.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/MoveHeaderAndFooterActionButton.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/MoveHeaderFacet.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/MoveSection.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/MoveSubSection.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/MoveTableColumns.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/MoveToolbarActionButtons.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/RemoveFilterItem.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/RemoveGroup.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/RemoveGroupElement.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/RemoveHeaderAndFooterActionButton.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/RemoveHeaderFacet.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/RemoveSection.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/RemoveSubSection.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/RemoveTableColumn.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/RemoveToolbarActionButton.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/RevealFilterItem.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/RevealHeaderFacet.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/RevealTableColumn.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/RevealToolbarActionButton.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/generic/AddElement.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/generic/MoveElements.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/generic/RemoveElement.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/generic/RevealElement.js +1 -1
- package/src/sap/suite/ui/generic/template/changeHandler/util/AnnotationPropertyCommand.js +1 -1
- package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartChartWrapper.js +24 -25
- package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartTableWrapper.js +28 -28
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartTableHandler.js +22 -11
- package/src/sap/suite/ui/generic/template/library.js +1 -1
- package/src/sap/suite/ui/generic/template/listTemplates/listUtils.js +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sapui5/sap.suite.ui.generic.template",
|
|
3
|
-
"version": "1.96.
|
|
3
|
+
"version": "1.96.12",
|
|
4
4
|
"description": "SAPUI5 Library sap.suite.ui.generic.template",
|
|
5
5
|
"homepage": "https://sap.github.io/ui5-tooling/pages/SAPUI5/",
|
|
6
6
|
"author": "SAP SE (https://www.sap.com)",
|
|
@@ -1755,6 +1755,7 @@ sap.ui.define([
|
|
|
1755
1755
|
* - hiding table columns dynamically using deactivate columns (see applyHeaderContextToSmartTablesDynamicColumnHide) when OP is bound and header data available
|
|
1756
1756
|
* - this causes SmartTable to rebind (in some cases - probably when columns hidden before now are not hidden anymore)
|
|
1757
1757
|
* - workaround to take beforeRebindTable event as indicator for state change, as no specific event is provided when user changes personalization (see SmartTableWrapper)
|
|
1758
|
+
* Update: In the meantime, specific event (UiStateChange) is provided and used, however, this event is also triggered when deactivating columns programmatically
|
|
1758
1759
|
* - subSection waiting for state being applied before restoring binding to avoid table using variant management to load data before correct variant is applied
|
|
1759
1760
|
*
|
|
1760
1761
|
* Cannot be handled generically by state preserver
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
sap.ui.define([
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
"sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartTableChartCommon"
|
|
3
|
+
], function(SmartTableChartCommon) {
|
|
4
4
|
"use strict";
|
|
5
5
|
function SmartChartWrapper(oWrappedControl) {
|
|
6
|
-
|
|
6
|
+
// (private) instance attributes
|
|
7
7
|
// control to be wrapped
|
|
8
8
|
var oControl = oWrappedControl;
|
|
9
9
|
// controlling initialization state of wrapped control
|
|
@@ -12,46 +12,45 @@ sap.ui.define([
|
|
|
12
12
|
|
|
13
13
|
// preliminary put here to simplify change - todo: decide whether to get this information once in initialize or whenever it's needed
|
|
14
14
|
var bUseVariantManagement;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
//private methods
|
|
16
|
+
function fnGetState() {
|
|
17
|
+
if (!bReady) {
|
|
18
18
|
return oPreliminaryState;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
var oControlState = SmartTableChartCommon.getState(oControl, bUseVariantManagement);
|
|
21
|
+
//Add Table specific logic here as and when required
|
|
22
|
+
return oControlState;
|
|
23
|
+
}
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
function fnSetState(oState) {
|
|
26
|
+
if (!bReady) {
|
|
27
27
|
// SmartTable/SmartChart is not ready to set a state - keep it in local memory
|
|
28
28
|
// if multiple states are set before, the last one wins
|
|
29
29
|
oPreliminaryState = oState;
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
SmartTableChartCommon.setState(oControl, bUseVariantManagement, oState);
|
|
33
33
|
//Add Table specific logic here as and when required
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
}
|
|
35
|
+
//Initialization
|
|
36
|
+
SmartTableChartCommon.initialize(oControl).then(function(){
|
|
37
37
|
bReady = true;
|
|
38
38
|
bUseVariantManagement = oControl.getUseVariantManagement();
|
|
39
39
|
if (oPreliminaryState) {
|
|
40
40
|
fnSetState(oPreliminaryState);
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
oControl.attachBeforeRebindChart(fnHandler);
|
|
43
|
+
|
|
44
|
+
function fnAttachStateChanged(fnHandler) {
|
|
45
|
+
oControl.attachUiStateChange(fnHandler);
|
|
47
46
|
}
|
|
48
47
|
|
|
49
|
-
|
|
48
|
+
return {
|
|
50
49
|
getState: fnGetState,
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
setState: fnSetState,
|
|
51
|
+
attachStateChanged: fnAttachStateChanged
|
|
53
52
|
};
|
|
54
|
-
|
|
53
|
+
}
|
|
55
54
|
|
|
56
|
-
|
|
55
|
+
return SmartChartWrapper;
|
|
57
56
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
sap.ui.define([
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
"sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartTableChartCommon"
|
|
3
|
+
], function(SmartTableChartCommon) {
|
|
4
4
|
"use strict";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
function SmartTableWrapper(oWrappedControl) {
|
|
6
|
+
// (private) instance attributes
|
|
7
7
|
// control to be wrapped
|
|
8
8
|
var oControl = oWrappedControl;
|
|
9
9
|
// controlling initialization state of wrapped control
|
|
@@ -12,44 +12,44 @@ sap.ui.define([
|
|
|
12
12
|
|
|
13
13
|
// preliminary put here to simplify change - todo: decide whether to get this information once in initialize or whenever it's needed
|
|
14
14
|
var bUseVariantManagement;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
//private methods
|
|
16
|
+
function fnGetState() {
|
|
17
|
+
if (!bReady) {
|
|
18
18
|
return oPreliminaryState;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
var oControlState = SmartTableChartCommon.getState(oControl, bUseVariantManagement);//fnCommonGetState();
|
|
21
|
+
//Add Table specific logic here as and when required
|
|
22
|
+
return oControlState;
|
|
23
|
+
}
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
function fnSetState(oState) {
|
|
26
|
+
if (!bReady) {
|
|
27
27
|
// SmartTable/SmartChart is not ready to set a state - keep it in local memory
|
|
28
28
|
// if multiple states are set before, the last one wins
|
|
29
29
|
oPreliminaryState = oState;
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
SmartTableChartCommon.setState(oControl, bUseVariantManagement, oState);
|
|
33
|
+
//Add Table specific logic here as and when required
|
|
34
|
+
}
|
|
35
|
+
//Initialization
|
|
36
|
+
SmartTableChartCommon.initialize(oControl).then(function(){
|
|
37
37
|
bReady = true;
|
|
38
|
-
|
|
38
|
+
bUseVariantManagement = oControl.getUseVariantManagement();
|
|
39
39
|
if (oPreliminaryState) {
|
|
40
40
|
fnSetState(oPreliminaryState);
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
oControl.attachBeforeRebindTable(fnHandler);
|
|
43
|
+
|
|
44
|
+
function fnAttachStateChanged(fnHandler) {
|
|
45
|
+
oControl.attachUiStateChange(fnHandler);
|
|
47
46
|
}
|
|
48
|
-
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
49
|
getState: fnGetState,
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
setState: fnSetState,
|
|
51
|
+
attachStateChanged: fnAttachStateChanged
|
|
52
52
|
};
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
}
|
|
54
|
+
return SmartTableWrapper;
|
|
55
55
|
});
|
|
@@ -2697,7 +2697,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2697
2697
|
* @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
|
|
2698
2698
|
* @public
|
|
2699
2699
|
* @extends sap.ui.base.Object
|
|
2700
|
-
* @version 1.96.
|
|
2700
|
+
* @version 1.96.12
|
|
2701
2701
|
* @since 1.30.0
|
|
2702
2702
|
* @alias sap.suite.ui.generic.template.lib.NavigationController
|
|
2703
2703
|
*/
|
|
@@ -125,17 +125,28 @@ sap.ui.define([
|
|
|
125
125
|
oSmartTable.rebindTable();
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
function fnApplyNavigationSortOrder(
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
128
|
+
function fnApplyNavigationSortOrder(aNavigationSortOrders) {
|
|
129
|
+
var oOwnerComponent = oController.getOwnerComponent();
|
|
130
|
+
var oMetaModel = oOwnerComponent.getModel().getMetaModel();
|
|
131
|
+
var aNonSortableProperties = [];
|
|
132
|
+
var oSortRestrictions = oMetaModel.getODataEntitySet(oOwnerComponent.getEntitySet())["Org.OData.Capabilities.V1.SortRestrictions"];
|
|
133
|
+
if (oSortRestrictions && oSortRestrictions.NonSortableProperties) {
|
|
134
|
+
aNonSortableProperties = oSortRestrictions.NonSortableProperties.map(function(oProperty) {
|
|
135
|
+
return oProperty.PropertyPath;
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
var aRelevantSortOrders = aNavigationSortOrders.filter(function(oProperty) {
|
|
139
|
+
return !aNonSortableProperties.includes(oProperty.Property);
|
|
140
|
+
});
|
|
141
|
+
var oUiState = oSmartTable.getUiState();
|
|
142
|
+
var oPresentationVariant = oUiState.getPresentationVariant();
|
|
143
|
+
if (!oPresentationVariant.SortOrder) {
|
|
144
|
+
oPresentationVariant.SortOrder = getTemplateSortOrder();
|
|
145
|
+
}
|
|
146
|
+
oPresentationVariant.SortOrder = oPresentationVariant.SortOrder.concat(aRelevantSortOrders);
|
|
147
|
+
oUiState.setPresentationVariant(oPresentationVariant);
|
|
148
|
+
oSmartTable.setUiState(oUiState);
|
|
149
|
+
}
|
|
139
150
|
|
|
140
151
|
function fnScrollToSelectedItemAsPerChildContext(sCurrentChildContext) {
|
|
141
152
|
var oInnerTable = oSmartTable.getTable();
|
|
@@ -37,7 +37,7 @@ sap.ui.define(['sap/ui/core/library','sap/fe/placeholder/library'
|
|
|
37
37
|
interfaces: [],
|
|
38
38
|
controls: [],
|
|
39
39
|
elements: [],
|
|
40
|
-
version: "1.96.
|
|
40
|
+
version: "1.96.12",
|
|
41
41
|
extensions: {
|
|
42
42
|
//Configuration used for rule loading of Support Assistant
|
|
43
43
|
"sap.ui.support": {
|
|
@@ -71,6 +71,7 @@ sap.ui.define(["sap/ui/core/library",
|
|
|
71
71
|
// copy selection options
|
|
72
72
|
aVariantOptions = oVariant.getSelectOptionsPropertyNames();
|
|
73
73
|
aVariantOptions.forEach(function (sProperty) {
|
|
74
|
+
oMergedVariant.removeParameter(sProperty);
|
|
74
75
|
oMergedVariant.removeSelectOption(sProperty);
|
|
75
76
|
oMergedVariant.massAddSelectOption(sProperty, oVariant.getSelectOption(sProperty));
|
|
76
77
|
});
|
|
@@ -78,6 +79,7 @@ sap.ui.define(["sap/ui/core/library",
|
|
|
78
79
|
aVariantParameters = oVariant.getParameterNames();
|
|
79
80
|
aVariantParameters.forEach(function (sParam) {
|
|
80
81
|
oMergedVariant.removeParameter(sParam);
|
|
82
|
+
oMergedVariant.removeSelectOption(sParam);
|
|
81
83
|
oMergedVariant.addParameter(sParam, oVariant.getParameter(sParam));
|
|
82
84
|
});
|
|
83
85
|
});
|