@openui5/sap.f 1.122.0 → 1.123.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 +1 -1
  14. package/src/sap/f/FlexibleColumnLayout.js +1 -1
  15. package/src/sap/f/FlexibleColumnLayoutAccessibleLandmarkInfo.js +1 -1
  16. package/src/sap/f/FlexibleColumnLayoutSemanticHelper.js +1 -1
  17. package/src/sap/f/GridContainer.js +3 -9
  18. package/src/sap/f/GridContainerItemLayoutData.js +4 -5
  19. package/src/sap/f/GridContainerSettings.js +2 -3
  20. package/src/sap/f/GridList.js +2 -2
  21. package/src/sap/f/GridListItem.js +1 -1
  22. package/src/sap/f/IllustratedMessage.js +1 -1
  23. package/src/sap/f/Illustration.js +1 -1
  24. package/src/sap/f/PlanningCalendarInCardLegend.js +1 -1
  25. package/src/sap/f/ProductSwitch.js +1 -1
  26. package/src/sap/f/ProductSwitchItem.js +1 -1
  27. package/src/sap/f/ProductSwitchItemRenderer.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 +1 -1
  31. package/src/sap/f/SidePanelItem.js +1 -1
  32. package/src/sap/f/cards/BaseHeader.js +43 -7
  33. package/src/sap/f/cards/BaseHeaderRenderer.js +19 -1
  34. package/src/sap/f/cards/Header.js +1 -1
  35. package/src/sap/f/cards/HeaderRenderer.js +15 -4
  36. package/src/sap/f/cards/NumericHeader.js +2 -2
  37. package/src/sap/f/cards/NumericHeaderRenderer.js +20 -11
  38. package/src/sap/f/cards/NumericIndicators.js +1 -1
  39. package/src/sap/f/cards/NumericSideIndicator.js +1 -1
  40. package/src/sap/f/cards/loading/AnalyticalPlaceholder.js +1 -1
  41. package/src/sap/f/cards/loading/CalendarPlaceholder.js +1 -1
  42. package/src/sap/f/cards/loading/GenericPlaceholder.js +1 -1
  43. package/src/sap/f/cards/loading/ListPlaceholder.js +1 -1
  44. package/src/sap/f/cards/loading/ObjectPlaceholder.js +1 -1
  45. package/src/sap/f/cards/loading/PlaceholderBase.js +1 -1
  46. package/src/sap/f/cards/loading/TablePlaceholder.js +1 -1
  47. package/src/sap/f/cards/loading/TimelinePlaceholder.js +1 -1
  48. package/src/sap/f/changeHandler/MoveDynamicPageTitleActions.js +1 -1
  49. package/src/sap/f/delegate/GridContainerItemNavigation.js +15 -2
  50. package/src/sap/f/delegate/GridItemNavigation.js +1 -1
  51. package/src/sap/f/designtime/messagebundle_cs.properties +5 -5
  52. package/src/sap/f/dnd/GridDragOver.js +1 -1
  53. package/src/sap/f/dnd/GridDropInfo.js +1 -2
  54. package/src/sap/f/library.js +40 -2
  55. package/src/sap/f/semantic/AddAction.js +1 -1
  56. package/src/sap/f/semantic/CloseAction.js +1 -1
  57. package/src/sap/f/semantic/CopyAction.js +1 -1
  58. package/src/sap/f/semantic/DeleteAction.js +1 -1
  59. package/src/sap/f/semantic/DiscussInJamAction.js +1 -1
  60. package/src/sap/f/semantic/EditAction.js +1 -1
  61. package/src/sap/f/semantic/ExitFullScreenAction.js +1 -1
  62. package/src/sap/f/semantic/FavoriteAction.js +1 -1
  63. package/src/sap/f/semantic/FlagAction.js +1 -1
  64. package/src/sap/f/semantic/FooterMainAction.js +1 -1
  65. package/src/sap/f/semantic/FullScreenAction.js +1 -1
  66. package/src/sap/f/semantic/MainAction.js +1 -1
  67. package/src/sap/f/semantic/MessagesIndicator.js +1 -1
  68. package/src/sap/f/semantic/NegativeAction.js +1 -1
  69. package/src/sap/f/semantic/PositiveAction.js +1 -1
  70. package/src/sap/f/semantic/PrintAction.js +1 -1
  71. package/src/sap/f/semantic/SemanticButton.js +1 -1
  72. package/src/sap/f/semantic/SemanticConfiguration.js +1 -1
  73. package/src/sap/f/semantic/SemanticControl.js +1 -1
  74. package/src/sap/f/semantic/SemanticPage.js +1 -1
  75. package/src/sap/f/semantic/SemanticToggleButton.js +1 -1
  76. package/src/sap/f/semantic/SendEmailAction.js +1 -1
  77. package/src/sap/f/semantic/SendMessageAction.js +1 -1
  78. package/src/sap/f/semantic/ShareInJamAction.js +1 -1
  79. package/src/sap/f/semantic/TitleMainAction.js +1 -1
  80. package/src/sap/f/shellBar/AdditionalContentSupport.js +1 -1
  81. package/src/sap/f/shellBar/CoPilot.js +1 -1
  82. package/src/sap/f/shellBar/ControlSpacer.js +1 -1
  83. package/src/sap/f/shellBar/Search.js +1 -1
  84. package/src/sap/f/themes/base/Card.less +24 -0
  85. package/src/sap/f/themes/base/CardLoading.less +4 -17
  86. package/src/sap/f/themes/base/DynamicPageTitle.less +5 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.f",
