@sapui5/sap.suite.ui.commons 1.141.0 → 1.142.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/sap/suite/ui/commons/.library +1 -1
- package/src/sap/suite/ui/commons/AriaProperties.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilder.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderExpression.js +11 -7
- package/src/sap/suite/ui/commons/CalculationBuilderFunction.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderGroup.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderItem.js +12 -6
- package/src/sap/suite/ui/commons/CalculationBuilderValidationResult.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderVariable.js +1 -1
- package/src/sap/suite/ui/commons/CloudFilePicker.js +21 -21
- package/src/sap/suite/ui/commons/MicroProcessFlow.js +2 -2
- package/src/sap/suite/ui/commons/MicroProcessFlowItem.js +7 -9
- package/src/sap/suite/ui/commons/Timeline.js +22 -24
- package/src/sap/suite/ui/commons/TimelineItemRenderer.js +12 -2
- package/src/sap/suite/ui/commons/collaboration/TeamsHelperService.js +152 -3
- package/src/sap/suite/ui/commons/collaboration/UniversalCollaborationBar.js +366 -0
- package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component-preload.js +4 -1
- package/src/sap/suite/ui/commons/flexibility/changeHandler/PropertyChangeMapper.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CropCustomShapeHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CropEllipseHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CropRectangleHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CustomSizeItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/FilterHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/FlipHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/HistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ImageEditor.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ImageEditorContainer.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ImageEditorResponsiveContainer.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ResizeHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/RotateHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/library.js +1 -1
- package/src/sap/suite/ui/commons/messagebundle.properties +16 -1
- package/src/sap/suite/ui/commons/messagebundle_en.properties +3 -0
- package/src/sap/suite/ui/commons/networkgraph/Graph.js +105 -5
- package/src/sap/suite/ui/commons/networkgraph/Node.js +33 -11
- package/src/sap/suite/ui/commons/networkgraph/util/DragDropManager.js +197 -0
- package/src/sap/suite/ui/commons/statusindicator/Circle.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/CustomShape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/DiscreteThreshold.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/FillingOption.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/LibraryShape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/Path.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/PropertyThreshold.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/Rectangle.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/Shape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/ShapeGroup.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/SimpleShape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/StatusIndicator.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccount.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountGroup.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountItem.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountItemProperty.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountPanel.js +1 -1
- package/src/sap/suite/ui/commons/themes/base/CollaborationPopover.less +29 -1
- package/src/sap/suite/ui/commons/themes/base/NetworkGraph.less +5 -0
|
@@ -0,0 +1,366 @@
|
|
|
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/Device",
|
|
10
|
+
"sap/ui/core/Lib",
|
|
11
|
+
"sap/m/Menu",
|
|
12
|
+
"sap/m/MenuItem",
|
|
13
|
+
"sap/ui/performance/trace/FESRHelper"
|
|
14
|
+
], function (Log, Device, Library, Menu, MenuItem, FESRHelper) {
|
|
15
|
+
"use strict";
|
|
16
|
+
|
|
17
|
+
const COLLABORATION_MAIL = "COLLABORATION_POPOVER_MAIL";
|
|
18
|
+
const COLLABORATION_SHARE = "COLLABORATION_MSTEAMS_SHARE";
|
|
19
|
+
const COLLABORATION_CHAT = "COLLABORATION_POPOVER_CHAT";
|
|
20
|
+
const COLLABORATION_TAB = "COLLABORATION_POPOVER_TAB";
|
|
21
|
+
const COLLABORATION_MANAGER = "COLLABORATION_POPOVER_MANAGER";
|
|
22
|
+
const COLLABORATION_COPYURL = "COLLABORATION_POPOVER_COPYURL_BUTTON";
|
|
23
|
+
|
|
24
|
+
var UniversalCollaborationBar = Menu.extend("sap.suite.ui.commons.collaboration.UniversalCollaborationBar", {
|
|
25
|
+
metadata: {
|
|
26
|
+
properties: {
|
|
27
|
+
shareToEmailEnabled: { type: "boolean", defaultValue: true },
|
|
28
|
+
shareAsChatEnabled: { type: "boolean", defaultValue: false },
|
|
29
|
+
shareAsTabEnabled: { type: "boolean", defaultValue: false },
|
|
30
|
+
shareToCollaborationManagerEnabled: { type: "boolean", defaultValue: false },
|
|
31
|
+
copyLinkEnabled: { type: "boolean", defaultValue: true }
|
|
32
|
+
},
|
|
33
|
+
events: {
|
|
34
|
+
"shareToChatSelected": {},
|
|
35
|
+
"shareToTabSelected": {},
|
|
36
|
+
"copyLinkSelected": {},
|
|
37
|
+
"shareToEmailSelected": {},
|
|
38
|
+
"shareToCollaborationManagerSelected": {}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
init: function() {
|
|
43
|
+
sap.m.Menu.prototype.init.apply(this, arguments);
|
|
44
|
+
this._mActionHandlers = {
|
|
45
|
+
[COLLABORATION_MAIL]: (...args) => {
|
|
46
|
+
if (this.hasListeners("shareToEmailSelected")) {
|
|
47
|
+
this.fireShareToEmailSelected({ args });
|
|
48
|
+
} else {
|
|
49
|
+
this._shareToEmail(...args);
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
[COLLABORATION_CHAT]: () => this.fireShareToChatSelected(),
|
|
53
|
+
[COLLABORATION_TAB]: () => this.fireShareToTabSelected(),
|
|
54
|
+
[COLLABORATION_MANAGER]: () => this.fireShareToCollaborationManagerSelected(),
|
|
55
|
+
[COLLABORATION_COPYURL]: (...args) => {
|
|
56
|
+
if (this.hasListeners("copyLinkSelected")) {
|
|
57
|
+
this.fireCopyLinkSelected({ args });
|
|
58
|
+
} else {
|
|
59
|
+
this._toCopyUrl(...args);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
this._oLogger = Log.getLogger("sap.suite.ui.commons.collaboration.UniversalCollaborationBar");
|
|
65
|
+
this._oResourceBundle = Library.getResourceBundleFor("sap.suite.ui.commons");
|
|
66
|
+
this.addStyleClass("sapSuiteCollaborationBarMenu");
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Opens the menu.
|
|
71
|
+
* @returns {sap.m.Menu} The menu instance.
|
|
72
|
+
*/
|
|
73
|
+
openBy: function() {
|
|
74
|
+
if (!this.getItems().length) {
|
|
75
|
+
this._renderMenuItems();
|
|
76
|
+
}
|
|
77
|
+
return sap.m.Menu.prototype.openBy.apply(this, arguments);
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Renders the menu items for the collaboration popover.
|
|
82
|
+
* @private
|
|
83
|
+
*/
|
|
84
|
+
_renderMenuItems: async function() {
|
|
85
|
+
const aMenuItemOptions = await this._getCollaborationPopoverOptions();
|
|
86
|
+
const aMenuItems = this._getMenuItems(aMenuItemOptions);
|
|
87
|
+
aMenuItems.forEach((oItem) => this.addItem(oItem));
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Gets the TeamsHelperService instance.
|
|
92
|
+
* @returns {Promise} A promise that resolves with the TeamsHelperService instance.
|
|
93
|
+
* @private
|
|
94
|
+
*/
|
|
95
|
+
_getTeamsHelperService: async function() {
|
|
96
|
+
if (!this._oTeamsHelperService) {
|
|
97
|
+
const ServiceContainer = sap.ui.require("sap/suite/ui/commons/collaboration/ServiceContainer");
|
|
98
|
+
this._oTeamsHelperService = await ServiceContainer.getServiceAsync();
|
|
99
|
+
}
|
|
100
|
+
return this._oTeamsHelperService;
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Gets the menu items based on the provided options.
|
|
105
|
+
* @param {Array} aOptions - The array of option objects.
|
|
106
|
+
* @returns {Array} The array of created menu items.
|
|
107
|
+
* @private
|
|
108
|
+
*/
|
|
109
|
+
_getMenuItems: function (aOptions) {
|
|
110
|
+
const aMenuItems = [];
|
|
111
|
+
aOptions.forEach((oOption) => {
|
|
112
|
+
const oMenuItem = this._createMenuItem(oOption.icon, oOption.text, oOption.key, oOption.fesrStepName, oOption.styleClass);
|
|
113
|
+
(oOption.subOptions || []).forEach((oSubOption) => {
|
|
114
|
+
const subMenuItem = this._createMenuItem(oSubOption.icon, oSubOption.text, oSubOption.key, oSubOption.fesrStepName, oSubOption.styleClass);
|
|
115
|
+
oMenuItem.addItem(subMenuItem);
|
|
116
|
+
});
|
|
117
|
+
aMenuItems.push(oMenuItem);
|
|
118
|
+
});
|
|
119
|
+
return aMenuItems;
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Creates a menu item based on the provided parameters.
|
|
124
|
+
*
|
|
125
|
+
* @param {string} sIcon - The icon for the menu item.
|
|
126
|
+
* @param {string} sText - The text for the menu item.
|
|
127
|
+
* @param {string} sKey - The key for the menu item.
|
|
128
|
+
* @param {string} [sFesrStepName] - The FESR step name for the menu item (optional).
|
|
129
|
+
* @param {string} [sStyleClass] - Additional style class for the menu item (optional).
|
|
130
|
+
* @returns {sap.m.MenuItem} The created sap.m.MenuItem object.
|
|
131
|
+
* @private
|
|
132
|
+
*/
|
|
133
|
+
_createMenuItem: function(sIcon, sText, sKey, sFesrStepName, sStyleClass) {
|
|
134
|
+
const oConfig = {
|
|
135
|
+
icon: sIcon,
|
|
136
|
+
text: sText,
|
|
137
|
+
key: sKey
|
|
138
|
+
};
|
|
139
|
+
const oMenuItem = new MenuItem(oConfig);
|
|
140
|
+
|
|
141
|
+
oMenuItem.attachPress(() => {
|
|
142
|
+
const fnHandler = this._mActionHandlers[sKey];
|
|
143
|
+
if (fnHandler) {
|
|
144
|
+
fnHandler();
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
if (sFesrStepName) {
|
|
149
|
+
FESRHelper.setSemanticStepname(oMenuItem, "press", sFesrStepName);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
oMenuItem.addEventDelegate({
|
|
153
|
+
onAfterRendering: () => {
|
|
154
|
+
const oDomRef = oMenuItem.getDomRef();
|
|
155
|
+
if (oDomRef && sStyleClass) {
|
|
156
|
+
oDomRef.classList.add(sStyleClass);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
return oMenuItem;
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Creates a standardized option object for the collaboration popover menu.
|
|
166
|
+
*
|
|
167
|
+
* @param {string} i18nKey - The i18n key used to fetch the localized text and as the option key.
|
|
168
|
+
* @param {string} iconUri - The SAP icon URI for the option (e.g., "sap-icon://email").
|
|
169
|
+
* @param {string} cssClass - CSS class applied to the option for styling.
|
|
170
|
+
* @param {Object} [options] - Additional optional properties.
|
|
171
|
+
* @param {string} [options.fesrStepName] - The FESR step name for tracking user interactions.
|
|
172
|
+
* @param {Array} [options.subOptions] - Array of sub-options for nested menu items.
|
|
173
|
+
*
|
|
174
|
+
* @returns {Object} The constructed option object to be used in the collaboration popover menu.
|
|
175
|
+
*
|
|
176
|
+
* @private
|
|
177
|
+
*/
|
|
178
|
+
_createOption: function(i18nKey, iconUri, cssClass, { fesrStepName = "", subOptions = [] } = {}) {
|
|
179
|
+
const oOption = {
|
|
180
|
+
text: this._oResourceBundle.getText(i18nKey),
|
|
181
|
+
icon: iconUri,
|
|
182
|
+
key: i18nKey,
|
|
183
|
+
styleClass: cssClass
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
if (fesrStepName) {
|
|
187
|
+
oOption.fesrStepName = fesrStepName;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (subOptions.length > 0) {
|
|
191
|
+
oOption.subOptions = subOptions;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return oOption;
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Build collaboration popover options based on consumer settings,
|
|
199
|
+
* tenant configuration and current device type.
|
|
200
|
+
*
|
|
201
|
+
* @returns {Array} Array of option objects used to render the collaboration popover menu.
|
|
202
|
+
* @private
|
|
203
|
+
*/
|
|
204
|
+
_getCollaborationPopoverOptions: async function() {
|
|
205
|
+
const oAppCollaborationParams = {
|
|
206
|
+
isShareAsChatEnabled: this.getShareAsChatEnabled(),
|
|
207
|
+
isShareAsTabEnabled: this.getShareAsTabEnabled(),
|
|
208
|
+
isCopyLinkEnabled: this.getCopyLinkEnabled(),
|
|
209
|
+
isShareToEmailEnabled: this.getShareToEmailEnabled(),
|
|
210
|
+
isShareToCMEnabled: this.getShareToCollaborationManagerEnabled()
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
let oProviderConfig = {};
|
|
214
|
+
try {
|
|
215
|
+
const oTeamHelperServ = await this._getTeamsHelperService();
|
|
216
|
+
oProviderConfig = oTeamHelperServ._providerConfig;
|
|
217
|
+
} catch (error) {
|
|
218
|
+
this._oLogger.error("Error fetching TeamsHelperService:", error);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
const aOptions = [];
|
|
222
|
+
let aMSTeamsOptions = [];
|
|
223
|
+
|
|
224
|
+
// configuration array
|
|
225
|
+
const aConfig = [
|
|
226
|
+
{
|
|
227
|
+
key: COLLABORATION_MAIL,
|
|
228
|
+
icon: "sap-icon://email",
|
|
229
|
+
styleClass: "sapSuiteUiCommonsCollaborationMail",
|
|
230
|
+
consumerEnabled: oAppCollaborationParams.isShareToEmailEnabled,
|
|
231
|
+
providerEnabled: true,
|
|
232
|
+
fesrStep: "",
|
|
233
|
+
featureName: "Email",
|
|
234
|
+
group: "menu"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
key: COLLABORATION_CHAT,
|
|
238
|
+
icon: "sap-icon://discussion",
|
|
239
|
+
styleClass: "sapSuiteUiCommonsCollaborationChat",
|
|
240
|
+
consumerEnabled: oAppCollaborationParams.isShareAsChatEnabled,
|
|
241
|
+
providerEnabled: oProviderConfig.isShareAsLinkEnabled === "X",
|
|
242
|
+
fesrStep: "MST:ShareAsLink",
|
|
243
|
+
featureName: "Share as Chat",
|
|
244
|
+
desktopOnly: true,
|
|
245
|
+
group: "subMenu"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
key: COLLABORATION_TAB,
|
|
249
|
+
icon: "sap-icon://image-viewer",
|
|
250
|
+
styleClass: "sapSuiteUiCommonsCollaborationTab",
|
|
251
|
+
consumerEnabled: oAppCollaborationParams.isShareAsTabEnabled,
|
|
252
|
+
providerEnabled: oProviderConfig.isShareAsTabEnabled === "X",
|
|
253
|
+
fesrStep: "MST:ShareAsTab",
|
|
254
|
+
featureName: "Share as Tab",
|
|
255
|
+
desktopOnly: true,
|
|
256
|
+
group: "subMenu"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
key: COLLABORATION_SHARE,
|
|
260
|
+
icon: "sap-icon://citizen-connect",
|
|
261
|
+
styleClass: "sapSuiteUiCommonsCollaborationMSTeamsShare",
|
|
262
|
+
consumerEnabled: true,
|
|
263
|
+
providerEnabled: true,
|
|
264
|
+
isParentOfGroup: "subMenu",
|
|
265
|
+
group: "menu"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
key: COLLABORATION_MANAGER,
|
|
269
|
+
icon: "sap-icon://collaborate",
|
|
270
|
+
styleClass: "sapSuiteUiCommonsCollaborationManager",
|
|
271
|
+
consumerEnabled: oAppCollaborationParams.isShareToCMEnabled,
|
|
272
|
+
providerEnabled: true,
|
|
273
|
+
fesrStep: "",
|
|
274
|
+
featureName: "Collaboration Manager",
|
|
275
|
+
group: "menu"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
key: COLLABORATION_COPYURL,
|
|
279
|
+
icon: "sap-icon://chain-link",
|
|
280
|
+
styleClass: "sapSuiteUiCommonsCollaborationLink",
|
|
281
|
+
consumerEnabled: oAppCollaborationParams.isCopyLinkEnabled,
|
|
282
|
+
providerEnabled: true,
|
|
283
|
+
fesrStep: "",
|
|
284
|
+
featureName: "Copy link",
|
|
285
|
+
desktopOnly: true,
|
|
286
|
+
group: "menu"
|
|
287
|
+
}
|
|
288
|
+
];
|
|
289
|
+
|
|
290
|
+
aConfig.forEach((conf) => {
|
|
291
|
+
if (conf.group === "subMenu") {
|
|
292
|
+
const option = this._createOptionIfEnabled(conf);
|
|
293
|
+
if (option) {
|
|
294
|
+
aMSTeamsOptions.push(option);
|
|
295
|
+
}
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
if (conf.isParentOfGroup === "subMenu") {
|
|
300
|
+
if (aMSTeamsOptions.length > 0) {
|
|
301
|
+
conf.subOptions = aMSTeamsOptions;
|
|
302
|
+
aMSTeamsOptions = [];
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
const option = this._createOptionIfEnabled(conf);
|
|
307
|
+
if (option) {
|
|
308
|
+
aOptions.push(option);
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
return aOptions;
|
|
313
|
+
},
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Create an option if it is enabled based on the configuration.
|
|
317
|
+
* @param {Object} conf - The configuration object for the option.
|
|
318
|
+
* @returns {Object|null} The created option or null if not enabled.
|
|
319
|
+
* @private
|
|
320
|
+
*/
|
|
321
|
+
_createOptionIfEnabled: function(conf) {
|
|
322
|
+
if (conf.desktopOnly && !Device.system.desktop) {
|
|
323
|
+
this._oLogger.info(`${conf.featureName} option is not supported in Phone and Tablet`);
|
|
324
|
+
return null;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
if (!conf.consumerEnabled) {
|
|
328
|
+
this._oLogger.info(`Consumer disabled ${conf.featureName} option`);
|
|
329
|
+
return null;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
if (!conf.providerEnabled) {
|
|
333
|
+
this._oLogger.info(`${conf.featureName} option is not enabled in the tenant`);
|
|
334
|
+
return null;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
return this._createOption(
|
|
338
|
+
conf.key,
|
|
339
|
+
conf.icon,
|
|
340
|
+
conf.styleClass,
|
|
341
|
+
{ fesrStepName: conf.fesrStep, subOptions: conf.subOptions }
|
|
342
|
+
);
|
|
343
|
+
},
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Share content via email.
|
|
347
|
+
* @private
|
|
348
|
+
*/
|
|
349
|
+
_shareToEmail: async function() {
|
|
350
|
+
const oTeamsHelperService = await this._getTeamsHelperService();
|
|
351
|
+
oTeamsHelperService._shareToEmail();
|
|
352
|
+
},
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Copy the current URL to the clipboard.
|
|
357
|
+
* @private
|
|
358
|
+
*/
|
|
359
|
+
_toCopyUrl: async function() {
|
|
360
|
+
const oTeamsHelperService = await this._getTeamsHelperService();
|
|
361
|
+
oTeamsHelperService._copyLink();
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
|
|
365
|
+
return UniversalCollaborationBar;
|
|
366
|
+
});
|
|
@@ -24,7 +24,10 @@ sap.ui.require.preload({
|
|
|
24
24
|
sap.ui.define(["sap/base/Log","./BaseHelperService","./TeamsHelperService","./CollaborationManagerService","../windowmessages/CollaborationMessageBroker","../windowmessages/CollaborationMessageConsumer","./CollaborationHelper","sap/ui/core/Element"],function(e,r,n,i,o,t,a,s){var l=e.getLogger("sap.suite.ui.commons.collaboration.ServiceContainer");var c;var u;function v(){var e;if(c&&Object.keys(c).length){var i=c.sProvider;var o=c.oProviderConfig;if(i==="COLLABORATION_MSTEAMS"){e=new n(o)}u=Promise.resolve(e);return u}e=new r({});l.info("Collaboration provider is not activated on the tenant");return Promise.resolve(e)}function f(){}var g=new f;g.getServiceAsync=async function(){const e=sap.ui.require("sap/ushell/Container");if(u){return u}if(e&&e.inAppRuntime()){c=await t.getProviderConfiguration()}return v()};g.getCollaborationServices=async function(){var e=await g.getServiceAsync();var r={oTeamsHelperService:e,oCMHelperService:new i};return Promise.resolve(r)};g.hidePluginsInMSTeams=async function(){try{const e=await a.isTeamsModeActive();if(e){let e=0;const r=1*1e3;const n={chatButton:true,"sap.das.webclientplugin.s4.shellitem":true};const i=setInterval(()=>{e++;if(e>10){clearInterval(i);return}Object.keys(n).forEach(e=>{const r=s.getElementById(e);if(r?.getVisible()===true){r.setVisible(false);n[e]=false}});const r=Object.values(n).every(e=>!e);if(r){clearInterval(i)}},r)}}catch(e){l.error("Error hiding the plugins in MS Teams",e)}};g.setCollaborationType=function(e,r){l.info("Collaboration properties are now configured");g.hidePluginsInMSTeams();c={sProvider:e,oProviderConfig:r};v();o.startInstance(c)};return g},true);
|
|
25
25
|
},
|
|
26
26
|
"sap/suite/ui/commons/collaboration/TeamsHelperService.js":function(){
|
|
27
|
-
sap.ui.define(["sap/base/Log","sap/ui/core/Core","sap/base/security/URLListValidator","./CollaborationHelper","./BaseHelperService","sap/ui/core/Element","./ContactHelper","sap/ui/Device","./CollaborationCardHelper","sap/ui/core/Fragment","sap/m/MessageBox","sap/ui/core/Lib","sap/m/Popover","sap/m/HBox","sap/m/VBox","sap/m/MessageStrip","sap/m/Button","./CollaborationContactInfoHelper","sap/m/library","sap/m/FlexBox","sap/base/i18n/Localization","./CollaborationManagerService","sap/m/FlexItemData"],function(e,t,a,i,r,o,n,s,l,p,d,c,h,u,f,C,m,A,T,S,g,b,v){var _=r.extend("sap.suite.ui.commons.collaboration.TeamsHelperService",{constructor:function(e){this._providerConfig=e;this._providerConfig.shareAsLinkUrl="https://teams.microsoft.com/share";this._getShareAsTabUrl().then(function(e){this._providerConfig.shareAsTabUrl=e}.bind(this))}});var y="db5b69c6-0430-4ae1-8d6e-a65c2220b50c";var O=e.getLogger("sap.suite.ui.commons.collaboration.TeamsHelperService");var L="https://saps4hana.azure-api.net/bot/redirect?target-url=";var E=c.getResourceBundleFor("sap.suite.ui.commons");var M="info";var I;let B;const R=60*1e3;var x={};var U="width=720,height=720";_.prototype.getOptions=function(e){x={isShareAsLinkEnabled:e&&typeof e.isShareAsLinkEnabled!=="undefined"?e.isShareAsLinkEnabled:true,isShareAsTabEnabled:e&&typeof e.isShareAsTabEnabled!=="undefined"?e.isShareAsTabEnabled:true,isShareAsCardEnabled:e&&typeof e.isShareAsCardEnabled!=="undefined"?e.isShareAsCardEnabled:false};var t=[];var a=[];if(s.system.desktop){if(x.isShareAsLinkEnabled){if(this._providerConfig.isShareAsLinkEnabled==="X"){t.push({text:E.getText("COLLABORATION_MSTEAMS_CHAT"),key:"COLLABORATION_MSTEAMS_CHAT",icon:"sap-icon://post",fesrStepName:"MST:ShareAsLink"})}else{O.info("Share as Chat option is not enabled in the tenant")}}else{O.info("Consumer disable Share as Chat option")}}else{O.info("Share as Chat option is not supported in Phone and Tablet")}if(s.system.desktop){if(x.isShareAsTabEnabled){if(this._providerConfig.isShareAsTabEnabled==="X"){t.push({text:E.getText("COLLABORATION_MSTEAMS_TAB"),key:"COLLABORATION_MSTEAMS_TAB",icon:"sap-icon://image-viewer",fesrStepName:"MST:ShareAsTab"})}else{O.info("Share as Tab option is not enabled in the tenant")}}else{O.info("Consumer disable Share as Tab option")}}else{O.info("Share as Tab option is not supported in Phone and Tablet")}if(s.system.desktop){if(x.isShareAsCardEnabled){const e=this._providerConfig.isShareAsCardEnabled;const a=this._providerConfig.isShareAsTabEnabled==="X";const i={text:E.getText("COLLABORATION_MSTEAMS_CARD"),key:"COLLABORATION_MSTEAMS_CARD",icon:"sap-icon://ui-notifications",fesrStepName:"MST:ShareAsCard"};switch(e){case"DISABLED":O.info("Share as Card option is not enabled in the tenant");break;case"ENABLED":case"AUTHENABLE":t.push(i);break;case"":case undefined:if(a){t.push(i)}else{O.info("Share as Card option is not enabled in the tenant")}break;default:O.info("Share as Card option is not enabled in the tenant");break}}else{O.info("Consumer disable Share as Card option")}}else{O.info("Share as Card option is not supported in Phone and Tablet")}if(t.length===1){a=t;if(a[0].key==="COLLABORATION_MSTEAMS_CHAT"){a[0].text=E.getText("COLLABORATION_MSTEAMS_CHAT_SINGLE")}else if(a[0].key==="COLLABORATION_MSTEAMS_TAB"){a[0].text=E.getText("COLLABORATION_MSTEAMS_TAB_SINGLE")}else if(a[0].key==="COLLABORATION_MSTEAMS_CARD"){a[0].text=E.getText("COLLABORATION_MSTEAMS_CARD_SINGLE")}return a}if(t.length>1){a.push({type:"microsoft",text:E.getText("COLLABORATION_MSTEAMS_SHARE"),icon:"sap-icon://collaborate",subOptions:t})}return a};_.prototype.share=function(e,t){if(!t.url){O.error("url is not supplied in object so terminating Click");return}if(!a.validate(t.url)){O.error("Invalid URL supplied");return}if(e.key==="COLLABORATION_MSTEAMS_CHAT"){this._shareAsChat(t);return}if(e.key==="COLLABORATION_MSTEAMS_TAB"){this._shareAsTab(t);return}if(e.key==="COLLABORATION_MSTEAMS_CARD"){this._shareAsCard(t);return}};_.prototype._shareAsChat=function(e){var t=window.open("","_blank",U);var a=e.appTitle;if(e.subTitle.length>0){a+=": "+e.subTitle}t.opener=null;if(e.minifyUrlForChat){i.compactHash(e.url,[]).then(async function(i){var r=await this._modifyUrlForNavigationContext(e.url,i.url);t.location=this._providerConfig.shareAsLinkUrl+"?msgText="+encodeURIComponent(a)+"&preview=false"+"&href="+encodeURIComponent(r)}.bind(this))}else{t.location=this._providerConfig.shareAsLinkUrl+"?msgText="+encodeURIComponent(a)+"&preview=false"+"&href="+encodeURIComponent(e.url)}};_.prototype._modifyUrlForShareAsTab=async function(e,t){var a=e;var i=a.indexOf("#");if(i!==-1){var r=a.substring(0,i);var o=r.indexOf("?",0);var n="sap-ushell-config=lean&sap-collaboration-teams=true&sap-ui-fesr-env="+t;if(o!==-1){r=r.substring(0,o+1)+n+"&"+r.substring(o+1)}else{r+="?"+n}a=r+a.substring(i);a=await this._addNavmodeInUrl(a,"explace")}return a};_.prototype._shareAsTab=async function(e){var t=await this._modifyUrlForShareAsTab(e.url,"MST:T");var a={subEntityId:{url:t,appTitle:e.appTitle,subTitle:e.subTitle,mode:"tab"}};if(e.minifyUrlForChat){i.compactHash(t,[]).then(async function(e){var i=await this._modifyUrlForNavigationContext(t,e.url);a.subEntityId.url=await this._addNavmodeInUrl(i,"explace");var r=this._providerConfig.shareAsTabUrl+"?&context="+encodeURIComponent(JSON.stringify(a));sap.m.URLHelper.redirect(r,true)}.bind(this))}else{var r=this._providerConfig.shareAsTabUrl+"?&context="+encodeURIComponent(JSON.stringify(a));sap.m.URLHelper.redirect(r,true)}};_.prototype._addNavmodeInUrl=function(e,t){const a=sap.ui.require("sap/ushell/Container");return a&&a.getServiceAsync("URLParsing").then(function(a){var i=e;var r=i.indexOf("#");var o=a.parseShellHash(i.substring(r));o.params["sap-ushell-navmode"]=t;o.params["sap-ushell-next-navmode"]=t;var n=a.constructShellHash(o);i=i.substring(0,r)+"#"+n;return Promise.resolve(i)})};_.prototype._modifyUrlForNavigationContext=function(e,t){if(e===t){return Promise.resolve(t)}const a=sap.ui.require("sap/ushell/Container");return a&&a.getServiceAsync("URLParsing").then(function(a){var i=e;var r=i.indexOf("#");var o=a.parseShellHash(i.substring(r));var n=Object.keys(o.params).length;var s=new URL(t);if(n>0){if(!s.searchParams.has("sap-collaboration-teams")){s.searchParams.set("sap-collaboration-teams","true")}else{s.searchParams.delete("sap-collaboration-teams")}}return Promise.resolve(s.toString())})};_.prototype._shareAsCard=function(e){if(e.cardId&&e.cardId.length>0&&e.cardManifest&&this.isFeatureFlagEnabled()){e.cardManifest["rtl"]=g.getRTL();p.load({name:"sap.suite.ui.commons.collaboration.CollaborationBusyDialog",controller:this,type:"XML"}).then(function(t){I=t;I.open();B=setTimeout(function(){I.close();I.destroy()},R);l.postCard(e.cardId,e.cardManifest).then(function(t){var a=true;var i={cardId:t.card_id,version:t.version};if(t.error){if(t.error.code==="APS_UI_MSG/001"){a=true;i.cardId=e.cardId;if(t.error.message.length>0){try{var r=JSON.parse(atob(t.error.message)).version;i.version=r}catch(e){a=false}}}else{a=false}}if(a){this._updateUrl(e,i)}else{d.error(E.getText("SAVE_CARD_ERROR"));this._closeBusyDailog()}}.bind(this))}.bind(this))}else{this._updateUrl(e,{})}};_.prototype._updateUrl=async function(e,t){if(e.minifyUrlForChat){i.compactHash(e.url,[]).then(async function(a){var r=await this._modifyUrlForNavigationContext(e.url,a.url);if(x.isShareAsTabEnabled&&this._providerConfig.isShareAsTabEnabled){var o=await this._modifyUrlForShareAsTab(e.url,"MST:C");var n=await i.compactHash(o,[]);var s=n.url.split("sap-url-hash=")[1];if(s){r+=`,${s}`}else{o=await this._modifyUrlForShareAsTab(r,"MST:C");r=await this._addNavmodeInUrl(o,"inplace")}this._closeBusyDialogAndOpenTeamsDialog(r,e,t)}else{this._closeBusyDialogAndOpenTeamsDialog(r,e,t)}}.bind(this))}else{var a=e.url;if(x.isShareAsTabEnabled&&this._providerConfig.isShareAsTabEnabled){var r=await this._modifyUrlForShareAsTab(a,"MST:C");a=await this._addNavmodeInUrl(r,"inplace")}this._closeBusyDialogAndOpenTeamsDialog(a,e,t)}};_.prototype._closeBusyDailog=function(){if(I){I.close();I.destroy();clearTimeout(B)}};_.prototype._closeBusyDialogAndOpenTeamsDialog=function(e,t,a){this._closeBusyDailog();var i=window.open("","_blank",U);i.opener=null;i.location=this._addCardParamsInUrl(e,t.appTitle,a)};_.prototype._addCardParamsInUrl=function(e,t,a){var i=[a.cardId||"",a.version||"",encodeURIComponent(t)].filter(Boolean);e+=`&${M}=${i.join(",")}`;return`${this._providerConfig.shareAsLinkUrl}?href=${encodeURIComponent(L+e)}`};_.prototype._getShareAsTabUrl=function(){return this._getApplicationID().then(function(e){return"https://teams.microsoft.com/l/entity/"+e+"/tab"})};_.prototype._getApplicationID=function(){const e=sap.ui.require("sap/ushell/Container");return e&&e.getServiceAsync("URLParsing").then(function(e){return i._getCurrentUrl().then(function(t){var a=t.split("#")[0];if(a.indexOf("?")!==-1){var i=e&&e.parseParameters(a.substring(a.indexOf("?")));if(i&&i["sap-collaboration-xx-TeamsAppId"]&&i["sap-collaboration-xx-TeamsAppId"][0]&&i["sap-collaboration-xx-TeamsAppId"][0].length>0){return Promise.resolve(i["sap-collaboration-xx-TeamsAppId"][0])}return Promise.resolve(y)}else{return Promise.resolve(y)}})})};_.prototype.isFeatureFlagEnabled=function(){const e=this._providerConfig.isShareAsCardEnabled;return e==="AUTHENABLE"};_.prototype.isContactsCollaborationSupported=function(){return true};_.prototype.enableContactsCollaboration=async function(e,t){const a=await i.isTeamsModeActive();const r=await A.fetchServiceStatus();if(e&&r.value&&r.value&&r.value[0].FetchContacts==="Active"){if(!this.oContactHelper){this.oContactHelper=new n}if(this._providerConfig.isDirectCommunicationEnabled==="ENABLED"){return this.oContactHelper.loadContactPopover(e,t,true)}else{return this.oContactHelper.loadContactPopover(e,t)}}else if(a||!e||this._providerConfig.isDirectCommunicationEnabled!=="ENABLED"){return Promise.reject()}else{if(!this.oContactHelper){this.oContactHelper=new n}return this.oContactHelper.loadMinimalContactPopover(e,t)}};_.prototype.getTeamsContactCollabOptions=async function(){const e=await i.isTeamsModeActive();if(e||this._providerConfig.isDirectCommunicationEnabled!=="ENABLED"){return Promise.reject()}if(!this.oContactHelper){this.oContactHelper=new n}return this.oContactHelper.getTeamsContactOptions()};_.prototype.getTeamsContactStatus=async function(e){const t=await i.isTeamsModeActive();if(t){return Promise.reject()}if(!this.oContactHelper){this.oContactHelper=new n}return this.oContactHelper.getTeamsContactStatus(e)};_.prototype.getCollaborationPopover=function(e,t,a,i,r){if(t.data===undefined||t.data.trim()===""){O.error("Popover cannnot be opened without data");return}var o={isShareAsLinkEnabled:e&&typeof e.isShareAsLinkEnabled!=="undefined"?e.isShareAsLinkEnabled:true};var r={shareToTeams:r&&typeof r.shareToTeams!=="undefined"?r.shareToTeams:true,shareToEmail:r&&typeof r.shareToEmail!=="undefined"?r.shareToEmail:true,shareToCM:r&&typeof r.shareToCM!=="undefined"?r.shareToCM:false};var n=[];if(s.system.desktop){if(o.isShareAsLinkEnabled){if(this._providerConfig.isShareAsLinkEnabled==="X"&&r.shareToTeams){n.push({text:E.getText("COLLABORATION_POPOVER_TEAMS"),icon:"sap-icon://discussion",key:"COLLABORATION_POPOVER_TEAMS"})}else{O.info("Share as Chat option is not enabled in the tenant")}}else{O.info("Consumer disable Share as Chat option")}}else{O.info("Share as Chat option is not supported in Phone and Tablet")}if(r.shareToEmail){n.push({text:E.getText("COLLABORATION_POPOVER_MAIL"),icon:"sap-icon://email",key:"COLLABORATION_POPOVER_MAIL"})}this.oCollaborationManager=new b;var l=this.oCollaborationManager.getOptions();if(l&&r.shareToCM){n.push({text:l.text,icon:l.icon,key:"COLLABORATION_POPOVER_CM"})}if(n.length===1&&!i&&n[0].key==="COLLABORATION_POPOVER_MAIL"){this._shareData(t,n[0],i);return}var p=this._getPopover(t,n,i);p.openBy(a)};_.prototype._getPopover=function(e,t,a){var i=new h({showHeader:false,placement:e.placement?e.placement:"Auto",verticalScrolling:false,horizontalScrolling:false,content:this._getPopoverContent(e,t,a)});return i};_.prototype._getPopoverContent=function(e,t,a){var i=new S({items:[],direction:T.FlexDirection.Column});var r=new S({direction:e.sFormat==="Vertical"?T.FlexDirection.Column:T.FlexDirection.Row,justifyContent:T.FlexJustifyContent.SpaceAround,items:[]});t.forEach(o=>{var n=new m({text:o.text,icon:o.icon,width:e.sFormat==="Horizontal"&&t.length===3?"120px":"180px",press:t=>{t.getSource().getParent().getParent().getParent().close();this._shareData(e,o,a)}}).addStyleClass("sapUiTinyMarginTop").addStyleClass("sapUiTinyMarginBegin");if(o.key==="COLLABORATION_POPOVER_TEAMS"){n.addStyleClass("sapSuiteUiCollaborationBarMSTeamsButton"+(e.sFormat?e.sFormat:"Horizontal"))}else if(o.key==="COLLABORATION_POPOVER_CM"){n.addStyleClass("sapSuiteUiCollaborationBarCMButton"+(e.sFormat?e.sFormat:"Horizontal"))}else{n.addStyleClass("sapSuiteUiCollaborationBarEmailButton"+(e.sFormat?e.sFormat:"Horizontal"))}r.addItem(n);i.addItem(r)});if(a){var o=new S({justifyContent:e.sFormat==="Vertical"?T.FlexJustifyContent.Center:T.FlexJustifyContent.SpaceBetween,alignItems:T.FlexAlignItems.Center,items:[new m({text:E.getText("COLLABORATION_POPOVER_COPYURL_BUTTON"),width:e.sFormat==="Vertical"?"150px":"",press:async()=>{await this._writeToClipBoard(e.data)}}).addStyleClass("sapUiTinyMarginBeginEnd")]});if(e.sFormat==="Horizontal"||e.sFormat===undefined){o.insertItem(new C({text:E.getText("COLLABORATION_POPOVER_MSGSTRIP"),showIcon:true}).addStyleClass("sapUiTinyMarginBeginEnd").addStyleClass("sapSuiteCollaborationBarMsgStrip"),0);o.addStyleClass("sapSuiteUiCollaborationBarMsgStripHBox")}o.addStyleClass("sapUiTinyMarginBeginEnd").addStyleClass("sapUiTinyMarginTopBottom");i.addItem(o)}if(e.sFormat==="Vertical"){r.setHeight(t.length>1?t.length*50+50+"px":"80px");r.addStyleClass("sapUiSmallMarginBottom").addStyleClass("sapUiTinyMarginEnd")}else{r.setHeight("110px");r.addStyleClass("sapUiTinyMarginEnd")}return i};_.prototype._writeToClipBoard=async function(e){try{await navigator.clipboard.writeText(e)}catch(e){O.info(e)}};_.prototype._shareData=function(e,t,a){if(t.key==="COLLABORATION_POPOVER_TEAMS"){if(a){var i={url:e.data,appTitle:e.title?e.title:"",subTitle:"",minifyUrlForChat:true};this._shareAsChat(i)}else{var i={appTitle:e.title?e.title:"",message:e.data,showPreview:typeof e.showPreview!==undefined?e.showPreview:true};this._shareSummary(i)}}else if(t.key==="COLLABORATION_POPOVER_MAIL"){sap.m.URLHelper.triggerEmail(null,e.title&&e.title.trim()!==""?e.title:null,e.data)}else if(t.key==="COLLABORATION_POPOVER_CM"){this.oCollaborationManager.triggerH2HChat(e.title,e.data)}};_.prototype._shareSummary=function(e){var t={subEntityId:{appTitle:e.appTitle,mode:"summary",message:e.message,showPreview:e.showPreview}};var a=this._providerConfig.shareAsTabUrl+"?&context="+encodeURIComponent(JSON.stringify(t));sap.m.URLHelper.redirect(a,true)};return _});
|
|
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,r,o,i,n,s,l,p,c,d,h,u,f,C,m,g,T,y,A,S,_){var b=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))}});const O="db5b69c6-0430-4ae1-8d6e-a65c2220b50c";const v=e.getLogger("sap.suite.ui.commons.collaboration.TeamsHelperService");const L="https://saps4hana.azure-api.net/bot/redirect?target-url=";const U=d.getResourceBundleFor("sap.suite.ui.commons");const E="info";let w;let I;const M=60*1e3;let R={};const x="width=720,height=720";const B=["*.s4hana.ondemand.com","*.*.s4hana.ondemand.com","*.*.*.s4hana.ondemand.com","*.cloud.sap","*.*.cloud.sap","*.*.*.cloud.sap","*.sapcloud.cn","*.*.sapcloud.cn","*.*.*.sapcloud.cn","*.saps4hanacloud.cn","*.*.saps4hanacloud.cn","*.*.*.saps4hanacloud.cn","*.sap.com"];b.prototype.getOptions=function(e){R={isShareAsLinkEnabled:e&&typeof e.isShareAsLinkEnabled!=="undefined"?e.isShareAsLinkEnabled:true,isShareAsTabEnabled:e&&typeof e.isShareAsTabEnabled!=="undefined"?e.isShareAsTabEnabled:true,isShareAsCardEnabled:e&&typeof e.isShareAsCardEnabled!=="undefined"?e.isShareAsCardEnabled:false};var t=[];var a=[];if(s.system.desktop){if(R.isShareAsLinkEnabled){if(this._providerConfig.isShareAsLinkEnabled==="X"){t.push({text:U.getText("COLLABORATION_MSTEAMS_CHAT"),key:"COLLABORATION_MSTEAMS_CHAT",icon:"sap-icon://post",fesrStepName:"MST:ShareAsLink"})}else{v.info("Share as Chat option is not enabled in the tenant")}}else{v.info("Consumer disable Share as Chat option")}}else{v.info("Share as Chat option is not supported in Phone and Tablet")}if(s.system.desktop){if(R.isShareAsTabEnabled){if(this._providerConfig.isShareAsTabEnabled==="X"){t.push({text:U.getText("COLLABORATION_MSTEAMS_TAB"),key:"COLLABORATION_MSTEAMS_TAB",icon:"sap-icon://image-viewer",fesrStepName:"MST:ShareAsTab"})}else{v.info("Share as Tab option is not enabled in the tenant")}}else{v.info("Consumer disable Share as Tab option")}}else{v.info("Share as Tab option is not supported in Phone and Tablet")}if(s.system.desktop){if(R.isShareAsCardEnabled){const e=this._providerConfig.isShareAsCardEnabled;const a={text:U.getText("COLLABORATION_MSTEAMS_CARD"),key:"COLLABORATION_MSTEAMS_CARD",icon:"sap-icon://ui-notifications",fesrStepName:"MST:ShareAsCard"};switch(e){case"DISABLED":v.info("Share as Card option is not enabled in the tenant");break;case"ENABLED":case"AUTHENABLE":t.push(a);break;default:v.info("Share as Card option is not enabled in the tenant");break}}else{v.info("Consumer disable Share as Card option")}}else{v.info("Share as Card option is not supported in Phone and Tablet")}if(t.length===1){a=t;if(a[0].key==="COLLABORATION_MSTEAMS_CHAT"){a[0].text=U.getText("COLLABORATION_MSTEAMS_CHAT_SINGLE")}else if(a[0].key==="COLLABORATION_MSTEAMS_TAB"){a[0].text=U.getText("COLLABORATION_MSTEAMS_TAB_SINGLE")}else if(a[0].key==="COLLABORATION_MSTEAMS_CARD"){a[0].text=U.getText("COLLABORATION_MSTEAMS_CARD_SINGLE")}return a}if(t.length>1){a.push({type:"microsoft",text:U.getText("COLLABORATION_MSTEAMS_SHARE"),icon:"sap-icon://collaborate",subOptions:t})}return a};b.prototype.share=function(e,t){if(!t.url){v.error("url is not supplied in object so terminating Click");return}if(!a.validate(t.url)){v.error("Invalid URL supplied");return}if(e.key==="COLLABORATION_MSTEAMS_CHAT"){this._shareAsChat(t);return}if(e.key==="COLLABORATION_MSTEAMS_TAB"){this._shareAsTab(t);return}if(e.key==="COLLABORATION_MSTEAMS_CARD"){this._shareAsCard(t);return}};b.prototype._shareAsChat=function(e){var t=window.open("","_blank",x);var a=e.appTitle;if(e.subTitle.length>0){a+=": "+e.subTitle}t.opener=null;if(e.minifyUrlForChat){r.compactHash(e.url,[]).then(async function(r){var o=await this._modifyUrlForNavigationContext(e.url,r.url);t.location=this._providerConfig.shareAsLinkUrl+"?msgText="+encodeURIComponent(a)+"&preview=false"+"&href="+encodeURIComponent(o)}.bind(this))}else{t.location=this._providerConfig.shareAsLinkUrl+"?msgText="+encodeURIComponent(a)+"&preview=false"+"&href="+encodeURIComponent(e.url)}};b.prototype._modifyUrlForShareAsTab=async function(e,t){var a=e;var r=a.indexOf("#");if(r!==-1){var o=a.substring(0,r);var i=o.indexOf("?",0);var n="sap-ushell-config=lean&sap-collaboration-teams=true&sap-ui-fesr-env="+t;if(i!==-1){o=o.substring(0,i+1)+n+"&"+o.substring(i+1)}else{o+="?"+n}a=o+a.substring(r);a=await this._addNavmodeInUrl(a,"explace")}return a};b.prototype._shareAsTab=async function(e){var t=await this._modifyUrlForShareAsTab(e.url,"MST:T");var a={subEntityId:{url:t,appTitle:e.appTitle,subTitle:e.subTitle,mode:"tab"}};if(e.minifyUrlForChat){r.compactHash(t,[]).then(async function(e){var r=await this._modifyUrlForNavigationContext(t,e.url);a.subEntityId.url=await this._addNavmodeInUrl(r,"explace");var o=this._providerConfig.shareAsTabUrl+"?&context="+encodeURIComponent(JSON.stringify(a));sap.m.URLHelper.redirect(o,true)}.bind(this))}else{var o=this._providerConfig.shareAsTabUrl+"?&context="+encodeURIComponent(JSON.stringify(a));sap.m.URLHelper.redirect(o,true)}};b.prototype._addNavmodeInUrl=function(e,t){const a=sap.ui.require("sap/ushell/Container");return a&&a.getServiceAsync("URLParsing").then(function(a){var r=e;var o=r.indexOf("#");var i=a.parseShellHash(r.substring(o));i.params["sap-ushell-navmode"]=t;i.params["sap-ushell-next-navmode"]=t;var n=a.constructShellHash(i);r=r.substring(0,o)+"#"+n;return Promise.resolve(r)})};b.prototype._modifyUrlForNavigationContext=function(e,t){if(e===t){return Promise.resolve(t)}const a=sap.ui.require("sap/ushell/Container");return a&&a.getServiceAsync("URLParsing").then(function(a){var r=e;var o=r.indexOf("#");var i=a.parseShellHash(r.substring(o));var n=Object.keys(i.params).length;var s=new URL(t);if(n>0){if(!s.searchParams.has("sap-collaboration-teams")){s.searchParams.set("sap-collaboration-teams","true")}else{s.searchParams.delete("sap-collaboration-teams")}}return Promise.resolve(s.toString())})};b.prototype._shareAsCard=async function(e){if(!e?.cardId||!e.cardId.length||!e.cardManifest||!this.isFeatureFlagEnabled()){this._updateUrl(e,{});return}let t={};try{try{const e=await p.load({name:"sap.suite.ui.commons.collaboration.CollaborationBusyDialog",controller:this,type:"XML"});w=e;w.open();I=setTimeout(()=>{w.close();w.destroy()},M)}catch(e){v.error("Fragment load failed: "+e.message)}t=await this._buildCardInfo(e)}catch(e){v.error("buildCardInfo failed: "+e.message)}finally{if(t&&Object.keys(t).length===0){v.warn("Card info could not be saved.")}this._updateUrl(e,t)}};b.prototype._buildCardInfo=async function(e){e.cardManifest.rtl=A.getRTL();const t=await l.postCard(e.cardId,e.cardManifest);let a={cardId:t.card_id,version:t.version};if(t.error){if(t.error.code==="APS_UI_MSG/001"){a.cardId=e.cardId;if(t.error.message.length>0){try{const e=JSON.parse(atob(t.error.message)).version;a.version=e}catch(e){a={}}}}else{a={}}}return a};b.prototype._updateUrl=async function(e,t){let a=e?.url||window.location.href;try{if(e.minifyUrlForChat){a=await this._getModifiedUrlForSharing(e)}else if(R.isShareAsTabEnabled&&this._providerConfig.isShareAsTabEnabled){const e=await this._modifyUrlForShareAsTab(a,"MST:C");a=await this._addNavmodeInUrl(e,"inplace")}}catch(e){v.error("Error while modifying URL for sharing: "+e.message)}finally{this._closeBusyDialogAndOpenTeamsDialog(a,e,t)}};b.prototype._getModifiedUrlForSharing=async function(e){const t=await r.compactHash(e.url,[]);let a=await this._modifyUrlForNavigationContext(e.url,t.url);let o=await this._modifyUrlForShareAsTab(e.url,"MST:C");const i=await r.compactHash(o,[]);const n=i.url.split("sap-url-hash=")[1];if(n){a+=`,${n}`}else{o=await this._modifyUrlForShareAsTab(a,"MST:C");a=await this._addNavmodeInUrl(o,"inplace")}return a};b.prototype._closeBusyDialog=function(){if(w){w.close();w.destroy();clearTimeout(I)}};b.prototype._closeBusyDialogAndOpenTeamsDialog=function(e,t,a){this._closeBusyDialog();const r=window.open("","_blank",x);r.opener=null;r.location=this._generateShareAsCardUrl(e,t.appTitle,a)};b.prototype._wildcardToRegExp=function(e){return new RegExp("^"+e.split("*").map(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}).join("[^.]+")+"$","i")};b.prototype._isValidDomain=function(e){try{const t=new URL(e).hostname;return B.some(e=>this._wildcardToRegExp(e).test(t))}catch(e){return false}};b.prototype._getCardInfoUrl=function(e,t,a){const r=this._isValidDomain(e);const o=t?.appTitle;if(r){return this._generateCardUnfurlingUrl(e,a,{appTitle:o})}else{return this._generateShareAsCardUrl(e,o,a)}};b.prototype._generateShareAsCardUrl=function(e,t,a){const r=this._generateCardUnfurlingUrl(e,a,{appTitle:t});return`${this._providerConfig.shareAsLinkUrl}?href=${encodeURIComponent(L+encodeURIComponent(r))}`};b.prototype._generateCardUnfurlingUrl=function(e,t,a){const r=[t.cardId||"",t.version||"",encodeURIComponent(a.appTitle||"")].filter(Boolean);return`${e}&${E}=${r.join(",")}`};b.prototype._getShareAsTabUrl=function(){return this._getApplicationID().then(function(e){return"https://teams.microsoft.com/l/entity/"+e+"/tab"})};b.prototype._getApplicationID=function(){const e=sap.ui.require("sap/ushell/Container");return e&&e.getServiceAsync("URLParsing").then(function(e){return r._getCurrentUrl().then(function(t){var a=t.split("#")[0];if(a.indexOf("?")!==-1){var r=e&&e.parseParameters(a.substring(a.indexOf("?")));if(r&&r["sap-collaboration-xx-TeamsAppId"]&&r["sap-collaboration-xx-TeamsAppId"][0]&&r["sap-collaboration-xx-TeamsAppId"][0].length>0){return Promise.resolve(r["sap-collaboration-xx-TeamsAppId"][0])}return Promise.resolve(O)}else{return Promise.resolve(O)}})})};b.prototype.isFeatureFlagEnabled=function(){const e=this._providerConfig.isShareAsCardEnabled;return e==="AUTHENABLE"};b.prototype.isContactsCollaborationSupported=function(){return true};b.prototype.enableContactsCollaboration=async function(e,t){const a=await r.isTeamsModeActive();const o=await g.fetchServiceStatus();if(e&&o.value&&o.value&&o.value[0].FetchContacts==="Active"){if(!this.oContactHelper){this.oContactHelper=new n}if(this._providerConfig.isDirectCommunicationEnabled==="ENABLED"){return this.oContactHelper.loadContactPopover(e,t,true)}else{return this.oContactHelper.loadContactPopover(e,t)}}else if(a||!e||this._providerConfig.isDirectCommunicationEnabled!=="ENABLED"){return Promise.reject()}else{if(!this.oContactHelper){this.oContactHelper=new n}return this.oContactHelper.loadMinimalContactPopover(e,t)}};b.prototype.getTeamsContactCollabOptions=async function(){const e=await r.isTeamsModeActive();if(e||this._providerConfig.isDirectCommunicationEnabled!=="ENABLED"){return Promise.reject()}if(!this.oContactHelper){this.oContactHelper=new n}return this.oContactHelper.getTeamsContactOptions()};b.prototype.getTeamsContactStatus=async function(e){const t=await r.isTeamsModeActive();if(t){return Promise.reject()}if(!this.oContactHelper){this.oContactHelper=new n}return this.oContactHelper.getTeamsContactStatus(e)};b.prototype.getCollaborationPopover=function(e,t,a,r,o){if(t.data===undefined||t.data.trim()===""){v.error("Popover cannnot be opened without data");return}var i={isShareAsLinkEnabled:e&&typeof e.isShareAsLinkEnabled!=="undefined"?e.isShareAsLinkEnabled:true};var n={shareToTeams:o&&typeof o.shareToTeams!=="undefined"?o.shareToTeams:true,shareToEmail:o&&typeof o.shareToEmail!=="undefined"?o.shareToEmail:true,shareToCM:o&&typeof o.shareToCM!=="undefined"?o.shareToCM:false};var l=[];if(s.system.desktop){if(i.isShareAsLinkEnabled){if(this._providerConfig.isShareAsLinkEnabled==="X"&&n.shareToTeams){l.push({text:U.getText("COLLABORATION_POPOVER_TEAMS"),icon:"sap-icon://discussion",key:"COLLABORATION_POPOVER_TEAMS"})}else{v.info("Share as Chat option is not enabled in the tenant")}}else{v.info("Consumer disable Share as Chat option")}}else{v.info("Share as Chat option is not supported in Phone and Tablet")}if(n.shareToEmail){l.push({text:U.getText("COLLABORATION_POPOVER_MAIL"),icon:"sap-icon://email",key:"COLLABORATION_POPOVER_MAIL"})}this.oCollaborationManager=new S;var p=this.oCollaborationManager.getOptions();if(p&&n.shareToCM){l.push({text:p.text,icon:p.icon,key:"COLLABORATION_POPOVER_CM"})}if(l.length===1&&!r&&l[0].key==="COLLABORATION_POPOVER_MAIL"){this._shareData(t,l[0],r);return}var c=this._getPopover(t,l,r);c.openBy(a)};b.prototype._getPopover=function(e,t,a){var r=new h({showHeader:false,placement:e.placement?e.placement:"Auto",verticalScrolling:false,horizontalScrolling:false,content:this._getPopoverContent(e,t,a)});return r};b.prototype._getPopoverContent=function(e,t,a){var r=new y({items:[],direction:T.FlexDirection.Column});var o=new y({direction:e.sFormat==="Vertical"?T.FlexDirection.Column:T.FlexDirection.Row,justifyContent:T.FlexJustifyContent.SpaceAround,items:[]});t.forEach(i=>{var n=new m({text:i.text,icon:i.icon,width:e.sFormat==="Horizontal"&&t.length===3?"120px":"180px",press:t=>{t.getSource().getParent().getParent().getParent().close();this._shareData(e,i,a)}}).addStyleClass("sapUiTinyMarginTop").addStyleClass("sapUiTinyMarginBegin");if(i.key==="COLLABORATION_POPOVER_TEAMS"){n.addStyleClass("sapSuiteUiCollaborationBarMSTeamsButton"+(e.sFormat?e.sFormat:"Horizontal"))}else if(i.key==="COLLABORATION_POPOVER_CM"){n.addStyleClass("sapSuiteUiCollaborationBarCMButton"+(e.sFormat?e.sFormat:"Horizontal"))}else{n.addStyleClass("sapSuiteUiCollaborationBarEmailButton"+(e.sFormat?e.sFormat:"Horizontal"))}o.addItem(n);r.addItem(o)});if(a){var i=new y({justifyContent:e.sFormat==="Vertical"?T.FlexJustifyContent.Center:T.FlexJustifyContent.SpaceBetween,alignItems:T.FlexAlignItems.Center,items:[new m({text:U.getText("COLLABORATION_POPOVER_COPYURL_BUTTON"),width:e.sFormat==="Vertical"?"150px":"",press:async()=>{await this._writeToClipBoard(e.data)}}).addStyleClass("sapUiTinyMarginBeginEnd")]});if(e.sFormat==="Horizontal"||e.sFormat===undefined){i.insertItem(new C({text:U.getText("COLLABORATION_POPOVER_MSGSTRIP"),showIcon:true}).addStyleClass("sapUiTinyMarginBeginEnd").addStyleClass("sapSuiteCollaborationBarMsgStrip"),0);i.addStyleClass("sapSuiteUiCollaborationBarMsgStripHBox")}i.addStyleClass("sapUiTinyMarginBeginEnd").addStyleClass("sapUiTinyMarginTopBottom");r.addItem(i)}if(e.sFormat==="Vertical"){o.setHeight(t.length>1?t.length*50+50+"px":"80px");o.addStyleClass("sapUiSmallMarginBottom").addStyleClass("sapUiTinyMarginEnd")}else{o.setHeight("110px");o.addStyleClass("sapUiTinyMarginEnd")}return r};b.prototype._writeToClipBoard=async function(e){try{await window.navigator.clipboard.writeText(e)}catch(e){v.info(e)}};b.prototype._shareData=function(e,t,a){if(t.key==="COLLABORATION_POPOVER_TEAMS"){if(a){var r={url:e.data,appTitle:e.title?e.title:"",subTitle:"",minifyUrlForChat:true};this._shareAsChat(r)}else{var o={appTitle:e.title?e.title:"",message:e.data,showPreview:typeof e.showPreview!=="undefined"?e.showPreview:true};this._shareSummary(o)}}else if(t.key==="COLLABORATION_POPOVER_MAIL"){sap.m.URLHelper.triggerEmail(null,e.title&&e.title.trim()!==""?e.title:null,e.data)}else if(t.key==="COLLABORATION_POPOVER_CM"){this.oCollaborationManager.triggerH2HChat(e.title,e.data)}};b.prototype._shareSummary=function(e){var t={subEntityId:{appTitle:e.appTitle,mode:"summary",message:e.message,showPreview:e.showPreview}};var a=this._providerConfig.shareAsTabUrl+"?&context="+encodeURIComponent(JSON.stringify(t));sap.m.URLHelper.redirect(a,true)};b.prototype._shareToEmail=async function(e){let t=e?.url||window.location.href;try{t=await this._getUnfurlingUrl(e)}catch(e){v.error("getUnfurlingUrl failed: "+e.message)}const a=e?.appTitle?.trim()?e.appTitle:null;sap.m.URLHelper.triggerEmail(null,a,t)};b.prototype._shareAsChatFromCollabBar=async function(e){try{await this._shareAsCard(e)}catch(e){v.error("Failed to share card from collaboration bar: "+e.message)}};b.prototype._copyLink=async function(e){let t=e?.url||window.location.href;try{t=await this._getUnfurlingUrl(e)}catch(e){v.error("getUnfurlingUrl failed: "+e.message)}this._copyCardUrlToClipboard(t)};b.prototype._copyCardUrlToClipboard=async function(e){try{if(typeof window.navigator!=="undefined"&&window.navigator.clipboard&&typeof window.navigator.clipboard.writeText==="function"){try{await window.navigator.clipboard.writeText(e);v.info("Card URL copied to clipboard successfully.");sap.m.MessageToast.show(U.getText("COLLABORATION_POPOVER_MSGSTRIP_SUCCESS"))}catch(e){v.error("Clipboard write failed: "+e.message)}}else{v.error("Clipboard API is not available.")}}catch(e){v.error("Failed to generate or copy Card URL",e)}};b.prototype._getUnfurlingUrl=async function(e){if(!e?.cardId||!e.cardId.length||!e.cardManifest||!this.isFeatureFlagEnabled()){return this._generateUnfurlingUrl(e,{})}let t="";let a={};try{try{const e=await p.load({name:"sap.suite.ui.commons.collaboration.CollaborationBusyDialog",controller:this,type:"XML"});w=e;w.open();I=setTimeout(()=>{w.close();w.destroy()},M)}catch(e){v.error("Fragment load failed: "+e.message)}a=await this._buildCardInfo(e)}catch(e){v.error("buildCardInfo failed: "+e.message)}finally{if(a&&Object.keys(a).length===0){v.warn("Card info could not be saved.")}t=this._generateUnfurlingUrl(e,a);this._closeBusyDialog()}return t};b.prototype._generateUnfurlingUrl=async function(e,t){let a=e?.url||window.location.href;try{if(e?.minifyUrlForChat){a=await this._getModifiedUrlForSharing(e)}else if(R.isShareAsTabEnabled&&this._providerConfig.isShareAsTabEnabled){const e=await this._modifyUrlForShareAsTab(a,"MST:C");a=await this._addNavmodeInUrl(e,"inplace")}}catch(e){v.error("Error while modifying URL for sharing: "+e.message)}return this._getCardInfoUrl(a,e,t)};return b});
|
|
28
|
+
},
|
|
29
|
+
"sap/suite/ui/commons/collaboration/UniversalCollaborationBar.js":function(){
|
|
30
|
+
sap.ui.define(["sap/base/Log","sap/ui/Device","sap/ui/core/Lib","sap/m/Menu","sap/m/MenuItem","sap/ui/performance/trace/FESRHelper"],function(e,t,a,s,n,o){const i="COLLABORATION_POPOVER_MAIL";const r="COLLABORATION_MSTEAMS_SHARE";const l="COLLABORATION_POPOVER_CHAT";const u="COLLABORATION_POPOVER_TAB";const c="COLLABORATION_POPOVER_MANAGER";const p="COLLABORATION_POPOVER_COPYURL_BUTTON";var h=s.extend("sap.suite.ui.commons.collaboration.UniversalCollaborationBar",{metadata:{properties:{shareToEmailEnabled:{type:"boolean",defaultValue:true},shareAsChatEnabled:{type:"boolean",defaultValue:false},shareAsTabEnabled:{type:"boolean",defaultValue:false},shareToCollaborationManagerEnabled:{type:"boolean",defaultValue:false},copyLinkEnabled:{type:"boolean",defaultValue:true}},events:{shareToChatSelected:{},shareToTabSelected:{},copyLinkSelected:{},shareToEmailSelected:{},shareToCollaborationManagerSelected:{}}},init:function(){sap.m.Menu.prototype.init.apply(this,arguments);this._mActionHandlers={[i]:(...e)=>{if(this.hasListeners("shareToEmailSelected")){this.fireShareToEmailSelected({args:e})}else{this._shareToEmail(...e)}},[l]:()=>this.fireShareToChatSelected(),[u]:()=>this.fireShareToTabSelected(),[c]:()=>this.fireShareToCollaborationManagerSelected(),[p]:(...e)=>{if(this.hasListeners("copyLinkSelected")){this.fireCopyLinkSelected({args:e})}else{this._toCopyUrl(...e)}}};this._oLogger=e.getLogger("sap.suite.ui.commons.collaboration.UniversalCollaborationBar");this._oResourceBundle=a.getResourceBundleFor("sap.suite.ui.commons");this.addStyleClass("sapSuiteCollaborationBarMenu")},openBy:function(){if(!this.getItems().length){this._renderMenuItems()}return sap.m.Menu.prototype.openBy.apply(this,arguments)},_renderMenuItems:async function(){const e=await this._getCollaborationPopoverOptions();const t=this._getMenuItems(e);t.forEach(e=>this.addItem(e))},_getTeamsHelperService:async function(){if(!this._oTeamsHelperService){const e=sap.ui.require("sap/suite/ui/commons/collaboration/ServiceContainer");this._oTeamsHelperService=await e.getServiceAsync()}return this._oTeamsHelperService},_getMenuItems:function(e){const t=[];e.forEach(e=>{const a=this._createMenuItem(e.icon,e.text,e.key,e.fesrStepName,e.styleClass);(e.subOptions||[]).forEach(e=>{const t=this._createMenuItem(e.icon,e.text,e.key,e.fesrStepName,e.styleClass);a.addItem(t)});t.push(a)});return t},_createMenuItem:function(e,t,a,s,i){const r={icon:e,text:t,key:a};const l=new n(r);l.attachPress(()=>{const e=this._mActionHandlers[a];if(e){e()}});if(s){o.setSemanticStepname(l,"press",s)}l.addEventDelegate({onAfterRendering:()=>{const e=l.getDomRef();if(e&&i){e.classList.add(i)}}});return l},_createOption:function(e,t,a,{fesrStepName:s="",subOptions:n=[]}={}){const o={text:this._oResourceBundle.getText(e),icon:t,key:e,styleClass:a};if(s){o.fesrStepName=s}if(n.length>0){o.subOptions=n}return o},_getCollaborationPopoverOptions:async function(){const e={isShareAsChatEnabled:this.getShareAsChatEnabled(),isShareAsTabEnabled:this.getShareAsTabEnabled(),isCopyLinkEnabled:this.getCopyLinkEnabled(),isShareToEmailEnabled:this.getShareToEmailEnabled(),isShareToCMEnabled:this.getShareToCollaborationManagerEnabled()};let t={};try{const e=await this._getTeamsHelperService();t=e._providerConfig}catch(e){this._oLogger.error("Error fetching TeamsHelperService:",e)}const a=[];let s=[];const n=[{key:i,icon:"sap-icon://email",styleClass:"sapSuiteUiCommonsCollaborationMail",consumerEnabled:e.isShareToEmailEnabled,providerEnabled:true,fesrStep:"",featureName:"Email",group:"menu"},{key:l,icon:"sap-icon://discussion",styleClass:"sapSuiteUiCommonsCollaborationChat",consumerEnabled:e.isShareAsChatEnabled,providerEnabled:t.isShareAsLinkEnabled==="X",fesrStep:"MST:ShareAsLink",featureName:"Share as Chat",desktopOnly:true,group:"subMenu"},{key:u,icon:"sap-icon://image-viewer",styleClass:"sapSuiteUiCommonsCollaborationTab",consumerEnabled:e.isShareAsTabEnabled,providerEnabled:t.isShareAsTabEnabled==="X",fesrStep:"MST:ShareAsTab",featureName:"Share as Tab",desktopOnly:true,group:"subMenu"},{key:r,icon:"sap-icon://citizen-connect",styleClass:"sapSuiteUiCommonsCollaborationMSTeamsShare",consumerEnabled:true,providerEnabled:true,isParentOfGroup:"subMenu",group:"menu"},{key:c,icon:"sap-icon://collaborate",styleClass:"sapSuiteUiCommonsCollaborationManager",consumerEnabled:e.isShareToCMEnabled,providerEnabled:true,fesrStep:"",featureName:"Collaboration Manager",group:"menu"},{key:p,icon:"sap-icon://chain-link",styleClass:"sapSuiteUiCommonsCollaborationLink",consumerEnabled:e.isCopyLinkEnabled,providerEnabled:true,fesrStep:"",featureName:"Copy link",desktopOnly:true,group:"menu"}];n.forEach(e=>{if(e.group==="subMenu"){const t=this._createOptionIfEnabled(e);if(t){s.push(t)}return}if(e.isParentOfGroup==="subMenu"){if(s.length>0){e.subOptions=s;s=[]}}const t=this._createOptionIfEnabled(e);if(t){a.push(t)}});return a},_createOptionIfEnabled:function(e){if(e.desktopOnly&&!t.system.desktop){this._oLogger.info(`${e.featureName} option is not supported in Phone and Tablet`);return null}if(!e.consumerEnabled){this._oLogger.info(`Consumer disabled ${e.featureName} option`);return null}if(!e.providerEnabled){this._oLogger.info(`${e.featureName} option is not enabled in the tenant`);return null}return this._createOption(e.key,e.icon,e.styleClass,{fesrStepName:e.fesrStep,subOptions:e.subOptions})},_shareToEmail:async function(){const e=await this._getTeamsHelperService();e._shareToEmail()},_toCopyUrl:async function(){const e=await this._getTeamsHelperService();e._copyLink()}});return h});
|
|
28
31
|
},
|
|
29
32
|
"sap/suite/ui/commons/collaboration/channels/MessageChannel.js":function(){
|
|
30
33
|
sap.ui.define(["sap/ui/base/Object"],function(e){var n;var s=e.extend("sap.suite.ui.commons.collaboration.channels.MessageChannel",{postMessage:function(e,n){window.parent.postMessage({...e,_fromMessageChannel:true},n||"*")},subscribe:function(e){window.addEventListener("message",function(n){if(n?.data?._fromMessageChannel&&typeof e==="function"){e(n)}})}});return{getInstance:function(){if(!n){n=new s}return Promise.resolve(n)}}});
|
|
@@ -195,7 +195,7 @@ sap.ui.define([
|
|
|
195
195
|
"sap.suite.ui.commons.TargetFilterMeasureColumn",
|
|
196
196
|
"sap.suite.ui.commons.AriaProperties"
|
|
197
197
|
],
|
|
198
|
-
version: "1.
|
|
198
|
+
version: "1.142.0",
|
|
199
199
|
extensions: {
|
|
200
200
|
flChangeHandlers: {
|
|
201
201
|
"sap.suite.ui.commons.Timeline": "sap/suite/ui/commons/flexibility/Timeline"
|