@syncfusion/ej2-navigations 35.1.42 → 35.1.43

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 35.1.42
3
+ * version : 35.1.43
4
4
  * Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncfusion/ej2-navigations",
3
- "version": "35.1.42",
3
+ "version": "35.1.43",
4
4
  "description": "A package of Essential JS 2 navigation components such as Tree-view, Tab, Toolbar, Context-menu, and Accordion which is used to navigate from one page to another",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -11,8 +11,8 @@
11
11
  "@syncfusion/ej2-base": "~35.1.37",
12
12
  "@syncfusion/ej2-buttons": "~35.1.41",
13
13
  "@syncfusion/ej2-data": "~35.1.37",
14
- "@syncfusion/ej2-inputs": "~35.1.42",
15
- "@syncfusion/ej2-lists": "~35.1.37",
14
+ "@syncfusion/ej2-inputs": "~35.1.43",
15
+ "@syncfusion/ej2-lists": "~35.1.43",
16
16
  "@syncfusion/ej2-notifications": "~35.1.37",
17
17
  "@syncfusion/ej2-popups": "~35.1.42"
18
18
  },
@@ -508,6 +508,7 @@ export declare class Toolbar extends Component<HTMLElement> implements INotifyPr
508
508
  private buttonRendering;
509
509
  private renderSubComponent;
510
510
  private getDataTabindex;
511
+ private isDropDownList;
511
512
  private itemClick;
512
513
  private activeEleSwitch;
513
514
  private activeEleRemove;
