@sapui5/sap.suite.ui.generic.template 1.125.0 → 1.126.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/package.json +1 -1
- package/src/sap/suite/ui/generic/template/.library +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/visualfilterbar/FilterItem.js +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/visualfilterbar/FilterItemMicroChart.js +1 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/ControllerImplementation.js +13 -14
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/DropDownController.js +4 -4
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/FilterBarController.js +2 -5
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/VisualFilterDialogController.js +0 -9
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/extensionAPI/ExtensionAPI.js +10 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/AnalyticalListPage.view.xml +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/fragments/ContentViewButtons.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/fragments/SmartFilterBar.fragment.xml +1 -3
- package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/controller/ControllerImplementation.js +57 -4
- package/src/sap/suite/ui/generic/template/ListReport/controller/IappStateHandler.js +10 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n.properties +3 -0
- package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/view/fragments/SmartFilterBar.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/view/fragments/SmartTable.fragment.xml +9 -13
- package/src/sap/suite/ui/generic/template/ObjectPage/Component.js +2 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +3 -2
- package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/templateSpecificPreparationHelper.js +38 -12
- package/src/sap/suite/ui/generic/template/ObjectPage/view/Details.view.xml +2 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/HeaderContainer.fragment.xml +11 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/SmartTable.fragment.xml +8 -14
- package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/QuickCreate/view/QuickCreate.controller.js +4 -3
- package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/designtime/AnalyticalListPage.designtime.js +2 -2
- package/src/sap/suite/ui/generic/template/designtime/ListReport.designtime.js +2 -2
- package/src/sap/suite/ui/generic/template/designtime/ObjectPage.designtime.js +2 -5
- package/src/sap/suite/ui/generic/template/fragments/ContactDetails.fragment.xml +15 -14
- package/src/sap/suite/ui/generic/template/fragments/GridTableCells.fragment.xml +11 -0
- package/src/sap/suite/ui/generic/template/fragments/HeaderDataPointContent.fragment.xml +11 -0
- package/src/sap/suite/ui/generic/template/fragments/HeaderFormDataField.fragment.xml +12 -0
- package/src/sap/suite/ui/generic/template/fragments/QuickViewSmartForm.fragment.xml +2 -0
- package/src/sap/suite/ui/generic/template/fragments/SmartFormDataField.fragment.xml +21 -0
- package/src/sap/suite/ui/generic/template/fragments/TableCell.fragment.xml +11 -0
- package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartFilterBarWrapper.js +52 -1
- package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartTableChartCommon.js +6 -4
- package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartVariantManagementWrapper.js +3 -3
- package/src/sap/suite/ui/generic/template/js/AnnotationHelper.js +3 -2
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/Application.js +2 -4
- package/src/sap/suite/ui/generic/template/lib/CRUDHelper.js +7 -4
- package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +0 -7
- package/src/sap/suite/ui/generic/template/lib/CreateWithDialogHandler.js +23 -10
- package/src/sap/suite/ui/generic/template/lib/MessageButtonHelper.js +7 -5
- package/src/sap/suite/ui/generic/template/lib/MessageStripHelper.js +6 -6
- package/src/sap/suite/ui/generic/template/lib/ShareUtils.js +2 -12
- package/src/sap/suite/ui/generic/template/lib/insights/InsightsHandler.js +21 -21
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartChartHandler.js +15 -1
- package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartListHandler.js +6 -1
- package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartTableHandler.js +7 -2
- package/src/sap/suite/ui/generic/template/library.js +1 -1
- package/src/sap/suite/ui/generic/template/listTemplates/controller/DetailController.js +1 -1
- package/src/sap/suite/ui/generic/template/listTemplates/controller/IappStateHandler.js +32 -29
- package/src/sap/suite/ui/generic/template/listTemplates/controller/SmartChartController.js +1 -1
- package/src/sap/suite/ui/generic/template/listTemplates/filterSettingsPreparationHelper.js +3 -1
- package/src/sap/suite/ui/generic/template/listTemplates/fragments/DetailSmartTable.fragment.xml +5 -15
- package/src/sap/suite/ui/generic/template/listTemplates/fragments/SmartTableToolbar.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/themes/base/ObjectPage.less +1 -1
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/ObjectPage.less +1 -1
|
@@ -11,7 +11,7 @@ sap.ui.define([
|
|
|
11
11
|
|
|
12
12
|
// This helper class handles creation using dialog in the List Report
|
|
13
13
|
// In case the create with dialog is enabled in List Report it instantiates an instance of
|
|
14
|
-
// sap.suite.ui.generic.template.
|
|
14
|
+
// sap.suite.ui.generic.template.ListReport.controller.CreateWithDialogHandler which implements the main part of the logic
|
|
15
15
|
// This class only contains the glue code which is used to adapt the services provided by generic class to the requirements of the List Report
|
|
16
16
|
|
|
17
17
|
// oState is used as a channel to transfer data to the controller and back
|
|
@@ -22,15 +22,30 @@ sap.ui.define([
|
|
|
22
22
|
var oDialog, oTable;
|
|
23
23
|
|
|
24
24
|
function fnGetFilterForCurrentState(bIncludePersistenceFilter) {
|
|
25
|
+
var sDialogBindingPath = oDialog.getBindingContext().getPath();
|
|
26
|
+
var sEntitySet = "/" + oController.getOwnerComponent().getEntitySet();
|
|
27
|
+
var aFiltersOnTargetPath = [
|
|
28
|
+
new Filter({
|
|
29
|
+
path: "aFullTargets",
|
|
30
|
+
test: function (aFullTargets) {
|
|
31
|
+
return aFullTargets.some(function(sFullTarget){
|
|
32
|
+
return sFullTarget.startsWith(sDialogBindingPath);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}),
|
|
36
|
+
new Filter({
|
|
37
|
+
path: "aTargets",
|
|
38
|
+
test: function (aTargets) {
|
|
39
|
+
return aTargets.includes(sEntitySet);
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
];
|
|
25
43
|
if (bIncludePersistenceFilter) {
|
|
26
44
|
return new Filter({
|
|
27
45
|
filters : [
|
|
28
46
|
new Filter("persistent", "EQ", false),
|
|
29
47
|
new Filter({
|
|
30
|
-
filters :
|
|
31
|
-
new Filter("fullTarget", "StartsWith", oDialog.getBindingContext().getPath()),
|
|
32
|
-
new Filter("target", "EQ", "/" + oController.getOwnerComponent().getEntitySet())
|
|
33
|
-
],
|
|
48
|
+
filters : aFiltersOnTargetPath,
|
|
34
49
|
and : false
|
|
35
50
|
})
|
|
36
51
|
],
|
|
@@ -38,10 +53,7 @@ sap.ui.define([
|
|
|
38
53
|
});
|
|
39
54
|
} else {
|
|
40
55
|
return new Filter({
|
|
41
|
-
filters :
|
|
42
|
-
new Filter("fullTarget", "StartsWith", oDialog.getBindingContext().getPath()),
|
|
43
|
-
new Filter("target", "EQ", "/" + oController.getOwnerComponent().getEntitySet())
|
|
44
|
-
],
|
|
56
|
+
filters : aFiltersOnTargetPath,
|
|
45
57
|
and : false
|
|
46
58
|
});
|
|
47
59
|
}
|
|
@@ -70,7 +82,8 @@ sap.ui.define([
|
|
|
70
82
|
oTemplateUtils.oServices.oCRUDManager.discardDraft(oDialog.getBindingContext());
|
|
71
83
|
} else {
|
|
72
84
|
fnRemoveOldMessageFromModel(oDialog);
|
|
73
|
-
|
|
85
|
+
var sContextPath = oDialog.getBindingContext().getPath();
|
|
86
|
+
oController.getView().getModel().resetChanges([sContextPath], undefined, true);
|
|
74
87
|
}
|
|
75
88
|
oDialog.setBindingContext(null);
|
|
76
89
|
}
|
|
@@ -276,17 +276,19 @@ sap.ui.define([
|
|
|
276
276
|
// Show messages for current context including all "property children"
|
|
277
277
|
aCurrentFilters = bIsODataBased ? [
|
|
278
278
|
new Filter(bIsNonDraftCreate ? { // in non-draft create mode the binding path does not contain the full path
|
|
279
|
-
path: "
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
path: "aTargets",
|
|
280
|
+
test: function(aTargets){
|
|
281
|
+
return aTargets.some(function(sTarget){
|
|
282
|
+
return sTarget.startsWith(sCurrentBindingPath);
|
|
283
|
+
});
|
|
284
|
+
}
|
|
282
285
|
} : {
|
|
283
286
|
path: "aFullTargets", // there may be more than one full target identified for this message. If any of those fits we consider the message as fitting.
|
|
284
287
|
test: function(aFullTargets){
|
|
285
288
|
return aFullTargets.some(function(sFullTarget){
|
|
286
289
|
return sFullTarget.startsWith(sCurrentBindingPath);
|
|
287
290
|
});
|
|
288
|
-
}
|
|
289
|
-
caseSensitive: true
|
|
291
|
+
}
|
|
290
292
|
})
|
|
291
293
|
] : [];
|
|
292
294
|
addExternalFiltersToCurrentFilter(); //Check/add external filters
|
|
@@ -14,7 +14,7 @@ sap.ui.define([
|
|
|
14
14
|
var oMessageManager = sap.ui.getCore().getMessageManager();
|
|
15
15
|
|
|
16
16
|
// This class is implementing a facility of a message strip attached to a smart control or a accumulation of smart controls.
|
|
17
|
-
// More precisely, the class can be used in the following three different
|
|
17
|
+
// More precisely, the class can be used in the following three different scenarios
|
|
18
18
|
// - There is exactly one smart control for which the corresponding message strip should be displayed
|
|
19
19
|
// - There is exactly one smart control for which the corresponding message strip should be displayed, but the user may switch
|
|
20
20
|
// between different views on this control. For each view a different message (resp. no message) may be shown in the message strip
|
|
@@ -28,11 +28,11 @@ sap.ui.define([
|
|
|
28
28
|
// not support the getDataStateIndicator() method or for which this method does not return a corresponding instance.
|
|
29
29
|
//
|
|
30
30
|
// The scenarios are unified in a way that a map mTabToGetPresentationControlHandler is passed to the constructor of this class.
|
|
31
|
-
// The keys of this map are called "tabs" and represent the
|
|
31
|
+
// The keys of this map are called "tabs" and represent the different views (second scenario) resp. the different smart controls (third scenario).
|
|
32
32
|
// The corresponding value is a function that returns the corresponding smart control (identical for all in scenario 2).
|
|
33
33
|
// Note that this map is transferred to a more general map mApplicationCustomMessageInfo which has the same keys but holds an object
|
|
34
34
|
// as a value. This object has a method getPresentationControlHandler which is exactly the function named above.
|
|
35
|
-
// In
|
|
35
|
+
// In addition to this immutable member the object will have two properties which change during runtime:
|
|
36
36
|
// - bindingPath: the binding path which is currently valid for the corresponding smart control
|
|
37
37
|
// - message: An instance of sap.ui.core.message.Message implementing the content of the message strip.
|
|
38
38
|
// This property is faulty if no message should be displayed for the corresponding key.
|
|
@@ -70,8 +70,8 @@ sap.ui.define([
|
|
|
70
70
|
var oPresentationControlHandler = oApplicationCustomMessageInfo && oApplicationCustomMessageInfo.getPresentationControlHandler();
|
|
71
71
|
var oDataStateIndicator = oPresentationControlHandler && oPresentationControlHandler.getDataStateIndicator && oPresentationControlHandler.getDataStateIndicator();
|
|
72
72
|
if (oDataStateIndicator) { //Only add message if there is Data state indicator to display it
|
|
73
|
-
oApplicationCustomMessageInfo.message.
|
|
74
|
-
oApplicationCustomMessageInfo.message.
|
|
73
|
+
oApplicationCustomMessageInfo.message.setTargets([oApplicationCustomMessageInfo.bindingPath]);
|
|
74
|
+
oApplicationCustomMessageInfo.message.aFullTargets = [oApplicationCustomMessageInfo.bindingPath];
|
|
75
75
|
oMessageManager.addMessages(oApplicationCustomMessageInfo.message);
|
|
76
76
|
oApplicationCustomMessageInfo.isAddedToMessageManager = true;
|
|
77
77
|
}
|
|
@@ -120,7 +120,7 @@ sap.ui.define([
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
// Private
|
|
123
|
+
// Private methods that triggers a new calculation of the content of the message strip
|
|
124
124
|
function fnRefresh(){
|
|
125
125
|
var oApplicationCustomMessageInfo = mApplicationCustomMessageInfo[sCurrentTab];
|
|
126
126
|
var oPresentationControlHandler = oApplicationCustomMessageInfo && oApplicationCustomMessageInfo.getPresentationControlHandler();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
sap.ui.define(["sap/base/util/ObjectPath", "sap/ushell/ui/footerbar/AddBookmarkButton",
|
|
2
2
|
"sap/suite/ui/commons/collaboration/ServiceContainer", "sap/ui/core/CustomData", 'sap/ui/performance/trace/FESRHelper', "sap/ui/core/Component",
|
|
3
|
-
"sap/suite/ui/generic/template/lib/AdaptiveCardHelper", "sap/m/MenuItem", "sap/ui/core/Lib"
|
|
4
|
-
], function (ObjectPath, AddBookmarkButton, ServiceContainer, CustomData, FESRHelper, Component, AdaptiveCardHelper, MenuItem, Library
|
|
3
|
+
"sap/suite/ui/generic/template/lib/AdaptiveCardHelper", "sap/m/MenuItem", "sap/ui/core/Lib"
|
|
4
|
+
], function (ObjectPath, AddBookmarkButton, ServiceContainer, CustomData, FESRHelper, Component, AdaptiveCardHelper, MenuItem, Library) {
|
|
5
5
|
"use strict";
|
|
6
6
|
|
|
7
7
|
var ShareUtils = {};
|
|
@@ -85,22 +85,12 @@ sap.ui.define(["sap/base/util/ObjectPath", "sap/ushell/ui/footerbar/AddBookmarkB
|
|
|
85
85
|
|
|
86
86
|
oCommonUtils.getDialogFragmentAsync("sap.suite.ui.generic.template.fragments.ShareSheet", oFragmentController, "share", ShareUtils.setStaticShareData, true).then(function (oFragment) {
|
|
87
87
|
oShareActionSheet = oFragment;
|
|
88
|
-
var oUshellContainer = sap.ui.require("sap/ushell/Container");
|
|
89
88
|
var oShareModel = oShareActionSheet.getModel("share");
|
|
90
|
-
var that = this;
|
|
91
89
|
oFragmentController.getModelData().then(function (oFragmentModelData) {
|
|
92
90
|
oShareModel.setData(oFragmentModelData, true);
|
|
93
|
-
if (oUshellContainer && oUshellContainer.inAppRuntime()) {
|
|
94
|
-
CollaborationMessageConsumer.getProviderConfiguration().then(function(oProviderConfiguration){
|
|
95
|
-
ServiceContainer.getServiceAsyncForAppRuntime(oProviderConfiguration).then(function (oTeamsHelper) {
|
|
96
|
-
that.addMenuItem(oShareModel, oTeamsHelper, oShareActionSheet, oControlToOpenBy);
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
} else {
|
|
100
91
|
ServiceContainer.getServiceAsync().then(function (oTeamsHelper) {
|
|
101
92
|
this.addMenuItem(oShareModel, oTeamsHelper, oShareActionSheet, oControlToOpenBy);
|
|
102
93
|
}.bind(this));
|
|
103
|
-
}
|
|
104
94
|
}.bind(this));
|
|
105
95
|
}.bind(this));
|
|
106
96
|
};
|
|
@@ -4,8 +4,9 @@ sap.ui.define([
|
|
|
4
4
|
"sap/m/MessageBox",
|
|
5
5
|
"sap/suite/ui/generic/template/lib/insights/InsightsCardHelper",
|
|
6
6
|
"sap/suite/ui/generic/template/lib/cards/DTCardHelper",
|
|
7
|
-
"sap/base/util/merge"
|
|
8
|
-
|
|
7
|
+
"sap/base/util/merge",
|
|
8
|
+
"sap/base/util/deepClone"
|
|
9
|
+
], function(BaseObject, extend, MessageBox, InsightsCardHelper, DTCardHelper, merge, deepClone) {
|
|
9
10
|
'use strict';
|
|
10
11
|
function getMethods(oState, oController, oTemplateUtils) {
|
|
11
12
|
|
|
@@ -58,37 +59,36 @@ sap.ui.define([
|
|
|
58
59
|
};
|
|
59
60
|
|
|
60
61
|
// updating the same card to the global model so that the additional details can be used when card detail is requested from a card consumer.
|
|
61
|
-
var oShareCardInfo =
|
|
62
|
+
var oShareCardInfo = deepClone(oCardInfo);
|
|
62
63
|
|
|
63
64
|
var fnGetCardInfoPromise = new Promise(function (fnResolve) {
|
|
64
65
|
if (sType === InsightsCardHelper.CardTypes.DT_CARD) {
|
|
65
66
|
oState.oDTCardHelper.getCardManifest(DTCardHelper.CardTypes.INTEGRATION)
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
fnResolve(null);
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
oCardInfo.descriptorContent = merge(
|
|
72
|
-
oCardManifest,
|
|
73
|
-
oCardInfo.descriptorContent
|
|
74
|
-
);
|
|
75
|
-
fnResolve(oCardInfo);
|
|
76
|
-
})
|
|
77
|
-
.catch(function (oError) {
|
|
67
|
+
.then(function (oCardManifest) {
|
|
68
|
+
if (!oCardManifest) {
|
|
78
69
|
fnResolve(null);
|
|
79
|
-
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
oShareCardInfo.descriptorContent = merge(
|
|
73
|
+
oShareCardInfo.descriptorContent,
|
|
74
|
+
oCardManifest
|
|
75
|
+
);
|
|
76
|
+
fnResolve(oShareCardInfo);
|
|
77
|
+
})
|
|
78
|
+
.catch(function (oError) {
|
|
79
|
+
fnResolve(null);
|
|
80
|
+
});
|
|
80
81
|
} else {
|
|
81
|
-
fnResolve(
|
|
82
|
+
fnResolve(oShareCardInfo);
|
|
82
83
|
}
|
|
83
84
|
});
|
|
84
|
-
return fnGetCardInfoPromise.then(function (
|
|
85
|
-
if (
|
|
86
|
-
extend(oShareCardInfo, oCardInfo);
|
|
85
|
+
return fnGetCardInfoPromise.then(function (oShareCardInfo) {
|
|
86
|
+
if (oShareCardInfo) {
|
|
87
87
|
oShareCardInfo.cardType = sType;
|
|
88
88
|
oShareCardInfo.viewId = sViewId;
|
|
89
89
|
oTemplatePrivateGlobalModel.setProperty("/generic/insights/shareCards/" + iViewLevel, [oShareCardInfo]);
|
|
90
90
|
}
|
|
91
|
-
return
|
|
91
|
+
return oShareCardInfo ? [oCardInfo] : [];
|
|
92
92
|
});
|
|
93
93
|
|
|
94
94
|
}
|
|
@@ -3055,7 +3055,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
3055
3055
|
* @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
|
|
3056
3056
|
* @public
|
|
3057
3057
|
* @extends sap.ui.base.Object
|
|
3058
|
-
* @version 1.
|
|
3058
|
+
* @version 1.126.0
|
|
3059
3059
|
* @since 1.30.0
|
|
3060
3060
|
* @alias sap.suite.ui.generic.template.lib.NavigationController
|
|
3061
3061
|
*/
|
|
@@ -12,9 +12,22 @@ sap.ui.define([
|
|
|
12
12
|
*/
|
|
13
13
|
oSmartChart.isInitialised() ? fnInitInnerChart() : oSmartChart.attachInitialized(fnInitInnerChart);
|
|
14
14
|
|
|
15
|
+
var fnResolveInit = null;
|
|
16
|
+
var oInitPromise = new Promise(function (fnResolve) {
|
|
17
|
+
fnResolveInit = fnResolve;
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
function fnGetInitializationPromise() {
|
|
21
|
+
return oInitPromise;
|
|
22
|
+
}
|
|
23
|
+
|
|
15
24
|
function fnInitInnerChart() {
|
|
16
25
|
oSmartChart.getChartAsync().then(function(oChart){
|
|
17
26
|
oInnerChart = oChart;
|
|
27
|
+
// Resolve the init promise
|
|
28
|
+
if (fnResolveInit) {
|
|
29
|
+
fnResolveInit();
|
|
30
|
+
}
|
|
18
31
|
});
|
|
19
32
|
}
|
|
20
33
|
|
|
@@ -152,7 +165,8 @@ sap.ui.define([
|
|
|
152
165
|
applyNavigationSortOrder: fnApplyNavigationSortOrder,
|
|
153
166
|
getToolbar: getToolbar,
|
|
154
167
|
scrollToSelectedItemAsPerChildContext: Function.prototype,
|
|
155
|
-
getPressedItemParameter: Function.prototype
|
|
168
|
+
getPressedItemParameter: Function.prototype,
|
|
169
|
+
getInitializationPromise: fnGetInitializationPromise
|
|
156
170
|
};
|
|
157
171
|
}
|
|
158
172
|
|
|
@@ -34,6 +34,10 @@ sap.ui.define([
|
|
|
34
34
|
return oSmartList.getToolbar();
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
function fnGetInitializationPromise() {
|
|
38
|
+
return Promise.resolve();
|
|
39
|
+
}
|
|
40
|
+
|
|
37
41
|
// public instance methods
|
|
38
42
|
return {
|
|
39
43
|
getBinding: fnGetBinding,
|
|
@@ -54,7 +58,8 @@ sap.ui.define([
|
|
|
54
58
|
getToolbar: getToolbar,
|
|
55
59
|
applyNavigationSortOrder: Function.prototype, // no way to set the sort order in the smart list
|
|
56
60
|
scrollToSelectedItemAsPerChildContext: Function.prototype,
|
|
57
|
-
getPressedItemParameter: Function.prototype
|
|
61
|
+
getPressedItemParameter: Function.prototype,
|
|
62
|
+
getInitializationPromise: fnGetInitializationPromise
|
|
58
63
|
};
|
|
59
64
|
}
|
|
60
65
|
|
|
@@ -231,7 +231,7 @@ sap.ui.define([
|
|
|
231
231
|
//Accepts row context in Grid Table and returns the Grid table row
|
|
232
232
|
function getGridTableRow(oContext) {
|
|
233
233
|
var iFirstVisibleRowIndex = oInnerTable.getFirstVisibleRow();
|
|
234
|
-
var iVisibleRowCount = oInnerTable.
|
|
234
|
+
var iVisibleRowCount = oInnerTable.getVisibleRowCount();
|
|
235
235
|
var sRowPath = oContext.getPath();
|
|
236
236
|
for (var i = 0; i < iVisibleRowCount; i++) {
|
|
237
237
|
if (oInnerTable.getContextByIndex(iFirstVisibleRowIndex + i).getPath() === sRowPath) {
|
|
@@ -549,6 +549,10 @@ sap.ui.define([
|
|
|
549
549
|
return null;
|
|
550
550
|
}
|
|
551
551
|
|
|
552
|
+
function fnGetInitializationPromise() {
|
|
553
|
+
return Promise.resolve();
|
|
554
|
+
}
|
|
555
|
+
|
|
552
556
|
// public instance methods
|
|
553
557
|
return {
|
|
554
558
|
getBinding: fnGetBinding,
|
|
@@ -588,7 +592,8 @@ sap.ui.define([
|
|
|
588
592
|
addCellSelector: fnAddCellSelector,
|
|
589
593
|
getSelection: getSelection,
|
|
590
594
|
getPotentiallyReadOnlyField: getPotentiallyReadOnlyField,
|
|
591
|
-
getColumnByKey: fnGetColumnByKey
|
|
595
|
+
getColumnByKey: fnGetColumnByKey,
|
|
596
|
+
getInitializationPromise: fnGetInitializationPromise
|
|
592
597
|
};
|
|
593
598
|
}
|
|
594
599
|
|
|
@@ -827,7 +827,7 @@ sap.ui.define([
|
|
|
827
827
|
*/
|
|
828
828
|
_getSelParamsFromChart: function(chart) {
|
|
829
829
|
var dpList = [];
|
|
830
|
-
dpList =
|
|
830
|
+
dpList = this.oState.oTemplateUtils.oCommonUtils.getSelectionPoints(chart).dataPoints;
|
|
831
831
|
return this._getSelParamsFromDPList(dpList);
|
|
832
832
|
},
|
|
833
833
|
/**
|
|
@@ -30,7 +30,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
30
30
|
bIsSearchTriggeredByStartUp = false,
|
|
31
31
|
_fnStartUpPromise = null,
|
|
32
32
|
_oStartUpSelectionVariant;
|
|
33
|
-
var
|
|
33
|
+
var sStoredAppStateKey = null;
|
|
34
34
|
var oSettings = oTemplateUtils.oComponentUtils.getSettings();
|
|
35
35
|
var sAppStateKeyInUrl = null;
|
|
36
36
|
var oRealizedAppState = { // this object contains information which can be derived from url
|
|
@@ -247,6 +247,8 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
247
247
|
sNavType = sap.fe.navigation.NavType.iAppState;
|
|
248
248
|
}
|
|
249
249
|
oState.oSmartFilterbar.setSuppressSelection(false);
|
|
250
|
+
//Pref Improvement - Resume SetFilterData
|
|
251
|
+
oState.oSmartFilterbar.resumeSetFilterData();
|
|
250
252
|
var sAppStateKey = oAppData.appStateKey || "";
|
|
251
253
|
//Make sure that no two resolve functions are executing at the same time.
|
|
252
254
|
if (bIsTransferringUrlStateToPageState){
|
|
@@ -260,8 +262,6 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
260
262
|
bIsTransferringUrlStateToPageState = true;
|
|
261
263
|
oState.sNavType = sNavType;
|
|
262
264
|
var oNewUrlParameters = (!sAppStateKey && oURLParameters) || {};
|
|
263
|
-
//Pref Improvement - Resume SetFilterData
|
|
264
|
-
oState.oSmartFilterbar.resumeSetFilterData();
|
|
265
265
|
handleVariantIdPassedViaURLParams(oNewUrlParameters);
|
|
266
266
|
//Apply sort order coming from the XAppState to the smart table.
|
|
267
267
|
if (sNavType !== sap.fe.navigation.NavType.iAppState && oAppData.presentationVariant !== undefined) {
|
|
@@ -405,7 +405,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
405
405
|
fnSetDefaultFilter();
|
|
406
406
|
}
|
|
407
407
|
fnUpdateSVFB();
|
|
408
|
-
|
|
408
|
+
sStoredAppStateKey = null;
|
|
409
409
|
//onload behaviour change for Go button mode
|
|
410
410
|
if (!oState.oSmartFilterbar.isLiveMode()) {
|
|
411
411
|
var bDataLoad = _fnIsLoadDataOnAppLaunch();
|
|
@@ -699,35 +699,38 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
699
699
|
if (oTemplateUtils.oComponentUtils.isStateHandlingSuspended()) {
|
|
700
700
|
return;
|
|
701
701
|
}
|
|
702
|
+
|
|
703
|
+
var oUshellContainer = sap.ui.require("sap/ushell/Container");
|
|
704
|
+
// The NavigationHandler.storeInnerAppStateAsync API works only on the ushell environment.
|
|
705
|
+
// Hence, simply return if ushell container is unavailable.
|
|
706
|
+
if (!oUshellContainer) {
|
|
707
|
+
oLogger.error("AnalyticalListPage.fnStoreCurrentAppStateAndAdjustURL: Can't save the app state as ushell container is not found!");
|
|
708
|
+
return;
|
|
709
|
+
}
|
|
702
710
|
// oCurrentAppState is optional
|
|
703
711
|
// - nothing, if NavigationHandler not available
|
|
704
|
-
// - adjusts URL
|
|
712
|
+
// - adjusts URL
|
|
705
713
|
// - stores appState for this URL (asynchronously)
|
|
706
714
|
var oCurrentAppState = getCurrentAppState();
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
//
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
if (oStoringInformation && sAppStateKeyInUrl !== oStoringInformation.appStateKey) {
|
|
727
|
-
//No need to wait for oStoringInformation.promise, app state is directly accessible from oStoringInformation object
|
|
728
|
-
oRealizedAppState.appStateKey = oStoringInformation.appStateKey;
|
|
729
|
-
oStoringInformation = null;
|
|
730
|
-
}
|
|
715
|
+
|
|
716
|
+
var oStoreInnerAppStatePromise = oNavigationHandler.storeInnerAppStateAsync(oCurrentAppState, true);
|
|
717
|
+
oStoreInnerAppStatePromise.done(function (sAppStateKey) {
|
|
718
|
+
sStoredAppStateKey = sAppStateKey;
|
|
719
|
+
if (oState.oTemplateUtils.oComponentUtils.isComponentActive() && sStoredAppStateKey) { // if the appstateKey really represents a new state and the view is still active set it to hash
|
|
720
|
+
oState.oTemplateUtils.oServices.oApplication.navigateByExchangingQueryParam(sAppState, sStoredAppStateKey);
|
|
721
|
+
}
|
|
722
|
+
//LR is using replaceHash function of NavigationHandler to update the key.
|
|
723
|
+
//LR’s logic is creating the navigation promise and triggering the resolve function on every app state change
|
|
724
|
+
//For ALP that logic will create performance issue. So using a different logic
|
|
725
|
+
if (sStoredAppStateKey && sAppStateKeyInUrl !== sStoredAppStateKey) {
|
|
726
|
+
oRealizedAppState.appStateKey = sStoredAppStateKey;
|
|
727
|
+
sStoredAppStateKey = null;
|
|
728
|
+
}
|
|
729
|
+
});
|
|
730
|
+
oStoreInnerAppStatePromise.fail(function (oError) {
|
|
731
|
+
oLogger.error("AnalyticalListPage.fnStoreCurrentAppStateAndAdjustURL: " + oError);
|
|
732
|
+
sStoredAppStateKey = null;
|
|
733
|
+
});
|
|
731
734
|
}
|
|
732
735
|
function fnCheckToLaunchDialog() {
|
|
733
736
|
var oTemplatePrivate = oState.oController.getOwnerComponent().getModel("_templPriv");
|
|
@@ -283,7 +283,7 @@ sap.ui.define(["sap/ui/core/mvc/Controller",
|
|
|
283
283
|
var oEvent = deepExtend({}, ev);
|
|
284
284
|
setTimeout(function() { // due to the selection data points not being updated during the deselectData event, must check again asynchronously
|
|
285
285
|
var chart = me.oChart;
|
|
286
|
-
if (
|
|
286
|
+
if (me.oState.oTemplateUtils.oCommonUtils.getSelectionPoints(chart).count == 0) {// Clear the filter if no selections remain. If a selection exists it would have come through the SelectData event
|
|
287
287
|
me._updateTable();
|
|
288
288
|
} else if (chart.getSelectionMode() == "MULTIPLE") {// Treat an unselect with remaining selection points as a select
|
|
289
289
|
me._onChartSelectData(oEvent);
|
|
@@ -40,7 +40,7 @@ sap.ui.define(["sap/suite/ui/generic/template/genericUtilities/FeError", "sap/ba
|
|
|
40
40
|
key: oSelectionField.PropertyPath.replace('/', '.'),
|
|
41
41
|
groupId: "_BASIC",
|
|
42
42
|
index: 10 * (i + 1),
|
|
43
|
-
|
|
43
|
+
visibleInAdvancedArea: true
|
|
44
44
|
};
|
|
45
45
|
});
|
|
46
46
|
}
|
|
@@ -146,6 +146,8 @@ sap.ui.define(["sap/suite/ui/generic/template/genericUtilities/FeError", "sap/ba
|
|
|
146
146
|
if (Array.isArray(aNavigationProperties)) {
|
|
147
147
|
bUseProvidedNavigationProperties = true;
|
|
148
148
|
sIncludedNavigationProperties = aNavigationProperties.join(",");
|
|
149
|
+
} else {
|
|
150
|
+
bUseProvidedNavigationProperties = true;
|
|
149
151
|
}
|
|
150
152
|
return {
|
|
151
153
|
navigationProperties: sIncludedNavigationProperties,
|
package/src/sap/suite/ui/generic/template/listTemplates/fragments/DetailSmartTable.fragment.xml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:smartlink="sap.ui.comp.navpopover" xmlns:smarttable="sap.ui.comp.smarttable" xmlns:table="sap.ui.table" xmlns:plugins="sap.m.plugins"
|
|
1
|
+
<core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:smartlink="sap.ui.comp.navpopover" xmlns:smarttable="sap.ui.comp.smarttable" xmlns:table="sap.ui.table" xmlns:plugins="sap.m.plugins"
|
|
2
2
|
xmlns:customData="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1"
|
|
3
3
|
xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
|
|
4
4
|
template:require="{ AH: 'sap/suite/ui/generic/template/js/AnnotationHelper',
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
showDetailsButton="{= ${tableSettings>type} === 'ResponsiveTable'}"
|
|
36
36
|
detailsButtonSetting="{= ${tableSettings>type} === 'ResponsiveTable' ? 'None,Low,Medium' : null}"
|
|
37
37
|
demandPopin="{= ${tableSettings>type} === 'ResponsiveTable'}"
|
|
38
|
-
|
|
38
|
+
useExportToExcel="true"
|
|
39
39
|
customData:p13nDialogSettings="{= (${parameter>/settings/smartVariantManagement} && !${parameter>/settings/enableTableFilterInPageVariant}) ? '{filter:{visible:false}}' : '{filter:{visible:true}}'}"
|
|
40
40
|
customizeConfig="{parts: [{path: 'entitySet>'}, {path: 'entitySet>dummy'}, {path: 'tableSettings>calculateWidthIncludingColumnHeader'}], formatter: 'AH.buildSmartTableCustomizeConfig'}"
|
|
41
41
|
ignoredFields="{workingContext>ignoredFields}"
|
|
@@ -108,8 +108,7 @@
|
|
|
108
108
|
<template:then>
|
|
109
109
|
<!-- ANALYTICAL TABLE -->
|
|
110
110
|
<table:AnalyticalTable id="{:= ${parameter>/stableId}.getStableId({type: 'ALPTable', subType: 'AnalyticalTable', sQuickVariantKey: ${tabItem>key}})}"
|
|
111
|
-
enableColumnReordering="true"
|
|
112
|
-
showColumnVisibilityMenu="false"
|
|
111
|
+
visibleRowCountMode="Auto" enableColumnReordering="true"
|
|
113
112
|
enableColumnFreeze="true"
|
|
114
113
|
enableCellFilter="true"
|
|
115
114
|
rowActionCount="{= ${_templPriv>/listReport/isLeaf} ? 0 : 1 }"
|
|
@@ -125,16 +124,13 @@
|
|
|
125
124
|
<core:Fragment fragmentName="sap.suite.ui.generic.template.fragments.AnalyticalTableColumns" type="XML" />
|
|
126
125
|
</table:columns>
|
|
127
126
|
</template:with>
|
|
128
|
-
<table:rowMode>
|
|
129
|
-
<rowmodes:Auto/>
|
|
130
|
-
</table:rowMode>
|
|
131
127
|
</table:AnalyticalTable>
|
|
132
128
|
</template:then>
|
|
133
129
|
<template:elseif test="{= ${tableSettings>type} === 'GridTable'}">
|
|
134
130
|
<!-- GRID TABLE -->
|
|
135
131
|
<table:Table id="{:= ${parameter>/stableId}.getStableId({type: 'ALPTable', subType: 'GridTable', sQuickVariantKey: ${tabItem>key}})}"
|
|
132
|
+
visibleRowCountMode="Auto"
|
|
136
133
|
enableColumnReordering="true"
|
|
137
|
-
showColumnVisibilityMenu="false"
|
|
138
134
|
enableColumnFreeze="true"
|
|
139
135
|
enableCellFilter="true"
|
|
140
136
|
rowActionCount="{= ${_templPriv>/listReport/isLeaf} ? 0 : 1 }"
|
|
@@ -153,17 +149,14 @@
|
|
|
153
149
|
<core:Fragment fragmentName="sap.suite.ui.generic.template.fragments.GridTableColumns" type="XML" />
|
|
154
150
|
</table:columns>
|
|
155
151
|
</template:with>
|
|
156
|
-
<table:rowMode>
|
|
157
|
-
<rowmodes:Auto/>
|
|
158
|
-
</table:rowMode>
|
|
159
152
|
</table:Table>
|
|
160
153
|
</template:elseif>
|
|
161
154
|
<template:elseif test="{= ${tableSettings>type} === 'TreeTable'}">
|
|
162
155
|
<!-- TREE TABLE -->
|
|
163
156
|
<table:TreeTable
|
|
164
157
|
id="{:= ${parameter>/stableId}.getStableId({type: 'ALPTable', subType: 'TreeTable', sQuickVariantKey: ${tabItem>key}})}"
|
|
158
|
+
visibleRowCountMode="Auto"
|
|
165
159
|
enableColumnReordering="true"
|
|
166
|
-
showColumnVisibilityMenu="false"
|
|
167
160
|
enableColumnFreeze="true"
|
|
168
161
|
enableCellFilter="true"
|
|
169
162
|
rowActionCount="{= ${_templPriv>/listReport/isLeaf} ? 0 : 1 }"
|
|
@@ -177,9 +170,6 @@
|
|
|
177
170
|
<core:Fragment fragmentName="sap.suite.ui.generic.template.fragments.TreeTableColumns" type="XML" />
|
|
178
171
|
</table:columns>
|
|
179
172
|
</template:with>
|
|
180
|
-
<table:rowMode>
|
|
181
|
-
<rowmodes:Auto/>
|
|
182
|
-
</table:rowMode>
|
|
183
173
|
</table:TreeTable>
|
|
184
174
|
</template:elseif>
|
|
185
175
|
<!-- On failing all the above conditions or if the display mode is anything but desktop i.e tablet or phone or any other device it falls back to responsive -->
|
package/src/sap/suite/ui/generic/template/listTemplates/fragments/SmartTableToolbar.fragment.xml
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<template:if test="{= !${parameter>/settings/quickVariantSelectionX} && (${parameter>/settings/showAutoHide} !== false) }">
|
|
21
21
|
<SegmentedButton
|
|
22
22
|
selectedKey="{_templPriv>/alp/autoHide}"
|
|
23
|
-
|
|
23
|
+
selectionChange="._templateEventHandlers.onAutoHideToggle">
|
|
24
24
|
<items>
|
|
25
25
|
<SegmentedButtonItem
|
|
26
26
|
tooltip="{i18n>CHARTTABLE_AUTOHIDE_OFF}"
|
|
@@ -386,6 +386,6 @@ html[dir="rtl"] .sapSmartTemplatesObjectPage .sapSmartTemplatesObjectPageSubSect
|
|
|
386
386
|
display:flex;
|
|
387
387
|
}
|
|
388
388
|
|
|
389
|
-
.
|
|
389
|
+
.sapSmartTemplatesObjectPageHeaderFormObjectStatus{
|
|
390
390
|
line-height: 1.320rem !important;
|
|
391
391
|
}
|
|
@@ -386,6 +386,6 @@ html[dir="rtl"] .sapSmartTemplatesObjectPage .sapSmartTemplatesObjectPageSubSect
|
|
|
386
386
|
display:flex;
|
|
387
387
|
}
|
|
388
388
|
|
|
389
|
-
.
|
|
389
|
+
.sapSmartTemplatesObjectPageHeaderFormObjectStatus{
|
|
390
390
|
line-height: 1.320rem !important;
|
|
391
391
|
}
|