@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.
@@ -13071,6 +13071,13 @@ let TreeView = TreeView_1 = class TreeView extends Component {
13071
13071
  let li = ListBase.createListItemFromJson(this.createElement, sNodes, this.listBaseOption, level);
13072
13072
  let id = this.getId(dropLi);
13073
13073
  let refNode;
13074
+ let dropIcon1;
13075
+ if (!isNullOrUndefined(dropLi)) {
13076
+ dropIcon1 = select('div.' + ICON, dropLi);
13077
+ }
13078
+ if (this.dataType === 1 && dropIcon1 && dropIcon1.classList.contains(EXPANDABLE)) {
13079
+ this.preventExpand = true;
13080
+ }
13074
13081
  if (this.dataType !== 1) {
13075
13082
  this.addChildData(this.treeData, this.fields, id, nodes, index);
13076
13083
  this.isFirstRender = false;
@@ -13088,6 +13095,13 @@ let TreeView = TreeView_1 = class TreeView extends Component {
13088
13095
  for (let i = 0; i < li.length; i++) {
13089
13096
  dropUl.insertBefore(li[i], refNode);
13090
13097
  }
13098
+ if (this.dataType === 1 && !isNullOrUndefined(dropLi)) {
13099
+ this.preventExpand = false;
13100
+ let dropIcon = select('div.' + ICON, dropLi);
13101
+ if (dropIcon && dropIcon.classList.contains(EXPANDABLE)) {
13102
+ this.expandAction(dropLi, dropIcon, null);
13103
+ }
13104
+ }
13091
13105
  }
13092
13106
  if (!refNode && ((this.sortOrder === 'Ascending') || (this.sortOrder === 'Descending'))) {
13093
13107
  let cNodes = dropUl.childNodes;
@@ -16219,8 +16233,10 @@ let Carousel = class Carousel extends Component {
16219
16233
  const navigators = this.createElement('div', { className: CLS_NAVIGATORS });
16220
16234
  const itemsContainer = this.element.querySelector(`.${CLS_SLIDE_CONTAINER}`);
16221
16235
  itemsContainer.insertAdjacentElement('afterend', navigators);
16222
- this.renderNavigatorButton('Previous');
16223
- this.renderNavigatorButton('Next');
16236
+ if (!isNullOrUndefined(this.slideItems) && this.slideItems.length > 1) {
16237
+ this.renderNavigatorButton('Previous');
16238
+ this.renderNavigatorButton('Next');
16239
+ }
16224
16240
  this.renderTemplates();
16225
16241
  }
16226
16242
  renderNavigatorButton(direction) {
@@ -16256,7 +16272,7 @@ let Carousel = class Carousel extends Component {
16256
16272
  EventHandler.add(buttonContainer, 'click', this.navigatorClickHandler, this);
16257
16273
  }
16258
16274
  renderPlayButton() {
16259
- if (this.buttonsVisibility === 'Hidden' || !this.showPlayButton) {
16275
+ if (isNullOrUndefined(this.slideItems) || this.buttonsVisibility === 'Hidden' || !this.showPlayButton || this.slideItems.length <= 1) {
16260
16276
  return;
16261
16277
  }
16262
16278
  const playPauseWrap = this.createElement('div', {
@@ -16356,6 +16372,9 @@ let Carousel = class Carousel extends Component {
16356
16372
  }
16357
16373
  }
16358
16374
  autoSlide() {
16375
+ if (isNullOrUndefined(this.slideItems) || this.slideItems.length <= 1) {
16376
+ return;
16377
+ }
16359
16378
  this.resetSlideInterval();
16360
16379
  this.applySlideInterval();
16361
16380
  }