@sapui5/sap.suite.ui.generic.template 1.136.4 → 1.136.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.suite.ui.generic.template",
3
- "version": "1.136.4",
3
+ "version": "1.136.6",
4
4
  "description": "SAPUI5 Library sap.suite.ui.generic.template",
5
5
  "keywords": [
6
6
  "sapui5",
@@ -7,7 +7,7 @@
7
7
 
8
8
  (c) Copyright 2009-2015 SAP SE. All rights reserved
9
9
  </copyright>
10
- <version>1.136.4</version>
10
+ <version>1.136.6</version>
11
11
 
12
12
  <documentation>Library with generic Suite UI templates.</documentation>
13
13
 
@@ -153,17 +153,15 @@ sap.ui.define(["sap/fe/navigation/SelectionVariant",
153
153
  oController.templateBaseExtension.onInitSmartFilterBar(oEvent);
154
154
  }
155
155
  function onSmartFilterBarInitialized(){
156
+ var manifestSetting = oState.oController.getOwnerComponent();
157
+ if (oState.hideVisualFilter || (manifestSetting.getDefaultFilterMode() == "visual" && manifestSetting.getModel().mMetadataUrlParams && manifestSetting.getModel().mMetadataUrlParams["sap-value-list"] === "none" )) {
158
+ if (oState.alr_visualFilterBar && !oState.alr_visualFilterBar.getAssociateValueListsCalled()) {
159
+ oState.alr_visualFilterBar.setAssociateValueListsCalled(true);
160
+ }
161
+ oState.oSmartFilterbar.associateValueLists();
162
+ }
156
163
  var oAppStatePromise = oState.oIappStateHandler.onSmartFilterBarInitialized();
157
164
  oAppStatePromise.then(function(){
158
- //execute oSmartFilterbar.associateValueLists after the oSmartFilterbar.setUiState is called
159
- //to restore the selection options from the URL parameters
160
- var manifestSetting = oState.oController.getOwnerComponent();
161
- if (oState.hideVisualFilter || (manifestSetting.getDefaultFilterMode() == "visual" && manifestSetting.getModel().mMetadataUrlParams && manifestSetting.getModel().mMetadataUrlParams["sap-value-list"] === "none" )) {
162
- if (oState.alr_visualFilterBar && !oState.alr_visualFilterBar.getAssociateValueListsCalled()) {
163
- oState.alr_visualFilterBar.setAssociateValueListsCalled(true);
164
- }
165
- oState.oSmartFilterbar.associateValueLists();
166
- }
167
165
  oState._bIsStartingUp = false;
168
166
  //visual filter config and bindings must be updated after vf has been initialised
169
167
  if (oState.bVisualFilterInitialised) {
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.136.4"
11
+ "version": "1.136.6"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.136.4"
11
+ "version": "1.136.6"
12
12
  },
13
13
  "title": "Canvas",
14
14
  "description": "Canvas Page",
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.136.4"
11
+ "version": "1.136.6"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -1936,6 +1936,7 @@ sap.ui.define([
1936
1936
  oState.oSectionTitleHandler.adjustSubSectionTitle(oSubSection);
1937
1937
  // 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
1938
  oState.oSectionTitleHandler.addAccessibleName(oSubSection);
1939
+ oState.oSectionTitleHandler.setHeaderSmartFormAriaLabelBy(oSubSection);
1939
1940
  }
1940
1941
  }
1941
1942
 
@@ -2361,7 +2362,6 @@ sap.ui.define([
2361
2362
  oState.oMessageStripHelper = new MessageStripHelper(oMultipleViewsHandler, oController, oTemplateUtils, oBase.state.messageButtonHelper);
2362
2363
  oState.oInlineCreationRowsHelper = new InlineCreationRowsHelper(oObjectPage, oTemplateUtils, fnGetSmartTableCreationMode, oController, oState.oMessageStripHelper);
2363
2364
  oState.oSectionTitleHandler = new SectionTitleHandler(oController, oObjectPage, oTemplateUtils);
2364
-
2365
2365
  var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
2366
2366
 
2367
2367
 
@@ -1,6 +1,6 @@
1
1
  sap.ui.define(["sap/ui/base/Object", "sap/base/util/extend", "sap/suite/ui/generic/template/genericUtilities/controlHelper", "sap/ui/core/library",
2
- "sap/suite/ui/generic/template/genericUtilities/FeLogger"
3
- ], function(BaseObject, extend, controlHelper, SapCoreLibrary, FeLogger) {
2
+ "sap/suite/ui/generic/template/genericUtilities/FeLogger", "sap/ui/core/Element", "sap/ui/core/InvisibleText"
3
+ ], function(BaseObject, extend, controlHelper, SapCoreLibrary, FeLogger, Element, InvisibleText) {
4
4
  "use strict";
5
5
 
6
6
  var STYLE_CLASS_FOR_ADJUSTMENT = "sapUiTableOnObjectPageAdjustmentsForSection";
@@ -174,9 +174,8 @@ sap.ui.define(["sap/ui/base/Object", "sap/base/util/extend", "sap/suite/ui/gener
174
174
  oSmartForm.addAriaLabelledBy(sAnchorBarSectionHeaderId);
175
175
  }
176
176
 
177
- function fnManageAccessability(oFirstSubSection) {
178
- var oSubSectionInfoObject = oTemplateUtils.oInfoObjectHandler.getControlInformation(oFirstSubSection.getId()),
179
- oSection = oFirstSubSection.getParent();
177
+ function fnSetHeaderSmartFormAriaLabelBy(oFirstSubSection) {
178
+ var oSubSectionInfoObject = oTemplateUtils.oInfoObjectHandler.getControlInformation(oFirstSubSection.getId());
180
179
  oFirstSubSection.getBlocks().concat(oFirstSubSection.getMoreBlocks())
181
180
  .reduce(function(accBlock, currentBlock) {
182
181
  if (!currentBlock.getContent || !currentBlock.getContent() || !currentBlock.getContent().length) {
@@ -193,12 +192,17 @@ sap.ui.define(["sap/ui/base/Object", "sap/base/util/extend", "sap/suite/ui/gener
193
192
  .forEach(function(entry) {
194
193
  if (!oSubSectionInfoObject) {
195
194
  // Case: header is editable. manifest.json, editableHeaderContent=true
196
- entry._suggestTitleId(`${oSection.getId()}-title`); // set Section title id that will be used for aria
197
- return;
198
- }
199
- if (entry.getGroups().length === 1 && entry.getGroups()[0].getTitle && !entry.getGroups()[0].getTitle()) {
200
- // Case: Section -> one SubSection -> one SmartForm -> one Group. Title is not displayed in this case
201
- entry._suggestTitleId(`${oFirstSubSection.getId()}-headerTitle`); // set title to SubSection title id that will be used for aria
195
+ var sInvisibleTextID = `${entry.getId()}-ariaLabelBy-InvisibleText`,
196
+ oInvisibleText = Element.getElementById(sInvisibleTextID);
197
+ if (!oInvisibleText) {
198
+ var customData = !entry.getCustomData() ? [] : entry.getCustomData().filter(function(entry) {return entry.getKey() === "smartFormAriaLabel";});
199
+ if (customData.length && customData[0].getValue()) {
200
+ oInvisibleText = new InvisibleText({id : sInvisibleTextID, text: customData[0].getValue()}).toStatic();
201
+ }
202
+ }
203
+ if (oInvisibleText) {
204
+ entry._suggestTitleId(oInvisibleText.getId()); // set Section title id that will be used for aria
205
+ }
202
206
  return;
203
207
  }
204
208
  });
@@ -209,7 +213,7 @@ sap.ui.define(["sap/ui/base/Object", "sap/base/util/extend", "sap/suite/ui/gener
209
213
  setAsTitleOwner: fnSetAsTitleOwner,
210
214
  adjustSubSectionTitle: fnAdjustSubSectionTitle,
211
215
  addAccessibleName: fnAddAccessibleName,
212
- manageAccessability: fnManageAccessability
216
+ setHeaderSmartFormAriaLabelBy: fnSetHeaderSmartFormAriaLabelBy //
213
217
  };
214
218
  }
215
219
 
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.136.4"
9
+ "version": "1.136.6"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -170,9 +170,8 @@
170
170
  <uxap:landmarkInfo>
171
171
  <uxap:ObjectPageAccessibleLandmarkInfo
172
172
  rootRole="None"
173
- rootLabel=""
174
- footerRole="ContentInfo"
175
- footerLabel="{i18n>FOOTER_REGION_LABEL_ARIA}"/>
173
+ rootLabel=" "
174
+ footerRole="ContentInfo"/>
176
175
  </uxap:landmarkInfo>
177
176
  </uxap:ObjectPageLayout>
178
177
 
@@ -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.136.4"
9
+ "version": "1.136.6"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.136.4"
9
+ "version": "1.136.6"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -4505,6 +4505,65 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
4505
4505
  break;
4506
4506
  }
4507
4507
  return sPriority;
4508
+ },
4509
+
4510
+ getModelData: function(oInterface, sBaseAnnotationPath, sEntitySetName) {
4511
+ var oModel = oInterface.getModel() ? oInterface.getModel() : oInterface.getInterface(0).getModel(),
4512
+ oBaseEntityType = oModel.getODataEntityType(oModel.getODataEntitySet(sEntitySetName).entityType);
4513
+
4514
+ if (sBaseAnnotationPath.indexOf("/") > -1) {
4515
+ var oRelevantData = oAnnotationHelper.getRelevantDataForAnnotationRecord(oModel, sBaseAnnotationPath, oBaseEntityType);
4516
+ return {
4517
+ sAnnotationPath: oRelevantData.dataFieldValuePath[0] === '@' ? oRelevantData.dataFieldValuePath.substring(1) : oRelevantData.dataFieldValuePath,
4518
+ oEntityType: oRelevantData.entityType
4519
+ };
4520
+ }
4521
+ return {
4522
+ sAnnotationPath: sBaseAnnotationPath[0] === '@' ? sBaseAnnotationPath.substring(1) : sBaseAnnotationPath,
4523
+ oEntityType: oBaseEntityType
4524
+ };
4525
+ },
4526
+
4527
+ getSmartFormTitle: function(oInterface, oFacet, sEntitySetName) {
4528
+ if (!oFacet) {
4529
+ return;
4530
+ }
4531
+ if (oFacet.Target && oFacet.Target.AnnotationPath && oFacet.Target.AnnotationPath.indexOf("com.sap.vocabularies.UI.v1.DataPoint") > -1) {
4532
+ // Process DataPoint case
4533
+ var { sAnnotationPath, oEntityType } = oAnnotationHelper.getModelData(oInterface, oFacet.Target.AnnotationPath, sEntitySetName);
4534
+ if (oEntityType[sAnnotationPath] && oEntityType[sAnnotationPath].Title && oEntityType[sAnnotationPath].Title.String) {
4535
+ return oEntityType[sAnnotationPath].Title.String;
4536
+ }
4537
+ // As DataPoint don't have title -> try to get property name as SmartForm title
4538
+ if (!oEntityType[sAnnotationPath] || !oEntityType[sAnnotationPath].Value || !oEntityType[sAnnotationPath].Value.Path || !oEntityType.property) {
4539
+ return;
4540
+ }
4541
+ var aProperty = oEntityType.property.filter(function(entry) {
4542
+ return entry.name === oEntityType[sAnnotationPath].Value.Path;
4543
+ });
4544
+ if (aProperty.length && aProperty[0]['sap:label']) {
4545
+ // Property name found
4546
+ return aProperty[0]['sap:label'];
4547
+ }
4548
+ return;
4549
+ }
4550
+ // It's Identification or FieldGroup case
4551
+ if (oFacet.Label && oFacet.Label.String) {
4552
+ return oFacet.Label.String;
4553
+ }
4554
+ if (!oFacet.Target || !oFacet.Target.AnnotationPath) {
4555
+ return;
4556
+ }
4557
+ if (oFacet.Target.AnnotationPath.indexOf("com.sap.vocabularies.UI.v1.Identification") > -1) {
4558
+ // Identification entry don't have any data which we can use as SmartForm title.
4559
+ return;
4560
+ }
4561
+ var { sAnnotationPath, oEntityType } = oAnnotationHelper.getModelData(oInterface, oFacet.Target.AnnotationPath, sEntitySetName);
4562
+ if (oEntityType[sAnnotationPath] && oEntityType[sAnnotationPath].Label && oEntityType[sAnnotationPath].Label.String) {
4563
+ // Use FieldGroup.Label.String as SmartForm title
4564
+ return oEntityType[sAnnotationPath].Label.String;
4565
+ }
4566
+ return;
4508
4567
  }
4509
4568
  };
4510
4569
  oAnnotationHelper.getBlockForEditableHeaderFacet.requiresIContext = true;
@@ -4575,6 +4634,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
4575
4634
  oAnnotationHelper.getTextArrangementPath.requiresIContext = true;
4576
4635
  oAnnotationHelper.isValueHelpTableAvailable.requiresIContext = true;
4577
4636
  oAnnotationHelper.getTextArrangementFinalString.requiresIContext = true;
4637
+ oAnnotationHelper.getSmartFormTitle.requiresIContext = true;
4578
4638
 
4579
4639
  return oAnnotationHelper;
4580
4640
  }, /* bExport= */ true);
@@ -950,7 +950,7 @@ sap.ui.define([
950
950
  * @public
951
951
  * @extends sap.ui.core.UIComponent
952
952
  * @author SAP SE
953
- * @version 1.136.4
953
+ * @version 1.136.6
954
954
  * @name sap.suite.ui.generic.template.lib.AppComponent
955
955
  */
956
956
  var oAppComponent = UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
@@ -400,6 +400,15 @@ sap.ui.define([
400
400
  oSmartFilterBarVariant.customFilters.editState = oVariantDataFromAI.oEditStateFilter;
401
401
  }
402
402
 
403
+ if (oSmartFilterBarVariant.semanticDates) {
404
+ var { Low: value1, High: value2 } = oVariantDataFromAI.aSelectOptions[0].Ranges[0];
405
+ var dateData = oSmartFilterBarVariant.semanticDates.Dates[0].Data;
406
+
407
+ dateData.operation = "DATERANGE";
408
+ dateData.value1 = value1;
409
+ dateData.value2 = value2 || value1;
410
+ }
411
+
403
412
  oSmartFilterBarWrapper.setState(oSmartFilterBarVariant);
404
413
  oSmartFilterbar.getSmartVariant() && oSmartFilterbar.getSmartVariant().currentVariantSetModified(true);
405
414
  oSmartFilterbar.search();
@@ -425,7 +434,8 @@ sap.ui.define([
425
434
  }
426
435
 
427
436
  function fnQueryChanged() {
428
- // todo : check if any action is required
437
+ var oSmartFilterbar = oState.oSmartFilterbar;
438
+ oSmartFilterbar.fireFilterChange();
429
439
  }
430
440
  // function fnUpdateEasyFilterBarTokens() {
431
441
  // // todo : update the easy filter bar tokens with new values from the SFB VHD
@@ -434,11 +444,18 @@ sap.ui.define([
434
444
  // afterFilterDataUpdate
435
445
  var mChangeParameters = oEvent.getParameters("mParameters");
436
446
  var aEasyFilterTokens = [];
437
- var sFilterChangeProperty;
447
+ var sFilterChangeProperty,filterData,filterDataMap,aItems;
438
448
  // filter change will be triggered for each filter change even if the value help is opened from SFB
439
449
  // fnValueHelpPromiseResolve will be set only if the valeu help is opened from EasyFilter
440
450
  if (mChangeParameters.sId === "change" && fnValueHelpPromiseResolve) {
441
451
  sFilterChangeProperty = mChangeParameters.getParameter("filterChangeReason");
452
+ filterData = oEvent.getSource().getFilterData();
453
+ filterDataMap = new Map();
454
+ aItems = filterData[sFilterChangeProperty]?.items || [];
455
+
456
+ aItems.forEach(function(item) {
457
+ filterDataMap.set(item.key, item.text);
458
+ });
442
459
  // find an efficient way to get the filters from SFB to update the EasyFilter token
443
460
  oEvent.getSource().getFilters().forEach(function(aFilters) {
444
461
  aFilters.aFilters && aFilters.aFilters.forEach(function(oPropertyFilterItem) {
@@ -459,7 +476,7 @@ sap.ui.define([
459
476
  if (oToken.operator === oFilterItem.sOperator) {
460
477
  oToken.selectedValues.push({
461
478
  value: oFilterItem.oValue1,
462
- description: oFilterItem.oValue1
479
+ description: filterDataMap.get(oFilterItem.oValue1) || oFilterItem.oValue1
463
480
  });
464
481
  }
465
482
  });
@@ -467,7 +484,7 @@ sap.ui.define([
467
484
  oPropertyToken.operator = oFilterItem.sOperator;
468
485
  oPropertyToken.selectedValues.push({
469
486
  value: oFilterItem.oValue1,
470
- description: oFilterItem.oValue1
487
+ description: filterDataMap.get(oFilterItem.oValue1) || oFilterItem.oValue1
471
488
  });
472
489
  aEasyFilterTokens.push(oPropertyToken);
473
490
  }
@@ -3216,7 +3216,7 @@ sap.ui.define(["sap/ui/base/Object",
3216
3216
  * @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
3217
3217
  * @public
3218
3218
  * @extends sap.ui.base.Object
3219
- * @version 1.136.4
3219
+ * @version 1.136.6
3220
3220
  * @since 1.30.0
3221
3221
  * @alias sap.suite.ui.generic.template.lib.NavigationController
3222
3222
  */
@@ -66,7 +66,7 @@ sap.ui.define([
66
66
  interfaces: [],
67
67
  controls: [],
68
68
  elements: [],
69
- version: "1.136.4",
69
+ version: "1.136.6",
70
70
  extensions: {
71
71
  //Configuration used for rule loading of Support Assistant
72
72
  "sap.ui.support": {