@syncfusion/ej2-navigations 21.2.8 → 22.1.34

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 (344) hide show
  1. package/.eslintrc.json +1 -0
  2. package/CHANGELOG.md +29 -0
  3. package/dist/ej2-navigations.min.js +2 -2
  4. package/dist/ej2-navigations.umd.min.js +2 -2
  5. package/dist/ej2-navigations.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-navigations.es2015.js +328 -107
  7. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  8. package/dist/es6/ej2-navigations.es5.js +332 -107
  9. package/dist/es6/ej2-navigations.es5.js.map +1 -1
  10. package/dist/global/ej2-navigations.min.js +2 -2
  11. package/dist/global/ej2-navigations.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/package.json +11 -11
  14. package/src/accordion/accordion-model.d.ts +4 -2
  15. package/src/accordion/accordion.d.ts +4 -2
  16. package/src/accordion/accordion.js +1 -1
  17. package/src/breadcrumb/breadcrumb-model.d.ts +4 -2
  18. package/src/breadcrumb/breadcrumb.d.ts +4 -2
  19. package/src/carousel/carousel-model.d.ts +37 -8
  20. package/src/carousel/carousel.d.ts +69 -6
  21. package/src/carousel/carousel.js +287 -89
  22. package/src/common/menu-base-model.d.ts +2 -1
  23. package/src/common/menu-base.d.ts +2 -1
  24. package/src/common/menu-base.js +9 -1
  25. package/src/menu/menu-model.d.ts +3 -2
  26. package/src/menu/menu.d.ts +2 -1
  27. package/src/menu/menu.js +1 -1
  28. package/src/sidebar/sidebar.d.ts +12 -26
  29. package/src/tab/tab-model.d.ts +3 -2
  30. package/src/tab/tab.d.ts +3 -2
  31. package/src/toolbar/toolbar-model.d.ts +3 -1
  32. package/src/toolbar/toolbar.d.ts +5 -1
  33. package/src/toolbar/toolbar.js +33 -14
  34. package/src/treeview/treeview-model.d.ts +4 -1
  35. package/src/treeview/treeview.d.ts +17 -31
  36. package/src/treeview/treeview.js +1 -1
  37. package/styles/accordion/_bootstrap-dark-definition.scss +3 -1
  38. package/styles/accordion/_bootstrap-definition.scss +3 -1
  39. package/styles/accordion/_bootstrap4-definition.scss +2 -0
  40. package/styles/accordion/_bootstrap5-definition.scss +3 -1
  41. package/styles/accordion/_fabric-dark-definition.scss +2 -0
  42. package/styles/accordion/_fabric-definition.scss +2 -0
  43. package/styles/accordion/_fluent-definition.scss +2 -0
  44. package/styles/accordion/_fusionnew-definition.scss +2 -0
  45. package/styles/accordion/_highcontrast-definition.scss +2 -0
  46. package/styles/accordion/_highcontrast-light-definition.scss +2 -0
  47. package/styles/accordion/_layout.scss +9 -0
  48. package/styles/accordion/_material-dark-definition.scss +2 -0
  49. package/styles/accordion/_material-definition.scss +2 -0
  50. package/styles/accordion/_material3-dark-definition.scss +1 -0
  51. package/styles/accordion/_material3-definition.scss +182 -0
  52. package/styles/accordion/_tailwind-definition.scss +2 -0
  53. package/styles/accordion/_theme.scss +9 -0
  54. package/styles/accordion/bootstrap-dark.css +11 -1
  55. package/styles/accordion/bootstrap.css +11 -1
  56. package/styles/accordion/bootstrap4.css +10 -0
  57. package/styles/accordion/bootstrap5-dark.css +11 -1
  58. package/styles/accordion/bootstrap5.css +11 -1
  59. package/styles/accordion/fabric-dark.css +10 -0
  60. package/styles/accordion/fabric.css +10 -0
  61. package/styles/accordion/fluent-dark.css +10 -0
  62. package/styles/accordion/fluent.css +10 -0
  63. package/styles/accordion/highcontrast-light.css +10 -0
  64. package/styles/accordion/highcontrast.css +10 -0
  65. package/styles/accordion/icons/_material3-dark.scss +1 -0
  66. package/styles/accordion/material-dark.css +10 -0
  67. package/styles/accordion/material.css +10 -0
  68. package/styles/accordion/material3-dark.css +596 -0
  69. package/styles/accordion/material3-dark.scss +5 -0
  70. package/styles/accordion/material3.css +652 -0
  71. package/styles/accordion/material3.scss +5 -0
  72. package/styles/accordion/tailwind-dark.css +10 -0
  73. package/styles/accordion/tailwind.css +10 -0
  74. package/styles/appbar/_layout.scss +6 -1
  75. package/styles/appbar/_material3-dark-definition.scss +1 -0
  76. package/styles/appbar/_material3-definition.scss +8 -0
  77. package/styles/appbar/_theme.scss +12 -2
  78. package/styles/appbar/bootstrap-dark.css +7 -3
  79. package/styles/appbar/bootstrap.css +7 -3
  80. package/styles/appbar/bootstrap4.css +7 -3
  81. package/styles/appbar/bootstrap5-dark.css +7 -3
  82. package/styles/appbar/bootstrap5.css +7 -3
  83. package/styles/appbar/fabric-dark.css +7 -3
  84. package/styles/appbar/fabric.css +7 -3
  85. package/styles/appbar/fluent-dark.css +7 -3
  86. package/styles/appbar/fluent.css +7 -3
  87. package/styles/appbar/highcontrast-light.css +7 -3
  88. package/styles/appbar/highcontrast.css +7 -3
  89. package/styles/appbar/material-dark.css +7 -3
  90. package/styles/appbar/material.css +7 -3
  91. package/styles/appbar/material3-dark.css +307 -0
  92. package/styles/appbar/material3-dark.scss +4 -0
  93. package/styles/appbar/material3.css +363 -0
  94. package/styles/appbar/material3.scss +4 -0
  95. package/styles/appbar/tailwind-dark.css +7 -3
  96. package/styles/appbar/tailwind.css +7 -3
  97. package/styles/bootstrap-dark.css +185 -126
  98. package/styles/bootstrap.css +185 -126
  99. package/styles/bootstrap4.css +183 -124
  100. package/styles/bootstrap5-dark.css +179 -120
  101. package/styles/bootstrap5.css +179 -120
  102. package/styles/breadcrumb/_material3-dark-definition.scss +1 -0
  103. package/styles/breadcrumb/_material3-definition.scss +60 -0
  104. package/styles/breadcrumb/_theme.scss +13 -11
  105. package/styles/breadcrumb/bootstrap-dark.css +9 -9
  106. package/styles/breadcrumb/bootstrap.css +9 -9
  107. package/styles/breadcrumb/bootstrap4.css +9 -9
  108. package/styles/breadcrumb/bootstrap5-dark.css +8 -8
  109. package/styles/breadcrumb/bootstrap5.css +8 -8
  110. package/styles/breadcrumb/fabric-dark.css +7 -7
  111. package/styles/breadcrumb/fabric.css +7 -7
  112. package/styles/breadcrumb/fluent-dark.css +5 -5
  113. package/styles/breadcrumb/fluent.css +5 -5
  114. package/styles/breadcrumb/highcontrast-light.css +7 -7
  115. package/styles/breadcrumb/highcontrast.css +7 -7
  116. package/styles/breadcrumb/icons/_material3-dark.scss +1 -0
  117. package/styles/breadcrumb/icons/_material3.scss +0 -11
  118. package/styles/breadcrumb/material-dark.css +9 -9
  119. package/styles/breadcrumb/material.css +9 -9
  120. package/styles/breadcrumb/material3-dark.css +424 -0
  121. package/styles/breadcrumb/material3-dark.scss +5 -0
  122. package/styles/breadcrumb/material3.css +480 -0
  123. package/styles/breadcrumb/material3.scss +5 -0
  124. package/styles/breadcrumb/tailwind-dark.css +8 -8
  125. package/styles/breadcrumb/tailwind.css +8 -8
  126. package/styles/carousel/_bootstrap-dark-definition.scss +5 -0
  127. package/styles/carousel/_bootstrap-definition.scss +5 -0
  128. package/styles/carousel/_bootstrap4-definition.scss +5 -0
  129. package/styles/carousel/_bootstrap5-definition.scss +5 -0
  130. package/styles/carousel/_fabric-dark-definition.scss +5 -0
  131. package/styles/carousel/_fabric-definition.scss +5 -0
  132. package/styles/carousel/_fluent-definition.scss +5 -0
  133. package/styles/carousel/_fusionnew-definition.scss +5 -0
  134. package/styles/carousel/_highcontrast-definition.scss +5 -0
  135. package/styles/carousel/_highcontrast-light-definition.scss +5 -0
  136. package/styles/carousel/_layout.scss +96 -67
  137. package/styles/carousel/_material-dark-definition.scss +5 -0
  138. package/styles/carousel/_material-definition.scss +5 -0
  139. package/styles/carousel/_material3-dark-definition.scss +1 -0
  140. package/styles/carousel/_material3-definition.scss +28 -0
  141. package/styles/carousel/_tailwind-definition.scss +5 -0
  142. package/styles/carousel/_theme.scss +49 -20
  143. package/styles/carousel/bootstrap-dark.css +101 -62
  144. package/styles/carousel/bootstrap.css +101 -62
  145. package/styles/carousel/bootstrap4.css +101 -62
  146. package/styles/carousel/bootstrap5-dark.css +101 -62
  147. package/styles/carousel/bootstrap5.css +101 -62
  148. package/styles/carousel/fabric-dark.css +101 -62
  149. package/styles/carousel/fabric.css +101 -62
  150. package/styles/carousel/fluent-dark.css +101 -62
  151. package/styles/carousel/fluent.css +101 -62
  152. package/styles/carousel/highcontrast-light.css +101 -62
  153. package/styles/carousel/highcontrast.css +101 -62
  154. package/styles/carousel/icons/_material3-dark.scss +1 -0
  155. package/styles/carousel/material-dark.css +101 -62
  156. package/styles/carousel/material.css +101 -62
  157. package/styles/carousel/material3-dark.css +359 -0
  158. package/styles/carousel/material3-dark.scss +6 -0
  159. package/styles/carousel/material3.css +415 -0
  160. package/styles/carousel/material3.scss +6 -0
  161. package/styles/carousel/tailwind-dark.css +101 -62
  162. package/styles/carousel/tailwind.css +101 -62
  163. package/styles/context-menu/_layout.scss +2 -2
  164. package/styles/context-menu/_material3-dark-definition.scss +1 -0
  165. package/styles/context-menu/_material3-definition.scss +52 -0
  166. package/styles/context-menu/_theme.scss +6 -1
  167. package/styles/context-menu/icons/_material3-dark.scss +1 -0
  168. package/styles/context-menu/material3-dark.css +435 -0
  169. package/styles/context-menu/material3-dark.scss +8 -0
  170. package/styles/context-menu/material3.css +491 -0
  171. package/styles/context-menu/material3.scss +8 -0
  172. package/styles/fabric-dark.css +186 -127
  173. package/styles/fabric.css +185 -126
  174. package/styles/fluent-dark.css +179 -120
  175. package/styles/fluent.css +179 -120
  176. package/styles/h-scroll/_material3-dark-definition.scss +1 -0
  177. package/styles/h-scroll/_material3-definition.scss +83 -0
  178. package/styles/h-scroll/icons/_material3-dark.scss +1 -0
  179. package/styles/h-scroll/material3-dark.css +336 -0
  180. package/styles/h-scroll/material3-dark.scss +5 -0
  181. package/styles/h-scroll/material3.css +392 -0
  182. package/styles/h-scroll/material3.scss +5 -0
  183. package/styles/highcontrast-light.css +178 -119
  184. package/styles/highcontrast.css +182 -123
  185. package/styles/material-dark.css +189 -130
  186. package/styles/material.css +188 -129
  187. package/styles/material3-dark.css +10343 -0
  188. package/styles/material3-dark.scss +15 -0
  189. package/styles/material3.css +10399 -0
  190. package/styles/material3.scss +15 -0
  191. package/styles/menu/_layout.scss +7 -0
  192. package/styles/menu/_material3-dark-definition.scss +1 -0
  193. package/styles/menu/_material3-definition.scss +67 -0
  194. package/styles/menu/_theme.scss +5 -2
  195. package/styles/menu/bootstrap-dark.css +4 -0
  196. package/styles/menu/bootstrap.css +4 -0
  197. package/styles/menu/bootstrap4.css +4 -0
  198. package/styles/menu/bootstrap5-dark.css +4 -0
  199. package/styles/menu/bootstrap5.css +4 -0
  200. package/styles/menu/fabric-dark.css +4 -0
  201. package/styles/menu/fabric.css +4 -0
  202. package/styles/menu/fluent-dark.css +4 -0
  203. package/styles/menu/fluent.css +4 -0
  204. package/styles/menu/highcontrast-light.css +4 -0
  205. package/styles/menu/highcontrast.css +4 -0
  206. package/styles/menu/icons/_material3-dark.scss +1 -0
  207. package/styles/menu/material-dark.css +4 -0
  208. package/styles/menu/material.css +4 -0
  209. package/styles/menu/material3-dark.css +1162 -0
  210. package/styles/menu/material3-dark.scss +9 -0
  211. package/styles/menu/material3.css +1218 -0
  212. package/styles/menu/material3.scss +9 -0
  213. package/styles/menu/tailwind-dark.css +4 -0
  214. package/styles/menu/tailwind.css +4 -0
  215. package/styles/pager/_bootstrap-dark-definition.scss +9 -5
  216. package/styles/pager/_bootstrap-definition.scss +9 -5
  217. package/styles/pager/_bootstrap4-definition.scss +8 -4
  218. package/styles/pager/_bootstrap5-definition.scss +4 -0
  219. package/styles/pager/_fabric-dark-definition.scss +10 -6
  220. package/styles/pager/_fabric-definition.scss +10 -6
  221. package/styles/pager/_fluent-definition.scss +8 -4
  222. package/styles/pager/_fusionnew-definition.scss +4 -0
  223. package/styles/pager/_highcontrast-definition.scss +8 -4
  224. package/styles/pager/_highcontrast-light-definition.scss +4 -0
  225. package/styles/pager/_layout.scss +63 -48
  226. package/styles/pager/_material-dark-definition.scss +12 -8
  227. package/styles/pager/_material-definition.scss +11 -7
  228. package/styles/pager/_material3-dark-definition.scss +1 -0
  229. package/styles/pager/_material3-definition.scss +150 -0
  230. package/styles/pager/_tailwind-definition.scss +9 -5
  231. package/styles/pager/_theme.scss +12 -5
  232. package/styles/pager/bootstrap-dark.css +15 -43
  233. package/styles/pager/bootstrap.css +15 -43
  234. package/styles/pager/bootstrap4.css +14 -42
  235. package/styles/pager/bootstrap5-dark.css +10 -38
  236. package/styles/pager/bootstrap5.css +10 -38
  237. package/styles/pager/fabric-dark.css +17 -45
  238. package/styles/pager/fabric.css +16 -44
  239. package/styles/pager/fluent-dark.css +14 -42
  240. package/styles/pager/fluent.css +14 -42
  241. package/styles/pager/highcontrast-light.css +10 -38
  242. package/styles/pager/highcontrast.css +14 -42
  243. package/styles/pager/icons/_material3-dark.scss +1 -0
  244. package/styles/pager/icons/_material3.scss +4 -4
  245. package/styles/pager/material-dark.css +18 -46
  246. package/styles/pager/material.css +17 -45
  247. package/styles/pager/material3-dark.css +765 -0
  248. package/styles/pager/material3-dark.scss +5 -0
  249. package/styles/pager/material3.css +821 -0
  250. package/styles/pager/material3.scss +5 -0
  251. package/styles/pager/tailwind-dark.css +15 -43
  252. package/styles/pager/tailwind.css +15 -43
  253. package/styles/sidebar/_material3-dark-definition.scss +1 -0
  254. package/styles/sidebar/_material3-definition.scss +7 -0
  255. package/styles/sidebar/material3-dark.css +204 -0
  256. package/styles/sidebar/material3-dark.scss +4 -0
  257. package/styles/sidebar/material3.css +260 -0
  258. package/styles/sidebar/material3.scss +4 -0
  259. package/styles/tab/_bootstrap-dark-definition.scss +4 -0
  260. package/styles/tab/_bootstrap-definition.scss +4 -0
  261. package/styles/tab/_bootstrap4-definition.scss +4 -0
  262. package/styles/tab/_bootstrap5-definition.scss +4 -0
  263. package/styles/tab/_fabric-dark-definition.scss +4 -0
  264. package/styles/tab/_fabric-definition.scss +4 -0
  265. package/styles/tab/_fluent-definition.scss +4 -0
  266. package/styles/tab/_fusionnew-definition.scss +4 -0
  267. package/styles/tab/_highcontrast-definition.scss +4 -0
  268. package/styles/tab/_highcontrast-light-definition.scss +4 -0
  269. package/styles/tab/_layout.scss +37 -13
  270. package/styles/tab/_material-dark-definition.scss +4 -0
  271. package/styles/tab/_material-definition.scss +4 -0
  272. package/styles/tab/_material3-dark-definition.scss +1 -0
  273. package/styles/tab/_material3-definition.scss +661 -0
  274. package/styles/tab/_tailwind-definition.scss +4 -0
  275. package/styles/tab/_theme.scss +44 -1
  276. package/styles/tab/bootstrap-dark.css +30 -7
  277. package/styles/tab/bootstrap.css +30 -7
  278. package/styles/tab/bootstrap4.css +30 -7
  279. package/styles/tab/bootstrap5-dark.css +30 -7
  280. package/styles/tab/bootstrap5.css +30 -7
  281. package/styles/tab/fabric-dark.css +30 -7
  282. package/styles/tab/fabric.css +30 -7
  283. package/styles/tab/fluent-dark.css +30 -7
  284. package/styles/tab/fluent.css +30 -7
  285. package/styles/tab/highcontrast-light.css +30 -7
  286. package/styles/tab/highcontrast.css +30 -7
  287. package/styles/tab/icons/_material3-dark.scss +1 -0
  288. package/styles/tab/material-dark.css +30 -7
  289. package/styles/tab/material.css +30 -7
  290. package/styles/tab/material3-dark.css +4109 -0
  291. package/styles/tab/material3-dark.scss +6 -0
  292. package/styles/tab/material3.css +4165 -0
  293. package/styles/tab/material3.scss +6 -0
  294. package/styles/tab/tailwind-dark.css +29 -6
  295. package/styles/tab/tailwind.css +29 -6
  296. package/styles/tailwind-dark.css +185 -126
  297. package/styles/tailwind.css +185 -126
  298. package/styles/toolbar/_fabric-dark-definition.scss +3 -3
  299. package/styles/toolbar/_fabric-definition.scss +3 -3
  300. package/styles/toolbar/_highcontrast-definition.scss +1 -1
  301. package/styles/toolbar/_highcontrast-light-definition.scss +1 -1
  302. package/styles/toolbar/_layout.scss +8 -0
  303. package/styles/toolbar/_material-dark-definition.scss +3 -3
  304. package/styles/toolbar/_material-definition.scss +3 -3
  305. package/styles/toolbar/_material3-dark-definition.scss +1 -0
  306. package/styles/toolbar/_material3-definition.scss +220 -0
  307. package/styles/toolbar/_tailwind-definition.scss +3 -3
  308. package/styles/toolbar/_theme.scss +2 -1
  309. package/styles/toolbar/bootstrap-dark.css +8 -1
  310. package/styles/toolbar/bootstrap.css +8 -1
  311. package/styles/toolbar/bootstrap4.css +8 -1
  312. package/styles/toolbar/bootstrap5-dark.css +8 -1
  313. package/styles/toolbar/bootstrap5.css +8 -1
  314. package/styles/toolbar/fabric-dark.css +10 -3
  315. package/styles/toolbar/fabric.css +10 -3
  316. package/styles/toolbar/fluent-dark.css +8 -1
  317. package/styles/toolbar/fluent.css +8 -1
  318. package/styles/toolbar/highcontrast-light.css +9 -2
  319. package/styles/toolbar/highcontrast.css +9 -2
  320. package/styles/toolbar/icons/_material3-dark.scss +1 -0
  321. package/styles/toolbar/material-dark.css +10 -3
  322. package/styles/toolbar/material.css +10 -3
  323. package/styles/toolbar/material3-dark.css +1145 -0
  324. package/styles/toolbar/material3-dark.scss +9 -0
  325. package/styles/toolbar/material3.css +1201 -0
  326. package/styles/toolbar/material3.scss +9 -0
  327. package/styles/toolbar/tailwind-dark.css +11 -4
  328. package/styles/toolbar/tailwind.css +11 -4
  329. package/styles/treeview/_layout.scss +15 -2
  330. package/styles/treeview/_material3-dark-definition.scss +1 -0
  331. package/styles/treeview/_material3-definition.scss +121 -0
  332. package/styles/treeview/icons/_material3-dark.scss +1 -0
  333. package/styles/treeview/icons/_material3.scss +1 -1
  334. package/styles/treeview/material3-dark.css +903 -0
  335. package/styles/treeview/material3-dark.scss +7 -0
  336. package/styles/treeview/material3.css +959 -0
  337. package/styles/treeview/material3.scss +7 -0
  338. package/styles/v-scroll/_material3-dark-definition.scss +1 -0
  339. package/styles/v-scroll/_material3-definition.scss +49 -0
  340. package/styles/v-scroll/icons/_material3-dark.scss +1 -0
  341. package/styles/v-scroll/material3-dark.css +258 -0
  342. package/styles/v-scroll/material3-dark.scss +5 -0
  343. package/styles/v-scroll/material3.css +314 -0
  344. package/styles/v-scroll/material3.scss +5 -0
