@syncfusion/ej2-navigations 19.4.55 → 20.1.48

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 (371) hide show
  1. package/CHANGELOG.md +41 -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 +1062 -27
  8. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  9. package/dist/es6/ej2-navigations.es5.js +1103 -30
  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 +5 -3
  23. package/src/common/menu-base.js +11 -13
  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 +11 -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-dark-definition.scss +1 -60
  80. package/styles/breadcrumb/_tailwind-definition.scss +2 -2
  81. package/styles/breadcrumb/_theme.scss +11 -5
  82. package/styles/breadcrumb/bootstrap-dark.css +10 -2
  83. package/styles/breadcrumb/bootstrap.css +10 -2
  84. package/styles/breadcrumb/bootstrap4.css +10 -2
  85. package/styles/breadcrumb/bootstrap5-dark.css +12 -4
  86. package/styles/breadcrumb/bootstrap5.css +12 -4
  87. package/styles/breadcrumb/fabric-dark.css +10 -4
  88. package/styles/breadcrumb/fabric.css +10 -4
  89. package/styles/breadcrumb/fluent-dark.css +444 -0
  90. package/styles/breadcrumb/fluent-dark.scss +4 -0
  91. package/styles/breadcrumb/fluent.css +444 -0
  92. package/styles/breadcrumb/fluent.scss +4 -0
  93. package/styles/breadcrumb/highcontrast-light.css +10 -4
  94. package/styles/breadcrumb/highcontrast.css +10 -4
  95. package/styles/breadcrumb/icons/_fluent-dark.scss +1 -0
  96. package/styles/breadcrumb/icons/_fluent.scss +4 -4
  97. package/styles/breadcrumb/icons/_tailwind-dark.scss +13 -2
  98. package/styles/breadcrumb/icons/_tailwind.scss +13 -2
  99. package/styles/breadcrumb/material-dark.css +10 -2
  100. package/styles/breadcrumb/material.css +10 -2
  101. package/styles/breadcrumb/tailwind-dark.css +28 -11
  102. package/styles/breadcrumb/tailwind.css +27 -10
  103. package/styles/carousel/_all.scss +2 -0
  104. package/styles/carousel/_bootstrap-dark-definition.scss +22 -0
  105. package/styles/carousel/_bootstrap-definition.scss +22 -0
  106. package/styles/carousel/_bootstrap4-definition.scss +22 -0
  107. package/styles/carousel/_bootstrap5-dark-definition.scss +1 -0
  108. package/styles/carousel/_bootstrap5-definition.scss +22 -0
  109. package/styles/carousel/_fabric-dark-definition.scss +22 -0
  110. package/styles/carousel/_fabric-definition.scss +22 -0
  111. package/styles/carousel/_fluent-dark-definition.scss +1 -0
  112. package/styles/carousel/_fluent-definition.scss +22 -0
  113. package/styles/carousel/_highcontrast-definition.scss +22 -0
  114. package/styles/carousel/_highcontrast-light-definition.scss +22 -0
  115. package/styles/carousel/_layout.scss +150 -0
  116. package/styles/carousel/_material-dark-definition.scss +22 -0
  117. package/styles/carousel/_material-definition.scss +22 -0
  118. package/styles/carousel/_tailwind-dark-definition.scss +1 -0
  119. package/styles/carousel/_tailwind-definition.scss +22 -0
  120. package/styles/carousel/_theme.scss +56 -0
  121. package/styles/carousel/bootstrap-dark.css +236 -0
  122. package/styles/carousel/bootstrap-dark.scss +5 -0
  123. package/styles/carousel/bootstrap.css +236 -0
  124. package/styles/carousel/bootstrap.scss +5 -0
  125. package/styles/carousel/bootstrap4.css +236 -0
  126. package/styles/carousel/bootstrap4.scss +5 -0
  127. package/styles/carousel/bootstrap5-dark.css +236 -0
  128. package/styles/carousel/bootstrap5-dark.scss +5 -0
  129. package/styles/carousel/bootstrap5.css +236 -0
  130. package/styles/carousel/bootstrap5.scss +5 -0
  131. package/styles/carousel/fabric-dark.css +236 -0
  132. package/styles/carousel/fabric-dark.scss +5 -0
  133. package/styles/carousel/fabric.css +236 -0
  134. package/styles/carousel/fabric.scss +5 -0
  135. package/styles/carousel/fluent-dark.css +236 -0
  136. package/styles/carousel/fluent-dark.scss +5 -0
  137. package/styles/carousel/fluent.css +236 -0
  138. package/styles/carousel/fluent.scss +5 -0
  139. package/styles/carousel/highcontrast-light.css +236 -0
  140. package/styles/carousel/highcontrast-light.scss +5 -0
  141. package/styles/carousel/highcontrast.css +236 -0
  142. package/styles/carousel/highcontrast.scss +5 -0
  143. package/styles/carousel/icons/_bootstrap-dark.scss +30 -0
  144. package/styles/carousel/icons/_bootstrap.scss +30 -0
  145. package/styles/carousel/icons/_bootstrap4.scss +30 -0
  146. package/styles/carousel/icons/_bootstrap5-dark.scss +1 -0
  147. package/styles/carousel/icons/_bootstrap5.scss +30 -0
  148. package/styles/carousel/icons/_fabric-dark.scss +30 -0
  149. package/styles/carousel/icons/_fabric.scss +30 -0
  150. package/styles/carousel/icons/_fluent-dark.scss +1 -0
  151. package/styles/carousel/icons/_fluent.scss +30 -0
  152. package/styles/carousel/icons/_highcontrast-light.scss +30 -0
  153. package/styles/carousel/icons/_highcontrast.scss +30 -0
  154. package/styles/carousel/icons/_material-dark.scss +30 -0
  155. package/styles/carousel/icons/_material.scss +30 -0
  156. package/styles/carousel/icons/_tailwind-dark.scss +1 -0
  157. package/styles/carousel/icons/_tailwind.scss +30 -0
  158. package/styles/carousel/material-dark.css +237 -0
  159. package/styles/carousel/material-dark.scss +5 -0
  160. package/styles/carousel/material.css +237 -0
  161. package/styles/carousel/material.scss +5 -0
  162. package/styles/carousel/tailwind-dark.css +237 -0
  163. package/styles/carousel/tailwind-dark.scss +5 -0
  164. package/styles/carousel/tailwind.css +237 -0
  165. package/styles/carousel/tailwind.scss +5 -0
  166. package/styles/context-menu/_bootstrap5-definition.scss +2 -2
  167. package/styles/context-menu/_fluent-dark-definition.scss +1 -0
  168. package/styles/context-menu/_fluent-definition.scss +10 -10
  169. package/styles/context-menu/_layout-mixin.scss +3 -0
  170. package/styles/context-menu/_layout.scss +11 -1
  171. package/styles/context-menu/_tailwind-definition.scss +2 -1
  172. package/styles/context-menu/bootstrap-dark.css +5 -0
  173. package/styles/context-menu/bootstrap.css +5 -0
  174. package/styles/context-menu/bootstrap4.css +5 -0
  175. package/styles/context-menu/bootstrap5-dark.css +16 -8
  176. package/styles/context-menu/bootstrap5.css +16 -8
  177. package/styles/context-menu/fabric-dark.css +5 -0
  178. package/styles/context-menu/fabric.css +5 -0
  179. package/styles/context-menu/fluent-dark.css +388 -0
  180. package/styles/context-menu/fluent-dark.scss +4 -0
  181. package/styles/context-menu/fluent.css +388 -0
  182. package/styles/context-menu/fluent.scss +4 -0
  183. package/styles/context-menu/highcontrast-light.css +5 -0
  184. package/styles/context-menu/highcontrast.css +5 -0
  185. package/styles/context-menu/icons/_fluent-dark.scss +1 -0
  186. package/styles/context-menu/icons/_fluent.scss +3 -3
  187. package/styles/context-menu/icons/_tailwind-dark.scss +3 -3
  188. package/styles/context-menu/icons/_tailwind.scss +3 -3
  189. package/styles/context-menu/material-dark.css +5 -0
  190. package/styles/context-menu/material.css +5 -0
  191. package/styles/context-menu/tailwind-dark.css +11 -4
  192. package/styles/context-menu/tailwind.css +11 -4
  193. package/styles/fabric-dark.css +312 -73
  194. package/styles/fabric-dark.scss +1 -0
  195. package/styles/fabric.css +312 -73
  196. package/styles/fabric.scss +1 -0
  197. package/styles/fluent-dark.css +10263 -0
  198. package/styles/fluent-dark.scss +11 -0
  199. package/styles/fluent.css +10263 -0
  200. package/styles/fluent.scss +11 -0
  201. package/styles/h-scroll/_bootstrap5-definition.scss +3 -3
  202. package/styles/h-scroll/_fluent-dark-definition.scss +1 -0
  203. package/styles/h-scroll/_layout.scss +0 -1
  204. package/styles/h-scroll/_material-dark-definition.scss +3 -3
  205. package/styles/h-scroll/bootstrap-dark.css +0 -1
  206. package/styles/h-scroll/bootstrap.css +0 -1
  207. package/styles/h-scroll/bootstrap4.css +0 -1
  208. package/styles/h-scroll/bootstrap5-dark.css +10 -11
  209. package/styles/h-scroll/bootstrap5.css +10 -11
  210. package/styles/h-scroll/fabric-dark.css +0 -1
  211. package/styles/h-scroll/fabric.css +0 -1
  212. package/styles/h-scroll/fluent-dark.css +326 -0
  213. package/styles/h-scroll/fluent-dark.scss +4 -0
  214. package/styles/h-scroll/fluent.css +326 -0
  215. package/styles/h-scroll/fluent.scss +4 -0
  216. package/styles/h-scroll/highcontrast-light.css +0 -1
  217. package/styles/h-scroll/highcontrast.css +0 -1
  218. package/styles/h-scroll/icons/_fluent-dark.scss +1 -0
  219. package/styles/h-scroll/icons/_fluent.scss +9 -9
  220. package/styles/h-scroll/icons/_tailwind.scss +8 -8
  221. package/styles/h-scroll/material-dark.css +3 -4
  222. package/styles/h-scroll/material.css +0 -1
  223. package/styles/h-scroll/tailwind-dark.css +8 -9
  224. package/styles/h-scroll/tailwind.css +8 -9
  225. package/styles/highcontrast-light.css +311 -72
  226. package/styles/highcontrast-light.scss +1 -0
  227. package/styles/highcontrast.css +312 -73
  228. package/styles/highcontrast.scss +1 -0
  229. package/styles/material-dark.css +314 -73
  230. package/styles/material-dark.scss +1 -0
  231. package/styles/material.css +311 -70
  232. package/styles/material.scss +1 -0
  233. package/styles/menu/_bootstrap5-definition.scss +4 -5
  234. package/styles/menu/_fluent-dark-definition.scss +1 -0
  235. package/styles/menu/_fluent-definition.scss +9 -9
  236. package/styles/menu/_layout.scss +8 -4
  237. package/styles/menu/_tailwind-definition.scss +1 -0
  238. package/styles/menu/_theme.scss +9 -0
  239. package/styles/menu/bootstrap-dark.css +1 -2
  240. package/styles/menu/bootstrap.css +1 -2
  241. package/styles/menu/bootstrap4.css +1 -2
  242. package/styles/menu/bootstrap5-dark.css +23 -24
  243. package/styles/menu/bootstrap5.css +23 -24
  244. package/styles/menu/fabric-dark.css +1 -2
  245. package/styles/menu/fabric.css +1 -2
  246. package/styles/menu/fluent-dark.css +1261 -0
  247. package/styles/menu/fluent-dark.scss +8 -0
  248. package/styles/menu/fluent.css +1261 -0
  249. package/styles/menu/fluent.scss +8 -0
  250. package/styles/menu/highcontrast-light.css +1 -2
  251. package/styles/menu/highcontrast.css +1 -2
  252. package/styles/menu/icons/_fluent-dark.scss +1 -0
  253. package/styles/menu/icons/_fluent.scss +14 -14
  254. package/styles/menu/icons/_tailwind-dark.scss +14 -14
  255. package/styles/menu/icons/_tailwind.scss +15 -15
  256. package/styles/menu/material-dark.css +1 -2
  257. package/styles/menu/material.css +1 -2
  258. package/styles/menu/tailwind-dark.css +18 -18
  259. package/styles/menu/tailwind.css +18 -18
  260. package/styles/sidebar/_fluent-dark-definition.scss +1 -0
  261. package/styles/sidebar/_theme.scss +5 -0
  262. package/styles/sidebar/bootstrap-dark.css +4 -0
  263. package/styles/sidebar/bootstrap.css +4 -0
  264. package/styles/sidebar/bootstrap4.css +4 -0
  265. package/styles/sidebar/bootstrap5-dark.css +4 -0
  266. package/styles/sidebar/bootstrap5.css +4 -0
  267. package/styles/sidebar/fabric-dark.css +4 -0
  268. package/styles/sidebar/fabric.css +4 -0
  269. package/styles/sidebar/fluent-dark.css +158 -0
  270. package/styles/sidebar/fluent-dark.scss +3 -0
  271. package/styles/sidebar/fluent.css +158 -0
  272. package/styles/sidebar/fluent.scss +3 -0
  273. package/styles/sidebar/highcontrast-light.css +4 -0
  274. package/styles/sidebar/highcontrast.css +4 -0
  275. package/styles/sidebar/material-dark.css +4 -0
  276. package/styles/sidebar/material.css +4 -0
  277. package/styles/sidebar/tailwind-dark.css +4 -0
  278. package/styles/sidebar/tailwind.css +4 -0
  279. package/styles/tab/_bootstrap5-definition.scss +7 -7
  280. package/styles/tab/_fluent-dark-definition.scss +1 -0
  281. package/styles/tab/_fluent-definition.scss +20 -20
  282. package/styles/tab/_highcontrast-definition.scss +1 -1
  283. package/styles/tab/_layout.scss +68 -12
  284. package/styles/tab/_tailwind-definition.scss +7 -7
  285. package/styles/tab/_theme.scss +12 -6
  286. package/styles/tab/bootstrap-dark.css +1 -1
  287. package/styles/tab/bootstrap.css +1 -1
  288. package/styles/tab/bootstrap4.css +1 -1
  289. package/styles/tab/bootstrap5-dark.css +23 -23
  290. package/styles/tab/bootstrap5.css +23 -23
  291. package/styles/tab/fabric-dark.css +1 -1
  292. package/styles/tab/fabric.css +1 -1
  293. package/styles/tab/fluent-dark.css +4394 -0
  294. package/styles/tab/fluent-dark.scss +5 -0
  295. package/styles/tab/fluent.css +4394 -0
  296. package/styles/tab/fluent.scss +5 -0
  297. package/styles/tab/highcontrast-light.css +1 -1
  298. package/styles/tab/highcontrast.css +2 -2
  299. package/styles/tab/icons/_fluent-dark.scss +1 -0
  300. package/styles/tab/icons/_fluent.scss +19 -18
  301. package/styles/tab/icons/_tailwind.scss +19 -18
  302. package/styles/tab/material-dark.css +1 -1
  303. package/styles/tab/material.css +1 -1
  304. package/styles/tab/tailwind-dark.css +43 -45
  305. package/styles/tab/tailwind.css +43 -45
  306. package/styles/tailwind-dark.css +429 -178
  307. package/styles/tailwind-dark.scss +1 -0
  308. package/styles/tailwind.css +428 -177
  309. package/styles/tailwind.scss +1 -0
  310. package/styles/toolbar/_bootstrap-dark-definition.scss +1 -0
  311. package/styles/toolbar/_bootstrap-definition.scss +1 -0
  312. package/styles/toolbar/_bootstrap4-definition.scss +1 -0
  313. package/styles/toolbar/_bootstrap5-definition.scss +12 -11
  314. package/styles/toolbar/_fabric-dark-definition.scss +1 -0
  315. package/styles/toolbar/_fabric-definition.scss +1 -0
  316. package/styles/toolbar/_fluent-dark-definition.scss +1 -0
  317. package/styles/toolbar/_fluent-definition.scss +14 -13
  318. package/styles/toolbar/_highcontrast-definition.scss +1 -0
  319. package/styles/toolbar/_highcontrast-light-definition.scss +1 -0
  320. package/styles/toolbar/_layout.scss +13 -5
  321. package/styles/toolbar/_material-dark-definition.scss +1 -0
  322. package/styles/toolbar/_material-definition.scss +1 -0
  323. package/styles/toolbar/_tailwind-definition.scss +4 -3
  324. package/styles/toolbar/_theme.scss +5 -1
  325. package/styles/toolbar/bootstrap-dark.css +4 -0
  326. package/styles/toolbar/bootstrap.css +4 -0
  327. package/styles/toolbar/bootstrap4.css +4 -0
  328. package/styles/toolbar/bootstrap5-dark.css +35 -31
  329. package/styles/toolbar/bootstrap5.css +35 -31
  330. package/styles/toolbar/fabric-dark.css +4 -0
  331. package/styles/toolbar/fabric.css +4 -0
  332. package/styles/toolbar/fluent-dark.css +1365 -0
  333. package/styles/toolbar/fluent-dark.scss +8 -0
  334. package/styles/toolbar/fluent.css +1365 -0
  335. package/styles/toolbar/fluent.scss +8 -0
  336. package/styles/toolbar/highcontrast-light.css +4 -0
  337. package/styles/toolbar/highcontrast.css +4 -0
  338. package/styles/toolbar/icons/_fluent-dark.scss +1 -0
  339. package/styles/toolbar/icons/_fluent.scss +3 -2
  340. package/styles/toolbar/icons/_tailwind.scss +3 -2
  341. package/styles/toolbar/material-dark.css +4 -0
  342. package/styles/toolbar/material.css +4 -0
  343. package/styles/toolbar/tailwind-dark.css +10 -6
  344. package/styles/toolbar/tailwind.css +10 -6
  345. package/styles/treeview/_bootstrap5-definition.scss +2 -2
  346. package/styles/treeview/_fluent-dark-definition.scss +1 -0
  347. package/styles/treeview/_fluent-definition.scss +2 -2
  348. package/styles/treeview/_layout.scss +8 -3
  349. package/styles/treeview/_tailwind-definition.scss +5 -5
  350. package/styles/treeview/bootstrap5-dark.css +4 -4
  351. package/styles/treeview/bootstrap5.css +4 -4
  352. package/styles/treeview/fluent-dark.css +1039 -0
  353. package/styles/treeview/fluent-dark.scss +6 -0
  354. package/styles/treeview/fluent.css +1039 -0
  355. package/styles/treeview/fluent.scss +6 -0
  356. package/styles/treeview/icons/_fluent-dark.scss +1 -0
  357. package/styles/treeview/icons/_fluent.scss +5 -5
  358. package/styles/treeview/icons/_tailwind-dark.scss +5 -5
  359. package/styles/treeview/icons/_tailwind.scss +5 -5
  360. package/styles/treeview/tailwind-dark.css +13 -14
  361. package/styles/treeview/tailwind.css +13 -14
  362. package/styles/v-scroll/_fluent-dark-definition.scss +1 -0
  363. package/styles/v-scroll/fluent-dark.css +247 -0
  364. package/styles/v-scroll/fluent-dark.scss +4 -0
  365. package/styles/v-scroll/fluent.css +247 -0
  366. package/styles/v-scroll/fluent.scss +4 -0
  367. package/styles/v-scroll/icons/_fluent-dark.scss +1 -0
  368. package/styles/v-scroll/icons/_fluent.scss +5 -4
  369. package/styles/v-scroll/icons/_tailwind.scss +5 -4
  370. package/styles/v-scroll/tailwind-dark.css +4 -4
  371. package/styles/v-scroll/tailwind.css +4 -4
