@sapui5/sap.suite.ui.generic.template 1.138.1 → 1.139.1

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 (85) hide show
  1. package/package.json +2 -3
  2. package/src/sap/suite/ui/generic/template/.library +1 -1
  3. package/src/sap/suite/ui/generic/template/AnalyticalListPage/Component.js +0 -7
  4. package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/visualfilterbar/SmartVisualFilterBar.js +5 -2
  5. package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/visualfilterbar/VisualFilterProvider.js +5 -6
  6. package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/ControllerImplementation.js +2 -13
  7. package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/DropDownController.js +3 -1
  8. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n.properties +0 -3
  9. package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
  10. package/src/sap/suite/ui/generic/template/AnalyticalListPage/util/AnnotationHelper.js +0 -9
  11. package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/fragments/ContentContainer.fragment.xml +0 -7
  12. package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/fragments/ContentViewButtons.fragment.xml +0 -6
  13. package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
  14. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en_US_saprigi.properties +2 -0
  15. package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
  16. package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +5 -3
  17. package/src/sap/suite/ui/generic/template/ObjectPage/controller/MessageSortingHandler.js +51 -49
  18. package/src/sap/suite/ui/generic/template/ObjectPage/controller/MultipleViewsHandler.js +1 -1
  19. package/src/sap/suite/ui/generic/template/ObjectPage/controller/SectionTitleHandler.js +17 -13
  20. package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
  21. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/Actions.fragment.xml +2 -1
  22. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/SmartForm.fragment.xml +2 -1
  23. package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
  24. package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
  25. package/src/sap/suite/ui/generic/template/genericUtilities/controlHelper.js +4 -2
  26. package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartTableChartCommon.js +4 -1
  27. package/src/sap/suite/ui/generic/template/js/AnnotationHelper.js +106 -15
  28. package/src/sap/suite/ui/generic/template/lib/AdaptiveCardHelper.js +2 -2
  29. package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
  30. package/src/sap/suite/ui/generic/template/lib/Application.js +2 -2
  31. package/src/sap/suite/ui/generic/template/lib/CRUDManager.js +1 -1
  32. package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +16 -12
  33. package/src/sap/suite/ui/generic/template/lib/CommonUtils.js +1 -2
  34. package/src/sap/suite/ui/generic/template/lib/ContactCardDetailHelper.js +1 -1
  35. package/src/sap/suite/ui/generic/template/lib/ContextBookkeeping.js +3 -6
  36. package/src/sap/suite/ui/generic/template/lib/ContextMenuHandler.js +16 -2
  37. package/src/sap/suite/ui/generic/template/lib/FlexibleColumnLayoutHandler.js +3 -1
  38. package/src/sap/suite/ui/generic/template/lib/SideEffectUtil.js +3 -4
  39. package/src/sap/suite/ui/generic/template/lib/StatePreserver.js +1 -1
  40. package/src/sap/suite/ui/generic/template/lib/ViewDependencyHelper.js +7 -2
  41. package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterBarHandler.js +48 -193
  42. package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterDataFetcherHelper.js +334 -0
  43. package/src/sap/suite/ui/generic/template/lib/filterHelper.js +5 -7
  44. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saprigi.properties +108 -1
  45. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_id.properties +1 -1
  46. package/src/sap/suite/ui/generic/template/lib/insights/InsightsHandler.js +1 -2
  47. package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +26 -19
  48. package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartTableHandler.js +5 -3
  49. package/src/sap/suite/ui/generic/template/library.js +1 -1
  50. package/src/sap/suite/ui/generic/template/listTemplates/controller/DetailController.js +6 -2
  51. package/src/sap/suite/ui/generic/template/listTemplates/controller/IappStateHandler.js +1 -1
  52. package/src/sap/suite/ui/generic/template/listTemplates/controller/ToolbarController.js +2 -10
  53. package/src/sap/suite/ui/generic/template/listTemplates/semanticDateRangeTypeHelper.js +1 -1
  54. package/src/sap/suite/ui/generic/template/themes/base/ALPConstants.less +14 -14
  55. package/src/sap/suite/ui/generic/template/themes/sap_belize_base/ALPConstants.less +14 -14
  56. package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/ALPConstants.less +14 -14
  57. package/src/sap/suite/ui/generic/template/themes/sap_hcb/ALPConstants.less +14 -14
  58. package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/AnalyticGridController.js +0 -38
  59. package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/alr_readme.txt +0 -23
  60. package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/crosstab_library.css +0 -20
  61. package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/img/readme.txt +0 -4
  62. package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/img/sort_asc.gif +0 -0
  63. package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/img/sort_desc.gif +0 -0
  64. package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/img/sort_none.gif +0 -0
  65. package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/img/treenode_collapse.gif +0 -0
  66. package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/img/treenode_expand.gif +0 -0
  67. package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/fragments/AnalyticGrid.fragment.xml +0 -21
  68. package/src/sap/suite/ui/generic/template/themes/base/alr_zen.css +0 -127
  69. package/src/sap/suite/ui/generic/template/themes/base/crosstab_library.css +0 -20
  70. package/src/sap/suite/ui/generic/template/themes/base/img/readme.txt +0 -4
  71. package/src/sap/suite/ui/generic/template/themes/base/img/sort_asc.gif +0 -0
  72. package/src/sap/suite/ui/generic/template/themes/base/img/sort_desc.gif +0 -0
  73. package/src/sap/suite/ui/generic/template/themes/base/img/sort_none.gif +0 -0
  74. package/src/sap/suite/ui/generic/template/themes/base/img/treenode_collapse.gif +0 -0
  75. package/src/sap/suite/ui/generic/template/themes/base/img/treenode_expand.gif +0 -0
  76. package/src/sap/suite/ui/generic/template/themes/sap_belize_base/alr_zen.css +0 -136
  77. package/src/sap/suite/ui/generic/template/themes/sap_belize_base/crosstab_library.css +0 -20
  78. package/src/sap/suite/ui/generic/template/themes/sap_belize_base/img/readme.txt +0 -4
  79. package/src/sap/suite/ui/generic/template/themes/sap_belize_base/img/sort_asc.gif +0 -0
  80. package/src/sap/suite/ui/generic/template/themes/sap_belize_base/img/sort_desc.gif +0 -0
  81. package/src/sap/suite/ui/generic/template/themes/sap_belize_base/img/sort_none.gif +0 -0
  82. package/src/sap/suite/ui/generic/template/themes/sap_belize_base/img/treenode_collapse.gif +0 -0
  83. package/src/sap/suite/ui/generic/template/themes/sap_belize_base/img/treenode_expand.gif +0 -0
  84. package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/alr_zen.css +0 -136
  85. package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/crosstab_library.css +0 -20
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.suite.ui.generic.template",
3
- "version": "1.138.1",
3
+ "version": "1.139.1",
4
4
  "description": "SAPUI5 Library sap.suite.ui.generic.template",
