@sapui5/sap.suite.ui.generic.template 1.138.0 → 1.139.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 (82) 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 +4 -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/manifest.json +1 -1
  20. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/Actions.fragment.xml +2 -1
  21. package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
  22. package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
  23. package/src/sap/suite/ui/generic/template/genericUtilities/controlHelper.js +4 -2
  24. package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartTableChartCommon.js +4 -1
  25. package/src/sap/suite/ui/generic/template/js/AnnotationHelper.js +25 -15
  26. package/src/sap/suite/ui/generic/template/lib/AdaptiveCardHelper.js +2 -2
  27. package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
  28. package/src/sap/suite/ui/generic/template/lib/Application.js +2 -2
  29. package/src/sap/suite/ui/generic/template/lib/CRUDManager.js +1 -1
  30. package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +16 -12
  31. package/src/sap/suite/ui/generic/template/lib/CommonUtils.js +1 -2
  32. package/src/sap/suite/ui/generic/template/lib/ContactCardDetailHelper.js +1 -1
  33. package/src/sap/suite/ui/generic/template/lib/ContextBookkeeping.js +3 -6
  34. package/src/sap/suite/ui/generic/template/lib/ContextMenuHandler.js +16 -2
  35. package/src/sap/suite/ui/generic/template/lib/FlexibleColumnLayoutHandler.js +3 -1
  36. package/src/sap/suite/ui/generic/template/lib/SideEffectUtil.js +3 -4
  37. package/src/sap/suite/ui/generic/template/lib/StatePreserver.js +1 -1
  38. package/src/sap/suite/ui/generic/template/lib/ViewDependencyHelper.js +7 -2
  39. package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterBarHandler.js +13 -4
  40. package/src/sap/suite/ui/generic/template/lib/filterHelper.js +5 -7
  41. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saprigi.properties +108 -1
  42. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_id.properties +1 -1
  43. package/src/sap/suite/ui/generic/template/lib/insights/InsightsHandler.js +1 -2
  44. package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +26 -19
  45. package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartTableHandler.js +4 -2
  46. package/src/sap/suite/ui/generic/template/library.js +1 -1
  47. package/src/sap/suite/ui/generic/template/listTemplates/controller/DetailController.js +6 -2
  48. package/src/sap/suite/ui/generic/template/listTemplates/controller/IappStateHandler.js +1 -1
  49. package/src/sap/suite/ui/generic/template/listTemplates/controller/ToolbarController.js +2 -10
  50. package/src/sap/suite/ui/generic/template/listTemplates/semanticDateRangeTypeHelper.js +1 -1
  51. package/src/sap/suite/ui/generic/template/themes/base/ALPConstants.less +14 -14
  52. package/src/sap/suite/ui/generic/template/themes/sap_belize_base/ALPConstants.less +14 -14
  53. package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/ALPConstants.less +14 -14
  54. package/src/sap/suite/ui/generic/template/themes/sap_hcb/ALPConstants.less +14 -14
  55. package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/AnalyticGridController.js +0 -38
  56. package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/alr_readme.txt +0 -23
  57. package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/crosstab_library.css +0 -20
  58. package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/img/readme.txt +0 -4
  59. package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/img/sort_asc.gif +0 -0
  60. package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/img/sort_desc.gif +0 -0
  61. package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/img/sort_none.gif +0 -0
  62. package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/img/treenode_collapse.gif +0 -0
  63. package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/img/treenode_expand.gif +0 -0
  64. package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/fragments/AnalyticGrid.fragment.xml +0 -21
  65. package/src/sap/suite/ui/generic/template/themes/base/alr_zen.css +0 -127
  66. package/src/sap/suite/ui/generic/template/themes/base/crosstab_library.css +0 -20
  67. package/src/sap/suite/ui/generic/template/themes/base/img/readme.txt +0 -4
  68. package/src/sap/suite/ui/generic/template/themes/base/img/sort_asc.gif +0 -0
  69. package/src/sap/suite/ui/generic/template/themes/base/img/sort_desc.gif +0 -0
  70. package/src/sap/suite/ui/generic/template/themes/base/img/sort_none.gif +0 -0
  71. package/src/sap/suite/ui/generic/template/themes/base/img/treenode_collapse.gif +0 -0
  72. package/src/sap/suite/ui/generic/template/themes/base/img/treenode_expand.gif +0 -0
  73. package/src/sap/suite/ui/generic/template/themes/sap_belize_base/alr_zen.css +0 -136
  74. package/src/sap/suite/ui/generic/template/themes/sap_belize_base/crosstab_library.css +0 -20
  75. package/src/sap/suite/ui/generic/template/themes/sap_belize_base/img/readme.txt +0 -4
  76. package/src/sap/suite/ui/generic/template/themes/sap_belize_base/img/sort_asc.gif +0 -0
  77. package/src/sap/suite/ui/generic/template/themes/sap_belize_base/img/sort_desc.gif +0 -0
  78. package/src/sap/suite/ui/generic/template/themes/sap_belize_base/img/sort_none.gif +0 -0
  79. package/src/sap/suite/ui/generic/template/themes/sap_belize_base/img/treenode_collapse.gif +0 -0
  80. package/src/sap/suite/ui/generic/template/themes/sap_belize_base/img/treenode_expand.gif +0 -0
  81. package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/alr_zen.css +0 -136
  82. package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/crosstab_library.css +0 -20
