@sapui5/sap.suite.ui.generic.template 1.123.1 → 1.124.1
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 +4 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/ControllerImplementation.js +16 -9
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/CtxMenuHandler.js +77 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/util/FilterUtil.js +52 -51
- package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/controller/ControllerImplementation.js +5 -4
- package/src/sap/suite/ui/generic/template/ListReport/controller/CtxMenuHandler.js +20 -1
- 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/ObjectPage/controller/ControllerImplementation.js +130 -99
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/CtxMenuHandler.js +8 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/MessageSortingHandler.js +2 -5
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/MessageStripHelper.js +4 -3
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/PasteHandler.js +12 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/SectionTitleHandler.js +15 -3
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/inlineCreationRows/InlineCreationRowsHelper.js +12 -15
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/inlineCreationRows/RequiredPropHelper.js +4 -3
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +5 -2
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/Actions.fragment.xml +12 -12
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/SmartTable.fragment.xml +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/detailTemplates/detailUtils.js +3 -3
- package/src/sap/suite/ui/generic/template/extensionAPI/extensionAPI.js +2 -0
- package/src/sap/suite/ui/generic/template/fragments/AnalyticalTableColumns.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/fragments/ContactDetails.fragment.xml +15 -9
- package/src/sap/suite/ui/generic/template/fragments/ContactDetailsQuickViewGroupReplica.fragment.xml +6 -3
- package/src/sap/suite/ui/generic/template/fragments/FileUploader.fragment.xml +1 -0
- package/src/sap/suite/ui/generic/template/fragments/QuickViewSmartForm.fragment.xml +6 -3
- package/src/sap/suite/ui/generic/template/fragments/TableColumns.fragment.xml +12 -0
- package/src/sap/suite/ui/generic/template/genericUtilities/controlHelper.js +5 -9
- package/src/sap/suite/ui/generic/template/js/RuntimeFormatters.js +2 -3
- package/src/sap/suite/ui/generic/template/lib/AdaptiveCardHelper.js +2 -4
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +24 -16
- package/src/sap/suite/ui/generic/template/lib/CRUDActionHandler.js +5 -5
- package/src/sap/suite/ui/generic/template/lib/CRUDManager.js +3 -2
- package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +68 -57
- package/src/sap/suite/ui/generic/template/lib/CommonUtils.js +30 -7
- package/src/sap/suite/ui/generic/template/lib/ContactCardDetailHelper.js +4 -18
- package/src/sap/suite/ui/generic/template/lib/ContextMenuHandler.js +20 -18
- package/src/sap/suite/ui/generic/template/lib/ShareUtils.js +141 -126
- package/src/sap/suite/ui/generic/template/lib/cards/DTCardHelper.js +48 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n.properties +5 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en.properties +1 -1
- package/src/sap/suite/ui/generic/template/lib/insights/InsightsCardHelper.js +14 -7
- package/src/sap/suite/ui/generic/template/lib/insights/InsightsFECardProvider.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/insights/InsightsHandler.js +54 -17
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +1 -1
- package/src/sap/suite/ui/generic/template/library.js +7 -5
- package/src/sap/suite/ui/generic/template/listTemplates/controller/IappStateHandler.js +5 -0
- package/src/sap/suite/ui/generic/template/listTemplates/fragments/DetailSmartTable.fragment.xml +6 -0
- package/src/sap/suite/ui/generic/template/listTemplates/listUtils.js +2 -5
- package/src/sap/suite/ui/generic/template/support/lib/CommonChecks.js +4 -6
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal/library.source.less +10 -1
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/ALPConstants.less +47 -0
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/AnalyticalListPage.less +475 -0
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/ListReport.less +33 -0
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/ObjectPage.less +391 -0
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/QuickCreate.less +96 -0
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/QuickView.less +108 -0
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/alr_zen.css +136 -0
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/base.less +7 -0
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/crosstab_library.css +20 -0
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/library.source.less +9 -0
- package/ui5.yaml +1 -0
|
@@ -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/
|
|
4
|
-
], function (ObjectPath, AddBookmarkButton, ServiceContainer, CustomData, FESRHelper, Component, AdaptiveCardHelper,
|
|
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 = {};
|
|
@@ -20,102 +20,91 @@ sap.ui.define(["sap/base/util/ObjectPath", "sap/ushell/ui/footerbar/AddBookmarkB
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
function getMSTeamsConfigFromMessageBroker () {
|
|
23
|
-
return
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
oMessageData.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (oMessageData.service === "sap.ushell.services.MessageBroker" &&
|
|
67
|
-
oMessageData.type === "response" &&
|
|
68
|
-
oMessageData.body.channelId === "sap.ushell.MessageBroker" &&
|
|
69
|
-
oMessageData.body.clientId === MY_CLIENT_ID &&
|
|
70
|
-
oMessageData.body.messageName == "subscribe" &&
|
|
71
|
-
oMessageData.body.status === "accepted") {
|
|
72
|
-
setTimeout(function () {
|
|
73
|
-
oFLPWindow.postMessage(JSON.stringify({
|
|
74
|
-
type: "request",
|
|
75
|
-
service: "sap.ushell.services.MessageBroker",
|
|
76
|
-
request_id: Date.now().toString(),
|
|
77
|
-
body: {
|
|
78
|
-
channelId: CHANNEL_ID,
|
|
79
|
-
targetClientIds: [PLUGIN_CLIENT_ID],
|
|
80
|
-
data: {},
|
|
81
|
-
clientId: MY_CLIENT_ID,
|
|
82
|
-
messageName: MSG_NAME
|
|
83
|
-
}
|
|
84
|
-
}), "*");
|
|
85
|
-
}, 0);
|
|
86
|
-
}
|
|
87
|
-
if (oMessageData.service === "sap.ushell.services.MessageBroker" &&
|
|
88
|
-
oMessageData.type === "request" &&
|
|
89
|
-
oMessageData.body.channelId === CHANNEL_ID &&
|
|
90
|
-
oMessageData.body.clientId === PLUGIN_CLIENT_ID &&
|
|
91
|
-
oMessageData.body.messageName == MSG_NAME) {
|
|
92
|
-
if (failTimerId) {
|
|
93
|
-
clearTimeout(failTimerId);
|
|
23
|
+
return getCurrentUrl().then(function(sCurrentUrl){
|
|
24
|
+
var sHostName = sCurrentUrl.split(sCurrentUrl.getHash(sCurrentUrl))[0].split('/')[2];
|
|
25
|
+
return new Promise(function (fnResolve) {
|
|
26
|
+
var MY_CLIENT_ID = "sap-suite-ui-commons-collaboration-client-appruntime";
|
|
27
|
+
var PLUGIN_CLIENT_ID = "sap-suite-ui-commons-collaboration-message-broker";
|
|
28
|
+
var CHANNEL_ID = "collaboration-channel";
|
|
29
|
+
var MSG_NAME = "get-provider-config";
|
|
30
|
+
var aSubscribedChannels = [
|
|
31
|
+
{
|
|
32
|
+
channelId: CHANNEL_ID,
|
|
33
|
+
version: "1.0"
|
|
34
|
+
}
|
|
35
|
+
];
|
|
36
|
+
var oFLPWindow = window.parent;
|
|
37
|
+
var failTimerId;
|
|
38
|
+
var bResponseReturned = false;
|
|
39
|
+
|
|
40
|
+
//callback function to get messages from the message broker in the outer shell
|
|
41
|
+
function processMessages (oMessage) {
|
|
42
|
+
var oMessageData;
|
|
43
|
+
if (typeof oMessage.data === "string" && oMessage.data.indexOf("sap.ushell.services.MessageBroker") > 0) {
|
|
44
|
+
try {
|
|
45
|
+
oMessageData = JSON.parse(oMessage.data);
|
|
46
|
+
//connection accepted, now subscribe to the channel
|
|
47
|
+
if (oMessageData.service === "sap.ushell.services.MessageBroker" &&
|
|
48
|
+
oMessageData.type === "response" &&
|
|
49
|
+
oMessageData.body.channelId === "sap.ushell.MessageBroker" &&
|
|
50
|
+
oMessageData.body.clientId === MY_CLIENT_ID &&
|
|
51
|
+
oMessageData.body.messageName === "connect" &&
|
|
52
|
+
oMessageData.body.status === "accepted") {
|
|
53
|
+
setTimeout(function () {
|
|
54
|
+
oFLPWindow.postMessage(JSON.stringify({
|
|
55
|
+
type: "request",
|
|
56
|
+
service: "sap.ushell.services.MessageBroker",
|
|
57
|
+
request_id: Date.now().toString(),
|
|
58
|
+
body: {
|
|
59
|
+
channelId: "sap.ushell.MessageBroker",
|
|
60
|
+
clientId: MY_CLIENT_ID,
|
|
61
|
+
messageName: "subscribe",
|
|
62
|
+
subscribedChannels: aSubscribedChannels
|
|
63
|
+
}
|
|
64
|
+
}), sHostName);
|
|
65
|
+
}, 0);
|
|
94
66
|
}
|
|
95
|
-
|
|
96
|
-
|
|
67
|
+
//subscription is ok, get the teams config from the shell plugin
|
|
68
|
+
if (oMessageData.service === "sap.ushell.services.MessageBroker" &&
|
|
69
|
+
oMessageData.type === "response" &&
|
|
70
|
+
oMessageData.body.channelId === "sap.ushell.MessageBroker" &&
|
|
71
|
+
oMessageData.body.clientId === MY_CLIENT_ID &&
|
|
72
|
+
oMessageData.body.messageName == "subscribe" &&
|
|
73
|
+
oMessageData.body.status === "accepted") {
|
|
74
|
+
setTimeout(function () {
|
|
75
|
+
oFLPWindow.postMessage(JSON.stringify({
|
|
76
|
+
type: "request",
|
|
77
|
+
service: "sap.ushell.services.MessageBroker",
|
|
78
|
+
request_id: Date.now().toString(),
|
|
79
|
+
body: {
|
|
80
|
+
channelId: CHANNEL_ID,
|
|
81
|
+
targetClientIds: [PLUGIN_CLIENT_ID],
|
|
82
|
+
data: {},
|
|
83
|
+
clientId: MY_CLIENT_ID,
|
|
84
|
+
messageName: MSG_NAME
|
|
85
|
+
}
|
|
86
|
+
}), sHostName);
|
|
87
|
+
}, 0);
|
|
97
88
|
}
|
|
89
|
+
if (oMessageData.service === "sap.ushell.services.MessageBroker" &&
|
|
90
|
+
oMessageData.type === "request" &&
|
|
91
|
+
oMessageData.body.channelId === CHANNEL_ID &&
|
|
92
|
+
oMessageData.body.clientId === PLUGIN_CLIENT_ID &&
|
|
93
|
+
oMessageData.body.messageName == MSG_NAME) {
|
|
94
|
+
if (failTimerId) {
|
|
95
|
+
clearTimeout(failTimerId);
|
|
96
|
+
}
|
|
97
|
+
if (!bResponseReturned) {
|
|
98
|
+
fnResolve(JSON.parse(oMessageData.body.data));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
} catch (e) {
|
|
102
|
+
fnResolve({});
|
|
98
103
|
}
|
|
99
|
-
} catch (e) {
|
|
100
|
-
fnResolve({});
|
|
101
104
|
}
|
|
102
105
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
//connect to the message broker
|
|
106
|
-
oFLPWindow.postMessage(JSON.stringify({
|
|
107
|
-
"type": "request",
|
|
108
|
-
"service": "sap.ushell.services.MessageBroker",
|
|
109
|
-
"request_id": Date.now().toString(),
|
|
110
|
-
"body": {
|
|
111
|
-
"channelId": "sap.ushell.MessageBroker",
|
|
112
|
-
"clientId": MY_CLIENT_ID,
|
|
113
|
-
"messageName": "connect"
|
|
114
|
-
}
|
|
115
|
-
}), "*");
|
|
116
|
-
|
|
117
|
-
//disconnect to the message broker after 2 seconds
|
|
118
|
-
setTimeout(function () {
|
|
106
|
+
window.addEventListener("message", processMessages);
|
|
107
|
+
//connect to the message broker
|
|
119
108
|
oFLPWindow.postMessage(JSON.stringify({
|
|
120
109
|
"type": "request",
|
|
121
110
|
"service": "sap.ushell.services.MessageBroker",
|
|
@@ -123,17 +112,31 @@ sap.ui.define(["sap/base/util/ObjectPath", "sap/ushell/ui/footerbar/AddBookmarkB
|
|
|
123
112
|
"body": {
|
|
124
113
|
"channelId": "sap.ushell.MessageBroker",
|
|
125
114
|
"clientId": MY_CLIENT_ID,
|
|
126
|
-
"messageName": "
|
|
115
|
+
"messageName": "connect"
|
|
127
116
|
}
|
|
128
|
-
}),
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
117
|
+
}), sHostName);
|
|
118
|
+
|
|
119
|
+
//disconnect to the message broker after 2 seconds
|
|
120
|
+
setTimeout(function () {
|
|
121
|
+
oFLPWindow.postMessage(JSON.stringify({
|
|
122
|
+
"type": "request",
|
|
123
|
+
"service": "sap.ushell.services.MessageBroker",
|
|
124
|
+
"request_id": Date.now().toString(),
|
|
125
|
+
"body": {
|
|
126
|
+
"channelId": "sap.ushell.MessageBroker",
|
|
127
|
+
"clientId": MY_CLIENT_ID,
|
|
128
|
+
"messageName": "disconnect"
|
|
129
|
+
}
|
|
130
|
+
}), sHostName);
|
|
131
|
+
window.removeEventListener("message", processMessages);
|
|
132
|
+
}, 2000);
|
|
133
|
+
|
|
134
|
+
//if the outer shell did not answer within 1.5 seconds, assume there is no plugin
|
|
135
|
+
failTimerId = setTimeout(function () {
|
|
136
|
+
bResponseReturned = true;
|
|
137
|
+
fnResolve({});
|
|
138
|
+
}, 1500);
|
|
139
|
+
});
|
|
137
140
|
});
|
|
138
141
|
}
|
|
139
142
|
|
|
@@ -148,7 +151,7 @@ sap.ui.define(["sap/base/util/ObjectPath", "sap/ushell/ui/footerbar/AddBookmarkB
|
|
|
148
151
|
* @static
|
|
149
152
|
*/
|
|
150
153
|
ShareUtils.setStaticShareData = function(fragment, shareModel) {
|
|
151
|
-
var oResource =
|
|
154
|
+
var oResource = Library.getResourceBundleFor("sap.m");
|
|
152
155
|
|
|
153
156
|
shareModel.setProperty("/emailButtonText", oResource.getText("SEMANTIC_CONTROL_SEND_EMAIL"));
|
|
154
157
|
shareModel.setProperty("/jamButtonText", oResource.getText("SEMANTIC_CONTROL_SHARE_ON_WORK_ZONE"));
|
|
@@ -202,17 +205,18 @@ sap.ui.define(["sap/base/util/ObjectPath", "sap/ushell/ui/footerbar/AddBookmarkB
|
|
|
202
205
|
}
|
|
203
206
|
|
|
204
207
|
oCommonUtils.getDialogFragmentAsync("sap.suite.ui.generic.template.fragments.ShareSheet", oFragmentController, "share", ShareUtils.setStaticShareData, true).then(function (oFragment) {
|
|
205
|
-
oShareActionSheet = oFragment;
|
|
208
|
+
oShareActionSheet = oFragment;
|
|
209
|
+
var oUshellContainer = sap.ui.require("sap/ushell/Container");
|
|
206
210
|
var oShareModel = oShareActionSheet.getModel("share");
|
|
211
|
+
var that = this;
|
|
207
212
|
oFragmentController.getModelData().then(function (oFragmentModelData) {
|
|
208
213
|
oShareModel.setData(oFragmentModelData, true);
|
|
209
|
-
|
|
210
|
-
if (sEnableTeamsForSCube === "true") {
|
|
214
|
+
if (oUshellContainer && oUshellContainer.inAppRuntime()) {
|
|
211
215
|
var oMessageBrokerPromise = getMSTeamsConfigFromMessageBroker();
|
|
212
216
|
oMessageBrokerPromise.then(function(oProviderConfiguration){
|
|
213
217
|
ServiceContainer.getServiceAsyncForAppRuntime(oProviderConfiguration).then(function (oTeamsHelper) {
|
|
214
|
-
|
|
215
|
-
}
|
|
218
|
+
that.addMenuItem(oShareModel, oTeamsHelper, oShareActionSheet, oControlToOpenBy);
|
|
219
|
+
});
|
|
216
220
|
});
|
|
217
221
|
} else {
|
|
218
222
|
ServiceContainer.getServiceAsync().then(function (oTeamsHelper) {
|
|
@@ -237,7 +241,7 @@ sap.ui.define(["sap/base/util/ObjectPath", "sap/ushell/ui/footerbar/AddBookmarkB
|
|
|
237
241
|
if (oMainMenuItem.subOptions && oMainMenuItem.subOptions.length > 1) {
|
|
238
242
|
var aMenus = [];
|
|
239
243
|
oMainMenuItem.subOptions.forEach(function (menuItem) {
|
|
240
|
-
var oItem = new
|
|
244
|
+
var oItem = new MenuItem({
|
|
241
245
|
text: menuItem.text,
|
|
242
246
|
icon: menuItem.icon,
|
|
243
247
|
press: this.menuItemPress
|
|
@@ -249,13 +253,13 @@ sap.ui.define(["sap/base/util/ObjectPath", "sap/ushell/ui/footerbar/AddBookmarkB
|
|
|
249
253
|
FESRHelper.setSemanticStepname(oItem, "press", menuItem.fesrStepName);
|
|
250
254
|
aMenus.push(oItem);
|
|
251
255
|
}.bind(this));
|
|
252
|
-
oShareActionSheet.insertItem(new
|
|
256
|
+
oShareActionSheet.insertItem(new MenuItem({
|
|
253
257
|
text: oMainMenuItem.text,
|
|
254
258
|
icon: oMainMenuItem.icon,
|
|
255
259
|
items: aMenus
|
|
256
260
|
}), iIndexForCollaborationOptions);
|
|
257
261
|
} else {
|
|
258
|
-
var oItem = new
|
|
262
|
+
var oItem = new MenuItem({
|
|
259
263
|
text: oMainMenuItem.text,
|
|
260
264
|
icon: oMainMenuItem.icon,
|
|
261
265
|
press: this.menuItemPress
|
|
@@ -295,7 +299,14 @@ sap.ui.define(["sap/base/util/ObjectPath", "sap/ushell/ui/footerbar/AddBookmarkB
|
|
|
295
299
|
* Option.
|
|
296
300
|
*/
|
|
297
301
|
ShareUtils.menuItemPress = function () {
|
|
298
|
-
ServiceContainer.getServiceAsync()
|
|
302
|
+
var oServicePromise = ServiceContainer.getServiceAsync();
|
|
303
|
+
var UShellContainer = sap.ui.require("sap/ushell/Container");
|
|
304
|
+
var oUrlParserPromise = UShellContainer && UShellContainer.getServiceAsync("URLParsing");
|
|
305
|
+
|
|
306
|
+
Promise.all([oServicePromise, oUrlParserPromise]).then(function (aResults) {
|
|
307
|
+
var oTeamsHelper = aResults[0];
|
|
308
|
+
var oURLParser = aResults[1];
|
|
309
|
+
|
|
299
310
|
var oShareModel = this.getModel("share");
|
|
300
311
|
var sAppTitle = "", sSubtitle = "";
|
|
301
312
|
if (oShareModel.getProperty("/subtitle") !== undefined) {
|
|
@@ -315,19 +326,23 @@ sap.ui.define(["sap/base/util/ObjectPath", "sap/ushell/ui/footerbar/AddBookmarkB
|
|
|
315
326
|
};
|
|
316
327
|
if (this.getCustomData()[0].getValue().key === "COLLABORATION_MSTEAMS_CARD") {
|
|
317
328
|
if (oTeamsHelper.isFeatureFlagEnabled()) {
|
|
318
|
-
var
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
329
|
+
var oDtCardManifest = oShareModel.getProperty("/oDtCardManifest");
|
|
330
|
+
if (oDtCardManifest) {
|
|
331
|
+
data.cardManifest = oDtCardManifest;
|
|
332
|
+
} else {
|
|
333
|
+
var oComponent = oStoredController.getOwnerComponent();
|
|
334
|
+
var oAdaptiveCardJson = AdaptiveCardHelper.createAdaptiveCard("HeaderInfo", {
|
|
335
|
+
appTitle: oShareModel.getProperty("/objectShellTitle"),
|
|
336
|
+
objectTitle: oShareModel.getProperty("/title"),
|
|
337
|
+
objectSubtitle: oShareModel.getProperty("/subtitle"),
|
|
338
|
+
url: oShareModel.getProperty("/currentUrl"),
|
|
339
|
+
controller: oStoredController,
|
|
340
|
+
component: oComponent
|
|
341
|
+
});
|
|
342
|
+
data.cardManifest = oAdaptiveCardJson;
|
|
343
|
+
}
|
|
344
|
+
if (oURLParser) {
|
|
345
|
+
var oURL = oURLParser.parseShellHash(data.url.substring(data.url.indexOf('#')));
|
|
331
346
|
data.cardId = oURL.semanticObject + "_" + oURL.action;
|
|
332
347
|
}
|
|
333
348
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
sap.ui.define([
|
|
2
|
+
"sap/ui/base/Object",
|
|
3
|
+
"sap/base/util/extend",
|
|
4
|
+
"sap/cards/ap/common/services/RetrieveCard"
|
|
5
|
+
], function (BaseObject, extend, RetrieveCard) {
|
|
6
|
+
"use strict";
|
|
7
|
+
/**
|
|
8
|
+
* @class DTCardHelper
|
|
9
|
+
* @param oController - Controller instance
|
|
10
|
+
* @classdesc This class is used to get the card manifest for the DesignTime Card.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
var CardTypes = {
|
|
14
|
+
INTEGRATION: RetrieveCard.CardTypes.INTEGRATION,
|
|
15
|
+
ADAPTIVE: RetrieveCard.CardTypes.ADAPTIVE
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
function getMethods(oController) {
|
|
19
|
+
var oComponent = oController.getOwnerComponent();
|
|
20
|
+
var oAppComponent = oComponent.getAppComponent();
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @param {CardTypes} cardType
|
|
24
|
+
* @returns {Promise} - Returns the card manifest for the DesignTime Card.
|
|
25
|
+
*
|
|
26
|
+
* This method is called by the DesignTime Card to get the card manifest from each Object Page
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* oDTCardHelper.getCardManifest(DTCardHelper.CardTypes.INTEGRATION);
|
|
30
|
+
*/
|
|
31
|
+
function getCardManifest(cardType) {
|
|
32
|
+
return RetrieveCard.getObjectPageCardManifestForPreview(oAppComponent, {cardType: cardType});
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
getCardManifest: getCardManifest
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
var DTCardHelper = BaseObject.extend("sap.suite.ui.generic.template.lib.DTCardHelper", {
|
|
40
|
+
constructor: function (oController) {
|
|
41
|
+
extend(this, getMethods(oController));
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
DTCardHelper.CardTypes = CardTypes;
|
|
46
|
+
return DTCardHelper;
|
|
47
|
+
|
|
48
|
+
});
|
|
@@ -67,6 +67,9 @@ ST_UNSAVED_CHANGES_TITLE=Unsaved Changes
|
|
|
67
67
|
# XTIT, 30
|
|
68
68
|
ST_STREAM_OPEN_FILE=Open File
|
|
69
69
|
|
|
70
|
+
# XMSG
|
|
71
|
+
ST_STREAM_TYPE_MISMATCH=Selected file type is not supported.
|
|
72
|
+
|
|
70
73
|
#XFLD: this text will be used to add additional information to the draft type in the list report for locked objects or objects with unsaved changes it will read like "Unsaved Changes by User" the "Unsaved Changes" part is provided by the control itself
|
|
71
74
|
ST_DRAFT_OWNER=by {0}
|
|
72
75
|
|
|
@@ -104,7 +107,7 @@ COPY=Copy
|
|
|
104
107
|
ST_SEND_CARD_TO_CHAT=Send
|
|
105
108
|
|
|
106
109
|
#XBUT, 50: opens an object in new tab or window
|
|
107
|
-
ST_OPEN_NEW_TAB_OR_WINDOW=Open in
|
|
110
|
+
ST_OPEN_NEW_TAB_OR_WINDOW=Open in New Tab or Window
|
|
108
111
|
|
|
109
112
|
#XTIT: messagebox title for warning in message view
|
|
110
113
|
ST_MESSAGES_DIALOG_TITLE_WARNING=Warning
|
|
@@ -236,7 +239,7 @@ ST_GENERIC_ERROR_SYSTEM_UNAVAILABLE_FOR_ACTION=Unable to perform this action.
|
|
|
236
239
|
ST_GENERIC_ERROR_NOT_AUTORIZED_CREATE=You don't have create authorization.
|
|
237
240
|
|
|
238
241
|
# XMSG,150: User selects too many records and tries to open them on new tabs through table context menu
|
|
239
|
-
T_TABLE_NAVIGATION_TOO_MANY_ITEMS_SELECTED=You can only open
|
|
242
|
+
T_TABLE_NAVIGATION_TOO_MANY_ITEMS_SELECTED=You can only open upto {0} items at the same time.
|
|
240
243
|
|
|
241
244
|
#YMSG, 100: User not authorized for action message (HTTP status code: 403)
|
|
242
245
|
ST_GENERIC_ERROR_NOT_AUTORIZED_ACTION=You don't have authorization for this action.
|
|
@@ -13,7 +13,8 @@ sap.ui.define(["sap/suite/ui/generic/template/genericUtilities/metadataAnalyser"
|
|
|
13
13
|
InsightsCardHelper.CardTypes = {
|
|
14
14
|
TABLE : "Table",
|
|
15
15
|
ANALYTICAL : "Analytical",
|
|
16
|
-
LIST
|
|
16
|
+
LIST: "List",
|
|
17
|
+
DT_CARD: "DT_CARD"
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
// shortcut for sap.ui.core.ValueState
|
|
@@ -38,6 +39,12 @@ sap.ui.define(["sap/suite/ui/generic/template/genericUtilities/metadataAnalyser"
|
|
|
38
39
|
return "user." + oAppManifest.id + "." + Date.now();
|
|
39
40
|
};
|
|
40
41
|
var createCardManifest = function (oCardDefinition) {
|
|
42
|
+
var oManifest = {};
|
|
43
|
+
if (oCardDefinition.cardType === InsightsCardHelper.CardTypes.DT_CARD) {
|
|
44
|
+
oManifest = oCardDefinition.descriptorContent;
|
|
45
|
+
oManifest["sap.insights"] = fnCreateManifestSapInsight(oCardDefinition);
|
|
46
|
+
return oManifest;
|
|
47
|
+
}
|
|
41
48
|
var oComponent = oCardDefinition['component'];
|
|
42
49
|
var oAppComponent = oComponent.getAppComponent();
|
|
43
50
|
var oUIManifest = oAppComponent.getManifestEntry("sap.ui");
|
|
@@ -45,7 +52,6 @@ sap.ui.define(["sap/suite/ui/generic/template/genericUtilities/metadataAnalyser"
|
|
|
45
52
|
if (oAppManifest && oAppManifest["crossNavigation"]) {
|
|
46
53
|
delete oAppManifest["crossNavigation"];
|
|
47
54
|
}
|
|
48
|
-
var oManifest = {};
|
|
49
55
|
oAppManifest.type = "card";
|
|
50
56
|
oAppManifest.id = InsightsCardHelper.getCardId(oAppComponent);
|
|
51
57
|
oManifest["sap.app"] = fnCreateManifestSapApp(oAppManifest);
|
|
@@ -544,7 +550,7 @@ sap.ui.define(["sap/suite/ui/generic/template/genericUtilities/metadataAnalyser"
|
|
|
544
550
|
};
|
|
545
551
|
|
|
546
552
|
var getFeeds = function(oInnerChart) {
|
|
547
|
-
var aCardFeeds = [],
|
|
553
|
+
var aCardFeeds = [],
|
|
548
554
|
aVizFeeds = oInnerChart._getVizFrame().getFeeds(),
|
|
549
555
|
aFeeds, aFeedType;
|
|
550
556
|
for (var i = 0; i < aVizFeeds.length; i++) {
|
|
@@ -662,13 +668,13 @@ sap.ui.define(["sap/suite/ui/generic/template/genericUtilities/metadataAnalyser"
|
|
|
662
668
|
if (aVisibleDimension[i] === elem.getName()) {
|
|
663
669
|
if (elem.getTextProperty()) {
|
|
664
670
|
aDimensions.push({
|
|
665
|
-
"name": elem.getLabel(),
|
|
671
|
+
"name": elem.getLabel(),
|
|
666
672
|
"value": "{" + elem.getTextProperty() + "}",
|
|
667
673
|
"displayValue": constructTextArrangement(oCardDefinition, elem)
|
|
668
674
|
});
|
|
669
675
|
} else {
|
|
670
676
|
aDimensions.push({
|
|
671
|
-
"name": elem.getLabel(),
|
|
677
|
+
"name": elem.getLabel(),
|
|
672
678
|
"value": "{" + elem.getName() + "}",
|
|
673
679
|
"displayValue": constructTextArrangement(oCardDefinition, elem)
|
|
674
680
|
});
|
|
@@ -765,6 +771,7 @@ sap.ui.define(["sap/suite/ui/generic/template/genericUtilities/metadataAnalyser"
|
|
|
765
771
|
|
|
766
772
|
var fnGetColumnsToShow = function (oCardDefinition) {
|
|
767
773
|
var oEntityType = oCardDefinition['entityType'];
|
|
774
|
+
var oSmartTable = oCardDefinition['currentControlHandler'].getControl();
|
|
768
775
|
var oMetaModel = oCardDefinition['currentControlHandler'].getModel().getMetaModel();
|
|
769
776
|
var aColumns = [];
|
|
770
777
|
var oCommonUtils = oCardDefinition.oTemplateUtils.oCommonUtils;
|
|
@@ -772,7 +779,7 @@ sap.ui.define(["sap/suite/ui/generic/template/genericUtilities/metadataAnalyser"
|
|
|
772
779
|
var oColumnData = oColumn.data("p13nData");
|
|
773
780
|
var sColumnKeyDescription = (oColumnData && oColumnData.description) || "";
|
|
774
781
|
var oProperty = oMetaModel.getODataProperty(oEntityType, oColumnData.leadingProperty);
|
|
775
|
-
if (oCommonUtils.isSupportedColumn(oColumn, oProperty)) {
|
|
782
|
+
if (oCommonUtils.isSupportedColumn(oColumn, oProperty, oSmartTable)) {
|
|
776
783
|
if (oProperty && (oProperty['sap:label'] || oProperty['com.sap.vocabularies.Common.v1.Label']) && oColumn.getVisible()) {
|
|
777
784
|
var oColumnObject = {};
|
|
778
785
|
sColumnKeyDescription = "{" + sColumnKeyDescription + "}";
|
|
@@ -850,4 +857,4 @@ sap.ui.define(["sap/suite/ui/generic/template/genericUtilities/metadataAnalyser"
|
|
|
850
857
|
};
|
|
851
858
|
|
|
852
859
|
return InsightsCardHelper;
|
|
853
|
-
});
|
|
860
|
+
});
|
|
@@ -41,7 +41,7 @@ sap.ui.define([
|
|
|
41
41
|
*/
|
|
42
42
|
function onCardDetailsRequested(sConsumerId, sCardId) {
|
|
43
43
|
var iViewLevel = oTemplateContract.oTemplatePrivateGlobalModel.getProperty("/generic/routeLevel");
|
|
44
|
-
var aShareCards = oTemplateContract.oTemplatePrivateGlobalModel.getProperty("/generic/insights/shareCards/" + iViewLevel);
|
|
44
|
+
var aShareCards = oTemplateContract.oTemplatePrivateGlobalModel.getProperty("/generic/insights/shareCards/" + iViewLevel) || [];
|
|
45
45
|
var oCard = aShareCards.find(function(oCard) {
|
|
46
46
|
return oCard.id === sCardId;
|
|
47
47
|
});
|
|
@@ -2,15 +2,16 @@ sap.ui.define([
|
|
|
2
2
|
"sap/ui/base/Object",
|
|
3
3
|
"sap/base/util/extend",
|
|
4
4
|
"sap/m/MessageBox",
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
"sap/suite/ui/generic/template/lib/insights/InsightsCardHelper",
|
|
6
|
+
"sap/suite/ui/generic/template/lib/cards/DTCardHelper",
|
|
7
|
+
"sap/base/util/merge"
|
|
8
|
+
], function(BaseObject, extend, MessageBox, InsightsCardHelper, DTCardHelper, merge) {
|
|
7
9
|
'use strict';
|
|
8
10
|
function getMethods(oState, oController, oTemplateUtils) {
|
|
9
11
|
|
|
10
12
|
var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
|
|
11
13
|
var oTemplatePrivateGlobalModel = oTemplateUtils.oComponentUtils.getTemplatePrivateGlobalModel();
|
|
12
14
|
var oInsightsInstance = oTemplatePrivateGlobalModel.getProperty("/generic/insights/oInsightsInstance");
|
|
13
|
-
|
|
14
15
|
/**
|
|
15
16
|
* This function can be called by any InsightsHandler instance to add the card that the user wants to share
|
|
16
17
|
* @param {*} oInsightsCardProvider single insight instance which is shared across the application
|
|
@@ -20,20 +21,20 @@ sap.ui.define([
|
|
|
20
21
|
*/
|
|
21
22
|
function fnGetCardsToShare(sType, oPresentationControlHandler) {
|
|
22
23
|
var oCardInfo, sCardTitle, sAppTitle,
|
|
23
|
-
|
|
24
|
+
sViewId = oController.getView().getId();
|
|
24
25
|
var oComponent = oController.getOwnerComponent();
|
|
25
26
|
var oAppComponent = oComponent.getAppComponent();
|
|
27
|
+
var sAppId = oAppComponent.getManifestEntry("sap.app").id;
|
|
26
28
|
var iViewLevel = oTemplatePrivateModel.getProperty("/generic/viewLevel");
|
|
27
29
|
oPresentationControlHandler = oPresentationControlHandler || oState.oPresentationControlHandler; // In case of LR the oState already has the oPresentationControlHandler
|
|
30
|
+
var oMetaModel = oComponent.getModel().getMetaModel();
|
|
31
|
+
var sEntitySet = oComponent.getEntitySet();
|
|
28
32
|
|
|
29
33
|
sAppTitle = oAppComponent.getManifestEntry("sap.app").title;
|
|
30
34
|
if (oPresentationControlHandler) {
|
|
31
|
-
var
|
|
32
|
-
var oMetaModel = oComponent.getModel().getMetaModel();
|
|
35
|
+
var oHeaderInfo;
|
|
33
36
|
if (oPresentationControlHandler.getEntitySet) { // getEntitySet is empty in case of multiview scenario.
|
|
34
37
|
sEntitySet = oPresentationControlHandler.getEntitySet();
|
|
35
|
-
} else {
|
|
36
|
-
sEntitySet = oComponent.getEntitySet();
|
|
37
38
|
}
|
|
38
39
|
var oEntitySet = oMetaModel.getODataEntitySet(sEntitySet);
|
|
39
40
|
var oEntityType = oMetaModel.getODataEntityType(oEntitySet.entityType);
|
|
@@ -51,18 +52,45 @@ sap.ui.define([
|
|
|
51
52
|
}
|
|
52
53
|
},
|
|
53
54
|
"sap.insights" : {
|
|
54
|
-
"parentAppId" :
|
|
55
|
+
"parentAppId" : sAppId
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
58
|
};
|
|
58
59
|
|
|
59
|
-
//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.
|
|
60
|
-
var
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
// 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 = Object.create(null);
|
|
62
|
+
|
|
63
|
+
var fnGetCardInfoPromise = new Promise(function (fnResolve) {
|
|
64
|
+
if (sType === InsightsCardHelper.CardTypes.DT_CARD) {
|
|
65
|
+
oState.oDTCardHelper.getCardManifest(DTCardHelper.CardTypes.INTEGRATION)
|
|
66
|
+
.then(function (oCardManifest) {
|
|
67
|
+
if (!oCardManifest) {
|
|
68
|
+
fnResolve(null);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
oCardInfo.descriptorContent = merge(
|
|
72
|
+
oCardManifest,
|
|
73
|
+
oCardInfo.descriptorContent
|
|
74
|
+
);
|
|
75
|
+
fnResolve(oCardInfo);
|
|
76
|
+
})
|
|
77
|
+
.catch(function (oError) {
|
|
78
|
+
fnResolve(null);
|
|
79
|
+
});
|
|
80
|
+
} else {
|
|
81
|
+
fnResolve(oCardInfo);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
return fnGetCardInfoPromise.then(function (oCardInfo) {
|
|
85
|
+
if (oCardInfo) {
|
|
86
|
+
extend(oShareCardInfo, oCardInfo);
|
|
87
|
+
oShareCardInfo.cardType = sType;
|
|
88
|
+
oShareCardInfo.viewId = sViewId;
|
|
89
|
+
oTemplatePrivateGlobalModel.setProperty("/generic/insights/shareCards/" + iViewLevel, [oShareCardInfo]);
|
|
90
|
+
}
|
|
91
|
+
return oCardInfo ? [oCardInfo] : [];
|
|
92
|
+
});
|
|
93
|
+
|
|
66
94
|
}
|
|
67
95
|
|
|
68
96
|
function isCardCreationAllowed(oState) {
|
|
@@ -78,7 +106,7 @@ sap.ui.define([
|
|
|
78
106
|
var oMetaModel = oState.oPresentationControlHandler.getModel().getMetaModel();
|
|
79
107
|
return oState.oPresentationControlHandler.getVisibleProperties().some(function (oColumn) {
|
|
80
108
|
var oProperty = oMetaModel.getODataProperty(oEntityType, oColumn.data("p13nData").leadingProperty);
|
|
81
|
-
if (oTemplateUtils.oCommonUtils.isSupportedColumn(oColumn, oProperty) &&
|
|
109
|
+
if (oTemplateUtils.oCommonUtils.isSupportedColumn(oColumn, oProperty, oState.oPresentationControlHandler.getControl()) &&
|
|
82
110
|
(oProperty && (oProperty["sap:label"] || oProperty['com.sap.vocabularies.Common.v1.Label']) && oColumn.getVisible())) {
|
|
83
111
|
return true;
|
|
84
112
|
}
|
|
@@ -110,6 +138,15 @@ sap.ui.define([
|
|
|
110
138
|
var oComponent = oController.getOwnerComponent();
|
|
111
139
|
if (!oPresentationControlHandler && oCard.cardType === InsightsCardHelper.CardTypes.ANALYTICAL) { // For ALP use the Chart presentationControlHandler
|
|
112
140
|
oPresentationControlHandler = oTemplateUtils.oServices.oPresentationControlHandlerFactory.getPresentationControlHandler(oState.oSmartChart);
|
|
141
|
+
} else if (oCard.cardType === InsightsCardHelper.CardTypes.DT_CARD) {
|
|
142
|
+
var sEntitySet = oComponent.getEntitySet();
|
|
143
|
+
var oMetaModel = oComponent.getModel().getMetaModel();
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
var oInsightsCardProvider = oTemplateUtils.oServices.oInsightsFECardProvider.getCardProviderInsightsInstance();
|
|
147
|
+
oInsightsCardProvider.channel.publishCard(oInsightsCardProvider.id, oCard, mAdditionalProperties.consumerId);
|
|
148
|
+
return;
|
|
149
|
+
|
|
113
150
|
} else {
|
|
114
151
|
oPresentationControlHandler = oPresentationControlHandler || oState.oPresentationControlHandler;
|
|
115
152
|
}
|
|
@@ -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.124.1
|
|
3059
3059
|
* @since 1.30.0
|
|
3060
3060
|
* @alias sap.suite.ui.generic.template.lib.NavigationController
|
|
3061
3061
|
*/
|