@sapui5/sap.suite.ui.generic.template 1.136.1 → 1.136.2

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.suite.ui.generic.template",
3
- "version": "1.136.1",
3
+ "version": "1.136.2",
4
4
  "description": "SAPUI5 Library sap.suite.ui.generic.template",
5
5
  "keywords": [
6
6
  "sapui5",
@@ -7,7 +7,7 @@
7
7
 
8
8
  (c) Copyright 2009-2015 SAP SE. All rights reserved
9
9
  </copyright>
10
- <version>1.136.1</version>
10
+ <version>1.136.2</version>
11
11
 
12
12
  <documentation>Library with generic Suite UI templates.</documentation>
13
13
 
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.136.1"
11
+ "version": "1.136.2"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.136.1"
11
+ "version": "1.136.2"
12
12
  },
13
13
  "title": "Canvas",
14
14
  "description": "Canvas Page",
@@ -26,7 +26,8 @@ sap.ui.define([
26
26
  "sap/suite/ui/generic/template/lib/ai/EasyFilterBarHandler",
27
27
  "sap/ui/model/FilterOperator",
28
28
  "sap/ui/core/message/MessageType",
29
- "sap/ui/core/Element"
29
+ "sap/ui/core/Element",
30
+ "sap/suite/ui/generic/template/genericUtilities/testableHelper"
30
31
  ], function (
31
32
  Filter,
32
33
  ExtensionAPI,
@@ -55,7 +56,8 @@ sap.ui.define([
55
56
  EasyFilterBarHandler,
56
57
  FilterOperator,
57
58
  MessageType,
58
- Element
59
+ Element,
60
+ testableHelper
59
61
  ) {
60
62
  "use strict";
61
63
 
@@ -335,6 +337,7 @@ sap.ui.define([
335
337
 
336
338
  function onShareListReportActionButtonPressImpl(oButton) {
337
339
  var getFilterInfoForTilePromise = function () {
340
+ try {
338
341
  var oPresentationControlHandler = oState.oPresentationControlHandler;
339
342
  var oMetaModel = oPresentationControlHandler.getModel().getMetaModel();
340
343
  var sEntityTypeName = oMetaModel.getODataEntitySet(oPresentationControlHandler.getEntitySet()).entityType;
@@ -363,7 +366,14 @@ sap.ui.define([
363
366
  sServiceUrl: ""
364
367
  });
365
368
  }
369
+ } catch (error) {
366
370
 
371
+ oLogger.error("An error occurred while handling Share button press. A static tile will be created instead of a dynamic one. Error:", error.message);
372
+ return Promise.resolve({
373
+ sServiceUrl: ""
374
+ });
375
+
376
+ }
367
377
  };
368
378
 
369
379
  var oFragmentController = {
@@ -547,6 +557,7 @@ sap.ui.define([
547
557
  // // Expose selected private functions to unit tests
548
558
  // var getDownloadUrl = testableHelper.testable(getDownloadUrl, "getDownloadUrl");
549
559
  /* eslint-enable */
560
+ testableHelper.testableStatic(onShareListReportActionButtonPressImpl, "ControllerImplementation_onShareListReportActionButtonPressImpl");
550
561
 
551
562
  // Generation of Event Handlers
552
563
  return {
@@ -696,7 +707,7 @@ sap.ui.define([
696
707
  onShareListReportActionButtonPressImpl(oMenuButton);
697
708
  });
698
709
  },
699
-
710
+
700
711
  handlers: {
701
712
  addEntry: addEntry,
702
713
  addEntryWithFilters: addEntryWithFilters,
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.136.1"
11
+ "version": "1.136.2"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -2132,6 +2132,13 @@ sap.ui.define([
2132
2132
  // and register for all relevant updates on that context so that we call the same function with
2133
2133
  // 2. !bFirstTimeForContext = adapt to the change
2134
2134
  var fnExecuteDynamicColumnHide = function (bFirstTimeForContext, oSmartTableInfoObject) {
2135
+ if (!bFirstTimeForContext && !oContext.getObject(oContext.getPath())) {
2136
+ // In case then method is trigged by property change
2137
+ // and there is no data in model for current context path -> we don't trigger column visibility recalculation
2138
+ // As object data are missing, it's meaningless. But in some cases can break application navigation.
2139
+ // Table columns visibility change -> which will trigger save app state -> which will modify URL
2140
+ return;
2141
+ }
2135
2142
  var aHiddenColumnInfo = oSmartTableInfoObject.getHiddenColumnInfo();
2136
2143
 
2137
2144
  // if columns are hidden only statically, no need to refresh hiding here
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.136.1"
9
+ "version": "1.136.2"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.136.1"
9
+ "version": "1.136.2"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.136.1"
9
+ "version": "1.136.2"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -216,34 +216,6 @@ sap.ui.define([ "sap/suite/ui/generic/template/genericUtilities/FeLogger", "sap/
216
216
  oPaginatorButtonsHelper.handleShowPrevObject(oEvent);
217
217
  }
218
218
 
219
- function fnConstructTitleAdditionalInfo(sTitle, oTemplateContract, oCurrentIdentity) {
220
- let sObjectTitle, sObjectSubtitle, sHeaderText;
221
- let oCurrentRegistryEntry = oTemplateContract.componentRegistry[oCurrentIdentity.treeNode.componentId];
222
- let oTemplatePrivateModel = oCurrentRegistryEntry.utils.getTemplatePrivateModel();
223
- sObjectTitle = oTemplatePrivateModel.getProperty("/objectPage/headerInfo/objectTitle");
224
- sObjectSubtitle = oTemplatePrivateModel.getProperty("/objectPage/headerInfo/objectSubtitle");
225
- let oParentNode = oTemplateContract.mRoutingTree[oCurrentIdentity.treeNode.parentRoute]; //start from the currentNode's parent node
226
- let aAncestors = [];
227
- let sSeperator = " - ";
228
- while (oParentNode.level > 0) { //construct the title only till the main object page
229
- aAncestors.push(oParentNode.text || oParentNode.headerTitle);
230
- oParentNode = oTemplateContract.mRoutingTree[oParentNode.parentRoute];
231
- }
232
- let sAncestorsTitle = aAncestors.join(" - "); //final string constructed for the breadcrumb
233
- sObjectSubtitle = sObjectSubtitle ? "(" + sObjectSubtitle + ")" : "";
234
- if (sObjectTitle && !sObjectSubtitle) {
235
- sObjectTitle += sSeperator;
236
- }
237
- if (sObjectSubtitle) {
238
- sObjectSubtitle += sSeperator;
239
- }
240
- if (sAncestorsTitle && sTitle) {
241
- sAncestorsTitle += sSeperator;
242
- }
243
- sHeaderText = `${sObjectTitle} ${sObjectSubtitle} ${sAncestorsTitle} ${sTitle}`;
244
- return {headerText : sHeaderText};
245
- }
246
-
247
219
  // Expose selected private functions to unit tests
248
220
  /* eslint-disable */
249
221
  var fnGetHashChangerInstance = testableHelper.testable(fnGetHashChangerInstance, "getHashChangerInstance");
@@ -334,8 +306,37 @@ sap.ui.define([ "sap/suite/ui/generic/template/genericUtilities/FeLogger", "sap/
334
306
  return oControllerBase;
335
307
  }
336
308
 
309
+ function fnConstructTitleAdditionalInfo(sTitle, oTemplateContract, oCurrentIdentity) {
310
+ let sObjectTitle, sObjectSubtitle, sHeaderText;
311
+ let oCurrentRegistryEntry = oTemplateContract.componentRegistry[oCurrentIdentity.treeNode.componentId];
312
+ let oTemplatePrivateModel = oCurrentRegistryEntry.utils.getTemplatePrivateModel();
313
+ sObjectTitle = oTemplatePrivateModel.getProperty("/objectPage/headerInfo/objectTitle");
314
+ sObjectSubtitle = oTemplatePrivateModel.getProperty("/objectPage/headerInfo/objectSubtitle");
315
+ let oParentNode = oTemplateContract.mRoutingTree[oCurrentIdentity.treeNode.parentRoute]; //start from the currentNode's parent node
316
+ let aAncestors = [];
317
+ let sSeperator = " - ";
318
+ while (oParentNode.level > 0) { //construct the title only till the main object page
319
+ aAncestors.push(oParentNode.text || oParentNode.headerTitle);
320
+ oParentNode = oTemplateContract.mRoutingTree[oParentNode.parentRoute];
321
+ }
322
+ let sAncestorsTitle = aAncestors.join(" - "); //final string constructed for the breadcrumb
323
+ sObjectSubtitle = sObjectSubtitle ? "(" + sObjectSubtitle + ")" : "";
324
+ if (sObjectTitle && !sObjectSubtitle) {
325
+ sObjectTitle += sSeperator;
326
+ }
327
+ if (sObjectSubtitle) {
328
+ sObjectSubtitle += sSeperator;
329
+ }
330
+ if (sAncestorsTitle && sTitle) {
331
+ sAncestorsTitle += sSeperator;
332
+ }
333
+ sHeaderText = `${sObjectTitle} ${sObjectSubtitle} ${sAncestorsTitle} ${sTitle}`;
334
+ return { headerText: sHeaderText };
335
+ }
336
+
337
337
  return {
338
338
  getComponentBase: getComponentBase,
339
- getControllerBase: getControllerBase
339
+ getControllerBase: getControllerBase,
340
+ fnConstructTitleAdditionalInfo: fnConstructTitleAdditionalInfo
340
341
  };
341
342
  });
@@ -78,7 +78,7 @@ sap.ui.define([
78
78
  appExtension: oCustomData[dataPropertyNameCustom],
79
79
  adaptationExtensions: oCustomData[dataPropertyNameExtension]
80
80
  };
81
-
81
+ aBasicFilters = oSmartFilterBar.getAllFilterItems(true);
82
82
  mParams.oCustomFiltersWrapper.setState(oCustomFiltersState);
83
83
  oSVMWrapperCallbacks.setManagedControlStates(oCustomData[dataPropertyNameGeneric]);
84
84
  /* SFB header state of a variant (standard or custom) gets determined by the Apply Automatically checkbox's value of the corresponding
@@ -190,6 +190,12 @@ sap.ui.define([
190
190
  oSelectOptions = oSelectOptions && oSelectOptions.filter(function(oSelectOption){
191
191
  return oSelectOption.PropertyName !== dataPropertyNameGeneric;
192
192
  });
193
+ // Get standard filters that are part of the standard variant but are currently not visible in the filterbar.
194
+ // This is only done if the variant has been modified (i.e., it's dirty).
195
+ const aStandardItems = oSmartFilterBar.getVariantManagement?.().getModified?.() ? oSmartFilterBar.getAllFilterItems().filter(function(oFilterItem){
196
+ return oFilterItem.getGroupName() === sap.ui.comp.filterbar.FilterBar.INTERNAL_GROUP && !oFilterItem.getVisibleInFilterBar();
197
+ }) : [];
198
+
193
199
  return {
194
200
  selectOptions: oSelectOptions,
195
201
  parameters: oUiState.getSelectionVariant().Parameters,
@@ -200,7 +206,10 @@ sap.ui.define([
200
206
  }).map(function(oFilterItem){
201
207
  return oFilterItem.getName();
202
208
  }),
203
- removedFilterItems: aBasicFilters.filter(function(oFilterItem){
209
+ // Combine basic filters and standard variant filters (only if the variant is dirty), removing duplicates, then filter out those not visible in the filter bar,
210
+ // This is necessary because when the variant is dirty and the iAppState is shared or the app is refreshed, the final iAppState is applied on top of the standard variant.
211
+ // Keeping track of removed standard filters when the variant is dirty ensures the filter state remains consistent and avoids unexpected behavior for users.
212
+ removedFilterItems: Array.from(new Set(aBasicFilters.concat(aStandardItems))).filter(function(oFilterItem){
204
213
  return !oFilterItem.getVisibleInFilterBar();
205
214
  }).map(function(oFilterItem){
206
215
  return oFilterItem.getName();
@@ -950,7 +950,7 @@ sap.ui.define([
950
950
  * @public
951
951
  * @extends sap.ui.core.UIComponent
952
952
  * @author SAP SE
953
- * @version 1.136.1
953
+ * @version 1.136.2
954
954
  * @name sap.suite.ui.generic.template.lib.AppComponent
955
955
  */
956
956
  var oAppComponent = UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
@@ -1050,6 +1050,10 @@ sap.ui.define([
1050
1050
  externalNavigationSettings: {
1051
1051
  type: "object",
1052
1052
  defaultValue: null
1053
+ },
1054
+ skipOPContextInfoInBrowserTitle: {
1055
+ type: "boolean",
1056
+ defaultValue: false
1053
1057
  }
1054
1058
  },
1055
1059
  events: {
@@ -1059,7 +1063,7 @@ sap.ui.define([
1059
1063
  config: {
1060
1064
  async: true,
1061
1065
  viewType: "XML",
1062
- viewPath: "",
1066
+ path: "",
1063
1067
  clearTarget: false
1064
1068
  },
1065
1069
  routes: [],
@@ -1107,7 +1107,7 @@ sap.ui.define(["sap/ui/base/Object",
1107
1107
  oMainNavigation.setDescription(oTexts.secondText);
1108
1108
  }
1109
1109
  sTitle = oTexts.firstText;
1110
- if (sTextArrangement && oTexts.secondText) {
1110
+ if (!!oField["sap:unit"] && oTexts.secondText) {
1111
1111
  sTitle = oTexts.firstText + " " + oTexts.secondText;
1112
1112
  }
1113
1113
  }
@@ -114,7 +114,7 @@ sap.ui.define([
114
114
  if (oRange.operation === "BT") {
115
115
  return {
116
116
  operator: FilterOperator.BT,
117
- selectedValues: [{ value1: oRange.value1, value2: oRange.value2 }]
117
+ selectedValues: [oRange.value1, oRange.value2]
118
118
  };
119
119
  } else {
120
120
  return {
@@ -293,39 +293,40 @@ sap.ui.define([
293
293
 
294
294
  var aSelectOptions = [];
295
295
  var oEditStateFilter = 0;
296
- oAIFilters.forEach(function(oFilterItem) {
297
296
 
298
- if ( oFilterItem.key === "EditState") {
299
- oEditStateFilter = oFilterItem.keySpecificSelectedValues[0].selectedValues[0]; // Edit state generally should not have more than one filter value
297
+ oAIFilters.forEach(function (oFilterItem) {
298
+ if (oFilterItem.key === "EditState") {
299
+ oEditStateFilter = oFilterItem.keySpecificSelectedValues[0].selectedValues[0]; // Edit state generally should not have more than one filter value
300
300
  } else {
301
301
  var oFilter = {
302
- PropertyName : oFilterItem.key,
303
- Ranges : []
302
+ PropertyName: oFilterItem.key,
303
+ Ranges: []
304
304
  };
305
305
  // keySpecificSelectedValues will have one selectedValues object for each operator
306
306
  // ex : [{operator: "EQ", selectedValues: ["HT-1010","HT-10001","1097"]}, {operator: "Contains", selectedValues: ["HT-100"]}]
307
- oFilterItem.keySpecificSelectedValues.forEach(function(oSelectedValues) {
308
- oSelectedValues.selectedValues.forEach(function (oValue) {
309
- var oRange = {
310
- Sign : "I", // currently not considering "E"
311
- High : ""
312
- };
313
- if (oSelectedValues.operator === "Contains") { // need to check for other operators if special handling is required
314
- oRange.Option = "CP";
315
- oRange.Low = oValue;
316
- } else if (oSelectedValues.operator === "BT" || oSelectedValues.operator === "NB") {
317
- // For "BT" and "NB" High is required
318
- // AI reuse responds with array of values for BT and BN (between and not between)
319
- // But in few cases it can also respond with two separate filters (LT and GT)
320
- // FE DOES NOT do the auto merging and results in two separate selectOptions (results in OR condition)
321
- oRange.Low = oValue[0];
322
- oRange.High = oValue[1];
323
- } else {
324
- oRange.Option = oSelectedValues.operator;
325
- oRange.Low = oValue;
326
- }
307
+ oFilterItem.keySpecificSelectedValues.forEach(function (oSelectedValues) {
308
+ var oRange = {
309
+ Sign: "I", // currently not considering "E"
310
+ High: ""
311
+ };
312
+
313
+ if ((oSelectedValues.operator === "BT" || oSelectedValues.operator === "NB")) {
314
+ oRange.Low = oSelectedValues.selectedValues[0];
315
+ oRange.High = oSelectedValues.selectedValues[1];
316
+ oRange.Option = oSelectedValues.operator;
327
317
  oFilter.Ranges.push(oRange);
328
- });
318
+ } else {
319
+ oSelectedValues.selectedValues.forEach(function (oValue) {
320
+ if (oSelectedValues.operator === "Contains") { // need to check for other operators if special handling is required
321
+ oRange.Option = "CP";
322
+ oRange.Low = oValue;
323
+ } else {
324
+ oRange.Option = oSelectedValues.operator;
325
+ oRange.Low = oValue;
326
+ }
327
+ oFilter.Ranges.push(oRange);
328
+ });
329
+ }
329
330
  });
330
331
  // one oFilter will have multiple ranges if multiple filters are selected for the same property
331
332
  aSelectOptions.push(oFilter);
@@ -333,7 +334,7 @@ sap.ui.define([
333
334
  });
334
335
  return {
335
336
  aSelectOptions: aSelectOptions,
336
- oEditStateFilter : oEditStateFilter
337
+ oEditStateFilter: oEditStateFilter
337
338
  };
338
339
  }
339
340
 
@@ -434,6 +434,10 @@ sap.ui.define(["sap/ui/base/Object",
434
434
  return oNavigationControllerProxy.oAppComponent.getProperty('draftDiscardConfirmationSettings').enabled;
435
435
  }
436
436
 
437
+ function isOPContextSkippedInBrowserTitle(){
438
+ return oNavigationControllerProxy.oAppComponent.getProperty('skipOPContextInfoInBrowserTitle');
439
+ }
440
+
437
441
  // returns a promise from FLP shell which can be resolved to get information such as semantic object, action of the application
438
442
  function getParsedShellHashFromFLP(){
439
443
  return UShellContainer && UShellContainer.getServiceAsync("URLParsing");
@@ -518,7 +522,7 @@ sap.ui.define(["sap/ui/base/Object",
518
522
  oTemplateContract.oShellServicePromise.then(function (oShellService) {
519
523
  var oCurrentRegistryEntry = oTemplateContract.componentRegistry[oCurrentIdentity.treeNode.componentId];
520
524
  var oAdditionalInformation = oCurrentRegistryEntry.oControllerUtils && oCurrentRegistryEntry.oControllerUtils.oServices.oTemplateCapabilities.fnConstructTitleAdditionalInfo;
521
- if (oAdditionalInformation) {
525
+ if (oAdditionalInformation && !isOPContextSkippedInBrowserTitle()) {
522
526
  oShellService.setTitle(sTitle, oCurrentRegistryEntry.oControllerUtils.oServices.oTemplateCapabilities.fnConstructTitleAdditionalInfo(sTitle, oTemplateContract, oCurrentIdentity));
523
527
  } else {
524
528
  oShellService.setTitle(sTitle);
@@ -3206,7 +3210,7 @@ sap.ui.define(["sap/ui/base/Object",
3206
3210
  * @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
3207
3211
  * @public
3208
3212
  * @extends sap.ui.base.Object
3209
- * @version 1.136.1
3213
+ * @version 1.136.2
3210
3214
  * @since 1.30.0
3211
3215
  * @alias sap.suite.ui.generic.template.lib.NavigationController
3212
3216
  */
@@ -77,7 +77,8 @@ sap.ui.define(["sap/ui/core/Element",
77
77
  // creates a view target as specified and returns the created target
78
78
  function createViewTarget(oNavigationControllerProxy, sHostId, sViewName, sTargetName, sHostAggregation, oBehaviour) {
79
79
  return createTarget(oNavigationControllerProxy, sTargetName, sHostId, sHostAggregation, oBehaviour, {
80
- viewName: sViewName
80
+ type: "View",
81
+ name: sViewName
81
82
  });
82
83
  }
83
84
 
@@ -66,7 +66,7 @@ sap.ui.define([
66
66
  interfaces: [],
67
67
  controls: [],
68
68
  elements: [],
69
- version: "1.136.1",
69
+ version: "1.136.2",
70
70
  extensions: {
71
71
  //Configuration used for rule loading of Support Assistant
72
72
  "sap.ui.support": {