@syncfusion/ej2-navigations 33.1.47 → 33.2.3

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,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 33.1.47
3
+ * version : 33.2.3
4
4
  * Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncfusion/ej2-navigations",
3
- "version": "33.1.47",
3
+ "version": "33.2.3",
4
4
  "description": "A package of Essential JS 2 navigation components such as Tree-view, Tab, Toolbar, Context-menu, and Accordion which is used to navigate from one page to another",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -8,12 +8,12 @@
8
8
  "module": "./index.js",
9
9
  "es2015": "./dist/es6/ej2-navigations.es5.js",
10
10
  "dependencies": {
11
- "@syncfusion/ej2-base": "~33.1.45",
12
- "@syncfusion/ej2-buttons": "~33.1.44",
13
- "@syncfusion/ej2-data": "~33.1.45",
14
- "@syncfusion/ej2-inputs": "~33.1.47",
15
- "@syncfusion/ej2-lists": "~33.1.47",
16
- "@syncfusion/ej2-popups": "~33.1.44"
11
+ "@syncfusion/ej2-base": "~33.2.3",
12
+ "@syncfusion/ej2-buttons": "~33.2.3",
13
+ "@syncfusion/ej2-data": "~33.2.3",
14
+ "@syncfusion/ej2-inputs": "~33.2.3",
15
+ "@syncfusion/ej2-lists": "~33.2.3",
16
+ "@syncfusion/ej2-popups": "~33.2.3"
17
17
  },
18
18
  "devDependencies": {},
