@syncfusion/ej2-navigations 28.1.41 → 28.2.3-1479479

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 (880) hide show
  1. package/.eslintrc.json +243 -260
  2. package/README.md +301 -301
  3. package/blazorGlobalSrc/accordion/accordion-model.d.ts +285 -0
  4. package/blazorGlobalSrc/accordion/accordion.d.ts +458 -0
  5. package/blazorGlobalSrc/accordion/accordion.js +1411 -0
  6. package/blazorGlobalSrc/accordion/index.d.ts +5 -0
  7. package/blazorGlobalSrc/accordion/index.js +4 -0
  8. package/blazorGlobalSrc/appbar/appbar-model.d.ts +76 -0
  9. package/blazorGlobalSrc/appbar/appbar.d.ts +115 -0
  10. package/blazorGlobalSrc/appbar/appbar.js +221 -0
  11. package/blazorGlobalSrc/appbar/index.d.ts +3 -0
  12. package/blazorGlobalSrc/appbar/index.js +2 -0
  13. package/blazorGlobalSrc/breadcrumb/breadcrumb-model.d.ts +170 -0
  14. package/blazorGlobalSrc/breadcrumb/breadcrumb.d.ts +297 -0
  15. package/blazorGlobalSrc/breadcrumb/breadcrumb.js +833 -0
  16. package/blazorGlobalSrc/breadcrumb/index.d.ts +5 -0
  17. package/blazorGlobalSrc/breadcrumb/index.js +4 -0
  18. package/blazorGlobalSrc/carousel/carousel-model.d.ts +282 -0
  19. package/blazorGlobalSrc/carousel/carousel.d.ts +439 -0
  20. package/blazorGlobalSrc/carousel/carousel.js +1353 -0
  21. package/blazorGlobalSrc/carousel/index.d.ts +3 -0
  22. package/blazorGlobalSrc/carousel/index.js +2 -0
  23. package/blazorGlobalSrc/common/h-scroll-model.d.ts +16 -0
  24. package/blazorGlobalSrc/common/h-scroll.d.ts +105 -0
  25. package/blazorGlobalSrc/common/h-scroll.js +499 -0
  26. package/blazorGlobalSrc/common/index.d.ts +9 -0
  27. package/blazorGlobalSrc/common/index.js +8 -0
  28. package/blazorGlobalSrc/common/menu-base-model.d.ts +308 -0
  29. package/blazorGlobalSrc/common/menu-base.d.ts +553 -0
  30. package/blazorGlobalSrc/common/menu-base.js +2502 -0
  31. package/blazorGlobalSrc/common/menu-scroll.d.ts +29 -0
  32. package/blazorGlobalSrc/common/menu-scroll.js +103 -0
  33. package/blazorGlobalSrc/common/v-scroll-model.d.ts +16 -0
  34. package/blazorGlobalSrc/common/v-scroll.d.ts +106 -0
  35. package/blazorGlobalSrc/common/v-scroll.js +471 -0
  36. package/blazorGlobalSrc/context-menu/context-menu-model.d.ts +47 -0
  37. package/blazorGlobalSrc/context-menu/context-menu.d.ts +101 -0
  38. package/blazorGlobalSrc/context-menu/context-menu.js +143 -0
  39. package/blazorGlobalSrc/context-menu/index.d.ts +5 -0
  40. package/blazorGlobalSrc/context-menu/index.js +4 -0
  41. package/blazorGlobalSrc/global.js +1 -0
  42. package/blazorGlobalSrc/index.d.ts +16 -0
  43. package/blazorGlobalSrc/index.js +16 -0
  44. package/blazorGlobalSrc/menu/index.d.ts +5 -0
  45. package/blazorGlobalSrc/menu/index.js +4 -0
  46. package/blazorGlobalSrc/menu/menu-model.d.ts +70 -0
  47. package/blazorGlobalSrc/menu/menu.d.ts +127 -0
  48. package/blazorGlobalSrc/menu/menu.js +288 -0
  49. package/blazorGlobalSrc/sidebar/index.d.ts +5 -0
  50. package/blazorGlobalSrc/sidebar/index.js +4 -0
  51. package/blazorGlobalSrc/sidebar/sidebar-model.d.ts +200 -0
  52. package/blazorGlobalSrc/sidebar/sidebar.d.ts +335 -0
  53. package/blazorGlobalSrc/sidebar/sidebar.js +729 -0
  54. package/blazorGlobalSrc/stepper/index.d.ts +3 -0
  55. package/blazorGlobalSrc/stepper/index.js +2 -0
  56. package/blazorGlobalSrc/stepper/stepper-model.d.ts +159 -0
  57. package/blazorGlobalSrc/stepper/stepper.d.ts +381 -0
  58. package/blazorGlobalSrc/stepper/stepper.js +1305 -0
  59. package/blazorGlobalSrc/stepper-base/index.d.ts +5 -0
  60. package/blazorGlobalSrc/stepper-base/index.js +4 -0
  61. package/blazorGlobalSrc/stepper-base/stepper-base-model.d.ts +121 -0
  62. package/blazorGlobalSrc/stepper-base/stepper-base.d.ts +184 -0
  63. package/blazorGlobalSrc/stepper-base/stepper-base.js +230 -0
  64. package/blazorGlobalSrc/tab/index.d.ts +5 -0
  65. package/blazorGlobalSrc/tab/index.js +4 -0
  66. package/blazorGlobalSrc/tab/tab-model.d.ts +408 -0
  67. package/blazorGlobalSrc/tab/tab.d.ts +715 -0
  68. package/blazorGlobalSrc/tab/tab.js +2564 -0
  69. package/blazorGlobalSrc/toolbar/index.d.ts +5 -0
  70. package/blazorGlobalSrc/toolbar/index.js +4 -0
  71. package/blazorGlobalSrc/toolbar/toolbar-model.d.ts +287 -0
  72. package/blazorGlobalSrc/toolbar/toolbar.d.ts +522 -0
  73. package/blazorGlobalSrc/toolbar/toolbar.js +2408 -0
  74. package/blazorGlobalSrc/treeview/index.d.ts +5 -0
  75. package/blazorGlobalSrc/treeview/index.js +4 -0
  76. package/blazorGlobalSrc/treeview/treeview-model.d.ts +630 -0
  77. package/blazorGlobalSrc/treeview/treeview.d.ts +1509 -0
  78. package/blazorGlobalSrc/treeview/treeview.js +5766 -0
  79. package/dist/ej2-navigations.min.js +1 -10
  80. package/dist/ej2-navigations.umd.min.js +1 -10
  81. package/dist/ej2-navigations.umd.min.js.map +1 -1
  82. package/dist/es6/ej2-navigations.es2015.js +107 -96
  83. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  84. package/dist/es6/ej2-navigations.es5.js +301 -290
  85. package/dist/es6/ej2-navigations.es5.js.map +1 -1
  86. package/dist/global/ej2-navigations.min.js +1 -10
  87. package/dist/global/ej2-navigations.min.js.map +1 -1
  88. package/dist/global/index.d.ts +0 -9
  89. package/dist/ts/undefined +285 -0
  90. package/license +10 -10
  91. package/package.json +166 -166
  92. package/src/accordion/accordion-model.d.ts +199 -199
  93. package/src/accordion/accordion.js +19 -19
  94. package/src/appbar/appbar-model.d.ts +51 -51
  95. package/src/appbar/appbar.js +19 -19
  96. package/src/breadcrumb/breadcrumb-model.d.ts +114 -114
  97. package/src/breadcrumb/breadcrumb.js +19 -19
  98. package/src/carousel/carousel-model.d.ts +204 -204
  99. package/src/carousel/carousel.js +19 -19
  100. package/src/common/h-scroll-model.d.ts +6 -6
  101. package/src/common/h-scroll.js +19 -19
  102. package/src/common/menu-base-model.d.ts +234 -234
  103. package/src/common/menu-base.js +26 -19
  104. package/src/common/v-scroll-model.d.ts +6 -6
  105. package/src/common/v-scroll.js +19 -19
  106. package/src/context-menu/context-menu-model.d.ts +29 -29
  107. package/src/context-menu/context-menu.js +19 -19
  108. package/src/menu/menu-model.d.ts +45 -45
  109. package/src/menu/menu.js +19 -19
  110. package/src/sidebar/sidebar-model.d.ts +189 -189
  111. package/src/sidebar/sidebar.js +19 -19
  112. package/src/stepper/stepper.js +19 -19
  113. package/src/stepper-base/stepper-base.js +19 -19
  114. package/src/tab/tab-model.d.ts +305 -305
  115. package/src/tab/tab.js +19 -19
  116. package/src/toolbar/toolbar-model.d.ts +209 -209
  117. package/src/toolbar/toolbar.js +19 -19
  118. package/src/treeview/treeview-model.d.ts +520 -520
  119. package/src/treeview/treeview.d.ts +2 -1
  120. package/src/treeview/treeview.js +28 -24
  121. package/styles/accordion/_all.scss +2 -2
  122. package/styles/accordion/_bds-definition.scss +167 -167
  123. package/styles/accordion/_bigger.scss +121 -121
  124. package/styles/accordion/_bootstrap-dark-definition.scss +169 -167
  125. package/styles/accordion/_bootstrap-definition.scss +167 -167
  126. package/styles/accordion/_bootstrap4-definition.scss +177 -175
  127. package/styles/accordion/_bootstrap5-definition.scss +168 -168
  128. package/styles/accordion/_bootstrap5.3-definition.scss +168 -168
  129. package/styles/accordion/_fabric-dark-definition.scss +171 -171
  130. package/styles/accordion/_fabric-definition.scss +171 -171
  131. package/styles/accordion/_fluent-definition.scss +168 -168
  132. package/styles/accordion/_fluent2-definition.scss +167 -167
  133. package/styles/accordion/_fusionnew-definition.scss +168 -168
  134. package/styles/accordion/_highcontrast-definition.scss +193 -193
  135. package/styles/accordion/_highcontrast-light-definition.scss +193 -193
  136. package/styles/accordion/_layout.scss +236 -236
  137. package/styles/accordion/_material-dark-definition.scss +171 -171
  138. package/styles/accordion/_material-definition.scss +165 -165
  139. package/styles/accordion/_material3-definition.scss +168 -168
  140. package/styles/accordion/_tailwind-definition.scss +167 -167
  141. package/styles/accordion/_tailwind3-definition.scss +168 -168
  142. package/styles/accordion/_theme.scss +418 -418
  143. package/styles/accordion/bootstrap-dark.css +12 -12
  144. package/styles/accordion/bootstrap4.css +4 -4
  145. package/styles/accordion/bootstrap5-dark.css +37 -37
  146. package/styles/accordion/bootstrap5.css +16 -16
  147. package/styles/accordion/fabric.css +11 -11
  148. package/styles/accordion/icons/_bds.scss +15 -15
  149. package/styles/accordion/icons/_bootstrap-dark.scss +15 -15
  150. package/styles/accordion/icons/_bootstrap.scss +15 -15
  151. package/styles/accordion/icons/_bootstrap4.scss +15 -15
  152. package/styles/accordion/icons/_bootstrap5.3.scss +15 -15
  153. package/styles/accordion/icons/_bootstrap5.scss +15 -15
  154. package/styles/accordion/icons/_fabric-dark.scss +15 -15
  155. package/styles/accordion/icons/_fabric.scss +15 -15
  156. package/styles/accordion/icons/_fluent.scss +15 -15
  157. package/styles/accordion/icons/_fluent2.scss +15 -15
  158. package/styles/accordion/icons/_fusionnew.scss +15 -15
  159. package/styles/accordion/icons/_highcontrast-light.scss +15 -15
  160. package/styles/accordion/icons/_highcontrast.scss +15 -15
  161. package/styles/accordion/icons/_material-dark.scss +15 -15
  162. package/styles/accordion/icons/_material.scss +15 -15
  163. package/styles/accordion/icons/_material3.scss +15 -15
  164. package/styles/accordion/icons/_tailwind.scss +15 -15
  165. package/styles/accordion/icons/_tailwind3.scss +15 -15
  166. package/styles/accordion/material3-dark.scss +1 -1
  167. package/styles/accordion/material3.scss +1 -1
  168. package/styles/accordion/tailwind-dark.css +2 -2
  169. package/styles/appbar/_all.scss +2 -2
  170. package/styles/appbar/_bds-definition.scss +24 -24
  171. package/styles/appbar/_bigger.scss +15 -15
  172. package/styles/appbar/_bootstrap-dark-definition.scss +6 -6
  173. package/styles/appbar/_bootstrap-definition.scss +6 -6
  174. package/styles/appbar/_bootstrap4-definition.scss +6 -6
  175. package/styles/appbar/_bootstrap5-definition.scss +6 -6
  176. package/styles/appbar/_bootstrap5.3-definition.scss +6 -6
  177. package/styles/appbar/_fabric-dark-definition.scss +6 -6
  178. package/styles/appbar/_fabric-definition.scss +6 -6
  179. package/styles/appbar/_fluent-definition.scss +6 -6
  180. package/styles/appbar/_fluent2-definition.scss +23 -23
  181. package/styles/appbar/_fusionnew-definition.scss +6 -6
  182. package/styles/appbar/_highcontrast-definition.scss +6 -6
  183. package/styles/appbar/_highcontrast-light-definition.scss +6 -6
  184. package/styles/appbar/_layout.scss +76 -76
  185. package/styles/appbar/_material-dark-definition.scss +6 -6
  186. package/styles/appbar/_material-definition.scss +6 -6
  187. package/styles/appbar/_material3-definition.scss +6 -6
  188. package/styles/appbar/_tailwind-definition.scss +6 -6
  189. package/styles/appbar/_tailwind3-definition.scss +6 -6
  190. package/styles/appbar/_theme.scss +216 -216
  191. package/styles/appbar/material3-dark.scss +1 -1
  192. package/styles/appbar/material3.scss +1 -1
  193. package/styles/bds-lite.css +70 -5
  194. package/styles/bds.css +72 -7
  195. package/styles/bootstrap-dark-lite.css +120 -55
  196. package/styles/bootstrap-dark.css +124 -59
  197. package/styles/bootstrap-lite.css +72 -7
  198. package/styles/bootstrap.css +76 -11
  199. package/styles/bootstrap4-lite.css +153 -88
  200. package/styles/bootstrap4.css +156 -91
  201. package/styles/bootstrap5-dark-lite.css +288 -229
  202. package/styles/bootstrap5-dark.css +291 -232
  203. package/styles/bootstrap5-lite.css +150 -91
  204. package/styles/bootstrap5.3-lite.css +88 -27
  205. package/styles/bootstrap5.3.css +96 -29
  206. package/styles/bootstrap5.css +153 -94
  207. package/styles/breadcrumb/_all.scss +2 -2
  208. package/styles/breadcrumb/_bds-definition.scss +60 -60
  209. package/styles/breadcrumb/_bigger.scss +168 -166
  210. package/styles/breadcrumb/_bootstrap-dark-definition.scss +54 -54
  211. package/styles/breadcrumb/_bootstrap-definition.scss +54 -54
  212. package/styles/breadcrumb/_bootstrap4-definition.scss +56 -54
  213. package/styles/breadcrumb/_bootstrap5-definition.scss +65 -63
  214. package/styles/breadcrumb/_bootstrap5.3-definition.scss +61 -61
  215. package/styles/breadcrumb/_fabric-dark-definition.scss +59 -59
  216. package/styles/breadcrumb/_fabric-definition.scss +59 -59
  217. package/styles/breadcrumb/_fluent-definition.scss +63 -63
  218. package/styles/breadcrumb/_fluent2-definition.scss +61 -61
  219. package/styles/breadcrumb/_fusionnew-definition.scss +65 -59
  220. package/styles/breadcrumb/_highcontrast-definition.scss +61 -61
  221. package/styles/breadcrumb/_highcontrast-light-definition.scss +61 -61
  222. package/styles/breadcrumb/_layout.scss +465 -449
  223. package/styles/breadcrumb/_material-dark-definition.scss +50 -50
  224. package/styles/breadcrumb/_material-definition.scss +50 -50
  225. package/styles/breadcrumb/_material3-definition.scss +60 -60
  226. package/styles/breadcrumb/_tailwind-definition.scss +60 -60
  227. package/styles/breadcrumb/_tailwind3-definition.scss +61 -61
  228. package/styles/breadcrumb/_theme.scss +296 -296
  229. package/styles/breadcrumb/bds.css +15 -0
  230. package/styles/breadcrumb/bootstrap-dark.css +17 -2
  231. package/styles/breadcrumb/bootstrap.css +15 -0
  232. package/styles/breadcrumb/bootstrap4.css +19 -4
  233. package/styles/breadcrumb/bootstrap5-dark.css +27 -12
  234. package/styles/breadcrumb/bootstrap5.3.css +15 -0
  235. package/styles/breadcrumb/bootstrap5.css +18 -3
  236. package/styles/breadcrumb/fabric-dark.css +18 -3
  237. package/styles/breadcrumb/fabric.css +15 -0
  238. package/styles/breadcrumb/fluent-dark.css +15 -0
  239. package/styles/breadcrumb/fluent.css +15 -0
  240. package/styles/breadcrumb/fluent2.css +15 -0
  241. package/styles/breadcrumb/highcontrast-light.css +15 -0
  242. package/styles/breadcrumb/highcontrast.css +15 -0
  243. package/styles/breadcrumb/icons/_bds.scss +23 -23
  244. package/styles/breadcrumb/icons/_bootstrap-dark.scss +12 -12
  245. package/styles/breadcrumb/icons/_bootstrap.scss +12 -12
  246. package/styles/breadcrumb/icons/_bootstrap4.scss +12 -12
  247. package/styles/breadcrumb/icons/_bootstrap5.3.scss +23 -23
  248. package/styles/breadcrumb/icons/_bootstrap5.scss +23 -23
  249. package/styles/breadcrumb/icons/_fabric-dark.scss +12 -12
  250. package/styles/breadcrumb/icons/_fabric.scss +12 -12
  251. package/styles/breadcrumb/icons/_fluent.scss +23 -23
  252. package/styles/breadcrumb/icons/_fluent2.scss +23 -23
  253. package/styles/breadcrumb/icons/_fusionnew.scss +23 -23
  254. package/styles/breadcrumb/icons/_highcontrast-light.scss +12 -12
  255. package/styles/breadcrumb/icons/_highcontrast.scss +12 -12
  256. package/styles/breadcrumb/icons/_material-dark.scss +23 -23
  257. package/styles/breadcrumb/icons/_material.scss +23 -23
  258. package/styles/breadcrumb/icons/_material3.scss +12 -12
  259. package/styles/breadcrumb/icons/_tailwind-dark.scss +23 -23
  260. package/styles/breadcrumb/icons/_tailwind.scss +23 -23
  261. package/styles/breadcrumb/icons/_tailwind3.scss +23 -23
  262. package/styles/breadcrumb/material-dark.css +15 -0
  263. package/styles/breadcrumb/material.css +15 -0
  264. package/styles/breadcrumb/material3-dark.css +15 -0
  265. package/styles/breadcrumb/material3-dark.scss +1 -1
  266. package/styles/breadcrumb/material3.css +15 -0
  267. package/styles/breadcrumb/material3.scss +1 -1
  268. package/styles/breadcrumb/tailwind-dark.css +15 -0
  269. package/styles/breadcrumb/tailwind.css +15 -0
  270. package/styles/breadcrumb/tailwind3.css +15 -0
  271. package/styles/carousel/_all.scss +2 -2
  272. package/styles/carousel/_bds-definition.scss +20 -20
  273. package/styles/carousel/_bootstrap-dark-definition.scss +20 -20
  274. package/styles/carousel/_bootstrap-definition.scss +20 -20
  275. package/styles/carousel/_bootstrap4-definition.scss +20 -20
  276. package/styles/carousel/_bootstrap5-definition.scss +20 -20
  277. package/styles/carousel/_bootstrap5.3-definition.scss +20 -20
  278. package/styles/carousel/_fabric-dark-definition.scss +20 -20
  279. package/styles/carousel/_fabric-definition.scss +20 -20
  280. package/styles/carousel/_fluent-definition.scss +20 -20
  281. package/styles/carousel/_fluent2-definition.scss +23 -23
  282. package/styles/carousel/_fusionnew-definition.scss +20 -20
  283. package/styles/carousel/_highcontrast-definition.scss +20 -20
  284. package/styles/carousel/_highcontrast-light-definition.scss +20 -20
  285. package/styles/carousel/_layout.scss +257 -257
  286. package/styles/carousel/_material-dark-definition.scss +20 -20
  287. package/styles/carousel/_material-definition.scss +20 -20
  288. package/styles/carousel/_material3-definition.scss +21 -21
  289. package/styles/carousel/_tailwind-definition.scss +20 -20
  290. package/styles/carousel/_tailwind3-definition.scss +24 -24
  291. package/styles/carousel/_theme.scss +108 -108
  292. package/styles/carousel/icons/_bds.scss +30 -30
  293. package/styles/carousel/icons/_bootstrap-dark.scss +30 -30
  294. package/styles/carousel/icons/_bootstrap.scss +30 -30
  295. package/styles/carousel/icons/_bootstrap4.scss +30 -30
  296. package/styles/carousel/icons/_bootstrap5.3.scss +30 -30
  297. package/styles/carousel/icons/_bootstrap5.scss +30 -30
  298. package/styles/carousel/icons/_fabric-dark.scss +30 -30
  299. package/styles/carousel/icons/_fabric.scss +30 -30
  300. package/styles/carousel/icons/_fluent.scss +30 -30
  301. package/styles/carousel/icons/_fluent2.scss +30 -30
  302. package/styles/carousel/icons/_fusionnew.scss +30 -30
  303. package/styles/carousel/icons/_highcontrast-light.scss +30 -30
  304. package/styles/carousel/icons/_highcontrast.scss +30 -30
  305. package/styles/carousel/icons/_material-dark.scss +30 -30
  306. package/styles/carousel/icons/_material.scss +30 -30
  307. package/styles/carousel/icons/_material3.scss +30 -30
  308. package/styles/carousel/icons/_tailwind.scss +30 -30
  309. package/styles/carousel/icons/_tailwind3.scss +30 -30
  310. package/styles/carousel/material3-dark.scss +1 -1
  311. package/styles/carousel/material3.scss +1 -1
  312. package/styles/context-menu/_all.scss +2 -2
  313. package/styles/context-menu/_bds-definition.scss +67 -67
  314. package/styles/context-menu/_bigger.scss +111 -111
  315. package/styles/context-menu/_bootstrap-dark-definition.scss +50 -50
  316. package/styles/context-menu/_bootstrap-definition.scss +50 -50
  317. package/styles/context-menu/_bootstrap4-definition.scss +52 -50
  318. package/styles/context-menu/_bootstrap5-definition.scss +52 -52
  319. package/styles/context-menu/_bootstrap5.3-definition.scss +52 -52
  320. package/styles/context-menu/_fabric-dark-definition.scss +50 -50
  321. package/styles/context-menu/_fabric-definition.scss +50 -50
  322. package/styles/context-menu/_fluent-definition.scss +51 -51
  323. package/styles/context-menu/_fluent2-definition.scss +52 -52
  324. package/styles/context-menu/_fusionnew-definition.scss +52 -51
  325. package/styles/context-menu/_highcontrast-definition.scss +50 -50
  326. package/styles/context-menu/_highcontrast-light-definition.scss +50 -50
  327. package/styles/context-menu/_layout-mixin.scss +140 -140
  328. package/styles/context-menu/_layout.scss +179 -174
  329. package/styles/context-menu/_material-dark-definition.scss +50 -50
  330. package/styles/context-menu/_material-definition.scss +50 -50
  331. package/styles/context-menu/_material3-definition.scss +51 -51
  332. package/styles/context-menu/_tailwind-definition.scss +52 -52
  333. package/styles/context-menu/_tailwind3-definition.scss +55 -55
  334. package/styles/context-menu/_theme-mixin.scss +91 -91
  335. package/styles/context-menu/_theme.scss +77 -69
  336. package/styles/context-menu/bds.css +7 -1
  337. package/styles/context-menu/bootstrap-dark.css +7 -1
  338. package/styles/context-menu/bootstrap.css +7 -1
  339. package/styles/context-menu/bootstrap4.css +8 -2
  340. package/styles/context-menu/bootstrap5-dark.css +14 -8
  341. package/styles/context-menu/bootstrap5.3.css +7 -1
  342. package/styles/context-menu/bootstrap5.css +7 -1
  343. package/styles/context-menu/fabric-dark.css +7 -1
  344. package/styles/context-menu/fabric.css +7 -1
  345. package/styles/context-menu/fluent-dark.css +7 -1
  346. package/styles/context-menu/fluent.css +7 -1
  347. package/styles/context-menu/fluent2.css +7 -1
  348. package/styles/context-menu/highcontrast-light.css +7 -1
  349. package/styles/context-menu/highcontrast.css +7 -1
  350. package/styles/context-menu/icons/_bds.scss +31 -31
  351. package/styles/context-menu/icons/_bootstrap-dark.scss +31 -31
  352. package/styles/context-menu/icons/_bootstrap.scss +31 -31
  353. package/styles/context-menu/icons/_bootstrap4.scss +31 -31
  354. package/styles/context-menu/icons/_bootstrap5.3.scss +31 -31
  355. package/styles/context-menu/icons/_bootstrap5.scss +31 -31
  356. package/styles/context-menu/icons/_fabric-dark.scss +31 -31
  357. package/styles/context-menu/icons/_fabric.scss +31 -31
  358. package/styles/context-menu/icons/_fluent.scss +31 -31
  359. package/styles/context-menu/icons/_fluent2.scss +31 -31
  360. package/styles/context-menu/icons/_fusionnew.scss +31 -31
  361. package/styles/context-menu/icons/_highcontrast-light.scss +31 -31
  362. package/styles/context-menu/icons/_highcontrast.scss +31 -31
  363. package/styles/context-menu/icons/_material-dark.scss +31 -31
  364. package/styles/context-menu/icons/_material.scss +31 -31
  365. package/styles/context-menu/icons/_material3.scss +31 -31
  366. package/styles/context-menu/icons/_tailwind-dark.scss +31 -31
  367. package/styles/context-menu/icons/_tailwind.scss +31 -31
  368. package/styles/context-menu/icons/_tailwind3.scss +31 -31
  369. package/styles/context-menu/material-dark.css +8 -1
  370. package/styles/context-menu/material.css +7 -1
  371. package/styles/context-menu/material3-dark.css +8 -1
  372. package/styles/context-menu/material3-dark.scss +1 -1
  373. package/styles/context-menu/material3.css +8 -1
  374. package/styles/context-menu/material3.scss +1 -1
  375. package/styles/context-menu/tailwind-dark.css +7 -1
  376. package/styles/context-menu/tailwind.css +7 -1
  377. package/styles/context-menu/tailwind3.css +7 -1
  378. package/styles/fabric-dark-lite.css +76 -11
  379. package/styles/fabric-dark.css +78 -13
  380. package/styles/fabric-lite.css +108 -43
  381. package/styles/fabric.css +110 -45
  382. package/styles/fluent-dark-lite.css +88 -25
  383. package/styles/fluent-dark.css +91 -28
  384. package/styles/fluent-lite.css +88 -25
  385. package/styles/fluent.css +91 -28
  386. package/styles/fluent2-lite.css +91 -36
  387. package/styles/fluent2.css +93 -38
  388. package/styles/h-scroll/_all.scss +2 -2
  389. package/styles/h-scroll/_bds-definition.scss +83 -83
  390. package/styles/h-scroll/_bigger.scss +39 -39
  391. package/styles/h-scroll/_bootstrap-dark-definition.scss +57 -57
  392. package/styles/h-scroll/_bootstrap-definition.scss +56 -56
  393. package/styles/h-scroll/_bootstrap4-definition.scss +58 -56
  394. package/styles/h-scroll/_bootstrap5-definition.scss +83 -83
  395. package/styles/h-scroll/_bootstrap5.3-definition.scss +83 -83
  396. package/styles/h-scroll/_fabric-dark-definition.scss +58 -58
  397. package/styles/h-scroll/_fabric-definition.scss +55 -55
  398. package/styles/h-scroll/_fluent-definition.scss +83 -83
  399. package/styles/h-scroll/_fluent2-definition.scss +83 -83
  400. package/styles/h-scroll/_fusionnew-definition.scss +83 -83
  401. package/styles/h-scroll/_highcontrast-definition.scss +56 -56
  402. package/styles/h-scroll/_highcontrast-light-definition.scss +59 -59
  403. package/styles/h-scroll/_layout.scss +160 -160
  404. package/styles/h-scroll/_material-dark-definition.scss +85 -85
  405. package/styles/h-scroll/_material-definition.scss +82 -82
  406. package/styles/h-scroll/_material3-definition.scss +83 -83
  407. package/styles/h-scroll/_tailwind-definition.scss +83 -83
  408. package/styles/h-scroll/_tailwind3-definition.scss +83 -83
  409. package/styles/h-scroll/_theme.scss +146 -146
  410. package/styles/h-scroll/bds.css +1 -1
  411. package/styles/h-scroll/bootstrap-dark.css +1 -1
  412. package/styles/h-scroll/bootstrap.css +1 -1
  413. package/styles/h-scroll/bootstrap4.css +6 -6
  414. package/styles/h-scroll/bootstrap5-dark.css +7 -7
  415. package/styles/h-scroll/bootstrap5.3.css +1 -1
  416. package/styles/h-scroll/bootstrap5.css +1 -1
  417. package/styles/h-scroll/fabric-dark.css +1 -1
  418. package/styles/h-scroll/fabric.css +2 -2
  419. package/styles/h-scroll/fluent-dark.css +1 -1
  420. package/styles/h-scroll/fluent.css +1 -1
  421. package/styles/h-scroll/fluent2.css +1 -1
  422. package/styles/h-scroll/highcontrast-light.css +1 -1
  423. package/styles/h-scroll/highcontrast.css +1 -1
  424. package/styles/h-scroll/icons/_bds.scss +49 -49
  425. package/styles/h-scroll/icons/_bootstrap-dark.scss +49 -49
  426. package/styles/h-scroll/icons/_bootstrap.scss +49 -49
  427. package/styles/h-scroll/icons/_bootstrap4.scss +49 -49
  428. package/styles/h-scroll/icons/_bootstrap5.3.scss +49 -49
  429. package/styles/h-scroll/icons/_bootstrap5.scss +49 -49
  430. package/styles/h-scroll/icons/_fabric-dark.scss +49 -49
  431. package/styles/h-scroll/icons/_fabric.scss +49 -49
  432. package/styles/h-scroll/icons/_fluent.scss +49 -49
  433. package/styles/h-scroll/icons/_fluent2.scss +49 -49
  434. package/styles/h-scroll/icons/_fusionnew.scss +49 -49
  435. package/styles/h-scroll/icons/_highcontrast-light.scss +49 -49
  436. package/styles/h-scroll/icons/_highcontrast.scss +49 -49
  437. package/styles/h-scroll/icons/_material-dark.scss +49 -49
  438. package/styles/h-scroll/icons/_material.scss +49 -49
  439. package/styles/h-scroll/icons/_material3.scss +49 -49
  440. package/styles/h-scroll/icons/_tailwind.scss +49 -49
  441. package/styles/h-scroll/icons/_tailwind3.scss +49 -49
  442. package/styles/h-scroll/material-dark.css +1 -1
  443. package/styles/h-scroll/material.css +1 -1
  444. package/styles/h-scroll/material3-dark.css +1 -1
  445. package/styles/h-scroll/material3-dark.scss +1 -1
  446. package/styles/h-scroll/material3.css +1 -1
  447. package/styles/h-scroll/material3.scss +1 -1
  448. package/styles/h-scroll/tailwind-dark.css +1 -1
  449. package/styles/h-scroll/tailwind.css +1 -1
  450. package/styles/h-scroll/tailwind3.css +1 -1
  451. package/styles/highcontrast-light-lite.css +70 -5
  452. package/styles/highcontrast-light.css +72 -7
  453. package/styles/highcontrast-lite.css +73 -8
  454. package/styles/highcontrast.css +75 -10
  455. package/styles/material-dark-lite.css +75 -9
  456. package/styles/material-dark.css +77 -11
  457. package/styles/material-lite.css +81 -16
  458. package/styles/material.css +83 -18
  459. package/styles/material3-dark-lite.css +81 -15
  460. package/styles/material3-dark.css +91 -20
  461. package/styles/material3-dark.scss +1 -1
  462. package/styles/material3-lite.css +81 -15
  463. package/styles/material3.css +91 -20
  464. package/styles/material3.scss +1 -1
  465. package/styles/menu/_all.scss +2 -2
  466. package/styles/menu/_bds-definition.scss +65 -65
  467. package/styles/menu/_bigger.scss +381 -381
  468. package/styles/menu/_bootstrap-dark-definition.scss +61 -61
  469. package/styles/menu/_bootstrap-definition.scss +65 -65
  470. package/styles/menu/_bootstrap4-definition.scss +66 -64
  471. package/styles/menu/_bootstrap5-definition.scss +66 -66
  472. package/styles/menu/_bootstrap5.3-definition.scss +66 -66
  473. package/styles/menu/_fabric-dark-definition.scss +61 -61
  474. package/styles/menu/_fabric-definition.scss +64 -64
  475. package/styles/menu/_fluent-definition.scss +66 -66
  476. package/styles/menu/_fluent2-definition.scss +67 -67
  477. package/styles/menu/_fusionnew-definition.scss +66 -66
  478. package/styles/menu/_highcontrast-definition.scss +65 -65
  479. package/styles/menu/_highcontrast-light-definition.scss +61 -61
  480. package/styles/menu/_layout.scss +501 -501
  481. package/styles/menu/_material-dark-definition.scss +61 -61
  482. package/styles/menu/_material-definition.scss +64 -64
  483. package/styles/menu/_material3-definition.scss +66 -66
  484. package/styles/menu/_tailwind-definition.scss +65 -65
  485. package/styles/menu/_tailwind3-definition.scss +66 -66
  486. package/styles/menu/_theme.scss +428 -418
  487. package/styles/menu/bootstrap4.css +13 -13
  488. package/styles/menu/bootstrap5-dark.css +14 -14
  489. package/styles/menu/fluent2.css +12 -3
  490. package/styles/menu/icons/_bds.scss +104 -104
  491. package/styles/menu/icons/_bootstrap-dark.scss +105 -105
  492. package/styles/menu/icons/_bootstrap.scss +104 -104
  493. package/styles/menu/icons/_bootstrap4.scss +104 -104
  494. package/styles/menu/icons/_bootstrap5.3.scss +104 -104
  495. package/styles/menu/icons/_bootstrap5.scss +104 -104
  496. package/styles/menu/icons/_fabric-dark.scss +104 -104
  497. package/styles/menu/icons/_fabric.scss +104 -104
  498. package/styles/menu/icons/_fluent.scss +104 -104
  499. package/styles/menu/icons/_fluent2.scss +104 -104
  500. package/styles/menu/icons/_fusionnew.scss +104 -104
  501. package/styles/menu/icons/_highcontrast-light.scss +104 -104
  502. package/styles/menu/icons/_highcontrast.scss +104 -104
  503. package/styles/menu/icons/_material-dark.scss +104 -104
  504. package/styles/menu/icons/_material.scss +104 -104
  505. package/styles/menu/icons/_material3.scss +104 -104
  506. package/styles/menu/icons/_tailwind-dark.scss +104 -104
  507. package/styles/menu/icons/_tailwind.scss +104 -104
  508. package/styles/menu/icons/_tailwind3.scss +104 -104
  509. package/styles/menu/material3-dark.scss +1 -1
  510. package/styles/menu/material3.scss +1 -1
  511. package/styles/pager/_all.scss +2 -2
  512. package/styles/pager/_bds-definition.scss +152 -152
  513. package/styles/pager/_bigger.scss +364 -363
  514. package/styles/pager/_bootstrap-dark-definition.scss +152 -151
  515. package/styles/pager/_bootstrap-definition.scss +151 -151
  516. package/styles/pager/_bootstrap4-definition.scss +152 -151
  517. package/styles/pager/_bootstrap5-definition.scss +166 -166
  518. package/styles/pager/_bootstrap5.3-definition.scss +166 -166
  519. package/styles/pager/_fabric-dark-definition.scss +149 -149
  520. package/styles/pager/_fabric-definition.scss +149 -149
  521. package/styles/pager/_fluent-definition.scss +153 -153
  522. package/styles/pager/_fluent2-definition.scss +152 -152
  523. package/styles/pager/_fusionnew-definition.scss +166 -166
  524. package/styles/pager/_highcontrast-definition.scss +149 -149
  525. package/styles/pager/_highcontrast-light-definition.scss +149 -149
  526. package/styles/pager/_layout.scss +776 -768
  527. package/styles/pager/_material-dark-definition.scss +150 -150
  528. package/styles/pager/_material-definition.scss +150 -150
  529. package/styles/pager/_material3-definition.scss +166 -166
  530. package/styles/pager/_tailwind-definition.scss +152 -152
  531. package/styles/pager/_tailwind3-definition.scss +166 -166
  532. package/styles/pager/_theme.scss +189 -189
  533. package/styles/pager/bds.css +13 -3
  534. package/styles/pager/bootstrap-dark.css +17 -7
  535. package/styles/pager/bootstrap.css +13 -3
  536. package/styles/pager/bootstrap4.css +14 -4
  537. package/styles/pager/bootstrap5-dark.css +21 -17
  538. package/styles/pager/bootstrap5.3.css +7 -3
  539. package/styles/pager/bootstrap5.css +12 -8
  540. package/styles/pager/fabric-dark.css +13 -3
  541. package/styles/pager/fabric.css +15 -5
  542. package/styles/pager/fluent-dark.css +14 -4
  543. package/styles/pager/fluent.css +14 -4
  544. package/styles/pager/fluent2.css +13 -3
  545. package/styles/pager/highcontrast-light.css +13 -3
  546. package/styles/pager/highcontrast.css +13 -3
  547. package/styles/pager/icons/_bds.scss +50 -50
  548. package/styles/pager/icons/_bootstrap-dark.scss +50 -50
  549. package/styles/pager/icons/_bootstrap.scss +50 -50
  550. package/styles/pager/icons/_bootstrap4.scss +50 -50
  551. package/styles/pager/icons/_bootstrap5.3.scss +50 -50
  552. package/styles/pager/icons/_bootstrap5.scss +50 -50
  553. package/styles/pager/icons/_fabric-dark.scss +50 -50
  554. package/styles/pager/icons/_fabric.scss +50 -50
  555. package/styles/pager/icons/_fluent.scss +50 -50
  556. package/styles/pager/icons/_fluent2.scss +50 -50
  557. package/styles/pager/icons/_fusionnew.scss +50 -50
  558. package/styles/pager/icons/_highcontrast-light.scss +50 -50
  559. package/styles/pager/icons/_highcontrast.scss +46 -46
  560. package/styles/pager/icons/_material-dark.scss +50 -50
  561. package/styles/pager/icons/_material.scss +46 -46
  562. package/styles/pager/icons/_material3.scss +50 -50
  563. package/styles/pager/icons/_tailwind.scss +50 -50
  564. package/styles/pager/icons/_tailwind3.scss +50 -50
  565. package/styles/pager/material-dark.css +13 -3
  566. package/styles/pager/material.css +13 -3
  567. package/styles/pager/material3-dark.css +20 -5
  568. package/styles/pager/material3-dark.scss +1 -1
  569. package/styles/pager/material3.css +20 -5
  570. package/styles/pager/material3.scss +1 -1
  571. package/styles/pager/tailwind-dark.css +13 -3
  572. package/styles/pager/tailwind.css +13 -3
  573. package/styles/pager/tailwind3.css +14 -4
  574. package/styles/sidebar/_all.scss +3 -3
  575. package/styles/sidebar/_bds-definition.scss +53 -53
  576. package/styles/sidebar/_bootstrap-dark-definition.scss +4 -4
  577. package/styles/sidebar/_bootstrap-definition.scss +4 -4
  578. package/styles/sidebar/_bootstrap4-definition.scss +4 -4
  579. package/styles/sidebar/_bootstrap5-definition.scss +6 -6
  580. package/styles/sidebar/_bootstrap5.3-definition.scss +6 -6
  581. package/styles/sidebar/_fabric-dark-definition.scss +4 -4
  582. package/styles/sidebar/_fabric-definition.scss +4 -4
  583. package/styles/sidebar/_fluent-definition.scss +6 -6
  584. package/styles/sidebar/_fluent2-definition.scss +8 -8
  585. package/styles/sidebar/_fusionnew-definition.scss +6 -6
  586. package/styles/sidebar/_highcontrast-definition.scss +4 -4
  587. package/styles/sidebar/_highcontrast-light-definition.scss +4 -4
  588. package/styles/sidebar/_icons.scss +1 -1
  589. package/styles/sidebar/_layout.scss +1 -1
  590. package/styles/sidebar/_material-dark-definition.scss +4 -4
  591. package/styles/sidebar/_material-definition.scss +6 -6
  592. package/styles/sidebar/_material3-definition.scss +4 -4
  593. package/styles/sidebar/_tailwind-definition.scss +6 -6
  594. package/styles/sidebar/_tailwind3-definition.scss +6 -6
  595. package/styles/sidebar/_theme.scss +251 -251
  596. package/styles/sidebar/bootstrap5-dark.css +1 -1
  597. package/styles/sidebar/material3-dark.scss +1 -1
  598. package/styles/sidebar/material3.scss +1 -1
  599. package/styles/stepper/_bds-definition.scss +72 -72
  600. package/styles/stepper/_bigger.scss +53 -53
  601. package/styles/stepper/_bootstrap4-definition.scss +4 -2
  602. package/styles/stepper/_bootstrap5.3-definition.scss +72 -72
  603. package/styles/stepper/_fluent2-definition.scss +72 -72
  604. package/styles/stepper/_material-dark-definition.scss +4 -2
  605. package/styles/stepper/_material-definition.scss +7 -5
  606. package/styles/stepper/_tailwind3-definition.scss +72 -72
  607. package/styles/stepper/bootstrap-dark.css +2 -2
  608. package/styles/stepper/bootstrap4.css +2 -2
  609. package/styles/stepper/bootstrap5-dark.css +20 -20
  610. package/styles/stepper/bootstrap5.css +2 -2
  611. package/styles/stepper/fabric-dark.css +2 -2
  612. package/styles/stepper/fabric.css +2 -2
  613. package/styles/stepper/fluent-dark.css +1 -1
  614. package/styles/stepper/fluent.css +1 -1
  615. package/styles/stepper/icons/_bds.scss +5 -5
  616. package/styles/stepper/icons/_bootstrap5.3.scss +5 -5
  617. package/styles/stepper/icons/_fluent2.scss +5 -5
  618. package/styles/stepper/icons/_tailwind3.scss +5 -5
  619. package/styles/stepper/material-dark.css +2 -2
  620. package/styles/stepper/material.css +8 -8
  621. package/styles/stepper/material3-dark.scss +1 -1
  622. package/styles/stepper/material3.scss +1 -1
  623. package/styles/tab/_all.scss +2 -2
  624. package/styles/tab/_bds-definition.scss +661 -661
  625. package/styles/tab/_bigger.scss +1276 -1276
  626. package/styles/tab/_bootstrap-dark-definition.scss +630 -628
  627. package/styles/tab/_bootstrap-definition.scss +629 -629
  628. package/styles/tab/_bootstrap4-definition.scss +637 -635
  629. package/styles/tab/_bootstrap5-definition.scss +635 -633
  630. package/styles/tab/_bootstrap5.3-definition.scss +636 -634
  631. package/styles/tab/_fabric-dark-definition.scss +641 -641
  632. package/styles/tab/_fabric-definition.scss +643 -643
  633. package/styles/tab/_fluent-definition.scss +637 -635
  634. package/styles/tab/_fluent2-definition.scss +664 -664
  635. package/styles/tab/_fusionnew-definition.scss +632 -632
  636. package/styles/tab/_highcontrast-definition.scss +667 -667
  637. package/styles/tab/_highcontrast-light-definition.scss +666 -666
  638. package/styles/tab/_icons.scss +34 -34
  639. package/styles/tab/_layout.scss +2191 -2187
  640. package/styles/tab/_material-dark-definition.scss +646 -646
  641. package/styles/tab/_material-definition.scss +645 -645
  642. package/styles/tab/_material3-definition.scss +634 -634
  643. package/styles/tab/_tailwind-definition.scss +648 -648
  644. package/styles/tab/_tailwind3-definition.scss +634 -634
  645. package/styles/tab/_theme.scss +1580 -1580
  646. package/styles/tab/bds.css +5 -0
  647. package/styles/tab/bootstrap-dark.css +35 -30
  648. package/styles/tab/bootstrap.css +7 -2
  649. package/styles/tab/bootstrap4.css +38 -33
  650. package/styles/tab/bootstrap5-dark.css +60 -55
  651. package/styles/tab/bootstrap5.3.css +18 -13
  652. package/styles/tab/bootstrap5.css +40 -35
  653. package/styles/tab/fabric-dark.css +5 -0
  654. package/styles/tab/fabric.css +10 -5
  655. package/styles/tab/fluent-dark.css +19 -14
  656. package/styles/tab/fluent.css +19 -14
  657. package/styles/tab/fluent2.css +7 -2
  658. package/styles/tab/highcontrast-light.css +5 -0
  659. package/styles/tab/highcontrast.css +6 -1
  660. package/styles/tab/icons/_bds.scss +90 -90
  661. package/styles/tab/icons/_bootstrap-dark.scss +98 -98
  662. package/styles/tab/icons/_bootstrap.scss +98 -98
  663. package/styles/tab/icons/_bootstrap4.scss +101 -101
  664. package/styles/tab/icons/_bootstrap5.3.scss +90 -90
  665. package/styles/tab/icons/_bootstrap5.scss +90 -90
  666. package/styles/tab/icons/_fabric-dark.scss +98 -98
  667. package/styles/tab/icons/_fabric.scss +98 -98
  668. package/styles/tab/icons/_fluent.scss +98 -98
  669. package/styles/tab/icons/_fluent2.scss +98 -98
  670. package/styles/tab/icons/_fusionnew.scss +90 -90
  671. package/styles/tab/icons/_highcontrast-light.scss +90 -90
  672. package/styles/tab/icons/_highcontrast.scss +101 -101
  673. package/styles/tab/icons/_material-dark.scss +90 -90
  674. package/styles/tab/icons/_material.scss +90 -90
  675. package/styles/tab/icons/_material3.scss +90 -90
  676. package/styles/tab/icons/_tailwind.scss +90 -90
  677. package/styles/tab/icons/_tailwind3.scss +90 -90
  678. package/styles/tab/material-dark.css +5 -0
  679. package/styles/tab/material.css +6 -1
  680. package/styles/tab/material3-dark.css +15 -10
  681. package/styles/tab/material3-dark.scss +1 -1
  682. package/styles/tab/material3.css +15 -10
  683. package/styles/tab/material3.scss +1 -1
  684. package/styles/tab/tailwind-dark.css +13 -8
  685. package/styles/tab/tailwind.css +13 -8
  686. package/styles/tab/tailwind3.css +32 -26
  687. package/styles/tailwind-dark-lite.css +80 -15
  688. package/styles/tailwind-dark.css +84 -19
  689. package/styles/tailwind-lite.css +78 -13
  690. package/styles/tailwind.css +82 -17
  691. package/styles/tailwind3-lite.css +105 -58
  692. package/styles/tailwind3.css +109 -61
  693. package/styles/toolbar/_all.scss +2 -2
  694. package/styles/toolbar/_bds-definition.scss +197 -197
  695. package/styles/toolbar/_bigger.scss +323 -323
  696. package/styles/toolbar/_bootstrap-dark-definition.scss +193 -193
  697. package/styles/toolbar/_bootstrap-definition.scss +203 -203
  698. package/styles/toolbar/_bootstrap4-definition.scss +200 -198
  699. package/styles/toolbar/_bootstrap5-definition.scss +198 -198
  700. package/styles/toolbar/_bootstrap5.3-definition.scss +198 -198
  701. package/styles/toolbar/_fabric-dark-definition.scss +207 -207
  702. package/styles/toolbar/_fabric-definition.scss +195 -195
  703. package/styles/toolbar/_fluent-definition.scss +197 -197
  704. package/styles/toolbar/_fluent2-definition.scss +198 -198
  705. package/styles/toolbar/_fusionnew-definition.scss +198 -198
  706. package/styles/toolbar/_highcontrast-definition.scss +204 -204
  707. package/styles/toolbar/_highcontrast-light-definition.scss +218 -218
  708. package/styles/toolbar/_layout.scss +781 -748
  709. package/styles/toolbar/_material-dark-definition.scss +233 -231
  710. package/styles/toolbar/_material-definition.scss +221 -219
  711. package/styles/toolbar/_material3-definition.scss +199 -199
  712. package/styles/toolbar/_tailwind-definition.scss +197 -197
  713. package/styles/toolbar/_tailwind3-definition.scss +199 -199
  714. package/styles/toolbar/_theme.scss +410 -436
  715. package/styles/toolbar/bds.css +23 -2
  716. package/styles/toolbar/bootstrap-dark.css +25 -4
  717. package/styles/toolbar/bootstrap.css +25 -4
  718. package/styles/toolbar/bootstrap4.css +35 -14
  719. package/styles/toolbar/bootstrap5-dark.css +70 -49
  720. package/styles/toolbar/bootstrap5.3.css +33 -4
  721. package/styles/toolbar/bootstrap5.css +46 -25
  722. package/styles/toolbar/fabric-dark.css +23 -2
  723. package/styles/toolbar/fabric.css +32 -11
  724. package/styles/toolbar/fluent-dark.css +23 -2
  725. package/styles/toolbar/fluent.css +23 -2
  726. package/styles/toolbar/fluent2.css +30 -28
  727. package/styles/toolbar/highcontrast-light.css +23 -2
  728. package/styles/toolbar/highcontrast.css +25 -4
  729. package/styles/toolbar/icons/_bds.scss +14 -14
  730. package/styles/toolbar/icons/_bootstrap-dark.scss +14 -14
  731. package/styles/toolbar/icons/_bootstrap.scss +14 -14
  732. package/styles/toolbar/icons/_bootstrap4.scss +14 -14
  733. package/styles/toolbar/icons/_bootstrap5.3.scss +14 -14
  734. package/styles/toolbar/icons/_bootstrap5.scss +14 -14
  735. package/styles/toolbar/icons/_fabric-dark.scss +14 -14
  736. package/styles/toolbar/icons/_fabric.scss +14 -14
  737. package/styles/toolbar/icons/_fluent.scss +14 -14
  738. package/styles/toolbar/icons/_fluent2.scss +14 -14
  739. package/styles/toolbar/icons/_fusionnew.scss +14 -14
  740. package/styles/toolbar/icons/_highcontrast-light.scss +14 -14
  741. package/styles/toolbar/icons/_highcontrast.scss +14 -14
  742. package/styles/toolbar/icons/_material-dark.scss +14 -14
  743. package/styles/toolbar/icons/_material.scss +14 -14
  744. package/styles/toolbar/icons/_material3.scss +14 -14
  745. package/styles/toolbar/icons/_tailwind.scss +14 -14
  746. package/styles/toolbar/icons/_tailwind3.scss +14 -14
  747. package/styles/toolbar/material-dark.css +25 -4
  748. package/styles/toolbar/material.css +25 -4
  749. package/styles/toolbar/material3-dark.css +23 -2
  750. package/styles/toolbar/material3-dark.scss +1 -1
  751. package/styles/toolbar/material3.css +23 -2
  752. package/styles/toolbar/material3.scss +1 -1
  753. package/styles/toolbar/tailwind-dark.css +23 -2
  754. package/styles/toolbar/tailwind.css +23 -2
  755. package/styles/toolbar/tailwind3.css +30 -28
  756. package/styles/treeview/_all.scss +2 -2
  757. package/styles/treeview/_bds-definition.scss +131 -131
  758. package/styles/treeview/_bigger.scss +410 -406
  759. package/styles/treeview/_bootstrap-dark-definition.scss +118 -118
  760. package/styles/treeview/_bootstrap-definition.scss +113 -113
  761. package/styles/treeview/_bootstrap4-definition.scss +143 -141
  762. package/styles/treeview/_bootstrap5-definition.scss +122 -120
  763. package/styles/treeview/_bootstrap5.3-definition.scss +119 -119
  764. package/styles/treeview/_fabric-dark-definition.scss +116 -116
  765. package/styles/treeview/_fabric-definition.scss +112 -112
  766. package/styles/treeview/_fluent-definition.scss +122 -120
  767. package/styles/treeview/_fluent2-definition.scss +128 -128
  768. package/styles/treeview/_fusionnew-definition.scss +120 -120
  769. package/styles/treeview/_highcontrast-definition.scss +118 -118
  770. package/styles/treeview/_highcontrast-light-definition.scss +123 -123
  771. package/styles/treeview/_layout.scss +769 -761
  772. package/styles/treeview/_material-dark-definition.scss +114 -114
  773. package/styles/treeview/_material-definition.scss +112 -112
  774. package/styles/treeview/_material3-definition.scss +110 -110
  775. package/styles/treeview/_tailwind-definition.scss +126 -124
  776. package/styles/treeview/_tailwind3-definition.scss +126 -126
  777. package/styles/treeview/_theme.scss +352 -350
  778. package/styles/treeview/bds.css +8 -0
  779. package/styles/treeview/bootstrap-dark.css +8 -0
  780. package/styles/treeview/bootstrap.css +8 -0
  781. package/styles/treeview/bootstrap4.css +17 -9
  782. package/styles/treeview/bootstrap5-dark.css +20 -12
  783. package/styles/treeview/bootstrap5.3.css +15 -7
  784. package/styles/treeview/bootstrap5.css +11 -3
  785. package/styles/treeview/fabric-dark.css +8 -0
  786. package/styles/treeview/fabric.css +15 -7
  787. package/styles/treeview/fluent-dark.css +11 -5
  788. package/styles/treeview/fluent.css +11 -5
  789. package/styles/treeview/fluent2.css +8 -0
  790. package/styles/treeview/highcontrast-light.css +8 -0
  791. package/styles/treeview/highcontrast.css +8 -0
  792. package/styles/treeview/icons/_bds.scss +44 -44
  793. package/styles/treeview/icons/_bootstrap-dark.scss +40 -40
  794. package/styles/treeview/icons/_bootstrap.scss +40 -40
  795. package/styles/treeview/icons/_bootstrap4.scss +40 -40
  796. package/styles/treeview/icons/_bootstrap5.3.scss +44 -44
  797. package/styles/treeview/icons/_bootstrap5.scss +44 -44
  798. package/styles/treeview/icons/_fabric-dark.scss +44 -44
  799. package/styles/treeview/icons/_fabric.scss +44 -44
  800. package/styles/treeview/icons/_fluent.scss +44 -44
  801. package/styles/treeview/icons/_fluent2.scss +44 -44
  802. package/styles/treeview/icons/_fusionnew.scss +44 -44
  803. package/styles/treeview/icons/_highcontrast-light.scss +44 -44
  804. package/styles/treeview/icons/_highcontrast.scss +44 -44
  805. package/styles/treeview/icons/_material-dark.scss +44 -44
  806. package/styles/treeview/icons/_material.scss +44 -44
  807. package/styles/treeview/icons/_material3.scss +44 -44
  808. package/styles/treeview/icons/_tailwind-dark.scss +44 -44
  809. package/styles/treeview/icons/_tailwind.scss +44 -44
  810. package/styles/treeview/icons/_tailwind3.scss +44 -44
  811. package/styles/treeview/material-dark.css +8 -0
  812. package/styles/treeview/material.css +8 -0
  813. package/styles/treeview/material3-dark.css +9 -1
  814. package/styles/treeview/material3-dark.scss +1 -1
  815. package/styles/treeview/material3.css +9 -1
  816. package/styles/treeview/material3.scss +1 -1
  817. package/styles/treeview/tailwind-dark.css +10 -2
  818. package/styles/treeview/tailwind.css +10 -2
  819. package/styles/treeview/tailwind3.css +10 -1
  820. package/styles/v-scroll/_all.scss +2 -2
  821. package/styles/v-scroll/_bds-definition.scss +49 -49
  822. package/styles/v-scroll/_bigger.scss +28 -28
  823. package/styles/v-scroll/_bootstrap-dark-definition.scss +51 -51
  824. package/styles/v-scroll/_bootstrap-definition.scss +49 -49
  825. package/styles/v-scroll/_bootstrap4-definition.scss +49 -49
  826. package/styles/v-scroll/_bootstrap5-definition.scss +49 -49
  827. package/styles/v-scroll/_bootstrap5.3-definition.scss +49 -49
  828. package/styles/v-scroll/_fabric-dark-definition.scss +52 -52
  829. package/styles/v-scroll/_fabric-definition.scss +50 -50
  830. package/styles/v-scroll/_fluent-definition.scss +49 -49
  831. package/styles/v-scroll/_fluent2-definition.scss +49 -49
  832. package/styles/v-scroll/_fusionnew-definition.scss +49 -49
  833. package/styles/v-scroll/_highcontrast-definition.scss +50 -50
  834. package/styles/v-scroll/_highcontrast-light-definition.scss +52 -52
  835. package/styles/v-scroll/_layout.scss +135 -135
  836. package/styles/v-scroll/_material-dark-definition.scss +79 -79
  837. package/styles/v-scroll/_material-definition.scss +77 -77
  838. package/styles/v-scroll/_material3-definition.scss +49 -49
  839. package/styles/v-scroll/_tailwind-definition.scss +49 -49
  840. package/styles/v-scroll/_tailwind3-definition.scss +49 -49
  841. package/styles/v-scroll/_theme.scss +114 -114
  842. package/styles/v-scroll/fabric-dark.css +1 -1
  843. package/styles/v-scroll/fabric.css +1 -1
  844. package/styles/v-scroll/icons/_bds.scss +27 -27
  845. package/styles/v-scroll/icons/_bootstrap-dark.scss +27 -27
  846. package/styles/v-scroll/icons/_bootstrap.scss +27 -27
  847. package/styles/v-scroll/icons/_bootstrap4.scss +27 -27
  848. package/styles/v-scroll/icons/_bootstrap5.3.scss +27 -27
  849. package/styles/v-scroll/icons/_bootstrap5.scss +27 -27
  850. package/styles/v-scroll/icons/_fabric-dark.scss +27 -27
  851. package/styles/v-scroll/icons/_fabric.scss +27 -27
  852. package/styles/v-scroll/icons/_fluent.scss +27 -27
  853. package/styles/v-scroll/icons/_fluent2.scss +27 -27
  854. package/styles/v-scroll/icons/_fusionnew.scss +27 -27
  855. package/styles/v-scroll/icons/_highcontrast-light.scss +27 -27
  856. package/styles/v-scroll/icons/_highcontrast.scss +27 -27
  857. package/styles/v-scroll/icons/_material-dark.scss +27 -27
  858. package/styles/v-scroll/icons/_material.scss +27 -27
  859. package/styles/v-scroll/icons/_material3.scss +27 -27
  860. package/styles/v-scroll/icons/_tailwind.scss +27 -27
  861. package/styles/v-scroll/icons/_tailwind3.scss +27 -27
  862. package/styles/v-scroll/material3-dark.scss +1 -1
  863. package/styles/v-scroll/material3.scss +1 -1
  864. package/tslint.json +111 -111
  865. package/helpers/e2e/accordionHelper.d.ts +0 -56
  866. package/helpers/e2e/accordionHelper.js +0 -71
  867. package/helpers/e2e/contextmenuHelper.d.ts +0 -37
  868. package/helpers/e2e/contextmenuHelper.js +0 -53
  869. package/helpers/e2e/index.d.ts +0 -7
  870. package/helpers/e2e/index.js +0 -14
  871. package/helpers/e2e/menuHelper.d.ts +0 -37
  872. package/helpers/e2e/menuHelper.js +0 -53
  873. package/helpers/e2e/sidebarHelper.d.ts +0 -94
  874. package/helpers/e2e/sidebarHelper.js +0 -110
  875. package/helpers/e2e/tabHelper.d.ts +0 -60
  876. package/helpers/e2e/tabHelper.js +0 -74
  877. package/helpers/e2e/toolbarHelper.d.ts +0 -60
  878. package/helpers/e2e/toolbarHelper.js +0 -74
  879. package/helpers/e2e/treeview.d.ts +0 -50
  880. package/helpers/e2e/treeview.js +0 -80
