@openui5/sap.f 1.128.0 → 1.130.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 (90) 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 +2 -2
  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 +13 -1
  11. package/src/sap/f/DynamicPage.js +27 -7
  12. package/src/sap/f/DynamicPageAccessibleLandmarkInfo.js +1 -1
  13. package/src/sap/f/DynamicPageHeader.js +2 -2
  14. package/src/sap/f/DynamicPageTitle.js +11 -1
  15. package/src/sap/f/FlexibleColumnLayout.js +59 -1
  16. package/src/sap/f/FlexibleColumnLayoutAccessibleLandmarkInfo.js +1 -1
  17. package/src/sap/f/FlexibleColumnLayoutData.js +56 -3
  18. package/src/sap/f/FlexibleColumnLayoutDataForDesktop.js +5 -1
  19. package/src/sap/f/FlexibleColumnLayoutDataForTablet.js +5 -1
  20. package/src/sap/f/FlexibleColumnLayoutSemanticHelper.js +1 -1
  21. package/src/sap/f/GridContainer.js +1 -1
  22. package/src/sap/f/GridContainerItemLayoutData.js +1 -1
  23. package/src/sap/f/GridContainerSettings.js +2 -2
  24. package/src/sap/f/GridList.js +1 -1
  25. package/src/sap/f/GridListItem.js +1 -1
  26. package/src/sap/f/IllustratedMessage.js +1 -1
  27. package/src/sap/f/Illustration.js +1 -1
  28. package/src/sap/f/PlanningCalendarInCardLegend.js +1 -1
  29. package/src/sap/f/ProductSwitch.js +1 -1
  30. package/src/sap/f/ProductSwitchItem.js +1 -1
  31. package/src/sap/f/SearchManager.js +1 -1
  32. package/src/sap/f/ShellBar.js +1 -1
  33. package/src/sap/f/SidePanel.js +13 -4
  34. package/src/sap/f/SidePanelItem.js +1 -1
  35. package/src/sap/f/cards/BaseHeader.js +1 -1
  36. package/src/sap/f/cards/CardBadgeCustomData.js +2 -0
  37. package/src/sap/f/cards/Header.js +12 -6
  38. package/src/sap/f/cards/NumericHeader.js +11 -5
  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/ObjectPlaceholder.js +1 -1
  46. package/src/sap/f/cards/loading/PlaceholderBase.js +1 -1
  47. package/src/sap/f/cards/loading/TablePlaceholder.js +1 -1
  48. package/src/sap/f/cards/loading/TimelinePlaceholder.js +1 -1
  49. package/src/sap/f/cards/util/CardBadgeEnabler.js +95 -55
  50. package/src/sap/f/changeHandler/MoveDynamicPageTitleActions.js +1 -1
  51. package/src/sap/f/delegate/GridContainerItemNavigation.js +1 -1
  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 +3 -2
  56. package/src/sap/f/messagebundle_da.properties +1 -1
  57. package/src/sap/f/messagebundle_zh_CN.properties +1 -1
  58. package/src/sap/f/semantic/AddAction.js +1 -1
  59. package/src/sap/f/semantic/CloseAction.js +1 -1
  60. package/src/sap/f/semantic/CopyAction.js +1 -1
  61. package/src/sap/f/semantic/DeleteAction.js +1 -1
  62. package/src/sap/f/semantic/DiscussInJamAction.js +1 -1
  63. package/src/sap/f/semantic/EditAction.js +1 -1
  64. package/src/sap/f/semantic/ExitFullScreenAction.js +1 -1
  65. package/src/sap/f/semantic/FavoriteAction.js +1 -1
  66. package/src/sap/f/semantic/FlagAction.js +1 -1
  67. package/src/sap/f/semantic/FooterMainAction.js +1 -1
  68. package/src/sap/f/semantic/FullScreenAction.js +1 -1
  69. package/src/sap/f/semantic/MainAction.js +1 -1
  70. package/src/sap/f/semantic/MessagesIndicator.js +1 -1
  71. package/src/sap/f/semantic/NegativeAction.js +1 -1
  72. package/src/sap/f/semantic/PositiveAction.js +1 -1
  73. package/src/sap/f/semantic/PrintAction.js +1 -1
  74. package/src/sap/f/semantic/SemanticButton.js +1 -1
  75. package/src/sap/f/semantic/SemanticConfiguration.js +1 -1
  76. package/src/sap/f/semantic/SemanticControl.js +1 -1
  77. package/src/sap/f/semantic/SemanticPage.js +1 -1
  78. package/src/sap/f/semantic/SemanticToggleButton.js +1 -1
  79. package/src/sap/f/semantic/SendEmailAction.js +1 -1
  80. package/src/sap/f/semantic/SendMessageAction.js +1 -1
  81. package/src/sap/f/semantic/ShareInJamAction.js +1 -1
  82. package/src/sap/f/semantic/TitleMainAction.js +1 -1
  83. package/src/sap/f/shellBar/AdditionalContentSupport.js +1 -1
  84. package/src/sap/f/shellBar/CoPilot.js +1 -1
  85. package/src/sap/f/shellBar/ControlSpacer.js +1 -1
  86. package/src/sap/f/shellBar/Search.js +1 -1
  87. package/src/sap/f/themes/base/AvatarGroup.less +1 -1
  88. package/src/sap/f/themes/base/Card.less +10 -1
  89. package/src/sap/f/themes/base/FlexibleColumnLayout.less +1 -1
  90. package/src/sap/f/themes/base/SidePanel.less +4 -0
