@sapui5/sap.suite.ui.commons 1.131.0 → 1.132.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 (109) 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 +2 -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 +3 -2
  8. package/src/sap/suite/ui/commons/CalculationBuilderItem.js +1 -1
  9. package/src/sap/suite/ui/commons/CalculationBuilderValidationResult.js +1 -1
  10. package/src/sap/suite/ui/commons/CalculationBuilderVariable.js +1 -1
  11. package/src/sap/suite/ui/commons/CloudFilePicker.js +1 -1
  12. package/src/sap/suite/ui/commons/MicroProcessFlow.js +3 -3
  13. package/src/sap/suite/ui/commons/MicroProcessFlowItem.js +20 -17
  14. package/src/sap/suite/ui/commons/Timeline.js +2 -1
  15. package/src/sap/suite/ui/commons/collaboration/ContactPopover.fragment.xml +3 -2
  16. package/src/sap/suite/ui/commons/collaboration/ServiceContainer.js +49 -2
  17. package/src/sap/suite/ui/commons/collaboration/TeamsHelperService.js +6 -6
  18. package/src/sap/suite/ui/commons/collaboration/channels/MessageChannel.js +6 -6
  19. package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component-preload.js +33 -0
  20. package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component.js +1 -0
  21. package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/manifest.json +26 -0
  22. package/src/sap/suite/ui/commons/flexibility/changeHandler/PropertyChangeMapper.js +1 -1
  23. package/src/sap/suite/ui/commons/imageeditor/CropCustomShapeHistoryItem.js +1 -1
  24. package/src/sap/suite/ui/commons/imageeditor/CropEllipseHistoryItem.js +1 -1
  25. package/src/sap/suite/ui/commons/imageeditor/CropRectangleHistoryItem.js +1 -1
  26. package/src/sap/suite/ui/commons/imageeditor/CustomSizeItem.js +1 -1
  27. package/src/sap/suite/ui/commons/imageeditor/FilterHistoryItem.js +1 -1
  28. package/src/sap/suite/ui/commons/imageeditor/FlipHistoryItem.js +1 -1
  29. package/src/sap/suite/ui/commons/imageeditor/HistoryItem.js +1 -1
  30. package/src/sap/suite/ui/commons/imageeditor/ImageEditor.js +1 -1
  31. package/src/sap/suite/ui/commons/imageeditor/ImageEditorContainer.js +1 -1
  32. package/src/sap/suite/ui/commons/imageeditor/ImageEditorResponsiveContainer.js +1 -1
  33. package/src/sap/suite/ui/commons/imageeditor/ResizeHistoryItem.js +1 -1
  34. package/src/sap/suite/ui/commons/imageeditor/RotateHistoryItem.js +1 -1
  35. package/src/sap/suite/ui/commons/library.js +1 -1
  36. package/src/sap/suite/ui/commons/messagebundle.properties +6 -0
  37. package/src/sap/suite/ui/commons/messagebundle_ar.properties +5 -0
  38. package/src/sap/suite/ui/commons/messagebundle_bg.properties +5 -0
  39. package/src/sap/suite/ui/commons/messagebundle_ca.properties +11 -6
  40. package/src/sap/suite/ui/commons/messagebundle_cnr.properties +5 -0
  41. package/src/sap/suite/ui/commons/messagebundle_cs.properties +5 -0
  42. package/src/sap/suite/ui/commons/messagebundle_cy.properties +5 -0
  43. package/src/sap/suite/ui/commons/messagebundle_da.properties +8 -3
  44. package/src/sap/suite/ui/commons/messagebundle_de.properties +5 -0
  45. package/src/sap/suite/ui/commons/messagebundle_el.properties +5 -0
  46. package/src/sap/suite/ui/commons/messagebundle_en.properties +5 -0
  47. package/src/sap/suite/ui/commons/messagebundle_en_GB.properties +5 -0
  48. package/src/sap/suite/ui/commons/messagebundle_en_US_saprigi.properties +5 -0
  49. package/src/sap/suite/ui/commons/messagebundle_en_US_saptrc.properties +536 -528
  50. package/src/sap/suite/ui/commons/messagebundle_es.properties +8 -3
  51. package/src/sap/suite/ui/commons/messagebundle_es_MX.properties +5 -0
  52. package/src/sap/suite/ui/commons/messagebundle_et.properties +5 -0
  53. package/src/sap/suite/ui/commons/messagebundle_fi.properties +11 -6
  54. package/src/sap/suite/ui/commons/messagebundle_fr.properties +6 -1
  55. package/src/sap/suite/ui/commons/messagebundle_fr_CA.properties +5 -0
  56. package/src/sap/suite/ui/commons/messagebundle_hi.properties +5 -0
  57. package/src/sap/suite/ui/commons/messagebundle_hr.properties +5 -0
  58. package/src/sap/suite/ui/commons/messagebundle_hu.properties +5 -0
  59. package/src/sap/suite/ui/commons/messagebundle_id.properties +5 -0
  60. package/src/sap/suite/ui/commons/messagebundle_it.properties +5 -0
  61. package/src/sap/suite/ui/commons/messagebundle_iw.properties +5 -0
  62. package/src/sap/suite/ui/commons/messagebundle_ja.properties +5 -0
  63. package/src/sap/suite/ui/commons/messagebundle_kk.properties +5 -0
  64. package/src/sap/suite/ui/commons/messagebundle_ko.properties +6 -1
  65. package/src/sap/suite/ui/commons/messagebundle_lt.properties +5 -0
  66. package/src/sap/suite/ui/commons/messagebundle_lv.properties +8 -3
  67. package/src/sap/suite/ui/commons/messagebundle_mk.properties +5 -0
  68. package/src/sap/suite/ui/commons/messagebundle_ms.properties +5 -0
  69. package/src/sap/suite/ui/commons/messagebundle_nl.properties +5 -0
  70. package/src/sap/suite/ui/commons/messagebundle_no.properties +8 -3
  71. package/src/sap/suite/ui/commons/messagebundle_pl.properties +5 -0
  72. package/src/sap/suite/ui/commons/messagebundle_pt.properties +5 -0
  73. package/src/sap/suite/ui/commons/messagebundle_pt_PT.properties +5 -0
  74. package/src/sap/suite/ui/commons/messagebundle_ro.properties +6 -1
  75. package/src/sap/suite/ui/commons/messagebundle_ru.properties +5 -0
  76. package/src/sap/suite/ui/commons/messagebundle_sh.properties +5 -0
  77. package/src/sap/suite/ui/commons/messagebundle_sk.properties +5 -0
  78. package/src/sap/suite/ui/commons/messagebundle_sl.properties +5 -0
  79. package/src/sap/suite/ui/commons/messagebundle_sr.properties +5 -0
  80. package/src/sap/suite/ui/commons/messagebundle_sv.properties +5 -0
  81. package/src/sap/suite/ui/commons/messagebundle_th.properties +5 -0
  82. package/src/sap/suite/ui/commons/messagebundle_tr.properties +5 -0
  83. package/src/sap/suite/ui/commons/messagebundle_uk.properties +8 -3
  84. package/src/sap/suite/ui/commons/messagebundle_vi.properties +7 -2
  85. package/src/sap/suite/ui/commons/messagebundle_zh_CN.properties +5 -0
  86. package/src/sap/suite/ui/commons/messagebundle_zh_TW.properties +5 -0
  87. package/src/sap/suite/ui/commons/networkgraph/ElementBase.js +1 -1
  88. package/src/sap/suite/ui/commons/networkgraph/Graph.js +2 -0
  89. package/src/sap/suite/ui/commons/networkgraph/GraphMap.js +2 -0
  90. package/src/sap/suite/ui/commons/networkgraph/KeyboardNavigator.js +11 -1
  91. package/src/sap/suite/ui/commons/networkgraph/SvgBase.js +1 -1
  92. package/src/sap/suite/ui/commons/networkgraph/Tooltip.js +2 -1
  93. package/src/sap/suite/ui/commons/statusindicator/Circle.js +1 -1
  94. package/src/sap/suite/ui/commons/statusindicator/CustomShape.js +1 -1
  95. package/src/sap/suite/ui/commons/statusindicator/DiscreteThreshold.js +1 -1
  96. package/src/sap/suite/ui/commons/statusindicator/FillingOption.js +4 -3
  97. package/src/sap/suite/ui/commons/statusindicator/LibraryShape.js +1 -1
  98. package/src/sap/suite/ui/commons/statusindicator/Path.js +1 -1
  99. package/src/sap/suite/ui/commons/statusindicator/PropertyThreshold.js +1 -1
  100. package/src/sap/suite/ui/commons/statusindicator/Rectangle.js +1 -1
  101. package/src/sap/suite/ui/commons/statusindicator/Shape.js +1 -1
  102. package/src/sap/suite/ui/commons/statusindicator/ShapeGroup.js +1 -1
  103. package/src/sap/suite/ui/commons/statusindicator/SimpleShape.js +1 -1
  104. package/src/sap/suite/ui/commons/statusindicator/StatusIndicator.js +1 -1
  105. package/src/sap/suite/ui/commons/taccount/TAccount.js +1 -1
  106. package/src/sap/suite/ui/commons/taccount/TAccountGroup.js +1 -1
  107. package/src/sap/suite/ui/commons/taccount/TAccountItem.js +1 -1
  108. package/src/sap/suite/ui/commons/taccount/TAccountItemProperty.js +1 -1
  109. package/src/sap/suite/ui/commons/taccount/TAccountPanel.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.suite.ui.commons",
