@openui5/sap.f 1.127.1 → 1.129.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.
- package/THIRDPARTY.txt +1 -1
- package/package.json +4 -4
- package/src/sap/f/.library +1 -1
- package/src/sap/f/Avatar.js +1 -1
- package/src/sap/f/AvatarGroup.js +2 -2
- package/src/sap/f/AvatarGroupItem.js +1 -1
- package/src/sap/f/CalendarAppointmentInCard.js +1 -1
- package/src/sap/f/CalendarInCard.js +1 -1
- package/src/sap/f/Card.js +1 -1
- package/src/sap/f/CardBase.js +21 -51
- package/src/sap/f/CardRenderer.js +30 -3
- package/src/sap/f/DynamicPage.js +11 -8
- package/src/sap/f/DynamicPageAccessibleLandmarkInfo.js +11 -2
- package/src/sap/f/DynamicPageHeader.js +21 -7
- package/src/sap/f/DynamicPageTitle.js +1 -1
- package/src/sap/f/FlexibleColumnLayout.js +136 -21
- package/src/sap/f/FlexibleColumnLayoutAccessibleLandmarkInfo.js +1 -1
- package/src/sap/f/FlexibleColumnLayoutData.js +52 -0
- package/src/sap/f/FlexibleColumnLayoutDataForDesktop.js +72 -0
- package/src/sap/f/FlexibleColumnLayoutDataForTablet.js +71 -0
- package/src/sap/f/FlexibleColumnLayoutSemanticHelper.js +1 -1
- package/src/sap/f/GridContainer.js +1 -1
- package/src/sap/f/GridContainerItemLayoutData.js +1 -1
- package/src/sap/f/GridContainerSettings.js +2 -2
- package/src/sap/f/GridList.js +1 -1
- package/src/sap/f/GridListItem.js +1 -1
- package/src/sap/f/IllustratedMessage.js +1 -1
- package/src/sap/f/Illustration.js +1 -1
- package/src/sap/f/PlanningCalendarInCardLegend.js +1 -1
- package/src/sap/f/ProductSwitch.js +1 -1
- package/src/sap/f/ProductSwitchItem.js +1 -1
- package/src/sap/f/SearchManager.js +1 -1
- package/src/sap/f/ShellBar.js +1 -1
- package/src/sap/f/SidePanel.js +20 -6
- package/src/sap/f/SidePanelItem.js +1 -1
- package/src/sap/f/cards/BaseHeader.js +1 -1
- package/src/sap/f/cards/CardBadgeCustomData.js +123 -0
- package/src/sap/f/cards/Header.js +1 -1
- package/src/sap/f/cards/NumericHeader.js +1 -1
- package/src/sap/f/cards/NumericIndicators.js +1 -1
- package/src/sap/f/cards/NumericSideIndicator.js +1 -1
- package/src/sap/f/cards/loading/AnalyticalPlaceholder.js +1 -1
- package/src/sap/f/cards/loading/CalendarPlaceholder.js +1 -1
- package/src/sap/f/cards/loading/GenericPlaceholder.js +1 -1
- package/src/sap/f/cards/loading/ListPlaceholder.js +1 -1
- package/src/sap/f/cards/loading/ObjectPlaceholder.js +1 -1
- package/src/sap/f/cards/loading/PlaceholderBase.js +1 -1
- package/src/sap/f/cards/loading/TablePlaceholder.js +1 -1
- package/src/sap/f/cards/loading/TimelinePlaceholder.js +1 -1
- package/src/sap/f/cards/util/CardBadgeEnabler.js +196 -0
- package/src/sap/f/changeHandler/MoveDynamicPageTitleActions.js +1 -1
- package/src/sap/f/delegate/GridContainerItemNavigation.js +1 -1
- package/src/sap/f/delegate/GridItemNavigation.js +1 -1
- package/src/sap/f/dnd/GridDragOver.js +1 -1
- package/src/sap/f/dnd/GridDropInfo.js +1 -1
- package/src/sap/f/library.js +30 -2
- package/src/sap/f/messagebundle.properties +3 -0
- package/src/sap/f/messagebundle_ar.properties +2 -0
- package/src/sap/f/messagebundle_bg.properties +2 -0
- package/src/sap/f/messagebundle_ca.properties +2 -0
- package/src/sap/f/messagebundle_cnr.properties +2 -0
- package/src/sap/f/messagebundle_cs.properties +2 -0
- package/src/sap/f/messagebundle_cy.properties +2 -0
- package/src/sap/f/messagebundle_da.properties +2 -0
- package/src/sap/f/messagebundle_de.properties +2 -0
- package/src/sap/f/messagebundle_el.properties +2 -0
- package/src/sap/f/messagebundle_en.properties +2 -0
- package/src/sap/f/messagebundle_en_GB.properties +2 -0
- package/src/sap/f/messagebundle_en_US_saprigi.properties +3 -1
- package/src/sap/f/messagebundle_es.properties +2 -0
- package/src/sap/f/messagebundle_es_MX.properties +2 -0
- package/src/sap/f/messagebundle_et.properties +2 -0
- package/src/sap/f/messagebundle_fi.properties +2 -0
- package/src/sap/f/messagebundle_fr.properties +2 -0
- package/src/sap/f/messagebundle_fr_CA.properties +2 -0
- package/src/sap/f/messagebundle_hi.properties +2 -0
- package/src/sap/f/messagebundle_hr.properties +2 -0
- package/src/sap/f/messagebundle_hu.properties +2 -0
- package/src/sap/f/messagebundle_id.properties +2 -0
- package/src/sap/f/messagebundle_it.properties +2 -0
- package/src/sap/f/messagebundle_iw.properties +2 -0
- package/src/sap/f/messagebundle_ja.properties +2 -0
- package/src/sap/f/messagebundle_kk.properties +2 -0
- package/src/sap/f/messagebundle_ko.properties +2 -0
- package/src/sap/f/messagebundle_lt.properties +2 -0
- package/src/sap/f/messagebundle_lv.properties +2 -0
- package/src/sap/f/messagebundle_mk.properties +2 -0
- package/src/sap/f/messagebundle_ms.properties +2 -0
- package/src/sap/f/messagebundle_nl.properties +2 -0
- package/src/sap/f/messagebundle_no.properties +2 -0
- package/src/sap/f/messagebundle_pl.properties +2 -0
- package/src/sap/f/messagebundle_pt.properties +2 -0
- package/src/sap/f/messagebundle_pt_PT.properties +2 -0
- package/src/sap/f/messagebundle_ro.properties +2 -0
- package/src/sap/f/messagebundle_ru.properties +2 -0
- package/src/sap/f/messagebundle_sh.properties +2 -0
- package/src/sap/f/messagebundle_sk.properties +2 -0
- package/src/sap/f/messagebundle_sl.properties +2 -0
- package/src/sap/f/messagebundle_sr.properties +2 -0
- package/src/sap/f/messagebundle_sv.properties +2 -0
- package/src/sap/f/messagebundle_th.properties +2 -0
- package/src/sap/f/messagebundle_tr.properties +2 -0
- package/src/sap/f/messagebundle_uk.properties +2 -0
- package/src/sap/f/messagebundle_vi.properties +2 -0
- package/src/sap/f/messagebundle_zh_CN.properties +2 -0
- package/src/sap/f/messagebundle_zh_TW.properties +2 -0
- package/src/sap/f/semantic/AddAction.js +1 -1
- package/src/sap/f/semantic/CloseAction.js +1 -1
- package/src/sap/f/semantic/CopyAction.js +1 -1
- package/src/sap/f/semantic/DeleteAction.js +1 -1
- package/src/sap/f/semantic/DiscussInJamAction.js +1 -1
- package/src/sap/f/semantic/EditAction.js +1 -1
- package/src/sap/f/semantic/ExitFullScreenAction.js +1 -1
- package/src/sap/f/semantic/FavoriteAction.js +1 -1
- package/src/sap/f/semantic/FlagAction.js +1 -1
- package/src/sap/f/semantic/FooterMainAction.js +1 -1
- package/src/sap/f/semantic/FullScreenAction.js +1 -1
- package/src/sap/f/semantic/MainAction.js +1 -1
- package/src/sap/f/semantic/MessagesIndicator.js +1 -1
- package/src/sap/f/semantic/NegativeAction.js +1 -1
- package/src/sap/f/semantic/PositiveAction.js +1 -1
- package/src/sap/f/semantic/PrintAction.js +1 -1
- package/src/sap/f/semantic/SemanticButton.js +1 -1
- package/src/sap/f/semantic/SemanticConfiguration.js +1 -1
- package/src/sap/f/semantic/SemanticControl.js +1 -1
- package/src/sap/f/semantic/SemanticPage.js +1 -1
- package/src/sap/f/semantic/SemanticToggleButton.js +1 -1
- package/src/sap/f/semantic/SendEmailAction.js +1 -1
- package/src/sap/f/semantic/SendMessageAction.js +1 -1
- package/src/sap/f/semantic/ShareInJamAction.js +1 -1
- package/src/sap/f/semantic/TitleMainAction.js +1 -1
- package/src/sap/f/shellBar/AdditionalContentSupport.js +1 -1
- package/src/sap/f/shellBar/CoPilot.js +1 -1
- package/src/sap/f/shellBar/ControlSpacer.js +1 -1
- package/src/sap/f/shellBar/Search.js +1 -1
- package/src/sap/f/themes/base/AvatarGroup.less +1 -1
- package/src/sap/f/themes/base/Card.less +6 -21
- package/src/sap/f/themes/base/CardBadge.less +63 -0
- package/src/sap/f/themes/base/SidePanel.less +4 -0
- package/src/sap/f/themes/base/library.source.less +1 -0
- package/src/sap/f/themes/sap_hcb/base_Card.less +0 -20
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Provides element sap.f.cards.CardBadgeCustomData.
|
|
8
|
+
sap.ui.define([
|
|
9
|
+
'sap/ui/core/CustomData',
|
|
10
|
+
'sap/f/library',
|
|
11
|
+
'sap/ui/core/library'
|
|
12
|
+
], function(CustomData, library,coreLibrary) {
|
|
13
|
+
"use strict";
|
|
14
|
+
|
|
15
|
+
const CardBadgeVisibilityMode = library.CardBadgeVisibilityMode,
|
|
16
|
+
IndicationColor = coreLibrary.IndicationColor;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Constructor for a new <code>CardBadgeCustomData</code> element.
|
|
20
|
+
*
|
|
21
|
+
* @param {string} [sId] ID for the new element, generated automatically if no ID is given
|
|
22
|
+
* @param {object} [mSettings] Initial settings for the new element
|
|
23
|
+
*
|
|
24
|
+
* @class
|
|
25
|
+
* Contains a single key/value pair of custom data attached to an <code>Element</code>.
|
|
26
|
+
*
|
|
27
|
+
* For more information, see {@link sap.ui.core.Element#data Element.prototype.data}
|
|
28
|
+
* and {@link topic:91f0c3ee6f4d1014b6dd926db0e91070 Custom Data - Attaching Data Objects to Controls}.
|
|
29
|
+
*
|
|
30
|
+
* @extends sap..ui.core.CustomData
|
|
31
|
+
* @since 1.128
|
|
32
|
+
*
|
|
33
|
+
* @public
|
|
34
|
+
* @alias sap.f.cards.CardBadgeCustomData
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
var CardBadgeCustomData = CustomData.extend("sap.f.cards.CardBadgeCustomData", {
|
|
38
|
+
metadata: {
|
|
39
|
+
properties: {
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Icon URI. This may be either an icon font or image path.
|
|
43
|
+
* @since 1.128
|
|
44
|
+
*/
|
|
45
|
+
icon: {type: "sap.ui.core.URI", group: "Data", defaultValue: null},
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Describes the corresponding visibility mode, see also {@link sap.f.CardBadgeVisibilityMode}.
|
|
49
|
+
* @since 1.128
|
|
50
|
+
*/
|
|
51
|
+
visibilityMode: {type: "sap.f.CardBadgeVisibilityMode", group: "Data", defaultValue: CardBadgeVisibilityMode.Disappear},
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Defines the color of the badge.
|
|
55
|
+
* The allowed values are from the enum type <code>sap.ui.core.IndicationColor</code>.
|
|
56
|
+
* Additionally values from <code>sap.ui.core.ValueState</code> can be used, but this is not recommended by design guidelines.
|
|
57
|
+
* @since 1.128
|
|
58
|
+
*/
|
|
59
|
+
state: {type : "string", group : "Misc", defaultValue : IndicationColor.Indication05},
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Defines the cards badge visibility.
|
|
63
|
+
* @since 1.128
|
|
64
|
+
*/
|
|
65
|
+
visible: {type: "boolean", group: "Appearance", defaultValue: true},
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Defines text which will is overriding default announcement.
|
|
69
|
+
*
|
|
70
|
+
* @since 1.128
|
|
71
|
+
*/
|
|
72
|
+
announcementText : {type : "string", group : "Misc", defaultValue: ""}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
CardBadgeCustomData.prototype.setVisible = function (bVisible) {
|
|
78
|
+
if (this.getVisible() === bVisible) { return this; }
|
|
79
|
+
|
|
80
|
+
this.setProperty("visible", bVisible, true);
|
|
81
|
+
|
|
82
|
+
this.getParent()?._updateBadgeProperty(this.getId(), "visible", bVisible);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
CardBadgeCustomData.prototype.setIcon = function (sSrc) {
|
|
86
|
+
if (this.getIcon() === sSrc) { return this; }
|
|
87
|
+
|
|
88
|
+
this.setProperty("icon", sSrc, true);
|
|
89
|
+
|
|
90
|
+
this.getParent()?._updateBadgeProperty(this.getId(), "icon", sSrc);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
CardBadgeCustomData.prototype.setState = function (sColor) {
|
|
94
|
+
if (this.getState() === sColor) { return this; }
|
|
95
|
+
|
|
96
|
+
this.setProperty("state", sColor, true);
|
|
97
|
+
|
|
98
|
+
this.getParent()?._updateBadgeProperty(this.getId(), "state", sColor);
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
CardBadgeCustomData.prototype.setValue = function (sValue) {
|
|
102
|
+
if (this.getValue() === sValue) { return this; }
|
|
103
|
+
|
|
104
|
+
if (sValue === null || sValue === undefined) {
|
|
105
|
+
sValue = "";
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
var sValue = sValue.toString();
|
|
109
|
+
CustomData.prototype.setValue.call(this, sValue);
|
|
110
|
+
|
|
111
|
+
this.getParent()?._updateBadgeProperty(this.getId(), "text", sValue);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
CardBadgeCustomData.prototype.setAnnouncementText = function (sValue) {
|
|
115
|
+
if (this.getAnnouncementText() === sValue) { return this; }
|
|
116
|
+
|
|
117
|
+
this.setProperty("announcementText", sValue, true);
|
|
118
|
+
|
|
119
|
+
this.getParent()?._updateBadgeProperty(this.getId(), "stateAnnouncementText", sValue);
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
return CardBadgeCustomData;
|
|
123
|
+
});
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Provides helper sap.f.cards.util.CardBadgeEnabler
|
|
8
|
+
sap.ui.define([
|
|
9
|
+
"sap/f/cards/CardBadgeCustomData",
|
|
10
|
+
"sap/m/BadgeCustomData",
|
|
11
|
+
"sap/m/ObjectStatus",
|
|
12
|
+
"sap/ui/core/InvisibleText",
|
|
13
|
+
"sap/ui/core/Lib",
|
|
14
|
+
"sap/ui/core/library",
|
|
15
|
+
"sap/f/library"
|
|
16
|
+
],
|
|
17
|
+
function(CardBadgeCustomData, BadgeCustomData, ObjectStatus, InvisibleText, Lib, coreLibrary, library) {
|
|
18
|
+
"use strict";
|
|
19
|
+
|
|
20
|
+
const CardBadgeVisibilityMode = library.CardBadgeVisibilityMode,
|
|
21
|
+
IndicationColor = coreLibrary.IndicationColor;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* The class represents a utility for visualising and updating the badge indicator for
|
|
25
|
+
* <code>sap.f.CardBase</code> instances.
|
|
26
|
+
*
|
|
27
|
+
* @since 1.128
|
|
28
|
+
* @protected
|
|
29
|
+
* @alias sap.f.cards.util.CardBadgeEnabler
|
|
30
|
+
*/
|
|
31
|
+
var CardBadgeEnabler = function () {
|
|
32
|
+
|
|
33
|
+
// Attaching eventDelegate
|
|
34
|
+
this.initCardBadgeEnablement = function () {
|
|
35
|
+
this.addEventDelegate({
|
|
36
|
+
onBeforeRendering: createBadges
|
|
37
|
+
}, this);
|
|
38
|
+
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Creates <code>sap.m.ObjectStatus</code> from <code>sap.f.cards.CardBadgeCustomData</code>
|
|
43
|
+
*
|
|
44
|
+
* @returns {void}
|
|
45
|
+
* @private
|
|
46
|
+
*/
|
|
47
|
+
function createBadges () {
|
|
48
|
+
const aCardBadgesCustomData = this._getCardBadgeCustomData();
|
|
49
|
+
if (!aCardBadgesCustomData || this._aCardBadges ) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
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
|
|
69
|
+
}
|
|
70
|
+
this._aCardBadges.push(oCardBadge);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Returns all CardBadgeCustomData elements from customdata, or just an element corresponding to the key
|
|
76
|
+
|
|
77
|
+
* @returns {Array} aCardBadgeCustomData
|
|
78
|
+
*/
|
|
79
|
+
this._getCardBadgeCustomData = function () {
|
|
80
|
+
const aCardBadgeCustomData = this.getCustomData().filter(function(item) {return item instanceof CardBadgeCustomData || item instanceof BadgeCustomData;});
|
|
81
|
+
|
|
82
|
+
return aCardBadgeCustomData;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Returns badges added to the aggregation of card "_cardBadges"
|
|
87
|
+
*
|
|
88
|
+
* @returns {Array} Cards _cardBadges aggregation
|
|
89
|
+
*/
|
|
90
|
+
this._getCardBadges = function () {
|
|
91
|
+
this._aCardBadges.forEach( (oCardBadge) => {
|
|
92
|
+
this.addAggregation("_cardBadges", oCardBadge);
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
return this.getAggregation("_cardBadges");
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Gets badge corresponding to the <code>sap.f.cards.CardBadgeCustomData</code>
|
|
100
|
+
*
|
|
101
|
+
* @param {string} sId ID of the <code>sap.f.cards.CardBadgeCustomData</code>
|
|
102
|
+
* @returns {object} oCardBadge
|
|
103
|
+
*/
|
|
104
|
+
this._getCardBadgeElement = function (sId) {
|
|
105
|
+
const oCardBadge = this._getCardBadges().find((oElement) => oElement.getId().indexOf(sId) > 0);
|
|
106
|
+
|
|
107
|
+
return oCardBadge;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Creates invisibleText, which contains the card badge accessibility information
|
|
112
|
+
* @returns {object} _oInvisibleCardBadgeText
|
|
113
|
+
*/
|
|
114
|
+
this._getInvisibleCardBadgeText = function () {
|
|
115
|
+
if (this._oInvisibleCardBadgeText) {
|
|
116
|
+
|
|
117
|
+
return this._oInvisibleCardBadgeText;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
this._oInvisibleCardBadgeText = new InvisibleText({id: this.getId() + "-ariaBadgeText", text: this._getCardBadgeAccessibilityText()});
|
|
121
|
+
|
|
122
|
+
return this._oInvisibleCardBadgeText;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Gets accessibility text for badge
|
|
127
|
+
* @returns {string} sCardBadgeAccText
|
|
128
|
+
*/
|
|
129
|
+
this._getCardBadgeAccessibilityText = function () {
|
|
130
|
+
const _oRb = Lib.getResourceBundleFor("sap.f");
|
|
131
|
+
|
|
132
|
+
let sCardBadgeAccText = "";
|
|
133
|
+
this._getCardBadges().forEach((oCardBadge) => {
|
|
134
|
+
if (oCardBadge.getVisible() && oCardBadge.getStateAnnouncementText()) {
|
|
135
|
+
sCardBadgeAccText += " " + oCardBadge.getStateAnnouncementText();
|
|
136
|
+
} else if (oCardBadge.getVisible()) {
|
|
137
|
+
sCardBadgeAccText += " " + _oRb.getText("CARD_BADGE", [oCardBadge.getAccessibilityInfo().description]);
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
return sCardBadgeAccText;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Hides badges if necessary
|
|
146
|
+
* @returns {void}
|
|
147
|
+
*/
|
|
148
|
+
this._hideBadges = function () {
|
|
149
|
+
this._getCardBadgeCustomData().forEach((oData) => {
|
|
150
|
+
if (oData instanceof BadgeCustomData) {
|
|
151
|
+
oData.setVisible(false);
|
|
152
|
+
} else if (oData instanceof CardBadgeCustomData && oData.getVisibilityMode() == CardBadgeVisibilityMode.Disappear) {
|
|
153
|
+
oData.setVisible(false);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
this._updateBadgeProperty = function (sId, sPropertyName, sValue) {
|
|
159
|
+
const oCardBadge = this._getCardBadgeElement(sId);
|
|
160
|
+
oCardBadge?.setProperty(sPropertyName, sValue);
|
|
161
|
+
|
|
162
|
+
this._getInvisibleCardBadgeText()?.setText(this._getCardBadgeAccessibilityText());
|
|
163
|
+
|
|
164
|
+
return this;
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
/* =========================================================== */
|
|
168
|
+
/* begin: functions needed to support BadgeCustomData */
|
|
169
|
+
/* =========================================================== */
|
|
170
|
+
|
|
171
|
+
this.updateBadgeVisibility = function (bVisible) {
|
|
172
|
+
|
|
173
|
+
this._updateBadgeProperty(this.getBadgeCustomData().getId(), "visible", bVisible);
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
this.updateBadgeValue = function(sValue) {
|
|
177
|
+
|
|
178
|
+
this._updateBadgeProperty(this.getBadgeCustomData().getId(), "text", sValue);
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
this.updateBadgeAnimation = function () {
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
this.getBadgeCustomData = function () {
|
|
185
|
+
var oBadgeCustomData = this.getCustomData().filter(function(item) {return item instanceof BadgeCustomData;});
|
|
186
|
+
return oBadgeCustomData.length ? oBadgeCustomData[0] : undefined;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
/* =========================================================== */
|
|
190
|
+
/* end: functions needed to support BadgeCustomData */
|
|
191
|
+
/* =========================================================== */
|
|
192
|
+
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
return CardBadgeEnabler;
|
|
196
|
+
});
|
package/src/sap/f/library.js
CHANGED
|
@@ -39,14 +39,14 @@ sap.ui.define([
|
|
|
39
39
|
* @namespace
|
|
40
40
|
* @alias sap.f
|
|
41
41
|
* @author SAP SE
|
|
42
|
-
* @version 1.
|
|
42
|
+
* @version 1.129.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.
|
|
49
|
+
version: "1.129.0",
|
|
50
50
|
dependencies : ["sap.ui.core", "sap.m", "sap.ui.layout"],
|
|
51
51
|
designtime: "sap/f/designtime/library.designtime",
|
|
52
52
|
interfaces: [
|
|
@@ -103,6 +103,10 @@ sap.ui.define([
|
|
|
103
103
|
"sap.f.DynamicPageAccessibleLandmarkInfo",
|
|
104
104
|
"sap.f.GridContainerItemLayoutData",
|
|
105
105
|
"sap.f.FlexibleColumnLayoutAccessibleLandmarkInfo",
|
|
106
|
+
"sap.f.FlexibleColumnLayoutData",
|
|
107
|
+
"sap.f.FlexibleColumnLayoutDataForDesktop",
|
|
108
|
+
"sap.f.FlexibleColumnLayoutDataForTablet",
|
|
109
|
+
"sap.f.cards.CardBadgeCustomData",
|
|
106
110
|
"sap.f.semantic.AddAction",
|
|
107
111
|
"sap.f.semantic.CloseAction",
|
|
108
112
|
"sap.f.semantic.CopyAction",
|
|
@@ -701,6 +705,30 @@ sap.ui.define([
|
|
|
701
705
|
|
|
702
706
|
DataType.registerEnum("sap.f.SidePanelPosition", thisLib.SidePanelPosition);
|
|
703
707
|
|
|
708
|
+
/**
|
|
709
|
+
* Enumeration for different visibility options for the card badge.
|
|
710
|
+
*
|
|
711
|
+
* @enum {string}
|
|
712
|
+
* @public
|
|
713
|
+
* @since 1.128
|
|
714
|
+
*/
|
|
715
|
+
thisLib.CardBadgeVisibilityMode = {
|
|
716
|
+
/**
|
|
717
|
+
* Badge will not be hidden after header is focused.
|
|
718
|
+
*
|
|
719
|
+
* @public
|
|
720
|
+
*/
|
|
721
|
+
Persist: "Persist",
|
|
722
|
+
/**
|
|
723
|
+
* Badge will be hidden after header is focused.
|
|
724
|
+
*
|
|
725
|
+
* @public
|
|
726
|
+
*/
|
|
727
|
+
Disappear: "Disappear"
|
|
728
|
+
};
|
|
729
|
+
|
|
730
|
+
DataType.registerEnum("sap.f.CardBadgeVisibilityMode", thisLib.CardBadgeVisibilityMode);
|
|
731
|
+
|
|
704
732
|
/**
|
|
705
733
|
* Available <code>Illustration</code> types for the {@link sap.f.IllustratedMessage} control.
|
|
706
734
|
*
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
#XTXT: Text indicating the current moment for the dateTimestamp in the Header
|
|
5
5
|
CARD_HEADER_DATETIMESTAMP_NOW=now
|
|
6
6
|
|
|
7
|
+
#XTXT: Text added to aria-describedby for card with a badge
|
|
8
|
+
CARD_BADGE=Badge {0}
|
|
9
|
+
|
|
7
10
|
#XACT: ARIA announcement for the DynamicPage`s roledescription attribute
|
|
8
11
|
DYNAMIC_PAGE_ROLE_DESCRIPTION=Dynamic Page
|
|
9
12
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
CARD_HEADER_DATETIMESTAMP_NOW=\u0627\u0644\u0622\u0646
|
|
3
3
|
|
|
4
|
+
CARD_BADGE=\u0634\u0627\u0631\u0629 {0}
|
|
5
|
+
|
|
4
6
|
DYNAMIC_PAGE_ROLE_DESCRIPTION=\u0635\u0641\u062D\u0629 \u062F\u064A\u0646\u0627\u0645\u064A\u0643\u064A\u0629
|
|
5
7
|
|
|
6
8
|
EXPANDED_HEADER=\u0645\u0642\u062F\u0645\u0629 \u0645\u0648\u0633\u0639\u0629
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
CARD_HEADER_DATETIMESTAMP_NOW=\u0421\u0435\u0433\u0430
|
|
3
3
|
|
|
4
|
+
CARD_BADGE=\u0417\u043D\u0430\u0447\u043A\u0430 \u043D\u0430 {0}
|
|
5
|
+
|
|
4
6
|
DYNAMIC_PAGE_ROLE_DESCRIPTION=\u0414\u0438\u043D\u0430\u043C\u0438\u0447\u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430
|
|
5
7
|
|
|
6
8
|
EXPANDED_HEADER=\u0420\u0430\u0437\u0448\u0438\u0440\u0435\u043D\u0430 \u0437\u0430\u0433\u043B\u0430\u0432\u043D\u0430 \u043E\u0431\u043B\u0430\u0441\u0442
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
CARD_HEADER_DATETIMESTAMP_NOW=\u03A4\u03CE\u03C1\u03B1
|
|
3
3
|
|
|
4
|
+
CARD_BADGE=\u03A3\u03AE\u03BC\u03B1 {0}
|
|
5
|
+
|
|
4
6
|
DYNAMIC_PAGE_ROLE_DESCRIPTION=\u0394\u03C5\u03BD\u03B1\u03BC\u03B9\u03BA\u03AE \u03A3\u03B5\u03BB\u03AF\u03B4\u03B1
|
|
5
7
|
|
|
6
8
|
EXPANDED_HEADER=\u0395\u03BA\u03C4\u03B5\u03C4\u03B1\u03BC\u03AD\u03BD\u03B7 \u03BA\u03B5\u03C6\u03B1\u03BB\u03AF\u03B4\u03B1
|