@openui5/sap.f 1.117.0 → 1.118.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 (86) hide show
  1. package/package.json +4 -4
  2. package/src/sap/f/.library +1 -1
  3. package/src/sap/f/Avatar.js +1 -1
  4. package/src/sap/f/AvatarGroup.js +1 -1
  5. package/src/sap/f/AvatarGroupItem.js +1 -1
  6. package/src/sap/f/CalendarAppointmentInCard.js +1 -1
  7. package/src/sap/f/CalendarInCard.js +1 -1
  8. package/src/sap/f/Card.js +1 -1
  9. package/src/sap/f/CardBase.js +1 -1
  10. package/src/sap/f/DynamicPage.js +1 -1
  11. package/src/sap/f/DynamicPageAccessibleLandmarkInfo.js +1 -1
  12. package/src/sap/f/DynamicPageHeader.js +1 -1
  13. package/src/sap/f/DynamicPageTitle.js +23 -10
  14. package/src/sap/f/DynamicPageTitleRenderer.js +1 -1
  15. package/src/sap/f/FlexibleColumnLayout.js +1 -1
  16. package/src/sap/f/FlexibleColumnLayoutAccessibleLandmarkInfo.js +1 -1
  17. package/src/sap/f/FlexibleColumnLayoutSemanticHelper.js +1 -1
  18. package/src/sap/f/GridContainer.js +1 -1
  19. package/src/sap/f/GridContainerItemLayoutData.js +1 -1
  20. package/src/sap/f/GridContainerSettings.js +2 -2
  21. package/src/sap/f/GridList.js +1 -4
  22. package/src/sap/f/GridListItem.js +1 -1
  23. package/src/sap/f/IllustratedMessage.js +1 -1
  24. package/src/sap/f/Illustration.js +1 -1
  25. package/src/sap/f/PlanningCalendarInCardLegend.js +1 -1
  26. package/src/sap/f/ProductSwitch.js +1 -1
  27. package/src/sap/f/ProductSwitchItem.js +1 -1
  28. package/src/sap/f/SearchManager.js +1 -1
  29. package/src/sap/f/ShellBar.js +1 -1
  30. package/src/sap/f/SidePanel.js +4 -2
  31. package/src/sap/f/SidePanelItem.js +1 -1
  32. package/src/sap/f/SidePanelRenderer.js +1 -1
  33. package/src/sap/f/cards/BaseHeader.js +28 -4
  34. package/src/sap/f/cards/BaseHeaderRenderer.js +68 -0
  35. package/src/sap/f/cards/Header.js +7 -6
  36. package/src/sap/f/cards/HeaderRenderer.js +15 -17
  37. package/src/sap/f/cards/NumericHeader.js +174 -19
  38. package/src/sap/f/cards/NumericHeaderRenderer.js +25 -6
  39. package/src/sap/f/cards/NumericIndicators.js +1 -1
  40. package/src/sap/f/cards/NumericSideIndicator.js +1 -1
  41. package/src/sap/f/cards/loading/AnalyticalPlaceholder.js +1 -1
  42. package/src/sap/f/cards/loading/CalendarPlaceholder.js +1 -1
  43. package/src/sap/f/cards/loading/GenericPlaceholder.js +1 -1
  44. package/src/sap/f/cards/loading/ListPlaceholder.js +1 -1
  45. package/src/sap/f/cards/loading/ListPlaceholderRenderer.js +1 -2
  46. package/src/sap/f/cards/loading/ObjectPlaceholder.js +1 -1
  47. package/src/sap/f/cards/loading/PlaceholderBase.js +1 -1
  48. package/src/sap/f/cards/loading/TablePlaceholder.js +1 -1
  49. package/src/sap/f/cards/loading/TimelinePlaceholder.js +1 -1
  50. package/src/sap/f/changeHandler/MoveDynamicPageTitleActions.js +1 -1
  51. package/src/sap/f/delegate/GridContainerItemNavigation.js +8 -8
  52. package/src/sap/f/delegate/GridItemNavigation.js +1 -1
  53. package/src/sap/f/dnd/GridDragOver.js +1 -1
  54. package/src/sap/f/dnd/GridDropInfo.js +1 -1
  55. package/src/sap/f/library.js +2 -2
  56. package/src/sap/f/semantic/AddAction.js +1 -1
  57. package/src/sap/f/semantic/CloseAction.js +1 -1
  58. package/src/sap/f/semantic/CopyAction.js +1 -1
  59. package/src/sap/f/semantic/DeleteAction.js +1 -1
  60. package/src/sap/f/semantic/DiscussInJamAction.js +1 -1
  61. package/src/sap/f/semantic/EditAction.js +1 -1
  62. package/src/sap/f/semantic/ExitFullScreenAction.js +1 -1
  63. package/src/sap/f/semantic/FavoriteAction.js +1 -1
  64. package/src/sap/f/semantic/FlagAction.js +1 -1
  65. package/src/sap/f/semantic/FooterMainAction.js +1 -1
  66. package/src/sap/f/semantic/FullScreenAction.js +1 -1
  67. package/src/sap/f/semantic/MainAction.js +1 -1
  68. package/src/sap/f/semantic/MessagesIndicator.js +1 -1
  69. package/src/sap/f/semantic/NegativeAction.js +1 -1
  70. package/src/sap/f/semantic/PositiveAction.js +1 -1
  71. package/src/sap/f/semantic/PrintAction.js +1 -1
  72. package/src/sap/f/semantic/SemanticButton.js +1 -1
  73. package/src/sap/f/semantic/SemanticConfiguration.js +1 -1
  74. package/src/sap/f/semantic/SemanticControl.js +1 -1
  75. package/src/sap/f/semantic/SemanticPage.js +4 -2
  76. package/src/sap/f/semantic/SemanticToggleButton.js +1 -1
  77. package/src/sap/f/semantic/SendEmailAction.js +1 -1
  78. package/src/sap/f/semantic/SendMessageAction.js +1 -1
  79. package/src/sap/f/semantic/ShareInJamAction.js +1 -1
  80. package/src/sap/f/semantic/TitleMainAction.js +1 -1
  81. package/src/sap/f/shellBar/AdditionalContentSupport.js +1 -1
  82. package/src/sap/f/shellBar/CoPilot.js +1 -1
  83. package/src/sap/f/shellBar/ControlSpacer.js +1 -1
  84. package/src/sap/f/shellBar/Search.js +1 -1
  85. package/src/sap/f/themes/base/Card.less +42 -2
  86. package/src/sap/f/themes/base/SidePanel.less +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.f",
