@syncfusion/ej2-navigations 27.1.58 → 27.2.2

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.
@@ -5039,9 +5039,9 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
5039
5039
  return;
5040
5040
  }
5041
5041
  var alignDiv = [];
5042
- alignDiv.push(this.createElement('div', { className: CLS_TBARLEFT }));
5043
- alignDiv.push(this.createElement('div', { className: CLS_TBARCENTER }));
5044
- alignDiv.push(this.createElement('div', { className: CLS_TBARRIGHT }));
5042
+ alignDiv.push(this.createElement('div', { className: CLS_TBARLEFT, attrs: { role: 'group' } }));
5043
+ alignDiv.push(this.createElement('div', { className: CLS_TBARCENTER, attrs: { role: 'group' } }));
5044
+ alignDiv.push(this.createElement('div', { className: CLS_TBARRIGHT, attrs: { role: 'group' } }));
5045
5045
  if (pos === 0 && item.align !== 'Left') {
5046
5046
  alignDiv.forEach(function (ele) {
5047
5047
  itemEle.appendChild(ele);
@@ -7924,6 +7924,20 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
7924
7924
  this.renderReactTemplates();
7925
7925
  }
7926
7926
  };
7927
+ /**
7928
+ * Reorganizes and adjusts the Tab headers to fit the available width without re-rendering the entire Tab component.
7929
+ *
7930
+ * This method is useful for optimizing the layout when:
7931
+ * - A hidden tab item becomes visible.
7932
+ * - The number of tab items changes dynamically.
7933
+ *
7934
+ * @returns {void} This method does not return a value.
7935
+ */
7936
+ Tab.prototype.refreshOverflow = function () {
7937
+ if (!isNullOrUndefined(this.tbObj)) {
7938
+ this.tbObj.refreshOverflow();
7939
+ }
7940
+ };
7927
7941
  /**
7928
7942
  * Initialize component
7929
7943
  *
@@ -7969,9 +7983,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
7969
7983
  this.initRender = false;
7970
7984
  if (this.isReact && this.portals && this.portals.length > 0) {
7971
7985
  this.renderReactTemplates(function () {
7972
- if (!isNullOrUndefined(_this.tbObj)) {
7973
- _this.tbObj.refreshOverflow();
7974
- }
7986
+ _this.refreshOverflow();
7975
7987
  _this.refreshActiveBorder();
7976
7988
  });
7977
7989
  }
@@ -8267,7 +8279,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8267
8279
  else {
8268
8280
  trg.classList.remove(CLS_CLOSE_SHOW);
8269
8281
  }
8270
- this.tbObj.refreshOverflow();
8282
+ this.refreshOverflow();
8271
8283
  this.refreshActiveTabBorder();
8272
8284
  };
8273
8285
  Tab.prototype.prevCtnAnimation = function (prev, current) {
@@ -9650,8 +9662,8 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9650
9662
  if (!isNullOrUndefined(item.firstElementChild)) {
9651
9663
  item.firstElementChild.setAttribute('aria-hidden', '' + value);
9652
9664
  }
9653
- if (this.overflowMode === 'Popup' && this.tbObj) {
9654
- this.tbObj.refreshOverflow();
9665
+ if (this.overflowMode === 'Popup') {
9666
+ this.refreshOverflow();
9655
9667
  }
9656
9668
  };
9657
9669
  Tab.prototype.selectTab = function (args, event, isInteracted) {
@@ -10913,7 +10925,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
10913
10925
  if (this.showCheckBox) {
10914
10926
  var checkboxEle = createCheckBox(this.createElement, true, { cssClass: this.touchClass });
10915
10927
  checkboxEle.classList.add(CHECKBOXWRAP);
10916
- var icon = select('div.' + ICON, e.item);
10928
+ var icon = select('div.' + EXPANDABLE + ', div.' + COLLAPSIBLE, e.item);
10917
10929
  var id = e.item.getAttribute('data-uid');
10918
10930
  e.item.childNodes[0].insertBefore(checkboxEle, e.item.childNodes[0].childNodes[isNullOrUndefined(icon) ? 0 : 1]);
10919
10931
  var checkValue = getValue(e.fields.isChecked, e.curData);
@@ -11145,7 +11157,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11145
11157
  }
11146
11158
  count = childItems.length;
11147
11159
  }
11148
- if (this.autoCheck && this.showCheckBox) {
11160
+ if (this.autoCheck && this.showCheckBox && !(this.fields.dataSource instanceof DataManager)) {
11149
11161
  var selectedChildNodeDetails = this.getSelectedChildNodeDetails(dataUid_1);
11150
11162
  matchedChildNodes = selectedChildNodeDetails;
11151
11163
  oldChildCount = new DataManager(this.checkActionNodes)
@@ -13878,7 +13890,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
13878
13890
  if (isNullOrUndefined(dropIcon)) {
13879
13891
  ListBase.generateIcon(this.createElement, dropLi, EXPANDABLE, this.listBaseOption);
13880
13892
  }
13881
- var icon = select('div.' + ICON, dropLi);
13893
+ var icon = select('div.' + EXPANDABLE + ', div.' + COLLAPSIBLE, dropLi);
13882
13894
  if (icon) {
13883
13895
  icon.classList.add('e-icon-expandable');
13884
13896
  }
@@ -13901,7 +13913,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
13901
13913
  if (isNullOrUndefined(dropIcon)) {
13902
13914
  ListBase.generateIcon(this.createElement, dropLi, COLLAPSIBLE, this.listBaseOption);
13903
13915
  }
13904
- var icon = select('div.' + ICON, dropLi);
13916
+ var icon = select('div.' + EXPANDABLE + ', div.' + COLLAPSIBLE, dropLi);
13905
13917
  if (icon) {
13906
13918
  removeClass([icon], EXPANDABLE);
13907
13919
  }
@@ -13915,6 +13927,12 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
13915
13927
  this.addExpand(dropLi);
13916
13928
  this.trigger('nodeExpanded', this.getExpandEvent(dropLi, null));
13917
13929
  }
13930
+ var collapseIcon = select('div.' + COLLAPSIBLE, dropLi);
13931
+ if (!isNullOrUndefined(dropUl) && collapseIcon && this.preventExpand) {
13932
+ removeClass([collapseIcon], COLLAPSIBLE);
13933
+ dropLi.setAttribute('aria-expanded', 'false');
13934
+ addClass([collapseIcon], EXPANDABLE);
13935
+ }
13918
13936
  return dropUl;
13919
13937
  };
13920
13938
  TreeView.prototype.updateElement = function (dragParentUl, dragParentLi) {
@@ -14240,7 +14258,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
14240
14258
  if (!isNullOrUndefined(dropLi)) {
14241
14259
  dropIcon1 = select('div.' + ICON, dropLi);
14242
14260
  }
14243
- if (this.dataType === 1 && dropIcon1 && dropIcon1.classList.contains(EXPANDABLE) && !isNullOrUndefined(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
14261
+ if (this.dataType === 1 && dropIcon1 && dropIcon1.classList.contains(EXPANDABLE) && this.preventExpand && !isNullOrUndefined(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
14244
14262
  this.preventExpand = true;
14245
14263
  }
14246
14264
  if (this.dataType !== 1) {
@@ -14261,7 +14279,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
14261
14279
  for (var i = 0; i < li.length; i++) {
14262
14280
  dropUl.insertBefore(li[parseInt(i.toString(), 10)], refNode);
14263
14281
  }
14264
- if (this.dataType === 1 && !isNullOrUndefined(dropLi) && !isNullOrUndefined(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
14282
+ if (this.dataType === 1 && !isNullOrUndefined(dropLi) && !this.preventExpand && !isNullOrUndefined(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
14265
14283
  this.preventExpand = false;
14266
14284
  var dropIcon = select('div.' + ICON, dropLi);
14267
14285
  if (dropIcon && dropIcon.classList.contains(EXPANDABLE) && (isNullOrUndefined(args) || args.name !== 'nodeExpanding')) {
@@ -14274,7 +14292,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
14274
14292
  for (var i = 0; i < li.length; i++) {
14275
14293
  dropUl.insertBefore(li[parseInt(i.toString(), 10)], refNode);
14276
14294
  }
14277
- if (this.dataType === 1 && !isNullOrUndefined(dropLi) && !isNullOrUndefined(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
14295
+ if (this.dataType === 1 && !isNullOrUndefined(dropLi) && !this.preventExpand && !isNullOrUndefined(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
14278
14296
  this.preventExpand = false;
14279
14297
  var dropIcon = select('div.' + ICON, dropLi);
14280
14298
  if (dropIcon && dropIcon.classList.contains(EXPANDABLE) && (isNullOrUndefined(args) || args.name !== 'nodeExpanding')) {