@@ -1533,9 +1533,18 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
1533
1533
  return index;
1534
1534
  };
1535
1535
  MenuBase.prototype.getUlByNavIdx = function (navIdxLen) {
1536
+ var _this = this;
1536
1537
  if (navIdxLen === void 0) { navIdxLen = this.navIdx.length; }
1537
1538
  if (this.isMenu) {
1538
1539
  var popup = [this.getWrapper()].concat([].slice.call(selectAll('.' + POPUP)))[navIdxLen];
1540
+ var popups_1 = [];
1541
+ var allPopup = selectAll('.' + POPUP);
1542
+ allPopup.forEach(function (elem) {
1543
+ if (_this.element.id === elem.id.split('-')[2]) {
1544
+ popups_1.push(elem);
1545
+ }
1546
+ });
1547
+ popup = [this.getWrapper()].concat([].slice.call(popups_1))[navIdxLen];
1539
1548
  return isNullOrUndefined(popup) ? null : select('.e-menu-parent', popup);
1540
1549
  }
1541
1550
  else {
@@ -1912,7 +1921,6 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
1912
1921
  }
1913
1922
  }
1914
1923
  };
1915
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1916
1924
  MenuBase.prototype.copyObject = function (source, destination) {
1917
1925
  for (var prop in source) {
1918
1926
  destination["" + prop] = source["" + prop];
@@ -3771,20 +3779,20 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
3771
3779
  if (isVisible(this.popObj.element)) {
3772
3780
  nodes = [].slice.call(popupCheck.children);
3773
3781
  if (e.action === 'home') {
3774
- ele = nodes[0];
3782
+ ele = this.focusFirstVisibleEle(nodes);
3775
3783
  }
3776
3784
  else {
3777
- ele = nodes[nodes.length - 1];
3785
+ ele = this.focusLastVisibleEle(nodes);
3778
3786
  }
3779
3787
  }
3780
3788
  }
3781
3789
  else {
3782
3790
  nodes = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + ')');
3783
3791
  if (e.action === 'home') {
3784
- ele = nodes[0];
3792
+ ele = this.focusFirstVisibleEle(nodes);
3785
3793
  }
3786
3794
  else {
3787
- ele = nodes[nodes.length - 1];
3795
+ ele = this.focusLastVisibleEle(nodes);
3788
3796
  }
3789
3797
  }
