@sapui5/sap.fe.templates 1.96.3 → 1.96.6

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.3",
3
+ "version": "1.96.6",
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.3</version>
9
+ <version>1.96.6</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
  }
@@ -124,42 +124,42 @@ sap.ui.define(
124
124
  var oView = this.getView(),
125
125
  that = this,
126
126
  oController = oView.getController(),
127
- oComponent = oController.getOwnerComponent(),
128
- oAppComponent = sap.ui.core.Component.getOwnerComponentFor(oComponent),
127
+ oAppComponent = oController.getAppComponent(oView),
129
128
  oComponentData = oAppComponent.getComponentData(),
130
129
  oStartupParameters = (oComponentData && oComponentData.startupParameters) || {},
131
130
  oVariantPromise = that.handleVariantIdPassedViaURLParams(oStartupParameters),
132
131
  bFilterVariantApplied;
133
- oVariantPromise
134
- .then(function(aVariants) {
135
- if (aVariants && aVariants.length > 0) {
136
- if (aVariants[0] === true || aVariants[1] === true) {
137
- bFilterVariantApplied = true;
138
- }
139
- }
140
- var oRes = that._applySelectionVariant(oView, oNavigationParameter, bFilterVariantApplied).then(function() {
141
- var oController = oView.getController();
142
- var oDynamicPage = oView.byId("fe::ListReport");
143
- var bPreventInitialSearch = false;
144
- var oFilterBarVM = that._getFilterBarVM(oView);
145
- var oFilterBarControl = oController._getFilterBarControl();
146
- if (
147
- (oNavigationParameter.navigationType !== NavType.initial && oNavigationParameter.requiresStandardVariant) ||
148
- (!oFilterBarVM && oView.getViewData().initialLoad === InitialLoadMode.Enabled) ||
149
- oController._shouldAutoTriggerSearch(oFilterBarVM)
150
- ) {
151
- oFilterBarControl.triggerSearch();
152
- } else {
153
- bPreventInitialSearch = that._preventInitialSearch(oFilterBarVM);
132
+ aResults.push(
133
+ oVariantPromise
134
+ .then(function(aVariants) {
135
+ if (aVariants && aVariants.length > 0) {
136
+ if (aVariants[0] === true || aVariants[1] === true) {
137
+ bFilterVariantApplied = true;
138
+ }
154
139
  }
155
- that._bSearchTriggered = !bPreventInitialSearch;
156
- oDynamicPage.setHeaderExpanded(Device.system.desktop || bPreventInitialSearch);
157
- });
158
- aResults.push(oRes);
159
- })
160
- .catch(function() {
161
- Log.error("Variant ID cannot be applied");
162
- });
140
+ return that._applySelectionVariant(oView, oNavigationParameter, bFilterVariantApplied).then(function() {
141
+ var oDynamicPage = oView.byId("fe::ListReport");
142
+ var bPreventInitialSearch = false;
143
+ var oFilterBarVM = that._getFilterBarVM(oView);
144
+ var oFilterBarControl = oController._getFilterBarControl();
145
+ if (
146
+ (oNavigationParameter.navigationType !== NavType.initial &&
147
+ oNavigationParameter.requiresStandardVariant) ||
148
+ (!oFilterBarVM && oView.getViewData().initialLoad === InitialLoadMode.Enabled) ||
149
+ oController._shouldAutoTriggerSearch(oFilterBarVM)
150
+ ) {
151
+ oFilterBarControl.triggerSearch();
152
+ } else {
153
+ bPreventInitialSearch = that._preventInitialSearch(oFilterBarVM);
154
+ }
155
+ that._bSearchTriggered = !bPreventInitialSearch;
156
+ oDynamicPage.setHeaderExpanded(Device.system.desktop || bPreventInitialSearch);
157
+ });
158
+ })
159
+ .catch(function() {
160
+ Log.error("Variant ID cannot be applied");
161
+ })
162
+ );
163
163
  },
164
164
 
165
165
  handleVariantIdPassedViaURLParams: function(oUrlParams) {
@@ -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.3",
49
+ version: "1.96.6",
50
50
  noLibraryCSS: true
51
51
  });
52
52
  if (!sap.fe.templates.ObjectPage) {