3
- "version": "1.131.0",
3
+ "version": "1.132.0",
4
4
  "description": "SAPUI5 Library sap.suite.ui.commons",
5
5
  "homepage": "https://sap.github.io/ui5-tooling/pages/SAPUI5/",
6
6
  "author": "SAP SE (https://www.sap.com)",
@@ -7,7 +7,7 @@
7
7
  SAP UI development toolkit for HTML5 (SAPUI5)
8
8
  (c) Copyright 2009-2015 SAP SE. All rights reserved
9
9
  </copyright>
10
- <version>1.131.0</version>
10
+ <version>1.132.0</version>
11
11
 
12
12
  <documentation>SAP UI library: sap.suite.ui.commons</documentation>
13
13
 
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @extends sap.ui.core.Element
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.131.0
22
+ * @version 1.132.0
23
23
  * @since 1.65.0
24
24
  *
25
25
  * @constructor
@@ -134,7 +134,7 @@ sap.ui.define([
134
134
  * @extends sap.ui.core.Control
135
135
  *
136
136
  * @author SAP SE
137
- * @version 1.131.0
137
+ * @version 1.132.0
138
138
  * @since 1.56.0
139
139
  *
140
140
  * @constructor
@@ -930,7 +930,7 @@ sap.ui.define([
930
930
  press: function (oEvent) {
931
931
  var oToggleButton = oEvent.getSource();
932
932
 
933
- this._toggleFullScreen();
933
+ this._toggleFullScreen(oToggleButton);
934
934
  oToggleButton.setAggregation("tooltip",
935
935
  this._bIsFullScreen
936
936
  ? oResourceBundle.getText(
@@ -148,7 +148,7 @@ sap.ui.define([
148
148
  * @extends sap.ui.core.Control
149
149
  *
150
150
  * @author SAP SE
151
- * @version 1.131.0
151
+ * @version 1.132.0
152
152
  * @since 1.56.0
153
153
  *
154
154
  * @constructor
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @extends sap.ui.core.Control
27
27
  *
28
28
  * @author SAP SE
29
- * @version 1.131.0
29
+ * @version 1.132.0
30
30
  * @since 1.56.0
31
31
  *
32
32
  * @constructor
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  * @extends sap.ui.core.Control
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.131.0
25
+ * @version 1.132.0
26
26
  * @since 1.60.0
27
27
  *
28
28
  * @constructor
@@ -81,7 +81,8 @@ sap.ui.define([
81
81
  multiple: false
82
82
  }
83
83
  }
84
- }
84
+ },
85
+ renderer: null
85
86
  });
86
87
 
87
88
  CalculationBuilderGroup.prototype._getTitle = function () {
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  * @extends sap.ui.core.Control
40
40
  *
41
41
  * @author SAP SE
42
- * @version 1.131.0
42
+ * @version 1.132.0
43
43
  * @since 1.56.0
44
44
  *
45
45
  * @constructor
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * @extends sap.ui.base.ManagedObject
22
22
  *
23
23
  * @author SAP SE
24
- * @version 1.131.0
24
+ * @version 1.132.0
25
25
  * @since 1.56.0
26
26
  *
27
27
  * @constructor
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * @extends sap.ui.core.Control
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.131.0
26
+ * @version 1.132.0
27
27
  * @since 1.56.0
28
28
  *
29
29
  * @constructor
@@ -118,7 +118,7 @@ sap.ui.define([
118
118
  * @class
119
119
  * @public
120
120
  * @internal
121
- * @version 1.131.0
121
+ * @version 1.132.0
122
122
  */
123
123
  var CloudFilePicker = Dialog.extend("sap.suite.ui.commons.CloudFilePicker", {
124
124
  metadata: {
@@ -47,7 +47,7 @@ sap.ui.define([
47
47
  * @extends sap.ui.core.Control
48
48
  *
49
49
  * @author SAP SE
50
- * @version 1.131.0
50
+ * @version 1.132.0
51
51
  *
52
52
  * @constructor
53
53
  * @public
@@ -537,8 +537,8 @@ sap.ui.define([
537
537
  this._firePress(oEvent);
538
538
  };
539
539
 
540
- MicroProcessFlow.prototype.onsapenter = function () {
541
- this._firePress();
540
+ MicroProcessFlow.prototype.onsapenter = function (oEvent) {
541
+ this._firePress(oEvent);
542
542
  };
543
543
 
544
544
  MicroProcessFlow.prototype.onsapnext = function (oEvent) {
@@ -38,7 +38,7 @@ sap.ui.define([
38
38
  * @extends sap.ui.core.Control
39
39
  *
40
40
  * @author SAP SE
41
- * @version 1.131.0
41
+ * @version 1.132.0
42
42
  *
43
43
  * @constructor
44
44
  * @public
@@ -128,8 +128,7 @@ sap.ui.define([
128
128
  }
129
129
  },
130
130
  onAfterRendering: function () {
131
- this._setupEvents();
132
- this._setAccessibility();
131
+ this._setItemAccessibility();
133
132
  },
134
133
  renderer: {
135
134
  apiVersion: 2,
@@ -235,7 +234,7 @@ sap.ui.define([
235
234
  /* =========================================================== */
236
235
  /* Private methods */
237
236
  /* =========================================================== */
238
- MicroProcessFlowItem.prototype._setAccessibility = function () {
237
+ MicroProcessFlowItem.prototype._setItemAccessibility = function () {
239
238
  var $item = this._getAccessibleItem(),
240
239
  sAriaLabel = this._getAriaText();
241
240
  if ($item.attr("tabindex") !== "0") {
@@ -245,6 +244,7 @@ sap.ui.define([
245
244
  $item.attr("role", "option");
246
245
  $item.attr("aria-posinset", this._iIndex);
247
246
  $item.attr("aria-setsize", this._iItemsCount);
247
+ this._setItemContentAccessibility();
248
248
  };
249
249
 
250
250
  MicroProcessFlowItem.prototype._getAccessibleItem = function () {
@@ -255,22 +255,10 @@ sap.ui.define([
255
255
  return $item.attr("tabindex") === "0" ? $item : this.$("item");
256
256
  };
257
257
 
258
- MicroProcessFlowItem.prototype._setupEvents = function () {
258
+ MicroProcessFlowItem.prototype._setItemContentAccessibility = function () {
259
259
  var $item = this.$("item"),
260
260
  bHasPressEvent = this.hasListeners("press");
261
261
 
262
- $item.on("touchstart click", this._click.bind(this));
263
-
264
- if (bHasPressEvent) {
265
- $item.on("mousedown", function (oEvent) {
266
- jQuery(this).addClass("sapSuiteUiCommonsMicroProcessFlowItemPressed");
267
- });
268
-
269
- $item.on("mouseup", function (oEvent) {
270
- jQuery(this).removeClass("sapSuiteUiCommonsMicroProcessFlowItemPressed");
271
- });
272
- }
273
-
274
262
  if (bHasPressEvent) {
275
263
  $item.css("cursor", "pointer");
276
264
  $item.attr("role", "button");
@@ -278,6 +266,21 @@ sap.ui.define([
278
266
  }
279
267
  };
280
268
 
269
+ MicroProcessFlowItem.prototype.onclick = function (oEvent) {
270
+ this._setItemContentAccessibility();
271
+ this._click(oEvent);
272
+ };
273
+
274
+ MicroProcessFlowItem.prototype.onmousedown = function () {
275
+ this._setItemContentAccessibility();
276
+ this.$("item").addClass("sapSuiteUiCommonsMicroProcessFlowItemPressed");
277
+ };
278
+
279
+ MicroProcessFlowItem.prototype.onmouseup = function () {
280
+ this._setItemContentAccessibility();
281
+ this.$("item").removeClass("sapSuiteUiCommonsMicroProcessFlowItemPressed");
282
+ };
283
+
281
284
  MicroProcessFlowItem.prototype._getAriaText = function () {
282
285
  var sText = oResourceBundle.getText("MICRO_PROCESS_FLOW_ITEM");
283
286
 
@@ -2849,7 +2849,8 @@ sap.ui.define([
2849
2849
 
2850
2850
  // Remove filter from model binding
2851
2851
  if (this._objects?.getFilterContent) {
2852
- this._clearFilter();
2852
+ this._objects.destroyObject("FilterContent");
2853
+ this._setupFilterDialog();
2853
2854
  }
2854
2855
 
2855
2856
  // indicates whether timeline is rendered or not
@@ -20,7 +20,8 @@
20
20
  <Text text="{userData>/jobtitle}"/>
21
21
  </VBox>
22
22
  </HBox>
23
- <Toolbar visible="{userData>/isDirectCommunicationEnabled}">
23
+ <Toolbar width="100%" height="1px" visible="{userData>/isDirectCommunicationEnabled}"/>
24
+ <OverflowToolbar visible="{userData>/isDirectCommunicationEnabled}">
24
25
  <Title text="{i18n>COLLABORATION_MSTEAMS_SHARE}" level="H5" class="sapUiTinyMarginBegin"/>
25
26
  <ToolbarSpacer/>
26
27
  <Button
@@ -52,7 +53,7 @@
52
53
  type="Ghost"
53
54
  fesr:press="MST:ContactAction"
54
55
  />
55
- </Toolbar >
56
+ </OverflowToolbar >
56
57
 
57
58
  <VBox class="sapUiSmallMarginBeginEnd sapUiSmallMarginTopBottom">
58
59
 
@@ -11,8 +11,10 @@ sap.ui.define([
11
11
  "./TeamsHelperService",
12
12
  "./CollaborationManagerService",
13
13
  "../windowmessages/CollaborationMessageBroker",
14
- "../windowmessages/CollaborationMessageConsumer"
15
- ], function (Log, BaseHelperService, TeamsHelperService, CollaborationManagerService, CollaborationMessageBroker, CollaborationMessageConsumer) {
14
+ "../windowmessages/CollaborationMessageConsumer",
15
+ "./CollaborationHelper",
16
+ "sap/ui/core/Element"
17
+ ], function (Log, BaseHelperService, TeamsHelperService, CollaborationManagerService, CollaborationMessageBroker, CollaborationMessageConsumer, CollaborationHelper, Element) {
16
18
  "use strict";
17
19
  var oLogger = Log.getLogger("sap.suite.ui.commons.collaboration.ServiceContainer");
18
20
  var oProviderConfiguration;
@@ -80,8 +82,53 @@ sap.ui.define([
80
82
  return Promise.resolve(mCollaborationServices);
81
83
  };
82
84
 
85
+ /**
86
+ * Method to hide the plugins in the shell header when loaded inside MS Teams.
87
+ */
88
+ oServiceContainer.hidePluginsInMSTeams = async function() {
89
+ try {
90
+ const bIsActive = await CollaborationHelper.isTeamsModeActive();
91
+ if (bIsActive) {
92
+ let nAttempts = 0;
93
+ const intervalTime = 1 * 1000; // 1 seccond = 1000, here 1 seccond
94
+ // Assuming all the plugins are visible
95
+ const oPluginIdsVisibility = {
96
+ 'chatButton': true,
97
+ 'sap.das.webclientplugin.s4.shellitem': true
98
+ }
99
+ const interval = setInterval(() => {
100
+ nAttempts++;
101
+ if (nAttempts > 10) {
102
+ // stop the interval after 10 attempts
103
+ // this is to avoid the infinite loop
104
+ clearInterval(interval);
105
+ return;
106
+ }
107
+
108
+ Object.keys(oPluginIdsVisibility).forEach(sPluginId => {
109
+ const oPluginElement = Element.getElementById(sPluginId);
110
+ if (oPluginElement?.getVisible() === true) {
111
+ oPluginElement.setVisible(false);
112
+ oPluginIdsVisibility[sPluginId] = false;
113
+ }
114
+ });
115
+
116
+ // check if all the plugins are invisible and end interval
117
+ const bAllInvisible = Object.values(oPluginIdsVisibility).every(bVisible => !bVisible);
118
+ if (bAllInvisible) {
119
+ clearInterval(interval);
120
+ }
121
+ }, intervalTime);
122
+ }
123
+ } catch (error) {
124
+ oLogger.error("Error hiding the plugins in MS Teams", error);
125
+ }
126
+ }
127
+
83
128
  oServiceContainer.setCollaborationType = function (sProvider, oProviderConfig) {
84
129
  oLogger.info("Collaboration properties are now configured");
130
+ oServiceContainer.hidePluginsInMSTeams();
131
+
85
132
  oProviderConfiguration = {
86
133
  sProvider: sProvider,
87
134
  oProviderConfig: oProviderConfig
@@ -269,13 +269,13 @@ sap.ui.define([
269
269
  }
270
270
  };
271
271
 
272
- TeamsHelperService.prototype._modifyUrlForShareAsTab = async function(sUrl) {
272
+ TeamsHelperService.prototype._modifyUrlForShareAsTab = async function(sUrl, fesrStepName) {
273
273
  var sAppUri = sUrl;
274
274
  var iIndexOfHash = sAppUri.indexOf('#');
275
275
  if (iIndexOfHash !== -1) {
276
276
  var sUriForHeaderLess = sAppUri.substring(0, iIndexOfHash);
277
277
  var iIndexOfQuestionMark = sUriForHeaderLess.indexOf('?', 0);
278
- var sParam = 'sap-ushell-config=lean&sap-collaboration-teams=true';
278
+ var sParam = 'sap-ushell-config=lean&sap-collaboration-teams=true&sap-ui-fesr-env=' + fesrStepName;
279
279
  if (iIndexOfQuestionMark !== -1) {
280
280
  sUriForHeaderLess = sUriForHeaderLess.substring(0, iIndexOfQuestionMark + 1) + sParam + '&' + sUriForHeaderLess.substring(iIndexOfQuestionMark + 1);
281
281
  } else {
@@ -300,7 +300,7 @@ sap.ui.define([
300
300
  * @experimental Since 1.108
301
301
  */
302
302
  TeamsHelperService.prototype._shareAsTab = async function (oParams) {
303
- var sAppUri = await this._modifyUrlForShareAsTab(oParams.url);
303
+ var sAppUri = await this._modifyUrlForShareAsTab(oParams.url, "MST:T");
304
304
  var oData = {
305
305
  "subEntityId": {
306
306
  "url": sAppUri,
@@ -427,14 +427,14 @@ sap.ui.define([
427
427
  CollaborationHelper.compactHash(oParams.url, []).then(async function (sShortURL) {
428
428
  var sModifiedUrl = await this._modifyUrlForNavigationContext(oParams.url, sShortURL.url);
429
429
  if (oTeamsParams.isShareAsTabEnabled && this._providerConfig.isShareAsTabEnabled) {
430
- var sUrlForTab = await this._modifyUrlForShareAsTab(oParams.url);
430
+ var sUrlForTab = await this._modifyUrlForShareAsTab(oParams.url, "MST:C");
431
431
  var sShortURLTab = await CollaborationHelper.compactHash(sUrlForTab, []);
432
432
  var sStageViewHash = sShortURLTab.url.split("sap-url-hash=")[1];
433
433
  // Scenario in which URL shortening is enabled, but the iAppState is set to Transient.
434
434
  if (sStageViewHash) {
435
435
  sModifiedUrl += "&" + PARAM_SAP_STAGEVIEW_HASH + "=" + sStageViewHash;
436
436
  } else {
437
- sUrlForTab = await this._modifyUrlForShareAsTab(sModifiedUrl);
437
+ sUrlForTab = await this._modifyUrlForShareAsTab(sModifiedUrl, "MST:C");
438
438
  sModifiedUrl = await this._addNavmodeInUrl(sUrlForTab, 'inplace');
439
439
  }
440
440
  this._closeBusyDialogAndOpenTeamsDialog(sModifiedUrl, oParams, oResponseData);
@@ -445,7 +445,7 @@ sap.ui.define([
445
445
  } else {
446
446
  var sModifiedUrl = oParams.url;
447
447
  if (oTeamsParams.isShareAsTabEnabled && this._providerConfig.isShareAsTabEnabled) {
448
- var sUrlForTab = await this._modifyUrlForShareAsTab(sModifiedUrl);
448
+ var sUrlForTab = await this._modifyUrlForShareAsTab(sModifiedUrl, "MST:C");
449
449
  sModifiedUrl = await this._addNavmodeInUrl(sUrlForTab, 'inplace');
450
450
  }
451
451
  this._closeBusyDialogAndOpenTeamsDialog(sModifiedUrl, oParams, oResponseData);
@@ -28,7 +28,7 @@ sap.ui.define(
28
28
  * @param {string} sTargetOrigin - The target origin of the message.
29
29
  */
30
30
  postMessage: function (oMessageData, sTargetOrigin) {
31
- window.postMessage({...oMessageData, _fromMessageChannel: true}, sTargetOrigin || "*");
31
+ window.parent.postMessage({...oMessageData, _fromMessageChannel: true}, sTargetOrigin || "*");
32
32
  },
33
33
 
34
34
  /**
@@ -36,11 +36,11 @@ sap.ui.define(
36
36
  * @param {function} fnCallback - The callback function to execute when a message event occurs.
37
37
  */
38
38
  subscribe: function (fnCallback) {
39
- window.parent.addEventListener("message", function (event) {
40
- if (event?.data?._fromMessageChannel && typeof fnCallback === "function") {
41
- fnCallback(event);
42
- }
43
- });
39
+ window.addEventListener("message", function (event) {
40
+ if (event?.data?._fromMessageChannel && typeof fnCallback === "function") {
41
+ fnCallback(event);
42
+ }
43
+ });
44
44
  }
45
45
  });
46
46
 
@@ -0,0 +1,33 @@
1
+ sap.ui.require.preload({
2
+ "sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component.js": function() {
3
+ sap.ui.define(["sap/ui/core/Component","sap/base/Log","../../ServiceContainer"],function(n,a,i){var e=a.getLogger("sap.suite.ui.commons.collaboration.flpplugins.msplugin.Component");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();n?i.setCollaborationType("COLLABORATION_MSTEAMS",n):e.error("Collaboration configuration for Microsoft Teams Integration could not be loaded.")},_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(e){e=e.extend("sap.suite.ui.commons.collaboration.BaseHelperService",{constructor:function(e){this._providerConfig=e}});return e.prototype.getProviderConfig=function(){return this._providerConfig},e.prototype.getOptions=function(e){return[]},e.prototype.share=function(e,t){},e.prototype.isContactsCollaborationSupported=function(){return!1},e.prototype.enableContactsCollaboration=async function(e,t){return Promise.resolve({})},e.prototype.getTeamsContactCollabOptions=async function(){return Promise.resolve({})},e.prototype.isFeatureFlagEnabled=function(){return!1},e})
7
+ },
8
+ "sap/suite/ui/commons/collaboration/CollaborationCardHelper.js": function () {
9
+ sap.ui.define(["sap/ui/base/Object","sap/base/Log"],function(e,t){var i=t.getLogger("sap.suite.ui.commons.collaboration.CollaborationCardHelper"),t=e.extend("sap.suite.ui.commons.collaboration.CollaborationCardHelper");return t.fetchCSRFToken=function(){return fetch("/sap/opu/odata4/sap/aps_ui_card_srv/srvd_a2x/sap/aps_ui_card/0001/",{method:"HEAD",headers:{"X-CSRF-Token":"Fetch"}}).then(function(e){var t=e.headers.get("X-CSRF-Token");if(e.ok&&t)return t})},t.postCard=function(o,n){return this.fetchCSRFToken().then(function(e){let t=JSON.stringify(n);try{t=btoa(JSON.stringify(n))}catch(e){i.error("Error while encoding the card content to base64 so original content passed to API: "+e)}var a=JSON.stringify({content:t,card_id:o});return fetch("/sap/opu/odata4/sap/aps_ui_card_srv/srvd_a2x/sap/aps_ui_card/0001/Card",{method:"POST",headers:{"X-CSRF-Token":e,"content-type":"application/json;odata.metadata=minimal;charset=utf-8"},body:a}).then(function(e){return e.json()})})},t})
10
+ },
11
+ "sap/suite/ui/commons/collaboration/CollaborationContactInfoHelper.js": function() {
12
+ sap.ui.define(["sap/ui/base/Object"],function(e){var a="GET",e=e.extend("sap.suite.ui.commons.collaboration.CollaborationContactInfoHelper");return e.fetchCSRFToken=function(){return fetch("/sap/opu/odata4/sap/aps_ui_contact_srv/srvd_a2x/sap/aps_ui_contact/0001/",{method:"HEAD",headers:{"X-CSRF-Token":"Fetch"}}).then(function(e){var t=e.headers.get("X-CSRF-Token");if(e.ok&&t)return t})},e.fetchContact=function(t){return this.fetchCSRFToken().then(function(e){return fetch("/sap/opu/odata4/sap/aps_ui_contact_srv/srvd_a2x/sap/aps_ui_contact/0001/APS_UI_C_CONTACT/"+t,{method:a,headers:{"X-CSRF-Token":e,"content-type":"application/json;odata.metadata=minimal;charset=utf-8"}}).then(function(e){return e.json()})})},e.fetchContactPicture=function(t){return this.fetchCSRFToken().then(function(e){return fetch("/sap/opu/odata4/sap/aps_ui_contact_srv/srvd_a2x/sap/aps_ui_contact/0001/APS_UI_C_CONTACT/"+t+"/photo",{method:a,headers:{"X-CSRF-Token":e}}).then(function(e){return e.blob()})})},e.fetchContactStatus=function(t){return this.fetchCSRFToken().then(function(e){return fetch("/sap/opu/odata4/sap/aps_ui_contact_srv/srvd_a2x/sap/aps_ui_contact/0001/APS_UI_C_PRESENCE?$filter=id eq '"+t+"'",{method:a,headers:{"X-CSRF-Token":e,"content-type":"application/json;odata.metadata=minimal;charset=utf-8"}}).then(function(e){return e.json()})})},e.fetchServiceStatus=function(){return this.fetchCSRFToken().then(function(e){return fetch("/sap/opu/odata4/sap/aps_ui_contact_srv/srvd_a2x/sap/aps_ui_contact/0001/APS_UI_C_CHECK_SERVICE",{method:a,headers:{"X-CSRF-Token":e,"content-type":"application/json;odata.metadata=minimal;charset=utf-8"}}).then(function(e){return e.json()})})},e})
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"],function(e,t,a){var r="sap-url-hash",o="&sap-ui-cardTitle",n="&sap-stageview-hash",i="&sap-ui-cardId",s="&sap-ui-xx-cardId",l="transient",c=e.getLogger("sap.suite.ui.commons.collaboration.CollaborationHelper"),e=t.extend("sap.suite.ui.commons.collaboration.CollaborationHelper");return e.compactHash=function(i){var e=sap.ui.require("sap/ushell/Container");return e?e&&e.getServiceAsync("AppState").then(async function(e){var t=e.createEmptyAppState(void 0,!1),a=this._getNextKey(t);if(!this._isEligibleForBackendPersistency(e))return c.warning("Transient flag is true. URL will not be shortened"),{url:i};var o=this._extractURLBeforeHash(i),n=await this._extractSemanticObjectAndAction(i),e=!1;try{e=await this._isMinificationFeasible(i)}catch(e){}return n&&e?this._storeUrl(i,t).then(function(){return{url:o+"#"+n+"&/"+r+"="+a}}).catch(function(e){return c.warning("URL is not shortened due to an error."+e.toString()),{url:i}}):{url:i}}.bind(this)):{url:i}},e._getCurrentUrl=function(){let e=sap.ui.require("sap/ushell/Container");return e?new Promise(function(t){e.getFLPUrlAsync(!0).then(function(e){t(e)})}):Promise.resolve(document.URL)},e.processAndExpandHash=function(){return this._hideAvatarFromShellbar(),this._getCurrentUrl().then(function(t){var e;return-1<t.indexOf(r)?(e=t.split(r)[1].split("=")[1],0<t.indexOf(n)?e=e.split(n)[0]:0<t.indexOf(i)||0<t.indexOf(s)?e=(0<t.indexOf(i)?e.split(i):e.split(s))[0]:0<t.indexOf(o)&&(e=e.split(o)[0]),this._retrieveURL(e).then(function(e){return e.getData()?window.location.replace(e.getData()):(e=t.split(r)[0],window.location.replace(e)),Promise.resolve()})):(-1<t.indexOf(i)?(e=t.split(i)[0],window.location.replace(e)):-1<t.indexOf(o)&&(e=t.split(o)[0],window.location.replace(e)),Promise.resolve())}.bind(this))},e._hideAvatarFromShellbar=function(){this.isTeamsModeActive().then(function(e){e&&(e=a.getElementById("userActionsMenuHeaderButton"))&&e.setVisible(!1)})},e.isTeamsModeActive=function(){var o=!1,e=sap.ui.require("sap/ushell/Container");return e?e.getServiceAsync("URLParsing").then(function(a){return this._getCurrentUrl().then(function(e){var t,e=e.split("#")[0];return-1!==e.indexOf("?")?((e=a&&a.parseParameters(e.substring(e.indexOf("?"))))&&e["sap-collaboration-teams"]&&e["sap-collaboration-teams"][0]&&"true"===e["sap-collaboration-teams"][0]&&(o=!0),t=!1,e&&e["sap-ushell-config"]&&e["sap-ushell-config"][0]&&"lean"===e["sap-ushell-config"][0]&&(t=!0),Promise.resolve(o&&t)):Promise.resolve(!1)})}.bind(this)):Promise.resolve(!1)},e._retrieveURL=function(t){var e=sap.ui.require("sap/ushell/Container");return e&&e.getServiceAsync("AppState").then(function(e){return e.getAppState(t)})},e._isEligibleForBackendPersistency=function(e){return e&&e._oConfig&&l in e._oConfig&&!e._oConfig[l]},e._getNextKey=function(e){return e.getKey()},e._extractSemanticObjectAndAction=function(t){var e=sap.ui.require("sap/ushell/Container");return e&&e.getServiceAsync("URLParsing").then(function(e){e=e.parseShellHash(this._extractURLHash(t));if(e)return Promise.resolve(e.contextRaw?e.semanticObject+"-"+e.action+"~"+e.contextRaw:e.semanticObject+"-"+e.action)}.bind(this))},e._isMinificationFeasible=async function(e){var t,a=sap.ui.require("sap/ushell/Container");return a?(t=await a.getServiceAsync("NavTargetResolution"),a=(await a.getServiceAsync("URLParsing")).parseShellHash(this._extractURLHash(e)),0<Object.keys(a.params).length?t.resolveHashFragment(`#${a.semanticObject}-`+a.action).then(function(e){return!0}).catch(function(e){return!1}):Promise.resolve(!0)):Promise.resolve(!1)},e._extractURLBeforeHash=function(e){return e.split("#")[0]},e._extractURLHash=function(e){return e.substring(e.indexOf("#"))},e._storeUrl=function(e,t){return t.setData(e),t.save()},e})
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,t,a,o,n,i){var a=a.extend("sap.suite.ui.commons.collaboration.CollaborationManagerService"),r=n.getResourceBundleFor("sap.suite.ui.commons"),s=e.getLogger("sap.suite.ui.commons.collaboration.CollaborationManagerService");return a.prototype.triggerH2HChat=function(e,t,a){this.publishData({sAppTitle:e,sCurrentURL:t,sEmailId:a})},a.prototype.getOptions=function(){var e=window["sap-ushell-config"]&&window["sap-ushell-config"].bootstrapPlugins&&window["sap-ushell-config"].bootstrapPlugins.H2H_CHAT_PLUGIN;if(o.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"};s.info("Consumer disable Collaboration Manager option")}else s.info("Collaboration Manager is not supported in Phone and Tablet");return null},a.prototype.publishData=async function(e){try{(await i.getInstance()).postMessage(e)}catch(e){s.error("Failed to publish data:",e)}},a})
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,i,r,o,t,a,n,s,l,c){var p=t.getResourceBundleFor("sap.suite.ui.commons");return e.extend("sap.suite.ui.commons.collaboration.ContactHelper",{constructor:function(){},getFullProfileByEmail:async function(e){e=await s.fetchContact(e);return e&&""===e.mail||(e&&""!=e.data&&(e.photo="data:image/png;base64,"+e.data),e=this.determineContactStatus(e)),e},getTeamsContactOptions:function(){var t=this;return Promise.resolve([{key:"chat",icon:"sap-icon://discussion",tooltip:p.getText("CHAT_BUTTON_TOOLTIP"),fesrStepName:"MST:ContactAction",callBackHandler:function(e){t.handleMSTeamsPress(e)}},{key:"call",icon:"sap-icon://call",tooltip:p.getText("CALL_BUTTON_TOOLTIP"),fesrStepName:"MST:ContactAction",callBackHandler:function(e){t.handleMSTeamsPress(e)}},{key:"videoCall",icon:"sap-icon://video",tooltip:p.getText("VIDEOCALL_BUTTON_TOOLTIP"),fesrStepName:"MST:ContactAction",callBackHandler:function(e){t.handleMSTeamsPress(e)}}])},getTeamsContactStatus:async function(e){e=await s.fetchContact(e);return[{key:"profileStatus",badgeIcon:(e=this.determineContactStatus(e)).badgeIcon,badgeValueState:e.badgeValueState,badgeTooltip:e.badgeTooltip,fesrStepName:"MST:ContactAction"}]},handleMSTeamsPress:function(e){var t=e.getSource().data("email"),a="";switch(e.getSource().data("type")){case"chat":a="https://teams.microsoft.com/l/chat/0/0?users="+t;break;case"call":a="https://teams.microsoft.com/l/call/0/0?users="+t;break;case"videoCall":a="https://teams.microsoft.com/l/call/0/0?users="+t+"&withVideo=true"}o.URLHelper.redirect(a,!0)},formatUri:function(e,t){return/^\w+[\w-+\.]*\@\w+([-\.]\w+)*\.[a-zA-Z]{2,}$/.test(e)?"mailto:"+e+(t&&t.subject?"?subject="+t.subject:"")+(t&&t.body?"&body="+t.body:""):"tel:"+e},loadContactPopover:function(a,o,n){return this.afterClose(),i.load({name:"sap.suite.ui.commons.collaboration.ContactPopover",controller:this,type:"XML"}).then(function(e){l.setSemanticStepname(e,"afterClose","MST:ContactDetails"),this._oContactPopover=e,this.sEmail=a,this.oParams=o,e.setBusy(!0);var t={setFamily:"tnt",setURI:sap.ui.require.toUrl("sap/tnt/themes/base/illustrations")},t=(sap.m.IllustrationPool.registerIllustrationSet(t,!1),new r({isUserExistsInTeams:!0}));return this._oContactPopover.setModel(t,"userData"),this.isDirectCommunicationEnabled=n,this._oContactPopover.setModel(new sap.ui.model.resource.ResourceModel({bundle:p}),"i18n"),e}.bind(this))},loadMinimalContactPopover:function(e,t){this.afterClose();var a=new r({mail:e,params:t});return i.load({name:"sap.suite.ui.commons.collaboration.MinimalContactPopover",controller:this,type:"XML"}).then(function(e){return this._oMinContactPopover=e,l.setSemanticStepname(e,"afterClose","MST:ContactDetails"),e.setModel(a,"userData"),e.setModel(new sap.ui.model.resource.ResourceModel({bundle:p}),"i18n"),e}.bind(this))},afterClose:function(){this._oContactPopover&&this._oContactPopover.destroy(),this._oMinContactPopover&&this._oMinContactPopover.destroy()},afterOpen:function(){var a=this;this.getFullProfileByEmail(this.sEmail).then(function(e){a._oContactPopover.setBusy(!1),e&&""===e.mail?(e.isUserExistsInTeams=!1,e.mail=a.sEmail,e.params=a.oParams,a._oContactPopover.setInitialFocus(c.getElementById("mail"))):(e.isUserExistsInTeams=!0,e.isDirectCommunicationEnabled=!!a.isDirectCommunicationEnabled,a._oContactPopover.setInitialFocus(c.getElementById("avatar")));var t=new r(e);t.setData(e),a._oContactPopover.setModel(t,"userData"),l.setSemanticStepname(a._oContactPopover,"afterClose","MST:ContactDetails")})},afterContinue:function(){var e=this.formatUri(this.sEmail,this.oParams);o.URLHelper.redirect(e,!0)},determineContactStatus:function(e){var 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"}]]),a=new Map([["Available","AVAILABLE"],["Away","AWAY"],["Inactive","AWAY"],["Busy","BUSY"],["DoNotDisturb","PRESENTING"],["InACall","BUSY"],["InAMeeting","BUSY"],["Presenting","PRESENTING"],["BeRightBack","AWAY"],["OffWork","OFFLINE"]]);let o={};return e.isoutofoffice?"Available"===e.activity?(o=t.get("ONLINEOOO")).badgeTooltip=p.getText("AVAILABLE")+", "+p.getText("OOO"):"Busy"===e.activity?(o=t.get("BUSYOOO")).badgeTooltip=p.getText("BUSY")+", "+p.getText("OOO"):"DoNotDisturb"===e.activity?(o=t.get("PRESENTING")).badgeTooltip=p.getText("DONOTDISTURB")+", "+p.getText("OOO"):(o=t.get("OOO")).badgeTooltip=p.getText("OOO"):(a=e.activity?a.get(e.activity):"OFFLINE",(o=t.get(a)).badgeTooltip=p.getText(e.activity.toUpperCase())),Object.assign(e,o),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"],function(e,o,n,t,a,i){var r,s,l=e.getLogger("sap.suite.ui.commons.collaboration.ServiceContainer");function c(){var e,t,a;return r?(t=r.sProvider,a=r.oProviderConfig,"COLLABORATION_MSTEAMS"===t&&(e=new n(a)),s=Promise.resolve(e)):(e=new o({}),l.info("Collaboration provider is not activated on the tenant"),Promise.resolve(e))}var p=new function(){};return p.getServiceAsync=async function(){var e=sap.ui.require("sap/ushell/Container");return s||(e&&e.inAppRuntime()&&(r=await i.getProviderConfiguration()),c())},p.getCollaborationServices=async function(){var e={oTeamsHelperService:await p.getServiceAsync(),oCMHelperService:new t};return Promise.resolve(e)},p.setCollaborationType=function(e,t){l.info("Collaboration properties are now configured"),r={sProvider:e,oProviderConfig:t},c(),a.startInstance(r)},p},!0)
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,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
+ "sap/suite/ui/commons/collaboration/channels/MessageChannel.js": function() {
30
+ sap.ui.define(["sap/ui/base/Object"],function(e){var n,s=e.extend("sap.suite.ui.commons.collaboration.channels.MessageChannel",{postMessage:function(e,n){window.parent.postMessage({...e,_fromMessageChannel:!0},n||"*")},subscribe:function(n){window.addEventListener("message",function(e){e?.data?._fromMessageChannel&&"function"==typeof n&&n(e)})}});return{getInstance:function(){return n=n||new s,Promise.resolve(n)}}});
31
+ }
32
+
33
+ });
@@ -27,6 +27,7 @@ sap.ui.define(
27
27
  */
28
28
  return Component.extend("sap.suite.ui.commons.collaboration.flpplugins.msplugin.Component", {
29
29
  metadata: {
30
+ manifest: "json",
30
31
  properties: {
31
32
  /**
32
33
  * Specifies the collaboration using Microsoft Teams as Link is configured or not.
@@ -0,0 +1,26 @@
1
+ {
2
+ "_version": "1.68.0",
3
+ "sap.app": {
4
+ "id": "sap.suite.ui.commons.collaboration.flpplugins.msplugin",
5
+ "type": "component",
6
+ "title": "",
7
+ "description": "",
8
+ "applicationVersion": {
9
+ "version": "1.108"
10
+ },
11
+ "ach": "CA-FLP-EXT-COL"
12
+ },
13
+ "sap.ui": {
14
+ "technology": "UI5",
15
+ "deviceTypes": {
16
+ "desktop": true,
17
+ "tablet": true,
18
+ "phone": true
19
+ }
20
+ },
21
+ "sap.ui5": {
22
+ "dependencies": {
23
+ "minUI5Version": "1.108"
24
+ }
25
+ }
26
+ }
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  *
23
23
  * @constructor
24
24
  * @alias sap.suite.ui.commons.flexibility.changeHandler.PropertyChangeMapper
25
- * @version 1.131.0
25
+ * @version 1.132.0
26
26
  * @since 1.50
27
27
  * @private
28
28
  */
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @extends sap.suite.ui.commons.imageeditor.HistoryItem
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.131.0
31
+ * @version 1.132.0
32
32
  * @since 1.67.0
33
33
  *
34
34
  * @constructor
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  * @extends sap.suite.ui.commons.imageeditor.HistoryItem
31
31
  *
32
32
  * @author SAP SE
33
- * @version 1.131.0
33
+ * @version 1.132.0
34
34
  * @since 1.66.0
35
35
  *
36
36
  * @constructor
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @extends sap.suite.ui.commons.imageeditor.HistoryItem
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.131.0
31
+ * @version 1.132.0
32
32
  * @since 1.66.0
33
33
  *
34
34
  * @constructor
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  * @extends sap.ui.core.Element
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.131.0
25
+ * @version 1.132.0
26
26
  * @since 1.66.0
27
27
  *
28
28
  * @constructor
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @extends sap.suite.ui.commons.imageeditor.HistoryItem
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.131.0
31
+ * @version 1.132.0
32
32
  * @since 1.66.0
33
33
  *
34
34
  * @constructor
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @extends sap.suite.ui.commons.imageeditor.HistoryItem
26
26
  *
27
27
  * @author SAP SE
28
- * @version 1.131.0
28
+ * @version 1.132.0
29
29
  * @since 1.66.0
30
30
  *
31
31
  * @constructor
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * @extends sap.ui.base.Object
18
18
  *
19
19
  * @author SAP SE
20
- * @version 1.131.0
20
+ * @version 1.132.0
21
21
  * @since 1.66.0
22
22
  *
23
23
  * @abstract
@@ -50,7 +50,7 @@ sap.ui.define([
50
50
  * @extends sap.ui.core.Control
51
51
  *
52
52
  * @author SAP SE
53
- * @version 1.131.0
53
+ * @version 1.132.0
54
54
  * @since 1.66.0
55
55
  *
56
56
  * @constructor