@openui5/sap.uxap 1.92.0 → 1.93.3
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 +5 -0
- package/THIRDPARTY.txt +10 -1
- package/package.json +5 -5
- package/src/sap/uxap/.library +1 -1
- package/src/sap/uxap/BlockBase.js +1 -1
- 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 +95 -57
- package/src/sap/uxap/ObjectPageLazyLoader.js +1 -1
- package/src/sap/uxap/ObjectPageSection.js +1 -1
- package/src/sap/uxap/ObjectPageSectionBase.js +1 -1
- package/src/sap/uxap/ObjectPageSubSection.js +6 -2
- package/src/sap/uxap/changeHandler/AddIFrameObjectPageLayout.js +38 -22
- package/src/sap/uxap/changeHandler/MoveObjectPageSection.js +47 -34
- package/src/sap/uxap/changeHandler/RenameObjectPageSection.js +60 -42
- package/src/sap/uxap/library.js +2 -2
- package/src/sap/uxap/messagebundle_de.properties +1 -1
package/.reuse/dep5
CHANGED
|
@@ -464,3 +464,8 @@ Copyright:
|
|
|
464
464
|
License: Apache-2.0
|
|
465
465
|
Comment: these files contain content from SAP and JSDoc 3: plugin.js is overall written by SAP, but contains code taken from JSDoc 3.6.7 (see the respective comments)
|
|
466
466
|
|
|
467
|
+
Files: src/sap.ui.core/src/sap/ui/core/themes/base/base.less src/themelib_sap_belize/src/sap/ui/core/themes/*/base.less src/themelib_sap_fiori_3/src/sap/ui/core/themes/*/base.less src/themelib_sap_horizon/src/sap/ui/core/themes/*/base.less
|
|
468
|
+
Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
|
|
469
|
+
License: Apache-2.0
|
|
470
|
+
Comment: these files belong to: SAP Theming Base Content
|
|
471
|
+
|
package/THIRDPARTY.txt
CHANGED
|
@@ -197,7 +197,7 @@ License: BSD-3-Clause
|
|
|
197
197
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/BSD-3-Clause.txt
|
|
198
198
|
Contained in: src/sap.ui.core/src/sap/ui/thirdparty/sinon-qunit.js
|
|
199
199
|
|
|
200
|
-
Component: URI.js, version: 1.19.
|
|
200
|
+
Component: URI.js, version: 1.19.7
|
|
201
201
|
Copyright: Rodney Rehm
|
|
202
202
|
License: MIT
|
|
203
203
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
|
@@ -462,6 +462,15 @@ License: Apache-2.0
|
|
|
462
462
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
463
463
|
Contained in: lib/jsdoc/ui5/plugin.js
|
|
464
464
|
|
|
465
|
+
Component: SAP Theming Base Content, version: 11.1.34
|
|
466
|
+
Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
|
|
467
|
+
License: Apache-2.0
|
|
468
|
+
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
469
|
+
Contained in: src/sap.ui.core/src/sap/ui/core/themes/base/base.less
|
|
470
|
+
src/themelib_sap_belize/src/sap/ui/core/themes/*/base.less
|
|
471
|
+
src/themelib_sap_fiori_3/src/sap/ui/core/themes/*/base.less
|
|
472
|
+
src/themelib_sap_horizon/src/sap/ui/core/themes/*/base.less
|
|
473
|
+
|
|
465
474
|
|
|
466
475
|
ALL LICENSE TEXTS:
|
|
467
476
|
==================
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.uxap",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.93.3",
|
|
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.93.3",
|
|
18
|
+
"@openui5/sap.m": "1.93.3",
|
|
19
|
+
"@openui5/sap.ui.core": "1.93.3",
|
|
20
|
+
"@openui5/sap.ui.layout": "1.93.3"
|
|
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.93.3</version>
|
|
7
7
|
<copyright>OpenUI5
|
|
8
8
|
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
|
|
9
9
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
@@ -829,7 +829,7 @@ sap.ui.define([
|
|
|
829
829
|
* Determines whether the <code>sap.uxap.BlockBase</code> should be loaded lazily.
|
|
830
830
|
* There are 3 prerequisites - lazy loading sould be enabled, the block should not be connected
|
|
831
831
|
* and the block is used whithin <code>sap.uxap.ObjectPageSubSection</code>
|
|
832
|
-
* @returns {
|
|
832
|
+
* @returns {boolean}
|
|
833
833
|
* @private
|
|
834
834
|
*/
|
|
835
835
|
BlockBase.prototype._shouldLazyLoad = function () {
|
|
@@ -289,6 +289,29 @@ sap.ui.define([
|
|
|
289
289
|
*/
|
|
290
290
|
headerContentPinnable: {type: "boolean", group: "Behavior", defaultValue: true},
|
|
291
291
|
|
|
292
|
+
/**
|
|
293
|
+
* Determines whether the <code>sap.uxap.ObjectPageDynamicHeaderContent</code> is pinned.
|
|
294
|
+
*
|
|
295
|
+
* The property can be changed explicitly with its setter or in the occurrence of
|
|
296
|
+
* the following user interactions:
|
|
297
|
+
* <ul>
|
|
298
|
+
* <li>Toggling the pin/unpin button of <code>sap.uxap.ObjectPageDynamicHeaderContent</code></li>
|
|
299
|
+
* <li>Snapping the <code>sap.uxap.ObjectPageDynamicHeaderContent</code> by explicitly clicking on
|
|
300
|
+
* the <code>sap.uxap.ObjectPageDynamicHeaderTitle</code></li>
|
|
301
|
+
* </ul>
|
|
302
|
+
*
|
|
303
|
+
* <b>Note: </b> The property will only apply if the following rules are currently in use:
|
|
304
|
+
* <ul>
|
|
305
|
+
* <li>An instance of <code>sap.uxap.ObjectPageDynamicHeaderTitle</code> is used for the <code>headerTitle</code> aggregation.</li>
|
|
306
|
+
* <li>The <code>headerContentPinnable</code> property is <code>true</code></li>
|
|
307
|
+
* <li>The <code>sap.uxap.ObjectPageDynamicHeaderContent</code> is expanded</li>
|
|
308
|
+
* <li>The <code>preserveHeaderStateOnScroll</code> property or the rules for it to work are <code>false</code></li>
|
|
309
|
+
* </ul>
|
|
310
|
+
*
|
|
311
|
+
* @since 1.93
|
|
312
|
+
*/
|
|
313
|
+
headerContentPinned: {type: "boolean", group: "Behavior", defaultValue: false},
|
|
314
|
+
|
|
292
315
|
/**
|
|
293
316
|
* Determines whether the user can switch between the expanded/collapsed states of the
|
|
294
317
|
* <code>sap.uxap.ObjectPageDynamicHeaderContent</code> by clicking on the <code>sap.uxap.ObjectPageDynamicHeaderTitle</code>.
|
|
@@ -396,6 +419,21 @@ sap.ui.define([
|
|
|
396
419
|
},
|
|
397
420
|
events: {
|
|
398
421
|
|
|
422
|
+
/**
|
|
423
|
+
* The event is fired when the <code>headerContentPinned</code> property is changed via user interaction.
|
|
424
|
+
*
|
|
425
|
+
* @since 1.93
|
|
426
|
+
*/
|
|
427
|
+
headerContentPinnedStateChange: {
|
|
428
|
+
parameters: {
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* False or True values indicate the new pinned property value.
|
|
432
|
+
*/
|
|
433
|
+
pinned: {type: "boolean"}
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
|
|
399
437
|
/**
|
|
400
438
|
* The event is fired when the Anchor bar is switched from moving to fixed or the other way round.
|
|
401
439
|
*/
|
|
@@ -796,16 +834,16 @@ sap.ui.define([
|
|
|
796
834
|
*
|
|
797
835
|
* (2) If the <code>bAppendHeaderToContent</code> is <code>false</code>, then the
|
|
798
836
|
* snapping is done by ensuring the header content is not visible using <code>display:none</code>
|
|
799
|
-
*
|
|
837
|
+
* @param {boolean} bUserInteraction - indicates if snapping was caused by user interaction (scroll, collapse button press, etc.)
|
|
800
838
|
* @private
|
|
801
839
|
*/
|
|
802
|
-
ObjectPageLayout.prototype._snapHeader = function (bAppendHeaderToContent) {
|
|
840
|
+
ObjectPageLayout.prototype._snapHeader = function (bAppendHeaderToContent, bUserInteraction) {
|
|
803
841
|
|
|
804
842
|
var bIsPageTop,
|
|
805
843
|
oHeaderContent = this._getHeaderContent();
|
|
806
844
|
|
|
807
845
|
if (oHeaderContent && oHeaderContent.supportsPinUnpin() && this._bPinned) {
|
|
808
|
-
this._unPin();
|
|
846
|
+
this._unPin(bUserInteraction);
|
|
809
847
|
oHeaderContent.getAggregation("_pinButton").setPressed(false);
|
|
810
848
|
bAppendHeaderToContent = true;
|
|
811
849
|
}
|
|
@@ -895,7 +933,7 @@ sap.ui.define([
|
|
|
895
933
|
bAppendHeaderToContent = !this._shouldPreserveHeaderInTitleArea() &&
|
|
896
934
|
(!this._bAllContentFitsContainer || this._headerBiggerThanAllowedToBeExpandedInTitleArea());
|
|
897
935
|
// the <code>bAppendHeaderToContent</code> parameter determines if the header should snap *with* or *without* scroll
|
|
898
|
-
this._snapHeader(bAppendHeaderToContent);
|
|
936
|
+
this._snapHeader(bAppendHeaderToContent, true);
|
|
899
937
|
}
|
|
900
938
|
|
|
901
939
|
this.getHeaderTitle()._getFocusSpan().trigger("focus");
|
|
@@ -1136,6 +1174,7 @@ sap.ui.define([
|
|
|
1136
1174
|
|
|
1137
1175
|
if (oHeaderContent && oHeaderContent.supportsPinUnpin()) {
|
|
1138
1176
|
this.$().toggleClass("sapUxAPObjectPageLayoutHeaderPinnable", oHeaderContent.getPinnable());
|
|
1177
|
+
this._updatePinButtonState();
|
|
1139
1178
|
}
|
|
1140
1179
|
|
|
1141
1180
|
if (oFooter) {
|
|
@@ -1225,7 +1264,7 @@ sap.ui.define([
|
|
|
1225
1264
|
* (to avoid a problem with scrollbar appearing for a small instance
|
|
1226
1265
|
* while we snap/unsnap header)
|
|
1227
1266
|
* @private
|
|
1228
|
-
* @param {
|
|
1267
|
+
* @param {boolean} bEnable used to supress scrolling
|
|
1229
1268
|
*/
|
|
1230
1269
|
ObjectPageLayout.prototype._toggleScrolling = function (bEnable) {
|
|
1231
1270
|
if (this._$opWrapper.length) {
|
|
@@ -1919,7 +1958,7 @@ sap.ui.define([
|
|
|
1919
1958
|
/**
|
|
1920
1959
|
* Schedules for execution a layout adjustment task.
|
|
1921
1960
|
* This task is throttled by default (unless the bImmediate parameter is specified).
|
|
1922
|
-
* @param {
|
|
1961
|
+
* @param {boolean} bImmediate - whether the task should be executed immediately, rather than throttled
|
|
1923
1962
|
* @returns {Promise} - promise that will be resolved upon the task execution
|
|
1924
1963
|
* @since 1.44
|
|
1925
1964
|
* @private
|
|
@@ -2058,7 +2097,6 @@ sap.ui.define([
|
|
|
2058
2097
|
this._oSectionInfo[oSectionBase.getId()] = {
|
|
2059
2098
|
$dom: [],
|
|
2060
2099
|
positionTop: 0,
|
|
2061
|
-
positionTopMobile: 0,
|
|
2062
2100
|
buttonId: "",
|
|
2063
2101
|
isSection: (oSectionBase instanceof ObjectPageSection),
|
|
2064
2102
|
sectionReference: oSectionBase
|
|
@@ -2263,9 +2301,7 @@ sap.ui.define([
|
|
|
2263
2301
|
|
|
2264
2302
|
ObjectPageLayout.prototype._computeScrollPosition = function (oTargetSection) {
|
|
2265
2303
|
|
|
2266
|
-
var
|
|
2267
|
-
sId = oTargetSection.getId(),
|
|
2268
|
-
iScrollTo = this._bMobileScenario || bFirstLevel ? this._oSectionInfo[sId].positionTopMobile : this._oSectionInfo[sId].positionTop,
|
|
2304
|
+
var iScrollTo = this._oSectionInfo[oTargetSection.getId()].positionTop,
|
|
2269
2305
|
bExpandedMode = !this._bStickyAnchorBar;
|
|
2270
2306
|
|
|
2271
2307
|
if (bExpandedMode && this._isFirstVisibleSectionBase(oTargetSection)) { // preserve expanded header if no need to stick
|
|
@@ -2493,7 +2529,7 @@ sap.ui.define([
|
|
|
2493
2529
|
this._aSectionBases.forEach(function (oSectionBase) {
|
|
2494
2530
|
var oInfo = this._oSectionInfo[oSectionBase.getId()],
|
|
2495
2531
|
$this = oSectionBase.$(),
|
|
2496
|
-
|
|
2532
|
+
oSection,
|
|
2497
2533
|
bPromoted = false;
|
|
2498
2534
|
|
|
2499
2535
|
if (!oInfo /* sectionBase is visible */ || !$this.length) {
|
|
@@ -2513,29 +2549,18 @@ sap.ui.define([
|
|
|
2513
2549
|
//the amount of scrolling required is the distance between their position().top and the bottom of the anchorBar
|
|
2514
2550
|
oInfo.positionTop = Math.ceil(realTop);
|
|
2515
2551
|
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
bPromoted = $mobileAnchor.length === 0;
|
|
2526
|
-
|
|
2527
|
-
//calculate the mobile position
|
|
2528
|
-
if (!bPromoted) {
|
|
2529
|
-
oInfo.positionTopMobile =
|
|
2530
|
-
Math.ceil(library.Utilities.getChildPosition($mobileAnchor, this._$contentContainer).top)
|
|
2531
|
-
+ $mobileAnchor.outerHeight();
|
|
2532
|
-
} else {
|
|
2533
|
-
//title wasn't found (=first section, hidden title, promoted subsection), scroll to the same position as desktop
|
|
2534
|
-
oInfo.positionTopMobile = oInfo.positionTop;
|
|
2552
|
+
if (!oInfo.isSection && (oSection = oSectionBase.getParent())) {
|
|
2553
|
+
// a promoted subSection borrows the title of its parent section
|
|
2554
|
+
bPromoted = oSectionBase._getTitleDomId() === oSection.getId() + "-title";
|
|
2555
|
+
if (bPromoted) {
|
|
2556
|
+
// the scrollTop required to scroll to a promoted subsection
|
|
2557
|
+
// is the top of the parent section (UX rule)
|
|
2558
|
+
var parentRealTop = oSection.$().position().top;
|
|
2559
|
+
oInfo.positionTop = Math.ceil(parentRealTop);
|
|
2560
|
+
}
|
|
2535
2561
|
}
|
|
2536
2562
|
|
|
2537
2563
|
if (!this._bStickyAnchorBar && !this._bHeaderInTitleArea) { // in sticky mode the anchor bar is not part of the content
|
|
2538
|
-
oInfo.positionTopMobile -= this.iAnchorBarHeight;
|
|
2539
2564
|
oInfo.positionTop -= this.iAnchorBarHeight;
|
|
2540
2565
|
}
|
|
2541
2566
|
|
|
@@ -2583,7 +2608,7 @@ sap.ui.define([
|
|
|
2583
2608
|
bIsFirstVisibleSubSection = bParentIsFirstVisibleSection && (iSubSectionIndex === 0); /* index of *visible* subSections is first */
|
|
2584
2609
|
bIsFullscreenSection = oSectionBase.hasStyleClass(ObjectPageSubSection.FIT_CONTAINER_CLASS);
|
|
2585
2610
|
|
|
2586
|
-
oSectionBase._setHeight(this._computeSubSectionHeight(bIsFirstVisibleSubSection, bIsFullscreenSection,
|
|
2611
|
+
oSectionBase._setHeight(this._computeSubSectionHeight(bIsFirstVisibleSubSection, bIsFullscreenSection, Math.ceil(realTop)));
|
|
2587
2612
|
}
|
|
2588
2613
|
|
|
2589
2614
|
}, this);
|
|
@@ -2756,13 +2781,14 @@ sap.ui.define([
|
|
|
2756
2781
|
};
|
|
2757
2782
|
|
|
2758
2783
|
ObjectPageLayout.prototype._getSectionPositionTop = function(oSectionBase, bShouldStick) {
|
|
2759
|
-
var
|
|
2784
|
+
var iCachedPosition = this._oSectionInfo[oSectionBase.getId()].positionTop;
|
|
2760
2785
|
|
|
2761
|
-
|
|
2762
|
-
|
|
2786
|
+
// in expanded mode the anchorBar is still part of the content
|
|
2787
|
+
if (!this._bStickyAnchorBar && !this._bHeaderInTitleArea) {
|
|
2788
|
+
iCachedPosition += this.iAnchorBarHeight;
|
|
2763
2789
|
}
|
|
2764
2790
|
|
|
2765
|
-
return
|
|
2791
|
+
return iCachedPosition;
|
|
2766
2792
|
};
|
|
2767
2793
|
|
|
2768
2794
|
ObjectPageLayout.prototype._getSectionPositionBottom = function(oSectionBase, bShouldStick) {
|
|
@@ -2798,8 +2824,8 @@ sap.ui.define([
|
|
|
2798
2824
|
|
|
2799
2825
|
/**
|
|
2800
2826
|
* Determines if the <code>ObjectPageLayout</code> should set <code>ObjectPageSectionBase</code> internal <code>titleLevel</code>.
|
|
2801
|
-
* @param {
|
|
2802
|
-
* @returns {
|
|
2827
|
+
* @param {sap.uxap.ObjectPageSectionBase} oSectionBase <code>ObjectPageSectionBase</code> instance
|
|
2828
|
+
* @returns {boolean}
|
|
2803
2829
|
* @since 1.44
|
|
2804
2830
|
* @private
|
|
2805
2831
|
*/
|
|
@@ -2839,11 +2865,6 @@ sap.ui.define([
|
|
|
2839
2865
|
//therefore we need to create enough space below the last subsection to get it displayed on top = the spacer
|
|
2840
2866
|
//the "top" is just below the sticky header + anchorBar, therefore we just need enough space to get the last subsection below these elements
|
|
2841
2867
|
iSpacerHeight = iScrollableViewportHeight - iLastVisibleHeight;
|
|
2842
|
-
|
|
2843
|
-
//take into account that we may need to scroll down to the positionMobile, thus we need to make sure we have enough space at the bottom
|
|
2844
|
-
if (this._bMobileScenario) {
|
|
2845
|
-
iSpacerHeight += (this._oSectionInfo[oLastVisibleSubSection.getId()].positionTopMobile - this._oSectionInfo[oLastVisibleSubSection.getId()].positionTop);
|
|
2846
|
-
}
|
|
2847
2868
|
} else {
|
|
2848
2869
|
iSpacerHeight = 0;
|
|
2849
2870
|
}
|
|
@@ -4380,9 +4401,9 @@ sap.ui.define([
|
|
|
4380
4401
|
|
|
4381
4402
|
ObjectPageLayout.prototype._onPinUnpinButtonPress = function () {
|
|
4382
4403
|
if (this._bPinned) {
|
|
4383
|
-
this._unPin();
|
|
4404
|
+
this._unPin(true);
|
|
4384
4405
|
} else {
|
|
4385
|
-
this._pin();
|
|
4406
|
+
this._pin(true);
|
|
4386
4407
|
this._restorePinButtonFocus();
|
|
4387
4408
|
}
|
|
4388
4409
|
};
|
|
@@ -4399,14 +4420,16 @@ sap.ui.define([
|
|
|
4399
4420
|
}
|
|
4400
4421
|
};
|
|
4401
4422
|
|
|
4402
|
-
ObjectPageLayout.prototype._pin = function () {
|
|
4403
|
-
var $oObjectPage = this.$();
|
|
4404
|
-
|
|
4423
|
+
ObjectPageLayout.prototype._pin = function (bUserInteraction) {
|
|
4405
4424
|
if (this._bPinned) {
|
|
4406
4425
|
return;
|
|
4407
4426
|
}
|
|
4408
4427
|
|
|
4409
4428
|
this._bPinned = true;
|
|
4429
|
+
if (bUserInteraction) {
|
|
4430
|
+
this.setProperty("headerContentPinned", true, true);
|
|
4431
|
+
this.fireEvent("headerContentPinnedStateChange", {pinned: true});
|
|
4432
|
+
}
|
|
4410
4433
|
this._toggleHeaderTitle(true /* expand */);
|
|
4411
4434
|
this._moveAnchorBarToTitleArea();
|
|
4412
4435
|
this._moveHeaderToTitleArea();
|
|
@@ -4414,23 +4437,38 @@ sap.ui.define([
|
|
|
4414
4437
|
this._requestAdjustLayout();
|
|
4415
4438
|
this._updateToggleHeaderVisualIndicators();
|
|
4416
4439
|
|
|
4417
|
-
|
|
4418
|
-
$oObjectPage.addClass("sapUxAPObjectPageLayoutHeaderPinned");
|
|
4419
|
-
}
|
|
4440
|
+
this.addStyleClass("sapUxAPObjectPageLayoutHeaderPinned");
|
|
4420
4441
|
};
|
|
4421
4442
|
|
|
4422
|
-
ObjectPageLayout.prototype._unPin = function () {
|
|
4423
|
-
var $oObjectPage = this.$();
|
|
4424
|
-
|
|
4443
|
+
ObjectPageLayout.prototype._unPin = function (bUserInteraction) {
|
|
4425
4444
|
if (!this._bPinned) {
|
|
4426
4445
|
return;
|
|
4427
4446
|
}
|
|
4428
4447
|
|
|
4429
4448
|
this._bPinned = false;
|
|
4449
|
+
if (bUserInteraction) {
|
|
4450
|
+
this.setProperty("headerContentPinned", false, true);
|
|
4451
|
+
this.fireEvent("headerContentPinnedStateChange", {pinned: false});
|
|
4452
|
+
}
|
|
4430
4453
|
this._updateToggleHeaderVisualIndicators();
|
|
4431
4454
|
|
|
4432
|
-
|
|
4433
|
-
|
|
4455
|
+
this.removeStyleClass("sapUxAPObjectPageLayoutHeaderPinned");
|
|
4456
|
+
};
|
|
4457
|
+
|
|
4458
|
+
ObjectPageLayout.prototype._isHeaderPinnable = function () {
|
|
4459
|
+
var oHeader = this._getHeaderContent();
|
|
4460
|
+
return oHeader && oHeader.getPinnable()
|
|
4461
|
+
&& this._bHeaderExpanded
|
|
4462
|
+
&& !this.getPreserveHeaderStateOnScroll();
|
|
4463
|
+
};
|
|
4464
|
+
|
|
4465
|
+
ObjectPageLayout.prototype._updatePinButtonState = function() {
|
|
4466
|
+
var bShouldPin = this.getHeaderContentPinned() && this._isHeaderPinnable();
|
|
4467
|
+
this._getHeaderContent()._togglePinButton(bShouldPin);
|
|
4468
|
+
if (bShouldPin) {
|
|
4469
|
+
this._pin();
|
|
4470
|
+
} else {
|
|
4471
|
+
this._unPin();
|
|
4434
4472
|
}
|
|
4435
4473
|
};
|
|
4436
4474
|
|
|
@@ -4883,4 +4921,4 @@ sap.ui.define([
|
|
|
4883
4921
|
}
|
|
4884
4922
|
|
|
4885
4923
|
return ObjectPageLayout;
|
|
4886
|
-
});
|
|
4924
|
+
});
|
|
@@ -201,7 +201,7 @@ sap.ui.define([
|
|
|
201
201
|
/**
|
|
202
202
|
* Determines if the <code>ObjectPageSection</code> title is visible.
|
|
203
203
|
* @private
|
|
204
|
-
* @returns {
|
|
204
|
+
* @returns {boolean}
|
|
205
205
|
*/
|
|
206
206
|
ObjectPageSection.prototype._isTitleVisible = function () {
|
|
207
207
|
return (this.getShowTitle() && this._getInternalTitleVisible())
|
|
@@ -361,7 +361,6 @@ sap.ui.define([
|
|
|
361
361
|
return;
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
-
this._getGrid().removeAllContent();
|
|
365
364
|
this._applyLayout(oObjectPageLayout);
|
|
366
365
|
};
|
|
367
366
|
|
|
@@ -541,6 +540,7 @@ sap.ui.define([
|
|
|
541
540
|
ObjectPageSubSection.prototype._applyLayout = function (oLayoutProvider) {
|
|
542
541
|
var aVisibleBlocks,
|
|
543
542
|
oGrid = this._getGrid(),
|
|
543
|
+
oGridContent = oGrid.getAggregation("content"),
|
|
544
544
|
sCurrentMode = this.getMode(),
|
|
545
545
|
sLayout = oLayoutProvider.getSubSectionLayout(),
|
|
546
546
|
oLayoutConfig = this._calculateLayoutConfiguration(sLayout, oLayoutProvider),
|
|
@@ -562,7 +562,11 @@ sap.ui.define([
|
|
|
562
562
|
try {
|
|
563
563
|
aVisibleBlocks.forEach(function (oBlock) {
|
|
564
564
|
this._setBlockMode(oBlock, sCurrentMode);
|
|
565
|
-
|
|
565
|
+
|
|
566
|
+
// Add Block to Grid content only if it's not already added
|
|
567
|
+
if (!oGridContent || (oGridContent && oGridContent.indexOf(oBlock) < 0)) {
|
|
568
|
+
oGrid.addAggregation("content", oBlock, true); // this is always called onBeforeRendering so suppress invalidate
|
|
569
|
+
}
|
|
566
570
|
}, this);
|
|
567
571
|
} catch (sError) {
|
|
568
572
|
Log.error("ObjectPageSubSection :: error while building layout " + sLayout + ": " + sError);
|
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
* @constructor
|
|
26
26
|
* @alias sap.uxap.changeHandler.AddIFrameObjectPageLayout
|
|
27
27
|
* @author SAP SE
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.93.3
|
|
29
29
|
* @since 1.75
|
|
30
30
|
* @experimental Since 1.75
|
|
31
31
|
*/
|
|
@@ -38,6 +38,7 @@ sap.ui.define([
|
|
|
38
38
|
* @param {sap.ui.core.Control} oControl - Control that matches the change selector for applying the change
|
|
39
39
|
* @param {object} mPropertyBag - Map of properties
|
|
40
40
|
* @param {object} mPropertyBag.modifier - Modifier for the controls
|
|
41
|
+
* @returns {Promise} Promise resolving when the change is successfully applied
|
|
41
42
|
* @ui5-restricted sap.uxap
|
|
42
43
|
*/
|
|
43
44
|
AddIFrameObjectPageLayout.applyChange = function(oChange, oControl, mPropertyBag) {
|
|
@@ -45,7 +46,8 @@ sap.ui.define([
|
|
|
45
46
|
var oChangeDefinition = oChange.getDefinition();
|
|
46
47
|
var sAggregationName = oChangeDefinition.content.targetAggregation;
|
|
47
48
|
if (sAggregationName !== "sections") {
|
|
48
|
-
return
|
|
49
|
+
return Promise.resolve()
|
|
50
|
+
.then(BaseAddIFrame.applyChange.bind(BaseAddIFrame, oChange, oControl, mPropertyBag));
|
|
49
51
|
}
|
|
50
52
|
// Create a section, sub section and insert the IFrame
|
|
51
53
|
var oView = mPropertyBag.view;
|
|
@@ -53,26 +55,40 @@ sap.ui.define([
|
|
|
53
55
|
var oBaseSelector = oChangeDefinition.content.selector;
|
|
54
56
|
var sDefaultTitle = sap.ui.getCore().getLibraryResourceBundle("sap.uxap").getText("SECTION_TITLE_FOR_IFRAME");
|
|
55
57
|
|
|
56
|
-
var oOPSection
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
58
|
+
var oOPSection;
|
|
59
|
+
var oOPSubSection;
|
|
60
|
+
return Promise.resolve()
|
|
61
|
+
.then(oModifier.createControl.bind(oModifier, "sap.uxap.ObjectPageSection", oComponent, oView, oBaseSelector, {
|
|
62
|
+
title: sDefaultTitle
|
|
63
|
+
}, false)
|
|
64
|
+
)
|
|
65
|
+
.then(function(oOPSectionLocal) {
|
|
66
|
+
oOPSection = oOPSectionLocal;
|
|
67
|
+
var oOPSubSectionSelector = Object.create(oBaseSelector);
|
|
68
|
+
oOPSubSectionSelector.id += "-subSection";
|
|
69
|
+
return oModifier.createControl("sap.uxap.ObjectPageSubSection", oComponent, oView, oOPSubSectionSelector, {
|
|
70
|
+
title: sDefaultTitle
|
|
71
|
+
}, false);
|
|
72
|
+
})
|
|
73
|
+
.then(function(oOPSubSectionLocal) {
|
|
74
|
+
oOPSubSection = oOPSubSectionLocal;
|
|
75
|
+
return oModifier.insertAggregation(oOPSection, "subSections", oOPSubSection, 0, oView);
|
|
76
|
+
})
|
|
77
|
+
.then(function () {
|
|
78
|
+
var oIFrameSelector = Object.create(oBaseSelector);
|
|
79
|
+
oIFrameSelector.id += "-iframe";
|
|
80
|
+
return createIFrame(oChange, mPropertyBag, oIFrameSelector);
|
|
81
|
+
})
|
|
82
|
+
.then(function(oIFrame) {
|
|
83
|
+
return oModifier.insertAggregation(oOPSubSection, "blocks", oIFrame, 0, oView);
|
|
84
|
+
})
|
|
85
|
+
.then(getTargetAggregationIndex.bind(null, oChange, oControl, mPropertyBag))
|
|
86
|
+
.then(function(iIndex) {
|
|
87
|
+
return oModifier.insertAggregation(oControl, "sections", oOPSection, iIndex, oView);
|
|
88
|
+
})
|
|
89
|
+
.then(function () {
|
|
90
|
+
oChange.setRevertData([oModifier.getId(oOPSection)]);
|
|
91
|
+
});
|
|
76
92
|
};
|
|
77
93
|
|
|
78
94
|
return AddIFrameObjectPageLayout;
|
|
@@ -13,7 +13,7 @@ sap.ui.define(["sap/ui/fl/changeHandler/MoveControls", "sap/ui/core/Core", "sap/
|
|
|
13
13
|
* @constructor
|
|
14
14
|
* @alias sap.uxap.changeHandler.MoveObjectPageSection
|
|
15
15
|
* @author SAP SE
|
|
16
|
-
* @version 1.
|
|
16
|
+
* @version 1.93.3
|
|
17
17
|
* @experimental Since 1.54
|
|
18
18
|
*/
|
|
19
19
|
|
|
@@ -59,14 +59,16 @@ sap.ui.define(["sap/ui/fl/changeHandler/MoveControls", "sap/ui/core/Core", "sap/
|
|
|
59
59
|
MoveObjectPageSection.completeChangeContent = function (oChange, mSpecificChangeInfo, mPropertyBag) {
|
|
60
60
|
var oSourceControl = Core.byId(mSpecificChangeInfo.source.id),
|
|
61
61
|
oTargetControl = Core.byId(mSpecificChangeInfo.target.id);
|
|
62
|
-
|
|
62
|
+
var oPromise = Promise.resolve();
|
|
63
63
|
if (oSourceControl.isA("sap.uxap.AnchorBar")
|
|
64
64
|
&& oTargetControl.isA("sap.uxap.AnchorBar")
|
|
65
65
|
) {
|
|
66
|
-
this._mapAnchorsToSections(mSpecificChangeInfo, mPropertyBag);
|
|
66
|
+
oPromise = oPromise.then(this._mapAnchorsToSections.bind(this, mSpecificChangeInfo, mPropertyBag));
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
return
|
|
69
|
+
return oPromise.then(function(){
|
|
70
|
+
return MoveControls.completeChangeContent.apply(this, arguments[0]);
|
|
71
|
+
}.bind(this, arguments));
|
|
70
72
|
};
|
|
71
73
|
|
|
72
74
|
/**
|
|
@@ -78,36 +80,47 @@ sap.ui.define(["sap/ui/fl/changeHandler/MoveControls", "sap/ui/core/Core", "sap/
|
|
|
78
80
|
* @private
|
|
79
81
|
*/
|
|
80
82
|
MoveObjectPageSection._mapAnchorsToSections = function (mSpecificChangeInfo, mPropertyBag) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
83
|
+
return Promise.resolve()
|
|
84
|
+
.then(function() {
|
|
85
|
+
var oSection, oSectionParentInfo;
|
|
86
|
+
var oModifier = mPropertyBag.modifier;
|
|
87
|
+
var oLayout = oModifier.bySelector(mSpecificChangeInfo.selector, mPropertyBag.appComponent, mPropertyBag.view);
|
|
88
|
+
var aAnchoredSections = oLayout._getVisibleSections(); // sections that have anchors
|
|
89
|
+
|
|
90
|
+
function getSectionForAnchor(sAnchorId) {
|
|
91
|
+
var oAnchor = Core.byId(sAnchorId),
|
|
92
|
+
sSectionId = oAnchor.data("sectionId");
|
|
93
|
+
return Core.byId(sSectionId);
|
|
94
|
+
}
|
|
95
|
+
var aPromiseArray = [];
|
|
96
|
+
mSpecificChangeInfo.movedElements.forEach(function(oElement) {
|
|
97
|
+
// adjust target index as invisible sections are not part of the anchor bar;
|
|
98
|
+
var oSectionAtTargetIndex = aAnchoredSections[oElement.targetIndex];
|
|
99
|
+
var oPromise = Promise.resolve()
|
|
100
|
+
.then(function(){
|
|
101
|
+
return oModifier.findIndexInParentAggregation(oSectionAtTargetIndex);
|
|
102
|
+
})
|
|
103
|
+
.then(function(iTargetIndex){
|
|
104
|
+
oElement.targetIndex = iTargetIndex;
|
|
105
|
+
// replace the anchorBar with the section
|
|
106
|
+
oSection = getSectionForAnchor(oElement.id);
|
|
107
|
+
if (!oSection || !oSection.getParent()) {
|
|
108
|
+
throw new Error("Cannot map anchor to section");
|
|
109
|
+
}
|
|
110
|
+
oSectionParentInfo = {
|
|
111
|
+
id: oSection.getParent().getId(),
|
|
112
|
+
aggregation: oSection.sParentAggregationName
|
|
113
|
+
};
|
|
114
|
+
oElement.id = oSection.getId();
|
|
115
|
+
});
|
|
116
|
+
aPromiseArray.push(oPromise);
|
|
117
|
+
});
|
|
118
|
+
return Promise.all(aPromiseArray)
|
|
119
|
+
.then(function(){
|
|
120
|
+
merge(mSpecificChangeInfo.source, oSectionParentInfo);
|
|
121
|
+
merge(mSpecificChangeInfo.target, oSectionParentInfo);
|
|
122
|
+
});
|
|
123
|
+
});
|
|
111
124
|
};
|
|
112
125
|
|
|
113
126
|
return MoveObjectPageSection;
|
|
@@ -21,7 +21,7 @@ sap.ui.define([
|
|
|
21
21
|
* @constructor
|
|
22
22
|
* @alias sap.uxap.changeHandler.RenameObjectPageSection
|
|
23
23
|
* @author SAP SE
|
|
24
|
-
* @version 1.
|
|
24
|
+
* @version 1.93.3
|
|
25
25
|
* @experimental Since 1.50
|
|
26
26
|
*/
|
|
27
27
|
|
|
@@ -34,57 +34,75 @@ sap.ui.define([
|
|
|
34
34
|
var RenameObjectPageSection = BaseRename.createRenameChangeHandler(mRenameSettings);
|
|
35
35
|
|
|
36
36
|
RenameObjectPageSection._getControlForRename = function (oControl, oModifier) {
|
|
37
|
-
var aSubSections
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
37
|
+
var aSubSections;
|
|
38
|
+
return Promise.resolve()
|
|
39
|
+
.then(function() {
|
|
40
|
+
return oModifier.getAggregation(oControl, "subSections");
|
|
41
|
+
})
|
|
42
|
+
.then(function(aSubSectionsLocal) {
|
|
43
|
+
aSubSections = aSubSectionsLocal;
|
|
44
|
+
return Promise.all([oModifier.getPropertyBindingOrProperty(aSubSections[0], "title"),
|
|
45
|
+
oModifier.getProperty(oModifier.getParent(oControl), "subSectionLayout")]);
|
|
46
|
+
})
|
|
47
|
+
.then(function(aProperties) {
|
|
48
|
+
// due to specific logic in the Object Page Layout, the title of the Section is
|
|
49
|
+
// taken from its SubSection in case it is only one no matter if the Section has title itself.
|
|
50
|
+
|
|
51
|
+
if (aSubSections
|
|
52
|
+
&& aSubSections.length === 1
|
|
53
|
+
&& aProperties[0]
|
|
54
|
+
&& aProperties[1] === "TitleOnTop"
|
|
55
|
+
) {
|
|
56
|
+
return aSubSections[0];
|
|
57
|
+
}
|
|
58
|
+
return oControl;
|
|
59
|
+
});
|
|
48
60
|
};
|
|
49
61
|
|
|
50
62
|
RenameObjectPageSection.applyChange = function (oChange, oControl, mPropertyBag) {
|
|
51
|
-
var oModifier = mPropertyBag.modifier
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
if (oChangeDefinition.texts && sText && typeof (sValue) === "string") {
|
|
64
|
-
oChange.setRevertData(oModifier.getPropertyBindingOrProperty(oControlToBeRenamed, sPropertyName));
|
|
65
|
-
oModifier.setPropertyBindingOrProperty(oControlToBeRenamed, sPropertyName, sValue);
|
|
63
|
+
var oModifier = mPropertyBag.modifier;
|
|
64
|
+
var sPropertyName = mRenameSettings.propertyName;
|
|
65
|
+
var oChangeDefinition = oChange.getDefinition();
|
|
66
|
+
var sText = oChangeDefinition.texts[mRenameSettings.changePropertyName];
|
|
67
|
+
var sValue = sText.value;
|
|
68
|
+
return RenameObjectPageSection._getControlForRename(oControl, oModifier)
|
|
69
|
+
.then(function(oControlToBeRenamed) {
|
|
70
|
+
if (typeof sValue === "string" && sValue.trim() === "") {
|
|
71
|
+
throw new Error("Change cannot be applied as ObjectPageSubSection's title cannot be empty: ["
|
|
72
|
+
+ oChangeDefinition.layer + "]" + oChangeDefinition.namespace + "/" + oChangeDefinition.fileName + "." + oChangeDefinition.fileType);
|
|
73
|
+
}
|
|
66
74
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
75
|
+
if (oChangeDefinition.texts && sText && typeof (sValue) === "string") {
|
|
76
|
+
return Promise.resolve()
|
|
77
|
+
.then(function(){
|
|
78
|
+
return oModifier.getPropertyBindingOrProperty(oControlToBeRenamed, sPropertyName);
|
|
79
|
+
})
|
|
80
|
+
.then(function(oBindingOrProperty) {
|
|
81
|
+
oChange.setRevertData(oBindingOrProperty);
|
|
82
|
+
oModifier.setPropertyBindingOrProperty(oControlToBeRenamed, sPropertyName, sValue);
|
|
83
|
+
return true;
|
|
84
|
+
});
|
|
85
|
+
} else {
|
|
86
|
+
Log.error("Change does not contain sufficient information to be applied: [" + oChangeDefinition.layer + "]" + oChangeDefinition.namespace + "/" + oChangeDefinition.fileName + "." + oChangeDefinition.fileType);
|
|
87
|
+
//however subsequent changes should be applied
|
|
88
|
+
}
|
|
89
|
+
});
|
|
72
90
|
};
|
|
73
91
|
|
|
74
92
|
RenameObjectPageSection.revertChange = function (oChange, oControl, mPropertyBag) {
|
|
75
93
|
var vOldText = oChange.getRevertData(),
|
|
76
94
|
oModifier = mPropertyBag.modifier,
|
|
77
|
-
oControlToBeReverted = RenameObjectPageSection._getControlForRename(oControl, oModifier),
|
|
78
95
|
sPropertyName = mRenameSettings.propertyName;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
96
|
+
return RenameObjectPageSection._getControlForRename(oControl, oModifier)
|
|
97
|
+
.then(function(oControlToBeReverted){
|
|
98
|
+
if (vOldText || vOldText === "") {
|
|
99
|
+
oModifier.setPropertyBindingOrProperty(oControlToBeReverted, sPropertyName, vOldText);
|
|
100
|
+
oChange.resetRevertData();
|
|
101
|
+
return true;
|
|
102
|
+
} else {
|
|
103
|
+
Log.error("Change doesn't contain sufficient information to be reverted. Most Likely the Change didn't go through applyChange.");
|
|
104
|
+
}
|
|
105
|
+
});
|
|
88
106
|
};
|
|
89
107
|
|
|
90
108
|
|
package/src/sap/uxap/library.js
CHANGED
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
* @namespace
|
|
25
25
|
* @name sap.uxap
|
|
26
26
|
* @author SAP SE
|
|
27
|
-
* @version 1.
|
|
27
|
+
* @version 1.93.3
|
|
28
28
|
* @since 1.36
|
|
29
29
|
* @public
|
|
30
30
|
*/
|
|
@@ -69,7 +69,7 @@ sap.ui.define([
|
|
|
69
69
|
"sap.uxap.ObjectPageHeaderLayoutData",
|
|
70
70
|
"sap.uxap.ObjectPageLazyLoader"
|
|
71
71
|
],
|
|
72
|
-
version: "1.
|
|
72
|
+
version: "1.93.3",
|
|
73
73
|
extensions: {
|
|
74
74
|
flChangeHandlers: {
|
|
75
75
|
"sap.uxap.ObjectPageHeader": "sap/uxap/flexibility/ObjectPageHeader",
|
|
@@ -5,7 +5,7 @@ SHOW_LESS=Weniger anzeigen
|
|
|
5
5
|
|
|
6
6
|
ANCHOR_BAR_ARIA_LABEL=Anker
|
|
7
7
|
|
|
8
|
-
ANCHOR_BAR_ARIA_LABEL_DESC=
|
|
8
|
+
ANCHOR_BAR_ARIA_LABEL_DESC=Element aktivieren, um zum Abschnitt auf der Seite zu springen
|
|
9
9
|
|
|
10
10
|
ANCHOR_BAR_OVERFLOW=Mehr
|
|
11
11
|
|