@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 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.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
@@ -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.92.0",
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.92.0",
18
- "@openui5/sap.m": "1.92.0",
19
- "@openui5/sap.ui.core": "1.92.0",
20
- "@openui5/sap.ui.layout": "1.92.0"
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
  }
@@ -3,7 +3,7 @@
3
3
 
4
4
  <name>sap.uxap</name>
5
5
  <vendor>SAP SE</vendor>
6
- <version>1.92.0</version>
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 {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.92.0
24
+ * @version 1.93.3
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.92.0
25
+ * @version 1.93.3
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.92.0
44
+ * @version 1.93.3
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.92.0
45
+ * @version 1.93.3
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
  */
@@ -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 {Boolean} bEnable used to supress scrolling
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 {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
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 bFirstLevel = oTargetSection && (oTargetSection instanceof ObjectPageSection),
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
- $mobileAnchor,
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
- //the amount of scrolling required for the mobile scenario
2517
- //we want to navigate just below its title
2518
- //as of UX specs Oct 7, 2014
2519
- if (oInfo.isSection) {
2520
- $mobileAnchor = oSectionBase.$("header");
2521
- } else {
2522
- $mobileAnchor = oSectionBase.$("headerTitle");
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, oInfo.positionTop));
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 iPosition = Math.ceil(library.Utilities.getChildPosition(oSectionBase.$(), this._$contentContainer).top);
2784
+ var iCachedPosition = this._oSectionInfo[oSectionBase.getId()].positionTop;
2760
2785
 
2761
- if (!this._bStickyAnchorBar && !this._bHeaderInTitleArea && bShouldStick) { // in sticky mode the anchor bar is not part of the content
2762
- 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;
2763
2789
  }
2764
2790
 
2765
- return iPosition;
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 {Object} oSectionBase <code>ObjectPageSectionBase</code> instance
2802
- * @returns {Boolean}
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
- if (exists($oObjectPage)) {
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
- if (exists($oObjectPage)) {
4433
- $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();
4434
4472
  }
4435
4473
  };
4436
4474
 
@@ -4883,4 +4921,4 @@ sap.ui.define([
4883
4921
  }
4884
4922
 
4885
4923
  return ObjectPageLayout;
4886
- });
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.92.0
40
+ * @version 1.93.3
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;
@@ -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
- 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
+ }
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.92.0
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 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.92.0
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 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.92.0
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 = 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
 
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @namespace
25
25
  * @name sap.uxap
26
26
  * @author SAP SE
27
- * @version 1.92.0
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.92.0",
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=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