5
5
  "keywords": [
6
6
  "sapui5",
@@ -10,13 +10,12 @@
10
10
  "license": "SEE LICENSE IN LICENSE.txt",
11
11
  "author": "SAP SE (https://www.sap.com)",
12
12
  "scripts": {
13
- "sonar": "sonar-scanner",
13
+
14
14
  "test": "echo \"Error: no test specified\" && exit 1",
15
15
  "start" : "ui5 serve --config ./ui5-local.yaml --open \"/test-resources/sap/suite/ui/generic/template/demokit/flpSandbox.html?sap-ui-theme=sap_horizon#Shell-home\"",
16
16
  "testsuite-qunit" : "ui5 serve --config ./ui5-local.yaml --open \"/test-resources/sap/suite/ui/generic/template/qunit/testsuite.qunit.html\""
17
17
  },
18
18
  "devDependencies": {
19
- "sonarqube-scanner": "3.5.0",
20
19
  "@sap/ux-ui5-tooling": "latest"
21
20
  }
22
21
  }
@@ -7,7 +7,7 @@
7
7
 
8
8
  (c) Copyright 2009-2015 SAP SE. All rights reserved
9
9
  </copyright>
10
- <version>1.138.1</version>
10
+ <version>1.139.1</version>
11
11
 
12
12
  <documentation>Library with generic Suite UI templates.</documentation>
13
13
 
