@sapui5/sap.suite.ui.generic.template 1.125.0 → 1.126.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 (66) hide show
  1. package/package.json +1 -1
  2. package/src/sap/suite/ui/generic/template/.library +1 -1
  3. package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/visualfilterbar/FilterItem.js +1 -1
  4. package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/visualfilterbar/FilterItemMicroChart.js +1 -0
  5. package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/ControllerImplementation.js +13 -14
  6. package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/DropDownController.js +4 -4
  7. package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/FilterBarController.js +2 -5
  8. package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/VisualFilterDialogController.js +0 -9
  9. package/src/sap/suite/ui/generic/template/AnalyticalListPage/extensionAPI/ExtensionAPI.js +10 -1
  10. package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
  11. package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/AnalyticalListPage.view.xml +1 -1
  12. package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/fragments/ContentViewButtons.fragment.xml +1 -1
  13. package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/fragments/SmartFilterBar.fragment.xml +1 -3
  14. package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
  15. package/src/sap/suite/ui/generic/template/ListReport/controller/ControllerImplementation.js +57 -4
  16. package/src/sap/suite/ui/generic/template/ListReport/controller/IappStateHandler.js +10 -0
  17. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n.properties +3 -0
  18. package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
  19. package/src/sap/suite/ui/generic/template/ListReport/view/fragments/SmartFilterBar.fragment.xml +1 -1
  20. package/src/sap/suite/ui/generic/template/ListReport/view/fragments/SmartTable.fragment.xml +9 -13
  21. package/src/sap/suite/ui/generic/template/ObjectPage/Component.js +2 -1
  22. package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +3 -2
  23. package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
  24. package/src/sap/suite/ui/generic/template/ObjectPage/templateSpecificPreparationHelper.js +38 -12
  25. package/src/sap/suite/ui/generic/template/ObjectPage/view/Details.view.xml +2 -0
  26. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/HeaderContainer.fragment.xml +11 -0
  27. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/SmartTable.fragment.xml +8 -14
  28. package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
  29. package/src/sap/suite/ui/generic/template/QuickCreate/view/QuickCreate.controller.js +4 -3
  30. package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
  31. package/src/sap/suite/ui/generic/template/designtime/AnalyticalListPage.designtime.js +2 -2
  32. package/src/sap/suite/ui/generic/template/designtime/ListReport.designtime.js +2 -2
  33. package/src/sap/suite/ui/generic/template/designtime/ObjectPage.designtime.js +2 -5
  34. package/src/sap/suite/ui/generic/template/fragments/ContactDetails.fragment.xml +15 -14
  35. package/src/sap/suite/ui/generic/template/fragments/GridTableCells.fragment.xml +11 -0
  36. package/src/sap/suite/ui/generic/template/fragments/HeaderDataPointContent.fragment.xml +11 -0
  37. package/src/sap/suite/ui/generic/template/fragments/HeaderFormDataField.fragment.xml +12 -0
  38. package/src/sap/suite/ui/generic/template/fragments/QuickViewSmartForm.fragment.xml +2 -0
  39. package/src/sap/suite/ui/generic/template/fragments/SmartFormDataField.fragment.xml +21 -0
  40. package/src/sap/suite/ui/generic/template/fragments/TableCell.fragment.xml +11 -0
  41. package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartFilterBarWrapper.js +52 -1
  42. package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartTableChartCommon.js +6 -4
  43. package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartVariantManagementWrapper.js +3 -3
  44. package/src/sap/suite/ui/generic/template/js/AnnotationHelper.js +3 -2
  45. package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
  46. package/src/sap/suite/ui/generic/template/lib/Application.js +2 -4
  47. package/src/sap/suite/ui/generic/template/lib/CRUDHelper.js +7 -4
  48. package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +0 -7
  49. package/src/sap/suite/ui/generic/template/lib/CreateWithDialogHandler.js +23 -10
  50. package/src/sap/suite/ui/generic/template/lib/MessageButtonHelper.js +7 -5
  51. package/src/sap/suite/ui/generic/template/lib/MessageStripHelper.js +6 -6
  52. package/src/sap/suite/ui/generic/template/lib/ShareUtils.js +2 -12
  53. package/src/sap/suite/ui/generic/template/lib/insights/InsightsHandler.js +21 -21
  54. package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +1 -1
  55. package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartChartHandler.js +15 -1
  56. package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartListHandler.js +6 -1
  57. package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartTableHandler.js +7 -2
  58. package/src/sap/suite/ui/generic/template/library.js +1 -1
  59. package/src/sap/suite/ui/generic/template/listTemplates/controller/DetailController.js +1 -1
  60. package/src/sap/suite/ui/generic/template/listTemplates/controller/IappStateHandler.js +32 -29
  61. package/src/sap/suite/ui/generic/template/listTemplates/controller/SmartChartController.js +1 -1
  62. package/src/sap/suite/ui/generic/template/listTemplates/filterSettingsPreparationHelper.js +3 -1
  63. package/src/sap/suite/ui/generic/template/listTemplates/fragments/DetailSmartTable.fragment.xml +5 -15
  64. package/src/sap/suite/ui/generic/template/listTemplates/fragments/SmartTableToolbar.fragment.xml +1 -1
  65. package/src/sap/suite/ui/generic/template/themes/base/ObjectPage.less +1 -1
  66. package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/ObjectPage.less +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.suite.ui.generic.template",
3
- "version": "1.125.0",
3
+ "version": "1.126.0",
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.125.0</version>
10
+ <version>1.126.0</version>
11
11
 
