@sapui5/sap.suite.ui.commons 1.148.0 → 1.150.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 +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderExpression.js +1 -1
- 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 +1 -1
- 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/ChartContainer.js +35 -3
- package/src/sap/suite/ui/commons/CloudFilePicker.js +1 -1
- package/src/sap/suite/ui/commons/MicroProcessFlow.js +1 -1
- package/src/sap/suite/ui/commons/MicroProcessFlowItem.js +1 -1
- package/src/sap/suite/ui/commons/Timeline.js +6 -0
- package/src/sap/suite/ui/commons/TimelineItem.js +11 -2
- package/src/sap/suite/ui/commons/TimelineRenderManager.js +8 -4
- package/src/sap/suite/ui/commons/collaboration/ContactHelper.js +78 -1
- package/src/sap/suite/ui/commons/collaboration/ContactPopover.fragment.xml +4 -1
- package/src/sap/suite/ui/commons/collaboration/TeamsHelperService.js +69 -2
- package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component-preload.js +2 -2
- 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 +4 -0
- package/src/sap/suite/ui/commons/messagebundle_ar.properties +3 -1
- package/src/sap/suite/ui/commons/messagebundle_bg.properties +3 -1
- package/src/sap/suite/ui/commons/messagebundle_ca.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_cnr.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_cs.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_cy.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_da.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_de.properties +8 -6
- package/src/sap/suite/ui/commons/messagebundle_el.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_en.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_en_GB.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_en_US_sappsd.properties +117 -30
- package/src/sap/suite/ui/commons/messagebundle_en_US_saprigi.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_es.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_es_MX.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_et.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_fi.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_fr.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_fr_CA.properties +4 -2
- package/src/sap/suite/ui/commons/messagebundle_hi.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_hr.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_hu.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_id.properties +3 -1
- package/src/sap/suite/ui/commons/messagebundle_it.properties +7 -5
- package/src/sap/suite/ui/commons/messagebundle_iw.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_ja.properties +3 -1
- package/src/sap/suite/ui/commons/messagebundle_kk.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_ko.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_lt.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_lv.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_mk.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_ms.properties +3 -1
- package/src/sap/suite/ui/commons/messagebundle_nl.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_no.properties +3 -1
- package/src/sap/suite/ui/commons/messagebundle_pl.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_pt.properties +3 -1
- package/src/sap/suite/ui/commons/messagebundle_pt_PT.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_ro.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_ru.properties +7 -5
- package/src/sap/suite/ui/commons/messagebundle_sh.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_sk.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_sl.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_sr.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_sv.properties +3 -1
- package/src/sap/suite/ui/commons/messagebundle_th.properties +3 -1
- package/src/sap/suite/ui/commons/messagebundle_tr.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_uk.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_vi.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_zh_CN.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_zh_TW.properties +2 -0
- package/src/sap/suite/ui/commons/networkgraph/ElementBase.js +1 -1
- package/src/sap/suite/ui/commons/networkgraph/Graph.js +31 -7
- package/src/sap/suite/ui/commons/networkgraph/Node.js +15 -3
- package/src/sap/suite/ui/commons/networkgraph/Tooltip.js +7 -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/MicroProcessFlow.less +4 -3
- package/src/sap/suite/ui/commons/themes/sap_fiori_3/MicroProcessFlow.less +4 -6
- package/src/sap/suite/ui/commons/themes/sap_fiori_3_dark/MicroProcessFlow.less +4 -6
- package/src/sap/suite/ui/commons/themes/sap_fiori_3_hcb/MicroProcessFlow.less +7 -0
- package/src/sap/suite/ui/commons/themes/sap_fiori_3_hcw/MicroProcessFlow.less +7 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon/MicroProcessFlow.less +7 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_dark/MicroProcessFlow.less +7 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcb/MicroProcessFlow.less +7 -0
- package/src/sap/suite/ui/commons/themes/sap_horizon_hcw/MicroProcessFlow.less +7 -0
package/package.json
CHANGED
|
@@ -34,11 +34,12 @@ sap.ui.define([
|
|
|
34
34
|
"sap/m/Popover",
|
|
35
35
|
"sap/m/Dialog",
|
|
36
36
|
"sap/m/ResponsivePopover",
|
|
37
|
-
'sap/m/SelectionDetails'
|
|
37
|
+
'sap/m/SelectionDetails',
|
|
38
|
+
'sap/ui/core/InvisibleText'
|
|
38
39
|
], function (jQuery, library, MobileLibrary, VizLibrary, ManagedObject, Button, OverflowToolbar, OverflowToolbarButton,
|
|
39
40
|
SegmentedButton, SegmentedButtonItem, Title, ToolbarSpacer, Device, Control, CustomData, ResizeHandler, ScrollEnablement, ToggleButton,
|
|
40
41
|
OverflowToolbarToggleButton, uid, Log, ChartContainerRenderer, FullScreenUtil, CoreLib, Element, Popover, Dialog,
|
|
41
|
-
ResponsivePopover, SelectionDetails) {
|
|
42
|
+
ResponsivePopover, SelectionDetails, InvisibleText) {
|
|
42
43
|
"use strict";
|
|
43
44
|
|
|
44
45
|
// shortcut for sap.m.ButtonType
|
|
@@ -147,7 +148,14 @@ sap.ui.define([
|
|
|
147
148
|
* </pre>
|
|
148
149
|
* @since 1.129.0
|
|
149
150
|
*/
|
|
150
|
-
enableBrowserFullScreen: {type: "boolean", group: "Misc", defaultValue: false}
|
|
151
|
+
enableBrowserFullScreen: {type: "boolean", group: "Misc", defaultValue: false},
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Defines the heading level of the chart title.
|
|
155
|
+
* The value is forwarded to the internal <code>sap.m.Title</code> control using its <code>level</code> property.
|
|
156
|
+
* @since 1.150.0
|
|
157
|
+
*/
|
|
158
|
+
titleLevel: {type: "sap.ui.core.TitleLevel", group: "Appearance", defaultValue: "Auto"}
|
|
151
159
|
},
|
|
152
160
|
defaultAggregation: "content",
|
|
153
161
|
aggregations: {
|
|
@@ -304,6 +312,7 @@ sap.ui.define([
|
|
|
304
312
|
//Left side...
|
|
305
313
|
//display title if no dimension selectors
|
|
306
314
|
this._oChartTitle = new Title();
|
|
315
|
+
this._oFullScreenButtonInvisibleText = new InvisibleText().toStatic();
|
|
307
316
|
};
|
|
308
317
|
|
|
309
318
|
ChartContainer.prototype.addDependent = function (oDependant) {
|
|
@@ -513,6 +522,10 @@ sap.ui.define([
|
|
|
513
522
|
this._oZoomOutButton.destroy();
|
|
514
523
|
this._oZoomOutButton = undefined;
|
|
515
524
|
}
|
|
525
|
+
if (this._oFullScreenButtonInvisibleText) {
|
|
526
|
+
this._oFullScreenButtonInvisibleText.destroy();
|
|
527
|
+
this._oFullScreenButtonInvisibleText = undefined;
|
|
528
|
+
}
|
|
516
529
|
};
|
|
517
530
|
|
|
518
531
|
/* =========================================================== */
|
|
@@ -1211,6 +1224,25 @@ sap.ui.define([
|
|
|
1211
1224
|
}
|
|
1212
1225
|
this._oChartTitle.setText(title);
|
|
1213
1226
|
this.setProperty("title", title, true);
|
|
1227
|
+
if (this._oFullScreenButtonInvisibleText) {
|
|
1228
|
+
if (title) {
|
|
1229
|
+
this._oFullScreenButtonInvisibleText.setText(title);
|
|
1230
|
+
if (this._oFullScreenButton.getAriaLabelledBy().indexOf(this._oFullScreenButtonInvisibleText.getId()) === -1) {
|
|
1231
|
+
this._oFullScreenButton.addAriaLabelledBy(this._oFullScreenButtonInvisibleText.getId());
|
|
1232
|
+
}
|
|
1233
|
+
} else {
|
|
1234
|
+
this._oFullScreenButton.removeAriaLabelledBy(this._oFullScreenButtonInvisibleText.getId());
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
return this;
|
|
1238
|
+
};
|
|
1239
|
+
|
|
1240
|
+
ChartContainer.prototype.setTitleLevel = function (titleLevel) {
|
|
1241
|
+
if (this.getTitleLevel() === titleLevel) {
|
|
1242
|
+
return this;
|
|
1243
|
+
}
|
|
1244
|
+
this._oChartTitle.setLevel(titleLevel);
|
|
1245
|
+
this.setProperty("titleLevel", titleLevel, true);
|
|
1214
1246
|
return this;
|
|
1215
1247
|
};
|
|
1216
1248
|
|
|
@@ -1659,6 +1659,12 @@ sap.ui.define([
|
|
|
1659
1659
|
// or nasty private variables manipulation.
|
|
1660
1660
|
this._objects.destroyObject("FilterContent");
|
|
1661
1661
|
this._setupFilterDialog();
|
|
1662
|
+
|
|
1663
|
+
// When enableModelFilter=false, recreateFilter() exits early (aPrevFilters is empty)
|
|
1664
|
+
// without calling invalidate(), so the filter bar never hides. Force re-render here.
|
|
1665
|
+
if (!this._useModelFilter()) {
|
|
1666
|
+
this.invalidate();
|
|
1667
|
+
}
|
|
1662
1668
|
};
|
|
1663
1669
|
|
|
1664
1670
|
/**
|
|
@@ -27,9 +27,12 @@ sap.ui.define([
|
|
|
27
27
|
"sap/base/security/encodeXML",
|
|
28
28
|
"./TimelineItemRenderer",
|
|
29
29
|
"sap/ui/events/KeyCodes",
|
|
30
|
-
"sap/ui/core/Lib"
|
|
30
|
+
"sap/ui/core/Lib",
|
|
31
|
+
"sap/ui/core/InvisibleMessage",
|
|
32
|
+
"sap/ui/core/library"
|
|
31
33
|
], function (jQuery, Control, Text, Toolbar, Link, TextArea, Popover, ToolbarSpacer, Avatar, Button, Device,
|
|
32
|
-
ManagedObjectRegister, DateUtils, Icon, mLibrary, DateFormat, BaseObject, containsOrEquals, encodeXML, TimelineItemRenderer, KeyCodes, CoreLib
|
|
34
|
+
ManagedObjectRegister, DateUtils, Icon, mLibrary, DateFormat, BaseObject, containsOrEquals, encodeXML, TimelineItemRenderer, KeyCodes, CoreLib,
|
|
35
|
+
InvisibleMessage, coreLibrary) {
|
|
33
36
|
"use strict";
|
|
34
37
|
|
|
35
38
|
// shortcut for sap.m.PlacementType
|
|
@@ -42,6 +45,8 @@ sap.ui.define([
|
|
|
42
45
|
var AvatarShape = mLibrary.AvatarShape;
|
|
43
46
|
var AvatarSize = mLibrary.AvatarSize;
|
|
44
47
|
|
|
48
|
+
var InvisibleMessageMode = coreLibrary.InvisibleMessageMode;
|
|
49
|
+
|
|
45
50
|
/**
|
|
46
51
|
* Constructor for a new TimelineItem.
|
|
47
52
|
*
|
|
@@ -809,6 +814,8 @@ sap.ui.define([
|
|
|
809
814
|
var sShowLessText = resBundle.getText("TIMELINE_TEXT_SHOW_LESS");
|
|
810
815
|
oLink.setText(sShowLessText);
|
|
811
816
|
fnSetHeight("", $span.height(), "");
|
|
817
|
+
InvisibleMessage.getInstance().announce(sShowLessText + " " + resBundle.getText("TIMELINE_LINK_ACTIVATE_INSTRUCTION"), InvisibleMessageMode.Polite);
|
|
818
|
+
|
|
812
819
|
|
|
813
820
|
} else {
|
|
814
821
|
$parent.attr("expanded", false);
|
|
@@ -817,6 +824,8 @@ sap.ui.define([
|
|
|
817
824
|
$span.html(this._textProperties.text);
|
|
818
825
|
|
|
819
826
|
fnSetHeight(this._textProperties.height, this._textProperties.height, this._textProperties.clamp);
|
|
827
|
+
InvisibleMessage.getInstance().announce(this._sTextShowMore + " " + resBundle.getText("TIMELINE_LINK_ACTIVATE_INSTRUCTION"), InvisibleMessageMode.Polite);
|
|
828
|
+
|
|
820
829
|
}
|
|
821
830
|
|
|
822
831
|
that._expanded = !that._expanded;
|
|
@@ -217,7 +217,7 @@ sap.ui.define([
|
|
|
217
217
|
return sName + "-" + (this._bRtlMode ? "right" : "left");
|
|
218
218
|
}.bind(this),
|
|
219
219
|
// icon in middle line for corresponding timeline item
|
|
220
|
-
$icon = jQuery(
|
|
220
|
+
$icon = jQuery(document.getElementById(oItem.id + "-line")),
|
|
221
221
|
// left (right for RTL) for timeline icon
|
|
222
222
|
iDistance = this._bRtlMode ? fnRight($icon) : $icon.position().left,
|
|
223
223
|
// distance between left icon pos and start of timeline item
|
|
@@ -230,9 +230,13 @@ sap.ui.define([
|
|
|
230
230
|
iMargin = iDistance - OFFSET - iLineMargin;
|
|
231
231
|
} else {
|
|
232
232
|
$prev = $item.prevAll(".sapSuiteUiCommonsTimelineItemLiWrapperV:visible:first");
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
233
|
+
if ($prev.length > 0) {
|
|
234
|
+
// otherwise count margin as previsous item left + width minus from group header left position + OFFSET
|
|
235
|
+
iPrevPos = this._bRtlMode ? fnRight($prev) : ($prev.position().left + _getConvertedAttribute($prev, fnCreateAttribute("margin")));
|
|
236
|
+
iMargin = (iDistance - OFFSET) - (iPrevPos + $prev.outerWidth());
|
|
237
|
+
} else {
|
|
238
|
+
iMargin = iDistance - OFFSET - iLineMargin;
|
|
239
|
+
}
|
|
236
240
|
}
|
|
237
241
|
$item.css(fnCreateAttribute("margin"), iMargin + "px");
|
|
238
242
|
}.bind(this));
|
|
@@ -29,6 +29,52 @@ sap.ui.define([
|
|
|
29
29
|
return Controller.extend("sap.suite.ui.commons.collaboration.ContactHelper", {
|
|
30
30
|
constructor: function() { },
|
|
31
31
|
|
|
32
|
+
_compressImage: function(base64Data) {
|
|
33
|
+
const maxWidth = 150;
|
|
34
|
+
const maxHeight = 150;
|
|
35
|
+
const quality = 0.7;
|
|
36
|
+
|
|
37
|
+
return new Promise(function(resolve, reject) {
|
|
38
|
+
var img = new Image();
|
|
39
|
+
img.onload = function() {
|
|
40
|
+
var canvas = document.createElement('canvas');
|
|
41
|
+
var ctx = canvas.getContext('2d');
|
|
42
|
+
|
|
43
|
+
var width = img.width;
|
|
44
|
+
var height = img.height;
|
|
45
|
+
|
|
46
|
+
if (width > height) {
|
|
47
|
+
if (width > maxWidth) {
|
|
48
|
+
height = height * (maxWidth / width);
|
|
49
|
+
width = maxWidth;
|
|
50
|
+
}
|
|
51
|
+
} else if (height > maxHeight) {
|
|
52
|
+
width = width * (maxHeight / height);
|
|
53
|
+
height = maxHeight;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
canvas.width = width;
|
|
57
|
+
canvas.height = height;
|
|
58
|
+
|
|
59
|
+
ctx.drawImage(img, 0, 0, width, height);
|
|
60
|
+
|
|
61
|
+
try {
|
|
62
|
+
var compressedBase64 = canvas.toDataURL('image/jpeg', quality);
|
|
63
|
+
var base64Result = compressedBase64.split(',')[1];
|
|
64
|
+
resolve(base64Result);
|
|
65
|
+
} catch (e) {
|
|
66
|
+
reject(e);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
img.onerror = function(error) {
|
|
71
|
+
reject(error);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
img.src = "data:image/png;base64," + base64Data;
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
|
|
32
78
|
/**
|
|
33
79
|
* Fetch the Contact info, image and status from Teams via oData service.
|
|
34
80
|
* @param {string} sEmail email of the contact
|
|
@@ -41,6 +87,13 @@ sap.ui.define([
|
|
|
41
87
|
}
|
|
42
88
|
if (oFullProfileData && oFullProfileData.data != "") {
|
|
43
89
|
oFullProfileData.photo = "data:image/png;base64," + oFullProfileData.data;
|
|
90
|
+
|
|
91
|
+
try {
|
|
92
|
+
var compressedData = await this._compressImage(oFullProfileData.data);
|
|
93
|
+
oFullProfileData.photoCompressed = "data:image/jpeg;base64," + compressedData;
|
|
94
|
+
} catch (error) {
|
|
95
|
+
oFullProfileData.photoCompressed = oFullProfileData.photo;
|
|
96
|
+
}
|
|
44
97
|
}
|
|
45
98
|
oFullProfileData = this.determineContactStatus(oFullProfileData);
|
|
46
99
|
return oFullProfileData;
|
|
@@ -134,7 +187,7 @@ sap.ui.define([
|
|
|
134
187
|
}
|
|
135
188
|
},
|
|
136
189
|
|
|
137
|
-
loadContactPopover: function(sEmail, oParams, isDirectCommunicationEnabled) {
|
|
190
|
+
loadContactPopover: function(sEmail, oParams, isDirectCommunicationEnabled, providerConfig) {
|
|
138
191
|
this.afterClose(); // Make sure, previously opened popup is closed if any
|
|
139
192
|
return Fragment.load({
|
|
140
193
|
name: "sap.suite.ui.commons.collaboration.ContactPopover",
|
|
@@ -155,6 +208,7 @@ sap.ui.define([
|
|
|
155
208
|
"isUserExistsInTeams": true
|
|
156
209
|
});
|
|
157
210
|
this._oContactPopover.setModel(oJsonModel, "userData");
|
|
211
|
+
this._providerConfig = providerConfig ?? {};
|
|
158
212
|
this.isDirectCommunicationEnabled = isDirectCommunicationEnabled;
|
|
159
213
|
this._oContactPopover.setModel(new sap.ui.model.resource.ResourceModel({ bundle: I18_BUNDLE }), "i18n");
|
|
160
214
|
return oPopover;
|
|
@@ -203,6 +257,8 @@ sap.ui.define([
|
|
|
203
257
|
} else {
|
|
204
258
|
data.isUserExistsInTeams = true;
|
|
205
259
|
data.isDirectCommunicationEnabled = !!that.isDirectCommunicationEnabled;
|
|
260
|
+
data.isShareAsLinkEnabled = that._providerConfig.isShareAsLinkEnabled === "X";
|
|
261
|
+
data.isShareAsCardEnabled = that._providerConfig.isShareAsCardEnabled === "ENABLED" || that._providerConfig.isShareAsCardEnabled === "AUTHENABLE";
|
|
206
262
|
that._oContactPopover.setInitialFocus(Element.getElementById("avatar"));
|
|
207
263
|
}
|
|
208
264
|
var oJsonModel = new JSONModel(data);
|
|
@@ -340,6 +396,27 @@ sap.ui.define([
|
|
|
340
396
|
} else {
|
|
341
397
|
MessageToast.show(I18_BUNDLE.getText("POPOVER_CONTACT_COPY_EMAIL_ERROR"));
|
|
342
398
|
}
|
|
399
|
+
},
|
|
400
|
+
|
|
401
|
+
handleShareToMSTeamsPress: async function() {
|
|
402
|
+
const oContactData = this._oContactPopover.getModel("userData").getData();
|
|
403
|
+
const sCardId = "Contact-" + oContactData.id;
|
|
404
|
+
|
|
405
|
+
if (!this._oTeamsHelperService) {
|
|
406
|
+
const ServiceContainer = await new Promise((resolve) => {
|
|
407
|
+
sap.ui.require(["sap/suite/ui/commons/collaboration/ServiceContainer"], (SC) => resolve(SC));
|
|
408
|
+
});
|
|
409
|
+
this._oTeamsHelperService = await ServiceContainer.getServiceAsync();
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
// Use compressed photo for Teams sharing
|
|
413
|
+
const oCardManifest = { ...oContactData };
|
|
414
|
+
if (oContactData.photoCompressed) {
|
|
415
|
+
oCardManifest.photo = oContactData.photoCompressed;
|
|
416
|
+
delete oCardManifest.data;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
this._oTeamsHelperService.shareContactCard(oContactData, { cardId: sCardId, cardManifest: oCardManifest });
|
|
343
420
|
}
|
|
344
421
|
});
|
|
345
422
|
});
|
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
displaySize="M" class="sapUiSmallMarginEnd" displayShape="Circle" macrodata:email="{userData>/mail}" fesr:press="MST:ContactAction"
|
|
17
17
|
macrodata:type="chat" tooltip="{userData>/badgeTooltip}" badgeValueState="{userData>/badgeValueState}" badgeTooltip="{userData>/badgeTooltip}" badgeIcon="{userData>/badgeIcon}"/>
|
|
18
18
|
<VBox>
|
|
19
|
-
|
|
19
|
+
<HBox alignItems="Center">
|
|
20
|
+
<Title text="{userData>/displayname}" level="H3" />
|
|
21
|
+
<core:Icon src="sap-icon://action" press=".handleShareToMSTeamsPress" decorative="false" tooltip="{i18n>POPOVER_CONTACT_SHARE_TEAMS}" visible="{= ${userData>/isShareAsLinkEnabled} || ${userData>/isShareAsCardEnabled}}" class="sapThemeHighlight-asColor sapUiTinyMarginBegin"/>
|
|
22
|
+
</HBox>
|
|
20
23
|
<Text text="{userData>/jobtitle}"/>
|
|
21
24
|
</VBox>
|
|
22
25
|
</HBox>
|
|
@@ -507,6 +507,73 @@ sap.ui.define([
|
|
|
507
507
|
return sModifiedUrl;
|
|
508
508
|
};
|
|
509
509
|
|
|
510
|
+
/**
|
|
511
|
+
* Shares ContactCard to Microsoft Teams
|
|
512
|
+
* @param {Object} oContactData - Contact information
|
|
513
|
+
* @param {Object} [oParams] - Optional parameters including cardId and cardManifest
|
|
514
|
+
* @returns {Promise<void>} Promise that resolves when sharing is complete
|
|
515
|
+
* @private
|
|
516
|
+
*/
|
|
517
|
+
TeamsHelperService.prototype.shareContactCard = async function(oContactData, oParams) {
|
|
518
|
+
const sMessage = oContactData.displayname || oContactData.mail || "Contact";
|
|
519
|
+
const sCurrentUrl = window.location.href;
|
|
520
|
+
|
|
521
|
+
let oContactCard = {};
|
|
522
|
+
|
|
523
|
+
// If cardId and cardManifest are provided, save to backend first
|
|
524
|
+
if (oParams && oParams.cardId && oParams.cardManifest) {
|
|
525
|
+
try {
|
|
526
|
+
// Show busy dialog while saving
|
|
527
|
+
const oDialog = await Fragment.load({
|
|
528
|
+
name: "sap.suite.ui.commons.collaboration.CollaborationBusyDialog",
|
|
529
|
+
controller: this,
|
|
530
|
+
type: "XML"
|
|
531
|
+
});
|
|
532
|
+
oBusyDialog = oDialog;
|
|
533
|
+
oBusyDialog.open();
|
|
534
|
+
|
|
535
|
+
iBusyDialogTimeoutId = setTimeout(() => {
|
|
536
|
+
if (oBusyDialog) {
|
|
537
|
+
oBusyDialog.close();
|
|
538
|
+
oBusyDialog.destroy();
|
|
539
|
+
}
|
|
540
|
+
}, AUTO_CLOSE_BUSY_DIALOG_TIME);
|
|
541
|
+
|
|
542
|
+
// Save card to backend
|
|
543
|
+
oContactCard = await this._buildCardInfo(oParams);
|
|
544
|
+
} catch (err) {
|
|
545
|
+
oLogger.error("Failed to save contact card: " + err.message);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
let sModifiedUrl = sCurrentUrl;
|
|
550
|
+
try {
|
|
551
|
+
const oUrlParams = {
|
|
552
|
+
url: sCurrentUrl,
|
|
553
|
+
minifyUrlForChat: true
|
|
554
|
+
};
|
|
555
|
+
sModifiedUrl = await this._getModifiedUrlForSharing(oUrlParams);
|
|
556
|
+
} catch (error) {
|
|
557
|
+
oLogger.error("Error while modifying URL for contact card sharing: " + error.message);
|
|
558
|
+
} finally {
|
|
559
|
+
this._closeBusyDialog();
|
|
560
|
+
|
|
561
|
+
const newWindow = window.open(
|
|
562
|
+
"",
|
|
563
|
+
"_blank",
|
|
564
|
+
windowWidthAndHeight
|
|
565
|
+
);
|
|
566
|
+
newWindow.opener = null;
|
|
567
|
+
|
|
568
|
+
if (oContactCard && Object.keys(oContactCard).length > 0) {
|
|
569
|
+
const sCardUrl = this._generateShareAsCardUrl(sModifiedUrl, sMessage, oContactCard);
|
|
570
|
+
newWindow.location = sCardUrl;
|
|
571
|
+
} else {
|
|
572
|
+
newWindow.location = this._providerConfig.shareAsLinkUrl + "?msgText=" + encodeURIComponent(sMessage) + "&preview=false";
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
};
|
|
576
|
+
|
|
510
577
|
/**
|
|
511
578
|
* Closes and destroys the busy dialog, and clears timeout.
|
|
512
579
|
*/
|
|
@@ -681,9 +748,9 @@ sap.ui.define([
|
|
|
681
748
|
this.oContactHelper = new ContactHelper();
|
|
682
749
|
}
|
|
683
750
|
if (this._providerConfig.isDirectCommunicationEnabled === "ENABLED") {
|
|
684
|
-
return this.oContactHelper.loadContactPopover(sEmail, oParams, true);
|
|
751
|
+
return this.oContactHelper.loadContactPopover(sEmail, oParams, true, this._providerConfig);
|
|
685
752
|
} else {
|
|
686
|
-
return this.oContactHelper.loadContactPopover(sEmail, oParams);
|
|
753
|
+
return this.oContactHelper.loadContactPopover(sEmail, oParams, false, this._providerConfig);
|
|
687
754
|
}
|
|
688
755
|
|
|
689
756
|
} else if (isTeamMode || !sEmail || this._providerConfig.isDirectCommunicationEnabled !== "ENABLED") {
|