@sapui5/sap.suite.ui.commons 1.128.0 → 1.129.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 (88) 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 +1 -1
  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 +103 -16
  12. package/src/sap/suite/ui/commons/ChartContainerContent.js +16 -0
  13. package/src/sap/suite/ui/commons/CloudFilePicker.js +1 -1
  14. package/src/sap/suite/ui/commons/MicroProcessFlow.js +3 -3
  15. package/src/sap/suite/ui/commons/MicroProcessFlowItem.js +1 -1
  16. package/src/sap/suite/ui/commons/ProcessFlow.js +2 -2
  17. package/src/sap/suite/ui/commons/collaboration/BaseHelperService.js +1 -1
  18. package/src/sap/suite/ui/commons/collaboration/CollaborationManagerService.js +70 -0
  19. package/src/sap/suite/ui/commons/collaboration/ServiceContainer.js +20 -4
  20. package/src/sap/suite/ui/commons/collaboration/TeamsHelperService.js +24 -5
  21. package/src/sap/suite/ui/commons/collaboration/channels/MessageChannel.js +63 -0
  22. package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component.js +15 -2
  23. package/src/sap/suite/ui/commons/flexibility/changeHandler/PropertyChangeMapper.js +1 -1
  24. package/src/sap/suite/ui/commons/imageeditor/CropCustomShapeHistoryItem.js +1 -1
  25. package/src/sap/suite/ui/commons/imageeditor/CropEllipseHistoryItem.js +1 -1
  26. package/src/sap/suite/ui/commons/imageeditor/CropRectangleHistoryItem.js +1 -1
  27. package/src/sap/suite/ui/commons/imageeditor/CustomSizeItem.js +1 -1
  28. package/src/sap/suite/ui/commons/imageeditor/FilterHistoryItem.js +1 -1
  29. package/src/sap/suite/ui/commons/imageeditor/FlipHistoryItem.js +1 -1
  30. package/src/sap/suite/ui/commons/imageeditor/HistoryItem.js +1 -1
  31. package/src/sap/suite/ui/commons/imageeditor/ImageEditor.js +1 -1
  32. package/src/sap/suite/ui/commons/imageeditor/ImageEditorContainer.js +1 -1
  33. package/src/sap/suite/ui/commons/imageeditor/ImageEditorResponsiveContainer.js +1 -1
  34. package/src/sap/suite/ui/commons/imageeditor/ResizeHistoryItem.js +1 -1
  35. package/src/sap/suite/ui/commons/imageeditor/RotateHistoryItem.js +1 -1
  36. package/src/sap/suite/ui/commons/library.js +1 -1
  37. package/src/sap/suite/ui/commons/messagebundle.properties +2 -0
  38. package/src/sap/suite/ui/commons/networkgraph/GraphRenderer.js +6 -2
  39. package/src/sap/suite/ui/commons/networkgraph/Node.js +35 -19
  40. package/src/sap/suite/ui/commons/statusindicator/Circle.js +1 -1
  41. package/src/sap/suite/ui/commons/statusindicator/CustomShape.js +1 -1
  42. package/src/sap/suite/ui/commons/statusindicator/DiscreteThreshold.js +1 -1
  43. package/src/sap/suite/ui/commons/statusindicator/FillingOption.js +1 -1
  44. package/src/sap/suite/ui/commons/statusindicator/LibraryShape.js +1 -1
  45. package/src/sap/suite/ui/commons/statusindicator/Path.js +1 -1
  46. package/src/sap/suite/ui/commons/statusindicator/PropertyThreshold.js +1 -1
  47. package/src/sap/suite/ui/commons/statusindicator/Rectangle.js +1 -1
  48. package/src/sap/suite/ui/commons/statusindicator/Shape.js +1 -1
  49. package/src/sap/suite/ui/commons/statusindicator/ShapeGroup.js +1 -1
  50. package/src/sap/suite/ui/commons/statusindicator/SimpleShape.js +1 -1
  51. package/src/sap/suite/ui/commons/statusindicator/StatusIndicator.js +1 -1
  52. package/src/sap/suite/ui/commons/taccount/TAccount.js +1 -1
  53. package/src/sap/suite/ui/commons/taccount/TAccountGroup.js +1 -1
  54. package/src/sap/suite/ui/commons/taccount/TAccountItem.js +1 -1
  55. package/src/sap/suite/ui/commons/taccount/TAccountItemProperty.js +1 -1
  56. package/src/sap/suite/ui/commons/taccount/TAccountPanel.js +1 -1
  57. package/src/sap/suite/ui/commons/themes/base/CollaborationPopover.less +55 -4
  58. package/src/sap/suite/ui/commons/themes/base/NetworkLine.less +35 -27
  59. package/src/sap/suite/ui/commons/themes/base/NetworkNode.less +150 -115
  60. package/src/sap/suite/ui/commons/themes/base/Timeline.less +2 -2
  61. package/src/sap/suite/ui/commons/themes/base/TimelineItem.less +1 -0
  62. package/src/sap/suite/ui/commons/themes/sap_belize/library.source.less +0 -1
  63. package/src/sap/suite/ui/commons/themes/sap_belize_base/NetworkLine.less +0 -31
  64. package/src/sap/suite/ui/commons/themes/sap_belize_base/NetworkNode.less +0 -216
  65. package/src/sap/suite/ui/commons/themes/sap_belize_base/Timeline.less +2 -2
  66. package/src/sap/suite/ui/commons/themes/sap_belize_base/TimelineItem.less +1 -0
  67. package/src/sap/suite/ui/commons/themes/sap_belize_hcb/NetworkNode.less +0 -6
  68. package/src/sap/suite/ui/commons/themes/sap_belize_hcw/NetworkNode.less +0 -6
  69. package/src/sap/suite/ui/commons/themes/sap_bluecrystal_base/NetworkLine.less +0 -31
  70. package/src/sap/suite/ui/commons/themes/sap_bluecrystal_base/NetworkNode.less +0 -250
  71. package/src/sap/suite/ui/commons/themes/sap_bluecrystal_base/Timeline.less +2 -2
  72. package/src/sap/suite/ui/commons/themes/sap_bluecrystal_base/TimelineItem.less +1 -0
  73. package/src/sap/suite/ui/commons/themes/sap_fiori_3_hcb/library.source.less +0 -1
  74. package/src/sap/suite/ui/commons/themes/sap_fiori_3_hcw/library.source.less +0 -1
  75. package/src/sap/suite/ui/commons/themes/sap_hcb/base_NetworkLine.less +0 -31
  76. package/src/sap/suite/ui/commons/themes/sap_hcb/base_NetworkNode.less +0 -262
  77. package/src/sap/suite/ui/commons/themes/sap_hcb/base_Timeline.less +2 -2
  78. package/src/sap/suite/ui/commons/themes/sap_hcb/base_TimelineItem.less +1 -0
  79. package/src/sap/suite/ui/commons/themes/sap_horizon/NetworkLine.less +0 -31
  80. package/src/sap/suite/ui/commons/themes/sap_horizon/NetworkNode.less +1 -23
  81. package/src/sap/suite/ui/commons/themes/sap_horizon_dark/NetworkLine.less +0 -32
  82. package/src/sap/suite/ui/commons/themes/sap_horizon_dark/NetworkNode.less +4 -19
  83. package/src/sap/suite/ui/commons/themes/sap_horizon_hcb/NetworkNode.less +5 -31
  84. package/src/sap/suite/ui/commons/themes/sap_horizon_hcw/NetworkNode.less +5 -31
  85. package/src/sap/suite/ui/commons/util/FullScreenUtil.js +35 -7
  86. package/src/sap/suite/ui/commons/themes/sap_belize/NetworkNode.less +0 -18
  87. package/src/sap/suite/ui/commons/themes/sap_fiori_3_hcb/NetworkNode.less +0 -32
  88. package/src/sap/suite/ui/commons/themes/sap_fiori_3_hcw/NetworkNode.less +0 -32
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.suite.ui.commons",
3
- "version": "1.128.0",
3
+ "version": "1.129.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.128.0</version>
10
+ <version>1.129.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.128.0
22
+ * @version 1.129.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.128.0
137
+ * @version 1.129.0
138
138
  * @since 1.56.0
