@openui5/sap.uxap 1.136.0 → 1.136.1
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 +5 -5
- package/src/sap/uxap/.library +1 -1
- package/src/sap/uxap/BlockBase.js +1 -0
- package/src/sap/uxap/BlockBaseMetadata.js +1 -1
- 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 +11 -4
- package/src/sap/uxap/ObjectPageLazyLoader.js +1 -1
- package/src/sap/uxap/ObjectPageSection.js +0 -21
- package/src/sap/uxap/ObjectPageSectionBase.js +21 -0
- package/src/sap/uxap/ObjectPageSubSection.js +35 -17
- package/src/sap/uxap/ObjectPageSubSectionRenderer.js +1 -1
- package/src/sap/uxap/ThrottledTaskHelper.js +1 -1
- 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 +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.uxap",
|
|
3
|
-
"version": "1.136.
|
|
3
|
+
"version": "1.136.1",
|
|
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.136.
|
|
18
|
-
"@openui5/sap.m": "1.136.
|
|
19
|
-
"@openui5/sap.ui.core": "1.136.
|
|
20
|
-
"@openui5/sap.ui.layout": "1.136.
|
|
17
|
+
"@openui5/sap.f": "1.136.1",
|
|
18
|
+
"@openui5/sap.m": "1.136.1",
|
|
19
|
+
"@openui5/sap.ui.core": "1.136.1",
|
|
20
|
+
"@openui5/sap.ui.layout": "1.136.1"
|
|
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.136.
|
|
6
|
+
<version>1.136.1</version>
|
|
7
7
|
<copyright>OpenUI5
|
|
8
8
|
* (c) Copyright 2025 SAP SE or an SAP affiliate company.
|
|
9
9
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
@@ -1784,6 +1784,9 @@ sap.ui.define([
|
|
|
1784
1784
|
});
|
|
1785
1785
|
}
|
|
1786
1786
|
|
|
1787
|
+
var bHasPromotedSubSection = this.getSubSectionLayout() === ObjectPageSubSectionLayout.TitleOnTop &&
|
|
1788
|
+
iVisibleSubSections === 1 && oFirstVisibleSubSection.getTitle().trim() !== "";
|
|
1789
|
+
|
|
1787
1790
|
//rule noVisibleSubSection: If a section has no content (or only empty subsections) the section will be hidden.
|
|
1788
1791
|
if (iVisibleSubSections == 0) {
|
|
1789
1792
|
oSection._setInternalVisible(false, bInvalidate);
|
|
@@ -1796,9 +1799,6 @@ sap.ui.define([
|
|
|
1796
1799
|
oFirstVisibleSection.addStyleClass("sapUxAPObjectPageSectionFirstVisible");
|
|
1797
1800
|
}
|
|
1798
1801
|
|
|
1799
|
-
var bHasPromotedSubSection = this.getSubSectionLayout() === ObjectPageSubSectionLayout.TitleOnTop &&
|
|
1800
|
-
iVisibleSubSections === 1 && oFirstVisibleSubSection.getTitle().trim() !== "";
|
|
1801
|
-
|
|
1802
1802
|
//rule TitleOnTop.sectionGetSingleSubSectionTitle: If a section as only 1 subsection and the subsection title is not empty, the SubSection takes the Section's title level with titleOnTop layout only
|
|
1803
1803
|
if (bHasPromotedSubSection) {
|
|
1804
1804
|
oFirstVisibleSubSection._setIsPromoted(true, bInvalidate);
|
|
@@ -1814,6 +1814,8 @@ sap.ui.define([
|
|
|
1814
1814
|
|
|
1815
1815
|
if (bUseIconTabBar) {
|
|
1816
1816
|
oTitleVisibilityInfo[oSection.getId()] = false;
|
|
1817
|
+
// hide the title of the promoted subsection in iconTabBar mode only
|
|
1818
|
+
bHasPromotedSubSection && oFirstVisibleSubSection && (oTitleVisibilityInfo[oFirstVisibleSubSection.getId()] = false);
|
|
1817
1819
|
oSection.addStyleClass("sapUxAPObjectPageSectionFirstVisible");
|
|
1818
1820
|
}
|
|
1819
1821
|
}, this);
|
|
@@ -1824,7 +1826,12 @@ sap.ui.define([
|
|
|
1824
1826
|
Log.info("ObjectPageLayout :: notEnoughVisibleSection UX rule matched", "anchorBar forced to hidden");
|
|
1825
1827
|
//rule firstSectionTitleHidden: the first section title is never visible if there is an anchorBar
|
|
1826
1828
|
if (bUseIconTabBar && oFirstVisibleSection) {
|
|
1827
|
-
|
|
1829
|
+
if (oFirstVisibleSection._hasPromotedSubSection() && oFirstVisibleSubSection) {
|
|
1830
|
+
oTitleVisibilityInfo[oFirstVisibleSubSection.getId()] = true; // SubSection has title - show SubSection title
|
|
1831
|
+
} else {
|
|
1832
|
+
oTitleVisibilityInfo[oFirstVisibleSection.getId()] = true; // SubSection does not have title - show Section title
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1828
1835
|
}
|
|
1829
1836
|
}
|
|
1830
1837
|
|
|
@@ -162,7 +162,6 @@ sap.ui.define([
|
|
|
162
162
|
|
|
163
163
|
ObjectPageSection.prototype.init = function () {
|
|
164
164
|
ObjectPageSectionBase.prototype.init.call(this);
|
|
165
|
-
this._bInternalTitleVisible = true;
|
|
166
165
|
this._sContainerSelector = ".sapUxAPObjectPageSectionContainer";
|
|
167
166
|
this._oGridContentObserver = new ManagedObjectObserver(this._onGridContentChange.bind(this));
|
|
168
167
|
this._sTitleStyle = TitleLevel.H4;
|
|
@@ -346,26 +345,6 @@ sap.ui.define([
|
|
|
346
345
|
}
|
|
347
346
|
};
|
|
348
347
|
|
|
349
|
-
/**
|
|
350
|
-
* set the internal visibility of the Section title. This is set by the ux rules (for example don't display a Section title in IconTabBar mode)
|
|
351
|
-
* @param {boolean} bValue
|
|
352
|
-
* @param {boolean} bInvalidate if set to true, the Section should be rerendered in order to be added or removed to the dom (similar to what a "real" internalVisibility property would trigger)
|
|
353
|
-
* @private
|
|
354
|
-
*/
|
|
355
|
-
ObjectPageSection.prototype._setInternalTitleVisible = function (bValue, bInvalidate) {
|
|
356
|
-
if (bValue != this._bInternalTitleVisible) {
|
|
357
|
-
this._bInternalTitleVisible = bValue;
|
|
358
|
-
this.setTitleVisible();
|
|
359
|
-
if (bInvalidate) {
|
|
360
|
-
this.invalidate();
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
};
|
|
364
|
-
|
|
365
|
-
ObjectPageSection.prototype._getInternalTitleVisible = function () {
|
|
366
|
-
return this._bInternalTitleVisible;
|
|
367
|
-
};
|
|
368
|
-
|
|
369
348
|
/**
|
|
370
349
|
* Determines if the <code>ObjectPageSection</code> title is visible.
|
|
371
350
|
* @private
|
|
@@ -139,6 +139,7 @@ sap.ui.define([
|
|
|
139
139
|
|
|
140
140
|
//handled for ux rules management
|
|
141
141
|
this._bInternalVisible = true;
|
|
142
|
+
this._bInternalTitleVisible = true;
|
|
142
143
|
this._sInternalTitleLevel = TitleLevel.Auto;
|
|
143
144
|
//hidden status
|
|
144
145
|
this._isHidden = false;
|
|
@@ -458,6 +459,26 @@ sap.ui.define([
|
|
|
458
459
|
}
|
|
459
460
|
};
|
|
460
461
|
|
|
462
|
+
/**
|
|
463
|
+
* set the internal visibility of the Section title. This is set by the ux rules (for example don't display a Section/SubSection title in IconTabBar mode)
|
|
464
|
+
* @param {boolean} bValue
|
|
465
|
+
* @param {boolean} bInvalidate if set to true, the Section should be rerendered in order to be added or removed to the dom (similar to what a "real" internalVisibility property would trigger)
|
|
466
|
+
* @private
|
|
467
|
+
*/
|
|
468
|
+
ObjectPageSectionBase.prototype._setInternalTitleVisible = function (bValue, bInvalidate) {
|
|
469
|
+
if (bValue != this._bInternalTitleVisible) {
|
|
470
|
+
this._bInternalTitleVisible = bValue;
|
|
471
|
+
this.setTitleVisible();
|
|
472
|
+
if (bInvalidate) {
|
|
473
|
+
this.invalidate();
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
};
|
|
477
|
+
|
|
478
|
+
ObjectPageSectionBase.prototype._getInternalTitleVisible = function () {
|
|
479
|
+
return this._bInternalTitleVisible;
|
|
480
|
+
};
|
|
481
|
+
|
|
461
482
|
ObjectPageSectionBase.prototype._getInternalVisible = function () {
|
|
462
483
|
return this._bInternalVisible;
|
|
463
484
|
};
|
|
@@ -11,6 +11,7 @@ sap.ui.define([
|
|
|
11
11
|
"sap/ui/core/library",
|
|
12
12
|
"sap/ui/thirdparty/jquery",
|
|
13
13
|
"sap/ui/core/ResizeHandler",
|
|
14
|
+
"sap/ui/core/IntervalTrigger",
|
|
14
15
|
"./ObjectPageSectionBase",
|
|
15
16
|
"./ObjectPageLazyLoader",
|
|
16
17
|
"./BlockBase",
|
|
@@ -35,6 +36,7 @@ sap.ui.define([
|
|
|
35
36
|
coreLibrary,
|
|
36
37
|
jQuery,
|
|
37
38
|
ResizeHandler,
|
|
39
|
+
IntervalTrigger,
|
|
38
40
|
ObjectPageSectionBase,
|
|
39
41
|
ObjectPageLazyLoader,
|
|
40
42
|
BlockBase,
|
|
@@ -272,8 +274,8 @@ sap.ui.define([
|
|
|
272
274
|
this._getTitleControl().addStyleClass("sapUxAPObjectPageSubSectionTitle");
|
|
273
275
|
|
|
274
276
|
var oActionsToolbar = this._getHeaderToolbar();
|
|
275
|
-
oActionsToolbar
|
|
276
|
-
oActionsToolbar
|
|
277
|
+
oActionsToolbar?.insertContent(this._getTitleControl(), 0);
|
|
278
|
+
oActionsToolbar?.insertContent(new ToolbarSpacer(), 1);
|
|
277
279
|
};
|
|
278
280
|
|
|
279
281
|
/**
|
|
@@ -337,7 +339,7 @@ sap.ui.define([
|
|
|
337
339
|
/* ========== ObjectPageSubSection actions aggregation methods ========== */
|
|
338
340
|
|
|
339
341
|
ObjectPageSubSection.prototype.addAction = function (oAction) {
|
|
340
|
-
this._getHeaderToolbar()
|
|
342
|
+
this._getHeaderToolbar()?.insertContent(oAction, ObjectPageSubSection.NUMBER_OF_ADDITIONAL_ACTIONS + this.getActions().length);
|
|
341
343
|
this._preProcessAction(oAction, "actions");
|
|
342
344
|
|
|
343
345
|
return this;
|
|
@@ -345,14 +347,14 @@ sap.ui.define([
|
|
|
345
347
|
|
|
346
348
|
ObjectPageSubSection.prototype.insertAction = function (oAction, iIndex) {
|
|
347
349
|
var iIndexToInsertAt = iIndex + ObjectPageSubSection.NUMBER_OF_ADDITIONAL_ACTIONS;
|
|
348
|
-
this._getHeaderToolbar()
|
|
350
|
+
this._getHeaderToolbar()?.insertContent(oAction, iIndexToInsertAt);
|
|
349
351
|
this._preProcessAction(oAction, "actions");
|
|
350
352
|
|
|
351
353
|
return this;
|
|
352
354
|
};
|
|
353
355
|
|
|
354
356
|
ObjectPageSubSection.prototype.removeAction = function (oAction) {
|
|
355
|
-
this._getHeaderToolbar()
|
|
357
|
+
this._getHeaderToolbar()?.removeContent(oAction);
|
|
356
358
|
this._postProcessAction(oAction);
|
|
357
359
|
|
|
358
360
|
return this.removeAggregation("actions", oAction);
|
|
@@ -363,7 +365,7 @@ sap.ui.define([
|
|
|
363
365
|
oActionsToRemove = this.getActions();
|
|
364
366
|
|
|
365
367
|
oActionsToRemove.forEach(function (oAction) {
|
|
366
|
-
oActionsToolbar
|
|
368
|
+
oActionsToolbar?.removeContent(oAction);
|
|
367
369
|
this._postProcessAction(oAction);
|
|
368
370
|
}, this);
|
|
369
371
|
|
|
@@ -371,7 +373,7 @@ sap.ui.define([
|
|
|
371
373
|
};
|
|
372
374
|
|
|
373
375
|
ObjectPageSubSection.prototype.destroyActions = function () {
|
|
374
|
-
this._getHeaderToolbar()
|
|
376
|
+
this._getHeaderToolbar()?.destroyContent();
|
|
375
377
|
this.getActions().forEach(function (oAction) {
|
|
376
378
|
this._postProcessAction(oAction);
|
|
377
379
|
}, this);
|
|
@@ -380,7 +382,7 @@ sap.ui.define([
|
|
|
380
382
|
};
|
|
381
383
|
|
|
382
384
|
ObjectPageSubSection.prototype.getActions = function () {
|
|
383
|
-
return this._getHeaderToolbar()
|
|
385
|
+
return this._getHeaderToolbar()?.getContent().slice(ObjectPageSubSection.NUMBER_OF_ADDITIONAL_ACTIONS) || [];
|
|
384
386
|
};
|
|
385
387
|
|
|
386
388
|
ObjectPageSubSection.prototype.indexOfAction = function (oAction) {
|
|
@@ -410,7 +412,7 @@ sap.ui.define([
|
|
|
410
412
|
ObjectPageSubSection.prototype._getHeaderToolbar = function () {
|
|
411
413
|
var sId = this.getId() + "-_headerToolbar";
|
|
412
414
|
|
|
413
|
-
if (!this.getAggregation("_headerToolbar")) {
|
|
415
|
+
if (!this.getAggregation("_headerToolbar") && !this.isDestroyed()) {
|
|
414
416
|
this.setAggregation("_headerToolbar", new OverflowToolbar({
|
|
415
417
|
id: sId,
|
|
416
418
|
style: ToolbarStyle.Clear,
|
|
@@ -477,7 +479,7 @@ sap.ui.define([
|
|
|
477
479
|
* @returns {boolean}
|
|
478
480
|
*/
|
|
479
481
|
ObjectPageSubSection.prototype._isTitleVisible = function () {
|
|
480
|
-
return this.getShowTitle() && this.getTitle().trim() !== "";
|
|
482
|
+
return this._getInternalTitleVisible() && this.getShowTitle() && this.getTitle().trim() !== "";
|
|
481
483
|
};
|
|
482
484
|
|
|
483
485
|
ObjectPageSubSection.prototype._getImportance = function () {
|
|
@@ -582,10 +584,20 @@ sap.ui.define([
|
|
|
582
584
|
oDom = this.getDomRef();
|
|
583
585
|
if (oDom) {
|
|
584
586
|
oDom.style.height = this._height;
|
|
585
|
-
this._adaptDomHeight();
|
|
587
|
+
this._executeAfterNextResizeHandlerChecks(this._adaptDomHeight.bind(this));
|
|
586
588
|
}
|
|
587
589
|
};
|
|
588
590
|
|
|
591
|
+
ObjectPageSubSection.prototype._executeAfterNextResizeHandlerChecks = function(fnFunction) {
|
|
592
|
+
function execute() {
|
|
593
|
+
window.requestAnimationFrame(fnFunction); // requestAnimationFrame required for performance, but mainly to be in sync with the table, because the table also calls requestAnimationFrame before resizing itself in its listener to the ResizeHandler
|
|
594
|
+
IntervalTrigger.removeListener(execute);
|
|
595
|
+
}
|
|
596
|
+
// listen for the same interval that triggers the ResizeHandler
|
|
597
|
+
// (ResizeHandler will be first, our callback will be second)
|
|
598
|
+
IntervalTrigger.addListener(execute);
|
|
599
|
+
};
|
|
600
|
+
|
|
589
601
|
ObjectPageSubSection.prototype._toggleContentResizeListener = function(bEnable) {
|
|
590
602
|
if (bEnable && !this._iResizeId) {
|
|
591
603
|
this._iResizeId = ResizeHandler.register(this._getContentWrapper(), this._adaptDomHeight.bind(this));
|
|
@@ -613,7 +625,10 @@ sap.ui.define([
|
|
|
613
625
|
return false;
|
|
614
626
|
}
|
|
615
627
|
|
|
616
|
-
|
|
628
|
+
if (this._getInternalTitleVisible()) {
|
|
629
|
+
return this.getId() + "-headerTitle";
|
|
630
|
+
}
|
|
631
|
+
return false;
|
|
617
632
|
};
|
|
618
633
|
|
|
619
634
|
/**
|
|
@@ -660,7 +675,7 @@ sap.ui.define([
|
|
|
660
675
|
bHasTitle;
|
|
661
676
|
|
|
662
677
|
if (sChangeName === "visible") { // change of the actions elements` visibility
|
|
663
|
-
bHasTitle = this.getTitle().trim() !== "";
|
|
678
|
+
bHasTitle = this._getInternalTitleVisible() && this.getTitle().trim() !== "";
|
|
664
679
|
if (!bHasTitle) {
|
|
665
680
|
this.$("header").toggleClass("sapUiHidden", !this._hasVisibleActions());
|
|
666
681
|
}
|
|
@@ -724,10 +739,13 @@ sap.ui.define([
|
|
|
724
739
|
|
|
725
740
|
if (!this._bUnstashed) {
|
|
726
741
|
this._aStashedControls.forEach(function (oControlHandle) {
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
742
|
+
var oUnstashResult = Promise.resolve(oControlHandle.control.unstash(true));
|
|
743
|
+
this._aUnStashedControls.push(
|
|
744
|
+
oUnstashResult.then(function () {
|
|
745
|
+
oUnstashedControl = Element.getElementById(oControlHandle.control.getId());
|
|
746
|
+
this.addAggregation(oControlHandle.aggregationName, oUnstashedControl, true);
|
|
747
|
+
}.bind(this))
|
|
748
|
+
);
|
|
731
749
|
}.bind(this));
|
|
732
750
|
|
|
733
751
|
this._bUnstashed = true;
|
|
@@ -24,7 +24,7 @@ sap.ui.define(["sap/ui/core/ControlBehavior"], function (ControlBehavior) {
|
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
aActions = oControl._getHeaderToolbar()
|
|
27
|
+
aActions = oControl._getHeaderToolbar()?.getContent() || [];
|
|
28
28
|
bHasActions = aActions.length > 2;
|
|
29
29
|
bHasVisibleActions = oControl._hasVisibleActions();
|
|
30
30
|
bHasTitle = oControl._isTitleVisible();
|
|
@@ -84,7 +84,7 @@ sap.ui.define([
|
|
|
84
84
|
var fnComplete = (bSuccess) ?
|
|
85
85
|
this._fnResolvePromise :
|
|
86
86
|
this._fnRejectPromise;
|
|
87
|
-
|
|
87
|
+
fnComplete && fnComplete();
|
|
88
88
|
|
|
89
89
|
// remove reference to promise (because once executed, the same promise cannot be reused again)
|
|
90
90
|
this._oPromise = null;
|
package/src/sap/uxap/library.js
CHANGED
|
@@ -30,7 +30,7 @@ sap.ui.define([
|
|
|
30
30
|
* @namespace
|
|
31
31
|
* @alias sap.uxap
|
|
32
32
|
* @author SAP SE
|
|
33
|
-
* @version 1.136.
|
|
33
|
+
* @version 1.136.1
|
|
34
34
|
* @since 1.36
|
|
35
35
|
* @public
|
|
36
36
|
*/
|
|
@@ -74,7 +74,7 @@ sap.ui.define([
|
|
|
74
74
|
"sap.uxap.ObjectPageHeaderLayoutData",
|
|
75
75
|
"sap.uxap.ObjectPageLazyLoader"
|
|
76
76
|
],
|
|
77
|
-
version: "1.136.
|
|
77
|
+
version: "1.136.1",
|
|
78
78
|
...{
|
|
79
79
|
interactionDocumentation: true
|
|
80
80
|
},
|