@openui5/sap.f 1.127.0 → 1.128.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/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 +1 -1
- 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 +7 -2
- package/src/sap/f/DynamicPageAccessibleLandmarkInfo.js +11 -2
- package/src/sap/f/DynamicPageHeader.js +20 -6
- 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 +8 -3
- 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/Card.less +0 -20
- package/src/sap/f/themes/base/CardBadge.less +63 -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,52 @@
|
|
|
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.FlexibleColumnLayoutData
|
|
8
|
+
sap.ui.define(['sap/ui/core/LayoutData'],
|
|
9
|
+
function(LayoutData) {
|
|
10
|
+
"use strict";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Constructor for a new <code>sap.f.FlexibleColumnLayoutData</code>.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} [sId] ID for the new element, generated automatically if no ID is given
|
|
16
|
+
* @param {object} [mSettings] Initial settings for the new element.
|
|
17
|
+
*
|
|
18
|
+
* @class
|
|
19
|
+
* Holds layout data for <code>sap.f.FlexibleColumnLayout</code>.
|
|
20
|
+
* Allows LayoutData of type <code>sap.f.FlexibleColumnLayoutDataForDesktop</code> or <code>sap.f.FlexibleColumnLayoutFlexibleColumnLayoutDataForTablet</code>
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* @author SAP SE
|
|
24
|
+
* @version 1.128.0
|
|
25
|
+
*
|
|
26
|
+
* @extends sap.ui.core.LayoutData
|
|
27
|
+
*
|
|
28
|
+
* @since 1.128
|
|
29
|
+
* @public
|
|
30
|
+
* @constructor
|
|
31
|
+
* @alias sap.f.FlexibleColumnLayoutData
|
|
32
|
+
*/
|
|
33
|
+
var FlexibleColumnLayoutData = LayoutData.extend("sap.f.FlexibleColumnLayoutData", /** @lends sap.f.FlexibleColumnLayoutData.prototype */ {
|
|
34
|
+
metadata: {
|
|
35
|
+
|
|
36
|
+
library: "sap.f",
|
|
37
|
+
aggregations: {
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Allows LayoutData of type <code>sap.f.FlexibleColumnLayoutDataForDesktop</code>
|
|
41
|
+
*/
|
|
42
|
+
desktopLayoutData: {type: "sap.f.FlexibleColumnLayoutDataForDesktop", multiple: false, singularName: "desktopLayoutData"},
|
|
43
|
+
/**
|
|
44
|
+
* Allows LayoutData of type <code>sap.f.FlexibleColumnLayoutDataForTablet</code>
|
|
45
|
+
*/
|
|
46
|
+
tabletLayoutData: {type: "sap.f.FlexibleColumnLayoutDataForTablet", multiple: false, singularName: "tabletLayoutData"}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
return FlexibleColumnLayoutData;
|
|
52
|
+
});
|
|
@@ -0,0 +1,72 @@
|
|
|
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.FlexibleColumnLayoutDataForDesktop
|
|
8
|
+
sap.ui.define(['sap/ui/core/LayoutData'],
|
|
9
|
+
function(LayoutData) {
|
|
10
|
+
"use strict";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Constructor for a new <code>sap.f.FlexibleColumnLayoutDataForDesktop</code>.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} [sId] ID for the new element, generated automatically if no ID is given
|
|
16
|
+
* @param {object} [mSettings] Initial settings for the new element.
|
|
17
|
+
*
|
|
18
|
+
* @class
|
|
19
|
+
* Holds layout data for columns of <code>sap.f.FlexibleColumnLayout</code> on desktop.
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
* @author SAP SE
|
|
23
|
+
* @version 1.128.0
|
|
24
|
+
*
|
|
25
|
+
* @extends sap.ui.core.LayoutData
|
|
26
|
+
*
|
|
27
|
+
* @since 1.128
|
|
28
|
+
* @public
|
|
29
|
+
* @constructor
|
|
30
|
+
* @alias sap.f.FlexibleColumnLayoutDataForDesktop
|
|
31
|
+
*/
|
|
32
|
+
var FlexibleColumnLayoutDataForDesktop = LayoutData.extend("sap.f.FlexibleColumnLayoutDataForDesktop", /** @lends sap.f.FlexibleColumnLayoutDataForDesktop.prototype */ {
|
|
33
|
+
metadata: {
|
|
34
|
+
|
|
35
|
+
library: "sap.f",
|
|
36
|
+
properties: {
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Columns distribution of TwoColumnsBeginExpanded layout in the format "begin/mid/end", where values are set in percentages.
|
|
40
|
+
*/
|
|
41
|
+
twoColumnsBeginExpanded: {type: "string", group: "Appearance", defaultValue: "67/33/0"},
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Columns distribution of TwoColumnsMidExpanded layout in the format "begin/mid/end", where values are set in percentages.
|
|
45
|
+
*/
|
|
46
|
+
twoColumnsMidExpanded: {type: "string", group: "Appearance", defaultValue: "33/67/0"},
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Columns distribution of ThreeColumnsBeginExpandedEndHidden layout in the format "begin/mid/end", where values are set in percentages.
|
|
50
|
+
*/
|
|
51
|
+
threeColumnsBeginExpandedEndHidden: {type: "string", group: "Appearance", defaultValue: "67/33/0"},
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Columns distribution of ThreeColumnsEndExpanded layout in the format "begin/mid/end", where values are set in percentages.
|
|
55
|
+
*/
|
|
56
|
+
threeColumnsEndExpanded: {type: "string", group: "Appearance", defaultValue: "25/25/50"},
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Columns distribution of ThreeColumnsMidExpanded layout in the format "begin/mid/end", where values are set in percentages.
|
|
60
|
+
*/
|
|
61
|
+
threeColumnsMidExpanded: {type: "string", group: "Appearance", defaultValue: "25/50/25"},
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Columns distribution of ThreeColumnsMidExpandedEndHidden layout in the format "begin/mid/end", where values are set in percentages.
|
|
65
|
+
*/
|
|
66
|
+
threeColumnsMidExpandedEndHidden: {type: "string", group: "Appearance", defaultValue: "33/67/0"}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
return FlexibleColumnLayoutDataForDesktop;
|
|
72
|
+
});
|
|
@@ -0,0 +1,71 @@
|
|
|
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.FlexibleColumnLayoutDataForTablet
|
|
8
|
+
sap.ui.define(['sap/ui/core/LayoutData'],
|
|
9
|
+
function(LayoutData) {
|
|
10
|
+
"use strict";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Constructor for a new <code>sap.f.FlexibleColumnLayoutDataForTablet</code>.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} [sId] ID for the new element, generated automatically if no ID is given
|
|
16
|
+
* @param {object} [mSettings] Initial settings for the new element.
|
|
17
|
+
*
|
|
18
|
+
* @class
|
|
19
|
+
* Holds layout data for columns of <code>sap.f.FlexibleColumnLayout</code> on tablet.
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
* @author SAP SE
|
|
23
|
+
* @version 1.128.0
|
|
24
|
+
*
|
|
25
|
+
* @extends sap.ui.core.LayoutData
|
|
26
|
+
*
|
|
27
|
+
* @since 1.128
|
|
28
|
+
* @public
|
|
29
|
+
* @constructor
|
|
30
|
+
* @alias sap.f.FlexibleColumnLayoutDataForTablet
|
|
31
|
+
*/
|
|
32
|
+
var FlexibleColumnLayoutDataForTablet = LayoutData.extend("sap.f.FlexibleColumnLayoutDataForTablet", /** @lends sap.f.FlexibleColumnLayoutDataForTablet.prototype */ {
|
|
33
|
+
metadata: {
|
|
34
|
+
|
|
35
|
+
library: "sap.f",
|
|
36
|
+
properties: {
|
|
37
|
+
/**
|
|
38
|
+
* Columns distribution of TwoColumnsBeginExpanded layout in the format "begin/mid/end", where values are set in percentages.
|
|
39
|
+
*/
|
|
40
|
+
twoColumnsBeginExpanded: {type: "string", group: "Appearance", defaultValue: "67/33/0"},
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Columns distribution of TwoColumnsMidExpanded layout in the format "begin/mid/end", where values are set in percentages.
|
|
44
|
+
*/
|
|
45
|
+
twoColumnsMidExpanded: {type: "string", group: "Appearance", defaultValue: "33/67/0"},
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Columns distribution of ThreeColumnsBeginExpandedEndHidden layout in the format "begin/mid/end", where values are set in percentages.
|
|
49
|
+
*/
|
|
50
|
+
threeColumnsBeginExpandedEndHidden: {type: "string", group: "Appearance", defaultValue: "67/33/0"},
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Columns distribution of ThreeColumnsEndExpanded layout in the format "begin/mid/end", where values are set in percentages.
|
|
54
|
+
*/
|
|
55
|
+
threeColumnsEndExpanded: {type: "string", group: "Appearance", defaultValue: "0/33/67"},
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Columns distribution of ThreeColumnsMidExpanded layout in the format "begin/mid/end", where values are set in percentages.
|
|
59
|
+
*/
|
|
60
|
+
threeColumnsMidExpanded: {type: "string", group: "Appearance", defaultValue: "0/67/33"},
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Columns distribution of ThreeColumnsMidExpandedEndHidden layout in the format "begin/mid/end", where values are set in percentages.
|
|
64
|
+
*/
|
|
65
|
+
threeColumnsMidExpandedEndHidden: {type: "string", group: "Appearance", defaultValue: "33/67/0"}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
return FlexibleColumnLayoutDataForTablet;
|
|
71
|
+
});
|
|
@@ -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.
|
|
52
|
+
* @version 1.128.0
|
|
53
53
|
* @param {sap.f.FlexibleColumnLayout} oFlexibleColumnLayout
|
|
54
54
|
* The <code>sap.f.FlexibleColumnLayout</code> object whose state will be manipulated.
|
|
55
55
|
*
|
|
@@ -58,14 +58,14 @@ sap.ui.define([
|
|
|
58
58
|
* Can be used to define the sizes of columns and rows for different screen sizes, by using the <code>layout</code> aggregations of <code>sap.f.GridContainer</code>.
|
|
59
59
|
*
|
|
60
60
|
* @author SAP SE
|
|
61
|
-
* @version 1.
|
|
61
|
+
* @version 1.128.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.
|
|
68
|
+
* @version 1.128.0
|
|
69
69
|
*
|
|
70
70
|
* @since 1.65
|
|
71
71
|
* @public
|
package/src/sap/f/GridList.js
CHANGED
|
@@ -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.
|
|
96
|
+
* @version 1.128.0
|
|
97
97
|
*
|
|
98
98
|
* @extends sap.m.ListBase
|
|
99
99
|
* @implements sap.ui.layout.cssgrid.IGridConfigurable
|
package/src/sap/f/ShellBar.js
CHANGED
package/src/sap/f/SidePanel.js
CHANGED
|
@@ -151,7 +151,7 @@ sap.ui.define([
|
|
|
151
151
|
* @extends sap.ui.core.Control
|
|
152
152
|
*
|
|
153
153
|
* @author SAP SE
|
|
154
|
-
* @version 1.
|
|
154
|
+
* @version 1.128.0
|
|
155
155
|
*
|
|
156
156
|
* @constructor
|
|
157
157
|
* @public
|
|
@@ -1082,13 +1082,18 @@ sap.ui.define([
|
|
|
1082
1082
|
};
|
|
1083
1083
|
|
|
1084
1084
|
SidePanel.prototype._getSideContentHeaderIcon = function() {
|
|
1085
|
-
var oSelectedItem = this._getSelectedItem()
|
|
1085
|
+
var oSelectedItem = this._getSelectedItem(),
|
|
1086
|
+
sSrc = oSelectedItem && oSelectedItem.getIcon();
|
|
1087
|
+
|
|
1088
|
+
if (!sSrc) {
|
|
1089
|
+
return null;
|
|
1090
|
+
}
|
|
1086
1091
|
|
|
1087
1092
|
if (!this._contentHeaderIcon) {
|
|
1088
1093
|
this._contentHeaderIcon = new Icon();
|
|
1089
1094
|
}
|
|
1090
1095
|
|
|
1091
|
-
oSelectedItem && this._contentHeaderIcon.setSrc(
|
|
1096
|
+
oSelectedItem && this._contentHeaderIcon.setSrc(sSrc);
|
|
1092
1097
|
|
|
1093
1098
|
return this._contentHeaderIcon;
|
|
1094
1099
|
};
|
|
@@ -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
|
+
});
|