@openui5/sap.f 1.115.1 → 1.117.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/.reuse/dep5 +0 -5
- package/THIRDPARTY.txt +1 -7
- 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 +1 -1
- package/src/sap/f/DynamicPage.js +38 -4
- package/src/sap/f/DynamicPageAccessibleLandmarkInfo.js +1 -1
- package/src/sap/f/DynamicPageHeader.js +1 -1
- package/src/sap/f/DynamicPageTitle.js +6 -2
- package/src/sap/f/DynamicPageTitleRenderer.js +2 -2
- package/src/sap/f/FlexibleColumnLayout.js +1 -1
- package/src/sap/f/FlexibleColumnLayoutAccessibleLandmarkInfo.js +1 -1
- 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/GridNavigationMatrix.js +61 -33
- 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 +17 -5
- package/src/sap/f/SidePanelItem.js +1 -1
- package/src/sap/f/SidePanelRenderer.js +1 -1
- package/src/sap/f/cards/BaseHeader.js +7 -1
- package/src/sap/f/cards/Header.js +9 -1
- package/src/sap/f/cards/HeaderRenderer.js +2 -2
- package/src/sap/f/cards/NumericHeader.js +1 -1
- package/src/sap/f/cards/NumericHeaderRenderer.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/changeHandler/MoveDynamicPageTitleActions.js +1 -1
- package/src/sap/f/delegate/GridContainerItemNavigation.js +1 -1
- package/src/sap/f/delegate/GridItemNavigation.js +135 -111
- package/src/sap/f/dnd/GridDragOver.js +1 -1
- package/src/sap/f/dnd/GridDropInfo.js +1 -1
- package/src/sap/f/library.js +2 -2
- package/src/sap/f/messagebundle.properties +5 -5
- package/src/sap/f/messagebundle_ar.properties +2 -2
- package/src/sap/f/messagebundle_bg.properties +2 -2
- package/src/sap/f/messagebundle_ca.properties +2 -2
- package/src/sap/f/messagebundle_cs.properties +2 -2
- package/src/sap/f/messagebundle_cy.properties +2 -2
- package/src/sap/f/messagebundle_da.properties +3 -3
- package/src/sap/f/messagebundle_de.properties +2 -2
- package/src/sap/f/messagebundle_el.properties +2 -2
- package/src/sap/f/messagebundle_en.properties +2 -2
- package/src/sap/f/messagebundle_en_GB.properties +2 -2
- package/src/sap/f/messagebundle_en_US_sappsd.properties +2 -2
- package/src/sap/f/messagebundle_en_US_saprigi.properties +2 -2
- package/src/sap/f/messagebundle_en_US_saptrc.properties +2 -2
- package/src/sap/f/messagebundle_es.properties +2 -2
- package/src/sap/f/messagebundle_es_MX.properties +2 -2
- package/src/sap/f/messagebundle_et.properties +2 -2
- package/src/sap/f/messagebundle_fi.properties +2 -2
- package/src/sap/f/messagebundle_fr.properties +6 -6
- package/src/sap/f/messagebundle_fr_CA.properties +2 -2
- package/src/sap/f/messagebundle_hi.properties +2 -2
- package/src/sap/f/messagebundle_hr.properties +2 -2
- package/src/sap/f/messagebundle_hu.properties +2 -2
- package/src/sap/f/messagebundle_id.properties +2 -2
- package/src/sap/f/messagebundle_it.properties +2 -2
- package/src/sap/f/messagebundle_iw.properties +2 -2
- package/src/sap/f/messagebundle_ja.properties +2 -2
- package/src/sap/f/messagebundle_kk.properties +2 -2
- package/src/sap/f/messagebundle_ko.properties +2 -2
- package/src/sap/f/messagebundle_lt.properties +2 -2
- package/src/sap/f/messagebundle_lv.properties +2 -2
- package/src/sap/f/messagebundle_ms.properties +2 -2
- package/src/sap/f/messagebundle_nl.properties +2 -2
- package/src/sap/f/messagebundle_no.properties +2 -2
- package/src/sap/f/messagebundle_pl.properties +2 -2
- package/src/sap/f/messagebundle_pt.properties +2 -2
- package/src/sap/f/messagebundle_pt_PT.properties +2 -2
- package/src/sap/f/messagebundle_ro.properties +3 -3
- package/src/sap/f/messagebundle_ru.properties +2 -2
- package/src/sap/f/messagebundle_sh.properties +2 -2
- package/src/sap/f/messagebundle_sk.properties +2 -2
- package/src/sap/f/messagebundle_sl.properties +2 -2
- package/src/sap/f/messagebundle_sv.properties +2 -2
- package/src/sap/f/messagebundle_th.properties +2 -2
- package/src/sap/f/messagebundle_tr.properties +2 -2
- package/src/sap/f/messagebundle_uk.properties +2 -2
- package/src/sap/f/messagebundle_vi.properties +2 -2
- package/src/sap/f/messagebundle_zh_CN.properties +2 -2
- package/src/sap/f/messagebundle_zh_TW.properties +2 -2
- 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 +3 -3
- package/src/sap/f/semantic/SemanticControl.js +1 -1
- package/src/sap/f/semantic/SemanticFooter.js +1 -1
- package/src/sap/f/semantic/SemanticPage.js +24 -1
- package/src/sap/f/semantic/SemanticShareMenu.js +1 -1
- package/src/sap/f/semantic/SemanticTitle.js +2 -2
- 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 -6
- package/ui5.yaml +1 -1
package/.reuse/dep5
CHANGED
|
@@ -457,11 +457,6 @@ Comment: these files belong to: UI5 Web Components
|
|
|
457
457
|
|
|
458
458
|
# Outside of Libraries:
|
|
459
459
|
|
|
460
|
-
Files: src/testsuite-utils/src/main/resources/META-INF/less/less.js
|
|
461
|
-
Copyright: 2009-2014, Alexis Sellier <self@cloudhead.net>
|
|
462
|
-
License: Apache-2.0
|
|
463
|
-
Comment: these files belong to: LESS
|
|
464
|
-
|
|
465
460
|
Files: lib/jsdoc/ui5/plugin.js
|
|
466
461
|
Copyright:
|
|
467
462
|
2009-2023 SAP SE or an SAP affiliate company and OpenUI5 contributors
|
package/THIRDPARTY.txt
CHANGED
|
@@ -460,19 +460,13 @@ Contained in: src/sap.ui.webc.main/src/sap/ui/webc/main/thirdparty/*.*
|
|
|
460
460
|
|
|
461
461
|
Outside of Libraries:
|
|
462
462
|
|
|
463
|
-
Component: LESS, version: 1.6.3
|
|
464
|
-
Copyright: 2009-2014, Alexis Sellier <self@cloudhead.net>
|
|
465
|
-
License: Apache-2.0
|
|
466
|
-
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
467
|
-
Contained in: src/testsuite-utils/src/main/resources/META-INF/less/less.js
|
|
468
|
-
|
|
469
463
|
Component: JSDoc 3, version: 3.6.7
|
|
470
464
|
Copyright: 2011-present Michael Mathews micmath@gmail.com and the contributors to JSDoc
|
|
471
465
|
License: Apache-2.0
|
|
472
466
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
473
467
|
Contained in: lib/jsdoc/ui5/plugin.js
|
|
474
468
|
|
|
475
|
-
Component: SAP Theming Base Content, version: 11.
|
|
469
|
+
Component: SAP Theming Base Content, version: 11.4.2
|
|
476
470
|
Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
|
|
477
471
|
License: Apache-2.0
|
|
478
472
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.f",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.117.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.117.0",
|
|
18
|
+
"@openui5/sap.ui.core": "1.117.0",
|
|
19
|
+
"@openui5/sap.ui.layout": "1.117.0"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/src/sap/f/.library
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2023 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.117.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
package/src/sap/f/DynamicPage.js
CHANGED
|
@@ -112,7 +112,7 @@ sap.ui.define([
|
|
|
112
112
|
* @extends sap.ui.core.Control
|
|
113
113
|
*
|
|
114
114
|
* @author SAP SE
|
|
115
|
-
* @version 1.
|
|
115
|
+
* @version 1.117.0
|
|
116
116
|
*
|
|
117
117
|
* @constructor
|
|
118
118
|
* @public
|
|
@@ -410,6 +410,7 @@ sap.ui.define([
|
|
|
410
410
|
});
|
|
411
411
|
this._oStickyHeaderObserver = null;
|
|
412
412
|
this._oHeaderObserver = null;
|
|
413
|
+
this._oTitleObserver = null;
|
|
413
414
|
this._oSubHeaderAfterRenderingDelegate = {onAfterRendering: function() {
|
|
414
415
|
this._bStickySubheaderInTitleArea = false; // reset the flag as the stickySubHeader is freshly rerendered with the iconTabBar
|
|
415
416
|
this._cacheDomElements();
|
|
@@ -431,6 +432,7 @@ sap.ui.define([
|
|
|
431
432
|
this._attachTitleMouseOverHandlers();
|
|
432
433
|
}
|
|
433
434
|
this._attachHeaderObserver();
|
|
435
|
+
this._attachTitleObserver();
|
|
434
436
|
this._addStickySubheaderAfterRenderingDelegate();
|
|
435
437
|
this._detachScrollHandler();
|
|
436
438
|
this._detachResizeHandlers();
|
|
@@ -489,6 +491,10 @@ sap.ui.define([
|
|
|
489
491
|
this._oHeaderObserver.disconnect();
|
|
490
492
|
}
|
|
491
493
|
|
|
494
|
+
if (this._oTitleObserver) {
|
|
495
|
+
this._oTitleObserver.disconnect();
|
|
496
|
+
}
|
|
497
|
+
|
|
492
498
|
if (this._oStickySubheader) {
|
|
493
499
|
this._oStickySubheader.removeEventDelegate(this._oSubHeaderAfterRenderingDelegate);
|
|
494
500
|
}
|
|
@@ -622,7 +628,7 @@ sap.ui.define([
|
|
|
622
628
|
};
|
|
623
629
|
|
|
624
630
|
/**
|
|
625
|
-
* Returns the <code>sap.ui.core.ScrollEnablement</code> delegate which is used with this control.
|
|
631
|
+
* Returns the <code>sap.ui.core.delegate.ScrollEnablement</code> delegate which is used with this control.
|
|
626
632
|
*
|
|
627
633
|
* @public
|
|
628
634
|
* @returns {sap.ui.core.delegate.ScrollEnablement} The scroll delegate instance
|
|
@@ -2158,7 +2164,8 @@ sap.ui.define([
|
|
|
2158
2164
|
var oTitle = this.getTitle(),
|
|
2159
2165
|
oHeader = this.getHeader(),
|
|
2160
2166
|
oContent = this.getContent(),
|
|
2161
|
-
|
|
2167
|
+
oCallback = this._onChildControlAfterRendering.bind(this),
|
|
2168
|
+
oPageChildrenAfterRenderingDelegate = {onAfterRendering: oCallback};
|
|
2162
2169
|
|
|
2163
2170
|
if (exists(oTitle)) {
|
|
2164
2171
|
oTitle.addEventDelegate(oPageChildrenAfterRenderingDelegate);
|
|
@@ -2229,7 +2236,7 @@ sap.ui.define([
|
|
|
2229
2236
|
// => the header will be removed from DOM
|
|
2230
2237
|
// but no afterRendering event will be fired (framework-specific behavior)
|
|
2231
2238
|
// so we need to reflect the removal of the header height from now
|
|
2232
|
-
oHeader.
|
|
2239
|
+
oHeader.invalidate(); // force the DOM update
|
|
2233
2240
|
// update according to the latest header height
|
|
2234
2241
|
this._updateTitlePositioning();
|
|
2235
2242
|
}
|
|
@@ -2253,6 +2260,24 @@ sap.ui.define([
|
|
|
2253
2260
|
}
|
|
2254
2261
|
};
|
|
2255
2262
|
|
|
2263
|
+
/**
|
|
2264
|
+
* Attaches observer to the <code>DynamicPageHeader</code> visible property.
|
|
2265
|
+
* @private
|
|
2266
|
+
*/
|
|
2267
|
+
DynamicPage.prototype._attachTitleObserver = function () {
|
|
2268
|
+
var oTitle = this.getTitle();
|
|
2269
|
+
|
|
2270
|
+
if (exists(oTitle) && !this._bAlreadyAttachedTitleObserver) {
|
|
2271
|
+
if (!this._oTitleObserver) {
|
|
2272
|
+
this._oTitleObserver = new ManagedObjectObserver(this._onTitleFieldChange.bind(this));
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2275
|
+
this._oTitleObserver.observe(oTitle, {properties: ["visible"]});
|
|
2276
|
+
|
|
2277
|
+
this._bAlreadyAttachedTitleObserver = true;
|
|
2278
|
+
}
|
|
2279
|
+
};
|
|
2280
|
+
|
|
2256
2281
|
DynamicPage.prototype._onHeaderFieldChange = function (oEvent) {
|
|
2257
2282
|
|
|
2258
2283
|
if ((oEvent.type === "property") && (oEvent.name === "pinnable")) {
|
|
@@ -2263,6 +2288,15 @@ sap.ui.define([
|
|
|
2263
2288
|
this._updateToggleHeaderVisualIndicators();
|
|
2264
2289
|
};
|
|
2265
2290
|
|
|
2291
|
+
DynamicPage.prototype._onTitleFieldChange = function (oEvent) {
|
|
2292
|
+
|
|
2293
|
+
if ((oEvent.type === "property") && (oEvent.name === "visible")) {
|
|
2294
|
+
this.invalidate();
|
|
2295
|
+
return;
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2298
|
+
};
|
|
2299
|
+
|
|
2266
2300
|
/**
|
|
2267
2301
|
* Attaches handlers to <code>DynamicPageTitle</code> and <DynamicPageHeader</> visual indicators` <code>press</code> events.
|
|
2268
2302
|
* @private
|
|
@@ -89,7 +89,7 @@ sap.ui.define([
|
|
|
89
89
|
* @extends sap.ui.core.Control
|
|
90
90
|
*
|
|
91
91
|
* @author SAP SE
|
|
92
|
-
* @version 1.
|
|
92
|
+
* @version 1.117.0
|
|
93
93
|
*
|
|
94
94
|
* @constructor
|
|
95
95
|
* @public
|
|
@@ -950,10 +950,14 @@ sap.ui.define([
|
|
|
950
950
|
bHasVisibleBreadcrumbs = this.getBreadcrumbs() && this.getBreadcrumbs().getVisible(),
|
|
951
951
|
bHasVisibleSnappedTitleOnMobile = Device.system.phone && this.getSnappedTitleOnMobile() && !this._bExpandedState,
|
|
952
952
|
bShouldShowTopArea = (bHasVisibleBreadcrumbs || bNavigationActionsShouldBeInTopArea) && !bHasVisibleSnappedTitleOnMobile,
|
|
953
|
-
bShouldChangeNavigationActionsPlacement = this.getNavigationActions().length > 0 && (bNavigationActionsShouldBeInTopArea ^ bNavigationActionsAreInTopArea)
|
|
953
|
+
bShouldChangeNavigationActionsPlacement = this.getNavigationActions().length > 0 && (bNavigationActionsShouldBeInTopArea ^ bNavigationActionsAreInTopArea),
|
|
954
|
+
$topArea = this.$topArea;
|
|
954
955
|
|
|
955
956
|
this._toggleTopAreaVisibility(bShouldShowTopArea);
|
|
956
957
|
|
|
958
|
+
$topArea && $topArea.toggleClass("sapFDynamicPageTitleTopBreadCrumbsOnly",
|
|
959
|
+
bHasVisibleBreadcrumbs && !bNavigationActionsShouldBeInTopArea);
|
|
960
|
+
|
|
957
961
|
if (bShouldChangeNavigationActionsPlacement) {
|
|
958
962
|
this._toggleNavigationActionsPlacement(bNavigationActionsShouldBeInTopArea);
|
|
959
963
|
} else {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
|
-
"./library"], function (library) {
|
|
7
|
+
"./library", "sap/ui/Device"], function (library, Device) {
|
|
8
8
|
"use strict";
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -226,7 +226,7 @@ sap.ui.define([
|
|
|
226
226
|
|
|
227
227
|
DynamicPageTitleRenderer._renderSnappedHeading = function (oRm, oDynamicPageTitleState) {
|
|
228
228
|
oRm.openStart("div", oDynamicPageTitleState.id + "-snapped-heading-wrapper");
|
|
229
|
-
if (!oDynamicPageTitleState.isSnapped) {
|
|
229
|
+
if (!oDynamicPageTitleState.isSnapped || (oDynamicPageTitleState.hasSnappedTitleOnMobile && Device.system.phone)) {
|
|
230
230
|
oRm.class("sapUiHidden");
|
|
231
231
|
}
|
|
232
232
|
oRm.openEnd();
|
|
@@ -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.117.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.117.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.117.0
|
|
69
69
|
*
|
|
70
70
|
* @experimental Since 1.65 This class is experimental. The API may change.
|
|
71
71
|
* @since 1.65
|
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.117.0
|
|
97
97
|
*
|
|
98
98
|
* @extends sap.m.ListBase
|
|
99
99
|
* @implements sap.ui.layout.cssgrid.IGridConfigurable
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
* Code other than the OpenUI5 libraries must not introduce dependencies to this module.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
sap.ui.define([
|
|
11
|
+
sap.ui.define([
|
|
12
|
+
"sap/ui/core/Configuration"
|
|
13
|
+
], function (
|
|
14
|
+
Configuration
|
|
15
|
+
) {
|
|
12
16
|
"use strict";
|
|
13
17
|
|
|
14
18
|
return {
|
|
@@ -21,18 +25,19 @@ sap.ui.define([], function () {
|
|
|
21
25
|
* @returns {Array.<Array.<HTMLElement>>} The matrix
|
|
22
26
|
*/
|
|
23
27
|
create: function (oGridDomRef, aItemsDomRefs) {
|
|
24
|
-
|
|
28
|
+
const mGridStyles = window.getComputedStyle(oGridDomRef);
|
|
25
29
|
|
|
26
|
-
|
|
30
|
+
const oLayoutSizes = {
|
|
27
31
|
columns: mGridStyles.gridTemplateColumns.split(/\s+/),
|
|
28
32
|
rows: mGridStyles.gridTemplateRows.split(/\s+/),
|
|
29
33
|
rowGap: parseFloat(mGridStyles.rowGap),
|
|
30
34
|
columnGap: parseFloat(mGridStyles.columnGap),
|
|
31
35
|
paddingTop: parseFloat(mGridStyles.paddingTop),
|
|
32
|
-
paddingLeft: parseFloat(mGridStyles.paddingLeft)
|
|
36
|
+
paddingLeft: parseFloat(mGridStyles.paddingLeft),
|
|
37
|
+
paddingRight: parseFloat(mGridStyles.paddingRight)
|
|
33
38
|
};
|
|
34
39
|
|
|
35
|
-
|
|
40
|
+
const aMatrix = Array.from(
|
|
36
41
|
new Array(oLayoutSizes.rows.length),
|
|
37
42
|
function () {
|
|
38
43
|
return new Array(oLayoutSizes.columns.length).fill(this.EMPTY_CELL);
|
|
@@ -40,7 +45,7 @@ sap.ui.define([], function () {
|
|
|
40
45
|
);
|
|
41
46
|
|
|
42
47
|
aItemsDomRefs.forEach(function (oItemDomRef) {
|
|
43
|
-
|
|
48
|
+
const oPos = this._getPosition(oGridDomRef, oItemDomRef, oLayoutSizes);
|
|
44
49
|
|
|
45
50
|
this._addToMatrix(aMatrix, oPos, oItemDomRef);
|
|
46
51
|
}.bind(this));
|
|
@@ -49,10 +54,10 @@ sap.ui.define([], function () {
|
|
|
49
54
|
},
|
|
50
55
|
|
|
51
56
|
_getPosition: function (oGridDomRef, oItemDomRef, oLayoutSizes) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
const oGridRect = oGridDomRef.getBoundingClientRect();
|
|
58
|
+
const oItemRect = oItemDomRef.getBoundingClientRect();
|
|
59
|
+
const oGridRow = this._getGridRow(oGridRect, oItemRect, oLayoutSizes);
|
|
60
|
+
const oGridCol = this._getGridCol(oGridRect, oItemRect, oLayoutSizes);
|
|
56
61
|
|
|
57
62
|
return {
|
|
58
63
|
xFrom: oGridRow.start,
|
|
@@ -63,14 +68,13 @@ sap.ui.define([], function () {
|
|
|
63
68
|
},
|
|
64
69
|
|
|
65
70
|
_getGridRow: function (oGridRect, oItemRect, oLayoutSizes) {
|
|
66
|
-
|
|
71
|
+
let iStartRow = -1,
|
|
67
72
|
iEndRow = 0,
|
|
68
|
-
fSumRows = 0
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
fBottomOffsetInGrid = fTopOffsetInGrid + oItemRect.height;
|
|
73
|
+
fSumRows = 0;
|
|
74
|
+
const fTopOffsetInGrid = oItemRect.top - oGridRect.top - oLayoutSizes.paddingTop;
|
|
75
|
+
const fBottomOffsetInGrid = fTopOffsetInGrid + oItemRect.height;
|
|
72
76
|
|
|
73
|
-
for (i = 0; i < oLayoutSizes.rows.length; i++) {
|
|
77
|
+
for (let i = 0; i < oLayoutSizes.rows.length; i++) {
|
|
74
78
|
fSumRows += parseFloat(oLayoutSizes.rows[i]);
|
|
75
79
|
|
|
76
80
|
if (iStartRow === -1 && fTopOffsetInGrid < fSumRows) {
|
|
@@ -92,25 +96,51 @@ sap.ui.define([], function () {
|
|
|
92
96
|
},
|
|
93
97
|
|
|
94
98
|
_getGridCol: function (oGridRect, oItemRect, oLayoutSizes) {
|
|
95
|
-
|
|
96
|
-
iEndCol
|
|
99
|
+
let iStartCol,
|
|
100
|
+
iEndCol,
|
|
97
101
|
fSumCols = 0,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
102
|
+
fLeftOffsetInGrid,
|
|
103
|
+
fRightOffsetInGrid;
|
|
104
|
+
|
|
105
|
+
if (Configuration.getRTL()) {
|
|
106
|
+
iEndCol = -1;
|
|
107
|
+
iStartCol = oLayoutSizes.columns.length - 1;
|
|
108
|
+
fRightOffsetInGrid = oGridRect.right - oLayoutSizes.paddingRight - oItemRect.right;
|
|
109
|
+
fLeftOffsetInGrid = fRightOffsetInGrid + oItemRect.width;
|
|
110
|
+
|
|
111
|
+
for (let i = oLayoutSizes.columns.length; i > 0; i--) {
|
|
112
|
+
fSumCols += parseFloat(oLayoutSizes.columns[i - 1]);
|
|
101
113
|
|
|
102
|
-
|
|
103
|
-
|
|
114
|
+
if (iEndCol === -1 && fRightOffsetInGrid < fSumCols) {
|
|
115
|
+
iEndCol = i;
|
|
116
|
+
}
|
|
104
117
|
|
|
105
|
-
|
|
106
|
-
|
|
118
|
+
fSumCols += oLayoutSizes.columnGap;
|
|
119
|
+
|
|
120
|
+
if (Math.round(fLeftOffsetInGrid) <= Math.round(fSumCols)) {
|
|
121
|
+
iStartCol = i - 1;
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
107
124
|
}
|
|
125
|
+
} else {
|
|
126
|
+
iStartCol = -1;
|
|
127
|
+
iEndCol = 0;
|
|
128
|
+
fLeftOffsetInGrid = oItemRect.left - oGridRect.left - oLayoutSizes.paddingLeft;
|
|
129
|
+
fRightOffsetInGrid = fLeftOffsetInGrid + oItemRect.width;
|
|
108
130
|
|
|
109
|
-
|
|
131
|
+
for (let i = 0; i < oLayoutSizes.columns.length; i++) {
|
|
132
|
+
fSumCols += parseFloat(oLayoutSizes.columns[i]);
|
|
110
133
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
134
|
+
if (iStartCol === -1 && fLeftOffsetInGrid < fSumCols) {
|
|
135
|
+
iStartCol = i;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
fSumCols += oLayoutSizes.columnGap;
|
|
139
|
+
|
|
140
|
+
if (Math.round(fRightOffsetInGrid) <= Math.round(fSumCols)) {
|
|
141
|
+
iEndCol = i + 1;
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
114
144
|
}
|
|
115
145
|
}
|
|
116
146
|
|
|
@@ -121,10 +151,8 @@ sap.ui.define([], function () {
|
|
|
121
151
|
},
|
|
122
152
|
|
|
123
153
|
_addToMatrix: function (aMatrix, oPosition, oDomRef) {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
for (iRow = oPosition.xFrom; iRow < oPosition.xTo; iRow++) {
|
|
127
|
-
for (iCol = oPosition.yFrom; iCol < oPosition.yTo; iCol++) {
|
|
154
|
+
for (let iRow = oPosition.xFrom; iRow < oPosition.xTo; iRow++) {
|
|
155
|
+
for (let iCol = oPosition.yFrom; iCol < oPosition.yTo; iCol++) {
|
|
128
156
|
aMatrix[iRow][iCol] = oDomRef;
|
|
129
157
|
}
|
|
130
158
|
}
|