@syncfusion/ej2-navigations 19.4.53 → 20.1.47

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 (370) hide show
  1. package/CHANGELOG.md +34 -2
  2. package/README.md +16 -1
  3. package/carousel.d.ts +4 -0
  4. package/carousel.js +4 -0
  5. package/dist/ej2-navigations.umd.min.js +2 -2
  6. package/dist/ej2-navigations.umd.min.js.map +1 -1
  7. package/dist/es6/ej2-navigations.es2015.js +1050 -25
  8. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  9. package/dist/es6/ej2-navigations.es5.js +1088 -25
  10. package/dist/es6/ej2-navigations.es5.js.map +1 -1
  11. package/dist/global/ej2-navigations.min.js +2 -2
  12. package/dist/global/ej2-navigations.min.js.map +1 -1
  13. package/dist/global/index.d.ts +1 -1
  14. package/package.json +11 -11
  15. package/src/accordion/accordion.js +11 -3
  16. package/src/breadcrumb/breadcrumb.js +6 -0
  17. package/src/carousel/carousel-model.d.ts +227 -0
  18. package/src/carousel/carousel.d.ts +338 -0
  19. package/src/carousel/carousel.js +988 -0
  20. package/src/carousel/index.d.ts +3 -0
  21. package/src/carousel/index.js +2 -0
  22. package/src/common/h-scroll.js +1 -1
  23. package/src/common/menu-base.js +4 -10
  24. package/src/index.d.ts +1 -0
  25. package/src/index.js +1 -0
  26. package/src/tab/tab-model.d.ts +1 -1
  27. package/src/tab/tab.js +70 -9
  28. package/src/toolbar/toolbar.js +7 -0
  29. package/src/treeview/treeview.js +4 -1
  30. package/styles/accordion/_bootstrap-dark-definition.scss +4 -4
  31. package/styles/accordion/_bootstrap-definition.scss +4 -4
  32. package/styles/accordion/_bootstrap4-definition.scss +4 -4
  33. package/styles/accordion/_bootstrap5-definition.scss +10 -10
  34. package/styles/accordion/_fabric-dark-definition.scss +9 -9
  35. package/styles/accordion/_fabric-definition.scss +9 -9
  36. package/styles/accordion/_fluent-dark-definition.scss +1 -0
  37. package/styles/accordion/_fluent-definition.scss +10 -10
  38. package/styles/accordion/_highcontrast-definition.scss +8 -8
  39. package/styles/accordion/_highcontrast-light-definition.scss +8 -8
  40. package/styles/accordion/_layout.scss +56 -86
  41. package/styles/accordion/_material-dark-definition.scss +8 -8
  42. package/styles/accordion/_material-definition.scss +8 -8
  43. package/styles/accordion/_tailwind-definition.scss +10 -10
  44. package/styles/accordion/_theme.scss +14 -1
  45. package/styles/accordion/bootstrap-dark.css +48 -63
  46. package/styles/accordion/bootstrap.css +48 -63
  47. package/styles/accordion/bootstrap4.css +48 -63
  48. package/styles/accordion/bootstrap5-dark.css +51 -66
  49. package/styles/accordion/bootstrap5.css +51 -66
  50. package/styles/accordion/fabric-dark.css +50 -65
  51. package/styles/accordion/fabric.css +50 -65
  52. package/styles/accordion/fluent-dark.css +395 -0
  53. package/styles/accordion/fluent-dark.scss +4 -0
  54. package/styles/accordion/fluent.css +395 -0
  55. package/styles/accordion/fluent.scss +4 -0
  56. package/styles/accordion/highcontrast-light.css +49 -64
  57. package/styles/accordion/highcontrast.css +49 -64
  58. package/styles/accordion/icons/_fluent-dark.scss +1 -0
  59. package/styles/accordion/icons/_fluent.scss +2 -1
  60. package/styles/accordion/icons/_tailwind.scss +2 -1
  61. package/styles/accordion/material-dark.css +49 -64
  62. package/styles/accordion/material.css +49 -64
  63. package/styles/accordion/tailwind-dark.css +52 -67
  64. package/styles/accordion/tailwind.css +52 -67
  65. package/styles/bootstrap-dark.css +310 -69
  66. package/styles/bootstrap-dark.scss +1 -0
  67. package/styles/bootstrap.css +310 -69
  68. package/styles/bootstrap.scss +1 -0
  69. package/styles/bootstrap4.css +310 -69
  70. package/styles/bootstrap4.scss +1 -0
  71. package/styles/bootstrap5-dark.css +415 -171
  72. package/styles/bootstrap5-dark.scss +1 -0
  73. package/styles/bootstrap5.css +415 -171
  74. package/styles/bootstrap5.scss +1 -0
  75. package/styles/breadcrumb/_bootstrap5-definition.scss +2 -2
  76. package/styles/breadcrumb/_fluent-dark-definition.scss +1 -0
  77. package/styles/breadcrumb/_fluent-definition.scss +4 -1
  78. package/styles/breadcrumb/_layout.scss +43 -6
  79. package/styles/breadcrumb/_tailwind-definition.scss +2 -2
  80. package/styles/breadcrumb/_theme.scss +11 -5
  81. package/styles/breadcrumb/bootstrap-dark.css +10 -2
  82. package/styles/breadcrumb/bootstrap.css +10 -2
  83. package/styles/breadcrumb/bootstrap4.css +10 -2
  84. package/styles/breadcrumb/bootstrap5-dark.css +12 -4
  85. package/styles/breadcrumb/bootstrap5.css +12 -4
  86. package/styles/breadcrumb/fabric-dark.css +10 -4
  87. package/styles/breadcrumb/fabric.css +10 -4
  88. package/styles/breadcrumb/fluent-dark.css +444 -0
  89. package/styles/breadcrumb/fluent-dark.scss +4 -0
  90. package/styles/breadcrumb/fluent.css +444 -0
  91. package/styles/breadcrumb/fluent.scss +4 -0
  92. package/styles/breadcrumb/highcontrast-light.css +10 -4
  93. package/styles/breadcrumb/highcontrast.css +10 -4
  94. package/styles/breadcrumb/icons/_fluent-dark.scss +1 -0
  95. package/styles/breadcrumb/icons/_fluent.scss +4 -4
  96. package/styles/breadcrumb/icons/_tailwind-dark.scss +13 -2
  97. package/styles/breadcrumb/icons/_tailwind.scss +13 -2
  98. package/styles/breadcrumb/material-dark.css +10 -2
  99. package/styles/breadcrumb/material.css +10 -2
  100. package/styles/breadcrumb/tailwind-dark.css +21 -4
  101. package/styles/breadcrumb/tailwind.css +27 -10
  102. package/styles/carousel/_all.scss +2 -0
  103. package/styles/carousel/_bootstrap-dark-definition.scss +22 -0
  104. package/styles/carousel/_bootstrap-definition.scss +22 -0
  105. package/styles/carousel/_bootstrap4-definition.scss +22 -0
  106. package/styles/carousel/_bootstrap5-dark-definition.scss +1 -0
  107. package/styles/carousel/_bootstrap5-definition.scss +22 -0
  108. package/styles/carousel/_fabric-dark-definition.scss +22 -0
  109. package/styles/carousel/_fabric-definition.scss +22 -0
  110. package/styles/carousel/_fluent-dark-definition.scss +1 -0
  111. package/styles/carousel/_fluent-definition.scss +22 -0
  112. package/styles/carousel/_highcontrast-definition.scss +22 -0
  113. package/styles/carousel/_highcontrast-light-definition.scss +22 -0
  114. package/styles/carousel/_layout.scss +150 -0
  115. package/styles/carousel/_material-dark-definition.scss +22 -0
  116. package/styles/carousel/_material-definition.scss +22 -0
  117. package/styles/carousel/_tailwind-dark-definition.scss +1 -0
  118. package/styles/carousel/_tailwind-definition.scss +22 -0
  119. package/styles/carousel/_theme.scss +56 -0
  120. package/styles/carousel/bootstrap-dark.css +236 -0
  121. package/styles/carousel/bootstrap-dark.scss +5 -0
  122. package/styles/carousel/bootstrap.css +236 -0
  123. package/styles/carousel/bootstrap.scss +5 -0
  124. package/styles/carousel/bootstrap4.css +236 -0
  125. package/styles/carousel/bootstrap4.scss +5 -0
  126. package/styles/carousel/bootstrap5-dark.css +236 -0
  127. package/styles/carousel/bootstrap5-dark.scss +5 -0
  128. package/styles/carousel/bootstrap5.css +236 -0
  129. package/styles/carousel/bootstrap5.scss +5 -0
  130. package/styles/carousel/fabric-dark.css +236 -0
  131. package/styles/carousel/fabric-dark.scss +5 -0
  132. package/styles/carousel/fabric.css +236 -0
  133. package/styles/carousel/fabric.scss +5 -0
  134. package/styles/carousel/fluent-dark.css +236 -0
  135. package/styles/carousel/fluent-dark.scss +5 -0
  136. package/styles/carousel/fluent.css +236 -0
  137. package/styles/carousel/fluent.scss +5 -0
  138. package/styles/carousel/highcontrast-light.css +236 -0
  139. package/styles/carousel/highcontrast-light.scss +5 -0
  140. package/styles/carousel/highcontrast.css +236 -0
  141. package/styles/carousel/highcontrast.scss +5 -0
  142. package/styles/carousel/icons/_bootstrap-dark.scss +30 -0
  143. package/styles/carousel/icons/_bootstrap.scss +30 -0
  144. package/styles/carousel/icons/_bootstrap4.scss +30 -0
  145. package/styles/carousel/icons/_bootstrap5-dark.scss +1 -0
  146. package/styles/carousel/icons/_bootstrap5.scss +30 -0
  147. package/styles/carousel/icons/_fabric-dark.scss +30 -0
  148. package/styles/carousel/icons/_fabric.scss +30 -0
  149. package/styles/carousel/icons/_fluent-dark.scss +1 -0
  150. package/styles/carousel/icons/_fluent.scss +30 -0
  151. package/styles/carousel/icons/_highcontrast-light.scss +30 -0
  152. package/styles/carousel/icons/_highcontrast.scss +30 -0
  153. package/styles/carousel/icons/_material-dark.scss +30 -0
  154. package/styles/carousel/icons/_material.scss +30 -0
  155. package/styles/carousel/icons/_tailwind-dark.scss +1 -0
  156. package/styles/carousel/icons/_tailwind.scss +30 -0
  157. package/styles/carousel/material-dark.css +237 -0
  158. package/styles/carousel/material-dark.scss +5 -0
  159. package/styles/carousel/material.css +237 -0
  160. package/styles/carousel/material.scss +5 -0
  161. package/styles/carousel/tailwind-dark.css +237 -0
  162. package/styles/carousel/tailwind-dark.scss +5 -0
  163. package/styles/carousel/tailwind.css +237 -0
  164. package/styles/carousel/tailwind.scss +5 -0
  165. package/styles/context-menu/_bootstrap5-definition.scss +2 -2
  166. package/styles/context-menu/_fluent-dark-definition.scss +1 -0
  167. package/styles/context-menu/_fluent-definition.scss +10 -10
  168. package/styles/context-menu/_layout-mixin.scss +3 -0
  169. package/styles/context-menu/_layout.scss +11 -1
  170. package/styles/context-menu/_tailwind-definition.scss +2 -1
  171. package/styles/context-menu/bootstrap-dark.css +5 -0
  172. package/styles/context-menu/bootstrap.css +5 -0
  173. package/styles/context-menu/bootstrap4.css +5 -0
  174. package/styles/context-menu/bootstrap5-dark.css +16 -8
  175. package/styles/context-menu/bootstrap5.css +16 -8
  176. package/styles/context-menu/fabric-dark.css +5 -0
  177. package/styles/context-menu/fabric.css +5 -0
  178. package/styles/context-menu/fluent-dark.css +388 -0
  179. package/styles/context-menu/fluent-dark.scss +4 -0
  180. package/styles/context-menu/fluent.css +388 -0
  181. package/styles/context-menu/fluent.scss +4 -0
  182. package/styles/context-menu/highcontrast-light.css +5 -0
  183. package/styles/context-menu/highcontrast.css +5 -0
  184. package/styles/context-menu/icons/_fluent-dark.scss +1 -0
  185. package/styles/context-menu/icons/_fluent.scss +3 -3
  186. package/styles/context-menu/icons/_tailwind-dark.scss +3 -3
  187. package/styles/context-menu/icons/_tailwind.scss +3 -3
  188. package/styles/context-menu/material-dark.css +5 -0
  189. package/styles/context-menu/material.css +5 -0
  190. package/styles/context-menu/tailwind-dark.css +11 -4
  191. package/styles/context-menu/tailwind.css +11 -4
  192. package/styles/fabric-dark.css +312 -73
  193. package/styles/fabric-dark.scss +1 -0
  194. package/styles/fabric.css +312 -73
  195. package/styles/fabric.scss +1 -0
  196. package/styles/fluent-dark.css +10263 -0
  197. package/styles/fluent-dark.scss +11 -0
  198. package/styles/fluent.css +10263 -0
  199. package/styles/fluent.scss +11 -0
  200. package/styles/h-scroll/_bootstrap5-definition.scss +3 -3
  201. package/styles/h-scroll/_fluent-dark-definition.scss +1 -0
  202. package/styles/h-scroll/_layout.scss +0 -1
  203. package/styles/h-scroll/_material-dark-definition.scss +3 -3
  204. package/styles/h-scroll/bootstrap-dark.css +0 -1
  205. package/styles/h-scroll/bootstrap.css +0 -1
  206. package/styles/h-scroll/bootstrap4.css +0 -1
  207. package/styles/h-scroll/bootstrap5-dark.css +10 -11
  208. package/styles/h-scroll/bootstrap5.css +10 -11
  209. package/styles/h-scroll/fabric-dark.css +0 -1
  210. package/styles/h-scroll/fabric.css +0 -1
  211. package/styles/h-scroll/fluent-dark.css +326 -0
  212. package/styles/h-scroll/fluent-dark.scss +4 -0
  213. package/styles/h-scroll/fluent.css +326 -0
  214. package/styles/h-scroll/fluent.scss +4 -0
  215. package/styles/h-scroll/highcontrast-light.css +0 -1
  216. package/styles/h-scroll/highcontrast.css +0 -1
  217. package/styles/h-scroll/icons/_fluent-dark.scss +1 -0
  218. package/styles/h-scroll/icons/_fluent.scss +9 -9
  219. package/styles/h-scroll/icons/_tailwind.scss +8 -8
  220. package/styles/h-scroll/material-dark.css +3 -4
  221. package/styles/h-scroll/material.css +0 -1
  222. package/styles/h-scroll/tailwind-dark.css +8 -9
  223. package/styles/h-scroll/tailwind.css +8 -9
  224. package/styles/highcontrast-light.css +311 -72
  225. package/styles/highcontrast-light.scss +1 -0
  226. package/styles/highcontrast.css +312 -73
  227. package/styles/highcontrast.scss +1 -0
  228. package/styles/material-dark.css +314 -73
  229. package/styles/material-dark.scss +1 -0
  230. package/styles/material.css +311 -70
  231. package/styles/material.scss +1 -0
  232. package/styles/menu/_bootstrap5-definition.scss +4 -5
  233. package/styles/menu/_fluent-dark-definition.scss +1 -0
  234. package/styles/menu/_fluent-definition.scss +9 -9
  235. package/styles/menu/_layout.scss +8 -4
  236. package/styles/menu/_tailwind-definition.scss +1 -0
  237. package/styles/menu/_theme.scss +1 -1
  238. package/styles/menu/bootstrap-dark.css +1 -2
  239. package/styles/menu/bootstrap.css +1 -2
  240. package/styles/menu/bootstrap4.css +1 -2
  241. package/styles/menu/bootstrap5-dark.css +23 -24
  242. package/styles/menu/bootstrap5.css +23 -24
  243. package/styles/menu/fabric-dark.css +1 -2
  244. package/styles/menu/fabric.css +1 -2
  245. package/styles/menu/fluent-dark.css +1261 -0
  246. package/styles/menu/fluent-dark.scss +8 -0
  247. package/styles/menu/fluent.css +1261 -0
  248. package/styles/menu/fluent.scss +8 -0
  249. package/styles/menu/highcontrast-light.css +1 -2
  250. package/styles/menu/highcontrast.css +1 -2
  251. package/styles/menu/icons/_fluent-dark.scss +1 -0
  252. package/styles/menu/icons/_fluent.scss +14 -14
  253. package/styles/menu/icons/_tailwind-dark.scss +14 -14
  254. package/styles/menu/icons/_tailwind.scss +15 -15
  255. package/styles/menu/material-dark.css +1 -2
  256. package/styles/menu/material.css +1 -2
  257. package/styles/menu/tailwind-dark.css +18 -18
  258. package/styles/menu/tailwind.css +18 -18
  259. package/styles/sidebar/_fluent-dark-definition.scss +1 -0
  260. package/styles/sidebar/_theme.scss +5 -0
  261. package/styles/sidebar/bootstrap-dark.css +4 -0
  262. package/styles/sidebar/bootstrap.css +4 -0
  263. package/styles/sidebar/bootstrap4.css +4 -0
  264. package/styles/sidebar/bootstrap5-dark.css +4 -0
  265. package/styles/sidebar/bootstrap5.css +4 -0
  266. package/styles/sidebar/fabric-dark.css +4 -0
  267. package/styles/sidebar/fabric.css +4 -0
  268. package/styles/sidebar/fluent-dark.css +158 -0
  269. package/styles/sidebar/fluent-dark.scss +3 -0
  270. package/styles/sidebar/fluent.css +158 -0
  271. package/styles/sidebar/fluent.scss +3 -0
  272. package/styles/sidebar/highcontrast-light.css +4 -0
  273. package/styles/sidebar/highcontrast.css +4 -0
  274. package/styles/sidebar/material-dark.css +4 -0
  275. package/styles/sidebar/material.css +4 -0
  276. package/styles/sidebar/tailwind-dark.css +4 -0
  277. package/styles/sidebar/tailwind.css +4 -0
  278. package/styles/tab/_bootstrap5-definition.scss +7 -7
  279. package/styles/tab/_fluent-dark-definition.scss +1 -0
  280. package/styles/tab/_fluent-definition.scss +20 -20
  281. package/styles/tab/_highcontrast-definition.scss +1 -1
  282. package/styles/tab/_layout.scss +68 -12
  283. package/styles/tab/_tailwind-definition.scss +7 -7
  284. package/styles/tab/_theme.scss +12 -6
  285. package/styles/tab/bootstrap-dark.css +1 -1
  286. package/styles/tab/bootstrap.css +1 -1
  287. package/styles/tab/bootstrap4.css +1 -1
  288. package/styles/tab/bootstrap5-dark.css +23 -23
  289. package/styles/tab/bootstrap5.css +23 -23
  290. package/styles/tab/fabric-dark.css +1 -1
  291. package/styles/tab/fabric.css +1 -1
  292. package/styles/tab/fluent-dark.css +4394 -0
  293. package/styles/tab/fluent-dark.scss +5 -0
  294. package/styles/tab/fluent.css +4394 -0
  295. package/styles/tab/fluent.scss +5 -0
  296. package/styles/tab/highcontrast-light.css +1 -1
  297. package/styles/tab/highcontrast.css +2 -2
  298. package/styles/tab/icons/_fluent-dark.scss +1 -0
  299. package/styles/tab/icons/_fluent.scss +19 -18
  300. package/styles/tab/icons/_tailwind.scss +19 -18
  301. package/styles/tab/material-dark.css +1 -1
  302. package/styles/tab/material.css +1 -1
  303. package/styles/tab/tailwind-dark.css +43 -45
  304. package/styles/tab/tailwind.css +43 -45
  305. package/styles/tailwind-dark.css +422 -171
  306. package/styles/tailwind-dark.scss +1 -0
  307. package/styles/tailwind.css +428 -177
  308. package/styles/tailwind.scss +1 -0
  309. package/styles/toolbar/_bootstrap-dark-definition.scss +1 -0
  310. package/styles/toolbar/_bootstrap-definition.scss +1 -0
  311. package/styles/toolbar/_bootstrap4-definition.scss +1 -0
  312. package/styles/toolbar/_bootstrap5-definition.scss +12 -11
  313. package/styles/toolbar/_fabric-dark-definition.scss +1 -0
  314. package/styles/toolbar/_fabric-definition.scss +1 -0
  315. package/styles/toolbar/_fluent-dark-definition.scss +1 -0
  316. package/styles/toolbar/_fluent-definition.scss +14 -13
  317. package/styles/toolbar/_highcontrast-definition.scss +1 -0
  318. package/styles/toolbar/_highcontrast-light-definition.scss +1 -0
  319. package/styles/toolbar/_layout.scss +13 -5
  320. package/styles/toolbar/_material-dark-definition.scss +1 -0
  321. package/styles/toolbar/_material-definition.scss +1 -0
  322. package/styles/toolbar/_tailwind-definition.scss +4 -3
  323. package/styles/toolbar/_theme.scss +5 -1
  324. package/styles/toolbar/bootstrap-dark.css +4 -0
  325. package/styles/toolbar/bootstrap.css +4 -0
  326. package/styles/toolbar/bootstrap4.css +4 -0
  327. package/styles/toolbar/bootstrap5-dark.css +35 -31
  328. package/styles/toolbar/bootstrap5.css +35 -31
  329. package/styles/toolbar/fabric-dark.css +4 -0
  330. package/styles/toolbar/fabric.css +4 -0
  331. package/styles/toolbar/fluent-dark.css +1365 -0
  332. package/styles/toolbar/fluent-dark.scss +8 -0
  333. package/styles/toolbar/fluent.css +1365 -0
  334. package/styles/toolbar/fluent.scss +8 -0
  335. package/styles/toolbar/highcontrast-light.css +4 -0
  336. package/styles/toolbar/highcontrast.css +4 -0
  337. package/styles/toolbar/icons/_fluent-dark.scss +1 -0
  338. package/styles/toolbar/icons/_fluent.scss +3 -2
  339. package/styles/toolbar/icons/_tailwind.scss +3 -2
  340. package/styles/toolbar/material-dark.css +4 -0
  341. package/styles/toolbar/material.css +4 -0
  342. package/styles/toolbar/tailwind-dark.css +10 -6
  343. package/styles/toolbar/tailwind.css +10 -6
  344. package/styles/treeview/_bootstrap5-definition.scss +2 -2
  345. package/styles/treeview/_fluent-dark-definition.scss +1 -0
  346. package/styles/treeview/_fluent-definition.scss +2 -2
  347. package/styles/treeview/_layout.scss +8 -3
  348. package/styles/treeview/_tailwind-definition.scss +5 -5
  349. package/styles/treeview/bootstrap5-dark.css +4 -4
  350. package/styles/treeview/bootstrap5.css +4 -4
  351. package/styles/treeview/fluent-dark.css +1039 -0
  352. package/styles/treeview/fluent-dark.scss +6 -0
  353. package/styles/treeview/fluent.css +1039 -0
  354. package/styles/treeview/fluent.scss +6 -0
  355. package/styles/treeview/icons/_fluent-dark.scss +1 -0
  356. package/styles/treeview/icons/_fluent.scss +5 -5
  357. package/styles/treeview/icons/_tailwind-dark.scss +5 -5
  358. package/styles/treeview/icons/_tailwind.scss +5 -5
  359. package/styles/treeview/tailwind-dark.css +13 -14
  360. package/styles/treeview/tailwind.css +13 -14
  361. package/styles/v-scroll/_fluent-dark-definition.scss +1 -0
  362. package/styles/v-scroll/fluent-dark.css +247 -0
  363. package/styles/v-scroll/fluent-dark.scss +4 -0
  364. package/styles/v-scroll/fluent.css +247 -0
  365. package/styles/v-scroll/fluent.scss +4 -0
  366. package/styles/v-scroll/icons/_fluent-dark.scss +1 -0
  367. package/styles/v-scroll/icons/_fluent.scss +5 -4
  368. package/styles/v-scroll/icons/_tailwind.scss +5 -4
  369. package/styles/v-scroll/tailwind-dark.css +4 -4
  370. package/styles/v-scroll/tailwind.css +4 -4
