@syncfusion/ej2-navigations 31.1.20 → 31.2.3

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 (101) hide show
  1. package/dist/ej2-navigations.min.js +3 -3
  2. package/dist/ej2-navigations.umd.min.js +3 -3
  3. package/dist/ej2-navigations.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-navigations.es2015.js +47 -6
  5. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  6. package/dist/es6/ej2-navigations.es5.js +48 -6
  7. package/dist/es6/ej2-navigations.es5.js.map +1 -1
  8. package/dist/global/ej2-navigations.min.js +3 -3
  9. package/dist/global/ej2-navigations.min.js.map +1 -1
  10. package/dist/global/index.d.ts +2 -2
  11. package/package.json +7 -7
  12. package/src/breadcrumb/breadcrumb.js +4 -3
  13. package/src/toolbar/toolbar.js +4 -1
  14. package/src/treeview/treeview.d.ts +1 -0
  15. package/src/treeview/treeview.js +40 -2
  16. package/styles/bds-lite.css +0 -1
  17. package/styles/bds.css +0 -1
  18. package/styles/bootstrap-dark-lite.css +0 -1
  19. package/styles/bootstrap-dark.css +0 -1
  20. package/styles/bootstrap-lite.css +0 -1
  21. package/styles/bootstrap.css +0 -1
  22. package/styles/bootstrap4-lite.css +2 -3
  23. package/styles/bootstrap4.css +3 -4
  24. package/styles/bootstrap5-dark-lite.css +12 -10
  25. package/styles/bootstrap5-dark.css +12 -10
  26. package/styles/bootstrap5-lite.css +12 -10
  27. package/styles/bootstrap5.3-lite.css +2 -3
  28. package/styles/bootstrap5.3.css +2 -3
  29. package/styles/bootstrap5.css +12 -10
  30. package/styles/fabric-dark-lite.css +0 -1
  31. package/styles/fabric-dark.css +0 -1
  32. package/styles/fabric-lite.css +0 -1
  33. package/styles/fabric.css +0 -1
  34. package/styles/fluent-dark-lite.css +3 -4
  35. package/styles/fluent-dark.css +5 -7
  36. package/styles/fluent-lite.css +3 -4
  37. package/styles/fluent.css +5 -7
  38. package/styles/fluent2-lite.css +1 -2
  39. package/styles/fluent2.css +1 -2
  40. package/styles/highcontrast-light-lite.css +0 -1
  41. package/styles/highcontrast-light.css +0 -1
  42. package/styles/highcontrast-lite.css +2 -3
  43. package/styles/highcontrast.css +3 -5
  44. package/styles/material-dark-lite.css +2 -3
  45. package/styles/material-dark.css +2 -3
  46. package/styles/material-lite.css +2 -3
  47. package/styles/material.css +2 -3
  48. package/styles/material3-dark-lite.css +0 -1
  49. package/styles/material3-dark.css +0 -1
  50. package/styles/material3-lite.css +0 -1
  51. package/styles/material3.css +0 -1
  52. package/styles/menu/_bootstrap-dark-definition.scss +0 -1
  53. package/styles/menu/_bootstrap-definition.scss +0 -1
  54. package/styles/menu/_fluent-definition.scss +1 -1
  55. package/styles/menu/_fluent2-definition.scss +1 -1
  56. package/styles/menu/_layout.scss +1 -7
  57. package/styles/menu/bds.css +0 -1
  58. package/styles/menu/bootstrap-dark.css +0 -1
  59. package/styles/menu/bootstrap.css +0 -1
  60. package/styles/menu/bootstrap4.css +0 -1
  61. package/styles/menu/bootstrap5-dark.css +0 -1
  62. package/styles/menu/bootstrap5.3.css +0 -1
  63. package/styles/menu/bootstrap5.css +0 -1
  64. package/styles/menu/fabric-dark.css +0 -1
  65. package/styles/menu/fabric.css +0 -1
  66. package/styles/menu/fluent-dark.css +1 -2
  67. package/styles/menu/fluent.css +1 -2
  68. package/styles/menu/fluent2.css +1 -2
  69. package/styles/menu/highcontrast-light.css +0 -1
  70. package/styles/menu/highcontrast.css +0 -1
  71. package/styles/menu/material-dark.css +0 -1
  72. package/styles/menu/material.css +0 -1
  73. package/styles/menu/material3-dark.css +0 -1
  74. package/styles/menu/material3.css +0 -1
  75. package/styles/menu/tailwind-dark.css +0 -1
  76. package/styles/menu/tailwind.css +0 -1
  77. package/styles/menu/tailwind3.css +0 -1
  78. package/styles/tailwind-dark-lite.css +0 -1
  79. package/styles/tailwind-dark.css +0 -1
  80. package/styles/tailwind-lite.css +0 -1
  81. package/styles/tailwind.css +0 -1
  82. package/styles/tailwind3-lite.css +0 -1
  83. package/styles/tailwind3.css +0 -1
  84. package/styles/treeview/_bigger.scss +2 -4
  85. package/styles/treeview/_bootstrap4-definition.scss +2 -2
  86. package/styles/treeview/_bootstrap5-definition.scss +4 -4
  87. package/styles/treeview/_bootstrap5.3-definition.scss +1 -1
  88. package/styles/treeview/_fluent-definition.scss +3 -3
  89. package/styles/treeview/_highcontrast-definition.scss +4 -2
  90. package/styles/treeview/_layout.scss +4 -4
  91. package/styles/treeview/_material-dark-definition.scss +1 -1
  92. package/styles/treeview/_material-definition.scss +1 -1
  93. package/styles/treeview/bootstrap4.css +3 -3
  94. package/styles/treeview/bootstrap5-dark.css +12 -9
  95. package/styles/treeview/bootstrap5.3.css +2 -2
  96. package/styles/treeview/bootstrap5.css +12 -9
  97. package/styles/treeview/fluent-dark.css +4 -5
  98. package/styles/treeview/fluent.css +4 -5
  99. package/styles/treeview/highcontrast.css +3 -4
  100. package/styles/treeview/material-dark.css +2 -2
  101. package/styles/treeview/material.css +2 -2
