@syncfusion/ej2-navigations 20.1.47 → 20.1.51-10460

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 (417) hide show
  1. package/.eslintrc.json +243 -243
  2. package/CHANGELOG.md +1601 -1570
  3. package/README.md +194 -194
  4. package/dist/ej2-navigations.min.js +1 -0
  5. package/dist/ej2-navigations.umd.min.js +1 -10
  6. package/dist/ej2-navigations.umd.min.js.map +1 -1
  7. package/dist/es6/ej2-navigations.es2015.js +92 -80
  8. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  9. package/dist/es6/ej2-navigations.es5.js +251 -239
  10. package/dist/es6/ej2-navigations.es5.js.map +1 -1
  11. package/dist/global/ej2-navigations.min.js +1 -10
  12. package/dist/global/ej2-navigations.min.js.map +1 -1
  13. package/dist/global/index.d.ts +0 -9
  14. package/dist/ts/accordion/accordion.ts +1545 -0
  15. package/dist/ts/breadcrumb/breadcrumb.ts +873 -0
  16. package/dist/ts/carousel/carousel.ts +1181 -0
  17. package/dist/ts/common/h-scroll.ts +477 -0
  18. package/dist/ts/common/menu-base.ts +2357 -0
  19. package/dist/ts/common/menu-scroll.ts +105 -0
  20. package/dist/ts/common/v-scroll.ts +454 -0
  21. package/{src/context-menu/context-menu.d.ts → dist/ts/context-menu/context-menu.ts} +134 -88
  22. package/dist/ts/menu/menu.ts +302 -0
  23. package/dist/ts/sidebar/sidebar.ts +874 -0
  24. package/dist/ts/tab/tab.ts +2637 -0
  25. package/dist/ts/toolbar/toolbar.ts +2378 -0
  26. package/dist/ts/treeview/treeview.ts +5768 -0
  27. package/helpers/e2e/accordionHelper.js +70 -53
  28. package/helpers/e2e/contextmenuHelper.js +52 -35
  29. package/helpers/e2e/index.js +14 -12
  30. package/helpers/e2e/menuHelper.js +52 -35
  31. package/helpers/e2e/sidebarHelper.js +109 -92
  32. package/helpers/e2e/tabHelper.js +73 -56
  33. package/helpers/e2e/toolbarHelper.js +73 -56
  34. package/helpers/e2e/treeview.js +79 -61
  35. package/license +10 -10
  36. package/package.json +164 -164
  37. package/src/accordion/accordion-model.d.ts +190 -190
  38. package/src/accordion/accordion.js +19 -19
  39. package/src/breadcrumb/breadcrumb-model.d.ts +105 -105
  40. package/src/breadcrumb/breadcrumb.js +19 -19
  41. package/src/carousel/carousel-model.d.ts +148 -148
  42. package/src/carousel/carousel.js +19 -19
  43. package/src/common/h-scroll-model.d.ts +6 -6
  44. package/src/common/h-scroll.js +23 -21
  45. package/src/common/menu-base-model.d.ts +206 -206
  46. package/src/common/menu-base.js +31 -25
  47. package/src/common/v-scroll-model.d.ts +6 -6
  48. package/src/common/v-scroll.js +19 -19
  49. package/src/context-menu/context-menu-model.d.ts +18 -18
  50. package/src/context-menu/context-menu.js +19 -19
  51. package/src/menu/menu-model.d.ts +43 -43
  52. package/src/menu/menu.js +19 -19
  53. package/src/sidebar/sidebar-model.d.ts +191 -191
  54. package/src/sidebar/sidebar.js +19 -19
  55. package/src/tab/tab-model.d.ts +291 -291
  56. package/src/tab/tab.js +21 -21
  57. package/src/toolbar/toolbar-model.d.ts +195 -195
  58. package/src/toolbar/toolbar.js +23 -19
  59. package/src/treeview/treeview-model.d.ts +411 -411
  60. package/src/treeview/treeview.js +20 -20
  61. package/styles/accordion/_bds-definition.scss +167 -0
  62. package/styles/accordion/_bigger.scss +121 -0
  63. package/styles/accordion/_bootstrap5.3-definition.scss +168 -0
  64. package/styles/accordion/_fluent2-definition.scss +167 -0
  65. package/styles/accordion/_fusionnew-definition.scss +168 -0
  66. package/styles/accordion/_material3-dark-definition.scss +1 -0
  67. package/styles/accordion/_material3-definition.scss +168 -0
  68. package/styles/accordion/fluent2.scss +4 -0
  69. package/styles/accordion/icons/_bds.scss +15 -0
  70. package/styles/accordion/icons/_bootstrap5.3.scss +15 -0
  71. package/styles/accordion/icons/_fluent2.scss +15 -0
  72. package/styles/accordion/icons/_fusionnew.scss +15 -0
  73. package/styles/accordion/icons/_material3-dark.scss +1 -0
  74. package/styles/accordion/icons/_material3.scss +15 -0
  75. package/styles/accordion/material3-dark.scss +4 -0
  76. package/styles/accordion/material3.scss +4 -0
  77. package/styles/appbar/_all.scss +2 -0
  78. package/styles/appbar/_bds-definition.scss +25 -0
  79. package/styles/appbar/_bigger.scss +15 -0
  80. package/styles/appbar/_bootstrap-dark-definition.scss +6 -0
  81. package/styles/appbar/_bootstrap-definition.scss +6 -0
  82. package/styles/appbar/_bootstrap4-definition.scss +6 -0
  83. package/styles/appbar/_bootstrap5-definition.scss +6 -0
  84. package/styles/appbar/_bootstrap5.3-definition.scss +6 -0
  85. package/styles/appbar/_fabric-dark-definition.scss +6 -0
  86. package/styles/appbar/_fabric-definition.scss +6 -0
  87. package/styles/appbar/_fluent-definition.scss +6 -0
  88. package/styles/appbar/_fluent2-definition.scss +24 -0
  89. package/styles/appbar/_fusionnew-definition.scss +6 -0
  90. package/styles/appbar/_highcontrast-definition.scss +6 -0
  91. package/styles/appbar/_highcontrast-light-definition.scss +6 -0
  92. package/styles/appbar/_layout.scss +76 -0
  93. package/styles/appbar/_material-dark-definition.scss +6 -0
  94. package/styles/appbar/_material-definition.scss +6 -0
  95. package/styles/appbar/_material3-definition.scss +6 -0
  96. package/styles/appbar/_tailwind-definition.scss +6 -0
  97. package/styles/appbar/_theme.scss +216 -0
  98. package/styles/bootstrap-dark.css +1 -1
  99. package/styles/bootstrap.css +1 -1
  100. package/styles/bootstrap4.css +1 -1
  101. package/styles/bootstrap5-dark.css +1 -1
  102. package/styles/bootstrap5.css +1 -1
  103. package/styles/breadcrumb/_bds-definition.scss +60 -0
  104. package/styles/breadcrumb/_bigger.scss +160 -0
  105. package/styles/breadcrumb/_bootstrap5.3-definition.scss +61 -0
  106. package/styles/breadcrumb/_fluent2-definition.scss +61 -0
  107. package/styles/breadcrumb/_fusionnew-definition.scss +59 -0
  108. package/styles/breadcrumb/_layout.scss +1 -1
  109. package/styles/breadcrumb/_material3-dark-definition.scss +1 -0
  110. package/styles/breadcrumb/_material3-definition.scss +60 -0
  111. package/styles/breadcrumb/_tailwind-dark-definition.scss +1 -60
  112. package/styles/breadcrumb/_tailwind-definition.scss +3 -3
  113. package/styles/breadcrumb/bootstrap-dark.css +1 -1
  114. package/styles/breadcrumb/bootstrap.css +1 -1
  115. package/styles/breadcrumb/bootstrap4.css +1 -1
  116. package/styles/breadcrumb/bootstrap5-dark.css +1 -1
  117. package/styles/breadcrumb/bootstrap5.css +1 -1
  118. package/styles/breadcrumb/fabric-dark.css +1 -1
  119. package/styles/breadcrumb/fabric.css +1 -1
  120. package/styles/breadcrumb/fluent-dark.css +1 -1
  121. package/styles/breadcrumb/fluent.css +1 -1
  122. package/styles/breadcrumb/fluent2.scss +4 -0
  123. package/styles/breadcrumb/highcontrast-light.css +1 -1
  124. package/styles/breadcrumb/highcontrast.css +1 -1
  125. package/styles/breadcrumb/icons/_bds.scss +23 -0
  126. package/styles/breadcrumb/icons/_bootstrap5.3.scss +23 -0
  127. package/styles/breadcrumb/icons/_fluent2.scss +23 -0
  128. package/styles/breadcrumb/icons/_fusionnew.scss +23 -0
  129. package/styles/breadcrumb/icons/_material3-dark.scss +1 -0
  130. package/styles/breadcrumb/icons/_material3.scss +12 -0
  131. package/styles/breadcrumb/material-dark.css +1 -1
  132. package/styles/breadcrumb/material.css +1 -1
  133. package/styles/breadcrumb/material3-dark.scss +4 -0
  134. package/styles/breadcrumb/material3.scss +4 -0
  135. package/styles/breadcrumb/tailwind-dark.css +8 -8
  136. package/styles/breadcrumb/tailwind.css +8 -8
  137. package/styles/carousel/_bds-definition.scss +20 -0
  138. package/styles/carousel/_bootstrap5.3-definition.scss +20 -0
  139. package/styles/carousel/_fluent2-definition.scss +23 -0
  140. package/styles/carousel/_fusionnew-definition.scss +20 -0
  141. package/styles/carousel/_material3-dark-definition.scss +1 -0
  142. package/styles/carousel/_material3-definition.scss +21 -0
  143. package/styles/carousel/fluent2.scss +4 -0
  144. package/styles/carousel/icons/_bds.scss +30 -0
  145. package/styles/carousel/icons/_bootstrap5.3.scss +30 -0
  146. package/styles/carousel/icons/_fluent2.scss +30 -0
  147. package/styles/carousel/icons/_fusionnew.scss +30 -0
  148. package/styles/carousel/icons/_material3-dark.scss +1 -0
  149. package/styles/carousel/icons/_material3.scss +30 -0
  150. package/styles/carousel/material3-dark.scss +4 -0
  151. package/styles/carousel/material3.scss +4 -0
  152. package/styles/context-menu/_bds-definition.scss +68 -0
  153. package/styles/context-menu/_bigger.scss +96 -0
  154. package/styles/context-menu/_bootstrap5.3-definition.scss +52 -0
  155. package/styles/context-menu/_fluent2-definition.scss +52 -0
  156. package/styles/context-menu/_fusionnew-definition.scss +51 -0
  157. package/styles/context-menu/_material3-dark-definition.scss +1 -0
  158. package/styles/context-menu/_material3-definition.scss +51 -0
  159. package/styles/context-menu/fluent2.scss +4 -0
  160. package/styles/context-menu/icons/_bds.scss +31 -0
  161. package/styles/context-menu/icons/_bootstrap5.3.scss +31 -0
  162. package/styles/context-menu/icons/_fluent2.scss +31 -0
  163. package/styles/context-menu/icons/_fusionnew.scss +31 -0
  164. package/styles/context-menu/icons/_material3-dark.scss +1 -0
  165. package/styles/context-menu/icons/_material3.scss +31 -0
  166. package/styles/context-menu/material3-dark.scss +4 -0
  167. package/styles/context-menu/material3.scss +4 -0
  168. package/styles/fabric-dark.css +1 -1
  169. package/styles/fabric.css +1 -1
  170. package/styles/fluent-dark.css +1 -1
  171. package/styles/fluent.css +1 -1
  172. package/styles/fluent2.scss +34 -0
  173. package/styles/h-scroll/_bds-definition.scss +83 -0
  174. package/styles/h-scroll/_bigger.scss +39 -0
  175. package/styles/h-scroll/_bootstrap5.3-definition.scss +83 -0
  176. package/styles/h-scroll/_fluent2-definition.scss +83 -0
  177. package/styles/h-scroll/_fusionnew-definition.scss +83 -0
  178. package/styles/h-scroll/_material3-dark-definition.scss +1 -0
  179. package/styles/h-scroll/_material3-definition.scss +83 -0
  180. package/styles/h-scroll/fluent2.scss +4 -0
  181. package/styles/h-scroll/icons/_bds.scss +49 -0
  182. package/styles/h-scroll/icons/_bootstrap5.3.scss +49 -0
  183. package/styles/h-scroll/icons/_fluent2.scss +49 -0
  184. package/styles/h-scroll/icons/_fusionnew.scss +49 -0
  185. package/styles/h-scroll/icons/_material3-dark.scss +1 -0
  186. package/styles/h-scroll/icons/_material3.scss +49 -0
  187. package/styles/h-scroll/material3-dark.scss +4 -0
  188. package/styles/h-scroll/material3.scss +4 -0
  189. package/styles/highcontrast-light.css +1 -1
  190. package/styles/highcontrast.css +1 -1
  191. package/styles/material-dark.css +1 -1
  192. package/styles/material.css +1 -1
  193. package/styles/material3-dark.scss +34 -0
  194. package/styles/material3.scss +34 -0
  195. package/styles/menu/_bds-definition.scss +65 -0
  196. package/styles/menu/_bigger.scss +355 -0
  197. package/styles/menu/_bootstrap5.3-definition.scss +66 -0
  198. package/styles/menu/_fluent2-definition.scss +67 -0
  199. package/styles/menu/_fusionnew-definition.scss +66 -0
  200. package/styles/menu/_material3-dark-definition.scss +1 -0
  201. package/styles/menu/_material3-definition.scss +66 -0
  202. package/styles/menu/fluent2.scss +7 -0
  203. package/styles/menu/icons/_bds.scss +104 -0
  204. package/styles/menu/icons/_bootstrap5.3.scss +104 -0
  205. package/styles/menu/icons/_fluent2.scss +104 -0
  206. package/styles/menu/icons/_fusionnew.scss +104 -0
  207. package/styles/menu/icons/_material3-dark.scss +1 -0
  208. package/styles/menu/icons/_material3.scss +104 -0
  209. package/styles/menu/material3-dark.scss +7 -0
  210. package/styles/menu/material3.scss +7 -0
  211. package/styles/pager/_all.scss +2 -0
  212. package/styles/pager/_bds-definition.scss +152 -0
  213. package/styles/pager/_bigger.scss +311 -0
  214. package/styles/pager/_bootstrap-dark-definition.scss +151 -0
  215. package/styles/pager/_bootstrap-definition.scss +151 -0
  216. package/styles/pager/_bootstrap4-definition.scss +151 -0
  217. package/styles/pager/_bootstrap5-definition.scss +166 -0
  218. package/styles/pager/_bootstrap5.3-definition.scss +166 -0
  219. package/styles/pager/_fabric-dark-definition.scss +149 -0
  220. package/styles/pager/_fabric-definition.scss +149 -0
  221. package/styles/pager/_fluent-definition.scss +153 -0
  222. package/styles/pager/_fluent2-definition.scss +152 -0
  223. package/styles/pager/_fusionnew-definition.scss +166 -0
  224. package/styles/pager/_highcontrast-definition.scss +149 -0
  225. package/styles/pager/_highcontrast-light-definition.scss +149 -0
  226. package/styles/pager/_layout.scss +742 -0
  227. package/styles/pager/_material-dark-definition.scss +150 -0
  228. package/styles/pager/_material-definition.scss +150 -0
  229. package/styles/pager/_material3-definition.scss +166 -0
  230. package/styles/pager/_tailwind-definition.scss +152 -0
  231. package/styles/pager/_theme.scss +189 -0
  232. package/styles/pager/icons/_bds.scss +50 -0
  233. package/styles/pager/icons/_bootstrap-dark.scss +50 -0
  234. package/styles/pager/icons/_bootstrap.scss +50 -0
  235. package/styles/pager/icons/_bootstrap4.scss +50 -0
  236. package/styles/pager/icons/_bootstrap5.3.scss +50 -0
  237. package/styles/pager/icons/_bootstrap5.scss +50 -0
  238. package/styles/pager/icons/_fabric-dark.scss +50 -0
  239. package/styles/pager/icons/_fabric.scss +50 -0
  240. package/styles/pager/icons/_fluent.scss +50 -0
  241. package/styles/pager/icons/_fluent2.scss +50 -0
  242. package/styles/pager/icons/_fusionnew.scss +50 -0
  243. package/styles/pager/icons/_highcontrast-light.scss +50 -0
  244. package/styles/pager/icons/_highcontrast.scss +46 -0
  245. package/styles/pager/icons/_material-dark.scss +50 -0
  246. package/styles/pager/icons/_material.scss +46 -0
  247. package/styles/pager/icons/_material3.scss +50 -0
  248. package/styles/pager/icons/_tailwind.scss +50 -0
  249. package/styles/sidebar/_bds-definition.scss +53 -0
  250. package/styles/sidebar/_bootstrap5.3-definition.scss +6 -0
  251. package/styles/sidebar/_fluent2-definition.scss +8 -0
  252. package/styles/sidebar/_fusionnew-definition.scss +6 -0
  253. package/styles/sidebar/_material3-dark-definition.scss +1 -0
  254. package/styles/sidebar/_material3-definition.scss +4 -0
  255. package/styles/sidebar/fluent2.scss +3 -0
  256. package/styles/sidebar/material3-dark.scss +3 -0
  257. package/styles/sidebar/material3.scss +3 -0
  258. package/styles/stepper/_all.scss +2 -0
  259. package/styles/stepper/_bds-definition.scss +72 -0
  260. package/styles/stepper/_bigger.scss +53 -0
  261. package/styles/stepper/_bootstrap-dark-definition.scss +72 -0
  262. package/styles/stepper/_bootstrap-definition.scss +72 -0
  263. package/styles/stepper/_bootstrap4-definition.scss +72 -0
  264. package/styles/stepper/_bootstrap5-definition.scss +73 -0
  265. package/styles/stepper/_bootstrap5.3-definition.scss +72 -0
  266. package/styles/stepper/_fabric-dark-definition.scss +72 -0
  267. package/styles/stepper/_fabric-definition.scss +72 -0
  268. package/styles/stepper/_fluent-definition.scss +72 -0
  269. package/styles/stepper/_fluent2-definition.scss +72 -0
  270. package/styles/stepper/_fusionnew-definition.scss +72 -0
  271. package/styles/stepper/_highcontrast-definition.scss +72 -0
  272. package/styles/stepper/_highcontrast-light-definition.scss +72 -0
  273. package/styles/stepper/_layout.scss +431 -0
  274. package/styles/stepper/_material-dark-definition.scss +72 -0
  275. package/styles/stepper/_material-definition.scss +72 -0
  276. package/styles/stepper/_material3-definition.scss +72 -0
  277. package/styles/stepper/_tailwind-definition.scss +72 -0
  278. package/styles/stepper/_theme.scss +195 -0
  279. package/styles/stepper/icons/_bds.scss +5 -0
  280. package/styles/stepper/icons/_bootstrap-dark.scss +5 -0
  281. package/styles/stepper/icons/_bootstrap.scss +5 -0
  282. package/styles/stepper/icons/_bootstrap4.scss +5 -0
  283. package/styles/stepper/icons/_bootstrap5.3.scss +5 -0
  284. package/styles/stepper/icons/_bootstrap5.scss +5 -0
  285. package/styles/stepper/icons/_fabric-dark.scss +5 -0
  286. package/styles/stepper/icons/_fabric.scss +5 -0
  287. package/styles/stepper/icons/_fluent.scss +5 -0
  288. package/styles/stepper/icons/_fluent2.scss +5 -0
  289. package/styles/stepper/icons/_fusionnew.scss +5 -0
  290. package/styles/stepper/icons/_highcontrast-light.scss +5 -0
  291. package/styles/stepper/icons/_highcontrast.scss +5 -0
  292. package/styles/stepper/icons/_material-dark.scss +5 -0
  293. package/styles/stepper/icons/_material.scss +5 -0
  294. package/styles/stepper/icons/_material3.scss +5 -0
  295. package/styles/stepper/icons/_tailwind.scss +5 -0
  296. package/styles/tab/_bds-definition.scss +661 -0
  297. package/styles/tab/_bigger.scss +1270 -0
  298. package/styles/tab/_bootstrap5.3-definition.scss +636 -0
  299. package/styles/tab/_fluent2-definition.scss +667 -0
  300. package/styles/tab/_fusionnew-definition.scss +634 -0
  301. package/styles/tab/_material3-dark-definition.scss +1 -0
  302. package/styles/tab/_material3-definition.scss +636 -0
  303. package/styles/tab/fluent2.scss +5 -0
  304. package/styles/tab/icons/_bds.scss +90 -0
  305. package/styles/tab/icons/_bootstrap5.3.scss +90 -0
  306. package/styles/tab/icons/_fluent2.scss +98 -0
  307. package/styles/tab/icons/_fusionnew.scss +90 -0
  308. package/styles/tab/icons/_material3-dark.scss +1 -0
  309. package/styles/tab/icons/_material3.scss +90 -0
  310. package/styles/tab/material3-dark.scss +5 -0
  311. package/styles/tab/material3.scss +5 -0
  312. package/styles/tailwind-dark.css +8 -8
  313. package/styles/tailwind.css +8 -8
  314. package/styles/toolbar/_bds-definition.scss +197 -0
  315. package/styles/toolbar/_bigger.scss +309 -0
  316. package/styles/toolbar/_bootstrap5.3-definition.scss +198 -0
  317. package/styles/toolbar/_fluent2-definition.scss +198 -0
  318. package/styles/toolbar/_fusionnew-definition.scss +198 -0
  319. package/styles/toolbar/_material3-dark-definition.scss +1 -0
  320. package/styles/toolbar/_material3-definition.scss +199 -0
  321. package/styles/toolbar/fluent2.scss +6 -0
  322. package/styles/toolbar/icons/_bds.scss +14 -0
  323. package/styles/toolbar/icons/_bootstrap5.3.scss +14 -0
  324. package/styles/toolbar/icons/_fluent2.scss +14 -0
  325. package/styles/toolbar/icons/_fusionnew.scss +14 -0
  326. package/styles/toolbar/icons/_material3-dark.scss +1 -0
  327. package/styles/toolbar/icons/_material3.scss +14 -0
  328. package/styles/toolbar/material3-dark.scss +6 -0
  329. package/styles/toolbar/material3.scss +6 -0
  330. package/styles/treeview/_bds-definition.scss +132 -0
  331. package/styles/treeview/_bigger.scss +393 -0
  332. package/styles/treeview/_bootstrap5.3-definition.scss +119 -0
  333. package/styles/treeview/_fluent2-definition.scss +128 -0
  334. package/styles/treeview/_fusionnew-definition.scss +120 -0
  335. package/styles/treeview/_material3-dark-definition.scss +1 -0
  336. package/styles/treeview/_material3-definition.scss +110 -0
  337. package/styles/treeview/fluent2.scss +4 -0
  338. package/styles/treeview/icons/_bds.scss +44 -0
  339. package/styles/treeview/icons/_bootstrap5.3.scss +44 -0
  340. package/styles/treeview/icons/_fluent2.scss +44 -0
  341. package/styles/treeview/icons/_fusionnew.scss +44 -0
  342. package/styles/treeview/icons/_material3-dark.scss +1 -0
  343. package/styles/treeview/icons/_material3.scss +44 -0
  344. package/styles/treeview/material3-dark.scss +4 -0
  345. package/styles/treeview/material3.scss +4 -0
  346. package/styles/v-scroll/_bds-definition.scss +49 -0
  347. package/styles/v-scroll/_bigger.scss +28 -0
  348. package/styles/v-scroll/_bootstrap5.3-definition.scss +49 -0
  349. package/styles/v-scroll/_fluent2-definition.scss +49 -0
  350. package/styles/v-scroll/_fusionnew-definition.scss +49 -0
  351. package/styles/v-scroll/_material3-dark-definition.scss +1 -0
  352. package/styles/v-scroll/_material3-definition.scss +49 -0
  353. package/styles/v-scroll/fluent2.scss +4 -0
  354. package/styles/v-scroll/icons/_bds.scss +27 -0
  355. package/styles/v-scroll/icons/_bootstrap5.3.scss +27 -0
  356. package/styles/v-scroll/icons/_fluent2.scss +27 -0
  357. package/styles/v-scroll/icons/_fusionnew.scss +27 -0
  358. package/styles/v-scroll/icons/_material3-dark.scss +1 -0
  359. package/styles/v-scroll/icons/_material3.scss +27 -0
  360. package/styles/v-scroll/material3-dark.scss +4 -0
  361. package/styles/v-scroll/material3.scss +4 -0
  362. package/tslint.json +111 -111
  363. package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -63
  364. package/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -39
  365. package/accordion.d.ts +0 -4
  366. package/accordion.js +0 -4
  367. package/breadcrumb.d.ts +0 -4
  368. package/breadcrumb.js +0 -4
  369. package/carousel.d.ts +0 -4
  370. package/carousel.js +0 -4
  371. package/common.d.ts +0 -4
  372. package/common.js +0 -4
  373. package/context-menu.d.ts +0 -4
  374. package/context-menu.js +0 -4
  375. package/helpers/e2e/accordionHelper.d.ts +0 -56
  376. package/helpers/e2e/contextmenuHelper.d.ts +0 -37
  377. package/helpers/e2e/index.d.ts +0 -7
  378. package/helpers/e2e/menuHelper.d.ts +0 -37
  379. package/helpers/e2e/sidebarHelper.d.ts +0 -94
  380. package/helpers/e2e/tabHelper.d.ts +0 -60
  381. package/helpers/e2e/toolbarHelper.d.ts +0 -60
  382. package/helpers/e2e/treeview.d.ts +0 -50
  383. package/index.d.ts +0 -4
  384. package/index.js +0 -4
  385. package/menu.d.ts +0 -4
  386. package/menu.js +0 -4
  387. package/sidebar.d.ts +0 -4
  388. package/sidebar.js +0 -4
  389. package/src/accordion/accordion.d.ts +0 -440
  390. package/src/accordion/index.d.ts +0 -5
  391. package/src/breadcrumb/breadcrumb.d.ts +0 -255
  392. package/src/breadcrumb/index.d.ts +0 -5
  393. package/src/carousel/carousel.d.ts +0 -338
  394. package/src/carousel/index.d.ts +0 -3
  395. package/src/common/h-scroll.d.ts +0 -105
  396. package/src/common/index.d.ts +0 -9
  397. package/src/common/menu-base.d.ts +0 -526
  398. package/src/common/menu-scroll.d.ts +0 -29
  399. package/src/common/v-scroll.d.ts +0 -106
  400. package/src/context-menu/index.d.ts +0 -5
  401. package/src/index.d.ts +0 -13
  402. package/src/menu/index.d.ts +0 -5
  403. package/src/menu/menu.d.ts +0 -121
  404. package/src/sidebar/index.d.ts +0 -5
  405. package/src/sidebar/sidebar.d.ts +0 -321
  406. package/src/tab/index.d.ts +0 -5
  407. package/src/tab/tab.d.ts +0 -650
  408. package/src/toolbar/index.d.ts +0 -5
  409. package/src/toolbar/toolbar.d.ts +0 -470
  410. package/src/treeview/index.d.ts +0 -5
  411. package/src/treeview/treeview.d.ts +0 -1256
  412. package/tab.d.ts +0 -4
  413. package/tab.js +0 -4
  414. package/toolbar.d.ts +0 -4
  415. package/toolbar.js +0 -4
  416. package/treeview.d.ts +0 -4
  417. package/treeview.js +0 -4
