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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/package.json +1 -1
  2. package/src/sap/suite/ui/commons/.library +1 -1
  3. package/src/sap/suite/ui/commons/AriaProperties.js +1 -1
  4. package/src/sap/suite/ui/commons/CalculationBuilder.js +13 -2
  5. package/src/sap/suite/ui/commons/CalculationBuilderExpression.js +1 -1
  6. package/src/sap/suite/ui/commons/CalculationBuilderFunction.js +1 -1
  7. package/src/sap/suite/ui/commons/CalculationBuilderGroup.js +1 -1
  8. package/src/sap/suite/ui/commons/CalculationBuilderItem.js +1 -1
  9. package/src/sap/suite/ui/commons/CalculationBuilderValidationResult.js +1 -1
  10. package/src/sap/suite/ui/commons/CalculationBuilderVariable.js +1 -1
  11. package/src/sap/suite/ui/commons/ChartContainer.js +0 -1
  12. package/src/sap/suite/ui/commons/CloudFilePicker.js +26 -26
  13. package/src/sap/suite/ui/commons/MicroProcessFlow.js +1 -1
  14. package/src/sap/suite/ui/commons/MicroProcessFlowItem.js +1 -1
  15. package/src/sap/suite/ui/commons/TimelineRenderManager.js +25 -13
  16. package/src/sap/suite/ui/commons/collaboration/BaseHelperService.js +12 -12
  17. package/src/sap/suite/ui/commons/collaboration/CollaborationCardHelper.js +6 -5
  18. package/src/sap/suite/ui/commons/collaboration/CollaborationContactInfoHelper.js +15 -15
  19. package/src/sap/suite/ui/commons/collaboration/CollaborationHelper.js +124 -97
  20. package/src/sap/suite/ui/commons/collaboration/CollaborationManagerService.js +41 -41
  21. package/src/sap/suite/ui/commons/collaboration/ContactHelper.js +288 -286
  22. package/src/sap/suite/ui/commons/collaboration/ServiceContainer.js +33 -33
  23. package/src/sap/suite/ui/commons/collaboration/TeamsHelperService.js +337 -194
  24. package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component-preload.js +3 -3
  25. package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component.js +11 -13
  26. package/src/sap/suite/ui/commons/flexibility/changeHandler/PropertyChangeMapper.js +1 -1
  27. package/src/sap/suite/ui/commons/imageeditor/CropCustomShapeHistoryItem.js +1 -1
  28. package/src/sap/suite/ui/commons/imageeditor/CropEllipseHistoryItem.js +1 -1
  29. package/src/sap/suite/ui/commons/imageeditor/CropRectangleHistoryItem.js +1 -1
  30. package/src/sap/suite/ui/commons/imageeditor/CustomSizeItem.js +1 -1
  31. package/src/sap/suite/ui/commons/imageeditor/FilterHistoryItem.js +1 -1
  32. package/src/sap/suite/ui/commons/imageeditor/FlipHistoryItem.js +1 -1
  33. package/src/sap/suite/ui/commons/imageeditor/HistoryItem.js +1 -1
  34. package/src/sap/suite/ui/commons/imageeditor/ImageEditor.js +1 -1
  35. package/src/sap/suite/ui/commons/imageeditor/ImageEditorContainer.js +1 -1
  36. package/src/sap/suite/ui/commons/imageeditor/ImageEditorResponsiveContainer.js +1 -1
  37. package/src/sap/suite/ui/commons/imageeditor/ResizeHistoryItem.js +1 -1
  38. package/src/sap/suite/ui/commons/imageeditor/RotateHistoryItem.js +1 -1
  39. package/src/sap/suite/ui/commons/library.js +1 -1
  40. package/src/sap/suite/ui/commons/messagebundle.properties +11 -1
  41. package/src/sap/suite/ui/commons/statusindicator/Circle.js +1 -1
  42. package/src/sap/suite/ui/commons/statusindicator/CustomShape.js +1 -1
  43. package/src/sap/suite/ui/commons/statusindicator/DiscreteThreshold.js +1 -1
  44. package/src/sap/suite/ui/commons/statusindicator/FillingOption.js +1 -1
  45. package/src/sap/suite/ui/commons/statusindicator/LibraryShape.js +1 -1
  46. package/src/sap/suite/ui/commons/statusindicator/Path.js +1 -1
  47. package/src/sap/suite/ui/commons/statusindicator/PropertyThreshold.js +1 -1
  48. package/src/sap/suite/ui/commons/statusindicator/Rectangle.js +1 -1
  49. package/src/sap/suite/ui/commons/statusindicator/Shape.js +1 -1
  50. package/src/sap/suite/ui/commons/statusindicator/ShapeGroup.js +1 -1
  51. package/src/sap/suite/ui/commons/statusindicator/SimpleShape.js +1 -1
  52. package/src/sap/suite/ui/commons/statusindicator/StatusIndicator.js +1 -1
  53. package/src/sap/suite/ui/commons/taccount/TAccount.js +57 -6
  54. package/src/sap/suite/ui/commons/taccount/TAccountGroup.js +1 -1
  55. package/src/sap/suite/ui/commons/taccount/TAccountItem.js +4 -3
  56. package/src/sap/suite/ui/commons/taccount/TAccountItemProperty.js +1 -1
  57. package/src/sap/suite/ui/commons/taccount/TAccountPanel.js +1 -1
  58. package/src/sap/suite/ui/commons/themes/base/TAccount.less +28 -5
  59. package/src/sap/suite/ui/commons/windowmessages/CollaborationMessageBroker.js +0 -1