@@ -198,11 +198,13 @@ let HScroll = class HScroll extends Component {
198
198
  createNavIcon(element) {
199
199
  const id = element.id.concat('_nav');
200
200
  const clsRight = 'e-' + element.id.concat('_nav ' + CLS_HSCROLLNAV + ' ' + CLS_HSCROLLNAVRIGHT);
201
- const nav = this.createElement('div', { id: id.concat('_right'), className: clsRight });
201
+ const rightAttributes = { 'role': 'button', 'id': id.concat('_right'), 'aria-label': 'Scroll right' };
202
+ const nav = this.createElement('div', { className: clsRight, attrs: rightAttributes });
202
203
  nav.setAttribute('aria-disabled', 'false');
203
204
  const navItem = this.createElement('div', { className: CLS_NAVRIGHTARROW + ' ' + CLS_NAVARROW + ' e-icons' });
204
205
  const clsLeft = 'e-' + element.id.concat('_nav ' + CLS_HSCROLLNAV + ' ' + CLS_HSCROLLNAVLEFT);
205
- const navEle = this.createElement('div', { id: id.concat('_left'), className: clsLeft + ' ' + CLS_DISABLE });
206
+ const leftAttributes = { 'role': 'button', 'id': id.concat('_left'), 'aria-label': 'Scroll left' };
207
+ const navEle = this.createElement('div', { className: clsLeft + ' ' + CLS_DISABLE, attrs: leftAttributes });
206
208
  navEle.setAttribute('aria-disabled', 'true');
207
209
  const navLeftItem = this.createElement('div', { className: CLS_NAVLEFTARROW + ' ' + CLS_NAVARROW + ' e-icons' });
208
210
  navEle.appendChild(navLeftItem);
@@ -390,7 +392,7 @@ let HScroll = class HScroll extends Component {
390
392
  classList(arrowIcon, [CLS_NAVLEFTARROW], [CLS_NAVRIGHTARROW]);
391
393
  }
392
394
  }
393
- else {
395
+ else if (addDisable && removeDisable) {
394
396
  addDisable.classList.add(CLS_DISABLE);
395
397
  addDisable.setAttribute('aria-disabled', 'true');
396
398
  addDisable.removeAttribute('tabindex');
@@ -1603,6 +1605,9 @@ let MenuBase = class MenuBase extends Component {
1603
1605
  this.navIdx.length !== 0 && closest(e.target, '.e-menu-parent.e-control')) {
1604
1606
  this.closeMenu(0, e);
1605
1607
  }
1608
+ else if (isOpen && !this.isMenu && selectAll('.e-menu-parent', wrapper)[ulIndex - 1] && e.which === 3) {
1609
+ this.closeMenu(null, e);
1610
+ }
1606
1611
  else {
1607
1612
  if (isOpen && (this.keyType === 'right' || this.keyType === 'click')) {
1608
1613
  this.afterCloseMenu(e);
@@ -1926,14 +1931,8 @@ let MenuBase = class MenuBase extends Component {
1926
1931
  this.setBlankIconStyle(this.popupWrapper);
1927
1932
  this.wireKeyboardEvent(this.popupWrapper);
1928
1933
  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
- }
1934
+ this.popupWrapper.style.left = this.left + 'px';
1935
+ this.popupWrapper.style.top = this.top + 'px';
1937
1936
  const animationOptions = this.animationSettings.effect !== 'None' ? {
1938
1937
  name: this.animationSettings.effect, duration: this.animationSettings.duration,
1939
1938
  timingFunction: this.animationSettings.easing
@@ -2646,8 +2645,9 @@ let MenuBase = class MenuBase extends Component {
2646
2645
  removeItem(item, navIdx, idx) {
2647
2646
  item.splice(idx, 1);
2648
2647
  const uls = this.getWrapper().children;
2649
- if (navIdx.length < uls.length) {
2650
- detach(uls[navIdx.length].children[idx]);
2648
+ const uls_length = this.hamburgerMode ? 1 : uls.length;
2649
+ if (navIdx.length < uls_length) {
2650
+ detach(uls[this.hamburgerMode ? 1 : navIdx.length].children[idx]);
2651
2651
  }
2652
2652
  }
2653
2653
  /**
@@ -3336,6 +3336,7 @@ let Toolbar = class Toolbar extends Component {
3336
3336
  }
3337
3337
  this.popObj = null;
3338
3338
  this.tbarAlign = null;
3339
+ this.tbarItemsCol = [];
3339
3340
  this.remove(this.element, 'e-toolpop');
3340
3341
  if (this.cssClass) {
3341
3342
  removeClass([this.element], this.cssClass.split(' '));
@@ -4805,6 +4806,9 @@ let Toolbar = class Toolbar extends Component {
4805
4806
  innerItems[0].parentNode.insertBefore(innerEle, innerItems[index]);
4806
4807
  }
4807
4808
  this.items.splice(index, 0, item);
4809
+ if (item.template) {
4810
+ this.tbarEle.splice(this.tbarEle.length - 1, 1);
4811
+ }
4808
4812
  this.tbarEle.splice(index, 0, innerEle);
4809
4813
  index++;
4810
4814
  this.offsetWid = itemsDiv.offsetWidth;
@@ -4876,11 +4880,15 @@ let Toolbar = class Toolbar extends Component {
4876
4880
  if (typeof (templateProp) === 'string' || !isComponent) {
4877
4881
  let templateFn;
4878
4882
  let val = templateProp;
4883
+ const regEx = new RegExp(/<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i);
4879
4884
  val = (typeof (templateProp) === 'string') ? templateProp.trim() : templateProp;
4880
4885
  try {
4881
4886
  if (typeof (templateProp) === 'object' && !isNullOrUndefined(templateProp.tagName)) {
4882
4887
  innerEle.appendChild(templateProp);
4883
4888
  }
4889
+ else if (typeof (templateProp) === 'string' && regEx.test(val)) {
4890
+ innerEle.innerHTML = val;
4891
+ }
4884
4892
  else if (document.querySelectorAll(val).length) {
4885
4893
  const ele = document.querySelector(val);
4886
4894
  const tempStr = ele.outerHTML.trim();
@@ -4890,6 +4898,9 @@ let Toolbar = class Toolbar extends Component {
4890
4898
  this.tempId.push(val);
4891
4899
  }
4892
4900
  }
4901
+ else {
4902
+ templateFn = compile(val);
4903
+ }
4893
4904
  }
4894
4905
  catch (e) {
4895
4906
  templateFn = compile(val);
@@ -5533,9 +5544,11 @@ let Accordion = class Accordion extends Component {
5533
5544
  if (!this.isDestroy) {
5534
5545
  this.isDestroy = false;
5535
5546
  }
5536
- if (!isNullOrUndefined(nested)) {
5537
- nested.classList.add(CLS_NEST);
5538
- this.isNested = true;
5547
+ if (nested && nested.firstElementChild && nested.firstElementChild.firstElementChild) {
5548
+ if (nested.firstElementChild.firstElementChild.classList.contains(CLS_ROOT$2)) {
5549
+ nested.classList.add(CLS_NEST);
5550
+ this.isNested = true;
5551
+ }
5539
5552
  }
5540
5553
  else {
5541
5554
  this.element.classList.add(CLS_ACRDN_ROOT);
@@ -5623,6 +5636,9 @@ let Accordion = class Accordion extends Component {
5623
5636
  if (document.querySelectorAll(template).length) {
5624
5637
  return compile(document.querySelector(template).innerHTML.trim());
5625
5638
  }
5639
+ else {
5640
+ return compile(template);
5641
+ }
5626
5642
  }
5627
5643
  catch (error) {
5628
5644
  return compile(template);
@@ -5987,6 +6003,9 @@ let Accordion = class Accordion extends Component {
5987
6003
  ele.appendChild(eleVal);
5988
6004
  eleVal.style.display = '';
5989
6005
  }
6006
+ else {
6007
+ templateFn = compile(value);
6008
+ }
5990
6009
  }
5991
6010
  catch (e) {
5992
6011
  if (typeof (value) === 'string') {
@@ -7260,11 +7279,12 @@ let Tab = class Tab extends Component {
7260
7279
  * @returns {void}
7261
7280
  */
7262
7281
  destroy() {
7263
- if (this.isReact) {
7282
+ if (this.isReact || this.isAngular) {
7264
7283
  this.clearTemplate();
7265
7284
  }
7266
7285
  if (!isNullOrUndefined(this.tbObj)) {
7267
7286
  this.tbObj.destroy();
7287
+ this.tbObj = null;
7268
7288
  }
7269
7289
  this.unWireEvents();
7270
7290
  ['role', 'aria-disabled', 'aria-activedescendant', 'tabindex', 'aria-orientation'].forEach((val) => {
@@ -7283,6 +7303,28 @@ let Tab = class Tab extends Component {
7283
7303
  cntEle.innerHTML = this.cnt;
7284
7304
  }
7285
7305
  }
7306
+ if (this.btnCls) {
7307
+ this.btnCls = null;
7308
+ }
7309
+ this.hdrEle = null;
7310
+ this.cntEle = null;
7311
+ this.tbItems = null;
7312
+ this.tbItem = null;
7313
+ this.tbPop = null;
7314
+ this.prevItem = null;
7315
+ this.popEle = null;
7316
+ this.bdrLine = null;
7317
+ this.content = null;
7318
+ this.dragItem = null;
7319
+ this.cloneElement = null;
7320
+ this.draggingItems = [];
7321
+ if (this.draggableItems && this.draggableItems.length > 0) {
7322
+ for (let i = 0; i < this.draggableItems.length; i++) {
7323
+ this.draggableItems[i].destroy();
7324
+ this.draggableItems[i] = null;
7325
+ }
7326
+ this.draggableItems = [];
7327
+ }
7286
7328
  super.destroy();
7287
7329
  this.trigger('destroyed');
7288
7330
  }
@@ -7315,6 +7357,9 @@ let Tab = class Tab extends Component {
7315
7357
  this.isSwipeed = false;
7316
7358
  this.itemIndexArray = [];
7317
7359
  this.templateEle = [];
7360
+ if (this.allowDragAndDrop) {
7361
+ this.dragArea = !isNullOrUndefined(this.dragArea) ? this.dragArea : '#' + this.element.id + ' ' + ('.' + CLS_HEADER$1);
7362
+ }
7318
7363
  if (!isNullOrUndefined(nested)) {
7319
7364
  nested.parentElement.classList.add(CLS_NEST$1);
7320
7365
  this.isNested = true;
@@ -7530,7 +7575,15 @@ let Tab = class Tab extends Component {
7530
7575
  }
7531
7576
  }
7532
7577
  parseObject(items, index) {
7533
- const tbCount = selectAll('.e-tab-header .' + CLS_TB_ITEM, this.element).length;
7578
+ const tbItems = selectAll('.e-tab-header .' + CLS_TB_ITEM, this.element);
7579
+ let maxId = this.lastIndex;
7580
+ if (!this.isReplace && tbItems.length > 0) {
7581
+ const idList = [];
7582
+ tbItems.forEach((item) => {
7583
+ idList.push(parseInt(item.id.slice(item.id.indexOf('_') + 1), 10));
7584
+ });
7585
+ maxId = Math.max(...idList);
7586
+ }
7534
7587
  const tItems = [];
7535
7588
  let txtWrapEle;
7536
7589
  const spliceArray = [];
@@ -7555,8 +7608,7 @@ let Tab = class Tab extends Component {
7555
7608
  else {
7556
7609
  itemIndex = index + i;
7557
7610
  }
7558
- const addIndex = this.isAdd ? tbCount + i : this.lastIndex + 1;
7559
- this.lastIndex = ((tbCount === 0) ? i : ((this.isReplace) ? (itemIndex) : (addIndex)));
7611
+ this.lastIndex = ((tbItems.length === 0) ? i : ((this.isReplace) ? (itemIndex) : (maxId + 1 + i)));
7560
7612
  const disabled = (item.disabled) ? ' ' + CLS_DISABLE$4 + ' ' + CLS_OVERLAY$2 : '';
7561
7613
  const hidden = (item.visible === false) ? ' ' + CLS_HIDDEN$1 : '';
7562
7614
  txtWrapEle = this.createElement('div', { className: CLS_TEXT, attrs: { 'role': 'presentation' } });
@@ -7861,7 +7913,12 @@ let Tab = class Tab extends Component {
7861
7913
  let templateFn;
7862
7914
  if (typeof val === 'string') {
7863
7915
  val = val.trim();
7864
- ele.innerHTML = SanitizeHtmlHelper.sanitize(val);
7916
+ if (this.isVue) {
7917
+ templateFn = compile(SanitizeHtmlHelper.sanitize(val));
7918
+ }
7919
+ else {
7920
+ ele.innerHTML = SanitizeHtmlHelper.sanitize(val);
7921
+ }
7865
7922
  }
7866
7923
  else {
7867
7924
  templateFn = compile(val);
@@ -8277,6 +8334,7 @@ let Tab = class Tab extends Component {
8277
8334
  }
8278
8335
  if (!isNullOrUndefined(this.cntEle) && !isNullOrUndefined(this.touchModule)) {
8279
8336
  this.touchModule.destroy();
8337
+ this.touchModule = null;
8280
8338
  }
8281
8339
  window.removeEventListener('resize', this.resizeContext);
8282
8340
  EventHandler.remove(this.element, 'mouseover', this.hoverHandler);
@@ -8306,8 +8364,13 @@ let Tab = class Tab extends Component {
8306
8364
  if (e.velocity < 3 && isNullOrUndefined(e.originalEvent.changedTouches)) {
8307
8365
  return;
8308
8366
  }
8309
- if (e.originalEvent && this.isNested) {
8310
- e.originalEvent.stopPropagation();
8367
+ if (this.isNested) {
8368
+ this.element.setAttribute('data-swipe', 'true');
8369
+ }
8370
+ const nestedTab = this.element.querySelector('[data-swipe="true"]');
8371
+ if (nestedTab) {
8372
+ nestedTab.removeAttribute('data-swipe');
8373
+ return;
8311
8374
  }
8312
8375
  this.isSwipeed = true;
8313
8376
  if (e.swipeDirection === 'Right' && this.selectedItem !== 0) {
@@ -8528,7 +8591,7 @@ let Tab = class Tab extends Component {
8528
8591
  this.reRenderItems();
8529
8592
  }
8530
8593
  else {
8531
- if (this.isRect) {
8594
+ if (this.isReact || this.isAngular) {
8532
8595
  this.clearTemplate();
8533
8596
  }
8534
8597
  this.setItems(newProp.items);
@@ -8541,11 +8604,12 @@ let Tab = class Tab extends Component {
8541
8604
  detach(selectElement.firstElementChild);
8542
8605
  }
8543
8606
  this.select(this.selectedItem);
8607
+ this.draggableItems = [];
8608
+ this.bindDraggable();
8544
8609
  }
8545
8610
  }
8546
8611
  }
8547
8612
  initializeDrag(target) {
8548
- this.dragArea = !isNullOrUndefined(this.dragArea) ? this.dragArea : '#' + this.element.id + ' ' + ('.' + CLS_HEADER$1);
8549
8613
  let dragObj = new Draggable(target, {
8550
8614
  dragArea: this.dragArea,
8551
8615
  dragTarget: '.' + CLS_TB_ITEM,
@@ -8721,6 +8785,7 @@ let Tab = class Tab extends Component {
8721
8785
  }
8722
8786
  itemDragStop(e) {
8723
8787
  detach(this.cloneElement);
8788
+ this.cloneElement = null;
8724
8789
  this.dragItem.querySelector('.' + CLS_WRAP).style.visibility = 'visible';
8725
8790
  document.body.style.cursor = '';
8726
8791
  let dragStopArgs = {
@@ -8749,6 +8814,7 @@ let Tab = class Tab extends Component {
8749
8814
  }
8750
8815
  }
8751
8816
  });
8817
+ this.dragItem = null;
8752
8818
  }
8753
8819
  /**
8754
8820
  * Enables or disables the specified Tab item. On passing value as `false`, the item will be disabled.
@@ -8890,12 +8956,25 @@ let Tab = class Tab extends Component {
8890
8956
  detach(cntTrg);
8891
8957
  }
8892
8958
  this.trigger('removed', tabRemovingArgs);
8959
+ if (this.draggableItems && this.draggableItems.length > 0) {
8960
+ this.draggableItems[index].destroy();
8961
+ this.draggableItems[index] = null;
8962
+ this.draggableItems.splice(index, 1);
8963
+ }
8893
8964
  if (trg.classList.contains(CLS_ACTIVE$1)) {
8894
8965
  index = (index > selectAll('.' + CLS_TB_ITEM + ':not(.' + CLS_TB_POPUP + ')', this.element).length - 1) ? index - 1 : index;
8895
8966
  this.enableAnimation = false;
8896
8967
  this.selectedItem = index;
8897
8968
  this.select(index);
8898
8969
  }
8970
+ else if (index !== this.selectedItem) {
8971
+ if (index < this.selectedItem) {
8972
+ index = this.itemIndexArray.indexOf(this.tbItem[this.selectedItem].id);
8973
+ this.setProperties({ selectedItem: index > -1 ? index : this.selectedItem }, true);
8974
+ this.prevIndex = this.selectedItem;
8975
+ }
8976
+ this.tbItem = selectAll('.' + CLS_TB_ITEM, this.getTabHeader());
8977
+ }
8899
8978
  if (selectAll('.' + CLS_TB_ITEM, this.element).length === 0) {
8900
8979
  this.hdrEle.style.display = 'none';
8901
8980
  }
@@ -9044,6 +9123,7 @@ let Tab = class Tab extends Component {
9044
9123
  }
9045
9124
  if (this.tbItem.length > args && args >= 0 && !isNaN(args)) {
9046
9125
  this.prevIndex = this.selectedItem;
9126
+ this.prevItem = this.tbItem[this.prevIndex];
9047
9127
  if (this.tbItem[args].classList.contains(CLS_TB_POPUP) && this.reorderActiveTab) {
9048
9128
  this.setActive(this.popupHandler(this.tbItem[args]), null, isInteracted);
9049
9129
  if ((!isNullOrUndefined(this.items) && this.items.length > 0) && this.allowDragAndDrop) {
@@ -9734,6 +9814,9 @@ let TreeView = TreeView_1 = class TreeView extends Component {
9734
9814
  if (document.querySelectorAll(template).length) {
9735
9815
  return compile(document.querySelector(template).innerHTML.trim());
9736
9816
  }
9817
+ else {
9818
+ return compile(template);
9819
+ }
9737
9820
  }
9738
9821
  catch (e) {
9739
9822
  return compile(template);
@@ -12004,7 +12087,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
12004
12087
  return { cancel: false, isInteracted: isNullOrUndefined(e) ? false : true, node: currLi, nodeData: nodeData, event: e };
12005
12088
  }
12006
12089
  renderNodeTemplate(data, textEle, dataId) {
12007
- let tempArr = this.nodeTemplateFn(data, this, 'nodeTemplate' + dataId, this.element.id + 'nodeTemplate', this.isStringTemplate, undefined, textEle);
12090
+ let tempArr = this.nodeTemplateFn(data, this, 'nodeTemplate' + dataId, this.element.id + 'nodeTemplate', this.isStringTemplate, undefined, textEle, this.root);
12008
12091
  if (tempArr) {
12009
12092
  tempArr = Array.prototype.slice.call(tempArr);
12010
12093
  append(tempArr, textEle);
@@ -15409,6 +15492,12 @@ let Breadcrumb = class Breadcrumb extends Component {
15409
15492
  }
15410
15493
  if (!(this.overflowMode === 'Menu' && liElems[i].classList.contains(MENUCLASS))) {
15411
15494
  liWidth += liElems[i].offsetWidth;
15495
+ if (liWidth > width) {
15496
+ maxItems = Math.ceil((i) / 2) + (this.overflowMode === 'Menu' && i <= 2 ? 0 : 1);
15497
+ this._maxItems = maxItems;
15498
+ this.initPvtProps();
15499
+ return this.reRenderItems();
15500
+ }
15412
15501
  }
15413
15502
  }
15414
15503
  }
@@ -15776,9 +15865,955 @@ Breadcrumb = __decorate$10([
15776
15865
  * Breadcrumb modules
15777
15866
  */
15778
15867
 
15868
+ var __decorate$11 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
15869
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
15870
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
15871
+ 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;
15872
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
15873
+ };
15874
+ /* eslint-disable @typescript-eslint/no-explicit-any */
15875
+ // Constant variables
15876
+ const CLS_CAROUSEL = 'e-carousel';
15877
+ const CLS_ACTIVE$2 = 'e-active';
15878
+ const CLS_RTL$5 = 'e-rtl';
15879
+ const CLS_ITEMS$2 = 'e-carousel-items';
15880
+ const CLS_ITEM$3 = 'e-carousel-item';
15881
+ const CLS_PREVIOUS = 'e-previous';
15882
+ const CLS_NEXT = 'e-next';
15883
+ const CLS_PREV_ICON = 'e-previous-icon';
15884
+ const CLS_NEXT_ICON = 'e-next-icon';
15885
+ const CLS_NAVIGATORS = 'e-carousel-navigators';
15886
+ const CLS_INDICATORS = 'e-carousel-indicators';
15887
+ const CLS_INDICATOR_BARS = 'e-indicator-bars';
15888
+ const CLS_INDICATOR_BAR = 'e-indicator-bar';
15889
+ const CLS_INDICATOR$1 = 'e-indicator';
15890
+ const CLS_ICON$1 = 'e-icons';
15891
+ const CLS_PLAY_PAUSE = 'e-play-pause';
15892
+ const CLS_PLAY_ICON = 'e-play-icon';
15893
+ const CLS_PAUSE_ICON = 'e-pause-icon';
15894
+ const CLS_PREV_BUTTON = 'e-previous-button';
15895
+ const CLS_NEXT_BUTTON = 'e-next-button';
15896
+ const CLS_PLAY_BUTTON = 'e-play-button';
15897
+ const CLS_FLAT = 'e-flat';
15898
+ const CLS_ROUND = 'e-round';
15899
+ const CLS_HOVER_ARROWS = 'e-hover-arrows';
15900
+ const CLS_HOVER = 'e-carousel-hover';
15901
+ const CLS_TEMPLATE$2 = 'e-template';
15902
+ const CLS_SLIDE_ANIMATION = 'e-carousel-slide-animation';
15903
+ const CLS_FADE_ANIMATION = 'e-carousel-fade-animation';
15904
+ const CLS_PREV_SLIDE = 'e-prev';
15905
+ const CLS_NEXT_SLIDE = 'e-next';
15906
+ const CLS_TRANSITION_START = 'e-transition-start';
15907
+ const CLS_TRANSITION_END = 'e-transition-end';
15908
+ /** Specifies the carousel individual item. */
15909
+ class CarouselItem extends ChildProperty {
15910
+ }
15911
+ __decorate$11([
15912
+ Property()
15913
+ ], CarouselItem.prototype, "cssClass", void 0);
15914
+ __decorate$11([
15915
+ Property()
15916
+ ], CarouselItem.prototype, "interval", void 0);
15917
+ __decorate$11([
15918
+ Property()
15919
+ ], CarouselItem.prototype, "template", void 0);
15920
+ __decorate$11([
15921
+ Property()
15922
+ ], CarouselItem.prototype, "htmlAttributes", void 0);
15923
+ /** Specifies the animation configuration for carousel items. */
15924
+ class CarouselAnimationSettings extends ChildProperty {
15925
+ }
15926
+ __decorate$11([
15927
+ Property('Slide')
15928
+ ], CarouselAnimationSettings.prototype, "effect", void 0);
15929
+ __decorate$11([
15930
+ Property()
15931
+ ], CarouselAnimationSettings.prototype, "customEffect", void 0);
15932
+ let Carousel = class Carousel extends Component {
15933
+ /**
15934
+ * Constructor for creating the Carousel widget
15935
+ *
15936
+ * @param {CarouselModel} options Accepts the carousel model properties to initiate the rendering
15937
+ * @param {string | HTMLElement} element Accepts the DOM element reference
15938
+ */
15939
+ constructor(options, element) {
15940
+ super(options, element);
15941
+ }
15942
+ getModuleName() {
15943
+ return CLS_CAROUSEL.replace('e-', '');
15944
+ }
15945
+ getPersistData() {
15946
+ return this.addOnPersist(['selectedIndex']);
15947
+ }
15948
+ preRender() {
15949
+ this.keyConfigs = {
15950
+ home: 'home',
15951
+ end: 'end',
15952
+ space: 'space',
15953
+ moveLeft: 'leftarrow',
15954
+ moveRight: 'rightarrow',
15955
+ moveUp: 'uparrow',
15956
+ moveDown: 'downarrow'
15957
+ };
15958
+ const defaultLocale = {
15959
+ nextSlide: 'Next slide',
15960
+ of: 'of',
15961
+ pauseSlideTransition: 'Pause slide transition',
15962
+ playSlideTransition: 'Play slide transition',
15963
+ previousSlide: 'Previous slide',
15964
+ slide: 'Slide',
15965
+ slideShow: 'Slide show'
15966
+ };
15967
+ this.localeObj = new L10n(this.getModuleName(), defaultLocale, this.locale);
15968
+ }
15969
+ render() {
15970
+ this.initialize();
15971
+ this.renderSlides();
15972
+ this.renderNavigators();
15973
+ this.renderPlayButton();
15974
+ this.renderIndicators();
15975
+ this.applyAnimation();
15976
+ this.wireEvents();
15977
+ }
15978
+ onPropertyChanged(newProp, oldProp) {
15979
+ let target;
15980
+ for (const prop of Object.keys(newProp)) {
15981
+ switch (prop) {
15982
+ case 'animation':
15983
+ for (const propName of Object.keys(newProp.animation)) {
15984
+ if (propName === 'customEffect' && !isNullOrUndefined(oldProp.animation.customEffect)) {
15985
+ removeClass([this.element.querySelector(`.${CLS_ITEMS$2}`)], oldProp.animation.customEffect);
15986
+ }
15987
+ }
15988
+ this.applyAnimation();
15989
+ break;
15990
+ case 'cssClass':
15991
+ classList(this.element, [newProp.cssClass], [oldProp.cssClass]);
15992
+ break;
15993
+ case 'selectedIndex':
15994
+ this.setActiveSlide(this.selectedIndex, oldProp.selectedIndex > this.selectedIndex ? 'Previous' : 'Next');
15995
+ this.autoSlide();
15996
+ break;
15997
+ case 'htmlAttributes':
15998
+ if (!isNullOrUndefined(this.htmlAttributes)) {
15999
+ this.setHtmlAttributes(this.htmlAttributes, this.element);
16000
+ }
16001
+ break;
16002
+ case 'enableTouchSwipe':
16003
+ if (!this.enableTouchSwipe && this.touchModule) {
16004
+ this.touchModule.destroy();
16005
+ }
16006
+ if (this.element.querySelector(`.${CLS_ITEMS$2}`)) {
16007
+ this.renderTouchActions();
16008
+ }
16009
+ break;
16010
+ case 'loop':
16011
+ if (this.loop && isNullOrUndefined(this.autoSlideInterval)) {
16012
+ this.applySlideInterval();
16013
+ }
16014
+ this.handleNavigatorsActions(this.selectedIndex);
16015
+ break;
16016
+ case 'enableRtl':
16017
+ if (this.enableRtl) {
16018
+ addClass([this.element], CLS_RTL$5);
16019
+ }
16020
+ else {
16021
+ removeClass([this.element], CLS_RTL$5);
16022
+ }
16023
+ break;
16024
+ case 'buttonsVisibility':
16025
+ target = this.element.querySelector(`.${CLS_NAVIGATORS}`);
16026
+ if (target) {
16027
+ switch (this.buttonsVisibility) {
16028
+ case 'Hidden':
16029
+ this.resetTemplates(['previousButtonTemplate', 'nextButtonTemplate']);
16030
+ remove(target);
16031
+ break;
16032
+ case 'VisibleOnHover':
16033
+ addClass([].slice.call(target.childNodes), CLS_HOVER_ARROWS);
16034
+ break;
16035
+ case 'Visible':
16036
+ removeClass([].slice.call(target.childNodes), CLS_HOVER_ARROWS);
16037
+ break;
16038
+ }
16039
+ }
16040
+ else {
16041
+ this.renderNavigators();
16042
+ this.renderPlayButton();
16043
+ }
16044
+ break;
16045
+ case 'width':
16046
+ setStyleAttribute(this.element, { 'width': formatUnit(this.width) });
16047
+ break;
16048
+ case 'height':
16049
+ setStyleAttribute(this.element, { 'height': formatUnit(this.height) });
16050
+ break;
16051
+ case 'autoPlay':
16052
+ if (this.showPlayButton && isNullOrUndefined(this.playButtonTemplate)) {
16053
+ this.playButtonClickHandler(null, true);
16054
+ }
16055
+ this.autoSlide();
16056
+ break;
16057
+ case 'interval':
16058
+ this.autoSlide();
16059
+ break;
16060
+ case 'showIndicators':
16061
+ target = this.element.querySelector(`.${CLS_INDICATORS}`);
16062
+ if (!this.showIndicators && target) {
16063
+ this.resetTemplates(['indicatorsTemplate']);
16064
+ remove(target);
16065
+ }
16066
+ this.renderIndicators();
16067
+ break;
16068
+ case 'showPlayButton':
16069
+ target = this.element.querySelector(`.${CLS_PLAY_PAUSE}`);
16070
+ if (!this.showPlayButton && target) {
16071
+ remove(target);
16072
+ this.resetTemplates(['playButtonTemplate']);
16073
+ }
16074
+ this.renderPlayButton();
16075
+ break;
16076
+ case 'items':
16077
+ case 'dataSource':
16078
+ target = this.element.querySelector(`.${CLS_ITEMS$2}`);
16079
+ if (target) {
16080
+ this.resetTemplates(['itemTemplate']);
16081
+ remove(target);
16082
+ }
16083
+ this.renderSlides();
16084
+ break;
16085
+ }
16086
+ }
16087
+ }
16088
+ initialize() {
16089
+ const carouselClasses = [];
16090
+ if (this.cssClass) {
16091
+ carouselClasses.push(this.cssClass);
16092
+ }
16093
+ if (this.enableRtl) {
16094
+ carouselClasses.push(CLS_RTL$5);
16095
+ }
16096
+ addClass([this.element], carouselClasses);
16097
+ setStyleAttribute(this.element, { 'width': formatUnit(this.width), 'height': formatUnit(this.height) });
16098
+ attributes(this.element, { 'tabindex': '0', 'aria-roledescription': 'carousel', 'aria-label': this.localeObj.getConstant('slideShow') });
16099
+ if (!isNullOrUndefined(this.htmlAttributes)) {
16100
+ this.setHtmlAttributes(this.htmlAttributes, this.element);
16101
+ }
16102
+ }
16103
+ renderSlides() {
16104
+ const itemsContainer = this.createElement('div', { className: CLS_ITEMS$2, attrs: { 'aria-live': this.autoPlay ? 'off' : 'polite' } });
16105
+ this.element.appendChild(itemsContainer);
16106
+ if (this.items.length > 0) {
16107
+ this.slideItems = this.items;
16108
+ this.items.forEach((item, index) => {
16109
+ this.renderSlide(item, item.template, index, itemsContainer);
16110
+ });
16111
+ }
16112
+ else if (this.dataSource.length > 0) {
16113
+ this.slideItems = this.dataSource;
16114
+ this.dataSource.forEach((item, index) => {
16115
+ this.renderSlide(item, this.itemTemplate, index, itemsContainer);
16116
+ });
16117
+ }
16118
+ this.renderTemplates();
16119
+ this.autoSlide();
16120
+ this.renderTouchActions();
16121
+ this.renderKeyboardActions();
16122
+ }
16123
+ renderSlide(item, itemTemplate, index, container) {
16124
+ const itemEle = this.createElement('div', {
16125
+ id: getUniqueID('carousel_item'),
16126
+ className: `${CLS_ITEM$3} ${item.cssClass ? item.cssClass : ''} ${this.selectedIndex === index ? CLS_ACTIVE$2 : ''}`,
16127
+ attrs: {
16128
+ 'aria-hidden': this.selectedIndex === index ? 'false' : 'true', 'data-index': index.toString(),
16129
+ 'aria-role': 'group', 'aria-roledescription': 'slide'
16130
+ }
16131
+ });
16132
+ if (!isNullOrUndefined(item.htmlAttributes)) {
16133
+ this.setHtmlAttributes(item.htmlAttributes, itemEle);
16134
+ }
16135
+ const templateId = this.element.id + '_template';
16136
+ const template = this.templateParser(itemTemplate)(item, this, 'itemTemplate', templateId, false);
16137
+ append(template, itemEle);
16138
+ container.appendChild(itemEle);
16139
+ }
16140
+ renderNavigators() {
16141
+ if (this.buttonsVisibility === 'Hidden') {
16142
+ return;
16143
+ }
16144
+ const navigators = this.createElement('div', { className: CLS_NAVIGATORS });
16145
+ const itemsContainer = this.element.querySelector(`.${CLS_ITEMS$2}`);
16146
+ itemsContainer.insertAdjacentElement('afterend', navigators);
16147
+ this.renderNavigatorButton('Previous');
16148
+ this.renderNavigatorButton('Next');
16149
+ this.renderTemplates();
16150
+ }
16151
+ renderNavigatorButton(direction) {
16152
+ const buttonContainer = this.createElement('div', {
16153
+ className: (direction === 'Previous' ? CLS_PREVIOUS : CLS_NEXT) + ' ' + (this.buttonsVisibility === 'VisibleOnHover' ? CLS_HOVER_ARROWS : ''),
16154
+ attrs: { 'aria-label': this.localeObj.getConstant(direction === 'Previous' ? 'previousSlide' : 'nextSlide') }
16155
+ });
16156
+ if (direction === 'Previous' && this.previousButtonTemplate) {
16157
+ addClass([buttonContainer], CLS_TEMPLATE$2);
16158
+ const templateId = this.element.id + '_previousButtonTemplate';
16159
+ const template = this.templateParser(this.previousButtonTemplate)({ type: 'Previous' }, this, 'previousButtonTemplate', templateId, false);
16160
+ append(template, buttonContainer);
16161
+ }
16162
+ else if (direction === 'Next' && this.nextButtonTemplate) {
16163
+ addClass([buttonContainer], CLS_TEMPLATE$2);
16164
+ const templateId = this.element.id + '_nextButtonTemplate';
16165
+ const template = this.templateParser(this.nextButtonTemplate)({ type: 'Next' }, this, 'nextButtonTemplate', templateId, false);
16166
+ append(template, buttonContainer);
16167
+ }
16168
+ else {
16169
+ const button = this.createElement('button');
16170
+ const buttonObj = new Button({
16171
+ cssClass: CLS_FLAT + ' ' + CLS_ROUND + ' ' + (direction === 'Previous' ? CLS_PREV_BUTTON : CLS_NEXT_BUTTON),
16172
+ iconCss: CLS_ICON$1 + ' ' + (direction === 'Previous' ? CLS_PREV_ICON : CLS_NEXT_ICON),
16173
+ enableRtl: this.enableRtl,
16174
+ disabled: !this.loop && this.selectedIndex === (direction === 'Previous' ? 0 : this.slideItems.length - 1)
16175
+ });
16176
+ buttonObj.appendTo(button);
16177
+ buttonContainer.appendChild(button);
16178
+ }
16179
+ this.element.querySelector('.' + CLS_NAVIGATORS).appendChild(buttonContainer);
16180
+ EventHandler.add(buttonContainer, 'click', this.navigatorClickHandler, this);
16181
+ }
16182
+ renderPlayButton() {
16183
+ if (this.buttonsVisibility === 'Hidden' || !this.showPlayButton) {
16184
+ return;
16185
+ }
16186
+ const playPauseWrap = this.createElement('div', {
16187
+ className: CLS_PLAY_PAUSE + ' ' + (this.buttonsVisibility === 'VisibleOnHover' ? CLS_HOVER_ARROWS : '')
16188
+ });
16189
+ if (this.playButtonTemplate) {
16190
+ addClass([playPauseWrap], CLS_TEMPLATE$2);
16191
+ const templateId = this.element.id + '_playButtonTemplate';
16192
+ const template = this.templateParser(this.playButtonTemplate)({}, this, 'playButtonTemplate', templateId, false);
16193
+ append(template, playPauseWrap);
16194
+ }
16195
+ else {
16196
+ const playButton = this.createElement('button', {
16197
+ attrs: { 'aria-label': this.localeObj.getConstant(this.autoPlay ? 'pauseSlideTransition' : 'playSlideTransition') }
16198
+ });
16199
+ const isLastSlide = this.selectedIndex === this.slideItems.length - 1 && !this.loop;
16200
+ const buttonObj = new Button({
16201
+ cssClass: CLS_FLAT + ' ' + CLS_ROUND + ' ' + CLS_PLAY_BUTTON,
16202
+ iconCss: CLS_ICON$1 + ' ' + (this.autoPlay && !isLastSlide ? CLS_PAUSE_ICON : CLS_PLAY_ICON),
16203
+ isToggle: true,
16204
+ enableRtl: this.enableRtl
16205
+ });
16206
+ if (isLastSlide) {
16207
+ this.setProperties({ autoPlay: false }, true);
16208
+ playButton.setAttribute('aria-label', this.localeObj.getConstant('playSlideTransition'));
16209
+ const itemsContainer = this.element.querySelector(`.${CLS_ITEMS$2}`);
16210
+ itemsContainer.setAttribute('aria-live', 'polite');
16211
+ }
16212
+ buttonObj.appendTo(playButton);
16213
+ playPauseWrap.appendChild(playButton);
16214
+ }
16215
+ const navigators = this.element.querySelector(`.${CLS_NAVIGATORS}`);
16216
+ navigators.insertBefore(playPauseWrap, navigators.lastElementChild);
16217
+ this.renderTemplates();
16218
+ EventHandler.add(playPauseWrap, 'click', this.playButtonClickHandler, this);
16219
+ }
16220
+ renderIndicators() {
16221
+ if (!this.showIndicators) {
16222
+ return;
16223
+ }
16224
+ const indicatorWrap = this.createElement('div', { className: CLS_INDICATORS });
16225
+ const indicatorBars = this.createElement('div', { className: CLS_INDICATOR_BARS });
16226
+ indicatorWrap.appendChild(indicatorBars);
16227
+ if (this.slideItems) {
16228
+ this.slideItems.forEach((item, index) => {
16229
+ const indicatorBar = this.createElement('div', {
16230
+ className: CLS_INDICATOR_BAR + ' ' + (this.selectedIndex === index ? CLS_ACTIVE$2 : ''),
16231
+ attrs: { 'data-index': index.toString(), 'aria-current': this.selectedIndex === index ? 'true' : 'false' }
16232
+ });
16233
+ if (this.indicatorsTemplate) {
16234
+ addClass([indicatorBar], CLS_TEMPLATE$2);
16235
+ const templateId = this.element.id + '_indicatorsTemplate';
16236
+ const template = this.templateParser(this.indicatorsTemplate)({ index: index, selectedIndex: this.selectedIndex }, this, 'indicatorsTemplate', templateId, false);
16237
+ append(template, indicatorBar);
16238
+ }
16239
+ else {
16240
+ const indicator = this.createElement('button', { className: CLS_INDICATOR$1 });
16241
+ indicatorBar.appendChild(indicator);
16242
+ indicator.appendChild(this.createElement('div', {
16243
+ attrs: {
16244
+ 'aria-label': this.localeObj.getConstant('slide') + ' ' + (index + 1) + ' ' + this.localeObj.getConstant('of') + ' ' + this.slideItems.length
16245
+ }
16246
+ }));
16247
+ const buttonObj = new Button({ cssClass: 'e-flat e-small' });
16248
+ buttonObj.appendTo(indicator);
16249
+ }
16250
+ indicatorBars.appendChild(indicatorBar);
16251
+ EventHandler.add(indicatorBar, 'click', this.indicatorClickHandler, this);
16252
+ });
16253
+ }
16254
+ this.element.appendChild(indicatorWrap);
16255
+ }
16256
+ renderKeyboardActions() {
16257
+ this.keyModule = new KeyboardEvents(this.element, { keyAction: this.keyHandler.bind(this), keyConfigs: this.keyConfigs });
16258
+ }
16259
+ renderTouchActions() {
16260
+ if (!this.enableTouchSwipe) {
16261
+ return;
16262
+ }
16263
+ this.touchModule = new Touch(this.element, { swipe: this.swipeHandler.bind(this) });
16264
+ }
16265
+ applyAnimation() {
16266
+ const animationTarget = this.element.querySelector(`.${CLS_ITEMS$2}`);
16267
+ removeClass([animationTarget], [CLS_FADE_ANIMATION, CLS_SLIDE_ANIMATION]);
16268
+ if (this.animation.customEffect) {
16269
+ addClass([animationTarget], this.animation.customEffect);
16270
+ }
16271
+ else if (this.animation.effect !== 'None') {
16272
+ const animationClass = this.animation.effect === 'Fade' ? CLS_FADE_ANIMATION : CLS_SLIDE_ANIMATION;
16273
+ addClass([animationTarget], animationClass);
16274
+ }
16275
+ }
16276
+ autoSlide() {
16277
+ this.resetSlideInterval();
16278
+ this.applySlideInterval();
16279
+ }
16280
+ autoSlideChange() {
16281
+ const activeSlide = this.element.querySelector(`.${CLS_ACTIVE$2}`);
16282
+ if (isNullOrUndefined(activeSlide)) {
16283
+ return;
16284
+ }
16285
+ const activeIndex = parseInt(activeSlide.dataset.index, 10);
16286
+ if (!this.loop && activeIndex === this.slideItems.length - 1) {
16287
+ this.resetSlideInterval();
16288
+ }
16289
+ else {
16290
+ const index = (activeIndex + 1) % this.slideItems.length;
16291
+ if (!this.element.classList.contains(CLS_HOVER)) {
16292
+ this.setActiveSlide(index, 'Next');
16293
+ }
16294
+ this.autoSlide();
16295
+ }
16296
+ }
16297
+ applySlideInterval() {
16298
+ if (!this.autoPlay || this.element.classList.contains(CLS_HOVER)) {
16299
+ return;
16300
+ }
16301
+ let itemInterval = this.interval;
16302
+ if (this.items.length > 0 && !isNullOrUndefined(this.items[this.selectedIndex].interval)) {
16303
+ itemInterval = this.items[this.selectedIndex].interval;
16304
+ }
16305
+ this.autoSlideInterval = setInterval(() => this.autoSlideChange(), itemInterval);
16306
+ }
16307
+ resetSlideInterval() {
16308
+ clearInterval(this.autoSlideInterval);
16309
+ this.autoSlideInterval = null;
16310
+ }
16311
+ getSlideIndex(direction) {
16312
+ let currentIndex = this.selectedIndex;
16313
+ if (direction === 'Previous') {
16314
+ currentIndex--;
16315
+ if (currentIndex < 0) {
16316
+ currentIndex = this.slideItems.length - 1;
16317
+ }
16318
+ }
16319
+ else {
16320
+ currentIndex++;
16321
+ if (currentIndex === this.slideItems.length) {
16322
+ currentIndex = 0;
16323
+ }
16324
+ }
16325
+ return currentIndex;
16326
+ }
16327
+ setActiveSlide(currentIndex, direction, isSwiped = false) {
16328
+ if (this.element.querySelectorAll(`.${CLS_ITEM$3}.${CLS_PREV_SLIDE},.${CLS_ITEM$3}.${CLS_NEXT_SLIDE}`).length > 0) {
16329
+ return;
16330
+ }
16331
+ const allSlides = [].slice.call(this.element.querySelectorAll(`.${CLS_ITEM$3}`));
16332
+ const activeSlide = this.element.querySelector(`.${CLS_ITEM$3}.${CLS_ACTIVE$2}`);
16333
+ if (isNullOrUndefined(activeSlide) && this.showIndicators) {
16334
+ const activeIndicator = this.element.querySelector(`.${CLS_INDICATOR_BAR}.${CLS_ACTIVE$2}`);
16335
+ const activeIndex = parseInt(activeIndicator.dataset.index, 10);
16336
+ addClass([allSlides[activeIndex]], CLS_ACTIVE$2);
16337
+ return;
16338
+ }
16339
+ else if (isNullOrUndefined(activeSlide)) {
16340
+ addClass([allSlides[currentIndex]], CLS_ACTIVE$2);
16341
+ return;
16342
+ }
16343
+ const activeIndex = parseInt(activeSlide.dataset.index, 10);
16344
+ const currentSlide = allSlides[currentIndex];
16345
+ const eventArgs = {
16346
+ currentIndex: activeIndex,
16347
+ nextIndex: currentIndex,
16348
+ currentSlide: activeSlide,
16349
+ nextSlide: currentSlide,
16350
+ slideDirection: direction,
16351
+ isSwiped: isSwiped,
16352
+ cancel: false
16353
+ };
16354
+ this.trigger('slideChanging', eventArgs, (args) => {
16355
+ if (args.cancel) {
16356
+ return;
16357
+ }
16358
+ this.setProperties({ selectedIndex: currentIndex }, true);
16359
+ attributes(args.currentSlide, { 'aria-hidden': 'true' });
16360
+ attributes(args.nextSlide, { 'aria-hidden': 'false' });
16361
+ const slideIndicators = [].slice.call(this.element.querySelectorAll(`.${CLS_INDICATOR_BAR}`));
16362
+ if (slideIndicators.length > 0) {
16363
+ attributes(slideIndicators[activeIndex], { 'aria-current': 'false' });
16364
+ attributes(slideIndicators[currentIndex], { 'aria-current': 'true' });
16365
+ removeClass(slideIndicators, CLS_ACTIVE$2);
16366
+ addClass([slideIndicators[currentIndex]], CLS_ACTIVE$2);
16367
+ }
16368
+ this.slideChangedEventArgs = {
16369
+ currentIndex: args.nextIndex,
16370
+ previousIndex: args.currentIndex,
16371
+ currentSlide: args.nextSlide,
16372
+ previousSlide: args.currentSlide,
16373
+ slideDirection: direction,
16374
+ isSwiped: isSwiped
16375
+ };
16376
+ let slideHeight;
16377
+ if (this.animation.effect === 'None' || this.animation.customEffect) {
16378
+ this.onTransitionEnd();
16379
+ }
16380
+ else if (this.animation.effect === 'Slide') {
16381
+ if (direction === 'Previous') {
16382
+ addClass([args.nextSlide], CLS_PREV_SLIDE);
16383
+ slideHeight = args.nextSlide.offsetHeight;
16384
+ addClass([args.currentSlide, args.nextSlide], CLS_TRANSITION_END);
16385
+ }
16386
+ else {
16387
+ addClass([args.nextSlide], CLS_NEXT_SLIDE);
16388
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
16389
+ slideHeight = args.nextSlide.offsetHeight;
16390
+ addClass([args.currentSlide, args.nextSlide], CLS_TRANSITION_START);
16391
+ }
16392
+ }
16393
+ else if (this.animation.effect === 'Fade') {
16394
+ removeClass([args.currentSlide], CLS_ACTIVE$2);
16395
+ addClass([args.nextSlide], CLS_ACTIVE$2);
16396
+ }
16397
+ this.handleNavigatorsActions(currentIndex);
16398
+ });
16399
+ }
16400
+ onTransitionEnd() {
16401
+ if (this.slideChangedEventArgs) {
16402
+ addClass([this.slideChangedEventArgs.currentSlide], CLS_ACTIVE$2);
16403
+ removeClass([this.slideChangedEventArgs.previousSlide], CLS_ACTIVE$2);
16404
+ this.trigger('slideChanged', this.slideChangedEventArgs, () => {
16405
+ removeClass(this.element.querySelectorAll(`.${CLS_ITEM$3}`), [CLS_PREV_SLIDE, CLS_NEXT_SLIDE, CLS_TRANSITION_START, CLS_TRANSITION_END]);
16406
+ this.slideChangedEventArgs = null;
16407
+ });
16408
+ }
16409
+ }
16410
+ setHtmlAttributes(attribute, element) {
16411
+ const keys = Object.keys(attribute);
16412
+ for (const key of keys) {
16413
+ if (key === 'class') {
16414
+ addClass([element], attribute[key]);
16415
+ }
16416
+ else {
16417
+ element.setAttribute(key, attribute[key]);
16418
+ }
16419
+ }
16420
+ }
16421
+ templateParser(template) {
16422
+ if (template) {
16423
+ try {
16424
+ if (document.querySelectorAll(template).length) {
16425
+ return compile(document.querySelector(template).innerHTML.trim());
16426
+ }
16427
+ else {
16428
+ return compile(template);
16429
+ }
16430
+ }
16431
+ catch (error) {
16432
+ return compile(template);
16433
+ }
16434
+ }
16435
+ return undefined;
16436
+ }
16437
+ getNavigatorState(target, isPrevious) {
16438
+ const button = target.querySelector(`.${isPrevious ? CLS_PREV_BUTTON : CLS_NEXT_BUTTON}`);
16439
+ if (button) {
16440
+ const buttonObj = getInstance(button, Button);
16441
+ return buttonObj.disabled;
16442
+ }
16443
+ return false;
16444
+ }
16445
+ navigatorClickHandler(e) {
16446
+ const target = e.currentTarget;
16447
+ const isDisabled = this.getNavigatorState(target, target.classList.contains(CLS_PREVIOUS));
16448
+ if (isDisabled) {
16449
+ return;
16450
+ }
16451
+ const direction = target.classList.contains(CLS_PREVIOUS) ? 'Previous' : 'Next';
16452
+ this.setActiveSlide(this.getSlideIndex(direction), direction);
16453
+ this.autoSlide();
16454
+ }
16455
+ indicatorClickHandler(e) {
16456
+ const target = closest(e.target, `.${CLS_INDICATOR_BAR}`);
16457
+ const index = parseInt(target.dataset.index, 10);
16458
+ if (this.selectedIndex !== index) {
16459
+ this.setActiveSlide(index, this.selectedIndex > index ? 'Previous' : 'Next');
16460
+ this.autoSlide();
16461
+ }
16462
+ }
16463
+ playButtonClickHandler(e, isPropertyChange = false) {
16464
+ const playButton = this.element.querySelector(`.${CLS_PLAY_BUTTON}`);
16465
+ if (playButton) {
16466
+ const buttonObj = getInstance(playButton, Button);
16467
+ if (!isPropertyChange) {
16468
+ this.setProperties({ autoPlay: !this.autoPlay }, true);
16469
+ }
16470
+ playButton.setAttribute('aria-label', this.localeObj.getConstant(this.autoPlay ? 'pauseSlideTransition' : 'playSlideTransition'));
16471
+ buttonObj.iconCss = CLS_ICON$1 + ' ' + (this.autoPlay ? CLS_PAUSE_ICON : CLS_PLAY_ICON);
16472
+ buttonObj.dataBind();
16473
+ const itemsContainer = this.element.querySelector(`.${CLS_ITEMS$2}`);
16474
+ itemsContainer.setAttribute('aria-live', this.autoPlay ? 'off' : 'polite');
16475
+ if (this.autoPlay && !this.loop && this.selectedIndex === this.slideItems.length - 1) {
16476
+ this.setActiveSlide(0, 'Next');
16477
+ }
16478
+ this.autoSlide();
16479
+ }
16480
+ }
16481
+ keyHandler(e) {
16482
+ let direction;
16483
+ let slideIndex;
16484
+ let isSlideTransition = false;
16485
+ const target = e.target;
16486
+ e.preventDefault();
16487
+ switch (e.action) {
16488
+ case 'space':
16489
+ if (this.showIndicators && target.classList.contains(CLS_INDICATOR$1)) {
16490
+ target.click();
16491
+ }
16492
+ else if (target.classList.contains(CLS_CAROUSEL) || target.classList.contains(CLS_PLAY_BUTTON)) {
16493
+ this.playButtonClickHandler(e);
16494
+ }
16495
+ else if (target.classList.contains(CLS_NEXT_BUTTON)) {
16496
+ this.next();
16497
+ }
16498
+ else if (target.classList.contains(CLS_PREV_BUTTON)) {
16499
+ this.prev();
16500
+ }
16501
+ break;
16502
+ case 'end':
16503
+ slideIndex = this.slideItems.length - 1;
16504
+ direction = 'Next';
16505
+ isSlideTransition = true;
16506
+ break;
16507
+ case 'home':
16508
+ slideIndex = 0;
16509
+ direction = 'Previous';
16510
+ isSlideTransition = true;
16511
+ break;
16512
+ case 'moveUp':
16513
+ case 'moveLeft':
16514
+ case 'moveDown':
16515
+ case 'moveRight':
16516
+ if (this.showIndicators && isNullOrUndefined(this.indicatorsTemplate)) {
16517
+ this.element.focus();
16518
+ }
16519
+ direction = (e.action === 'moveUp' || e.action === 'moveLeft') ? 'Previous' : 'Next';
16520
+ slideIndex = this.getSlideIndex(direction);
16521
+ isSlideTransition = !this.isSuspendSlideTransition(slideIndex, direction);
16522
+ break;
16523
+ }
16524
+ if (isSlideTransition) {
16525
+ this.setActiveSlide(slideIndex, direction);
16526
+ this.autoSlide();
16527
+ isSlideTransition = false;
16528
+ }
16529
+ }
16530
+ swipeHandler(e) {
16531
+ if (this.element.classList.contains(CLS_HOVER)) {
16532
+ return;
16533
+ }
16534
+ const direction = (e.swipeDirection === 'Right') ? 'Previous' : 'Next';
16535
+ const slideIndex = this.getSlideIndex(direction);
16536
+ if (!this.isSuspendSlideTransition(slideIndex, direction)) {
16537
+ this.setActiveSlide(slideIndex, direction, true);
16538
+ this.autoSlide();
16539
+ }
16540
+ }
16541
+ isSuspendSlideTransition(index, direction) {
16542
+ return !this.loop && (direction === 'Next' && index === 0 || direction === 'Previous' && index === this.slideItems.length - 1);
16543
+ }
16544
+ handleNavigatorsActions(index) {
16545
+ if (this.buttonsVisibility === 'Hidden') {
16546
+ return;
16547
+ }
16548
+ if (this.showPlayButton) {
16549
+ const playButton = this.element.querySelector(`.${CLS_PLAY_BUTTON}`);
16550
+ const isLastSlide = this.selectedIndex === this.slideItems.length - 1 && !this.loop;
16551
+ let isButtonUpdate = isNullOrUndefined(this.playButtonTemplate) && playButton && isLastSlide;
16552
+ if (isNullOrUndefined(this.playButtonTemplate) && playButton && !isLastSlide) {
16553
+ isButtonUpdate = !playButton.classList.contains(CLS_ACTIVE$2);
16554
+ }
16555
+ if (isButtonUpdate) {
16556
+ this.setProperties({ autoPlay: !isLastSlide }, true);
16557
+ playButton.setAttribute('aria-label', this.localeObj.getConstant(this.autoPlay ? 'pauseSlideTransition' : 'playSlideTransition'));
16558
+ const itemsContainer = this.element.querySelector(`.${CLS_ITEMS$2}`);
16559
+ itemsContainer.setAttribute('aria-live', this.autoPlay ? 'off' : 'polite');
16560
+ const buttonObj = getInstance(playButton, Button);
16561
+ buttonObj.iconCss = CLS_ICON$1 + ' ' + (this.autoPlay ? CLS_PAUSE_ICON : CLS_PLAY_ICON);
16562
+ buttonObj.dataBind();
16563
+ }
16564
+ }
16565
+ const prevButton = this.element.querySelector(`.${CLS_PREV_BUTTON}`);
16566
+ if (prevButton && isNullOrUndefined(this.previousButtonTemplate)) {
16567
+ const buttonObj = getInstance(prevButton, Button);
16568
+ buttonObj.disabled = !this.loop && index === 0;
16569
+ buttonObj.dataBind();
16570
+ }
16571
+ const nextButton = this.element.querySelector(`.${CLS_NEXT_BUTTON}`);
16572
+ if (nextButton && isNullOrUndefined(this.nextButtonTemplate)) {
16573
+ const buttonObj = getInstance(nextButton, Button);
16574
+ buttonObj.disabled = !this.loop && index === this.slideItems.length - 1;
16575
+ buttonObj.dataBind();
16576
+ }
16577
+ }
16578
+ onHoverActions(e) {
16579
+ const navigator = this.element.querySelector(`.${CLS_NAVIGATORS}`);
16580
+ switch (e.type) {
16581
+ case 'mouseenter':
16582
+ if (this.buttonsVisibility === 'VisibleOnHover' && navigator) {
16583
+ removeClass([].slice.call(navigator.childNodes), CLS_HOVER_ARROWS);
16584
+ }
16585
+ addClass([this.element], CLS_HOVER);
16586
+ break;
16587
+ case 'mouseleave':
16588
+ if (this.buttonsVisibility === 'VisibleOnHover' && navigator) {
16589
+ addClass([].slice.call(navigator.childNodes), CLS_HOVER_ARROWS);
16590
+ }
16591
+ removeClass([this.element], CLS_HOVER);
16592
+ break;
16593
+ }
16594
+ this.autoSlide();
16595
+ }
16596
+ onFocusActions(e) {
16597
+ switch (e.type) {
16598
+ case 'focusin':
16599
+ addClass([this.element], CLS_HOVER);
16600
+ break;
16601
+ case 'focusout':
16602
+ removeClass([this.element], CLS_HOVER);
16603
+ break;
16604
+ }
16605
+ this.autoSlide();
16606
+ }
16607
+ destroyButtons() {
16608
+ const buttonCollections = [].slice.call(this.element.querySelectorAll('.e-control.e-btn'));
16609
+ for (const button of buttonCollections) {
16610
+ const instance = getInstance(button, Button);
16611
+ if (instance) {
16612
+ instance.destroy();
16613
+ }
16614
+ }
16615
+ }
16616
+ wireEvents() {
16617
+ EventHandler.add(this.element, 'focusin focusout', this.onFocusActions, this);
16618
+ EventHandler.add(this.element, 'mouseenter mouseleave', this.onHoverActions, this);
16619
+ EventHandler.add(this.element.firstElementChild, 'transitionend', this.onTransitionEnd, this);
16620
+ }
16621
+ unWireEvents() {
16622
+ const indicators = [].slice.call(this.element.querySelectorAll(`.${CLS_INDICATOR_BAR}`));
16623
+ indicators.forEach((indicator) => {
16624
+ EventHandler.remove(indicator, 'click', this.indicatorClickHandler);
16625
+ });
16626
+ const navigators = [].slice.call(this.element.querySelectorAll(`.${CLS_PREVIOUS},.${CLS_NEXT}`));
16627
+ navigators.forEach((navigator) => {
16628
+ EventHandler.remove(navigator, 'click', this.navigatorClickHandler);
16629
+ });
16630
+ const playIcon = this.element.querySelector(`.${CLS_PLAY_PAUSE}`);
16631
+ if (playIcon) {
16632
+ EventHandler.remove(playIcon, 'click', this.playButtonClickHandler);
16633
+ }
16634
+ EventHandler.remove(this.element.firstElementChild, 'transitionend', this.onTransitionEnd);
16635
+ EventHandler.clearEvents(this.element);
16636
+ }
16637
+ /**
16638
+ * Method to transit from the current slide to the previous slide.
16639
+ *
16640
+ * @returns {void}
16641
+ */
16642
+ prev() {
16643
+ if (!this.loop && this.selectedIndex === 0) {
16644
+ return;
16645
+ }
16646
+ const index = (this.selectedIndex === 0) ? this.slideItems.length - 1 : this.selectedIndex - 1;
16647
+ this.setActiveSlide(index, 'Previous');
16648
+ this.autoSlide();
16649
+ }
16650
+ /**
16651
+ * Method to transit from the current slide to the next slide.
16652
+ *
16653
+ * @returns {void}
16654
+ */
16655
+ next() {
16656
+ if (!this.loop && this.selectedIndex === this.slideItems.length - 1) {
16657
+ return;
16658
+ }
16659
+ const index = (this.selectedIndex === this.slideItems.length - 1) ? 0 : this.selectedIndex + 1;
16660
+ this.setActiveSlide(index, 'Next');
16661
+ this.autoSlide();
16662
+ }
16663
+ /**
16664
+ * Method to play the slides programmatically.
16665
+ *
16666
+ * @returns {void}
16667
+ */
16668
+ play() {
16669
+ const playIcon = this.element.querySelector(`.${CLS_PLAY_ICON}`);
16670
+ if (this.showPlayButton && playIcon) {
16671
+ classList(playIcon, [CLS_PAUSE_ICON], [CLS_PLAY_ICON]);
16672
+ const playButton = this.element.querySelector(`.${CLS_PLAY_BUTTON}`);
16673
+ playButton.setAttribute('aria-label', this.localeObj.getConstant('pauseSlideTransition'));
16674
+ }
16675
+ this.setProperties({ autoPlay: true }, true);
16676
+ const itemsContainer = this.element.querySelector(`.${CLS_ITEMS$2}`);
16677
+ itemsContainer.setAttribute('aria-live', 'off');
16678
+ this.applySlideInterval();
16679
+ }
16680
+ /**
16681
+ * Method to pause the slides programmatically.
16682
+ *
16683
+ * @returns {void}
16684
+ */
16685
+ pause() {
16686
+ const pauseIcon = this.element.querySelector(`.${CLS_PAUSE_ICON}`);
16687
+ if (this.showPlayButton && pauseIcon) {
16688
+ const playButton = this.element.querySelector(`.${CLS_PLAY_BUTTON}`);
16689
+ playButton.setAttribute('aria-label', this.localeObj.getConstant('playSlideTransition'));
16690
+ classList(pauseIcon, [CLS_PLAY_ICON], [CLS_PAUSE_ICON]);
16691
+ }
16692
+ this.setProperties({ autoPlay: false }, true);
16693
+ const itemsContainer = this.element.querySelector(`.${CLS_ITEMS$2}`);
16694
+ itemsContainer.setAttribute('aria-live', 'off');
16695
+ this.resetSlideInterval();
16696
+ }
16697
+ /**
16698
+ * Method to render react and angular templates
16699
+ *
16700
+ * @returns {void}
16701
+ * @private
16702
+ */
16703
+ renderTemplates() {
16704
+ if (this.isAngular || this.isReact) {
16705
+ this.renderReactTemplates();
16706
+ }
16707
+ }
16708
+ /**
16709
+ * Method to reset react and angular templates
16710
+ *
16711
+ * @param {string[]} templates Accepts the template ID
16712
+ * @returns {void}
16713
+ * @private
16714
+ */
16715
+ resetTemplates(templates) {
16716
+ if (this.isAngular || this.isReact) {
16717
+ this.clearTemplate(templates);
16718
+ }
16719
+ }
16720
+ /**
16721
+ * Method for destroy the carousel component.
16722
+ *
16723
+ * @returns {void}
16724
+ */
16725
+ destroy() {
16726
+ this.resetTemplates();
16727
+ if (this.touchModule) {
16728
+ this.touchModule.destroy();
16729
+ this.touchModule = null;
16730
+ }
16731
+ this.keyModule.destroy();
16732
+ this.keyModule = null;
16733
+ this.resetSlideInterval();
16734
+ this.destroyButtons();
16735
+ this.unWireEvents();
16736
+ [].slice.call(this.element.children).forEach((ele) => { this.element.removeChild(ele); });
16737
+ removeClass([this.element], [CLS_CAROUSEL, this.cssClass, CLS_RTL$5]);
16738
+ ['tabindex', 'role', 'style'].forEach((attr) => { this.element.removeAttribute(attr); });
16739
+ super.destroy();
16740
+ }
16741
+ };
16742
+ __decorate$11([
16743
+ Collection([], CarouselItem)
16744
+ ], Carousel.prototype, "items", void 0);
16745
+ __decorate$11([
16746
+ Complex({}, CarouselAnimationSettings)
16747
+ ], Carousel.prototype, "animation", void 0);
16748
+ __decorate$11([
16749
+ Property()
16750
+ ], Carousel.prototype, "previousButtonTemplate", void 0);
16751
+ __decorate$11([
16752
+ Property()
16753
+ ], Carousel.prototype, "nextButtonTemplate", void 0);
16754
+ __decorate$11([
16755
+ Property()
16756
+ ], Carousel.prototype, "indicatorsTemplate", void 0);
16757
+ __decorate$11([
16758
+ Property()
16759
+ ], Carousel.prototype, "playButtonTemplate", void 0);
16760
+ __decorate$11([
16761
+ Property()
16762
+ ], Carousel.prototype, "cssClass", void 0);
16763
+ __decorate$11([
16764
+ Property([])
16765
+ ], Carousel.prototype, "dataSource", void 0);
16766
+ __decorate$11([
16767
+ Property()
16768
+ ], Carousel.prototype, "itemTemplate", void 0);
16769
+ __decorate$11([
16770
+ Property(0)
16771
+ ], Carousel.prototype, "selectedIndex", void 0);
16772
+ __decorate$11([
16773
+ Property('100%')
16774
+ ], Carousel.prototype, "width", void 0);
16775
+ __decorate$11([
16776
+ Property('100%')
16777
+ ], Carousel.prototype, "height", void 0);
16778
+ __decorate$11([
16779
+ Property(5000)
16780
+ ], Carousel.prototype, "interval", void 0);
16781
+ __decorate$11([
16782
+ Property(true)
16783
+ ], Carousel.prototype, "autoPlay", void 0);
16784
+ __decorate$11([
16785
+ Property(true)
16786
+ ], Carousel.prototype, "loop", void 0);
16787
+ __decorate$11([
16788
+ Property(false)
16789
+ ], Carousel.prototype, "showPlayButton", void 0);
16790
+ __decorate$11([
16791
+ Property(true)
16792
+ ], Carousel.prototype, "enableTouchSwipe", void 0);
16793
+ __decorate$11([
16794
+ Property(true)
16795
+ ], Carousel.prototype, "showIndicators", void 0);
16796
+ __decorate$11([
16797
+ Property('Visible')
16798
+ ], Carousel.prototype, "buttonsVisibility", void 0);
16799
+ __decorate$11([
16800
+ Property()
16801
+ ], Carousel.prototype, "htmlAttributes", void 0);
16802
+ __decorate$11([
16803
+ Event()
16804
+ ], Carousel.prototype, "slideChanging", void 0);
16805
+ __decorate$11([
16806
+ Event()
16807
+ ], Carousel.prototype, "slideChanged", void 0);
16808
+ Carousel = __decorate$11([
16809
+ NotifyPropertyChanges
16810
+ ], Carousel);
16811
+
16812
+ /** Carousel export modules */
16813
+
15779
16814
  /**
15780
16815
  * Navigation all modules
15781
16816
  */
15782
16817
 
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 };
16818
+ 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
16819
  //# sourceMappingURL=ej2-navigations.es2015.js.map