@@ -0,0 +1,2564 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
15
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
+ 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;
18
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
19
+ };
20
+ import { Component, Property, Event, closest, Collection, Complex, attributes, detach, isNullOrUndefined, animationMode } from '@syncfusion/ej2-base';
21
+ import { NotifyPropertyChanges, ChildProperty, select, isVisible } from '@syncfusion/ej2-base';
22
+ import { KeyboardEvents, Browser, formatUnit, L10n } from '@syncfusion/ej2-base';
23
+ import { setStyleAttribute as setStyle, isNullOrUndefined as isNOU, selectAll, addClass, removeClass, remove } from '@syncfusion/ej2-base';
24
+ import { EventHandler, rippleEffect, Touch, compile, Animation } from '@syncfusion/ej2-base';
25
+ import { getRandomId, SanitizeHtmlHelper, Draggable } from '@syncfusion/ej2-base';
26
+ import { Toolbar } from '../toolbar/toolbar';
27
+ var CLS_TAB = 'e-tab';
28
+ var CLS_HEADER = 'e-tab-header';
29
+ var CLS_BLA_TEM = 'blazor-template';
30
+ var CLS_CONTENT = 'e-content';
31
+ var CLS_NEST = 'e-nested';
32
+ var CLS_ITEMS = 'e-items';
33
+ var CLS_ITEM = 'e-item';
34
+ var CLS_TEMPLATE = 'e-template';
35
+ var CLS_RTL = 'e-rtl';
36
+ var CLS_ACTIVE = 'e-active';
37
+ var CLS_DISABLE = 'e-disable';
38
+ var CLS_HIDDEN = 'e-hidden';
39
+ var CLS_FOCUS = 'e-focused';
40
+ var CLS_ICONS = 'e-icons';
41
+ var CLS_ICON = 'e-icon';
42
+ var CLS_ICON_TAB = 'e-icon-tab';
43
+ var CLS_ICON_CLOSE = 'e-close-icon';
44
+ var CLS_CLOSE_SHOW = 'e-close-show';
45
+ var CLS_TEXT = 'e-tab-text';
46
+ var CLS_INDICATOR = 'e-indicator';
47
+ var CLS_WRAP = 'e-tab-wrap';
48
+ var CLS_TEXT_WRAP = 'e-text-wrap';
49
+ var CLS_TAB_ICON = 'e-tab-icon';
50
+ var CLS_TB_ITEMS = 'e-toolbar-items';
51
+ var CLS_TB_ITEM = 'e-toolbar-item';
52
+ var CLS_TB_POP = 'e-toolbar-pop';
53
+ var CLS_TB_POPUP = 'e-toolbar-popup';
54
+ var CLS_HOR_NAV = 'e-hor-nav';
55
+ var CLS_POPUP_OPEN = 'e-popup-open';
56
+ var CLS_POPUP_CLOSE = 'e-popup-close';
57
+ var CLS_PROGRESS = 'e-progress';
58
+ var CLS_IGNORE = 'e-ignore';
59
+ var CLS_OVERLAY = 'e-overlay';
60
+ var CLS_HSCRCNT = 'e-hscroll-content';
61
+ var CLS_VSCRCNT = 'e-vscroll-content';
62
+ var CLS_VTAB = 'e-vertical-tab';
63
+ var CLS_VERTICAL = 'e-vertical';
64
+ var CLS_VLEFT = 'e-vertical-left';
65
+ var CLS_VRIGHT = 'e-vertical-right';
66
+ var CLS_HBOTTOM = 'e-horizontal-bottom';
67
+ var CLS_FILL = 'e-fill-mode';
68
+ var TABITEMPREFIX = 'tabitem_';
69
+ var CLS_REORDER_ACTIVE_ITEM = 'e-reorder-active-item';
70
+ /**
71
+ * Objects used for configuring the Tab selecting item action properties.
72
+ */
73
+ var TabActionSettings = /** @class */ (function (_super) {
74
+ __extends(TabActionSettings, _super);
75
+ function TabActionSettings() {
76
+ return _super !== null && _super.apply(this, arguments) || this;
77
+ }
78
+ __decorate([
79
+ Property('SlideLeftIn')
80
+ ], TabActionSettings.prototype, "effect", void 0);
81
+ __decorate([
82
+ Property(600)
83
+ ], TabActionSettings.prototype, "duration", void 0);
84
+ __decorate([
85
+ Property('ease')
86
+ ], TabActionSettings.prototype, "easing", void 0);
87
+ return TabActionSettings;
88
+ }(ChildProperty));
89
+ export { TabActionSettings };
90
+ /**
91
+ * Objects used for configuring the Tab animation properties.
92
+ */
93
+ var TabAnimationSettings = /** @class */ (function (_super) {
94
+ __extends(TabAnimationSettings, _super);
95
+ function TabAnimationSettings() {
96
+ return _super !== null && _super.apply(this, arguments) || this;
97
+ }
98
+ __decorate([
99
+ Complex({ effect: 'SlideLeftIn', duration: 600, easing: 'ease' }, TabActionSettings)
100
+ ], TabAnimationSettings.prototype, "previous", void 0);
101
+ __decorate([
102
+ Complex({ effect: 'SlideRightIn', duration: 600, easing: 'ease' }, TabActionSettings)
103
+ ], TabAnimationSettings.prototype, "next", void 0);
104
+ return TabAnimationSettings;
105
+ }(ChildProperty));
106
+ export { TabAnimationSettings };
107
+ /**
108
+ * Objects used for configuring the Tab item header properties.
109
+ */
110
+ var Header = /** @class */ (function (_super) {
111
+ __extends(Header, _super);
112
+ function Header() {
113
+ return _super !== null && _super.apply(this, arguments) || this;
114
+ }
115
+ __decorate([
116
+ Property('')
117
+ ], Header.prototype, "text", void 0);
118
+ __decorate([
119
+ Property('')
120
+ ], Header.prototype, "iconCss", void 0);
121
+ __decorate([
122
+ Property('left')
123
+ ], Header.prototype, "iconPosition", void 0);
124
+ return Header;
125
+ }(ChildProperty));
126
+ export { Header };
127
+ /**
128
+ * An array of object that is used to configure the Tab.
129
+ */
130
+ var TabItem = /** @class */ (function (_super) {
131
+ __extends(TabItem, _super);
132
+ function TabItem() {
133
+ return _super !== null && _super.apply(this, arguments) || this;
134
+ }
135
+ __decorate([
136
+ Complex({}, Header)
137
+ ], TabItem.prototype, "header", void 0);
138
+ __decorate([
139
+ Property(null)
140
+ ], TabItem.prototype, "headerTemplate", void 0);
141
+ __decorate([
142
+ Property('')
143
+ ], TabItem.prototype, "content", void 0);
144
+ __decorate([
145
+ Property('')
146
+ ], TabItem.prototype, "cssClass", void 0);
147
+ __decorate([
148
+ Property(false)
149
+ ], TabItem.prototype, "disabled", void 0);
150
+ __decorate([
151
+ Property(true)
152
+ ], TabItem.prototype, "visible", void 0);
153
+ __decorate([
154
+ Property()
155
+ ], TabItem.prototype, "id", void 0);
156
+ __decorate([
157
+ Property(-1)
158
+ ], TabItem.prototype, "tabIndex", void 0);
159
+ return TabItem;
160
+ }(ChildProperty));
161
+ export { TabItem };
162
+ /**
163
+ * Tab is a content panel to show multiple contents in a single space, one at a time.
164
+ * Each Tab item has an associated content, that will be displayed based on the active Tab header item.
165
+ * ```html
166
+ * <div id="tab"></div>
167
+ * <script>
168
+ * var tabObj = new Tab();
169
+ * tab.appendTo("#tab");
170
+ * </script>
171
+ * ```
172
+ */
173
+ var Tab = /** @class */ (function (_super) {
174
+ __extends(Tab, _super);
175
+ /**
176
+ * Initializes a new instance of the Tab class.
177
+ *
178
+ * @param {TabModel} options - Specifies Tab model properties as options.
179
+ * @param {string | HTMLElement} element - Specifies the element that is rendered as a Tab.
180
+ */
181
+ function Tab(options, element) {
182
+ var _this = _super.call(this, options, element) || this;
183
+ _this.show = {};
184
+ _this.hide = {};
185
+ _this.maxHeight = 0;
186
+ _this.title = 'Close';
187
+ _this.isInteracted = false;
188
+ _this.lastIndex = 0;
189
+ _this.isAdd = false;
190
+ _this.isIconAlone = false;
191
+ _this.draggableItems = [];
192
+ _this.resizeContext = _this.refreshActiveTabBorder.bind(_this);
193
+ /**
194
+ * Contains the keyboard configuration of the Tab.
195
+ */
196
+ _this.keyConfigs = {
197
+ tab: 'tab',
198
+ home: 'home',
199
+ end: 'end',
200
+ enter: 'enter',
201
+ space: 'space',
202
+ delete: 'delete',
203
+ moveLeft: 'leftarrow',
204
+ moveRight: 'rightarrow',
205
+ moveUp: 'uparrow',
206
+ moveDown: 'downarrow'
207
+ };
208
+ return _this;
209
+ }
210
+ /**
211
+ * Removes the component from the DOM and detaches all its related event handlers, attributes and classes.
212
+ *
213
+ * @returns {void}
214
+ */
215
+ Tab.prototype.destroy = function () {
216
+ if (this.isReact || this.isAngular) {
217
+ this.clearTemplate();
218
+ }
219
+ if (!isNOU(this.tbObj)) {
220
+ this.tbObj.destroy();
221
+ this.tbObj = null;
222
+ }
223
+ this.unWireEvents();
224
+ this.element.removeAttribute('aria-disabled');
225
+ this.expTemplateContent();
226
+ if (!this.isTemplate) {
227
+ while (this.element.firstElementChild) {
228
+ remove(this.element.firstElementChild);
229
+ }
230
+ }
231
+ else {
232
+ var cntEle = select('.' + CLS_TAB + ' > .' + CLS_CONTENT, this.element);
233
+ this.element.classList.remove(CLS_TEMPLATE);
234
+ if (!isNOU(cntEle)) {
235
+ cntEle.innerHTML = this.cnt;
236
+ }
237
+ }
238
+ if (this.btnCls) {
239
+ this.btnCls = null;
240
+ }
241
+ this.hdrEle = null;
242
+ this.cntEle = null;
243
+ this.tbItems = null;
244
+ this.tbItem = null;
245
+ this.tbPop = null;
246
+ this.prevItem = null;
247
+ this.popEle = null;
248
+ this.bdrLine = null;
249
+ this.content = null;
250
+ this.dragItem = null;
251
+ this.cloneElement = null;
252
+ this.draggingItems = [];
253
+ if (this.draggableItems && this.draggableItems.length > 0) {
254
+ for (var i = 0; i < this.draggableItems.length; i++) {
255
+ this.draggableItems[i].destroy();
256
+ this.draggableItems[i] = null;
257
+ }
258
+ this.draggableItems = [];
259
+ }
260
+ _super.prototype.destroy.call(this);
261
+ this.trigger('destroyed');
262
+ };
263
+ /**
264
+ * Refresh the tab component
265
+ *
266
+ * @returns {void}
267
+ */
268
+ Tab.prototype.refresh = function () {
269
+ if (this.isReact) {
270
+ this.clearTemplate();
271
+ }
272
+ _super.prototype.refresh.call(this);
273
+ if (this.isReact) {
274
+ this.renderReactTemplates();
275
+ }
276
+ };
277
+ /**
278
+ * Reorganizes and adjusts the Tab headers to fit the available width without re-rendering the entire Tab component.
279
+ *
280
+ * This method is useful for optimizing the layout when:
281
+ * - A hidden tab item becomes visible.
282
+ * - The number of tab items changes dynamically.
283
+ *
284
+ * @returns {void} This method does not return a value.
285
+ */
286
+ Tab.prototype.refreshOverflow = function () {
287
+ if (!isNOU(this.tbObj)) {
288
+ this.tbObj.refreshOverflow();
289
+ }
290
+ };
291
+ /**
292
+ * Initialize component
293
+ *
294
+ * @private
295
+ * @returns {void}
296
+ */
297
+ Tab.prototype.preRender = function () {
298
+ var nested = closest(this.element, '.' + CLS_CONTENT);
299
+ this.prevIndex = 0;
300
+ this.isNested = false;
301
+ this.isPopup = false;
302
+ this.initRender = true;
303
+ this.isSwiped = false;
304
+ this.itemIndexArray = [];
305
+ this.templateEle = [];
306
+ if (this.allowDragAndDrop) {
307
+ this.dragArea = !isNOU(this.dragArea) ? this.dragArea : '#' + this.element.id + ' ' + ('.' + CLS_HEADER);
308
+ }
309
+ if (!isNOU(nested)) {
310
+ nested.parentElement.classList.add(CLS_NEST);
311
+ this.isNested = true;
312
+ }
313
+ var name = Browser.info.name;
314
+ var css = (name === 'msie') ? 'e-ie' : (name === 'edge') ? 'e-edge' : (name === 'safari') ? 'e-safari' : '';
315
+ setStyle(this.element, { 'width': formatUnit(this.width), 'height': formatUnit(this.height) });
316
+ this.setCssClass(this.element, this.cssClass, true);
317
+ attributes(this.element, { 'aria-disabled': 'false' });
318
+ this.setCssClass(this.element, css, true);
319
+ this.updatePopAnimationConfig();
320
+ };
321
+ /**
322
+ * Initialize the component rendering
323
+ *
324
+ * @private
325
+ * @returns {void}
326
+ */
327
+ Tab.prototype.render = function () {
328
+ var _this = this;
329
+ this.btnCls = this.createElement('span', { className: CLS_ICONS + ' ' + CLS_ICON_CLOSE, attrs: { title: this.title } });
330
+ this.tabId = this.element.id.length > 0 ? ('-' + this.element.id) : getRandomId();
331
+ this.renderContainer();
332
+ this.wireEvents();
333
+ this.initRender = false;
334
+ if (this.isReact && this.portals && this.portals.length > 0) {
335
+ this.renderReactTemplates(function () {
336
+ _this.refreshOverflow();
337
+ _this.refreshActiveBorder();
338
+ });
339
+ }
340
+ };
341
+ Tab.prototype.renderContainer = function () {
342
+ var ele = this.element;
343
+ this.items.forEach(function (item, index) {
344
+ if (isNOU(item.id) && !isNOU(item.setProperties)) {
345
+ item.setProperties({ id: TABITEMPREFIX + index.toString() }, true);
346
+ }
347
+ });
348
+ if (this.items.length > 0 && ele.children.length === 0) {
349
+ ele.appendChild(this.createElement('div', { className: CLS_CONTENT }));
350
+ this.setOrientation(this.headerPlacement, this.createElement('div', { className: CLS_HEADER }));
351
+ this.isTemplate = false;
352
+ }
353
+ else if (this.element.children.length > 0) {
354
+ this.isTemplate = true;
355
+ ele.classList.add(CLS_TEMPLATE);
356
+ var header = ele.querySelector('.' + CLS_HEADER);
357
+ if (header && this.headerPlacement === 'Bottom') {
358
+ this.setOrientation(this.headerPlacement, header);
359
+ }
360
+ }
361
+ if (!isNOU(select('.' + CLS_HEADER, this.element)) && !isNOU(select('.' + CLS_CONTENT, this.element))) {
362
+ this.renderHeader();
363
+ this.tbItems = select('.' + CLS_HEADER + ' .' + CLS_TB_ITEMS, this.element);
364
+ if (!isNOU(this.tbItems)) {
365
+ rippleEffect(this.tbItems, { selector: '.e-tab-wrap' });
366
+ }
367
+ this.renderContent();
368
+ if (selectAll('.' + CLS_TB_ITEM, this.element).length > 0) {
369
+ this.tbItems = select('.' + CLS_HEADER + ' .' + CLS_TB_ITEMS, this.element);
370
+ this.bdrLine = this.createElement('div', { className: CLS_INDICATOR + ' ' + CLS_HIDDEN + ' ' + CLS_IGNORE });
371
+ var scrCnt = select('.' + this.scrCntClass, this.tbItems);
372
+ if (!isNOU(scrCnt)) {
373
+ scrCnt.insertBefore(this.bdrLine, scrCnt.firstChild);
374
+ }
375
+ else {
376
+ this.tbItems.insertBefore(this.bdrLine, this.tbItems.firstChild);
377
+ }
378
+ this.setContentHeight(true);
379
+ this.select(this.selectedItem);
380
+ }
381
+ this.setRTL(this.enableRtl);
382
+ }
383
+ };
384
+ Tab.prototype.renderHeader = function () {
385
+ var _this = this;
386
+ var hdrPlace = this.headerPlacement;
387
+ var tabItems = [];
388
+ this.hdrEle = this.getTabHeader();
389
+ this.addVerticalClass();
390
+ if (!this.isTemplate) {
391
+ tabItems = this.parseObject(this.items, 0);
392
+ }
393
+ else {
394
+ if (this.element.children.length > 1 && this.element.children[1].classList.contains(CLS_HEADER)) {
395
+ this.setProperties({ headerPlacement: 'Bottom' }, true);
396
+ }
397
+ var count = this.hdrEle.children.length;
398
+ var hdrItems = [];
399
+ for (var i = 0; i < count; i++) {
400
+ hdrItems.push(this.hdrEle.children.item(i));
401
+ }
402
+ if (count > 0) {
403
+ var tabItems_1 = this.createElement('div', { className: CLS_ITEMS });
404
+ this.hdrEle.appendChild(tabItems_1);
405
+ hdrItems.forEach(function (item, index) {
406
+ _this.lastIndex = index;
407
+ var attr = {
408
+ className: CLS_ITEM, id: CLS_ITEM + _this.tabId + '_' + index
409
+ };
410
+ var txt = _this.createElement('span', {
411
+ className: CLS_TEXT, attrs: { 'role': 'presentation' }
412
+ }).outerHTML;
413
+ var cont = _this.createElement('div', {
414
+ className: CLS_TEXT_WRAP, innerHTML: txt + _this.btnCls.outerHTML
415
+ }).outerHTML;
416
+ var wrap = _this.createElement('div', {
417
+ className: CLS_WRAP, innerHTML: cont,
418
+ attrs: { role: 'tab', tabIndex: '-1', 'aria-selected': 'false', 'aria-controls': CLS_CONTENT + _this.tabId + '_' + index, 'aria-disabled': 'false' }
419
+ });
420
+ wrap.querySelector('.' + CLS_TEXT).appendChild(item);
421
+ tabItems_1.appendChild(_this.createElement('div', attr));
422
+ selectAll('.' + CLS_ITEM, tabItems_1)[index].appendChild(wrap);
423
+ });
424
+ }
425
+ }
426
+ this.tbObj = new Toolbar({
427
+ width: (hdrPlace === 'Left' || hdrPlace === 'Right') ? 'auto' : '100%',
428
+ height: (hdrPlace === 'Left' || hdrPlace === 'Right') ? '100%' : 'auto',
429
+ overflowMode: this.overflowMode,
430
+ items: (tabItems.length !== 0) ? tabItems : [],
431
+ clicked: this.clickHandler.bind(this),
432
+ scrollStep: this.scrollStep,
433
+ enableHtmlSanitizer: this.enableHtmlSanitizer,
434
+ cssClass: this.cssClass
435
+ });
436
+ this.tbObj.isStringTemplate = true;
437
+ this.tbObj.createElement = this.createElement;
438
+ this.tbObj.appendTo(this.hdrEle);
439
+ attributes(this.hdrEle, { role: 'tablist' });
440
+ if (!isNOU(this.element.getAttribute('aria-label'))) {
441
+ this.hdrEle.setAttribute('aria-label', this.element.getAttribute('aria-label'));
442
+ this.element.removeAttribute('aria-label');
443
+ }
444
+ else if (!isNOU(this.element.getAttribute('aria-labelledby'))) {
445
+ this.hdrEle.setAttribute('aria-labelledby', this.element.getAttribute('aria-labelledby'));
446
+ this.element.removeAttribute('aria-labelledby');
447
+ }
448
+ this.setCloseButton(this.showCloseButton);
449
+ var toolbarHeader = this.tbObj.element.querySelector('.' + CLS_TB_ITEMS);
450
+ if (!isNOU(toolbarHeader)) {
451
+ if (isNOU(toolbarHeader.id) || toolbarHeader.id === '') {
452
+ toolbarHeader.id = this.element.id + '_' + 'tab_header_items';
453
+ }
454
+ }
455
+ };
456
+ Tab.prototype.createContentElement = function (index) {
457
+ var contentElement = this.createElement('div', {
458
+ id: CLS_CONTENT + this.tabId + '_' + index, className: CLS_ITEM,
459
+ attrs: { 'role': 'tabpanel', 'aria-labelledby': CLS_ITEM + this.tabId + '_' + index }
460
+ });
461
+ if (['Dynamic', 'Demand'].indexOf(this.loadOn) !== -1 ||
462
+ (this.loadOn === 'Init' && index === Number(this.extIndex(this.itemIndexArray[0])))) {
463
+ addClass([contentElement], CLS_ACTIVE);
464
+ }
465
+ return contentElement;
466
+ };
467
+ Tab.prototype.renderContent = function () {
468
+ this.cntEle = select('.' + CLS_CONTENT, this.element);
469
+ var hdrItem = selectAll('.' + CLS_TB_ITEM, this.element);
470
+ if (this.isTemplate) {
471
+ this.cnt = (this.cntEle.children.length > 0) ? this.cntEle.innerHTML : '';
472
+ var contents = this.cntEle.children;
473
+ for (var i = 0; i < hdrItem.length; i++) {
474
+ if (contents.length - 1 >= i) {
475
+ addClass([contents.item(i)], CLS_ITEM);
476
+ attributes(contents.item(i), { 'role': 'tabpanel', 'aria-labelledby': CLS_ITEM + this.tabId + '_' + i });
477
+ contents.item(i).id = CLS_CONTENT + this.tabId + '_' + i;
478
+ }
479
+ }
480
+ }
481
+ else {
482
+ if (selectAll('.' + CLS_TB_ITEM, this.element).length > 0) {
483
+ if (this.loadOn === 'Init') {
484
+ for (var i = 0; i < this.itemIndexArray.length; i++) {
485
+ if (this.itemIndexArray[i]) {
486
+ this.cntEle.appendChild(this.createContentElement(Number(this.extIndex(this.itemIndexArray[i]))));
487
+ }
488
+ }
489
+ }
490
+ else if (this.loadOn === 'Dynamic') {
491
+ this.cntEle.appendChild(this.createContentElement(this.selectedItem > 0 ?
492
+ this.selectedItem : Number(this.extIndex(this.itemIndexArray[0]))));
493
+ }
494
+ }
495
+ }
496
+ };
497
+ Tab.prototype.reRenderItems = function () {
498
+ this.renderContainer();
499
+ if (!isNOU(this.cntEle)) {
500
+ this.bindSwipeEvents();
501
+ }
502
+ };
503
+ Tab.prototype.parseObject = function (items, index) {
504
+ var _this = this;
505
+ var tbItems = Array.prototype.slice.call(selectAll('.e-tab-header .' + CLS_TB_ITEM, this.element));
506
+ var maxId = this.lastIndex;
507
+ if (!this.isReplace && tbItems.length > 0) {
508
+ maxId = this.getMaxIndicesFromItems(tbItems);
509
+ }
510
+ var tItems = [];
511
+ var txtWrapEle;
512
+ var spliceArray = [];
513
+ var i = 0;
514
+ items.forEach(function (item, i) {
515
+ var pos = (isNOU(item.header) || isNOU(item.header.iconPosition)) ? '' : item.header.iconPosition;
516
+ var css = (isNOU(item.header) || isNOU(item.header.iconCss)) ? '' : item.header.iconCss;
517
+ if ((isNOU(item.headerTemplate)) && (isNOU(item.header) || isNOU(item.header.text) ||
518
+ ((item.header.text.length === 0)) && (css === ''))) {
519
+ spliceArray.push(i);
520
+ return;
521
+ }
522
+ var txt = item.headerTemplate || item.header.text;
523
+ if (typeof txt === 'string' && _this.enableHtmlSanitizer) {
524
+ txt = SanitizeHtmlHelper.sanitize(txt);
525
+ }
526
+ var itemIndex;
527
+ if (_this.isReplace && !isNOU(_this.tbId) && _this.tbId !== '') {
528
+ itemIndex = parseInt(_this.tbId.substring(_this.tbId.lastIndexOf('_') + 1), 10);
529
+ _this.tbId = '';
530
+ }
531
+ else {
532
+ itemIndex = index + i;
533
+ }
534
+ _this.lastIndex = ((tbItems.length === 0) ? i : ((_this.isReplace) ? (itemIndex) : (maxId + 1 + i)));
535
+ var disabled = (item.disabled) ? ' ' + CLS_DISABLE + ' ' + CLS_OVERLAY : '';
536
+ var hidden = (item.visible === false) ? ' ' + CLS_HIDDEN : '';
537
+ txtWrapEle = _this.createElement('div', { className: CLS_TEXT, attrs: { 'role': 'presentation' } });
538
+ var tHtml = ((txt instanceof Object) ? txt.outerHTML : txt);
539
+ var txtEmpty = (!isNOU(tHtml) && tHtml !== '');
540
+ if (!isNOU(txt.tagName)) {
541
+ txtWrapEle.appendChild(txt);
542
+ }
543
+ else {
544
+ _this.headerTextCompile(txtWrapEle, txt, i);
545
+ }
546
+ var tEle;
547
+ var icon = _this.createElement('span', {
548
+ className: CLS_ICONS + ' ' + CLS_TAB_ICON + ' ' + CLS_ICON + '-' + pos + ' ' + css
549
+ });
550
+ var tCont = _this.createElement('div', { className: CLS_TEXT_WRAP });
551
+ tCont.appendChild(txtWrapEle);
552
+ if ((txt !== '' && txt !== undefined) && css !== '') {
553
+ if ((pos === 'left' || pos === 'top')) {
554
+ tCont.insertBefore(icon, tCont.firstElementChild);
555
+ }
556
+ else {
557
+ tCont.appendChild(icon);
558
+ }
559
+ tEle = txtWrapEle;
560
+ _this.isIconAlone = false;
561
+ }
562
+ else {
563
+ tEle = ((css === '') ? txtWrapEle : icon);
564
+ if (tEle === icon) {
565
+ detach(txtWrapEle);
566
+ tCont.appendChild(icon);
567
+ _this.isIconAlone = true;
568
+ }
569
+ }
570
+ var tabIndex = isNOU(item.tabIndex) ? '-1' : item.tabIndex.toString();
571
+ var wrapAttrs = (item.disabled) ? { role: 'tab', 'aria-disabled': 'true' } : { tabIndex: tabIndex, 'data-tabindex': tabIndex, role: 'tab', 'aria-selected': 'false', 'aria-disabled': 'false' };
572
+ tCont.appendChild(_this.btnCls.cloneNode(true));
573
+ var wrap = _this.createElement('div', { className: CLS_WRAP, attrs: wrapAttrs });
574
+ wrap.appendChild(tCont);
575
+ if (_this.itemIndexArray instanceof Array) {
576
+ _this.itemIndexArray.splice((index + i), 0, CLS_ITEM + _this.tabId + '_' + _this.lastIndex);
577
+ }
578
+ var attrObj = {
579
+ id: CLS_ITEM + _this.tabId + '_' + _this.lastIndex, 'data-id': item.id
580
+ };
581
+ var tItem = { htmlAttributes: attrObj, template: wrap };
582
+ tItem.cssClass = ((item.cssClass !== undefined) ? item.cssClass : ' ') + ' ' + disabled + ' ' + hidden + ' '
583
+ + ((css !== '') ? 'e-i' + pos : '') + ' ' + ((!txtEmpty) ? CLS_ICON : '');
584
+ if (pos === 'top' || pos === 'bottom') {
585
+ _this.element.classList.add('e-vertical-icon');
586
+ }
587
+ tItems.push(tItem);
588
+ i++;
589
+ });
590
+ if (!this.isAdd) {
591
+ spliceArray.forEach(function (spliceItemIndex) {
592
+ _this.items.splice(spliceItemIndex, 1);
593
+ });
594
+ }
595
+ if (this.isIconAlone) {
596
+ this.element.classList.add(CLS_ICON_TAB);
597
+ }
598
+ else {
599
+ this.element.classList.remove(CLS_ICON_TAB);
600
+ }
601
+ return tItems;
602
+ };
603
+ Tab.prototype.removeActiveClass = function () {
604
+ var tabHeader = this.getTabHeader();
605
+ if (tabHeader) {
606
+ var tabItems = selectAll('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE, tabHeader);
607
+ [].slice.call(tabItems).forEach(function (node) { return node.classList.remove(CLS_ACTIVE); });
608
+ [].slice.call(tabItems).forEach(function (node) { return node.firstElementChild.setAttribute('aria-selected', 'false'); });
609
+ }
610
+ };
611
+ Tab.prototype.checkPopupOverflow = function (ele) {
612
+ this.tbPop = select('.' + CLS_TB_POP, this.element);
613
+ var popIcon = select('.e-hor-nav', this.element);
614
+ var tbrItems = select('.' + CLS_TB_ITEMS, this.element);
615
+ var lastChild = tbrItems.lastChild;
616
+ var isOverflow = false;
617
+ if (!this.isVertical() && ((this.enableRtl && ((popIcon.offsetLeft + popIcon.offsetWidth) > tbrItems.offsetLeft))
618
+ || (!this.enableRtl && popIcon.offsetLeft < tbrItems.offsetWidth))) {
619
+ isOverflow = true;
620
+ }
621
+ else if (this.isVertical() && (popIcon.offsetTop < lastChild.offsetTop + lastChild.offsetHeight)) {
622
+ isOverflow = true;
623
+ }
624
+ if (isOverflow) {
625
+ ele.classList.add(CLS_TB_POPUP);
626
+ this.tbPop.insertBefore(ele, selectAll('.' + CLS_TB_POPUP, this.tbPop)[0]);
627
+ }
628
+ return true;
629
+ };
630
+ Tab.prototype.popupHandler = function (target) {
631
+ var ripEle = target.querySelector('.e-ripple-element');
632
+ if (!isNOU(ripEle)) {
633
+ ripEle.outerHTML = '';
634
+ target.querySelector('.' + CLS_WRAP).classList.remove('e-ripple');
635
+ }
636
+ this.tbItem = selectAll('.' + CLS_TB_ITEMS + ' .' + CLS_TB_ITEM, this.hdrEle);
637
+ var lastChild = this.tbItem[this.tbItem.length - 1];
638
+ if (this.tbItem.length !== 0) {
639
+ target.classList.remove(CLS_TB_POPUP);
640
+ target.removeAttribute('style');
641
+ this.tbItems.appendChild(target);
642
+ this.actEleId = target.id;
643
+ if (this.checkPopupOverflow(lastChild)) {
644
+ var prevEle = this.tbItems.lastChild.previousElementSibling;
645
+ this.checkPopupOverflow(prevEle);
646
+ }
647
+ this.isPopup = true;
648
+ }
649
+ return selectAll('.' + CLS_TB_ITEM, this.tbItems).length - 1;
650
+ };
651
+ Tab.prototype.setCloseButton = function (val) {
652
+ var trg = select('.' + CLS_HEADER, this.element);
653
+ if (val === true) {
654
+ trg.classList.add(CLS_CLOSE_SHOW);
655
+ }
656
+ else {
657
+ trg.classList.remove(CLS_CLOSE_SHOW);
658
+ }
659
+ this.refreshOverflow();
660
+ this.refreshActiveTabBorder();
661
+ };
662
+ Tab.prototype.prevCtnAnimation = function (prev, current) {
663
+ var animation;
664
+ var checkRTL = this.enableRtl || this.element.classList.contains(CLS_RTL);
665
+ if (this.isPopup || prev <= current) {
666
+ if (this.animation.previous.effect === 'SlideLeftIn') {
667
+ animation = {
668
+ name: 'SlideLeftOut',
669
+ duration: this.animation.previous.duration, timingFunction: this.animation.previous.easing
670
+ };
671
+ }
672
+ else {
673
+ animation = null;
674
+ }
675
+ }
676
+ else {
677
+ if (this.animation.next.effect === 'SlideRightIn') {
678
+ animation = {
679
+ name: 'SlideRightOut',
680
+ duration: this.animation.next.duration, timingFunction: this.animation.next.easing
681
+ };
682
+ }
683
+ else {
684
+ animation = null;
685
+ }
686
+ }
687
+ return animation;
688
+ };
689
+ Tab.prototype.triggerPrevAnimation = function (oldCnt, prevIndex) {
690
+ var _this = this;
691
+ var animateObj = this.prevCtnAnimation(prevIndex, this.selectedItem);
692
+ if (!isNOU(animateObj)) {
693
+ animateObj.begin = function () {
694
+ setStyle(oldCnt, { 'position': 'absolute' });
695
+ oldCnt.classList.add(CLS_PROGRESS);
696
+ oldCnt.classList.add('e-view');
697
+ };
698
+ animateObj.end = function () {
699
+ oldCnt.style.display = 'none';
700
+ oldCnt.classList.remove(CLS_ACTIVE);
701
+ oldCnt.classList.remove(CLS_PROGRESS);
702
+ oldCnt.classList.remove('e-view');
703
+ setStyle(oldCnt, { 'display': '', 'position': '' });
704
+ if (oldCnt.childNodes.length === 0 && !_this.isTemplate) {
705
+ detach(oldCnt);
706
+ }
707
+ };
708
+ new Animation(animateObj).animate(oldCnt);
709
+ }
710
+ else {
711
+ oldCnt.classList.remove(CLS_ACTIVE);
712
+ }
713
+ };
714
+ Tab.prototype.triggerAnimation = function (id, value) {
715
+ var _this = this;
716
+ var prevIndex = this.prevIndex;
717
+ var oldCnt;
718
+ var itemCollection = [].slice.call(this.element.querySelector('.' + CLS_CONTENT).children);
719
+ itemCollection.forEach(function (item) {
720
+ if (item.id === _this.prevActiveEle) {
721
+ oldCnt = item;
722
+ }
723
+ });
724
+ var prevEle = this.tbItem[prevIndex];
725
+ var newCnt = this.getTrgContent(this.cntEle, this.extIndex(id));
726
+ if (isNOU(oldCnt) && !isNOU(prevEle)) {
727
+ var idNo = this.extIndex(prevEle.id);
728
+ oldCnt = this.getTrgContent(this.cntEle, idNo);
729
+ }
730
+ if (!isNOU(newCnt)) {
731
+ this.prevActiveEle = newCnt.id;
732
+ }
733
+ var isPrevent = isNOU(this.animation) || isNOU(this.animation.next.effect) || isNOU(this.animation.previous.effect)
734
+ || this.animation.previous.effect === 'None' || this.animation.next.effect === 'None';
735
+ if (this.initRender || value === false || isPrevent) {
736
+ if (oldCnt && oldCnt !== newCnt) {
737
+ oldCnt.classList.remove(CLS_ACTIVE);
738
+ }
739
+ return;
740
+ }
741
+ var cnt = select('.' + CLS_CONTENT, this.element);
742
+ var animateObj;
743
+ if (this.prevIndex > this.selectedItem && !this.isPopup) {
744
+ var openEff = this.animation.previous.effect;
745
+ animateObj = {
746
+ name: ((openEff === 'None') ? '' : ((openEff !== 'SlideLeftIn') ? openEff : 'SlideLeftIn')),
747
+ duration: (this.animation.previous.duration === 0 && animationMode === 'Enable') ? 600 : this.animation.previous.duration,
748
+ timingFunction: this.animation.previous.easing
749
+ };
750
+ }
751
+ else if (this.isPopup || this.prevIndex < this.selectedItem || this.prevIndex === this.selectedItem) {
752
+ var clsEff = this.animation.next.effect;
753
+ animateObj = {
754
+ name: ((clsEff === 'None') ? '' : ((clsEff !== 'SlideRightIn') ? clsEff : 'SlideRightIn')),
755
+ duration: (this.animation.next.duration === 0 && animationMode === 'Enable') ? 600 : this.animation.next.duration,
756
+ timingFunction: this.animation.next.easing
757
+ };
758
+ }
759
+ animateObj.progress = function () {
760
+ cnt.classList.add(CLS_PROGRESS);
761
+ _this.setActiveBorder();
762
+ };
763
+ animateObj.end = function () {
764
+ cnt.classList.remove(CLS_PROGRESS);
765
+ newCnt.classList.add(CLS_ACTIVE);
766
+ };
767
+ if (!this.initRender && !isNOU(oldCnt)) {
768
+ this.triggerPrevAnimation(oldCnt, prevIndex);
769
+ }
770
+ this.isPopup = false;
771
+ if (animateObj.name === '') {
772
+ newCnt.classList.add(CLS_ACTIVE);
773
+ }
774
+ else {
775
+ new Animation(animateObj).animate(newCnt);
776
+ }
777
+ };
778
+ Tab.prototype.keyPressed = function (trg) {
779
+ var trgParent = closest(trg, '.' + CLS_HEADER + ' .' + CLS_TB_ITEM);
780
+ var trgIndex = this.getEleIndex(trgParent);
781
+ if (!isNOU(this.popEle) && trg.classList.contains('e-hor-nav')) {
782
+ (this.popEle.classList.contains(CLS_POPUP_OPEN)) ? this.popObj.hide(this.hide) : this.popObj.show(this.show);
783
+ }
784
+ else if (trg.classList.contains('e-scroll-nav')) {
785
+ trg.click();
786
+ }
787
+ else {
788
+ if (!isNOU(trgParent) && trgParent.classList.contains(CLS_ACTIVE) === false) {
789
+ this.selectTab(trgIndex, null, true);
790
+ if (!isNOU(this.popEle)) {
791
+ this.popObj.hide(this.hide);
792
+ }
793
+ }
794
+ }
795
+ };
796
+ Tab.prototype.getTabHeader = function () {
797
+ if (isNOU(this.element)) {
798
+ return undefined;
799
+ }
800
+ var headers = [].slice.call(this.element.children).filter(function (e) { return e.classList.contains(CLS_HEADER); });
801
+ if (headers.length > 0) {
802
+ return headers[0];
803
+ }
804
+ else {
805
+ var wrap = [].slice.call(this.element.children).filter(function (e) { return !e.classList.contains(CLS_BLA_TEM); })[0];
806
+ if (!wrap) {
807
+ return undefined;
808
+ }
809
+ return [].slice.call(wrap.children).filter(function (e) { return e.classList.contains(CLS_HEADER); })[0];
810
+ }
811
+ };
812
+ Tab.prototype.getEleIndex = function (item) {
813
+ return Array.prototype.indexOf.call(selectAll('.' + CLS_TB_ITEM, this.getTabHeader()), item);
814
+ };
815
+ Tab.prototype.extIndex = function (id) {
816
+ return id.replace(CLS_ITEM + this.tabId + '_', '');
817
+ };
818
+ Tab.prototype.getMaxIndicesFromItems = function (tbItems) {
819
+ var _this = this;
820
+ var idList = [];
821
+ tbItems.forEach(function (item) {
822
+ idList.push(_this.getIndexFromEle(item.id));
823
+ });
824
+ return Math.max.apply(Math, idList);
825
+ };
826
+ Tab.prototype.expTemplateContent = function () {
827
+ var _this = this;
828
+ this.templateEle.forEach(function (eleStr) {
829
+ if (!isNOU(_this.element.querySelector(eleStr))) {
830
+ document.body.appendChild(_this.element.querySelector(eleStr)).style.display = 'none';
831
+ }
832
+ });
833
+ };
834
+ Tab.prototype.templateCompile = function (ele, cnt, index) {
835
+ var tempEle = this.createElement('div');
836
+ this.compileElement(tempEle, cnt, 'content', index);
837
+ if (tempEle.childNodes.length !== 0) {
838
+ ele.appendChild(tempEle);
839
+ }
840
+ if (this.isReact) {
841
+ this.renderReactTemplates();
842
+ }
843
+ };
844
+ Tab.prototype.compileElement = function (ele, val, prop, index) {
845
+ var templateFn;
846
+ if (typeof val === 'string') {
847
+ val = val.trim();
848
+ if (this.isVue) {
849
+ templateFn = compile(this.enableHtmlSanitizer ? SanitizeHtmlHelper.sanitize(val) : val);
850
+ }
851
+ else {
852
+ ele.innerHTML = this.enableHtmlSanitizer ? SanitizeHtmlHelper.sanitize(val) : val;
853
+ }
854
+ }
855
+ else {
856
+ templateFn = compile(val);
857
+ }
858
+ var templateFUN;
859
+ if (!isNOU(templateFn)) {
860
+ templateFUN = templateFn({}, this, prop);
861
+ }
862
+ if (!isNOU(templateFn) && templateFUN.length > 0) {
863
+ [].slice.call(templateFUN).forEach(function (el) {
864
+ ele.appendChild(el);
865
+ });
866
+ }
867
+ };
868
+ Tab.prototype.headerTextCompile = function (element, text, index) {
869
+ this.compileElement(element, text, 'headerTemplate', index);
870
+ };
871
+ Tab.prototype.getContent = function (ele, cnt, callType, index) {
872
+ var eleStr;
873
+ cnt = isNOU(cnt) ? '' : cnt;
874
+ if (typeof cnt === 'string' || isNOU(cnt.innerHTML)) {
875
+ if (typeof cnt === 'string' && this.enableHtmlSanitizer) {
876
+ cnt = SanitizeHtmlHelper.sanitize(cnt);
877
+ }
878
+ if (cnt[0] === '.' || cnt[0] === '#') {
879
+ if (document.querySelectorAll(cnt).length) {
880
+ var eleVal = document.querySelector(cnt);
881
+ eleStr = eleVal.outerHTML.trim();
882
+ if (callType === 'clone') {
883
+ ele.appendChild(eleVal.cloneNode(true));
884
+ }
885
+ else {
886
+ ele.appendChild(eleVal);
887
+ eleVal.style.display = '';
888
+ }
889
+ }
890
+ else {
891
+ this.templateCompile(ele, cnt, index);
892
+ }
893
+ }
894
+ else {
895
+ this.templateCompile(ele, cnt, index);
896
+ }
897
+ }
898
+ else {
899
+ ele.appendChild(cnt);
900
+ }
901
+ if (!isNOU(eleStr)) {
902
+ if (this.templateEle.indexOf(cnt.toString()) === -1) {
903
+ this.templateEle.push(cnt.toString());
904
+ }
905
+ }
906
+ };
907
+ Tab.prototype.getTrgContent = function (cntEle, no) {
908
+ var ele;
909
+ if (this.element.classList.contains(CLS_NEST)) {
910
+ ele = select('.' + CLS_NEST + '> .' + CLS_CONTENT + ' > #' + CLS_CONTENT + this.tabId + '_' + no, this.element);
911
+ }
912
+ else {
913
+ ele = this.findEle(cntEle.children, CLS_CONTENT + this.tabId + '_' + no);
914
+ }
915
+ return ele;
916
+ };
917
+ Tab.prototype.findEle = function (items, key) {
918
+ var ele;
919
+ for (var i = 0; i < items.length; i++) {
920
+ if (items[i].id === key) {
921
+ ele = items[i];
922
+ break;
923
+ }
924
+ }
925
+ return ele;
926
+ };
927
+ Tab.prototype.isVertical = function () {
928
+ var isVertical = (this.headerPlacement === 'Left' || this.headerPlacement === 'Right') ? true : false;
929
+ this.scrCntClass = (isVertical) ? CLS_VSCRCNT : CLS_HSCRCNT;
930
+ return isVertical;
931
+ };
932
+ Tab.prototype.addVerticalClass = function () {
933
+ if (this.isVertical()) {
934
+ var tbPos = (this.headerPlacement === 'Left') ? CLS_VLEFT : CLS_VRIGHT;
935
+ addClass([this.hdrEle], [CLS_VERTICAL, tbPos]);
936
+ if (!this.element.classList.contains(CLS_NEST)) {
937
+ addClass([this.element], [CLS_VTAB, tbPos]);
938
+ }
939
+ else {
940
+ addClass([this.hdrEle], [CLS_VTAB, tbPos]);
941
+ }
942
+ }
943
+ if (this.headerPlacement === 'Bottom') {
944
+ addClass([this.hdrEle], [CLS_HBOTTOM]);
945
+ }
946
+ };
947
+ Tab.prototype.updatePopAnimationConfig = function () {
948
+ this.show = { name: (this.isVertical() ? 'FadeIn' : 'SlideDown'), duration: 100 };
949
+ this.hide = { name: (this.isVertical() ? 'FadeOut' : 'SlideUp'), duration: 100 };
950
+ };
951
+ Tab.prototype.changeOrientation = function (place) {
952
+ this.setOrientation(place, this.hdrEle);
953
+ var activeTab = this.hdrEle.querySelector('.' + CLS_ACTIVE);
954
+ var isVertical = this.hdrEle.classList.contains(CLS_VERTICAL) ? true : false;
955
+ removeClass([this.element], [CLS_VTAB]);
956
+ removeClass([this.hdrEle], [CLS_VERTICAL, CLS_VLEFT, CLS_VRIGHT]);
957
+ if (isVertical !== this.isVertical()) {
958
+ this.changeToolbarOrientation();
959
+ if (!isNOU(activeTab) && activeTab.classList.contains(CLS_TB_POPUP)) {
960
+ this.popupHandler(activeTab);
961
+ }
962
+ }
963
+ this.addVerticalClass();
964
+ this.setActiveBorder();
965
+ this.focusItem();
966
+ };
967
+ Tab.prototype.focusItem = function () {
968
+ var curActItem = select(' #' + CLS_ITEM + this.tabId + '_' + this.selectedItem, this.hdrEle);
969
+ if (!isNOU(curActItem)) {
970
+ curActItem.firstElementChild.focus();
971
+ }
972
+ };
973
+ Tab.prototype.changeToolbarOrientation = function () {
974
+ this.tbObj.setProperties({ height: (this.isVertical() ? '100%' : 'auto'), width: (this.isVertical() ? 'auto' : '100%') }, true);
975
+ this.tbObj.changeOrientation();
976
+ this.updatePopAnimationConfig();
977
+ };
978
+ Tab.prototype.setOrientation = function (place, ele) {
979
+ var headerPos = Array.prototype.indexOf.call(this.element.children, ele);
980
+ var contentPos = Array.prototype.indexOf.call(this.element.children, this.element.querySelector('.' + CLS_CONTENT));
981
+ if (place === 'Bottom' && (contentPos > headerPos)) {
982
+ this.element.appendChild(ele);
983
+ }
984
+ else {
985
+ removeClass([ele], [CLS_HBOTTOM]);
986
+ this.element.insertBefore(ele, select('.' + CLS_CONTENT, this.element));
987
+ }
988
+ };
989
+ Tab.prototype.setCssClass = function (ele, cls, val) {
990
+ if (cls === '' || isNOU(cls)) {
991
+ return;
992
+ }
993
+ var list = cls.split(' ');
994
+ for (var i = 0; i < list.length; i++) {
995
+ if (val) {
996
+ ele.classList.add(list[i]);
997
+ }
998
+ else {
999
+ ele.classList.remove(list[i]);
1000
+ }
1001
+ }
1002
+ };
1003
+ Tab.prototype.loadContentInitMode = function (ele) {
1004
+ if (!ele) {
1005
+ return;
1006
+ }
1007
+ if (this.loadOn === 'Init') {
1008
+ for (var i = 0; i < this.items.length; i++) {
1009
+ if (this.cntEle.children.item(i)) {
1010
+ this.getContent(this.cntEle.children.item(i), this.items[i].content, 'render', i);
1011
+ }
1012
+ }
1013
+ }
1014
+ if (this.prevIndex !== this.selectedItem) {
1015
+ ele.classList.remove(CLS_ACTIVE);
1016
+ }
1017
+ };
1018
+ Tab.prototype.loadContentElement = function () {
1019
+ if (!this.isTemplate) {
1020
+ var ele = this.cntEle.children.item(0);
1021
+ this.loadContentInitMode(ele);
1022
+ }
1023
+ };
1024
+ Tab.prototype.setContentHeight = function (val) {
1025
+ if (this.element.classList.contains(CLS_FILL)) {
1026
+ removeClass([this.element], [CLS_FILL]);
1027
+ }
1028
+ if (isNOU(this.cntEle)) {
1029
+ return;
1030
+ }
1031
+ var hdrEle = this.getTabHeader();
1032
+ if (this.heightAdjustMode === 'None') {
1033
+ this.loadContentElement();
1034
+ if (this.height === 'auto') {
1035
+ return;
1036
+ }
1037
+ else {
1038
+ if (!this.isVertical()) {
1039
+ setStyle(this.cntEle, { 'height': (this.element.clientHeight - hdrEle.offsetHeight) + 'px' });
1040
+ }
1041
+ }
1042
+ }
1043
+ else if (this.heightAdjustMode === 'Fill') {
1044
+ addClass([this.element], [CLS_FILL]);
1045
+ setStyle(this.element, { 'height': '100%' });
1046
+ this.loadContentElement();
1047
+ this.cntEle.style.height = 'calc(100% - ' + this.hdrEle.offsetHeight + 'px)';
1048
+ }
1049
+ else if (this.heightAdjustMode === 'Auto') {
1050
+ if (this.isTemplate === true) {
1051
+ var cnt = selectAll('.' + CLS_CONTENT + ' > .' + CLS_ITEM, this.element);
1052
+ for (var i = 0; i < cnt.length; i++) {
1053
+ cnt[i].setAttribute('style', 'display:block; visibility: visible');
1054
+ this.maxHeight = Math.max(this.maxHeight, this.getHeight(cnt[i]));
1055
+ cnt[i].style.removeProperty('display');
1056
+ cnt[i].style.removeProperty('visibility');
1057
+ }
1058
+ }
1059
+ else {
1060
+ this.cntEle = select('.' + CLS_CONTENT, this.element);
1061
+ if (val === true && this.loadOn === 'Demand') {
1062
+ this.cntEle.appendChild(this.createContentElement(Number(this.extIndex(this.itemIndexArray[0]))));
1063
+ }
1064
+ var ele = this.cntEle.children.item(0);
1065
+ for (var i = 0; i < this.items.length; i++) {
1066
+ this.getContent(ele, this.items[i].content, 'clone', i);
1067
+ this.maxHeight = Math.max(this.maxHeight, this.getHeight(ele));
1068
+ while (ele.firstChild) {
1069
+ ele.removeChild(ele.firstChild);
1070
+ }
1071
+ }
1072
+ if (this.isReact || this.isAngular || this.isVue) {
1073
+ this.clearTemplate(['content']);
1074
+ }
1075
+ this.templateEle = [];
1076
+ if (this.loadOn === 'Demand') {
1077
+ this.getContent(ele, this.items[0].content, 'render', 0);
1078
+ }
1079
+ this.loadContentInitMode(ele);
1080
+ }
1081
+ setStyle(this.cntEle, { 'height': this.maxHeight + 'px' });
1082
+ }
1083
+ else {
1084
+ this.loadContentElement();
1085
+ setStyle(this.cntEle, { 'height': 'auto' });
1086
+ }
1087
+ };
1088
+ Tab.prototype.getHeight = function (ele) {
1089
+ var cs = window.getComputedStyle(ele);
1090
+ return ele.offsetHeight + parseFloat(cs.getPropertyValue('padding-top')) + parseFloat(cs.getPropertyValue('padding-bottom')) +
1091
+ parseFloat(cs.getPropertyValue('margin-top')) + parseFloat(cs.getPropertyValue('margin-bottom'));
1092
+ };
1093
+ Tab.prototype.setActiveBorder = function () {
1094
+ var trgHdrEle = this.getTabHeader();
1095
+ var trg = select('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE, trgHdrEle);
1096
+ if (isNOU(trg)) {
1097
+ return;
1098
+ }
1099
+ if (!this.reorderActiveTab) {
1100
+ if (trg.classList.contains(CLS_TB_POPUP) && !this.bdrLine.classList.contains(CLS_HIDDEN)) {
1101
+ this.bdrLine.classList.add(CLS_HIDDEN);
1102
+ }
1103
+ if (trgHdrEle && !trgHdrEle.classList.contains(CLS_REORDER_ACTIVE_ITEM)) {
1104
+ trgHdrEle.classList.add(CLS_REORDER_ACTIVE_ITEM);
1105
+ }
1106
+ }
1107
+ else if (trgHdrEle) {
1108
+ trgHdrEle.classList.remove(CLS_REORDER_ACTIVE_ITEM);
1109
+ }
1110
+ var root = closest(trg, '.' + CLS_TAB);
1111
+ if (this.element !== root) {
1112
+ return;
1113
+ }
1114
+ this.tbItems = select('.' + CLS_TB_ITEMS, trgHdrEle);
1115
+ var bar = select('.' + CLS_INDICATOR, trgHdrEle);
1116
+ var scrollCnt = select('.' + CLS_TB_ITEMS + ' .' + this.scrCntClass, trgHdrEle);
1117
+ if (this.isVertical()) {
1118
+ setStyle(bar, { 'left': '', 'right': '' });
1119
+ var tbHeight = (isNOU(scrollCnt)) ? this.tbItems.offsetHeight : scrollCnt.offsetHeight;
1120
+ if (tbHeight !== 0) {
1121
+ setStyle(bar, { 'top': trg.offsetTop + 'px', 'height': trg.offsetHeight + 'px' });
1122
+ }
1123
+ else {
1124
+ setStyle(bar, { 'top': 0, 'height': 0 });
1125
+ }
1126
+ }
1127
+ else {
1128
+ if (this.overflowMode === 'MultiRow') {
1129
+ var top_1 = this.headerPlacement === 'Bottom' ? trg.offsetTop : trg.offsetHeight + trg.offsetTop;
1130
+ setStyle(bar, { 'top': top_1 + 'px', 'height': '' });
1131
+ }
1132
+ else {
1133
+ setStyle(bar, { 'top': '', 'height': '' });
1134
+ }
1135
+ var tbWidth = (isNOU(scrollCnt)) ? this.tbItems.offsetWidth : scrollCnt.offsetWidth;
1136
+ if (tbWidth !== 0) {
1137
+ setStyle(bar, { 'left': trg.offsetLeft + 'px', 'right': tbWidth - (trg.offsetLeft + trg.offsetWidth) + 'px' });
1138
+ }
1139
+ else {
1140
+ setStyle(bar, { 'left': 'auto', 'right': 'auto' });
1141
+ }
1142
+ }
1143
+ if (!isNOU(this.bdrLine) && !trg.classList.contains(CLS_TB_POPUP)) {
1144
+ this.bdrLine.classList.remove(CLS_HIDDEN);
1145
+ }
1146
+ };
1147
+ Tab.prototype.setActive = function (value, skipDataBind, isInteracted) {
1148
+ if (skipDataBind === void 0) { skipDataBind = false; }
1149
+ if (isInteracted === void 0) { isInteracted = false; }
1150
+ this.tbItem = selectAll('.' + CLS_TB_ITEM, this.getTabHeader());
1151
+ var trg = this.tbItem[value];
1152
+ if (value < 0 || isNaN(value) || this.tbItem.length === 0 || !isNOU(trg) && trg.classList.contains(CLS_DISABLE)) {
1153
+ return;
1154
+ }
1155
+ if (value >= 0 && !skipDataBind) {
1156
+ this.allowServerDataBinding = false;
1157
+ this.setProperties({ selectedItem: value }, true);
1158
+ this.allowServerDataBinding = true;
1159
+ if (!this.initRender) {
1160
+ this.serverDataBind();
1161
+ }
1162
+ }
1163
+ if (trg.classList.contains(CLS_ACTIVE)) {
1164
+ this.setActiveBorder();
1165
+ return;
1166
+ }
1167
+ if (!this.isTemplate) {
1168
+ attributes(trg.firstElementChild, { 'aria-controls': CLS_CONTENT + this.tabId + '_' + this.extIndex(trg.id) });
1169
+ }
1170
+ var id = trg.id;
1171
+ this.removeActiveClass();
1172
+ trg.classList.add(CLS_ACTIVE);
1173
+ trg.firstElementChild.setAttribute('aria-selected', 'true');
1174
+ var no = Number(this.extIndex(id));
1175
+ if (isNOU(this.prevActiveEle)) {
1176
+ this.prevActiveEle = CLS_CONTENT + this.tabId + '_' + no;
1177
+ }
1178
+ if (this.isTemplate) {
1179
+ if (select('.' + CLS_CONTENT, this.element).children.length > 0) {
1180
+ var trg_1 = this.findEle(select('.' + CLS_CONTENT, this.element).children, CLS_CONTENT + this.tabId + '_' + no);
1181
+ if (!isNOU(trg_1)) {
1182
+ trg_1.classList.add(CLS_ACTIVE);
1183
+ }
1184
+ this.triggerAnimation(id, this.enableAnimation);
1185
+ }
1186
+ }
1187
+ else {
1188
+ this.cntEle = select('.' + CLS_TAB + ' > .' + CLS_CONTENT, this.element);
1189
+ while (this.loadOn === 'Dynamic' && this.cntEle.firstElementChild) {
1190
+ this.cntEle.removeChild(this.cntEle.firstElementChild);
1191
+ }
1192
+ var item = this.getTrgContent(this.cntEle, this.extIndex(id));
1193
+ if (isNOU(item)) {
1194
+ this.cntEle.appendChild(this.createElement('div', {
1195
+ id: CLS_CONTENT + this.tabId + '_' + this.extIndex(id), className: CLS_ITEM + ' ' + CLS_ACTIVE,
1196
+ attrs: { role: 'tabpanel', 'aria-labelledby': CLS_ITEM + this.tabId + '_' + this.extIndex(id) }
1197
+ }));
1198
+ var eleTrg = this.getTrgContent(this.cntEle, this.extIndex(id));
1199
+ var itemIndex = Array.prototype.indexOf.call(this.itemIndexArray, id);
1200
+ this.getContent(eleTrg, this.items[itemIndex].content, 'render', itemIndex);
1201
+ }
1202
+ else {
1203
+ item.classList.add(CLS_ACTIVE);
1204
+ }
1205
+ this.triggerAnimation(id, this.enableAnimation);
1206
+ }
1207
+ this.setActiveBorder();
1208
+ this.refreshItemVisibility(trg);
1209
+ if (!this.initRender && !skipDataBind) {
1210
+ var eventArg = {
1211
+ previousItem: this.prevItem,
1212
+ previousIndex: this.prevIndex,
1213
+ selectedItem: trg,
1214
+ selectedIndex: value,
1215
+ selectedContent: select('#' + CLS_CONTENT + this.tabId + '_' + this.selectingID, this.content),
1216
+ isSwiped: this.isSwiped,
1217
+ isInteracted: isInteracted,
1218
+ preventFocus: false
1219
+ };
1220
+ this.trigger('selected', eventArg, function (selectEventArgs) {
1221
+ if (!selectEventArgs.preventFocus) {
1222
+ trg.firstElementChild.focus();
1223
+ }
1224
+ });
1225
+ }
1226
+ };
1227
+ Tab.prototype.setItems = function (items) {
1228
+ this.isReplace = true;
1229
+ this.tbItems = select('.' + CLS_TB_ITEMS, this.getTabHeader());
1230
+ this.tbObj.items = this.parseObject(items, 0);
1231
+ this.tbObj.dataBind();
1232
+ this.isReplace = false;
1233
+ };
1234
+ Tab.prototype.setRTL = function (value) {
1235
+ this.tbObj.enableRtl = value;
1236
+ this.tbObj.dataBind();
1237
+ this.setCssClass(this.element, CLS_RTL, value);
1238
+ this.refreshActiveBorder();
1239
+ };
1240
+ Tab.prototype.refreshActiveBorder = function () {
1241
+ if (!isNOU(this.bdrLine)) {
1242
+ this.bdrLine.classList.add(CLS_HIDDEN);
1243
+ }
1244
+ this.setActiveBorder();
1245
+ };
1246
+ Tab.prototype.showPopup = function (config) {
1247
+ var tbPop = select('.e-popup.e-toolbar-pop', this.hdrEle);
1248
+ if (tbPop && tbPop.classList.contains('e-popup-close')) {
1249
+ var tbPopObj = (tbPop && tbPop.ej2_instances[0]);
1250
+ tbPopObj.position.X = (this.headerPlacement === 'Left' || this.element.classList.contains(CLS_RTL)) ? 'left' : 'right';
1251
+ tbPopObj.dataBind();
1252
+ tbPopObj.show(config);
1253
+ }
1254
+ };
1255
+ Tab.prototype.bindDraggable = function () {
1256
+ var _this = this;
1257
+ if (this.allowDragAndDrop) {
1258
+ var tabHeader = this.element.querySelector('.' + CLS_HEADER);
1259
+ if (tabHeader) {
1260
+ var items = Array.prototype.slice.call(tabHeader.querySelectorAll('.' + CLS_TB_ITEM));
1261
+ items.forEach(function (element) {
1262
+ _this.initializeDrag(element);
1263
+ });
1264
+ }
1265
+ }
1266
+ };
1267
+ Tab.prototype.bindSwipeEvents = function () {
1268
+ if (this.swipeMode !== 'None') {
1269
+ this.touchModule = new Touch(this.cntEle, { swipe: this.swipeHandler.bind(this) });
1270
+ }
1271
+ };
1272
+ Tab.prototype.wireEvents = function () {
1273
+ this.bindDraggable();
1274
+ window.addEventListener('resize', this.resizeContext);
1275
+ EventHandler.add(this.element, 'mouseover', this.hoverHandler, this);
1276
+ EventHandler.add(this.element, 'keydown', this.spaceKeyDown, this);
1277
+ if (!isNOU(this.cntEle)) {
1278
+ this.bindSwipeEvents();
1279
+ }
1280
+ this.keyModule = new KeyboardEvents(this.element, { keyAction: this.keyHandler.bind(this), keyConfigs: this.keyConfigs });
1281
+ this.tabKeyModule = new KeyboardEvents(this.element, {
1282
+ keyAction: this.keyHandler.bind(this),
1283
+ keyConfigs: { openPopup: 'shift+f10', tab: 'tab', shiftTab: 'shift+tab' },
1284
+ eventName: 'keydown'
1285
+ });
1286
+ };
1287
+ Tab.prototype.unWireEvents = function () {
1288
+ if (!isNOU(this.keyModule)) {
1289
+ this.keyModule.destroy();
1290
+ }
1291
+ if (!isNOU(this.tabKeyModule)) {
1292
+ this.tabKeyModule.destroy();
1293
+ }
1294
+ if (!isNOU(this.cntEle) && !isNOU(this.touchModule)) {
1295
+ this.touchModule.destroy();
1296
+ this.touchModule = null;
1297
+ }
1298
+ window.removeEventListener('resize', this.resizeContext);
1299
+ EventHandler.remove(this.element, 'mouseover', this.hoverHandler);
1300
+ EventHandler.remove(this.element, 'keydown', this.spaceKeyDown);
1301
+ this.element.classList.remove(CLS_RTL);
1302
+ this.element.classList.remove(CLS_FOCUS);
1303
+ };
1304
+ Tab.prototype.clickHandler = function (args) {
1305
+ this.element.classList.remove(CLS_FOCUS);
1306
+ var trg = args.originalEvent.target;
1307
+ var trgParent = closest(trg, '.' + CLS_TB_ITEM);
1308
+ var trgIndex = this.getEleIndex(trgParent);
1309
+ if (trg.classList.contains(CLS_ICON_CLOSE)) {
1310
+ this.removeTab(trgIndex);
1311
+ }
1312
+ else if (this.isVertical() && closest(trg, '.' + CLS_HOR_NAV)) {
1313
+ this.showPopup(this.show);
1314
+ }
1315
+ else {
1316
+ this.isPopup = false;
1317
+ if (!isNOU(trgParent) && (trgIndex !== this.selectedItem)) {
1318
+ this.selectTab(trgIndex, args.originalEvent, true);
1319
+ }
1320
+ }
1321
+ };
1322
+ Tab.prototype.swipeHandler = function (e) {
1323
+ if ((e.velocity < 3 && isNullOrUndefined(e.originalEvent.changedTouches)) ||
1324
+ (this.swipeMode === 'Touch' && ((e.originalEvent.type === 'mouseup') || e.originalEvent.type === 'mouseleave')) ||
1325
+ (this.swipeMode === 'Mouse' && e.originalEvent.type === 'touchend') || (this.swipeMode === 'None')) {
1326
+ return;
1327
+ }
1328
+ if (this.isNested) {
1329
+ this.element.setAttribute('data-swipe', 'true');
1330
+ }
1331
+ var nestedTab = this.element.querySelector('[data-swipe="true"]');
1332
+ if (nestedTab) {
1333
+ nestedTab.removeAttribute('data-swipe');
1334
+ return;
1335
+ }
1336
+ this.isSwiped = true;
1337
+ if (e.swipeDirection === 'Right' && this.selectedItem !== 0) {
1338
+ for (var k = this.selectedItem - 1; k >= 0; k--) {
1339
+ if (!this.tbItem[k].classList.contains(CLS_HIDDEN)) {
1340
+ this.selectTab(k, null, true);
1341
+ break;
1342
+ }
1343
+ }
1344
+ }
1345
+ else if (e.swipeDirection === 'Left' && (this.selectedItem !== selectAll('.' + CLS_TB_ITEM, this.element).length - 1)) {
1346
+ for (var i = this.selectedItem + 1; i < this.tbItem.length; i++) {
1347
+ if (!this.tbItem[i].classList.contains(CLS_HIDDEN)) {
1348
+ this.selectTab(i, null, true);
1349
+ break;
1350
+ }
1351
+ }
1352
+ }
1353
+ this.isSwiped = false;
1354
+ };
1355
+ Tab.prototype.spaceKeyDown = function (e) {
1356
+ if ((e.keyCode === 32 && e.which === 32) || (e.keyCode === 35 && e.which === 35)) {
1357
+ var clstHead = closest(e.target, '.' + CLS_HEADER);
1358
+ if (!isNOU(clstHead)) {
1359
+ e.preventDefault();
1360
+ }
1361
+ }
1362
+ };
1363
+ Tab.prototype.keyHandler = function (e) {
1364
+ if (this.element.classList.contains(CLS_DISABLE)) {
1365
+ return;
1366
+ }
1367
+ this.element.classList.add(CLS_FOCUS);
1368
+ var trg = e.target;
1369
+ var tabHeader = this.getTabHeader();
1370
+ var actEle = select('.' + CLS_ACTIVE, tabHeader);
1371
+ this.popEle = select('.' + CLS_TB_POP, tabHeader);
1372
+ if (!isNOU(this.popEle)) {
1373
+ this.popObj = this.popEle.ej2_instances[0];
1374
+ }
1375
+ var item = closest(document.activeElement, '.' + CLS_TB_ITEM);
1376
+ var trgParent = closest(trg, '.' + CLS_TB_ITEM);
1377
+ switch (e.action) {
1378
+ case 'space':
1379
+ case 'enter':
1380
+ if (trg.parentElement.classList.contains(CLS_DISABLE)) {
1381
+ return;
1382
+ }
1383
+ if (e.action === 'enter' && trg.classList.contains('e-hor-nav')) {
1384
+ this.showPopup(this.show);
1385
+ break;
1386
+ }
1387
+ this.keyPressed(trg);
1388
+ break;
1389
+ case 'tab':
1390
+ case 'shiftTab':
1391
+ if (trg.classList.contains(CLS_WRAP)
1392
+ && closest(trg, '.' + CLS_TB_ITEM).classList.contains(CLS_ACTIVE) === false) {
1393
+ trg.setAttribute('tabindex', trg.getAttribute('data-tabindex'));
1394
+ }
1395
+ if (this.popObj && isVisible(this.popObj.element)) {
1396
+ this.popObj.hide(this.hide);
1397
+ }
1398
+ if (!isNOU(actEle) && actEle.children.item(0).getAttribute('tabindex') === '-1') {
1399
+ actEle.children.item(0).setAttribute('tabindex', '0');
1400
+ }
1401
+ break;
1402
+ case 'moveLeft':
1403
+ case 'moveRight':
1404
+ if (!isNOU(item)) {
1405
+ this.refreshItemVisibility(item);
1406
+ }
1407
+ break;
1408
+ case 'openPopup':
1409
+ e.preventDefault();
1410
+ if (!isNOU(this.popEle) && this.popEle.classList.contains(CLS_POPUP_CLOSE)) {
1411
+ this.popObj.show(this.show);
1412
+ }
1413
+ break;
1414
+ case 'delete':
1415
+ if (this.showCloseButton === true && !isNOU(trgParent)) {
1416
+ var nxtSib = trgParent.nextSibling;
1417
+ if (!isNOU(nxtSib) && nxtSib.classList.contains(CLS_TB_ITEM)) {
1418
+ nxtSib.firstElementChild.focus();
1419
+ }
1420
+ this.removeTab(this.getEleIndex(trgParent));
1421
+ }
1422
+ this.setActiveBorder();
1423
+ break;
1424
+ }
1425
+ };
1426
+ Tab.prototype.refreshItemVisibility = function (target) {
1427
+ var scrCnt = select('.' + this.scrCntClass, this.tbItems);
1428
+ if (!this.isVertical() && !isNOU(scrCnt)) {
1429
+ var scrBar = select('.e-hscroll-bar', this.tbItems);
1430
+ var scrStart = scrBar.scrollLeft;
1431
+ var scrEnd = scrStart + scrBar.offsetWidth;
1432
+ var eleStart = target.offsetLeft;
1433
+ var eleWidth = target.offsetWidth;
1434
+ var eleEnd = target.offsetLeft + target.offsetWidth;
1435
+ if ((scrStart < eleStart) && (scrEnd < eleEnd)) {
1436
+ var eleViewRange = scrEnd - eleStart;
1437
+ scrBar.scrollLeft = scrStart + (eleWidth - eleViewRange);
1438
+ }
1439
+ else {
1440
+ if ((scrStart > eleStart) && (scrEnd > eleEnd)) {
1441
+ var eleViewRange = eleEnd - scrStart;
1442
+ scrBar.scrollLeft = scrStart - (eleWidth - eleViewRange);
1443
+ }
1444
+ }
1445
+ }
1446
+ else {
1447
+ return;
1448
+ }
1449
+ };
1450
+ Tab.prototype.getIndexFromEle = function (id) {
1451
+ return parseInt(id.substring(id.lastIndexOf('_') + 1), 10);
1452
+ };
1453
+ Tab.prototype.hoverHandler = function (e) {
1454
+ var trg = e.target;
1455
+ if (!isNOU(trg.classList) && trg.classList.contains(CLS_ICON_CLOSE)) {
1456
+ trg.setAttribute('title', new L10n('tab', { closeButtonTitle: this.title }, this.locale).getConstant('closeButtonTitle'));
1457
+ }
1458
+ };
1459
+ Tab.prototype.evalOnPropertyChangeItems = function (newProp, oldProp) {
1460
+ var _this = this;
1461
+ if (!(newProp.items instanceof Array && oldProp.items instanceof Array)) {
1462
+ var changedProp = Object.keys(newProp.items);
1463
+ for (var i = 0; i < changedProp.length; i++) {
1464
+ var index = parseInt(Object.keys(newProp.items)[i], 10);
1465
+ var properties = Object.keys(newProp.items[index]);
1466
+ for (var j = 0; j < properties.length; j++) {
1467
+ var oldVal = Object(oldProp.items[index])[properties[j]];
1468
+ var newVal = Object(newProp.items[index])[properties[j]];
1469
+ var hdr = this.element.querySelectorAll('.' + CLS_TB_ITEM)[index];
1470
+ var itemIndex = void 0;
1471
+ if (hdr && !isNOU(hdr.id) && hdr.id !== '') {
1472
+ itemIndex = this.getIndexFromEle(hdr.id);
1473
+ }
1474
+ else {
1475
+ itemIndex = index;
1476
+ }
1477
+ var hdrItem = select('.' + CLS_TB_ITEMS + ' #' + CLS_ITEM + this.tabId + '_' + itemIndex, this.element);
1478
+ var cntItem = select('.' + CLS_CONTENT + ' #' + CLS_CONTENT + this.tabId + '_' + itemIndex, this.element);
1479
+ if (properties[j] === 'header' || properties[j] === 'headerTemplate') {
1480
+ var icon = (isNOU(this.items[index].header) ||
1481
+ isNOU(this.items[index].header.iconCss)) ? '' : this.items[index].header.iconCss;
1482
+ var textVal = this.items[index].headerTemplate || this.items[index].header.text;
1483
+ if (properties[j] === 'headerTemplate') {
1484
+ this.clearTabTemplate(hdrItem, properties[j], CLS_TB_ITEM);
1485
+ }
1486
+ if ((textVal === '') && (icon === '')) {
1487
+ this.removeTab(index);
1488
+ }
1489
+ else {
1490
+ this.tbId = hdr.id;
1491
+ var arr = [];
1492
+ arr.push(this.items[index]);
1493
+ this.items.splice(index, 1);
1494
+ this.itemIndexArray.splice(index, 1);
1495
+ this.tbObj.items.splice(index, 1);
1496
+ var isHiddenEle = hdrItem.classList.contains(CLS_HIDDEN);
1497
+ detach(hdrItem);
1498
+ this.isReplace = true;
1499
+ this.addTab(arr, index);
1500
+ if (isHiddenEle) {
1501
+ this.hideTab(index);
1502
+ }
1503
+ this.isReplace = false;
1504
+ }
1505
+ }
1506
+ if (properties[j] === 'content' && !isNOU(cntItem)) {
1507
+ var strVal = typeof newVal === 'string' || isNOU(newVal.innerHTML);
1508
+ if (strVal && (newVal[0] === '.' || newVal[0] === '#') && newVal.length) {
1509
+ var eleVal = document.querySelector(newVal);
1510
+ cntItem.appendChild(eleVal);
1511
+ eleVal.style.display = '';
1512
+ }
1513
+ else if (newVal === '' && oldVal[0] === '#') {
1514
+ document.body.appendChild(this.element.querySelector(oldVal)).style.display = 'none';
1515
+ cntItem.innerHTML = newVal;
1516
+ }
1517
+ else if (this.isAngular || this.isReact) {
1518
+ this.clearTabTemplate(cntItem, properties[j], CLS_ITEM);
1519
+ cntItem.innerHTML = '';
1520
+ this.templateCompile(cntItem, newVal, index);
1521
+ }
1522
+ else if (typeof newVal !== 'function') {
1523
+ cntItem.innerHTML = newVal;
1524
+ }
1525
+ }
1526
+ if (properties[j] === 'cssClass') {
1527
+ if (!isNOU(hdrItem)) {
1528
+ hdrItem.classList.remove(oldVal);
1529
+ hdrItem.classList.add(newVal);
1530
+ }
1531
+ if (!isNOU(cntItem)) {
1532
+ cntItem.classList.remove(oldVal);
1533
+ cntItem.classList.add(newVal);
1534
+ }
1535
+ }
1536
+ if (properties[j] === 'disabled') {
1537
+ this.enableTab(index, ((newVal === true) ? false : true));
1538
+ }
1539
+ if (properties[j] === 'visible') {
1540
+ this.hideTab(index, ((newVal === true) ? false : true));
1541
+ }
1542
+ }
1543
+ }
1544
+ if (this.isReact && this.portals && this.portals.length > 0) {
1545
+ this.renderReactTemplates(function () {
1546
+ _this.refreshActiveTabBorder();
1547
+ });
1548
+ }
1549
+ }
1550
+ else {
1551
+ this.lastIndex = 0;
1552
+ if (isNOU(this.tbObj)) {
1553
+ this.reRenderItems();
1554
+ }
1555
+ else {
1556
+ if (this.isReact || this.isAngular) {
1557
+ this.clearTemplate();
1558
+ }
1559
+ this.setItems(newProp.items);
1560
+ if (this.templateEle.length > 0) {
1561
+ this.expTemplateContent();
1562
+ }
1563
+ this.templateEle = [];
1564
+ var selectElement = select('.' + CLS_TAB + ' > .' + CLS_CONTENT, this.element);
1565
+ while (selectElement.firstElementChild) {
1566
+ detach(selectElement.firstElementChild);
1567
+ }
1568
+ this.select(this.selectedItem);
1569
+ this.draggableItems = [];
1570
+ this.bindDraggable();
1571
+ }
1572
+ }
1573
+ };
1574
+ Tab.prototype.clearTabTemplate = function (templateEle, templateName, className) {
1575
+ if (!this.clearTemplates) {
1576
+ return;
1577
+ }
1578
+ if (this.registeredTemplate && this.registeredTemplate[templateName]) {
1579
+ var registeredTemplates = this.registeredTemplate;
1580
+ for (var index = 0; index < registeredTemplates[templateName].length; index++) {
1581
+ var registeredItem = registeredTemplates[templateName][index].rootNodes[0];
1582
+ var closestItem = closest(registeredItem, '.' + className);
1583
+ if (!isNullOrUndefined(closestItem) && closestItem === templateEle) {
1584
+ this.clearTemplate([templateName], [registeredTemplates[templateName][index]]);
1585
+ break;
1586
+ }
1587
+ }
1588
+ }
1589
+ else if (this.portals && this.portals.length > 0) {
1590
+ var portals = this.portals;
1591
+ for (var index = 0; index < portals.length; index++) {
1592
+ var portalItem = portals[index];
1593
+ var closestItem = closest(portalItem.containerInfo, '.' + className);
1594
+ if (!isNullOrUndefined(closestItem) && closestItem === templateEle) {
1595
+ this.clearTemplate([templateName], index);
1596
+ break;
1597
+ }
1598
+ }
1599
+ }
1600
+ };
1601
+ Tab.prototype.initializeDrag = function (target) {
1602
+ var _this = this;
1603
+ var dragObj = new Draggable(target, {
1604
+ dragArea: this.dragArea,
1605
+ dragTarget: '.' + CLS_TB_ITEM,
1606
+ clone: true,
1607
+ helper: this.helper.bind(this),
1608
+ dragStart: this.itemDragStart.bind(this),
1609
+ drag: function (e) {
1610
+ var dragIndex = _this.getEleIndex(_this.dragItem);
1611
+ var dropIndex;
1612
+ var dropItem;
1613
+ var dragArgs = {
1614
+ draggedItem: _this.dragItem,
1615
+ event: e.event,
1616
+ target: e.target,
1617
+ droppedItem: e.target.closest('.' + CLS_TB_ITEM),
1618
+ clonedElement: _this.cloneElement,
1619
+ index: dragIndex
1620
+ };
1621
+ if (!isNOU(e.target.closest('.' + CLS_TAB)) && !e.target.closest('.' + CLS_TAB).isEqualNode(_this.element) &&
1622
+ _this.dragArea !== '.' + CLS_HEADER) {
1623
+ _this.trigger('dragging', dragArgs);
1624
+ }
1625
+ else {
1626
+ if (!(e.target.closest(_this.dragArea)) && _this.overflowMode !== 'Popup') {
1627
+ document.body.style.cursor = 'not-allowed';
1628
+ addClass([_this.cloneElement], CLS_HIDDEN);
1629
+ if (_this.dragItem.classList.contains(CLS_HIDDEN)) {
1630
+ removeClass([_this.dragItem], CLS_HIDDEN);
1631
+ }
1632
+ _this.dragItem.querySelector('.' + CLS_WRAP).style.visibility = 'visible';
1633
+ }
1634
+ else {
1635
+ document.body.style.cursor = '';
1636
+ _this.dragItem.querySelector('.' + CLS_WRAP).style.visibility = 'hidden';
1637
+ if (_this.cloneElement.classList.contains(CLS_HIDDEN)) {
1638
+ removeClass([_this.cloneElement], CLS_HIDDEN);
1639
+ }
1640
+ }
1641
+ if (_this.overflowMode === 'Scrollable' && !isNOU(_this.element.querySelector('.e-hscroll'))) {
1642
+ var scrollRightNavEle = _this.element.querySelector('.e-scroll-right-nav');
1643
+ var scrollLeftNavEle = _this.element.querySelector('.e-scroll-left-nav');
1644
+ var hscrollBar = _this.element.querySelector('.e-hscroll-bar');
1645
+ if (!isNOU(scrollRightNavEle) && Math.abs((scrollRightNavEle.offsetWidth / 2) +
1646
+ scrollRightNavEle.offsetLeft) > _this.cloneElement.offsetLeft + _this.cloneElement.offsetWidth) {
1647
+ hscrollBar.scrollLeft -= 10;
1648
+ }
1649
+ if (!isNOU(scrollLeftNavEle) && Math.abs((scrollLeftNavEle.offsetLeft + scrollLeftNavEle.offsetWidth) -
1650
+ _this.cloneElement.offsetLeft) > (scrollLeftNavEle.offsetWidth / 2)) {
1651
+ hscrollBar.scrollLeft += 10;
1652
+ }
1653
+ }
1654
+ _this.cloneElement.style.pointerEvents = 'none';
1655
+ dropItem = closest(e.target, '.' + CLS_TB_ITEM + '.e-draggable');
1656
+ var scrollContentWidth = 0;
1657
+ if (_this.overflowMode === 'Scrollable' && !isNOU(_this.element.querySelector('.e-hscroll'))) {
1658
+ scrollContentWidth = _this.element.querySelector('.e-hscroll-content').offsetWidth;
1659
+ }
1660
+ if (dropItem != null && !dropItem.isSameNode(_this.dragItem) &&
1661
+ dropItem.closest('.' + CLS_TAB).isSameNode(_this.dragItem.closest('.' + CLS_TAB))) {
1662
+ dropIndex = _this.getEleIndex(dropItem);
1663
+ if (dropIndex < dragIndex &&
1664
+ (Math.abs((dropItem.offsetLeft + dropItem.offsetWidth) -
1665
+ _this.cloneElement.offsetLeft) > (dropItem.offsetWidth / 2))) {
1666
+ _this.dragAction(dropItem, dragIndex, dropIndex);
1667
+ }
1668
+ if (dropIndex > dragIndex &&
1669
+ (Math.abs(dropItem.offsetWidth / 2) + dropItem.offsetLeft -
1670
+ scrollContentWidth) < _this.cloneElement.offsetLeft + _this.cloneElement.offsetWidth) {
1671
+ _this.dragAction(dropItem, dragIndex, dropIndex);
1672
+ }
1673
+ }
1674
+ _this.droppedIndex = _this.getEleIndex(_this.dragItem);
1675
+ _this.trigger('dragging', dragArgs);
1676
+ }
1677
+ },
1678
+ dragStop: this.itemDragStop.bind(this)
1679
+ });
1680
+ this.draggableItems.push(dragObj);
1681
+ };
1682
+ Tab.prototype.helper = function (e) {
1683
+ this.cloneElement = this.createElement('div');
1684
+ if (e.element) {
1685
+ this.cloneElement = (e.element.cloneNode(true));
1686
+ addClass([this.cloneElement], 'e-tab-clone-element');
1687
+ if (this.element.querySelector('.' + CLS_HEADER).classList.contains(CLS_CLOSE_SHOW)) {
1688
+ addClass([this.cloneElement], CLS_CLOSE_SHOW);
1689
+ }
1690
+ removeClass([this.cloneElement.querySelector('.' + CLS_WRAP)], 'e-ripple');
1691
+ if (!isNOU(this.cloneElement.querySelector('.e-ripple-element'))) {
1692
+ remove(this.cloneElement.querySelector('.e-ripple-element'));
1693
+ }
1694
+ document.body.appendChild(this.cloneElement);
1695
+ }
1696
+ return this.cloneElement;
1697
+ };
1698
+ Tab.prototype.itemDragStart = function (e) {
1699
+ var _this = this;
1700
+ this.draggingItems = this.items.map(function (x) { return x; });
1701
+ this.dragItem = e.element;
1702
+ var dragArgs = {
1703
+ draggedItem: e.element,
1704
+ event: e.event,
1705
+ target: e.target,
1706
+ droppedItem: null,
1707
+ index: this.getEleIndex(this.dragItem),
1708
+ clonedElement: this.cloneElement,
1709
+ cancel: false
1710
+ };
1711
+ this.trigger('onDragStart', dragArgs, function (tabItemDragArgs) {
1712
+ if (tabItemDragArgs.cancel) {
1713
+ var dragObj = e.element.ej2_instances[0];
1714
+ if (!isNullOrUndefined(dragObj)) {
1715
+ dragObj.intDestroy(e.event);
1716
+ }
1717
+ detach(_this.cloneElement);
1718
+ }
1719
+ else {
1720
+ _this.removeActiveClass();
1721
+ addClass([_this.tbItems.querySelector('.' + CLS_INDICATOR)], CLS_HIDDEN);
1722
+ _this.dragItem.querySelector('.' + CLS_WRAP).style.visibility = 'hidden';
1723
+ }
1724
+ });
1725
+ };
1726
+ Tab.prototype.dragAction = function (dropItem, dragsIndex, dropIndex) {
1727
+ if (this.items.length > 0) {
1728
+ var item = this.draggingItems[dragsIndex];
1729
+ this.draggingItems.splice(dragsIndex, 1);
1730
+ this.draggingItems.splice(dropIndex, 0, item);
1731
+ }
1732
+ if (this.overflowMode === 'MultiRow') {
1733
+ dropItem.parentNode.insertBefore(this.dragItem, dropItem.nextElementSibling);
1734
+ }
1735
+ if (dragsIndex > dropIndex) {
1736
+ if (!(this.dragItem.parentElement).isSameNode(dropItem.parentElement)) {
1737
+ if (this.overflowMode === 'Extended') {
1738
+ if (dropItem.isSameNode(dropItem.parentElement.lastChild)) {
1739
+ var popupContainer = this.dragItem.parentNode;
1740
+ dropItem.parentNode.insertBefore(this.dragItem, dropItem);
1741
+ popupContainer.insertBefore(dropItem.parentElement.lastChild, popupContainer.childNodes[0]);
1742
+ }
1743
+ else {
1744
+ this.dragItem.parentNode.insertBefore((dropItem.parentElement.lastChild), this.dragItem.parentElement.childNodes[0]);
1745
+ dropItem.parentNode.insertBefore(this.dragItem, dropItem);
1746
+ }
1747
+ }
1748
+ else {
1749
+ var lastEle = (dropItem.parentElement).lastChild;
1750
+ if (dropItem.isSameNode(lastEle)) {
1751
+ var popupContainer = this.dragItem.parentNode;
1752
+ dropItem.parentNode.insertBefore(this.dragItem, dropItem);
1753
+ popupContainer.insertBefore(lastEle, popupContainer.childNodes[0]);
1754
+ }
1755
+ else {
1756
+ this.dragItem.parentNode.insertBefore((dropItem.parentElement).lastChild, this.dragItem.parentElement.childNodes[0]);
1757
+ dropItem.parentNode.insertBefore(this.dragItem, dropItem);
1758
+ }
1759
+ }
1760
+ }
1761
+ else {
1762
+ this.dragItem.parentNode.insertBefore(this.dragItem, dropItem);
1763
+ }
1764
+ }
1765
+ if (dragsIndex < dropIndex) {
1766
+ if (!(this.dragItem.parentElement).isSameNode(dropItem.parentElement)) {
1767
+ if (this.overflowMode === 'Extended') {
1768
+ this.dragItem.parentElement.appendChild(dropItem.parentElement.firstElementChild);
1769
+ dropItem.parentNode.insertBefore(this.dragItem, dropItem.nextSibling);
1770
+ }
1771
+ else {
1772
+ this.dragItem.parentNode.insertBefore((dropItem.parentElement).lastChild, this.dragItem.parentElement.childNodes[0]);
1773
+ dropItem.parentNode.insertBefore(this.dragItem, dropItem);
1774
+ }
1775
+ }
1776
+ else {
1777
+ this.dragItem.parentNode.insertBefore(this.dragItem, dropItem.nextElementSibling);
1778
+ }
1779
+ }
1780
+ };
1781
+ Tab.prototype.itemDragStop = function (e) {
1782
+ var _this = this;
1783
+ detach(this.cloneElement);
1784
+ this.cloneElement = null;
1785
+ this.dragItem.querySelector('.' + CLS_WRAP).style.visibility = 'visible';
1786
+ document.body.style.cursor = '';
1787
+ var dragStopArgs = {
1788
+ draggedItem: this.dragItem,
1789
+ event: e.event,
1790
+ target: e.target,
1791
+ droppedItem: this.tbItem[this.droppedIndex],
1792
+ clonedElement: null,
1793
+ index: this.droppedIndex,
1794
+ cancel: false
1795
+ };
1796
+ this.trigger('dragged', dragStopArgs, function (tabItemDropArgs) {
1797
+ if (tabItemDropArgs.cancel) {
1798
+ _this.refresh();
1799
+ }
1800
+ else {
1801
+ if (_this.items.length > 0 && _this.draggingItems.length > 0) {
1802
+ _this.items = _this.draggingItems;
1803
+ _this.selectedItem = isNOU(_this.droppedIndex) ? _this.getEleIndex(_this.dragItem) : _this.droppedIndex;
1804
+ _this.refresh();
1805
+ }
1806
+ else {
1807
+ _this.dragItem.querySelector('.' + CLS_WRAP).style.visibility = '';
1808
+ removeClass([_this.tbItems.querySelector('.' + CLS_INDICATOR)], CLS_HIDDEN);
1809
+ _this.droppedIndex = isNOU(_this.droppedIndex) ? _this.getEleIndex(_this.dragItem) : _this.droppedIndex;
1810
+ _this.selectTab(_this.droppedIndex, null, true);
1811
+ }
1812
+ }
1813
+ });
1814
+ this.dragItem = null;
1815
+ this.droppedIndex = null;
1816
+ };
1817
+ /**
1818
+ * Enables or disables the specified Tab item. On passing value as `false`, the item will be disabled.
1819
+ *
1820
+ * @param {number} index - Index value of target Tab item.
1821
+ * @param {boolean} value - Boolean value that determines whether the command should be enabled or disabled.
1822
+ * By default, isEnable is true.
1823
+ * @returns {void}.
1824
+ */
1825
+ Tab.prototype.enableTab = function (index, value) {
1826
+ var tbItems = selectAll('.' + CLS_TB_ITEM, this.element)[index];
1827
+ if (isNOU(tbItems)) {
1828
+ return;
1829
+ }
1830
+ if (value === true) {
1831
+ tbItems.classList.remove(CLS_DISABLE, CLS_OVERLAY);
1832
+ tbItems.firstElementChild.setAttribute('tabindex', tbItems.firstElementChild.getAttribute('data-tabindex'));
1833
+ }
1834
+ else {
1835
+ tbItems.classList.add(CLS_DISABLE, CLS_OVERLAY);
1836
+ tbItems.firstElementChild.removeAttribute('tabindex');
1837
+ if (tbItems.classList.contains(CLS_ACTIVE)) {
1838
+ this.select(index + 1);
1839
+ }
1840
+ }
1841
+ if (!isNOU(this.items[index])) {
1842
+ this.items[index].disabled = !value;
1843
+ this.dataBind();
1844
+ }
1845
+ tbItems.firstElementChild.setAttribute('aria-disabled', (value === true) ? 'false' : 'true');
1846
+ };
1847
+ /**
1848
+ * Adds new items to the Tab that accepts an array as Tab items.
1849
+ *
1850
+ * @param {TabItemModel[]} items - An array of item that is added to the Tab.
1851
+ * @param {number} index - Number value that determines where the items to be added. By default, index is 0.
1852
+ * @returns {void}.
1853
+ */
1854
+ Tab.prototype.addTab = function (items, index) {
1855
+ var _this = this;
1856
+ var addArgs = { addedItems: items, cancel: false };
1857
+ if (!this.isReplace) {
1858
+ for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {
1859
+ var item = items_1[_i];
1860
+ item.disabled = item.disabled || false;
1861
+ item.visible = item.visible || true;
1862
+ }
1863
+ this.trigger('adding', addArgs, function (tabAddingArgs) {
1864
+ if (!tabAddingArgs.cancel) {
1865
+ _this.addingTabContent(items, index);
1866
+ }
1867
+ });
1868
+ }
1869
+ else {
1870
+ this.addingTabContent(items, index);
1871
+ }
1872
+ if (this.isReact) {
1873
+ this.renderReactTemplates();
1874
+ }
1875
+ };
1876
+ Tab.prototype.addingTabContent = function (items, index) {
1877
+ var _this = this;
1878
+ var lastEleIndex = 0;
1879
+ this.hdrEle = select('.' + CLS_HEADER, this.element);
1880
+ if (isNOU(this.hdrEle)) {
1881
+ this.items = items;
1882
+ this.reRenderItems();
1883
+ this.bindDraggable();
1884
+ }
1885
+ else {
1886
+ var tbItems = Array.from(selectAll('.e-tab-header .' + CLS_TB_ITEM, this.element));
1887
+ var itemsCount = tbItems.length;
1888
+ if (itemsCount !== 0) {
1889
+ lastEleIndex = this.getMaxIndicesFromItems(tbItems) + 1;
1890
+ }
1891
+ if (isNOU(index)) {
1892
+ index = itemsCount - 1;
1893
+ }
1894
+ if (itemsCount < index || index < 0 || isNaN(index)) {
1895
+ return;
1896
+ }
1897
+ if (itemsCount === 0 && !isNOU(this.hdrEle)) {
1898
+ this.hdrEle.style.display = '';
1899
+ }
1900
+ if (!isNOU(this.bdrLine)) {
1901
+ this.bdrLine.classList.add(CLS_HIDDEN);
1902
+ }
1903
+ this.tbItems = select('.' + CLS_TB_ITEMS, this.getTabHeader());
1904
+ this.isAdd = true;
1905
+ var tabItems_2 = this.parseObject(items, index);
1906
+ this.isAdd = false;
1907
+ var i_1 = 0;
1908
+ var textValue_1;
1909
+ items.forEach(function (item, place) {
1910
+ textValue_1 = item.headerTemplate || item.header.text;
1911
+ if (!(isNOU(item.headerTemplate || item.header) || isNOU(textValue_1) ||
1912
+ (textValue_1.length === 0) && !isNOU(item.header) && isNOU(item.header.iconCss))) {
1913
+ if (tabItems_2[place]) {
1914
+ if (isNOU(item.id)) {
1915
+ item.id = CLS_ITEM + _this.tabId + '_' + TABITEMPREFIX + (lastEleIndex + place).toString();
1916
+ }
1917
+ tabItems_2[place].htmlAttributes['data-id'] = item.id;
1918
+ }
1919
+ _this.items.splice((index + i_1), 0, item);
1920
+ i_1++;
1921
+ }
1922
+ if (!isNOU(item.header) && !isNOU(item.header.text) && (_this.isTemplate || _this.loadOn === 'Init')) {
1923
+ var no = lastEleIndex + place;
1924
+ var ele = _this.createElement('div', {
1925
+ id: CLS_CONTENT + _this.tabId + '_' + no, className: CLS_ITEM,
1926
+ attrs: { role: 'tabpanel', 'aria-labelledby': CLS_ITEM + '_' + no }
1927
+ });
1928
+ _this.cntEle.insertBefore(ele, _this.cntEle.children[(index + place)]);
1929
+ var eleTrg = _this.getTrgContent(_this.cntEle, no.toString());
1930
+ _this.getContent(eleTrg, item.content, 'render', index);
1931
+ }
1932
+ });
1933
+ this.tbObj.addItems(tabItems_2, index);
1934
+ if (!this.isReplace) {
1935
+ this.trigger('added', { addedItems: items });
1936
+ }
1937
+ if (this.selectedItem === index) {
1938
+ this.select(index);
1939
+ }
1940
+ else {
1941
+ this.setActiveBorder();
1942
+ this.tbItem = selectAll('.' + CLS_TB_ITEM, this.getTabHeader());
1943
+ }
1944
+ this.bindDraggable();
1945
+ }
1946
+ };
1947
+ /**
1948
+ * Removes the items in the Tab from the specified index.
1949
+ *
1950
+ * @param {number} index - Index of target item that is going to be removed.
1951
+ * @returns {void}.
1952
+ */
1953
+ Tab.prototype.removeTab = function (index) {
1954
+ var _this = this;
1955
+ var trg = selectAll('.' + CLS_TB_ITEM, this.element)[index];
1956
+ if (isNOU(trg)) {
1957
+ return;
1958
+ }
1959
+ var removeArgs = { removedItem: trg, removedIndex: index, cancel: false };
1960
+ this.trigger('removing', removeArgs, function (tabRemovingArgs) {
1961
+ if (!tabRemovingArgs.cancel) {
1962
+ var header = select('#' + CLS_ITEM + _this.tabId + '_' + _this.extIndex(trg.id), select('.' + CLS_TB_ITEMS, _this.element));
1963
+ if (!isNOU(header)) {
1964
+ _this.clearTabTemplate(header, 'headerTemplate', CLS_TB_ITEM);
1965
+ }
1966
+ _this.tbObj.removeItems(index);
1967
+ if (_this.allowDragAndDrop && (index !== Array.prototype.indexOf.call(_this.itemIndexArray, trg.id))) {
1968
+ index = Array.prototype.indexOf.call(_this.itemIndexArray, trg.id);
1969
+ }
1970
+ var targetEleIndex = _this.itemIndexArray.indexOf(trg.id);
1971
+ _this.items.splice(targetEleIndex, 1);
1972
+ _this.itemIndexArray.splice(targetEleIndex, 1);
1973
+ _this.refreshActiveBorder();
1974
+ var cntTrg = select('#' + CLS_CONTENT + _this.tabId + '_' + _this.extIndex(trg.id), select('.' + CLS_CONTENT, _this.element));
1975
+ if (!isNOU(cntTrg)) {
1976
+ _this.clearTabTemplate(cntTrg, 'content', CLS_ITEM);
1977
+ detach(cntTrg);
1978
+ }
1979
+ _this.trigger('removed', tabRemovingArgs);
1980
+ if (_this.draggableItems && _this.draggableItems.length > 0) {
1981
+ _this.draggableItems[index].destroy();
1982
+ _this.draggableItems[index] = null;
1983
+ _this.draggableItems.splice(index, 1);
1984
+ }
1985
+ if (trg.classList.contains(CLS_ACTIVE)) {
1986
+ index = (index > selectAll('.' + CLS_TB_ITEM + ':not(.' + CLS_TB_POPUP + ')', _this.element).length - 1) ? index - 1 : index;
1987
+ _this.enableAnimation = false;
1988
+ _this.tbItem = selectAll('.' + CLS_TB_ITEM, _this.getTabHeader());
1989
+ index = _this.getSelectingTabIndex(index);
1990
+ index = !isNaN(index) && index >= 0 && _this.tbItem.length > index ? index : 0;
1991
+ _this.selectedItem = index;
1992
+ _this.select(index);
1993
+ }
1994
+ else if (index !== _this.selectedItem) {
1995
+ if (index < _this.selectedItem) {
1996
+ index = _this.itemIndexArray.indexOf(_this.tbItem[_this.selectedItem].id);
1997
+ _this.setProperties({ selectedItem: index > -1 ? index : _this.selectedItem }, true);
1998
+ _this.prevIndex = _this.selectedItem;
1999
+ }
2000
+ _this.tbItem = selectAll('.' + CLS_TB_ITEM, _this.getTabHeader());
2001
+ }
2002
+ if (selectAll('.' + CLS_TB_ITEM, _this.element).length === 0) {
2003
+ _this.hdrEle.style.display = 'none';
2004
+ }
2005
+ _this.enableAnimation = true;
2006
+ }
2007
+ });
2008
+ };
2009
+ /**
2010
+ * Shows or hides the Tab that is in the specified index.
2011
+ *
2012
+ * @param {number} index - Index value of target item.
2013
+ * @param {boolean} value - Based on this Boolean value, item will be hide (false) or show (true). By default, value is true.
2014
+ * @returns {void}.
2015
+ */
2016
+ Tab.prototype.hideTab = function (index, value) {
2017
+ var items;
2018
+ var item = selectAll('.' + CLS_TB_ITEM, this.element)[index];
2019
+ if (isNOU(item)) {
2020
+ return;
2021
+ }
2022
+ if (isNOU(value)) {
2023
+ value = true;
2024
+ }
2025
+ this.bdrLine.classList.add(CLS_HIDDEN);
2026
+ if (value === true) {
2027
+ item.classList.add(CLS_HIDDEN);
2028
+ items = selectAll('.' + CLS_TB_ITEM + ':not(.' + CLS_HIDDEN + ')', this.tbItems);
2029
+ if (items.length !== 0 && item.classList.contains(CLS_ACTIVE)) {
2030
+ if (index !== 0) {
2031
+ for (var i = index - 1; i >= 0; i--) {
2032
+ if (!this.tbItem[i].classList.contains(CLS_HIDDEN)) {
2033
+ this.select(i);
2034
+ break;
2035
+ }
2036
+ else if (i === 0) {
2037
+ for (var k = index + 1; k < this.tbItem.length; k++) {
2038
+ if (!this.tbItem[k].classList.contains(CLS_HIDDEN)) {
2039
+ this.select(k);
2040
+ break;
2041
+ }
2042
+ }
2043
+ }
2044
+ }
2045
+ }
2046
+ else {
2047
+ for (var k = index + 1; k < this.tbItem.length; k++) {
2048
+ if (!this.tbItem[k].classList.contains(CLS_HIDDEN)) {
2049
+ this.select(k);
2050
+ break;
2051
+ }
2052
+ }
2053
+ }
2054
+ }
2055
+ else if (items.length === 0) {
2056
+ this.element.classList.add(CLS_HIDDEN);
2057
+ }
2058
+ }
2059
+ else {
2060
+ this.element.classList.remove(CLS_HIDDEN);
2061
+ items = selectAll('.' + CLS_TB_ITEM + ':not(.' + CLS_HIDDEN + ')', this.tbItems);
2062
+ item.classList.remove(CLS_HIDDEN);
2063
+ if (items.length === 0) {
2064
+ this.select(index);
2065
+ }
2066
+ }
2067
+ this.setActiveBorder();
2068
+ if (!isNOU(this.items[index])) {
2069
+ this.items[index].visible = !value;
2070
+ this.dataBind();
2071
+ }
2072
+ if (!isNullOrUndefined(item.firstElementChild)) {
2073
+ item.firstElementChild.setAttribute('aria-hidden', '' + value);
2074
+ }
2075
+ if (this.overflowMode === 'Popup') {
2076
+ this.refreshOverflow();
2077
+ }
2078
+ };
2079
+ Tab.prototype.selectTab = function (args, event, isInteracted) {
2080
+ if (event === void 0) { event = null; }
2081
+ if (isInteracted === void 0) { isInteracted = false; }
2082
+ this.isInteracted = isInteracted;
2083
+ this.select(args, event);
2084
+ };
2085
+ /**
2086
+ * Specifies the index or HTMLElement to select an item from the Tab.
2087
+ *
2088
+ * @param {number | HTMLElement} args - Index or DOM element is used for selecting an item from the Tab.
2089
+ * @param {Event} event - An event which takes place in DOM.
2090
+ * @returns {void}
2091
+ */
2092
+ Tab.prototype.select = function (args, event) {
2093
+ var _this = this;
2094
+ var tabHeader = this.getTabHeader();
2095
+ this.tbItems = select('.' + CLS_TB_ITEMS, tabHeader);
2096
+ this.tbItem = selectAll('.' + CLS_TB_ITEM, tabHeader);
2097
+ this.content = select('.' + CLS_CONTENT, this.element);
2098
+ this.prevItem = this.tbItem[this.prevIndex];
2099
+ if (isNOU(this.selectedItem) || (this.selectedItem < 0) || (this.tbItem.length <= this.selectedItem) || isNaN(this.selectedItem)) {
2100
+ this.selectedItem = 0;
2101
+ }
2102
+ else {
2103
+ this.selectedID = this.extIndex(this.tbItem[this.selectedItem].id);
2104
+ }
2105
+ var trg = this.tbItem[args];
2106
+ if (isNOU(trg)) {
2107
+ this.selectedID = '0';
2108
+ }
2109
+ else {
2110
+ this.selectingID = this.extIndex(trg.id);
2111
+ }
2112
+ if (!isNOU(this.prevItem) && !this.prevItem.classList.contains(CLS_DISABLE)) {
2113
+ this.prevItem.children.item(0).setAttribute('tabindex', this.prevItem.firstElementChild.getAttribute('tabindex'));
2114
+ }
2115
+ var eventArg = {
2116
+ event: event,
2117
+ previousItem: this.prevItem,
2118
+ previousIndex: this.prevIndex,
2119
+ selectedItem: this.tbItem[this.selectedItem],
2120
+ selectedIndex: this.selectedItem,
2121
+ selectedContent: !isNOU(this.content) ?
2122
+ select('#' + CLS_CONTENT + this.tabId + '_' + this.selectedID, this.content) : null,
2123
+ selectingItem: trg,
2124
+ selectingIndex: args,
2125
+ selectingContent: !isNOU(this.content) ?
2126
+ select('#' + CLS_CONTENT + this.tabId + '_' + this.selectingID, this.content) : null,
2127
+ isSwiped: this.isSwiped,
2128
+ isInteracted: this.isInteracted,
2129
+ cancel: false
2130
+ };
2131
+ if (!this.initRender) {
2132
+ this.trigger('selecting', eventArg, function (selectArgs) {
2133
+ if (!selectArgs.cancel) {
2134
+ _this.selectingContent(args, _this.isInteracted);
2135
+ }
2136
+ });
2137
+ }
2138
+ else {
2139
+ this.selectingContent(args, this.isInteracted);
2140
+ }
2141
+ this.isInteracted = false;
2142
+ };
2143
+ Tab.prototype.getSelectingTabIndex = function (args) {
2144
+ if (!isNOU(this.tbItem[args]) && (this.tbItem[args].classList.contains(CLS_DISABLE) ||
2145
+ this.tbItem[args].classList.contains(CLS_HIDDEN))) {
2146
+ for (var i = args + 1; i < this.items.length; i++) {
2147
+ if (this.items[i].disabled === false && this.items[i].visible === true) {
2148
+ args = i;
2149
+ break;
2150
+ }
2151
+ else {
2152
+ args = 0;
2153
+ }
2154
+ }
2155
+ }
2156
+ return args;
2157
+ };
2158
+ Tab.prototype.selectingContent = function (args, isInteracted) {
2159
+ if (typeof args === 'number') {
2160
+ args = this.getSelectingTabIndex(args);
2161
+ if (this.tbItem.length > args && args >= 0 && !isNaN(args)) {
2162
+ this.prevIndex = this.selectedItem;
2163
+ this.prevItem = this.tbItem[this.prevIndex];
2164
+ if (this.tbItem[args].classList.contains(CLS_TB_POPUP) && this.reorderActiveTab) {
2165
+ this.setActive(this.popupHandler(this.tbItem[args]), null, isInteracted);
2166
+ if ((!isNOU(this.items) && this.items.length > 0) && this.allowDragAndDrop) {
2167
+ this.tbItem = selectAll('.' + CLS_TB_ITEMS + ' .' + CLS_TB_ITEM, this.hdrEle);
2168
+ var item = this.items[args];
2169
+ this.items.splice(args, 1);
2170
+ this.items.splice(this.tbItem.length - 1, 0, item);
2171
+ var itemId = this.itemIndexArray[args];
2172
+ this.itemIndexArray.splice(args, 1);
2173
+ this.itemIndexArray.splice(this.tbItem.length - 1, 0, itemId);
2174
+ }
2175
+ }
2176
+ else {
2177
+ this.setActive(args, null, isInteracted);
2178
+ }
2179
+ }
2180
+ else {
2181
+ this.setActive(0, null, isInteracted);
2182
+ }
2183
+ }
2184
+ else if (args instanceof (HTMLElement)) {
2185
+ this.setActive(this.getEleIndex(args), null, isInteracted);
2186
+ }
2187
+ };
2188
+ /**
2189
+ * Gets the item index from the Tab.
2190
+ *
2191
+ * @param {string} tabItemId - Item ID is used for getting index from the Tab.
2192
+ * @returns {number} - It returns item index.
2193
+ */
2194
+ Tab.prototype.getItemIndex = function (tabItemId) {
2195
+ var tabIndex;
2196
+ for (var i = 0; i < this.tbItem.length; i++) {
2197
+ var value = this.tbItem[i].getAttribute('data-id');
2198
+ if (tabItemId === value) {
2199
+ tabIndex = i;
2200
+ break;
2201
+ }
2202
+ }
2203
+ return tabIndex;
2204
+ };
2205
+ /**
2206
+ * Specifies the value to disable/enable the Tab component.
2207
+ * When set to `true`, the component will be disabled.
2208
+ *
2209
+ * @param {boolean} value - Based on this Boolean value, Tab will be enabled (false) or disabled (true).
2210
+ * @returns {void}.
2211
+ */
2212
+ Tab.prototype.disable = function (value) {
2213
+ this.setCssClass(this.element, CLS_DISABLE, value);
2214
+ this.element.setAttribute('aria-disabled', '' + value);
2215
+ };
2216
+ /**
2217
+ * Get the properties to be maintained in the persisted state.
2218
+ *
2219
+ * @returns {string} - It returns the persisted state.
2220
+ */
2221
+ Tab.prototype.getPersistData = function () {
2222
+ return this.addOnPersist(['selectedItem', 'actEleId']);
2223
+ };
2224
+ /**
2225
+ * Returns the current module name.
2226
+ *
2227
+ * @returns {string} - It returns the current module name.
2228
+ * @private
2229
+ */
2230
+ Tab.prototype.getModuleName = function () {
2231
+ return 'tab';
2232
+ };
2233
+ /**
2234
+ * Gets called when the model property changes.The data that describes the old and new values of the property that changed.
2235
+ *
2236
+ * @param {TabModel} newProp - It contains the new value of data.
2237
+ * @param {TabModel} oldProp - It contains the old value of data.
2238
+ * @returns {void}
2239
+ * @private
2240
+ */
2241
+ Tab.prototype.onPropertyChanged = function (newProp, oldProp) {
2242
+ var _this = this;
2243
+ var sortedKeys = Object.keys(newProp).sort(function (a, b) {
2244
+ if (a === 'items')
2245
+ return -1;
2246
+ if (b === 'items')
2247
+ return 1;
2248
+ return 0;
2249
+ });
2250
+ for (var _i = 0, sortedKeys_1 = sortedKeys; _i < sortedKeys_1.length; _i++) {
2251
+ var prop = sortedKeys_1[_i];
2252
+ switch (prop) {
2253
+ case 'width':
2254
+ setStyle(this.element, { width: formatUnit(newProp.width) });
2255
+ break;
2256
+ case 'height':
2257
+ setStyle(this.element, { height: formatUnit(newProp.height) });
2258
+ this.setContentHeight(false);
2259
+ break;
2260
+ case 'cssClass':
2261
+ var headerEle = this.element.querySelector('.' + CLS_HEADER);
2262
+ if (oldProp.cssClass !== '' && !isNullOrUndefined(oldProp.cssClass)) {
2263
+ this.setCssClass(this.element, oldProp.cssClass, false);
2264
+ this.setCssClass(this.element, newProp.cssClass, true);
2265
+ if (!isNullOrUndefined(headerEle)) {
2266
+ this.setCssClass(headerEle, oldProp.cssClass, false);
2267
+ this.setCssClass(headerEle, newProp.cssClass, true);
2268
+ }
2269
+ }
2270
+ else {
2271
+ this.setCssClass(this.element, newProp.cssClass, true);
2272
+ if (!isNullOrUndefined(headerEle)) {
2273
+ this.setCssClass(headerEle, newProp.cssClass, true);
2274
+ }
2275
+ }
2276
+ break;
2277
+ case 'items':
2278
+ this.evalOnPropertyChangeItems(newProp, oldProp);
2279
+ break;
2280
+ case 'showCloseButton':
2281
+ this.setCloseButton(newProp.showCloseButton);
2282
+ break;
2283
+ case 'reorderActiveTab':
2284
+ this.refreshActiveTabBorder();
2285
+ break;
2286
+ case 'selectedItem':
2287
+ this.selectedItem = oldProp.selectedItem;
2288
+ this.select(newProp.selectedItem);
2289
+ break;
2290
+ case 'headerPlacement':
2291
+ this.changeOrientation(newProp.headerPlacement);
2292
+ break;
2293
+ case 'enableRtl':
2294
+ this.setRTL(newProp.enableRtl);
2295
+ break;
2296
+ case 'overflowMode':
2297
+ this.tbObj.overflowMode = newProp.overflowMode;
2298
+ this.tbObj.dataBind();
2299
+ this.refreshActiveTabBorder();
2300
+ break;
2301
+ case 'heightAdjustMode':
2302
+ this.setContentHeight(false);
2303
+ this.select(this.selectedItem);
2304
+ break;
2305
+ case 'scrollStep':
2306
+ if (this.tbObj) {
2307
+ this.tbObj.scrollStep = this.scrollStep;
2308
+ }
2309
+ break;
2310
+ case 'allowDragAndDrop':
2311
+ this.bindDraggable();
2312
+ break;
2313
+ case 'swipeMode':
2314
+ if (this.touchModule) {
2315
+ this.touchModule.destroy();
2316
+ this.touchModule = null;
2317
+ }
2318
+ this.bindSwipeEvents();
2319
+ break;
2320
+ case 'dragArea':
2321
+ if (this.allowDragAndDrop) {
2322
+ this.draggableItems.forEach(function (item) {
2323
+ item.dragArea = _this.dragArea;
2324
+ });
2325
+ this.refresh();
2326
+ }
2327
+ break;
2328
+ }
2329
+ }
2330
+ };
2331
+ /**
2332
+ * To refresh the active tab contents.
2333
+ *
2334
+ * @returns {void}
2335
+ */
2336
+ Tab.prototype.refreshActiveTab = function () {
2337
+ if (this.isReact && this.isTemplate) {
2338
+ this.clearTemplate();
2339
+ }
2340
+ if (!this.isTemplate) {
2341
+ if (this.element.querySelector('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE)) {
2342
+ detach(this.element.querySelector('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE).children[0]);
2343
+ detach(this.element.querySelector('.' + CLS_CONTENT).querySelector('.' + CLS_ACTIVE).children[0]);
2344
+ var item = this.items[this.selectedItem];
2345
+ var pos = (isNOU(item.header) || isNOU(item.header.iconPosition)) ? '' : item.header.iconPosition;
2346
+ var css = (isNOU(item.header) || isNOU(item.header.iconCss)) ? '' : item.header.iconCss;
2347
+ var text = item.headerTemplate || item.header.text;
2348
+ var txtWrap = this.createElement('div', { className: CLS_TEXT, attrs: { 'role': 'presentation' } });
2349
+ if (!isNOU(text.tagName)) {
2350
+ txtWrap.appendChild(text);
2351
+ }
2352
+ else {
2353
+ this.headerTextCompile(txtWrap, text, this.selectedItem);
2354
+ }
2355
+ var tEle = void 0;
2356
+ var icon = this.createElement('span', {
2357
+ className: CLS_ICONS + ' ' + CLS_TAB_ICON + ' ' + CLS_ICON + '-' + pos + ' ' + css
2358
+ });
2359
+ var tConts = this.createElement('div', { className: CLS_TEXT_WRAP });
2360
+ tConts.appendChild(txtWrap);
2361
+ if ((text !== '' && text !== undefined) && css !== '') {
2362
+ if ((pos === 'left' || pos === 'top')) {
2363
+ tConts.insertBefore(icon, tConts.firstElementChild);
2364
+ }
2365
+ else {
2366
+ tConts.appendChild(icon);
2367
+ }
2368
+ tEle = txtWrap;
2369
+ this.isIconAlone = false;
2370
+ }
2371
+ else {
2372
+ tEle = ((css === '') ? txtWrap : icon);
2373
+ if (tEle === icon) {
2374
+ detach(txtWrap);
2375
+ tConts.appendChild(icon);
2376
+ this.isIconAlone = true;
2377
+ }
2378
+ }
2379
+ var tabIndex = isNOU(item.tabIndex) ? '-1' : item.tabIndex.toString();
2380
+ var wrapAtt = (item.disabled) ? {} : { tabIndex: tabIndex, 'data-tabindex': tabIndex, role: 'tab', 'aria-selected': 'true', 'aria-disabled': 'false' };
2381
+ tConts.appendChild(this.btnCls.cloneNode(true));
2382
+ var wraper = this.createElement('div', { className: CLS_WRAP, attrs: wrapAtt });
2383
+ wraper.appendChild(tConts);
2384
+ if (pos === 'top' || pos === 'bottom') {
2385
+ this.element.classList.add('e-vertical-icon');
2386
+ }
2387
+ this.element.querySelector('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE).appendChild(wraper);
2388
+ var crElem = this.createElement('div');
2389
+ var cnt = item.content;
2390
+ var eleStr = void 0;
2391
+ if (typeof cnt === 'string' || isNOU(cnt.innerHTML)) {
2392
+ if (typeof cnt === 'string' && this.enableHtmlSanitizer) {
2393
+ cnt = SanitizeHtmlHelper.sanitize(cnt);
2394
+ }
2395
+ if (cnt[0] === '.' || cnt[0] === '#') {
2396
+ if (document.querySelectorAll(cnt).length) {
2397
+ var eleVal = document.querySelector(cnt);
2398
+ eleStr = eleVal.outerHTML.trim();
2399
+ crElem.appendChild(eleVal);
2400
+ eleVal.style.display = '';
2401
+ }
2402
+ else {
2403
+ this.compileElement(crElem, cnt, 'content', this.selectedItem);
2404
+ }
2405
+ }
2406
+ else {
2407
+ this.compileElement(crElem, cnt, 'content', this.selectedItem);
2408
+ }
2409
+ }
2410
+ else {
2411
+ crElem.appendChild(cnt);
2412
+ }
2413
+ if (!isNOU(eleStr)) {
2414
+ if (this.templateEle.indexOf(cnt.toString()) === -1) {
2415
+ this.templateEle.push(cnt.toString());
2416
+ }
2417
+ }
2418
+ this.element.querySelector('.' + CLS_ITEM + '.' + CLS_ACTIVE).appendChild(crElem);
2419
+ }
2420
+ }
2421
+ else {
2422
+ var tabItems = this.element.querySelector('.' + CLS_TB_ITEMS);
2423
+ var element = this.element.querySelector('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE);
2424
+ var index = this.getIndexFromEle(element.id);
2425
+ var header = element.innerText;
2426
+ var detachContent = this.element.querySelector('.' + CLS_CONTENT).querySelector('.' + CLS_ACTIVE).children[0];
2427
+ var mainContents = detachContent.innerHTML;
2428
+ detach(element);
2429
+ detach(detachContent);
2430
+ var attr = {
2431
+ className: CLS_TB_ITEM + ' ' + CLS_TEMPLATE + ' ' + CLS_ACTIVE, id: CLS_ITEM + this.tabId + '_' + index
2432
+ };
2433
+ var txtString = this.createElement('span', {
2434
+ className: CLS_TEXT, innerHTML: header, attrs: { 'role': 'presentation' }
2435
+ }).outerHTML;
2436
+ var conte = this.createElement('div', {
2437
+ className: CLS_TEXT_WRAP, innerHTML: txtString + this.btnCls.outerHTML
2438
+ }).outerHTML;
2439
+ var tabIndex = element.firstElementChild.getAttribute('data-tabindex');
2440
+ var wrap = this.createElement('div', {
2441
+ className: CLS_WRAP, innerHTML: conte,
2442
+ attrs: { tabIndex: tabIndex, 'data-tabindex': tabIndex, role: 'tab', 'aria-controls': CLS_CONTENT + this.tabId + '_' + index, 'aria-selected': 'true', 'aria-disabled': 'false' }
2443
+ });
2444
+ tabItems.insertBefore(this.createElement('div', attr), tabItems.children[index + 1]);
2445
+ this.element.querySelector('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE).appendChild(wrap);
2446
+ var crElem = this.createElement('div', { innerHTML: mainContents });
2447
+ this.element.querySelector('.' + CLS_CONTENT).querySelector('.' + CLS_ACTIVE).appendChild(crElem);
2448
+ }
2449
+ if (this.isReact) {
2450
+ this.renderReactTemplates();
2451
+ }
2452
+ };
2453
+ /**
2454
+ * To refresh the active tab indicator.
2455
+ *
2456
+ * @returns {void}
2457
+ */
2458
+ Tab.prototype.refreshActiveTabBorder = function () {
2459
+ if (this.heightAdjustMode === 'None' && this.height !== 'auto' && this.cntEle && !this.isVertical()) {
2460
+ var hdrEle = this.getTabHeader();
2461
+ setStyle(this.cntEle, { 'height': (this.element.clientHeight - hdrEle.offsetHeight) + 'px' });
2462
+ }
2463
+ var activeEle = select('.' + CLS_TB_ITEM + '.' + CLS_TB_POPUP + '.' + CLS_ACTIVE, this.element);
2464
+ if (!isNOU(activeEle) && this.reorderActiveTab) {
2465
+ this.select(this.getEleIndex(activeEle));
2466
+ }
2467
+ this.refreshActiveBorder();
2468
+ };
2469
+ __decorate([
2470
+ Collection([], TabItem)
2471
+ ], Tab.prototype, "items", void 0);
2472
+ __decorate([
2473
+ Property('100%')
2474
+ ], Tab.prototype, "width", void 0);
2475
+ __decorate([
2476
+ Property('Both')
2477
+ ], Tab.prototype, "swipeMode", void 0);
2478
+ __decorate([
2479
+ Property('auto')
2480
+ ], Tab.prototype, "height", void 0);
2481
+ __decorate([
2482
+ Property('')
2483
+ ], Tab.prototype, "cssClass", void 0);
2484
+ __decorate([
2485
+ Property(0)
2486
+ ], Tab.prototype, "selectedItem", void 0);
2487
+ __decorate([
2488
+ Property('Top')
2489
+ ], Tab.prototype, "headerPlacement", void 0);
2490
+ __decorate([
2491
+ Property('Content')
2492
+ ], Tab.prototype, "heightAdjustMode", void 0);
2493
+ __decorate([
2494
+ Property('Scrollable')
2495
+ ], Tab.prototype, "overflowMode", void 0);
2496
+ __decorate([
2497
+ Property('Demand')
2498
+ ], Tab.prototype, "loadOn", void 0);
2499
+ __decorate([
2500
+ Property(false)
2501
+ ], Tab.prototype, "enablePersistence", void 0);
2502
+ __decorate([
2503
+ Property(true)
2504
+ ], Tab.prototype, "enableHtmlSanitizer", void 0);
2505
+ __decorate([
2506
+ Property(false)
2507
+ ], Tab.prototype, "showCloseButton", void 0);
2508
+ __decorate([
2509
+ Property(true)
2510
+ ], Tab.prototype, "reorderActiveTab", void 0);
2511
+ __decorate([
2512
+ Property()
2513
+ ], Tab.prototype, "scrollStep", void 0);
2514
+ __decorate([
2515
+ Property()
2516
+ ], Tab.prototype, "dragArea", void 0);
2517
+ __decorate([
2518
+ Property(false)
2519
+ ], Tab.prototype, "allowDragAndDrop", void 0);
2520
+ __decorate([
2521
+ Property(true)
2522
+ ], Tab.prototype, "clearTemplates", void 0);
2523
+ __decorate([
2524
+ Complex({}, TabAnimationSettings)
2525
+ ], Tab.prototype, "animation", void 0);
2526
+ __decorate([
2527
+ Event()
2528
+ ], Tab.prototype, "created", void 0);
2529
+ __decorate([
2530
+ Event()
2531
+ ], Tab.prototype, "adding", void 0);
2532
+ __decorate([
2533
+ Event()
2534
+ ], Tab.prototype, "added", void 0);
2535
+ __decorate([
2536
+ Event()
2537
+ ], Tab.prototype, "selecting", void 0);
2538
+ __decorate([
2539
+ Event()
2540
+ ], Tab.prototype, "selected", void 0);
2541
+ __decorate([
2542
+ Event()
2543
+ ], Tab.prototype, "removing", void 0);
2544
+ __decorate([
2545
+ Event()
2546
+ ], Tab.prototype, "removed", void 0);
2547
+ __decorate([
2548
+ Event()
2549
+ ], Tab.prototype, "onDragStart", void 0);
2550
+ __decorate([
2551
+ Event()
2552
+ ], Tab.prototype, "dragging", void 0);
2553
+ __decorate([
2554
+ Event()
2555
+ ], Tab.prototype, "dragged", void 0);
2556
+ __decorate([
2557
+ Event()
2558
+ ], Tab.prototype, "destroyed", void 0);
2559
+ Tab = __decorate([
2560
+ NotifyPropertyChanges
2561
+ ], Tab);
2562
+ return Tab;
2563
+ }(Component));
2564
+ export { Tab };