@sapui5/sap.suite.ui.generic.template 1.120.16 → 1.120.17
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/AnalyticalListPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +15 -8
- package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartTableChartCommon.js +26 -20
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/CRUDHelper.js +4 -4
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +1 -1
- package/src/sap/suite/ui/generic/template/library.js +1 -1
package/package.json
CHANGED
|
@@ -388,16 +388,23 @@ sap.ui.define([
|
|
|
388
388
|
var oBindingParams = oEvent.getParameter("bindingParams");
|
|
389
389
|
if (oBindingParams.filters && oBindingParams.filters.length) {
|
|
390
390
|
/*
|
|
391
|
-
*
|
|
392
|
-
*
|
|
393
|
-
*
|
|
394
|
-
*
|
|
395
|
-
*
|
|
396
|
-
*
|
|
397
|
-
*
|
|
391
|
+
*Handling of the filter condition during edit or display:
|
|
392
|
+
* Add a new filter condition to always show all items that are just created. In case we are in a draft,
|
|
393
|
+
* that just means to add "or HasActiveEntity = false". For active documents however, that condition
|
|
394
|
+
* would always be true. Thus, we have to add
|
|
395
|
+
* "or (HasActiveEntity = false and IsActiveEntity = false)".
|
|
396
|
+
* However, this condition is not evaluated correctly by gateway, so we have to transform it to
|
|
397
|
+
* (IsActiveEntity = true and x) or (Is ActiveEntity = false and (x or HasActiveEntity = false)),
|
|
398
|
+
* where x is the condition provided by the user
|
|
399
|
+
|
|
400
|
+
* Handling of the filter condition during create:
|
|
401
|
+
* checking the value of dispaly Mode , iDisplayMode = 4 for create
|
|
402
|
+
* if it is a create the filter condition evaluates to the user filter x
|
|
398
403
|
*/
|
|
399
404
|
var oUserFilter = FilterProcessor.groupFilters(oBindingParams.filters);
|
|
400
|
-
|
|
405
|
+
var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
|
|
406
|
+
var iDisplayMode = oTemplatePrivateModel.getProperty("/objectPage/displayMode");
|
|
407
|
+
if (!oEvent.getParameter("messageFilterActive") && !(iDisplayMode === 4) ){
|
|
401
408
|
oBindingParams.filters = new Filter({
|
|
402
409
|
filters: [
|
|
403
410
|
new Filter({
|
|
@@ -5,13 +5,13 @@ sap.ui.define([
|
|
|
5
5
|
/**
|
|
6
6
|
* Constructor for SmartTableChartCommon
|
|
7
7
|
* ...
|
|
8
|
-
* @param {object} mParams
|
|
8
|
+
* @param {object} mParams
|
|
9
9
|
* @param mParams.oCustomFiltersWrapper - wrapper for custom filters (from SFB point of view)
|
|
10
|
-
* (currently containing: generic (currently only editState), app extension, and adaptation extension - but this is knowledge of LR, i.e. of iAppStateHandler, not of SFB)
|
|
11
|
-
* @returns
|
|
10
|
+
* (currently containing: generic (currently only editState), app extension, and adaptation extension - but this is knowledge of LR, i.e. of iAppStateHandler, not of SFB)
|
|
11
|
+
* @returns {object}
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
// deals with state of SFB itself, without SVM (see SmartVariantManagementWrapper) and go-button
|
|
14
|
+
// deals with state of SFB itself, without SVM (see SmartVariantManagementWrapper) and go-button
|
|
15
15
|
// (does not contain a state from SFB point of view - however, we remember whether it was pressed once
|
|
16
16
|
// to restore data - this information is not considered being part of SFB)
|
|
17
17
|
function SmartTableChartCommon(vTarget, oController, oFactory, sInitializationEvent) {
|
|
@@ -44,7 +44,7 @@ sap.ui.define([
|
|
|
44
44
|
function fnSetState(oState) {
|
|
45
45
|
if (oState) {
|
|
46
46
|
if (!oState.oUiState) {
|
|
47
|
-
// Legacy handling for state without additional level oUiState (created with 1.99.0 - 1.99.3). Could be relevant on LR and OP, and independent of VM
|
|
47
|
+
// Legacy handling for state without additional level oUiState (created with 1.99.0 - 1.99.3). Could be relevant on LR and OP, and independent of VM
|
|
48
48
|
oState = {
|
|
49
49
|
oUiState: oState
|
|
50
50
|
};
|
|
@@ -90,32 +90,38 @@ sap.ui.define([
|
|
|
90
90
|
function fnGetState() {
|
|
91
91
|
if (bSmartControlInitialized) {
|
|
92
92
|
if (oVariantManagementStateWrapper) {
|
|
93
|
-
// oVariantManagementStateWrapper would be undefined only in cases SmartControl is not yet initialized
|
|
94
|
-
// or VariantManagement is not enabled.
|
|
93
|
+
// oVariantManagementStateWrapper would be undefined only in cases SmartControl is not yet initialized
|
|
94
|
+
// or VariantManagement is not enabled.
|
|
95
95
|
return oVariantManagementStateWrapper.getState();
|
|
96
96
|
}
|
|
97
|
-
|
|
97
|
+
|
|
98
98
|
if (oSmartControlStateWrapper && !bVariantManagementActive) {
|
|
99
|
-
// VariantManagement is not turned on & SmartControlStateWrapper instance
|
|
99
|
+
// VariantManagement is not turned on & SmartControlStateWrapper instance
|
|
100
100
|
return oSmartControlStateWrapper.getState();
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
|
|
104
|
-
// Control is not available and StateWrapper is not initialized
|
|
103
|
+
|
|
104
|
+
// Control is not available and StateWrapper is not initialized
|
|
105
105
|
return oPreliminaryState;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
function fnSetState(oState) {
|
|
109
109
|
oPreliminaryState = oState;
|
|
110
110
|
oControlAssignedPromise.then(function () {
|
|
111
|
-
// map legacy states - before separating VM state from state of managed control, inner state information
|
|
112
|
-
// (presentation variant and selection variant) were put as oUiState on the same level as VM state
|
|
111
|
+
// map legacy states - before separating VM state from state of managed control, inner state information
|
|
112
|
+
// (presentation variant and selection variant) were put as oUiState on the same level as VM state
|
|
113
113
|
// information (variant id and dirty indicator), now they are contained in map managedControlStates
|
|
114
|
-
if (oState
|
|
115
|
-
oState.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
114
|
+
if (oState){
|
|
115
|
+
if (oState.oUiState && !oState.managedControlStates) {
|
|
116
|
+
oState.managedControlStates = Object.create(null);
|
|
117
|
+
oState.managedControlStates[oSmartControlStateWrapper.getLocalId()] = {oUiState: oState.oUiState};
|
|
118
|
+
}
|
|
119
|
+
if (oState.bVariantModified !== undefined) {
|
|
120
|
+
oState.modified = oState.bVariantModified;
|
|
121
|
+
}
|
|
122
|
+
if (oState.sVariantId !== undefined) {
|
|
123
|
+
oState.variantId = oState.sVariantId;
|
|
124
|
+
}
|
|
119
125
|
}
|
|
120
126
|
|
|
121
127
|
if (bVariantManagementActive) {
|
|
@@ -124,7 +130,7 @@ sap.ui.define([
|
|
|
124
130
|
return;
|
|
125
131
|
}
|
|
126
132
|
|
|
127
|
-
// SmartTable/Chart shall be used
|
|
133
|
+
// SmartTable/Chart shall be used
|
|
128
134
|
oSmartControlStateWrapper.setState(oPreliminaryState);
|
|
129
135
|
});
|
|
130
136
|
}
|
|
@@ -155,7 +161,7 @@ sap.ui.define([
|
|
|
155
161
|
// in each case) -thus, we better create and return a vm wrapper here, passing the inner wrapper (the same, we would create in the other cases).
|
|
156
162
|
// Additionally, this simplifies the adaptation to the change of format (formerly, variant data and control data were mixed on same level)
|
|
157
163
|
|
|
158
|
-
// to identify the situation, check properties smartVariant and useVariantManagement. (In LR/ALP, we could directly check component settings controlling these properties, but not
|
|
164
|
+
// to identify the situation, check properties smartVariant and useVariantManagement. (In LR/ALP, we could directly check component settings controlling these properties, but not
|
|
159
165
|
// in OP, as they could be different per section. Checking control's properties would also incorporate UI changes, however, these properties are anyway not allowed to be changed.)
|
|
160
166
|
// values: smartVariant useVariantManagement
|
|
161
167
|
// a) null false on LR currently: truthy (id of VM) and true - but PageVM is not created, and thus being ignored => adapt how properties are set in xml
|
|
@@ -922,7 +922,7 @@ sap.ui.define([
|
|
|
922
922
|
* @extends sap.ui.core.UIComponent
|
|
923
923
|
* @abstract
|
|
924
924
|
* @author SAP SE
|
|
925
|
-
* @version 1.120.
|
|
925
|
+
* @version 1.120.17
|
|
926
926
|
* @name sap.suite.ui.generic.template.lib.AppComponent
|
|
927
927
|
*/
|
|
928
928
|
return UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
|
|
@@ -526,12 +526,12 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
|
|
|
526
526
|
var bHasStateError = aCurrentStateMessages.some(function(oMessage) {
|
|
527
527
|
return oMessage.type === "Error";
|
|
528
528
|
});
|
|
529
|
-
var
|
|
529
|
+
var bHasStateWarning = aCurrentStateMessages.some(function(oMessage) {
|
|
530
|
+
return oMessage.type === "Warning";
|
|
531
|
+
});
|
|
532
|
+
var bIsWarning = bIs412 && !bHasStateError && (!!aTransientWarnings.length || bHasStateWarning);
|
|
530
533
|
if (bIsWarning) {
|
|
531
534
|
// Only show transient warnings in the confirmation popup if no state warning is available (note that backend sometimes sends warnings redundantly as transient and state message)
|
|
532
|
-
var bHasStateWarning = aCurrentStateMessages.some(function(oMessage) {
|
|
533
|
-
return oMessage.type === "Warning";
|
|
534
|
-
});
|
|
535
535
|
var aMessagesForUserDecision = bHasStateWarning ? aCurrentStateMessages : aTransientWarnings;
|
|
536
536
|
var oCustomMessageProvider = aCurrentStateMessages.length === 0 && { // if confirmation popup is to show transient messages these messages should be excluded from the
|
|
537
537
|
isCustomMessage: function (oMessage) { // normal handling of transient messages (until the confirmation popup is closed)
|
|
@@ -3051,7 +3051,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
3051
3051
|
* @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
|
|
3052
3052
|
* @public
|
|
3053
3053
|
* @extends sap.ui.base.Object
|
|
3054
|
-
* @version 1.120.
|
|
3054
|
+
* @version 1.120.17
|
|
3055
3055
|
* @since 1.30.0
|
|
3056
3056
|
* @alias sap.suite.ui.generic.template.lib.NavigationController
|
|
3057
3057
|
*/
|