@openui5/sap.uxap 1.121.1 → 1.122.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 +5 -5
- package/src/sap/uxap/.library +1 -1
- package/src/sap/uxap/BlockBase.js +1 -2
- package/src/sap/uxap/BlockBaseMetadata.js +1 -1
- package/src/sap/uxap/HierarchicalSelect.js +7 -1
- package/src/sap/uxap/LazyLoading.js +15 -4
- package/src/sap/uxap/ObjectPageAccessibleLandmarkInfo.js +1 -1
- package/src/sap/uxap/ObjectPageDynamicHeaderContent.js +1 -1
- package/src/sap/uxap/ObjectPageDynamicHeaderTitle.js +1 -1
- package/src/sap/uxap/ObjectPageLayout.js +61 -17
- package/src/sap/uxap/ObjectPageLayoutABHelper.js +1 -2
- package/src/sap/uxap/ObjectPageLazyLoader.js +1 -1
- package/src/sap/uxap/ObjectPageSection.js +43 -4
- package/src/sap/uxap/ObjectPageSectionBase.js +11 -4
- package/src/sap/uxap/ObjectPageSubSection.js +61 -0
- package/src/sap/uxap/changeHandler/AddIFrameObjectPageLayout.js +1 -1
- package/src/sap/uxap/changeHandler/MoveObjectPageSection.js +1 -1
- package/src/sap/uxap/changeHandler/RenameObjectPageSection.js +1 -1
- package/src/sap/uxap/changeHandler/UnstashObjectPageSection.js +1 -1
- package/src/sap/uxap/library.js +24 -6
- package/src/sap/uxap/themes/base/AnchorBar.less +25 -0
- package/src/sap/uxap/themes/base/ObjectPageSubSection.less +5 -0
package/THIRDPARTY.txt
CHANGED
|
@@ -461,7 +461,7 @@ License: Apache-2.0
|
|
|
461
461
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
462
462
|
Contained in: lib/jsdoc/ui5/plugin.js
|
|
463
463
|
|
|
464
|
-
Component: SAP Theming Base Content, version: 11.
|
|
464
|
+
Component: SAP Theming Base Content, version: 11.12.0
|
|
465
465
|
Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
|
|
466
466
|
License: Apache-2.0
|
|
467
467
|
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.uxap",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.122.0",
|
|
4
4
|
"description": "OpenUI5 UI Library sap.uxap",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"url": "https://github.com/SAP/openui5.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@openui5/sap.f": "1.
|
|
18
|
-
"@openui5/sap.m": "1.
|
|
19
|
-
"@openui5/sap.ui.core": "1.
|
|
20
|
-
"@openui5/sap.ui.layout": "1.
|
|
17
|
+
"@openui5/sap.f": "1.122.0",
|
|
18
|
+
"@openui5/sap.m": "1.122.0",
|
|
19
|
+
"@openui5/sap.ui.core": "1.122.0",
|
|
20
|
+
"@openui5/sap.ui.layout": "1.122.0"
|
|
21
21
|
}
|
|
22
22
|
}
|
package/src/sap/uxap/.library
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
<name>sap.uxap</name>
|
|
5
5
|
<vendor>SAP SE</vendor>
|
|
6
|
-
<version>1.
|
|
6
|
+
<version>1.122.0</version>
|
|
7
7
|
<copyright>OpenUI5
|
|
8
8
|
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
9
9
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
@@ -249,8 +249,7 @@ sap.ui.define([
|
|
|
249
249
|
BlockBase.prototype.setParent = function (oParent, sAggregationName, bSuppressInvalidate) {
|
|
250
250
|
Control.prototype.setParent.call(this, oParent, sAggregationName, bSuppressInvalidate);
|
|
251
251
|
|
|
252
|
-
if (oParent
|
|
253
|
-
this._bLazyLoading = true; //we activate the block lazy loading since we are within an objectPageLayout
|
|
252
|
+
if (oParent?.isA("sap.uxap.ObjectPageSubSection")) {
|
|
254
253
|
this._oParentObjectPageSubSection = oParent;
|
|
255
254
|
}
|
|
256
255
|
};
|
|
@@ -97,7 +97,13 @@ sap.ui.define([
|
|
|
97
97
|
* Keyboard handling requirement to have the same behavior on [ENTER] key
|
|
98
98
|
* as on [SPACE] key (namely, to toggle the open state the select dropdown)
|
|
99
99
|
*/
|
|
100
|
-
|
|
100
|
+
HierarchicalSelect.prototype.onsapenter = function(oEvent) {
|
|
101
|
+
if (!this.getPicker().isOpen()) {
|
|
102
|
+
Select.prototype.ontap.call(this, oEvent);
|
|
103
|
+
} else {
|
|
104
|
+
Select.prototype.onsapenter.call(this, oEvent);
|
|
105
|
+
}
|
|
106
|
+
};
|
|
101
107
|
|
|
102
108
|
/**
|
|
103
109
|
* Keyboard handling of [UP], [PAGE-UP], [PAGE-DOWN], [HOME], [END] keys
|
|
@@ -17,6 +17,7 @@ sap.ui.define([
|
|
|
17
17
|
function(Element, jQuery, Device, BaseObject, ObjectPageSubSection, library, Log, isEmptyObject) {
|
|
18
18
|
"use strict";
|
|
19
19
|
|
|
20
|
+
var oPendingPromises = {};
|
|
20
21
|
var LazyLoading = BaseObject.extend("sap.uxap._helpers.LazyLoading", {
|
|
21
22
|
/**
|
|
22
23
|
* @private
|
|
@@ -215,21 +216,32 @@ sap.ui.define([
|
|
|
215
216
|
//Load the subsections
|
|
216
217
|
jQuery.each(oSubSectionsToLoad, jQuery.proxy(function (idx, sSectionId) {
|
|
217
218
|
Log.debug("ObjectPageLayout :: lazyLoading", "connecting " + sSectionId);
|
|
218
|
-
|
|
219
|
+
oPendingPromises[idx] = true;
|
|
220
|
+
Element.getElementById(sSectionId).connectToModelsAsync().then(function () {
|
|
221
|
+
// newly scrolled in view
|
|
222
|
+
oPendingPromises[idx] = false;
|
|
223
|
+
Log.debug("ObjectPageLayout :: lazyLoading", "subSectionEnteredViewPort " + sSectionId);
|
|
224
|
+
this._oObjectPageLayout.fireEvent("subSectionEnteredViewPort", {
|
|
225
|
+
subSection: Element.getElementById(sSectionId)
|
|
226
|
+
});
|
|
227
|
+
this._oPrevSubSectionsInView[idx] = Element.getElementById(sSectionId);
|
|
228
|
+
}.bind(this));
|
|
219
229
|
oSectionInfo[sSectionId].loaded = true;
|
|
220
230
|
}, this));
|
|
221
231
|
|
|
232
|
+
|
|
222
233
|
// fire event for sections scrolled in view (for app to resume binding)
|
|
223
234
|
jQuery.each(oSubSectionsInView, jQuery.proxy(function (idx, sSectionId) {
|
|
224
|
-
if (!this._oPrevSubSectionsInView[idx]) {
|
|
235
|
+
if (!this._oPrevSubSectionsInView[idx] && !oPendingPromises[idx]) {
|
|
225
236
|
// newly scrolled in view
|
|
226
237
|
Log.debug("ObjectPageLayout :: lazyLoading", "subSectionEnteredViewPort " + sSectionId);
|
|
227
238
|
this._oObjectPageLayout.fireEvent("subSectionEnteredViewPort", {
|
|
228
239
|
subSection: Element.getElementById(sSectionId)
|
|
229
240
|
});
|
|
241
|
+
this._oPrevSubSectionsInView[idx] = Element.getElementById(sSectionId);
|
|
230
242
|
}
|
|
231
243
|
}, this));
|
|
232
|
-
|
|
244
|
+
|
|
233
245
|
|
|
234
246
|
if (bOnGoingScroll) {
|
|
235
247
|
//bOnGoingScroll is just a prediction, we can't be 100% sure as there's no end-of-scroll event
|
|
@@ -242,7 +254,6 @@ sap.ui.define([
|
|
|
242
254
|
}
|
|
243
255
|
};
|
|
244
256
|
|
|
245
|
-
|
|
246
257
|
/**
|
|
247
258
|
* Load in advance the subsections which will likely be visible once the operation (firstRendering or scrolltoSection)
|
|
248
259
|
* will be complete.
|
|
@@ -671,6 +671,7 @@ sap.ui.define([
|
|
|
671
671
|
// anchorbar management
|
|
672
672
|
this._bInternalAnchorBarVisible = true;
|
|
673
673
|
this._oVisibleSubSections = 0;
|
|
674
|
+
this._initialABButtonsColorUpdateDone = false;
|
|
674
675
|
|
|
675
676
|
this._$footerWrapper = []; //dom reference to the floating footer wrapper
|
|
676
677
|
this._$opWrapper = []; //dom reference to the header for Dark mode background image scrolling scenario
|
|
@@ -1112,16 +1113,16 @@ sap.ui.define([
|
|
|
1112
1113
|
ObjectPageLayout.prototype._preloadSectionsOnBeforeFirstRendering = function () {
|
|
1113
1114
|
var aToLoad = this._getSectionsToPreloadOnBeforeFirstRendering();
|
|
1114
1115
|
|
|
1115
|
-
this._connectModelsForSections(aToLoad)
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
});
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1116
|
+
this._connectModelsForSections(aToLoad).then(function () {
|
|
1117
|
+
// early notify that subSections are being loaded
|
|
1118
|
+
if (this.getEnableLazyLoading()) {
|
|
1119
|
+
aToLoad.forEach(function (subSection) {
|
|
1120
|
+
this.fireEvent("subSectionPreload", {
|
|
1121
|
+
subSection: subSection
|
|
1122
|
+
});
|
|
1123
|
+
}, this);
|
|
1124
|
+
}
|
|
1125
|
+
}.bind(this));
|
|
1125
1126
|
};
|
|
1126
1127
|
|
|
1127
1128
|
/**
|
|
@@ -1242,6 +1243,14 @@ sap.ui.define([
|
|
|
1242
1243
|
|
|
1243
1244
|
// Attach expand button event
|
|
1244
1245
|
this._handleExpandButtonPressEventLifeCycle(true);
|
|
1246
|
+
|
|
1247
|
+
if (!this._initialABButtonsColorUpdateDone) {
|
|
1248
|
+
this.getSections().forEach((section) => {
|
|
1249
|
+
var sSectionId = section.getId();
|
|
1250
|
+
this._updateAnchorBarButtonColor(sSectionId);
|
|
1251
|
+
});
|
|
1252
|
+
this._initialABButtonsColorUpdateDone = true;
|
|
1253
|
+
}
|
|
1245
1254
|
};
|
|
1246
1255
|
|
|
1247
1256
|
ObjectPageLayout.prototype._onAfterRenderingDomReady = function () {
|
|
@@ -1568,6 +1577,32 @@ sap.ui.define([
|
|
|
1568
1577
|
}
|
|
1569
1578
|
};
|
|
1570
1579
|
|
|
1580
|
+
ObjectPageLayout.prototype._updateAnchorBarButtonColor = function(sSectionId) {
|
|
1581
|
+
if (!this.getDomRef()) {
|
|
1582
|
+
return;
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
this.оАnchorbar = this._oABHelper._getAnchorBar();
|
|
1586
|
+
this.оАnchorbarButtons = this.оАnchorbar.getAggregation("content");
|
|
1587
|
+
this.oOPSections = this.getSections();
|
|
1588
|
+
|
|
1589
|
+
if (this.оАnchorbarButtons) {
|
|
1590
|
+
this.оАnchorbarButtons.forEach((btn, index) => {
|
|
1591
|
+
const sUniqueKey = btn.getCustomData().find((data) => data.getKey() === "sectionId").getValue();
|
|
1592
|
+
if (sUniqueKey === sSectionId) {
|
|
1593
|
+
const sNewStyleClass = "sapUxAPAnchorBarButtonColor" + this.oOPSections[index].getProperty("anchorBarButtonColor");
|
|
1594
|
+
// Remove the old style class and add the new one
|
|
1595
|
+
btn.aCustomStyleClasses.forEach((sStyleClass) => {
|
|
1596
|
+
if (sStyleClass.startsWith("sapUxAPAnchorBarButtonColor")) {
|
|
1597
|
+
btn.removeStyleClass(sStyleClass);
|
|
1598
|
+
}
|
|
1599
|
+
});
|
|
1600
|
+
btn.addStyleClass(sNewStyleClass);
|
|
1601
|
+
}
|
|
1602
|
+
});
|
|
1603
|
+
}
|
|
1604
|
+
};
|
|
1605
|
+
|
|
1571
1606
|
/**
|
|
1572
1607
|
* if our container has not set a height, we need to enforce it or nothing will get displayed
|
|
1573
1608
|
* the reason is the objectPageLayout has 2 containers with position:absolute, height:100%
|
|
@@ -2368,6 +2403,7 @@ sap.ui.define([
|
|
|
2368
2403
|
|
|
2369
2404
|
if (!this.getEnableLazyLoading() && this.getUseIconTabBar()) {
|
|
2370
2405
|
aToLoad = (oTargetSection instanceof ObjectPageSection) ? oTargetSection : oTargetSection.getParent();
|
|
2406
|
+
|
|
2371
2407
|
this._connectModelsForSections([aToLoad]);
|
|
2372
2408
|
}
|
|
2373
2409
|
|
|
@@ -2379,21 +2415,21 @@ sap.ui.define([
|
|
|
2379
2415
|
if (Device.system.desktop) {
|
|
2380
2416
|
//on desktop we delay the call to have the preload done during the scrolling animation
|
|
2381
2417
|
setTimeout(function () {
|
|
2382
|
-
this.
|
|
2383
|
-
|
|
2384
|
-
this._fireSubSectionEnteredViewPortEvent(aToLoad);
|
|
2418
|
+
this._doConnectModelsForSections(aToLoad);
|
|
2385
2419
|
}.bind(this), 50);
|
|
2386
2420
|
} else {
|
|
2387
2421
|
//on device, do the preload first then scroll.
|
|
2388
2422
|
//doing anything during the scrolling animation may
|
|
2389
2423
|
//trouble animation and lazy loading on slow devices.
|
|
2390
|
-
this.
|
|
2391
|
-
|
|
2392
|
-
this._fireSubSectionEnteredViewPortEvent(aToLoad);
|
|
2424
|
+
this._doConnectModelsForSections(aToLoad);
|
|
2393
2425
|
}
|
|
2394
2426
|
}
|
|
2395
2427
|
};
|
|
2396
2428
|
|
|
2429
|
+
ObjectPageLayout.prototype._doConnectModelsForSections = function (aToLoad) {
|
|
2430
|
+
this._connectModelsForSections(aToLoad).then(() => this._fireSubSectionEnteredViewPortEvent(aToLoad));
|
|
2431
|
+
};
|
|
2432
|
+
|
|
2397
2433
|
ObjectPageLayout.prototype._fireSubSectionEnteredViewPortEvent = function (aToLoad) {
|
|
2398
2434
|
aToLoad.forEach(function (oSubSection) {
|
|
2399
2435
|
this.fireEvent("subSectionEnteredViewPort", {
|
|
@@ -3254,6 +3290,10 @@ sap.ui.define([
|
|
|
3254
3290
|
ObjectPageLayout.prototype._onMediaRangeChange = function () {
|
|
3255
3291
|
var iCurrentWidth = this._getMediaContainerWidth();
|
|
3256
3292
|
|
|
3293
|
+
if (!iCurrentWidth) {
|
|
3294
|
+
return;
|
|
3295
|
+
}
|
|
3296
|
+
|
|
3257
3297
|
if (this._hasDynamicTitle()) {
|
|
3258
3298
|
this._updateMedia(iCurrentWidth, ObjectPageLayout.DYNAMIC_HEADERS_MEDIA); // Update media classes when ObjectPageDynamicHeaderTitle is used.
|
|
3259
3299
|
}
|
|
@@ -4343,10 +4383,14 @@ sap.ui.define([
|
|
|
4343
4383
|
};
|
|
4344
4384
|
|
|
4345
4385
|
ObjectPageLayout.prototype._connectModelsForSections = function (aSections) {
|
|
4386
|
+
var pAll = [];
|
|
4387
|
+
|
|
4346
4388
|
aSections = aSections || [];
|
|
4347
4389
|
aSections.forEach(function (oSection) {
|
|
4348
|
-
oSection.
|
|
4390
|
+
pAll.push(oSection.connectToModelsAsync());
|
|
4349
4391
|
});
|
|
4392
|
+
|
|
4393
|
+
return Promise.all(pAll);
|
|
4350
4394
|
};
|
|
4351
4395
|
|
|
4352
4396
|
ObjectPageLayout.prototype._getHeightRelatedParameters = function () {
|
|
@@ -8,7 +8,6 @@ sap.ui.define([
|
|
|
8
8
|
"sap/ui/core/Element",
|
|
9
9
|
"sap/ui/thirdparty/jquery",
|
|
10
10
|
"sap/ui/base/Object",
|
|
11
|
-
"sap/ui/core/Core",
|
|
12
11
|
"sap/ui/core/CustomData",
|
|
13
12
|
"sap/ui/base/ManagedObjectObserver",
|
|
14
13
|
"./AnchorBar",
|
|
@@ -18,7 +17,7 @@ sap.ui.define([
|
|
|
18
17
|
"sap/m/MenuItem",
|
|
19
18
|
"sap/ui/core/IconPool",
|
|
20
19
|
"sap/ui/core/InvisibleText"
|
|
21
|
-
], function(Element, jQuery, BaseObject,
|
|
20
|
+
], function(Element, jQuery, BaseObject, CustomData, ManagedObjectObserver, AnchorBar, Button, MenuButton, Menu, MenuItem, IconPool, InvisibleText) {
|
|
22
21
|
"use strict";
|
|
23
22
|
|
|
24
23
|
var ABHelper = BaseObject.extend("sap.uxap._helpers.AB", {
|
|
@@ -17,7 +17,8 @@ sap.ui.define([
|
|
|
17
17
|
"./ObjectPageSubSection",
|
|
18
18
|
"./library",
|
|
19
19
|
"sap/m/library",
|
|
20
|
-
"./ObjectPageSectionRenderer"
|
|
20
|
+
"./ObjectPageSectionRenderer",
|
|
21
|
+
"sap/ui/core/library"
|
|
21
22
|
], function(
|
|
22
23
|
ObjectPageSectionBase,
|
|
23
24
|
Device,
|
|
@@ -30,13 +31,17 @@ sap.ui.define([
|
|
|
30
31
|
ObjectPageSubSection,
|
|
31
32
|
library,
|
|
32
33
|
mobileLibrary,
|
|
33
|
-
ObjectPageSectionRenderer
|
|
34
|
-
|
|
34
|
+
ObjectPageSectionRenderer,
|
|
35
|
+
coreLibrary
|
|
36
|
+
) {
|
|
35
37
|
"use strict";
|
|
36
38
|
|
|
37
39
|
// shortcut for sap.m.ButtonType
|
|
38
40
|
var ButtonType = mobileLibrary.ButtonType;
|
|
39
41
|
|
|
42
|
+
// shortcut for sap.ui.core.IconColor
|
|
43
|
+
var IconColor = coreLibrary.IconColor;
|
|
44
|
+
|
|
40
45
|
/**
|
|
41
46
|
* Constructor for a new <code>ObjectPageSection</code>.
|
|
42
47
|
*
|
|
@@ -76,7 +81,15 @@ sap.ui.define([
|
|
|
76
81
|
/**
|
|
77
82
|
* Determines whether the Section title wraps on multiple lines, when the available space is not enough.
|
|
78
83
|
*/
|
|
79
|
-
wrapTitle: {type: "boolean", group: "Appearance", defaultValue: false}
|
|
84
|
+
wrapTitle: {type: "boolean", group: "Appearance", defaultValue: false},
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Specifies the text color of each button inside the AnchorBar.
|
|
88
|
+
*
|
|
89
|
+
* The color can be chosen from the icon colors (https://ui5.sap.com/#/api/sap.ui.core.IconColor%23overview).
|
|
90
|
+
* Possible semantic colors are: Neutral, Positive, Critical, Negative.
|
|
91
|
+
*/
|
|
92
|
+
anchorBarButtonColor : {type : "sap.ui.core.IconColor", group : "Appearance", defaultValue : IconColor.Default}
|
|
80
93
|
},
|
|
81
94
|
defaultAggregation: "subSections",
|
|
82
95
|
aggregations: {
|
|
@@ -243,12 +256,23 @@ sap.ui.define([
|
|
|
243
256
|
return library.Importance.Low;
|
|
244
257
|
};
|
|
245
258
|
|
|
259
|
+
/**@deprecated */
|
|
246
260
|
ObjectPageSection.prototype.connectToModels = function () {
|
|
247
261
|
this.getSubSections().forEach(function (oSubSection) {
|
|
248
262
|
oSubSection.connectToModels();
|
|
249
263
|
});
|
|
250
264
|
};
|
|
251
265
|
|
|
266
|
+
ObjectPageSection.prototype.connectToModelsAsync = function () {
|
|
267
|
+
var pAll = [];
|
|
268
|
+
|
|
269
|
+
this.getSubSections().forEach(function (oSubSection) {
|
|
270
|
+
pAll.push(oSubSection.connectToModelsAsync());
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
return Promise.all(pAll);
|
|
274
|
+
};
|
|
275
|
+
|
|
252
276
|
ObjectPageSection.prototype._allowPropagationToLoadedViews = function (bAllow) {
|
|
253
277
|
this.getSubSections().forEach(function (oSubSection) {
|
|
254
278
|
oSubSection._allowPropagationToLoadedViews(bAllow);
|
|
@@ -282,6 +306,21 @@ sap.ui.define([
|
|
|
282
306
|
return this;
|
|
283
307
|
};
|
|
284
308
|
|
|
309
|
+
ObjectPageSection.prototype.setAnchorBarButtonColor = function(value) {
|
|
310
|
+
var sSectionId = this.getId(),
|
|
311
|
+
oParent = this.getParent();
|
|
312
|
+
|
|
313
|
+
if (value !== this.getProperty("anchorBarButtonColor")) {
|
|
314
|
+
this.setProperty("anchorBarButtonColor", value, true);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
if (oParent && oParent.getDomRef() && oParent._updateAnchorBarButtonColor) {
|
|
318
|
+
oParent._updateAnchorBarButtonColor(sSectionId);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
return this;
|
|
322
|
+
};
|
|
323
|
+
|
|
285
324
|
/**
|
|
286
325
|
* Determines the minimal required number of columns that a child item
|
|
287
326
|
* should take, based on the child content and own colspan
|
|
@@ -216,7 +216,8 @@ sap.ui.define([
|
|
|
216
216
|
*/
|
|
217
217
|
ObjectPageSectionBase.prototype._resetLayoutData = function (aGridItems) {
|
|
218
218
|
aGridItems.forEach(function (oItem) {
|
|
219
|
-
|
|
219
|
+
// There might be cases when the content of the SubSection is not yet unstashed (created) and it is still the ObjectPageLazyLoader
|
|
220
|
+
if (oItem?.getLayoutData?.()) {
|
|
220
221
|
oItem.destroyLayoutData();
|
|
221
222
|
}
|
|
222
223
|
}, this);
|
|
@@ -254,7 +255,13 @@ sap.ui.define([
|
|
|
254
255
|
//step 1: the visible blocks should be separated
|
|
255
256
|
// as only they should take space inside the grid
|
|
256
257
|
aGridItems.forEach(function(oItem) {
|
|
257
|
-
if
|
|
258
|
+
// Skip if there is undefined
|
|
259
|
+
if (!oItem) {
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// Check if it's ObjectPageLazyLoader
|
|
264
|
+
if (oItem.getVisible?.()) {
|
|
258
265
|
aVisibleItems.push(oItem);
|
|
259
266
|
} else {
|
|
260
267
|
aInvisibleItems.push(oItem);
|
|
@@ -305,8 +312,8 @@ sap.ui.define([
|
|
|
305
312
|
}, this);
|
|
306
313
|
|
|
307
314
|
aInvisibleItems.forEach(function(oItem) {
|
|
308
|
-
// ensure invisible blocks do not take space at all
|
|
309
|
-
oItem.setLayoutData(new GridData({
|
|
315
|
+
// ensure invisible blocks do not take space at all. Don't setLayoutData if it's ObjectPageLazyLoader
|
|
316
|
+
oItem.setLayoutData?.(new GridData({
|
|
310
317
|
visibleS: false,
|
|
311
318
|
visibleM: false,
|
|
312
319
|
visibleL: false,
|
|
@@ -75,6 +75,9 @@ sap.ui.define([
|
|
|
75
75
|
* situations where the sub-section contains a control that has “100%” height, for example,
|
|
76
76
|
* <code>sap.ui.table.Table</code> with <code>visibleRowCountMode</code> set to <code>Auto</code>.
|
|
77
77
|
*
|
|
78
|
+
* As of version 1.122, applications can set transparent background to subsections
|
|
79
|
+
* by adding the <code>sapUxAPObjectPageSubSectionTransparentBackground</code> class to the subsection.
|
|
80
|
+
*
|
|
78
81
|
* <b>Note:</b> This control is intended to be used only as part of the <code>ObjectPageLayout</code>.
|
|
79
82
|
*
|
|
80
83
|
* @extends sap.uxap.ObjectPageSectionBase
|
|
@@ -214,6 +217,8 @@ sap.ui.define([
|
|
|
214
217
|
ObjectPageSubSection.prototype.init = function () {
|
|
215
218
|
ObjectPageSectionBase.prototype.init.call(this);
|
|
216
219
|
this._aStashedControls = [];
|
|
220
|
+
this._aUnStashedControls = [];
|
|
221
|
+
this._bUnstashed = false;
|
|
217
222
|
//proxy public aggregations
|
|
218
223
|
this._bRenderedFirstTime = false;
|
|
219
224
|
this._aAggregationProxy = {blocks: [], moreBlocks: []};
|
|
@@ -508,6 +513,7 @@ sap.ui.define([
|
|
|
508
513
|
};
|
|
509
514
|
});
|
|
510
515
|
|
|
516
|
+
/**@deprecated */
|
|
511
517
|
ObjectPageSubSection.prototype._unStashControls = function () {
|
|
512
518
|
var oUnstashedControl;
|
|
513
519
|
this._aStashedControls.forEach(function (oControlHandle) {
|
|
@@ -518,6 +524,28 @@ sap.ui.define([
|
|
|
518
524
|
this._aStashedControls = [];
|
|
519
525
|
};
|
|
520
526
|
|
|
527
|
+
ObjectPageSubSection.prototype._unStashControlsAsync = function () {
|
|
528
|
+
var oUnstashedControl;
|
|
529
|
+
|
|
530
|
+
if (!this._bUnstashed) {
|
|
531
|
+
this._aStashedControls.forEach(function (oControlHandle) {
|
|
532
|
+
this._aUnStashedControls.push(oControlHandle.control.unstash(true).then(function() {
|
|
533
|
+
oUnstashedControl = Element.getElementById(oControlHandle.control.getId());
|
|
534
|
+
this.addAggregation(oControlHandle.aggregationName, oUnstashedControl, true);
|
|
535
|
+
}.bind(this)));
|
|
536
|
+
}.bind(this));
|
|
537
|
+
|
|
538
|
+
this._bUnstashed = true;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
return Promise.all(this._aUnStashedControls).then(() => {
|
|
542
|
+
this._bUnstashed = false;
|
|
543
|
+
this._aUnStashedControls = [];
|
|
544
|
+
this._aStashedControls = [];
|
|
545
|
+
});
|
|
546
|
+
};
|
|
547
|
+
|
|
548
|
+
/**@deprecated */
|
|
521
549
|
ObjectPageSubSection.prototype.connectToModels = function () {
|
|
522
550
|
var aBlocks = this.getBlocks() || [],
|
|
523
551
|
aMoreBlocks = this.getMoreBlocks() || [],
|
|
@@ -546,6 +574,34 @@ sap.ui.define([
|
|
|
546
574
|
}
|
|
547
575
|
};
|
|
548
576
|
|
|
577
|
+
ObjectPageSubSection.prototype.connectToModelsAsync = function () {
|
|
578
|
+
var aBlocks = this.getBlocks() || [],
|
|
579
|
+
aMoreBlocks = this.getMoreBlocks() || [],
|
|
580
|
+
sCurrentMode = this.getMode();
|
|
581
|
+
|
|
582
|
+
return this._unStashControlsAsync().then(function() {
|
|
583
|
+
aBlocks.forEach(function (oBlock) {
|
|
584
|
+
if (oBlock instanceof BlockBase) {
|
|
585
|
+
if (!oBlock.getMode()) {
|
|
586
|
+
oBlock.setMode(sCurrentMode);
|
|
587
|
+
}
|
|
588
|
+
oBlock.connectToModels();
|
|
589
|
+
}
|
|
590
|
+
});
|
|
591
|
+
|
|
592
|
+
if (aMoreBlocks.length > 0 && sCurrentMode === ObjectPageSubSectionMode.Expanded) {
|
|
593
|
+
aMoreBlocks.forEach(function (oMoreBlock) {
|
|
594
|
+
if (oMoreBlock instanceof BlockBase) {
|
|
595
|
+
if (!oMoreBlock.getMode()) {
|
|
596
|
+
oMoreBlock.setMode(sCurrentMode);
|
|
597
|
+
}
|
|
598
|
+
oMoreBlock.connectToModels();
|
|
599
|
+
}
|
|
600
|
+
});
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
};
|
|
604
|
+
|
|
549
605
|
ObjectPageSubSection.prototype._allowPropagationToLoadedViews = function (bAllow) {
|
|
550
606
|
var aBlocks = this.getBlocks() || [],
|
|
551
607
|
aMoreBlocks = this.getMoreBlocks() || [];
|
|
@@ -1231,6 +1287,11 @@ sap.ui.define([
|
|
|
1231
1287
|
var iVisibleBlocks = this._aStashedControls.length;
|
|
1232
1288
|
|
|
1233
1289
|
(this.getBlocks() || []).forEach(function (oBlock) {
|
|
1290
|
+
// Skip if it's undefined
|
|
1291
|
+
if (!oBlock) {
|
|
1292
|
+
return;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1234
1295
|
if (oBlock.getVisible && !oBlock.getVisible()) {
|
|
1235
1296
|
return true;
|
|
1236
1297
|
}
|
package/src/sap/uxap/library.js
CHANGED
|
@@ -8,12 +8,11 @@
|
|
|
8
8
|
* Initialization Code and shared classes of library sap.uxap.
|
|
9
9
|
*/
|
|
10
10
|
sap.ui.define([
|
|
11
|
-
"sap/ui/core/Core",
|
|
12
|
-
"sap/ui/base/DataType",
|
|
13
11
|
"sap/ui/Device",
|
|
12
|
+
"sap/ui/base/DataType",
|
|
13
|
+
"sap/ui/base/Object",
|
|
14
14
|
"sap/ui/core/Lib",
|
|
15
15
|
"sap/ui/thirdparty/jquery",
|
|
16
|
-
"sap/ui/base/Object",
|
|
17
16
|
// library dependency
|
|
18
17
|
"sap/ui/core/library",
|
|
19
18
|
// library dependency
|
|
@@ -22,7 +21,7 @@ sap.ui.define([
|
|
|
22
21
|
"sap/m/library",
|
|
23
22
|
// library dependency
|
|
24
23
|
"sap/ui/layout/library"
|
|
25
|
-
], function(
|
|
24
|
+
], function(Device, DataType, BaseObject, Library, jQuery) {
|
|
26
25
|
"use strict";
|
|
27
26
|
|
|
28
27
|
/**
|
|
@@ -31,12 +30,13 @@ sap.ui.define([
|
|
|
31
30
|
* @namespace
|
|
32
31
|
* @alias sap.uxap
|
|
33
32
|
* @author SAP SE
|
|
34
|
-
* @version 1.
|
|
33
|
+
* @version 1.122.0
|
|
35
34
|
* @since 1.36
|
|
36
35
|
* @public
|
|
37
36
|
*/
|
|
38
37
|
var thisLib = Library.init({
|
|
39
38
|
name: "sap.uxap",
|
|
39
|
+
apiVersion: 2,
|
|
40
40
|
dependencies: ["sap.ui.core", "sap.f", "sap.m", "sap.ui.layout"],
|
|
41
41
|
designtime: "sap/uxap/designtime/library.designtime",
|
|
42
42
|
types: [
|
|
@@ -74,7 +74,7 @@ sap.ui.define([
|
|
|
74
74
|
"sap.uxap.ObjectPageHeaderLayoutData",
|
|
75
75
|
"sap.uxap.ObjectPageLazyLoader"
|
|
76
76
|
],
|
|
77
|
-
version: "1.
|
|
77
|
+
version: "1.122.0",
|
|
78
78
|
extensions: {
|
|
79
79
|
flChangeHandlers: {
|
|
80
80
|
"sap.uxap.ObjectPageHeader": "sap/uxap/flexibility/ObjectPageHeader",
|
|
@@ -149,6 +149,8 @@ sap.ui.define([
|
|
|
149
149
|
None: "None"
|
|
150
150
|
};
|
|
151
151
|
|
|
152
|
+
DataType.registerEnum("sap.uxap.BlockBaseFormAdjustment", thisLib.BlockBaseFormAdjustment);
|
|
153
|
+
|
|
152
154
|
/**
|
|
153
155
|
* Used by the <code>sap.uxap.component.Component</code> how to initialize the <code>ObjectPageLayout</code> sections and subsections.
|
|
154
156
|
*
|
|
@@ -171,6 +173,9 @@ sap.ui.define([
|
|
|
171
173
|
JsonModel: "JsonModel"
|
|
172
174
|
|
|
173
175
|
};
|
|
176
|
+
|
|
177
|
+
DataType.registerEnum("sap.uxap.ObjectPageConfigurationMode", thisLib.ObjectPageConfigurationMode);
|
|
178
|
+
|
|
174
179
|
/**
|
|
175
180
|
* Used by the <code>ObjectPageHeader</code> control to define which design to use.
|
|
176
181
|
*
|
|
@@ -194,6 +199,9 @@ sap.ui.define([
|
|
|
194
199
|
Dark: "Dark"
|
|
195
200
|
|
|
196
201
|
};
|
|
202
|
+
|
|
203
|
+
DataType.registerEnum("sap.uxap.ObjectPageHeaderDesign", thisLib.ObjectPageHeaderDesign);
|
|
204
|
+
|
|
197
205
|
/**
|
|
198
206
|
* Used by the <code>ObjectPageHeader</code> control to define which shape to use for the image.
|
|
199
207
|
*
|
|
@@ -216,6 +224,9 @@ sap.ui.define([
|
|
|
216
224
|
Square: "Square"
|
|
217
225
|
|
|
218
226
|
};
|
|
227
|
+
|
|
228
|
+
DataType.registerEnum("sap.uxap.ObjectPageHeaderPictureShape", thisLib.ObjectPageHeaderPictureShape);
|
|
229
|
+
|
|
219
230
|
/**
|
|
220
231
|
* Used by the <code>ObjectPagSubSection</code> control to define which layout to apply.
|
|
221
232
|
*
|
|
@@ -238,6 +249,9 @@ sap.ui.define([
|
|
|
238
249
|
TitleOnLeft: "TitleOnLeft"
|
|
239
250
|
|
|
240
251
|
};
|
|
252
|
+
|
|
253
|
+
DataType.registerEnum("sap.uxap.ObjectPageSubSectionLayout", thisLib.ObjectPageSubSectionLayout);
|
|
254
|
+
|
|
241
255
|
/**
|
|
242
256
|
* Used by the <code>ObjectPageLayout</code> control to define which layout to use (either Collapsed or Expanded).
|
|
243
257
|
*
|
|
@@ -261,6 +275,8 @@ sap.ui.define([
|
|
|
261
275
|
|
|
262
276
|
};
|
|
263
277
|
|
|
278
|
+
DataType.registerEnum("sap.uxap.ObjectPageSubSectionMode", thisLib.ObjectPageSubSectionMode);
|
|
279
|
+
|
|
264
280
|
/**
|
|
265
281
|
* Used by the <code>ObjectSectionBase</code> control to define the importance of the content contained in it.
|
|
266
282
|
*
|
|
@@ -290,6 +306,8 @@ sap.ui.define([
|
|
|
290
306
|
High: "High"
|
|
291
307
|
};
|
|
292
308
|
|
|
309
|
+
DataType.registerEnum("sap.uxap.Importance", thisLib.Importance);
|
|
310
|
+
|
|
293
311
|
/**
|
|
294
312
|
*
|
|
295
313
|
* @type {{getClosestOPL: Function}}
|
|
@@ -356,4 +356,29 @@ html[data-sap-ui-browser^="ed"] {
|
|
|
356
356
|
.sapUxAPAnchorBarButton.sapMMenuBtn .sapMSBInner .sapMBtnFocusDiv {
|
|
357
357
|
border: 0 none;
|
|
358
358
|
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// Styles needed for the anchorBarButtonColor property
|
|
362
|
+
.sapMIBar.sapUxAPAnchorBar .sapMBarChild.sapUxAPAnchorBarButton.sapUxAPAnchorBarButtonColorPositive:hover:not(.sapMBtnDisabled) .sapMBtnInner .sapMBtnContent > bdi,
|
|
363
|
+
.sapMIBar.sapUxAPAnchorBar .sapMBarChild.sapUxAPAnchorBarButton.sapUxAPAnchorBarButtonColorPositive .sapMBtnInner .sapMBtnContent,
|
|
364
|
+
.sapUiSizeCompact .sapMIBar.sapUxAPAnchorBar .sapMBarChild.sapUxAPAnchorBarButton.sapUxAPAnchorBarButtonColorPositive .sapMBtnInner .sapMBtnContent {
|
|
365
|
+
color: @sapUiPositiveText;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.sapMIBar.sapUxAPAnchorBar .sapMBarChild.sapUxAPAnchorBarButton.sapUxAPAnchorBarButtonColorNegative:hover:not(.sapMBtnDisabled) .sapMBtnInner .sapMBtnContent > bdi,
|
|
369
|
+
.sapMIBar.sapUxAPAnchorBar .sapMBarChild.sapUxAPAnchorBarButton.sapUxAPAnchorBarButtonColorNegative .sapMBtnInner .sapMBtnContent,
|
|
370
|
+
.sapUiSizeCompact .sapMIBar.sapUxAPAnchorBar .sapMBarChild.sapUxAPAnchorBarButton.sapUxAPAnchorBarButtonColorNegative .sapMBtnInner .sapMBtnContent {
|
|
371
|
+
color: @sapUiNegativeText;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.sapMIBar.sapUxAPAnchorBar .sapMBarChild.sapUxAPAnchorBarButton.sapUxAPAnchorBarButtonColorCritical:hover:not(.sapMBtnDisabled) .sapMBtnInner .sapMBtnContent > bdi,
|
|
375
|
+
.sapMIBar.sapUxAPAnchorBar .sapMBarChild.sapUxAPAnchorBarButton.sapUxAPAnchorBarButtonColorCritical .sapMBtnInner .sapMBtnContent,
|
|
376
|
+
.sapUiSizeCompact .sapMIBar.sapUxAPAnchorBar .sapMBarChild.sapUxAPAnchorBarButton.sapUxAPAnchorBarButtonColorCritical .sapMBtnInner .sapMBtnContent {
|
|
377
|
+
color: @sapUiCriticalText;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.sapMIBar.sapUxAPAnchorBar .sapMBarChild.sapUxAPAnchorBarButton.sapUxAPAnchorBarButtonColorNeutral:hover:not(.sapMBtnDisabled) .sapMBtnInner .sapMBtnContent > bdi,
|
|
381
|
+
.sapMIBar.sapUxAPAnchorBar .sapMBarChild.sapUxAPAnchorBarButton.sapUxAPAnchorBarButtonColorNeutral .sapMBtnInner .sapMBtnContent,
|
|
382
|
+
.sapUiSizeCompact .sapMIBar.sapUxAPAnchorBar .sapMBarChild.sapUxAPAnchorBarButton.sapUxAPAnchorBarButtonColorNeutral .sapMBtnInner .sapMBtnContent {
|
|
383
|
+
color: @sapUiNeutralText;
|
|
359
384
|
}
|
|
@@ -49,6 +49,11 @@
|
|
|
49
49
|
display: block;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
/* public sapUxAPObjectPageSubSectionTransparentBackground class that sets background transparency */
|
|
53
|
+
.sapUxAPObjectPageSection .sapUxAPObjectPageSectionContainer .sapUxAPObjectPageSubSection.sapUxAPObjectPageSubSectionTransparentBackground .sapUxAPBlockContainer {
|
|
54
|
+
background: transparent;
|
|
55
|
+
}
|
|
56
|
+
|
|
52
57
|
/* phone display */
|
|
53
58
|
.sapUxAPObjectPageLayout-Std-Phone .sapUxAPObjectPageSubSectionHeader,
|
|
54
59
|
html .sapUiContainer-Narrow .sapUxAPObjectPageSubSectionHeader {
|