@openui5/sap.uxap 1.84.18 → 1.84.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.uxap",
3
- "version": "1.84.18",
3
+ "version": "1.84.19",
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.84.18",
18
- "@openui5/sap.m": "1.84.18",
19
- "@openui5/sap.ui.core": "1.84.18",
20
- "@openui5/sap.ui.layout": "1.84.18"
17
+ "@openui5/sap.f": "1.84.19",
18
+ "@openui5/sap.m": "1.84.19",
19
+ "@openui5/sap.ui.core": "1.84.19",
20
+ "@openui5/sap.ui.layout": "1.84.19"
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.84.18</version>
6
+ <version>1.84.19</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>
@@ -101,6 +101,28 @@ sap.ui.define([
101
101
  }
102
102
  });
103
103
 
104
+ AnchorBar.ButtonDelegate = {
105
+ onAfterRendering: function () {
106
+ var oButton = this.isA("sap.m.MenuButton") ? this._getButtonControl() : this,
107
+ bSelected = this.hasStyleClass("sapUxAPAnchorBarButtonSelected");
108
+
109
+ // set ARIA has-popup if button opens submenu
110
+ if (this.data("bHasSubMenu")) {
111
+ oButton.$().attr("aria-haspopup", "menu");
112
+
113
+ // although the inner (arrow like) buttons are not focusable
114
+ // set role 'none' since it is not allowed nesting
115
+ // them in elements with role 'option'
116
+ oButton.$().find(".sapMBtn")
117
+ .attr("role", "none")
118
+ // remove ARIA has-popup from inner elements
119
+ // since they are not receiving any focus
120
+ .removeAttr('aria-haspopup');
121
+ }
122
+ // set ARIA attributes of main buttons
123
+ oButton.$().attr("aria-controls", this.data("sectionId")).attr("aria-selected", bSelected);
124
+ }
125
+ };
104
126
 
105
127
  AnchorBar.prototype.init = function () {
106
128
  if (Toolbar.prototype.init) {
@@ -262,12 +284,21 @@ sap.ui.define([
262
284
  if (bIsSecondLevel) {
263
285
  oButton.destroy();
264
286
  } else {
287
+ oButton.addEventDelegate(AnchorBar.ButtonDelegate, oButton);
265
288
  this.addAggregation("content", oButton, bInvalidate);
266
289
  }
267
290
 
268
291
  return this;
269
292
  };
270
293
 
294
+ AnchorBar.prototype._removeButtonsDelegate = function () {
295
+ var aContent = this.getContent();
296
+
297
+ aContent.forEach(function (oButton) {
298
+ oButton.removeEventDelegate(AnchorBar.ButtonDelegate);
299
+ });
300
+ };
301
+
271
302
  AnchorBar.prototype._createSelectItem = function (oButton, bIsSecondLevel) {
272
303
  //create the phone equivalent item if the button has some visible text (UX rule)
273
304
  var oBindingInfo = oButton.getBindingInfo("text"),
@@ -921,24 +952,6 @@ sap.ui.define([
921
952
  };
922
953
 
923
954
  AnchorBar.prototype._computeNextSectionInfo = function (oContent) {
924
- var oButton = oContent.isA("sap.m.MenuButton") ? oContent._getButtonControl() : oContent,
925
- bSelected = oContent.hasStyleClass("sapUxAPAnchorBarButtonSelected");
926
-
927
- // set ARIA has-popup if button opens submenu
928
- if (oContent.data("bHasSubMenu")) {
929
- oButton.$().attr("aria-haspopup", "menu");
930
-
931
- // set role 'group' to inner button element since
932
- // its not allow nesting them in elements with role 'option'
933
- oButton.$().find(".sapMBtn")
934
- .attr("role", "group")
935
- // remove ARIA has-popup from inner elements
936
- // since they are not receiving any focus
937
- .removeAttr('aria-haspopup');
938
- }
939
- // set ARIA attributes of main buttons
940
- oButton.$().attr("aria-controls", oContent.data("sectionId")).attr("aria-selected", bSelected);
941
-
942
955
  var iWidth = oContent.$().outerWidth(true);
943
956
 
944
957
  //store info on the various sections for horizontalScrolling
@@ -971,6 +984,7 @@ sap.ui.define([
971
984
  };
972
985
 
973
986
  AnchorBar.prototype._resetControl = function () {
987
+ this._removeButtonsDelegate();
974
988
  this.destroyAggregation('content');
975
989
  this._oSelect.destroyAggregation("items", true);
976
990
 
@@ -1025,6 +1039,8 @@ sap.ui.define([
1025
1039
  clearTimeout(this._iComputeContentSizeTimeout);
1026
1040
  this._iComputeContentSizeTimeout = null;
1027
1041
  }
1042
+
1043
+ this._removeButtonsDelegate();
1028
1044
  };
1029
1045
 
1030
1046
  /**
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  *
22
22
  * @class
23
23
  * @author SAP SE
24
- * @version 1.84.18
24
+ * @version 1.84.19
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.84.18
25
+ * @version 1.84.19
26
26
  *
27
27
  * @constructor
28
28
  * @public
@@ -49,7 +49,7 @@ sap.ui.define([
49
49
  * @implements sap.uxap.IHeaderContent
50
50
  *
51
51
  * @author SAP SE
52
- * @version 1.84.18
52
+ * @version 1.84.19
53
53
  *
54
54
  * @constructor
55
55
  * @public
@@ -49,7 +49,7 @@ sap.ui.define([
49
49
  * @implements sap.uxap.IHeaderTitle
50
50
  *
51
51
  * @author SAP SE
52
- * @version 1.84.18
52
+ * @version 1.84.19
53
53
  *
54
54
  * @constructor
55
55
  * @public
@@ -37,7 +37,7 @@ sap.ui.define([
37
37
  * @extends sap.ui.core.Element
38
38
  *
39
39
  * @author SAP SE
40
- * @version 1.84.18
40
+ * @version 1.84.19
41
41
  *
42
42
  * @constructor
43
43
  * @public
@@ -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.84.18
28
+ * @version 1.84.19
29
29
  * @since 1.75
30
30
  * @experimental Since 1.75
31
31
  */
@@ -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.84.18
16
+ * @version 1.84.19
17
17
  * @experimental Since 1.54
18
18
  */
19
19
 
@@ -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.84.18
24
+ * @version 1.84.19
25
25
  * @experimental Since 1.50
26
26
  */
27
27
 
@@ -65,7 +65,7 @@ sap.ui.define([
65
65
  "sap.uxap.ObjectPageHeaderLayoutData",
66
66
  "sap.uxap.ObjectPageLazyLoader"
67
67
  ],
68
- version: "1.84.18",
68
+ version: "1.84.19",
69
69
  extensions: {
70
70
  flChangeHandlers: {
71
71
  "sap.uxap.ObjectPageHeader": "sap/uxap/flexibility/ObjectPageHeader",