@syncfusion/ej2-navigations 29.2.8 → 30.1.39

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.
Files changed (222) hide show
  1. package/.eslintrc.json +2 -0
  2. package/dist/ej2-navigations.min.js +2 -2
  3. package/dist/ej2-navigations.umd.min.js +2 -2
  4. package/dist/ej2-navigations.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-navigations.es2015.js +117 -30
  6. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  7. package/dist/es6/ej2-navigations.es5.js +118 -30
  8. package/dist/es6/ej2-navigations.es5.js.map +1 -1
  9. package/dist/global/ej2-navigations.min.js +2 -2
  10. package/dist/global/ej2-navigations.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +7 -7
  13. package/src/carousel/carousel.js +1 -7
  14. package/src/context-menu/context-menu-model.d.ts +1 -1
  15. package/src/context-menu/context-menu.d.ts +1 -0
  16. package/src/context-menu/context-menu.js +11 -1
  17. package/src/sidebar/sidebar.js +5 -1
  18. package/src/stepper/stepper.js +6 -5
  19. package/src/tab/tab.js +3 -1
  20. package/src/toolbar/toolbar-model.d.ts +8 -1
  21. package/src/toolbar/toolbar.d.ts +19 -0
  22. package/src/toolbar/toolbar.js +69 -13
  23. package/src/treeview/treeview.js +24 -3
  24. package/styles/bds-lite.css +43 -3
  25. package/styles/bds.css +45 -5
  26. package/styles/bootstrap-dark-lite.css +45 -5
  27. package/styles/bootstrap-dark.css +49 -9
  28. package/styles/bootstrap-lite.css +45 -5
  29. package/styles/bootstrap.css +47 -7
  30. package/styles/bootstrap4-lite.css +46 -6
  31. package/styles/bootstrap4.css +48 -8
  32. package/styles/bootstrap5-dark-lite.css +39 -5
  33. package/styles/bootstrap5-dark.css +42 -8
  34. package/styles/bootstrap5-lite.css +40 -6
  35. package/styles/bootstrap5.3-lite.css +40 -6
  36. package/styles/bootstrap5.3.css +42 -8
  37. package/styles/bootstrap5.css +43 -9
  38. package/styles/breadcrumb/_layout.scss +14 -0
  39. package/styles/breadcrumb/bds.css +15 -0
  40. package/styles/breadcrumb/bootstrap-dark.css +15 -0
  41. package/styles/breadcrumb/bootstrap.css +15 -0
  42. package/styles/breadcrumb/bootstrap4.css +15 -0
  43. package/styles/breadcrumb/bootstrap5-dark.css +15 -0
  44. package/styles/breadcrumb/bootstrap5.3.css +15 -0
  45. package/styles/breadcrumb/bootstrap5.css +15 -0
  46. package/styles/breadcrumb/fabric-dark.css +15 -0
  47. package/styles/breadcrumb/fabric.css +15 -0
  48. package/styles/breadcrumb/fluent-dark.css +15 -0
  49. package/styles/breadcrumb/fluent.css +15 -0
  50. package/styles/breadcrumb/fluent2.css +15 -0
  51. package/styles/breadcrumb/highcontrast-light.css +15 -0
  52. package/styles/breadcrumb/highcontrast.css +15 -0
  53. package/styles/breadcrumb/material-dark.css +15 -0
  54. package/styles/breadcrumb/material.css +15 -0
  55. package/styles/breadcrumb/material3-dark.css +15 -0
  56. package/styles/breadcrumb/material3.css +15 -0
  57. package/styles/breadcrumb/tailwind-dark.css +15 -0
  58. package/styles/breadcrumb/tailwind.css +15 -0
  59. package/styles/breadcrumb/tailwind3.css +15 -0
  60. package/styles/context-menu/_layout.scss +5 -0
  61. package/styles/context-menu/bds.css +6 -0
  62. package/styles/context-menu/bootstrap-dark.css +6 -0
  63. package/styles/context-menu/bootstrap.css +6 -0
  64. package/styles/context-menu/bootstrap4.css +6 -0
  65. package/styles/context-menu/bootstrap5-dark.css +6 -0
  66. package/styles/context-menu/bootstrap5.3.css +6 -0
  67. package/styles/context-menu/bootstrap5.css +6 -0
  68. package/styles/context-menu/fabric-dark.css +6 -0
  69. package/styles/context-menu/fabric.css +6 -0
  70. package/styles/context-menu/fluent-dark.css +6 -0
  71. package/styles/context-menu/fluent.css +6 -0
  72. package/styles/context-menu/fluent2.css +6 -0
  73. package/styles/context-menu/highcontrast-light.css +6 -0
  74. package/styles/context-menu/highcontrast.css +6 -0
  75. package/styles/context-menu/material-dark.css +6 -0
  76. package/styles/context-menu/material.css +6 -0
  77. package/styles/context-menu/material3-dark.css +6 -0
  78. package/styles/context-menu/material3.css +6 -0
  79. package/styles/context-menu/tailwind-dark.css +6 -0
  80. package/styles/context-menu/tailwind.css +6 -0
  81. package/styles/context-menu/tailwind3.css +6 -0
  82. package/styles/fabric-dark-lite.css +43 -3
  83. package/styles/fabric-dark.css +45 -5
  84. package/styles/fabric-lite.css +44 -4
  85. package/styles/fabric.css +46 -6
  86. package/styles/fluent-dark-lite.css +50 -10
  87. package/styles/fluent-dark.css +53 -13
  88. package/styles/fluent-lite.css +50 -10
  89. package/styles/fluent.css +53 -13
  90. package/styles/fluent2-lite.css +43 -3
  91. package/styles/fluent2.css +45 -5
  92. package/styles/highcontrast-light-lite.css +43 -3
  93. package/styles/highcontrast-light.css +45 -5
  94. package/styles/highcontrast-lite.css +44 -4
  95. package/styles/highcontrast.css +46 -6
  96. package/styles/material-dark-lite.css +45 -5
  97. package/styles/material-dark.css +47 -7
  98. package/styles/material-lite.css +44 -4
  99. package/styles/material.css +46 -6
  100. package/styles/material3-dark-lite.css +43 -3
  101. package/styles/material3-dark.css +46 -7
  102. package/styles/material3-lite.css +43 -3
  103. package/styles/material3.css +46 -7
  104. package/styles/pager/_bds-definition.scss +1 -1
  105. package/styles/pager/_bigger.scss +0 -1
  106. package/styles/pager/_bootstrap-dark-definition.scss +1 -1
  107. package/styles/pager/_bootstrap-definition.scss +1 -1
  108. package/styles/pager/_bootstrap4-definition.scss +1 -1
  109. package/styles/pager/_bootstrap5-definition.scss +2 -2
  110. package/styles/pager/_bootstrap5.3-definition.scss +1 -1
  111. package/styles/pager/_fabric-dark-definition.scss +1 -1
  112. package/styles/pager/_fabric-definition.scss +1 -1
  113. package/styles/pager/_fluent-definition.scss +2 -2
  114. package/styles/pager/_fluent2-definition.scss +1 -1
  115. package/styles/pager/_fusionnew-definition.scss +1 -1
  116. package/styles/pager/_highcontrast-definition.scss +1 -1
  117. package/styles/pager/_highcontrast-light-definition.scss +1 -1
  118. package/styles/pager/_layout.scss +8 -0
  119. package/styles/pager/_material-dark-definition.scss +1 -1
  120. package/styles/pager/_material-definition.scss +1 -1
  121. package/styles/pager/_material3-definition.scss +1 -1
  122. package/styles/pager/_tailwind-definition.scss +1 -1
  123. package/styles/pager/_tailwind3-definition.scss +2 -2
  124. package/styles/pager/bds.css +13 -3
  125. package/styles/pager/bootstrap-dark.css +13 -3
  126. package/styles/pager/bootstrap.css +13 -3
  127. package/styles/pager/bootstrap4.css +13 -3
  128. package/styles/pager/bootstrap5-dark.css +8 -4
  129. package/styles/pager/bootstrap5.3.css +7 -3
  130. package/styles/pager/bootstrap5.css +8 -4
  131. package/styles/pager/fabric-dark.css +13 -3
  132. package/styles/pager/fabric.css +13 -3
  133. package/styles/pager/fluent-dark.css +14 -4
  134. package/styles/pager/fluent.css +14 -4
  135. package/styles/pager/fluent2.css +13 -3
  136. package/styles/pager/highcontrast-light.css +13 -3
  137. package/styles/pager/highcontrast.css +13 -3
  138. package/styles/pager/material-dark.css +13 -3
  139. package/styles/pager/material.css +13 -3
  140. package/styles/pager/material3-dark.css +13 -4
  141. package/styles/pager/material3.css +13 -4
  142. package/styles/pager/tailwind-dark.css +13 -3
  143. package/styles/pager/tailwind.css +13 -3
  144. package/styles/pager/tailwind3.css +14 -4
  145. package/styles/tab/_bootstrap-dark-definition.scss +3 -3
  146. package/styles/tab/_bootstrap-definition.scss +3 -3
  147. package/styles/tab/_bootstrap4-definition.scss +3 -3
  148. package/styles/tab/_bootstrap5-definition.scss +3 -3
  149. package/styles/tab/_bootstrap5.3-definition.scss +3 -3
  150. package/styles/tab/_fabric-definition.scss +1 -1
  151. package/styles/tab/_fluent-definition.scss +4 -4
  152. package/styles/tab/_highcontrast-definition.scss +1 -1
  153. package/styles/tab/_material-definition.scss +1 -1
  154. package/styles/tab/_tailwind-definition.scss +3 -3
  155. package/styles/tab/_tailwind3-definition.scss +3 -3
  156. package/styles/tab/bootstrap-dark.css +2 -2
  157. package/styles/tab/bootstrap.css +2 -2
  158. package/styles/tab/bootstrap4.css +3 -3
  159. package/styles/tab/bootstrap5-dark.css +2 -2
  160. package/styles/tab/bootstrap5.3.css +3 -3
  161. package/styles/tab/bootstrap5.css +3 -3
  162. package/styles/tab/fabric.css +1 -1
  163. package/styles/tab/fluent-dark.css +7 -7
  164. package/styles/tab/fluent.css +7 -7
  165. package/styles/tab/highcontrast.css +1 -1
  166. package/styles/tab/material.css +1 -1
  167. package/styles/tab/tailwind-dark.css +4 -4
  168. package/styles/tab/tailwind.css +4 -4
  169. package/styles/tab/tailwind3.css +3 -3
  170. package/styles/tailwind-dark-lite.css +47 -7
  171. package/styles/tailwind-dark.css +49 -9
  172. package/styles/tailwind-lite.css +47 -7
  173. package/styles/tailwind.css +49 -9
  174. package/styles/tailwind3-lite.css +46 -6
  175. package/styles/tailwind3.css +49 -9
  176. package/styles/toolbar/_bootstrap-dark-definition.scss +1 -1
  177. package/styles/toolbar/_layout.scss +13 -1
  178. package/styles/toolbar/_material-dark-definition.scss +2 -2
  179. package/styles/toolbar/bds.css +8 -2
  180. package/styles/toolbar/bootstrap-dark.css +10 -4
  181. package/styles/toolbar/bootstrap.css +8 -2
  182. package/styles/toolbar/bootstrap4.css +8 -2
  183. package/styles/toolbar/bootstrap5-dark.css +8 -2
  184. package/styles/toolbar/bootstrap5.3.css +8 -2
  185. package/styles/toolbar/bootstrap5.css +8 -2
  186. package/styles/toolbar/fabric-dark.css +8 -2
  187. package/styles/toolbar/fabric.css +8 -2
  188. package/styles/toolbar/fluent-dark.css +8 -2
  189. package/styles/toolbar/fluent.css +8 -2
  190. package/styles/toolbar/fluent2.css +8 -2
  191. package/styles/toolbar/highcontrast-light.css +8 -2
  192. package/styles/toolbar/highcontrast.css +8 -2
  193. package/styles/toolbar/material-dark.css +10 -4
  194. package/styles/toolbar/material.css +8 -2
  195. package/styles/toolbar/material3-dark.css +8 -2
  196. package/styles/toolbar/material3.css +8 -2
  197. package/styles/toolbar/tailwind-dark.css +8 -2
  198. package/styles/toolbar/tailwind.css +8 -2
  199. package/styles/toolbar/tailwind3.css +8 -2
  200. package/styles/treeview/_layout.scss +4 -0
  201. package/styles/treeview/_material3-definition.scss +1 -1
  202. package/styles/treeview/bds.css +3 -0
  203. package/styles/treeview/bootstrap-dark.css +3 -0
  204. package/styles/treeview/bootstrap.css +3 -0
  205. package/styles/treeview/bootstrap4.css +3 -0
  206. package/styles/treeview/bootstrap5-dark.css +3 -0
  207. package/styles/treeview/bootstrap5.3.css +3 -0
  208. package/styles/treeview/bootstrap5.css +3 -0
  209. package/styles/treeview/fabric-dark.css +3 -0
  210. package/styles/treeview/fabric.css +3 -0
  211. package/styles/treeview/fluent-dark.css +3 -0
  212. package/styles/treeview/fluent.css +3 -0
  213. package/styles/treeview/fluent2.css +3 -0
  214. package/styles/treeview/highcontrast-light.css +3 -0
  215. package/styles/treeview/highcontrast.css +3 -0
  216. package/styles/treeview/material-dark.css +3 -0
  217. package/styles/treeview/material.css +3 -0
  218. package/styles/treeview/material3-dark.css +4 -1
  219. package/styles/treeview/material3.css +4 -1
  220. package/styles/treeview/tailwind-dark.css +3 -0
  221. package/styles/treeview/tailwind.css +3 -0
  222. package/styles/treeview/tailwind3.css +3 -0
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 29.2.8
3
+ * version : 30.1.39
4
4
  * Copyright Syncfusion Inc. 2001 - 2024. 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": "29.2.8",