@@ -4722,7 +4722,10 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
4722
4722
  ++nodeIndex;
4723
4723
  }
4724
4724
  else {
4725
- ele.appendChild(el);
4725
+ var children = Array.prototype.slice.call(ele.children);
4726
+ var insertionNode = children.slice(index)
4727
+ .find(function (child) { return !child.classList.contains(CLS_POPPRI); });
4728
+ ele.insertBefore(el, insertionNode || null);
4726
4729
  }
4727
4730
  if (el.classList.contains(CLS_SEPARATOR)) {
4728
4731
  setStyleAttribute(el, { display: '', height: sepHeight + 'px' });
@@ -11244,7 +11247,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11244
11247
  }
11245
11248
  this.changeState(node, 'check', null, true, true);
11246
11249
  }
11247
- else if (count === 0 && this.checkedNodes.length === 0) {
11250
+ else if (count === 0 && this.checkedNodes.length === 0 && indeterminate.length === 0) {
11248
11251
  this.changeState(node, 'uncheck', null, true, true);
11249
11252
  }
11250
11253
  }
@@ -11514,6 +11517,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11514
11517
  }
11515
11518
  };
11516
11519
  TreeView.prototype.ensureParentCheckState = function (element) {
11520
+ var _this = this;
11517
11521
  if (!isNullOrUndefined(element)) {
11518
11522
  if (element.classList.contains(ROOT)) {
11519
11523
  return;
@@ -11533,6 +11537,8 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11533
11537
  var dataUid_1 = element.getAttribute('data-uid');
11534
11538
  var rootNodeChecked_1 = true;
11535
11539
  var childNodeChecked_1 = false;
11540
+ var ChildNodeData = this.getAllChildNodes(this.DDTTreeData, dataUid_1);
11541
+ var selectedChildren_1 = 0;
11536
11542
  nodes.forEach(function (childNode) {
11537
11543
  if (childNode instanceof HTMLElement) {
11538
11544
  var ariaChecked = childNode.getAttribute('aria-checked');
@@ -11562,6 +11568,13 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11562
11568
  childItems = this.getChildNodes(this.DDTTreeData, dataUid_1);
11563
11569
  }
11564
11570
  count = childItems.length;
11571
+ ChildNodeData.forEach(function (child) {
11572
+ var childKey = String(child[_this.fields.id]);
11573
+ if (_this.checkedNodes.indexOf(childKey) !== -1 ||
11574
+ _this.OldCheckedData.some(function (oldNode) { return oldNode['parentID'] === childKey; })) {
11575
+ selectedChildren_1++;
11576
+ }
11577
+ });
11565
11578
  }
11566
11579
  if (this.autoCheck && this.showCheckBox && !(this.fields.dataSource instanceof DataManager)) {
11567
11580
  var selectedChildNodeDetails = this.getSelectedChildNodeDetails(dataUid_1);
@@ -11581,7 +11594,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11581
11594
  else if ((checkedCount > 0 && !parentNodeChecked && (this.autoCheck && this.showCheckBox))) {
11582
11595
  this.changeState(checkBoxEle, 'indeterminate', null, true, true);
11583
11596
  }
11584
- else if (checkedCount > 0 || indeterminateNodes.length > 0) {
11597
+ else if (checkedCount > 0 || indeterminateNodes.length > 0 || selectedChildren_1 > 0) {
11585
11598
  this.changeState(checkBoxEle, 'indeterminate', null, true, true);
11586
11599
  }
11587
11600
  else if (checkedCount === 0) {
@@ -11628,6 +11641,34 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11628
11641
  return false;
11629
11642
  });
11630
11643
  };
11644
+ TreeView.prototype.getAllChildNodes = function (data, parentId) {
11645
+ if (isNullOrUndefined(data) || isNullOrUndefined(parentId)) {
11646
+ return [];
11647
+ }
11648
+ if (this.dataType === 1) {
11649
+ var pidField_1 = this.fields.parentID;
11650
+ var target_1 = parentId.toString();
11651
+ return data.filter(function (item) {
11652
+ var pidVal = getValue(pidField_1, item);
11653
+ return !isNullOrUndefined(pidVal) && pidVal.toString() === target_1;
11654
+ });
11655
+ }
11656
+ if (this.dataType === 2) {
11657
+ var parentFieldId_1 = this.fields.id;
11658
+ var childField = this.fields.child.toString();
11659
+ var target_2 = parentId.toString();
11660
+ var node = data.find(function (n) {
11661
+ var idVal = getValue(parentFieldId_1, n);
11662
+ return !isNullOrUndefined(idVal) && idVal.toString() === target_2;
11663
+ });
11664
+ if (!node) {
11665
+ return [];
11666
+ }
11667
+ var children = getValue(childField, node);
11668
+ return Array.isArray(children) ? children : [];
11669
+ }
11670
+ return [];
11671
+ };
11631
11672
  TreeView.prototype.ensureChildCheckState = function (element, e, isFromExpandAll) {
11632
11673
  var _this = this;
11633
11674
  if (!isNullOrUndefined(element)) {
@@ -17407,6 +17448,10 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
17407
17448
  args.item.removeAttribute('role');
17408
17449
  if (isLastItem) {
17409
17450
  args.item.setAttribute('data-active-item', '');
17451
+ args.item.setAttribute('aria-current', 'page');
17452
+ }
17453
+ else {
17454
+ args.item.removeAttribute('aria-current');
17410
17455
  }
17411
17456
  if (!_this.itemTemplate) {
17412
17457
  _this.beforeItemRenderChanges(args.curData, eventArgs.item, args.item, containsRightIcon);
@@ -17598,9 +17643,6 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
17598
17643
  };
17599
17644
  Breadcrumb.prototype.beforeItemRenderChanges = function (prevItem, currItem, elem, isRightIcon) {
17600
17645
  var wrapElem = elem.querySelector('.e-anchor-wrap');
17601
- if (wrapElem) {
17602
- wrapElem.parentElement.setAttribute('aria-label', 'home');
17603
- }
17604
17646
  if (currItem.text !== prevItem.text && wrapElem) {
17605
17647
  wrapElem.childNodes.forEach(function (child) {
17606
17648
  if (child.nodeType === Node.TEXT_NODE) {