@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,2408 @@
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
+ /* eslint-disable @typescript-eslint/no-explicit-any */
21
+ import { Component, EventHandler, Property, Event } from '@syncfusion/ej2-base';
22
+ import { addClass, removeClass, isVisible, closest, attributes, detach, classList, KeyboardEvents } from '@syncfusion/ej2-base';
23
+ import { selectAll, setStyleAttribute as setStyle, select } from '@syncfusion/ej2-base';
24
+ import { isNullOrUndefined as isNOU, getUniqueID, formatUnit, Collection, compile as templateCompiler } from '@syncfusion/ej2-base';
25
+ import { NotifyPropertyChanges, ChildProperty, Browser, SanitizeHtmlHelper } from '@syncfusion/ej2-base';
26
+ import { Popup } from '@syncfusion/ej2-popups';
27
+ import { calculatePosition } from '@syncfusion/ej2-popups';
28
+ import { Button } from '@syncfusion/ej2-buttons';
29
+ import { HScroll } from '../common/h-scroll';
30
+ import { VScroll } from '../common/v-scroll';
31
+ var CLS_VERTICAL = 'e-vertical';
32
+ var CLS_ITEMS = 'e-toolbar-items';
33
+ var CLS_ITEM = 'e-toolbar-item';
34
+ var CLS_RTL = 'e-rtl';
35
+ var CLS_SEPARATOR = 'e-separator';
36
+ var CLS_POPUPICON = 'e-popup-up-icon';
37
+ var CLS_POPUPDOWN = 'e-popup-down-icon';
38
+ var CLS_POPUPOPEN = 'e-popup-open';
39
+ var CLS_TEMPLATE = 'e-template';
40
+ var CLS_DISABLE = 'e-overlay';
41
+ var CLS_POPUPTEXT = 'e-toolbar-text';
42
+ var CLS_TBARTEXT = 'e-popup-text';
43
+ var CLS_TBAROVERFLOW = 'e-overflow-show';
44
+ var CLS_POPOVERFLOW = 'e-overflow-hide';
45
+ var CLS_TBARBTN = 'e-tbar-btn';
46
+ var CLS_TBARNAV = 'e-hor-nav';
47
+ var CLS_TBARSCRLNAV = 'e-scroll-nav';
48
+ var CLS_TBARRIGHT = 'e-toolbar-right';
49
+ var CLS_TBARLEFT = 'e-toolbar-left';
50
+ var CLS_TBARCENTER = 'e-toolbar-center';
51
+ var CLS_TBARPOS = 'e-tbar-pos';
52
+ var CLS_HSCROLLCNT = 'e-hscroll-content';
53
+ var CLS_VSCROLLCNT = 'e-vscroll-content';
54
+ var CLS_HSCROLLBAR = 'e-hscroll-bar';
55
+ var CLS_POPUPNAV = 'e-hor-nav';
56
+ var CLS_POPUPCLASS = 'e-toolbar-pop';
57
+ var CLS_POPUP = 'e-toolbar-popup';
58
+ var CLS_TBARBTNTEXT = 'e-tbar-btn-text';
59
+ var CLS_TBARNAVACT = 'e-nav-active';
60
+ var CLS_TBARIGNORE = 'e-ignore';
61
+ var CLS_POPPRI = 'e-popup-alone';
62
+ var CLS_HIDDEN = 'e-hidden';
63
+ var CLS_MULTIROW = 'e-toolbar-multirow';
64
+ var CLS_MULTIROWPOS = 'e-multirow-pos';
65
+ var CLS_MULTIROW_SEPARATOR = 'e-multirow-separator';
66
+ var CLS_EXTENDABLE_SEPARATOR = 'e-extended-separator';
67
+ var CLS_EXTEANDABLE_TOOLBAR = 'e-extended-toolbar';
68
+ var CLS_EXTENDABLECLASS = 'e-toolbar-extended';
69
+ var CLS_EXTENDPOPUP = 'e-expended-nav';
70
+ var CLS_EXTENDEDPOPOPEN = 'e-tbar-extended';
71
+ /**
72
+ * An item object that is used to configure Toolbar commands.
73
+ */
74
+ var Item = /** @class */ (function (_super) {
75
+ __extends(Item, _super);
76
+ function Item() {
77
+ return _super !== null && _super.apply(this, arguments) || this;
78
+ }
79
+ __decorate([
80
+ Property('')
81
+ ], Item.prototype, "id", void 0);
82
+ __decorate([
83
+ Property('')
84
+ ], Item.prototype, "text", void 0);
85
+ __decorate([
86
+ Property('auto')
87
+ ], Item.prototype, "width", void 0);
88
+ __decorate([
89
+ Property('')
90
+ ], Item.prototype, "cssClass", void 0);
91
+ __decorate([
92
+ Property(false)
93
+ ], Item.prototype, "showAlwaysInPopup", void 0);
94
+ __decorate([
95
+ Property(false)
96
+ ], Item.prototype, "disabled", void 0);
97
+ __decorate([
98
+ Property('')
99
+ ], Item.prototype, "prefixIcon", void 0);
100
+ __decorate([
101
+ Property('')
102
+ ], Item.prototype, "suffixIcon", void 0);
103
+ __decorate([
104
+ Property(true)
105
+ ], Item.prototype, "visible", void 0);
106
+ __decorate([
107
+ Property('None')
108
+ ], Item.prototype, "overflow", void 0);
109
+ __decorate([
110
+ Property('')
111
+ ], Item.prototype, "template", void 0);
112
+ __decorate([
113
+ Property('Button')
114
+ ], Item.prototype, "type", void 0);
115
+ __decorate([
116
+ Property('Both')
117
+ ], Item.prototype, "showTextOn", void 0);
118
+ __decorate([
119
+ Property(null)
120
+ ], Item.prototype, "htmlAttributes", void 0);
121
+ __decorate([
122
+ Property('')
123
+ ], Item.prototype, "tooltipText", void 0);
124
+ __decorate([
125
+ Property('Left')
126
+ ], Item.prototype, "align", void 0);
127
+ __decorate([
128
+ Event()
129
+ ], Item.prototype, "click", void 0);
130
+ __decorate([
131
+ Property(-1)
132
+ ], Item.prototype, "tabIndex", void 0);
133
+ return Item;
134
+ }(ChildProperty));
135
+ export { Item };
136
+ /**
137
+ * The Toolbar control contains a group of commands that are aligned horizontally.
138
+ * ```html
139
+ * <div id="toolbar"/>
140
+ * <script>
141
+ * var toolbarObj = new Toolbar();
142
+ * toolbarObj.appendTo("#toolbar");
143
+ * </script>
144
+ * ```
145
+ */
146
+ var Toolbar = /** @class */ (function (_super) {
147
+ __extends(Toolbar, _super);
148
+ /**
149
+ * Initializes a new instance of the Toolbar class.
150
+ *
151
+ * @param {ToolbarModel} options - Specifies Toolbar model properties as options.
152
+ * @param { string | HTMLElement} element - Specifies the element that is rendered as a Toolbar.
153
+ */
154
+ function Toolbar(options, element) {
155
+ var _this = _super.call(this, options, element) || this;
156
+ _this.resizeContext = _this.resize.bind(_this);
157
+ _this.orientationChangeContext = _this.orientationChange.bind(_this);
158
+ /**
159
+ * Contains the keyboard configuration of the Toolbar.
160
+ */
161
+ _this.keyConfigs = {
162
+ moveLeft: 'leftarrow',
163
+ moveRight: 'rightarrow',
164
+ moveUp: 'uparrow',
165
+ moveDown: 'downarrow',
166
+ popupOpen: 'enter',
167
+ popupClose: 'escape',
168
+ tab: 'tab',
169
+ home: 'home',
170
+ end: 'end'
171
+ };
172
+ return _this;
173
+ }
174
+ /**
175
+ * Removes the control from the DOM and also removes all its related events.
176
+ *
177
+ * @returns {void}.
178
+ */
179
+ Toolbar.prototype.destroy = function () {
180
+ var _this = this;
181
+ if (this.isReact || this.isAngular) {
182
+ this.clearTemplate();
183
+ }
184
+ var btnItems = this.element.querySelectorAll('.e-control.e-btn');
185
+ [].slice.call(btnItems).forEach(function (el) {
186
+ if (!isNOU(el) && !isNOU(el.ej2_instances) && !isNOU(el.ej2_instances[0]) && !(el.ej2_instances[0].isDestroyed)) {
187
+ el.ej2_instances[0].destroy();
188
+ }
189
+ });
190
+ this.unwireEvents();
191
+ this.tempId.forEach(function (ele) {
192
+ if (!isNOU(_this.element.querySelector(ele))) {
193
+ document.body.appendChild(_this.element.querySelector(ele)).style.display = 'none';
194
+ }
195
+ });
196
+ this.destroyItems();
197
+ while (this.element.lastElementChild) {
198
+ this.element.removeChild(this.element.lastElementChild);
199
+ }
200
+ if (this.trgtEle) {
201
+ this.element.appendChild(this.ctrlTem);
202
+ this.trgtEle = null;
203
+ this.ctrlTem = null;
204
+ }
205
+ if (this.popObj) {
206
+ this.popObj.destroy();
207
+ detach(this.popObj.element);
208
+ }
209
+ if (this.activeEle) {
210
+ this.activeEle = null;
211
+ }
212
+ this.popObj = null;
213
+ this.tbarAlign = null;
214
+ this.tbarItemsCol = [];
215
+ this.remove(this.element, 'e-toolpop');
216
+ if (this.cssClass) {
217
+ removeClass([this.element], this.cssClass.split(' '));
218
+ }
219
+ this.element.removeAttribute('style');
220
+ ['aria-disabled', 'aria-orientation', 'role'].forEach(function (attrb) {
221
+ return _this.element.removeAttribute(attrb);
222
+ });
223
+ _super.prototype.destroy.call(this);
224
+ };
225
+ /**
226
+ * Initialize the event handler
227
+ *
228
+ * @private
229
+ * @returns {void}
230
+ */
231
+ Toolbar.prototype.preRender = function () {
232
+ var eventArgs = { enableCollision: this.enableCollision, scrollStep: this.scrollStep };
233
+ this.trigger('beforeCreate', eventArgs);
234
+ this.enableCollision = eventArgs.enableCollision;
235
+ this.scrollStep = eventArgs.scrollStep;
236
+ this.scrollModule = null;
237
+ this.popObj = null;
238
+ this.tempId = [];
239
+ this.tbarItemsCol = this.items;
240
+ this.isVertical = this.element.classList.contains(CLS_VERTICAL) ? true : false;
241
+ this.isExtendedOpen = false;
242
+ this.popupPriCount = 0;
243
+ if (this.enableRtl) {
244
+ this.add(this.element, CLS_RTL);
245
+ }
246
+ };
247
+ Toolbar.prototype.wireEvents = function () {
248
+ EventHandler.add(this.element, 'click', this.clickHandler, this);
249
+ window.addEventListener('resize', this.resizeContext);
250
+ window.addEventListener('orientationchange', this.orientationChangeContext);
251
+ if (this.allowKeyboard) {
252
+ this.wireKeyboardEvent();
253
+ }
254
+ };
255
+ Toolbar.prototype.wireKeyboardEvent = function () {
256
+ this.keyModule = new KeyboardEvents(this.element, {
257
+ keyAction: this.keyActionHandler.bind(this),
258
+ keyConfigs: this.keyConfigs
259
+ });
260
+ EventHandler.add(this.element, 'keydown', this.docKeyDown, this);
261
+ this.updateTabIndex('0');
262
+ };
263
+ Toolbar.prototype.updateTabIndex = function (tabIndex) {
264
+ var ele = this.element.querySelector('.' + CLS_ITEM + ':not(.' + CLS_DISABLE + ' ):not(.' + CLS_SEPARATOR + ' ):not(.' + CLS_HIDDEN + ' )');
265
+ if (!isNOU(ele) && !isNOU(ele.firstElementChild)) {
266
+ var dataTabIndex = ele.firstElementChild.getAttribute('data-tabindex');
267
+ if (dataTabIndex && dataTabIndex === '-1' && ele.firstElementChild.tagName !== 'INPUT') {
268
+ ele.firstElementChild.setAttribute('tabindex', tabIndex);
269
+ }
270
+ }
271
+ };
272
+ Toolbar.prototype.unwireKeyboardEvent = function () {
273
+ if (this.keyModule) {
274
+ EventHandler.remove(this.element, 'keydown', this.docKeyDown);
275
+ this.keyModule.destroy();
276
+ this.keyModule = null;
277
+ }
278
+ };
279
+ Toolbar.prototype.docKeyDown = function (e) {
280
+ if (e.target.tagName === 'INPUT') {
281
+ return;
282
+ }
283
+ var popCheck = !isNOU(this.popObj) && isVisible(this.popObj.element) && this.overflowMode !== 'Extended';
284
+ if (e.keyCode === 9 && e.target.classList.contains('e-hor-nav') === true && popCheck) {
285
+ this.popObj.hide({ name: 'FadeOut', duration: 100 });
286
+ }
287
+ var keyCheck = (e.keyCode === 40 || e.keyCode === 38 || e.keyCode === 35 || e.keyCode === 36);
288
+ if (keyCheck) {
289
+ e.preventDefault();
290
+ }
291
+ };
292
+ Toolbar.prototype.unwireEvents = function () {
293
+ EventHandler.remove(this.element, 'click', this.clickHandler);
294
+ this.destroyScroll();
295
+ this.unwireKeyboardEvent();
296
+ window.removeEventListener('resize', this.resizeContext);
297
+ window.removeEventListener('orientationchange', this.orientationChangeContext);
298
+ document.removeEventListener('scroll', this.clickEvent);
299
+ document.removeEventListener('click', this.scrollEvent);
300
+ this.scrollEvent = null;
301
+ this.clickEvent = null;
302
+ };
303
+ Toolbar.prototype.clearProperty = function () {
304
+ this.tbarEle = [];
305
+ this.tbarAlgEle = { lefts: [], centers: [], rights: [] };
306
+ };
307
+ Toolbar.prototype.docEvent = function (e) {
308
+ var popEle = closest(e.target, '.e-popup');
309
+ if (this.popObj && isVisible(this.popObj.element) && !popEle && this.overflowMode === 'Popup') {
310
+ this.popObj.hide({ name: 'FadeOut', duration: 100 });
311
+ }
312
+ };
313
+ Toolbar.prototype.destroyScroll = function () {
314
+ if (this.scrollModule) {
315
+ if (this.tbarAlign) {
316
+ this.add(this.scrollModule.element, CLS_TBARPOS);
317
+ }
318
+ this.scrollModule.destroy();
319
+ this.scrollModule = null;
320
+ }
321
+ };
322
+ Toolbar.prototype.destroyItems = function () {
323
+ if (this.element) {
324
+ [].slice.call(this.element.querySelectorAll('.' + CLS_ITEM)).forEach(function (el) { detach(el); });
325
+ }
326
+ if (this.tbarAlign) {
327
+ var tbarItems = this.element.querySelector('.' + CLS_ITEMS);
328
+ [].slice.call(tbarItems.children).forEach(function (el) {
329
+ detach(el);
330
+ });
331
+ this.tbarAlign = false;
332
+ this.remove(tbarItems, CLS_TBARPOS);
333
+ }
334
+ this.clearProperty();
335
+ };
336
+ Toolbar.prototype.destroyMode = function () {
337
+ if (this.scrollModule) {
338
+ this.remove(this.scrollModule.element, CLS_RTL);
339
+ this.destroyScroll();
340
+ }
341
+ this.remove(this.element, CLS_EXTENDEDPOPOPEN);
342
+ this.remove(this.element, CLS_EXTEANDABLE_TOOLBAR);
343
+ var tempEle = this.element.querySelector('.e-toolbar-multirow');
344
+ if (tempEle) {
345
+ this.remove(tempEle, CLS_MULTIROW);
346
+ }
347
+ if (this.popObj) {
348
+ this.popupRefresh(this.popObj.element, true);
349
+ }
350
+ };
351
+ Toolbar.prototype.add = function (ele, val) {
352
+ ele.classList.add(val);
353
+ };
354
+ Toolbar.prototype.remove = function (ele, val) {
355
+ ele.classList.remove(val);
356
+ };
357
+ Toolbar.prototype.elementFocus = function (ele) {
358
+ var fChild = ele.firstElementChild;
359
+ if (fChild) {
360
+ fChild.focus();
361
+ this.activeEleSwitch(ele);
362
+ }
363
+ else {
364
+ ele.focus();
365
+ }
366
+ };
367
+ Toolbar.prototype.clstElement = function (tbrNavChk, trgt) {
368
+ var clst;
369
+ if (tbrNavChk && this.popObj && isVisible(this.popObj.element)) {
370
+ clst = this.popObj.element.querySelector('.' + CLS_ITEM);
371
+ }
372
+ else if (this.element === trgt || tbrNavChk) {
373
+ clst = this.element.querySelector('.' + CLS_ITEM + ':not(.' + CLS_DISABLE + ' ):not(.' + CLS_SEPARATOR + ' ):not(.' + CLS_HIDDEN + ' )');
374
+ }
375
+ else {
376
+ clst = closest(trgt, '.' + CLS_ITEM);
377
+ }
378
+ return clst;
379
+ };
380
+ Toolbar.prototype.keyHandling = function (clst, e, trgt, navChk, scrollChk) {
381
+ var popObj = this.popObj;
382
+ var rootEle = this.element;
383
+ var popAnimate = { name: 'FadeOut', duration: 100 };
384
+ var value = e.action === 'moveUp' ? 'previous' : 'next';
385
+ var ele;
386
+ var nodes;
387
+ switch (e.action) {
388
+ case 'moveRight':
389
+ if (this.isVertical) {
390
+ return;
391
+ }
392
+ if (rootEle === trgt) {
393
+ this.elementFocus(clst);
394
+ }
395
+ else if (!navChk) {
396
+ this.eleFocus(clst, 'next');
397
+ }
398
+ break;
399
+ case 'moveLeft':
400
+ if (this.isVertical) {
401
+ return;
402
+ }
403
+ if (!navChk) {
404
+ this.eleFocus(clst, 'previous');
405
+ }
406
+ break;
407
+ case 'home':
408
+ case 'end':
409
+ if (clst) {
410
+ var popupCheck = closest(clst, '.e-popup');
411
+ var extendedPopup = this.element.querySelector('.' + CLS_EXTENDABLECLASS);
412
+ if (this.overflowMode === 'Extended' && extendedPopup && extendedPopup.classList.contains('e-popup-open')) {
413
+ popupCheck = e.action === 'end' ? extendedPopup : null;
414
+ }
415
+ if (popupCheck) {
416
+ if (isVisible(this.popObj.element)) {
417
+ nodes = [].slice.call(popupCheck.children);
418
+ if (e.action === 'home') {
419
+ ele = this.focusFirstVisibleEle(nodes);
420
+ }
421
+ else {
422
+ ele = this.focusLastVisibleEle(nodes);
423
+ }
424
+ }
425
+ }
426
+ else {
427
+ nodes = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + ')');
428
+ if (e.action === 'home') {
429
+ ele = this.focusFirstVisibleEle(nodes);
430
+ }
431
+ else {
432
+ ele = this.focusLastVisibleEle(nodes);
433
+ }
434
+ }
435
+ if (ele) {
436
+ this.elementFocus(ele);
437
+ }
438
+ }
439
+ break;
440
+ case 'moveUp':
441
+ case 'moveDown':
442
+ if (!this.isVertical) {
443
+ if (popObj && closest(trgt, '.e-popup')) {
444
+ var popEle = popObj.element;
445
+ var popFrstEle = popEle.firstElementChild;
446
+ if ((value === 'previous' && popFrstEle === clst)) {
447
+ popEle.lastElementChild.firstChild.focus();
448
+ }
449
+ else if (value === 'next' && popEle.lastElementChild === clst) {
450
+ popFrstEle.firstChild.focus();
451
+ }
452
+ else {
453
+ this.eleFocus(clst, value);
454
+ }
455
+ }
456
+ else if (e.action === 'moveDown' && popObj && isVisible(popObj.element)) {
457
+ this.elementFocus(clst);
458
+ }
459
+ }
460
+ else {
461
+ if (e.action === 'moveUp') {
462
+ this.eleFocus(clst, 'previous');
463
+ }
464
+ else {
465
+ this.eleFocus(clst, 'next');
466
+ }
467
+ }
468
+ break;
469
+ case 'tab':
470
+ if (!scrollChk && !navChk) {
471
+ var ele_1 = clst.firstElementChild;
472
+ if (rootEle === trgt) {
473
+ if (this.activeEle) {
474
+ this.activeEle.focus();
475
+ }
476
+ else {
477
+ this.activeEleRemove(ele_1);
478
+ ele_1.focus();
479
+ }
480
+ }
481
+ }
482
+ break;
483
+ case 'popupClose':
484
+ if (popObj && this.overflowMode !== 'Extended') {
485
+ popObj.hide(popAnimate);
486
+ }
487
+ break;
488
+ case 'popupOpen':
489
+ if (!navChk) {
490
+ return;
491
+ }
492
+ if (popObj && !isVisible(popObj.element)) {
493
+ popObj.element.style.top = rootEle.offsetHeight + 'px';
494
+ popObj.show({ name: 'FadeIn', duration: 100 });
495
+ }
496
+ else {
497
+ popObj.hide(popAnimate);
498
+ }
499
+ break;
500
+ }
501
+ };
502
+ Toolbar.prototype.keyActionHandler = function (e) {
503
+ var trgt = e.target;
504
+ if (trgt.tagName === 'INPUT' || trgt.tagName === 'TEXTAREA' || this.element.classList.contains(CLS_DISABLE)) {
505
+ return;
506
+ }
507
+ e.preventDefault();
508
+ var tbrNavChk = trgt.classList.contains(CLS_TBARNAV);
509
+ var tbarScrollChk = trgt.classList.contains(CLS_TBARSCRLNAV);
510
+ var clst = this.clstElement(tbrNavChk, trgt);
511
+ if (clst || tbarScrollChk) {
512
+ this.keyHandling(clst, e, trgt, tbrNavChk, tbarScrollChk);
513
+ }
514
+ };
515
+ /**
516
+ * Specifies the value to disable/enable the Toolbar component.
517
+ * When set to `true`, the component will be disabled.
518
+ *
519
+ * @param {boolean} value - Based on this Boolean value, Toolbar will be enabled (false) or disabled (true).
520
+ * @returns {void}.
521
+ */
522
+ Toolbar.prototype.disable = function (value) {
523
+ var rootEle = this.element;
524
+ if (value) {
525
+ rootEle.classList.add(CLS_DISABLE);
526
+ }
527
+ else {
528
+ rootEle.classList.remove(CLS_DISABLE);
529
+ }
530
+ if (this.activeEle) {
531
+ this.activeEle.setAttribute('tabindex', this.activeEle.getAttribute('data-tabindex'));
532
+ }
533
+ if (this.scrollModule) {
534
+ this.scrollModule.disable(value);
535
+ }
536
+ if (this.popObj) {
537
+ if (isVisible(this.popObj.element) && this.overflowMode !== 'Extended') {
538
+ this.popObj.hide();
539
+ }
540
+ rootEle.querySelector('#' + rootEle.id + '_nav').setAttribute('tabindex', !value ? '0' : '-1');
541
+ }
542
+ };
543
+ Toolbar.prototype.eleContains = function (el) {
544
+ return el.classList.contains(CLS_SEPARATOR) || el.classList.contains(CLS_DISABLE) || el.getAttribute('disabled') || el.classList.contains(CLS_HIDDEN) || !isVisible(el) || !el.classList.contains(CLS_ITEM);
545
+ };
546
+ Toolbar.prototype.focusFirstVisibleEle = function (nodes) {
547
+ var element;
548
+ var index = 0;
549
+ while (index < nodes.length) {
550
+ var ele = nodes[parseInt(index.toString(), 10)];
551
+ if (!ele.classList.contains(CLS_HIDDEN) && !ele.classList.contains(CLS_DISABLE)) {
552
+ return ele;
553
+ }
554
+ index++;
555
+ }
556
+ return element;
557
+ };
558
+ Toolbar.prototype.focusLastVisibleEle = function (nodes) {
559
+ var element;
560
+ var index = nodes.length - 1;
561
+ while (index >= 0) {
562
+ var ele = nodes[parseInt(index.toString(), 10)];
563
+ if (!ele.classList.contains(CLS_HIDDEN) && !ele.classList.contains(CLS_DISABLE)) {
564
+ return ele;
565
+ }
566
+ index--;
567
+ }
568
+ return element;
569
+ };
570
+ Toolbar.prototype.eleFocus = function (closest, pos) {
571
+ var sib = Object(closest)[pos + 'ElementSibling'];
572
+ if (sib) {
573
+ var skipEle = this.eleContains(sib);
574
+ if (skipEle) {
575
+ this.eleFocus(sib, pos);
576
+ return;
577
+ }
578
+ this.elementFocus(sib);
579
+ }
580
+ else if (this.tbarAlign) {
581
+ var elem = Object(closest.parentElement)[pos + 'ElementSibling'];
582
+ if (!isNOU(elem) && elem.children.length === 0) {
583
+ elem = Object(elem)[pos + 'ElementSibling'];
584
+ }
585
+ if (!isNOU(elem) && elem.children.length > 0) {
586
+ if (pos === 'next') {
587
+ var el = elem.querySelector('.' + CLS_ITEM);
588
+ if (this.eleContains(el)) {
589
+ this.eleFocus(el, pos);
590
+ }
591
+ else {
592
+ el.firstElementChild.focus();
593
+ this.activeEleSwitch(el);
594
+ }
595
+ }
596
+ else {
597
+ var el = elem.lastElementChild;
598
+ if (this.eleContains(el)) {
599
+ this.eleFocus(el, pos);
600
+ }
601
+ else {
602
+ this.elementFocus(el);
603
+ }
604
+ }
605
+ }
606
+ }
607
+ else if (!isNOU(closest)) {
608
+ var tbrItems = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + ')' + ':not(.' + CLS_DISABLE + ')' + ':not(.' + CLS_HIDDEN + ')');
609
+ if (pos === 'next' && tbrItems) {
610
+ this.elementFocus(tbrItems[0]);
611
+ }
612
+ else if (pos === 'previous' && tbrItems) {
613
+ this.elementFocus(tbrItems[tbrItems.length - 1]);
614
+ }
615
+ }
616
+ };
617
+ Toolbar.prototype.clickHandler = function (e) {
618
+ var _this = this;
619
+ var trgt = e.target;
620
+ var ele = this.element;
621
+ var isPopupElement = !isNOU(closest(trgt, '.' + CLS_POPUPCLASS));
622
+ var clsList = trgt.classList;
623
+ var popupNav = closest(trgt, ('.' + CLS_TBARNAV));
624
+ if (!popupNav) {
625
+ popupNav = trgt;
626
+ }
627
+ if (!ele.children[0].classList.contains('e-hscroll') && !ele.children[0].classList.contains('e-vscroll')
628
+ && (clsList.contains(CLS_TBARNAV))) {
629
+ clsList = trgt.querySelector('.e-icons').classList;
630
+ }
631
+ if (clsList.contains(CLS_POPUPICON) || clsList.contains(CLS_POPUPDOWN)) {
632
+ this.popupClickHandler(ele, popupNav, CLS_RTL);
633
+ }
634
+ var itemObj;
635
+ var clst = closest(e.target, '.' + CLS_ITEM);
636
+ if ((isNOU(clst) || clst.classList.contains(CLS_DISABLE)) && !popupNav.classList.contains(CLS_TBARNAV)) {
637
+ return;
638
+ }
639
+ if (clst) {
640
+ var tempItem = this.items[this.tbarEle.indexOf(clst)];
641
+ itemObj = tempItem;
642
+ }
643
+ var eventArgs = { originalEvent: e, item: itemObj };
644
+ var isClickBinded = itemObj && !isNOU(itemObj.click) && typeof itemObj.click == 'object' ?
645
+ !isNOU(itemObj.click.observers) && itemObj.click.observers.length > 0 :
646
+ !isNOU(itemObj) && !isNOU(itemObj.click);
647
+ if (isClickBinded) {
648
+ this.trigger('items[' + this.tbarEle.indexOf(clst) + '].click', eventArgs);
649
+ }
650
+ if (!eventArgs.cancel) {
651
+ this.trigger('clicked', eventArgs, function (clickedArgs) {
652
+ if (!isNOU(_this.popObj) && isPopupElement && !clickedArgs.cancel && _this.overflowMode === 'Popup' &&
653
+ clickedArgs.item && clickedArgs.item.type !== 'Input') {
654
+ _this.popObj.hide({ name: 'FadeOut', duration: 100 });
655
+ }
656
+ });
657
+ }
658
+ };
659
+ Toolbar.prototype.popupClickHandler = function (ele, popupNav, CLS_RTL) {
660
+ var popObj = this.popObj;
661
+ if (isVisible(popObj.element)) {
662
+ popupNav.classList.remove(CLS_TBARNAVACT);
663
+ popObj.hide({ name: 'FadeOut', duration: 100 });
664
+ }
665
+ else {
666
+ if (ele.classList.contains(CLS_RTL)) {
667
+ popObj.enableRtl = true;
668
+ popObj.position = { X: 'left', Y: 'top' };
669
+ }
670
+ if (popObj.offsetX === 0 && !ele.classList.contains(CLS_RTL)) {
671
+ popObj.enableRtl = false;
672
+ popObj.position = { X: 'right', Y: 'top' };
673
+ }
674
+ if (this.overflowMode === 'Extended') {
675
+ popObj.element.style.minHeight = '0px';
676
+ popObj.width = this.getToolbarPopupWidth(this.element);
677
+ }
678
+ popObj.dataBind();
679
+ popObj.refreshPosition();
680
+ popObj.element.style.top = this.getElementOffsetY() + 'px';
681
+ popupNav.classList.add(CLS_TBARNAVACT);
682
+ popObj.show({ name: 'FadeIn', duration: 100 });
683
+ }
684
+ };
685
+ Toolbar.prototype.getToolbarPopupWidth = function (ele) {
686
+ var eleStyles = window.getComputedStyle(ele);
687
+ return parseFloat(eleStyles.width) + ((parseFloat(eleStyles.borderRightWidth)) * 2);
688
+ };
689
+ /**
690
+ * To Initialize the control rendering
691
+ *
692
+ * @private
693
+ * @returns {void}
694
+ */
695
+ Toolbar.prototype.render = function () {
696
+ var _this = this;
697
+ this.initialize();
698
+ this.renderControl();
699
+ this.wireEvents();
700
+ this.clickEvent = this.docEvent.bind(this);
701
+ this.scrollEvent = this.docEvent.bind(this);
702
+ this.renderComplete();
703
+ if (this.isReact && this.portals && this.portals.length > 0) {
704
+ this.renderReactTemplates(function () {
705
+ _this.refreshOverflow();
706
+ });
707
+ }
708
+ };
709
+ Toolbar.prototype.initialize = function () {
710
+ var width = formatUnit(this.width);
711
+ var height = formatUnit(this.height);
712
+ if (Browser.info.name !== 'msie' || this.height !== 'auto' || this.overflowMode === 'MultiRow') {
713
+ setStyle(this.element, { 'height': height });
714
+ }
715
+ setStyle(this.element, { 'width': width });
716
+ var ariaAttr = {
717
+ 'role': 'toolbar', 'aria-disabled': 'false',
718
+ 'aria-orientation': !this.isVertical ? 'horizontal' : 'vertical'
719
+ };
720
+ attributes(this.element, ariaAttr);
721
+ if (this.cssClass) {
722
+ addClass([this.element], this.cssClass.split(' '));
723
+ }
724
+ };
725
+ Toolbar.prototype.renderControl = function () {
726
+ var ele = this.element;
727
+ this.trgtEle = (ele.children.length > 0) ? ele.querySelector('div') : null;
728
+ this.tbarAlgEle = { lefts: [], centers: [], rights: [] };
729
+ this.renderItems();
730
+ this.renderLayout();
731
+ };
732
+ Toolbar.prototype.renderLayout = function () {
733
+ this.renderOverflowMode();
734
+ if (this.tbarAlign) {
735
+ this.itemPositioning();
736
+ }
737
+ if (this.popObj && this.popObj.element.childElementCount > 1 && this.checkPopupRefresh(this.element, this.popObj.element)) {
738
+ this.popupRefresh(this.popObj.element, false);
739
+ }
740
+ this.separator();
741
+ };
742
+ Toolbar.prototype.itemsAlign = function (items, itemEleDom) {
743
+ var innerItem;
744
+ var innerPos;
745
+ if (!this.tbarEle) {
746
+ this.tbarEle = [];
747
+ }
748
+ for (var i = 0; i < items.length; i++) {
749
+ innerItem = this.renderSubComponent(items[parseInt(i.toString(), 10)], i);
750
+ if (this.tbarEle.indexOf(innerItem) === -1) {
751
+ this.tbarEle.push(innerItem);
752
+ }
753
+ if (!this.tbarAlign) {
754
+ this.tbarItemAlign(items[parseInt(i.toString(), 10)], itemEleDom, i);
755
+ }
756
+ innerPos = itemEleDom.querySelector('.e-toolbar-' + items[parseInt(i.toString(), 10)].align.toLowerCase());
757
+ if (innerPos) {
758
+ if (!(items[parseInt(i.toString(), 10)].showAlwaysInPopup && items[parseInt(i.toString(), 10)].overflow !== 'Show')) {
759
+ this.tbarAlgEle[(items[parseInt(i.toString(), 10)].align + 's').toLowerCase()].push(innerItem);
760
+ }
761
+ innerPos.appendChild(innerItem);
762
+ }
763
+ else {
764
+ itemEleDom.appendChild(innerItem);
765
+ }
766
+ }
767
+ if (this.isReact) {
768
+ var portals = 'portals';
769
+ this.notify('render-react-toolbar-template', this["" + portals]);
770
+ this.renderReactTemplates();
771
+ }
772
+ };
773
+ /**
774
+ * @hidden
775
+ * @returns {void}
776
+ */
777
+ Toolbar.prototype.changeOrientation = function () {
778
+ var ele = this.element;
779
+ if (this.isVertical) {
780
+ ele.classList.remove(CLS_VERTICAL);
781
+ this.isVertical = false;
782
+ if (this.height === 'auto' || this.height === '100%') {
783
+ ele.style.height = this.height;
784
+ }
785
+ ele.setAttribute('aria-orientation', 'horizontal');
786
+ }
787
+ else {
788
+ ele.classList.add(CLS_VERTICAL);
789
+ this.isVertical = true;
790
+ ele.setAttribute('aria-orientation', 'vertical');
791
+ setStyle(this.element, { 'height': formatUnit(this.height), 'width': formatUnit(this.width) });
792
+ }
793
+ this.destroyMode();
794
+ this.refreshOverflow();
795
+ };
796
+ Toolbar.prototype.initScroll = function (element, innerItems) {
797
+ if (!this.scrollModule && this.checkOverflow(element, innerItems[0])) {
798
+ if (this.tbarAlign) {
799
+ this.element.querySelector('.' + CLS_ITEMS + ' .' + CLS_TBARCENTER).removeAttribute('style');
800
+ }
801
+ if (this.isVertical) {
802
+ this.scrollModule = new VScroll({ scrollStep: this.scrollStep, enableRtl: this.enableRtl }, innerItems[0]);
803
+ }
804
+ else {
805
+ this.scrollModule = new HScroll({ scrollStep: this.scrollStep, enableRtl: this.enableRtl }, innerItems[0]);
806
+ }
807
+ if (this.cssClass) {
808
+ addClass([innerItems[0]], this.cssClass.split(' '));
809
+ }
810
+ var scrollEle = this.scrollModule.element.querySelector('.' + CLS_HSCROLLBAR + ', .' + 'e-vscroll-bar');
811
+ if (scrollEle) {
812
+ scrollEle.removeAttribute('tabindex');
813
+ }
814
+ this.remove(this.scrollModule.element, CLS_TBARPOS);
815
+ setStyle(this.element, { overflow: 'hidden' });
816
+ }
817
+ };
818
+ Toolbar.prototype.itemWidthCal = function (items) {
819
+ var _this = this;
820
+ var width = 0;
821
+ var style;
822
+ [].slice.call(selectAll('.' + CLS_ITEM, items)).forEach(function (el) {
823
+ if (isVisible(el)) {
824
+ style = window.getComputedStyle(el);
825
+ width += _this.isVertical ? el.offsetHeight : el.offsetWidth;
826
+ width += parseFloat(_this.isVertical ? style.marginTop : style.marginRight);
827
+ width += parseFloat(_this.isVertical ? style.marginBottom : style.marginLeft);
828
+ }
829
+ });
830
+ return width;
831
+ };
832
+ Toolbar.prototype.getScrollCntEle = function (innerItem) {
833
+ var trgClass = (this.isVertical) ? '.e-vscroll-content' : '.e-hscroll-content';
834
+ return innerItem.querySelector(trgClass);
835
+ };
836
+ Toolbar.prototype.checkOverflow = function (element, innerItem) {
837
+ if (isNOU(element) || isNOU(innerItem) || !isVisible(element)) {
838
+ return false;
839
+ }
840
+ var eleWidth = this.isVertical ? element.offsetHeight : element.offsetWidth;
841
+ var itemWidth = this.isVertical ? innerItem.offsetHeight : innerItem.offsetWidth;
842
+ if (this.tbarAlign || this.scrollModule || (eleWidth === itemWidth)) {
843
+ itemWidth = this.itemWidthCal(this.scrollModule ? this.getScrollCntEle(innerItem) : innerItem);
844
+ }
845
+ var popNav = element.querySelector('.' + CLS_TBARNAV);
846
+ var scrollNav = element.querySelector('.' + CLS_TBARSCRLNAV);
847
+ var navEleWidth = 0;
848
+ if (popNav) {
849
+ navEleWidth = this.isVertical ? popNav.offsetHeight : popNav.offsetWidth;
850
+ }
851
+ else if (scrollNav) {
852
+ navEleWidth = this.isVertical ? (scrollNav.offsetHeight * (2)) : (scrollNav.offsetWidth * 2);
853
+ }
854
+ if (itemWidth > eleWidth - navEleWidth) {
855
+ return true;
856
+ }
857
+ else {
858
+ return false;
859
+ }
860
+ };
861
+ /**
862
+ * Refresh the whole Toolbar component without re-rendering.
863
+ * - It is used to manually refresh the Toolbar overflow modes such as scrollable, popup, multi row, and extended.
864
+ * - It will refresh the Toolbar component after loading items dynamically.
865
+ *
866
+ * @returns {void}.
867
+ */
868
+ Toolbar.prototype.refreshOverflow = function () {
869
+ this.resize();
870
+ };
871
+ Toolbar.prototype.toolbarAlign = function (innerItems) {
872
+ if (this.tbarAlign) {
873
+ this.add(innerItems, CLS_TBARPOS);
874
+ this.itemPositioning();
875
+ }
876
+ };
877
+ Toolbar.prototype.renderOverflowMode = function () {
878
+ var ele = this.element;
879
+ var innerItems = ele.querySelector('.' + CLS_ITEMS);
880
+ var priorityCheck = this.popupPriCount > 0;
881
+ if (ele && ele.children.length > 0) {
882
+ this.offsetWid = ele.offsetWidth;
883
+ this.remove(this.element, 'e-toolpop');
884
+ if (Browser.info.name === 'msie' && this.height === 'auto') {
885
+ ele.style.height = '';
886
+ }
887
+ switch (this.overflowMode) {
888
+ case 'Scrollable':
889
+ if (isNOU(this.scrollModule)) {
890
+ this.initScroll(ele, [].slice.call(ele.getElementsByClassName(CLS_ITEMS)));
891
+ }
892
+ break;
893
+ case 'Popup':
894
+ this.add(this.element, 'e-toolpop');
895
+ if (this.tbarAlign) {
896
+ this.removePositioning();
897
+ }
898
+ if (this.checkOverflow(ele, innerItems) || priorityCheck) {
899
+ this.setOverflowAttributes(ele);
900
+ }
901
+ this.toolbarAlign(innerItems);
902
+ break;
903
+ case 'MultiRow':
904
+ this.add(innerItems, CLS_MULTIROW);
905
+ if (this.checkOverflow(ele, innerItems) && this.tbarAlign) {
906
+ this.removePositioning();
907
+ this.add(innerItems, CLS_MULTIROWPOS);
908
+ }
909
+ if (ele.style.overflow === 'hidden') {
910
+ ele.style.overflow = '';
911
+ }
912
+ if (Browser.info.name === 'msie' || ele.style.height !== 'auto') {
913
+ ele.style.height = 'auto';
914
+ }
915
+ break;
916
+ case 'Extended':
917
+ this.add(this.element, CLS_EXTEANDABLE_TOOLBAR);
918
+ if (this.checkOverflow(ele, innerItems) || priorityCheck) {
919
+ if (this.tbarAlign) {
920
+ this.removePositioning();
921
+ }
922
+ this.setOverflowAttributes(ele);
923
+ }
924
+ this.toolbarAlign(innerItems);
925
+ }
926
+ }
927
+ };
928
+ Toolbar.prototype.setOverflowAttributes = function (ele) {
929
+ this.createPopupEle(ele, [].slice.call(selectAll('.' + CLS_ITEMS + ' .' + CLS_ITEM, ele)));
930
+ var ariaAttr = {
931
+ 'tabindex': '0', 'role': 'button', 'aria-haspopup': 'true',
932
+ 'aria-label': 'overflow'
933
+ };
934
+ attributes(this.element.querySelector('.' + CLS_TBARNAV), ariaAttr);
935
+ };
936
+ Toolbar.prototype.separator = function () {
937
+ var element = this.element;
938
+ var eleItem = [].slice.call(element.querySelectorAll('.' + CLS_SEPARATOR));
939
+ var multiVar = element.querySelector('.' + CLS_MULTIROW_SEPARATOR);
940
+ var extendVar = element.querySelector('.' + CLS_EXTENDABLE_SEPARATOR);
941
+ var eleInlineItem = this.overflowMode === 'MultiRow' ? multiVar : extendVar;
942
+ if (eleInlineItem !== null) {
943
+ if (this.overflowMode === 'MultiRow') {
944
+ eleInlineItem.classList.remove(CLS_MULTIROW_SEPARATOR);
945
+ }
946
+ else if (this.overflowMode === 'Extended') {
947
+ eleInlineItem.classList.remove(CLS_EXTENDABLE_SEPARATOR);
948
+ }
949
+ }
950
+ for (var i = 0; i <= eleItem.length - 1; i++) {
951
+ if (eleItem[parseInt(i.toString(), 10)].offsetLeft < 30 && eleItem[parseInt(i.toString(), 10)].offsetLeft !== 0) {
952
+ if (this.overflowMode === 'MultiRow') {
953
+ eleItem[parseInt(i.toString(), 10)].classList.add(CLS_MULTIROW_SEPARATOR);
954
+ }
955
+ else if (this.overflowMode === 'Extended') {
956
+ eleItem[parseInt(i.toString(), 10)].classList.add(CLS_EXTENDABLE_SEPARATOR);
957
+ }
958
+ }
959
+ }
960
+ };
961
+ Toolbar.prototype.createPopupEle = function (ele, innerEle) {
962
+ var innerNav = ele.querySelector('.' + CLS_TBARNAV);
963
+ var vertical = this.isVertical;
964
+ if (!innerNav) {
965
+ this.createPopupIcon(ele);
966
+ }
967
+ innerNav = ele.querySelector('.' + CLS_TBARNAV);
968
+ var innerNavDom = (vertical ? innerNav.offsetHeight : innerNav.offsetWidth);
969
+ var eleWidth = ((vertical ? ele.offsetHeight : ele.offsetWidth) - (innerNavDom));
970
+ this.element.classList.remove('e-rtl');
971
+ setStyle(this.element, { direction: 'initial' });
972
+ this.checkPriority(ele, innerEle, eleWidth, true);
973
+ if (this.enableRtl) {
974
+ this.element.classList.add('e-rtl');
975
+ }
976
+ this.element.style.removeProperty('direction');
977
+ this.createPopup();
978
+ };
979
+ Toolbar.prototype.pushingPoppedEle = function (tbarObj, popupPri, ele, eleHeight, sepHeight) {
980
+ var element = tbarObj.element;
981
+ var poppedEle = [].slice.call(selectAll('.' + CLS_POPUP, element.querySelector('.' + CLS_ITEMS)));
982
+ var nodes = selectAll('.' + CLS_TBAROVERFLOW, ele);
983
+ var nodeIndex = 0;
984
+ var nodePri = 0;
985
+ poppedEle.forEach(function (el, index) {
986
+ nodes = selectAll('.' + CLS_TBAROVERFLOW, ele);
987
+ if (el.classList.contains(CLS_TBAROVERFLOW) && nodes.length > 0) {
988
+ if (tbarObj.tbResize && nodes.length > index) {
989
+ ele.insertBefore(el, nodes[parseInt(index.toString(), 10)]);
990
+ ++nodePri;
991
+ }
992
+ else {
993
+ ele.insertBefore(el, ele.children[nodes.length]);
994
+ ++nodePri;
995
+ }
996
+ }
997
+ else if (el.classList.contains(CLS_TBAROVERFLOW)) {
998
+ ele.insertBefore(el, ele.firstChild);
999
+ ++nodePri;
1000
+ }
1001
+ else if (tbarObj.tbResize && el.classList.contains(CLS_POPOVERFLOW) && ele.children.length > 0 && nodes.length === 0) {
1002
+ ele.insertBefore(el, ele.firstChild);
1003
+ ++nodePri;
1004
+ }
1005
+ else if (el.classList.contains(CLS_POPOVERFLOW)) {
1006
+ popupPri.push(el);
1007
+ }
1008
+ else if (tbarObj.tbResize) {
1009
+ ele.insertBefore(el, ele.childNodes[nodeIndex + nodePri]);
1010
+ ++nodeIndex;
1011
+ }
1012
+ else {
1013
+ ele.appendChild(el);
1014
+ }
1015
+ if (el.classList.contains(CLS_SEPARATOR)) {
1016
+ setStyle(el, { display: '', height: sepHeight + 'px' });
1017
+ }
1018
+ else {
1019
+ setStyle(el, { display: '', height: eleHeight + 'px' });
1020
+ }
1021
+ });
1022
+ popupPri.forEach(function (el) {
1023
+ ele.appendChild(el);
1024
+ });
1025
+ var tbarEle = selectAll('.' + CLS_ITEM, element.querySelector('.' + CLS_ITEMS));
1026
+ for (var i = tbarEle.length - 1; i >= 0; i--) {
1027
+ var tbarElement = tbarEle[parseInt(i.toString(), 10)];
1028
+ if (tbarElement.classList.contains(CLS_SEPARATOR) && this.overflowMode !== 'Extended') {
1029
+ setStyle(tbarElement, { display: 'none' });
1030
+ }
1031
+ else {
1032
+ break;
1033
+ }
1034
+ }
1035
+ };
1036
+ Toolbar.prototype.createPopup = function () {
1037
+ var element = this.element;
1038
+ var sepHeight;
1039
+ var sepItem;
1040
+ if (this.overflowMode === 'Extended') {
1041
+ sepItem = element.querySelector('.' + CLS_SEPARATOR);
1042
+ sepHeight =
1043
+ (element.style.height === 'auto' || element.style.height === '') ? null : (sepItem && sepItem.offsetHeight);
1044
+ }
1045
+ var eleItem = element.querySelector('.' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + '):not(.' + CLS_POPUP + ')');
1046
+ var eleHeight = (element.style.height === 'auto' || element.style.height === '') ? null : (eleItem && eleItem.offsetHeight);
1047
+ var ele;
1048
+ var popupPri = [];
1049
+ if (select('#' + element.id + '_popup.' + CLS_POPUPCLASS, element)) {
1050
+ ele = select('#' + element.id + '_popup.' + CLS_POPUPCLASS, element);
1051
+ }
1052
+ else {
1053
+ var extendEle = this.createElement('div', {
1054
+ id: element.id + '_popup', className: CLS_POPUPCLASS + ' ' + CLS_EXTENDABLECLASS
1055
+ });
1056
+ var popupEle = this.createElement('div', { id: element.id + '_popup', className: CLS_POPUPCLASS });
1057
+ ele = this.overflowMode === 'Extended' ? extendEle : popupEle;
1058
+ }
1059
+ this.pushingPoppedEle(this, popupPri, ele, eleHeight, sepHeight);
1060
+ this.popupInit(element, ele);
1061
+ };
1062
+ Toolbar.prototype.getElementOffsetY = function () {
1063
+ return (this.overflowMode === 'Extended' && window.getComputedStyle(this.element).getPropertyValue('box-sizing') === 'border-box' ?
1064
+ this.element.clientHeight : this.element.offsetHeight);
1065
+ };
1066
+ Toolbar.prototype.popupInit = function (element, ele) {
1067
+ if (!this.popObj) {
1068
+ element.appendChild(ele);
1069
+ if (this.cssClass) {
1070
+ addClass([ele], this.cssClass.split(' '));
1071
+ }
1072
+ setStyle(this.element, { overflow: '' });
1073
+ var popup = new Popup(null, {
1074
+ relateTo: this.element,
1075
+ offsetY: (this.isVertical) ? 0 : this.getElementOffsetY(),
1076
+ enableRtl: this.enableRtl,
1077
+ open: this.popupOpen.bind(this),
1078
+ close: this.popupClose.bind(this),
1079
+ collision: { Y: this.enableCollision ? 'flip' : 'none' },
1080
+ position: this.enableRtl ? { X: 'left', Y: 'top' } : { X: 'right', Y: 'top' }
1081
+ });
1082
+ if (this.overflowMode === 'Extended') {
1083
+ popup.width = this.getToolbarPopupWidth(this.element);
1084
+ popup.offsetX = 0;
1085
+ }
1086
+ popup.appendTo(ele);
1087
+ document.addEventListener('scroll', this.clickEvent);
1088
+ document.addEventListener('click', this.scrollEvent);
1089
+ if (this.overflowMode !== 'Extended') {
1090
+ popup.element.style.maxHeight = popup.element.offsetHeight + 'px';
1091
+ }
1092
+ if (this.isVertical) {
1093
+ popup.element.style.visibility = 'hidden';
1094
+ }
1095
+ if (this.isExtendedOpen) {
1096
+ var popupNav = this.element.querySelector('.' + CLS_TBARNAV);
1097
+ popupNav.classList.add(CLS_TBARNAVACT);
1098
+ classList(popupNav.firstElementChild, [CLS_POPUPICON], [CLS_POPUPDOWN]);
1099
+ this.element.querySelector('.' + CLS_EXTENDABLECLASS).classList.add(CLS_POPUPOPEN);
1100
+ }
1101
+ else {
1102
+ popup.hide();
1103
+ }
1104
+ this.popObj = popup;
1105
+ }
1106
+ else if (this.overflowMode !== 'Extended') {
1107
+ var popupEle = this.popObj.element;
1108
+ setStyle(popupEle, { maxHeight: '', display: 'block' });
1109
+ setStyle(popupEle, { maxHeight: popupEle.offsetHeight + 'px', display: '' });
1110
+ }
1111
+ };
1112
+ Toolbar.prototype.tbarPopupHandler = function (isOpen) {
1113
+ if (this.overflowMode === 'Extended') {
1114
+ if (isOpen) {
1115
+ this.add(this.element, CLS_EXTENDEDPOPOPEN);
1116
+ }
1117
+ else {
1118
+ this.remove(this.element, CLS_EXTENDEDPOPOPEN);
1119
+ }
1120
+ }
1121
+ };
1122
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1123
+ Toolbar.prototype.popupOpen = function (e) {
1124
+ var popObj = this.popObj;
1125
+ if (!this.isVertical) {
1126
+ popObj.offsetY = this.getElementOffsetY();
1127
+ popObj.dataBind();
1128
+ }
1129
+ var popupEle = this.popObj.element;
1130
+ var toolEle = this.popObj.element.parentElement;
1131
+ var popupNav = toolEle.querySelector('.' + CLS_TBARNAV);
1132
+ popupNav.setAttribute('aria-expanded', 'true');
1133
+ if (this.overflowMode === 'Extended') {
1134
+ popObj.element.style.minHeight = '';
1135
+ }
1136
+ else {
1137
+ setStyle(popObj.element, { height: 'auto', maxHeight: '' });
1138
+ popObj.element.style.maxHeight = popObj.element.offsetHeight + 'px';
1139
+ }
1140
+ var popupElePos = popupEle.offsetTop + popupEle.offsetHeight + calculatePosition(toolEle).top;
1141
+ var popIcon = popupNav.firstElementChild;
1142
+ popupNav.classList.add(CLS_TBARNAVACT);
1143
+ classList(popIcon, [CLS_POPUPICON], [CLS_POPUPDOWN]);
1144
+ this.tbarPopupHandler(true);
1145
+ var scrollVal = isNOU(window.scrollY) ? 0 : window.scrollY;
1146
+ if (!this.isVertical && ((window.innerHeight + scrollVal) < popupElePos) && (this.element.offsetTop < popupEle.offsetHeight)) {
1147
+ var overflowHeight = (popupEle.offsetHeight - ((popupElePos - window.innerHeight - scrollVal) + 5));
1148
+ popObj.height = overflowHeight + 'px';
1149
+ for (var i = 0; i <= popupEle.childElementCount; i++) {
1150
+ var ele = popupEle.children[parseInt(i.toString(), 10)];
1151
+ if (ele.offsetTop + ele.offsetHeight > overflowHeight) {
1152
+ overflowHeight = ele.offsetTop;
1153
+ break;
1154
+ }
1155
+ }
1156
+ if (this.overflowMode !== 'Extended') {
1157
+ setStyle(popObj.element, { maxHeight: overflowHeight + 'px' });
1158
+ }
1159
+ }
1160
+ else if (this.isVertical && this.overflowMode !== 'Extended') {
1161
+ var tbEleData = this.element.getBoundingClientRect();
1162
+ setStyle(popObj.element, { maxHeight: (tbEleData.top + this.element.offsetHeight) + 'px', bottom: 0, visibility: '' });
1163
+ }
1164
+ if (popObj) {
1165
+ var popupOffset = popupEle.getBoundingClientRect();
1166
+ if (popupOffset.right > document.documentElement.clientWidth && popupOffset.width > toolEle.getBoundingClientRect().width) {
1167
+ popObj.collision = { Y: 'none' };
1168
+ popObj.dataBind();
1169
+ }
1170
+ popObj.refreshPosition();
1171
+ }
1172
+ };
1173
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1174
+ Toolbar.prototype.popupClose = function (e) {
1175
+ var element = this.element;
1176
+ var popupNav = element.querySelector('.' + CLS_TBARNAV);
1177
+ popupNav.setAttribute('aria-expanded', 'false');
1178
+ var popIcon = popupNav.firstElementChild;
1179
+ popupNav.classList.remove(CLS_TBARNAVACT);
1180
+ classList(popIcon, [CLS_POPUPDOWN], [CLS_POPUPICON]);
1181
+ this.tbarPopupHandler(false);
1182
+ };
1183
+ Toolbar.prototype.checkPriority = function (ele, inEle, eleWidth, pre) {
1184
+ var popPriority = this.popupPriCount > 0;
1185
+ var len = inEle.length;
1186
+ var eleWid = eleWidth;
1187
+ var eleOffset;
1188
+ var checkoffset;
1189
+ var sepCheck = 0;
1190
+ var itemCount = 0;
1191
+ var itemPopCount = 0;
1192
+ var checkClass = function (ele, val) {
1193
+ var rVal = false;
1194
+ val.forEach(function (cls) {
1195
+ if (ele.classList.contains(cls)) {
1196
+ rVal = true;
1197
+ }
1198
+ });
1199
+ return rVal;
1200
+ };
1201
+ for (var i = len - 1; i >= 0; i--) {
1202
+ var mrgn = void 0;
1203
+ var compuStyle = window.getComputedStyle(inEle[parseInt(i.toString(), 10)]);
1204
+ if (this.isVertical) {
1205
+ mrgn = parseFloat((compuStyle).marginTop);
1206
+ mrgn += parseFloat((compuStyle).marginBottom);
1207
+ }
1208
+ else {
1209
+ mrgn = parseFloat((compuStyle).marginRight);
1210
+ mrgn += parseFloat((compuStyle).marginLeft);
1211
+ }
1212
+ var fstEleCheck = inEle[parseInt(i.toString(), 10)] === this.tbarEle[0];
1213
+ if (fstEleCheck) {
1214
+ this.tbarEleMrgn = mrgn;
1215
+ }
1216
+ eleOffset = this.isVertical ? inEle[parseInt(i.toString(), 10)].offsetHeight : inEle[parseInt(i.toString(), 10)].offsetWidth;
1217
+ var eleWid_1 = fstEleCheck ? (eleOffset + mrgn) : eleOffset;
1218
+ if (checkClass(inEle[parseInt(i.toString(), 10)], [CLS_POPPRI]) && popPriority) {
1219
+ inEle[parseInt(i.toString(), 10)].classList.add(CLS_POPUP);
1220
+ if (this.isVertical) {
1221
+ setStyle(inEle[parseInt(i.toString(), 10)], { display: 'none', minHeight: eleWid_1 + 'px' });
1222
+ }
1223
+ else {
1224
+ setStyle(inEle[parseInt(i.toString(), 10)], { display: 'none', minWidth: eleWid_1 + 'px' });
1225
+ }
1226
+ itemPopCount++;
1227
+ }
1228
+ if (this.isVertical) {
1229
+ checkoffset =
1230
+ (inEle[parseInt(i.toString(), 10)].offsetTop + inEle[parseInt(i.toString(), 10)].offsetHeight + mrgn) > eleWidth;
1231
+ }
1232
+ else {
1233
+ checkoffset =
1234
+ (inEle[parseInt(i.toString(), 10)].offsetLeft + inEle[parseInt(i.toString(), 10)].offsetWidth + mrgn) > eleWidth;
1235
+ }
1236
+ if (checkoffset) {
1237
+ if (inEle[parseInt(i.toString(), 10)].classList.contains(CLS_SEPARATOR)) {
1238
+ if (this.overflowMode === 'Extended') {
1239
+ var sepEle = inEle[parseInt(i.toString(), 10)];
1240
+ if (checkClass(sepEle, [CLS_SEPARATOR, CLS_TBARIGNORE])) {
1241
+ inEle[parseInt(i.toString(), 10)].classList.add(CLS_POPUP);
1242
+ itemPopCount++;
1243
+ }
1244
+ itemCount++;
1245
+ }
1246
+ else if (this.overflowMode === 'Popup') {
1247
+ if (sepCheck > 0 && itemCount === itemPopCount) {
1248
+ var sepEle = inEle[i + itemCount + (sepCheck - 1)];
1249
+ if (checkClass(sepEle, [CLS_SEPARATOR, CLS_TBARIGNORE])) {
1250
+ setStyle(sepEle, { display: 'none' });
1251
+ }
1252
+ }
1253
+ sepCheck++;
1254
+ itemCount = 0;
1255
+ itemPopCount = 0;
1256
+ }
1257
+ }
1258
+ else {
1259
+ itemCount++;
1260
+ }
1261
+ if (inEle[parseInt(i.toString(), 10)].classList.contains(CLS_TBAROVERFLOW) && pre) {
1262
+ eleWidth -= ((this.isVertical ? inEle[parseInt(i.toString(), 10)].offsetHeight :
1263
+ inEle[parseInt(i.toString(), 10)].offsetWidth) + (mrgn));
1264
+ }
1265
+ else if (!checkClass(inEle[parseInt(i.toString(), 10)], [CLS_SEPARATOR, CLS_TBARIGNORE])) {
1266
+ inEle[parseInt(i.toString(), 10)].classList.add(CLS_POPUP);
1267
+ if (this.isVertical) {
1268
+ setStyle(inEle[parseInt(i.toString(), 10)], { display: 'none', minHeight: eleWid_1 + 'px' });
1269
+ }
1270
+ else {
1271
+ setStyle(inEle[parseInt(i.toString(), 10)], { display: 'none', minWidth: eleWid_1 + 'px' });
1272
+ }
1273
+ itemPopCount++;
1274
+ }
1275
+ else {
1276
+ eleWidth -= ((this.isVertical ? inEle[parseInt(i.toString(), 10)].offsetHeight :
1277
+ inEle[parseInt(i.toString(), 10)].offsetWidth) + (mrgn));
1278
+ }
1279
+ }
1280
+ }
1281
+ if (pre) {
1282
+ var popedEle = selectAll('.' + CLS_ITEM + ':not(.' + CLS_POPUP + ')', this.element);
1283
+ this.checkPriority(ele, popedEle, eleWid, false);
1284
+ }
1285
+ };
1286
+ Toolbar.prototype.createPopupIcon = function (element) {
1287
+ var id = element.id.concat('_nav');
1288
+ var className = 'e-' + element.id.concat('_nav ' + CLS_POPUPNAV);
1289
+ className = this.overflowMode === 'Extended' ? className + ' ' + CLS_EXTENDPOPUP : className;
1290
+ var nav = this.createElement('div', { id: id, className: className });
1291
+ if (Browser.info.name === 'msie' || Browser.info.name === 'edge') {
1292
+ nav.classList.add('e-ie-align');
1293
+ }
1294
+ var navItem = this.createElement('div', { className: CLS_POPUPDOWN + ' e-icons' });
1295
+ nav.appendChild(navItem);
1296
+ nav.setAttribute('tabindex', '0');
1297
+ nav.setAttribute('role', 'button');
1298
+ element.appendChild(nav);
1299
+ };
1300
+ // eslint-disable-next-line max-len
1301
+ Toolbar.prototype.tbarPriRef = function (inEle, indx, sepPri, el, des, elWid, wid, ig, eleStyles) {
1302
+ var ignoreCount = ig;
1303
+ var popEle = this.popObj.element;
1304
+ var query = '.' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + '):not(.' + CLS_TBAROVERFLOW + ')';
1305
+ var priEleCnt = selectAll('.' + CLS_POPUP + ':not(.' + CLS_TBAROVERFLOW + ')', popEle).length;
1306
+ var checkClass = function (ele, val) {
1307
+ return ele.classList.contains(val);
1308
+ };
1309
+ if (selectAll(query, inEle).length === 0) {
1310
+ var eleSep = inEle.children[indx - (indx - sepPri) - 1];
1311
+ var ignoreCheck = (!isNOU(eleSep) && checkClass(eleSep, CLS_TBARIGNORE));
1312
+ if ((!isNOU(eleSep) && checkClass(eleSep, CLS_SEPARATOR) && !isVisible(eleSep)) || ignoreCheck) {
1313
+ eleSep.style.display = 'unset';
1314
+ var eleSepWidth = eleSep.offsetWidth + (parseFloat(window.getComputedStyle(eleSep).marginRight) * 2);
1315
+ var prevSep = eleSep.previousElementSibling;
1316
+ if ((elWid + eleSepWidth) < wid || des) {
1317
+ inEle.insertBefore(el, inEle.children[(indx + ignoreCount) - (indx - sepPri)]);
1318
+ if (!isNOU(prevSep)) {
1319
+ prevSep.style.display = '';
1320
+ }
1321
+ }
1322
+ else {
1323
+ setStyle(el, eleStyles);
1324
+ if (prevSep.classList.contains(CLS_SEPARATOR)) {
1325
+ prevSep.style.display = 'none';
1326
+ }
1327
+ }
1328
+ eleSep.style.display = '';
1329
+ }
1330
+ else {
1331
+ inEle.insertBefore(el, inEle.children[(indx + ignoreCount) - (indx - sepPri)]);
1332
+ }
1333
+ }
1334
+ else {
1335
+ inEle.insertBefore(el, inEle.children[(indx + ignoreCount) - priEleCnt]);
1336
+ }
1337
+ };
1338
+ Toolbar.prototype.popupRefresh = function (popupEle, destroy) {
1339
+ var _this = this;
1340
+ var ele = this.element;
1341
+ var isVer = this.isVertical;
1342
+ var innerEle = ele.querySelector('.' + CLS_ITEMS);
1343
+ var popNav = ele.querySelector('.' + CLS_TBARNAV);
1344
+ if (isNOU(popNav)) {
1345
+ return;
1346
+ }
1347
+ innerEle.removeAttribute('style');
1348
+ popupEle.style.display = 'block';
1349
+ var dimension;
1350
+ if (isVer) {
1351
+ dimension = ele.offsetHeight - (popNav.offsetHeight + innerEle.offsetHeight);
1352
+ }
1353
+ else {
1354
+ dimension = ele.offsetWidth - (popNav.offsetWidth + innerEle.offsetWidth);
1355
+ }
1356
+ var popupEleWidth = 0;
1357
+ [].slice.call(popupEle.children).forEach(function (el) {
1358
+ popupEleWidth += _this.popupEleWidth(el);
1359
+ setStyle(el, { 'position': '' });
1360
+ });
1361
+ if ((dimension + (isVer ? popNav.offsetHeight : popNav.offsetWidth)) > (popupEleWidth) && this.popupPriCount === 0) {
1362
+ destroy = true;
1363
+ }
1364
+ this.popupEleRefresh(dimension, popupEle, destroy);
1365
+ popupEle.style.display = '';
1366
+ if (popupEle.children.length === 0 && popNav && this.popObj) {
1367
+ detach(popNav);
1368
+ popNav = null;
1369
+ this.popObj.destroy();
1370
+ detach(this.popObj.element);
1371
+ this.popObj = null;
1372
+ }
1373
+ };
1374
+ Toolbar.prototype.ignoreEleFetch = function (index, innerEle) {
1375
+ var ignoreEle = [].slice.call(innerEle.querySelectorAll('.' + CLS_TBARIGNORE));
1376
+ var ignoreInx = [];
1377
+ var count = 0;
1378
+ if (ignoreEle.length > 0) {
1379
+ ignoreEle.forEach(function (ele) {
1380
+ ignoreInx.push([].slice.call(innerEle.children).indexOf(ele));
1381
+ });
1382
+ }
1383
+ else {
1384
+ return 0;
1385
+ }
1386
+ ignoreInx.forEach(function (val) {
1387
+ if (val <= index) {
1388
+ count++;
1389
+ }
1390
+ });
1391
+ return count;
1392
+ };
1393
+ Toolbar.prototype.checkPopupRefresh = function (root, popEle) {
1394
+ popEle.style.display = 'block';
1395
+ var elWid = this.popupEleWidth(popEle.firstElementChild);
1396
+ popEle.firstElementChild.style.removeProperty('Position');
1397
+ var tbarWidth = root.offsetWidth - root.querySelector('.' + CLS_TBARNAV).offsetWidth;
1398
+ var tbarItemsWid = root.querySelector('.' + CLS_ITEMS).offsetWidth;
1399
+ popEle.style.removeProperty('display');
1400
+ if (tbarWidth > (elWid + tbarItemsWid)) {
1401
+ return true;
1402
+ }
1403
+ return false;
1404
+ };
1405
+ Toolbar.prototype.popupEleWidth = function (el) {
1406
+ el.style.position = 'absolute';
1407
+ var elWidth = this.isVertical ? el.offsetHeight : el.offsetWidth;
1408
+ var btnText = el.querySelector('.' + CLS_TBARBTNTEXT);
1409
+ if (el.classList.contains('e-tbtn-align') || el.classList.contains(CLS_TBARTEXT)) {
1410
+ var btn = el.children[0];
1411
+ if (!isNOU(btnText) && el.classList.contains(CLS_TBARTEXT)) {
1412
+ btnText.style.display = 'none';
1413
+ }
1414
+ else if (!isNOU(btnText) && el.classList.contains(CLS_POPUPTEXT)) {
1415
+ btnText.style.display = 'block';
1416
+ }
1417
+ btn.style.minWidth = '0%';
1418
+ elWidth = parseFloat(!this.isVertical ? el.style.minWidth : el.style.minHeight);
1419
+ btn.style.minWidth = '';
1420
+ btn.style.minHeight = '';
1421
+ if (!isNOU(btnText)) {
1422
+ btnText.style.display = '';
1423
+ }
1424
+ }
1425
+ return elWidth;
1426
+ };
1427
+ Toolbar.prototype.popupEleRefresh = function (width, popupEle, destroy) {
1428
+ var popPriority = this.popupPriCount > 0;
1429
+ var eleSplice = this.tbarEle;
1430
+ var priEleCnt;
1431
+ var index;
1432
+ var innerEle = this.element.querySelector('.' + CLS_ITEMS);
1433
+ var ignoreCount = 0;
1434
+ var _loop_1 = function (el) {
1435
+ if (el.classList.contains(CLS_POPPRI) && popPriority && !destroy) {
1436
+ return "continue";
1437
+ }
1438
+ var elWidth = this_1.popupEleWidth(el);
1439
+ if (el === this_1.tbarEle[0]) {
1440
+ elWidth += this_1.tbarEleMrgn;
1441
+ }
1442
+ el.style.position = '';
1443
+ if (elWidth < width || destroy) {
1444
+ var inlineStyles = {
1445
+ minWidth: el.style.minWidth, height: el.style.height,
1446
+ minHeight: el.style.minHeight
1447
+ };
1448
+ setStyle(el, { minWidth: '', height: '', minHeight: '' });
1449
+ if (!el.classList.contains(CLS_POPOVERFLOW)) {
1450
+ el.classList.remove(CLS_POPUP);
1451
+ }
1452
+ index = this_1.tbarEle.indexOf(el);
1453
+ if (this_1.tbarAlign) {
1454
+ var pos = this_1.items[parseInt(index.toString(), 10)].align;
1455
+ index = this_1.tbarAlgEle[(pos + 's').toLowerCase()].indexOf(el);
1456
+ eleSplice = this_1.tbarAlgEle[(pos + 's').toLowerCase()];
1457
+ innerEle = this_1.element.querySelector('.' + CLS_ITEMS + ' .' + 'e-toolbar-' + pos.toLowerCase());
1458
+ }
1459
+ var sepBeforePri_1 = 0;
1460
+ if (this_1.overflowMode !== 'Extended') {
1461
+ eleSplice.slice(0, index).forEach(function (el) {
1462
+ if (el.classList.contains(CLS_TBAROVERFLOW) || el.classList.contains(CLS_SEPARATOR)) {
1463
+ if (el.classList.contains(CLS_SEPARATOR)) {
1464
+ el.style.display = '';
1465
+ width -= el.offsetWidth;
1466
+ }
1467
+ sepBeforePri_1++;
1468
+ }
1469
+ });
1470
+ }
1471
+ ignoreCount = this_1.ignoreEleFetch(index, innerEle);
1472
+ if (el.classList.contains(CLS_TBAROVERFLOW)) {
1473
+ this_1.tbarPriRef(innerEle, index, sepBeforePri_1, el, destroy, elWidth, width, ignoreCount, inlineStyles);
1474
+ width -= el.offsetWidth;
1475
+ }
1476
+ else if (index === 0) {
1477
+ innerEle.insertBefore(el, innerEle.firstChild);
1478
+ width -= el.offsetWidth;
1479
+ }
1480
+ else {
1481
+ priEleCnt = selectAll('.' + CLS_TBAROVERFLOW, this_1.popObj.element).length;
1482
+ innerEle.insertBefore(el, innerEle.children[(index + ignoreCount) - priEleCnt]);
1483
+ width -= el.offsetWidth;
1484
+ }
1485
+ el.style.height = '';
1486
+ }
1487
+ else {
1488
+ return "break";
1489
+ }
1490
+ };
1491
+ var this_1 = this;
1492
+ for (var _i = 0, _a = [].slice.call(popupEle.children); _i < _a.length; _i++) {
1493
+ var el = _a[_i];
1494
+ var state_1 = _loop_1(el);
1495
+ if (state_1 === "break")
1496
+ break;
1497
+ }
1498
+ var checkOverflow = this.checkOverflow(this.element, this.element.getElementsByClassName(CLS_ITEMS)[0]);
1499
+ if (checkOverflow && !destroy) {
1500
+ this.renderOverflowMode();
1501
+ }
1502
+ };
1503
+ Toolbar.prototype.removePositioning = function () {
1504
+ var item = this.element.querySelector('.' + CLS_ITEMS);
1505
+ if (isNOU(item) || !item.classList.contains(CLS_TBARPOS)) {
1506
+ return;
1507
+ }
1508
+ this.remove(item, CLS_TBARPOS);
1509
+ var innerItem = [].slice.call(item.childNodes);
1510
+ innerItem[1].removeAttribute('style');
1511
+ innerItem[2].removeAttribute('style');
1512
+ };
1513
+ Toolbar.prototype.refreshPositioning = function () {
1514
+ var item = this.element.querySelector('.' + CLS_ITEMS);
1515
+ this.add(item, CLS_TBARPOS);
1516
+ this.itemPositioning();
1517
+ };
1518
+ Toolbar.prototype.itemPositioning = function () {
1519
+ var item = this.element.querySelector('.' + CLS_ITEMS);
1520
+ var margin;
1521
+ if (isNOU(item) || !item.classList.contains(CLS_TBARPOS)) {
1522
+ return;
1523
+ }
1524
+ var popupNav = this.element.querySelector('.' + CLS_TBARNAV);
1525
+ var innerItem;
1526
+ if (this.scrollModule) {
1527
+ var trgClass = (this.isVertical) ? CLS_VSCROLLCNT : CLS_HSCROLLCNT;
1528
+ innerItem = [].slice.call(item.querySelector('.' + trgClass).children);
1529
+ }
1530
+ else {
1531
+ innerItem = [].slice.call(item.childNodes);
1532
+ }
1533
+ if (this.isVertical) {
1534
+ margin = innerItem[0].offsetHeight + innerItem[2].offsetHeight;
1535
+ }
1536
+ else {
1537
+ margin = innerItem[0].offsetWidth + innerItem[2].offsetWidth;
1538
+ }
1539
+ var tbarWid = this.isVertical ? this.element.offsetHeight : this.element.offsetWidth;
1540
+ if (popupNav) {
1541
+ tbarWid -= (this.isVertical ? popupNav.offsetHeight : popupNav.offsetWidth);
1542
+ var popWid = (this.isVertical ? popupNav.offsetHeight : popupNav.offsetWidth) + 'px';
1543
+ innerItem[2].removeAttribute('style');
1544
+ if (this.isVertical) {
1545
+ if (this.enableRtl) {
1546
+ innerItem[2].style.top = popWid;
1547
+ }
1548
+ else {
1549
+ innerItem[2].style.bottom = popWid;
1550
+ }
1551
+ }
1552
+ else {
1553
+ if (this.enableRtl) {
1554
+ innerItem[2].style.left = popWid;
1555
+ }
1556
+ else {
1557
+ innerItem[2].style.right = popWid;
1558
+ }
1559
+ }
1560
+ }
1561
+ if (tbarWid <= margin) {
1562
+ return;
1563
+ }
1564
+ var value = (((tbarWid - margin)) - (!this.isVertical ? innerItem[1].offsetWidth : innerItem[1].offsetHeight)) / 2;
1565
+ innerItem[1].removeAttribute('style');
1566
+ var mrgn = ((!this.isVertical ? innerItem[0].offsetWidth : innerItem[0].offsetHeight) + value) + 'px';
1567
+ if (this.isVertical) {
1568
+ if (this.enableRtl) {
1569
+ innerItem[1].style.marginBottom = mrgn;
1570
+ }
1571
+ else {
1572
+ innerItem[1].style.marginTop = mrgn;
1573
+ }
1574
+ }
1575
+ else {
1576
+ if (this.enableRtl) {
1577
+ innerItem[1].style.marginRight = mrgn;
1578
+ }
1579
+ else {
1580
+ innerItem[1].style.marginLeft = mrgn;
1581
+ }
1582
+ }
1583
+ };
1584
+ Toolbar.prototype.tbarItemAlign = function (item, itemEle, pos) {
1585
+ var _this = this;
1586
+ if (item.showAlwaysInPopup && item.overflow !== 'Show') {
1587
+ return;
1588
+ }
1589
+ var alignDiv = [];
1590
+ alignDiv.push(this.createElement('div', { className: CLS_TBARLEFT, attrs: { role: 'group' } }));
1591
+ alignDiv.push(this.createElement('div', { className: CLS_TBARCENTER, attrs: { role: 'group' } }));
1592
+ alignDiv.push(this.createElement('div', { className: CLS_TBARRIGHT, attrs: { role: 'group' } }));
1593
+ if (pos === 0 && item.align !== 'Left') {
1594
+ alignDiv.forEach(function (ele) {
1595
+ itemEle.appendChild(ele);
1596
+ });
1597
+ this.tbarAlign = true;
1598
+ this.add(itemEle, CLS_TBARPOS);
1599
+ }
1600
+ else if (item.align !== 'Left') {
1601
+ var alignEle = itemEle.childNodes;
1602
+ var leftAlign_1 = alignDiv[0];
1603
+ [].slice.call(alignEle).forEach(function (el) {
1604
+ _this.tbarAlgEle.lefts.push(el);
1605
+ leftAlign_1.appendChild(el);
1606
+ });
1607
+ itemEle.appendChild(leftAlign_1);
1608
+ itemEle.appendChild(alignDiv[1]);
1609
+ itemEle.appendChild(alignDiv[2]);
1610
+ this.tbarAlign = true;
1611
+ this.add(itemEle, CLS_TBARPOS);
1612
+ }
1613
+ };
1614
+ Toolbar.prototype.ctrlTemplate = function () {
1615
+ var _this = this;
1616
+ this.ctrlTem = this.trgtEle.cloneNode(true);
1617
+ this.add(this.trgtEle, CLS_ITEMS);
1618
+ this.tbarEle = [];
1619
+ var innerEle = [].slice.call(this.trgtEle.children);
1620
+ innerEle.forEach(function (ele) {
1621
+ if (ele.tagName === 'DIV') {
1622
+ _this.tbarEle.push(ele);
1623
+ if (!isNOU(ele.firstElementChild)) {
1624
+ ele.firstElementChild.setAttribute('aria-disabled', 'false');
1625
+ }
1626
+ _this.add(ele, CLS_ITEM);
1627
+ }
1628
+ });
1629
+ };
1630
+ Toolbar.prototype.renderItems = function () {
1631
+ var ele = this.element;
1632
+ var items = this.items;
1633
+ if (this.trgtEle != null) {
1634
+ this.ctrlTemplate();
1635
+ }
1636
+ else if (ele && items.length > 0) {
1637
+ var itemEleDom = void 0;
1638
+ if (ele && ele.children.length > 0) {
1639
+ itemEleDom = ele.querySelector('.' + CLS_ITEMS);
1640
+ }
1641
+ if (!itemEleDom) {
1642
+ itemEleDom = this.createElement('div', { className: CLS_ITEMS });
1643
+ }
1644
+ this.itemsAlign(items, itemEleDom);
1645
+ ele.appendChild(itemEleDom);
1646
+ }
1647
+ };
1648
+ Toolbar.prototype.setAttr = function (attr, element) {
1649
+ var key = Object.keys(attr);
1650
+ var keyVal;
1651
+ for (var i = 0; i < key.length; i++) {
1652
+ keyVal = key[parseInt(i.toString(), 10)];
1653
+ if (keyVal === 'class') {
1654
+ this.add(element, attr["" + keyVal]);
1655
+ }
1656
+ else {
1657
+ element.setAttribute(keyVal, attr["" + keyVal]);
1658
+ }
1659
+ }
1660
+ };
1661
+ /**
1662
+ * Enables or disables the specified Toolbar item.
1663
+ *
1664
+ * @param {number|HTMLElement|NodeList} items - DOM element or an array of items to be enabled or disabled.
1665
+ * @param {boolean} isEnable - Boolean value that determines whether the command should be enabled or disabled.
1666
+ * By default, `isEnable` is set to true.
1667
+ * @returns {void}.
1668
+ */
1669
+ Toolbar.prototype.enableItems = function (items, isEnable) {
1670
+ var elements = items;
1671
+ var len = elements.length;
1672
+ var ele;
1673
+ if (isNOU(isEnable)) {
1674
+ isEnable = true;
1675
+ }
1676
+ var enable = function (isEnable, ele) {
1677
+ if (isEnable) {
1678
+ ele.classList.remove(CLS_DISABLE);
1679
+ if (!isNOU(ele.firstElementChild)) {
1680
+ ele.firstElementChild.setAttribute('aria-disabled', 'false');
1681
+ }
1682
+ }
1683
+ else {
1684
+ ele.classList.add(CLS_DISABLE);
1685
+ if (!isNOU(ele.firstElementChild)) {
1686
+ ele.firstElementChild.setAttribute('aria-disabled', 'true');
1687
+ }
1688
+ }
1689
+ };
1690
+ if (!isNOU(len) && len >= 1) {
1691
+ for (var a = 0, element = [].slice.call(elements); a < len; a++) {
1692
+ var itemElement = element[parseInt(a.toString(), 10)];
1693
+ if (typeof (itemElement) === 'number') {
1694
+ ele = this.getElementByIndex(itemElement);
1695
+ if (isNOU(ele)) {
1696
+ return;
1697
+ }
1698
+ else {
1699
+ elements[parseInt(a.toString(), 10)] = ele;
1700
+ }
1701
+ }
1702
+ else {
1703
+ ele = itemElement;
1704
+ }
1705
+ enable(isEnable, ele);
1706
+ }
1707
+ if (isEnable) {
1708
+ removeClass(elements, CLS_DISABLE);
1709
+ }
1710
+ else {
1711
+ addClass(elements, CLS_DISABLE);
1712
+ }
1713
+ }
1714
+ else {
1715
+ if (typeof (elements) === 'number') {
1716
+ ele = this.getElementByIndex(elements);
1717
+ if (isNOU(ele)) {
1718
+ return;
1719
+ }
1720
+ }
1721
+ else {
1722
+ ele = items;
1723
+ }
1724
+ enable(isEnable, ele);
1725
+ }
1726
+ };
1727
+ Toolbar.prototype.getElementByIndex = function (index) {
1728
+ if (this.tbarEle[parseInt(index.toString(), 10)]) {
1729
+ return this.tbarEle[parseInt(index.toString(), 10)];
1730
+ }
1731
+ return null;
1732
+ };
1733
+ /**
1734
+ * Adds new items to the Toolbar that accepts an array as Toolbar items.
1735
+ *
1736
+ * @param {ItemModel[]} items - DOM element or an array of items to be added to the Toolbar.
1737
+ * @param {number} index - Number value that determines where the command is to be added. By default, index is 0.
1738
+ * @returns {void}.
1739
+ */
1740
+ Toolbar.prototype.addItems = function (items, index) {
1741
+ var innerItems;
1742
+ this.extendedOpen();
1743
+ var itemsDiv = this.element.querySelector('.' + CLS_ITEMS);
1744
+ if (isNOU(itemsDiv)) {
1745
+ this.itemsRerender(items);
1746
+ return;
1747
+ }
1748
+ var innerEle;
1749
+ var itemAgn = 'Left';
1750
+ if (isNOU(index)) {
1751
+ index = 0;
1752
+ }
1753
+ items.forEach(function (e) {
1754
+ if (!isNOU(e.align) && e.align !== 'Left' && itemAgn === 'Left') {
1755
+ itemAgn = e.align;
1756
+ }
1757
+ });
1758
+ for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {
1759
+ var item = items_1[_i];
1760
+ if (isNOU(item.type)) {
1761
+ item.type = 'Button';
1762
+ }
1763
+ innerItems = selectAll('.' + CLS_ITEM, this.element);
1764
+ item.align = itemAgn;
1765
+ innerEle = this.renderSubComponent(item, index);
1766
+ if (this.tbarEle.length >= index && innerItems.length >= 0) {
1767
+ if (isNOU(this.scrollModule)) {
1768
+ this.destroyMode();
1769
+ }
1770
+ var algIndex = item.align[0] === 'L' ? 0 : item.align[0] === 'C' ? 1 : 2;
1771
+ var ele = void 0;
1772
+ if (!this.tbarAlign && itemAgn !== 'Left') {
1773
+ this.tbarItemAlign(item, itemsDiv, 1);
1774
+ this.tbarAlign = true;
1775
+ ele = closest(innerItems[0], '.' + CLS_ITEMS).children[parseInt(algIndex.toString(), 10)];
1776
+ ele.appendChild(innerEle);
1777
+ this.tbarAlgEle[(item.align + 's').toLowerCase()].push(innerEle);
1778
+ this.refreshPositioning();
1779
+ }
1780
+ else if (this.tbarAlign) {
1781
+ ele = closest(innerItems[0], '.' + CLS_ITEMS).children[parseInt(algIndex.toString(), 10)];
1782
+ ele.insertBefore(innerEle, ele.children[parseInt(index.toString(), 10)]);
1783
+ this.tbarAlgEle[(item.align + 's').toLowerCase()].splice(index, 0, innerEle);
1784
+ this.refreshPositioning();
1785
+ }
1786
+ else if (innerItems.length === 0) {
1787
+ innerItems = selectAll('.' + CLS_ITEMS, this.element);
1788
+ innerItems[0].appendChild(innerEle);
1789
+ }
1790
+ else {
1791
+ innerItems[0].parentNode.insertBefore(innerEle, innerItems[parseInt(index.toString(), 10)]);
1792
+ }
1793
+ this.items.splice(index, 0, item);
1794
+ if (item.template) {
1795
+ this.tbarEle.splice(this.tbarEle.length - 1, 1);
1796
+ }
1797
+ this.tbarEle.splice(index, 0, innerEle);
1798
+ index++;
1799
+ this.offsetWid = itemsDiv.offsetWidth;
1800
+ }
1801
+ }
1802
+ itemsDiv.style.width = '';
1803
+ this.renderOverflowMode();
1804
+ if (this.isReact) {
1805
+ this.renderReactTemplates();
1806
+ }
1807
+ };
1808
+ /**
1809
+ * Removes the items from the Toolbar. Acceptable arguments are index of item/HTMLElement/node list.
1810
+ *
1811
+ * @param {number|HTMLElement|NodeList|HTMLElement[]} args
1812
+ * Index or DOM element or an Array of item which is to be removed from the Toolbar.
1813
+ * @returns {void}.
1814
+ */
1815
+ Toolbar.prototype.removeItems = function (args) {
1816
+ var elements = args;
1817
+ var index;
1818
+ var innerItems = [].slice.call(selectAll('.' + CLS_ITEM, this.element));
1819
+ if (typeof (elements) === 'number') {
1820
+ index = parseInt(args.toString(), 10);
1821
+ this.removeItemByIndex(index, innerItems);
1822
+ }
1823
+ else {
1824
+ if (elements && elements.length > 1) {
1825
+ for (var _i = 0, _a = [].slice.call(elements); _i < _a.length; _i++) {
1826
+ var ele = _a[_i];
1827
+ index = this.tbarEle.indexOf(ele);
1828
+ this.removeItemByIndex(index, innerItems);
1829
+ innerItems = selectAll('.' + CLS_ITEM, this.element);
1830
+ }
1831
+ }
1832
+ else {
1833
+ var ele = (elements && elements.length && elements.length === 1) ? elements[0] : args;
1834
+ index = innerItems.indexOf(ele);
1835
+ this.removeItemByIndex(index, innerItems);
1836
+ }
1837
+ }
1838
+ this.resize();
1839
+ };
1840
+ Toolbar.prototype.removeItemByIndex = function (index, innerItems) {
1841
+ if (this.tbarEle[parseInt(index.toString(), 10)] && innerItems[parseInt(index.toString(), 10)]) {
1842
+ var eleIdx = this.tbarEle.indexOf(innerItems[parseInt(index.toString(), 10)]);
1843
+ if (this.tbarAlign) {
1844
+ var indexAgn = this.tbarAlgEle[(this.items[parseInt(eleIdx.toString(), 10)].align + 's').toLowerCase()].indexOf(this.tbarEle[parseInt(eleIdx.toString(), 10)]);
1845
+ this.tbarAlgEle[(this.items[parseInt(eleIdx.toString(), 10)].align + 's').toLowerCase()].splice(parseInt(indexAgn.toString(), 10), 1);
1846
+ }
1847
+ if (this.isReact) {
1848
+ this.clearToolbarTemplate(innerItems[parseInt(index.toString(), 10)]);
1849
+ }
1850
+ var btnItem = innerItems[parseInt(index.toString(), 10)].querySelector('.e-control.e-btn');
1851
+ if (!isNOU(btnItem) && !isNOU(btnItem.ej2_instances[0]) && !(btnItem.ej2_instances[0].isDestroyed)) {
1852
+ btnItem.ej2_instances[0].destroy();
1853
+ }
1854
+ detach(innerItems[parseInt(index.toString(), 10)]);
1855
+ this.items.splice(eleIdx, 1);
1856
+ this.tbarEle.splice(eleIdx, 1);
1857
+ }
1858
+ };
1859
+ Toolbar.prototype.templateRender = function (templateProp, innerEle, item, index) {
1860
+ var itemType = item.type;
1861
+ var eleObj = templateProp;
1862
+ var isComponent;
1863
+ if (typeof (templateProp) === 'object') {
1864
+ isComponent = typeof (eleObj.appendTo) === 'function';
1865
+ }
1866
+ if (typeof (templateProp) === 'string' || !isComponent) {
1867
+ var templateFn = void 0;
1868
+ var val = templateProp;
1869
+ var regEx = new RegExp(/<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i);
1870
+ val = (typeof (templateProp) === 'string') ? templateProp.trim() : templateProp;
1871
+ try {
1872
+ if (typeof (templateProp) === 'object' && !isNOU(templateProp.tagName)) {
1873
+ innerEle.appendChild(templateProp);
1874
+ }
1875
+ else if (typeof (templateProp) === 'string' && regEx.test(val)) {
1876
+ innerEle.innerHTML = val;
1877
+ }
1878
+ else if (document.querySelectorAll(val).length) {
1879
+ var ele = document.querySelector(val);
1880
+ var tempStr = ele.outerHTML.trim();
1881
+ innerEle.appendChild(ele);
1882
+ ele.style.display = '';
1883
+ if (!isNOU(tempStr)) {
1884
+ this.tempId.push(val);
1885
+ }
1886
+ }
1887
+ else {
1888
+ templateFn = templateCompiler(val);
1889
+ }
1890
+ }
1891
+ catch (e) {
1892
+ templateFn = templateCompiler(val);
1893
+ }
1894
+ var tempArray = void 0;
1895
+ if (!isNOU(templateFn)) {
1896
+ var toolbarTemplateID = this.element.id + index + '_template';
1897
+ tempArray = templateFn({}, this, 'template', toolbarTemplateID, this.isStringTemplate, undefined, undefined, this.root);
1898
+ }
1899
+ if (!isNOU(tempArray) && tempArray.length > 0) {
1900
+ [].slice.call(tempArray).forEach(function (ele) {
1901
+ if (!isNOU(ele.tagName)) {
1902
+ ele.style.display = '';
1903
+ }
1904
+ innerEle.appendChild(ele);
1905
+ });
1906
+ }
1907
+ }
1908
+ else if (itemType === 'Input') {
1909
+ var ele = this.createElement('input');
1910
+ if (item.id) {
1911
+ ele.id = item.id;
1912
+ }
1913
+ else {
1914
+ ele.id = getUniqueID('tbr-ipt');
1915
+ }
1916
+ innerEle.appendChild(ele);
1917
+ eleObj.appendTo(ele);
1918
+ }
1919
+ this.add(innerEle, CLS_TEMPLATE);
1920
+ var firstChild = innerEle.firstElementChild;
1921
+ if (!isNOU(firstChild)) {
1922
+ firstChild.setAttribute('tabindex', isNOU(firstChild.getAttribute('tabIndex')) ? '-1' : this.getDataTabindex(firstChild));
1923
+ firstChild.setAttribute('data-tabindex', isNOU(firstChild.getAttribute('tabIndex')) ? '-1' : this.getDataTabindex(firstChild));
1924
+ }
1925
+ this.tbarEle.push(innerEle);
1926
+ };
1927
+ Toolbar.prototype.buttonRendering = function (item, innerEle) {
1928
+ var dom = this.createElement('button', { className: CLS_TBARBTN });
1929
+ dom.setAttribute('type', 'button');
1930
+ var textStr = item.text;
1931
+ var iconCss;
1932
+ var iconPos;
1933
+ if (item.id) {
1934
+ dom.id = item.id;
1935
+ }
1936
+ else {
1937
+ dom.id = getUniqueID('e-tbr-btn');
1938
+ }
1939
+ var btnTxt = this.createElement('span', { className: 'e-tbar-btn-text' });
1940
+ if (textStr) {
1941
+ btnTxt.innerHTML = this.enableHtmlSanitizer ? SanitizeHtmlHelper.sanitize(textStr) : textStr;
1942
+ dom.appendChild(btnTxt);
1943
+ dom.classList.add('e-tbtn-txt');
1944
+ }
1945
+ else {
1946
+ this.add(innerEle, 'e-tbtn-align');
1947
+ }
1948
+ if (item.prefixIcon || item.suffixIcon) {
1949
+ if ((item.prefixIcon && item.suffixIcon) || item.prefixIcon) {
1950
+ iconCss = item.prefixIcon + ' e-icons';
1951
+ iconPos = 'Left';
1952
+ }
1953
+ else {
1954
+ iconCss = item.suffixIcon + ' e-icons';
1955
+ iconPos = 'Right';
1956
+ }
1957
+ }
1958
+ var btnObj = new Button({ iconCss: iconCss, iconPosition: iconPos });
1959
+ btnObj.createElement = this.createElement;
1960
+ btnObj.appendTo(dom);
1961
+ if (item.width) {
1962
+ setStyle(dom, { 'width': formatUnit(item.width) });
1963
+ }
1964
+ return dom;
1965
+ };
1966
+ Toolbar.prototype.renderSubComponent = function (item, index) {
1967
+ var dom;
1968
+ var innerEle = this.createElement('div', { className: CLS_ITEM });
1969
+ var tempDom = this.createElement('div', {
1970
+ innerHTML: this.enableHtmlSanitizer && !isNOU(item.tooltipText) ?
1971
+ SanitizeHtmlHelper.sanitize(item.tooltipText) : item.tooltipText
1972
+ });
1973
+ if (!this.tbarEle) {
1974
+ this.tbarEle = [];
1975
+ }
1976
+ if (item.htmlAttributes) {
1977
+ this.setAttr(item.htmlAttributes, innerEle);
1978
+ }
1979
+ if (item.tooltipText) {
1980
+ innerEle.setAttribute('title', tempDom.textContent);
1981
+ }
1982
+ if (item.cssClass) {
1983
+ innerEle.className = innerEle.className + ' ' + item.cssClass;
1984
+ }
1985
+ if (item.template) {
1986
+ this.templateRender(item.template, innerEle, item, index);
1987
+ }
1988
+ else {
1989
+ switch (item.type) {
1990
+ case 'Button':
1991
+ dom = this.buttonRendering(item, innerEle);
1992
+ dom.setAttribute('tabindex', isNOU(item.tabIndex) ? '-1' : item.tabIndex.toString());
1993
+ dom.setAttribute('data-tabindex', isNOU(item.tabIndex) ? '-1' : item.tabIndex.toString());
1994
+ dom.setAttribute('aria-label', (item.text || item.tooltipText));
1995
+ dom.setAttribute('aria-disabled', 'false');
1996
+ innerEle.appendChild(dom);
1997
+ innerEle.addEventListener('click', this.itemClick.bind(this));
1998
+ break;
1999
+ case 'Separator':
2000
+ this.add(innerEle, CLS_SEPARATOR);
2001
+ break;
2002
+ }
2003
+ }
2004
+ if (item.showTextOn) {
2005
+ var sTxt = item.showTextOn;
2006
+ if (sTxt === 'Toolbar') {
2007
+ this.add(innerEle, CLS_POPUPTEXT);
2008
+ this.add(innerEle, 'e-tbtn-align');
2009
+ }
2010
+ else if (sTxt === 'Overflow') {
2011
+ this.add(innerEle, CLS_TBARTEXT);
2012
+ }
2013
+ }
2014
+ if (item.overflow) {
2015
+ var overflow = item.overflow;
2016
+ if (overflow === 'Show') {
2017
+ this.add(innerEle, CLS_TBAROVERFLOW);
2018
+ }
2019
+ else if (overflow === 'Hide') {
2020
+ if (!innerEle.classList.contains(CLS_SEPARATOR)) {
2021
+ this.add(innerEle, CLS_POPOVERFLOW);
2022
+ }
2023
+ }
2024
+ }
2025
+ if (item.overflow !== 'Show' && item.showAlwaysInPopup && !innerEle.classList.contains(CLS_SEPARATOR)) {
2026
+ this.add(innerEle, CLS_POPPRI);
2027
+ this.popupPriCount++;
2028
+ }
2029
+ if (item.disabled) {
2030
+ this.add(innerEle, CLS_DISABLE);
2031
+ }
2032
+ if (item.visible === false) {
2033
+ this.add(innerEle, CLS_HIDDEN);
2034
+ }
2035
+ return innerEle;
2036
+ };
2037
+ Toolbar.prototype.getDataTabindex = function (ele) {
2038
+ return isNOU(ele.getAttribute('data-tabindex')) ? '-1' : ele.getAttribute('data-tabindex');
2039
+ };
2040
+ Toolbar.prototype.itemClick = function (e) {
2041
+ this.activeEleSwitch(e.currentTarget);
2042
+ };
2043
+ Toolbar.prototype.activeEleSwitch = function (ele) {
2044
+ this.activeEleRemove(ele.firstElementChild);
2045
+ this.activeEle.focus();
2046
+ };
2047
+ Toolbar.prototype.activeEleRemove = function (curEle) {
2048
+ var previousEle = this.element.querySelector('.' + CLS_ITEM + ':not(.' + CLS_DISABLE + ' ):not(.' + CLS_SEPARATOR + ' ):not(.' + CLS_HIDDEN + ' )');
2049
+ if (!isNOU(this.activeEle)) {
2050
+ this.activeEle.setAttribute('tabindex', this.getDataTabindex(this.activeEle));
2051
+ if (previousEle) {
2052
+ previousEle.removeAttribute('tabindex');
2053
+ }
2054
+ previousEle = this.activeEle;
2055
+ }
2056
+ this.activeEle = curEle;
2057
+ if (this.getDataTabindex(this.activeEle) === '-1') {
2058
+ if (isNOU(this.trgtEle) && !curEle.parentElement.classList.contains(CLS_TEMPLATE)) {
2059
+ if (!isNOU(this.element.querySelector('.e-hor-nav')) && this.element.querySelector('.e-hor-nav').classList.contains('e-nav-active')) {
2060
+ this.updateTabIndex('0');
2061
+ var tabindexValue = this.getDataTabindex(previousEle) === '-1' ? '0' : this.getDataTabindex(previousEle);
2062
+ previousEle.setAttribute('tabindex', tabindexValue);
2063
+ }
2064
+ else {
2065
+ this.updateTabIndex('-1');
2066
+ }
2067
+ curEle.removeAttribute('tabindex');
2068
+ }
2069
+ else {
2070
+ var tabIndex = parseInt(this.getDataTabindex(this.activeEle), 10) + 1;
2071
+ this.activeEle.setAttribute('tabindex', tabIndex.toString());
2072
+ }
2073
+ }
2074
+ };
2075
+ Toolbar.prototype.getPersistData = function () {
2076
+ return this.addOnPersist([]);
2077
+ };
2078
+ /**
2079
+ * Returns the current module name.
2080
+ *
2081
+ * @returns {string} - Returns the module name as string.
2082
+ * @private
2083
+ */
2084
+ Toolbar.prototype.getModuleName = function () {
2085
+ return 'toolbar';
2086
+ };
2087
+ Toolbar.prototype.itemsRerender = function (newProp) {
2088
+ this.items = this.tbarItemsCol;
2089
+ if (this.isReact || this.isAngular) {
2090
+ this.clearTemplate();
2091
+ }
2092
+ this.destroyMode();
2093
+ this.destroyItems();
2094
+ this.items = newProp;
2095
+ this.tbarItemsCol = this.items;
2096
+ this.renderItems();
2097
+ this.renderOverflowMode();
2098
+ if (this.isReact) {
2099
+ this.renderReactTemplates();
2100
+ }
2101
+ };
2102
+ Toolbar.prototype.resize = function () {
2103
+ var ele = this.element;
2104
+ this.tbResize = true;
2105
+ if (this.tbarAlign) {
2106
+ this.itemPositioning();
2107
+ }
2108
+ if (this.popObj && this.overflowMode === 'Popup') {
2109
+ this.popObj.hide();
2110
+ }
2111
+ var checkOverflow = this.checkOverflow(ele, ele.getElementsByClassName(CLS_ITEMS)[0]);
2112
+ if (!checkOverflow) {
2113
+ this.destroyScroll();
2114
+ var multirowele = ele.querySelector('.' + CLS_ITEMS);
2115
+ if (!isNOU(multirowele)) {
2116
+ this.remove(multirowele, CLS_MULTIROWPOS);
2117
+ if (this.tbarAlign) {
2118
+ this.add(multirowele, CLS_TBARPOS);
2119
+ }
2120
+ }
2121
+ }
2122
+ if (checkOverflow && this.scrollModule && (this.offsetWid === ele.offsetWidth)) {
2123
+ return;
2124
+ }
2125
+ if (this.offsetWid > ele.offsetWidth || checkOverflow) {
2126
+ this.renderOverflowMode();
2127
+ }
2128
+ if (this.popObj) {
2129
+ if (this.overflowMode === 'Extended') {
2130
+ this.popObj.width = this.getToolbarPopupWidth(this.element);
2131
+ }
2132
+ if (this.tbarAlign) {
2133
+ this.removePositioning();
2134
+ }
2135
+ this.popupRefresh(this.popObj.element, false);
2136
+ if (this.tbarAlign) {
2137
+ this.refreshPositioning();
2138
+ }
2139
+ }
2140
+ if (this.element.querySelector('.' + CLS_HSCROLLBAR)) {
2141
+ this.scrollStep = this.element.querySelector('.' + CLS_HSCROLLBAR).offsetWidth;
2142
+ }
2143
+ this.offsetWid = ele.offsetWidth;
2144
+ this.tbResize = false;
2145
+ this.separator();
2146
+ };
2147
+ Toolbar.prototype.orientationChange = function () {
2148
+ var _this = this;
2149
+ setTimeout(function () {
2150
+ _this.resize();
2151
+ }, 500);
2152
+ };
2153
+ Toolbar.prototype.extendedOpen = function () {
2154
+ var sib = this.element.querySelector('.' + CLS_EXTENDABLECLASS);
2155
+ if (this.overflowMode === 'Extended' && sib) {
2156
+ this.isExtendedOpen = sib.classList.contains(CLS_POPUPOPEN);
2157
+ }
2158
+ };
2159
+ Toolbar.prototype.updateHideEleTabIndex = function (ele, isHidden, isElement, eleIndex, innerItems) {
2160
+ if (isElement) {
2161
+ eleIndex = innerItems.indexOf(ele);
2162
+ }
2163
+ var nextEle = innerItems[++eleIndex];
2164
+ while (nextEle) {
2165
+ var skipEle = this.eleContains(nextEle);
2166
+ if (!skipEle) {
2167
+ var dataTabIndex = nextEle.firstElementChild.getAttribute('data-tabindex');
2168
+ if (isHidden && dataTabIndex === '-1') {
2169
+ nextEle.firstElementChild.setAttribute('tabindex', '0');
2170
+ }
2171
+ else if (dataTabIndex !== nextEle.firstElementChild.getAttribute('tabindex')) {
2172
+ nextEle.firstElementChild.setAttribute('tabindex', dataTabIndex);
2173
+ }
2174
+ break;
2175
+ }
2176
+ nextEle = innerItems[++eleIndex];
2177
+ }
2178
+ };
2179
+ Toolbar.prototype.clearToolbarTemplate = function (templateEle) {
2180
+ if (this.registeredTemplate && this.registeredTemplate["" + 'template']) {
2181
+ var registeredTemplates = this.registeredTemplate;
2182
+ for (var index = 0; index < registeredTemplates["" + 'template'].length; index++) {
2183
+ var registeredItem = registeredTemplates["" + 'template'][parseInt(index.toString(), 10)].rootNodes[0];
2184
+ var closestItem = closest(registeredItem, '.' + CLS_ITEM);
2185
+ if (!isNOU(closestItem) && closestItem === templateEle) {
2186
+ this.clearTemplate(['template'], [registeredTemplates["" + 'template'][parseInt(index.toString(), 10)]]);
2187
+ break;
2188
+ }
2189
+ }
2190
+ }
2191
+ else if (this.portals && this.portals.length > 0) {
2192
+ var portals = this.portals;
2193
+ for (var index = 0; index < portals.length; index++) {
2194
+ var portalItem = portals[parseInt(index.toString(), 10)];
2195
+ var closestItem = closest(portalItem.containerInfo, '.' + CLS_ITEM);
2196
+ if (!isNOU(closestItem) && closestItem === templateEle) {
2197
+ this.clearTemplate(['template'], index);
2198
+ break;
2199
+ }
2200
+ }
2201
+ }
2202
+ };
2203
+ /**
2204
+ * Gets called when the model property changes.The data that describes the old and new values of the property that changed.
2205
+ *
2206
+ * @param {ToolbarModel} newProp - It contains new value of the data.
2207
+ * @param {ToolbarModel} oldProp - It contains old value of the data.
2208
+ * @returns {void}
2209
+ * @private
2210
+ */
2211
+ Toolbar.prototype.onPropertyChanged = function (newProp, oldProp) {
2212
+ var tEle = this.element;
2213
+ this.extendedOpen();
2214
+ for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
2215
+ var prop = _a[_i];
2216
+ switch (prop) {
2217
+ case 'items':
2218
+ if (!(newProp.items instanceof Array && oldProp.items instanceof Array)) {
2219
+ var changedProb = Object.keys(newProp.items);
2220
+ for (var i = 0; i < changedProb.length; i++) {
2221
+ var index = parseInt(Object.keys(newProp.items)[parseInt(i.toString(), 10)], 10);
2222
+ var property = Object.keys(newProp.items[parseInt(index.toString(), 10)])[0];
2223
+ var newProperty = Object(newProp.items[parseInt(index.toString(), 10)])["" + property];
2224
+ if (this.tbarAlign || property === 'align') {
2225
+ this.refresh();
2226
+ this.trigger('created');
2227
+ break;
2228
+ }
2229
+ var popupPriCheck = property === 'showAlwaysInPopup' && !newProperty;
2230
+ var booleanCheck = property === 'overflow' && this.popupPriCount !== 0;
2231
+ if ((popupPriCheck) || (this.items[parseInt(index.toString(), 10)].showAlwaysInPopup) && booleanCheck) {
2232
+ --this.popupPriCount;
2233
+ }
2234
+ if (isNOU(this.scrollModule)) {
2235
+ this.destroyMode();
2236
+ }
2237
+ var itemCol = [].slice.call(selectAll('.' + CLS_ITEMS + ' .' + CLS_ITEM, tEle));
2238
+ if (this.isReact && this.items[parseInt(index.toString(), 10)].template) {
2239
+ this.clearToolbarTemplate(itemCol[parseInt(index.toString(), 10)]);
2240
+ }
2241
+ detach(itemCol[parseInt(index.toString(), 10)]);
2242
+ this.tbarEle.splice(index, 1);
2243
+ this.addItems([this.items[parseInt(index.toString(), 10)]], index);
2244
+ this.items.splice(index, 1);
2245
+ if (this.items[parseInt(index.toString(), 10)].template) {
2246
+ this.tbarEle.splice(this.items.length, 1);
2247
+ }
2248
+ }
2249
+ }
2250
+ else {
2251
+ this.itemsRerender(newProp.items);
2252
+ }
2253
+ break;
2254
+ case 'width':
2255
+ setStyle(tEle, { 'width': formatUnit(newProp.width) });
2256
+ this.refreshOverflow();
2257
+ break;
2258
+ case 'height':
2259
+ setStyle(this.element, { 'height': formatUnit(newProp.height) });
2260
+ break;
2261
+ case 'overflowMode':
2262
+ this.destroyMode();
2263
+ this.renderOverflowMode();
2264
+ if (this.enableRtl) {
2265
+ this.add(tEle, CLS_RTL);
2266
+ }
2267
+ this.refreshOverflow();
2268
+ break;
2269
+ case 'enableRtl':
2270
+ if (newProp.enableRtl) {
2271
+ this.add(tEle, CLS_RTL);
2272
+ }
2273
+ else {
2274
+ this.remove(tEle, CLS_RTL);
2275
+ }
2276
+ if (!isNOU(this.scrollModule)) {
2277
+ if (newProp.enableRtl) {
2278
+ this.add(this.scrollModule.element, CLS_RTL);
2279
+ }
2280
+ else {
2281
+ this.remove(this.scrollModule.element, CLS_RTL);
2282
+ }
2283
+ }
2284
+ if (!isNOU(this.popObj)) {
2285
+ if (newProp.enableRtl) {
2286
+ this.add(this.popObj.element, CLS_RTL);
2287
+ }
2288
+ else {
2289
+ this.remove(this.popObj.element, CLS_RTL);
2290
+ }
2291
+ }
2292
+ if (this.tbarAlign) {
2293
+ this.itemPositioning();
2294
+ }
2295
+ break;
2296
+ case 'scrollStep':
2297
+ if (this.scrollModule) {
2298
+ this.scrollModule.scrollStep = this.scrollStep;
2299
+ }
2300
+ break;
2301
+ case 'enableCollision':
2302
+ if (this.popObj) {
2303
+ this.popObj.collision = { Y: this.enableCollision ? 'flip' : 'none' };
2304
+ }
2305
+ break;
2306
+ case 'cssClass':
2307
+ if (oldProp.cssClass) {
2308
+ removeClass([this.element], oldProp.cssClass.split(' '));
2309
+ }
2310
+ if (newProp.cssClass) {
2311
+ addClass([this.element], newProp.cssClass.split(' '));
2312
+ }
2313
+ break;
2314
+ case 'allowKeyboard':
2315
+ this.unwireKeyboardEvent();
2316
+ if (newProp.allowKeyboard) {
2317
+ this.wireKeyboardEvent();
2318
+ }
2319
+ break;
2320
+ }
2321
+ }
2322
+ };
2323
+ /**
2324
+ * Shows or hides the Toolbar item that is in the specified index.
2325
+ *
2326
+ * @param {number | HTMLElement} index - Index value of target item or DOM element of items to be hidden or shown.
2327
+ * @param {boolean} value - Based on this Boolean value, item will be hide (true) or show (false). By default, value is false.
2328
+ * @returns {void}.
2329
+ */
2330
+ Toolbar.prototype.hideItem = function (index, value) {
2331
+ var isElement = (typeof (index) === 'object') ? true : false;
2332
+ var eleIndex = index;
2333
+ var ele;
2334
+ if (!isElement && isNOU(eleIndex)) {
2335
+ return;
2336
+ }
2337
+ var innerItems = [].slice.call(selectAll('.' + CLS_ITEM, this.element));
2338
+ if (isElement) {
2339
+ ele = index;
2340
+ }
2341
+ else if (this.tbarEle[parseInt(eleIndex.toString(), 10)]) {
2342
+ var innerItems_1 = [].slice.call(selectAll('.' + CLS_ITEM, this.element));
2343
+ ele = innerItems_1[parseInt(eleIndex.toString(), 10)];
2344
+ }
2345
+ if (ele) {
2346
+ if (value) {
2347
+ ele.classList.add(CLS_HIDDEN);
2348
+ if (!ele.classList.contains(CLS_SEPARATOR)) {
2349
+ if (isNOU(ele.firstElementChild.getAttribute('tabindex')) ||
2350
+ ele.firstElementChild.getAttribute('tabindex') !== '-1') {
2351
+ this.updateHideEleTabIndex(ele, value, isElement, eleIndex, innerItems);
2352
+ }
2353
+ }
2354
+ }
2355
+ else {
2356
+ ele.classList.remove(CLS_HIDDEN);
2357
+ if (!ele.classList.contains(CLS_SEPARATOR)) {
2358
+ this.updateHideEleTabIndex(ele, value, isElement, eleIndex, innerItems);
2359
+ }
2360
+ }
2361
+ this.refreshOverflow();
2362
+ }
2363
+ };
2364
+ __decorate([
2365
+ Collection([], Item)
2366
+ ], Toolbar.prototype, "items", void 0);
2367
+ __decorate([
2368
+ Property('auto')
2369
+ ], Toolbar.prototype, "width", void 0);
2370
+ __decorate([
2371
+ Property('auto')
2372
+ ], Toolbar.prototype, "height", void 0);
2373
+ __decorate([
2374
+ Property('')
2375
+ ], Toolbar.prototype, "cssClass", void 0);
2376
+ __decorate([
2377
+ Property('Scrollable')
2378
+ ], Toolbar.prototype, "overflowMode", void 0);
2379
+ __decorate([
2380
+ Property()
2381
+ ], Toolbar.prototype, "scrollStep", void 0);
2382
+ __decorate([
2383
+ Property(true)
2384
+ ], Toolbar.prototype, "enableCollision", void 0);
2385
+ __decorate([
2386
+ Property(true)
2387
+ ], Toolbar.prototype, "enableHtmlSanitizer", void 0);
2388
+ __decorate([
2389
+ Property(true)
2390
+ ], Toolbar.prototype, "allowKeyboard", void 0);
2391
+ __decorate([
2392
+ Event()
2393
+ ], Toolbar.prototype, "clicked", void 0);
2394
+ __decorate([
2395
+ Event()
2396
+ ], Toolbar.prototype, "created", void 0);
2397
+ __decorate([
2398
+ Event()
2399
+ ], Toolbar.prototype, "destroyed", void 0);
2400
+ __decorate([
2401
+ Event()
2402
+ ], Toolbar.prototype, "beforeCreate", void 0);
2403
+ Toolbar = __decorate([
2404
+ NotifyPropertyChanges
2405
+ ], Toolbar);
2406
+ return Toolbar;
2407
+ }(Component));
2408
+ export { Toolbar };