@sapui5/sap.suite.ui.commons 1.136.0 → 1.136.2
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/ChartContainerRenderer.js +1 -1
- 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/ProcessFlowRenderer.js +21 -15
- package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component-preload.js +30 -31
- package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component.js +4 -1
- 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/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/package.json
CHANGED
|
@@ -28,7 +28,7 @@ sap.ui.define(function() {
|
|
|
28
28
|
var bchildTable = false;
|
|
29
29
|
if(oControl.getContent().length > 0) {
|
|
30
30
|
for(var i = 0; i < oControl.getContent().length; i++) {
|
|
31
|
-
if (oControl.getContent()[i].getContent().isA('sap.ui.table.Table')) {
|
|
31
|
+
if (oControl.getContent()[i].getContent() && oControl.getContent()[i].getContent().isA('sap.ui.table.Table')) {
|
|
32
32
|
bchildTable = true;
|
|
33
33
|
break;
|
|
34
34
|
}
|
|
@@ -190,6 +190,9 @@ sap.ui.define([
|
|
|
190
190
|
oRm.attr("tabindex", 0);
|
|
191
191
|
}
|
|
192
192
|
oRm.openEnd();
|
|
193
|
+
oRm.openStart("span").class("sapUiPseudoInvisibleText").openEnd();
|
|
194
|
+
oRm.text(this._oResBundle.getText("PF_ARIA_PROCESS_FLOW_EMPTY_NODE_DESC"));
|
|
195
|
+
oRm.close("span");
|
|
193
196
|
isTDTagOpen = false;
|
|
194
197
|
}
|
|
195
198
|
connection.setZoomLevel(oControl.getZoomLevel());
|
|
@@ -325,18 +328,21 @@ sap.ui.define([
|
|
|
325
328
|
if (iMatrixDim1 > 0) {
|
|
326
329
|
oRm.openStart("tr").openEnd();
|
|
327
330
|
oRm.openStart("td");
|
|
328
|
-
oRm.attr("aria-label", this._oResBundle.getText("PF_ARIA_PROCESS_FLOW_EMPTY_NODE_DESC"));
|
|
329
331
|
oRm.attr("colspan", (laneNumber * 5).toString());
|
|
330
332
|
oRm.openEnd();
|
|
331
|
-
oRm.openStart("
|
|
333
|
+
oRm.openStart("span").class("sapUiPseudoInvisibleText").openEnd();
|
|
334
|
+
oRm.text(this._oResBundle.getText("PF_ARIA_PROCESS_FLOW_EMPTY_NODE_DESC"));
|
|
335
|
+
oRm.close("span");
|
|
332
336
|
oRm.close("td");
|
|
333
337
|
oRm.close("tr");
|
|
334
338
|
}
|
|
335
339
|
i = 0;
|
|
336
340
|
while (i < iMatrixDim1) {
|
|
337
341
|
oRm.openStart("tr").openEnd();
|
|
338
|
-
oRm.openStart("td").
|
|
339
|
-
oRm.openStart("
|
|
342
|
+
oRm.openStart("td").openEnd();
|
|
343
|
+
oRm.openStart("span").class("sapUiPseudoInvisibleText").openEnd();
|
|
344
|
+
oRm.text(this._oResBundle.getText("PF_ARIA_PROCESS_FLOW_EMPTY_NODE_DESC"));
|
|
345
|
+
oRm.close("span");
|
|
340
346
|
oRm.close("td");
|
|
341
347
|
|
|
342
348
|
iMatrixDim2 = calculatedMatrix[i].length;
|
|
@@ -345,10 +351,8 @@ sap.ui.define([
|
|
|
345
351
|
while (j < iMatrixDim2 - 1) {
|
|
346
352
|
oNode = calculatedMatrix[i][j];
|
|
347
353
|
var isTDTagOpen = true; //Indicates if td element tag is open.
|
|
348
|
-
var noColSpan;
|
|
349
354
|
if ((j == 0) || (j % 2)) {
|
|
350
355
|
oRm.openStart("td");
|
|
351
|
-
noColSpan = true;
|
|
352
356
|
} else {
|
|
353
357
|
oRm.openStart("td").attr("colspan", "4");
|
|
354
358
|
//Needed by Chrome (cr) in order to render the connections correctly on the
|
|
@@ -366,27 +370,29 @@ sap.ui.define([
|
|
|
366
370
|
row: i,
|
|
367
371
|
column: j
|
|
368
372
|
}, oControl, bSelectedOrHighlightedWasFound);
|
|
369
|
-
oRm.attr("aria-label", this._oResBundle.getText("PF_ARIA_PROCESS_FLOW_EMPTY_NODE_DESC"));
|
|
370
373
|
isTDTagOpen = ProcessFlowRenderer._renderConnection(oRm, oControl, oNode, isTDTagOpen);
|
|
371
374
|
}
|
|
372
375
|
}
|
|
373
|
-
else if (noColSpan) {
|
|
374
|
-
oRm.attr("aria-label", this._oResBundle.getText("PF_ARIA_PROCESS_FLOW_EMPTY_NODE_DESC"));
|
|
375
|
-
}
|
|
376
376
|
if (isTDTagOpen) {
|
|
377
377
|
oRm.openEnd();
|
|
378
|
-
oRm.openStart("
|
|
378
|
+
oRm.openStart("span").class("sapUiPseudoInvisibleText").openEnd();
|
|
379
|
+
oRm.text(this._oResBundle.getText("PF_ARIA_PROCESS_FLOW_EMPTY_NODE_DESC"));
|
|
380
|
+
oRm.close("span");
|
|
379
381
|
}
|
|
380
382
|
oRm.close("td");
|
|
381
383
|
j++;
|
|
382
384
|
}
|
|
383
385
|
|
|
384
386
|
//The last space after a node + space under the end symbol.
|
|
385
|
-
oRm.openStart("td").
|
|
386
|
-
oRm.openStart("
|
|
387
|
+
oRm.openStart("td").openEnd();
|
|
388
|
+
oRm.openStart("span").class("sapUiPseudoInvisibleText").openEnd();
|
|
389
|
+
oRm.text(this._oResBundle.getText("PF_ARIA_PROCESS_FLOW_EMPTY_NODE_DESC"));
|
|
390
|
+
oRm.close("span");
|
|
387
391
|
oRm.close("td");
|
|
388
|
-
oRm.openStart("td").
|
|
389
|
-
oRm.openStart("
|
|
392
|
+
oRm.openStart("td").openEnd();
|
|
393
|
+
oRm.openStart("span").class("sapUiPseudoInvisibleText").openEnd();
|
|
394
|
+
oRm.text(this._oResBundle.getText("PF_ARIA_PROCESS_FLOW_EMPTY_NODE_DESC"));
|
|
395
|
+
oRm.close("span");
|
|
390
396
|
oRm.close("td");
|
|
391
397
|
oRm.close("tr");
|
|
392
398
|
i++;
|
|
@@ -1,33 +1,32 @@
|
|
|
1
1
|
sap.ui.require.preload({
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
sap.ui.define(["sap/base/Log","sap/ui/core/Core","sap/base/security/URLListValidator","./CollaborationHelper","./BaseHelperService","sap/ui/core/Element","./ContactHelper","sap/ui/Device","./CollaborationCardHelper","sap/ui/core/Fragment","sap/m/MessageBox","sap/ui/core/Lib","sap/m/Popover","sap/m/HBox","sap/m/VBox","sap/m/MessageStrip","sap/m/Button","./CollaborationContactInfoHelper","sap/m/library","sap/m/FlexBox","sap/base/i18n/Localization","./CollaborationManagerService","sap/m/FlexItemData"],function(e,t,a,i,o,n,r,s,l,c,p,u,d,h,m,C,f,g,b,S,T,A,v){var _,o=o.extend("sap.suite.ui.commons.collaboration.TeamsHelperService",{constructor:function(e){this._providerConfig=e,this._providerConfig.shareAsLinkUrl="https://teams.microsoft.com/share",this._getShareAsTabUrl().then(function(e){this._providerConfig.shareAsTabUrl=e}.bind(this))}}),O="db5b69c6-0430-4ae1-8d6e-a65c2220b50c",y=e.getLogger("sap.suite.ui.commons.collaboration.TeamsHelperService"),L=u.getResourceBundleFor("sap.suite.ui.commons");let E;var P={},I="width=720,height=720";return o.prototype.getOptions=function(e){P={isShareAsLinkEnabled:!e||void 0===e.isShareAsLinkEnabled||e.isShareAsLinkEnabled,isShareAsTabEnabled:!e||void 0===e.isShareAsTabEnabled||e.isShareAsTabEnabled,isShareAsCardEnabled:!(!e||void 0===e.isShareAsCardEnabled)&&e.isShareAsCardEnabled};var t=[],e=[];if(s.system.desktop?P.isShareAsLinkEnabled?"X"===this._providerConfig.isShareAsLinkEnabled?t.push({text:L.getText("COLLABORATION_MSTEAMS_CHAT"),key:"COLLABORATION_MSTEAMS_CHAT",icon:"sap-icon://post",fesrStepName:"MST:ShareAsLink"}):y.info("Share as Chat option is not enabled in the tenant"):y.info("Consumer disable Share as Chat option"):y.info("Share as Chat option is not supported in Phone and Tablet"),s.system.desktop?P.isShareAsTabEnabled?"X"===this._providerConfig.isShareAsTabEnabled?t.push({text:L.getText("COLLABORATION_MSTEAMS_TAB"),key:"COLLABORATION_MSTEAMS_TAB",icon:"sap-icon://image-viewer",fesrStepName:"MST:ShareAsTab"}):y.info("Share as Tab option is not enabled in the tenant"):y.info("Consumer disable Share as Tab option"):y.info("Share as Tab option is not supported in Phone and Tablet"),s.system.desktop)if(P.isShareAsCardEnabled){var a=this._providerConfig.isShareAsCardEnabled,o="X"===this._providerConfig.isShareAsTabEnabled,n={text:L.getText("COLLABORATION_MSTEAMS_CARD"),key:"COLLABORATION_MSTEAMS_CARD",icon:"sap-icon://ui-notifications",fesrStepName:"MST:ShareAsCard"};switch(a){case"DISABLED":y.info("Share as Card option is not enabled in the tenant");break;case"ENABLED":case"AUTHENABLE":t.push(n);break;case"":case void 0:o?t.push(n):y.info("Share as Card option is not enabled in the tenant");break;default:y.info("Share as Card option is not enabled in the tenant")}}else y.info("Consumer disable Share as Card option");else y.info("Share as Card option is not supported in Phone and Tablet");return 1===t.length?"COLLABORATION_MSTEAMS_CHAT"===(e=t)[0].key?e[0].text=L.getText("COLLABORATION_MSTEAMS_CHAT_SINGLE"):"COLLABORATION_MSTEAMS_TAB"===e[0].key?e[0].text=L.getText("COLLABORATION_MSTEAMS_TAB_SINGLE"):"COLLABORATION_MSTEAMS_CARD"===e[0].key&&(e[0].text=L.getText("COLLABORATION_MSTEAMS_CARD_SINGLE")):1<t.length&&e.push({type:"microsoft",text:L.getText("COLLABORATION_MSTEAMS_SHARE"),icon:"sap-icon://collaborate",subOptions:t}),e},o.prototype.share=function(e,t){t.url?a.validate(t.url)?"COLLABORATION_MSTEAMS_CHAT"===e.key?this._shareAsChat(t):"COLLABORATION_MSTEAMS_TAB"===e.key?this._shareAsTab(t):"COLLABORATION_MSTEAMS_CARD"===e.key&&this._shareAsCard(t):y.error("Invalid URL supplied"):y.error("url is not supplied in object so terminating Click")},o.prototype._shareAsChat=function(t){var a=window.open("","_blank",I),o=t.appTitle;0<t.subTitle.length&&(o+=": "+t.subTitle),a.opener=null,t.minifyUrlForChat?i.compactHash(t.url,[]).then(async function(e){e=await this._modifyUrlForNavigationContext(t.url,e.url);a.location=this._providerConfig.shareAsLinkUrl+"?msgText="+encodeURIComponent(o)+"&preview=false&href="+encodeURIComponent(e)}.bind(this)):a.location=this._providerConfig.shareAsLinkUrl+"?msgText="+encodeURIComponent(o)+"&preview=false&href="+encodeURIComponent(t.url)},o.prototype._modifyUrlForShareAsTab=async function(e){var t,a,o,n=e.indexOf("#");return-1!==n&&(o="sap-ushell-config=lean&sap-collaboration-teams=true",-1!==(a=(t=e.substring(0,n)).indexOf("?",0))?t=t.substring(0,a+1)+o+"&"+t.substring(a+1):t+="?"+o,e=t+e.substring(n),e=await this._addNavmodeInUrl(e,"explace")),e},o.prototype._shareAsTab=async function(e){var t=await this._modifyUrlForShareAsTab(e.url),a={subEntityId:{url:t,appTitle:e.appTitle,subTitle:e.subTitle,mode:"tab"}};e.minifyUrlForChat?i.compactHash(t,[]).then(async function(e){e=await this._modifyUrlForNavigationContext(t,e.url),a.subEntityId.url=await this._addNavmodeInUrl(e,"explace"),e=this._providerConfig.shareAsTabUrl+"?&context="+encodeURIComponent(JSON.stringify(a));sap.m.URLHelper.redirect(e,!0)}.bind(this)):(e=this._providerConfig.shareAsTabUrl+"?&context="+encodeURIComponent(JSON.stringify(a)),sap.m.URLHelper.redirect(e,!0))},o.prototype._addNavmodeInUrl=function(n,i){var e=sap.ui.require("sap/ushell/Container");return e&&e.getServiceAsync("URLParsing").then(function(e){var t=(o=n).indexOf("#"),a=e.parseShellHash(o.substring(t)),e=(a.params["sap-ushell-navmode"]=i,a.params["sap-ushell-next-navmode"]=i,e.constructShellHash(a)),o=o.substring(0,t)+"#"+e;return Promise.resolve(o)})},o.prototype._modifyUrlForNavigationContext=function(o,n){var e;return o===n?Promise.resolve(n):(e=sap.ui.require("sap/ushell/Container"))&&e.getServiceAsync("URLParsing").then(function(e){var t=o,a=t.indexOf("#"),e=e.parseShellHash(t.substring(a)),t=Object.keys(e.params).length,a=new URL(n);return 0<t&&(a.searchParams.has("sap-collaboration-teams")?a.searchParams.delete("sap-collaboration-teams"):a.searchParams.set("sap-collaboration-teams","true")),Promise.resolve(a.toString())})},o.prototype._shareAsCard=function(n){n.cardId&&0<n.cardId.length&&n.cardManifest&&this.isFeatureFlagEnabled()?(n.cardManifest.rtl=T.getRTL(),c.load({name:"sap.suite.ui.commons.collaboration.CollaborationBusyDialog",controller:this,type:"XML"}).then(function(e){(_=e).open(),E=setTimeout(function(){_.close(),_.destroy()},6e4),l.postCard(n.cardId,n.cardManifest).then(function(e){var t=!0,a={cardId:e.card_id,version:e.version};if(e.error)if("APS_UI_MSG/001"===e.error.code){if(t=!0,a.cardId=n.cardId,0<e.error.message.length)try{var o=JSON.parse(atob(e.error.message)).version;a.version=o}catch(e){t=!1}}else t=!1;t?this._updateUrl(n,a):(p.error(L.getText("SAVE_CARD_ERROR")),this._closeBusyDailog())}.bind(this))}.bind(this))):this._updateUrl(n,{})},o.prototype._updateUrl=async function(o,n){var e,t;o.minifyUrlForChat?i.compactHash(o.url,[]).then(async function(e){var t,a,e=await this._modifyUrlForNavigationContext(o.url,e.url);P.isShareAsTabEnabled&&this._providerConfig.isShareAsTabEnabled&&(t=await this._modifyUrlForShareAsTab(o.url),(a=(await i.compactHash(t,[])).url.split("sap-url-hash=")[1])?e+="&sap-stageview-hash="+a:(t=await this._modifyUrlForShareAsTab(e),e=await this._addNavmodeInUrl(t,"inplace"))),this._closeBusyDialogAndOpenTeamsDialog(e,o,n)}.bind(this)):(t=o.url,P.isShareAsTabEnabled&&this._providerConfig.isShareAsTabEnabled&&(e=await this._modifyUrlForShareAsTab(t),t=await this._addNavmodeInUrl(e,"inplace")),this._closeBusyDialogAndOpenTeamsDialog(t,o,n))},o.prototype._closeBusyDailog=function(){_&&(_.close(),_.destroy(),clearTimeout(E))},o.prototype._closeBusyDialogAndOpenTeamsDialog=function(e,t,a){this._closeBusyDailog();var o=window.open("","_blank",I);o.opener=null,o.location=this._addCardParamsInUrl(e,t.appTitle,a)},o.prototype._addCardParamsInUrl=function(e,t,a){return a.cardId&&(e=e+"&sap-ui-cardId="+a.cardId),e=(e=a.version?e+"&sap-ui-cardVersion="+a.version:e)+"&sap-ui-cardTitle="+encodeURIComponent(t),e=this._providerConfig.shareAsLinkUrl+"?href="+encodeURIComponent(e)},o.prototype._getShareAsTabUrl=function(){return this._getApplicationID().then(function(e){return"https://teams.microsoft.com/l/entity/"+e+"/tab"})},o.prototype._getApplicationID=function(){var e=sap.ui.require("sap/ushell/Container");return e&&e.getServiceAsync("URLParsing").then(function(t){return i._getCurrentUrl().then(function(e){var e=e.split("#")[0];return-1!==e.indexOf("?")&&(e=t&&t.parseParameters(e.substring(e.indexOf("?"))))&&e["sap-collaboration-xx-TeamsAppId"]&&e["sap-collaboration-xx-TeamsAppId"][0]&&0<e["sap-collaboration-xx-TeamsAppId"][0].length?Promise.resolve(e["sap-collaboration-xx-TeamsAppId"][0]):Promise.resolve(O)})})},o.prototype.isFeatureFlagEnabled=function(){return"AUTHENABLE"===this._providerConfig.isShareAsCardEnabled},o.prototype.isContactsCollaborationSupported=function(){return!0},o.prototype.enableContactsCollaboration=async function(e,t){var a=await i.isTeamsModeActive(),o=await g.fetchServiceStatus();return e&&o.value&&"Active"===o.value[0].FetchContacts?(this.oContactHelper||(this.oContactHelper=new r),"ENABLED"===this._providerConfig.isDirectCommunicationEnabled?this.oContactHelper.loadContactPopover(e,t,!0):this.oContactHelper.loadContactPopover(e,t)):a||!e||"ENABLED"!==this._providerConfig.isDirectCommunicationEnabled?Promise.reject():(this.oContactHelper||(this.oContactHelper=new r),this.oContactHelper.loadMinimalContactPopover(e,t))},o.prototype.getTeamsContactCollabOptions=async function(){return await i.isTeamsModeActive()||"ENABLED"!==this._providerConfig.isDirectCommunicationEnabled?Promise.reject():(this.oContactHelper||(this.oContactHelper=new r),this.oContactHelper.getTeamsContactOptions())},o.prototype.getTeamsContactStatus=async function(e){return await i.isTeamsModeActive()?Promise.reject():(this.oContactHelper||(this.oContactHelper=new r),this.oContactHelper.getTeamsContactStatus(e))},o.prototype.getCollaborationPopover=function(e,t,a,o,n){var i;void 0===t.data||""===t.data.trim()?y.error("Popover cannnot be opened without data"):(e=!e||void 0===e.isShareAsLinkEnabled||e.isShareAsLinkEnabled,n={shareToTeams:!n||void 0===n.shareToTeams||n.shareToTeams,shareToEmail:!n||void 0===n.shareToEmail||n.shareToEmail,shareToCM:!(!n||void 0===n.shareToCM)&&n.shareToCM},i=[],s.system.desktop?e?"X"===this._providerConfig.isShareAsLinkEnabled&&n.shareToTeams?i.push({text:L.getText("COLLABORATION_POPOVER_TEAMS"),icon:"sap-icon://discussion",key:"COLLABORATION_POPOVER_TEAMS"}):y.info("Share as Chat option is not enabled in the tenant"):y.info("Consumer disable Share as Chat option"):y.info("Share as Chat option is not supported in Phone and Tablet"),n.shareToEmail&&i.push({text:L.getText("COLLABORATION_POPOVER_MAIL"),icon:"sap-icon://email",key:"COLLABORATION_POPOVER_MAIL"}),this.oCollaborationManager=new A,(e=this.oCollaborationManager.getOptions())&&n.shareToCM&&i.push({text:e.text,icon:e.icon,key:"COLLABORATION_POPOVER_CM"}),1!==i.length||o||"COLLABORATION_POPOVER_MAIL"!==i[0].key?this._getPopover(t,i,o).openBy(a):this._shareData(t,i[0],o))},o.prototype._getPopover=function(e,t,a){return new d({showHeader:!1,placement:e.placement||"Auto",enableScrolling:!1,content:this._getPopoverContent(e,t,a)})},o.prototype._getPopoverContent=function(a,o,n){var e,i=new S({items:[],direction:b.FlexDirection.Column}),r=new S({direction:"Vertical"===a.sFormat?b.FlexDirection.Column:b.FlexDirection.Row,justifyContent:b.FlexJustifyContent.SpaceAround,items:[]});return o.forEach(t=>{var e=new f({text:t.text,icon:t.icon,width:"Horizontal"===a.sFormat&&3===o.length?"120px":"180px",press:e=>{e.getSource().getParent().getParent().getParent().close(),this._shareData(a,t,n)}}).addStyleClass("sapUiTinyMarginTop").addStyleClass("sapUiTinyMarginBegin");"COLLABORATION_POPOVER_TEAMS"===t.key?e.addStyleClass("sapSuiteUiCollaborationBarMSTeamsButton"+(a.sFormat||"Horizontal")):"COLLABORATION_POPOVER_CM"===t.key?e.addStyleClass("sapSuiteUiCollaborationBarCMButton"+(a.sFormat||"Horizontal")):e.addStyleClass("sapSuiteUiCollaborationBarEmailButton"+(a.sFormat||"Horizontal")),r.addItem(e),i.addItem(r)}),n&&(e=new S({justifyContent:"Vertical"===a.sFormat?b.FlexJustifyContent.Center:b.FlexJustifyContent.SpaceBetween,alignItems:b.FlexAlignItems.Center,items:[new f({text:L.getText("COLLABORATION_POPOVER_COPYURL_BUTTON"),width:"Vertical"===a.sFormat?"150px":"",press:async()=>{await this._writeToClipBoard(a.data)}}).addStyleClass("sapUiTinyMarginBeginEnd")]}),"Horizontal"!==a.sFormat&&void 0!==a.sFormat||(e.insertItem(new C({text:L.getText("COLLABORATION_POPOVER_MSGSTRIP"),showIcon:!0}).addStyleClass("sapUiTinyMarginBeginEnd").addStyleClass("sapSuiteCollaborationBarMsgStrip"),0),e.addStyleClass("sapSuiteUiCollaborationBarMsgStripHBox")),e.addStyleClass("sapUiTinyMarginBeginEnd").addStyleClass("sapUiTinyMarginTopBottom"),i.addItem(e)),("Vertical"===a.sFormat?(r.setHeight(1<o.length?50*o.length+50+"px":"80px"),r.addStyleClass("sapUiSmallMarginBottom")):(r.setHeight("110px"),r)).addStyleClass("sapUiTinyMarginEnd"),i},o.prototype._writeToClipBoard=async function(e){try{await navigator.clipboard.writeText(e)}catch(e){y.info(e)}},o.prototype._shareData=function(e,t,a){var o;"COLLABORATION_POPOVER_TEAMS"===t.key?a?(o={url:e.data,appTitle:e.title||"",subTitle:"",minifyUrlForChat:!0},this._shareAsChat(o)):(o={appTitle:e.title||"",message:e.data,showPreview:e.showPreview},this._shareSummary(o)):"COLLABORATION_POPOVER_MAIL"===t.key?sap.m.URLHelper.triggerEmail(null,e.title&&""!==e.title.trim()?e.title:null,e.data):"COLLABORATION_POPOVER_CM"===t.key&&this.oCollaborationManager.triggerH2HChat(e.title,e.data)},o.prototype._shareSummary=function(e){e={subEntityId:{appTitle:e.appTitle,mode:"summary",message:e.message,showPreview:e.showPreview}},e=this._providerConfig.shareAsTabUrl+"?&context="+encodeURIComponent(JSON.stringify(e));sap.m.URLHelper.redirect(e,!0)},o});
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
2
|
+
"sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component.js":function(){
|
|
3
|
+
sap.ui.define(["sap/ui/core/Component","sap/ushell/EventHub","sap/base/Log","../../ServiceContainer","../../CollaborationHelper"],function(n,a,e,t,o){var i=e.getLogger("sap.suite.ui.commons.collaboration.flpplugins.msplugin.Component");const r="sap-collaboration-authEndUrl";const s="CollaborationMSPluginLoaded";return n.extend("sap.suite.ui.commons.collaboration.flpplugins.msplugin.Component",{metadata:{manifest:"json",properties:{isShareAsLinkEnabled:{name:"isShareAsLinkEnabled",type:"string"},isShareAsTabEnabled:{name:"isShareAsTabEnabled",type:"string"},isShareAsCardEnabled:{name:"isShareAsCardEnabled",type:"string"},applicationId:{name:"applicationId",type:"string"},tenantId:{name:"tenantId",type:"string"},isDirectCommunicationEnabled:{name:"isDirectCommunicationEnabled",type:"string"}}},init:function(){var n=this._loadPluginConfigData();if(n){o._getCurrentUrl().then(function(n){try{const a=new URL(n);if(a.searchParams.has(r)){const n=decodeURIComponent(a.searchParams.get(r));window.location.replace(n)}}catch(n){i.error(`Error while redirecting to auth end url`)}});t.setCollaborationType("COLLABORATION_MSTEAMS",n)}else{i.error("Collaboration configuration for Microsoft Teams Integration could not be loaded.")}a.emit(s)},_loadPluginConfigData:function(){var n=this.getComponentData();if(n){return n.config}}})});
|
|
4
|
+
},
|
|
5
|
+
"sap/suite/ui/commons/collaboration/BaseHelperService.js":function(){
|
|
6
|
+
sap.ui.define(["sap/ui/base/Object"],function(t){var o=t.extend("sap.suite.ui.commons.collaboration.BaseHelperService",{constructor:function(t){this._providerConfig=t}});o.prototype.getProviderConfig=function(){return this._providerConfig};o.prototype.getOptions=function(t){return[]};o.prototype.share=function(t,o){};o.prototype.isContactsCollaborationSupported=function(){return false};o.prototype.enableContactsCollaboration=async function(t,o){return Promise.resolve({})};o.prototype.getTeamsContactCollabOptions=async function(){return Promise.resolve({})};o.prototype.isFeatureFlagEnabled=function(){return false};o.prototype.getTeamsContactStatus=async function(t){return Promise.resolve({})};o.prototype.getCollaborationPopover=function(t,o,e,n,r){};return o});
|
|
7
|
+
},
|
|
8
|
+
"sap/suite/ui/commons/collaboration/CollaborationCardHelper.js":function(){
|
|
9
|
+
sap.ui.define(["sap/ui/base/Object","sap/base/Log"],function(t,e){var a="/sap/opu/odata4/sap/aps_ui_card_srv/srvd_a2x/sap/";var r=a+"aps_ui_card/0001/";var n="Card";var o=a+"aps_ui_card/0001/"+n;var i="POST";var s="HEAD";var c=e.getLogger("sap.suite.ui.commons.collaboration.CollaborationCardHelper");var d=t.extend("sap.suite.ui.commons.collaboration.CollaborationCardHelper");d.fetchCSRFToken=function(){return fetch(r,{method:s,headers:{"X-CSRF-Token":"Fetch"}}).then(function(t){var e=t.headers.get("X-CSRF-Token");if(t.ok&&e){return e}return undefined})};d.postCard=function(t,e){return this.fetchCSRFToken().then(function(a){let r=JSON.stringify(e);try{r=btoa(JSON.stringify(e))}catch(t){c.error("Error while encoding the card content to base64 so original content passed to API: "+t)}var n=JSON.stringify({content:r,card_id:t});return fetch(o,{method:i,headers:{"X-CSRF-Token":a,"content-type":"application/json;odata.metadata=minimal;charset=utf-8"},body:n}).then(function(t){return t.json()})})};return d});
|
|
10
|
+
},
|
|
11
|
+
"sap/suite/ui/commons/collaboration/CollaborationContactInfoHelper.js":function(){
|
|
12
|
+
sap.ui.define(["sap/ui/base/Object"],function(t){var n="/sap/opu/odata4/sap/aps_ui_contact_srv/srvd_a2x/sap/";var e=n+"aps_ui_contact/0001/";var a="APS_UI_C_CONTACT";var o=n+"aps_ui_contact/0001/"+a;var r=n+"aps_ui_contact/0001/"+a;var c="APS_UI_C_PRESENCE";var i=n+"aps_ui_contact/0001/"+c;var u="APS_UI_C_CALENDAR";var h=n+"aps_ui_contact/0001/"+u;var f=n+"aps_ui_contact/0001/"+"APS_UI_C_CHECK_SERVICE";var s="GET";var C="HEAD";var d=t.extend("sap.suite.ui.commons.collaboration.CollaborationContactInfoHelper");d.fetchCSRFToken=function(){return fetch(e,{method:C,headers:{"X-CSRF-Token":"Fetch"}}).then(function(t){var n=t.headers.get("X-CSRF-Token");if(t.ok&&n){return n}return undefined})};d.fetchContact=function(t){return this.fetchCSRFToken().then(function(n){return fetch(o+"/"+t,{method:s,headers:{"X-CSRF-Token":n,"content-type":"application/json;odata.metadata=minimal;charset=utf-8"}}).then(function(t){return t.json()})})};d.fetchContactCalendar=function(t){var n=new Date;var e=h+"?$filter=mail eq '"+t+"'";if(n){e=h+"?$filter=(mail eq '"+t+"'&start_datetime eq '"+n.toISOString()+"')"}return this.fetchCSRFToken().then(function(t){return fetch(e,{method:s,headers:{"X-CSRF-Token":t,"content-type":"application/json;odata.metadata=minimal;charset=utf-8"}}).then(function(t){return t.json()})})};d.fetchContactPicture=function(t){return this.fetchCSRFToken().then(function(n){return fetch(r+"/"+t+"/photo",{method:s,headers:{"X-CSRF-Token":n}}).then(function(t){return t.blob()})})};d.fetchContactStatus=function(t){return this.fetchCSRFToken().then(function(n){return fetch(i+"?$filter=id eq '"+t+"'",{method:s,headers:{"X-CSRF-Token":n,"content-type":"application/json;odata.metadata=minimal;charset=utf-8"}}).then(function(t){return t.json()})})};d.fetchServiceStatus=function(){return this.fetchCSRFToken().then(function(t){return fetch(f,{method:s,headers:{"X-CSRF-Token":t,"content-type":"application/json;odata.metadata=minimal;charset=utf-8"}}).then(function(t){return t.json()})})};return d});
|
|
13
|
+
},
|
|
14
|
+
"sap/suite/ui/commons/collaboration/CollaborationHelper.js":function(){
|
|
15
|
+
sap.ui.define(["sap/base/Log","sap/ui/base/Object","sap/ui/core/Element","../windowmessages/CollaborationMessageConsumer"],function(e,t,n,i){var r="sap-url-hash";var s="&sap-ui-cardTitle";var a="&sap-stageview-hash";var o="&sap-ui-cardId";var l="&sap-ui-xx-cardId";var c="transient";var u=e.getLogger("sap.suite.ui.commons.collaboration.CollaborationHelper");var f=t.extend("sap.suite.ui.commons.collaboration.CollaborationHelper");f.compactHash=function(e){const t=sap.ui.require("sap/ushell/Container");if(!t){return{url:e}}return t&&t.getServiceAsync("AppState").then(async function(t){var n=t.createEmptyAppState(undefined,false);var i=this._getNextKey(n);if(!this._isEligibleForBackendPersistency(t)){u.warning("Transient flag is true. URL will not be shortened");return{url:e}}var s=this._extractURLBeforeHash(e);var a=await this._extractSemanticObjectAndAction(e);var o=false;try{o=await this._isMinificationFeasible(e)}catch(e){}if(!a||!o){return{url:e}}return this._storeUrl(e,n).then(function(){return{url:s+"#"+a+"&/"+r+"="+i}}).catch(function(t){u.warning("URL is not shortened due to an error."+t.toString());return{url:e}})}.bind(this))};f._getCurrentUrl=function(){const e=sap.ui.require("sap/ushell/Container");return e&&e?new Promise(function(t){e.getFLPUrlAsync(true).then(function(e){t(e)})}):Promise.resolve(document.URL)};f.processAndExpandHash=function(){this._hideAvatarFromShellbar();return this._getCurrentUrl().then(async function(e){if(e.indexOf(r)>-1){var t=e.split(r)[1].split("=")[1];if(e.indexOf(a)>0){t=t.split(a)[0]}else if(e.includes("info=")){t=t.includes(",")?t.split(",")[0]:t.split("&")[0]}else if(e.indexOf(o)>0||e.indexOf(l)>0){if(e.indexOf(o)>0){t=t.split(o)[0]}else{t=t.split(l)[0]}}else if(e.indexOf(s)>0){t=t.split(s)[0]}return this._retrieveURL(t).then(function(t){if(t.getData()){window.location.replace(t.getData())}else{const t=e.split(r)[0];window.location.replace(t)}return Promise.resolve()})}else if(e.indexOf(o)>-1){const t=e.split(o)[0];window.location.replace(t)}else if(e.indexOf(s)>-1){const t=sap.ui.require("sap/ushell/Container");const n=e.split(s)[0];if(t?.inAppRuntime()){await i.updateTopLevelURLforAppRuntime(n)}else{window.location.replace(n)}}return Promise.resolve()}.bind(this))};f._hideAvatarFromShellbar=function(){this.isTeamsModeActive().then(function(e){if(e){var t=n.getElementById("userActionsMenuHeaderButton");if(t){t.setVisible(false)}}})};f.isTeamsModeActive=function(){var e=false;const t=sap.ui.require("sap/ushell/Container");if(t){return t.getServiceAsync("URLParsing").then(function(t){return this._getCurrentUrl().then(function(n){var i=n.split("#")[0];if(i.indexOf("?")!==-1){var r=t&&t.parseParameters(i.substring(i.indexOf("?")));if(r&&r["sap-collaboration-teams"]&&r["sap-collaboration-teams"][0]&&r["sap-collaboration-teams"][0]==="true"){e=true}var s=false;if(r&&r["sap-ushell-config"]&&r["sap-ushell-config"][0]&&r["sap-ushell-config"][0]==="lean"){s=true}return Promise.resolve(e&&s)}else{return Promise.resolve(false)}})}.bind(this))}else{return Promise.resolve(false)}};f._retrieveURL=function(e){const t=sap.ui.require("sap/ushell/Container");return t&&t.getServiceAsync("AppState").then(function(t){return t.getAppState(e)})};f._isEligibleForBackendPersistency=function(e){return e&&e._oConfig&&c in e._oConfig&&!e._oConfig[c]};f._getNextKey=function(e){return e.getKey()};f._extractSemanticObjectAndAction=function(e){const t=sap.ui.require("sap/ushell/Container");return t&&t.getServiceAsync("URLParsing").then(function(t){var n=t.parseShellHash(this._extractURLHash(e));if(n){return Promise.resolve(n.contextRaw?n.semanticObject+"-"+n.action+"~"+n.contextRaw:n.semanticObject+"-"+n.action)}}.bind(this))};f._isMinificationFeasible=async function(e){const t=sap.ui.require("sap/ushell/Container");if(t){const r=await t.getServiceAsync("NavTargetResolution");const s=await t.getServiceAsync("URLParsing");var n=s.parseShellHash(this._extractURLHash(e));var i=Object.keys(n.params).length;if(i>0){return r.resolveHashFragment(`#${n.semanticObject}-${n.action}`).then(function(e){return true}).catch(function(e){return false})}else{return Promise.resolve(true)}}return Promise.resolve(false)};f._extractURLBeforeHash=function(e){var t=e.split("#")[0];return t};f._extractURLHash=function(e){var t=e.substring(e.indexOf("#"));return t};f._storeUrl=function(e,t){t.setData(e);return t.save()};return f});
|
|
16
|
+
},
|
|
17
|
+
"sap/suite/ui/commons/collaboration/CollaborationManagerService.js":function(){
|
|
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
|
+
},
|
|
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){var t=await r.fetchContact(e);t.calendar=await r.fetchContactCalendar(e);t=this.determineContactStatus(t);return[{key:"profileStatus",badgeIcon:t.badgeIcon,badgeValueState:t.badgeValueState,badgeTooltip:t.badgeTooltip,fesrStepName:"MST:ContactAction",calendar:t.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}})});
|
|
22
|
+
},
|
|
23
|
+
"sap/suite/ui/commons/collaboration/ServiceContainer.js":function(){
|
|
24
|
+
sap.ui.define(["sap/base/Log","./BaseHelperService","./TeamsHelperService","./CollaborationManagerService","../windowmessages/CollaborationMessageBroker","../windowmessages/CollaborationMessageConsumer","./CollaborationHelper","sap/ui/core/Element"],function(e,r,n,i,o,t,a,s){var l=e.getLogger("sap.suite.ui.commons.collaboration.ServiceContainer");var c;var u;function v(){var e;if(c&&Object.keys(c).length){var i=c.sProvider;var o=c.oProviderConfig;if(i==="COLLABORATION_MSTEAMS"){e=new n(o)}u=Promise.resolve(e);return u}e=new r({});l.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()){c=await t.getProviderConfiguration()}return v()};g.getCollaborationServices=async function(){var e=await g.getServiceAsync();var r={oTeamsHelperService:e,oCMHelperService:new i};return Promise.resolve(r)};g.hidePluginsInMSTeams=async function(){try{const e=await a.isTeamsModeActive();if(e){let e=0;const r=1*1e3;const n={chatButton:true,"sap.das.webclientplugin.s4.shellitem":true};const i=setInterval(()=>{e++;if(e>10){clearInterval(i);return}Object.keys(n).forEach(e=>{const r=s.getElementById(e);if(r?.getVisible()===true){r.setVisible(false);n[e]=false}});const r=Object.values(n).every(e=>!e);if(r){clearInterval(i)}},r)}}catch(e){l.error("Error hiding the plugins in MS Teams",e)}};g.setCollaborationType=function(e,r){l.info("Collaboration properties are now configured");g.hidePluginsInMSTeams();c={sProvider:e,oProviderConfig:r};v();o.startInstance(c)};return g},true);
|
|
25
|
+
},
|
|
26
|
+
"sap/suite/ui/commons/collaboration/TeamsHelperService.js":function(){
|
|
27
|
+
sap.ui.define(["sap/base/Log","sap/ui/core/Core","sap/base/security/URLListValidator","./CollaborationHelper","./BaseHelperService","sap/ui/core/Element","./ContactHelper","sap/ui/Device","./CollaborationCardHelper","sap/ui/core/Fragment","sap/m/MessageBox","sap/ui/core/Lib","sap/m/Popover","sap/m/HBox","sap/m/VBox","sap/m/MessageStrip","sap/m/Button","./CollaborationContactInfoHelper","sap/m/library","sap/m/FlexBox","sap/base/i18n/Localization","./CollaborationManagerService","sap/m/FlexItemData"],function(e,t,a,i,r,o,n,s,l,p,d,c,h,u,f,C,m,A,T,S,g,b,v){var _=r.extend("sap.suite.ui.commons.collaboration.TeamsHelperService",{constructor:function(e){this._providerConfig=e;this._providerConfig.shareAsLinkUrl="https://teams.microsoft.com/share";this._getShareAsTabUrl().then(function(e){this._providerConfig.shareAsTabUrl=e}.bind(this))}});var y="db5b69c6-0430-4ae1-8d6e-a65c2220b50c";var O=e.getLogger("sap.suite.ui.commons.collaboration.TeamsHelperService");var L="https://saps4hana.azure-api.net/bot/redirect?target-url=";var E=c.getResourceBundleFor("sap.suite.ui.commons");var M="info";var I;let B;const R=60*1e3;var x={};var U="width=720,height=720";_.prototype.getOptions=function(e){x={isShareAsLinkEnabled:e&&typeof e.isShareAsLinkEnabled!=="undefined"?e.isShareAsLinkEnabled:true,isShareAsTabEnabled:e&&typeof e.isShareAsTabEnabled!=="undefined"?e.isShareAsTabEnabled:true,isShareAsCardEnabled:e&&typeof e.isShareAsCardEnabled!=="undefined"?e.isShareAsCardEnabled:false};var t=[];var a=[];if(s.system.desktop){if(x.isShareAsLinkEnabled){if(this._providerConfig.isShareAsLinkEnabled==="X"){t.push({text:E.getText("COLLABORATION_MSTEAMS_CHAT"),key:"COLLABORATION_MSTEAMS_CHAT",icon:"sap-icon://post",fesrStepName:"MST:ShareAsLink"})}else{O.info("Share as Chat option is not enabled in the tenant")}}else{O.info("Consumer disable Share as Chat option")}}else{O.info("Share as Chat option is not supported in Phone and Tablet")}if(s.system.desktop){if(x.isShareAsTabEnabled){if(this._providerConfig.isShareAsTabEnabled==="X"){t.push({text:E.getText("COLLABORATION_MSTEAMS_TAB"),key:"COLLABORATION_MSTEAMS_TAB",icon:"sap-icon://image-viewer",fesrStepName:"MST:ShareAsTab"})}else{O.info("Share as Tab option is not enabled in the tenant")}}else{O.info("Consumer disable Share as Tab option")}}else{O.info("Share as Tab option is not supported in Phone and Tablet")}if(s.system.desktop){if(x.isShareAsCardEnabled){const e=this._providerConfig.isShareAsCardEnabled;const a=this._providerConfig.isShareAsTabEnabled==="X";const i={text:E.getText("COLLABORATION_MSTEAMS_CARD"),key:"COLLABORATION_MSTEAMS_CARD",icon:"sap-icon://ui-notifications",fesrStepName:"MST:ShareAsCard"};switch(e){case"DISABLED":O.info("Share as Card option is not enabled in the tenant");break;case"ENABLED":case"AUTHENABLE":t.push(i);break;case"":case undefined:if(a){t.push(i)}else{O.info("Share as Card option is not enabled in the tenant")}break;default:O.info("Share as Card option is not enabled in the tenant");break}}else{O.info("Consumer disable Share as Card option")}}else{O.info("Share as Card option is not supported in Phone and Tablet")}if(t.length===1){a=t;if(a[0].key==="COLLABORATION_MSTEAMS_CHAT"){a[0].text=E.getText("COLLABORATION_MSTEAMS_CHAT_SINGLE")}else if(a[0].key==="COLLABORATION_MSTEAMS_TAB"){a[0].text=E.getText("COLLABORATION_MSTEAMS_TAB_SINGLE")}else if(a[0].key==="COLLABORATION_MSTEAMS_CARD"){a[0].text=E.getText("COLLABORATION_MSTEAMS_CARD_SINGLE")}return a}if(t.length>1){a.push({type:"microsoft",text:E.getText("COLLABORATION_MSTEAMS_SHARE"),icon:"sap-icon://collaborate",subOptions:t})}return a};_.prototype.share=function(e,t){if(!t.url){O.error("url is not supplied in object so terminating Click");return}if(!a.validate(t.url)){O.error("Invalid URL supplied");return}if(e.key==="COLLABORATION_MSTEAMS_CHAT"){this._shareAsChat(t);return}if(e.key==="COLLABORATION_MSTEAMS_TAB"){this._shareAsTab(t);return}if(e.key==="COLLABORATION_MSTEAMS_CARD"){this._shareAsCard(t);return}};_.prototype._shareAsChat=function(e){var t=window.open("","_blank",U);var a=e.appTitle;if(e.subTitle.length>0){a+=": "+e.subTitle}t.opener=null;if(e.minifyUrlForChat){i.compactHash(e.url,[]).then(async function(i){var r=await this._modifyUrlForNavigationContext(e.url,i.url);t.location=this._providerConfig.shareAsLinkUrl+"?msgText="+encodeURIComponent(a)+"&preview=false"+"&href="+encodeURIComponent(r)}.bind(this))}else{t.location=this._providerConfig.shareAsLinkUrl+"?msgText="+encodeURIComponent(a)+"&preview=false"+"&href="+encodeURIComponent(e.url)}};_.prototype._modifyUrlForShareAsTab=async function(e,t){var a=e;var i=a.indexOf("#");if(i!==-1){var r=a.substring(0,i);var o=r.indexOf("?",0);var n="sap-ushell-config=lean&sap-collaboration-teams=true&sap-ui-fesr-env="+t;if(o!==-1){r=r.substring(0,o+1)+n+"&"+r.substring(o+1)}else{r+="?"+n}a=r+a.substring(i);a=await this._addNavmodeInUrl(a,"explace")}return a};_.prototype._shareAsTab=async function(e){var t=await this._modifyUrlForShareAsTab(e.url,"MST:T");var a={subEntityId:{url:t,appTitle:e.appTitle,subTitle:e.subTitle,mode:"tab"}};if(e.minifyUrlForChat){i.compactHash(t,[]).then(async function(e){var i=await this._modifyUrlForNavigationContext(t,e.url);a.subEntityId.url=await this._addNavmodeInUrl(i,"explace");var r=this._providerConfig.shareAsTabUrl+"?&context="+encodeURIComponent(JSON.stringify(a));sap.m.URLHelper.redirect(r,true)}.bind(this))}else{var r=this._providerConfig.shareAsTabUrl+"?&context="+encodeURIComponent(JSON.stringify(a));sap.m.URLHelper.redirect(r,true)}};_.prototype._addNavmodeInUrl=function(e,t){const a=sap.ui.require("sap/ushell/Container");return a&&a.getServiceAsync("URLParsing").then(function(a){var i=e;var r=i.indexOf("#");var o=a.parseShellHash(i.substring(r));o.params["sap-ushell-navmode"]=t;o.params["sap-ushell-next-navmode"]=t;var n=a.constructShellHash(o);i=i.substring(0,r)+"#"+n;return Promise.resolve(i)})};_.prototype._modifyUrlForNavigationContext=function(e,t){if(e===t){return Promise.resolve(t)}const a=sap.ui.require("sap/ushell/Container");return a&&a.getServiceAsync("URLParsing").then(function(a){var i=e;var r=i.indexOf("#");var o=a.parseShellHash(i.substring(r));var n=Object.keys(o.params).length;var s=new URL(t);if(n>0){if(!s.searchParams.has("sap-collaboration-teams")){s.searchParams.set("sap-collaboration-teams","true")}else{s.searchParams.delete("sap-collaboration-teams")}}return Promise.resolve(s.toString())})};_.prototype._shareAsCard=function(e){if(e.cardId&&e.cardId.length>0&&e.cardManifest&&this.isFeatureFlagEnabled()){e.cardManifest["rtl"]=g.getRTL();p.load({name:"sap.suite.ui.commons.collaboration.CollaborationBusyDialog",controller:this,type:"XML"}).then(function(t){I=t;I.open();B=setTimeout(function(){I.close();I.destroy()},R);l.postCard(e.cardId,e.cardManifest).then(function(t){var a=true;var i={cardId:t.card_id,version:t.version};if(t.error){if(t.error.code==="APS_UI_MSG/001"){a=true;i.cardId=e.cardId;if(t.error.message.length>0){try{var r=JSON.parse(atob(t.error.message)).version;i.version=r}catch(e){a=false}}}else{a=false}}if(a){this._updateUrl(e,i)}else{d.error(E.getText("SAVE_CARD_ERROR"));this._closeBusyDailog()}}.bind(this))}.bind(this))}else{this._updateUrl(e,{})}};_.prototype._updateUrl=async function(e,t){if(e.minifyUrlForChat){i.compactHash(e.url,[]).then(async function(a){var r=await this._modifyUrlForNavigationContext(e.url,a.url);if(x.isShareAsTabEnabled&&this._providerConfig.isShareAsTabEnabled){var o=await this._modifyUrlForShareAsTab(e.url,"MST:C");var n=await i.compactHash(o,[]);var s=n.url.split("sap-url-hash=")[1];if(s){r+=`,${s}`}else{o=await this._modifyUrlForShareAsTab(r,"MST:C");r=await this._addNavmodeInUrl(o,"inplace")}this._closeBusyDialogAndOpenTeamsDialog(r,e,t)}else{this._closeBusyDialogAndOpenTeamsDialog(r,e,t)}}.bind(this))}else{var a=e.url;if(x.isShareAsTabEnabled&&this._providerConfig.isShareAsTabEnabled){var r=await this._modifyUrlForShareAsTab(a,"MST:C");a=await this._addNavmodeInUrl(r,"inplace")}this._closeBusyDialogAndOpenTeamsDialog(a,e,t)}};_.prototype._closeBusyDailog=function(){if(I){I.close();I.destroy();clearTimeout(B)}};_.prototype._closeBusyDialogAndOpenTeamsDialog=function(e,t,a){this._closeBusyDailog();var i=window.open("","_blank",U);i.opener=null;i.location=this._addCardParamsInUrl(e,t.appTitle,a)};_.prototype._addCardParamsInUrl=function(e,t,a){var i=[a.cardId||"",a.version||"",encodeURIComponent(t)].filter(Boolean);e+=`&${M}=${i.join(",")}`;return`${this._providerConfig.shareAsLinkUrl}?href=${encodeURIComponent(L+e)}`};_.prototype._getShareAsTabUrl=function(){return this._getApplicationID().then(function(e){return"https://teams.microsoft.com/l/entity/"+e+"/tab"})};_.prototype._getApplicationID=function(){const e=sap.ui.require("sap/ushell/Container");return e&&e.getServiceAsync("URLParsing").then(function(e){return i._getCurrentUrl().then(function(t){var a=t.split("#")[0];if(a.indexOf("?")!==-1){var i=e&&e.parseParameters(a.substring(a.indexOf("?")));if(i&&i["sap-collaboration-xx-TeamsAppId"]&&i["sap-collaboration-xx-TeamsAppId"][0]&&i["sap-collaboration-xx-TeamsAppId"][0].length>0){return Promise.resolve(i["sap-collaboration-xx-TeamsAppId"][0])}return Promise.resolve(y)}else{return Promise.resolve(y)}})})};_.prototype.isFeatureFlagEnabled=function(){const e=this._providerConfig.isShareAsCardEnabled;return e==="AUTHENABLE"};_.prototype.isContactsCollaborationSupported=function(){return true};_.prototype.enableContactsCollaboration=async function(e,t){const a=await i.isTeamsModeActive();const r=await A.fetchServiceStatus();if(e&&r.value&&r.value&&r.value[0].FetchContacts==="Active"){if(!this.oContactHelper){this.oContactHelper=new n}if(this._providerConfig.isDirectCommunicationEnabled==="ENABLED"){return this.oContactHelper.loadContactPopover(e,t,true)}else{return this.oContactHelper.loadContactPopover(e,t)}}else if(a||!e||this._providerConfig.isDirectCommunicationEnabled!=="ENABLED"){return Promise.reject()}else{if(!this.oContactHelper){this.oContactHelper=new n}return this.oContactHelper.loadMinimalContactPopover(e,t)}};_.prototype.getTeamsContactCollabOptions=async function(){const e=await i.isTeamsModeActive();if(e||this._providerConfig.isDirectCommunicationEnabled!=="ENABLED"){return Promise.reject()}if(!this.oContactHelper){this.oContactHelper=new n}return this.oContactHelper.getTeamsContactOptions()};_.prototype.getTeamsContactStatus=async function(e){const t=await i.isTeamsModeActive();if(t){return Promise.reject()}if(!this.oContactHelper){this.oContactHelper=new n}return this.oContactHelper.getTeamsContactStatus(e)};_.prototype.getCollaborationPopover=function(e,t,a,i,r){if(t.data===undefined||t.data.trim()===""){O.error("Popover cannnot be opened without data");return}var o={isShareAsLinkEnabled:e&&typeof e.isShareAsLinkEnabled!=="undefined"?e.isShareAsLinkEnabled:true};var r={shareToTeams:r&&typeof r.shareToTeams!=="undefined"?r.shareToTeams:true,shareToEmail:r&&typeof r.shareToEmail!=="undefined"?r.shareToEmail:true,shareToCM:r&&typeof r.shareToCM!=="undefined"?r.shareToCM:false};var n=[];if(s.system.desktop){if(o.isShareAsLinkEnabled){if(this._providerConfig.isShareAsLinkEnabled==="X"&&r.shareToTeams){n.push({text:E.getText("COLLABORATION_POPOVER_TEAMS"),icon:"sap-icon://discussion",key:"COLLABORATION_POPOVER_TEAMS"})}else{O.info("Share as Chat option is not enabled in the tenant")}}else{O.info("Consumer disable Share as Chat option")}}else{O.info("Share as Chat option is not supported in Phone and Tablet")}if(r.shareToEmail){n.push({text:E.getText("COLLABORATION_POPOVER_MAIL"),icon:"sap-icon://email",key:"COLLABORATION_POPOVER_MAIL"})}this.oCollaborationManager=new b;var l=this.oCollaborationManager.getOptions();if(l&&r.shareToCM){n.push({text:l.text,icon:l.icon,key:"COLLABORATION_POPOVER_CM"})}if(n.length===1&&!i&&n[0].key==="COLLABORATION_POPOVER_MAIL"){this._shareData(t,n[0],i);return}var p=this._getPopover(t,n,i);p.openBy(a)};_.prototype._getPopover=function(e,t,a){var i=new h({showHeader:false,placement:e.placement?e.placement:"Auto",verticalScrolling:false,horizontalScrolling:false,content:this._getPopoverContent(e,t,a)});return i};_.prototype._getPopoverContent=function(e,t,a){var i=new S({items:[],direction:T.FlexDirection.Column});var r=new S({direction:e.sFormat==="Vertical"?T.FlexDirection.Column:T.FlexDirection.Row,justifyContent:T.FlexJustifyContent.SpaceAround,items:[]});t.forEach(o=>{var n=new m({text:o.text,icon:o.icon,width:e.sFormat==="Horizontal"&&t.length===3?"120px":"180px",press:t=>{t.getSource().getParent().getParent().getParent().close();this._shareData(e,o,a)}}).addStyleClass("sapUiTinyMarginTop").addStyleClass("sapUiTinyMarginBegin");if(o.key==="COLLABORATION_POPOVER_TEAMS"){n.addStyleClass("sapSuiteUiCollaborationBarMSTeamsButton"+(e.sFormat?e.sFormat:"Horizontal"))}else if(o.key==="COLLABORATION_POPOVER_CM"){n.addStyleClass("sapSuiteUiCollaborationBarCMButton"+(e.sFormat?e.sFormat:"Horizontal"))}else{n.addStyleClass("sapSuiteUiCollaborationBarEmailButton"+(e.sFormat?e.sFormat:"Horizontal"))}r.addItem(n);i.addItem(r)});if(a){var o=new S({justifyContent:e.sFormat==="Vertical"?T.FlexJustifyContent.Center:T.FlexJustifyContent.SpaceBetween,alignItems:T.FlexAlignItems.Center,items:[new m({text:E.getText("COLLABORATION_POPOVER_COPYURL_BUTTON"),width:e.sFormat==="Vertical"?"150px":"",press:async()=>{await this._writeToClipBoard(e.data)}}).addStyleClass("sapUiTinyMarginBeginEnd")]});if(e.sFormat==="Horizontal"||e.sFormat===undefined){o.insertItem(new C({text:E.getText("COLLABORATION_POPOVER_MSGSTRIP"),showIcon:true}).addStyleClass("sapUiTinyMarginBeginEnd").addStyleClass("sapSuiteCollaborationBarMsgStrip"),0);o.addStyleClass("sapSuiteUiCollaborationBarMsgStripHBox")}o.addStyleClass("sapUiTinyMarginBeginEnd").addStyleClass("sapUiTinyMarginTopBottom");i.addItem(o)}if(e.sFormat==="Vertical"){r.setHeight(t.length>1?t.length*50+50+"px":"80px");r.addStyleClass("sapUiSmallMarginBottom").addStyleClass("sapUiTinyMarginEnd")}else{r.setHeight("110px");r.addStyleClass("sapUiTinyMarginEnd")}return i};_.prototype._writeToClipBoard=async function(e){try{await navigator.clipboard.writeText(e)}catch(e){O.info(e)}};_.prototype._shareData=function(e,t,a){if(t.key==="COLLABORATION_POPOVER_TEAMS"){if(a){var i={url:e.data,appTitle:e.title?e.title:"",subTitle:"",minifyUrlForChat:true};this._shareAsChat(i)}else{var i={appTitle:e.title?e.title:"",message:e.data,showPreview:typeof e.showPreview!==undefined?e.showPreview:true};this._shareSummary(i)}}else if(t.key==="COLLABORATION_POPOVER_MAIL"){sap.m.URLHelper.triggerEmail(null,e.title&&e.title.trim()!==""?e.title:null,e.data)}else if(t.key==="COLLABORATION_POPOVER_CM"){this.oCollaborationManager.triggerH2HChat(e.title,e.data)}};_.prototype._shareSummary=function(e){var t={subEntityId:{appTitle:e.appTitle,mode:"summary",message:e.message,showPreview:e.showPreview}};var a=this._providerConfig.shareAsTabUrl+"?&context="+encodeURIComponent(JSON.stringify(t));sap.m.URLHelper.redirect(a,true)};return _});
|
|
28
|
+
},
|
|
29
|
+
"sap/suite/ui/commons/collaboration/channels/MessageChannel.js":function(){
|
|
30
|
+
sap.ui.define(["sap/ui/base/Object"],function(e){var n;var s=e.extend("sap.suite.ui.commons.collaboration.channels.MessageChannel",{postMessage:function(e,n){window.parent.postMessage({...e,_fromMessageChannel:true},n||"*")},subscribe:function(e){window.addEventListener("message",function(n){if(n?.data?._fromMessageChannel&&typeof e==="function"){e(n)}})}});return{getInstance:function(){if(!n){n=new s}return Promise.resolve(n)}}});
|
|
31
|
+
}
|
|
33
32
|
});
|
|
@@ -7,14 +7,16 @@
|
|
|
7
7
|
sap.ui.define(
|
|
8
8
|
[
|
|
9
9
|
"sap/ui/core/Component",
|
|
10
|
+
"sap/ushell/EventHub",
|
|
10
11
|
"sap/base/Log",
|
|
11
12
|
"../../ServiceContainer",
|
|
12
13
|
"../../CollaborationHelper"
|
|
13
14
|
],
|
|
14
|
-
function (Component, Log, ServiceContainer, CollaborationHelper) {
|
|
15
|
+
function (Component, EventHub, Log, ServiceContainer, CollaborationHelper) {
|
|
15
16
|
"use strict";
|
|
16
17
|
var oLogger = Log.getLogger("sap.suite.ui.commons.collaboration.flpplugins.msplugin.Component");
|
|
17
18
|
const sTeamsAuthEndUrl = "sap-collaboration-authEndUrl";
|
|
19
|
+
const sCollaborationMSPluginLoaded = "CollaborationMSPluginLoaded";
|
|
18
20
|
/**
|
|
19
21
|
* Provides the collaboration plugin information for Microsoft Teams Integration.
|
|
20
22
|
* @extends sap.ui.core.Component
|
|
@@ -92,6 +94,7 @@ sap.ui.define(
|
|
|
92
94
|
} else {
|
|
93
95
|
oLogger.error("Collaboration configuration for Microsoft Teams Integration could not be loaded.");
|
|
94
96
|
}
|
|
97
|
+
EventHub.emit(sCollaborationMSPluginLoaded);
|
|
95
98
|
},
|
|
96
99
|
|
|
97
100
|
_loadPluginConfigData: function () {
|
|
@@ -195,7 +195,7 @@ sap.ui.define([
|
|
|
195
195
|
"sap.suite.ui.commons.TargetFilterMeasureColumn",
|
|
196
196
|
"sap.suite.ui.commons.AriaProperties"
|
|
197
197
|
],
|
|
198
|
-
version: "1.136.
|
|
198
|
+
version: "1.136.2",
|
|
199
199
|
extensions: {
|
|
200
200
|
flChangeHandlers: {
|
|
201
201
|
"sap.suite.ui.commons.Timeline": "sap/suite/ui/commons/flexibility/Timeline"
|