@syncfusion/ej2-navigations 22.2.8 → 22.2.11

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,4 +1,4 @@
1
- import { Animation, Browser, ChildProperty, Collection, Complex, Component, Draggable, Droppable, Event, EventHandler, KeyboardEvents, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, Touch, addClass, append, attributes, classList, closest, compile, createElement, detach, extend, formatUnit, getElement, getInstance, getRandomId, getUniqueID, getValue, isBlazor, isNullOrUndefined, isRippleEnabled, isUndefined, isVisible, matches, merge, remove, removeClass, rippleEffect, select, selectAll, setStyleAttribute, setValue } from '@syncfusion/ej2-base';
1
+ import { Animation, Browser, ChildProperty, Collection, Complex, Component, Draggable, Droppable, Event, EventHandler, KeyboardEvents, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, Touch, addClass, append, attributes, classList, closest, compile, createElement, detach, extend, formatUnit, getElement, getInstance, getRandomId, getUniqueID, getValue, initializeCSPTemplate, isBlazor, isNullOrUndefined, isRippleEnabled, isUndefined, isVisible, matches, merge, remove, removeClass, rippleEffect, select, selectAll, setStyleAttribute, setValue } from '@syncfusion/ej2-base';
2
2
  import { ListBase } from '@syncfusion/ej2-lists';
3
3
  import { Popup, calculatePosition, createSpinner, fit, getScrollableParent, getZindexPartial, hideSpinner, isCollide, showSpinner } from '@syncfusion/ej2-popups';
4
4
  import { Button, createCheckBox, rippleMouseHandler } from '@syncfusion/ej2-buttons';
@@ -7860,6 +7860,11 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
7860
7860
  this.renderContainer();
7861
7861
  this.wireEvents();
7862
7862
  this.initRender = false;
7863
+ if (this.isReact && this.portals && this.portals.length > 0) {
7864
+ this.renderReactTemplates(function () {
7865
+ this.refreshActiveBorder();
7866
+ });
7867
+ }
7863
7868
  };
7864
7869
  Tab.prototype.renderContainer = function () {
7865
7870
  var ele = this.element;
@@ -10824,6 +10829,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
10824
10829
  return list;
10825
10830
  };
10826
10831
  TreeView.prototype.finalizeNode = function (element) {
10832
+ var _this = this;
10827
10833
  var iNodes = selectAll('.' + IMAGE, element);
10828
10834
  for (var k = 0; k < iNodes.length; k++) {
10829
10835
  iNodes[k].setAttribute('alt', IMAGE);
@@ -10844,6 +10850,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
10844
10850
  }
10845
10851
  }
10846
10852
  var eNodes = selectAll('.' + EXPANDED, element);
10853
+ if (!this.loadOnDemand) {
10854
+ this.isInitalExpand = this.treeData.filter(function (e) { return e[_this.fields.expanded] == true; }).length > 0 ? true : this.isInitalExpand;
10855
+ }
10847
10856
  if (!this.isInitalExpand) {
10848
10857
  for (var i = 0; i < eNodes.length; i++) {
10849
10858
  this.renderChildNodes(eNodes[i]);
@@ -11348,7 +11357,11 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11348
11357
  }
11349
11358
  };
11350
11359
  TreeView.prototype.doExpandAction = function () {
11360
+ var _this = this;
11351
11361
  var eUids = this.expandedNodes;
11362
+ if (!this.loadOnDemand) {
11363
+ this.isInitalExpand = this.treeData.filter(function (e) { return e[_this.fields.expanded] == true; }).length > 0 ? true : this.isInitalExpand;
11364
+ }
11352
11365
  if (this.isInitalExpand && eUids.length > 0) {
11353
11366
  this.setProperties({ expandedNodes: [] }, true);
11354
11367
  /* eslint-disable */
@@ -11790,6 +11803,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11790
11803
  if (callback) {
11791
11804
  callback();
11792
11805
  }
11806
+ if (expandChild) {
11807
+ this.expandedNodes.push(parentLi.getAttribute('data-uid'));
11808
+ }
11793
11809
  if (this.treeList.length === 0 && !this.isLoaded) {
11794
11810
  this.finalize();
11795
11811
  }
@@ -16200,7 +16216,14 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
16200
16216
  if (i % 2) {
16201
16217
  // separator item
16202
16218
  wrapDiv = this.createElement('div', { className: 'e-breadcrumb-item-wrapper' });
16203
- listBaseOptions.template = this.separatorTemplate ? this.separatorTemplate : '/';
16219
+ if ((this.separatorTemplate && this.separatorTemplate === '/') || isNullOrUndefined(this.separatorTemplate)) {
16220
+ listBaseOptions.template = initializeCSPTemplate(function () {
16221
+ return '/';
16222
+ });
16223
+ }
16224
+ else {
16225
+ listBaseOptions.template = this.separatorTemplate;
16226
+ }
16204
16227
  listBaseOptions.itemClass = 'e-breadcrumb-separator';
16205
16228
  isSingleLevel = false;
16206
16229
  item = [{ previousItem: items[j_1], nextItem: items[j_1 + 1] }];
@@ -17787,6 +17810,13 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
17787
17810
  EventHandler.add(this.itemsContainer, 'mouseup touchend', this.swipStop, this);
17788
17811
  }
17789
17812
  };
17813
+ Carousel.prototype.resizeHandler = function () {
17814
+ if (this.itemsContainer && this.itemsContainer.firstElementChild) {
17815
+ var numOfItems = this.getNumOfItems();
17816
+ var slideWidth = this.itemsContainer.firstElementChild.clientWidth;
17817
+ this.itemsContainer.style.transform = this.getTranslateX(slideWidth, this.selectedIndex + numOfItems);
17818
+ }
17819
+ };
17790
17820
  Carousel.prototype.wireEvents = function () {
17791
17821
  if (!(this.animationEffect === 'Custom')) {
17792
17822
  this.swipeModehandlers();
@@ -17795,6 +17825,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
17795
17825
  EventHandler.add(this.element, 'mouseenter mouseleave', this.onHoverActions, this);
17796
17826
  EventHandler.add(this.element.firstElementChild, 'animationend', this.onTransitionEnd, this);
17797
17827
  EventHandler.add(this.element.firstElementChild, 'transitionend', this.onTransitionEnd, this);
17828
+ EventHandler.add(window, 'resize', this.resizeHandler, this);
17798
17829
  };
17799
17830
  Carousel.prototype.unWireEvents = function () {
17800
17831
  var _this = this;
@@ -17814,6 +17845,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
17814
17845
  EventHandler.remove(this.element.firstElementChild, 'transitionend', this.onTransitionEnd);
17815
17846
  EventHandler.clearEvents(this.element);
17816
17847
  EventHandler.clearEvents(this.itemsContainer);
17848
+ EventHandler.remove(window, 'resize', this.resizeHandler);
17817
17849
  };
17818
17850
  /**
17819
17851
  * Method to transit from the current slide to the previous slide.