@syncfusion/ej2-navigations 20.3.57 → 20.3.58

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.
@@ -13409,6 +13409,13 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
13409
13409
  var li = ListBase.createListItemFromJson(this.createElement, sNodes, this.listBaseOption, level);
13410
13410
  var id = this.getId(dropLi);
13411
13411
  var refNode;
13412
+ var dropIcon1;
13413
+ if (!isNullOrUndefined(dropLi)) {
13414
+ dropIcon1 = select('div.' + ICON, dropLi);
13415
+ }
13416
+ if (this.dataType === 1 && dropIcon1 && dropIcon1.classList.contains(EXPANDABLE)) {
13417
+ this.preventExpand = true;
13418
+ }
13412
13419
  if (this.dataType !== 1) {
13413
13420
  this.addChildData(this.treeData, this.fields, id, nodes, index);
13414
13421
  this.isFirstRender = false;
@@ -13426,6 +13433,13 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
13426
13433
  for (var i = 0; i < li.length; i++) {
13427
13434
  dropUl.insertBefore(li[i], refNode);
13428
13435
  }
13436
+ if (this.dataType === 1 && !isNullOrUndefined(dropLi)) {
13437
+ this.preventExpand = false;
13438
+ var dropIcon = select('div.' + ICON, dropLi);
13439
+ if (dropIcon && dropIcon.classList.contains(EXPANDABLE)) {
13440
+ this.expandAction(dropLi, dropIcon, null);
13441
+ }
13442
+ }
13429
13443
  }
13430
13444
  if (!refNode && ((this.sortOrder === 'Ascending') || (this.sortOrder === 'Descending'))) {
13431
13445
  var cNodes = dropUl.childNodes;
@@ -16630,8 +16644,10 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
16630
16644
  var navigators = this.createElement('div', { className: CLS_NAVIGATORS });
16631
16645
  var itemsContainer = this.element.querySelector("." + CLS_SLIDE_CONTAINER);
16632
16646
  itemsContainer.insertAdjacentElement('afterend', navigators);
16633
- this.renderNavigatorButton('Previous');
16634
- this.renderNavigatorButton('Next');
16647
+ if (!isNullOrUndefined(this.slideItems) && this.slideItems.length > 1) {
16648
+ this.renderNavigatorButton('Previous');
16649
+ this.renderNavigatorButton('Next');
16650
+ }
16635
16651
  this.renderTemplates();
16636
16652
  };
16637
16653
  Carousel.prototype.renderNavigatorButton = function (direction) {
@@ -16667,7 +16683,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
16667
16683
  EventHandler.add(buttonContainer, 'click', this.navigatorClickHandler, this);
16668
16684
  };
16669
16685
  Carousel.prototype.renderPlayButton = function () {
16670
- if (this.buttonsVisibility === 'Hidden' || !this.showPlayButton) {
16686
+ if (isNullOrUndefined(this.slideItems) || this.buttonsVisibility === 'Hidden' || !this.showPlayButton || this.slideItems.length <= 1) {
16671
16687
  return;
16672
16688
  }
16673
16689
  var playPauseWrap = this.createElement('div', {
@@ -16768,6 +16784,9 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
16768
16784
  }
16769
16785
  };
16770
16786
  Carousel.prototype.autoSlide = function () {
16787
+ if (isNullOrUndefined(this.slideItems) || this.slideItems.length <= 1) {
16788
+ return;
16789
+ }
16771
16790
  this.resetSlideInterval();
16772
16791
  this.applySlideInterval();
16773
16792
  };