@sapui5/sap.suite.ui.commons 1.139.0 → 1.141.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/package.json +1 -1
  2. package/src/sap/suite/ui/commons/.library +1 -1
  3. package/src/sap/suite/ui/commons/AriaProperties.js +1 -1
  4. package/src/sap/suite/ui/commons/CalculationBuilder.js +13 -2
  5. package/src/sap/suite/ui/commons/CalculationBuilderExpression.js +1 -1
  6. package/src/sap/suite/ui/commons/CalculationBuilderFunction.js +1 -1
  7. package/src/sap/suite/ui/commons/CalculationBuilderGroup.js +1 -1
  8. package/src/sap/suite/ui/commons/CalculationBuilderItem.js +1 -1
  9. package/src/sap/suite/ui/commons/CalculationBuilderValidationResult.js +1 -1
  10. package/src/sap/suite/ui/commons/CalculationBuilderVariable.js +1 -1
  11. package/src/sap/suite/ui/commons/ChartContainer.js +0 -1
  12. package/src/sap/suite/ui/commons/CloudFilePicker.js +26 -26
  13. package/src/sap/suite/ui/commons/MicroProcessFlow.js +1 -1
  14. package/src/sap/suite/ui/commons/MicroProcessFlowItem.js +1 -1
  15. package/src/sap/suite/ui/commons/TimelineRenderManager.js +25 -13
  16. package/src/sap/suite/ui/commons/collaboration/BaseHelperService.js +12 -12
  17. package/src/sap/suite/ui/commons/collaboration/CollaborationCardHelper.js +6 -5
  18. package/src/sap/suite/ui/commons/collaboration/CollaborationContactInfoHelper.js +15 -15
  19. package/src/sap/suite/ui/commons/collaboration/CollaborationHelper.js +124 -97
  20. package/src/sap/suite/ui/commons/collaboration/CollaborationManagerService.js +41 -41
  21. package/src/sap/suite/ui/commons/collaboration/ContactHelper.js +288 -286
  22. package/src/sap/suite/ui/commons/collaboration/ServiceContainer.js +33 -33
  23. package/src/sap/suite/ui/commons/collaboration/TeamsHelperService.js +337 -194
  24. package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component-preload.js +3 -3
  25. package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component.js +11 -13
  26. package/src/sap/suite/ui/commons/flexibility/changeHandler/PropertyChangeMapper.js +1 -1
  27. package/src/sap/suite/ui/commons/imageeditor/CropCustomShapeHistoryItem.js +1 -1
  28. package/src/sap/suite/ui/commons/imageeditor/CropEllipseHistoryItem.js +1 -1
  29. package/src/sap/suite/ui/commons/imageeditor/CropRectangleHistoryItem.js +1 -1
  30. package/src/sap/suite/ui/commons/imageeditor/CustomSizeItem.js +1 -1
  31. package/src/sap/suite/ui/commons/imageeditor/FilterHistoryItem.js +1 -1
  32. package/src/sap/suite/ui/commons/imageeditor/FlipHistoryItem.js +1 -1
  33. package/src/sap/suite/ui/commons/imageeditor/HistoryItem.js +1 -1
  34. package/src/sap/suite/ui/commons/imageeditor/ImageEditor.js +1 -1
  35. package/src/sap/suite/ui/commons/imageeditor/ImageEditorContainer.js +1 -1
  36. package/src/sap/suite/ui/commons/imageeditor/ImageEditorResponsiveContainer.js +1 -1
  37. package/src/sap/suite/ui/commons/imageeditor/ResizeHistoryItem.js +1 -1
  38. package/src/sap/suite/ui/commons/imageeditor/RotateHistoryItem.js +1 -1
  39. package/src/sap/suite/ui/commons/library.js +1 -1
  40. package/src/sap/suite/ui/commons/messagebundle.properties +11 -1
  41. package/src/sap/suite/ui/commons/statusindicator/Circle.js +1 -1
  42. package/src/sap/suite/ui/commons/statusindicator/CustomShape.js +1 -1
  43. package/src/sap/suite/ui/commons/statusindicator/DiscreteThreshold.js +1 -1
  44. package/src/sap/suite/ui/commons/statusindicator/FillingOption.js +1 -1
  45. package/src/sap/suite/ui/commons/statusindicator/LibraryShape.js +1 -1
  46. package/src/sap/suite/ui/commons/statusindicator/Path.js +1 -1
  47. package/src/sap/suite/ui/commons/statusindicator/PropertyThreshold.js +1 -1
  48. package/src/sap/suite/ui/commons/statusindicator/Rectangle.js +1 -1
  49. package/src/sap/suite/ui/commons/statusindicator/Shape.js +1 -1
  50. package/src/sap/suite/ui/commons/statusindicator/ShapeGroup.js +1 -1
  51. package/src/sap/suite/ui/commons/statusindicator/SimpleShape.js +1 -1
  52. package/src/sap/suite/ui/commons/statusindicator/StatusIndicator.js +1 -1
  53. package/src/sap/suite/ui/commons/taccount/TAccount.js +57 -6
  54. package/src/sap/suite/ui/commons/taccount/TAccountGroup.js +1 -1
  55. package/src/sap/suite/ui/commons/taccount/TAccountItem.js +4 -3
  56. package/src/sap/suite/ui/commons/taccount/TAccountItemProperty.js +1 -1
  57. package/src/sap/suite/ui/commons/taccount/TAccountPanel.js +1 -1
  58. package/src/sap/suite/ui/commons/themes/base/TAccount.less +28 -5
  59. package/src/sap/suite/ui/commons/windowmessages/CollaborationMessageBroker.js +0 -1
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  "sap/base/i18n/Localization",
29
29
  "./CollaborationManagerService",
30
30
  "sap/m/FlexItemData"
