@sapui5/sap.suite.ui.commons 1.151.0 → 1.152.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 +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderFunction.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderGroup.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderItem.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderValidationResult.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderVariable.js +1 -1
- package/src/sap/suite/ui/commons/CloudFilePicker.js +1 -1
- package/src/sap/suite/ui/commons/MicroProcessFlow.js +1 -1
- package/src/sap/suite/ui/commons/MicroProcessFlowItem.js +1 -1
- package/src/sap/suite/ui/commons/TimelineNavigator.js +12 -9
- package/src/sap/suite/ui/commons/collaboration/UniversalCollaborationBar.js +475 -361
- 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_mk.properties +1 -1
- package/src/sap/suite/ui/commons/networkgraph/ElementBase.js +7 -2
- package/src/sap/suite/ui/commons/networkgraph/Graph.js +9 -4
- package/src/sap/suite/ui/commons/networkgraph/Group.js +1 -1
- package/src/sap/suite/ui/commons/networkgraph/Line.js +11 -0
- package/src/sap/suite/ui/commons/networkgraph/Node.js +1 -1
- package/src/sap/suite/ui/commons/networkgraph/Tooltip.js +3 -1
- package/src/sap/suite/ui/commons/networkgraph/util/ConnectionPathUtils.js +14 -66
- 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/NetworkGraph.less +23 -6
- package/src/sap/suite/ui/commons/themes/base/Timeline.less +2 -2
- package/src/sap/suite/ui/commons/themes/sap_belize_base/NetworkGraph.less +23 -6
- package/src/sap/suite/ui/commons/themes/sap_belize_base/Timeline.less +2 -2
- package/src/sap/suite/ui/commons/themes/sap_belize_hcb/NetworkGraph.less +23 -2
- package/src/sap/suite/ui/commons/themes/sap_belize_hcw/NetworkGraph.less +23 -2
- package/src/sap/suite/ui/commons/themes/sap_hcb/base_NetworkGraph.less +23 -6
|
@@ -4,364 +4,478 @@
|
|
|
4
4
|
(c) Copyright 2009-2015 SAP SE. All rights reserved
|
|
5
5
|
|
|
6
6
|
*/
|
|
7
|
-
sap.ui.define(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
7
|
+
sap.ui.define(
|
|
8
|
+
[
|
|
9
|
+
"sap/base/Log",
|
|
10
|
+
"sap/ui/Device",
|
|
11
|
+
"sap/ui/core/Lib",
|
|
12
|
+
"sap/m/Menu",
|
|
13
|
+
"sap/m/MenuItem",
|
|
14
|
+
"sap/ui/performance/trace/FESRHelper",
|
|
15
|
+
],
|
|
16
|
+
function (Log, Device, Library, Menu, MenuItem, FESRHelper) {
|
|
17
|
+
"use strict";
|
|
18
|
+
|
|
19
|
+
const COLLABORATION_MAIL = "COLLABORATION_POPOVER_MAIL";
|
|
20
|
+
const COLLABORATION_SHARE = "COLLABORATION_MSTEAMS_SHARE";
|
|
21
|
+
const COLLABORATION_CHAT = "COLLABORATION_POPOVER_CHAT";
|
|
22
|
+
const COLLABORATION_TAB = "COLLABORATION_POPOVER_TAB";
|
|
23
|
+
const COLLABORATION_CARD = "COLLABORATION_MSTEAMS_CARD";
|
|
24
|
+
const COLLABORATION_MANAGER = "COLLABORATION_POPOVER_MANAGER";
|
|
25
|
+
const COLLABORATION_COPYURL = "COLLABORATION_POPOVER_COPYURL_BUTTON";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* A universal collaboration bar that provides sharing options through Microsoft Teams, email, link and SAP Collaboration Manager.
|
|
29
|
+
*
|
|
30
|
+
* @class
|
|
31
|
+
* @extends sap.m.Menu
|
|
32
|
+
* @alias sap.suite.ui.commons.collaboration.UniversalCollaborationBar
|
|
33
|
+
* @public
|
|
34
|
+
* @since 1.152
|
|
35
|
+
*
|
|
36
|
+
* @param {object} [mSettings] Initial settings for the new control
|
|
37
|
+
*/
|
|
38
|
+
var UniversalCollaborationBar = Menu.extend(
|
|
39
|
+
"sap.suite.ui.commons.collaboration.UniversalCollaborationBar",
|
|
40
|
+
{
|
|
41
|
+
metadata: {
|
|
42
|
+
properties: {
|
|
43
|
+
/**
|
|
44
|
+
* Enables or disables the share to email option.
|
|
45
|
+
*/
|
|
46
|
+
shareToEmailEnabled: { type: "boolean", defaultValue: true },
|
|
47
|
+
/**
|
|
48
|
+
* Enables or disables the share as chat option for Microsoft Teams.
|
|
49
|
+
*/
|
|
50
|
+
shareAsChatEnabled: { type: "boolean", defaultValue: false },
|
|
51
|
+
/**
|
|
52
|
+
* Enables or disables the share as tab option for Microsoft Teams.
|
|
53
|
+
*/
|
|
54
|
+
shareAsTabEnabled: { type: "boolean", defaultValue: false },
|
|
55
|
+
/**
|
|
56
|
+
* Enables or disables the share as adaptive card option for Microsoft Teams.
|
|
57
|
+
*/
|
|
58
|
+
shareAsCardEnabled: { type: "boolean", defaultValue: false },
|
|
59
|
+
/**
|
|
60
|
+
* Enables or disables the SAP Collaboration Manager option.
|
|
61
|
+
*/
|
|
62
|
+
shareToCollaborationManagerEnabled: {
|
|
63
|
+
type: "boolean",
|
|
64
|
+
defaultValue: false,
|
|
65
|
+
},
|
|
66
|
+
/**
|
|
67
|
+
* Enables or disables the copy link option.
|
|
68
|
+
*/
|
|
69
|
+
copyLinkEnabled: { type: "boolean", defaultValue: true },
|
|
70
|
+
},
|
|
71
|
+
events: {
|
|
72
|
+
/**
|
|
73
|
+
* Fired when the user selects the share as chat option.
|
|
74
|
+
*/
|
|
75
|
+
shareToChatSelected: {},
|
|
76
|
+
/**
|
|
77
|
+
* Fired when the user selects the share as tab option.
|
|
78
|
+
*/
|
|
79
|
+
shareToTabSelected: {},
|
|
80
|
+
/**
|
|
81
|
+
* Fired when the user selects the share as adaptive card option.
|
|
82
|
+
*/
|
|
83
|
+
shareAsCardSelected: {},
|
|
84
|
+
/**
|
|
85
|
+
* Fired when the user selects the copy link option.
|
|
86
|
+
*/
|
|
87
|
+
copyLinkSelected: {},
|
|
88
|
+
/**
|
|
89
|
+
* Fired when the user selects the share to email option.
|
|
90
|
+
*/
|
|
91
|
+
shareToEmailSelected: {},
|
|
92
|
+
/**
|
|
93
|
+
* Fired when the user selects the collaboration manager option.
|
|
94
|
+
*/
|
|
95
|
+
shareToCollaborationManagerSelected: {},
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
renderer: null, // no renderer
|
|
99
|
+
|
|
100
|
+
init: function () {
|
|
101
|
+
Menu.prototype.init.apply(this, arguments);
|
|
102
|
+
this._mActionHandlers = {
|
|
103
|
+
[COLLABORATION_MAIL]: (...args) => {
|
|
104
|
+
if (this.hasListeners("shareToEmailSelected")) {
|
|
105
|
+
this.fireShareToEmailSelected({ args });
|
|
106
|
+
} else {
|
|
107
|
+
this._shareToEmail(...args);
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
[COLLABORATION_CHAT]: () => this.fireShareToChatSelected(),
|
|
111
|
+
[COLLABORATION_TAB]: () => this.fireShareToTabSelected(),
|
|
112
|
+
[COLLABORATION_CARD]: () => this.fireShareAsCardSelected(),
|
|
113
|
+
[COLLABORATION_MANAGER]: () =>
|
|
114
|
+
this.fireShareToCollaborationManagerSelected(),
|
|
115
|
+
[COLLABORATION_COPYURL]: (...args) => {
|
|
116
|
+
if (this.hasListeners("copyLinkSelected")) {
|
|
117
|
+
this.fireCopyLinkSelected({ args });
|
|
118
|
+
} else {
|
|
119
|
+
this._toCopyUrl(...args);
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
this._oLogger = Log.getLogger(
|
|
125
|
+
"sap.suite.ui.commons.collaboration.UniversalCollaborationBar",
|
|
126
|
+
);
|
|
127
|
+
this._oResourceBundle = Library.getResourceBundleFor(
|
|
128
|
+
"sap.suite.ui.commons",
|
|
129
|
+
);
|
|
130
|
+
this.addStyleClass("sapSuiteCollaborationBarMenu");
|
|
131
|
+
this.addStyleClass("sapUiSizeCompact");
|
|
132
|
+
},
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Opens the menu.
|
|
136
|
+
* @param {sap.ui.core.Control} oControl The control that opens the menu.
|
|
137
|
+
* @returns {this} The menu instance.
|
|
138
|
+
* @public
|
|
139
|
+
*/
|
|
140
|
+
openBy: function (oControl) {
|
|
141
|
+
if (!this.getItems().length) {
|
|
142
|
+
this._renderMenuItems();
|
|
143
|
+
}
|
|
144
|
+
return Menu.prototype.openBy.apply(this, arguments);
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Renders the menu items for the collaboration popover.
|
|
149
|
+
* @private
|
|
150
|
+
*/
|
|
151
|
+
_renderMenuItems: async function () {
|
|
152
|
+
const aMenuItemOptions = await this._getCollaborationPopoverOptions();
|
|
153
|
+
const aMenuItems = this._getMenuItems(aMenuItemOptions);
|
|
154
|
+
aMenuItems.forEach((oItem) => this.addItem(oItem));
|
|
155
|
+
},
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Gets the TeamsHelperService instance.
|
|
159
|
+
* @returns {Promise} A promise that resolves with the TeamsHelperService instance.
|
|
160
|
+
* @private
|
|
161
|
+
*/
|
|
162
|
+
_getTeamsHelperService: async function () {
|
|
163
|
+
if (!this._oTeamsHelperService) {
|
|
164
|
+
const ServiceContainer = sap.ui.require(
|
|
165
|
+
"sap/suite/ui/commons/collaboration/ServiceContainer",
|
|
166
|
+
);
|
|
167
|
+
this._oTeamsHelperService =
|
|
168
|
+
await ServiceContainer.getServiceAsync();
|
|
169
|
+
}
|
|
170
|
+
return this._oTeamsHelperService;
|
|
171
|
+
},
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Gets the menu items based on the provided options.
|
|
175
|
+
* @param {Array} aOptions The array of option objects.
|
|
176
|
+
* @returns {Array} The array of created menu items.
|
|
177
|
+
* @private
|
|
178
|
+
*/
|
|
179
|
+
_getMenuItems: function (aOptions) {
|
|
180
|
+
const aMenuItems = [];
|
|
181
|
+
aOptions.forEach((oOption) => {
|
|
182
|
+
const oMenuItem = this._createMenuItem(
|
|
183
|
+
oOption.icon,
|
|
184
|
+
oOption.text,
|
|
185
|
+
oOption.key,
|
|
186
|
+
oOption.fesrStepName,
|
|
187
|
+
oOption.styleClass,
|
|
188
|
+
);
|
|
189
|
+
(oOption.subOptions || []).forEach((oSubOption) => {
|
|
190
|
+
const subMenuItem = this._createMenuItem(
|
|
191
|
+
oSubOption.icon,
|
|
192
|
+
oSubOption.text,
|
|
193
|
+
oSubOption.key,
|
|
194
|
+
oSubOption.fesrStepName,
|
|
195
|
+
oSubOption.styleClass,
|
|
196
|
+
);
|
|
197
|
+
oMenuItem.addItem(subMenuItem);
|
|
198
|
+
});
|
|
199
|
+
aMenuItems.push(oMenuItem);
|
|
200
|
+
});
|
|
201
|
+
return aMenuItems;
|
|
202
|
+
},
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Creates a menu item based on the provided parameters.
|
|
206
|
+
*
|
|
207
|
+
* @param {string} sIcon The icon for the menu item.
|
|
208
|
+
* @param {string} sText The text for the menu item.
|
|
209
|
+
* @param {string} sKey The key for the menu item.
|
|
210
|
+
* @param {string} [sFesrStepName] The FESR step name for the menu item.
|
|
211
|
+
* @param {string} [sStyleClass] Additional style class for the menu item.
|
|
212
|
+
* @returns {sap.m.MenuItem} The created sap.m.MenuItem object.
|
|
213
|
+
* @private
|
|
214
|
+
*/
|
|
215
|
+
_createMenuItem: function (
|
|
216
|
+
sIcon,
|
|
217
|
+
sText,
|
|
218
|
+
sKey,
|
|
219
|
+
sFesrStepName,
|
|
220
|
+
sStyleClass,
|
|
221
|
+
) {
|
|
222
|
+
const oConfig = {
|
|
223
|
+
icon: sIcon,
|
|
224
|
+
text: sText,
|
|
225
|
+
key: sKey,
|
|
226
|
+
};
|
|
227
|
+
const oMenuItem = new MenuItem(oConfig);
|
|
228
|
+
|
|
229
|
+
oMenuItem.attachPress(() => {
|
|
230
|
+
const fnHandler = this._mActionHandlers[sKey];
|
|
231
|
+
if (fnHandler) {
|
|
232
|
+
fnHandler();
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
if (sFesrStepName) {
|
|
237
|
+
FESRHelper.setSemanticStepname(oMenuItem, "press", sFesrStepName);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
oMenuItem.addEventDelegate({
|
|
241
|
+
onAfterRendering: () => {
|
|
242
|
+
const oDomRef = oMenuItem.getDomRef();
|
|
243
|
+
if (oDomRef && sStyleClass) {
|
|
244
|
+
oDomRef.classList.add(sStyleClass);
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
return oMenuItem;
|
|
250
|
+
},
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Creates a standardized option object for the collaboration popover menu.
|
|
254
|
+
*
|
|
255
|
+
* @param {string} i18nKey The i18n key used to fetch the localized text and as the option key.
|
|
256
|
+
* @param {string} iconUri The SAP icon URI for the option (for example, "sap-icon://email").
|
|
257
|
+
* @param {string} cssClass CSS class applied to the option for styling.
|
|
258
|
+
* @param {Object} [options] Additional optional properties.
|
|
259
|
+
* @param {string} [options.fesrStepName] The FESR step name for tracking user interactions.
|
|
260
|
+
* @param {Array} [options.subOptions] Array of sub-options for nested menu items.
|
|
261
|
+
*
|
|
262
|
+
* @returns {Object} The constructed option object to be used in the collaboration popover menu.
|
|
263
|
+
*
|
|
264
|
+
* @private
|
|
265
|
+
*/
|
|
266
|
+
_createOption: function (
|
|
267
|
+
i18nKey,
|
|
268
|
+
iconUri,
|
|
269
|
+
cssClass,
|
|
270
|
+
{ fesrStepName = "", subOptions = [] } = {},
|
|
271
|
+
) {
|
|
272
|
+
const oOption = {
|
|
273
|
+
text: this._oResourceBundle.getText(i18nKey),
|
|
274
|
+
icon: iconUri,
|
|
275
|
+
key: i18nKey,
|
|
276
|
+
styleClass: cssClass,
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
if (fesrStepName) {
|
|
280
|
+
oOption.fesrStepName = fesrStepName;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
if (subOptions.length > 0) {
|
|
284
|
+
oOption.subOptions = subOptions;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
return oOption;
|
|
288
|
+
},
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Build collaboration popover options based on consumer settings,
|
|
292
|
+
* tenant configuration and current device type.
|
|
293
|
+
*
|
|
294
|
+
* @returns {Array} Array of option objects used to render the collaboration popover menu.
|
|
295
|
+
* @private
|
|
296
|
+
*/
|
|
297
|
+
_getCollaborationPopoverOptions: async function () {
|
|
298
|
+
const oAppCollaborationParams = {
|
|
299
|
+
isShareAsChatEnabled: this.getShareAsChatEnabled(),
|
|
300
|
+
isShareAsTabEnabled: this.getShareAsTabEnabled(),
|
|
301
|
+
isShareAsCardEnabled: this.getShareAsCardEnabled(),
|
|
302
|
+
isCopyLinkEnabled: this.getCopyLinkEnabled(),
|
|
303
|
+
isShareToEmailEnabled: this.getShareToEmailEnabled(),
|
|
304
|
+
isShareToCMEnabled: this.getShareToCollaborationManagerEnabled(),
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
let oProviderConfig = {};
|
|
308
|
+
try {
|
|
309
|
+
const oTeamHelperServ = await this._getTeamsHelperService();
|
|
310
|
+
oProviderConfig = oTeamHelperServ._providerConfig;
|
|
311
|
+
} catch (error) {
|
|
312
|
+
this._oLogger.error("Error fetching TeamsHelperService:", error);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const aOptions = [];
|
|
316
|
+
let aMSTeamsOptions = [];
|
|
317
|
+
|
|
318
|
+
// configuration array
|
|
319
|
+
const aConfig = [
|
|
320
|
+
{
|
|
321
|
+
key: COLLABORATION_MAIL,
|
|
322
|
+
icon: "sap-icon://email",
|
|
323
|
+
styleClass: "sapSuiteUiCommonsCollaborationMail",
|
|
324
|
+
consumerEnabled: oAppCollaborationParams.isShareToEmailEnabled,
|
|
325
|
+
providerEnabled: true,
|
|
326
|
+
fesrStep: "UCB:SendEmail",
|
|
327
|
+
featureName: "Email",
|
|
328
|
+
group: "menu",
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
key: COLLABORATION_CHAT,
|
|
332
|
+
icon: "sap-icon://discussion",
|
|
333
|
+
styleClass: "sapSuiteUiCommonsCollaborationChat",
|
|
334
|
+
consumerEnabled: oAppCollaborationParams.isShareAsChatEnabled,
|
|
335
|
+
providerEnabled: oProviderConfig.isShareAsLinkEnabled === "X",
|
|
336
|
+
fesrStep: "UCB:CopyLink",
|
|
337
|
+
featureName: "Share as Chat",
|
|
338
|
+
desktopOnly: true,
|
|
339
|
+
group: "subMenu",
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
key: COLLABORATION_TAB,
|
|
343
|
+
icon: "sap-icon://image-viewer",
|
|
344
|
+
styleClass: "sapSuiteUiCommonsCollaborationTab",
|
|
345
|
+
consumerEnabled: oAppCollaborationParams.isShareAsTabEnabled,
|
|
346
|
+
providerEnabled: oProviderConfig.isShareAsTabEnabled === "X",
|
|
347
|
+
fesrStep: "MST:ShareAsTab",
|
|
348
|
+
featureName: "Share as Tab",
|
|
349
|
+
desktopOnly: true,
|
|
350
|
+
group: "subMenu",
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
key: COLLABORATION_CARD,
|
|
354
|
+
icon: "sap-icon://card",
|
|
355
|
+
styleClass: "sapSuiteUiCommonsCollaborationCard",
|
|
356
|
+
consumerEnabled: oAppCollaborationParams.isShareAsCardEnabled,
|
|
357
|
+
providerEnabled:
|
|
358
|
+
oProviderConfig.isShareAsCardEnabled === "AUTHENABLE",
|
|
359
|
+
fesrStep: "MST:ShareAsCard",
|
|
360
|
+
featureName: "Share as Card",
|
|
361
|
+
desktopOnly: true,
|
|
362
|
+
group: "subMenu",
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
key: COLLABORATION_SHARE,
|
|
366
|
+
icon: "sap-icon://citizen-connect",
|
|
367
|
+
styleClass: "sapSuiteUiCommonsCollaborationMSTeamsShare",
|
|
368
|
+
consumerEnabled: true,
|
|
369
|
+
providerEnabled: true,
|
|
370
|
+
isParentOfGroup: "subMenu",
|
|
371
|
+
group: "menu",
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
key: COLLABORATION_MANAGER,
|
|
375
|
+
icon: "sap-icon://collaborate",
|
|
376
|
+
styleClass: "sapSuiteUiCommonsCollaborationManager",
|
|
377
|
+
consumerEnabled: oAppCollaborationParams.isShareToCMEnabled,
|
|
378
|
+
providerEnabled: true,
|
|
379
|
+
fesrStep: "",
|
|
380
|
+
featureName: "Collaboration Manager",
|
|
381
|
+
group: "menu",
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
key: COLLABORATION_COPYURL,
|
|
385
|
+
icon: "sap-icon://chain-link",
|
|
386
|
+
styleClass: "sapSuiteUiCommonsCollaborationLink",
|
|
387
|
+
consumerEnabled: oAppCollaborationParams.isCopyLinkEnabled,
|
|
388
|
+
providerEnabled: true,
|
|
389
|
+
fesrStep: "",
|
|
390
|
+
featureName: "Copy link",
|
|
391
|
+
desktopOnly: true,
|
|
392
|
+
group: "menu",
|
|
393
|
+
},
|
|
394
|
+
];
|
|
395
|
+
|
|
396
|
+
aConfig.forEach((conf) => {
|
|
397
|
+
if (conf.group === "subMenu") {
|
|
398
|
+
const option = this._createOptionIfEnabled(conf);
|
|
399
|
+
if (option) {
|
|
400
|
+
aMSTeamsOptions.push(option);
|
|
401
|
+
}
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
if (conf.isParentOfGroup === "subMenu") {
|
|
406
|
+
if (aMSTeamsOptions.length === 1) {
|
|
407
|
+
this._mActionHandlers[COLLABORATION_SHARE] =
|
|
408
|
+
this._mActionHandlers[aMSTeamsOptions[0].key];
|
|
409
|
+
aMSTeamsOptions = [];
|
|
410
|
+
} else if (aMSTeamsOptions.length > 1) {
|
|
411
|
+
conf.subOptions = aMSTeamsOptions;
|
|
412
|
+
aMSTeamsOptions = [];
|
|
413
|
+
} else {
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
const option = this._createOptionIfEnabled(conf);
|
|
419
|
+
if (option) {
|
|
420
|
+
aOptions.push(option);
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
return aOptions;
|
|
425
|
+
},
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Create an option if it is enabled based on the configuration.
|
|
429
|
+
* @param {Object} conf The configuration object for the option.
|
|
430
|
+
* @returns {Object|null} The created option or null if not enabled.
|
|
431
|
+
* @private
|
|
432
|
+
*/
|
|
433
|
+
_createOptionIfEnabled: function (conf) {
|
|
434
|
+
if (conf.desktopOnly && !Device.system.desktop) {
|
|
435
|
+
this._oLogger.info(
|
|
436
|
+
`${conf.featureName} option is not supported in Phone and Tablet`,
|
|
437
|
+
);
|
|
438
|
+
return null;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
if (!conf.consumerEnabled) {
|
|
442
|
+
this._oLogger.info(`Consumer disabled ${conf.featureName} option`);
|
|
443
|
+
return null;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
if (!conf.providerEnabled) {
|
|
447
|
+
this._oLogger.info(
|
|
448
|
+
`${conf.featureName} option is not enabled in the tenant`,
|
|
449
|
+
);
|
|
450
|
+
return null;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
return this._createOption(conf.key, conf.icon, conf.styleClass, {
|
|
454
|
+
fesrStepName: conf.fesrStep,
|
|
455
|
+
subOptions: conf.subOptions,
|
|
456
|
+
});
|
|
457
|
+
},
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Share content via email.
|
|
461
|
+
* @private
|
|
462
|
+
*/
|
|
463
|
+
_shareToEmail: async function () {
|
|
464
|
+
const oTeamsHelperService = await this._getTeamsHelperService();
|
|
465
|
+
oTeamsHelperService._shareToEmail();
|
|
466
|
+
},
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Copy the current URL to the clipboard.
|
|
470
|
+
* @private
|
|
471
|
+
*/
|
|
472
|
+
_toCopyUrl: async function () {
|
|
473
|
+
const oTeamsHelperService = await this._getTeamsHelperService();
|
|
474
|
+
oTeamsHelperService._copyLink();
|
|
475
|
+
},
|
|
476
|
+
},
|
|
477
|
+
);
|
|
478
|
+
|
|
479
|
+
return UniversalCollaborationBar;
|
|
480
|
+
},
|
|
481
|
+
);
|