@syncfusion/ej2-navigations 32.2.7 → 32.2.9

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.
Files changed (59) hide show
  1. package/dist/ej2-navigations.min.js +2 -2
  2. package/dist/ej2-navigations.umd.min.js +2 -2
  3. package/dist/ej2-navigations.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-navigations.es2015.js +68 -5
  5. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  6. package/dist/es6/ej2-navigations.es5.js +68 -5
  7. package/dist/es6/ej2-navigations.es5.js.map +1 -1
  8. package/dist/global/ej2-navigations.min.js +2 -2
  9. package/dist/global/ej2-navigations.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +5 -5
  12. package/src/accordion/accordion.js +7 -2
  13. package/src/common/menu-base.d.ts +2 -0
  14. package/src/common/menu-base.js +54 -3
  15. package/src/sidebar/sidebar.js +7 -0
  16. package/styles/appbar/material3-dark.css +0 -5
  17. package/styles/appbar/material3.css +0 -5
  18. package/styles/bds-lite.css +0 -4
  19. package/styles/bds.css +0 -4
  20. package/styles/bootstrap5.3-lite.css +0 -4
  21. package/styles/bootstrap5.3.css +0 -4
  22. package/styles/breadcrumb/material3-dark.css +0 -1
  23. package/styles/breadcrumb/material3.css +0 -1
  24. package/styles/carousel/material3-dark.css +0 -2
  25. package/styles/carousel/material3.css +0 -2
  26. package/styles/context-menu/material3-dark.css +0 -2
  27. package/styles/context-menu/material3.css +0 -2
  28. package/styles/fluent2-lite.css +0 -4
  29. package/styles/fluent2.css +0 -4
  30. package/styles/h-scroll/bds.css +0 -2
  31. package/styles/h-scroll/bootstrap5.3.css +0 -2
  32. package/styles/h-scroll/fluent2.css +0 -2
  33. package/styles/h-scroll/material3-dark.css +0 -4
  34. package/styles/h-scroll/material3.css +0 -4
  35. package/styles/h-scroll/tailwind3.css +0 -2
  36. package/styles/material3-dark-lite.css +0 -49
  37. package/styles/material3-dark.css +0 -49
  38. package/styles/material3-lite.css +0 -49
  39. package/styles/material3.css +0 -49
  40. package/styles/menu/material3-dark.css +0 -2
  41. package/styles/menu/material3.css +0 -2
  42. package/styles/sidebar/material3-dark.css +0 -1
  43. package/styles/sidebar/material3.css +0 -1
  44. package/styles/stepper/material3-dark.css +0 -4
  45. package/styles/stepper/material3.css +0 -4
  46. package/styles/tab/material3-dark.css +0 -12
  47. package/styles/tab/material3.css +0 -12
  48. package/styles/tailwind3-lite.css +0 -4
  49. package/styles/tailwind3.css +0 -4
  50. package/styles/toolbar/material3-dark.css +0 -11
  51. package/styles/toolbar/material3.css +0 -11
  52. package/styles/treeview/material3-dark.css +0 -1
  53. package/styles/treeview/material3.css +0 -1
  54. package/styles/v-scroll/bds.css +0 -2
  55. package/styles/v-scroll/bootstrap5.3.css +0 -2
  56. package/styles/v-scroll/fluent2.css +0 -2
  57. package/styles/v-scroll/material3-dark.css +0 -4
  58. package/styles/v-scroll/material3.css +0 -4
  59. package/styles/v-scroll/tailwind3.css +0 -2
@@ -1215,6 +1215,7 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
1215
1215
  _this.isOpenCalled = false;
1216
1216
  _this.isAnimationNone = false;
1217
1217
  _this.isKBDAction = false;
1218
+ _this.skipNextArrowDown = false;
1218
1219
  return _this;
1219
1220
  }