139
139
  *
140
140
  * @constructor
@@ -148,7 +148,7 @@ sap.ui.define([
148
148
  * @extends sap.ui.core.Control
149
149
  *
150
150
  * @author SAP SE
151
- * @version 1.128.0
151
+ * @version 1.129.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.128.0
29
+ * @version 1.129.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.128.0
25
+ * @version 1.129.0
26
26
  * @since 1.60.0
27
27
  *
28
28
  * @constructor
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  * @extends sap.ui.core.Control
40
40
  *
41
41
  * @author SAP SE
42
- * @version 1.128.0
42
+ * @version 1.129.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.128.0
24
+ * @version 1.129.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.128.0
26
+ * @version 1.129.0
27
27
  * @since 1.56.0
28
28
  *
29
29
  * @constructor
@@ -28,10 +28,16 @@ sap.ui.define([
28
28
  "sap/base/Log",
29
29
  "./ChartContainerRenderer",
30
30
  "sap/suite/ui/commons/util/FullScreenUtil",
31
- "sap/ui/core/Lib"
31
+ "sap/ui/core/Lib",
32
+ "sap/ui/core/Element",
33
+ "sap/m/Popover",
34
+ "sap/m/Dialog",
35
+ "sap/m/ResponsivePopover",
36
+ 'sap/m/SelectionDetails'
32
37
  ], function (jQuery, library, MobileLibrary, VizLibrary, ManagedObject, Button, OverflowToolbar, OverflowToolbarButton,
33
38
  SegmentedButton, Title, ToolbarSpacer, Device, Control, CustomData, ResizeHandler, ScrollEnablement, ToggleButton,
34
- OverflowToolbarToggleButton, uid, Log, ChartContainerRenderer, FullScreenUtil, CoreLib) {
39
+ OverflowToolbarToggleButton, uid, Log, ChartContainerRenderer, FullScreenUtil, CoreLib, Element, Popover, Dialog,
40
+ ResponsivePopover, SelectionDetails) {
35
41
  "use strict";
36
42
 
37
43
  // shortcut for sap.m.ButtonType
@@ -52,7 +58,7 @@ sap.ui.define([
52
58
  * @constructor
53
59
  * @public
54
60
  * @alias sap.suite.ui.commons.ChartContainer
55
- * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
61
+ * @ui5-metamodel This control/oDependant also will be described in the UI5 (legacy) designtime metamodel
56
62
  */
57
63
  var ChartContainer = Control.extend("sap.suite.ui.commons.ChartContainer", /** @lends sap.suite.ui.commons.ChartContainer.prototype */ {
58
64
  metadata: {
@@ -127,7 +133,20 @@ sap.ui.define([
127
133
  /**
128
134
  * Defines the width of the Container.
129
135
  */
130
- width: {type: "sap.ui.core.CSSSize", defaultValue: "100%"}
136
+ width: {type: "sap.ui.core.CSSSize", defaultValue: "100%"},
137
+ /**
138
+ * If set to <code>true</code>, the chart and the toolbar are going to be displayed in fullscreen using the browser fullscreen APIs.
139
+ * In fullscreen mode {@link sap.m.Dialog}, {@link sap.m.Popover}, {@link sap.m.ResponsivePopover} and {@link sap.m.SelectionDetails} can be displayed over the ChartContainer.
140
+ * In order to display, the controls are to be added as dependents of the ChartContainer.
141
+ * @example <caption>Connecting a Dialog to the ChartContainer control</caption>
142
+ * <pre>
143
+ * oChartContainer.addDependent(new Dialog({
144
+ * text: "Display Dialog"
145
+ * }));
146
+ * </pre>
147
+ * @since 1.129.0
148
+ */
149
+ enableBrowserFullScreen: {type: "boolean", group: "Misc", defaultValue: false}
131
150
  },
132
151
  defaultAggregation: "content",
133
152
  aggregations: {
@@ -220,6 +239,7 @@ sap.ui.define([
220
239
  this._sResizeListenerId = null;
221
240
  this._bHasApplicationToolbar = false;
222
241
  this._iPlaceholderPosition = 0; // Index of the placeholder inside application toolbar
242
+ this._bIsFullScreenListenerAdded = false;
223
243
 
224
244
  //Resource bundle
225
245
  this._oResBundle = CoreLib.getResourceBundleFor("sap.suite.ui.commons");
@@ -285,6 +305,53 @@ sap.ui.define([
285
305
  this._oChartTitle = new Title();
286
306
  };
287
307
 
308
+ ChartContainer.prototype.addDependent = function (oDependant) {
309
+ if (this.getEnableBrowserFullScreen()) {
310
+ var bIsSelectionDetail = false;
311
+ //After opening the respective oControl, append it to the ChartContainer DOM to display the oControl in full screen mode.
312
+ var fnAppendControlToChart = function(oControl) {
313
+ if (this.getFullScreen()) {
314
+ var $BlockRef = jQuery("#sap-ui-blocklayer-popup");
315
+ var oControlDomRef = oControl.getDomRef();
316
+ this.getDomRef().append($BlockRef.get(0));
317
+ this.getDomRef().append(oControlDomRef);
318
+ }
319
+ }.bind(this);
320
+
321
+ //Before closing the respective oControl, append it back to the main page DOM
322
+ var fnAppendControlToDOM = function() {
323
+ if (this.getFullScreen()) {
324
+ var $BlockRef = jQuery("#sap-ui-blocklayer-popup");
325
+ var $StatickRef = jQuery("#sap-ui-static");
326
+ $StatickRef.append($BlockRef);
327
+ }
328
+ }.bind(this);
329
+
330
+ //SelectionDetails Popover is present as an aggregation of SelectionDetail, Fetch the Popover to attach the respective Open Event.
331
+ if ( oDependant instanceof SelectionDetails ) {
332
+ bIsSelectionDetail = true;
333
+ var oDependant = oDependant._getPopover();
334
+ }
335
+
336
+ //For Dialog / Popover / ResponsivePopover, attach the afterOpen / beforeClose Event.
337
+ if (oDependant instanceof Dialog || oDependant instanceof Popover || oDependant instanceof ResponsivePopover) {
338
+ oDependant.attachEvent("afterOpen", function() {
339
+ fnAppendControlToChart(oDependant);
340
+ }.bind(this));
341
+ oDependant.attachEvent("beforeClose", function() {
342
+ fnAppendControlToDOM(oDependant);
343
+ }.bind(this));
344
+ //Adding SelectionDetail as a dependent of ChartContainer to be skipped, As SelectionDetail is added as a part of ChartContainerContent which is already an aggregation of ChartContainer.
345
+ if ( !bIsSelectionDetail ) {
346
+ Element.prototype.addDependent.apply(this, arguments);
347
+ }
348
+ } else {
349
+ //Log Errors in case any other controls are opened as a part of ChartContainer in FullScreen Mode.
350
+ Log.error("Display of dependant " + oDependant.getMetadata()._sClassName + " not supported within ChartContainer.");
351
+ }
352
+ }
353
+ };
354
+
288
355
  ChartContainer.prototype.onAfterRendering = function () {
289
356
  this._sResizeListenerId = ResizeHandler.register(this, this._performHeightChanges.bind(this));
290
357
  if (!Device.system.desktop) {
@@ -321,6 +388,15 @@ sap.ui.define([
321
388
  && this.getToolbar().getContent()[0] instanceof sap.m.Title)) {
322
389
  this.getToolbar().setActive(true);
323
390
  }
391
+ if (this.getEnableBrowserFullScreen()) {
392
+ //FullScreenChangeEvent must be added only when the properties showFullScreen and enableBrowserFullScreen are set to true
393
+ if (!this._bIsFullScreenListenerAdded && this.getShowFullScreen()) {
394
+ if (!this._oFullScreenUtil) {
395
+ this._oFullScreenUtil = FullScreenUtil;
396
+ }
397
+ this._oFullScreenUtil.attachFullScreenChangeEvent(this);
398
+ }
399
+ }
324
400
  };
325
401
 
326
402
  ChartContainer.prototype.onBeforeRendering = function () {
@@ -373,7 +449,7 @@ sap.ui.define([
373
449
  this._oFullScreenButton.destroy();
374
450
  this._oFullScreenButton = undefined;
375
451
  }
376
- if (this._oFullScreenUtil) {
452
+ if (!this.getEnableBrowserFullScreen() && this._oFullScreenUtil) {
377
453
  this._oFullScreenUtil.cleanUpFullScreen(this);
378
454
  }
379
455
  if (this._oShowLegendButton) {
@@ -639,13 +715,33 @@ sap.ui.define([
639
715
  /* =========================================================== */
640
716
 
641
717
  /**
642
- * Toggles between normal and full screen modes.
718
+ * Toggles between normal and fullscreen modes.
643
719
  *
644
720
  * @private
645
721
  */
646
722
  ChartContainer.prototype._toggleFullScreen = function () {
647
723
  var bFullScreen = this.getProperty("fullScreen");
724
+ this._toggleFullScreenButtonState(bFullScreen);
725
+ bFullScreen = !bFullScreen;
726
+ if (!this._oFullScreenUtil) {
727
+ this._oFullScreenUtil = FullScreenUtil;
728
+ }
729
+ if (this.getEnableBrowserFullScreen()) {
730
+ this._oFullScreenUtil.toggleFullScreenBrowserAPI(this, bFullScreen);
731
+ } else {
732
+ this._oFullScreenUtil.toggleFullScreen(this, bFullScreen, this._oFullScreenButton, this._toggleFullScreen);
733
+ }
734
+ };
648
735
 
736
+ /**
737
+ * Toggles the button state between fullscreen and non fullscreen.
738
+ *
739
+ * @private
740
+ */
741
+ ChartContainer.prototype._toggleFullScreenButtonState = function () {
742
+ var bFullScreen = this.getProperty("fullScreen");
743
+ var oContent;
744
+ var aContent = this.getAggregation("content");
649
745
  var fnSetFullScreenButton = function (sIcon, sText, pressed) {
650
746
  this._oFullScreenButton.setIcon(sIcon);
651
747
  this._oFullScreenButton.setText(sText);
@@ -653,8 +749,6 @@ sap.ui.define([
653
749
  this._oFullScreenButton.setPressed(pressed);
654
750
  }.bind(this);
655
751
 
656
- var oContent;
657
- var aContent = this.getAggregation("content");
658
752
  if (bFullScreen) {
659
753
  this.setProperty("fullScreen", false, true);
660
754
  fnSetFullScreenButton("sap-icon://full-screen", this._oResBundle.getText("CHARTCONTAINER_FULLSCREEN"), false);
@@ -677,14 +771,7 @@ sap.ui.define([
677
771
  }
678
772
  }
679
773
  }
680
-
681
- bFullScreen = !bFullScreen;
682
- if (!this._oFullScreenUtil) {
683
- this._oFullScreenUtil = FullScreenUtil;
684
- }
685
-
686
- this._oFullScreenUtil.toggleFullScreen(this, bFullScreen, this._oFullScreenButton, this._toggleFullScreen);
687
- };
774
+ }
688
775
 
689
776
 
690
777
  /**
@@ -65,6 +65,22 @@ sap.ui.define([
65
65
  /* =========================================================== */
66
66
  ChartContainerContent.prototype.init = function () {
67
67
  this._oSelectionDetails = new SelectionDetails();
68
+ this._bIsDependentAdded = false;
69
+ var oParent = this.getParent();
70
+ if (oParent instanceof ChartContainer && oParent.getEnableBrowserFullScreen()) {
71
+ //Attach onBeforeRendering on the SelectionDetails to allow adding of the AfterOpen event on the SelectionDetails Popover via the ChartContainer.
72
+ this._oSelectionDetails.addEventDelegate({
73
+ onBeforeRendering : function () {
74
+ if (this._oSelectionDetails.getAggregation("_popover")) {
75
+ //Flag is used to allow addDependent to be called only once as onBeforeRendering of the SelectionDetail gets triggered multiple times.
76
+ if (!this._bIsDependentAdded) {
77
+ this._bIsDependentAdded = true;
78
+ oParent.addDependent(this._oSelectionDetails);
79
+ }
80
+ }
81
+ }.bind(this)
82
+ });
83
+ }
68
84
  this._oSelectionDetails.registerSelectionDetailsItemFactory(ChartContainerContent._selectionDetailsItemFactory);
69
85
  };
70
86
 
@@ -118,7 +118,7 @@ sap.ui.define([
118
118
  * @class
119
119
  * @public
120
120
  * @internal
121
- * @version 1.128.0
121
+ * @version 1.129.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.128.0
50
+ * @version 1.129.0
51
51
  *
52
52
  * @constructor
53
53
  * @public
@@ -306,8 +306,8 @@ sap.ui.define([
306
306
  this._iScrollingIndex = 0;
307
307
  this._iLastVisibleIndex = 0;
308
308
 
309
- $leftScroller.on("click", this._scroll.bind(this, -1));
310
- $rightScroller.on("click", this._scroll.bind(this, 1));
309
+ $leftScroller.off("click").on("click", this._scroll.bind(this, -1));
310
+ $rightScroller.off("click").on("click", this._scroll.bind(this, 1));
311
311
 
312
312
  this._iScrollingIndex <= 0 ? $leftScroller.hide() : $leftScroller.show();
313
313
  };
@@ -38,7 +38,7 @@ sap.ui.define([
38
38
  * @extends sap.ui.core.Control
39
39
  *
40
40
  * @author SAP SE
41
- * @version 1.128.0
41
+ * @version 1.129.0
42
42
  *
43
43
  * @constructor
44
44
  * @public
@@ -3510,8 +3510,8 @@ sap.ui.define([
3510
3510
  }
3511
3511
 
3512
3512
  var mProperties = {
3513
- src: sSrc
3514
- };
3513
+ src: sSrc,
3514
+ };
3515
3515
 
3516
3516
  var sLeftArrowClass = "sapPFHArrowScrollLeft";
3517
3517
  var sRightArrowClass = "sapPFHArrowScrollRight";
@@ -76,7 +76,7 @@ sap.ui.define([
76
76
  /**
77
77
  * Enables the Microsoft Teams collaboration functionality by providing a contact quick view with the options to start a message, audio call or video call
78
78
  * @param {string} sEmail Provides the email of the contact to be used for the communication using Microsoft Teams
79
- * @param {string} oParams Parameter object which contains the information to be shared
79
+ * @param {object} oParams Parameter object which contains the information to be shared
80
80
  * @returns {Promise} Returns promise resolving to an instance of the contact quick view providing the data for the collaboration functionality
81
81
  * @public
82
82
  */
@@ -0,0 +1,70 @@
1
+ /*!
2
+ *
3
+ SAP UI development toolkit for HTML5 (SAPUI5)
4
+ (c) Copyright 2009-2015 SAP SE. All rights reserved
5
+
6
+ */
7
+ sap.ui.define([
8
+ "sap/base/Log",
9
+ "sap/ui/core/Core",
10
+ "./BaseHelperService",
11
+ "sap/ui/Device",
12
+ "sap/ui/core/Lib",
13
+ "sap/suite/ui/commons/collaboration/channels/MessageChannel"
14
+ ], function (Log, Core, BaseHelperService, Device, Library, MessageChannel) {
15
+ "use strict";
16
+
17
+ /**
18
+ * Provides the Collaboration options
19
+ * @namespace
20
+ * @since 1.125
21
+ * @alias module:sap/suite/ui/commons/collaboration/CollaborationManagerService
22
+ * @private
23
+ * @ui5-restricted
24
+ * @experimental Since 1.125
25
+ */
26
+
27
+ var CollaborationManagerService = BaseHelperService.extend("sap.suite.ui.commons.collaboration.CollaborationManagerService");
28
+ var oResourceBundle = Library.getResourceBundleFor("sap.suite.ui.commons");
29
+ var oLogger = Log.getLogger("sap.suite.ui.commons.collaboration.CollaborationManagerService");
30
+
31
+ CollaborationManagerService.prototype.triggerH2HChat = function (sAppTitle, sCurrentURL, sEmailId) {
32
+ this.publishData({ sAppTitle, sCurrentURL, sEmailId });
33
+ };
34
+
35
+ CollaborationManagerService.prototype.getOptions = function () {
36
+ var H2hChatPlugins = window["sap-ushell-config"] && window["sap-ushell-config"].bootstrapPlugins && window["sap-ushell-config"].bootstrapPlugins.H2H_CHAT_PLUGIN;
37
+ if (Device.system.desktop) {
38
+ if (H2hChatPlugins) {
39
+ return {
40
+ "text": oResourceBundle.getText("COLLABORATION_MANGER") ,
41
+ "icon": "sap-icon://collaborate",
42
+ "press": this.triggerH2HChat.bind(this),
43
+ "fesrStepName": "CM:ShareLink"
44
+ };
45
+ } else {
46
+ oLogger.info("Consumer disable Collaboration Manager option");
47
+ }
48
+ } else {
49
+ oLogger.info("Collaboration Manager is not supported in Phone and Tablet");
50
+ }
51
+ return null;
52
+ };
53
+
54
+ /**
55
+ * Distributes data from FLP and embedded iframes.
56
+ * @param {object} oData - The data to be shared through the channel.
57
+ */
58
+ CollaborationManagerService.prototype.publishData = async function(oData) {
59
+ try {
60
+ // Obtain the singleton instance of the MessageChannel
61
+ const oMessageChannel = await MessageChannel.getInstance();
62
+ // Send the message
63
+ oMessageChannel.postMessage(oData);
64
+ } catch (error) {
65
+ oLogger.error("Failed to publish data:", error);
66
+ }
67
+ };
68
+
69
+ return CollaborationManagerService;
70
+ });
@@ -9,11 +9,11 @@ sap.ui.define([
9
9
  "sap/base/Log",
10
10
  "./BaseHelperService",
11
11
  "./TeamsHelperService",
12
+ "./CollaborationManagerService",
12
13
  "../windowmessages/CollaborationMessageBroker",
13
14
  "../windowmessages/CollaborationMessageConsumer"
14
- ], function (Log, BaseHelperService, TeamsHelperService, CollaborationMessageBroker, CollaborationMessageConsumer) {
15
+ ], function (Log, BaseHelperService, TeamsHelperService, CollaborationManagerService, CollaborationMessageBroker, CollaborationMessageConsumer) {
15
16
  "use strict";
16
-
17
17
  var oLogger = Log.getLogger("sap.suite.ui.commons.collaboration.ServiceContainer");
18
18
  var oProviderConfiguration;
19
19
  var oServicePromise; // Promise object which will be returned by getServiceAsync method
@@ -25,9 +25,9 @@ sap.ui.define([
25
25
  var oProviderConfig = oProviderConfiguration.oProviderConfig;
26
26
  if (sProvider === "COLLABORATION_MSTEAMS") {
27
27
  oHelperService = new TeamsHelperService(oProviderConfig);
28
- oServicePromise = Promise.resolve(oHelperService);
29
- return oServicePromise;
30
28
  }
29
+ oServicePromise = Promise.resolve(oHelperService);
30
+ return oServicePromise;
31
31
  }
32
32
  oHelperService = new BaseHelperService({});
33
33
  oLogger.info("Collaboration provider is not activated on the tenant");
@@ -64,6 +64,22 @@ sap.ui.define([
64
64
  return fnGetCollaborationType();
65
65
  };
66
66
 
67
+ /**
68
+ * Method that returns the collaboration service object as 'active' on the system.
69
+ * Microsoft Teams is supported as a collaboration option and must be enabled using the communication service SAP_COM_0860.
70
+ * The type definition and class are only available internally and are not intended for external consumers.
71
+ * @returns {Promise<{ oTeamsHelperService: module:sap/suite/ui/commons/collaboration/BaseHelperService, oCMHelperService: module:sap/suite/ui/commons/collaboration/BaseHelperService }>} Returns the promise that is resolved to an object containing the helper service and the Collaboration manager service.
72
+ * @public
73
+ */
74
+ oServiceContainer.getCollaborationServices = async function () {
75
+ var oService = await oServiceContainer.getServiceAsync();
76
+ var mCollaborationServices = {
77
+ "oTeamsHelperService": oService,
78
+ "oCMHelperService": new CollaborationManagerService()
79
+ };
80
+ return Promise.resolve(mCollaborationServices);
81
+ };
82
+
67
83
  oServiceContainer.setCollaborationType = function (sProvider, oProviderConfig) {
68
84
  oLogger.info("Collaboration properties are now configured");
69
85
  oProviderConfiguration = {
@@ -25,8 +25,10 @@ sap.ui.define([
25
25
  "./CollaborationContactInfoHelper",
26
26
  "sap/m/library",
27
27
  "sap/m/FlexBox",
28
- "sap/base/i18n/Localization"
29
- ], function (Log, Core, URLListValidator, CollaborationHelper, BaseHelperService, Element, ContactHelper, Device, CollaborationCardHelper, Fragment, MessageBox, Library, Popover, HBox, VBox, MessageStrip, Button, CollaborationContactInfoHelper, sapMLibrary, FlexBox, Localization) {
28
+ "sap/base/i18n/Localization",
29
+ "./CollaborationManagerService",
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) {
30
32
  "use strict";
31
33
 
32
34
  /**
@@ -533,6 +535,8 @@ sap.ui.define([
533
535
  /**
534
536
  * Enables collaboration with contacts in teams AD
535
537
  * @param {string} sEmail email of the contact to enable the communication
538
+ * @param {object} oParams subject and body of the email
539
+ * @returns {Promise} Returns promise which enables the contact options
536
540
  * @private
537
541
  */
538
542
 
@@ -635,7 +639,16 @@ sap.ui.define([
635
639
  "icon": "sap-icon://email",
636
640
  "key": "COLLABORATION_POPOVER_MAIL"
637
641
  });
638
- if( aOptions.length === 1 && !isLink) {
642
+ this.oCollaborationManager = new CollaborationManagerService();
643
+ var oCMOption = this.oCollaborationManager.getOptions();
644
+ if(oCMOption) {
645
+ aOptions.push({
646
+ "text": oCMOption.text,
647
+ "icon": oCMOption.icon,
648
+ "key": "COLLABORATION_POPOVER_CM"
649
+ });
650
+ }
651
+ if(aOptions.length === 1 && !isLink) {
639
652
  this._shareData(oData,aOptions[0], isLink);
640
653
  return
641
654
  }
@@ -680,6 +693,7 @@ sap.ui.define([
680
693
  var button = new Button({
681
694
  text:oOption.text,
682
695
  icon:oOption.icon,
696
+ width: oData.sFormat === "Horizontal" && aOptions.length === 3 ? "120px" : "180px",
683
697
  press: () => {
684
698
  this._shareData(oData, oOption, isLink);
685
699
  }
@@ -687,6 +701,8 @@ sap.ui.define([
687
701
 
688
702
  if(oOption.key === "COLLABORATION_POPOVER_TEAMS") {
689
703
  button.addStyleClass("sapSuiteUiCollaborationBarMSTeamsButton" + (oData.sFormat ? oData.sFormat : "Horizontal"));
704
+ } else if(oOption.key === "COLLABORATION_POPOVER_CM"){
705
+ button.addStyleClass("sapSuiteUiCollaborationBarCMButton" + (oData.sFormat ? oData.sFormat : "Horizontal"));
690
706
  } else {
691
707
  button.addStyleClass("sapSuiteUiCollaborationBarEmailButton" + (oData.sFormat ? oData.sFormat : "Horizontal"));
692
708
  }
@@ -713,14 +729,15 @@ sap.ui.define([
713
729
  new MessageStrip({
714
730
  text: oResourceBundle.getText("COLLABORATION_POPOVER_MSGSTRIP"),
715
731
  showIcon: true
716
- }).addStyleClass("sapUiTinyMarginBeginEnd"),0);
732
+ }).addStyleClass("sapUiTinyMarginBeginEnd").addStyleClass("sapSuiteCollaborationBarMsgStrip"),0);
733
+ oCopyLinkFlexbox.addStyleClass("sapSuiteUiCollaborationBarMsgStripHBox")
717
734
  }
718
735
  oCopyLinkFlexbox.addStyleClass("sapUiTinyMarginBeginEnd").addStyleClass("sapUiTinyMarginTopBottom")
719
736
  oMainFBox.addItem(oCopyLinkFlexbox);
720
737
  }
721
738
 
722
739
  if (oData.sFormat === "Vertical") {
723
- oOptionFBox.setHeight(aOptions.length > 1 ? (aOptions.length * 50 + 50) + "px" : "120px");
740
+ oOptionFBox.setHeight(aOptions.length > 1 ? (aOptions.length * 50 + 50) + "px" : "80px");
724
741
  oOptionFBox.addStyleClass("sapUiSmallMarginBottom").addStyleClass("sapUiTinyMarginEnd");
725
742
  } else {
726
743
  oOptionFBox.setHeight("110px");
@@ -768,6 +785,8 @@ sap.ui.define([
768
785
  }
769
786
  } else if (oOption.key === "COLLABORATION_POPOVER_MAIL") {
770
787
  sap.m.URLHelper.triggerEmail(null, oData.title && oData.title.trim() !== "" ? oData.title: null, oData.data);
788
+ } else if (oOption.key === "COLLABORATION_POPOVER_CM") {
789
+ this.oCollaborationManager.triggerH2HChat(oData.title, oData.data);
771
790
  }
772
791
  }
773
792
 
@@ -0,0 +1,63 @@
1
+ /*!
2
+ *
3
+ SAP UI development toolkit for HTML5 (SAPUI5)
4
+ (c) Copyright 2009-2015 SAP SE. All rights reserved
5
+
6
+ * POC
7
+ */
8
+ sap.ui.define(
9
+ [
10
+ "sap/ui/base/Object"
11
+ ],
12
+ function (UI5Object) {
13
+ "use strict";
14
+
15
+ var instance;
16
+ /**
17
+ * Facilitates communication between message providers and consumers in FLP and embedded iframes.
18
+ *
19
+ * @class
20
+ * @alias sap.ui.commons.channels.MessageChannel
21
+ * @public
22
+ * @experimental
23
+ */
24
+ var MessageChannel = UI5Object.extend("sap.ui.commons.channels.MessageChannel", {
25
+ /**
26
+ * Posts a message containing an object with properties to the parent window.
27
+ * @param {object} oMessageData - The message to post.
28
+ * @param {string} sTargetOrigin - The target origin of the message.
29
+ */
30
+ postMessage: function (oMessageData, sTargetOrigin) {
31
+ window.postMessage({...oMessageData, _fromMessageChannel: true}, sTargetOrigin || "*");
32
+ },
33
+
34
+ /**
35
+ * Subscribes to message events from the parent window.
36
+ * @param {function} fnCallback - The callback function to execute when a message event occurs.
37
+ */
38
+ subscribe: function (fnCallback) {
39
+ window.parent.addEventListener("message", function (data) {
40
+ if (data?._fromMessageChannel && fnCallback instanceof Function) {
41
+ return fnCallback(data);
42
+ }
43
+ return null;
44
+ });
45
+ }
46
+ });
47
+
48
+ return {
49
+ /**
50
+ * Returns a promise that resolves to the singleton instance of the MessageChannel service.
51
+ * @returns {Promise<sap.ui.commons.channels.MessageChannel>} A promise that resolves to the MessageChannel instance.
52
+ * @public
53
+ * @experimental
54
+ */
55
+ getInstance: function () {
56
+ if (!instance) {
57
+ instance = new MessageChannel();
58
+ }
59
+ return Promise.resolve(instance);
60
+ }
61
+ };
62
+ }
63
+ );