@sapui5/sap.suite.ui.generic.template 1.130.10 → 1.130.11
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/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/SmartVariantManagementWrapper.js +27 -27
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/MessageButtonHelper.js +1 -0
- 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
|
@@ -4,22 +4,22 @@ sap.ui.define([
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Constructor for SmartVariantManagementWrapper
|
|
7
|
-
* @param {sap.ui.comp.smartvariants.SmartVariantManagement} vTarget - The SmartVariantManagement control
|
|
7
|
+
* @param {sap.ui.comp.smartvariants.SmartVariantManagement} vTarget - The SmartVariantManagement control
|
|
8
8
|
* or the Id of control for which this wrapper is created
|
|
9
|
-
* @param {object} oController - the controller of the current component
|
|
9
|
+
* @param {object} oController - the controller of the current component
|
|
10
10
|
* @param {object} oFactory - the controlStateWrapperFactory
|
|
11
|
-
* @param {object} mParams
|
|
12
|
-
* @param {array} mParams.managedControlWrappers - array of controlStateWrappers for controls handled by the SVM
|
|
13
|
-
* (currently also including SFB wrapper - to be removed)
|
|
11
|
+
* @param {object} mParams
|
|
12
|
+
* @param {array} mParams.managedControlWrappers - array of controlStateWrappers for controls handled by the SVM
|
|
13
|
+
* (currently also including SFB wrapper - to be removed)
|
|
14
14
|
* @param {Object} mParams.dynamicPageWrapper - dynamicPageWrapper instance handled by SVM
|
|
15
15
|
* @returns {object}
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
function SmartVariantManagementWrapper(vTarget, oController, oFactory, mParams) {
|
|
19
19
|
// Special handling of SmartFilterBarWrapper for several reasons:
|
|
20
20
|
// - Suppress selection when restoring a variant. Selection is solely triggered according to information in appState. Otherwise, erroneous selection could be triggered in
|
|
21
21
|
// a few situations:
|
|
22
|
-
// - Variant marked as execute on select, but no data selected in appState (execute on select marked when saving variant without selecting, or changed after state was
|
|
22
|
+
// - Variant marked as execute on select, but no data selected in appState (execute on select marked when saving variant without selecting, or changed after state was
|
|
23
23
|
// stored)
|
|
24
24
|
// - Fallback to standard variant in case of dirty variant in state
|
|
25
25
|
// - Fallback to standard variant if variant cannot be read (logic of SVM)
|
|
@@ -42,11 +42,11 @@ sap.ui.define([
|
|
|
42
42
|
// - not available at this point in time, and no corresponding event to attach to available
|
|
43
43
|
// - provides only those controls with directly connection to SVM implemented (i.e. with wrappers marked with bVMConnection)
|
|
44
44
|
|
|
45
|
-
// ensure managed state wrappers do not trigger change event when applying state to them.
|
|
45
|
+
// ensure managed state wrappers do not trigger change event when applying state to them.
|
|
46
46
|
// Todo: rethink, whether this is the right place to do this (or rather when the wrappers get created)
|
|
47
47
|
mParams.managedControlWrappers = mParams.managedControlWrappers.map(oFactory.getSuppressChangeEventWhenApplyingWrapper);
|
|
48
48
|
|
|
49
|
-
// Any change of managed control should also mark variant as modified. However, this is not true for controls with direct connection to SVM (SFB, SmartTable, SmartChart).
|
|
49
|
+
// Any change of managed control should also mark variant as modified. However, this is not true for controls with direct connection to SVM (SFB, SmartTable, SmartChart).
|
|
50
50
|
// For these controls, a real user changes are already handled by the direct connection. On the other hand, these controls also fire their change events, if their state is
|
|
51
51
|
// changed from SVM (by the same connection) - setting variant dirty here would be wrong.
|
|
52
52
|
mParams.managedControlWrappers.forEach(function(oWrapper){
|
|
@@ -56,18 +56,18 @@ sap.ui.define([
|
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
|
|
60
|
+
|
|
61
61
|
|
|
62
62
|
function fnSetControl(oControl) {
|
|
63
63
|
oSmartVariantManagement = oControl;
|
|
64
64
|
fnResolveControlAssigned(oSmartVariantManagement);
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
|
|
67
67
|
var oSmartFilterBarWrapper = mParams.managedControlWrappers.find(function(oWrapper){
|
|
68
68
|
return oWrapper.setSVMWrapperCallbacks;
|
|
69
69
|
});
|
|
70
|
-
|
|
70
|
+
|
|
71
71
|
// provide callbacks needed for SFB wrapper to store/restore extnesion state with variant
|
|
72
72
|
if (oSmartFilterBarWrapper){
|
|
73
73
|
oSmartFilterBarWrapper.setSVMWrapperCallbacks({
|
|
@@ -105,28 +105,28 @@ sap.ui.define([
|
|
|
105
105
|
oControl.attachAfterVariantInitialise(function() {
|
|
106
106
|
//set currentVariantId only when sVariantId is not standard (as it might be overriding existing
|
|
107
107
|
//different currentVariantId) or smartTable's (oControl) currentVariantId is not equal to sVariantId.
|
|
108
|
-
if (sVariantId !== '*standard*') {
|
|
108
|
+
if (sVariantId !== '*standard*' && sVariantId !== '') {
|
|
109
109
|
if (oControl.getCurrentVariantId && oControl.getCurrentVariantId() !== sVariantId) {
|
|
110
110
|
oControl.setCurrentVariantId(sVariantId);
|
|
111
111
|
}
|
|
112
112
|
oSmartVariantManagement.setModified(false);
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
|
-
}
|
|
115
|
+
}
|
|
116
116
|
oSmartVariantManagement.setCurrentVariantId(sVariantId);
|
|
117
117
|
if (oSmartFilterBarWrapper){
|
|
118
118
|
oSmartFilterBarWrapper.suppressSelection(false);
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
// Restore state of all managed controls
|
|
122
|
+
// Restore state of all managed controls
|
|
123
123
|
function fnSetManagedControlStates(oState){
|
|
124
|
-
// Usually, looping through mParams.managedControlWrappers or through oState.managedControlStates should be equivalent, but in exceptional cases, their might be
|
|
125
|
-
// differences, if application has changed (changing the controls managed by the SVM - in LR, this could be achieved by changing setting SmartVariantManagement).
|
|
124
|
+
// Usually, looping through mParams.managedControlWrappers or through oState.managedControlStates should be equivalent, but in exceptional cases, their might be
|
|
125
|
+
// differences, if application has changed (changing the controls managed by the SVM - in LR, this could be achieved by changing setting SmartVariantManagement).
|
|
126
126
|
// mParams.managedControlWrappers reflects current state, while oState.managedControlStates reflects state at the time iAppState was written
|
|
127
127
|
// - when adding a control (in LR changing setting SmartVariantManagement from false to true), state for that control would not be contained - calling the wrapper with
|
|
128
128
|
// undefined to ensure initial state
|
|
129
|
-
// - when removing a control, state would be contained that should not be applied here
|
|
129
|
+
// - when removing a control, state would be contained that should not be applied here
|
|
130
130
|
mParams.managedControlWrappers.forEach(function(oWrapper){
|
|
131
131
|
oWrapper.setState(oState.managedControlStates[oWrapper.getLocalId()]);
|
|
132
132
|
});
|
|
@@ -164,8 +164,8 @@ sap.ui.define([
|
|
|
164
164
|
// set (which is achieved by empty string)
|
|
165
165
|
fnSetVariant("");
|
|
166
166
|
// Usually restoring the state of any of the managed controls should mark the variant as dirty, but there might be edge cases (state from an old release not containing information for any
|
|
167
|
-
// managed control now relevant), so to be on the safe side, we set modified=true explicitly.
|
|
168
|
-
oSmartVariantManagement.currentVariantSetModified(true);
|
|
167
|
+
// managed control now relevant), so to be on the safe side, we set modified=true explicitly.
|
|
168
|
+
oSmartVariantManagement.currentVariantSetModified(true);
|
|
169
169
|
fnSetManagedControlStates(oPreliminaryState);
|
|
170
170
|
} else {
|
|
171
171
|
fnSetVariant(oPreliminaryState.variantId);
|
|
@@ -177,7 +177,7 @@ sap.ui.define([
|
|
|
177
177
|
oSmartFilterBarWrapper.setState(oPreliminaryState.managedControlStates[oSmartFilterBarWrapper.getLocalId()]);
|
|
178
178
|
}
|
|
179
179
|
if (oPreliminaryState.variantId !== oSmartVariantManagement.getCurrentVariantId()){
|
|
180
|
-
// variant could not be set because it is not known, i.e. it could be private and URL was shared, or could be deleted after page was bookmarked. In this case,
|
|
180
|
+
// variant could not be set because it is not known, i.e. it could be private and URL was shared, or could be deleted after page was bookmarked. In this case,
|
|
181
181
|
// standard variant is set (by VM). Additionally, it should be marked as modified.
|
|
182
182
|
oSmartVariantManagement.currentVariantSetModified(true);
|
|
183
183
|
}
|
|
@@ -193,19 +193,19 @@ sap.ui.define([
|
|
|
193
193
|
oControlAssignedPromise.then(function() {
|
|
194
194
|
// state change when user selects a different variant
|
|
195
195
|
oSmartVariantManagement.attachSelect(fnHandler);
|
|
196
|
-
|
|
196
|
+
|
|
197
197
|
// when user saves current state as a new variant, this is also a state change (as the variant id is part of the state)
|
|
198
198
|
// note: Even if new (SFB) variant is marked as execute on select, and currently no data is selected, no need to select data here (and thus also not to collapse header).
|
|
199
|
-
// This is one of the possible ways to get into a state with a clean variant with execute on select, but no data loaded - see also comment to identify SFB wrapper.
|
|
199
|
+
// This is one of the possible ways to get into a state with a clean variant with execute on select, but no data loaded - see also comment to identify SFB wrapper.
|
|
200
200
|
oSmartVariantManagement.attachAfterSave(fnHandler);
|
|
201
|
-
|
|
201
|
+
|
|
202
202
|
// any change of a managed control is state change
|
|
203
203
|
mParams.managedControlWrappers.forEach(function(oWrapper){
|
|
204
204
|
oWrapper.attachStateChanged(fnHandler);
|
|
205
205
|
});
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
-
|
|
208
|
+
|
|
209
209
|
return {
|
|
210
210
|
getState : getState,
|
|
211
211
|
setState : setState,
|
|
@@ -215,4 +215,4 @@ sap.ui.define([
|
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
return SmartVariantManagementWrapper;
|
|
218
|
-
});
|
|
218
|
+
});
|
|
@@ -938,7 +938,7 @@ sap.ui.define([
|
|
|
938
938
|
* @public
|
|
939
939
|
* @extends sap.ui.core.UIComponent
|
|
940
940
|
* @author SAP SE
|
|
941
|
-
* @version 1.130.
|
|
941
|
+
* @version 1.130.11
|
|
942
942
|
* @name sap.suite.ui.generic.template.lib.AppComponent
|
|
943
943
|
*/
|
|
944
944
|
var oAppComponent = UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
|
|
@@ -103,6 +103,7 @@ sap.ui.define([
|
|
|
103
103
|
getSubtitle: getSubtitle,
|
|
104
104
|
titlePressed: function (oEvent) { // the user wants to navigate from the message to the corresponding control
|
|
105
105
|
MessageUtils.navigateFromMessageTitleEvent(oTemplateUtils, oEvent, oComponent, bIsDraftEnabled, sCurrentBindingPath);
|
|
106
|
+
oMessagePopover.close();
|
|
106
107
|
}
|
|
107
108
|
}).then(function (oMPopover) {
|
|
108
109
|
oMessagePopover = oMPopover;
|
|
@@ -3181,7 +3181,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
3181
3181
|
* @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
|
|
3182
3182
|
* @public
|
|
3183
3183
|
* @extends sap.ui.base.Object
|
|
3184
|
-
* @version 1.130.
|
|
3184
|
+
* @version 1.130.11
|
|
3185
3185
|
* @since 1.30.0
|
|
3186
3186
|
* @alias sap.suite.ui.generic.template.lib.NavigationController
|
|
3187
3187
|
*/
|