@@ -5,8 +5,13 @@
5
5
 
6
6
  */
7
7
  sap.ui.define(
8
- ["sap/base/Log", "sap/ui/base/Object", "sap/ui/core/Element", "../windowmessages/CollaborationMessageConsumer"],
9
- function (Log, BaseObject, Element, CollaborationMessageConsumer) {
8
+ [
9
+ "sap/base/Log",
10
+ "sap/ui/base/Object",
11
+ "sap/ui/core/Element",
12
+ "../windowmessages/CollaborationMessageConsumer"
13
+ ],
14
+ function(Log, BaseObject, Element, CollaborationMessageConsumer) {
10
15
  "use strict";
11
16
  var URL_KEY = "sap-url-hash";
12
17
  var PARAM_SAP_CARD_TITLE = "&sap-ui-cardTitle";
@@ -14,6 +19,9 @@ sap.ui.define(
14
19
  var PARAM_SAP_CARD_ID = "&sap-ui-cardId";
15
20
  var PARAM_SAP_XX_CARD_ID = "&sap-ui-xx-cardId";
16
21
  var PARAM_SAP_CARD_INFO = "&info=";
22
+ var PARAM_SAP_USHELL_CONFIG = "sap-ushell-config";
23
+ var PARAM_SAP_COLLABORATION_TEAMS = "sap-collaboration-teams";
24
+ var PARAM_SAP_UI_FESR_ENV = "sap-ui-fesr-env";
17
25
  var TRANSIENT_KEY = "transient";
18
26
  var oLogger = Log.getLogger("sap.suite.ui.commons.collaboration.CollaborationHelper");
19
27
 
@@ -37,7 +45,7 @@ sap.ui.define(
37
45
  * @ui5-restricted sap.suite.suite-ui-commons
38
46
  * @experimental since 1.108
39
47
  */
40
- CollaborationHelper.compactHash = function (sUrl) {
48
+ CollaborationHelper.compactHash = function(sUrl) {
41
49
  const UshellContainer = sap.ui.require("sap/ushell/Container");
42
50
  if (!UshellContainer) {
43
51
  //In case uShell Container is not present, minification is not needed.
@@ -45,44 +53,46 @@ sap.ui.define(
45
53
  url: sUrl
46
54
  };
47
55
  }
48
- return UshellContainer && UshellContainer.getServiceAsync("AppState").then(async function (oAppStateService) {
49
- var oEmptyAppState = oAppStateService.createEmptyAppState(
50
- undefined,
51
- false
52
- );
53
- var sKey = this._getNextKey(oEmptyAppState);
54
- if (!this._isEligibleForBackendPersistency(oAppStateService)) {
55
- oLogger.warning("Transient flag is true. URL will not be shortened");
56
+ return UshellContainer && UshellContainer.getServiceAsync("AppState").then(async function(oAppStateService) {
57
+ var oEmptyAppState = oAppStateService.createEmptyAppState(
58
+ undefined,
59
+ false
60
+ );
61
+ var sKey = this._getNextKey(oEmptyAppState);
62
+ if (!this._isEligibleForBackendPersistency(oAppStateService)) {
63
+ oLogger.warning("Transient flag is true. URL will not be shortened");
64
+ return {
65
+ url: sUrl
66
+ };
67
+ }
68
+ var sUrlBeforeHash = this._extractURLBeforeHash(sUrl);
69
+ var sSemanticObjectAndAction = await this._extractSemanticObjectAndAction(sUrl);
70
+ var isMinificationPossible = false;
71
+ try {
72
+ isMinificationPossible = await this._isMinificationFeasible(sUrl);
73
+ } catch (e) {
74
+ oLogger.error("isMinificationPossible check failed. URL will not be shortened");
75
+ }
76
+ if (!sSemanticObjectAndAction || !isMinificationPossible) {
77
+ // In case sSemanticObjectAndAction is undefined
78
+ // or the fragment is not resolved, then return the current url as shortened url.
79
+ return {
80
+ url: sUrl
81
+ };
82
+ }
83
+ return this._storeUrl(sUrl, oEmptyAppState)
84
+ .then(function() {
56
85
  return {
57
- url: sUrl
86
+ url: sUrlBeforeHash + "#" + sSemanticObjectAndAction + "&/" + URL_KEY + "=" + sKey
58
87
  };
59
- }
60
- var sUrlBeforeHash = this._extractURLBeforeHash(sUrl);
61
- var sSemanticObjectAndAction = await this._extractSemanticObjectAndAction(sUrl);
62
- var isMinificationPossible = false;
63
- try {
64
- isMinificationPossible = await this._isMinificationFeasible(sUrl);
65
- } catch (e) {}
66
- if (!sSemanticObjectAndAction || !isMinificationPossible) {
67
- // In case sSemanticObjectAndAction is undefined
68
- // or the fragment is not resolved, then return the current url as shortened url.
88
+ })
89
+ .catch(function(error) {
90
+ oLogger.warning("URL is not shortened due to an error." + error.toString());
91
+ //In case if the wrapper promise is rejected then return the current url as shortened url.
69
92
  return {
70
93
  url: sUrl
71
94
  };
72
- }
73
- return this._storeUrl(sUrl, oEmptyAppState)
74
- .then(function () {
75
- return {
76
- url: sUrlBeforeHash + "#" + sSemanticObjectAndAction + "&/" + URL_KEY + "=" + sKey
77
- };
78
- })
79
- .catch(function (error) {
80
- oLogger.warning("URL is not shortened due to an error." + error.toString());
81
- //In case if the wrapper promise is rejected then return the current url as shortened url.
82
- return {
83
- url: sUrl
84
- };
85
- });
95
+ });
86
96
  }.bind(this));
87
97
  };
88
98
 
@@ -91,10 +101,10 @@ sap.ui.define(
91
101
  * @returns {Promise} Promise which resolves to the current URL
92
102
  * @private
93
103
  */
94
- CollaborationHelper._getCurrentUrl = function () {
104
+ CollaborationHelper._getCurrentUrl = function() {
95
105
  const UshellContainer = sap.ui.require("sap/ushell/Container");
96
- return UshellContainer && UshellContainer ? new Promise(function(fnResolve){
97
- UshellContainer.getFLPUrlAsync(true).then(function (sFLPUrl){
106
+ return UshellContainer && UshellContainer ? new Promise(function(fnResolve) {
107
+ UshellContainer.getFLPUrlAsync(true).then(function(sFLPUrl) {
98
108
  fnResolve(sFLPUrl);
99
109
  });
100
110
  }) : Promise.resolve(document.URL);
@@ -108,43 +118,48 @@ sap.ui.define(
108
118
  * @return {Promise} Return the resolved promise when the redirection of the URL is done.
109
119
  * @public
110
120
  */
111
- CollaborationHelper.processAndExpandHash = async function () {
112
- const bTeamsModeActive = await this.isTeamsModeActive();
113
- this._hideAvatarFromShellbar(bTeamsModeActive);
114
- return this._getCurrentUrl().then(async function (sCurrentUrl) {
121
+ CollaborationHelper.processAndExpandHash = function() {
122
+ this._hideAvatarFromShellbar();
123
+ return this._getCurrentUrl().then(async function(sCurrentUrl) {
115
124
  //if the current url has url param, sap-url-hash, then we have to redirect to an actual url.
116
125
  if (sCurrentUrl.indexOf(URL_KEY) > -1) {
117
- var sHash = sCurrentUrl.split(URL_KEY)[1].split('=')[1];
126
+ var sHash = sCurrentUrl.split(URL_KEY)[1].split("=")[1];
118
127
  if (sCurrentUrl.indexOf(PARAM_SAP_STAGEVIEW_HASH) > 0) {
119
128
  sHash = sHash.split(PARAM_SAP_STAGEVIEW_HASH)[0];
120
129
  } else if (sCurrentUrl.includes("info=")) {
121
- sHash = sHash.includes(",") ? sHash.split(",")[0] : sHash.split("&")[0];
122
- } else if (sCurrentUrl.indexOf(PARAM_SAP_CARD_ID) > 0 || sCurrentUrl.indexOf(PARAM_SAP_XX_CARD_ID) > 0) {
123
- if (sCurrentUrl.indexOf(PARAM_SAP_CARD_ID) > 0){
130
+ sHash = sHash.includes(",") ? sHash.split(",")[0] : sHash.split("&")[0];
131
+ } else if (
132
+ sCurrentUrl.indexOf(PARAM_SAP_CARD_ID) > 0 ||
133
+ sCurrentUrl.indexOf(PARAM_SAP_XX_CARD_ID) > 0
134
+ ) {
135
+ if (sCurrentUrl.indexOf(PARAM_SAP_CARD_ID) > 0) {
124
136
  sHash = sHash.split(PARAM_SAP_CARD_ID)[0];
125
137
  } else {
126
138
  sHash = sHash.split(PARAM_SAP_XX_CARD_ID)[0];
127
139
  }
128
- } else if (sCurrentUrl.indexOf(PARAM_SAP_CARD_TITLE) > 0){
140
+ } else if (sCurrentUrl.indexOf(PARAM_SAP_CARD_TITLE) > 0) {
129
141
  sHash = sHash.split(PARAM_SAP_CARD_TITLE)[0];
130
142
  }
131
- return this._retrieveURL(sHash).then(function (oAppState) {
143
+ return this._retrieveURL(sHash).then(function(oAppState) {
132
144
  if (oAppState.getData()) {
133
- this._redirectToUrl(oAppState.getData());
145
+ window.location.replace(oAppState.getData());
134
146
  } else {
135
147
  // In case AppState couldn't found value for the hash, so removing it and redirecting to LR
136
148
  const sUrl = sCurrentUrl.split(URL_KEY)[0];
137
- this._redirectToUrl(sUrl);
149
+ window.location.replace(sUrl);
138
150
  }
139
151
  return Promise.resolve();
140
- }.bind(this));
152
+ });
141
153
  } else if (sCurrentUrl.indexOf(PARAM_SAP_CARD_ID) > -1) {
142
154
  const sUrl = sCurrentUrl.split(PARAM_SAP_CARD_ID)[0];
143
- this._redirectToUrl(sUrl);
155
+ window.location.replace(sUrl);
144
156
  } else if (sCurrentUrl.indexOf(PARAM_SAP_CARD_TITLE) > -1) {
145
157
  const sUrl = sCurrentUrl.split(PARAM_SAP_CARD_TITLE)[0];
146
158
  await this._redirectBasedOnRuntime(sUrl);
147
- } else if (bTeamsModeActive && sCurrentUrl.includes(PARAM_SAP_CARD_INFO)) {
159
+ } else if (
160
+ sCurrentUrl.includes(PARAM_SAP_CARD_INFO) &&
161
+ this._isFromTeams(sCurrentUrl)
162
+ ) {
148
163
  const sUrl = sCurrentUrl.split(PARAM_SAP_CARD_INFO)[0];
149
164
  await this._redirectBasedOnRuntime(sUrl);
150
165
  }
@@ -152,6 +167,20 @@ sap.ui.define(
152
167
  }.bind(this));
153
168
  };
154
169
 
170
+ /**
171
+ * Checks whether the given URL indicates that it originated from a Microsoft Teams environment.
172
+ *
173
+ * This is determined by the presence of the query parameter `sap-collaboration-teams=true`.
174
+ *
175
+ * @param {string} sCurrentUrl - The full URL to inspect.
176
+ * @returns {boolean} True if the URL contains `sap-collaboration-teams=true`; otherwise, false.
177
+ */
178
+ CollaborationHelper._isFromTeams = function(sCurrentUrl) {
179
+ const urlObj = new URL(sCurrentUrl);
180
+ const bIsFromTeams = urlObj.searchParams.get("sap-collaboration-teams");
181
+ return bIsFromTeams === "true";
182
+ };
183
+
155
184
  /**
156
185
  * Handles URL redirection according to the runtime environment.
157
186
  *
@@ -161,7 +190,7 @@ sap.ui.define(
161
190
  * @param {string} sUrl - The target URL for redirection.
162
191
  * @private
163
192
  */
164
- CollaborationHelper._redirectBasedOnRuntime = async function (sUrl) {
193
+ CollaborationHelper._redirectBasedOnRuntime = async function(sUrl) {
165
194
  const UshellContainer = sap.ui.require("sap/ushell/Container");
166
195
 
167
196
  // Get indication is if we are in AppRuntime (for special use cases handling, e.g. BTP Fiori App in S/Cube)
@@ -169,7 +198,7 @@ sap.ui.define(
169
198
  await CollaborationMessageConsumer.updateTopLevelURLforAppRuntime(sUrl);
170
199
  } else {
171
200
  const targetUrl = this._stripTeamsParams(sUrl);
172
- this._redirectToUrl(targetUrl);
201
+ window.location.replace(targetUrl);
173
202
  }
174
203
  };
175
204
 
@@ -181,7 +210,7 @@ sap.ui.define(
181
210
  * @returns {string} - The cleaned URL
182
211
  * @private
183
212
  */
184
- CollaborationHelper._removeTeamsParams = function (sUrl) {
213
+ CollaborationHelper._removeTeamsParams = function(sUrl) {
185
214
  try {
186
215
  const urlParts = sUrl.split("#");
187
216
  const baseUrl = urlParts[0];
@@ -193,8 +222,9 @@ sap.ui.define(
193
222
  }
194
223
 
195
224
  const params = new URLSearchParams(queryString);
196
- params.delete("sap-ushell-config");
197
- params.delete("sap-collaboration-teams");
225
+ params.delete(PARAM_SAP_USHELL_CONFIG);
226
+ params.delete(PARAM_SAP_COLLABORATION_TEAMS);
227
+ params.delete(PARAM_SAP_UI_FESR_ENV);
198
228
 
199
229
  const newBaseUrl = params.toString()
200
230
  ? `${path}?${params.toString()}`
@@ -214,7 +244,7 @@ sap.ui.define(
214
244
  * @returns {string} - The cleaned URL
215
245
  * @private
216
246
  */
217
- CollaborationHelper._stripTeamsParams = function (sUrl) {
247
+ CollaborationHelper._stripTeamsParams = function(sUrl) {
218
248
  if (this._isTopWindow()) {
219
249
  return this._removeTeamsParams(sUrl);
220
250
  }
@@ -228,34 +258,25 @@ sap.ui.define(
228
258
  * @returns {boolean} - Returns true if the current window is not inside an iframe, false otherwise.
229
259
  * @private
230
260
  */
231
- CollaborationHelper._isTopWindow = function () {
261
+ CollaborationHelper._isTopWindow = function() {
232
262
  return window.self === window.top;
233
263
  };
234
264
 
235
- /**
236
- * Redirects the browser to a specified URL.
237
- *
238
- * @private
239
- * @param {string} sUrl - The target URL to redirect to
240
- */
241
- CollaborationHelper._redirectToUrl = function(sUrl) {
242
- window.location.replace(sUrl);
243
- };
244
-
245
265
  /**
246
266
  * Hides the avatar of the user if the app is running in the Microsoft Teams application.
247
- * @param {boolean} bTeamsModeActive Indicates if Teams mode is active
248
267
  * @private
249
268
  * @ui5-restricted sap.suite.suite-ui-commons
250
269
  * @experimental since 1.108
251
270
  */
252
- CollaborationHelper._hideAvatarFromShellbar = function (bTeamsModeActive) {
253
- if (bTeamsModeActive) {
254
- var oAvatar = Element.getElementById('userActionsMenuHeaderButton');
255
- if (oAvatar) {
256
- oAvatar.setVisible(false);
271
+ CollaborationHelper._hideAvatarFromShellbar = function() {
272
+ this.isTeamsModeActive().then(function(bIsActive) {
273
+ if (bIsActive) {
274
+ var oAvatar = Element.getElementById("userActionsMenuHeaderButton");
275
+ if (oAvatar) {
276
+ oAvatar.setVisible(false);
277
+ }
257
278
  }
258
- }
279
+ });
259
280
  };
260
281
 
261
282
  /**
@@ -265,15 +286,15 @@ sap.ui.define(
265
286
  * @returns {Promise} Return the resolved promise with the data if the conditions are met with 'true', else 'false'
266
287
  * @public
267
288
  */
268
- CollaborationHelper.isTeamsModeActive = function () {
289
+ CollaborationHelper.isTeamsModeActive = function() {
269
290
  var bAppRunningInTeams = false;
270
291
  const UshellContainer = sap.ui.require("sap/ushell/Container");
271
292
  if (UshellContainer) {
272
- return UshellContainer.getServiceAsync("URLParsing").then(function (oURLParsing) {
273
- return this._getCurrentUrl().then(function (sCurrentUrl) {
293
+ return UshellContainer.getServiceAsync("URLParsing").then(function(oURLParsing) {
294
+ return this._getCurrentUrl().then(function(sCurrentUrl) {
274
295
  var sBeforeHashURL = sCurrentUrl.split("#")[0];
275
- if (sBeforeHashURL.indexOf('?') !== -1) {
276
- var oParsedUrl = oURLParsing && oURLParsing.parseParameters(sBeforeHashURL.substring(sBeforeHashURL.indexOf('?')));
296
+ if (sBeforeHashURL.indexOf("?") !== -1) {
297
+ var oParsedUrl = oURLParsing && oURLParsing.parseParameters(sBeforeHashURL.substring(sBeforeHashURL.indexOf("?")));
277
298
  if (oParsedUrl &&
278
299
  oParsedUrl["sap-collaboration-teams"] &&
279
300
  oParsedUrl["sap-collaboration-teams"][0] &&
@@ -304,9 +325,9 @@ sap.ui.define(
304
325
  * @returns {AppState} The instance of the AppState
305
326
  * @private
306
327
  */
307
- CollaborationHelper._retrieveURL = function (hash) {
328
+ CollaborationHelper._retrieveURL = function(hash) {
308
329
  const UshellContainer = sap.ui.require("sap/ushell/Container");
309
- return UshellContainer && UshellContainer.getServiceAsync("AppState").then(function (oAppStateService) {
330
+ return UshellContainer && UshellContainer.getServiceAsync("AppState").then(function(oAppStateService) {
310
331
  return oAppStateService.getAppState(hash);
311
332
  });
312
333
  };
@@ -317,8 +338,13 @@ sap.ui.define(
317
338
  * @returns {boolean} 'True' if the transient flag is set to 'false'
318
339
  * @private
319
340
  */
320
- CollaborationHelper._isEligibleForBackendPersistency = function (appStateInstance) {
321
- return appStateInstance && appStateInstance._oConfig && TRANSIENT_KEY in appStateInstance._oConfig && !appStateInstance._oConfig[TRANSIENT_KEY];
341
+ CollaborationHelper._isEligibleForBackendPersistency = function(appStateInstance) {
342
+ return (
343
+ appStateInstance &&
344
+ appStateInstance._oConfig &&
345
+ TRANSIENT_KEY in appStateInstance._oConfig &&
346
+ !appStateInstance._oConfig[TRANSIENT_KEY]
347
+ );
322
348
  };
323
349
 
324
350
  /**
@@ -327,7 +353,7 @@ sap.ui.define(
327
353
  * @returns {string} Returns a randomly generated UUID string.
328
354
  * @private
329
355
  */
330
- CollaborationHelper._getNextKey = function (oAppStateService) {
356
+ CollaborationHelper._getNextKey = function(oAppStateService) {
331
357
  return oAppStateService.getKey();
332
358
  };
333
359
 
@@ -337,9 +363,9 @@ sap.ui.define(
337
363
  * @returns {string} Returns a string in the format <semantic-object>-<action>~<contextRaw>.
338
364
  * @private
339
365
  */
340
- CollaborationHelper._extractSemanticObjectAndAction = function (sUrl) {
366
+ CollaborationHelper._extractSemanticObjectAndAction = function(sUrl) {
341
367
  const UshellContainer = sap.ui.require("sap/ushell/Container");
342
- return UshellContainer && UshellContainer.getServiceAsync("URLParsing").then(function (oURLParsing) {
368
+ return UshellContainer && UshellContainer.getServiceAsync("URLParsing").then(function(oURLParsing) {
343
369
  var parsedShellHash = oURLParsing.parseShellHash(this._extractURLHash(sUrl));
344
370
  if (parsedShellHash) {
345
371
  return Promise.resolve(parsedShellHash.contextRaw ?
@@ -357,7 +383,7 @@ sap.ui.define(
357
383
  * @returns {boolean} Returns 'true' if the fragment is resolved successfully.
358
384
  * @private
359
385
  */
360
- CollaborationHelper._isMinificationFeasible = async function (sUrl) {
386
+ CollaborationHelper._isMinificationFeasible = async function(sUrl) {
361
387
  const UshellContainer = sap.ui.require("sap/ushell/Container");
362
388
  if (UshellContainer) {
363
389
  const oNavTargetResolution = await UshellContainer.getServiceAsync("NavTargetResolution");
@@ -366,9 +392,10 @@ sap.ui.define(
366
392
  var iParamsCount = Object.keys(oParsedShellHash.params).length;
367
393
  if (iParamsCount > 0) {
368
394
  return oNavTargetResolution.resolveHashFragment(`#${oParsedShellHash.semanticObject}-${oParsedShellHash.action}`)
369
- .then(function (param) {
395
+ .then(function(param) {
370
396
  return true;
371
- }).catch(function (e) {
397
+ })
398
+ .catch(function(e) {
372
399
  return false;
373
400
  });
374
401
  } else {
@@ -384,7 +411,7 @@ sap.ui.define(
384
411
  * @returns {string} String before the hash character in the URL.
385
412
  * @private
386
413
  */
387
- CollaborationHelper._extractURLBeforeHash = function (sUrl) {
414
+ CollaborationHelper._extractURLBeforeHash = function(sUrl) {
388
415
  var sUrlFragementBeforeHash = sUrl.split("#")[0];
389
416
  return sUrlFragementBeforeHash;
390
417
  };
@@ -395,8 +422,8 @@ sap.ui.define(
395
422
  * @returns {string} Hash from the URL
396
423
  * @private
397
424
  */
398
- CollaborationHelper._extractURLHash = function (sUrl) {
399
- var sUrlHash = sUrl.substring(sUrl.indexOf('#'));
425
+ CollaborationHelper._extractURLHash = function(sUrl) {
426
+ var sUrlHash = sUrl.substring(sUrl.indexOf("#"));
400
427
  return sUrlHash;
401
428
  };
402
429
 
@@ -407,7 +434,7 @@ sap.ui.define(
407
434
  * @returns {Promise} Promise which ultimately resolves once the value is stored successfully.
408
435
  * @private
409
436
  */
410
- CollaborationHelper._storeUrl = function (sUrl, oAppStateService) {
437
+ CollaborationHelper._storeUrl = function(sUrl, oAppStateService) {
411
438
  oAppStateService.setData(sUrl);
412
439
  return oAppStateService.save();
413
440
  };
@@ -5,51 +5,51 @@
5
5
 
6
6
  */
7
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";
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
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
- */
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
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");
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
30
 
31
- CollaborationManagerService.prototype.triggerH2HChat = function (sAppTitle, sCurrentURL, sEmailId) {
31
+ CollaborationManagerService.prototype.triggerH2HChat = function(sAppTitle, sCurrentURL, sEmailId) {
32
32
  this.publishData({ sAppTitle, sCurrentURL, sEmailId });
33
- };
33
+ };
34
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://BusinessSuiteInAppSymbols/icon-collaboration-manager",
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
- };
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://BusinessSuiteInAppSymbols/icon-collaboration-manager",
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
53
 
54
54
  /**
55
55
  * Distributes data from FLP and embedded iframes.
@@ -66,5 +66,5 @@ sap.ui.define([
66
66
  }
67
67
  };
68
68
 
69
- return CollaborationManagerService;
69
+ return CollaborationManagerService;
70
70
  });