@@ -151,7 +151,7 @@ sap.ui.define([
151
151
  * @extends sap.ui.core.Control
152
152
  *
153
153
  * @author SAP SE
154
- * @version 1.128.0
154
+ * @version 1.130.0
155
155
  *
156
156
  * @constructor
157
157
  * @public
@@ -468,7 +468,7 @@ sap.ui.define([
468
468
  this.getItems().length && this._fixSidePanelWidth();
469
469
  }
470
470
  } else {
471
- if (this.getDomRef().querySelector(".sapFSPMain").scrollTop === 0) {
471
+ if (this.getDomRef().querySelector(".sapFSPMain").scrollTop === 0 && !this._isSingleItem()) {
472
472
  this.setActionBarExpanded(true);
473
473
  }
474
474
  }
@@ -498,7 +498,8 @@ sap.ui.define([
498
498
  bSideContentExpanded = this._getSideContentExpanded(),
499
499
  bSideExpanded = this.getActionBarExpanded() || bSideContentExpanded,
500
500
  bCtrlOrCmd = oEvent.ctrlKey || oEvent.metaKey,
501
- bSplitterFocused = document.activeElement === this.getDomRef().querySelector(".sapFSPSplitterBar");
501
+ bSplitterFocused = document.activeElement === this.getDomRef().querySelector(".sapFSPSplitterBar"),
502
+ iDirectionModifier = this.getSidePanelPosition() === SidePanelPosition.Right ? 1 : -1;
502
503
 
503
504
  if (bCtrlOrCmd && oEvent.which === KeyCodes.ARROW_LEFT) {
504
505
  oEvent.preventDefault();
@@ -539,10 +540,14 @@ sap.ui.define([
539
540
  this._setSidePanelResizePosition(SIDE_PANEL_POSITION_MIN_WIDTH);
540
541
  break;
541
542
  case KeyCodes.ARROW_LEFT:
543
+ this._moveSidePanelResizePositionWith(oEvent.shiftKey ? this.getSidePanelResizeLargerStep() * iDirectionModifier : this.getSidePanelResizeStep() * iDirectionModifier);
544
+ break;
542
545
  case KeyCodes.ARROW_UP:
543
546
  this._moveSidePanelResizePositionWith(oEvent.shiftKey ? this.getSidePanelResizeLargerStep() : this.getSidePanelResizeStep());
544
547
  break;
545
548
  case KeyCodes.ARROW_RIGHT:
549
+ this._moveSidePanelResizePositionWith(oEvent.shiftKey ? -this.getSidePanelResizeLargerStep() * iDirectionModifier : -this.getSidePanelResizeStep() * iDirectionModifier);
550
+ break;
546
551
  case KeyCodes.ARROW_DOWN:
547
552
  this._moveSidePanelResizePositionWith(oEvent.shiftKey ? -this.getSidePanelResizeLargerStep() : -this.getSidePanelResizeStep());
548
553
  break;
@@ -1194,7 +1199,7 @@ sap.ui.define([
1194
1199
  setTimeout(function() {
1195
1200
  bForward = iTop > this._iLastScrollPosition;
1196
1201
  bBackward = iTop < this._iLastScrollPosition;
1197
- this.setActionBarExpanded(!bForward || bBackward);
1202
+ !this._isSingleItem() && this.setActionBarExpanded(!bForward || bBackward);
1198
1203
  this._iLastScrollPosition = iTop;
1199
1204
  this.bScrolling = false;
1200
1205
  }.bind(this), 100);
@@ -1334,6 +1339,10 @@ sap.ui.define([
1334
1339
  oSide = this.getDomRef().querySelector(".sapFSPSide"),
1335
1340
  iSidePanelWidth = parseInt(window.getComputedStyle(oSide)['width']);
1336
1341
 
1342
+ if (this.getSidePanelPosition() === SidePanelPosition.Left) {
1343
+ iDeltaX = -iDeltaX;
1344
+ }
1345
+
1337
1346
  oEvent.preventDefault();
1338
1347
 
1339
1348
  if (iSidePanelWidth) {
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @extends sap.ui.core.Item
28
28
  *
29
29
  * @author SAP SE
30
- * @version 1.128.0
30
+ * @version 1.130.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.128.0
53
+ * @version 1.130.0
54
54
  *
55
55
  * @constructor
56
56
  * @public
@@ -36,6 +36,8 @@ sap.ui.define([
36
36
 
37
37
  var CardBadgeCustomData = CustomData.extend("sap.f.cards.CardBadgeCustomData", {
38
38
  metadata: {
39
+
40
+ library : "sap.f",
39
41
  properties: {
40
42
 
41
43
  /**
@@ -48,7 +48,7 @@ sap.ui.define([
48
48
  * @implements sap.f.cards.IHeader
49
49
  *
50
50
  * @author SAP SE
51
- * @version 1.128.0
51
+ * @version 1.130.0
52
52
  *
53
53
  * @constructor
54
54
  * @public
@@ -129,7 +129,14 @@ sap.ui.define([
129
129
  *
130
130
  * @experimental Since 1.119 this feature is experimental and the API may change.
131
131
  */
132
- iconSize: { type: "sap.m.AvatarSize", defaultValue: AvatarSize.S }
132
+ iconSize: { type: "sap.m.AvatarSize", defaultValue: AvatarSize.S },
133
+
134
+ /**
135
+ * Defines how the image fits in the icon area.
136
+ *
137
+ * @since 1.130
138
+ */
139
+ iconFitType: { type: "sap.m.AvatarImageFitType", defaultValue: AvatarImageFitType.Cover }
133
140
  },
134
141
  aggregations: {
135
142
 
@@ -215,9 +222,7 @@ sap.ui.define([
215
222
  Header.prototype._getAvatar = function () {
216
223
  var oAvatar = this.getAggregation("_avatar");
217
224
  if (!oAvatar) {
218
- oAvatar = new Avatar({
219
- imageFitType: AvatarImageFitType.Contain
220
- }).addStyleClass("sapFCardIcon");
225
+ oAvatar = new Avatar().addStyleClass("sapFCardIcon");
221
226
  this.setAggregation("_avatar", oAvatar);
222
227
  }
223
228
  return oAvatar;
@@ -250,7 +255,8 @@ sap.ui.define([
250
255
  .setInitials(this.getIconInitials())
251
256
  .setTooltip(this.getIconAlt())
252
257
  .setBackgroundColor(this.getIconBackgroundColor())
253
- .setDisplaySize(this.getIconSize());
258
+ .setDisplaySize(this.getIconSize())
259
+ .setImageFitType(this.getIconFitType());
254
260
  };
255
261
 
256
262
  /**
@@ -57,7 +57,7 @@ sap.ui.define([
57
57
  * @extends sap.f.cards.BaseHeader
58
58
  *
59
59
  * @author SAP SE
60
- * @version 1.128.0
60
+ * @version 1.130.0
61
61
  *
62
62
  * @constructor
63
63
  * @public
@@ -149,6 +149,13 @@ sap.ui.define([
149
149
  */
150
150
  iconSize: { type: "sap.m.AvatarSize", defaultValue: AvatarSize.S },
151
151
 
152
+ /**
153
+ * Defines how the image fits in the icon area.
154
+ *
155
+ * @since 1.130
156
+ */
157
+ iconFitType: { type: "sap.m.AvatarImageFitType", defaultValue: AvatarImageFitType.Cover },
158
+
152
159
  /**
153
160
  * General unit of measurement for the header. Displayed as side information to the subtitle.
154
161
  */
@@ -326,7 +333,8 @@ sap.ui.define([
326
333
  .setInitials(this.getIconInitials())
327
334
  .setTooltip(this.getIconAlt())
328
335
  .setBackgroundColor(this.getIconBackgroundColor())
329
- .setDisplaySize(this.getIconSize());
336
+ .setDisplaySize(this.getIconSize())
337
+ .setImageFitType(this.getIconFitType());
330
338
 
331
339
  this._getDetails()
332
340
  .setText(this.getDetails())
@@ -430,9 +438,7 @@ sap.ui.define([
430
438
  NumericHeader.prototype._getAvatar = function () {
431
439
  var oAvatar = this.getAggregation("_avatar");
432
440
  if (!oAvatar) {
433
- oAvatar = new Avatar({
434
- imageFitType: AvatarImageFitType.Contain
435
- }).addStyleClass("sapFCardIcon");
441
+ oAvatar = new Avatar().addStyleClass("sapFCardIcon");
436
442
  this.setAggregation("_avatar", oAvatar);
437
443
  }
438
444
  return oAvatar;
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @extends sap.ui.core.Control
26
26
  *
27
27
  * @author SAP SE
28
- * @version 1.128.0
28
+ * @version 1.130.0
29
29
  *
30
30
  * @constructor
31
31
  * @private
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @extends sap.ui.core.Control
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.128.0
31
+ * @version 1.130.0
32
32
  *
33
33
  * @constructor
34
34
  * @public
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @extends sap.ui.core.Control
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.128.0
22
+ * @version 1.130.0
23
23
  *
24
24
  * @constructor
25
25
  * @private
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @extends sap.f.cards.loading.ListPlaceholder
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.128.0
22
+ * @version 1.130.0
23
23
  *
24
24
  * @constructor
25
25
  * @private
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @extends sap.ui.core.Control
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.128.0
22
+ * @version 1.130.0
23
23
  *
24
24
  * @constructor
25
25
  * @private
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @extends sap.ui.core.Control
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.128.0
22
+ * @version 1.130.0
23
23
  *
24
24
  * @constructor
25
25
  * @private
@@ -29,7 +29,7 @@ sap.ui.define([
29
29
  * @extends sap.ui.core.Control
30
30
  *
31
31
  * @author SAP SE
32
- * @version 1.128.0
32
+ * @version 1.130.0
33
33
  *
34
34
  * @constructor
35
35
  * @private
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  * @extends sap.ui.core.Control
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.128.0
25
+ * @version 1.130.0
26
26
  *
27
27
  * @constructor
28
28
  * @private
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @extends sap.ui.core.Control
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.128.0
22
+ * @version 1.130.0
23
23
  *
24
24
  * @constructor
25
25
  * @private
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @extends sap.ui.core.Control
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.128.0
22
+ * @version 1.130.0
23
23
  *
24
24
  * @constructor
25
25
  * @private
@@ -12,13 +12,16 @@ sap.ui.define([
12
12
  "sap/ui/core/InvisibleText",
13
13
  "sap/ui/core/Lib",
14
14
  "sap/ui/core/library",
15
- "sap/f/library"
15
+ "sap/f/library",
16
+ "sap/ui/base/ManagedObjectObserver",
17
+ "sap/base/Log"
16
18
  ],
17
- function(CardBadgeCustomData, BadgeCustomData, ObjectStatus, InvisibleText, Lib, coreLibrary, library) {
19
+ function(CardBadgeCustomData, BadgeCustomData, ObjectStatus, InvisibleText, Lib, coreLibrary, library, ManagedObjectObserver, Log) {
18
20
  "use strict";
19
21
 
20
22
  const CardBadgeVisibilityMode = library.CardBadgeVisibilityMode,
21
- IndicationColor = coreLibrary.IndicationColor;
23
+ IndicationColor = coreLibrary.IndicationColor;
24
+
22
25
  /**
23
26
  *
24
27
  * The class represents a utility for visualising and updating the badge indicator for
@@ -30,96 +33,131 @@ function(CardBadgeCustomData, BadgeCustomData, ObjectStatus, InvisibleText, Lib,
30
33
  */
31
34
  var CardBadgeEnabler = function () {
32
35
 
33
- // Attaching eventDelegate
36
+ /**
37
+ * Initializes the card badge enablement.
38
+ * Attaching the customData observer.
39
+ */
34
40
  this.initCardBadgeEnablement = function () {
35
- this.addEventDelegate({
36
- onBeforeRendering: createBadges
37
- }, this);
41
+ this._customDataObserver = new ManagedObjectObserver(this._onCustomDataChange.bind(this));
42
+ this._customDataObserver.observe(this, {aggregations: ["customData"]});
38
43
 
44
+ // Following is a temporary workaround covering problem with the old code in Work Zone. Can be deleted after they upgrade to UI5 1.130.
45
+ this._aCardBadges = ["temporary"];
39
46
  };
40
47
 
41
48
  /**
42
- * Creates <code>sap.m.ObjectStatus</code> from <code>sap.f.cards.CardBadgeCustomData</code>
43
- *
44
- * @returns {void}
45
- * @private
49
+ * Destroys the card badge enablement.
46
50
  */
47
- function createBadges () {
48
- const aCardBadgesCustomData = this._getCardBadgeCustomData();
49
- if (!aCardBadgesCustomData || this._aCardBadges ) {
51
+ this.destroyCardBadgeEnablement = function () {
52
+ if (this._customDataObserver) {
53
+ this._customDataObserver.disconnect();
54
+ this._customDataObserver = null;
55
+ }
56
+ };
57
+
58
+ this._createBadge = function (oData) {
59
+ const sIcon = oData instanceof CardBadgeCustomData ? oData.getIcon() : "";
60
+
61
+ const oCardBadge = new ObjectStatus({
62
+ text: oData.getValue(),
63
+ icon: sIcon,
64
+ inverted: true,
65
+ visible: oData.getVisible(),
66
+ state: oData instanceof CardBadgeCustomData ? oData.getState() : IndicationColor.Indication05,
67
+ stateAnnouncementText: oData instanceof CardBadgeCustomData ? oData.getAnnouncementText() : "",
68
+ id: "badge" + oData.getId()
69
+ });
70
+
71
+ if (sIcon.length > 0 && oData.getValue()?.length > 0) {
72
+ oCardBadge.addStyleClass("sapFCardBadgeTextIcon"); //ObjectStatus does not have CSS class to indicate icon and text presence
73
+ }
74
+
75
+ const iIndex = this._getCardBadgeCustomData()?.indexOf(oData);
76
+ this.insertAggregation("_cardBadges", oCardBadge, iIndex);
77
+ };
78
+
79
+ this._onCustomDataChange = function (oChanges) {
80
+ const sMutation = oChanges.mutation,
81
+ oCustomData = oChanges.child;
82
+
83
+ if (!this._isBadgeCustomData(oCustomData)) {
50
84
  return;
51
85
  }
52
86
 
53
- this._aCardBadges = [];
54
- aCardBadgesCustomData.forEach( (oData) => {
55
- const sIcon = oData instanceof CardBadgeCustomData ? oData.getIcon() : "";
56
-
57
- const oCardBadge = new ObjectStatus({
58
- text: oData.getValue(),
59
- icon: sIcon,
60
- inverted: true,
61
- visible: oData.getVisible(),
62
- state: oData instanceof CardBadgeCustomData ? oData.getState() : IndicationColor.Indication05,
63
- stateAnnouncementText: oData instanceof CardBadgeCustomData ? oData.getAnnouncementText() : "",
64
- id: "badge" + oData.getId()
65
- });
66
-
67
- if (sIcon.length > 0 && oData.getValue()?.length > 0) {
68
- oCardBadge.addStyleClass("sapFCardBadgeTextIcon"); //ObjectStatus does not have CSS class to indicate icon and text presence
87
+ switch (sMutation) {
88
+ case "insert":
89
+ this._createBadge(oCustomData);
90
+ break;
91
+ case "remove": {
92
+ const oCardBadge = this._getCardBadgeElement(oCustomData.getId());
93
+ if (oCardBadge) {
94
+ this.removeAggregation("_cardBadges", oCardBadge);
95
+ oCardBadge.destroy();
96
+ }
97
+ break;
69
98
  }
70
- this._aCardBadges.push(oCardBadge);
71
- });
72
- }
99
+ default:
100
+ Log.error(`Mutation ${sMutation} is unexpected for card badge custom data.`, this);
101
+ break;
102
+ }
103
+
104
+ this._updateInvisibleCardBadgeText();
105
+ };
73
106
 
74
107
  /**
75
108
  * Returns all CardBadgeCustomData elements from customdata, or just an element corresponding to the key
76
-
77
109
  * @returns {Array} aCardBadgeCustomData
78
110
  */
79
111
  this._getCardBadgeCustomData = function () {
80
- const aCardBadgeCustomData = this.getCustomData().filter(function(item) {return item instanceof CardBadgeCustomData || item instanceof BadgeCustomData;});
112
+ const aCardBadgeCustomData = this.getCustomData().filter(function(item) {
113
+ return this._isBadgeCustomData(item);
114
+ }.bind(this));
81
115
 
82
116
  return aCardBadgeCustomData;
83
117
  };
84
118
 
85
119
  /**
86
120
  * Returns badges added to the aggregation of card "_cardBadges"
87
- *
88
121
  * @returns {Array} Cards _cardBadges aggregation
89
122
  */
90
123
  this._getCardBadges = function () {
91
- this._aCardBadges.forEach( (oCardBadge) => {
92
- this.addAggregation("_cardBadges", oCardBadge);
93
- });
94
-
95
124
  return this.getAggregation("_cardBadges");
96
125
  };
97
126
 
98
127
  /**
99
128
  * Gets badge corresponding to the <code>sap.f.cards.CardBadgeCustomData</code>
100
- *
101
129
  * @param {string} sId ID of the <code>sap.f.cards.CardBadgeCustomData</code>
102
- * @returns {object} oCardBadge
130
+ * @returns {sap.m.ObjectStatus} oCardBadge
103
131
  */
104
132
  this._getCardBadgeElement = function (sId) {
105
- const oCardBadge = this._getCardBadges().find((oElement) => oElement.getId().indexOf(sId) > 0);
133
+ const oCardBadge = this._getCardBadges()?.find((oElement) => oElement.getId().endsWith("badge" + sId));
106
134
 
107
135
  return oCardBadge;
108
136
  };
109
137
 
110
138
  /**
111
139
  * Creates invisibleText, which contains the card badge accessibility information
112
- * @returns {object} _oInvisibleCardBadgeText
140
+ * @returns {sap.ui.core.InvisibleText} The invisible text control for badges.
113
141
  */
114
142
  this._getInvisibleCardBadgeText = function () {
115
- if (this._oInvisibleCardBadgeText) {
143
+ let oText = this.getAggregation("_oInvisibleCardBadgeText");
116
144
 
117
- return this._oInvisibleCardBadgeText;
145
+ if (oText) {
146
+ return oText;
118
147
  }
119
148
 
120
- this._oInvisibleCardBadgeText = new InvisibleText({id: this.getId() + "-ariaBadgeText", text: this._getCardBadgeAccessibilityText()});
149
+ oText = new InvisibleText({id: this.getId() + "-ariaBadgeText", text: this._getCardBadgeAccessibilityText()});
150
+
151
+ this.setAggregation("_oInvisibleCardBadgeText", oText);
152
+
153
+ return oText;
154
+ };
121
155
 
122
- return this._oInvisibleCardBadgeText;
156
+ /**
157
+ * Updates the text of the invisible card badge text.
158
+ */
159
+ this._updateInvisibleCardBadgeText = function () {
160
+ this._getInvisibleCardBadgeText()?.setText(this._getCardBadgeAccessibilityText());
123
161
  };
124
162
 
125
163
  /**
@@ -130,7 +168,7 @@ function(CardBadgeCustomData, BadgeCustomData, ObjectStatus, InvisibleText, Lib,
130
168
  const _oRb = Lib.getResourceBundleFor("sap.f");
131
169
 
132
170
  let sCardBadgeAccText = "";
133
- this._getCardBadges().forEach((oCardBadge) => {
171
+ this._getCardBadges()?.forEach((oCardBadge) => {
134
172
  if (oCardBadge.getVisible() && oCardBadge.getStateAnnouncementText()) {
135
173
  sCardBadgeAccText += " " + oCardBadge.getStateAnnouncementText();
136
174
  } else if (oCardBadge.getVisible()) {
@@ -149,32 +187,34 @@ function(CardBadgeCustomData, BadgeCustomData, ObjectStatus, InvisibleText, Lib,
149
187
  this._getCardBadgeCustomData().forEach((oData) => {
150
188
  if (oData instanceof BadgeCustomData) {
151
189
  oData.setVisible(false);
152
- } else if (oData instanceof CardBadgeCustomData && oData.getVisibilityMode() == CardBadgeVisibilityMode.Disappear) {
190
+ } else if (oData instanceof CardBadgeCustomData && oData.getVisibilityMode() === CardBadgeVisibilityMode.Disappear) {
153
191
  oData.setVisible(false);
154
192
  }
155
193
  });
156
194
  };
157
195
 
158
196
  this._updateBadgeProperty = function (sId, sPropertyName, sValue) {
159
- const oCardBadge = this._getCardBadgeElement(sId);
160
- oCardBadge?.setProperty(sPropertyName, sValue);
197
+ const oCardBadge = this._getCardBadgeElement(sId);
198
+ oCardBadge?.setProperty(sPropertyName, sValue);
161
199
 
162
- this._getInvisibleCardBadgeText()?.setText(this._getCardBadgeAccessibilityText());
200
+ this._updateInvisibleCardBadgeText();
163
201
 
164
202
  return this;
165
203
  };
166
204
 
205
+ this._isBadgeCustomData = function (oData) {
206
+ return oData instanceof CardBadgeCustomData || oData instanceof BadgeCustomData;
207
+ };
208
+
167
209
  /* =========================================================== */
168
210
  /* begin: functions needed to support BadgeCustomData */
169
211
  /* =========================================================== */
170
212
 
171
213
  this.updateBadgeVisibility = function (bVisible) {
172
-
173
214
  this._updateBadgeProperty(this.getBadgeCustomData().getId(), "visible", bVisible);
174
215
  };
175
216
 
176
217
  this.updateBadgeValue = function(sValue) {
177
-
178
218
  this._updateBadgeProperty(this.getBadgeCustomData().getId(), "text", sValue);
179
219
  };
180
220
 
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  *
17
17
  * @alias sap.f.changeHandler.MoveDynamicPageTitleActions
18
18
  * @author SAP SE
19
- * @version 1.128.0
19
+ * @version 1.130.0
20
20
  * @experimental Since 1.52
21
21
  */
22
22
  var MoveActions = { };
@@ -41,7 +41,7 @@ sap.ui.define([
41
41
  *
42
42
  *
43
43
  * @author SAP SE
44
- * @version 1.128.0
44
+ * @version 1.130.0
45
45
  *
46
46
  * @extends sap.f.delegate.GridItemNavigation
47
47
  *
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  *
35
35
  *
36
36
  * @author SAP SE
37
- * @version 1.128.0
37
+ * @version 1.130.0
38
38
  *
39
39
  * @extends sap.ui.core.delegate.ItemNavigation
40
40
  *
@@ -18,7 +18,7 @@ sap.ui.define([
18
18
  * Handles dragging of a control over a given grid container.
19
19
  *
20
20
  * @author SAP SE
21
- * @version 1.128.0
21
+ * @version 1.130.0
22
22
  *
23
23
  * @extends sap.ui.base.Object
24
24
  *
@@ -37,7 +37,7 @@ sap.ui.define([
37
37
  * @extends sap.ui.core.dnd.DropInfo
38
38
  *
39
39
  * @author SAP SE
40
- * @version 1.128.0
40
+ * @version 1.130.0
41
41
  *
42
42
  * @public
43
43
  * @since 1.68
@@ -39,14 +39,14 @@ sap.ui.define([
39
39
  * @namespace
40
40
  * @alias sap.f
41
41
  * @author SAP SE
42
- * @version 1.128.0
42
+ * @version 1.130.0
43
43
  * @since 1.44
44
44
  * @public
45
45
  */
46
46
  var thisLib = Library.init({
47
47
  apiVersion: 2,
48
48
  name : "sap.f",
49
- version: "1.128.0",
49
+ version: "1.130.0",
50
50
  dependencies : ["sap.ui.core", "sap.m", "sap.ui.layout"],
51
51
  designtime: "sap/f/designtime/library.designtime",
52
52
  interfaces: [
@@ -63,6 +63,7 @@ sap.ui.define([
63
63
  "sap.f.AvatarType",
64
64
  "sap.f.AvatarColor",
65
65
  "sap.f.AvatarGroupType",
66
+ "sap.f.CardBadgeVisibilityMode",
66
67
  "sap.f.cards.HeaderPosition",
67
68
  "sap.f.cards.NumericHeaderSideIndicatorsAlignment",
68
69
  "sap.f.DynamicPageTitleArea",
@@ -99,7 +99,7 @@ ARIA_LABEL_TOOLBAR_FOOTER_ACTIONS=Aktioner for sidefod
99
99
 
100
100
  ARIA_HEADER_AVATAR_TEXT=Avatar
101
101
 
102
- SHELLBAR_CONTAINER_LABEL=Shelllinie
102
+ SHELLBAR_CONTAINER_LABEL=Shelllinje
103
103
 
104
104
  SHELLBAR_LOGO_TOOLTIP=Logo
105
105
 
@@ -103,7 +103,7 @@ SHELLBAR_CONTAINER_LABEL=\u5916\u58F3\u680F
103
103
 
104
104
  SHELLBAR_LOGO_TOOLTIP=\u5FBD\u6807
105
105
 
106
- SHELLBAR_COPILOT_TOOLTIP=\u7126\u8033
106
+ SHELLBAR_COPILOT_TOOLTIP=Joule
107
107
 
108
108
  SHELLBAR_SEARCH_TOOLTIP=\u641C\u7D22
109
109
 
@@ -18,7 +18,7 @@ sap.ui.define(['sap/f/semantic/SemanticButton'], function(SemanticButton) {
18
18
  * @extends sap.f.semantic.SemanticButton
19
19
  *
20
20
  * @author SAP SE
21
- * @version 1.128.0
21
+ * @version 1.130.0
22
22
  *
23
23
  * @constructor
24
24
  * @public
@@ -18,7 +18,7 @@ sap.ui.define(['./SemanticButton'], function(SemanticButton) {
18
18
  * @extends sap.f.semantic.SemanticButton
19
19
  *
20
20
  * @author SAP SE
21
- * @version 1.128.0
21
+ * @version 1.130.0
22
22
  *
23
23
  * @constructor
24
24
  * @public
@@ -18,7 +18,7 @@ sap.ui.define(['./SemanticButton'], function(SemanticButton) {
18
18
  * @extends sap.f.semantic.SemanticButton
19
19
  *
20
20
  * @author SAP SE
21
- * @version 1.128.0
21
+ * @version 1.130.0
22
22
  *
23
23
  * @constructor
24
24
  * @public
@@ -19,7 +19,7 @@ sap.ui.define(['sap/f/semantic/SemanticButton'], function(SemanticButton) {
19
19
  * @extends sap.f.semantic.SemanticButton
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.128.0
22
+ * @version 1.130.0
23
23
  *
24
24
  * @constructor
25
25
  * @public