@syncfusion/ej2-navigations 27.1.50 → 27.1.52

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.
@@ -3193,6 +3193,8 @@ let MenuBase = class MenuBase extends Component {
3193
3193
  idx = navIdx.pop();
3194
3194
  iitems = this.getItems(navIdx);
3195
3195
  menuitem = new MenuItem(iitems[0], 'items', items[i], true);
3196
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3197
+ menuitem.parentObj = iitems[0].parentObj;
3196
3198
  iitems.splice(isAfter ? idx + 1 : idx, 0, menuitem);
3197
3199
  const uls = this.isMenu ? [this.getWrapper()].concat(this.getPopups()) : [].slice.call(this.getWrapper().children);
3198
3200
  if (!isNullOrUndefined(idx) && navIdx.length < uls.length) {
@@ -12563,7 +12565,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
12563
12565
  const nextNode = isTowards ? this.getNextNode(li) : this.getPrevNode(li);
12564
12566
  this.setFocus(li, nextNode);
12565
12567
  this.navigateToFocus(!isTowards);
12566
- if (nextNode.classList.contains('e-disable') || nextNode.classList.contains('e-prevent')) {
12568
+ if (nextNode.classList.contains('e-disable')) {
12567
12569
  const lastChild = nextNode.lastChild;
12568
12570
  if (nextNode.previousSibling == null && nextNode.classList.contains('e-level-1')) {
12569
12571
  this.focusNextNode(nextNode, true);
@@ -12624,7 +12626,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
12624
12626
  setFocus(preNode, nextNode) {
12625
12627
  removeClass([preNode], FOCUS);
12626
12628
  preNode.setAttribute('tabindex', '-1');
12627
- if (!nextNode.classList.contains('e-disable') && !nextNode.classList.contains(PREVENTSELECT)) {
12629
+ if (!nextNode.classList.contains('e-disable')) {
12628
12630
  addClass([nextNode], FOCUS);
12629
12631
  nextNode.setAttribute('tabindex', '0');
12630
12632
  nextNode.focus();
@@ -12643,7 +12645,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
12643
12645
  focusIn() {
12644
12646
  if (!this.mouseDownStatus) {
12645
12647
  const focusedElement = this.getFocusedNode();
12646
- if (focusedElement.classList.contains('e-disable') || focusedElement.classList.contains('e-prevent')) {
12648
+ if (focusedElement.classList.contains('e-disable')) {
12647
12649
  focusedElement.setAttribute('tabindex', '-1');
12648
12650
  this.navigateNode(true);
12649
12651
  }
@@ -13103,16 +13105,18 @@ let TreeView = TreeView_1 = class TreeView extends Component {
13103
13105
  this.dragStartAction = false;
13104
13106
  }
13105
13107
  getOffsetX(event, target) {
13106
- if (event instanceof TouchEvent && event.changedTouches.length > 0) {
13107
- return event.changedTouches[0].clientX - target.getBoundingClientRect().left;
13108
+ const touchList = event.changedTouches;
13109
+ if (touchList && touchList.length > 0) {
13110
+ return touchList[0].clientX - target.getBoundingClientRect().left;
13108
13111
  }
13109
13112
  else {
13110
13113
  return event.offsetX;
13111
13114
  }
13112
13115
  }
13113
13116
  getOffsetY(event, target) {
13114
- if (event instanceof TouchEvent && event.changedTouches.length > 0) {
13115
- return event.changedTouches[0].clientY - target.getBoundingClientRect().top;
13117
+ const touchList = event.changedTouches;
13118
+ if (touchList && touchList.length > 0) {
13119
+ return touchList[0].clientY - target.getBoundingClientRect().top;
13116
13120
  }
13117
13121
  else {
13118
13122
  return event.offsetY;
@@ -18761,7 +18765,7 @@ let Stepper = class Stepper extends StepperBase {
18761
18765
  if (this.stepperItemList && this.progressbar && this.element.classList.contains(HORIZSTEP)) {
18762
18766
  this.setProgressPosition(this.element, true);
18763
18767
  }
18764
- this.navigateToStep(this.activeStep, null, null, false);
18768
+ this.navigateToStep(this.activeStep, null, null, false, false);
18765
18769
  }
18766
18770
  updateStepFocus() {
18767
18771
  if (this.isKeyNavFocus) {
@@ -19465,7 +19469,7 @@ let Stepper = class Stepper extends StepperBase {
19465
19469
  if (this.stepperItemList && this.progressbar) {
19466
19470
  this.setProgressPosition(this.element);
19467
19471
  }
19468
- this.navigateToStep(this.activeStep, null, null, false);
19472
+ this.navigateToStep(this.activeStep, null, null, false, false);
19469
19473
  }
19470
19474
  updateElementClassArray() {
19471
19475
  const classArray = [RTL$3, READONLY, 'e-steps-focus', LABELAFTER, LABELBEFORE, 'e-label-top',