@sapui5/sap.fe.templates 1.96.5 → 1.96.8

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.fe.templates",
3
- "version": "1.96.5",
3
+ "version": "1.96.8",
4
4
  "description": "SAPUI5 Library sap.fe.templates",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "SAP SE (https://www.sap.com)",
@@ -6,7 +6,7 @@
6
6
  <copyright>SAP UI development toolkit for HTML5 (SAPUI5)
7
7
  (c) Copyright 2009-2021 SAP SE. All rights reserved
8
8
  </copyright>
9
- <version>1.96.5</version>
9
+ <version>1.96.8</version>
10
10
 
11
11
  <documentation>UI5 library: sap.fe.templates</documentation>
12
12
 
@@ -52,6 +52,14 @@ sap.ui.define(
52
52
  }
53
53
 
54
54
  function getShareUrl() {
55
+ var sShareUrl;
56
+ var sHash = HashChanger.getInstance().getHash();
57
+ var sBasePath = HashChanger.getInstance().hrefForAppSpecificHash ? HashChanger.getInstance().hrefForAppSpecificHash("") : "";
58
+ sShareUrl = sHash ? sBasePath + sHash : window.location.hash;
59
+ return sShareUrl;
60
+ }
61
+
62
+ function getShareEmailUrl() {
55
63
  var oUShellContainer = sap.ushell && sap.ushell.Container;
56
64
  if (oUShellContainer) {
57
65
  return oUShellContainer
@@ -128,8 +136,15 @@ sap.ui.define(
128
136
  Log.error(error);
129
137
  });
130
138
 
131
- return Promise.resolve(getShareUrl()).then(function(sFLPUrl) {
132
- oShareMetadata.url = sFLPUrl;
139
+ Promise.resolve(getShareUrl())
140
+ .then(function(sUrl) {
141
+ oShareMetadata.url = sUrl;
142
+ })
143
+ .catch(function(error) {
144
+ Log.error(error);
145
+ });
146
+ return Promise.resolve(getShareEmailUrl()).then(function(sFLPUrl) {
147
+ oShareMetadata.email.url = sFLPUrl;
133
148
  return oShareMetadata;
134
149
  });
135
150
  }
@@ -238,7 +238,18 @@ sap.ui.define(
238
238
  // * @protected
239
239
  // * @static
240
240
  // */
241
- function getShareUrl() {
241
+ function getShareUrl(sEditMode, bIsStickySupported, aActiveContextPaths) {
242
+ var sShareUrl;
243
+ var sHash = HashChanger.getInstance().getHash();
244
+ var sBasePath = HashChanger.getInstance().hrefForAppSpecificHash ? HashChanger.getInstance().hrefForAppSpecificHash("") : "";
245
+ if (sEditMode === "Editable" && !bIsStickySupported && aActiveContextPaths) {
246
+ sShareUrl = sBasePath + aActiveContextPaths.join("/");
247
+ } else {
248
+ sShareUrl = sHash ? sBasePath + sHash : window.location.hash;
249
+ }
250
+ return sShareUrl;
251
+ }
252
+ function getShareEmailUrl() {
242
253
  var oUShellContainer = sap.ushell && sap.ushell.Container;
243
254
  if (oUShellContainer) {
244
255
  return oUShellContainer
@@ -294,6 +305,7 @@ sap.ui.define(
294
305
  ._getPageTitleInformation()
295
306
  );
296
307
  aPromises.push(getJamUrl(sEditMode, bIsStickySupported, aActiveContextPaths));
308
+ aPromises.push(getShareEmailUrl());
297
309
  Promise.all(aPromises)
298
310
  .then(function(oData) {
299
311
  var oPageTitleInfo = oData[0];
@@ -310,6 +322,7 @@ sap.ui.define(
310
322
  oShareMetadata.email.title = sTitle;
311
323
  oShareMetadata.title = sTitle;
312
324
  oShareMetadata.jam.url = sJamUrl;
325
+ oShareMetadata.email.url = oData[2];
313
326
  })
314
327
  .catch(function(error) {
315
328
  Log.error(error);
@@ -46,7 +46,7 @@ sap.ui.define(
46
46
  interfaces: [],
47
47
  controls: [],
48
48
  elements: [],
49
- version: "1.96.5",
49
+ version: "1.96.8",
50
50
  noLibraryCSS: true
51
51
  });
52
52
  if (!sap.fe.templates.ObjectPage) {