3790
3798
  if (ele) {
@@ -3898,6 +3906,30 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
3898
3906
  Toolbar.prototype.eleContains = function (el) {
3899
3907
  return el.classList.contains(CLS_SEPARATOR) || el.classList.contains(CLS_DISABLE$2) || el.getAttribute('disabled') || el.classList.contains(CLS_HIDDEN) || !isVisible(el) || !el.classList.contains(CLS_ITEM);
3900
3908
  };
3909
+ Toolbar.prototype.focusFirstVisibleEle = function (nodes) {
3910
+ var element;
3911
+ var index = 0;
3912
+ while (index < nodes.length) {
3913
+ var ele = nodes[parseInt(index.toString(), 10)];
3914
+ if (!ele.classList.contains(CLS_HIDDEN) && !ele.classList.contains(CLS_DISABLE$2)) {
3915
+ return ele;
3916
+ }
3917
+ index++;
3918
+ }
3919
+ return element;
3920
+ };
3921
+ Toolbar.prototype.focusLastVisibleEle = function (nodes) {
3922
+ var element;
3923
+ var index = nodes.length - 1;
3924
+ while (index >= 0) {
3925
+ var ele = nodes[parseInt(index.toString(), 10)];
3926
+ if (!ele.classList.contains(CLS_HIDDEN) && !ele.classList.contains(CLS_DISABLE$2)) {
3927
+ return ele;
3928
+ }
3929
+ index--;
3930
+ }
3931
+ return element;
3932
+ };
3901
3933
  Toolbar.prototype.eleFocus = function (closest$$1, pos) {
3902
3934
  var sib = Object(closest$$1)[pos + 'ElementSibling'];
3903
3935
  if (sib) {
@@ -4541,12 +4573,10 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
4541
4573
  if (checkoffset) {
4542
4574
  if (inEle[parseInt(i.toString(), 10)].classList.contains(CLS_SEPARATOR)) {
4543
4575
  if (this.overflowMode === 'Extended') {
4544
- if (itemCount === itemPopCount) {
4545
- var sepEle = inEle[parseInt(i.toString(), 10)];
4546
- if (checkClass(sepEle, [CLS_SEPARATOR, CLS_TBARIGNORE])) {
4547
- inEle[parseInt(i.toString(), 10)].classList.add(CLS_POPUP);
4548
- itemPopCount++;
4549
- }
4576
+ var sepEle = inEle[parseInt(i.toString(), 10)];
4577
+ if (checkClass(sepEle, [CLS_SEPARATOR, CLS_TBARIGNORE])) {
4578
+ inEle[parseInt(i.toString(), 10)].classList.add(CLS_POPUP);
4579
+ itemPopCount++;
4550
4580
  }
4551
4581
  itemCount++;
4552
4582
  }
@@ -5510,10 +5540,7 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
5510
5540
  break;
5511
5541
  case 'width':
5512
5542
  setStyleAttribute(tEle, { 'width': formatUnit(newProp.width) });
5513
- this.renderOverflowMode();
5514
- if (this.popObj && wid < tEle.offsetWidth) {
5515
- this.popupRefresh(this.popObj.element, false);
5516
- }
5543
+ this.refreshOverflow();
5517
5544
  break;
5518
5545
  case 'height':
5519
5546
  setStyleAttribute(this.element, { 'height': formatUnit(newProp.height) });
@@ -5937,7 +5964,7 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
5937
5964
  Accordion.prototype.templateParser = function (template) {
5938
5965
  if (template) {
5939
5966
  try {
5940
- if (document.querySelectorAll(template).length) {
5967
+ if (typeof template !== 'function' && document.querySelectorAll(template).length) {
5941
5968
  return compile(document.querySelector(template).innerHTML.trim());
5942
5969
  }
5943
5970
  else {
@@ -7269,7 +7296,7 @@ var Menu = /** @__PURE__ @class */ (function (_super) {
7269
7296
  this.element.id = this.element.id || getUniqueID('ej2-menu');
7270
7297
  if (this.template) {
7271
7298
  try {
7272
- if (document.querySelectorAll(this.template).length) {
7299
+ if (typeof this.template !== 'function' && document.querySelectorAll(this.template).length) {
7273
7300
  this.template = document.querySelector(this.template).innerHTML.trim();
7274
7301
  this.clearChanges();
7275
7302
  }
@@ -10281,7 +10308,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
10281
10308
  // eslint-disable-next-line
10282
10309
  this.element.classList.add(INTERACTION);
10283
10310
  try {
10284
- if (document.querySelectorAll(template).length) {
10311
+ if (typeof template !== 'function' && document.querySelectorAll(template).length) {
10285
10312
  return compile(document.querySelector(template).innerHTML.trim());
10286
10313
  }
10287
10314
  else {
@@ -16628,6 +16655,7 @@ var CLS_CAROUSEL = 'e-carousel';
16628
16655
  var CLS_ACTIVE$2 = 'e-active';
16629
16656
  var CLS_RTL$5 = 'e-rtl';
16630
16657
  var CLS_PARTIAL = 'e-partial';
16658
+ var CLS_SWIPE = 'e-swipe';
16631
16659
  var CLS_SLIDE_CONTAINER = 'e-carousel-slide-container';
16632
16660
  var CLS_ITEMS$2 = 'e-carousel-items';
16633
16661
  var CLS_CLONED = 'e-cloned';
@@ -16661,6 +16689,19 @@ var CLS_PREV_SLIDE = 'e-prev';
16661
16689
  var CLS_NEXT_SLIDE = 'e-next';
16662
16690
  var CLS_TRANSITION_START = 'e-transition-start';
16663
16691
  var CLS_TRANSITION_END = 'e-transition-end';
16692
+ /**
16693
+ * Specifies the action (touch & mouse) which enables the slide swiping action in carousel.
16694
+ * * Touch - Enables or disables the swiping action in touch interaction.
16695
+ * * Mouse - Enables or disables the swiping action in mouse interaction.
16696
+ * @aspNumberEnum
16697
+ */
16698
+ var CarouselSwipeMode;
16699
+ (function (CarouselSwipeMode) {
16700
+ /** Enables or disables the swiping action in touch interaction. */
16701
+ CarouselSwipeMode[CarouselSwipeMode["Touch"] = 1] = "Touch";
16702
+ /** Enables or disables the swiping action in mouse interaction. */
16703
+ CarouselSwipeMode[CarouselSwipeMode["Mouse"] = 2] = "Mouse";
16704
+ })(CarouselSwipeMode || (CarouselSwipeMode = {}));
16664
16705
  /** Specifies the carousel individual item. */
16665
16706
  var CarouselItem = /** @__PURE__ @class */ (function (_super) {
16666
16707
  __extends$11(CarouselItem, _super);
@@ -16690,7 +16731,9 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
16690
16731
  * @param {string | HTMLElement} element Accepts the DOM element reference
16691
16732
  */
16692
16733
  function Carousel(options, element) {
16693
- return _super.call(this, options, element) || this;
16734
+ var _this = _super.call(this, options, element) || this;
16735
+ _this.isSwipe = false;
16736
+ return _this;
16694
16737
  }
16695
16738
  Carousel.prototype.getModuleName = function () {
16696
16739
  return CLS_CAROUSEL.replace('e-', '');
@@ -16762,7 +16805,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
16762
16805
  this.applySlideInterval();
16763
16806
  }
16764
16807
  this.handleNavigatorsActions(this.selectedIndex);
16765
- if (this.partialVisible) {
16808
+ if (this.partialVisible || !(this.swipeMode === (~CarouselSwipeMode.Touch & ~CarouselSwipeMode.Mouse))) {
16766
16809
  this.reRenderSlides();
16767
16810
  }
16768
16811
  break;
@@ -16775,11 +16818,10 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
16775
16818
  else {
16776
16819
  removeClass(rtlElement, CLS_RTL$5);
16777
16820
  }
16778
- if (this.partialVisible) {
16779
- var itemsContainer = this.element.querySelector("." + CLS_ITEMS$2);
16780
- var cloneCount = this.loop ? 2 : 0;
16781
- var slideWidth = itemsContainer.firstElementChild.clientWidth;
16782
- itemsContainer.style.transform = this.getTranslateX(slideWidth, this.selectedIndex + cloneCount);
16821
+ if (this.partialVisible || !(this.swipeMode === (~CarouselSwipeMode.Touch & ~CarouselSwipeMode.Mouse))) {
16822
+ var cloneCount = this.loop ? this.getNumOfItems() : 0;
16823
+ var slideWidth = this.itemsContainer.firstElementChild.clientWidth;
16824
+ this.itemsContainer.style.transform = this.getTranslateX(slideWidth, this.selectedIndex + cloneCount);
16783
16825
  }
16784
16826
  break;
16785
16827
  case 'buttonsVisibility':
@@ -16819,8 +16861,9 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
16819
16861
  this.autoSlide();
16820
16862
  break;
16821
16863
  case 'showIndicators':
16864
+ case 'indicatorsType':
16822
16865
  target = this.element.querySelector("." + CLS_INDICATORS);
16823
- if (!this.showIndicators && target) {
16866
+ if (target) {
16824
16867
  this.resetTemplates(['indicatorsTemplate']);
16825
16868
  remove(target);
16826
16869
  }
@@ -16847,6 +16890,13 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
16847
16890
  }
16848
16891
  this.reRenderSlides();
16849
16892
  break;
16893
+ case 'swipeMode':
16894
+ EventHandler.remove(this.element, 'mousedown touchstart', this.swipeStart);
16895
+ EventHandler.remove(this.element, 'mousemove touchmove', this.swiping);
16896
+ EventHandler.remove(this.element, 'mouseup touchend', this.swipStop);
16897
+ this.swipeModehandlers();
16898
+ this.reRenderSlides();
16899
+ break;
16850
16900
  }
16851
16901
  }
16852
16902
  };
@@ -16869,6 +16919,9 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
16869
16919
  if (this.partialVisible) {
16870
16920
  carouselClasses.push(CLS_PARTIAL);
16871
16921
  }
16922
+ if (!(this.swipeMode === (~CarouselSwipeMode.Touch & ~CarouselSwipeMode.Mouse))) {
16923
+ carouselClasses.push(CLS_SWIPE);
16924
+ }
16872
16925
  addClass([this.element], carouselClasses);
16873
16926
  setStyleAttribute(this.element, { 'width': formatUnit(this.width), 'height': formatUnit(this.height) });
16874
16927
  attributes(this.element, { 'tabindex': '0', 'aria-roledescription': 'carousel', 'aria-label': this.localeObj.getConstant('slideShow') });
@@ -16883,52 +16936,52 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
16883
16936
  slideContainer = this.createElement('div', { className: CLS_SLIDE_CONTAINER });
16884
16937
  this.element.appendChild(slideContainer);
16885
16938
  }
16886
- var itemsContainer = this.createElement('div', { className: CLS_ITEMS$2, attrs: { 'aria-live': this.autoPlay ? 'off' : 'polite' } });
16887
- slideContainer.appendChild(itemsContainer);
16888
- if (this.partialVisible && this.loop) {
16939
+ this.itemsContainer = this.createElement('div', { className: CLS_ITEMS$2, attrs: { 'aria-live': this.autoPlay ? 'off' : 'polite' } });
16940
+ slideContainer.appendChild(this.itemsContainer);
16941
+ var numOfItems = this.getNumOfItems();
16942
+ if (numOfItems > 0 && this.loop) {
16889
16943
  if (this.items.length > 0) {
16890
- this.items.slice(-2).forEach(function (item, index) {
16891
- _this.renderSlide(item, item.template, index, itemsContainer, true);
16944
+ this.items.slice(-numOfItems).forEach(function (item, index) {
16945
+ _this.renderSlide(item, item.template, index, _this.itemsContainer, true);
16892
16946
  });
16893
16947
  }
16894
16948
  else if (this.dataSource.length > 0) {
16895
- this.dataSource.slice(-2).forEach(function (item, index) {
16896
- _this.renderSlide(item, _this.itemTemplate, index, itemsContainer, true);
16949
+ this.dataSource.slice(-numOfItems).forEach(function (item, index) {
16950
+ _this.renderSlide(item, _this.itemTemplate, index, _this.itemsContainer, true);
16897
16951
  });
16898
16952
  }
16899
16953
  }
16900
16954
  if (this.items.length > 0) {
16901
16955
  this.slideItems = this.items;
16902
16956
  this.items.forEach(function (item, index) {
16903
- _this.renderSlide(item, item.template, index, itemsContainer);
16957
+ _this.renderSlide(item, item.template, index, _this.itemsContainer);
16904
16958
  });
16905
16959
  }
16906
16960
  else if (this.dataSource.length > 0) {
16907
16961
  this.slideItems = this.dataSource;
16908
16962
  this.dataSource.forEach(function (item, index) {
16909
- _this.renderSlide(item, _this.itemTemplate, index, itemsContainer);
16963
+ _this.renderSlide(item, _this.itemTemplate, index, _this.itemsContainer);
16910
16964
  });
16911
16965
  }
16912
- if (this.partialVisible && this.loop) {
16966
+ if (numOfItems > 0 && this.loop) {
16913
16967
  if (this.items.length > 0) {
16914
- this.items.slice(0, 2).forEach(function (item, index) {
16915
- _this.renderSlide(item, item.template, index, itemsContainer, true);
16968
+ this.items.slice(0, numOfItems).forEach(function (item, index) {
16969
+ _this.renderSlide(item, item.template, index, _this.itemsContainer, true);
16916
16970
  });
16917
16971
  }
16918
16972
  else if (this.dataSource.length > 0) {
16919
- this.dataSource.slice(0, 2).forEach(function (item, index) {
16920
- _this.renderSlide(item, _this.itemTemplate, index, itemsContainer, true);
16973
+ this.dataSource.slice(0, numOfItems).forEach(function (item, index) {
16974
+ _this.renderSlide(item, _this.itemTemplate, index, _this.itemsContainer, true);
16921
16975
  });
16922
16976
  }
16923
16977
  }
16924
16978
  this.renderTemplates();
16925
- if (this.partialVisible) {
16926
- itemsContainer.style.setProperty('--carousel-items-count', "" + itemsContainer.children.length);
16927
- var slideWidth = itemsContainer.firstElementChild.clientWidth;
16928
- var cloneCount = this.loop ? 2 : 0;
16929
- itemsContainer.style.transitionProperty = 'none';
16930
- itemsContainer.style.transform = this.getTranslateX(slideWidth, this.selectedIndex + cloneCount);
16931
- }
16979
+ this.itemsContainer.style.setProperty('--carousel-items-count', "" + this.itemsContainer.children.length);
16980
+ var slideWidth = isNullOrUndefined(this.itemsContainer.firstElementChild) ? 0 :
16981
+ this.itemsContainer.firstElementChild.clientWidth;
16982
+ this.itemsContainer.style.transitionProperty = 'none';
16983
+ var cloneCount = this.loop ? numOfItems : 0;
16984
+ this.itemsContainer.style.transform = this.getTranslateX(slideWidth, this.selectedIndex + cloneCount);
16932
16985
  this.autoSlide();
16933
16986
  this.renderTouchActions();
16934
16987
  this.renderKeyboardActions();
@@ -17031,8 +17084,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
17031
17084
  if (isLastSlide) {
17032
17085
  this.setProperties({ autoPlay: false }, true);
17033
17086
  playButton.setAttribute('aria-label', this.localeObj.getConstant('playSlideTransition'));
17034
- var itemsContainer = this.element.querySelector("." + CLS_ITEMS$2);
17035
- itemsContainer.setAttribute('aria-live', 'polite');
17087
+ this.itemsContainer.setAttribute('aria-live', 'polite');
17036
17088
  }
17037
17089
  buttonObj.appendTo(playButton);
17038
17090
  playPauseWrap.appendChild(playButton);
@@ -17047,34 +17099,70 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
17047
17099
  if (!this.showIndicators) {
17048
17100
  return;
17049
17101
  }
17050
- var indicatorWrap = this.createElement('div', { className: CLS_INDICATORS });
17102
+ var indicatorClass = 'e-default';
17103
+ if (!this.indicatorsTemplate) {
17104
+ indicatorClass = "e-" + this.indicatorsType.toLowerCase();
17105
+ }
17106
+ var indicatorWrap = this.createElement('div', { className: CLS_INDICATORS + " " + indicatorClass });
17051
17107
  var indicatorBars = this.createElement('div', { className: CLS_INDICATOR_BARS });
17052
17108
  indicatorWrap.appendChild(indicatorBars);
17109
+ var progress;
17053
17110
  if (this.slideItems) {
17054
- this.slideItems.forEach(function (item, index) {
17055
- var indicatorBar = _this.createElement('div', {
17056
- className: CLS_INDICATOR_BAR + ' ' + (_this.selectedIndex === index ? CLS_ACTIVE$2 : ''),
17057
- attrs: { 'data-index': index.toString(), 'aria-current': _this.selectedIndex === index ? 'true' : 'false' }
17058
- });
17059
- if (_this.indicatorsTemplate) {
17060
- addClass([indicatorBar], CLS_TEMPLATE$2);
17061
- var templateId = _this.element.id + '_indicatorsTemplate';
17062
- var template = _this.templateParser(_this.indicatorsTemplate)({ index: index, selectedIndex: _this.selectedIndex }, _this, 'indicatorsTemplate', templateId, false);
17063
- append(template, indicatorBar);
17064
- }
17065
- else {
17066
- var indicator = _this.createElement('button', { className: CLS_INDICATOR$1, attrs: { 'type': 'button', 'aria-label': _this.localeObj.getConstant('slide') + ' ' + (index + 1) + ' ' + _this.localeObj.getConstant('of') + ' ' + _this.slideItems.length } });
17067
- indicatorBar.appendChild(indicator);
17068
- indicator.appendChild(_this.createElement('div', {}));
17069
- var buttonObj = new Button({ cssClass: 'e-flat e-small' });
17070
- buttonObj.appendTo(indicator);
17071
- }
17072
- indicatorBars.appendChild(indicatorBar);
17073
- EventHandler.add(indicatorBar, 'click', _this.indicatorClickHandler, _this);
17074
- });
17111
+ switch (this.indicatorsType) {
17112
+ case 'Fraction':
17113
+ if (this.indicatorsTemplate) {
17114
+ this.renderIndicatorTemplate(indicatorBars, this.selectedIndex + 1);
17115
+ }
17116
+ else {
17117
+ indicatorBars.innerText = this.selectedIndex + 1 + " / " + this.slideItems.length;
17118
+ }
17119
+ break;
17120
+ case 'Progress':
17121
+ if (this.indicatorsTemplate) {
17122
+ this.renderIndicatorTemplate(indicatorBars, this.selectedIndex + 1);
17123
+ }
17124
+ else {
17125
+ progress = this.createElement('div', { className: CLS_INDICATOR_BAR });
17126
+ progress.style.setProperty('--carousel-items-current', "" + (this.selectedIndex + 1));
17127
+ progress.style.setProperty('--carousel-items-count', "" + this.slideItems.length);
17128
+ indicatorBars.appendChild(progress);
17129
+ }
17130
+ break;
17131
+ case 'Default':
17132
+ case 'Dynamic':
17133
+ this.slideItems.forEach(function (item, index) {
17134
+ var indicatorBar = _this.createElement('div', {
17135
+ className: CLS_INDICATOR_BAR + ' ' + (_this.selectedIndex === index ? CLS_ACTIVE$2 : _this.selectedIndex - 1 === index ? CLS_PREV_SLIDE : _this.selectedIndex + 1 === index ? CLS_NEXT_SLIDE : ''),
17136
+ attrs: { 'data-index': index.toString(), 'aria-current': _this.selectedIndex === index ? 'true' : 'false' }
17137
+ });
17138
+ indicatorBar.style.setProperty('--carousel-items-current', "" + _this.selectedIndex);
17139
+ if (_this.indicatorsTemplate) {
17140
+ _this.renderIndicatorTemplate(indicatorBar, index);
17141
+ }
17142
+ else if (_this.indicatorsType === 'Default') {
17143
+ var indicator = _this.createElement('button', { className: CLS_INDICATOR$1, attrs: { 'type': 'button', 'aria-label': _this.localeObj.getConstant('slide') + ' ' + (index + 1) + ' ' + _this.localeObj.getConstant('of') + ' ' + _this.slideItems.length } });
17144
+ indicatorBar.appendChild(indicator);
17145
+ indicator.appendChild(_this.createElement('div', {}));
17146
+ var buttonObj = new Button({ cssClass: 'e-flat e-small' });
17147
+ buttonObj.appendTo(indicator);
17148
+ }
17149
+ indicatorBars.appendChild(indicatorBar);
17150
+ if (_this.indicatorsType === 'Default') {
17151
+ EventHandler.add(indicatorBar, 'click', _this.indicatorClickHandler, _this);
17152
+ }
17153
+ });
17154
+ break;
17155
+ }
17075
17156
  }
17076
17157
  this.element.appendChild(indicatorWrap);
17077
17158
  };
17159
+ Carousel.prototype.renderIndicatorTemplate = function (indicatorBar, index) {
17160
+ if (index === void 0) { index = 0; }
17161
+ addClass([indicatorBar], CLS_TEMPLATE$2);
17162
+ var templateId = this.element.id + '_indicatorsTemplate';
17163
+ var template = this.templateParser(this.indicatorsTemplate)({ index: index, selectedIndex: this.selectedIndex }, this, 'indicatorsTemplate', templateId, false);
17164
+ append(template, indicatorBar);
17165
+ };
17078
17166
  Carousel.prototype.renderKeyboardActions = function () {
17079
17167
  this.keyModule = new KeyboardEvents(this.element, { keyAction: this.keyHandler.bind(this), keyConfigs: this.keyConfigs });
17080
17168
  };
@@ -17192,13 +17280,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
17192
17280
  _this.setProperties({ selectedIndex: currentIndex }, true);
17193
17281
  attributes(args.currentSlide, { 'aria-hidden': 'true' });
17194
17282
  attributes(args.nextSlide, { 'aria-hidden': 'false' });
17195
- var slideIndicators = [].slice.call(_this.element.querySelectorAll("." + CLS_INDICATOR_BAR));
17196
- if (slideIndicators.length > 0) {
17197
- attributes(slideIndicators[parseInt(activeIndex.toString(), 10)], { 'aria-current': 'false' });
17198
- attributes(slideIndicators[parseInt(currentIndex.toString(), 10)], { 'aria-current': 'true' });
17199
- removeClass(slideIndicators, CLS_ACTIVE$2);
17200
- addClass([slideIndicators[parseInt(currentIndex.toString(), 10)]], CLS_ACTIVE$2);
17201
- }
17283
+ _this.refreshIndicators(activeIndex, currentIndex);
17202
17284
  _this.slideChangedEventArgs = {
17203
17285
  currentIndex: args.nextIndex,
17204
17286
  previousIndex: args.currentIndex,
@@ -17207,25 +17289,32 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
17207
17289
  slideDirection: direction,
17208
17290
  isSwiped: isSwiped
17209
17291
  };
17210
- if (_this.partialVisible) {
17211
- var container = _this.element.querySelector('.' + CLS_ITEMS$2);
17212
- var slideWidth = allSlides[parseInt(currentIndex.toString(), 10)].clientWidth;
17213
- container.style.transitionProperty = 'transform';
17214
- if (_this.loop) {
17215
- if (_this.slideChangedEventArgs.currentIndex === 0 && _this.slideChangedEventArgs.slideDirection === 'Next') {
17216
- container.style.transform = _this.getTranslateX(slideWidth, allSlides.length + 2);
17217
- }
17218
- else if (_this.slideChangedEventArgs.currentIndex === _this.slideItems.length - 1 && _this.slideChangedEventArgs.slideDirection === 'Previous') {
17219
- container.style.transform = _this.getTranslateX(slideWidth);
17220
- }
17221
- else {
17222
- container.style.transform = _this.getTranslateX(slideWidth, currentIndex + 2);
17223
- }
17292
+ var slideWidth = allSlides[parseInt(currentIndex.toString(), 10)].clientWidth;
17293
+ var numOfItems = _this.getNumOfItems();
17294
+ if (!_this.isSwipe) {
17295
+ _this.itemsContainer.style.transitionDuration = '0.6s';
17296
+ }
17297
+ _this.isSwipe = false;
17298
+ if ((_this.animationEffect === 'Fade')) {
17299
+ _this.itemsContainer.classList.add('e-fade-in-out');
17300
+ }
17301
+ else {
17302
+ _this.itemsContainer.style.transitionProperty = 'transform';
17303
+ }
17304
+ if (_this.loop) {
17305
+ if (_this.slideChangedEventArgs.currentIndex === 0 && _this.slideChangedEventArgs.slideDirection === 'Next') {
17306
+ _this.itemsContainer.style.transform = _this.getTranslateX(slideWidth, allSlides.length + numOfItems);
17307
+ }
17308
+ else if (_this.slideChangedEventArgs.currentIndex === _this.slideItems.length - 1 && _this.slideChangedEventArgs.slideDirection === 'Previous') {
17309
+ _this.itemsContainer.style.transform = _this.partialVisible ? _this.getTranslateX(slideWidth) : 'translateX(0px)';
17224
17310
  }
17225
17311
  else {
17226
- container.style.transform = _this.getTranslateX(slideWidth, currentIndex);
17312
+ _this.itemsContainer.style.transform = _this.getTranslateX(slideWidth, currentIndex + numOfItems);
17227
17313
  }
17228
17314
  }
17315
+ else {
17316
+ _this.itemsContainer.style.transform = _this.getTranslateX(slideWidth, currentIndex);
17317
+ }
17229
17318
  if (_this.animationEffect === 'Slide') {
17230
17319
  if (direction === 'Previous') {
17231
17320
  addClass([args.nextSlide], CLS_PREV_SLIDE);
@@ -17260,13 +17349,14 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
17260
17349
  };
17261
17350
  Carousel.prototype.onTransitionEnd = function () {
17262
17351
  var _this = this;
17352
+ removeClass(this.element.querySelectorAll("." + CLS_ITEMS$2), 'e-fade-in-out');
17353
+ var numOfItems = this.getNumOfItems();
17263
17354
  if (this.slideChangedEventArgs) {
17264
- if (this.partialVisible && this.loop && (this.slideChangedEventArgs.currentIndex === 0 && this.slideChangedEventArgs.slideDirection === 'Next' ||
17355
+ this.itemsContainer.style.transitionProperty = 'none';
17356
+ if (this.loop && (this.slideChangedEventArgs.currentIndex === 0 && this.slideChangedEventArgs.slideDirection === 'Next' ||
17265
17357
  this.slideChangedEventArgs.currentIndex === this.slideItems.length - 1 && this.slideChangedEventArgs.slideDirection === 'Previous')) {
17266
- var container = this.element.querySelector('.' + CLS_ITEMS$2);
17267
17358
  var slideWidth = this.slideChangedEventArgs.currentSlide.clientWidth;
17268
- container.style.transitionProperty = 'none';
17269
- container.style.transform = this.getTranslateX(slideWidth, this.slideChangedEventArgs.currentIndex + 2);
17359
+ this.itemsContainer.style.transform = this.getTranslateX(slideWidth, this.slideChangedEventArgs.currentIndex + numOfItems);
17270
17360
  }
17271
17361
  addClass([this.slideChangedEventArgs.currentSlide], CLS_ACTIVE$2);
17272
17362
  removeClass([this.slideChangedEventArgs.previousSlide], CLS_ACTIVE$2);
@@ -17276,6 +17366,52 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
17276
17366
  });
17277
17367
  }
17278
17368
  };
17369
+ Carousel.prototype.refreshIndicators = function (activeIndex, currentIndex) {
17370
+ var _this = this;
17371
+ var slideIndicator = this.element.querySelector("." + CLS_INDICATOR_BARS);
17372
+ if (isNullOrUndefined(slideIndicator)) {
17373
+ return;
17374
+ }
17375
+ var indicators = [].slice.call(slideIndicator.childNodes);
17376
+ switch (this.indicatorsType) {
17377
+ case 'Default':
17378
+ case 'Dynamic':
17379
+ attributes(indicators[parseInt(activeIndex.toString(), 10)], { 'aria-current': 'false' });
17380
+ attributes(indicators[parseInt(currentIndex.toString(), 10)], { 'aria-current': 'true' });
17381
+ removeClass(indicators, [CLS_ACTIVE$2, CLS_PREV_SLIDE, CLS_NEXT_SLIDE]);
17382
+ addClass([indicators[parseInt(currentIndex.toString(), 10)]], CLS_ACTIVE$2);
17383
+ if (indicators[currentIndex - 1]) {
17384
+ addClass([indicators[currentIndex - 1]], CLS_PREV_SLIDE);
17385
+ }
17386
+ if (indicators[currentIndex + 1]) {
17387
+ addClass([indicators[currentIndex + 1]], CLS_NEXT_SLIDE);
17388
+ }
17389
+ indicators.forEach(function (item) { return item.style.setProperty('--carousel-items-current', "" + _this.selectedIndex); });
17390
+ break;
17391
+ case 'Fraction':
17392
+ if (this.indicatorsTemplate) {
17393
+ if (slideIndicator.children.length > 0) {
17394
+ slideIndicator.removeChild(slideIndicator.firstElementChild);
17395
+ }
17396
+ this.renderIndicatorTemplate(slideIndicator, currentIndex + 1);
17397
+ }
17398
+ else {
17399
+ slideIndicator.innerText = this.selectedIndex + 1 + " / " + this.slideItems.length;
17400
+ }
17401
+ break;
17402
+ case 'Progress':
17403
+ if (this.indicatorsTemplate) {
17404
+ if (slideIndicator.children.length > 0) {
17405
+ slideIndicator.removeChild(slideIndicator.firstElementChild);
17406
+ }
17407
+ this.renderIndicatorTemplate(slideIndicator, currentIndex + 1);
17408
+ }
17409
+ else {
17410
+ slideIndicator.firstElementChild.style.setProperty('--carousel-items-current', "" + (this.selectedIndex + 1));
17411
+ }
17412
+ break;
17413
+ }
17414
+ };
17279
17415
  Carousel.prototype.setHtmlAttributes = function (attribute, element) {
17280
17416
  var keys = Object.keys(attribute);
17281
17417
  for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
@@ -17291,7 +17427,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
17291
17427
  Carousel.prototype.templateParser = function (template) {
17292
17428
  if (template) {
17293
17429
  try {
17294
- if (document.querySelectorAll(template).length) {
17430
+ if (typeof template !== 'function' && document.querySelectorAll(template).length) {
17295
17431
  return compile(document.querySelector(template).innerHTML.trim());
17296
17432
  }
17297
17433
  else {
@@ -17341,8 +17477,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
17341
17477
  playButton.setAttribute('aria-label', this.localeObj.getConstant(this.autoPlay ? 'pauseSlideTransition' : 'playSlideTransition'));
17342
17478
  buttonObj.iconCss = CLS_ICON$1 + ' ' + (this.autoPlay ? CLS_PAUSE_ICON : CLS_PLAY_ICON);
17343
17479
  buttonObj.dataBind();
17344
- var itemsContainer = this.element.querySelector("." + CLS_ITEMS$2);
17345
- itemsContainer.setAttribute('aria-live', this.autoPlay ? 'off' : 'polite');
17480
+ this.itemsContainer.setAttribute('aria-live', this.autoPlay ? 'off' : 'polite');
17346
17481
  if (this.autoPlay && !this.loop && this.selectedIndex === this.slideItems.length - 1) {
17347
17482
  this.setActiveSlide(0, 'Next');
17348
17483
  }
@@ -17426,8 +17561,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
17426
17561
  if (isButtonUpdate) {
17427
17562
  this.setProperties({ autoPlay: !isLastSlide }, true);
17428
17563
  playButton.setAttribute('aria-label', this.localeObj.getConstant(this.autoPlay ? 'pauseSlideTransition' : 'playSlideTransition'));
17429
- var itemsContainer = this.element.querySelector("." + CLS_ITEMS$2);
17430
- itemsContainer.setAttribute('aria-live', this.autoPlay ? 'off' : 'polite');
17564
+ this.itemsContainer.setAttribute('aria-live', this.autoPlay ? 'off' : 'polite');
17431
17565
  var buttonObj = getInstance(playButton, Button);
17432
17566
  buttonObj.iconCss = CLS_ICON$1 + ' ' + (this.autoPlay ? CLS_PAUSE_ICON : CLS_PLAY_ICON);
17433
17567
  buttonObj.dataBind();
@@ -17487,7 +17621,94 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
17487
17621
  }
17488
17622
  }
17489
17623
  };
17624
+ Carousel.prototype.getNumOfItems = function () {
17625
+ return this.partialVisible ? 2 : 1;
17626
+ };
17627
+ Carousel.prototype.getTranslateValue = function (element) {
17628
+ var style = getComputedStyle(element);
17629
+ return window.WebKitCSSMatrix ?
17630
+ new WebKitCSSMatrix(style.webkitTransform).m41 : 0;
17631
+ };
17632
+ Carousel.prototype.swipeStart = function (e) {
17633
+ if (!this.timeStampStart) {
17634
+ this.timeStampStart = Date.now();
17635
+ }
17636
+ this.isSwipe = false;
17637
+ this.itemsContainer.classList.add('e-swipe-start');
17638
+ this.prevPageX = e.touches ? e.touches[0].pageX : e.pageX;
17639
+ this.initialTranslate = this.getTranslateValue(this.itemsContainer);
17640
+ };
17641
+ Carousel.prototype.swiping = function (e) {
17642
+ if (!this.itemsContainer.classList.contains('e-swipe-start')) {
17643
+ return;
17644
+ }
17645
+ e.preventDefault();
17646
+ var pageX = e.touches ? e.touches[0].pageX : e.pageX;
17647
+ var positionDiff = this.prevPageX - (pageX);
17648
+ if (!this.loop && ((this.enableRtl && ((this.selectedIndex === 0 && positionDiff > 0) ||
17649
+ (this.selectedIndex === this.itemsContainer.childElementCount - 1 && positionDiff < 0))) ||
17650
+ (!this.enableRtl && ((this.selectedIndex === 0 && positionDiff < 0) ||
17651
+ (this.selectedIndex === this.itemsContainer.childElementCount - 1 && positionDiff > 0))))) {
17652
+ return;
17653
+ }
17654
+ this.itemsContainer.style.transform = "translateX(" + (this.initialTranslate + (this.enableRtl ? positionDiff : -positionDiff)) + "px)";
17655
+ };
17656
+ Carousel.prototype.swipStop = function () {
17657
+ this.isSwipe = true;
17658
+ var time = Date.now() - this.timeStampStart;
17659
+ var distanceX = this.getTranslateValue(this.itemsContainer) - this.initialTranslate;
17660
+ distanceX = distanceX < 0 ? distanceX * -1 : distanceX;
17661
+ if (this.isSwipe) {
17662
+ var offsetDist = distanceX * (Browser.isDevice ? 6 : 1.66);
17663
+ this.itemsContainer.style.transitionDuration = (((Browser.isDevice ? distanceX : offsetDist) / time) / 10) + 's';
17664
+ }
17665
+ var slideWidth = this.itemsContainer.firstElementChild.clientWidth;
17666
+ var threshold = slideWidth / 2;
17667
+ this.itemsContainer.classList.remove('e-swipe-start');
17668
+ var value = this.getTranslateValue(this.itemsContainer);
17669
+ if (value - this.initialTranslate < -threshold) {
17670
+ this.swipeNavigation(!this.enableRtl);
17671
+ }
17672
+ else if (value - this.initialTranslate > threshold) {
17673
+ this.swipeNavigation(this.enableRtl);
17674
+ }
17675
+ else {
17676
+ this.itemsContainer.style.transform = "translateX(" + this.initialTranslate + "px)";
17677
+ if (this.animationEffect === 'Fade') {
17678
+ this.itemsContainer.classList.add('e-fade-in-out');
17679
+ }
17680
+ }
17681
+ };
17682
+ Carousel.prototype.swipeNavigation = function (isRtl) {
17683
+ if (isRtl) {
17684
+ this.next();
17685
+ }
17686
+ else {
17687
+ this.prev();
17688
+ }
17689
+ };
17690
+ Carousel.prototype.swipeModehandlers = function () {
17691
+ if ((this.swipeMode & CarouselSwipeMode.Touch) === CarouselSwipeMode.Touch) {
17692
+ EventHandler.add(this.itemsContainer, 'touchstart', this.swipeStart, this);
17693
+ EventHandler.add(this.itemsContainer, 'touchmove', this.swiping, this);
17694
+ EventHandler.add(this.itemsContainer, 'touchend', this.swipStop, this);
17695
+ }
17696
+ if ((this.swipeMode & CarouselSwipeMode.Mouse) === CarouselSwipeMode.Mouse) {
17697
+ EventHandler.add(this.itemsContainer, 'mousedown', this.swipeStart, this);
17698
+ EventHandler.add(this.itemsContainer, 'mousemove', this.swiping, this);
17699
+ EventHandler.add(this.itemsContainer, 'mouseup', this.swipStop, this);
17700
+ }
17701
+ if ((this.swipeMode === 0) && (this.swipeMode & CarouselSwipeMode.Mouse & CarouselSwipeMode.Touch) ===
17702
+ (CarouselSwipeMode.Mouse & CarouselSwipeMode.Touch)) {
17703
+ EventHandler.add(this.itemsContainer, 'mousedown touchstart', this.swipeStart, this);
17704
+ EventHandler.add(this.itemsContainer, 'mousemove touchmove', this.swiping, this);
17705
+ EventHandler.add(this.itemsContainer, 'mouseup touchend', this.swipStop, this);
17706
+ }
17707
+ };
17490
17708
  Carousel.prototype.wireEvents = function () {
17709
+ if (!(this.animationEffect === 'Custom')) {
17710
+ this.swipeModehandlers();
17711
+ }
17491
17712
  EventHandler.add(this.element, 'focusin focusout', this.onFocusActions, this);
17492
17713
  EventHandler.add(this.element, 'mouseenter mouseleave', this.onHoverActions, this);
17493
17714
  EventHandler.add(this.element.firstElementChild, 'animationend', this.onTransitionEnd, this);
@@ -17550,8 +17771,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
17550
17771
  playButton.setAttribute('aria-label', this.localeObj.getConstant('pauseSlideTransition'));
17551
17772
  }
17552
17773
  this.setProperties({ autoPlay: true }, true);
17553
- var itemsContainer = this.element.querySelector("." + CLS_ITEMS$2);
17554
- itemsContainer.setAttribute('aria-live', 'off');
17774
+ this.itemsContainer.setAttribute('aria-live', 'off');
17555
17775
  this.applySlideInterval();
17556
17776
  };
17557
17777
  /**
@@ -17567,8 +17787,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
17567
17787
  classList(pauseIcon, [CLS_PLAY_ICON], [CLS_PAUSE_ICON]);
17568
17788
  }
17569
17789
  this.setProperties({ autoPlay: false }, true);
17570
- var itemsContainer = this.element.querySelector("." + CLS_ITEMS$2);
17571
- itemsContainer.setAttribute('aria-live', 'off');
17790
+ this.itemsContainer.setAttribute('aria-live', 'off');
17572
17791
  this.resetSlideInterval();
17573
17792
  };
17574
17793
  /**
@@ -17673,12 +17892,18 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
17673
17892
  __decorate$11([
17674
17893
  Property(true)
17675
17894
  ], Carousel.prototype, "showIndicators", void 0);
17895
+ __decorate$11([
17896
+ Property('Default')
17897
+ ], Carousel.prototype, "indicatorsType", void 0);
17676
17898
  __decorate$11([
17677
17899
  Property('Visible')
17678
17900
  ], Carousel.prototype, "buttonsVisibility", void 0);
17679
17901
  __decorate$11([
17680
17902
  Property(false)
17681
17903
  ], Carousel.prototype, "partialVisible", void 0);
17904
+ __decorate$11([
17905
+ Property(CarouselSwipeMode.Touch)
17906
+ ], Carousel.prototype, "swipeMode", void 0);
17682
17907
  __decorate$11([
17683
17908
  Property()
17684
17909
  ], Carousel.prototype, "htmlAttributes", void 0);
@@ -17920,5 +18145,5 @@ var AppBar = /** @__PURE__ @class */ (function (_super) {
17920
18145
  * Navigation all modules
17921
18146
  */
17922
18147
 
17923
- export { MenuAnimationSettings, MenuItem, FieldSettings, HScroll, VScroll, addScrolling, destroyScroll, Item, Toolbar, AccordionActionSettings, AccordionAnimationSettings, AccordionItem, Accordion, ContextMenu, Menu, TabActionSettings, TabAnimationSettings, Header, TabItem, Tab, FieldsSettings, ActionSettings, NodeAnimationSettings, TreeView, Sidebar, BreadcrumbOverflowMode, BreadcrumbItem, Breadcrumb, CarouselItem, Carousel, AppBar };
18148
+ export { MenuAnimationSettings, MenuItem, FieldSettings, HScroll, VScroll, addScrolling, destroyScroll, Item, Toolbar, AccordionActionSettings, AccordionAnimationSettings, AccordionItem, Accordion, ContextMenu, Menu, TabActionSettings, TabAnimationSettings, Header, TabItem, Tab, FieldsSettings, ActionSettings, NodeAnimationSettings, TreeView, Sidebar, BreadcrumbOverflowMode, BreadcrumbItem, Breadcrumb, CarouselSwipeMode, CarouselItem, Carousel, AppBar };
17924
18149
  //# sourceMappingURL=ej2-navigations.es5.js.map