@syncfusion/ej2-navigations 30.2.4 → 30.2.5

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 : 30.2.4
3
+ * version : 30.2.5
4
4
  * Copyright Syncfusion Inc. 2001 - 2024. 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": "30.2.4",
3
+ "version": "30.2.5",
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",
package/src/tab/tab.js CHANGED
@@ -622,11 +622,11 @@ var Tab = /** @class */ (function (_super) {
622
622
  else if (this.isVertical() && (popIcon.offsetTop < lastChild.offsetTop + lastChild.offsetHeight)) {
623
623
  isOverflow = true;
624
624
  }
625
- if (isOverflow) {
625
+ if (isOverflow && !isNOU(ele)) {
626
626
  ele.classList.add(CLS_TB_POPUP);
627
627
  this.tbPop.insertBefore(ele, selectAll('.' + CLS_TB_POPUP, this.tbPop)[0]);
628
628
  }
629
- return true;
629
+ return isOverflow;
630
630
  };
631
631
  Tab.prototype.popupHandler = function (target) {
632
632
  var ripEle = target.querySelector('.e-ripple-element');
@@ -636,21 +636,24 @@ var Tab = /** @class */ (function (_super) {
636
636
  }
637
637
  this.tbItem = selectAll('.' + CLS_TB_ITEMS + ' .' + CLS_TB_ITEM, this.hdrEle);
638
638
  var lastChild = this.tbItem[this.tbItem.length - 1];
639
- if (this.tbItem.length !== 0) {
639
+ if (this.tbItem.length >= 0) {
640
640
  target.classList.remove(CLS_TB_POPUP);
641
641
  target.removeAttribute('style');
642
642
  this.tbItems.appendChild(target);
643
643
  this.actEleId = target.id;
644
644
  if (this.checkPopupOverflow(lastChild)) {
645
- var prevEle = this.tbItems.lastChild.previousElementSibling;
646
- prevEle = (prevEle && prevEle.classList.contains(CLS_INDICATOR) ? prevEle.previousElementSibling : prevEle);
647
- if (prevEle) {
648
- this.checkPopupOverflow(prevEle);
645
+ for (var i = 0; i < this.tbItems.children.length; i++) {
646
+ var prevEle = this.tbItems.lastChild.previousElementSibling;
647
+ prevEle = (prevEle && prevEle.classList.contains(CLS_INDICATOR) ? prevEle.previousElementSibling : prevEle);
648
+ if (!this.checkPopupOverflow(prevEle ? prevEle : target)) {
649
+ break;
650
+ }
649
651
  }
650
652
  }
651
653
  this.isPopup = true;
652
654
  }
653
- return selectAll('.' + CLS_TB_ITEM, this.tbItems).length - 1;
655
+ var tabItemsLength = selectAll('.' + CLS_TB_ITEM, this.tbItems).length;
656
+ return tabItemsLength > 0 ? tabItemsLength - 1 : this.getEleIndex(target);
654
657
  };
655
658
  Tab.prototype.setCloseButton = function (val) {
656
659
  var trg = select('.' + CLS_HEADER, this.element);
@@ -541,6 +541,8 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
541
541
  private firstTap;
542
542
  private hasTemplate;
543
543
  private isFirstRender;
544
+ private isBatchMode;
545
+ private batchParentNode;
544
546
  private isNodeDropped;
545
547
  private isInteracted;
546
548
  private isRightClick;
@@ -213,6 +213,7 @@ var TreeView = /** @class */ (function (_super) {
213
213
  _this.changeDataSource = false;
214
214
  _this.hasTemplate = false;
215
215
  _this.isFirstRender = false;
216
+ _this.batchParentNode = new Set();
216
217
  // Specifies whether the node is dropped or not
217
218
  _this.isNodeDropped = false;
218
219
  _this.isInteracted = false;
@@ -1174,7 +1175,12 @@ var TreeView = /** @class */ (function (_super) {
1174
1175
  }
1175
1176
  };
1176
1177
  TreeView.prototype.doCheckBoxAction = function (nodes, doCheck) {
1178
+ var _this = this;
1177
1179
  if (!isNOU(nodes)) {
1180
+ if (nodes.length > 1 && this.autoCheck) {
1181
+ this.isBatchMode = true;
1182
+ this.batchParentNode = new Set();
1183
+ }
1178
1184
  nodes.reverse();
1179
1185
  for (var len = nodes.length - 1; len >= 0; len--) {
1180
1186
  var liEle = this.getElement(nodes[parseInt(len.toString(), 10)]);
@@ -1217,6 +1223,16 @@ var TreeView = /** @class */ (function (_super) {
1217
1223
  var checkBox = select('.' + PARENTITEM + ' .' + CHECKBOXWRAP, liEle);
1218
1224
  this.validateCheckNode(checkBox, !doCheck, liEle, null);
1219
1225
  }
1226
+ if (this.isBatchMode && this.autoCheck) {
1227
+ this.isBatchMode = false;
1228
+ Array.from(this.batchParentNode).forEach(function (parentId) {
1229
+ var parentLi = _this.getElement(parentId);
1230
+ if (parentLi) {
1231
+ _this.ensureParentCheckState(parentLi);
1232
+ }
1233
+ });
1234
+ this.batchParentNode.clear();
1235
+ }
1220
1236
  }
1221
1237
  else {
1222
1238
  var checkBoxes = selectAll('.' + CHECKBOXWRAP, this.element);
@@ -2653,7 +2669,16 @@ var TreeView = /** @class */ (function (_super) {
2653
2669
  if (this.autoCheck) {
2654
2670
  this.ensureChildCheckState(li);
2655
2671
  this.updateOldCheckedData([this.getNodeData(li)]);
2656
- this.ensureParentCheckState(closest(closest(li, '.' + PARENTITEM), '.' + LISTITEM));
2672
+ var parentLi = closest(closest(li, '.' + PARENTITEM), '.' + LISTITEM);
2673
+ if (this.isBatchMode) {
2674
+ var parentId = !isNOU(parentLi) ? parentLi.getAttribute('data-uid') : null;
2675
+ if (parentId) {
2676
+ this.batchParentNode.add(parentId);
2677
+ }
2678
+ }
2679
+ else {
2680
+ this.ensureParentCheckState(parentLi);
2681
+ }
2657
2682
  var doCheck = void 0;
2658
2683
  if (eventArgs.action === 'check') {
2659
2684
  doCheck = true;