@@ -0,0 +1,105 @@
1
+ import { select, detach } from '@syncfusion/ej2-base';
2
+ import { VScroll } from './v-scroll';
3
+ import { HScroll } from './h-scroll';
4
+
5
+ /**
6
+ * Used to add scroll in menu.
7
+ *
8
+ * @param {createElementType} createElement - Specifies the create element model
9
+ * @param {HTMLElement} container - Specifies the element container
10
+ * @param {HTMLElement} content - Specifies the content element
11
+ * @param {string} scrollType - Specifies the scroll type
12
+ * @param {boolean} enableRtl - Specifies the enable RTL property
13
+ * @param {boolean} offset - Specifies the offset value
14
+ * @returns {HTMLElement} - Element
15
+ * @hidden
16
+ */
17
+ export function addScrolling(
18
+ createElement: createElementType, container: HTMLElement, content: HTMLElement, scrollType: string, enableRtl: boolean,
19
+ offset?: number): HTMLElement {
20
+ let containerOffset: number; let contentOffset: number;
21
+ const parentElem: Element = container.parentElement;
22
+ if (scrollType === 'vscroll') {
23
+ containerOffset = offset || container.getBoundingClientRect().height; contentOffset = content.getBoundingClientRect().height;
24
+ } else {
25
+ containerOffset = container.getBoundingClientRect().width; contentOffset = content.getBoundingClientRect().width;
26
+ }
27
+ if (containerOffset < contentOffset) {
28
+ return createScrollbar(createElement, container, content, scrollType, enableRtl, offset);
29
+ } else if (parentElem) {
30
+ const width: number = parentElem.getBoundingClientRect().width;
31
+ if (width < containerOffset && scrollType === 'hscroll') {
32
+ contentOffset = width;
33
+ container.style.maxWidth = width + 'px';
34
+ return createScrollbar(createElement, container, content, scrollType, enableRtl, offset);
35
+ }
36
+ return content;
37
+ } else {
38
+ return content;
39
+ }
40
+ }
41
+
42
+ /**
43
+ * Used to create scroll bar in menu.
44
+ *
45
+ * @param {createElementType} createElement - Specifies the create element model
46
+ * @param {HTMLElement} container - Specifies the element container
47
+ * @param {HTMLElement} content - Specifies the content element
48
+ * @param {string} scrollType - Specifies the scroll type
49
+ * @param {boolean} enableRtl - Specifies the enable RTL property
50
+ * @param {boolean} offset - Specifies the offset value
51
+ * @returns {HTMLElement} - Element
52
+ * @hidden
53
+ */
54
+ function createScrollbar (createElement: createElementType, container: HTMLElement, content: HTMLElement, scrollType: string,
55
+ enableRtl: boolean, offset?: number): HTMLElement {
56
+ const scrollEle: HTMLElement = createElement('div', { className: 'e-menu-' + scrollType });
57
+ container.appendChild(scrollEle);
58
+ scrollEle.appendChild(content);
59
+ if (offset) {
60
+ scrollEle.style.overflow = 'hidden';
61
+ scrollEle.style.height = offset + 'px';
62
+ } else {
63
+ scrollEle.style.maxHeight = container.style.maxHeight;
64
+ container.style.overflow = 'hidden';
65
+ }
66
+ let scrollObj: VScroll | HScroll;
67
+ if (scrollType === 'vscroll') {
68
+ scrollObj = new VScroll({ enableRtl: enableRtl }, scrollEle);
69
+ scrollObj.scrollStep = (select('.e-' + scrollType + '-bar', container) as HTMLElement).offsetHeight / 2;
70
+ } else {
71
+ scrollObj = new HScroll({ enableRtl: enableRtl }, scrollEle);
72
+ scrollObj.scrollStep = (select('.e-' + scrollType + '-bar', container) as HTMLElement).offsetWidth;
73
+ }
74
+ return scrollEle;
75
+ }
76
+
77
+ /**
78
+ * Used to destroy the scroll option.
79
+ *
80
+ * @param {VScroll | HScroll} scrollObj - Specifies the scroller object
81
+ * @param {Element} element - Specifies the element
82
+ * @param {HTMLElement} skipEle - Specifies the skip element
83
+ * @returns {void}
84
+ * @hidden
85
+ */
86
+ export function destroyScroll(scrollObj: VScroll | HScroll, element: Element, skipEle?: HTMLElement): void {
87
+ if (scrollObj) {
88
+ const menu: Element = select('.e-menu-parent', element);
89
+ if (menu) {
90
+ if (!skipEle || skipEle === menu) {
91
+ scrollObj.destroy();
92
+ element.parentElement.appendChild(menu);
93
+ detach(element);
94
+ }
95
+ } else {
96
+ scrollObj.destroy();
97
+ detach(element);
98
+ }
99
+ }
100
+ }
101
+
102
+ type createElementType = (
103
+ tag: string,
104
+ prop?: { className?: string }
105
+ ) => HTMLElement;
@@ -0,0 +1,454 @@
1
+ import { Touch, ScrollEventArgs, TouchEventArgs, Component, EventHandler, selectAll, getUniqueID, removeClass } from '@syncfusion/ej2-base';
2
+ import { NotifyPropertyChanges, INotifyPropertyChanged, Property, Browser, detach, createElement as buildTag } from '@syncfusion/ej2-base';
3
+ import { classList, SwipeEventArgs, isNullOrUndefined } from '@syncfusion/ej2-base';
4
+ import { VScrollModel } from './v-scroll-model';
5
+
6
+ type HTEle = HTMLElement;
7
+ type Str = string;
8
+
9
+ const CLS_ROOT: Str = 'e-vscroll';
10
+ const CLS_RTL: Str = 'e-rtl';
11
+ const CLS_DISABLE: Str = 'e-overlay';
12
+ const CLS_VSCROLLBAR: Str = 'e-vscroll-bar';
13
+ const CLS_VSCROLLCON: Str = 'e-vscroll-content';
14
+ const CLS_NAVARROW: Str = 'e-nav-arrow';
15
+ const CLS_NAVUPARROW: Str = 'e-nav-up-arrow';
16
+ const CLS_NAVDOWNARROW: Str = 'e-nav-down-arrow';
17
+ const CLS_VSCROLLNAV: Str = 'e-scroll-nav';
18
+ const CLS_VSCROLLNAVUP: Str = 'e-scroll-up-nav';
19
+ const CLS_VSCROLLNAVDOWN: Str = 'e-scroll-down-nav';
20
+ const CLS_DEVICE: Str = 'e-scroll-device';
21
+ const CLS_OVERLAY: Str = 'e-scroll-overlay';
22
+ const CLS_UPOVERLAY: Str = 'e-scroll-up-overlay';
23
+ const CLS_DOWNOVERLAY: Str = 'e-scroll-down-overlay';
24
+ const OVERLAY_MAXWID: number = 40;
25
+
26
+ interface TapEventArgs {
27
+ name: string
28
+ originalEvent: TouchEventArgs | TouchEvent | KeyboardEvent
29
+ }
30
+ /**
31
+ * VScroll module is introduces vertical scroller when content exceeds the current viewing area.
32
+ * It can be useful for the components like Toolbar, Tab which needs vertical scrolling alone.
33
+ * Hidden content can be view by touch moving or icon click.
34
+ * ```html
35
+ * <div id="scroll"/>
36
+ * <script>
37
+ * var scrollObj = new VScroll();
38
+ * scrollObj.appendTo("#scroll");
39
+ * </script>
40
+ * ```
41
+ */
42
+ @NotifyPropertyChanges
43
+ export class VScroll extends Component<HTMLElement> implements INotifyPropertyChanged {
44
+ private touchModule: Touch;
45
+ private scrollEle: HTEle;
46
+ private scrollItems: HTEle;
47
+ private uniqueId: boolean;
48
+ private timeout: number;
49
+ private keyTimeout: boolean;
50
+ private keyTimer: number;
51
+ private browser: string;
52
+ private browserCheck: boolean;
53
+ private ieCheck: boolean;
54
+ /* eslint-disable */
55
+ private isDevice: Boolean;
56
+ private customStep: boolean;
57
+
58
+ /**
59
+ * Specifies the up or down scrolling distance of the vertical scrollbar moving.
60
+ *
61
+ * @default null
62
+ */
63
+ @Property(null)
64
+ public scrollStep: number;
65
+ /**
66
+ * Initialize the event handler
67
+ *
68
+ * @private
69
+ * @returns {void}
70
+ */
71
+ protected preRender(): void {
72
+ this.browser = Browser.info.name;
73
+ this.browserCheck = this.browser === 'mozilla';
74
+ this.isDevice = Browser.isDevice;
75
+ this.customStep = true;
76
+ const ele: HTEle = this.element;
77
+ this.ieCheck = this.browser === 'edge' || this.browser === 'msie';
78
+ this.initialize();
79
+ if (ele.id === '') {
80
+ ele.id = getUniqueID('vscroll');
81
+ this.uniqueId = true;
82
+ }
83
+ ele.style.display = 'block';
84
+ if (this.enableRtl) {
85
+ ele.classList.add(CLS_RTL);
86
+ }
87
+ }
88
+ /**
89
+ * To Initialize the vertical scroll rendering
90
+ *
91
+ * @private
92
+ * @returns {void}
93
+ */
94
+ protected render(): void {
95
+ this.touchModule = new Touch(this.element, { scroll: this.touchHandler.bind(this), swipe: this.swipeHandler.bind(this) });
96
+ EventHandler.add(this.scrollEle, 'scroll', this.scrollEventHandler, this);
97
+ if (!this.isDevice) {
98
+ this.createNavIcon(this.element);
99
+ } else {
100
+ this.element.classList.add(CLS_DEVICE);
101
+ this.createOverlayElement(this.element);
102
+ }
103
+ this.setScrollState();
104
+ EventHandler.add(this.element, 'wheel', this.wheelEventHandler, this);
105
+ }
106
+ private setScrollState(): void {
107
+ if (isNullOrUndefined(this.scrollStep) || this.scrollStep < 0) {
108
+ this.scrollStep = this.scrollEle.offsetHeight;
109
+ this.customStep = false;
110
+ } else {
111
+ this.customStep = true;
112
+ }
113
+ }
114
+ /**
115
+ * Initializes a new instance of the VScroll class.
116
+ *
117
+ * @param {VScrollModel} options - Specifies VScroll model properties as options.
118
+ * @param {string | HTMLElement} element - Specifies the element for which vertical scrolling applies.
119
+ */
120
+ public constructor(options?: VScrollModel, element?: string | HTMLElement) {
121
+ super(options, <HTEle | string>element);
122
+ }
123
+ private initialize(): void {
124
+ const scrollCnt: HTEle = buildTag('div', { className: CLS_VSCROLLCON });
125
+ const scrollBar: HTEle = buildTag('div', { className: CLS_VSCROLLBAR });
126
+ scrollBar.setAttribute('tabindex', '-1');
127
+ const ele: HTEle = this.element;
128
+ const innerEle: HTEle[] = [].slice.call(ele.children);
129
+ for (const ele of innerEle) {
130
+ scrollCnt.appendChild(ele);
131
+ }
132
+ scrollBar.appendChild(scrollCnt);
133
+ ele.appendChild(scrollBar);
134
+ scrollBar.style.overflow = 'hidden';
135
+ this.scrollEle = scrollBar;
136
+ this.scrollItems = scrollCnt;
137
+ }
138
+ protected getPersistData(): string {
139
+ const keyEntity: string[] = ['scrollStep'];
140
+ return this.addOnPersist(keyEntity);
141
+ }
142
+ /**
143
+ * Returns the current module name.
144
+ *
145
+ * @returns {string} - It returns the current module name.
146
+ * @private
147
+ */
148
+ protected getModuleName(): string {
149
+ return 'vScroll';
150
+ }
151
+ /**
152
+ * Removes the control from the DOM and also removes all its related events.
153
+ *
154
+ * @returns {void}
155
+ */
156
+ public destroy(): void {
157
+ const el: HTEle = this.element;
158
+ el.style.display = '';
159
+ removeClass([this.element], [CLS_ROOT, CLS_DEVICE]);
160
+ const navs: HTEle[] = selectAll('.e-' + el.id + '_nav.' + CLS_VSCROLLNAV, el);
161
+ const overlays: HTEle[] = selectAll('.' + CLS_OVERLAY, el);
162
+ [].slice.call(overlays).forEach((ele: HTMLElement) => {
163
+ detach(ele);
164
+ });
165
+ for (const elem of [].slice.call(this.scrollItems.children)) {
166
+ el.appendChild(elem);
167
+ }
168
+ if (this.uniqueId) {
169
+ this.element.removeAttribute('id');
170
+ }
171
+ detach(this.scrollEle);
172
+ if (navs.length > 0) {
173
+ detach(navs[0]);
174
+ if (!isNullOrUndefined(navs[1])) {
175
+ detach(navs[1]);
176
+ }
177
+ }
178
+ EventHandler.remove(this.scrollEle, 'scroll', this.scrollEventHandler);
179
+ this.touchModule.destroy();
180
+ this.touchModule = null;
181
+ super.destroy();
182
+ }
183
+ /**
184
+ * Specifies the value to disable/enable the VScroll component.
185
+ * When set to `true` , the component will be disabled.
186
+ *
187
+ * @param {boolean} value - Based on this Boolean value, VScroll will be enabled (false) or disabled (true).
188
+ * @returns {void}.
189
+ */
190
+ public disable(value: boolean): void {
191
+ const navEle: HTMLElement[] = selectAll('.e-scroll-nav:not(.' + CLS_DISABLE + ')', this.element);
192
+ if (value) {
193
+ this.element.classList.add(CLS_DISABLE);
194
+ } else {
195
+ this.element.classList.remove(CLS_DISABLE);
196
+ }
197
+ [].slice.call(navEle).forEach((el: HTMLElement) => {
198
+ el.setAttribute('tabindex', !value ? '0' : '-1');
199
+ });
200
+ }
201
+ private createOverlayElement(element: HTEle): void {
202
+ const id: string = element.id.concat('_nav');
203
+ const downOverlayEle: HTEle = buildTag('div', { className: CLS_OVERLAY + ' ' + CLS_DOWNOVERLAY });
204
+ const clsDown: string = 'e-' + element.id.concat('_nav ' + CLS_VSCROLLNAV + ' ' + CLS_VSCROLLNAVDOWN);
205
+ const downEle: HTEle = buildTag('div', { id: id.concat('down'), className: clsDown });
206
+ const navItem: HTEle = buildTag('div', { className: CLS_NAVDOWNARROW + ' ' + CLS_NAVARROW + ' e-icons' });
207
+ downEle.appendChild(navItem);
208
+ const upEle: HTEle = buildTag('div', { className: CLS_OVERLAY + ' ' + CLS_UPOVERLAY });
209
+ if (this.ieCheck) {
210
+ downEle.classList.add('e-ie-align');
211
+ }
212
+ element.appendChild(downOverlayEle);
213
+ element.appendChild(downEle);
214
+ element.insertBefore(upEle, element.firstChild);
215
+ this.eventBinding([downEle]);
216
+ }
217
+ private createNavIcon(element: HTEle): void {
218
+ const id: string = element.id.concat('_nav');
219
+ const clsDown: string = 'e-' + element.id.concat('_nav ' + CLS_VSCROLLNAV + ' ' + CLS_VSCROLLNAVDOWN);
220
+ const nav: HTEle = buildTag('div', { id: id.concat('_down'), className: clsDown });
221
+ nav.setAttribute('aria-disabled', 'false');
222
+ const navItem: HTEle = buildTag('div', { className: CLS_NAVDOWNARROW + ' ' + CLS_NAVARROW + ' e-icons' });
223
+ const clsUp: string = 'e-' + element.id.concat('_nav ' + CLS_VSCROLLNAV + ' ' + CLS_VSCROLLNAVUP);
224
+ const navElement: HTEle = buildTag('div', { id: id.concat('_up'), className: clsUp + ' ' + CLS_DISABLE });
225
+ navElement.setAttribute('aria-disabled', 'true');
226
+ const navUpItem: HTEle = buildTag('div', { className: CLS_NAVUPARROW + ' ' + CLS_NAVARROW + ' e-icons' });
227
+ navElement.appendChild(navUpItem);
228
+ nav.appendChild(navItem);
229
+ nav.setAttribute('tabindex', '0');
230
+ element.appendChild(nav);
231
+ element.insertBefore(navElement, element.firstChild);
232
+ if (this.ieCheck) {
233
+ nav.classList.add('e-ie-align');
234
+ navElement.classList.add('e-ie-align');
235
+ }
236
+ this.eventBinding([nav, navElement]);
237
+ }
238
+ private onKeyPress(ev: KeyboardEvent): void {
239
+ if (ev.key === 'Enter') {
240
+ const timeoutFun: () => void = () => {
241
+ this.keyTimeout = true;
242
+ this.eleScrolling(10, <HTEle>ev.target, true);
243
+ };
244
+ this.keyTimer = window.setTimeout(() => {
245
+ timeoutFun();
246
+ }, 100);
247
+ }
248
+ }
249
+ private onKeyUp(ev: KeyboardEvent): void {
250
+ if (ev.key !== 'Enter') {
251
+ return;
252
+ }
253
+ if (this.keyTimeout) {
254
+ this.keyTimeout = false;
255
+ } else {
256
+ (<HTEle>ev.target).click();
257
+ }
258
+ clearTimeout(this.keyTimer);
259
+ }
260
+ private eventBinding(element: HTEle[]): void {
261
+ [].slice.call(element).forEach((ele: HTEle) => {
262
+ new Touch(ele, { tapHold: this.tabHoldHandler.bind(this), tapHoldThreshold: 500 });
263
+ ele.addEventListener('keydown', this.onKeyPress.bind(this));
264
+ ele.addEventListener('keyup', this.onKeyUp.bind(this));
265
+ ele.addEventListener('mouseup', this.repeatScroll.bind(this));
266
+ ele.addEventListener('touchend', this.repeatScroll.bind(this));
267
+ ele.addEventListener('contextmenu', (e: Event) => {
268
+ e.preventDefault();
269
+ });
270
+ EventHandler.add(ele, 'click', this.clickEventHandler, this);
271
+ });
272
+ }
273
+ private repeatScroll(): void {
274
+ clearInterval(this.timeout);
275
+ }
276
+ private tabHoldHandler(ev: TapEventArgs): void {
277
+ let trgt: HTEle = ev.originalEvent.target as HTEle;
278
+ trgt = this.contains(trgt, CLS_VSCROLLNAV) ? <HTEle>trgt.firstElementChild : trgt;
279
+ const scrollDistance: number = 10;
280
+ const timeoutFun: () => void = () => {
281
+ this.eleScrolling(scrollDistance, trgt, true);
282
+ };
283
+ this.timeout = window.setInterval(() => {
284
+ timeoutFun();
285
+ }, 50);
286
+ }
287
+ private contains(element: HTEle, className: string): boolean {
288
+ return element.classList.contains(className);
289
+ }
290
+ private eleScrolling(scrollDis: number, trgt: HTEle, isContinuous: boolean): void {
291
+ let classList: DOMTokenList = trgt.classList;
292
+ if (classList.contains(CLS_VSCROLLNAV)) {
293
+ classList = trgt.querySelector('.' + CLS_NAVARROW).classList;
294
+ }
295
+ if (classList.contains(CLS_NAVDOWNARROW)) {
296
+ this.frameScrollRequest(scrollDis, 'add', isContinuous);
297
+ } else if (classList.contains(CLS_NAVUPARROW)) {
298
+ this.frameScrollRequest(scrollDis, '', isContinuous);
299
+ }
300
+ }
301
+ private clickEventHandler(event: Event): void {
302
+ this.eleScrolling(this.scrollStep, <HTEle>event.target, false);
303
+ }
304
+ private wheelEventHandler(e: WheelEvent): void {
305
+ e.preventDefault();
306
+ this.frameScrollRequest(this.scrollStep, (e.deltaY > 0 ? 'add' : ''), false);
307
+ }
308
+
309
+ private swipeHandler(e: SwipeEventArgs): void {
310
+ const swipeElement: HTEle = this.scrollEle;
311
+ let distance: number;
312
+ if (e.velocity <= 1) {
313
+ distance = e.distanceY / (e.velocity * 10);
314
+ } else {
315
+ distance = e.distanceY / e.velocity;
316
+ }
317
+ let start: number = 0.5;
318
+ const animate: () => void = () => {
319
+ const step: number = Math.sin(start);
320
+ if (step <= 0) {
321
+ window.cancelAnimationFrame(step);
322
+ } else {
323
+ if (e.swipeDirection === 'Up') {
324
+ swipeElement.scrollTop += distance * step;
325
+ } else if (e.swipeDirection === 'Down') {
326
+ swipeElement.scrollTop -= distance * step;
327
+ }
328
+ start -= 0.02;
329
+ window.requestAnimationFrame(animate as FrameRequestCallback);
330
+ }
331
+ };
332
+ animate();
333
+ }
334
+
335
+ private scrollUpdating(scrollVal: number, action: string): void {
336
+ if (action === 'add') {
337
+ this.scrollEle.scrollTop += scrollVal;
338
+ } else {
339
+ this.scrollEle.scrollTop -= scrollVal;
340
+ }
341
+ }
342
+
343
+ private frameScrollRequest(scrollValue: number, action: string, isContinuous: boolean): void {
344
+ const step: number = 10;
345
+ if (isContinuous) {
346
+ this.scrollUpdating(scrollValue, action);
347
+ return;
348
+ }
349
+ if (!this.customStep) {
350
+ [].slice.call(selectAll('.' + CLS_OVERLAY, this.element)).forEach((el: HTMLElement) => {
351
+ scrollValue -= el.offsetHeight;
352
+ });
353
+ }
354
+ const animate: () => void = () => {
355
+ if (scrollValue < step) {
356
+ window.cancelAnimationFrame(step);
357
+ } else {
358
+ this.scrollUpdating(step, action);
359
+ scrollValue -= step;
360
+ window.requestAnimationFrame(animate as FrameRequestCallback);
361
+ }
362
+ };
363
+ animate();
364
+ }
365
+
366
+ private touchHandler(e: ScrollEventArgs): void {
367
+ const el: HTEle = this.scrollEle;
368
+ const distance: number = e.distanceY;
369
+ if (e.scrollDirection === 'Up') {
370
+ el.scrollTop = el.scrollTop + distance;
371
+ } else if (e.scrollDirection === 'Down') {
372
+ el.scrollTop = el.scrollTop - distance;
373
+ }
374
+ }
375
+ private arrowDisabling(addDisableCls: HTEle, removeDisableCls: HTEle): void {
376
+ if (this.isDevice) {
377
+ const arrowEle: HTMLElement = isNullOrUndefined(addDisableCls) ? removeDisableCls : addDisableCls;
378
+ const arrowIcon: HTMLElement = arrowEle.querySelector('.' + CLS_NAVARROW) as HTMLElement;
379
+ if (isNullOrUndefined(addDisableCls)) {
380
+ classList(arrowIcon, [CLS_NAVDOWNARROW], [CLS_NAVUPARROW]);
381
+ } else {
382
+ classList(arrowIcon, [CLS_NAVUPARROW], [CLS_NAVDOWNARROW]);
383
+ }
384
+ } else {
385
+ addDisableCls.classList.add(CLS_DISABLE);
386
+ addDisableCls.setAttribute('aria-disabled', 'true');
387
+ addDisableCls.removeAttribute('tabindex');
388
+ removeDisableCls.classList.remove(CLS_DISABLE);
389
+ removeDisableCls.setAttribute('aria-disabled', 'false');
390
+ removeDisableCls.setAttribute('tabindex', '0');
391
+ }
392
+ this.repeatScroll();
393
+ }
394
+ private scrollEventHandler(e: Event): void {
395
+ const target: HTEle = <HTEle>e.target;
396
+ const height: number = target.offsetHeight;
397
+ const navUpEle: HTEle = (<HTEle>this.element.querySelector('.' + CLS_VSCROLLNAVUP));
398
+ const navDownEle: HTEle = (<HTEle>this.element.querySelector('.' + CLS_VSCROLLNAVDOWN));
399
+ const upOverlay: HTEle = (<HTEle>this.element.querySelector('.' + CLS_UPOVERLAY));
400
+ const downOverlay: HTEle = (<HTEle>this.element.querySelector('.' + CLS_DOWNOVERLAY));
401
+ let scrollTop: number = target.scrollTop;
402
+ if (scrollTop <= 0) {
403
+ scrollTop = -scrollTop;
404
+ }
405
+ if (this.isDevice) {
406
+ if (scrollTop < OVERLAY_MAXWID) {
407
+ upOverlay.style.height = scrollTop + 'px';
408
+ } else {
409
+ upOverlay.style.height = '40px';
410
+ }
411
+ if ((target.scrollHeight - Math.ceil(height + scrollTop)) < OVERLAY_MAXWID) {
412
+ downOverlay.style.height = (target.scrollHeight - Math.ceil(height + scrollTop)) + 'px';
413
+ } else {
414
+ downOverlay.style.height = '40px';
415
+ }
416
+ }
417
+ if (scrollTop === 0) {
418
+ this.arrowDisabling(navUpEle, navDownEle);
419
+ } else if (Math.ceil(height + scrollTop + .1) >= target.scrollHeight) {
420
+ this.arrowDisabling(navDownEle, navUpEle);
421
+ } else {
422
+ const disEle: HTEle = <HTEle>this.element.querySelector('.' + CLS_VSCROLLNAV + '.' + CLS_DISABLE);
423
+ if (disEle) {
424
+ disEle.classList.remove(CLS_DISABLE);
425
+ disEle.setAttribute('aria-disabled', 'false');
426
+ disEle.setAttribute('tabindex', '0');
427
+ }
428
+ }
429
+ }
430
+ /**
431
+ * Gets called when the model property changes.The data that describes the old and new values of property that changed.
432
+ *
433
+ * @param {VScrollModel} newProp - It contains the new value of data.
434
+ * @param {VScrollModel} oldProp - It contains the old value of data.
435
+ * @returns {void}
436
+ * @private
437
+ */
438
+ public onPropertyChanged(newProp: VScrollModel, oldProp: VScrollModel): void {
439
+ for (const prop of Object.keys(newProp)) {
440
+ switch (prop) {
441
+ case 'scrollStep':
442
+ this.setScrollState();
443
+ break;
444
+ case 'enableRtl':
445
+ if (newProp.enableRtl) {
446
+ this.element.classList.add(CLS_RTL);
447
+ } else {
448
+ this.element.classList.remove(CLS_RTL);
449
+ }
450
+ break;
451
+ }
452
+ }
453
+ }
454
+ }