@@ -608,13 +608,6 @@ sap.ui.define(["sap/ui/core/mvc/OverrideExecution",
608
608
  "type": "boolean",
609
609
  "defaultValue": false
610
610
  },
611
- "dshQueryName" : {
612
- /*
613
- Setting to enable DSH crosstable
614
- */
615
- "type" : "string",
616
- "defaultValue": undefined
617
- },
618
611
  "filterDefaultsFromSelectionVariant" : {
619
612
  /*
620
613
  This setting allows developer to choose SV from annotation
@@ -129,8 +129,11 @@ sap.ui.define([
129
129
  var bIsCozyMode = document.body.classList.contains("sapUiSizeCozy"); // Default settings
130
130
  //TODO: Get this through CSS rather than hard coding
131
131
  this._cellItemHeightNorth = bIsCozyMode ? "3rem" : "2rem";
132
- this._cellItemHeightSouth = bIsCozyMode ? "9.9rem" : "7.5rem";
133
- Device.system.phone ? this._cellItemHeightSouth = "9rem" : "";
132
+ if (Device.system.phone) {
133
+ this._cellItemHeightSouth = "9rem";
134
+ } else {
135
+ this._cellItemHeightSouth = bIsCozyMode ? "9.9rem" : "7.5rem";
136
+ }
134
137
  this._cellHeight = bIsCozyMode ? "12rem" : "11rem";
135
138
  this._cellWidth = "20rem";
136
139
  this.labelHeight = 2.0;
@@ -248,14 +248,13 @@ sap.ui.define([
248
248
  var entityType = metaModel.getODataEntityType(entityTypePath);
249
249
  var allProps = context._oMetadataAnalyser.getFieldsByEntityTypeName(entityTypePath);
250
250
 
251
- for (var key in allProps) {
252
-
253
- if (allProps[key].name === dimension) {
254
- var prop = metaModel.getODataProperty(entityType, allProps[key].name);
251
+ for (var oCurrentProp of allProps) {
255
252
 
253
+ if (oCurrentProp.name === dimension) {
254
+ var prop = metaModel.getODataProperty(entityType, oCurrentProp.name);
256
255
  fieldList.push({ // Dimension definition
257
- name: allProps[key].name,
258
- fieldInfo: allProps[key],
256
+ name: oCurrentProp.name,
257
+ fieldInfo: oCurrentProp,
259
258
  propInfo: prop
260
259
  });
261
260
  //dimMap[allProps[key].name] = dim;
@@ -4,7 +4,6 @@ sap.ui.define(["sap/fe/navigation/SelectionVariant",
4
4
  "sap/suite/ui/generic/template/listTemplates/controller/ToolbarController",
5
5
  "sap/suite/ui/generic/template/AnalyticalListPage/controller/VisualFilterBarController",
6
6
  "sap/suite/ui/generic/template/AnalyticalListPage/controller/VisualFilterDialogController",
7
- "sap/suite/ui/generic/template/AnalyticalListPage/controller/AnalyticGridController",
8
7
  "sap/ui/table/AnalyticalTable",
9
8
  "sap/ui/model/odata/AnnotationHelper",
10
9
  "sap/ui/model/analytics/odata4analytics",
@@ -31,7 +30,7 @@ sap.ui.define(["sap/fe/navigation/SelectionVariant",
31
30
  "sap/suite/ui/generic/template/js/AnnotationHelperHiddenTermSupport",
32
31
  "sap/suite/ui/generic/template/AnalyticalListPage/controller/CtxMenuHandler"
33
32
  ], function(SelectionVariant, ExtensionAPI,
34
- FilterBarController, ToolbarController, VisualFilterBarController, VisualFilterDialogController, AnalyticGridController, AnalyticalTable,
33
+ FilterBarController, ToolbarController, VisualFilterBarController, VisualFilterDialogController, AnalyticalTable,
35
34
  ODataAnnotationHelper, Analytics, ContentAreaController, IappStateHandler, Device, SegmentedButtonItem, ALPHelper, controlHelper, FeLogger,
36
35
  ObjectPath, ShareUtils, merge, deepExtend, ListUtils, MultipleViewsHandler, StableIdHelper, MessageStripHelper, JSONModel, PersonalizationControllerUtil,
37
36
  InsightsHandler, metadataAnalyser, filterHelper, AnnotationHelperHiddenTermSupport, CtxMenuHandler) {
@@ -386,11 +385,7 @@ sap.ui.define(["sap/fe/navigation/SelectionVariant",
386
385
  var oMultipleViewsHandler = new MultipleViewsHandler(oState, oController, oTemplateUtils);
387
386
  oState.oMultipleViewsHandler = oMultipleViewsHandler;
388
387
  oState.oMessageStripHelper = new MessageStripHelper(oTemplateUtils.oServices.oPresentationControlHandlerFactory.getPresentationControlHandler(oState.oSmartTable), oMultipleViewsHandler, oController, oTemplateUtils, "alp");
389
- if (oController.getOwnerComponent().getProperty("dshQueryName")) {
390
- oState.oAnalyticGridContainer = oController.byId("template::AnalyticGridContainer");
391
- oState.oAnalyticGridController = new AnalyticGridController();
392
- oState.oAnalyticGridController.setState(oState);
393
- }
388
+
394
389
  oState.alr_compactFilterContainer = oController.byId("template::CompactFilterContainer");
395
390
  oState.alr_visualFilterContainer = oController.byId("template::VisualFilterContainer");
396
391
  oState.alr_filterContainer = oController.byId("template::FilterContainer");
@@ -1075,13 +1070,7 @@ sap.ui.define(["sap/fe/navigation/SelectionVariant",
1075
1070
  oState.filterBarController.fnCheckMandatory();
1076
1071
  },
1077
1072
  onContentViewSegmentButtonPressed: function(oEvent){
1078
- //todo: check if DSH loads if the default filter mode is crosstable
1079
- //ideally we can init DSH post GO button press
1080
1073
  var sSelectedKey = oEvent.getSource().getSelectedKey();
1081
-
1082
- if (sSelectedKey === "crosstable" && !oState.oAnalyticGrid) {
1083
- oState.oAnalyticGridController.initAnalyticGrid();
1084
- }
1085
1074
 
1086
1075
  if ((sSelectedKey === "table" || sSelectedKey === "charttable") && bTableRebindRequired) {
1087
1076
  oState.oSmartTable.rebindTable();
@@ -295,7 +295,9 @@ sap.ui.define([
295
295
  });
296
296
  var aSelectedParts = sfb.isDialogOpen() ? ["_dialogFilter>/" + oChart.getParentProperty(), property.dimensionField] : ["_filter>/" + oChart.getParentProperty(), property.dimensionField];
297
297
  // send unit field part to the formatter only if unitField is present
298
- property.unitField ? aDescriptionBindingParts.push({ path : property.unitField }) : "" ;
298
+ if (property.unitField) {
299
+ aDescriptionBindingParts.push({ path: property.unitField });
300
+ }
299
301
  var template = new StandardListItem({
300
302
  title: {
301
303
  parts: [property.dimensionFieldDisplay, property.dimensionField],
@@ -169,9 +169,6 @@ CONTAINER_VIEW_CHART=Chart View
169
169
  # XBUT,50: tooltip for chart view
170
170
  CONTAINER_VIEW_CHARTTABLE=Chart and Table View
171
171
 
172
- # XBUT,50: tooltip for crosstab view
173
- CONTAINER_VIEW_CROSSTAB=Crosstable View
174
-
175
172
  # XBUT,50: tooltip for filter switch
176
173
  FILTER_VISUAL=Visual Filter
177
174
 
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.138.1"
11
+ "version": "1.139.1"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -348,15 +348,6 @@ sap.ui.define(["sap/ui/base/Object",
348
348
  oModel.setProperty("/kpiContext", kpiContext);
349
349
  return "/kpiContext";
350
350
  };
351
- oAnnotationHelper.generateKPIToolbarId = function(oKPIs) {
352
- for (var item = 0; Object.keys(oKPIs).length; item++) {
353
- if (oKPIs[Object.keys(oKPIs)[item]]["filterable"]) {
354
- return "template::KPITagContainer::filterableKPIs";
355
- } else {
356
- return "template::KPITagContainer::globalKPIs";
357
- }
358
- }
359
- };
360
351
  oAnnotationHelper.generateKPITagID = function(oKPI) {
361
352
  return "template::KPITag::" + oKPI.model + "::" + oKPI.qualifier;
362
353
  };
@@ -48,13 +48,6 @@
48
48
  </VBox>
49
49
  </template:then>
50
50
  </template:if>
51
- <template:if test="{= ${parameter>/settings/dshQueryName} !== undefined }">
52
- <template:then>
53
- <VBox class="sapSmartTemplatesAnalyticalListPageMasterExtension" visible="{= ${_templPriv>/alp/contentView} === 'crosstable'}">
54
- <core:Fragment fragmentName="sap.suite.ui.generic.template.AnalyticalListPage.view.fragments.AnalyticGrid" type="XML" />
55
- </VBox>
56
- </template:then>
57
- </template:if>
58
51
  </template:else>
59
52
  </template:if>
60
53
  </VBox>
@@ -27,12 +27,6 @@
27
27
  key="customview2"
28
28
  icon="{alpCustomModel>/icon/customview2}"/>
29
29
  </template:if>
30
- <template:if test="{= ${parameter>/settings/dshQueryName} !== undefined }">
31
- <SegmentedButtonItem
32
- tooltip="{i18n>CONTAINER_VIEW_CROSSTAB}"
33
- key="crosstable"
34
- icon="sap-icon://grid" />
35
- </template:if>
36
30
  <SegmentedButtonItem
37
31
  tooltip="{i18n>CONTAINER_VIEW_TABLE}"
38
32
  key="table"
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.138.1"
11
+ "version": "1.139.1"
12
12
  },
13
13
  "title": "Canvas",
14
14
  "description": "Canvas Page",
@@ -63,6 +63,8 @@ OBJECT_NOT_EDITABLE=\u206A\u206A\u206A\u200C\u200D\u200B\u200B\u200C\u200D\u200D
63
63
 
64
64
  NODATA_SMARTTABLE_LR=\u206A\u206A\u206A\u200C\u200C\u200B\u200D\u200B\u200B\u200C\u200D\u200D\u200C\u200B\u200D\u200B\u200B\u200D\u200C\u200C\u200B\u200D\u200C\u200B\u200B\u200C\u200D\u200B\u200B\u200B\u200D\u200D\u200D\u200B\u200B\u200D\u200B\u200D\u200B\u200C\u200C\u200B\u200B\u200C\u206ATo start, set the relevant filters and choose "Go".\u206A\u206A
65
65
 
66
+ SEARCH_FILTERS_KEYBOARD_SHORTCUT_DESC=\u206A\u206A\u206A\u200D\u200B\u200B\u200C\u200B\u200C\u200B\u200B\u200B\u200B\u200D\u200B\u200B\u200D\u200C\u200B\u200C\u200C\u200D\u200D\u200D\u200C\u200B\u200C\u200D\u200C\u200B\u200C\u200D\u200B\u200D\u200C\u200C\u200C\u200B\u200D\u200C\u200B\u200C\u206AGo\u206A\u206A
67
+
66
68
 
67
69
  CANCEL_AND_DISCARD=\u206A\u206A\u206A\u200D\u200C\u200B\u200D\u200B\u200B\u200C\u200B\u200B\u200B\u200D\u200D\u200D\u200D\u200C\u200D\u200B\u200B\u200C\u200D\u200D\u200C\u200C\u200B\u200B\u200D\u200D\u200D\u200C\u200B\u200D\u200B\u200D\u200B\u200C\u200D\u200D\u200B\u200D\u200B\u206ADo you want to discard this draft?\u206A\u206A
68
70
 
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.138.1"
11
+ "version": "1.139.1"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -1342,8 +1342,9 @@ sap.ui.define([
1342
1342
  return true;
1343
1343
  }
1344
1344
  });
1345
- for (var iPosition = iStartPosition + iDirection; iPosition !== iStartPosition; iPosition = iPosition + iDirection){
1346
- if (iPosition < 0){
1345
+ var iPosition = iStartPosition + iDirection;
1346
+ while (iPosition !== iStartPosition) {
1347
+ if (iPosition < 0) {
1347
1348
  iPosition = aSections.length;
1348
1349
  } else if (iPosition >= aSections.length){
1349
1350
  iPosition = -1;
@@ -1365,6 +1366,7 @@ sap.ui.define([
1365
1366
  }
1366
1367
  }
1367
1368
  }
1369
+ iPosition += iDirection;
1368
1370
  }
1369
1371
  }
1370
1372
 
@@ -1936,7 +1938,7 @@ sap.ui.define([
1936
1938
  oState.oSectionTitleHandler.adjustSubSectionTitle(oSubSection);
1937
1939
  // Add accessible name to the SmartForm in the first subsection if all titles are hidden, because accessible name will not propogate to the form control
1938
1940
  oState.oSectionTitleHandler.addAccessibleName(oSubSection);
1939
- oState.oSectionTitleHandler.manageAccessability(oSubSection);
1941
+ oState.oSectionTitleHandler.setHeaderSmartFormAriaLabelBy(oSubSection);
1940
1942
  }
1941
1943
  }
1942
1944
 
@@ -16,13 +16,13 @@ sap.ui.define([
16
16
  // The MessageDialog (used for transient messages) is (yet) not using this class.
17
17
  function getMethods(oController, oTemplateUtils, oObjectPage) {
18
18
  var fnHeartBeat = Function.prototype; // A function that is called when new subtitle information is available. Will be set to a more specific function below.
19
-
19
+
20
20
  var mMessageToPlacementInfo; // Cache for message placement infos (see function getMessagePlacementInfo)
21
-
21
+
22
22
  var mTableIdToTableInfo; // Cache for table infos (see function getTableInfo). Will be filled for all tables which relate to at least one message.
23
23
 
24
24
  var iResortingId; // an id representing a resorting which is already planned for asynchronous execution. Initial if no such resorting is planned.
25
-
25
+
26
26
  function fnReset(){ // remove all collected information and prepare to collect new one. Also used for initialization.
27
27
  mMessageToPlacementInfo = Object.create(null);
28
28
  if (mTableIdToTableInfo){
@@ -31,13 +31,13 @@ sap.ui.define([
31
31
  oTableInfo.destroy();
32
32
  }
33
33
  }
34
- mTableIdToTableInfo = Object.create(null);
34
+ mTableIdToTableInfo = Object.create(null);
35
35
  }
36
36
 
37
37
  // adds the following attributes to oPlacementInfo: controlId, pathToControlId, groupers, getItemBindingPath (see getMessagePlacementInfo() below)
38
38
  // Thereby aCandidates is the list of controlIds which should be considered.
39
39
  function addControlIdToPlacementInfo(aCandidates, oPlacementInfo){
40
- var mChildToParent = Object.create(null); // helper map that maps each relevant control id to the parent control. Will be filled as a bonus via onElementVisited while executing getPositionableControlId to find the target control for the message
40
+ var mChildToParent = Object.create(null); // helper map that maps each relevant control id to the parent control. Will be filled as a bonus via onElementVisited while executing getPositionableControlId to find the target control for the message
41
41
  var onElementVisited = function (sElementId, oControl, oChild) { // will be called for sElementId being a member of aControlIds and oControl being one of its ancestors, oChild is a child of oControl and was visited previously
42
42
  if (oChild) {
43
43
  mChildToParent[oChild.getId()] = oControl;
@@ -46,13 +46,13 @@ sap.ui.define([
46
46
  oPlacementInfo.controlId = oTemplateUtils.oCommonUtils.getPositionableControlId(aCandidates, true, onElementVisited); // Now we have decided which controlId we want to use for sorting and placing of this message. Note that this entry might be faulty
47
47
  var aPathToControlId = []; // an array of strings starting with the id of the identified control and ending at the view id. Thereby the array steps up the control hierarchy step by step.
48
48
  var oSection, oTable; // will be set to be the section and table the message belongs to (if such controls can be identified)
49
- // fill aPathToControlId and determine oSection and oTable if possible. This is done by following the child-parent relationship given by mChildToParent starting from oPlacementInfo.controlId.
49
+ // fill aPathToControlId and determine oSection and oTable if possible. This is done by following the child-parent relationship given by mChildToParent starting from oPlacementInfo.controlId.
50
50
  var sControlId;
51
51
  for (var oControl = oPlacementInfo.controlId && controlHelper.byId(oPlacementInfo.controlId); oControl; oControl = mChildToParent[sControlId]){
52
52
  sControlId = oControl.getId();
53
53
  aPathToControlId.push(sControlId);
54
54
  oSection = oSection || (controlHelper.isObjectPageSection(oControl) && oControl);
55
- oTable = oTable || (controlHelper.isSmartTable(oControl) && oControl);
55
+ oTable = oTable || (controlHelper.isSmartTable(oControl) && oControl);
56
56
  }
57
57
  aPathToControlId.reverse(); // reverse the order in the path. Now it has the right order for property pathToControlId of the placement info
58
58
  oPlacementInfo.pathToControlId = aPathToControlId;
@@ -88,9 +88,9 @@ sap.ui.define([
88
88
  }
89
89
  } else {
90
90
  oPlacementInfo.getItemBindingPath = Function.prototype;
91
- }
91
+ }
92
92
  }
93
-
93
+
94
94
  // This function retrieves placement info for a message on the object page. The placement info is an object possessing the following properties:
95
95
  // - message -> the message
96
96
  // - controlIds -> maps the control ids which are currently considered for the message to the corresponding control.
@@ -132,11 +132,11 @@ sap.ui.define([
132
132
  controlIds: mControlIds
133
133
  };
134
134
  addControlIdToPlacementInfo(oMessage.controlIds, oRet); // add the missing attributes to oRet
135
- mMessageToPlacementInfo[sMsgId] = oRet; // add to the cash
135
+ mMessageToPlacementInfo[sMsgId] = oRet; // add to the cash
136
136
  }
137
137
  return oRet;
138
138
  }
139
-
139
+
140
140
  // This function retrieves table info for a SmartTable on the object page. The table info is an object possessing the following properties:
141
141
  // - table -> the corresponding SmartTable
142
142
  // - presentationControlHandler -> the corresponding instance of sap.suite.ui.generic.template.lib.presentationControl.SmartTableHandler
@@ -147,19 +147,19 @@ sap.ui.define([
147
147
  // ~ rowIdentifier -> The human readable identification of the row the message relates to
148
148
  // ~ columnInfo -> Information about the column the message relates to (resp. a faulty value, if no such column could be identified)
149
149
  // More precisely, this is an object containing properties 'label' (string identifying the column) and 'hidden' (boolean informing whether the column is hidden)
150
- // This information is set (maybe asynchronously) by addContextInfoToMessageToMsgInTableInfo resp. getDetailsRetrievedPromise.
150
+ // This information is set (maybe asynchronously) by addContextInfoToMessageToMsgInTableInfo resp. getDetailsRetrievedPromise.
151
151
  // - tableLoaded -> a Promise which is resolved when the table has finished loading its data and the data which have been loaded have
152
152
  // been used to update the content of the messageToMsgInTableInfo property
153
153
  // - destroy -> a destroy function for this instance
154
154
  // - columnInfo -> a map (created on demand) mapping paths that represent columns to the columnInfo as described above
155
155
  // Note that mTableIdToTableInfo is used as a cash.
156
- // Moreover, note that this function returns a faulty value if the table does not possess a binding. However, this information is not cached.
156
+ // Moreover, note that this function returns a faulty value if the table does not possess a binding. However, this information is not cached.
157
157
  function getTableInfo(oTable){
158
158
  var sTableId = oTable.getId();
159
159
  var oRet = mTableIdToTableInfo[sTableId];
160
160
  if (!oRet){
161
161
  oRet = createTableInfo(oTable);
162
- mTableIdToTableInfo[sTableId] = oRet;
162
+ mTableIdToTableInfo[sTableId] = oRet;
163
163
  }
164
164
  return oRet;
165
165
  }
@@ -167,7 +167,7 @@ sap.ui.define([
167
167
  // returns the string which is used to identify a row (specified by oContext) within a SmartTable (specified by its PresentationControlHandler)
168
168
  function getRowIdentifier(oPresentationControlHandler, oContext){
169
169
  var oTitleInfo = oPresentationControlHandler.getTitleInfoForItem(oContext);
170
- return oTitleInfo && oTitleInfo.title;
170
+ return oTitleInfo && oTitleInfo.title;
171
171
  }
172
172
 
173
173
  // creates the columnInfo (see getTableInfo) for a column in a table
@@ -178,7 +178,7 @@ sap.ui.define([
178
178
  };
179
179
  }
180
180
 
181
- // creates the columnInfo (see getTableInfo) for a column specified by a path in a table
181
+ // creates the columnInfo (see getTableInfo) for a column specified by a path in a table
182
182
  function createColumnInfoForPath(oTableInfo, sColumnPath){
183
183
  var aColumns = oTableInfo.table.getTable().getColumns();
184
184
  var oColumnForPath = aColumns.find(function(oColumn){
@@ -210,7 +210,7 @@ sap.ui.define([
210
210
  var sBindingPath = oPlacementInfo.getItemBindingPath();
211
211
  var sRelevantTarget = oPlacementInfo.message.aFullTargets.find(function(sFullTarget){
212
212
  return sFullTarget.startsWith(sBindingPath);
213
- }); // find the relevant target information
213
+ }); // find the relevant target information
214
214
  if (!sRelevantTarget){
215
215
  return;
216
216
  }
@@ -226,7 +226,7 @@ sap.ui.define([
226
226
  }
227
227
  return getColumnInfoForPath(oTableInfo, sColumnPath);
228
228
  }
229
-
229
+
230
230
  // This function analyzes a context belonging to a table and adds the information about the
231
231
  // messages related to this context to oTableInfo.messageToMsgInTableInfo.
232
232
  function addContextInfoToMessageToMsgInTableInfo(oTableInfo, oContext, iPosition){
@@ -238,7 +238,7 @@ sap.ui.define([
238
238
  if (!oPlacementInfo.controlId){ // no control has been determined for this message yet -> the table can be used
239
239
  addControlIdToPlacementInfo([oTableInfo.table.getId()], oPlacementInfo);
240
240
  }
241
- if (oPlacementInfo.groupers[1] === oTableInfo.table){ // ignore messages that are grouped somewhere else
241
+ if (oPlacementInfo.groupers[1] === oTableInfo.table){ // ignore messages that are grouped somewhere else
242
242
  var oEntry = {
243
243
  index: iPosition < 0 ? 9999999 : iPosition,
244
244
  rowCurrentlyShown: iPosition >= 0,
@@ -246,11 +246,11 @@ sap.ui.define([
246
246
  columnInfo: getColumnInfoForMessage(oPlacementInfo, oTableInfo)
247
247
  };
248
248
  oTableInfo.messageToMsgInTableInfo[oMessage.id] = oEntry;
249
- }
249
+ }
250
250
  });
251
251
  }
252
252
  }
253
-
253
+
254
254
  // create the table info object (see getTableInfo above) which does not exist yet.
255
255
  function createTableInfo(oTable){
256
256
  var oPresentationControlHandler = oTemplateUtils.oServices.oPresentationControlHandlerFactory.getPresentationControlHandler(oTable);
@@ -305,7 +305,7 @@ sap.ui.define([
305
305
  // Function to get group name for a message. Messages are grouped based on the controls they refer to.
306
306
  // The corresponding controls are contained in property 'groupers' of the placement info for that message.
307
307
  // groupers is an array which is either empty (message could not be assigned to a specific group), contains one entry which is an object page section,
308
- // or contains two entries (an object page section and a table within this section).
308
+ // or contains two entries (an object page section and a table within this section).
309
309
  // Depending on the case the group is built.
310
310
  function getGroupTitle(sMsgId) {
311
311
  var oPlacementInfo = getMessagePlacementInfo(sMsgId);
@@ -373,9 +373,9 @@ sap.ui.define([
373
373
  // If both messages belong to the same table, but only one of them to a selected row, this one should be shown first
374
374
  // If both messages belong the same table, but to different non-selected rows an artificial stable sorting of those rows is assumed (based on the item binding path)
375
375
  // If both messages belong to the same table and to the same row (which may be none) or to the same section and both to no table then they are sorted by
376
- // - reverse severity (if the severity is different)
376
+ // - reverse severity (if the severity is different)
377
377
  // - position of the most specific control which has been found for them (if the severity is equal)
378
- // If none of the above conditions provides a distinction then the messages are sorted alphabetically
378
+ // If none of the above conditions provides a distinction then the messages are sorted alphabetically
379
379
  function fnCompare(oMsgObj1, oMsgObj2) {
380
380
  var oPlacementInfo1 = getMessagePlacementInfo(oMsgObj1.id);
381
381
  var oPlacementInfo2 = getMessagePlacementInfo(oMsgObj2.id);
@@ -436,11 +436,11 @@ sap.ui.define([
436
436
  error : fnFunction.bind(null, null),
437
437
  updateAggregatedMessages : false,
438
438
  success: function(oData){
439
- var sKey = oData && oModel._getKey(oData);
439
+ var sKey = oData && oModel._getKey(oData);
440
440
  var oNewContext = sKey ? oModel.getContext('/' + sKey, sBindingPath) : null;
441
441
  fnFunction(oNewContext);
442
442
  }
443
- });
443
+ });
444
444
  }
445
445
 
446
446
  // sBindingPath is a binding path pointing to a potential row in a SmartTable. oTableInfo is the info object for this table (see getTableInfo above).
@@ -491,7 +491,8 @@ sap.ui.define([
491
491
  oMessage.aFullTargets.some(function(sFullPath){
492
492
  if (sFullPath.startsWith(sBindingPathPrefix)){ // This full target points to a place on the current object page
493
493
  oTemplateUtils.oInfoObjectHandler.executeForAllInformationObjects("smartTable", function(oInfoObject){ // Check for all tables whether it even points to the table
494
- if (!bFound){ // If a suitable table has already been identified skip all other tables
494
+ const bControlExists = !!controlHelper.byId(oInfoObject.getId());
495
+ if (!bFound && bControlExists){ // If a suitable table has already been identified skip all other tables
495
496
  var sStart = sBindingPathPrefix + oInfoObject.getNavigationProperty();
496
497
  if (sFullPath === sStart || sFullPath.startsWith(sStart + "(")){ // If the full target really identifies the table or an entry within the table
497
498
  bFound = true;
@@ -510,7 +511,7 @@ sap.ui.define([
510
511
  var oPlacementInfo = getMessagePlacementInfo(oCollectedMessage.id, oCollectedMessage);
511
512
  if (!oPlacementInfo.controlId){ // Only act if still no other logic has assigned a control to this message
512
513
  addControlIdToPlacementInfo([sTableId], oPlacementInfo);
513
- }
514
+ }
514
515
  });
515
516
  });
516
517
  })
@@ -524,7 +525,7 @@ sap.ui.define([
524
525
  return bFound;
525
526
  });
526
527
  }
527
-
528
+
528
529
  // The public function provided by this class. It is called from function fnPrepareForMessageHandling in ControllerImplementation.
529
530
  // Thereby it is assumed that (if considered necessary) all controls on the OP have been rendered and bound.
530
531
  // This should ensure that for all considered messages the connection to their controls has already been established.
@@ -546,7 +547,7 @@ sap.ui.define([
546
547
  // - Make sure that function fnHeartBeat (see above) will update property heartBeat in oHelperModel
547
548
  // - return a Promise that is resolved as soon as the preparation is done. This Promise resolves to an object which currently has one property 'getSubtitle'. This is actually the
548
549
  // function with this name (see below).
549
- // Note: The subtitle function is actually returned twice, namely once by adding messageToSubtitle to oHelperModel and once by returning the corresponding function.
550
+ // Note: The subtitle function is actually returned twice, namely once by adding messageToSubtitle to oHelperModel and once by returning the corresponding function.
550
551
  function getPrepareMessageDisplayPromise(oItemBinding, aMessages, oHelperModel, sBindingPath){
551
552
  fnReset(); // initialize caches
552
553
  var mTableInfosReadyPromise = Object.create(null); // used to collect information about tables which could only be identified via second try
@@ -567,7 +568,7 @@ sap.ui.define([
567
568
  var fnSetMapsAndSort = function(){ // The function to be executed when the sufficient information has been collected to sort the messages and update oHelperModel accordingly
568
569
  if (iResortingId){ // stop any other resorting which still may be planned and document that currently no resorting is planned
569
570
  clearTimeout(iResortingId);
570
- iResortingId = 0;
571
+ iResortingId = 0;
571
572
  }
572
573
  // Initialize the maps that should be added to oHelperModel
573
574
  var mMessageToGroupName = Object.create(null);
@@ -576,13 +577,13 @@ sap.ui.define([
576
577
  var fnSortAgain; // The function that should be called when a resorting is triggered. Initialized on demand
577
578
  aMessages.forEach(function(oMessage){ // for each message ensure that it is added to the maps
578
579
  var oPlacementInfo = getMessagePlacementInfo(oMessage.id, oMessage); // retrieve the current placement information
579
- if (oPlacementInfo.groupers.length === 0){ // If the message can only be added to the generic group yet, make sure that it is marked for resorting
580
+ if (oPlacementInfo.groupers.length === 0){ // If the message can only be added to the generic group yet, make sure that it is marked for resorting
580
581
  fnSortAgain = fnSortAgain || function(){
581
582
  iResortingId = iResortingId || setTimeout(fnSetMapsAndSort); // if no resorting is planned yet, plan it now
582
583
  oHelperModel.setProperty("/messageToUpdateFunction", null); // no further resorting needs to be planned (probably makes the above || superfluous)
583
584
  };
584
585
  mMessageToUpdateFunction[oMessage.id] = fnSortAgain; // register the message for resorting
585
- }
586
+ }
586
587
  mMessageToGroupName[oMessage.id] = getGroupTitle(oMessage.id);
587
588
  mMessageToSubtitle[oMessage.id] = getSubtitle(oMessage.id, oMessage.additionalText);
588
589
  });
@@ -592,11 +593,11 @@ sap.ui.define([
592
593
  oHelperModel.setProperty("/messageToUpdateFunction", mMessageToUpdateFunction);
593
594
  // Trigger the sorting
594
595
  var oSorter = new Sorter("");
595
- oSorter.fnCompare = fnCompare;
596
- oItemBinding.sort(oSorter);
596
+ oSorter.fnCompare = fnCompare;
597
+ oItemBinding.sort(oSorter);
597
598
  };
598
599
  return Promise.all(aTableInfosReadyPromises).then(function(){ // all tables are ready
599
- return getMessageSorterForTableInfos().then(function(){
600
+ return getMessageSorterForTableInfos().then(function(){
600
601
  fnSetMapsAndSort();
601
602
  fnHeartBeat = function(){
602
603
  var iHeartBeat = oHelperModel.getProperty("/heartBeat") || 0;
@@ -631,7 +632,7 @@ sap.ui.define([
631
632
 
632
633
  // This function is called for all validation messages belonging to cells inside a table.
633
634
  // It will update the messageInTableInfo for this message within oTableInfo (see getTableInfo) and also return the messageToTableInfo.
634
- // This is necessary since the normal mechanism for building this info does not work for validation messages,
635
+ // This is necessary since the normal mechanism for building this info does not work for validation messages,
635
636
  // as validation messages are not provided by oContext.getMessages(), if oContext is the binding context of the row which contains the validation error.
636
637
  function fnAddValidationInfoToTableInfo(oMessage, oTableInfo){
637
638
  var oTargetControl = controlHelper.byId(oMessage.controlIds[0]); // As oMessage is a validation message we expect exactly one control to be associated to it
@@ -639,23 +640,23 @@ sap.ui.define([
639
640
  // Now search for oContext within the table in order to determine the position
640
641
  var aContexts = oTableInfo.presentationControlHandler.getCurrentContexts() || [];
641
642
  var iPosition = -1;
642
- aContexts.some(function(oCandidateContext, i){
643
+ aContexts.some(function(oCandidateContext, i){
643
644
  if (oCandidateContext === oContext){
644
645
  iPosition = i;
645
646
  return true;
646
647
  }
647
648
  });
648
- var oColumn = oTableInfo.presentationControlHandler.getColumnForCell(oTargetControl);
649
+ var oColumn = oTableInfo.presentationControlHandler.getColumnForCell(oTargetControl);
649
650
  var oMessageInTableInfo = {
650
651
  index: iPosition,
651
652
  rowCurrentlyShown: true,
652
653
  rowIdentifier: getRowIdentifier(oTableInfo.presentationControlHandler, oContext),
653
654
  columnInfo: getColumnInfoForColumn(oTableInfo, oColumn)
654
- };
655
+ };
655
656
  oTableInfo.messageToMsgInTableInfo[oMessage.id] = oMessageInTableInfo;
656
- return oMessageInTableInfo;
657
+ return oMessageInTableInfo;
657
658
  }
658
-
659
+
659
660
  // This method is called when the data for all tables that are relevant for messages have been loaded and we have looped over the rows within these tables in
660
661
  // order to add them to messageToMsgInTableInfo of the corresponding table info.
661
662
  // This may still not have provided the required information for all table related messages due to three possible reasons
@@ -695,15 +696,15 @@ sap.ui.define([
695
696
  }
696
697
  } // else: first case
697
698
  }
698
- }
699
+ }
699
700
  }
700
701
  };
701
702
  for (var sMsgId in mMessageToPlacementInfo){
702
703
  fnHandleMessage(sMsgId);
703
- }
704
- return Promise.all(aMessageDetailsRetrievedPromises);
704
+ }
705
+ return Promise.all(aMessageDetailsRetrievedPromises);
705
706
  }
706
-
707
+
707
708
  function getSubtitleForRow(oMessageInTableInfo, oTableInfo, oMessage, aColumnsForMessage){
708
709
  const bIsFallback = !Array.isArray(aColumnsForMessage);
709
710
  let sI18NKey = bIsFallback ? "MSG_SUBTITLE_DEFAULT_ROW" : "MSG_SUBTITLE_ROW";
@@ -719,7 +720,7 @@ sap.ui.define([
719
720
  if (oMessageInTableInfo.columnInfo){
720
721
  aParams.push(oMessageInTableInfo.columnInfo.label);
721
722
  sI18NKey += "_COLUMN";
722
- if (oMessageInTableInfo.columnInfo.hidden){
723
+ if (oMessageInTableInfo.columnInfo.hidden && !oMessageInTableInfo.columnInfo.label){
723
724
  sI18NKey += "_HIDDEN";
724
725
  }
725
726
  }
@@ -788,7 +789,7 @@ sap.ui.define([
788
789
  }
789
790
  return sAdditionalText;
790
791
  }
791
-
792
+
792
793
  function getDescriptionForRow(oMessageInTableInfo, oTableInfo, oMessage, aColumnsForMessage){
793
794
  const sNewLine = "\n";
794
795
  const getText = oTemplateUtils.oCommonUtils.getText;
@@ -810,6 +811,7 @@ sap.ui.define([
810
811
  return sTableText + sRowHeaderText + sRowText + sErrorColumnText;
811
812
  }
812
813
  testableHelper.testableStatic(getSubtitleForRow, "filterHelper_getSubtitleForRow");
814
+ testableHelper.testableStatic(fnFindTableForMessage, "messageSortingHandler_fnFindTableForMessage");
813
815
  // public instance methods
814
816
  return {
815
817
  getPrepareMessageDisplayPromise: getPrepareMessageDisplayPromise
@@ -821,4 +823,4 @@ sap.ui.define([
821
823
  extend(this, getMethods(oController, oTemplateUtils, oObjectPage));
822
824
  }
823
825
  });
824
- });
826
+ });
@@ -102,7 +102,7 @@ sap.ui.define([
102
102
  }
103
103
 
104
104
  function getKeyToPresentationControlHandler(oSmartTable) {
105
- var oGenericMultipleViewsHandler = fnGetGenericMultipleViewsHandler(oSmartTable.getId(), true);
105
+ var oGenericMultipleViewsHandler = fnGetGenericMultipleViewsHandler(oSmartTable.getId());
106
106
  if (!oGenericMultipleViewsHandler) {
107
107
  return null;
108
108
  }