@openui5/sap.f 1.117.1 → 1.119.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 (100) hide show
  1. package/THIRDPARTY.txt +2 -2
  2. package/package.json +4 -4
  3. package/src/sap/f/.library +1 -1
  4. package/src/sap/f/Avatar.js +1 -1
  5. package/src/sap/f/AvatarGroup.js +1 -1
  6. package/src/sap/f/AvatarGroupItem.js +1 -1
  7. package/src/sap/f/CalendarAppointmentInCard.js +1 -1
  8. package/src/sap/f/CalendarInCard.js +1 -1
  9. package/src/sap/f/Card.js +1 -1
  10. package/src/sap/f/CardBase.js +1 -1
  11. package/src/sap/f/DynamicPage.js +2 -1
  12. package/src/sap/f/DynamicPageAccessibleLandmarkInfo.js +1 -1
  13. package/src/sap/f/DynamicPageHeader.js +1 -1
  14. package/src/sap/f/DynamicPageTitle.js +23 -10
  15. package/src/sap/f/DynamicPageTitleRenderer.js +2 -1
  16. package/src/sap/f/FlexibleColumnLayout.js +1 -1
  17. package/src/sap/f/FlexibleColumnLayoutAccessibleLandmarkInfo.js +1 -1
  18. package/src/sap/f/FlexibleColumnLayoutSemanticHelper.js +3 -3
  19. package/src/sap/f/GridContainer.js +1 -1
  20. package/src/sap/f/GridContainerItemLayoutData.js +1 -1
  21. package/src/sap/f/GridContainerSettings.js +2 -2
  22. package/src/sap/f/GridList.js +1 -4
  23. package/src/sap/f/GridListItem.js +1 -1
  24. package/src/sap/f/IllustratedMessage.js +1 -1
  25. package/src/sap/f/Illustration.js +1 -1
  26. package/src/sap/f/PlanningCalendarInCardLegend.js +2 -2
  27. package/src/sap/f/ProductSwitch.js +1 -1
  28. package/src/sap/f/ProductSwitchItem.js +1 -1
  29. package/src/sap/f/SearchManager.js +1 -1
  30. package/src/sap/f/ShellBar.js +1 -1
  31. package/src/sap/f/SidePanel.js +27 -21
  32. package/src/sap/f/SidePanelItem.js +1 -1
  33. package/src/sap/f/SidePanelRenderer.js +1 -1
  34. package/src/sap/f/cards/BaseHeader.js +38 -4
  35. package/src/sap/f/cards/BaseHeaderRenderer.js +68 -0
  36. package/src/sap/f/cards/Header.js +33 -31
  37. package/src/sap/f/cards/HeaderRenderer.js +19 -17
  38. package/src/sap/f/cards/NumericHeader.js +199 -37
  39. package/src/sap/f/cards/NumericHeaderRenderer.js +33 -6
  40. package/src/sap/f/cards/NumericIndicators.js +1 -1
  41. package/src/sap/f/cards/NumericSideIndicator.js +1 -1
  42. package/src/sap/f/cards/loading/AnalyticalPlaceholder.js +1 -1
  43. package/src/sap/f/cards/loading/CalendarPlaceholder.js +1 -1
  44. package/src/sap/f/cards/loading/GenericPlaceholder.js +1 -1
  45. package/src/sap/f/cards/loading/ListPlaceholder.js +1 -1
  46. package/src/sap/f/cards/loading/ListPlaceholderRenderer.js +1 -2
  47. package/src/sap/f/cards/loading/ObjectPlaceholder.js +1 -1
  48. package/src/sap/f/cards/loading/PlaceholderBase.js +1 -1
  49. package/src/sap/f/cards/loading/TablePlaceholder.js +1 -1
  50. package/src/sap/f/cards/loading/TimelinePlaceholder.js +1 -1
  51. package/src/sap/f/changeHandler/MoveDynamicPageTitleActions.js +1 -1
  52. package/src/sap/f/delegate/GridContainerItemNavigation.js +8 -8
  53. package/src/sap/f/delegate/GridItemNavigation.js +1 -1
  54. package/src/sap/f/dnd/GridDragOver.js +1 -1
  55. package/src/sap/f/dnd/GridDropInfo.js +1 -1
  56. package/src/sap/f/library.js +2 -2
  57. package/src/sap/f/messagebundle_bg.properties +15 -15
  58. package/src/sap/f/messagebundle_cs.properties +9 -9
  59. package/src/sap/f/messagebundle_da.properties +1 -1
  60. package/src/sap/f/messagebundle_fi.properties +1 -1
  61. package/src/sap/f/messagebundle_fr.properties +5 -5
  62. package/src/sap/f/messagebundle_hi.properties +1 -1
  63. package/src/sap/f/messagebundle_hr.properties +4 -4
  64. package/src/sap/f/messagebundle_hu.properties +1 -1
  65. package/src/sap/f/messagebundle_sl.properties +1 -1
  66. package/src/sap/f/messagebundle_zh_TW.properties +1 -1
  67. package/src/sap/f/rules/DynamicPage.support.js +26 -15
  68. package/src/sap/f/semantic/AddAction.js +1 -1
  69. package/src/sap/f/semantic/CloseAction.js +1 -1
  70. package/src/sap/f/semantic/CopyAction.js +1 -1
  71. package/src/sap/f/semantic/DeleteAction.js +1 -1
  72. package/src/sap/f/semantic/DiscussInJamAction.js +1 -1
  73. package/src/sap/f/semantic/EditAction.js +1 -1
  74. package/src/sap/f/semantic/ExitFullScreenAction.js +1 -1
  75. package/src/sap/f/semantic/FavoriteAction.js +1 -1
  76. package/src/sap/f/semantic/FlagAction.js +1 -1
  77. package/src/sap/f/semantic/FooterMainAction.js +1 -1
  78. package/src/sap/f/semantic/FullScreenAction.js +1 -1
  79. package/src/sap/f/semantic/MainAction.js +1 -1
  80. package/src/sap/f/semantic/MessagesIndicator.js +1 -1
  81. package/src/sap/f/semantic/NegativeAction.js +1 -1
  82. package/src/sap/f/semantic/PositiveAction.js +1 -1
  83. package/src/sap/f/semantic/PrintAction.js +1 -1
  84. package/src/sap/f/semantic/SemanticButton.js +1 -1
  85. package/src/sap/f/semantic/SemanticConfiguration.js +1 -1
  86. package/src/sap/f/semantic/SemanticControl.js +1 -1
  87. package/src/sap/f/semantic/SemanticPage.js +4 -2
  88. package/src/sap/f/semantic/SemanticToggleButton.js +1 -1
  89. package/src/sap/f/semantic/SendEmailAction.js +1 -1
  90. package/src/sap/f/semantic/SendMessageAction.js +1 -1
  91. package/src/sap/f/semantic/ShareInJamAction.js +1 -1
  92. package/src/sap/f/semantic/TitleMainAction.js +1 -1
  93. package/src/sap/f/shellBar/AdditionalContentSupport.js +1 -1
  94. package/src/sap/f/shellBar/CoPilot.js +1 -1
  95. package/src/sap/f/shellBar/ControlSpacer.js +1 -1
  96. package/src/sap/f/shellBar/Search.js +1 -1
  97. package/src/sap/f/themes/base/Card.less +43 -3
  98. package/src/sap/f/themes/base/DynamicPage.less +3 -2
  99. package/src/sap/f/themes/base/DynamicPageTitle.less +5 -0
  100. package/src/sap/f/themes/base/SidePanel.less +22 -15
