@sapui5/sap.suite.ui.generic.template 1.120.32 → 1.120.33

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 (26) 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/controller/ControllerImplementation.js +7 -10
  4. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_fr_CA.properties +1 -1
  5. package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
  6. package/src/sap/suite/ui/generic/template/AnalyticalListPage/util/AnnotationHelper.js +1 -1
  7. package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
  8. package/src/sap/suite/ui/generic/template/ListReport/controller/ControllerImplementation.js +0 -1
  9. package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
  10. package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +1 -1
  11. package/src/sap/suite/ui/generic/template/ObjectPage/controller/SectionTitleHandler.js +18 -12
  12. package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
  13. package/src/sap/suite/ui/generic/template/ObjectPage/view/Details.view.xml +2 -3
  14. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/SmartForm.fragment.xml +1 -0
  15. package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
  16. package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
  17. package/src/sap/suite/ui/generic/template/genericUtilities/FeLogger.js +0 -1
  18. package/src/sap/suite/ui/generic/template/js/AnnotationHelper.js +92 -32
  19. package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
  20. package/src/sap/suite/ui/generic/template/lib/CRUDHelper.js +2 -2
  21. package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +3 -3
  22. package/src/sap/suite/ui/generic/template/lib/PageLeaveHandler.js +6 -6
  23. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_id.properties +1 -1
  24. package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +1 -1
  25. package/src/sap/suite/ui/generic/template/library.js +1 -1
  26. package/ui5.yaml +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.suite.ui.generic.template",
3
- "version": "1.120.32",
3
+ "version": "1.120.33",
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.120.32</version>
10
+ <version>1.120.33</version>
11
11
 
12
12
  <documentation>Library with generic Suite UI templates.</documentation>
13
13
 