@@ -390,7 +390,7 @@ let HScroll = class HScroll extends Component {
390
390
  classList(arrowIcon, [CLS_NAVLEFTARROW], [CLS_NAVRIGHTARROW]);
391
391
  }
392
392
  }
393
- else {
393
+ else if (addDisable && removeDisable) {
394
394
  addDisable.classList.add(CLS_DISABLE);
395
395
  addDisable.setAttribute('aria-disabled', 'true');
396
396
  addDisable.removeAttribute('tabindex');
@@ -1575,7 +1575,7 @@ let MenuBase = class MenuBase extends Component {
1575
1575
  if (isOpen && this.hamburgerMode && ulIndex && !(submenus.length)) {
1576
1576
  this.afterCloseMenu(e);
1577
1577
  }
1578
- else if (isOpen && !this.hamburgerMode && this.navIdx.length && closedLi && !trgtLi) {
1578
+ else if (isOpen && !this.hamburgerMode && this.navIdx.length && closedLi && !trgtLi && this.keyType !== "left") {
1579
1579
  let ele = (e && e.target.classList.contains('e-vscroll'))
1580
1580
  ? closest(e.target, '.e-menu-wrapper') : null;
1581
1581
  if (ele) {
@@ -1613,7 +1613,7 @@ let MenuBase = class MenuBase extends Component {
1613
1613
  if (sli) {
1614
1614
  sli.setAttribute('aria-expanded', 'false');
1615
1615
  sli.classList.remove(SELECTED);
1616
- if (observedCloseArgs.isFocused && liElem) {
1616
+ if (observedCloseArgs.isFocused && liElem || this.keyType === "left") {
1617
1617
  sli.classList.add(FOCUSED);
1618
1618
  sli.focus();
1619
1619
  }
@@ -1926,14 +1926,8 @@ let MenuBase = class MenuBase extends Component {
1926
1926
  this.setBlankIconStyle(this.popupWrapper);
1927
1927
  this.wireKeyboardEvent(this.popupWrapper);
1928
1928
  rippleEffect(this.popupWrapper, { selector: '.' + ITEM });
1929
- if (this.popupWrapper.style.position === 'fixed' && this.top > 0) {
1930
- this.popupWrapper.style.left = this.left + 'px';
1931
- this.popupWrapper.style.top = this.top + scrollY + 'px';
1932
- }
1933
- else {
1934
- this.popupWrapper.style.left = this.left + 'px';
1935
- this.popupWrapper.style.top = this.top + 'px';
1936
- }
1929
+ this.popupWrapper.style.left = this.left + 'px';
1930
+ this.popupWrapper.style.top = this.top + 'px';
1937
1931
  const animationOptions = this.animationSettings.effect !== 'None' ? {
1938
1932
  name: this.animationSettings.effect, duration: this.animationSettings.duration,
1939
1933
  timingFunction: this.animationSettings.easing
@@ -3336,6 +3330,7 @@ let Toolbar = class Toolbar extends Component {
3336
3330
  }
3337
3331
  this.popObj = null;
3338
3332
  this.tbarAlign = null;
3333
+ this.tbarItemsCol = [];
3339
3334
  this.remove(this.element, 'e-toolpop');
3340
3335
  if (this.cssClass) {
3341
3336
  removeClass([this.element], this.cssClass.split(' '));
@@ -4805,6 +4800,9 @@ let Toolbar = class Toolbar extends Component {
4805
4800
  innerItems[0].parentNode.insertBefore(innerEle, innerItems[index]);
4806
4801
  }
4807
4802
  this.items.splice(index, 0, item);
4803
+ if (item.template) {
4804
+ this.tbarEle.splice(this.tbarEle.length - 1, 1);
4805
+ }
4808
4806
  this.tbarEle.splice(index, 0, innerEle);
4809
4807
  index++;
4810
4808
  this.offsetWid = itemsDiv.offsetWidth;
@@ -4890,6 +4888,9 @@ let Toolbar = class Toolbar extends Component {
4890
4888
  this.tempId.push(val);
4891
4889
  }
4892
4890
  }
4891
+ else {
4892
+ templateFn = compile(val);
4893
+ }
4893
4894
  }
4894
4895
  catch (e) {
4895
4896
  templateFn = compile(val);
@@ -5533,9 +5534,11 @@ let Accordion = class Accordion extends Component {
5533
5534
  if (!this.isDestroy) {
5534
5535
  this.isDestroy = false;
5535
5536
  }
5536
- if (!isNullOrUndefined(nested)) {
5537
- nested.classList.add(CLS_NEST);
5538
- this.isNested = true;
5537
+ if (nested && nested.firstElementChild && nested.firstElementChild.firstElementChild) {
5538
+ if (nested.firstElementChild.firstElementChild.classList.contains(CLS_ROOT$2)) {
5539
+ nested.classList.add(CLS_NEST);
5540
+ this.isNested = true;
5541
+ }
5539
5542
  }
5540
5543
  else {
5541
5544
  this.element.classList.add(CLS_ACRDN_ROOT);
@@ -5623,6 +5626,9 @@ let Accordion = class Accordion extends Component {
5623
5626
  if (document.querySelectorAll(template).length) {
5624
5627
  return compile(document.querySelector(template).innerHTML.trim());
5625
5628
  }
5629
+ else {
5630
+ return compile(template);
5631
+ }
5626
5632
  }
5627
5633
  catch (error) {
5628
5634
  return compile(template);
@@ -5987,6 +5993,9 @@ let Accordion = class Accordion extends Component {
5987
5993
  ele.appendChild(eleVal);
5988
5994
  eleVal.style.display = '';
5989
5995
  }
5996
+ else {
5997
+ templateFn = compile(value);
5998
+ }
5990
5999
  }
5991
6000
  catch (e) {
5992
6001
  if (typeof (value) === 'string') {
@@ -7260,11 +7269,12 @@ let Tab = class Tab extends Component {
7260
7269
  * @returns {void}
7261
7270
  */
7262
7271
  destroy() {
7263
- if (this.isReact) {
7272
+ if (this.isReact || this.isAngular) {
7264
7273
  this.clearTemplate();
7265
7274
  }
7266
7275
  if (!isNullOrUndefined(this.tbObj)) {
7267
7276
  this.tbObj.destroy();
7277
+ this.tbObj = null;
7268
7278
  }
7269
7279
  this.unWireEvents();
7270
7280
  ['role', 'aria-disabled', 'aria-activedescendant', 'tabindex', 'aria-orientation'].forEach((val) => {
@@ -7283,6 +7293,28 @@ let Tab = class Tab extends Component {
7283
7293
  cntEle.innerHTML = this.cnt;
7284
7294
  }
7285
7295
  }
7296
+ if (this.btnCls) {
7297
+ this.btnCls = null;
7298
+ }
7299
+ this.hdrEle = null;
7300
+ this.cntEle = null;
7301
+ this.tbItems = null;
7302
+ this.tbItem = null;
7303
+ this.tbPop = null;
7304
+ this.prevItem = null;
7305
+ this.popEle = null;
7306
+ this.bdrLine = null;
7307
+ this.content = null;
7308
+ this.dragItem = null;
7309
+ this.cloneElement = null;
7310
+ this.draggingItems = [];
7311
+ if (this.draggableItems && this.draggableItems.length > 0) {
7312
+ for (let i = 0; i < this.draggableItems.length; i++) {
7313
+ this.draggableItems[i].destroy();
7314
+ this.draggableItems[i] = null;
7315
+ }
7316
+ this.draggableItems = [];
7317
+ }
7286
7318
  super.destroy();
7287
7319
  this.trigger('destroyed');
7288
7320
  }
@@ -7315,6 +7347,9 @@ let Tab = class Tab extends Component {
7315
7347
  this.isSwipeed = false;
7316
7348
  this.itemIndexArray = [];
7317
7349
  this.templateEle = [];
7350
+ if (this.allowDragAndDrop) {
7351
+ this.dragArea = !isNullOrUndefined(this.dragArea) ? this.dragArea : '#' + this.element.id + ' ' + ('.' + CLS_HEADER$1);
7352
+ }
7318
7353
  if (!isNullOrUndefined(nested)) {
7319
7354
  nested.parentElement.classList.add(CLS_NEST$1);
7320
7355
  this.isNested = true;
@@ -7530,7 +7565,15 @@ let Tab = class Tab extends Component {
7530
7565
  }
7531
7566
  }
7532
7567
  parseObject(items, index) {
7533
- const tbCount = selectAll('.e-tab-header .' + CLS_TB_ITEM, this.element).length;
7568
+ const tbItems = selectAll('.e-tab-header .' + CLS_TB_ITEM, this.element);
7569
+ let maxId = this.lastIndex;
7570
+ if (!this.isReplace && tbItems.length > 0) {
7571
+ const idList = [];
7572
+ tbItems.forEach((item) => {
7573
+ idList.push(parseInt(item.id.slice(item.id.indexOf('_') + 1), 10));
7574
+ });
7575
+ maxId = Math.max(...idList);
7576
+ }
7534
7577
  const tItems = [];
7535
7578
  let txtWrapEle;
7536
7579
  const spliceArray = [];
@@ -7555,8 +7598,7 @@ let Tab = class Tab extends Component {
7555
7598
  else {
7556
7599
  itemIndex = index + i;
7557
7600
  }
7558
- const addIndex = this.isAdd ? tbCount + i : this.lastIndex + 1;
7559
- this.lastIndex = ((tbCount === 0) ? i : ((this.isReplace) ? (itemIndex) : (addIndex)));
7601
+ this.lastIndex = ((tbItems.length === 0) ? i : ((this.isReplace) ? (itemIndex) : (maxId + 1 + i)));
7560
7602
  const disabled = (item.disabled) ? ' ' + CLS_DISABLE$4 + ' ' + CLS_OVERLAY$2 : '';
7561
7603
  const hidden = (item.visible === false) ? ' ' + CLS_HIDDEN$1 : '';
7562
7604
  txtWrapEle = this.createElement('div', { className: CLS_TEXT, attrs: { 'role': 'presentation' } });
@@ -7861,7 +7903,12 @@ let Tab = class Tab extends Component {
7861
7903
  let templateFn;
7862
7904
  if (typeof val === 'string') {
7863
7905
  val = val.trim();
7864
- ele.innerHTML = SanitizeHtmlHelper.sanitize(val);
7906
+ if (this.isVue) {
7907
+ templateFn = compile(SanitizeHtmlHelper.sanitize(val));
7908
+ }
7909
+ else {
7910
+ ele.innerHTML = SanitizeHtmlHelper.sanitize(val);
7911
+ }
7865
7912
  }
7866
7913
  else {
7867
7914
  templateFn = compile(val);
@@ -8277,6 +8324,7 @@ let Tab = class Tab extends Component {
8277
8324
  }
8278
8325
  if (!isNullOrUndefined(this.cntEle) && !isNullOrUndefined(this.touchModule)) {
8279
8326
  this.touchModule.destroy();
8327
+ this.touchModule = null;
8280
8328
  }
8281
8329
  window.removeEventListener('resize', this.resizeContext);
8282
8330
  EventHandler.remove(this.element, 'mouseover', this.hoverHandler);
@@ -8306,8 +8354,13 @@ let Tab = class Tab extends Component {
8306
8354
  if (e.velocity < 3 && isNullOrUndefined(e.originalEvent.changedTouches)) {
8307
8355
  return;
8308
8356
  }
8309
- if (e.originalEvent && this.isNested) {
8310
- e.originalEvent.stopPropagation();
8357
+ if (this.isNested) {
8358
+ this.element.setAttribute('data-swipe', 'true');
8359
+ }
8360
+ const nestedTab = this.element.querySelector('[data-swipe="true"]');
8361
+ if (nestedTab) {
8362
+ nestedTab.removeAttribute('data-swipe');
8363
+ return;
8311
8364
  }
8312
8365
  this.isSwipeed = true;
8313
8366
  if (e.swipeDirection === 'Right' && this.selectedItem !== 0) {
@@ -8528,7 +8581,7 @@ let Tab = class Tab extends Component {
8528
8581
  this.reRenderItems();
8529
8582
  }
8530
8583
  else {
8531
- if (this.isRect) {
8584
+ if (this.isReact || this.isAngular) {
8532
8585
  this.clearTemplate();
8533
8586
  }
8534
8587
  this.setItems(newProp.items);
@@ -8541,11 +8594,12 @@ let Tab = class Tab extends Component {
8541
8594
  detach(selectElement.firstElementChild);
8542
8595
  }
8543
8596
  this.select(this.selectedItem);
8597
+ this.draggableItems = [];
8598
+ this.bindDraggable();
8544
8599
  }
8545
8600
  }
8546
8601
  }
8547
8602
  initializeDrag(target) {
8548
- this.dragArea = !isNullOrUndefined(this.dragArea) ? this.dragArea : '#' + this.element.id + ' ' + ('.' + CLS_HEADER$1);
8549
8603
  let dragObj = new Draggable(target, {
8550
8604
  dragArea: this.dragArea,
8551
8605
  dragTarget: '.' + CLS_TB_ITEM,
@@ -8721,6 +8775,7 @@ let Tab = class Tab extends Component {
8721
8775
  }
8722
8776
  itemDragStop(e) {
8723
8777
  detach(this.cloneElement);
8778
+ this.cloneElement = null;
8724
8779
  this.dragItem.querySelector('.' + CLS_WRAP).style.visibility = 'visible';
8725
8780
  document.body.style.cursor = '';
8726
8781
  let dragStopArgs = {
@@ -8749,6 +8804,7 @@ let Tab = class Tab extends Component {
8749
8804
  }
8750
8805
  }
8751
8806
  });
8807
+ this.dragItem = null;
8752
8808
  }
8753
8809
  /**
8754
8810
  * Enables or disables the specified Tab item. On passing value as `false`, the item will be disabled.
@@ -8890,12 +8946,25 @@ let Tab = class Tab extends Component {
8890
8946
  detach(cntTrg);
8891
8947
  }
8892
8948
  this.trigger('removed', tabRemovingArgs);
8949
+ if (this.draggableItems && this.draggableItems.length > 0) {
8950
+ this.draggableItems[index].destroy();
8951
+ this.draggableItems[index] = null;
8952
+ this.draggableItems.splice(index, 1);
8953
+ }
8893
8954
  if (trg.classList.contains(CLS_ACTIVE$1)) {
8894
8955
  index = (index > selectAll('.' + CLS_TB_ITEM + ':not(.' + CLS_TB_POPUP + ')', this.element).length - 1) ? index - 1 : index;
8895
8956
  this.enableAnimation = false;
8896
8957
  this.selectedItem = index;
8897
8958
  this.select(index);
8898
8959
  }
8960
+ else if (index !== this.selectedItem) {
8961
+ if (index < this.selectedItem) {
8962
+ index = this.itemIndexArray.indexOf(this.tbItem[this.selectedItem].id);
8963
+ this.setProperties({ selectedItem: index > -1 ? index : this.selectedItem }, true);
8964
+ this.prevIndex = this.selectedItem;
8965
+ }
8966
+ this.tbItem = selectAll('.' + CLS_TB_ITEM, this.getTabHeader());
8967
+ }
8899
8968
  if (selectAll('.' + CLS_TB_ITEM, this.element).length === 0) {
8900
8969
  this.hdrEle.style.display = 'none';
8901
8970
  }
@@ -9044,6 +9113,7 @@ let Tab = class Tab extends Component {
9044
9113
  }
9045
9114
  if (this.tbItem.length > args && args >= 0 && !isNaN(args)) {
9046
9115
  this.prevIndex = this.selectedItem;
9116
+ this.prevItem = this.tbItem[this.prevIndex];
9047
9117
  if (this.tbItem[args].classList.contains(CLS_TB_POPUP) && this.reorderActiveTab) {
9048
9118
  this.setActive(this.popupHandler(this.tbItem[args]), null, isInteracted);
9049
9119
  if ((!isNullOrUndefined(this.items) && this.items.length > 0) && this.allowDragAndDrop) {
@@ -9734,6 +9804,9 @@ let TreeView = TreeView_1 = class TreeView extends Component {
9734
9804
  if (document.querySelectorAll(template).length) {
9735
9805
  return compile(document.querySelector(template).innerHTML.trim());
9736
9806
  }
9807
+ else {
9808
+ return compile(template);
9809
+ }
9737
9810
  }
9738
9811
  catch (e) {
9739
9812
  return compile(template);
@@ -12004,7 +12077,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
12004
12077
  return { cancel: false, isInteracted: isNullOrUndefined(e) ? false : true, node: currLi, nodeData: nodeData, event: e };
12005
12078
  }
12006
12079
  renderNodeTemplate(data, textEle, dataId) {
12007
- let tempArr = this.nodeTemplateFn(data, this, 'nodeTemplate' + dataId, this.element.id + 'nodeTemplate', this.isStringTemplate, undefined, textEle);
12080
+ let tempArr = this.nodeTemplateFn(data, this, 'nodeTemplate' + dataId, this.element.id + 'nodeTemplate', this.isStringTemplate, undefined, textEle, this.root);
12008
12081
  if (tempArr) {
12009
12082
  tempArr = Array.prototype.slice.call(tempArr);
12010
12083
  append(tempArr, textEle);
@@ -15409,6 +15482,12 @@ let Breadcrumb = class Breadcrumb extends Component {
15409
15482
  }
15410
15483
  if (!(this.overflowMode === 'Menu' && liElems[i].classList.contains(MENUCLASS))) {
15411
15484
  liWidth += liElems[i].offsetWidth;
15485
+ if (liWidth > width) {
15486
+ maxItems = Math.ceil((i) / 2) + (this.overflowMode === 'Menu' && i <= 2 ? 0 : 1);
15487
+ this._maxItems = maxItems;
15488
+ this.initPvtProps();
15489
+ return this.reRenderItems();
15490
+ }
15412
15491
  }
15413
15492
  }
15414
15493
  }
@@ -15776,9 +15855,955 @@ Breadcrumb = __decorate$10([
15776
15855
  * Breadcrumb modules
15777
15856
  */
15778
15857
 
15858
+ var __decorate$11 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
15859
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
15860
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
15861
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
15862
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
15863
+ };
15864
+ /* eslint-disable @typescript-eslint/no-explicit-any */
15865
+ // Constant variables
15866
+ const CLS_CAROUSEL = 'e-carousel';
15867
+ const CLS_ACTIVE$2 = 'e-active';
15868
+ const CLS_RTL$5 = 'e-rtl';
15869
+ const CLS_ITEMS$2 = 'e-carousel-items';
15870
+ const CLS_ITEM$3 = 'e-carousel-item';
15871
+ const CLS_PREVIOUS = 'e-previous';
15872
+ const CLS_NEXT = 'e-next';
15873
+ const CLS_PREV_ICON = 'e-previous-icon';
15874
+ const CLS_NEXT_ICON = 'e-next-icon';
15875
+ const CLS_NAVIGATORS = 'e-carousel-navigators';
15876
+ const CLS_INDICATORS = 'e-carousel-indicators';
15877
+ const CLS_INDICATOR_BARS = 'e-indicator-bars';
15878
+ const CLS_INDICATOR_BAR = 'e-indicator-bar';
15879
+ const CLS_INDICATOR$1 = 'e-indicator';
15880
+ const CLS_ICON$1 = 'e-icons';
15881
+ const CLS_PLAY_PAUSE = 'e-play-pause';
15882
+ const CLS_PLAY_ICON = 'e-play-icon';
15883
+ const CLS_PAUSE_ICON = 'e-pause-icon';
15884
+ const CLS_PREV_BUTTON = 'e-previous-button';
15885
+ const CLS_NEXT_BUTTON = 'e-next-button';
15886
+ const CLS_PLAY_BUTTON = 'e-play-button';
15887
+ const CLS_FLAT = 'e-flat';
15888
+ const CLS_ROUND = 'e-round';
15889
+ const CLS_HOVER_ARROWS = 'e-hover-arrows';
15890
+ const CLS_HOVER = 'e-carousel-hover';
15891
+ const CLS_TEMPLATE$2 = 'e-template';
15892
+ const CLS_SLIDE_ANIMATION = 'e-carousel-slide-animation';
15893
+ const CLS_FADE_ANIMATION = 'e-carousel-fade-animation';
15894
+ const CLS_PREV_SLIDE = 'e-prev';
15895
+ const CLS_NEXT_SLIDE = 'e-next';
15896
+ const CLS_TRANSITION_START = 'e-transition-start';
15897
+ const CLS_TRANSITION_END = 'e-transition-end';
15898
+ /** Specifies the carousel individual item. */
15899
+ class CarouselItem extends ChildProperty {
15900
+ }
15901
+ __decorate$11([
15902
+ Property()
15903
+ ], CarouselItem.prototype, "cssClass", void 0);
15904
+ __decorate$11([
15905
+ Property()
15906
+ ], CarouselItem.prototype, "interval", void 0);
15907
+ __decorate$11([
15908
+ Property()
15909
+ ], CarouselItem.prototype, "template", void 0);
15910
+ __decorate$11([
15911
+ Property()
15912
+ ], CarouselItem.prototype, "htmlAttributes", void 0);
15913
+ /** Specifies the animation configuration for carousel items. */
15914
+ class CarouselAnimationSettings extends ChildProperty {
15915
+ }
15916
+ __decorate$11([
15917
+ Property('Slide')
15918
+ ], CarouselAnimationSettings.prototype, "effect", void 0);
15919
+ __decorate$11([
15920
+ Property()
15921
+ ], CarouselAnimationSettings.prototype, "customEffect", void 0);
15922
+ let Carousel = class Carousel extends Component {
15923
+ /**
15924
+ * Constructor for creating the Carousel widget
15925
+ *
15926
+ * @param {CarouselModel} options Accepts the carousel model properties to initiate the rendering
15927
+ * @param {string | HTMLElement} element Accepts the DOM element reference
15928
+ */
15929
+ constructor(options, element) {
15930
+ super(options, element);
15931
+ }
15932
+ getModuleName() {
15933
+ return CLS_CAROUSEL.replace('e-', '');
15934
+ }
15935
+ getPersistData() {
15936
+ return this.addOnPersist(['selectedIndex']);
15937
+ }
15938
+ preRender() {
15939
+ this.keyConfigs = {
15940
+ home: 'home',
15941
+ end: 'end',
15942
+ space: 'space',
15943
+ moveLeft: 'leftarrow',
15944
+ moveRight: 'rightarrow',
15945
+ moveUp: 'uparrow',
15946
+ moveDown: 'downarrow'
15947
+ };
15948
+ const defaultLocale = {
15949
+ nextSlide: 'Next slide',
15950
+ of: 'of',
15951
+ pauseSlideTransition: 'Pause slide transition',
15952
+ playSlideTransition: 'Play slide transition',
15953
+ previousSlide: 'Previous slide',
15954
+ slide: 'Slide',
15955
+ slideShow: 'Slide show'
15956
+ };
15957
+ this.localeObj = new L10n(this.getModuleName(), defaultLocale, this.locale);
15958
+ }
15959
+ render() {
15960
+ this.initialize();
15961
+ this.renderSlides();
15962
+ this.renderNavigators();
15963
+ this.renderPlayButton();
15964
+ this.renderIndicators();
15965
+ this.applyAnimation();
15966
+ this.wireEvents();
15967
+ }
15968
+ onPropertyChanged(newProp, oldProp) {
15969
+ let target;
15970
+ for (const prop of Object.keys(newProp)) {
15971
+ switch (prop) {
15972
+ case 'animation':
15973
+ for (const propName of Object.keys(newProp.animation)) {
15974
+ if (propName === 'customEffect' && !isNullOrUndefined(oldProp.animation.customEffect)) {
15975
+ removeClass([this.element.querySelector(`.${CLS_ITEMS$2}`)], oldProp.animation.customEffect);
15976
+ }
15977
+ }
15978
+ this.applyAnimation();
15979
+ break;
15980
+ case 'cssClass':
15981
+ classList(this.element, [newProp.cssClass], [oldProp.cssClass]);
15982
+ break;
15983
+ case 'selectedIndex':
15984
+ this.setActiveSlide(this.selectedIndex, oldProp.selectedIndex > this.selectedIndex ? 'Previous' : 'Next');
15985
+ this.autoSlide();
15986
+ break;
15987
+ case 'htmlAttributes':
15988
+ if (!isNullOrUndefined(this.htmlAttributes)) {
15989
+ this.setHtmlAttributes(this.htmlAttributes, this.element);
15990
+ }
15991
+ break;
15992
+ case 'enableTouchSwipe':
15993
+ if (!this.enableTouchSwipe && this.touchModule) {
15994
+ this.touchModule.destroy();
15995
+ }
15996
+ if (this.element.querySelector(`.${CLS_ITEMS$2}`)) {
15997
+ this.renderTouchActions();
15998
+ }
15999
+ break;
16000
+ case 'loop':
16001
+ if (this.loop && isNullOrUndefined(this.autoSlideInterval)) {
16002
+ this.applySlideInterval();
16003
+ }
16004
+ this.handleNavigatorsActions(this.selectedIndex);
16005
+ break;
16006
+ case 'enableRtl':
16007
+ if (this.enableRtl) {
16008
+ addClass([this.element], CLS_RTL$5);
16009
+ }
16010
+ else {
16011
+ removeClass([this.element], CLS_RTL$5);
16012
+ }
16013
+ break;
16014
+ case 'buttonsVisibility':
16015
+ target = this.element.querySelector(`.${CLS_NAVIGATORS}`);
16016
+ if (target) {
16017
+ switch (this.buttonsVisibility) {
16018
+ case 'Hidden':
16019
+ this.resetTemplates(['previousButtonTemplate', 'nextButtonTemplate']);
16020
+ remove(target);
16021
+ break;
16022
+ case 'VisibleOnHover':
16023
+ addClass([].slice.call(target.childNodes), CLS_HOVER_ARROWS);
16024
+ break;
16025
+ case 'Visible':
16026
+ removeClass([].slice.call(target.childNodes), CLS_HOVER_ARROWS);
16027
+ break;
16028
+ }
16029
+ }
16030
+ else {
16031
+ this.renderNavigators();
16032
+ this.renderPlayButton();
16033
+ }
16034
+ break;
16035
+ case 'width':
16036
+ setStyleAttribute(this.element, { 'width': formatUnit(this.width) });
16037
+ break;
16038
+ case 'height':
16039
+ setStyleAttribute(this.element, { 'height': formatUnit(this.height) });
16040
+ break;
16041
+ case 'autoPlay':
16042
+ if (this.showPlayButton && isNullOrUndefined(this.playButtonTemplate)) {
16043
+ this.playButtonClickHandler(null, true);
16044
+ }
16045
+ this.autoSlide();
16046
+ break;
16047
+ case 'interval':
16048
+ this.autoSlide();
16049
+ break;
16050
+ case 'showIndicators':
16051
+ target = this.element.querySelector(`.${CLS_INDICATORS}`);
16052
+ if (!this.showIndicators && target) {
16053
+ this.resetTemplates(['indicatorsTemplate']);
16054
+ remove(target);
16055
+ }
16056
+ this.renderIndicators();
16057
+ break;
16058
+ case 'showPlayButton':
16059
+ target = this.element.querySelector(`.${CLS_PLAY_PAUSE}`);
16060
+ if (!this.showPlayButton && target) {
16061
+ remove(target);
16062
+ this.resetTemplates(['playButtonTemplate']);
16063
+ }
16064
+ this.renderPlayButton();
16065
+ break;
16066
+ case 'items':
16067
+ case 'dataSource':
16068
+ target = this.element.querySelector(`.${CLS_ITEMS$2}`);
16069
+ if (target) {
16070
+ this.resetTemplates(['itemTemplate']);
16071
+ remove(target);
16072
+ }
16073
+ this.renderSlides();
16074
+ break;
16075
+ }
16076
+ }
16077
+ }
16078
+ initialize() {
16079
+ const carouselClasses = [];
16080
+ if (this.cssClass) {
16081
+ carouselClasses.push(this.cssClass);
16082
+ }
16083
+ if (this.enableRtl) {
16084
+ carouselClasses.push(CLS_RTL$5);
16085
+ }
16086
+ addClass([this.element], carouselClasses);
16087
+ setStyleAttribute(this.element, { 'width': formatUnit(this.width), 'height': formatUnit(this.height) });
16088
+ attributes(this.element, { 'tabindex': '0', 'aria-roledescription': 'carousel', 'aria-label': this.localeObj.getConstant('slideShow') });
16089
+ if (!isNullOrUndefined(this.htmlAttributes)) {
16090
+ this.setHtmlAttributes(this.htmlAttributes, this.element);
16091
+ }
16092
+ }
16093
+ renderSlides() {
16094
+ const itemsContainer = this.createElement('div', { className: CLS_ITEMS$2, attrs: { 'aria-live': this.autoPlay ? 'off' : 'polite' } });
16095
+ this.element.appendChild(itemsContainer);
16096
+ if (this.items.length > 0) {
16097
+ this.slideItems = this.items;
16098
+ this.items.forEach((item, index) => {
16099
+ this.renderSlide(item, item.template, index, itemsContainer);
16100
+ });
16101
+ }
16102
+ else if (this.dataSource.length > 0) {
16103
+ this.slideItems = this.dataSource;
16104
+ this.dataSource.forEach((item, index) => {
16105
+ this.renderSlide(item, this.itemTemplate, index, itemsContainer);
16106
+ });
16107
+ }
16108
+ this.renderTemplates();
16109
+ this.autoSlide();
16110
+ this.renderTouchActions();
16111
+ this.renderKeyboardActions();
16112
+ }
16113
+ renderSlide(item, itemTemplate, index, container) {
16114
+ const itemEle = this.createElement('div', {
16115
+ id: getUniqueID('carousel_item'),
16116
+ className: `${CLS_ITEM$3} ${item.cssClass ? item.cssClass : ''} ${this.selectedIndex === index ? CLS_ACTIVE$2 : ''}`,
16117
+ attrs: {
16118
+ 'aria-hidden': this.selectedIndex === index ? 'false' : 'true', 'data-index': index.toString(),
16119
+ 'aria-role': 'group', 'aria-roledescription': 'slide'
16120
+ }
16121
+ });
16122
+ if (!isNullOrUndefined(item.htmlAttributes)) {
16123
+ this.setHtmlAttributes(item.htmlAttributes, itemEle);
16124
+ }
16125
+ const templateId = this.element.id + '_template';
16126
+ const template = this.templateParser(itemTemplate)(item, this, 'itemTemplate', templateId, false);
16127
+ append(template, itemEle);
16128
+ container.appendChild(itemEle);
16129
+ }
16130
+ renderNavigators() {
16131
+ if (this.buttonsVisibility === 'Hidden') {
16132
+ return;
16133
+ }
16134
+ const navigators = this.createElement('div', { className: CLS_NAVIGATORS });
16135
+ const itemsContainer = this.element.querySelector(`.${CLS_ITEMS$2}`);
16136
+ itemsContainer.insertAdjacentElement('afterend', navigators);
16137
+ this.renderNavigatorButton('Previous');
16138
+ this.renderNavigatorButton('Next');
16139
+ this.renderTemplates();
16140
+ }
16141
+ renderNavigatorButton(direction) {
16142
+ const buttonContainer = this.createElement('div', {
16143
+ className: (direction === 'Previous' ? CLS_PREVIOUS : CLS_NEXT) + ' ' + (this.buttonsVisibility === 'VisibleOnHover' ? CLS_HOVER_ARROWS : ''),
16144
+ attrs: { 'aria-label': this.localeObj.getConstant(direction === 'Previous' ? 'previousSlide' : 'nextSlide') }
16145
+ });
16146
+ if (direction === 'Previous' && this.previousButtonTemplate) {
16147
+ addClass([buttonContainer], CLS_TEMPLATE$2);
16148
+ const templateId = this.element.id + '_previousButtonTemplate';
16149
+ const template = this.templateParser(this.previousButtonTemplate)({ type: 'Previous' }, this, 'previousButtonTemplate', templateId, false);
16150
+ append(template, buttonContainer);
16151
+ }
16152
+ else if (direction === 'Next' && this.nextButtonTemplate) {
16153
+ addClass([buttonContainer], CLS_TEMPLATE$2);
16154
+ const templateId = this.element.id + '_nextButtonTemplate';
16155
+ const template = this.templateParser(this.nextButtonTemplate)({ type: 'Next' }, this, 'nextButtonTemplate', templateId, false);
16156
+ append(template, buttonContainer);
16157
+ }
16158
+ else {
16159
+ const button = this.createElement('button');
16160
+ const buttonObj = new Button({
16161
+ cssClass: CLS_FLAT + ' ' + CLS_ROUND + ' ' + (direction === 'Previous' ? CLS_PREV_BUTTON : CLS_NEXT_BUTTON),
16162
+ iconCss: CLS_ICON$1 + ' ' + (direction === 'Previous' ? CLS_PREV_ICON : CLS_NEXT_ICON),
16163
+ enableRtl: this.enableRtl,
16164
+ disabled: !this.loop && this.selectedIndex === (direction === 'Previous' ? 0 : this.slideItems.length - 1)
16165
+ });
16166
+ buttonObj.appendTo(button);
16167
+ buttonContainer.appendChild(button);
16168
+ }
16169
+ this.element.querySelector('.' + CLS_NAVIGATORS).appendChild(buttonContainer);
16170
+ EventHandler.add(buttonContainer, 'click', this.navigatorClickHandler, this);
16171
+ }
16172
+ renderPlayButton() {
16173
+ if (this.buttonsVisibility === 'Hidden' || !this.showPlayButton) {
16174
+ return;
16175
+ }
16176
+ const playPauseWrap = this.createElement('div', {
16177
+ className: CLS_PLAY_PAUSE + ' ' + (this.buttonsVisibility === 'VisibleOnHover' ? CLS_HOVER_ARROWS : '')
16178
+ });
16179
+ if (this.playButtonTemplate) {
16180
+ addClass([playPauseWrap], CLS_TEMPLATE$2);
16181
+ const templateId = this.element.id + '_playButtonTemplate';
16182
+ const template = this.templateParser(this.playButtonTemplate)({}, this, 'playButtonTemplate', templateId, false);
16183
+ append(template, playPauseWrap);
16184
+ }
16185
+ else {
16186
+ const playButton = this.createElement('button', {
16187
+ attrs: { 'aria-label': this.localeObj.getConstant(this.autoPlay ? 'pauseSlideTransition' : 'playSlideTransition') }
16188
+ });
16189
+ const isLastSlide = this.selectedIndex === this.slideItems.length - 1 && !this.loop;
16190
+ const buttonObj = new Button({
16191
+ cssClass: CLS_FLAT + ' ' + CLS_ROUND + ' ' + CLS_PLAY_BUTTON,
16192
+ iconCss: CLS_ICON$1 + ' ' + (this.autoPlay && !isLastSlide ? CLS_PAUSE_ICON : CLS_PLAY_ICON),
16193
+ isToggle: true,
16194
+ enableRtl: this.enableRtl
16195
+ });
16196
+ if (isLastSlide) {
16197
+ this.setProperties({ autoPlay: false }, true);
16198
+ playButton.setAttribute('aria-label', this.localeObj.getConstant('playSlideTransition'));
16199
+ const itemsContainer = this.element.querySelector(`.${CLS_ITEMS$2}`);
16200
+ itemsContainer.setAttribute('aria-live', 'polite');
16201
+ }
16202
+ buttonObj.appendTo(playButton);
16203
+ playPauseWrap.appendChild(playButton);
16204
+ }
16205
+ const navigators = this.element.querySelector(`.${CLS_NAVIGATORS}`);
16206
+ navigators.insertBefore(playPauseWrap, navigators.lastElementChild);
16207
+ this.renderTemplates();
16208
+ EventHandler.add(playPauseWrap, 'click', this.playButtonClickHandler, this);
16209
+ }
16210
+ renderIndicators() {
16211
+ if (!this.showIndicators) {
16212
+ return;
16213
+ }
16214
+ const indicatorWrap = this.createElement('div', { className: CLS_INDICATORS });
16215
+ const indicatorBars = this.createElement('div', { className: CLS_INDICATOR_BARS });
16216
+ indicatorWrap.appendChild(indicatorBars);
16217
+ if (this.slideItems) {
16218
+ this.slideItems.forEach((item, index) => {
16219
+ const indicatorBar = this.createElement('div', {
16220
+ className: CLS_INDICATOR_BAR + ' ' + (this.selectedIndex === index ? CLS_ACTIVE$2 : ''),
16221
+ attrs: { 'data-index': index.toString(), 'aria-current': this.selectedIndex === index ? 'true' : 'false' }
16222
+ });
16223
+ if (this.indicatorsTemplate) {
16224
+ addClass([indicatorBar], CLS_TEMPLATE$2);
16225
+ const templateId = this.element.id + '_indicatorsTemplate';
16226
+ const template = this.templateParser(this.indicatorsTemplate)({ index: index, selectedIndex: this.selectedIndex }, this, 'indicatorsTemplate', templateId, false);
16227
+ append(template, indicatorBar);
16228
+ }
16229
+ else {
16230
+ const indicator = this.createElement('button', { className: CLS_INDICATOR$1 });
16231
+ indicatorBar.appendChild(indicator);
16232
+ indicator.appendChild(this.createElement('div', {
16233
+ attrs: {
16234
+ 'aria-label': this.localeObj.getConstant('slide') + ' ' + (index + 1) + ' ' + this.localeObj.getConstant('of') + ' ' + this.slideItems.length
16235
+ }
16236
+ }));
16237
+ const buttonObj = new Button({ cssClass: 'e-flat e-small' });
16238
+ buttonObj.appendTo(indicator);
16239
+ }
16240
+ indicatorBars.appendChild(indicatorBar);
16241
+ EventHandler.add(indicatorBar, 'click', this.indicatorClickHandler, this);
16242
+ });
16243
+ }
16244
+ this.element.appendChild(indicatorWrap);
16245
+ }
16246
+ renderKeyboardActions() {
16247
+ this.keyModule = new KeyboardEvents(this.element, { keyAction: this.keyHandler.bind(this), keyConfigs: this.keyConfigs });
16248
+ }
16249
+ renderTouchActions() {
16250
+ if (!this.enableTouchSwipe) {
16251
+ return;
16252
+ }
16253
+ this.touchModule = new Touch(this.element, { swipe: this.swipeHandler.bind(this) });
16254
+ }
16255
+ applyAnimation() {
16256
+ const animationTarget = this.element.querySelector(`.${CLS_ITEMS$2}`);
16257
+ removeClass([animationTarget], [CLS_FADE_ANIMATION, CLS_SLIDE_ANIMATION]);
16258
+ if (this.animation.customEffect) {
16259
+ addClass([animationTarget], this.animation.customEffect);
16260
+ }
16261
+ else if (this.animation.effect !== 'None') {
16262
+ const animationClass = this.animation.effect === 'Fade' ? CLS_FADE_ANIMATION : CLS_SLIDE_ANIMATION;
16263
+ addClass([animationTarget], animationClass);
16264
+ }
16265
+ }
16266
+ autoSlide() {
16267
+ this.resetSlideInterval();
16268
+ this.applySlideInterval();
16269
+ }
16270
+ autoSlideChange() {
16271
+ const activeSlide = this.element.querySelector(`.${CLS_ACTIVE$2}`);
16272
+ if (isNullOrUndefined(activeSlide)) {
16273
+ return;
16274
+ }
16275
+ const activeIndex = parseInt(activeSlide.dataset.index, 10);
16276
+ if (!this.loop && activeIndex === this.slideItems.length - 1) {
16277
+ this.resetSlideInterval();
16278
+ }
16279
+ else {
16280
+ const index = (activeIndex + 1) % this.slideItems.length;
16281
+ if (!this.element.classList.contains(CLS_HOVER)) {
16282
+ this.setActiveSlide(index, 'Next');
16283
+ }
16284
+ this.autoSlide();
16285
+ }
16286
+ }
16287
+ applySlideInterval() {
16288
+ if (!this.autoPlay || this.element.classList.contains(CLS_HOVER)) {
16289
+ return;
16290
+ }
16291
+ let itemInterval = this.interval;
16292
+ if (this.items.length > 0 && !isNullOrUndefined(this.items[this.selectedIndex].interval)) {
16293
+ itemInterval = this.items[this.selectedIndex].interval;
16294
+ }
16295
+ this.autoSlideInterval = setInterval(() => this.autoSlideChange(), itemInterval);
16296
+ }
16297
+ resetSlideInterval() {
16298
+ clearInterval(this.autoSlideInterval);
16299
+ this.autoSlideInterval = null;
16300
+ }
16301
+ getSlideIndex(direction) {
16302
+ let currentIndex = this.selectedIndex;
16303
+ if (direction === 'Previous') {
16304
+ currentIndex--;
16305
+ if (currentIndex < 0) {
16306
+ currentIndex = this.slideItems.length - 1;
16307
+ }
16308
+ }
16309
+ else {
16310
+ currentIndex++;
16311
+ if (currentIndex === this.slideItems.length) {
16312
+ currentIndex = 0;
16313
+ }
16314
+ }
16315
+ return currentIndex;
16316
+ }
16317
+ setActiveSlide(currentIndex, direction, isSwiped = false) {
16318
+ if (this.element.querySelectorAll(`.${CLS_ITEM$3}.${CLS_PREV_SLIDE},.${CLS_ITEM$3}.${CLS_NEXT_SLIDE}`).length > 0) {
16319
+ return;
16320
+ }
16321
+ const allSlides = [].slice.call(this.element.querySelectorAll(`.${CLS_ITEM$3}`));
16322
+ const activeSlide = this.element.querySelector(`.${CLS_ITEM$3}.${CLS_ACTIVE$2}`);
16323
+ if (isNullOrUndefined(activeSlide) && this.showIndicators) {
16324
+ const activeIndicator = this.element.querySelector(`.${CLS_INDICATOR_BAR}.${CLS_ACTIVE$2}`);
16325
+ const activeIndex = parseInt(activeIndicator.dataset.index, 10);
16326
+ addClass([allSlides[activeIndex]], CLS_ACTIVE$2);
16327
+ return;
16328
+ }
16329
+ else if (isNullOrUndefined(activeSlide)) {
16330
+ addClass([allSlides[currentIndex]], CLS_ACTIVE$2);
16331
+ return;
16332
+ }
16333
+ const activeIndex = parseInt(activeSlide.dataset.index, 10);
16334
+ const currentSlide = allSlides[currentIndex];
16335
+ const eventArgs = {
16336
+ currentIndex: activeIndex,
16337
+ nextIndex: currentIndex,
16338
+ currentSlide: activeSlide,
16339
+ nextSlide: currentSlide,
16340
+ slideDirection: direction,
16341
+ isSwiped: isSwiped,
16342
+ cancel: false
16343
+ };
16344
+ this.trigger('slideChanging', eventArgs, (args) => {
16345
+ if (args.cancel) {
16346
+ return;
16347
+ }
16348
+ this.setProperties({ selectedIndex: currentIndex }, true);
16349
+ attributes(args.currentSlide, { 'aria-hidden': 'true' });
16350
+ attributes(args.nextSlide, { 'aria-hidden': 'false' });
16351
+ const slideIndicators = [].slice.call(this.element.querySelectorAll(`.${CLS_INDICATOR_BAR}`));
16352
+ if (slideIndicators.length > 0) {
16353
+ attributes(slideIndicators[activeIndex], { 'aria-current': 'false' });
16354
+ attributes(slideIndicators[currentIndex], { 'aria-current': 'true' });
16355
+ removeClass(slideIndicators, CLS_ACTIVE$2);
16356
+ addClass([slideIndicators[currentIndex]], CLS_ACTIVE$2);
16357
+ }
16358
+ this.slideChangedEventArgs = {
16359
+ currentIndex: args.nextIndex,
16360
+ previousIndex: args.currentIndex,
16361
+ currentSlide: args.nextSlide,
16362
+ previousSlide: args.currentSlide,
16363
+ slideDirection: direction,
16364
+ isSwiped: isSwiped
16365
+ };
16366
+ let slideHeight;
16367
+ if (this.animation.effect === 'None' || this.animation.customEffect) {
16368
+ this.onTransitionEnd();
16369
+ }
16370
+ else if (this.animation.effect === 'Slide') {
16371
+ if (direction === 'Previous') {
16372
+ addClass([args.nextSlide], CLS_PREV_SLIDE);
16373
+ slideHeight = args.nextSlide.offsetHeight;
16374
+ addClass([args.currentSlide, args.nextSlide], CLS_TRANSITION_END);
16375
+ }
16376
+ else {
16377
+ addClass([args.nextSlide], CLS_NEXT_SLIDE);
16378
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
16379
+ slideHeight = args.nextSlide.offsetHeight;
16380
+ addClass([args.currentSlide, args.nextSlide], CLS_TRANSITION_START);
16381
+ }
16382
+ }
16383
+ else if (this.animation.effect === 'Fade') {
16384
+ removeClass([args.currentSlide], CLS_ACTIVE$2);
16385
+ addClass([args.nextSlide], CLS_ACTIVE$2);
16386
+ }
16387
+ this.handleNavigatorsActions(currentIndex);
16388
+ });
16389
+ }
16390
+ onTransitionEnd() {
16391
+ if (this.slideChangedEventArgs) {
16392
+ addClass([this.slideChangedEventArgs.currentSlide], CLS_ACTIVE$2);
16393
+ removeClass([this.slideChangedEventArgs.previousSlide], CLS_ACTIVE$2);
16394
+ this.trigger('slideChanged', this.slideChangedEventArgs, () => {
16395
+ removeClass(this.element.querySelectorAll(`.${CLS_ITEM$3}`), [CLS_PREV_SLIDE, CLS_NEXT_SLIDE, CLS_TRANSITION_START, CLS_TRANSITION_END]);
16396
+ this.slideChangedEventArgs = null;
16397
+ });
16398
+ }
16399
+ }
16400
+ setHtmlAttributes(attribute, element) {
16401
+ const keys = Object.keys(attribute);
16402
+ for (const key of keys) {
16403
+ if (key === 'class') {
16404
+ addClass([element], attribute[key]);
16405
+ }
16406
+ else {
16407
+ element.setAttribute(key, attribute[key]);
16408
+ }
16409
+ }
16410
+ }
16411
+ templateParser(template) {
16412
+ if (template) {
16413
+ try {
16414
+ if (document.querySelectorAll(template).length) {
16415
+ return compile(document.querySelector(template).innerHTML.trim());
16416
+ }
16417
+ else {
16418
+ return compile(template);
16419
+ }
16420
+ }
16421
+ catch (error) {
16422
+ return compile(template);
16423
+ }
16424
+ }
16425
+ return undefined;
16426
+ }
16427
+ getNavigatorState(target, isPrevious) {
16428
+ const button = target.querySelector(`.${isPrevious ? CLS_PREV_BUTTON : CLS_NEXT_BUTTON}`);
16429
+ if (button) {
16430
+ const buttonObj = getInstance(button, Button);
16431
+ return buttonObj.disabled;
16432
+ }
16433
+ return false;
16434
+ }
16435
+ navigatorClickHandler(e) {
16436
+ const target = e.currentTarget;
16437
+ const isDisabled = this.getNavigatorState(target, target.classList.contains(CLS_PREVIOUS));
16438
+ if (isDisabled) {
16439
+ return;
16440
+ }
16441
+ const direction = target.classList.contains(CLS_PREVIOUS) ? 'Previous' : 'Next';
16442
+ this.setActiveSlide(this.getSlideIndex(direction), direction);
16443
+ this.autoSlide();
16444
+ }
16445
+ indicatorClickHandler(e) {
16446
+ const target = closest(e.target, `.${CLS_INDICATOR_BAR}`);
16447
+ const index = parseInt(target.dataset.index, 10);
16448
+ if (this.selectedIndex !== index) {
16449
+ this.setActiveSlide(index, this.selectedIndex > index ? 'Previous' : 'Next');
16450
+ this.autoSlide();
16451
+ }
16452
+ }
16453
+ playButtonClickHandler(e, isPropertyChange = false) {
16454
+ const playButton = this.element.querySelector(`.${CLS_PLAY_BUTTON}`);
16455
+ if (playButton) {
16456
+ const buttonObj = getInstance(playButton, Button);
16457
+ if (!isPropertyChange) {
16458
+ this.setProperties({ autoPlay: !this.autoPlay }, true);
16459
+ }
16460
+ playButton.setAttribute('aria-label', this.localeObj.getConstant(this.autoPlay ? 'pauseSlideTransition' : 'playSlideTransition'));
16461
+ buttonObj.iconCss = CLS_ICON$1 + ' ' + (this.autoPlay ? CLS_PAUSE_ICON : CLS_PLAY_ICON);
16462
+ buttonObj.dataBind();
16463
+ const itemsContainer = this.element.querySelector(`.${CLS_ITEMS$2}`);
16464
+ itemsContainer.setAttribute('aria-live', this.autoPlay ? 'off' : 'polite');
16465
+ if (this.autoPlay && !this.loop && this.selectedIndex === this.slideItems.length - 1) {
16466
+ this.setActiveSlide(0, 'Next');
16467
+ }
16468
+ this.autoSlide();
16469
+ }
16470
+ }
16471
+ keyHandler(e) {
16472
+ let direction;
16473
+ let slideIndex;
16474
+ let isSlideTransition = false;
16475
+ const target = e.target;
16476
+ e.preventDefault();
16477
+ switch (e.action) {
16478
+ case 'space':
16479
+ if (this.showIndicators && target.classList.contains(CLS_INDICATOR$1)) {
16480
+ target.click();
16481
+ }
16482
+ else if (target.classList.contains(CLS_CAROUSEL) || target.classList.contains(CLS_PLAY_BUTTON)) {
16483
+ this.playButtonClickHandler(e);
16484
+ }
16485
+ else if (target.classList.contains(CLS_NEXT_BUTTON)) {
16486
+ this.next();
16487
+ }
16488
+ else if (target.classList.contains(CLS_PREV_BUTTON)) {
16489
+ this.prev();
16490
+ }
16491
+ break;
16492
+ case 'end':
16493
+ slideIndex = this.slideItems.length - 1;
16494
+ direction = 'Next';
16495
+ isSlideTransition = true;
16496
+ break;
16497
+ case 'home':
16498
+ slideIndex = 0;
16499
+ direction = 'Previous';
16500
+ isSlideTransition = true;
16501
+ break;
16502
+ case 'moveUp':
16503
+ case 'moveLeft':
16504
+ case 'moveDown':
16505
+ case 'moveRight':
16506
+ if (this.showIndicators && isNullOrUndefined(this.indicatorsTemplate)) {
16507
+ this.element.focus();
16508
+ }
16509
+ direction = (e.action === 'moveUp' || e.action === 'moveLeft') ? 'Previous' : 'Next';
16510
+ slideIndex = this.getSlideIndex(direction);
16511
+ isSlideTransition = !this.isSuspendSlideTransition(slideIndex, direction);
16512
+ break;
16513
+ }
16514
+ if (isSlideTransition) {
16515
+ this.setActiveSlide(slideIndex, direction);
16516
+ this.autoSlide();
16517
+ isSlideTransition = false;
16518
+ }
16519
+ }
16520
+ swipeHandler(e) {
16521
+ if (this.element.classList.contains(CLS_HOVER)) {
16522
+ return;
16523
+ }
16524
+ const direction = (e.swipeDirection === 'Right') ? 'Previous' : 'Next';
16525
+ const slideIndex = this.getSlideIndex(direction);
16526
+ if (!this.isSuspendSlideTransition(slideIndex, direction)) {
16527
+ this.setActiveSlide(slideIndex, direction, true);
16528
+ this.autoSlide();
16529
+ }
16530
+ }
16531
+ isSuspendSlideTransition(index, direction) {
16532
+ return !this.loop && (direction === 'Next' && index === 0 || direction === 'Previous' && index === this.slideItems.length - 1);
16533
+ }
16534
+ handleNavigatorsActions(index) {
16535
+ if (this.buttonsVisibility === 'Hidden') {
16536
+ return;
16537
+ }
16538
+ if (this.showPlayButton) {
16539
+ const playButton = this.element.querySelector(`.${CLS_PLAY_BUTTON}`);
16540
+ const isLastSlide = this.selectedIndex === this.slideItems.length - 1 && !this.loop;
16541
+ let isButtonUpdate = isNullOrUndefined(this.playButtonTemplate) && playButton && isLastSlide;
16542
+ if (isNullOrUndefined(this.playButtonTemplate) && playButton && !isLastSlide) {
16543
+ isButtonUpdate = !playButton.classList.contains(CLS_ACTIVE$2);
16544
+ }
16545
+ if (isButtonUpdate) {
16546
+ this.setProperties({ autoPlay: !isLastSlide }, true);
16547
+ playButton.setAttribute('aria-label', this.localeObj.getConstant(this.autoPlay ? 'pauseSlideTransition' : 'playSlideTransition'));
16548
+ const itemsContainer = this.element.querySelector(`.${CLS_ITEMS$2}`);
16549
+ itemsContainer.setAttribute('aria-live', this.autoPlay ? 'off' : 'polite');
16550
+ const buttonObj = getInstance(playButton, Button);
16551
+ buttonObj.iconCss = CLS_ICON$1 + ' ' + (this.autoPlay ? CLS_PAUSE_ICON : CLS_PLAY_ICON);
16552
+ buttonObj.dataBind();
16553
+ }
16554
+ }
16555
+ const prevButton = this.element.querySelector(`.${CLS_PREV_BUTTON}`);
16556
+ if (prevButton && isNullOrUndefined(this.previousButtonTemplate)) {
16557
+ const buttonObj = getInstance(prevButton, Button);
16558
+ buttonObj.disabled = !this.loop && index === 0;
16559
+ buttonObj.dataBind();
16560
+ }
16561
+ const nextButton = this.element.querySelector(`.${CLS_NEXT_BUTTON}`);
16562
+ if (nextButton && isNullOrUndefined(this.nextButtonTemplate)) {
16563
+ const buttonObj = getInstance(nextButton, Button);
16564
+ buttonObj.disabled = !this.loop && index === this.slideItems.length - 1;
16565
+ buttonObj.dataBind();
16566
+ }
16567
+ }
16568
+ onHoverActions(e) {
16569
+ const navigator = this.element.querySelector(`.${CLS_NAVIGATORS}`);
16570
+ switch (e.type) {
16571
+ case 'mouseenter':
16572
+ if (this.buttonsVisibility === 'VisibleOnHover' && navigator) {
16573
+ removeClass([].slice.call(navigator.childNodes), CLS_HOVER_ARROWS);
16574
+ }
16575
+ addClass([this.element], CLS_HOVER);
16576
+ break;
16577
+ case 'mouseleave':
16578
+ if (this.buttonsVisibility === 'VisibleOnHover' && navigator) {
16579
+ addClass([].slice.call(navigator.childNodes), CLS_HOVER_ARROWS);
16580
+ }
16581
+ removeClass([this.element], CLS_HOVER);
16582
+ break;
16583
+ }
16584
+ this.autoSlide();
16585
+ }
16586
+ onFocusActions(e) {
16587
+ switch (e.type) {
16588
+ case 'focusin':
16589
+ addClass([this.element], CLS_HOVER);
16590
+ break;
16591
+ case 'focusout':
16592
+ removeClass([this.element], CLS_HOVER);
16593
+ break;
16594
+ }
16595
+ this.autoSlide();
16596
+ }
16597
+ destroyButtons() {
16598
+ const buttonCollections = [].slice.call(this.element.querySelectorAll('.e-control.e-btn'));
16599
+ for (const button of buttonCollections) {
16600
+ const instance = getInstance(button, Button);
16601
+ if (instance) {
16602
+ instance.destroy();
16603
+ }
16604
+ }
16605
+ }
16606
+ wireEvents() {
16607
+ EventHandler.add(this.element, 'focusin focusout', this.onFocusActions, this);
16608
+ EventHandler.add(this.element, 'mouseenter mouseleave', this.onHoverActions, this);
16609
+ EventHandler.add(this.element.firstElementChild, 'transitionend', this.onTransitionEnd, this);
16610
+ }
16611
+ unWireEvents() {
16612
+ const indicators = [].slice.call(this.element.querySelectorAll(`.${CLS_INDICATOR_BAR}`));
16613
+ indicators.forEach((indicator) => {
16614
+ EventHandler.remove(indicator, 'click', this.indicatorClickHandler);
16615
+ });
16616
+ const navigators = [].slice.call(this.element.querySelectorAll(`.${CLS_PREVIOUS},.${CLS_NEXT}`));
16617
+ navigators.forEach((navigator) => {
16618
+ EventHandler.remove(navigator, 'click', this.navigatorClickHandler);
16619
+ });
16620
+ const playIcon = this.element.querySelector(`.${CLS_PLAY_PAUSE}`);
16621
+ if (playIcon) {
16622
+ EventHandler.remove(playIcon, 'click', this.playButtonClickHandler);
16623
+ }
16624
+ EventHandler.remove(this.element.firstElementChild, 'transitionend', this.onTransitionEnd);
16625
+ EventHandler.clearEvents(this.element);
16626
+ }
16627
+ /**
16628
+ * Method to transit from the current slide to the previous slide.
16629
+ *
16630
+ * @returns {void}
16631
+ */
16632
+ prev() {
16633
+ if (!this.loop && this.selectedIndex === 0) {
16634
+ return;
16635
+ }
16636
+ const index = (this.selectedIndex === 0) ? this.slideItems.length - 1 : this.selectedIndex - 1;
16637
+ this.setActiveSlide(index, 'Previous');
16638
+ this.autoSlide();
16639
+ }
16640
+ /**
16641
+ * Method to transit from the current slide to the next slide.
16642
+ *
16643
+ * @returns {void}
16644
+ */
16645
+ next() {
16646
+ if (!this.loop && this.selectedIndex === this.slideItems.length - 1) {
16647
+ return;
16648
+ }
16649
+ const index = (this.selectedIndex === this.slideItems.length - 1) ? 0 : this.selectedIndex + 1;
16650
+ this.setActiveSlide(index, 'Next');
16651
+ this.autoSlide();
16652
+ }
16653
+ /**
16654
+ * Method to play the slides programmatically.
16655
+ *
16656
+ * @returns {void}
16657
+ */
16658
+ play() {
16659
+ const playIcon = this.element.querySelector(`.${CLS_PLAY_ICON}`);
16660
+ if (this.showPlayButton && playIcon) {
16661
+ classList(playIcon, [CLS_PAUSE_ICON], [CLS_PLAY_ICON]);
16662
+ const playButton = this.element.querySelector(`.${CLS_PLAY_BUTTON}`);
16663
+ playButton.setAttribute('aria-label', this.localeObj.getConstant('pauseSlideTransition'));
16664
+ }
16665
+ this.setProperties({ autoPlay: true }, true);
16666
+ const itemsContainer = this.element.querySelector(`.${CLS_ITEMS$2}`);
16667
+ itemsContainer.setAttribute('aria-live', 'off');
16668
+ this.applySlideInterval();
16669
+ }
16670
+ /**
16671
+ * Method to pause the slides programmatically.
16672
+ *
16673
+ * @returns {void}
16674
+ */
16675
+ pause() {
16676
+ const pauseIcon = this.element.querySelector(`.${CLS_PAUSE_ICON}`);
16677
+ if (this.showPlayButton && pauseIcon) {
16678
+ const playButton = this.element.querySelector(`.${CLS_PLAY_BUTTON}`);
16679
+ playButton.setAttribute('aria-label', this.localeObj.getConstant('playSlideTransition'));
16680
+ classList(pauseIcon, [CLS_PLAY_ICON], [CLS_PAUSE_ICON]);
16681
+ }
16682
+ this.setProperties({ autoPlay: false }, true);
16683
+ const itemsContainer = this.element.querySelector(`.${CLS_ITEMS$2}`);
16684
+ itemsContainer.setAttribute('aria-live', 'off');
16685
+ this.resetSlideInterval();
16686
+ }
16687
+ /**
16688
+ * Method to render react and angular templates
16689
+ *
16690
+ * @returns {void}
16691
+ * @private
16692
+ */
16693
+ renderTemplates() {
16694
+ if (this.isAngular || this.isReact) {
16695
+ this.renderReactTemplates();
16696
+ }
16697
+ }
16698
+ /**
16699
+ * Method to reset react and angular templates
16700
+ *
16701
+ * @param {string[]} templates Accepts the template ID
16702
+ * @returns {void}
16703
+ * @private
16704
+ */
16705
+ resetTemplates(templates) {
16706
+ if (this.isAngular || this.isReact) {
16707
+ this.clearTemplate(templates);
16708
+ }
16709
+ }
16710
+ /**
16711
+ * Method for destroy the carousel component.
16712
+ *
16713
+ * @returns {void}
16714
+ */
16715
+ destroy() {
16716
+ this.resetTemplates();
16717
+ if (this.touchModule) {
16718
+ this.touchModule.destroy();
16719
+ this.touchModule = null;
16720
+ }
16721
+ this.keyModule.destroy();
16722
+ this.keyModule = null;
16723
+ this.resetSlideInterval();
16724
+ this.destroyButtons();
16725
+ this.unWireEvents();
16726
+ [].slice.call(this.element.children).forEach((ele) => { this.element.removeChild(ele); });
16727
+ removeClass([this.element], [CLS_CAROUSEL, this.cssClass, CLS_RTL$5]);
16728
+ ['tabindex', 'role', 'style'].forEach((attr) => { this.element.removeAttribute(attr); });
16729
+ super.destroy();
16730
+ }
16731
+ };
16732
+ __decorate$11([
16733
+ Collection([], CarouselItem)
16734
+ ], Carousel.prototype, "items", void 0);
16735
+ __decorate$11([
16736
+ Complex({}, CarouselAnimationSettings)
16737
+ ], Carousel.prototype, "animation", void 0);
16738
+ __decorate$11([
16739
+ Property()
16740
+ ], Carousel.prototype, "previousButtonTemplate", void 0);
16741
+ __decorate$11([
16742
+ Property()
16743
+ ], Carousel.prototype, "nextButtonTemplate", void 0);
16744
+ __decorate$11([
16745
+ Property()
16746
+ ], Carousel.prototype, "indicatorsTemplate", void 0);
16747
+ __decorate$11([
16748
+ Property()
16749
+ ], Carousel.prototype, "playButtonTemplate", void 0);
16750
+ __decorate$11([
16751
+ Property()
16752
+ ], Carousel.prototype, "cssClass", void 0);
16753
+ __decorate$11([
16754
+ Property([])
16755
+ ], Carousel.prototype, "dataSource", void 0);
16756
+ __decorate$11([
16757
+ Property()
16758
+ ], Carousel.prototype, "itemTemplate", void 0);
16759
+ __decorate$11([
16760
+ Property(0)
16761
+ ], Carousel.prototype, "selectedIndex", void 0);
16762
+ __decorate$11([
16763
+ Property('100%')
16764
+ ], Carousel.prototype, "width", void 0);
16765
+ __decorate$11([
16766
+ Property('100%')
16767
+ ], Carousel.prototype, "height", void 0);
16768
+ __decorate$11([
16769
+ Property(5000)
16770
+ ], Carousel.prototype, "interval", void 0);
16771
+ __decorate$11([
16772
+ Property(true)
16773
+ ], Carousel.prototype, "autoPlay", void 0);
16774
+ __decorate$11([
16775
+ Property(true)
16776
+ ], Carousel.prototype, "loop", void 0);
16777
+ __decorate$11([
16778
+ Property(false)
16779
+ ], Carousel.prototype, "showPlayButton", void 0);
16780
+ __decorate$11([
16781
+ Property(true)
16782
+ ], Carousel.prototype, "enableTouchSwipe", void 0);
16783
+ __decorate$11([
16784
+ Property(true)
16785
+ ], Carousel.prototype, "showIndicators", void 0);
16786
+ __decorate$11([
16787
+ Property('Visible')
16788
+ ], Carousel.prototype, "buttonsVisibility", void 0);
16789
+ __decorate$11([
16790
+ Property()
16791
+ ], Carousel.prototype, "htmlAttributes", void 0);
16792
+ __decorate$11([
16793
+ Event()
16794
+ ], Carousel.prototype, "slideChanging", void 0);
16795
+ __decorate$11([
16796
+ Event()
16797
+ ], Carousel.prototype, "slideChanged", void 0);
16798
+ Carousel = __decorate$11([
16799
+ NotifyPropertyChanges
16800
+ ], Carousel);
16801
+
16802
+ /** Carousel export modules */
16803
+
15779
16804
  /**
15780
16805
  * Navigation all modules
15781
16806
  */
15782
16807
 
15783
- export { MenuAnimationSettings, MenuItem, HScroll, VScroll, addScrolling, destroyScroll, Item, Toolbar, AccordionActionSettings, AccordionAnimationSettings, AccordionItem, Accordion, ContextMenu, Menu, TabActionSettings, TabAnimationSettings, Header, TabItem, Tab, FieldsSettings, ActionSettings, NodeAnimationSettings, TreeView, Sidebar, BreadcrumbItem, Breadcrumb };
16808
+ export { MenuAnimationSettings, MenuItem, HScroll, VScroll, addScrolling, destroyScroll, Item, Toolbar, AccordionActionSettings, AccordionAnimationSettings, AccordionItem, Accordion, ContextMenu, Menu, TabActionSettings, TabAnimationSettings, Header, TabItem, Tab, FieldsSettings, ActionSettings, NodeAnimationSettings, TreeView, Sidebar, BreadcrumbItem, Breadcrumb, CarouselItem, CarouselAnimationSettings, Carousel };
15784
16809
  //# sourceMappingURL=ej2-navigations.es2015.js.map