@syncfusion/ej2-navigations 19.4.56 → 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 +24 -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 +1048 -23
  8. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  9. package/dist/es6/ej2-navigations.es5.js +1086 -23
  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 +2 -8
  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 +9 -0
  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
@@ -410,7 +410,7 @@ var HScroll = /** @__PURE__ @class */ (function (_super) {
410
410
  classList(arrowIcon, [CLS_NAVLEFTARROW], [CLS_NAVRIGHTARROW]);
411
411
  }
412
412
  }
413
- else {
413
+ else if (addDisable && removeDisable) {
414
414
  addDisable.classList.add(CLS_DISABLE);
415
415
  addDisable.setAttribute('aria-disabled', 'true');
416
416
  addDisable.removeAttribute('tabindex');
@@ -2015,14 +2015,8 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2015
2015
  _this.setBlankIconStyle(_this.popupWrapper);
2016
2016
  _this.wireKeyboardEvent(_this.popupWrapper);
2017
2017
  rippleEffect(_this.popupWrapper, { selector: '.' + ITEM });
2018
- if (_this.popupWrapper.style.position === 'fixed' && _this.top > 0) {
2019
- _this.popupWrapper.style.left = _this.left + 'px';
2020
- _this.popupWrapper.style.top = _this.top + scrollY + 'px';
2021
- }
2022
- else {
2023
- _this.popupWrapper.style.left = _this.left + 'px';
2024
- _this.popupWrapper.style.top = _this.top + 'px';
2025
- }
2018
+ _this.popupWrapper.style.left = _this.left + 'px';
2019
+ _this.popupWrapper.style.top = _this.top + 'px';
2026
2020
  var animationOptions = _this.animationSettings.effect !== 'None' ? {
2027
2021
  name: _this.animationSettings.effect, duration: _this.animationSettings.duration,
2028
2022
  timingFunction: _this.animationSettings.easing
@@ -3472,6 +3466,7 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
3472
3466
  }
3473
3467
  this.popObj = null;
3474
3468
  this.tbarAlign = null;
3469
+ this.tbarItemsCol = [];
3475
3470
  this.remove(this.element, 'e-toolpop');
3476
3471
  if (this.cssClass) {
3477
3472
  removeClass([this.element], this.cssClass.split(' '));
@@ -4956,6 +4951,9 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
4956
4951
  innerItems[0].parentNode.insertBefore(innerEle, innerItems[index]);
4957
4952
  }
4958
4953
  this.items.splice(index, 0, item);
4954
+ if (item.template) {
4955
+ this.tbarEle.splice(this.tbarEle.length - 1, 1);
4956
+ }
4959
4957
  this.tbarEle.splice(index, 0, innerEle);
4960
4958
  index++;
4961
4959
  this.offsetWid = itemsDiv.offsetWidth;
@@ -5042,6 +5040,9 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
5042
5040
  this.tempId.push(val);
5043
5041
  }
5044
5042
  }
5043
+ else {
5044
+ templateFn = compile(val);
5045
+ }
5045
5046
  }
