@syncfusion/ej2-navigations 28.1.35 → 28.1.37

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.
@@ -1379,6 +1379,7 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
1379
1379
  this.delegateMouseDownHandler = this.mouseDownHandler.bind(this);
1380
1380
  EventHandler.add(this.isMenu ? document : wrapper, 'mouseover', this.delegateMoverHandler, this);
1381
1381
  EventHandler.add(document, 'mousedown', this.delegateMouseDownHandler, this);
1382
+ EventHandler.add(document, 'keydown', this.domKeyHandler, this);
1382
1383
  if (!this.isMenu && !this.target) {
1383
1384
  EventHandler.add(document, 'scroll', this.scrollHandler, this);
1384
1385
  }
@@ -1420,6 +1421,12 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
1420
1421
  }
1421
1422
  }
1422
1423
  };
1424
+ MenuBase.prototype.domKeyHandler = function (e) {
1425
+ if (e.keyCode === 27) {
1426
+ e.action = ESCAPE;
1427
+ this.leftEscKeyHandler(e);
1428
+ }
1429
+ };
1423
1430
  MenuBase.prototype.keyBoardHandler = function (e) {
1424
1431
  var actionName = '';
1425
1432
  var trgt = e.target;
@@ -1485,9 +1492,6 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
1485
1492
  this.rightEnterKeyHandler(e);
1486
1493
  }
1487
1494
  break;
1488
- case ESCAPE:
1489
- this.leftEscKeyHandler(e);
1490
- break;
1491
1495
  }
1492
1496
  if (actionNeeded) {
1493
1497
  e.action = actionName;
@@ -2065,6 +2069,7 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2065
2069
  element: ul, items: items, parentItem: item, event: e, cancel: false, top: top, left: left, showSubMenuOn: 'Auto'
2066
2070
  };
2067
2071
  var menuType = type;
2072
+ var observedElement;
2068
2073
  this.trigger('beforeOpen', eventArgs, function (observedOpenArgs) {
2069
2074
  switch (menuType) {
2070
2075
  case 'menu':
@@ -2114,6 +2119,10 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2114
2119
  _this.top = observedOpenArgs.top;
2115
2120
  _this.left = observedOpenArgs.left;
2116
2121
  _this.isContextMenuClosed = true;
2122
+ observedElement = observedOpenArgs.element;
2123
+ if (_this.enableScrolling && _this.isCMenu && observedElement && observedElement.parentElement) {
2124
+ observedElement.style.height = observedElement.parentElement.style.height;
2125
+ }
2117
2126
  break;
2118
2127
  case 'hamburger':
2119
2128
  if (!observedOpenArgs.cancel) {
@@ -2294,6 +2303,9 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2294
2303
  }
2295
2304
  }
2296
2305
  this.toggleVisiblity(ul, false);
2306
+ if (this.isCMenu && this.enableScrolling && ul) {
2307
+ ul.style.height = '';
2308
+ }
2297
2309
  var wrapper = closest(this.element, '.e-' + this.getModuleName() + '-wrapper');
2298
2310
  if (!this.isMenu && this.enableScrolling && ul && wrapper && wrapper.offsetHeight > 0) {
2299
2311
  var menuVScroll = closest(ul, '.e-menu-vscroll');
@@ -3015,6 +3027,7 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
3015
3027
  if (!Browser.isDevice) {
3016
3028
  EventHandler.remove(this.isMenu ? document : wrapper, 'mouseover', this.delegateMoverHandler);
3017
3029
  EventHandler.remove(document, 'mousedown', this.delegateMouseDownHandler);
3030
+ EventHandler.remove(document, 'keydown', this.domKeyHandler);
3018
3031
  if (!this.isMenu && !this.target) {
3019
3032
  EventHandler.remove(document, 'scroll', this.scrollHandler);
3020
3033
  }
@@ -3182,7 +3195,9 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
3182
3195
  level = isCallBack ? level + 1 : 0;
3183
3196
  for (var i = 0, len = items.length; i < len; i++) {
3184
3197
  item = items[i];
3198
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3185
3199
  var currentField = isUniqueId ? item[this.getField('itemId', level)] : item[this.getField('text', level)];
3200
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3186
3201
  var itemId = (item.htmlAttributes && 'id' in item.htmlAttributes) ? item.htmlAttributes.id : currentField;
3187
3202
  if (itemId === data) {
3188
3203
  nIndex.push(i);
@@ -10191,6 +10206,10 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
10191
10206
  * @returns {void}
10192
10207
  */
10193
10208
  Tab.prototype.refreshActiveTabBorder = function () {
10209
+ if (this.heightAdjustMode === 'None' && this.height !== 'auto' && this.cntEle && !this.isVertical()) {
10210
+ var hdrEle = this.getTabHeader();
10211
+ setStyleAttribute(this.cntEle, { 'height': (this.element.clientHeight - hdrEle.offsetHeight) + 'px' });
10212
+ }
10194
10213
  var activeEle = select('.' + CLS_TB_ITEM + '.' + CLS_TB_POPUP + '.' + CLS_ACTIVE$1, this.element);
10195
10214
  if (!isNullOrUndefined(activeEle) && this.reorderActiveTab) {
10196
10215
  this.select(this.getEleIndex(activeEle));
@@ -14076,7 +14095,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
14076
14095
  this.renderChildNodes(dropLi);
14077
14096
  }
14078
14097
  dropUl = select('.' + PARENTITEM, dropLi);
14079
- if (!isNullOrUndefined(dropUl) && this.preventExpand === true) {
14098
+ if (!isNullOrUndefined(dropUl) && (this.preventExpand && !(dropLi.getAttribute('aria-expanded') === 'true'))) {
14080
14099
  dropUl.style.display = 'none';
14081
14100
  }
14082
14101
  if (!isNullOrUndefined(dropUl) && this.preventExpand === false) {
@@ -14124,7 +14143,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
14124
14143
  this.trigger('nodeExpanded', this.getExpandEvent(dropLi, null));
14125
14144
  }
14126
14145
  var collapseIcon = select('div.' + COLLAPSIBLE, dropLi);
14127
- if (!isNullOrUndefined(dropUl) && collapseIcon && this.preventExpand) {
14146
+ if (!isNullOrUndefined(dropUl) && collapseIcon && (this.preventExpand && !(dropLi.getAttribute('aria-expanded') === 'true'))) {
14128
14147
  removeClass([collapseIcon], COLLAPSIBLE);
14129
14148
  dropLi.setAttribute('aria-expanded', 'false');
14130
14149
  addClass([collapseIcon], EXPANDABLE);
@@ -18590,6 +18609,9 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
18590
18609
  addClass([].slice.call(navigator.childNodes), CLS_HOVER_ARROWS);
18591
18610
  }
18592
18611
  removeClass([this.element], CLS_HOVER);
18612
+ if (this.isSwipe) {
18613
+ this.swipStop();
18614
+ }
18593
18615
  break;
18594
18616
  }
18595
18617
  this.autoSlide();