12
12
  <documentation>Library with generic Suite UI templates.</documentation>
13
13
 
@@ -15,7 +15,7 @@ sap.ui.define(["sap/ui/core/Control", "sap/ui/model/Filter"],
15
15
  dimensionFieldIsDateTimeOffset: { type: "boolean", group: "Misc", defaultValue: false },
16
16
  dimensionFieldDisplay: { type: "string", group: "Misc", defaultValue: null },
17
17
  dimensionFilter: { type: "any", group: "Misc", defaultValue: null },
18
- dimensionFilterExternal: { type: "sap.ui.model.Filter", group: "Misc", defaultValue: null },
18
+ dimensionFilterExternal: { type: "any", group: "Misc", defaultValue: null },
19
19
  measureField: { type: "string", group: "Misc", defaultValue: null },
20
20
  unitField: { type: "string", group: "Misc", defaultValue: null },
21
21
  isCurrency: { type: "boolean", group: "Misc", defaultValue: false },
@@ -51,6 +51,7 @@ sap.ui.define([
51
51
  chartQualifier: {type: "string", group: "Misc", defaultValue: null},
52
52
  smartFilterId: { type: "string", group: "Misc", defaultValue: null},
53
53
  isParameter: { type: "boolean", group: "Misc", defaultValue: false },
54
+ activeVisualFilters: { type: "boolean", group: "Misc", defaultValue: false },
54
55
  stringdate: { type: "string", group: "Misc", defaultValue: "" } //dummy property
55
56
  },
56
57
  aggregations: {
@@ -1058,22 +1058,26 @@ sap.ui.define(["sap/fe/navigation/SelectionVariant",
1058
1058
  oTemplateUtils.oCommonUtils.setEnabledToolbarButtons(ev.getSource());
1059
1059
  },
1060
1060
  onAfterApplyChartVariant: function() {
1061
- oState.oIappStateHandler.fnStoreCurrentAppStateAndAdjustURL();
1061
+ // Wait until the previous invocation of storing the app state is completed.
1062
+ // Then, proceed with storing the current app state.
1063
+ setTimeout(function () {
1064
+ oState.oIappStateHandler.fnStoreCurrentAppStateAndAdjustURL();
1065
+ }, 0);
1062
1066
  },
1063
1067
  onFilterModeSegmentedButtonChange: function(oEvent) {
1064
- oState.filterBarController.handleFilterSwitch(oEvent.getParameter("key"), oEvent.oSource._bApplyingVariant);
1068
+ oState.filterBarController.handleFilterSwitch();
1065
1069
  oState.oController._templateEventHandlers.onSegmentButtonPressed();
1066
1070
  oState.filterBarController.fnCheckMandatory();
1067
1071
  },
1068
1072
  onContentViewSegmentButtonPressed: function(oEvent){
1069
1073
  //todo: check if DSH loads if the default filter mode is crosstable
1070
1074
  //ideally we can init DSH post GO button press
1075
+ var sSelectedKey = oEvent.getSource().getSelectedKey();
1071
1076
 
1072
- if (oEvent.getParameter("key") === "crosstable" && !oState.oAnalyticGrid) {
1077
+ if (sSelectedKey === "crosstable" && !oState.oAnalyticGrid) {
1073
1078
  oState.oAnalyticGridController.initAnalyticGrid();
1074
1079
  }
1075
1080
 
1076
- var sSelectedKey = oEvent.getSource().getSelectedKey();
1077
1081
  if ((sSelectedKey === "table" || sSelectedKey === "charttable") && bTableRebindRequired) {
1078
1082
  oState.oSmartTable.rebindTable();
1079
1083
  bTableRebindRequired = false;
@@ -1222,13 +1226,6 @@ sap.ui.define(["sap/fe/navigation/SelectionVariant",
1222
1226
  };
1223
1227
  oState.oSmartFilterbar.addAdaptFilterDialogCustomContent(mCustomView);
1224
1228
  },
1225
- //Event handling for dialog buttons
1226
- onSearchForFilters: function(oEvent) {
1227
- oState.visualFilterDialogContainer._triggerSearchInFilterDialog.call(oState.visualFilterDialogContainer, oEvent);
1228
- },
1229
- onDialogSearch: function(oEvent) {
1230
- oState.visualFilterDialogContainer._searchDialog.call(oState.visualFilterDialogContainer);
1231
- },
1232
1229
  onDialogClear: function(oEvent) {
1233
1230
  oController.onClearFilterExtension(oEvent);
1234
1231
  },
@@ -1251,9 +1248,11 @@ sap.ui.define(["sap/fe/navigation/SelectionVariant",
1251
1248
  },
1252
1249
  onAddCardsToRepository: function(oEvent) {
1253
1250
  var oPresentationControlHandler = oTemplateUtils.oServices.oPresentationControlHandlerFactory.getPresentationControlHandler(oState.oSmartChart);
1254
- oState.oInsightsHandler.prepareAndShowCard(oEvent, {
1255
- "cardType" : "Analytical"
1256
- }, oPresentationControlHandler);
1251
+ oPresentationControlHandler.getInitializationPromise().then(function () {
1252
+ oState.oInsightsHandler.prepareAndShowCard(oEvent, {
1253
+ "cardType" : "Analytical"
1254
+ }, oPresentationControlHandler);
1255
+ });
1257
1256
  },
1258
1257
  onBeforeExport: function (oExportEvent) {
1259
1258
  oTemplateUtils.oCommonEventHandlers.onBeforeExport(oExportEvent);
@@ -65,7 +65,8 @@ sap.ui.define([
65
65
  oDialog.addContent(oList);
66
66
  //Attaching the selection change of the list to update the selection accordingly.
67
67
  oList.attachSelectionChange(function(oEvt) {
68
- var currentSelectedItem = oList.getModel().getData(oEvt.mParameters.listItem.getBindingContext().sPath);
68
+ var sBindingPath = oEvt.getParameter("listItem").getBindingContext().getPath();
69
+ var currentSelectedItem = oList.getModel().getProperty(sBindingPath);
69
70
  currentSelectedItem = currentSelectedItem[property.dimensionField];
70
71
  var selected = oEvt.getParameters().listItem.mProperties.selected;
71
72
  if (property.filterRestriction === 'multiple') {
@@ -138,9 +139,8 @@ sap.ui.define([
138
139
  this.oSearchField = new SearchField({
139
140
  liveChange: fnApplyFilterOnDropdown,
140
141
  search: fnApplyFilterOnDropdown,
141
- enabled:bIsEntitySearchable,
142
- initialFocus : true
143
- });
142
+ enabled: bIsEntitySearchable
143
+ });
144
144
 
145
145
  this._oPopoverDialog = new ResponsivePopover('',{
146
146
  placement: SapMLibrary.PlacementType.Bottom,
@@ -165,17 +165,14 @@ sap.ui.define(["sap/m/SegmentedButtonItem", "sap/m/Button", "sap/m/Text", "sap/m
165
165
  setDefaultFilter:function(mode) {
166
166
  var oTemplatePrivate = this.oState.oController.getOwnerComponent().getModel("_templPriv");
167
167
  oTemplatePrivate.setProperty('/alp/filterMode', mode);
168
- this.handleFilterSwitch(mode); // Don't want to trigger a mode change event, this will cause the data to be reloaded too earlier, the reload will happen when variants are processed
168
+ this.handleFilterSwitch(); // Don't want to trigger a mode change event, this will cause the data to be reloaded too earlier, the reload will happen when variants are processed
169
169
  },
170
170
  /**
171
171
  * press handler for filter switch button
172
172
  *
173
- * @param {string} mode - compact or visual
174
- * @param {boolean} bApplyingVariant - true is variant is being applied
175
- *
176
173
  * @returns {void}
177
174
  */
178
- handleFilterSwitch:function(mode, bApplyingVariant) {
175
+ handleFilterSwitch:function() {
179
176
  var oComponent = this.oState.oController.getOwnerComponent();
180
177
  var oTemplatePrivate = oComponent.getModel("_templPriv");
181
178
  var oModel = this.oState.alr_visualFilterBar && this.oState.alr_visualFilterBar.getModel();
@@ -55,7 +55,6 @@ sap.ui.define([
55
55
  _createForm: function() {
56
56
  // store as a string to parse later ad restore
57
57
  // since cloning via jquery extend is not working on json model
58
- this._searchTriggered = false;
59
58
  this._restoreTriggered = false;
60
59
  var oVisualFilterDialogModel = new JSONModel();
61
60
  var visualFilterBarConfigModel = this.oState.alr_visualFilterBar.getModel('_visualFilterConfigModel');
@@ -104,14 +103,6 @@ sap.ui.define([
104
103
  }
105
104
  },
106
105
 
107
- _searchDialog: function() {
108
- //only update the flag on search event and update visual filters on close of the dialog
109
- this._searchTriggered = true;
110
- if (this.bSearchPendingAfterDialogFilterChange) {
111
- this.bSearchPendingAfterDialogFilterChange = false;
112
- this.oState.oSmartFilterbar.search();
113
- }
114
- },
115
106
  /*
116
107
  called on go and save to update the filter bar with the changes made in dialog
117
108
  */
@@ -15,6 +15,9 @@ sap.ui.define(["sap/ui/base/Object",
15
15
  var oNavigationController;
16
16
  return /** @lends sap.suite.ui.generic.template.AnalyticalListPage.extensionAPI.ExtensionAPI.prototype */ {
17
17
  /**
18
+ * Generally, this method returns the currently selected contexts in the given ui element (table, chart, or list).
19
+ * In case the context menu is opened, it returns the contexts applicable to the context menu.
20
+ *
18
21
  * Get the list entries currently selected
19
22
  * @param {string} sUiElementId the id identifying the ui element the selected context is requested for
20
23
  * @return {sap.ui.model.Context[]} contains the entries selected
@@ -26,7 +29,13 @@ sap.ui.define(["sap/ui/base/Object",
26
29
  if (sUiElementId) {
27
30
  oControl = oController.byId(sUiElementId);
28
31
  }
29
- return oTemplateUtils.oServices.oPresentationControlHandlerFactory.getPresentationControlHandler(oTemplateUtils.oCommonUtils.getOwnerPresentationControl(oControl)).getSelectedContexts();
32
+ var oPresentationControl = oTemplateUtils.oCommonUtils.getOwnerPresentationControl(oControl);
33
+ // This focus info is added to state by sap.suite.ui.generic.template.lib.ContextMenuHandler when the context menu is opened
34
+ // If the state contains focus info, return the contexts applicable for context menu
35
+ if (oState.oFocusInfo && oState.oFocusInfo.smartControlId === oPresentationControl.getId()) {
36
+ return oState.oFocusInfo.applicableContexts;
37
+ }
38
+ return oTemplateUtils.oServices.oPresentationControlHandlerFactory.getPresentationControlHandler(oPresentationControl).getSelectedContexts();
30
39
  },
31
40
  /**
32
41
  * Triggers rebinding on the list
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.125.0"
11
+ "version": "1.126.0"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -67,7 +67,7 @@
67
67
  <template:then>
68
68
  <SegmentedButton
69
69
  id = "template::FilterSwitchButton"
70
- selectedKey="{_templPriv>/alp/filterMode}" width="inherit" visible="{_templPriv>/listReport/isHeaderExpanded}" select="._templateEventHandlers.onFilterModeSegmentedButtonChange">
70
+ selectedKey="{_templPriv>/alp/filterMode}" width="inherit" visible="{_templPriv>/listReport/isHeaderExpanded}" selectionChange="._templateEventHandlers.onFilterModeSegmentedButtonChange">
71
71
  <layoutData>
72
72
  <OverflowToolbarLayoutData priority="NeverOverflow"/>
73
73
  </layoutData>
@@ -1,7 +1,7 @@
1
1
  <core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core"
2
2
  xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1">
3
3
 
4
- <SegmentedButton selectedKey="{_templPriv>/alp/contentView}" select="._templateEventHandlers.onContentViewSegmentButtonPressed">
4
+ <SegmentedButton selectedKey="{_templPriv>/alp/contentView}" selectionChange="._templateEventHandlers.onContentViewSegmentButtonPressed">
5
5
  <items>
6
6
  <template:if test="{= !${device>/system/phone}}">
7
7
  <SegmentedButtonItem
@@ -20,10 +20,8 @@
20
20
  reset="{= (${parameter>/settings/hideVisualFilter} === false || ${parameter>/settings/hideVisualFilter} === undefined) ? '._templateEventHandlers.onRestore' : undefined}"
21
21
  filtersDialogClosed="{= (${parameter>/settings/hideVisualFilter} === false || ${parameter>/settings/hideVisualFilter} === undefined) ? '._templateEventHandlers.onDialogClosed' : undefined}"
22
22
  filtersDialogBeforeOpen="{= (${parameter>/settings/hideVisualFilter} === false || ${parameter>/settings/hideVisualFilter} === undefined) ? '._templateEventHandlers.onDialogOpened' : undefined}"
23
- filtersDialogSearch="{= (${parameter>/settings/hideVisualFilter} === false || ${parameter>/settings/hideVisualFilter} === undefined) ? '._templateEventHandlers.onDialogSearch' : undefined}"
24
23
  filtersDialogCancel="{= (${parameter>/settings/hideVisualFilter} === false || ${parameter>/settings/hideVisualFilter} === undefined) ? '._templateEventHandlers.onDialogCancel' : undefined}"
25
24
  clear="._templateEventHandlers.onDialogClear"
26
- filtersDialogSearchForFilters="{= (${parameter>/settings/hideVisualFilter} === false || ${parameter>/settings/hideVisualFilter} === undefined) ? '._templateEventHandlers.onSearchForFilters' : undefined}"
27
25
  useProvidedNavigationProperties="{= ${entityType>sap:semantics} === 'aggregate' }"
28
26
  >
29
27
  <smartfilterbarext:controlConfiguration>
@@ -32,7 +30,7 @@
32
30
  key="{controlConfigurationSetting>key}"
33
31
  groupId="{controlConfigurationSetting>groupId}"
34
32
  index="{controlConfigurationSetting>index}"
35
- visibleInFilterBar="{controlConfigurationSetting>visibleInFilterBar}"
33
+ visibleInAdvancedArea="{controlConfigurationSetting>visibleInAdvancedArea}"
36
34
  conditionType="{controlConfigurationSetting>conditionType}"
37
35
  historyEnabled="{controlConfigurationSetting>historyEnabled}"/>
38
36
  </template:repeat>
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.125.0"
11
+ "version": "1.126.0"
12
12
  },
13
13
  "title": "Canvas",
14
14
  "description": "Canvas Page",
@@ -23,9 +23,11 @@ sap.ui.define([
23
23
  "sap/m/table/Util",
24
24
  "sap/suite/ui/generic/template/genericUtilities/filterHelper",
25
25
  "sap/suite/ui/generic/template/js/AnnotationHelperHiddenTermSupport",
26
- "sap/m/IllustratedMessageType"
26
+ "sap/m/IllustratedMessageType",
27
+ "sap/ui/model/FilterOperator",
28
+ "sap/ui/core/message/MessageType"
27
29
  ], function (Filter, ExtensionAPI, listUtils, MessageStripHelper, IappStateHandler, MultipleViewsHandler,
28
- WorklistHandler, ShareUtils, controlHelper, FeLogger, testableHelper, ObjectPath, StableIdHelper, deepExtend, CreateWithDialogHandler, CtxMenuHandler, MultiEditHandler, SelectionVariant, InsightsHandler, filterSettingsPreparationHelper, TableUtil, filterHelper, AnnotationHelperHiddenTermSupport, IllustratedMessageType) {
30
+ WorklistHandler, ShareUtils, controlHelper, FeLogger, testableHelper, ObjectPath, StableIdHelper, deepExtend, CreateWithDialogHandler, CtxMenuHandler, MultiEditHandler, SelectionVariant, InsightsHandler, filterSettingsPreparationHelper, TableUtil, filterHelper, AnnotationHelperHiddenTermSupport, IllustratedMessageType, FilterOperator, MessageType) {
29
31
  "use strict";
30
32
 
31
33
  var oLogger = new FeLogger("ListReport.controller.ControllerImplementation").getLogger();
@@ -548,6 +550,8 @@ sap.ui.define([
548
550
 
549
551
  var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
550
552
 
553
+ oTemplatePrivateModel.setProperty("/listReport/aMissingNavProperties", false);
554
+
551
555
  oTemplatePrivateModel.setProperty("/generic/bDataAreShownInTable", false);
552
556
  //set a property for the state of LR table. At this state data have never been requested for LR table. Later once data is recieved for LR table we will set it to true.
553
557
  oTemplatePrivateModel.setProperty("/listReport/firstSelection", false);
@@ -705,6 +709,56 @@ sap.ui.define([
705
709
  // However, this connection is not there in the multi view multi table scenario which is the only case in which this snapshot
706
710
  // will be used later.
707
711
  var aFiltersFromRebindEvent = oBindingParams.filters.slice(0);
712
+ // To get the missing navigation properties rom the user variant
713
+ var oSmartFilterBarId = oState.oSmartFilterbar.getId();
714
+ var oSmartFilterBarWrapper = oTemplateUtils.oCommonUtils.getControlStateWrapperById(oSmartFilterBarId, "SmartFilterBar");
715
+ var aAddedFilters = oSmartFilterBarWrapper.getMissingNavProperties();
716
+ if (aAddedFilters.length) {
717
+ var aFilters = Object.keys(aAddedFilters).map(function(filterKey) {
718
+ return aAddedFilters[filterKey][0].keyField.replace('.', '/');
719
+ });
720
+ var sCurrentVariant = oState.oSmartFilterbar.getVariantManagement().getId();
721
+ var sCurrentVariantId = oState.oSmartFilterbar.getCurrentVariantId();
722
+ var oAllVariants = sap.ui.getCore().byId(sCurrentVariant).getAllVariants();
723
+ var oCurrentVariant = oAllVariants.find(function(variant) {
724
+ return variant.getId() === sCurrentVariantId;
725
+ });
726
+ var sCurrentVariantName = oCurrentVariant ? oCurrentVariant.mProperties.texts.variantName.value : '';
727
+ var oEntityType = oTemplateUtils.oCommonUtils.getMetaModelEntityType(oState.oSmartFilterbar.getEntitySet());
728
+ var aFilterNames = aFilters.reduce(function(acc, sFilter) {
729
+ var matchingProperties = oEntityType.property.filter(function(element) {
730
+ return element['sap:text'] && element['sap:text'].startsWith(sFilter);
731
+ });
732
+ matchingProperties.forEach(function(oProperty) {
733
+ if (oProperty) {
734
+ acc.push(oProperty.name);
735
+ }
736
+ });
737
+ return acc;
738
+ }, []).filter(Boolean);
739
+ var sMessage = oTemplateUtils.oCommonUtils.getText("MESSAGE_FILTER_NOT_AVAILABLE",[sCurrentVariantName,aFilterNames.join(", ")]);
740
+ var oMsg = {
741
+ message: sMessage,
742
+ type: MessageType.Warning
743
+ };
744
+ var sSelectedTabKey = oState.oMultipleViewsHandler.getSelectedKey();
745
+ this.extensionAPI.setCustomMessage(oMsg,sSelectedTabKey);
746
+ aAddedFilters.forEach(function (range) {
747
+ if (!range[0].exclude) {
748
+ var filter = new Filter({
749
+ aFilters: [
750
+ new Filter({
751
+ path: range[0].keyField.replace('.', '/'),
752
+ operator: FilterOperator[range[0].operation],
753
+ value1: range[0].value1
754
+ })
755
+ ],
756
+ bAnd: false
757
+ });
758
+ oBindingParams.filters.push(filter);
759
+ }
760
+ });
761
+ }
708
762
  oTemplateUtils.oCommonEventHandlers.onBeforeRebindTable(oEvent, {
709
763
  determineSortOrder: oState.oMultipleViewsHandler.determineSortOrder,
710
764
  ensureExtensionFields: oController.templateBaseExtension.ensureFieldsForSelect,
@@ -716,8 +770,7 @@ sap.ui.define([
716
770
  isPopinWithoutHeader: true,
717
771
  isDataFieldForActionRequired: true,
718
772
  isFieldControlsPathRequired: true,
719
- isMandatoryFiltersRequired: true,
720
- numberOfExpandedLevels: 1
773
+ isMandatoryFiltersRequired: true
721
774
  });
722
775
  oController.onBeforeRebindTableExtension(oEvent);
723
776
  var fnDataRequested = oBindingParams.events.dataRequested || Function.prototype;
@@ -887,6 +887,16 @@ sap.ui.define([
887
887
  // regarding a), while SFB takes care to set the data for standard filters (created via annotation), for others (extension filters, edit state filter, anything else that
888
888
  // should be controlled by VM (currently anything else we add to iAppState, but maybe that's only correct in case of page variant management)) we have to set it
889
889
  // (independent of the context).
890
+ if (sap.ui.getCore().getMessageManager().getMessageModel().oData.length) {
891
+ var removedMessages = [];
892
+ for (var i in sap.ui.getCore().getMessageManager().getMessageModel().oData) {
893
+ var msg = sap.ui.getCore().getMessageManager().getMessageModel().oData[i];
894
+ if (msg.persistent && oEvent.getParameters().context === undefined) {
895
+ removedMessages.push(msg);
896
+ }
897
+ }
898
+ sap.ui.getCore().getMessageManager().removeMessages(removedMessages);
899
+ }
890
900
  fnRestoreExtendedFilterDataOnAfterSFBVariantLoad(oEvent);
891
901
  }
892
902
 
@@ -171,4 +171,7 @@ CREATE_DIALOG_TITLE=New Object
171
171
  # YMSG,30: used in MessageBox after partial update.
172
172
  PARTIAL_UPDATE={0} of {1} objects updated.
173
173
 
174
+ # YMSG,150: used to show the applied filters which are no longer visible.
175
+ MESSAGE_FILTER_NOT_AVAILABLE=Filters have been applied to the current view \"{0}\" that are no longer visible: {1}. Contact your administrator to make the filters visible again.
176
+
174
177
  #---End of final block: texts to be redefined by the application ----------------------------------------
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.125.0"
11
+ "version": "1.126.0"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -24,7 +24,7 @@
24
24
  key="{controlConfigurationSetting>key}"
25
25
  groupId="{controlConfigurationSetting>groupId}"
26
26
  index="{controlConfigurationSetting>index}"
27
- visibleInFilterBar="{controlConfigurationSetting>visibleInFilterBar}"
27
+ visibleInAdvancedArea="{controlConfigurationSetting>visibleInAdvancedArea}"
28
28
  conditionType="{controlConfigurationSetting>conditionType}"
29
29
  historyEnabled="{controlConfigurationSetting>historyEnabled}"/>
30
30
  </template:repeat>
@@ -1,4 +1,4 @@
1
- <core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:smarttable="sap.ui.comp.smarttable" xmlns:table="sap.ui.table" xmlns:plugins="sap.m.plugins" xmlns:rowmodes="sap.ui.table.rowmodes"
1
+ <core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:smarttable="sap.ui.comp.smarttable" xmlns:table="sap.ui.table" xmlns:plugins="sap.m.plugins"
2
2
  xmlns:customData="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1"
3
3
  xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
4
4
  template:require="{
@@ -28,7 +28,7 @@
28
28
  showDetailsButton="{parameter>/templateSpecific/isResponsiveTable}"
29
29
  showFullScreenButton="{device>/system/phone}"
30
30
  detailsButtonSetting="{= ${parameter>/templateSpecific/isResponsiveTable} ? 'None,Low,Medium' : null}"
31
- enableExport="{= !${parameter>/settings/isWorklist} }"
31
+ useExportToExcel="{= !${parameter>/settings/isWorklist} }"
32
32
  smartVariant="{= (${parameter>/settings/smartVariantManagement} &amp;&amp; !${parameter>/settings/variantManagementHidden}) ? 'template::PageVariant' : null }"
33
33
  customData:p13nDialogSettings="{= (${parameter>/settings/smartVariantManagement} &amp;&amp; !${parameter>/settings/enableTableFilterInPageVariant} &amp;&amp; !${parameter>/settings/isWorklist}) ? '{filter:{visible:false}}' : '{filter:{visible:true}}'}"
34
34
  ignoreFromPersonalisation="{parts: [{path: 'entityType>com.sap.vocabularies.UI.v1.LineItem'}], formatter: 'AH.suppressP13NDuplicateColumns'}"
@@ -92,9 +92,10 @@
92
92
  <template:if test="{= ${tableSettings>type} === 'AnalyticalTable' }">
93
93
  <template:then>
94
94
  <table:AnalyticalTable id="{:= ${parameter>/stableId}.getStableId({type: 'ListReportTable', subType: 'AnalyticalTable', sQuickVariantKey: ${tabItem>key}})}"
95
+ visibleRowCountMode="Auto"
95
96
  showOverlay="{= ${_templPriv>/listReport/firstSelection} &amp;&amp; !${_templPriv>/generic/bDataAreShownInTable}}"
96
97
  class="{path: 'parameter>/settings/condensedTableLayout', formatter: 'AHListReport.setSizeCondensedCssClass'}"
97
- enableColumnReordering="true" showColumnVisibilityMenu="false"
98
+ enableColumnReordering="true"
98
99
  rowSelectionChange="._templateEventHandlers.onSelectionChange"
99
100
  beforeOpenContextMenu="._templateEventHandlers.beforeOpenContextMenu($event, '{smartControlId>id}')"
100
101
  enableColumnFreeze="true" enableCellFilter="true"
@@ -117,16 +118,16 @@
117
118
  </template:with>
118
119
  </table:columns>
119
120
  </template:with>
120
- <table:rowMode>
121
- <rowmodes:Auto/>
122
- </table:rowMode>
123
121
  </table:AnalyticalTable>
124
122
  </template:then>
125
123
  <!--Tree table implementation: Begins -->
126
124
  <template:elseif test="{= ${tableSettings>type} === 'TreeTable'}">
127
125
  <table:TreeTable id="{:= ${parameter>/stableId}.getStableId({type: 'ListReportTable', subType: 'TreeTable', sQuickVariantKey: ${tabItem>key}})}"
126
+ rootLevel="0"
127
+ visibleRowCountMode="Auto"
128
128
  showOverlay="{= ${_templPriv>/listReport/firstSelection} &amp;&amp; !${_templPriv>/generic/bDataAreShownInTable}}"
129
129
  class="{path: 'parameter>/settings/condensedTableLayout', formatter: 'AHListReport.setSizeCondensedCssClass'}"
130
+ expandFirstLevel="true"
130
131
  rowSelectionChange="._templateEventHandlers.onSelectionChange"
131
132
  beforeOpenContextMenu="._templateEventHandlers.beforeOpenContextMenu($event, '{smartControlId>id}')"
132
133
  rowActionCount="{parts: [{path: 'entitySet>'}, {path: 'parameter>/settings/subPages/'}, {path: 'parameter>/manifest/'}, {path: 'parameter>/settings/'}], formatter: 'AH.getRowActionCountForListReport'}">
@@ -148,17 +149,15 @@
148
149
  </template:with>
149
150
  </table:columns>
150
151
  </template:with>
151
- <table:rowMode>
152
- <rowmodes:Auto/>
153
- </table:rowMode>
154
152
  </table:TreeTable>
155
153
  </template:elseif>
156
154
  <!--Tree table implementation: Ends -->
157
155
  <template:elseif test="{= ${tableSettings>type} === 'GridTable' }">
158
156
  <table:Table id="{:= ${parameter>/stableId}.getStableId({type: 'ListReportTable', subType: 'GridTable', sQuickVariantKey: ${tabItem>key}})}"
157
+ visibleRowCountMode="Auto"
159
158
  showOverlay="{= ${_templPriv>/listReport/firstSelection} &amp;&amp; !${_templPriv>/generic/bDataAreShownInTable}}"
160
159
  class="{path: 'parameter>/settings/condensedTableLayout', formatter: 'AHListReport.setSizeCondensedCssClass'}"
161
- enableColumnReordering="true" showColumnVisibilityMenu="false"
160
+ enableColumnReordering="true"
162
161
  rowSelectionChange="._templateEventHandlers.onSelectionChange"
163
162
  beforeOpenContextMenu="._templateEventHandlers.beforeOpenContextMenu($event, '{smartControlId>id}')"
164
163
  enableColumnFreeze="true" enableCellFilter="true"
@@ -181,9 +180,6 @@
181
180
  </template:with>
182
181
  </table:columns>
183
182
  </template:with>
184
- <table:rowMode>
185
- <rowmodes:Auto/>
186
- </table:rowMode>
187
183
  </table:Table>
188
184
  </template:elseif>
189
185
  <template:else >
@@ -197,7 +197,8 @@ sap.ui.define(["sap/suite/ui/generic/template/lib/TemplateAssembler",
197
197
  // If EditFlow is display, the save and cancel stays in object page unless this property is set to true
198
198
  // If EditFlow is direct, the save and cancel moves to LR after action, unless this property is set to false
199
199
  // The default value of this property is undefined.
200
- "navToListOnSave": "boolean"
200
+ "navToListOnSave": "boolean",
201
+ "relatedAppsSettings": "object"
201
202
  },
202
203
  // app descriptor format
203
204
  "manifest": "json"
@@ -382,6 +382,8 @@ sap.ui.define([
382
382
  oBeforeSavePromise.then(function(){
383
383
  var oCRUDActionHandler = oTemplateUtils.oComponentUtils.getCRUDActionHandler();
384
384
  oCRUDActionHandler.handleCRUDScenario(iScenario, fnImpl);
385
+ }).catch(function(vError){
386
+ oLogger.info("Can't proceed with 'Save' as 'beforeSaveExtension' failed " + vError);
385
387
  });
386
388
  }, sButtonId);
387
389
  }
@@ -2513,8 +2515,7 @@ sap.ui.define([
2513
2515
  isPopinWithoutHeader: true,
2514
2516
  isDataFieldForActionRequired: true,
2515
2517
  isFieldControlsPathRequired: true,
2516
- isMandatoryFiltersRequired: true,
2517
- numberOfExpandedLevels: 0
2518
+ isMandatoryFiltersRequired: true
2518
2519
  });
2519
2520
  oController.onBeforeRebindTableExtension(oEvent);
2520
2521
  var fnRefresh = oBindingParams.events.refresh || Function.prototype;
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.125.0"
9
+ "version": "1.126.0"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -331,13 +331,21 @@ sap.ui.define([
331
331
  fnSetTargetEntity(oEntitySet);
332
332
 
333
333
  var bToolbarButtonVisible = fnGetTableToolbarButtonVisibility(oSettings, oEntitySet, oResult.type);
334
- var sPathforInsertRestriction = fnGetInsertRestrictionForPasteButton(oEntitySet);
334
+ var oPathforRestriction = fnGetRestrictionForPasteButton(oEntitySet);
335
335
  /* Workaround fix for non draft apps with no section settings defined in the manifest. In UI5v1.93, the export to excel button is displayed by default because of a code gap in
336
336
  FE which later got fixed with a change related to paste button in UI5v1.96 wherein the export button is not displayed by default. This looks like a regression issue to customers
337
337
  for which we have provided this temporary solution which shall get removed soon. */
338
338
  oResult.bExportToExcel = (!oComponentUtils.isDraftEnabled() && !oSettings.sections) || bToolbarButtonVisible;
339
- if (sPathforInsertRestriction) {
340
- oResult.vShowPasteButton = bToolbarButtonVisible ? "{= ${ui>/editable} && ${" + sPathforInsertRestriction + "}}" : false;
339
+ if (oPathforRestriction) {
340
+ var sPathforRestriction = "";
341
+ if (oPathforRestriction.insertable) {
342
+ sPathforRestriction = "${" + oPathforRestriction.insertable + "}";
343
+ }
344
+ if (oPathforRestriction.updatable) {
345
+ sPathforRestriction = sPathforRestriction ? sPathforRestriction + " || ${" + oPathforRestriction.updatable + "}" : "${" + oPathforRestriction.updatable + "}";
346
+ }
347
+ sPathforRestriction = sPathforRestriction && "(" + sPathforRestriction + ")";
348
+ oResult.vShowPasteButton = bToolbarButtonVisible ? "{= ${ui>/editable} && " + sPathforRestriction + "}" : false;
341
349
  } else {
342
350
  oResult.vShowPasteButton = bToolbarButtonVisible ? "{ui>/editable}" : false;
343
351
  }
@@ -348,21 +356,39 @@ sap.ui.define([
348
356
  return oResult;
349
357
  }
350
358
 
351
- function fnGetInsertRestrictionForPasteButton(oEntitySet) {
359
+ // fnGetRestrictionForPasteButton return object contains updatable and insertable restriction for the given Entity Set.
360
+ function fnGetRestrictionForPasteButton(oEntitySet) {
352
361
  var oLeadingEntitySet = oMetaModel.getODataEntitySet(sLeadingEntitySet);
353
- var oInsertableAnnotation, oSectionInsertRestriction;
354
- var oRestrictionSetViaNavRestrictions = AnnotationHelper.handleNavigationRestrictions(oMetaModel, oLeadingEntitySet, oEntitySet, 'Insertable');
355
- if (oRestrictionSetViaNavRestrictions) {
356
- oInsertableAnnotation = oRestrictionSetViaNavRestrictions['Insertable'];
362
+ var oInsertableAnnotation, oUpdatableAnnotation;
363
+
364
+ var oInsertRestrictionSetViaNavRestrictions = AnnotationHelper.handleNavigationRestrictions(oMetaModel, oLeadingEntitySet, oEntitySet, 'Insertable');
365
+ if (oInsertRestrictionSetViaNavRestrictions) {
366
+ oInsertableAnnotation = oInsertRestrictionSetViaNavRestrictions['Insertable'];
357
367
  } else {
358
- oSectionInsertRestriction = oEntitySet['Org.OData.Capabilities.V1.InsertRestrictions'];
368
+ var oSectionInsertRestriction = oEntitySet['Org.OData.Capabilities.V1.InsertRestrictions'];
359
369
  oInsertableAnnotation = oSectionInsertRestriction && oSectionInsertRestriction['Insertable'];
360
370
  }
361
- if (oInsertableAnnotation && oInsertableAnnotation.Path) {
362
- return oInsertableAnnotation.Path;
371
+
372
+ var oUpdateRestrictionSetViaNavRestrictions = AnnotationHelper.handleNavigationRestrictions(oMetaModel, oLeadingEntitySet, oEntitySet, 'Updatable');
373
+ if (oUpdateRestrictionSetViaNavRestrictions) {
374
+ oUpdatableAnnotation = oUpdateRestrictionSetViaNavRestrictions['Updatable'];
375
+ } else {
376
+ var oSectionUpdatableRestriction = oEntitySet['Org.OData.Capabilities.V1.UpdateRestrictions'];
377
+ oUpdatableAnnotation = oSectionUpdatableRestriction && oSectionUpdatableRestriction['Updatable'];
378
+ }
379
+
380
+ var sInsertablePath = oInsertableAnnotation ? oInsertableAnnotation.Path : "";
381
+ var sUpdatablePath = oUpdatableAnnotation ? oUpdatableAnnotation.Path : "";
382
+
383
+ if (sInsertablePath || sUpdatablePath) {
384
+ return {
385
+ insertable: sInsertablePath,
386
+ updatable: sUpdatablePath
387
+ };
363
388
  }
364
- return false;
389
+ return null;
365
390
  }
391
+
366
392
  // used in the process of determining the visibility of export to excel and paste button depending on certain restrictions/conditions.
367
393
  function fnGetTableToolbarButtonVisibility(oSettings, oEntitySet, sTableType) {
368
394
  var oInsertableAnnotation, sEntityType, oSectionInsertRestriction;
@@ -115,8 +115,10 @@
115
115
  </uxap:ObjectPageDynamicHeaderTitle>
116
116
  </template:then>
117
117
  <template:else>
118
+ <!-- The formatter 'sap/suite/ui/generic/template/js/formatters/formatImageUrl' is used by 'AH.formatHeaderImage' -->
118
119
  <uxap:ObjectPageHeader
119
120
  id="objectPageHeader"
121
+ core:require="{formatImageUrl: 'sap/suite/ui/generic/template/js/formatters/formatImageUrl'}"
120
122
  objectTitle="{_templPriv>/objectPage/headerInfo/objectTitle}"
121
123
  objectSubtitle="{_templPriv>/objectPage/headerInfo/objectSubtitle}"
122
124
  objectImageURI="{parts:[{path: 'entityType>com.sap.vocabularies.UI.v1.HeaderInfo'}, {path: 'parameter>/appComponentName'}], formatter: 'AH.formatHeaderImage'}"
@@ -299,6 +299,17 @@
299
299
  beforeNavigationCallback="._templateEventHandlers.onBeforeSemanticObjectLinkNavigationCallback"
300
300
  forceLinkRendering="{parts: [{path: 'entitySet>'},{path: 'parameter>/templateSpecific/targetEntities'}], formatter: 'AH.hasQuickViewFacet'}"/>
301
301
  </sfi:semanticObjectController>
302
+ <template:if test="{= ${dataPoint>Criticality} }">
303
+ <sfi:controlProposal>
304
+ <sfi:ControlProposal>
305
+ <sfi:objectStatus>
306
+ <sfi:ObjectStatus
307
+ criticality="{path: 'dataPoint>Criticality', formatter: 'AHModel.simplePath'}"
308
+ criticalityRepresentationType="WithoutIcon"/>
309
+ </sfi:objectStatus>
310
+ </sfi:ControlProposal>
311
+ </sfi:controlProposal>
312
+ </template:if>
302
313
  </sfi:SmartField>
303
314
  </l:VerticalLayout>
304
315
  </template:else>