5046
5047
  catch (e) {
5047
5048
  templateFn = compile(val);
@@ -5718,9 +5719,11 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
5718
5719
  if (!this.isDestroy) {
5719
5720
  this.isDestroy = false;
5720
5721
  }
5721
- if (!isNullOrUndefined(nested)) {
5722
- nested.classList.add(CLS_NEST);
5723
- this.isNested = true;
5722
+ if (nested && nested.firstElementChild && nested.firstElementChild.firstElementChild) {
5723
+ if (nested.firstElementChild.firstElementChild.classList.contains(CLS_ROOT$2)) {
5724
+ nested.classList.add(CLS_NEST);
5725
+ this.isNested = true;
5726
+ }
5724
5727
  }
5725
5728
  else {
5726
5729
  this.element.classList.add(CLS_ACRDN_ROOT);
@@ -5809,6 +5812,9 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
5809
5812
  if (document.querySelectorAll(template).length) {
5810
5813
  return compile(document.querySelector(template).innerHTML.trim());
5811
5814
  }
5815
+ else {
5816
+ return compile(template);
5817
+ }
5812
5818
  }
5813
5819
  catch (error) {
5814
5820
  return compile(template);
@@ -6176,6 +6182,9 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
6176
6182
  ele.appendChild(eleVal);
6177
6183
  eleVal.style.display = '';
6178
6184
  }
6185
+ else {
6186
+ templateFn = compile(value);
6187
+ }
6179
6188
  }
6180
6189
  catch (e) {
6181
6190
  if (typeof (value) === 'string') {
@@ -7528,11 +7537,12 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
7528
7537
  */
7529
7538
  Tab.prototype.destroy = function () {
7530
7539
  var _this = this;
7531
- if (this.isReact) {
7540
+ if (this.isReact || this.isAngular) {
7532
7541
  this.clearTemplate();
7533
7542
  }
7534
7543
  if (!isNullOrUndefined(this.tbObj)) {
7535
7544
  this.tbObj.destroy();
7545
+ this.tbObj = null;
7536
7546
  }
7537
7547
  this.unWireEvents();
7538
7548
  ['role', 'aria-disabled', 'aria-activedescendant', 'tabindex', 'aria-orientation'].forEach(function (val) {
@@ -7551,6 +7561,28 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
7551
7561
  cntEle.innerHTML = this.cnt;
7552
7562
  }
7553
7563
  }
7564
+ if (this.btnCls) {
7565
+ this.btnCls = null;
7566
+ }
7567
+ this.hdrEle = null;
7568
+ this.cntEle = null;
7569
+ this.tbItems = null;
7570
+ this.tbItem = null;
7571
+ this.tbPop = null;
7572
+ this.prevItem = null;
7573
+ this.popEle = null;
7574
+ this.bdrLine = null;
7575
+ this.content = null;
7576
+ this.dragItem = null;
7577
+ this.cloneElement = null;
7578
+ this.draggingItems = [];
7579
+ if (this.draggableItems && this.draggableItems.length > 0) {
7580
+ for (var i = 0; i < this.draggableItems.length; i++) {
7581
+ this.draggableItems[i].destroy();
7582
+ this.draggableItems[i] = null;
7583
+ }
7584
+ this.draggableItems = [];
7585
+ }
7554
7586
  _super.prototype.destroy.call(this);
7555
7587
  this.trigger('destroyed');
7556
7588
  };
@@ -7583,6 +7615,9 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
7583
7615
  this.isSwipeed = false;
7584
7616
  this.itemIndexArray = [];
7585
7617
  this.templateEle = [];
7618
+ if (this.allowDragAndDrop) {
7619
+ this.dragArea = !isNullOrUndefined(this.dragArea) ? this.dragArea : '#' + this.element.id + ' ' + ('.' + CLS_HEADER$1);
7620
+ }
7586
7621
  if (!isNullOrUndefined(nested)) {
7587
7622
  nested.parentElement.classList.add(CLS_NEST$1);
7588
7623
  this.isNested = true;
@@ -7800,7 +7835,15 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
7800
7835
  };
7801
7836
  Tab.prototype.parseObject = function (items, index) {
7802
7837
  var _this = this;
7803
- var tbCount = selectAll('.e-tab-header .' + CLS_TB_ITEM, this.element).length;
7838
+ var tbItems = selectAll('.e-tab-header .' + CLS_TB_ITEM, this.element);
7839
+ var maxId = this.lastIndex;
7840
+ if (!this.isReplace && tbItems.length > 0) {
7841
+ var idList_1 = [];
7842
+ tbItems.forEach(function (item) {
7843
+ idList_1.push(parseInt(item.id.slice(item.id.indexOf('_') + 1), 10));
7844
+ });
7845
+ maxId = Math.max.apply(Math, idList_1);
7846
+ }
7804
7847
  var tItems = [];
7805
7848
  var txtWrapEle;
7806
7849
  var spliceArray = [];
@@ -7825,8 +7868,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
7825
7868
  else {
7826
7869
  itemIndex = index + i;
7827
7870
  }
7828
- var addIndex = _this.isAdd ? tbCount + i : _this.lastIndex + 1;
7829
- _this.lastIndex = ((tbCount === 0) ? i : ((_this.isReplace) ? (itemIndex) : (addIndex)));
7871
+ _this.lastIndex = ((tbItems.length === 0) ? i : ((_this.isReplace) ? (itemIndex) : (maxId + 1 + i)));
7830
7872
  var disabled = (item.disabled) ? ' ' + CLS_DISABLE$4 + ' ' + CLS_OVERLAY$2 : '';
7831
7873
  var hidden = (item.visible === false) ? ' ' + CLS_HIDDEN$1 : '';
7832
7874
  txtWrapEle = _this.createElement('div', { className: CLS_TEXT, attrs: { 'role': 'presentation' } });
@@ -8134,7 +8176,12 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8134
8176
  var templateFn;
8135
8177
  if (typeof val === 'string') {
8136
8178
  val = val.trim();
8137
- ele.innerHTML = SanitizeHtmlHelper.sanitize(val);
8179
+ if (this.isVue) {
8180
+ templateFn = compile(SanitizeHtmlHelper.sanitize(val));
8181
+ }
8182
+ else {
8183
+ ele.innerHTML = SanitizeHtmlHelper.sanitize(val);
8184
+ }
8138
8185
  }
8139
8186
  else {
8140
8187
  templateFn = compile(val);
@@ -8553,6 +8600,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8553
8600
  }
8554
8601
  if (!isNullOrUndefined(this.cntEle) && !isNullOrUndefined(this.touchModule)) {
8555
8602
  this.touchModule.destroy();
8603
+ this.touchModule = null;
8556
8604
  }
8557
8605
  window.removeEventListener('resize', this.resizeContext);
8558
8606
  EventHandler.remove(this.element, 'mouseover', this.hoverHandler);
@@ -8582,8 +8630,13 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8582
8630
  if (e.velocity < 3 && isNullOrUndefined(e.originalEvent.changedTouches)) {
8583
8631
  return;
8584
8632
  }
8585
- if (e.originalEvent && this.isNested) {
8586
- e.originalEvent.stopPropagation();
8633
+ if (this.isNested) {
8634
+ this.element.setAttribute('data-swipe', 'true');
8635
+ }
8636
+ var nestedTab = this.element.querySelector('[data-swipe="true"]');
8637
+ if (nestedTab) {
8638
+ nestedTab.removeAttribute('data-swipe');
8639
+ return;
8587
8640
  }
8588
8641
  this.isSwipeed = true;
8589
8642
  if (e.swipeDirection === 'Right' && this.selectedItem !== 0) {
@@ -8804,7 +8857,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8804
8857
  this.reRenderItems();
8805
8858
  }
8806
8859
  else {
8807
- if (this.isRect) {
8860
+ if (this.isReact || this.isAngular) {
8808
8861
  this.clearTemplate();
8809
8862
  }
8810
8863
  this.setItems(newProp.items);
@@ -8817,12 +8870,13 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8817
8870
  detach(selectElement.firstElementChild);
8818
8871
  }
8819
8872
  this.select(this.selectedItem);
8873
+ this.draggableItems = [];
8874
+ this.bindDraggable();
8820
8875
  }
8821
8876
  }
8822
8877
  };
8823
8878
  Tab.prototype.initializeDrag = function (target) {
8824
8879
  var _this = this;
8825
- this.dragArea = !isNullOrUndefined(this.dragArea) ? this.dragArea : '#' + this.element.id + ' ' + ('.' + CLS_HEADER$1);
8826
8880
  var dragObj = new Draggable(target, {
8827
8881
  dragArea: this.dragArea,
8828
8882
  dragTarget: '.' + CLS_TB_ITEM,
@@ -9000,6 +9054,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9000
9054
  Tab.prototype.itemDragStop = function (e) {
9001
9055
  var _this = this;
9002
9056
  detach(this.cloneElement);
9057
+ this.cloneElement = null;
9003
9058
  this.dragItem.querySelector('.' + CLS_WRAP).style.visibility = 'visible';
9004
9059
  document.body.style.cursor = '';
9005
9060
  var dragStopArgs = {
@@ -9028,6 +9083,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9028
9083
  }
9029
9084
  }
9030
9085
  });
9086
+ this.dragItem = null;
9031
9087
  };
9032
9088
  /**
9033
9089
  * Enables or disables the specified Tab item. On passing value as `false`, the item will be disabled.
@@ -9172,12 +9228,25 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9172
9228
  detach(cntTrg);
9173
9229
  }
9174
9230
  _this.trigger('removed', tabRemovingArgs);
9231
+ if (_this.draggableItems && _this.draggableItems.length > 0) {
9232
+ _this.draggableItems[index].destroy();
9233
+ _this.draggableItems[index] = null;
9234
+ _this.draggableItems.splice(index, 1);
9235
+ }
9175
9236
  if (trg.classList.contains(CLS_ACTIVE$1)) {
9176
9237
  index = (index > selectAll('.' + CLS_TB_ITEM + ':not(.' + CLS_TB_POPUP + ')', _this.element).length - 1) ? index - 1 : index;
9177
9238
  _this.enableAnimation = false;
9178
9239
  _this.selectedItem = index;
9179
9240
  _this.select(index);
9180
9241
  }
9242
+ else if (index !== _this.selectedItem) {
9243
+ if (index < _this.selectedItem) {
9244
+ index = _this.itemIndexArray.indexOf(_this.tbItem[_this.selectedItem].id);
9245
+ _this.setProperties({ selectedItem: index > -1 ? index : _this.selectedItem }, true);
9246
+ _this.prevIndex = _this.selectedItem;
9247
+ }
9248
+ _this.tbItem = selectAll('.' + CLS_TB_ITEM, _this.getTabHeader());
9249
+ }
9181
9250
  if (selectAll('.' + CLS_TB_ITEM, _this.element).length === 0) {
9182
9251
  _this.hdrEle.style.display = 'none';
9183
9252
  }
@@ -9329,6 +9398,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9329
9398
  }
9330
9399
  if (this.tbItem.length > args && args >= 0 && !isNaN(args)) {
9331
9400
  this.prevIndex = this.selectedItem;
9401
+ this.prevItem = this.tbItem[this.prevIndex];
9332
9402
  if (this.tbItem[args].classList.contains(CLS_TB_POPUP) && this.reorderActiveTab) {
9333
9403
  this.setActive(this.popupHandler(this.tbItem[args]), null, isInteracted);
9334
9404
  if ((!isNullOrUndefined(this.items) && this.items.length > 0) && this.allowDragAndDrop) {
@@ -10053,6 +10123,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
10053
10123
  if (document.querySelectorAll(template).length) {
10054
10124
  return compile(document.querySelector(template).innerHTML.trim());
10055
10125
  }
10126
+ else {
10127
+ return compile(template);
10128
+ }
10056
10129
  }
10057
10130
  catch (e) {
10058
10131
  return compile(template);
@@ -12338,7 +12411,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
12338
12411
  return { cancel: false, isInteracted: isNullOrUndefined(e) ? false : true, node: currLi, nodeData: nodeData, event: e };
12339
12412
  };
12340
12413
  TreeView.prototype.renderNodeTemplate = function (data, textEle, dataId) {
12341
- var tempArr = this.nodeTemplateFn(data, this, 'nodeTemplate' + dataId, this.element.id + 'nodeTemplate', this.isStringTemplate, undefined, textEle);
12414
+ var tempArr = this.nodeTemplateFn(data, this, 'nodeTemplate' + dataId, this.element.id + 'nodeTemplate', this.isStringTemplate, undefined, textEle, this.root);
12342
12415
  if (tempArr) {
12343
12416
  tempArr = Array.prototype.slice.call(tempArr);
12344
12417
  append(tempArr, textEle);
@@ -15795,6 +15868,12 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15795
15868
  }
15796
15869
  if (!(this.overflowMode === 'Menu' && liElems[i].classList.contains(MENUCLASS))) {
15797
15870
  liWidth += liElems[i].offsetWidth;
15871
+ if (liWidth > width) {
15872
+ maxItems = Math.ceil((i) / 2) + (this.overflowMode === 'Menu' && i <= 2 ? 0 : 1);
15873
+ this._maxItems = maxItems;
15874
+ this.initPvtProps();
15875
+ return this.reRenderItems();
15876
+ }
15798
15877
  }
15799
15878
  }
15800
15879
  }
@@ -16166,9 +16245,993 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
16166
16245
  * Breadcrumb modules
16167
16246
  */
16168
16247
 
16248
+ var __extends$11 = (undefined && undefined.__extends) || (function () {
16249
+ var extendStatics = function (d, b) {
16250
+ extendStatics = Object.setPrototypeOf ||
16251
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
16252
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
16253
+ return extendStatics(d, b);
16254
+ };
16255
+ return function (d, b) {
16256
+ extendStatics(d, b);
16257
+ function __() { this.constructor = d; }
16258
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
16259
+ };
16260
+ })();
16261
+ var __decorate$11 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
16262
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16263
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
16264
+ 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;
16265
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
16266
+ };
16267
+ /* eslint-disable @typescript-eslint/no-explicit-any */
16268
+ // Constant variables
16269
+ var CLS_CAROUSEL = 'e-carousel';
16270
+ var CLS_ACTIVE$2 = 'e-active';
16271
+ var CLS_RTL$5 = 'e-rtl';
16272
+ var CLS_ITEMS$2 = 'e-carousel-items';
16273
+ var CLS_ITEM$3 = 'e-carousel-item';
16274
+ var CLS_PREVIOUS = 'e-previous';
16275
+ var CLS_NEXT = 'e-next';
16276
+ var CLS_PREV_ICON = 'e-previous-icon';
16277
+ var CLS_NEXT_ICON = 'e-next-icon';
16278
+ var CLS_NAVIGATORS = 'e-carousel-navigators';
16279
+ var CLS_INDICATORS = 'e-carousel-indicators';
16280
+ var CLS_INDICATOR_BARS = 'e-indicator-bars';
16281
+ var CLS_INDICATOR_BAR = 'e-indicator-bar';
16282
+ var CLS_INDICATOR$1 = 'e-indicator';
16283
+ var CLS_ICON$1 = 'e-icons';
16284
+ var CLS_PLAY_PAUSE = 'e-play-pause';
16285
+ var CLS_PLAY_ICON = 'e-play-icon';
16286
+ var CLS_PAUSE_ICON = 'e-pause-icon';
16287
+ var CLS_PREV_BUTTON = 'e-previous-button';
16288
+ var CLS_NEXT_BUTTON = 'e-next-button';
16289
+ var CLS_PLAY_BUTTON = 'e-play-button';
16290
+ var CLS_FLAT = 'e-flat';
16291
+ var CLS_ROUND = 'e-round';
16292
+ var CLS_HOVER_ARROWS = 'e-hover-arrows';
16293
+ var CLS_HOVER = 'e-carousel-hover';
16294
+ var CLS_TEMPLATE$2 = 'e-template';
16295
+ var CLS_SLIDE_ANIMATION = 'e-carousel-slide-animation';
16296
+ var CLS_FADE_ANIMATION = 'e-carousel-fade-animation';
16297
+ var CLS_PREV_SLIDE = 'e-prev';
16298
+ var CLS_NEXT_SLIDE = 'e-next';
16299
+ var CLS_TRANSITION_START = 'e-transition-start';
16300
+ var CLS_TRANSITION_END = 'e-transition-end';
16301
+ /** Specifies the carousel individual item. */
16302
+ var CarouselItem = /** @__PURE__ @class */ (function (_super) {
16303
+ __extends$11(CarouselItem, _super);
16304
+ function CarouselItem() {
16305
+ return _super !== null && _super.apply(this, arguments) || this;
16306
+ }
16307
+ __decorate$11([
16308
+ Property()
16309
+ ], CarouselItem.prototype, "cssClass", void 0);
16310
+ __decorate$11([
16311
+ Property()
16312
+ ], CarouselItem.prototype, "interval", void 0);
16313
+ __decorate$11([
16314
+ Property()
16315
+ ], CarouselItem.prototype, "template", void 0);
16316
+ __decorate$11([
16317
+ Property()
16318
+ ], CarouselItem.prototype, "htmlAttributes", void 0);
16319
+ return CarouselItem;
16320
+ }(ChildProperty));
16321
+ /** Specifies the animation configuration for carousel items. */
16322
+ var CarouselAnimationSettings = /** @__PURE__ @class */ (function (_super) {
16323
+ __extends$11(CarouselAnimationSettings, _super);
16324
+ function CarouselAnimationSettings() {
16325
+ return _super !== null && _super.apply(this, arguments) || this;
16326
+ }
16327
+ __decorate$11([
16328
+ Property('Slide')
16329
+ ], CarouselAnimationSettings.prototype, "effect", void 0);
16330
+ __decorate$11([
16331
+ Property()
16332
+ ], CarouselAnimationSettings.prototype, "customEffect", void 0);
16333
+ return CarouselAnimationSettings;
16334
+ }(ChildProperty));
16335
+ var Carousel = /** @__PURE__ @class */ (function (_super) {
16336
+ __extends$11(Carousel, _super);
16337
+ /**
16338
+ * Constructor for creating the Carousel widget
16339
+ *
16340
+ * @param {CarouselModel} options Accepts the carousel model properties to initiate the rendering
16341
+ * @param {string | HTMLElement} element Accepts the DOM element reference
16342
+ */
16343
+ function Carousel(options, element) {
16344
+ return _super.call(this, options, element) || this;
16345
+ }
16346
+ Carousel.prototype.getModuleName = function () {
16347
+ return CLS_CAROUSEL.replace('e-', '');
16348
+ };
16349
+ Carousel.prototype.getPersistData = function () {
16350
+ return this.addOnPersist(['selectedIndex']);
16351
+ };
16352
+ Carousel.prototype.preRender = function () {
16353
+ this.keyConfigs = {
16354
+ home: 'home',
16355
+ end: 'end',
16356
+ space: 'space',
16357
+ moveLeft: 'leftarrow',
16358
+ moveRight: 'rightarrow',
16359
+ moveUp: 'uparrow',
16360
+ moveDown: 'downarrow'
16361
+ };
16362
+ var defaultLocale = {
16363
+ nextSlide: 'Next slide',
16364
+ of: 'of',
16365
+ pauseSlideTransition: 'Pause slide transition',
16366
+ playSlideTransition: 'Play slide transition',
16367
+ previousSlide: 'Previous slide',
16368
+ slide: 'Slide',
16369
+ slideShow: 'Slide show'
16370
+ };
16371
+ this.localeObj = new L10n(this.getModuleName(), defaultLocale, this.locale);
16372
+ };
16373
+ Carousel.prototype.render = function () {
16374
+ this.initialize();
16375
+ this.renderSlides();
16376
+ this.renderNavigators();
16377
+ this.renderPlayButton();
16378
+ this.renderIndicators();
16379
+ this.applyAnimation();
16380
+ this.wireEvents();
16381
+ };
16382
+ Carousel.prototype.onPropertyChanged = function (newProp, oldProp) {
16383
+ var target;
16384
+ for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
16385
+ var prop = _a[_i];
16386
+ switch (prop) {
16387
+ case 'animation':
16388
+ for (var _b = 0, _c = Object.keys(newProp.animation); _b < _c.length; _b++) {
16389
+ var propName = _c[_b];
16390
+ if (propName === 'customEffect' && !isNullOrUndefined(oldProp.animation.customEffect)) {
16391
+ removeClass([this.element.querySelector("." + CLS_ITEMS$2)], oldProp.animation.customEffect);
16392
+ }
16393
+ }
16394
+ this.applyAnimation();
16395
+ break;
16396
+ case 'cssClass':
16397
+ classList(this.element, [newProp.cssClass], [oldProp.cssClass]);
16398
+ break;
16399
+ case 'selectedIndex':
16400
+ this.setActiveSlide(this.selectedIndex, oldProp.selectedIndex > this.selectedIndex ? 'Previous' : 'Next');
16401
+ this.autoSlide();
16402
+ break;
16403
+ case 'htmlAttributes':
16404
+ if (!isNullOrUndefined(this.htmlAttributes)) {
16405
+ this.setHtmlAttributes(this.htmlAttributes, this.element);
16406
+ }
16407
+ break;
16408
+ case 'enableTouchSwipe':
16409
+ if (!this.enableTouchSwipe && this.touchModule) {
16410
+ this.touchModule.destroy();
16411
+ }
16412
+ if (this.element.querySelector("." + CLS_ITEMS$2)) {
16413
+ this.renderTouchActions();
16414
+ }
16415
+ break;
16416
+ case 'loop':
16417
+ if (this.loop && isNullOrUndefined(this.autoSlideInterval)) {
16418
+ this.applySlideInterval();
16419
+ }
16420
+ this.handleNavigatorsActions(this.selectedIndex);
16421
+ break;
16422
+ case 'enableRtl':
16423
+ if (this.enableRtl) {
16424
+ addClass([this.element], CLS_RTL$5);
16425
+ }
16426
+ else {
16427
+ removeClass([this.element], CLS_RTL$5);
16428
+ }
16429
+ break;
16430
+ case 'buttonsVisibility':
16431
+ target = this.element.querySelector("." + CLS_NAVIGATORS);
16432
+ if (target) {
16433
+ switch (this.buttonsVisibility) {
16434
+ case 'Hidden':
16435
+ this.resetTemplates(['previousButtonTemplate', 'nextButtonTemplate']);
16436
+ remove(target);
16437
+ break;
16438
+ case 'VisibleOnHover':
16439
+ addClass([].slice.call(target.childNodes), CLS_HOVER_ARROWS);
16440
+ break;
16441
+ case 'Visible':
16442
+ removeClass([].slice.call(target.childNodes), CLS_HOVER_ARROWS);
16443
+ break;
16444
+ }
16445
+ }
16446
+ else {
16447
+ this.renderNavigators();
16448
+ this.renderPlayButton();
16449
+ }
16450
+ break;
16451
+ case 'width':
16452
+ setStyleAttribute(this.element, { 'width': formatUnit(this.width) });
16453
+ break;
16454
+ case 'height':
16455
+ setStyleAttribute(this.element, { 'height': formatUnit(this.height) });
16456
+ break;
16457
+ case 'autoPlay':
16458
+ if (this.showPlayButton && isNullOrUndefined(this.playButtonTemplate)) {
16459
+ this.playButtonClickHandler(null, true);
16460
+ }
16461
+ this.autoSlide();
16462
+ break;
16463
+ case 'interval':
16464
+ this.autoSlide();
16465
+ break;
16466
+ case 'showIndicators':
16467
+ target = this.element.querySelector("." + CLS_INDICATORS);
16468
+ if (!this.showIndicators && target) {
16469
+ this.resetTemplates(['indicatorsTemplate']);
16470
+ remove(target);
16471
+ }
16472
+ this.renderIndicators();
16473
+ break;
16474
+ case 'showPlayButton':
16475
+ target = this.element.querySelector("." + CLS_PLAY_PAUSE);
16476
+ if (!this.showPlayButton && target) {
16477
+ remove(target);
16478
+ this.resetTemplates(['playButtonTemplate']);
16479
+ }
16480
+ this.renderPlayButton();
16481
+ break;
16482
+ case 'items':
16483
+ case 'dataSource':
16484
+ target = this.element.querySelector("." + CLS_ITEMS$2);
16485
+ if (target) {
16486
+ this.resetTemplates(['itemTemplate']);
16487
+ remove(target);
16488
+ }
16489
+ this.renderSlides();
16490
+ break;
16491
+ }
16492
+ }
16493
+ };
16494
+ Carousel.prototype.initialize = function () {
16495
+ var carouselClasses = [];
16496
+ if (this.cssClass) {
16497
+ carouselClasses.push(this.cssClass);
16498
+ }
16499
+ if (this.enableRtl) {
16500
+ carouselClasses.push(CLS_RTL$5);
16501
+ }
16502
+ addClass([this.element], carouselClasses);
16503
+ setStyleAttribute(this.element, { 'width': formatUnit(this.width), 'height': formatUnit(this.height) });
16504
+ attributes(this.element, { 'tabindex': '0', 'aria-roledescription': 'carousel', 'aria-label': this.localeObj.getConstant('slideShow') });
16505
+ if (!isNullOrUndefined(this.htmlAttributes)) {
16506
+ this.setHtmlAttributes(this.htmlAttributes, this.element);
16507
+ }
16508
+ };
16509
+ Carousel.prototype.renderSlides = function () {
16510
+ var _this = this;
16511
+ var itemsContainer = this.createElement('div', { className: CLS_ITEMS$2, attrs: { 'aria-live': this.autoPlay ? 'off' : 'polite' } });
16512
+ this.element.appendChild(itemsContainer);
16513
+ if (this.items.length > 0) {
16514
+ this.slideItems = this.items;
16515
+ this.items.forEach(function (item, index) {
16516
+ _this.renderSlide(item, item.template, index, itemsContainer);
16517
+ });
16518
+ }
16519
+ else if (this.dataSource.length > 0) {
16520
+ this.slideItems = this.dataSource;
16521
+ this.dataSource.forEach(function (item, index) {
16522
+ _this.renderSlide(item, _this.itemTemplate, index, itemsContainer);
16523
+ });
16524
+ }
16525
+ this.renderTemplates();
16526
+ this.autoSlide();
16527
+ this.renderTouchActions();
16528
+ this.renderKeyboardActions();
16529
+ };
16530
+ Carousel.prototype.renderSlide = function (item, itemTemplate, index, container) {
16531
+ var itemEle = this.createElement('div', {
16532
+ id: getUniqueID('carousel_item'),
16533
+ className: CLS_ITEM$3 + " " + (item.cssClass ? item.cssClass : '') + " " + (this.selectedIndex === index ? CLS_ACTIVE$2 : ''),
16534
+ attrs: {
16535
+ 'aria-hidden': this.selectedIndex === index ? 'false' : 'true', 'data-index': index.toString(),
16536
+ 'aria-role': 'group', 'aria-roledescription': 'slide'
16537
+ }
16538
+ });
16539
+ if (!isNullOrUndefined(item.htmlAttributes)) {
16540
+ this.setHtmlAttributes(item.htmlAttributes, itemEle);
16541
+ }
16542
+ var templateId = this.element.id + '_template';
16543
+ var template = this.templateParser(itemTemplate)(item, this, 'itemTemplate', templateId, false);
16544
+ append(template, itemEle);
16545
+ container.appendChild(itemEle);
16546
+ };
16547
+ Carousel.prototype.renderNavigators = function () {
16548
+ if (this.buttonsVisibility === 'Hidden') {
16549
+ return;
16550
+ }
16551
+ var navigators = this.createElement('div', { className: CLS_NAVIGATORS });
16552
+ var itemsContainer = this.element.querySelector("." + CLS_ITEMS$2);
16553
+ itemsContainer.insertAdjacentElement('afterend', navigators);
16554
+ this.renderNavigatorButton('Previous');
16555
+ this.renderNavigatorButton('Next');
16556
+ this.renderTemplates();
16557
+ };
16558
+ Carousel.prototype.renderNavigatorButton = function (direction) {
16559
+ var buttonContainer = this.createElement('div', {
16560
+ className: (direction === 'Previous' ? CLS_PREVIOUS : CLS_NEXT) + ' ' + (this.buttonsVisibility === 'VisibleOnHover' ? CLS_HOVER_ARROWS : ''),
16561
+ attrs: { 'aria-label': this.localeObj.getConstant(direction === 'Previous' ? 'previousSlide' : 'nextSlide') }
16562
+ });
16563
+ if (direction === 'Previous' && this.previousButtonTemplate) {
16564
+ addClass([buttonContainer], CLS_TEMPLATE$2);
16565
+ var templateId = this.element.id + '_previousButtonTemplate';
16566
+ var template = this.templateParser(this.previousButtonTemplate)({ type: 'Previous' }, this, 'previousButtonTemplate', templateId, false);
16567
+ append(template, buttonContainer);
16568
+ }
16569
+ else if (direction === 'Next' && this.nextButtonTemplate) {
16570
+ addClass([buttonContainer], CLS_TEMPLATE$2);
16571
+ var templateId = this.element.id + '_nextButtonTemplate';
16572
+ var template = this.templateParser(this.nextButtonTemplate)({ type: 'Next' }, this, 'nextButtonTemplate', templateId, false);
16573
+ append(template, buttonContainer);
16574
+ }
16575
+ else {
16576
+ var button = this.createElement('button');
16577
+ var buttonObj = new Button({
16578
+ cssClass: CLS_FLAT + ' ' + CLS_ROUND + ' ' + (direction === 'Previous' ? CLS_PREV_BUTTON : CLS_NEXT_BUTTON),
16579
+ iconCss: CLS_ICON$1 + ' ' + (direction === 'Previous' ? CLS_PREV_ICON : CLS_NEXT_ICON),
16580
+ enableRtl: this.enableRtl,
16581
+ disabled: !this.loop && this.selectedIndex === (direction === 'Previous' ? 0 : this.slideItems.length - 1)
16582
+ });
16583
+ buttonObj.appendTo(button);
16584
+ buttonContainer.appendChild(button);
16585
+ }
16586
+ this.element.querySelector('.' + CLS_NAVIGATORS).appendChild(buttonContainer);
16587
+ EventHandler.add(buttonContainer, 'click', this.navigatorClickHandler, this);
16588
+ };
16589
+ Carousel.prototype.renderPlayButton = function () {
16590
+ if (this.buttonsVisibility === 'Hidden' || !this.showPlayButton) {
16591
+ return;
16592
+ }
16593
+ var playPauseWrap = this.createElement('div', {
16594
+ className: CLS_PLAY_PAUSE + ' ' + (this.buttonsVisibility === 'VisibleOnHover' ? CLS_HOVER_ARROWS : '')
16595
+ });
16596
+ if (this.playButtonTemplate) {
16597
+ addClass([playPauseWrap], CLS_TEMPLATE$2);
16598
+ var templateId = this.element.id + '_playButtonTemplate';
16599
+ var template = this.templateParser(this.playButtonTemplate)({}, this, 'playButtonTemplate', templateId, false);
16600
+ append(template, playPauseWrap);
16601
+ }
16602
+ else {
16603
+ var playButton = this.createElement('button', {
16604
+ attrs: { 'aria-label': this.localeObj.getConstant(this.autoPlay ? 'pauseSlideTransition' : 'playSlideTransition') }
16605
+ });
16606
+ var isLastSlide = this.selectedIndex === this.slideItems.length - 1 && !this.loop;
16607
+ var buttonObj = new Button({
16608
+ cssClass: CLS_FLAT + ' ' + CLS_ROUND + ' ' + CLS_PLAY_BUTTON,
16609
+ iconCss: CLS_ICON$1 + ' ' + (this.autoPlay && !isLastSlide ? CLS_PAUSE_ICON : CLS_PLAY_ICON),
16610
+ isToggle: true,
16611
+ enableRtl: this.enableRtl
16612
+ });
16613
+ if (isLastSlide) {
16614
+ this.setProperties({ autoPlay: false }, true);
16615
+ playButton.setAttribute('aria-label', this.localeObj.getConstant('playSlideTransition'));
16616
+ var itemsContainer = this.element.querySelector("." + CLS_ITEMS$2);
16617
+ itemsContainer.setAttribute('aria-live', 'polite');
16618
+ }
16619
+ buttonObj.appendTo(playButton);
16620
+ playPauseWrap.appendChild(playButton);
16621
+ }
16622
+ var navigators = this.element.querySelector("." + CLS_NAVIGATORS);
16623
+ navigators.insertBefore(playPauseWrap, navigators.lastElementChild);
16624
+ this.renderTemplates();
16625
+ EventHandler.add(playPauseWrap, 'click', this.playButtonClickHandler, this);
16626
+ };
16627
+ Carousel.prototype.renderIndicators = function () {
16628
+ var _this = this;
16629
+ if (!this.showIndicators) {
16630
+ return;
16631
+ }
16632
+ var indicatorWrap = this.createElement('div', { className: CLS_INDICATORS });
16633
+ var indicatorBars = this.createElement('div', { className: CLS_INDICATOR_BARS });
16634
+ indicatorWrap.appendChild(indicatorBars);
16635
+ if (this.slideItems) {
16636
+ this.slideItems.forEach(function (item, index) {
16637
+ var indicatorBar = _this.createElement('div', {
16638
+ className: CLS_INDICATOR_BAR + ' ' + (_this.selectedIndex === index ? CLS_ACTIVE$2 : ''),
16639
+ attrs: { 'data-index': index.toString(), 'aria-current': _this.selectedIndex === index ? 'true' : 'false' }
16640
+ });
16641
+ if (_this.indicatorsTemplate) {
16642
+ addClass([indicatorBar], CLS_TEMPLATE$2);
16643
+ var templateId = _this.element.id + '_indicatorsTemplate';
16644
+ var template = _this.templateParser(_this.indicatorsTemplate)({ index: index, selectedIndex: _this.selectedIndex }, _this, 'indicatorsTemplate', templateId, false);
16645
+ append(template, indicatorBar);
16646
+ }
16647
+ else {
16648
+ var indicator = _this.createElement('button', { className: CLS_INDICATOR$1 });
16649
+ indicatorBar.appendChild(indicator);
16650
+ indicator.appendChild(_this.createElement('div', {
16651
+ attrs: {
16652
+ 'aria-label': _this.localeObj.getConstant('slide') + ' ' + (index + 1) + ' ' + _this.localeObj.getConstant('of') + ' ' + _this.slideItems.length
16653
+ }
16654
+ }));
16655
+ var 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
+ });
16661
+ }
16662
+ this.element.appendChild(indicatorWrap);
16663
+ };
16664
+ Carousel.prototype.renderKeyboardActions = function () {
16665
+ this.keyModule = new KeyboardEvents(this.element, { keyAction: this.keyHandler.bind(this), keyConfigs: this.keyConfigs });
16666
+ };
16667
+ Carousel.prototype.renderTouchActions = function () {
16668
+ if (!this.enableTouchSwipe) {
16669
+ return;
16670
+ }
16671
+ this.touchModule = new Touch(this.element, { swipe: this.swipeHandler.bind(this) });
16672
+ };
16673
+ Carousel.prototype.applyAnimation = function () {
16674
+ var animationTarget = this.element.querySelector("." + CLS_ITEMS$2);
16675
+ removeClass([animationTarget], [CLS_FADE_ANIMATION, CLS_SLIDE_ANIMATION]);
16676
+ if (this.animation.customEffect) {
16677
+ addClass([animationTarget], this.animation.customEffect);
16678
+ }
16679
+ else if (this.animation.effect !== 'None') {
16680
+ var animationClass = this.animation.effect === 'Fade' ? CLS_FADE_ANIMATION : CLS_SLIDE_ANIMATION;
16681
+ addClass([animationTarget], animationClass);
16682
+ }
16683
+ };
16684
+ Carousel.prototype.autoSlide = function () {
16685
+ this.resetSlideInterval();
16686
+ this.applySlideInterval();
16687
+ };
16688
+ Carousel.prototype.autoSlideChange = function () {
16689
+ var activeSlide = this.element.querySelector("." + CLS_ACTIVE$2);
16690
+ if (isNullOrUndefined(activeSlide)) {
16691
+ return;
16692
+ }
16693
+ var activeIndex = parseInt(activeSlide.dataset.index, 10);
16694
+ if (!this.loop && activeIndex === this.slideItems.length - 1) {
16695
+ this.resetSlideInterval();
16696
+ }
16697
+ else {
16698
+ var index = (activeIndex + 1) % this.slideItems.length;
16699
+ if (!this.element.classList.contains(CLS_HOVER)) {
16700
+ this.setActiveSlide(index, 'Next');
16701
+ }
16702
+ this.autoSlide();
16703
+ }
16704
+ };
16705
+ Carousel.prototype.applySlideInterval = function () {
16706
+ var _this = this;
16707
+ if (!this.autoPlay || this.element.classList.contains(CLS_HOVER)) {
16708
+ return;
16709
+ }
16710
+ var itemInterval = this.interval;
16711
+ if (this.items.length > 0 && !isNullOrUndefined(this.items[this.selectedIndex].interval)) {
16712
+ itemInterval = this.items[this.selectedIndex].interval;
16713
+ }
16714
+ this.autoSlideInterval = setInterval(function () { return _this.autoSlideChange(); }, itemInterval);
16715
+ };
16716
+ Carousel.prototype.resetSlideInterval = function () {
16717
+ clearInterval(this.autoSlideInterval);
16718
+ this.autoSlideInterval = null;
16719
+ };
16720
+ Carousel.prototype.getSlideIndex = function (direction) {
16721
+ var currentIndex = this.selectedIndex;
16722
+ if (direction === 'Previous') {
16723
+ currentIndex--;
16724
+ if (currentIndex < 0) {
16725
+ currentIndex = this.slideItems.length - 1;
16726
+ }
16727
+ }
16728
+ else {
16729
+ currentIndex++;
16730
+ if (currentIndex === this.slideItems.length) {
16731
+ currentIndex = 0;
16732
+ }
16733
+ }
16734
+ return currentIndex;
16735
+ };
16736
+ Carousel.prototype.setActiveSlide = function (currentIndex, direction, isSwiped) {
16737
+ var _this = this;
16738
+ if (isSwiped === void 0) { isSwiped = false; }
16739
+ if (this.element.querySelectorAll("." + CLS_ITEM$3 + "." + CLS_PREV_SLIDE + ",." + CLS_ITEM$3 + "." + CLS_NEXT_SLIDE).length > 0) {
16740
+ return;
16741
+ }
16742
+ var allSlides = [].slice.call(this.element.querySelectorAll("." + CLS_ITEM$3));
16743
+ var activeSlide = this.element.querySelector("." + CLS_ITEM$3 + "." + CLS_ACTIVE$2);
16744
+ if (isNullOrUndefined(activeSlide) && this.showIndicators) {
16745
+ var activeIndicator = this.element.querySelector("." + CLS_INDICATOR_BAR + "." + CLS_ACTIVE$2);
16746
+ var activeIndex_1 = parseInt(activeIndicator.dataset.index, 10);
16747
+ addClass([allSlides[activeIndex_1]], CLS_ACTIVE$2);
16748
+ return;
16749
+ }
16750
+ else if (isNullOrUndefined(activeSlide)) {
16751
+ addClass([allSlides[currentIndex]], CLS_ACTIVE$2);
16752
+ return;
16753
+ }
16754
+ var activeIndex = parseInt(activeSlide.dataset.index, 10);
16755
+ var currentSlide = allSlides[currentIndex];
16756
+ var eventArgs = {
16757
+ currentIndex: activeIndex,
16758
+ nextIndex: currentIndex,
16759
+ currentSlide: activeSlide,
16760
+ nextSlide: currentSlide,
16761
+ slideDirection: direction,
16762
+ isSwiped: isSwiped,
16763
+ cancel: false
16764
+ };
16765
+ this.trigger('slideChanging', eventArgs, function (args) {
16766
+ if (args.cancel) {
16767
+ return;
16768
+ }
16769
+ _this.setProperties({ selectedIndex: currentIndex }, true);
16770
+ attributes(args.currentSlide, { 'aria-hidden': 'true' });
16771
+ attributes(args.nextSlide, { 'aria-hidden': 'false' });
16772
+ var slideIndicators = [].slice.call(_this.element.querySelectorAll("." + CLS_INDICATOR_BAR));
16773
+ if (slideIndicators.length > 0) {
16774
+ attributes(slideIndicators[activeIndex], { 'aria-current': 'false' });
16775
+ attributes(slideIndicators[currentIndex], { 'aria-current': 'true' });
16776
+ removeClass(slideIndicators, CLS_ACTIVE$2);
16777
+ addClass([slideIndicators[currentIndex]], CLS_ACTIVE$2);
16778
+ }
16779
+ _this.slideChangedEventArgs = {
16780
+ currentIndex: args.nextIndex,
16781
+ previousIndex: args.currentIndex,
16782
+ currentSlide: args.nextSlide,
16783
+ previousSlide: args.currentSlide,
16784
+ slideDirection: direction,
16785
+ isSwiped: isSwiped
16786
+ };
16787
+ var slideHeight;
16788
+ if (_this.animation.effect === 'None' || _this.animation.customEffect) {
16789
+ _this.onTransitionEnd();
16790
+ }
16791
+ else if (_this.animation.effect === 'Slide') {
16792
+ if (direction === 'Previous') {
16793
+ addClass([args.nextSlide], CLS_PREV_SLIDE);
16794
+ slideHeight = args.nextSlide.offsetHeight;
16795
+ addClass([args.currentSlide, args.nextSlide], CLS_TRANSITION_END);
16796
+ }
16797
+ else {
16798
+ addClass([args.nextSlide], CLS_NEXT_SLIDE);
16799
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
16800
+ slideHeight = args.nextSlide.offsetHeight;
16801
+ addClass([args.currentSlide, args.nextSlide], CLS_TRANSITION_START);
16802
+ }
16803
+ }
16804
+ else if (_this.animation.effect === 'Fade') {
16805
+ removeClass([args.currentSlide], CLS_ACTIVE$2);
16806
+ addClass([args.nextSlide], CLS_ACTIVE$2);
16807
+ }
16808
+ _this.handleNavigatorsActions(currentIndex);
16809
+ });
16810
+ };
16811
+ Carousel.prototype.onTransitionEnd = function () {
16812
+ var _this = this;
16813
+ if (this.slideChangedEventArgs) {
16814
+ addClass([this.slideChangedEventArgs.currentSlide], CLS_ACTIVE$2);
16815
+ removeClass([this.slideChangedEventArgs.previousSlide], CLS_ACTIVE$2);
16816
+ this.trigger('slideChanged', this.slideChangedEventArgs, function () {
16817
+ removeClass(_this.element.querySelectorAll("." + CLS_ITEM$3), [CLS_PREV_SLIDE, CLS_NEXT_SLIDE, CLS_TRANSITION_START, CLS_TRANSITION_END]);
16818
+ _this.slideChangedEventArgs = null;
16819
+ });
16820
+ }
16821
+ };
16822
+ Carousel.prototype.setHtmlAttributes = function (attribute, element) {
16823
+ var keys = Object.keys(attribute);
16824
+ for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
16825
+ var key = keys_1[_i];
16826
+ if (key === 'class') {
16827
+ addClass([element], attribute[key]);
16828
+ }
16829
+ else {
16830
+ element.setAttribute(key, attribute[key]);
16831
+ }
16832
+ }
16833
+ };
16834
+ Carousel.prototype.templateParser = function (template) {
16835
+ if (template) {
16836
+ try {
16837
+ if (document.querySelectorAll(template).length) {
16838
+ return compile(document.querySelector(template).innerHTML.trim());
16839
+ }
16840
+ else {
16841
+ return compile(template);
16842
+ }
16843
+ }
16844
+ catch (error) {
16845
+ return compile(template);
16846
+ }
16847
+ }
16848
+ return undefined;
16849
+ };
16850
+ Carousel.prototype.getNavigatorState = function (target, isPrevious) {
16851
+ var button = target.querySelector("." + (isPrevious ? CLS_PREV_BUTTON : CLS_NEXT_BUTTON));
16852
+ if (button) {
16853
+ var buttonObj = getInstance(button, Button);
16854
+ return buttonObj.disabled;
16855
+ }
16856
+ return false;
16857
+ };
16858
+ Carousel.prototype.navigatorClickHandler = function (e) {
16859
+ var target = e.currentTarget;
16860
+ var isDisabled = this.getNavigatorState(target, target.classList.contains(CLS_PREVIOUS));
16861
+ if (isDisabled) {
16862
+ return;
16863
+ }
16864
+ var direction = target.classList.contains(CLS_PREVIOUS) ? 'Previous' : 'Next';
16865
+ this.setActiveSlide(this.getSlideIndex(direction), direction);
16866
+ this.autoSlide();
16867
+ };
16868
+ Carousel.prototype.indicatorClickHandler = function (e) {
16869
+ var target = closest(e.target, "." + CLS_INDICATOR_BAR);
16870
+ var index = parseInt(target.dataset.index, 10);
16871
+ if (this.selectedIndex !== index) {
16872
+ this.setActiveSlide(index, this.selectedIndex > index ? 'Previous' : 'Next');
16873
+ this.autoSlide();
16874
+ }
16875
+ };
16876
+ Carousel.prototype.playButtonClickHandler = function (e, isPropertyChange) {
16877
+ if (isPropertyChange === void 0) { isPropertyChange = false; }
16878
+ var playButton = this.element.querySelector("." + CLS_PLAY_BUTTON);
16879
+ if (playButton) {
16880
+ var buttonObj = getInstance(playButton, Button);
16881
+ if (!isPropertyChange) {
16882
+ this.setProperties({ autoPlay: !this.autoPlay }, true);
16883
+ }
16884
+ playButton.setAttribute('aria-label', this.localeObj.getConstant(this.autoPlay ? 'pauseSlideTransition' : 'playSlideTransition'));
16885
+ buttonObj.iconCss = CLS_ICON$1 + ' ' + (this.autoPlay ? CLS_PAUSE_ICON : CLS_PLAY_ICON);
16886
+ buttonObj.dataBind();
16887
+ var itemsContainer = this.element.querySelector("." + CLS_ITEMS$2);
16888
+ itemsContainer.setAttribute('aria-live', this.autoPlay ? 'off' : 'polite');
16889
+ if (this.autoPlay && !this.loop && this.selectedIndex === this.slideItems.length - 1) {
16890
+ this.setActiveSlide(0, 'Next');
16891
+ }
16892
+ this.autoSlide();
16893
+ }
16894
+ };
16895
+ Carousel.prototype.keyHandler = function (e) {
16896
+ var direction;
16897
+ var slideIndex;
16898
+ var isSlideTransition = false;
16899
+ var target = e.target;
16900
+ e.preventDefault();
16901
+ switch (e.action) {
16902
+ case 'space':
16903
+ if (this.showIndicators && target.classList.contains(CLS_INDICATOR$1)) {
16904
+ target.click();
16905
+ }
16906
+ else if (target.classList.contains(CLS_CAROUSEL) || target.classList.contains(CLS_PLAY_BUTTON)) {
16907
+ this.playButtonClickHandler(e);
16908
+ }
16909
+ else if (target.classList.contains(CLS_NEXT_BUTTON)) {
16910
+ this.next();
16911
+ }
16912
+ else if (target.classList.contains(CLS_PREV_BUTTON)) {
16913
+ this.prev();
16914
+ }
16915
+ break;
16916
+ case 'end':
16917
+ slideIndex = this.slideItems.length - 1;
16918
+ direction = 'Next';
16919
+ isSlideTransition = true;
16920
+ break;
16921
+ case 'home':
16922
+ slideIndex = 0;
16923
+ direction = 'Previous';
16924
+ isSlideTransition = true;
16925
+ break;
16926
+ case 'moveUp':
16927
+ case 'moveLeft':
16928
+ case 'moveDown':
16929
+ case 'moveRight':
16930
+ if (this.showIndicators && isNullOrUndefined(this.indicatorsTemplate)) {
16931
+ this.element.focus();
16932
+ }
16933
+ direction = (e.action === 'moveUp' || e.action === 'moveLeft') ? 'Previous' : 'Next';
16934
+ slideIndex = this.getSlideIndex(direction);
16935
+ isSlideTransition = !this.isSuspendSlideTransition(slideIndex, direction);
16936
+ break;
16937
+ }
16938
+ if (isSlideTransition) {
16939
+ this.setActiveSlide(slideIndex, direction);
16940
+ this.autoSlide();
16941
+ isSlideTransition = false;
16942
+ }
16943
+ };
16944
+ Carousel.prototype.swipeHandler = function (e) {
16945
+ if (this.element.classList.contains(CLS_HOVER)) {
16946
+ return;
16947
+ }
16948
+ var direction = (e.swipeDirection === 'Right') ? 'Previous' : 'Next';
16949
+ var slideIndex = this.getSlideIndex(direction);
16950
+ if (!this.isSuspendSlideTransition(slideIndex, direction)) {
16951
+ this.setActiveSlide(slideIndex, direction, true);
16952
+ this.autoSlide();
16953
+ }
16954
+ };
16955
+ Carousel.prototype.isSuspendSlideTransition = function (index, direction) {
16956
+ return !this.loop && (direction === 'Next' && index === 0 || direction === 'Previous' && index === this.slideItems.length - 1);
16957
+ };
16958
+ Carousel.prototype.handleNavigatorsActions = function (index) {
16959
+ if (this.buttonsVisibility === 'Hidden') {
16960
+ return;
16961
+ }
16962
+ if (this.showPlayButton) {
16963
+ var playButton = this.element.querySelector("." + CLS_PLAY_BUTTON);
16964
+ var isLastSlide = this.selectedIndex === this.slideItems.length - 1 && !this.loop;
16965
+ var isButtonUpdate = isNullOrUndefined(this.playButtonTemplate) && playButton && isLastSlide;
16966
+ if (isNullOrUndefined(this.playButtonTemplate) && playButton && !isLastSlide) {
16967
+ isButtonUpdate = !playButton.classList.contains(CLS_ACTIVE$2);
16968
+ }
16969
+ if (isButtonUpdate) {
16970
+ this.setProperties({ autoPlay: !isLastSlide }, true);
16971
+ playButton.setAttribute('aria-label', this.localeObj.getConstant(this.autoPlay ? 'pauseSlideTransition' : 'playSlideTransition'));
16972
+ var itemsContainer = this.element.querySelector("." + CLS_ITEMS$2);
16973
+ itemsContainer.setAttribute('aria-live', this.autoPlay ? 'off' : 'polite');
16974
+ var buttonObj = getInstance(playButton, Button);
16975
+ buttonObj.iconCss = CLS_ICON$1 + ' ' + (this.autoPlay ? CLS_PAUSE_ICON : CLS_PLAY_ICON);
16976
+ buttonObj.dataBind();
16977
+ }
16978
+ }
16979
+ var prevButton = this.element.querySelector("." + CLS_PREV_BUTTON);
16980
+ if (prevButton && isNullOrUndefined(this.previousButtonTemplate)) {
16981
+ var buttonObj = getInstance(prevButton, Button);
16982
+ buttonObj.disabled = !this.loop && index === 0;
16983
+ buttonObj.dataBind();
16984
+ }
16985
+ var nextButton = this.element.querySelector("." + CLS_NEXT_BUTTON);
16986
+ if (nextButton && isNullOrUndefined(this.nextButtonTemplate)) {
16987
+ var buttonObj = getInstance(nextButton, Button);
16988
+ buttonObj.disabled = !this.loop && index === this.slideItems.length - 1;
16989
+ buttonObj.dataBind();
16990
+ }
16991
+ };
16992
+ Carousel.prototype.onHoverActions = function (e) {
16993
+ var navigator = this.element.querySelector("." + CLS_NAVIGATORS);
16994
+ switch (e.type) {
16995
+ case 'mouseenter':
16996
+ if (this.buttonsVisibility === 'VisibleOnHover' && navigator) {
16997
+ removeClass([].slice.call(navigator.childNodes), CLS_HOVER_ARROWS);
16998
+ }
16999
+ addClass([this.element], CLS_HOVER);
17000
+ break;
17001
+ case 'mouseleave':
17002
+ if (this.buttonsVisibility === 'VisibleOnHover' && navigator) {
17003
+ addClass([].slice.call(navigator.childNodes), CLS_HOVER_ARROWS);
17004
+ }
17005
+ removeClass([this.element], CLS_HOVER);
17006
+ break;
17007
+ }
17008
+ this.autoSlide();
17009
+ };
17010
+ Carousel.prototype.onFocusActions = function (e) {
17011
+ switch (e.type) {
17012
+ case 'focusin':
17013
+ addClass([this.element], CLS_HOVER);
17014
+ break;
17015
+ case 'focusout':
17016
+ removeClass([this.element], CLS_HOVER);
17017
+ break;
17018
+ }
17019
+ this.autoSlide();
17020
+ };
17021
+ Carousel.prototype.destroyButtons = function () {
17022
+ var buttonCollections = [].slice.call(this.element.querySelectorAll('.e-control.e-btn'));
17023
+ for (var _i = 0, buttonCollections_1 = buttonCollections; _i < buttonCollections_1.length; _i++) {
17024
+ var button = buttonCollections_1[_i];
17025
+ var instance = getInstance(button, Button);
17026
+ if (instance) {
17027
+ instance.destroy();
17028
+ }
17029
+ }
17030
+ };
17031
+ Carousel.prototype.wireEvents = function () {
17032
+ EventHandler.add(this.element, 'focusin focusout', this.onFocusActions, this);
17033
+ EventHandler.add(this.element, 'mouseenter mouseleave', this.onHoverActions, this);
17034
+ EventHandler.add(this.element.firstElementChild, 'transitionend', this.onTransitionEnd, this);
17035
+ };
17036
+ Carousel.prototype.unWireEvents = function () {
17037
+ var _this = this;
17038
+ var indicators = [].slice.call(this.element.querySelectorAll("." + CLS_INDICATOR_BAR));
17039
+ indicators.forEach(function (indicator) {
17040
+ EventHandler.remove(indicator, 'click', _this.indicatorClickHandler);
17041
+ });
17042
+ var navigators = [].slice.call(this.element.querySelectorAll("." + CLS_PREVIOUS + ",." + CLS_NEXT));
17043
+ navigators.forEach(function (navigator) {
17044
+ EventHandler.remove(navigator, 'click', _this.navigatorClickHandler);
17045
+ });
17046
+ var playIcon = this.element.querySelector("." + CLS_PLAY_PAUSE);
17047
+ if (playIcon) {
17048
+ EventHandler.remove(playIcon, 'click', this.playButtonClickHandler);
17049
+ }
17050
+ EventHandler.remove(this.element.firstElementChild, 'transitionend', this.onTransitionEnd);
17051
+ EventHandler.clearEvents(this.element);
17052
+ };
17053
+ /**
17054
+ * Method to transit from the current slide to the previous slide.
17055
+ *
17056
+ * @returns {void}
17057
+ */
17058
+ Carousel.prototype.prev = function () {
17059
+ if (!this.loop && this.selectedIndex === 0) {
17060
+ return;
17061
+ }
17062
+ var index = (this.selectedIndex === 0) ? this.slideItems.length - 1 : this.selectedIndex - 1;
17063
+ this.setActiveSlide(index, 'Previous');
17064
+ this.autoSlide();
17065
+ };
17066
+ /**
17067
+ * Method to transit from the current slide to the next slide.
17068
+ *
17069
+ * @returns {void}
17070
+ */
17071
+ Carousel.prototype.next = function () {
17072
+ if (!this.loop && this.selectedIndex === this.slideItems.length - 1) {
17073
+ return;
17074
+ }
17075
+ var index = (this.selectedIndex === this.slideItems.length - 1) ? 0 : this.selectedIndex + 1;
17076
+ this.setActiveSlide(index, 'Next');
17077
+ this.autoSlide();
17078
+ };
17079
+ /**
17080
+ * Method to play the slides programmatically.
17081
+ *
17082
+ * @returns {void}
17083
+ */
17084
+ Carousel.prototype.play = function () {
17085
+ var playIcon = this.element.querySelector("." + CLS_PLAY_ICON);
17086
+ if (this.showPlayButton && playIcon) {
17087
+ classList(playIcon, [CLS_PAUSE_ICON], [CLS_PLAY_ICON]);
17088
+ var playButton = this.element.querySelector("." + CLS_PLAY_BUTTON);
17089
+ playButton.setAttribute('aria-label', this.localeObj.getConstant('pauseSlideTransition'));
17090
+ }
17091
+ this.setProperties({ autoPlay: true }, true);
17092
+ var itemsContainer = this.element.querySelector("." + CLS_ITEMS$2);
17093
+ itemsContainer.setAttribute('aria-live', 'off');
17094
+ this.applySlideInterval();
17095
+ };
17096
+ /**
17097
+ * Method to pause the slides programmatically.
17098
+ *
17099
+ * @returns {void}
17100
+ */
17101
+ Carousel.prototype.pause = function () {
17102
+ var pauseIcon = this.element.querySelector("." + CLS_PAUSE_ICON);
17103
+ if (this.showPlayButton && pauseIcon) {
17104
+ var playButton = this.element.querySelector("." + CLS_PLAY_BUTTON);
17105
+ playButton.setAttribute('aria-label', this.localeObj.getConstant('playSlideTransition'));
17106
+ classList(pauseIcon, [CLS_PLAY_ICON], [CLS_PAUSE_ICON]);
17107
+ }
17108
+ this.setProperties({ autoPlay: false }, true);
17109
+ var itemsContainer = this.element.querySelector("." + CLS_ITEMS$2);
17110
+ itemsContainer.setAttribute('aria-live', 'off');
17111
+ this.resetSlideInterval();
17112
+ };
17113
+ /**
17114
+ * Method to render react and angular templates
17115
+ *
17116
+ * @returns {void}
17117
+ * @private
17118
+ */
17119
+ Carousel.prototype.renderTemplates = function () {
17120
+ if (this.isAngular || this.isReact) {
17121
+ this.renderReactTemplates();
17122
+ }
17123
+ };
17124
+ /**
17125
+ * Method to reset react and angular templates
17126
+ *
17127
+ * @param {string[]} templates Accepts the template ID
17128
+ * @returns {void}
17129
+ * @private
17130
+ */
17131
+ Carousel.prototype.resetTemplates = function (templates) {
17132
+ if (this.isAngular || this.isReact) {
17133
+ this.clearTemplate(templates);
17134
+ }
17135
+ };
17136
+ /**
17137
+ * Method for destroy the carousel component.
17138
+ *
17139
+ * @returns {void}
17140
+ */
17141
+ Carousel.prototype.destroy = function () {
17142
+ var _this = this;
17143
+ this.resetTemplates();
17144
+ if (this.touchModule) {
17145
+ this.touchModule.destroy();
17146
+ this.touchModule = null;
17147
+ }
17148
+ this.keyModule.destroy();
17149
+ this.keyModule = null;
17150
+ this.resetSlideInterval();
17151
+ this.destroyButtons();
17152
+ this.unWireEvents();
17153
+ [].slice.call(this.element.children).forEach(function (ele) { _this.element.removeChild(ele); });
17154
+ removeClass([this.element], [CLS_CAROUSEL, this.cssClass, CLS_RTL$5]);
17155
+ ['tabindex', 'role', 'style'].forEach(function (attr) { _this.element.removeAttribute(attr); });
17156
+ _super.prototype.destroy.call(this);
17157
+ };
17158
+ __decorate$11([
17159
+ Collection([], CarouselItem)
17160
+ ], Carousel.prototype, "items", void 0);
17161
+ __decorate$11([
17162
+ Complex({}, CarouselAnimationSettings)
17163
+ ], Carousel.prototype, "animation", void 0);
17164
+ __decorate$11([
17165
+ Property()
17166
+ ], Carousel.prototype, "previousButtonTemplate", void 0);
17167
+ __decorate$11([
17168
+ Property()
17169
+ ], Carousel.prototype, "nextButtonTemplate", void 0);
17170
+ __decorate$11([
17171
+ Property()
17172
+ ], Carousel.prototype, "indicatorsTemplate", void 0);
17173
+ __decorate$11([
17174
+ Property()
17175
+ ], Carousel.prototype, "playButtonTemplate", void 0);
17176
+ __decorate$11([
17177
+ Property()
17178
+ ], Carousel.prototype, "cssClass", void 0);
17179
+ __decorate$11([
17180
+ Property([])
17181
+ ], Carousel.prototype, "dataSource", void 0);
17182
+ __decorate$11([
17183
+ Property()
17184
+ ], Carousel.prototype, "itemTemplate", void 0);
17185
+ __decorate$11([
17186
+ Property(0)
17187
+ ], Carousel.prototype, "selectedIndex", void 0);
17188
+ __decorate$11([
17189
+ Property('100%')
17190
+ ], Carousel.prototype, "width", void 0);
17191
+ __decorate$11([
17192
+ Property('100%')
17193
+ ], Carousel.prototype, "height", void 0);
17194
+ __decorate$11([
17195
+ Property(5000)
17196
+ ], Carousel.prototype, "interval", void 0);
17197
+ __decorate$11([
17198
+ Property(true)
17199
+ ], Carousel.prototype, "autoPlay", void 0);
17200
+ __decorate$11([
17201
+ Property(true)
17202
+ ], Carousel.prototype, "loop", void 0);
17203
+ __decorate$11([
17204
+ Property(false)
17205
+ ], Carousel.prototype, "showPlayButton", void 0);
17206
+ __decorate$11([
17207
+ Property(true)
17208
+ ], Carousel.prototype, "enableTouchSwipe", void 0);
17209
+ __decorate$11([
17210
+ Property(true)
17211
+ ], Carousel.prototype, "showIndicators", void 0);
17212
+ __decorate$11([
17213
+ Property('Visible')
17214
+ ], Carousel.prototype, "buttonsVisibility", void 0);
17215
+ __decorate$11([
17216
+ Property()
17217
+ ], Carousel.prototype, "htmlAttributes", void 0);
17218
+ __decorate$11([
17219
+ Event()
17220
+ ], Carousel.prototype, "slideChanging", void 0);
17221
+ __decorate$11([
17222
+ Event()
17223
+ ], Carousel.prototype, "slideChanged", void 0);
17224
+ Carousel = __decorate$11([
17225
+ NotifyPropertyChanges
17226
+ ], Carousel);
17227
+ return Carousel;
17228
+ }(Component));
17229
+
17230
+ /** Carousel export modules */
17231
+
16169
17232
  /**
16170
17233
  * Navigation all modules
16171
17234
  */
16172
17235
 
16173
- 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 };
17236
+ 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 };
16174
17237
  //# sourceMappingURL=ej2-navigations.es5.js.map