3
- "version": "1.117.0",
3
+ "version": "1.118.0",
4
4
  "description": "OpenUI5 UI Library sap.f",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -14,8 +14,8 @@
14
14
  "url": "https://github.com/SAP/openui5.git"
15
15
  },
16
16
  "dependencies": {
17
- "@openui5/sap.m": "1.117.0",
18
- "@openui5/sap.ui.core": "1.117.0",
19
- "@openui5/sap.ui.layout": "1.117.0"
17
+ "@openui5/sap.m": "1.118.0",
18
+ "@openui5/sap.ui.core": "1.118.0",
19
+ "@openui5/sap.ui.layout": "1.118.0"
20
20
  }
21
21
  }
@@ -6,7 +6,7 @@
6
6
  <copyright>OpenUI5
7
7
  * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.117.0</version>
9
+ <version>1.118.0</version>
10
10
 
11
11
  <documentation>SAPUI5 library with Fiori controls.</documentation>
12
12
 
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  * @extends sap.m.Avatar
41
41
  *
42
42
  * @author SAP SE
43
- * @version 1.117.0
43
+ * @version 1.118.0
44
44
  *
45
45
  * @constructor
46
46
  * @public
@@ -98,7 +98,7 @@ sap.ui.define([
98
98
  * @extends sap.ui.core.Control
99
99
  *
100
100
  * @author SAP SE
101
- * @version 1.117.0
101
+ * @version 1.118.0
102
102
  *
103
103
  * @constructor
104
104
  * @public
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @extends sap.ui.core.Control
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.117.0
35
+ * @version 1.118.0
36
36
  *
37
37
  * @constructor
38
38
  * @public
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * This calendar appointment is used in card content of type Calendar.
22
22
  *
23
23
  * @extends sap.ui.unified.CalendarAppointment
24
- * @version 1.117.0
24
+ * @version 1.118.0
25
25
  *
26
26
  * @constructor
27
27
  * @private
@@ -43,7 +43,7 @@ sap.ui.define([
43
43
  * <code>sap.m.Toolbar</code> with <code>sap.m.Buttons</code>.
44
44
  *
45
45
  * @extends sap.ui.unified.Calendar
46
- * @version 1.117.0
46
+ * @version 1.118.0
47
47
  *
48
48
  * @constructor
49
49
  * @private
package/src/sap/f/Card.js CHANGED
@@ -71,7 +71,7 @@ sap.ui.define([
71
71
  * @extends sap.f.CardBase
72
72
  *
73
73
  * @author SAP SE
74
- * @version 1.117.0
74
+ * @version 1.118.0
75
75
  *
76
76
  * @constructor
77
77
  * @public
@@ -37,7 +37,7 @@ sap.ui.define([
37
37
  * @extends sap.ui.core.Control
38
38
  *
39
39
  * @author SAP SE
40
- * @version 1.117.0
40
+ * @version 1.118.0
41
41
  *
42
42
  * @constructor
43
43
  * @public
@@ -112,7 +112,7 @@ sap.ui.define([
112
112
  * @extends sap.ui.core.Control
113
113
  *
114
114
  * @author SAP SE
115
- * @version 1.117.0
115
+ * @version 1.118.0
116
116
  *
117
117
  * @constructor
118
118
  * @public
@@ -23,7 +23,7 @@ sap.ui.define(['sap/ui/core/Element', './library'],
23
23
  * @extends sap.ui.core.Element
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.117.0
26
+ * @version 1.118.0
27
27
  *
28
28
  * @constructor
29
29
  * @public
@@ -62,7 +62,7 @@ sap.ui.define([
62
62
  * @extends sap.ui.core.Control
63
63
  *
64
64
  * @author SAP SE
65
- * @version 1.117.0
65
+ * @version 1.118.0
66
66
  *
67
67
  * @constructor
68
68
  * @public
@@ -44,10 +44,14 @@ sap.ui.define([
44
44
  ) {
45
45
  "use strict";
46
46
 
47
- // shortcut for sap.f.DynamicPageTitleArea
48
- var DynamicPageTitleArea = library.DynamicPageTitleArea,
49
- ToolbarStyle = mobileLibrary.ToolbarStyle,
50
- InvisibleMessageMode = CoreLibrary.InvisibleMessageMode;
47
+ /**
48
+ * @deprecated As of version 1.54
49
+ */
50
+ var DynamicPageTitleArea = library.DynamicPageTitleArea;
51
+
52
+ var ToolbarStyle = mobileLibrary.ToolbarStyle;
53
+
54
+ var InvisibleMessageMode = CoreLibrary.InvisibleMessageMode;
51
55
 
52
56
  /**
53
57
  * Constructor for a new <code>DynamicPageTitle</code>.
@@ -89,7 +93,7 @@ sap.ui.define([
89
93
  * @extends sap.ui.core.Control
90
94
  *
91
95
  * @author SAP SE
92
- * @version 1.117.0
96
+ * @version 1.118.0
93
97
  *
94
98
  * @constructor
95
99
  * @public
@@ -508,6 +512,9 @@ sap.ui.define([
508
512
 
509
513
  var oShrinkFactorsInfo = this._getShrinkFactorsObject();
510
514
 
515
+ /**
516
+ * @deprecated As of version 1.54
517
+ */
511
518
  if (this.getPrimaryArea() === DynamicPageTitleArea.Middle) {
512
519
  Log.warning("DynamicPageTitle :: Property primaryArea is disregarded when areaShrinkRatio is set.", this);
513
520
  }
@@ -1296,11 +1303,17 @@ sap.ui.define([
1296
1303
  bHasTopContent = oBreadcrumbs || bHasNavigationActions,
1297
1304
  bHasOnlyBreadcrumbs = !!(oBreadcrumbs && !bHasNavigationActions),
1298
1305
  bHasOnlyNavigationActions = bHasNavigationActions && !oBreadcrumbs,
1299
- sAreaShrinkRatioDefaultValue = this.getMetadata().getProperty("areaShrinkRatio").getDefaultValue();
1306
+ sAreaShrinkRatioDefaultValue = this.getMetadata().getProperty("areaShrinkRatio").getDefaultValue(),
1307
+ bAriaShrinkRatioDefault = this.getAreaShrinkRatio() === sAreaShrinkRatioDefaultValue;
1308
+
1309
+ /**
1310
+ * @deprecated As of version 1.54
1311
+ */
1312
+ bAriaShrinkRatioDefault = bAriaShrinkRatioDefault && this.getPrimaryArea() === DynamicPageTitleArea.Middle;
1300
1313
 
1301
- // if areaShrinkRatio is set to default value (or not set at all) and primaryArea is set,
1314
+ // if areaShrinkRatio is set to default value (or not set at all)
1302
1315
  // use shrink factors defined for primaryArea
1303
- if (this.getAreaShrinkRatio() === sAreaShrinkRatioDefaultValue && this.getPrimaryArea() === DynamicPageTitleArea.Middle) {
1316
+ if (bAriaShrinkRatioDefault) {
1304
1317
  oShrinkFactorsInfo.headingAreaShrinkFactor = DynamicPageTitle.PRIMARY_AREA_MIDDLE_SHRINK_FACTORS.headingAreaShrinkFactor;
1305
1318
  oShrinkFactorsInfo.contentAreaShrinkFactor = DynamicPageTitle.PRIMARY_AREA_MIDDLE_SHRINK_FACTORS.contentAreaShrinkFactor;
1306
1319
  oShrinkFactorsInfo.actionsAreaShrinkFactor = DynamicPageTitle.PRIMARY_AREA_MIDDLE_SHRINK_FACTORS.actionsAreaShrinkFactor;
@@ -1463,7 +1476,7 @@ sap.ui.define([
1463
1476
  };
1464
1477
 
1465
1478
  DynamicPageTitle.prototype._updateARIAState = function (bExpanded) {
1466
- var sARIAText = this._getARIALabelReferences(bExpanded) || DynamicPageTitle.DEFAULT_HEADER_TEXT_ID,
1479
+ var sARIAText = this._getARIALabelReferences(bExpanded),
1467
1480
  $oFocusSpan = this._getFocusSpan();
1468
1481
 
1469
1482
  if ($oFocusSpan) {
@@ -1489,7 +1502,7 @@ sap.ui.define([
1489
1502
  sReferences += sTitleId || oHeading.getId();
1490
1503
  }
1491
1504
 
1492
- return sReferences;
1505
+ return sReferences || DynamicPageTitle.DEFAULT_HEADER_TEXT_ID;
1493
1506
  };
1494
1507
 
1495
1508
  DynamicPageTitle.prototype._focus = function () {
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  var oDynamicPageTitleState = oDynamicPageTitle._getState(),
26
26
  sSapFDynamicPageTitle = "sapFDynamicPageTitle",
27
27
  sBackgroundDesign = oDynamicPageTitle.getBackgroundDesign(),
28
- sLabelledBy = oDynamicPageTitle._getARIALabelReferences(oDynamicPageTitle._bExpandedState) || oDynamicPageTitle.DEFAULT_HEADER_TEXT_ID,
28
+ sLabelledBy = oDynamicPageTitle._getARIALabelReferences(oDynamicPageTitle._bExpandedState),
29
29
  sDescribedBy = oDynamicPageTitle._getAriaDescribedByReferences();
30
30
 
31
31
  // DynamicPageTitle Root DOM Element.
@@ -97,7 +97,7 @@ sap.ui.define([
97
97
  *
98
98
  * @extends sap.ui.core.Control
99
99
  * @author SAP SE
100
- * @version 1.117.0
100
+ * @version 1.118.0
101
101
  *
102
102
  * @constructor
103
103
  * @public
@@ -22,7 +22,7 @@ sap.ui.define(['sap/ui/core/Element', './library'],
22
22
  * @extends sap.ui.core.Element
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.117.0
25
+ * @version 1.118.0
26
26
  * @since 1.95
27
27
  *
28
28
  * @constructor
@@ -49,7 +49,7 @@ sap.ui.define([
49
49
  *
50
50
  * For more information, see {@link sap.f.FlexibleColumnLayoutSemanticHelper#getCurrentUIState} and {@link sap.f.FlexibleColumnLayoutSemanticHelper#getNextUIState}
51
51
  *
52
- * @version 1.117.0
52
+ * @version 1.118.0
53
53
  * @param {sap.f.FlexibleColumnLayout} oFlexibleColumnLayout
54
54
  * The <code>sap.f.FlexibleColumnLayout</code> object whose state will be manipulated.
55
55
  *
@@ -171,7 +171,7 @@ sap.ui.define([
171
171
  * @see {@link sap.f.dnd.GridDropInfo}
172
172
  *
173
173
  * @author SAP SE
174
- * @version 1.117.0
174
+ * @version 1.118.0
175
175
  *
176
176
  * @extends sap.ui.core.Control
177
177
  *
@@ -21,7 +21,7 @@ sap.ui.define(['sap/ui/core/LayoutData'],
21
21
  * @see {@link topic:32d4b9c2b981425dbc374d3e9d5d0c2e Grid Controls}
22
22
  *
23
23
  * @author SAP SE
24
- * @version 1.117.0
24
+ * @version 1.118.0
25
25
  *
26
26
  * @extends sap.ui.core.LayoutData
27
27
  *
@@ -58,14 +58,14 @@ sap.ui.define([
58
58
  * Can be used to define the sizes of columns and rows for different screen sizes, by using the <code>layout</code> aggregations of <code>sap.f.GridContainer</code>.
59
59
  *
60
60
  * @author SAP SE
61
- * @version 1.117.0
61
+ * @version 1.118.0
62
62
  *
63
63
  * @extends sap.ui.base.ManagedObject
64
64
  *
65
65
  * @see {@link topic:32d4b9c2b981425dbc374d3e9d5d0c2e Grid Controls}
66
66
  *
67
67
  * @author SAP SE
68
- * @version 1.117.0
68
+ * @version 1.118.0
69
69
  *
70
70
  * @experimental Since 1.65 This class is experimental. The API may change.
71
71
  * @since 1.65
@@ -93,7 +93,7 @@ sap.ui.define([
93
93
  * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout MDN web docs: CSS Grid Layout}
94
94
  *
95
95
  * @author SAP SE
96
- * @version 1.117.0
96
+ * @version 1.118.0
97
97
  *
98
98
  * @extends sap.m.ListBase
99
99
  * @implements sap.ui.layout.cssgrid.IGridConfigurable
@@ -291,9 +291,6 @@ sap.ui.define([
291
291
  .setFocusedIndex(0);
292
292
 
293
293
  this.addDelegate(this._oItemNavigation);
294
-
295
- // set the tab index of active items
296
- this._setItemNavigationTabIndex(0);
297
294
  }
298
295
 
299
296
  ListBase.prototype._startItemNavigation.apply(this, arguments);
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @extends sap.m.ListItemBase
25
25
  *
26
26
  * @author SAP SE
27
- * @version 1.117.0
27
+ * @version 1.118.0
28
28
  *
29
29
  * @since 1.70
30
30
  * @constructor
@@ -56,7 +56,7 @@ sap.ui.define([
56
56
  * @extends sap.m.IllustratedMessage
57
57
  *
58
58
  * @author SAP SE
59
- * @version 1.117.0
59
+ * @version 1.118.0
60
60
  *
61
61
  * @constructor
62
62
  * @public
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  * @extends sap.m.Illustration
31
31
  *
32
32
  * @author SAP SE
33
- * @version 1.117.0
33
+ * @version 1.118.0
34
34
  *
35
35
  * @constructor
36
36
  * @public
@@ -22,7 +22,7 @@ sap.ui.define(['sap/m/PlanningCalendarLegend', 'sap/ui/unified/CalendarLegendIte
22
22
  * @extends sap.m.PlanningCalendarLegend
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.117.0
25
+ * @version 1.118.0
26
26
  *
27
27
  * @constructor
28
28
  * @private
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  * @extends sap.ui.core.Control
35
35
  *
36
36
  * @author SAP SE
37
- * @version 1.117.0
37
+ * @version 1.118.0
38
38
  *
39
39
  * @constructor
40
40
  * @public
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  * @extends sap.ui.core.Control
41
41
  *
42
42
  * @author SAP SE
43
- * @version 1.117.0
43
+ * @version 1.118.0
44
44
  *
45
45
  * @constructor
46
46
  * @public
@@ -23,7 +23,7 @@ sap.ui.define(['sap/ui/core/Element', 'sap/ui/base/ManagedObjectObserver', './sh
23
23
  * @extends sap.ui.core.Element
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.117.0
26
+ * @version 1.118.0
27
27
  *
28
28
  * @constructor
29
29
  * @public
@@ -56,7 +56,7 @@ function(
56
56
  * @implements sap.f.IShellBar, sap.m.IBar, sap.tnt.IToolHeader
57
57
  *
58
58
  * @author SAP SE
59
- * @version 1.117.0
59
+ * @version 1.118.0
60
60
  *
61
61
  * @constructor
62
62
  * @public
@@ -149,7 +149,7 @@ sap.ui.define([
149
149
  * @extends sap.ui.core.Control
150
150
  *
151
151
  * @author SAP SE
152
- * @version 1.117.0
152
+ * @version 1.118.0
153
153
  *
154
154
  * @constructor
155
155
  * @public
@@ -898,7 +898,9 @@ sap.ui.define([
898
898
  if (iSidePanelWidth > SIDE_PANEL_SPLIT_BREAKPOINT) {
899
899
  oSide.classList.add("sapFSPSplitView");
900
900
  } else {
901
- oSide.classList.contains("sapFSPSplitView") && this.setActionBarExpanded(false);
901
+ // TODO: revise the upcoming interaction as re-rendering is happening while resizing.
902
+ // Currently the action toolbar would not collapse if shriked via mouse. That makes the resizing via mouse usable.
903
+ // oSide.classList.contains("sapFSPSplitView") && this.setActionBarExpanded(false);
902
904
  oSide.classList.remove("sapFSPSplitView");
903
905
  }
904
906
  };
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @extends sap.ui.core.Item
28
28
  *
29
29
  * @author SAP SE
30
- * @version 1.117.0
30
+ * @version 1.118.0
31
31
  *
32
32
  * @constructor
33
33
  * @public
@@ -104,7 +104,7 @@ sap.ui.define([
104
104
 
105
105
  SidePanelRenderer.renderSide = function(oRm, oControl) {
106
106
  var bPhone = Device.system.phone,
107
- bRenderSplitter = oControl.getSidePanelResizable() && oControl._getSideContentExpanded() && !bPhone;
107
+ bRenderSplitter = oControl._isResizable();
108
108
 
109
109
  oRm.openStart("aside");
110
110
  oRm.class("sapFSPSide");
@@ -9,6 +9,7 @@ sap.ui.define([
9
9
  "sap/ui/core/IntervalTrigger",
10
10
  "sap/ui/core/format/DateFormat",
11
11
  "sap/ui/core/date/UniversalDate",
12
+ "sap/ui/core/library",
12
13
  "sap/m/Text"
13
14
  ], function (
14
15
  Control,
@@ -16,6 +17,7 @@ sap.ui.define([
16
17
  IntervalTrigger,
17
18
  DateFormat,
18
19
  UniversalDate,
20
+ coreLibrary,
19
21
  Text
20
22
  ) {
21
23
  "use strict";
@@ -25,6 +27,8 @@ sap.ui.define([
25
27
  */
26
28
  var DATA_TIMESTAMP_REFRESH_INTERVAL = 60000;
27
29
 
30
+ var TextAlign = coreLibrary.TextAlign;
31
+
28
32
  /**
29
33
  * Constructor for a new <code>BaseHeader</code>.
30
34
  *
@@ -38,7 +42,7 @@ sap.ui.define([
38
42
  * @abstract
39
43
  *
40
44
  * @author SAP SE
41
- * @version 1.117.0
45
+ * @version 1.118.0
42
46
  *
43
47
  * @constructor
44
48
  * @public
@@ -77,7 +81,13 @@ sap.ui.define([
77
81
  * Set to false if header shouldn't be focusable.
78
82
  * @private
79
83
  */
80
- focusable: { type: "boolean", defaultValue: true, visibility: "hidden" }
84
+ focusable: { type: "boolean", defaultValue: true, visibility: "hidden" },
85
+
86
+ /**
87
+ * If the header should be rendered as a tile.
88
+ * @private
89
+ */
90
+ useTileLayout: { type: "boolean", group: "Appearance", visibility: "hidden" }
81
91
  },
82
92
  aggregations: {
83
93
  /**
@@ -95,7 +105,14 @@ sap.ui.define([
95
105
  /**
96
106
  * Defines an error which will be displayed in the header.
97
107
  */
98
- _error: { type: "sap.ui.core.Control", multiple: false, visibility: "hidden" }
108
+ _error: { type: "sap.ui.core.Control", multiple: false, visibility: "hidden" },
109
+
110
+ /**
111
+ * Show as a banner in the header area. Use for example for system info and application shortcut.
112
+ * @experimental Since 1.118. For usage only by Work Zone.
113
+ * @since 1.118
114
+ */
115
+ bannerLines: { type: "sap.m.Text", group: "Appearance", multiple: true }
99
116
  }
100
117
  }
101
118
  });
@@ -120,12 +137,19 @@ sap.ui.define([
120
137
  };
121
138
 
122
139
  BaseHeader.prototype.onBeforeRendering = function () {
123
- var oToolbar = this.getToolbar();
140
+ var oToolbar = this.getToolbar(),
141
+ aBannerLines = this.getBannerLines();
124
142
 
125
143
  if (oToolbar) {
126
144
  oToolbar.addStyleClass("sapFCardHeaderToolbar");
127
145
  oToolbar.removeEventDelegate(this._oToolbarDelegate, this);
128
146
  }
147
+
148
+ if (aBannerLines) {
149
+ aBannerLines.forEach((oText) => {
150
+ oText.setTextAlign(TextAlign.End);
151
+ });
152
+ }
129
153
  };
130
154
 
131
155
  BaseHeader.prototype.onAfterRendering = function () {
@@ -0,0 +1,68 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ // Provides default renderer for control sap.f.cards.NumericHeader
8
+ sap.ui.define([], function () {
9
+ "use strict";
10
+
11
+ var BaseHeaderRenderer = {
12
+ apiVersion: 2
13
+ };
14
+
15
+ BaseHeaderRenderer.renderAvatar = function (oRm, oHeader) {
16
+ var oAvatar = oHeader.getAggregation("_avatar"),
17
+ oBindingInfos = oHeader.mBindingInfos,
18
+ bIconVisible = oHeader.shouldShowIcon();
19
+
20
+ if (bIconVisible && (!oHeader.isPropertyInitial("iconSrc") || !oHeader.isPropertyInitial("iconInitials"))) {
21
+ oRm.openStart("div")
22
+ .class("sapFCardHeaderImage")
23
+ .openEnd();
24
+
25
+ if (oBindingInfos.iconSrc && oBindingInfos.iconSrc.binding && !oBindingInfos.iconSrc.binding.getValue()) {
26
+ oAvatar.addStyleClass("sapFCardHeaderItemBinded");
27
+ }
28
+ oRm.renderControl(oAvatar);
29
+ oRm.renderControl(oHeader._oAriaAvatarText);
30
+ oRm.close("div");
31
+ }
32
+ };
33
+
34
+ BaseHeaderRenderer.renderBanner = function(oRm, oHeader) {
35
+ const aBannerLines = oHeader.getBannerLines() || [];
36
+ const aVisibleLines = aBannerLines.filter((oText) => {
37
+ return oText.getVisible();
38
+ });
39
+
40
+ if (!aVisibleLines.length) {
41
+ return;
42
+ }
43
+
44
+ oRm.openStart("div")
45
+ .class("sapFCardHeaderBanner")
46
+ .openEnd();
47
+
48
+ oRm.openStart("div")
49
+ .class("sapFCardHeaderBannerInner")
50
+ .openEnd();
51
+
52
+ aBannerLines.forEach((oBannerLine) => {
53
+ oRm.openStart("div")
54
+ .class("sapFCardHeaderBannerLine")
55
+ .openEnd();
56
+
57
+ oRm.renderControl(oBannerLine);
58
+
59
+ oRm.close("div");
60
+ });
61
+
62
+ oRm.close("div");
63
+
64
+ oRm.close("div");
65
+ };
66
+
67
+ return BaseHeaderRenderer;
68
+ }, /* bExport= */ true);
@@ -24,6 +24,7 @@ sap.ui.define([
24
24
 
25
25
  var AvatarShape = mLibrary.AvatarShape;
26
26
  var AvatarColor = mLibrary.AvatarColor;
27
+ var AvatarImageFitType = mLibrary.AvatarImageFitType;
27
28
 
28
29
  /**
29
30
  * Constructor for a new <code>Header</code>.
@@ -46,7 +47,7 @@ sap.ui.define([
46
47
  * @implements sap.f.cards.IHeader
47
48
  *
48
49
  * @author SAP SE
49
- * @version 1.117.0
50
+ * @version 1.118.0
50
51
  *
51
52
  * @constructor
52
53
  * @public
@@ -166,10 +167,8 @@ sap.ui.define([
166
167
  Header.prototype.exit = function () {
167
168
  BaseHeader.prototype.exit.apply(this, arguments);
168
169
 
169
- if (this._oAriaAvatarText) {
170
- this._oAriaAvatarText.destroy();
171
- this._oAriaAvatarText = null;
172
- }
170
+ this._oAriaAvatarText.destroy();
171
+ this._oAriaAvatarText = null;
173
172
  };
174
173
 
175
174
  /**
@@ -208,7 +207,9 @@ sap.ui.define([
208
207
  Header.prototype._getAvatar = function () {
209
208
  var oAvatar = this.getAggregation("_avatar");
210
209
  if (!oAvatar) {
211
- oAvatar = new Avatar().addStyleClass("sapFCardIcon");
210
+ oAvatar = new Avatar({
211
+ imageFitType: AvatarImageFitType.Contain
212
+ }).addStyleClass("sapFCardIcon");
212
213
  this.setAggregation("_avatar", oAvatar);
213
214
  }
214
215
  return oAvatar;