@openui5/sap.uxap 1.91.0 → 1.93.2

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 CHANGED
@@ -352,6 +352,11 @@ Copyright: 2006 Google Inc.
352
352
  License: Apache-2.0
353
353
  Comment: these files belong to: google-code-prettify
354
354
 
355
+ Files: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/highlight.js/*
356
+ Copyright: 2006-2020, Ivan Sagalaev
357
+ License: BSD-3-Clause
358
+ Comment: these files belong to: highlight.js
359
+
355
360
  Files: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/elasticlunr.js
356
361
  Copyright: 2017 Wei Song and Oliver Nightingale
357
362
  License: MIT
@@ -411,6 +416,35 @@ License: Apache-2.0 and MIT
411
416
  Comment: these files contain content from SAP and BooleanExpressionEvaluator: BoolExprTool.js is authored by SAP, but partly inspired by BooleanExpressionEvaluator
412
417
 
413
418
 
419
+ # Library: sap.ui.webc.common:
420
+
421
+ Files: src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/base/*.* src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/theme-base/*.* src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/localization/*.* src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons/*.* src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons-tnt/*.*
422
+ Copyright: SAP
423
+ License: Apache-2.0
424
+ Comment: these files belong to: UI5 Web Components
425
+
426
+ Files: src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/lit-html/*.*
427
+ Copyright: Google LLC
428
+ License: BSD-3-Clause
429
+ Comment: these files belong to: lit-html
430
+
431
+
432
+ # Library: sap.ui.webc.fiori:
433
+
434
+ Files: src/sap.ui.webc.fiori/src/sap/ui/webc/fiori/thirdparty/*.*
435
+ Copyright: SAP
436
+ License: Apache-2.0
437
+ Comment: these files belong to: UI5 Web Components
438
+
439
+
440
+ # Library: sap.ui.webc.main:
441
+
442
+ Files: src/sap.ui.webc.main/src/sap/ui/webc/main/thirdparty/*.*
443
+ Copyright: SAP
444
+ License: Apache-2.0
445
+ Comment: these files belong to: UI5 Web Components
446
+
447
+
414
448
  # Outside of Libraries:
415
449
 
416
450
  Files: src/testsuite-utils/src/main/resources/META-INF/less/less.js
@@ -423,3 +457,15 @@ Copyright: 2015-2017 Evgeny Poberezkin
423
457
  License: MIT
424
458
  Comment: these files belong to: ajv
425
459
 
460
+ Files: lib/jsdoc/ui5/plugin.js
461
+ Copyright:
462
+ 2009-2021 SAP SE or an SAP affiliate company and OpenUI5 contributors
463
+ 2011-present Michael Mathews micmath@gmail.com and the contributors to JSDoc
464
+ License: Apache-2.0
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
+
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.6
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
@@ -330,6 +330,12 @@ License: Apache-2.0
330
330
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
331
331
  Contained in: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/*
332
332
 
333
+ Component: highlight.js, version: 10.4.1
334
+ Copyright: 2006-2020, Ivan Sagalaev
335
+ License: BSD-3-Clause
336
+ License Text: https://github.com/SAP/openui5/blob/master/LICENSES/BSD-3-Clause.txt
337
+ Contained in: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/highlight.js/*
338
+
333
339
  Component: Elasticlunr, version: 0.9.5
334
340
  Copyright: 2017 Wei Song and Oliver Nightingale
335
341
  License: MIT
@@ -399,6 +405,43 @@ License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
399
405
  Contained in: src/sap.ui.mdc/test/sap/ui/mdc/sample/field/filterfieldwithoperators/BoolExprTool.js
400
406
 
401
407
 
408
+ Library: sap.ui.webc.common:
409
+
410
+ Component: UI5 Web Components, version: 1.0.0-rc.12
411
+ Copyright: SAP
412
+ License: Apache-2.0
413
+ License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
414
+ Contained in: src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/base/*.*
415
+ src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/theme-base/*.*
416
+ src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/localization/*.*
417
+ src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons/*.*
418
+ src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons-tnt/*.*
419
+
420
+ Component: lit-html, version: 1.4.1
421
+ Copyright: Google LLC
422
+ License: BSD-3-Clause
423
+ License Text: https://github.com/SAP/openui5/blob/master/LICENSES/BSD-3-Clause.txt
424
+ Contained in: src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/lit-html/*.*
425
+
426
+
427
+ Library: sap.ui.webc.fiori:
428
+
429
+ Component: UI5 Web Components, version: 1.0.0-rc.12
430
+ Copyright: SAP
431
+ License: Apache-2.0
432
+ License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
433
+ Contained in: src/sap.ui.webc.fiori/src/sap/ui/webc/fiori/thirdparty/*.*
434
+
435
+
436
+ Library: sap.ui.webc.main:
437
+
438
+ Component: UI5 Web Components, version: 1.0.0-rc.12
439
+ Copyright: SAP
440
+ License: Apache-2.0
441
+ License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
442
+ Contained in: src/sap.ui.webc.main/src/sap/ui/webc/main/thirdparty/*.*
443
+
444
+
402
445
  Outside of Libraries:
403
446
 
404
447
  Component: LESS, version: 1.6.3
@@ -413,6 +456,21 @@ License: MIT
413
456
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
414
457
  Contained in: ../test/sap/ui/integration/demokit/cardExplorer/webapp/thirdparty/ajv/ajv.min.js
415
458
 
459
+ Component: JSDoc 3, version: 3.6.7
460
+ Copyright: 2011-present Michael Mathews micmath@gmail.com and the contributors to JSDoc
461
+ License: Apache-2.0
462
+ License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
463
+ Contained in: lib/jsdoc/ui5/plugin.js
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
+
416
474
 
417
475
  ALL LICENSE TEXTS:
418
476
  ==================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.uxap",
3
- "version": "1.91.0",
3
+ "version": "1.93.2",
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.91.0",
18
- "@openui5/sap.m": "1.91.0",
19
- "@openui5/sap.ui.core": "1.91.0",
20
- "@openui5/sap.ui.layout": "1.91.0"
17
+ "@openui5/sap.f": "1.93.2",
18
+ "@openui5/sap.m": "1.93.2",
19
+ "@openui5/sap.ui.core": "1.93.2",
20
+ "@openui5/sap.ui.layout": "1.93.2"
21
21
  }
22
22
  }
@@ -3,7 +3,7 @@
3
3
 
4
4
  <name>sap.uxap</name>
5
5
  <vendor>SAP SE</vendor>
6
- <version>1.91.0</version>
6
+ <version>1.93.2</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>
@@ -970,7 +970,7 @@ sap.ui.define([
970
970
  * those controls.
971
971
  *
972
972
  * @param {sap.ui.core.Control} oElement - The Control that gets rendered by the RenderManager
973
- * @param {Object} mAriaProps - The mapping of "aria-" prefixed attributes
973
+ * @param {object} mAriaProps - The mapping of "aria-" prefixed attributes
974
974
  * @protected
975
975
  */
