@sapui5/sap.suite.ui.commons 1.140.0 → 1.141.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.
Files changed (55) hide show
  1. package/package.json +1 -1
  2. package/src/sap/suite/ui/commons/.library +1 -1
  3. package/src/sap/suite/ui/commons/AriaProperties.js +1 -1
  4. package/src/sap/suite/ui/commons/CalculationBuilder.js +13 -2
  5. package/src/sap/suite/ui/commons/CalculationBuilderExpression.js +1 -1
  6. package/src/sap/suite/ui/commons/CalculationBuilderFunction.js +1 -1
  7. package/src/sap/suite/ui/commons/CalculationBuilderGroup.js +1 -1
  8. package/src/sap/suite/ui/commons/CalculationBuilderItem.js +1 -1
  9. package/src/sap/suite/ui/commons/CalculationBuilderValidationResult.js +1 -1
  10. package/src/sap/suite/ui/commons/CalculationBuilderVariable.js +1 -1
  11. package/src/sap/suite/ui/commons/CloudFilePicker.js +1 -1
  12. package/src/sap/suite/ui/commons/MicroProcessFlow.js +1 -1
  13. package/src/sap/suite/ui/commons/MicroProcessFlowItem.js +1 -1
  14. package/src/sap/suite/ui/commons/TimelineRenderManager.js +25 -13
  15. package/src/sap/suite/ui/commons/collaboration/BaseHelperService.js +12 -12
  16. package/src/sap/suite/ui/commons/collaboration/CollaborationCardHelper.js +6 -5
  17. package/src/sap/suite/ui/commons/collaboration/CollaborationContactInfoHelper.js +15 -15
  18. package/src/sap/suite/ui/commons/collaboration/CollaborationHelper.js +94 -76
  19. package/src/sap/suite/ui/commons/collaboration/CollaborationManagerService.js +41 -41
  20. package/src/sap/suite/ui/commons/collaboration/ContactHelper.js +288 -286
  21. package/src/sap/suite/ui/commons/collaboration/ServiceContainer.js +33 -33
  22. package/src/sap/suite/ui/commons/collaboration/TeamsHelperService.js +296 -149
  23. package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component-preload.js +2 -2
  24. package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component.js +11 -13
  25. package/src/sap/suite/ui/commons/flexibility/changeHandler/PropertyChangeMapper.js +1 -1
  26. package/src/sap/suite/ui/commons/imageeditor/CropCustomShapeHistoryItem.js +1 -1
  27. package/src/sap/suite/ui/commons/imageeditor/CropEllipseHistoryItem.js +1 -1
  28. package/src/sap/suite/ui/commons/imageeditor/CropRectangleHistoryItem.js +1 -1
  29. package/src/sap/suite/ui/commons/imageeditor/CustomSizeItem.js +1 -1
  30. package/src/sap/suite/ui/commons/imageeditor/FilterHistoryItem.js +1 -1
  31. package/src/sap/suite/ui/commons/imageeditor/FlipHistoryItem.js +1 -1
  32. package/src/sap/suite/ui/commons/imageeditor/HistoryItem.js +1 -1
  33. package/src/sap/suite/ui/commons/imageeditor/ImageEditor.js +1 -1
  34. package/src/sap/suite/ui/commons/imageeditor/ImageEditorContainer.js +1 -1
  35. package/src/sap/suite/ui/commons/imageeditor/ImageEditorResponsiveContainer.js +1 -1
  36. package/src/sap/suite/ui/commons/imageeditor/ResizeHistoryItem.js +1 -1
  37. package/src/sap/suite/ui/commons/imageeditor/RotateHistoryItem.js +1 -1
  38. package/src/sap/suite/ui/commons/library.js +1 -1
  39. package/src/sap/suite/ui/commons/statusindicator/Circle.js +1 -1
  40. package/src/sap/suite/ui/commons/statusindicator/CustomShape.js +1 -1
  41. package/src/sap/suite/ui/commons/statusindicator/DiscreteThreshold.js +1 -1
  42. package/src/sap/suite/ui/commons/statusindicator/FillingOption.js +1 -1
  43. package/src/sap/suite/ui/commons/statusindicator/LibraryShape.js +1 -1
  44. package/src/sap/suite/ui/commons/statusindicator/Path.js +1 -1
  45. package/src/sap/suite/ui/commons/statusindicator/PropertyThreshold.js +1 -1
  46. package/src/sap/suite/ui/commons/statusindicator/Rectangle.js +1 -1
  47. package/src/sap/suite/ui/commons/statusindicator/Shape.js +1 -1
  48. package/src/sap/suite/ui/commons/statusindicator/ShapeGroup.js +1 -1
  49. package/src/sap/suite/ui/commons/statusindicator/SimpleShape.js +1 -1
  50. package/src/sap/suite/ui/commons/statusindicator/StatusIndicator.js +1 -1
  51. package/src/sap/suite/ui/commons/taccount/TAccount.js +1 -1
  52. package/src/sap/suite/ui/commons/taccount/TAccountGroup.js +1 -1
  53. package/src/sap/suite/ui/commons/taccount/TAccountItem.js +1 -1
  54. package/src/sap/suite/ui/commons/taccount/TAccountItemProperty.js +1 -1
  55. package/src/sap/suite/ui/commons/taccount/TAccountPanel.js +1 -1
