@syncfusion/ej2-navigations 20.4.52 → 20.4.53

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.
@@ -8971,6 +8971,21 @@ let Tab = class Tab extends Component {
8971
8971
  this.refreshActiveBorder();
8972
8972
  const cntTrg = select('#' + CLS_CONTENT$1 + this.tabId + '_' + this.extIndex(trg.id), select('.' + CLS_CONTENT$1, this.element));
8973
8973
  if (!isNullOrUndefined(cntTrg)) {
8974
+ const registeredTemplate = this.registeredTemplate;
8975
+ if (registeredTemplate && registeredTemplate.content) {
8976
+ var templateToClear = [];
8977
+ for (let i = 0; i < registeredTemplate.content.length; i++) {
8978
+ let registeredItem = registeredTemplate.content[i].rootNodes[0];
8979
+ let closestItem = closest(registeredItem, '.' + CLS_ITEM$2);
8980
+ if (!isNullOrUndefined(registeredItem) && closestItem === cntTrg) {
8981
+ templateToClear.push(registeredTemplate.content[i]);
8982
+ break;
8983
+ }
8984
+ }
8985
+ if (templateToClear.length > 0) {
8986
+ this.clearTemplate(['content'], templateToClear);
8987
+ }
8988
+ }
8974
8989
  detach(cntTrg);
8975
8990
  }
8976
8991
  this.trigger('removed', tabRemovingArgs);
@@ -12101,7 +12116,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
12101
12116
  focusIn() {
12102
12117
  if (!this.mouseDownStatus) {
12103
12118
  let focusedElement = this.getFocusedNode();
12104
- focusedElement.setAttribute("tanindex", "0");
12119
+ focusedElement.setAttribute("tabindex", "0");
12105
12120
  addClass([focusedElement], [HOVER, FOCUS]);
12106
12121
  EventHandler.add(focusedElement, 'blur', this.focusOut, this);
12107
12122
  }
@@ -12511,7 +12526,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
12511
12526
  });
12512
12527
  this.dropObj = new Droppable(this.element, {
12513
12528
  out: (e) => {
12514
- if (!isNullOrUndefined(e) && !e.target.classList.contains(SIBLING)) {
12529
+ if (!isNullOrUndefined(e) && !e.target.classList.contains(SIBLING) && (this.dropObj.dragData.default && this.dropObj.dragData.default.helper.classList.contains(ROOT))) {
12515
12530
  document.body.style.cursor = 'not-allowed';
12516
12531
  }
12517
12532
  },
@@ -13208,15 +13223,29 @@ let TreeView = TreeView_1 = class TreeView extends Component {
13208
13223
  }
13209
13224
  }
13210
13225
  if (!refNode && ((this.sortOrder === 'Ascending') || (this.sortOrder === 'Descending'))) {
13211
- let cNodes = dropUl.childNodes;
13212
- for (let i = 0; i < li.length; i++) {
13213
- for (let j = 0; j < cNodes.length; j++) {
13214
- let returnValue = (this.sortOrder === 'Ascending') ? cNodes[j].textContent.toUpperCase() > li[i].innerText.toUpperCase() : cNodes[j].textContent.toUpperCase() < li[i].innerText.toUpperCase();
13215
- if (returnValue) {
13216
- dropUl.insertBefore(li[i], cNodes[j]);
13217
- break;
13226
+ if (dropUl.childNodes.length === 0) {
13227
+ for (let i = 0; i < li.length; i++) {
13228
+ dropUl.insertBefore(li[i], refNode);
13229
+ }
13230
+ if (this.dataType === 1 && !isNullOrUndefined(dropLi) && !isNullOrUndefined(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
13231
+ this.preventExpand = false;
13232
+ let dropIcon = select('div.' + ICON, dropLi);
13233
+ if (dropIcon && dropIcon.classList.contains(EXPANDABLE)) {
13234
+ this.expandAction(dropLi, dropIcon, null);
13235
+ }
13236
+ }
13237
+ }
13238
+ else {
13239
+ let cNodes = dropUl.childNodes;
13240
+ for (let i = 0; i < li.length; i++) {
13241
+ for (let j = 0; j < cNodes.length; j++) {
13242
+ let returnValue = (this.sortOrder === 'Ascending') ? cNodes[j].textContent.toUpperCase() > li[i].innerText.toUpperCase() : cNodes[j].textContent.toUpperCase() < li[i].innerText.toUpperCase();
13243
+ if (returnValue) {
13244
+ dropUl.insertBefore(li[i], cNodes[j]);
13245
+ break;
13246
+ }
13247
+ dropUl.insertBefore(li[i], cNodes[cNodes.length]);
13218
13248
  }
13219
- dropUl.insertBefore(li[i], cNodes[cNodes.length]);
13220
13249
  }
13221
13250
  }
13222
13251
  }