1220
1221
  /**
@@ -1322,7 +1323,8 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
1322
1323
  this.element.parentElement.insertBefore(wrapper, this.element);
1323
1324
  }
1324
1325
  else {
1325
- document.body.appendChild(wrapper);
1326
+ var appendToElement = this.getAppendToElement();
1327
+ appendToElement.appendChild(wrapper);
1326
1328
  }
1327
1329
  }
1328
1330
  if (this.cssClass) {
@@ -1459,8 +1461,38 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
1459
1461
  e.action = ESCAPE;
1460
1462
  this.leftEscKeyHandler(e);
1461
1463
  }
1464
+ var isDown = e.key ? (e.key === 'ArrowDown') : e.keyCode === 40;
1465
+ if (!isDown) {
1466
+ return;
1467
+ }
1468
+ var hostPopup = closest(this.element, '.e-popup-open');
1469
+ if (!hostPopup) {
1470
+ return;
1471
+ }
1472
+ if (closest(document.activeElement, '#' + this.element.id)) {
1473
+ return;
1474
+ }
1475
+ var active = document.activeElement;
1476
+ if (!active) {
1477
+ return;
1478
+ }
1479
+ var expanded = active.getAttribute('aria-expanded') === 'true';
1480
+ if (!expanded) {
1481
+ return;
1482
+ }
1483
+ var ul = this.element;
1484
+ var firstItem = select('.e-menu-item', ul);
1485
+ if (firstItem) {
1486
+ ul.focus();
1487
+ firstItem.classList.add('e-focused');
1488
+ this.skipNextArrowDown = true;
1489
+ }
1462
1490
  };
1463
1491
  MenuBase.prototype.keyBoardHandler = function (e) {
1492
+ if (e.action === DOWNARROW && this.skipNextArrowDown) {
1493
+ this.skipNextArrowDown = false;
1494
+ return;
1495
+ }
1464
1496
  var actionName = '';
1465
1497
  var trgt = e.target;
1466
1498
  var actionNeeded = this.isMenu && !this.hamburgerMode && !this.element.classList.contains('e-vertical')
@@ -1560,6 +1592,13 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
1560
1592
  fliIdx = this.isValidLI(cli, fliIdx, e.action);
1561
1593
  cul.children[fliIdx].classList.add(FOCUSED);
1562
1594
  cul.children[fliIdx].focus();
1595
+ if (closest(this.element, '.e-popup')) {
1596
+ var focusedLiItem = cul.children[fliIdx];
1597
+ var focusableChild = focusedLiItem.querySelector('[tabindex], span[tabindex], a, button, [tabindex]:not([tabindex="-1"])');
1598
+ if (!focusableChild) {
1599
+ cul.focus();
1600
+ }
1601
+ }
1563
1602
  };
1564
1603
  MenuBase.prototype.isValidLI = function (cli, index, action) {
1565
1604
  var cul = this.getUlByNavIdx();
@@ -1603,7 +1642,8 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
1603
1642
  return isNullOrUndefined(popup) ? null : select('.e-menu-parent', popup);
1604
1643
  }
1605
1644
  else {
1606
- if (!document.body.contains(this.element) && navIdxLen === 0) {
1645
+ var appendToElement = this.getAppendToElement();
1646
+ if (!appendToElement.contains(this.element) && navIdxLen === 0) {
1607
1647
  return null;
1608
1648
  }
1609
1649
  return this.getWrapper().children[navIdxLen];
@@ -1959,7 +1999,8 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
1959
1999
  li.appendChild(this.popupWrapper);
1960
2000
  }
1961
2001
  else {
1962
- document.body.appendChild(this.popupWrapper);
2002
+ var appendToElement = this.getAppendToElement();
2003
+ appendToElement.appendChild(this.popupWrapper);
1963
2004
  }
1964
2005
  this.isNestedOrVertical = this.element.classList.contains('e-vertical') || this.navIdx.length !== 1;
1965
2006
  this.popupObj = this.generatePopup(this.popupWrapper, this.uList, li, this.isNestedOrVertical);
@@ -3260,6 +3301,16 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
3260
3301
  }
3261
3302
  }
3262
3303
  };
3304
+ MenuBase.prototype.getAppendToElement = function () {
3305
+ if (this.isAngular) {
3306
+ var cdkPane = this.element.closest('.cdk-overlay-pane');
3307
+ var popoverEl = this.element.closest('[popover]');
3308
+ if (cdkPane && popoverEl) {
3309
+ return cdkPane;
3310
+ }
3311
+ }
3312
+ return document.body;
3313
+ };
3263
3314
  /**
3264
3315
  * Get the properties to be maintained in the persisted state.
3265
3316
  *
@@ -6848,8 +6899,13 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
6848
6899
  if (this.isReact) {
6849
6900
  this.renderReactTemplates();
6850
6901
  }
6851
- append(this.getItemTemplate()(this.dataSource[parseInt(index.toString(), 10)], this, 'itemTemplate', this.element.id + '_itemTemplate', false), ctn);
6852
- itemcnt.appendChild(ctn);
6902
+ if (!isNullOrUndefined(this.getItemTemplate())) {
6903
+ append(this.getItemTemplate()(this.dataSource[parseInt(index.toString(), 10)], this, 'itemTemplate', this.element.id + '_itemTemplate', false), ctn);
6904
+ itemcnt.appendChild(ctn);
6905
+ }
6906
+ else {
6907
+ itemcnt.appendChild(this.fetchElement(ctn, this.dataSource[parseInt(index.toString(), 10)].content, index));
6908
+ }
6853
6909
  }
6854
6910
  else {
6855
6911
  var content = this.items[parseInt(index.toString(), 10)].content;
@@ -17046,6 +17102,13 @@ var Sidebar = /** @__PURE__ @class */ (function (_super) {
17046
17102
  else {
17047
17103
  addClass([this.element], DOCKER);
17048
17104
  }
17105
+ if (!this.isOpen && sibling) {
17106
+ if (!this.enableDock) {
17107
+ this.element.style.transform = sibling.style.transform = '';
17108
+ }
17109
+ sibling.style[this.position === 'Left' ? 'marginLeft' : 'marginRight'] =
17110
+ this.enableDock ? this.setDimension(this.dockSize) : '0px';
17111
+ }
17049
17112
  break;
17050
17113
  case 'zIndex':
17051
17114
  this.setZindex();