@@ -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 (Controller, Fragment, JSONModel, mLibrary, Library, Core, ResourceModel, CollaborationContactInfoHelper, FESRHelper, Element) {
24
- "use strict";
23
+ ], function(Controller, Fragment, JSONModel, mLibrary, Library, Core, ResourceModel, CollaborationContactInfoHelper, FESRHelper, Element) {
24
+ "use strict";
25
25
 
26
- var I18_BUNDLE = Library.getResourceBundleFor("sap.suite.ui.commons");
26
+ var I18_BUNDLE = Library.getResourceBundleFor("sap.suite.ui.commons");
27
27
 
28
- return Controller.extend("sap.suite.ui.commons.collaboration.ContactHelper", {
29
- constructor: function () {
30
- },
28
+ return Controller.extend("sap.suite.ui.commons.collaboration.ContactHelper", {
29
+ constructor: function() { },
31
30
 
32
- /**
33
- * Fetch the Contact info, image and status from Teams via oData service.
34
- * @param {string} sEmail email of the contact
35
- * @private
36
- */
37
-
38
- getFullProfileByEmail: async function (sEmail) {;
39
- var oFullProfileData = await CollaborationContactInfoHelper.fetchContact(sEmail);
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
- getTeamsContactOptions: function () {
51
- var that = this;
52
- return Promise.resolve([
53
- {
54
- "key": "chat",
55
- "icon": "sap-icon://discussion",
56
- "tooltip": I18_BUNDLE.getText("CHAT_BUTTON_TOOLTIP"),
57
- "fesrStepName": "MST:ContactAction",
58
- "callBackHandler": function (oEvent) {
59
- that.handleMSTeamsPress(oEvent);
60
- }
61
- },
62
- {
63
- "key": "call",
64
- "icon": "sap-icon://call",
65
- "tooltip": I18_BUNDLE.getText("CALL_BUTTON_TOOLTIP"),
66
- "fesrStepName": "MST:ContactAction",
67
- "callBackHandler": function (oEvent) {
68
- that.handleMSTeamsPress(oEvent);
69
- }
70
- },
71
- {
72
- "key": "videoCall",
73
- "icon": "sap-icon://video",
74
- "tooltip": I18_BUNDLE.getText("VIDEOCALL_BUTTON_TOOLTIP"),
75
- "fesrStepName": "MST:ContactAction",
76
- "callBackHandler": function (oEvent) {
77
- that.handleMSTeamsPress(oEvent);
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
- mLibrary.URLHelper.redirect(url, true);
121
- },
78
+ ]);
79
+ },
122
80
 
123
- formatUri: function (sValue, oParams) {
124
- var mailregex = /^\w+[\w-+\.]*\@\w+([-\.]\w+)*\.[a-zA-Z]{2,}$/;
125
- if (mailregex.test(sValue)) {
126
- return "mailto:" + sValue + (oParams && oParams.subject ? ("?subject=" + oParams.subject) : '') + (oParams && oParams.body ? ("&body=" + oParams.body) : '');
127
- } else {
128
- return "tel:" + sValue;
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
- loadContactPopover: function (sEmail, oParams, isDirectCommunicationEnabled) {
133
- this.afterClose() // Make sure, previously opened popup is closed if any
134
- return Fragment.load({
135
- name: "sap.suite.ui.commons.collaboration.ContactPopover",
136
- controller: this,
137
- type: "XML"
138
- }).then(function (oPopover) {
139
- FESRHelper.setSemanticStepname(oPopover, "afterClose", "MST:ContactDetails");
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
- loadMinimalContactPopover: function (sEmail, oParams) {
160
- // oParams contains subject and body of the email
161
- this.afterClose() // Make sure, previously opened popup is closed if any
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
- "mail": sEmail,
164
- "params": oParams
154
+ "isUserExistsInTeams": true
165
155
  });
166
- return Fragment.load({
167
- name: "sap.suite.ui.commons.collaboration.MinimalContactPopover",
168
- controller: this,
169
- type: "XML"
170
- }).then(function (oPopover) {
171
- this._oMinContactPopover = oPopover;
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
- afterClose: function() {
180
- if (this._oContactPopover) {
181
- this._oContactPopover.destroy();
182
- }
183
- if (this._oMinContactPopover) {
184
- this._oMinContactPopover.destroy();
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
- afterOpen: function() {
189
- var that = this;
190
- this.getFullProfileByEmail(this.sEmail).then(function (data) {
191
- that._oContactPopover.setBusy(false);
192
- if (data && data.mail === "") {
193
- data.isUserExistsInTeams = false;
194
- data.mail = that.sEmail;
195
- data.params = that.oParams;
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
- afterContinue: function () {
210
- var sUrl = this.formatUri(this.sEmail, this.oParams);
211
- mLibrary.URLHelper.redirect(sUrl, true);
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
- * Provide avatar and badge proprty based on Contact status
216
- * @param {string} oFullProfileData full information on the contact
217
- * @private
218
- */
213
+ afterContinue: function() {
214
+ var sUrl = this.formatUri(this.sEmail, this.oParams);
215
+ mLibrary.URLHelper.redirect(sUrl, true);
216
+ },
219
217
 
220
- determineContactStatus: function(oFullProfileData) {
221
- const mBadgeInfo = new Map([
222
- [
223
- "OOO",
224
- {
225
- badgeValueState: "Information",
226
- badgeIcon: "sap-icon://offsite-work",
227
- },
228
- ],
229
- [
230
- "BUSYOOO",
231
- {
232
- badgeValueState: "Error",
233
- badgeIcon: "sap-icon://circle-task",
234
- },
235
- ],
236
- [
237
- "ONLINEOOO",
238
- {
239
- badgeValueState: "Success",
240
- badgeIcon: "sap-icon://sys-enter",
241
- },
242
- ],
243
- [
244
- "AVAILABLE",
245
- {
246
- badgeValueState: "Success",
247
- badgeIcon: "sap-icon://sys-enter-2",
248
- },
249
- ],
250
- [
251
- "AWAY",
252
- {
253
- badgeValueState: "Warning",
254
- badgeIcon: "sap-icon://pending",
255
- },
256
- ],
257
- [
258
- "BUSY",
259
- {
260
- badgeValueState: "Error",
261
- badgeIcon: "sap-icon://circle-task-2",
262
- },
263
- ],
264
- [
265
- "PRESENTING",
266
- {
267
- badgeValueState: "Error",
268
- badgeIcon: "sap-icon://sys-minus",
269
- },
270
- ],
271
- [
272
- "OFFLINE",
273
- {
274
- badgeValueState: "Error",
275
- badgeIcon: "sap-icon://message-error",
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
- const mUserPresence = new Map([
281
- ["Available", "AVAILABLE"],
282
- ["Away", "AWAY"],
283
- ["Inactive", "AWAY"],
284
- ["Busy", "BUSY"],
285
- ["DoNotDisturb", "PRESENTING"],
286
- ["InACall", "BUSY"],
287
- ["InAMeeting", "BUSY"],
288
- ["Presenting", "PRESENTING"],
289
- ["BeRightBack", "AWAY"],
290
- ["OffWork", "OFFLINE"],
291
- ["Offline", "OFFLINE"]
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
- let oBadgeInfo = {};
298
+ let oBadgeInfo = {};
295
299
 
296
- if (!!oFullProfileData.isoutofoffice) {
297
- if (oFullProfileData.activity === "Available") {
298
- oBadgeInfo = mBadgeInfo.get("ONLINEOOO");
299
- oBadgeInfo.badgeTooltip = `${I18_BUNDLE.getText(
300
- "AVAILABLE"
301
- )}, ${I18_BUNDLE.getText("OOO")}`;
302
- } else if (oFullProfileData.activity === "Busy") {
303
- oBadgeInfo = mBadgeInfo.get("BUSYOOO");
304
- oBadgeInfo.badgeTooltip = `${I18_BUNDLE.getText(
305
- "BUSY"
306
- )}, ${I18_BUNDLE.getText("OOO")}`;
307
- } else if (oFullProfileData.activity === "DoNotDisturb") {
308
- oBadgeInfo = mBadgeInfo.get("PRESENTING");
309
- oBadgeInfo.badgeTooltip = `${I18_BUNDLE.getText(
310
- "DONOTDISTURB"
311
- )}, ${I18_BUNDLE.getText("OOO")}`;
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
- const sUserPresence = oFullProfileData.activity
318
- ? mUserPresence.get(oFullProfileData.activity)
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
- Object.assign(oFullProfileData, oBadgeInfo);
327
- return oFullProfileData;
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
+ });