@sapui5/sap.suite.ui.commons 1.140.0 → 1.142.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/commons/.library +1 -1
- package/src/sap/suite/ui/commons/AriaProperties.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilder.js +13 -2
- package/src/sap/suite/ui/commons/CalculationBuilderExpression.js +11 -7
- package/src/sap/suite/ui/commons/CalculationBuilderFunction.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderGroup.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderItem.js +12 -6
- package/src/sap/suite/ui/commons/CalculationBuilderValidationResult.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderVariable.js +1 -1
- package/src/sap/suite/ui/commons/CloudFilePicker.js +21 -21
- package/src/sap/suite/ui/commons/MicroProcessFlow.js +2 -2
- package/src/sap/suite/ui/commons/MicroProcessFlowItem.js +7 -9
- package/src/sap/suite/ui/commons/Timeline.js +22 -24
- package/src/sap/suite/ui/commons/TimelineItemRenderer.js +12 -2
- package/src/sap/suite/ui/commons/TimelineRenderManager.js +25 -13
- package/src/sap/suite/ui/commons/collaboration/BaseHelperService.js +12 -12
- package/src/sap/suite/ui/commons/collaboration/CollaborationCardHelper.js +6 -5
- package/src/sap/suite/ui/commons/collaboration/CollaborationContactInfoHelper.js +15 -15
- package/src/sap/suite/ui/commons/collaboration/CollaborationHelper.js +94 -76
- package/src/sap/suite/ui/commons/collaboration/CollaborationManagerService.js +41 -41
- package/src/sap/suite/ui/commons/collaboration/ContactHelper.js +288 -286
- package/src/sap/suite/ui/commons/collaboration/ServiceContainer.js +33 -33
- package/src/sap/suite/ui/commons/collaboration/TeamsHelperService.js +446 -150
- package/src/sap/suite/ui/commons/collaboration/UniversalCollaborationBar.js +366 -0
- package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component-preload.js +6 -3
- package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component.js +11 -13
- package/src/sap/suite/ui/commons/flexibility/changeHandler/PropertyChangeMapper.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CropCustomShapeHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CropEllipseHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CropRectangleHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CustomSizeItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/FilterHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/FlipHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/HistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ImageEditor.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ImageEditorContainer.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ImageEditorResponsiveContainer.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ResizeHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/RotateHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/library.js +1 -1
- package/src/sap/suite/ui/commons/messagebundle.properties +16 -1
- package/src/sap/suite/ui/commons/messagebundle_en.properties +3 -0
- package/src/sap/suite/ui/commons/networkgraph/Graph.js +105 -5
- package/src/sap/suite/ui/commons/networkgraph/Node.js +33 -11
- package/src/sap/suite/ui/commons/networkgraph/util/DragDropManager.js +197 -0
- package/src/sap/suite/ui/commons/statusindicator/Circle.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/CustomShape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/DiscreteThreshold.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/FillingOption.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/LibraryShape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/Path.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/PropertyThreshold.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/Rectangle.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/Shape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/ShapeGroup.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/SimpleShape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/StatusIndicator.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccount.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountGroup.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountItem.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountItemProperty.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountPanel.js +1 -1
- package/src/sap/suite/ui/commons/themes/base/CollaborationPopover.less +29 -1
- package/src/sap/suite/ui/commons/themes/base/NetworkGraph.less +5 -0
|
@@ -20,313 +20,315 @@ sap.ui.define([
|
|
|
20
20
|
"./CollaborationContactInfoHelper",
|
|
21
21
|
"sap/ui/performance/trace/FESRHelper",
|
|
22
22
|
"sap/ui/core/Element"
|
|
23
|
-
], function
|
|
24
|
-
|
|
23
|
+
], function(Controller, Fragment, JSONModel, mLibrary, Library, Core, ResourceModel, CollaborationContactInfoHelper, FESRHelper, Element) {
|
|
24
|
+
"use strict";
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
var I18_BUNDLE = Library.getResourceBundleFor("sap.suite.ui.commons");
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
28
|
+
return Controller.extend("sap.suite.ui.commons.collaboration.ContactHelper", {
|
|
29
|
+
constructor: function() { },
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (oFullProfileData && oFullProfileData.mail === "") {
|
|
41
|
-
return oFullProfileData;
|
|
42
|
-
}
|
|
43
|
-
if (oFullProfileData && oFullProfileData.data != "") {
|
|
44
|
-
oFullProfileData.photo = "data:image/png;base64," + oFullProfileData.data;
|
|
45
|
-
}
|
|
46
|
-
oFullProfileData = this.determineContactStatus(oFullProfileData);
|
|
31
|
+
/**
|
|
32
|
+
* Fetch the Contact info, image and status from Teams via oData service.
|
|
33
|
+
* @param {string} sEmail email of the contact
|
|
34
|
+
* @private
|
|
35
|
+
*/
|
|
36
|
+
getFullProfileByEmail: async function(sEmail) {
|
|
37
|
+
var oFullProfileData = await CollaborationContactInfoHelper.fetchContact(sEmail);
|
|
38
|
+
if (oFullProfileData && oFullProfileData.mail === "") {
|
|
47
39
|
return oFullProfileData;
|
|
48
|
-
}
|
|
40
|
+
}
|
|
41
|
+
if (oFullProfileData && oFullProfileData.data != "") {
|
|
42
|
+
oFullProfileData.photo = "data:image/png;base64," + oFullProfileData.data;
|
|
43
|
+
}
|
|
44
|
+
oFullProfileData = this.determineContactStatus(oFullProfileData);
|
|
45
|
+
return oFullProfileData;
|
|
46
|
+
},
|
|
49
47
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
48
|
+
getTeamsContactOptions: function() {
|
|
49
|
+
var that = this;
|
|
50
|
+
return Promise.resolve([
|
|
51
|
+
{
|
|
52
|
+
"key": "chat",
|
|
53
|
+
"icon": "sap-icon://discussion",
|
|
54
|
+
"tooltip": I18_BUNDLE.getText("CHAT_BUTTON_TOOLTIP"),
|
|
55
|
+
"fesrStepName": "MST:ContactAction",
|
|
56
|
+
"callBackHandler": function(oEvent) {
|
|
57
|
+
that.handleMSTeamsPress(oEvent);
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"key": "call",
|
|
62
|
+
"icon": "sap-icon://call",
|
|
63
|
+
"tooltip": I18_BUNDLE.getText("CALL_BUTTON_TOOLTIP"),
|
|
64
|
+
"fesrStepName": "MST:ContactAction",
|
|
65
|
+
"callBackHandler": function(oEvent) {
|
|
66
|
+
that.handleMSTeamsPress(oEvent);
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"key": "videoCall",
|
|
71
|
+
"icon": "sap-icon://video",
|
|
72
|
+
"tooltip": I18_BUNDLE.getText("VIDEOCALL_BUTTON_TOOLTIP"),
|
|
73
|
+
"fesrStepName": "MST:ContactAction",
|
|
74
|
+
"callBackHandler": function(oEvent) {
|
|
75
|
+
that.handleMSTeamsPress(oEvent);
|
|
79
76
|
}
|
|
80
|
-
]);
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Provide the Contact status from Teams via oData service.
|
|
85
|
-
* @param {string} sEmail email of the contact
|
|
86
|
-
* @public
|
|
87
|
-
*/
|
|
88
|
-
|
|
89
|
-
getTeamsContactStatus: async function (sEmail) {
|
|
90
|
-
var oFullProfileData = await CollaborationContactInfoHelper.fetchContact(sEmail);
|
|
91
|
-
oFullProfileData.calendar = await CollaborationContactInfoHelper.fetchContactCalendar(sEmail);
|
|
92
|
-
oFullProfileData = this.determineContactStatus(oFullProfileData);
|
|
93
|
-
return [{
|
|
94
|
-
"key": "profileStatus",
|
|
95
|
-
"badgeIcon": oFullProfileData.badgeIcon,
|
|
96
|
-
"badgeValueState": oFullProfileData.badgeValueState,
|
|
97
|
-
"badgeTooltip": oFullProfileData.badgeTooltip,
|
|
98
|
-
"fesrStepName": "MST:ContactAction",
|
|
99
|
-
"calendar": oFullProfileData.calendar
|
|
100
|
-
}]
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
handleMSTeamsPress: function (oEvent) {
|
|
104
|
-
var sEmail = oEvent.getSource().data("email");
|
|
105
|
-
var sType = oEvent.getSource().data("type");
|
|
106
|
-
var url = "";
|
|
107
|
-
switch (sType) {
|
|
108
|
-
case "chat":
|
|
109
|
-
url = "https://teams.microsoft.com/l/chat/0/0?users=" + sEmail;
|
|
110
|
-
break;
|
|
111
|
-
case "call":
|
|
112
|
-
url = "https://teams.microsoft.com/l/call/0/0?users=" + sEmail;
|
|
113
|
-
break;
|
|
114
|
-
case "videoCall":
|
|
115
|
-
url = "https://teams.microsoft.com/l/call/0/0?users=" + sEmail + "&withVideo=true";
|
|
116
|
-
break;
|
|
117
|
-
default:
|
|
118
|
-
break;
|
|
119
77
|
}
|
|
120
|
-
|
|
121
|
-
|
|
78
|
+
]);
|
|
79
|
+
},
|
|
122
80
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
81
|
+
/**
|
|
82
|
+
* Provide the Contact status from Teams via oData service.
|
|
83
|
+
* @param {string} sEmail email of the contact
|
|
84
|
+
* @public
|
|
85
|
+
*/
|
|
86
|
+
getTeamsContactStatus: async function(sEmail) {
|
|
87
|
+
let profile = { calendar: [] };
|
|
88
|
+
if (sEmail) {
|
|
89
|
+
const resp = await Promise.all([
|
|
90
|
+
CollaborationContactInfoHelper.fetchContact(sEmail),
|
|
91
|
+
CollaborationContactInfoHelper.fetchContactCalendar(sEmail)
|
|
92
|
+
]);
|
|
93
|
+
profile = resp[0];
|
|
94
|
+
profile.calendar = resp[1];
|
|
95
|
+
}
|
|
96
|
+
const oFullProfileData = this.determineContactStatus(profile);
|
|
97
|
+
return [{
|
|
98
|
+
"key": "profileStatus",
|
|
99
|
+
"badgeIcon": oFullProfileData.badgeIcon,
|
|
100
|
+
"badgeValueState": oFullProfileData.badgeValueState,
|
|
101
|
+
"badgeTooltip": oFullProfileData.badgeTooltip,
|
|
102
|
+
"fesrStepName": "MST:ContactAction",
|
|
103
|
+
"calendar": oFullProfileData.calendar
|
|
104
|
+
}];
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
handleMSTeamsPress: function(oEvent) {
|
|
108
|
+
var sEmail = oEvent.getSource().data("email");
|
|
109
|
+
var sType = oEvent.getSource().data("type");
|
|
110
|
+
var url = "";
|
|
111
|
+
switch (sType) {
|
|
112
|
+
case "chat":
|
|
113
|
+
url = "https://teams.microsoft.com/l/chat/0/0?users=" + sEmail;
|
|
114
|
+
break;
|
|
115
|
+
case "call":
|
|
116
|
+
url = "https://teams.microsoft.com/l/call/0/0?users=" + sEmail;
|
|
117
|
+
break;
|
|
118
|
+
case "videoCall":
|
|
119
|
+
url = "https://teams.microsoft.com/l/call/0/0?users=" + sEmail + "&withVideo=true";
|
|
120
|
+
break;
|
|
121
|
+
default:
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
mLibrary.URLHelper.redirect(url, true);
|
|
125
|
+
},
|
|
131
126
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
this._oContactPopover = oPopover;
|
|
141
|
-
this.sEmail = sEmail;
|
|
142
|
-
this.oParams = oParams;
|
|
143
|
-
oPopover.setBusy(true);
|
|
144
|
-
var oTntSet = {
|
|
145
|
-
setFamily: "tnt",
|
|
146
|
-
setURI: sap.ui.require.toUrl("sap/tnt/themes/base/illustrations")
|
|
147
|
-
};
|
|
148
|
-
sap.m.IllustrationPool.registerIllustrationSet(oTntSet, false);
|
|
149
|
-
var oJsonModel = new JSONModel({
|
|
150
|
-
"isUserExistsInTeams": true
|
|
151
|
-
});
|
|
152
|
-
this._oContactPopover.setModel(oJsonModel, "userData");
|
|
153
|
-
this.isDirectCommunicationEnabled = isDirectCommunicationEnabled;
|
|
154
|
-
this._oContactPopover.setModel(new sap.ui.model.resource.ResourceModel({ bundle: I18_BUNDLE }), "i18n");
|
|
155
|
-
return oPopover;
|
|
156
|
-
}.bind(this));
|
|
157
|
-
},
|
|
127
|
+
formatUri: function(sValue, oParams) {
|
|
128
|
+
var mailregex = /^\w+[\w-+\.]*\@\w+([-\.]\w+)*\.[a-zA-Z]{2,}$/;
|
|
129
|
+
if (mailregex.test(sValue)) {
|
|
130
|
+
return "mailto:" + sValue + (oParams && oParams.subject ? ("?subject=" + oParams.subject) : '') + (oParams && oParams.body ? ("&body=" + oParams.body) : '');
|
|
131
|
+
} else {
|
|
132
|
+
return "tel:" + sValue;
|
|
133
|
+
}
|
|
134
|
+
},
|
|
158
135
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
136
|
+
loadContactPopover: function(sEmail, oParams, isDirectCommunicationEnabled) {
|
|
137
|
+
this.afterClose(); // Make sure, previously opened popup is closed if any
|
|
138
|
+
return Fragment.load({
|
|
139
|
+
name: "sap.suite.ui.commons.collaboration.ContactPopover",
|
|
140
|
+
controller: this,
|
|
141
|
+
type: "XML"
|
|
142
|
+
}).then(function(oPopover) {
|
|
143
|
+
FESRHelper.setSemanticStepname(oPopover, "afterClose", "MST:ContactDetails");
|
|
144
|
+
this._oContactPopover = oPopover;
|
|
145
|
+
this.sEmail = sEmail;
|
|
146
|
+
this.oParams = oParams;
|
|
147
|
+
oPopover.setBusy(true);
|
|
148
|
+
var oTntSet = {
|
|
149
|
+
setFamily: "tnt",
|
|
150
|
+
setURI: sap.ui.require.toUrl("sap/tnt/themes/base/illustrations")
|
|
151
|
+
};
|
|
152
|
+
sap.m.IllustrationPool.registerIllustrationSet(oTntSet, false);
|
|
162
153
|
var oJsonModel = new JSONModel({
|
|
163
|
-
"
|
|
164
|
-
"params": oParams
|
|
154
|
+
"isUserExistsInTeams": true
|
|
165
155
|
});
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
FESRHelper.setSemanticStepname(oPopover, "afterClose", "MST:ContactDetails");
|
|
173
|
-
oPopover.setModel(oJsonModel, "userData");
|
|
174
|
-
oPopover.setModel(new sap.ui.model.resource.ResourceModel({ bundle: I18_BUNDLE }), "i18n");
|
|
175
|
-
return oPopover;
|
|
176
|
-
}.bind(this));
|
|
177
|
-
},
|
|
156
|
+
this._oContactPopover.setModel(oJsonModel, "userData");
|
|
157
|
+
this.isDirectCommunicationEnabled = isDirectCommunicationEnabled;
|
|
158
|
+
this._oContactPopover.setModel(new sap.ui.model.resource.ResourceModel({ bundle: I18_BUNDLE }), "i18n");
|
|
159
|
+
return oPopover;
|
|
160
|
+
}.bind(this));
|
|
161
|
+
},
|
|
178
162
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
163
|
+
loadMinimalContactPopover: function(sEmail, oParams) {
|
|
164
|
+
// oParams contains subject and body of the email
|
|
165
|
+
this.afterClose(); // Make sure, previously opened popup is closed if any
|
|
166
|
+
var oJsonModel = new JSONModel({
|
|
167
|
+
"mail": sEmail,
|
|
168
|
+
"params": oParams
|
|
169
|
+
});
|
|
170
|
+
return Fragment.load({
|
|
171
|
+
name: "sap.suite.ui.commons.collaboration.MinimalContactPopover",
|
|
172
|
+
controller: this,
|
|
173
|
+
type: "XML"
|
|
174
|
+
}).then(function(oPopover) {
|
|
175
|
+
this._oMinContactPopover = oPopover;
|
|
176
|
+
FESRHelper.setSemanticStepname(oPopover, "afterClose", "MST:ContactDetails");
|
|
177
|
+
oPopover.setModel(oJsonModel, "userData");
|
|
178
|
+
oPopover.setModel(new sap.ui.model.resource.ResourceModel({ bundle: I18_BUNDLE }), "i18n");
|
|
179
|
+
return oPopover;
|
|
180
|
+
}.bind(this));
|
|
181
|
+
},
|
|
187
182
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
this.
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
that._oContactPopover.setInitialFocus(Element.getElementById("mail"));
|
|
197
|
-
} else {
|
|
198
|
-
data.isUserExistsInTeams = true;
|
|
199
|
-
data.isDirectCommunicationEnabled = !!that.isDirectCommunicationEnabled;
|
|
200
|
-
that._oContactPopover.setInitialFocus(Element.getElementById("avatar"));
|
|
201
|
-
}
|
|
202
|
-
var oJsonModel = new JSONModel(data);
|
|
203
|
-
oJsonModel.setData(data);
|
|
204
|
-
that._oContactPopover.setModel(oJsonModel, "userData");
|
|
205
|
-
FESRHelper.setSemanticStepname(that._oContactPopover, "afterClose", "MST:ContactDetails");
|
|
206
|
-
});
|
|
207
|
-
},
|
|
183
|
+
afterClose: function() {
|
|
184
|
+
if (this._oContactPopover) {
|
|
185
|
+
this._oContactPopover.destroy();
|
|
186
|
+
}
|
|
187
|
+
if (this._oMinContactPopover) {
|
|
188
|
+
this._oMinContactPopover.destroy();
|
|
189
|
+
}
|
|
190
|
+
},
|
|
208
191
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
192
|
+
afterOpen: function() {
|
|
193
|
+
var that = this;
|
|
194
|
+
this.getFullProfileByEmail(this.sEmail).then(function(data) {
|
|
195
|
+
that._oContactPopover.setBusy(false);
|
|
196
|
+
if (data && data.mail === "") {
|
|
197
|
+
data.isUserExistsInTeams = false;
|
|
198
|
+
data.mail = that.sEmail;
|
|
199
|
+
data.params = that.oParams;
|
|
200
|
+
that._oContactPopover.setInitialFocus(Element.getElementById("mail"));
|
|
201
|
+
} else {
|
|
202
|
+
data.isUserExistsInTeams = true;
|
|
203
|
+
data.isDirectCommunicationEnabled = !!that.isDirectCommunicationEnabled;
|
|
204
|
+
that._oContactPopover.setInitialFocus(Element.getElementById("avatar"));
|
|
205
|
+
}
|
|
206
|
+
var oJsonModel = new JSONModel(data);
|
|
207
|
+
oJsonModel.setData(data);
|
|
208
|
+
that._oContactPopover.setModel(oJsonModel, "userData");
|
|
209
|
+
FESRHelper.setSemanticStepname(that._oContactPopover, "afterClose", "MST:ContactDetails");
|
|
210
|
+
});
|
|
211
|
+
},
|
|
213
212
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
*/
|
|
213
|
+
afterContinue: function() {
|
|
214
|
+
var sUrl = this.formatUri(this.sEmail, this.oParams);
|
|
215
|
+
mLibrary.URLHelper.redirect(sUrl, true);
|
|
216
|
+
},
|
|
219
217
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
218
|
+
/**
|
|
219
|
+
* Provide avatar and badge proprty based on Contact status
|
|
220
|
+
* @param {string} oFullProfileData full information on the contact
|
|
221
|
+
* @returns {object} The contact data object with badge and status properties
|
|
222
|
+
* @private
|
|
223
|
+
*/
|
|
224
|
+
determineContactStatus: function(oFullProfileData) {
|
|
225
|
+
const mBadgeInfo = new Map([
|
|
226
|
+
[
|
|
227
|
+
"OOO",
|
|
228
|
+
{
|
|
229
|
+
badgeValueState: "Information",
|
|
230
|
+
badgeIcon: "sap-icon://offsite-work"
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
[
|
|
234
|
+
"BUSYOOO",
|
|
235
|
+
{
|
|
236
|
+
badgeValueState: "Error",
|
|
237
|
+
badgeIcon: "sap-icon://circle-task"
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
[
|
|
241
|
+
"ONLINEOOO",
|
|
242
|
+
{
|
|
243
|
+
badgeValueState: "Success",
|
|
244
|
+
badgeIcon: "sap-icon://sys-enter"
|
|
245
|
+
}
|
|
246
|
+
],
|
|
247
|
+
[
|
|
248
|
+
"AVAILABLE",
|
|
249
|
+
{
|
|
250
|
+
badgeValueState: "Success",
|
|
251
|
+
badgeIcon: "sap-icon://sys-enter-2"
|
|
252
|
+
}
|
|
253
|
+
],
|
|
254
|
+
[
|
|
255
|
+
"AWAY",
|
|
256
|
+
{
|
|
257
|
+
badgeValueState: "Warning",
|
|
258
|
+
badgeIcon: "sap-icon://pending"
|
|
259
|
+
}
|
|
260
|
+
],
|
|
261
|
+
[
|
|
262
|
+
"BUSY",
|
|
263
|
+
{
|
|
264
|
+
badgeValueState: "Error",
|
|
265
|
+
badgeIcon: "sap-icon://circle-task-2"
|
|
266
|
+
}
|
|
267
|
+
],
|
|
268
|
+
[
|
|
269
|
+
"PRESENTING",
|
|
270
|
+
{
|
|
271
|
+
badgeValueState: "Error",
|
|
272
|
+
badgeIcon: "sap-icon://sys-minus"
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
[
|
|
276
|
+
"OFFLINE",
|
|
277
|
+
{
|
|
278
|
+
badgeValueState: "Error",
|
|
279
|
+
badgeIcon: "sap-icon://message-error"
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
]);
|
|
279
283
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
284
|
+
const mUserPresence = new Map([
|
|
285
|
+
["Available", "AVAILABLE"],
|
|
286
|
+
["Away", "AWAY"],
|
|
287
|
+
["Inactive", "AWAY"],
|
|
288
|
+
["Busy", "BUSY"],
|
|
289
|
+
["DoNotDisturb", "PRESENTING"],
|
|
290
|
+
["InACall", "BUSY"],
|
|
291
|
+
["InAMeeting", "BUSY"],
|
|
292
|
+
["Presenting", "PRESENTING"],
|
|
293
|
+
["BeRightBack", "AWAY"],
|
|
294
|
+
["OffWork", "OFFLINE"],
|
|
295
|
+
["Offline", "OFFLINE"]
|
|
296
|
+
]);
|
|
293
297
|
|
|
294
|
-
|
|
298
|
+
let oBadgeInfo = {};
|
|
295
299
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
} else {
|
|
313
|
-
oBadgeInfo = mBadgeInfo.get("OOO");
|
|
314
|
-
oBadgeInfo.badgeTooltip = I18_BUNDLE.getText("OOO");
|
|
315
|
-
}
|
|
300
|
+
if (oFullProfileData.isoutofoffice) {
|
|
301
|
+
if (oFullProfileData.activity === "Available") {
|
|
302
|
+
oBadgeInfo = mBadgeInfo.get("ONLINEOOO");
|
|
303
|
+
oBadgeInfo.badgeTooltip = `${I18_BUNDLE.getText(
|
|
304
|
+
"AVAILABLE"
|
|
305
|
+
)}, ${I18_BUNDLE.getText("OOO")}`;
|
|
306
|
+
} else if (oFullProfileData.activity === "Busy") {
|
|
307
|
+
oBadgeInfo = mBadgeInfo.get("BUSYOOO");
|
|
308
|
+
oBadgeInfo.badgeTooltip = `${I18_BUNDLE.getText(
|
|
309
|
+
"BUSY"
|
|
310
|
+
)}, ${I18_BUNDLE.getText("OOO")}`;
|
|
311
|
+
} else if (oFullProfileData.activity === "DoNotDisturb") {
|
|
312
|
+
oBadgeInfo = mBadgeInfo.get("PRESENTING");
|
|
313
|
+
oBadgeInfo.badgeTooltip = `${I18_BUNDLE.getText(
|
|
314
|
+
"DONOTDISTURB"
|
|
315
|
+
)}, ${I18_BUNDLE.getText("OOO")}`;
|
|
316
316
|
} else {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
: "OFFLINE";
|
|
320
|
-
oBadgeInfo = mBadgeInfo.get(sUserPresence);
|
|
321
|
-
oBadgeInfo.badgeTooltip = I18_BUNDLE.getText(
|
|
322
|
-
oFullProfileData.activity.toUpperCase()
|
|
323
|
-
);
|
|
317
|
+
oBadgeInfo = mBadgeInfo.get("OOO");
|
|
318
|
+
oBadgeInfo.badgeTooltip = I18_BUNDLE.getText("OOO");
|
|
324
319
|
}
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
320
|
+
} else {
|
|
321
|
+
const sUserPresence = oFullProfileData.activity
|
|
322
|
+
? mUserPresence.get(oFullProfileData.activity)
|
|
323
|
+
: "OFFLINE";
|
|
324
|
+
oBadgeInfo = mBadgeInfo.get(sUserPresence);
|
|
325
|
+
oBadgeInfo.badgeTooltip = I18_BUNDLE.getText(
|
|
326
|
+
oFullProfileData.activity.toUpperCase()
|
|
327
|
+
);
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
330
|
+
Object.assign(oFullProfileData, oBadgeInfo);
|
|
331
|
+
return oFullProfileData;
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
});
|