@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.f",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.128.0",
|
|
4
4
|
"description": "OpenUI5 UI Library sap.f",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"url": "https://github.com/SAP/openui5.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@openui5/sap.m": "1.
|
|
18
|
-
"@openui5/sap.ui.core": "1.
|
|
19
|
-
"@openui5/sap.ui.layout": "1.
|
|
17
|
+
"@openui5/sap.m": "1.128.0",
|
|
18
|
+
"@openui5/sap.ui.core": "1.128.0",
|
|
19
|
+
"@openui5/sap.ui.layout": "1.128.0"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/src/sap/f/.library
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
8
8
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
9
|
-
<version>1.
|
|
9
|
+
<version>1.128.0</version>
|
|
10
10
|
|
|
11
11
|
<documentation>SAPUI5 library with Fiori controls.</documentation>
|
|
12
12
|
|
package/src/sap/f/Avatar.js
CHANGED
package/src/sap/f/AvatarGroup.js
CHANGED
package/src/sap/f/Card.js
CHANGED
package/src/sap/f/CardBase.js
CHANGED
|
@@ -5,24 +5,19 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/ui/core/Control",
|
|
8
|
-
"sap/f/library",
|
|
9
|
-
"sap/m/library",
|
|
10
8
|
"sap/ui/core/InvisibleText",
|
|
11
|
-
"sap/m/BadgeEnabler",
|
|
12
9
|
"sap/f/CardRenderer",
|
|
13
|
-
"sap/ui/core/Lib"
|
|
10
|
+
"sap/ui/core/Lib",
|
|
11
|
+
"sap/f/cards/util/CardBadgeEnabler"
|
|
14
12
|
], function (
|
|
15
13
|
Control,
|
|
16
|
-
library,
|
|
17
|
-
mLibrary,
|
|
18
14
|
InvisibleText,
|
|
19
|
-
BadgeEnabler,
|
|
20
15
|
CardRenderer,
|
|
21
|
-
Library
|
|
16
|
+
Library,
|
|
17
|
+
CardBadgeEnabler
|
|
22
18
|
) {
|
|
23
19
|
"use strict";
|
|
24
20
|
|
|
25
|
-
var BadgeState = mLibrary.BadgeState;
|
|
26
21
|
var BADGE_AUTOHIDE_TIME = 3000;
|
|
27
22
|
|
|
28
23
|
/**
|
|
@@ -37,7 +32,7 @@ sap.ui.define([
|
|
|
37
32
|
* @extends sap.ui.core.Control
|
|
38
33
|
*
|
|
39
34
|
* @author SAP SE
|
|
40
|
-
* @version 1.
|
|
35
|
+
* @version 1.128.0
|
|
41
36
|
*
|
|
42
37
|
* @constructor
|
|
43
38
|
* @public
|
|
@@ -62,12 +57,22 @@ sap.ui.define([
|
|
|
62
57
|
*/
|
|
63
58
|
height: {type: "sap.ui.core.CSSSize", group: "Appearance", defaultValue: "auto"}
|
|
64
59
|
},
|
|
65
|
-
aggregations: {
|
|
60
|
+
aggregations: {
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Defines the internally used <code>sap.m.ObjectStatus</code>.
|
|
64
|
+
*/
|
|
65
|
+
_cardBadges: {
|
|
66
|
+
type: "sap.m.ObjectStatus",
|
|
67
|
+
multiple: true,
|
|
68
|
+
visibility: "hidden"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
66
71
|
},
|
|
67
72
|
renderer: CardRenderer
|
|
68
73
|
});
|
|
69
74
|
|
|
70
|
-
|
|
75
|
+
CardBadgeEnabler.call(CardBase.prototype);
|
|
71
76
|
|
|
72
77
|
/**
|
|
73
78
|
* Initialization hook.
|
|
@@ -83,8 +88,7 @@ sap.ui.define([
|
|
|
83
88
|
|
|
84
89
|
this._ariaText = new InvisibleText({id: this.getId() + "-ariaText"});
|
|
85
90
|
this._ariaText.setText(this._oRb.getText("ARIA_ROLEDESCRIPTION_CARD"));
|
|
86
|
-
|
|
87
|
-
this.initBadgeEnablement();
|
|
91
|
+
this.initCardBadgeEnablement();
|
|
88
92
|
};
|
|
89
93
|
|
|
90
94
|
CardBase.prototype.exit = function () {
|
|
@@ -193,49 +197,15 @@ sap.ui.define([
|
|
|
193
197
|
};
|
|
194
198
|
|
|
195
199
|
CardBase.prototype._hideBadge = function () {
|
|
200
|
+
const oCardBadgeCustomData = this._getCardBadgeCustomData();
|
|
196
201
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
oBadgeCustomData.setVisible(false);
|
|
202
|
+
if (oCardBadgeCustomData?.length > 0) {
|
|
203
|
+
this._hideBadges();
|
|
200
204
|
}
|
|
201
205
|
|
|
202
206
|
this._iHideBadgeTimeout = null;
|
|
203
207
|
};
|
|
204
208
|
|
|
205
|
-
CardBase.prototype.onBadgeUpdate = function (sValue, sState, sBadgeId) {
|
|
206
|
-
|
|
207
|
-
var oHeader = this.getCardHeader(),
|
|
208
|
-
oDomRef,
|
|
209
|
-
sAriaLabelledBy;
|
|
210
|
-
|
|
211
|
-
if (oHeader) {
|
|
212
|
-
oDomRef = oHeader.getFocusDomRef();
|
|
213
|
-
} else {
|
|
214
|
-
oDomRef = this.getDomRef("contentSection");
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
if (!oDomRef) {
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
sAriaLabelledBy = oDomRef.getAttribute("aria-labelledby") || "";
|
|
222
|
-
|
|
223
|
-
switch (sState) {
|
|
224
|
-
case BadgeState.Appear:
|
|
225
|
-
sAriaLabelledBy = sBadgeId + " " + sAriaLabelledBy;
|
|
226
|
-
oDomRef.setAttribute("aria-labelledby", sAriaLabelledBy);
|
|
227
|
-
break;
|
|
228
|
-
case BadgeState.Disappear:
|
|
229
|
-
sAriaLabelledBy = sAriaLabelledBy.replace(sBadgeId, "").trim();
|
|
230
|
-
oDomRef.setAttribute("aria-labelledby", sAriaLabelledBy);
|
|
231
|
-
break;
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
|
|
235
|
-
CardBase.prototype.getAriaLabelBadgeText = function () {
|
|
236
|
-
return this.getBadgeCustomData().getValue();
|
|
237
|
-
};
|
|
238
|
-
|
|
239
209
|
/**
|
|
240
210
|
* Gets the ids of the elements labelling the Card container.
|
|
241
211
|
*
|
|
@@ -32,12 +32,17 @@ sap.ui.define([
|
|
|
32
32
|
*/
|
|
33
33
|
CardRenderer.render = function (oRm, oCard) {
|
|
34
34
|
var oHeader = oCard.getCardHeader(),
|
|
35
|
-
bHeaderTop = oHeader && oCard.getCardHeaderPosition() === HeaderPosition.Top
|
|
35
|
+
bHeaderTop = oHeader && oCard.getCardHeaderPosition() === HeaderPosition.Top,
|
|
36
|
+
bHasCardBadgeCustomData = oCard._getCardBadgeCustomData().length > 0;
|
|
36
37
|
|
|
37
38
|
oRm.openStart("div", oCard);
|
|
38
39
|
this.renderContainerAttributes(oRm, oCard);
|
|
39
40
|
oRm.openEnd();
|
|
40
41
|
|
|
42
|
+
if (bHasCardBadgeCustomData) {
|
|
43
|
+
this.renderCardBadge(oRm, oCard);
|
|
44
|
+
}
|
|
45
|
+
|
|
41
46
|
// header at the top
|
|
42
47
|
if (bHeaderTop) {
|
|
43
48
|
oRm.renderControl(oHeader);
|
|
@@ -56,6 +61,9 @@ sap.ui.define([
|
|
|
56
61
|
|
|
57
62
|
oRm.renderControl(oCard._ariaText);
|
|
58
63
|
oRm.renderControl(oCard._ariaContentText);
|
|
64
|
+
if (bHasCardBadgeCustomData) {
|
|
65
|
+
oRm.renderControl(oCard._getInvisibleCardBadgeText());
|
|
66
|
+
}
|
|
59
67
|
|
|
60
68
|
oRm.close("div");
|
|
61
69
|
};
|
|
@@ -72,7 +80,8 @@ sap.ui.define([
|
|
|
72
80
|
bHasHeader = !!(oHeader && oHeader.getVisible()),
|
|
73
81
|
bHasContent = !!oContent,
|
|
74
82
|
bCardHeaderBottom = bHasHeader && oCard.getCardHeaderPosition() === HeaderPosition.Bottom,
|
|
75
|
-
sTooltip = oCard.getTooltip_AsString()
|
|
83
|
+
sTooltip = oCard.getTooltip_AsString(),
|
|
84
|
+
bHasCardBadgeCustomData = oCard._getCardBadgeCustomData().length > 0;
|
|
76
85
|
|
|
77
86
|
oRm.class("sapFCard")
|
|
78
87
|
.style("width", oCard.getWidth());
|
|
@@ -105,7 +114,8 @@ sap.ui.define([
|
|
|
105
114
|
//Accessibility state
|
|
106
115
|
oRm.accessibilityState(oCard, {
|
|
107
116
|
role: "region",
|
|
108
|
-
labelledby: { value: oCard._getAriaLabelledIds(), append: true }
|
|
117
|
+
labelledby: { value: oCard._getAriaLabelledIds(), append: true },
|
|
118
|
+
describedby: {value: bHasCardBadgeCustomData ? oCard._getInvisibleCardBadgeText().getId() : undefined}
|
|
109
119
|
});
|
|
110
120
|
};
|
|
111
121
|
|
|
@@ -147,5 +157,22 @@ sap.ui.define([
|
|
|
147
157
|
|
|
148
158
|
};
|
|
149
159
|
|
|
160
|
+
/**
|
|
161
|
+
* Render card badge section.
|
|
162
|
+
*
|
|
163
|
+
* @protected
|
|
164
|
+
* @param {sap.ui.core.RenderManager} oRm The RenderManager that can be used for writing to the render output buffer.
|
|
165
|
+
* @param {sap.f.Card} oCard An object representation of the control that should be rendered.
|
|
166
|
+
*/
|
|
167
|
+
CardRenderer.renderCardBadge = function (oRm, oCard) {
|
|
168
|
+
oRm.openStart("div", oCard.getId() + "-cardBadgeSection")
|
|
169
|
+
.class("sapFCardBadgePlaceholder")
|
|
170
|
+
.openEnd();
|
|
171
|
+
oCard._getCardBadges()?.forEach((oCardBadge) => {
|
|
172
|
+
oRm.renderControl(oCardBadge);
|
|
173
|
+
});
|
|
174
|
+
oRm.close("div");
|
|
175
|
+
};
|
|
176
|
+
|
|
150
177
|
return CardRenderer;
|
|
151
178
|
});
|
package/src/sap/f/DynamicPage.js
CHANGED
|
@@ -118,7 +118,7 @@ sap.ui.define([
|
|
|
118
118
|
* @extends sap.ui.core.Control
|
|
119
119
|
*
|
|
120
120
|
* @author SAP SE
|
|
121
|
-
* @version 1.
|
|
121
|
+
* @version 1.128.0
|
|
122
122
|
*
|
|
123
123
|
* @constructor
|
|
124
124
|
* @public
|
|
@@ -454,7 +454,8 @@ sap.ui.define([
|
|
|
454
454
|
DynamicPage.prototype.onAfterRendering = function () {
|
|
455
455
|
|
|
456
456
|
var bShouldSnapWithScroll,
|
|
457
|
-
iCurrentScrollPosition
|
|
457
|
+
iCurrentScrollPosition,
|
|
458
|
+
oHeader = this.getHeader();
|
|
458
459
|
|
|
459
460
|
if (this.getPreserveHeaderStateOnScroll()) {
|
|
460
461
|
// Ensure that in this tick DP and it's aggregations are rendered
|
|
@@ -486,6 +487,10 @@ sap.ui.define([
|
|
|
486
487
|
|
|
487
488
|
this._updateToggleHeaderVisualIndicators();
|
|
488
489
|
this._updateTitleVisualState();
|
|
490
|
+
|
|
491
|
+
if (exists(oHeader) && oHeader._setLandmarkInfo) {
|
|
492
|
+
oHeader._setLandmarkInfo(this.getLandmarkInfo());
|
|
493
|
+
}
|
|
489
494
|
};
|
|
490
495
|
|
|
491
496
|
DynamicPage.prototype.exit = function () {
|
|
@@ -23,7 +23,7 @@ sap.ui.define(['sap/ui/core/Element', './library'],
|
|
|
23
23
|
* @extends sap.ui.core.Element
|
|
24
24
|
*
|
|
25
25
|
* @author SAP SE
|
|
26
|
-
* @version 1.
|
|
26
|
+
* @version 1.128.0
|
|
27
27
|
*
|
|
28
28
|
* @constructor
|
|
29
29
|
* @public
|
|
@@ -88,7 +88,16 @@ sap.ui.define(['sap/ui/core/Element', './library'],
|
|
|
88
88
|
*
|
|
89
89
|
* If not set (and a landmark different than <code>sap.ui.core.AccessibleLandmarkRole.None</code> is defined), no label is set.
|
|
90
90
|
*/
|
|
91
|
-
footerLabel : {type : "string", defaultValue : null}
|
|
91
|
+
footerLabel : {type : "string", defaultValue : null},
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Texts which describe the landmark of the section inside the header container of the corresponding <code>sap.f.DynamicPage</code> control.
|
|
95
|
+
*
|
|
96
|
+
* If not set, default "Expanded header" aria-label is set.
|
|
97
|
+
* @public
|
|
98
|
+
* @since 1.127.0
|
|
99
|
+
*/
|
|
100
|
+
headerContentLabel: {type : "string", defaultValue : null}
|
|
92
101
|
}
|
|
93
102
|
}});
|
|
94
103
|
|
|
@@ -64,7 +64,7 @@ sap.ui.define([
|
|
|
64
64
|
* @extends sap.ui.core.Control
|
|
65
65
|
*
|
|
66
66
|
* @author SAP SE
|
|
67
|
-
* @version 1.
|
|
67
|
+
* @version 1.128.0
|
|
68
68
|
*
|
|
69
69
|
* @constructor
|
|
70
70
|
* @public
|
|
@@ -141,10 +141,10 @@ sap.ui.define([
|
|
|
141
141
|
DynamicPageHeader.prototype.init = function() {
|
|
142
142
|
this._bShowCollapseButton = true;
|
|
143
143
|
this._oInvisibleMessage = null;
|
|
144
|
+
this._oLandmarkInfo = null;
|
|
144
145
|
};
|
|
145
146
|
|
|
146
147
|
DynamicPageHeader.prototype.onAfterRendering = function () {
|
|
147
|
-
this._initARIAState();
|
|
148
148
|
this._initPinButtonARIAState();
|
|
149
149
|
|
|
150
150
|
if (!this._oInvisibleMessage) {
|
|
@@ -155,6 +155,8 @@ sap.ui.define([
|
|
|
155
155
|
if (this.getPinnable()) {
|
|
156
156
|
this._setPressedStatePinIcon();
|
|
157
157
|
}
|
|
158
|
+
|
|
159
|
+
this._applyAriaAttributes();
|
|
158
160
|
};
|
|
159
161
|
|
|
160
162
|
/*************************************** Private members ******************************************/
|
|
@@ -212,13 +214,25 @@ sap.ui.define([
|
|
|
212
214
|
};
|
|
213
215
|
|
|
214
216
|
/**
|
|
215
|
-
*
|
|
217
|
+
* Applies the <code>DynamicPageHeader</code> ARIA attributes.
|
|
216
218
|
* @private
|
|
217
219
|
*/
|
|
218
|
-
DynamicPageHeader.prototype.
|
|
219
|
-
var $header = this.$()
|
|
220
|
+
DynamicPageHeader.prototype._applyAriaAttributes = function () {
|
|
221
|
+
var $header = this.$(),
|
|
222
|
+
bHasHeaderContentLabel = this._oLandmarkInfo && this._oLandmarkInfo.getHeaderContentLabel();
|
|
223
|
+
|
|
224
|
+
if (bHasHeaderContentLabel) {
|
|
225
|
+
var sHeaderContentLabel = this._oLandmarkInfo.getHeaderContentLabel();
|
|
226
|
+
$header.attr(DynamicPageHeader.ARIA.ARIA_LABEL, sHeaderContentLabel);
|
|
227
|
+
} else {
|
|
228
|
+
$header.attr(DynamicPageHeader.ARIA.ARIA_LABEL, DynamicPageHeader.ARIA.LABEL_EXPANDED);
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
DynamicPageHeader.prototype._setLandmarkInfo = function (oLandmarkInfo) {
|
|
233
|
+
this._oLandmarkInfo = oLandmarkInfo;
|
|
220
234
|
|
|
221
|
-
|
|
235
|
+
this._applyAriaAttributes();
|
|
222
236
|
};
|
|
223
237
|
|
|
224
238
|
/**
|
|
@@ -108,7 +108,7 @@ sap.ui.define([
|
|
|
108
108
|
*
|
|
109
109
|
* @extends sap.ui.core.Control
|
|
110
110
|
* @author SAP SE
|
|
111
|
-
* @version 1.
|
|
111
|
+
* @version 1.128.0
|
|
112
112
|
*
|
|
113
113
|
* @constructor
|
|
114
114
|
* @public
|
|
@@ -650,6 +650,27 @@ sap.ui.define([
|
|
|
650
650
|
*/
|
|
651
651
|
endColumn : {type : "boolean"}
|
|
652
652
|
}
|
|
653
|
+
},
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* Fired when user resize columns.
|
|
657
|
+
* @since 1.128
|
|
658
|
+
*/
|
|
659
|
+
columnsDistributionChange : {
|
|
660
|
+
parameters : {
|
|
661
|
+
/**
|
|
662
|
+
* The current <code>media</code> - dekstop or tablet.
|
|
663
|
+
*/
|
|
664
|
+
media: { type: "string" },
|
|
665
|
+
/**
|
|
666
|
+
* The value of the <code>layout</code> property.
|
|
667
|
+
*/
|
|
668
|
+
layout: { type: "string" },
|
|
669
|
+
/**
|
|
670
|
+
* Sizes of all columns in percentages, separated by '/'.
|
|
671
|
+
*/
|
|
672
|
+
columnsSizes : {type : "string"}
|
|
673
|
+
}
|
|
653
674
|
}
|
|
654
675
|
}
|
|
655
676
|
},
|
|
@@ -713,20 +734,11 @@ sap.ui.define([
|
|
|
713
734
|
this._boundColumnSeparatorMoveEnd = this._onColumnSeparatorMoveEnd.bind(this);
|
|
714
735
|
this._oLocalStorage = {};
|
|
715
736
|
this._bNeverRendered = true;
|
|
716
|
-
};
|
|
717
737
|
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
}
|
|
722
|
-
var sKey = (iMaxColumnsCount === 3) ? "desktop" : "tablet";
|
|
723
|
-
if (!this._oLocalStorage[sKey]) {
|
|
724
|
-
var sPrefix = sKey === 'desktop' ?
|
|
725
|
-
FlexibleColumnLayout.STORAGE_PREFIX_DESKTOP :
|
|
726
|
-
FlexibleColumnLayout.STORAGE_PREFIX_TABLET;
|
|
727
|
-
this._oLocalStorage[sKey] = new Storage(Storage.Type.local, sPrefix);
|
|
728
|
-
}
|
|
729
|
-
return this._oLocalStorage[sKey];
|
|
738
|
+
this._oBeginColumnWidth = {
|
|
739
|
+
tablet: 0,
|
|
740
|
+
desktop: 0
|
|
741
|
+
};
|
|
730
742
|
};
|
|
731
743
|
|
|
732
744
|
FlexibleColumnLayout.prototype._announceMessage = function (sResourceBundleKey) {
|
|
@@ -765,6 +777,7 @@ sap.ui.define([
|
|
|
765
777
|
|
|
766
778
|
if (this._hasAnyColumnPagesRendered() !== bHadAnyColumnPagesRendered) {
|
|
767
779
|
this._hideShowColumnSeparators();
|
|
780
|
+
this._updateSeparatorsAriaPositionInfo();
|
|
768
781
|
}
|
|
769
782
|
};
|
|
770
783
|
|
|
@@ -1323,6 +1336,12 @@ sap.ui.define([
|
|
|
1323
1336
|
if (oOptions.updateDetailedActiveClasses) {
|
|
1324
1337
|
this._addDetailedActiveClasses(sLayout);
|
|
1325
1338
|
}
|
|
1339
|
+
|
|
1340
|
+
if (bHasAnimations) {
|
|
1341
|
+
this._attachAfterAllColumnsResizedOnce(this._updateSeparatorsAriaPositionInfo.bind(this));
|
|
1342
|
+
} else {
|
|
1343
|
+
this._updateSeparatorsAriaPositionInfo();
|
|
1344
|
+
}
|
|
1326
1345
|
};
|
|
1327
1346
|
|
|
1328
1347
|
/**
|
|
@@ -1675,6 +1694,7 @@ sap.ui.define([
|
|
|
1675
1694
|
this.toggleStyleClass("sapFFLActiveResize", false);
|
|
1676
1695
|
this._oMoveInfo.separator.style.visibility = "";
|
|
1677
1696
|
this._oMoveInfo.separator.focus();
|
|
1697
|
+
this._updateAriaPositionInfo(this._oMoveInfo.separator);
|
|
1678
1698
|
this._ignoreMouse = false;
|
|
1679
1699
|
this._ignoreTouch = false;
|
|
1680
1700
|
this._oMoveInfo = null;
|
|
@@ -2024,14 +2044,32 @@ sap.ui.define([
|
|
|
2024
2044
|
FlexibleColumnLayout.prototype._saveResizedColumWidths = function() {
|
|
2025
2045
|
var sNewLayout = this._oMoveInfo.layout,
|
|
2026
2046
|
oColumnPercentWidths = this._convertColumnPxWidthToPercent(this._oMoveInfo.columnWidths, sNewLayout),
|
|
2027
|
-
sNewWidthsDistribution = Object.values(oColumnPercentWidths).join("/")
|
|
2047
|
+
sNewWidthsDistribution = Object.values(oColumnPercentWidths).join("/"),
|
|
2048
|
+
sMediaKey;
|
|
2028
2049
|
|
|
2029
2050
|
if (this._isValidWidthDistributionForLayout(sNewWidthsDistribution, sNewLayout)) {
|
|
2030
|
-
this.
|
|
2031
|
-
this.
|
|
2051
|
+
sMediaKey = this._getMediaKey();
|
|
2052
|
+
this.fireColumnsDistributionChange({
|
|
2053
|
+
media: sMediaKey,
|
|
2054
|
+
layout: sNewLayout,
|
|
2055
|
+
columnsSizes: sNewWidthsDistribution
|
|
2056
|
+
});
|
|
2057
|
+
|
|
2058
|
+
this._oBeginColumnWidth[sMediaKey] = oColumnPercentWidths.begin;
|
|
2032
2059
|
}
|
|
2033
2060
|
};
|
|
2034
2061
|
|
|
2062
|
+
FlexibleColumnLayout.prototype._getMediaKey = function (iMaxColumnsCount) {
|
|
2063
|
+
var sKey;
|
|
2064
|
+
|
|
2065
|
+
if (!iMaxColumnsCount) {
|
|
2066
|
+
iMaxColumnsCount = this.getMaxColumnsCount();
|
|
2067
|
+
}
|
|
2068
|
+
sKey = (iMaxColumnsCount === 3) ? "desktop" : "tablet";
|
|
2069
|
+
|
|
2070
|
+
return sKey;
|
|
2071
|
+
};
|
|
2072
|
+
|
|
2035
2073
|
FlexibleColumnLayout.prototype._getNextLayoutOnResizeByDrag = function (oColumnWidths,
|
|
2036
2074
|
sPreviousLayout, sSeparator, bForwardDirection, bResizeEnd) {
|
|
2037
2075
|
function dragged(oOptions) {
|
|
@@ -2168,6 +2206,78 @@ sap.ui.define([
|
|
|
2168
2206
|
return oLayoutMatchers[sLayout]();
|
|
2169
2207
|
};
|
|
2170
2208
|
|
|
2209
|
+
/**
|
|
2210
|
+
* Obtains the range of the possible possitions along the X-axis of this separator (allowed by the current layout)
|
|
2211
|
+
* where the start of the axis is the edge of the FlexibleColumnLayout closest to the begin column.
|
|
2212
|
+
* @param {object} oSeparator the separator HTML element
|
|
2213
|
+
* @returns {object} the start and end positions
|
|
2214
|
+
*/
|
|
2215
|
+
FlexibleColumnLayout.prototype._getSeparatorMovementRange = function (oSeparator) {
|
|
2216
|
+
var sSeparator = getSeparatorName(oSeparator),
|
|
2217
|
+
sLayout = this.getLayout(),
|
|
2218
|
+
iMaxColumnsForWidth = this.getMaxColumnsCount(),
|
|
2219
|
+
iMaxColumnsForLayoutType = this._getMaxColumnsCountForLayout(sLayout, FlexibleColumnLayout.DESKTOP_BREAKPOINT),
|
|
2220
|
+
bDesktop = iMaxColumnsForWidth === 3,
|
|
2221
|
+
bTablet = iMaxColumnsForWidth === 2,
|
|
2222
|
+
bIsThreeColumnLayout = iMaxColumnsForLayoutType === 3,
|
|
2223
|
+
iTotalSpace = this._iWidth,
|
|
2224
|
+
iSpaceBeforeRange = FlexibleColumnLayout.COLUMN_MIN_WIDTH, // space for the preceding column
|
|
2225
|
+
iSpaceAfterRange = FlexibleColumnLayout.COLUMN_MIN_WIDTH, // space for the suceeding column
|
|
2226
|
+
iRangeLength;
|
|
2227
|
+
|
|
2228
|
+
if (bDesktop && sSeparator === "end") {
|
|
2229
|
+
// (the width of the 'begin' column is fixed, as the user cannot resize it by moving the 'end' separator)
|
|
2230
|
+
iSpaceBeforeRange = this._$columns["begin"].get(0).offsetWidth + FlexibleColumnLayout.COLUMN_MIN_WIDTH; // space for the preceding columns
|
|
2231
|
+
if (sLayout === LT.ThreeColumnsMidExpandedEndHidden) {
|
|
2232
|
+
iSpaceAfterRange = 0; // the 'end' separator is adjacent to the FCL edge, nothing follows it
|
|
2233
|
+
}
|
|
2234
|
+
}
|
|
2235
|
+
|
|
2236
|
+
if (bTablet) {
|
|
2237
|
+
if (sSeparator === "begin" & bIsThreeColumnLayout) {
|
|
2238
|
+
iSpaceBeforeRange = 0; // the 'begin' separator is adjacent to the FCL edge, nothing precedes it
|
|
2239
|
+
}
|
|
2240
|
+
if (sSeparator === "end" && sLayout === LT.ThreeColumnsMidExpandedEndHidden) {
|
|
2241
|
+
iSpaceAfterRange = 0; // the 'end' separator is adjacent to the FCL edge, nothing follows it
|
|
2242
|
+
}
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
// provision space to render the separator itself
|
|
2246
|
+
iSpaceAfterRange += FlexibleColumnLayout.COLUMN_SEPARATOR_WIDTH;
|
|
2247
|
+
|
|
2248
|
+
iRangeLength = iTotalSpace - iSpaceBeforeRange - iSpaceAfterRange;
|
|
2249
|
+
|
|
2250
|
+
return {
|
|
2251
|
+
from: iSpaceBeforeRange,
|
|
2252
|
+
to: iSpaceBeforeRange + iRangeLength
|
|
2253
|
+
};
|
|
2254
|
+
};
|
|
2255
|
+
|
|
2256
|
+
FlexibleColumnLayout.prototype._updateAriaPositionInfo = function (oSeparator) {
|
|
2257
|
+
// obtain the range [fromX ... toX] of the possible positions along the X-axis
|
|
2258
|
+
// of this separator (as allowed by the current layout)
|
|
2259
|
+
var oRange = this._getSeparatorMovementRange(oSeparator),
|
|
2260
|
+
iRangeLength = oRange.to - oRange.from,
|
|
2261
|
+
iSeparatorEarliestPossibleX = oRange.from,
|
|
2262
|
+
iSeparatorCurrentX = oSeparator.offsetLeft,
|
|
2263
|
+
iSeparatorAdvanceInsideRange = iSeparatorCurrentX - iSeparatorEarliestPossibleX,
|
|
2264
|
+
// convert to value inside [0, ..., 100] interval
|
|
2265
|
+
iSeparatorRelativePositionInsideRange = iSeparatorAdvanceInsideRange / iRangeLength * 100,
|
|
2266
|
+
sSeparatorRelativePositionInsideRange = iSeparatorRelativePositionInsideRange.toFixed(2);
|
|
2267
|
+
oSeparator.setAttribute("aria-valuenow", sSeparatorRelativePositionInsideRange);
|
|
2268
|
+
};
|
|
2269
|
+
|
|
2270
|
+
FlexibleColumnLayout.prototype._updateSeparatorsAriaPositionInfo = function () {
|
|
2271
|
+
if (!this._oColumnSeparators) {
|
|
2272
|
+
return;
|
|
2273
|
+
}
|
|
2274
|
+
Object.values(this._oColumnSeparators).forEach(function($separator) {
|
|
2275
|
+
if ($separator.get(0).style.display !== "none") {
|
|
2276
|
+
this._updateAriaPositionInfo($separator.get(0));
|
|
2277
|
+
}
|
|
2278
|
+
}, this);
|
|
2279
|
+
};
|
|
2280
|
+
|
|
2171
2281
|
/**
|
|
2172
2282
|
* Obtains the current width of a column
|
|
2173
2283
|
*
|
|
@@ -3006,8 +3116,14 @@ sap.ui.define([
|
|
|
3006
3116
|
* @ui5-restricted sap.f.FlexibleColumnLayoutSemanticHelper
|
|
3007
3117
|
*/
|
|
3008
3118
|
FlexibleColumnLayout.prototype._getColumnWidthDistributionForLayout = function (sLayout, bAsIntArray, iMaxColumnsCount) {
|
|
3009
|
-
var
|
|
3010
|
-
|
|
3119
|
+
var oLayoutData = this.getLayoutData(),
|
|
3120
|
+
sMediaKey = this._getMediaKey(iMaxColumnsCount),
|
|
3121
|
+
oLayoutDataPerMedia = oLayoutData?.isA("sap.f.FlexibleColumnLayoutData")
|
|
3122
|
+
&& (sMediaKey === "desktop" ? oLayoutData.getDesktopLayoutData() : oLayoutData.getTabletLayoutData()),
|
|
3123
|
+
sGetterNameLayout = "get" + sLayout,
|
|
3124
|
+
sColumnWidthDistribution = oLayoutDataPerMedia?.[sGetterNameLayout]?.(),
|
|
3125
|
+
bIsValidDistribution = sColumnWidthDistribution && this._isValidWidthDistributionForLayout(sColumnWidthDistribution, sLayout),
|
|
3126
|
+
iBeginWidth = this._oBeginColumnWidth[sMediaKey],
|
|
3011
3127
|
vResult,
|
|
3012
3128
|
vResultAsArray;
|
|
3013
3129
|
|
|
@@ -3017,8 +3133,7 @@ sap.ui.define([
|
|
|
3017
3133
|
|
|
3018
3134
|
vResult = "0/0/0";
|
|
3019
3135
|
|
|
3020
|
-
} else if (iMaxColumnsCount > 1
|
|
3021
|
-
&& sColumnWidthDistribution) {
|
|
3136
|
+
} else if (iMaxColumnsCount > 1 && sColumnWidthDistribution && bIsValidDistribution) {
|
|
3022
3137
|
vResult = sColumnWidthDistribution;
|
|
3023
3138
|
} else {
|
|
3024
3139
|
vResult = this._getDefaultColumnWidthDistributionForLayout(sLayout, iMaxColumnsCount);
|