3
+ "version": "30.1.39",
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": "~29.2.4",
12
- "@syncfusion/ej2-buttons": "~29.2.5",
13
- "@syncfusion/ej2-data": "~29.2.4",
14
- "@syncfusion/ej2-inputs": "~29.2.5",
15
- "@syncfusion/ej2-lists": "~29.2.4",
16
- "@syncfusion/ej2-popups": "~29.2.8"
11
+ "@syncfusion/ej2-base": "~30.1.38",
12
+ "@syncfusion/ej2-buttons": "~30.1.37",
13
+ "@syncfusion/ej2-data": "~30.1.38",
14
+ "@syncfusion/ej2-inputs": "~30.1.38",
15
+ "@syncfusion/ej2-lists": "~30.1.37",
16
+ "@syncfusion/ej2-popups": "~30.1.37"
17
17
  },
18
18
  "devDependencies": {},
19
19
  "keywords": [
@@ -167,9 +167,6 @@ var Carousel = /** @class */ (function (_super) {
167
167
  }
168
168
  break;
169
169
  case 'enableTouchSwipe':
170
- if (!this.enableTouchSwipe && this.touchModule) {
171
- this.touchModule.destroy();
172
- }
173
170
  if (this.element.querySelector("." + CLS_ITEMS)) {
174
171
  this.renderTouchActions();
175
172
  }
@@ -572,9 +569,6 @@ var Carousel = /** @class */ (function (_super) {
572
569
  this.keyModule = new KeyboardEvents(this.element, { keyAction: this.keyHandler.bind(this), keyConfigs: this.keyConfigs });
573
570
  };
574
571
  Carousel.prototype.renderTouchActions = function () {
575
- if (!this.enableTouchSwipe) {
576
- return;
577
- }
578
572
  this.touchModule = new Touch(this.element, { swipe: this.swipeHandler.bind(this) });
579
573
  };
580
574
  Carousel.prototype.applyAnimation = function () {
@@ -1142,7 +1136,7 @@ var Carousel = /** @class */ (function (_super) {
1142
1136
  }
1143
1137
  };
1144
1138
  Carousel.prototype.wireEvents = function () {
1145
- if (this.animationEffect !== 'Custom' && this.enableTouchSwipe) {
1139
+ if (this.animationEffect !== 'Custom') {
1146
1140
  this.swipeModehandlers();
1147
1141
  }
1148
1142
  EventHandler.add(this.element, 'focusin focusout', this.onFocusActions, this);
@@ -1,4 +1,4 @@
1
- import { attributes, getUniqueID, Collection, NotifyPropertyChanges, INotifyPropertyChanged, Property } from '@syncfusion/ej2-base';import { getZindexPartial } from '@syncfusion/ej2-popups';import { MenuBase, MenuItem } from '../common/menu-base';import { MenuItemModel } from './../common/menu-base-model';
1
+ import { attributes, getUniqueID, Collection, NotifyPropertyChanges, INotifyPropertyChanged, Property, isNullOrUndefined, addClass, removeClass } from '@syncfusion/ej2-base';import { getZindexPartial } from '@syncfusion/ej2-popups';import { MenuBase, MenuItem } from '../common/menu-base';import { MenuItemModel } from './../common/menu-base-model';
2
2
  import {MenuBaseModel} from "../common/menu-base-model";
3
3
 
4
4
  /**
@@ -82,6 +82,7 @@ export declare class ContextMenu extends MenuBase implements INotifyPropertyChan
82
82
  * @returns {void}
83
83
  */
84
84
  close(): void;
85
+ private addTemplateClass;
85
86
  /**
86
87
  * Called internally if any of the property value changed.
87
88
  *
@@ -19,9 +19,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
19
19
  };
20
20
  /* eslint-disable @typescript-eslint/triple-slash-reference */
21
21
  /// <reference path='../common/menu-base-model.d.ts'/>
22
- import { attributes, getUniqueID, Collection, NotifyPropertyChanges, Property } from '@syncfusion/ej2-base';
22
+ import { attributes, getUniqueID, Collection, NotifyPropertyChanges, Property, isNullOrUndefined, addClass, removeClass } from '@syncfusion/ej2-base';
23
23
  import { getZindexPartial } from '@syncfusion/ej2-popups';
24
24
  import { MenuBase, MenuItem } from '../common/menu-base';
25
+ var CONTEXTMENUTEMPLATE = 'e-contextmenu-template';
25
26
  /**
26
27
  * The ContextMenu is a graphical user interface that appears on the user right click/touch hold operation.
27
28
  * ```html
@@ -59,6 +60,7 @@ var ContextMenu = /** @class */ (function (_super) {
59
60
  };
60
61
  ContextMenu.prototype.initialize = function () {
61
62
  this.template = this.itemTemplate ? this.itemTemplate : null;
63
+ this.addTemplateClass();
62
64
  _super.prototype.initialize.call(this);
63
65
  attributes(this.element, { 'role': 'menubar', 'tabindex': '0' });
64
66
  this.element.style.zIndex = getZindexPartial(this.element).toString();
@@ -84,6 +86,12 @@ var ContextMenu = /** @class */ (function (_super) {
84
86
  ContextMenu.prototype.close = function () {
85
87
  _super.prototype.closeMenu.call(this);
86
88
  };
89
+ ContextMenu.prototype.addTemplateClass = function () {
90
+ if (!isNullOrUndefined(this.itemTemplate) && typeof this.itemTemplate === 'function' ||
91
+ (typeof this.itemTemplate === 'string' && this.itemTemplate !== '')) {
92
+ addClass([this.element], CONTEXTMENUTEMPLATE);
93
+ }
94
+ };
87
95
  /**
88
96
  * Called internally if any of the property value changed.
89
97
  *
@@ -107,6 +115,8 @@ var ContextMenu = /** @class */ (function (_super) {
107
115
  break;
108
116
  case 'itemTemplate':
109
117
  this.itemTemplate = newProp.itemTemplate;
118
+ removeClass([this.element], CONTEXTMENUTEMPLATE);
119
+ this.addTemplateClass();
110
120
  this.refresh();
111
121
  }
112
122
  }
@@ -202,6 +202,8 @@ var Sidebar = /** @class */ (function (_super) {
202
202
  var sibling = document.querySelector('.e-main-content') || this.targetEle;
203
203
  if (this.target && this.showBackdrop && sibling && !isNullOrUndefined(this.defaultBackdropDiv)) {
204
204
  removeClass([this.defaultBackdropDiv], DEFAULTBACKDROP);
205
+ this.defaultBackdropDiv.remove();
206
+ this.defaultBackdropDiv = null;
205
207
  }
206
208
  else if (this.showBackdrop && this.modal) {
207
209
  this.modal.style.display = 'none';
@@ -304,7 +306,9 @@ var Sidebar = /** @class */ (function (_super) {
304
306
  removeClass([_this.element], CLOSE);
305
307
  setStyle(_this.element, { 'width': formatUnit(_this.width) });
306
308
  _this.setType(_this.type);
307
- _this.createBackDrop();
309
+ if (_this.targetEle && !_this.targetEle.querySelector('.e-sidebar-overlay')) {
310
+ _this.createBackDrop();
311
+ }
308
312
  _this.setAnimation();
309
313
  if (_this.type === 'Slide') {
310
314
  document.body.classList.add('e-sidebar-overflow');
@@ -225,11 +225,6 @@ var Stepper = /** @class */ (function (_super) {
225
225
  Stepper.prototype.updateAnimation = function () {
226
226
  var progressEle = this.element.querySelector('.e-progressbar-value');
227
227
  if (this.animation.enable) {
228
- if (this.animation.duration >= 0) {
229
- if (progressEle) {
230
- progressEle.style.setProperty('--duration', ((this.animation.duration) + 'ms'));
231
- }
232
- }
233
228
  if (this.animation.delay >= 0) {
234
229
  if (progressEle) {
235
230
  progressEle.style.setProperty('--delay', ((this.animation.delay) + 'ms'));
@@ -808,6 +803,9 @@ var Stepper = /** @class */ (function (_super) {
808
803
  }
809
804
  };
810
805
  Stepper.prototype.navigationHandler = function (index, stepStatus, isUpdated) {
806
+ if (index !== this.activeStep && this.progressbar) {
807
+ this.progressbar.style.transitionDuration = this.animation.duration + 'ms';
808
+ }
811
809
  index = Math.min(index, this.steps.length - 1);
812
810
  var Itemslength = this.stepperItemElements.length;
813
811
  if (index >= 0 && index < Itemslength - 1) {
@@ -878,6 +876,9 @@ var Stepper = /** @class */ (function (_super) {
878
876
  this.updateIndicatorStatus(i, itemElement);
879
877
  }
880
878
  this.updateStepInteractions();
879
+ if (this.progressbar) {
880
+ this.progressbar.style.transitionDuration = '0ms';
881
+ }
881
882
  };
882
883
  Stepper.prototype.calculateProgressbarPos = function () {
883
884
  var _this = this;
package/src/tab/tab.js CHANGED
@@ -1408,7 +1408,9 @@ var Tab = /** @class */ (function (_super) {
1408
1408
  }
1409
1409
  break;
1410
1410
  case 'openPopup':
1411
- e.preventDefault();
1411
+ if (!isNOU(e.target) && (e.target.classList.contains(CLS_WRAP))) {
1412
+ e.preventDefault();
1413
+ }
1412
1414
  if (!isNOU(this.popEle) && this.popEle.classList.contains(CLS_POPUP_CLOSE)) {
1413
1415
  this.popObj.show(this.show);
1414
1416
  }
@@ -1,5 +1,5 @@
1
1
  import { Component, EventHandler, Property, Event, EmitType, BaseEventArgs } from '@syncfusion/ej2-base';import { addClass, removeClass, isVisible, closest, attributes, detach, classList, KeyboardEvents } from '@syncfusion/ej2-base';import { selectAll, setStyleAttribute as setStyle, KeyboardEventArgs, select } from '@syncfusion/ej2-base';import { isNullOrUndefined as isNOU, getUniqueID, formatUnit, Collection, compile as templateCompiler } from '@syncfusion/ej2-base';import { INotifyPropertyChanged, NotifyPropertyChanges, ChildProperty, Browser, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { Popup } from '@syncfusion/ej2-popups';import { calculatePosition } from '@syncfusion/ej2-popups';import { Button, IconPosition } from '@syncfusion/ej2-buttons';import { HScroll } from '../common/h-scroll';import { VScroll } from '../common/v-scroll';
2
- import {OverflowOption,ItemType,DisplayMode,ItemAlign,ClickEventArgs,OverflowMode,BeforeCreateArgs} from "./toolbar";
2
+ import {OverflowOption,ItemType,DisplayMode,ItemAlign,ClickEventArgs,OverflowMode,BeforeCreateArgs,KeyDownEventArgs} from "./toolbar";
3
3
  import {ComponentModel} from '@syncfusion/ej2-base';
4
4
 
5
5
  /**
@@ -284,4 +284,11 @@ export interface ToolbarModel extends ComponentModel{
284
284
  */
285
285
  beforeCreate?: EmitType<BeforeCreateArgs>;
286
286
 
287
+ /**
288
+ * The event will be fired when the keyboard interaction occurs on the Toolbar.
289
+ *
290
+ * @event keyDown
291
+ */
292
+ keyDown?: EmitType<KeyDownEventArgs>;
293
+
287
294
  }
@@ -1,4 +1,5 @@
1
1
  import { Component, EmitType, BaseEventArgs } from '@syncfusion/ej2-base';
2
+ import { KeyboardEventArgs } from '@syncfusion/ej2-base';
2
3
  import { INotifyPropertyChanged, ChildProperty } from '@syncfusion/ej2-base';
3
4
  import { ToolbarModel, ItemModel } from './toolbar-model';
4
5
  /**
@@ -65,6 +66,17 @@ export interface BeforeCreateArgs extends BaseEventArgs {
65
66
  /** Specifies the scrolling distance in scroller. */
66
67
  scrollStep: number;
67
68
  }
69
+ /** An interface that holds options to control keyDown event in the toolbar. */
70
+ export interface KeyDownEventArgs extends BaseEventArgs {
71
+ /** Defines the keyboard event arguments. */
72
+ originalEvent: KeyboardEventArgs;
73
+ /** Defines the prevent action. */
74
+ cancel?: boolean;
75
+ /** Defines the current Toolbar item. */
76
+ currentItem?: HTMLElement;
77
+ /** Defines the next Toolbar item. */
78
+ nextItem?: HTMLElement;
79
+ }
68
80
  /**
69
81
  * An item object that is used to configure Toolbar commands.
70
82
  */
@@ -347,6 +359,12 @@ export declare class Toolbar extends Component<HTMLElement> implements INotifyPr
347
359
  * @event beforeCreate
348
360
  */
349
361
  beforeCreate: EmitType<BeforeCreateArgs>;
362
+ /**
363
+ * The event will be fired when the keyboard interaction occurs on the Toolbar.
364
+ *
365
+ * @event keyDown
366
+ */
367
+ keyDown: EmitType<KeyDownEventArgs>;
350
368
  /**
351
369
  * Removes the control from the DOM and also removes all its related events.
352
370
  *
@@ -382,6 +400,7 @@ export declare class Toolbar extends Component<HTMLElement> implements INotifyPr
382
400
  private remove;
383
401
  private elementFocus;
384
402
  private clstElement;
403
+ private getNextFocusableItem;
385
404
  private keyHandling;
386
405
  private keyActionHandler;
387
406
  /**
@@ -377,6 +377,38 @@ var Toolbar = /** @class */ (function (_super) {
377
377
  }
378
378
  return clst;
379
379
  };
380
+ Toolbar.prototype.getNextFocusableItem = function (currentItem, action) {
381
+ var selector = "." + CLS_ITEM + ":not(." + CLS_DISABLE + "):not(." + CLS_SEPARATOR + "):not(." + CLS_HIDDEN + ")";
382
+ var items = Array.from(this.element.querySelectorAll(selector));
383
+ var currentIndex = items.indexOf(currentItem);
384
+ if (currentIndex < 0) {
385
+ return null;
386
+ }
387
+ var nextIndex;
388
+ switch (action) {
389
+ case 'moveRight':
390
+ case 'moveDown':
391
+ case 'tab':
392
+ nextIndex = (currentIndex + 1) % items.length;
393
+ break;
394
+ case 'moveLeft':
395
+ case 'moveUp':
396
+ nextIndex = (currentIndex - 1 + items.length) % items.length;
397
+ break;
398
+ case 'home':
399
+ nextIndex = 0;
400
+ break;
401
+ case 'end':
402
+ nextIndex = items.length - 1;
403
+ break;
404
+ default:
405
+ nextIndex = currentIndex;
406
+ }
407
+ if (nextIndex >= 0 && nextIndex < items.length) {
408
+ return items[parseInt(nextIndex.toString(), 10)];
409
+ }
410
+ return null;
411
+ };
380
412
  Toolbar.prototype.keyHandling = function (clst, e, trgt, navChk, scrollChk) {
381
413
  var popObj = this.popObj;
382
414
  var rootEle = this.element;
@@ -442,19 +474,30 @@ var Toolbar = /** @class */ (function (_super) {
442
474
  if (!this.isVertical) {
443
475
  if (popObj && closest(trgt, '.e-popup')) {
444
476
  var popEle = popObj.element;
445
- var popFrstEle = popEle.firstElementChild;
446
- if ((value === 'previous' && popFrstEle === clst)) {
447
- popEle.lastElementChild.firstChild.focus();
477
+ if ((value === 'previous' && popEle.firstElementChild === clst)) {
478
+ var lastVisibleEle = this.focusLastVisibleEle([].slice.call(popEle.children));
479
+ if (lastVisibleEle) {
480
+ this.elementFocus(lastVisibleEle);
481
+ }
448
482
  }
449
483
  else if (value === 'next' && popEle.lastElementChild === clst) {
450
- popFrstEle.firstChild.focus();
484
+ var firstVisibleEle = this.focusFirstVisibleEle([].slice.call(popEle.children));
485
+ if (firstVisibleEle) {
486
+ this.elementFocus(firstVisibleEle);
487
+ }
451
488
  }
452
489
  else {
453
490
  this.eleFocus(clst, value);
454
491
  }
455
492
  }
456
493
  else if (e.action === 'moveDown' && popObj && isVisible(popObj.element)) {
457
- this.elementFocus(clst);
494
+ var skipEle = this.eleContains(clst);
495
+ if (skipEle) {
496
+ this.eleFocus(clst, value);
497
+ }
498
+ else {
499
+ this.elementFocus(clst);
500
+ }
458
501
  }
459
502
  }
460
503
  else {
@@ -500,8 +543,10 @@ var Toolbar = /** @class */ (function (_super) {
500
543
  }
501
544
  };
502
545
  Toolbar.prototype.keyActionHandler = function (e) {
546
+ var _this = this;
503
547
  var trgt = e.target;
504
- if (trgt.tagName === 'INPUT' || trgt.tagName === 'TEXTAREA' || this.element.classList.contains(CLS_DISABLE)) {
548
+ if ((e.action === 'home' || e.action === 'end' || e.action === 'moveRight' || e.action === 'moveLeft' || e.action === 'moveUp' || e.action === 'moveDown')
549
+ && (trgt.tagName === 'INPUT' || trgt.tagName === 'TEXTAREA' || this.element.classList.contains(CLS_DISABLE))) {
505
550
  return;
506
551
  }
507
552
  e.preventDefault();
@@ -509,7 +554,19 @@ var Toolbar = /** @class */ (function (_super) {
509
554
  var tbarScrollChk = trgt.classList.contains(CLS_TBARSCRLNAV);
510
555
  var clst = this.clstElement(tbrNavChk, trgt);
511
556
  if (clst || tbarScrollChk) {
512
- this.keyHandling(clst, e, trgt, tbrNavChk, tbarScrollChk);
557
+ var currentItem = clst;
558
+ var nextItem = this.getNextFocusableItem(currentItem, e.action);
559
+ var keyDownEventArgs = {
560
+ originalEvent: e,
561
+ currentItem: currentItem,
562
+ nextItem: nextItem,
563
+ cancel: false
564
+ };
565
+ this.trigger('keyDown', keyDownEventArgs, function (keyDownArgs) {
566
+ if (!keyDownArgs.cancel) {
567
+ _this.keyHandling(clst, e, trgt, tbrNavChk, tbarScrollChk);
568
+ }
569
+ });
513
570
  }
514
571
  };
515
572
  /**
@@ -548,7 +605,7 @@ var Toolbar = /** @class */ (function (_super) {
548
605
  var index = 0;
549
606
  while (index < nodes.length) {
550
607
  var ele = nodes[parseInt(index.toString(), 10)];
551
- if (!ele.classList.contains(CLS_HIDDEN) && !ele.classList.contains(CLS_DISABLE)) {
608
+ if (!ele.classList.contains(CLS_SEPARATOR) && !ele.classList.contains(CLS_HIDDEN) && !ele.classList.contains(CLS_DISABLE)) {
552
609
  return ele;
553
610
  }
554
611
  index++;
@@ -560,7 +617,7 @@ var Toolbar = /** @class */ (function (_super) {
560
617
  var index = nodes.length - 1;
561
618
  while (index >= 0) {
562
619
  var ele = nodes[parseInt(index.toString(), 10)];
563
- if (!ele.classList.contains(CLS_HIDDEN) && !ele.classList.contains(CLS_DISABLE)) {
620
+ if (!ele.classList.contains(CLS_SEPARATOR) && !ele.classList.contains(CLS_HIDDEN) && !ele.classList.contains(CLS_DISABLE)) {
564
621
  return ele;
565
622
  }
566
623
  index--;
@@ -2048,10 +2105,6 @@ var Toolbar = /** @class */ (function (_super) {
2048
2105
  return isNOU(ele.getAttribute('data-tabindex')) ? '-1' : ele.getAttribute('data-tabindex');
2049
2106
  };
2050
2107
  Toolbar.prototype.itemClick = function (e) {
2051
- var itemClosest = !isNOU(closest(e.currentTarget, '.' + CLS_TEMPLATE));
2052
- if (itemClosest) {
2053
- return;
2054
- }
2055
2108
  this.activeEleSwitch(e.currentTarget);
2056
2109
  };
2057
2110
  Toolbar.prototype.activeEleSwitch = function (ele) {
@@ -2414,6 +2467,9 @@ var Toolbar = /** @class */ (function (_super) {
2414
2467
  __decorate([
2415
2468
  Event()
2416
2469
  ], Toolbar.prototype, "beforeCreate", void 0);
2470
+ __decorate([
2471
+ Event()
2472
+ ], Toolbar.prototype, "keyDown", void 0);
2417
2473
  Toolbar = __decorate([
2418
2474
  NotifyPropertyChanges
2419
2475
  ], Toolbar);
@@ -1810,7 +1810,10 @@ var TreeView = /** @class */ (function (_super) {
1810
1810
  activeElement_1.classList.add(ITEM_ANIMATION_ACTIVE);
1811
1811
  }
1812
1812
  start_1 = liEle_1.offsetHeight;
1813
- end_1 = select('.' + TEXTWRAP, currLi).offsetHeight;
1813
+ var computedStyle = window.getComputedStyle(liEle_1);
1814
+ var paddingTop = parseFloat(computedStyle.paddingTop);
1815
+ var paddingBottom = parseFloat(computedStyle.paddingBottom);
1816
+ end_1 = select('.' + TEXTWRAP, currLi).offsetHeight + paddingBottom + paddingTop;
1814
1817
  },
1815
1818
  progress: function (args) {
1816
1819
  args.element.style.display = 'block';
@@ -3461,6 +3464,15 @@ var TreeView = /** @class */ (function (_super) {
3461
3464
  _this.dragAction(e, virtualEle);
3462
3465
  },
3463
3466
  dragStop: function (e) {
3467
+ if (!e.target) {
3468
+ if (e.helper && e.helper.parentNode) {
3469
+ detach(e.helper);
3470
+ }
3471
+ document.body.style.cursor = '';
3472
+ removeClass([_this.element], DRAGGING);
3473
+ _this.dragStartAction = false;
3474
+ return;
3475
+ }
3464
3476
  removeClass([_this.element], DRAGGING);
3465
3477
  if (!e.target.classList.contains('e-sibling')) {
3466
3478
  _this.removeVirtualEle();
@@ -3500,6 +3512,9 @@ var TreeView = /** @class */ (function (_super) {
3500
3512
  });
3501
3513
  this.dropObj = new Droppable(this.element, {
3502
3514
  out: function (e) {
3515
+ if (!e.target) {
3516
+ return;
3517
+ }
3503
3518
  if (!isNOU(e) && !e.target.classList.contains(SIBLING) &&
3504
3519
  (_this.dropObj.dragData.default && _this.dropObj.dragData.default.helper.classList.contains(ROOT))) {
3505
3520
  document.body.style.cursor = 'not-allowed';
@@ -3538,6 +3553,9 @@ var TreeView = /** @class */ (function (_super) {
3538
3553
  }
3539
3554
  };
3540
3555
  TreeView.prototype.dragAction = function (e, virtualEle) {
3556
+ if (!e.target) {
3557
+ return;
3558
+ }
3541
3559
  var dropRoot = closest(e.target, '.' + DROPPABLE);
3542
3560
  var dropWrap = closest(e.target, '.' + TEXTWRAP);
3543
3561
  var icon = select('div.' + ICON, virtualEle);
@@ -5265,7 +5283,10 @@ var TreeView = /** @class */ (function (_super) {
5265
5283
  }
5266
5284
  this.groupedData = this.getGroupedData(this.treeData, this.fields.parentID);
5267
5285
  }
5268
- this.setNodeFocusable();
5286
+ var fNode = select('.' + LISTITEM + '[tabindex="0"]', this.element);
5287
+ if (isNOU(fNode)) {
5288
+ this.setNodeFocusable();
5289
+ }
5269
5290
  this.updateCheckedStateFromDS();
5270
5291
  if (this.showCheckBox && dropLi) {
5271
5292
  this.ensureParentCheckState(dropLi);
@@ -5659,7 +5680,7 @@ var TreeView = /** @class */ (function (_super) {
5659
5680
  * @returns {void}
5660
5681
  */
5661
5682
  TreeView.prototype.uncheckAll = function (nodes) {
5662
- if (this.showCheckBox) {
5683
+ if (this.showCheckBox && this.checkedNodes.length > 0) {
5663
5684
  this.doCheckBoxAction(nodes, false);
5664
5685
  }
5665
5686
  };
@@ -72,6 +72,9 @@
72
72
  padding-top: 6px;
73
73
  line-height: 18px;
74
74
  }
75
+ .e-pager div.e-parentmsgbar span.e-rightalign {
76
+ text-align: right;
77
+ }
75
78
  .e-pager .e-pagesizes {
76
79
  display: inline;
77
80
  }
@@ -325,6 +328,12 @@
325
328
  }
326
329
  @media (max-width: 769px) {
327
330
  .e-pager {
331
+ display: -webkit-box;
332
+ display: -ms-flexbox;
333
+ display: flex;
334
+ -webkit-box-align: center;
335
+ -ms-flex-align: center;
336
+ align-items: center;
328
337
  padding: 13px 0;
329
338
  }
330
339
  .e-pager div.e-parentmsgbar {
@@ -523,7 +532,8 @@
523
532
  .e-pager.e-rtl.e-rtl div.e-parentmsgbar {
524
533
  float: initial;
525
534
  margin-left: 0;
526
- margin-top: 10px;
535
+ margin-top: 0;
536
+ padding-top: 0;
527
537
  }
528
538
  .e-pager.e-rtl .e-parentmsgbar {
529
539
  float: right;
@@ -1713,6 +1723,9 @@
1713
1723
  .e-toolbar.e-rtl:not(.e-spacer-toolbar) .e-toolbar-items:not(.e-tbar-pos) .e-toolbar-item:first-child {
1714
1724
  margin-right: 8px;
1715
1725
  }
1726
+ .e-toolbar.e-rtl:not(.e-spacer-toolbar) .e-toolbar-items:not(.e-tbar-pos) .e-toolbar-item:last-child {
1727
+ margin-left: 8px;
1728
+ }
1716
1729
  .e-toolbar.e-rtl .e-toolbar-item .e-tbar-btn.e-tbtn-txt .e-icons.e-btn-icon {
1717
1730
  padding: 4px;
1718
1731
  }
@@ -1743,6 +1756,7 @@
1743
1756
  }
1744
1757
  .e-toolbar.e-rtl .e-toolbar-items .e-toolbar-left .e-toolbar-item:first-child {
1745
1758
  margin-left: 0;
1759
+ margin-right: 8px;
1746
1760
  }
1747
1761
  .e-toolbar.e-rtl .e-toolbar-items .e-toolbar-left .e-toolbar-item:last-child {
1748
1762
  margin-left: 8px;
@@ -1750,11 +1764,13 @@
1750
1764
  .e-toolbar.e-rtl .e-toolbar-items:not(.e-tbar-pos) .e-toolbar-item:first-child {
1751
1765
  margin-left: 0;
1752
1766
  }
1753
- .e-toolbar.e-rtl .e-toolbar-items:first-child > .e-toolbar-item:last-child:last-child,
1767
+ .e-toolbar.e-rtl .e-toolbar-items:first-child > .e-toolbar-item:last-child:last-child {
1768
+ margin-right: 0;
1769
+ }
1754
1770
  .e-toolbar.e-rtl .e-toolbar-items:first-child > .e-toolbar-right .e-toolbar-item:last-child {
1755
1771
  margin-right: 0;
1772
+ margin-left: 8px;
1756
1773
  }
1757
- .e-toolbar.e-rtl .e-toolbar-items:first-child > .e-toolbar-item:last-child:first-child,
1758
1774
  .e-toolbar.e-rtl .e-toolbar-items:first-child > .e-toolbar-right .e-toolbar-item:first-child {
1759
1775
  margin-right: 8px;
1760
1776
  }
@@ -2936,6 +2952,12 @@
2936
2952
  box-shadow: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.05);
2937
2953
  padding: 4px 0;
2938
2954
  }
2955
+ .e-contextmenu-wrapper ul.e-contextmenu.e-contextmenu-template .e-menu-caret-icon,
2956
+ .e-contextmenu-container ul.e-contextmenu.e-contextmenu-template .e-menu-caret-icon {
2957
+ display: -webkit-box;
2958
+ display: -ms-flexbox;
2959
+ display: flex;
2960
+ }
2939
2961
  .e-contextmenu-wrapper ul.e-ul,
2940
2962
  .e-contextmenu-container ul.e-ul {
2941
2963
  font-family: "Inter";
@@ -6406,6 +6428,9 @@
6406
6428
  .e-treeview.e-virtualization .e-ul {
6407
6429
  overflow: unset;
6408
6430
  }
6431
+ .e-treeview .e-mask-parent {
6432
+ display: none;
6433
+ }
6409
6434
  .e-treeview > .e-ul {
6410
6435
  -webkit-overflow-scrolling: touch;
6411
6436
  overflow: auto;
@@ -8278,6 +8303,21 @@ ejs-sidebar {
8278
8303
  padding-right: 8px;
8279
8304
  }
8280
8305
 
8306
+ .e-breadcrumb-menu-item {
8307
+ position: absolute;
8308
+ width: 1px;
8309
+ height: 1px;
8310
+ margin: -1px;
8311
+ padding: 0;
8312
+ overflow: hidden;
8313
+ clip: rect(0, 0, 0, 0);
8314
+ border: 0;
8315
+ }
8316
+
8317
+ .e-hidden-popup {
8318
+ visibility: hidden;
8319
+ }
8320
+
8281
8321
  .e-breadcrumb .e-breadcrumb-item .e-breadcrumb-text {
8282
8322
  color: var(--color-sf-text-secondary);
8283
8323
  }