@@ -1,4 +1,4 @@
1
- <core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:uxap="sap.uxap"
1
+ <core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:uxap="sap.uxap" xmlns:dt="sap.ui.dt"
2
2
  xmlns:fesr="http://schemas.sap.com/sapui5/extension/sap.ui.core.FESR/1"
3
3
  xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
4
4
  template:require="{
@@ -130,6 +130,7 @@
130
130
  ariaHasPopup="Dialog"
131
131
  fesr:press="fe:sum:summarize"
132
132
  type="Ghost"
133
+ dt:designtime="not-adaptable"
133
134
  visible="{_templPrivGlobal>/generic/fioriAI/isSummarizationEnabled}" />
134
135
 
135
136
  <template:if test="{parameter>/settings/showRelatedApps}">
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.138.0"
9
+ "version": "1.139.0"
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.138.0"
9
+ "version": "1.139.0"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -44,8 +44,10 @@ sap.ui.define([
44
44
  oCurrentFocus = getControlWithFocus();
45
45
  var oTest = oCurrentFocus;
46
46
  var bIsTargetSmartField = oControlHelper.isSmartField(oControl);
47
- while (bIsTargetSmartField && oTest && oTest !== oControl && !oControlHelper.isSmartField(oTest)){
48
- oTest = oTest.getParent();
47
+ if (bIsTargetSmartField) {
48
+ while (oTest && oTest !== oControl && !oControlHelper.isSmartField(oTest)) {
49
+ oTest = oTest.getParent();
50
+ }
49
51
  }
50
52
  if (oTest !== oControl){
51
53
  oLogger.warning(oCurrentFocus ? ("Focus is now on control with id " + oCurrentFocus.getId()) : "There is no focus now");
@@ -54,7 +54,10 @@ sap.ui.define([
54
54
  // don't create UiState (managed object) from scratch, but fetch it from control and only apply known properties from state - thus, if any other properties would be added, we don't
55
55
  // interfere with them
56
56
  var oUiState = oControl.getUiState();
57
- if (!oUiState.getProperty("variantName")){
57
+ if (
58
+ oUiState.getProperty("variantName") === "" ||
59
+ oControl.getVariantManagement().getModified() && oControl.getVariantManagement().getStandardVariantKey() === oUiState.getProperty("variantName")
60
+ ){
58
61
  oUiState.setPresentationVariant(oState.oUiState.oPresentationVariant);
59
62
  oUiState.setSelectionVariant(oState.oUiState.oSelectionVariant);
60
63
  oUiState.setTableSettings(oState.oUiState.oTableSettings);
@@ -478,9 +478,9 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
478
478
  var oModel = oInterface.getInterface(1).getModel();
479
479
  // p13nData for Semantically Connected Columns
480
480
  var sLeadingPropertyForSCColumn = "";
481
- var aNavigationPropertiesForSCColumn = [];
482
- var aAdditionalPropertiesForSCColumn = [];
483
- var aAdditionalSortPropertiesForSCColumn = [];
481
+ var oNavigationPropertiesSet = new Set();
482
+ var oAdditionalPropertiesSet = new Set();
483
+ var oAdditionalSortPropertiesSet = new Set();
484
484
  var sActionButton = "false";
485
485
  oConnectedDataFields = oConnectedDataFields && oConnectedDataFields.Data;
486
486
  for (var i = 0; i < oConnectedDataFields.length; i++) {
@@ -533,16 +533,26 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
533
533
  if (!sLeadingPropertyForSCColumn && oP13N.leadingProperty) {
534
534
  sLeadingPropertyForSCColumn = oP13N.leadingProperty;
535
535
  } else {
536
- oP13N.leadingProperty && (aAdditionalPropertiesForSCColumn.indexOf(oP13N.leadingProperty) === -1) ? aAdditionalPropertiesForSCColumn.push(oP13N.leadingProperty) : Function.prototype;
537
- oP13N.leadingProperty && (aAdditionalSortPropertiesForSCColumn.indexOf(oP13N.leadingProperty) === -1) ? aAdditionalSortPropertiesForSCColumn.push(oP13N.leadingProperty) : Function.prototype;
536
+ if (oP13N.leadingProperty) {
537
+ oAdditionalPropertiesSet.add(oP13N.leadingProperty);
538
+ oAdditionalSortPropertiesSet.add(oP13N.leadingProperty);
539
+ }
538
540
  }
539
541
 
540
- oP13N.navigationProperty && (aNavigationPropertiesForSCColumn.indexOf(oP13N.navigationProperty) === -1) ? aNavigationPropertiesForSCColumn.push(oP13N.navigationProperty) : Function.prototype;
542
+ if (oP13N.navigationProperty) {
543
+ oNavigationPropertiesSet.add(oP13N.navigationProperty);
544
+ }
541
545
  // Add "additionalProperty" of current data field to the "additionalProperty" of current column's p13n
542
- oP13N.additionalProperty && (aAdditionalPropertiesForSCColumn.indexOf(oP13N.additionalProperty) === -1) ? aAdditionalPropertiesForSCColumn.push(oP13N.additionalProperty) : Function.prototype;
546
+ if (oP13N.additionalProperty) {
547
+ oAdditionalPropertiesSet.add(oP13N.additionalProperty);
548
+ }
543
549
  // Add "description" & "unit" of current data field to the "additionalSortProperty" of current column's p13n
544
- oP13N.description && (!aAdditionalSortPropertiesForSCColumn.includes(oP13N.description)) ? aAdditionalSortPropertiesForSCColumn.push(oP13N.description) : Function.prototype;
545
- oP13N.unit && (!aAdditionalSortPropertiesForSCColumn.includes(oP13N.unit)) ? aAdditionalSortPropertiesForSCColumn.push(oP13N.unit) : Function.prototype;
550
+ if (oP13N.description) {
551
+ oAdditionalSortPropertiesSet.add(oP13N.description);
552
+ }
553
+ if (oP13N.unit) {
554
+ oAdditionalSortPropertiesSet.add(oP13N.unit);
555
+ }
546
556
  if (sActionButton === "false") {
547
557
  sActionButton = oP13N.actionButton;
548
558
  }
@@ -565,14 +575,14 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
565
575
  sP13N += '", "sortProperty":"' + sLeadingPropertyForSCColumn;
566
576
  }
567
577
 
568
- if (aNavigationPropertiesForSCColumn.length > 0) {
569
- sP13N += '", "navigationProperty":"' + aNavigationPropertiesForSCColumn.join();
578
+ if (oNavigationPropertiesSet.size > 0) {
579
+ sP13N += '", "navigationProperty":"' + Array.from(oNavigationPropertiesSet).join();
570
580
  }
571
- if (aAdditionalPropertiesForSCColumn.length > 0) {
572
- sP13N += '", "additionalProperty":"' + aAdditionalPropertiesForSCColumn.join();
581
+ if (oAdditionalPropertiesSet.size > 0) {
582
+ sP13N += '", "additionalProperty":"' + Array.from(oAdditionalPropertiesSet).join();
573
583
  }
574
- if (aAdditionalSortPropertiesForSCColumn.length > 0) {
575
- sP13N += '", "additionalSortProperty":"' + aAdditionalSortPropertiesForSCColumn.join();
584
+ if (oAdditionalSortPropertiesSet.size > 0) {
585
+ sP13N += '", "additionalSortProperty":"' + Array.from(oAdditionalSortPropertiesSet).join();
576
586
  }
577
587
 
578
588
  sP13N += '", "actionButton":"' + sActionButton + '"';
@@ -511,7 +511,7 @@ sap.ui.define([
511
511
  }
512
512
  }
513
513
  ],
514
- "$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
514
+ "$schema": "https://adaptivecards.io/schemas/adaptive-card.json"
515
515
  }
516
516
  };
517
517
 
@@ -574,7 +574,7 @@ sap.ui.define([
574
574
  ]
575
575
  }
576
576
  ],
577
- "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
577
+ "$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
578
578
  "version": "1.4"
579
579
  };
580
580
 
@@ -944,7 +944,7 @@ sap.ui.define([
944
944
  * @public
945
945
  * @extends sap.ui.core.UIComponent
946
946
  * @author SAP SE
947
- * @version 1.138.0
947
+ * @version 1.139.0
948
948
  * @name sap.suite.ui.generic.template.lib.AppComponent
949
949
  */
950
950
  var oAppComponent = UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
@@ -856,7 +856,7 @@ sap.ui.define(["sap/ui/base/Object",
856
856
  oLogger.info("Show message toast");
857
857
  MessageToast.show.apply(MessageToast, myArguments);
858
858
  };
859
- Promise.all([getOperationEndedPromise(true), oTemplateContract.oBusyHelper.getUnbusy()]).then(fnMessageToast);
859
+ Promise.all([getOperationEndedPromise(), oTemplateContract.oBusyHelper.getUnbusy()]).then(fnMessageToast);
860
860
  },
861
861
  showMessageBox: function() {
862
862
  var myArguments = arguments;
@@ -864,7 +864,7 @@ sap.ui.define(["sap/ui/base/Object",
864
864
  oLogger.info("Show message box");
865
865
  MessageBox.show.apply(MessageBox, myArguments);
866
866
  };
867
- Promise.all([getOperationEndedPromise(true), oTemplateContract.oBusyHelper.getUnbusy()]).then(fnMessageBox);
867
+ Promise.all([getOperationEndedPromise(), oTemplateContract.oBusyHelper.getUnbusy()]).then(fnMessageBox);
868
868
  },
869
869
  registerStateChanger: fnRegisterStateChanger,
870
870
  createDraftSiblingPromise: oContextBookkeeping.createDraftSiblingPromise,
@@ -400,7 +400,7 @@ sap.ui.define(["sap/ui/base/Object",
400
400
  oServices.oPresentationControlHandlerFactory.getPresentationControlHandler(oSettings.smartTable).refresh("Changes");
401
401
  }
402
402
  var fnHandleResponse = function(aDeleteResults){
403
- var oParsedDeleteResult = fnParseResponse(aPath, aDeleteResults, bWithWarningDialog, oSettings.onlyOneDraftPlusActive);
403
+ var oParsedDeleteResult = fnParseResponse(aPath, aDeleteResults, bWithWarningDialog);
404
404
  mFailed = extend(mFailed, oParsedDeleteResult.mFailed);
405
405
  mSuccess = extend(mSuccess, oParsedDeleteResult.mSuccess);
406
406
  mWarning = oParsedDeleteResult.mWarning;
@@ -28,7 +28,8 @@ sap.ui.define(["sap/ui/base/Object",
28
28
  "sap/ui/core/CustomData",
29
29
  "sap/m/VBox",
30
30
  "sap/suite/ui/generic/template/genericUtilities/utils",
31
- "sap/ui/core/Element"
31
+ "sap/ui/core/Element",
32
+ "sap/ui/generic/app/util/ModelUtil"
32
33
  ], function(
33
34
  BaseObject,
34
35
  Event,
@@ -60,7 +61,8 @@ sap.ui.define(["sap/ui/base/Object",
60
61
  CustomData,
61
62
  VBox,
62
63
  genericUtils,
63
- Element
64
+ Element,
65
+ ModelUtil
64
66
  ) {
65
67
  "use strict";
66
68
 
@@ -1094,7 +1096,11 @@ sap.ui.define(["sap/ui/base/Object",
1094
1096
  // and text, using the formatutil and the textarrangement, title should
1095
1097
  // be passed on the smartlink
1096
1098
  if (oControl.getFieldName) {
1097
- var oEntityType = oMetaModel.getODataEntityType(oEntitySet.entityType);
1099
+ // The value "sEntitySet" holds the entity set of an object page or a table.
1100
+ //
1101
+ // Sometimes, the SmartLink is located on a field group which belongs to the child entity set of object page.
1102
+ // So, we have to always derive the entity type from the smart link's binding context.
1103
+ var oEntityType = ModelUtil.getEntityTypeFromContext(oControl.getBindingContext());
1098
1104
  var oField = oEntityType.property.find(function (oProperty) { return oProperty.name === sSourceClickedField; });
1099
1105
  var sTextArrangement = "descriptionAndId";
1100
1106
  if (oField) { // TODO: Need to provide the correct field Object using the entityType and corresponding association (should be handled by a BLI)
@@ -1103,7 +1109,7 @@ sap.ui.define(["sap/ui/base/Object",
1103
1109
  var vValue = oControl.getBinding("text").getValue(); // could be array or string
1104
1110
  if (Array.isArray(vValue)){
1105
1111
  var oTexts = FormatUtil.getTextsFromDisplayBehaviour(sTextArrangement, vValue[0], vValue[1]);
1106
- if (oMainNavigation) {
1112
+ if (!oField["sap:unit"] && oMainNavigation) {
1107
1113
  oMainNavigation.setDescription(oTexts.secondText);
1108
1114
  }
1109
1115
  sTitle = oTexts.firstText;
@@ -1662,7 +1668,7 @@ sap.ui.define(["sap/ui/base/Object",
1662
1668
  var sTableEntitySet = oTable.getEntitySet();
1663
1669
  oCommonUtils.setExternalChevronRefreshBehaviour(sTableEntitySet);
1664
1670
 
1665
- fnNavigateIntentManifest(oEventSource, oBindingContext, oState.oSmartFilterbar, Object.create(null), true);
1671
+ fnNavigateIntentManifest(oEventSource, oBindingContext, oState.oSmartFilterbar, true);
1666
1672
  return;
1667
1673
  }
1668
1674
 
@@ -2346,7 +2352,7 @@ sap.ui.define(["sap/ui/base/Object",
2346
2352
  if (oEventSource.data("CrossNavigation")) {
2347
2353
  oServices.oViewDependencyHelper.setMeToDirty(oComponent, sEntitySet, true);
2348
2354
 
2349
- fnNavigateIntentManifest(oEventSource, oEventSource.getBindingContext(), oSmartFilterBar, Object.create(null), true);
2355
+ fnNavigateIntentManifest(oEventSource, oEventSource.getBindingContext(), oSmartFilterBar, true);
2350
2356
  return Promise.resolve();
2351
2357
  }
2352
2358
  var oNonDraftCreatePromise = oComponentUtils.getNonDraftCreatePromise(sEntitySet, oPredefinedValues);
@@ -2562,12 +2568,10 @@ sap.ui.define(["sap/ui/base/Object",
2562
2568
  var sPath = oContext.getPath();
2563
2569
  var oContactData = oModel.getContext(sPath);
2564
2570
  var oContactAnnotation = JSON.parse(oSourceControl.data("contactDetails"));
2565
- var sEmail;
2566
- if (oContactAnnotation.email[0].address && oContactAnnotation.email[0].address.Path) {
2567
- sEmail = oContactData.getProperty(oContactAnnotation.email[0].address.Path);
2568
- } else {
2569
- sEmail = (oContactAnnotation.email[0].address && oContactAnnotation.email[0].address.String);
2570
- }
2571
+ var emailObj = oContactAnnotation?.email?.[0]?.address;
2572
+ var sEmail = emailObj?.Path
2573
+ ? oContactData.getProperty(emailObj.Path)
2574
+ : emailObj?.String;
2571
2575
 
2572
2576
 
2573
2577
  fnFetchContactStatus(sEmail).then(function (oContactStatus) {
@@ -1354,8 +1354,7 @@ sap.ui.define(["sap/ui/base/Object",
1354
1354
  return fnExecute2();
1355
1355
  });
1356
1356
  } else {
1357
- oRet = (mParameters.dataloss.popup ? fnProcessDataLossOrDraftDiscardConfirmation(fnExecute2, fnReject,
1358
- null, (mParameters.dataloss.navigation ? "LeavePage" : "Proceed"), true) : fnExecute2());
1357
+ oRet = (mParameters.dataloss.popup ? fnProcessDataLossOrDraftDiscardConfirmation(fnExecute2, fnReject, (mParameters.dataloss.navigation ? "LeavePage" : "Proceed"), true) : fnExecute2());
1359
1358
  }
1360
1359
 
1361
1360
  if (oRet instanceof Promise) {
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  var renderContactDetailsFragment = function() {
35
35
  oCommonUtils.getDialogFragmentAsync("sap.suite.ui.generic.template.fragments.ContactDetails", {
36
36
  formatUri: function (sValue) {
37
- var mailregex = /^\w+[\w-+\.]*\@\w+([-\.]\w+)*\.[a-zA-Z]{2,}$/;
37
+ var mailregex = /^[a-zA-Z0-9._%+-]+@([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\.)+[a-zA-Z]{2,}$/;
38
38
  if (mailregex.test(sValue)) {
39
39
  return "mailto:" + sValue;
40
40
  } else {
@@ -753,12 +753,9 @@ sap.ui.define(["sap/ui/base/Object", "sap/base/util/each", "sap/base/util/extend
753
753
 
754
754
  //swap, if oContextData1 either doesn't hold a value or doesn't have oContext and oContextData2 is available and is an active object
755
755
  if ((!oContextData1 || !oContextData1.oContext) && (oContextData2 && !oContextData2.oContextInfo.bIsDraft)) {
756
- // a = fnSwap(b, b = a);this function is used to swap the values of variables a and b
757
- var fnSwap = function (vSwapWith) {return vSwapWith; };
758
-
759
- oContextData1 = fnSwap(oContextData2, oContextData2 = oContextData1);
760
- sCanonicalPath1 = fnSwap(sCanonicalPath2, sCanonicalPath2 = sCanonicalPath1);
761
- oHistoricIdentity = fnSwap(oNewIdentity, oNewIdentity = oHistoricIdentity);
756
+ [oContextData1, oContextData2] = [oContextData2, oContextData1];
757
+ [sCanonicalPath1, sCanonicalPath2] = [sCanonicalPath2, sCanonicalPath1];
758
+ [oHistoricIdentity, oNewIdentity] = [oNewIdentity, oHistoricIdentity];
762
759
  }
763
760
  function fnTestEquivalence (oContextData1, oContextData2) {
764
761
  if (!oContextData1 || !oContextData2) {
@@ -245,7 +245,17 @@ sap.ui.define([
245
245
  return false;
246
246
  }
247
247
 
248
- // Adds the menu button to context menu and creates a sub-menu for the child entries
248
+ /**
249
+ *
250
+ * Evaluates the menu items in a menu button and adds them to the context menu based on the following rules:
251
+ *
252
+ * 1. If multiple menu items are eligible for the context menu,
253
+ * - A main menu entry is added to the context menu with the same text as menu button.
254
+ * - The eligible menu items are added as sub-menu entries under this main entry.
255
+ *
256
+ * 2. If only one menu item is eligible,
257
+ * - It's directly added as a top-level entry in the context menu
258
+ */
249
259
  function fnAddMenuButtonToContextMenu(sPathToItems, oFocusInfo, oToolbarControlsData, aItems, oMenuButton, bStartsNewSection) {
250
260
  var aMenuItems = oMenuButton.getMenu().getItems();
251
261
 
@@ -255,7 +265,11 @@ sap.ui.define([
255
265
  fnAddToolbarButtonToContextMenu(sItemsPath, oFocusInfo, oToolbarControlsData, aChildContextMenuEntries, oMenuItem, bStartsSectionOnSubMenu);
256
266
  });
257
267
 
258
- if (aChildContextMenuEntries.length > 0) {
268
+ if (aChildContextMenuEntries.length === 1) {
269
+ var oChildContextMenuEntry = aChildContextMenuEntries[0];
270
+ fnAddMenuItem(sPathToItems, aItems, oChildContextMenuEntry.text, oChildContextMenuEntry.icon, oChildContextMenuEntry.startsSection, oChildContextMenuEntry.handlerPromise);
271
+ return true;
272
+ } else if (aChildContextMenuEntries.length > 1) {
259
273
  fnAddMenuItem(sPathToItems, aItems, oMenuButton.getText(), oMenuButton.getIcon(), bStartsNewSection, null, aChildContextMenuEntries);
260
274
  return true;
261
275
  }
@@ -163,7 +163,8 @@ sap.ui.define([
163
163
  }
164
164
  var oRet = {};
165
165
  var bPerformAnalysis = true;
166
- for (var oTreeNode = oCurrentIdentity.treeNode; bPerformAnalysis; oTreeNode = oTemplateContract.mRoutingTree[oTreeNode.parentRoute]){
166
+ var oTreeNode = oCurrentIdentity.treeNode;
167
+ while (bPerformAnalysis) {
167
168
  var iFCLLevel = oTreeNode.fCLLevel;
168
169
  var sPar = getColumnForFCLLevel(iFCLLevel);
169
170
  oRet[sPar] = {
@@ -173,6 +174,7 @@ sap.ui.define([
173
174
  };
174
175
  bPerformAnalysis = iFCLLevel === 1 || iFCLLevel === 2;
175
176
  bIsNonDraftCreate = false; // only last column can be the create column
177
+ oTreeNode = oTemplateContract.mRoutingTree[oTreeNode.parentRoute];
176
178
  }
177
179
  return oRet;
178
180
  }
@@ -34,14 +34,13 @@ sap.ui.define(["sap/suite/ui/generic/template/js/AnnotationHelper",
34
34
  return oSmartField._calculateFieldGroupIDs(oClonedMetaData);
35
35
  }
36
36
  function fnComputeFieldGroupAndTriggerSideEffect(oSmartField, sSideEffectSourcePropertyType) {
37
- var aFieldGroupIds;
38
- var fnTriggerValidateFieldGroupEvent = function() {
37
+ var fnTriggerValidateFieldGroupEvent = function(aFieldGroupIds) {
39
38
  if (aFieldGroupIds) {
40
39
  oSmartField.triggerValidateFieldGroup(aFieldGroupIds);
41
40
  }
42
41
  };
43
- var fnCallTriggerValidateFieldGroup = function(sSideEffectSourcePropertyType, oComputedMetaData) {
44
-
42
+ var fnCallTriggerValidateFieldGroup = function(sSideEffectSourcePropertyType, oComputedMetaData) {
43
+ var aFieldGroupIds;
45
44
  switch (sSideEffectSourcePropertyType) {
46
45
  case SideEffectSourcePropertyType.SINGLE_SOURCE_ONLY:
47
46
  var aInnerControls = oSmartField.getInnerControls();
@@ -446,7 +446,7 @@ sap.ui.define(["sap/ui/base/Object",
446
446
  function isStateChange(mAppStates){
447
447
  sAppStateKeyInUrl = mAppStates[oSettings.appStateName] || "";
448
448
  if (Array.isArray(sAppStateKeyInUrl)){
449
- sAppStateKeyInUrl = sAppStateKeyInUrl.sort()[0] || "";
449
+ sAppStateKeyInUrl = sAppStateKeyInUrl.sort((a, b) => a.localeCompare(b))[0] || "";
450
450
  }
451
451
  if (oStoringInformation){
452
452
  if (oStoringInformation.appStateKey !== sAppStateKeyInUrl){
@@ -25,13 +25,18 @@ sap.ui.define(["sap/ui/base/Object", "sap/suite/ui/generic/template/js/Annotatio
25
25
  var sMyId = oComponent.getId();
26
26
  var oComponentRegistryEntry = oTemplateContract.componentRegistry[sMyId];
27
27
  var oTreeNode = oTemplateContract.mRoutingTree[oComponentRegistryEntry.route];
28
- for (var i = 0; (!iLevel || i < iLevel) && oTreeNode.level > 0; i++){
29
- var oParentNode = oTemplateContract.mRoutingTree[oTreeNode.parentRoute];
28
+ var i = 0;
29
+ while (oTreeNode.level > 0) {
30
+ if (iLevel && i >= iLevel) {
31
+ break;
32
+ }
33
+ var oParentNode = oTemplateContract.mRoutingTree[oTreeNode.parentRoute];
30
34
  if (oParentNode.componentId){
31
35
  var oParentComponent = oTemplateContract.componentRegistry[oParentNode.componentId].oComponent;
32
36
  setMeToDirty(oParentComponent, sEntitySet);
33
37
  }
34
38
  oTreeNode = oParentNode;
39
+ i++;
35
40
  }
36
41
  }
37
42
 
@@ -423,12 +423,14 @@ sap.ui.define([
423
423
  */
424
424
  function fnShowValueHelp(oEvent) {
425
425
  var oSmartFilterbar = oState.oSmartFilterbar;
426
+ var sKey = oEvent.getParameter("key");
426
427
  fnValueHelpPromiseResolve = oEvent.getParameter("resolve");
427
428
  oSmartFilterbar.associateValueLists();
428
429
  try {
429
- oSmartFilterbar.openValueHelpRequestForFilterItem(oEvent.getParameter("key"));
430
+ oSmartFilterbar.ensureLoadedValueHelp(sKey);
431
+ oSmartFilterbar.openValueHelpRequestForFilterItem(sKey);
430
432
  } catch (error) {
431
- oLogger.error("Value help cannot be triggered for the field " + oEvent.getParameter("key"));
433
+ oLogger.error("Value help cannot be triggered for the field " + sKey);
432
434
  }
433
435
  }
434
436
 
@@ -517,11 +519,11 @@ sap.ui.define([
517
519
  value2: result.selectedValues[1]
518
520
  }));
519
521
  } else {
520
- for (var i = 0;i < result.selectedValues.length;++i) {
522
+ for (var j = 0; j < result.selectedValues.length; ++j) {
521
523
  aFilters.push(new Filter({
522
524
  path: key,
523
525
  operator: result.operator,
524
- value1: result.selectedValues[i]
526
+ value1: result.selectedValues[j]
525
527
  }));
526
528
  }
527
529
  }
@@ -534,6 +536,7 @@ sap.ui.define([
534
536
 
535
537
  var aFinalResponse = [];
536
538
  var oOwnerFilterControl = oState.oSmartFilterbar;
539
+ var sKey = key;
537
540
  var sEntitySet = oController.getOwnerComponent().getEntitySet();
538
541
  var oEntityType = oTemplateUtils.oCommonUtils.getMetaModelEntityType(sEntitySet);
539
542
  var oSFBModel = oOwnerFilterControl.getModel();
@@ -638,6 +641,12 @@ sap.ui.define([
638
641
  oVHPromise.then((oValueList)=>{
639
642
  var oValueListDefaultBinding = oValueList[""];
640
643
  var sValueListEntity = oValueListDefaultBinding.CollectionPath.String;
644
+ if (Array.isArray(oValueListDefaultBinding.Parameters)) {
645
+ var oParameter = oValueListDefaultBinding.Parameters.find(oParam => (oParam.RecordType === "com.sap.vocabularies.Common.v1.ValueListParameterInOut" && oParam.LocalDataProperty.PropertyPath === sKey));
646
+ if (oParameter) {
647
+ key = oParameter.ValueListProperty.String;
648
+ }
649
+ }
641
650
  //Get All Records using $search
642
651
  aFilters.forEach((oFilter)=>{
643
652
  oSFBModel.read("/" + sValueListEntity, {
@@ -12,7 +12,7 @@ sap.ui.define([
12
12
  * Remove extra information from variant object keep only SelectionOptions and Parameters
13
13
  *
14
14
  * @param {object} oValue Variant value
15
- * @returns {object} Updated value of selection variant after removinig the extra info
15
+ * @returns {object} Updated value of selection variant after removing the extra info
16
16
  */
17
17
  function removeExtraInfoVariant(oValue) {
18
18
  if (oValue) {
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  delete oValue.ParameterContextUrl;
29
29
  return oValue;
30
30
  }
31
- return oValue;
31
+ return null;
32
32
  }
33
33
 
34
34
  /**
@@ -271,11 +271,9 @@ sap.ui.define([
271
271
  var sRangeText = "";
272
272
 
273
273
  if (Array.isArray(aFilterLabel)) {
274
- aFilterLabel.filter(function(sText) {
275
- if (sText && sText.includes(oRange.Low)) {
276
- sRangeText = sText;
277
- }
278
- });
274
+ sRangeText = aFilterLabel.find(function(sText) {
275
+ return sText && sText.includes(oRange.Low);
276
+ }) || "";
279
277
  } else if (typeof aFilterLabel === "string") {
280
278
  sRangeText = aFilterLabel;
281
279
  }