@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
@@ -1458,7 +1458,15 @@ let MenuBase = class MenuBase extends Component {
1458
1458
  }
1459
1459
  getUlByNavIdx(navIdxLen = this.navIdx.length) {
1460
1460
  if (this.isMenu) {
1461
- const popup = [this.getWrapper()].concat([].slice.call(selectAll('.' + POPUP)))[navIdxLen];
1461
+ let popup = [this.getWrapper()].concat([].slice.call(selectAll('.' + POPUP)))[navIdxLen];
1462
+ const popups = [];
1463
+ const allPopup = selectAll('.' + POPUP);
1464
+ allPopup.forEach((elem) => {
1465
+ if (this.element.id === elem.id.split('-')[2]) {
1466
+ popups.push(elem);
1467
+ }
1468
+ });
1469
+ popup = [this.getWrapper()].concat([].slice.call(popups))[navIdxLen];
1462
1470
  return isNullOrUndefined(popup) ? null : select('.e-menu-parent', popup);
1463
1471
  }
1464
1472
  else {
@@ -1826,7 +1834,6 @@ let MenuBase = class MenuBase extends Component {
1826
1834
  }
1827
1835
  }
1828
1836
  }
1829
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1830
1837
  copyObject(source, destination) {
1831
1838
  for (const prop in source) {
1832
1839
  destination[`${prop}`] = source[`${prop}`];
@@ -3633,20 +3640,20 @@ let Toolbar = class Toolbar extends Component {
3633
3640
  if (isVisible(this.popObj.element)) {
3634
3641
  nodes = [].slice.call(popupCheck.children);
3635
3642
  if (e.action === 'home') {
3636
- ele = nodes[0];
3643
+ ele = this.focusFirstVisibleEle(nodes);
3637
3644
  }
3638
3645
  else {
3639
- ele = nodes[nodes.length - 1];
3646
+ ele = this.focusLastVisibleEle(nodes);
3640
3647
  }
3641
3648
  }
3642
3649
  }
3643
3650
  else {
3644
3651
  nodes = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + ')');
3645
3652
  if (e.action === 'home') {
3646
- ele = nodes[0];
3653
+ ele = this.focusFirstVisibleEle(nodes);
3647
3654
  }
3648
3655
  else {
3649
- ele = nodes[nodes.length - 1];
3656
+ ele = this.focusLastVisibleEle(nodes);
3650
3657
  }
3651
3658
  }
3652
3659
  if (ele) {
@@ -3760,6 +3767,30 @@ let Toolbar = class Toolbar extends Component {
3760
3767
  eleContains(el) {
3761
3768
  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);
3762
3769
  }
3770
+ focusFirstVisibleEle(nodes) {
3771
+ let element;
3772
+ let index = 0;
3773
+ while (index < nodes.length) {
3774
+ const ele = nodes[parseInt(index.toString(), 10)];
3775
+ if (!ele.classList.contains(CLS_HIDDEN) && !ele.classList.contains(CLS_DISABLE$2)) {
3776
+ return ele;
3777
+ }
3778
+ index++;
3779
+ }
3780
+ return element;
3781
+ }
3782
+ focusLastVisibleEle(nodes) {
3783
+ let element;
3784
+ let index = nodes.length - 1;
3785
+ while (index >= 0) {
3786
+ const ele = nodes[parseInt(index.toString(), 10)];
3787
+ if (!ele.classList.contains(CLS_HIDDEN) && !ele.classList.contains(CLS_DISABLE$2)) {
3788
+ return ele;
3789
+ }
3790
+ index--;
3791
+ }
3792
+ return element;
3793
+ }
3763
3794
  eleFocus(closest$$1, pos) {
3764
3795
  const sib = Object(closest$$1)[pos + 'ElementSibling'];
3765
3796
  if (sib) {
@@ -4401,12 +4432,10 @@ let Toolbar = class Toolbar extends Component {
4401
4432
  if (checkoffset) {
4402
4433
  if (inEle[parseInt(i.toString(), 10)].classList.contains(CLS_SEPARATOR)) {
4403
4434
  if (this.overflowMode === 'Extended') {
4404
- if (itemCount === itemPopCount) {
4405
- const sepEle = inEle[parseInt(i.toString(), 10)];
4406
- if (checkClass(sepEle, [CLS_SEPARATOR, CLS_TBARIGNORE])) {
4407
- inEle[parseInt(i.toString(), 10)].classList.add(CLS_POPUP);
4408
- itemPopCount++;
4409
- }
4435
+ const sepEle = inEle[parseInt(i.toString(), 10)];
4436
+ if (checkClass(sepEle, [CLS_SEPARATOR, CLS_TBARIGNORE])) {
4437
+ inEle[parseInt(i.toString(), 10)].classList.add(CLS_POPUP);
4438
+ itemPopCount++;
4410
4439
  }
4411
4440
  itemCount++;
4412
4441
  }
@@ -5357,10 +5386,7 @@ let Toolbar = class Toolbar extends Component {
5357
5386
  break;
5358
5387
  case 'width':
5359
5388
  setStyleAttribute(tEle, { 'width': formatUnit(newProp.width) });
5360
- this.renderOverflowMode();
5361
- if (this.popObj && wid < tEle.offsetWidth) {
5362
- this.popupRefresh(this.popObj.element, false);
5363
- }
5389
+ this.refreshOverflow();
5364
5390
  break;
5365
5391
  case 'height':
5366
5392
  setStyleAttribute(this.element, { 'height': formatUnit(newProp.height) });
@@ -5752,7 +5778,7 @@ let Accordion = class Accordion extends Component {
5752
5778
  templateParser(template) {
5753
5779
  if (template) {
5754
5780
  try {
5755
- if (document.querySelectorAll(template).length) {
5781
+ if (typeof template !== 'function' && document.querySelectorAll(template).length) {
5756
5782
  return compile(document.querySelector(template).innerHTML.trim());
5757
5783
  }
5758
5784
  else {
@@ -7041,7 +7067,7 @@ let Menu = class Menu extends MenuBase {
7041
7067
  this.element.id = this.element.id || getUniqueID('ej2-menu');
7042
7068
  if (this.template) {
7043
7069
  try {
7044
- if (document.querySelectorAll(this.template).length) {
7070
+ if (typeof this.template !== 'function' && document.querySelectorAll(this.template).length) {
7045
7071
  this.template = document.querySelector(this.template).innerHTML.trim();
7046
7072
  this.clearChanges();
7047
7073
  }
@@ -9964,7 +9990,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
9964
9990
  // eslint-disable-next-line
9965
9991
  this.element.classList.add(INTERACTION);
9966
9992
  try {
9967
- if (document.querySelectorAll(template).length) {
9993
+ if (typeof template !== 'function' && document.querySelectorAll(template).length) {
9968
9994
  return compile(document.querySelector(template).innerHTML.trim());
9969
9995
  }
9970
9996
  else {
@@ -16224,6 +16250,7 @@ const CLS_CAROUSEL = 'e-carousel';
16224
16250
  const CLS_ACTIVE$2 = 'e-active';
16225
16251
  const CLS_RTL$5 = 'e-rtl';
16226
16252
  const CLS_PARTIAL = 'e-partial';
16253
+ const CLS_SWIPE = 'e-swipe';
16227
16254
  const CLS_SLIDE_CONTAINER = 'e-carousel-slide-container';
16228
16255
  const CLS_ITEMS$2 = 'e-carousel-items';
16229
16256
  const CLS_CLONED = 'e-cloned';
@@ -16257,6 +16284,19 @@ const CLS_PREV_SLIDE = 'e-prev';
16257
16284
  const CLS_NEXT_SLIDE = 'e-next';
16258
16285
  const CLS_TRANSITION_START = 'e-transition-start';
16259
16286
  const CLS_TRANSITION_END = 'e-transition-end';
16287
+ /**
16288
+ * Specifies the action (touch & mouse) which enables the slide swiping action in carousel.
16289
+ * * Touch - Enables or disables the swiping action in touch interaction.
16290
+ * * Mouse - Enables or disables the swiping action in mouse interaction.
16291
+ * @aspNumberEnum
16292
+ */
16293
+ var CarouselSwipeMode;
16294
+ (function (CarouselSwipeMode) {
16295
+ /** Enables or disables the swiping action in touch interaction. */
16296
+ CarouselSwipeMode[CarouselSwipeMode["Touch"] = 1] = "Touch";
16297
+ /** Enables or disables the swiping action in mouse interaction. */
16298
+ CarouselSwipeMode[CarouselSwipeMode["Mouse"] = 2] = "Mouse";
16299
+ })(CarouselSwipeMode || (CarouselSwipeMode = {}));
16260
16300
  /** Specifies the carousel individual item. */
16261
16301
  class CarouselItem extends ChildProperty {
16262
16302
  }
@@ -16281,6 +16321,7 @@ let Carousel = class Carousel extends Component {
16281
16321
  */
16282
16322
  constructor(options, element) {
16283
16323
  super(options, element);
16324
+ this.isSwipe = false;
16284
16325
  }
16285
16326
  getModuleName() {
16286
16327
  return CLS_CAROUSEL.replace('e-', '');
@@ -16351,7 +16392,7 @@ let Carousel = class Carousel extends Component {
16351
16392
  this.applySlideInterval();
16352
16393
  }
16353
16394
  this.handleNavigatorsActions(this.selectedIndex);
16354
- if (this.partialVisible) {
16395
+ if (this.partialVisible || !(this.swipeMode === (~CarouselSwipeMode.Touch & ~CarouselSwipeMode.Mouse))) {
16355
16396
  this.reRenderSlides();
16356
16397
  }
16357
16398
  break;
@@ -16365,11 +16406,10 @@ let Carousel = class Carousel extends Component {
16365
16406
  else {
16366
16407
  removeClass(rtlElement, CLS_RTL$5);
16367
16408
  }
16368
- if (this.partialVisible) {
16369
- const itemsContainer = this.element.querySelector(`.${CLS_ITEMS$2}`);
16370
- const cloneCount = this.loop ? 2 : 0;
16371
- const slideWidth = itemsContainer.firstElementChild.clientWidth;
16372
- itemsContainer.style.transform = this.getTranslateX(slideWidth, this.selectedIndex + cloneCount);
16409
+ if (this.partialVisible || !(this.swipeMode === (~CarouselSwipeMode.Touch & ~CarouselSwipeMode.Mouse))) {
16410
+ const cloneCount = this.loop ? this.getNumOfItems() : 0;
16411
+ const slideWidth = this.itemsContainer.firstElementChild.clientWidth;
16412
+ this.itemsContainer.style.transform = this.getTranslateX(slideWidth, this.selectedIndex + cloneCount);
16373
16413
  }
16374
16414
  break;
16375
16415
  case 'buttonsVisibility':
@@ -16409,8 +16449,9 @@ let Carousel = class Carousel extends Component {
16409
16449
  this.autoSlide();
16410
16450
  break;
16411
16451
  case 'showIndicators':
16452
+ case 'indicatorsType':
16412
16453
  target = this.element.querySelector(`.${CLS_INDICATORS}`);
16413
- if (!this.showIndicators && target) {
16454
+ if (target) {
16414
16455
  this.resetTemplates(['indicatorsTemplate']);
16415
16456
  remove(target);
16416
16457
  }
@@ -16437,6 +16478,13 @@ let Carousel = class Carousel extends Component {
16437
16478
  }
16438
16479
  this.reRenderSlides();
16439
16480
  break;
16481
+ case 'swipeMode':
16482
+ EventHandler.remove(this.element, 'mousedown touchstart', this.swipeStart);
16483
+ EventHandler.remove(this.element, 'mousemove touchmove', this.swiping);
16484
+ EventHandler.remove(this.element, 'mouseup touchend', this.swipStop);
16485
+ this.swipeModehandlers();
16486
+ this.reRenderSlides();
16487
+ break;
16440
16488
  }
16441
16489
  }
16442
16490
  }
@@ -16459,6 +16507,9 @@ let Carousel = class Carousel extends Component {
16459
16507
  if (this.partialVisible) {
16460
16508
  carouselClasses.push(CLS_PARTIAL);
16461
16509
  }
16510
+ if (!(this.swipeMode === (~CarouselSwipeMode.Touch & ~CarouselSwipeMode.Mouse))) {
16511
+ carouselClasses.push(CLS_SWIPE);
16512
+ }
16462
16513
  addClass([this.element], carouselClasses);
16463
16514
  setStyleAttribute(this.element, { 'width': formatUnit(this.width), 'height': formatUnit(this.height) });
16464
16515
  attributes(this.element, { 'tabindex': '0', 'aria-roledescription': 'carousel', 'aria-label': this.localeObj.getConstant('slideShow') });
@@ -16472,52 +16523,52 @@ let Carousel = class Carousel extends Component {
16472
16523
  slideContainer = this.createElement('div', { className: CLS_SLIDE_CONTAINER });
16473
16524
  this.element.appendChild(slideContainer);
16474
16525
  }
16475
- const itemsContainer = this.createElement('div', { className: CLS_ITEMS$2, attrs: { 'aria-live': this.autoPlay ? 'off' : 'polite' } });
16476
- slideContainer.appendChild(itemsContainer);
16477
- if (this.partialVisible && this.loop) {
16526
+ this.itemsContainer = this.createElement('div', { className: CLS_ITEMS$2, attrs: { 'aria-live': this.autoPlay ? 'off' : 'polite' } });
16527
+ slideContainer.appendChild(this.itemsContainer);
16528
+ const numOfItems = this.getNumOfItems();
16529
+ if (numOfItems > 0 && this.loop) {
16478
16530
  if (this.items.length > 0) {
16479
- this.items.slice(-2).forEach((item, index) => {
16480
- this.renderSlide(item, item.template, index, itemsContainer, true);
16531
+ this.items.slice(-numOfItems).forEach((item, index) => {
16532
+ this.renderSlide(item, item.template, index, this.itemsContainer, true);
16481
16533
  });
16482
16534
  }
16483
16535
  else if (this.dataSource.length > 0) {
16484
- this.dataSource.slice(-2).forEach((item, index) => {
16485
- this.renderSlide(item, this.itemTemplate, index, itemsContainer, true);
16536
+ this.dataSource.slice(-numOfItems).forEach((item, index) => {
16537
+ this.renderSlide(item, this.itemTemplate, index, this.itemsContainer, true);
16486
16538
  });
16487
16539
  }
16488
16540
  }
16489
16541
  if (this.items.length > 0) {
16490
16542
  this.slideItems = this.items;
16491
16543
  this.items.forEach((item, index) => {
16492
- this.renderSlide(item, item.template, index, itemsContainer);
16544
+ this.renderSlide(item, item.template, index, this.itemsContainer);
16493
16545
  });
16494
16546
  }
16495
16547
  else if (this.dataSource.length > 0) {
16496
16548
  this.slideItems = this.dataSource;
16497
16549
  this.dataSource.forEach((item, index) => {
16498
- this.renderSlide(item, this.itemTemplate, index, itemsContainer);
16550
+ this.renderSlide(item, this.itemTemplate, index, this.itemsContainer);
16499
16551
  });
16500
16552
  }
16501
- if (this.partialVisible && this.loop) {
16553
+ if (numOfItems > 0 && this.loop) {
16502
16554
  if (this.items.length > 0) {
16503
- this.items.slice(0, 2).forEach((item, index) => {
16504
- this.renderSlide(item, item.template, index, itemsContainer, true);
16555
+ this.items.slice(0, numOfItems).forEach((item, index) => {
16556
+ this.renderSlide(item, item.template, index, this.itemsContainer, true);
16505
16557
  });
16506
16558
  }
16507
16559
  else if (this.dataSource.length > 0) {
16508
- this.dataSource.slice(0, 2).forEach((item, index) => {
16509
- this.renderSlide(item, this.itemTemplate, index, itemsContainer, true);
16560
+ this.dataSource.slice(0, numOfItems).forEach((item, index) => {
16561
+ this.renderSlide(item, this.itemTemplate, index, this.itemsContainer, true);
16510
16562
  });
16511
16563
  }
16512
16564
  }
16513
16565
  this.renderTemplates();
16514
- if (this.partialVisible) {
16515
- itemsContainer.style.setProperty('--carousel-items-count', `${itemsContainer.children.length}`);
16516
- const slideWidth = itemsContainer.firstElementChild.clientWidth;
16517
- const cloneCount = this.loop ? 2 : 0;
16518
- itemsContainer.style.transitionProperty = 'none';
16519
- itemsContainer.style.transform = this.getTranslateX(slideWidth, this.selectedIndex + cloneCount);
16520
- }
16566
+ this.itemsContainer.style.setProperty('--carousel-items-count', `${this.itemsContainer.children.length}`);
16567
+ const slideWidth = isNullOrUndefined(this.itemsContainer.firstElementChild) ? 0 :
16568
+ this.itemsContainer.firstElementChild.clientWidth;
16569
+ this.itemsContainer.style.transitionProperty = 'none';
16570
+ const cloneCount = this.loop ? numOfItems : 0;
16571
+ this.itemsContainer.style.transform = this.getTranslateX(slideWidth, this.selectedIndex + cloneCount);
16521
16572
  this.autoSlide();
16522
16573
  this.renderTouchActions();
16523
16574
  this.renderKeyboardActions();
@@ -16618,8 +16669,7 @@ let Carousel = class Carousel extends Component {
16618
16669
  if (isLastSlide) {
16619
16670
  this.setProperties({ autoPlay: false }, true);
16620
16671
  playButton.setAttribute('aria-label', this.localeObj.getConstant('playSlideTransition'));
16621
- const itemsContainer = this.element.querySelector(`.${CLS_ITEMS$2}`);
16622
- itemsContainer.setAttribute('aria-live', 'polite');
16672
+ this.itemsContainer.setAttribute('aria-live', 'polite');
16623
16673
  }
16624
16674
  buttonObj.appendTo(playButton);
16625
16675
  playPauseWrap.appendChild(playButton);
@@ -16633,34 +16683,69 @@ let Carousel = class Carousel extends Component {
16633
16683
  if (!this.showIndicators) {
16634
16684
  return;
16635
16685
  }
16636
- const indicatorWrap = this.createElement('div', { className: CLS_INDICATORS });
16686
+ let indicatorClass = 'e-default';
16687
+ if (!this.indicatorsTemplate) {
16688
+ indicatorClass = `e-${this.indicatorsType.toLowerCase()}`;
16689
+ }
16690
+ const indicatorWrap = this.createElement('div', { className: `${CLS_INDICATORS} ${indicatorClass}` });
16637
16691
  const indicatorBars = this.createElement('div', { className: CLS_INDICATOR_BARS });
16638
16692
  indicatorWrap.appendChild(indicatorBars);
16693
+ let progress;
16639
16694
  if (this.slideItems) {
16640
- this.slideItems.forEach((item, index) => {
16641
- const indicatorBar = this.createElement('div', {
16642
- className: CLS_INDICATOR_BAR + ' ' + (this.selectedIndex === index ? CLS_ACTIVE$2 : ''),
16643
- attrs: { 'data-index': index.toString(), 'aria-current': this.selectedIndex === index ? 'true' : 'false' }
16644
- });
16645
- if (this.indicatorsTemplate) {
16646
- addClass([indicatorBar], CLS_TEMPLATE$2);
16647
- const templateId = this.element.id + '_indicatorsTemplate';
16648
- const template = this.templateParser(this.indicatorsTemplate)({ index: index, selectedIndex: this.selectedIndex }, this, 'indicatorsTemplate', templateId, false);
16649
- append(template, indicatorBar);
16650
- }
16651
- else {
16652
- const 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 } });
16653
- indicatorBar.appendChild(indicator);
16654
- indicator.appendChild(this.createElement('div', {}));
16655
- const buttonObj = new Button({ cssClass: 'e-flat e-small' });
16656
- buttonObj.appendTo(indicator);
16657
- }
16658
- indicatorBars.appendChild(indicatorBar);
16659
- EventHandler.add(indicatorBar, 'click', this.indicatorClickHandler, this);
16660
- });
16695
+ switch (this.indicatorsType) {
16696
+ case 'Fraction':
16697
+ if (this.indicatorsTemplate) {
16698
+ this.renderIndicatorTemplate(indicatorBars, this.selectedIndex + 1);
16699
+ }
16700
+ else {
16701
+ indicatorBars.innerText = `${this.selectedIndex + 1} / ${this.slideItems.length}`;
16702
+ }
16703
+ break;
16704
+ case 'Progress':
16705
+ if (this.indicatorsTemplate) {
16706
+ this.renderIndicatorTemplate(indicatorBars, this.selectedIndex + 1);
16707
+ }
16708
+ else {
16709
+ progress = this.createElement('div', { className: CLS_INDICATOR_BAR });
16710
+ progress.style.setProperty('--carousel-items-current', `${this.selectedIndex + 1}`);
16711
+ progress.style.setProperty('--carousel-items-count', `${this.slideItems.length}`);
16712
+ indicatorBars.appendChild(progress);
16713
+ }
16714
+ break;
16715
+ case 'Default':
16716
+ case 'Dynamic':
16717
+ this.slideItems.forEach((item, index) => {
16718
+ const indicatorBar = this.createElement('div', {
16719
+ className: CLS_INDICATOR_BAR + ' ' + (this.selectedIndex === index ? CLS_ACTIVE$2 : this.selectedIndex - 1 === index ? CLS_PREV_SLIDE : this.selectedIndex + 1 === index ? CLS_NEXT_SLIDE : ''),
16720
+ attrs: { 'data-index': index.toString(), 'aria-current': this.selectedIndex === index ? 'true' : 'false' }
16721
+ });
16722
+ indicatorBar.style.setProperty('--carousel-items-current', `${this.selectedIndex}`);
16723
+ if (this.indicatorsTemplate) {
16724
+ this.renderIndicatorTemplate(indicatorBar, index);
16725
+ }
16726
+ else if (this.indicatorsType === 'Default') {
16727
+ const 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 } });
16728
+ indicatorBar.appendChild(indicator);
16729
+ indicator.appendChild(this.createElement('div', {}));
16730
+ const buttonObj = new Button({ cssClass: 'e-flat e-small' });
16731
+ buttonObj.appendTo(indicator);
16732
+ }
16733
+ indicatorBars.appendChild(indicatorBar);
16734
+ if (this.indicatorsType === 'Default') {
16735
+ EventHandler.add(indicatorBar, 'click', this.indicatorClickHandler, this);
16736
+ }
16737
+ });
16738
+ break;
16739
+ }
16661
16740
  }
16662
16741
  this.element.appendChild(indicatorWrap);
16663
16742
  }
16743
+ renderIndicatorTemplate(indicatorBar, index = 0) {
16744
+ addClass([indicatorBar], CLS_TEMPLATE$2);
16745
+ const templateId = this.element.id + '_indicatorsTemplate';
16746
+ const template = this.templateParser(this.indicatorsTemplate)({ index: index, selectedIndex: this.selectedIndex }, this, 'indicatorsTemplate', templateId, false);
16747
+ append(template, indicatorBar);
16748
+ }
16664
16749
  renderKeyboardActions() {
16665
16750
  this.keyModule = new KeyboardEvents(this.element, { keyAction: this.keyHandler.bind(this), keyConfigs: this.keyConfigs });
16666
16751
  }
@@ -16775,13 +16860,7 @@ let Carousel = class Carousel extends Component {
16775
16860
  this.setProperties({ selectedIndex: currentIndex }, true);
16776
16861
  attributes(args.currentSlide, { 'aria-hidden': 'true' });
16777
16862
  attributes(args.nextSlide, { 'aria-hidden': 'false' });
16778
- const slideIndicators = [].slice.call(this.element.querySelectorAll(`.${CLS_INDICATOR_BAR}`));
16779
- if (slideIndicators.length > 0) {
16780
- attributes(slideIndicators[parseInt(activeIndex.toString(), 10)], { 'aria-current': 'false' });
16781
- attributes(slideIndicators[parseInt(currentIndex.toString(), 10)], { 'aria-current': 'true' });
16782
- removeClass(slideIndicators, CLS_ACTIVE$2);
16783
- addClass([slideIndicators[parseInt(currentIndex.toString(), 10)]], CLS_ACTIVE$2);
16784
- }
16863
+ this.refreshIndicators(activeIndex, currentIndex);
16785
16864
  this.slideChangedEventArgs = {
16786
16865
  currentIndex: args.nextIndex,
16787
16866
  previousIndex: args.currentIndex,
@@ -16790,25 +16869,32 @@ let Carousel = class Carousel extends Component {
16790
16869
  slideDirection: direction,
16791
16870
  isSwiped: isSwiped
16792
16871
  };
16793
- if (this.partialVisible) {
16794
- const container = this.element.querySelector('.' + CLS_ITEMS$2);
16795
- const slideWidth = allSlides[parseInt(currentIndex.toString(), 10)].clientWidth;
16796
- container.style.transitionProperty = 'transform';
16797
- if (this.loop) {
16798
- if (this.slideChangedEventArgs.currentIndex === 0 && this.slideChangedEventArgs.slideDirection === 'Next') {
16799
- container.style.transform = this.getTranslateX(slideWidth, allSlides.length + 2);
16800
- }
16801
- else if (this.slideChangedEventArgs.currentIndex === this.slideItems.length - 1 && this.slideChangedEventArgs.slideDirection === 'Previous') {
16802
- container.style.transform = this.getTranslateX(slideWidth);
16803
- }
16804
- else {
16805
- container.style.transform = this.getTranslateX(slideWidth, currentIndex + 2);
16806
- }
16872
+ const slideWidth = allSlides[parseInt(currentIndex.toString(), 10)].clientWidth;
16873
+ const numOfItems = this.getNumOfItems();
16874
+ if (!this.isSwipe) {
16875
+ this.itemsContainer.style.transitionDuration = '0.6s';
16876
+ }
16877
+ this.isSwipe = false;
16878
+ if ((this.animationEffect === 'Fade')) {
16879
+ this.itemsContainer.classList.add('e-fade-in-out');
16880
+ }
16881
+ else {
16882
+ this.itemsContainer.style.transitionProperty = 'transform';
16883
+ }
16884
+ if (this.loop) {
16885
+ if (this.slideChangedEventArgs.currentIndex === 0 && this.slideChangedEventArgs.slideDirection === 'Next') {
16886
+ this.itemsContainer.style.transform = this.getTranslateX(slideWidth, allSlides.length + numOfItems);
16887
+ }
16888
+ else if (this.slideChangedEventArgs.currentIndex === this.slideItems.length - 1 && this.slideChangedEventArgs.slideDirection === 'Previous') {
16889
+ this.itemsContainer.style.transform = this.partialVisible ? this.getTranslateX(slideWidth) : 'translateX(0px)';
16807
16890
  }
16808
16891
  else {
16809
- container.style.transform = this.getTranslateX(slideWidth, currentIndex);
16892
+ this.itemsContainer.style.transform = this.getTranslateX(slideWidth, currentIndex + numOfItems);
16810
16893
  }
16811
16894
  }
16895
+ else {
16896
+ this.itemsContainer.style.transform = this.getTranslateX(slideWidth, currentIndex);
16897
+ }
16812
16898
  if (this.animationEffect === 'Slide') {
16813
16899
  if (direction === 'Previous') {
16814
16900
  addClass([args.nextSlide], CLS_PREV_SLIDE);
@@ -16842,13 +16928,14 @@ let Carousel = class Carousel extends Component {
16842
16928
  });
16843
16929
  }
16844
16930
  onTransitionEnd() {
16931
+ removeClass(this.element.querySelectorAll(`.${CLS_ITEMS$2}`), 'e-fade-in-out');
16932
+ const numOfItems = this.getNumOfItems();
16845
16933
  if (this.slideChangedEventArgs) {
16846
- if (this.partialVisible && this.loop && (this.slideChangedEventArgs.currentIndex === 0 && this.slideChangedEventArgs.slideDirection === 'Next' ||
16934
+ this.itemsContainer.style.transitionProperty = 'none';
16935
+ if (this.loop && (this.slideChangedEventArgs.currentIndex === 0 && this.slideChangedEventArgs.slideDirection === 'Next' ||
16847
16936
  this.slideChangedEventArgs.currentIndex === this.slideItems.length - 1 && this.slideChangedEventArgs.slideDirection === 'Previous')) {
16848
- const container = this.element.querySelector('.' + CLS_ITEMS$2);
16849
16937
  const slideWidth = this.slideChangedEventArgs.currentSlide.clientWidth;
16850
- container.style.transitionProperty = 'none';
16851
- container.style.transform = this.getTranslateX(slideWidth, this.slideChangedEventArgs.currentIndex + 2);
16938
+ this.itemsContainer.style.transform = this.getTranslateX(slideWidth, this.slideChangedEventArgs.currentIndex + numOfItems);
16852
16939
  }
16853
16940
  addClass([this.slideChangedEventArgs.currentSlide], CLS_ACTIVE$2);
16854
16941
  removeClass([this.slideChangedEventArgs.previousSlide], CLS_ACTIVE$2);
@@ -16858,6 +16945,51 @@ let Carousel = class Carousel extends Component {
16858
16945
  });
16859
16946
  }
16860
16947
  }
16948
+ refreshIndicators(activeIndex, currentIndex) {
16949
+ const slideIndicator = this.element.querySelector(`.${CLS_INDICATOR_BARS}`);
16950
+ if (isNullOrUndefined(slideIndicator)) {
16951
+ return;
16952
+ }
16953
+ const indicators = [].slice.call(slideIndicator.childNodes);
16954
+ switch (this.indicatorsType) {
16955
+ case 'Default':
16956
+ case 'Dynamic':
16957
+ attributes(indicators[parseInt(activeIndex.toString(), 10)], { 'aria-current': 'false' });
16958
+ attributes(indicators[parseInt(currentIndex.toString(), 10)], { 'aria-current': 'true' });
16959
+ removeClass(indicators, [CLS_ACTIVE$2, CLS_PREV_SLIDE, CLS_NEXT_SLIDE]);
16960
+ addClass([indicators[parseInt(currentIndex.toString(), 10)]], CLS_ACTIVE$2);
16961
+ if (indicators[currentIndex - 1]) {
16962
+ addClass([indicators[currentIndex - 1]], CLS_PREV_SLIDE);
16963
+ }
16964
+ if (indicators[currentIndex + 1]) {
16965
+ addClass([indicators[currentIndex + 1]], CLS_NEXT_SLIDE);
16966
+ }
16967
+ indicators.forEach((item) => item.style.setProperty('--carousel-items-current', `${this.selectedIndex}`));
16968
+ break;
16969
+ case 'Fraction':
16970
+ if (this.indicatorsTemplate) {
16971
+ if (slideIndicator.children.length > 0) {
16972
+ slideIndicator.removeChild(slideIndicator.firstElementChild);
16973
+ }
16974
+ this.renderIndicatorTemplate(slideIndicator, currentIndex + 1);
16975
+ }
16976
+ else {
16977
+ slideIndicator.innerText = `${this.selectedIndex + 1} / ${this.slideItems.length}`;
16978
+ }
16979
+ break;
16980
+ case 'Progress':
16981
+ if (this.indicatorsTemplate) {
16982
+ if (slideIndicator.children.length > 0) {
16983
+ slideIndicator.removeChild(slideIndicator.firstElementChild);
16984
+ }
16985
+ this.renderIndicatorTemplate(slideIndicator, currentIndex + 1);
16986
+ }
16987
+ else {
16988
+ slideIndicator.firstElementChild.style.setProperty('--carousel-items-current', `${this.selectedIndex + 1}`);
16989
+ }
16990
+ break;
16991
+ }
16992
+ }
16861
16993
  setHtmlAttributes(attribute, element) {
16862
16994
  const keys = Object.keys(attribute);
16863
16995
  for (const key of keys) {
@@ -16872,7 +17004,7 @@ let Carousel = class Carousel extends Component {
16872
17004
  templateParser(template) {
16873
17005
  if (template) {
16874
17006
  try {
16875
- if (document.querySelectorAll(template).length) {
17007
+ if (typeof template !== 'function' && document.querySelectorAll(template).length) {
16876
17008
  return compile(document.querySelector(template).innerHTML.trim());
16877
17009
  }
16878
17010
  else {
@@ -16921,8 +17053,7 @@ let Carousel = class Carousel extends Component {
16921
17053
  playButton.setAttribute('aria-label', this.localeObj.getConstant(this.autoPlay ? 'pauseSlideTransition' : 'playSlideTransition'));
16922
17054
  buttonObj.iconCss = CLS_ICON$1 + ' ' + (this.autoPlay ? CLS_PAUSE_ICON : CLS_PLAY_ICON);
16923
17055
  buttonObj.dataBind();
16924
- const itemsContainer = this.element.querySelector(`.${CLS_ITEMS$2}`);
16925
- itemsContainer.setAttribute('aria-live', this.autoPlay ? 'off' : 'polite');
17056
+ this.itemsContainer.setAttribute('aria-live', this.autoPlay ? 'off' : 'polite');
16926
17057
  if (this.autoPlay && !this.loop && this.selectedIndex === this.slideItems.length - 1) {
16927
17058
  this.setActiveSlide(0, 'Next');
16928
17059
  }
@@ -17006,8 +17137,7 @@ let Carousel = class Carousel extends Component {
17006
17137
  if (isButtonUpdate) {
17007
17138
  this.setProperties({ autoPlay: !isLastSlide }, true);
17008
17139
  playButton.setAttribute('aria-label', this.localeObj.getConstant(this.autoPlay ? 'pauseSlideTransition' : 'playSlideTransition'));
17009
- const itemsContainer = this.element.querySelector(`.${CLS_ITEMS$2}`);
17010
- itemsContainer.setAttribute('aria-live', this.autoPlay ? 'off' : 'polite');
17140
+ this.itemsContainer.setAttribute('aria-live', this.autoPlay ? 'off' : 'polite');
17011
17141
  const buttonObj = getInstance(playButton, Button);
17012
17142
  buttonObj.iconCss = CLS_ICON$1 + ' ' + (this.autoPlay ? CLS_PAUSE_ICON : CLS_PLAY_ICON);
17013
17143
  buttonObj.dataBind();
@@ -17066,7 +17196,94 @@ let Carousel = class Carousel extends Component {
17066
17196
  }
17067
17197
  }
17068
17198
  }
17199
+ getNumOfItems() {
17200
+ return this.partialVisible ? 2 : 1;
17201
+ }
17202
+ getTranslateValue(element) {
17203
+ const style = getComputedStyle(element);
17204
+ return window.WebKitCSSMatrix ?
17205
+ new WebKitCSSMatrix(style.webkitTransform).m41 : 0;
17206
+ }
17207
+ swipeStart(e) {
17208
+ if (!this.timeStampStart) {
17209
+ this.timeStampStart = Date.now();
17210
+ }
17211
+ this.isSwipe = false;
17212
+ this.itemsContainer.classList.add('e-swipe-start');
17213
+ this.prevPageX = e.touches ? e.touches[0].pageX : e.pageX;
17214
+ this.initialTranslate = this.getTranslateValue(this.itemsContainer);
17215
+ }
17216
+ swiping(e) {
17217
+ if (!this.itemsContainer.classList.contains('e-swipe-start')) {
17218
+ return;
17219
+ }
17220
+ e.preventDefault();
17221
+ const pageX = e.touches ? e.touches[0].pageX : e.pageX;
17222
+ const positionDiff = this.prevPageX - (pageX);
17223
+ if (!this.loop && ((this.enableRtl && ((this.selectedIndex === 0 && positionDiff > 0) ||
17224
+ (this.selectedIndex === this.itemsContainer.childElementCount - 1 && positionDiff < 0))) ||
17225
+ (!this.enableRtl && ((this.selectedIndex === 0 && positionDiff < 0) ||
17226
+ (this.selectedIndex === this.itemsContainer.childElementCount - 1 && positionDiff > 0))))) {
17227
+ return;
17228
+ }
17229
+ this.itemsContainer.style.transform = `translateX(${this.initialTranslate + (this.enableRtl ? positionDiff : -positionDiff)}px)`;
17230
+ }
17231
+ swipStop() {
17232
+ this.isSwipe = true;
17233
+ const time = Date.now() - this.timeStampStart;
17234
+ let distanceX = this.getTranslateValue(this.itemsContainer) - this.initialTranslate;
17235
+ distanceX = distanceX < 0 ? distanceX * -1 : distanceX;
17236
+ if (this.isSwipe) {
17237
+ const offsetDist = distanceX * (Browser.isDevice ? 6 : 1.66);
17238
+ this.itemsContainer.style.transitionDuration = (((Browser.isDevice ? distanceX : offsetDist) / time) / 10) + 's';
17239
+ }
17240
+ const slideWidth = this.itemsContainer.firstElementChild.clientWidth;
17241
+ const threshold = slideWidth / 2;
17242
+ this.itemsContainer.classList.remove('e-swipe-start');
17243
+ const value = this.getTranslateValue(this.itemsContainer);
17244
+ if (value - this.initialTranslate < -threshold) {
17245
+ this.swipeNavigation(!this.enableRtl);
17246
+ }
17247
+ else if (value - this.initialTranslate > threshold) {
17248
+ this.swipeNavigation(this.enableRtl);
17249
+ }
17250
+ else {
17251
+ this.itemsContainer.style.transform = `translateX(${this.initialTranslate}px)`;
17252
+ if (this.animationEffect === 'Fade') {
17253
+ this.itemsContainer.classList.add('e-fade-in-out');
17254
+ }
17255
+ }
17256
+ }
17257
+ swipeNavigation(isRtl) {
17258
+ if (isRtl) {
17259
+ this.next();
17260
+ }
17261
+ else {
17262
+ this.prev();
17263
+ }
17264
+ }
17265
+ swipeModehandlers() {
17266
+ if ((this.swipeMode & CarouselSwipeMode.Touch) === CarouselSwipeMode.Touch) {
17267
+ EventHandler.add(this.itemsContainer, 'touchstart', this.swipeStart, this);
17268
+ EventHandler.add(this.itemsContainer, 'touchmove', this.swiping, this);
17269
+ EventHandler.add(this.itemsContainer, 'touchend', this.swipStop, this);
17270
+ }
17271
+ if ((this.swipeMode & CarouselSwipeMode.Mouse) === CarouselSwipeMode.Mouse) {
17272
+ EventHandler.add(this.itemsContainer, 'mousedown', this.swipeStart, this);
17273
+ EventHandler.add(this.itemsContainer, 'mousemove', this.swiping, this);
17274
+ EventHandler.add(this.itemsContainer, 'mouseup', this.swipStop, this);
17275
+ }
17276
+ if ((this.swipeMode === 0) && (this.swipeMode & CarouselSwipeMode.Mouse & CarouselSwipeMode.Touch) ===
17277
+ (CarouselSwipeMode.Mouse & CarouselSwipeMode.Touch)) {
17278
+ EventHandler.add(this.itemsContainer, 'mousedown touchstart', this.swipeStart, this);
17279
+ EventHandler.add(this.itemsContainer, 'mousemove touchmove', this.swiping, this);
17280
+ EventHandler.add(this.itemsContainer, 'mouseup touchend', this.swipStop, this);
17281
+ }
17282
+ }
17069
17283
  wireEvents() {
17284
+ if (!(this.animationEffect === 'Custom')) {
17285
+ this.swipeModehandlers();
17286
+ }
17070
17287
  EventHandler.add(this.element, 'focusin focusout', this.onFocusActions, this);
17071
17288
  EventHandler.add(this.element, 'mouseenter mouseleave', this.onHoverActions, this);
17072
17289
  EventHandler.add(this.element.firstElementChild, 'animationend', this.onTransitionEnd, this);
@@ -17128,8 +17345,7 @@ let Carousel = class Carousel extends Component {
17128
17345
  playButton.setAttribute('aria-label', this.localeObj.getConstant('pauseSlideTransition'));
17129
17346
  }
17130
17347
  this.setProperties({ autoPlay: true }, true);
17131
- const itemsContainer = this.element.querySelector(`.${CLS_ITEMS$2}`);
17132
- itemsContainer.setAttribute('aria-live', 'off');
17348
+ this.itemsContainer.setAttribute('aria-live', 'off');
17133
17349
  this.applySlideInterval();
17134
17350
  }
17135
17351
  /**
@@ -17145,8 +17361,7 @@ let Carousel = class Carousel extends Component {
17145
17361
  classList(pauseIcon, [CLS_PLAY_ICON], [CLS_PAUSE_ICON]);
17146
17362
  }
17147
17363
  this.setProperties({ autoPlay: false }, true);
17148
- const itemsContainer = this.element.querySelector(`.${CLS_ITEMS$2}`);
17149
- itemsContainer.setAttribute('aria-live', 'off');
17364
+ this.itemsContainer.setAttribute('aria-live', 'off');
17150
17365
  this.resetSlideInterval();
17151
17366
  }
17152
17367
  /**
@@ -17251,12 +17466,18 @@ __decorate$11([
17251
17466
  __decorate$11([
17252
17467
  Property(true)
17253
17468
  ], Carousel.prototype, "showIndicators", void 0);
17469
+ __decorate$11([
17470
+ Property('Default')
17471
+ ], Carousel.prototype, "indicatorsType", void 0);
17254
17472
  __decorate$11([
17255
17473
  Property('Visible')
17256
17474
  ], Carousel.prototype, "buttonsVisibility", void 0);
17257
17475
  __decorate$11([
17258
17476
  Property(false)
17259
17477
  ], Carousel.prototype, "partialVisible", void 0);
17478
+ __decorate$11([
17479
+ Property(CarouselSwipeMode.Touch)
17480
+ ], Carousel.prototype, "swipeMode", void 0);
17260
17481
  __decorate$11([
17261
17482
  Property()
17262
17483
  ], Carousel.prototype, "htmlAttributes", void 0);
@@ -17478,5 +17699,5 @@ AppBar = __decorate$12([
17478
17699
  * Navigation all modules
17479
17700
  */
17480
17701
 
17481
- 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 };
17702
+ 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 };
17482
17703
  //# sourceMappingURL=ej2-navigations.es2015.js.map