19
19
  "keywords": [
@@ -22,11 +22,6 @@ export declare class HScroll extends Component<HTMLElement> implements INotifyPr
22
22
  private timeout;
23
23
  private keyTimeout;
24
24
  private keyTimer;
25
- private onKeyPressBound;
26
- private onKeyUpBound;
27
- private repeatScrollBound;
28
- private contextMenuBound;
29
- private navTouchCollection;
30
25
  private browser;
31
26
  private browserCheck;
32
27
  private ieCheck;
@@ -87,7 +82,6 @@ export declare class HScroll extends Component<HTMLElement> implements INotifyPr
87
82
  private onKeyPress;
88
83
  private onKeyUp;
89
84
  private eventBinding;
90
- private contextMenuHandler;
91
85
  private repeatScroll;
92
86
  private tabHoldHandler;
93
87
  private contains;
@@ -144,7 +144,6 @@ var HScroll = /** @class */ (function (_super) {
144
144
  * @returns {void}
145
145
  */
146
146
  HScroll.prototype.destroy = function () {
147
- var _this = this;
148
147
  var ele = this.element;
149
148
  ele.style.display = '';
150
149
  ele.classList.remove(CLS_ROOT);
@@ -152,22 +151,8 @@ var HScroll = /** @class */ (function (_super) {
152
151
  ele.classList.remove(CLS_RTL);
153
152
  var nav = selectAll('.e-' + ele.id + '_nav.' + CLS_HSCROLLNAV, ele);
154
153
  var overlay = selectAll('.' + CLS_OVERLAY, ele);
155
- [].slice.call(overlay).forEach(function (oElem) {
156
- if (_this.onKeyPressBound) {
157
- oElem.removeEventListener('keydown', _this.onKeyPressBound);
158
- }
159
- if (_this.onKeyUpBound) {
160
- oElem.removeEventListener('keyup', _this.onKeyUpBound);
161
- }
162
- if (_this.repeatScrollBound) {
163
- oElem.removeEventListener('mouseup', _this.repeatScrollBound);
164
- oElem.removeEventListener('touchend', _this.repeatScrollBound);
165
- }
166
- if (_this.contextMenuBound) {
167
- oElem.removeEventListener('contextmenu', _this.contextMenuBound);
168
- }
169
- EventHandler.remove(oElem, 'click', _this.clickEventHandler);
170
- detach(oElem);
154
+ [].slice.call(overlay).forEach(function (ele) {
155
+ detach(ele);
171
156
  });
172
157
  for (var _i = 0, _a = [].slice.call(this.scrollItems.children); _i < _a.length; _i++) {
173
158
  var elem = _a[_i];
@@ -178,37 +163,14 @@ var HScroll = /** @class */ (function (_super) {
178
163
  }
179
164
  detach(this.scrollEle);
180
165
  if (nav.length > 0) {
181
- [].slice.call(nav).forEach(function (nElem) {
182
- if (_this.onKeyPressBound) {
183
- nElem.removeEventListener('keydown', _this.onKeyPressBound);
184
- }
185
- if (_this.onKeyUpBound) {
186
- nElem.removeEventListener('keyup', _this.onKeyUpBound);
187
- }
188
- if (_this.repeatScrollBound) {
189
- nElem.removeEventListener('mouseup', _this.repeatScrollBound);
190
- nElem.removeEventListener('touchend', _this.repeatScrollBound);
191
- }
192
- if (_this.contextMenuBound) {
193
- nElem.removeEventListener('contextmenu', _this.contextMenuBound);
194
- }
195
- EventHandler.remove(nElem, 'click', _this.clickEventHandler);
196
- detach(nElem);
197
- });
166
+ detach(nav[0]);
167
+ if (!isNullOrUndefined(nav[1])) {
168
+ detach(nav[1]);
169
+ }
198
170
  }
199
171
  EventHandler.remove(this.scrollEle, 'scroll', this.scrollHandler);
200
172
  this.touchModule.destroy();
201
173
  this.touchModule = null;
202
- if (this.navTouchCollection) {
203
- this.navTouchCollection.forEach(function (t) { if (t && typeof t.destroy === 'function') {
204
- t.destroy();
205
- } });
206
- this.navTouchCollection = null;
207
- }
208
- this.onKeyPressBound = null;
209
- this.onKeyUpBound = null;
210
- this.repeatScrollBound = null;
211
- this.contextMenuBound = null;
212
174
  _super.prototype.destroy.call(this);
213
175
  };
214
176
  /**
@@ -295,34 +257,17 @@ var HScroll = /** @class */ (function (_super) {
295
257
  HScroll.prototype.eventBinding = function (ele) {
296
258
  var _this = this;
297
259
  [].slice.call(ele).forEach(function (el) {
298
- var navTouch = new Touch(el, { tapHold: _this.tabHoldHandler.bind(_this), tapHoldThreshold: 500 });
299
- if (!_this.navTouchCollection) {
300
- _this.navTouchCollection = [];
301
- }
302
- _this.navTouchCollection.push(navTouch);
303
- if (!_this.onKeyPressBound) {
304
- _this.onKeyPressBound = _this.onKeyPress.bind(_this);
305
- }
306
- if (!_this.onKeyUpBound) {
307
- _this.onKeyUpBound = _this.onKeyUp.bind(_this);
308
- }
309
- if (!_this.repeatScrollBound) {
310
- _this.repeatScrollBound = _this.repeatScroll.bind(_this);
311
- }
312
- if (!_this.contextMenuBound) {
313
- _this.contextMenuBound = _this.contextMenuHandler.bind(_this);
314
- }
315
- el.addEventListener('keydown', _this.onKeyPressBound);
316
- el.addEventListener('keyup', _this.onKeyUpBound);
317
- el.addEventListener('mouseup', _this.repeatScrollBound);
318
- el.addEventListener('touchend', _this.repeatScrollBound);
319
- el.addEventListener('contextmenu', _this.contextMenuBound);
260
+ new Touch(el, { tapHold: _this.tabHoldHandler.bind(_this), tapHoldThreshold: 500 });
261
+ el.addEventListener('keydown', _this.onKeyPress.bind(_this));
262
+ el.addEventListener('keyup', _this.onKeyUp.bind(_this));
263
+ el.addEventListener('mouseup', _this.repeatScroll.bind(_this));
264
+ el.addEventListener('touchend', _this.repeatScroll.bind(_this));
265
+ el.addEventListener('contextmenu', function (e) {
266
+ e.preventDefault();
267
+ });
320
268
  EventHandler.add(el, 'click', _this.clickEventHandler, _this);
321
269
  });
322
270
  };
323
- HScroll.prototype.contextMenuHandler = function (e) {
324
- e.preventDefault();
325
- };
326
271
  HScroll.prototype.repeatScroll = function () {
327
272
  clearInterval(this.timeout);
328
273
  };
@@ -160,6 +160,8 @@ export declare abstract class MenuBase extends Component<HTMLUListElement> imple
160
160
  private delegateScrollHandler;
161
161
  private delegateMouseDownHandler;
162
162
  private delegateTouchOutsideHandler;
163
+ private delegateParentScrollHandler;
164
+ private delegateContextMenuHandler;
163
165
  private navIdx;
164
166
  private animation;
165
167
  private isTapHold;
@@ -198,6 +200,8 @@ export declare abstract class MenuBase extends Component<HTMLUListElement> imple
198
200
  private skipNextArrowDown;
199
201
  private touchStartFn;
200
202
  private touchMoveFn;
203
+ private scrollParents;
204
+ private isCmenuOpened;
201
205
  /**
202
206
  * Triggers while rendering each menu item.
203
207
  *
@@ -159,6 +159,7 @@ var MenuBase = /** @class */ (function (_super) {
159
159
  _this.isAnimationNone = false;
160
160
  _this.isKBDAction = false;
161
161
  _this.skipNextArrowDown = false;
162
+ _this.isCmenuOpened = false;
162
163
  return _this;
163
164
  }
164
165
  /**
@@ -332,16 +333,19 @@ var MenuBase = /** @class */ (function (_super) {
332
333
  new Touch(target, { tapHold: this.touchHandler.bind(this) });
333
334
  }
334
335
  else {
335
- EventHandler.add(target, 'contextmenu', this.cmenuHandler, this);
336
+ this.delegateContextMenuHandler = this.cmenuHandler.bind(this);
337
+ EventHandler.add(target, 'contextmenu', this.delegateContextMenuHandler, this);
336
338
  }
337
339
  }
338
340
  }
339
341
  this.targetElement = target;
340
342
  if (!this.isMenu) {
341
343
  EventHandler.add(this.targetElement, 'scroll', this.scrollHandler, this);
342
- for (var _i = 0, _a = getScrollableParent(this.targetElement); _i < _a.length; _i++) {
344
+ this.scrollParents = getScrollableParent(this.targetElement).slice();
345
+ this.delegateParentScrollHandler = this.scrollHandler.bind(this);
346
+ for (var _i = 0, _a = this.scrollParents; _i < _a.length; _i++) {
343
347
  var parent_1 = _a[_i];
344
- EventHandler.add(parent_1, 'scroll', this.scrollHandler, this);
348
+ EventHandler.add(parent_1, 'scroll', this.delegateParentScrollHandler, this);
345
349
  }
346
350
  }
347
351
  }
@@ -671,6 +675,7 @@ var MenuBase = /** @class */ (function (_super) {
671
675
  if (this.isCMenu) {
672
676
  if (this.canOpen(e.target)) {
673
677
  this.openMenu(null, null, this.pageY, this.pageX, e);
678
+ this.isCmenuOpened = true;
674
679
  }
675
680
  this.isCMenu = false;
676
681
  }
@@ -2075,15 +2080,23 @@ var MenuBase = /** @class */ (function (_super) {
2075
2080
  }
2076
2081
  }
2077
2082
  else {
2078
- EventHandler.remove(target, 'contextmenu', this.cmenuHandler);
2083
+ if (this.delegateContextMenuHandler) {
2084
+ EventHandler.remove(target, 'contextmenu', this.delegateContextMenuHandler);
2085
+ this.delegateContextMenuHandler = null;
2086
+ }
2079
2087
  }
2080
2088
  }
2081
2089
  }
2082
2090
  if (!this.isMenu) {
2083
2091
  EventHandler.remove(this.targetElement, 'scroll', this.scrollHandler);
2084
- for (var _i = 0, _a = getScrollableParent(this.targetElement); _i < _a.length; _i++) {
2085
- var parent_2 = _a[_i];
2086
- EventHandler.remove(parent_2, 'scroll', this.scrollHandler);
2092
+ if (this.scrollParents) {
2093
+ for (var _i = 0, _a = this.scrollParents; _i < _a.length; _i++) {
2094
+ var parent_2 = _a[_i];
2095
+ EventHandler.remove(parent_2, 'scroll', this.delegateParentScrollHandler);
2096
+ }
2097
+ this.delegateParentScrollHandler = null;
2098
+ this.scrollParents.length = 0;
2099
+ this.scrollParents = null;
2087
2100
  }
2088
2101
  }
2089
2102
  }
@@ -2563,6 +2576,17 @@ var MenuBase = /** @class */ (function (_super) {
2563
2576
  var wrapper = this.getWrapper();
2564
2577
  if (wrapper) {
2565
2578
  this.unWireEvents();
2579
+ this.delegateClickHandler = null;
2580
+ this.delegateMoverHandler = null;
2581
+ this.delegateMouseDownHandler = null;
2582
+ this.delegateDomKeyHandler = null;
2583
+ this.delegateScrollHandler = null;
2584
+ this.delegateTouchOutsideHandler = null;
2585
+ this.delegateParentScrollHandler = null;
2586
+ if (this.delegateContextMenuHandler) {
2587
+ EventHandler.remove(this.targetElement, 'contextmenu', this.delegateContextMenuHandler);
2588
+ this.delegateContextMenuHandler = null;
2589
+ }
2566
2590
  if (!this.isMenu) {
2567
2591
  this.clonedElement.style.display = '';
2568
2592
  if (this.clonedElement.tagName === 'EJS-CONTEXTMENU') {
@@ -2606,7 +2630,31 @@ var MenuBase = /** @class */ (function (_super) {
2606
2630
  wrapper.parentNode.insertBefore(this.element, wrapper);
2607
2631
  this.clonedElement = null;
2608
2632
  }
2633
+ if (this.popupObj) {
2634
+ this.popupObj.destroy();
2635
+ this.popupObj = null;
2636
+ }
2637
+ this.currentTarget = null;
2638
+ this.targetElement = null;
2639
+ if (this.animation) {
2640
+ this.animation.destroy();
2641
+ this.animation = null;
2642
+ }
2643
+ if (!this.isMenu && !this.isCmenuOpened && this.element) {
2644
+ var elementInstance = getValue('ej2_instances', this.element);
2645
+ if (elementInstance && Array.isArray(elementInstance)) {
2646
+ elementInstance.length = 0;
2647
+ setValue('ej2_instances', elementInstance, this.element);
2648
+ }
2649
+ }
2609
2650
  detach(wrapper);
2651
+ if (this.uList && !document.body.contains(this.uList)) {
2652
+ var ulInstance = getValue('ej2_instances', this.uList);
2653
+ if (ulInstance && Array.isArray(ulInstance)) {
2654
+ ulInstance.length = 0;
2655
+ setValue('ej2_instances', ulInstance, this.uList);
2656
+ }
2657
+ }
2610
2658
  _super.prototype.destroy.call(this);
2611
2659
  if (this.template) {
2612
2660
  this.clearTemplate(['template']);
@@ -324,19 +324,14 @@ var Toolbar = /** @class */ (function (_super) {
324
324
  }
325
325
  };
326
326
  Toolbar.prototype.destroyItems = function () {
327
- var _this = this;
328
327
  if (this.element) {
329
- [].slice.call(this.element.querySelectorAll('.' + CLS_ITEM)).forEach(function (el) {
330
- EventHandler.remove(el, 'click', _this.itemClick);
331
- detach(el);
332
- });
328
+ [].slice.call(this.element.querySelectorAll('.' + CLS_ITEM)).forEach(function (el) { detach(el); });
333
329
  }
334
330
  if (this.tbarAlign) {
335
331
  var tbarItems = this.element.querySelector('.' + CLS_ITEMS);
336
332
  if (tbarItems) {
337
333
  if (tbarItems.children) {
338
334
  [].slice.call(tbarItems.children).forEach(function (el) {
339
- EventHandler.remove(el, 'click', _this.itemClick);
340
335
  detach(el);
341
336
  });
342
337
  }
@@ -2081,7 +2076,7 @@ var Toolbar = /** @class */ (function (_super) {
2081
2076
  dom.setAttribute('aria-label', (item.text || item.tooltipText));
2082
2077
  dom.setAttribute('aria-disabled', 'false');
2083
2078
  innerEle.appendChild(dom);
2084
- EventHandler.add(innerEle, 'click', this.itemClick, this);
2079
+ innerEle.addEventListener('click', this.itemClick.bind(this));
2085
2080
  break;
2086
2081
  case 'Separator':
2087
2082
  this.add(innerEle, CLS_SEPARATOR);
@@ -3914,7 +3914,7 @@
3914
3914
  color: rgba(var(--color-sf-white));
3915
3915
  }
3916
3916
  .e-carousel .e-carousel-indicators.e-progress .e-indicator-bars {
3917
- background-color: rgba(var(--color-sf-primary), 0.4);
3917
+ background-color: rgba(var(--color-sf-primary-shadow), 0.4);
3918
3918
  }
3919
3919
  .e-carousel .e-carousel-indicators.e-progress .e-indicator-bars .e-indicator-bar {
3920
3920
  background-color: var(--color-sf-primary);
@@ -4986,7 +4986,7 @@
4986
4986
  color: rgba(var(--color-sf-white));
4987
4987
  }
4988
4988
  .e-carousel .e-carousel-indicators.e-progress .e-indicator-bars {
4989
- background-color: rgba(var(--color-sf-primary), 0.4);
4989
+ background-color: rgba(var(--color-sf-primary-shadow), 0.4);
4990
4990
  }
4991
4991
  .e-carousel .e-carousel-indicators.e-progress .e-indicator-bars .e-indicator-bar {
4992
4992
  background-color: var(--color-sf-primary);
@@ -7,7 +7,7 @@ $carousel-indicator-bar-bg: $primary-text-color !default;
7
7
  $carousel-indicator-bar-border: 1px solid rgba($white, .4) !default;
8
8
  $carousel-indicator-bar-bg-active: $primary !default;
9
9
  $carousel-indicator-border-color-focus: $black !default;
10
- $carousel-indicator-progress-bg: rgba($carousel-indicator-bar-bg-active, .4) !default;
10
+ $carousel-indicator-progress-bg: rgba(var(--color-sf-primary-shadow), .4) !default;
11
11
  $carousel-animation-duration: .6s !default;
12
12
  $carousel-animation-timing-function: ease-in-out !default;
13
13
  $carousel-navigator-btn-border-radius-hover: $border-radius-50p !default;
@@ -608,7 +608,7 @@
608
608
  color: rgba(var(--color-sf-white));
609
609
  }
610
610
  .e-carousel .e-carousel-indicators.e-progress .e-indicator-bars {
611
- background-color: rgba(var(--color-sf-primary), 0.4);
611
+ background-color: rgba(var(--color-sf-primary-shadow), 0.4);
612
612
  }
613
613
  .e-carousel .e-carousel-indicators.e-progress .e-indicator-bars .e-indicator-bar {
614
614
  background-color: var(--color-sf-primary);