@sapui5/sap.suite.ui.commons 1.144.0 → 1.145.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 +8 -4
- 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/CloudFilePicker.js +1 -3
- 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 +9 -0
- package/src/sap/suite/ui/commons/TimelineNavigator.js +37 -5
- package/src/sap/suite/ui/commons/TimelineRenderer.js +3 -3
- package/src/sap/suite/ui/commons/collaboration/BaseHelperService.js +0 -1
- package/src/sap/suite/ui/commons/collaboration/CollaborationHelper.js +0 -3
- package/src/sap/suite/ui/commons/collaboration/CollaborationManagerService.js +0 -1
- package/src/sap/suite/ui/commons/collaboration/ContactHelper.js +7 -0
- package/src/sap/suite/ui/commons/collaboration/ContactPopover.fragment.xml +4 -1
- package/src/sap/suite/ui/commons/collaboration/MinimalContactPopover.fragment.xml +2 -1
- package/src/sap/suite/ui/commons/collaboration/TeamsHelperService.js +0 -6
- package/src/sap/suite/ui/commons/collaboration/channels/MessageChannel.js +0 -2
- package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component-preload.js +1 -1
- package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component.js +1 -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 +25 -1
- package/src/sap/suite/ui/commons/messagebundle.properties +16 -9
- package/src/sap/suite/ui/commons/messagebundle_ar.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_bg.properties +18 -3
- package/src/sap/suite/ui/commons/messagebundle_ca.properties +18 -3
- package/src/sap/suite/ui/commons/messagebundle_cnr.properties +18 -3
- package/src/sap/suite/ui/commons/messagebundle_cs.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_cy.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_da.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_de.properties +30 -15
- package/src/sap/suite/ui/commons/messagebundle_el.properties +18 -3
- package/src/sap/suite/ui/commons/messagebundle_en.properties +18 -3
- package/src/sap/suite/ui/commons/messagebundle_en_GB.properties +18 -3
- package/src/sap/suite/ui/commons/messagebundle_en_US_saprigi.properties +2 -0
- package/src/sap/suite/ui/commons/messagebundle_es.properties +18 -3
- package/src/sap/suite/ui/commons/messagebundle_es_MX.properties +18 -3
- package/src/sap/suite/ui/commons/messagebundle_et.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_fi.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_fr.properties +26 -11
- package/src/sap/suite/ui/commons/messagebundle_fr_CA.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_hi.properties +18 -3
- package/src/sap/suite/ui/commons/messagebundle_hr.properties +18 -3
- package/src/sap/suite/ui/commons/messagebundle_hu.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_id.properties +18 -3
- package/src/sap/suite/ui/commons/messagebundle_it.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_iw.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_ja.properties +18 -3
- package/src/sap/suite/ui/commons/messagebundle_kk.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_ko.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_lt.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_lv.properties +18 -3
- package/src/sap/suite/ui/commons/messagebundle_mk.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_ms.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_nl.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_no.properties +18 -3
- package/src/sap/suite/ui/commons/messagebundle_pl.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_pt.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_pt_PT.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_ro.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_ru.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_sh.properties +18 -3
- package/src/sap/suite/ui/commons/messagebundle_sk.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_sl.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_sr.properties +18 -3
- package/src/sap/suite/ui/commons/messagebundle_sv.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_th.properties +18 -3
- package/src/sap/suite/ui/commons/messagebundle_tr.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_uk.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_vi.properties +19 -4
- package/src/sap/suite/ui/commons/messagebundle_zh_CN.properties +17 -2
- package/src/sap/suite/ui/commons/messagebundle_zh_TW.properties +19 -4
- package/src/sap/suite/ui/commons/networkgraph/Graph.js +45 -16
- package/src/sap/suite/ui/commons/networkgraph/KeyboardNavigator.js +45 -4
- package/src/sap/suite/ui/commons/networkgraph/Line.js +52 -0
- package/src/sap/suite/ui/commons/networkgraph/Node.js +289 -86
- package/src/sap/suite/ui/commons/networkgraph/util/DependencyLayoutHelper.js +143 -70
- package/src/sap/suite/ui/commons/networkgraph/util/PortManager.js +2 -3
- 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/NetworkLine.less +26 -5
package/package.json
CHANGED
|
@@ -134,7 +134,7 @@ sap.ui.define([
|
|
|
134
134
|
* @extends sap.ui.core.Control
|
|
135
135
|
*
|
|
136
136
|
* @author SAP SE
|
|
137
|
-
* @version 1.
|
|
137
|
+
* @version 1.145.0
|
|
138
138
|
* @since 1.56.0
|
|
139
139
|
*
|
|
140
140
|
* @constructor
|
|
@@ -772,9 +772,12 @@ sap.ui.define([
|
|
|
772
772
|
|
|
773
773
|
CalculationBuilder.prototype._getFunctionDefinition = function (sKey) {
|
|
774
774
|
sKey = (sKey || "").toLowerCase();
|
|
775
|
-
|
|
775
|
+
// Check custom functions first, then fall back to default FunctionsMap
|
|
776
|
+
// This ensures custom functions take precedence when they have the same key as defaults
|
|
777
|
+
var oCustomFunction = jQuery.grep(this.getFunctions(), function (oFunction) {
|
|
776
778
|
return oFunction.getKey().toLowerCase() === sKey;
|
|
777
779
|
})[0];
|
|
780
|
+
return oCustomFunction || FunctionsMap[sKey];
|
|
778
781
|
};
|
|
779
782
|
|
|
780
783
|
CalculationBuilder.prototype._getFunctionDescription = function (oFunction) {
|
|
@@ -1071,8 +1074,9 @@ sap.ui.define([
|
|
|
1071
1074
|
var aFunctions = [];
|
|
1072
1075
|
|
|
1073
1076
|
Object.keys(FunctionsMap).forEach(function (sKey) {
|
|
1074
|
-
// Only add built-in function if it's allowed
|
|
1075
|
-
|
|
1077
|
+
// Only add built-in function if it's allowed (not disabled)
|
|
1078
|
+
// bCheckCustomOverride=false ensures disabled functions are excluded even if custom override exists
|
|
1079
|
+
if (FunctionsMap[sKey].allowed && this._isTokenAllowed(sKey, false)) {
|
|
1076
1080
|
aFunctions.push(this._createFunctionObject(FunctionsMap[sKey]));
|
|
1077
1081
|
}
|
|
1078
1082
|
}.bind(this));
|
|
@@ -115,12 +115,10 @@ sap.ui.define([
|
|
|
115
115
|
* @extends sap.m.Dialog
|
|
116
116
|
*
|
|
117
117
|
* @namespace sap.suite.ui.commons.CloudFilePicker
|
|
118
|
-
* @experimental
|
|
119
|
-
* @since 1.101
|
|
120
118
|
* @class
|
|
121
119
|
* @public
|
|
122
120
|
* @internal
|
|
123
|
-
* @version 1.
|
|
121
|
+
* @version 1.145.0
|
|
124
122
|
*/
|
|
125
123
|
var CloudFilePicker = Dialog.extend("sap.suite.ui.commons.CloudFilePicker", {
|
|
126
124
|
metadata: {
|
|
@@ -2587,6 +2587,15 @@ sap.ui.define([
|
|
|
2587
2587
|
selectedItem: aFocusedItems[0],
|
|
2588
2588
|
userAction: oEvent.mParameters.event && oEvent.mParameters.event.type === "mousedown"
|
|
2589
2589
|
});
|
|
2590
|
+
if (!this._isVertical() && oFocusedDomRef){
|
|
2591
|
+
if (oFocusedDomRef.scrollIntoView) {
|
|
2592
|
+
oFocusedDomRef.scrollIntoView({
|
|
2593
|
+
behavior: 'smooth',
|
|
2594
|
+
block: 'nearest',
|
|
2595
|
+
inline: 'nearest'
|
|
2596
|
+
});
|
|
2597
|
+
}
|
|
2598
|
+
}
|
|
2590
2599
|
}
|
|
2591
2600
|
}, this);
|
|
2592
2601
|
this.oItemNavigation.attachEvent("Enter", function (oEvent) {
|
|
@@ -7,13 +7,14 @@
|
|
|
7
7
|
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
"sap/ui/thirdparty/jquery",
|
|
10
|
+
"./library",
|
|
10
11
|
"sap/ui/core/delegate/ItemNavigation",
|
|
11
12
|
"sap/base/assert",
|
|
12
13
|
"sap/ui/dom/containsOrEquals",
|
|
13
14
|
"sap/ui/events/KeyCodes"
|
|
14
|
-
], function (jQuery, ItemNavigation, assert, containsOrEquals, KeyCodes) {
|
|
15
|
+
], function (jQuery, library, ItemNavigation, assert, containsOrEquals, KeyCodes) {
|
|
15
16
|
"use strict";
|
|
16
|
-
|
|
17
|
+
var TimelineAxisOrientation = library.TimelineAxisOrientation;
|
|
17
18
|
function stringEndsWith(sString, sPattern) {
|
|
18
19
|
var iDiff = sString.length - sPattern.length;
|
|
19
20
|
return iDiff >= 0 && sString.lastIndexOf(sPattern) === iDiff;
|
|
@@ -110,10 +111,37 @@ sap.ui.define([
|
|
|
110
111
|
*/
|
|
111
112
|
TimelineNavigator.prototype.setItemDomRefs = function (aItemDomRefs) {
|
|
112
113
|
assert(Array.isArray(aItemDomRefs), "aItemDomRefs must be an array of DOM elements");
|
|
113
|
-
|
|
114
|
+
var bIsVertical = false;
|
|
115
|
+
if (this.oDomRef) {
|
|
116
|
+
var $timeline = jQuery(this.oDomRef).closest(".sapSuiteUiCommonsTimeline");
|
|
117
|
+
var oTimelineControl = $timeline.control(0);
|
|
118
|
+
if (oTimelineControl) {
|
|
119
|
+
var sOrientation = oTimelineControl.getAxisOrientation();
|
|
120
|
+
bIsVertical = (sOrientation === TimelineAxisOrientation.Vertical);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
var aValidItems = [];
|
|
124
|
+
for (var j = 0; j < aItemDomRefs.length; j++) {
|
|
125
|
+
var oDomRef = aItemDomRefs[j];
|
|
126
|
+
if (oDomRef) {
|
|
127
|
+
var sClass = oDomRef.className || "";
|
|
128
|
+
var sTag = oDomRef.tagName || "";
|
|
129
|
+
var bIsTimelineItem = sClass.indexOf("sapSuiteUiCommonsTimelineItemOutline") >= 0;
|
|
130
|
+
var bIsGroupHeader = sClass.indexOf("sapSuiteUiCommonsTimelineGroupHeaderMainWrapper") >= 0;
|
|
131
|
+
var bIsButton = sTag === "BUTTON" || sClass.indexOf("sapMBtn") >= 0;
|
|
132
|
+
|
|
133
|
+
if (bIsTimelineItem || bIsGroupHeader) {
|
|
134
|
+
aValidItems.push(oDomRef);
|
|
135
|
+
}
|
|
136
|
+
else if (bIsButton && bIsVertical) {
|
|
137
|
+
aValidItems.push(oDomRef);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
114
141
|
|
|
115
|
-
|
|
116
|
-
|
|
142
|
+
this.aItemDomRefs = aValidItems;
|
|
143
|
+
if (this.iFocusedIndex > aValidItems.length - 1) {
|
|
144
|
+
this.iFocusedIndex = aValidItems.length - 1;
|
|
117
145
|
}
|
|
118
146
|
|
|
119
147
|
// in nested ItemNavigation the tabindex must only be set if it's the focused item of the parent ItemNavigation
|
|
@@ -157,6 +185,10 @@ sap.ui.define([
|
|
|
157
185
|
*/
|
|
158
186
|
TimelineNavigator.prototype.setItemsTabindex = function () {
|
|
159
187
|
|
|
188
|
+
if (!this.aItemDomRefs) {
|
|
189
|
+
return this;
|
|
190
|
+
}
|
|
191
|
+
|
|
160
192
|
for (var i = 0; i < this.aItemDomRefs.length; i++) {
|
|
161
193
|
if (this.aItemDomRefs[i]) { // separators return null here
|
|
162
194
|
var $Item = jQuery(this.aItemDomRefs[i]);
|
|
@@ -117,9 +117,9 @@ sap.ui.define([
|
|
|
117
117
|
oItem, sPlacementLine, bIsEven, bIsGroupHeader, oNextItem, cParent,
|
|
118
118
|
bIsMaxed = oTimeline._isMaxed(),
|
|
119
119
|
bLastGroup,
|
|
120
|
-
fnCreateUL = function() {
|
|
120
|
+
fnCreateUL = function(sRole) {
|
|
121
121
|
var eUl = new HtmlElement("ul");
|
|
122
|
-
eUl.setAttribute("role", "list");
|
|
122
|
+
eUl.setAttribute("role", sRole ? sRole : "list");
|
|
123
123
|
return eUl;
|
|
124
124
|
};
|
|
125
125
|
|
|
@@ -131,7 +131,7 @@ sap.ui.define([
|
|
|
131
131
|
eTopLine = new HtmlElement("div"),
|
|
132
132
|
eUlTop = fnCreateUL(),
|
|
133
133
|
eMiddleLine = new HtmlElement("div"),
|
|
134
|
-
eUlMid = fnCreateUL(),
|
|
134
|
+
eUlMid = fnCreateUL(oTimeline.getAxisOrientation() === TimelineAxisOrientation.Horizontal ? "presentation" : "list"),
|
|
135
135
|
eBottomLine = new HtmlElement("div"),
|
|
136
136
|
eUlBot = fnCreateUL(),
|
|
137
137
|
eLeftScroller = new HtmlElement("div"),
|
|
@@ -28,7 +28,6 @@ sap.ui.define(
|
|
|
28
28
|
/**
|
|
29
29
|
* CollaborationHelper for collaboration-related functionalities
|
|
30
30
|
* @namespace
|
|
31
|
-
* @since 1.108
|
|
32
31
|
* @alias module:sap/suite/ui/commons/collaboration/CollaborationHelper
|
|
33
32
|
* @public
|
|
34
33
|
*/
|
|
@@ -43,7 +42,6 @@ sap.ui.define(
|
|
|
43
42
|
* `<protocol>/<hostname>#<semantic-object>&/sap-url-hash=<UUID>`
|
|
44
43
|
* @private
|
|
45
44
|
* @ui5-restricted sap.suite.suite-ui-commons
|
|
46
|
-
* @experimental since 1.108
|
|
47
45
|
*/
|
|
48
46
|
CollaborationHelper.compactHash = function(sUrl) {
|
|
49
47
|
const UshellContainer = sap.ui.require("sap/ushell/Container");
|
|
@@ -266,7 +264,6 @@ sap.ui.define(
|
|
|
266
264
|
* Hides the avatar of the user if the app is running in the Microsoft Teams application.
|
|
267
265
|
* @private
|
|
268
266
|
* @ui5-restricted sap.suite.suite-ui-commons
|
|
269
|
-
* @experimental since 1.108
|
|
270
267
|
*/
|
|
271
268
|
CollaborationHelper._hideAvatarFromShellbar = function() {
|
|
272
269
|
this.isTeamsModeActive().then(function(bIsActive) {
|
|
@@ -21,7 +21,6 @@ sap.ui.define([
|
|
|
21
21
|
* @alias module:sap/suite/ui/commons/collaboration/CollaborationManagerService
|
|
22
22
|
* @private
|
|
23
23
|
* @ui5-restricted
|
|
24
|
-
* @experimental Since 1.125
|
|
25
24
|
*/
|
|
26
25
|
|
|
27
26
|
var CollaborationManagerService = BaseHelperService.extend("sap.suite.ui.commons.collaboration.CollaborationManagerService");
|
|
@@ -163,6 +163,7 @@ sap.ui.define([
|
|
|
163
163
|
loadMinimalContactPopover: function(sEmail, oParams) {
|
|
164
164
|
// oParams contains subject and body of the email
|
|
165
165
|
this.afterClose(); // Make sure, previously opened popup is closed if any
|
|
166
|
+
this.sEmail = sEmail;
|
|
166
167
|
var oJsonModel = new JSONModel({
|
|
167
168
|
"mail": sEmail,
|
|
168
169
|
"params": oParams
|
|
@@ -329,6 +330,12 @@ sap.ui.define([
|
|
|
329
330
|
|
|
330
331
|
Object.assign(oFullProfileData, oBadgeInfo);
|
|
331
332
|
return oFullProfileData;
|
|
333
|
+
},
|
|
334
|
+
|
|
335
|
+
handleCopyEmailPress: function() {
|
|
336
|
+
if (typeof window !== "undefined" && window.navigator && window.navigator.clipboard && window.navigator.clipboard.writeText) {
|
|
337
|
+
window.navigator.clipboard.writeText(this.sEmail);
|
|
338
|
+
}
|
|
332
339
|
}
|
|
333
340
|
});
|
|
334
341
|
});
|
|
@@ -71,7 +71,10 @@
|
|
|
71
71
|
|
|
72
72
|
<VBox visible="{= !!${userData>/mail}}" class="sapUiTinyMarginTop sapUiTinyMarginBottom" >
|
|
73
73
|
<Label id="UserEmail" text="{i18n>POPOVER_CONTACT_SECTION_EMAIL}:" />
|
|
74
|
-
|
|
74
|
+
<HBox>
|
|
75
|
+
<Link text="{userData>/mail}" href="{path: 'userData>/mail', formatter: '.formatUri'}" ariaLabelledBy="UserEmail" class="sapUiTinyMarginEnd"/>
|
|
76
|
+
<core:Icon src="sap-icon://copy" press="handleCopyEmailPress" decorative="false" tooltip="{i18n>POPOVER_CONTACT_COPY_EMAIL}"/>
|
|
77
|
+
</HBox>
|
|
75
78
|
</VBox>
|
|
76
79
|
|
|
77
80
|
<VBox visible="{= !!${userData>/officelocation}}" class="sapUiTinyMarginTop sapUiTinyMarginBottom" >
|
|
@@ -50,7 +50,8 @@
|
|
|
50
50
|
<core:Icon
|
|
51
51
|
src="sap-icon://email">
|
|
52
52
|
</core:Icon>
|
|
53
|
-
<Link text="{userData>/mail}" href="{parts: [{path: 'userData>/mail'}, {path: 'userData>/params'}], formatter: '.formatUri'}" class="sapUiSmallMarginBegin sapUiTinyMarginBottom" />
|
|
53
|
+
<Link text="{userData>/mail}" href="{parts: [{path: 'userData>/mail'}, {path: 'userData>/params'}], formatter: '.formatUri'}" class="sapUiSmallMarginBegin sapUiTinyMarginBottom sapUiTinyMarginEnd" />
|
|
54
|
+
<core:Icon src="sap-icon://copy" press="handleCopyEmailPress" decorative="false" tooltip="{i18n>POPOVER_CONTACT_COPY_EMAIL}"/>
|
|
54
55
|
</HBox>
|
|
55
56
|
</VBox>
|
|
56
57
|
</Popover>
|
|
@@ -38,7 +38,6 @@ sap.ui.define([
|
|
|
38
38
|
* @alias module:sap/suite/ui/commons/collaboration/TeamsHelperService
|
|
39
39
|
* @private
|
|
40
40
|
* @ui5-restricted
|
|
41
|
-
* @experimental Since 1.108
|
|
42
41
|
*/
|
|
43
42
|
var TeamsHelperService = BaseHelperService.extend("sap.suite.ui.commons.collaboration.TeamsHelperService", {
|
|
44
43
|
constructor: function(oProviderConfig) {
|
|
@@ -89,7 +88,6 @@ sap.ui.define([
|
|
|
89
88
|
* @returns {array} Array of available options
|
|
90
89
|
* @private
|
|
91
90
|
* @ui5-restricted
|
|
92
|
-
* @experimental Since 1.108
|
|
93
91
|
*/
|
|
94
92
|
TeamsHelperService.prototype.getOptions = function(oParams) {
|
|
95
93
|
oTeamsParams = {
|
|
@@ -207,7 +205,6 @@ sap.ui.define([
|
|
|
207
205
|
* @returns {void}
|
|
208
206
|
* @private
|
|
209
207
|
* @ui5-restricted
|
|
210
|
-
* @experimental Since 1.108
|
|
211
208
|
*/
|
|
212
209
|
TeamsHelperService.prototype.share = function(oOption, oParams) {
|
|
213
210
|
|
|
@@ -248,7 +245,6 @@ sap.ui.define([
|
|
|
248
245
|
* @returns {void}
|
|
249
246
|
* @private
|
|
250
247
|
* @ui5-restricted
|
|
251
|
-
* @experimental Since 1.108
|
|
252
248
|
*/
|
|
253
249
|
TeamsHelperService.prototype._shareAsChat = function(oParams) {
|
|
254
250
|
var newWindow = window.open(
|
|
@@ -309,7 +305,6 @@ sap.ui.define([
|
|
|
309
305
|
* @returns {void}
|
|
310
306
|
* @private
|
|
311
307
|
* @ui5-restricted
|
|
312
|
-
* @experimental Since 1.108
|
|
313
308
|
*/
|
|
314
309
|
TeamsHelperService.prototype._shareAsTab = async function(oParams) {
|
|
315
310
|
var sAppUri = await this._modifyUrlForShareAsTab(oParams.url, "MST:T");
|
|
@@ -380,7 +375,6 @@ sap.ui.define([
|
|
|
380
375
|
* @returns {void}
|
|
381
376
|
* @private
|
|
382
377
|
* @ui5-restricted
|
|
383
|
-
* @experimental Since 1.108
|
|
384
378
|
*/
|
|
385
379
|
TeamsHelperService.prototype._shareAsCard = async function (oParams) {
|
|
386
380
|
if (!oParams?.cardId || !oParams.cardId.length || !oParams.cardManifest || !this.isFeatureFlagEnabled()) {
|
|
@@ -19,7 +19,6 @@ sap.ui.define(
|
|
|
19
19
|
* @class
|
|
20
20
|
* @alias sap.suite.ui.commons.collaboration.channels.MessageChannel
|
|
21
21
|
* @public
|
|
22
|
-
* @experimental
|
|
23
22
|
*/
|
|
24
23
|
var MessageChannel = UI5Object.extend("sap.suite.ui.commons.collaboration.channels.MessageChannel", {
|
|
25
24
|
/**
|
|
@@ -49,7 +48,6 @@ sap.ui.define(
|
|
|
49
48
|
* Returns a promise that resolves to the singleton instance of the MessageChannel service.
|
|
50
49
|
* @returns {Promise<sap.suite.ui.commons.collaboration.channels.MessageChannel>} A promise that resolves to the MessageChannel instance.
|
|
51
50
|
* @public
|
|
52
|
-
* @experimental
|
|
53
51
|
*/
|
|
54
52
|
getInstance: function () {
|
|
55
53
|
if (!instance) {
|
|
@@ -18,7 +18,7 @@ sap.ui.require.preload({
|
|
|
18
18
|
sap.ui.define(["sap/base/Log","sap/ui/core/Core","./BaseHelperService","sap/ui/Device","sap/ui/core/Lib","sap/suite/ui/commons/collaboration/channels/MessageChannel"],function(e,o,a,s,t,i){var n=a.extend("sap.suite.ui.commons.collaboration.CollaborationManagerService");var r=t.getResourceBundleFor("sap.suite.ui.commons");var l=e.getLogger("sap.suite.ui.commons.collaboration.CollaborationManagerService");n.prototype.triggerH2HChat=function(e,o,a){this.publishData({sAppTitle:e,sCurrentURL:o,sEmailId:a})};n.prototype.getOptions=function(){var e=window["sap-ushell-config"]&&window["sap-ushell-config"].bootstrapPlugins&&window["sap-ushell-config"].bootstrapPlugins.H2H_CHAT_PLUGIN;if(s.system.desktop){if(e){return{text:r.getText("COLLABORATION_MANGER"),icon:"sap-icon://BusinessSuiteInAppSymbols/icon-collaboration-manager",press:this.triggerH2HChat.bind(this),fesrStepName:"CM:ShareLink"}}else{l.info("Consumer disable Collaboration Manager option")}}else{l.info("Collaboration Manager is not supported in Phone and Tablet")}return null};n.prototype.publishData=async function(e){try{const o=await i.getInstance();o.postMessage(e)}catch(e){l.error("Failed to publish data:",e)}};return n});
|
|
19
19
|
},
|
|
20
20
|
"sap/suite/ui/commons/collaboration/ContactHelper.js":function(){
|
|
21
|
-
sap.ui.define(["sap/ui/core/mvc/Controller","sap/ui/core/Fragment","sap/ui/model/json/JSONModel","sap/m/library","sap/ui/core/Lib","sap/ui/core/Core","sap/ui/model/resource/ResourceModel","./CollaborationContactInfoHelper","sap/ui/performance/trace/FESRHelper","sap/ui/core/Element"],function(e,t,a,o,s,i,n,r,c,l){var u=s.getResourceBundleFor("sap.suite.ui.commons");return e.extend("sap.suite.ui.commons.collaboration.ContactHelper",{constructor:function(){},getFullProfileByEmail:async function(e){var t=await r.fetchContact(e);if(t&&t.mail===""){return t}if(t&&t.data!=""){t.photo="data:image/png;base64,"+t.data}t=this.determineContactStatus(t);return t},getTeamsContactOptions:function(){var e=this;return Promise.resolve([{key:"chat",icon:"sap-icon://discussion",tooltip:u.getText("CHAT_BUTTON_TOOLTIP"),fesrStepName:"MST:ContactAction",callBackHandler:function(t){e.handleMSTeamsPress(t)}},{key:"call",icon:"sap-icon://call",tooltip:u.getText("CALL_BUTTON_TOOLTIP"),fesrStepName:"MST:ContactAction",callBackHandler:function(t){e.handleMSTeamsPress(t)}},{key:"videoCall",icon:"sap-icon://video",tooltip:u.getText("VIDEOCALL_BUTTON_TOOLTIP"),fesrStepName:"MST:ContactAction",callBackHandler:function(t){e.handleMSTeamsPress(t)}}])},getTeamsContactStatus:async function(e){let t={calendar:[]};if(e){const a=await Promise.all([r.fetchContact(e),r.fetchContactCalendar(e)]);t=a[0];t.calendar=a[1]}const a=this.determineContactStatus(t);return[{key:"profileStatus",badgeIcon:a.badgeIcon,badgeValueState:a.badgeValueState,badgeTooltip:a.badgeTooltip,fesrStepName:"MST:ContactAction",calendar:a.calendar}]},handleMSTeamsPress:function(e){var t=e.getSource().data("email");var a=e.getSource().data("type");var s="";switch(a){case"chat":s="https://teams.microsoft.com/l/chat/0/0?users="+t;break;case"call":s="https://teams.microsoft.com/l/call/0/0?users="+t;break;case"videoCall":s="https://teams.microsoft.com/l/call/0/0?users="+t+"&withVideo=true";break;default:break}o.URLHelper.redirect(s,true)},formatUri:function(e,t){var a=/^\w+[\w-+\.]*\@\w+([-\.]\w+)*\.[a-zA-Z]{2,}$/;if(a.test(e)){return"mailto:"+e+(t&&t.subject?"?subject="+t.subject:"")+(t&&t.body?"&body="+t.body:"")}else{return"tel:"+e}},loadContactPopover:function(e,o,s){this.afterClose();return t.load({name:"sap.suite.ui.commons.collaboration.ContactPopover",controller:this,type:"XML"}).then(function(t){c.setSemanticStepname(t,"afterClose","MST:ContactDetails");this._oContactPopover=t;this.sEmail=e;this.oParams=o;t.setBusy(true);var i={setFamily:"tnt",setURI:sap.ui.require.toUrl("sap/tnt/themes/base/illustrations")};sap.m.IllustrationPool.registerIllustrationSet(i,false);var n=new a({isUserExistsInTeams:true});this._oContactPopover.setModel(n,"userData");this.isDirectCommunicationEnabled=s;this._oContactPopover.setModel(new sap.ui.model.resource.ResourceModel({bundle:u}),"i18n");return t}.bind(this))},loadMinimalContactPopover:function(e,o){this.afterClose();var s=new a({mail:e,params:o});return t.load({name:"sap.suite.ui.commons.collaboration.MinimalContactPopover",controller:this,type:"XML"}).then(function(e){this._oMinContactPopover=e;c.setSemanticStepname(e,"afterClose","MST:ContactDetails");e.setModel(s,"userData");e.setModel(new sap.ui.model.resource.ResourceModel({bundle:u}),"i18n");return e}.bind(this))},afterClose:function(){if(this._oContactPopover){this._oContactPopover.destroy()}if(this._oMinContactPopover){this._oMinContactPopover.destroy()}},afterOpen:function(){var e=this;this.getFullProfileByEmail(this.sEmail).then(function(t){e._oContactPopover.setBusy(false);if(t&&t.mail===""){t.isUserExistsInTeams=false;t.mail=e.sEmail;t.params=e.oParams;e._oContactPopover.setInitialFocus(l.getElementById("mail"))}else{t.isUserExistsInTeams=true;t.isDirectCommunicationEnabled=!!e.isDirectCommunicationEnabled;e._oContactPopover.setInitialFocus(l.getElementById("avatar"))}var o=new a(t);o.setData(t);e._oContactPopover.setModel(o,"userData");c.setSemanticStepname(e._oContactPopover,"afterClose","MST:ContactDetails")})},afterContinue:function(){var e=this.formatUri(this.sEmail,this.oParams);o.URLHelper.redirect(e,true)},determineContactStatus:function(e){const t=new Map([["OOO",{badgeValueState:"Information",badgeIcon:"sap-icon://offsite-work"}],["BUSYOOO",{badgeValueState:"Error",badgeIcon:"sap-icon://circle-task"}],["ONLINEOOO",{badgeValueState:"Success",badgeIcon:"sap-icon://sys-enter"}],["AVAILABLE",{badgeValueState:"Success",badgeIcon:"sap-icon://sys-enter-2"}],["AWAY",{badgeValueState:"Warning",badgeIcon:"sap-icon://pending"}],["BUSY",{badgeValueState:"Error",badgeIcon:"sap-icon://circle-task-2"}],["PRESENTING",{badgeValueState:"Error",badgeIcon:"sap-icon://sys-minus"}],["OFFLINE",{badgeValueState:"Error",badgeIcon:"sap-icon://message-error"}]]);const a=new Map([["Available","AVAILABLE"],["Away","AWAY"],["Inactive","AWAY"],["Busy","BUSY"],["DoNotDisturb","PRESENTING"],["InACall","BUSY"],["InAMeeting","BUSY"],["Presenting","PRESENTING"],["BeRightBack","AWAY"],["OffWork","OFFLINE"],["Offline","OFFLINE"]]);let o={};if(!!e.isoutofoffice){if(e.activity==="Available"){o=t.get("ONLINEOOO");o.badgeTooltip=`${u.getText("AVAILABLE")}, ${u.getText("OOO")}`}else if(e.activity==="Busy"){o=t.get("BUSYOOO");o.badgeTooltip=`${u.getText("BUSY")}, ${u.getText("OOO")}`}else if(e.activity==="DoNotDisturb"){o=t.get("PRESENTING");o.badgeTooltip=`${u.getText("DONOTDISTURB")}, ${u.getText("OOO")}`}else{o=t.get("OOO");o.badgeTooltip=u.getText("OOO")}}else{const s=e.activity?a.get(e.activity):"OFFLINE";o=t.get(s);o.badgeTooltip=u.getText(e.activity.toUpperCase())}Object.assign(e,o);return e}})});
|
|
21
|
+
sap.ui.define(["sap/ui/core/mvc/Controller","sap/ui/core/Fragment","sap/ui/model/json/JSONModel","sap/m/library","sap/ui/core/Lib","sap/ui/core/Core","sap/ui/model/resource/ResourceModel","./CollaborationContactInfoHelper","sap/ui/performance/trace/FESRHelper","sap/ui/core/Element"],function(e,t,a,o,s,i,n,r,c,l){var u=s.getResourceBundleFor("sap.suite.ui.commons");return e.extend("sap.suite.ui.commons.collaboration.ContactHelper",{constructor:function(){},getFullProfileByEmail:async function(e){var t=await r.fetchContact(e);if(t&&t.mail===""){return t}if(t&&t.data!=""){t.photo="data:image/png;base64,"+t.data}t=this.determineContactStatus(t);return t},getTeamsContactOptions:function(){var e=this;return Promise.resolve([{key:"chat",icon:"sap-icon://discussion",tooltip:u.getText("CHAT_BUTTON_TOOLTIP"),fesrStepName:"MST:ContactAction",callBackHandler:function(t){e.handleMSTeamsPress(t)}},{key:"call",icon:"sap-icon://call",tooltip:u.getText("CALL_BUTTON_TOOLTIP"),fesrStepName:"MST:ContactAction",callBackHandler:function(t){e.handleMSTeamsPress(t)}},{key:"videoCall",icon:"sap-icon://video",tooltip:u.getText("VIDEOCALL_BUTTON_TOOLTIP"),fesrStepName:"MST:ContactAction",callBackHandler:function(t){e.handleMSTeamsPress(t)}}])},getTeamsContactStatus:async function(e){let t={calendar:[]};if(e){const a=await Promise.all([r.fetchContact(e),r.fetchContactCalendar(e)]);t=a[0];t.calendar=a[1]}const a=this.determineContactStatus(t);return[{key:"profileStatus",badgeIcon:a.badgeIcon,badgeValueState:a.badgeValueState,badgeTooltip:a.badgeTooltip,fesrStepName:"MST:ContactAction",calendar:a.calendar}]},handleMSTeamsPress:function(e){var t=e.getSource().data("email");var a=e.getSource().data("type");var s="";switch(a){case"chat":s="https://teams.microsoft.com/l/chat/0/0?users="+t;break;case"call":s="https://teams.microsoft.com/l/call/0/0?users="+t;break;case"videoCall":s="https://teams.microsoft.com/l/call/0/0?users="+t+"&withVideo=true";break;default:break}o.URLHelper.redirect(s,true)},formatUri:function(e,t){var a=/^\w+[\w-+\.]*\@\w+([-\.]\w+)*\.[a-zA-Z]{2,}$/;if(a.test(e)){return"mailto:"+e+(t&&t.subject?"?subject="+t.subject:"")+(t&&t.body?"&body="+t.body:"")}else{return"tel:"+e}},loadContactPopover:function(e,o,s){this.afterClose();return t.load({name:"sap.suite.ui.commons.collaboration.ContactPopover",controller:this,type:"XML"}).then(function(t){c.setSemanticStepname(t,"afterClose","MST:ContactDetails");this._oContactPopover=t;this.sEmail=e;this.oParams=o;t.setBusy(true);var i={setFamily:"tnt",setURI:sap.ui.require.toUrl("sap/tnt/themes/base/illustrations")};sap.m.IllustrationPool.registerIllustrationSet(i,false);var n=new a({isUserExistsInTeams:true});this._oContactPopover.setModel(n,"userData");this.isDirectCommunicationEnabled=s;this._oContactPopover.setModel(new sap.ui.model.resource.ResourceModel({bundle:u}),"i18n");return t}.bind(this))},loadMinimalContactPopover:function(e,o){this.afterClose();var s=new a({mail:e,params:o});return t.load({name:"sap.suite.ui.commons.collaboration.MinimalContactPopover",controller:this,type:"XML"}).then(function(e){this._oMinContactPopover=e;c.setSemanticStepname(e,"afterClose","MST:ContactDetails");e.setModel(s,"userData");e.setModel(new sap.ui.model.resource.ResourceModel({bundle:u}),"i18n");return e}.bind(this))},afterClose:function(){if(this._oContactPopover){this._oContactPopover.destroy()}if(this._oMinContactPopover){this._oMinContactPopover.destroy()}},afterOpen:function(){var e=this;this.getFullProfileByEmail(this.sEmail).then(function(t){e._oContactPopover.setBusy(false);if(t&&t.mail===""){t.isUserExistsInTeams=false;t.mail=e.sEmail;t.params=e.oParams;e._oContactPopover.setInitialFocus(l.getElementById("mail"))}else{t.isUserExistsInTeams=true;t.isDirectCommunicationEnabled=!!e.isDirectCommunicationEnabled;e._oContactPopover.setInitialFocus(l.getElementById("avatar"))}var o=new a(t);o.setData(t);e._oContactPopover.setModel(o,"userData");c.setSemanticStepname(e._oContactPopover,"afterClose","MST:ContactDetails")})},afterContinue:function(){var e=this.formatUri(this.sEmail,this.oParams);o.URLHelper.redirect(e,true)},determineContactStatus:function(e){const t=new Map([["OOO",{badgeValueState:"Information",badgeIcon:"sap-icon://offsite-work"}],["BUSYOOO",{badgeValueState:"Error",badgeIcon:"sap-icon://circle-task"}],["ONLINEOOO",{badgeValueState:"Success",badgeIcon:"sap-icon://sys-enter"}],["AVAILABLE",{badgeValueState:"Success",badgeIcon:"sap-icon://sys-enter-2"}],["AWAY",{badgeValueState:"Warning",badgeIcon:"sap-icon://pending"}],["BUSY",{badgeValueState:"Error",badgeIcon:"sap-icon://circle-task-2"}],["PRESENTING",{badgeValueState:"Error",badgeIcon:"sap-icon://sys-minus"}],["OFFLINE",{badgeValueState:"Error",badgeIcon:"sap-icon://message-error"}]]);const a=new Map([["Available","AVAILABLE"],["Away","AWAY"],["Inactive","AWAY"],["Busy","BUSY"],["DoNotDisturb","PRESENTING"],["InACall","BUSY"],["InAMeeting","BUSY"],["Presenting","PRESENTING"],["BeRightBack","AWAY"],["OffWork","OFFLINE"],["Offline","OFFLINE"]]);let o={};if(!!e.isoutofoffice){if(e.activity==="Available"){o=t.get("ONLINEOOO");o.badgeTooltip=`${u.getText("AVAILABLE")}, ${u.getText("OOO")}`}else if(e.activity==="Busy"){o=t.get("BUSYOOO");o.badgeTooltip=`${u.getText("BUSY")}, ${u.getText("OOO")}`}else if(e.activity==="DoNotDisturb"){o=t.get("PRESENTING");o.badgeTooltip=`${u.getText("DONOTDISTURB")}, ${u.getText("OOO")}`}else{o=t.get("OOO");o.badgeTooltip=u.getText("OOO")}}else{const s=e.activity?a.get(e.activity):"OFFLINE";o=t.get(s);o.badgeTooltip=u.getText(e.activity.toUpperCase())}Object.assign(e,o);return e},handleCopyEmailPress:function(){if(typeof window!=="undefined"&&window.navigator&&window.navigator.clipboard&&window.navigator.clipboard.writeText){window.navigator.clipboard.writeText(this.sEmail)}}})});
|
|
22
22
|
},
|
|
23
23
|
"sap/suite/ui/commons/collaboration/ServiceContainer.js":function(){
|
|
24
24
|
sap.ui.define(["sap/base/Log","./BaseHelperService","./TeamsHelperService","./CollaborationManagerService","../windowmessages/CollaborationMessageBroker","../windowmessages/CollaborationMessageConsumer","./CollaborationHelper","sap/ui/core/Element"],function(e,r,o,n,t,i,a,s){var c=e.getLogger("sap.suite.ui.commons.collaboration.ServiceContainer");var l;var u;function v(){var e;if(l&&Object.keys(l).length){var n=l.sProvider;var t=l.oProviderConfig;if(n==="COLLABORATION_MSTEAMS"){e=new o(t)}u=Promise.resolve(e);return u}e=new r({});c.info("Collaboration provider is not activated on the tenant");return Promise.resolve(e)}function f(){}var g=new f;g.getServiceAsync=async function(){const e=sap.ui.require("sap/ushell/Container");if(u){return u}if(e&&e.inAppRuntime()){try{let e=false;try{if(window.location.host===top.window.location.host){l={};e=true}}catch(e){c.info("Cannot access parent window")}if(!e){l=await i.getProviderConfiguration()}}catch(e){c.error("Error while getting the provider configuration from the parent window",e);l={}}}return v()};g.getCollaborationServices=async function(){var e=await g.getServiceAsync();var r={oTeamsHelperService:e,oCMHelperService:new n};return Promise.resolve(r)};g.hidePluginsInMSTeams=async function(){try{const e=await a.isTeamsModeActive();if(e){let e=0;const r=1*1e3;const o={chatButton:true,"sap.das.webclientplugin.s4.shellitem":true};const n=setInterval(()=>{e++;if(e>10){clearInterval(n);return}Object.keys(o).forEach(e=>{const r=s.getElementById(e);if(r?.getVisible()===true){r.setVisible(false);o[e]=false}});const r=Object.values(o).every(e=>!e);if(r){clearInterval(n)}},r)}}catch(e){c.error("Error hiding the plugins in MS Teams",e)}};g.setCollaborationType=function(e,r){c.info("Collaboration properties are now configured");g.hidePluginsInMSTeams();l={sProvider:e,oProviderConfig:r};v();t.startInstance(l)};return g},true);
|
|
@@ -24,7 +24,6 @@ sap.ui.define(
|
|
|
24
24
|
* @since 1.108.0
|
|
25
25
|
* @private
|
|
26
26
|
* @ui5-restricted: sap.suite.ui.commons.collaboration
|
|
27
|
-
* @experimental Since 1.108
|
|
28
27
|
*
|
|
29
28
|
*/
|
|
30
29
|
return Component.extend("sap.suite.ui.commons.collaboration.flpplugins.msplugin.Component", {
|
|
@@ -103,4 +102,4 @@ sap.ui.define(
|
|
|
103
102
|
}
|
|
104
103
|
});
|
|
105
104
|
}
|
|
106
|
-
);
|
|
105
|
+
);
|