@@ -1,4 +1,3 @@
1
- /* global window sap */
2
1
  sap.ui.define(["sap/fe/navigation/SelectionVariant",
3
2
  "sap/suite/ui/generic/template/AnalyticalListPage/extensionAPI/ExtensionAPI",
4
3
  "sap/suite/ui/generic/template/AnalyticalListPage/controller/FilterBarController",
@@ -151,17 +150,15 @@ sap.ui.define(["sap/fe/navigation/SelectionVariant",
151
150
  oController.templateBaseExtension.onInitSmartFilterBar(oEvent);
152
151
  }
153
152
  function onSmartFilterBarInitialized(){
153
+ var manifestSetting = oState.oController.getOwnerComponent();
154
+ if (oState.hideVisualFilter || (manifestSetting.getDefaultFilterMode() == "visual" && manifestSetting.getModel().mMetadataUrlParams && manifestSetting.getModel().mMetadataUrlParams["sap-value-list"] === "none" )) {
155
+ if (oState.alr_visualFilterBar && !oState.alr_visualFilterBar.getAssociateValueListsCalled()) {
156
+ oState.alr_visualFilterBar.setAssociateValueListsCalled(true);
157
+ }
158
+ oState.oSmartFilterbar.associateValueLists();
159
+ }
154
160
  var oAppStatePromise = oState.oIappStateHandler.onSmartFilterBarInitialized();
155
161
  oAppStatePromise.then(function(){
156
- //execute oSmartFilterbar.associateValueLists after the oSmartFilterbar.setUiState is called
157
- //to restore the selection options from the URL parameters
158
- var manifestSetting = oState.oController.getOwnerComponent();
159
- if (oState.hideVisualFilter || (manifestSetting.getDefaultFilterMode() == "visual" && manifestSetting.getModel().mMetadataUrlParams && manifestSetting.getModel().mMetadataUrlParams["sap-value-list"] === "none" )) {
160
- if (oState.alr_visualFilterBar && !oState.alr_visualFilterBar.getAssociateValueListsCalled()) {
161
- oState.alr_visualFilterBar.setAssociateValueListsCalled(true);
162
- }
163
- oState.oSmartFilterbar.associateValueLists();
164
- }
165
162
  oState._bIsStartingUp = false;
166
163
  //visual filter config and bindings must be updated after vf has been initialised
167
164
  if (oState.bVisualFilterInitialised) {
@@ -57,7 +57,7 @@ VISUAL_FILTER_CHART_TYPES=Types de diagrammes
57
57
 
58
58
  VISUAL_FILTER_CHART_TYPE_BAR=Diagramme \u00E0 barres
59
59
 
60
- VISUAL_FILTER_CHART_TYPE_Line=Graphique lin\u00E9aire
60
+ VISUAL_FILTER_CHART_TYPE_Line=Diagramme \u00E0 lignes
61
61
 
62
62
  VISUAL_FILTER_CHART_TYPE_Donut=Graphique en anneaux
63
63
 
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.120.32"
11
+ "version": "1.120.33"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -337,7 +337,7 @@ sap.ui.define(["sap/ui/base/Object",
337
337
  for (var item = 0; item < Object.keys(oKPIObject).length; item++){
338
338
  if (oKPIObject[Object.keys(oKPIObject)[item]]["filterable"]) {
339
339
  kpiContext.filterableKPIs.push(oKPIObject[Object.keys(oKPIObject)[item]]);
340
- }else {
340
+ } else {
341
341
  kpiContext.globalKPIs.push(oKPIObject[Object.keys(oKPIObject)[item]]);
342
342
  }
343
343
  }
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.120.32"
11
+ "version": "1.120.33"
12
12
  },
13
13
  "title": "Canvas",
14
14
  "description": "Canvas Page",
@@ -1,4 +1,3 @@
1
- /* global window */
2
1
  sap.ui.define([
3
2
  "sap/ui/model/Filter",
4
3
  "sap/suite/ui/generic/template/ListReport/extensionAPI/ExtensionAPI",
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.120.32"
11
+ "version": "1.120.33"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -1979,8 +1979,8 @@ sap.ui.define([
1979
1979
  fnAdjustSubSectionTitleForSmartForm(oSubSection, mSubSectionTitle[sSectionId]);
1980
1980
  }
1981
1981
  }
1982
+ oState.oSectionTitleHandler.setHeaderSmartFormAriaLabelBy(oSubSection);
1982
1983
  }
1983
- oState.oSectionTitleHandler.manageAccessability(oSubSection);
1984
1984
  }
1985
1985
 
1986
1986
  if (oSubSectionInfoObj) { // In case of EditableHeaderFacet Sections & SubSection is created at runtime and there is info object handling
@@ -1,15 +1,16 @@
1
1
  sap.ui.define([
2
2
  "sap/ui/base/Object",
3
3
  "sap/base/util/extend",
4
- "sap/suite/ui/generic/template/genericUtilities/controlHelper"
5
- ], function(BaseObject, extend, controlHelper) {
4
+ "sap/suite/ui/generic/template/genericUtilities/controlHelper",
5
+ "sap/ui/core/Element",
6
+ "sap/ui/core/InvisibleText"
7
+ ], function(BaseObject, extend, controlHelper, Element, InvisibleText) {
6
8
  "use strict";
7
9
 
8
10
  function getMethods(oTemplateUtils) {
9
11
 
10
- function fnManageAccessability(oFirstSubSection) {
11
- var oSubSectionInfoObject = oTemplateUtils.oInfoObjectHandler.getControlInformation(oFirstSubSection.getId()),
12
- oSection = oFirstSubSection.getParent();
12
+ function fnSetHeaderSmartFormAriaLabelBy(oFirstSubSection) {
13
+ var oSubSectionInfoObject = oTemplateUtils.oInfoObjectHandler.getControlInformation(oFirstSubSection.getId());
13
14
  oFirstSubSection.getBlocks().concat(oFirstSubSection.getMoreBlocks())
14
15
  .reduce(function(accBlock, currentBlock) {
15
16
  if (!currentBlock.getContent || !currentBlock.getContent() || !currentBlock.getContent().length) {
@@ -26,12 +27,17 @@ sap.ui.define([
26
27
  .forEach(function(entry) {
27
28
  if (!oSubSectionInfoObject) {
28
29
  // Case: header is editable. manifest.json, editableHeaderContent=true
29
- entry._suggestTitleId(oSection.getId() + "-title"); // set Section title id that will be used for aria
30
- return;
31
- }
32
- if (entry.getGroups().length === 1 && entry.getGroups()[0].getTitle && !entry.getGroups()[0].getTitle()) {
33
- // Case: Section -> one SubSection -> one SmartForm -> one Group. Title is not displayed in this case
34
- entry._suggestTitleId(oSection.getId() + "-title"); // set title to SubSection title id that will be used for aria
30
+ var sInvisibleTextID = `${entry.getId()}-ariaLabelBy-InvisibleText`,
31
+ oInvisibleText = Element.getElementById(sInvisibleTextID);
32
+ if (!oInvisibleText) {
33
+ var customData = !entry.getCustomData() ? [] : entry.getCustomData().filter(function(entry) {return entry.getKey() === "smartFormAriaLabel";});
34
+ if (customData.length && customData[0].getValue()) {
35
+ oInvisibleText = new InvisibleText({id : sInvisibleTextID, text: customData[0].getValue()}).toStatic();
36
+ }
37
+ }
38
+ if (oInvisibleText) {
39
+ entry._suggestTitleId(oInvisibleText.getId()); // set Section title id that will be used for aria
40
+ }
35
41
  return;
36
42
  }
37
43
  });
@@ -39,7 +45,7 @@ sap.ui.define([
39
45
 
40
46
  // public instance methods
41
47
  return {
42
- manageAccessability: fnManageAccessability
48
+ setHeaderSmartFormAriaLabelBy: fnSetHeaderSmartFormAriaLabelBy //
43
49
  };
44
50
  }
45
51
 
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.120.32"
9
+ "version": "1.120.33"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -156,9 +156,8 @@
156
156
  <uxap:landmarkInfo>
157
157
  <uxap:ObjectPageAccessibleLandmarkInfo
158
158
  rootRole="None"
159
- rootLabel=""
160
- footerRole="ContentInfo"
161
- footerLabel="{i18n>FOOTER_REGION_LABEL_ARIA}"/>
159
+ rootLabel=" "
160
+ footerRole="ContentInfo"/>
162
161
  </uxap:landmarkInfo>
163
162
  </uxap:ObjectPageLayout>
164
163
 
@@ -21,6 +21,7 @@
21
21
  <core:CustomData key="defaultDropDownDisplayBehaviour" value="descriptionOnly" />
22
22
  <core:CustomData key="defaultTextInEditModeSource" value="ValueListNoValidation" />
23
23
  <core:CustomData key="dateFormatSettings" value='\{"UTC":true,"style":"medium"\}' />
24
+ <core:CustomData key="smartFormAriaLabel" value="{parts: [{path: 'facet>'}, {path: 'entitySet>name'}], formatter: 'AH.getSmartFormTitle'}" />
24
25
  </sfo:customData>
25
26
  <sfo:layout>
26
27
  <template:if test="{= ${appSettings>/useColumnLayoutForSmartForm} !== false}">
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.120.32"
9
+ "version": "1.120.33"
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.120.32"
9
+ "version": "1.120.33"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -2,7 +2,6 @@
2
2
  * Fiori Element logger which prefix Fiori Elements for the log along with component
3
3
  */
4
4
  /* eslint-disable no-alert */
5
- /* global Promise */
6
5
  sap.ui.define([
7
6
  "sap/ui/base/Object",
8
7
  "sap/base/Log",
@@ -43,7 +43,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
43
43
  return oListEntry.PropertyPath === oProperty;
44
44
  });
45
45
  };
46
-
46
+
47
47
  var bNotSortable = fnHasListProperty(oContextSet["Org.OData.Capabilities.V1.SortRestrictions"] && oContextSet["Org.OData.Capabilities.V1.SortRestrictions"].NonSortableProperties);
48
48
  var oFilterRestrictions = oContextSet["Org.OData.Capabilities.V1.FilterRestrictions"];
49
49
  var bNotFilterable = !!oFilterRestrictions && (oFilterRestrictions.Filterable === "false" || fnHasListProperty(oFilterRestrictions.NonFilterableProperties));
@@ -312,7 +312,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
312
312
  return oHidden["com.sap.vocabularies.UI.v1.Hidden"].Bool !== "true";
313
313
  }
314
314
  return false; // <Annotation Term="UI.Hidden"/>
315
- }
315
+ }
316
316
  return true;
317
317
  },
318
318
 
@@ -990,13 +990,13 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
990
990
  var oDataField = {"Path":oSmartField.path};
991
991
  return AnnotationHelperModel.simplePath(oInterface.getModel() ? oInterface : oInterface.getInterface(0), oDataField);
992
992
  },
993
-
993
+
994
994
  // build expression binding for bread crumbs
995
995
  buildBreadCrumbExpression: function (oContext, oTreeNode) {
996
996
  var oHeaderInfo = oTreeNode.entityTypeDefinition && oTreeNode.entityTypeDefinition["com.sap.vocabularies.UI.v1.HeaderInfo"];
997
997
  var oTitle = oHeaderInfo && oHeaderInfo.Title && oHeaderInfo.Title.Value;
998
998
  var sBindingTitle = oTitle && AnnotationHelperModel.format(oContext, oTitle);
999
- var oTypeName = oHeaderInfo && oHeaderInfo.TypeName;
999
+ var oTypeName = oHeaderInfo && oHeaderInfo.TypeName;
1000
1000
  // Revisit (AncestorFeature)
1001
1001
  //sBindingTitle = sBindingTitle.replace("{", "{" + oTreeNode.specificModelName + ">");
1002
1002
  if (oTitle && oTitle.Path && oTypeName && oTypeName.String) {
@@ -1140,7 +1140,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
1140
1140
  var sPostfix = "], formatter: 'sap.suite.ui.generic.template.js.RuntimeFormatters.formatImageUrl'}";
1141
1141
  return sPrefix + sInfix + sPostfix;
1142
1142
  }
1143
- // Apply
1143
+ // Apply
1144
1144
  oImageUrl.Apply.Parameters[0].Value = utils.adjustImageUrlPath(oImageUrl.Apply.Parameters[0].Value, sAppComponentName);
1145
1145
  return AnnotationHelperModel.format(oInterface, oImageUrl);
1146
1146
  },
@@ -1162,8 +1162,8 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
1162
1162
 
1163
1163
  getAvatarInitials: function (oInitials) {
1164
1164
  return (oInitials && (oInitials.Path ? ("{" + oInitials.Path + "}") : oInitials.String) || "");
1165
-
1166
- },
1165
+
1166
+ },
1167
1167
 
1168
1168
  formatImageOrTypeUrl: function (oInterface, oInputImageUrl, oTypeImageUrl, sAppComponentName, bExpand) {
1169
1169
  var oImageUrl = oInputImageUrl || oTypeImageUrl;
@@ -1172,7 +1172,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
1172
1172
 
1173
1173
  formatHeaderImage: function (oInterface, oHeaderInfo, sAppComponentName) {
1174
1174
  return oAnnotationHelper.formatImageOrTypeUrl(oInterface, oHeaderInfo.ImageUrl, oHeaderInfo.TypeImageUrl, sAppComponentName, true);
1175
- },
1175
+ },
1176
1176
 
1177
1177
  getPathWithExpandFromHeader: function (oInterface, oEntitySet, sNavigationProperty, oInputImageUrl, oTypeImageUrl) {
1178
1178
  var sExpand, sNavigationPath;
@@ -1692,7 +1692,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
1692
1692
  return iDraftColumnIndex;
1693
1693
  },
1694
1694
 
1695
- // Calculating the column index of Draft Indicator Column for sap.ui.table based on the column index of last Semnatic key avaible
1695
+ // Calculating the column index of Draft Indicator Column for sap.ui.table based on the column index of last Semnatic key avaible
1696
1696
  // or else on the 1st Index of the table.
1697
1697
  _determineColumnIndexForDraftColumn: function (oContext, oLineItem) {
1698
1698
  var sLineItemPath = oContext.getPath();
@@ -2024,7 +2024,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
2024
2024
 
2025
2025
  createP13NFileUploader: function(oInterface, oContextSet) {
2026
2026
  var oEntityType = oInterface.getModel(0).getODataEntityType(oContextSet.entityType);
2027
- var sP13N = "";
2027
+ var sP13N = "";
2028
2028
  var oContentDisposition = oEntityType && oEntityType["Org.OData.Core.V1.ContentDisposition"];
2029
2029
  var sColumnKey = oContentDisposition && oContentDisposition.Filename && oContentDisposition.Filename.Path;
2030
2030
  var sFCPath = oEntityType["com.sap.vocabularies.Common.v1.FieldControl"] && oEntityType["com.sap.vocabularies.Common.v1.FieldControl"].Path;
@@ -2296,7 +2296,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
2296
2296
  return false;
2297
2297
  }
2298
2298
  var sImageSrc = oAnnotationHelper.formatImageUrl(oInterface, oImageUrl, sAppComponentName);
2299
- return !!sImageSrc;
2299
+ return !!sImageSrc;
2300
2300
  },
2301
2301
  getVisibilityForExtensionPointBeforeSimpleHeaderFacet: function (sEntitySet, oFacet, oManifestExtend, oDataField) {
2302
2302
  var sSecondHalfIdPart;
@@ -2579,7 +2579,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
2579
2579
  var bHasSubObjectPage = oAnnotationHelper.hasSubObjectPage(oRelatedEntitySet, aSubPages),
2580
2580
  sTableCreationMode = oAnnotationHelper.getCreationMode(oFacet, oSections),
2581
2581
  bIsInlineCreationMode = ["inline", "creationRows", "creationRowsHiddenInEditMode"].includes(sTableCreationMode);
2582
-
2582
+
2583
2583
  if (bHasSubObjectPage || bIsInlineCreationMode || oCreateWithParameterDialog) {
2584
2584
  var aConditions = [],
2585
2585
  sFinalCondition,
@@ -2632,7 +2632,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
2632
2632
  // If the creatable path is boolean, return it
2633
2633
  if (typeof vCreatablePath === "boolean") {
2634
2634
  return vCreatablePath;
2635
- }
2635
+ }
2636
2636
  // Return the creatable path is a valid property path (string), create an expression and return it
2637
2637
  var sPrefix = (oCreatablePathObj.negate) ? "!" : "!!";
2638
2638
  var sCreatablePathExp = sPrefix + "${" + vCreatablePath + "}";
@@ -2669,7 +2669,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
2669
2669
  * @returns {object} oResult - an object contains the creatable path info
2670
2670
  * oResult.creatable - true or false or the creatable-path (string)
2671
2671
  * oResult.negate - true when the creatable path is a non-insertable navigation property
2672
- *
2672
+ *
2673
2673
  */
2674
2674
  getCreatablePath: function (oInterface, oSourceEntitySet, oRelatedEntitySet) {
2675
2675
 
@@ -2679,7 +2679,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
2679
2679
  var oSourceEntityType = oModel.getODataEntityType(oSourceEntitySet.entityType);
2680
2680
  var oRestrictionSetViaNavRestrictions;
2681
2681
  var sFullCreatablePath;
2682
-
2682
+
2683
2683
  // check if there are Insert Restrictions.
2684
2684
  oRestrictionSetViaNavRestrictions = oAnnotationHelper.handleNavigationRestrictions(oModel, oSourceEntitySet, oRelatedEntitySet, "Insertable");
2685
2685
  if (oRestrictionSetViaNavRestrictions && oRestrictionSetViaNavRestrictions["Insertable"]) {
@@ -2719,7 +2719,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
2719
2719
  }
2720
2720
  }
2721
2721
  }
2722
-
2722
+
2723
2723
  return oResult;
2724
2724
  },
2725
2725
  /***************************************************************
@@ -3339,7 +3339,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
3339
3339
  getActionCommandVisibility: function (sButtonId) {
3340
3340
  return !sButtonId || "{= " + oAnnotationHelper.getControlVisibleTerm(sButtonId) + " && " + oAnnotationHelper.getControlEnabledTerm(sButtonId) + "}";
3341
3341
  },
3342
-
3342
+
3343
3343
  buildVisibilityExprOfDataFieldForIntentBasedNaviButton: function (oDataField) {
3344
3344
  //If UI.Hidden annotation is used, UI.Hidden gets the highest priority
3345
3345
  if (oDataField["com.sap.vocabularies.UI.v1.Hidden"]) {
@@ -3667,7 +3667,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
3667
3667
  }
3668
3668
  return sRet;
3669
3669
  },
3670
-
3670
+
3671
3671
  // Note: This function is a temporary solution. It imitates the logic implemented by AnnotationHelperModel.simplePath and returns false exactly when that function would return a binding string but
3672
3672
  // logs that this binding string is incorrect. In all other cases it returns true (even if AnnotationHelperModel.simplePath throws an exception).
3673
3673
  isDataFieldRenderable: function(oInterface, oDataFieldValue){
@@ -3720,7 +3720,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
3720
3720
  AnnotationHelperModelBasics.expectType(oSubPathValue, "string");
3721
3721
  // Note: "PropertyPath" is treated the same...
3722
3722
  var oTarget = AnnotationHelperModelBasics.followPath(oSubPathValueInterface, {"Path" : sBindingPath});
3723
- return !!(oTarget && oTarget.resolvedPath);
3723
+ return !!(oTarget && oTarget.resolvedPath);
3724
3724
 
3725
3725
  case "Bool": // 14.4.2 Expression edm:Bool
3726
3726
  case "Date": // 14.4.3 Expression edm:Date
@@ -3749,7 +3749,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
3749
3749
  return true;
3750
3750
  default:
3751
3751
  return true;
3752
- }
3752
+ }
3753
3753
  },
3754
3754
 
3755
3755
  setNoDataTextForSmartTable: function (sEntitySet, sSmartTableId) {
@@ -4062,13 +4062,13 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
4062
4062
  }
4063
4063
  if (oAddress[0].locality) {
4064
4064
  sAddress += (AnnotationHelperModel.format(oInterface, oAddress[0].locality) + ", ");
4065
- }
4065
+ }
4066
4066
  if (oAddress[0].region) {
4067
4067
  sAddress += (AnnotationHelperModel.format(oInterface, oAddress[0].region) + ", ");
4068
- }
4068
+ }
4069
4069
  if (oAddress[0].country) {
4070
4070
  sAddress += (AnnotationHelperModel.format(oInterface, oAddress[0].country) + ", ");
4071
- }
4071
+ }
4072
4072
  return sAddress.slice(0, sAddress.length - 2);
4073
4073
  },
4074
4074
 
@@ -4120,7 +4120,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
4120
4120
  var aIsCopyAction = (aCollection || []).filter(function (oRecord) {
4121
4121
  return (oRecord.RecordType === "com.sap.vocabularies.UI.v1.DataFieldForAction" && (oRecord["com.sap.vocabularies.UI.v1.IsCopyAction"] && oRecord["com.sap.vocabularies.UI.v1.IsCopyAction"].Bool));
4122
4122
  });
4123
-
4123
+
4124
4124
  if (aIsCopyAction.length > 1) {
4125
4125
  oLogger.error("Multiple actions are annotated with isCopyAction. There can be only one standard copy action.");
4126
4126
  }
@@ -4129,8 +4129,8 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
4129
4129
 
4130
4130
  /**
4131
4131
  * This method reads the insertable navigation restrictions from parent entity and builds customize config object.
4132
- * The smart table reads the customize config and sets the editability of smart fields
4133
- *
4132
+ * The smart table reads the customize config and sets the editability of smart fields
4133
+ *
4134
4134
  * @param {*} oInterface Context
4135
4135
  * @param {*} oSourceEntitySet Parent entity set (entity set of object page)
4136
4136
  * @param {*} oRelatedEntitySet Entity set of smart table
@@ -4152,7 +4152,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
4152
4152
  }
4153
4153
  //Turn off client-side mandatory check
4154
4154
  oCustomizeConfig["clientSideMandatoryCheck"] = {
4155
- "*": false
4155
+ "*": false
4156
4156
  };
4157
4157
  sCustomizeConfig = JSON.stringify(oCustomizeConfig);
4158
4158
  return sCustomizeConfig;
@@ -4199,7 +4199,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
4199
4199
  }
4200
4200
  return sActionPress;
4201
4201
  },
4202
-
4202
+
4203
4203
  /**
4204
4204
  * A side effect should get triggered directly if a value is selected for a field like value help/combo box, checkbox, date picker, datetime picker
4205
4205
  * provided a side effect is defined on this field. However this should be only done if the side effect has only one source property (the source property must
@@ -4208,7 +4208,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
4208
4208
  * @param {boolean} isDraftEnabled draft or non draft scenario
4209
4209
  * @param {object} oMetaModel metamodel
4210
4210
  * @param {string} sEntityType entity type of the detail page to which property belongs
4211
- * @returns side effect source property's type which represents if the field is annotated as single source property in the side effect or is also used in
4211
+ * @returns side effect source property's type which represents if the field is annotated as single source property in the side effect or is also used in
4212
4212
  * combination with other field(s).
4213
4213
  */
4214
4214
  getSideEffectSourcePropertyType: function(sPropertyPath, isDraftEnabled, oMetaModel, sEntityType) {
@@ -4216,7 +4216,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
4216
4216
  },
4217
4217
 
4218
4218
  /**
4219
- * From UI5 v1.109, variant management is going to be enabled (by default) for smart table/chart and it will lead to the the issue of having multiple
4219
+ * From UI5 v1.109, variant management is going to be enabled (by default) for smart table/chart and it will lead to the the issue of having multiple
4220
4220
  * duplicate implicit variants created by SVM (named as Personlization), and in order to mitigate the issue, persistencyKey has to be changed in certian scenarios.
4221
4221
  * scenarios. With this change, application(s) who has already enabled the variant management will continue to have the old persistencyKey and should have
4222
4222
  * no impact whatsoever. However, application(s) should not enable it going forward because of two reasons:
@@ -4263,10 +4263,69 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
4263
4263
  : "";
4264
4264
  },
4265
4265
 
4266
- getNavigationPropertyPath: function (oInterface, vRawValue) {
4266
+ getNavigationPropertyPath: function (oInterface, vRawValue) {
4267
4267
  var sNavigationPath = AnnotationHelperModel.getNavigationPath(oInterface, vRawValue);
4268
4268
  var sNavigationPropertyPath = sNavigationPath.replace("{", "").replace("}", "");
4269
4269
  return sNavigationPropertyPath;
4270
+ },
4271
+
4272
+ getModelData: function(oInterface, sBaseAnnotationPath, sEntitySetName) {
4273
+ var oModel = oInterface.getModel() ? oInterface.getModel() : oInterface.getInterface(0).getModel(),
4274
+ oBaseEntityType = oModel.getODataEntityType(oModel.getODataEntitySet(sEntitySetName).entityType);
4275
+
4276
+ if (sBaseAnnotationPath.indexOf("/") > -1) {
4277
+ var oRelevantData = oAnnotationHelper.getRelevantDataForAnnotationRecord(oModel, sBaseAnnotationPath, oBaseEntityType);
4278
+ return {
4279
+ sAnnotationPath: oRelevantData.dataFieldValuePath[0] === '@' ? oRelevantData.dataFieldValuePath.substring(1) : oRelevantData.dataFieldValuePath,
4280
+ oEntityType: oRelevantData.entityType
4281
+ };
4282
+ }
4283
+ return {
4284
+ sAnnotationPath: sBaseAnnotationPath[0] === '@' ? sBaseAnnotationPath.substring(1) : sBaseAnnotationPath,
4285
+ oEntityType: oBaseEntityType
4286
+ };
4287
+ },
4288
+
4289
+ getSmartFormTitle: function(oInterface, oFacet, sEntitySetName) {
4290
+ if (!oFacet) {
4291
+ return;
4292
+ }
4293
+ if (oFacet.Target && oFacet.Target.AnnotationPath && oFacet.Target.AnnotationPath.indexOf("com.sap.vocabularies.UI.v1.DataPoint") > -1) {
4294
+ // Process DataPoint case
4295
+ var { sAnnotationPath, oEntityType } = oAnnotationHelper.getModelData(oInterface, oFacet.Target.AnnotationPath, sEntitySetName);
4296
+ if (oEntityType[sAnnotationPath] && oEntityType[sAnnotationPath].Title && oEntityType[sAnnotationPath].Title.String) {
4297
+ return oEntityType[sAnnotationPath].Title.String;
4298
+ }
4299
+ // As DataPoint don't have title -> try to get property name as SmartForm title
4300
+ if (!oEntityType[sAnnotationPath] || !oEntityType[sAnnotationPath].Value || !oEntityType[sAnnotationPath].Value.Path || !oEntityType.property) {
4301
+ return;
4302
+ }
4303
+ var aProperty = oEntityType.property.filter(function(entry) {
4304
+ return entry.name === oEntityType[sAnnotationPath].Value.Path;
4305
+ });
4306
+ if (aProperty.length && aProperty[0]['sap:label']) {
4307
+ // Property name found
4308
+ return aProperty[0]['sap:label'];
4309
+ }
4310
+ return;
4311
+ }
4312
+ // It's Identification or FieldGroup case
4313
+ if (oFacet.Label && oFacet.Label.String) {
4314
+ return oFacet.Label.String;
4315
+ }
4316
+ if (!oFacet.Target || !oFacet.Target.AnnotationPath) {
4317
+ return;
4318
+ }
4319
+ if (oFacet.Target.AnnotationPath.indexOf("com.sap.vocabularies.UI.v1.Identification") > -1) {
4320
+ // Identification entry don't have any data which we can use as SmartForm title.
4321
+ return;
4322
+ }
4323
+ var { sAnnotationPath, oEntityType } = oAnnotationHelper.getModelData(oInterface, oFacet.Target.AnnotationPath, sEntitySetName);
4324
+ if (oEntityType[sAnnotationPath] && oEntityType[sAnnotationPath].Label && oEntityType[sAnnotationPath].Label.String) {
4325
+ // Use FieldGroup.Label.String as SmartForm title
4326
+ return oEntityType[sAnnotationPath].Label.String;
4327
+ }
4328
+ return;
4270
4329
  }
4271
4330
  };
4272
4331
  oAnnotationHelper.getBlockForEditableHeaderFacet.requiresIContext = true;
@@ -4334,6 +4393,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
4334
4393
  oAnnotationHelper.getLinkTextForDFwithEmail.requiresIContext = true;
4335
4394
  oAnnotationHelper.checkIsEmailAddress.requiresIContext = true;
4336
4395
  oAnnotationHelper.isEmailAddressAndMuliplicity.requiresIContext = true;
4337
-
4396
+ oAnnotationHelper.getSmartFormTitle.requiresIContext = true;
4397
+
4338
4398
  return oAnnotationHelper;
4339
4399
  }, /* bExport= */ true);
@@ -922,7 +922,7 @@ sap.ui.define([
922
922
  * @extends sap.ui.core.UIComponent
923
923
  * @abstract
924
924
  * @author SAP SE
925
- * @version 1.120.32
925
+ * @version 1.120.33
926
926
  * @name sap.suite.ui.generic.template.lib.AppComponent
927
927
  */
928
928
  return UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
@@ -291,7 +291,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
291
291
  oModel.createBindingContext(sBindingPath, null, null, function(oBindingContext){
292
292
  if (oDraftContext.isDraftEnabled(sEntitySet)) {
293
293
  // todo: enable preserveChanges
294
- if (true || !oDraftContext.hasPreserveChanges(oBindingContext)) {
294
+ //if (true || !oDraftContext.hasPreserveChanges(oBindingContext)) { //Commenting out this if condition to avoid eslint error
295
295
  fnReadDraftAdministrativeData(oModel, sBindingPath, oTemplateContract.oBusyHelper).then(function(oResponse) {
296
296
  if (!oResponse.DraftAdministrativeData || oResponse.DraftAdministrativeData.DraftIsCreatedByMe) {
297
297
  // no or own draft
@@ -319,7 +319,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
319
319
  draftAdminReadResponse: oResponse
320
320
  });
321
321
  });
322
- }
322
+ // }
323
323
  } else {
324
324
  resolve({
325
325
  context: oBindingContext
@@ -1097,7 +1097,8 @@ sap.ui.define(["sap/ui/base/Object",
1097
1097
  renderQuickViewFragment.call(this);
1098
1098
  });
1099
1099
 
1100
- if (false && !bFieldGroupAvailable && aContactTitleArea && aContactTitleArea.length && aContactTitleArea.length < 2) { // Below code is to consume Teams Contacts Collaboration Helper. Commenting this code until we get clarity on CA
1100
+ var skipBelowCode = true;
1101
+ if (!skipBelowCode && !bFieldGroupAvailable && aContactTitleArea && aContactTitleArea.length && aContactTitleArea.length < 2) { // Below code is to consume Teams Contacts Collaboration Helper. Commenting this code until we get clarity on CA
1101
1102
  var oModel = oController.getOwnerComponent().getModel();
1102
1103
  var oContactDataContext = oModel.getContext(sControlBindingContextPath);
1103
1104
  var oContactData = oContactDataContext.getProperty(oTargetAnnotation.navigation);
@@ -1118,7 +1119,6 @@ sap.ui.define(["sap/ui/base/Object",
1118
1119
  }
1119
1120
  }
1120
1121
 
1121
- var skipBelowCode = true;
1122
1122
  if (!skipBelowCode) { // Below code is to consume Teams Contacts Collaboration. Commenting this code until we get clarity on CA
1123
1123
  ServiceContainer.getServiceAsync().then(function (oTeamsHelper) {
1124
1124
  if (typeof oTeamsHelper.isContactsCollaborationSupported === 'function' && oTeamsHelper.isContactsCollaborationSupported()) {
@@ -1470,7 +1470,6 @@ sap.ui.define(["sap/ui/base/Object",
1470
1470
  var oLineItems = oEntityType[sLineItemAnnotation] || []; // some tests in safety net run without any lineitem annotation - seems to work somehow at least for tree table;
1471
1471
  for (var index = 0; index < oLineItems.length; index++) {
1472
1472
  switch (oLineItems[index].RecordType) {
1473
- default: break;
1474
1473
  case "com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation":
1475
1474
  case "com.sap.vocabularies.UI.v1.DataFieldWithNavigationPath":
1476
1475
  var aDataFieldsWithNavigation = fnGetDataFieldsWithNavigation(oLineItems[index], oMetaModel, oEntityType);
@@ -1505,6 +1504,7 @@ sap.ui.define(["sap/ui/base/Object",
1505
1504
  }
1506
1505
  }
1507
1506
  break;
1507
+ default: break;
1508
1508
  }
1509
1509
  }
1510
1510
 
@@ -37,23 +37,23 @@ sap.ui.define(["sap/ui/base/Object",
37
37
  onDraftPopupOk: function () {
38
38
  var selectedItem = getSelectedKey(oDraftPopup);
39
39
  switch (selectedItem) {
40
- case "draftPopupOptionSave": {
40
+ case "draftPopupOptionSave":
41
41
  var oBeforeSavePromise = Promise.resolve(getComponent().oController.beforeSaveExtension());
42
42
  oBeforeSavePromise.then(fnSaveDraft.bind(null, oTemplateContract, sMode), Function.prototype);
43
43
  oDraftPopup.close();
44
- } break;
45
- case "draftPopupOptionKeep": {
44
+ break;
45
+ case "draftPopupOptionKeep":
46
46
  oTemplateContract.oAppComponent.getApplicationController().synchronizeDraftAsync().then(function() {
47
47
  fnOnDiscardOrKeepDraftConfirmed();
48
48
  }).finally(function() {
49
49
  oDraftPopup.close();
50
50
  });
51
- } break;
52
- case "draftPopupOptionDiscard": {
51
+ break;
52
+ case "draftPopupOptionDiscard":
53
53
  var discardDraftPromise = fnDiscardDraft(sMode).then(fnOnDiscardOrKeepDraftConfirmed);
54
54
  discardDraftPromise.catch(fnOnDiscardOrKeepDraftCancel);
55
55
  oDraftPopup.close();
56
- } break;
56
+ break;
57
57
  default:
58
58
  break;
59
59
  }
@@ -262,7 +262,7 @@ NOITEMS_SMARTCHART=Tidak ditemukan data.
262
262
 
263
263
  NOITEMS_LR_SMARTCHART=Tidak ada data untuk tampilan bagan dan kriteria filter yang dipilih.
264
264
 
265
- NOITEMS_SMARTCHART_WITH_FILTER=Data tak ada. Ubah parameter filter.
265
+ NOITEMS_SMARTCHART_WITH_FILTER=Data tidak ditemukan. Coba sesuaikan parameter filter.
266
266
 
267
267
  SMARTCHART_INITIAL_NODATA=Untuk memulai, tetapkan filter yang relevan, pilih "Masuk".
268
268
 
@@ -3089,7 +3089,7 @@ sap.ui.define(["sap/ui/base/Object",
3089
3089
  * @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
3090
3090
  * @public
3091
3091
  * @extends sap.ui.base.Object
3092
- * @version 1.120.32
3092
+ * @version 1.120.33
3093
3093
  * @since 1.30.0
3094
3094
  * @alias sap.suite.ui.generic.template.lib.NavigationController
3095
3095
  */
@@ -60,7 +60,7 @@ sap.ui.define([
60
60
  interfaces: [],
61
61
  controls: [],
62
62
  elements: [],
63
- version: "1.120.32",
63
+ version: "1.120.33",
64
64
  extensions: {
65
65
  //Configuration used for rule loading of Support Assistant
66
66
  "sap.ui.support": {
package/ui5.yaml CHANGED
@@ -1,4 +1,4 @@
1
- specVersion: '2.4'
1
+ specVersion: '3.0'
2
2
  type: library
3
3
  metadata:
4
4
  name: sap.suite.ui.generic.template