@@ -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.1
45
+ * @version 1.119.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 () {
@@ -328,6 +352,16 @@ sap.ui.define([
328
352
  return this.hasListeners("press") ? this._oRb.getText("ARIA_ROLEDESCRIPTION_INTERACTIVE_CARD_HEADER") : this._oRb.getText("ARIA_ROLEDESCRIPTION_CARD_HEADER");
329
353
  };
330
354
 
355
+ /**
356
+ * Gets the ids of the banner lines to be used in aria-labelledby
357
+ * @returns {string} The ids of the banner lines.
358
+ */
359
+ BaseHeader.prototype._getBannerLinesIds = function () {
360
+ return this.getBannerLines().map((oBannerLine) => {
361
+ return oBannerLine.getId();
362
+ }).join(" ");
363
+ };
364
+
331
365
  /**
332
366
  * Returns if the control is inside a sap.f.GridContainer
333
367
  *
@@ -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);
@@ -22,8 +22,10 @@ sap.ui.define([
22
22
  ) {
23
23
  "use strict";
24
24
 
25
- var AvatarShape = mLibrary.AvatarShape;
26
- var AvatarColor = mLibrary.AvatarColor;
25
+ const AvatarShape = mLibrary.AvatarShape;
26
+ const AvatarColor = mLibrary.AvatarColor;
27
+ const AvatarImageFitType = mLibrary.AvatarImageFitType;
28
+ const AvatarSize = mLibrary.AvatarSize;
27
29
 
28
30
  /**
29
31
  * Constructor for a new <code>Header</code>.
@@ -46,7 +48,7 @@ sap.ui.define([
46
48
  * @implements sap.f.cards.IHeader
47
49
  *
48
50
  * @author SAP SE
49
- * @version 1.117.1
51
+ * @version 1.119.0
50
52
  *
51
53
  * @constructor
52
54
  * @public
@@ -120,7 +122,14 @@ sap.ui.define([
120
122
  *
121
123
  * @experimental Since 1.83 this feature is experimental and the API may change.
122
124
  */
123
- iconVisible: { type: "boolean", defaultValue: true }
125
+ iconVisible: { type: "boolean", defaultValue: true },
126
+
127
+ /**
128
+ * Defines the size of the icon.
129
+ *
130
+ * @experimental Since 1.119 this feature is experimental and the API may change.
131
+ */
132
+ iconSize: { type: "sap.m.AvatarSize", defaultValue: AvatarSize.S }
124
133
  },
125
134
  aggregations: {
126
135
 
@@ -166,10 +175,8 @@ sap.ui.define([
166
175
  Header.prototype.exit = function () {
167
176
  BaseHeader.prototype.exit.apply(this, arguments);
168
177
 
169
- if (this._oAriaAvatarText) {
170
- this._oAriaAvatarText.destroy();
171
- this._oAriaAvatarText = null;
172
- }
178
+ this._oAriaAvatarText.destroy();
179
+ this._oAriaAvatarText = null;
173
180
  };
174
181
 
175
182
  /**
@@ -208,7 +215,9 @@ sap.ui.define([
208
215
  Header.prototype._getAvatar = function () {
209
216
  var oAvatar = this.getAggregation("_avatar");
210
217
  if (!oAvatar) {
211
- oAvatar = new Avatar().addStyleClass("sapFCardIcon");
218
+ oAvatar = new Avatar({
219
+ imageFitType: AvatarImageFitType.Contain
220
+ }).addStyleClass("sapFCardIcon");
212
221
  this.setAggregation("_avatar", oAvatar);
213
222
  }
214
223
  return oAvatar;
@@ -229,13 +238,13 @@ sap.ui.define([
229
238
  .setText(this.getSubtitle())
230
239
  .setMaxLines(this.getSubtitleMaxLines());
231
240
 
232
- var oAvatar = this._getAvatar();
233
-
234
- oAvatar.setDisplayShape(this.getIconDisplayShape());
235
- oAvatar.setSrc(this.getIconSrc());
236
- oAvatar.setInitials(this.getIconInitials());
237
- oAvatar.setTooltip(this.getIconAlt());
238
- oAvatar.setBackgroundColor(this.getIconBackgroundColor());
241
+ this._getAvatar()
242
+ .setDisplayShape(this.getIconDisplayShape())
243
+ .setSrc(this.getIconSrc())
244
+ .setInitials(this.getIconInitials())
245
+ .setTooltip(this.getIconAlt())
246
+ .setBackgroundColor(this.getIconBackgroundColor())
247
+ .setDisplaySize(this.getIconSize());
239
248
  };
240
249
 
241
250
  /**
@@ -270,38 +279,31 @@ sap.ui.define([
270
279
  * @returns {string} IDs of controls
271
280
  */
272
281
  Header.prototype._getAriaLabelledBy = function () {
273
- var sCardTypeId = "",
274
- sTitleId = "",
275
- sSubtitleId = "",
276
- sStatusTextId = "",
277
- sAvatarId = "",
278
- sIds;
282
+ const aIds = [];
279
283
 
280
284
  if (this.getParent() && this.getParent()._ariaText) {
281
- sCardTypeId = this.getParent()._ariaText.getId();
285
+ aIds.push(this.getParent()._ariaText.getId());
282
286
  }
283
287
 
284
288
  if (this.getTitle()) {
285
- sTitleId = this._getTitle().getId();
289
+ aIds.push(this._getTitle().getId());
286
290
  }
287
291
 
288
292
  if (this.getSubtitle()) {
289
- sSubtitleId = this._getSubtitle().getId();
293
+ aIds.push(this._getSubtitle().getId());
290
294
  }
291
295
 
292
296
  if (this.getStatusText()) {
293
- sStatusTextId = this.getId() + "-status";
297
+ aIds.push(this.getId() + "-status");
294
298
  }
295
299
 
296
300
  if (this.getIconSrc() || this.getIconInitials()) {
297
- sAvatarId = this.getId() + "-ariaAvatarText";
301
+ aIds.push(this.getId() + "-ariaAvatarText");
298
302
  }
299
303
 
300
- sIds = sCardTypeId + " " + sTitleId + " " + sSubtitleId + " " + sStatusTextId + " " + sAvatarId;
304
+ aIds.push(this._getBannerLinesIds());
301
305
 
302
- // remove whitespace from both sides
303
- // and merge consecutive spaces into one
304
- return sIds.replace(/ {2,}/g, ' ').trim();
306
+ return aIds.filter((sElement) => { return !!sElement; }).join(" ");
305
307
  };
306
308
 
307
309
  Header.prototype.isLoading = function () {
@@ -4,12 +4,14 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
7
- sap.ui.define([], function () {
7
+ sap.ui.define([
8
+ "sap/f/cards/BaseHeaderRenderer",
9
+ "sap/ui/core/Renderer"
10
+ ], function (BaseHeaderRenderer, Renderer) {
8
11
  "use strict";
9
12
 
10
- var HeaderRenderer = {
11
- apiVersion: 2
12
- };
13
+ var HeaderRenderer = Renderer.extend(BaseHeaderRenderer);
14
+ HeaderRenderer.apiVersion = 2;
13
15
 
14
16
  /**
15
17
  * Render a header.
@@ -24,13 +26,12 @@ sap.ui.define([], function () {
24
26
  oTitle = oHeader.getAggregation("_title"),
25
27
  oSubtitle = oHeader.getAggregation("_subtitle"),
26
28
  bHasSubtitle = oHeader.getSubtitle() || oBindingInfos.subtitle,
27
- oAvatar = oHeader.getAggregation("_avatar"),
28
29
  oDataTimestamp = oHeader.getAggregation("_dataTimestamp"),
29
30
  bHasDataTimestamp = oHeader.getDataTimestamp() || oBindingInfos.dataTimestamp,
30
31
  bLoading = oHeader.isLoading(),
31
32
  oError = oHeader.getAggregation("_error"),
32
33
  oToolbar = oHeader.getToolbar(),
33
- bIconVisible = oHeader.shouldShowIcon();
34
+ bUseTileLayout = oHeader.getProperty("useTileLayout");
34
35
 
35
36
  oRm.openStart("div", oHeader)
36
37
  .class("sapFCardHeader");
@@ -43,6 +44,10 @@ sap.ui.define([], function () {
43
44
  oRm.class("sapFCardSectionClickable");
44
45
  }
45
46
 
47
+ if (oHeader.getIconSrc() && oHeader.getIconVisible()) {
48
+ oRm.class("sapFCardHeaderHasIcon");
49
+ }
50
+
46
51
  oRm.openEnd();
47
52
 
48
53
  oRm.openStart("div")
@@ -71,17 +76,8 @@ sap.ui.define([], function () {
71
76
  return;
72
77
  }
73
78
 
74
- if (bIconVisible && (!oHeader.isPropertyInitial("iconSrc") || !oHeader.isPropertyInitial("iconInitials"))) {
75
- oRm.openStart("div")
76
- .class("sapFCardHeaderImage")
77
- .openEnd();
78
-
79
- if (oBindingInfos.iconSrc && oBindingInfos.iconSrc.binding && !oBindingInfos.iconSrc.binding.getValue()) {
80
- oAvatar.addStyleClass("sapFCardHeaderItemBinded");
81
- }
82
- oRm.renderControl(oAvatar);
83
- oRm.renderControl(oHeader._oAriaAvatarText);
84
- oRm.close("div");
79
+ if (!bUseTileLayout) {
80
+ BaseHeaderRenderer.renderAvatar(oRm, oHeader);
85
81
  }
86
82
 
87
83
  oRm.openStart("div")
@@ -143,6 +139,12 @@ sap.ui.define([], function () {
143
139
 
144
140
  oRm.close("div");
145
141
 
142
+ if (bUseTileLayout) {
143
+ BaseHeaderRenderer.renderAvatar(oRm, oHeader);
144
+ }
145
+
146
+ BaseHeaderRenderer.renderBanner(oRm, oHeader);
147
+
146
148
  oRm.close("div");
147
149
 
148
150
  if (oToolbar) {