3
- "version": "1.122.0",
3
+ "version": "1.123.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.122.0",
18
- "@openui5/sap.ui.core": "1.122.0",
19
- "@openui5/sap.ui.layout": "1.122.0"
17
+ "@openui5/sap.m": "1.123.0",
18
+ "@openui5/sap.ui.core": "1.123.0",
19
+ "@openui5/sap.ui.layout": "1.123.0"
20
20
  }
21
21
  }
@@ -6,7 +6,7 @@
6
6
  <copyright>OpenUI5
7
7
  * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.122.0</version>
9
+ <version>1.123.0</version>
10
10
 
11
11
  <documentation>SAPUI5 library with Fiori controls.</documentation>
12
12
 
@@ -41,7 +41,7 @@ sap.ui.define([
41
41
  * @extends sap.m.Avatar
42
42
  *
43
43
  * @author SAP SE
44
- * @version 1.122.0
44
+ * @version 1.123.0
45
45
  *
46
46
  * @constructor
47
47
  * @public
@@ -100,7 +100,7 @@ sap.ui.define([
100
100
  * @extends sap.ui.core.Control
101
101
  *
102
102
  * @author SAP SE
103
- * @version 1.122.0
103
+ * @version 1.123.0
104
104
  *
105
105
  * @constructor
106
106
  * @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.122.0
35
+ * @version 1.123.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.122.0
24
+ * @version 1.123.0
25
25
  *
26
26
  * @constructor
27
27
  * @private
@@ -45,7 +45,7 @@ sap.ui.define([
45
45
  * <code>sap.m.Toolbar</code> with <code>sap.m.Buttons</code>.
46
46
  *
47
47
  * @extends sap.ui.unified.Calendar
48
- * @version 1.122.0
48
+ * @version 1.123.0
49
49
  *
50
50
  * @constructor
51
51
  * @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.122.0
74
+ * @version 1.123.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.122.0
40
+ * @version 1.123.0
41
41
  *
42
42
  * @constructor
43
43
  * @public
@@ -118,7 +118,7 @@ sap.ui.define([
118
118
  * @extends sap.ui.core.Control
119
119
  *
120
120
  * @author SAP SE
121
- * @version 1.122.0
121
+ * @version 1.123.0
122
122
  *
123
123
  * @constructor
124
124
  * @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.122.0
26
+ * @version 1.123.0
27
27
  *
28
28
  * @constructor
29
29
  * @public
@@ -64,7 +64,7 @@ sap.ui.define([
64
64
  * @extends sap.ui.core.Control
65
65
  *
66
66
  * @author SAP SE
67
- * @version 1.122.0
67
+ * @version 1.123.0
68
68
  *
69
69
  * @constructor
70
70
  * @public
@@ -95,7 +95,7 @@ sap.ui.define([
95
95
  * @extends sap.ui.core.Control
96
96
  *
97
97
  * @author SAP SE
98
- * @version 1.122.0
98
+ * @version 1.123.0
99
99
  *
100
100
  * @constructor
101
101
  * @public
@@ -108,7 +108,7 @@ sap.ui.define([
108
108
  *
109
109
  * @extends sap.ui.core.Control
110
110
  * @author SAP SE
111
- * @version 1.122.0
111
+ * @version 1.123.0
112
112
  *
113
113
  * @constructor
114
114
  * @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.122.0
25
+ * @version 1.123.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.122.0
52
+ * @version 1.123.0
53
53
  * @param {sap.f.FlexibleColumnLayout} oFlexibleColumnLayout
54
54
  * The <code>sap.f.FlexibleColumnLayout</code> object whose state will be manipulated.
55
55
  *
@@ -177,7 +177,7 @@ sap.ui.define([
177
177
  * @see {@link sap.f.dnd.GridDropInfo}
178
178
  *
179
179
  * @author SAP SE
180
- * @version 1.122.0
180
+ * @version 1.123.0
181
181
  *
182
182
  * @extends sap.ui.core.Control
183
183
  *
@@ -204,8 +204,6 @@ sap.ui.define([
204
204
  * Defines the minimum height of the grid.
205
205
  *
206
206
  * Allows an empty grid to be available as a drop target.
207
- *
208
- * @experimental As of version 1.81 Disclaimer: this property is in a beta state - incompatible API changes may be done before its official public release.
209
207
  */
210
208
  minHeight: {type: "sap.ui.core.CSSSize", group: "Appearance", defaultValue: "2rem"},
211
209
 
@@ -226,8 +224,6 @@ sap.ui.define([
226
224
  * Increases the density when arranging the items. Smaller items will take up all of the available space, ignoring their order.
227
225
  *
228
226
  * <b>Note:</b> The order of the items is ignored. An item which is normally at the bottom, can appear on top.
229
- *
230
- * @experimental As of version 1.66 Disclaimer: this property is in a beta state - incompatible API changes may be done before its official public release. Use at your own discretion.
231
227
  */
232
228
  allowDenseFill: {type: "boolean", group: "Appearance", defaultValue: false},
233
229
 
@@ -235,7 +231,6 @@ sap.ui.define([
235
231
  * Makes the grid items act like an inline-block elements. They will be arranged in rows with height equal to the highest item in the row.
236
232
  *
237
233
  * <b>Note:</b> If set to <code>true</code> the properties <code>rowSize</code> for grid layout, and <code>minRows</code> and <code>rows</code> per item will be ignored.
238
- * @experimental As of version 1.66 Disclaimer: this property is in a beta state - incompatible API changes may be done before its official public release. Use at your own discretion.
239
234
  */
240
235
  inlineBlockLayout: {type: "boolean", group: "Appearance", defaultValue: false}
241
236
  },
@@ -257,7 +252,6 @@ sap.ui.define([
257
252
 
258
253
  /**
259
254
  * The sap.f.GridContainerSettings applied for size "XS". Range: up to 374px.
260
- * @experimental As of version 1.71 Disclaimer: this property is in a beta state - incompatible API changes may be done before its official public release. Use at your own discretion.
261
255
  */
262
256
  layoutXS: { type: "sap.f.GridContainerSettings", defaultClass: GridContainerSettings, multiple: false },
263
257
 
@@ -1116,7 +1110,7 @@ sap.ui.define([
1116
1110
  * <b>Note:</b>Should not be called before the <code>GridContainer</code> has been rendered.
1117
1111
  *
1118
1112
  * @public
1119
- * @experimental Since 1.81. Behavior might change.
1113
+ * @since 1.81
1120
1114
  * @param {int} iIndex The index of the item, which will be focused.
1121
1115
  */
1122
1116
  GridContainer.prototype.focusItem = function (iIndex) {
@@ -1147,7 +1141,7 @@ sap.ui.define([
1147
1141
  * <b>Note:</b>Should be called after the rendering of <code>GridContainer</code> is ready.
1148
1142
  *
1149
1143
  * @public
1150
- * @experimental Since 1.85. Behavior might change.
1144
+ * @since 1.85
1151
1145
  * @param {sap.f.NavigationDirection} sDirection The navigation direction.
1152
1146
  * @param {int} iRow The row index of the starting position.
1153
1147
  * @param {int} iColumn The column index of the starting position.
@@ -21,11 +21,10 @@ 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.122.0
24
+ * @version 1.123.0
25
25
  *
26
26
  * @extends sap.ui.core.LayoutData
27
27
  *
28
- * @experimental Since 1.65 This class is experimental. The API may change.
29
28
  * @since 1.65
30
29
  * @public
31
30
  * @constructor
@@ -47,12 +46,12 @@ sap.ui.define(['sap/ui/core/LayoutData'],
47
46
  /**
48
47
  * Specifies the minimum number of rows, which the item should take.
49
48
  */
50
- minRows: {type: "int", group: "Misc"},
49
+ minRows: { type: "int", group: "Misc" },
51
50
  /**
52
51
  * Specifies the number of rows, which the item should take.
53
- * @experimental Since 1.65 this property may soon be removed, use minRows instead
52
+ * For more flexible layout in which the number of rows is determined by the item's height it is recommended to use the "minRows" property instead
54
53
  */
55
- rows: {type: "int", group: "Misc"}
54
+ rows: { type: "int", group: "Misc" }
56
55
  }
57
56
  }
58
57
  });
@@ -58,16 +58,15 @@ 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.122.0
61
+ * @version 1.123.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.122.0
68
+ * @version 1.123.0
69
69
  *
70
- * @experimental Since 1.65 This class is experimental. The API may change.
71
70
  * @since 1.65
72
71
  * @public
73
72
  * @constructor
@@ -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.122.0
96
+ * @version 1.123.0
97
97
  *
98
98
  * @extends sap.m.ListBase
99
99
  * @implements sap.ui.layout.cssgrid.IGridConfigurable
@@ -239,7 +239,7 @@ sap.ui.define([
239
239
  * <b>Note:</b>Should be called after the rendering of <code>GridList</code> is ready.
240
240
  *
241
241
  * @public
242
- * @experimental Since 1.87. Behavior might change.
242
+ * @since 1.87
243
243
  * @param {sap.f.NavigationDirection} sDirection The navigation direction.
244
244
  * @param {int} iRow The row index of the starting position.
245
245
  * @param {int} iColumn The column index of the starting position.
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @extends sap.m.ListItemBase
25
25
  *
26
26
  * @author SAP SE
27
- * @version 1.122.0
27
+ * @version 1.123.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.122.0
59
+ * @version 1.123.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.122.0
33
+ * @version 1.123.0
34
34
  *
35
35
  * @constructor
36
36
  * @public
@@ -22,7 +22,7 @@ sap.ui.define(['sap/m/PlanningCalendarLegend', "sap/ui/core/Lib", 'sap/ui/unifie
22
22
  * @extends sap.m.PlanningCalendarLegend
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.122.0
25
+ * @version 1.123.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.122.0
37
+ * @version 1.123.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.122.0
43
+ * @version 1.123.0
44
44
  *
45
45
  * @constructor
46
46
  * @public
@@ -21,7 +21,7 @@ sap.ui.define([],
21
21
  if (oProductSwith) {
22
22
  oAccessibilityState.setsize = oProductSwith._getItemsCount();
23
23
  oAccessibilityState.posinset = oProductSwith._getItemPosition(oControl);
24
- oAccessibilityState.checked = oControl.getId() === oProductSwith.getSelectedItem() ? "true" : undefined;
24
+ oAccessibilityState.checked = oControl.getId() === oProductSwith.getSelectedItem() ? "true" : "false";
25
25
  }
26
26
 
27
27
  oRm.openStart("div", oControl);
@@ -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.122.0
26
+ * @version 1.123.0
27
27
  *
28
28
  * @constructor
29
29
  * @public
@@ -58,7 +58,7 @@ function(
58
58
  * @implements sap.f.IShellBar, sap.m.IBar, sap.tnt.IToolHeader
59
59
  *
60
60
  * @author SAP SE
61
- * @version 1.122.0
61
+ * @version 1.123.0
62
62
  *
63
63
  * @constructor
64
64
  * @public
@@ -151,7 +151,7 @@ sap.ui.define([
151
151
  * @extends sap.ui.core.Control
152
152
  *
153
153
  * @author SAP SE
154
- * @version 1.122.0
154
+ * @version 1.123.0
155
155
  *
156
156
  * @constructor
157
157
  * @public
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @extends sap.ui.core.Item
28
28
  *
29
29
  * @author SAP SE
30
- * @version 1.122.0
30
+ * @version 1.123.0
31
31
  *
32
32
  * @constructor
33
33
  * @public
@@ -50,7 +50,7 @@ sap.ui.define([
50
50
  * @abstract
51
51
  *
52
52
  * @author SAP SE
53
- * @version 1.122.0
53
+ * @version 1.123.0
54
54
  *
55
55
  * @constructor
56
56
  * @public
@@ -118,7 +118,21 @@ sap.ui.define([
118
118
  * Defines if tooltips should be shown for truncated texts.
119
119
  * @private
120
120
  */
121
- useTooltips: { type: "boolean", visibility: "hidden", defaultValue: false}
121
+ useTooltips: { type: "boolean", visibility: "hidden", defaultValue: false},
122
+
123
+ /**
124
+ * Defines the href which the header should open. If set - the header will act and render as a link.
125
+ *
126
+ * @experimental Since 1.122. Do not use this feature outside of sap.ui.integration.widgets.Card.
127
+ */
128
+ href: { type: "string" },
129
+
130
+ /**
131
+ * Defines the target for the case when <code>href</code> is given.
132
+ *
133
+ * @experimental Since 1.122. Do not use this feature outside of sap.ui.integration.widgets.Card.
134
+ */
135
+ target: { type: "string" }
122
136
  },
123
137
  aggregations: {
124
138
  /**
@@ -200,16 +214,34 @@ sap.ui.define([
200
214
  return this.getDomRef("focusable");
201
215
  };
202
216
 
217
+ /**
218
+ * If the header must be rendered as <code>a</code> element.
219
+ * @returns {boolean} True if the header must be rendered as <code>a</code> element.
220
+ */
221
+ BaseHeader.prototype.isLink = function () {
222
+ return !!this.getHref();
223
+ };
224
+
203
225
  BaseHeader.prototype.ontap = function (oEvent) {
204
- if (this.isInteractive() && !this._isInsideToolbar(oEvent.target)) {
205
- this.firePress();
206
- }
226
+ this._handleTapOrSelect(oEvent);
207
227
  };
208
228
 
209
229
  BaseHeader.prototype.onsapselect = function (oEvent) {
210
- if (this.isInteractive() && !this._isInsideToolbar(oEvent.target)) {
211
- this.firePress();
230
+ this._handleTapOrSelect(oEvent);
231
+ };
232
+
233
+ BaseHeader.prototype._handleTapOrSelect = function (oEvent) {
234
+ if (!this.isInteractive() || this._isInsideToolbar(oEvent.target)) {
235
+ return;
212
236
  }
237
+
238
+ if (this.isLink() && oEvent.ctrlKey) {
239
+ // ctrl + click should open the link in a new tab
240
+ return;
241
+ }
242
+
243
+ this.firePress();
244
+ oEvent.preventDefault();
213
245
  };
214
246
 
215
247
  /**
@@ -371,6 +403,10 @@ sap.ui.define([
371
403
  * @ui5-restricted
372
404
  */
373
405
  BaseHeader.prototype.getFocusableElementAriaRole = function () {
406
+ if (this.isLink()) {
407
+ return "link";
408
+ }
409
+
374
410
  return this.hasListeners("press") ? "button" : "group";
375
411
  };
376
412
 
@@ -4,7 +4,7 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
7
- // Provides default renderer for control sap.f.cards.NumericHeader
7
+ // Provides renderer helper for sap.f.cards.BaseHeader
8
8
  sap.ui.define([], function () {
9
9
  "use strict";
10
10
 
@@ -64,5 +64,23 @@ sap.ui.define([], function () {
64
64
  oRm.close("div");
65
65
  };
66
66
 
67
+ /**
68
+ * Renders attributes for the case when header acts as <code>a</code> tag.
69
+ * @param {sap.ui.core.RenderManager} oRm The RenderManager that can be used for writing to the render output buffer
70
+ * @param {sap.f.cards.Header} oHeader An object representation of the control that should be rendered
71
+ */
72
+ BaseHeaderRenderer.linkAttributes = function(oRm, oHeader) {
73
+ oRm.attr("href", oHeader.getHref())
74
+ .attr("rel", "noopener noreferrer");
75
+
76
+ const sTarget = oHeader.getTarget();
77
+ if (sTarget) {
78
+ oRm.attr("target", sTarget);
79
+ }
80
+
81
+ // <a> elements are draggable per default, so set it to false
82
+ oRm.attr("draggable", "false");
83
+ };
84
+
67
85
  return BaseHeaderRenderer;
68
86
  }, /* bExport= */ true);
@@ -48,7 +48,7 @@ sap.ui.define([
48
48
  * @implements sap.f.cards.IHeader
49
49
  *
50
50
  * @author SAP SE
51
- * @version 1.122.0
51
+ * @version 1.123.0
52
52
  *
53
53
  * @constructor
54
54
  * @public
@@ -31,7 +31,8 @@ sap.ui.define([
31
31
  bLoading = oHeader.isLoading(),
32
32
  oError = oHeader.getAggregation("_error"),
33
33
  oToolbar = oHeader.getToolbar(),
34
- bUseTileLayout = oHeader.getProperty("useTileLayout");
34
+ bUseTileLayout = oHeader.getProperty("useTileLayout"),
35
+ bRenderAsLink = oHeader.isLink();
35
36
 
36
37
  oRm.openStart("div", oHeader)
37
38
  .class("sapFCardHeader");
@@ -50,8 +51,14 @@ sap.ui.define([
50
51
 
51
52
  oRm.openEnd();
52
53
 
53
- oRm.openStart("div")
54
- .attr("id", sId + "-focusable")
54
+ if (bRenderAsLink) {
55
+ oRm.openStart("a");
56
+ BaseHeaderRenderer.linkAttributes(oRm, oHeader);
57
+ } else {
58
+ oRm.openStart("div");
59
+ }
60
+
61
+ oRm.attr("id", sId + "-focusable")
55
62
  .class("sapFCardHeaderWrapper");
56
63
 
57
64
  if (oHeader.getProperty("focusable") && !oHeader._isInsideGridContainer()) {
@@ -145,7 +152,11 @@ sap.ui.define([
145
152
 
146
153
  BaseHeaderRenderer.renderBanner(oRm, oHeader);
147
154
 
148
- oRm.close("div");
155
+ if (bRenderAsLink) {
156
+ oRm.close("a");
157
+ } else {
158
+ oRm.close("div");
159
+ }
149
160
 
150
161
  if (oToolbar) {
151
162
  oRm.openStart("div")
@@ -57,7 +57,7 @@ sap.ui.define([
57
57
  * @extends sap.f.cards.BaseHeader
58
58
  *
59
59
  * @author SAP SE
60
- * @version 1.122.0
60
+ * @version 1.123.0
61
61
  *
62
62
  * @constructor
63
63
  * @public
@@ -444,7 +444,7 @@ sap.ui.define([
444
444
  oControl = new Text({
445
445
  id: this.getId() + "-unitOfMeasurement",
446
446
  wrapping: false
447
- });
447
+ }).addStyleClass("sapFCardHeaderUnitOfMeasurement");
448
448
  this.setAggregation("_unitOfMeasurement", oControl);
449
449
  }
450
450
 
@@ -21,7 +21,8 @@ sap.ui.define([
21
21
  */
22
22
  NumericHeaderRenderer.render = function (oRm, oNumericHeader) {
23
23
  var bLoading = oNumericHeader.isLoading(),
24
- oError = oNumericHeader.getAggregation("_error");
24
+ oError = oNumericHeader.getAggregation("_error"),
25
+ bRenderAsLink = oNumericHeader.isLink();
25
26
 
26
27
  oRm.openStart("div", oNumericHeader)
27
28
  .class("sapFCardHeader")
@@ -45,8 +46,14 @@ sap.ui.define([
45
46
 
46
47
  oRm.openEnd();
47
48
 
48
- oRm.openStart("div")
49
- .attr("id", oNumericHeader.getId() + "-focusable")
49
+ if (bRenderAsLink) {
50
+ oRm.openStart("a");
51
+ BaseHeaderRenderer.linkAttributes(oRm, oNumericHeader);
52
+ } else {
53
+ oRm.openStart("div");
54
+ }
55
+
56
+ oRm.attr("id", oNumericHeader.getId() + "-focusable")
50
57
  .class("sapFCardHeaderContent");
51
58
 
52
59
  if (oNumericHeader.getProperty("focusable") && !oNumericHeader._isInsideGridContainer()) {
@@ -72,7 +79,11 @@ sap.ui.define([
72
79
  BaseHeaderRenderer.renderBanner(oRm, oNumericHeader);
73
80
  }
74
81
 
75
- oRm.close("div");
82
+ if (bRenderAsLink) {
83
+ oRm.close("a");
84
+ } else {
85
+ oRm.close("div");
86
+ }
76
87
 
77
88
  if (!oError) {
78
89
  NumericHeaderRenderer.renderToolbar(oRm, oNumericHeader);
@@ -170,22 +181,20 @@ sap.ui.define([
170
181
  oRm.class("sapFCardSubtitleAndUnit");
171
182
  }
172
183
 
184
+ if (oBindingInfos.subtitle || oBindingInfos.unitOfMeasurement) {
185
+ oRm.class("sapFCardHeaderItemBinded");
186
+ }
187
+
173
188
  oRm.openEnd();
174
189
 
175
190
  if (oSubtitle) {
176
- if (oBindingInfos.subtitle) {
177
- oSubtitle.addStyleClass("sapFCardHeaderItemBinded");
178
- }
179
191
  oRm.renderControl(oSubtitle);
180
192
  }
181
193
 
182
194
  if (oUnitOfMeasurement) {
183
- oUnitOfMeasurement.addStyleClass("sapFCardHeaderUnitOfMeasurement");
184
- if (oBindingInfos.unitOfMeasurement) {
185
- oUnitOfMeasurement.addStyleClass("sapFCardHeaderItemBinded");
186
- }
187
195
  oRm.renderControl(oUnitOfMeasurement);
188
196
  }
197
+
189
198
  oRm.close("div");
190
199
  }
191
200
  };