@@ -448,10 +448,15 @@ var Toolbar = /** @class */ (function (_super) {
448
448
  return;
449
449
  }
450
450
  if (rootEle === trgt) {
451
- this.elementFocus(clst);
451
+ if (this.isDropDownList(clst.firstElementChild)) {
452
+ this.eleFocus(clst, 'next', true);
453
+ }
454
+ else {
455
+ this.elementFocus(clst);
456
+ }
452
457
  }
453
458
  else if (!navChk) {
454
- this.eleFocus(clst, 'next');
459
+ this.eleFocus(clst, 'next', true);
455
460
  }
456
461
  break;
457
462
  case 'moveLeft':
@@ -459,7 +464,7 @@ var Toolbar = /** @class */ (function (_super) {
459
464
  return;
460
465
  }
461
466
  if (!navChk) {
462
- this.eleFocus(clst, 'previous');
467
+ this.eleFocus(clst, 'previous', true);
463
468
  }
464
469
  break;
465
470
  case 'home':
@@ -650,12 +655,14 @@ var Toolbar = /** @class */ (function (_super) {
650
655
  }
651
656
  return element;
652
657
  };
653
- Toolbar.prototype.eleFocus = function (closest, pos) {
658
+ Toolbar.prototype.eleFocus = function (closest, pos, skipDropDownList) {
659
+ if (skipDropDownList === void 0) { skipDropDownList = false; }
654
660
  var sib = Object(closest)[pos + 'ElementSibling'];
655
661
  if (sib) {
656
- var skipEle = this.eleContains(sib);
662
+ var skipEle = this.eleContains(sib) ||
663
+ (skipDropDownList && this.isDropDownList(sib.firstElementChild));
657
664
  if (skipEle) {
658
- this.eleFocus(sib, pos);
665
+ this.eleFocus(sib, pos, skipDropDownList);
659
666
  return;
660
667
  }
661
668
  this.elementFocus(sib);
@@ -668,8 +675,8 @@ var Toolbar = /** @class */ (function (_super) {
668
675
  if (!isNOU(elem) && elem.children.length > 0) {
669
676
  if (pos === 'next') {
670
677
  var el = elem.querySelector('.' + CLS_ITEM);
671
- if (this.eleContains(el)) {
672
- this.eleFocus(el, pos);
678
+ if (this.eleContains(el) || (skipDropDownList && this.isDropDownList(el.firstElementChild))) {
679
+ this.eleFocus(el, pos, skipDropDownList);
673
680
  }
674
681
  else {
675
682
  el.firstElementChild.focus();
@@ -678,8 +685,8 @@ var Toolbar = /** @class */ (function (_super) {
678
685
  }
679
686
  else {
680
687
  var el = elem.lastElementChild;
681
- if (this.eleContains(el)) {
682
- this.eleFocus(el, pos);
688
+ if (this.eleContains(el) || (skipDropDownList && this.isDropDownList(el.firstElementChild))) {
689
+ this.eleFocus(el, pos, skipDropDownList);
683
690
  }
684
691
  else {
685
692
  this.elementFocus(el);
@@ -690,10 +697,24 @@ var Toolbar = /** @class */ (function (_super) {
690
697
  else if (!isNOU(closest)) {
691
698
  var tbrItems = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + ')' + ':not(.' + CLS_DISABLE + ')' + ':not(.' + CLS_HIDDEN + ')');
692
699
  if (pos === 'next' && tbrItems) {
693
- this.elementFocus(tbrItems[0]);
700
+ var index = 0;
701
+ while (skipDropDownList && index < tbrItems.length &&
702
+ this.isDropDownList(tbrItems[index].firstElementChild)) {
703
+ index++;
704
+ }
705
+ if (index < tbrItems.length) {
706
+ this.elementFocus(tbrItems[index]);
707
+ }
694
708
  }
695
709
  else if (pos === 'previous' && tbrItems) {
696
- this.elementFocus(tbrItems[tbrItems.length - 1]);
710
+ var index = tbrItems.length - 1;
711
+ while (skipDropDownList && index >= 0 &&
712
+ this.isDropDownList(tbrItems[index].firstElementChild)) {
713
+ index--;
714
+ }
715
+ if (index >= 0) {
716
+ this.elementFocus(tbrItems[index]);
717
+ }
697
718
  }
698
719
  }
699
720
  };
@@ -2040,7 +2061,9 @@ var Toolbar = /** @class */ (function (_super) {
2040
2061
  this.add(innerEle, CLS_TEMPLATE);
2041
2062
  var firstChild = innerEle.firstElementChild;
2042
2063
  if (!isNOU(firstChild)) {
2043
- firstChild.setAttribute('tabindex', isNOU(firstChild.getAttribute('tabIndex')) ? '-1' : this.getDataTabindex(firstChild));
2064
+ if (!this.isDropDownList(firstChild)) {
2065
+ firstChild.setAttribute('tabindex', isNOU(firstChild.getAttribute('tabIndex')) ? '-1' : this.getDataTabindex(firstChild));
2066
+ }
2044
2067
  firstChild.setAttribute('data-tabindex', isNOU(firstChild.getAttribute('tabIndex')) ? '-1' : this.getDataTabindex(firstChild));
2045
2068
  }
2046
2069
  this.tbarEle.push(innerEle);
@@ -2158,6 +2181,17 @@ var Toolbar = /** @class */ (function (_super) {
2158
2181
  Toolbar.prototype.getDataTabindex = function (ele) {
2159
2182
  return isNOU(ele.getAttribute('data-tabindex')) ? '-1' : ele.getAttribute('data-tabindex');
2160
2183
  };
2184
+ Toolbar.prototype.isDropDownList = function (ele) {
2185
+ if (isNOU(ele)) {
2186
+ return false;
2187
+ }
2188
+ var input = ele.querySelector('input.e-control');
2189
+ if (isNOU(input) || isNOU(input.ej2_instances) || isNOU(input.ej2_instances[0])) {
2190
+ return false;
2191
+ }
2192
+ var instance = input.ej2_instances[0];
2193
+ return instance.getModuleName() === 'dropdownlist';
2194
+ };
2161
2195
  Toolbar.prototype.itemClick = function (e) {
2162
2196
  this.activeEleSwitch(e.currentTarget);
2163
2197
  };