976
976
  AnchorBar.prototype.enhanceAccessibilityState = function (oElement, mAriaProps) {
@@ -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 {Boolean}
832
+ * @returns {boolean}
833
833
  * @private
834
834
  */
835
835
  BlockBase.prototype._shouldLazyLoad = function () {
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  *
22
22
  * @class
23
23
  * @author SAP SE
24
- * @version 1.91.0
24
+ * @version 1.93.2
25
25
  * @since 1.26
26
26
  * @alias sap.uxap.BlockBaseMetadata
27
27
  * @extends sap.ui.core.ElementMetadata
@@ -22,7 +22,7 @@ sap.ui.define(['sap/ui/core/Element', './library'],
22
22
  * @extends sap.ui.core.Element
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.91.0
25
+ * @version 1.93.2
26
26
  *
27
27
  * @constructor
28
28
  * @public
@@ -41,7 +41,7 @@ sap.ui.define([
41
41
  * @implements sap.uxap.IHeaderContent
42
42
  *
43
43
  * @author SAP SE
44
- * @version 1.91.0
44
+ * @version 1.93.2
45
45
  *
46
46
  * @constructor
47
47
  * @public
@@ -42,7 +42,7 @@ sap.ui.define([
42
42
  * @implements sap.uxap.IHeaderTitle
43
43
  *
44
44
  * @author SAP SE
45
- * @version 1.91.0
45
+ * @version 1.93.2
46
46
  *
47
47
  * @constructor
48
48
  * @public
@@ -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
  */
@@ -513,6 +551,10 @@ sap.ui.define([
513
551
  ObjectPageLayout.DIV = "div";
514
552
  ObjectPageLayout.HEADER = "header";
515
553
  ObjectPageLayout.FOOTER = "section";
554
+ ObjectPageLayout.FOOTER = "section";
555
+
556
+ // Synced with @_sap_f_DynamicPageHeader_PaddingBottom in base less file of DynamicPageHeader
557
+ ObjectPageLayout.HEADER_CONTENT_PADDING_BOTTOM = DomUnitsRem.toPx("1rem");
516
558
 
517
559
  ObjectPageLayout.SHOW_FOOTER_CLASS_NAME = "sapUxAPObjectPageFloatingFooterShow";
518
560
  ObjectPageLayout.HIDE_FOOTER_CLASS_NAME = "sapUxAPObjectPageFloatingFooterHide";
@@ -792,16 +834,16 @@ sap.ui.define([
792
834
  *
793
835
  * (2) If the <code>bAppendHeaderToContent</code> is <code>false</code>, then the
794
836
  * snapping is done by ensuring the header content is not visible using <code>display:none</code>
795
- *
837
+ * @param {boolean} bUserInteraction - indicates if snapping was caused by user interaction (scroll, collapse button press, etc.)
796
838
  * @private
797
839
  */
798
- ObjectPageLayout.prototype._snapHeader = function (bAppendHeaderToContent) {
840
+ ObjectPageLayout.prototype._snapHeader = function (bAppendHeaderToContent, bUserInteraction) {
799
841
 
800
842
  var bIsPageTop,
801
843
  oHeaderContent = this._getHeaderContent();
802
844
 
803
845
  if (oHeaderContent && oHeaderContent.supportsPinUnpin() && this._bPinned) {
804
- this._unPin();
846
+ this._unPin(bUserInteraction);
805
847
  oHeaderContent.getAggregation("_pinButton").setPressed(false);
806
848
  bAppendHeaderToContent = true;
807
849
  }
@@ -891,7 +933,7 @@ sap.ui.define([
891
933
  bAppendHeaderToContent = !this._shouldPreserveHeaderInTitleArea() &&
892
934
  (!this._bAllContentFitsContainer || this._headerBiggerThanAllowedToBeExpandedInTitleArea());
893
935
  // the <code>bAppendHeaderToContent</code> parameter determines if the header should snap *with* or *without* scroll
894
- this._snapHeader(bAppendHeaderToContent);
936
+ this._snapHeader(bAppendHeaderToContent, true);
895
937
  }
896
938
 
897
939
  this.getHeaderTitle()._getFocusSpan().trigger("focus");
@@ -1132,6 +1174,7 @@ sap.ui.define([
1132
1174
 
1133
1175
  if (oHeaderContent && oHeaderContent.supportsPinUnpin()) {
1134
1176
  this.$().toggleClass("sapUxAPObjectPageLayoutHeaderPinnable", oHeaderContent.getPinnable());
1177
+ this._updatePinButtonState();
1135
1178
  }
1136
1179
 
1137
1180
  if (oFooter) {
@@ -1221,7 +1264,7 @@ sap.ui.define([
1221
1264
  * (to avoid a problem with scrollbar appearing for a small instance
1222
1265
  * while we snap/unsnap header)
1223
1266
  * @private
1224
- * @param {Boolean} bEnable used to supress scrolling
1267
+ * @param {boolean} bEnable used to supress scrolling
1225
1268
  */
1226
1269
  ObjectPageLayout.prototype._toggleScrolling = function (bEnable) {
1227
1270
  if (this._$opWrapper.length) {
@@ -1915,7 +1958,7 @@ sap.ui.define([
1915
1958
  /**
1916
1959
  * Schedules for execution a layout adjustment task.
1917
1960
  * This task is throttled by default (unless the bImmediate parameter is specified).
1918
- * @param {Boolean} bImmediate - whether the task should be executed immediately, rather than throttled
1961
+ * @param {boolean} bImmediate - whether the task should be executed immediately, rather than throttled
1919
1962
  * @returns {Promise} - promise that will be resolved upon the task execution
1920
1963
  * @since 1.44
1921
1964
  * @private
@@ -2054,7 +2097,6 @@ sap.ui.define([
2054
2097
  this._oSectionInfo[oSectionBase.getId()] = {
2055
2098
  $dom: [],
2056
2099
  positionTop: 0,
2057
- positionTopMobile: 0,
2058
2100
  buttonId: "",
2059
2101
  isSection: (oSectionBase instanceof ObjectPageSection),
2060
2102
  sectionReference: oSectionBase
@@ -2259,9 +2301,7 @@ sap.ui.define([
2259
2301
 
2260
2302
  ObjectPageLayout.prototype._computeScrollPosition = function (oTargetSection) {
2261
2303
 
2262
- var bFirstLevel = oTargetSection && (oTargetSection instanceof ObjectPageSection),
2263
- sId = oTargetSection.getId(),
2264
- iScrollTo = this._bMobileScenario || bFirstLevel ? this._oSectionInfo[sId].positionTopMobile : this._oSectionInfo[sId].positionTop,
2304
+ var iScrollTo = this._oSectionInfo[oTargetSection.getId()].positionTop,
2265
2305
  bExpandedMode = !this._bStickyAnchorBar;
2266
2306
 
2267
2307
  if (bExpandedMode && this._isFirstVisibleSectionBase(oTargetSection)) { // preserve expanded header if no need to stick
@@ -2489,7 +2529,7 @@ sap.ui.define([
2489
2529
  this._aSectionBases.forEach(function (oSectionBase) {
2490
2530
  var oInfo = this._oSectionInfo[oSectionBase.getId()],
2491
2531
  $this = oSectionBase.$(),
2492
- $mobileAnchor,
2532
+ oSection,
2493
2533
  bPromoted = false;
2494
2534
 
2495
2535
  if (!oInfo /* sectionBase is visible */ || !$this.length) {
@@ -2509,29 +2549,18 @@ sap.ui.define([
2509
2549
  //the amount of scrolling required is the distance between their position().top and the bottom of the anchorBar
2510
2550
  oInfo.positionTop = Math.ceil(realTop);
2511
2551
 
2512
- //the amount of scrolling required for the mobile scenario
2513
- //we want to navigate just below its title
2514
- //as of UX specs Oct 7, 2014
2515
- if (oInfo.isSection) {
2516
- $mobileAnchor = oSectionBase.$("header");
2517
- } else {
2518
- $mobileAnchor = oSectionBase.$("headerTitle");
2519
- }
2520
-
2521
- bPromoted = $mobileAnchor.length === 0;
2522
-
2523
- //calculate the mobile position
2524
- if (!bPromoted) {
2525
- oInfo.positionTopMobile =
2526
- Math.ceil(library.Utilities.getChildPosition($mobileAnchor, this._$contentContainer).top)
2527
- + $mobileAnchor.outerHeight();
2528
- } else {
2529
- //title wasn't found (=first section, hidden title, promoted subsection), scroll to the same position as desktop
2530
- 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
+ }
2531
2561
  }
2532
2562
 
2533
2563
  if (!this._bStickyAnchorBar && !this._bHeaderInTitleArea) { // in sticky mode the anchor bar is not part of the content
2534
- oInfo.positionTopMobile -= this.iAnchorBarHeight;
2535
2564
  oInfo.positionTop -= this.iAnchorBarHeight;
2536
2565
  }
2537
2566
 
@@ -2579,7 +2608,7 @@ sap.ui.define([
2579
2608
  bIsFirstVisibleSubSection = bParentIsFirstVisibleSection && (iSubSectionIndex === 0); /* index of *visible* subSections is first */
2580
2609
  bIsFullscreenSection = oSectionBase.hasStyleClass(ObjectPageSubSection.FIT_CONTAINER_CLASS);
2581
2610
 
2582
- oSectionBase._setHeight(this._computeSubSectionHeight(bIsFirstVisibleSubSection, bIsFullscreenSection, oInfo.positionTop));
2611
+ oSectionBase._setHeight(this._computeSubSectionHeight(bIsFirstVisibleSubSection, bIsFullscreenSection, Math.ceil(realTop)));
2583
2612
  }
2584
2613
 
2585
2614
  }, this);
@@ -2752,13 +2781,14 @@ sap.ui.define([
2752
2781
  };
2753
2782
 
2754
2783
  ObjectPageLayout.prototype._getSectionPositionTop = function(oSectionBase, bShouldStick) {
2755
- var iPosition = Math.ceil(library.Utilities.getChildPosition(oSectionBase.$(), this._$contentContainer).top);
2784
+ var iCachedPosition = this._oSectionInfo[oSectionBase.getId()].positionTop;
2756
2785
 
2757
- if (!this._bStickyAnchorBar && !this._bHeaderInTitleArea && bShouldStick) { // in sticky mode the anchor bar is not part of the content
2758
- iPosition -= this.iAnchorBarHeight;
2786
+ // in expanded mode the anchorBar is still part of the content
2787
+ if (!this._bStickyAnchorBar && !this._bHeaderInTitleArea) {
2788
+ iCachedPosition += this.iAnchorBarHeight;
2759
2789
  }
2760
2790
 
2761
- return iPosition;
2791
+ return iCachedPosition;
2762
2792
  };
2763
2793
 
2764
2794
  ObjectPageLayout.prototype._getSectionPositionBottom = function(oSectionBase, bShouldStick) {
@@ -2794,8 +2824,8 @@ sap.ui.define([
2794
2824
 
2795
2825
  /**
2796
2826
  * Determines if the <code>ObjectPageLayout</code> should set <code>ObjectPageSectionBase</code> internal <code>titleLevel</code>.
2797
- * @param {Object} oSectionBase <code>ObjectPageSectionBase</code> instance
2798
- * @returns {Boolean}
2827
+ * @param {sap.uxap.ObjectPageSectionBase} oSectionBase <code>ObjectPageSectionBase</code> instance
2828
+ * @returns {boolean}
2799
2829
  * @since 1.44
2800
2830
  * @private
2801
2831
  */
@@ -2835,11 +2865,6 @@ sap.ui.define([
2835
2865
  //therefore we need to create enough space below the last subsection to get it displayed on top = the spacer
2836
2866
  //the "top" is just below the sticky header + anchorBar, therefore we just need enough space to get the last subsection below these elements
2837
2867
  iSpacerHeight = iScrollableViewportHeight - iLastVisibleHeight;
2838
-
2839
- //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
2840
- if (this._bMobileScenario) {
2841
- iSpacerHeight += (this._oSectionInfo[oLastVisibleSubSection.getId()].positionTopMobile - this._oSectionInfo[oLastVisibleSubSection.getId()].positionTop);
2842
- }
2843
2868
  } else {
2844
2869
  iSpacerHeight = 0;
2845
2870
  }
@@ -3600,7 +3625,7 @@ sap.ui.define([
3600
3625
  }
3601
3626
 
3602
3627
  if (this._hasDynamicTitle()) {
3603
- this._iHeaderContentPaddingBottom = DomUnitsRem.toPx(Parameters.get("_sap_f_DynamicPageHeader_PaddingBottom"));
3628
+ this._iHeaderContentPaddingBottom = ObjectPageLayout.HEADER_CONTENT_PADDING_BOTTOM;
3604
3629
  }
3605
3630
 
3606
3631
  return this;
@@ -4376,9 +4401,9 @@ sap.ui.define([
4376
4401
 
4377
4402
  ObjectPageLayout.prototype._onPinUnpinButtonPress = function () {
4378
4403
  if (this._bPinned) {
4379
- this._unPin();
4404
+ this._unPin(true);
4380
4405
  } else {
4381
- this._pin();
4406
+ this._pin(true);
4382
4407
  this._restorePinButtonFocus();
4383
4408
  }
4384
4409
  };
@@ -4395,14 +4420,16 @@ sap.ui.define([
4395
4420
  }
4396
4421
  };
4397
4422
 
4398
- ObjectPageLayout.prototype._pin = function () {
4399
- var $oObjectPage = this.$();
4400
-
4423
+ ObjectPageLayout.prototype._pin = function (bUserInteraction) {
4401
4424
  if (this._bPinned) {
4402
4425
  return;
4403
4426
  }
4404
4427
 
4405
4428
  this._bPinned = true;
4429
+ if (bUserInteraction) {
4430
+ this.setProperty("headerContentPinned", true, true);
4431
+ this.fireEvent("headerContentPinnedStateChange", {pinned: true});
4432
+ }
4406
4433
  this._toggleHeaderTitle(true /* expand */);
4407
4434
  this._moveAnchorBarToTitleArea();
4408
4435
  this._moveHeaderToTitleArea();
@@ -4410,23 +4437,38 @@ sap.ui.define([
4410
4437
  this._requestAdjustLayout();
4411
4438
  this._updateToggleHeaderVisualIndicators();
4412
4439
 
4413
- if (exists($oObjectPage)) {
4414
- $oObjectPage.addClass("sapUxAPObjectPageLayoutHeaderPinned");
4415
- }
4440
+ this.addStyleClass("sapUxAPObjectPageLayoutHeaderPinned");
4416
4441
  };
4417
4442
 
4418
- ObjectPageLayout.prototype._unPin = function () {
4419
- var $oObjectPage = this.$();
4420
-
4443
+ ObjectPageLayout.prototype._unPin = function (bUserInteraction) {
4421
4444
  if (!this._bPinned) {
4422
4445
  return;
4423
4446
  }
4424
4447
 
4425
4448
  this._bPinned = false;
4449
+ if (bUserInteraction) {
4450
+ this.setProperty("headerContentPinned", false, true);
4451
+ this.fireEvent("headerContentPinnedStateChange", {pinned: false});
4452
+ }
4426
4453
  this._updateToggleHeaderVisualIndicators();
4427
4454
 
4428
- if (exists($oObjectPage)) {
4429
- $oObjectPage.removeClass("sapUxAPObjectPageLayoutHeaderPinned");
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();
4430
4472
  }
4431
4473
  };
4432
4474
 
@@ -4879,4 +4921,4 @@ sap.ui.define([
4879
4921
  }
4880
4922
 
4881
4923
  return ObjectPageLayout;
4882
- });
4924
+ });
@@ -37,7 +37,7 @@ sap.ui.define([
37
37
  * @extends sap.ui.core.Element
38
38
  *
39
39
  * @author SAP SE
40
- * @version 1.91.0
40
+ * @version 1.93.2
41
41
  *
42
42
  * @constructor
43
43
  * @public
@@ -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 {Boolean}
204
+ * @returns {boolean}
205
205
  */
206
206
  ObjectPageSection.prototype._isTitleVisible = function () {
207
207
  return (this.getShowTitle() && this._getInternalTitleVisible())
@@ -437,7 +437,7 @@ sap.ui.define([
437
437
  * for the current screen size.
438
438
  *
439
439
  * @private
440
- * @returns {Boolean}
440
+ * @returns {boolean}
441
441
  */
442
442
  ObjectPageSectionBase.prototype._getIsHidden = function () {
443
443
  return this._isHidden;
@@ -215,6 +215,7 @@ sap.ui.define([
215
215
  "actions"
216
216
  ]
217
217
  });
218
+ this._oBlocksObserver = new ManagedObjectObserver(this._onBlocksChange.bind(this));
218
219
 
219
220
  //switch logic for the default mode
220
221
  this._switchSubSectionMode(this.getMode());
@@ -353,6 +354,16 @@ sap.ui.define([
353
354
  }
354
355
  };
355
356
 
357
+ ObjectPageSubSection.prototype._onBlocksChange = function () {
358
+ var oObjectPageLayout = this._getObjectPageLayout();
359
+
360
+ if (!this._bRenderedFirstTime) {
361
+ return;
362
+ }
363
+
364
+ this._applyLayout(oObjectPageLayout);
365
+ };
366
+
356
367
  /**
357
368
  * Starts observing the <code>visible</code> property.
358
369
  * @param {sap.ui.core.Control} oControl
@@ -460,6 +471,14 @@ sap.ui.define([
460
471
  });
461
472
  };
462
473
 
474
+ ObjectPageSubSection.prototype._unobserveBlocks = function() {
475
+ this.getBlocks().forEach(function (oBlock) {
476
+ oBlock && this._oBlocksObserver.unobserve(oBlock, {
477
+ properties: ["visible"]
478
+ });
479
+ }, this);
480
+ };
481
+
463
482
  ObjectPageSubSection.prototype.exit = function () {
464
483
  if (this._oSeeMoreButton) {
465
484
  this._oSeeMoreButton.destroy();
@@ -471,6 +490,8 @@ sap.ui.define([
471
490
  this._oSeeLessButton = null;
472
491
  }
473
492
 
493
+ this._unobserveBlocks();
494
+
474
495
  this._oCurrentlyVisibleSeeMoreLessButton = null;
475
496
 
476
497
  this._cleanProxiedAggregations();
@@ -519,6 +540,7 @@ sap.ui.define([
519
540
  ObjectPageSubSection.prototype._applyLayout = function (oLayoutProvider) {
520
541
  var aVisibleBlocks,
521
542
  oGrid = this._getGrid(),
543
+ oGridContent = oGrid.getAggregation("content"),
522
544
  sCurrentMode = this.getMode(),
523
545
  sLayout = oLayoutProvider.getSubSectionLayout(),
524
546
  oLayoutConfig = this._calculateLayoutConfiguration(sLayout, oLayoutProvider),
@@ -540,7 +562,11 @@ sap.ui.define([
540
562
  try {
541
563
  aVisibleBlocks.forEach(function (oBlock) {
542
564
  this._setBlockMode(oBlock, sCurrentMode);
543
- oGrid.addAggregation("content", oBlock, true); // this is always called onBeforeRendering so suppress invalidate
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
+ }
544
570
  }, this);
545
571
  } catch (sError) {
546
572
  Log.error("ObjectPageSubSection :: error while building layout " + sLayout + ": " + sError);
@@ -849,6 +875,28 @@ sap.ui.define([
849
875
  return this.addAggregation("blocks", oObject);
850
876
  };
851
877
 
878
+ ObjectPageSubSection.prototype.addBlock = function (oBlock) {
879
+ oBlock && this._oBlocksObserver.observe(oBlock, {
880
+ properties: ["visible"]
881
+ });
882
+
883
+ return this.addAggregation("blocks", oBlock);
884
+ };
885
+
886
+ ObjectPageSubSection.prototype.removeBlock = function (oBlock) {
887
+ oBlock && this._oBlocksObserver.unobserve(oBlock, {
888
+ properties: ["visible"]
889
+ });
890
+
891
+ return this.removeAggregation("blocks", oBlock);
892
+ };
893
+
894
+ ObjectPageSubSection.prototype.removeAllBlocks = function () {
895
+ this._unobserveBlocks();
896
+
897
+ return this.removeAllAggregation("blocks");
898
+ };
899
+
852
900
  /**
853
901
  * Adds an <code>sap.uxap.BlockBase</code> instance to the <code>moreBlocks</code> aggregation.
854
902
  *
@@ -957,8 +1005,7 @@ sap.ui.define([
957
1005
  this._oSeeMoreButton = new Button(this.getId() + "--seeMore", {
958
1006
  type: ButtonType.Transparent,
959
1007
  iconFirst: false,
960
- text: ObjectPageSubSection._getLibraryResourceBundle().getText("SHOW_MORE"),
961
- ariaLabelledBy: this.getId()
1008
+ text: ObjectPageSubSection._getLibraryResourceBundle().getText("SHOW_MORE")
962
1009
  }).addStyleClass("sapUxAPSubSectionSeeMoreButton").attachPress(this._seeMoreLessControlPressHandler, this);
963
1010
  }
964
1011
 
@@ -974,8 +1021,7 @@ sap.ui.define([
974
1021
  this._oSeeLessButton = new Button(this.getId() + "--seeLess", {
975
1022
  type: ButtonType.Transparent,
976
1023
  iconFirst: false,
977
- text: ObjectPageSubSection._getLibraryResourceBundle().getText("SHOW_LESS"),
978
- ariaLabelledBy: this.getId()
1024
+ text: ObjectPageSubSection._getLibraryResourceBundle().getText("SHOW_LESS")
979
1025
  }).addStyleClass("sapUxAPSubSectionSeeMoreButton").attachPress(this._seeMoreLessControlPressHandler, this);
980
1026
  }
981
1027
 
@@ -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.91.0
28
+ * @version 1.93.2
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 BaseAddIFrame.applyChange(oChange, oControl, mPropertyBag);
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 = oModifier.createControl("sap.uxap.ObjectPageSection", oComponent, oView, oBaseSelector, {
57
- title: sDefaultTitle
58
- }, false);
59
-
60
- var oOPSubSectionSelector = Object.create(oBaseSelector);
61
- oOPSubSectionSelector.id += "-subSection";
62
- var oOPSubSection = oModifier.createControl("sap.uxap.ObjectPageSubSection", oComponent, oView, oOPSubSectionSelector, {
63
- title: sDefaultTitle
64
- }, false);
65
- oModifier.insertAggregation(oOPSection, "subSections", oOPSubSection, 0, oView);
66
-
67
- var oIFrameSelector = Object.create(oBaseSelector);
68
- oIFrameSelector.id += "-iframe";
69
- var oIFrame = createIFrame(oChange, mPropertyBag, oIFrameSelector);
70
- oModifier.insertAggregation(oOPSubSection, "blocks", oIFrame, 0, oView);
71
-
72
- var iIndex = getTargetAggregationIndex(oChange, oControl, mPropertyBag);
73
- oModifier.insertAggregation(oControl, "sections", oOPSection, iIndex, oView);
74
-
75
- oChange.setRevertData([oModifier.getId(oOPSection)]);
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.91.0
16
+ * @version 1.93.2
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 MoveControls.completeChangeContent.apply(this, arguments);
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
- var oSection, oSectionParentInfo,
82
- oModifier = mPropertyBag.modifier,
83
- oLayout = oModifier.bySelector(mSpecificChangeInfo.selector, mPropertyBag.appComponent, mPropertyBag.view),
84
- aAnchoredSections = oLayout._getVisibleSections(); // sections that have anchors
85
-
86
- function getSectionForAnchor(sAnchorId) {
87
- var oAnchor = Core.byId(sAnchorId),
88
- sSectionId = oAnchor.data("sectionId");
89
- return Core.byId(sSectionId);
90
- }
91
-
92
- mSpecificChangeInfo.movedElements.forEach(function(oElement) {
93
- // adjust target index as invisible sections are not part of the anchor bar;
94
- var oSectionAtTargetIndex = aAnchoredSections[oElement.targetIndex];
95
- oElement.targetIndex = oModifier.findIndexInParentAggregation(oSectionAtTargetIndex);
96
-
97
- // replace the anchorBar with the section
98
- oSection = getSectionForAnchor(oElement.id);
99
- if (!oSection || !oSection.getParent()) {
100
- throw new Error("Cannot map anchor to section");
101
- }
102
- oSectionParentInfo = {
103
- id: oSection.getParent().getId(),
104
- aggregation: oSection.sParentAggregationName
105
- };
106
- oElement.id = oSection.getId();
107
- });
108
-
109
- merge(mSpecificChangeInfo.source, oSectionParentInfo);
110
- merge(mSpecificChangeInfo.target, oSectionParentInfo);
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.91.0
24
+ * @version 1.93.2
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 = oModifier.getAggregation(oControl, "subSections");
38
- // due to specific logic in the Object Page Layout, the title of the Section is
39
- // taken from its SubSection in case it is only one no matter if the Section has title itself.
40
- if (aSubSections
41
- && aSubSections.length === 1
42
- && (oModifier.getPropertyBindingOrProperty(aSubSections[0], "title"))
43
- && oModifier.getProperty(oModifier.getParent(oControl), "subSectionLayout") === "TitleOnTop"
44
- ) {
45
- return aSubSections[0];
46
- }
47
- return oControl;
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
- sPropertyName = mRenameSettings.propertyName,
53
- oChangeDefinition = oChange.getDefinition(),
54
- sText = oChangeDefinition.texts[mRenameSettings.changePropertyName],
55
- sValue = sText.value,
56
- oControlToBeRenamed = RenameObjectPageSection._getControlForRename(oControl, oModifier);
57
-
58
- if (typeof sValue === "string" && sValue.trim() === "") {
59
- throw new Error("Change cannot be applied as ObjectPageSubSection's title cannot be empty: ["
60
- + oChangeDefinition.layer + "]" + oChangeDefinition.namespace + "/" + oChangeDefinition.fileName + "." + oChangeDefinition.fileType);
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
- return true;
68
- } else {
69
- Log.error("Change does not contain sufficient information to be applied: [" + oChangeDefinition.layer + "]" + oChangeDefinition.namespace + "/" + oChangeDefinition.fileName + "." + oChangeDefinition.fileType);
70
- //however subsequent changes should be applied
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
- if (vOldText || vOldText === "") {
81
- oModifier.setPropertyBindingOrProperty(oControlToBeReverted, sPropertyName, vOldText);
82
- oChange.resetRevertData();
83
-
84
- return true;
85
- } else {
86
- Log.error("Change doesn't contain sufficient information to be reverted. Most Likely the Change didn't go through applyChange.");
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
 
@@ -12,6 +12,7 @@ sap.ui.define([
12
12
  "sap/ui/base/DataType",
13
13
  "sap/ui/Device",
14
14
  "sap/ui/core/library", // library dependency
15
+ "sap/f/library", // library dependency
15
16
  "sap/m/library", // library dependency
16
17
  "sap/ui/layout/library" // library dependency
17
18
  ], function(Core, DataType, Device) {
@@ -22,6 +23,9 @@ sap.ui.define([
22
23
  *
23
24
  * @namespace
24
25
  * @name sap.uxap
26
+ * @author SAP SE
27
+ * @version 1.93.2
28
+ * @since 1.36
25
29
  * @public
26
30
  */
27
31
  // library dependencies
@@ -65,7 +69,7 @@ sap.ui.define([
65
69
  "sap.uxap.ObjectPageHeaderLayoutData",
66
70
  "sap.uxap.ObjectPageLazyLoader"
67
71
  ],
68
- version: "1.91.0",
72
+ version: "1.93.2",
69
73
  extensions: {
70
74
  flChangeHandlers: {
71
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=Position aktivieren, um zum Abschnitt auf der Seite zu springen
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
 
@@ -5,7 +5,7 @@ SHOW_LESS=Afficher moins
5
5
 
6
6
  ANCHOR_BAR_ARIA_LABEL=Ancres
7
7
 
8
- ANCHOR_BAR_ARIA_LABEL_DESC=Activer le poste pour acc\u00E9der \u00E0 la section de la page
8
+ ANCHOR_BAR_ARIA_LABEL_DESC=Activer l'\u00E9l\u00E9ment pour acc\u00E9der \u00E0 la section de la page
9
9
 
10
10
  ANCHOR_BAR_OVERFLOW=Plus
11
11
 
@@ -5,7 +5,7 @@ SHOW_LESS=Minder weerg.
5
5
 
6
6
  ANCHOR_BAR_ARIA_LABEL=Ankers
7
7
 
8
- ANCHOR_BAR_ARIA_LABEL_DESC=Activeer positie om naar sectie op pagina te gaan
8
+ ANCHOR_BAR_ARIA_LABEL_DESC=Activeer element om naar sectie op pagina te gaan
9
9
 
10
10
  ANCHOR_BAR_OVERFLOW=Meer
11
11
 
@@ -19,7 +19,7 @@ SHOW=Weerg.
19
19
 
20
20
  HIDE=Verbergen
21
21
 
22
- EDIT_HEADER=Kopgegevens bewerken
22
+ EDIT_HEADER=Kop bewerken
23
23
 
24
24
  TOOLTIP_OP_FLAG_MARK_VALUE=Gemarkeerd
25
25
 
@@ -63,7 +63,7 @@ SECTION_CONTROL_NAME_PLURAL=Secties
63
63
 
64
64
  SECTION_TITLE_FOR_IFRAME=Ingesloten inhoud
65
65
 
66
- HEADER_CONTROL_NAME=Kopregel
66
+ HEADER_CONTROL_NAME=Kop
67
67
 
68
68
  SUBSECTION_CONTROL_NAME=Subsectie
69
69
 
@@ -5,7 +5,7 @@ SHOW_LESS=Vis mindre
5
5
 
6
6
  ANCHOR_BAR_ARIA_LABEL=Anker
7
7
 
8
- ANCHOR_BAR_ARIA_LABEL_DESC=Aktiver elementet for \u00E5 g\u00E5 til avsnittet p\u00E5 siden
8
+ ANCHOR_BAR_ARIA_LABEL_DESC=Aktiver posisjon for \u00E5 g\u00E5 til avsnittet p\u00E5 siden
9
9
 
10
10
  ANCHOR_BAR_OVERFLOW=Mer
11
11
 
@@ -115,16 +115,16 @@ sap.ui.define(["sap/ui/support/library"],
115
115
  sHeaderId = oHeaderTitle.getId();
116
116
 
117
117
  if (bShowTitleInHeaderContent) {
118
- if (!!oHeaderTitle.getObjectImageURI() && bIsObjectIconAlwaysVisible) {
118
+ if (oHeaderTitle.getObjectImageURI() && bIsObjectIconAlwaysVisible) {
119
119
  addIssueBuilder(sHeaderName, sHeaderId, "Icon");
120
120
 
121
121
  }
122
122
 
123
- if (!!oHeaderTitle.getObjectTitle() && bIsObjectTitleAlwaysVisible) {
123
+ if (oHeaderTitle.getObjectTitle() && bIsObjectTitleAlwaysVisible) {
124
124
  addIssueBuilder(sHeaderName, sHeaderId, "Title");
125
125
  }
126
126
 
127
- if (!!oHeaderTitle.getObjectSubtitle() && bIsObjectSubtitleAlwaysVisible) {
127
+ if (oHeaderTitle.getObjectSubtitle() && bIsObjectSubtitleAlwaysVisible) {
128
128
  addIssueBuilder(sHeaderName, sHeaderId, "SubTitle");
129
129
  }
130
130
  }