31
- ], function (Log, Core, URLListValidator, CollaborationHelper, BaseHelperService, Element, ContactHelper, Device, CollaborationCardHelper, Fragment, MessageBox, Library, Popover, HBox, VBox, MessageStrip, Button, CollaborationContactInfoHelper, sapMLibrary, FlexBox, Localization, CollaborationManagerService, FlexItemData) {
31
+ ], function(Log, Core, URLListValidator, CollaborationHelper, BaseHelperService, Element, ContactHelper, Device, CollaborationCardHelper, Fragment, MessageBox, Library, Popover, HBox, VBox, MessageStrip, Button, CollaborationContactInfoHelper, sapMLibrary, FlexBox, Localization, CollaborationManagerService, FlexItemData) {
32
32
  "use strict";
33
33
 
34
34
  /**
@@ -41,7 +41,7 @@ sap.ui.define([
41
41
  * @experimental Since 1.108
42
42
  */
43
43
  var TeamsHelperService = BaseHelperService.extend("sap.suite.ui.commons.collaboration.TeamsHelperService", {
44
- constructor: function (oProviderConfig) {
44
+ constructor: function(oProviderConfig) {
45
45
  this._providerConfig = oProviderConfig;
46
46
  this._providerConfig.shareAsLinkUrl = "https://teams.microsoft.com/share";
47
47
  this._getShareAsTabUrl().then(function(sShareAsTabUrl) {
@@ -53,18 +53,32 @@ sap.ui.define([
53
53
  /**
54
54
  * sTeamsAppID is hardcoded as of now, will be changed when app is published at org level.
55
55
  */
56
- var COLLABORATION_MSTEAMS_APPID = 'db5b69c6-0430-4ae1-8d6e-a65c2220b50c';
57
- var oLogger = Log.getLogger("sap.suite.ui.commons.collaboration.TeamsHelperService");
58
- var CARD_URL_PREFIX = "https://saps4hana.azure-api.net/bot/redirect?target-url=";
59
-
60
- var oResourceBundle = Library.getResourceBundleFor("sap.suite.ui.commons");
61
- var PARAM_SAP_CARD_INFO = "info";
62
-
63
- var oBusyDailog;
64
- let iTimeoutId;
65
- const AUTO_CLOSE_BUSY_DIALOG_TIME = 60 * 1000; // 1 sec = 1000, here 60 sec
66
- var oTeamsParams = {};
67
- var windowWidthAndHeight = "width=720,height=720";
56
+ const COLLABORATION_MSTEAMS_APPID = 'db5b69c6-0430-4ae1-8d6e-a65c2220b50c';
57
+ const oLogger = Log.getLogger("sap.suite.ui.commons.collaboration.TeamsHelperService");
58
+ const CARD_URL_PREFIX = "https://saps4hana.azure-api.net/bot/redirect?target-url=";
59
+ const oResourceBundle = Library.getResourceBundleFor("sap.suite.ui.commons");
60
+ const PARAM_SAP_CARD_INFO = "info";
61
+
62
+ let oBusyDialog;
63
+ let iBusyDialogTimeoutId;
64
+ const AUTO_CLOSE_BUSY_DIALOG_TIME = 60 * 1000; //60 sec
65
+ let oTeamsParams = {};
66
+ const windowWidthAndHeight = "width=720,height=720";
67
+ const validDomains = [
68
+ "*.s4hana.ondemand.com",
69
+ "*.*.s4hana.ondemand.com",
70
+ "*.*.*.s4hana.ondemand.com",
71
+ "*.cloud.sap",
72
+ "*.*.cloud.sap",
73
+ "*.*.*.cloud.sap",
74
+ "*.sapcloud.cn",
75
+ "*.*.sapcloud.cn",
76
+ "*.*.*.sapcloud.cn",
77
+ "*.saps4hanacloud.cn",
78
+ "*.*.saps4hanacloud.cn",
79
+ "*.*.*.saps4hanacloud.cn",
80
+ "*.sap.com"
81
+ ];
68
82
 
69
83
  /**
70
84
  * Gives list of all Collaboration Options
@@ -77,7 +91,7 @@ sap.ui.define([
77
91
  * @ui5-restricted
78
92
  * @experimental Since 1.108
79
93
  */
80
- TeamsHelperService.prototype.getOptions = function (oParams) {
94
+ TeamsHelperService.prototype.getOptions = function(oParams) {
81
95
  oTeamsParams = {
82
96
  isShareAsLinkEnabled: (oParams && typeof oParams.isShareAsLinkEnabled !== 'undefined') ? oParams.isShareAsLinkEnabled : true,
83
97
  isShareAsTabEnabled: (oParams && typeof oParams.isShareAsTabEnabled !== 'undefined') ? oParams.isShareAsTabEnabled : true,
@@ -128,7 +142,6 @@ sap.ui.define([
128
142
  if (Device.system.desktop) {
129
143
  if (oTeamsParams.isShareAsCardEnabled) {
130
144
  const bIsShareAsCardEnabled = this._providerConfig.isShareAsCardEnabled;
131
- const bIsShareAsTabEnabled = this._providerConfig.isShareAsTabEnabled === "X";
132
145
 
133
146
  const CARD_OBJECT = {
134
147
  "text": oResourceBundle.getText("COLLABORATION_MSTEAMS_CARD"),
@@ -145,14 +158,6 @@ sap.ui.define([
145
158
  case "AUTHENABLE":
146
159
  aOptions.push(CARD_OBJECT);
147
160
  break;
148
- case "":
149
- case undefined:
150
- if (bIsShareAsTabEnabled) {
151
- aOptions.push(CARD_OBJECT);
152
- } else {
153
- oLogger.info("Share as Card option is not enabled in the tenant");
154
- }
155
- break;
156
161
  default:
157
162
  oLogger.info("Share as Card option is not enabled in the tenant");
158
163
  break;
@@ -204,7 +209,7 @@ sap.ui.define([
204
209
  * @ui5-restricted
205
210
  * @experimental Since 1.108
206
211
  */
207
- TeamsHelperService.prototype.share = function (oOption, oParams) {
212
+ TeamsHelperService.prototype.share = function(oOption, oParams) {
208
213
 
209
214
  if (!oParams.url) {
210
215
  oLogger.error("url is not supplied in object so terminating Click");
@@ -245,7 +250,7 @@ sap.ui.define([
245
250
  * @ui5-restricted
246
251
  * @experimental Since 1.108
247
252
  */
248
- TeamsHelperService.prototype._shareAsChat = function (oParams) {
253
+ TeamsHelperService.prototype._shareAsChat = function(oParams) {
249
254
  var newWindow = window.open(
250
255
  "",
251
256
  "_blank",
@@ -258,15 +263,24 @@ sap.ui.define([
258
263
 
259
264
  newWindow.opener = null;
260
265
  if (oParams.minifyUrlForChat) {
261
- CollaborationHelper.compactHash(oParams.url, []).then(async function (sShortURL) {
266
+ CollaborationHelper.compactHash(oParams.url, []).then(async function(sShortURL) {
262
267
  var sModifiedUrl = await this._modifyUrlForNavigationContext(oParams.url, sShortURL.url);
263
- newWindow.location = this._providerConfig.shareAsLinkUrl + "?msgText=" + encodeURIComponent(sMessage) + "&preview=false" + "&href=" + encodeURIComponent(sModifiedUrl);
264
- }.bind(this));
265
- } else {
266
- newWindow.location = this._providerConfig.shareAsLinkUrl + "?msgText=" + encodeURIComponent(sMessage) + "&preview=false" + "&href=" + encodeURIComponent(oParams.url);
267
- }
268
+ newWindow.location = this._providerConfig.shareAsLinkUrl + "?msgText=" + encodeURIComponent(sMessage) + "&preview=false" + "&href=" + encodeURIComponent(sModifiedUrl);
269
+ }.bind(this));
270
+ } else {
271
+ newWindow.location = this._providerConfig.shareAsLinkUrl + "?msgText=" + encodeURIComponent(sMessage) + "&preview=false" + "&href=" + encodeURIComponent(oParams.url);
272
+ }
268
273
  };
269
274
 
275
+ /**
276
+ * Modifies the given application URL to prepare it for sharing as a tab in Microsoft Teams.
277
+ * Adds parameters to enable headerless mode and Teams collaboration context,
278
+ * as well as FESR (Frontend Subrecording) step tracking, and sets the navigation mode to "explace".
279
+ *
280
+ * @param {string} sUrl - The original application URL.
281
+ * @param {string} fesrStepName - The name of the FESR step (used for UI performance tracking).
282
+ * @returns {Promise<string>} - The modified URL suitable for Teams tab usage.
283
+ */
270
284
  TeamsHelperService.prototype._modifyUrlForShareAsTab = async function(sUrl, fesrStepName) {
271
285
  var sAppUri = sUrl;
272
286
  var iIndexOfHash = sAppUri.indexOf('#');
@@ -297,7 +311,7 @@ sap.ui.define([
297
311
  * @ui5-restricted
298
312
  * @experimental Since 1.108
299
313
  */
300
- TeamsHelperService.prototype._shareAsTab = async function (oParams) {
314
+ TeamsHelperService.prototype._shareAsTab = async function(oParams) {
301
315
  var sAppUri = await this._modifyUrlForShareAsTab(oParams.url, "MST:T");
302
316
  var oData = {
303
317
  "subEntityId": {
@@ -308,19 +322,19 @@ sap.ui.define([
308
322
  }
309
323
  };
310
324
  if (oParams.minifyUrlForChat) {
311
- CollaborationHelper.compactHash(sAppUri, []).then(async function (sShortURL) {
325
+ CollaborationHelper.compactHash(sAppUri, []).then(async function(sShortURL) {
312
326
  var sModifiedUrl = await this._modifyUrlForNavigationContext(sAppUri, sShortURL.url);
313
- oData.subEntityId.url = await this._addNavmodeInUrl(sModifiedUrl, 'explace');
314
- var sURL = this._providerConfig.shareAsTabUrl + "?&context=" + encodeURIComponent(JSON.stringify(oData));
315
- sap.m.URLHelper.redirect(sURL, true);
316
- }.bind(this));
317
- } else {
318
- var sURL = this._providerConfig.shareAsTabUrl + "?&context=" + encodeURIComponent(JSON.stringify(oData));
319
- sap.m.URLHelper.redirect(sURL, true);
320
- }
327
+ oData.subEntityId.url = await this._addNavmodeInUrl(sModifiedUrl, 'explace');
328
+ var sURL = this._providerConfig.shareAsTabUrl + "?&context=" + encodeURIComponent(JSON.stringify(oData));
329
+ sap.m.URLHelper.redirect(sURL, true);
330
+ }.bind(this));
331
+ } else {
332
+ var sURL = this._providerConfig.shareAsTabUrl + "?&context=" + encodeURIComponent(JSON.stringify(oData));
333
+ sap.m.URLHelper.redirect(sURL, true);
334
+ }
321
335
  };
322
336
 
323
- TeamsHelperService.prototype._addNavmodeInUrl = function (sURL, sNavMode) {
337
+ TeamsHelperService.prototype._addNavmodeInUrl = function(sURL, sNavMode) {
324
338
  const UshellContainer = sap.ui.require("sap/ushell/Container");
325
339
  return UshellContainer && UshellContainer.getServiceAsync("URLParsing").then(function(oURLParsing) {
326
340
  var sAppUri = sURL;
@@ -347,7 +361,7 @@ sap.ui.define([
347
361
  var oHashPartOfUri = oURLParsing.parseShellHash(sAppUri.substring(iIndexOfHash));
348
362
  var iParamsCount = Object.keys(oHashPartOfUri.params).length;
349
363
  var oUrl = new URL(sURL);
350
- if (iParamsCount > 0){
364
+ if (iParamsCount > 0) {
351
365
  if (!oUrl.searchParams.has("sap-collaboration-teams")) {
352
366
  oUrl.searchParams.set("sap-collaboration-teams", "true");
353
367
  } else {
@@ -368,129 +382,256 @@ sap.ui.define([
368
382
  * @ui5-restricted
369
383
  * @experimental Since 1.108
370
384
  */
371
- TeamsHelperService.prototype._shareAsCard = function (oParams) {
372
- if (oParams.cardId && oParams.cardId.length > 0 && oParams.cardManifest && this.isFeatureFlagEnabled()) {
373
- // Card Id and Card Manifest Passed. It will show busy helper and store card into DB.
374
- oParams.cardManifest["rtl"]= Localization.getRTL();
375
- Fragment.load({
376
- name: "sap.suite.ui.commons.collaboration.CollaborationBusyDialog",
377
- controller: this,
378
- type: "XML"
379
- }).then(function (oDialog) {
380
- oBusyDailog = oDialog;
381
- oBusyDailog.open();
382
- iTimeoutId = setTimeout(function() {
383
- oBusyDailog.close();
384
- oBusyDailog.destroy();
385
- }, AUTO_CLOSE_BUSY_DIALOG_TIME);
386
- CollaborationCardHelper.postCard(oParams.cardId, oParams.cardManifest).then(function (response) {
387
- var bSuccessScenario = true;
388
- var oResponseData = {
389
- cardId: response.card_id,
390
- version: response.version
391
- };
392
- if (response.error) {
393
- if (response.error.code === "APS_UI_MSG/001") {
394
- // Card ID with same CardManifest detail is present so it will get version and open Teams Dialog
395
- bSuccessScenario = true;
396
- oResponseData.cardId = oParams.cardId;
397
- if (response.error.message.length > 0){
398
- try {
399
- var sCardVersion = JSON.parse(atob(response.error.message)).version;
400
- oResponseData.version = sCardVersion;
401
- } catch (e) {
402
- bSuccessScenario = false;
403
- }
404
- }
405
- } else {
406
- bSuccessScenario = false;
407
- }
408
- }
409
- if (bSuccessScenario) {
410
- this._updateUrl(oParams, oResponseData);
411
- } else {
412
- MessageBox.error(oResourceBundle.getText("SAVE_CARD_ERROR"));
413
- this._closeBusyDailog();
414
- }
415
- }.bind(this));
416
- }.bind(this));
417
- } else {
385
+ TeamsHelperService.prototype._shareAsCard = async function (oParams) {
386
+ if (!oParams?.cardId || !oParams.cardId.length || !oParams.cardManifest || !this.isFeatureFlagEnabled()) {
418
387
  // Base Card to unfurl
419
388
  this._updateUrl(oParams, {});
389
+ return;
390
+ }
391
+ let oCardData = {};
392
+ try {
393
+ // Card Id and Card Manifest Passed. It will show busy helper and store card into DB.
394
+ try {
395
+ const oDialog = await Fragment.load({
396
+ name: "sap.suite.ui.commons.collaboration.CollaborationBusyDialog",
397
+ controller: this,
398
+ type: "XML"
399
+ });
400
+ oBusyDialog = oDialog;
401
+ oBusyDialog.open();
402
+
403
+ // Automatically close the dialog after a fixed time
404
+ iBusyDialogTimeoutId = setTimeout(() => {
405
+ oBusyDialog.close();
406
+ oBusyDialog.destroy();
407
+ }, AUTO_CLOSE_BUSY_DIALOG_TIME);
408
+ } catch (err) {
409
+ oLogger.error("Fragment load failed: " + err.message);
410
+ }
411
+
412
+ oCardData = await this._buildCardInfo(oParams);
413
+ } catch (err) {
414
+ oLogger.error("buildCardInfo failed: " + err.message);
415
+ } finally {
416
+ if (oCardData && Object.keys(oCardData).length === 0) {
417
+ oLogger.warn("Card info could not be saved.");
418
+ }
419
+
420
+ // Auth/Base card to unfurl
421
+ this._updateUrl(oParams, oCardData);
420
422
  }
421
423
  };
422
424
 
423
- TeamsHelperService.prototype._updateUrl = async function(oParams, oResponseData) {
424
- if (oParams.minifyUrlForChat) {
425
- CollaborationHelper.compactHash(oParams.url, []).then(async function (sShortURL) {
426
- var sModifiedUrl = await this._modifyUrlForNavigationContext(oParams.url, sShortURL.url);
427
- if (oTeamsParams.isShareAsTabEnabled && this._providerConfig.isShareAsTabEnabled) {
428
- var sUrlForTab = await this._modifyUrlForShareAsTab(oParams.url, "MST:C");
429
- var sShortURLTab = await CollaborationHelper.compactHash(sUrlForTab, []);
430
- var sStageViewHash = sShortURLTab.url.split("sap-url-hash=")[1];
431
- // Scenario in which URL shortening is enabled, but the iAppState is set to Transient.
432
- if (sStageViewHash) {
433
- sModifiedUrl += `,${sStageViewHash}`;
434
- } else {
435
- sUrlForTab = await this._modifyUrlForShareAsTab(sModifiedUrl, "MST:C");
436
- sModifiedUrl = await this._addNavmodeInUrl(sUrlForTab, 'inplace');
425
+ /**
426
+ * Builds card information for a Teams collaboration card.
427
+ * This method calls the postCard API to create or retrieve card info.
428
+ * - On success: returns { cardId, version }.
429
+ * - On business error (e.g., APS_UI_MSG/001 when card already exists):
430
+ * tries to recover the card version from the error message and still returns { cardId, version }.
431
+ * - On other business errors: returns an empty object {}.
432
+ * - On technical errors (network/CSRF/JSON parsing): the promise rejects and should be caught by the caller.
433
+ *
434
+ * @param {Object} oParams - Parameters for building the card
435
+ * @param {string} oParams.cardId - The card ID
436
+ * @param {Object} oParams.cardManifest - The card manifest metadata
437
+ * @returns {Promise<Object>} - Resolves with card information { cardId, version } or {} if not available
438
+ * (may reject on technical errors)
439
+ */
440
+ TeamsHelperService.prototype._buildCardInfo = async function (oParams) {
441
+ // Set right-to-left layout based on localization settings
442
+ oParams.cardManifest.rtl = Localization.getRTL();
443
+ const postCardResponse = await CollaborationCardHelper.postCard(oParams.cardId, oParams.cardManifest);
444
+
445
+ let oCardData = {
446
+ cardId: postCardResponse.card_id,
447
+ version: postCardResponse.version
448
+ };
449
+
450
+ // Handle special error scenario where the card already exists
451
+ if (postCardResponse.error) {
452
+ if (postCardResponse.error.code === "APS_UI_MSG/001") {
453
+ // Card ID with same CardManifest detail is present so it will get version and open Teams Dialog
454
+ oCardData.cardId = oParams.cardId;
455
+ if (postCardResponse.error.message.length > 0){
456
+ try {
457
+ const sCardVersion = JSON.parse(atob(postCardResponse.error.message)).version;
458
+ oCardData.version = sCardVersion;
459
+ } catch (e) {
460
+ oCardData = {};
437
461
  }
438
- this._closeBusyDialogAndOpenTeamsDialog(sModifiedUrl, oParams, oResponseData);
439
- } else {
440
- this._closeBusyDialogAndOpenTeamsDialog(sModifiedUrl, oParams, oResponseData);
441
462
  }
442
- }.bind(this));
443
- } else {
444
- var sModifiedUrl = oParams.url;
445
- if (oTeamsParams.isShareAsTabEnabled && this._providerConfig.isShareAsTabEnabled) {
446
- var sUrlForTab = await this._modifyUrlForShareAsTab(sModifiedUrl, "MST:C");
463
+ } else {
464
+ oCardData = {};
465
+ }
466
+ }
467
+ return oCardData;
468
+ };
469
+
470
+ /**
471
+ * Updates the URL based on parameters, optionally minifying it for chat,
472
+ * and then opens the Teams dialog with the processed URL.
473
+ *
474
+ * @param {Object} oParams - Parameters including original URL and flags.
475
+ * @param {Object} oCardData - The card data containing cardId and version.
476
+ */
477
+ TeamsHelperService.prototype._updateUrl = async function(oParams, oCardData) {
478
+ let sModifiedUrl = oParams?.url || window.location.href;
479
+ try {
480
+ if (oParams.minifyUrlForChat) {
481
+ sModifiedUrl = await this._getModifiedUrlForSharing(oParams);
482
+ } else if (oTeamsParams.isShareAsTabEnabled && this._providerConfig.isShareAsTabEnabled) {
483
+ const sUrlForTab = await this._modifyUrlForShareAsTab(sModifiedUrl, "MST:C");
447
484
  sModifiedUrl = await this._addNavmodeInUrl(sUrlForTab, 'inplace');
448
485
  }
449
- this._closeBusyDialogAndOpenTeamsDialog(sModifiedUrl, oParams, oResponseData);
486
+ } catch (error) {
487
+ oLogger.error("Error while modifying URL for sharing: " + error.message);
488
+ } finally {
489
+ // Close busy dialog and open the Teams dialog with the final URL
490
+ this._closeBusyDialogAndOpenTeamsDialog(sModifiedUrl, oParams, oCardData);
450
491
  }
451
492
  };
452
493
 
453
- TeamsHelperService.prototype._closeBusyDailog = function() {
454
- if (oBusyDailog) {
455
- oBusyDailog.close();
456
- oBusyDailog.destroy();
457
- clearTimeout(iTimeoutId);
494
+ /**
495
+ * Generates a modified URL for sharing in Microsoft Teams.
496
+ * @param {Object} oParams - Parameters containing the original URL and flags.
497
+ * @returns {Promise<string>} - A fully processed URL ready to be used for sharing.
498
+ */
499
+ TeamsHelperService.prototype._getModifiedUrlForSharing = async function(oParams) {
500
+ const sShortURL = await CollaborationHelper.compactHash(oParams.url, []);
501
+ let sModifiedUrl = await this._modifyUrlForNavigationContext(oParams.url, sShortURL.url);
502
+ let sUrlForTab = await this._modifyUrlForShareAsTab(oParams.url, "MST:C");
503
+ const sShortURLTab = await CollaborationHelper.compactHash(sUrlForTab, []);
504
+ const sStageViewHash = sShortURLTab.url.split("sap-url-hash=")[1];
505
+
506
+ if (sStageViewHash) {
507
+ sModifiedUrl += `,${sStageViewHash}`;
508
+ } else {
509
+ sUrlForTab = await this._modifyUrlForShareAsTab(sModifiedUrl, "MST:C");
510
+ sModifiedUrl = await this._addNavmodeInUrl(sUrlForTab, 'inplace');
458
511
  }
512
+
513
+ return sModifiedUrl;
459
514
  };
460
515
 
461
- TeamsHelperService.prototype._closeBusyDialogAndOpenTeamsDialog = function(sUrl, oParams, response) {
462
- this._closeBusyDailog();
463
- var newWindow = window.open(
516
+ /**
517
+ * Closes and destroys the busy dialog, and clears timeout.
518
+ */
519
+ TeamsHelperService.prototype._closeBusyDialog = function() {
520
+ if (oBusyDialog) {
521
+ oBusyDialog.close();
522
+ oBusyDialog.destroy();
523
+ clearTimeout(iBusyDialogTimeoutId);
524
+ }
525
+ };
526
+
527
+ /**
528
+ * Closes the busy dialog and opens a new Teams dialog window with card info in the URL.
529
+ *
530
+ * @param {string} sUrl - URL with card info.
531
+ * @param {Object} oParams - Parameters including original URL and flags.
532
+ * @param {Object} oCardData - The card data containing cardId and version.
533
+ */
534
+ TeamsHelperService.prototype._closeBusyDialogAndOpenTeamsDialog = function(sUrl, oParams, oCardData) {
535
+ this._closeBusyDialog();
536
+ const newWindow = window.open(
464
537
  "",
465
538
  "_blank",
466
539
  windowWidthAndHeight
467
540
  );
468
541
  newWindow.opener = null;
469
- newWindow.location = this._addCardParamsInUrl(sUrl, oParams.appTitle, response);
542
+ newWindow.location = this._generateShareAsCardUrl(sUrl, oParams.appTitle, oCardData);
470
543
  };
471
544
 
472
- TeamsHelperService.prototype._addCardParamsInUrl = function(sUrl, sAppTitle, response) {
473
- var aInfoField = [
474
- response.cardId || "",
475
- response.version || "",
476
- encodeURIComponent(sAppTitle)
477
- ].filter(Boolean);
478
- sUrl += `&${PARAM_SAP_CARD_INFO}=${aInfoField.join(",")}`;
479
- const encodeUrl = encodeURIComponent(sUrl);
545
+ /**
546
+ * Converts a wildcard pattern to a regular expression
547
+ * @param {string} pattern - The wildcard pattern to convert
548
+ * @returns {RegExp} The resulting regular expression
549
+ */
550
+ TeamsHelperService.prototype._wildcardToRegExp = function(pattern) {
551
+ return new RegExp('^' + pattern.split('*').map(function(part) {
552
+ return part.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
553
+ }).join('[^.]+') + '$', 'i');
554
+ };
555
+
556
+ /**
557
+ * Checks if a given URL's domain is valid according to the validDomains list
558
+ * @param {string} url - The URL to check
559
+ * @returns {boolean} True if the domain is valid, false otherwise
560
+ */
561
+ TeamsHelperService.prototype._isValidDomain = function(url) {
562
+ try {
563
+ const domain = new URL(url).hostname;
564
+ return validDomains.some((pattern) =>
565
+ this._wildcardToRegExp(pattern).test(domain)
566
+ );
567
+ } catch (e) {
568
+ return false;
569
+ }
570
+ };
571
+
572
+ /**
573
+ * Generates the card info URL based on the provided parameters.
574
+ *
575
+ * @param {string} sUrl - The base URL to be processed.
576
+ * @param {Object} oParams - An object containing additional parameters.
577
+ * @param {string} oParams.appTitle - The title of the application.
578
+ * @param {Object} oCardData - The card data object.
579
+ * @returns {string} The processed URL with card info parameters.
580
+ */
581
+ TeamsHelperService.prototype._getCardInfoUrl = function(sUrl, oParams, oCardData) {
582
+ const isValid = this._isValidDomain(sUrl);
583
+ const sAppTitle = oParams.appTitle;
584
+ if (isValid) {
585
+ return this._generateCardUnfurlingUrl(sUrl, oCardData, { appTitle: sAppTitle });
586
+ } else {
587
+ return this._generateShareAsCardUrl(sUrl, sAppTitle, oCardData);
588
+ }
589
+ };
590
+
591
+ /**
592
+ * Generates the full shareable Teams URL with card info.
593
+ *
594
+ * @param {string} sUrl - The card URL.
595
+ * @param {string} sAppTitle - The application title.
596
+ * @param {Object} oCardData - The card data containing cardId and version.
597
+ * @returns {string} Teams shareable URL.
598
+ */
599
+ TeamsHelperService.prototype._generateShareAsCardUrl = function(sUrl, sAppTitle, oCardData) {
600
+ const sCardInfoUrl = this._generateCardUnfurlingUrl(sUrl, oCardData, { appTitle: sAppTitle });
601
+
480
602
  // add the domain prefix to solve link unfurling issue for systems with different domain patterns
481
- return `${this._providerConfig.shareAsLinkUrl}?href=${encodeURIComponent(CARD_URL_PREFIX + encodeUrl)}`;
603
+ return `${this._providerConfig.shareAsLinkUrl}?href=${encodeURIComponent(CARD_URL_PREFIX + encodeURIComponent(sCardInfoUrl))}`;
482
604
  };
483
605
 
484
- TeamsHelperService.prototype._getShareAsTabUrl = function () {
606
+ /**
607
+ * Generates the unfurling URL with card info.
608
+ * Appends the SAP card info parameters (cardId, version, appTitle) to the given URL.
609
+ *
610
+ * @param {string} cardUrl - The base card URL to which the parameter will be appended.
611
+ * @param {Object} oCardData - The card data object containing cardId and version.
612
+ * @param {Object} oParams - The parameter object containing appTitle.
613
+ * @returns {string} The updated URL with the appended sap-card-info query parameter.
614
+ */
615
+ TeamsHelperService.prototype._generateCardUnfurlingUrl = function(cardUrl, oCardData, oParams) {
616
+ const infoFields = [
617
+ oCardData.cardId || "",
618
+ oCardData.version || "",
619
+ encodeURIComponent(oParams.appTitle || "")
620
+ ].filter(Boolean);
621
+
622
+ return `${cardUrl}&${PARAM_SAP_CARD_INFO}=${infoFields.join(",")}`;
623
+ };
624
+
625
+ TeamsHelperService.prototype._getShareAsTabUrl = function() {
485
626
  return this._getApplicationID().then(function(sTeamsAppID) {
486
627
  return "https://teams.microsoft.com/l/entity/" + sTeamsAppID + "/tab";
487
628
  });
488
629
  };
489
630
 
490
- TeamsHelperService.prototype._getApplicationID = function () {
631
+ TeamsHelperService.prototype._getApplicationID = function() {
491
632
  const UshellContainer = sap.ui.require("sap/ushell/Container");
492
633
  return UshellContainer && UshellContainer.getServiceAsync("URLParsing").then(function(oURLParsing) {
493
- return CollaborationHelper._getCurrentUrl().then(function (sCurrentUrl) {
634
+ return CollaborationHelper._getCurrentUrl().then(function(sCurrentUrl) {
494
635
  var sBeforeHashURL = sCurrentUrl.split("#")[0];
495
636
  if (sBeforeHashURL.indexOf('?') !== -1) {
496
637
  var oParsedUrl = oURLParsing && oURLParsing.parseParameters(sBeforeHashURL.substring(sBeforeHashURL.indexOf('?')));
@@ -513,7 +654,7 @@ sap.ui.define([
513
654
  * @returns {boolean} If set to true, Adaptive Card Generation is enabled
514
655
  * @private
515
656
  */
516
- TeamsHelperService.prototype.isFeatureFlagEnabled = function () {
657
+ TeamsHelperService.prototype.isFeatureFlagEnabled = function() {
517
658
  const bIsShareAsCardEnabled = this._providerConfig.isShareAsCardEnabled;
518
659
  return bIsShareAsCardEnabled === "AUTHENABLE";
519
660
  };
@@ -525,7 +666,7 @@ sap.ui.define([
525
666
  * @private
526
667
  */
527
668
 
528
- TeamsHelperService.prototype.isContactsCollaborationSupported = function () {
669
+ TeamsHelperService.prototype.isContactsCollaborationSupported = function() {
529
670
  return true;
530
671
  };
531
672
 
@@ -538,7 +679,7 @@ sap.ui.define([
538
679
  * @private
539
680
  */
540
681
 
541
- TeamsHelperService.prototype.enableContactsCollaboration = async function (sEmail, oParams) {
682
+ TeamsHelperService.prototype.enableContactsCollaboration = async function(sEmail, oParams) {
542
683
  const isTeamMode = await CollaborationHelper.isTeamsModeActive();
543
684
  const isContactServiceAvailable = await CollaborationContactInfoHelper.fetchServiceStatus();
544
685
  if (sEmail && isContactServiceAvailable.value && isContactServiceAvailable.value && isContactServiceAvailable.value[0].FetchContacts === "Active") {
@@ -567,7 +708,7 @@ sap.ui.define([
567
708
  * @private
568
709
  */
569
710
 
570
- TeamsHelperService.prototype.getTeamsContactCollabOptions = async function () {
711
+ TeamsHelperService.prototype.getTeamsContactCollabOptions = async function() {
571
712
  const isTeamMode = await CollaborationHelper.isTeamsModeActive();
572
713
  if (isTeamMode || this._providerConfig.isDirectCommunicationEnabled !== "ENABLED") {
573
714
  return Promise.reject();
@@ -585,7 +726,7 @@ sap.ui.define([
585
726
  * @private
586
727
  */
587
728
 
588
- TeamsHelperService.prototype.getTeamsContactStatus = async function (sEmail) {
729
+ TeamsHelperService.prototype.getTeamsContactStatus = async function(sEmail) {
589
730
  const isTeamMode = await CollaborationHelper.isTeamsModeActive();
590
731
  if (isTeamMode) {
591
732
  return Promise.reject();
@@ -604,25 +745,26 @@ sap.ui.define([
604
745
  * @param { object } oData Title and data to share
605
746
  * @param { string } oSource The source to which the popover is rendered.
606
747
  * @param { boolean } isLink Indicates the data is a URL or not.
748
+ * @param { object } oCollaborationOptionsConfig Configuration options for collaboration (e.g., shareToTeams, shareToEmail, shareToCM).
607
749
  *
608
750
  */
609
751
  TeamsHelperService.prototype.getCollaborationPopover = function(oParams, oData, oSource, isLink, oCollaborationOptionsConfig) {
610
- if(oData.data === undefined || oData.data.trim() === "") {
611
- oLogger.error("Popover cannnot be opened without data");
612
- return;
613
- }
752
+ if (oData.data === undefined || oData.data.trim() === "") {
753
+ oLogger.error("Popover cannnot be opened without data");
754
+ return;
755
+ }
614
756
  var oTeamsParams = {
615
757
  isShareAsLinkEnabled: (oParams && typeof oParams.isShareAsLinkEnabled !== 'undefined') ? oParams.isShareAsLinkEnabled : true
616
758
  };
617
- var oCollaborationOptionsConfig = {
759
+ var oCollaborationOptionsCfg = {
618
760
  shareToTeams: oCollaborationOptionsConfig && typeof oCollaborationOptionsConfig.shareToTeams !== "undefined" ? oCollaborationOptionsConfig.shareToTeams : true,
619
761
  shareToEmail: oCollaborationOptionsConfig && typeof oCollaborationOptionsConfig.shareToEmail !== "undefined" ? oCollaborationOptionsConfig.shareToEmail : true,
620
762
  shareToCM: oCollaborationOptionsConfig && typeof oCollaborationOptionsConfig.shareToCM !== "undefined" ? oCollaborationOptionsConfig.shareToCM : false
621
- }
763
+ };
622
764
  var aOptions = [];
623
765
  if (Device.system.desktop) {
624
766
  if (oTeamsParams.isShareAsLinkEnabled) {
625
- if (this._providerConfig.isShareAsLinkEnabled === "X" && oCollaborationOptionsConfig.shareToTeams) {
767
+ if (this._providerConfig.isShareAsLinkEnabled === "X" && oCollaborationOptionsCfg.shareToTeams) {
626
768
  aOptions.push({
627
769
  "text": oResourceBundle.getText("COLLABORATION_POPOVER_TEAMS"),
628
770
  "icon": "sap-icon://discussion",
@@ -638,7 +780,7 @@ sap.ui.define([
638
780
  } else {
639
781
  oLogger.info("Share as Chat option is not supported in Phone and Tablet");
640
782
  }
641
- if(oCollaborationOptionsConfig.shareToEmail) {
783
+ if (oCollaborationOptionsCfg.shareToEmail) {
642
784
  aOptions.push({
643
785
  "text": oResourceBundle.getText("COLLABORATION_POPOVER_MAIL"),
644
786
  "icon": "sap-icon://email",
@@ -647,48 +789,49 @@ sap.ui.define([
647
789
  }
648
790
  this.oCollaborationManager = new CollaborationManagerService();
649
791
  var oCMOption = this.oCollaborationManager.getOptions();
650
- if(oCMOption && oCollaborationOptionsConfig.shareToCM) {
792
+ if (oCMOption && oCollaborationOptionsCfg.shareToCM) {
651
793
  aOptions.push({
652
794
  "text": oCMOption.text,
653
795
  "icon": oCMOption.icon,
654
796
  "key": "COLLABORATION_POPOVER_CM"
655
797
  });
656
798
  }
657
- if(aOptions.length === 1 && !isLink && aOptions[0].key === "COLLABORATION_POPOVER_MAIL") {
658
- this._shareData(oData,aOptions[0], isLink);
659
- return
799
+ if (aOptions.length === 1 && !isLink && aOptions[0].key === "COLLABORATION_POPOVER_MAIL") {
800
+ this._shareData(oData, aOptions[0], isLink);
801
+ return;
660
802
  }
661
- var oCollaborationPopover = this._getPopover(oData,aOptions, isLink);
803
+ var oCollaborationPopover = this._getPopover(oData, aOptions, isLink);
662
804
  oCollaborationPopover.openBy(oSource);
663
- }
805
+ };
664
806
 
665
807
  /**
666
808
  *
667
809
  * @param { object } oData Title and data to share
668
810
  * @param { array } aOptions Array of available options
669
811
  * @param { boolean } isLink Indicates the data is a URL or not.
670
- * @returns Returns the final Popover to the control.
812
+ * @returns {sap.m.Popover} Returns the final Popover to the control.
671
813
  */
672
- TeamsHelperService.prototype._getPopover = function(oData,aOptions,isLink) {
814
+ TeamsHelperService.prototype._getPopover = function(oData, aOptions, isLink) {
673
815
  var oCollaborationPopover = new Popover({
674
816
  showHeader: false,
675
- placement: oData.placement? oData.placement : "Auto" ,
817
+ placement: oData.placement ? oData.placement : "Auto",
676
818
  verticalScrolling: false,
677
819
  horizontalScrolling: false,
678
- content: this._getPopoverContent(oData,aOptions,isLink)
820
+ content: this._getPopoverContent(oData, aOptions, isLink)
679
821
  });
680
822
  return oCollaborationPopover;
681
- }
823
+ };
682
824
 
683
825
  /**
684
826
  * Returns the content of popover in a FlexBox
685
827
  * @param { object } oData Title and data to share
686
828
  * @param { array } aOptions Array of available options
687
829
  * @param { boolean } isLink Indicates the data is a URL or not.
830
+ * @returns {sap.m.FlexBox} Returns the FlexBox containing the popover content.
688
831
  */
689
832
  TeamsHelperService.prototype._getPopoverContent = function(oData, aOptions, isLink) {
690
833
  var oMainFBox = new FlexBox({
691
- items:[],
834
+ items: [],
692
835
  direction: sapMLibrary.FlexDirection.Column
693
836
  });
694
837
  var oOptionFBox = new FlexBox({
@@ -698,8 +841,8 @@ sap.ui.define([
698
841
  });
699
842
  aOptions.forEach((oOption) => {
700
843
  var button = new Button({
701
- text:oOption.text,
702
- icon:oOption.icon,
844
+ text: oOption.text,
845
+ icon: oOption.icon,
703
846
  width: oData.sFormat === "Horizontal" && aOptions.length === 3 ? "120px" : "180px",
704
847
  press: (oEvent) => {
705
848
  oEvent.getSource().getParent().getParent().getParent().close();
@@ -707,9 +850,9 @@ sap.ui.define([
707
850
  }
708
851
  }).addStyleClass("sapUiTinyMarginTop").addStyleClass("sapUiTinyMarginBegin");
709
852
 
710
- if(oOption.key === "COLLABORATION_POPOVER_TEAMS") {
853
+ if (oOption.key === "COLLABORATION_POPOVER_TEAMS") {
711
854
  button.addStyleClass("sapSuiteUiCollaborationBarMSTeamsButton" + (oData.sFormat ? oData.sFormat : "Horizontal"));
712
- } else if(oOption.key === "COLLABORATION_POPOVER_CM"){
855
+ } else if (oOption.key === "COLLABORATION_POPOVER_CM") {
713
856
  button.addStyleClass("sapSuiteUiCollaborationBarCMButton" + (oData.sFormat ? oData.sFormat : "Horizontal"));
714
857
  } else {
715
858
  button.addStyleClass("sapSuiteUiCollaborationBarEmailButton" + (oData.sFormat ? oData.sFormat : "Horizontal"));
@@ -726,21 +869,21 @@ sap.ui.define([
726
869
  new Button({
727
870
  text: oResourceBundle.getText("COLLABORATION_POPOVER_COPYURL_BUTTON"),
728
871
  width: oData.sFormat === "Vertical" ? "150px" : "",
729
- press: async() => {
872
+ press: async () => {
730
873
  await this._writeToClipBoard(oData.data);
731
874
  }
732
875
  }).addStyleClass("sapUiTinyMarginBeginEnd")
733
876
  ]
734
877
  });
735
- if(oData.sFormat === "Horizontal" || oData.sFormat === undefined) {
878
+ if (oData.sFormat === "Horizontal" || oData.sFormat === undefined) {
736
879
  oCopyLinkFlexbox.insertItem(
737
880
  new MessageStrip({
738
881
  text: oResourceBundle.getText("COLLABORATION_POPOVER_MSGSTRIP"),
739
882
  showIcon: true
740
- }).addStyleClass("sapUiTinyMarginBeginEnd").addStyleClass("sapSuiteCollaborationBarMsgStrip"),0);
741
- oCopyLinkFlexbox.addStyleClass("sapSuiteUiCollaborationBarMsgStripHBox")
883
+ }).addStyleClass("sapUiTinyMarginBeginEnd").addStyleClass("sapSuiteCollaborationBarMsgStrip"), 0);
884
+ oCopyLinkFlexbox.addStyleClass("sapSuiteUiCollaborationBarMsgStripHBox");
742
885
  }
743
- oCopyLinkFlexbox.addStyleClass("sapUiTinyMarginBeginEnd").addStyleClass("sapUiTinyMarginTopBottom")
886
+ oCopyLinkFlexbox.addStyleClass("sapUiTinyMarginBeginEnd").addStyleClass("sapUiTinyMarginTopBottom");
744
887
  oMainFBox.addItem(oCopyLinkFlexbox);
745
888
  }
746
889
 
@@ -753,20 +896,20 @@ sap.ui.define([
753
896
 
754
897
  }
755
898
  return oMainFBox;
756
- }
899
+ };
757
900
 
758
901
  /**
759
902
  *
760
903
  * @param { text } sText Text to copy to the cilpboard
761
904
  * Writes the given URL to the clipboard
762
905
  */
763
- TeamsHelperService.prototype._writeToClipBoard = async function (sText) {
906
+ TeamsHelperService.prototype._writeToClipBoard = async function(sText) {
764
907
  try {
765
- await navigator.clipboard.writeText(sText);
908
+ await window.navigator.clipboard.writeText(sText);
766
909
  } catch (e) {
767
910
  oLogger.info(e);
768
911
  }
769
- }
912
+ };
770
913
 
771
914
  /**
772
915
  *
@@ -776,46 +919,46 @@ sap.ui.define([
776
919
  */
777
920
  TeamsHelperService.prototype._shareData = function(oData, oOption, isLink) {
778
921
  if (oOption.key === "COLLABORATION_POPOVER_TEAMS") {
779
- if(isLink) {
780
- var oShareData = {
922
+ if (isLink) {
923
+ var oShareDataLink = {
781
924
  url: oData.data,
782
925
  appTitle: oData.title ? oData.title : "",
783
926
  subTitle: "",
784
927
  minifyUrlForChat: true
785
- }
786
- this._shareAsChat(oShareData);
928
+ };
929
+ this._shareAsChat(oShareDataLink);
787
930
  } else {
788
- var oShareData = {
931
+ var oShareDataSummary = {
789
932
  appTitle: oData.title ? oData.title : "",
790
933
  message: oData.data,
791
- showPreview: typeof oData.showPreview !== undefined ? oData.showPreview : true
792
- }
793
- this._shareSummary(oShareData);
934
+ showPreview: typeof oData.showPreview !== "undefined" ? oData.showPreview : true
935
+ };
936
+ this._shareSummary(oShareDataSummary);
794
937
  }
795
938
  } else if (oOption.key === "COLLABORATION_POPOVER_MAIL") {
796
- sap.m.URLHelper.triggerEmail(null, oData.title && oData.title.trim() !== "" ? oData.title: null, oData.data);
939
+ sap.m.URLHelper.triggerEmail(null, oData.title && oData.title.trim() !== "" ? oData.title : null, oData.data);
797
940
  } else if (oOption.key === "COLLABORATION_POPOVER_CM") {
798
941
  this.oCollaborationManager.triggerH2HChat(oData.title, oData.data);
799
942
  }
800
- }
943
+ };
801
944
 
802
945
  /**
803
946
  * Shares the summary data (large content) to Microsoft Teams
804
947
  * @param { object } oParams Title and summary data to share
805
948
  */
806
949
  TeamsHelperService.prototype._shareSummary = function(oParams) {
807
- var oData = {
808
- "subEntityId": {
809
- "appTitle": oParams.appTitle,
810
- "mode": "summary",
811
- "message": oParams.message,
812
- "showPreview": oParams.showPreview
813
- }
814
- };
950
+ var oData = {
951
+ "subEntityId": {
952
+ "appTitle": oParams.appTitle,
953
+ "mode": "summary",
954
+ "message": oParams.message,
955
+ "showPreview": oParams.showPreview
956
+ }
957
+ };
815
958
 
816
- var sURL = this._providerConfig.shareAsTabUrl + "?&context=" + encodeURIComponent(JSON.stringify(oData));
817
- sap.m.URLHelper.redirect(sURL, true);
959
+ var sURL = this._providerConfig.shareAsTabUrl + "?&context=" + encodeURIComponent(JSON.stringify(oData));
960
+ sap.m.URLHelper.redirect(sURL, true);
818
961
 
819
- }
962
+ };
820
963
  return TeamsHelperService;
821
964
  });